@pisell/materials 3.3.85 → 3.3.87

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 (392) 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/dataSourceForm/utils.d.ts +1 -1
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  17. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  18. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  19. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  20. package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  21. package/es/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
  22. package/es/components/dataSourceComponents/fields/index.d.ts +7 -7
  23. package/es/components/filter/components/Dropdown/index.js +6 -2
  24. package/es/components/filter/components/FilterButton/index.js +19 -4
  25. package/es/components/filter/components/FilterButton/types.d.ts +8 -0
  26. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  27. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +90 -0
  28. package/es/components/filter/components/FilterItem/index.d.ts +3 -3
  29. package/es/components/filter/components/FilterItem/index.js +138 -7
  30. package/es/components/filter/components/FilterItem/index.less +90 -0
  31. package/es/components/filter/types.d.ts +4 -2
  32. package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +38 -29
  33. package/es/components/pisellCurrency/PisellCurrency.less +163 -25
  34. package/es/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  35. package/es/components/pisellCurrency/index.d.ts +2 -1
  36. package/es/components/pisellCurrency/index.js +16 -1
  37. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  38. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +30 -3
  39. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  40. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +68 -0
  41. package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  42. package/es/components/pisellDataSourceContainer/components/Table/index.js +5 -3
  43. package/es/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  44. package/es/components/pisellDataSourceContainer/components/Table/useColumns.js +37 -15
  45. package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  46. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +21 -15
  47. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  48. package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +6 -4
  49. package/es/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  50. package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +15 -4
  51. package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  52. package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +4 -2
  53. package/es/components/pisellEmail/PisellEmail.less +119 -10
  54. package/es/components/pisellEmail/PisellEmail.stories.js +1 -1
  55. package/es/components/pisellEmail/index.d.ts +3 -1
  56. package/es/components/pisellEmail/index.js +17 -1
  57. package/es/components/pisellFilter/index.js +76 -10
  58. package/es/components/pisellFind/index.js +11 -2
  59. package/es/components/pisellGridPro/ToolBar/index.less +23 -0
  60. package/es/components/pisellGridPro/index.d.ts +4 -0
  61. package/es/components/pisellLongText/PisellLongText.less +72 -4
  62. package/es/components/pisellLongText/PisellLongText.stories.js +1 -1
  63. package/es/components/pisellLongText/index.d.ts +2 -1
  64. package/es/components/pisellLongText/index.js +16 -1
  65. package/es/components/pisellLookup/PisellLookup.js +18 -9
  66. package/es/components/pisellLookup/PisellLookup.less +39 -16
  67. package/es/components/pisellLookup/components/LookupTrigger.js +14 -4
  68. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  69. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  70. package/es/components/pisellMultipleSelect/components/EditView.js +8 -2
  71. package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  72. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +15 -11
  73. package/es/components/pisellMultipleSelect/index.d.ts +2 -1
  74. package/es/components/pisellMultipleSelect/index.js +16 -1
  75. package/es/components/pisellNumber/PisellNumber.less +135 -17
  76. package/es/components/pisellNumber/PisellNumber.stories.js +1 -1
  77. package/es/components/pisellNumber/index.d.ts +2 -1
  78. package/es/components/pisellNumber/index.js +16 -1
  79. package/es/components/pisellPercent/PisellPercent.less +142 -24
  80. package/es/components/pisellPercent/PisellPercent.stories.js +1 -1
  81. package/es/components/pisellPercent/index.d.ts +2 -1
  82. package/es/components/pisellPercent/index.js +16 -1
  83. package/es/components/pisellPhone/PisellPhone.less +122 -27
  84. package/es/components/pisellPhone/PisellPhone.stories.js +1 -1
  85. package/es/components/pisellPhone/components/EditView.js +1 -1
  86. package/es/components/pisellPhone/components/ReadOnlyView.js +15 -6
  87. package/es/components/pisellPhone/index.d.ts +2 -1
  88. package/es/components/pisellPhone/index.js +16 -1
  89. package/es/components/pisellRating/PisellRating.less +20 -12
  90. package/es/components/pisellRating/PisellRating.stories.js +1 -1
  91. package/es/components/pisellRating/index.d.ts +2 -1
  92. package/es/components/pisellRating/index.js +16 -1
  93. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  94. package/es/components/pisellRecordBoard/PisellRecordBoard.js +243 -0
  95. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  96. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +2358 -0
  97. package/es/components/pisellRecordBoard/context/RecordBoardContext.js +2 -0
  98. package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +13 -0
  99. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +29 -0
  100. package/es/components/pisellRecordBoard/index.d.ts +35 -0
  101. package/es/components/pisellRecordBoard/index.js +23 -0
  102. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +36 -0
  103. package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +20 -0
  104. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  105. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +242 -0
  106. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  107. package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  108. package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +20 -0
  109. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  110. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +90 -0
  111. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  112. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +138 -0
  113. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  114. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +66 -0
  115. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  116. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  117. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +66 -0
  118. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  119. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  120. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +41 -0
  121. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  122. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  123. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +215 -0
  124. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  125. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +77 -0
  126. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  127. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +65 -0
  128. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  129. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  130. package/es/components/pisellRecordBoard/shellFrame/index.js +104 -0
  131. package/es/components/pisellRecordBoard/types.js +1 -0
  132. package/es/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  133. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +508 -0
  134. package/es/components/pisellRecordBoard/utils/withRecordBoard.js +27 -0
  135. package/es/components/pisellShellFrame/PisellShellFrame.js +107 -0
  136. package/es/components/pisellShellFrame/PisellShellFrame.less +78 -0
  137. package/es/components/pisellShellFrame/PisellShellFrame.stories.js +195 -0
  138. package/es/components/pisellShellFrame/index.js +1 -0
  139. package/es/components/pisellShellFrame/types.js +1 -0
  140. package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  141. package/es/components/pisellSingleLineText/index.d.ts +2 -1
  142. package/es/components/pisellSingleLineText/index.js +16 -1
  143. package/es/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  144. package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  145. package/es/components/pisellSingleSelect/components/EditView.js +8 -2
  146. package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  147. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +10 -6
  148. package/es/components/pisellSingleSelect/index.d.ts +2 -1
  149. package/es/components/pisellSingleSelect/index.js +16 -1
  150. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -3
  151. package/es/components/pisellUrl/PisellUrl.less +120 -11
  152. package/es/components/pisellUrl/PisellUrl.stories.js +1 -1
  153. package/es/components/pisellUrl/index.d.ts +3 -1
  154. package/es/components/pisellUrl/index.js +17 -1
  155. package/es/components/pisellWalletPassCard/index.js +1 -1
  156. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  157. package/es/components/select/index.less +18 -2
  158. package/es/components/sort/index.js +25 -3
  159. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  160. package/es/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  161. package/es/components/table/Table/utils.d.ts +1 -1
  162. package/es/index.d.ts +6 -2
  163. package/es/index.js +2 -0
  164. package/es/locales/en-US.d.ts +36 -0
  165. package/es/locales/en-US.js +50 -2
  166. package/es/locales/index.js +2 -2
  167. package/es/locales/ja.d.ts +2 -0
  168. package/es/locales/ja.js +2 -0
  169. package/es/locales/pt.d.ts +2 -0
  170. package/es/locales/pt.js +2 -0
  171. package/es/locales/zh-CN.d.ts +36 -0
  172. package/es/locales/zh-CN.js +54 -6
  173. package/es/locales/zh-TW.d.ts +36 -0
  174. package/es/locales/zh-TW.js +54 -6
  175. package/es/utils/tagColor.js +39 -0
  176. package/lib/components/Pagination/index.d.ts +4 -5
  177. package/lib/components/Pagination/index.js +44 -21
  178. package/lib/components/Pagination/index.less +13 -7
  179. package/lib/components/PisellFields/index.d.ts +2 -2
  180. package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
  181. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +1 -0
  182. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +1 -0
  183. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  184. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  185. package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
  186. package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +21 -0
  187. package/lib/components/dataSourceComponents/fields/index.d.ts +7 -7
  188. package/lib/components/filter/components/Dropdown/index.js +9 -2
  189. package/lib/components/filter/components/FilterButton/index.js +14 -3
  190. package/lib/components/filter/components/FilterButton/types.d.ts +8 -0
  191. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  192. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
  193. package/lib/components/filter/components/FilterItem/index.d.ts +3 -3
  194. package/lib/components/filter/components/FilterItem/index.js +133 -4
  195. package/lib/components/filter/components/FilterItem/index.less +90 -0
  196. package/lib/components/filter/types.d.ts +4 -2
  197. package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -23
  198. package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
  199. package/lib/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  200. package/lib/components/pisellCurrency/index.d.ts +2 -1
  201. package/lib/components/pisellCurrency/index.js +7 -0
  202. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  203. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +18 -2
  204. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  205. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +81 -0
  206. package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  207. package/lib/components/pisellDataSourceContainer/components/Table/index.js +3 -1
  208. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  209. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.js +25 -14
  210. package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +1 -0
  211. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +17 -11
  212. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  213. package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +7 -1
  214. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  215. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +10 -2
  216. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  217. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +2 -1
  218. package/lib/components/pisellEmail/PisellEmail.less +119 -10
  219. package/lib/components/pisellEmail/PisellEmail.stories.js +1 -1
  220. package/lib/components/pisellEmail/index.d.ts +3 -1
  221. package/lib/components/pisellEmail/index.js +10 -2
  222. package/lib/components/pisellFilter/index.js +79 -8
  223. package/lib/components/pisellFind/index.js +11 -2
  224. package/lib/components/pisellGridPro/ToolBar/index.less +23 -0
  225. package/lib/components/pisellGridPro/index.d.ts +4 -0
  226. package/lib/components/pisellLongText/PisellLongText.less +72 -4
  227. package/lib/components/pisellLongText/PisellLongText.stories.js +1 -1
  228. package/lib/components/pisellLongText/index.d.ts +2 -1
  229. package/lib/components/pisellLongText/index.js +7 -0
  230. package/lib/components/pisellLookup/PisellLookup.js +12 -6
  231. package/lib/components/pisellLookup/PisellLookup.less +39 -16
  232. package/lib/components/pisellLookup/components/LookupTrigger.js +9 -3
  233. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  234. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  235. package/lib/components/pisellMultipleSelect/components/EditView.js +4 -1
  236. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  237. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +29 -1
  238. package/lib/components/pisellMultipleSelect/index.d.ts +2 -1
  239. package/lib/components/pisellMultipleSelect/index.js +7 -0
  240. package/lib/components/pisellNumber/PisellNumber.less +135 -17
  241. package/lib/components/pisellNumber/PisellNumber.stories.js +1 -1
  242. package/lib/components/pisellNumber/index.d.ts +2 -1
  243. package/lib/components/pisellNumber/index.js +7 -0
  244. package/lib/components/pisellPercent/PisellPercent.less +142 -24
  245. package/lib/components/pisellPercent/PisellPercent.stories.js +1 -1
  246. package/lib/components/pisellPercent/index.d.ts +2 -1
  247. package/lib/components/pisellPercent/index.js +7 -0
  248. package/lib/components/pisellPhone/PisellPhone.less +122 -27
  249. package/lib/components/pisellPhone/PisellPhone.stories.js +1 -1
  250. package/lib/components/pisellPhone/components/EditView.js +1 -1
  251. package/lib/components/pisellPhone/components/ReadOnlyView.js +18 -4
  252. package/lib/components/pisellPhone/index.d.ts +2 -1
  253. package/lib/components/pisellPhone/index.js +7 -0
  254. package/lib/components/pisellRating/PisellRating.less +20 -12
  255. package/lib/components/pisellRating/PisellRating.stories.js +1 -1
  256. package/lib/components/pisellRating/index.d.ts +2 -1
  257. package/lib/components/pisellRating/index.js +7 -0
  258. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  259. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +263 -0
  260. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  261. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +1673 -0
  262. package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +30 -0
  263. package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +46 -0
  264. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +47 -0
  265. package/lib/components/pisellRecordBoard/index.d.ts +35 -0
  266. package/lib/components/pisellRecordBoard/index.js +59 -0
  267. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +46 -0
  268. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +46 -0
  269. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  270. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +264 -0
  271. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  272. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  273. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +46 -0
  274. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  275. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +108 -0
  276. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  277. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +173 -0
  278. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  279. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +100 -0
  280. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  281. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  282. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +90 -0
  283. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  284. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  285. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +53 -0
  286. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  287. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  288. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +247 -0
  289. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  290. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +93 -0
  291. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  292. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +85 -0
  293. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  294. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  295. package/lib/components/pisellRecordBoard/shellFrame/index.js +137 -0
  296. package/lib/components/pisellRecordBoard/types.js +17 -0
  297. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  298. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +365 -0
  299. package/lib/components/pisellRecordBoard/utils/withRecordBoard.js +49 -0
  300. package/lib/components/pisellShellFrame/PisellShellFrame.js +113 -0
  301. package/lib/components/pisellShellFrame/PisellShellFrame.less +78 -0
  302. package/lib/components/pisellShellFrame/PisellShellFrame.stories.js +129 -0
  303. package/lib/components/pisellShellFrame/index.js +40 -0
  304. package/lib/components/pisellShellFrame/types.js +17 -0
  305. package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  306. package/lib/components/pisellSingleLineText/index.d.ts +2 -1
  307. package/lib/components/pisellSingleLineText/index.js +7 -0
  308. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  309. package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  310. package/lib/components/pisellSingleSelect/components/EditView.js +4 -1
  311. package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  312. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +12 -9
  313. package/lib/components/pisellSingleSelect/index.d.ts +2 -1
  314. package/lib/components/pisellSingleSelect/index.js +7 -0
  315. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -2
  316. package/lib/components/pisellUrl/PisellUrl.less +120 -11
  317. package/lib/components/pisellUrl/PisellUrl.stories.js +1 -1
  318. package/lib/components/pisellUrl/index.d.ts +3 -1
  319. package/lib/components/pisellUrl/index.js +10 -2
  320. package/lib/components/pisellWalletPassCard/index.js +9 -2
  321. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  322. package/lib/components/select/index.less +18 -2
  323. package/lib/components/sort/index.js +13 -3
  324. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  325. package/lib/components/table/Table/fields/treeSelect/index.d.ts +1 -0
  326. package/lib/components/table/Table/utils.d.ts +1 -1
  327. package/lib/index.d.ts +6 -2
  328. package/lib/index.js +6 -0
  329. package/lib/locales/en-US.d.ts +36 -0
  330. package/lib/locales/en-US.js +42 -2
  331. package/lib/locales/index.js +2 -2
  332. package/lib/locales/ja.d.ts +2 -0
  333. package/lib/locales/ja.js +2 -0
  334. package/lib/locales/pt.d.ts +2 -0
  335. package/lib/locales/pt.js +2 -0
  336. package/lib/locales/zh-CN.d.ts +36 -0
  337. package/lib/locales/zh-CN.js +46 -6
  338. package/lib/locales/zh-TW.d.ts +36 -0
  339. package/lib/locales/zh-TW.js +46 -6
  340. package/lib/utils/tagColor.js +60 -0
  341. package/lowcode/auto-resize-text/meta.ts +1 -1
  342. package/package.json +3 -3
  343. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  344. package/es/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  345. package/es/components/pisellDateTimeDisplay/types.d.ts +0 -347
  346. package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  347. package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  348. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  349. package/es/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  350. package/es/components/pisellLookup/components/HotWords.d.ts +0 -7
  351. package/es/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  352. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  353. package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  354. package/es/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  355. package/es/components/pisellLookup/components/index.d.ts +0 -9
  356. package/es/components/pisellLookup/hooks/index.d.ts +0 -6
  357. package/es/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  358. package/es/components/pisellLookup/index.d.ts +0 -6
  359. package/es/components/pisellLookup/types.d.ts +0 -666
  360. package/es/components/pisellLookup/utils/index.d.ts +0 -5
  361. package/es/components/pisellLookup/utils/trigger.d.ts +0 -42
  362. package/es/components/pisellSort/type.d.ts +0 -7
  363. package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  364. package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  365. package/es/components/sort/types.d.ts +0 -20
  366. package/es/components/virtualInput/index.d.ts +0 -29
  367. package/es/hooks/useThemeTokens.d.ts +0 -7
  368. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  369. package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  370. package/lib/components/pisellDateTimeDisplay/types.d.ts +0 -347
  371. package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  372. package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  373. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  374. package/lib/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  375. package/lib/components/pisellLookup/components/HotWords.d.ts +0 -7
  376. package/lib/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  377. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  378. package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  379. package/lib/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  380. package/lib/components/pisellLookup/components/index.d.ts +0 -9
  381. package/lib/components/pisellLookup/hooks/index.d.ts +0 -6
  382. package/lib/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  383. package/lib/components/pisellLookup/index.d.ts +0 -6
  384. package/lib/components/pisellLookup/types.d.ts +0 -666
  385. package/lib/components/pisellLookup/utils/index.d.ts +0 -5
  386. package/lib/components/pisellLookup/utils/trigger.d.ts +0 -42
  387. package/lib/components/pisellSort/type.d.ts +0 -7
  388. package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  389. package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  390. package/lib/components/sort/types.d.ts +0 -20
  391. package/lib/components/virtualInput/index.d.ts +0 -29
  392. package/lib/hooks/useThemeTokens.d.ts +0 -7
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { RecordBoardToolBarProps as ToolBarPropsType } from '../../types';
3
+ import './ToolBarFilter.less';
4
+ /**
5
+ * RecordBoard 下的工具栏:使用 PisellToolBar。
6
+ * 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
7
+ * 可透传 topLeft、topRight、bottomLeft、bottomRight、tabs。
8
+ */
9
+ declare const RecordBoardToolBar: React.FC<RecordBoardToolBarProps>;
10
+ export declare type RecordBoardToolBarProps = ToolBarPropsType;
11
+ export default RecordBoardToolBar;
@@ -0,0 +1,215 @@
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 _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); }
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
+ import React, { useCallback, useMemo } from 'react';
9
+ import { Button, Space } from 'antd';
10
+ import SwitchVertical01 from '@pisell/icon/es/SwitchVertical01';
11
+ import PisellToolBar from "../../../pisellGridPro/ToolBar";
12
+ import { PisellFind } from "../../../pisellFind";
13
+ import PisellFilter from "../../../pisellFilter";
14
+ import Sort from "../../../sort";
15
+ import ToolBarReset from "../ToolBarReset";
16
+ import ToolBarQuickFilter from "../ToolBarQuickFilter";
17
+ import RecordBoardColumnSetting from "../ColumnSetting";
18
+ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
19
+ import { locales as utilsLocales } from '@pisell/utils';
20
+ import { getText } from "../../../../locales";
21
+ import "./ToolBarFilter.less";
22
+
23
+ /** 与 Quick Filter 同源:优先 utils,若 utils 返回 key(未命中)则用 materials 再回退 */
24
+ function getSortButtonText() {
25
+ var key = 'pisell2.recordBoard.toolbar.sort';
26
+ var u = utilsLocales.getText(key);
27
+ return u && u !== key ? u : getText(key) || getText('sort-button-text');
28
+ }
29
+ function getFilterButtonText() {
30
+ var key = 'pisell2.recordBoard.toolbar.filter';
31
+ var u = utilsLocales.getText(key);
32
+ return u && u !== key ? u : getText(key) || getText('table-action-filter-button');
33
+ }
34
+ import { deriveFilterFromColumns, deriveSortFromColumns } from "../../utils/recordBoardColumns";
35
+
36
+ /** 默认搜索参数字段名,与 context.searchParams 对应 */
37
+ var DEFAULT_SEARCH_FIELD = 'keyword';
38
+
39
+ /** 筛选在 searchParams 中的字段名 */
40
+ var FILTER_PARAMS_FIELD = 'filter';
41
+
42
+ /** 排序在 searchParams 中的字段名 */
43
+ var SORT_PARAMS_FIELD = 'sort';
44
+
45
+ /** 筛选无值时使用的默认筛选项,避免点开为空;业务可通过 childComponentProps.toolBar.filter.defaultFilterValue 覆盖。文案通过 getText 多语言。 */
46
+ function getDefaultFilterValue() {
47
+ return {
48
+ quickFilter: [],
49
+ otherFilter: []
50
+ };
51
+ }
52
+
53
+ /**
54
+ * RecordBoard 下的工具栏:使用 PisellToolBar。
55
+ * 左侧默认 PisellFind(inline);右侧默认 PisellFilter。通过 childComponentProps.toolBar.search / toolBar.filter 为对象时透传对应组件 props,为 false 时不渲染。
56
+ * 可透传 topLeft、topRight、bottomLeft、bottomRight、tabs。
57
+ */
58
+ var RecordBoardToolBar = function RecordBoardToolBar(props) {
59
+ var _ctx$childComponentPr, _ctx$childComponentPr2, _searchParams$DEFAULT, _ctx$childComponentPr3, _formFiltersPrefix, _size, _filterResetKey;
60
+ var ctx = useRecordBoardContext({
61
+ displayName: 'toolBar'
62
+ });
63
+ var searchParams = ctx.searchParams,
64
+ onSearch = ctx.onSearch;
65
+ var slots = (_ctx$childComponentPr = (_ctx$childComponentPr2 = ctx.childComponentProps) === null || _ctx$childComponentPr2 === void 0 ? void 0 : _ctx$childComponentPr2.toolBar) !== null && _ctx$childComponentPr !== void 0 ? _ctx$childComponentPr : {};
66
+ var keyword = (_searchParams$DEFAULT = searchParams === null || searchParams === void 0 ? void 0 : searchParams[DEFAULT_SEARCH_FIELD]) !== null && _searchParams$DEFAULT !== void 0 ? _searchParams$DEFAULT : '';
67
+ var handleSearch = useCallback(function (value) {
68
+ onSearch(_objectSpread(_objectSpread({}, searchParams), {}, _defineProperty({}, DEFAULT_SEARCH_FIELD, value || undefined)));
69
+ }, [onSearch, searchParams]);
70
+ var gridColumns = (_ctx$childComponentPr3 = ctx.childComponentProps) === null || _ctx$childComponentPr3 === void 0 || (_ctx$childComponentPr3 = _ctx$childComponentPr3.grid) === null || _ctx$childComponentPr3 === void 0 ? void 0 : _ctx$childComponentPr3.columns;
71
+ var derivedFilterFromColumns = useMemo(function () {
72
+ return Array.isArray(gridColumns) && gridColumns.length > 0 ? deriveFilterFromColumns(gridColumns) : null;
73
+ }, [gridColumns]);
74
+ var derivedSortFromColumnsList = useMemo(function () {
75
+ return Array.isArray(gridColumns) && gridColumns.length > 0 ? deriveSortFromColumns(gridColumns) : [];
76
+ }, [gridColumns]);
77
+ var searchConfig = slots.search;
78
+ var hideSearch = searchConfig === false;
79
+
80
+ /** 默认 inline:triggerType="input" + displayType="inline",放在 toolbar 左侧。showConfirmButton 优先取 toolBar.search,未配置时默认 true。 */
81
+ var searchNode = hideSearch ? null : /*#__PURE__*/React.createElement(PisellFind, _extends({
82
+ triggerType: "input",
83
+ displayType: "inline",
84
+ showConfirmButton: _typeof(searchConfig) === 'object' && searchConfig !== null && 'showConfirmButton' in searchConfig ? searchConfig.showConfirmButton : true,
85
+ value: keyword,
86
+ onChange: function onChange(v) {
87
+ return handleSearch(v);
88
+ },
89
+ onSearch: handleSearch
90
+ }, _typeof(searchConfig) === 'object' && searchConfig !== null ? searchConfig : {}));
91
+
92
+ // 快筛统一放在左侧 QuickFilter;右侧 Filter 弹层只保留高级筛选,不展示快筛
93
+ var quickFilterConfig = slots.quickFilter;
94
+ var quickFilterList = useMemo(function () {
95
+ var _ref;
96
+ if (quickFilterConfig === false) return [];
97
+ var fromConfig = _typeof(quickFilterConfig) === 'object' && quickFilterConfig !== null && Array.isArray(quickFilterConfig.filterList) ? quickFilterConfig.filterList : null;
98
+ return (_ref = fromConfig !== null && fromConfig !== void 0 ? fromConfig : derivedFilterFromColumns === null || derivedFilterFromColumns === void 0 ? void 0 : derivedFilterFromColumns.quickFilter) !== null && _ref !== void 0 ? _ref : [];
99
+ }, [quickFilterConfig, derivedFilterFromColumns === null || derivedFilterFromColumns === void 0 ? void 0 : derivedFilterFromColumns.quickFilter]);
100
+ var showQuickFilterLeft = quickFilterList.length > 0;
101
+ var quickFilterNode = showQuickFilterLeft ? /*#__PURE__*/React.createElement(ToolBarQuickFilter, {
102
+ filterList: quickFilterList,
103
+ formFiltersPrefix: _typeof(quickFilterConfig) === 'object' && quickFilterConfig !== null ? (_formFiltersPrefix = quickFilterConfig.formFiltersPrefix) !== null && _formFiltersPrefix !== void 0 ? _formFiltersPrefix : '' : '',
104
+ size: _typeof(quickFilterConfig) === 'object' && quickFilterConfig !== null ? (_size = quickFilterConfig.size) !== null && _size !== void 0 ? _size : 'large' : 'large'
105
+ }) : null;
106
+ var topLeft = /*#__PURE__*/React.createElement("div", {
107
+ className: "record-board-toolbar-top-left"
108
+ }, quickFilterNode, searchNode ? /*#__PURE__*/React.createElement("div", {
109
+ className: "record-board-toolbar-find-wrap"
110
+ }, searchNode) : null, slots.topLeft);
111
+ var sortConfig = slots.sort;
112
+ var hideSort = sortConfig === false;
113
+ var sortValue = searchParams === null || searchParams === void 0 ? void 0 : searchParams[SORT_PARAMS_FIELD];
114
+ var handleSortChange = useCallback(function (val) {
115
+ onSearch(_objectSpread(_objectSpread({}, searchParams), {}, _defineProperty({}, SORT_PARAMS_FIELD, val || undefined)));
116
+ }, [onSearch, searchParams]);
117
+ var sortList = useMemo(function () {
118
+ var fromConfig = _typeof(sortConfig) === 'object' && sortConfig !== null && Array.isArray(sortConfig.list) ? sortConfig.list : null;
119
+ return fromConfig !== null && fromConfig !== void 0 ? fromConfig : derivedSortFromColumnsList;
120
+ }, [sortConfig, derivedSortFromColumnsList]);
121
+ var sortNode = hideSort ? null : /*#__PURE__*/React.createElement(Sort, _extends({}, _typeof(sortConfig) === 'object' && sortConfig !== null ? sortConfig : {}, {
122
+ list: sortList,
123
+ value: sortValue,
124
+ onChange: handleSortChange,
125
+ placement: "bottomLeft",
126
+ button: /*#__PURE__*/React.createElement(Button, {
127
+ className: "record-board-toolbar-filter-btn",
128
+ icon: /*#__PURE__*/React.createElement(SwitchVertical01, null),
129
+ size: "large"
130
+ }, getSortButtonText())
131
+ }));
132
+ var filterConfig = slots.filter;
133
+ var hideFilter = filterConfig === false;
134
+ var filterValue = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
135
+ var hasFilterList = Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.quickFilter) && filterValue.quickFilter.length > 0 || Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.otherFilter) && filterValue.otherFilter.length > 0;
136
+ var hasFilterValues = _typeof(filterValue === null || filterValue === void 0 ? void 0 : filterValue.values) === 'object' && filterValue.values !== null && Object.keys(filterValue.values).length > 0;
137
+ var hasFilterItems = hasFilterList || hasFilterValues;
138
+ var defaultFilterFromConfig = _typeof(filterConfig) === 'object' && filterConfig !== null && filterConfig.defaultFilterValue ? filterConfig.defaultFilterValue : null;
139
+ var effectiveFilterValue = useMemo(function () {
140
+ var _defaultFilterFromCon, _defaultFilterFromCon2, _base$values;
141
+ var base = filterValue != null && hasFilterItems ? filterValue : defaultFilterFromConfig ? defaultFilterFromConfig : derivedFilterFromColumns && (derivedFilterFromColumns.quickFilter.length > 0 || derivedFilterFromColumns.otherFilter.length > 0) ? derivedFilterFromColumns : getDefaultFilterValue();
142
+ var quickFilter = Array.isArray(base.quickFilter) && base.quickFilter.length > 0 ? base.quickFilter : (_defaultFilterFromCon = defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.quickFilter) !== null && _defaultFilterFromCon !== void 0 ? _defaultFilterFromCon : [];
143
+ var otherFilter = Array.isArray(base.otherFilter) && base.otherFilter.length > 0 ? base.otherFilter : (_defaultFilterFromCon2 = defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.otherFilter) !== null && _defaultFilterFromCon2 !== void 0 ? _defaultFilterFromCon2 : [];
144
+ // 若 otherFilter 来自 base(如 sessionStorage 恢复),JSON 会丢失函数(如 other.component),导致 custom 项空白;用 config 同 key 项补回 component/label 等
145
+ if (otherFilter === base.otherFilter && Array.isArray(defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.otherFilter) && defaultFilterFromConfig.otherFilter.length > 0) {
146
+ var configMap = new Map(defaultFilterFromConfig.otherFilter.map(function (c) {
147
+ var _ref2, _c$key;
148
+ return [(_ref2 = (_c$key = c.key) !== null && _c$key !== void 0 ? _c$key : c.name) !== null && _ref2 !== void 0 ? _ref2 : '', c];
149
+ }));
150
+ otherFilter = otherFilter.map(function (item) {
151
+ var _ref3, _item$key, _configItem$label, _configItem$other$pla, _configItem$other, _item$other;
152
+ var key = (_ref3 = (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : item.name) !== null && _ref3 !== void 0 ? _ref3 : '';
153
+ var configItem = configMap.get(key);
154
+ if (!configItem) return item;
155
+ // 优先用 config 的 label/placeholder(当前语言),避免 session 恢复的旧语言覆盖
156
+ return _objectSpread(_objectSpread(_objectSpread({}, configItem), item), {}, {
157
+ label: (_configItem$label = configItem.label) !== null && _configItem$label !== void 0 ? _configItem$label : item.label,
158
+ other: _objectSpread(_objectSpread(_objectSpread({}, configItem === null || configItem === void 0 ? void 0 : configItem.other), item === null || item === void 0 ? void 0 : item.other), {}, {
159
+ placeholder: (_configItem$other$pla = configItem === null || configItem === void 0 || (_configItem$other = configItem.other) === null || _configItem$other === void 0 ? void 0 : _configItem$other.placeholder) !== null && _configItem$other$pla !== void 0 ? _configItem$other$pla : item === null || item === void 0 || (_item$other = item.other) === null || _item$other === void 0 ? void 0 : _item$other.placeholder
160
+ })
161
+ });
162
+ });
163
+ }
164
+ return _objectSpread(_objectSpread({}, base), {}, {
165
+ quickFilter: quickFilter,
166
+ otherFilter: otherFilter,
167
+ values: (_base$values = base.values) !== null && _base$values !== void 0 ? _base$values : {}
168
+ });
169
+ }, [filterValue, hasFilterItems, defaultFilterFromConfig, derivedFilterFromColumns]);
170
+
171
+ // 右侧 Filter 只展示高级筛选,快筛全部在左侧
172
+ var filterValueForPisellFilter = useMemo(function () {
173
+ return _objectSpread(_objectSpread({}, effectiveFilterValue), {}, {
174
+ quickFilter: []
175
+ });
176
+ }, [effectiveFilterValue]);
177
+ var handleFilterChange = useCallback(function (value) {
178
+ var _currentFilter$values, _value$values;
179
+ var currentFilter = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
180
+ var currentValues = (_currentFilter$values = currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.values) !== null && _currentFilter$values !== void 0 ? _currentFilter$values : {};
181
+ var incomingValues = (_value$values = value === null || value === void 0 ? void 0 : value.values) !== null && _value$values !== void 0 ? _value$values : {};
182
+ var nextFilter = _objectSpread(_objectSpread({}, value), {}, {
183
+ values: _objectSpread(_objectSpread({}, currentValues), incomingValues)
184
+ });
185
+ onSearch(_objectSpread(_objectSpread({}, searchParams), {}, _defineProperty({}, FILTER_PARAMS_FIELD, nextFilter)));
186
+ }, [onSearch, searchParams]);
187
+ var filterResetKey = (_filterResetKey = ctx.filterResetKey) !== null && _filterResetKey !== void 0 ? _filterResetKey : 0;
188
+ var filterNode = hideFilter ? null : /*#__PURE__*/React.createElement(PisellFilter, _extends({
189
+ key: "record-board-filter-".concat(filterResetKey),
190
+ value: filterValueForPisellFilter,
191
+ onChange: handleFilterChange,
192
+ hasForm: true,
193
+ quickFilterMaxLength: 100,
194
+ formFiltersPrefix: "",
195
+ size: "large",
196
+ buttonClassName: "record-board-toolbar-filter-btn",
197
+ hiddenQuickFilter: true,
198
+ placement: "bottomLeft"
199
+ }, _typeof(filterConfig) === 'object' && filterConfig !== null ? filterConfig : {}));
200
+ var showColumnSetting = slots.columnSetting !== false && Array.isArray(gridColumns) && gridColumns.length > 0;
201
+ var topRight = /*#__PURE__*/React.createElement(Space, null, showColumnSetting ? /*#__PURE__*/React.createElement(RecordBoardColumnSetting, null) : null, sortNode, filterNode, /*#__PURE__*/React.createElement(ToolBarReset, {
202
+ size: "large"
203
+ }), slots.topRight);
204
+ return /*#__PURE__*/React.createElement(PisellToolBar, {
205
+ className: slots.className,
206
+ style: slots.style,
207
+ tabs: slots.tabs,
208
+ topLeft: topLeft,
209
+ topRight: topRight,
210
+ bottomLeft: slots.bottomLeft,
211
+ bottomRight: slots.bottomRight
212
+ });
213
+ };
214
+ RecordBoardToolBar.displayName = 'RecordBoard.ToolBar';
215
+ export default RecordBoardToolBar;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { FilterItemProps } from '../../../filter/types';
3
+ export interface ToolBarQuickFilterProps {
4
+ /** 快速筛选项列表(与 Filter 的 quickFilter 同结构),不传则从 columns 派生时由父级传入 */
5
+ filterList?: FilterItemProps[];
6
+ /** 表单字段前缀,与 PisellFilter 保持一致,默认 '' */
7
+ formFiltersPrefix?: string;
8
+ /** 表单项尺寸 */
9
+ size?: 'small' | 'middle' | 'large';
10
+ }
11
+ /**
12
+ * RecordBoard 工具栏左侧内联快速筛选:将 quickFilter 直接展示在 ToolBar 左侧,不放入 Filter 弹层。
13
+ * 与 searchParams.filter 联动,变更写入 searchParams.filter.values 并触发 onSearch。
14
+ * 启用时建议 ToolBar 对 PisellFilter 传 hiddenQuickFilter: true,仅保留高级筛选在弹层内。
15
+ */
16
+ declare const ToolBarQuickFilter: React.FC<ToolBarQuickFilterProps>;
17
+ export default ToolBarQuickFilter;
@@ -0,0 +1,77 @@
1
+ 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; }
2
+ 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; }
3
+ 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; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ 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); }
6
+ 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); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ 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."); }
9
+ 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); }
10
+ 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; }
11
+ 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; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ import React, { useCallback, useEffect } from 'react';
14
+ import { Form } from 'antd';
15
+ import QuickFilter from "../../../filter/components/QuickFilter";
16
+ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
17
+ /** 筛选在 searchParams 中的字段名,与 ToolBar 一致 */
18
+ var FILTER_PARAMS_FIELD = 'filter';
19
+ /**
20
+ * RecordBoard 工具栏左侧内联快速筛选:将 quickFilter 直接展示在 ToolBar 左侧,不放入 Filter 弹层。
21
+ * 与 searchParams.filter 联动,变更写入 searchParams.filter.values 并触发 onSearch。
22
+ * 启用时建议 ToolBar 对 PisellFilter 传 hiddenQuickFilter: true,仅保留高级筛选在弹层内。
23
+ */
24
+ var ToolBarQuickFilter = function ToolBarQuickFilter(_ref) {
25
+ var _filterValue$values;
26
+ var _ref$filterList = _ref.filterList,
27
+ filterList = _ref$filterList === void 0 ? [] : _ref$filterList,
28
+ _ref$formFiltersPrefi = _ref.formFiltersPrefix,
29
+ formFiltersPrefix = _ref$formFiltersPrefi === void 0 ? '' : _ref$formFiltersPrefi,
30
+ _ref$size = _ref.size,
31
+ size = _ref$size === void 0 ? 'large' : _ref$size;
32
+ var ctx = useRecordBoardContext();
33
+ var searchParams = ctx.searchParams,
34
+ onSearch = ctx.onSearch;
35
+ var _Form$useForm = Form.useForm(),
36
+ _Form$useForm2 = _slicedToArray(_Form$useForm, 1),
37
+ form = _Form$useForm2[0];
38
+ var filterValue = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
39
+ var currentValues = (_filterValue$values = filterValue === null || filterValue === void 0 ? void 0 : filterValue.values) !== null && _filterValue$values !== void 0 ? _filterValue$values : {};
40
+ useEffect(function () {
41
+ var next = _typeof(currentValues) === 'object' && currentValues !== null ? currentValues : {};
42
+ var byNames = filterList.reduce(function (acc, item) {
43
+ var _item$name, _next$String;
44
+ var name = (_item$name = item.name) !== null && _item$name !== void 0 ? _item$name : item.key;
45
+ if (name != null) acc[String(name)] = (_next$String = next[String(name)]) !== null && _next$String !== void 0 ? _next$String : undefined;
46
+ return acc;
47
+ }, {});
48
+ form.setFieldsValue(byNames);
49
+ }, [currentValues, form, filterList]);
50
+ var handleValuesChange = useCallback(function (_, allValues) {
51
+ if (_typeof(allValues) !== 'object' || allValues === null) return;
52
+ var nextFilter = _objectSpread(_objectSpread({}, filterValue), {}, {
53
+ values: _objectSpread(_objectSpread({}, currentValues), allValues)
54
+ });
55
+ onSearch(_objectSpread(_objectSpread({}, searchParams), {}, _defineProperty({}, FILTER_PARAMS_FIELD, nextFilter)));
56
+ }, [searchParams, filterValue, currentValues, onSearch]);
57
+ if (!Array.isArray(filterList) || filterList.length === 0) {
58
+ return null;
59
+ }
60
+ return /*#__PURE__*/React.createElement(Form, {
61
+ form: form,
62
+ layout: "inline",
63
+ size: size,
64
+ onValuesChange: handleValuesChange,
65
+ style: {
66
+ marginRight: 0
67
+ },
68
+ className: "record-board-toolbar-quick-filter-form"
69
+ }, /*#__PURE__*/React.createElement(QuickFilter, {
70
+ value: {
71
+ quickFilter: filterList
72
+ },
73
+ formFiltersPrefix: formFiltersPrefix
74
+ }));
75
+ };
76
+ ToolBarQuickFilter.displayName = 'RecordBoard.ToolBarQuickFilter';
77
+ export default ToolBarQuickFilter;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export interface ToolBarResetProps {
4
+ /** 按钮尺寸,与 antd Button 一致,默认与筛选按钮对齐为 large */
5
+ size?: 'small' | 'middle' | 'large';
6
+ /** 按钮类型 */
7
+ type?: 'default' | 'primary' | 'link' | 'text';
8
+ /** 按钮文案,默认使用多语言「重置」 */
9
+ children?: React.ReactNode;
10
+ }
11
+ /**
12
+ * RecordBoard 工具栏重置按钮:清空筛选与排序并刷新表格。
13
+ * 点击后以空 filter.values、清空 sort 调用 onSearch,并调用 onReset(若提供)。
14
+ */
15
+ declare const ToolBarReset: React.FC<ToolBarResetProps>;
16
+ export default ToolBarReset;
@@ -0,0 +1,65 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ import React, { useCallback } from 'react';
8
+ import { Button } from 'antd';
9
+ import { ReloadOutlined } from '@ant-design/icons';
10
+ import { locales as utilsLocales } from '@pisell/utils';
11
+ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
12
+ import { getText } from "../../../../locales";
13
+ import "./index.less";
14
+
15
+ /** 与 Quick Filter 同源:优先 utils,若 utils 返回 key(未命中)则用 materials 再回退 */
16
+ function getResetButtonText() {
17
+ var key = 'pisell2.recordBoard.toolbar.reset';
18
+ var u = utilsLocales.getText(key);
19
+ return u && u !== key ? u : getText(key) || getText('record-board-toolbar-reset');
20
+ }
21
+
22
+ /** 筛选在 searchParams 中的字段名,与 ToolBar 一致 */
23
+ var FILTER_PARAMS_FIELD = 'filter';
24
+ /** 排序在 searchParams 中的字段名,与 ToolBar 一致 */
25
+ var SORT_PARAMS_FIELD = 'sort';
26
+ /**
27
+ * RecordBoard 工具栏重置按钮:清空筛选与排序并刷新表格。
28
+ * 点击后以空 filter.values、清空 sort 调用 onSearch,并调用 onReset(若提供)。
29
+ */
30
+ var ToolBarReset = function ToolBarReset(_ref) {
31
+ var _ref$size = _ref.size,
32
+ size = _ref$size === void 0 ? 'large' : _ref$size,
33
+ _ref$type = _ref.type,
34
+ type = _ref$type === void 0 ? 'default' : _ref$type,
35
+ children = _ref.children;
36
+ var defaultResetText = getResetButtonText();
37
+ var _useRecordBoardContex = useRecordBoardContext(),
38
+ searchParams = _useRecordBoardContex.searchParams,
39
+ onSearch = _useRecordBoardContex.onSearch,
40
+ onReset = _useRecordBoardContex.onReset,
41
+ setFilterResetKey = _useRecordBoardContex.setFilterResetKey;
42
+ var handleReset = useCallback(function () {
43
+ var _currentFilter$otherF;
44
+ setFilterResetKey === null || setFilterResetKey === void 0 || setFilterResetKey(function (prev) {
45
+ return prev + 1;
46
+ });
47
+ var currentFilter = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
48
+ var nextParams = _objectSpread(_objectSpread({}, searchParams), {}, _defineProperty(_defineProperty({}, FILTER_PARAMS_FIELD, _objectSpread(_objectSpread({}, currentFilter), {}, {
49
+ quickFilter: [],
50
+ otherFilter: (_currentFilter$otherF = currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.otherFilter) !== null && _currentFilter$otherF !== void 0 ? _currentFilter$otherF : [],
51
+ values: {}
52
+ })), SORT_PARAMS_FIELD, undefined));
53
+ onSearch(nextParams);
54
+ onReset === null || onReset === void 0 || onReset();
55
+ }, [searchParams, onSearch, onReset, setFilterResetKey]);
56
+ return /*#__PURE__*/React.createElement(Button, {
57
+ className: "record-board-toolbar-reset",
58
+ type: type,
59
+ icon: /*#__PURE__*/React.createElement(ReloadOutlined, null),
60
+ onClick: handleReset,
61
+ size: size
62
+ }, children !== null && children !== void 0 ? children : defaultResetText);
63
+ };
64
+ ToolBarReset.displayName = 'RecordBoard.ToolBarReset';
65
+ export default ToolBarReset;
@@ -0,0 +1,41 @@
1
+ /**
2
+ * ToolBarReset 按钮样式
3
+ * 依据 Figma Pisell 2.0 Component Library - Secondary Button (node-id=13629-5167)
4
+ * - 边框: 1px solid #E5E7EB (neutral-200)
5
+ * - 圆角: 8px
6
+ * - 背景: #FFFFFF (neutral-0)
7
+ * - 文字: 16px Medium, line-height 24px, #374151 (neutral-700)
8
+ * - 内边距: 12px 20px,高度 50px
9
+ */
10
+ .record-board-toolbar-reset {
11
+ &.pisell-lowcode-btn {
12
+ height: 50px;
13
+ padding: 12px 20px;
14
+ font-size: 16px;
15
+ font-weight: 600;
16
+ line-height: 24px;
17
+ color: #374151;
18
+ background-color: #ffffff;
19
+ border: 1px solid #e5e7eb;
20
+ border-width: 1px;
21
+ border-radius: 8px;
22
+ box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
23
+
24
+ &.pisell-lowcode-btn-lg {
25
+ height: 50px;
26
+ padding: 12px 20px;
27
+ font-size: 16px;
28
+ }
29
+
30
+ &:hover:not(:disabled) {
31
+ color: #374151;
32
+ background-color: #f9fafb;
33
+ border-color: #e5e7eb;
34
+ }
35
+
36
+ &:focus-visible {
37
+ outline: none;
38
+ box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,26 @@
1
+ import React from 'react';
2
+ import RecordBoardToolBar from './ToolBar';
3
+ import RecordBoardBatchActionBar from './BatchActionBar';
4
+ import RecordBoardPagination from './Pagination';
5
+ import RecordBoardSearch from './Search';
6
+ import ToolBarReset from './ToolBarReset';
7
+ import ToolBarQuickFilter from './ToolBarQuickFilter';
8
+ /**
9
+ * Shell Frame:基于 PisellShellFrame 的 RecordBoard 壳层。
10
+ * 提供工具栏、多选操作条、分页;与 Layout 同级,包裹在 Layout 外层。
11
+ * 默认占满父容器高度,内容区可滚动,分页器固定在底部。
12
+ *
13
+ * 使用方式:
14
+ * <PisellRecordBoard>
15
+ * <PisellRecordBoard.ShellFrame>
16
+ * <PisellRecordBoard.GridLayout />
17
+ * </PisellRecordBoard.ShellFrame>
18
+ * </PisellRecordBoard>
19
+ */
20
+ declare const RecordBoardShellFrame: React.FC<{
21
+ children?: React.ReactNode;
22
+ className?: string;
23
+ style?: React.CSSProperties;
24
+ }>;
25
+ export default RecordBoardShellFrame;
26
+ export { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, ToolBarReset, ToolBarQuickFilter, };
@@ -0,0 +1,104 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ 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; }
3
+ 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; }
4
+ 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; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ 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); }
7
+ import React, { useRef, useEffect } from 'react';
8
+ import { PisellShellFrame } from "../../pisellShellFrame";
9
+ import { useRecordBoardContext } from "../hooks/useRecordBoardContext";
10
+ import RecordBoardToolBar from "./ToolBar";
11
+ import RecordBoardBatchActionBar from "./BatchActionBar";
12
+ import RecordBoardPagination from "./Pagination";
13
+ import RecordBoardSearch from "./Search";
14
+ import ToolBarReset from "./ToolBarReset";
15
+ import ToolBarQuickFilter from "./ToolBarQuickFilter";
16
+
17
+ /** fillHeight 时内容区可滚动、分页器贴底;默认表头 sticky;grid.scroll.autoCalc 时需测量高度供 scroll.y */
18
+ var FILL_HEIGHT_SCROLL_STYLE = {
19
+ flex: 1,
20
+ minHeight: 0,
21
+ overflow: 'auto'
22
+ };
23
+
24
+ /** 测量滚动区高度并写入 context,供 Grid 在 scroll.autoCalc 时计算 scroll.y(对齐 table useGenScroll)。autoCalc 时 overflow 为 hidden,仅 Table 内部滚动。 */
25
+ function ScrollAreaMeasurer(_ref) {
26
+ var children = _ref.children,
27
+ onHeight = _ref.onHeight,
28
+ autoCalc = _ref.autoCalc;
29
+ var ref = useRef(null);
30
+ useEffect(function () {
31
+ var el = ref.current;
32
+ if (!el) return;
33
+ var ro = new ResizeObserver(function (entries) {
34
+ var entry = entries[0];
35
+ if (entry) onHeight(entry.contentRect.height);
36
+ });
37
+ ro.observe(el);
38
+ onHeight(el.getBoundingClientRect().height);
39
+ return function () {
40
+ ro.disconnect();
41
+ onHeight(null);
42
+ };
43
+ }, [onHeight]);
44
+ return /*#__PURE__*/React.createElement("div", {
45
+ ref: ref,
46
+ className: "pisell-record-board-scroll-body",
47
+ style: _objectSpread(_objectSpread({}, FILL_HEIGHT_SCROLL_STYLE), {}, {
48
+ overflow: autoCalc ? 'hidden' : 'auto'
49
+ })
50
+ }, children);
51
+ }
52
+ var FILL_HEIGHT_WRAPPER_STYLE = {
53
+ flex: 1,
54
+ minHeight: 0,
55
+ display: 'flex',
56
+ flexDirection: 'column'
57
+ };
58
+
59
+ /**
60
+ * Shell Frame:基于 PisellShellFrame 的 RecordBoard 壳层。
61
+ * 提供工具栏、多选操作条、分页;与 Layout 同级,包裹在 Layout 外层。
62
+ * 默认占满父容器高度,内容区可滚动,分页器固定在底部。
63
+ *
64
+ * 使用方式:
65
+ * <PisellRecordBoard>
66
+ * <PisellRecordBoard.ShellFrame>
67
+ * <PisellRecordBoard.GridLayout />
68
+ * </PisellRecordBoard.ShellFrame>
69
+ * </PisellRecordBoard>
70
+ */
71
+ var RecordBoardShellFrame = function RecordBoardShellFrame(_ref2) {
72
+ var _ctx$setScrollAreaHei, _ctx$childComponentPr;
73
+ var children = _ref2.children,
74
+ className = _ref2.className,
75
+ style = _ref2.style;
76
+ var ctx = useRecordBoardContext({
77
+ displayName: 'RecordBoard.ShellFrame'
78
+ });
79
+ var fillHeight = (ctx === null || ctx === void 0 ? void 0 : ctx.fillHeight) === true;
80
+ var bodyContent = fillHeight ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ScrollAreaMeasurer, {
81
+ onHeight: (_ctx$setScrollAreaHei = ctx === null || ctx === void 0 ? void 0 : ctx.setScrollAreaHeight) !== null && _ctx$setScrollAreaHei !== void 0 ? _ctx$setScrollAreaHei : function () {},
82
+ autoCalc: ctx === null || ctx === void 0 || (_ctx$childComponentPr = ctx.childComponentProps) === null || _ctx$childComponentPr === void 0 || (_ctx$childComponentPr = _ctx$childComponentPr.grid) === null || _ctx$childComponentPr === void 0 || (_ctx$childComponentPr = _ctx$childComponentPr.scroll) === null || _ctx$childComponentPr === void 0 ? void 0 : _ctx$childComponentPr.autoCalc
83
+ }, children), /*#__PURE__*/React.createElement(RecordBoardPagination, null)) : /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(RecordBoardPagination, null));
84
+ var shellStyle = fillHeight && style ? _objectSpread(_objectSpread({}, style), FILL_HEIGHT_WRAPPER_STYLE) : fillHeight ? FILL_HEIGHT_WRAPPER_STYLE : style;
85
+ var wrapper = /*#__PURE__*/React.createElement(PisellShellFrame, {
86
+ className: className,
87
+ style: shellStyle,
88
+ config: {
89
+ showToolbar: true,
90
+ showBatchActionBar: true
91
+ },
92
+ toolbar: /*#__PURE__*/React.createElement(RecordBoardToolBar, null),
93
+ batchActionBar: /*#__PURE__*/React.createElement(RecordBoardBatchActionBar, null)
94
+ }, bodyContent);
95
+ if (fillHeight) {
96
+ return /*#__PURE__*/React.createElement("div", {
97
+ style: FILL_HEIGHT_WRAPPER_STYLE
98
+ }, wrapper);
99
+ }
100
+ return wrapper;
101
+ };
102
+ RecordBoardShellFrame.displayName = 'RecordBoard.ShellFrame';
103
+ export default RecordBoardShellFrame;
104
+ export { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch, ToolBarReset, ToolBarQuickFilter };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,41 @@
1
+ import type { RecordBoardColumnType } from '../types';
2
+ import type { FilterValueType } from '../../filter/components/FilterButton/types';
3
+ import type { SortItemProps } from '../../sort/types';
4
+ /** 获取列唯一 key,供列显示隐藏等使用 */
5
+ export declare function getRecordBoardColumnKey(column: RecordBoardColumnType): string;
6
+ export interface UniformColumnSummaryItem {
7
+ columnKey: string;
8
+ title: string;
9
+ type: 'uniform' | 'empty';
10
+ /** 无 render 时的回退展示 */
11
+ displayValue?: string;
12
+ /** 仅用于判断是否相等的值(uniformCompare 的返回值或 dataIndex 取值),不参与 render */
13
+ value?: any;
14
+ /** 表格里该列单元格的值(dataIndex 从 record 取值),传给 render 的与表格单元格一致 */
15
+ cellValue?: any;
16
+ /** 代表行(如首行),供列 render 使用 */
17
+ record?: any;
18
+ }
19
+ /**
20
+ * 根据当前页 data 计算:哪些列「全列同值」或「全空」应隐藏,以及总结区展示项。
21
+ * 仅当 grid.collapseUniformColumns 为 true 时使用。
22
+ */
23
+ export declare function computeUniformColumnSummary(data: any[], columns: RecordBoardColumnType[]): {
24
+ uniformHiddenColumnKeys: string[];
25
+ summaryItems: UniformColumnSummaryItem[];
26
+ };
27
+ /**
28
+ * 处理列配置:对带 type 的列注入基于 Pisell 组件的 render,其余列保持不变。
29
+ * 有 type 时若列上传入了 render 则优先使用(覆盖自动派生)。
30
+ */
31
+ export declare function processColumnsForGrid<RecordType = any>(columns: RecordBoardColumnType<RecordType>[] | undefined): RecordBoardColumnType<RecordType>[];
32
+ /**
33
+ * 从 columns 派生排序列表(SortItemProps[])。
34
+ * 有 type 的列:根据组件 SortOptions(或默认)生成;无 type 的列:根据 sortable + sort 生成。
35
+ */
36
+ export declare function deriveSortFromColumns(columns: RecordBoardColumnType[] | undefined): SortItemProps[];
37
+ /**
38
+ * 从 columns 派生 filter 列表(quickFilter + otherFilter)。
39
+ * 有 type 的列:根据 type + fieldProps 生成筛选项;无 type 的列:根据 filterable + filter 生成。
40
+ */
41
+ export declare function deriveFilterFromColumns(columns: RecordBoardColumnType[] | undefined): FilterValueType;