feffery_antd_components 0.3.0-b0 → 0.3.0-b2
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/NAMESPACE +1 -0
- package/Project.toml +1 -1
- package/build/lib/feffery_antd_components/AntdDraggablePanel.py +121 -0
- package/build/lib/feffery_antd_components/AntdDropdown.py +15 -6
- package/build/lib/feffery_antd_components/_imports_.py +2 -0
- package/build/lib/feffery_antd_components/alias.py +2 -0
- package/build/lib/feffery_antd_components/async-antd_table.js +1 -1
- package/build/lib/feffery_antd_components/async-data_display.js +12 -12
- package/build/lib/feffery_antd_components/async-data_entry.js +8 -8
- package/build/lib/feffery_antd_components/async-upload.js +2 -2
- package/build/lib/feffery_antd_components/feffery_antd_components.min.js +22 -22
- package/build/lib/feffery_antd_components/metadata.json +309 -0
- package/build/lib/feffery_antd_components/package-info.json +3 -2
- package/feffery_antd_components/AntdDraggablePanel.py +121 -0
- package/feffery_antd_components/AntdDropdown.py +15 -6
- package/feffery_antd_components/_imports_.py +2 -0
- package/feffery_antd_components/alias.py +2 -0
- package/feffery_antd_components/async-antd_table.js +1 -1
- package/feffery_antd_components/async-data_display.js +12 -12
- package/feffery_antd_components/async-data_entry.js +8 -8
- package/feffery_antd_components/async-upload.js +2 -2
- package/feffery_antd_components/feffery_antd_components.min.js +22 -22
- package/feffery_antd_components/metadata.json +309 -0
- package/feffery_antd_components/package-info.json +3 -2
- package/package.json +3 -2
- package/src/jl/'feffery'_antddraggablepanel.jl +62 -0
- package/src/jl/'feffery'_antddropdown.jl +10 -1
- package/src/lib/components/dataDisplay/AntdDraggablePanel.react.js +174 -0
- package/src/lib/components/feedback/AntdNotification.react.js +7 -6
- package/src/lib/components/navigation/AntdDropdown.react.js +47 -10
- package/src/lib/components/other/AntdConfigProvider.js +3 -1
- package/src/lib/fragments/AntdTable.react.js +67 -65
- package/src/lib/fragments/dataDisplay/AntdDraggablePanel.react.js +62 -0
- package/src/lib/index.js +3 -1
- package/usage.py +50 -26
|
@@ -1920,6 +1920,286 @@
|
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
1922
|
},
|
|
1923
|
+
"src/lib/components/dataDisplay/AntdDraggablePanel.react.js": {
|
|
1924
|
+
"description": "",
|
|
1925
|
+
"displayName": "AntdDraggablePanel",
|
|
1926
|
+
"methods": [],
|
|
1927
|
+
"props": {
|
|
1928
|
+
"id": {
|
|
1929
|
+
"type": {
|
|
1930
|
+
"name": "string"
|
|
1931
|
+
},
|
|
1932
|
+
"required": false,
|
|
1933
|
+
"description": "\u7ec4\u4ef6id"
|
|
1934
|
+
},
|
|
1935
|
+
"children": {
|
|
1936
|
+
"type": {
|
|
1937
|
+
"name": "node"
|
|
1938
|
+
},
|
|
1939
|
+
"required": false,
|
|
1940
|
+
"description": "\u5185\u90e8\u7ec4\u4ef6\u5143\u7d20"
|
|
1941
|
+
},
|
|
1942
|
+
"style": {
|
|
1943
|
+
"type": {
|
|
1944
|
+
"name": "object"
|
|
1945
|
+
},
|
|
1946
|
+
"required": false,
|
|
1947
|
+
"description": "css\u6837\u5f0f"
|
|
1948
|
+
},
|
|
1949
|
+
"className": {
|
|
1950
|
+
"type": {
|
|
1951
|
+
"name": "union",
|
|
1952
|
+
"value": [
|
|
1953
|
+
{
|
|
1954
|
+
"name": "string"
|
|
1955
|
+
},
|
|
1956
|
+
{
|
|
1957
|
+
"name": "object"
|
|
1958
|
+
}
|
|
1959
|
+
]
|
|
1960
|
+
},
|
|
1961
|
+
"required": false,
|
|
1962
|
+
"description": "css\u7c7b\u540d"
|
|
1963
|
+
},
|
|
1964
|
+
"key": {
|
|
1965
|
+
"type": {
|
|
1966
|
+
"name": "string"
|
|
1967
|
+
},
|
|
1968
|
+
"required": false,
|
|
1969
|
+
"description": "\u5f3a\u5236\u5237\u65b0\u7528"
|
|
1970
|
+
},
|
|
1971
|
+
"mode": {
|
|
1972
|
+
"type": {
|
|
1973
|
+
"name": "enum",
|
|
1974
|
+
"value": [
|
|
1975
|
+
{
|
|
1976
|
+
"value": "'fixed'",
|
|
1977
|
+
"computed": false
|
|
1978
|
+
},
|
|
1979
|
+
{
|
|
1980
|
+
"value": "'float'",
|
|
1981
|
+
"computed": false
|
|
1982
|
+
}
|
|
1983
|
+
]
|
|
1984
|
+
},
|
|
1985
|
+
"required": false,
|
|
1986
|
+
"description": "\u8bbe\u7f6e\u9762\u677f\u6a21\u5f0f\uff0c\u53ef\u9009\u7684\u6709'fixed'\uff08\u56fa\u5b9a\u6a21\u5f0f\uff09\u3001'float'\uff08\u6d6e\u52a8\u7a97\u53e3\u6a21\u5f0f\uff09\r\n\u9ed8\u8ba4\uff1a'fixed'",
|
|
1987
|
+
"defaultValue": {
|
|
1988
|
+
"value": "'fixed'",
|
|
1989
|
+
"computed": false
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1992
|
+
"defaultSize": {
|
|
1993
|
+
"type": {
|
|
1994
|
+
"name": "exact",
|
|
1995
|
+
"value": {
|
|
1996
|
+
"width": {
|
|
1997
|
+
"name": "union",
|
|
1998
|
+
"value": [
|
|
1999
|
+
{
|
|
2000
|
+
"name": "number"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"name": "string"
|
|
2004
|
+
}
|
|
2005
|
+
],
|
|
2006
|
+
"description": "\u8bbe\u7f6e\u50cf\u7d20\u5bbd\u5ea6\u6570\u503c\uff0c\u6216css\u5bbd\u5ea6\u5b57\u7b26\u4e32",
|
|
2007
|
+
"required": false
|
|
2008
|
+
},
|
|
2009
|
+
"height": {
|
|
2010
|
+
"name": "union",
|
|
2011
|
+
"value": [
|
|
2012
|
+
{
|
|
2013
|
+
"name": "number"
|
|
2014
|
+
},
|
|
2015
|
+
{
|
|
2016
|
+
"name": "string"
|
|
2017
|
+
}
|
|
2018
|
+
],
|
|
2019
|
+
"description": "\u8bbe\u7f6e\u50cf\u7d20\u9ad8\u5ea6\u6570\u503c\uff0c\u6216css\u9ad8\u5ea6\u5b57\u7b26\u4e32",
|
|
2020
|
+
"required": false
|
|
2021
|
+
}
|
|
2022
|
+
}
|
|
2023
|
+
},
|
|
2024
|
+
"required": false,
|
|
2025
|
+
"description": "\u8bbe\u7f6e\u5f53\u524d\u9762\u677f\u9ed8\u8ba4\u5c3a\u5bf8"
|
|
2026
|
+
},
|
|
2027
|
+
"defaultPosition": {
|
|
2028
|
+
"type": {
|
|
2029
|
+
"name": "exact",
|
|
2030
|
+
"value": {
|
|
2031
|
+
"x": {
|
|
2032
|
+
"name": "number",
|
|
2033
|
+
"description": "\u8bbe\u7f6e\u8ddd\u79bb\u6587\u6863\u5de6\u7aef\u50cf\u7d20\u8ddd\u79bb",
|
|
2034
|
+
"required": false
|
|
2035
|
+
},
|
|
2036
|
+
"y": {
|
|
2037
|
+
"name": "number",
|
|
2038
|
+
"description": "\u8bbe\u7f6e\u8ddd\u79bb\u6587\u6863\u9876\u7aef\u50cf\u7d20\u8ddd\u79bb",
|
|
2039
|
+
"required": false
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
},
|
|
2043
|
+
"required": false,
|
|
2044
|
+
"description": "\u8bbe\u7f6e\u5f53\u524d\u9762\u677f\u9ed8\u8ba4\u4f4d\u7f6e"
|
|
2045
|
+
},
|
|
2046
|
+
"placement": {
|
|
2047
|
+
"type": {
|
|
2048
|
+
"name": "enum",
|
|
2049
|
+
"value": [
|
|
2050
|
+
{
|
|
2051
|
+
"value": "'right'",
|
|
2052
|
+
"computed": false
|
|
2053
|
+
},
|
|
2054
|
+
{
|
|
2055
|
+
"value": "'left'",
|
|
2056
|
+
"computed": false
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
"value": "'top'",
|
|
2060
|
+
"computed": false
|
|
2061
|
+
},
|
|
2062
|
+
{
|
|
2063
|
+
"value": "'bottom'",
|
|
2064
|
+
"computed": false
|
|
2065
|
+
}
|
|
2066
|
+
]
|
|
2067
|
+
},
|
|
2068
|
+
"required": false,
|
|
2069
|
+
"description": "\u56fa\u5b9a\u6a21\u5f0f\u4e0b\uff0c\u7528\u4e8e\u8bbe\u7f6e\u9762\u677f\u671d\u5411\uff0c\u53ef\u9009\u7684\u6709'right'\u3001'left'\u3001'top'\u3001'bottom'\r\n\u9ed8\u8ba4\uff1a'right'",
|
|
2070
|
+
"defaultValue": {
|
|
2071
|
+
"value": "'right'",
|
|
2072
|
+
"computed": false
|
|
2073
|
+
}
|
|
2074
|
+
},
|
|
2075
|
+
"minWidth": {
|
|
2076
|
+
"type": {
|
|
2077
|
+
"name": "number"
|
|
2078
|
+
},
|
|
2079
|
+
"required": false,
|
|
2080
|
+
"description": "\u9762\u677f\u6700\u5c0f\u50cf\u7d20\u5bbd\u5ea6"
|
|
2081
|
+
},
|
|
2082
|
+
"minHeight": {
|
|
2083
|
+
"type": {
|
|
2084
|
+
"name": "number"
|
|
2085
|
+
},
|
|
2086
|
+
"required": false,
|
|
2087
|
+
"description": "\u9762\u677f\u6700\u5c0f\u50cf\u7d20\u9ad8\u5ea6"
|
|
2088
|
+
},
|
|
2089
|
+
"maxWidth": {
|
|
2090
|
+
"type": {
|
|
2091
|
+
"name": "number"
|
|
2092
|
+
},
|
|
2093
|
+
"required": false,
|
|
2094
|
+
"description": "\u9762\u677f\u6700\u5927\u50cf\u7d20\u5bbd\u5ea6"
|
|
2095
|
+
},
|
|
2096
|
+
"maxHeight": {
|
|
2097
|
+
"type": {
|
|
2098
|
+
"name": "number"
|
|
2099
|
+
},
|
|
2100
|
+
"required": false,
|
|
2101
|
+
"description": "\u9762\u677f\u6700\u5927\u50cf\u7d20\u9ad8\u5ea6"
|
|
2102
|
+
},
|
|
2103
|
+
"resize": {
|
|
2104
|
+
"type": {
|
|
2105
|
+
"name": "union",
|
|
2106
|
+
"value": [
|
|
2107
|
+
{
|
|
2108
|
+
"name": "bool"
|
|
2109
|
+
},
|
|
2110
|
+
{
|
|
2111
|
+
"name": "exact",
|
|
2112
|
+
"value": {
|
|
2113
|
+
"bottom": {
|
|
2114
|
+
"name": "bool",
|
|
2115
|
+
"required": false
|
|
2116
|
+
},
|
|
2117
|
+
"bottomLeft": {
|
|
2118
|
+
"name": "bool",
|
|
2119
|
+
"required": false
|
|
2120
|
+
},
|
|
2121
|
+
"bottomRight": {
|
|
2122
|
+
"name": "bool",
|
|
2123
|
+
"required": false
|
|
2124
|
+
},
|
|
2125
|
+
"left": {
|
|
2126
|
+
"name": "bool",
|
|
2127
|
+
"required": false
|
|
2128
|
+
},
|
|
2129
|
+
"right": {
|
|
2130
|
+
"name": "bool",
|
|
2131
|
+
"required": false
|
|
2132
|
+
},
|
|
2133
|
+
"top": {
|
|
2134
|
+
"name": "bool",
|
|
2135
|
+
"required": false
|
|
2136
|
+
},
|
|
2137
|
+
"topLeft": {
|
|
2138
|
+
"name": "bool",
|
|
2139
|
+
"required": false
|
|
2140
|
+
},
|
|
2141
|
+
"topRight": {
|
|
2142
|
+
"name": "bool",
|
|
2143
|
+
"required": false
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
]
|
|
2148
|
+
},
|
|
2149
|
+
"required": false,
|
|
2150
|
+
"description": "\u914d\u7f6e\u5c3a\u5bf8\u53ef\u8c03\u6574\u6027\uff0c\u53ef\u72ec\u7acb\u63a7\u5236\u5404\u4e2a\u65b9\u5411\uff0c\u4e5f\u53ef\u76f4\u63a5\u63a7\u5236\u6240\u6709\u65b9\u5411\u662f\u5426\u53ef\u8c03\u6574\u5c3a\u5bf8"
|
|
2151
|
+
},
|
|
2152
|
+
"expandable": {
|
|
2153
|
+
"type": {
|
|
2154
|
+
"name": "bool"
|
|
2155
|
+
},
|
|
2156
|
+
"required": false,
|
|
2157
|
+
"description": "\u9762\u677f\u662f\u5426\u53ef\u5c55\u5f00\r\n\u9ed8\u8ba4\uff1atrue",
|
|
2158
|
+
"defaultValue": {
|
|
2159
|
+
"value": "true",
|
|
2160
|
+
"computed": false
|
|
2161
|
+
}
|
|
2162
|
+
},
|
|
2163
|
+
"isExpand": {
|
|
2164
|
+
"type": {
|
|
2165
|
+
"name": "bool"
|
|
2166
|
+
},
|
|
2167
|
+
"required": false,
|
|
2168
|
+
"description": "\u8bbe\u7f6e\u6216\u76d1\u542c\u5f53\u524d\u9762\u677f\u662f\u5426\u4e3a\u5c55\u5f00\u72b6\u6001"
|
|
2169
|
+
},
|
|
2170
|
+
"loading_state": {
|
|
2171
|
+
"type": {
|
|
2172
|
+
"name": "shape",
|
|
2173
|
+
"value": {
|
|
2174
|
+
"is_loading": {
|
|
2175
|
+
"name": "bool",
|
|
2176
|
+
"description": "Determines if the component is loading or not",
|
|
2177
|
+
"required": false
|
|
2178
|
+
},
|
|
2179
|
+
"prop_name": {
|
|
2180
|
+
"name": "string",
|
|
2181
|
+
"description": "Holds which property is loading",
|
|
2182
|
+
"required": false
|
|
2183
|
+
},
|
|
2184
|
+
"component_name": {
|
|
2185
|
+
"name": "string",
|
|
2186
|
+
"description": "Holds the name of the component that is loading",
|
|
2187
|
+
"required": false
|
|
2188
|
+
}
|
|
2189
|
+
}
|
|
2190
|
+
},
|
|
2191
|
+
"required": false,
|
|
2192
|
+
"description": ""
|
|
2193
|
+
},
|
|
2194
|
+
"setProps": {
|
|
2195
|
+
"type": {
|
|
2196
|
+
"name": "func"
|
|
2197
|
+
},
|
|
2198
|
+
"required": false,
|
|
2199
|
+
"description": "Dash-assigned callback that should be called to report property changes\r\nto Dash, to make them available for callbacks."
|
|
2200
|
+
}
|
|
2201
|
+
}
|
|
2202
|
+
},
|
|
1923
2203
|
"src/lib/components/dataDisplay/AntdEmpty.react.js": {
|
|
1924
2204
|
"description": "",
|
|
1925
2205
|
"displayName": "AntdEmpty",
|
|
@@ -26893,6 +27173,13 @@
|
|
|
26893
27173
|
"required": false,
|
|
26894
27174
|
"description": ""
|
|
26895
27175
|
},
|
|
27176
|
+
"children": {
|
|
27177
|
+
"type": {
|
|
27178
|
+
"name": "node"
|
|
27179
|
+
},
|
|
27180
|
+
"required": false,
|
|
27181
|
+
"description": "\u81ea\u5b9a\u4e49\u4e0b\u62c9\u83dc\u5355\u951a\u5b9a\u7684\u81ea\u5b9a\u4e49\u5143\u7d20\uff0c\u4f18\u5148\u7ea7\u6700\u9ad8"
|
|
27182
|
+
},
|
|
26896
27183
|
"className": {
|
|
26897
27184
|
"type": {
|
|
26898
27185
|
"name": "union",
|
|
@@ -26915,6 +27202,28 @@
|
|
|
26915
27202
|
"required": false,
|
|
26916
27203
|
"description": ""
|
|
26917
27204
|
},
|
|
27205
|
+
"wrapperStyle": {
|
|
27206
|
+
"type": {
|
|
27207
|
+
"name": "object"
|
|
27208
|
+
},
|
|
27209
|
+
"required": false,
|
|
27210
|
+
"description": "\u9488\u5bf9\u81ea\u5b9a\u4e49\u951a\u5b9a\u5143\u7d20\u7684\u7236\u5bb9\u5668\u8bbe\u7f6ecss\u6837\u5f0f"
|
|
27211
|
+
},
|
|
27212
|
+
"wrapperClassName": {
|
|
27213
|
+
"type": {
|
|
27214
|
+
"name": "union",
|
|
27215
|
+
"value": [
|
|
27216
|
+
{
|
|
27217
|
+
"name": "string"
|
|
27218
|
+
},
|
|
27219
|
+
{
|
|
27220
|
+
"name": "object"
|
|
27221
|
+
}
|
|
27222
|
+
]
|
|
27223
|
+
},
|
|
27224
|
+
"required": false,
|
|
27225
|
+
"description": "\u9488\u5bf9\u81ea\u5b9a\u4e49\u951a\u5b9a\u5143\u7d20\u7684\u7236\u5bb9\u5668\u8bbe\u7f6ecss\u7c7b\u540d"
|
|
27226
|
+
},
|
|
26918
27227
|
"key": {
|
|
26919
27228
|
"type": {
|
|
26920
27229
|
"name": "string"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feffery_antd_components",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-b2",
|
|
4
4
|
"description": "Best implementation of Antd components in Plotly Dash.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@ant-design/happy-work-theme": "^1.0.0",
|
|
29
29
|
"@ant-design/icons": "^5.0.0",
|
|
30
30
|
"@ant-design/pro-card": "^1.20.1",
|
|
31
|
+
"@ant-design/pro-editor": "^0.31.0",
|
|
31
32
|
"@ant-design/pro-layout": "^7.17.13",
|
|
32
33
|
"@plotly/webpack-dash-dynamic-import": "^1.3.0",
|
|
33
34
|
"ahooks": "^3.7.0",
|
|
@@ -90,4 +91,4 @@
|
|
|
90
91
|
"node": ">=8.11.0",
|
|
91
92
|
"npm": ">=6.1.0"
|
|
92
93
|
}
|
|
93
|
-
}
|
|
94
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "feffery_antd_components",
|
|
3
|
-
"version": "0.3.0-
|
|
3
|
+
"version": "0.3.0-b2",
|
|
4
4
|
"description": "Best implementation of Antd components in Plotly Dash.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"@ant-design/happy-work-theme": "^1.0.0",
|
|
29
29
|
"@ant-design/icons": "^5.0.0",
|
|
30
30
|
"@ant-design/pro-card": "^1.20.1",
|
|
31
|
+
"@ant-design/pro-editor": "^0.31.0",
|
|
31
32
|
"@ant-design/pro-layout": "^7.17.13",
|
|
32
33
|
"@plotly/webpack-dash-dynamic-import": "^1.3.0",
|
|
33
34
|
"ahooks": "^3.7.0",
|
|
@@ -90,4 +91,4 @@
|
|
|
90
91
|
"node": ">=8.11.0",
|
|
91
92
|
"npm": ">=6.1.0"
|
|
92
93
|
}
|
|
93
|
-
}
|
|
94
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# AUTO GENERATED FILE - DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
export 'feffery'_antddraggablepanel
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
'feffery'_antddraggablepanel(;kwargs...)
|
|
7
|
+
'feffery'_antddraggablepanel(children::Any;kwargs...)
|
|
8
|
+
'feffery'_antddraggablepanel(children_maker::Function;kwargs...)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
An AntdDraggablePanel component.
|
|
12
|
+
|
|
13
|
+
Keyword arguments:
|
|
14
|
+
- `children` (a list of or a singular dash component, string or number; optional): 内部组件元素
|
|
15
|
+
- `id` (String; optional): 组件id
|
|
16
|
+
- `className` (String | Dict; optional): css类名
|
|
17
|
+
- `defaultPosition` (optional): 设置当前面板默认位置. defaultPosition has the following type: lists containing elements 'x', 'y'.
|
|
18
|
+
Those elements have the following types:
|
|
19
|
+
- `x` (Real; optional): 设置距离文档左端像素距离
|
|
20
|
+
- `y` (Real; optional): 设置距离文档顶端像素距离
|
|
21
|
+
- `defaultSize` (optional): 设置当前面板默认尺寸. defaultSize has the following type: lists containing elements 'width', 'height'.
|
|
22
|
+
Those elements have the following types:
|
|
23
|
+
- `width` (Real | String; optional): 设置像素宽度数值,或css宽度字符串
|
|
24
|
+
- `height` (Real | String; optional): 设置像素高度数值,或css高度字符串
|
|
25
|
+
- `expandable` (Bool; optional): 面板是否可展开
|
|
26
|
+
默认:true
|
|
27
|
+
- `isExpand` (Bool; optional): 设置或监听当前面板是否为展开状态
|
|
28
|
+
- `key` (String; optional): 强制刷新用
|
|
29
|
+
- `loading_state` (optional): . loading_state has the following type: lists containing elements 'is_loading', 'prop_name', 'component_name'.
|
|
30
|
+
Those elements have the following types:
|
|
31
|
+
- `is_loading` (Bool; optional): Determines if the component is loading or not
|
|
32
|
+
- `prop_name` (String; optional): Holds which property is loading
|
|
33
|
+
- `component_name` (String; optional): Holds the name of the component that is loading
|
|
34
|
+
- `maxHeight` (Real; optional): 面板最大像素高度
|
|
35
|
+
- `maxWidth` (Real; optional): 面板最大像素宽度
|
|
36
|
+
- `minHeight` (Real; optional): 面板最小像素高度
|
|
37
|
+
- `minWidth` (Real; optional): 面板最小像素宽度
|
|
38
|
+
- `mode` (a value equal to: 'fixed', 'float'; optional): 设置面板模式,可选的有'fixed'(固定模式)、'float'(浮动窗口模式)
|
|
39
|
+
默认:'fixed'
|
|
40
|
+
- `placement` (a value equal to: 'right', 'left', 'top', 'bottom'; optional): 固定模式下,用于设置面板朝向,可选的有'right'、'left'、'top'、'bottom'
|
|
41
|
+
默认:'right'
|
|
42
|
+
- `resize` (optional): 配置尺寸可调整性,可独立控制各个方向,也可直接控制所有方向是否可调整尺寸. resize has the following type: Bool | lists containing elements 'bottom', 'bottomLeft', 'bottomRight', 'left', 'right', 'top', 'topLeft', 'topRight'.
|
|
43
|
+
Those elements have the following types:
|
|
44
|
+
- `bottom` (Bool; optional)
|
|
45
|
+
- `bottomLeft` (Bool; optional)
|
|
46
|
+
- `bottomRight` (Bool; optional)
|
|
47
|
+
- `left` (Bool; optional)
|
|
48
|
+
- `right` (Bool; optional)
|
|
49
|
+
- `top` (Bool; optional)
|
|
50
|
+
- `topLeft` (Bool; optional)
|
|
51
|
+
- `topRight` (Bool; optional)
|
|
52
|
+
- `style` (Dict; optional): css样式
|
|
53
|
+
"""
|
|
54
|
+
function 'feffery'_antddraggablepanel(; kwargs...)
|
|
55
|
+
available_props = Symbol[:children, :id, :className, :defaultPosition, :defaultSize, :expandable, :isExpand, :key, :loading_state, :maxHeight, :maxWidth, :minHeight, :minWidth, :mode, :placement, :resize, :style]
|
|
56
|
+
wild_props = Symbol[]
|
|
57
|
+
return Component("'feffery'_antddraggablepanel", "AntdDraggablePanel", "feffery_antd_components", available_props, wild_props; kwargs...)
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
'feffery'_antddraggablepanel(children::Any; kwargs...) = 'feffery'_antddraggablepanel(;kwargs..., children = children)
|
|
61
|
+
'feffery'_antddraggablepanel(children_maker::Function; kwargs...) = 'feffery'_antddraggablepanel(children_maker(); kwargs...)
|
|
62
|
+
|
|
@@ -4,10 +4,14 @@ export 'feffery'_antddropdown
|
|
|
4
4
|
|
|
5
5
|
"""
|
|
6
6
|
'feffery'_antddropdown(;kwargs...)
|
|
7
|
+
'feffery'_antddropdown(children::Any;kwargs...)
|
|
8
|
+
'feffery'_antddropdown(children_maker::Function;kwargs...)
|
|
9
|
+
|
|
7
10
|
|
|
8
11
|
An AntdDropdown component.
|
|
9
12
|
|
|
10
13
|
Keyword arguments:
|
|
14
|
+
- `children` (a list of or a singular dash component, string or number; optional): 自定义下拉菜单锚定的自定义元素,优先级最高
|
|
11
15
|
- `id` (String; optional)
|
|
12
16
|
- `arrow` (Bool; optional)
|
|
13
17
|
- `autoAdjustOverflow` (Bool; optional)
|
|
@@ -59,10 +63,15 @@ Those elements have the following types:
|
|
|
59
63
|
- `title` (String; optional)
|
|
60
64
|
- `trigger` (a value equal to: 'click', 'hover'; optional)
|
|
61
65
|
- `visible` (Bool; optional)
|
|
66
|
+
- `wrapperClassName` (String | Dict; optional): 针对自定义锚定元素的父容器设置css类名
|
|
67
|
+
- `wrapperStyle` (Dict; optional): 针对自定义锚定元素的父容器设置css样式
|
|
62
68
|
"""
|
|
63
69
|
function 'feffery'_antddropdown(; kwargs...)
|
|
64
|
-
available_props = Symbol[:id, :arrow, :autoAdjustOverflow, :batchPropsNames, :batchPropsValues, :buttonMode, :buttonProps, :className, :clickedKey, :disabled, :freePosition, :freePositionClassName, :freePositionStyle, :key, :loading_state, :menuItems, :multiple, :nClicks, :nonSelectableKeys, :overlayClassName, :overlayStyle, :placement, :popupContainer, :selectable, :selectedKeys, :style, :title, :trigger, :visible]
|
|
70
|
+
available_props = Symbol[:children, :id, :arrow, :autoAdjustOverflow, :batchPropsNames, :batchPropsValues, :buttonMode, :buttonProps, :className, :clickedKey, :disabled, :freePosition, :freePositionClassName, :freePositionStyle, :key, :loading_state, :menuItems, :multiple, :nClicks, :nonSelectableKeys, :overlayClassName, :overlayStyle, :placement, :popupContainer, :selectable, :selectedKeys, :style, :title, :trigger, :visible, :wrapperClassName, :wrapperStyle]
|
|
65
71
|
wild_props = Symbol[]
|
|
66
72
|
return Component("'feffery'_antddropdown", "AntdDropdown", "feffery_antd_components", available_props, wild_props; kwargs...)
|
|
67
73
|
end
|
|
68
74
|
|
|
75
|
+
'feffery'_antddropdown(children::Any; kwargs...) = 'feffery'_antddropdown(;kwargs..., children = children)
|
|
76
|
+
'feffery'_antddropdown(children_maker::Function; kwargs...) = 'feffery'_antddropdown(children_maker(); kwargs...)
|
|
77
|
+
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React, { Suspense } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const LazyAntdDraggablePanel = React.lazy(() => import(/* webpackChunkName: "data_display" */ '../../fragments/dataDisplay/AntdDraggablePanel.react'));
|
|
5
|
+
|
|
6
|
+
const AntdDraggablePanel = (props) => {
|
|
7
|
+
return (
|
|
8
|
+
<Suspense fallback={null}>
|
|
9
|
+
<LazyAntdDraggablePanel {...props} />
|
|
10
|
+
</Suspense>
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// 定义参数或属性
|
|
15
|
+
AntdDraggablePanel.propTypes = {
|
|
16
|
+
/**
|
|
17
|
+
* 组件id
|
|
18
|
+
*/
|
|
19
|
+
id: PropTypes.string,
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 内部组件元素
|
|
23
|
+
*/
|
|
24
|
+
children: PropTypes.node,
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* css样式
|
|
28
|
+
*/
|
|
29
|
+
style: PropTypes.object,
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* css类名
|
|
33
|
+
*/
|
|
34
|
+
className: PropTypes.oneOfType([
|
|
35
|
+
PropTypes.string,
|
|
36
|
+
PropTypes.object
|
|
37
|
+
]),
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 强制刷新用
|
|
41
|
+
*/
|
|
42
|
+
key: PropTypes.string,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 设置面板模式,可选的有'fixed'(固定模式)、'float'(浮动窗口模式)
|
|
46
|
+
* 默认:'fixed'
|
|
47
|
+
*/
|
|
48
|
+
mode: PropTypes.oneOf(['fixed', 'float']),
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 设置当前面板默认尺寸
|
|
52
|
+
*/
|
|
53
|
+
defaultSize: PropTypes.exact({
|
|
54
|
+
/**
|
|
55
|
+
* 设置像素宽度数值,或css宽度字符串
|
|
56
|
+
*/
|
|
57
|
+
width: PropTypes.oneOfType([
|
|
58
|
+
PropTypes.number,
|
|
59
|
+
PropTypes.string
|
|
60
|
+
]),
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* 设置像素高度数值,或css高度字符串
|
|
64
|
+
*/
|
|
65
|
+
height: PropTypes.oneOfType([
|
|
66
|
+
PropTypes.number,
|
|
67
|
+
PropTypes.string
|
|
68
|
+
])
|
|
69
|
+
}),
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 设置当前面板默认位置
|
|
73
|
+
*/
|
|
74
|
+
defaultPosition: PropTypes.exact({
|
|
75
|
+
/**
|
|
76
|
+
* 设置距离文档左端像素距离
|
|
77
|
+
*/
|
|
78
|
+
x: PropTypes.number,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 设置距离文档顶端像素距离
|
|
82
|
+
*/
|
|
83
|
+
y: PropTypes.number
|
|
84
|
+
}),
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* 固定模式下,用于设置面板朝向,可选的有'right'、'left'、'top'、'bottom'
|
|
88
|
+
* 默认:'right'
|
|
89
|
+
*/
|
|
90
|
+
placement: PropTypes.oneOf(['right', 'left', 'top', 'bottom']),
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 面板最小像素宽度
|
|
94
|
+
*/
|
|
95
|
+
minWidth: PropTypes.number,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* 面板最小像素高度
|
|
99
|
+
*/
|
|
100
|
+
minHeight: PropTypes.number,
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 面板最大像素宽度
|
|
104
|
+
*/
|
|
105
|
+
maxWidth: PropTypes.number,
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 面板最大像素高度
|
|
109
|
+
*/
|
|
110
|
+
maxHeight: PropTypes.number,
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* 配置尺寸可调整性,可独立控制各个方向,也可直接控制所有方向是否可调整尺寸
|
|
114
|
+
*/
|
|
115
|
+
resize: PropTypes.oneOfType(
|
|
116
|
+
[
|
|
117
|
+
PropTypes.bool,
|
|
118
|
+
PropTypes.exact({
|
|
119
|
+
bottom: PropTypes.bool,
|
|
120
|
+
bottomLeft: PropTypes.bool,
|
|
121
|
+
bottomRight: PropTypes.bool,
|
|
122
|
+
left: PropTypes.bool,
|
|
123
|
+
right: PropTypes.bool,
|
|
124
|
+
top: PropTypes.bool,
|
|
125
|
+
topLeft: PropTypes.bool,
|
|
126
|
+
topRight: PropTypes.bool
|
|
127
|
+
})
|
|
128
|
+
]
|
|
129
|
+
),
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* 面板是否可展开
|
|
133
|
+
* 默认:true
|
|
134
|
+
*/
|
|
135
|
+
expandable: PropTypes.bool,
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* 设置或监听当前面板是否为展开状态
|
|
139
|
+
*/
|
|
140
|
+
isExpand: PropTypes.bool,
|
|
141
|
+
|
|
142
|
+
loading_state: PropTypes.shape({
|
|
143
|
+
/**
|
|
144
|
+
* Determines if the component is loading or not
|
|
145
|
+
*/
|
|
146
|
+
is_loading: PropTypes.bool,
|
|
147
|
+
/**
|
|
148
|
+
* Holds which property is loading
|
|
149
|
+
*/
|
|
150
|
+
prop_name: PropTypes.string,
|
|
151
|
+
/**
|
|
152
|
+
* Holds the name of the component that is loading
|
|
153
|
+
*/
|
|
154
|
+
component_name: PropTypes.string
|
|
155
|
+
}),
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Dash-assigned callback that should be called to report property changes
|
|
159
|
+
* to Dash, to make them available for callbacks.
|
|
160
|
+
*/
|
|
161
|
+
setProps: PropTypes.func
|
|
162
|
+
};
|
|
163
|
+
|
|
164
|
+
// 设置默认参数
|
|
165
|
+
AntdDraggablePanel.defaultProps = {
|
|
166
|
+
mode: 'fixed',
|
|
167
|
+
placement: 'right',
|
|
168
|
+
expandable: true
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
export default AntdDraggablePanel;
|
|
172
|
+
|
|
173
|
+
export const propTypes = AntdDraggablePanel.propTypes;
|
|
174
|
+
export const defaultProps = AntdDraggablePanel.defaultProps;
|
|
@@ -23,6 +23,7 @@ const AntdNotification = (props) => {
|
|
|
23
23
|
setProps
|
|
24
24
|
} = props;
|
|
25
25
|
|
|
26
|
+
const [api, contextHolder] = notification.useNotification({ stack: false });
|
|
26
27
|
const { notification: _notification } = App.useApp();
|
|
27
28
|
|
|
28
29
|
let config = {
|
|
@@ -60,20 +61,20 @@ const AntdNotification = (props) => {
|
|
|
60
61
|
}
|
|
61
62
|
} else {
|
|
62
63
|
if (type === 'default') {
|
|
63
|
-
|
|
64
|
+
api.open(config)
|
|
64
65
|
} else if (type === 'success') {
|
|
65
|
-
|
|
66
|
+
api.success(config)
|
|
66
67
|
} else if (type === 'error') {
|
|
67
|
-
|
|
68
|
+
api.error(config)
|
|
68
69
|
} else if (type === 'info') {
|
|
69
|
-
|
|
70
|
+
api.info(config)
|
|
70
71
|
} else if (type === 'warning') {
|
|
71
|
-
|
|
72
|
+
api.warning(config)
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
})
|
|
75
76
|
|
|
76
|
-
return
|
|
77
|
+
return <>{contextHolder}</>;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
// 定义参数或属性
|