@nokecy/qc-ui 0.0.2 → 0.0.3

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 (237) hide show
  1. package/dist/cjs/ag-grid-plus/ag-gridPlus.d.ts +1 -0
  2. package/dist/cjs/ag-grid-plus/ag-gridPlus.js +140 -38
  3. package/dist/cjs/ag-grid-plus/global.scss +18 -34
  4. package/dist/cjs/ag-grid-plus/queryForm/index.js +1 -3
  5. package/dist/cjs/ag-grid-plus/queryForm/queryForm.js +4 -2
  6. package/dist/cjs/ag-grid-plus/settingItem/index.d.ts +3 -0
  7. package/dist/cjs/ag-grid-plus/settingItem/index.js +27 -0
  8. package/dist/cjs/ag-grid-plus/toolBar/index.d.ts +20 -0
  9. package/dist/cjs/ag-grid-plus/toolBar/index.js +196 -0
  10. package/dist/cjs/ag-grid-plus/toolBar/style.d.ts +5 -0
  11. package/dist/cjs/ag-grid-plus/toolBar/style.js +142 -0
  12. package/dist/cjs/ag-grid-plus/utils.d.ts +8 -0
  13. package/dist/cjs/ag-grid-plus/utils.js +113 -0
  14. package/dist/cjs/array-table/index.d.ts +0 -2
  15. package/dist/cjs/array-table/index.js +0 -4
  16. package/dist/cjs/{elsaFlow/react-edge/edge1.less → elsa/components/finishNode.d.ts} +0 -0
  17. package/dist/cjs/elsa/components/finishNode.js +1 -0
  18. package/dist/cjs/{elsaFlow/react-edge/edge2.less → elsa/components/forkNode.d.ts} +0 -0
  19. package/dist/cjs/elsa/components/forkNode.js +1 -0
  20. package/dist/{esm/elsaFlow/react-edge/edge1.less → cjs/elsa/components/ifNode.d.ts} +0 -0
  21. package/dist/cjs/elsa/components/ifNode.js +1 -0
  22. package/dist/{esm/elsaFlow/react-edge/edge2.less → cjs/elsa/components/joinNode.d.ts} +0 -0
  23. package/dist/cjs/elsa/components/joinNode.js +1 -0
  24. package/dist/cjs/elsa/components/setNameNode.d.ts +0 -0
  25. package/dist/cjs/elsa/components/setNameNode.js +1 -0
  26. package/dist/cjs/elsa/components/startNode.d.ts +3 -0
  27. package/dist/cjs/elsa/components/startNode.js +24 -0
  28. package/dist/cjs/elsa/components/switchNode.d.ts +0 -0
  29. package/dist/cjs/elsa/components/switchNode.js +1 -0
  30. package/dist/cjs/elsa/components/timerNode.d.ts +0 -0
  31. package/dist/cjs/elsa/components/timerNode.js +1 -0
  32. package/dist/cjs/elsa/components/userTaskNode/index.d.ts +7 -0
  33. package/dist/cjs/elsa/components/userTaskNode/index.js +50 -0
  34. package/dist/cjs/elsa/components/userTaskNode/index.less +0 -0
  35. package/dist/cjs/elsa/components/userTaskNode/register.d.ts +1 -0
  36. package/dist/cjs/elsa/components/userTaskNode/register.js +54 -0
  37. package/dist/cjs/elsa/elsa.design.d.ts +4 -0
  38. package/dist/cjs/elsa/elsa.design.js +123 -0
  39. package/dist/cjs/elsa/index.d.ts +4 -0
  40. package/dist/cjs/elsa/index.js +40 -0
  41. package/dist/cjs/elsa/index.less +21 -0
  42. package/dist/cjs/extensible-grid/index.d.ts +4 -0
  43. package/dist/cjs/extensible-grid/index.js +39 -0
  44. package/dist/cjs/extensible-grid/interface.d.ts +10 -0
  45. package/dist/cjs/extensible-grid/interface.js +5 -0
  46. package/dist/cjs/index.d.ts +3 -1
  47. package/dist/cjs/index.js +16 -0
  48. package/dist/cjs/xflow/components/Wrapper.d.ts +3 -0
  49. package/dist/cjs/xflow/components/Wrapper.js +26 -0
  50. package/dist/cjs/xflow/components/XFlow.d.ts +3 -0
  51. package/dist/cjs/xflow/components/XFlow.js +47 -0
  52. package/dist/cjs/xflow/components/XFlowGraph.d.ts +4 -0
  53. package/dist/cjs/xflow/components/XFlowGraph.js +73 -0
  54. package/dist/cjs/xflow/components/graph-toolbar/index.d.ts +19 -0
  55. package/dist/cjs/xflow/components/graph-toolbar/index.js +60 -0
  56. package/dist/cjs/xflow/components/graph-toolbar/index.less +11 -0
  57. package/dist/cjs/xflow/components/index.d.ts +3 -0
  58. package/dist/cjs/xflow/components/index.js +31 -0
  59. package/dist/cjs/xflow/components/keyboard/index.d.ts +3 -0
  60. package/dist/cjs/xflow/components/keyboard/index.js +40 -0
  61. package/dist/cjs/xflow/components/minimap/index.d.ts +3 -0
  62. package/dist/cjs/xflow/components/minimap/index.js +53 -0
  63. package/dist/cjs/xflow/components/scroller/index.d.ts +4 -0
  64. package/dist/cjs/xflow/components/scroller/index.js +49 -0
  65. package/dist/cjs/xflow/components/selection/index.d.ts +3 -0
  66. package/dist/cjs/xflow/components/selection/index.js +40 -0
  67. package/dist/cjs/xflow/components/snapline/index.d.ts +3 -0
  68. package/dist/cjs/xflow/components/snapline/index.js +40 -0
  69. package/dist/cjs/xflow/components/transform/index.d.ts +3 -0
  70. package/dist/cjs/xflow/components/transform/index.js +38 -0
  71. package/dist/cjs/xflow/context/GraphContext.d.ts +10 -0
  72. package/dist/cjs/xflow/context/GraphContext.js +21 -0
  73. package/dist/cjs/xflow/hooks/clipboard/index.d.ts +2 -0
  74. package/dist/cjs/xflow/hooks/clipboard/index.js +34 -0
  75. package/dist/cjs/xflow/hooks/dnd/index.d.ts +2 -0
  76. package/dist/cjs/xflow/hooks/dnd/index.js +29 -0
  77. package/dist/cjs/xflow/hooks/format/index.d.ts +5 -0
  78. package/dist/cjs/xflow/hooks/format/index.js +60 -0
  79. package/dist/cjs/xflow/hooks/graph/index.d.ts +1 -0
  80. package/dist/cjs/xflow/hooks/graph/index.js +19 -0
  81. package/dist/cjs/xflow/hooks/history/index.d.ts +4 -0
  82. package/dist/cjs/xflow/hooks/history/index.js +63 -0
  83. package/dist/cjs/xflow/hooks/keyboard/index.d.ts +13 -0
  84. package/dist/cjs/xflow/hooks/keyboard/index.js +55 -0
  85. package/dist/cjs/xflow/hooks/selection/index.d.ts +3 -0
  86. package/dist/cjs/xflow/hooks/selection/index.js +41 -0
  87. package/dist/cjs/xflow/hooks/snapline/index.d.ts +2 -0
  88. package/dist/cjs/xflow/hooks/snapline/index.js +21 -0
  89. package/dist/cjs/xflow/hooks/transform/index.d.ts +2 -0
  90. package/dist/cjs/xflow/hooks/transform/index.js +21 -0
  91. package/dist/cjs/xflow/index.d.ts +3 -0
  92. package/dist/cjs/xflow/index.js +44 -0
  93. package/dist/cjs/xflow/styles/index.less +0 -0
  94. package/dist/cjs/xflow/types/index.d.ts +19 -0
  95. package/dist/cjs/xflow/types/index.js +5 -0
  96. package/dist/cjs/xflow/util/algorithm.d.ts +1 -0
  97. package/dist/cjs/xflow/util/algorithm.js +10 -0
  98. package/dist/cjs/xflow/util/index.d.ts +2 -0
  99. package/dist/cjs/xflow/util/index.js +16 -0
  100. package/dist/cjs/xflow/util/main.d.ts +2 -0
  101. package/dist/cjs/xflow/util/main.js +31 -0
  102. package/dist/cjs/xflow/util/model.d.ts +2 -0
  103. package/dist/cjs/xflow/util/model.js +29 -0
  104. package/dist/esm/ag-grid-plus/ag-gridPlus.d.ts +1 -0
  105. package/dist/esm/ag-grid-plus/ag-gridPlus.js +136 -39
  106. package/dist/esm/ag-grid-plus/global.scss +18 -34
  107. package/dist/esm/ag-grid-plus/queryForm/index.js +1 -3
  108. package/dist/esm/ag-grid-plus/queryForm/queryForm.js +4 -2
  109. package/dist/esm/ag-grid-plus/settingItem/index.d.ts +3 -0
  110. package/dist/esm/ag-grid-plus/settingItem/index.js +17 -0
  111. package/dist/esm/ag-grid-plus/toolBar/index.d.ts +20 -0
  112. package/dist/esm/ag-grid-plus/toolBar/index.js +176 -0
  113. package/dist/esm/ag-grid-plus/toolBar/style.d.ts +5 -0
  114. package/dist/esm/ag-grid-plus/toolBar/style.js +135 -0
  115. package/dist/esm/ag-grid-plus/utils.d.ts +8 -0
  116. package/dist/esm/ag-grid-plus/utils.js +94 -0
  117. package/dist/esm/array-table/index.d.ts +0 -2
  118. package/dist/esm/array-table/index.js +0 -2
  119. package/dist/esm/elsa/components/finishNode.d.ts +0 -0
  120. package/dist/esm/elsa/components/finishNode.js +0 -0
  121. package/dist/esm/elsa/components/forkNode.d.ts +0 -0
  122. package/dist/esm/elsa/components/forkNode.js +0 -0
  123. package/dist/esm/elsa/components/ifNode.d.ts +0 -0
  124. package/dist/esm/elsa/components/ifNode.js +0 -0
  125. package/dist/esm/elsa/components/joinNode.d.ts +0 -0
  126. package/dist/esm/elsa/components/joinNode.js +0 -0
  127. package/dist/esm/elsa/components/setNameNode.d.ts +0 -0
  128. package/dist/esm/elsa/components/setNameNode.js +0 -0
  129. package/dist/esm/elsa/components/startNode.d.ts +3 -0
  130. package/dist/esm/elsa/components/startNode.js +14 -0
  131. package/dist/esm/elsa/components/switchNode.d.ts +0 -0
  132. package/dist/esm/elsa/components/switchNode.js +0 -0
  133. package/dist/esm/elsa/components/timerNode.d.ts +0 -0
  134. package/dist/esm/elsa/components/timerNode.js +0 -0
  135. package/dist/esm/elsa/components/userTaskNode/index.d.ts +7 -0
  136. package/dist/esm/elsa/components/userTaskNode/index.js +33 -0
  137. package/dist/esm/elsa/components/userTaskNode/index.less +0 -0
  138. package/dist/esm/elsa/components/userTaskNode/register.d.ts +1 -0
  139. package/dist/esm/elsa/components/userTaskNode/register.js +48 -0
  140. package/dist/esm/elsa/elsa.design.d.ts +4 -0
  141. package/dist/esm/elsa/elsa.design.js +105 -0
  142. package/dist/esm/elsa/index.d.ts +4 -0
  143. package/dist/esm/elsa/index.js +25 -0
  144. package/dist/esm/elsa/index.less +21 -0
  145. package/dist/esm/extensible-grid/index.d.ts +4 -0
  146. package/dist/esm/extensible-grid/index.js +28 -0
  147. package/dist/esm/extensible-grid/interface.d.ts +10 -0
  148. package/dist/esm/extensible-grid/interface.js +1 -0
  149. package/dist/esm/index.d.ts +3 -1
  150. package/dist/esm/index.js +3 -2
  151. package/dist/esm/xflow/components/Wrapper.d.ts +3 -0
  152. package/dist/esm/xflow/components/Wrapper.js +15 -0
  153. package/dist/esm/xflow/components/XFlow.d.ts +3 -0
  154. package/dist/esm/xflow/components/XFlow.js +32 -0
  155. package/dist/esm/xflow/components/XFlowGraph.d.ts +4 -0
  156. package/dist/esm/xflow/components/XFlowGraph.js +54 -0
  157. package/dist/esm/xflow/components/graph-toolbar/index.d.ts +19 -0
  158. package/dist/esm/xflow/components/graph-toolbar/index.js +44 -0
  159. package/dist/esm/xflow/components/graph-toolbar/index.less +11 -0
  160. package/dist/esm/xflow/components/index.d.ts +3 -0
  161. package/dist/esm/xflow/components/index.js +3 -0
  162. package/dist/esm/xflow/components/keyboard/index.d.ts +3 -0
  163. package/dist/esm/xflow/components/keyboard/index.js +22 -0
  164. package/dist/esm/xflow/components/minimap/index.d.ts +3 -0
  165. package/dist/esm/xflow/components/minimap/index.js +35 -0
  166. package/dist/esm/xflow/components/scroller/index.d.ts +4 -0
  167. package/dist/esm/xflow/components/scroller/index.js +28 -0
  168. package/dist/esm/xflow/components/selection/index.d.ts +3 -0
  169. package/dist/esm/xflow/components/selection/index.js +22 -0
  170. package/dist/esm/xflow/components/snapline/index.d.ts +3 -0
  171. package/dist/esm/xflow/components/snapline/index.js +22 -0
  172. package/dist/esm/xflow/components/transform/index.d.ts +3 -0
  173. package/dist/esm/xflow/components/transform/index.js +20 -0
  174. package/dist/esm/xflow/context/GraphContext.d.ts +10 -0
  175. package/dist/esm/xflow/context/GraphContext.js +9 -0
  176. package/dist/esm/xflow/hooks/clipboard/index.d.ts +2 -0
  177. package/dist/esm/xflow/hooks/clipboard/index.js +22 -0
  178. package/dist/esm/xflow/hooks/dnd/index.d.ts +2 -0
  179. package/dist/esm/xflow/hooks/dnd/index.js +17 -0
  180. package/dist/esm/xflow/hooks/format/index.d.ts +5 -0
  181. package/dist/esm/xflow/hooks/format/index.js +48 -0
  182. package/dist/esm/xflow/hooks/graph/index.d.ts +1 -0
  183. package/dist/esm/xflow/hooks/graph/index.js +8 -0
  184. package/dist/esm/xflow/hooks/history/index.d.ts +4 -0
  185. package/dist/esm/xflow/hooks/history/index.js +45 -0
  186. package/dist/esm/xflow/hooks/keyboard/index.d.ts +13 -0
  187. package/dist/esm/xflow/hooks/keyboard/index.js +40 -0
  188. package/dist/esm/xflow/hooks/selection/index.d.ts +3 -0
  189. package/dist/esm/xflow/hooks/selection/index.js +25 -0
  190. package/dist/esm/xflow/hooks/snapline/index.d.ts +2 -0
  191. package/dist/esm/xflow/hooks/snapline/index.js +9 -0
  192. package/dist/esm/xflow/hooks/transform/index.d.ts +2 -0
  193. package/dist/esm/xflow/hooks/transform/index.js +9 -0
  194. package/dist/esm/xflow/index.d.ts +3 -0
  195. package/dist/esm/xflow/index.js +3 -0
  196. package/dist/esm/xflow/styles/index.less +0 -0
  197. package/dist/esm/xflow/types/index.d.ts +19 -0
  198. package/dist/esm/xflow/types/index.js +1 -0
  199. package/dist/esm/xflow/util/algorithm.d.ts +1 -0
  200. package/dist/esm/xflow/util/algorithm.js +1 -0
  201. package/dist/esm/xflow/util/index.d.ts +2 -0
  202. package/dist/esm/xflow/util/index.js +2 -0
  203. package/dist/esm/xflow/util/main.d.ts +2 -0
  204. package/dist/esm/xflow/util/main.js +2 -0
  205. package/dist/esm/xflow/util/model.d.ts +2 -0
  206. package/dist/esm/xflow/util/model.js +19 -0
  207. package/dist/umd/qc-ui.min.css +1 -1
  208. package/dist/umd/qc-ui.min.js +1 -1
  209. package/package.json +18 -6
  210. package/dist/cjs/elsaFlow/config-graph.d.ts +0 -1
  211. package/dist/cjs/elsaFlow/config-graph.js +0 -57
  212. package/dist/cjs/elsaFlow/index.d.ts +0 -6
  213. package/dist/cjs/elsaFlow/index.js +0 -199
  214. package/dist/cjs/elsaFlow/react-edge/edge1.d.ts +0 -4
  215. package/dist/cjs/elsaFlow/react-edge/edge1.js +0 -31
  216. package/dist/cjs/elsaFlow/react-edge/edge2.d.ts +0 -4
  217. package/dist/cjs/elsaFlow/react-edge/edge2.js +0 -31
  218. package/dist/cjs/elsaFlow/react-node/node1.d.ts +0 -4
  219. package/dist/cjs/elsaFlow/react-node/node1.js +0 -28
  220. package/dist/cjs/elsaFlow/react-node/node1.less +0 -11
  221. package/dist/cjs/elsaFlow/react-node/node2.d.ts +0 -4
  222. package/dist/cjs/elsaFlow/react-node/node2.js +0 -28
  223. package/dist/cjs/elsaFlow/react-node/node2.less +0 -11
  224. package/dist/esm/elsaFlow/config-graph.d.ts +0 -1
  225. package/dist/esm/elsaFlow/config-graph.js +0 -42
  226. package/dist/esm/elsaFlow/index.d.ts +0 -6
  227. package/dist/esm/elsaFlow/index.js +0 -189
  228. package/dist/esm/elsaFlow/react-edge/edge1.d.ts +0 -4
  229. package/dist/esm/elsaFlow/react-edge/edge1.js +0 -18
  230. package/dist/esm/elsaFlow/react-edge/edge2.d.ts +0 -4
  231. package/dist/esm/elsaFlow/react-edge/edge2.js +0 -18
  232. package/dist/esm/elsaFlow/react-node/node1.d.ts +0 -4
  233. package/dist/esm/elsaFlow/react-node/node1.js +0 -16
  234. package/dist/esm/elsaFlow/react-node/node1.less +0 -11
  235. package/dist/esm/elsaFlow/react-node/node2.d.ts +0 -4
  236. package/dist/esm/elsaFlow/react-node/node2.js +0 -16
  237. package/dist/esm/elsaFlow/react-node/node2.less +0 -11
@@ -0,0 +1,135 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
7
+ import { useStyle as useAntdStyle } from '@ant-design/pro-provider';
8
+
9
+ var genProListStyle = function genProListStyle(token) {
10
+ var _token$componentCls;
11
+
12
+ return _defineProperty({}, token.componentCls, (_token$componentCls = {
13
+ lineHeight: '1',
14
+ '&-container': {
15
+ display: 'flex',
16
+ justifyContent: 'space-between',
17
+ paddingBlock: 8,
18
+ //token.padding,
19
+ paddingInline: 0,
20
+ '&-mobile': {
21
+ flexDirection: 'column'
22
+ }
23
+ },
24
+ '&-title': {
25
+ display: 'flex',
26
+ alignItems: 'center',
27
+ justifyContent: 'flex-start',
28
+ color: token.colorTextHeading,
29
+ fontWeight: '500',
30
+ fontSize: token.fontSizeLG
31
+ },
32
+ '&-search:not(:last-child)': {
33
+ display: 'flex',
34
+ alignItems: 'center',
35
+ justifyContent: 'flex-start'
36
+ },
37
+ '&-setting-item': {
38
+ marginBlock: 0,
39
+ marginInline: 4,
40
+ color: token.colorIconHover,
41
+ fontSize: token.fontSizeLG,
42
+ cursor: 'pointer',
43
+ '> span': {
44
+ display: 'block',
45
+ width: '100%',
46
+ height: '100%'
47
+ },
48
+ '&:hover': {
49
+ color: token.colorPrimary
50
+ }
51
+ },
52
+ '&-left': _defineProperty({
53
+ display: 'flex',
54
+ flexWrap: 'wrap',
55
+ alignItems: 'center',
56
+ gap: 8,
57
+ justifyContent: 'flex-start',
58
+ maxWidth: 'calc(100% - 200px)'
59
+ }, "".concat(token.antCls, "-tabs"), {
60
+ width: '100%'
61
+ }),
62
+ '&-right': {
63
+ display: 'flex',
64
+ flexWrap: 'wrap',
65
+ justifyContent: 'flex-end',
66
+ gap: 8
67
+ },
68
+ '&-extra-line': {
69
+ marginBlockEnd: token.margin
70
+ },
71
+ '&-setting-items': {
72
+ display: 'flex',
73
+ gap: 8,
74
+ lineHeight: '32px',
75
+ alignItems: 'center'
76
+ },
77
+ '&-filter': _defineProperty({
78
+ '&:not(:last-child)': {
79
+ marginInlineEnd: token.margin
80
+ },
81
+ display: 'flex',
82
+ alignItems: 'center'
83
+ }, "div.$".concat(token.antCls, "-pro-table-search"), {
84
+ marginBlock: 0,
85
+ marginInline: 0,
86
+ paddingBlock: 0,
87
+ paddingInline: 0
88
+ }),
89
+ '&-inline-menu-item': {
90
+ display: 'inline-block',
91
+ marginInlineEnd: token.marginLG,
92
+ cursor: 'pointer',
93
+ opacity: '0.75',
94
+ '&-active': {
95
+ fontWeight: 'bold',
96
+ opacity: '1'
97
+ }
98
+ }
99
+ }, _defineProperty(_token$componentCls, "".concat(token.antCls, "-tabs-top > ").concat(token.antCls, "-tabs-nav"), _defineProperty({
100
+ marginBlockEnd: 0,
101
+ '&::before': {
102
+ borderBlockEnd: 0
103
+ }
104
+ }, "".concat(token.antCls, "-tabs-nav-list"), {
105
+ marginBlockStart: 0,
106
+ '${token.antCls}-tabs-tab': {
107
+ paddingBlockStart: 0
108
+ }
109
+ })), _defineProperty(_token$componentCls, '&-dropdownmenu-label', {
110
+ fontWeight: 'bold',
111
+ fontSize: token.fontSizeIcon,
112
+ textAlign: 'center',
113
+ cursor: 'pointer'
114
+ }), _defineProperty(_token$componentCls, '@media (max-width: 768px)', _defineProperty({}, token.componentCls, {
115
+ '&-container': {
116
+ display: 'flex',
117
+ flexWrap: 'wrap',
118
+ flexDirection: 'column'
119
+ },
120
+ '&-left': {
121
+ marginBlockEnd: '16px',
122
+ maxWidth: '100%'
123
+ }
124
+ })), _token$componentCls));
125
+ };
126
+
127
+ export function useStyle(prefixCls) {
128
+ return useAntdStyle('ProTableListToolBar', function (token) {
129
+ var proListToken = _objectSpread(_objectSpread({}, token), {}, {
130
+ componentCls: ".".concat(prefixCls)
131
+ });
132
+
133
+ return [genProListStyle(proListToken)];
134
+ });
135
+ }
@@ -0,0 +1,8 @@
1
+ import { ValueFormatterParams } from 'ag-grid-community';
2
+ declare const convertFilterModel: (filterModel: any) => string;
3
+ declare const convertSortModel: (sortModel: any[]) => string;
4
+ declare const dateValueFormatter: (params: ValueFormatterParams) => string;
5
+ declare const dateTimeValueFormatter: (params: ValueFormatterParams) => string;
6
+ declare const flatten: (arr: any[], parentref?: any[]) => any;
7
+ declare const toTree: (data: any[]) => any[];
8
+ export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, toTree, flatten };
@@ -0,0 +1,94 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+
3
+ 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."); }
4
+
5
+ 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); }
6
+
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+
9
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
+
11
+ 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; }
12
+
13
+ import dayjs from 'dayjs';
14
+
15
+ var getFilter = function getFilter(objectKey, value) {
16
+ var type = "=*";
17
+
18
+ if (typeof value === 'number') {
19
+ type = "=";
20
+ }
21
+
22
+ if (value instanceof Array) {
23
+ return "".concat(objectKey, " >= ").concat(dayjs(value[0]).format("YYYY-MM-DD"), " ,") + "".concat(objectKey, " <= ").concat(dayjs(value[1]).add(1, 'days').format("YYYY-MM-DD"));
24
+ }
25
+
26
+ return "".concat(objectKey).concat(type).concat(value);
27
+ };
28
+
29
+ var convertFilterModel = function convertFilterModel(filterModel) {
30
+ var items = [];
31
+ Object.keys(filterModel).map(function (key) {
32
+ var value = filterModel[key];
33
+
34
+ if (value) {
35
+ items.push(getFilter(key, value));
36
+ }
37
+ });
38
+ return items.join(",");
39
+ };
40
+
41
+ var convertSortModel = function convertSortModel(sortModel) {
42
+ var sorter = sortModel.map(function (sort) {
43
+ var key = sort.colId;
44
+ var value = sort.sort;
45
+ return "".concat(key.replace(',', '.'), " ").concat(value == 'desc' ? 'desc' : 'asc');
46
+ }).join(' , ');
47
+ return sorter;
48
+ };
49
+
50
+ var dateValueFormatter = function dateValueFormatter(params) {
51
+ return params.value ? dayjs(params.value).format("YYYY-MM-DD") : "";
52
+ };
53
+
54
+ var dateTimeValueFormatter = function dateTimeValueFormatter(params) {
55
+ return params.value ? dayjs(params.value).format("YYYY-MM-DD HH:mm:ss") : "";
56
+ }; //@ts-ignore
57
+
58
+
59
+ var flatten = function flatten(arr, parentref) {
60
+ return arr ? arr.reduce(function (result, item) {
61
+ return [].concat(_toConsumableArray(result), [{
62
+ name: item.name,
63
+ id: item.id,
64
+ hierarchy: parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name]
65
+ }], _toConsumableArray(flatten(item.children, parentref ? [].concat(_toConsumableArray(parentref), [item.name]) : [item.name])));
66
+ }, []) : [];
67
+ };
68
+
69
+ var toTree = function toTree(data) {
70
+ // 删除 所有 children,以防止多次调用
71
+ data.forEach(function (item) {
72
+ delete item.children;
73
+ }); // 将数据存储为 以 id 为 KEY 的 map 索引数据列
74
+
75
+ var map = {};
76
+ data.forEach(function (item) {
77
+ map[item.id] = item;
78
+ });
79
+ var val = [];
80
+ data.forEach(function (item) {
81
+ // 以当前遍历项,的pid,去map对象中找到索引的id
82
+ var parent = map[item.parentId]; // 好绕啊,如果找到索引,那么说明此项不在顶级当中,那么需要把此项添加到,他对应的父级中
83
+
84
+ if (parent) {
85
+ (parent.children || (parent.children = [])).push(item);
86
+ } else {
87
+ //如果没有在map中找到对应的索引ID,那么直接把 当前的item添加到 val结果集中,作为顶级
88
+ val.push(item);
89
+ }
90
+ });
91
+ return val;
92
+ };
93
+
94
+ export { dateValueFormatter, dateTimeValueFormatter, convertFilterModel, convertSortModel, toTree, flatten };
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
2
  import { AgGridReactProps, AgGridColumnProps } from 'ag-grid-react';
3
3
  import { ArrayBaseMixins } from '@formily/antd';
4
- import '@ag-grid-community/core/dist/styles/ag-grid.css';
5
- import '@ag-grid-community/core/dist/styles/ag-theme-alpine.css';
6
4
  declare type ComposedArrayTable = React.FC<React.PropsWithChildren<AgGridReactProps>> & ArrayBaseMixins & {
7
5
  Column?: React.FC<React.PropsWithChildren<AgGridColumnProps>>;
8
6
  };
@@ -12,8 +12,6 @@ import { useField, observer, useFieldSchema, RecursionField } from '@formily/rea
12
12
  import { isArr } from '@formily/shared';
13
13
  import { ArrayBase } from '@formily/antd';
14
14
  import uniqueId from 'lodash/uniqueId';
15
- import '@ag-grid-community/core/dist/styles/ag-grid.css';
16
- import '@ag-grid-community/core/dist/styles/ag-theme-alpine.css';
17
15
 
18
16
  var isColumnComponent = function isColumnComponent(schema) {
19
17
  var _schema$xComponent;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const StartNode: (props: any) => JSX.Element;
3
+ export default StartNode;
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+
3
+ var StartNode = function StartNode(props) {
4
+ var node = props.node;
5
+ var data = node.getData();
6
+ return /*#__PURE__*/React.createElement("div", {
7
+ className: "algo-node"
8
+ }, /*#__PURE__*/React.createElement("img", {
9
+ src: data.url,
10
+ alt: ""
11
+ }), /*#__PURE__*/React.createElement("span", null, data.name));
12
+ };
13
+
14
+ export default StartNode;
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { Graph, Node } from '@antv/x6';
3
+ declare const UserTaskNode: (props: {
4
+ node: Node;
5
+ graph: Graph;
6
+ }) => JSX.Element;
7
+ export default UserTaskNode;
@@ -0,0 +1,33 @@
1
+ import classnames from 'classnames';
2
+ import React, { useEffect } from 'react';
3
+
4
+ var UserTaskNode = function UserTaskNode(props) {
5
+ var node = props.node,
6
+ graph = props.graph;
7
+ var data = node.getData();
8
+ useEffect(function () {// if (!node.getPort("port1")) {
9
+ // node.addPort({ id: "port1", group: "in" })
10
+ // }
11
+ // if (!node.getPort("port2")) {
12
+ // node.addPort({ id: "port2", group: "out" })
13
+ // }
14
+ // graph.addEdge({ source: node, target: { x: 100, y: 120 }, });
15
+ }, [node]);
16
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
17
+ className: "userTask success",
18
+ style: {
19
+ height: "100%",
20
+ border: "2px solid #5F95FF",
21
+ borderRadius: 10,
22
+ backgroundColor: "#EFF4FF"
23
+ }
24
+ }, /*#__PURE__*/React.createElement("span", null, data === null || data === void 0 ? void 0 : data.name)), /*#__PURE__*/React.createElement("div", {
25
+ className: "plus-dag"
26
+ }, /*#__PURE__*/React.createElement("i", {
27
+ className: classnames('plus-action', {
28
+ /*'plus-action-selected': plusActionSelected*/
29
+ })
30
+ })));
31
+ };
32
+
33
+ export default UserTaskNode;
@@ -0,0 +1,48 @@
1
+ import { register } from '@antv/x6-react-shape';
2
+ import UserTaskNode from '.';
3
+ register({
4
+ shape: "UserTaskNode",
5
+ effect: ['data'],
6
+ component: UserTaskNode // attrs: {
7
+ // body: {
8
+ // magnet: true,
9
+ // strokeWidth: 0,
10
+ // fill: '#ccc',
11
+ // }
12
+ // },
13
+ // ports: {
14
+ // groups: {
15
+ // in: {
16
+ // position: 'top',
17
+ // label: {
18
+ // position: 'top',
19
+ // },
20
+ // attrs: {
21
+ // circle: {
22
+ // r: 6,
23
+ // magnet: true,
24
+ // stroke: '#31d0c6',
25
+ // strokeWidth: 2,
26
+ // fill: '#fff',
27
+ // },
28
+ // },
29
+ // },
30
+ // out: {
31
+ // position: 'bottom',
32
+ // label: {
33
+ // position: 'bottom',
34
+ // },
35
+ // attrs: {
36
+ // circle: {
37
+ // r: 6,
38
+ // magnet: true,
39
+ // stroke: '#31d0c6',
40
+ // strokeWidth: 2,
41
+ // fill: '#fff',
42
+ // },
43
+ // },
44
+ // },
45
+ // },
46
+ // },
47
+
48
+ });
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import './components/userTaskNode/register';
3
+ declare const ElsaDesign: (props: any) => JSX.Element;
4
+ export default ElsaDesign;
@@ -0,0 +1,105 @@
1
+ import React, { useEffect } from 'react';
2
+ import { useGraph } from "../xflow/hooks/graph";
3
+ import { XFlowGraph } from "../xflow";
4
+ import "./components/userTaskNode/register";
5
+ var defaultNodeOptions = {
6
+ width: 100,
7
+ height: 60
8
+ };
9
+ var defaultEdgeOptions = {
10
+ attrs: {
11
+ line: {
12
+ strokeDasharray: '5 5'
13
+ }
14
+ }
15
+ };
16
+ var graphConfig = {
17
+ background: {
18
+ color: "#F2F7FA"
19
+ },
20
+ connecting: {
21
+ //连线的过程中距离节点或者连接桩 50px 时会触发自动吸附
22
+ snap: true,
23
+ //是否允许连接到画布空白位置的点
24
+ allowBlank: true,
25
+ //是否允许在相同的起始节点和终止之间创建多条边
26
+ allowMulti: false,
27
+ //是否允许创建循环连线
28
+ allowLoop: false,
29
+ //是否允许边链接到节点(非节点上的链接桩)
30
+ allowNode: true,
31
+ //拖动边时,是否高亮显示所有可用的连接桩或节点
32
+ highlight: true
33
+ },
34
+ interacting: {
35
+ arrowheadMovable: true
36
+ }
37
+ };
38
+
39
+ var ElsaDesign = function ElsaDesign(props) {
40
+ var graph = useGraph();
41
+ useEffect(function () {
42
+ graph === null || graph === void 0 ? void 0 : graph.on("node:mouseenter", function (args) {});
43
+ graph === null || graph === void 0 ? void 0 : graph.on("node:mouseleave", function (args) {});
44
+ graph === null || graph === void 0 ? void 0 : graph.on("edge:mouseenter", function (_ref) {
45
+ var cell = _ref.cell;
46
+ cell.addTools(['source-arrowhead', {
47
+ name: 'target-arrowhead',
48
+ args: {
49
+ attrs: {
50
+ fill: 'red'
51
+ }
52
+ }
53
+ }]);
54
+ });
55
+ graph === null || graph === void 0 ? void 0 : graph.on('edge:mouseleave', function (_ref2) {
56
+ var cell = _ref2.cell;
57
+ cell.removeTools();
58
+ });
59
+ graph === null || graph === void 0 ? void 0 : graph.on("edge:connected", function (_ref3) {
60
+ var isNew = _ref3.isNew,
61
+ edge = _ref3.edge;
62
+
63
+ if (isNew) {
64
+ edge.setSource(edge.getSourceNode(), {
65
+ selector: undefined
66
+ }, undefined);
67
+ }
68
+ });
69
+ graph === null || graph === void 0 ? void 0 : graph.bindKey('backspace', function () {
70
+ var cells = graph.getSelectedCells();
71
+
72
+ if (cells.length) {
73
+ graph.removeCells(cells);
74
+ }
75
+ });
76
+ }, [graph]);
77
+ return /*#__PURE__*/React.createElement(XFlowGraph, {
78
+ zoomToFit: true,
79
+ data: [{
80
+ id: '1',
81
+ shape: 'UserTaskNode',
82
+ x: 100,
83
+ y: 100,
84
+ label: 'source'
85
+ }, {
86
+ id: '2',
87
+ shape: 'UserTaskNode',
88
+ x: 300,
89
+ y: 300,
90
+ label: 'target'
91
+ }, {
92
+ id: '3',
93
+ shape: 'UserTaskNode',
94
+ x: 400,
95
+ y: 400,
96
+ label: 'target'
97
+ }],
98
+ defaultNodeOptions: defaultNodeOptions,
99
+ defaultEdgeOptions: defaultEdgeOptions,
100
+ configs: graphConfig,
101
+ centerContent: true
102
+ });
103
+ };
104
+
105
+ export default ElsaDesign;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const Elsa: (props: any) => JSX.Element;
4
+ export default Elsa;
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { Selection } from "../xflow/components/selection";
3
+ import { Keyboard } from "../xflow/components/keyboard";
4
+ import { XFlow } from "../xflow";
5
+ import ElsaDesign from "./elsa.design";
6
+ import "./index.less";
7
+
8
+ var Elsa = function Elsa(props) {
9
+ return /*#__PURE__*/React.createElement("div", {
10
+ style: {
11
+ height: 400
12
+ }
13
+ }, /*#__PURE__*/React.createElement(XFlow, null, /*#__PURE__*/React.createElement(Selection, {
14
+ enabled: true,
15
+ multiple: true,
16
+ rubberEdge: true,
17
+ rubberNode: true,
18
+ modifiers: "shift",
19
+ rubberband: true
20
+ }), /*#__PURE__*/React.createElement(Keyboard, {
21
+ enabled: true
22
+ }), /*#__PURE__*/React.createElement(ElsaDesign, null)));
23
+ };
24
+
25
+ export default Elsa;
@@ -0,0 +1,21 @@
1
+ .x6-node-selected .userTask {
2
+ border-color: #52c41a;
3
+ border-radius: 2px;
4
+ box-shadow: 0 0 0 4px #ccecc0;
5
+ }
6
+
7
+ .x6-node-selected .userTask .failed {
8
+ border-color: #ff4d4f;
9
+ border-radius: 2px;
10
+ box-shadow: 0 0 0 4px #fedcdc;
11
+ }
12
+
13
+ .x6-edge:hover path:nth-child(2) {
14
+ stroke: #1890ff;
15
+ stroke-width: 1px;
16
+ }
17
+
18
+ .x6-edge-selected path:nth-child(2) {
19
+ stroke: #1890ff;
20
+ stroke-width: 3px !important;
21
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { ExtensibleGridProps } from './interface';
3
+ declare function ExtensibleGrid(props: ExtensibleGridProps): JSX.Element;
4
+ export default ExtensibleGrid;
@@ -0,0 +1,28 @@
1
+ var _excluded = ["children", "extensibleColumns"];
2
+
3
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+
5
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
+
7
+ import React from 'react';
8
+ import { AgGridColumn, AgGridPlus } from "../ag-grid-plus";
9
+
10
+ function ExtensibleGrid(props) {
11
+ var children = props.children,
12
+ _props$extensibleColu = props.extensibleColumns,
13
+ extensibleColumns = _props$extensibleColu === void 0 ? [] : _props$extensibleColu,
14
+ rest = _objectWithoutProperties(props, _excluded);
15
+
16
+ return /*#__PURE__*/React.createElement(AgGridPlus, rest, React.Children.map(children, function (child, index) {
17
+ return child;
18
+ }), extensibleColumns.map(function (column) {
19
+ return /*#__PURE__*/React.createElement(AgGridColumn, {
20
+ field: column.field,
21
+ headerName: column.headerName,
22
+ type: column.type,
23
+ flex: 1
24
+ });
25
+ }));
26
+ }
27
+
28
+ export default ExtensibleGrid;
@@ -0,0 +1,10 @@
1
+ import { GridProps } from '../ag-grid-plus/interface';
2
+ interface ExtensibleColumnProps {
3
+ field: string;
4
+ type?: string;
5
+ headerName: string;
6
+ }
7
+ interface ExtensibleGridProps extends GridProps {
8
+ extensibleColumns: ExtensibleColumnProps[];
9
+ }
10
+ export { ExtensibleGridProps };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,4 +1,6 @@
1
1
  import ArrayTable from "./array-table";
2
2
  import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
+ import ExtensibleGrid from "./extensible-grid";
3
4
  import Dashboard from "./dashboard";
4
- export { ArrayTable, AgGridColumn, AgGridPlus, Dashboard };
5
+ import Elsa from "./elsa";
6
+ export { ArrayTable, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
package/dist/esm/index.js CHANGED
@@ -1,5 +1,6 @@
1
- // import ElsaFlow from "./elsaFlow"
2
1
  import ArrayTable from "./array-table";
3
2
  import { AgGridColumn, AgGridPlus } from "./ag-grid-plus";
3
+ import ExtensibleGrid from "./extensible-grid";
4
4
  import Dashboard from "./dashboard";
5
- export { ArrayTable, AgGridColumn, AgGridPlus, Dashboard };
5
+ import Elsa from "./elsa";
6
+ export { ArrayTable, AgGridColumn, AgGridPlus, ExtensibleGrid, Dashboard, Elsa };
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from 'react';
2
+ declare const Wrapper: FC<PropsWithChildren>;
3
+ export default Wrapper;