@pisell/materials 6.0.13 → 6.0.15

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 (358) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +21 -13
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +36 -22
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +36 -22
  11. package/es/components/Pagination/index.d.ts +1 -1
  12. package/es/components/appVersionControl/index.d.ts +5 -0
  13. package/es/components/appVersionControl/index.js +218 -0
  14. package/es/components/appVersionControl/index.less +35 -0
  15. package/es/components/appVersionControl/types.d.ts +24 -0
  16. package/es/components/appVersionControl/types.js +1 -0
  17. package/es/components/appVersionControl/utils.d.ts +13 -0
  18. package/es/components/appVersionControl/utils.js +30 -0
  19. package/es/components/customSelect/index.d.ts +17 -0
  20. package/es/components/customSelect/index.js +32 -0
  21. package/es/components/customSelect/index.less +7 -0
  22. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +1 -1
  23. package/es/components/dataSourceComponents/dataSourceForm/group/index.js +23 -6
  24. package/es/components/dataSourceComponents/dataSourceForm/group/index.less +1 -1
  25. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +1 -1
  26. package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +1 -1
  27. package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +4 -8
  28. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
  29. package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +5 -4
  30. package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +6 -3
  31. package/es/components/dataSourceComponents/dataSourceForm/utils.js +94 -18
  32. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +2 -0
  33. package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +61 -0
  34. package/es/components/dataSourceComponents/dataSourceMenu/index.js +39 -10
  35. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +6 -2
  36. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +30 -6
  37. package/es/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +1 -2
  38. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +6 -2
  39. package/es/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +33 -2
  40. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -2
  41. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +33 -13
  42. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  43. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +7 -1
  44. package/es/components/dataSourceComponents/dataSourceTable/index.d.ts +3 -2
  45. package/es/components/dataSourceComponents/dataSourceTable/index.js +7 -4
  46. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +2 -2
  47. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +42 -5
  48. package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +1 -1
  49. package/es/components/dataSourceComponents/fields/DatePicker/index.js +13 -0
  50. package/es/components/dataSourceComponents/fields/DatePicker/type.d.ts +1 -0
  51. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +5 -0
  52. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.js +18 -0
  53. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.less +6 -0
  54. package/es/components/dataSourceComponents/fields/IconSelect/WithMode.d.ts +4 -0
  55. package/es/components/dataSourceComponents/fields/IconSelect/WithMode.js +5 -0
  56. package/es/components/dataSourceComponents/fields/IconSelect/index.d.ts +3 -0
  57. package/es/components/dataSourceComponents/fields/IconSelect/index.js +4 -0
  58. package/es/components/dataSourceComponents/fields/IconSelect/type.d.ts +8 -0
  59. package/es/components/dataSourceComponents/fields/IconSelect/type.js +1 -0
  60. package/es/components/dataSourceComponents/fields/Input/WithMode.d.ts +3 -3
  61. package/es/components/dataSourceComponents/fields/Input/WithMode.js +8 -1
  62. package/es/components/dataSourceComponents/fields/Input/type.d.ts +2 -0
  63. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
  64. package/es/components/dataSourceComponents/fields/Select/index.js +2 -1
  65. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +12 -54
  66. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.js +2 -2
  67. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.less +1 -0
  68. package/es/components/dataSourceComponents/fields/Upload/index.js +35 -1
  69. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  70. package/es/components/dataSourceComponents/fields/index.d.ts +5 -2
  71. package/es/components/dataSourceComponents/fields/index.js +3 -1
  72. package/es/components/dataSourceComponents/hooks/useActions.js +10 -4
  73. package/es/components/dataSourceComponents/hooks/useValueMap.js +2 -2
  74. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +8 -0
  75. package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.js +2 -1
  76. package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +11 -3
  77. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +3 -0
  78. package/es/components/date-picker/datePickerCpt.js +4 -2
  79. package/es/components/iconSelect/index.d.ts +10 -0
  80. package/es/components/iconSelect/index.js +217 -0
  81. package/es/components/iconSelect/index.less +54 -0
  82. package/es/components/iconSelect/utils.d.ts +14 -0
  83. package/es/components/iconSelect/utils.js +102 -0
  84. package/es/components/image/avatar.png +0 -0
  85. package/es/components/image/image.png +0 -0
  86. package/es/components/image/index.d.ts +10 -0
  87. package/es/components/image/index.js +25 -0
  88. package/es/components/image/product.png +0 -0
  89. package/es/components/page-header/index.less +4 -4
  90. package/es/components/pisellAppCard/PisellAppCard.d.ts +5 -0
  91. package/es/components/pisellAppCard/PisellAppCard.js +80 -0
  92. package/es/components/pisellAppCard/PisellAppCard.less +55 -0
  93. package/es/components/pisellAppCard/index.d.ts +3 -0
  94. package/es/components/pisellAppCard/index.js +2 -0
  95. package/es/components/pisellAppCard/types.d.ts +34 -0
  96. package/es/components/pisellAppCard/types.js +1 -0
  97. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +1 -0
  98. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +3 -1
  99. package/es/components/pisellDraggable/components/TreeItem/TreeItem.js +11 -3
  100. package/es/components/pisellDraggable/index.d.ts +8 -3
  101. package/es/components/pisellDraggable/index.js +98 -15
  102. package/es/components/pisellDraggable/types.d.ts +2 -0
  103. package/es/components/pisellDraggable/utilities.js +10 -6
  104. package/es/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  105. package/es/components/pisellDropSort/PisellDropSort.js +94 -0
  106. package/es/components/pisellDropSort/PisellDropSort.less +92 -0
  107. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +25 -0
  108. package/es/components/pisellDropSort/components/SortableItem/index.js +104 -0
  109. package/es/components/pisellDropSort/components/SortableItem/index.less +157 -0
  110. package/es/components/pisellDropSort/index.d.ts +3 -0
  111. package/es/components/pisellDropSort/index.js +2 -0
  112. package/es/components/pisellDropSort/types.d.ts +52 -0
  113. package/es/components/pisellDropSort/types.js +1 -0
  114. package/es/components/pisellEmpty/index.d.ts +2 -0
  115. package/es/components/pisellEmpty/index.js +6 -2
  116. package/es/components/pisellLayout/content.d.ts +2 -0
  117. package/es/components/pisellLayout/content.js +26 -4
  118. package/es/components/pisellLayout/footer.d.ts +1 -0
  119. package/es/components/pisellLayout/footer.js +18 -3
  120. package/es/components/pisellLayout/header.d.ts +3 -0
  121. package/es/components/pisellLayout/header.js +26 -3
  122. package/es/components/pisellLayout/index.js +4 -1
  123. package/es/components/pisellLayout/index.less +23 -0
  124. package/es/components/pisellLayout/sider.d.ts +1 -0
  125. package/es/components/pisellLayout/sider.js +38 -3
  126. package/es/components/pisellMenu/PisellMenu.d.ts +5 -1
  127. package/es/components/pisellMenu/PisellMenu.js +10 -4
  128. package/es/components/pisellMenu/types.d.ts +6 -10
  129. package/es/components/pisellModal/components/Information/index.js +0 -1
  130. package/es/components/pisellModal/components/MobileModal/index.js +42 -2
  131. package/es/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  132. package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +218 -0
  133. package/es/components/pisellNavigationMenu/PisellNavigationMenu.less +65 -0
  134. package/es/components/pisellNavigationMenu/index.d.ts +3 -0
  135. package/es/components/pisellNavigationMenu/index.js +2 -0
  136. package/es/components/pisellNavigationMenu/types.d.ts +64 -0
  137. package/es/components/pisellNavigationMenu/types.js +1 -0
  138. package/es/components/pisellNavigationMenu/utils.d.ts +15 -0
  139. package/es/components/pisellNavigationMenu/utils.js +29 -0
  140. package/es/components/table/Table/utils.d.ts +1 -1
  141. package/es/components/versionModal/index.d.ts +8 -0
  142. package/es/components/versionModal/index.js +41 -9
  143. package/es/components/versionModal/index.less +9 -2
  144. package/es/components/versionSelect/index.d.ts +18 -0
  145. package/es/components/versionSelect/index.js +53 -0
  146. package/es/components/versionSelect/index.less +3 -0
  147. package/es/hooks/useEngineContext.js +11 -0
  148. package/es/index.d.ts +11 -1
  149. package/es/index.js +11 -2
  150. package/es/locales/en-US.d.ts +25 -0
  151. package/es/locales/en-US.js +34 -1
  152. package/es/locales/zh-CN.d.ts +25 -0
  153. package/es/locales/zh-CN.js +33 -1
  154. package/es/locales/zh-TW.d.ts +26 -0
  155. package/es/locales/zh-TW.js +35 -1
  156. package/es/typings.d.ts +4 -0
  157. package/lib/components/Pagination/index.d.ts +1 -1
  158. package/lib/components/appVersionControl/index.d.ts +5 -0
  159. package/lib/components/appVersionControl/index.js +188 -0
  160. package/lib/components/appVersionControl/index.less +35 -0
  161. package/lib/components/appVersionControl/types.d.ts +24 -0
  162. package/lib/components/appVersionControl/types.js +17 -0
  163. package/lib/components/appVersionControl/utils.d.ts +13 -0
  164. package/lib/components/appVersionControl/utils.js +52 -0
  165. package/lib/components/customSelect/index.d.ts +17 -0
  166. package/lib/components/customSelect/index.js +59 -0
  167. package/lib/components/customSelect/index.less +7 -0
  168. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +1 -1
  169. package/lib/components/dataSourceComponents/dataSourceForm/group/index.js +13 -6
  170. package/lib/components/dataSourceComponents/dataSourceForm/group/index.less +1 -1
  171. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +1 -1
  172. package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.js +1 -1
  173. package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +2 -2
  174. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.d.ts +1 -0
  175. package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +4 -3
  176. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +6 -3
  177. package/lib/components/dataSourceComponents/dataSourceForm/utils.js +118 -16
  178. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +2 -0
  179. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +92 -0
  180. package/lib/components/dataSourceComponents/dataSourceMenu/index.js +36 -6
  181. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.d.ts +6 -2
  182. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +27 -5
  183. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useColumns.js +5 -4
  184. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.d.ts +6 -2
  185. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useFormat.js +75 -1
  186. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +7 -2
  187. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +21 -10
  188. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  189. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +7 -1
  190. package/lib/components/dataSourceComponents/dataSourceTable/index.d.ts +3 -2
  191. package/lib/components/dataSourceComponents/dataSourceTable/index.js +3 -3
  192. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +2 -2
  193. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +37 -3
  194. package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +1 -1
  195. package/lib/components/dataSourceComponents/fields/DatePicker/index.js +9 -0
  196. package/lib/components/dataSourceComponents/fields/DatePicker/type.d.ts +1 -0
  197. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +5 -0
  198. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.js +52 -0
  199. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.less +6 -0
  200. package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.d.ts +4 -0
  201. package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.js +39 -0
  202. package/lib/components/dataSourceComponents/fields/IconSelect/index.d.ts +3 -0
  203. package/lib/components/dataSourceComponents/fields/IconSelect/index.js +38 -0
  204. package/lib/components/dataSourceComponents/fields/IconSelect/type.d.ts +8 -0
  205. package/lib/components/dataSourceComponents/fields/IconSelect/type.js +17 -0
  206. package/lib/components/dataSourceComponents/fields/Input/WithMode.d.ts +3 -3
  207. package/lib/components/dataSourceComponents/fields/Input/WithMode.js +6 -2
  208. package/lib/components/dataSourceComponents/fields/Input/type.d.ts +2 -0
  209. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -0
  210. package/lib/components/dataSourceComponents/fields/Select/index.js +2 -1
  211. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +0 -35
  212. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.js +1 -1
  213. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.less +1 -0
  214. package/lib/components/dataSourceComponents/fields/Upload/index.js +25 -1
  215. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  216. package/lib/components/dataSourceComponents/fields/index.d.ts +5 -2
  217. package/lib/components/dataSourceComponents/fields/index.js +3 -1
  218. package/lib/components/dataSourceComponents/hooks/useActions.js +4 -1
  219. package/lib/components/dataSourceComponents/hooks/useValueMap.js +1 -1
  220. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +8 -0
  221. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.js +3 -1
  222. package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +9 -1
  223. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +3 -0
  224. package/lib/components/date-picker/datePickerCpt.js +4 -2
  225. package/lib/components/iconSelect/index.d.ts +10 -0
  226. package/lib/components/iconSelect/index.js +189 -0
  227. package/lib/components/iconSelect/index.less +54 -0
  228. package/lib/components/iconSelect/utils.d.ts +14 -0
  229. package/lib/components/iconSelect/utils.js +119 -0
  230. package/lib/components/image/avatar.png +0 -0
  231. package/lib/components/image/image.png +0 -0
  232. package/lib/components/image/index.d.ts +10 -0
  233. package/lib/components/image/index.js +59 -0
  234. package/lib/components/image/product.png +0 -0
  235. package/lib/components/page-header/index.less +4 -4
  236. package/lib/components/pisellAppCard/PisellAppCard.d.ts +5 -0
  237. package/lib/components/pisellAppCard/PisellAppCard.js +107 -0
  238. package/lib/components/pisellAppCard/PisellAppCard.less +55 -0
  239. package/lib/components/pisellAppCard/index.d.ts +3 -0
  240. package/lib/components/pisellAppCard/index.js +36 -0
  241. package/lib/components/pisellAppCard/types.d.ts +34 -0
  242. package/lib/components/pisellAppCard/types.js +17 -0
  243. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +1 -0
  244. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +3 -1
  245. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.js +9 -2
  246. package/lib/components/pisellDraggable/index.d.ts +8 -3
  247. package/lib/components/pisellDraggable/index.js +67 -13
  248. package/lib/components/pisellDraggable/types.d.ts +2 -0
  249. package/lib/components/pisellDraggable/utilities.js +9 -6
  250. package/lib/components/pisellDropSort/PisellDropSort.d.ts +5 -0
  251. package/lib/components/pisellDropSort/PisellDropSort.js +143 -0
  252. package/lib/components/pisellDropSort/PisellDropSort.less +92 -0
  253. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +25 -0
  254. package/lib/components/pisellDropSort/components/SortableItem/index.js +171 -0
  255. package/lib/components/pisellDropSort/components/SortableItem/index.less +157 -0
  256. package/lib/components/pisellDropSort/index.d.ts +3 -0
  257. package/lib/components/pisellDropSort/index.js +36 -0
  258. package/lib/components/pisellDropSort/types.d.ts +52 -0
  259. package/lib/components/pisellDropSort/types.js +17 -0
  260. package/lib/components/pisellEmpty/index.d.ts +2 -0
  261. package/lib/components/pisellEmpty/index.js +2 -1
  262. package/lib/components/pisellLayout/content.d.ts +2 -0
  263. package/lib/components/pisellLayout/content.js +14 -3
  264. package/lib/components/pisellLayout/footer.d.ts +1 -0
  265. package/lib/components/pisellLayout/footer.js +8 -2
  266. package/lib/components/pisellLayout/header.d.ts +3 -0
  267. package/lib/components/pisellLayout/header.js +13 -2
  268. package/lib/components/pisellLayout/index.js +3 -0
  269. package/lib/components/pisellLayout/index.less +23 -0
  270. package/lib/components/pisellLayout/sider.d.ts +1 -0
  271. package/lib/components/pisellLayout/sider.js +30 -2
  272. package/lib/components/pisellMenu/PisellMenu.d.ts +5 -1
  273. package/lib/components/pisellMenu/PisellMenu.js +12 -4
  274. package/lib/components/pisellMenu/types.d.ts +6 -10
  275. package/lib/components/pisellModal/components/Information/index.js +0 -1
  276. package/lib/components/pisellModal/components/MobileModal/index.js +39 -1
  277. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  278. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +231 -0
  279. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.less +65 -0
  280. package/lib/components/pisellNavigationMenu/index.d.ts +3 -0
  281. package/lib/components/pisellNavigationMenu/index.js +36 -0
  282. package/lib/components/pisellNavigationMenu/types.d.ts +64 -0
  283. package/lib/components/pisellNavigationMenu/types.js +17 -0
  284. package/lib/components/pisellNavigationMenu/utils.d.ts +15 -0
  285. package/lib/components/pisellNavigationMenu/utils.js +44 -0
  286. package/lib/components/table/Table/utils.d.ts +1 -1
  287. package/lib/components/versionModal/index.d.ts +8 -0
  288. package/lib/components/versionModal/index.js +35 -8
  289. package/lib/components/versionModal/index.less +9 -2
  290. package/lib/components/versionSelect/index.d.ts +18 -0
  291. package/lib/components/versionSelect/index.js +91 -0
  292. package/lib/components/versionSelect/index.less +3 -0
  293. package/lib/hooks/useEngineContext.js +6 -0
  294. package/lib/index.d.ts +11 -1
  295. package/lib/index.js +26 -1
  296. package/lib/locales/en-US.d.ts +25 -0
  297. package/lib/locales/en-US.js +32 -1
  298. package/lib/locales/zh-CN.d.ts +25 -0
  299. package/lib/locales/zh-CN.js +31 -1
  300. package/lib/locales/zh-TW.d.ts +26 -0
  301. package/lib/locales/zh-TW.js +33 -1
  302. package/lib/typings.d.ts +4 -0
  303. package/lowcode/_setters/antd-icon-setter/index.tsx +11 -4
  304. package/lowcode/_utils/defaultSchema.ts +18 -1
  305. package/lowcode/app-version-control/meta.ts +92 -0
  306. package/lowcode/custom-select/meta.ts +202 -0
  307. package/lowcode/custom-select/snippets.ts +33 -0
  308. package/lowcode/data-source-form/constants.ts +2 -1
  309. package/lowcode/data-source-form/meta.ts +1 -1
  310. package/lowcode/data-source-image/meta.ts +1 -1
  311. package/lowcode/data-source-menu/meta.ts +66 -6
  312. package/lowcode/data-source-qrcode/meta.ts +1 -1
  313. package/lowcode/data-source-table/meta.ts +26 -4
  314. package/lowcode/data-source-table/snippets.ts +1 -1
  315. package/lowcode/data-source-typography.text/meta.ts +1 -1
  316. package/lowcode/data-source-wrapper/meta.ts +1 -1
  317. package/lowcode/form-group/meta.ts +1 -1
  318. package/lowcode/form-item-checkbox/meta.ts +1 -1
  319. package/lowcode/form-item-checkbox.group/meta.ts +1 -1
  320. package/lowcode/form-item-color-picker/meta.ts +1 -1
  321. package/lowcode/form-item-date-picker/meta.ts +14 -1
  322. package/lowcode/form-item-icon-select/meta.ts +65 -0
  323. package/lowcode/form-item-icon-select/snippets.ts +12 -0
  324. package/lowcode/form-item-input/meta.ts +13 -1
  325. package/lowcode/form-item-input-number/meta.ts +1 -1
  326. package/lowcode/form-item-input.email/meta.ts +1 -1
  327. package/lowcode/form-item-input.json/meta.ts +1 -1
  328. package/lowcode/form-item-input.mobile/meta.ts +1 -1
  329. package/lowcode/form-item-input.password/meta.ts +1 -1
  330. package/lowcode/form-item-input.phone/meta.ts +1 -1
  331. package/lowcode/form-item-input.subdomain/meta.ts +1 -1
  332. package/lowcode/form-item-input.text-area/meta.ts +1 -1
  333. package/lowcode/form-item-input.url/meta.ts +1 -1
  334. package/lowcode/form-item-radio/meta.ts +1 -1
  335. package/lowcode/form-item-radio.group/meta.ts +1 -1
  336. package/lowcode/form-item-select/meta.ts +1 -1
  337. package/lowcode/form-item-time-picker/meta.ts +1 -1
  338. package/lowcode/form-item-translation/meta.ts +2 -2
  339. package/lowcode/form-item-upload/meta.ts +1 -1
  340. package/lowcode/icon-select/meta.ts +98 -0
  341. package/lowcode/image/meta.ts +19 -0
  342. package/lowcode/image/snippets.ts +1 -0
  343. package/lowcode/json-wrapper/meta.ts +1 -1
  344. package/lowcode/pisell-app-card/meta.ts +286 -0
  345. package/lowcode/pisell-content/__screenshots__/content.png +0 -0
  346. package/lowcode/pisell-content/meta.ts +28 -5
  347. package/lowcode/pisell-drop-sort/meta.ts +362 -0
  348. package/lowcode/pisell-footer/__screenshots__/footer.png +0 -0
  349. package/lowcode/pisell-footer/meta.ts +17 -4
  350. package/lowcode/pisell-header/__screenshots__/header.png +0 -0
  351. package/lowcode/pisell-header/meta.ts +29 -5
  352. package/lowcode/pisell-layout/__screenshots__/layout.png +0 -0
  353. package/lowcode/pisell-layout/meta.ts +10 -5
  354. package/lowcode/pisell-navigation-menu/meta.ts +125 -0
  355. package/lowcode/pisell-sider/__screenshots__/sider.png +0 -0
  356. package/lowcode/pisell-sider/meta.ts +41 -4
  357. package/lowcode/submit-button/meta.ts +15 -1
  358. package/package.json +28 -26
@@ -1,11 +1,11 @@
1
1
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
3
4
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
4
5
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
5
6
  function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
7
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
8
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
9
9
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
10
10
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
11
11
  import React, { useMemo, useEffect } from 'react';
@@ -21,6 +21,7 @@ import useDataSource from "../../hooks/useDataSource";
21
21
  import PisellToast from "../../../pisellToast";
22
22
  import { getText } from "../../../../locales";
23
23
  import PisellModal from "../../../pisellModal";
24
+ import dayjs from 'dayjs';
24
25
  /**
25
26
  * 处理table的props
26
27
  * 转换title
@@ -56,7 +57,8 @@ var useTableProps = function useTableProps(props) {
56
57
  var componentId = useComponentId(originProps);
57
58
  var _useDataSource = useDataSource(),
58
59
  list = _useDataSource.list,
59
- destroy = _useDataSource.destroy;
60
+ destroy = _useDataSource.destroy,
61
+ update = _useDataSource.update;
60
62
  var data = list.data;
61
63
  var pagination = usePagination({
62
64
  data: data
@@ -107,25 +109,40 @@ var useTableProps = function useTableProps(props) {
107
109
 
108
110
  // 删除记录
109
111
  var handleDelete = useMemoizedFn( /*#__PURE__*/function () {
110
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record) {
112
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(record, softDelete) {
111
113
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
112
114
  while (1) switch (_context2.prev = _context2.next) {
113
115
  case 0:
114
116
  try {
115
117
  registerValueVariable === null || registerValueVariable === void 0 ? void 0 : registerValueVariable(componentId, {
116
- currentRecord: record
118
+ currentRecord: _objectSpread({}, record)
117
119
  });
118
120
  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
121
+ var deleteTime;
119
122
  return _regeneratorRuntime().wrap(function _callee$(_context) {
120
123
  while (1) switch (_context.prev = _context.next) {
121
124
  case 0:
122
- destroy === null || destroy === void 0 ? void 0 : destroy.runAsync(record.id).then(function () {
123
- refreshData();
124
- PisellToast({
125
- content: getText('pisell-action-delete-success')
126
- });
125
+ if (!softDelete) {
126
+ _context.next = 6;
127
+ break;
128
+ }
129
+ deleteTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
130
+ _context.next = 4;
131
+ return update === null || update === void 0 ? void 0 : update.runAsync(_objectSpread(_objectSpread({}, record), {}, {
132
+ deleted_at: deleteTime
133
+ }));
134
+ case 4:
135
+ _context.next = 8;
136
+ break;
137
+ case 6:
138
+ _context.next = 8;
139
+ return destroy === null || destroy === void 0 ? void 0 : destroy.runAsync(record.id);
140
+ case 8:
141
+ refreshData();
142
+ PisellToast({
143
+ content: getText('pisell-action-delete-success')
127
144
  });
128
- case 1:
145
+ case 10:
129
146
  case "end":
130
147
  return _context.stop();
131
148
  }
@@ -143,7 +160,7 @@ var useTableProps = function useTableProps(props) {
143
160
  }
144
161
  }, _callee2);
145
162
  }));
146
- return function (_x) {
163
+ return function (_x, _x2) {
147
164
  return _ref2.apply(this, arguments);
148
165
  };
149
166
  }());
@@ -166,7 +183,8 @@ var useTableProps = function useTableProps(props) {
166
183
  var label = item.label,
167
184
  actionType = item.actionType,
168
185
  show = item.show;
169
- var handleClick = function handleClick() {
186
+ var handleClick = function handleClick(e) {
187
+ e.stopPropagation();
170
188
  if (actionType === 'delete') {
171
189
  PisellModal.confirm({
172
190
  title: getText('pisell-delete-confirm-title'),
@@ -174,7 +192,7 @@ var useTableProps = function useTableProps(props) {
174
192
  okText: getText('pisell-delete-confirm-ok'),
175
193
  cancelText: getText('pisell-delete-confirm-cancel'),
176
194
  onOk: function onOk() {
177
- handleDelete(record);
195
+ handleDelete(record, item === null || item === void 0 ? void 0 : item.softDelete);
178
196
  }
179
197
  });
180
198
  return;
@@ -219,6 +237,8 @@ var useTableProps = function useTableProps(props) {
219
237
  buttonProps = button.buttonProps,
220
238
  beforeOpen = button.beforeOpen;
221
239
  return _objectSpread(_objectSpread(_objectSpread({}, button), buttonProps), {}, {
240
+ title: button.label,
241
+ size: "large",
222
242
  onClick: function onClick() {
223
243
  if (actionType === 'add') {
224
244
  var result = true;
@@ -28,5 +28,6 @@ declare const useTableQuery: (props: DataSourceTableProps) => {
28
28
  handleValuesChange: (params: Params, allParams: Params) => void;
29
29
  refreshData: () => void;
30
30
  handleFilterChange: (changedFields: any, allFields: any) => void;
31
+ refreshCurrentPage: () => void;
31
32
  };
32
33
  export default useTableQuery;
@@ -69,12 +69,18 @@ var useTableQuery = function useTableQuery(props) {
69
69
  });
70
70
  });
71
71
  });
72
+ var refreshCurrentPage = useMemoizedFn(function () {
73
+ setQueryPageConfig(function (prev) {
74
+ return _objectSpread({}, prev);
75
+ });
76
+ });
72
77
  return {
73
78
  queryPageConfig: queryPageConfig,
74
79
  setQueryPageConfig: setQueryPageConfig,
75
80
  handleValuesChange: handleValuesChange,
76
81
  refreshData: refreshData,
77
- handleFilterChange: handleFilterChange
82
+ handleFilterChange: handleFilterChange,
83
+ refreshCurrentPage: refreshCurrentPage
78
84
  };
79
85
  };
80
86
  export default useTableQuery;
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
+ import { TableRef } from './BaseTable';
2
3
  import './index.less';
3
4
  import { DataSourceTableProps } from './type';
4
- declare const DataSourceTable: (props: DataSourceTableProps) => React.JSX.Element;
5
- export default DataSourceTable;
5
+ declare const _default: React.ForwardRefExoticComponent<DataSourceTableProps & React.RefAttributes<TableRef>>;
6
+ export default _default;
@@ -1,8 +1,9 @@
1
- import React from 'react';
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React, { forwardRef } from 'react';
2
3
  import BaseTable from "./BaseTable";
3
4
  import DataSourceProvider from "../provider/dataSource/DataSourceProvider";
4
5
  import "./index.less";
5
- var DataSourceTable = function DataSourceTable(props) {
6
+ var DataSourceTable = function DataSourceTable(props, ref) {
6
7
  var dataSource = props.dataSource,
7
8
  __designMode = props.__designMode,
8
9
  extraParams = props.extraParams;
@@ -10,6 +11,8 @@ var DataSourceTable = function DataSourceTable(props) {
10
11
  dataSource: dataSource,
11
12
  __designMode: __designMode,
12
13
  extraParams: extraParams
13
- }, /*#__PURE__*/React.createElement(BaseTable, props));
14
+ }, /*#__PURE__*/React.createElement(BaseTable, _extends({}, props, {
15
+ ref: ref
16
+ })));
14
17
  };
15
- export default DataSourceTable;
18
+ export default /*#__PURE__*/forwardRef(DataSourceTable);
@@ -1,5 +1,5 @@
1
- import React from 'react';
1
+ import type { FC } from 'react';
2
2
  import { DatePickerProps } from './type';
3
3
  import './ReadPretty.less';
4
- declare const DatePickerReadPretty: (props: DatePickerProps) => React.JSX.Element;
4
+ declare const DatePickerReadPretty: FC<DatePickerProps>;
5
5
  export default DatePickerReadPretty;
@@ -1,14 +1,51 @@
1
- import React from 'react';
1
+ import React, { useMemo } from 'react';
2
2
  import classNames from 'classnames';
3
3
  import dayjs from 'dayjs';
4
+ import usePisellConfig from "../../../pisell-config-provider/hooks/usePisellConfig";
4
5
  import "./ReadPretty.less";
5
- var DatePickerReadPretty = function DatePickerReadPretty(props) {
6
- var value = props.value,
7
- renderMode = props.renderMode;
6
+ var DEFAULT_FORMAT = 'YYYY-MM-DD HH:mm:ss';
7
+ var DATE_FORMATS = {
8
+ 'zh-CN': {
9
+ withTime: 'YYYY-MM-DD HH:mm:ss',
10
+ withoutTime: 'YYYY-MM-DD'
11
+ },
12
+ 'en-US': {
13
+ withTime: 'HH:mm:ss YYYY-MM-DD',
14
+ withoutTime: 'YYYY-MM-DD'
15
+ }
16
+ };
17
+ var DatePickerReadPretty = function DatePickerReadPretty(_ref) {
18
+ var value = _ref.value,
19
+ renderMode = _ref.renderMode,
20
+ showTime = _ref.showTime;
21
+ var _usePisellConfig = usePisellConfig(),
22
+ _usePisellConfig$loca = _usePisellConfig.locale,
23
+ locale = _usePisellConfig$loca === void 0 ? 'zh-CN' : _usePisellConfig$loca;
24
+ var dateFormat = useMemo(function () {
25
+ if (locale in DATE_FORMATS) {
26
+ var formats = DATE_FORMATS[locale];
27
+ return showTime ? formats.withTime : formats.withoutTime;
28
+ }
29
+ if (process.env.NODE_ENV !== 'production') {
30
+ console.warn("Unsupported locale: ".concat(locale, ", falling back to default format"));
31
+ }
32
+ return DEFAULT_FORMAT;
33
+ }, [locale, showTime]);
34
+ var formattedDate = useMemo(function () {
35
+ if (!value) return '';
36
+ try {
37
+ return dayjs(value).format(dateFormat);
38
+ } catch (error) {
39
+ if (process.env.NODE_ENV !== 'production') {
40
+ console.error('Error formatting date:', error);
41
+ }
42
+ return '';
43
+ }
44
+ }, [value, dateFormat]);
8
45
  return /*#__PURE__*/React.createElement("span", {
9
46
  className: classNames('pisell-date-picker-read-pretty', {
10
47
  'pisell-date-picker-read-pretty-table-view': renderMode === 'tableView'
11
48
  })
12
- }, value ? dayjs(value).format('YYYY-MM-DD HH:mm:ss') : '');
49
+ }, formattedDate);
13
50
  };
14
51
  export default DatePickerReadPretty;
@@ -11,7 +11,7 @@ import ReadPretty from "./ReadPretty";
11
11
  import { withMode } from "../../dataSourceForm/utils";
12
12
  var DatePickerWithMode = withMode(DatePickerCpt, ReadPretty, function (props) {
13
13
  return _objectSpread(_objectSpread({}, props), {}, {
14
- value: isString(props.value) ? dayjs(props.value) : props.value
14
+ value: isString(props.value) && props.value ? dayjs(props.value) : props.value
15
15
  });
16
16
  });
17
17
  export default DatePickerWithMode;
@@ -1,10 +1,23 @@
1
1
  import { withFormItem } from "../../dataSourceForm/utils";
2
2
  import DatePickerWithMode from "./WithMode";
3
+ import dayjs from 'dayjs';
3
4
  var DatePicker = withFormItem(DatePickerWithMode, {
4
5
  innerProps: {
5
6
  style: {
6
7
  width: '100%'
7
8
  }
9
+ },
10
+ otherFormItemProps: function otherFormItemProps(props) {
11
+ return {
12
+ normalize: function normalize(value) {
13
+ return value && dayjs(value).format(props.submitFormat || "YYYY-MM-DD");
14
+ },
15
+ getValueProps: function getValueProps(value) {
16
+ return {
17
+ value: value && dayjs(value)
18
+ };
19
+ }
20
+ };
8
21
  }
9
22
  });
10
23
  export default DatePicker;
@@ -2,4 +2,5 @@ import { DatePickerProps as AntDatePickerProps } from 'antd';
2
2
  import { ModeType } from '../../dataSourceForm/type';
3
3
  export interface DatePickerProps extends Omit<AntDatePickerProps, 'renderMode'> {
4
4
  renderMode: ModeType;
5
+ showTime?: boolean;
5
6
  }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { IconSelectProps } from './type';
3
+ import './ReadPretty.less';
4
+ declare const IconSelectReadPretty: (props: IconSelectProps) => React.JSX.Element | null;
5
+ export default IconSelectReadPretty;
@@ -0,0 +1,18 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+ import React from 'react';
3
+ import { Button } from 'antd';
4
+ import Icon from "../../../icon";
5
+ import "./ReadPretty.less";
6
+ var IconSelectReadPretty = function IconSelectReadPretty(props) {
7
+ if (!props.value) {
8
+ return null;
9
+ }
10
+ return /*#__PURE__*/React.createElement(Button, {
11
+ size: "large",
12
+ icon: /*#__PURE__*/React.createElement(Icon, _extends({
13
+ type: props.value
14
+ }, props)),
15
+ className: "pisell-icon-select-read-pretty"
16
+ });
17
+ };
18
+ export default IconSelectReadPretty;
@@ -0,0 +1,6 @@
1
+ .pisell-icon-select-read-pretty {
2
+ font-size: 24px;
3
+ display: flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ }
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { IconSelectProps } from './type';
3
+ declare const IconSelectWithMode: import("react").FC<IconSelectProps & import("../../dataSourceForm/utils").WithModeProps>;
4
+ export default IconSelectWithMode;
@@ -0,0 +1,5 @@
1
+ import IconSelect from "../../../iconSelect";
2
+ import ReadPretty from "./ReadPretty";
3
+ import { withMode } from "../../dataSourceForm/utils";
4
+ var IconSelectWithMode = withMode(IconSelect, ReadPretty);
5
+ export default IconSelectWithMode;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const IconSelect: React.FC<import("./type").IconSelectProps & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps>;
3
+ export default IconSelect;
@@ -0,0 +1,4 @@
1
+ import { withFormItem } from "../../dataSourceForm/utils";
2
+ import IconSelectWithMode from "./WithMode";
3
+ var IconSelect = withFormItem(IconSelectWithMode);
4
+ export default IconSelect;
@@ -0,0 +1,8 @@
1
+ import { ModeType } from "../../dataSourceForm/type";
2
+ export interface IconSelectProps {
3
+ renderMode: ModeType;
4
+ value?: string;
5
+ defaultValue?: string;
6
+ disabled?: boolean;
7
+ onChange?: (value: string) => void;
8
+ }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { InputProps } from 'antd';
3
- declare const InputWithMode: import("react").FC<InputProps & import("../../dataSourceForm/utils").WithModeProps>;
1
+ import React from 'react';
2
+ import { InputProps } from './type';
3
+ declare const InputWithMode: React.FC<InputProps & import("../../dataSourceForm/utils").WithModeProps>;
4
4
  export default InputWithMode;
@@ -1,5 +1,12 @@
1
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
2
  import { Input as AntInput } from 'antd';
3
+ import React from 'react';
2
4
  import ReadPretty from "./ReadPretty";
3
5
  import { withMode } from "../../dataSourceForm/utils";
4
- var InputWithMode = withMode(AntInput, ReadPretty);
6
+ var Input = function Input(props) {
7
+ return /*#__PURE__*/React.createElement(AntInput, _extends({}, props, {
8
+ ref: props.innerRef || undefined
9
+ }));
10
+ };
11
+ var InputWithMode = withMode(Input, ReadPretty);
5
12
  export default InputWithMode;
@@ -1,5 +1,7 @@
1
+ import { Ref } from 'react';
1
2
  import { InputProps as AntInputProps } from 'antd';
2
3
  import { ModeType } from "../../dataSourceForm/type";
3
4
  export interface InputProps extends AntInputProps {
4
5
  renderMode: ModeType;
6
+ innerRef: Ref<any>;
5
7
  }
@@ -4,6 +4,7 @@ declare const SelectWithDataSource: (props: import("antd").SelectProps<any, impo
4
4
  optionSourceType?: "default" | "custom" | "api" | undefined;
5
5
  labelField: string;
6
6
  valueField: string;
7
+ extraParams?: Record<string, any> | undefined;
7
8
  } & {
8
9
  dataSource?: any;
9
10
  }) => React.JSX.Element;
@@ -6,7 +6,8 @@ var SelectWithFormItem = withFormItem(SelectWithMode, {
6
6
  innerProps: {
7
7
  getPopupContainer: function getPopupContainer(triggerNode) {
8
8
  return triggerNode.parentElement;
9
- }
9
+ },
10
+ virtual: false
10
11
  }
11
12
  });
12
13
 
@@ -34,7 +34,7 @@ import PisellUpload from "../../../pisellUpload";
34
34
  import useEngineContext from "../../../../hooks/useEngineContext";
35
35
  import { getText } from "../../../../locales";
36
36
  import { DEFAULT_MAX_COUNT, SUPPORTED_LANGUAGES } from "./constants";
37
- import { getPointSuffix, checkFileCount, getFileType, getMediaMetadata, getFileMetadataParams, getDefaultFileList, createMultilingualData, createMultilingualFileList, isValueEqual } from "./utils";
37
+ import { getPointSuffix, getFileType, getMediaMetadata, getFileMetadataParams, getDefaultFileList, createMultilingualData, createMultilingualFileList, isValueEqual } from "./utils";
38
38
 
39
39
  // @ts-ignore
40
40
  import fallback from "./fallback.png";
@@ -381,7 +381,7 @@ var BaseUpload = function BaseUpload(props) {
381
381
  }, []);
382
382
  var beforeUpload = useCallback( /*#__PURE__*/function () {
383
383
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(file, newFileList) {
384
- var currentFileCount, fileType, typeMaxSize, _maxSize, pointSuffix, _checkFileCount, success, message, metadata, cover, restMetadata;
384
+ var currentFileCount, fileType, typeMaxSize, _maxSize, pointSuffix, metadata, cover, restMetadata;
385
385
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
386
386
  while (1) switch (_context2.prev = _context2.next) {
387
387
  case 0:
@@ -409,42 +409,29 @@ var BaseUpload = function BaseUpload(props) {
409
409
  typeError.run(getText('pisell-upload-setting-type-error')(pointSuffix));
410
410
  return _context2.abrupt("return", Upload.LIST_IGNORE);
411
411
  case 12:
412
- _checkFileCount = checkFileCount({
413
- minCount: minCount || 0,
414
- maxCount: maxCount || DEFAULT_MAX_COUNT,
415
- valueLength: fileList.length + currentFileCount,
416
- multiple: !!multiple
417
- }), success = _checkFileCount.success, message = _checkFileCount.message;
418
- if (success) {
419
- _context2.next = 16;
420
- break;
421
- }
422
- countError.run(message);
423
- return _context2.abrupt("return", Upload.LIST_IGNORE);
424
- case 16:
425
- _context2.prev = 16;
426
- _context2.next = 19;
412
+ _context2.prev = 12;
413
+ _context2.next = 15;
427
414
  return getMediaMetadata(file);
428
- case 19:
415
+ case 15:
429
416
  metadata = _context2.sent;
430
417
  if (metadata) {
431
418
  cover = metadata.cover, restMetadata = _objectWithoutProperties(metadata, _excluded2);
432
419
  file.metadata = restMetadata;
433
420
  file.cover = cover;
434
421
  }
435
- _context2.next = 26;
422
+ _context2.next = 22;
436
423
  break;
437
- case 23:
438
- _context2.prev = 23;
439
- _context2.t0 = _context2["catch"](16);
424
+ case 19:
425
+ _context2.prev = 19;
426
+ _context2.t0 = _context2["catch"](12);
440
427
  console.error('获取媒体元数据失败:', _context2.t0);
441
- case 26:
428
+ case 22:
442
429
  return _context2.abrupt("return", file);
443
- case 27:
430
+ case 23:
444
431
  case "end":
445
432
  return _context2.stop();
446
433
  }
447
- }, _callee2, null, [[16, 23]]);
434
+ }, _callee2, null, [[12, 19]]);
448
435
  }));
449
436
  return function (_x3, _x4) {
450
437
  return _ref4.apply(this, arguments);
@@ -532,36 +519,7 @@ var BaseUpload = function BaseUpload(props) {
532
519
  headers: (propsGetHeaders === null || propsGetHeaders === void 0 ? void 0 : propsGetHeaders()) || (getHeaders === null || getHeaders === void 0 ? void 0 : getHeaders()),
533
520
  beforeUpload: beforeUpload,
534
521
  className: 'pisell-data-source-upload'
535
- // itemRender: (originNode: React.ReactElement, file: UploadFile) => {
536
- // const [itemUrl, setItemUrl] = useState<string>('');
537
-
538
- // useEffect(() => {
539
- // getItemUrl(file).then(setItemUrl);
540
- // }, [file]);
541
-
542
- // const newNode = React.cloneElement(originNode, {
543
- // children: React.Children.map(originNode.props.children, child => {
544
- // if (child?.type === 'a') {
545
- // return React.cloneElement(child, {
546
- // children: React.Children.map(child.props.children, grandChild => {
547
- // if (grandChild?.type === 'img') {
548
- // return React.cloneElement(grandChild, {
549
- // src: itemUrl,
550
- // onError: () => handleImageError(file)
551
- // });
552
- // }
553
- // return grandChild;
554
- // })
555
- // });
556
- // }
557
- // return child;
558
- // })
559
- // });
560
-
561
- // return newNode;
562
- // }
563
522
  });
564
-
565
523
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(PisellUpload, _extends({}, uploadProps, {
566
524
  fileList: fileList
567
525
  }), fileList.length >= calcMaxCount ? null : renderUploadButton(!!enableMultilingual)), /*#__PURE__*/React.createElement(PisellModal, {
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { Image } from 'antd';
2
+ import { Image, Space } from 'antd';
3
3
  import { isArr, isString } from '@pisell/utils';
4
4
  import useTranslationOriginal from "../../../../hooks/useTranslationOriginal";
5
5
 
@@ -29,7 +29,7 @@ var UploadReadPretty = function UploadReadPretty(props) {
29
29
  if (!normalizedValue.length) {
30
30
  return null;
31
31
  }
32
- return /*#__PURE__*/React.createElement("div", null, normalizedValue.map(function (item, index) {
32
+ return /*#__PURE__*/React.createElement(Space, null, normalizedValue.map(function (item, index) {
33
33
  return /*#__PURE__*/React.createElement(Image, {
34
34
  key: "".concat(String(item), "-").concat(index),
35
35
  className: "pisell-upload-read-pretty",
@@ -5,6 +5,7 @@
5
5
  padding: 10px;
6
6
  border-radius: 10px;
7
7
  border: 1px solid var(--Gray-300, #d0d5dd);
8
+ object-fit: contain;
8
9
  }
9
10
  .pisell-upload-read-pretty-mask {
10
11
  border-radius: 10px;