@pisell/materials 3.3.85 → 3.3.86

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 (384) 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 +6 -6
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -21
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +21 -21
  11. package/es/components/Pagination/index.d.ts +4 -5
  12. package/es/components/Pagination/index.js +77 -59
  13. package/es/components/Pagination/index.less +13 -7
  14. package/es/components/PisellFields/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
  16. package/es/components/dataSourceComponents/fields/index.d.ts +2 -3
  17. package/es/components/filter/components/Dropdown/index.js +6 -2
  18. package/es/components/filter/components/FilterButton/index.js +19 -4
  19. package/es/components/filter/components/FilterButton/types.d.ts +8 -0
  20. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  21. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +90 -0
  22. package/es/components/filter/components/FilterItem/index.d.ts +3 -3
  23. package/es/components/filter/components/FilterItem/index.js +138 -7
  24. package/es/components/filter/components/FilterItem/index.less +90 -0
  25. package/es/components/filter/types.d.ts +4 -2
  26. package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +38 -29
  27. package/es/components/pisellCurrency/PisellCurrency.less +163 -25
  28. package/es/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  29. package/es/components/pisellCurrency/index.d.ts +2 -1
  30. package/es/components/pisellCurrency/index.js +16 -1
  31. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  32. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +30 -3
  33. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  34. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +68 -0
  35. package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  36. package/es/components/pisellDataSourceContainer/components/Table/index.js +5 -3
  37. package/es/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  38. package/es/components/pisellDataSourceContainer/components/Table/useColumns.js +37 -15
  39. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +21 -15
  40. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  41. package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +6 -4
  42. package/es/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  43. package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +15 -4
  44. package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  45. package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +4 -2
  46. package/es/components/pisellEmail/PisellEmail.less +119 -10
  47. package/es/components/pisellEmail/PisellEmail.stories.js +1 -1
  48. package/es/components/pisellEmail/index.d.ts +3 -1
  49. package/es/components/pisellEmail/index.js +17 -1
  50. package/es/components/pisellFilter/index.js +76 -10
  51. package/es/components/pisellFind/index.js +11 -2
  52. package/es/components/pisellGridPro/ToolBar/index.less +23 -0
  53. package/es/components/pisellGridPro/index.d.ts +4 -0
  54. package/es/components/pisellLongText/PisellLongText.less +72 -4
  55. package/es/components/pisellLongText/PisellLongText.stories.js +1 -1
  56. package/es/components/pisellLongText/index.d.ts +2 -1
  57. package/es/components/pisellLongText/index.js +16 -1
  58. package/es/components/pisellLookup/PisellLookup.js +18 -9
  59. package/es/components/pisellLookup/PisellLookup.less +39 -16
  60. package/es/components/pisellLookup/components/LookupTrigger.js +14 -4
  61. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  62. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  63. package/es/components/pisellMultipleSelect/components/EditView.js +8 -2
  64. package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  65. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +15 -11
  66. package/es/components/pisellMultipleSelect/index.d.ts +2 -1
  67. package/es/components/pisellMultipleSelect/index.js +16 -1
  68. package/es/components/pisellNumber/PisellNumber.less +135 -17
  69. package/es/components/pisellNumber/PisellNumber.stories.js +1 -1
  70. package/es/components/pisellNumber/index.d.ts +2 -1
  71. package/es/components/pisellNumber/index.js +16 -1
  72. package/es/components/pisellPercent/PisellPercent.less +142 -24
  73. package/es/components/pisellPercent/PisellPercent.stories.js +1 -1
  74. package/es/components/pisellPercent/index.d.ts +2 -1
  75. package/es/components/pisellPercent/index.js +16 -1
  76. package/es/components/pisellPhone/PisellPhone.less +122 -27
  77. package/es/components/pisellPhone/PisellPhone.stories.js +1 -1
  78. package/es/components/pisellPhone/components/EditView.js +1 -1
  79. package/es/components/pisellPhone/components/ReadOnlyView.js +15 -6
  80. package/es/components/pisellPhone/index.d.ts +2 -1
  81. package/es/components/pisellPhone/index.js +16 -1
  82. package/es/components/pisellRating/PisellRating.less +20 -12
  83. package/es/components/pisellRating/PisellRating.stories.js +1 -1
  84. package/es/components/pisellRating/index.d.ts +2 -1
  85. package/es/components/pisellRating/index.js +16 -1
  86. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  87. package/es/components/pisellRecordBoard/PisellRecordBoard.js +243 -0
  88. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  89. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +2358 -0
  90. package/es/components/pisellRecordBoard/context/RecordBoardContext.js +2 -0
  91. package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +13 -0
  92. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +29 -0
  93. package/es/components/pisellRecordBoard/index.d.ts +35 -0
  94. package/es/components/pisellRecordBoard/index.js +23 -0
  95. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +36 -0
  96. package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +20 -0
  97. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  98. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +242 -0
  99. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  100. package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  101. package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +20 -0
  102. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  103. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +90 -0
  104. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  105. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +138 -0
  106. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  107. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +66 -0
  108. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  109. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  110. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +66 -0
  111. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  112. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  113. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +41 -0
  114. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  115. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  116. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +215 -0
  117. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  118. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +77 -0
  119. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  120. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +65 -0
  121. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  122. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  123. package/es/components/pisellRecordBoard/shellFrame/index.js +104 -0
  124. package/es/components/pisellRecordBoard/types.js +1 -0
  125. package/es/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  126. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +508 -0
  127. package/es/components/pisellRecordBoard/utils/withRecordBoard.js +27 -0
  128. package/es/components/pisellShellFrame/PisellShellFrame.js +107 -0
  129. package/es/components/pisellShellFrame/PisellShellFrame.less +78 -0
  130. package/es/components/pisellShellFrame/PisellShellFrame.stories.js +195 -0
  131. package/es/components/pisellShellFrame/index.js +1 -0
  132. package/es/components/pisellShellFrame/types.js +1 -0
  133. package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  134. package/es/components/pisellSingleLineText/index.d.ts +2 -1
  135. package/es/components/pisellSingleLineText/index.js +16 -1
  136. package/es/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  137. package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  138. package/es/components/pisellSingleSelect/components/EditView.js +8 -2
  139. package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  140. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +10 -6
  141. package/es/components/pisellSingleSelect/index.d.ts +2 -1
  142. package/es/components/pisellSingleSelect/index.js +16 -1
  143. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -3
  144. package/es/components/pisellUrl/PisellUrl.less +120 -11
  145. package/es/components/pisellUrl/PisellUrl.stories.js +1 -1
  146. package/es/components/pisellUrl/index.d.ts +3 -1
  147. package/es/components/pisellUrl/index.js +17 -1
  148. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  149. package/es/components/select/index.less +18 -2
  150. package/es/components/sort/index.js +25 -3
  151. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  152. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  153. package/es/components/table/Table/utils.d.ts +1 -1
  154. package/es/index.d.ts +6 -2
  155. package/es/index.js +2 -0
  156. package/es/locales/en-US.d.ts +36 -0
  157. package/es/locales/en-US.js +50 -2
  158. package/es/locales/index.js +2 -2
  159. package/es/locales/ja.d.ts +2 -0
  160. package/es/locales/ja.js +2 -0
  161. package/es/locales/pt.d.ts +2 -0
  162. package/es/locales/pt.js +2 -0
  163. package/es/locales/zh-CN.d.ts +36 -0
  164. package/es/locales/zh-CN.js +54 -6
  165. package/es/locales/zh-TW.d.ts +36 -0
  166. package/es/locales/zh-TW.js +54 -6
  167. package/es/utils/tagColor.js +39 -0
  168. package/lib/components/Pagination/index.d.ts +4 -5
  169. package/lib/components/Pagination/index.js +44 -21
  170. package/lib/components/Pagination/index.less +13 -7
  171. package/lib/components/PisellFields/index.d.ts +2 -2
  172. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
  173. package/lib/components/dataSourceComponents/fields/index.d.ts +2 -3
  174. package/lib/components/filter/components/Dropdown/index.js +9 -2
  175. package/lib/components/filter/components/FilterButton/index.js +14 -3
  176. package/lib/components/filter/components/FilterButton/types.d.ts +8 -0
  177. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  178. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
  179. package/lib/components/filter/components/FilterItem/index.d.ts +3 -3
  180. package/lib/components/filter/components/FilterItem/index.js +133 -4
  181. package/lib/components/filter/components/FilterItem/index.less +90 -0
  182. package/lib/components/filter/types.d.ts +4 -2
  183. package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -23
  184. package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
  185. package/lib/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  186. package/lib/components/pisellCurrency/index.d.ts +2 -1
  187. package/lib/components/pisellCurrency/index.js +7 -0
  188. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  189. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +18 -2
  190. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  191. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +81 -0
  192. package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  193. package/lib/components/pisellDataSourceContainer/components/Table/index.js +3 -1
  194. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  195. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.js +25 -14
  196. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +17 -11
  197. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  198. package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +7 -1
  199. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  200. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +10 -2
  201. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  202. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +2 -1
  203. package/lib/components/pisellEmail/PisellEmail.less +119 -10
  204. package/lib/components/pisellEmail/PisellEmail.stories.js +1 -1
  205. package/lib/components/pisellEmail/index.d.ts +3 -1
  206. package/lib/components/pisellEmail/index.js +10 -2
  207. package/lib/components/pisellFilter/index.js +79 -8
  208. package/lib/components/pisellFind/index.js +11 -2
  209. package/lib/components/pisellGridPro/ToolBar/index.less +23 -0
  210. package/lib/components/pisellGridPro/index.d.ts +4 -0
  211. package/lib/components/pisellLongText/PisellLongText.less +72 -4
  212. package/lib/components/pisellLongText/PisellLongText.stories.js +1 -1
  213. package/lib/components/pisellLongText/index.d.ts +2 -1
  214. package/lib/components/pisellLongText/index.js +7 -0
  215. package/lib/components/pisellLookup/PisellLookup.js +12 -6
  216. package/lib/components/pisellLookup/PisellLookup.less +39 -16
  217. package/lib/components/pisellLookup/components/LookupTrigger.js +9 -3
  218. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  219. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  220. package/lib/components/pisellMultipleSelect/components/EditView.js +4 -1
  221. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  222. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +29 -1
  223. package/lib/components/pisellMultipleSelect/index.d.ts +2 -1
  224. package/lib/components/pisellMultipleSelect/index.js +7 -0
  225. package/lib/components/pisellNumber/PisellNumber.less +135 -17
  226. package/lib/components/pisellNumber/PisellNumber.stories.js +1 -1
  227. package/lib/components/pisellNumber/index.d.ts +2 -1
  228. package/lib/components/pisellNumber/index.js +7 -0
  229. package/lib/components/pisellPercent/PisellPercent.less +142 -24
  230. package/lib/components/pisellPercent/PisellPercent.stories.js +1 -1
  231. package/lib/components/pisellPercent/index.d.ts +2 -1
  232. package/lib/components/pisellPercent/index.js +7 -0
  233. package/lib/components/pisellPhone/PisellPhone.less +122 -27
  234. package/lib/components/pisellPhone/PisellPhone.stories.js +1 -1
  235. package/lib/components/pisellPhone/components/EditView.js +1 -1
  236. package/lib/components/pisellPhone/components/ReadOnlyView.js +18 -4
  237. package/lib/components/pisellPhone/index.d.ts +2 -1
  238. package/lib/components/pisellPhone/index.js +7 -0
  239. package/lib/components/pisellRating/PisellRating.less +20 -12
  240. package/lib/components/pisellRating/PisellRating.stories.js +1 -1
  241. package/lib/components/pisellRating/index.d.ts +2 -1
  242. package/lib/components/pisellRating/index.js +7 -0
  243. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  244. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +263 -0
  245. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  246. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +1673 -0
  247. package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +30 -0
  248. package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +46 -0
  249. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +47 -0
  250. package/lib/components/pisellRecordBoard/index.d.ts +35 -0
  251. package/lib/components/pisellRecordBoard/index.js +59 -0
  252. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +46 -0
  253. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +46 -0
  254. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  255. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +264 -0
  256. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  257. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  258. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +46 -0
  259. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  260. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +108 -0
  261. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  262. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +173 -0
  263. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  264. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +100 -0
  265. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  266. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  267. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +90 -0
  268. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  269. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  270. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +53 -0
  271. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  272. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  273. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +247 -0
  274. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  275. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +93 -0
  276. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  277. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +85 -0
  278. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  279. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  280. package/lib/components/pisellRecordBoard/shellFrame/index.js +137 -0
  281. package/lib/components/pisellRecordBoard/types.js +17 -0
  282. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  283. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +365 -0
  284. package/lib/components/pisellRecordBoard/utils/withRecordBoard.js +49 -0
  285. package/lib/components/pisellShellFrame/PisellShellFrame.js +113 -0
  286. package/lib/components/pisellShellFrame/PisellShellFrame.less +78 -0
  287. package/lib/components/pisellShellFrame/PisellShellFrame.stories.js +129 -0
  288. package/lib/components/pisellShellFrame/index.js +40 -0
  289. package/lib/components/pisellShellFrame/types.js +17 -0
  290. package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  291. package/lib/components/pisellSingleLineText/index.d.ts +2 -1
  292. package/lib/components/pisellSingleLineText/index.js +7 -0
  293. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  294. package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  295. package/lib/components/pisellSingleSelect/components/EditView.js +4 -1
  296. package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  297. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +12 -9
  298. package/lib/components/pisellSingleSelect/index.d.ts +2 -1
  299. package/lib/components/pisellSingleSelect/index.js +7 -0
  300. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -2
  301. package/lib/components/pisellUrl/PisellUrl.less +120 -11
  302. package/lib/components/pisellUrl/PisellUrl.stories.js +1 -1
  303. package/lib/components/pisellUrl/index.d.ts +3 -1
  304. package/lib/components/pisellUrl/index.js +10 -2
  305. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  306. package/lib/components/select/index.less +18 -2
  307. package/lib/components/sort/index.js +13 -3
  308. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  309. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  310. package/lib/components/table/Table/utils.d.ts +1 -1
  311. package/lib/index.d.ts +6 -2
  312. package/lib/index.js +6 -0
  313. package/lib/locales/en-US.d.ts +36 -0
  314. package/lib/locales/en-US.js +42 -2
  315. package/lib/locales/index.js +2 -2
  316. package/lib/locales/ja.d.ts +2 -0
  317. package/lib/locales/ja.js +2 -0
  318. package/lib/locales/pt.d.ts +2 -0
  319. package/lib/locales/pt.js +2 -0
  320. package/lib/locales/zh-CN.d.ts +36 -0
  321. package/lib/locales/zh-CN.js +46 -6
  322. package/lib/locales/zh-TW.d.ts +36 -0
  323. package/lib/locales/zh-TW.js +46 -6
  324. package/lib/utils/tagColor.js +60 -0
  325. package/lowcode/auto-resize-text/meta.ts +1 -1
  326. package/package.json +3 -3
  327. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  328. package/es/components/PisellProcedure/index.d.ts +0 -5
  329. package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
  330. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  331. package/es/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  332. package/es/components/pisellDateTimeDisplay/types.d.ts +0 -347
  333. package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  334. package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  335. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  336. package/es/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  337. package/es/components/pisellLookup/components/HotWords.d.ts +0 -7
  338. package/es/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  339. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  340. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  341. package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  342. package/es/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  343. package/es/components/pisellLookup/components/index.d.ts +0 -9
  344. package/es/components/pisellLookup/hooks/index.d.ts +0 -6
  345. package/es/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  346. package/es/components/pisellLookup/index.d.ts +0 -6
  347. package/es/components/pisellLookup/types.d.ts +0 -666
  348. package/es/components/pisellLookup/utils/index.d.ts +0 -5
  349. package/es/components/pisellLookup/utils/trigger.d.ts +0 -42
  350. package/es/components/pisellSort/type.d.ts +0 -7
  351. package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  352. package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  353. package/es/components/sort/types.d.ts +0 -20
  354. package/es/components/virtualInput/index.d.ts +0 -29
  355. package/es/hooks/useThemeTokens.d.ts +0 -7
  356. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  357. package/lib/components/PisellProcedure/index.d.ts +0 -5
  358. package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
  359. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  360. package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  361. package/lib/components/pisellDateTimeDisplay/types.d.ts +0 -347
  362. package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  363. package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  364. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  365. package/lib/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  366. package/lib/components/pisellLookup/components/HotWords.d.ts +0 -7
  367. package/lib/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  368. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  369. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  370. package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  371. package/lib/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  372. package/lib/components/pisellLookup/components/index.d.ts +0 -9
  373. package/lib/components/pisellLookup/hooks/index.d.ts +0 -6
  374. package/lib/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  375. package/lib/components/pisellLookup/index.d.ts +0 -6
  376. package/lib/components/pisellLookup/types.d.ts +0 -666
  377. package/lib/components/pisellLookup/utils/index.d.ts +0 -5
  378. package/lib/components/pisellLookup/utils/trigger.d.ts +0 -42
  379. package/lib/components/pisellSort/type.d.ts +0 -7
  380. package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  381. package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  382. package/lib/components/sort/types.d.ts +0 -20
  383. package/lib/components/virtualInput/index.d.ts +0 -29
  384. package/lib/hooks/useThemeTokens.d.ts +0 -7
@@ -1,14 +1,13 @@
1
- import React from "react";
2
- import { PaginationProps } from "antd";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { PaginationProps } from 'antd';
3
+ import './index.less';
4
+ declare const Pagination: (props: PaginationProps) => React.JSX.Element | null;
4
5
  export declare const paginationConfig: {
5
6
  className: string;
6
7
  defaultCurrent: number;
7
8
  showTotal: (total: number, range: [number, number]) => string;
8
- itemRender: (page: number, type: "page" | "next" | "prev" | "jump-prev" | "jump-next", element: React.ReactNode) => React.ReactNode;
9
9
  responsive: boolean;
10
10
  size: string;
11
11
  };
12
- declare const Pagination: (props: PaginationProps) => React.JSX.Element | null;
13
12
  export default Pagination;
14
13
  export declare const FormPagination: ({ value, onChange, page, pageSize, ...other }: any) => React.JSX.Element;
@@ -8,74 +8,89 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
8
  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; }
9
9
  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; }
10
10
  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); }
11
- import React, { useEffect, useMemo, useState } from "react";
11
+ import React, { useEffect, useMemo, useState } from 'react';
12
12
  // import { ArrowLeft, ArrowRight } from "@pisell/icon/es";
13
- import ArrowRight from "@pisell/icon/es/ArrowRight";
14
- import ArrowLeft from "@pisell/icon/es/ArrowLeft";
15
- import { Pagination as OriginPagination } from "antd";
16
- import classNames from "classnames";
13
+ import ArrowRight from '@pisell/icon/es/ArrowRight';
14
+ import ArrowLeft from '@pisell/icon/es/ArrowLeft';
15
+ import { Pagination as OriginPagination } from 'antd';
16
+ import classNames from 'classnames';
17
17
  import "./index.less";
18
+ import { locales as utilsLocales } from '@pisell/utils';
18
19
  import { getText } from "../../locales";
19
20
  import useIsMobileTable from "../table/hooks/useIsMobileTable";
20
-
21
- /**
22
- * @title: 自定义渲染
23
- * @description:
24
- * @return {*}
25
- * @Author: zhiwei.Wang
26
- * @Date: 2023-07-20 17:01
27
- */
28
- var itemRender = function itemRender(_, type, originalElement) {
29
- if (type === "prev") {
30
- return /*#__PURE__*/React.createElement("div", {
31
- className: classNames("paginator-page-btn", "left")
32
- }, /*#__PURE__*/React.createElement(ArrowLeft, {
33
- className: "paginator-page-btn-left-icon"
34
- }), /*#__PURE__*/React.createElement("span", {
35
- className: "paginator-page-btn-text"
36
- }, getText("table-pagination-previous")));
37
- }
38
- if (type === "next") {
39
- return /*#__PURE__*/React.createElement("div", {
40
- className: classNames("paginator-page-btn", "right")
41
- }, /*#__PURE__*/React.createElement("span", {
42
- className: "paginator-page-btn-text"
43
- }, getText("table-pagination-next")), /*#__PURE__*/React.createElement(ArrowRight, {
44
- className: "paginator-page-btn-right-icon"
45
- }));
46
- }
47
- return originalElement;
48
- };
49
-
50
- // 分页配置
51
- export var paginationConfig = {
52
- className: "materials-grid-paginator",
53
- defaultCurrent: 1,
54
- showTotal: function showTotal(total, range) {
55
- return "Page ".concat(range[0], " of ").concat(range[1]);
56
- },
57
- itemRender: itemRender,
58
- responsive: true,
59
- size: "small"
60
- };
21
+ /** 优先 utils;若 utils 返回 key(未命中)则用 materials RecordBoard 再回退 table-pagination-* */
22
+ function getPaginationText(key) {
23
+ var _getText;
24
+ var fullKey = "pisell2.salesManagement.pagination.".concat(key);
25
+ var fromUtils = utilsLocales.getText(fullKey);
26
+ if (fromUtils !== fullKey) return fromUtils;
27
+ return (_getText = getText(fullKey)) !== null && _getText !== void 0 ? _getText : getText("table-pagination-".concat(key));
28
+ }
61
29
  var Pagination = function Pagination(props) {
62
30
  var show = useMemo(function () {
63
31
  return Object.keys(props).length;
64
32
  }, [props]);
65
33
  var isMiniPagination = useIsMobileTable();
34
+ var effectiveConfig = useMemo(function () {
35
+ var prevText = getPaginationText('previous');
36
+ var nextText = getPaginationText('next');
37
+ var showTotalFn = getPaginationText('showTotal');
38
+ var itemRenderFn = function itemRenderFn(_, type, originalElement) {
39
+ if (type === 'prev') {
40
+ return /*#__PURE__*/React.createElement("div", {
41
+ className: classNames('paginator-page-btn', 'left')
42
+ }, /*#__PURE__*/React.createElement(ArrowLeft, {
43
+ className: 'paginator-page-btn-left-icon'
44
+ }), /*#__PURE__*/React.createElement("span", {
45
+ className: 'paginator-page-btn-text'
46
+ }, prevText));
47
+ }
48
+ if (type === 'next') {
49
+ return /*#__PURE__*/React.createElement("div", {
50
+ className: classNames('paginator-page-btn', 'right')
51
+ }, /*#__PURE__*/React.createElement("span", {
52
+ className: 'paginator-page-btn-text'
53
+ }, nextText), /*#__PURE__*/React.createElement(ArrowRight, {
54
+ className: 'paginator-page-btn-right-icon'
55
+ }));
56
+ }
57
+ return originalElement;
58
+ };
59
+ var showTotal = typeof showTotalFn === 'function' ? function (total, range) {
60
+ return showTotalFn(range[0], range[1]);
61
+ } : function (total, range) {
62
+ return "Page ".concat(range[0], " of ").concat(range[1]);
63
+ };
64
+ return {
65
+ className: 'materials-grid-paginator',
66
+ defaultCurrent: 1,
67
+ showTotal: showTotal,
68
+ itemRender: itemRenderFn,
69
+ responsive: true,
70
+ size: 'small'
71
+ };
72
+ }, []);
66
73
  var content = useMemo(function () {
67
74
  if (!show) {
68
75
  return null;
69
76
  }
70
77
  var Com = OriginPagination;
71
- // 移动端使用简单分页
72
78
  if (isMiniPagination) {
73
79
  Com = MiniPagination;
74
80
  }
75
- return /*#__PURE__*/React.createElement(Com, _extends({}, paginationConfig, props));
76
- }, [show, paginationConfig, props, isMiniPagination]);
81
+ return /*#__PURE__*/React.createElement(Com, _extends({}, effectiveConfig, props));
82
+ }, [show, effectiveConfig, props, isMiniPagination]);
77
83
  return content;
78
84
  };
85
+ export var paginationConfig = {
86
+ className: 'materials-grid-paginator',
87
+ defaultCurrent: 1,
88
+ showTotal: function showTotal(total, range) {
89
+ return "Page ".concat(range[0], " of ").concat(range[1]);
90
+ },
91
+ responsive: true,
92
+ size: 'small'
93
+ };
79
94
  export default Pagination;
80
95
  var MiniPagination = function MiniPagination(props) {
81
96
  var _props$current = props.current,
@@ -105,44 +120,47 @@ var MiniPagination = function MiniPagination(props) {
105
120
  */
106
121
  var onChange = function onChange(type) {
107
122
  var currentPage = current;
108
- if (type === "prev") {
123
+ if (type === 'prev') {
109
124
  currentPage = current - 1;
110
125
  }
111
- if (type === "next") {
126
+ if (type === 'next') {
112
127
  currentPage = current + 1;
113
128
  }
114
129
  props.onChange && props.onChange(currentPage, pageSize || 10);
115
130
  };
116
131
  return /*#__PURE__*/React.createElement("div", {
117
- className: "materials-grid-paginator materials-grid-paginator-mini"
132
+ className: "materials-grid-paginator"
118
133
  }, /*#__PURE__*/React.createElement("div", {
119
134
  className: "pisell-lowcode-pagination-prev",
120
135
  onClick: function onClick() {
121
136
  if (current <= MIN) {
122
137
  return;
123
138
  }
124
- onChange("prev");
139
+ onChange('prev');
125
140
  }
126
141
  }, /*#__PURE__*/React.createElement("div", {
127
- className: classNames("paginator-page-btn", "left")
142
+ className: classNames('paginator-page-btn', 'left')
128
143
  }, /*#__PURE__*/React.createElement(ArrowLeft, {
129
- className: "paginator-page-btn-left-icon"
144
+ className: 'paginator-page-btn-left-icon'
130
145
  }))), /*#__PURE__*/React.createElement("div", {
131
146
  className: "materials-grid-paginator-center"
132
147
  }, /*#__PURE__*/React.createElement("span", {
133
148
  className: "materials-grid-paginator-center-text"
134
- }, getText("table-pagination-total")(current, MAX))), /*#__PURE__*/React.createElement("div", {
149
+ }, function () {
150
+ var totalFn = getPaginationText('total');
151
+ return typeof totalFn === 'function' ? totalFn(current, MAX) : "".concat(current, " / ").concat(MAX);
152
+ }())), /*#__PURE__*/React.createElement("div", {
135
153
  className: "pisell-lowcode-pagination-next",
136
154
  onClick: function onClick() {
137
155
  if (current >= MAX) {
138
156
  return;
139
157
  }
140
- onChange("next");
158
+ onChange('next');
141
159
  }
142
160
  }, /*#__PURE__*/React.createElement("div", {
143
- className: classNames("paginator-page-btn", "right")
161
+ className: classNames('paginator-page-btn', 'right')
144
162
  }, /*#__PURE__*/React.createElement(ArrowRight, {
145
- className: "paginator-page-btn-right-icon"
163
+ className: 'paginator-page-btn-right-icon'
146
164
  }))));
147
165
  };
148
166
  export var FormPagination = function FormPagination(_ref) {
@@ -24,7 +24,6 @@
24
24
 
25
25
  .pisell-lowcode-pagination-item {
26
26
  position: relative;
27
- border: none;
28
27
  margin: 0;
29
28
  border-radius: 0;
30
29
  border: 1px solid #D0D5DD;
@@ -36,6 +35,7 @@
36
35
  margin: 0;
37
36
  border-radius: 0;
38
37
  border-right: none;
38
+ height: 100%;
39
39
  }
40
40
 
41
41
  .pisell-lowcode-pagination-jump-next {
@@ -45,22 +45,28 @@
45
45
  border-right: none;
46
46
  }
47
47
 
48
- .pisell-lowcode-pagination-item-link:hover {
49
- font-weight: 450 !important;
50
- color: rgba(0, 0, 0, 0.88) !important;
48
+ .pisell-lowcode-pagination-item-link {
49
+ width: 100%;
51
50
 
52
- .pisell-lowcode-pagination-item-link-icon {
51
+ &:hover {
53
52
  font-weight: 450 !important;
54
53
  color: rgba(0, 0, 0, 0.88) !important;
54
+
55
+ .pisell-lowcode-pagination-item-link-icon {
56
+ font-weight: 450 !important;
57
+ color: rgba(0, 0, 0, 0.88) !important;
58
+ }
55
59
  }
56
60
  }
57
61
 
62
+
58
63
  .pisell-lowcode-pagination-disabled {
59
64
  cursor: not-allowed;
60
- color: rgba(0,0,0,.25);
65
+ color: rgba(0, 0, 0, .25);
66
+
61
67
  .paginator-page-btn {
62
68
  cursor: not-allowed;
63
- color: rgba(0,0,0,.25);
69
+ color: rgba(0, 0, 0, .25);
64
70
  }
65
71
  }
66
72
 
@@ -17,8 +17,8 @@ declare const PisellFields: {
17
17
  Currency: import("react").NamedExoticComponent<import("../pisellCurrency").PisellCurrencyProps>;
18
18
  Percent: import("react").NamedExoticComponent<import("../pisellPercent").PisellPercentProps>;
19
19
  Phone: import("react").NamedExoticComponent<import("../pisellPhone").PisellPhoneProps>;
20
- Email: import("react").FC<import("../pisellEmail").PisellEmailProps>;
21
- Url: import("react").FC<import("../pisellUrl").PisellUrlProps>;
20
+ Email: import("react").NamedExoticComponent<import("../pisellEmail").PisellEmailProps>;
21
+ Url: import("react").NamedExoticComponent<import("../pisellUrl").PisellUrlProps>;
22
22
  Rating: import("react").NamedExoticComponent<import("../pisellRating").PisellRatingProps>;
23
23
  SingleSelect: import("react").ForwardRefExoticComponent<import("../pisellSingleSelect").PisellSingleSelectProps<string | number> & import("react").RefAttributes<import("../pisellSingleSelect").SingleSelectRef<string | number>>>;
24
24
  MultipleSelect: import("react").ForwardRefExoticComponent<import("../pisellMultipleSelect").PisellMultipleSelectProps<string | number> & import("react").RefAttributes<import("../pisellMultipleSelect").MultipleSelectRef<string | number>>>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const useDrawerState: (operationContent?: {
3
2
  [key: string]: import("react").ReactNode;
4
3
  } | undefined) => any;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  declare const formFieldMap: {
3
2
  FormItemCheckbox: import("react").FC<{}> & {
4
3
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -61,7 +60,7 @@ declare const formFieldMap: {
61
60
  FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
62
61
  FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
63
62
  };
64
- declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | (import("react").FC<{}> & {
63
+ declare const getFieldComponent: (fieldComponent: string) => (import("react").FC<{}> & {
65
64
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
66
65
  } & {
67
66
  Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
@@ -98,7 +97,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
98
97
  } & {
99
98
  dataSource?: any;
100
99
  extraParams?: Record<string, any> | undefined;
101
- }) => import("react").JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
100
+ }) => import("react").JSX.Element) | import("react").FC<any> | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
102
101
  onChange: (value: string) => void;
103
102
  } & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
104
103
  export { getFieldComponent, formFieldMap };
@@ -77,6 +77,10 @@ var Dropdown = function Dropdown(props) {
77
77
  quickFilter: getText('table-action-filter-quick-filter-tip'),
78
78
  otherFilter: getText('table-action-filter-other-filter-tip')
79
79
  };
80
+ var getTooltipTitle = useCallback(function (id) {
81
+ var fn = tooltipMap[id];
82
+ return typeof fn === 'function' ? fn(quickFilterMaxLength) : fn;
83
+ }, [quickFilterMaxLength]);
80
84
  var renderContainer = useCallback(function (_ref) {
81
85
  var children = _ref.children,
82
86
  ref = _ref.ref,
@@ -88,14 +92,14 @@ var Dropdown = function Dropdown(props) {
88
92
  }, /*#__PURE__*/React.createElement("span", {
89
93
  className: "filter-dropdown-container-title"
90
94
  }, titleMap[id]), /*#__PURE__*/React.createElement(Tooltip, {
91
- title: tooltipMap[id](quickFilterMaxLength)
95
+ title: getTooltipTitle(id)
92
96
  }, /*#__PURE__*/React.createElement(HelpCircle, {
93
97
  className: "filter-dropdown-container-icon-help"
94
98
  }))), /*#__PURE__*/React.createElement("div", {
95
99
  ref: ref,
96
100
  className: "filter-dropdown-container-filter-wrap"
97
101
  }, children));
98
- }, [quickFilterMaxLength]);
102
+ }, [quickFilterMaxLength, getTooltipTitle]);
99
103
  return /*#__PURE__*/React.createElement("div", {
100
104
  className: "filter-dropdown-wrap"
101
105
  }, /*#__PURE__*/React.createElement("div", {
@@ -13,9 +13,19 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
13
  import React, { useMemo, useRef, useState } from 'react';
14
14
  import { Button, Popover } from 'antd';
15
15
  import FilterLines from '@pisell/icon/es/FilterLines';
16
+ import { locales as utilsLocales } from '@pisell/utils';
16
17
  import Dropdown from "../Dropdown";
17
18
  import { getText } from "../../../../locales";
18
19
  import { isMobile } from "../../../../utils/platform";
20
+
21
+ /** 与 Quick Filter 同源:优先 utils,若 utils 返回 key(未命中)则用 materials RecordBoard 再回退 table-action */
22
+ function getFilterButtonLabel(buttonText) {
23
+ if (buttonText != null && buttonText !== '') return buttonText;
24
+ var key = 'pisell2.recordBoard.toolbar.filter';
25
+ var fromUtils = utilsLocales.getText(key);
26
+ if (fromUtils && fromUtils !== key) return fromUtils;
27
+ return getText(key) || getText('table-action-filter-button');
28
+ }
19
29
  var Filter = function Filter(_ref) {
20
30
  var value = _ref.value,
21
31
  hiddenQuickFilter = _ref.hiddenQuickFilter,
@@ -24,7 +34,11 @@ var Filter = function Filter(_ref) {
24
34
  quickFilterMaxLength = _ref.quickFilterMaxLength,
25
35
  formFiltersPrefix = _ref.formFiltersPrefix,
26
36
  renderItem = _ref.renderItem,
27
- placement = _ref.placement;
37
+ placement = _ref.placement,
38
+ _ref$size = _ref.size,
39
+ size = _ref$size === void 0 ? 'large' : _ref$size,
40
+ buttonClassName = _ref.buttonClassName,
41
+ buttonText = _ref.buttonText;
28
42
  var ref = useRef(null);
29
43
  var _useState = useState(false),
30
44
  _useState2 = _slicedToArray(_useState, 2),
@@ -83,10 +97,11 @@ var Filter = function Filter(_ref) {
83
97
  }
84
98
  setOpen(visible);
85
99
  },
86
- placement: placement
100
+ placement: placement !== null && placement !== void 0 ? placement : 'bottom'
87
101
  }, /*#__PURE__*/React.createElement(Button, {
102
+ className: buttonClassName,
88
103
  icon: /*#__PURE__*/React.createElement(FilterLines, null),
89
- size: "large"
90
- }, isMobileBool ? null : getText('table-action-filter-button'))));
104
+ size: size
105
+ }, isMobileBool ? null : getFilterButtonLabel(buttonText))));
91
106
  };
92
107
  export default Filter;
@@ -3,6 +3,8 @@ import { FilterItemProps } from '../../types';
3
3
  export declare type FilterValueType = {
4
4
  quickFilter: FilterItemProps[];
5
5
  otherFilter: FilterItemProps[];
6
+ /** 筛选项表单值,字段名 -> 值,与 Form 的 values 一致 */
7
+ values?: Record<string, any>;
6
8
  };
7
9
  export declare type FilterListProps = {
8
10
  value?: FilterValueType;
@@ -13,4 +15,10 @@ export declare type FilterListProps = {
13
15
  formFiltersPrefix: string;
14
16
  renderItem?: (item: any, otherProps?: any) => React.ReactNode;
15
17
  placement?: 'top' | 'left' | 'right' | 'bottom' | 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight' | 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom';
18
+ /** 筛选按钮尺寸,与 antd Button size 一致 */
19
+ size?: 'small' | 'middle' | 'large';
20
+ /** 筛选触发按钮的 className,用于定制样式(如与设计系统对齐) */
21
+ buttonClassName?: string;
22
+ /** 筛选按钮文案,不传则使用 materials 内置多语言 */
23
+ buttonText?: string;
16
24
  };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * 筛选项中 singleSelect/multipleSelect 的异步 options 包装器。
3
+ * 当列配置传入 getOptions(同步或异步)时,先解析再渲染 PisellSingleSelect/PisellMultipleSelect。
4
+ */
5
+ import React from 'react';
6
+ export declare type GetOptionsFn = (() => {
7
+ label: string;
8
+ value: any;
9
+ }[]) | (() => Promise<{
10
+ label: string;
11
+ value: any;
12
+ }[]>);
13
+ export interface AsyncOptionsSelectWrapperProps {
14
+ getOptions: GetOptionsFn;
15
+ fieldType: 'singleSelect' | 'multipleSelect';
16
+ value?: any;
17
+ onChange?: (value: any, option?: any) => void;
18
+ [key: string]: any;
19
+ }
20
+ declare const AsyncOptionsSelectWrapper: React.FC<AsyncOptionsSelectWrapperProps>;
21
+ export default AsyncOptionsSelectWrapper;
@@ -0,0 +1,90 @@
1
+ var _excluded = ["getOptions", "fieldType", "value", "onChange"];
2
+ 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); }
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); }
8
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
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."); }
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); }
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; }
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; } }
13
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
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
+ 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); }
17
+ /**
18
+ * 筛选项中 singleSelect/multipleSelect 的异步 options 包装器。
19
+ * 当列配置传入 getOptions(同步或异步)时,先解析再渲染 PisellSingleSelect/PisellMultipleSelect。
20
+ */
21
+
22
+ import React, { useState, useEffect } from 'react';
23
+ import { Spin } from 'antd';
24
+ import { PisellSingleSelect } from "../../../pisellSingleSelect";
25
+ import { PisellMultipleSelect } from "../../../pisellMultipleSelect";
26
+ function normalizeOptions(list) {
27
+ if (!Array.isArray(list)) return [];
28
+ return list.map(function (item) {
29
+ return item && _typeof(item) === 'object' && 'label' in item && 'value' in item ? {
30
+ label: String(item.label),
31
+ value: item.value
32
+ } : {
33
+ label: String(item),
34
+ value: item
35
+ };
36
+ });
37
+ }
38
+ var AsyncOptionsSelectWrapper = function AsyncOptionsSelectWrapper(props) {
39
+ var getOptions = props.getOptions,
40
+ fieldType = props.fieldType,
41
+ value = props.value,
42
+ onChange = props.onChange,
43
+ rest = _objectWithoutProperties(props, _excluded);
44
+ var _useState = useState([]),
45
+ _useState2 = _slicedToArray(_useState, 2),
46
+ options = _useState2[0],
47
+ setOptions = _useState2[1];
48
+ var _useState3 = useState(true),
49
+ _useState4 = _slicedToArray(_useState3, 2),
50
+ loading = _useState4[0],
51
+ setLoading = _useState4[1];
52
+ useEffect(function () {
53
+ setLoading(true);
54
+ var result = getOptions();
55
+ var resolved = Promise.resolve(result);
56
+ resolved.then(function (list) {
57
+ setOptions(normalizeOptions(list));
58
+ }).finally(function () {
59
+ setLoading(false);
60
+ });
61
+ }, [getOptions]);
62
+ var commonProps = _objectSpread(_objectSpread({}, rest), {}, {
63
+ options: options,
64
+ mode: 'edit'
65
+ });
66
+ if (loading) {
67
+ return /*#__PURE__*/React.createElement(Spin, {
68
+ spinning: true,
69
+ size: "small"
70
+ }, /*#__PURE__*/React.createElement("span", {
71
+ style: {
72
+ display: 'inline-block',
73
+ minWidth: 120,
74
+ minHeight: 32
75
+ }
76
+ }));
77
+ }
78
+ if (fieldType === 'multipleSelect') {
79
+ return /*#__PURE__*/React.createElement(PisellMultipleSelect, _extends({}, commonProps, {
80
+ value: value,
81
+ onChange: onChange
82
+ }));
83
+ }
84
+ return /*#__PURE__*/React.createElement(PisellSingleSelect, _extends({}, commonProps, {
85
+ value: value,
86
+ onChange: onChange
87
+ }));
88
+ };
89
+ AsyncOptionsSelectWrapper.displayName = 'AsyncOptionsSelectWrapper';
90
+ export default AsyncOptionsSelectWrapper;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { FilterItemProps } from "../../types";
3
- import "./index.less";
1
+ import React from 'react';
2
+ import { FilterItemProps } from '../../types';
3
+ import './index.less';
4
4
  declare const FilterItem: React.FC<FilterItemProps>;
5
5
  export default FilterItem;