aldehyde 0.0.10 → 0.0.11

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 (390) hide show
  1. package/lib/components/chart/antd/chart-utils.d.ts +7 -0
  2. package/lib/components/chart/antd/chart-utils.d.ts.map +1 -0
  3. package/lib/components/chart/antd/chart-utils.js +46 -0
  4. package/lib/components/chart/antd/chart-utils.js.map +1 -0
  5. package/lib/components/chart/antd/column-chart-sub.d.ts +7 -0
  6. package/lib/components/chart/antd/column-chart-sub.d.ts.map +1 -0
  7. package/lib/components/chart/antd/column-chart-sub.js +50 -0
  8. package/lib/components/chart/antd/column-chart-sub.js.map +1 -0
  9. package/lib/components/chart/antd/line-chart-sub.d.ts +7 -0
  10. package/lib/components/chart/antd/line-chart-sub.d.ts.map +1 -0
  11. package/lib/components/chart/antd/line-chart-sub.js +49 -0
  12. package/lib/components/chart/antd/line-chart-sub.js.map +1 -0
  13. package/lib/components/chart/antd/pie-chart-sub.d.ts +7 -0
  14. package/lib/components/chart/antd/pie-chart-sub.d.ts.map +1 -0
  15. package/lib/components/chart/antd/pie-chart-sub.js +37 -0
  16. package/lib/components/chart/antd/pie-chart-sub.js.map +1 -0
  17. package/lib/components/chart/antd/statview-d2-chart.d.ts +17 -0
  18. package/lib/components/chart/antd/statview-d2-chart.d.ts.map +1 -0
  19. package/lib/components/chart/antd/statview-d2-chart.js +108 -0
  20. package/lib/components/chart/antd/statview-d2-chart.js.map +1 -0
  21. package/lib/components/chart/statview-l2-chart.d.ts +23 -0
  22. package/lib/components/chart/statview-l2-chart.d.ts.map +1 -0
  23. package/lib/components/chart/statview-l2-chart.js +64 -0
  24. package/lib/components/chart/statview-l2-chart.js.map +1 -0
  25. package/lib/components/controls/action/index.css +9 -0
  26. package/lib/components/controls/action/index.d.ts +47 -0
  27. package/lib/components/controls/action/index.d.ts.map +1 -0
  28. package/lib/components/controls/action/index.js +165 -0
  29. package/lib/components/controls/action/index.js.map +1 -0
  30. package/lib/components/controls/action/utils.d.ts +9 -0
  31. package/lib/components/controls/action/utils.d.ts.map +1 -0
  32. package/lib/components/controls/action/utils.js +110 -0
  33. package/lib/components/controls/action/utils.js.map +1 -0
  34. package/lib/components/controls/auto-complete/index.d.ts +7 -0
  35. package/lib/components/controls/auto-complete/index.d.ts.map +1 -0
  36. package/lib/components/controls/auto-complete/index.js +53 -0
  37. package/lib/components/controls/auto-complete/index.js.map +1 -0
  38. package/lib/components/controls/chemstruc/graph.d.ts +31 -0
  39. package/lib/components/controls/chemstruc/graph.d.ts.map +1 -0
  40. package/lib/components/controls/chemstruc/graph.js +121 -0
  41. package/lib/components/controls/chemstruc/graph.js.map +1 -0
  42. package/lib/components/controls/chemstruc/index.css +28 -0
  43. package/lib/components/controls/collapse-card/index.css +9 -0
  44. package/lib/components/controls/collapse-card/index.d.ts +20 -0
  45. package/lib/components/controls/collapse-card/index.d.ts.map +1 -0
  46. package/lib/components/controls/collapse-card/index.js +63 -0
  47. package/lib/components/controls/collapse-card/index.js.map +1 -0
  48. package/lib/components/controls/color-picker/index.css +27 -0
  49. package/lib/components/controls/color-picker/index.d.ts +19 -0
  50. package/lib/components/controls/color-picker/index.d.ts.map +1 -0
  51. package/lib/components/controls/color-picker/index.js +61 -0
  52. package/lib/components/controls/color-picker/index.js.map +1 -0
  53. package/lib/components/controls/cquery/cquick-button.d.ts +20 -0
  54. package/lib/components/controls/cquery/cquick-button.d.ts.map +1 -0
  55. package/lib/components/controls/cquery/cquick-button.js +67 -0
  56. package/lib/components/controls/cquery/cquick-button.js.map +1 -0
  57. package/lib/components/controls/date-picker/index.d.ts +7 -0
  58. package/lib/components/controls/date-picker/index.d.ts.map +1 -0
  59. package/lib/components/controls/date-picker/index.js +91 -0
  60. package/lib/components/controls/date-picker/index.js.map +1 -0
  61. package/lib/components/controls/entity-select/entity-select.d.ts +53 -0
  62. package/lib/components/controls/entity-select/entity-select.d.ts.map +1 -0
  63. package/lib/components/controls/entity-select/entity-select.js +227 -0
  64. package/lib/components/controls/entity-select/entity-select.js.map +1 -0
  65. package/lib/components/controls/entity-select/index.css +6 -0
  66. package/lib/components/controls/entity-select/popover-entity-select.d.ts +20 -0
  67. package/lib/components/controls/entity-select/popover-entity-select.d.ts.map +1 -0
  68. package/lib/components/controls/entity-select/popover-entity-select.js +80 -0
  69. package/lib/components/controls/entity-select/popover-entity-select.js.map +1 -0
  70. package/lib/components/controls/entry-control.d.ts +11 -0
  71. package/lib/components/controls/entry-control.d.ts.map +1 -0
  72. package/lib/components/controls/entry-control.js +171 -0
  73. package/lib/components/controls/entry-control.js.map +1 -0
  74. package/lib/components/controls/enum-badge/index.d.ts +7 -0
  75. package/lib/components/controls/enum-badge/index.d.ts.map +1 -0
  76. package/lib/components/controls/enum-badge/index.js +14 -0
  77. package/lib/components/controls/enum-badge/index.js.map +1 -0
  78. package/lib/components/controls/enum-tag/index.d.ts +7 -0
  79. package/lib/components/controls/enum-tag/index.d.ts.map +1 -0
  80. package/lib/components/controls/enum-tag/index.js +18 -0
  81. package/lib/components/controls/enum-tag/index.js.map +1 -0
  82. package/lib/components/controls/file-view/drawer-file-view.d.ts +18 -0
  83. package/lib/components/controls/file-view/drawer-file-view.d.ts.map +1 -0
  84. package/lib/components/controls/file-view/drawer-file-view.js +51 -0
  85. package/lib/components/controls/file-view/drawer-file-view.js.map +1 -0
  86. package/lib/components/controls/file-view/index.d.ts +23 -0
  87. package/lib/components/controls/file-view/index.d.ts.map +1 -0
  88. package/lib/components/controls/file-view/index.js +130 -0
  89. package/lib/components/controls/file-view/index.js.map +1 -0
  90. package/lib/components/controls/html-editor/draft.d.ts +22 -0
  91. package/lib/components/controls/html-editor/draft.d.ts.map +1 -0
  92. package/lib/components/controls/html-editor/draft.js +122 -0
  93. package/lib/components/controls/html-editor/draft.js.map +1 -0
  94. package/lib/components/controls/input-number/index.d.ts +7 -0
  95. package/lib/components/controls/input-number/index.d.ts.map +1 -0
  96. package/lib/components/controls/input-number/index.js +67 -0
  97. package/lib/components/controls/input-number/index.js.map +1 -0
  98. package/lib/components/controls/input-range/index.d.ts +7 -0
  99. package/lib/components/controls/input-range/index.d.ts.map +1 -0
  100. package/lib/components/controls/input-range/index.js +28 -0
  101. package/lib/components/controls/input-range/index.js.map +1 -0
  102. package/lib/components/controls/password-setter/index.css +3 -0
  103. package/lib/components/controls/progress/index.d.ts +7 -0
  104. package/lib/components/controls/progress/index.d.ts.map +1 -0
  105. package/lib/components/controls/progress/index.js +45 -0
  106. package/lib/components/controls/progress/index.js.map +1 -0
  107. package/lib/components/controls/relation-existion/index.css +4 -0
  108. package/lib/components/controls/relation-existion/index.d.ts +20 -0
  109. package/lib/components/controls/relation-existion/index.d.ts.map +1 -0
  110. package/lib/components/controls/relation-existion/index.js +75 -0
  111. package/lib/components/controls/relation-existion/index.js.map +1 -0
  112. package/lib/components/controls/rfield/index.css +4 -0
  113. package/lib/components/controls/rfield/index.d.ts +29 -0
  114. package/lib/components/controls/rfield/index.d.ts.map +1 -0
  115. package/lib/components/controls/rfield/index.js +130 -0
  116. package/lib/components/controls/rfield/index.js.map +1 -0
  117. package/lib/components/controls/signature/index.d.ts +31 -0
  118. package/lib/components/controls/signature/index.d.ts.map +1 -0
  119. package/lib/components/controls/signature/index.js +129 -0
  120. package/lib/components/controls/signature/index.js.map +1 -0
  121. package/lib/components/controls/steps/index.d.ts +7 -0
  122. package/lib/components/controls/steps/index.d.ts.map +1 -0
  123. package/lib/components/controls/steps/index.js +42 -0
  124. package/lib/components/controls/steps/index.js.map +1 -0
  125. package/lib/components/controls/text/ellipsis-text.d.ts +22 -0
  126. package/lib/components/controls/text/ellipsis-text.d.ts.map +1 -0
  127. package/lib/components/controls/text/ellipsis-text.js +46 -0
  128. package/lib/components/controls/text/ellipsis-text.js.map +1 -0
  129. package/lib/components/controls/upload/index.d.ts +15 -0
  130. package/lib/components/controls/upload/index.d.ts.map +1 -0
  131. package/lib/components/controls/upload/index.js +100 -0
  132. package/lib/components/controls/upload/index.js.map +1 -0
  133. package/lib/components/controls/view-control.d.ts +10 -0
  134. package/lib/components/controls/view-control.d.ts.map +1 -0
  135. package/lib/components/controls/view-control.js +150 -0
  136. package/lib/components/controls/view-control.js.map +1 -0
  137. package/lib/components/detail/button/cquery-button-bar.d.ts +16 -0
  138. package/lib/components/detail/button/cquery-button-bar.d.ts.map +1 -0
  139. package/lib/components/detail/button/cquery-button-bar.js +75 -0
  140. package/lib/components/detail/button/cquery-button-bar.js.map +1 -0
  141. package/lib/components/detail/button/index.css +43 -0
  142. package/lib/components/detail/button/submit-button-bar.d.ts +19 -0
  143. package/lib/components/detail/button/submit-button-bar.d.ts.map +1 -0
  144. package/lib/components/detail/button/submit-button-bar.js +99 -0
  145. package/lib/components/detail/button/submit-button-bar.js.map +1 -0
  146. package/lib/components/detail/dtmpl.css +53 -0
  147. package/lib/components/detail/edit/dtmpl-edit.d.ts +48 -0
  148. package/lib/components/detail/edit/dtmpl-edit.d.ts.map +1 -0
  149. package/lib/components/detail/edit/dtmpl-edit.js +190 -0
  150. package/lib/components/detail/edit/dtmpl-edit.js.map +1 -0
  151. package/lib/components/detail/edit/fields-edit-card.d.ts +39 -0
  152. package/lib/components/detail/edit/fields-edit-card.d.ts.map +1 -0
  153. package/lib/components/detail/edit/fields-edit-card.js +64 -0
  154. package/lib/components/detail/edit/fields-edit-card.js.map +1 -0
  155. package/lib/components/detail/edit/modal-dtmpl-edit.d.ts +51 -0
  156. package/lib/components/detail/edit/modal-dtmpl-edit.d.ts.map +1 -0
  157. package/lib/components/detail/edit/modal-dtmpl-edit.js +168 -0
  158. package/lib/components/detail/edit/modal-dtmpl-edit.js.map +1 -0
  159. package/lib/components/detail/edit/modal-row-edit.d.ts +31 -0
  160. package/lib/components/detail/edit/modal-row-edit.d.ts.map +1 -0
  161. package/lib/components/detail/edit/modal-row-edit.js +56 -0
  162. package/lib/components/detail/edit/modal-row-edit.js.map +1 -0
  163. package/lib/components/detail/edit/post-result/index.d.ts +17 -0
  164. package/lib/components/detail/edit/post-result/index.d.ts.map +1 -0
  165. package/lib/components/detail/edit/post-result/index.js +28 -0
  166. package/lib/components/detail/edit/post-result/index.js.map +1 -0
  167. package/lib/components/detail/edit/row-edit-card.d.ts +42 -0
  168. package/lib/components/detail/edit/row-edit-card.d.ts.map +1 -0
  169. package/lib/components/detail/edit/row-edit-card.js +84 -0
  170. package/lib/components/detail/edit/row-edit-card.js.map +1 -0
  171. package/lib/components/detail/edit/row-editor.d.ts +31 -0
  172. package/lib/components/detail/edit/row-editor.d.ts.map +1 -0
  173. package/lib/components/detail/edit/row-editor.js +55 -0
  174. package/lib/components/detail/edit/row-editor.js.map +1 -0
  175. package/lib/components/detail/rightbar/index.css +35 -0
  176. package/lib/components/detail/rightbar/index.d.ts +20 -0
  177. package/lib/components/detail/rightbar/index.d.ts.map +1 -0
  178. package/lib/components/detail/rightbar/index.js +51 -0
  179. package/lib/components/detail/rightbar/index.js.map +1 -0
  180. package/lib/components/detail/view/act-dtmpl-view.d.ts +46 -0
  181. package/lib/components/detail/view/act-dtmpl-view.d.ts.map +1 -0
  182. package/lib/components/detail/view/act-dtmpl-view.js +110 -0
  183. package/lib/components/detail/view/act-dtmpl-view.js.map +1 -0
  184. package/lib/components/detail/view/dtmpl-view.d.ts +42 -0
  185. package/lib/components/detail/view/dtmpl-view.d.ts.map +1 -0
  186. package/lib/components/detail/view/dtmpl-view.js +111 -0
  187. package/lib/components/detail/view/dtmpl-view.js.map +1 -0
  188. package/lib/components/detail/view/field-view-group.d.ts +17 -0
  189. package/lib/components/detail/view/field-view-group.d.ts.map +1 -0
  190. package/lib/components/detail/view/field-view-group.js +51 -0
  191. package/lib/components/detail/view/field-view-group.js.map +1 -0
  192. package/lib/components/detail/view/modal-dtmpl-view.d.ts +27 -0
  193. package/lib/components/detail/view/modal-dtmpl-view.d.ts.map +1 -0
  194. package/lib/components/detail/view/modal-dtmpl-view.js +32 -0
  195. package/lib/components/detail/view/modal-dtmpl-view.js.map +1 -0
  196. package/lib/components/detail/view/snapshot-timeline.d.ts +32 -0
  197. package/lib/components/detail/view/snapshot-timeline.d.ts.map +1 -0
  198. package/lib/components/detail/view/snapshot-timeline.js +90 -0
  199. package/lib/components/detail/view/snapshot-timeline.js.map +1 -0
  200. package/lib/components/exportor/export-frame.css +3 -0
  201. package/lib/components/exportor/export-frame.d.ts +50 -0
  202. package/lib/components/exportor/export-frame.d.ts.map +1 -0
  203. package/lib/components/exportor/export-frame.js +140 -0
  204. package/lib/components/exportor/export-frame.js.map +1 -0
  205. package/lib/components/exportor/index.d.ts +16 -0
  206. package/lib/components/exportor/index.d.ts.map +1 -0
  207. package/lib/components/exportor/index.js +44 -0
  208. package/lib/components/exportor/index.js.map +1 -0
  209. package/lib/components/form/criteria-form.d.ts +19 -0
  210. package/lib/components/form/criteria-form.d.ts.map +1 -0
  211. package/lib/components/form/criteria-form.js +167 -0
  212. package/lib/components/form/criteria-form.js.map +1 -0
  213. package/lib/components/form/dtmpl-form.css +4 -0
  214. package/lib/components/form/dtmpl-form.d.ts +37 -0
  215. package/lib/components/form/dtmpl-form.d.ts.map +1 -0
  216. package/lib/components/form/dtmpl-form.js +213 -0
  217. package/lib/components/form/dtmpl-form.js.map +1 -0
  218. package/lib/components/form/field-group-form.d.ts +21 -0
  219. package/lib/components/form/field-group-form.d.ts.map +1 -0
  220. package/lib/components/form/field-group-form.js +58 -0
  221. package/lib/components/form/field-group-form.js.map +1 -0
  222. package/lib/components/form/fields-form.d.ts +20 -0
  223. package/lib/components/form/fields-form.d.ts.map +1 -0
  224. package/lib/components/form/fields-form.js +39 -0
  225. package/lib/components/form/fields-form.js.map +1 -0
  226. package/lib/components/form/form-Item-group.d.ts +22 -0
  227. package/lib/components/form/form-Item-group.d.ts.map +1 -0
  228. package/lib/components/form/form-Item-group.js +60 -0
  229. package/lib/components/form/form-Item-group.js.map +1 -0
  230. package/lib/components/form/index.css +13 -0
  231. package/lib/components/import/excel-import.d.ts +48 -0
  232. package/lib/components/import/excel-import.d.ts.map +1 -0
  233. package/lib/components/import/excel-import.js +234 -0
  234. package/lib/components/import/excel-import.js.map +1 -0
  235. package/lib/components/import/index.css +54 -0
  236. package/lib/components/import/template.css +51 -0
  237. package/lib/components/layout/MainPage.d.ts +32 -0
  238. package/lib/components/layout/MainPage.d.ts.map +1 -0
  239. package/lib/components/layout/MainPage.js +202 -0
  240. package/lib/components/layout/MainPage.js.map +1 -0
  241. package/lib/components/layout/footer/index.css +6 -0
  242. package/lib/components/layout/header/index.css +86 -0
  243. package/lib/components/layout/header/index.d.ts +16 -0
  244. package/lib/components/layout/header/index.d.ts.map +1 -0
  245. package/lib/components/layout/header/index.js +37 -0
  246. package/lib/components/layout/header/index.js.map +1 -0
  247. package/lib/components/layout/menu/block.d.ts +9 -0
  248. package/lib/components/layout/menu/block.d.ts.map +1 -0
  249. package/lib/components/layout/menu/block.js +48 -0
  250. package/lib/components/layout/menu/block.js.map +1 -0
  251. package/lib/components/layout/menu/l2menu-message-bar.d.ts +24 -0
  252. package/lib/components/layout/menu/l2menu-message-bar.d.ts.map +1 -0
  253. package/lib/components/layout/menu/l2menu-message-bar.js +97 -0
  254. package/lib/components/layout/menu/l2menu-message-bar.js.map +1 -0
  255. package/lib/components/layout/menu/l2menu-quick-bar.d.ts +30 -0
  256. package/lib/components/layout/menu/l2menu-quick-bar.d.ts.map +1 -0
  257. package/lib/components/layout/menu/l2menu-quick-bar.js +94 -0
  258. package/lib/components/layout/menu/l2menu-quick-bar.js.map +1 -0
  259. package/lib/components/layout/menu/menu-2layers.d.ts +9 -0
  260. package/lib/components/layout/menu/menu-2layers.d.ts.map +1 -0
  261. package/lib/components/layout/menu/menu-2layers.js +63 -0
  262. package/lib/components/layout/menu/menu-2layers.js.map +1 -0
  263. package/lib/components/layout/menu/menu-render.d.ts +8 -0
  264. package/lib/components/layout/menu/menu-render.d.ts.map +1 -0
  265. package/lib/components/layout/menu/menu-render.js +44 -0
  266. package/lib/components/layout/menu/menu-render.js.map +1 -0
  267. package/lib/components/layout/menu/reset-password.d.ts +25 -0
  268. package/lib/components/layout/menu/reset-password.d.ts.map +1 -0
  269. package/lib/components/layout/menu/reset-password.js +113 -0
  270. package/lib/components/layout/menu/reset-password.js.map +1 -0
  271. package/lib/components/layout/menu/user-bar.d.ts +19 -0
  272. package/lib/components/layout/menu/user-bar.d.ts.map +1 -0
  273. package/lib/components/layout/menu/user-bar.js +61 -0
  274. package/lib/components/layout/menu/user-bar.js.map +1 -0
  275. package/lib/components/layout/menu/userinfo-bar.d.ts +18 -0
  276. package/lib/components/layout/menu/userinfo-bar.d.ts.map +1 -0
  277. package/lib/components/layout/menu/userinfo-bar.js +50 -0
  278. package/lib/components/layout/menu/userinfo-bar.js.map +1 -0
  279. package/lib/components/layout/sidebar/index.css +26 -0
  280. package/lib/components/layout/sidebar/index.d.ts +12 -0
  281. package/lib/components/layout/sidebar/index.d.ts.map +1 -0
  282. package/lib/components/layout/sidebar/index.js +19 -0
  283. package/lib/components/layout/sidebar/index.js.map +1 -0
  284. package/lib/components/module/dtmpl-page.d.ts +19 -0
  285. package/lib/components/module/dtmpl-page.d.ts.map +1 -0
  286. package/lib/components/module/dtmpl-page.js +46 -0
  287. package/lib/components/module/dtmpl-page.js.map +1 -0
  288. package/lib/components/module/ltmpl-page.d.ts +34 -0
  289. package/lib/components/module/ltmpl-page.d.ts.map +1 -0
  290. package/lib/components/module/ltmpl-page.js +154 -0
  291. package/lib/components/module/ltmpl-page.js.map +1 -0
  292. package/lib/components/routable/dtmpl-route.d.ts +17 -0
  293. package/lib/components/routable/dtmpl-route.d.ts.map +1 -0
  294. package/lib/components/routable/dtmpl-route.js +77 -0
  295. package/lib/components/routable/dtmpl-route.js.map +1 -0
  296. package/lib/components/routable/import-route.d.ts +13 -0
  297. package/lib/components/routable/import-route.d.ts.map +1 -0
  298. package/lib/components/routable/import-route.js +29 -0
  299. package/lib/components/routable/import-route.js.map +1 -0
  300. package/lib/components/routable/ltmpl-route.d.ts +25 -0
  301. package/lib/components/routable/ltmpl-route.d.ts.map +1 -0
  302. package/lib/components/routable/ltmpl-route.js +145 -0
  303. package/lib/components/routable/ltmpl-route.js.map +1 -0
  304. package/lib/components/table/act-table.d.ts +76 -0
  305. package/lib/components/table/act-table.d.ts.map +1 -0
  306. package/lib/components/table/act-table.js +454 -0
  307. package/lib/components/table/act-table.js.map +1 -0
  308. package/lib/components/table/column/column-selector.d.ts +26 -0
  309. package/lib/components/table/column/column-selector.d.ts.map +1 -0
  310. package/lib/components/table/column/column-selector.js +59 -0
  311. package/lib/components/table/column/column-selector.js.map +1 -0
  312. package/lib/components/table/column/index.css +14 -0
  313. package/lib/components/table/index.css +45 -0
  314. package/lib/components/table/l2-act-table.d.ts +23 -0
  315. package/lib/components/table/l2-act-table.d.ts.map +1 -0
  316. package/lib/components/table/l2-act-table.js +80 -0
  317. package/lib/components/table/l2-act-table.js.map +1 -0
  318. package/lib/components/table/modal-select-table.d.ts +41 -0
  319. package/lib/components/table/modal-select-table.d.ts.map +1 -0
  320. package/lib/components/table/modal-select-table.js +208 -0
  321. package/lib/components/table/modal-select-table.js.map +1 -0
  322. package/lib/components/table/pagination.css +15 -0
  323. package/lib/components/table/pagination.d.ts +17 -0
  324. package/lib/components/table/pagination.d.ts.map +1 -0
  325. package/lib/components/table/pagination.js +40 -0
  326. package/lib/components/table/pagination.js.map +1 -0
  327. package/lib/components/table/query-table.d.ts +65 -0
  328. package/lib/components/table/query-table.d.ts.map +1 -0
  329. package/lib/components/table/query-table.js +257 -0
  330. package/lib/components/table/query-table.js.map +1 -0
  331. package/lib/components/table/relation-table.d.ts +61 -0
  332. package/lib/components/table/relation-table.d.ts.map +1 -0
  333. package/lib/components/table/relation-table.js +444 -0
  334. package/lib/components/table/relation-table.js.map +1 -0
  335. package/lib/components/table/select-table.d.ts +40 -0
  336. package/lib/components/table/select-table.d.ts.map +1 -0
  337. package/lib/components/table/select-table.js +223 -0
  338. package/lib/components/table/select-table.js.map +1 -0
  339. package/lib/components/table/selected-rows-card.d.ts +16 -0
  340. package/lib/components/table/selected-rows-card.d.ts.map +1 -0
  341. package/lib/components/table/selected-rows-card.js +47 -0
  342. package/lib/components/table/selected-rows-card.js.map +1 -0
  343. package/lib/components/table/stat/restat.d.ts +26 -0
  344. package/lib/components/table/stat/restat.d.ts.map +1 -0
  345. package/lib/components/table/stat/restat.js +61 -0
  346. package/lib/components/table/stat/restat.js.map +1 -0
  347. package/lib/components/table/table-util.d.ts +5 -0
  348. package/lib/components/table/table-util.d.ts.map +1 -0
  349. package/lib/components/table/table-util.js +30 -0
  350. package/lib/components/table/table-util.js.map +1 -0
  351. package/lib/components/tmpl/control-type-supportor.d.ts +9 -0
  352. package/lib/components/tmpl/control-type-supportor.d.ts.map +1 -0
  353. package/lib/components/tmpl/control-type-supportor.js +85 -0
  354. package/lib/components/tmpl/control-type-supportor.js.map +1 -0
  355. package/lib/components/tmpl/hc-data-source.d.ts +19 -0
  356. package/lib/components/tmpl/hc-data-source.d.ts.map +1 -0
  357. package/lib/components/tmpl/hc-data-source.js +230 -0
  358. package/lib/components/tmpl/hc-data-source.js.map +1 -0
  359. package/lib/components/tmpl/hcservice-v3.d.ts +53 -0
  360. package/lib/components/tmpl/hcservice-v3.d.ts.map +1 -0
  361. package/lib/components/tmpl/hcservice-v3.js +639 -0
  362. package/lib/components/tmpl/hcservice-v3.js.map +1 -0
  363. package/lib/components/tmpl/interface.d.ts +234 -0
  364. package/lib/components/tmpl/interface.d.ts.map +1 -0
  365. package/lib/components/tmpl/interface.js +4 -0
  366. package/lib/components/tmpl/interface.js.map +1 -0
  367. package/lib/components/tmpl/tmpl-config-analysis.d.ts +7 -0
  368. package/lib/components/tmpl/tmpl-config-analysis.d.ts.map +1 -0
  369. package/lib/components/tmpl/tmpl-config-analysis.js +106 -0
  370. package/lib/components/tmpl/tmpl-config-analysis.js.map +1 -0
  371. package/lib/components/units/index.d.ts +58 -0
  372. package/lib/components/units/index.d.ts.map +1 -0
  373. package/lib/components/units/index.js +525 -0
  374. package/lib/components/units/index.js.map +1 -0
  375. package/lib/components/welcome/index.css +13 -0
  376. package/lib/components/welcome/quick-entrance.d.ts +20 -0
  377. package/lib/components/welcome/quick-entrance.d.ts.map +1 -0
  378. package/lib/components/welcome/quick-entrance.js +79 -0
  379. package/lib/components/welcome/quick-entrance.js.map +1 -0
  380. package/lib/components/welcome/workbench.d.ts +20 -0
  381. package/lib/components/welcome/workbench.d.ts.map +1 -0
  382. package/lib/components/welcome/workbench.js +78 -0
  383. package/lib/components/welcome/workbench.js.map +1 -0
  384. package/lib/index.d.ts +4 -0
  385. package/lib/index.d.ts.map +1 -0
  386. package/lib/index.js.map +1 -0
  387. package/lib/style/common.css +79 -0
  388. package/lib/style/coverstyle.css +49 -0
  389. package/lib/style/transstyle.css +24 -0
  390. package/package.json +3 -2
@@ -0,0 +1,165 @@
1
+ import * as React from 'react';
2
+ import { Button, Checkbox as AntdCheckbox, Popconfirm, Popover, } from 'antd';
3
+ import './index.css';
4
+ import FieldsEditCard from "../../detail/edit/fields-edit-card";
5
+ import ActionUtils from './utils';
6
+ const CheckboxGroup = AntdCheckbox.Group;
7
+ ;
8
+ ;
9
+ export default class Action extends React.PureComponent {
10
+ constructor() {
11
+ super(...arguments);
12
+ this.state = {
13
+ popoverVisible: false,
14
+ };
15
+ this.isShow = () => {
16
+ const { actionConfig, data, formRef } = this.props;
17
+ return ActionUtils.isShow(actionConfig, data, formRef);
18
+ };
19
+ this.getValue = () => {
20
+ const { data, formRef, actionConfig } = this.props;
21
+ let value = {};
22
+ //从 dtmplData 与 ref
23
+ //dtmplData取第一个
24
+ let dtmplValue = data ? data[0] : undefined;
25
+ let upperFormValue = formRef ? formRef.current : undefined;
26
+ for (let fieldConfig of actionConfig.writes) {
27
+ if (!fieldConfig) {
28
+ continue;
29
+ }
30
+ if (upperFormValue) {
31
+ if (upperFormValue.getFieldValue(fieldConfig.id)) {
32
+ value[fieldConfig.id] = ActionUtils.getFormRefValue(formRef, fieldConfig.id);
33
+ }
34
+ else {
35
+ if (dtmplValue) {
36
+ if (dtmplValue['fieldMap']) {
37
+ value[fieldConfig.id] = dtmplValue ? dtmplValue['fieldMap'][fieldConfig.id] : undefined;
38
+ }
39
+ else {
40
+ value[fieldConfig.id] = dtmplValue ? dtmplValue[fieldConfig.id] : undefined;
41
+ }
42
+ }
43
+ }
44
+ }
45
+ else {
46
+ if (dtmplValue) {
47
+ if (dtmplValue['fieldMap']) {
48
+ value[fieldConfig.id] = dtmplValue ? dtmplValue['fieldMap'][fieldConfig.id] : undefined;
49
+ }
50
+ else {
51
+ value[fieldConfig.id] = dtmplValue ? dtmplValue[fieldConfig.id] : undefined;
52
+ }
53
+ }
54
+ }
55
+ }
56
+ console.log("actionValue:", value);
57
+ return value;
58
+ };
59
+ this.onOk = (value) => {
60
+ console.log('action form value:', value);
61
+ const { actionConfig, doAction, data, disabled, buttonType } = this.props;
62
+ this.setState({
63
+ popoverVisible: false,
64
+ });
65
+ doAction(actionConfig.id, this.getCodes(), value);
66
+ };
67
+ this.onCancel = () => {
68
+ this.setState({
69
+ popoverVisible: false,
70
+ });
71
+ };
72
+ this.onValuesChange = (value) => {
73
+ const { actionConfig, doAction, data, formRef } = this.props;
74
+ if (formRef && formRef.current) {
75
+ formRef.current.setFieldsValue(value);
76
+ }
77
+ };
78
+ this.getButtonType = () => {
79
+ const { buttonType } = this.props;
80
+ let bType = !buttonType ? "dashed" : buttonType.split("-")[0] == "dashed" ? "dashed" : "primary";
81
+ return bType;
82
+ };
83
+ this.blockButton = () => {
84
+ const { buttonType } = this.props;
85
+ let block = buttonType && buttonType.includes('block');
86
+ return block;
87
+ };
88
+ this.formButton = () => {
89
+ const { popoverVisible } = this.state;
90
+ const { actionConfig, doAction, data, disabled, buttonType, hiddenType, buttonSize } = this.props;
91
+ let disabled_ = disabled;
92
+ if (!this.isShow()) {
93
+ if (!hiddenType || hiddenType == 'hidden') {
94
+ return null;
95
+ }
96
+ else {
97
+ disabled_ = true;
98
+ }
99
+ }
100
+ return React.createElement(Popover, { placement: "leftBottom", visible: popoverVisible, trigger: "click", content: React.createElement(FieldsEditCard, { okDanger: actionConfig.beforeExeConfirm == 'danger', needConfirm: true, title: actionConfig.title, onCancel: () => this.onCancel(), fields: actionConfig.writes, value: this.getValue(), onOk: this.onOk, onValuesChange: this.onValuesChange }) },
101
+ React.createElement(Button, { danger: actionConfig.beforeExeConfirm == 'danger', type: this.getButtonType(), block: this.blockButton(), size: buttonSize, onClick: () => this.setState({ popoverVisible: !popoverVisible }), disabled: disabled_ }, actionConfig.title));
102
+ };
103
+ this.getCodes = () => {
104
+ const { data, } = this.props;
105
+ let codes = [];
106
+ if (data) {
107
+ if (data instanceof Array) {
108
+ for (let d of data) {
109
+ if (d) {
110
+ codes.push(d['code']);
111
+ }
112
+ }
113
+ }
114
+ }
115
+ return codes;
116
+ };
117
+ this.withoutFormButton = () => {
118
+ const { actionConfig, doAction, data, disabled, buttonType, hiddenType, buttonSize } = this.props;
119
+ let disabled_ = disabled;
120
+ if (!this.isShow()) {
121
+ if (!hiddenType || hiddenType == 'hidden') {
122
+ return null;
123
+ }
124
+ else {
125
+ disabled_ = true;
126
+ }
127
+ }
128
+ let codes = this.getCodes();
129
+ let block = this.blockButton();
130
+ let bType = this.getButtonType();
131
+ return !actionConfig.beforeExeConfirm || actionConfig.beforeExeConfirm == 'default' ?
132
+ React.createElement(Popconfirm, { key: actionConfig.id, placement: "rightBottom", title: `确定要执行【${actionConfig.title}】吗?`, onConfirm: () => {
133
+ doAction(actionConfig.id, codes, {});
134
+ }, disabled: disabled_, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" },
135
+ React.createElement(Button, { size: buttonSize, type: bType, block: block, disabled: disabled_ }, actionConfig.title)) :
136
+ actionConfig.beforeExeConfirm == 'danger' ?
137
+ React.createElement(Popconfirm, { key: actionConfig.id, placement: "rightBottom", title: `确定要执行【${actionConfig.title}】吗?`, onConfirm: () => {
138
+ doAction(actionConfig.id, codes, {});
139
+ }, disabled: disabled_, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88", okType: 'danger' },
140
+ React.createElement(Button, { type: bType, block: block, danger: true, size: buttonSize, disabled: disabled_ }, actionConfig.title)) :
141
+ React.createElement(Button, { type: bType, block: block, size: buttonSize, onClick: () => doAction(actionConfig.id, codes, {}), disabled: disabled_ }, actionConfig.title);
142
+ };
143
+ }
144
+ componentDidMount() {
145
+ const {} = this.props;
146
+ this.setState({});
147
+ }
148
+ componentDidUpdate(prevProps) {
149
+ const {} = this.props;
150
+ if (this.props != prevProps) {
151
+ // this.setState({collapse:!this.state.collapse})
152
+ }
153
+ }
154
+ render() {
155
+ const {} = this.state;
156
+ const { actionConfig, doAction, data, disabled, buttonType } = this.props;
157
+ return React.createElement(React.Fragment, null, actionConfig.writes && actionConfig.writes.length > 0 ? this.formButton() : this.withoutFormButton());
158
+ }
159
+ }
160
+ Action.defaultProps = {
161
+ buttonType: 'dashed',
162
+ hiddenType: 'hidden',
163
+ buttonSize: undefined,
164
+ };
165
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/action/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,MAAM,EAAE,QAAQ,IAAI,YAAY,EAAE,UAAU,EAAE,OAAO,GAAE,MAAM,MAAM,CAAA;AAC3E,OAAO,aAAa,CAAA;AAIpB,OAAO,cAAc,MAAM,oCAAoC,CAAA;AAE/D,OAAO,WAAW,MAAM,SAAS,CAAC;AAElC,MAAM,aAAa,GAAG,YAAY,CAAC,KAAK,CAAC;AAexC,CAAC;AAKD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,KAAK,CAAC,aAAuC;IAAjF;;QAQI,UAAK,GAAG;YACJ,cAAc,EAAE,KAAK;SACxB,CAAA;QAeD,WAAM,GAAG,GAAG,EAAE;YACV,MAAM,EAAC,YAAY,EAAE,IAAI,EAAE,OAAO,EAA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AAC;IACR,CAAC;;AA9LM,mBAAY,GAAG;IAClB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,QAAQ;IACpB,UAAU,EAAE,SAAS;CACxB,CAAA"}
@@ -0,0 +1,9 @@
1
+ import { ActionConfig, Comparator, DtmplData } from "../../tmpl/interface";
2
+ import { RefObject } from "react";
3
+ import { FormInstance } from "antd/lib/form/hooks/useForm";
4
+ export default class ActionUtils {
5
+ static isShow(actionConfig: ActionConfig, data: DtmplData[] | object[], formRef: RefObject<FormInstance>): boolean;
6
+ static comparator(comparator: Comparator, value: string, defaultValue: string): boolean;
7
+ static getFormRefValue(formRef: any, key: any): any;
8
+ }
9
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/action/utils.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,UAAU,EAAE,SAAS,EAAC,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAChC,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AAGzD,MAAM,CAAC,OAAO,OAAO,WAAW;IAE5B,MAAM,CAAE,MAAM,CAAC,YAAY,EAAC,YAAY,EAAE,IAAI,EAAC,SAAS,EAAE,GAAE,MAAM,EAAE,EAAE,OAAO,EAAC,SAAS,CAAC,YAAY,CAAC;IAuErG,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;IAiC7E,MAAM,CAAC,eAAe,CAAC,OAAO,KAAA,EAAE,GAAG,KAAA;CAUtC"}
@@ -0,0 +1,110 @@
1
+ export default class ActionUtils {
2
+ static isShow(actionConfig, data, formRef) {
3
+ //所有data都必须满足条件才能显示
4
+ //let comparator=actionConfig.comparator;
5
+ let preFieldConfigs = actionConfig.preposes;
6
+ if (!preFieldConfigs || preFieldConfigs.length <= 0) {
7
+ return true;
8
+ }
9
+ let isShow = true;
10
+ if (formRef && formRef.current) {
11
+ for (let fieldConfig of preFieldConfigs) {
12
+ if (!fieldConfig) {
13
+ continue;
14
+ }
15
+ let value = this.getFormRefValue(formRef, fieldConfig.id);
16
+ // if (value) {
17
+ if (!this.comparator(fieldConfig.comparator, value, fieldConfig.defaultValue)) {
18
+ isShow = false;
19
+ break;
20
+ }
21
+ //} else if (data) {
22
+ // if (!isShow) {
23
+ // // break;
24
+ // // }
25
+ // // for (let d1 of data) {
26
+ // // if (d1 && d1['fieldMap']) {
27
+ // // if (!this.comparator(fieldConfig.comparator, d1['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
28
+ // // isShow = false;
29
+ // // break;
30
+ // // }
31
+ // // } else if (!this.comparator(fieldConfig.comparator, d1[fieldConfig.id], fieldConfig.defaultValue)){
32
+ // // isShow = false;
33
+ // // break;
34
+ // // }else{
35
+ // // isShow = false;
36
+ // // break;
37
+ // // }
38
+ // // }
39
+ // // }
40
+ }
41
+ }
42
+ else if (data) {
43
+ for (let d of data) {
44
+ if (!isShow) {
45
+ break;
46
+ }
47
+ if (!d) {
48
+ isShow = false;
49
+ break;
50
+ }
51
+ for (let fieldConfig of preFieldConfigs) {
52
+ if (d['fieldMap']) {
53
+ if (!this.comparator(fieldConfig.comparator, d['fieldMap'][fieldConfig.id], fieldConfig.defaultValue)) {
54
+ isShow = false;
55
+ break;
56
+ }
57
+ }
58
+ else {
59
+ if (!this.comparator(fieldConfig.comparator, d[fieldConfig.id], fieldConfig.defaultValue)) {
60
+ isShow = false;
61
+ break;
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
67
+ else {
68
+ isShow = false;
69
+ }
70
+ return isShow;
71
+ }
72
+ static comparator(comparator, value, defaultValue) {
73
+ let dvs;
74
+ if (!comparator) {
75
+ comparator = 'equal';
76
+ }
77
+ if (!defaultValue) {
78
+ return true;
79
+ }
80
+ if (!value) {
81
+ return false;
82
+ }
83
+ switch (comparator) {
84
+ case "equal":
85
+ return value == defaultValue;
86
+ case "exclude":
87
+ (typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
88
+ return !dvs.includes(value);
89
+ case "includeOne":
90
+ (typeof (defaultValue) == 'string') ? dvs = defaultValue.split(',') : dvs = defaultValue;
91
+ return dvs.includes(value);
92
+ case "noGreater":
93
+ return value <= defaultValue;
94
+ case "noLess":
95
+ return value >= defaultValue;
96
+ case "unequal":
97
+ return value != defaultValue;
98
+ }
99
+ }
100
+ static getFormRefValue(formRef, key) {
101
+ if (formRef && formRef.current) {
102
+ console.log("formRef.current.getFieldsValue", formRef.current.getFieldValue(key));
103
+ return formRef.current.getFieldValue(key);
104
+ }
105
+ else {
106
+ return false;
107
+ }
108
+ }
109
+ }
110
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/components/controls/action/utils.tsx"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,WAAW;IAE5B,MAAM,CAAE,MAAM,CAAC,YAAyB,EAAE,IAA0B,EAAE,OAA+B;QAEjG,mBAAmB;QACnB,yCAAyC;QACzC,IAAI,eAAe,GAAG,YAAY,CAAC,QAAQ,CAAC;QAC5C,IAAI,CAAC,eAAe,IAAI,eAAe,CAAC,MAAM,IAAI,CAAC,EAAE;YACjD,OAAO,IAAI,CAAC;SACf;QAED,IAAI,MAAM,GAAG,IAAI,CAAC;QAClB,IAAI,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE;YAC5B,KAAK,IAAI,WAAW,IAAI,eAAe,EAAE;gBACrC,IAAI,CAAC,WAAW,EAAE;oBACd,SAAS;iBACZ;gBACD,IAAI,KAAK,GAAG,IAAI,CAAC,eAAe,CAAC,OAAO,EAAE,WAAW,CAAC,EAAE,CAAC,CAAC;gBAC1D,eAAe;gBACX,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,UAAU,E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AG,CAAC,CAAE;SAC9C;aAAM;YACH,OAAO,KAAK,CAAC;SAChB;IACL,CAAC;CAEJ"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { EControlProps } from "../../tmpl/interface";
3
+ interface AutoCompleteProps extends EControlProps {
4
+ }
5
+ declare const AutoComplete: React.FC<AutoCompleteProps>;
6
+ export default AutoComplete;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/auto-complete/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAMnD,UAAU,iBAAkB,SAAQ,aAAa;CAEhD;AAED,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAiE7C,CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ import { AutoComplete as AntdAutoComplete, Input } from "antd";
3
+ import HCDataSource from "../../tmpl/hc-data-source";
4
+ const { TextArea } = Input;
5
+ const AutoComplete = (props) => {
6
+ const { id, value, itemType, fieldConfig, onChange } = props;
7
+ let entryControl = undefined;
8
+ const changeValue = (value1) => {
9
+ if (onChange) {
10
+ let newvalue = undefined;
11
+ if (value1 === undefined) {
12
+ return "";
13
+ }
14
+ let bb = value1.startsWith("@@");
15
+ if (bb) {
16
+ newvalue = (value ? value : "") + value1.substring(2, value1.length);
17
+ }
18
+ else {
19
+ newvalue = value1;
20
+ }
21
+ onChange(newvalue);
22
+ }
23
+ };
24
+ let placeholder = !fieldConfig.disabled ? `请输入${fieldConfig.title}` : "无需输入";
25
+ let disabled = fieldConfig.disabled;
26
+ let antdControlProps = {
27
+ id, placeholder, disabled,
28
+ };
29
+ const getSelectArray = () => {
30
+ let data = HCDataSource.getEnums(fieldConfig.mstrucId);
31
+ if (!data) {
32
+ return [];
33
+ }
34
+ const options = [];
35
+ data.map((item) => {
36
+ const option = {
37
+ value: "@@" + item.value,
38
+ label: item.title
39
+ };
40
+ options.push(option);
41
+ return false;
42
+ });
43
+ // debugger
44
+ return options;
45
+ };
46
+ entryControl = React.createElement(AntdAutoComplete, { allowClear: true, dropdownMatchSelectWidth: true, options: getSelectArray(), onChange: changeValue, value: value },
47
+ React.createElement(TextArea, Object.assign({ style: {
48
+ height: 150,
49
+ } }, antdControlProps)));
50
+ return entryControl;
51
+ };
52
+ export default AutoComplete;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/auto-complete/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,YAAY,IAAI,gBAAgB,EAAE,KAAK,EAAC,MAAM,MAAM,CAAC;AAG7D,OAAO,YAAY,MAAM,2BAA2B,CAAC;AAErD,MAAM,EAAC,QAAQ,EAAC,GAAG,KAAK,CAAC;AAMzB,MAAM,YAAY,GAAgC,CAAC,KAAK,EAAE,EAAE;IAExD,MAAM,EAAC,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAC,GAAG,KAAK,CAAC;IAE1D,IAAI,YAAY,GAAG,SAAS,CAAC;IAE7B,MAAM,WAAW,GAAG,CAAC,MAAM,EAAE,EAAE;QAC3B,IAAI,QAAQ,EAAE;YACV,IAAI,QAAQ,GAAC,SAAS,CAAC;YACvB,IAAI,MAAM,KAAK,SAAS,EAAE;gBACtB,OAAO,EAAE,CAAC;aACb;YACD,IAAI,EAAE,GAAG,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACjC,IAAI,EAAE,EAAE;gBACJ,QAAQ,GAAE,CAAC,KAAK,CAAA,CAAC,CAAA,KAAK,CAAA,CAAC,CAAA,EAAE,CAAC,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC,EAAE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CAAA;AAED,eAAe,YAAY,CAAC"}
@@ -0,0 +1,31 @@
1
+ import React from "react";
2
+ import 'miew/dist/Miew.min.css';
3
+ import 'ketcher-react/dist/index.css';
4
+ import './index.css';
5
+ import { VEControlProps } from '../../tmpl/interface';
6
+ interface ChemStrucProps extends VEControlProps {
7
+ }
8
+ interface ChemStrucState {
9
+ modalVisible: boolean;
10
+ molFileLoaded: boolean;
11
+ molFile: any;
12
+ }
13
+ export default class ChemStruc extends React.PureComponent<ChemStrucProps, ChemStrucState> {
14
+ static defaultProps: {
15
+ viewOrEdit: string;
16
+ };
17
+ state: {
18
+ modalVisible: boolean;
19
+ molFileLoaded: boolean;
20
+ molFile: any;
21
+ };
22
+ componentDidMount(): void;
23
+ loadData: () => Promise<void>;
24
+ saveMolfile: () => Promise<void>;
25
+ triggerChange: (changedValue: any) => void;
26
+ showView: () => Promise<void>;
27
+ onCancel: () => void;
28
+ render(): JSX.Element;
29
+ }
30
+ export {};
31
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/chemstruc/graph.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,wBAAwB,CAAA;AAC/B,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAGnD,UAAU,cAAe,SAAQ,cAAc;CAE9C;AAED,UAAU,cAAc;IACpB,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;IACvB,OAAO,EAAE,GAAG,CAAC;CAChB;AAED,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,KAAK,CAAC,aAAa,CAAC,cAAc,EAAE,cAAc,CAAC;IAEtF,MAAM,CAAC,YAAY;;MAElB;IAED,KAAK;;;;MAIJ;IAED,iBAAiB;IAejB,QAAQ,sBAmBP;IAED,WAAW,sBAQV;IAED,aAAa,8BAKZ;IAGD,QAAQ,sBAKP;IACD,QAAQ,aAIP;IAED,MAAM;CAiDT"}
@@ -0,0 +1,121 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import React from "react";
11
+ import { Button, Col, Modal, Popconfirm, Row } from 'antd';
12
+ import { RemoteStructServiceProvider } from 'ketcher-core';
13
+ // import { StandaloneStructServiceProvider } from 'ketcher-standalone'
14
+ import { Editor } from "ketcher-react";
15
+ import 'miew/dist/Miew.min.css';
16
+ import 'ketcher-react/dist/index.css';
17
+ import './index.css';
18
+ import HcserviceV3 from '../../tmpl/hcservice-v3';
19
+ import { DeploymentUnitOutlined } from '@ant-design/icons';
20
+ export default class ChemStruc extends React.PureComponent {
21
+ constructor() {
22
+ super(...arguments);
23
+ this.state = {
24
+ modalVisible: false,
25
+ molFileLoaded: false,
26
+ molFile: undefined,
27
+ };
28
+ //
29
+ // async componentDidUpdate(prevProps, prevState, snapshot) {
30
+ // const {value} = this.props
31
+ // const {value:preValue} = prevProps;
32
+ //
33
+ // if(Object.entries(value).toString() != Object.entries(preValue).toString()){
34
+ // await this.loadData();
35
+ // }
36
+ // }
37
+ this.loadData = () => __awaiter(this, void 0, void 0, function* () {
38
+ const { value } = this.props;
39
+ if (value) {
40
+ let val = JSON.parse(value);
41
+ let molFile;
42
+ if (val.valid == true) { //此处要优化
43
+ molFile = yield HcserviceV3.loadFileTxt(val.base.path);
44
+ }
45
+ else if (val.valid == 'new') {
46
+ molFile = val.body;
47
+ }
48
+ else {
49
+ molFile = undefined;
50
+ }
51
+ console.log('molFile:', molFile);
52
+ // urilib.resolve('');
53
+ global.ketcher.setMolecule(molFile);
54
+ this.setState({
55
+ molFile,
56
+ });
57
+ }
58
+ });
59
+ this.saveMolfile = () => __awaiter(this, void 0, void 0, function* () {
60
+ let value = yield global.ketcher.getKet();
61
+ //let value = await global.ketcher.getGraphAsync();
62
+ console.log('ket value:', value);
63
+ this.triggerChange(value);
64
+ this.setState({
65
+ modalVisible: false,
66
+ });
67
+ });
68
+ this.triggerChange = (changedValue) => {
69
+ const { onChange } = this.props;
70
+ if (onChange) {
71
+ onChange(JSON.stringify({ valid: 'new', body: changedValue }));
72
+ }
73
+ };
74
+ this.showView = () => __awaiter(this, void 0, void 0, function* () {
75
+ yield this.loadData();
76
+ this.setState({
77
+ modalVisible: true
78
+ });
79
+ });
80
+ this.onCancel = () => {
81
+ this.setState({
82
+ modalVisible: false,
83
+ });
84
+ };
85
+ }
86
+ componentDidMount() {
87
+ }
88
+ render() {
89
+ const { disabled, viewOrEdit, value } = this.props;
90
+ const { molFile } = this.state;
91
+ const structServiceProvider = new RemoteStructServiceProvider("");
92
+ return (React.createElement(React.Fragment, null,
93
+ React.createElement(Button, { onClick: this.showView },
94
+ React.createElement(DeploymentUnitOutlined, null),
95
+ " ",
96
+ viewOrEdit == 'view' ? '查 看' : ' 编 辑'),
97
+ React.createElement(Modal, { closable: false, visible: this.state.modalVisible, forceRender: true, centered: true, style: { maxWidth: 'calc(100vw - 62px)', maxHeight: 'calc(100vw - 50px)' }, width: 1200, onCancel: () => {
98
+ this.onCancel();
99
+ }, footer: disabled ? [React.createElement(Button, { key: 1, onClick: () => {
100
+ this.onCancel();
101
+ } }, "\u53D6\u6D88")] : [React.createElement(Popconfirm, { key: 2, placement: "top", title: "确定要取消本次编辑的数据吗?", onConfirm: this.onCancel, okText: "\u786E\u5B9A", cancelText: "\u53D6\u6D88" },
102
+ React.createElement(Button, null, "\u53D6\u6D88")), React.createElement(Button, { key: 3, onClick: () => {
103
+ this.saveMolfile();
104
+ }, type: 'primary' }, "\u786E\u5B9A")], bodyStyle: { width: '1200px' } },
105
+ React.createElement(Row, { style: {
106
+ height: '430px',
107
+ border: '1px solid #00f',
108
+ maxWidth: 'calc(100vw - 92px)',
109
+ maxHeight: 'calc(100vw - 80px)'
110
+ } },
111
+ React.createElement(Col, { key: 1, span: 24, style: { height: '430px' } },
112
+ React.createElement(Editor, { onInit: (ketcher) => __awaiter(this, void 0, void 0, function* () {
113
+ global.ketcher = ketcher;
114
+ //await ketcher.setMolecule(await HcserviceV3.loadFileTxt(value.base.path));
115
+ }), staticResourcesUrl: "ketcher", structServiceProvider: structServiceProvider, errorHandler: undefined }))))));
116
+ }
117
+ }
118
+ ChemStruc.defaultProps = {
119
+ viewOrEdit: 'view',
120
+ };
121
+ //# sourceMappingURL=graph.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.js","sourceRoot":"","sources":["../../../../src/components/controls/chemstruc/graph.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAC,MAAM,MAAM,CAAC;AACzD,OAAO,EAAC,2BAA2B,EAAC,MAAM,cAAc,CAAA;AACxD,uEAAuE;AACvE,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AACrC,OAAO,wBAAwB,CAAA;AAC/B,OAAO,8BAA8B,CAAA;AACrC,OAAO,aAAa,CAAA;AACpB,OAAO,WAAW,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AAYzD,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,KAAK,CAAC,aAA6C;IAA1F;;QAMI,UAAK,GAAG;YACJ,YAAY,EAAE,KAAK;YACnB,aAAa,EAAE,KAAK;YACpB,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N,CAAC;;AA5HM,sBAAY,GAAG;IAClB,UAAU,EAAE,MAAM;CACrB,CAAA"}
@@ -0,0 +1,28 @@
1
+ body {
2
+ margin: 0;
3
+ padding: 0;
4
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
5
+ 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
6
+ sans-serif;
7
+ -webkit-font-smoothing: antialiased;
8
+ -moz-osx-font-smoothing: grayscale;
9
+ }
10
+
11
+ .chemstruc-edit-upload{
12
+ width: 230px;
13
+ }
14
+
15
+ .ant-upload-list-picture-card-container,
16
+ .ant-upload-select-picture-card{
17
+ width: 66px!important;
18
+ height:66px!important;
19
+ }
20
+ /*控制ketcher的选择工具栏的显示层级,modal为1000,所以此处为1020*/
21
+ .ToolbarMultiToolItem-module_portal__yDg5_{
22
+ z-index: 1020!important;
23
+ }
24
+
25
+ code {
26
+ font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
27
+ monospace;
28
+ }
@@ -0,0 +1,9 @@
1
+
2
+ .collapse .ant-card-body {
3
+ padding:0px
4
+ }
5
+
6
+ .ant-card-head-title button{
7
+ font-size: 16px;
8
+ padding:0px;
9
+ }
@@ -0,0 +1,20 @@
1
+ import * as React from 'react';
2
+ import './index.css';
3
+ import { CardProps } from "antd/lib/card";
4
+ interface CollapseCardProps extends CardProps {
5
+ initCollapse?: boolean;
6
+ }
7
+ interface CollapseCardState {
8
+ collapse: boolean;
9
+ }
10
+ export default class CollapseCard extends React.PureComponent<CollapseCardProps, CollapseCardState> {
11
+ state: {
12
+ collapse: boolean;
13
+ };
14
+ componentDidMount(): void;
15
+ componentDidUpdate(prevProps: any): void;
16
+ cardTitle: () => JSX.Element;
17
+ render(): JSX.Element;
18
+ }
19
+ export {};
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/collapse-card/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,aAAa,CAAA;AAEpB,OAAO,EAAC,SAAS,EAAC,MAAM,eAAe,CAAC;AAExC,UAAU,iBAAkB,SAAQ,SAAS;IACzC,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,UAAU,iBAAiB;IACvB,QAAQ,EAAE,OAAO,CAAA;CACpB;AACD,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,KAAK,CAAC,aAAa,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAE/F,KAAK;;MAEJ;IAED,iBAAiB;IAOjB,kBAAkB,CAAC,SAAS,KAAA;IAS5B,SAAS,oBAYR;IAED,MAAM;CAST"}