@pisell/materials 6.4.5 → 6.4.7

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 (333) 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 +1 -1
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +22 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -28
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/auto-complete-number/index.d.ts +0 -1
  20. package/es/components/badge/index.d.ts +0 -1
  21. package/es/components/batch-editor/fields/index.d.ts +0 -1
  22. package/es/components/calendar/index.d.ts +0 -1
  23. package/es/components/cardPro/index.d.ts +3 -0
  24. package/es/components/checkbox/index.d.ts +0 -1
  25. package/es/components/classicLayout/index.d.ts +0 -1
  26. package/es/components/colorPicker/index.d.ts +0 -1
  27. package/es/components/config-provider/index.d.ts +0 -1
  28. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  29. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  30. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
  31. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  32. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  33. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
  34. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
  35. package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  36. package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  37. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  38. package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  39. package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  40. package/es/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
  41. package/es/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
  42. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  43. package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  44. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  45. package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  46. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  47. package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  48. package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  49. package/es/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
  50. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  51. package/es/components/dataSourceComponents/fields/index.d.ts +8 -8
  52. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +4 -16
  53. package/es/components/dropdown/index.d.ts +0 -1
  54. package/es/components/filter/components/items/index.d.ts +0 -1
  55. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  56. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  57. package/es/components/filter/components/items/text/index.d.ts +0 -1
  58. package/es/components/iconfont/index.js +1 -1
  59. package/es/components/lowCodePage/index.d.ts +0 -1
  60. package/es/components/pisell-config-provider/index.d.ts +13 -0
  61. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  62. package/es/components/pisellCard/index.d.ts +0 -1
  63. package/es/components/pisellDatePicker/index.d.ts +0 -1
  64. package/es/components/pisellLoading/index.d.ts +0 -1
  65. package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  66. package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  67. package/es/components/pisellModal/components/index.d.ts +0 -1
  68. package/es/components/pisellToast/index.d.ts +1 -0
  69. package/es/components/pisellToast/index.js +1 -0
  70. package/es/components/pisellToast/squareToast/index.d.ts +15 -0
  71. package/es/components/pisellToast/squareToast/index.js +28 -0
  72. package/es/components/pisellToast/squareToast/index.less +60 -0
  73. package/es/components/pisellToast/squareToast/methods.d.ts +13 -0
  74. package/es/components/pisellToast/squareToast/methods.js +136 -0
  75. package/es/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
  76. package/es/components/pisellToast/squareToast/renderImperatively.js +165 -0
  77. package/es/components/pisellToast/squareToast/toast.d.ts +25 -0
  78. package/es/components/pisellToast/squareToast/toast.js +60 -0
  79. package/es/components/pisellUpload/index.d.ts +0 -1
  80. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
  81. package/es/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
  82. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
  83. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
  84. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
  85. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
  86. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
  87. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
  88. package/es/components/productCard/components/Action/index.d.ts +0 -1
  89. package/es/components/productCard/components/AmountFooter/index.d.ts +0 -1
  90. package/es/components/productCard/components/Divider/index.d.ts +0 -1
  91. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  92. package/es/components/productCard/components/Header/EditButton/index.d.ts +0 -1
  93. package/es/components/productCard/components/Header/index.d.ts +0 -1
  94. package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
  95. package/es/components/productCard/components/Note/index.d.ts +0 -1
  96. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  97. package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  98. package/es/components/productCard/components/Packages/index.d.ts +0 -1
  99. package/es/components/productCard/components/Sales/index.d.ts +0 -1
  100. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  101. package/es/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  102. package/es/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
  103. package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
  104. package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  105. package/es/components/productCard/components/Time/index.d.ts +3 -0
  106. package/es/components/qrcode/index.d.ts +0 -1
  107. package/es/components/radio/index.d.ts +0 -1
  108. package/es/components/segmented/index.d.ts +0 -1
  109. package/es/components/select-time/RightPanel/index.d.ts +0 -1
  110. package/es/components/skeleton/index.d.ts +0 -1
  111. package/es/components/slider/index.d.ts +0 -1
  112. package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
  113. package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  114. package/es/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  115. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
  116. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  117. package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  118. package/es/components/table/Summary/index.d.ts +0 -1
  119. package/es/components/table/Table/fields/date/Config/index.d.ts +0 -1
  120. package/es/components/table/Table/fields/date/Show/index.d.ts +0 -1
  121. package/es/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  122. package/es/components/table/Table/fields/image/Config/index.d.ts +0 -1
  123. package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
  124. package/es/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  125. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  126. package/es/components/table/Table/fields/index.d.ts +2 -2
  127. package/es/components/table/Table/fields/link/Config/index.d.ts +0 -1
  128. package/es/components/table/Table/fields/link/Show/index.d.ts +0 -1
  129. package/es/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  130. package/es/components/table/Table/fields/link/index.d.ts +0 -1
  131. package/es/components/table/Table/fields/number/Config/index.d.ts +0 -1
  132. package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
  133. package/es/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  134. package/es/components/table/Table/fields/number/index.d.ts +0 -1
  135. package/es/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  136. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  137. package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  138. package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
  139. package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  140. package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  141. package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  142. package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  143. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  144. package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  145. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  146. package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  147. package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  148. package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  149. package/es/components/table/Table/fields/search/Config/index.d.ts +0 -1
  150. package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
  151. package/es/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  152. package/es/components/table/Table/fields/search/index.d.ts +0 -1
  153. package/es/components/table/Table/fields/select/Config/index.d.ts +0 -1
  154. package/es/components/table/Table/fields/select/Show/index.d.ts +0 -1
  155. package/es/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  156. package/es/components/table/Table/fields/text/Config/index.d.ts +0 -1
  157. package/es/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  158. package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  159. package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  160. package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  161. package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  162. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  163. package/es/components/table/Table/utils.d.ts +1 -1
  164. package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
  165. package/es/components/table/types.d.ts +251 -0
  166. package/es/components/time-picker/index.d.ts +0 -1
  167. package/es/components/translation/index.d.ts +14 -0
  168. package/es/components/upload/index.d.ts +0 -1
  169. package/es/components/virtual-keyboard/Amount/index.d.ts +0 -1
  170. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  171. package/es/components/virtual-keyboard/Time/utils.d.ts +0 -1
  172. package/es/components/walletCard/Guest/index.d.ts +0 -1
  173. package/es/components/walletCard/Guide/index.d.ts +0 -1
  174. package/es/index.d.ts +1 -1
  175. package/es/index.js +1 -1
  176. package/lib/components/auto-complete-number/index.d.ts +0 -1
  177. package/lib/components/badge/index.d.ts +0 -1
  178. package/lib/components/batch-editor/fields/index.d.ts +0 -1
  179. package/lib/components/calendar/index.d.ts +0 -1
  180. package/lib/components/cardPro/index.d.ts +3 -0
  181. package/lib/components/checkbox/index.d.ts +0 -1
  182. package/lib/components/classicLayout/index.d.ts +0 -1
  183. package/lib/components/colorPicker/index.d.ts +0 -1
  184. package/lib/components/config-provider/index.d.ts +0 -1
  185. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  186. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  187. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
  188. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  189. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +1 -1
  190. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
  191. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +79 -0
  192. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  193. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  194. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  195. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  196. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  197. package/lib/components/dataSourceComponents/fields/Input.Json/ReadPretty.d.ts +0 -1
  198. package/lib/components/dataSourceComponents/fields/Input.Password/ReadPretty.d.ts +0 -1
  199. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  200. package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  201. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  202. package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  203. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  204. package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  205. package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  206. package/lib/components/dataSourceComponents/fields/Upload/ReadPretty.d.ts +0 -1
  207. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  208. package/lib/components/dataSourceComponents/fields/index.d.ts +8 -8
  209. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +9 -19
  210. package/lib/components/dropdown/index.d.ts +0 -1
  211. package/lib/components/filter/components/items/index.d.ts +0 -1
  212. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  213. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  214. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  215. package/lib/components/iconfont/index.js +1 -1
  216. package/lib/components/lowCodePage/index.d.ts +0 -1
  217. package/lib/components/pisell-config-provider/index.d.ts +13 -0
  218. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  219. package/lib/components/pisellCard/index.d.ts +0 -1
  220. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  221. package/lib/components/pisellLoading/index.d.ts +0 -1
  222. package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  223. package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  224. package/lib/components/pisellModal/components/index.d.ts +0 -1
  225. package/lib/components/pisellToast/index.d.ts +1 -0
  226. package/lib/components/pisellToast/index.js +7 -1
  227. package/lib/components/pisellToast/squareToast/index.d.ts +15 -0
  228. package/lib/components/pisellToast/squareToast/index.js +58 -0
  229. package/lib/components/pisellToast/squareToast/index.less +60 -0
  230. package/lib/components/pisellToast/squareToast/methods.d.ts +13 -0
  231. package/lib/components/pisellToast/squareToast/methods.js +150 -0
  232. package/lib/components/pisellToast/squareToast/renderImperatively.d.ts +29 -0
  233. package/lib/components/pisellToast/squareToast/renderImperatively.js +148 -0
  234. package/lib/components/pisellToast/squareToast/toast.d.ts +25 -0
  235. package/lib/components/pisellToast/squareToast/toast.js +88 -0
  236. package/lib/components/pisellUpload/index.d.ts +0 -1
  237. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -1
  238. package/lib/components/productCard/cartSkuCard/components/Note/index.d.ts +0 -1
  239. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +0 -1
  240. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +0 -1
  241. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +0 -1
  242. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +0 -1
  243. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +0 -1
  244. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -1
  245. package/lib/components/productCard/components/Action/index.d.ts +0 -1
  246. package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -1
  247. package/lib/components/productCard/components/Divider/index.d.ts +0 -1
  248. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  249. package/lib/components/productCard/components/Header/EditButton/index.d.ts +0 -1
  250. package/lib/components/productCard/components/Header/index.d.ts +0 -1
  251. package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
  252. package/lib/components/productCard/components/Note/index.d.ts +0 -1
  253. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  254. package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  255. package/lib/components/productCard/components/Packages/index.d.ts +0 -1
  256. package/lib/components/productCard/components/Sales/index.d.ts +0 -1
  257. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  258. package/lib/components/productCard/components/Time/components/SelectHolder/index.d.ts +3 -0
  259. package/lib/components/productCard/components/Time/components/SelectHolderModal/index.d.ts +0 -1
  260. package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.d.ts +0 -1
  261. package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
  262. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  263. package/lib/components/qrcode/index.d.ts +0 -1
  264. package/lib/components/radio/index.d.ts +0 -1
  265. package/lib/components/segmented/index.d.ts +0 -1
  266. package/lib/components/select-time/RightPanel/index.d.ts +0 -1
  267. package/lib/components/skeleton/index.d.ts +0 -1
  268. package/lib/components/slider/index.d.ts +0 -1
  269. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
  270. package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  271. package/lib/components/table/Gallery/components/GalleryItem/components/Cover/index.d.ts +0 -1
  272. package/lib/components/table/Gallery/components/GalleryItem/components/RenderFields/index.d.ts +0 -1
  273. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.d.ts +0 -1
  274. package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
  275. package/lib/components/table/Summary/index.d.ts +0 -1
  276. package/lib/components/table/Table/fields/date/Config/index.d.ts +0 -1
  277. package/lib/components/table/Table/fields/date/Show/index.d.ts +0 -1
  278. package/lib/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  279. package/lib/components/table/Table/fields/image/Config/index.d.ts +0 -1
  280. package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
  281. package/lib/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  282. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  283. package/lib/components/table/Table/fields/index.d.ts +2 -2
  284. package/lib/components/table/Table/fields/link/Config/index.d.ts +0 -1
  285. package/lib/components/table/Table/fields/link/Show/index.d.ts +0 -1
  286. package/lib/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  287. package/lib/components/table/Table/fields/link/index.d.ts +0 -1
  288. package/lib/components/table/Table/fields/number/Config/index.d.ts +0 -1
  289. package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
  290. package/lib/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  291. package/lib/components/table/Table/fields/number/index.d.ts +0 -1
  292. package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  293. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  294. package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  295. package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
  296. package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  297. package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  298. package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  299. package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  300. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  301. package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  302. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  303. package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  304. package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  305. package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  306. package/lib/components/table/Table/fields/search/Config/index.d.ts +0 -1
  307. package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
  308. package/lib/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  309. package/lib/components/table/Table/fields/search/index.d.ts +0 -1
  310. package/lib/components/table/Table/fields/select/Config/index.d.ts +0 -1
  311. package/lib/components/table/Table/fields/select/Show/index.d.ts +0 -1
  312. package/lib/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  313. package/lib/components/table/Table/fields/text/Config/index.d.ts +0 -1
  314. package/lib/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  315. package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  316. package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  317. package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  318. package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  319. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  320. package/lib/components/table/Table/utils.d.ts +1 -1
  321. package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
  322. package/lib/components/table/types.d.ts +251 -0
  323. package/lib/components/time-picker/index.d.ts +0 -1
  324. package/lib/components/translation/index.d.ts +14 -0
  325. package/lib/components/upload/index.d.ts +0 -1
  326. package/lib/components/virtual-keyboard/Amount/index.d.ts +0 -1
  327. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  328. package/lib/components/virtual-keyboard/Time/utils.d.ts +0 -1
  329. package/lib/components/walletCard/Guest/index.d.ts +0 -1
  330. package/lib/components/walletCard/Guide/index.d.ts +0 -1
  331. package/lib/index.d.ts +1 -1
  332. package/lib/index.js +2 -0
  333. package/package.json +11 -11
@@ -0,0 +1,28 @@
1
+ import { useMemo } from 'react';
2
+ import { clear, show, success, info, loading, fail, hide } from "./methods";
3
+ import "./index.less";
4
+ var Toast = {
5
+ show: show,
6
+ clear: clear,
7
+ success: success,
8
+ info: info,
9
+ loading: loading,
10
+ fail: fail,
11
+ error: fail,
12
+ hide: hide
13
+ };
14
+ export var useToast = function useToast() {
15
+ return useMemo(function () {
16
+ return {
17
+ show: show,
18
+ clear: clear,
19
+ success: success,
20
+ info: info,
21
+ loading: loading,
22
+ fail: fail,
23
+ error: fail,
24
+ hide: hide
25
+ };
26
+ }, []);
27
+ };
28
+ export default Toast;
@@ -0,0 +1,60 @@
1
+ .pisell-square-toast-wrap {
2
+ pointer-events: none;
3
+ }
4
+
5
+ .pisell-square-toast-modal {
6
+ pointer-events: none;
7
+ user-select: none;
8
+ min-width: 190px;
9
+ min-height: 74px;
10
+
11
+ // Toast 容器
12
+ .pisell-square-toast {
13
+ min-width: 190px;
14
+ max-width: 201px;
15
+ display: flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ flex-direction: column;
19
+ padding: 32px 12px;
20
+ border-radius: 8px;
21
+ overflow: hidden;
22
+ background: rgba(0, 0, 0, 0.8);
23
+
24
+ .pisell-square-toast-icon-wrapper {
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ margin-bottom: 11px;
29
+
30
+ .pisell-square-toast-icon {
31
+ font-size: 50px;
32
+ color: #ffffff;
33
+ width: 50px;
34
+ height: 50px;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+
39
+ &-loading {
40
+ animation: fadenum 1s infinite linear;
41
+ }
42
+ }
43
+ }
44
+
45
+ // 内容区域
46
+ .pisell-square-toast-content {
47
+ font-size: 20px;
48
+ line-height: 1.5;
49
+ color: #ffffff;
50
+ text-align: center;
51
+ }
52
+ }
53
+ }
54
+
55
+ // loading 旋转动画
56
+ @keyframes fadenum {
57
+ to {
58
+ transform: rotate(360deg);
59
+ }
60
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { ToastProps } from './toast';
3
+ interface ToastInstance {
4
+ close: () => void;
5
+ }
6
+ declare const show: (configOrContent: Partial<ToastProps> | React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
7
+ declare const clear: () => void;
8
+ declare const success: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
9
+ declare const info: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
10
+ declare const loading: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
11
+ declare const fail: (content: React.ReactNode, duration?: number, afterClose?: () => void) => ToastInstance;
12
+ declare const hide: () => void;
13
+ export { show, clear, success, info, loading, fail, hide };
@@ -0,0 +1,136 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
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 ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ 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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ import React from 'react';
9
+ import Toast from "./toast";
10
+ import { renderImperatively } from "./renderImperatively";
11
+ var currentHandler = null;
12
+ var currentTimeout = null;
13
+ var defaultProps = {
14
+ duration: 2000,
15
+ mask: false,
16
+ icon: 'info'
17
+ };
18
+
19
+ // mergeProps 工具函数
20
+ function mergeProps(a, b) {
21
+ // 过滤掉 b 中值为 undefined 的字段
22
+ var filteredB = Object.keys(b).reduce(function (acc, key) {
23
+ if (b[key] !== undefined) {
24
+ acc[key] = b[key];
25
+ }
26
+ return acc;
27
+ }, {});
28
+ return _objectSpread(_objectSpread({}, a), filteredB);
29
+ }
30
+
31
+ // 基于 renderImperatively 的新 show 实现
32
+ var show = function show(configOrContent, duration, afterClose) {
33
+ var props;
34
+
35
+ // 判断是否为 string 或 ReactNode,如果不是则认为是 config 对象
36
+ if (typeof configOrContent === 'string' || /*#__PURE__*/React.isValidElement(configOrContent)) {
37
+ // 如果是 string 或 ReactNode,视为 content
38
+ props = mergeProps(defaultProps, _objectSpread(_objectSpread({
39
+ content: configOrContent
40
+ }, duration !== undefined && {
41
+ duration: duration
42
+ }), afterClose !== undefined && {
43
+ afterClose: afterClose
44
+ }));
45
+ } else {
46
+ // 如果不是 string 或 ReactNode,则认为是 config 对象
47
+ props = mergeProps(defaultProps, configOrContent || {});
48
+ }
49
+ var element = /*#__PURE__*/React.createElement(Toast, _extends({}, props, {
50
+ onCancel: function onCancel() {
51
+ currentHandler = null;
52
+ }
53
+ }));
54
+ if (currentHandler) {
55
+ var _currentHandler$isRen, _currentHandler;
56
+ if ((_currentHandler$isRen = (_currentHandler = currentHandler).isRendered) !== null && _currentHandler$isRen !== void 0 && _currentHandler$isRen.call(_currentHandler)) {
57
+ currentHandler.replace(element);
58
+ } else {
59
+ currentHandler.close();
60
+ currentHandler = renderImperatively(element);
61
+ }
62
+ } else {
63
+ currentHandler = renderImperatively(element);
64
+ }
65
+ if (currentTimeout) {
66
+ window.clearTimeout(currentTimeout);
67
+ }
68
+ if (props.duration !== 0) {
69
+ currentTimeout = window.setTimeout(function () {
70
+ clear();
71
+ }, props.duration);
72
+ }
73
+ var instance = {
74
+ close: function close() {
75
+ if (currentHandler) {
76
+ currentHandler.close();
77
+ currentHandler = null;
78
+ }
79
+ if (currentTimeout) {
80
+ window.clearTimeout(currentTimeout);
81
+ currentTimeout = null;
82
+ }
83
+ }
84
+ };
85
+ return instance;
86
+ };
87
+
88
+ // 清理函数
89
+ var clear = function clear() {
90
+ if (currentHandler) {
91
+ currentHandler.close();
92
+ currentHandler = null;
93
+ }
94
+ if (currentTimeout) {
95
+ window.clearTimeout(currentTimeout);
96
+ currentTimeout = null;
97
+ }
98
+ };
99
+
100
+ // 便捷方法
101
+ var success = function success(content, duration, afterClose) {
102
+ return show({
103
+ content: content,
104
+ icon: 'success',
105
+ duration: duration,
106
+ afterClose: afterClose
107
+ });
108
+ };
109
+ var info = function info(content, duration, afterClose) {
110
+ return show({
111
+ content: content,
112
+ icon: 'info',
113
+ duration: duration,
114
+ afterClose: afterClose
115
+ });
116
+ };
117
+ var loading = function loading(content, duration, afterClose) {
118
+ return show({
119
+ content: content,
120
+ icon: 'loading',
121
+ duration: duration,
122
+ afterClose: afterClose
123
+ });
124
+ };
125
+ var fail = function fail(content, duration, afterClose) {
126
+ return show({
127
+ content: content,
128
+ icon: 'error',
129
+ duration: duration,
130
+ afterClose: afterClose
131
+ });
132
+ };
133
+ var hide = function hide() {
134
+ clear();
135
+ };
136
+ export { show, clear, success, info, loading, fail, hide };
@@ -0,0 +1,29 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { Root } from 'react-dom/client';
3
+ import React from 'react';
4
+ declare type ImperativeProps = {
5
+ open?: boolean;
6
+ onCancel?: () => void;
7
+ afterClose?: () => void;
8
+ };
9
+ declare type TargetElement = ReactElement<ImperativeProps>;
10
+ export declare type ImperativeHandler = {
11
+ close: () => void;
12
+ replace: (element: TargetElement) => void;
13
+ isRendered?: () => boolean;
14
+ };
15
+ export declare type UnmountType = () => Promise<void>;
16
+ export declare type RenderType = (node: React.ReactElement, container: Element | DocumentFragment) => UnmountType;
17
+ declare const MARK = "__pisell_react_root__";
18
+ declare type ContainerType = (Element | DocumentFragment) & {
19
+ [MARK]?: Root;
20
+ };
21
+ export declare function render(node: React.ReactElement, container: ContainerType): void;
22
+ export declare function unmount(container: ContainerType): Promise<void>;
23
+ /**
24
+ * @deprecated 设置 React 渲染函数以兼容使用。
25
+ */
26
+ export declare function unstableSetRender(render?: RenderType): RenderType;
27
+ export declare function renderToBody(element: ReactElement): UnmountType;
28
+ export declare function renderImperatively(element: TargetElement): ImperativeHandler;
29
+ export {};
@@ -0,0 +1,165 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ 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 e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
5
+ 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
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
11
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
12
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
14
+ 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); } }
15
+ 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); }); }; }
16
+ import * as ReactDOM from 'react-dom';
17
+ import { createRoot } from 'react-dom/client';
18
+ import React, { useEffect, useImperativeHandle, useRef, useState } from 'react';
19
+ var MARK = '__pisell_react_root__';
20
+
21
+ // ========================== Render ==========================
22
+
23
+ export function render(node, container) {
24
+ var root = container[MARK] || createRoot(container);
25
+ root.render(node);
26
+ container[MARK] = root;
27
+ }
28
+
29
+ // ========================= Unmount ==========================
30
+ export function unmount(_x) {
31
+ return _unmount.apply(this, arguments);
32
+ }
33
+ function _unmount() {
34
+ _unmount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(container) {
35
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
36
+ while (1) switch (_context2.prev = _context2.next) {
37
+ case 0:
38
+ return _context2.abrupt("return", Promise.resolve().then(function () {
39
+ var _container$MARK;
40
+ (_container$MARK = container[MARK]) === null || _container$MARK === void 0 || _container$MARK.unmount();
41
+ delete container[MARK];
42
+ }));
43
+ case 1:
44
+ case "end":
45
+ return _context2.stop();
46
+ }
47
+ }, _callee2);
48
+ }));
49
+ return _unmount.apply(this, arguments);
50
+ }
51
+ var defaultReactRender = function defaultReactRender(node, container) {
52
+ // React 19 及以上版本 ,只在开发环境下警告
53
+ if (process.env.NODE_ENV !== 'production') {
54
+ var majorVersion = parseInt(React.version.split('.')[0], 10);
55
+ var fullKeys = Object.keys(ReactDOM);
56
+ console.warn(majorVersion < 19 || fullKeys.includes('createRoot'), "[Compatible] Toast support React is 16 ~ 18.");
57
+ }
58
+ render(node, container);
59
+ return function () {
60
+ return unmount(container);
61
+ };
62
+ };
63
+ var unstableRender = defaultReactRender;
64
+
65
+ /**
66
+ * @deprecated 设置 React 渲染函数以兼容使用。
67
+ */
68
+ export function unstableSetRender(render) {
69
+ if (render) {
70
+ unstableRender = render;
71
+ }
72
+ return unstableRender;
73
+ }
74
+ export function renderToBody(element) {
75
+ var container = document.createElement('div');
76
+ document.body.appendChild(container);
77
+ return unstableSetRender()(element, container);
78
+ }
79
+ export function renderImperatively(element) {
80
+ var Wrapper = /*#__PURE__*/React.forwardRef(function (_, ref) {
81
+ var _useState = useState(false),
82
+ _useState2 = _slicedToArray(_useState, 2),
83
+ open = _useState2[0],
84
+ setOpen = _useState2[1];
85
+ var closedRef = useRef(false);
86
+ var _useState3 = useState(element),
87
+ _useState4 = _slicedToArray(_useState3, 2),
88
+ elementToRender = _useState4[0],
89
+ setElementToRender = _useState4[1];
90
+ var keyRef = useRef(0);
91
+ useEffect(function () {
92
+ if (!closedRef.current) {
93
+ setOpen(true);
94
+ } else {
95
+ afterClose();
96
+ }
97
+ }, []);
98
+ function onCancel() {
99
+ var _elementToRender$prop, _elementToRender$prop2;
100
+ closedRef.current = true;
101
+ setOpen(false);
102
+ (_elementToRender$prop = (_elementToRender$prop2 = elementToRender.props).onCancel) === null || _elementToRender$prop === void 0 || _elementToRender$prop.call(_elementToRender$prop2);
103
+ }
104
+ function afterClose() {
105
+ var _elementToRender$prop3, _elementToRender$prop4;
106
+ unmount();
107
+ (_elementToRender$prop3 = (_elementToRender$prop4 = elementToRender.props).afterClose) === null || _elementToRender$prop3 === void 0 || _elementToRender$prop3.call(_elementToRender$prop4);
108
+ }
109
+ useImperativeHandle(ref, function () {
110
+ return {
111
+ close: onCancel,
112
+ replace: function replace(element) {
113
+ var _elementToRender$prop5, _elementToRender$prop6;
114
+ keyRef.current++;
115
+ (_elementToRender$prop5 = (_elementToRender$prop6 = elementToRender.props).afterClose) === null || _elementToRender$prop5 === void 0 || _elementToRender$prop5.call(_elementToRender$prop6);
116
+ setElementToRender(element);
117
+ }
118
+ };
119
+ });
120
+ return /*#__PURE__*/React.cloneElement(elementToRender, _objectSpread(_objectSpread({}, elementToRender.props), {}, {
121
+ key: keyRef.current,
122
+ open: open,
123
+ onCancel: onCancel,
124
+ afterClose: afterClose
125
+ }));
126
+ });
127
+ var wrapperRef = /*#__PURE__*/React.createRef();
128
+ var unmount = renderToBody( /*#__PURE__*/React.createElement(Wrapper, {
129
+ ref: wrapperRef
130
+ }));
131
+ return {
132
+ close: function () {
133
+ var _close = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
134
+ var _element$props$afterC, _element$props, _wrapperRef$current;
135
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
136
+ while (1) switch (_context.prev = _context.next) {
137
+ case 0:
138
+ if (!wrapperRef.current) {
139
+ // wrapper引用还没被赋值,说明组件还没被挂载 ,直接调用unmount
140
+ unmount();
141
+ // 手动调用,确保afterClose被调用
142
+ (_element$props$afterC = (_element$props = element.props).afterClose) === null || _element$props$afterC === void 0 || _element$props$afterC.call(_element$props);
143
+ } else {
144
+ (_wrapperRef$current = wrapperRef.current) === null || _wrapperRef$current === void 0 || _wrapperRef$current.close();
145
+ }
146
+ case 1:
147
+ case "end":
148
+ return _context.stop();
149
+ }
150
+ }, _callee);
151
+ }));
152
+ function close() {
153
+ return _close.apply(this, arguments);
154
+ }
155
+ return close;
156
+ }(),
157
+ replace: function replace(element) {
158
+ var _wrapperRef$current2;
159
+ (_wrapperRef$current2 = wrapperRef.current) === null || _wrapperRef$current2 === void 0 || _wrapperRef$current2.replace(element);
160
+ },
161
+ isRendered: function isRendered() {
162
+ return !!wrapperRef.current;
163
+ }
164
+ };
165
+ }
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
4
+ export interface ToastProps {
5
+ /** Toast 类型 */
6
+ icon?: ToastType | React.ReactNode;
7
+ /** 显示的内容,支持文本或 React 节点 */
8
+ content: React.ReactNode;
9
+ /** 是否显示 */
10
+ open?: boolean;
11
+ /** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
12
+ duration?: number;
13
+ /** 关闭 */
14
+ onCancel?: () => void;
15
+ /** 关闭后回调 */
16
+ afterClose?: () => void;
17
+ /** 自定义样式类名 */
18
+ className?: string;
19
+ /** 自定义样式 */
20
+ style?: React.CSSProperties;
21
+ /** 是否显示遮罩 */
22
+ mask?: boolean;
23
+ }
24
+ declare const Toast: React.FC<ToastProps>;
25
+ export default Toast;
@@ -0,0 +1,60 @@
1
+ var _excluded = ["content", "open", "icon", "className"];
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 _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
5
+ import React, { useMemo } from 'react';
6
+ import Modal from "../../modal";
7
+ import Icon from "../../icon";
8
+ import classNames from 'classnames';
9
+ import "./index.less";
10
+ var icons = {
11
+ info: '',
12
+ success: 'iconchenggong-1-01',
13
+ error: 'icon-warning',
14
+ warning: 'icon-warning',
15
+ loading: 'icon-loading',
16
+ fail: 'icon-warning'
17
+ };
18
+ var Toast = function Toast(_ref) {
19
+ var content = _ref.content,
20
+ open = _ref.open,
21
+ icon = _ref.icon,
22
+ className = _ref.className,
23
+ rest = _objectWithoutProperties(_ref, _excluded);
24
+ var iconElement = useMemo(function () {
25
+ if (icon === null || icon === undefined) return null;
26
+ if (typeof icon === 'string' && icon in icons) {
27
+ if (!icons[icon]) return null;
28
+ return /*#__PURE__*/React.createElement(Icon, {
29
+ type: icons[icon],
30
+ className: "pisell-square-toast-icon pisell-square-toast-icon-".concat(icon)
31
+ });
32
+ }
33
+ return icon;
34
+ }, [icon]);
35
+ return /*#__PURE__*/React.createElement(Modal, _extends({
36
+ open: open,
37
+ footer: null,
38
+ closable: false,
39
+ centered: true,
40
+ maskTransitionName: "",
41
+ transitionName: "",
42
+ width: "unset",
43
+ wrapClassName: "pisell-square-toast-wrap",
44
+ className: classNames('pisell-square-toast-modal', className),
45
+ bodyStyle: {
46
+ padding: 0
47
+ },
48
+ destroyOnClose: true,
49
+ modalRender: function modalRender() {
50
+ return /*#__PURE__*/React.createElement("div", {
51
+ className: "pisell-square-toast"
52
+ }, iconElement && /*#__PURE__*/React.createElement("div", {
53
+ className: "pisell-square-toast-icon-wrapper"
54
+ }, iconElement), /*#__PURE__*/React.createElement("div", {
55
+ className: "pisell-square-toast-content"
56
+ }, content));
57
+ }
58
+ }, rest));
59
+ };
60
+ export default Toast;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { UploadProps } from 'antd';
3
2
  import './index.less';
4
3
  export interface PisellUploadProps extends UploadProps {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
4
3
  export default MultiDay;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Note: (props: any) => JSX.Element | null;
4
3
  export default Note;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Holders: (props: any) => JSX.Element | null;
4
3
  export default Holders;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface IProps {
4
3
  isShowImage?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Resources: (props: any) => JSX.Element | null;
4
3
  export default Resources;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface IProps {
4
3
  hideDivider?: boolean;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Specs: (props: any) => JSX.Element | null;
4
3
  export default Specs;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import 'dayjs/locale/zh-cn';
3
2
  import 'dayjs/locale/en';
4
3
  import 'dayjs/locale/zh-tw';
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Action: ({ item, onAction }: any) => JSX.Element;
4
3
  export default Action;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Footer: ({ item, hideDivider, type, isOnlyTotal }: any) => JSX.Element;
4
3
  export default Footer;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Divider: ({ type }: any) => JSX.Element;
4
3
  export default Divider;
@@ -0,0 +1,3 @@
1
+ import './index.less';
2
+ declare const DeleteButton: ({ onDelete }: any) => JSX.Element;
3
+ export default DeleteButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const EditButton: ({ onEdit }: any) => JSX.Element;
4
3
  export default EditButton;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Header: (props: any) => JSX.Element;
4
3
  export default Header;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const MultiDay: ({ dataSource, hideDivider }: any) => JSX.Element;
4
3
  export default MultiDay;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Note: (props: any) => JSX.Element | null;
4
3
  export default Note;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;