@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
@@ -0,0 +1,2 @@
1
+ import { createContext } from 'react';
2
+ export var RecordBoardContext = /*#__PURE__*/createContext(null);
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { RecordBoardContext } from "./RecordBoardContext";
3
+ /**
4
+ * 仅负责注入 RecordBoard 上下文。
5
+ * 实际的数据源、onSearch/onPageChange 由上层(如接 DataSourceContainer 或独立 fetch)提供。
6
+ */
7
+ export var RecordBoardProvider = function RecordBoardProvider(_ref) {
8
+ var value = _ref.value,
9
+ children = _ref.children;
10
+ return /*#__PURE__*/React.createElement(RecordBoardContext.Provider, {
11
+ value: value
12
+ }, children);
13
+ };
@@ -0,0 +1,29 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ 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 { useContext } from 'react';
8
+ import { RecordBoardContext } from "../context/RecordBoardContext";
9
+
10
+ /**
11
+ * 消费 RecordBoard 上下文,供各 layout 内子组件(Search / ToolBar / Grid / CardList / Pagination)使用。
12
+ * 若传入 displayName,返回会合并 childComponentProps[displayName] 便于透传。
13
+ * 当 displayName 为 'grid' 时,返回类型包含 RecordBoardGridProps(columns、scroll、size)。
14
+ */
15
+
16
+ export function useRecordBoardContext() {
17
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18
+ var ctx = useContext(RecordBoardContext);
19
+ if (!ctx) {
20
+ throw new Error('useRecordBoardContext 必须在 PisellRecordBoard(或 RecordBoardProvider)下使用');
21
+ }
22
+ var displayName = options.displayName,
23
+ childComponentProps = options.childComponentProps;
24
+ var mergedChildProps = childComponentProps !== null && childComponentProps !== void 0 ? childComponentProps : ctx.childComponentProps;
25
+ if (displayName && mergedChildProps !== null && mergedChildProps !== void 0 && mergedChildProps[displayName]) {
26
+ return _objectSpread(_objectSpread({}, ctx), mergedChildProps[displayName]);
27
+ }
28
+ return ctx;
29
+ }
@@ -0,0 +1,35 @@
1
+ import React from 'react';
2
+ import GridLayout from './layouts/GridLayout';
3
+ import CardLayout from './layouts/CardLayout';
4
+ import RecordBoardShellFrame, { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch } from './shellFrame';
5
+ import RecordBoardGridView from './layouts/GridLayout/Grid';
6
+ import RecordBoardCardList from './layouts/CardLayout/CardList';
7
+ import { useRecordBoardContext } from './hooks/useRecordBoardContext';
8
+ import type { RecordBoardProps } from './types';
9
+ /** RecordBoard 复合组件类型 */
10
+ interface PisellRecordBoardType extends React.FC<RecordBoardProps> {
11
+ /** Shell Frame:对 Layout 的扩展,提供 ToolBar + BatchActionBar + children(Layout) */
12
+ ShellFrame: typeof RecordBoardShellFrame;
13
+ /** Grid 布局:仅内容区(表格 + 分页),需配合 ShellFrame 使用 */
14
+ GridLayout: typeof GridLayout;
15
+ /** 卡片布局:仅内容区(卡片列表 + 分页),需配合 ShellFrame 使用 */
16
+ CardLayout: typeof CardLayout;
17
+ /** 单独使用:搜索槽(PisellFind,绑定 searchParams.keyword / onSearch) */
18
+ Search: typeof RecordBoardSearch;
19
+ /** 单独使用:工具栏(PisellToolBar,含搜索/导出,可透传 topLeft/topRight 等) */
20
+ ToolBar: typeof RecordBoardToolBar;
21
+ /** 单独使用:分页槽 */
22
+ Pagination: typeof RecordBoardPagination;
23
+ /** 单独使用:Grid 视图(表格) */
24
+ Grid: typeof RecordBoardGridView;
25
+ /** 单独使用:卡片列表视图 */
26
+ CardList: typeof RecordBoardCardList;
27
+ /** 多选操作栏(基于 PisellBatchActionBar,有选中项时展示) */
28
+ BatchActionBar: typeof RecordBoardBatchActionBar;
29
+ /** 消费 RecordBoard 上下文 */
30
+ useRecordBoardContext: typeof useRecordBoardContext;
31
+ }
32
+ declare const PisellRecordBoard: PisellRecordBoardType;
33
+ export default PisellRecordBoard;
34
+ export type { RecordBoardProps, RecordBoardLayoutType, RecordBoardContextValue, RecordBoardChildComponentProps, RecordBoardGridProps, RecordBoardColumnType, RecordBoardFieldType, RecordBoardColumnFilterConfig, RecordBoardOptionItem, RecordBoardGetOptions, } from './types';
35
+ export { useRecordBoardContext } from './hooks/useRecordBoardContext';
@@ -0,0 +1,23 @@
1
+ import PisellRecordBoardComponent from "./PisellRecordBoard";
2
+ import GridLayout from "./layouts/GridLayout";
3
+ import CardLayout from "./layouts/CardLayout";
4
+ import RecordBoardShellFrame, { RecordBoardToolBar, RecordBoardBatchActionBar, RecordBoardPagination, RecordBoardSearch } from "./shellFrame";
5
+ import RecordBoardGridView from "./layouts/GridLayout/Grid";
6
+ import RecordBoardCardList from "./layouts/CardLayout/CardList";
7
+ import { useRecordBoardContext } from "./hooks/useRecordBoardContext";
8
+
9
+ /** RecordBoard 复合组件类型 */
10
+
11
+ var PisellRecordBoard = PisellRecordBoardComponent;
12
+ PisellRecordBoard.ShellFrame = RecordBoardShellFrame;
13
+ PisellRecordBoard.GridLayout = GridLayout;
14
+ PisellRecordBoard.CardLayout = CardLayout;
15
+ PisellRecordBoard.Search = RecordBoardSearch;
16
+ PisellRecordBoard.ToolBar = RecordBoardToolBar;
17
+ PisellRecordBoard.Pagination = RecordBoardPagination;
18
+ PisellRecordBoard.Grid = RecordBoardGridView;
19
+ PisellRecordBoard.CardList = RecordBoardCardList;
20
+ PisellRecordBoard.BatchActionBar = RecordBoardBatchActionBar;
21
+ PisellRecordBoard.useRecordBoardContext = useRecordBoardContext;
22
+ export default PisellRecordBoard;
23
+ export { useRecordBoardContext } from "./hooks/useRecordBoardContext";
@@ -0,0 +1,36 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["render"];
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 _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
+ 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
+ import React from 'react';
11
+ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
12
+ /**
13
+ * Card 布局下的数据视图:从 context 取 data / loading。
14
+ */
15
+ var RecordBoardCardList = function RecordBoardCardList(props) {
16
+ var _ctx$data$length, _ctx$data;
17
+ var ctx = useRecordBoardContext({
18
+ displayName: 'cardList'
19
+ });
20
+ var render = props.render,
21
+ rest = _objectWithoutProperties(props, _excluded);
22
+ if (typeof render === 'function') {
23
+ return /*#__PURE__*/React.createElement(React.Fragment, null, render(_objectSpread(_objectSpread({}, ctx), rest)));
24
+ }
25
+ return /*#__PURE__*/React.createElement("div", {
26
+ "data-layout-slot": "cardList",
27
+ style: {
28
+ minHeight: 120
29
+ }
30
+ }, /*#__PURE__*/React.createElement("span", {
31
+ style: {
32
+ color: 'var(--color-text-tertiary, #999)'
33
+ }
34
+ }, "\u5361\u7247\u89C6\u56FE\uFF08", (_ctx$data$length = (_ctx$data = ctx.data) === null || _ctx$data === void 0 ? void 0 : _ctx$data.length) !== null && _ctx$data$length !== void 0 ? _ctx$data$length : 0, " \u6761\uFF0Cloading:", ' ', String(ctx.loading), "\uFF09"));
35
+ };
36
+ export default RecordBoardCardList;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import RecordBoardCardList from "./CardList";
3
+
4
+ /**
5
+ * Card 布局:仅内容区 = 卡片列表(不含分页)。
6
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
7
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.CardLayout /></PisellRecordBoard.ShellFrame>
8
+ */
9
+ var CardLayout = function CardLayout(_ref) {
10
+ var className = _ref.className,
11
+ style = _ref.style;
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ className: className,
14
+ style: style,
15
+ "data-layout": "card"
16
+ }, /*#__PURE__*/React.createElement(RecordBoardCardList, null));
17
+ };
18
+ CardLayout.displayName = 'RecordBoard.CardLayout';
19
+ export default CardLayout;
20
+ export { RecordBoardCardList as CardLayoutCardList };
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import type { TableProps } from 'antd';
3
+ import type { RecordBoardContextValue } from '../../types';
4
+ import './Grid.less';
5
+ export interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
6
+ /** 列配置,同 antd Table columns */
7
+ columns?: TableProps<any>['columns'];
8
+ className?: string;
9
+ style?: React.CSSProperties;
10
+ /** 自定义渲染,传入后不再使用内置 Table */
11
+ render?: (ctx: RecordBoardContextValue) => React.ReactNode;
12
+ }
13
+ declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
14
+ export default RecordBoardGridView;
@@ -0,0 +1,242 @@
1
+ var _excluded = ["render", "columns", "rowKey", "rowSelection"],
2
+ _excluded2 = ["autoCalc"];
3
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
6
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
8
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
9
+ 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); }
10
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
11
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
12
+ 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."); }
13
+ 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); }
14
+ 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; }
15
+ 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; } }
16
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
17
+ 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; }
18
+ 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; }
19
+ import React, { useMemo, useRef, useState, useEffect } from 'react';
20
+ import { Table } from 'antd';
21
+ import { useRecordBoardContext } from "../../hooks/useRecordBoardContext";
22
+ import { processColumnsForGrid, getRecordBoardColumnKey, computeUniformColumnSummary } from "../../utils/recordBoardColumns";
23
+ import { getText } from "../../../../locales";
24
+ import "./Grid.less";
25
+ function getRowKey(record, rowKey) {
26
+ var _ref, _record$id;
27
+ if (typeof rowKey === 'function') {
28
+ return rowKey(record);
29
+ }
30
+ if (typeof rowKey === 'string' && record != null && rowKey in record) {
31
+ return record[rowKey];
32
+ }
33
+ return (_ref = (_record$id = record === null || record === void 0 ? void 0 : record.id) !== null && _record$id !== void 0 ? _record$id : record === null || record === void 0 ? void 0 : record.key) !== null && _ref !== void 0 ? _ref : record;
34
+ }
35
+
36
+ /**
37
+ * Grid 布局下的数据视图:使用 antd Table,从 context 取 data / loading / 多选态。
38
+ */
39
+ /** Context 中与 Table 无关的 key,透传 Table 时排除,避免覆盖或无效传递(含 grid 合并进的 columns/scroll 等) */
40
+ var CONTEXT_ONLY_KEYS = ['data', 'loading', 'total', 'pagination', 'onPageChange', 'searchParams', 'onSearch', 'onReset', 'layoutType', 'selectedKeys', 'selectedRows', 'onSelectionChange', 'rowKey', 'childComponentProps', 'columnVisibility', 'onColumnVisibilityChange', 'columns', 'scroll', 'size', 'defaultHiddenColumnKeys', 'scrollAreaHeight', 'setScrollAreaHeight', 'collapseUniformColumns', 'columnOrder', 'onColumnOrderChange'];
41
+ var RecordBoardGridView = function RecordBoardGridView(props) {
42
+ var _ref2, _ctx$data2, _ctx$data3;
43
+ var ctx = useRecordBoardContext({
44
+ displayName: 'grid'
45
+ });
46
+ var render = props.render,
47
+ columnsProp = props.columns,
48
+ rowKeyProp = props.rowKey,
49
+ rowSelectionProp = props.rowSelection,
50
+ rest = _objectWithoutProperties(props, _excluded);
51
+
52
+ // columns 优先用 props,其次用 childComponentProps.grid 合并进 ctx 的 columns
53
+ var rawColumns = (_ref2 = columnsProp !== null && columnsProp !== void 0 ? columnsProp : ctx.columns) !== null && _ref2 !== void 0 ? _ref2 : [];
54
+ var columnVisibility = ctx.columnVisibility;
55
+ var columnOrder = ctx.columnOrder;
56
+ var collapseUniformColumns = ctx.collapseUniformColumns !== false;
57
+
58
+ /** 同值列总结区高度,用于 autoCalc 时正确计算 scroll.y */
59
+ var summaryRef = useRef(null);
60
+ var _useState = useState(0),
61
+ _useState2 = _slicedToArray(_useState, 2),
62
+ uniformSummaryHeight = _useState2[0],
63
+ setUniformSummaryHeight = _useState2[1];
64
+ var _useMemo = useMemo(function () {
65
+ var _ctx$data;
66
+ var list = rawColumns;
67
+ if (Array.isArray(columnOrder) && columnOrder.length > 0) {
68
+ var keyToCol = new Map(list.map(function (c) {
69
+ return [getRecordBoardColumnKey(c), c];
70
+ }));
71
+ var ordered = [];
72
+ var _iterator = _createForOfIteratorHelper(columnOrder),
73
+ _step;
74
+ try {
75
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
76
+ var key = _step.value;
77
+ var col = keyToCol.get(key);
78
+ if (col) ordered.push(col);
79
+ }
80
+ } catch (err) {
81
+ _iterator.e(err);
82
+ } finally {
83
+ _iterator.f();
84
+ }
85
+ list.forEach(function (col) {
86
+ var key = getRecordBoardColumnKey(col);
87
+ if (!columnOrder.includes(key)) ordered.push(col);
88
+ });
89
+ list = ordered;
90
+ }
91
+ var visibleByUser = columnVisibility == null ? list : list.filter(function (col) {
92
+ return columnVisibility[getRecordBoardColumnKey(col)] !== false;
93
+ });
94
+ var data = (_ctx$data = ctx.data) !== null && _ctx$data !== void 0 ? _ctx$data : [];
95
+ var shouldCollapseUniform = collapseUniformColumns && data.length > 5;
96
+ if (!shouldCollapseUniform) {
97
+ return {
98
+ columns: processColumnsForGrid(visibleByUser),
99
+ uniformSummaryItems: [],
100
+ processedColumnsForSummary: undefined
101
+ };
102
+ }
103
+ var processedAllVisible = processColumnsForGrid(visibleByUser);
104
+ var _computeUniformColumn = computeUniformColumnSummary(data, visibleByUser),
105
+ uniformHiddenColumnKeys = _computeUniformColumn.uniformHiddenColumnKeys,
106
+ items = _computeUniformColumn.summaryItems;
107
+ var columnsForTable = processedAllVisible.filter(function (col) {
108
+ return !uniformHiddenColumnKeys.includes(getRecordBoardColumnKey(col));
109
+ });
110
+ return {
111
+ columns: columnsForTable,
112
+ uniformSummaryItems: items,
113
+ processedColumnsForSummary: items.length > 0 ? processedAllVisible : undefined
114
+ };
115
+ }, [rawColumns, columnVisibility, columnOrder, collapseUniformColumns, ctx.data]),
116
+ columns = _useMemo.columns,
117
+ summaryItems = _useMemo.uniformSummaryItems,
118
+ processedColumnsForSummary = _useMemo.processedColumnsForSummary;
119
+ var tableRowKey = useMemo(function () {
120
+ var _ref3, _ctx$rowKey;
121
+ var key = (_ref3 = (_ctx$rowKey = ctx.rowKey) !== null && _ctx$rowKey !== void 0 ? _ctx$rowKey : rowKeyProp) !== null && _ref3 !== void 0 ? _ref3 : 'id';
122
+ return typeof key === 'function' ? key : function (record) {
123
+ return getRowKey(record, typeof key === 'string' ? key : String(key));
124
+ };
125
+ }, [ctx.rowKey, rowKeyProp]);
126
+ var rowSelectionConfig = rowSelectionProp !== null && rowSelectionProp !== void 0 ? rowSelectionProp : ctx.rowSelection;
127
+ var rowSelection = useMemo(function () {
128
+ if (rowSelectionConfig === false) return undefined;
129
+ var base = _typeof(rowSelectionConfig) === 'object' ? rowSelectionConfig : {};
130
+ return _objectSpread(_objectSpread({}, base), {}, {
131
+ selectedRowKeys: ctx.selectedKeys,
132
+ onChange: function onChange(selectedRowKeys, selectedRows) {
133
+ var _onChange, _ref4;
134
+ ctx.onSelectionChange(selectedRowKeys, selectedRows);
135
+ (_onChange = (_ref4 = base).onChange) === null || _onChange === void 0 || _onChange.call(_ref4, selectedRowKeys, selectedRows);
136
+ }
137
+ });
138
+ }, [ctx.selectedKeys, ctx.onSelectionChange, rowSelectionConfig]);
139
+
140
+ /** 测量同值列总结区高度,供 autoCalc 时 scroll.y 减去该高度 */
141
+ useEffect(function () {
142
+ if (summaryItems.length === 0) {
143
+ setUniformSummaryHeight(0);
144
+ return;
145
+ }
146
+ var el = summaryRef.current;
147
+ if (!el) return;
148
+ var ro = new ResizeObserver(function (entries) {
149
+ var entry = entries[0];
150
+ if (entry) setUniformSummaryHeight(entry.contentRect.height);
151
+ });
152
+ ro.observe(el);
153
+ return function () {
154
+ ro.disconnect();
155
+ setUniformSummaryHeight(0);
156
+ };
157
+ }, [summaryItems.length]);
158
+
159
+ // grid 透传的 Table props(onRow、onHeaderRow、expandable、rowClassName、summary 等)从 ctx 取出并传给 Table
160
+ var gridTableProps = useMemo(function () {
161
+ var picked = {};
162
+ Object.keys(ctx).forEach(function (k) {
163
+ if (CONTEXT_ONLY_KEYS.includes(k)) return;
164
+ picked[k] = ctx[k];
165
+ });
166
+ return picked;
167
+ }, [ctx]);
168
+ if (typeof render === 'function') {
169
+ return /*#__PURE__*/React.createElement(React.Fragment, null, render(_objectSpread(_objectSpread({}, ctx), rest)));
170
+ }
171
+ var dataSource = (_ctx$data2 = ctx.data) !== null && _ctx$data2 !== void 0 ? _ctx$data2 : [];
172
+ var isEmpty = !Array.isArray(dataSource) || dataSource.length === 0;
173
+ var sumColumnWidths = useMemo(function () {
174
+ return columns.reduce(function (sum, col) {
175
+ var _col$width;
176
+ return sum + ((_col$width = col.width) !== null && _col$width !== void 0 ? _col$width : 250);
177
+ }, 0) || 2000;
178
+ }, [columns]);
179
+
180
+ // 与 materials Table useGenScroll 对齐:autoCalc 时根据 scrollAreaHeight 计算 scroll.y;无数据且 scroll.x 非数字时用列宽之和避免表头被压窄换行
181
+ var tableScroll = useMemo(function () {
182
+ var _rest$scroll;
183
+ var scroll = (_rest$scroll = rest.scroll) !== null && _rest$scroll !== void 0 ? _rest$scroll : ctx.scroll;
184
+ var scrollX = isEmpty && scroll && typeof scroll.x !== 'number' ? sumColumnWidths : scroll === null || scroll === void 0 ? void 0 : scroll.x;
185
+ if (scroll !== null && scroll !== void 0 && scroll.autoCalc && typeof ctx.scrollAreaHeight === 'number') {
186
+ var wrapHeight = ctx.scrollAreaHeight;
187
+ // 40:表头等固定占高;uniformSummaryHeight:同值列总结区动态高度,无总结时为 0, 24是 uniformSummary padding
188
+ var reservedHeight = 40 + uniformSummaryHeight + 24;
189
+ return {
190
+ x: scrollX !== null && scrollX !== void 0 ? scrollX : sumColumnWidths,
191
+ y: Math.max(wrapHeight - reservedHeight, 100),
192
+ scrollToFirstRowOnChange: scroll.scrollToFirstRowOnChange
193
+ };
194
+ }
195
+ if (scroll && _typeof(scroll) === 'object') {
196
+ var _ref5 = scroll,
197
+ _a = _ref5.autoCalc,
198
+ restScroll = _objectWithoutProperties(_ref5, _excluded2);
199
+ var resolved = Object.keys(restScroll).length ? restScroll : undefined;
200
+ if (resolved) {
201
+ var _ref6;
202
+ return _objectSpread(_objectSpread({}, resolved), {}, {
203
+ x: (_ref6 = scrollX !== null && scrollX !== void 0 ? scrollX : resolved.x) !== null && _ref6 !== void 0 ? _ref6 : sumColumnWidths
204
+ });
205
+ }
206
+ return resolved;
207
+ }
208
+ return scroll;
209
+ }, [rest.scroll, ctx.scroll, ctx.scrollAreaHeight, ctx.pagination, columns, sumColumnWidths, isEmpty, uniformSummaryHeight]);
210
+ return /*#__PURE__*/React.createElement("div", {
211
+ "data-layout-slot": "grid",
212
+ className: "pisell-lowcode-record-board-grid"
213
+ }, summaryItems.length > 0 && /*#__PURE__*/React.createElement("div", {
214
+ ref: summaryRef,
215
+ className: "pisell-record-board-uniform-summary"
216
+ }, summaryItems.map(function (item) {
217
+ var _item$record, _item$displayValue;
218
+ var processedCol = processedColumnsForSummary === null || processedColumnsForSummary === void 0 ? void 0 : processedColumnsForSummary.find(function (c) {
219
+ return getRecordBoardColumnKey(c) === item.columnKey;
220
+ });
221
+ var useRender = typeof (processedCol === null || processedCol === void 0 ? void 0 : processedCol.render) === 'function';
222
+ // render 只接收表格单元格相同的 (value, record):value 固定用 cellValue(dataIndex 取值),绝不传 uniformCompare 的返回值
223
+ var content = useRender ? processedCol.render(item.cellValue, (_item$record = item.record) !== null && _item$record !== void 0 ? _item$record : {}, 0) : item.type === 'empty' ? getText('record-board-uniform-summary-empty') : (_item$displayValue = item.displayValue) !== null && _item$displayValue !== void 0 ? _item$displayValue : getText('record-board-uniform-summary-same');
224
+ return /*#__PURE__*/React.createElement("div", {
225
+ key: item.columnKey,
226
+ className: "pisell-record-board-uniform-summary-item"
227
+ }, /*#__PURE__*/React.createElement("span", {
228
+ className: "pisell-record-board-uniform-summary-label"
229
+ }, item.title), /*#__PURE__*/React.createElement("span", {
230
+ className: "pisell-record-board-uniform-summary-value"
231
+ }, content));
232
+ })), /*#__PURE__*/React.createElement(Table, _extends({}, rest, gridTableProps, {
233
+ scroll: tableScroll,
234
+ rowKey: tableRowKey,
235
+ dataSource: (_ctx$data3 = ctx.data) !== null && _ctx$data3 !== void 0 ? _ctx$data3 : [],
236
+ loading: ctx.loading,
237
+ columns: columns,
238
+ rowSelection: rowSelection,
239
+ pagination: false
240
+ })));
241
+ };
242
+ export default RecordBoardGridView;
@@ -0,0 +1,100 @@
1
+ // RecordBoard Grid 表格样式:默认单元格(表头+表体)padding 8px 16px
2
+ // 项目内 ant 组件 prefixCls 为 pisell-lowcode,故表格类名为 .pisell-lowcode-table-*
3
+ .pisell-lowcode-record-board-grid {
4
+ .pisell-lowcode-table-thead .pisell-lowcode-table-cell,
5
+ .pisell-lowcode-table-tbody .pisell-lowcode-table-cell {
6
+ padding: 8px 16px;
7
+ }
8
+ }
9
+
10
+ // 同值列折叠时的总结区样式(参考 Figma 12840-86869)
11
+ .pisell-record-board-uniform-summary {
12
+ display: flex;
13
+ flex-wrap: nowrap;
14
+ align-items: center;
15
+ gap: 32px;
16
+ min-height: 44px;
17
+ padding: 12px 24px;
18
+ background: #f2f4f7;
19
+ border-bottom: 1px solid #eaecf0;
20
+ border-radius: 8px 8px 0 0;
21
+
22
+ .pisell-record-board-uniform-summary-item {
23
+ display: flex;
24
+ align-items: center;
25
+ gap: 4px;
26
+ flex-shrink: 0;
27
+ }
28
+
29
+ .pisell-record-board-uniform-summary-label {
30
+ font-family: inherit;
31
+ font-size: 12px;
32
+ font-weight: 500;
33
+ line-height: 18px;
34
+ color: #475467;
35
+ white-space: nowrap;
36
+ }
37
+
38
+ .pisell-record-board-uniform-summary-value {
39
+ font-family: inherit;
40
+ font-size: 12px;
41
+ font-weight: 500;
42
+ line-height: 18px;
43
+ color: #475467;
44
+ white-space: nowrap;
45
+ }
46
+ }
47
+
48
+ // 纯 CSS 占满高度:滚动发生在 .pisell-record-board-scroll-body,表头 sticky 固定;高度传到 table
49
+ .pisell-record-board-scroll-body .pisell-lowcode-record-board-grid {
50
+ height: 100%;
51
+ display: flex;
52
+ flex-direction: column;
53
+ min-height: 0;
54
+
55
+ .pisell-lowcode-table-thead .pisell-lowcode-table-cell {
56
+ position: sticky;
57
+ top: 0;
58
+ z-index: 1;
59
+ background: var(--ant-color-bg-container, #ffffff);
60
+ }
61
+
62
+ /*
63
+ * 根本原因:表头所有单元格统一用了 z-index: 1,横向滚动时后面的列(非固定列)与固定列同层叠,
64
+ * 非固定列会盖住固定列。解决:仅对「固定列」提高 z-index。
65
+ * antd/rc-table 会给所有 fixed 列(含多选列)的 th/td 加上 .*-table-cell-fix-left,
66
+ * 用该类选择器即可覆盖任意数量的固定列,无需按 nth-child 逐个写。
67
+ */
68
+
69
+ .pisell-lowcode-table-thead .pisell-lowcode-table-cell-fix-left {
70
+ z-index: 2 !important;
71
+ background: var(--ant-color-bg-container, #ffffff) !important;
72
+ }
73
+
74
+ // 让 antd Table 外层占满,使 scroll.y 生效且高度链不断
75
+ .pisell-lowcode-table-wrapper {
76
+ flex: 1;
77
+ min-height: 0;
78
+ display: flex;
79
+ flex-direction: column;
80
+ }
81
+
82
+ .pisell-lowcode-table-wrapper .pisell-lowcode-table {
83
+ flex: 1;
84
+ min-height: 0;
85
+ display: flex;
86
+ flex-direction: column;
87
+ }
88
+
89
+ .pisell-lowcode-table-wrapper .pisell-lowcode-table .pisell-lowcode-table-container {
90
+ flex: 1;
91
+ min-height: 0;
92
+ display: flex;
93
+ flex-direction: column;
94
+ }
95
+ }
96
+
97
+ // 行状态样式示例(如 grid.rowClassName 返回 'pisell-record-board-row-cancelled')
98
+ .pisell-record-board-row-cancelled {
99
+ background: #fff1f0;
100
+ }
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import RecordBoardGridView from './Grid';
3
+ /**
4
+ * Grid 布局:仅内容区 = 表格(不含分页)。
5
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
6
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.GridLayout /></PisellRecordBoard.ShellFrame>
7
+ */
8
+ declare const GridLayout: React.FC<{
9
+ className?: string;
10
+ style?: React.CSSProperties;
11
+ }>;
12
+ export default GridLayout;
13
+ export { RecordBoardGridView as GridLayoutGrid };
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import RecordBoardGridView from "./Grid";
3
+
4
+ /**
5
+ * Grid 布局:仅内容区 = 表格(不含分页)。
6
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
7
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.GridLayout /></PisellRecordBoard.ShellFrame>
8
+ */
9
+ var GridLayout = function GridLayout(_ref) {
10
+ var className = _ref.className,
11
+ style = _ref.style;
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ className: className,
14
+ style: style,
15
+ "data-layout": "grid"
16
+ }, /*#__PURE__*/React.createElement(RecordBoardGridView, null));
17
+ };
18
+ GridLayout.displayName = 'RecordBoard.GridLayout';
19
+ export default GridLayout;
20
+ export { RecordBoardGridView as GridLayoutGrid };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { PisellBatchActionBarProps } from '../../../pisellBatchActionBar';
3
+ /**
4
+ * RecordBoard 下的多选操作栏:从 context 取选中态与数据,渲染 PisellBatchActionBar。
5
+ * 仅在有选中项时展示;全选/反选/清空基于当前页 data。
6
+ */
7
+ declare const RecordBoardBatchActionBar: React.FC<Partial<PisellBatchActionBarProps>>;
8
+ export default RecordBoardBatchActionBar;