@pisell/materials 3.3.85 → 3.3.86

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +6 -6
  6. package/build/lowcode/preview.js +8 -8
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +21 -21
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +21 -21
  11. package/es/components/Pagination/index.d.ts +4 -5
  12. package/es/components/Pagination/index.js +77 -59
  13. package/es/components/Pagination/index.less +13 -7
  14. package/es/components/PisellFields/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
  16. package/es/components/dataSourceComponents/fields/index.d.ts +2 -3
  17. package/es/components/filter/components/Dropdown/index.js +6 -2
  18. package/es/components/filter/components/FilterButton/index.js +19 -4
  19. package/es/components/filter/components/FilterButton/types.d.ts +8 -0
  20. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  21. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +90 -0
  22. package/es/components/filter/components/FilterItem/index.d.ts +3 -3
  23. package/es/components/filter/components/FilterItem/index.js +138 -7
  24. package/es/components/filter/components/FilterItem/index.less +90 -0
  25. package/es/components/filter/types.d.ts +4 -2
  26. package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +38 -29
  27. package/es/components/pisellCurrency/PisellCurrency.less +163 -25
  28. package/es/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  29. package/es/components/pisellCurrency/index.d.ts +2 -1
  30. package/es/components/pisellCurrency/index.js +16 -1
  31. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  32. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +30 -3
  33. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  34. package/es/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +68 -0
  35. package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  36. package/es/components/pisellDataSourceContainer/components/Table/index.js +5 -3
  37. package/es/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  38. package/es/components/pisellDataSourceContainer/components/Table/useColumns.js +37 -15
  39. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +21 -15
  40. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  41. package/es/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +6 -4
  42. package/es/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  43. package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +15 -4
  44. package/es/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  45. package/es/components/pisellDateTimeDisplay/utils/relativeDay.js +4 -2
  46. package/es/components/pisellEmail/PisellEmail.less +119 -10
  47. package/es/components/pisellEmail/PisellEmail.stories.js +1 -1
  48. package/es/components/pisellEmail/index.d.ts +3 -1
  49. package/es/components/pisellEmail/index.js +17 -1
  50. package/es/components/pisellFilter/index.js +76 -10
  51. package/es/components/pisellFind/index.js +11 -2
  52. package/es/components/pisellGridPro/ToolBar/index.less +23 -0
  53. package/es/components/pisellGridPro/index.d.ts +4 -0
  54. package/es/components/pisellLongText/PisellLongText.less +72 -4
  55. package/es/components/pisellLongText/PisellLongText.stories.js +1 -1
  56. package/es/components/pisellLongText/index.d.ts +2 -1
  57. package/es/components/pisellLongText/index.js +16 -1
  58. package/es/components/pisellLookup/PisellLookup.js +18 -9
  59. package/es/components/pisellLookup/PisellLookup.less +39 -16
  60. package/es/components/pisellLookup/components/LookupTrigger.js +14 -4
  61. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  62. package/es/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  63. package/es/components/pisellMultipleSelect/components/EditView.js +8 -2
  64. package/es/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  65. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +15 -11
  66. package/es/components/pisellMultipleSelect/index.d.ts +2 -1
  67. package/es/components/pisellMultipleSelect/index.js +16 -1
  68. package/es/components/pisellNumber/PisellNumber.less +135 -17
  69. package/es/components/pisellNumber/PisellNumber.stories.js +1 -1
  70. package/es/components/pisellNumber/index.d.ts +2 -1
  71. package/es/components/pisellNumber/index.js +16 -1
  72. package/es/components/pisellPercent/PisellPercent.less +142 -24
  73. package/es/components/pisellPercent/PisellPercent.stories.js +1 -1
  74. package/es/components/pisellPercent/index.d.ts +2 -1
  75. package/es/components/pisellPercent/index.js +16 -1
  76. package/es/components/pisellPhone/PisellPhone.less +122 -27
  77. package/es/components/pisellPhone/PisellPhone.stories.js +1 -1
  78. package/es/components/pisellPhone/components/EditView.js +1 -1
  79. package/es/components/pisellPhone/components/ReadOnlyView.js +15 -6
  80. package/es/components/pisellPhone/index.d.ts +2 -1
  81. package/es/components/pisellPhone/index.js +16 -1
  82. package/es/components/pisellRating/PisellRating.less +20 -12
  83. package/es/components/pisellRating/PisellRating.stories.js +1 -1
  84. package/es/components/pisellRating/index.d.ts +2 -1
  85. package/es/components/pisellRating/index.js +16 -1
  86. package/es/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  87. package/es/components/pisellRecordBoard/PisellRecordBoard.js +243 -0
  88. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  89. package/es/components/pisellRecordBoard/PisellRecordBoard.stories.js +2358 -0
  90. package/es/components/pisellRecordBoard/context/RecordBoardContext.js +2 -0
  91. package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +13 -0
  92. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +29 -0
  93. package/es/components/pisellRecordBoard/index.d.ts +35 -0
  94. package/es/components/pisellRecordBoard/index.js +23 -0
  95. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +36 -0
  96. package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +20 -0
  97. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  98. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +242 -0
  99. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  100. package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  101. package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +20 -0
  102. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  103. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +90 -0
  104. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  105. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +138 -0
  106. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  107. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +66 -0
  108. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  109. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  110. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +66 -0
  111. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  112. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  113. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +41 -0
  114. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  115. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  116. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +215 -0
  117. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  118. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +77 -0
  119. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  120. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +65 -0
  121. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  122. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  123. package/es/components/pisellRecordBoard/shellFrame/index.js +104 -0
  124. package/es/components/pisellRecordBoard/types.js +1 -0
  125. package/es/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  126. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +508 -0
  127. package/es/components/pisellRecordBoard/utils/withRecordBoard.js +27 -0
  128. package/es/components/pisellShellFrame/PisellShellFrame.js +107 -0
  129. package/es/components/pisellShellFrame/PisellShellFrame.less +78 -0
  130. package/es/components/pisellShellFrame/PisellShellFrame.stories.js +195 -0
  131. package/es/components/pisellShellFrame/index.js +1 -0
  132. package/es/components/pisellShellFrame/types.js +1 -0
  133. package/es/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  134. package/es/components/pisellSingleLineText/index.d.ts +2 -1
  135. package/es/components/pisellSingleLineText/index.js +16 -1
  136. package/es/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  137. package/es/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  138. package/es/components/pisellSingleSelect/components/EditView.js +8 -2
  139. package/es/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  140. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +10 -6
  141. package/es/components/pisellSingleSelect/index.d.ts +2 -1
  142. package/es/components/pisellSingleSelect/index.js +16 -1
  143. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -3
  144. package/es/components/pisellUrl/PisellUrl.less +120 -11
  145. package/es/components/pisellUrl/PisellUrl.stories.js +1 -1
  146. package/es/components/pisellUrl/index.d.ts +3 -1
  147. package/es/components/pisellUrl/index.js +17 -1
  148. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  149. package/es/components/select/index.less +18 -2
  150. package/es/components/sort/index.js +25 -3
  151. package/es/components/table/Table/fields/select/index.d.ts +0 -1
  152. package/es/components/table/Table/fields/text/index.d.ts +1 -0
  153. package/es/components/table/Table/utils.d.ts +1 -1
  154. package/es/index.d.ts +6 -2
  155. package/es/index.js +2 -0
  156. package/es/locales/en-US.d.ts +36 -0
  157. package/es/locales/en-US.js +50 -2
  158. package/es/locales/index.js +2 -2
  159. package/es/locales/ja.d.ts +2 -0
  160. package/es/locales/ja.js +2 -0
  161. package/es/locales/pt.d.ts +2 -0
  162. package/es/locales/pt.js +2 -0
  163. package/es/locales/zh-CN.d.ts +36 -0
  164. package/es/locales/zh-CN.js +54 -6
  165. package/es/locales/zh-TW.d.ts +36 -0
  166. package/es/locales/zh-TW.js +54 -6
  167. package/es/utils/tagColor.js +39 -0
  168. package/lib/components/Pagination/index.d.ts +4 -5
  169. package/lib/components/Pagination/index.js +44 -21
  170. package/lib/components/Pagination/index.less +13 -7
  171. package/lib/components/PisellFields/index.d.ts +2 -2
  172. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -1
  173. package/lib/components/dataSourceComponents/fields/index.d.ts +2 -3
  174. package/lib/components/filter/components/Dropdown/index.js +9 -2
  175. package/lib/components/filter/components/FilterButton/index.js +14 -3
  176. package/lib/components/filter/components/FilterButton/types.d.ts +8 -0
  177. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.d.ts +21 -0
  178. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
  179. package/lib/components/filter/components/FilterItem/index.d.ts +3 -3
  180. package/lib/components/filter/components/FilterItem/index.js +133 -4
  181. package/lib/components/filter/components/FilterItem/index.less +90 -0
  182. package/lib/components/filter/types.d.ts +4 -2
  183. package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -23
  184. package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
  185. package/lib/components/pisellCurrency/PisellCurrency.stories.js +1 -1
  186. package/lib/components/pisellCurrency/index.d.ts +2 -1
  187. package/lib/components/pisellCurrency/index.js +7 -0
  188. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.d.ts +7 -1
  189. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/index.js +18 -2
  190. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.d.ts +28 -0
  191. package/lib/components/pisellDataSourceContainer/components/ColumnsSetting/utils.js +81 -0
  192. package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +1 -0
  193. package/lib/components/pisellDataSourceContainer/components/Table/index.js +3 -1
  194. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.d.ts +1 -0
  195. package/lib/components/pisellDataSourceContainer/components/Table/useColumns.js +25 -14
  196. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +17 -11
  197. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  198. package/lib/components/pisellDateTimeDisplay/hooks/useCurrentTime.js +7 -1
  199. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.d.ts +2 -2
  200. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +10 -2
  201. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.d.ts +1 -0
  202. package/lib/components/pisellDateTimeDisplay/utils/relativeDay.js +2 -1
  203. package/lib/components/pisellEmail/PisellEmail.less +119 -10
  204. package/lib/components/pisellEmail/PisellEmail.stories.js +1 -1
  205. package/lib/components/pisellEmail/index.d.ts +3 -1
  206. package/lib/components/pisellEmail/index.js +10 -2
  207. package/lib/components/pisellFilter/index.js +79 -8
  208. package/lib/components/pisellFind/index.js +11 -2
  209. package/lib/components/pisellGridPro/ToolBar/index.less +23 -0
  210. package/lib/components/pisellGridPro/index.d.ts +4 -0
  211. package/lib/components/pisellLongText/PisellLongText.less +72 -4
  212. package/lib/components/pisellLongText/PisellLongText.stories.js +1 -1
  213. package/lib/components/pisellLongText/index.d.ts +2 -1
  214. package/lib/components/pisellLongText/index.js +7 -0
  215. package/lib/components/pisellLookup/PisellLookup.js +12 -6
  216. package/lib/components/pisellLookup/PisellLookup.less +39 -16
  217. package/lib/components/pisellLookup/components/LookupTrigger.js +9 -3
  218. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +159 -124
  219. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.stories.js +1 -1
  220. package/lib/components/pisellMultipleSelect/components/EditView.js +4 -1
  221. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.d.ts +1 -1
  222. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +29 -1
  223. package/lib/components/pisellMultipleSelect/index.d.ts +2 -1
  224. package/lib/components/pisellMultipleSelect/index.js +7 -0
  225. package/lib/components/pisellNumber/PisellNumber.less +135 -17
  226. package/lib/components/pisellNumber/PisellNumber.stories.js +1 -1
  227. package/lib/components/pisellNumber/index.d.ts +2 -1
  228. package/lib/components/pisellNumber/index.js +7 -0
  229. package/lib/components/pisellPercent/PisellPercent.less +142 -24
  230. package/lib/components/pisellPercent/PisellPercent.stories.js +1 -1
  231. package/lib/components/pisellPercent/index.d.ts +2 -1
  232. package/lib/components/pisellPercent/index.js +7 -0
  233. package/lib/components/pisellPhone/PisellPhone.less +122 -27
  234. package/lib/components/pisellPhone/PisellPhone.stories.js +1 -1
  235. package/lib/components/pisellPhone/components/EditView.js +1 -1
  236. package/lib/components/pisellPhone/components/ReadOnlyView.js +18 -4
  237. package/lib/components/pisellPhone/index.d.ts +2 -1
  238. package/lib/components/pisellPhone/index.js +7 -0
  239. package/lib/components/pisellRating/PisellRating.less +20 -12
  240. package/lib/components/pisellRating/PisellRating.stories.js +1 -1
  241. package/lib/components/pisellRating/index.d.ts +2 -1
  242. package/lib/components/pisellRating/index.js +7 -0
  243. package/lib/components/pisellRecordBoard/PisellRecordBoard.d.ts +8 -0
  244. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +263 -0
  245. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.d.ts +81 -0
  246. package/lib/components/pisellRecordBoard/PisellRecordBoard.stories.js +1673 -0
  247. package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +30 -0
  248. package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +46 -0
  249. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +47 -0
  250. package/lib/components/pisellRecordBoard/index.d.ts +35 -0
  251. package/lib/components/pisellRecordBoard/index.js +59 -0
  252. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +46 -0
  253. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +46 -0
  254. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +14 -0
  255. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +264 -0
  256. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +100 -0
  257. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +13 -0
  258. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +46 -0
  259. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +8 -0
  260. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +108 -0
  261. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.d.ts +15 -0
  262. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +173 -0
  263. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.d.ts +8 -0
  264. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +100 -0
  265. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  266. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +14 -0
  267. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +90 -0
  268. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +78 -0
  269. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +10 -0
  270. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +53 -0
  271. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +112 -0
  272. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +11 -0
  273. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +247 -0
  274. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +17 -0
  275. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +93 -0
  276. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +16 -0
  277. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +85 -0
  278. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  279. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  280. package/lib/components/pisellRecordBoard/shellFrame/index.js +137 -0
  281. package/lib/components/pisellRecordBoard/types.js +17 -0
  282. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.d.ts +41 -0
  283. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +365 -0
  284. package/lib/components/pisellRecordBoard/utils/withRecordBoard.js +49 -0
  285. package/lib/components/pisellShellFrame/PisellShellFrame.js +113 -0
  286. package/lib/components/pisellShellFrame/PisellShellFrame.less +78 -0
  287. package/lib/components/pisellShellFrame/PisellShellFrame.stories.js +129 -0
  288. package/lib/components/pisellShellFrame/index.js +40 -0
  289. package/lib/components/pisellShellFrame/types.js +17 -0
  290. package/lib/components/pisellSingleLineText/PisellSingleLineText.stories.js +1 -1
  291. package/lib/components/pisellSingleLineText/index.d.ts +2 -1
  292. package/lib/components/pisellSingleLineText/index.js +7 -0
  293. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +103 -46
  294. package/lib/components/pisellSingleSelect/PisellSingleSelect.stories.js +1 -1
  295. package/lib/components/pisellSingleSelect/components/EditView.js +4 -1
  296. package/lib/components/pisellSingleSelect/components/ReadOnlyView.d.ts +1 -1
  297. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +12 -9
  298. package/lib/components/pisellSingleSelect/index.d.ts +2 -1
  299. package/lib/components/pisellSingleSelect/index.js +7 -0
  300. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +6 -2
  301. package/lib/components/pisellUrl/PisellUrl.less +120 -11
  302. package/lib/components/pisellUrl/PisellUrl.stories.js +1 -1
  303. package/lib/components/pisellUrl/index.d.ts +3 -1
  304. package/lib/components/pisellUrl/index.js +10 -2
  305. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  306. package/lib/components/select/index.less +18 -2
  307. package/lib/components/sort/index.js +13 -3
  308. package/lib/components/table/Table/fields/select/index.d.ts +0 -1
  309. package/lib/components/table/Table/fields/text/index.d.ts +1 -0
  310. package/lib/components/table/Table/utils.d.ts +1 -1
  311. package/lib/index.d.ts +6 -2
  312. package/lib/index.js +6 -0
  313. package/lib/locales/en-US.d.ts +36 -0
  314. package/lib/locales/en-US.js +42 -2
  315. package/lib/locales/index.js +2 -2
  316. package/lib/locales/ja.d.ts +2 -0
  317. package/lib/locales/ja.js +2 -0
  318. package/lib/locales/pt.d.ts +2 -0
  319. package/lib/locales/pt.js +2 -0
  320. package/lib/locales/zh-CN.d.ts +36 -0
  321. package/lib/locales/zh-CN.js +46 -6
  322. package/lib/locales/zh-TW.d.ts +36 -0
  323. package/lib/locales/zh-TW.js +46 -6
  324. package/lib/utils/tagColor.js +60 -0
  325. package/lowcode/auto-resize-text/meta.ts +1 -1
  326. package/package.json +3 -3
  327. package/es/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  328. package/es/components/PisellProcedure/index.d.ts +0 -5
  329. package/es/components/PisellSteps/PisellSteps.d.ts +0 -14
  330. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  331. package/es/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  332. package/es/components/pisellDateTimeDisplay/types.d.ts +0 -347
  333. package/es/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  334. package/es/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  335. package/es/components/pisellLookup/PisellLookup.d.ts +0 -4
  336. package/es/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  337. package/es/components/pisellLookup/components/HotWords.d.ts +0 -7
  338. package/es/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  339. package/es/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  340. package/es/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  341. package/es/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  342. package/es/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  343. package/es/components/pisellLookup/components/index.d.ts +0 -9
  344. package/es/components/pisellLookup/hooks/index.d.ts +0 -6
  345. package/es/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  346. package/es/components/pisellLookup/index.d.ts +0 -6
  347. package/es/components/pisellLookup/types.d.ts +0 -666
  348. package/es/components/pisellLookup/utils/index.d.ts +0 -5
  349. package/es/components/pisellLookup/utils/trigger.d.ts +0 -42
  350. package/es/components/pisellSort/type.d.ts +0 -7
  351. package/es/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  352. package/es/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  353. package/es/components/sort/types.d.ts +0 -20
  354. package/es/components/virtualInput/index.d.ts +0 -29
  355. package/es/hooks/useThemeTokens.d.ts +0 -7
  356. package/lib/components/PisellProcedure/PisellProcedure.stories.d.ts +0 -163
  357. package/lib/components/PisellProcedure/index.d.ts +0 -5
  358. package/lib/components/PisellSteps/PisellSteps.d.ts +0 -14
  359. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.d.ts +0 -7
  360. package/lib/components/pisellDateTimeDisplay/formats/index.d.ts +0 -1
  361. package/lib/components/pisellDateTimeDisplay/types.d.ts +0 -347
  362. package/lib/components/pisellDateTimeDisplay/utils/formatTime.d.ts +0 -19
  363. package/lib/components/pisellDateTimeDisplay/utils/getRefreshInterval.d.ts +0 -18
  364. package/lib/components/pisellLookup/PisellLookup.d.ts +0 -4
  365. package/lib/components/pisellLookup/PisellLookup.stories.d.ts +0 -129
  366. package/lib/components/pisellLookup/components/HotWords.d.ts +0 -7
  367. package/lib/components/pisellLookup/components/LookupAuxiliary.d.ts +0 -7
  368. package/lib/components/pisellLookup/components/LookupResultHost.d.ts +0 -7
  369. package/lib/components/pisellLookup/components/LookupTrigger.d.ts +0 -3
  370. package/lib/components/pisellLookup/components/SearchHistory.d.ts +0 -7
  371. package/lib/components/pisellLookup/components/SuggestWords.d.ts +0 -7
  372. package/lib/components/pisellLookup/components/index.d.ts +0 -9
  373. package/lib/components/pisellLookup/hooks/index.d.ts +0 -6
  374. package/lib/components/pisellLookup/hooks/useSearchHistory.d.ts +0 -48
  375. package/lib/components/pisellLookup/index.d.ts +0 -6
  376. package/lib/components/pisellLookup/types.d.ts +0 -666
  377. package/lib/components/pisellLookup/utils/index.d.ts +0 -5
  378. package/lib/components/pisellLookup/utils/trigger.d.ts +0 -42
  379. package/lib/components/pisellSort/type.d.ts +0 -7
  380. package/lib/components/pisellTimeRangeDisplay/types.d.ts +0 -137
  381. package/lib/components/pisellTimeRangeDisplay/utils/parseTimeRange.d.ts +0 -23
  382. package/lib/components/sort/types.d.ts +0 -20
  383. package/lib/components/virtualInput/index.d.ts +0 -29
  384. package/lib/hooks/useThemeTokens.d.ts +0 -7
@@ -1,43 +1,181 @@
1
- // PisellCurrency 组件样式
1
+ /**
2
+ * PisellCurrency 组件样式
3
+ * 基于 Figma 设计规范,与 PisellNumber / SingleLineText 设计体系一致,覆盖时使用 pisell-lowcode-xxx
4
+ */
2
5
 
3
6
  .pisell-currency {
4
- // 基础样式
5
7
  display: inline-block;
8
+ width: 100%;
6
9
 
7
- // 只读态样式
8
- &-read {
9
- color: rgba(0, 0, 0, 0.85);
10
- line-height: 1.5715;
11
-
12
- // 货币数值可以加粗显示(可选)
13
- font-weight: 500;
14
- }
15
-
16
- // 编辑态样式
17
10
  &-edit {
18
11
  position: relative;
12
+ width: 100%;
13
+
14
+ // InputNumber 外层(Figma 设计规范,无边框避免双边框)
15
+ .pisell-lowcode-input-number {
16
+ width: 100% !important;
17
+ font-size: 16px !important;
18
+ line-height: 24px !important;
19
+ border-radius: 8px !important;
20
+ border: none !important;
21
+ color: #101828 !important; // Gray/900
22
+ background-color: #ffffff !important;
23
+
24
+ // 内层 input
25
+ .pisell-lowcode-input-number-input {
26
+ height: 46px !important; // 48 - 2px border
27
+ padding: 12px 16px !important;
28
+ font-size: 16px !important;
29
+ line-height: 24px !important;
30
+ color: #101828 !important;
31
+ background: transparent !important;
32
+ border: none !important;
33
+
34
+ &::placeholder {
35
+ color: #667085 !important; // Gray/500
36
+ }
37
+ }
38
+
39
+ // 聚焦态
40
+ &.pisell-lowcode-input-number-focused,
41
+ &:focus,
42
+ &:focus-within {
43
+ border-color: #d6bbfb !important; // Primary/300
44
+ box-shadow: 0 0 0 4px #f4ebff !important; // Primary/100
45
+ outline: none !important;
46
+ }
47
+
48
+ // Hover 态
49
+ &:hover:not(.pisell-lowcode-input-number-disabled):not(.pisell-lowcode-input-number-focused) {
50
+ border-color: #b692f6 !important; // Primary/400
51
+ }
52
+
53
+ // 禁用态
54
+ &.pisell-lowcode-input-number-disabled {
55
+ background-color: #f9fafb !important; // Gray/50
56
+ border-color: #d0d5dd !important;
57
+ cursor: not-allowed !important;
58
+
59
+ .pisell-lowcode-input-number-input {
60
+ color: #98a2b3 !important; // Gray/400
61
+ cursor: not-allowed !important;
62
+ }
63
+ }
64
+
65
+ // 货币符号:前缀
66
+ .pisell-lowcode-input-number-prefix {
67
+ margin-right: 8px;
68
+ margin-left: 16px;
69
+ color: #667085; // Gray/500
70
+ font-size: 16px;
71
+ }
72
+
73
+ // 货币符号:后置(addonAfter)
74
+ .pisell-lowcode-input-number-suffix {
75
+ margin-left: 8px;
76
+ margin-right: 16px;
77
+ color: #667085;
78
+ font-size: 16px;
79
+ }
80
+
81
+ // addonBefore / addonAfter 包裹(InputNumber 后置符号可能用 addon 渲染)
82
+ .pisell-lowcode-input-number-group-addon {
83
+ background-color: #ffffff !important;
84
+ border: 1px solid #d0d5dd !important;
85
+ color: #344054; // Gray/700
86
+ font-size: 16px !important;
87
+ padding: 12px 16px !important;
88
+
89
+ &:first-child {
90
+ border-right: none !important;
91
+ border-radius: 8px 0 0 8px !important;
92
+ }
93
+
94
+ &:last-child {
95
+ border-left: none !important;
96
+ border-radius: 0 8px 8px 0 !important;
97
+ }
98
+ }
99
+
100
+ // 步进器按钮(controls)
101
+ .pisell-lowcode-input-number-handler-wrap {
102
+ border-left: 1px solid #d0d5dd !important;
103
+ background: #ffffff !important;
19
104
 
20
- // 错误提示
21
- .pisell-currency-error {
22
- margin-top: 4px;
23
- color: #ff4d4f;
24
- font-size: 14px;
25
- line-height: 1.5;
105
+ .pisell-lowcode-input-number-handler {
106
+ color: #667085;
107
+ border-color: #d0d5dd;
108
+
109
+ &:hover {
110
+ color: #344054;
111
+ }
112
+
113
+ &.pisell-lowcode-input-number-handler-up-disabled,
114
+ &.pisell-lowcode-input-number-handler-down-disabled {
115
+ color: #98a2b3;
116
+ cursor: not-allowed;
117
+ }
118
+ }
119
+ }
120
+
121
+ // 错误状态
122
+ &.pisell-lowcode-input-number-status-error {
123
+ border-color: #fda29b !important; // Error/300
124
+
125
+ &.pisell-lowcode-input-number-focused,
126
+ &:focus-within {
127
+ border-color: #f97066 !important; // Error/400
128
+ box-shadow: 0 0 0 4px #fee4e2 !important; // Error/100
129
+ }
130
+
131
+ &:hover:not(:focus-within) {
132
+ border-color: #f97066 !important;
133
+ }
134
+ }
26
135
  }
27
136
  }
28
137
 
29
- // 禁用态样式
138
+ // 错误提示(与设计体系一致)
139
+ &-error {
140
+ margin-top: 4px;
141
+ font-size: 12px;
142
+ color: #d92d20; // Error/600
143
+ line-height: 1.5;
144
+ animation: pisell-currency-fadeIn 0.3s ease-in-out;
145
+ }
146
+
147
+ // 只读态(Figma: Gray/900, 16px, Medium, line-height 24px)
148
+ &-read {
149
+ color: #101828; // Gray/900
150
+ font-size: 16px;
151
+ font-weight: 500;
152
+ line-height: 24px;
153
+ letter-spacing: 0;
154
+ }
155
+
30
156
  &-disabled {
31
- // 继承 Ant Design InputNumber 的禁用样式
157
+ opacity: 0.4;
158
+ cursor: not-allowed;
32
159
  }
33
-
34
- // 负数显示为红色(可选)
160
+
161
+ // 负数显示(与设计体系 Error 色一致)
35
162
  &.negative {
36
- color: #ff4d4f;
163
+ color: #d92d20; // Error/600
37
164
  }
38
-
39
- // 正数显示为绿色(可选,用于收益场景)
165
+
166
+ // 正数高亮(收益等场景)
40
167
  &.positive {
41
168
  color: #52c41a;
42
169
  }
43
170
  }
171
+
172
+ @keyframes pisell-currency-fadeIn {
173
+ from {
174
+ opacity: 0;
175
+ transform: translateY(-4px);
176
+ }
177
+ to {
178
+ opacity: 1;
179
+ transform: translateY(0);
180
+ }
181
+ }
@@ -38,7 +38,7 @@ var import_PisellCurrency = require("./PisellCurrency");
38
38
  var import_react = require("react");
39
39
  var import_antd = require("antd");
40
40
  var meta = {
41
- title: "Components/PisellCurrency",
41
+ title: "表单/表单组件/PisellCurrency",
42
42
  component: import_PisellCurrency.PisellCurrency,
43
43
  tags: ["autodocs"],
44
44
  argTypes: {
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * PisellCurrency 组件导出
3
3
  */
4
- export { default as PisellCurrency } from './PisellCurrency';
4
+ import PisellCurrency from './PisellCurrency';
5
+ export { PisellCurrency };
5
6
  export type { PisellCurrencyProps } from './types';
6
7
  export type { DisplayState, ValidationResult, NumberInputState, BaseNumberInputProps } from './types';
@@ -32,7 +32,14 @@ __export(pisellCurrency_exports, {
32
32
  PisellCurrency: () => import_PisellCurrency.default
33
33
  });
34
34
  module.exports = __toCommonJS(pisellCurrency_exports);
35
+ var import_locales = require("../../locales");
35
36
  var import_PisellCurrency = __toESM(require("./PisellCurrency"));
37
+ import_PisellCurrency.default.SortOptions = {
38
+ getSortItems: (fieldKey) => [
39
+ { key: `${fieldKey}:asc`, label: (0, import_locales.getText)("sort-0-9") },
40
+ { key: `${fieldKey}:desc`, label: (0, import_locales.getText)("sort-9-0") }
41
+ ]
42
+ };
36
43
  // Annotate the CommonJS export names for ESM import in node:
37
44
  0 && (module.exports = {
38
45
  PisellCurrency
@@ -6,6 +6,7 @@ export declare const COLUMNS_SHARED_STATE_KEYS: {
6
6
  };
7
7
  export interface ColumnsSettingProps {
8
8
  scopeId?: string;
9
+ __id?: string;
9
10
  }
10
11
  export interface ColumnSettingItem {
11
12
  key: string;
@@ -16,7 +17,12 @@ export interface ColumnSettingItem {
16
17
  sortIndex?: number;
17
18
  fixed?: 'left' | 'right' | boolean;
18
19
  }
19
- declare const _default: React.ForwardRefExoticComponent<Omit<ColumnsSettingProps & DataSourceContainerContextType & React.RefAttributes<unknown> & {
20
+ /**
21
+ * 暴露给父组件的 ref 方法
22
+ */
23
+ export interface ColumnsSettingRef {
24
+ }
25
+ declare const _default: React.ForwardRefExoticComponent<Omit<ColumnsSettingProps & DataSourceContainerContextType & React.RefAttributes<ColumnsSettingRef> & {
20
26
  refId?: string | undefined;
21
27
  }, "ref"> & React.RefAttributes<any>>;
22
28
  export default _default;
@@ -36,14 +36,16 @@ module.exports = __toCommonJS(ColumnsSetting_exports);
36
36
  var import_react = __toESM(require("react"));
37
37
  var import_withContainer = __toESM(require("../../utils/withContainer"));
38
38
  var import_ColumnsSetting = __toESM(require("../../../table/Actions/component/ColumnsSetting"));
39
+ var import_utils = require("./utils");
39
40
  var COLUMNS_SHARED_STATE_KEYS = {
40
41
  columnsValue: (instanceId) => `${instanceId}:columns:value`,
41
42
  columnsChange: (instanceId) => `${instanceId}:columns:change`
42
43
  };
43
44
  var WithColumnsSetting = (0, import_react.forwardRef)(
44
- (props) => {
45
- const { refManager, scopeId = "table" } = props;
45
+ (props, ref) => {
46
+ const { refManager, scopeId = "table", __id } = props;
46
47
  const [value, setValue] = (0, import_react.useState)([]);
48
+ (0, import_react.useImperativeHandle)(ref, () => ({}), []);
47
49
  (0, import_react.useEffect)(() => {
48
50
  const unsubscribe = refManager.subscribeSharedState(
49
51
  COLUMNS_SHARED_STATE_KEYS.columnsValue(scopeId),
@@ -58,6 +60,20 @@ var WithColumnsSetting = (0, import_react.forwardRef)(
58
60
  COLUMNS_SHARED_STATE_KEYS.columnsChange(scopeId),
59
61
  typedValue
60
62
  );
63
+ if (__id) {
64
+ (0, import_utils.saveColumnSettingToLocal)({
65
+ componentId: __id,
66
+ columnSetting: typedValue.map((col, index) => ({
67
+ key: col.key,
68
+ dataIndex: col.dataIndex,
69
+ title: col.title,
70
+ titleString: col.titleString,
71
+ isShow: col.isShow,
72
+ sortIndex: col.sortIndex ?? index,
73
+ fixed: col.fixed
74
+ }))
75
+ });
76
+ }
61
77
  };
62
78
  return /* @__PURE__ */ import_react.default.createElement(import_ColumnsSetting.default, { value, onChange });
63
79
  }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * 列设置工具:持久化复用 @pisell/utils 的 saveColumnSettingToLocal / getColumnSettingFromLocal;
3
+ * mergeColumnSettingSimple 为 Table 列与本地缓存的合并逻辑,保留在此。
4
+ */
5
+ import React from 'react';
6
+ import { getColumnSettingFromLocal, clearColumnSettingFromLocal } from '@pisell/utils';
7
+ export { getColumnSettingFromLocal, clearColumnSettingFromLocal };
8
+ /** 与 DataSourceContainer ColumnsSetting 调用处类型兼容的列设置项(含 React.ReactNode title) */
9
+ export interface ColumnSettingItemForSave {
10
+ key: string;
11
+ dataIndex: string;
12
+ title?: React.ReactNode;
13
+ titleString?: string;
14
+ isShow: boolean;
15
+ sortIndex?: number;
16
+ fixed?: 'left' | 'right' | boolean;
17
+ }
18
+ export declare const saveColumnSettingToLocal: (params: {
19
+ componentId: string;
20
+ columnSetting: ColumnSettingItemForSave[];
21
+ }) => void;
22
+ export declare const mergeColumnSettingSimple: ({ columns, componentId, }: {
23
+ columns: Record<string, any>[];
24
+ componentId?: string | undefined;
25
+ }) => {
26
+ isShow: any;
27
+ sortIndex: any;
28
+ }[];
@@ -0,0 +1,81 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: true });
8
+ };
9
+ var __copyProps = (to, from, except, desc) => {
10
+ if (from && typeof from === "object" || typeof from === "function") {
11
+ for (let key of __getOwnPropNames(from))
12
+ if (!__hasOwnProp.call(to, key) && key !== except)
13
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
14
+ }
15
+ return to;
16
+ };
17
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
+
19
+ // src/components/pisellDataSourceContainer/components/ColumnsSetting/utils.ts
20
+ var utils_exports = {};
21
+ __export(utils_exports, {
22
+ clearColumnSettingFromLocal: () => import_utils.clearColumnSettingFromLocal,
23
+ getColumnSettingFromLocal: () => import_utils.getColumnSettingFromLocal,
24
+ mergeColumnSettingSimple: () => mergeColumnSettingSimple,
25
+ saveColumnSettingToLocal: () => saveColumnSettingToLocal
26
+ });
27
+ module.exports = __toCommonJS(utils_exports);
28
+ var import_utils = require("@pisell/utils");
29
+ var saveColumnSettingToLocal = (params) => {
30
+ (0, import_utils.saveColumnSettingToLocal)({
31
+ componentId: params.componentId,
32
+ columnSetting: params.columnSetting
33
+ });
34
+ };
35
+ var mergeColumnSettingSimple = ({
36
+ columns,
37
+ componentId
38
+ }) => {
39
+ if (!componentId) {
40
+ return columns.map((item, index) => ({
41
+ ...item,
42
+ isShow: item.isShow ?? true,
43
+ sortIndex: index
44
+ }));
45
+ }
46
+ const cachedColumns = (0, import_utils.getColumnSettingFromLocal)(componentId);
47
+ if (!cachedColumns || !Array.isArray(cachedColumns)) {
48
+ return columns.map((item, index) => ({
49
+ ...item,
50
+ isShow: item.isShow ?? true,
51
+ sortIndex: index
52
+ }));
53
+ }
54
+ const cachedMap = new Map(
55
+ cachedColumns.map((item) => [item.dataIndex, item])
56
+ );
57
+ const mergedColumns = columns.map((item, index) => {
58
+ const cached = cachedMap.get(item.dataIndex);
59
+ if (cached) {
60
+ return {
61
+ ...item,
62
+ isShow: cached.isShow ?? true,
63
+ sortIndex: cached.sortIndex ?? index
64
+ };
65
+ }
66
+ return {
67
+ ...item,
68
+ isShow: item.isShow ?? true,
69
+ sortIndex: index
70
+ };
71
+ });
72
+ mergedColumns.sort((a, b) => (a.sortIndex ?? 0) - (b.sortIndex ?? 0));
73
+ return mergedColumns;
74
+ };
75
+ // Annotate the CommonJS export names for ESM import in node:
76
+ 0 && (module.exports = {
77
+ clearColumnSettingFromLocal,
78
+ getColumnSettingFromLocal,
79
+ mergeColumnSettingSimple,
80
+ saveColumnSettingToLocal
81
+ });
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { DataSourceContainerContextType } from '../../type';
3
3
  declare const _default: React.ForwardRefExoticComponent<Omit<Partial<import("antd").TableProps<any>> & DataSourceContainerContextType & {
4
4
  scopeId?: string | undefined;
5
+ __id?: string | undefined;
5
6
  } & React.RefAttributes<unknown> & {
6
7
  refId?: string | undefined;
7
8
  }, "ref"> & React.RefAttributes<any>>;
@@ -43,13 +43,15 @@ var WithTable = (0, import_react.forwardRef)(
43
43
  refManager,
44
44
  columns,
45
45
  scopeId = "table",
46
+ __id,
46
47
  ...otherProps
47
48
  } = props;
48
49
  const { data, loading } = listAction;
49
50
  const { visibleColumns } = (0, import_useColumns.default)({
50
51
  columns: columns || [],
51
52
  scopeId,
52
- refManager
53
+ refManager,
54
+ __id
53
55
  });
54
56
  return /* @__PURE__ */ import_react.default.createElement(
55
57
  import_antd.Table,
@@ -6,6 +6,7 @@ interface UseColumnsParams {
6
6
  columns: any[];
7
7
  scopeId: string;
8
8
  refManager: RefManagerContextType;
9
+ __id?: string;
9
10
  }
10
11
  declare const useColumns: (params: UseColumnsParams) => {
11
12
  visibleColumns: any[];
@@ -24,18 +24,31 @@ __export(useColumns_exports, {
24
24
  module.exports = __toCommonJS(useColumns_exports);
25
25
  var import_react = require("react");
26
26
  var import_ColumnsSetting = require("../ColumnsSetting");
27
+ var import_utils = require("../ColumnsSetting/utils");
27
28
  var useColumns = (params) => {
28
- const { columns, scopeId, refManager } = params;
29
+ const { columns, scopeId, refManager, __id } = params;
29
30
  const [columnSettings, setColumnSettings] = (0, import_react.useState)([]);
30
31
  (0, import_react.useEffect)(() => {
31
32
  if (!(columns == null ? void 0 : columns.length)) return;
32
- const settings = columns.map((col, index) => ({
33
- key: col.key || col.dataIndex,
33
+ const mergedColumns = (0, import_utils.mergeColumnSettingSimple)({
34
+ columns: columns.map((col, index) => ({
35
+ key: col.key || col.dataIndex,
36
+ dataIndex: col.dataIndex,
37
+ title: col.title,
38
+ titleString: typeof col.title === "string" ? col.title : col.dataIndex,
39
+ isShow: typeof col.isShow === "boolean" ? col.isShow : true,
40
+ sortIndex: index,
41
+ fixed: col.fixed
42
+ })),
43
+ componentId: __id
44
+ });
45
+ const settings = mergedColumns.map((col) => ({
46
+ key: col.key,
34
47
  dataIndex: col.dataIndex,
35
48
  title: col.title,
36
- titleString: typeof col.title === "string" ? col.title : col.dataIndex,
37
- isShow: typeof col.isShow === "boolean" ? col.isShow : true,
38
- sortIndex: index,
49
+ titleString: col.titleString,
50
+ isShow: col.isShow,
51
+ sortIndex: col.sortIndex,
39
52
  fixed: col.fixed
40
53
  }));
41
54
  refManager.setSharedState(
@@ -43,7 +56,7 @@ var useColumns = (params) => {
43
56
  settings
44
57
  );
45
58
  setColumnSettings(settings);
46
- }, [columns, refManager, scopeId]);
59
+ }, [columns, refManager, scopeId, __id]);
47
60
  (0, import_react.useEffect)(() => {
48
61
  const unsubscribe = refManager.subscribeSharedState(
49
62
  import_ColumnsSetting.COLUMNS_SHARED_STATE_KEYS.columnsChange(scopeId),
@@ -51,14 +64,12 @@ var useColumns = (params) => {
51
64
  );
52
65
  return unsubscribe;
53
66
  }, [refManager, scopeId]);
54
- const visibleColumns = (0, import_react.useMemo)(() => {
55
- if (!(columns == null ? void 0 : columns.length)) return [];
56
- if (!(columnSettings == null ? void 0 : columnSettings.length)) return columns;
67
+ return (0, import_react.useMemo)(() => {
68
+ if (!(columns == null ? void 0 : columns.length)) return { visibleColumns: [] };
69
+ if (!(columnSettings == null ? void 0 : columnSettings.length)) return { visibleColumns: columns };
57
70
  const columnMap = new Map(columns.map((col) => [col.dataIndex, col]));
58
- return columnSettings.filter((setting) => setting.isShow).map((setting) => columnMap.get(setting.dataIndex)).filter(Boolean);
71
+ const visibleColumns = columnSettings.filter((setting) => setting.isShow).map((setting) => columnMap.get(setting.dataIndex)).filter(Boolean);
72
+ return { visibleColumns };
59
73
  }, [columns, columnSettings]);
60
- return {
61
- visibleColumns
62
- };
63
74
  };
64
75
  var useColumns_default = useColumns;
@@ -41,9 +41,12 @@ var import_hooks = require("./hooks");
41
41
  var import_utils = require("./utils");
42
42
  var import_components = require("./components");
43
43
  var import_dateTimeDisplayFormats = require("./formats/dateTimeDisplayFormats");
44
+ var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
44
45
  var import_PisellDateTimeDisplay = require("./PisellDateTimeDisplay.less");
45
46
  var PisellDateTimeDisplay = (props) => {
47
+ var _a, _b;
46
48
  const {
49
+ value: valueProp,
47
50
  layout = "horizontal",
48
51
  textAlign = "center",
49
52
  fields,
@@ -65,7 +68,9 @@ var PisellDateTimeDisplay = (props) => {
65
68
  className,
66
69
  style
67
70
  } = props;
68
- const localeKey = (0, import_utils.getDayjsLocale)(locale);
71
+ const context = (0, import_useEngineContext.default)();
72
+ const resolvedLocale = locale || ((_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale) || "en";
73
+ const localeKey = (0, import_utils.getDayjsLocale)(resolvedLocale);
69
74
  const baseLocale = localeKey.split("-")[0];
70
75
  const presetSource = formatByLocale ?? import_dateTimeDisplayFormats.DATETIME_DISPLAY_FORMATS;
71
76
  const preset = presetSource[localeKey] ?? presetSource[baseLocale] ?? {};
@@ -76,12 +81,13 @@ var PisellDateTimeDisplay = (props) => {
76
81
  const computedRefreshInterval = refreshInterval ?? (0, import_utils.getRefreshInterval)(effectiveTimeFormat);
77
82
  const currentTime = (0, import_hooks.useCurrentTime)({
78
83
  refreshInterval: computedRefreshInterval,
79
- disabled: disableAutoRefresh,
80
- locale,
84
+ disabled: disableAutoRefresh || valueProp !== void 0,
85
+ locale: resolvedLocale,
81
86
  onUpdate: onTimeUpdate
82
87
  });
88
+ const displayTime = valueProp !== void 0 && valueProp !== null ? (0, import_dayjs.default)(valueProp).locale(localeKey) : currentTime;
83
89
  if (customFormat) {
84
- const formattedTime = currentTime.format(customFormat);
90
+ const formattedTime = displayTime.format(customFormat);
85
91
  const containerInlineStyle2 = {
86
92
  background: containerStyle == null ? void 0 : containerStyle.background,
87
93
  borderRadius: containerStyle == null ? void 0 : containerStyle.borderRadius,
@@ -108,7 +114,7 @@ var PisellDateTimeDisplay = (props) => {
108
114
  fieldOrder = ["time", "date", "weekday"]
109
115
  } = effectiveFields || {};
110
116
  const referenceDate = (0, import_dayjs.default)();
111
- const relativeDay = (effectiveDateFormat == null ? void 0 : effectiveDateFormat.showRelativeDay) ? (0, import_utils.getRelativeDay)(currentTime, referenceDate) : null;
117
+ const relativeDay = (effectiveDateFormat == null ? void 0 : effectiveDateFormat.showRelativeDay) ? (0, import_utils.getRelativeDay)(displayTime, referenceDate) : null;
112
118
  const hideWeekdayWhenDateRelative = showDate && relativeDay !== null;
113
119
  const containerInlineStyle = {
114
120
  background: containerStyle == null ? void 0 : containerStyle.background,
@@ -127,7 +133,7 @@ var PisellDateTimeDisplay = (props) => {
127
133
  import_components.TimeDisplay,
128
134
  {
129
135
  key: "time",
130
- time: currentTime,
136
+ time: displayTime,
131
137
  format: effectiveTimeFormat,
132
138
  style: timeStyle
133
139
  }
@@ -137,7 +143,7 @@ var PisellDateTimeDisplay = (props) => {
137
143
  import_components.DateDisplay,
138
144
  {
139
145
  key: "date",
140
- date: currentTime,
146
+ date: displayTime,
141
147
  format: effectiveDateFormat,
142
148
  referenceDate: (0, import_dayjs.default)(),
143
149
  style: dateStyle
@@ -148,7 +154,7 @@ var PisellDateTimeDisplay = (props) => {
148
154
  import_components.WeekdayDisplay,
149
155
  {
150
156
  key: "weekday",
151
- weekday: currentTime,
157
+ weekday: displayTime,
152
158
  format: effectiveWeekdayFormat,
153
159
  style: weekdayStyle
154
160
  }
@@ -179,12 +185,12 @@ var PisellDateTimeDisplay = (props) => {
179
185
  }
180
186
  if (layout === "horizontal") {
181
187
  const timeField = showTime ? renderField("time") : null;
182
- const currentLocale = currentTime.locale();
188
+ const currentLocale = displayTime.locale();
183
189
  const isChinese = (0, import_utils.isChinese)(currentLocale);
184
190
  if (showDate && showWeekday) {
185
191
  const labels = effectiveDateFormat == null ? void 0 : effectiveDateFormat.relativeDayLabels;
186
- const dateStr = relativeDay ? (labels == null ? void 0 : labels[relativeDay]) ?? (0, import_utils.getRelativeDayLabel)(relativeDay, currentTime.locale()) : isChinese ? currentTime.format("M月D日") : currentTime.format("D MMM");
187
- const weekdayStr = currentTime.format("ddd");
192
+ const dateStr = relativeDay ? (labels == null ? void 0 : labels[relativeDay]) ?? (0, import_utils.getRelativeDayLabel)(relativeDay, displayTime.locale()) : isChinese ? displayTime.format("M月D日") : displayTime.format("D MMM");
193
+ const weekdayStr = displayTime.format("ddd");
188
194
  const combinedStr = relativeDay ? dateStr : isChinese ? `${weekdayStr} ${dateStr}` : `${weekdayStr}, ${dateStr}`;
189
195
  const dateInlineStyle = {
190
196
  fontSize: dateStyle == null ? void 0 : dateStyle.fontSize,
@@ -64,9 +64,10 @@
64
64
  line-height: 1.2;
65
65
  }
66
66
 
67
- // 分隔符
67
+ // 分隔符:保留空格占位,避免纯空格时被折叠不显示
68
68
  &-separator {
69
69
  display: inline-block;
70
+ white-space: pre;
70
71
  }
71
72
 
72
73
  // 自定义格式化
@@ -36,7 +36,9 @@ var import_react = require("react");
36
36
  var import_dayjs = __toESM(require("dayjs"));
37
37
  var import_localeUtils = require("../utils/localeUtils");
38
38
  var import_usePisellConfig = __toESM(require("../../pisell-config-provider/hooks/usePisellConfig"));
39
+ var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
39
40
  function useCurrentTime(options) {
41
+ var _a, _b;
40
42
  const {
41
43
  refreshInterval = 6e4,
42
44
  disabled = false,
@@ -44,8 +46,12 @@ function useCurrentTime(options) {
44
46
  onUpdate
45
47
  } = options || {};
46
48
  const globalConfig = (0, import_usePisellConfig.default)();
49
+ const context = (0, import_useEngineContext.default)();
47
50
  const globalLocale = globalConfig == null ? void 0 : globalConfig.locale;
48
- const dayjsLocale = (0, import_localeUtils.getDayjsLocale)(userLocale || globalLocale);
51
+ const engineLocale = (_b = (_a = context == null ? void 0 : context.engine) == null ? void 0 : _a.props) == null ? void 0 : _b.locale;
52
+ const dayjsLocale = (0, import_localeUtils.getDayjsLocale)(
53
+ userLocale || globalLocale || engineLocale || "en"
54
+ );
49
55
  const [currentTime, setCurrentTime] = (0, import_react.useState)(() => {
50
56
  const time = (0, import_dayjs.default)();
51
57
  return time.locale(dayjsLocale);
@@ -14,9 +14,9 @@ export declare function normalizeLocale(locale: string): string;
14
14
  export declare function isChinese(locale: string): boolean;
15
15
  /**
16
16
  * 获取 dayjs 兼容的 locale 代码
17
- * 未传 locale 时使用 i18n 当前语言(全局配置 / umi_locale),不再使用浏览器语言
17
+ * 未传 locale 时:优先 materials 当前语言(globalConfig / umi_locale),若为默认 en-US 则用 @pisell/utils getLocale
18
18
  * @param locale 原始 locale 代码(可选)
19
- * @returns dayjs 兼容的 locale 代码
19
+ * @returns dayjs 兼容的 locale 代码(与已加载的 zh-cn、en 对齐)
20
20
  * @example 'zh-CN' -> 'zh-cn', 'en-US' -> 'en'
21
21
  */
22
22
  export declare function getDayjsLocale(locale?: string): string;