fan-standard-comp 3.1.2 → 3.1.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.
Files changed (244) hide show
  1. package/package.json +1 -1
  2. package/dist/f26952c118ab6cdcd23dc0028ee98c11.svg +0 -173
  3. package/dist/fan-standard-comp.umd.js +0 -597
  4. package/dist/fonts/iconfont.eot +0 -0
  5. package/dist/fonts/iconfont.ttf +0 -0
  6. package/dist/fonts/iconfont.woff +0 -0
  7. package/es/ButtonGroup/ButtonList.d.ts +0 -2
  8. package/es/ButtonGroup/ButtonList.js +0 -37
  9. package/es/ButtonGroup/ButtonMenu.d.ts +0 -2
  10. package/es/ButtonGroup/ButtonMenu.js +0 -38
  11. package/es/ButtonGroup/PopConfirmTitle.d.ts +0 -9
  12. package/es/ButtonGroup/PopConfirmTitle.js +0 -37
  13. package/es/ButtonGroup/index.d.ts +0 -30
  14. package/es/ButtonGroup/index.js +0 -374
  15. package/es/ButtonGroup/style/index.less +0 -36
  16. package/es/DragContent/DragBar.js +0 -21
  17. package/es/DragContent/index.d.ts +0 -14
  18. package/es/DragContent/index.js +0 -173
  19. package/es/DragContent/index.less +0 -44
  20. package/es/FormComp/ChunkUploader/api.js +0 -76
  21. package/es/FormComp/ChunkUploader/index.js +0 -391
  22. package/es/FormComp/ChunkUploader/lib.js +0 -96
  23. package/es/FormComp/ChunkUploader/style/style.less +0 -3
  24. package/es/FormComp/ChunkUploader/upload-queue.class.js +0 -167
  25. package/es/FormComp/ChunkUploader/worker.js +0 -23
  26. package/es/FormComp/EditButton/index.d.ts +0 -26
  27. package/es/FormComp/EditButton/index.js +0 -140
  28. package/es/FormComp/FieldComponent/ReUpload.d.ts +0 -3
  29. package/es/FormComp/FieldComponent/ReUpload.js +0 -131
  30. package/es/FormComp/FieldComponent/RefactorTreeSelect.js +0 -245
  31. package/es/FormComp/FieldComponent/TitleNode.d.ts +0 -6
  32. package/es/FormComp/FieldComponent/TitleNode.js +0 -9
  33. package/es/FormComp/FieldComponent/index.d.ts +0 -38
  34. package/es/FormComp/FieldComponent/index.js +0 -413
  35. package/es/FormComp/FieldComponent/setReadonlyValues.js +0 -236
  36. package/es/FormComp/FieldComponent/style/index.less +0 -116
  37. package/es/FormComp/RenderItemGroup/index.d.ts +0 -37
  38. package/es/FormComp/RenderItemGroup/index.js +0 -234
  39. package/es/FormComp/Uploader/index.d.ts +0 -19
  40. package/es/FormComp/Uploader/index.js +0 -275
  41. package/es/FormComp/Uploader/style/index.less +0 -14
  42. package/es/FormComp/Uploader/util.d.ts +0 -8
  43. package/es/FormComp/Uploader/util.js +0 -38
  44. package/es/FormComp/VarTemplate/index.js +0 -293
  45. package/es/FormComp/index.d.ts +0 -1
  46. package/es/FormComp/index.js +0 -1
  47. package/es/NavLeafScroll/index.js +0 -379
  48. package/es/NavLeafScroll/style/index.less +0 -119
  49. package/es/RefactorTree/data.d.ts +0 -7
  50. package/es/RefactorTree/index.d.ts +0 -40
  51. package/es/RefactorTree/index.js +0 -167
  52. package/es/RefactorTree/indexTreeNode.d.ts +0 -39
  53. package/es/RefactorTree/indexTreeNode.js +0 -237
  54. package/es/RefactorTree/style/index.d.ts +0 -1
  55. package/es/RefactorTree/style/index.js +0 -1
  56. package/es/RefactorTree/style/index.less +0 -22
  57. package/es/RefactorTree/util.d.ts +0 -42
  58. package/es/RefactorTree/util.js +0 -187
  59. package/es/SpecIcon/fonts/demo.css +0 -539
  60. package/es/SpecIcon/fonts/demo_index.html +0 -1315
  61. package/es/SpecIcon/fonts/iconfont.css +0 -211
  62. package/es/SpecIcon/fonts/iconfont.eot +0 -0
  63. package/es/SpecIcon/fonts/iconfont.js +0 -41
  64. package/es/SpecIcon/fonts/iconfont.json +0 -352
  65. package/es/SpecIcon/fonts/iconfont.svg +0 -173
  66. package/es/SpecIcon/fonts/iconfont.ttf +0 -0
  67. package/es/SpecIcon/fonts/iconfont.woff +0 -0
  68. package/es/SpecIcon/fonts/iconfont.woff2 +0 -0
  69. package/es/SpecIcon/index.d.ts +0 -17
  70. package/es/SpecIcon/index.js +0 -77
  71. package/es/SpecIcon/style/iconfont.less +0 -213
  72. package/es/SpecIcon/style/index.less +0 -98
  73. package/es/SplitterLayout/Pane.d.ts +0 -13
  74. package/es/SplitterLayout/Pane.js +0 -36
  75. package/es/SplitterLayout/index.js +0 -375
  76. package/es/SplitterLayout/index.less +0 -58
  77. package/es/StandardContent/SplitterLayout/Pane.js +0 -50
  78. package/es/StandardContent/SplitterLayout/index.js +0 -374
  79. package/es/StandardContent/SplitterLayout/index.less +0 -58
  80. package/es/StandardContent/SubfieldContent.d.ts +0 -17
  81. package/es/StandardContent/SubfieldContent.js +0 -41
  82. package/es/StandardContent/WrapperContent.d.ts +0 -13
  83. package/es/StandardContent/WrapperContent.js +0 -29
  84. package/es/StandardContent/data.d.ts +0 -101
  85. package/es/StandardContent/style/index.less +0 -80
  86. package/es/StandardDragModal/index.d.ts +0 -11
  87. package/es/StandardDragModal/index.js +0 -30
  88. package/es/StandardFilter/index.d.ts +0 -35
  89. package/es/StandardFilter/index.js +0 -253
  90. package/es/StandardFilter/style/index.less +0 -62
  91. package/es/StandardForm/ActionList.js +0 -44
  92. package/es/StandardForm/StepForm.d.ts +0 -19
  93. package/es/StandardForm/StepForm.js +0 -267
  94. package/es/StandardForm/TabForm.d.ts +0 -19
  95. package/es/StandardForm/TabForm.js +0 -122
  96. package/es/StandardForm/index.d.ts +0 -32
  97. package/es/StandardForm/index.js +0 -170
  98. package/es/StandardForm/style/index.less +0 -58
  99. package/es/StandardModal/UpdateFormRef.js +0 -18
  100. package/es/StandardModal/index.d.ts +0 -44
  101. package/es/StandardModal/index.js +0 -495
  102. package/es/StandardModal/style/index.less +0 -50
  103. package/es/StandardPanel/index.d.ts +0 -28
  104. package/es/StandardPanel/index.js +0 -134
  105. package/es/StandardPanel/style/index.less +0 -135
  106. package/es/StandardTable/index.d.ts +0 -22
  107. package/es/StandardTable/index.js +0 -126
  108. package/es/StandardTable/style/index.d.ts +0 -1
  109. package/es/StandardTable/style/index.js +0 -1
  110. package/es/StandardTable/style/index.less +0 -206
  111. package/es/components/IconNode/index.d.ts +0 -16
  112. package/es/components/IconNode/index.js +0 -28
  113. package/es/components/index.d.ts +0 -2
  114. package/es/components/index.js +0 -2
  115. package/es/data/func.code.js +0 -112
  116. package/es/data/general.config.js +0 -172
  117. package/es/data/index.js +0 -3
  118. package/es/index.d.ts +0 -24
  119. package/es/index.js +0 -31
  120. package/es/styles/index.less +0 -0
  121. package/es/theme/spec-variable.less +0 -48
  122. package/es/utils/ValueFormat.js +0 -50
  123. package/es/utils/filterPermission.js +0 -111
  124. package/es/utils/getParentNodes.js +0 -215
  125. package/es/utils/index.js +0 -3
  126. package/lib/ButtonGroup/ButtonList.d.ts +0 -2
  127. package/lib/ButtonGroup/ButtonList.js +0 -55
  128. package/lib/ButtonGroup/ButtonMenu.d.ts +0 -2
  129. package/lib/ButtonGroup/ButtonMenu.js +0 -51
  130. package/lib/ButtonGroup/PopConfirmTitle.d.ts +0 -9
  131. package/lib/ButtonGroup/PopConfirmTitle.js +0 -48
  132. package/lib/ButtonGroup/index.d.ts +0 -30
  133. package/lib/ButtonGroup/index.js +0 -405
  134. package/lib/ButtonGroup/style/index.less +0 -36
  135. package/lib/DragContent/DragBar.js +0 -33
  136. package/lib/DragContent/index.d.ts +0 -14
  137. package/lib/DragContent/index.js +0 -191
  138. package/lib/DragContent/index.less +0 -44
  139. package/lib/FormComp/ChunkUploader/api.js +0 -89
  140. package/lib/FormComp/ChunkUploader/index.js +0 -410
  141. package/lib/FormComp/ChunkUploader/lib.js +0 -113
  142. package/lib/FormComp/ChunkUploader/style/style.less +0 -3
  143. package/lib/FormComp/ChunkUploader/upload-queue.class.js +0 -174
  144. package/lib/FormComp/ChunkUploader/worker.js +0 -28
  145. package/lib/FormComp/EditButton/index.d.ts +0 -26
  146. package/lib/FormComp/EditButton/index.js +0 -159
  147. package/lib/FormComp/FieldComponent/ReUpload.d.ts +0 -3
  148. package/lib/FormComp/FieldComponent/ReUpload.js +0 -151
  149. package/lib/FormComp/FieldComponent/RefactorTreeSelect.js +0 -268
  150. package/lib/FormComp/FieldComponent/TitleNode.d.ts +0 -6
  151. package/lib/FormComp/FieldComponent/TitleNode.js +0 -19
  152. package/lib/FormComp/FieldComponent/index.d.ts +0 -38
  153. package/lib/FormComp/FieldComponent/index.js +0 -457
  154. package/lib/FormComp/FieldComponent/setReadonlyValues.js +0 -263
  155. package/lib/FormComp/FieldComponent/style/index.less +0 -116
  156. package/lib/FormComp/RenderItemGroup/index.d.ts +0 -37
  157. package/lib/FormComp/RenderItemGroup/index.js +0 -255
  158. package/lib/FormComp/Uploader/index.d.ts +0 -19
  159. package/lib/FormComp/Uploader/index.js +0 -301
  160. package/lib/FormComp/Uploader/style/index.less +0 -14
  161. package/lib/FormComp/Uploader/util.d.ts +0 -8
  162. package/lib/FormComp/Uploader/util.js +0 -47
  163. package/lib/FormComp/VarTemplate/index.js +0 -308
  164. package/lib/FormComp/index.d.ts +0 -1
  165. package/lib/FormComp/index.js +0 -15
  166. package/lib/NavLeafScroll/index.js +0 -397
  167. package/lib/NavLeafScroll/style/index.less +0 -119
  168. package/lib/RefactorTree/data.d.ts +0 -7
  169. package/lib/RefactorTree/index.d.ts +0 -40
  170. package/lib/RefactorTree/index.js +0 -190
  171. package/lib/RefactorTree/indexTreeNode.d.ts +0 -39
  172. package/lib/RefactorTree/indexTreeNode.js +0 -260
  173. package/lib/RefactorTree/style/index.d.ts +0 -1
  174. package/lib/RefactorTree/style/index.js +0 -3
  175. package/lib/RefactorTree/style/index.less +0 -22
  176. package/lib/RefactorTree/util.d.ts +0 -42
  177. package/lib/RefactorTree/util.js +0 -195
  178. package/lib/SpecIcon/fonts/demo.css +0 -539
  179. package/lib/SpecIcon/fonts/demo_index.html +0 -1315
  180. package/lib/SpecIcon/fonts/iconfont.css +0 -211
  181. package/lib/SpecIcon/fonts/iconfont.eot +0 -0
  182. package/lib/SpecIcon/fonts/iconfont.js +0 -43
  183. package/lib/SpecIcon/fonts/iconfont.json +0 -352
  184. package/lib/SpecIcon/fonts/iconfont.svg +0 -173
  185. package/lib/SpecIcon/fonts/iconfont.ttf +0 -0
  186. package/lib/SpecIcon/fonts/iconfont.woff +0 -0
  187. package/lib/SpecIcon/fonts/iconfont.woff2 +0 -0
  188. package/lib/SpecIcon/index.d.ts +0 -17
  189. package/lib/SpecIcon/index.js +0 -90
  190. package/lib/SpecIcon/style/iconfont.less +0 -213
  191. package/lib/SpecIcon/style/index.less +0 -98
  192. package/lib/SplitterLayout/Pane.d.ts +0 -13
  193. package/lib/SplitterLayout/Pane.js +0 -48
  194. package/lib/SplitterLayout/index.js +0 -386
  195. package/lib/SplitterLayout/index.less +0 -58
  196. package/lib/StandardContent/SplitterLayout/Pane.js +0 -62
  197. package/lib/StandardContent/SplitterLayout/index.js +0 -387
  198. package/lib/StandardContent/SplitterLayout/index.less +0 -58
  199. package/lib/StandardContent/SubfieldContent.d.ts +0 -17
  200. package/lib/StandardContent/SubfieldContent.js +0 -56
  201. package/lib/StandardContent/WrapperContent.d.ts +0 -13
  202. package/lib/StandardContent/WrapperContent.js +0 -43
  203. package/lib/StandardContent/data.d.ts +0 -101
  204. package/lib/StandardContent/style/index.less +0 -80
  205. package/lib/StandardDragModal/index.d.ts +0 -11
  206. package/lib/StandardDragModal/index.js +0 -43
  207. package/lib/StandardFilter/index.d.ts +0 -35
  208. package/lib/StandardFilter/index.js +0 -272
  209. package/lib/StandardFilter/style/index.less +0 -62
  210. package/lib/StandardForm/ActionList.js +0 -57
  211. package/lib/StandardForm/StepForm.d.ts +0 -19
  212. package/lib/StandardForm/StepForm.js +0 -295
  213. package/lib/StandardForm/TabForm.d.ts +0 -19
  214. package/lib/StandardForm/TabForm.js +0 -148
  215. package/lib/StandardForm/index.d.ts +0 -32
  216. package/lib/StandardForm/index.js +0 -197
  217. package/lib/StandardForm/style/index.less +0 -58
  218. package/lib/StandardModal/UpdateFormRef.js +0 -32
  219. package/lib/StandardModal/index.d.ts +0 -44
  220. package/lib/StandardModal/index.js +0 -525
  221. package/lib/StandardModal/style/index.less +0 -50
  222. package/lib/StandardPanel/index.d.ts +0 -28
  223. package/lib/StandardPanel/index.js +0 -155
  224. package/lib/StandardPanel/style/index.less +0 -135
  225. package/lib/StandardTable/index.d.ts +0 -22
  226. package/lib/StandardTable/index.js +0 -143
  227. package/lib/StandardTable/style/index.d.ts +0 -1
  228. package/lib/StandardTable/style/index.js +0 -3
  229. package/lib/StandardTable/style/index.less +0 -206
  230. package/lib/components/IconNode/index.d.ts +0 -16
  231. package/lib/components/IconNode/index.js +0 -39
  232. package/lib/components/index.d.ts +0 -2
  233. package/lib/components/index.js +0 -15
  234. package/lib/data/func.code.js +0 -119
  235. package/lib/data/general.config.js +0 -179
  236. package/lib/data/index.js +0 -23
  237. package/lib/index.d.ts +0 -24
  238. package/lib/index.js +0 -236
  239. package/lib/styles/index.less +0 -0
  240. package/lib/theme/spec-variable.less +0 -48
  241. package/lib/utils/ValueFormat.js +0 -58
  242. package/lib/utils/filterPermission.js +0 -127
  243. package/lib/utils/getParentNodes.js +0 -226
  244. package/lib/utils/index.js +0 -35
@@ -1,215 +0,0 @@
1
- /**
2
- * @description 递归查看父级节点数据集合及当前节点数据
3
- * @params {Array} list 当前需要过滤查看的数据集合、
4
- * @params {String/Array} nodeKey 当前用于查找匹配数据的标识值
5
- * @params {Object} params 指定当前数据中,筛选对应子集合字段名及匹配标识值字段名
6
- * (childrenParam:指当前子集合数据字段名(字符串表示单个,数组表示当前多个子集合字段名),keyParam: 指当前匹配标识值字段名)
7
- * @params {Object} extra
8
- *
9
- * @result {Array} nodeParent 当前传入nodeKey值所有上级别父级数据对象数组集合(倒序排列,根节点在最后一条)
10
- * @result {Array} parentKeys 当前传入nodeKey值所有上级别父级数据关键字数据集合(keyParam)(倒序排列,根节点在最后一条)
11
- * @result {Array} matchNode 当前传入nodeKey值所在的数据对象集合
12
- * */
13
- var getParentNodes = function getParentNodes(list, nodeKey) {
14
- var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
15
- childrenParam: 'children',
16
- keyParam: 'value'
17
- };
18
- var extraProps = arguments.length > 3 ? arguments[3] : undefined;
19
- // firstExtra 对应 rule值 SHOW_PARENT,SHOW_CHILD,SHOW_ALL 这几个值是由 'tree-select'控件配置返回的
20
- // const childrenParams = ['menuItems', 'menuFuncItems', 'items']
21
- var matchNode = [];
22
- var parentKeys = []; // 存储查找到的节点的父节点数据
23
-
24
- var nodeParent = []; // 存储查找到的节点的父节点数据
25
- // 移除上一次累加的数据
26
-
27
- var removePrevIndex = function removePrevIndex(array, item) {
28
- for (var i = 0; i < array.length; i += 1) {
29
- if (array[i][params.keyParam] === item[params.keyParam]) {
30
- return i;
31
- }
32
- }
33
-
34
- return null;
35
- };
36
-
37
- var deepFind = function deepFind(array, nodeId) {
38
- for (var i = 0; i < array.length; i += 1) {
39
- var node = array[i];
40
-
41
- if (node[params.keyParam] === nodeId) {
42
- matchNode.splice(0, 1, node); // 查找到则赋值,且跳出循环
43
-
44
- break;
45
- } // 如果是单个
46
-
47
-
48
- if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
49
- deepFind(node[params.childrenParam] || node[params.childrenParam], nodeId);
50
- nodeParent.push(node); // 将当前节点数据存储到父节点数据中
51
-
52
- if (matchNode.length > 0) {
53
- break; // 在子节点查找到了,需要跳出
54
- } else {
55
- nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
56
- }
57
- } // 其他条件
58
-
59
- /* else if (node.menuFuncItems && node.menuFuncItems.length > 0) {
60
- deepFind(node.menuFuncItems, nodeId);
61
- nodeParent.push(node); // 将当前节点数据存储到父节点数据中
62
- if (matchNode.length > 0) {
63
- break; // 在子节点查找到了,需要跳出
64
- } else {
65
- nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
66
- }
67
- } else if (node.items && node.items.length > 0) {
68
- // 数据权限的子菜单集合 items
69
- deepFind(node.items, nodeId);
70
- nodeParent.push(node); // 将当前节点数据存储到父节点数据中
71
- if (matchNode.length > 0) {
72
- break; // 在子节点查找到了,需要跳出
73
- } else {
74
- nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
75
- }
76
- } else if (node.dataScopeList && node.dataScopeList.length > 0) {
77
- // 数据权限的子菜单集合 dataScopeList
78
- deepFind(node.dataScopeList, nodeId);
79
- nodeParent.push(node); // 将当前节点数据存储到父节点数据中
80
- if (matchNode.length > 0) {
81
- break; // 在子节点查找到了,需要跳出
82
- } else {
83
- nodeParent.splice(removePrevIndex(nodeParent, node), 1); // 如果在子节点没有查找到,则将原来添加的父节点数据移除
84
- }
85
- }*/
86
-
87
- }
88
-
89
- return matchNode; // 返回查找到的节点数据(格式为数组)
90
- }; // 查找单个节点
91
-
92
-
93
- var findMatchItem = function findMatchItem(arrList, key) {
94
- var matchItem;
95
-
96
- for (var i = 0; i < arrList.length; i += 1) {
97
- var node = arrList[i];
98
-
99
- if (node[params.keyParam] === key) {
100
- matchItem = node;
101
- break;
102
- }
103
-
104
- if (node[params.childrenParam]) {
105
- matchItem = findMatchItem(node[params.childrenParam], key);
106
- }
107
- }
108
-
109
- return matchItem;
110
- }; // nodeKey 为数组时返回当前数据(TODO。目前仅返回一级,多级情况未判断,且 nodeParent 值也未调整)
111
-
112
-
113
- if (Array.isArray(nodeKey)) {
114
- // const {showCheckedStrategy} = extraProps;
115
- // TODO 需要判断 showCheckedStrategy 值为 SHOW_PARENT、 SHOW_CHILD 、SHOW_ALL不同情况展示
116
- nodeKey.map(function (key) {
117
- var matchItem = findMatchItem(list, key);
118
- if (matchItem) matchNode.push(findMatchItem(list, key));
119
- });
120
- } else {
121
- deepFind(list, nodeKey);
122
- }
123
-
124
- nodeParent.forEach(function (par) {
125
- return parentKeys.push(par[params.keyParam]);
126
- }); // 将所有父节点的关键值(keyParam指定字段名)的数据集合在数组内
127
-
128
- return {
129
- nodeParent: nodeParent,
130
- parentKeys: parentKeys,
131
- matchNode: matchNode
132
- }; // 最终查找到的父节点数组 // nodeParent.concat(result || []);
133
- }; // 递归查找指定ID所有的子菜单与子功能集合
134
-
135
-
136
- var getChildrenNodes = function getChildrenNodes(childNode) {
137
- var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
138
- childrenParam: 'children',
139
- keyParam: 'value'
140
- };
141
- var childKeys = [];
142
- var nodeChildren = []; // 存储:authId, types
143
-
144
- var deepFindChild = function deepFindChild(cList) {
145
- Array.isArray(cList) && cList.forEach(function (item) {
146
- childKeys.push(item[params.keyParam]);
147
- nodeChildren.push(item);
148
- if (item[params.childrenParam]) deepFindChild(item[params.childrenParam]);
149
- });
150
- };
151
-
152
- deepFindChild(childNode);
153
- return {
154
- childKeys: childKeys,
155
- nodeChildren: nodeChildren
156
- };
157
- }; // 查找节点路径
158
-
159
-
160
- var getNodePaths = function getNodePaths(list, nodeKey) {
161
- var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
162
- childrenParam: 'children',
163
- keyParam: 'value'
164
- };
165
- var extraProps = arguments.length > 3 ? arguments[3] : undefined;
166
-
167
- // 获取指定节点的路径数组
168
- var getPathByKey = function getPathByKey(value, arr) {
169
- var findNodePath = function findNodePath(node, value, nodePathArray) {
170
- // 这里可以自定义push的内容,而不是整个node,而且这里node也包含了children
171
- nodePathArray.push(node); // 找到符合条件的节点,通过throw终止掉递归
172
-
173
- if (node[params.keyParam] === value) {
174
- // 也可以直接使用return;结束循环
175
- throw "over!";
176
- }
177
-
178
- if (node[params.childrenParam] && node[params.childrenParam].length > 0) {
179
- for (var i = 0; i < node[params.childrenParam].length; i++) {
180
- findNodePath(node[params.childrenParam][i], value, nodePathArray);
181
- } // 当前节点的子节点遍历完依旧没找到,则删除路径中的该节点
182
-
183
-
184
- nodePathArray.pop();
185
- } else {
186
- // 找到叶子节点时,删除路径当中的该叶子节点
187
- nodePathArray.pop();
188
- }
189
- }; // 用于存储节点唯一标识值路径数组
190
-
191
-
192
- var nodePathArray = [];
193
-
194
- try {
195
- for (var i = 0; i < arr.length; i++) {
196
- findNodePath(arr[i], value, nodePathArray);
197
- }
198
- } catch (e) {
199
- return nodePathArray;
200
- }
201
- };
202
-
203
- var pathNode = [];
204
-
205
- if (Array.isArray(nodeKey)) {
206
- nodeKey.map(function (key) {
207
- var pathItems = getPathByKey(key, list);
208
- if (pathItems) pathNode.push(pathItems);
209
- });
210
- }
211
-
212
- return pathNode;
213
- };
214
-
215
- export { getParentNodes, getChildrenNodes, getNodePaths };
package/es/utils/index.js DELETED
@@ -1,3 +0,0 @@
1
- import UtilValueFormat from './ValueFormat';
2
- import { getParentNodes, getChildrenNodes, getNodePaths } from './getParentNodes';
3
- export { UtilValueFormat, getParentNodes, getChildrenNodes, getNodePaths };
@@ -1,2 +0,0 @@
1
- declare const RenderButtonList: (item: any) => JSX.Element;
2
- export default RenderButtonList;
@@ -1,55 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- require("antd/es/button/style");
9
-
10
- var _button = _interopRequireDefault(require("antd/es/button"));
11
-
12
- require("antd/es/dropdown/style");
13
-
14
- var _dropdown = _interopRequireDefault(require("antd/es/dropdown"));
15
-
16
- var _react = _interopRequireDefault(require("react"));
17
-
18
- var _SpecIcon = _interopRequireDefault(require("@/SpecIcon"));
19
-
20
- var _ButtonMenu = _interopRequireDefault(require("./ButtonMenu"));
21
-
22
- var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
23
-
24
- var _filterPermission = require("@/utils/filterPermission");
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
-
28
- // 渲染按钮形式 (用于筛选)
29
- var RenderButtonList = function RenderButtonList(item) {
30
- if (Array.isArray(item.children) && item.children.length > 0) {
31
- return /*#__PURE__*/_react.default.createElement(_dropdown.default, {
32
- overlay: (0, _ButtonMenu.default)(item.children),
33
- placement: "bottomRight"
34
- }, /*#__PURE__*/_react.default.createElement(_button.default, {
35
- type: "primary"
36
- }, item.exName || item.name, " ", /*#__PURE__*/_react.default.createElement(_SpecIcon.default, {
37
- name: "down"
38
- })));
39
- }
40
-
41
- return /*#__PURE__*/_react.default.createElement(_button.default, {
42
- type: item.type ? item.type : 'primary',
43
- danger: item.danger,
44
- icon: /*#__PURE__*/_react.default.createElement(_IconNode.default, {
45
- icon: item.icon
46
- }),
47
- disabled: (0, _filterPermission.btnIsDisabled)(item.disabled, item.rowParams),
48
- onClick: item.fn ? function () {
49
- return item.fn(item);
50
- } : null
51
- }, item.exName || item.name);
52
- };
53
-
54
- var _default = RenderButtonList;
55
- exports.default = _default;
@@ -1,2 +0,0 @@
1
- declare const RenderButtonList: (group: any) => JSX.Element;
2
- export default RenderButtonList;
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- require("antd/es/menu/style");
9
-
10
- var _menu = _interopRequireDefault(require("antd/es/menu"));
11
-
12
- var _react = _interopRequireDefault(require("react"));
13
-
14
- var _IconNode = _interopRequireDefault(require("@/components/IconNode"));
15
-
16
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
-
18
- // 渲染按钮多层级形式 (用于筛选)
19
- var RenderButtonList = function RenderButtonList(group) {
20
- return /*#__PURE__*/_react.default.createElement(_menu.default, null, group.map(function (item, index) {
21
- if (item.children) {
22
- return /*#__PURE__*/_react.default.createElement(_menu.default.SubMenu, {
23
- title: item.exName || item.name,
24
- key: index
25
- }, item.children.map(function (child, childIndex) {
26
- return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
27
- key: childIndex
28
- }, /*#__PURE__*/_react.default.createElement("a", {
29
- onClick: child.fn ? function () {
30
- return child.fn(child);
31
- } : null
32
- }, /*#__PURE__*/_react.default.createElement(_IconNode.default, {
33
- icon: child.icon
34
- }), " ", child.exName || child.name));
35
- }));
36
- }
37
-
38
- return /*#__PURE__*/_react.default.createElement(_menu.default.Item, {
39
- key: index
40
- }, /*#__PURE__*/_react.default.createElement("a", {
41
- onClick: item.fn ? function () {
42
- return item.fn(item);
43
- } : null
44
- }, /*#__PURE__*/_react.default.createElement(_IconNode.default, {
45
- icon: item.icon
46
- }), " ", item.exName || item.name));
47
- }));
48
- };
49
-
50
- var _default = RenderButtonList;
51
- exports.default = _default;
@@ -1,9 +0,0 @@
1
- interface ConfirmTitleProps {
2
- extraRow?: object;
3
- confirmText?: any;
4
- confirmConfig?: {
5
- title?: any;
6
- };
7
- }
8
- declare const PopConfirmTitle: (propsData: ConfirmTitleProps) => any;
9
- export default PopConfirmTitle;
@@ -1,48 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
-
8
- var _react = _interopRequireDefault(require("react"));
9
-
10
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
-
12
- function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
13
-
14
- function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
15
-
16
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
17
-
18
- function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
19
-
20
- function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
21
-
22
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
23
-
24
- // 气泡确认框标题配置
25
- var PopConfirmTitle = function PopConfirmTitle(propsData) {
26
- var confirmConfig = propsData.confirmConfig,
27
- confirmText = propsData.confirmText,
28
- extraRow = propsData.extraRow;
29
-
30
- if (propsData.hasOwnProperty('confirmConfig') && confirmConfig.title) {
31
- var title = confirmConfig.title;
32
- if (!title) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, null);
33
- return typeof title === "function" ? title.apply(void 0, _toConsumableArray(Object.keys(extraRow).map(function (pItem) {
34
- return extraRow[pItem];
35
- }))) : title;
36
- }
37
-
38
- if (confirmText) {
39
- return typeof confirmText === "function" ? confirmText.apply(void 0, _toConsumableArray(Object.keys(extraRow).map(function (pItem) {
40
- return extraRow[pItem];
41
- }))) : confirmText;
42
- }
43
-
44
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, null);
45
- };
46
-
47
- var _default = PopConfirmTitle;
48
- exports.default = _default;
@@ -1,30 +0,0 @@
1
- import React from "react";
2
- import './style/index.less';
3
- interface ButtonGroupRowParamsProps {
4
- text?: any;
5
- record?: object;
6
- rowIndex?: number;
7
- }
8
- export interface ButtonGroupOptionsProps {
9
- name?: string;
10
- code?: string;
11
- exName?: string;
12
- isHide?: boolean;
13
- disabled?: boolean;
14
- icon?: React.ReactNode | string | string[];
15
- fn?: any;
16
- children?: ButtonGroupOptionsProps[];
17
- render?: (() => React.ReactNode) | React.ReactNode;
18
- confirmText?: any;
19
- confirmConfig?: any;
20
- }
21
- interface ButtonGroupProps {
22
- type?: 'button' | 'text';
23
- rowParams?: ButtonGroupRowParamsProps;
24
- codes?: object[];
25
- permissionCodes?: string[];
26
- options?: ButtonGroupOptionsProps[];
27
- min?: number;
28
- }
29
- declare const ButtonGroup: (props: ButtonGroupProps) => JSX.Element;
30
- export default ButtonGroup;