@pisell/materials 1.0.1036 → 1.0.1037
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.
- package/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +3 -3
- package/build/lowcode/render/default/view.js +10 -10
- package/build/lowcode/view.js +11 -11
- package/es/components/PisellCards/index.d.ts +6 -6
- package/es/components/calendar/index.d.ts +2 -2
- package/es/components/checkbox/index.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Email/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Password/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.TextArea/index.d.ts +2 -2
- package/es/components/dataSourceComponents/fields/Input.Url/index.d.ts +2 -2
- package/es/components/date-picker/index.d.ts +2 -2
- package/es/components/input/index.d.ts +2 -2
- package/es/components/pisell-config-provider/context.d.ts +2 -2
- package/es/components/pisellDataSourceContainer/components/Pagination/index.d.ts +2 -2
- package/es/components/pisellDataSourceContainer/components/Table/index.d.ts +2 -2
- package/es/components/pisellDatePicker/index.d.ts +2 -2
- package/es/components/pisellLookup/PisellLookup.js +9 -1
- package/es/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -4
- package/es/components/pisellModal/index.d.ts +6 -6
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +7 -4
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +1 -0
- package/es/components/pisellRecordBoard/docs/ShellFrame.md +94 -0
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/es/components/pisellRecordBoard/types.d.ts +2 -0
- package/es/components/radio/index.d.ts +2 -2
- package/es/components/skeleton/index.d.ts +2 -2
- package/es/components/time-picker/index.d.ts +2 -2
- package/es/components/typography/index.d.ts +2 -2
- package/es/components/upload/index.d.ts +2 -2
- package/es/index.js +1 -1
- package/lib/components/dataSourceComponents/fields/Checkbox/WithMode.d.ts +2 -2
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.d.ts +2 -2
- package/lib/components/pisellDataSourceContainer/components/Table/index.d.ts +2 -2
- package/lib/components/pisellLookup/PisellLookup.js +9 -1
- package/lib/components/pisellMetricCard/docs/pisellMetricCard.$tab-design.md +2 -4
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +7 -4
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +1 -0
- package/lib/components/pisellRecordBoard/docs/ShellFrame.md +94 -0
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +1 -1
- package/lib/components/pisellRecordBoard/types.d.ts +2 -0
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
nav:
|
|
3
|
+
title: 组件
|
|
4
|
+
order: 1
|
|
5
|
+
group:
|
|
6
|
+
title: Data Display
|
|
7
|
+
order: 1
|
|
8
|
+
title: Shell Frame(记录看板外壳)
|
|
9
|
+
order: 2
|
|
10
|
+
category: pro
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Shell Frame 记录看板外壳
|
|
14
|
+
|
|
15
|
+
Shell Frame 是 **PisellRecordBoard** 的外壳子组件,基于 `PisellShellFrame` 实现,提供「工具栏 + 多选操作栏 + 内容区 + 分页」的完整布局,与 **GridLayout** / **CardLayout** 搭配使用。
|
|
16
|
+
|
|
17
|
+
## 组件介绍
|
|
18
|
+
|
|
19
|
+
- **使用方式**:在 `PisellRecordBoard` 下使用 `PisellRecordBoard.ShellFrame` 包裹内容区(Layout),即可获得工具栏、多选操作栏和底部分页。
|
|
20
|
+
- **数据与配置**:Shell Frame 内各子组件通过 **useRecordBoardContext** 消费容器的 `data`、`searchParams`、`onSearch`、`columnVisibility` 等;工具栏、分页、批量操作栏的展示与行为由 **grid** / **toolBar** / **pagination** / **batchActionBar** 等打散配置控制。
|
|
21
|
+
|
|
22
|
+
## 结构示意
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
┌─────────────────────────────────────────────────────────────────┐
|
|
26
|
+
│ ToolBar(左侧:QuickFilter + 搜索;右侧:列设置、排序、筛选、重置) │
|
|
27
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
28
|
+
│ BatchActionBar(有选中项时展示:全选/反选/清空/删除 + 自定义 actions)│
|
|
29
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
30
|
+
│ children(通常为 GridLayout 或 CardLayout) │
|
|
31
|
+
├─────────────────────────────────────────────────────────────────┤
|
|
32
|
+
│ Pagination(底部分页) │
|
|
33
|
+
└─────────────────────────────────────────────────────────────────┘
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## 使用方式
|
|
37
|
+
|
|
38
|
+
```tsx
|
|
39
|
+
import React from 'react';
|
|
40
|
+
import { PisellRecordBoard } from '@pisell/materials';
|
|
41
|
+
|
|
42
|
+
export default () => (
|
|
43
|
+
<PisellRecordBoard
|
|
44
|
+
rowKey="id"
|
|
45
|
+
data={list}
|
|
46
|
+
loading={false}
|
|
47
|
+
total={100}
|
|
48
|
+
pagination={{ pageNumber: 1, pageSize: 10 }}
|
|
49
|
+
onPageChange={(page, size) => {}}
|
|
50
|
+
searchParams={{}}
|
|
51
|
+
onSearch={(params) => {}}
|
|
52
|
+
grid={{ columns }}
|
|
53
|
+
>
|
|
54
|
+
<PisellRecordBoard.ShellFrame>
|
|
55
|
+
<PisellRecordBoard.GridLayout />
|
|
56
|
+
</PisellRecordBoard.ShellFrame>
|
|
57
|
+
</PisellRecordBoard>
|
|
58
|
+
);
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## 子模块说明
|
|
62
|
+
|
|
63
|
+
| 模块 | 说明 |
|
|
64
|
+
|------|------|
|
|
65
|
+
| **ToolBar** | 工具栏。左侧:QuickFilter(可选)+ PisellFind 搜索;右侧:列设置、Sort、PisellFilter、ToolBarReset、slots.topRight。筛选项与排序项可由 `grid.columns` 派生,或通过 `toolBar.filter` / `toolBar.sort` 覆盖。 |
|
|
66
|
+
| **BatchActionBar** | 多选操作栏。有选中行时展示;全选/反选/清空基于当前页 data;删除与自定义操作通过 `batchActionBar.actions` 等配置。 |
|
|
67
|
+
| **Pagination** | 底部分页。从 context 取 `pagination`、`total`、`onPageChange`;可透传 `childComponentProps.pagination`。样式类名:`record-board-shell-frame-pagination`。 |
|
|
68
|
+
| **Search** | 独立搜索槽(非 ToolBar 内嵌)。绑定 `searchParams.keyword` 与 `onSearch`,可通过 `childComponentProps.search` 透传 PisellFind 的 props。 |
|
|
69
|
+
| **ToolBarReset** | 重置按钮。清空筛选与排序(filter.values、sort),并调用 `onSearch` / `onReset`。 |
|
|
70
|
+
| **ToolBarQuickFilter** | 左侧内联快速筛选。将 quickFilter 直接展示在 ToolBar 左侧;与 `searchParams.filter` 联动。启用时建议 Filter 弹层传 `hiddenQuickFilter: true`。 |
|
|
71
|
+
| **ColumnSetting** | 列显示隐藏入口。有 `grid.columns` 且 `toolBar.columnSetting !== false` 时在 ToolBar 右侧展示;点击弹出列显隐勾选。 |
|
|
72
|
+
|
|
73
|
+
## 配置入口(childComponentProps)
|
|
74
|
+
|
|
75
|
+
Shell Frame 内各块通过 RecordBoard 打散传入的 **grid**、**toolBar**、**pagination**、**batchActionBar** 等生效,对应关系如下。
|
|
76
|
+
|
|
77
|
+
| 配置键 | 作用范围 | 说明 |
|
|
78
|
+
|--------|----------|------|
|
|
79
|
+
| **grid** | 列、滚动、多选、列默认隐藏 | `columns`、`defaultHiddenColumnKeys`、列上 `hidden: true` 参与列显隐;ColumnSetting 据此展示列列表。 |
|
|
80
|
+
| **toolBar** | ToolBar | `search`:true/对象/false,控制搜索展示与透传。`filter`:同上,控制筛选弹层。`sort`:同上,控制排序。`quickFilter`:true 或 `{ filterList, formFiltersPrefix, size }`。`columnSetting`:是否显示列设置入口,默认 true。`topLeft` / `topRight` / `bottomLeft` / `bottomRight` / `tabs`:插槽。 |
|
|
81
|
+
| **pagination** | Pagination | 透传给底部分页组件(如 showSizeChanger、sizeOptions 等)。 |
|
|
82
|
+
| **batchActionBar** | BatchActionBar | 与 PisellBatchActionBar 的 props 对齐:`actions`、`defaultActions`、`overflowThreshold`、`onDelete` 等。 |
|
|
83
|
+
|
|
84
|
+
## 搜索与筛选约定
|
|
85
|
+
|
|
86
|
+
- **搜索**:默认绑定 `searchParams.keyword`,变更时调用 `onSearch({ ...searchParams, keyword: value })`。
|
|
87
|
+
- **筛选**:绑定 `searchParams.filter`,结构为 `{ quickFilter, otherFilter, values }`;ToolBar 内右侧 Filter 弹层默认 `hiddenQuickFilter: true`,快筛全部在左侧 QuickFilter 展示。
|
|
88
|
+
- **排序**:绑定 `searchParams.sort`,单值字符串;Sort 与 Filter 变更均通过 `onSearch` 写回 `searchParams`。
|
|
89
|
+
|
|
90
|
+
## 相关文档
|
|
91
|
+
|
|
92
|
+
- [PisellRecordBoard](./PisellRecordBoard.md)
|
|
93
|
+
- [架构说明](./architecture.md)
|
|
94
|
+
- [列与筛选/排序绑定](./columns-filter-binding.md)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
2
2
|
const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectSpread2.js');
|
|
3
3
|
const require_objectWithoutProperties = require('../../../../_virtual/_@oxc-project_runtime@0.108.0/helpers/objectWithoutProperties.js');
|
|
4
|
-
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
5
4
|
const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
|
|
5
|
+
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
6
6
|
let antd = require("antd");
|
|
7
7
|
let react = require("react");
|
|
8
8
|
react = require_rolldown_runtime.__toESM(react);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_rolldown_runtime = require('../../../../_virtual/rolldown_runtime.js');
|
|
2
|
-
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
3
2
|
const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
|
|
3
|
+
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
4
4
|
const require_ColumnSettingPopover = require('./ColumnSettingPopover.js');
|
|
5
5
|
let antd = require("antd");
|
|
6
6
|
let react = require("react");
|
|
@@ -3,8 +3,8 @@ const require_objectSpread2 = require('../../../../_virtual/_@oxc-project_runtim
|
|
|
3
3
|
const require_index = require('../../../../locales/index.js');
|
|
4
4
|
const require_index$1 = require('../../../sort/index.js');
|
|
5
5
|
const require_index$2 = require('../../../pisellFind/index.js');
|
|
6
|
-
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
7
6
|
const require_recordBoardColumns = require('../../utils/recordBoardColumns.js');
|
|
7
|
+
const require_useRecordBoardContext = require('../../hooks/useRecordBoardContext.js');
|
|
8
8
|
const require_index$3 = require('../../../pisellGridPro/ToolBar/index.js');
|
|
9
9
|
const require_index$4 = require('../../../pisellFilter/index.js');
|
|
10
10
|
const require_index$5 = require('../ToolBarReset/index.js');
|
package/lib/index.js
CHANGED
|
@@ -171,8 +171,8 @@ const require_index$138 = require('./components/PisellTabbar/template/Template1/
|
|
|
171
171
|
const require_index$139 = require('./components/PisellTabbar/index.js');
|
|
172
172
|
const require_PisellTabbar = require('./components/PisellTabbar2/PisellTabbar.js');
|
|
173
173
|
const require_index$140 = require('./components/pisellDataSourceContainer/index.js');
|
|
174
|
-
const require_useRecordBoardContext = require('./components/pisellRecordBoard/hooks/useRecordBoardContext.js');
|
|
175
174
|
const require_PisellDateTimeDisplay = require('./components/pisellDateTimeDisplay/PisellDateTimeDisplay.js');
|
|
175
|
+
const require_useRecordBoardContext = require('./components/pisellRecordBoard/hooks/useRecordBoardContext.js');
|
|
176
176
|
const require_PisellShellFrame = require('./components/pisellShellFrame/PisellShellFrame.js');
|
|
177
177
|
const require_index$141 = require('./components/pisellGridPro/ToolBar/index.js');
|
|
178
178
|
const require_index$142 = require('./components/pisellFilter/index.js');
|