@pisell/materials 1.0.922 → 1.0.923

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 (245) 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 +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +19 -19
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -22
  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/dataSourceForm/utils.d.ts +1 -1
  20. package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  21. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  22. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  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 +1 -2
  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/utils.d.ts +1 -1
  36. package/es/components/dataSourceComponents/fields/index.d.ts +5 -5
  37. package/es/components/date-picker/index.d.ts +0 -1
  38. package/es/components/dropdown/index.d.ts +0 -1
  39. package/es/components/filter/components/items/index.d.ts +0 -1
  40. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  41. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  42. package/es/components/filter/components/items/text/index.d.ts +0 -1
  43. package/es/components/filter/index.d.ts +1 -0
  44. package/es/components/iconfont/index.d.ts +8 -0
  45. package/es/components/list/index.d.ts +1 -0
  46. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  47. package/es/components/pisellCard/index.d.ts +0 -1
  48. package/es/components/pisellDatePicker/index.d.ts +0 -1
  49. package/es/components/pisellLoading/index.d.ts +0 -1
  50. package/es/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  51. package/es/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  52. package/es/components/pisellModal/components/index.d.ts +0 -1
  53. package/es/components/pisellToast/index.d.ts +1 -0
  54. package/es/components/pisellToast/index.js +1 -0
  55. package/es/components/pisellToast/squareToast/index.d.ts +25 -0
  56. package/es/components/pisellToast/squareToast/index.js +110 -0
  57. package/es/components/pisellToast/squareToast/index.less +71 -0
  58. package/es/components/pisellToast/squareToast/useToast.d.ts +39 -0
  59. package/es/components/pisellToast/squareToast/useToast.js +145 -0
  60. package/es/components/pisellUpload/index.d.ts +0 -1
  61. package/es/components/productCard/components/Divider/index.d.ts +0 -1
  62. package/es/components/productCard/components/MultiDay/index.d.ts +0 -1
  63. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  64. package/es/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  65. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  66. package/es/components/radio/index.d.ts +0 -1
  67. package/es/components/segmented/index.d.ts +0 -1
  68. package/es/components/select-time/RightPanel/index.d.ts +0 -1
  69. package/es/components/skeleton/index.d.ts +0 -1
  70. package/es/components/slider/index.d.ts +0 -1
  71. package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
  72. package/es/components/table/Summary/index.d.ts +0 -1
  73. package/es/components/table/Table/fields/date/Config/index.d.ts +0 -1
  74. package/es/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  75. package/es/components/table/Table/fields/date/index.d.ts +0 -1
  76. package/es/components/table/Table/fields/image/Config/index.d.ts +0 -1
  77. package/es/components/table/Table/fields/image/Show/index.d.ts +0 -1
  78. package/es/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  79. package/es/components/table/Table/fields/image/index.d.ts +0 -1
  80. package/es/components/table/Table/fields/link/Config/index.d.ts +0 -1
  81. package/es/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  82. package/es/components/table/Table/fields/link/index.d.ts +0 -1
  83. package/es/components/table/Table/fields/number/Config/index.d.ts +0 -1
  84. package/es/components/table/Table/fields/number/Show/index.d.ts +0 -1
  85. package/es/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  86. package/es/components/table/Table/fields/number/index.d.ts +0 -1
  87. package/es/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  88. package/es/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  89. package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  90. package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
  91. package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  92. package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  93. package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  94. package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  95. package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  96. package/es/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  97. package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  98. package/es/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  99. package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  100. package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  101. package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  102. package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  103. package/es/components/table/Table/fields/search/Config/index.d.ts +0 -1
  104. package/es/components/table/Table/fields/search/Show/index.d.ts +0 -1
  105. package/es/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  106. package/es/components/table/Table/fields/search/index.d.ts +0 -1
  107. package/es/components/table/Table/fields/select/Config/index.d.ts +0 -1
  108. package/es/components/table/Table/fields/select/Show/index.d.ts +0 -1
  109. package/es/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  110. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  111. package/es/components/table/Table/fields/text/Config/index.d.ts +0 -1
  112. package/es/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  113. package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  114. package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  115. package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  116. package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  117. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  118. package/es/components/table/Table/utils.d.ts +1 -1
  119. package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
  120. package/es/components/time-picker/index.d.ts +0 -1
  121. package/es/components/upload/index.d.ts +0 -1
  122. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  123. package/es/components/virtual-keyboard/Time/utils.d.ts +0 -1
  124. package/es/components/walletCard/Guest/index.d.ts +0 -1
  125. package/es/components/walletCard/Guide/index.d.ts +0 -1
  126. package/es/index.d.ts +1 -1
  127. package/es/index.js +1 -1
  128. package/lib/components/auto-complete-number/index.d.ts +0 -1
  129. package/lib/components/badge/index.d.ts +0 -1
  130. package/lib/components/batch-editor/fields/index.d.ts +0 -1
  131. package/lib/components/calendar/index.d.ts +0 -1
  132. package/lib/components/checkbox/index.d.ts +0 -1
  133. package/lib/components/classicLayout/index.d.ts +0 -1
  134. package/lib/components/colorPicker/index.d.ts +0 -1
  135. package/lib/components/config-provider/index.d.ts +0 -1
  136. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  137. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -1
  138. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
  139. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +3 -3
  140. package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +0 -1
  141. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  142. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  143. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  144. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  145. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  146. package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  147. package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  148. package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  149. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -2
  150. package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  151. package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  152. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  153. package/lib/components/dataSourceComponents/fields/index.d.ts +5 -5
  154. package/lib/components/date-picker/index.d.ts +0 -1
  155. package/lib/components/dropdown/index.d.ts +0 -1
  156. package/lib/components/filter/components/items/index.d.ts +0 -1
  157. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  158. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  159. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  160. package/lib/components/filter/index.d.ts +1 -0
  161. package/lib/components/iconfont/index.d.ts +8 -0
  162. package/lib/components/list/index.d.ts +1 -0
  163. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  164. package/lib/components/pisellCard/index.d.ts +0 -1
  165. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  166. package/lib/components/pisellLoading/index.d.ts +0 -1
  167. package/lib/components/pisellModal/components/IpadModal/index.d.ts +0 -1
  168. package/lib/components/pisellModal/components/MobileModal/index.d.ts +0 -1
  169. package/lib/components/pisellModal/components/index.d.ts +0 -1
  170. package/lib/components/pisellToast/index.d.ts +1 -0
  171. package/lib/components/pisellToast/index.js +7 -1
  172. package/lib/components/pisellToast/squareToast/index.d.ts +25 -0
  173. package/lib/components/pisellToast/squareToast/index.js +121 -0
  174. package/lib/components/pisellToast/squareToast/index.less +71 -0
  175. package/lib/components/pisellToast/squareToast/useToast.d.ts +39 -0
  176. package/lib/components/pisellToast/squareToast/useToast.js +148 -0
  177. package/lib/components/pisellUpload/index.d.ts +0 -1
  178. package/lib/components/productCard/components/Divider/index.d.ts +0 -1
  179. package/lib/components/productCard/components/MultiDay/index.d.ts +0 -1
  180. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +0 -1
  181. package/lib/components/productCard/components/Packages/components/options/index.d.ts +0 -1
  182. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  183. package/lib/components/radio/index.d.ts +0 -1
  184. package/lib/components/segmented/index.d.ts +0 -1
  185. package/lib/components/select-time/RightPanel/index.d.ts +0 -1
  186. package/lib/components/skeleton/index.d.ts +0 -1
  187. package/lib/components/slider/index.d.ts +0 -1
  188. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
  189. package/lib/components/table/Summary/index.d.ts +0 -1
  190. package/lib/components/table/Table/fields/date/Config/index.d.ts +0 -1
  191. package/lib/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  192. package/lib/components/table/Table/fields/date/index.d.ts +0 -1
  193. package/lib/components/table/Table/fields/image/Config/index.d.ts +0 -1
  194. package/lib/components/table/Table/fields/image/Show/index.d.ts +0 -1
  195. package/lib/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  196. package/lib/components/table/Table/fields/image/index.d.ts +0 -1
  197. package/lib/components/table/Table/fields/link/Config/index.d.ts +0 -1
  198. package/lib/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  199. package/lib/components/table/Table/fields/link/index.d.ts +0 -1
  200. package/lib/components/table/Table/fields/number/Config/index.d.ts +0 -1
  201. package/lib/components/table/Table/fields/number/Show/index.d.ts +0 -1
  202. package/lib/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  203. package/lib/components/table/Table/fields/number/index.d.ts +0 -1
  204. package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  205. package/lib/components/table/Table/fields/numberRange/Show/index.d.ts +0 -1
  206. package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  207. package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
  208. package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  209. package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  210. package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  211. package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
  212. package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  213. package/lib/components/table/Table/fields/pSwitch/Show/index.d.ts +0 -1
  214. package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  215. package/lib/components/table/Table/fields/pSwitch/index.d.ts +0 -1
  216. package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  217. package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  218. package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  219. package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
  220. package/lib/components/table/Table/fields/search/Config/index.d.ts +0 -1
  221. package/lib/components/table/Table/fields/search/Show/index.d.ts +0 -1
  222. package/lib/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  223. package/lib/components/table/Table/fields/search/index.d.ts +0 -1
  224. package/lib/components/table/Table/fields/select/Config/index.d.ts +0 -1
  225. package/lib/components/table/Table/fields/select/Show/index.d.ts +0 -1
  226. package/lib/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  227. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  228. package/lib/components/table/Table/fields/text/Config/index.d.ts +0 -1
  229. package/lib/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  230. package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  231. package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  232. package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  233. package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
  234. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  235. package/lib/components/table/Table/utils.d.ts +1 -1
  236. package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
  237. package/lib/components/time-picker/index.d.ts +0 -1
  238. package/lib/components/upload/index.d.ts +0 -1
  239. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  240. package/lib/components/virtual-keyboard/Time/utils.d.ts +0 -1
  241. package/lib/components/walletCard/Guest/index.d.ts +0 -1
  242. package/lib/components/walletCard/Guide/index.d.ts +0 -1
  243. package/lib/index.d.ts +1 -1
  244. package/lib/index.js +2 -0
  245. package/package.json +3 -3
@@ -0,0 +1,145 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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."); }
3
+ 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); }
4
+ 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; }
5
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ 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; }
8
+ 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; }
9
+ 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; }
10
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
11
+ 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); }
12
+ 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); }
13
+ 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); }
14
+ import React, { useCallback, useRef } from 'react';
15
+ import { createRoot } from 'react-dom/client';
16
+ import Toast from "./index";
17
+ // 全局实例管理
18
+ var instances = new Set();
19
+ var createToastInstance = function createToastInstance(config) {
20
+ var container = document.createElement('div');
21
+ var getContainer = config.getContainer || function () {
22
+ return document.body;
23
+ };
24
+ var parentNode = getContainer();
25
+ parentNode.appendChild(container);
26
+ var root = createRoot(container);
27
+ var instance = {
28
+ destroy: function destroy() {
29
+ instances.delete(instance);
30
+ root.unmount();
31
+ if (container.parentNode) {
32
+ container.parentNode.removeChild(container);
33
+ }
34
+ }
35
+ };
36
+ instances.add(instance);
37
+ var handleClose = function handleClose() {
38
+ instance.destroy();
39
+ };
40
+ root.render( /*#__PURE__*/React.createElement(Toast, _extends({}, config, {
41
+ visible: true,
42
+ onClose: handleClose
43
+ })));
44
+ return instance;
45
+ };
46
+
47
+ // 参数解析辅助函数
48
+ var parseToastArgs = function parseToastArgs(args, type) {
49
+ var defaultConfig = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
50
+ // 支持 (config) 形式
51
+ if (args.length === 1 && _typeof(args[0]) === 'object' && args[0].message) {
52
+ return _objectSpread(_objectSpread(_objectSpread({}, defaultConfig), args[0]), {}, {
53
+ type: type
54
+ });
55
+ }
56
+
57
+ // 支持 (message, config) 形式
58
+ if (args.length <= 2 && args.length >= 1 && (args.length === 1 || _typeof(args[1]) === 'object')) {
59
+ var _args = _slicedToArray(args, 2),
60
+ _message = _args[0],
61
+ _args$ = _args[1],
62
+ _config = _args$ === void 0 ? {} : _args$;
63
+ return _objectSpread(_objectSpread(_objectSpread({}, defaultConfig), _config), {}, {
64
+ type: type,
65
+ message: _message
66
+ });
67
+ }
68
+
69
+ // 支持 (message, duration, onClose) 形式
70
+ var _args2 = _slicedToArray(args, 3),
71
+ message = _args2[0],
72
+ duration = _args2[1],
73
+ onClose = _args2[2];
74
+ return _objectSpread(_objectSpread({}, defaultConfig), {}, {
75
+ type: type,
76
+ message: message,
77
+ duration: duration !== undefined ? duration : defaultConfig.duration,
78
+ onClose: onClose || defaultConfig.onClose
79
+ });
80
+ };
81
+
82
+ // React Hook
83
+ export var useToast = function useToast() {
84
+ var defaultConfig = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
85
+ var instancesRef = useRef(new Set());
86
+ var createInstance = useCallback(function (config) {
87
+ var instance = createToastInstance(config);
88
+ instancesRef.current.add(instance);
89
+ var originalDestroy = instance.destroy;
90
+ instance.destroy = function () {
91
+ instancesRef.current.delete(instance);
92
+ originalDestroy();
93
+ };
94
+ return instance;
95
+ }, []);
96
+ var createToastMethod = useCallback(function (type) {
97
+ return useCallback(function () {
98
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
99
+ args[_key] = arguments[_key];
100
+ }
101
+ var config = parseToastArgs(args, type, defaultConfig);
102
+ return createInstance(config);
103
+ }, [createInstance, defaultConfig]);
104
+ }, [createInstance, defaultConfig]);
105
+ var success = createToastMethod('success');
106
+ var error = createToastMethod('error');
107
+ var warning = createToastMethod('warning');
108
+ var info = createToastMethod('info');
109
+ var fail = createToastMethod('warning'); // fail 使用 warning 类型
110
+ var loading = createToastMethod('loading');
111
+ var show = useCallback(function (config) {
112
+ var mergedConfig = _objectSpread(_objectSpread({}, defaultConfig), config);
113
+ return createInstance(mergedConfig);
114
+ }, [createInstance, defaultConfig]);
115
+ var destroy = useCallback(function (instance) {
116
+ if (instance) {
117
+ instance.destroy();
118
+ }
119
+ }, []);
120
+ var destroyAll = useCallback(function () {
121
+ instancesRef.current.forEach(function (instance) {
122
+ instance.destroy();
123
+ });
124
+ instancesRef.current.clear();
125
+ }, []);
126
+
127
+ // 组件卸载时清理所有实例
128
+ React.useEffect(function () {
129
+ return function () {
130
+ destroyAll();
131
+ };
132
+ }, [destroyAll]);
133
+ return {
134
+ success: success,
135
+ error: error,
136
+ warning: warning,
137
+ info: info,
138
+ fail: fail,
139
+ loading: loading,
140
+ show: show,
141
+ destroy: destroy,
142
+ destroyAll: destroyAll
143
+ };
144
+ };
145
+ export default useToast;
@@ -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,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 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,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;
@@ -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,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Sort: () => JSX.Element;
3
2
  export default Sort;
@@ -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 summary: (props: any) => JSX.Element;
3
2
  export default summary;
@@ -167,7 +167,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
167
167
  sort?: SortType | undefined;
168
168
  mode: "" | "localStorage" | "remote";
169
169
  currentViewMode: ModeType;
170
- }) => ("column_setting" | "group_by" | "order_by" | "view_mode" | "filter_setting" | "gallery_setting")[];
170
+ }) => ("order_by" | "group_by" | "column_setting" | "gallery_setting" | "filter_setting" | "view_mode")[];
171
171
  export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
172
172
  export declare const stringify: (obj: Record<string, any>) => string;
173
173
  export {};
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  interface SortIconProps {
3
2
  sortOrder: null | "ascend" | "descend";
4
3
  }
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const TimePicker: (props: any) => JSX.Element;
3
2
  export default TimePicker;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Upload: (props: any) => JSX.Element;
3
2
  export default Upload;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./Presets.less";
3
2
  export declare type PresetsItem = {
4
3
  label: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare const formatStringToTime: (value: string) => {
3
2
  valueArray: string[];
4
3
  valueString: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Guest: (props: any) => JSX.Element;
4
3
  export default Guest;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import './index.less';
3
2
  declare const Guide: (props: any) => JSX.Element;
4
3
  export default Guide;
package/es/index.d.ts CHANGED
@@ -102,7 +102,7 @@ export { default as PisellSectionHeaders } from './components/pisellSectionHeade
102
102
  export { default as PisellStatisticList } from './components/pisellStatisticList';
103
103
  export { default as PisellTags } from './components/pisellTags';
104
104
  export { default as PisellText } from './components/pisellText';
105
- export { default as PisellToast } from './components/pisellToast';
105
+ export { default as PisellToast, useToast } from './components/pisellToast';
106
106
  export { default as PisellTooltip } from './components/pisellTooltip';
107
107
  export { default as PisellUpload } from './components/pisellUpload';
108
108
  export { default as PisellViewGrid } from './components/pisellViewGrid';
package/es/index.js CHANGED
@@ -102,7 +102,7 @@ export { default as PisellSectionHeaders } from "./components/pisellSectionHeade
102
102
  export { default as PisellStatisticList } from "./components/pisellStatisticList";
103
103
  export { default as PisellTags } from "./components/pisellTags";
104
104
  export { default as PisellText } from "./components/pisellText";
105
- export { default as PisellToast } from "./components/pisellToast";
105
+ export { default as PisellToast, useToast } from "./components/pisellToast";
106
106
  // export { default as InformationModal } from './components/pisellModal/components/Information';
107
107
  export { default as PisellTooltip } from "./components/pisellTooltip";
108
108
  export { default as PisellUpload } from "./components/pisellUpload";
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AutoCompleteProps, InputNumberProps } from "antd";
3
2
  interface AutoCompleteNumberProps {
4
3
  autoCompleteProps: AutoCompleteProps;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { BadgeProps as OriginalBadgeprops } from 'antd';
3
2
  import './index.less';
4
3
  export interface Badgeprops extends OriginalBadgeprops {
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  price: import("react").FC<import("./Price").PriceProps>;
4
3
  image: (props: import("./Image").ImageProps) => JSX.Element | null;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Calendar: (props: any) => JSX.Element;
3
2
  export default Calendar;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Checkbox: (props: any) => JSX.Element;
3
2
  export default Checkbox;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./index.less";
3
2
  declare const ClassicLayout: (props: any) => JSX.Element;
4
3
  export default ClassicLayout;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ColorPickerProps } from 'antd';
3
2
  declare const ColorPicker: (props: ColorPickerProps) => JSX.Element;
4
3
  export default ColorPicker;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ConfigProviderProps as OriginalConfigProviderProps } from "antd/es/config-provider";
3
2
  import "dayjs/locale/zh-cn";
4
3
  export interface ConfigProviderProps extends OriginalConfigProviderProps {
@@ -43,7 +43,7 @@ export declare const withDataSource: <P extends unknown>(WrappedComponent: React
43
43
  }) => JSX.Element;
44
44
  export declare const withOptions: <P extends unknown>(WrappedComponent: React.ComponentType<P>) => (props: P & {
45
45
  options?: any;
46
- optionSourceType?: "default" | "custom" | "api" | undefined;
46
+ optionSourceType?: "custom" | "default" | "api" | undefined;
47
47
  labelField: string;
48
48
  valueField: string;
49
49
  extraParams?: Record<string, any> | undefined;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const DataSourceImage: (props: import("../utils").ParsedProps) => JSX.Element;
3
2
  export default DataSourceImage;