aldehyde 0.0.3 → 0.0.6

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 (501) hide show
  1. package/package.json +6 -6
  2. package/src/components/chart/antd/Chart.js +32 -0
  3. package/src/components/chart/antd/Chart10000.js +90 -0
  4. package/src/components/chart/antd/Max2DimLineChart.js +128 -0
  5. package/src/components/chart/antd/PieChart1.js +54 -0
  6. package/src/components/chart/antd/PieChart2.js +56 -0
  7. package/src/components/chart/antd/chart-utils.tsx +50 -0
  8. package/src/components/chart/antd/column-chart-sub.tsx +67 -0
  9. package/src/components/chart/antd/line-chart-sub.tsx +65 -0
  10. package/src/components/chart/antd/pie-chart-sub.tsx +54 -0
  11. package/src/components/chart/antd/statview-d2-chart.tsx +125 -0
  12. package/src/components/chart/statview-l2-chart.tsx +69 -0
  13. package/src/components/controls/action/index.css +9 -0
  14. package/src/components/controls/action/index.tsx +228 -0
  15. package/{lib/src/components/controls/action/utils.js → src/components/controls/action/utils.tsx} +53 -41
  16. package/src/components/controls/auto-complete/index.tsx +80 -0
  17. package/src/components/controls/cascader/index.js +97 -0
  18. package/src/components/controls/chemstruc/graph.tsx +150 -0
  19. package/src/components/controls/chemstruc/index.css +28 -0
  20. package/src/components/controls/collapse-card/index.css +9 -0
  21. package/src/components/controls/collapse-card/index.tsx +59 -0
  22. package/src/components/controls/color-picker/index.css +27 -0
  23. package/src/components/controls/color-picker/index.tsx +88 -0
  24. package/src/components/controls/cquery/cquick-button.tsx +117 -0
  25. package/src/components/controls/date-picker/index.tsx +141 -0
  26. package/src/components/controls/entity-select/entity-select.tsx +277 -0
  27. package/src/components/controls/entity-select/index.css +6 -0
  28. package/src/components/controls/entity-select/popover-entity-select.tsx +112 -0
  29. package/src/components/controls/entry-control.tsx +240 -0
  30. package/src/components/controls/enum-badge/index.tsx +28 -0
  31. package/src/components/controls/enum-tag/index.tsx +30 -0
  32. package/src/components/controls/file-view/drawer-file-view.tsx +69 -0
  33. package/src/components/controls/file-view/index.tsx +145 -0
  34. package/src/components/controls/html-editor/draft.tsx +161 -0
  35. package/src/components/controls/html-editor/tinymce.js +55 -0
  36. package/src/components/controls/input-number/index.tsx +101 -0
  37. package/src/components/controls/input-range/index.tsx +48 -0
  38. package/src/components/controls/password-setter/index.css +3 -0
  39. package/src/components/controls/password-setter/index.js +70 -0
  40. package/src/components/controls/progress/index.tsx +61 -0
  41. package/src/components/controls/relation-existion/index.css +4 -0
  42. package/src/components/controls/relation-existion/index.tsx +108 -0
  43. package/src/components/controls/rfield/index.css +4 -0
  44. package/src/components/controls/rfield/index.tsx +161 -0
  45. package/src/components/controls/signature/index.tsx +162 -0
  46. package/src/components/controls/steps/index.tsx +58 -0
  47. package/src/components/controls/text/ellipsis-text.tsx +70 -0
  48. package/src/components/controls/upload/index.tsx +122 -0
  49. package/src/components/controls/view-control.tsx +177 -0
  50. package/src/components/detail/button/cquery-button-bar.tsx +112 -0
  51. package/src/components/detail/button/index.css +43 -0
  52. package/src/components/detail/button/submit-button-bar.tsx +151 -0
  53. package/src/components/detail/dtmpl.css +53 -0
  54. package/src/components/detail/edit/dtmpl-edit.tsx +218 -0
  55. package/src/components/detail/edit/fields-edit-card.tsx +103 -0
  56. package/src/components/detail/edit/modal-dtmpl-edit.tsx +198 -0
  57. package/src/components/detail/edit/modal-row-edit.tsx +72 -0
  58. package/src/components/detail/edit/post-result/index.tsx +52 -0
  59. package/src/components/detail/edit/row-edit-card.tsx +125 -0
  60. package/src/components/detail/edit/row-editor.tsx +71 -0
  61. package/src/components/detail/rightbar/index.css +35 -0
  62. package/src/components/detail/rightbar/index.tsx +76 -0
  63. package/src/components/detail/view/act-dtmpl-view.tsx +155 -0
  64. package/src/components/detail/view/dtmpl-view.tsx +143 -0
  65. package/src/components/detail/view/field-view-group.tsx +73 -0
  66. package/src/components/detail/view/modal-dtmpl-view.tsx +56 -0
  67. package/src/components/detail/view/snapshot-timeline.tsx +130 -0
  68. package/src/components/exportor/export-frame.css +3 -0
  69. package/src/components/exportor/export-frame.tsx +194 -0
  70. package/src/components/exportor/index.tsx +60 -0
  71. package/src/components/form/criteria-form.tsx +241 -0
  72. package/src/components/form/dtmpl-form.css +4 -0
  73. package/src/components/form/dtmpl-form.tsx +272 -0
  74. package/src/components/form/field-group-form.tsx +75 -0
  75. package/src/components/form/fields-form.tsx +51 -0
  76. package/src/components/form/form-Item-group.tsx +99 -0
  77. package/src/components/form/index.css +13 -0
  78. package/src/components/import/excel-import.tsx +316 -0
  79. package/src/components/import/index.css +54 -0
  80. package/src/components/import/template-builder.js +474 -0
  81. package/src/components/import/template.css +51 -0
  82. package/src/components/layout/MainPage.tsx +230 -0
  83. package/src/components/layout/footer/index.css +6 -0
  84. package/src/components/layout/footer/index.js +17 -0
  85. package/src/components/layout/header/index.css +86 -0
  86. package/src/components/layout/header/index.tsx +58 -0
  87. package/src/components/layout/menu/block.tsx +88 -0
  88. package/src/components/layout/menu/l2menu-message-bar.tsx +118 -0
  89. package/src/components/layout/menu/l2menu-quick-bar.tsx +132 -0
  90. package/src/components/layout/menu/menu-2layers.tsx +92 -0
  91. package/src/components/layout/menu/menu-render.tsx +49 -0
  92. package/src/components/layout/menu/reset-password.tsx +185 -0
  93. package/src/components/layout/menu/user-bar.tsx +97 -0
  94. package/src/components/layout/menu/userinfo-bar.tsx +70 -0
  95. package/src/components/layout/sidebar/index.css +26 -0
  96. package/src/components/layout/sidebar/index.tsx +38 -0
  97. package/src/components/login.js +137 -0
  98. package/src/components/module/dtmpl-page.tsx +70 -0
  99. package/src/components/module/ltmpl-page.tsx +181 -0
  100. package/src/components/routable/dtmpl-route.tsx +96 -0
  101. package/src/components/routable/import-route.tsx +28 -0
  102. package/src/components/routable/ltmpl-route.tsx +158 -0
  103. package/src/components/table/act-table.tsx +635 -0
  104. package/src/components/table/column/column-selector.tsx +79 -0
  105. package/src/components/table/column/index.css +14 -0
  106. package/src/components/table/index.css +45 -0
  107. package/src/components/table/l2-act-table.tsx +85 -0
  108. package/src/components/table/modal-select-table.tsx +248 -0
  109. package/src/components/table/pagination.css +15 -0
  110. package/src/components/table/pagination.tsx +72 -0
  111. package/src/components/table/query-table.tsx +331 -0
  112. package/src/components/table/relation-table.tsx +600 -0
  113. package/src/components/table/select-table.tsx +247 -0
  114. package/src/components/table/selected-rows-card.tsx +62 -0
  115. package/src/components/table/stat/restat.tsx +79 -0
  116. package/{lib/src/components/table/table-util.js → src/components/table/table-util.tsx} +15 -12
  117. package/{lib/src/components/tmpl/control-type-supportor.js → src/components/tmpl/control-type-supportor.tsx} +30 -18
  118. package/src/components/tmpl/hc-data-source.tsx +230 -0
  119. package/src/components/tmpl/hcservice-v3.tsx +624 -0
  120. package/{lib/src/components/tmpl/interface.d.ts → src/components/tmpl/interface.tsx} +147 -73
  121. package/src/components/tmpl/superagent.js +93 -0
  122. package/src/components/tmpl/tmpl-config-analysis.tsx +111 -0
  123. package/src/components/units/EncryptUtils.js +38 -0
  124. package/src/components/units/image.d.ts +8 -0
  125. package/{lib/src/components/units/index.js → src/components/units/index.tsx} +150 -149
  126. package/{dist/images/logo-06f6a5d8.png → src/components/units/logo.png} +0 -0
  127. package/src/components/units/storage.js +3 -0
  128. package/src/components/welcome/HCWelcome.js +232 -0
  129. package/src/components/welcome/index.css +13 -0
  130. package/src/components/welcome/logo.png +0 -0
  131. package/src/components/welcome/quick-entrance.tsx +77 -0
  132. package/src/components/welcome/workbench.tsx +76 -0
  133. package/src/index.tsx +5 -0
  134. package/src/style/common.css +79 -0
  135. package/src/style/coverstyle.css +49 -0
  136. package/src/style/transstyle.css +24 -0
  137. package/dist/aldehyde.js +0 -1
  138. package/dist/chemstruc-graph.js +0 -1
  139. package/dist/html-editor-draft.js +0 -1
  140. package/dist/index.html +0 -4
  141. package/dist/signature.js +0 -1
  142. package/lib/public/programConfig.json +0 -10
  143. package/lib/src/components/chart/antd/chart-utils.d.ts +0 -7
  144. package/lib/src/components/chart/antd/chart-utils.d.ts.map +0 -1
  145. package/lib/src/components/chart/antd/chart-utils.js +0 -46
  146. package/lib/src/components/chart/antd/chart-utils.js.map +0 -1
  147. package/lib/src/components/chart/antd/column-chart-sub.d.ts +0 -7
  148. package/lib/src/components/chart/antd/column-chart-sub.d.ts.map +0 -1
  149. package/lib/src/components/chart/antd/column-chart-sub.js +0 -50
  150. package/lib/src/components/chart/antd/column-chart-sub.js.map +0 -1
  151. package/lib/src/components/chart/antd/line-chart-sub.d.ts +0 -7
  152. package/lib/src/components/chart/antd/line-chart-sub.d.ts.map +0 -1
  153. package/lib/src/components/chart/antd/line-chart-sub.js +0 -49
  154. package/lib/src/components/chart/antd/line-chart-sub.js.map +0 -1
  155. package/lib/src/components/chart/antd/pie-chart-sub.d.ts +0 -7
  156. package/lib/src/components/chart/antd/pie-chart-sub.d.ts.map +0 -1
  157. package/lib/src/components/chart/antd/pie-chart-sub.js +0 -37
  158. package/lib/src/components/chart/antd/pie-chart-sub.js.map +0 -1
  159. package/lib/src/components/chart/antd/statview-d2-chart.d.ts +0 -17
  160. package/lib/src/components/chart/antd/statview-d2-chart.d.ts.map +0 -1
  161. package/lib/src/components/chart/antd/statview-d2-chart.js +0 -108
  162. package/lib/src/components/chart/antd/statview-d2-chart.js.map +0 -1
  163. package/lib/src/components/chart/statview-l2-chart.d.ts +0 -23
  164. package/lib/src/components/chart/statview-l2-chart.d.ts.map +0 -1
  165. package/lib/src/components/chart/statview-l2-chart.js +0 -64
  166. package/lib/src/components/chart/statview-l2-chart.js.map +0 -1
  167. package/lib/src/components/controls/action/index.d.ts +0 -47
  168. package/lib/src/components/controls/action/index.d.ts.map +0 -1
  169. package/lib/src/components/controls/action/index.js +0 -165
  170. package/lib/src/components/controls/action/index.js.map +0 -1
  171. package/lib/src/components/controls/action/utils.d.ts +0 -9
  172. package/lib/src/components/controls/action/utils.d.ts.map +0 -1
  173. package/lib/src/components/controls/action/utils.js.map +0 -1
  174. package/lib/src/components/controls/auto-complete/index.d.ts +0 -7
  175. package/lib/src/components/controls/auto-complete/index.d.ts.map +0 -1
  176. package/lib/src/components/controls/auto-complete/index.js +0 -53
  177. package/lib/src/components/controls/auto-complete/index.js.map +0 -1
  178. package/lib/src/components/controls/chemstruc/graph.d.ts +0 -31
  179. package/lib/src/components/controls/chemstruc/graph.d.ts.map +0 -1
  180. package/lib/src/components/controls/chemstruc/graph.js +0 -121
  181. package/lib/src/components/controls/chemstruc/graph.js.map +0 -1
  182. package/lib/src/components/controls/collapse-card/index.d.ts +0 -20
  183. package/lib/src/components/controls/collapse-card/index.d.ts.map +0 -1
  184. package/lib/src/components/controls/collapse-card/index.js +0 -63
  185. package/lib/src/components/controls/collapse-card/index.js.map +0 -1
  186. package/lib/src/components/controls/color-picker/index.d.ts +0 -19
  187. package/lib/src/components/controls/color-picker/index.d.ts.map +0 -1
  188. package/lib/src/components/controls/color-picker/index.js +0 -61
  189. package/lib/src/components/controls/color-picker/index.js.map +0 -1
  190. package/lib/src/components/controls/cquery/cquick-button.d.ts +0 -20
  191. package/lib/src/components/controls/cquery/cquick-button.d.ts.map +0 -1
  192. package/lib/src/components/controls/cquery/cquick-button.js +0 -67
  193. package/lib/src/components/controls/cquery/cquick-button.js.map +0 -1
  194. package/lib/src/components/controls/date-picker/index.d.ts +0 -7
  195. package/lib/src/components/controls/date-picker/index.d.ts.map +0 -1
  196. package/lib/src/components/controls/date-picker/index.js +0 -91
  197. package/lib/src/components/controls/date-picker/index.js.map +0 -1
  198. package/lib/src/components/controls/entity-select/entity-select.d.ts +0 -53
  199. package/lib/src/components/controls/entity-select/entity-select.d.ts.map +0 -1
  200. package/lib/src/components/controls/entity-select/entity-select.js +0 -227
  201. package/lib/src/components/controls/entity-select/entity-select.js.map +0 -1
  202. package/lib/src/components/controls/entity-select/popover-entity-select.d.ts +0 -20
  203. package/lib/src/components/controls/entity-select/popover-entity-select.d.ts.map +0 -1
  204. package/lib/src/components/controls/entity-select/popover-entity-select.js +0 -80
  205. package/lib/src/components/controls/entity-select/popover-entity-select.js.map +0 -1
  206. package/lib/src/components/controls/entry-control.d.ts +0 -11
  207. package/lib/src/components/controls/entry-control.d.ts.map +0 -1
  208. package/lib/src/components/controls/entry-control.js +0 -171
  209. package/lib/src/components/controls/entry-control.js.map +0 -1
  210. package/lib/src/components/controls/enum-badge/index.d.ts +0 -7
  211. package/lib/src/components/controls/enum-badge/index.d.ts.map +0 -1
  212. package/lib/src/components/controls/enum-badge/index.js +0 -14
  213. package/lib/src/components/controls/enum-badge/index.js.map +0 -1
  214. package/lib/src/components/controls/enum-tag/index.d.ts +0 -7
  215. package/lib/src/components/controls/enum-tag/index.d.ts.map +0 -1
  216. package/lib/src/components/controls/enum-tag/index.js +0 -18
  217. package/lib/src/components/controls/enum-tag/index.js.map +0 -1
  218. package/lib/src/components/controls/file-view/drawer-file-view.d.ts +0 -18
  219. package/lib/src/components/controls/file-view/drawer-file-view.d.ts.map +0 -1
  220. package/lib/src/components/controls/file-view/drawer-file-view.js +0 -51
  221. package/lib/src/components/controls/file-view/drawer-file-view.js.map +0 -1
  222. package/lib/src/components/controls/file-view/index.d.ts +0 -23
  223. package/lib/src/components/controls/file-view/index.d.ts.map +0 -1
  224. package/lib/src/components/controls/file-view/index.js +0 -130
  225. package/lib/src/components/controls/file-view/index.js.map +0 -1
  226. package/lib/src/components/controls/html-editor/draft.d.ts +0 -22
  227. package/lib/src/components/controls/html-editor/draft.d.ts.map +0 -1
  228. package/lib/src/components/controls/html-editor/draft.js +0 -122
  229. package/lib/src/components/controls/html-editor/draft.js.map +0 -1
  230. package/lib/src/components/controls/input-number/index.d.ts +0 -7
  231. package/lib/src/components/controls/input-number/index.d.ts.map +0 -1
  232. package/lib/src/components/controls/input-number/index.js +0 -67
  233. package/lib/src/components/controls/input-number/index.js.map +0 -1
  234. package/lib/src/components/controls/input-range/index.d.ts +0 -7
  235. package/lib/src/components/controls/input-range/index.d.ts.map +0 -1
  236. package/lib/src/components/controls/input-range/index.js +0 -28
  237. package/lib/src/components/controls/input-range/index.js.map +0 -1
  238. package/lib/src/components/controls/progress/index.d.ts +0 -7
  239. package/lib/src/components/controls/progress/index.d.ts.map +0 -1
  240. package/lib/src/components/controls/progress/index.js +0 -45
  241. package/lib/src/components/controls/progress/index.js.map +0 -1
  242. package/lib/src/components/controls/relation-existion/index.d.ts +0 -20
  243. package/lib/src/components/controls/relation-existion/index.d.ts.map +0 -1
  244. package/lib/src/components/controls/relation-existion/index.js +0 -75
  245. package/lib/src/components/controls/relation-existion/index.js.map +0 -1
  246. package/lib/src/components/controls/rfield/index.d.ts +0 -29
  247. package/lib/src/components/controls/rfield/index.d.ts.map +0 -1
  248. package/lib/src/components/controls/rfield/index.js +0 -130
  249. package/lib/src/components/controls/rfield/index.js.map +0 -1
  250. package/lib/src/components/controls/signature/index.d.ts +0 -31
  251. package/lib/src/components/controls/signature/index.d.ts.map +0 -1
  252. package/lib/src/components/controls/signature/index.js +0 -129
  253. package/lib/src/components/controls/signature/index.js.map +0 -1
  254. package/lib/src/components/controls/steps/index.d.ts +0 -7
  255. package/lib/src/components/controls/steps/index.d.ts.map +0 -1
  256. package/lib/src/components/controls/steps/index.js +0 -42
  257. package/lib/src/components/controls/steps/index.js.map +0 -1
  258. package/lib/src/components/controls/text/ellipsis-text.d.ts +0 -22
  259. package/lib/src/components/controls/text/ellipsis-text.d.ts.map +0 -1
  260. package/lib/src/components/controls/text/ellipsis-text.js +0 -46
  261. package/lib/src/components/controls/text/ellipsis-text.js.map +0 -1
  262. package/lib/src/components/controls/upload/index.d.ts +0 -15
  263. package/lib/src/components/controls/upload/index.d.ts.map +0 -1
  264. package/lib/src/components/controls/upload/index.js +0 -100
  265. package/lib/src/components/controls/upload/index.js.map +0 -1
  266. package/lib/src/components/controls/view-control.d.ts +0 -10
  267. package/lib/src/components/controls/view-control.d.ts.map +0 -1
  268. package/lib/src/components/controls/view-control.js +0 -150
  269. package/lib/src/components/controls/view-control.js.map +0 -1
  270. package/lib/src/components/detail/button/cquery-button-bar.d.ts +0 -16
  271. package/lib/src/components/detail/button/cquery-button-bar.d.ts.map +0 -1
  272. package/lib/src/components/detail/button/cquery-button-bar.js +0 -75
  273. package/lib/src/components/detail/button/cquery-button-bar.js.map +0 -1
  274. package/lib/src/components/detail/button/submit-button-bar.d.ts +0 -19
  275. package/lib/src/components/detail/button/submit-button-bar.d.ts.map +0 -1
  276. package/lib/src/components/detail/button/submit-button-bar.js +0 -99
  277. package/lib/src/components/detail/button/submit-button-bar.js.map +0 -1
  278. package/lib/src/components/detail/edit/dtmpl-edit.d.ts +0 -48
  279. package/lib/src/components/detail/edit/dtmpl-edit.d.ts.map +0 -1
  280. package/lib/src/components/detail/edit/dtmpl-edit.js +0 -190
  281. package/lib/src/components/detail/edit/dtmpl-edit.js.map +0 -1
  282. package/lib/src/components/detail/edit/fields-edit-card.d.ts +0 -39
  283. package/lib/src/components/detail/edit/fields-edit-card.d.ts.map +0 -1
  284. package/lib/src/components/detail/edit/fields-edit-card.js +0 -64
  285. package/lib/src/components/detail/edit/fields-edit-card.js.map +0 -1
  286. package/lib/src/components/detail/edit/modal-dtmpl-edit.d.ts +0 -51
  287. package/lib/src/components/detail/edit/modal-dtmpl-edit.d.ts.map +0 -1
  288. package/lib/src/components/detail/edit/modal-dtmpl-edit.js +0 -168
  289. package/lib/src/components/detail/edit/modal-dtmpl-edit.js.map +0 -1
  290. package/lib/src/components/detail/edit/modal-row-edit.d.ts +0 -31
  291. package/lib/src/components/detail/edit/modal-row-edit.d.ts.map +0 -1
  292. package/lib/src/components/detail/edit/modal-row-edit.js +0 -56
  293. package/lib/src/components/detail/edit/modal-row-edit.js.map +0 -1
  294. package/lib/src/components/detail/edit/post-result/index.d.ts +0 -17
  295. package/lib/src/components/detail/edit/post-result/index.d.ts.map +0 -1
  296. package/lib/src/components/detail/edit/post-result/index.js +0 -28
  297. package/lib/src/components/detail/edit/post-result/index.js.map +0 -1
  298. package/lib/src/components/detail/edit/row-edit-card.d.ts +0 -42
  299. package/lib/src/components/detail/edit/row-edit-card.d.ts.map +0 -1
  300. package/lib/src/components/detail/edit/row-edit-card.js +0 -84
  301. package/lib/src/components/detail/edit/row-edit-card.js.map +0 -1
  302. package/lib/src/components/detail/edit/row-editor.d.ts +0 -31
  303. package/lib/src/components/detail/edit/row-editor.d.ts.map +0 -1
  304. package/lib/src/components/detail/edit/row-editor.js +0 -55
  305. package/lib/src/components/detail/edit/row-editor.js.map +0 -1
  306. package/lib/src/components/detail/rightbar/index.d.ts +0 -20
  307. package/lib/src/components/detail/rightbar/index.d.ts.map +0 -1
  308. package/lib/src/components/detail/rightbar/index.js +0 -51
  309. package/lib/src/components/detail/rightbar/index.js.map +0 -1
  310. package/lib/src/components/detail/view/act-dtmpl-view.d.ts +0 -46
  311. package/lib/src/components/detail/view/act-dtmpl-view.d.ts.map +0 -1
  312. package/lib/src/components/detail/view/act-dtmpl-view.js +0 -110
  313. package/lib/src/components/detail/view/act-dtmpl-view.js.map +0 -1
  314. package/lib/src/components/detail/view/dtmpl-view.d.ts +0 -42
  315. package/lib/src/components/detail/view/dtmpl-view.d.ts.map +0 -1
  316. package/lib/src/components/detail/view/dtmpl-view.js +0 -111
  317. package/lib/src/components/detail/view/dtmpl-view.js.map +0 -1
  318. package/lib/src/components/detail/view/field-view-group.d.ts +0 -17
  319. package/lib/src/components/detail/view/field-view-group.d.ts.map +0 -1
  320. package/lib/src/components/detail/view/field-view-group.js +0 -51
  321. package/lib/src/components/detail/view/field-view-group.js.map +0 -1
  322. package/lib/src/components/detail/view/modal-dtmpl-view.d.ts +0 -27
  323. package/lib/src/components/detail/view/modal-dtmpl-view.d.ts.map +0 -1
  324. package/lib/src/components/detail/view/modal-dtmpl-view.js +0 -32
  325. package/lib/src/components/detail/view/modal-dtmpl-view.js.map +0 -1
  326. package/lib/src/components/detail/view/snapshot-timeline.d.ts +0 -32
  327. package/lib/src/components/detail/view/snapshot-timeline.d.ts.map +0 -1
  328. package/lib/src/components/detail/view/snapshot-timeline.js +0 -90
  329. package/lib/src/components/detail/view/snapshot-timeline.js.map +0 -1
  330. package/lib/src/components/exportor/export-frame.d.ts +0 -50
  331. package/lib/src/components/exportor/export-frame.d.ts.map +0 -1
  332. package/lib/src/components/exportor/export-frame.js +0 -140
  333. package/lib/src/components/exportor/export-frame.js.map +0 -1
  334. package/lib/src/components/exportor/index.d.ts +0 -16
  335. package/lib/src/components/exportor/index.d.ts.map +0 -1
  336. package/lib/src/components/exportor/index.js +0 -44
  337. package/lib/src/components/exportor/index.js.map +0 -1
  338. package/lib/src/components/form/criteria-form.d.ts +0 -19
  339. package/lib/src/components/form/criteria-form.d.ts.map +0 -1
  340. package/lib/src/components/form/criteria-form.js +0 -167
  341. package/lib/src/components/form/criteria-form.js.map +0 -1
  342. package/lib/src/components/form/dtmpl-form.d.ts +0 -37
  343. package/lib/src/components/form/dtmpl-form.d.ts.map +0 -1
  344. package/lib/src/components/form/dtmpl-form.js +0 -213
  345. package/lib/src/components/form/dtmpl-form.js.map +0 -1
  346. package/lib/src/components/form/field-group-form.d.ts +0 -21
  347. package/lib/src/components/form/field-group-form.d.ts.map +0 -1
  348. package/lib/src/components/form/field-group-form.js +0 -58
  349. package/lib/src/components/form/field-group-form.js.map +0 -1
  350. package/lib/src/components/form/fields-form.d.ts +0 -20
  351. package/lib/src/components/form/fields-form.d.ts.map +0 -1
  352. package/lib/src/components/form/fields-form.js +0 -39
  353. package/lib/src/components/form/fields-form.js.map +0 -1
  354. package/lib/src/components/form/form-Item-group.d.ts +0 -22
  355. package/lib/src/components/form/form-Item-group.d.ts.map +0 -1
  356. package/lib/src/components/form/form-Item-group.js +0 -60
  357. package/lib/src/components/form/form-Item-group.js.map +0 -1
  358. package/lib/src/components/import/excel-import.d.ts +0 -48
  359. package/lib/src/components/import/excel-import.d.ts.map +0 -1
  360. package/lib/src/components/import/excel-import.js +0 -234
  361. package/lib/src/components/import/excel-import.js.map +0 -1
  362. package/lib/src/components/layout/MainPage.d.ts +0 -32
  363. package/lib/src/components/layout/MainPage.d.ts.map +0 -1
  364. package/lib/src/components/layout/MainPage.js +0 -202
  365. package/lib/src/components/layout/MainPage.js.map +0 -1
  366. package/lib/src/components/layout/header/index.d.ts +0 -16
  367. package/lib/src/components/layout/header/index.d.ts.map +0 -1
  368. package/lib/src/components/layout/header/index.js +0 -37
  369. package/lib/src/components/layout/header/index.js.map +0 -1
  370. package/lib/src/components/layout/menu/block.d.ts +0 -9
  371. package/lib/src/components/layout/menu/block.d.ts.map +0 -1
  372. package/lib/src/components/layout/menu/block.js +0 -48
  373. package/lib/src/components/layout/menu/block.js.map +0 -1
  374. package/lib/src/components/layout/menu/l2menu-message-bar.d.ts +0 -24
  375. package/lib/src/components/layout/menu/l2menu-message-bar.d.ts.map +0 -1
  376. package/lib/src/components/layout/menu/l2menu-message-bar.js +0 -97
  377. package/lib/src/components/layout/menu/l2menu-message-bar.js.map +0 -1
  378. package/lib/src/components/layout/menu/l2menu-quick-bar.d.ts +0 -30
  379. package/lib/src/components/layout/menu/l2menu-quick-bar.d.ts.map +0 -1
  380. package/lib/src/components/layout/menu/l2menu-quick-bar.js +0 -94
  381. package/lib/src/components/layout/menu/l2menu-quick-bar.js.map +0 -1
  382. package/lib/src/components/layout/menu/menu-2layers.d.ts +0 -9
  383. package/lib/src/components/layout/menu/menu-2layers.d.ts.map +0 -1
  384. package/lib/src/components/layout/menu/menu-2layers.js +0 -63
  385. package/lib/src/components/layout/menu/menu-2layers.js.map +0 -1
  386. package/lib/src/components/layout/menu/menu-render.d.ts +0 -8
  387. package/lib/src/components/layout/menu/menu-render.d.ts.map +0 -1
  388. package/lib/src/components/layout/menu/menu-render.js +0 -44
  389. package/lib/src/components/layout/menu/menu-render.js.map +0 -1
  390. package/lib/src/components/layout/menu/reset-password.d.ts +0 -25
  391. package/lib/src/components/layout/menu/reset-password.d.ts.map +0 -1
  392. package/lib/src/components/layout/menu/reset-password.js +0 -113
  393. package/lib/src/components/layout/menu/reset-password.js.map +0 -1
  394. package/lib/src/components/layout/menu/user-bar.d.ts +0 -19
  395. package/lib/src/components/layout/menu/user-bar.d.ts.map +0 -1
  396. package/lib/src/components/layout/menu/user-bar.js +0 -61
  397. package/lib/src/components/layout/menu/user-bar.js.map +0 -1
  398. package/lib/src/components/layout/menu/userinfo-bar.d.ts +0 -18
  399. package/lib/src/components/layout/menu/userinfo-bar.d.ts.map +0 -1
  400. package/lib/src/components/layout/menu/userinfo-bar.js +0 -50
  401. package/lib/src/components/layout/menu/userinfo-bar.js.map +0 -1
  402. package/lib/src/components/layout/sidebar/index.d.ts +0 -12
  403. package/lib/src/components/layout/sidebar/index.d.ts.map +0 -1
  404. package/lib/src/components/layout/sidebar/index.js +0 -19
  405. package/lib/src/components/layout/sidebar/index.js.map +0 -1
  406. package/lib/src/components/module/dtmpl-page.d.ts +0 -19
  407. package/lib/src/components/module/dtmpl-page.d.ts.map +0 -1
  408. package/lib/src/components/module/dtmpl-page.js +0 -46
  409. package/lib/src/components/module/dtmpl-page.js.map +0 -1
  410. package/lib/src/components/module/ltmpl-page.d.ts +0 -34
  411. package/lib/src/components/module/ltmpl-page.d.ts.map +0 -1
  412. package/lib/src/components/module/ltmpl-page.js +0 -154
  413. package/lib/src/components/module/ltmpl-page.js.map +0 -1
  414. package/lib/src/components/routable/dtmpl-route.d.ts +0 -17
  415. package/lib/src/components/routable/dtmpl-route.d.ts.map +0 -1
  416. package/lib/src/components/routable/dtmpl-route.js +0 -77
  417. package/lib/src/components/routable/dtmpl-route.js.map +0 -1
  418. package/lib/src/components/routable/import-route.d.ts +0 -13
  419. package/lib/src/components/routable/import-route.d.ts.map +0 -1
  420. package/lib/src/components/routable/import-route.js +0 -29
  421. package/lib/src/components/routable/import-route.js.map +0 -1
  422. package/lib/src/components/routable/ltmpl-route.d.ts +0 -25
  423. package/lib/src/components/routable/ltmpl-route.d.ts.map +0 -1
  424. package/lib/src/components/routable/ltmpl-route.js +0 -145
  425. package/lib/src/components/routable/ltmpl-route.js.map +0 -1
  426. package/lib/src/components/table/act-table.d.ts +0 -76
  427. package/lib/src/components/table/act-table.d.ts.map +0 -1
  428. package/lib/src/components/table/act-table.js +0 -454
  429. package/lib/src/components/table/act-table.js.map +0 -1
  430. package/lib/src/components/table/column/column-selector.d.ts +0 -26
  431. package/lib/src/components/table/column/column-selector.d.ts.map +0 -1
  432. package/lib/src/components/table/column/column-selector.js +0 -59
  433. package/lib/src/components/table/column/column-selector.js.map +0 -1
  434. package/lib/src/components/table/l2-act-table.d.ts +0 -23
  435. package/lib/src/components/table/l2-act-table.d.ts.map +0 -1
  436. package/lib/src/components/table/l2-act-table.js +0 -80
  437. package/lib/src/components/table/l2-act-table.js.map +0 -1
  438. package/lib/src/components/table/modal-select-table.d.ts +0 -41
  439. package/lib/src/components/table/modal-select-table.d.ts.map +0 -1
  440. package/lib/src/components/table/modal-select-table.js +0 -208
  441. package/lib/src/components/table/modal-select-table.js.map +0 -1
  442. package/lib/src/components/table/pagination.d.ts +0 -17
  443. package/lib/src/components/table/pagination.d.ts.map +0 -1
  444. package/lib/src/components/table/pagination.js +0 -40
  445. package/lib/src/components/table/pagination.js.map +0 -1
  446. package/lib/src/components/table/query-table.d.ts +0 -65
  447. package/lib/src/components/table/query-table.d.ts.map +0 -1
  448. package/lib/src/components/table/query-table.js +0 -257
  449. package/lib/src/components/table/query-table.js.map +0 -1
  450. package/lib/src/components/table/relation-table.d.ts +0 -61
  451. package/lib/src/components/table/relation-table.d.ts.map +0 -1
  452. package/lib/src/components/table/relation-table.js +0 -444
  453. package/lib/src/components/table/relation-table.js.map +0 -1
  454. package/lib/src/components/table/select-table.d.ts +0 -40
  455. package/lib/src/components/table/select-table.d.ts.map +0 -1
  456. package/lib/src/components/table/select-table.js +0 -223
  457. package/lib/src/components/table/select-table.js.map +0 -1
  458. package/lib/src/components/table/selected-rows-card.d.ts +0 -16
  459. package/lib/src/components/table/selected-rows-card.d.ts.map +0 -1
  460. package/lib/src/components/table/selected-rows-card.js +0 -47
  461. package/lib/src/components/table/selected-rows-card.js.map +0 -1
  462. package/lib/src/components/table/stat/restat.d.ts +0 -26
  463. package/lib/src/components/table/stat/restat.d.ts.map +0 -1
  464. package/lib/src/components/table/stat/restat.js +0 -61
  465. package/lib/src/components/table/stat/restat.js.map +0 -1
  466. package/lib/src/components/table/table-util.d.ts +0 -5
  467. package/lib/src/components/table/table-util.d.ts.map +0 -1
  468. package/lib/src/components/table/table-util.js.map +0 -1
  469. package/lib/src/components/tmpl/control-type-supportor.d.ts +0 -9
  470. package/lib/src/components/tmpl/control-type-supportor.d.ts.map +0 -1
  471. package/lib/src/components/tmpl/control-type-supportor.js.map +0 -1
  472. package/lib/src/components/tmpl/hc-data-source.d.ts +0 -19
  473. package/lib/src/components/tmpl/hc-data-source.d.ts.map +0 -1
  474. package/lib/src/components/tmpl/hc-data-source.js +0 -230
  475. package/lib/src/components/tmpl/hc-data-source.js.map +0 -1
  476. package/lib/src/components/tmpl/hcservice-v3.d.ts +0 -53
  477. package/lib/src/components/tmpl/hcservice-v3.d.ts.map +0 -1
  478. package/lib/src/components/tmpl/hcservice-v3.js +0 -639
  479. package/lib/src/components/tmpl/hcservice-v3.js.map +0 -1
  480. package/lib/src/components/tmpl/interface.d.ts.map +0 -1
  481. package/lib/src/components/tmpl/interface.js +0 -4
  482. package/lib/src/components/tmpl/interface.js.map +0 -1
  483. package/lib/src/components/tmpl/tmpl-config-analysis.d.ts +0 -7
  484. package/lib/src/components/tmpl/tmpl-config-analysis.d.ts.map +0 -1
  485. package/lib/src/components/tmpl/tmpl-config-analysis.js +0 -106
  486. package/lib/src/components/tmpl/tmpl-config-analysis.js.map +0 -1
  487. package/lib/src/components/units/index.d.ts +0 -58
  488. package/lib/src/components/units/index.d.ts.map +0 -1
  489. package/lib/src/components/units/index.js.map +0 -1
  490. package/lib/src/components/welcome/quick-entrance.d.ts +0 -20
  491. package/lib/src/components/welcome/quick-entrance.d.ts.map +0 -1
  492. package/lib/src/components/welcome/quick-entrance.js +0 -79
  493. package/lib/src/components/welcome/quick-entrance.js.map +0 -1
  494. package/lib/src/components/welcome/workbench.d.ts +0 -20
  495. package/lib/src/components/welcome/workbench.d.ts.map +0 -1
  496. package/lib/src/components/welcome/workbench.js +0 -78
  497. package/lib/src/components/welcome/workbench.js.map +0 -1
  498. package/lib/src/index.d.ts +0 -4
  499. package/lib/src/index.d.ts.map +0 -1
  500. package/lib/src/index.js +0 -4
  501. package/lib/src/index.js.map +0 -1
@@ -1,234 +0,0 @@
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 { Card, Button, Upload, message, Progress, List, Checkbox, Row, Col, Popover, InputNumber } from 'antd';
12
- import { ReloadOutlined, UploadOutlined, SettingOutlined } from '@ant-design/icons';
13
- import Super from "../tmpl/superagent";
14
- import Units from "../units";
15
- import './index.css';
16
- import HCDataSource from "../tmpl/hc-data-source";
17
- const CheckboxGroup = Checkbox.Group;
18
- const logLevelList = ['INFO', 'SUC', 'ERROR', 'WARN'];
19
- let totalMSG = [];
20
- ;
21
- ;
22
- export default class ExcelImport extends React.PureComponent {
23
- constructor() {
24
- super(...arguments);
25
- this.state = {
26
- maxMsgCount: 100,
27
- inputMaxMsgCount: 100,
28
- importStatus: 'waitingFile',
29
- importFile: undefined,
30
- logs: [],
31
- percent: 0,
32
- statusMsg: undefined,
33
- logSetterVisible: false,
34
- showLogLevelList: [...logLevelList],
35
- logSerialId: undefined,
36
- ltmplConfig: undefined,
37
- };
38
- this.timerId = undefined;
39
- this.handleUpload = () => {
40
- const { sourceId } = this.props;
41
- const { importFile } = this.state;
42
- const formData = new FormData();
43
- formData.append('file', importFile);
44
- formData.append('sourceId', sourceId.toString());
45
- Super.super({
46
- url: `/v3/ltmpl/importer`,
47
- method: 'POST',
48
- data: formData,
49
- }, "formdata").then((res) => {
50
- //console.log(res)
51
- if (res.status === "success") {
52
- this.setState({
53
- importStatus: 'importing',
54
- });
55
- this.timerId = setInterval(() => this.handleStatus(res.importId), 500);
56
- }
57
- else {
58
- message.error('失败!');
59
- this.setState({
60
- importStatus: 'fail',
61
- });
62
- }
63
- });
64
- };
65
- this.handleStopImport = () => {
66
- this.setState({
67
- importStatus: 'stop',
68
- });
69
- };
70
- this.handleStatus = (importId) => {
71
- const { maxMsgCount, importStatus } = this.state;
72
- Super.super({
73
- url: `/v3/importer/status`,
74
- method: 'GET',
75
- query: {
76
- importId: importId,
77
- msgIndex: 0,
78
- maxMsgCount,
79
- interrupted: importStatus == 'stop',
80
- }
81
- }, "", "none").then((res) => {
82
- const MSG = [];
83
- for (let item of res.messageSequence.messages) {
84
- let color = "";
85
- let logLevel = "";
86
- let createTime = Units.formateDate(item.createTime);
87
- if (item.type === "SUC") {
88
- color = "green";
89
- logLevel = '成功';
90
- }
91
- else if (item.type === "INFO") {
92
- color = "black";
93
- logLevel = '常规';
94
- }
95
- else if (item.type === "ERROR") {
96
- color = "red";
97
- logLevel = '错误';
98
- }
99
- else if (item.type === "WARN") {
100
- color = "rgb(250, 225, 4)";
101
- logLevel = '警告';
102
- }
103
- const msg = React.createElement("div", null,
104
- React.createElement("p", null, createTime),
105
- React.createElement("p", { style: { color: color } }, `【${logLevel}】` + item.text));
106
- MSG.push({ level: item.type, msg });
107
- }
108
- this.setState({
109
- statusMsg: res.message,
110
- percent: Math.floor((res.current / res.totalCount) * 100),
111
- logs: MSG,
112
- });
113
- if (res.completed === true) {
114
- clearInterval(this.timerId);
115
- message.success('导入完成!');
116
- this.setState({
117
- importStatus: 'success'
118
- });
119
- }
120
- if (importStatus == 'stop') {
121
- clearInterval(this.timerId);
122
- }
123
- });
124
- };
125
- this.onChangeShowLogLevelList = (showLogLevelList) => {
126
- this.setState({
127
- showLogLevelList,
128
- });
129
- };
130
- this.fresh = () => {
131
- // this.setState({
132
- // fileList:[],
133
- // uploading: false,
134
- // statusMsg:"",
135
- // begin:true,
136
- // importAgain:"none",
137
- // importbtn:"block",
138
- // percent:0,
139
- // messages:[]
140
- // })
141
- // message.success("刷新成功!")
142
- };
143
- this.handleLogSetter = () => {
144
- const { inputMaxMsgCount } = this.state;
145
- this.setState({
146
- maxMsgCount: inputMaxMsgCount,
147
- logSetterVisible: false,
148
- });
149
- message.success("设置成功!");
150
- };
151
- this.changeLogSetterVisible = visible => {
152
- this.setState({ logSetterVisible: visible });
153
- };
154
- }
155
- componentDidMount() {
156
- return __awaiter(this, void 0, void 0, function* () {
157
- const { sourceId } = this.props;
158
- let ltmplConfigRes = yield HCDataSource.requestLtmplConfig(sourceId);
159
- this.setState({
160
- ltmplConfig: ltmplConfigRes.ltmplConfig,
161
- });
162
- });
163
- }
164
- componentWillUnmount() {
165
- if (this.timerId) {
166
- clearInterval(this.timerId);
167
- }
168
- }
169
- render() {
170
- const { ltmplConfig, importFile, maxMsgCount, percent, importStatus, showLogLevelList, logSetterVisible, logs } = this.state;
171
- let showLogs = [];
172
- for (let log of logs) {
173
- if (showLogLevelList.includes(log.level)) {
174
- showLogs.push(log.msg);
175
- }
176
- }
177
- const props = {
178
- accept: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/vnd.ms-excel,application/vnd.ms-excel",
179
- onChange: () => {
180
- },
181
- onRemove: (file) => {
182
- this.setState({
183
- importFile: undefined,
184
- importStatus: 'waitingFile',
185
- percent: 0,
186
- });
187
- },
188
- beforeUpload: (file) => {
189
- this.setState({
190
- percent: 0,
191
- importFile: file,
192
- importStatus: 'fileSelected',
193
- });
194
- return false;
195
- },
196
- fileList: importFile ? [importFile] : undefined,
197
- };
198
- const content = (React.createElement("div", null,
199
- React.createElement("label", null, "\u65E5\u5FD7\u6D88\u606F\u6570\u4E0A\u9650\uFF1A"),
200
- React.createElement(InputNumber, { defaultValue: maxMsgCount, onChange: (value) => this.setState({ inputMaxMsgCount: value }) }),
201
- React.createElement(Button, { type: "primary", style: { marginLeft: '10px' }, onClick: this.handleLogSetter }, "\u786E\u5B9A")));
202
- return (React.createElement("div", { className: "importData" },
203
- React.createElement("h3", null,
204
- '导入 -> ',
205
- ltmplConfig ? ltmplConfig.title : "",
206
- React.createElement("p", { className: "fr" },
207
- React.createElement(Button, { className: "hoverbig", title: "\u5237\u65B0", onClick: this.fresh },
208
- React.createElement(ReloadOutlined, null)))),
209
- React.createElement(Row, null,
210
- React.createElement(Col, { span: 14, offset: 5 },
211
- React.createElement(Card, { style: { minWidth: 600 } },
212
- React.createElement(Upload, Object.assign({}, props),
213
- React.createElement(Button, null,
214
- React.createElement(UploadOutlined, null),
215
- "\u9009\u62E9\u5BFC\u5165\u6587\u4EF6")),
216
- React.createElement(Progress, { percent: percent, size: "small", status: "active" }),
217
- React.createElement("div", { className: "importBtns" },
218
- React.createElement(Button, { type: "primary", onClick: this.handleUpload, disabled: !(['fileSelected', 'stop'].includes(importStatus)), loading: importStatus == 'importing' }, importStatus == 'importing' ? '正在导入' : importStatus == 'stop' ? '重新导入' : '开始导入'),
219
- React.createElement(Button, { onClick: this.handleStopImport, disabled: importStatus != 'importing' }, '停止导入')),
220
- React.createElement(List, { header: React.createElement("div", { className: "listHeader" },
221
- React.createElement("h4", null, "\u5BFC\u5165\u65E5\u5FD7"),
222
- React.createElement("div", { className: "checks" },
223
- React.createElement(CheckboxGroup, { value: showLogLevelList, onChange: this.onChangeShowLogLevelList },
224
- React.createElement(Checkbox, { value: "INFO", className: "infoColor" }, "\u5E38\u89C4"),
225
- React.createElement(Checkbox, { value: "SUC", className: "sucColor" }, "\u6210\u529F"),
226
- React.createElement(Checkbox, { value: "ERROR", className: "errorColor" }, "\u9519\u8BEF"),
227
- React.createElement(Checkbox, { value: "WARN", className: "warnColor" }, "\u8B66\u544A")),
228
- React.createElement("div", { className: "btns" },
229
- React.createElement(Popover, { content: content, title: "\u65E5\u5FD7\u8BBE\u7F6E", trigger: "click", placement: "top", visible: logSetterVisible, overlayStyle: { width: 350 }, onVisibleChange: this.changeLogSetterVisible },
230
- React.createElement(Button, { title: "\u65E5\u5FD7\u8BBE\u7F6E", type: "primary", size: "small" },
231
- React.createElement(SettingOutlined, null)))))), footer: React.createElement("div", null, importStatus), bordered: true, dataSource: showLogs, renderItem: item => (React.createElement(List.Item, null, item)), className: "importList" }))))));
232
- }
233
- }
234
- //# sourceMappingURL=excel-import.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"excel-import.js","sourceRoot":"","sources":["../../../../src/components/import/excel-import.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,OAAO,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAC,GAAG,EAAO,OAAO,EAAC,WAAW,EAAE,MAAM,MAAM,CAAA;AACzG,OAAO,EAAc,cAAc,EAAmB,cAAc,EAAc,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAC5H,OAAO,KAAK,MAAM,oBAAoB,CAAA;AACtC,OAAO,KAAK,MAAM,UAAU,CAAA;AAC5B,OAAO,aAAa,CAAA;AAGpB,OAAO,YAAY,MAAM,wBAAwB,CAAC;AAElD,MAAM,aAAa,GAAG,QAAQ,CAAC,KAAK,CAAC;AACrC,MAAM,YAAY,GAAc,CAAC,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;AACjE,IAAI,QAAQ,GAAC,EAAE,CAAA;AAMd,CAAC;AAcD,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,KAAK,CAAC,aAAgD;IAA/F;;QAEI,UAAK,GAAG;YACJ,WAAW,EAAC,GAAG;YACf,gBAAgB,EAAC,GAAG;YACpB,YAAY,EAAC,aAAa;YAC1B,UAAU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BAAC,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAE,SAAS,EAAC,WAAW,mBAAc,CAC/C;oCAChB,6BAAK,SAAS,EAAC,MAAM;wCACjB,oBAAC,OAAO,IACJ,OAAO,EAAE,OAAO,EAChB,KAAK,EAAC,0BAAM,EACZ,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,KAAK,EACf,OAAO,EAAE,gBAAgB,EACzB,YAAY,EAAE,EAAC,KAAK,EAAC,GAAG,EAAC,EACzB,eAAe,EAAE,IAAI,CAAC,sBAAsB;4CAE5C,oBAAC,MAAM,IAAC,KAAK,EAAC,0BAAM,EAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO;gDAC5C,oBAAC,eAAe,OAAG,CACd,CACH,CACR,CACJ,CACJ,EAEV,MAAM,EAAE,iCAAM,YAAY,CAAO,EACjC,QAAQ,QACR,UAAU,EAAE,QAAQ,EACpB,UAAU,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,oBAAC,IAAI,CAAC,IAAI,QAAE,IAAI,CAAa,CAAC,EACnD,SAAS,EAAC,YAAY,GACpB,CACH,CACL,CACJ,CACJ,CACT,CAAA;IACL,CAAC;CACJ"}
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { BlockMenu } from "../tmpl/interface";
3
- interface MainPageProps {
4
- children: any;
5
- match?: any;
6
- }
7
- interface MainPageState {
8
- collapsed: boolean;
9
- currentL2MenuId: string;
10
- blocks: BlockMenu[];
11
- currentBlockId?: string;
12
- isImporter: boolean;
13
- }
14
- declare class MainPage extends React.PureComponent<MainPageProps, MainPageState> {
15
- scrollbarRef: React.RefObject<unknown>;
16
- state: {
17
- collapsed: boolean;
18
- blocks: any[];
19
- currentL2MenuId: any;
20
- currentBlockId: any;
21
- isImporter: boolean;
22
- };
23
- componentDidMount(): Promise<void>;
24
- componentDidUpdate(prevProps: any, prevState: any): Promise<void>;
25
- findBlockTitle: (blockId: string) => string;
26
- findBlockIdOfL2Menu: (leMenuId: string) => string;
27
- findCurrentBlock: () => BlockMenu;
28
- toggle: () => void;
29
- render(): JSX.Element;
30
- }
31
- export default MainPage;
32
- //# sourceMappingURL=MainPage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MainPage.d.ts","sourceRoot":"","sources":["../../../../src/components/layout/MainPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAU5C,UAAU,aAAa;IACnB,QAAQ,EAAE,GAAG,CAAC;IACd,KAAK,CAAC,EAAE,GAAG,CAAC;CACf;AAED,UAAU,aAAa;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,SAAS,EAAE,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,UAAU,EAAC,OAAO,CAAC;CACtB;AAED,cAAM,QAAS,SAAQ,KAAK,CAAC,aAAa,CAAC,aAAa,EAAE,aAAa,CAAC;IACpE,YAAY,2BAAqB;IACjC,KAAK;;;;;;MAMJ;IAEK,iBAAiB;IA8BjB,kBAAkB,CAAC,SAAS,KAAA,EAAE,SAAS,KAAA;IAyC7C,cAAc,YAAa,MAAM,YAehC;IAED,mBAAmB,aAAc,MAAM,YAgBtC;IAED,gBAAgB,kBA4Bf;IAED,MAAM,aAIJ;IAEF,MAAM;CAiDT;AAED,eAAe,QAAQ,CAAC"}
@@ -1,202 +0,0 @@
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 { Layout } from 'antd';
12
- import Footer from './footer';
13
- import Header from './header';
14
- import SideBar from './sidebar';
15
- import HCDataSource from "../tmpl/hc-data-source";
16
- import DocumentTitle from "react-document-title";
17
- import Units from '../units';
18
- import Scrollbars from 'react-custom-scrollbars';
19
- const { Content, Sider } = Layout;
20
- class MainPage extends React.PureComponent {
21
- constructor() {
22
- super(...arguments);
23
- this.scrollbarRef = React.createRef();
24
- this.state = {
25
- collapsed: false,
26
- blocks: [],
27
- currentL2MenuId: undefined,
28
- currentBlockId: undefined,
29
- isImporter: false,
30
- };
31
- this.findBlockTitle = (blockId) => {
32
- let blockTitle;
33
- const { blocks } = this.state;
34
- if (blockId) {
35
- for (const block of blocks) {
36
- if (block.id == blockId) {
37
- blockTitle = block.title;
38
- break;
39
- }
40
- }
41
- }
42
- let title = blockTitle ? blockTitle + '-' : "";
43
- let programName = Units.programName() ? Units.programName() : 'HYDROCARBON';
44
- title = title + programName;
45
- return title;
46
- };
47
- this.findBlockIdOfL2Menu = (leMenuId) => {
48
- let blockId = undefined;
49
- const { blocks } = this.state;
50
- if (leMenuId) {
51
- for (const block of blocks) {
52
- for (const menul1 of block.l1Menus) {
53
- for (const menul2 of menul1.l2Menus) {
54
- if (menul2.id == leMenuId) {
55
- blockId = block.id;
56
- break;
57
- }
58
- }
59
- }
60
- }
61
- }
62
- return blockId;
63
- };
64
- this.findCurrentBlock = () => {
65
- const { blocks, currentL2MenuId, currentBlockId } = this.state;
66
- let result = undefined;
67
- if (currentL2MenuId) {
68
- for (const block of blocks) {
69
- for (const menul1 of block.l1Menus) {
70
- for (const menul2 of menul1.l2Menus) {
71
- if (menul2.id == currentL2MenuId) {
72
- result = block;
73
- break;
74
- }
75
- }
76
- }
77
- }
78
- }
79
- if (currentBlockId && !result) {
80
- for (const block of blocks) {
81
- if (block.id === currentBlockId) {
82
- result = block;
83
- break;
84
- }
85
- }
86
- }
87
- if (!result) {
88
- result = blocks.at(0);
89
- }
90
- return result;
91
- };
92
- this.toggle = () => {
93
- this.setState({
94
- collapsed: !this.state.collapsed,
95
- });
96
- };
97
- }
98
- componentDidMount() {
99
- return __awaiter(this, void 0, void 0, function* () {
100
- var currentURL = new URL(window.location.href);
101
- console.log('main page currentURL:', currentURL);
102
- const search = window.location.href.split("?")[1];
103
- var searchParams = new URLSearchParams('?' + search);
104
- let blockId = searchParams.get('blockId');
105
- let l2MenuId = searchParams.get('menuId');
106
- //进一步找找l2MenuId
107
- if (!l2MenuId) {
108
- let sourcePart = currentURL.hash.match(/[\w]+\-[\d]+/);
109
- if (sourcePart) {
110
- let source = sourcePart[0].split('-');
111
- if (source[0] === 'menu') {
112
- l2MenuId = source[1];
113
- }
114
- }
115
- }
116
- let blockRes = yield HCDataSource.requestBlocks(l2MenuId ? l2MenuId : undefined, blockId ? blockId : undefined);
117
- this.setState({
118
- isImporter: currentURL.hash.indexOf('/importer') > 0,
119
- blocks: blockRes.blocks,
120
- currentL2MenuId: blockRes.l2MenuId,
121
- currentBlockId: blockRes.blockId,
122
- });
123
- });
124
- }
125
- componentDidUpdate(prevProps, prevState) {
126
- return __awaiter(this, void 0, void 0, function* () {
127
- var currentURL = new URL(window.location.href);
128
- const search = window.location.href.split("?")[1];
129
- var searchParams = new URLSearchParams('?' + search);
130
- let blockId = searchParams.get('blockId');
131
- let l2MenuId = searchParams.get('menuId');
132
- let isImporter_ = currentURL.hash.indexOf('/importer') > 0;
133
- if (prevState.isImporter != isImporter_) {
134
- this.setState({
135
- isImporter: isImporter_,
136
- });
137
- }
138
- //进一步找找l2MenuId
139
- if (!l2MenuId) {
140
- let sourcePart = currentURL.hash.match(/[\w]+\-[\d]+/);
141
- if (sourcePart) {
142
- let source = sourcePart[0].split('-');
143
- if (source[0] === 'menu') {
144
- l2MenuId = source[1];
145
- }
146
- }
147
- }
148
- const { currentL2MenuId, currentBlockId } = this.state;
149
- if (l2MenuId && currentL2MenuId != l2MenuId) {
150
- this.setState({
151
- currentL2MenuId: l2MenuId,
152
- });
153
- }
154
- if (!blockId) {
155
- blockId = this.findBlockIdOfL2Menu(l2MenuId);
156
- }
157
- if (blockId && currentBlockId != blockId) {
158
- this.setState({
159
- currentBlockId: blockId,
160
- });
161
- }
162
- });
163
- }
164
- render() {
165
- var _a, _b;
166
- const { match } = this.props;
167
- const { collapsed, currentL2MenuId, currentBlockId, isImporter } = this.state;
168
- //滚动条回到顶部
169
- // document.body.scrollTop = document.documentElement.scrollTop = 0;
170
- // @ts-ignore
171
- // eslint-disable-next-line no-unused-expressions
172
- (_b = (_a = this.scrollbarRef) === null || _a === void 0 ? void 0 : _a.current) === null || _b === void 0 ? void 0 : _b.scrollToTop();
173
- return (React.createElement(Scrollbars, { ref: this.scrollbarRef, style: { height: 'calc(100vh)' }, autoHide: true, autoHideTimeout: 1000 },
174
- React.createElement(DocumentTitle, { title: (isImporter ? '导入-' : "") + this.findBlockTitle(currentBlockId) },
175
- React.createElement(Layout, null,
176
- React.createElement(Sider, { style: {
177
- overflow: 'auto',
178
- height: '100vh',
179
- position: 'fixed',
180
- left: 0,
181
- top: 0,
182
- bottom: 0,
183
- }, collapsed: collapsed },
184
- React.createElement(SideBar, { blockMenu: this.findCurrentBlock(), currentL2MenuId: currentL2MenuId, collapsed: collapsed })),
185
- React.createElement(Layout, { style: collapsed ? { background: '#fff', marginLeft: 80 } : {
186
- background: '#fff',
187
- marginLeft: 200
188
- } },
189
- React.createElement(Header, Object.assign({ toggle: this.toggle }, this.state)),
190
- React.createElement(Content, { style: {
191
- margin: '24px 16px 0',
192
- overflow: 'initial',
193
- minHeight: 'calc(100vh)',
194
- minWidth: 760,
195
- maxWidth: 1960,
196
- paddingBottom: '8px',
197
- } }, this.props.children),
198
- React.createElement(Footer, null))))));
199
- }
200
- }
201
- export default MainPage;
202
- //# sourceMappingURL=MainPage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"MainPage.js","sourceRoot":"","sources":["../../../../src/components/layout/MainPage.t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AAK,IACF,KAAK,EAAE;4BACH,QAAQ,EAAE,MAAM;4BAChB,MAAM,EAAE,OAAO;4BACf,QAAQ,EAAE,OAAO;4BACjB,IAAI,EAAE,CAAC;4BACP,GAAG,EAAE,CAAC;4BACN,MAAM,EAAE,CAAC;yBACZ,EACD,SAAS,EAAE,SAAS;wBAEpB,oBAAC,OAAO,IAAC,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,EAClC,eAAe,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,GAAG,CAC9D;oBACR,oBAAC,MAAM,IAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,EAAC,CAAC,CAAC,CAAC;4BAC9D,UAAU,EAAE,MAAM;4BAClB,UAAU,EAAE,GAAG;yBAClB;wBACG,oBAAC,MAAM,kBAAC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAM,IAAI,CAAC,KAAK,EAAI;wBAC/C,oBAAC,OAAO,IAAC,KAAK,EAAE;gCACZ,MAAM,EAAE,aAAa;gCACrB,QAAQ,EAAE,SAAS;gCACnB,SAAS,EAAE,aAAa;gCACxB,QAAQ,EAAE,GAAG;gCACb,QAAQ,EAAE,IAAI;gCACd,aAAa,EAAE,KAAK;6BACvB,IACI,IAAI,CAAC,KAAK,CAAC,QAAQ,CACd;wBACV,oBAAC,MAAM,OAAE,CACJ,CACJ,CACG,CACP,CAChB,CAAA;IACL,CAAC;CACJ;AAED,eAAe,QAAQ,CAAC"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import 'antd/dist/antd.css';
3
- import "./index.css";
4
- import { BlockProps } from "../menu/block";
5
- interface HeaderProps extends BlockProps {
6
- toggle: any;
7
- collapsed: boolean;
8
- }
9
- interface HeaderState {
10
- }
11
- declare class Header extends React.PureComponent<HeaderProps, HeaderState> {
12
- toggle: () => void;
13
- render(): JSX.Element;
14
- }
15
- export default Header;
16
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAA;AACpB,OAAc,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAOhD,UAAU,WAAY,SAAQ,UAAU;IACpC,MAAM,EAAE,GAAG,CAAC;IACZ,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,UAAU,WAAW;CAEpB;AAED,cAAM,MAAO,SAAQ,KAAK,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC;IAE9D,MAAM,aAEJ;IAEF,MAAM;CA4BT;AAED,eAAe,MAAM,CAAA"}
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import { Col, Layout, Row } from 'antd';
3
- import { MenuFoldOutlined, MenuUnfoldOutlined } from '@ant-design/icons';
4
- import 'antd/dist/antd.css';
5
- import "./index.css";
6
- import Block from "../menu/block";
7
- import L2MenuMessageBar from '../menu/l2menu-message-bar';
8
- import L2MenuQuickBar from '../menu/l2menu-quick-bar';
9
- import UserBar from '../menu/user-bar';
10
- const { Header: AntdHeader, } = Layout;
11
- class Header extends React.PureComponent {
12
- constructor() {
13
- super(...arguments);
14
- this.toggle = () => {
15
- this.props.toggle();
16
- };
17
- }
18
- render() {
19
- let { collapsed } = this.props;
20
- return (React.createElement(AntdHeader, { style: { padding: 0, height: 'auto' } },
21
- React.createElement(Row, { className: "header-top", wrap: false },
22
- React.createElement(Col, { span: 20, className: "header-col" },
23
- React.createElement("div", { style: { float: 'left' } }, React.createElement(collapsed ? MenuUnfoldOutlined : MenuFoldOutlined, {
24
- className: 'trigger',
25
- onClick: this.toggle,
26
- })),
27
- React.createElement(Block, Object.assign({}, this.props))),
28
- React.createElement(Col, { span: 1, style: { width: '100%' } },
29
- React.createElement(L2MenuQuickBar, null)),
30
- React.createElement(Col, { span: 1, style: { width: '100%' } },
31
- React.createElement(L2MenuMessageBar, null)),
32
- React.createElement(Col, { span: 2 },
33
- React.createElement(UserBar, null)))));
34
- }
35
- }
36
- export default Header;
37
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/components/layout/header/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAC,MAAM,MAAM,CAAA;AACrC,OAAO,EAAC,gBAAgB,EAAE,kBAAkB,EAAC,MAAM,mBAAmB,CAAC;AACvE,OAAO,oBAAoB,CAAC;AAC5B,OAAO,aAAa,CAAA;AACpB,OAAO,KAAmB,MAAM,eAAe,CAAC;AAChD,OAAO,gBAAgB,MAAM,4BAA4B,CAAC;AAC1D,OAAO,cAAc,MAAO,0BAA0B,CAAC;AACvD,OAAO,OAAO,MAAM,kBAAkB,CAAC;AAEvC,MAAM,EAAE,MAAM,EAAC,UAAU,GAAG,GAAG,MAAM,CAAC;AAWtC,MAAM,MAAO,SAAQ,KAAK,CAAC,aAAuC;IAAlE;;QAEI,WAAM,GAAG,GAAG,EAAE;YACV,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;QACxB,CAAC,CAAC;IA8BN,CAAC;IA5BG,MAAM;QAEF,IAAI,EAAC,SAAS,EAAC,GAAC,IAAI,CAAC,KAAK,CAAC;QAC3B,OAAO,CACH,oBAAC,UAAU,IAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAG,MAAM,EAAE,MAAM,EAAC;YACzC,oBAAC,GAAG,IAAC,SAAS,EAAC,YAAY,EAAC,IAAI,EAAE,KAAK;gBACnC,oBAAC,GAAG,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,YAAY;oBACjC,6BAAK,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC,IACtB,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,EAAE;wBACpE,SAAS,EAAE,SAAS;wBACpB,OAAO,EAAE,IAAI,CAAC,MAAM;qBACvB,CAAC,CACA;oBACN,oBAAC,KAAK,oBAAK,IAAI,CAAC,KAAK,EAAI,CACvB;gBACN,oBAAC,GAAG,IAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC;oBAChC,oBAAC,cAAc,OAAkB,CAC/B;gBACN,oBAAC,GAAG,IAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,EAAC,KAAK,EAAE,MAAM,EAAC;oBAChC,oBAAC,gBAAgB,OAAoB,CACnC;gBACN,oBAAC,GAAG,IAAC,IAAI,EAAE,CAAC;oBACR,oBAAC,OAAO,OAAW,CACjB,CACJ,CACD,CAChB,CAAA;IACL,CAAC;CACJ;AAED,eAAe,MAAM,CAAA"}
@@ -1,9 +0,0 @@
1
- import { BlockMenu } from "../../tmpl/interface";
2
- export interface BlockProps {
3
- blocks: BlockMenu[];
4
- currentBlockId?: string;
5
- currentL2MenuId?: string;
6
- }
7
- declare const _default: any;
8
- export default _default;
9
- //# sourceMappingURL=block.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../../../../src/components/layout/menu/block.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,SAAS,EAAC,MAAM,sBAAsB,CAAC;AAc/C,MAAM,WAAW,UAAU;IACvB,MAAM,EAAC,SAAS,EAAE,CAAC;IACnB,cAAc,CAAC,EAAC,MAAM,CAAC;IACvB,eAAe,CAAC,EAAC,MAAM,CAAC;CAC3B;;AAmED,wBAAiC"}
@@ -1,48 +0,0 @@
1
- import React from "react";
2
- import { Dropdown, Menu } from 'antd';
3
- import { withRouter } from 'react-router-dom';
4
- import MenuRender from './menu-render';
5
- class Block extends React.PureComponent {
6
- constructor(props) {
7
- super(props);
8
- this.renderBlockMenu = (blockMenu) => {
9
- return React.createElement(Menu, null, MenuRender.renderL1Menu(blockMenu.l1Menus, null));
10
- };
11
- this.findBlockId = (blocks, currentL2MenuId) => {
12
- let blockId = undefined;
13
- for (const block of blocks) {
14
- for (const menul1 of block.l1Menus) {
15
- for (const menul2 of menul1.l2Menus) {
16
- if (menul2.id === currentL2MenuId) {
17
- blockId = block.id;
18
- return blockId;
19
- }
20
- }
21
- }
22
- }
23
- return blockId;
24
- };
25
- }
26
- render() {
27
- const { currentBlockId, blocks, currentL2MenuId } = this.props;
28
- if (!blocks || blocks.length < 1) {
29
- return React.createElement(React.Fragment, null);
30
- }
31
- let blockId = currentBlockId;
32
- if (currentL2MenuId && !blockId) {
33
- blockId = this.findBlockId(blocks, currentL2MenuId);
34
- }
35
- if (!blockId) {
36
- blockId = blocks.at(0).id;
37
- }
38
- return (blocks.map((item, index) => {
39
- return React.createElement("div", { key: index, className: `${item.id == blockId ? "active" : ""} header-block` },
40
- React.createElement(Dropdown, { overlay: this.renderBlockMenu(item) },
41
- React.createElement("a", { className: "dropdown-link",
42
- // href={`#/home?blockId=${item.id}`}
43
- rel: "noopener noreferrer" }, item.title)));
44
- }));
45
- }
46
- }
47
- export default withRouter(Block);
48
- //# sourceMappingURL=block.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"block.js","sourceRoot":"","sources":["../../../../../src/components/layout/menu/block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAa,QAAQ,EAAE,IAAI,EAAM,MAAM,MAAM,CAAC;AAErD,OAAO,EAAU,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAUrD,OAAO,UAAU,MAAM,eAAe,CAAC;AAYvC,MAAM,KAAM,SAAQ,KAAK,CAAC,aAAqC;IAG3D,YAAY,KAAK;QACb,KAAK,CAAC,KAAK,CAAC,CAAC;QAGjB,oBAAe,GAAG,CAAC,SAAmB,EAAC,EAAE;YACrC,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