@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,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,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/lib/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/lib/index.js CHANGED
@@ -203,6 +203,7 @@ __export(src_exports, {
203
203
  message: () => import_antd.message,
204
204
  notification: () => import_antd.notification,
205
205
  usePisellConfig: () => import_usePisellConfig.default,
206
+ useToast: () => import_pisellToast.useToast,
206
207
  version: () => import_antd.version
207
208
  });
208
209
  module.exports = __toCommonJS(src_exports);
@@ -521,5 +522,6 @@ var import_hardwareErrorTip = __toESM(require("./components/hardwareErrorTip"));
521
522
  message,
522
523
  notification,
523
524
  usePisellConfig,
525
+ useToast,
524
526
  version
525
527
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "1.0.922",
3
+ "version": "1.0.923",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -74,9 +74,9 @@
74
74
  "swiper": "^8.4.7",
75
75
  "vod-js-sdk-v6": "^1.4.11",
76
76
  "antd-mobile": "^5.38.1",
77
+ "@pisell/utils": "1.0.54",
77
78
  "@pisell/date-picker": "1.0.126",
78
- "@pisell/icon": "0.0.10",
79
- "@pisell/utils": "1.0.54"
79
+ "@pisell/icon": "0.0.10"
80
80
  },
81
81
  "peerDependencies": {
82
82
  "react": "^18.0.0",