feffery_antd_components 0.4.3-rc3 → 0.4.3-rc4
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/DESCRIPTION +1 -1
- package/Project.toml +1 -1
- package/README-en_US.md +1 -1
- package/README.md +1 -1
- package/feffery_antd_components/AntdConfigProvider.py +21 -2
- package/feffery_antd_components/AntdModal.py +8 -4
- package/feffery_antd_components/AntdNotification.py +20 -9
- package/feffery_antd_components/AntdTable.py +47 -20
- package/feffery_antd_components/async-antd_table.js +2 -2
- package/feffery_antd_components/async-data_display.js +1 -1
- package/feffery_antd_components/async-data_entry.js +3 -3
- package/feffery_antd_components/async-upload.js +2 -2
- package/feffery_antd_components/feffery_antd_components.min.js +6 -6
- package/feffery_antd_components/metadata.json +1 -1
- package/feffery_antd_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/jl/'feffery'_antdconfigprovider.jl +6 -1
- package/src/jl/'feffery'_antdmodal.jl +2 -1
- package/src/jl/'feffery'_antdnotification.jl +6 -4
- package/src/jl/'feffery'_antdtable.jl +18 -7
- package/src/lib/components/dataDisplay/AntdTable.react.js +43 -7
- package/src/lib/components/feedback/AntdModal.react.js +10 -3
- package/src/lib/components/feedback/AntdNotification.react.js +9 -4
- package/src/lib/components/locales.react.js +4 -0
- package/src/lib/components/other/AntdConfigProvider.react.js +38 -25
- package/src/lib/fragments/AntdTable.react.js +46 -14
- package/tests/dataDisplay/AntdTable/feat_tag_mode_tooltip.py +88 -0
- package/tests/dataDisplay/AntdTable/feat_title_popover_nodes.py +79 -0
- package/tests/dataDisplay/AntdTable/perf_editable_column_format_constrait_message.py +65 -0
- package/tests/feedback/AntdModal/feat_loading_title.py +92 -0
- package/tests/feedback/AntdNotification/feat_component_content.py +64 -0
- package/tests/feedback/AntdNotification/feat_number_of_stack.py +40 -0
- package/tests/other/AntdConfigProvider/feat_use_css.py +67 -0
package/DESCRIPTION
CHANGED
package/Project.toml
CHANGED
package/README-en_US.md
CHANGED
|
@@ -33,7 +33,7 @@ pip install feffery-antd-components -U
|
|
|
33
33
|
## 2 Install the latest preview release version
|
|
34
34
|
|
|
35
35
|
> [!NOTE]
|
|
36
|
-
> The latest preview release version (2025-
|
|
36
|
+
> The latest preview release version (2025-11-19): `0.4.3rc4`
|
|
37
37
|
|
|
38
38
|
```bash
|
|
39
39
|
pip install feffery-antd-components --pre -U
|
package/README.md
CHANGED
|
@@ -37,6 +37,16 @@ Keyword arguments:
|
|
|
37
37
|
为内部组件设置快捷主题算法,支持多种主题组合,可选项有`'default'`、`'dark'`、`'compact'`
|
|
38
38
|
默认值:`'default'`.
|
|
39
39
|
|
|
40
|
+
- cssVar (dict; optional):
|
|
41
|
+
是否开启`CSS`变量模式,具体参考:https://ant-design.antgroup.com/docs/react/css-variables
|
|
42
|
+
默认值:`False`.
|
|
43
|
+
|
|
44
|
+
`cssVar` is a boolean | dict with keys:
|
|
45
|
+
|
|
46
|
+
- prefix (string; optional)
|
|
47
|
+
|
|
48
|
+
- key (string; optional)
|
|
49
|
+
|
|
40
50
|
- useOldTheme (a value equal to: 'default', 'dark'; optional):
|
|
41
51
|
是否强制使用`0.3.x`版本之前的主题样式,可选项有`'default'`、`'dark'`.
|
|
42
52
|
|
|
@@ -81,6 +91,14 @@ Keyword arguments:
|
|
|
81
91
|
_base_nodes = ['children']
|
|
82
92
|
_namespace = 'feffery_antd_components'
|
|
83
93
|
_type = 'AntdConfigProvider'
|
|
94
|
+
CssVar = TypedDict(
|
|
95
|
+
"CssVar",
|
|
96
|
+
{
|
|
97
|
+
"prefix": NotRequired[str],
|
|
98
|
+
"key": NotRequired[str]
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
|
|
84
102
|
Token = TypedDict(
|
|
85
103
|
"Token",
|
|
86
104
|
{
|
|
@@ -102,6 +120,7 @@ Keyword arguments:
|
|
|
102
120
|
id: typing.Optional[typing.Union[str, dict]] = None,
|
|
103
121
|
key: typing.Optional[str] = None,
|
|
104
122
|
algorithm: typing.Optional[typing.Union[Literal["default", "dark", "compact"], typing.Sequence[Literal["default", "dark", "compact"]]]] = None,
|
|
123
|
+
cssVar: typing.Optional[typing.Union[bool, "CssVar"]] = None,
|
|
105
124
|
useOldTheme: typing.Optional[Literal["default", "dark"]] = None,
|
|
106
125
|
primaryColor: typing.Optional[str] = None,
|
|
107
126
|
componentDisabled: typing.Optional[bool] = None,
|
|
@@ -114,9 +133,9 @@ Keyword arguments:
|
|
|
114
133
|
enableLayer: typing.Optional[bool] = None,
|
|
115
134
|
**kwargs
|
|
116
135
|
):
|
|
117
|
-
self._prop_names = ['id', 'key', 'children', 'algorithm', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer']
|
|
136
|
+
self._prop_names = ['id', 'key', 'children', 'algorithm', 'cssVar', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer']
|
|
118
137
|
self._valid_wildcard_attributes = []
|
|
119
|
-
self.available_properties = ['id', 'key', 'children', 'algorithm', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer']
|
|
138
|
+
self.available_properties = ['id', 'key', 'children', 'algorithm', 'cssVar', 'useOldTheme', 'primaryColor', 'componentDisabled', 'componentSize', 'locale', 'wavesDisabled', 'token', 'componentsToken', 'compatibilityMode', 'enableLayer']
|
|
120
139
|
self.available_wildcard_properties = []
|
|
121
140
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
122
141
|
_locals = locals()
|
|
@@ -92,6 +92,9 @@ Keyword arguments:
|
|
|
92
92
|
- title (a list of or a singular dash component, string or number; optional):
|
|
93
93
|
组件型,标题内容.
|
|
94
94
|
|
|
95
|
+
- loadingTitle (a list of or a singular dash component, string or number; optional):
|
|
96
|
+
组件型,loading状态下的标题内容.
|
|
97
|
+
|
|
95
98
|
- renderFooter (boolean; default False):
|
|
96
99
|
是否渲染底部操作按钮 默认值:`False`.
|
|
97
100
|
|
|
@@ -238,8 +241,8 @@ Keyword arguments:
|
|
|
238
241
|
|
|
239
242
|
- aria-* (string; optional):
|
|
240
243
|
`aria-*`格式属性通配."""
|
|
241
|
-
_children_props = ['title', 'okText', 'cancelText', 'loadingOkText']
|
|
242
|
-
_base_nodes = ['title', 'okText', 'cancelText', 'loadingOkText', 'children']
|
|
244
|
+
_children_props = ['title', 'loadingTitle', 'okText', 'cancelText', 'loadingOkText']
|
|
245
|
+
_base_nodes = ['title', 'loadingTitle', 'okText', 'cancelText', 'loadingOkText', 'children']
|
|
243
246
|
_namespace = 'feffery_antd_components'
|
|
244
247
|
_type = 'AntdModal'
|
|
245
248
|
Styles = TypedDict(
|
|
@@ -317,6 +320,7 @@ Keyword arguments:
|
|
|
317
320
|
locale: typing.Optional[Literal["zh-cn", "en-us", "de-de", "ru-ru"]] = None,
|
|
318
321
|
visible: typing.Optional[bool] = None,
|
|
319
322
|
title: typing.Optional[ComponentType] = None,
|
|
323
|
+
loadingTitle: typing.Optional[ComponentType] = None,
|
|
320
324
|
renderFooter: typing.Optional[bool] = None,
|
|
321
325
|
okText: typing.Optional[ComponentType] = None,
|
|
322
326
|
okButtonProps: typing.Optional["OkButtonProps"] = None,
|
|
@@ -343,9 +347,9 @@ Keyword arguments:
|
|
|
343
347
|
loading: typing.Optional[bool] = None,
|
|
344
348
|
**kwargs
|
|
345
349
|
):
|
|
346
|
-
self._prop_names = ['id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*']
|
|
350
|
+
self._prop_names = ['id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'loadingTitle', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*']
|
|
347
351
|
self._valid_wildcard_attributes = ['data-', 'aria-']
|
|
348
|
-
self.available_properties = ['id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*']
|
|
352
|
+
self.available_properties = ['id', 'key', 'children', 'style', 'className', 'styles', 'classNames', 'locale', 'visible', 'title', 'loadingTitle', 'renderFooter', 'okText', 'okButtonProps', 'cancelText', 'cancelButtonProps', 'width', 'centered', 'keyboard', 'closable', 'mask', 'maskClosable', 'okClickClose', 'preventClose', 'zIndex', 'okCounts', 'cancelCounts', 'closeCounts', 'confirmAutoSpin', 'loadingOkText', 'confirmLoading', 'transitionType', 'forceRender', 'destroyOnClose', 'loading', 'data-*', 'aria-*']
|
|
349
353
|
self.available_wildcard_properties = ['data-', 'aria-']
|
|
350
354
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
351
355
|
_locals = locals()
|
|
@@ -33,10 +33,10 @@ Keyword arguments:
|
|
|
33
33
|
- className (string | dict; optional):
|
|
34
34
|
当前组件css类名,支持[动态css](/advanced-classname).
|
|
35
35
|
|
|
36
|
-
- message (string; optional):
|
|
36
|
+
- message (a list of or a singular dash component, string or number; optional):
|
|
37
37
|
通知提醒主要信息.
|
|
38
38
|
|
|
39
|
-
- description (string; optional):
|
|
39
|
+
- description (a list of or a singular dash component, string or number; optional):
|
|
40
40
|
通知提醒描述信息.
|
|
41
41
|
|
|
42
42
|
- type (a value equal to: 'default', 'success', 'error', 'info', 'warning'; default 'default'):
|
|
@@ -86,10 +86,14 @@ Keyword arguments:
|
|
|
86
86
|
- danger (boolean; optional):
|
|
87
87
|
按钮是否呈现危险状态 默认值:`False`.
|
|
88
88
|
|
|
89
|
-
- stack (
|
|
90
|
-
是否开启多通知自动折叠堆叠功能 默认值:`False`.
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
- stack (dict; default False):
|
|
90
|
+
是否开启多通知自动折叠堆叠功能 默认值:`False`.
|
|
91
|
+
|
|
92
|
+
`stack` is a boolean | dict with keys:
|
|
93
|
+
|
|
94
|
+
- threshold (number; optional)"""
|
|
95
|
+
_children_props = ['message', 'description']
|
|
96
|
+
_base_nodes = ['message', 'description', 'children']
|
|
93
97
|
_namespace = 'feffery_antd_components'
|
|
94
98
|
_type = 'AntdNotification'
|
|
95
99
|
CloseButton = TypedDict(
|
|
@@ -103,6 +107,13 @@ Keyword arguments:
|
|
|
103
107
|
}
|
|
104
108
|
)
|
|
105
109
|
|
|
110
|
+
Stack = TypedDict(
|
|
111
|
+
"Stack",
|
|
112
|
+
{
|
|
113
|
+
"threshold": NotRequired[NumberType]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
|
|
106
117
|
|
|
107
118
|
def __init__(
|
|
108
119
|
self,
|
|
@@ -110,8 +121,8 @@ Keyword arguments:
|
|
|
110
121
|
key: typing.Optional[str] = None,
|
|
111
122
|
style: typing.Optional[typing.Any] = None,
|
|
112
123
|
className: typing.Optional[typing.Union[str, dict]] = None,
|
|
113
|
-
message: typing.Optional[
|
|
114
|
-
description: typing.Optional[
|
|
124
|
+
message: typing.Optional[ComponentType] = None,
|
|
125
|
+
description: typing.Optional[ComponentType] = None,
|
|
115
126
|
type: typing.Optional[Literal["default", "success", "error", "info", "warning"]] = None,
|
|
116
127
|
placement: typing.Optional[Literal["top", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"]] = None,
|
|
117
128
|
top: typing.Optional[NumberType] = None,
|
|
@@ -121,7 +132,7 @@ Keyword arguments:
|
|
|
121
132
|
pauseOnHover: typing.Optional[bool] = None,
|
|
122
133
|
closable: typing.Optional[bool] = None,
|
|
123
134
|
closeButton: typing.Optional["CloseButton"] = None,
|
|
124
|
-
stack: typing.Optional[bool] = None,
|
|
135
|
+
stack: typing.Optional[typing.Union[bool, "Stack"]] = None,
|
|
125
136
|
**kwargs
|
|
126
137
|
):
|
|
127
138
|
self._prop_names = ['id', 'key', 'style', 'className', 'message', 'description', 'type', 'placement', 'top', 'bottom', 'duration', 'showProgress', 'pauseOnHover', 'closable', 'closeButton', 'stack']
|
|
@@ -254,13 +254,37 @@ Keyword arguments:
|
|
|
254
254
|
适用于`'tags'`模式,标签颜色.
|
|
255
255
|
|
|
256
256
|
- tag (string | number; optional):
|
|
257
|
-
适用于`'tags'`模式,标签内容.
|
|
257
|
+
适用于`'tags'`模式,标签内容.
|
|
258
|
+
|
|
259
|
+
- tooltip (dict; optional):
|
|
260
|
+
适用于`'tags'`模式,为当前标签添加额外的文字提示功能.
|
|
261
|
+
|
|
262
|
+
`tooltip` is a dict with keys:
|
|
263
|
+
|
|
264
|
+
- title (string; optional):
|
|
265
|
+
文字提示内容.
|
|
266
|
+
|
|
267
|
+
- placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional):
|
|
268
|
+
文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'`
|
|
269
|
+
默认值:`'top'`. | list of dicts with keys:
|
|
258
270
|
|
|
259
271
|
- color (string; optional):
|
|
260
272
|
适用于`'tags'`模式,当前标签颜色.
|
|
261
273
|
|
|
262
274
|
- tag (string | number; optional):
|
|
263
|
-
适用于`'tags'`模式,当前标签内容.
|
|
275
|
+
适用于`'tags'`模式,当前标签内容.
|
|
276
|
+
|
|
277
|
+
- tooltip (dict; optional):
|
|
278
|
+
适用于`'tags'`模式,为当前标签添加额外的文字提示功能.
|
|
279
|
+
|
|
280
|
+
`tooltip` is a dict with keys:
|
|
281
|
+
|
|
282
|
+
- title (string; optional):
|
|
283
|
+
文字提示内容.
|
|
284
|
+
|
|
285
|
+
- placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight'; optional):
|
|
286
|
+
文字提示弹出方向,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'`
|
|
287
|
+
默认值:`'top'`. | dict with keys:
|
|
264
288
|
|
|
265
289
|
- disabled (boolean; optional):
|
|
266
290
|
适用于`'button'`模式,同`AntdButton`中的同名参数.
|
|
@@ -603,17 +627,19 @@ Keyword arguments:
|
|
|
603
627
|
- recentlyMouseEnterRow (dict; optional):
|
|
604
628
|
当`enableHoverListen=True`时,监听最近一次鼠标移入的行数据信息.
|
|
605
629
|
|
|
606
|
-
- titlePopoverInfo (
|
|
630
|
+
- titlePopoverInfo (list of dicts; optional):
|
|
607
631
|
配置各字段标题额外气泡说明卡片信息相关参数.
|
|
608
632
|
|
|
609
|
-
`titlePopoverInfo` is a
|
|
610
|
-
type dict with keys:
|
|
633
|
+
`titlePopoverInfo` is a list of dicts with keys:
|
|
611
634
|
|
|
612
|
-
-
|
|
613
|
-
|
|
635
|
+
- dataIndex (string; required):
|
|
636
|
+
必填,对应字段的dataIndex.
|
|
614
637
|
|
|
615
|
-
-
|
|
616
|
-
|
|
638
|
+
- title (a list of or a singular dash component, string or number; optional):
|
|
639
|
+
气泡卡片标题,支持字符串或组件型.
|
|
640
|
+
|
|
641
|
+
- content (a list of or a singular dash component, string or number; optional):
|
|
642
|
+
气泡卡片内容,支持字符串或组件型.
|
|
617
643
|
|
|
618
644
|
- placement (a value equal to: 'top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom'; optional):
|
|
619
645
|
气泡卡片弹出方位,可选项有`'top'`、`'left'`、`'right'`、`'bottom'`、`'topLeft'`、`'topRight'`、`'bottomLeft'`、`'bottomRight'`、`'leftTop'`、`'leftBottom'`、`'rightTop'`、`'rightBottom'`
|
|
@@ -1018,7 +1044,7 @@ Keyword arguments:
|
|
|
1018
1044
|
|
|
1019
1045
|
- aria-* (string; optional):
|
|
1020
1046
|
`aria-*`格式属性通配."""
|
|
1021
|
-
_children_props = ['columns[].title', 'data[]{}', 'summaryRowContents[].content', 'expandedRowKeyToContent[].content', 'emptyContent', 'title', 'footer']
|
|
1047
|
+
_children_props = ['columns[].title', 'data[]{}', 'titlePopoverInfo[].title', 'titlePopoverInfo[].content', 'summaryRowContents[].content', 'expandedRowKeyToContent[].content', 'emptyContent', 'title', 'footer']
|
|
1022
1048
|
_base_nodes = ['emptyContent', 'title', 'footer', 'children']
|
|
1023
1049
|
_namespace = 'feffery_antd_components'
|
|
1024
1050
|
_type = 'AntdTable'
|
|
@@ -1141,20 +1167,20 @@ Keyword arguments:
|
|
|
1141
1167
|
}
|
|
1142
1168
|
)
|
|
1143
1169
|
|
|
1144
|
-
|
|
1145
|
-
"
|
|
1170
|
+
DataTooltip = TypedDict(
|
|
1171
|
+
"DataTooltip",
|
|
1146
1172
|
{
|
|
1147
1173
|
"title": NotRequired[str],
|
|
1148
|
-
"
|
|
1149
|
-
"cancelText": NotRequired[str]
|
|
1174
|
+
"placement": NotRequired[Literal["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight"]]
|
|
1150
1175
|
}
|
|
1151
1176
|
)
|
|
1152
1177
|
|
|
1153
|
-
|
|
1154
|
-
"
|
|
1178
|
+
DataPopConfirmProps = TypedDict(
|
|
1179
|
+
"DataPopConfirmProps",
|
|
1155
1180
|
{
|
|
1156
1181
|
"title": NotRequired[str],
|
|
1157
|
-
"
|
|
1182
|
+
"okText": NotRequired[str],
|
|
1183
|
+
"cancelText": NotRequired[str]
|
|
1158
1184
|
}
|
|
1159
1185
|
)
|
|
1160
1186
|
|
|
@@ -1190,8 +1216,9 @@ Keyword arguments:
|
|
|
1190
1216
|
TitlePopoverInfo = TypedDict(
|
|
1191
1217
|
"TitlePopoverInfo",
|
|
1192
1218
|
{
|
|
1193
|
-
"
|
|
1194
|
-
"
|
|
1219
|
+
"dataIndex": str,
|
|
1220
|
+
"title": NotRequired[ComponentType],
|
|
1221
|
+
"content": NotRequired[ComponentType],
|
|
1195
1222
|
"placement": NotRequired[Literal["top", "left", "right", "bottom", "topLeft", "topRight", "bottomLeft", "bottomRight", "leftTop", "leftBottom", "rightTop", "rightBottom"]],
|
|
1196
1223
|
"overlayStyle": NotRequired[dict]
|
|
1197
1224
|
}
|
|
@@ -1349,7 +1376,7 @@ Keyword arguments:
|
|
|
1349
1376
|
recentlyMouseEnterColumnDataIndex: typing.Optional[str] = None,
|
|
1350
1377
|
recentlyMouseEnterRowKey: typing.Optional[typing.Union[str, NumberType]] = None,
|
|
1351
1378
|
recentlyMouseEnterRow: typing.Optional[dict] = None,
|
|
1352
|
-
titlePopoverInfo: typing.Optional[typing.
|
|
1379
|
+
titlePopoverInfo: typing.Optional[typing.Sequence["TitlePopoverInfo"]] = None,
|
|
1353
1380
|
columnsFormatConstraint: typing.Optional[typing.Dict[typing.Union[str, float, int], "ColumnsFormatConstraint"]] = None,
|
|
1354
1381
|
sortOptions: typing.Optional["SortOptions"] = None,
|
|
1355
1382
|
showSorterTooltip: typing.Optional[bool] = None,
|