@pisell/materials 1.0.922 → 1.0.924

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 (284) 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 +164 -148
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +48 -19
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +55 -26
  11. package/es/components/auto-complete-number/index.d.ts +0 -1
  12. package/es/components/badge/index.d.ts +0 -1
  13. package/es/components/batch-editor/fields/index.d.ts +0 -1
  14. package/es/components/calendar/index.d.ts +0 -1
  15. package/es/components/checkbox/index.d.ts +0 -1
  16. package/es/components/classicLayout/index.d.ts +0 -1
  17. package/es/components/colorPicker/index.d.ts +0 -1
  18. package/es/components/config-provider/index.d.ts +0 -1
  19. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  20. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  21. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  22. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  23. package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  24. package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  25. package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  26. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  27. package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  28. package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  29. package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  30. package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  31. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  32. package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  33. package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  34. package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  35. package/es/components/dataSourceComponents/fields/Upload/BaseUpload.js +199 -19
  36. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  37. package/es/components/dataSourceComponents/fields/Upload/CameraPopover.js +66 -0
  38. package/es/components/dataSourceComponents/fields/Upload/index.less +35 -3
  39. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  40. package/es/components/dataSourceComponents/fields/index.d.ts +7 -7
  41. package/es/components/date-picker/index.d.ts +0 -1
  42. package/es/components/dropdown/index.d.ts +0 -1
  43. package/es/components/filter/components/items/index.d.ts +0 -1
  44. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  45. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  46. package/es/components/filter/components/items/text/index.d.ts +0 -1
  47. package/es/components/iconfont/index.d.ts +8 -0
  48. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  49. package/es/components/pisellCamera/index.d.ts +4 -0
  50. package/es/components/pisellCamera/index.js +219 -0
  51. package/es/components/pisellCamera/index.less +120 -0
  52. package/es/components/pisellCard/index.d.ts +0 -1
  53. package/es/components/pisellDatePicker/index.d.ts +0 -1
  54. package/es/components/pisellLoading/index.d.ts +0 -1
  55. package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  56. package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  57. package/es/components/pisellModal/components/index.d.ts +0 -1
  58. package/es/components/pisellToast/index.d.ts +1 -0
  59. package/es/components/pisellToast/index.js +1 -0
  60. package/es/components/pisellToast/squareToast/index.d.ts +25 -0
  61. package/es/components/pisellToast/squareToast/index.js +110 -0
  62. package/es/components/pisellToast/squareToast/index.less +71 -0
  63. package/es/components/pisellToast/squareToast/useToast.d.ts +39 -0
  64. package/es/components/pisellToast/squareToast/useToast.js +145 -0
  65. package/es/components/pisellUpload/index.d.ts +0 -1
  66. package/es/components/productCard/components/Divider/index.d.ts +0 -1
  67. package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
  68. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  69. package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  70. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  71. package/es/components/radio/index.d.ts +0 -1
  72. package/es/components/segmented/index.d.ts +0 -1
  73. package/es/components/select-time/RightPanel/index.d.ts +0 -1
  74. package/es/components/skeleton/index.d.ts +0 -1
  75. package/es/components/slider/index.d.ts +0 -1
  76. package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
  77. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  78. package/es/components/table/Summary/index.d.ts +0 -1
  79. package/es/components/table/Table/SelectField/index.d.ts +0 -1
  80. package/es/components/table/Table/fields/date/Config/index.d.ts +0 -1
  81. package/es/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  82. package/es/components/table/Table/fields/date/index.d.ts +0 -1
  83. package/es/components/table/Table/fields/image/Config/index.d.ts +0 -1
  84. package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
  85. package/es/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  86. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  87. package/es/components/table/Table/fields/index.d.ts +0 -1
  88. package/es/components/table/Table/fields/link/Config/index.d.ts +0 -1
  89. package/es/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  90. package/es/components/table/Table/fields/link/index.d.ts +0 -1
  91. package/es/components/table/Table/fields/number/Config/index.d.ts +0 -1
  92. package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
  93. package/es/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  94. package/es/components/table/Table/fields/number/index.d.ts +0 -1
  95. package/es/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  96. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  97. package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  98. package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
  99. package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  100. package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  101. package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  102. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  103. package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  104. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  105. package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  106. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  107. package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  108. package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  109. package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  110. package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  111. package/es/components/table/Table/fields/search/Config/index.d.ts +0 -1
  112. package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
  113. package/es/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  114. package/es/components/table/Table/fields/search/index.d.ts +0 -1
  115. package/es/components/table/Table/fields/select/Config/index.d.ts +0 -1
  116. package/es/components/table/Table/fields/select/Show/index.d.ts +0 -1
  117. package/es/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  118. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  119. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  120. package/es/components/table/Table/fields/text/Config/index.d.ts +0 -1
  121. package/es/components/table/Table/fields/text/Show/index.d.ts +0 -1
  122. package/es/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  123. package/es/components/table/Table/fields/text/index.d.ts +0 -1
  124. package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  125. package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  126. package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  127. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  128. package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  129. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  130. package/es/components/table/Table/utils.d.ts +1 -1
  131. package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
  132. package/es/components/time-picker/index.d.ts +0 -1
  133. package/es/components/upload/index.d.ts +0 -1
  134. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  135. package/es/components/virtual-keyboard/Time/utils.d.ts +0 -1
  136. package/es/components/walletCard/Guest/index.d.ts +0 -1
  137. package/es/components/walletCard/Guide/index.d.ts +0 -1
  138. package/es/index.d.ts +1 -1
  139. package/es/index.js +1 -1
  140. package/es/locales/en-US.d.ts +10 -0
  141. package/es/locales/en-US.js +13 -1
  142. package/es/locales/zh-CN.d.ts +10 -0
  143. package/es/locales/zh-CN.js +13 -1
  144. package/es/locales/zh-TW.d.ts +10 -0
  145. package/es/locales/zh-TW.js +13 -1
  146. package/es/utils/index.d.ts +1 -1
  147. package/lib/components/auto-complete-number/index.d.ts +0 -1
  148. package/lib/components/badge/index.d.ts +0 -1
  149. package/lib/components/batch-editor/fields/index.d.ts +0 -1
  150. package/lib/components/calendar/index.d.ts +0 -1
  151. package/lib/components/checkbox/index.d.ts +0 -1
  152. package/lib/components/classicLayout/index.d.ts +0 -1
  153. package/lib/components/colorPicker/index.d.ts +0 -1
  154. package/lib/components/config-provider/index.d.ts +0 -1
  155. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  156. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  157. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  158. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
  159. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  160. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  161. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  162. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  163. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  164. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  165. package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  166. package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  167. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  168. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  169. package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  170. package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  171. package/lib/components/dataSourceComponents/fields/Upload/BaseUpload.js +168 -5
  172. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.d.ts +5 -0
  173. package/lib/components/dataSourceComponents/fields/Upload/CameraPopover.js +95 -0
  174. package/lib/components/dataSourceComponents/fields/Upload/index.less +35 -3
  175. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +1 -0
  176. package/lib/components/dataSourceComponents/fields/index.d.ts +7 -7
  177. package/lib/components/date-picker/index.d.ts +0 -1
  178. package/lib/components/dropdown/index.d.ts +0 -1
  179. package/lib/components/filter/components/items/index.d.ts +0 -1
  180. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  181. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  182. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  183. package/lib/components/iconfont/index.d.ts +8 -0
  184. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  185. package/lib/components/pisellCamera/index.d.ts +4 -0
  186. package/lib/components/pisellCamera/index.js +219 -0
  187. package/lib/components/pisellCamera/index.less +120 -0
  188. package/lib/components/pisellCard/index.d.ts +0 -1
  189. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  190. package/lib/components/pisellLoading/index.d.ts +0 -1
  191. package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  192. package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  193. package/lib/components/pisellModal/components/index.d.ts +0 -1
  194. package/lib/components/pisellToast/index.d.ts +1 -0
  195. package/lib/components/pisellToast/index.js +7 -1
  196. package/lib/components/pisellToast/squareToast/index.d.ts +25 -0
  197. package/lib/components/pisellToast/squareToast/index.js +121 -0
  198. package/lib/components/pisellToast/squareToast/index.less +71 -0
  199. package/lib/components/pisellToast/squareToast/useToast.d.ts +39 -0
  200. package/lib/components/pisellToast/squareToast/useToast.js +148 -0
  201. package/lib/components/pisellUpload/index.d.ts +0 -1
  202. package/lib/components/productCard/components/Divider/index.d.ts +0 -1
  203. package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
  204. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  205. package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  206. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  207. package/lib/components/radio/index.d.ts +0 -1
  208. package/lib/components/segmented/index.d.ts +0 -1
  209. package/lib/components/select-time/RightPanel/index.d.ts +0 -1
  210. package/lib/components/skeleton/index.d.ts +0 -1
  211. package/lib/components/slider/index.d.ts +0 -1
  212. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
  213. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  214. package/lib/components/table/Summary/index.d.ts +0 -1
  215. package/lib/components/table/Table/SelectField/index.d.ts +0 -1
  216. package/lib/components/table/Table/fields/date/Config/index.d.ts +0 -1
  217. package/lib/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  218. package/lib/components/table/Table/fields/date/index.d.ts +0 -1
  219. package/lib/components/table/Table/fields/image/Config/index.d.ts +0 -1
  220. package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
  221. package/lib/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  222. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  223. package/lib/components/table/Table/fields/index.d.ts +0 -1
  224. package/lib/components/table/Table/fields/link/Config/index.d.ts +0 -1
  225. package/lib/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  226. package/lib/components/table/Table/fields/link/index.d.ts +0 -1
  227. package/lib/components/table/Table/fields/number/Config/index.d.ts +0 -1
  228. package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
  229. package/lib/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  230. package/lib/components/table/Table/fields/number/index.d.ts +0 -1
  231. package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  232. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  233. package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  234. package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
  235. package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  236. package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  237. package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  238. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  239. package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  240. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  241. package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  242. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  243. package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  244. package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  245. package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  246. package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  247. package/lib/components/table/Table/fields/search/Config/index.d.ts +0 -1
  248. package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
  249. package/lib/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  250. package/lib/components/table/Table/fields/search/index.d.ts +0 -1
  251. package/lib/components/table/Table/fields/select/Config/index.d.ts +0 -1
  252. package/lib/components/table/Table/fields/select/Show/index.d.ts +0 -1
  253. package/lib/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  254. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  255. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  256. package/lib/components/table/Table/fields/text/Config/index.d.ts +0 -1
  257. package/lib/components/table/Table/fields/text/Show/index.d.ts +0 -1
  258. package/lib/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  259. package/lib/components/table/Table/fields/text/index.d.ts +0 -1
  260. package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  261. package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  262. package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  263. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  264. package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  265. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  266. package/lib/components/table/Table/utils.d.ts +1 -1
  267. package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
  268. package/lib/components/time-picker/index.d.ts +0 -1
  269. package/lib/components/upload/index.d.ts +0 -1
  270. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  271. package/lib/components/virtual-keyboard/Time/utils.d.ts +0 -1
  272. package/lib/components/walletCard/Guest/index.d.ts +0 -1
  273. package/lib/components/walletCard/Guide/index.d.ts +0 -1
  274. package/lib/index.d.ts +1 -1
  275. package/lib/index.js +2 -0
  276. package/lib/locales/en-US.d.ts +10 -0
  277. package/lib/locales/en-US.js +13 -1
  278. package/lib/locales/zh-CN.d.ts +10 -0
  279. package/lib/locales/zh-CN.js +13 -1
  280. package/lib/locales/zh-TW.d.ts +10 -0
  281. package/lib/locales/zh-TW.js +13 -1
  282. package/lib/utils/index.d.ts +1 -1
  283. package/lowcode/form-item-upload/meta.ts +20 -5
  284. package/package.json +2 -1
@@ -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
+ type?: ToastType;
7
+ /** 显示的内容,支持文本或 React 节点 */
8
+ message: React.ReactNode;
9
+ /** 是否显示 */
10
+ visible?: boolean;
11
+ /** 自动关闭时间,单位毫秒,0 表示不自动关闭 */
12
+ duration?: number;
13
+ /** 关闭回调 */
14
+ onClose?: () => void;
15
+ /** 自定义图标 */
16
+ icon?: React.ReactNode;
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,121 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellToast/squareToast/index.tsx
30
+ var squareToast_exports = {};
31
+ __export(squareToast_exports, {
32
+ default: () => squareToast_default
33
+ });
34
+ module.exports = __toCommonJS(squareToast_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_modal = __toESM(require("../../modal"));
37
+ var import_icon = __toESM(require("../../icon"));
38
+ var import_classnames = __toESM(require("classnames"));
39
+ var import_index = require("./index.less");
40
+ var icons = {
41
+ info: "",
42
+ success: "iconchenggong-1-01",
43
+ error: "icon-warning",
44
+ warning: "icon-warning",
45
+ loading: "icon-loading",
46
+ fail: "icon-warning"
47
+ };
48
+ var Toast = ({
49
+ type = "info",
50
+ message,
51
+ visible = false,
52
+ duration = 2e3,
53
+ onClose,
54
+ icon,
55
+ className,
56
+ mask = false,
57
+ style
58
+ }) => {
59
+ const [internalVisible, setInternalVisible] = (0, import_react.useState)(visible);
60
+ (0, import_react.useEffect)(() => {
61
+ setInternalVisible(visible);
62
+ }, [visible]);
63
+ (0, import_react.useEffect)(() => {
64
+ if (internalVisible && duration > 0) {
65
+ const timer = setTimeout(() => {
66
+ handleClose();
67
+ }, duration);
68
+ return () => clearTimeout(timer);
69
+ }
70
+ }, [internalVisible, duration]);
71
+ const handleClose = () => {
72
+ setInternalVisible(false);
73
+ onClose == null ? void 0 : onClose();
74
+ };
75
+ const showIcon = (0, import_react.useMemo)(() => {
76
+ return icon !== void 0 || icons[type];
77
+ }, [type, icon]);
78
+ const renderIcon = () => {
79
+ if (icon !== void 0) {
80
+ return icon;
81
+ }
82
+ const iconType = icons[type];
83
+ if (iconType) {
84
+ return /* @__PURE__ */ import_react.default.createElement(
85
+ import_icon.default,
86
+ {
87
+ type: iconType,
88
+ className: `pisell-square-toast-icon pisell-square-toast-icon-${type}`
89
+ }
90
+ );
91
+ }
92
+ return null;
93
+ };
94
+ return /* @__PURE__ */ import_react.default.createElement(
95
+ import_modal.default,
96
+ {
97
+ open: visible,
98
+ footer: null,
99
+ closable: false,
100
+ centered: true,
101
+ maskTransitionName: "",
102
+ transitionName: "",
103
+ getContainer: () => document.body,
104
+ wrapClassName: "pisell-square-toast-wrap",
105
+ className: (0, import_classnames.default)("pisell-square-toast-modal", className),
106
+ width: "auto",
107
+ style: { textAlign: "center", ...style },
108
+ bodyStyle: { padding: 0 },
109
+ mask,
110
+ modalRender: () => /* @__PURE__ */ import_react.default.createElement(
111
+ "div",
112
+ {
113
+ className: `pisell-square-toast ${type ? `pisell-square-toast-${type}` : ""}`
114
+ },
115
+ showIcon && /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-icon-wrapper" }, renderIcon()),
116
+ /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-content" }, /* @__PURE__ */ import_react.default.createElement("div", { className: "pisell-square-toast-message" }, message))
117
+ )
118
+ }
119
+ );
120
+ };
121
+ var squareToast_default = Toast;
@@ -0,0 +1,71 @@
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
+
9
+ // Toast 容器
10
+ .pisell-square-toast {
11
+ min-width: 190px;
12
+ max-width: 201px;
13
+ display: flex;
14
+ align-items: center;
15
+ justify-content: center;
16
+ flex-direction: column;
17
+ padding: 32px 12px;
18
+ border-radius: 8px;
19
+ overflow: hidden;
20
+ background: rgba(0, 0, 0, 0.8);
21
+
22
+ // 图标包装器
23
+ .pisell-square-toast-icon-wrapper {
24
+ display: flex;
25
+ align-items: center;
26
+ justify-content: center;
27
+ margin-bottom: 11px;
28
+
29
+ .pisell-square-toast-icon {
30
+ font-size: 50px;
31
+ color: #ffffff;
32
+ width: 50px;
33
+ height: 50px;
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+
38
+ &-loading {
39
+ animation: fadenum 1s infinite linear;
40
+ }
41
+ }
42
+ }
43
+
44
+ // 内容区域
45
+ .pisell-square-toast-content {
46
+ .pisell-square-toast-message {
47
+ font-size: 20px;
48
+ line-height: 1.5;
49
+ color: #ffffff;
50
+ text-align: center;
51
+ }
52
+ }
53
+
54
+ // 带图标的样式调整
55
+ &.pisell-square-toast-success,
56
+ &.pisell-square-toast-error,
57
+ &.pisell-square-toast-warning,
58
+ &.pisell-square-toast-fail,
59
+ &.pisell-square-toast-loading {
60
+ min-width: 190px;
61
+ min-height: 74px;
62
+ }
63
+ }
64
+ }
65
+
66
+ // 旋转动画
67
+ @keyframes fadenum {
68
+ to {
69
+ transform: rotate(360deg);
70
+ }
71
+ }
@@ -0,0 +1,39 @@
1
+ import React from 'react';
2
+ import { ToastProps } from './index';
3
+ interface ToastInstance {
4
+ destroy: () => void;
5
+ }
6
+ interface ToastConfig extends ToastProps {
7
+ /** 容器节点,默认为 document.body */
8
+ getContainer?: () => HTMLElement;
9
+ }
10
+ interface UseToastConfig {
11
+ /** 默认自动关闭时间,单位毫秒 */
12
+ duration?: number;
13
+ /** 默认关闭回调 */
14
+ onClose?: () => void;
15
+ /** 默认容器节点 */
16
+ getContainer?: () => HTMLElement;
17
+ /** 默认是否显示遮罩 */
18
+ mask?: boolean;
19
+ /** 默认点击遮罩是否关闭 */
20
+ maskClosable?: boolean;
21
+ }
22
+ interface ToastMethod {
23
+ (config: ToastConfig): ToastInstance;
24
+ (message: React.ReactNode, config?: Omit<ToastConfig, 'type' | 'message'>): ToastInstance;
25
+ (message: React.ReactNode, duration?: number, onClose?: () => void): ToastInstance;
26
+ }
27
+ interface ToastApi {
28
+ success: ToastMethod;
29
+ error: ToastMethod;
30
+ warning: ToastMethod;
31
+ info: ToastMethod;
32
+ fail: ToastMethod;
33
+ loading: ToastMethod;
34
+ show: (config: ToastConfig) => ToastInstance;
35
+ destroy: (instance?: ToastInstance) => void;
36
+ destroyAll: () => void;
37
+ }
38
+ export declare const useToast: (defaultConfig?: UseToastConfig) => ToastApi;
39
+ export default useToast;
@@ -0,0 +1,148 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/components/pisellToast/squareToast/useToast.tsx
30
+ var useToast_exports = {};
31
+ __export(useToast_exports, {
32
+ default: () => useToast_default,
33
+ useToast: () => useToast
34
+ });
35
+ module.exports = __toCommonJS(useToast_exports);
36
+ var import_react = __toESM(require("react"));
37
+ var import_client = require("react-dom/client");
38
+ var import_index = __toESM(require("./index"));
39
+ var instances = /* @__PURE__ */ new Set();
40
+ var createToastInstance = (config) => {
41
+ const container = document.createElement("div");
42
+ const getContainer = config.getContainer || (() => document.body);
43
+ const parentNode = getContainer();
44
+ parentNode.appendChild(container);
45
+ const root = (0, import_client.createRoot)(container);
46
+ const instance = {
47
+ destroy: () => {
48
+ instances.delete(instance);
49
+ root.unmount();
50
+ if (container.parentNode) {
51
+ container.parentNode.removeChild(container);
52
+ }
53
+ }
54
+ };
55
+ instances.add(instance);
56
+ const handleClose = () => {
57
+ instance.destroy();
58
+ };
59
+ root.render(/* @__PURE__ */ import_react.default.createElement(import_index.default, { ...config, visible: true, onClose: handleClose }));
60
+ return instance;
61
+ };
62
+ var parseToastArgs = (args, type, defaultConfig = {}) => {
63
+ if (args.length === 1 && typeof args[0] === "object" && args[0].message) {
64
+ return { ...defaultConfig, ...args[0], type };
65
+ }
66
+ if (args.length <= 2 && args.length >= 1 && (args.length === 1 || typeof args[1] === "object")) {
67
+ const [message2, config = {}] = args;
68
+ return { ...defaultConfig, ...config, type, message: message2 };
69
+ }
70
+ const [message, duration, onClose] = args;
71
+ return {
72
+ ...defaultConfig,
73
+ type,
74
+ message,
75
+ duration: duration !== void 0 ? duration : defaultConfig.duration,
76
+ onClose: onClose || defaultConfig.onClose
77
+ };
78
+ };
79
+ var useToast = (defaultConfig = {}) => {
80
+ const instancesRef = (0, import_react.useRef)(/* @__PURE__ */ new Set());
81
+ const createInstance = (0, import_react.useCallback)((config) => {
82
+ const instance = createToastInstance(config);
83
+ instancesRef.current.add(instance);
84
+ const originalDestroy = instance.destroy;
85
+ instance.destroy = () => {
86
+ instancesRef.current.delete(instance);
87
+ originalDestroy();
88
+ };
89
+ return instance;
90
+ }, []);
91
+ const createToastMethod = (0, import_react.useCallback)(
92
+ (type) => {
93
+ return (0, import_react.useCallback)(
94
+ (...args) => {
95
+ const config = parseToastArgs(args, type, defaultConfig);
96
+ return createInstance(config);
97
+ },
98
+ [createInstance, defaultConfig]
99
+ );
100
+ },
101
+ [createInstance, defaultConfig]
102
+ );
103
+ const success = createToastMethod("success");
104
+ const error = createToastMethod("error");
105
+ const warning = createToastMethod("warning");
106
+ const info = createToastMethod("info");
107
+ const fail = createToastMethod("warning");
108
+ const loading = createToastMethod("loading");
109
+ const show = (0, import_react.useCallback)(
110
+ (config) => {
111
+ const mergedConfig = { ...defaultConfig, ...config };
112
+ return createInstance(mergedConfig);
113
+ },
114
+ [createInstance, defaultConfig]
115
+ );
116
+ const destroy = (0, import_react.useCallback)((instance) => {
117
+ if (instance) {
118
+ instance.destroy();
119
+ }
120
+ }, []);
121
+ const destroyAll = (0, import_react.useCallback)(() => {
122
+ instancesRef.current.forEach((instance) => {
123
+ instance.destroy();
124
+ });
125
+ instancesRef.current.clear();
126
+ }, []);
127
+ import_react.default.useEffect(() => {
128
+ return () => {
129
+ destroyAll();
130
+ };
131
+ }, [destroyAll]);
132
+ return {
133
+ success,
134
+ error,
135
+ warning,
136
+ info,
137
+ fail,
138
+ loading,
139
+ show,
140
+ destroy,
141
+ destroyAll
142
+ };
143
+ };
144
+ var useToast_default = useToast;
145
+ // Annotate the CommonJS export names for ESM import in node:
146
+ 0 && (module.exports = {
147
+ useToast
148
+ });
@@ -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 Divider: ({ type }: any) => JSX.Element;
4
3
  export default Divider;
@@ -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,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare const renderBundles: (item: any, hidePrice?: boolean, isShowPackageNote?: boolean) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Options: ({ options, amountSymbol }: any) => JSX.Element | null;
4
3
  export default Options;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Like: ({ status, onLike, className, style, isShowChangeResource, }: {
4
3
  style?: any;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Radio: (props: any) => JSX.Element;
3
2
  export default Radio;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { SegmentedProps } from "antd";
3
2
  import "./index.less";
4
3
  declare const Segmented: (props: SegmentedProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  interface RightPanelProps {
4
3
  value: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Skeleton: (props: any) => JSX.Element;
3
2
  export default Skeleton;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SliderOuter: (props: any) => JSX.Element;
3
2
  export default SliderOuter;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { MenuProps } from "antd";
3
2
  import "./index.less";
4
3
  interface InlineMenuProps {
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const Summary: ({ summary }: any) => JSX.Element | null;
4
3
  export default Summary;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const SelectField: () => JSX.Element;
3
2
  export default SelectField;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const fieldMaps: {
3
2
  text: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import filter from "./filterUtil";
3
2
  declare const _default: {
4
3
  field: {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { FieldPropsType } from "../../types";
3
2
  declare const Show: (props: FieldPropsType) => JSX.Element;
4
3
  export default Show;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Config: () => JSX.Element;
3
2
  export default Config;