feffery_antd_components 0.3.9 → 0.3.10

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 (37) hide show
  1. package/DESCRIPTION +1 -1
  2. package/Project.toml +1 -1
  3. package/README-en_US.md +1 -1
  4. package/README.md +1 -1
  5. package/bug_fix.py +0 -13
  6. package/feffery_antd_components/AntdDivider.py +6 -3
  7. package/feffery_antd_components/AntdDropdown.py +4 -1
  8. package/feffery_antd_components/AntdIcon.py +11 -4
  9. package/feffery_antd_components/AntdSplitter.py +16 -27
  10. package/feffery_antd_components/AntdTabs.py +8 -5
  11. package/feffery_antd_components/async-antd_table.js +2 -2
  12. package/feffery_antd_components/async-data_display.js +1 -1
  13. package/feffery_antd_components/async-data_entry.js +4 -4
  14. package/feffery_antd_components/async-upload.js +2 -2
  15. package/feffery_antd_components/feffery_antd_components.min.js +9 -9
  16. package/feffery_antd_components/metadata.json +75 -51
  17. package/feffery_antd_components/package-info.json +1 -1
  18. package/package.json +1 -1
  19. package/src/jl/'feffery'_antddivider.jl +3 -1
  20. package/src/jl/'feffery'_antddropdown.jl +2 -1
  21. package/src/jl/'feffery'_antdicon.jl +5 -2
  22. package/src/jl/'feffery'_antdsplitter.jl +9 -13
  23. package/src/jl/'feffery'_antdtabs.jl +2 -1
  24. package/src/lib/components/dataDisplay/AntdTable.react.js +0 -1
  25. package/src/lib/components/dataDisplay/AntdTabs.react.js +5 -0
  26. package/src/lib/components/general/AntdIcon.react.js +79 -31
  27. package/src/lib/components/layout/AntdDivider.react.js +11 -3
  28. package/src/lib/components/layout/AntdSplitter.react.js +20 -63
  29. package/src/lib/components/navigation/AntdDropdown.react.js +5 -0
  30. package/src/lib/components/other/AntdConfigProvider.react.js +0 -2
  31. package/src/lib/fragments/AntdTable.react.js +3 -3
  32. package/src/lib/fragments/dataDisplay/AntdTabs.react.js +111 -105
  33. package/tests/dataDisplay/AntdTabs/feat_placeholder.py +124 -0
  34. package/tests/general/AntdIcon/feat_iconfont.py +41 -0
  35. package/tests/layout/AntdDivider/feat_plain.py +21 -0
  36. package/tests/layout/AntdSplitter/refactor.py +303 -0
  37. package/tests/navigation/AntdDropdown/feat_extra.py +29 -0
package/DESCRIPTION CHANGED
@@ -1,6 +1,6 @@
1
1
  Package: fefferyAntdComponents
2
2
  Title: Best implementation of Antd components in Plotly Dash.
3
- Version: 0.3.9
3
+ Version: 0.3.10
4
4
  Description: Best implementation of Antd components in Plotly Dash.
5
5
  Depends: R (>= 3.0.2)
6
6
  Imports:
package/Project.toml CHANGED
@@ -2,7 +2,7 @@
2
2
  name = "FefferyAntdComponents"
3
3
  uuid = "1b08a953-4be3-4667-9a23-674b58f7de79"
4
4
  authors = ["CNFeffery <fefferypzy@gmail.com>"]
5
- version = "0.3.9"
5
+ version = "0.3.10"
6
6
 
7
7
  [deps]
8
8
  Dash = "1b08a953-4be3-4667-9a23-3db579824955"
package/README-en_US.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  [简体中文](./README.md) | English
17
17
 
18
- Subproject of `feffery-components` projects, third-party components library of `Plotly Dash`, based on the [Antd](https://github.com/ant-design/ant-design), brings many common and powerful components into `Dash`🥳, latest stable version: `0.3.8`
18
+ Subproject of `feffery-components` projects, third-party components library of `Plotly Dash`, based on the [Antd](https://github.com/ant-design/ant-design), brings many common and powerful components into `Dash`🥳, latest stable version: `0.3.9`
19
19
 
20
20
  ## 1 Install
21
21
 
package/README.md CHANGED
@@ -15,7 +15,7 @@
15
15
 
16
16
  简体中文 | [English](./README-en_US.md)
17
17
 
18
- `feffery-components`计划子项目,`Plotly Dash`第三方组件库,基于`Antd`,将超多具有丰富功能的通用网页常用交互组件引入`Dash`的生态中 🥳,最新稳定版本:`0.3.8`
18
+ `feffery-components`计划子项目,`Plotly Dash`第三方组件库,基于`Antd`,将超多具有丰富功能的通用网页常用交互组件引入`Dash`的生态中 🥳,最新稳定版本:`0.3.9`
19
19
 
20
20
  ## 1 最新版本安装方式
21
21
 
package/bug_fix.py CHANGED
@@ -1,13 +0,0 @@
1
- import dash
2
- from dash import html
3
- import feffery_antd_components as fac
4
-
5
- app = dash.Dash(__name__)
6
-
7
- app.layout = html.Div(
8
- [fac.AntdDateRangePicker(disabled=[False, True])],
9
- style={'padding': 50},
10
- )
11
-
12
- if __name__ == '__main__':
13
- app.run(debug=True)
@@ -55,6 +55,9 @@ Keyword arguments:
55
55
  分割线变体,可选项有`'dashed'`(虚线)、`'dotted'`(点线)、`'solid'`(实线)
56
56
  默认值:`'solid'`.
57
57
 
58
+ - plain (boolean; default True):
59
+ 文字内容是否呈现为常规正文形式 默认值:`True`.
60
+
58
61
  - data-* (string; optional):
59
62
  `data-*`格式属性通配.
60
63
 
@@ -78,10 +81,10 @@ Keyword arguments:
78
81
  _namespace = 'feffery_antd_components'
79
82
  _type = 'AntdDivider'
80
83
  @_explicitize_args
81
- def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, innerTextOrientation=Component.UNDEFINED, isDashed=Component.UNDEFINED, direction=Component.UNDEFINED, fontSize=Component.UNDEFINED, lineColor=Component.UNDEFINED, fontStyle=Component.UNDEFINED, fontWeight=Component.UNDEFINED, fontFamily=Component.UNDEFINED, fontColor=Component.UNDEFINED, variant=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
82
- self._prop_names = ['id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'data-*', 'aria-*', 'loading_state']
84
+ def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, innerTextOrientation=Component.UNDEFINED, isDashed=Component.UNDEFINED, direction=Component.UNDEFINED, fontSize=Component.UNDEFINED, lineColor=Component.UNDEFINED, fontStyle=Component.UNDEFINED, fontWeight=Component.UNDEFINED, fontFamily=Component.UNDEFINED, fontColor=Component.UNDEFINED, variant=Component.UNDEFINED, plain=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
85
+ self._prop_names = ['id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'plain', 'data-*', 'aria-*', 'loading_state']
83
86
  self._valid_wildcard_attributes = ['data-', 'aria-']
84
- self.available_properties = ['id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'data-*', 'aria-*', 'loading_state']
87
+ self.available_properties = ['id', 'key', 'children', 'className', 'style', 'innerTextOrientation', 'isDashed', 'direction', 'fontSize', 'lineColor', 'fontStyle', 'fontWeight', 'fontFamily', 'fontColor', 'variant', 'plain', 'data-*', 'aria-*', 'loading_state']
85
88
  self.available_wildcard_properties = ['data-', 'aria-']
86
89
  _explicit_args = kwargs.pop('_explicit_args')
87
90
  _locals = locals()
@@ -80,6 +80,9 @@ Keyword arguments:
80
80
  - title (a list of or a singular dash component, string or number; optional):
81
81
  组件型,节点标题.
82
82
 
83
+ - extra (a list of or a singular dash component, string or number; optional):
84
+ 组件型,额外内容.
85
+
83
86
  - href (string; optional):
84
87
  节点链接地址.
85
88
 
@@ -164,7 +167,7 @@ Keyword arguments:
164
167
 
165
168
  - component_name (string; optional):
166
169
  Holds the name of the component that is loading."""
167
- _children_props = ['menuItems[].title']
170
+ _children_props = ['menuItems[].title', 'menuItems[].extra']
168
171
  _base_nodes = ['children']
169
172
  _namespace = 'feffery_antd_components'
170
173
  _type = 'AntdDropdown'
@@ -21,8 +21,15 @@ Keyword arguments:
21
21
  - className (string | dict; optional):
22
22
  当前组件css类名,支持[动态css](/advanced-classname).
23
23
 
24
+ - mode (a value equal to: 'default', 'iconfont'; default 'default'):
25
+ 图标调用模式,可选项有`'default'`(内置图标)、`'iconfont'`(阿里巴巴矢量图标)
26
+ 默认值:`'default'`.
27
+
24
28
  - icon (string; optional):
25
- 图标名称.
29
+ 当`mode='default'`时,设置内置图标名称,当`mode='iconfont'`时,设置自定义源图标名称.
30
+
31
+ - scriptUrl (string | list of strings; optional):
32
+ 当`mode='iconfont'`时,设置单个或多个阿里巴巴矢量图标源(在iconfont.cn上制作).
26
33
 
27
34
  - nClicks (number; default 0):
28
35
  图标累计点击次数,用于监听图标点击行为 默认值:`0`.
@@ -53,10 +60,10 @@ Keyword arguments:
53
60
  _namespace = 'feffery_antd_components'
54
61
  _type = 'AntdIcon'
55
62
  @_explicitize_args
56
- def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, icon=Component.UNDEFINED, nClicks=Component.UNDEFINED, debounceWait=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
57
- self._prop_names = ['id', 'key', 'style', 'className', 'icon', 'nClicks', 'debounceWait', 'data-*', 'aria-*', 'loading_state']
63
+ def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, mode=Component.UNDEFINED, icon=Component.UNDEFINED, scriptUrl=Component.UNDEFINED, nClicks=Component.UNDEFINED, debounceWait=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
64
+ self._prop_names = ['id', 'key', 'style', 'className', 'mode', 'icon', 'scriptUrl', 'nClicks', 'debounceWait', 'data-*', 'aria-*', 'loading_state']
58
65
  self._valid_wildcard_attributes = ['data-', 'aria-']
59
- self.available_properties = ['id', 'key', 'style', 'className', 'icon', 'nClicks', 'debounceWait', 'data-*', 'aria-*', 'loading_state']
66
+ self.available_properties = ['id', 'key', 'style', 'className', 'mode', 'icon', 'scriptUrl', 'nClicks', 'debounceWait', 'data-*', 'aria-*', 'loading_state']
60
67
  self.available_wildcard_properties = ['data-', 'aria-']
61
68
  _explicit_args = kwargs.pop('_explicit_args')
62
69
  _locals = locals()
@@ -25,35 +25,35 @@ Keyword arguments:
25
25
  布局方向,可选项有`'horizontal'`、`'vertical'` 默认值:`'horizontal'`.
26
26
 
27
27
  - items (list of dicts; required):
28
- 配置分隔面板子项,优先级高于`children`.
28
+ 配置分隔面板子项.
29
29
 
30
30
  `items` is a list of dicts with keys:
31
31
 
32
32
  - key (string; optional):
33
- 面板key.
33
+ 当前子项唯一识别`key`.
34
34
 
35
35
  - children (a list of or a singular dash component, string or number; optional):
36
36
  组件型,内嵌元素.
37
37
 
38
38
  - style (dict; optional):
39
- 当前组件css样式.
39
+ 当前子项`css`样式.
40
40
 
41
- - className (string
41
+ - className (string; optional):
42
+ 当前子项`css`类名.
42
43
 
43
- Or dict; optional):
44
- 当前组件css类名,支持[动态css](/advanced-classname).
44
+ - defaultSize (number
45
45
 
46
- - defaultSize (number | string; optional):
47
- 初始面板大小,支持数字`px`或者文字`'百分比%'`类型.
46
+ Or string; optional):
47
+ 初始面板尺寸,支持数字`px`或者文字`'百分比%'`类型.
48
+
49
+ - size (number | string; optional):
50
+ 面板尺寸,支持数字`px`或者文字`'百分比%'`类型.
48
51
 
49
52
  - min (number | string; optional):
50
- 最小阈值,支持数字`px`或者文字`'百分比%'`类型.
53
+ 最小尺寸,支持数字`px`或者文字`'百分比%'`类型.
51
54
 
52
55
  - max (number | string; optional):
53
- 最大阈值,支持数字`px`或者文字`'百分比%'`类型.
54
-
55
- - size (number | string; optional):
56
- 面板大小,支持数字`px`或者文字`'百分比%'`类型.
56
+ 最大尺寸,支持数字`px`或者文字`'百分比%'`类型.
57
57
 
58
58
  - collapsible (dict; optional):
59
59
  是否可折叠 默认值:`False`.
@@ -67,17 +67,6 @@ Keyword arguments:
67
67
  - resizable (boolean; optional):
68
68
  是否开启拖拽伸缩 默认值:`True`.
69
69
 
70
- - currentSizes (list of dicts; optional):
71
- 监听当前面板大小变化信息.
72
-
73
- `currentSizes` is a list of dicts with keys:
74
-
75
- - key (string; optional):
76
- 面板key.
77
-
78
- - size (number | string; optional):
79
- 面板大小.
80
-
81
70
  - data-* (string; optional):
82
71
  `data-*`格式属性通配.
83
72
 
@@ -101,10 +90,10 @@ Keyword arguments:
101
90
  _namespace = 'feffery_antd_components'
102
91
  _type = 'AntdSplitter'
103
92
  @_explicitize_args
104
- def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, layout=Component.UNDEFINED, items=Component.REQUIRED, currentSizes=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
105
- self._prop_names = ['id', 'key', 'style', 'className', 'layout', 'items', 'currentSizes', 'data-*', 'aria-*', 'loading_state']
93
+ def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, layout=Component.UNDEFINED, items=Component.REQUIRED, loading_state=Component.UNDEFINED, **kwargs):
94
+ self._prop_names = ['id', 'key', 'style', 'className', 'layout', 'items', 'data-*', 'aria-*', 'loading_state']
106
95
  self._valid_wildcard_attributes = ['data-', 'aria-']
107
- self.available_properties = ['id', 'key', 'style', 'className', 'layout', 'items', 'currentSizes', 'data-*', 'aria-*', 'loading_state']
96
+ self.available_properties = ['id', 'key', 'style', 'className', 'layout', 'items', 'data-*', 'aria-*', 'loading_state']
108
97
  self.available_wildcard_properties = ['data-', 'aria-']
109
98
  _explicit_args = kwargs.pop('_explicit_args')
110
99
  _locals = locals()
@@ -148,6 +148,9 @@ Keyword arguments:
148
148
  - timestamp (number; optional):
149
149
  事件对应时间戳信息.
150
150
 
151
+ - placeholder (a list of or a singular dash component, string or number; optional):
152
+ 当`items`为空或长度为`0`时,替代进行占位显示的内容.
153
+
151
154
  - data-* (string; optional):
152
155
  `data-*`格式属性通配.
153
156
 
@@ -176,15 +179,15 @@ Keyword arguments:
176
179
  - persistence_type (a value equal to: 'local', 'session', 'memory'; default 'local'):
177
180
  属性持久化存储类型,可选项有`'local'`(本地持久化),`'session'`(会话持久化),`'memory'`(内存持久化)
178
181
  默认值:`'local'`."""
179
- _children_props = ['items[].label', 'items[].children', 'items[].closeIcon', 'tabBarLeftExtraContent', 'tabBarRightExtraContent']
180
- _base_nodes = ['tabBarLeftExtraContent', 'tabBarRightExtraContent', 'children']
182
+ _children_props = ['items[].label', 'items[].children', 'items[].closeIcon', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'placeholder']
183
+ _base_nodes = ['tabBarLeftExtraContent', 'tabBarRightExtraContent', 'placeholder', 'children']
181
184
  _namespace = 'feffery_antd_components'
182
185
  _type = 'AntdTabs'
183
186
  @_explicitize_args
184
- def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, type=Component.UNDEFINED, items=Component.UNDEFINED, itemKeys=Component.UNDEFINED, activeKey=Component.UNDEFINED, defaultActiveKey=Component.UNDEFINED, disabledTabKeys=Component.UNDEFINED, tabPosition=Component.UNDEFINED, size=Component.UNDEFINED, centered=Component.UNDEFINED, indicator=Component.UNDEFINED, tabBarGutter=Component.UNDEFINED, inkBarAnimated=Component.UNDEFINED, tabPaneAnimated=Component.UNDEFINED, latestDeletePane=Component.UNDEFINED, tabCloseCounts=Component.UNDEFINED, tabBarLeftExtraContent=Component.UNDEFINED, tabBarRightExtraContent=Component.UNDEFINED, tabCount=Component.UNDEFINED, destroyInactiveTabPane=Component.UNDEFINED, clickedContextMenu=Component.UNDEFINED, loading_state=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs):
185
- self._prop_names = ['id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type']
187
+ def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, type=Component.UNDEFINED, items=Component.UNDEFINED, itemKeys=Component.UNDEFINED, activeKey=Component.UNDEFINED, defaultActiveKey=Component.UNDEFINED, disabledTabKeys=Component.UNDEFINED, tabPosition=Component.UNDEFINED, size=Component.UNDEFINED, centered=Component.UNDEFINED, indicator=Component.UNDEFINED, tabBarGutter=Component.UNDEFINED, inkBarAnimated=Component.UNDEFINED, tabPaneAnimated=Component.UNDEFINED, latestDeletePane=Component.UNDEFINED, tabCloseCounts=Component.UNDEFINED, tabBarLeftExtraContent=Component.UNDEFINED, tabBarRightExtraContent=Component.UNDEFINED, tabCount=Component.UNDEFINED, destroyInactiveTabPane=Component.UNDEFINED, clickedContextMenu=Component.UNDEFINED, placeholder=Component.UNDEFINED, loading_state=Component.UNDEFINED, persistence=Component.UNDEFINED, persisted_props=Component.UNDEFINED, persistence_type=Component.UNDEFINED, **kwargs):
188
+ self._prop_names = ['id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'placeholder', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type']
186
189
  self._valid_wildcard_attributes = ['data-', 'aria-']
187
- self.available_properties = ['id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type']
190
+ self.available_properties = ['id', 'key', 'style', 'className', 'type', 'items', 'itemKeys', 'activeKey', 'defaultActiveKey', 'disabledTabKeys', 'tabPosition', 'size', 'centered', 'indicator', 'tabBarGutter', 'inkBarAnimated', 'tabPaneAnimated', 'latestDeletePane', 'tabCloseCounts', 'tabBarLeftExtraContent', 'tabBarRightExtraContent', 'tabCount', 'destroyInactiveTabPane', 'clickedContextMenu', 'placeholder', 'data-*', 'aria-*', 'loading_state', 'persistence', 'persisted_props', 'persistence_type']
188
191
  self.available_wildcard_properties = ['data-', 'aria-']
189
192
  _explicit_args = kwargs.pop('_explicit_args')
190
193
  _locals = locals()