aldehyde 0.0.8 → 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 (391) 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 +4 -0
  387. package/lib/index.js.map +1 -0
  388. package/lib/style/common.css +79 -0
  389. package/lib/style/coverstyle.css +49 -0
  390. package/lib/style/transstyle.css +24 -0
  391. package/package.json +10 -7
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+ import { FileValue } from "../../tmpl/interface";
3
+ interface DrawerFileViewProps {
4
+ file: FileValue;
5
+ }
6
+ interface DrawerFileViewState {
7
+ drawerVisible: boolean;
8
+ }
9
+ export default class DrawerFileView extends React.PureComponent<DrawerFileViewProps, DrawerFileViewState> {
10
+ state: {
11
+ drawerVisible: boolean;
12
+ };
13
+ onError(e: any): void;
14
+ onClose: () => void;
15
+ render(): JSX.Element;
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=drawer-file-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer-file-view.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/file-view/drawer-file-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAG/C,UAAU,mBAAmB;IACzB,IAAI,EAAE,SAAS,CAAC;CACnB;AAED,UAAU,mBAAmB;IACzB,aAAa,EAAE,OAAO,CAAC;CAE1B;AACD,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,aAAa,CAAC,mBAAmB,EAAE,mBAAmB,CAAC;IAErG,KAAK;;MAEJ;IAED,OAAO,CAAC,CAAC,KAAA;IAIT,OAAO,aAEN;IAED,MAAM;CAqCT"}
@@ -0,0 +1,51 @@
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 * as React from 'react';
11
+ import { Button, Drawer, Space } from 'antd';
12
+ import { DownloadOutlined, CloseOutlined } from '@ant-design/icons';
13
+ import FileViewer from 'react-file-viewer';
14
+ import HCService from "../../tmpl/hcservice-v3";
15
+ ;
16
+ ;
17
+ export default class DrawerFileView extends React.PureComponent {
18
+ constructor() {
19
+ super(...arguments);
20
+ this.state = {
21
+ drawerVisible: false
22
+ };
23
+ this.onClose = () => {
24
+ this.setState({ drawerVisible: false });
25
+ };
26
+ }
27
+ onError(e) {
28
+ console.log(e, 'error in file-viewer');
29
+ }
30
+ render() {
31
+ const { file } = this.props;
32
+ const { drawerVisible } = this.state;
33
+ return React.createElement("span", { className: 'labelcss' },
34
+ React.createElement(Button, { type: 'link', onClick: () => {
35
+ this.setState({ drawerVisible: true });
36
+ }, size: "small" }, file.base.fileName),
37
+ React.createElement(Button, { type: 'text', onClick: () => __awaiter(this, void 0, void 0, function* () {
38
+ yield HCService.download(file.base.path);
39
+ }), size: "small" },
40
+ React.createElement(DownloadOutlined, null)),
41
+ drawerVisible ? React.createElement(Drawer, { title: file.base.fileName, placement: 'left', closable: false, onClose: this.onClose, width: '1200px', visible: drawerVisible, extra: React.createElement(Space, null,
42
+ React.createElement(Button, { onClick: () => __awaiter(this, void 0, void 0, function* () {
43
+ yield HCService.download(file.base.path);
44
+ }) },
45
+ React.createElement(DownloadOutlined, null)),
46
+ React.createElement(Button, { onClick: this.onClose },
47
+ React.createElement(CloseOutlined, null))) },
48
+ React.createElement(FileViewer, { style: { width: '100%' }, fileType: file.base.type, filePath: HCService.getFileUrl(file.base.path), errorComponent: undefined, onError: this.onError })) : null);
49
+ }
50
+ }
51
+ //# sourceMappingURL=drawer-file-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer-file-view.js","sourceRoot":"","sources":["../../../../src/components/controls/file-view/drawer-file-view.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AACzC,OAAO,EAAc,gBAAgB,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAA;AAC7E,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAI3C,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAI/C,CAAC;AAKD,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,KAAK,CAAC,aAAuD;IAAzG;;QAEI,UAAK,GAAG;YACJ,aAAa,EAAE,KAAK;SACvB,CAAA;QAMD,YAAO,GAAG,GAAG,EAAE;YACX,IAAI,CAAC,QAAQ,CAAC,EAAC,aAAa,EAAE,KAAK,EAAC,CAAC,CAAA;QACzC,CAAC,CAAA;IAuCL,CAAC;IA7CG,OAAO,CAAC,CAAC;QACL,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,sBAAsB,CAAC,CAAC;IAC3C,CAAC;IAMD,MAAM;QACF,MAAM,EAAC,IAAI,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,MAAM,EAAC,aAAa,EAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACnC,OAAO,8BAAM,SAAS,EAAC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AAO,EAAE,IAAI,CAAC,OAAO,GAAG,CACvB,CAAC,CAAC,CAAC,IAAI,CAGC,CAAC;IAC1B,CAAC;CAEJ"}
@@ -0,0 +1,23 @@
1
+ import * as React from 'react';
2
+ import { FieldConfig } from "../../tmpl/interface";
3
+ interface FileViewProps {
4
+ fieldConfig: FieldConfig;
5
+ value: any;
6
+ width?: number;
7
+ }
8
+ interface FileViewState {
9
+ urlData: string;
10
+ }
11
+ export default class FileView extends React.PureComponent<FileViewProps, FileViewState> {
12
+ state: {
13
+ urlData: any;
14
+ };
15
+ loadData: () => Promise<void>;
16
+ componentDidMount(): void;
17
+ componentDidUpdate(prevProps: any, prevState: any, snapshot: any): void;
18
+ getJsonValue: (file: any) => any;
19
+ packFile2Show: (file: any) => any;
20
+ render(): JSX.Element;
21
+ }
22
+ export {};
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/file-view/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAO9B,OAAO,EAAC,WAAW,EAAC,MAAM,sBAAsB,CAAC;AAKjD,UAAU,aAAa;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,aAAa;IACnB,OAAO,EAAC,MAAM,CAAA;CAEjB;AACD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;IAEnF,KAAK;;MAEJ;IAED,QAAQ,sBAWP;IACD,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA,EAAE,QAAQ,KAAA;IAQjD,YAAY,qBAQX;IAED,aAAa,qBA4EZ;IAED,MAAM;CAIT"}
@@ -0,0 +1,130 @@
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 * as React from 'react';
11
+ import { Button, Col, Image, Row, Space } from 'antd';
12
+ import DrawerFileView from './drawer-file-view';
13
+ import { DownloadOutlined } from '@ant-design/icons';
14
+ import HCService from "../../tmpl/hcservice-v3";
15
+ import Player from "griffith";
16
+ ;
17
+ ;
18
+ export default class FileView extends React.PureComponent {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.state = {
22
+ urlData: undefined,
23
+ };
24
+ this.loadData = () => __awaiter(this, void 0, void 0, function* () {
25
+ const { value } = this.props;
26
+ let jsonFile = this.getJsonValue(value);
27
+ if (jsonFile) {
28
+ if (/^image\/\w+;base64/.test(jsonFile.base.type)) {
29
+ this.setState({
30
+ urlData: yield HCService.loadFileTxt(jsonFile.base.path)
31
+ });
32
+ }
33
+ }
34
+ });
35
+ this.getJsonValue = (file) => {
36
+ let jsonFile;
37
+ if (!file) {
38
+ return undefined;
39
+ }
40
+ else if (typeof (file) == 'string') {
41
+ jsonFile = JSON.parse(file);
42
+ }
43
+ return jsonFile;
44
+ };
45
+ this.packFile2Show = (file) => {
46
+ const { urlData } = this.state;
47
+ let jsonFile = this.getJsonValue(file);
48
+ if (jsonFile) {
49
+ if ("new" == jsonFile.valid) {
50
+ return jsonFile.fileName;
51
+ }
52
+ else if ("delete" == jsonFile.valid) {
53
+ return undefined;
54
+ }
55
+ else if (['png', 'jpg', 'jpeg', 'gif', 'PNG', 'JPG', 'JPEG', 'GIF', 'svg', 'SVG'].includes(jsonFile.base.type)) {
56
+ return React.createElement(Image, { width: 90, src: jsonFile.icon.type ? HCService.getFileUrl(jsonFile.icon.path) : HCService.getFileUrl(jsonFile.base.path), preview: {
57
+ src: HCService.getFileUrl(jsonFile.base.path),
58
+ } });
59
+ }
60
+ else if (urlData) {
61
+ // let urlValue = await HCService.loadFileTxt(jsonFile.base.path)
62
+ return React.createElement(Image, { width: 90, src: urlData, preview: {
63
+ src: urlData,
64
+ } });
65
+ }
66
+ else if (['mp4', 'MP4', 'mov', 'MOV', 'avi', 'AVI', 'WMV', 'wmv'].includes(jsonFile.base.type)) {
67
+ let sources = {
68
+ ld: {
69
+ play_url: HCService.getFileUrl(jsonFile.base.path),
70
+ }
71
+ };
72
+ return (React.createElement(Row, { align: 'middle' },
73
+ React.createElement(Col, { style: { height: '60px', width: '300px' } },
74
+ React.createElement(Player, { locale: 'zh-Hans', sources: sources, id: jsonFile.base.fileName }))));
75
+ }
76
+ else if (['xlsx', 'docx', 'csv', 'webm', 'bmp'].includes(jsonFile.base.type)) {
77
+ // return <span className='labelcss'>
78
+ // <Button onClick={async () => {
79
+ // await HCService.openfile(jsonFile.base.path);
80
+ // }} size="small"><ReadOutlined />{jsonFile.base.fileName}</Button>
81
+ //
82
+ // <FileViewer
83
+ // fileType={jsonFile.base.type}
84
+ // filePath={HCService.getFileUrl(jsonFile.base.path)}
85
+ // errorComponent={undefined}
86
+ // onError={this.onError}/>
87
+ // </span>
88
+ return React.createElement(DrawerFileView, { file: jsonFile });
89
+ }
90
+ else if (['pdf', 'txt'].includes(jsonFile.base.type)) {
91
+ return React.createElement("span", { className: 'labelcss' },
92
+ React.createElement(Button, { type: 'link', onClick: () => __awaiter(this, void 0, void 0, function* () {
93
+ yield HCService.openfile(jsonFile.base.path);
94
+ }), size: "small" }, jsonFile.base.fileName),
95
+ React.createElement(Button, { type: 'text', onClick: () => __awaiter(this, void 0, void 0, function* () {
96
+ yield HCService.download(jsonFile.base.path);
97
+ }), size: "small" },
98
+ React.createElement(DownloadOutlined, null)));
99
+ }
100
+ else {
101
+ return React.createElement(Space, { className: 'labelcss' },
102
+ React.createElement(Button, { type: 'link', onClick: () => __awaiter(this, void 0, void 0, function* () {
103
+ yield HCService.download(jsonFile.base.path);
104
+ }), size: "small" }, jsonFile.base.fileName),
105
+ React.createElement(Button, { type: 'text', onClick: () => __awaiter(this, void 0, void 0, function* () {
106
+ yield HCService.download(jsonFile.base.path);
107
+ }), size: "small" },
108
+ React.createElement(DownloadOutlined, null)));
109
+ }
110
+ }
111
+ else {
112
+ return undefined;
113
+ }
114
+ };
115
+ }
116
+ componentDidMount() {
117
+ this.loadData();
118
+ }
119
+ componentDidUpdate(prevProps, prevState, snapshot) {
120
+ const { value } = this.props;
121
+ const { value: preValue } = this.props;
122
+ if (value != preValue) {
123
+ this.loadData();
124
+ }
125
+ }
126
+ render() {
127
+ return React.createElement(React.Fragment, null, this.packFile2Show(this.props.value));
128
+ }
129
+ }
130
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/file-view/index.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAC,KAAK,EAAC,MAAM,MAAM,CAAA;AAGlD,OAAO,cAAc,MAAM,oBAAoB,CAAA;AAI/C,OAAO,EAAC,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AACnD,OAAO,SAAS,MAAM,yBAAyB,CAAC;AAChD,OAAO,MAAM,MAAM,UAAU,CAAC;AAM7B,CAAC;AAKD,CAAC;AACF,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,aAA2C;IAAvF;;QAEI,UAAK,GAAC;YACF,OAAO,EAAC,SAAS;SACpB,CAAA;QAED,aAAQ,GAAE,GAAQ,EAAE;YAChB,MAAM,EAAC,KAAK,EAAC,GAAC,IAAI,CAAC,KAAK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AAO,IAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAU;wBACjD,oBAAC,MAAM,IAAC,IAAI,EAAE,MAAM,EAAG,OAAO,EAAE,GAAS,EAAE;gCACvC,MAAM,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;4BACjD,CAAC,CAAA,EAAE,IAAI,EAAC,OAAO;4BAAC,oBAAC,gBAAgB,OAAE,CAAS,CACtC,CAAA;iBACb;aACR;iBAAM;gBACH,OAAO,SAAS,CAAC;aACpB;QAEL,CAAC,CAAA;IAML,CAAC;IAxGG,iBAAiB;QACb,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED,kBAAkB,CAAC,SAAS,EAAE,SAAS,EAAE,QAAQ;QAC7C,MAAM,EAAC,KAAK,EAAC,GAAC,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,EAAC,KAAK,EAAC,QAAQ,EAAC,GAAC,IAAI,CAAC,KAAK,CAAC;QAClC,IAAG,KAAK,IAAE,QAAQ,EAAC;YACf,IAAI,CAAC,QAAQ,EAAE,CAAC;SACnB;IACL,CAAC;IA0FD,MAAM;QACF,OAAO,0CAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAI,CAAC;IACvD,CAAC;CAEJ"}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { VEControlProps } from "../../tmpl/interface";
3
+ import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
4
+ interface DraftProps extends VEControlProps {
5
+ getHtml?: any;
6
+ }
7
+ interface DraftState {
8
+ editorState: boolean;
9
+ }
10
+ export default class Draft extends React.PureComponent<DraftProps, DraftState> {
11
+ state: {
12
+ editorState: any;
13
+ };
14
+ componentDidMount(): void;
15
+ onEditorStateChange: (editorState: any) => void;
16
+ editorChange: (value: any) => void;
17
+ toDraft: (value: any) => void;
18
+ changeValue: (value: any) => void;
19
+ render(): any;
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=draft.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/html-editor/draft.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAIpD,OAAO,kDAAkD,CAAA;AAMzD,UAAU,UAAW,SAAQ,cAAc;IACvC,OAAO,CAAC,EAAC,GAAG,CAAC;CAChB;AAED,UAAU,UAAU;IAChB,WAAW,EAAC,OAAO,CAAC;CACvB;AAED,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,KAAK,CAAC,aAAa,CAAC,UAAU,EAAE,UAAU,CAAC;IAE3E,KAAK;;MAEJ;IAEA,iBAAiB;IAOjB,mBAAmB,6BAMlB;IAED,YAAY,uBAKX;IAeD,OAAO,uBASN;IAwCA,WAAW,uBAEX;IAGD,MAAM;CA4CT"}
@@ -0,0 +1,122 @@
1
+ import * as React from 'react';
2
+ import { Card } from "antd";
3
+ // 核心
4
+ import { EditorState, ContentState } from 'draft-js';
5
+ import { Editor } from 'react-draft-wysiwyg';
6
+ import 'react-draft-wysiwyg/dist/react-draft-wysiwyg.css';
7
+ // draft 转换为 html
8
+ import draftToHtml from 'draftjs-to-html';
9
+ // html 转换为 draft
10
+ import htmlToDraft from 'html-to-draftjs';
11
+ export default class Draft extends React.PureComponent {
12
+ constructor() {
13
+ super(...arguments);
14
+ this.state = {
15
+ editorState: EditorState.createEmpty(),
16
+ };
17
+ this.onEditorStateChange = (editorState) => {
18
+ //this.toHtml(editorState)
19
+ this.setState({
20
+ editorState
21
+ });
22
+ };
23
+ this.editorChange = value => {
24
+ console.log('html:', draftToHtml(value));
25
+ if (this.props.onChange) {
26
+ this.props.onChange(draftToHtml(value));
27
+ }
28
+ };
29
+ // // 转换为 html
30
+ // toHtml = value => {
31
+ // let templateContent = draftToHtml(convertToRaw(value.getCurrentContent()))
32
+ //
33
+ // if (this.props.getHtml) {
34
+ // // 输出已经编辑好的html
35
+ // this.props.getHtml(templateContent)
36
+ // }
37
+ //
38
+ // }
39
+ // 转换为 Draft
40
+ this.toDraft = value => {
41
+ const blocksFromHtml = htmlToDraft(value);
42
+ const { contentBlocks, entityMap } = blocksFromHtml;
43
+ const contentState = ContentState.createFromBlockArray(contentBlocks, entityMap);
44
+ const editorState = EditorState.createWithContent(contentState);
45
+ console.log("editorState:", editorState);
46
+ this.setState({
47
+ editorState
48
+ });
49
+ };
50
+ // imgFileupOnChange = (files) => {
51
+ // // 返回值 files 就是上传的文件,控件会默认 Promise 返回,否则无法抓到返回的已上传图片链接
52
+ // return new Promise(
53
+ // (resolve, rejects) => {
54
+ // // 使用 form 表单的形式进行配置,具体参数根据接口来
55
+ // let formData = new FormData()
56
+ //
57
+ // formData.append('File', files)
58
+ // formData.append('FileType', 'Thumbnail')
59
+ // formData.append('IsLogin', true)
60
+ // formData.append('Description', '')
61
+ //
62
+ // new Ajax({
63
+ // // 这里是配置自己的图片上传链接
64
+ // url: `/api/file/upload`,
65
+ // method: 'post',
66
+ // headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
67
+ // data: formData
68
+ //
69
+ // })
70
+ // .start()
71
+ // .then(res => (res = res.data))
72
+ // .then(res => {
73
+ // if (res.Status === 0) {
74
+ //
75
+ // // Message.success('上传成功!')
76
+ // resolve({ data: { link: res.Result } })
77
+ // } else {
78
+ // // Message.fail('上传失败!')
79
+ //
80
+ // }
81
+ // })
82
+ // }
83
+ // )
84
+ //
85
+ //
86
+ // }
87
+ this.changeValue = (value) => {
88
+ };
89
+ }
90
+ componentDidMount() {
91
+ // 如果从后台读取接口存储的有值,读取过来转换为富文本格式默认显示
92
+ if (this.props.value) {
93
+ this.toDraft(this.props.value);
94
+ }
95
+ }
96
+ render() {
97
+ const { viewOrEdit, disabled } = this.props;
98
+ const { editorState } = this.state;
99
+ let entryControl = undefined;
100
+ const setToolbar = {
101
+ options: ['inline', 'blockType', 'fontSize', 'fontFamily', 'list', 'textAlign', 'colorPicker', 'remove', 'history'],
102
+ colorPicker: {
103
+ // 图标可以自定义,如果使用默认就注释掉
104
+ // icon: 'https://-------',
105
+ className: undefined,
106
+ component: undefined,
107
+ popupClassName: undefined,
108
+ // 图片选项卡自定义
109
+ colors: ['rgb(97,189,109)', 'rgb(26,188,156)', 'rgb(84,172,210)', 'rgb(44,130,201)',
110
+ 'rgb(147,101,184)', 'rgb(71,85,119)', 'rgb(204,204,204)', 'rgb(65,168,95)', 'rgb(0,168,133)',
111
+ 'rgb(61,142,185)', 'rgb(41,105,176)', 'rgb(85,57,130)', 'rgb(40,50,78)', 'rgb(0,0,0)',
112
+ 'rgb(247,218,100)', 'rgb(251,160,38)', 'rgb(235,107,86)', 'rgb(226,80,65)', 'rgb(163,143,132)',
113
+ 'rgb(239,239,239)', 'rgb(255,255,255)', 'rgb(250,197,28)', 'rgb(243,121,52)', 'rgb(209,72,65)',
114
+ 'rgb(184,49,47)', 'rgb(124,112,107)', 'rgb(209,213,216)', 'rgb(0,0,0)'],
115
+ },
116
+ };
117
+ entryControl = React.createElement(Card, { style: { width: '100%' }, bodyStyle: { padding: '2px', minHeight: '280px' } },
118
+ React.createElement(Editor, { readOnly: disabled, toolbarHidden: viewOrEdit == 'view' ? true : false, editorState: editorState, wrapperClassName: "contract-template-add-wrapper", editorClassName: "contract-template-editor", onEditorStateChange: this.onEditorStateChange, onChange: this.editorChange, toolbar: setToolbar }));
119
+ return entryControl;
120
+ }
121
+ }
122
+ //# sourceMappingURL=draft.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"draft.js","sourceRoot":"","sources":["../../../../src/components/controls/html-editor/draft.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAC,IAAI,EAAC,MAAM,MAAM,CAAC;AAE1B,KAAK;AACL,OAAO,EAAE,WAAW,EAA+B,YAAY,EAAE,MA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2BAA2B;gBAC3B,SAAS,EAAE,SAAS;gBACpB,SAAS,EAAE,SAAS;gBACpB,cAAc,EAAE,SAAS;gBACzB,WAAW;gBACX,MAAM,EAAE,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB;oBAC/E,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,gBAAgB;oBAC5F,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY;oBACrF,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,kBAAkB;oBAC9F,kBAAkB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,gBAAgB;oBAC9F,gBAAgB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC;aAC9E;SACJ,CAAA;QAED,YAAY,GAAE,oBAAC,IAAI,IAAC,KAAK,EAAE,EAAC,KAAK,EAAC,MAAM,EAAC,EAAE,SAAS,EAAE,EAAC,OAAO,EAAC,KAAK,EAAC,SAAS,EAAC,OAAO,EAAC;YACnF,oBAAC,MAAM,IACH,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,UAAU,IAAE,MAAM,CAAA,CAAC,CAAC,IAAI,CAAA,CAAC,CAAC,KAAK,EAC9C,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAC,+BAA+B,EAChD,eAAe,EAAC,0BAA0B,EAC1C,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAC7C,QAAQ,EAAE,IAAI,CAAC,YAAY,EAC3B,OAAO,EAAE,UAAU,GACrB,CACC,CAAA;QAIP,OAAO,YAAY,CAAC;IAExB,CAAC;CACJ"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { EControlProps } from "../../tmpl/interface";
3
+ interface InputNumberProps extends EControlProps {
4
+ }
5
+ declare const InputNumber: React.FC<InputNumberProps>;
6
+ export default InputNumber;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/input-number/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAGnD,UAAU,gBAAiB,SAAQ,aAAa;CAE/C;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAyF3C,CAAA;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,67 @@
1
+ import React from 'react';
2
+ import { InputNumber as AntdInputNumber, Space } from "antd";
3
+ import Units from "../../units";
4
+ const InputNumber = (props) => {
5
+ const { id, value, itemType, fieldConfig, onChange, style } = props;
6
+ let entryControl = undefined;
7
+ const changeValue = (value) => {
8
+ if (onChange) {
9
+ onChange(value);
10
+ }
11
+ };
12
+ let valObj = Units.splitValue(value);
13
+ let valueBegin = valObj['valueBegin'], valueEnd = valObj['valueEnd'];
14
+ let valueSingle = value || value == 0 ? value : null;
15
+ const changeBeginValue = (value) => {
16
+ if (onChange) {
17
+ onChange(Units.concatValue(value, valueEnd));
18
+ }
19
+ };
20
+ const changeEndValue = (value) => {
21
+ if (onChange) {
22
+ onChange(Units.concatValue(valueBegin, value));
23
+ }
24
+ };
25
+ const changeInt = (e) => {
26
+ if ((e.target.value || e.target.value == 0) && !isNaN(e.target.value)) {
27
+ e.target.value = parseInt(e.target.value);
28
+ }
29
+ else {
30
+ e.target.value = null;
31
+ }
32
+ };
33
+ let placeholder = !fieldConfig.disabled ? `请输入${fieldConfig.title}` : "无需输入";
34
+ let disabled = fieldConfig.disabled;
35
+ let antdControlProps = {
36
+ id, placeholder, disabled, value
37
+ };
38
+ switch (itemType) {
39
+ case 'int':
40
+ entryControl = React.createElement(AntdInputNumber, Object.assign({ style: Object.assign({}, style), min: fieldConfig.min, max: fieldConfig.max }, antdControlProps, { value: valueSingle, onKeyUp: changeInt, onChange: changeValue }));
41
+ break;
42
+ case 'decimal':
43
+ case 'float':
44
+ case 'double':
45
+ entryControl = React.createElement(AntdInputNumber, Object.assign({ style: Object.assign({}, style) }, antdControlProps, { value: valueSingle, min: fieldConfig.min, max: fieldConfig.max,
46
+ // style={{width}}
47
+ step: 0.1, onChange: changeValue }));
48
+ break;
49
+ case 'intrange':
50
+ entryControl =
51
+ React.createElement(Space, null,
52
+ React.createElement(AntdInputNumber, { min: fieldConfig.min, max: fieldConfig.max, placeholder: `开始`, value: valueBegin, onKeyUp: changeInt, onChange: changeBeginValue }),
53
+ "~",
54
+ React.createElement(AntdInputNumber, { min: fieldConfig.min, max: fieldConfig.max, placeholder: `结束`, value: valueEnd, onKeyUp: changeInt, onChange: changeEndValue }));
55
+ break;
56
+ case 'decimalrange':
57
+ entryControl =
58
+ React.createElement(Space, null,
59
+ React.createElement(AntdInputNumber, { min: fieldConfig.min, max: fieldConfig.max, placeholder: `开始`, value: valueBegin, onChange: changeBeginValue, step: 0.1, disabled: disabled }),
60
+ "~",
61
+ React.createElement(AntdInputNumber, { min: fieldConfig.min, max: fieldConfig.max, placeholder: `结束`, value: valueEnd, step: 0.1, onChange: changeEndValue, disabled: disabled }));
62
+ break;
63
+ }
64
+ return entryControl;
65
+ };
66
+ export default InputNumber;
67
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/input-number/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,WAAW,IAAI,eAAe,EAAC,KAAK,EAAC,MAAM,MAAM,CAAC;AAE1D,OAAO,KAAK,MAAM,aAAa,CAAC;AAMhC,MAAM,WAAW,GAA+B,CAAC,KAAK,EAAE,EAAE;IAEtD,MAAM,EAAC,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAC,KAAK,EAAC,GAAG,KAAK,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,EAClC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,cAAc,GAC3D,CACc,CAAC;YACjB,MAAM;QACV,KAAK,cAAc;YACf,YAAY;gBACR,oBAAC,KAAK;oBACF,oBAAC,eAAe,IAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,EAC1C,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EACnC,QAAQ,EAAE,gBAAgB,EAAE,IAAI,EAAE,GAAG,EACtC,QAAQ,EAAE,QAAQ,GACjC;;oBACF,oBAAC,eAAe,IAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,GAAG,EAC1C,WAAW,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,EAC5C,QAAQ,EAAE,cAAc,EAAG,QAAQ,EAAE,QAAQ,GAC7D,CACE,CAAC;YACb,MAAM;KACb;IACD,OAAO,YAAY,CAAC;AACxB,CAAC,CAAA;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { EControlProps } from "../../tmpl/interface";
3
+ interface InputRangeProps extends EControlProps {
4
+ }
5
+ declare const InputRange: React.FC<InputRangeProps>;
6
+ export default InputRange;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/input-range/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAGnD,UAAU,eAAgB,SAAQ,aAAa;CAE9C;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoCzC,CAAA;AAED,eAAe,UAAU,CAAC"}
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ import { Input } from "antd";
3
+ import Units from '../../units/';
4
+ const InputRange = (props) => {
5
+ const { id, value, itemType, fieldConfig, onChange, style } = props;
6
+ let entryControl = undefined;
7
+ let valObj = Units.splitValue(value);
8
+ let valueBegin = valObj['valueBegin'], valueEnd = valObj['valueEnd'];
9
+ const changeBeginValue = ({ target: { value } }) => {
10
+ if (onChange) {
11
+ onChange(Units.concatValue(value, valueEnd));
12
+ }
13
+ };
14
+ const changeEndValue = ({ target: { value } }) => {
15
+ if (onChange) {
16
+ onChange(Units.concatValue(valueBegin, value));
17
+ }
18
+ };
19
+ let disabled = fieldConfig.disabled;
20
+ entryControl =
21
+ React.createElement(Input.Group, { compact: true },
22
+ React.createElement(Input, { id: id, style: { width: '45%' }, disabled: disabled, min: fieldConfig.min, max: fieldConfig.max, placeholder: `开始`, value: valueBegin, onChange: changeBeginValue }),
23
+ "~",
24
+ React.createElement(Input, { style: { width: '45%' }, disabled: disabled, min: fieldConfig.min, max: fieldConfig.max, placeholder: `结束`, value: valueEnd, onChange: changeEndValue }));
25
+ return entryControl;
26
+ };
27
+ export default InputRange;
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/input-range/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,KAAK,EAAC,MAAM,MAAM,CAAC;AAE3B,OAAO,KAAK,MAAM,cAAc,CAAA;AAMhC,MAAM,UAAU,GAA8B,CAAC,KAAK,EAAE,EAAE;IAEpD,MAAM,EAAC,EAAE,EAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAC,GAAG,KAAK,CAAC;IAEjE,IAAI,YAAY,GAAG,SAAS,CAAC;IAG7B,IAAI,MAAM,GAAC,KAAK,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,UAAU,GAAC,MAAM,CAAC,YAAY,CAAC,EAAE,QAAQ,GAAC,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@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { VEControlProps } from "../../tmpl/interface";
3
+ interface ProgressProps extends VEControlProps {
4
+ }
5
+ declare const Progress: React.FC<ProgressProps>;
6
+ export default Progress;
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/controls/progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAe,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAGlE,UAAU,aAAc,SAAQ,cAAc;CAE7C;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAiDrC,CAAA;AAED,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { InputNumber as AntdInputNumber, Progress as AntdProgress } from "antd";
3
+ const Progress = (props) => {
4
+ const { value, itemType, fieldConfig, onChange, style, viewOrEdit } = props;
5
+ let val = 0;
6
+ if (!value) {
7
+ val = 0;
8
+ }
9
+ else {
10
+ if (isNaN(value)) {
11
+ val = value;
12
+ }
13
+ else {
14
+ val = value.toString();
15
+ }
16
+ }
17
+ const changeValue = (value) => {
18
+ if (onChange) {
19
+ onChange(value);
20
+ }
21
+ };
22
+ const changeInt = (e) => {
23
+ if (e.target.value && !isNaN(e.target.value)) {
24
+ e.target.value = parseInt(e.target.value);
25
+ }
26
+ else {
27
+ e.target.value = 0;
28
+ }
29
+ };
30
+ let placeholder = !fieldConfig.disabled ? `请输入${fieldConfig.title}` : "无需输入";
31
+ let disabled = fieldConfig.disabled;
32
+ let antdControlProps = {
33
+ placeholder, disabled, value
34
+ };
35
+ let entryControl;
36
+ if (viewOrEdit == 'view' || fieldConfig.disabled) {
37
+ entryControl = React.createElement(AntdProgress, { width: 90, percent: val });
38
+ }
39
+ else {
40
+ entryControl = React.createElement(AntdInputNumber, Object.assign({ style: Object.assign({}, style), min: 0, max: 100 }, antdControlProps, { onKeyUp: changeInt, onChange: changeValue }));
41
+ }
42
+ return entryControl;
43
+ };
44
+ export default Progress;
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/controls/progress/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,WAAW,IAAI,eAAe,EAAC,QAAQ,IAAI,YAAY,EAAO,MAAM,MAAM,CAAC;AAQnF,MAAM,QAAQ,GAA4B,CAAC,KAAK,EAAE,EAAE;IAEhD,MAAM,EAAC,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAC,KAAK,EAAC,UAAU,EAAC,GAAG,KAAK,CAAC;IAExE,IAAI,GAAG,GAAC,CAAC,CAAC;IAEV,IAAI,CAAC,KAAK,EAAG;QACT,GAAG,GAAC,CAAC,CAAC;KACT;SAAI;QACD,IAAG,KAAK,CAAC,KAAK,CAAC,EAAC;YACb,GAAG,GAAE,KAAK,CAAC;SACb;aAAK;YACF,GAAG,GAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;SACxB;KACJ;IAED,MAAM,WAAW,GAAG,CAAC,KAAK,EAAE,EAAE;QAC1B,IAAI,QAAQ,EAAE;YACV,QAAQ,CAAC,KAAK,CAAC,CAAC;SACnB;IACL,CAAC,CAAA;IAED,MAAM,SAAS,GAAG,CAAC,CAAC,EAAE,EAAE;QAChB,IAAI,CAAC,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE;YAC1C,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;SAC5C;aAAM;YACH,CAAC,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAA;SACrB;IACL,CAAC,CACJ;IAED,IAAI,W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