@pisell/materials 6.4.6 → 6.4.8

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 (273) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +150 -150
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +22 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +23 -28
  11. package/dist/umd/materials.min.css +1 -0
  12. package/dist/umd/materials.min.js +1 -0
  13. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  14. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  15. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  16. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  17. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  18. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  19. package/es/components/appVersionControl/index.d.ts +0 -1
  20. package/es/components/auto-complete-number/index.d.ts +0 -1
  21. package/es/components/badge/index.d.ts +0 -1
  22. package/es/components/batch-editor/fields/index.d.ts +0 -1
  23. package/es/components/batch-editor/index.d.ts +1 -0
  24. package/es/components/calendar/index.d.ts +0 -1
  25. package/es/components/cardPro/index.d.ts +3 -0
  26. package/es/components/checkbox/index.d.ts +0 -1
  27. package/es/components/classicLayout/index.d.ts +0 -1
  28. package/es/components/colorPicker/index.d.ts +0 -1
  29. package/es/components/config-provider/index.d.ts +0 -1
  30. package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +11 -4
  31. package/es/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -1
  32. package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  33. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -3
  34. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +6 -7
  35. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
  36. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -2
  37. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +92 -6
  38. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
  39. package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  40. package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  41. package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  42. package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  43. package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  44. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  45. package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  46. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  47. package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +0 -1
  48. package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +0 -1
  49. package/es/components/dataSourceComponents/fields/Select/index.d.ts +0 -1
  50. package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +0 -1
  51. package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +0 -1
  52. package/es/components/dataSourceComponents/fields/index.d.ts +5 -5
  53. package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -3
  54. package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +5 -18
  55. package/es/components/date-picker/index.d.ts +1 -0
  56. package/es/components/dropdown/index.d.ts +0 -1
  57. package/es/components/filter/components/items/index.d.ts +0 -1
  58. package/es/components/filter/components/items/text/Editor/index.d.ts +0 -1
  59. package/es/components/filter/components/items/text/Preview/index.d.ts +0 -1
  60. package/es/components/filter/components/items/text/index.d.ts +0 -1
  61. package/es/components/filter/types.d.ts +1 -0
  62. package/es/components/iconfont/index.js +1 -1
  63. package/es/components/page/index.d.ts +1 -3
  64. package/es/components/page/index.js +2 -4
  65. package/es/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  66. package/es/components/pisellCard/index.d.ts +0 -1
  67. package/es/components/pisellDatePicker/index.d.ts +0 -1
  68. package/es/components/pisellToast/index.d.ts +1 -0
  69. package/es/components/pisellToast/index.js +1 -0
  70. package/es/components/pisellToast/squareToast/index.js +28 -0
  71. package/es/components/pisellToast/squareToast/index.less +60 -0
  72. package/es/components/pisellToast/squareToast/methods.js +136 -0
  73. package/es/components/pisellToast/squareToast/renderImperatively.js +165 -0
  74. package/es/components/pisellToast/squareToast/toast.js +60 -0
  75. package/es/components/pisellUpload/index.d.ts +0 -1
  76. package/es/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  77. package/es/components/productCard/cartSkuCard/components/swipeAction/index.js +73 -5
  78. package/es/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
  79. package/es/components/productCard/cartSkuCard/index.js +2 -11
  80. package/es/components/productCard/components/Divider/index.d.ts +0 -1
  81. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  82. package/es/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  83. package/es/components/productCard/components/Time/index.d.ts +0 -1
  84. package/es/components/radio/index.d.ts +0 -1
  85. package/es/components/segmented/index.d.ts +0 -1
  86. package/es/components/select-time/RightPanel/index.d.ts +0 -1
  87. package/es/components/skeleton/index.d.ts +0 -1
  88. package/es/components/slider/index.d.ts +0 -1
  89. package/es/components/sort/components/InlineMenu/index.d.ts +0 -1
  90. package/es/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  91. package/es/components/table/Summary/index.d.ts +0 -1
  92. package/es/components/table/Table/fields/date/Config/index.d.ts +0 -1
  93. package/es/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  94. package/es/components/table/Table/fields/image/Config/index.d.ts +0 -1
  95. package/es/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  96. package/es/components/table/Table/fields/index.d.ts +3 -2
  97. package/es/components/table/Table/fields/link/Config/index.d.ts +0 -1
  98. package/es/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  99. package/es/components/table/Table/fields/number/Config/index.d.ts +0 -1
  100. package/es/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  101. package/es/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  102. package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  103. package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  104. package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  105. package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  106. package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  107. package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  108. package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  109. package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  110. package/es/components/table/Table/fields/rangePicker/Sort/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/Sort/index.d.ts +0 -1
  113. package/es/components/table/Table/fields/select/Config/index.d.ts +0 -1
  114. package/es/components/table/Table/fields/select/Show/index.d.ts +0 -1
  115. package/es/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  116. package/es/components/table/Table/fields/text/Config/index.d.ts +0 -1
  117. package/es/components/table/Table/fields/text/Show/index.d.ts +1 -0
  118. package/es/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  119. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  120. package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  121. package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  122. package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  123. package/es/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  124. package/es/components/table/Table/utils.d.ts +1 -1
  125. package/es/components/table/Table/utils.js +22 -1
  126. package/es/components/table/TableFilter/SortIcon.d.ts +0 -1
  127. package/es/components/table/hooks/useTableSetting.d.ts +3 -4
  128. package/es/components/table/hooks/useTableSetting.js +113 -5
  129. package/es/components/table/index.js +14 -3
  130. package/es/components/table/types.d.ts +268 -0
  131. package/es/components/time-picker/index.d.ts +0 -1
  132. package/es/components/upload/index.d.ts +0 -1
  133. package/es/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  134. package/es/components/virtual-keyboard/Time/utils.d.ts +0 -1
  135. package/es/components/walletCard/Guest/index.d.ts +0 -1
  136. package/es/index.d.ts +1 -1
  137. package/es/index.js +1 -1
  138. package/lib/components/appVersionControl/index.d.ts +0 -1
  139. package/lib/components/auto-complete-number/index.d.ts +0 -1
  140. package/lib/components/badge/index.d.ts +0 -1
  141. package/lib/components/batch-editor/fields/index.d.ts +0 -1
  142. package/lib/components/batch-editor/index.d.ts +1 -0
  143. package/lib/components/calendar/index.d.ts +0 -1
  144. package/lib/components/cardPro/index.d.ts +3 -0
  145. package/lib/components/checkbox/index.d.ts +0 -1
  146. package/lib/components/classicLayout/index.d.ts +0 -1
  147. package/lib/components/colorPicker/index.d.ts +0 -1
  148. package/lib/components/config-provider/index.d.ts +0 -1
  149. package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -2
  150. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.d.ts +1 -1
  151. package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +7 -2
  152. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +2 -3
  153. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +6 -7
  154. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +11 -4
  155. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +2 -2
  156. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +78 -7
  157. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
  158. package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +0 -1
  159. package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +0 -1
  160. package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +0 -1
  161. package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +0 -1
  162. package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +0 -1
  163. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  164. package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +0 -1
  165. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -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/index.d.ts +5 -5
  172. package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +0 -3
  173. package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +10 -20
  174. package/lib/components/date-picker/index.d.ts +1 -0
  175. package/lib/components/dropdown/index.d.ts +0 -1
  176. package/lib/components/filter/components/items/index.d.ts +0 -1
  177. package/lib/components/filter/components/items/text/Editor/index.d.ts +0 -1
  178. package/lib/components/filter/components/items/text/Preview/index.d.ts +0 -1
  179. package/lib/components/filter/components/items/text/index.d.ts +0 -1
  180. package/lib/components/filter/types.d.ts +1 -0
  181. package/lib/components/iconfont/index.js +1 -1
  182. package/lib/components/page/index.d.ts +1 -3
  183. package/lib/components/page/index.js +2 -3
  184. package/lib/components/pisellAdjustPrice/PisellAdjustPriceInputNumber.d.ts +0 -1
  185. package/lib/components/pisellCard/index.d.ts +0 -1
  186. package/lib/components/pisellDatePicker/index.d.ts +0 -1
  187. package/lib/components/pisellToast/index.d.ts +1 -0
  188. package/lib/components/pisellToast/index.js +7 -1
  189. package/lib/components/pisellToast/squareToast/index.js +58 -0
  190. package/lib/components/pisellToast/squareToast/index.less +60 -0
  191. package/lib/components/pisellToast/squareToast/methods.js +150 -0
  192. package/lib/components/pisellToast/squareToast/renderImperatively.js +148 -0
  193. package/lib/components/pisellToast/squareToast/toast.js +88 -0
  194. package/lib/components/pisellUpload/index.d.ts +0 -1
  195. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.d.ts +46 -0
  196. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.js +45 -11
  197. package/lib/components/productCard/cartSkuCard/components/swipeAction/index.less +39 -0
  198. package/lib/components/productCard/cartSkuCard/index.js +2 -13
  199. package/lib/components/productCard/components/Divider/index.d.ts +0 -1
  200. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  201. package/lib/components/productCard/components/Time/components/Like/index.d.ts +0 -1
  202. package/lib/components/productCard/components/Time/index.d.ts +0 -1
  203. package/lib/components/radio/index.d.ts +0 -1
  204. package/lib/components/segmented/index.d.ts +0 -1
  205. package/lib/components/select-time/RightPanel/index.d.ts +0 -1
  206. package/lib/components/skeleton/index.d.ts +0 -1
  207. package/lib/components/slider/index.d.ts +0 -1
  208. package/lib/components/sort/components/InlineMenu/index.d.ts +0 -1
  209. package/lib/components/table/Actions/component/ViewMode/index.d.ts +0 -1
  210. package/lib/components/table/Summary/index.d.ts +0 -1
  211. package/lib/components/table/Table/fields/date/Config/index.d.ts +0 -1
  212. package/lib/components/table/Table/fields/date/Sort/index.d.ts +0 -1
  213. package/lib/components/table/Table/fields/image/Config/index.d.ts +0 -1
  214. package/lib/components/table/Table/fields/image/Sort/index.d.ts +0 -1
  215. package/lib/components/table/Table/fields/index.d.ts +3 -2
  216. package/lib/components/table/Table/fields/link/Config/index.d.ts +0 -1
  217. package/lib/components/table/Table/fields/link/Sort/index.d.ts +0 -1
  218. package/lib/components/table/Table/fields/number/Config/index.d.ts +0 -1
  219. package/lib/components/table/Table/fields/number/Sort/index.d.ts +0 -1
  220. package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +0 -1
  221. package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +0 -1
  222. package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +0 -1
  223. package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +0 -1
  224. package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +0 -1
  225. package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +0 -1
  226. package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +0 -1
  227. package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +0 -1
  228. package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +0 -1
  229. package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +0 -1
  230. package/lib/components/table/Table/fields/search/Config/index.d.ts +0 -1
  231. package/lib/components/table/Table/fields/search/Sort/index.d.ts +0 -1
  232. package/lib/components/table/Table/fields/select/Config/index.d.ts +0 -1
  233. package/lib/components/table/Table/fields/select/Show/index.d.ts +0 -1
  234. package/lib/components/table/Table/fields/select/Sort/index.d.ts +0 -1
  235. package/lib/components/table/Table/fields/text/Config/index.d.ts +0 -1
  236. package/lib/components/table/Table/fields/text/Show/index.d.ts +1 -0
  237. package/lib/components/table/Table/fields/text/Sort/index.d.ts +0 -1
  238. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  239. package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +0 -1
  240. package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +0 -1
  241. package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +0 -1
  242. package/lib/components/table/Table/tableConfig/summary/index.d.ts +0 -1
  243. package/lib/components/table/Table/utils.d.ts +1 -1
  244. package/lib/components/table/Table/utils.js +18 -1
  245. package/lib/components/table/TableFilter/SortIcon.d.ts +0 -1
  246. package/lib/components/table/hooks/useTableSetting.d.ts +3 -4
  247. package/lib/components/table/hooks/useTableSetting.js +114 -4
  248. package/lib/components/table/index.js +12 -1
  249. package/lib/components/table/types.d.ts +268 -0
  250. package/lib/components/time-picker/index.d.ts +0 -1
  251. package/lib/components/upload/index.d.ts +0 -1
  252. package/lib/components/virtual-keyboard/BaseNumberKeyboard/Presets.d.ts +0 -1
  253. package/lib/components/virtual-keyboard/Time/utils.d.ts +0 -1
  254. package/lib/components/walletCard/Guest/index.d.ts +0 -1
  255. package/lib/index.d.ts +1 -1
  256. package/lib/index.js +2 -0
  257. package/lowcode/data-source-table/meta.ts +239 -0
  258. package/lowcode/table/meta.ts +104 -0
  259. package/package.json +11 -11
  260. package/es/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +0 -3
  261. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  262. package/es/components/pisell-config-provider/index.d.ts +0 -13
  263. package/es/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
  264. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
  265. package/es/components/virtual-keyboard/Amount/types.d.ts +0 -44
  266. package/es/components/walletCard/index.d.ts +0 -67
  267. package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.d.ts +0 -3
  268. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +0 -37
  269. package/lib/components/pisell-config-provider/index.d.ts +0 -13
  270. package/lib/components/productCard/cartSkuCard/components/MultiDay/index.d.ts +0 -3
  271. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +0 -6
  272. package/lib/components/virtual-keyboard/Amount/types.d.ts +0 -44
  273. package/lib/components/walletCard/index.d.ts +0 -67
@@ -24,25 +24,61 @@ __export(useTableQuery_exports, {
24
24
  module.exports = __toCommonJS(useTableQuery_exports);
25
25
  var import_react = require("react");
26
26
  var import_ahooks = require("ahooks");
27
- var useTableQuery = (props) => {
27
+ var import_utils = require("../../../table/Table/utils");
28
+ var useTableQuery = (props, currentSettingHash) => {
28
29
  var _a, _b, _c, _d;
29
- const { filterBy, sortBy, tabs } = props;
30
+ const { filterBy, sortBy, tabs, localSettings } = props;
31
+ const tableId = (0, import_react.useMemo)(() => {
32
+ if (props.__designMode === "design") {
33
+ return "designMode-mock-table-id";
34
+ }
35
+ return (props == null ? void 0 : props.currentComponentId) || props.__id;
36
+ }, [props.__id, props.__designMode, props == null ? void 0 : props.currentComponentId]);
37
+ const currentViewMode = (0, import_react.useMemo)(() => (0, import_utils.getCurrentViewModeFromLocalStorage)(tableId) || "grid", [tableId]);
30
38
  const [queryPageConfig, setQueryPageConfig] = (0, import_react.useState)({
31
39
  page: 1,
32
40
  pageSize: 20,
33
41
  filter: ((_b = (_a = tabs == null ? void 0 : tabs.items) == null ? void 0 : _a[0]) == null ? void 0 : _b.filterBy) || filterBy || {},
34
42
  sort: ((_d = (_c = tabs == null ? void 0 : tabs.items) == null ? void 0 : _c[0]) == null ? void 0 : _d.sortBy) || sortBy
35
43
  });
44
+ const getInitialValues = (0, import_ahooks.useMemoizedFn)(() => {
45
+ try {
46
+ if (!tableId) return {};
47
+ const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
48
+ console.log("setting22", setting);
49
+ return (setting == null ? void 0 : setting.filters) || {};
50
+ } catch (e) {
51
+ return {};
52
+ }
53
+ });
54
+ (0, import_react.useEffect)(() => {
55
+ var _a2;
56
+ if (!tableId) return;
57
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
58
+ if (!enable) return;
59
+ const setting = (0, import_utils.getTableSettingByCurrentViewMode)(tableId, currentViewMode);
60
+ const persisted = (setting == null ? void 0 : setting.filters) || {};
61
+ if (persisted && Object.keys(persisted).length > 0) {
62
+ setQueryPageConfig((prev) => ({
63
+ ...prev,
64
+ filter: { ...prev.filter, ...persisted }
65
+ }));
66
+ }
67
+ }, [tableId, currentViewMode, JSON.stringify(localSettings)]);
36
68
  const handleValuesChange = (0, import_ahooks.useMemoizedFn)(
37
69
  (params, allParams) => {
70
+ var _a2;
38
71
  const { page, size } = params.pagination || {};
72
+ let nextFilterForSave = null;
39
73
  setQueryPageConfig((prev) => {
40
- var _a2, _b2, _c2;
74
+ var _a3, _b2, _c2;
41
75
  let sort = prev.sort || sortBy;
42
76
  let filter = prev.filter;
43
77
  if ("tabs" in params) {
44
- sort = ((_a2 = params.tabs) == null ? void 0 : _a2.sortBy) || sortBy || "";
45
- filter = { ...prev.filter, ...((_b2 = params.tabs) == null ? void 0 : _b2.filterBy) || {} };
78
+ sort = ((_a3 = params.tabs) == null ? void 0 : _a3.sortBy) || sortBy || "";
79
+ const tabsFilter = ((_b2 = params.tabs) == null ? void 0 : _b2.filterBy) || {};
80
+ filter = { ...prev.filter, ...tabsFilter };
81
+ nextFilterForSave = filter;
46
82
  }
47
83
  if ("order_by" in params) {
48
84
  sort = params.order_by || ((_c2 = allParams.tabs) == null ? void 0 : _c2.sortBy) || sortBy;
@@ -55,15 +91,49 @@ var useTableQuery = (props) => {
55
91
  filter
56
92
  };
57
93
  });
94
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
95
+ if (enable && tableId && nextFilterForSave) {
96
+ const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
97
+ const filtered = {};
98
+ Object.keys(nextFilterForSave).forEach((k) => {
99
+ if (!excluded.has(k)) {
100
+ filtered[k] = nextFilterForSave[k];
101
+ }
102
+ });
103
+ (0, import_utils.setTableSettingToLocalStorage)({
104
+ tableId,
105
+ tableSettingObj: { filters: filtered },
106
+ currentViewMode,
107
+ currentSettingHash
108
+ });
109
+ }
58
110
  }
59
111
  );
60
112
  const handleFilterChange = (0, import_ahooks.useMemoizedFn)(
61
113
  (changedFields, allFields) => {
114
+ var _a2;
115
+ const nextFilter = { ...allFields };
62
116
  setQueryPageConfig((prev) => ({
63
117
  ...prev,
64
118
  page: 1,
65
- filter: { ...prev.filter, ...allFields, ...filterBy || {} }
119
+ filter: { ...prev.filter, ...nextFilter, ...filterBy || {} }
66
120
  }));
121
+ const enable = !!((localSettings == null ? void 0 : localSettings.enable) && ((_a2 = localSettings.scope) == null ? void 0 : _a2.includes("filters")));
122
+ if (enable && tableId) {
123
+ const excluded = new Set((localSettings == null ? void 0 : localSettings.excludedFilterFields) || []);
124
+ const filtered = {};
125
+ Object.keys(nextFilter || {}).forEach((k) => {
126
+ if (!excluded.has(k)) {
127
+ filtered[k] = nextFilter[k];
128
+ }
129
+ });
130
+ (0, import_utils.setTableSettingToLocalStorage)({
131
+ tableId,
132
+ tableSettingObj: { filters: filtered },
133
+ currentViewMode,
134
+ currentSettingHash
135
+ });
136
+ }
67
137
  }
68
138
  );
69
139
  const refreshData = (0, import_ahooks.useMemoizedFn)(() => {
@@ -83,7 +153,8 @@ var useTableQuery = (props) => {
83
153
  handleValuesChange,
84
154
  refreshData,
85
155
  handleFilterChange,
86
- refreshCurrentPage
156
+ refreshCurrentPage,
157
+ getInitialValues
87
158
  };
88
159
  };
89
160
  var useTableQuery_default = useTableQuery;
@@ -0,0 +1,84 @@
1
+ /// <reference types="react" />
2
+ import { ColumnType } from 'antd/es/table';
3
+ import { LocalSettingsType } from '../../table/types';
4
+ import { DataSourceType } from '../provider/dataSource/DataSourceContext';
5
+ export declare type OperationItem = {
6
+ label?: string;
7
+ openMode: 'modal' | 'drawer' | 'custom';
8
+ openContentSize: 'small' | 'middle' | 'large';
9
+ openTitle: string;
10
+ actionType: 'detail' | 'edit' | 'delete' | 'custom';
11
+ key: string;
12
+ buttonProps?: any;
13
+ onClick?: (record: any) => void;
14
+ afterClose?: () => void;
15
+ };
16
+ export interface DataSourceTableProps {
17
+ __id?: string;
18
+ currentComponentId?: string;
19
+ currentSettingKey?: string;
20
+ title?: string | React.ReactNode | (() => React.ReactNode);
21
+ subTitle?: string | React.ReactNode | (() => React.ReactNode);
22
+ titleButtons?: {
23
+ show: boolean;
24
+ maxCount: number;
25
+ items: OperationItem[];
26
+ };
27
+ tableButtons?: {
28
+ show: boolean;
29
+ maxCount: number;
30
+ items: OperationItem[];
31
+ };
32
+ buttons?: any[];
33
+ operation?: {
34
+ show: boolean;
35
+ title: string;
36
+ width: number;
37
+ align: 'left' | 'center' | 'right';
38
+ fixed: 'left' | 'right' | false;
39
+ type: 'link' | 'button';
40
+ items: OperationItem[];
41
+ };
42
+ operationContent?: {
43
+ [key: string]: React.ReactNode;
44
+ };
45
+ dataSource: DataSourceType;
46
+ columns: ColumnType<any>[];
47
+ filter: any;
48
+ search?: {
49
+ show: boolean;
50
+ placeholder: string;
51
+ };
52
+ __designMode: string;
53
+ componentId: string;
54
+ clickToDetail?: {
55
+ show: boolean;
56
+ useCustomAction: boolean;
57
+ actionType: string;
58
+ openMode: 'modal' | 'drawer';
59
+ openContentSize: 'small' | 'middle' | 'large';
60
+ openTitle: string;
61
+ key: string;
62
+ };
63
+ onRow?: any;
64
+ filterBy?: Record<string, any>;
65
+ sortBy: string;
66
+ tabs?: {
67
+ show: boolean;
68
+ type: string;
69
+ items: {
70
+ name: string;
71
+ filterBy: Record<string, any>;
72
+ sortBy: string;
73
+ }[];
74
+ };
75
+ onValuesChange?: (changedValues: any, values: any) => void;
76
+ extraParams?: {
77
+ list?: Record<string, any>;
78
+ get?: Record<string, any>;
79
+ update?: Record<string, any>;
80
+ create?: Record<string, any>;
81
+ destroy?: Record<string, any>;
82
+ };
83
+ localSettings?: LocalSettingsType;
84
+ }
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { ColorPickerProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const ColorPickerReadPretty: (props: ColorPickerProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { DateRangePickerProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const DateRangePickerReadPretty: (props: DateRangePickerProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { IconSelectProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const IconSelectReadPretty: (props: IconSelectProps) => JSX.Element | null;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const InputReadPretty: (props: InputProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const InputReadPretty: (props: InputProps) => JSX.Element;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * 获取nocobase数据列表
3
+ */
4
+ export declare const getCountryDataList: () => Promise<any>;
5
+ export interface Country {
6
+ id: number;
7
+ name: {
8
+ en: string;
9
+ "zh-CN": string;
10
+ "zh-HK": string;
11
+ original: string;
12
+ };
13
+ code: string;
14
+ calling_code: string;
15
+ currency_code: string;
16
+ sort: number;
17
+ status: string;
18
+ created_at: string;
19
+ updated_at: string;
20
+ prefix: string;
21
+ }
22
+ export declare const useCountries: () => {
23
+ data: Country[];
24
+ };
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const InputReadPretty: (props: InputProps) => JSX.Element;
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  declare const Subdomain: React.FC<import("antd").InputProps & {
3
3
  onChange: (value: string) => void;
4
4
  onBlur?: ((e: React.FocusEvent<HTMLInputElement, Element>) => void) | undefined;
5
- rootDomain: "custom" | "xzero" | "saas";
5
+ rootDomain: "custom" | "saas" | "xzero";
6
6
  customDomain?: string | undefined;
7
7
  value?: string | undefined;
8
8
  tenantId: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TextAreaProps } from "./type";
3
2
  import "./ReadPretty.less";
4
3
  declare const TextAreaReadPretty: (props: TextAreaProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { UrlProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  export declare const formatUrl: (url: string) => string;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const SelectWithDataSource: (props: import("antd").SelectProps<any, import("antd/es/select").DefaultOptionType> & import("../../dataSourceForm/utils").WithModeProps & import("../../dataSourceForm/utils").WithFormItemProps & {
3
2
  options?: any;
4
3
  optionSourceType?: "default" | "custom" | "api" | undefined;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TimePickerProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const TimePickerReadPretty: (props: TimePickerProps) => JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { TranslationProps } from './type';
3
2
  import './ReadPretty.less';
4
3
  declare const TranslationReadPretty: (props: TranslationProps) => JSX.Element;
@@ -60,11 +60,7 @@ declare const formFieldMap: {
60
60
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
61
61
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
62
  };
63
- declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<{}> & {
64
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
65
- } & {
66
- Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
67
- }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<import("./Input/type").InputProps> & {
63
+ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<import("./Input/type").InputProps> & {
68
64
  JSON: import("react").FC<any>;
69
65
  Password: import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
70
66
  TextArea: import("react").FC<import("antd/es/input").TextAreaProps & import("react").RefAttributes<import("antd/es/input/TextArea").TextAreaRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
@@ -85,6 +81,10 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
85
81
  fieldKey?: string | undefined;
86
82
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
87
83
  }) | (import("react").FC<{}> & {
84
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
85
+ } & {
86
+ Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
87
+ }) | import("react").FC<import("./ColorPicker/type").ColorPickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
88
88
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
89
89
  } & {
90
90
  Group: import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -7,9 +7,6 @@ export interface VariablesContextType {
7
7
  registerValueVariable?: (componentId: string, value: Record<string, any>) => void;
8
8
  registerFunctionVariable?: (componentId: string, value: Record<string, any>) => void;
9
9
  subscribeVariables?: (listener: (allVariables: Record<string, any>, updateVariables: Record<string, any>) => void) => () => void;
10
- config?: {
11
- disabledHistoryListener?: boolean;
12
- };
13
10
  }
14
11
  export declare const VariablesContext: import("react").Context<VariablesContextType>;
15
12
  export default VariablesContext;
@@ -47,17 +47,13 @@ var defaultCustomizer = (objValue, srcValue) => {
47
47
  };
48
48
  var VARIABLE_PATTERN = /{{([^}]+)}}/g;
49
49
  var VariablesProvider = (props) => {
50
- var _a, _b, _c, _d;
51
- const { children, variables, config } = props;
50
+ var _a;
51
+ const { children, variables } = props;
52
52
  const context = (0, import_useEngineContext.default)();
53
- const disabledHistoryListener = config ?? ((_c = (_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.variablesConfig) == null ? void 0 : _c.disabledHistoryListener);
54
- const { getApp } = ((_d = context == null ? void 0 : context.appHelper) == null ? void 0 : _d.utils) || {};
53
+ const { getApp } = ((_a = context == null ? void 0 : context.appHelper) == null ? void 0 : _a.utils) || {};
55
54
  const initialQuery = (0, import_react.useMemo)(() => {
56
- var _a2, _b2, _c2;
57
- if (disabledHistoryListener) {
58
- return {};
59
- }
60
- const currentLocation = (_c2 = (_b2 = (_a2 = getApp == null ? void 0 : getApp()) == null ? void 0 : _a2.history) == null ? void 0 : _b2.instance) == null ? void 0 : _c2.location;
55
+ var _a2, _b, _c;
56
+ const currentLocation = (_c = (_b = (_a2 = getApp == null ? void 0 : getApp()) == null ? void 0 : _a2.history) == null ? void 0 : _b.instance) == null ? void 0 : _c.location;
61
57
  if (currentLocation == null ? void 0 : currentLocation.search) {
62
58
  const searchParams = new URLSearchParams(currentLocation.search);
63
59
  const query = {};
@@ -67,9 +63,9 @@ var VariablesProvider = (props) => {
67
63
  return query;
68
64
  }
69
65
  return {};
70
- }, [disabledHistoryListener]);
66
+ }, []);
71
67
  const variablesRef = (0, import_react.useRef)(
72
- disabledHistoryListener ? variables || {} : (0, import_utils3.mergeWith)(
68
+ (0, import_utils3.mergeWith)(
73
69
  variables,
74
70
  {
75
71
  global: {
@@ -84,9 +80,6 @@ var VariablesProvider = (props) => {
84
80
  );
85
81
  const listenersRef = (0, import_react.useRef)(/* @__PURE__ */ new Set());
86
82
  const setQueryVariable = (0, import_ahooks.useMemoizedFn)((search) => {
87
- if (disabledHistoryListener) {
88
- return;
89
- }
90
83
  const searchParams = new URLSearchParams(search);
91
84
  const query = {};
92
85
  searchParams.forEach((value2, key) => {
@@ -97,17 +90,14 @@ var VariablesProvider = (props) => {
97
90
  });
98
91
  });
99
92
  (0, import_react.useEffect)(() => {
100
- var _a2, _b2, _c2;
101
- if (disabledHistoryListener) {
102
- return;
103
- }
104
- const unlisten = (_c2 = (_b2 = (_a2 = getApp == null ? void 0 : getApp()) == null ? void 0 : _a2.history) == null ? void 0 : _b2.instance) == null ? void 0 : _c2.listen((location) => {
93
+ var _a2, _b, _c;
94
+ const unlisten = (_c = (_b = (_a2 = getApp == null ? void 0 : getApp()) == null ? void 0 : _a2.history) == null ? void 0 : _b.instance) == null ? void 0 : _c.listen((location) => {
105
95
  setQueryVariable(location.search);
106
96
  });
107
97
  return () => {
108
98
  unlisten == null ? void 0 : unlisten();
109
99
  };
110
- }, [disabledHistoryListener]);
100
+ }, []);
111
101
  const registerVariable = (0, import_ahooks.useMemoizedFn)((value2) => {
112
102
  variablesRef.current = (0, import_utils3.mergeWith)(
113
103
  variablesRef.current,
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const DatePicker: (props: any) => JSX.Element;
2
3
  export default DatePicker;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Dropdown: (props: any) => JSX.Element;
3
2
  export default Dropdown;
@@ -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 Text: () => JSX.Element;
3
2
  export default Text;
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const Text: (props: any) => JSX.Element;
3
2
  export default Text;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const _default: {
3
2
  field: {
4
3
  field_icon: string;
@@ -9,6 +9,7 @@ export declare type FilterType = {
9
9
  sortButtonShow: boolean;
10
10
  /** 筛选列表 */
11
11
  list: FilterItemProps[];
12
+ items?: string[];
12
13
  /** 快速筛选最大长度 */
13
14
  quickFilterMaxLength: number;
14
15
  /** 配置存储模式 */
@@ -35,7 +35,7 @@ module.exports = __toCommonJS(iconfont_exports);
35
35
  var import_icons = require("@ant-design/icons");
36
36
  var import_react = __toESM(require("react"));
37
37
  var MyIcon = (0, import_icons.createFromIconfontCN)({
38
- scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.11.js"
38
+ scriptUrl: "https://static.pisellcdn.com/pisell2iconfont1.14.js"
39
39
  // 在 iconfont.cn 上生成
40
40
  });
41
41
  var IconFont = (props) => {
@@ -1,8 +1,6 @@
1
+ /// <reference types="react" />
1
2
  import { ConfigProviderProps } from '../config-provider';
2
3
  interface PageProps extends ConfigProviderProps {
3
- variablesConfig?: {
4
- disabledHistoryListener?: boolean;
5
- };
6
4
  }
7
5
  declare const Page: (props: PageProps) => JSX.Element;
8
6
  export default Page;
@@ -70,7 +70,7 @@ var localeDateMap = {
70
70
  };
71
71
  var Page = (props) => {
72
72
  var _a, _b, _c, _d, _e, _f;
73
- const { children, style, className, locale: propsLocale, variablesConfig, ...others } = props;
73
+ const { children, style, className, locale: propsLocale, ...others } = props;
74
74
  const context = (0, import_useEngineContext.default)();
75
75
  const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
76
76
  const locale = propsLocale || ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en";
@@ -240,8 +240,7 @@ var Page = (props) => {
240
240
  /* @__PURE__ */ import_react.default.createElement(import_date_picker.ThemeProvider, { theme: datePickerTheme }, /* @__PURE__ */ import_react.default.createElement(import_date_picker.LocaleProvider, { value: { locale } }, /* @__PURE__ */ import_react.default.createElement(import_pisell_config_provider.default, { locale }, /* @__PURE__ */ import_react.default.createElement(
241
241
  import_VariablesProvider.default,
242
242
  {
243
- variables: ((_f = (_e = context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.variables) || {},
244
- config: variablesConfig
243
+ variables: ((_f = (_e = context.engine) == null ? void 0 : _e.props) == null ? void 0 : _f.variables) || {}
245
244
  },
246
245
  /* @__PURE__ */ import_react.default.createElement(
247
246
  "div",
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { InputNumberProps } from 'antd/es/input-number';
3
2
  export interface PisellAdjustPriceInputNumberProps extends Omit<InputNumberProps, 'onChange'> {
4
3
  value?: number;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { CardProps } from 'antd';
3
2
  import './index.less';
4
3
  export interface PisellCardProps extends CardProps {
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  declare const PisellDatePicker: (props: any) => JSX.Element;
3
2
  export default PisellDatePicker;
@@ -13,4 +13,5 @@ export interface PisellToastProps {
13
13
  onClose?: () => void;
14
14
  }
15
15
  declare const PisellToast: (props: PisellToastProps) => void;
16
+ export { useToast } from './squareToast';
16
17
  export default PisellToast;
@@ -29,7 +29,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
29
29
  // src/components/pisellToast/index.tsx
30
30
  var pisellToast_exports = {};
31
31
  __export(pisellToast_exports, {
32
- default: () => pisellToast_default
32
+ default: () => pisellToast_default,
33
+ useToast: () => import_squareToast.useToast
33
34
  });
34
35
  module.exports = __toCommonJS(pisellToast_exports);
35
36
  var import_react = __toESM(require("react"));
@@ -37,6 +38,7 @@ var import_utils = require("@pisell/utils");
37
38
  var import_pisellMessage = require("../pisellMessage");
38
39
  var import_iconfont = __toESM(require("../iconfont"));
39
40
  var import_index = require("./index.less");
41
+ var import_squareToast = require("./squareToast");
40
42
  var PisellToast = (props) => {
41
43
  const { content, duration, showAction, actionText, onClose } = props;
42
44
  const key = (0, import_utils.getUniqueId)();
@@ -60,3 +62,7 @@ var PisellToast = (props) => {
60
62
  });
61
63
  };
62
64
  var pisellToast_default = PisellToast;
65
+ // Annotate the CommonJS export names for ESM import in node:
66
+ 0 && (module.exports = {
67
+ useToast
68
+ });
@@ -0,0 +1,58 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellToast/squareToast/index.tsx
20
+ var squareToast_exports = {};
21
+ __export(squareToast_exports, {
22
+ default: () => squareToast_default,
23
+ useToast: () => useToast
24
+ });
25
+ module.exports = __toCommonJS(squareToast_exports);
26
+ var import_react = require("react");
27
+ var import_methods = require("./methods");
28
+ var import_index = require("./index.less");
29
+ var Toast = {
30
+ show: import_methods.show,
31
+ clear: import_methods.clear,
32
+ success: import_methods.success,
33
+ info: import_methods.info,
34
+ loading: import_methods.loading,
35
+ fail: import_methods.fail,
36
+ error: import_methods.fail,
37
+ hide: import_methods.hide
38
+ };
39
+ var useToast = () => {
40
+ return (0, import_react.useMemo)(
41
+ () => ({
42
+ show: import_methods.show,
43
+ clear: import_methods.clear,
44
+ success: import_methods.success,
45
+ info: import_methods.info,
46
+ loading: import_methods.loading,
47
+ fail: import_methods.fail,
48
+ error: import_methods.fail,
49
+ hide: import_methods.hide
50
+ }),
51
+ []
52
+ );
53
+ };
54
+ var squareToast_default = Toast;
55
+ // Annotate the CommonJS export names for ESM import in node:
56
+ 0 && (module.exports = {
57
+ useToast
58
+ });