@pisell/materials 1.0.1042 → 1.0.1044

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 (80) 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/meta.js +2 -2
  5. package/build/lowcode/render/default/view.css +1 -1
  6. package/build/lowcode/render/default/view.js +5 -5
  7. package/build/lowcode/view.css +1 -1
  8. package/build/lowcode/view.js +5 -5
  9. package/es/components/Pagination/index.js +37 -23
  10. package/es/components/PisellCards/index.d.ts +6 -6
  11. package/es/components/calendar/index.d.ts +2 -2
  12. package/es/components/checkbox/index.d.ts +2 -2
  13. package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  14. package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
  15. package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
  16. package/es/components/dataSourceComponents/fields/Select/index.d.ts +2 -2
  17. package/es/components/dataSourceComponents/fields/Switch/index.d.ts +2 -2
  18. package/es/components/date-picker/index.d.ts +2 -2
  19. package/es/components/filter/components/FilterButton/index.js +10 -4
  20. package/es/components/filter/components/FilterButton/types.d.ts +2 -1
  21. package/es/components/input/index.d.ts +2 -2
  22. package/es/components/pisell-config-provider/context.d.ts +2 -2
  23. package/es/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -21
  24. package/es/components/pisellDatePicker/index.d.ts +2 -2
  25. package/es/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  26. package/es/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +5 -5
  27. package/es/components/pisellDateTimeDisplay/utils/localeUtils.js +6 -2
  28. package/es/components/pisellFind/index.js +2 -1
  29. package/es/components/pisellGridPro/ToolBar/index.less +23 -0
  30. package/es/components/pisellModal/index.d.ts +6 -6
  31. package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +58 -0
  32. package/es/components/pisellRecordBoard/docs/ShellFrame.md +1 -1
  33. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +25 -13
  34. package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +14 -0
  35. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -0
  36. package/es/components/pisellRecordBoard/shellFrame/Pagination/index.less +12 -0
  37. package/es/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +35 -0
  38. package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +39 -7
  39. package/es/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +6 -1
  40. package/es/components/pisellRecordBoard/types.d.ts +2 -1
  41. package/es/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +1 -1
  42. package/es/components/radio/index.d.ts +2 -2
  43. package/es/components/section-footers/index.d.ts +2 -2
  44. package/es/components/skeleton/index.d.ts +2 -2
  45. package/es/components/time-picker/index.d.ts +2 -2
  46. package/es/components/typography/index.d.ts +2 -2
  47. package/es/components/upload/index.d.ts +2 -2
  48. package/es/locales/zh-CN.js +2 -2
  49. package/es/locales/zh-TW.js +2 -2
  50. package/lib/components/Pagination/index.js +37 -23
  51. package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
  52. package/lib/components/dataSourceComponents/fields/Input.Email/index.d.ts +2 -2
  53. package/lib/components/dataSourceComponents/fields/Input.Subdomain/index.d.ts +2 -2
  54. package/lib/components/dataSourceComponents/fields/Input.Url/index.d.ts +2 -2
  55. package/lib/components/date-picker/index.d.ts +2 -2
  56. package/lib/components/filter/components/FilterButton/index.js +8 -2
  57. package/lib/components/filter/components/FilterButton/types.d.ts +2 -1
  58. package/lib/components/pisellBatchActionBar/PisellBatchActionBar.js +26 -21
  59. package/lib/components/pisellDateTimeDisplay/PisellDateTimeDisplay.less +2 -1
  60. package/lib/components/pisellDateTimeDisplay/formats/dateTimeDisplayFormats.js +5 -5
  61. package/lib/components/pisellDateTimeDisplay/utils/localeUtils.js +7 -2
  62. package/lib/components/pisellFind/index.js +2 -1
  63. package/lib/components/pisellGridPro/ToolBar/index.less +23 -0
  64. package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +58 -0
  65. package/lib/components/pisellRecordBoard/docs/ShellFrame.md +1 -1
  66. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +25 -13
  67. package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +14 -0
  68. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -0
  69. package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.less +12 -0
  70. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/ToolBarFilter.less +35 -0
  71. package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +39 -7
  72. package/lib/components/pisellRecordBoard/shellFrame/ToolBarReset/index.js +6 -1
  73. package/lib/components/pisellRecordBoard/types.d.ts +2 -1
  74. package/lib/components/pisellTimeRangeDisplay/PisellTimeRangeDisplay.js +1 -1
  75. package/lib/components/skeleton/index.d.ts +2 -2
  76. package/lib/components/time-picker/index.d.ts +2 -2
  77. package/lib/components/upload/index.d.ts +2 -2
  78. package/lib/locales/zh-CN.js +2 -2
  79. package/lib/locales/zh-TW.js +2 -2
  80. package/package.json +4 -4
@@ -387,6 +387,64 @@ export default () => {
387
387
  };
388
388
  ```
389
389
 
390
+ ### 筛选默认值(QuickFilter)
391
+
392
+ 左侧 QuickFilter 的表单展示和请求参数都来自 **`searchParams.filter.values`**。要带默认值(如订单日期默认「近 7 天」),在**受控**使用时,用初始的 `searchParams` 把默认值写进 `filter.values` 即可。
393
+
394
+ - 传入 RecordBoard 的 `searchParams` 初始值里包含 `filter: { values: { [字段名]: 默认值 }, quickFilter: [], otherFilter: [...] }`。
395
+ - `filter.values` 的 key 需与 quickFilter 的 `filterList` 里每一项的 `name`/`key` 一致(如 `orderDate`)。
396
+ - 日期范围等建议用 dayjs 实例,例如 `orderDate: [dayjs().subtract(7, 'day'), dayjs()]`。
397
+
398
+ 示例(orderDate 默认近 7 天):
399
+
400
+ ```tsx
401
+ import React, { useState } from 'react';
402
+ import dayjs from 'dayjs';
403
+ import { PisellRecordBoard } from '@pisell/materials';
404
+
405
+ // 初始 searchParams 带默认筛选
406
+ const [searchParams, setSearchParams] = useState<Record<string, unknown>>({
407
+ filter: {
408
+ quickFilter: [],
409
+ otherFilter: [], // 或你的 otherFilter 配置
410
+ values: {
411
+ orderDate: [dayjs().subtract(7, 'day'), dayjs()],
412
+ },
413
+ },
414
+ });
415
+
416
+ // value 里 searchParams、onSearch 照常
417
+ const value = {
418
+ data: list,
419
+ searchParams,
420
+ onSearch: (params) => setSearchParams(params),
421
+ // ...
422
+ };
423
+
424
+ // toolBar 里 quickFilter.filterList 的 name/key 为 orderDate,与上面 values.orderDate 对应
425
+ <PisellRecordBoard
426
+ {...value}
427
+ toolBar={{
428
+ quickFilter: {
429
+ filterList: [
430
+ {
431
+ type: 'rangePicker',
432
+ name: 'orderDate',
433
+ key: 'orderDate',
434
+ label: '订单日期',
435
+ props: { placeholder: ['开始', '结束'] },
436
+ },
437
+ ],
438
+ },
439
+ filter: { hiddenQuickFilter: true },
440
+ }}
441
+ >
442
+ ...
443
+ </PisellRecordBoard>
444
+ ```
445
+
446
+ 这样首屏会显示默认日期范围,且首次请求会带上该筛选条件。
447
+
390
448
  ### 自定义组合(不用 ShellFrame)
391
449
 
392
450
  可单独使用 ToolBar、BatchActionBar、Grid、Pagination 自由组合。
@@ -87,7 +87,7 @@ Shell Frame 内各块通过 RecordBoard 打散传入的 **grid**、**toolBar**
87
87
  ## 搜索与筛选约定
88
88
 
89
89
  - **搜索**:默认绑定 `searchParams.keyword`,变更时调用 `onSearch({ ...searchParams, keyword: value })`。
90
- - **筛选**:绑定 `searchParams.filter`,结构为 `{ quickFilter, otherFilter, values }`;ToolBar 内右侧 Filter 弹层默认 `hiddenQuickFilter: true`,快筛全部在左侧 QuickFilter 展示。
90
+ - **筛选**:绑定 `searchParams.filter`,结构为 `{ quickFilter, otherFilter, values }`;ToolBar 内右侧 Filter 弹层默认 `hiddenQuickFilter: true`,快筛全部在左侧 QuickFilter 展示。**筛选默认值**:在受控用法下,给传入的 `searchParams` 设置初始值,在 `filter.values` 里按 quickFilter 的 `name`/`key` 写好默认值即可(详见 [PisellRecordBoard - 筛选默认值](./PisellRecordBoard.md#筛选默认值quickfilter))。
91
91
  - **排序**:绑定 `searchParams.sort`,单值字符串;Sort 与 Filter 变更均通过 `onSearch` 写回 `searchParams`。
92
92
 
93
93
  ## 相关文档
@@ -48,7 +48,7 @@ const CONTEXT_ONLY_KEYS = [
48
48
  "setScrollAreaHeight"
49
49
  ];
50
50
  const RecordBoardGridView = (props) => {
51
- var _ref2, _ctx$data;
51
+ var _ref2, _ctx$data, _ctx$data2;
52
52
  const ctx = useRecordBoardContext({ displayName: "grid" });
53
53
  const { render, columns: columnsProp, rowKey: rowKeyProp, rowSelection: rowSelectionProp } = props, rest = _objectWithoutProperties(props, _excluded);
54
54
  const rawColumns = (_ref2 = columnsProp !== null && columnsProp !== void 0 ? columnsProp : ctx.columns) !== null && _ref2 !== void 0 ? _ref2 : [];
@@ -62,9 +62,10 @@ const RecordBoardGridView = (props) => {
62
62
  const key = (_ref3 = (_ctx$rowKey = ctx.rowKey) !== null && _ctx$rowKey !== void 0 ? _ctx$rowKey : rowKeyProp) !== null && _ref3 !== void 0 ? _ref3 : "id";
63
63
  return typeof key === "function" ? key : (record) => getRowKey(record, typeof key === "string" ? key : String(key));
64
64
  }, [ctx.rowKey, rowKeyProp]);
65
+ const rowSelectionConfig = rowSelectionProp !== null && rowSelectionProp !== void 0 ? rowSelectionProp : ctx.rowSelection;
65
66
  const rowSelection = useMemo(() => {
66
- if (rowSelectionProp === false) return void 0;
67
- const base = typeof rowSelectionProp === "object" ? rowSelectionProp : {};
67
+ if (rowSelectionConfig === false) return void 0;
68
+ const base = typeof rowSelectionConfig === "object" ? rowSelectionConfig : {};
68
69
  return _objectSpread2(_objectSpread2({}, base), {}, {
69
70
  selectedRowKeys: ctx.selectedKeys,
70
71
  onChange: (selectedRowKeys, selectedRows) => {
@@ -76,7 +77,7 @@ const RecordBoardGridView = (props) => {
76
77
  }, [
77
78
  ctx.selectedKeys,
78
79
  ctx.onSelectionChange,
79
- rowSelectionProp
80
+ rowSelectionConfig
80
81
  ]);
81
82
  const gridTableProps = useMemo(() => {
82
83
  const picked = {};
@@ -87,25 +88,34 @@ const RecordBoardGridView = (props) => {
87
88
  return picked;
88
89
  }, [ctx]);
89
90
  if (typeof render === "function") return /* @__PURE__ */ React.createElement(React.Fragment, null, render(_objectSpread2(_objectSpread2({}, ctx), rest)));
91
+ const dataSource = (_ctx$data = ctx.data) !== null && _ctx$data !== void 0 ? _ctx$data : [];
92
+ const isEmpty = !Array.isArray(dataSource) || dataSource.length === 0;
93
+ const sumColumnWidths = useMemo(() => {
94
+ return columns.reduce((sum, col) => {
95
+ var _col$width;
96
+ return sum + ((_col$width = col.width) !== null && _col$width !== void 0 ? _col$width : 250);
97
+ }, 0) || 2e3;
98
+ }, [columns]);
90
99
  const tableScroll = useMemo(() => {
91
100
  var _rest$scroll;
92
101
  const scroll = (_rest$scroll = rest.scroll) !== null && _rest$scroll !== void 0 ? _rest$scroll : ctx.scroll;
102
+ const scrollX = isEmpty && scroll && typeof scroll.x !== "number" ? sumColumnWidths : scroll === null || scroll === void 0 ? void 0 : scroll.x;
93
103
  if ((scroll === null || scroll === void 0 ? void 0 : scroll.autoCalc) && typeof ctx.scrollAreaHeight === "number") {
94
- var _scroll$x;
95
104
  const wrapHeight = ctx.scrollAreaHeight;
96
- ctx.pagination;
97
105
  return {
98
- x: (_scroll$x = scroll.x) !== null && _scroll$x !== void 0 ? _scroll$x : columns.reduce((p, c) => {
99
- var _c$width;
100
- return p + ((_c$width = c.width) !== null && _c$width !== void 0 ? _c$width : 250);
101
- }, 0) || 2e3,
106
+ x: scrollX !== null && scrollX !== void 0 ? scrollX : sumColumnWidths,
102
107
  y: Math.max(wrapHeight - 40, 100),
103
108
  scrollToFirstRowOnChange: scroll.scrollToFirstRowOnChange
104
109
  };
105
110
  }
106
111
  if (scroll && typeof scroll === "object") {
107
112
  const _ref4 = scroll, { autoCalc: _a } = _ref4, restScroll = _objectWithoutProperties(_ref4, _excluded2);
108
- return Object.keys(restScroll).length ? restScroll : void 0;
113
+ const resolved = Object.keys(restScroll).length ? restScroll : void 0;
114
+ if (resolved) {
115
+ var _ref5;
116
+ return _objectSpread2(_objectSpread2({}, resolved), {}, { x: (_ref5 = scrollX !== null && scrollX !== void 0 ? scrollX : resolved.x) !== null && _ref5 !== void 0 ? _ref5 : sumColumnWidths });
117
+ }
118
+ return resolved;
109
119
  }
110
120
  return scroll;
111
121
  }, [
@@ -113,7 +123,9 @@ const RecordBoardGridView = (props) => {
113
123
  ctx.scroll,
114
124
  ctx.scrollAreaHeight,
115
125
  ctx.pagination,
116
- columns
126
+ columns,
127
+ sumColumnWidths,
128
+ isEmpty
117
129
  ]);
118
130
  return /* @__PURE__ */ React.createElement("div", {
119
131
  "data-layout-slot": "grid",
@@ -121,7 +133,7 @@ const RecordBoardGridView = (props) => {
121
133
  }, /* @__PURE__ */ React.createElement(Table, _objectSpread2(_objectSpread2(_objectSpread2({}, rest), gridTableProps), {}, {
122
134
  scroll: tableScroll,
123
135
  rowKey: tableRowKey,
124
- dataSource: (_ctx$data = ctx.data) !== null && _ctx$data !== void 0 ? _ctx$data : [],
136
+ dataSource: (_ctx$data2 = ctx.data) !== null && _ctx$data2 !== void 0 ? _ctx$data2 : [],
125
137
  loading: ctx.loading,
126
138
  columns,
127
139
  rowSelection,
@@ -21,6 +21,18 @@
21
21
  background: var(--ant-color-bg-container, #ffffff);
22
22
  }
23
23
 
24
+ /*
25
+ * 根本原因:表头所有单元格统一用了 z-index: 1,横向滚动时后面的列(非固定列)与固定列同层叠,
26
+ * 非固定列会盖住固定列。解决:仅对「固定列」提高 z-index。
27
+ * antd/rc-table 会给所有 fixed 列(含多选列)的 th/td 加上 .*-table-cell-fix-left,
28
+ * 用该类选择器即可覆盖任意数量的固定列,无需按 nth-child 逐个写。
29
+ */
30
+
31
+ .pisell-lowcode-table-thead .pisell-lowcode-table-cell-fix-left {
32
+ z-index: 2 !important;
33
+ background: var(--ant-color-bg-container, #ffffff) !important;
34
+ }
35
+
24
36
  // 让 antd Table 外层占满,使 scroll.y 生效且高度链不断
25
37
  .pisell-lowcode-table-wrapper {
26
38
  flex: 1;
@@ -28,12 +40,14 @@
28
40
  display: flex;
29
41
  flex-direction: column;
30
42
  }
43
+
31
44
  .pisell-lowcode-table-wrapper .pisell-lowcode-table {
32
45
  flex: 1;
33
46
  min-height: 0;
34
47
  display: flex;
35
48
  flex-direction: column;
36
49
  }
50
+
37
51
  .pisell-lowcode-table-wrapper .pisell-lowcode-table .pisell-lowcode-table-container {
38
52
  flex: 1;
39
53
  min-height: 0;
@@ -36,6 +36,7 @@ const RecordBoardPagination = (props) => {
36
36
  (_ctx$childComponentPr3 = ctx.childComponentProps) === null || _ctx$childComponentPr3 === void 0 ? void 0 : _ctx$childComponentPr3.pagination
37
37
  ]);
38
38
  if (typeof render === "function") return /* @__PURE__ */ React.createElement(React.Fragment, null, render(_objectSpread2(_objectSpread2({}, ctx), rest)));
39
+ if (ctx.total === 0) return null;
39
40
  return /* @__PURE__ */ React.createElement("div", {
40
41
  "data-layout-slot": "pagination",
41
42
  className: "record-board-shell-frame-pagination",
@@ -64,3 +64,15 @@
64
64
  }
65
65
  }
66
66
  }
67
+
68
+ /**
69
+ * 手机宽度下:不展示 "page x of x" 文案,仅保留上一页/下一页
70
+ */
71
+ @media (max-width: 768px) {
72
+ .record-board-shell-frame-pagination {
73
+ .materials-grid-paginator-center,
74
+ .pisell-lowcode-pagination-total-text {
75
+ display: none !important;
76
+ }
77
+ }
78
+ }
@@ -18,6 +18,23 @@
18
18
  max-width: 100%;
19
19
  }
20
20
  }
21
+
22
+ .pisell-lowcode-form-item {
23
+ margin-right: 0;
24
+ }
25
+
26
+ .MuiFormLabel-root {
27
+ line-height: 30px;
28
+ }
29
+
30
+ .MuiInputBase-root {
31
+ height: 48px !important;
32
+ border-radius: 8px !important;
33
+
34
+ input {
35
+ //height: 48px !important;
36
+ }
37
+ }
21
38
  }
22
39
 
23
40
  .record-board-toolbar-quick-filter-form {
@@ -26,6 +43,24 @@
26
43
  align-items: center;
27
44
  }
28
45
 
46
+ /**
47
+ * 手机版宽度:左侧快筛 + 搜索 支持换行,避免挤在一行
48
+ */
49
+ @media (max-width: 768px) {
50
+ .record-board-toolbar-top-left {
51
+ flex-wrap: wrap;
52
+ }
53
+
54
+ .record-board-toolbar-top-left .record-board-toolbar-find-wrap {
55
+ flex: 1 1 100%;
56
+ min-width: 100%;
57
+ }
58
+
59
+ .record-board-toolbar-quick-filter-form {
60
+ flex-wrap: wrap;
61
+ }
62
+ }
63
+
29
64
  /**
30
65
  * RecordBoard 工具栏「筛选」按钮样式
31
66
  * 依据 Figma Pisell 2.0 Component Library - Filter Button (node-id=13586-90537)
@@ -11,10 +11,15 @@ import ToolBarQuickFilter_default from "../ToolBarQuickFilter/index.js";
11
11
  import ColumnSetting_default from "../ColumnSetting/index.js";
12
12
  import { Button, Space } from "antd";
13
13
  import React, { useCallback, useMemo } from "react";
14
+ import { locales } from "@pisell/utils";
14
15
  import SwitchVertical01 from "@pisell/icon/es/SwitchVertical01";
15
16
  import "./ToolBarFilter.less";
16
17
 
17
18
  //#region src/components/pisellRecordBoard/shellFrame/ToolBar/index.tsx
19
+ /** 与 Quick Filter 同源:使用 @pisell/utils 的 locales.getText,无 key 时回退 materials getText */
20
+ function getSortButtonText() {
21
+ return locales.getText("pisell2.recordBoard.toolbar.sort") || getText("sort-button-text");
22
+ }
18
23
  /** 默认搜索参数字段名,与 context.searchParams 对应 */
19
24
  const DEFAULT_SEARCH_FIELD = "keyword";
20
25
  /** 筛选在 searchParams 中的字段名 */
@@ -87,25 +92,52 @@ const RecordBoardToolBar = (props) => {
87
92
  className: "record-board-toolbar-filter-btn",
88
93
  icon: /* @__PURE__ */ React.createElement(SwitchVertical01, null),
89
94
  size: "large"
90
- }, getText("sort-button-text"))
95
+ }, getSortButtonText())
91
96
  }));
92
97
  const filterConfig = slots.filter;
93
98
  const hideFilter = filterConfig === false;
94
99
  const filterValue = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
95
- const hasFilterItems = Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.quickFilter) && filterValue.quickFilter.length > 0 || Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.otherFilter) && filterValue.otherFilter.length > 0;
100
+ const hasFilterList = Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.quickFilter) && filterValue.quickFilter.length > 0 || Array.isArray(filterValue === null || filterValue === void 0 ? void 0 : filterValue.otherFilter) && filterValue.otherFilter.length > 0;
101
+ const hasFilterValues = typeof (filterValue === null || filterValue === void 0 ? void 0 : filterValue.values) === "object" && filterValue.values !== null && Object.keys(filterValue.values).length > 0;
102
+ const hasFilterItems = hasFilterList || hasFilterValues;
103
+ const defaultFilterFromConfig = typeof filterConfig === "object" && filterConfig !== null && filterConfig.defaultFilterValue ? filterConfig.defaultFilterValue : null;
96
104
  const effectiveFilterValue = useMemo(() => {
97
- var _base$values;
98
- const base = filterValue != null && hasFilterItems ? filterValue : typeof filterConfig === "object" && filterConfig !== null && filterConfig.defaultFilterValue ? filterConfig.defaultFilterValue : derivedFilterFromColumns && (derivedFilterFromColumns.quickFilter.length > 0 || derivedFilterFromColumns.otherFilter.length > 0) ? derivedFilterFromColumns : getDefaultFilterValue();
99
- return _objectSpread2(_objectSpread2({}, base), {}, { values: (_base$values = base.values) !== null && _base$values !== void 0 ? _base$values : {} });
105
+ var _defaultFilterFromCon, _defaultFilterFromCon2, _base$values;
106
+ const base = filterValue != null && hasFilterItems ? filterValue : defaultFilterFromConfig ? defaultFilterFromConfig : derivedFilterFromColumns && (derivedFilterFromColumns.quickFilter.length > 0 || derivedFilterFromColumns.otherFilter.length > 0) ? derivedFilterFromColumns : getDefaultFilterValue();
107
+ const quickFilter = Array.isArray(base.quickFilter) && base.quickFilter.length > 0 ? base.quickFilter : (_defaultFilterFromCon = defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.quickFilter) !== null && _defaultFilterFromCon !== void 0 ? _defaultFilterFromCon : [];
108
+ let otherFilter = Array.isArray(base.otherFilter) && base.otherFilter.length > 0 ? base.otherFilter : (_defaultFilterFromCon2 = defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.otherFilter) !== null && _defaultFilterFromCon2 !== void 0 ? _defaultFilterFromCon2 : [];
109
+ if (otherFilter === base.otherFilter && Array.isArray(defaultFilterFromConfig === null || defaultFilterFromConfig === void 0 ? void 0 : defaultFilterFromConfig.otherFilter) && defaultFilterFromConfig.otherFilter.length > 0) {
110
+ const configMap = new Map(defaultFilterFromConfig.otherFilter.map((c) => {
111
+ var _ref2, _c$key;
112
+ return [(_ref2 = (_c$key = c.key) !== null && _c$key !== void 0 ? _c$key : c.name) !== null && _ref2 !== void 0 ? _ref2 : "", c];
113
+ }));
114
+ otherFilter = otherFilter.map((item) => {
115
+ var _ref3, _item$key;
116
+ const key = (_ref3 = (_item$key = item.key) !== null && _item$key !== void 0 ? _item$key : item.name) !== null && _ref3 !== void 0 ? _ref3 : "";
117
+ const configItem = configMap.get(key);
118
+ if (!configItem) return item;
119
+ return _objectSpread2(_objectSpread2(_objectSpread2({}, configItem), item), {}, { other: _objectSpread2(_objectSpread2({}, configItem === null || configItem === void 0 ? void 0 : configItem.other), item === null || item === void 0 ? void 0 : item.other) });
120
+ });
121
+ }
122
+ return _objectSpread2(_objectSpread2({}, base), {}, {
123
+ quickFilter,
124
+ otherFilter,
125
+ values: (_base$values = base.values) !== null && _base$values !== void 0 ? _base$values : {}
126
+ });
100
127
  }, [
101
128
  filterValue,
102
129
  hasFilterItems,
103
- filterConfig,
130
+ defaultFilterFromConfig,
104
131
  derivedFilterFromColumns
105
132
  ]);
106
133
  const filterValueForPisellFilter = useMemo(() => _objectSpread2(_objectSpread2({}, effectiveFilterValue), {}, { quickFilter: [] }), [effectiveFilterValue]);
107
134
  const handleFilterChange = useCallback((value) => {
108
- onSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, { [FILTER_PARAMS_FIELD]: value }));
135
+ var _currentFilter$values, _value$values;
136
+ const currentFilter = searchParams === null || searchParams === void 0 ? void 0 : searchParams[FILTER_PARAMS_FIELD];
137
+ const currentValues = (_currentFilter$values = currentFilter === null || currentFilter === void 0 ? void 0 : currentFilter.values) !== null && _currentFilter$values !== void 0 ? _currentFilter$values : {};
138
+ const incomingValues = (_value$values = value === null || value === void 0 ? void 0 : value.values) !== null && _value$values !== void 0 ? _value$values : {};
139
+ const nextFilter = _objectSpread2(_objectSpread2({}, value), {}, { values: _objectSpread2(_objectSpread2({}, currentValues), incomingValues) });
140
+ onSearch(_objectSpread2(_objectSpread2({}, searchParams), {}, { [FILTER_PARAMS_FIELD]: nextFilter }));
109
141
  }, [onSearch, searchParams]);
110
142
  const filterNode = hideFilter ? null : /* @__PURE__ */ React.createElement(pisellFilter_default, _objectSpread2({
111
143
  value: filterValueForPisellFilter,
@@ -3,10 +3,15 @@ import { getText } from "../../../../locales/index.js";
3
3
  import { useRecordBoardContext } from "../../hooks/useRecordBoardContext.js";
4
4
  import { Button } from "antd";
5
5
  import React, { useCallback } from "react";
6
+ import { locales } from "@pisell/utils";
6
7
  import { ReloadOutlined } from "@ant-design/icons";
7
8
  import "./index.less";
8
9
 
9
10
  //#region src/components/pisellRecordBoard/shellFrame/ToolBarReset/index.tsx
11
+ /** 与 Quick Filter 同源:使用 @pisell/utils 的 locales.getText,无 key 时回退 materials getText */
12
+ function getResetButtonText() {
13
+ return locales.getText("pisell2.recordBoard.toolbar.reset") || getText("record-board-toolbar-reset");
14
+ }
10
15
  /** 筛选在 searchParams 中的字段名,与 ToolBar 一致 */
11
16
  const FILTER_PARAMS_FIELD = "filter";
12
17
  /** 排序在 searchParams 中的字段名,与 ToolBar 一致 */
@@ -16,7 +21,7 @@ const SORT_PARAMS_FIELD = "sort";
16
21
  * 点击后以空 filter.values、清空 sort 调用 onSearch,并调用 onReset(若提供)。
17
22
  */
18
23
  const ToolBarReset = ({ size = "large", type = "default", children }) => {
19
- const defaultResetText = getText("record-board-toolbar-reset");
24
+ const defaultResetText = getResetButtonText();
20
25
  const { searchParams, onSearch, onReset } = useRecordBoardContext();
21
26
  const handleReset = useCallback(() => {
22
27
  var _currentFilter$otherF;
@@ -213,7 +213,8 @@ type RecordBoardGridProps = {
213
213
  size?: 'small' | 'middle' | 'default'; /** 当前选中的行 key 列表(多选) */
214
214
  selectedKeys?: Key[]; /** 当前选中的行数据(多选) */
215
215
  selectedRows?: unknown[]; /** 多选变更回调 */
216
- onSelectionChange?: (keys: Key[], rows: unknown[]) => void;
216
+ onSelectionChange?: (keys: Key[], rows: unknown[]) => void; /** 多选列配置:fixed、columnWidth 等,与 selectedKeys/onSelectionChange 合并为 Table rowSelection */
217
+ rowSelection?: Partial<Omit<NonNullable<TableProps<unknown>['rowSelection']>, 'selectedRowKeys' | 'onChange'>>;
217
218
  } & Omit<TableProps<unknown>, 'dataSource' | 'loading' | 'pagination' | 'columns' | 'scroll' | 'size' | 'rowSelection'>;
218
219
  interface RecordBoardChildComponentProps {
219
220
  /** 搜索配置,透传给 PisellFind;关键词绑定 searchParams.keyword */
@@ -54,7 +54,7 @@ const PisellTimeRangeDisplay = (props) => {
54
54
  "duration"
55
55
  ] } = fields || {};
56
56
  const showSeconds = (_durationFormat$showS = durationFormat === null || durationFormat === void 0 ? void 0 : durationFormat.showSeconds) !== null && _durationFormat$showS !== void 0 ? _durationFormat$showS : false;
57
- const effectiveDateFormat = useMemo(() => _objectSpread2({ showRelativeDay: true }, dateFormat), [dateFormat]);
57
+ const effectiveDateFormat = useMemo(() => _objectSpread2({ showRelativeDay: false }, dateFormat), [dateFormat]);
58
58
  const referenceDate = dayjs();
59
59
  const relativeDay = (effectiveDateFormat === null || effectiveDateFormat === void 0 ? void 0 : effectiveDateFormat.showRelativeDay) ? getRelativeDay(start, referenceDate) : null;
60
60
  const hideWeekdayWhenDateRelative = showDate && relativeDay !== null;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react10 from "react";
2
+ import * as react17 from "react";
3
3
 
4
4
  //#region src/components/radio/index.d.ts
5
- declare const Radio: (props: any) => react10.JSX.Element;
5
+ declare const Radio: (props: any) => react17.JSX.Element;
6
6
  //#endregion
7
7
  export { Radio };
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import * as react12 from "react";
2
+ import * as react18 from "react";
3
3
 
4
4
  //#region src/components/section-footers/index.d.ts
5
5
  interface SectionFooterProps {
@@ -8,6 +8,6 @@ interface SectionFooterProps {
8
8
  right?: React.ReactNode;
9
9
  className?: string;
10
10
  }
11
- declare const SectionFooters: (props: SectionFooterProps) => react12.JSX.Element;
11
+ declare const SectionFooters: (props: SectionFooterProps) => react18.JSX.Element;
12
12
  //#endregion
13
13
  export { SectionFooters };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react34 from "react";
2
+ import * as react19 from "react";
3
3
 
4
4
  //#region src/components/skeleton/index.d.ts
5
- declare const Skeleton: (props: any) => react34.JSX.Element;
5
+ declare const Skeleton: (props: any) => react19.JSX.Element;
6
6
  //#endregion
7
7
  export { Skeleton };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react7 from "react";
2
+ import * as react20 from "react";
3
3
 
4
4
  //#region src/components/time-picker/index.d.ts
5
- declare const TimePicker: (props: any) => react7.JSX.Element;
5
+ declare const TimePicker: (props: any) => react20.JSX.Element;
6
6
  //#endregion
7
7
  export { TimePicker };
@@ -1,6 +1,6 @@
1
- import * as antd14 from "antd";
1
+ import * as antd16 from "antd";
2
2
 
3
3
  //#region src/components/typography/index.d.ts
4
- declare const Typography$1: antd14.TypographyProps;
4
+ declare const Typography$1: antd16.TypographyProps;
5
5
  //#endregion
6
6
  export { Typography$1 as Typography };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react8 from "react";
2
+ import * as react21 from "react";
3
3
 
4
4
  //#region src/components/upload/index.d.ts
5
- declare const Upload: (props: any) => react8.JSX.Element;
5
+ declare const Upload: (props: any) => react21.JSX.Element;
6
6
  //#endregion
7
7
  export { Upload };
@@ -55,7 +55,7 @@ var zh_CN_default = {
55
55
  "pisell-lookup-placeholder": "请输入搜索内容",
56
56
  "pisell-lookup-button-text": "搜索",
57
57
  "pisell-lookup-confirm-button-text": "Lookup",
58
- "pisell-lookup-clear": "Clear",
58
+ "pisell-lookup-clear": "清空",
59
59
  "pisell-lookup-close": "Close",
60
60
  "pisell-lookup-search-history": "搜索历史",
61
61
  "pisell-lookup-clear-history": "清空",
@@ -63,7 +63,7 @@ var zh_CN_default = {
63
63
  "pisell-lookup-popular-search": "Popular Search",
64
64
  "pisell-lookup-loading": "加载中...",
65
65
  "pisell-lookup-no-data": "暂无数据",
66
- "pisell-find-button-text": "Find",
66
+ "pisell-find-button-text": "搜索",
67
67
  "pisell-find-placeholder": "请输入搜索内容",
68
68
  "pisell-export-button-text": "导出",
69
69
  "batch-editor-actions": "操作",
@@ -55,7 +55,7 @@ var zh_TW_default = {
55
55
  "pisell-lookup-placeholder": "請輸入搜索內容",
56
56
  "pisell-lookup-button-text": "搜索",
57
57
  "pisell-lookup-confirm-button-text": "Lookup",
58
- "pisell-lookup-clear": "Clear",
58
+ "pisell-lookup-clear": "清空",
59
59
  "pisell-lookup-close": "Close",
60
60
  "pisell-lookup-search-history": "搜索歷史",
61
61
  "pisell-lookup-clear-history": "清空",
@@ -63,7 +63,7 @@ var zh_TW_default = {
63
63
  "pisell-lookup-popular-search": "Popular Search",
64
64
  "pisell-lookup-loading": "加載中...",
65
65
  "pisell-lookup-no-data": "暫無數據",
66
- "pisell-find-button-text": "Find",
66
+ "pisell-find-button-text": "搜尋",
67
67
  "pisell-find-placeholder": "請輸入搜索內容",
68
68
  "pisell-export-button-text": "導出",
69
69
  "batch-editor-actions": "操作",
@@ -8,6 +8,7 @@ let classnames = require("classnames");
8
8
  classnames = require_rolldown_runtime.__toESM(classnames);
9
9
  let react = require("react");
10
10
  react = require_rolldown_runtime.__toESM(react);
11
+ let _pisell_utils = require("@pisell/utils");
11
12
  let _pisell_icon_es_ArrowRight = require("@pisell/icon/es/ArrowRight");
12
13
  _pisell_icon_es_ArrowRight = require_rolldown_runtime.__toESM(_pisell_icon_es_ArrowRight);
13
14
  let _pisell_icon_es_ArrowLeft = require("@pisell/icon/es/ArrowLeft");
@@ -21,43 +22,53 @@ const _excluded = [
21
22
  "page",
22
23
  "pageSize"
23
24
  ];
24
- /**
25
- * @title: 自定义渲染
26
- * @description:
27
- * @return {*}
28
- * @Author: zhiwei.Wang
29
- * @Date: 2023-07-20 17:01
30
- */
31
- const itemRender = (_, type, originalElement) => {
32
- if (type === "prev") return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }), /* @__PURE__ */ react.default.createElement("span", { className: "paginator-page-btn-text" }, require_index.getText("table-pagination-previous")));
33
- if (type === "next") return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "right") }, /* @__PURE__ */ react.default.createElement("span", { className: "paginator-page-btn-text" }, require_index.getText("table-pagination-next")), /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowRight.default, { className: "paginator-page-btn-right-icon" }));
34
- return originalElement;
35
- };
36
- const paginationConfig = {
37
- className: "materials-grid-paginator",
38
- defaultCurrent: 1,
39
- showTotal: (total, range) => `Page ${range[0]} of ${range[1]}`,
40
- itemRender,
41
- responsive: true,
42
- size: "small"
43
- };
25
+ /** 优先 @pisell/utils locales(pisell2.salesManagement.pagination.*),无则回退 materials getText */
26
+ function getPaginationText(key) {
27
+ var _utilsLocales$getText;
28
+ return (_utilsLocales$getText = _pisell_utils.locales.getText(`pisell2.salesManagement.pagination.${key}`)) !== null && _utilsLocales$getText !== void 0 ? _utilsLocales$getText : require_index.getText(`table-pagination-${key}`);
29
+ }
44
30
  const Pagination = (props) => {
45
31
  const show = (0, react.useMemo)(() => {
46
32
  return Object.keys(props).length;
47
33
  }, [props]);
48
34
  const isMiniPagination = require_useIsMobileTable.default();
35
+ const effectiveConfig = (0, react.useMemo)(() => {
36
+ const prevText = getPaginationText("previous");
37
+ const nextText = getPaginationText("next");
38
+ const showTotalFn = getPaginationText("showTotal");
39
+ const itemRenderFn = (_, type, originalElement) => {
40
+ if (type === "prev") return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }), /* @__PURE__ */ react.default.createElement("span", { className: "paginator-page-btn-text" }, prevText));
41
+ if (type === "next") return /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "right") }, /* @__PURE__ */ react.default.createElement("span", { className: "paginator-page-btn-text" }, nextText), /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowRight.default, { className: "paginator-page-btn-right-icon" }));
42
+ return originalElement;
43
+ };
44
+ return {
45
+ className: "materials-grid-paginator",
46
+ defaultCurrent: 1,
47
+ showTotal: typeof showTotalFn === "function" ? (total, range) => showTotalFn(range[0], range[1]) : (total, range) => `Page ${range[0]} of ${range[1]}`,
48
+ itemRender: itemRenderFn,
49
+ responsive: true,
50
+ size: "small"
51
+ };
52
+ }, []);
49
53
  return (0, react.useMemo)(() => {
50
54
  if (!show) return null;
51
55
  let Com = antd.Pagination;
52
56
  if (isMiniPagination) Com = MiniPagination;
53
- return /* @__PURE__ */ react.default.createElement(Com, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, paginationConfig), props));
57
+ return /* @__PURE__ */ react.default.createElement(Com, require_objectSpread2._objectSpread2(require_objectSpread2._objectSpread2({}, effectiveConfig), props));
54
58
  }, [
55
59
  show,
56
- paginationConfig,
60
+ effectiveConfig,
57
61
  props,
58
62
  isMiniPagination
59
63
  ]);
60
64
  };
65
+ const paginationConfig = {
66
+ className: "materials-grid-paginator",
67
+ defaultCurrent: 1,
68
+ showTotal: (total, range) => `Page ${range[0]} of ${range[1]}`,
69
+ responsive: true,
70
+ size: "small"
71
+ };
61
72
  var Pagination_default = Pagination;
62
73
  const MiniPagination = (props) => {
63
74
  const { current = 1, pageSize = 10, total = 0 } = props;
@@ -87,7 +98,10 @@ const MiniPagination = (props) => {
87
98
  if (current <= MIN) return;
88
99
  onChange("prev");
89
100
  }
90
- }, /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }))), /* @__PURE__ */ react.default.createElement("div", { className: "materials-grid-paginator-center" }, /* @__PURE__ */ react.default.createElement("span", { className: "materials-grid-paginator-center-text" }, require_index.getText("table-pagination-total")(current, MAX))), /* @__PURE__ */ react.default.createElement("div", {
101
+ }, /* @__PURE__ */ react.default.createElement("div", { className: (0, classnames.default)("paginator-page-btn", "left") }, /* @__PURE__ */ react.default.createElement(_pisell_icon_es_ArrowLeft.default, { className: "paginator-page-btn-left-icon" }))), /* @__PURE__ */ react.default.createElement("div", { className: "materials-grid-paginator-center" }, /* @__PURE__ */ react.default.createElement("span", { className: "materials-grid-paginator-center-text" }, (() => {
102
+ const totalFn = getPaginationText("total");
103
+ return typeof totalFn === "function" ? totalFn(current, MAX) : `${current} / ${MAX}`;
104
+ })())), /* @__PURE__ */ react.default.createElement("div", {
91
105
  className: "pisell-lowcode-pagination-next",
92
106
  onClick: () => {
93
107
  if (current >= MAX) return;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
- import * as react1 from "react";
2
+ import * as react2 from "react";
3
3
 
4
4
  //#region src/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts
5
- declare const DataSourceQRCode: (props: any) => react1.JSX.Element;
5
+ declare const DataSourceQRCode: (props: any) => react2.JSX.Element;
6
6
  //#endregion
7
7
  export { DataSourceQRCode };
@@ -1,9 +1,9 @@
1
1
  import { WithFormItemProps, WithModeProps } from "../../dataSourceForm/utils.js";
2
- import * as antd22 from "antd";
2
+ import * as antd21 from "antd";
3
3
  import React from "react";
4
4
 
5
5
  //#region src/components/dataSourceComponents/fields/Input.Email/index.d.ts
6
- declare const Email: React.FC<antd22.InputProps & {
6
+ declare const Email: React.FC<antd21.InputProps & {
7
7
  onChange: (value: string) => void;
8
8
  } & WithModeProps & WithFormItemProps>;
9
9
  //#endregion