@pisell/materials 6.1.1 → 6.1.2

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 (303) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +7 -7
  6. package/build/lowcode/preview.js +146 -146
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +36 -27
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +41 -32
  11. package/es/components/TimeResourceSelector/index.d.ts +21 -0
  12. package/es/components/appVersionControl/index.d.ts +4 -0
  13. package/es/components/badge/index.d.ts +7 -0
  14. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  15. package/es/components/buttonGroupPreview/index.d.ts +19 -0
  16. package/es/components/cardPro/index.d.ts +3 -0
  17. package/es/components/collapse/index.d.ts +15 -0
  18. package/es/components/cropPhoto/index.d.ts +3 -0
  19. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  21. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  22. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  23. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  24. package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  25. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  26. package/es/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  27. package/es/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  28. package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  29. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  30. package/es/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  31. package/es/components/drag-sort-tree/TreeItem/index.js +2 -1
  32. package/es/components/drag-sort-tree/index.d.ts +4 -0
  33. package/es/components/iconfont/index.d.ts +8 -0
  34. package/es/components/iconfont/index.js +1 -1
  35. package/es/components/login-and-register/index.d.ts +82 -0
  36. package/es/components/login-and-register/index.js +22 -18
  37. package/es/components/page/index.d.ts +5 -0
  38. package/es/components/pisell-config-provider/index.d.ts +12 -0
  39. package/es/components/pisellAdjustPrice/index.d.ts +1 -6
  40. package/es/components/pisellAdjustPrice/index.js +64 -8
  41. package/es/components/pisellAdjustPrice/index.less +35 -6
  42. package/es/components/pisellAdjustPrice/status.d.ts +32 -0
  43. package/es/components/pisellAdjustPrice/status.js +32 -0
  44. package/es/components/pisellAdjustPrice/type.d.ts +20 -0
  45. package/es/components/pisellAdjustPrice/type.js +1 -0
  46. package/es/components/pisellAnchor/index.d.ts +23 -0
  47. package/es/components/pisellAvatar/index.d.ts +19 -0
  48. package/es/components/pisellCard/index.d.ts +19 -0
  49. package/es/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  50. package/es/components/pisellDropdown/index.d.ts +20 -0
  51. package/es/components/pisellEmpty/index.d.ts +19 -0
  52. package/es/components/pisellHeaderProgressBar/index.d.ts +29 -0
  53. package/es/components/pisellImageCarousels/index.d.ts +18 -0
  54. package/es/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  55. package/es/components/pisellInformationEntry/index.d.ts +33 -0
  56. package/es/components/pisellList01/index.d.ts +17 -0
  57. package/es/components/pisellQrcode/index.d.ts +10 -0
  58. package/es/components/pisellSectionHeaders/index.d.ts +21 -0
  59. package/es/components/pisellStatisticList/index.d.ts +21 -0
  60. package/es/components/pisellToast/index.js +3 -0
  61. package/es/components/pisellWalletPassCard/index.d.ts +0 -1
  62. package/es/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  63. package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +61 -0
  64. package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
  65. package/es/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  66. package/es/components/productCard/cartSkuCard/components/discountReason/index.js +51 -0
  67. package/es/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  68. package/es/components/productCard/cartSkuCard/components/holders/index.js +32 -0
  69. package/es/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  70. package/es/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  71. package/es/components/productCard/cartSkuCard/components/packages/index.js +52 -0
  72. package/es/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  73. package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  74. package/es/components/productCard/cartSkuCard/components/packages/utils.js +40 -0
  75. package/es/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  76. package/es/components/productCard/cartSkuCard/components/resources/index.js +44 -0
  77. package/es/components/productCard/cartSkuCard/components/resources/index.less +20 -0
  78. package/es/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  79. package/es/components/productCard/cartSkuCard/components/sales/index.js +55 -0
  80. package/es/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  81. package/es/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  82. package/es/components/productCard/cartSkuCard/components/specs/index.js +43 -0
  83. package/es/components/productCard/cartSkuCard/components/specs/index.less +28 -0
  84. package/es/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  85. package/es/components/productCard/cartSkuCard/components/timeRange/index.js +53 -0
  86. package/es/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
  87. package/es/components/productCard/cartSkuCard/index.d.ts +8 -0
  88. package/es/components/productCard/cartSkuCard/index.js +195 -0
  89. package/es/components/productCard/cartSkuCard/index.less +69 -0
  90. package/es/components/productCard/cartSkuCard/locales.d.ts +96 -0
  91. package/es/components/productCard/cartSkuCard/locales.js +30 -0
  92. package/es/components/productCard/components/Action/index.d.ts +3 -0
  93. package/es/components/productCard/components/AmountFooter/index.js +22 -6
  94. package/es/components/productCard/components/AmountFooter/index.less +28 -1
  95. package/es/components/productCard/components/Divider/index.d.ts +3 -0
  96. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  97. package/es/components/productCard/components/Header/index.js +4 -3
  98. package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
  99. package/es/components/productCard/components/MultiDay/utils.d.ts +14 -0
  100. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  101. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -1
  102. package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  103. package/es/components/productCard/components/Packages/components/options/index.less +3 -2
  104. package/es/components/productCard/components/Sales/index.js +2 -2
  105. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  106. package/es/components/productCard/components/Time/index.d.ts +3 -0
  107. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  108. package/es/components/productCard/components/Warning/index.js +48 -0
  109. package/es/components/productCard/index.d.ts +3 -1
  110. package/es/components/productCard/index.js +10 -8
  111. package/es/components/productCard/locales.d.ts +84 -0
  112. package/es/components/productCard/locales.js +6 -3
  113. package/es/components/productCard/status.d.ts +32 -0
  114. package/es/components/productCard/status.js +3 -1
  115. package/es/components/productCard/types.d.ts +84 -0
  116. package/es/components/productCard/utils.js +8 -6
  117. package/es/components/section-footers/index.d.ts +9 -0
  118. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  119. package/es/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  120. package/es/components/table/Table/fields/index.d.ts +2 -2
  121. package/es/components/table/Table/index.d.ts +4 -0
  122. package/es/components/table/Table/utils.d.ts +1 -1
  123. package/es/components/table/hooks/useTableSetting.d.ts +22 -0
  124. package/es/components/table/types.d.ts +251 -0
  125. package/es/components/tabs/index.d.ts +16 -0
  126. package/es/components/translation/index.d.ts +4 -3
  127. package/es/components/translation/index.js +34 -32
  128. package/es/components/versionModal/index.d.ts +23 -0
  129. package/es/components/virtual-keyboard/Amount/index.d.ts +3 -20
  130. package/es/components/virtual-keyboard/Amount/index.js +79 -7
  131. package/es/components/virtual-keyboard/Amount/index.less +39 -0
  132. package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  133. package/es/components/virtual-keyboard/Amount/themeConfig.js +32 -0
  134. package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
  135. package/es/components/virtual-keyboard/Amount/types.js +1 -0
  136. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  137. package/es/components/virtual-keyboard/BaseNumberKeyboard/index.js +38 -10
  138. package/es/components/virtual-keyboard/Keyboard/index.js +2 -2
  139. package/es/components/virtual-keyboard/Number/index.d.ts +3 -11
  140. package/es/components/virtual-keyboard/Number/index.js +77 -7
  141. package/es/components/virtual-keyboard/Number/index.less +39 -0
  142. package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  143. package/es/components/virtual-keyboard/Number/themeConfig.js +32 -0
  144. package/es/components/virtual-keyboard/Number/types.d.ts +25 -0
  145. package/es/components/virtual-keyboard/Number/types.js +1 -0
  146. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  147. package/es/components/virtual-keyboard/VirtualKeyInput/index.js +10 -3
  148. package/es/components/virtual-keyboard/index.d.ts +11 -0
  149. package/es/components/virtual-keyboard/index.js +88 -3
  150. package/es/components/virtual-keyboard/index.less +33 -1
  151. package/es/components/walletCard/Guest/index.d.ts +3 -0
  152. package/es/components/walletCard/Guide/index.d.ts +3 -0
  153. package/es/components/walletCard/index.d.ts +67 -0
  154. package/lib/components/TimeResourceSelector/index.d.ts +21 -0
  155. package/lib/components/appVersionControl/index.d.ts +4 -0
  156. package/lib/components/badge/index.d.ts +7 -0
  157. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  158. package/lib/components/buttonGroupPreview/index.d.ts +19 -0
  159. package/lib/components/cardPro/index.d.ts +3 -0
  160. package/lib/components/collapse/index.d.ts +15 -0
  161. package/lib/components/cropPhoto/index.d.ts +3 -0
  162. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  163. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  164. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  165. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  166. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  167. package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +24 -0
  168. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  169. package/lib/components/dataSourceComponents/fields/Upload/serve.d.ts +20 -0
  170. package/lib/components/dataSourceComponents/fields/Upload/type.d.ts +37 -0
  171. package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
  172. package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
  173. package/lib/components/dataSourceComponents/hooks/usePlatform.d.ts +3 -0
  174. package/lib/components/drag-sort-tree/TreeItem/index.js +2 -1
  175. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  176. package/lib/components/iconfont/index.d.ts +8 -0
  177. package/lib/components/iconfont/index.js +1 -1
  178. package/lib/components/login-and-register/index.d.ts +82 -0
  179. package/lib/components/login-and-register/index.js +2 -2
  180. package/lib/components/page/index.d.ts +5 -0
  181. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  182. package/lib/components/pisellAdjustPrice/index.d.ts +1 -6
  183. package/lib/components/pisellAdjustPrice/index.js +119 -57
  184. package/lib/components/pisellAdjustPrice/index.less +35 -6
  185. package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
  186. package/lib/components/pisellAdjustPrice/status.js +60 -0
  187. package/lib/components/pisellAdjustPrice/type.d.ts +20 -0
  188. package/lib/components/pisellAdjustPrice/type.js +17 -0
  189. package/lib/components/pisellAnchor/index.d.ts +23 -0
  190. package/lib/components/pisellAvatar/index.d.ts +19 -0
  191. package/lib/components/pisellCard/index.d.ts +19 -0
  192. package/lib/components/pisellCustomCheckboxGroup/index.d.ts +16 -0
  193. package/lib/components/pisellDropdown/index.d.ts +20 -0
  194. package/lib/components/pisellEmpty/index.d.ts +19 -0
  195. package/lib/components/pisellHeaderProgressBar/index.d.ts +29 -0
  196. package/lib/components/pisellImageCarousels/index.d.ts +18 -0
  197. package/lib/components/pisellInformationEntry/hooks/useNativeScanner.d.ts +4 -0
  198. package/lib/components/pisellInformationEntry/index.d.ts +33 -0
  199. package/lib/components/pisellList01/index.d.ts +17 -0
  200. package/lib/components/pisellQrcode/index.d.ts +10 -0
  201. package/lib/components/pisellSectionHeaders/index.d.ts +21 -0
  202. package/lib/components/pisellStatisticList/index.d.ts +21 -0
  203. package/lib/components/pisellToast/index.js +3 -0
  204. package/lib/components/pisellWalletPassCard/index.d.ts +0 -1
  205. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.d.ts +21 -0
  206. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +71 -0
  207. package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +98 -0
  208. package/lib/components/productCard/cartSkuCard/components/discountReason/index.d.ts +2 -0
  209. package/lib/components/productCard/cartSkuCard/components/discountReason/index.js +70 -0
  210. package/lib/components/productCard/cartSkuCard/components/holders/index.d.ts +3 -0
  211. package/lib/components/productCard/cartSkuCard/components/holders/index.js +52 -0
  212. package/lib/components/productCard/cartSkuCard/components/holders/index.less +32 -0
  213. package/lib/components/productCard/cartSkuCard/components/packages/index.d.ts +10 -0
  214. package/lib/components/productCard/cartSkuCard/components/packages/index.js +73 -0
  215. package/lib/components/productCard/cartSkuCard/components/packages/index.less +22 -0
  216. package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +20 -0
  217. package/lib/components/productCard/cartSkuCard/components/packages/utils.js +44 -0
  218. package/lib/components/productCard/cartSkuCard/components/resources/index.d.ts +3 -0
  219. package/lib/components/productCard/cartSkuCard/components/resources/index.js +73 -0
  220. package/lib/components/productCard/cartSkuCard/components/resources/index.less +20 -0
  221. package/lib/components/productCard/cartSkuCard/components/sales/index.d.ts +11 -0
  222. package/lib/components/productCard/cartSkuCard/components/sales/index.js +76 -0
  223. package/lib/components/productCard/cartSkuCard/components/sales/index.less +22 -0
  224. package/lib/components/productCard/cartSkuCard/components/specs/index.d.ts +3 -0
  225. package/lib/components/productCard/cartSkuCard/components/specs/index.js +65 -0
  226. package/lib/components/productCard/cartSkuCard/components/specs/index.less +28 -0
  227. package/lib/components/productCard/cartSkuCard/components/timeRange/index.d.ts +6 -0
  228. package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +67 -0
  229. package/lib/components/productCard/cartSkuCard/components/timeRange/index.less +37 -0
  230. package/lib/components/productCard/cartSkuCard/index.d.ts +8 -0
  231. package/lib/components/productCard/cartSkuCard/index.js +216 -0
  232. package/lib/components/productCard/cartSkuCard/index.less +69 -0
  233. package/lib/components/productCard/cartSkuCard/locales.d.ts +96 -0
  234. package/lib/components/productCard/cartSkuCard/locales.js +61 -0
  235. package/lib/components/productCard/components/Action/index.d.ts +3 -0
  236. package/lib/components/productCard/components/AmountFooter/index.js +16 -6
  237. package/lib/components/productCard/components/AmountFooter/index.less +28 -1
  238. package/lib/components/productCard/components/Divider/index.d.ts +3 -0
  239. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  240. package/lib/components/productCard/components/Header/index.js +4 -3
  241. package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
  242. package/lib/components/productCard/components/MultiDay/utils.d.ts +14 -0
  243. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  244. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +2 -2
  245. package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  246. package/lib/components/productCard/components/Packages/components/options/index.less +3 -2
  247. package/lib/components/productCard/components/Sales/index.js +2 -2
  248. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  249. package/lib/components/productCard/components/Time/index.d.ts +3 -0
  250. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  251. package/lib/components/productCard/components/Warning/index.js +68 -0
  252. package/lib/components/productCard/index.d.ts +3 -1
  253. package/lib/components/productCard/index.js +6 -11
  254. package/lib/components/productCard/locales.d.ts +84 -0
  255. package/lib/components/productCard/locales.js +6 -3
  256. package/lib/components/productCard/status.d.ts +32 -0
  257. package/lib/components/productCard/status.js +3 -1
  258. package/lib/components/productCard/types.d.ts +84 -0
  259. package/lib/components/productCard/utils.js +7 -6
  260. package/lib/components/section-footers/index.d.ts +9 -0
  261. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  262. package/lib/components/table/Actions/component/ExportImport/utils/index.d.ts +9 -0
  263. package/lib/components/table/Table/fields/index.d.ts +2 -2
  264. package/lib/components/table/Table/index.d.ts +4 -0
  265. package/lib/components/table/Table/utils.d.ts +1 -1
  266. package/lib/components/table/hooks/useTableSetting.d.ts +22 -0
  267. package/lib/components/table/types.d.ts +251 -0
  268. package/lib/components/tabs/index.d.ts +16 -0
  269. package/lib/components/translation/index.d.ts +4 -3
  270. package/lib/components/translation/index.js +1 -0
  271. package/lib/components/versionModal/index.d.ts +23 -0
  272. package/lib/components/virtual-keyboard/Amount/index.d.ts +3 -20
  273. package/lib/components/virtual-keyboard/Amount/index.js +72 -16
  274. package/lib/components/virtual-keyboard/Amount/index.less +39 -0
  275. package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
  276. package/lib/components/virtual-keyboard/Amount/themeConfig.js +60 -0
  277. package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
  278. package/lib/components/virtual-keyboard/Amount/types.js +17 -0
  279. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.d.ts +3 -1
  280. package/lib/components/virtual-keyboard/BaseNumberKeyboard/index.js +31 -8
  281. package/lib/components/virtual-keyboard/Keyboard/index.js +2 -1
  282. package/lib/components/virtual-keyboard/Number/index.d.ts +3 -11
  283. package/lib/components/virtual-keyboard/Number/index.js +65 -11
  284. package/lib/components/virtual-keyboard/Number/index.less +39 -0
  285. package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
  286. package/lib/components/virtual-keyboard/Number/themeConfig.js +60 -0
  287. package/lib/components/virtual-keyboard/Number/types.d.ts +25 -0
  288. package/lib/components/virtual-keyboard/Number/types.js +17 -0
  289. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +2 -0
  290. package/lib/components/virtual-keyboard/VirtualKeyInput/index.js +34 -20
  291. package/lib/components/virtual-keyboard/index.d.ts +11 -0
  292. package/lib/components/virtual-keyboard/index.js +60 -2
  293. package/lib/components/virtual-keyboard/index.less +33 -1
  294. package/lib/components/walletCard/Guest/index.d.ts +3 -0
  295. package/lib/components/walletCard/Guide/index.d.ts +3 -0
  296. package/lib/components/walletCard/index.d.ts +67 -0
  297. package/lowcode/_setters/antd-icon-setter/index.tsx +3 -2
  298. package/lowcode/pisell-adjust-price/meta.ts +168 -0
  299. package/lowcode/pisell-adjust-price/snippets.ts +1 -0
  300. package/lowcode/pisell-number-keyboard/meta.ts +167 -0
  301. package/lowcode/pisell-price-keyboard/meta.ts +167 -0
  302. package/lowcode/virtual-keyboard/meta.ts +131 -0
  303. package/package.json +2 -2
@@ -0,0 +1,251 @@
1
+ import { FilterType } from "../filter/types";
2
+ import { SortItemProps } from "../sort/types";
3
+ import React from "react";
4
+ export declare type StorageMode = "" | "localStorage";
5
+ /**
6
+ * 排序总配置
7
+ */
8
+ export declare type SortType = {
9
+ /** 排序是否展示 */
10
+ show: boolean;
11
+ /** 排序存储模式 */
12
+ storageMode: StorageMode;
13
+ list: SortItemProps[];
14
+ };
15
+ /**
16
+ * 列展示总配置
17
+ */
18
+ export declare type ColumnSettingType = {
19
+ /** 列设置是否展示 */
20
+ show: boolean;
21
+ /** 列设置存储模式 */
22
+ storageMode: StorageMode;
23
+ };
24
+ declare type DataSourceListItemType = {
25
+ isCustom: boolean;
26
+ columnKey?: string;
27
+ label?: string;
28
+ name?: string | string[];
29
+ isHidden?: boolean;
30
+ };
31
+ /**
32
+ * 数据源分组总配置
33
+ */
34
+ export declare type DataSourceGroupType = {
35
+ /** 分组设置是否展示 */
36
+ show: boolean;
37
+ /** 分组设置存储模式 */
38
+ storageMode: StorageMode;
39
+ /** */
40
+ list: DataSourceListItemType[];
41
+ };
42
+ /**
43
+ * Gallery封面总配置
44
+ */
45
+ declare type GalleryCoverType = {
46
+ /** 封面是否展示 */
47
+ show: boolean;
48
+ /**
49
+ * 封面图片可以使用的字段
50
+ */
51
+ fields: string[];
52
+ /**
53
+ * 封面高度
54
+ */
55
+ height: number;
56
+ /** 图片裁剪方式 */
57
+ objectFit: "fill" | "cover";
58
+ };
59
+ /**
60
+ * Gallery标题总配置
61
+ */
62
+ declare type GalleryTitleType = {
63
+ /** 标题使用的字段 */
64
+ field: string;
65
+ /** 标题行数 */
66
+ line: number;
67
+ };
68
+ /**
69
+ * Gallery头部区域总配置
70
+ */
71
+ declare type GalleryHeaderType = {
72
+ /** 头部区域插槽 */
73
+ slot?: (record: Record<string, any>, index: number) => React.ReactNode;
74
+ /** 头部区域其他字段设置 */
75
+ fields: {
76
+ /** 头部区域其他字段是否展示 */
77
+ show: boolean;
78
+ /** 头部区域其他字段 */
79
+ list: string[];
80
+ };
81
+ };
82
+ /**
83
+ * Gallery内容区域总配置
84
+ */
85
+ declare type GalleryContentType = {
86
+ /** 内容区域字段配置 */
87
+ fields: {
88
+ columnKey: string;
89
+ show: boolean;
90
+ }[];
91
+ };
92
+ export declare type GallerySettingValueType = {
93
+ coverField: string | "noCover";
94
+ coverObjectFit: "fill" | "cover";
95
+ compactMode: "default" | "compact";
96
+ isShowLabel: boolean;
97
+ };
98
+ /**
99
+ * Gallery底部区域总配置
100
+ */
101
+ declare type GalleryFooterType = {
102
+ /** 底部区域自定义渲染 */
103
+ render: (record: Record<string, any>, index: number) => React.ReactNode;
104
+ /** 底部区域高度 */
105
+ height: number;
106
+ };
107
+ /**
108
+ * Gallery模式总配置
109
+ */
110
+ export declare type GallerySettingType = {
111
+ /** 卡片最小宽度 */
112
+ cardMinWidth: number;
113
+ /** 卡片最大宽度 */
114
+ cardMaxWidth: number;
115
+ /** 水平间隔 */
116
+ horizontalGutter: number;
117
+ /** 垂直间隔 */
118
+ verticalGutter: number;
119
+ /** 封面配置 */
120
+ cover: GalleryCoverType;
121
+ /** 标题配置 */
122
+ title: GalleryTitleType;
123
+ /** 头部区域 */
124
+ header: GalleryHeaderType;
125
+ /** 内容区域 */
126
+ content: GalleryContentType;
127
+ /** 固定高度 */
128
+ fixedHeight: boolean;
129
+ /** 固定的卡片高度 */
130
+ cardHeight: number;
131
+ /** 固定顶部 */
132
+ fixedHeader: boolean;
133
+ /** 固定底部 */
134
+ fixedFooter: boolean;
135
+ /** 底部区域 */
136
+ footer: GalleryFooterType;
137
+ /** 卡片点击时间 */
138
+ onItem: (record: Record<string, any>, index: number) => void;
139
+ };
140
+ /** 视图模式 */
141
+ export declare type ModeType = "grid" | "gallery" | "kanban";
142
+ /**
143
+ * 视图模式总配置
144
+ */
145
+ export declare type GridViewType = {
146
+ /** 默认视图模式 */
147
+ defaultViewMode: ModeType;
148
+ /** 开启多视图模式可进行页面内转换 */
149
+ multiple: boolean;
150
+ /** 当前可用的视图模式列表 */
151
+ modeList: ModeType[];
152
+ };
153
+ declare type SortDetail = {
154
+ fromIndex: number;
155
+ toIndex: number;
156
+ dataSource: Record<string, any>[];
157
+ fromId: number | string;
158
+ toId: number | string;
159
+ fromItem: Record<string, any>;
160
+ toItem: Record<string, any>;
161
+ };
162
+ /** 导入导出模式 */
163
+ export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
164
+ /**
165
+ * @title: 导出导入api
166
+ * @description:
167
+ * @return {*}
168
+ * @Author: WangHan
169
+ * @Date: 2024-09-11 15:44
170
+ */
171
+ export declare type ApiProps = {
172
+ export?: string;
173
+ import?: string;
174
+ export_file: string;
175
+ import_log?: string;
176
+ template?: string;
177
+ };
178
+ /**
179
+ * 导入导出配置
180
+ */
181
+ export declare type ExportImportType = {
182
+ /** 是否展示 */
183
+ show: boolean;
184
+ /** 当前所选项 */
185
+ selectLists: string[];
186
+ /** 导入模版链接 */
187
+ templateFileUrl: string;
188
+ /** 标题 */
189
+ title: string;
190
+ hiddenKeys?: string[];
191
+ apiUrl?: ApiProps;
192
+ otherParams?: any;
193
+ };
194
+ export declare type GridViewProps = {
195
+ columns: any;
196
+ dataSource: any[];
197
+ dispatch: any;
198
+ /**
199
+ * 画册模式的配置
200
+ */
201
+ gallery: GallerySettingType;
202
+ /**
203
+ * 视图设置
204
+ */
205
+ view: GridViewType;
206
+ style: React.CSSProperties;
207
+ pagination: any;
208
+ filter: FilterType;
209
+ buttons: React.ReactNode | any[];
210
+ actionButtons: any;
211
+ sort: SortType;
212
+ title?: React.ReactNode | (() => React.ReactNode);
213
+ showTitle?: boolean;
214
+ subTitle?: React.ReactNode | (() => React.ReactNode);
215
+ showSubTitle?: boolean;
216
+ exportImport: ExportImportType;
217
+ onValuesChange: (changedValues: any, values: any) => void;
218
+ summary: any;
219
+ utils: any;
220
+ rowKey: ((record: Record<string, any>) => string) | string;
221
+ columnSetting?: ColumnSettingType;
222
+ dataSourceGroup?: DataSourceGroupType;
223
+ loading: boolean;
224
+ dragSort: boolean;
225
+ onSortChange?: (detail: SortDetail) => boolean;
226
+ __id?: string;
227
+ __designMode?: "design";
228
+ /**
229
+ * 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
230
+ */
231
+ currentSettingKey?: string;
232
+ /**
233
+ * 当前本地配置的唯一值, 不填默认使用currentSettingKey
234
+ */
235
+ currentComponentId?: string;
236
+ /**
237
+ * 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
238
+ * @param currentDataSource
239
+ */
240
+ onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
241
+ tabs: {
242
+ show: boolean;
243
+ type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
244
+ items: {
245
+ name: string;
246
+ filterBy?: Record<string, any>;
247
+ sortBy?: string;
248
+ }[];
249
+ };
250
+ };
251
+ export {};
@@ -0,0 +1,16 @@
1
+ import { Component } from 'react';
2
+ import { TabsProps } from 'antd';
3
+ import './index.less';
4
+ declare class Tabs extends Component<any> {
5
+ state: {
6
+ activeKey: any;
7
+ };
8
+ componentDidMount(): void;
9
+ private _handleChange;
10
+ setActiveKey: (key: string) => void;
11
+ getActiveKey: () => any;
12
+ renderIconLabelTabBar: TabsProps['renderTabBar'];
13
+ filterHiddenTabs: (tabs: any[]) => any[];
14
+ render(): JSX.Element;
15
+ }
16
+ export default Tabs;
@@ -1,13 +1,14 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  import './index.less';
3
3
  declare type Value = {
4
4
  en: string;
5
- "zh-CN": string;
6
- "zh-HK": string;
5
+ 'zh-CN': string;
6
+ 'zh-HK': string;
7
7
  };
8
8
  interface TranslationProps {
9
9
  value: Value;
10
10
  onChange: (value: Value) => void;
11
+ maxLength?: number;
11
12
  }
12
13
  declare const Translation: React.FC<TranslationProps>;
13
14
  export default Translation;
@@ -1,51 +1,51 @@
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
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
2
  var _excluded = ["value", "onChange"];
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; }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
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); }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
9
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
10
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
12
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
13
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
13
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
  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; }
16
16
  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; }
17
- import React, { useEffect, useMemo, useState } from "react";
18
- import { Input, Modal, Form } from "antd";
19
- import { isString } from "@pisell/utils";
20
- import { GlobalOutlined } from "@ant-design/icons";
21
- import classNames from "classnames";
17
+ import React, { useEffect, useMemo, useState } from 'react';
18
+ import { Input, Modal, Form } from 'antd';
19
+ import { isString } from '@pisell/utils';
20
+ import { GlobalOutlined } from '@ant-design/icons';
21
+ import classNames from 'classnames';
22
22
  import useEngineContext from "../../hooks/useEngineContext";
23
23
  import { checkIfAllValuesAreEqual, createTranslationText, locales } from "./utils";
24
24
  import "./index.less";
25
25
  var defaultGlobal = {
26
26
  shopLanguages: {
27
- primary: "en",
27
+ primary: 'en',
28
28
  list: [{
29
29
  id: 1,
30
- code: "zh-CN",
31
- text: "简体中文",
30
+ code: 'zh-CN',
31
+ text: '简体中文',
32
32
  primary: 1,
33
- status: "published"
33
+ status: 'published'
34
34
  }, {
35
35
  id: 2,
36
- code: "en",
37
- text: "English",
36
+ code: 'en',
37
+ text: 'English',
38
38
  primary: 0,
39
- status: "published"
39
+ status: 'published'
40
40
  }, {
41
41
  id: 3,
42
- code: "zh-HK",
43
- text: "繁體中文",
42
+ code: 'zh-HK',
43
+ text: '繁體中文',
44
44
  primary: 0,
45
- status: "published"
45
+ status: 'published'
46
46
  }]
47
47
  },
48
- primary_locale: "en"
48
+ primary_locale: 'en'
49
49
  };
50
50
  var defaultObj = {};
51
51
  var Translation = function Translation(props) {
@@ -63,8 +63,8 @@ var Translation = function Translation(props) {
63
63
  _useState4 = _slicedToArray(_useState3, 2),
64
64
  _value = _useState4[0],
65
65
  set_value = _useState4[1];
66
- var store = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.store;
67
- var _ref = (store === null || store === void 0 ? void 0 : (_store$getState = store.getState()) === null || _store$getState === void 0 ? void 0 : _store$getState.global) || defaultGlobal,
66
+ var store = context === null || context === void 0 || (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.store;
67
+ var _ref = (store === null || store === void 0 || (_store$getState = store.getState()) === null || _store$getState === void 0 ? void 0 : _store$getState.global) || defaultGlobal,
68
68
  shopLanguages = _ref.shopLanguages;
69
69
  useEffect(function () {
70
70
  var _newValue = _objectSpread({}, value);
@@ -88,7 +88,7 @@ var Translation = function Translation(props) {
88
88
  var defaultValue = useMemo(function () {
89
89
  var obj = {};
90
90
  for (var item in locales) {
91
- obj[item] = "";
91
+ obj[item] = '';
92
92
  }
93
93
  return obj;
94
94
  }, []);
@@ -96,12 +96,12 @@ var Translation = function Translation(props) {
96
96
  var newValue = _objectSpread(_objectSpread({}, defaultValue), value || {});
97
97
  if (checkIfAllValuesAreEqual(newValue)) {
98
98
  for (var key in newValue) {
99
- newValue[key] = e || "";
99
+ newValue[key] = e || '';
100
100
  }
101
101
  } else {
102
- newValue[currentLocale] = e || "";
102
+ newValue[currentLocale] = e || '';
103
103
  }
104
- onChange === null || onChange === void 0 ? void 0 : onChange(newValue);
104
+ onChange === null || onChange === void 0 || onChange(newValue);
105
105
  };
106
106
  var isActive = useMemo(function () {
107
107
  var bol = false;
@@ -113,7 +113,7 @@ var Translation = function Translation(props) {
113
113
  return bol;
114
114
  }, [value, currentLocale]);
115
115
  var _onOk = function _onOk() {
116
- onChange === null || onChange === void 0 ? void 0 : onChange(_value);
116
+ onChange === null || onChange === void 0 || onChange(_value);
117
117
  setOpen(false);
118
118
  };
119
119
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, _extends({}, others, {
@@ -122,7 +122,7 @@ var Translation = function Translation(props) {
122
122
  return allChange(e.target.value);
123
123
  },
124
124
  suffix: /*#__PURE__*/React.createElement(GlobalOutlined, {
125
- className: classNames("pisell-lowcode-translation-icon", {
125
+ className: classNames('pisell-lowcode-translation-icon', {
126
126
  active: isActive
127
127
  }),
128
128
  onClick: function onClick() {
@@ -145,12 +145,14 @@ var Translation = function Translation(props) {
145
145
  span: 24
146
146
  },
147
147
  key: d.code
148
- }, /*#__PURE__*/React.createElement(Input, {
148
+ }, /*#__PURE__*/React.createElement(Input, _extends({}, typeof others.maxLength === 'number' ? {
149
+ maxLength: others.maxLength
150
+ } : {}, {
149
151
  value: _value[d.code],
150
152
  onChange: function onChange(e) {
151
153
  set_value(_objectSpread(_objectSpread({}, _value), {}, _defineProperty({}, d.code, e.target.value)));
152
154
  }
153
- }));
155
+ })));
154
156
  }))));
155
157
  };
156
158
  export default Translation;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import { Version } from '../versionSelect';
3
+ import './index.less';
4
+ interface PublishVersionModalProps {
5
+ visible: boolean;
6
+ currentVersion: string;
7
+ onCancel: () => void;
8
+ onConfirm: (data: VersionData) => void;
9
+ isShowNote?: boolean;
10
+ confirmLoading?: boolean;
11
+ versions?: Version[];
12
+ isShowBasedOn?: boolean;
13
+ isShowCurrentVersion?: boolean;
14
+ isValidateVersion?: boolean;
15
+ }
16
+ interface VersionData {
17
+ version: string;
18
+ note: string;
19
+ baseVersion?: string;
20
+ versionType?: string;
21
+ }
22
+ declare const PublishVersionModal: React.FC<PublishVersionModalProps>;
23
+ export default PublishVersionModal;
@@ -1,22 +1,5 @@
1
- import React from 'react';
2
- import { BaseNumberKeyboardProps } from '../BaseNumberKeyboard';
3
- export interface AmountProps {
4
- max?: number;
5
- min?: number;
6
- doneText?: string;
7
- resetText?: string;
8
- defaultValue?: string | number;
9
- placeholder?: string;
10
- amountProps?: {
11
- showCurrencySymbol: boolean;
12
- useThousandsSeparator: boolean;
13
- };
14
- presets?: BaseNumberKeyboardProps['presets'];
15
- value?: string | number;
16
- onChange?: (val: string | number) => void;
17
- onEnter?: (val: string | number) => void;
18
- defaultSelect?: boolean;
19
- inputFormat?: (_v: string) => React.ReactNode | null;
20
- }
1
+ import { AmountProps, RightItemsStyleProps } from './types';
2
+ import './index.less';
3
+ export type { AmountProps, RightItemsStyleProps };
21
4
  declare const Amount: (props: AmountProps) => JSX.Element;
22
5
  export default Amount;
@@ -1,14 +1,29 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["min", "max", "amountProps", "doneText", "resetText", "defaultValue", "placeholder", "onEnter", "presets", "defaultSelect", "inputFormat", "rightItemsStyle", "selectType"];
3
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
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(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
7
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
10
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
11
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
5
12
  function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
13
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
- import React, { useEffect } from 'react';
14
+ 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; }
15
+ 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; }
16
+ import React, { useEffect, useMemo } from 'react';
8
17
  import { useControllableValue } from 'ahooks';
18
+ import classNames from 'classnames';
19
+ import { setTheme } from '@pisell/utils';
9
20
  import BaseNumberKeyboard from "../BaseNumberKeyboard";
10
21
  import PisellText from "../../pisellText";
22
+ import usePisellConfig from "../../pisell-config-provider/hooks/usePisellConfig";
23
+ import { amountThemeConfig } from "./themeConfig";
24
+ import "./index.less";
11
25
  var Amount = function Amount(props) {
26
+ var _rightItemsStyle$isDo;
12
27
  var min = props.min,
13
28
  max = props.max,
14
29
  amountProps = props.amountProps,
@@ -19,9 +34,14 @@ var Amount = function Amount(props) {
19
34
  onEnter = props.onEnter,
20
35
  presets = props.presets,
21
36
  defaultSelect = props.defaultSelect,
22
- inputFormat = props.inputFormat;
37
+ inputFormat = props.inputFormat,
38
+ rightItemsStyle = props.rightItemsStyle,
39
+ _props$selectType = props.selectType,
40
+ selectType = _props$selectType === void 0 ? 'light' : _props$selectType,
41
+ others = _objectWithoutProperties(props, _excluded);
42
+ var config = usePisellConfig();
23
43
  var _useControllableValue = useControllableValue(props, {
24
- defaultValue: defaultValue || ""
44
+ defaultValue: defaultValue || ''
25
45
  }),
26
46
  _useControllableValue2 = _slicedToArray(_useControllableValue, 2),
27
47
  value = _useControllableValue2[0],
@@ -29,6 +49,41 @@ var Amount = function Amount(props) {
29
49
  useEffect(function () {
30
50
  document.body.id = 'body';
31
51
  }, []);
52
+
53
+ /**
54
+ * 配置颜色
55
+ * 根据 props 和 selectType 生成最终的配置颜色
56
+ */
57
+ var configColor = useMemo(function () {
58
+ var currentConfig = amountThemeConfig[selectType];
59
+
60
+ // 过滤出有效的 props 并合并到默认配置中
61
+ var validProps = Object.entries(props).reduce(function (acc, _ref) {
62
+ var _ref2 = _slicedToArray(_ref, 2),
63
+ key = _ref2[0],
64
+ value = _ref2[1];
65
+ if (value !== undefined && key in currentConfig) {
66
+ acc[key] = value;
67
+ }
68
+ return acc;
69
+ }, {});
70
+ return _objectSpread(_objectSpread({}, currentConfig), validProps);
71
+ }, [selectType, props]);
72
+ useEffect(function () {
73
+ setTheme({
74
+ '--pisell-amount-background-color': configColor.backgroundColor,
75
+ '--pisell-amount-container-background-color': configColor.containerBackgroundColor,
76
+ '--pisell-amount-text-color': configColor.textColor,
77
+ '--pisell-amount-keyboard-background-color': configColor.keyboardBackgroundColor,
78
+ '--pisell-amount-keyboard-button-background-color': configColor.keyboardButtonBackgroundColor,
79
+ '--pisell-amount-keyboard-button-text-color': configColor.keyboardButtonTextColor,
80
+ '--pisell-amount-keyboard-button-hover-color': configColor.keyboardButtonHoverColor,
81
+ '--pisell-amount-reset-button-background-color': configColor.resetButtonBackgroundColor,
82
+ '--pisell-amount-reset-button-text-color': configColor.resetButtonTextColor,
83
+ '--pisell-amount-done-button-background-color': configColor.doneButtonBackgroundColor,
84
+ '--pisell-amount-done-button-text-color': configColor.doneButtonTextColor
85
+ });
86
+ }, [configColor]);
32
87
  var format = function format(_v) {
33
88
  var v = "".concat(_v);
34
89
  if (inputFormat !== null && inputFormat !== void 0 && inputFormat(v)) {
@@ -44,10 +99,18 @@ var Amount = function Amount(props) {
44
99
  precision: precision,
45
100
  hideDecimalForWholeNumbers: false,
46
101
  showCurrencySymbol: amountProps === null || amountProps === void 0 ? void 0 : amountProps.showCurrencySymbol,
47
- useThousandsSeparator: amountProps === null || amountProps === void 0 ? void 0 : amountProps.useThousandsSeparator
102
+ useThousandsSeparator: amountProps === null || amountProps === void 0 ? void 0 : amountProps.useThousandsSeparator,
103
+ style: {
104
+ color: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.textColor) || configColor.textColor
105
+ }
48
106
  }), endWith && '.');
49
107
  };
50
- return /*#__PURE__*/React.createElement(BaseNumberKeyboard, {
108
+ return /*#__PURE__*/React.createElement("div", {
109
+ className: classNames('pisell-amount-keyboard-wrap', {
110
+ 'pisell-amount-keyboard-dark': selectType === 'dark',
111
+ 'pisell-amount-keyboard-light': selectType === 'light'
112
+ })
113
+ }, /*#__PURE__*/React.createElement(BaseNumberKeyboard, {
51
114
  defaultSelect: defaultSelect,
52
115
  max: max,
53
116
  min: min,
@@ -59,7 +122,16 @@ var Amount = function Amount(props) {
59
122
  doneText: doneText,
60
123
  resetText: resetText,
61
124
  onEnter: onEnter,
62
- presets: presets
63
- });
125
+ presets: presets,
126
+ rightItemsStyle: _objectSpread(_objectSpread({}, rightItemsStyle), {}, {
127
+ buttonBackgroundColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.buttonBackgroundColor) || configColor.buttonBackgroundColor,
128
+ textColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.textColor) || configColor.textColor,
129
+ resetButtonBackgroundColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.resetButtonBackgroundColor) || configColor.resetButtonBackgroundColor,
130
+ resetButtonTextColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.resetButtonTextColor) || configColor.resetButtonTextColor,
131
+ isDoneButtonFollowTheme: (_rightItemsStyle$isDo = rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.isDoneButtonFollowTheme) !== null && _rightItemsStyle$isDo !== void 0 ? _rightItemsStyle$isDo : configColor.isDoneButtonFollowTheme,
132
+ doneButtonBackgroundColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.doneButtonBackgroundColor) || configColor.doneButtonBackgroundColor,
133
+ doneButtonTextColor: (rightItemsStyle === null || rightItemsStyle === void 0 ? void 0 : rightItemsStyle.doneButtonTextColor) || configColor.doneButtonTextColor
134
+ })
135
+ }));
64
136
  };
65
137
  export default Amount;
@@ -0,0 +1,39 @@
1
+ .pisell-amount-keyboard-wrap {
2
+ background-color: var(--pisell-amount-background-color, #ffffff);
3
+
4
+ &.pisell-amount-keyboard-dark {
5
+ background-color: var(--pisell-amount-background-color, rgba(0, 0, 0, 0.70));
6
+ }
7
+
8
+ &.pisell-amount-keyboard-light {
9
+ background-color: var(--pisell-amount-background-color, #ffffff);
10
+ }
11
+
12
+ .pisell-virtual-keyboard-input {
13
+ background-color: var(--pisell-amount-container-background-color, #d0d5dd);
14
+ color: var(--pisell-amount-text-color, #000000);
15
+ }
16
+
17
+ .pisell-keyboard {
18
+ background-color: var(--pisell-amount-keyboard-background-color, #f9f9f9);
19
+
20
+ .pisell-keyboard-item {
21
+ background-color: var(--pisell-amount-keyboard-button-background-color, #ffffff);
22
+ color: var(--pisell-amount-keyboard-button-text-color, #000000);
23
+
24
+ &:hover {
25
+ background-color: var(--pisell-amount-keyboard-button-hover-color, #f5f5f5);
26
+ }
27
+ }
28
+
29
+ .pisell-keyboard-reset-button {
30
+ background-color: var(--pisell-amount-reset-button-background-color, #ffffff);
31
+ color: var(--pisell-amount-reset-button-text-color, #d92d20);
32
+ }
33
+
34
+ .pisell-keyboard-done-button {
35
+ background-color: var(--pisell-amount-done-button-background-color, #4ca30d);
36
+ color: var(--pisell-amount-done-button-text-color, #ffffff);
37
+ }
38
+ }
39
+ }