@next-bricks/presentational-bricks 1.255.0 → 1.256.2

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/dist/stories.json CHANGED
@@ -2347,7 +2347,7 @@
2347
2347
  {
2348
2348
  "type": "reflection",
2349
2349
  "declaration": {
2350
- "id": 13026,
2350
+ "id": 13039,
2351
2351
  "name": "__type",
2352
2352
  "kind": 65536,
2353
2353
  "kindString": "Type literal",
@@ -6415,7 +6415,7 @@
6415
6415
  "change": "新增 `shouldUpdateUrlParams` 属性和 `sort.update` 事件"
6416
6416
  }
6417
6417
  ],
6418
- "memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n### CustomColumn\n| property | type | required | default | description |\n| -------------------- | --------------------- | -------- | ------- | -------------------------------------------------------------- |\n| valueSuffix | string | - | - | 字段的值展示时的后缀 |\n| useBrick | UseBrickConf | - | - | 支持为某列自定义展示构件, 具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| titleUseBrick | UseBrickConf | - | - | 支持为某列的标题自定义展示构件,可通过 DATA.title 获取标题文本,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf) |\n| filters | {text:string,value:any}[] | - | - | 表头的筛选菜单项 |\n| verticalAlign | top \\| bottom | - | - | 单元格内元素的垂直对齐方式 |\n| colSpanKey | string | - | - | 每条记录的控制列合并的值的 key |\n| rowSpanKey | string | - | - | 每条记录的控制行合并的值的 key。如果希望将树形列表展平,并计算行合并的值,可以使用 flattenTreeDataListAndCalcRowSpan 自定义加工函数 |\n| ~~component~~ | ~~CustomColumnComponent~~ | - | - | ~~Deprecated。支持为某列自定义展示构件~~ |\n\n### UseBrickConf\n\n| property | type | required | default | description |\n| ------------- | -------------- | -------- | ------- | -------------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n| transform | string\\|object | - | - | 属性数据转换 |\n| transformFrom | string | - | - | 属性数据转换来自数据源的哪个字段,不填则为整个数据 |\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### <del>CustomColumnComponent</del>\n\n<details>\n<summary>展开</summary>\n\n| property | type | required | default | description |\n| ---------- | -------------------------------------------- | -------- | ------- | ----------------------------------------------- |\n| brick | string | ✔️ | - | 构件名称 |\n| fields | {value: string; item: string; index: string} | ✔️ | - | 字段值、列表项和 index 对应所用构件的属性的 key |\n| properties | object | - | - | 构件属性 |\n| events | BrickEventsMap | - | - | 事件 |\n\n</details>\n\n### fields\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| fields | fieldsType | - | - | 设置相关字段取自哪里,具体描述见下表 |\n\n### fieldsType\n| property | type | required | default | description |\n| ---------- | ------ | -------- | -------- | -------------------------------------------------------------------------------------------------------- |\n| dataSource | string | - | list | 指定 dataSource 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 list |\n| total | string | - | total | 指定 total 从哪里来,默认为列表接口返回格式是{list:[],page:1,pageSize:10,total:20},即默认取自 total |\n| page | string | - | page | 指定下表中 \"page.update\" 事件 detail 的 pagePath |\n| pageSize | string | - | pageSize | 指定下表 \"filter.update\" 事件 detail 的 pageSizePath |\n| ascend | string | - | ascend | 指定 ascend 升序排序对应字段,例如有些后台对应为 1 ,有些对应为 \"asc\"。这里默认为 \"ascend\" |\n| descend | string | - | descend | 指定 descend 降序排序对应字段,例如有些后台对应为 0 ,有些对应为 \"desc\"。这里默认为 \"descend\" |\n\n### pagination 默认配置\n\n如果不希望分页,如下设置即可:\n\n```\n{\n \"configProps\": {\n \"pagination\": false\n }\n}\n```\n\n如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"configProps\": {\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,不配置就不显示。如果要开启如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"configProps\": {\n \"rowSelection\": true\n }\n}\n```\n\n如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"configProps\": {\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | Record<string, unknown>[] | ✔️ | - | 树形数据列表 |\n| options | FlattenTreeDataListAndCalcRowSpanOptions | ✔️ | - | 函数选项 |\n| depth | number | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Record<string, unknown>[] | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | FlattenConfig[] | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | boolean | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | string | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | string | ✔️ | - | 展平后,父级在子级的 key |",
6418
+ "memo": "> Tips: 在 react 中,boolean 类型的值是合法的子元素,但是不会被渲染出来。如果希望 boolean 值在表格单元格中展示成 `true`|`false`,可以使用平台管道进行转换,例如`@{someProperties|string}`。更多场景下可以结合 [基本数值映射构件](developers/brick-book/brick/presentational-bricks.brick-value-mapping) 把 boolean 类型的值转换成有意义的文本进行展示。\n\n`<presentational-bricks.brick-table>` 为某列自定义展示构件传递的数据源为:\n\n| field | type | description |\n| ----------- | ------ | ----------- |\n| cellData | any | 单元格数据 |\n| rowData | any | 整行数据 |\n| columnIndex | number | 列序号 |\n\n`<presentational-bricks.brick-table>` 为自定义行展开的构件传递的数据源为:\n\n| field | type | description |\n| -------- | ------ | ----------- |\n| rowData | any | 整行数据 |\n| rowIndex | number | 行序号 |\n\n### pagination 默认配置\n\n如果不希望分页,如下设置即可:\n\n```\n{\n \"pagination\": false\n}\n```\n\n如果希望覆盖默认配置,覆盖对应项即可,相关配置项具体查阅:[pagination](https://ant.design/components/pagination-cn/#API)\n\n```\n{\n \"pagination\": {\n \"pageSizeOptions\": [\"10\",\"100\",\"1000\"]\n }\n}\n```\n\n| property | type | required | default | description |\n| --------------- | -------- | -------- | ------------------ | ------------------------------------- |\n| current | string | - | - | 页码,从 page properties 获取 |\n| pageSize | string | - | - | 每页条数,从 pageSize properties 获取 |\n| total | object | - | - | 总数,从 dataSource.total 获取 |\n| showSizeChanger | boolean | - | true | 展示页码变化器 |\n| pageSizeOptions | array | - | [\"10\", \"20\", \"50\"] | 每页条数选项 |\n| showTotal | function | - | - | 渲染成\"共 xx 条\" |\n\n\n### rowSelection 默认配置\n\n行选择默认为 false,不配置就不显示。如果要开启如下设置即可,这时 brick-table 会默认配置 onChange 事件:\n\n```\n{\n \"rowSelection\": true\n}\n```\n\n如果希望覆盖或者扩展默认配置,覆盖对应项即可,相关配置项具体查阅:[rowSelection](https://ant.design/components/table-cn/#rowSelection)\n\n```\n{\n \"rowSelection\": {\n \"columnWidth\": \"88px\"\n }\n}\n```\n\n| property | type | required | default | description |\n| -------- | -------- | -------- | ------- | --------------------------------- |\n| onChange | function | - | - | 选择行,会抛出事件\"select.update\" |\n\n### 排序\n\n如果某一列希望排序,则可以设对应列 `sorter:true`,例如:\n\n```\n{\n \"columns\": [\n {\n \"title\": \"主机\",\n \"key\": \"hostname\",\n \"dataIndex\": \"hostname\",\n \"sorter\": true\n }\n ]\n}\n```\n\n## flattenTreeDataListAndCalcRowSpan 自定义加工函数\n\n将树形数据列表按照 `options.flattenConfigs` 进行展平,并生成相应的行合并数据\n\n### Params\n\n| param | type | required | default | description |\n| ------------ | ------------------------------------------ | -------- | ------- | ------------------------------------------------------------------------ |\n| treeDataList | Record<string, unknown>[] | ✔️ | - | 树形数据列表 |\n| options | FlattenTreeDataListAndCalcRowSpanOptions | ✔️ | - | 函数选项 |\n| depth | number | - | 0 | 当前展平的深度,用于确定 `options.flattenConfigs` 中的当前层级的展平配置 |\n\n### Returns\n\n| type | description |\n| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Record<string, unknown>[] | 展平后的列表,除了按照 `options.flattenConfigs` 进行展平外,还会生成相应层级以 `options.flattenConfigs[].parentInChildKey + \"RowSpan\"` 为 key 的行合并数据 |\n\n### FlattenTreeDataListAndCalcRowSpanOptions\n\n| property | type | required | default | description |\n| -------------------- | ----------------- | -------- | ------- | ---------------------------------------- |\n| flattenConfigs | FlattenConfig[] | ✔️ | - | 展平配置列表,按照由父到子的顺序一一对应 |\n| omitChildrenInParent | boolean | - | - | 展平后,是否省略父级里的子列表 |\n\n### FlattenConfig\n\n| property | type | required | default | description |\n| ---------------- | -------- | -------- | ------- | ------------------------ |\n| childrenKey | string | ✔️ | - | 对应层级子列表的 key |\n| parentInChildKey | string | ✔️ | - | 展平后,父级在子级的 key |",
6419
6419
  "properties": [
6420
6420
  {
6421
6421
  "name": "columns",
@@ -6454,7 +6454,7 @@
6454
6454
  "type": "boolean",
6455
6455
  "required": "false",
6456
6456
  "default": "false",
6457
- "description": "是否显示已选择信息和清除按钮。仅在设置了`configProps.rowSelection`时有效。默认不显示",
6457
+ "description": "是否显示已选择信息和清除按钮。仅在设置了`rowSelection`时有效。默认不显示",
6458
6458
  "group": "rowSelection"
6459
6459
  },
6460
6460
  {
@@ -6985,36 +6985,12 @@
6985
6985
  }
6986
6986
  ],
6987
6987
  "children": [
6988
- {
6989
- "name": "align",
6990
- "type": "AlignType",
6991
- "required": false,
6992
- "description": ""
6993
- },
6994
6988
  {
6995
6989
  "name": "cellStatus",
6996
6990
  "type": "CellStatusProps",
6997
6991
  "required": false,
6998
6992
  "description": "在渲染自定义构件的场景下额外设置单元格的状态样式, `dataIndex` 表示取哪一列的字段值作为判断数据,不填的话默认取当前列的字段,`mapping` 表示判断的条件,条件被成功匹配时用当前的样式。目前仅支持单元格 `leftBorderColor` 属性的设置"
6999
6993
  },
7000
- {
7001
- "name": "children",
7002
- "type": "null",
7003
- "required": false,
7004
- "description": ""
7005
- },
7006
- {
7007
- "name": "className",
7008
- "type": "string",
7009
- "required": false,
7010
- "description": ""
7011
- },
7012
- {
7013
- "name": "colSpan",
7014
- "type": "number",
7015
- "required": false,
7016
- "description": ""
7017
- },
7018
6994
  {
7019
6995
  "name": "colSpanKey",
7020
6996
  "type": "string",
@@ -7027,180 +7003,18 @@
7027
7003
  "required": false,
7028
7004
  "description": "[已废弃]支持为某列自定义展示构件"
7029
7005
  },
7030
- {
7031
- "name": "dataIndex",
7032
- "type": "DataIndex",
7033
- "required": false,
7034
- "description": ""
7035
- },
7036
- {
7037
- "name": "defaultFilteredValue",
7038
- "type": "Key[] | null",
7039
- "required": false,
7040
- "description": ""
7041
- },
7042
- {
7043
- "name": "defaultSortOrder",
7044
- "type": "SortOrder",
7045
- "required": false,
7046
- "description": ""
7047
- },
7048
- {
7049
- "name": "ellipsis",
7050
- "type": "CellEllipsisType",
7051
- "required": false,
7052
- "description": ""
7053
- },
7054
- {
7055
- "name": "filterDropdown",
7056
- "type": "React.ReactNode | { }",
7057
- "required": false,
7058
- "description": ""
7059
- },
7060
- {
7061
- "name": "filterDropdownVisible",
7062
- "type": "boolean",
7063
- "required": false,
7064
- "description": ""
7065
- },
7066
- {
7067
- "name": "filterIcon",
7068
- "type": "React.ReactNode | { }",
7069
- "required": false,
7070
- "description": ""
7071
- },
7072
- {
7073
- "name": "filterMultiple",
7074
- "type": "boolean",
7075
- "required": false,
7076
- "description": ""
7077
- },
7078
- {
7079
- "name": "filtered",
7080
- "type": "boolean",
7081
- "required": false,
7082
- "description": ""
7083
- },
7084
- {
7085
- "name": "filteredValue",
7086
- "type": "Key[] | null",
7087
- "required": false,
7088
- "description": ""
7089
- },
7090
- {
7091
- "name": "filters",
7092
- "type": "ColumnFilterItem[]",
7093
- "required": false,
7094
- "description": ""
7095
- },
7096
- {
7097
- "name": "fixed",
7098
- "type": "FixedType",
7099
- "required": false,
7100
- "description": ""
7101
- },
7102
7006
  {
7103
7007
  "name": "headerBrick",
7104
7008
  "type": "{ useBrick: UseBrickConf; }",
7105
7009
  "required": false,
7106
7010
  "description": "支持为某列的表头自定义展示构件,可通过 DATA.title 获取标题文本"
7107
7011
  },
7108
- {
7109
- "name": "key",
7110
- "type": "Key",
7111
- "required": false,
7112
- "description": ""
7113
- },
7114
- {
7115
- "name": "onCell",
7116
- "type": "GetComponentProps<Record<string, any>>",
7117
- "required": false,
7118
- "description": ""
7119
- },
7120
- {
7121
- "name": "onCellClick",
7122
- "type": "{ }",
7123
- "required": false,
7124
- "description": ""
7125
- },
7126
- {
7127
- "name": "onFilter",
7128
- "type": "{ }",
7129
- "required": false,
7130
- "description": ""
7131
- },
7132
- {
7133
- "name": "onFilterDropdownVisibleChange",
7134
- "type": "{ }",
7135
- "required": false,
7136
- "description": ""
7137
- },
7138
- {
7139
- "name": "onHeaderCell",
7140
- "type": "GetComponentProps<>",
7141
- "required": false,
7142
- "description": ""
7143
- },
7144
- {
7145
- "name": "render",
7146
- "type": "{ }",
7147
- "required": false,
7148
- "description": ""
7149
- },
7150
- {
7151
- "name": "responsive",
7152
- "type": "Breakpoint[]",
7153
- "required": false,
7154
- "description": ""
7155
- },
7156
- {
7157
- "name": "rowSpan",
7158
- "type": "number",
7159
- "required": false,
7160
- "description": ""
7161
- },
7162
7012
  {
7163
7013
  "name": "rowSpanKey",
7164
7014
  "type": "string",
7165
7015
  "required": false,
7166
7016
  "description": "每条记录的控制行合并的值的 key"
7167
7017
  },
7168
- {
7169
- "name": "shouldCellUpdate",
7170
- "type": "{ }",
7171
- "required": false,
7172
- "description": ""
7173
- },
7174
- {
7175
- "name": "showSorterTooltip",
7176
- "type": "boolean | TooltipProps",
7177
- "required": false,
7178
- "description": ""
7179
- },
7180
- {
7181
- "name": "sortDirections",
7182
- "type": "SortOrder[]",
7183
- "required": false,
7184
- "description": ""
7185
- },
7186
- {
7187
- "name": "sortOrder",
7188
- "type": "SortOrder",
7189
- "required": false,
7190
- "description": ""
7191
- },
7192
- {
7193
- "name": "sorter",
7194
- "type": "boolean | CompareFn<Record<string, any>> | { compare?: CompareFn<Record<string, any>>; multiple?: number; }",
7195
- "required": false,
7196
- "description": ""
7197
- },
7198
- {
7199
- "name": "title",
7200
- "type": "ColumnTitle<Record<string, any>>",
7201
- "required": false,
7202
- "description": ""
7203
- },
7204
7018
  {
7205
7019
  "name": "titleUseBrick",
7206
7020
  "type": "UseBrickConf",
@@ -7224,12 +7038,6 @@
7224
7038
  "type": "\"top\" | \"bottom\"",
7225
7039
  "required": false,
7226
7040
  "description": "单元格内元素的垂直对齐方式"
7227
- },
7228
- {
7229
- "name": "width",
7230
- "type": "number | string",
7231
- "required": false,
7232
- "description": ""
7233
7041
  }
7234
7042
  ],
7235
7043
  "indexSignature": []
@@ -7263,25 +7071,25 @@
7263
7071
  "name": "brick",
7264
7072
  "type": "string | any",
7265
7073
  "required": true,
7266
- "description": ""
7074
+ "description": "构件名称"
7267
7075
  },
7268
7076
  {
7269
7077
  "name": "events",
7270
7078
  "type": "BrickEventsMap",
7271
7079
  "required": false,
7272
- "description": ""
7080
+ "description": "事件"
7273
7081
  },
7274
7082
  {
7275
7083
  "name": "fields",
7276
7084
  "type": "{ index?: string; item?: string; value?: string; }",
7277
7085
  "required": false,
7278
- "description": ""
7086
+ "description": "字段值、列表项和 index 对应所用构件的属性的 key"
7279
7087
  },
7280
7088
  {
7281
7089
  "name": "properties",
7282
7090
  "type": "Record<string, any>",
7283
7091
  "required": false,
7284
- "description": ""
7092
+ "description": "构件属性"
7285
7093
  }
7286
7094
  ],
7287
7095
  "indexSignature": []
@@ -7863,19 +7671,19 @@
7863
7671
  "change": "新增 `color` 属性代替 `configProps.color` 的使用方式"
7864
7672
  }
7865
7673
  ],
7866
- "memo": "```typescript\nexport interface TagListType {\n key: string;\n label: string;\n tooltip?: string;\n icon?: string | MenuIcon;\n color?: string | Color;\n disabled?: boolean;\n disabledTooltip?: string;\n}\n```",
7674
+ "memo": "",
7867
7675
  "properties": [
7868
7676
  {
7869
7677
  "name": "tagList",
7870
- "type": "TagListType[]",
7871
- "required": "false",
7872
- "description": "标签列表,当已知的时候可直接在 storyboard 中声明",
7678
+ "type": "TagListType[] | string[]",
7679
+ "required": false,
7680
+ "description": "标签列表",
7873
7681
  "group": "basic"
7874
7682
  },
7875
7683
  {
7876
7684
  "name": "showTagCircle",
7877
7685
  "type": "boolean",
7878
- "required": "false",
7686
+ "required": false,
7879
7687
  "default": "false",
7880
7688
  "description": "是否在标签内显示小圆点",
7881
7689
  "group": "ui"
@@ -7883,7 +7691,7 @@
7883
7691
  {
7884
7692
  "name": "showCard",
7885
7693
  "type": "boolean",
7886
- "required": "false",
7694
+ "required": false,
7887
7695
  "default": "true",
7888
7696
  "description": "是否显示卡片",
7889
7697
  "group": "basic"
@@ -7891,7 +7699,7 @@
7891
7699
  {
7892
7700
  "name": "dataSource",
7893
7701
  "type": "Record<string, any>",
7894
- "required": "false",
7702
+ "required": false,
7895
7703
  "description": "数据源,通过 useResolves 从后台接口获取",
7896
7704
  "deprecated": true,
7897
7705
  "group": "other"
@@ -7899,14 +7707,14 @@
7899
7707
  {
7900
7708
  "name": "color",
7901
7709
  "type": "string | Color",
7902
- "required": "false",
7710
+ "required": false,
7903
7711
  "description": "标签的颜色配置,当 `componentType=Tag` 且 `closable!=true` 时才有效,除了提供内置八种主题色,也支持直接赋色值(如 `#f5f5f5`)使用",
7904
7712
  "group": "ui"
7905
7713
  },
7906
7714
  {
7907
7715
  "name": "componentType",
7908
7716
  "type": "TagTypeProps",
7909
- "required": "false",
7717
+ "required": false,
7910
7718
  "default": "\"Tag\"",
7911
7719
  "description": "组件类型,对应 ant-design 中的基本标签和可选中标签",
7912
7720
  "group": "basic"
@@ -7914,14 +7722,14 @@
7914
7722
  {
7915
7723
  "name": "default",
7916
7724
  "type": "string | string[]",
7917
- "required": "false",
7725
+ "required": false,
7918
7726
  "description": "componentType 为`CheckableTag`的时候默认选中的标签 key",
7919
7727
  "group": "basic"
7920
7728
  },
7921
7729
  {
7922
7730
  "name": "multipleCheck",
7923
7731
  "type": "boolean",
7924
- "required": "false",
7732
+ "required": false,
7925
7733
  "default": "true",
7926
7734
  "description": "是否能多选,多选场景下右上角会有小圆点提示",
7927
7735
  "group": "basic"
@@ -7929,7 +7737,7 @@
7929
7737
  {
7930
7738
  "name": "cancelable",
7931
7739
  "type": "boolean",
7932
- "required": "false",
7740
+ "required": false,
7933
7741
  "default": "true",
7934
7742
  "description": "标签是否可以取消单选,在 `componentType` 为 `CheckableTag` 且 `multipleCheck` 为 `false` 时生效。",
7935
7743
  "group": "basic"
@@ -7937,7 +7745,7 @@
7937
7745
  {
7938
7746
  "name": "closable",
7939
7747
  "type": "boolean",
7940
- "required": "false",
7748
+ "required": false,
7941
7749
  "default": "false",
7942
7750
  "description": "标签是否可以关闭",
7943
7751
  "group": "basic"
@@ -7945,36 +7753,35 @@
7945
7753
  {
7946
7754
  "name": "configProps",
7947
7755
  "type": "Record<string, any>",
7948
- "required": "false",
7756
+ "required": false,
7949
7757
  "description": "ant-design 相关配置项, [具体查阅](https://ant.design/components/tag-cn/#Tag) ,只有在 componentType=Tag 时才有效",
7950
7758
  "group": "other"
7951
7759
  },
7952
7760
  {
7953
7761
  "name": "disabledTooltip",
7954
7762
  "type": "string",
7955
- "required": "false",
7763
+ "required": false,
7956
7764
  "description": "禁用标签的 tooltip",
7957
7765
  "group": "basic"
7958
7766
  },
7959
7767
  {
7960
7768
  "name": "tooltipProps",
7961
7769
  "type": "TooltipProps",
7962
- "required": "false",
7770
+ "required": false,
7963
7771
  "description": "标签的 tooltip 相关配置项, [具体查阅](https://ant.design/components/tooltip-cn/#API)",
7964
7772
  "group": "other"
7965
7773
  },
7966
7774
  {
7967
7775
  "name": "label",
7968
7776
  "type": "string",
7969
- "required": "false",
7777
+ "required": false,
7970
7778
  "description": "标签前的 label",
7971
7779
  "group": "basic"
7972
7780
  },
7973
7781
  {
7974
7782
  "name": "fields",
7975
7783
  "type": "object",
7976
- "required": "false",
7977
- "default": "{ label: \"label\", key: \"key\", icon: \"icon\"}",
7784
+ "required": false,
7978
7785
  "description": "这里可以规定从 dataSource 中的哪个字段取标签渲染的数据,例如 dataSource 返回的数据为 [{key:\"1\"},{key:\"2\"}],则可写成 {label: \"key\", key: \"key\"}",
7979
7786
  "deprecated": true,
7980
7787
  "group": "other"
@@ -7982,38 +7789,38 @@
7982
7789
  {
7983
7790
  "name": "textEllipsis",
7984
7791
  "type": "boolean",
7985
- "required": "false",
7792
+ "required": false,
7986
7793
  "default": "false",
7987
7794
  "description": "文字是否超出省略",
7988
7795
  "group": "ui"
7989
7796
  },
7990
7797
  {
7991
7798
  "name": "tagStyle",
7992
- "type": "Record<string, any>",
7993
- "required": "false",
7799
+ "type": "CSSProperties",
7800
+ "required": false,
7994
7801
  "description": "标签的自定义样式",
7995
7802
  "group": "ui"
7996
7803
  },
7997
7804
  {
7998
7805
  "name": "tagCheckedStyle",
7999
- "type": "Record<string, any>",
8000
- "required": "false",
7806
+ "type": "CSSProperties",
7807
+ "required": false,
8001
7808
  "description": "标签选中的自定义样式",
8002
7809
  "group": "ui"
8003
7810
  },
8004
7811
  {
8005
7812
  "name": "tagHoverStyle",
8006
- "type": "Record<string, any>",
8007
- "required": "false",
7813
+ "type": "CSSProperties",
7814
+ "required": false,
8008
7815
  "description": "标签 Hover 的自定义样式",
8009
7816
  "group": "ui"
8010
7817
  },
8011
7818
  {
8012
7819
  "name": "afterBrick",
8013
7820
  "type": "{ data: unknown; useBrick: UseBrickConf; }",
8014
- "required": "false",
7821
+ "required": false,
8015
7822
  "description": "最后一个tag后面使用子构件,具体查看 [UseBrickConf](/next-docs/docs/api-reference/brick-types.usesinglebrickconf)",
8016
- "group": "advanced"
7823
+ "group": "other"
8017
7824
  }
8018
7825
  ],
8019
7826
  "events": [
@@ -8024,7 +7831,7 @@
8024
7831
  },
8025
7832
  {
8026
7833
  "type": "checked.update.v2",
8027
- "detail": "{label: string;key:string}[]",
7834
+ "detail": "{ key: string; label: string; }[]",
8028
7835
  "description": "选中的 tag"
8029
7836
  },
8030
7837
  {
@@ -8034,7 +7841,7 @@
8034
7841
  },
8035
7842
  {
8036
7843
  "type": "tag.close",
8037
- "detail": "{ current: Record<string, any>; tagList: Record<string, any>[] }",
7844
+ "detail": "{ current: Record<string, any>; tagList: Record<string, any>[]; }",
8038
7845
  "description": "当前关闭的tag和剩余的tagList"
8039
7846
  }
8040
7847
  ],
@@ -8152,6 +7959,13 @@
8152
7959
  "description": ""
8153
7960
  }
8154
7961
  ]
7962
+ },
7963
+ {
7964
+ "name": "TagListType",
7965
+ "typeParameter": null,
7966
+ "kind": "type",
7967
+ "description": "",
7968
+ "type": "{ checked?: boolean; color?: string | Color; disabled?: boolean; disabledTooltip?: string; icon?: string | MenuIcon; key: string; label: string; tooltip?: string; }"
8155
7969
  }
8156
7970
  ]
8157
7971
  }
@@ -9003,6 +8817,13 @@
9003
8817
  "kind": "type",
9004
8818
  "description": "",
9005
8819
  "type": "Omit<AntTreeNodeProps, \"children\"> & { children?: BrickTreeNodeProps[]; icon?: TreeIcon; key?: React.Key; title?: string; }"
8820
+ },
8821
+ {
8822
+ "name": "TreeIcon",
8823
+ "typeParameter": null,
8824
+ "kind": "type",
8825
+ "description": "",
8826
+ "type": "MenuIcon | React.ComponentType<SVGAttributes<SVGElement>>"
9006
8827
  }
9007
8828
  ]
9008
8829
  }
@@ -9315,7 +9136,7 @@
9315
9136
  {
9316
9137
  "action": "console.log",
9317
9138
  "args": [
9318
- "${EVENT.detail}"
9139
+ "<% EVENT.detail %>"
9319
9140
  ]
9320
9141
  }
9321
9142
  ]
@@ -9393,7 +9214,7 @@
9393
9214
  }
9394
9215
  },
9395
9216
  "transform": {
9396
- "value": "@{cellData}"
9217
+ "value": "<% DATA.cellData %>"
9397
9218
  }
9398
9219
  }
9399
9220
  },
@@ -9407,8 +9228,8 @@
9407
9228
  {
9408
9229
  "action": "console.log",
9409
9230
  "args": [
9410
- "${EVENT.detail}",
9411
- "@{rowData}"
9231
+ "<% EVENT.detail %>",
9232
+ "<% DATA.rowData %>"
9412
9233
  ]
9413
9234
  }
9414
9235
  ]
@@ -9428,7 +9249,7 @@
9428
9249
  }
9429
9250
  },
9430
9251
  "transform": {
9431
- "value": "@{cellData}"
9252
+ "value": "<% DATA.cellData %>"
9432
9253
  }
9433
9254
  }
9434
9255
  }
@@ -9590,6 +9411,14 @@
9590
9411
  "author": "ice",
9591
9412
  "slots": null,
9592
9413
  "history": [
9414
+ {
9415
+ "version": "1.89.11",
9416
+ "change": "使用 `dataSource` 代替之前 `data`"
9417
+ },
9418
+ {
9419
+ "version": "1.83.0",
9420
+ "change": "新增 `triggerClickEvent`, `link`, `data` 属性"
9421
+ },
9593
9422
  {
9594
9423
  "version": "1.65.0",
9595
9424
  "change": "新增属性`shape`,支持大圆角"
@@ -9601,14 +9430,6 @@
9601
9430
  {
9602
9431
  "version": "1.48.0",
9603
9432
  "change": "新增特性,映射成 icon"
9604
- },
9605
- {
9606
- "version": "1.83.0",
9607
- "change": "新增 `triggerClickEvent`, `link`, `data` 属性"
9608
- },
9609
- {
9610
- "version": "1.89.11",
9611
- "change": "使用 `dataSource` 代替之前 `data`"
9612
9433
  }
9613
9434
  ],
9614
9435
  "memo": "## 注意\n> 如果需要区间的条件规则映射,比如大于、小于等,请使用[条件展示](developers/brick-book/brick/presentational-bricks.brick-conditional-display)\n\n## LinkProps\n```typescript\ninterface LinkProps {\n to?: string;\n href?: string;\n innerRef?: string;\n replace?: boolean;\n target?: string;\n}\n```\n## 映射规则说明\n\n映射支持正则匹配,匹配规则如下:\n\n1. 首先以 `value` 为 key 来获取映射,若成功匹配则使用该规则来展示;若不成功,则走下一步\n2. 将 `映射规则` 中的 key 作为正则,来匹配 `value`, 使用成功匹配的第一个规则\n\n例如\n\n```typescript\n// 以下将展示 `hi`\nconst mapping = { hello: { text: \"hi\" }, \".*\": { text: \"anything else\" } };\nconst value = \"hello\";\n\n// 以下将展示 `anything else`\nconst mapping = {\n www: { text: \"world wide web\" },\n \".*\": { text: \"anything else\" },\n};\nconst value = \"hello\";\n```",
@@ -9616,21 +9437,21 @@
9616
9437
  {
9617
9438
  "name": "value",
9618
9439
  "type": "string | number",
9619
- "required": "false",
9440
+ "required": false,
9620
9441
  "description": "原始值",
9621
9442
  "group": "basic"
9622
9443
  },
9623
9444
  {
9624
9445
  "name": "dataSource",
9625
9446
  "type": "Record<string, any>",
9626
- "required": "false",
9447
+ "required": false,
9627
9448
  "description": "替代 `data` 属性,click 事件时传出的数据",
9628
9449
  "group": "basic"
9629
9450
  },
9630
9451
  {
9631
9452
  "name": "fields",
9632
9453
  "type": "{ value: string; }",
9633
- "required": "false",
9454
+ "required": false,
9634
9455
  "description": "[已废弃]字段映射, 跟 dataSource 一起使用来获得运行时 value",
9635
9456
  "deprecated": true,
9636
9457
  "group": "other"
@@ -9638,21 +9459,21 @@
9638
9459
  {
9639
9460
  "name": "mapping",
9640
9461
  "type": "Record<string | number, MappingValue>",
9641
- "required": "true",
9462
+ "required": true,
9642
9463
  "description": "映射规则",
9643
9464
  "group": "basic"
9644
9465
  },
9645
9466
  {
9646
9467
  "name": "showTagCircle",
9647
9468
  "type": "boolean",
9648
- "required": "false",
9469
+ "required": false,
9649
9470
  "description": "显示文字旁边的小圈圈,按照平台规范通常表示状态的标签可设置为 true",
9650
9471
  "group": "ui"
9651
9472
  },
9652
9473
  {
9653
9474
  "name": "triggerClickEvent",
9654
9475
  "type": "boolean",
9655
- "required": "false",
9476
+ "required": false,
9656
9477
  "default": "false",
9657
9478
  "description": "是否触发点击事件",
9658
9479
  "group": "basic"
@@ -9660,14 +9481,14 @@
9660
9481
  {
9661
9482
  "name": "link",
9662
9483
  "type": "LinkProps",
9663
- "required": "false",
9664
- "description": "若设置且 `triggerClickEvent` 为 false,则点击可跳转",
9484
+ "required": false,
9485
+ "description": "配置跳转链接,在 `triggerClickEvent` 为 false 生效",
9665
9486
  "group": "basic"
9666
9487
  },
9667
9488
  {
9668
9489
  "name": "data",
9669
9490
  "type": "any",
9670
- "required": "false",
9491
+ "required": false,
9671
9492
  "description": "[已废弃]可用于接收 useBrick 传递过来的数据",
9672
9493
  "deprecated": true,
9673
9494
  "group": "other"
@@ -9676,7 +9497,7 @@
9676
9497
  "events": [
9677
9498
  {
9678
9499
  "type": "brick-value-mapping.click",
9679
- "detail": "{ data: any, value: string }",
9500
+ "detail": "{ data: any; value: string | number; }",
9680
9501
  "description": "点击事件"
9681
9502
  }
9682
9503
  ],
@@ -9690,7 +9511,7 @@
9690
9511
  "name": "color",
9691
9512
  "type": "Color",
9692
9513
  "required": false,
9693
- "description": ""
9514
+ "description": "标签颜色"
9694
9515
  },
9695
9516
  {
9696
9517
  "name": "icon",
@@ -9702,13 +9523,13 @@
9702
9523
  "name": "iconSize",
9703
9524
  "type": "number",
9704
9525
  "required": false,
9705
- "description": ""
9526
+ "description": "图标大小"
9706
9527
  },
9707
9528
  {
9708
9529
  "name": "text",
9709
9530
  "type": "string",
9710
9531
  "required": false,
9711
- "description": ""
9532
+ "description": "展示文本"
9712
9533
  }
9713
9534
  ],
9714
9535
  "indexSignature": []
@@ -11773,6 +11594,13 @@
11773
11594
  "required": "false",
11774
11595
  "description": "打开选择器的按钮的大小",
11775
11596
  "group": "other"
11597
+ },
11598
+ {
11599
+ "name": "selectNearDays",
11600
+ "type": "number",
11601
+ "required": "false",
11602
+ "description": "限制选择近n天",
11603
+ "group": "other"
11776
11604
  }
11777
11605
  ],
11778
11606
  "events": [
@@ -12112,7 +11940,7 @@
12112
11940
  "name": "__index",
12113
11941
  "parameters": [
12114
11942
  {
12115
- "id": 16736,
11943
+ "id": 16749,
12116
11944
  "name": "propName",
12117
11945
  "kind": 32768,
12118
11946
  "kindString": "Parameter",
@@ -12123,8 +11951,7 @@
12123
11951
  }
12124
11952
  ],
12125
11953
  "type": "any",
12126
- "required": true,
12127
- "description": ""
11954
+ "required": true
12128
11955
  }
12129
11956
  ]
12130
11957
  }
@@ -17359,198 +17186,12 @@
17359
17186
  }
17360
17187
  ],
17361
17188
  "children": [
17362
- {
17363
- "name": "align",
17364
- "type": "AlignType",
17365
- "required": false,
17366
- "description": ""
17367
- },
17368
- {
17369
- "name": "children",
17370
- "type": "null",
17371
- "required": false,
17372
- "description": ""
17373
- },
17374
- {
17375
- "name": "className",
17376
- "type": "string",
17377
- "required": false,
17378
- "description": ""
17379
- },
17380
- {
17381
- "name": "colSpan",
17382
- "type": "number",
17383
- "required": false,
17384
- "description": ""
17385
- },
17386
- {
17387
- "name": "dataIndex",
17388
- "type": "DataIndex",
17389
- "required": false,
17390
- "description": ""
17391
- },
17392
- {
17393
- "name": "defaultFilteredValue",
17394
- "type": "Key[] | null",
17395
- "required": false,
17396
- "description": ""
17397
- },
17398
- {
17399
- "name": "defaultSortOrder",
17400
- "type": "SortOrder",
17401
- "required": false,
17402
- "description": ""
17403
- },
17404
- {
17405
- "name": "ellipsis",
17406
- "type": "CellEllipsisType",
17407
- "required": false,
17408
- "description": ""
17409
- },
17410
- {
17411
- "name": "filterDropdown",
17412
- "type": "React.ReactNode | { }",
17413
- "required": false,
17414
- "description": ""
17415
- },
17416
- {
17417
- "name": "filterDropdownVisible",
17418
- "type": "boolean",
17419
- "required": false,
17420
- "description": ""
17421
- },
17422
- {
17423
- "name": "filterIcon",
17424
- "type": "React.ReactNode | { }",
17425
- "required": false,
17426
- "description": ""
17427
- },
17428
- {
17429
- "name": "filterMultiple",
17430
- "type": "boolean",
17431
- "required": false,
17432
- "description": ""
17433
- },
17434
- {
17435
- "name": "filtered",
17436
- "type": "boolean",
17437
- "required": false,
17438
- "description": ""
17439
- },
17440
- {
17441
- "name": "filteredValue",
17442
- "type": "Key[] | null",
17443
- "required": false,
17444
- "description": ""
17445
- },
17446
- {
17447
- "name": "filters",
17448
- "type": "ColumnFilterItem[]",
17449
- "required": false,
17450
- "description": ""
17451
- },
17452
- {
17453
- "name": "fixed",
17454
- "type": "FixedType",
17455
- "required": false,
17456
- "description": ""
17457
- },
17458
17189
  {
17459
17190
  "name": "headerBrick",
17460
17191
  "type": "{ useBrick: UseBrickConf; }",
17461
17192
  "required": false,
17462
17193
  "description": "支持为某列的表头自定义展示构件,可通过 DATA.title 获取标题文本"
17463
17194
  },
17464
- {
17465
- "name": "key",
17466
- "type": "Key",
17467
- "required": false,
17468
- "description": ""
17469
- },
17470
- {
17471
- "name": "onCell",
17472
- "type": "GetComponentProps<Record<string, any>>",
17473
- "required": false,
17474
- "description": ""
17475
- },
17476
- {
17477
- "name": "onCellClick",
17478
- "type": "{ }",
17479
- "required": false,
17480
- "description": ""
17481
- },
17482
- {
17483
- "name": "onFilter",
17484
- "type": "{ }",
17485
- "required": false,
17486
- "description": ""
17487
- },
17488
- {
17489
- "name": "onFilterDropdownVisibleChange",
17490
- "type": "{ }",
17491
- "required": false,
17492
- "description": ""
17493
- },
17494
- {
17495
- "name": "onHeaderCell",
17496
- "type": "GetComponentProps<>",
17497
- "required": false,
17498
- "description": ""
17499
- },
17500
- {
17501
- "name": "render",
17502
- "type": "{ }",
17503
- "required": false,
17504
- "description": ""
17505
- },
17506
- {
17507
- "name": "responsive",
17508
- "type": "Breakpoint[]",
17509
- "required": false,
17510
- "description": ""
17511
- },
17512
- {
17513
- "name": "rowSpan",
17514
- "type": "number",
17515
- "required": false,
17516
- "description": ""
17517
- },
17518
- {
17519
- "name": "shouldCellUpdate",
17520
- "type": "{ }",
17521
- "required": false,
17522
- "description": ""
17523
- },
17524
- {
17525
- "name": "showSorterTooltip",
17526
- "type": "boolean | TooltipProps",
17527
- "required": false,
17528
- "description": ""
17529
- },
17530
- {
17531
- "name": "sortDirections",
17532
- "type": "SortOrder[]",
17533
- "required": false,
17534
- "description": ""
17535
- },
17536
- {
17537
- "name": "sortOrder",
17538
- "type": "SortOrder",
17539
- "required": false,
17540
- "description": ""
17541
- },
17542
- {
17543
- "name": "sorter",
17544
- "type": "boolean | CompareFn<Record<string, any>> | { compare?: CompareFn<Record<string, any>>; multiple?: number; }",
17545
- "required": false,
17546
- "description": ""
17547
- },
17548
- {
17549
- "name": "title",
17550
- "type": "ColumnTitle<Record<string, any>>",
17551
- "required": false,
17552
- "description": ""
17553
- },
17554
17195
  {
17555
17196
  "name": "useBrick",
17556
17197
  "type": "UseBrickConf",
@@ -17568,12 +17209,6 @@
17568
17209
  "type": "\"top\" | \"bottom\"",
17569
17210
  "required": false,
17570
17211
  "description": "单元格内元素的垂直对齐方式"
17571
- },
17572
- {
17573
- "name": "width",
17574
- "type": "number | string",
17575
- "required": false,
17576
- "description": ""
17577
17212
  }
17578
17213
  ],
17579
17214
  "indexSignature": []
@@ -17773,7 +17408,7 @@
17773
17408
  "name": "__index",
17774
17409
  "parameters": [
17775
17410
  {
17776
- "id": 16736,
17411
+ "id": 16749,
17777
17412
  "name": "propName",
17778
17413
  "kind": 32768,
17779
17414
  "kindString": "Parameter",
@@ -17784,8 +17419,7 @@
17784
17419
  }
17785
17420
  ],
17786
17421
  "type": "any",
17787
- "required": true,
17788
- "description": ""
17422
+ "required": true
17789
17423
  }
17790
17424
  ]
17791
17425
  }