@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
@@ -1,8 +1,9 @@
1
- import React from "react";
2
- import { ButtonProps as OriginalButtonProps } from "antd";
1
+ import React from 'react';
2
+ import { ButtonProps as OriginalButtonProps } from 'antd';
3
3
  export interface ButtonProps extends OriginalButtonProps {
4
- __designMode?: "design" | undefined;
4
+ __designMode?: 'design' | undefined;
5
5
  href?: string;
6
+ rightIcon?: React.ReactNode;
6
7
  }
7
8
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<any>>;
8
9
  export default Button;
@@ -1,6 +1,6 @@
1
1
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
- import React, { forwardRef } from "react";
3
- import { Button as OriginalButton } from "antd";
2
+ import React, { forwardRef, useMemo } from 'react';
3
+ import { Button as OriginalButton } from 'antd';
4
4
  var Button = /*#__PURE__*/forwardRef(function (props, ref) {
5
5
  var _props$href;
6
6
  var innerProps = {};
@@ -8,8 +8,19 @@ var Button = /*#__PURE__*/forwardRef(function (props, ref) {
8
8
  // 解决低代码编辑器中按钮设置 href 属性造成按钮点击重定向问题
9
9
  innerProps.href = undefined;
10
10
  }
11
+ var _children = useMemo(function () {
12
+ if (props.rightIcon) {
13
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
14
+ style: {
15
+ marginRight: 8
16
+ }
17
+ }, " ", props.children), props.rightIcon);
18
+ }
19
+ return props.children;
20
+ }, [props.children, props.rightIcon]);
11
21
  return /*#__PURE__*/React.createElement(OriginalButton, _extends({}, props, innerProps, {
12
- ref: ref
22
+ ref: ref,
23
+ children: _children
13
24
  }));
14
25
  });
15
26
  export default Button;
@@ -1,5 +1,6 @@
1
+ import { IconComponentProps } from '@ant-design/icons/es/components/Icon';
1
2
  import React from 'react';
2
- interface IconFontProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
3
+ interface IconFontProps extends IconComponentProps {
3
4
  type: string;
4
5
  }
5
6
  declare const IconFont: React.FC<IconFontProps>;
@@ -2,7 +2,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
2
2
  import { createFromIconfontCN } from '@ant-design/icons';
3
3
  import React from 'react';
4
4
  var MyIcon = createFromIconfontCN({
5
- scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_116anw8uttw.js' // 在 iconfont.cn 上生成
5
+ scriptUrl: 'https://at.alicdn.com/t/c/font_4075221_cy8sszjz7t7.js' // 在 iconfont.cn 上生成
6
6
  });
7
7
 
8
8
  var IconFont = function IconFont(props) {
File without changes
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { ConfigProviderProps } from "../config-provider";
1
+ import React from 'react';
2
+ import { ConfigProviderProps } from '../config-provider';
3
3
  interface PageProps extends ConfigProviderProps {
4
4
  }
5
5
  declare const Page: (props: PageProps) => React.JSX.Element;
@@ -1,218 +1,258 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
1
2
  var _excluded = ["children", "style", "locale"];
2
- var _theme$token;
3
3
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
5
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
8
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
9
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
5
10
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
6
- import React from "react";
11
+ import React, { useMemo } from 'react';
7
12
  import ConfigProvider from "../config-provider";
8
- import { AdapterDayjs } from "@pisell/date-picker/es/AdapterDayjs";
9
- import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from "@pisell/date-picker";
10
- import enUS from "antd/locale/en_US";
11
- import zhCN from "antd/locale/zh_CN";
12
- import zhTW from "antd/locale/zh_TW";
13
- import zhHK from "antd/locale/zh_HK";
13
+ import { AdapterDayjs } from '@pisell/date-picker/es/AdapterDayjs';
14
+ import { LocalizationProvider, createTheme, ThemeProvider, LocaleProvider } from '@pisell/date-picker';
15
+ import { App } from 'antd';
16
+ import enUS from 'antd/locale/en_US';
17
+ import zhCN from 'antd/locale/zh_CN';
18
+ import zhTW from 'antd/locale/zh_TW';
19
+ import zhHK from 'antd/locale/zh_HK';
20
+ import PisellConfigProvider from "../pisell-config-provider";
21
+ import useEngineContext from "../../hooks/useEngineContext";
14
22
  var localMap = {
15
- "zh-TW": zhTW,
16
- "zh-CN": zhCN,
17
- "zh-HK": zhHK,
18
- "en-US": enUS,
23
+ 'zh-TW': zhTW,
24
+ 'zh-CN': zhCN,
25
+ 'zh-HK': zhHK,
26
+ 'en-US': enUS,
19
27
  en: enUS
20
28
  };
21
- var theme = {
22
- components: {
23
- Table: {
24
- colorFillContent: "#EAECF0",
25
- colorFillSecondary: "#F2F4F7",
26
- colorBorderSecondary: "#EAECF0",
27
- colorFillAlter: "#F9FAFB",
28
- controlItemBgHover: "#F9FAFB",
29
- colorTextHeading: "#475467",
30
- colorTextDescription: "#667085",
31
- colorText: "#101828",
32
- controlHeight: 32,
33
- padding: 24,
34
- margin: 16
35
- },
36
- Button: {
37
- borderRadiusSM: 6,
38
- borderRadiusLG: 9,
39
- borderRadius: 8,
40
- controlHeight: 36,
41
- colorBgContainerDisabled: "#F2F4F7",
42
- colorBgTextHover: "#F9FAFB",
43
- colorBorder: "#D0D5DD",
44
- colorError: "#D92D20",
45
- colorErrorActive: "#D92D20",
46
- colorErrorHover: "#B42318",
47
- colorErrorBg: "#FEF3F2",
48
- colorErrorBorderHover: "#FDA29B",
49
- colorErrorOutline: "rgba(217, 45, 32, 0.06)",
50
- colorLink: "#175CD3",
51
- colorLinkActive: "#194185",
52
- colorLinkHover: "#1849A9",
53
- colorPrimaryActive: "#7f56d9",
54
- colorPrimaryBorder: "#E9D7FE",
55
- colorText: "#344054",
56
- colorTextDisabled: "#D0D5DD",
57
- colorTextLightSolid: "#fff",
58
- colorBgTextActive: "#D0D5DD",
59
- controlOutline: "rgba(127, 86, 217, 0.04)",
60
- controlTmpOutline: "#F9FAFB",
61
- paddingContentHorizontal: 14,
62
- marginXS: 8
63
- },
64
- Divider: {
65
- colorSplit: "#EAECF0"
66
- },
67
- Breadcrumb: {
68
- itemColor: "#475467",
69
- colorTextDescription: "#475467",
70
- lastItemColor: "#6941C6",
71
- separatorMargin: 12,
72
- separatorColor: "#D0D5DD",
73
- linkHoverColor: "#1D2939",
74
- linkColor: "#475467",
75
- colorBgTextHover: "#F9FAFB",
76
- paddingXXS: 8
77
- },
78
- Dropdown: {
79
- borderRadiusLG: 8,
80
- // "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
81
- controlHeight: 42,
82
- fontSize: 14
83
- },
84
- DatePicker: {
85
- borderRadius: 8,
86
- colorTextPlaceholder: "#667085",
87
- colorIcon: "#667085",
88
- colorTextQuaternary: "#D0D5DD",
89
- colorBgContainerDisabled: "#F9FAFB",
90
- colorTextDisabled: "#98A2B3"
91
- },
92
- Input: {
93
- fontSizeIcon: 16
94
- // "lineHeight": 1
95
- },
96
-
97
- Select: {
98
- fontSizeIcon: 16
99
- // "lineHeight": 1
100
- }
101
- },
102
-
103
- token: {
104
- colorPrimary: "#7F56D9",
105
- colorPrimaryBg: "#F9F5FF",
106
- colorPrimaryBgHover: "#F4EBFF",
107
- colorPrimaryBorder: "#E9D7FE",
108
- colorPrimaryBorderHover: "#D6BBFB",
109
- colorPrimaryHover: "#6941C6",
110
- colorPrimaryActive: "#53389E",
111
- colorPrimaryTextHover: "#53389E",
112
- colorPrimaryText: "#6941C6",
113
- colorPrimaryTextActive: "#42307D",
114
- colorSuccess: "#079455",
115
- colorSuccessBg: "#ECFDF3",
116
- colorSuccessBgHover: "#DCFAE6",
117
- colorSuccessBorder: "#ABEFC6",
118
- colorSuccessBorderHover: "#75E0A7",
119
- colorSuccessHover: "#067647",
120
- colorSuccessText: "#067647",
121
- colorSuccessActive: "#085D3A",
122
- colorSuccessTextHover: "#085D3A",
123
- colorSuccessTextActive: "#074D31",
124
- colorWarning: "#dc6803",
125
- colorWarningBg: "#FFFAEB",
126
- colorWarningBgHover: "#FEF0C7",
127
- colorWarningBorder: "#FEDF89",
128
- colorWarningBorderHover: "#FEC84B",
129
- colorWarningHover: "#B54708",
130
- colorWarningText: "#B54708",
131
- colorWarningActive: "#93370D",
132
- colorWarningTextHover: "#93370D",
133
- colorWarningTextActive: "#7A2E0E",
134
- colorError: "#d92d20",
135
- colorErrorBg: "#FEF3F2",
136
- colorErrorBgHover: "#FEE4E2",
137
- colorErrorBorder: "#FECDCA",
138
- colorErrorBorderHover: "#FDA29B",
139
- colorErrorHover: "#B42318",
140
- colorErrorText: "#B42318",
141
- colorErrorActive: "#912018",
142
- colorErrorTextHover: "#912018",
143
- colorErrorTextActive: "#7A271A",
144
- colorInfo: "#1570ef",
145
- colorInfoBg: "#EFF8FF",
146
- colorInfoBgHover: "#D1E9FF",
147
- colorInfoBorder: "#B2DDFF",
148
- colorInfoBorderHover: "#84CAFF",
149
- colorInfoHover: "#175CD3",
150
- colorInfoText: "#175CD3",
151
- colorInfoActive: "#1849A9",
152
- colorInfoTextHover: "#1849A9",
153
- colorInfoTextActive: "#194185",
154
- colorText: "#101828",
155
- colorTextSecondary: "#475467",
156
- colorTextTertiary: "#667085",
157
- colorTextQuaternary: "#D0D5DD",
158
- colorBorder: "#D0D5DD",
159
- colorBorderSecondary: "#EAECF0",
160
- colorFill: "#D0D5DD",
161
- colorFillSecondary: "#EAECF0",
162
- colorFillTertiary: "#F2F4F7",
163
- colorFillQuaternary: "#F9FAFB",
164
- colorBgLayout: "#F2F4F7",
165
- colorBgSpotlight: "#101828",
166
- colorBgMask: "rgba(0, 0, 0, 0.5)",
167
- wireframe: false,
168
- borderRadius: 8
169
- }
170
- };
171
- var datePickerTheme = createTheme({
172
- palette: {
173
- primary: {
174
- main: ((_theme$token = theme.token) === null || _theme$token === void 0 ? void 0 : _theme$token.colorPrimary) || "#7F56D9"
175
- }
176
- }
177
- });
178
29
  var localeDateMap = {
179
- "en-US": {
180
- adapterLocale: "en"
30
+ 'en-US': {
31
+ adapterLocale: 'en'
181
32
  },
182
33
  en: {
183
- adapterLocale: "en"
34
+ adapterLocale: 'en'
184
35
  },
185
- "zh-TW": {
186
- adapterLocale: "zh-tw"
36
+ 'zh-TW': {
37
+ adapterLocale: 'zh-tw'
187
38
  },
188
- "zh-HK": {
189
- adapterLocale: "zh-tw"
39
+ 'zh-HK': {
40
+ adapterLocale: 'zh-tw'
190
41
  },
191
- "zh-CN": {
192
- adapterLocale: "zh-cn"
42
+ 'zh-CN': {
43
+ adapterLocale: 'zh-cn'
193
44
  }
194
45
  };
195
46
  var Page = function Page(props) {
196
- var _localeDateMap;
47
+ var _context$appHelper, _context$engine, _context$engine$props, _localeDateMap;
197
48
  var children = props.children,
198
49
  style = props.style,
199
- locale = props.locale,
50
+ propsLocale = props.locale,
200
51
  others = _objectWithoutProperties(props, _excluded);
52
+ var context = useEngineContext();
53
+ var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.constants) || {},
54
+ platform = _ref.platform,
55
+ themeColor = _ref.themeColor;
56
+ var locale = propsLocale || (context === null || context === void 0 ? void 0 : (_context$engine = context.engine) === null || _context$engine === void 0 ? void 0 : (_context$engine$props = _context$engine.props) === null || _context$engine$props === void 0 ? void 0 : _context$engine$props.locale) || 'en';
57
+ var theme = useMemo(function () {
58
+ if (props !== null && props !== void 0 && props.theme) {
59
+ var _props$theme, _props$theme$token;
60
+ return _objectSpread(_objectSpread({}, props.theme), {}, {
61
+ token: _objectSpread(_objectSpread({}, props.theme.token), {}, {
62
+ // 外部透传主题时,如果没有传入colorPrimary 默认使用主项目内主题色
63
+ colorPrimary: (props === null || props === void 0 ? void 0 : (_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$token = _props$theme.token) === null || _props$theme$token === void 0 ? void 0 : _props$theme$token.colorPrimary) || themeColor || '#7F56D9'
64
+ })
65
+ });
66
+ }
67
+ return {
68
+ components: {
69
+ Table: {
70
+ colorFillContent: '#EAECF0',
71
+ colorFillSecondary: '#F2F4F7',
72
+ colorBorderSecondary: '#EAECF0',
73
+ colorFillAlter: '#F9FAFB',
74
+ controlItemBgHover: '#F9FAFB',
75
+ colorTextHeading: '#475467',
76
+ colorTextDescription: '#667085',
77
+ colorText: '#101828',
78
+ controlHeight: 32,
79
+ padding: 24,
80
+ margin: 16
81
+ },
82
+ Message: {
83
+ contentBg: '#101828'
84
+ },
85
+ Button: {
86
+ borderRadiusSM: 6,
87
+ borderRadiusLG: 9,
88
+ borderRadius: 8,
89
+ controlHeight: 36,
90
+ colorBgContainerDisabled: '#F2F4F7',
91
+ colorBgTextHover: '#F9FAFB',
92
+ colorBorder: '#D0D5DD',
93
+ colorError: '#D92D20',
94
+ colorErrorActive: '#D92D20',
95
+ colorErrorHover: '#B42318',
96
+ colorErrorBg: '#FEF3F2',
97
+ colorErrorBorderHover: '#FDA29B',
98
+ colorErrorOutline: 'rgba(217, 45, 32, 0.06)',
99
+ colorLink: '#175CD3',
100
+ colorLinkActive: '#194185',
101
+ colorLinkHover: '#1849A9',
102
+ // colorPrimaryActive: '#7f56d9',
103
+ // colorPrimaryBorder: '#E9D7FE',
104
+ colorText: '#344054',
105
+ colorTextDisabled: '#D0D5DD',
106
+ colorTextLightSolid: '#fff',
107
+ colorBgTextActive: '#D0D5DD',
108
+ controlOutline: 'rgba(127, 86, 217, 0.04)',
109
+ controlTmpOutline: '#F9FAFB',
110
+ paddingContentHorizontal: 14,
111
+ marginXS: 8
112
+ },
113
+ Divider: {
114
+ colorSplit: '#EAECF0'
115
+ },
116
+ Breadcrumb: {
117
+ itemColor: '#475467',
118
+ colorTextDescription: '#475467',
119
+ // lastItemColor: '#6941C6',
120
+ separatorMargin: 12,
121
+ separatorColor: '#D0D5DD',
122
+ linkHoverColor: '#1D2939',
123
+ linkColor: '#475467',
124
+ colorBgTextHover: '#F9FAFB',
125
+ paddingXXS: 8
126
+ },
127
+ Dropdown: {
128
+ borderRadiusLG: 8,
129
+ // "boxShadowPopoverArrow": "2px 2px 5px rgba(0, 0, 0, 0.05)",
130
+ controlHeight: 42,
131
+ fontSize: 14
132
+ },
133
+ DatePicker: {
134
+ borderRadius: 8,
135
+ colorTextPlaceholder: '#667085',
136
+ colorIcon: '#667085',
137
+ colorTextQuaternary: '#D0D5DD',
138
+ colorBgContainerDisabled: '#F9FAFB',
139
+ colorTextDisabled: '#98A2B3'
140
+ },
141
+ Input: {
142
+ fontSizeIcon: 16,
143
+ addonBg: '#fff'
144
+ // "lineHeight": 1
145
+ },
146
+
147
+ Select: {
148
+ fontSizeIcon: 16
149
+ // "lineHeight": 1
150
+ }
151
+ },
152
+
153
+ token: {
154
+ colorPrimary: themeColor || '#7F56D9',
155
+ // colorPrimaryBg: '#F9F5FF',
156
+ // colorPrimaryBgHover: '#F4EBFF',
157
+ // colorPrimaryBorder: '#E9D7FE',
158
+ // colorPrimaryBorderHover: '#D6BBFB',
159
+ // colorPrimaryHover: '#6941C6',
160
+ // colorPrimaryActive: '#53389E',
161
+ // colorPrimaryTextHover: '#53389E',
162
+ // colorPrimaryText: '#6941C6',
163
+ // colorPrimaryTextActive: '#42307D',
164
+ colorSuccess: '#079455',
165
+ colorSuccessBg: '#ECFDF3',
166
+ colorSuccessBgHover: '#DCFAE6',
167
+ colorSuccessBorder: '#ABEFC6',
168
+ colorSuccessBorderHover: '#75E0A7',
169
+ colorSuccessHover: '#067647',
170
+ colorSuccessText: '#067647',
171
+ colorSuccessActive: '#085D3A',
172
+ colorSuccessTextHover: '#085D3A',
173
+ colorSuccessTextActive: '#074D31',
174
+ colorWarning: '#dc6803',
175
+ colorWarningBg: '#FFFAEB',
176
+ colorWarningBgHover: '#FEF0C7',
177
+ colorWarningBorder: '#FEDF89',
178
+ colorWarningBorderHover: '#FEC84B',
179
+ colorWarningHover: '#B54708',
180
+ colorWarningText: '#B54708',
181
+ colorWarningActive: '#93370D',
182
+ colorWarningTextHover: '#93370D',
183
+ colorWarningTextActive: '#7A2E0E',
184
+ colorError: '#d92d20',
185
+ colorErrorBg: '#FEF3F2',
186
+ colorErrorBgHover: '#FEE4E2',
187
+ colorErrorBorder: '#FECDCA',
188
+ colorErrorBorderHover: '#FDA29B',
189
+ colorErrorHover: '#B42318',
190
+ colorErrorText: '#B42318',
191
+ colorErrorActive: '#912018',
192
+ colorErrorTextHover: '#912018',
193
+ colorErrorTextActive: '#7A271A',
194
+ colorInfo: '#1570ef',
195
+ colorInfoBg: '#EFF8FF',
196
+ colorInfoBgHover: '#D1E9FF',
197
+ colorInfoBorder: '#B2DDFF',
198
+ colorInfoBorderHover: '#84CAFF',
199
+ colorInfoHover: '#175CD3',
200
+ colorInfoText: '#175CD3',
201
+ colorInfoActive: '#1849A9',
202
+ colorInfoTextHover: '#1849A9',
203
+ colorInfoTextActive: '#194185',
204
+ colorText: '#101828',
205
+ colorTextSecondary: '#475467',
206
+ colorTextTertiary: '#667085',
207
+ colorTextQuaternary: '#D0D5DD',
208
+ colorBorder: '#D0D5DD',
209
+ colorBorderSecondary: '#EAECF0',
210
+ colorFill: '#D0D5DD',
211
+ colorFillSecondary: '#EAECF0',
212
+ colorFillTertiary: '#F2F4F7',
213
+ colorFillQuaternary: '#F9FAFB',
214
+ colorBgLayout: '#F2F4F7',
215
+ colorBgSpotlight: '#101828',
216
+ colorBgMask: 'rgba(0, 0, 0, 0.5)',
217
+ wireframe: false,
218
+ borderRadius: 8
219
+ }
220
+ };
221
+ }, [platform, themeColor, props === null || props === void 0 ? void 0 : props.theme]);
222
+ var datePickerTheme = useMemo(function () {
223
+ var _theme$token;
224
+ return createTheme({
225
+ palette: {
226
+ primary: {
227
+ main: ((_theme$token = theme.token) === null || _theme$token === void 0 ? void 0 : _theme$token.colorPrimary) || '#7F56D9'
228
+ }
229
+ }
230
+ });
231
+ }, [platform, themeColor]);
201
232
  return /*#__PURE__*/React.createElement(ConfigProvider, _extends({}, others, {
202
233
  locale: localMap[locale],
203
- prefixCls: props.prefixCls || "pisell-lowcode",
204
- theme: props.theme || theme
205
- }), /*#__PURE__*/React.createElement(LocalizationProvider, {
234
+ prefixCls: props.prefixCls || 'pisell-lowcode',
235
+ theme: theme
236
+ }), /*#__PURE__*/React.createElement(App, {
237
+ component: false,
238
+ message: {
239
+ maxCount: 1
240
+ }
241
+ }, /*#__PURE__*/React.createElement(LocalizationProvider, {
206
242
  dateAdapter: AdapterDayjs,
207
- adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || "en"
243
+ adapterLocale: (localeDateMap === null || localeDateMap === void 0 ? void 0 : (_localeDateMap = localeDateMap[locale]) === null || _localeDateMap === void 0 ? void 0 : _localeDateMap.adapterLocale) || 'en'
208
244
  }, /*#__PURE__*/React.createElement(ThemeProvider, {
209
245
  theme: datePickerTheme
210
246
  }, /*#__PURE__*/React.createElement(LocaleProvider, {
211
247
  value: {
212
248
  locale: locale
213
249
  }
250
+ }, /*#__PURE__*/React.createElement(PisellConfigProvider, {
251
+ locale: locale
214
252
  }, /*#__PURE__*/React.createElement("div", {
215
- style: style
216
- }, children)))));
253
+ style: _objectSpread(_objectSpread({}, style), {}, {
254
+ '--theme-color': themeColor || '#7F56D9'
255
+ })
256
+ }, children)))))));
217
257
  };
218
258
  export default Page;
@@ -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,36 @@
1
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
2
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
3
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
4
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
5
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
7
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
8
+ import { createContext } from 'react';
9
+ var initialContext = {
10
+ platform: 'pc'
11
+ };
12
+ export var PisellContext = /*#__PURE__*/createContext(initialContext);
13
+
14
+ /**
15
+ * provider外获取当前全局配置
16
+ */
17
+ var GlobalConfig = /*#__PURE__*/function () {
18
+ function GlobalConfig() {
19
+ _classCallCheck(this, GlobalConfig);
20
+ _defineProperty(this, "config", {});
21
+ }
22
+ _createClass(GlobalConfig, [{
23
+ key: "setConfig",
24
+ value: function setConfig(config) {
25
+ this.config = config;
26
+ }
27
+ }, {
28
+ key: "getConfig",
29
+ value: function getConfig() {
30
+ return this.config;
31
+ }
32
+ }]);
33
+ return GlobalConfig;
34
+ }();
35
+ export var globalConfig = new GlobalConfig();
36
+ export default PisellContext;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * 获取当前pisell全局配置
3
+ */
4
+ declare const usePisellConfig: () => import("../context").PisellContextType;
5
+ export default usePisellConfig;
@@ -0,0 +1,11 @@
1
+ import { useContext } from 'react';
2
+ import { PisellContext } from "../context";
3
+
4
+ /**
5
+ * 获取当前pisell全局配置
6
+ */
7
+ var usePisellConfig = function usePisellConfig() {
8
+ var config = useContext(PisellContext);
9
+ return config;
10
+ };
11
+ export 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,36 @@
1
+ import React from 'react';
2
+ import { App } from 'antd';
3
+ import PisellContext, { globalConfig } from "./context";
4
+ import { useResponsive } from "../../hooks";
5
+ import useEngineContext from "../../hooks/useEngineContext";
6
+ import { setMessage } from "../pisellMessage";
7
+ var platformMap = {
8
+ phone: 'h5',
9
+ pc: 'pc',
10
+ ipad: 'ipad'
11
+ };
12
+ var PisellConfigProvider = function PisellConfigProvider(props) {
13
+ var _context$appHelper;
14
+ var children = props.children,
15
+ propsPlatform = props.platform,
16
+ propsSymbol = props.symbol,
17
+ locale = props.locale;
18
+ var platform = useResponsive();
19
+ var context = useEngineContext();
20
+ var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
21
+ getSymbolic = _ref.getSymbolic;
22
+ var config = {
23
+ // 设置平台,如果父组件未传入,则使用响应式获取
24
+ platform: propsPlatform || platformMap[platform],
25
+ // 设置符号,优先使用父组件传入的,如果没有则从主项目获取
26
+ symbol: propsSymbol || (getSymbolic === null || getSymbolic === void 0 ? void 0 : getSymbolic()) || '',
27
+ locale: locale || 'en'
28
+ };
29
+ var staticFunction = App.useApp();
30
+ setMessage(staticFunction.message);
31
+ globalConfig.setConfig(config);
32
+ return /*#__PURE__*/React.createElement(PisellContext.Provider, {
33
+ value: config
34
+ }, children);
35
+ };
36
+ export default PisellConfigProvider;