@pisell/materials 2.2.13 → 2.2.14

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 (342) hide show
  1. package/build/lowcode/assets-daily.json +13 -13
  2. package/build/lowcode/assets-dev.json +4 -4
  3. package/build/lowcode/assets-prod.json +13 -13
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +142 -142
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +29 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +22 -20
  11. package/es/components/button/index.d.ts +4 -3
  12. package/es/components/button/index.js +14 -3
  13. package/es/components/iconfont/index.d.ts +2 -1
  14. package/es/components/iconfont/index.js +1 -1
  15. package/es/components/page/index.css +0 -0
  16. package/es/components/page/index.d.ts +2 -2
  17. package/es/components/page/index.js +226 -186
  18. package/es/components/pisell-config-provider/context.d.ts +20 -0
  19. package/es/components/pisell-config-provider/context.js +36 -0
  20. package/es/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
  21. package/es/components/pisell-config-provider/hooks/usePisellConfig.js +11 -0
  22. package/es/components/pisell-config-provider/index.d.ts +12 -0
  23. package/es/components/pisell-config-provider/index.js +36 -0
  24. package/es/components/pisellAlert/index.d.ts +22 -0
  25. package/es/components/pisellAlert/index.js +73 -0
  26. package/es/components/pisellAlert/index.less +149 -0
  27. package/es/components/pisellCard/index.d.ts +12 -0
  28. package/es/components/pisellCard/index.js +16 -0
  29. package/es/components/pisellCard/index.less +9 -0
  30. package/es/components/pisellCardList/index.d.ts +43 -0
  31. package/es/components/pisellCardList/index.js +72 -0
  32. package/es/components/pisellCardList/index.less +75 -0
  33. package/es/components/pisellCheckboxGroup/index.d.ts +34 -0
  34. package/es/components/pisellCheckboxGroup/index.js +173 -0
  35. package/es/components/pisellCheckboxGroup/index.less +36 -0
  36. package/es/components/pisellCheckboxGroup/mock.d.ts +4 -0
  37. package/es/components/pisellCheckboxGroup/mock.js +16 -0
  38. package/es/components/pisellContainer/components/Portal/index.d.ts +10 -0
  39. package/es/components/pisellContainer/components/Portal/index.js +7 -0
  40. package/es/components/pisellContainer/containers.d.ts +1 -0
  41. package/es/components/pisellContainer/containers.js +8 -0
  42. package/es/components/pisellContainer/index.d.ts +22 -0
  43. package/es/components/pisellContainer/index.js +19 -0
  44. package/es/components/pisellCountdown/index.d.ts +24 -0
  45. package/es/components/pisellCountdown/index.js +44 -0
  46. package/es/components/pisellCountdown/utils.d.ts +7 -0
  47. package/es/components/pisellCountdown/utils.js +50 -0
  48. package/es/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
  49. package/es/components/pisellDatePicker/datePickerCpt.js +191 -0
  50. package/es/components/pisellDatePicker/detePickerCpt.less +22 -0
  51. package/es/components/pisellDatePicker/index.d.ts +3 -0
  52. package/es/components/pisellDatePicker/index.js +17 -0
  53. package/es/components/pisellEmpty/index.d.ts +16 -0
  54. package/es/components/pisellEmpty/index.js +38 -0
  55. package/es/components/pisellEmpty/index.less +34 -0
  56. package/es/components/pisellInformationEntry/Input/index.d.ts +8 -0
  57. package/es/components/pisellInformationEntry/Input/index.js +50 -0
  58. package/es/components/pisellInformationEntry/Input/index.less +14 -0
  59. package/es/components/pisellInformationEntry/Scan/index.d.ts +8 -0
  60. package/es/components/pisellInformationEntry/Scan/index.js +25 -0
  61. package/es/components/pisellInformationEntry/Scan/index.less +8 -0
  62. package/es/components/pisellInformationEntry/constants.d.ts +3 -0
  63. package/es/components/pisellInformationEntry/constants.js +21 -0
  64. package/es/components/pisellInformationEntry/index.d.ts +31 -0
  65. package/es/components/pisellInformationEntry/index.js +188 -0
  66. package/es/components/pisellInformationEntry/index.less +40 -0
  67. package/es/components/pisellInformationEntry/utils.d.ts +4 -0
  68. package/es/components/pisellInformationEntry/utils.js +38 -0
  69. package/es/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
  70. package/es/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
  71. package/es/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
  72. package/es/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
  73. package/es/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
  74. package/es/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
  75. package/es/components/pisellInput/components/BankCard/index.d.ts +11 -0
  76. package/es/components/pisellInput/components/BankCard/index.js +82 -0
  77. package/es/components/pisellInput/components/BankCard/index.less +4 -0
  78. package/es/components/pisellInput/components/BankCard/utils.d.ts +11 -0
  79. package/es/components/pisellInput/components/BankCard/utils.js +65 -0
  80. package/es/components/pisellInput/components/Copy/index.d.ts +11 -0
  81. package/es/components/pisellInput/components/Copy/index.js +53 -0
  82. package/es/components/pisellInput/components/SecurityCode/card.png +0 -0
  83. package/es/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
  84. package/es/components/pisellInput/components/SecurityCode/index.js +46 -0
  85. package/es/components/pisellInput/components/SecurityCode/index.less +4 -0
  86. package/es/components/pisellInput/index.d.ts +13 -0
  87. package/es/components/pisellInput/index.js +15 -0
  88. package/es/components/pisellLoading/index.d.ts +18 -0
  89. package/es/components/pisellLoading/index.js +45 -0
  90. package/es/components/pisellLoading/index.less +35 -0
  91. package/es/components/pisellMessage/index.d.ts +4 -0
  92. package/es/components/pisellMessage/index.js +5 -0
  93. package/es/components/pisellModal/components/Information/index.d.ts +21 -0
  94. package/es/components/pisellModal/components/Information/index.js +25 -0
  95. package/es/components/pisellModal/components/Information/index.less +16 -0
  96. package/es/components/pisellModal/components/IpadModal/index.d.ts +6 -0
  97. package/es/components/pisellModal/components/IpadModal/index.js +6 -0
  98. package/es/components/pisellModal/components/MobileModal/index.d.ts +9 -0
  99. package/es/components/pisellModal/components/MobileModal/index.js +27 -0
  100. package/es/components/pisellModal/components/MobileModal/index.less +60 -0
  101. package/es/components/pisellModal/components/PcModal/index.d.ts +30 -0
  102. package/es/components/pisellModal/components/PcModal/index.js +129 -0
  103. package/es/components/pisellModal/components/PcModal/index.less +105 -0
  104. package/es/components/pisellModal/components/functions/index.d.ts +12 -0
  105. package/es/components/pisellModal/components/functions/index.js +44 -0
  106. package/es/components/pisellModal/components/functions/index.less +25 -0
  107. package/es/components/pisellModal/components/index.d.ts +10 -0
  108. package/es/components/pisellModal/components/index.js +9 -0
  109. package/es/components/pisellModal/constants.d.ts +6 -0
  110. package/es/components/pisellModal/constants.js +6 -0
  111. package/es/components/pisellModal/index.d.ts +43 -0
  112. package/es/components/pisellModal/index.js +30 -0
  113. package/es/components/pisellRow/index.d.ts +22 -0
  114. package/es/components/pisellRow/index.js +67 -0
  115. package/es/components/pisellRow/index.less +13 -0
  116. package/es/components/pisellScan/index.d.ts +21 -0
  117. package/es/components/pisellScan/index.js +80 -0
  118. package/es/components/pisellScan/index.less +12 -0
  119. package/es/components/pisellText/components/Amount/index.d.ts +18 -0
  120. package/es/components/pisellText/components/Amount/index.js +25 -0
  121. package/es/components/pisellText/index.d.ts +8 -0
  122. package/es/components/pisellText/index.js +7 -0
  123. package/es/components/pisellToast/index.d.ts +16 -0
  124. package/es/components/pisellToast/index.js +32 -0
  125. package/es/components/pisellToast/index.less +26 -0
  126. package/es/components/pisellTooltip/index.d.ts +10 -0
  127. package/es/components/pisellTooltip/index.js +15 -0
  128. package/es/components/pisellTooltip/index.less +5 -0
  129. package/es/components/pisellWalletPassCard/bg.jpeg +0 -0
  130. package/es/components/pisellWalletPassCard/index.d.ts +54 -0
  131. package/es/components/pisellWalletPassCard/index.js +93 -0
  132. package/es/components/pisellWalletPassCard/index.less +100 -0
  133. package/es/hooks/useCssVariables.d.ts +8 -0
  134. package/es/hooks/useCssVariables.js +21 -0
  135. package/es/index.d.ts +23 -0
  136. package/es/index.js +26 -1
  137. package/es/locales/en-US.d.ts +9 -0
  138. package/es/locales/en-US.js +13 -1
  139. package/es/locales/index.js +3 -1
  140. package/es/locales/zh-CN.d.ts +9 -0
  141. package/es/locales/zh-CN.js +13 -1
  142. package/es/locales/zh-TW.d.ts +9 -0
  143. package/es/locales/zh-TW.js +13 -1
  144. package/es/utils/index.d.ts +1 -0
  145. package/es/utils/index.js +15 -1
  146. package/es/utils/locale.js +2 -1
  147. package/lib/components/button/index.d.ts +4 -3
  148. package/lib/components/button/index.js +13 -9
  149. package/lib/components/iconfont/index.d.ts +2 -1
  150. package/lib/components/iconfont/index.js +1 -1
  151. package/lib/components/page/index.css +0 -0
  152. package/lib/components/page/index.d.ts +2 -2
  153. package/lib/components/page/index.js +201 -161
  154. package/lib/components/pisell-config-provider/context.d.ts +20 -0
  155. package/lib/components/pisell-config-provider/context.js +49 -0
  156. package/lib/components/pisell-config-provider/hooks/usePisellConfig.d.ts +5 -0
  157. package/lib/components/pisell-config-provider/hooks/usePisellConfig.js +31 -0
  158. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  159. package/lib/components/pisell-config-provider/index.js +69 -0
  160. package/lib/components/pisellAlert/index.d.ts +22 -0
  161. package/lib/components/pisellAlert/index.js +95 -0
  162. package/lib/components/pisellAlert/index.less +149 -0
  163. package/lib/components/pisellCard/index.d.ts +12 -0
  164. package/lib/components/pisellCard/index.js +48 -0
  165. package/lib/components/pisellCard/index.less +9 -0
  166. package/lib/components/pisellCardList/index.d.ts +43 -0
  167. package/lib/components/pisellCardList/index.js +108 -0
  168. package/lib/components/pisellCardList/index.less +75 -0
  169. package/lib/components/pisellCheckboxGroup/index.d.ts +34 -0
  170. package/lib/components/pisellCheckboxGroup/index.js +150 -0
  171. package/lib/components/pisellCheckboxGroup/index.less +36 -0
  172. package/lib/components/pisellCheckboxGroup/mock.d.ts +4 -0
  173. package/lib/components/pisellCheckboxGroup/mock.js +35 -0
  174. package/lib/components/pisellContainer/components/Portal/index.d.ts +10 -0
  175. package/lib/components/pisellContainer/components/Portal/index.js +40 -0
  176. package/lib/components/pisellContainer/containers.d.ts +1 -0
  177. package/lib/components/pisellContainer/containers.js +46 -0
  178. package/lib/components/pisellContainer/index.d.ts +22 -0
  179. package/lib/components/pisellContainer/index.js +49 -0
  180. package/lib/components/pisellCountdown/index.d.ts +24 -0
  181. package/lib/components/pisellCountdown/index.js +63 -0
  182. package/lib/components/pisellCountdown/utils.d.ts +7 -0
  183. package/lib/components/pisellCountdown/utils.js +60 -0
  184. package/lib/components/pisellDatePicker/datePickerCpt.d.ts +22 -0
  185. package/lib/components/pisellDatePicker/datePickerCpt.js +157 -0
  186. package/lib/components/pisellDatePicker/detePickerCpt.less +22 -0
  187. package/lib/components/pisellDatePicker/index.d.ts +3 -0
  188. package/lib/components/pisellDatePicker/index.js +48 -0
  189. package/lib/components/pisellEmpty/index.d.ts +16 -0
  190. package/lib/components/pisellEmpty/index.js +61 -0
  191. package/lib/components/pisellEmpty/index.less +34 -0
  192. package/lib/components/pisellInformationEntry/Input/index.d.ts +8 -0
  193. package/lib/components/pisellInformationEntry/Input/index.js +56 -0
  194. package/lib/components/pisellInformationEntry/Input/index.less +14 -0
  195. package/lib/components/pisellInformationEntry/Scan/index.d.ts +8 -0
  196. package/lib/components/pisellInformationEntry/Scan/index.js +64 -0
  197. package/lib/components/pisellInformationEntry/Scan/index.less +8 -0
  198. package/lib/components/pisellInformationEntry/constants.d.ts +3 -0
  199. package/lib/components/pisellInformationEntry/constants.js +49 -0
  200. package/lib/components/pisellInformationEntry/index.d.ts +31 -0
  201. package/lib/components/pisellInformationEntry/index.js +162 -0
  202. package/lib/components/pisellInformationEntry/index.less +40 -0
  203. package/lib/components/pisellInformationEntry/utils.d.ts +4 -0
  204. package/lib/components/pisellInformationEntry/utils.js +40 -0
  205. package/lib/components/pisellInput/components/BankCard/cardPng/AMEX.png +0 -0
  206. package/lib/components/pisellInput/components/BankCard/cardPng/Discover.png +0 -0
  207. package/lib/components/pisellInput/components/BankCard/cardPng/JCB.png +0 -0
  208. package/lib/components/pisellInput/components/BankCard/cardPng/MasterCard.png +0 -0
  209. package/lib/components/pisellInput/components/BankCard/cardPng/UnionPay.png +0 -0
  210. package/lib/components/pisellInput/components/BankCard/cardPng/VISA.png +0 -0
  211. package/lib/components/pisellInput/components/BankCard/index.d.ts +11 -0
  212. package/lib/components/pisellInput/components/BankCard/index.js +98 -0
  213. package/lib/components/pisellInput/components/BankCard/index.less +4 -0
  214. package/lib/components/pisellInput/components/BankCard/utils.d.ts +11 -0
  215. package/lib/components/pisellInput/components/BankCard/utils.js +103 -0
  216. package/lib/components/pisellInput/components/Copy/index.d.ts +11 -0
  217. package/lib/components/pisellInput/components/Copy/index.js +61 -0
  218. package/lib/components/pisellInput/components/SecurityCode/card.png +0 -0
  219. package/lib/components/pisellInput/components/SecurityCode/index.d.ts +12 -0
  220. package/lib/components/pisellInput/components/SecurityCode/index.js +74 -0
  221. package/lib/components/pisellInput/components/SecurityCode/index.less +4 -0
  222. package/lib/components/pisellInput/index.d.ts +13 -0
  223. package/lib/components/pisellInput/index.js +46 -0
  224. package/lib/components/pisellLoading/index.d.ts +18 -0
  225. package/lib/components/pisellLoading/index.js +69 -0
  226. package/lib/components/pisellLoading/index.less +35 -0
  227. package/lib/components/pisellMessage/index.d.ts +4 -0
  228. package/lib/components/pisellMessage/index.js +34 -0
  229. package/lib/components/pisellModal/components/Information/index.d.ts +21 -0
  230. package/lib/components/pisellModal/components/Information/index.js +54 -0
  231. package/lib/components/pisellModal/components/Information/index.less +16 -0
  232. package/lib/components/pisellModal/components/IpadModal/index.d.ts +6 -0
  233. package/lib/components/pisellModal/components/IpadModal/index.js +40 -0
  234. package/lib/components/pisellModal/components/MobileModal/index.d.ts +9 -0
  235. package/lib/components/pisellModal/components/MobileModal/index.js +67 -0
  236. package/lib/components/pisellModal/components/MobileModal/index.less +60 -0
  237. package/lib/components/pisellModal/components/PcModal/index.d.ts +30 -0
  238. package/lib/components/pisellModal/components/PcModal/index.js +143 -0
  239. package/lib/components/pisellModal/components/PcModal/index.less +105 -0
  240. package/lib/components/pisellModal/components/functions/index.d.ts +12 -0
  241. package/lib/components/pisellModal/components/functions/index.js +90 -0
  242. package/lib/components/pisellModal/components/functions/index.less +25 -0
  243. package/lib/components/pisellModal/components/index.d.ts +10 -0
  244. package/lib/components/pisellModal/components/index.js +52 -0
  245. package/lib/components/pisellModal/constants.d.ts +6 -0
  246. package/lib/components/pisellModal/constants.js +33 -0
  247. package/lib/components/pisellModal/index.d.ts +43 -0
  248. package/lib/components/pisellModal/index.js +63 -0
  249. package/lib/components/pisellRow/index.d.ts +22 -0
  250. package/lib/components/pisellRow/index.js +82 -0
  251. package/lib/components/pisellRow/index.less +13 -0
  252. package/lib/components/pisellScan/index.d.ts +21 -0
  253. package/lib/components/pisellScan/index.js +100 -0
  254. package/lib/components/pisellScan/index.less +12 -0
  255. package/lib/components/pisellText/components/Amount/index.d.ts +18 -0
  256. package/lib/components/pisellText/components/Amount/index.js +64 -0
  257. package/lib/components/pisellText/index.d.ts +8 -0
  258. package/lib/components/pisellText/index.js +41 -0
  259. package/lib/components/pisellToast/index.d.ts +16 -0
  260. package/lib/components/pisellToast/index.js +59 -0
  261. package/lib/components/pisellToast/index.less +26 -0
  262. package/lib/components/pisellTooltip/index.d.ts +10 -0
  263. package/lib/components/pisellTooltip/index.js +53 -0
  264. package/lib/components/pisellTooltip/index.less +5 -0
  265. package/lib/components/pisellWalletPassCard/bg.jpeg +0 -0
  266. package/lib/components/pisellWalletPassCard/index.d.ts +54 -0
  267. package/lib/components/pisellWalletPassCard/index.js +101 -0
  268. package/lib/components/pisellWalletPassCard/index.less +100 -0
  269. package/lib/hooks/useCssVariables.d.ts +8 -0
  270. package/lib/hooks/useCssVariables.js +36 -0
  271. package/lib/index.d.ts +23 -0
  272. package/lib/index.js +71 -0
  273. package/lib/locales/en-US.d.ts +9 -0
  274. package/lib/locales/en-US.js +13 -1
  275. package/lib/locales/index.js +3 -1
  276. package/lib/locales/zh-CN.d.ts +9 -0
  277. package/lib/locales/zh-CN.js +13 -1
  278. package/lib/locales/zh-TW.d.ts +9 -0
  279. package/lib/locales/zh-TW.js +13 -1
  280. package/lib/utils/index.d.ts +1 -0
  281. package/lib/utils/index.js +16 -0
  282. package/lib/utils/locale.js +2 -1
  283. package/lowcode/_utils/transform-meta.ts +31 -10
  284. package/lowcode/button/__screenshots__/pisell-modal-information.png +0 -0
  285. package/lowcode/button/meta.ts +30 -0
  286. package/lowcode/button/snippets.ts +28 -0
  287. package/lowcode/information-modal/meta.ts +1931 -0
  288. package/lowcode/modal/meta.ts +1 -1
  289. package/lowcode/page/meta.ts +8 -1
  290. package/lowcode/pisell-alert/meta.ts +117 -0
  291. package/lowcode/pisell-alert/snippets.ts +50 -0
  292. package/lowcode/pisell-card/__screenshots__/card-1.png +0 -0
  293. package/lowcode/pisell-card/meta.ts +100 -0
  294. package/lowcode/pisell-card/snippets.ts +10 -0
  295. package/lowcode/pisell-card-list/meta.ts +145 -0
  296. package/lowcode/pisell-card-list/snippets.ts +9 -0
  297. package/lowcode/pisell-checkbox-group/meta.ts +112 -0
  298. package/lowcode/pisell-checkbox-group/snippets.ts +13 -0
  299. package/lowcode/pisell-container/meta.ts +71 -0
  300. package/lowcode/pisell-container/snippets.ts +14 -0
  301. package/lowcode/pisell-countdown/meta.ts +71 -0
  302. package/lowcode/pisell-countdown/snippets.ts +12 -0
  303. package/lowcode/pisell-date-picker/meta.ts +76 -0
  304. package/lowcode/pisell-date-picker/snippets.ts +9 -0
  305. package/lowcode/pisell-empty/__screenshots__/empty-1.png +0 -0
  306. package/lowcode/pisell-empty/meta.ts +85 -0
  307. package/lowcode/pisell-empty/snippets.ts +10 -0
  308. package/lowcode/pisell-information-entry/meta.ts +131 -0
  309. package/lowcode/pisell-information-entry/snippets.ts +17 -0
  310. package/lowcode/pisell-input/__screenshots__/input-1.png +0 -0
  311. package/lowcode/pisell-input/meta.ts +193 -0
  312. package/lowcode/pisell-input/snippets.ts +11 -0
  313. package/lowcode/pisell-input.bank-card-input/__screenshots__/pisell-input.bank-card-input.png +0 -0
  314. package/lowcode/pisell-input.bank-card-input/meta.ts +62 -0
  315. package/lowcode/pisell-input.bank-card-input/snippets.ts +11 -0
  316. package/lowcode/pisell-input.copy/meta.ts +73 -0
  317. package/lowcode/pisell-input.copy/snippets.ts +10 -0
  318. package/lowcode/pisell-input.security-code/__screenshots__/pisell-input.security-code.png +0 -0
  319. package/lowcode/pisell-input.security-code/meta.ts +92 -0
  320. package/lowcode/pisell-input.security-code/snippets.ts +11 -0
  321. package/lowcode/pisell-loading/meta.ts +98 -0
  322. package/lowcode/pisell-loading/snippets.ts +11 -0
  323. package/lowcode/pisell-modal/__screenshots__/modal-1.png +0 -0
  324. package/lowcode/pisell-modal/__screenshots__/modal-2.png +0 -0
  325. package/lowcode/pisell-modal/meta.ts +200 -0
  326. package/lowcode/pisell-modal/snippets.ts +38 -0
  327. package/lowcode/pisell-modal.information/__screenshots__/pisell-modal.information.png +0 -0
  328. package/lowcode/pisell-modal.information/meta.ts +116 -0
  329. package/lowcode/pisell-modal.information/snippets.ts +17 -0
  330. package/lowcode/pisell-row/meta.ts +127 -0
  331. package/lowcode/pisell-row/snippets.ts +24 -0
  332. package/lowcode/pisell-scan/meta.ts +53 -0
  333. package/lowcode/pisell-scan/snippets.ts +13 -0
  334. package/lowcode/pisell-text/meta.ts +8117 -0
  335. package/lowcode/pisell-text.amount/meta.ts +61 -0
  336. package/lowcode/pisell-text.amount/snippets.ts +15 -0
  337. package/lowcode/pisell-tooltip/__screenshots__/tooltip-1.jpg +0 -0
  338. package/lowcode/pisell-tooltip/meta.ts +306 -0
  339. package/lowcode/pisell-tooltip/snippets.ts +12 -0
  340. package/lowcode/pisell-wallet-pass-card/meta.ts +189 -0
  341. package/lowcode/pisell-wallet-pass-card/snippets.ts +20 -0
  342. package/package.json +4 -3
@@ -36,10 +36,13 @@ var import_react = __toESM(require("react"));
36
36
  var import_config_provider = __toESM(require("../config-provider"));
37
37
  var import_AdapterDayjs = require("@pisell/date-picker/es/AdapterDayjs");
38
38
  var import_date_picker = require("@pisell/date-picker");
39
+ var import_antd = require("antd");
39
40
  var import_en_US = __toESM(require("antd/locale/en_US"));
40
41
  var import_zh_CN = __toESM(require("antd/locale/zh_CN"));
41
42
  var import_zh_TW = __toESM(require("antd/locale/zh_TW"));
42
43
  var import_zh_HK = __toESM(require("antd/locale/zh_HK"));
44
+ var import_pisell_config_provider = __toESM(require("../pisell-config-provider"));
45
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
43
46
  var localMap = {
44
47
  "zh-TW": import_zh_TW.default,
45
48
  "zh-CN": import_zh_CN.default,
@@ -47,160 +50,6 @@ var localMap = {
47
50
  "en-US": import_en_US.default,
48
51
  en: import_en_US.default
49
52
  };
50
- var theme = {
51
- components: {
52
- Table: {
53
- colorFillContent: "#EAECF0",
54
- colorFillSecondary: "#F2F4F7",
55
- colorBorderSecondary: "#EAECF0",
56
- colorFillAlter: "#F9FAFB",
57
- controlItemBgHover: "#F9FAFB",
58
- colorTextHeading: "#475467",
59
- colorTextDescription: "#667085",
60
- colorText: "#101828",
61
- controlHeight: 32,
62
- padding: 24,
63
- margin: 16
64
- },
65
- Button: {
66
- borderRadiusSM: 6,
67
- borderRadiusLG: 9,
68
- borderRadius: 8,
69
- controlHeight: 36,
70
- colorBgContainerDisabled: "#F2F4F7",
71
- colorBgTextHover: "#F9FAFB",
72
- colorBorder: "#D0D5DD",
73
- colorError: "#D92D20",
74
- colorErrorActive: "#D92D20",
75
- colorErrorHover: "#B42318",
76
- colorErrorBg: "#FEF3F2",
77
- colorErrorBorderHover: "#FDA29B",
78
- colorErrorOutline: "rgba(217, 45, 32, 0.06)",
79
- colorLink: "#175CD3",
80
- colorLinkActive: "#194185",
81
- colorLinkHover: "#1849A9",
82
- colorPrimaryActive: "#7f56d9",
83
- colorPrimaryBorder: "#E9D7FE",
84
- colorText: "#344054",
85
- colorTextDisabled: "#D0D5DD",
86
- colorTextLightSolid: "#fff",
87
- colorBgTextActive: "#D0D5DD",
88
- controlOutline: "rgba(127, 86, 217, 0.04)",
89
- controlTmpOutline: "#F9FAFB",
90
- paddingContentHorizontal: 14,
91
- marginXS: 8
92
- },
93
- Divider: {
94
- colorSplit: "#EAECF0"
95
- },
96
- Breadcrumb: {
97
- itemColor: "#475467",
98
- colorTextDescription: "#475467",
99
- lastItemColor: "#6941C6",
100
- separatorMargin: 12,
101
- separatorColor: "#D0D5DD",
102
- linkHoverColor: "#1D2939",
103
- linkColor: "#475467",
104
- colorBgTextHover: "#F9FAFB",
105
- paddingXXS: 8
106
- },
107
- Dropdown: {
108
- borderRadiusLG: 8,
109
- // "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
110
- controlHeight: 42,
111
- fontSize: 14
112
- },
113
- DatePicker: {
114
- borderRadius: 8,
115
- colorTextPlaceholder: "#667085",
116
- colorIcon: "#667085",
117
- colorTextQuaternary: "#D0D5DD",
118
- colorBgContainerDisabled: "#F9FAFB",
119
- colorTextDisabled: "#98A2B3"
120
- },
121
- Input: {
122
- fontSizeIcon: 16
123
- // "lineHeight": 1
124
- },
125
- Select: {
126
- fontSizeIcon: 16
127
- // "lineHeight": 1
128
- }
129
- },
130
- token: {
131
- colorPrimary: "#7F56D9",
132
- colorPrimaryBg: "#F9F5FF",
133
- colorPrimaryBgHover: "#F4EBFF",
134
- colorPrimaryBorder: "#E9D7FE",
135
- colorPrimaryBorderHover: "#D6BBFB",
136
- colorPrimaryHover: "#6941C6",
137
- colorPrimaryActive: "#53389E",
138
- colorPrimaryTextHover: "#53389E",
139
- colorPrimaryText: "#6941C6",
140
- colorPrimaryTextActive: "#42307D",
141
- colorSuccess: "#079455",
142
- colorSuccessBg: "#ECFDF3",
143
- colorSuccessBgHover: "#DCFAE6",
144
- colorSuccessBorder: "#ABEFC6",
145
- colorSuccessBorderHover: "#75E0A7",
146
- colorSuccessHover: "#067647",
147
- colorSuccessText: "#067647",
148
- colorSuccessActive: "#085D3A",
149
- colorSuccessTextHover: "#085D3A",
150
- colorSuccessTextActive: "#074D31",
151
- colorWarning: "#dc6803",
152
- colorWarningBg: "#FFFAEB",
153
- colorWarningBgHover: "#FEF0C7",
154
- colorWarningBorder: "#FEDF89",
155
- colorWarningBorderHover: "#FEC84B",
156
- colorWarningHover: "#B54708",
157
- colorWarningText: "#B54708",
158
- colorWarningActive: "#93370D",
159
- colorWarningTextHover: "#93370D",
160
- colorWarningTextActive: "#7A2E0E",
161
- colorError: "#d92d20",
162
- colorErrorBg: "#FEF3F2",
163
- colorErrorBgHover: "#FEE4E2",
164
- colorErrorBorder: "#FECDCA",
165
- colorErrorBorderHover: "#FDA29B",
166
- colorErrorHover: "#B42318",
167
- colorErrorText: "#B42318",
168
- colorErrorActive: "#912018",
169
- colorErrorTextHover: "#912018",
170
- colorErrorTextActive: "#7A271A",
171
- colorInfo: "#1570ef",
172
- colorInfoBg: "#EFF8FF",
173
- colorInfoBgHover: "#D1E9FF",
174
- colorInfoBorder: "#B2DDFF",
175
- colorInfoBorderHover: "#84CAFF",
176
- colorInfoHover: "#175CD3",
177
- colorInfoText: "#175CD3",
178
- colorInfoActive: "#1849A9",
179
- colorInfoTextHover: "#1849A9",
180
- colorInfoTextActive: "#194185",
181
- colorText: "#101828",
182
- colorTextSecondary: "#475467",
183
- colorTextTertiary: "#667085",
184
- colorTextQuaternary: "#D0D5DD",
185
- colorBorder: "#D0D5DD",
186
- colorBorderSecondary: "#EAECF0",
187
- colorFill: "#D0D5DD",
188
- colorFillSecondary: "#EAECF0",
189
- colorFillTertiary: "#F2F4F7",
190
- colorFillQuaternary: "#F9FAFB",
191
- colorBgLayout: "#F2F4F7",
192
- colorBgSpotlight: "#101828",
193
- colorBgMask: "rgba(0, 0, 0, 0.5)",
194
- wireframe: false,
195
- borderRadius: 8
196
- }
197
- };
198
- var _a;
199
- var datePickerTheme = (0, import_date_picker.createTheme)({
200
- palette: {
201
- primary: { main: ((_a = theme.token) == null ? void 0 : _a.colorPrimary) || "#7F56D9" }
202
- }
203
- });
204
53
  var localeDateMap = {
205
54
  "en-US": {
206
55
  adapterLocale: "en"
@@ -219,23 +68,214 @@ var localeDateMap = {
219
68
  }
220
69
  };
221
70
  var Page = (props) => {
222
- var _a2;
223
- const { children, style, locale, ...others } = props;
71
+ var _a, _b, _c, _d;
72
+ const { children, style, locale: propsLocale, ...others } = props;
73
+ const context = (0, import_useEngineContext.default)();
74
+ const { platform, themeColor } = ((_a = context.appHelper) == null ? void 0 : _a.constants) || {};
75
+ const locale = propsLocale || ((_c = (_b = context == null ? void 0 : context.engine) == null ? void 0 : _b.props) == null ? void 0 : _c.locale) || "en";
76
+ const theme = (0, import_react.useMemo)(() => {
77
+ var _a2, _b2;
78
+ if (props == null ? void 0 : props.theme) {
79
+ return {
80
+ ...props.theme,
81
+ token: {
82
+ ...props.theme.token,
83
+ // 外部透传主题时,如果没有传入colorPrimary 默认使用主项目内主题色
84
+ colorPrimary: ((_b2 = (_a2 = props == null ? void 0 : props.theme) == null ? void 0 : _a2.token) == null ? void 0 : _b2.colorPrimary) || themeColor || "#7F56D9"
85
+ }
86
+ };
87
+ }
88
+ return {
89
+ components: {
90
+ Table: {
91
+ colorFillContent: "#EAECF0",
92
+ colorFillSecondary: "#F2F4F7",
93
+ colorBorderSecondary: "#EAECF0",
94
+ colorFillAlter: "#F9FAFB",
95
+ controlItemBgHover: "#F9FAFB",
96
+ colorTextHeading: "#475467",
97
+ colorTextDescription: "#667085",
98
+ colorText: "#101828",
99
+ controlHeight: 32,
100
+ padding: 24,
101
+ margin: 16
102
+ },
103
+ Message: {
104
+ contentBg: "#101828"
105
+ },
106
+ Button: {
107
+ borderRadiusSM: 6,
108
+ borderRadiusLG: 9,
109
+ borderRadius: 8,
110
+ controlHeight: 36,
111
+ colorBgContainerDisabled: "#F2F4F7",
112
+ colorBgTextHover: "#F9FAFB",
113
+ colorBorder: "#D0D5DD",
114
+ colorError: "#D92D20",
115
+ colorErrorActive: "#D92D20",
116
+ colorErrorHover: "#B42318",
117
+ colorErrorBg: "#FEF3F2",
118
+ colorErrorBorderHover: "#FDA29B",
119
+ colorErrorOutline: "rgba(217, 45, 32, 0.06)",
120
+ colorLink: "#175CD3",
121
+ colorLinkActive: "#194185",
122
+ colorLinkHover: "#1849A9",
123
+ // colorPrimaryActive: '#7f56d9',
124
+ // colorPrimaryBorder: '#E9D7FE',
125
+ colorText: "#344054",
126
+ colorTextDisabled: "#D0D5DD",
127
+ colorTextLightSolid: "#fff",
128
+ colorBgTextActive: "#D0D5DD",
129
+ controlOutline: "rgba(127, 86, 217, 0.04)",
130
+ controlTmpOutline: "#F9FAFB",
131
+ paddingContentHorizontal: 14,
132
+ marginXS: 8
133
+ },
134
+ Divider: {
135
+ colorSplit: "#EAECF0"
136
+ },
137
+ Breadcrumb: {
138
+ itemColor: "#475467",
139
+ colorTextDescription: "#475467",
140
+ // lastItemColor: '#6941C6',
141
+ separatorMargin: 12,
142
+ separatorColor: "#D0D5DD",
143
+ linkHoverColor: "#1D2939",
144
+ linkColor: "#475467",
145
+ colorBgTextHover: "#F9FAFB",
146
+ paddingXXS: 8
147
+ },
148
+ Dropdown: {
149
+ borderRadiusLG: 8,
150
+ // "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
151
+ controlHeight: 42,
152
+ fontSize: 14
153
+ },
154
+ DatePicker: {
155
+ borderRadius: 8,
156
+ colorTextPlaceholder: "#667085",
157
+ colorIcon: "#667085",
158
+ colorTextQuaternary: "#D0D5DD",
159
+ colorBgContainerDisabled: "#F9FAFB",
160
+ colorTextDisabled: "#98A2B3"
161
+ },
162
+ Input: {
163
+ fontSizeIcon: 16,
164
+ addonBg: "#fff"
165
+ // "lineHeight": 1
166
+ },
167
+ Select: {
168
+ fontSizeIcon: 16
169
+ // "lineHeight": 1
170
+ }
171
+ },
172
+ token: {
173
+ colorPrimary: themeColor || "#7F56D9",
174
+ // colorPrimaryBg: '#F9F5FF',
175
+ // colorPrimaryBgHover: '#F4EBFF',
176
+ // colorPrimaryBorder: '#E9D7FE',
177
+ // colorPrimaryBorderHover: '#D6BBFB',
178
+ // colorPrimaryHover: '#6941C6',
179
+ // colorPrimaryActive: '#53389E',
180
+ // colorPrimaryTextHover: '#53389E',
181
+ // colorPrimaryText: '#6941C6',
182
+ // colorPrimaryTextActive: '#42307D',
183
+ colorSuccess: "#079455",
184
+ colorSuccessBg: "#ECFDF3",
185
+ colorSuccessBgHover: "#DCFAE6",
186
+ colorSuccessBorder: "#ABEFC6",
187
+ colorSuccessBorderHover: "#75E0A7",
188
+ colorSuccessHover: "#067647",
189
+ colorSuccessText: "#067647",
190
+ colorSuccessActive: "#085D3A",
191
+ colorSuccessTextHover: "#085D3A",
192
+ colorSuccessTextActive: "#074D31",
193
+ colorWarning: "#dc6803",
194
+ colorWarningBg: "#FFFAEB",
195
+ colorWarningBgHover: "#FEF0C7",
196
+ colorWarningBorder: "#FEDF89",
197
+ colorWarningBorderHover: "#FEC84B",
198
+ colorWarningHover: "#B54708",
199
+ colorWarningText: "#B54708",
200
+ colorWarningActive: "#93370D",
201
+ colorWarningTextHover: "#93370D",
202
+ colorWarningTextActive: "#7A2E0E",
203
+ colorError: "#d92d20",
204
+ colorErrorBg: "#FEF3F2",
205
+ colorErrorBgHover: "#FEE4E2",
206
+ colorErrorBorder: "#FECDCA",
207
+ colorErrorBorderHover: "#FDA29B",
208
+ colorErrorHover: "#B42318",
209
+ colorErrorText: "#B42318",
210
+ colorErrorActive: "#912018",
211
+ colorErrorTextHover: "#912018",
212
+ colorErrorTextActive: "#7A271A",
213
+ colorInfo: "#1570ef",
214
+ colorInfoBg: "#EFF8FF",
215
+ colorInfoBgHover: "#D1E9FF",
216
+ colorInfoBorder: "#B2DDFF",
217
+ colorInfoBorderHover: "#84CAFF",
218
+ colorInfoHover: "#175CD3",
219
+ colorInfoText: "#175CD3",
220
+ colorInfoActive: "#1849A9",
221
+ colorInfoTextHover: "#1849A9",
222
+ colorInfoTextActive: "#194185",
223
+ colorText: "#101828",
224
+ colorTextSecondary: "#475467",
225
+ colorTextTertiary: "#667085",
226
+ colorTextQuaternary: "#D0D5DD",
227
+ colorBorder: "#D0D5DD",
228
+ colorBorderSecondary: "#EAECF0",
229
+ colorFill: "#D0D5DD",
230
+ colorFillSecondary: "#EAECF0",
231
+ colorFillTertiary: "#F2F4F7",
232
+ colorFillQuaternary: "#F9FAFB",
233
+ colorBgLayout: "#F2F4F7",
234
+ colorBgSpotlight: "#101828",
235
+ colorBgMask: "rgba(0, 0, 0, 0.5)",
236
+ wireframe: false,
237
+ borderRadius: 8
238
+ }
239
+ };
240
+ }, [platform, themeColor, props == null ? void 0 : props.theme]);
241
+ const datePickerTheme = (0, import_react.useMemo)(() => {
242
+ var _a2;
243
+ return (0, import_date_picker.createTheme)({
244
+ palette: {
245
+ primary: { main: ((_a2 = theme.token) == null ? void 0 : _a2.colorPrimary) || "#7F56D9" }
246
+ }
247
+ });
248
+ }, [platform, themeColor]);
224
249
  return /* @__PURE__ */ import_react.default.createElement(
225
250
  import_config_provider.default,
226
251
  {
227
252
  ...others,
228
253
  locale: localMap[locale],
229
254
  prefixCls: props.prefixCls || "pisell-lowcode",
230
- theme: props.theme || theme
255
+ theme
231
256
  },
232
257
  /* @__PURE__ */ import_react.default.createElement(
233
- import_date_picker.LocalizationProvider,
258
+ import_antd.App,
234
259
  {
235
- dateAdapter: import_AdapterDayjs.AdapterDayjs,
236
- adapterLocale: ((_a2 = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _a2.adapterLocale) || "en"
260
+ component: false,
261
+ message: {
262
+ maxCount: 1
263
+ }
237
264
  },
238
- /* @__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("div", { style }, children)))
265
+ /* @__PURE__ */ import_react.default.createElement(
266
+ import_date_picker.LocalizationProvider,
267
+ {
268
+ dateAdapter: import_AdapterDayjs.AdapterDayjs,
269
+ adapterLocale: ((_d = localeDateMap == null ? void 0 : localeDateMap[locale]) == null ? void 0 : _d.adapterLocale) || "en"
270
+ },
271
+ /* @__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(
272
+ "div",
273
+ {
274
+ style: { ...style, "--theme-color": themeColor || "#7F56D9" }
275
+ },
276
+ children
277
+ ))))
278
+ )
239
279
  )
240
280
  );
241
281
  };
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ export interface PisellContextType {
3
+ platform: 'h5' | 'pc' | 'ipad';
4
+ /** 货币符号 */
5
+ symbol?: string;
6
+ /** 当前语言环境 */
7
+ locale?: string;
8
+ }
9
+ export declare const PisellContext: import("react").Context<PisellContextType>;
10
+ /**
11
+ * provider外获取当前全局配置
12
+ */
13
+ declare class GlobalConfig {
14
+ private config;
15
+ constructor();
16
+ setConfig(config: PisellContextType): void;
17
+ getConfig(): PisellContextType;
18
+ }
19
+ export declare const globalConfig: GlobalConfig;
20
+ export default PisellContext;
@@ -0,0 +1,49 @@
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/pisell-config-provider/context.ts
20
+ var context_exports = {};
21
+ __export(context_exports, {
22
+ PisellContext: () => PisellContext,
23
+ default: () => context_default,
24
+ globalConfig: () => globalConfig
25
+ });
26
+ module.exports = __toCommonJS(context_exports);
27
+ var import_react = require("react");
28
+ var initialContext = {
29
+ platform: "pc"
30
+ };
31
+ var PisellContext = (0, import_react.createContext)(initialContext);
32
+ var GlobalConfig = class {
33
+ constructor() {
34
+ this.config = {};
35
+ }
36
+ setConfig(config) {
37
+ this.config = config;
38
+ }
39
+ getConfig() {
40
+ return this.config;
41
+ }
42
+ };
43
+ var globalConfig = new GlobalConfig();
44
+ var context_default = PisellContext;
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ PisellContext,
48
+ globalConfig
49
+ });
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 获取当前pisell全局配置
3
+ */
4
+ declare const usePisellConfig: () => import("../context").PisellContextType;
5
+ export default usePisellConfig;
@@ -0,0 +1,31 @@
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/pisell-config-provider/hooks/usePisellConfig.ts
20
+ var usePisellConfig_exports = {};
21
+ __export(usePisellConfig_exports, {
22
+ default: () => usePisellConfig_default
23
+ });
24
+ module.exports = __toCommonJS(usePisellConfig_exports);
25
+ var import_react = require("react");
26
+ var import_context = require("../context");
27
+ var usePisellConfig = () => {
28
+ const config = (0, import_react.useContext)(import_context.PisellContext);
29
+ return config;
30
+ };
31
+ var usePisellConfig_default = usePisellConfig;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { PisellContextType } from './context';
3
+ interface PisellConfigProviderType {
4
+ platform?: PisellContextType['platform'];
5
+ children: React.ReactNode;
6
+ /** 货币符号 */
7
+ symbol?: string;
8
+ /** 当前语言环境 */
9
+ locale?: string;
10
+ }
11
+ declare const PisellConfigProvider: React.FC<PisellConfigProviderType>;
12
+ export default PisellConfigProvider;
@@ -0,0 +1,69 @@
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/pisell-config-provider/index.tsx
30
+ var pisell_config_provider_exports = {};
31
+ __export(pisell_config_provider_exports, {
32
+ default: () => pisell_config_provider_default
33
+ });
34
+ module.exports = __toCommonJS(pisell_config_provider_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_antd = require("antd");
37
+ var import_context = __toESM(require("./context"));
38
+ var import_hooks = require("../../hooks");
39
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
40
+ var import_pisellMessage = require("../pisellMessage");
41
+ var platformMap = {
42
+ phone: "h5",
43
+ pc: "pc",
44
+ ipad: "ipad"
45
+ };
46
+ var PisellConfigProvider = (props) => {
47
+ var _a;
48
+ const {
49
+ children,
50
+ platform: propsPlatform,
51
+ symbol: propsSymbol,
52
+ locale
53
+ } = props;
54
+ const platform = (0, import_hooks.useResponsive)();
55
+ const context = (0, import_useEngineContext.default)();
56
+ const { getSymbolic } = ((_a = context.appHelper) == null ? void 0 : _a.utils) || {};
57
+ const config = {
58
+ // 设置平台,如果父组件未传入,则使用响应式获取
59
+ platform: propsPlatform || platformMap[platform],
60
+ // 设置符号,优先使用父组件传入的,如果没有则从主项目获取
61
+ symbol: propsSymbol || (getSymbolic == null ? void 0 : getSymbolic()) || "",
62
+ locale: locale || "en"
63
+ };
64
+ const staticFunction = import_antd.App.useApp();
65
+ (0, import_pisellMessage.setMessage)(staticFunction.message);
66
+ import_context.globalConfig.setConfig(config);
67
+ return /* @__PURE__ */ import_react.default.createElement(import_context.default.Provider, { value: config }, children);
68
+ };
69
+ var pisell_config_provider_default = PisellConfigProvider;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { AlertProps } from 'antd';
3
+ import './index.less';
4
+ export interface PisellAlertProps extends AlertProps {
5
+ /** 是否展示忽略按钮 */
6
+ showDismiss?: boolean;
7
+ /** 忽略按钮内容 */
8
+ dismiss?: React.ReactNode;
9
+ /** 是否展示行为按钮 */
10
+ showView?: boolean;
11
+ /** 行为按钮内容 */
12
+ view?: React.ReactNode;
13
+ /** 行为按钮点击事件 */
14
+ onViewClick?: (e: any) => void;
15
+ }
16
+ /**
17
+ * PisellAlert警告提示组件
18
+ * @param props
19
+ * @constructor
20
+ */
21
+ declare const PisellAlert: (props: PisellAlertProps) => false | React.JSX.Element;
22
+ export default PisellAlert;