@pisell/materials 1.0.1034 → 1.0.1035

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 (254) 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 +1 -1
  6. package/build/lowcode/preview.js +17 -17
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +18 -23
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +27 -32
  11. package/es/components/Pagination/index.js +1 -1
  12. package/es/components/PisellCards/index.d.ts +6 -6
  13. package/es/components/calendar/index.d.ts +2 -2
  14. package/es/components/checkbox/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  16. package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +2 -2
  17. package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  18. package/es/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +3 -3
  19. package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  20. package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  21. package/es/components/date-picker/index.d.ts +2 -2
  22. package/es/components/filter/components/Dropdown/index.js +6 -2
  23. package/es/components/filter/components/FilterButton/index.js +3 -2
  24. package/es/components/filter/components/FilterButton/types.d.ts +5 -2
  25. package/es/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +67 -0
  26. package/es/components/filter/components/FilterItem/index.js +105 -6
  27. package/es/components/filter/components/FilterItem/index.less +90 -0
  28. package/es/components/filter/types.d.ts +4 -2
  29. package/es/components/input/index.d.ts +2 -2
  30. package/es/components/pisell-config-provider/context.d.ts +2 -2
  31. package/es/components/pisellCurrency/PisellCurrency.less +163 -25
  32. package/es/components/pisellDatePicker/index.d.ts +2 -2
  33. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
  34. package/es/components/pisellDateTimeDisplay/types.d.ts +5 -0
  35. package/es/components/pisellEmail/PisellEmail.d.ts +2 -33
  36. package/es/components/pisellEmail/PisellEmail.js +1 -1
  37. package/es/components/pisellEmail/PisellEmail.less +119 -10
  38. package/es/components/pisellEmail/index.d.ts +1 -1
  39. package/es/components/pisellFilter/docs/PisellFilter.md +289 -232
  40. package/es/components/pisellFilter/index.js +66 -11
  41. package/es/components/pisellLongText/PisellLongText.less +72 -4
  42. package/es/components/pisellLookup/PisellLookup.js +3 -3
  43. package/es/components/pisellLookup/PisellLookup.less +14 -9
  44. package/es/components/pisellLookup/components/LookupTrigger.js +6 -2
  45. package/es/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
  46. package/es/components/pisellMetricCard/PisellMetricCard.js +136 -0
  47. package/es/components/pisellMetricCard/components/MetricComparison.js +54 -0
  48. package/es/components/pisellMetricCard/components/MetricTitle.js +41 -0
  49. package/es/components/pisellMetricCard/components/MetricValue.js +26 -0
  50. package/es/components/pisellMetricCard/components/TrendIcon.js +26 -0
  51. package/es/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
  52. package/es/components/pisellMetricCard/index.d.ts +2 -0
  53. package/es/components/pisellMetricCard/types.d.ts +143 -0
  54. package/es/components/pisellMetricCard/utils/calculateTrend.js +22 -0
  55. package/es/components/pisellMetricCard/utils/formatMetricValue.js +52 -0
  56. package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
  57. package/es/components/pisellMultipleSelect/components/EditView.js +8 -1
  58. package/es/components/pisellMultipleSelect/components/ReadOnlyView.js +18 -6
  59. package/es/components/pisellNumber/PisellNumber.less +135 -17
  60. package/es/components/pisellPercent/PisellPercent.less +142 -24
  61. package/es/components/pisellPhone/PisellPhone.less +122 -27
  62. package/es/components/pisellPhone/components/EditView.js +1 -1
  63. package/es/components/pisellPhone/components/ReadOnlyView.js +15 -5
  64. package/es/components/pisellPhone/utils/countryCodeHelper.js +1 -10
  65. package/es/components/pisellRating/PisellRating.less +20 -12
  66. package/es/components/pisellRecordBoard/PisellRecordBoard.js +148 -0
  67. package/es/components/pisellRecordBoard/README.md +183 -0
  68. package/es/components/pisellRecordBoard/context/RecordBoardContext.js +7 -0
  69. package/es/components/pisellRecordBoard/context/RecordBoardProvider.js +14 -0
  70. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
  71. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
  72. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
  73. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
  74. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
  75. package/es/components/pisellRecordBoard/hooks/useRecordBoardContext.js +16 -0
  76. package/es/components/pisellRecordBoard/index.d.ts +40 -0
  77. package/es/components/pisellRecordBoard/index.js +28 -0
  78. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
  79. package/es/components/pisellRecordBoard/layouts/CardLayout/CardList.js +24 -0
  80. package/es/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
  81. package/es/components/pisellRecordBoard/layouts/CardLayout/index.js +21 -0
  82. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
  83. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +105 -0
  84. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
  85. package/es/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
  86. package/es/components/pisellRecordBoard/layouts/GridLayout/index.js +21 -0
  87. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
  88. package/es/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +69 -0
  89. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +40 -0
  90. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +60 -0
  91. package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  92. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
  93. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +52 -0
  94. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
  95. package/es/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
  96. package/es/components/pisellRecordBoard/shellFrame/Search/index.js +34 -0
  97. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
  98. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
  99. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +136 -0
  100. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.d.ts +2 -0
  101. package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +62 -0
  102. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
  103. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +45 -0
  104. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  105. package/es/components/pisellRecordBoard/shellFrame/index.d.ts +27 -0
  106. package/es/components/pisellRecordBoard/shellFrame/index.js +38 -0
  107. package/es/components/pisellRecordBoard/types.d.ts +259 -0
  108. package/es/components/pisellRecordBoard/utils/recordBoardColumns.js +287 -0
  109. package/es/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
  110. package/es/components/pisellShellFrame/PisellShellFrame.js +60 -0
  111. package/es/components/pisellShellFrame/PisellShellFrame.less +73 -0
  112. package/es/components/pisellShellFrame/README.md +58 -0
  113. package/es/components/pisellShellFrame/index.d.ts +2 -0
  114. package/es/components/pisellShellFrame/types.d.ts +60 -0
  115. package/es/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
  116. package/es/components/pisellSingleSelect/components/EditView.js +8 -1
  117. package/es/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
  118. package/es/components/pisellUrl/PisellUrl.d.ts +2 -33
  119. package/es/components/pisellUrl/PisellUrl.js +1 -1
  120. package/es/components/pisellUrl/PisellUrl.less +120 -11
  121. package/es/components/pisellUrl/index.d.ts +1 -1
  122. package/es/components/radio/index.d.ts +2 -2
  123. package/es/components/section-footers/index.d.ts +2 -2
  124. package/es/components/skeleton/index.d.ts +2 -2
  125. package/es/components/sort/index.js +12 -1
  126. package/es/components/sort/types.d.ts +8 -2
  127. package/es/components/time-picker/index.d.ts +2 -2
  128. package/es/index.d.ts +19 -11
  129. package/es/index.js +19 -15
  130. package/es/locales/en-US.js +16 -2
  131. package/es/locales/zh-CN.js +18 -4
  132. package/es/locales/zh-TW.js +18 -4
  133. package/es/utils/tagColor.js +31 -0
  134. package/lib/components/Pagination/index.js +1 -1
  135. package/lib/components/checkbox/index.d.ts +2 -2
  136. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  137. package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +2 -2
  138. package/lib/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  139. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +1 -1
  140. package/lib/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  141. package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
  142. package/lib/components/filter/components/Dropdown/index.js +6 -2
  143. package/lib/components/filter/components/FilterButton/index.js +3 -2
  144. package/lib/components/filter/components/FilterButton/types.d.ts +5 -2
  145. package/lib/components/filter/components/FilterItem/AsyncOptionsSelectWrapper.js +69 -0
  146. package/lib/components/filter/components/FilterItem/index.js +106 -6
  147. package/lib/components/filter/components/FilterItem/index.less +90 -0
  148. package/lib/components/filter/types.d.ts +4 -2
  149. package/lib/components/input/index.d.ts +2 -2
  150. package/lib/components/pisell-config-provider/context.d.ts +2 -2
  151. package/lib/components/pisellCurrency/PisellCurrency.less +163 -25
  152. package/lib/components/pisellDatePicker/index.d.ts +2 -2
  153. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.js +11 -10
  154. package/lib/components/pisellDateTimeDisplay/types.d.ts +5 -0
  155. package/lib/components/pisellEmail/PisellEmail.d.ts +2 -33
  156. package/lib/components/pisellEmail/PisellEmail.js +1 -1
  157. package/lib/components/pisellEmail/PisellEmail.less +119 -10
  158. package/lib/components/pisellEmail/index.d.ts +1 -1
  159. package/lib/components/pisellFilter/docs/PisellFilter.md +289 -232
  160. package/lib/components/pisellFilter/index.js +65 -10
  161. package/lib/components/pisellLongText/PisellLongText.less +72 -4
  162. package/lib/components/pisellLookup/PisellLookup.js +3 -3
  163. package/lib/components/pisellLookup/PisellLookup.less +14 -9
  164. package/lib/components/pisellLookup/components/LookupTrigger.js +6 -2
  165. package/lib/components/pisellMetricCard/PisellMetricCard.d.ts +38 -0
  166. package/lib/components/pisellMetricCard/PisellMetricCard.js +138 -0
  167. package/lib/components/pisellMetricCard/components/MetricComparison.js +56 -0
  168. package/lib/components/pisellMetricCard/components/MetricTitle.js +43 -0
  169. package/lib/components/pisellMetricCard/components/MetricValue.js +28 -0
  170. package/lib/components/pisellMetricCard/components/TrendIcon.js +28 -0
  171. package/lib/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -6
  172. package/lib/components/pisellMetricCard/index.d.ts +2 -0
  173. package/lib/components/pisellMetricCard/types.d.ts +143 -0
  174. package/lib/components/pisellMetricCard/utils/calculateTrend.js +23 -0
  175. package/lib/components/pisellMetricCard/utils/formatMetricValue.js +53 -0
  176. package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +151 -124
  177. package/lib/components/pisellMultipleSelect/components/EditView.js +7 -0
  178. package/lib/components/pisellMultipleSelect/components/ReadOnlyView.js +17 -5
  179. package/lib/components/pisellNumber/PisellNumber.less +135 -17
  180. package/lib/components/pisellPercent/PisellPercent.less +142 -24
  181. package/lib/components/pisellPhone/PisellPhone.less +122 -27
  182. package/lib/components/pisellPhone/components/EditView.js +1 -1
  183. package/lib/components/pisellPhone/components/ReadOnlyView.js +15 -5
  184. package/lib/components/pisellPhone/utils/countryCodeHelper.js +0 -10
  185. package/lib/components/pisellRating/PisellRating.less +20 -12
  186. package/lib/components/pisellRecordBoard/PisellRecordBoard.js +150 -0
  187. package/lib/components/pisellRecordBoard/README.md +183 -0
  188. package/lib/components/pisellRecordBoard/context/RecordBoardContext.js +8 -0
  189. package/lib/components/pisellRecordBoard/context/RecordBoardProvider.js +16 -0
  190. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-design.md +128 -0
  191. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-dev.md +82 -0
  192. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.$tab-test.md +70 -0
  193. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +552 -0
  194. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.d.ts +20 -0
  195. package/lib/components/pisellRecordBoard/hooks/useRecordBoardContext.js +17 -0
  196. package/lib/components/pisellRecordBoard/index.d.ts +40 -0
  197. package/lib/components/pisellRecordBoard/index.js +28 -0
  198. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.d.ts +15 -0
  199. package/lib/components/pisellRecordBoard/layouts/CardLayout/CardList.js +26 -0
  200. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.d.ts +15 -0
  201. package/lib/components/pisellRecordBoard/layouts/CardLayout/index.js +23 -0
  202. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts +17 -0
  203. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +107 -0
  204. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +13 -0
  205. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.d.ts +15 -0
  206. package/lib/components/pisellRecordBoard/layouts/GridLayout/index.js +23 -0
  207. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts +12 -0
  208. package/lib/components/pisellRecordBoard/shellFrame/BatchActionBar/index.js +71 -0
  209. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.js +43 -0
  210. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +62 -0
  211. package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.less +2 -0
  212. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts +17 -0
  213. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +54 -0
  214. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +61 -0
  215. package/lib/components/pisellRecordBoard/shellFrame/Search/index.d.ts +13 -0
  216. package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +36 -0
  217. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +77 -0
  218. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.d.ts +14 -0
  219. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +139 -0
  220. package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +64 -0
  221. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.d.ts +2 -0
  222. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +47 -0
  223. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.less +41 -0
  224. package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +26 -0
  225. package/lib/components/pisellRecordBoard/shellFrame/index.js +40 -0
  226. package/lib/components/pisellRecordBoard/types.d.ts +259 -0
  227. package/lib/components/pisellRecordBoard/utils/recordBoardColumns.js +292 -0
  228. package/lib/components/pisellShellFrame/PisellShellFrame.d.ts +16 -0
  229. package/lib/components/pisellShellFrame/PisellShellFrame.js +62 -0
  230. package/lib/components/pisellShellFrame/PisellShellFrame.less +73 -0
  231. package/lib/components/pisellShellFrame/README.md +58 -0
  232. package/lib/components/pisellShellFrame/index.d.ts +2 -0
  233. package/lib/components/pisellShellFrame/types.d.ts +60 -0
  234. package/lib/components/pisellSingleSelect/PisellSingleSelect.less +88 -46
  235. package/lib/components/pisellSingleSelect/components/EditView.js +7 -0
  236. package/lib/components/pisellSingleSelect/components/ReadOnlyView.js +8 -2
  237. package/lib/components/pisellUrl/PisellUrl.d.ts +2 -33
  238. package/lib/components/pisellUrl/PisellUrl.js +1 -1
  239. package/lib/components/pisellUrl/PisellUrl.less +120 -11
  240. package/lib/components/pisellUrl/index.d.ts +1 -1
  241. package/lib/components/radio/index.d.ts +2 -2
  242. package/lib/components/section-footers/index.d.ts +2 -2
  243. package/lib/components/skeleton/index.d.ts +2 -2
  244. package/lib/components/sort/index.js +12 -1
  245. package/lib/components/sort/types.d.ts +8 -2
  246. package/lib/components/time-picker/index.d.ts +2 -2
  247. package/lib/components/upload/index.d.ts +2 -2
  248. package/lib/index.d.ts +19 -11
  249. package/lib/index.js +33 -25
  250. package/lib/locales/en-US.js +16 -2
  251. package/lib/locales/zh-CN.js +18 -4
  252. package/lib/locales/zh-TW.js +18 -4
  253. package/lib/utils/tagColor.js +32 -0
  254. package/package.json +3 -3
@@ -0,0 +1,26 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
+ const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
4
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react);
7
+
8
+ //#region src/components/pisellRecordBoard/layouts/CardLayout/CardList.tsx
9
+ const _excluded = ["render"];
10
+ /**
11
+ * Card 布局下的数据视图:从 context 取 data / loading。
12
+ */
13
+ const RecordBoardCardList = (props) => {
14
+ var _ctx$data$length, _ctx$data;
15
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "cardList" });
16
+ const { render } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
17
+ if (typeof render === "function") return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, render(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ctx), rest)));
18
+ return /* @__PURE__ */ react.default.createElement("div", {
19
+ "data-layout-slot": "cardList",
20
+ style: { minHeight: 120 }
21
+ }, /* @__PURE__ */ react.default.createElement("span", { style: { color: "var(--color-text-tertiary, #999)" } }, "卡片视图(", (_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, " 条,loading:", " ", String(ctx.loading), ")"));
22
+ };
23
+ var CardList_default = RecordBoardCardList;
24
+
25
+ //#endregion
26
+ exports.default = CardList_default;
@@ -0,0 +1,15 @@
1
+ import { RecordBoardCardList } from "./CardList.js";
2
+ import React from "react";
3
+
4
+ //#region src/components/pisellRecordBoard/layouts/CardLayout/index.d.ts
5
+ /**
6
+ * Card 布局:仅内容区 = 卡片列表(不含分页)。
7
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
8
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.CardLayout /></PisellRecordBoard.ShellFrame>
9
+ */
10
+ declare const CardLayout: React.FC<{
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ }>;
14
+ //#endregion
15
+ export { CardLayout };
@@ -0,0 +1,23 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_CardList = require('./CardList.js');
3
+ let react = require("react");
4
+ react = require_rolldown_runtime.__toESM(react);
5
+
6
+ //#region src/components/pisellRecordBoard/layouts/CardLayout/index.tsx
7
+ /**
8
+ * Card 布局:仅内容区 = 卡片列表(不含分页)。
9
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
10
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.CardLayout /></PisellRecordBoard.ShellFrame>
11
+ */
12
+ const CardLayout = ({ className, style }) => {
13
+ return /* @__PURE__ */ react.default.createElement("div", {
14
+ className,
15
+ style,
16
+ "data-layout": "card"
17
+ }, /* @__PURE__ */ react.default.createElement(require_CardList.default, null));
18
+ };
19
+ CardLayout.displayName = "RecordBoard.CardLayout";
20
+ var CardLayout_default = CardLayout;
21
+
22
+ //#endregion
23
+ exports.default = CardLayout_default;
@@ -0,0 +1,17 @@
1
+ import { RecordBoardContextValue } from "../../types.js";
2
+ import { TableProps } from "antd";
3
+ import React from "react";
4
+ import "./Grid.less";
5
+
6
+ //#region src/components/pisellRecordBoard/layouts/GridLayout/Grid.d.ts
7
+ interface RecordBoardGridViewProps extends Omit<TableProps<any>, 'dataSource' | 'loading' | 'pagination'>, Partial<Pick<RecordBoardContextValue, 'data' | 'loading'>> {
8
+ /** 列配置,同 antd Table columns */
9
+ columns?: TableProps<any>['columns'];
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ /** 自定义渲染,传入后不再使用内置 Table */
13
+ render?: (ctx: RecordBoardContextValue) => React.ReactNode;
14
+ }
15
+ declare const RecordBoardGridView: React.FC<RecordBoardGridViewProps>;
16
+ //#endregion
17
+ export { RecordBoardGridView };
@@ -0,0 +1,107 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
+ const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
4
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
5
+ const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
6
+ let antd = require("antd");
7
+ let react = require("react");
8
+ react = require_rolldown_runtime.__toESM(react);
9
+ require("./Grid.less");
10
+
11
+ //#region src/components/pisellRecordBoard/layouts/GridLayout/Grid.tsx
12
+ const _excluded = [
13
+ "render",
14
+ "columns",
15
+ "rowKey",
16
+ "rowSelection"
17
+ ];
18
+ function getRowKey(record, rowKey) {
19
+ var _ref, _record$id;
20
+ if (typeof rowKey === "function") return rowKey(record);
21
+ if (typeof rowKey === "string" && record != null && rowKey in record) return record[rowKey];
22
+ 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;
23
+ }
24
+ /**
25
+ * Grid 布局下的数据视图:使用 antd Table,从 context 取 data / loading / 多选态。
26
+ */
27
+ /** Context 中与 Table 无关的 key,透传 Table 时排除,避免覆盖或无效传递 */
28
+ const CONTEXT_ONLY_KEYS = [
29
+ "data",
30
+ "loading",
31
+ "total",
32
+ "pagination",
33
+ "onPageChange",
34
+ "searchParams",
35
+ "onSearch",
36
+ "onReset",
37
+ "layoutType",
38
+ "selectedKeys",
39
+ "selectedRows",
40
+ "onSelectionChange",
41
+ "rowKey",
42
+ "childComponentProps",
43
+ "columnVisibility",
44
+ "onColumnVisibilityChange",
45
+ "columns",
46
+ "scroll",
47
+ "size",
48
+ "defaultHiddenColumnKeys"
49
+ ];
50
+ const RecordBoardGridView = (props) => {
51
+ var _ref2, _rest$scroll, _ctx$data;
52
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "grid" });
53
+ const { render, columns: columnsProp, rowKey: rowKeyProp, rowSelection: rowSelectionProp } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
54
+ const rawColumns = (_ref2 = columnsProp !== null && columnsProp !== void 0 ? columnsProp : ctx.columns) !== null && _ref2 !== void 0 ? _ref2 : [];
55
+ const columnVisibility = ctx.columnVisibility;
56
+ const columns = (0, react.useMemo)(() => {
57
+ const list = rawColumns;
58
+ return require_recordBoardColumns.processColumnsForGrid(columnVisibility == null ? list : list.filter((col) => columnVisibility[require_recordBoardColumns.getRecordBoardColumnKey(col)] !== false));
59
+ }, [rawColumns, columnVisibility]);
60
+ const tableRowKey = (0, react.useMemo)(() => {
61
+ var _ref3, _ctx$rowKey;
62
+ const key = (_ref3 = (_ctx$rowKey = ctx.rowKey) !== null && _ctx$rowKey !== void 0 ? _ctx$rowKey : rowKeyProp) !== null && _ref3 !== void 0 ? _ref3 : "id";
63
+ return typeof key === "function" ? key : (record) => getRowKey(record, typeof key === "string" ? key : String(key));
64
+ }, [ctx.rowKey, rowKeyProp]);
65
+ const rowSelection = (0, react.useMemo)(() => {
66
+ if (rowSelectionProp === false) return void 0;
67
+ const base = typeof rowSelectionProp === "object" ? rowSelectionProp : {};
68
+ return require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, base), {}, {
69
+ selectedRowKeys: ctx.selectedKeys,
70
+ onChange: (selectedRowKeys, selectedRows) => {
71
+ var _onChange;
72
+ ctx.onSelectionChange(selectedRowKeys, selectedRows);
73
+ (_onChange = base.onChange) === null || _onChange === void 0 || _onChange.call(base, selectedRowKeys, selectedRows);
74
+ }
75
+ });
76
+ }, [
77
+ ctx.selectedKeys,
78
+ ctx.onSelectionChange,
79
+ rowSelectionProp
80
+ ]);
81
+ const gridTableProps = (0, react.useMemo)(() => {
82
+ const picked = {};
83
+ Object.keys(ctx).forEach((k) => {
84
+ if (CONTEXT_ONLY_KEYS.includes(k)) return;
85
+ picked[k] = ctx[k];
86
+ });
87
+ return picked;
88
+ }, [ctx]);
89
+ if (typeof render === "function") return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, render(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ctx), rest)));
90
+ const tableScroll = (_rest$scroll = rest.scroll) !== null && _rest$scroll !== void 0 ? _rest$scroll : ctx.scroll;
91
+ return /* @__PURE__ */ react.default.createElement("div", {
92
+ "data-layout-slot": "grid",
93
+ className: "pisell-lowcode-record-board-grid"
94
+ }, /* @__PURE__ */ react.default.createElement(antd.Table, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, rest), gridTableProps), {}, {
95
+ scroll: tableScroll,
96
+ rowKey: tableRowKey,
97
+ dataSource: (_ctx$data = ctx.data) !== null && _ctx$data !== void 0 ? _ctx$data : [],
98
+ loading: ctx.loading,
99
+ columns,
100
+ rowSelection,
101
+ pagination: false
102
+ })));
103
+ };
104
+ var Grid_default = RecordBoardGridView;
105
+
106
+ //#endregion
107
+ exports.default = Grid_default;
@@ -0,0 +1,13 @@
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
+ // 行状态样式示例(如 grid.rowClassName 返回 'pisell-record-board-row-cancelled')
11
+ .pisell-record-board-row-cancelled {
12
+ background: #fff1f0;
13
+ }
@@ -0,0 +1,15 @@
1
+ import { RecordBoardGridView } from "./Grid.js";
2
+ import React from "react";
3
+
4
+ //#region src/components/pisellRecordBoard/layouts/GridLayout/index.d.ts
5
+ /**
6
+ * Grid 布局:仅内容区 = 表格(不含分页)。
7
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
8
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.GridLayout /></PisellRecordBoard.ShellFrame>
9
+ */
10
+ declare const GridLayout: React.FC<{
11
+ className?: string;
12
+ style?: React.CSSProperties;
13
+ }>;
14
+ //#endregion
15
+ export { GridLayout };
@@ -0,0 +1,23 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_Grid = require('./Grid.js');
3
+ let react = require("react");
4
+ react = require_rolldown_runtime.__toESM(react);
5
+
6
+ //#region src/components/pisellRecordBoard/layouts/GridLayout/index.tsx
7
+ /**
8
+ * Grid 布局:仅内容区 = 表格(不含分页)。
9
+ * 工具栏、多选操作栏、分页由 Shell Frame 提供,使用时用 ShellFrame 包裹:
10
+ * <PisellRecordBoard.ShellFrame><PisellRecordBoard.GridLayout /></PisellRecordBoard.ShellFrame>
11
+ */
12
+ const GridLayout = ({ className, style }) => {
13
+ return /* @__PURE__ */ react.default.createElement("div", {
14
+ className,
15
+ style,
16
+ "data-layout": "grid"
17
+ }, /* @__PURE__ */ react.default.createElement(require_Grid.default, null));
18
+ };
19
+ GridLayout.displayName = "RecordBoard.GridLayout";
20
+ var GridLayout_default = GridLayout;
21
+
22
+ //#endregion
23
+ exports.default = GridLayout_default;
@@ -0,0 +1,12 @@
1
+ import { PisellBatchActionBarProps } from "../../../pisellBatchActionBar/types.js";
2
+ import "../../../pisellBatchActionBar/index.js";
3
+ import React from "react";
4
+
5
+ //#region src/components/pisellRecordBoard/shellFrame/BatchActionBar/index.d.ts
6
+ /**
7
+ * RecordBoard 下的多选操作栏:从 context 取选中态与数据,渲染 PisellBatchActionBar。
8
+ * 仅在有选中项时展示;全选/反选/清空基于当前页 data。
9
+ */
10
+ declare const RecordBoardBatchActionBar: React.FC<Partial<PisellBatchActionBarProps>>;
11
+ //#endregion
12
+ export { RecordBoardBatchActionBar };
@@ -0,0 +1,71 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
+ const require_PisellBatchActionBar = require('../../../pisellBatchActionBar/PisellBatchActionBar.js');
4
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react);
7
+
8
+ //#region src/components/pisellRecordBoard/shellFrame/BatchActionBar/index.tsx
9
+ function getRowKey(record, rowKey) {
10
+ var _ref, _record$id;
11
+ if (typeof rowKey === "function") return rowKey(record);
12
+ if (typeof rowKey === "string" && record != null && rowKey in record) return record[rowKey];
13
+ 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;
14
+ }
15
+ /**
16
+ * RecordBoard 下的多选操作栏:从 context 取选中态与数据,渲染 PisellBatchActionBar。
17
+ * 仅在有选中项时展示;全选/反选/清空基于当前页 data。
18
+ */
19
+ const RecordBoardBatchActionBar = (props) => {
20
+ var _ctx$childComponentPr, _ctx$childComponentPr2;
21
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "batchActionBar" });
22
+ const { data, total, selectedKeys, selectedRows, onSelectionChange, rowKey: rowKeyFromContext } = ctx;
23
+ const rowKey = rowKeyFromContext !== null && rowKeyFromContext !== void 0 ? rowKeyFromContext : "id";
24
+ const currentPageKeys = (0, react.useMemo)(() => data.map((record) => getRowKey(record, rowKey)), [data, rowKey]);
25
+ const currentPageTotal = data.length;
26
+ const barProps = require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({
27
+ selectedKeys,
28
+ selectedRows,
29
+ total,
30
+ currentPageTotal,
31
+ currentPageKeys,
32
+ onSelectAll: (0, react.useCallback)(() => {
33
+ onSelectionChange(currentPageKeys, data);
34
+ }, [
35
+ currentPageKeys,
36
+ data,
37
+ onSelectionChange
38
+ ]),
39
+ onClear: (0, react.useCallback)(() => {
40
+ onSelectionChange([], []);
41
+ }, [onSelectionChange]),
42
+ onInvert: (0, react.useCallback)(() => {
43
+ const currentSet = new Set(currentPageKeys);
44
+ const selectedSet = new Set(selectedKeys);
45
+ const nextKeys = [];
46
+ const nextRows = [];
47
+ currentPageKeys.forEach((k, i) => {
48
+ if (!selectedSet.has(k)) {
49
+ nextKeys.push(k);
50
+ nextRows.push(data[i]);
51
+ }
52
+ });
53
+ const restSelectedKeys = selectedKeys.filter((k) => !currentSet.has(k));
54
+ const restSelectedRows = selectedRows.filter((_, i) => !currentSet.has(selectedKeys[i]));
55
+ onSelectionChange([...restSelectedKeys, ...nextKeys], [...restSelectedRows, ...nextRows]);
56
+ }, [
57
+ currentPageKeys,
58
+ data,
59
+ selectedKeys,
60
+ selectedRows,
61
+ onSelectionChange
62
+ ])
63
+ }, (_ctx$childComponentPr = (_ctx$childComponentPr2 = ctx.childComponentProps) === null || _ctx$childComponentPr2 === void 0 ? void 0 : _ctx$childComponentPr2.batchActionBar) !== null && _ctx$childComponentPr !== void 0 ? _ctx$childComponentPr : {}), props);
64
+ if (selectedKeys.length === 0) return null;
65
+ return /* @__PURE__ */ react.default.createElement(require_PisellBatchActionBar.default, barProps);
66
+ };
67
+ RecordBoardBatchActionBar.displayName = "RecordBoard.BatchActionBar";
68
+ var BatchActionBar_default = RecordBoardBatchActionBar;
69
+
70
+ //#endregion
71
+ exports.default = BatchActionBar_default;
@@ -0,0 +1,43 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_index = require('../../../../locales/index.js');
3
+ const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
4
+ let classnames = require("classnames");
5
+ classnames = require_rolldown_runtime.__toESM(classnames);
6
+ let react = require("react");
7
+ react = require_rolldown_runtime.__toESM(react);
8
+ let _ant_design_icons = require("@ant-design/icons");
9
+
10
+ //#region src/components/pisellRecordBoard/shellFrame/ColumnSetting/ColumnSettingPopover.tsx
11
+ /**
12
+ * 列显示隐藏弹层内容(仅控制列展示显隐,不控制 filter/sort)。
13
+ * 参考 table Actions ColumnsSetting PopoverContent,去掉拖拽排序。
14
+ */
15
+ const prefix = "pisell-lowcode-";
16
+ function getColumnTitle(column) {
17
+ const title = column.title;
18
+ if (typeof title === "string") return title;
19
+ return require_recordBoardColumns.getRecordBoardColumnKey(column) || "";
20
+ }
21
+ const ColumnSettingPopover = ({ columns, columnVisibility, onColumnVisibilityChange }) => {
22
+ const handleToggle = (colKey, isShow) => {
23
+ onColumnVisibilityChange({ [colKey]: isShow });
24
+ };
25
+ return /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}table-action-column-popover-content-wrap` }, /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}table-action-column-header` }, /* @__PURE__ */ react.default.createElement("span", { className: `${prefix}table-action-column-header-title` }, require_index.getText("table-action-column-title"))), /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}table-action-column-content` }, columns.map((col) => {
26
+ const colKey = require_recordBoardColumns.getRecordBoardColumnKey(col);
27
+ const isShow = columnVisibility[colKey] !== false;
28
+ return /* @__PURE__ */ react.default.createElement("div", {
29
+ key: colKey,
30
+ className: `${prefix}table-action-column-drag-item`,
31
+ style: { cursor: "default" }
32
+ }, /* @__PURE__ */ react.default.createElement("div", { className: `${prefix}table-action-column-drag-item-right` }, /* @__PURE__ */ react.default.createElement("span", { className: (0, classnames.default)(`${prefix}table-action-column-drag-item-right-text`, { [`${prefix}table-action-column-drag-item-right-text-hidden`]: !isShow }) }, getColumnTitle(col)), /* @__PURE__ */ react.default.createElement("span", {
33
+ className: `${prefix}table-action-column-drag-item-right-icon-wrap`,
34
+ onClick: () => handleToggle(colKey, !isShow),
35
+ role: "button",
36
+ "aria-label": isShow ? "hide" : "show"
37
+ }, isShow ? /* @__PURE__ */ react.default.createElement(_ant_design_icons.EyeOutlined, null) : /* @__PURE__ */ react.default.createElement(_ant_design_icons.EyeInvisibleOutlined, null))));
38
+ })));
39
+ };
40
+ var ColumnSettingPopover_default = ColumnSettingPopover;
41
+
42
+ //#endregion
43
+ exports.default = ColumnSettingPopover_default;
@@ -0,0 +1,62 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
3
+ const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
4
+ const require_ColumnSettingPopover = require('./ColumnSettingPopover.js');
5
+ let antd = require("antd");
6
+ let react = require("react");
7
+ react = require_rolldown_runtime.__toESM(react);
8
+ let _ant_design_icons = require("@ant-design/icons");
9
+ require("./index.less");
10
+
11
+ //#region src/components/pisellRecordBoard/shellFrame/ColumnSetting/index.tsx
12
+ /**
13
+ * RecordBoard 列显示隐藏设置(仅控制表格列展示,不控制 filter/sort)。
14
+ * 参考 table Actions ColumnsSetting,仅保留显隐切换,无拖拽排序。
15
+ */
16
+ const RecordBoardColumnSetting = () => {
17
+ var _ctx$childComponentPr, _ctx$columnVisibility;
18
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "columnSetting" });
19
+ const gridColumns = (_ctx$childComponentPr = ctx.childComponentProps) === null || _ctx$childComponentPr === void 0 || (_ctx$childComponentPr = _ctx$childComponentPr.grid) === null || _ctx$childComponentPr === void 0 ? void 0 : _ctx$childComponentPr.columns;
20
+ const columnVisibility = (_ctx$columnVisibility = ctx.columnVisibility) !== null && _ctx$columnVisibility !== void 0 ? _ctx$columnVisibility : {};
21
+ const onColumnVisibilityChange = ctx.onColumnVisibilityChange;
22
+ const content = (0, react.useMemo)(() => {
23
+ if (!Array.isArray(gridColumns) || gridColumns.length === 0 || typeof onColumnVisibilityChange !== "function") return null;
24
+ return /* @__PURE__ */ react.default.createElement(require_ColumnSettingPopover.default, {
25
+ columns: gridColumns,
26
+ columnVisibility,
27
+ onColumnVisibilityChange
28
+ });
29
+ }, [
30
+ gridColumns,
31
+ columnVisibility,
32
+ onColumnVisibilityChange
33
+ ]);
34
+ const hasHiddenColumns = (0, react.useMemo)(() => {
35
+ if (!Array.isArray(gridColumns)) return false;
36
+ return gridColumns.some((col) => columnVisibility[require_recordBoardColumns.getRecordBoardColumnKey(col)] === false);
37
+ }, [gridColumns, columnVisibility]);
38
+ if (!content) return null;
39
+ return /* @__PURE__ */ react.default.createElement(antd.Popover, {
40
+ content,
41
+ arrow: false,
42
+ placement: "bottomRight",
43
+ trigger: "click"
44
+ }, /* @__PURE__ */ react.default.createElement("span", {
45
+ className: "record-board-toolbar-column-setting-btn",
46
+ style: {
47
+ display: "inline-flex",
48
+ alignItems: "center",
49
+ justifyContent: "center",
50
+ width: 32,
51
+ height: 32,
52
+ cursor: "pointer",
53
+ borderRadius: 6,
54
+ color: hasHiddenColumns ? "var(--color-primary, #1890ff)" : void 0
55
+ }
56
+ }, /* @__PURE__ */ react.default.createElement(_ant_design_icons.EyeOutlined, { style: { fontSize: 18 } })));
57
+ };
58
+ RecordBoardColumnSetting.displayName = "RecordBoard.ColumnSetting";
59
+ var ColumnSetting_default = RecordBoardColumnSetting;
60
+
61
+ //#endregion
62
+ exports.default = ColumnSetting_default;
@@ -0,0 +1,2 @@
1
+ /* 复用 table ColumnsSetting 弹层样式,类名与 PopoverContent 一致 */
2
+ @import '../../../table/Actions/component/ColumnsSetting/PopoverContent.less';
@@ -0,0 +1,17 @@
1
+ import { RecordBoardContextValue } from "../../types.js";
2
+ import React from "react";
3
+ import "./index.less";
4
+
5
+ //#region src/components/pisellRecordBoard/shellFrame/Pagination/index.d.ts
6
+ interface RecordBoardPaginationProps extends Partial<Pick<RecordBoardContextValue, 'pagination' | 'total' | 'onPageChange' | 'loading'>> {
7
+ className?: string;
8
+ style?: React.CSSProperties;
9
+ render?: (ctx: RecordBoardContextValue) => React.ReactNode;
10
+ }
11
+ /**
12
+ * RecordBoard 下的分页:接入 packages/materials 的 Pagination,从 context 取 pagination / total / onPageChange;可透传 childComponentProps.pagination。
13
+ * 当 context 中 pagination 缺失时使用默认分页,避免在 Storybook 或未完整注入 context 时报错。
14
+ */
15
+ declare const RecordBoardPagination: React.FC<RecordBoardPaginationProps>;
16
+ //#endregion
17
+ export { RecordBoardPagination };
@@ -0,0 +1,54 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
+ const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
4
+ const require_index = require('../../../Pagination/index.js');
5
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
6
+ let react = require("react");
7
+ react = require_rolldown_runtime.__toESM(react);
8
+ require("./index.less");
9
+
10
+ //#region src/components/pisellRecordBoard/shellFrame/Pagination/index.tsx
11
+ const _excluded = ["render"];
12
+ const defaultPagination = {
13
+ pageNumber: 1,
14
+ pageSize: 10
15
+ };
16
+ /**
17
+ * RecordBoard 下的分页:接入 packages/materials 的 Pagination,从 context 取 pagination / total / onPageChange;可透传 childComponentProps.pagination。
18
+ * 当 context 中 pagination 缺失时使用默认分页,避免在 Storybook 或未完整注入 context 时报错。
19
+ */
20
+ const RecordBoardPagination = (props) => {
21
+ var _ctx$pagination, _ctx$childComponentPr3;
22
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "pagination" });
23
+ const { render } = props, rest = require_objectWithoutProperties._objectWithoutProperties(props, _excluded);
24
+ const pagination = (_ctx$pagination = ctx.pagination) !== null && _ctx$pagination !== void 0 ? _ctx$pagination : defaultPagination;
25
+ const paginationProps = (0, react.useMemo)(() => {
26
+ var _ctx$childComponentPr, _ctx$childComponentPr2;
27
+ return require_objectSpread2._objectSpread2({
28
+ current: pagination.pageNumber,
29
+ pageSize: pagination.pageSize,
30
+ total: ctx.total,
31
+ onChange: ctx.onPageChange
32
+ }, (_ctx$childComponentPr = (_ctx$childComponentPr2 = ctx.childComponentProps) === null || _ctx$childComponentPr2 === void 0 ? void 0 : _ctx$childComponentPr2.pagination) !== null && _ctx$childComponentPr !== void 0 ? _ctx$childComponentPr : {});
33
+ }, [
34
+ pagination.pageNumber,
35
+ pagination.pageSize,
36
+ ctx.total,
37
+ ctx.onPageChange,
38
+ (_ctx$childComponentPr3 = ctx.childComponentProps) === null || _ctx$childComponentPr3 === void 0 ? void 0 : _ctx$childComponentPr3.pagination
39
+ ]);
40
+ if (typeof render === "function") return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, render(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, ctx), rest)));
41
+ return /* @__PURE__ */ react.default.createElement("div", {
42
+ "data-layout-slot": "pagination",
43
+ className: "record-board-shell-frame-pagination",
44
+ style: {
45
+ marginTop: 16,
46
+ display: "flex",
47
+ justifyContent: "center"
48
+ }
49
+ }, /* @__PURE__ */ react.default.createElement(require_index.default, paginationProps));
50
+ };
51
+ var Pagination_default = RecordBoardPagination;
52
+
53
+ //#endregion
54
+ exports.default = Pagination_default;
@@ -0,0 +1,61 @@
1
+ /**
2
+ * RecordBoard ShellFrame 内分页样式,参考 orderList index.less:64
3
+ */
4
+
5
+ .record-board-shell-frame-pagination {
6
+ margin-top: 0;
7
+
8
+ .pisell-lowcode-pagination {
9
+ //border: none;
10
+ }
11
+
12
+ .pisell-lowcode-pagination-prev {
13
+ padding: 8px 14px;
14
+ height: 40px !important;
15
+ white-space: nowrap;
16
+ }
17
+
18
+ .pisell-lowcode-pagination-next {
19
+ padding: 8px 14px;
20
+ height: 40px !important;
21
+ white-space: nowrap;
22
+ }
23
+
24
+ .pisell-lowcode-pagination-item {
25
+ padding: 10px 14px;
26
+ min-width: 40px;
27
+ height: 40px !important;
28
+ line-height: 20px !important;
29
+
30
+ & > a {
31
+ white-space: nowrap;
32
+ }
33
+ }
34
+
35
+ .pisell-lowcode-pagination-jump-prev,
36
+ .pisell-lowcode-pagination-jump-next {
37
+ display: flex;
38
+ justify-content: center;
39
+ align-items: center;
40
+ min-width: 40px;
41
+ height: 40px;
42
+ }
43
+
44
+ .pisell-lowcode-pagination-options {
45
+ margin-left: 30px;
46
+
47
+ .pisell-lowcode-select {
48
+ min-width: 80px;
49
+ height: 40px;
50
+
51
+ .pisell-lowcode-select-selector {
52
+ padding: 10px 14px;
53
+ height: 40px;
54
+
55
+ .pisell-lowcode-select-selection-search-input {
56
+ height: 100%;
57
+ }
58
+ }
59
+ }
60
+ }
61
+ }
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+
3
+ //#region src/components/pisellRecordBoard/shellFrame/Search/index.d.ts
4
+ interface RecordBoardSearchProps {
5
+ [key: string]: any;
6
+ }
7
+ /**
8
+ * RecordBoard 下的独立搜索槽:使用 PisellFind,绑定 context.searchParams.keyword 与 onSearch。
9
+ * 可通过 childComponentProps.search 透传 PisellFind 的 props。
10
+ */
11
+ declare const RecordBoardSearch: React.FC<RecordBoardSearchProps>;
12
+ //#endregion
13
+ export { RecordBoardSearch };
@@ -0,0 +1,36 @@
1
+ const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
2
+ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
3
+ const require_index = require('../../../pisellFind/index.js');
4
+ const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
5
+ let react = require("react");
6
+ react = require_rolldown_runtime.__toESM(react);
7
+
8
+ //#region src/components/pisellRecordBoard/shellFrame/Search/index.tsx
9
+ /** 与 context.searchParams 对应的默认搜索参数字段名 */
10
+ const DEFAULT_SEARCH_FIELD = "keyword";
11
+ /**
12
+ * RecordBoard 下的独立搜索槽:使用 PisellFind,绑定 context.searchParams.keyword 与 onSearch。
13
+ * 可通过 childComponentProps.search 透传 PisellFind 的 props。
14
+ */
15
+ const RecordBoardSearch = (props) => {
16
+ var _searchParams$DEFAULT;
17
+ const ctx = require_useRecordBoardContext.useRecordBoardContext({ displayName: "search" });
18
+ const { searchParams, onSearch } = ctx;
19
+ const searchProps = ctx;
20
+ const keyword = (_searchParams$DEFAULT = searchParams === null || searchParams === void 0 ? void 0 : searchParams[DEFAULT_SEARCH_FIELD]) !== null && _searchParams$DEFAULT !== void 0 ? _searchParams$DEFAULT : "";
21
+ const handleSearch = (0, react.useCallback)((value) => {
22
+ onSearch(require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, searchParams), {}, { [DEFAULT_SEARCH_FIELD]: value || void 0 }));
23
+ }, [onSearch, searchParams]);
24
+ return /* @__PURE__ */ react.default.createElement("div", {
25
+ "data-layout-slot": "search",
26
+ style: { marginBottom: 8 }
27
+ }, /* @__PURE__ */ react.default.createElement(require_index.PisellFind, require_objectSpread2._objectSpread2({
28
+ value: keyword,
29
+ onSearch: handleSearch
30
+ }, searchProps)));
31
+ };
32
+ RecordBoardSearch.displayName = "RecordBoard.Search";
33
+ var Search_default = RecordBoardSearch;
34
+
35
+ //#endregion
36
+ exports.default = Search_default;