@pisell/materials 1.0.446 → 1.0.448

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 (341) 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 +2 -2
  6. package/build/lowcode/preview.js +7 -7
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +7 -7
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +7 -7
  11. package/es/components/browserSelect/chevron-down.png +0 -0
  12. package/es/components/browserSelect/index.d.ts +15 -0
  13. package/es/components/browserSelect/index.js +36 -0
  14. package/es/components/browserSelect/index.less +18 -0
  15. package/es/components/button/index.js +2 -0
  16. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  17. package/es/components/buttonGroupEdit/index.js +411 -0
  18. package/es/components/buttonGroupPreview/index.d.ts +20 -0
  19. package/es/components/buttonGroupPreview/index.js +81 -0
  20. package/es/components/cardPro/index.d.ts +4 -0
  21. package/es/components/cardPro/index.js +66 -0
  22. package/es/components/cardPro/index.less +58 -0
  23. package/es/components/collapse/index.d.ts +6 -0
  24. package/es/components/collapse/index.js +66 -0
  25. package/es/components/collapse/index.less +1 -0
  26. package/es/components/date-picker/constants.d.ts +39 -0
  27. package/es/components/date-picker/constants.js +76 -0
  28. package/es/components/date-picker/datePickerCpt.d.ts +8 -0
  29. package/es/components/date-picker/datePickerCpt.js +370 -0
  30. package/es/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
  31. package/es/components/date-picker/hooks/useMediaQuery.js +28 -0
  32. package/es/components/date-picker/index.js +2 -2
  33. package/es/components/date-picker/index.less +1880 -0
  34. package/es/components/drag-sort-tree/index.d.ts +0 -1
  35. package/es/components/drag-sort-tree/index.js +2 -1
  36. package/es/components/iconfont/index.js +1 -1
  37. package/es/components/picker-view/index.d.ts +2 -0
  38. package/es/components/picker-view/index.js +2 -0
  39. package/es/components/pisellAnchor/index.d.ts +15 -0
  40. package/es/components/pisellAnchor/index.js +114 -0
  41. package/es/components/pisellAnchor/index.less +98 -0
  42. package/es/components/pisellInformationEntry/Input/index.js +9 -3
  43. package/es/components/pisellInformationEntry/constants.d.ts +10 -0
  44. package/es/components/pisellInformationEntry/constants.js +10 -0
  45. package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +8 -0
  46. package/es/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +54 -0
  47. package/es/components/pisellInformationEntry/index.js +21 -4
  48. package/es/components/pisellInformationEntry/index.less +1 -1
  49. package/es/components/pisellLoading/index.d.ts +2 -0
  50. package/es/components/pisellLoading/index.js +3 -1
  51. package/es/components/pisellQrcode/index.d.ts +4 -0
  52. package/es/components/pisellQrcode/index.js +75 -0
  53. package/es/components/pisellQrcode/index.less +41 -0
  54. package/es/components/pisellStatistic/index.d.ts +10 -0
  55. package/es/components/pisellStatistic/index.js +26 -0
  56. package/es/components/pisellStatistic/index.less +14 -0
  57. package/es/components/pisellTags/index.d.ts +13 -0
  58. package/es/components/pisellTags/index.js +83 -0
  59. package/es/components/pisellTags/index.less +17 -0
  60. package/es/components/pisellTags/utils.d.ts +1 -0
  61. package/es/components/pisellTags/utils.js +89 -0
  62. package/es/components/pisellUpload/index.d.ts +11 -0
  63. package/es/components/pisellUpload/index.js +34 -0
  64. package/es/components/pisellUpload/index.less +15 -0
  65. package/es/components/pisellUploadCrop/index.d.ts +3 -0
  66. package/es/components/pisellUploadCrop/index.js +73 -0
  67. package/es/components/pisellUploadCrop/index.less +15 -0
  68. package/es/components/pisellWalletCard/img/drak.png +0 -0
  69. package/es/components/pisellWalletCard/img/light.png +0 -0
  70. package/es/components/pisellWalletCard/index.d.ts +4 -0
  71. package/es/components/pisellWalletCard/index.js +122 -0
  72. package/es/components/pisellWalletCard/index.less +96 -0
  73. package/es/components/pisellWalletPassCard/index.d.ts +2 -0
  74. package/es/components/pisellWalletPassCard/index.js +16 -4
  75. package/es/components/pisellWalletPassCard/index.less +3 -0
  76. package/es/components/productCard/components/Actions/index.d.ts +4 -0
  77. package/es/components/productCard/components/Actions/index.js +20 -0
  78. package/es/components/productCard/components/Actions/index.less +14 -0
  79. package/es/components/productCard/components/AmountFooter/index.d.ts +4 -0
  80. package/es/components/productCard/components/AmountFooter/index.js +32 -0
  81. package/es/components/productCard/components/AmountFooter/index.less +30 -0
  82. package/es/components/productCard/components/Divider/index.d.ts +4 -0
  83. package/es/components/productCard/components/Divider/index.js +11 -0
  84. package/es/components/productCard/components/Divider/index.less +13 -0
  85. package/es/components/productCard/components/Header/index.d.ts +4 -0
  86. package/es/components/productCard/components/Header/index.js +69 -0
  87. package/es/components/productCard/components/Header/index.less +59 -0
  88. package/es/components/productCard/components/Holder/index.d.ts +4 -0
  89. package/es/components/productCard/components/Holder/index.js +11 -0
  90. package/es/components/productCard/components/Holder/index.less +11 -0
  91. package/es/components/productCard/components/Note/index.d.ts +4 -0
  92. package/es/components/productCard/components/Note/index.js +17 -0
  93. package/es/components/productCard/components/Note/index.less +20 -0
  94. package/es/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  95. package/es/components/productCard/components/Packages/components/collapsibleList/index.js +96 -0
  96. package/es/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
  97. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  98. package/es/components/productCard/components/Packages/components/collapsibleList/utils.js +31 -0
  99. package/es/components/productCard/components/Packages/components/options/index.d.ts +4 -0
  100. package/es/components/productCard/components/Packages/components/options/index.js +23 -0
  101. package/es/components/productCard/components/Packages/components/options/index.less +28 -0
  102. package/es/components/productCard/components/Packages/index.d.ts +4 -0
  103. package/es/components/productCard/components/Packages/index.js +22 -0
  104. package/es/components/productCard/components/Packages/index.less +17 -0
  105. package/es/components/productCard/components/Packages/utils.d.ts +20 -0
  106. package/es/components/productCard/components/Packages/utils.js +40 -0
  107. package/es/components/productCard/components/Sales/index.d.ts +4 -0
  108. package/es/components/productCard/components/Sales/index.js +22 -0
  109. package/es/components/productCard/components/Sales/index.less +18 -0
  110. package/es/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  111. package/es/components/productCard/components/Time/components/Like/index.js +26 -0
  112. package/es/components/productCard/components/Time/components/Like/index.less +6 -0
  113. package/es/components/productCard/components/Time/components/Like/like-heart.png +0 -0
  114. package/es/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
  115. package/es/components/productCard/components/Time/index.d.ts +4 -0
  116. package/es/components/productCard/components/Time/index.js +30 -0
  117. package/es/components/productCard/components/Time/index.less +25 -0
  118. package/es/components/productCard/index.d.ts +5 -0
  119. package/es/components/productCard/index.js +80 -0
  120. package/es/components/productCard/index.less +48 -0
  121. package/es/components/productCard/types.d.ts +10 -0
  122. package/es/components/productCard/types.js +1 -0
  123. package/es/components/productCard/utils.d.ts +162 -0
  124. package/es/components/productCard/utils.js +683 -0
  125. package/es/components/record-view/index.d.ts +3 -3
  126. package/es/components/record-view/index.js +23 -16
  127. package/es/components/section-footers/index.d.ts +8 -0
  128. package/es/components/section-footers/index.js +16 -0
  129. package/es/components/select-time/RightPanel/index.d.ts +2 -2
  130. package/es/components/select-time/RightPanel/index.js +7 -7
  131. package/es/components/table/Actions/component/ExportImport/index.js +3 -3
  132. package/es/components/table/BasicTable/index.js +7 -1
  133. package/es/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
  134. package/es/components/table/Gallery/components/GalleryItem/index.js +10 -3
  135. package/es/components/table/Gallery/components/GalleryItem/index.less +1 -0
  136. package/es/components/table/Gallery/index.js +14 -4
  137. package/es/components/table/Table/index.js +2 -1
  138. package/es/components/table/Table/utils.d.ts +15 -3
  139. package/es/components/table/Table/utils.js +6 -2
  140. package/es/components/table/hooks/useTableSetting.js +26 -5
  141. package/es/components/table/hooks/useTransDataSource.d.ts +1 -0
  142. package/es/components/table/hooks/useTransDataSource.js +6 -4
  143. package/es/components/table/types.d.ts +2 -0
  144. package/es/components/tabs/index.d.ts +1 -0
  145. package/es/components/tabs/index.js +33 -11
  146. package/es/components/virtual-keyboard/Keyboard/index.d.ts +1 -0
  147. package/es/components/virtual-keyboard/Keyboard/index.js +10 -2
  148. package/es/index.d.ts +18 -4
  149. package/es/index.js +20 -3
  150. package/es/locales/en-US.d.ts +14 -0
  151. package/es/locales/en-US.js +16 -1
  152. package/es/locales/zh-CN.d.ts +14 -0
  153. package/es/locales/zh-CN.js +16 -1
  154. package/es/locales/zh-TW.d.ts +14 -0
  155. package/es/locales/zh-TW.js +16 -1
  156. package/es/utils/index.d.ts +1 -0
  157. package/es/utils/index.js +4 -1
  158. package/lib/components/browserSelect/chevron-down.png +0 -0
  159. package/lib/components/browserSelect/index.d.ts +15 -0
  160. package/lib/components/browserSelect/index.js +59 -0
  161. package/lib/components/browserSelect/index.less +18 -0
  162. package/lib/components/button/index.js +2 -0
  163. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  164. package/lib/components/buttonGroupEdit/index.js +234 -0
  165. package/lib/components/buttonGroupPreview/index.d.ts +20 -0
  166. package/lib/components/buttonGroupPreview/index.js +65 -0
  167. package/lib/components/cardPro/index.d.ts +4 -0
  168. package/lib/components/cardPro/index.js +60 -0
  169. package/lib/components/cardPro/index.less +58 -0
  170. package/lib/components/collapse/index.d.ts +6 -0
  171. package/lib/components/collapse/index.js +88 -0
  172. package/lib/components/collapse/index.less +1 -0
  173. package/lib/components/date-picker/constants.d.ts +39 -0
  174. package/lib/components/date-picker/constants.js +78 -0
  175. package/lib/components/date-picker/datePickerCpt.d.ts +8 -0
  176. package/lib/components/date-picker/datePickerCpt.js +403 -0
  177. package/lib/components/date-picker/hooks/useMediaQuery.d.ts +2 -0
  178. package/lib/components/date-picker/hooks/useMediaQuery.js +43 -0
  179. package/lib/components/date-picker/index.js +2 -2
  180. package/lib/components/date-picker/index.less +1880 -0
  181. package/lib/components/drag-sort-tree/index.d.ts +0 -1
  182. package/lib/components/drag-sort-tree/index.js +0 -1
  183. package/lib/components/iconfont/index.js +1 -1
  184. package/lib/components/picker-view/index.d.ts +2 -0
  185. package/lib/components/picker-view/index.js +36 -0
  186. package/lib/components/pisellAnchor/index.d.ts +15 -0
  187. package/lib/components/pisellAnchor/index.js +107 -0
  188. package/lib/components/pisellAnchor/index.less +98 -0
  189. package/lib/components/pisellInformationEntry/Input/index.js +9 -1
  190. package/lib/components/pisellInformationEntry/constants.d.ts +10 -0
  191. package/lib/components/pisellInformationEntry/constants.js +12 -0
  192. package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.d.ts +8 -0
  193. package/lib/components/pisellInformationEntry/hooks/useTerminalPeripherals.js +83 -0
  194. package/lib/components/pisellInformationEntry/index.js +18 -2
  195. package/lib/components/pisellInformationEntry/index.less +1 -1
  196. package/lib/components/pisellLoading/index.d.ts +2 -0
  197. package/lib/components/pisellLoading/index.js +2 -1
  198. package/lib/components/pisellQrcode/index.d.ts +4 -0
  199. package/lib/components/pisellQrcode/index.js +79 -0
  200. package/lib/components/pisellQrcode/index.less +41 -0
  201. package/lib/components/pisellStatistic/index.d.ts +10 -0
  202. package/lib/components/pisellStatistic/index.js +51 -0
  203. package/lib/components/pisellStatistic/index.less +14 -0
  204. package/lib/components/pisellTags/index.d.ts +13 -0
  205. package/lib/components/pisellTags/index.js +113 -0
  206. package/lib/components/pisellTags/index.less +17 -0
  207. package/lib/components/pisellTags/utils.d.ts +1 -0
  208. package/lib/components/pisellTags/utils.js +86 -0
  209. package/lib/components/pisellUpload/index.d.ts +11 -0
  210. package/lib/components/pisellUpload/index.js +53 -0
  211. package/lib/components/pisellUpload/index.less +15 -0
  212. package/lib/components/pisellUploadCrop/index.d.ts +3 -0
  213. package/lib/components/pisellUploadCrop/index.js +75 -0
  214. package/lib/components/pisellUploadCrop/index.less +15 -0
  215. package/lib/components/pisellWalletCard/img/drak.png +0 -0
  216. package/lib/components/pisellWalletCard/img/light.png +0 -0
  217. package/lib/components/pisellWalletCard/index.d.ts +4 -0
  218. package/lib/components/pisellWalletCard/index.js +184 -0
  219. package/lib/components/pisellWalletCard/index.less +96 -0
  220. package/lib/components/pisellWalletPassCard/index.d.ts +2 -0
  221. package/lib/components/pisellWalletPassCard/index.js +8 -4
  222. package/lib/components/pisellWalletPassCard/index.less +3 -0
  223. package/lib/components/productCard/components/Actions/index.d.ts +4 -0
  224. package/lib/components/productCard/components/Actions/index.js +54 -0
  225. package/lib/components/productCard/components/Actions/index.less +14 -0
  226. package/lib/components/productCard/components/AmountFooter/index.d.ts +4 -0
  227. package/lib/components/productCard/components/AmountFooter/index.js +61 -0
  228. package/lib/components/productCard/components/AmountFooter/index.less +30 -0
  229. package/lib/components/productCard/components/Divider/index.d.ts +4 -0
  230. package/lib/components/productCard/components/Divider/index.js +50 -0
  231. package/lib/components/productCard/components/Divider/index.less +13 -0
  232. package/lib/components/productCard/components/Header/index.d.ts +4 -0
  233. package/lib/components/productCard/components/Header/index.js +81 -0
  234. package/lib/components/productCard/components/Header/index.less +59 -0
  235. package/lib/components/productCard/components/Holder/index.d.ts +4 -0
  236. package/lib/components/productCard/components/Holder/index.js +42 -0
  237. package/lib/components/productCard/components/Holder/index.less +11 -0
  238. package/lib/components/productCard/components/Note/index.d.ts +4 -0
  239. package/lib/components/productCard/components/Note/index.js +43 -0
  240. package/lib/components/productCard/components/Note/index.less +20 -0
  241. package/lib/components/productCard/components/Packages/components/collapsibleList/index.d.ts +10 -0
  242. package/lib/components/productCard/components/Packages/components/collapsibleList/index.js +93 -0
  243. package/lib/components/productCard/components/Packages/components/collapsibleList/index.less +53 -0
  244. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +2 -0
  245. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.js +48 -0
  246. package/lib/components/productCard/components/Packages/components/options/index.d.ts +4 -0
  247. package/lib/components/productCard/components/Packages/components/options/index.js +73 -0
  248. package/lib/components/productCard/components/Packages/components/options/index.less +28 -0
  249. package/lib/components/productCard/components/Packages/index.d.ts +4 -0
  250. package/lib/components/productCard/components/Packages/index.js +51 -0
  251. package/lib/components/productCard/components/Packages/index.less +17 -0
  252. package/lib/components/productCard/components/Packages/utils.d.ts +20 -0
  253. package/lib/components/productCard/components/Packages/utils.js +44 -0
  254. package/lib/components/productCard/components/Sales/index.d.ts +4 -0
  255. package/lib/components/productCard/components/Sales/index.js +51 -0
  256. package/lib/components/productCard/components/Sales/index.less +18 -0
  257. package/lib/components/productCard/components/Time/components/Like/index.d.ts +9 -0
  258. package/lib/components/productCard/components/Time/components/Like/index.js +64 -0
  259. package/lib/components/productCard/components/Time/components/Like/index.less +6 -0
  260. package/lib/components/productCard/components/Time/components/Like/like-heart.png +0 -0
  261. package/lib/components/productCard/components/Time/components/Like/like-hide-heart.png +0 -0
  262. package/lib/components/productCard/components/Time/index.d.ts +4 -0
  263. package/lib/components/productCard/components/Time/index.js +57 -0
  264. package/lib/components/productCard/components/Time/index.less +25 -0
  265. package/lib/components/productCard/index.d.ts +5 -0
  266. package/lib/components/productCard/index.js +101 -0
  267. package/lib/components/productCard/index.less +48 -0
  268. package/lib/components/productCard/types.d.ts +10 -0
  269. package/lib/components/productCard/types.js +17 -0
  270. package/lib/components/productCard/utils.d.ts +162 -0
  271. package/lib/components/productCard/utils.js +598 -0
  272. package/lib/components/record-view/index.d.ts +3 -3
  273. package/lib/components/record-view/index.js +19 -3
  274. package/lib/components/section-footers/index.d.ts +8 -0
  275. package/lib/components/section-footers/index.js +39 -0
  276. package/lib/components/select-time/RightPanel/index.d.ts +2 -2
  277. package/lib/components/table/Actions/component/ExportImport/index.js +3 -4
  278. package/lib/components/table/BasicTable/index.js +5 -1
  279. package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
  280. package/lib/components/table/Gallery/components/GalleryItem/index.js +18 -4
  281. package/lib/components/table/Gallery/components/GalleryItem/index.less +1 -0
  282. package/lib/components/table/Gallery/index.js +14 -3
  283. package/lib/components/table/Table/index.js +2 -1
  284. package/lib/components/table/Table/utils.d.ts +15 -3
  285. package/lib/components/table/Table/utils.js +7 -1
  286. package/lib/components/table/hooks/useTableSetting.js +23 -9
  287. package/lib/components/table/hooks/useTransDataSource.d.ts +1 -0
  288. package/lib/components/table/hooks/useTransDataSource.js +5 -4
  289. package/lib/components/table/types.d.ts +2 -0
  290. package/lib/components/tabs/index.d.ts +1 -0
  291. package/lib/components/tabs/index.js +36 -6
  292. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +1 -0
  293. package/lib/components/virtual-keyboard/Keyboard/index.js +15 -2
  294. package/lib/index.d.ts +18 -4
  295. package/lib/index.js +76 -34
  296. package/lib/locales/en-US.d.ts +14 -0
  297. package/lib/locales/en-US.js +16 -1
  298. package/lib/locales/zh-CN.d.ts +14 -0
  299. package/lib/locales/zh-CN.js +16 -1
  300. package/lib/locales/zh-TW.d.ts +14 -0
  301. package/lib/locales/zh-TW.js +16 -1
  302. package/lib/utils/index.d.ts +1 -0
  303. package/lib/utils/index.js +7 -2
  304. package/lowcode/badge/meta.ts +8 -8
  305. package/lowcode/collapse/meta.ts +85 -1
  306. package/lowcode/pisell-anchor/meta.ts +127 -0
  307. package/lowcode/pisell-anchor/snippets.ts +20 -0
  308. package/lowcode/pisell-qrcode/__screenshots__/upload-1.png +0 -0
  309. package/lowcode/pisell-qrcode/meta.ts +46 -0
  310. package/lowcode/pisell-qrcode/snippets.ts +12 -0
  311. package/lowcode/pisell-statistic/meta.ts +83 -0
  312. package/lowcode/pisell-statistic/snippets.ts +13 -0
  313. package/lowcode/pisell-tooltip/meta.ts +1 -1
  314. package/lowcode/pisell-upload/__screenshots__/upload-1.png +0 -0
  315. package/lowcode/pisell-upload/meta.ts +508 -0
  316. package/lowcode/pisell-upload/snippets.ts +20 -0
  317. package/lowcode/pisell-upload-crop/meta.ts +77 -0
  318. package/lowcode/pisell-upload-crop/snippe.ts +12 -0
  319. package/lowcode/pisell-wallet-card/meta.ts +141 -0
  320. package/lowcode/pisell-wallet-card/snippets.ts +26 -0
  321. package/lowcode/product-card/meta.ts +92 -0
  322. package/lowcode/product-card/snippets.ts +15 -0
  323. package/lowcode/record-view/meta.ts +12 -0
  324. package/lowcode/section-footers/meta.ts +47 -3
  325. package/lowcode/section-footers/snippe.ts +14 -1
  326. package/lowcode/statistic/meta.ts +1 -1
  327. package/lowcode/tabs/meta.ts +51 -51
  328. package/lowcode/tabs/snippets.ts +36 -36
  329. package/lowcode/tag/meta.ts +6 -0
  330. package/lowcode/timeline/meta.ts +12 -3
  331. package/lowcode/timeline/snippets.ts +2 -0
  332. package/lowcode/timeline.item/meta.ts +1 -1
  333. package/package.json +30 -25
  334. package/dist/umd/materials.min.css +0 -1
  335. package/dist/umd/materials.min.js +0 -1
  336. package/dist/umd/static/DotsSix.57d66266.svg +0 -1
  337. package/dist/umd/static/arrow-left.e542294f.svg +0 -1
  338. package/dist/umd/static/arrow-right.763f03e0.svg +0 -1
  339. package/dist/umd/static/filter-lines.04a54ae9.svg +0 -1
  340. package/dist/umd/static/help-circle.31c9be40.svg +0 -1
  341. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +0 -1
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import './index.less';
3
2
  import { SortType } from './types';
4
3
  declare const DragSortTree: (props: SortType) => React.JSX.Element;
5
4
  export default DragSortTree;
@@ -13,7 +13,8 @@ import { DndContext, useSensor, useSensors, PointerSensor } from '@dnd-kit/core'
13
13
  import { SortableContext, verticalListSortingStrategy, arrayMove } from '@dnd-kit/sortable';
14
14
  import TreeItem from "./TreeItem";
15
15
  import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers';
16
- import "./index.less";
16
+ // import './index.less';
17
+
17
18
  var DragSortTree = function DragSortTree(props) {
18
19
  var value = props.value,
19
20
  rowKey = props.rowKey,
@@ -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://unpkg.com/@pisell/materials@3.0.37/iconfont/iconfont.js' // 在 iconfont.cn 上生成
5
+ scriptUrl: 'https://static.pisellcdn.com/pisell2iconfont.js' // 在 iconfont.cn 上生成
6
6
  });
7
7
 
8
8
  var IconFont = function IconFont(props) {
@@ -0,0 +1,2 @@
1
+ import PickerView from 'antd-mobile/es/components/picker-view';
2
+ export default PickerView;
@@ -0,0 +1,2 @@
1
+ import PickerView from 'antd-mobile/es/components/picker-view';
2
+ export default PickerView;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { AnchorProps } from 'antd';
3
+ import './index.less';
4
+ export interface PisellAnchorProps extends AnchorProps {
5
+ items: any[];
6
+ direction: 'horizontal' | 'vertical';
7
+ scrollNumber: number;
8
+ }
9
+ /**
10
+ * PisellAnchor锚点组件
11
+ * @param props
12
+ * @constructor
13
+ */
14
+ declare const PisellAnchor: (props: PisellAnchorProps) => React.JSX.Element;
15
+ export default PisellAnchor;
@@ -0,0 +1,114 @@
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
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ 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."); }
4
+ 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); }
5
+ 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; }
6
+ 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; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ import React, { useState } from 'react';
9
+ import { Anchor, Flex, Button } from 'antd';
10
+ import classNames from 'classnames';
11
+ import { useDebounceFn } from 'ahooks';
12
+ import { LeftOutlined, RightOutlined } from '@ant-design/icons';
13
+ import "./index.less";
14
+ /**
15
+ * PisellAnchor锚点组件
16
+ * @param props
17
+ * @constructor
18
+ */
19
+ var PisellAnchor = function PisellAnchor(props) {
20
+ console.log('%c [ props ]-21', 'font-size:13px; background:pink; color:#bf2c9f;', props);
21
+ var _useState = useState(true),
22
+ _useState2 = _slicedToArray(_useState, 2),
23
+ leftDisabled = _useState2[0],
24
+ setLeftDisabled = _useState2[1];
25
+ var _useState3 = useState(false),
26
+ _useState4 = _slicedToArray(_useState3, 2),
27
+ rightDisabled = _useState4[0],
28
+ setRightDisabled = _useState4[1];
29
+ var _props$items = props.items,
30
+ items = _props$items === void 0 ? [] : _props$items,
31
+ direction = props.direction,
32
+ _props$scrollNumber = props.scrollNumber,
33
+ scrollNumber = _props$scrollNumber === void 0 ? 1 : _props$scrollNumber;
34
+ var InnerProps = {
35
+ onChange: function onChange(key) {
36
+ console.log(key);
37
+ },
38
+ getCurrentAnchor: function getCurrentAnchor() {
39
+ if (items.length > 0) {
40
+ return items[0].href;
41
+ }
42
+ return '';
43
+ },
44
+ items: items
45
+ };
46
+ var itemsWidth = 0;
47
+ var containerWidth = 0;
48
+ // useEffect(() => {
49
+ // document.body.id = 'body';
50
+ // const itemsContainer = document.querySelector('.pisell-lowcode-anchor');
51
+ // if (itemsContainer) {
52
+ // itemsWidth = itemsContainer.offsetWidth;
53
+ // }
54
+ // if (srcollContainer) {
55
+ // containerWidth = srcollContainer.offsetWidth;
56
+ // setRightDisabled(containerWidth > itemsWidth);
57
+ // srcollContainer.addEventListener('scroll', debouncedScroll.run);
58
+ // return () => {
59
+ // srcollContainer.removeEventListener('scroll', debouncedScroll.run);
60
+ // };
61
+ // }
62
+ // }, []);
63
+
64
+ var handleScroll = function handleScroll(e) {
65
+ var left = e.target.scrollLeft;
66
+ console.log('滚动位置:', left);
67
+ setLeftDisabled(left === 0);
68
+ // setRightDisabled(containerWidth + left >= itemsWidth);
69
+ };
70
+
71
+ var debouncedScroll = useDebounceFn(handleScroll, {
72
+ wait: 1000
73
+ });
74
+ var scrollToAnchor = function scrollToAnchor(_ref) {
75
+ var direction = _ref.direction;
76
+ };
77
+ return /*#__PURE__*/React.createElement("div", {
78
+ className: classNames('pisell-anchor-wapper')
79
+ }, /*#__PURE__*/React.createElement(Anchor, _extends({
80
+ direction: "horizontal"
81
+ }, InnerProps)), /*#__PURE__*/React.createElement(Flex, {
82
+ className: 'pisell-anchor-control'
83
+ }, /*#__PURE__*/React.createElement(Button, {
84
+ icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
85
+ shape: "circle",
86
+ disabled: leftDisabled,
87
+ onClick: function onClick() {
88
+ return scrollToAnchor({
89
+ direction: 'left'
90
+ });
91
+ }
92
+ }), /*#__PURE__*/React.createElement(Button, {
93
+ icon: /*#__PURE__*/React.createElement(RightOutlined, null),
94
+ shape: "circle",
95
+ disabled: rightDisabled,
96
+ onClick: function onClick() {
97
+ return scrollToAnchor({
98
+ direction: 'right'
99
+ });
100
+ }
101
+ })), items.map(function (item) {
102
+ return /*#__PURE__*/React.createElement("div", {
103
+ id: "".concat(item.key),
104
+ className: classNames('pisell-anchor-content'),
105
+ style: {
106
+ width: '100vw',
107
+ height: '100vh',
108
+ textAlign: 'center',
109
+ background: 'rgba(0,255,0,0.02)'
110
+ }
111
+ }, "\u8FD9\u662F", item.title, "\u7684\u5185\u5BB9");
112
+ }));
113
+ };
114
+ export default PisellAnchor;
@@ -0,0 +1,98 @@
1
+ // .pisell-anchor-wapper {
2
+ // width: 100%;
3
+ // overflow: hidden;
4
+ // .pisell-anchor-control {
5
+ // display: flex;
6
+ // position: absolute;
7
+ // top: 0;
8
+ // right: 0;
9
+ // z-index: 10;
10
+ // }
11
+
12
+ // .pisell-lowcode-anchor-wrapper {
13
+ // position: relative;
14
+ // height: 48px;
15
+ // width: 500px;
16
+ // margin: 0 auto;
17
+ // overflow-x: auto;
18
+ // scroll-snap-type: x mandatory;
19
+ // scroll-behavior: smooth;
20
+ // overflow-y: hidden;
21
+
22
+ // &::-webkit-scrollbar {
23
+ // display: none;
24
+ // }
25
+ // &::after {
26
+ // position: absolute;
27
+ // right: 0;
28
+ // top: 0;
29
+ // content: '';
30
+ // display: inline-block;
31
+ // width: 64px;
32
+ // height: 44px;
33
+
34
+ // background: linear-gradient(to right, #0000, #fff);
35
+ // }
36
+ // .pisell-lowcode-anchor {
37
+ // height: 44px;
38
+ // background-color: #fff;
39
+ // width: max-content;
40
+ // display: inline-block;
41
+ // .pisell-lowcode-anchor-ink-visible {
42
+ // display: none;
43
+ // }
44
+ // .pisell-lowcode-anchor-link {
45
+ // scroll-snap-align: start;
46
+ // max-width: 200px;
47
+ // // overflow: hidden;
48
+ // text-overflow: ellipsis;
49
+ // display: inline-block;
50
+
51
+ // padding: 12px 16px;
52
+ // height: 44px;
53
+ // box-sizing: border-box;
54
+ // align-items: center;
55
+ // background-color: #fff;
56
+
57
+ // .pisell-lowcode-anchor-link-title {
58
+ // color: var(--Gray-900, #101828);
59
+
60
+ // /* Text md/Semibold */
61
+ // font-family: Inter;
62
+ // font-size: 16px;
63
+ // font-style: normal;
64
+ // font-weight: 600;
65
+ // line-height: 24px; /* 150% */
66
+ // &:active,
67
+ // &:hover,
68
+ // &:visited,
69
+ // &:link {
70
+ // text-decoration: none;
71
+ // }
72
+ // }
73
+
74
+ // &.pisell-lowcode-anchor-link-active {
75
+ // border-radius: 100px;
76
+ // background: var(--Primary-600, #7f56d9);
77
+ // .pisell-lowcode-anchor-link-title {
78
+ // color: var(--White, #fff);
79
+ // }
80
+ // }
81
+ // // &:hover {
82
+ // // border-radius: 88px;
83
+ // // background: var(--Gray-100, #f2f4f7);
84
+ // // }
85
+ // }
86
+ // .pisell-lowcode-anchor-link + .pisell-lowcode-anchor-link {
87
+ // margin-left: 12px;
88
+ // }
89
+ // }
90
+ // }
91
+ // .pisell-anchor-content {
92
+ // width: 100%;
93
+ // height: 300px;
94
+ // line-height: 300px;
95
+ // font-size: 30px;
96
+ // text-align: center;
97
+ // }
98
+ // }
@@ -11,7 +11,7 @@ import Iconfont from "../../iconfont";
11
11
  import "./index.less";
12
12
  import { getText } from "../../../locales";
13
13
  var PisellEntryInput = function PisellEntryInput(props) {
14
- var onChange = props.onChange,
14
+ var _onChange = props.onChange,
15
15
  searchDescribe = props.searchDescribe;
16
16
  var _useState = useState(''),
17
17
  _useState2 = _slicedToArray(_useState, 2),
@@ -25,7 +25,13 @@ var PisellEntryInput = function PisellEntryInput(props) {
25
25
  autoFocus: true,
26
26
  value: value,
27
27
  onChange: function onChange(e) {
28
- return setValue(e.target.value);
28
+ setValue(e.target.value);
29
+ if (!e.target.value) {
30
+ _onChange(e.target.value);
31
+ }
32
+ },
33
+ onPressEnter: function onPressEnter(e) {
34
+ _onChange(value);
29
35
  },
30
36
  style: {
31
37
  flex: 1
@@ -40,7 +46,7 @@ var PisellEntryInput = function PisellEntryInput(props) {
40
46
  }), /*#__PURE__*/React.createElement(Button, {
41
47
  size: "large",
42
48
  onClick: function onClick() {
43
- return onChange(value);
49
+ return _onChange(value);
44
50
  },
45
51
  disabled: !value
46
52
  }, getText('pisell-information-entry-input-search'))), /*#__PURE__*/React.createElement("div", {
@@ -1,3 +1,13 @@
1
1
  import { EntryModeType } from './index';
2
2
  export declare const entryModeTextIcon: Record<EntryModeType['type'], any>;
3
+ export declare const entryModeErrorTextIcon: {
4
+ scanner: {
5
+ icon: string;
6
+ text: string;
7
+ };
8
+ nfc: {
9
+ icon: string;
10
+ text: string;
11
+ };
12
+ };
3
13
  export declare const passiveModeType: string[];
@@ -16,6 +16,16 @@ export var entryModeTextIcon = {
16
16
  text: 'NFC ready'
17
17
  }
18
18
  };
19
+ export var entryModeErrorTextIcon = {
20
+ scanner: {
21
+ icon: 'pisell2-a-Scanner11',
22
+ text: 'Scanner'
23
+ },
24
+ nfc: {
25
+ icon: 'pisell2-a-NFC1',
26
+ text: 'NFC'
27
+ }
28
+ };
19
29
 
20
30
  // 没有操作界面的输入模式
21
31
  export var passiveModeType = ['scanner', 'nfc'];
@@ -0,0 +1,8 @@
1
+ declare type Peripherals = {
2
+ scanner: 'none' | 'connected' | 'disconnect';
3
+ nfc: 'none' | 'connected' | 'disconnect';
4
+ };
5
+ declare const useTerminalPeripherals: (onChange?: ((val: string) => void) | undefined) => {
6
+ peripheralsStatus: Peripherals;
7
+ };
8
+ export default useTerminalPeripherals;
@@ -0,0 +1,54 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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
+ 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
+ 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
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import { useEffect, useState } from 'react';
8
+ import useEngineContext from "../../../hooks/useEngineContext";
9
+ var useTerminalPeripherals = function useTerminalPeripherals(onChange) {
10
+ var _context$appHelper;
11
+ var context = useEngineContext();
12
+ var _ref = ((_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {},
13
+ interaction = _ref.interaction;
14
+ var _useState = useState({
15
+ scanner: 'none',
16
+ nfc: 'none'
17
+ }),
18
+ _useState2 = _slicedToArray(_useState, 2),
19
+ peripheralsStatus = _useState2[0],
20
+ setPeripheralsStatus = _useState2[1];
21
+ useEffect(function () {
22
+ var _interaction$utils, _interaction$utils$mo, _interaction$utils2, _interaction$utils2$p, _interaction$utils3, _interaction$utils3$m;
23
+ // 获取外部设备扫描结果
24
+ interaction === null || interaction === void 0 ? void 0 : (_interaction$utils = interaction.utils) === null || _interaction$utils === void 0 ? void 0 : (_interaction$utils$mo = _interaction$utils.mountFunction) === null || _interaction$utils$mo === void 0 ? void 0 : _interaction$utils$mo.call(_interaction$utils, 'global', 'peripheralsResult', function (strVal) {
25
+ try {
26
+ var _val = JSON.parse(strVal);
27
+ onChange === null || onChange === void 0 ? void 0 : onChange(_val.value);
28
+ } catch (err) {
29
+ console.error(err);
30
+ }
31
+ });
32
+
33
+ // 主动获取设备连接状态
34
+ interaction === null || interaction === void 0 ? void 0 : (_interaction$utils2 = interaction.utils) === null || _interaction$utils2 === void 0 ? void 0 : (_interaction$utils2$p = _interaction$utils2.postMessageToApp) === null || _interaction$utils2$p === void 0 ? void 0 : _interaction$utils2$p.call(_interaction$utils2, {
35
+ module: 'global',
36
+ key: 'get_peripherals_status',
37
+ data: {}
38
+ });
39
+
40
+ // 设备当前连接状态返回
41
+ interaction === null || interaction === void 0 ? void 0 : (_interaction$utils3 = interaction.utils) === null || _interaction$utils3 === void 0 ? void 0 : (_interaction$utils3$m = _interaction$utils3.mountFunction) === null || _interaction$utils3$m === void 0 ? void 0 : _interaction$utils3$m.call(_interaction$utils3, 'global', 'peripheralsStatus', function (strPeripherals) {
42
+ try {
43
+ var peripherals = JSON.parse(strPeripherals);
44
+ setPeripheralsStatus(peripherals);
45
+ } catch (err) {
46
+ console.error(err);
47
+ }
48
+ });
49
+ }, []);
50
+ return {
51
+ peripheralsStatus: peripheralsStatus
52
+ };
53
+ };
54
+ export default useTerminalPeripherals;
@@ -19,11 +19,12 @@ import classNames from 'classnames';
19
19
  import usePisellConfig from "../pisell-config-provider/hooks/usePisellConfig";
20
20
  import PisellCard from "../pisellCard";
21
21
  import Iconfont from "../iconfont";
22
- import { entryModeTextIcon, passiveModeType } from "./constants";
22
+ import { entryModeErrorTextIcon, entryModeTextIcon, passiveModeType } from "./constants";
23
23
  import Scan from "./Scan";
24
24
  import Button from "../button";
25
25
  import Input from "./Input";
26
26
  import { hasCamera } from "./utils";
27
+ import useTerminalPeripherals from "./hooks/useTerminalPeripherals";
27
28
  import "./index.less";
28
29
  var CardButton = function CardButton(props) {
29
30
  var icon = props.icon,
@@ -44,6 +45,8 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
44
45
  _useState2 = _slicedToArray(_useState, 2),
45
46
  currentType = _useState2[0],
46
47
  setCurrentType = _useState2[1];
48
+ var _useTerminalPeriphera = useTerminalPeripherals(onChange),
49
+ peripheralsStatus = _useTerminalPeriphera.peripheralsStatus;
47
50
 
48
51
  // 可用录入模式
49
52
  var _useState3 = useState(entryModes),
@@ -72,11 +75,20 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
72
75
  return item.type !== 'scanCode';
73
76
  });
74
77
  case 5:
78
+ available = available.filter(function (item) {
79
+ if (item.type === 'scanner') {
80
+ return peripheralsStatus.scanner !== 'none';
81
+ }
82
+ if (item.type === 'nfc') {
83
+ return peripheralsStatus.nfc !== 'none';
84
+ }
85
+ return true;
86
+ });
75
87
  if (available.length === 1) {
76
88
  setCurrentType(available[0].type);
77
89
  }
78
90
  setAvailableEntryModes(available);
79
- case 7:
91
+ case 8:
80
92
  case "end":
81
93
  return _context.stop();
82
94
  }
@@ -87,7 +99,7 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
87
99
  };
88
100
  }();
89
101
  getEntryModes();
90
- }, [entryModes]);
102
+ }, [entryModes, peripheralsStatus]);
91
103
  var handleChange = function handleChange(val) {
92
104
  onChange === null || onChange === void 0 ? void 0 : onChange(val);
93
105
  };
@@ -164,10 +176,15 @@ var PisellInformationEntry = function PisellInformationEntry(props) {
164
176
  className: "pisell-information-entry-modes"
165
177
  }, availableEntryModes.map(function (item) {
166
178
  var detail = entryModeTextIcon[item.type];
179
+ var icon = detail.icon;
180
+ if (['scanner', 'nfc'].includes(item.type)) {
181
+ var disconnect = entryModeErrorTextIcon[item.type];
182
+ icon = peripheralsStatus[item.type] === 'connected' ? detail.icon : disconnect.icon;
183
+ }
167
184
  return /*#__PURE__*/React.createElement(CardButton, {
168
185
  bordered: !passiveModeType.includes(item.type),
169
186
  icon: /*#__PURE__*/React.createElement(Iconfont, {
170
- type: detail.icon,
187
+ type: icon,
171
188
  className: "pisell-card-button-icon"
172
189
  }),
173
190
  className: classNames('pisell-information-entry-item', _defineProperty({}, 'pisell-entry-ready', passiveModeType.includes(item.type))),
@@ -23,7 +23,7 @@
23
23
  flex: 1;
24
24
  text-align: center;
25
25
  cursor: pointer;
26
- min-width: 165px;
26
+ min-width: 140px;
27
27
  .pisell-card-button-icon {
28
28
  height: 48px;
29
29
  font-size: 36px;
@@ -13,6 +13,8 @@ export interface PisellLoadingProps extends SpinProps {
13
13
  mask?: boolean | MaskType;
14
14
  /** 是否全屏 */
15
15
  fullscreen?: boolean;
16
+ /** 延迟显示加载效果的时间(防止闪烁) */
17
+ delay?: number;
16
18
  }
17
19
  declare const PisellLoading: (props: PisellLoadingProps) => React.JSX.Element;
18
20
  export default PisellLoading;
@@ -8,7 +8,8 @@ var PisellLoading = function PisellLoading(props) {
8
8
  var children = props.children,
9
9
  fullscreen = props.fullscreen,
10
10
  mask = props.mask,
11
- loading = props.loading;
11
+ loading = props.loading,
12
+ delay = props.delay;
12
13
  var ref = useRef(null);
13
14
  var _ref = mask || {},
14
15
  _ref$backgroundColor = _ref.backgroundColor,
@@ -32,6 +33,7 @@ var PisellLoading = function PisellLoading(props) {
32
33
  className: 'pisell-loading-wrapper'
33
34
  }, /*#__PURE__*/React.createElement(Spin, {
34
35
  fullscreen: fullscreen,
36
+ delay: delay,
35
37
  spinning: loading,
36
38
  indicator: /*#__PURE__*/React.createElement(IconFont, {
37
39
  type: 'pisell2-loader2',
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const PisellQrcode: React.FC;
4
+ export default PisellQrcode;
@@ -0,0 +1,75 @@
1
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+ 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
+ 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
+ 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
+ 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; } }
6
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
7
+ import React, { useEffect, useState, useRef } from 'react';
8
+ import { QRCode, Button, Divider } from 'antd';
9
+ import classNames from 'classnames';
10
+ import PisellModal from "./../pisellModal";
11
+ import "./index.less";
12
+ var qrcodeValue = 'https://www.baidu.com';
13
+ var PisellQrcode = function PisellQrcode(props) {
14
+ var size = props.size,
15
+ platform = props.platform; // 裁剪形状
16
+ var _useState = useState(false),
17
+ _useState2 = _slicedToArray(_useState, 2),
18
+ open = _useState2[0],
19
+ setOpen = _useState2[1];
20
+ var _React$useState = React.useState(0),
21
+ _React$useState2 = _slicedToArray(_React$useState, 2),
22
+ height = _React$useState2[0],
23
+ setHeight = _React$useState2[1];
24
+ useEffect(function () {
25
+ document.body.id = 'body';
26
+
27
+ // if (modalRef.current) {
28
+ // const elementHeight = modalRef.current?.clientHeight;
29
+ // setHeight(elementHeight);
30
+ // console.log('元素真实高度:', elementHeight);
31
+ // }
32
+ }, []);
33
+ var modalRef = useRef(null);
34
+ useEffect(function () {
35
+ if (open) {
36
+ console.log('%c [ modalRef ]-22', 'font-size:13px; background:pink; color:#bf2c9f;', modalRef);
37
+ }
38
+ }, [open]);
39
+ var modalProps = {
40
+ title: 'QR code',
41
+ platform: platform,
42
+ onCancel: function onCancel() {
43
+ return setOpen(false);
44
+ },
45
+ open: open,
46
+ footer: null,
47
+ mobileModalHeight: 'auto',
48
+ className: classNames('pisell-qrcode-modal'),
49
+ bodyStyle: {
50
+ padding: 0
51
+ }
52
+ };
53
+ return /*#__PURE__*/React.createElement("div", {
54
+ className: classNames('pisell-qrcode-wrapper')
55
+ }, /*#__PURE__*/React.createElement("div", {
56
+ onClick: function onClick() {
57
+ return setOpen(true);
58
+ }
59
+ }, /*#__PURE__*/React.createElement(QRCode, {
60
+ size: size,
61
+ value: qrcodeValue,
62
+ bordered: false
63
+ })), /*#__PURE__*/React.createElement(PisellModal, modalProps, /*#__PURE__*/React.createElement(QRCode, {
64
+ size: size,
65
+ value: qrcodeValue
66
+ }), /*#__PURE__*/React.createElement("p", {
67
+ className: classNames('pisell-qrcode-modal-value')
68
+ }, qrcodeValue), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(Button, {
69
+ onClick: function onClick() {
70
+ return setOpen(false);
71
+ },
72
+ className: classNames('pisell-qrcode-modal-button')
73
+ }, "Done")));
74
+ };
75
+ export default PisellQrcode;
@@ -0,0 +1,41 @@
1
+ .pisell-qrcode-wrapper {
2
+ }
3
+
4
+ .pisell-qrcode-modal {
5
+ .pisell-lowcode-modal-content {
6
+ padding: 0;
7
+ .pisell-lowcode-modal-body {
8
+ display: flex;
9
+ width: 100%;
10
+ align-items: center;
11
+ flex-direction: column;
12
+ .pisell-qrcode-modal-value {
13
+ color: var(--Gray-500, #667085);
14
+ font-family: Inter;
15
+ font-size: 14px;
16
+ font-style: normal;
17
+ font-weight: 400;
18
+ line-height: 20px;
19
+ margin: 20px 0 24px;
20
+ }
21
+ .pisell-lowcode-divider {
22
+ margin: 0;
23
+ }
24
+ .pisell-qrcode-modal-button {
25
+ margin: 24px;
26
+
27
+ color: var(--Base-White, #fff);
28
+
29
+ font-family: Inter;
30
+ font-size: 16px;
31
+ font-style: normal;
32
+ font-weight: 600;
33
+ line-height: 24px;
34
+
35
+ width: calc(100% - 48px);
36
+ box-sizing: border-box;
37
+ background-color: var(--theme-color, #7f56d9);
38
+ }
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import './index.less';
3
+ interface PisellStatisticProps {
4
+ title?: string;
5
+ number?: number;
6
+ hint?: React.ReactNode;
7
+ tags?: React.ReactNode;
8
+ }
9
+ declare const pisellStatistic: (props: PisellStatisticProps) => import("react").JSX.Element;
10
+ export default pisellStatistic;