feffery_utils_components 0.2.0-rc20 → 0.2.0-rc22
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 +2 -0
- package/Project.toml +1 -1
- package/README.md +1 -1
- package/feffery_utils_components/FefferyGrid.py +13 -8
- package/feffery_utils_components/FefferyListenDrag.py +51 -0
- package/feffery_utils_components/FefferyListenDrop.py +103 -0
- package/feffery_utils_components/_imports_.py +4 -0
- package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
- package/feffery_utils_components/async-feffery_animated_3d_background_three.js +1 -1
- package/feffery_utils_components/async-feffery_animated_image.js +1 -1
- package/feffery_utils_components/async-feffery_aplayer.js +1 -1
- package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
- package/feffery_utils_components/async-feffery_auto_fit.js +2 -2
- package/feffery_utils_components/async-feffery_burger.js +1 -1
- package/feffery_utils_components/async-feffery_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
- package/feffery_utils_components/async-feffery_dom2image.js +2 -2
- package/feffery_utils_components/async-feffery_dplayer.js +1 -1
- package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
- package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
- package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
- package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
- package/feffery_utils_components/async-feffery_grid.js +1 -1
- package/feffery_utils_components/async-feffery_http_requests.js +1 -1
- package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
- package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
- package/feffery_utils_components/async-feffery_markdown_editor.js +2 -2
- package/feffery_utils_components/async-feffery_motion.js +1 -1
- package/feffery_utils_components/async-feffery_music_player.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js.LICENSE.txt +8 -2
- package/feffery_utils_components/async-feffery_resizable.js +1 -1
- package/feffery_utils_components/async-feffery_rich_text_editor.js +3 -3
- package/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
- package/feffery_utils_components/async-feffery_shortcut_panel.js +16 -16
- package/feffery_utils_components/async-feffery_slider_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_sortable.js +1 -1
- package/feffery_utils_components/async-feffery_vditor.js +1 -1
- package/feffery_utils_components/async-feffery_word_preview.js +1 -1
- package/feffery_utils_components/async-fuc-shared.js +15 -15
- package/feffery_utils_components/feffery_utils_components.min.js +7 -7
- package/feffery_utils_components/metadata.json +228 -3
- package/feffery_utils_components/package-info.json +1 -1
- package/package.json +1 -1
- package/src/lib/components/draggable/FefferyGrid.react.js +12 -1
- package/src/lib/components/listeners/FefferyListenDrag.react.js +83 -0
- package/src/lib/components/listeners/FefferyListenDrop.react.js +177 -0
- package/src/lib/components/styles.css +126 -124
- package/src/lib/fragments/draggable/FefferyGrid.react.js +112 -107
- package/src/lib/index.js +5 -1
- package/usage.py +61 -12
- package/.vscode/settings.json +0 -11
package/DESCRIPTION
CHANGED
package/NAMESPACE
CHANGED
|
@@ -84,6 +84,8 @@ export(''FefferyGeolocation)
|
|
|
84
84
|
export(''FefferyIdle)
|
|
85
85
|
export(''FefferyInViewport)
|
|
86
86
|
export(''FefferyKeyPress)
|
|
87
|
+
export(''FefferyListenDrag)
|
|
88
|
+
export(''FefferyListenDrop)
|
|
87
89
|
export(''FefferyListenElementSize)
|
|
88
90
|
export(''FefferyListenHover)
|
|
89
91
|
export(''FefferyListenPaste)
|
package/Project.toml
CHANGED
package/README.md
CHANGED
|
@@ -25,7 +25,8 @@ Keyword arguments:
|
|
|
25
25
|
用于自定义断点及其对应的像素值映射对象 默认为{lg: 1200, md: 996, sm: 768, xs: 480, xxs:
|
|
26
26
|
0}.
|
|
27
27
|
|
|
28
|
-
- className (string; optional)
|
|
28
|
+
- className (string; optional):
|
|
29
|
+
当前组件css类名.
|
|
29
30
|
|
|
30
31
|
- cols (dict with strings as keys and values of type number | number; default 12):
|
|
31
32
|
与breakpoints对应,用于设置不同断点下网格系统的列数 默认为{lg: 12, md: 10, sm: 6, xs: 4,
|
|
@@ -53,7 +54,7 @@ Keyword arguments:
|
|
|
53
54
|
设置是否开启当前网格内部的尺寸调整行为,默认为True.
|
|
54
55
|
|
|
55
56
|
- key (string; optional):
|
|
56
|
-
|
|
57
|
+
强制刷新用.
|
|
57
58
|
|
|
58
59
|
- layouts (dict; optional):
|
|
59
60
|
用于定义不同断点下的各个网格项布局相关参数.
|
|
@@ -159,6 +160,9 @@ Keyword arguments:
|
|
|
159
160
|
- margin (list of numbers | dict with strings as keys and values of type list of numbers; default [10, 10]):
|
|
160
161
|
用于设置当前网格容器内子元素之间的像素margin,格式:[x, y] 也可以传入以断点为键的字典从而实现响应式.
|
|
161
162
|
|
|
163
|
+
- placeholder (a list of or a singular dash component, string or number; optional):
|
|
164
|
+
占位元素,用于在children为空时呈现相关提示信息.
|
|
165
|
+
|
|
162
166
|
- placeholderBackground (string; default '#3b3a39'):
|
|
163
167
|
自定义样式相关快捷样式参数 自定义拖拽预览占位的background属性,默认为'#3b3a39'.
|
|
164
168
|
|
|
@@ -174,16 +178,17 @@ Keyword arguments:
|
|
|
174
178
|
- rowHeight (number; default 150):
|
|
175
179
|
用于设置网格中每行的像素高度,默认为150.
|
|
176
180
|
|
|
177
|
-
- style (dict; optional)
|
|
178
|
-
|
|
179
|
-
|
|
181
|
+
- style (dict; optional):
|
|
182
|
+
当前组件css样式."""
|
|
183
|
+
_children_props = ['placeholder']
|
|
184
|
+
_base_nodes = ['placeholder', 'children']
|
|
180
185
|
_namespace = 'feffery_utils_components'
|
|
181
186
|
_type = 'FefferyGrid'
|
|
182
187
|
@_explicitize_args
|
|
183
|
-
def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, height=Component.UNDEFINED, autoSize=Component.UNDEFINED, compactType=Component.UNDEFINED, margin=Component.UNDEFINED, containerPadding=Component.UNDEFINED, rowHeight=Component.UNDEFINED, isDraggable=Component.UNDEFINED, isResizable=Component.UNDEFINED, isBounded=Component.UNDEFINED, allowOverlap=Component.UNDEFINED, breakpoints=Component.UNDEFINED, cols=Component.UNDEFINED, layouts=Component.UNDEFINED, placeholderBackground=Component.UNDEFINED, placeholderOpacity=Component.UNDEFINED, placeholderBorder=Component.UNDEFINED, placeholderBorderRadius=Component.UNDEFINED, debug=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
184
|
-
self._prop_names = ['children', 'id', 'allowOverlap', 'autoSize', 'breakpoints', 'className', 'cols', 'compactType', 'containerPadding', 'debug', 'height', 'isBounded', 'isDraggable', 'isResizable', 'key', 'layouts', 'loading_state', 'margin', 'placeholderBackground', 'placeholderBorder', 'placeholderBorderRadius', 'placeholderOpacity', 'rowHeight', 'style']
|
|
188
|
+
def __init__(self, children=None, id=Component.UNDEFINED, placeholder=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, height=Component.UNDEFINED, autoSize=Component.UNDEFINED, compactType=Component.UNDEFINED, margin=Component.UNDEFINED, containerPadding=Component.UNDEFINED, rowHeight=Component.UNDEFINED, isDraggable=Component.UNDEFINED, isResizable=Component.UNDEFINED, isBounded=Component.UNDEFINED, allowOverlap=Component.UNDEFINED, breakpoints=Component.UNDEFINED, cols=Component.UNDEFINED, layouts=Component.UNDEFINED, placeholderBackground=Component.UNDEFINED, placeholderOpacity=Component.UNDEFINED, placeholderBorder=Component.UNDEFINED, placeholderBorderRadius=Component.UNDEFINED, debug=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
189
|
+
self._prop_names = ['children', 'id', 'allowOverlap', 'autoSize', 'breakpoints', 'className', 'cols', 'compactType', 'containerPadding', 'debug', 'height', 'isBounded', 'isDraggable', 'isResizable', 'key', 'layouts', 'loading_state', 'margin', 'placeholder', 'placeholderBackground', 'placeholderBorder', 'placeholderBorderRadius', 'placeholderOpacity', 'rowHeight', 'style']
|
|
185
190
|
self._valid_wildcard_attributes = []
|
|
186
|
-
self.available_properties = ['children', 'id', 'allowOverlap', 'autoSize', 'breakpoints', 'className', 'cols', 'compactType', 'containerPadding', 'debug', 'height', 'isBounded', 'isDraggable', 'isResizable', 'key', 'layouts', 'loading_state', 'margin', 'placeholderBackground', 'placeholderBorder', 'placeholderBorderRadius', 'placeholderOpacity', 'rowHeight', 'style']
|
|
191
|
+
self.available_properties = ['children', 'id', 'allowOverlap', 'autoSize', 'breakpoints', 'className', 'cols', 'compactType', 'containerPadding', 'debug', 'height', 'isBounded', 'isDraggable', 'isResizable', 'key', 'layouts', 'loading_state', 'margin', 'placeholder', 'placeholderBackground', 'placeholderBorder', 'placeholderBorderRadius', 'placeholderOpacity', 'rowHeight', 'style']
|
|
187
192
|
self.available_wildcard_properties = []
|
|
188
193
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
189
194
|
_locals = locals()
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# AUTO GENERATED FILE - DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
from dash.development.base_component import Component, _explicitize_args
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FefferyListenDrag(Component):
|
|
7
|
+
"""A FefferyListenDrag component.
|
|
8
|
+
拖拽事件监听组件FefferyListenDrag
|
|
9
|
+
|
|
10
|
+
Keyword arguments:
|
|
11
|
+
|
|
12
|
+
- id (string; optional):
|
|
13
|
+
组件id.
|
|
14
|
+
|
|
15
|
+
- data (boolean | number | string | dict | list; optional):
|
|
16
|
+
当前监听目标所携带的数据,配合**FefferyListenDrop**使用.
|
|
17
|
+
|
|
18
|
+
- isDragging (boolean; optional):
|
|
19
|
+
监听目标是否处于拖拽中状态.
|
|
20
|
+
|
|
21
|
+
- loading_state (dict; optional)
|
|
22
|
+
|
|
23
|
+
`loading_state` is a dict with keys:
|
|
24
|
+
|
|
25
|
+
- component_name (string; optional):
|
|
26
|
+
Holds the name of the component that is loading.
|
|
27
|
+
|
|
28
|
+
- is_loading (boolean; optional):
|
|
29
|
+
Determines if the component is loading or not.
|
|
30
|
+
|
|
31
|
+
- prop_name (string; optional):
|
|
32
|
+
Holds which property is loading.
|
|
33
|
+
|
|
34
|
+
- targetSelector (string; optional):
|
|
35
|
+
拖拽事件监听目标选择器规则字符串."""
|
|
36
|
+
_children_props = []
|
|
37
|
+
_base_nodes = ['children']
|
|
38
|
+
_namespace = 'feffery_utils_components'
|
|
39
|
+
_type = 'FefferyListenDrag'
|
|
40
|
+
@_explicitize_args
|
|
41
|
+
def __init__(self, id=Component.UNDEFINED, targetSelector=Component.UNDEFINED, data=Component.UNDEFINED, isDragging=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
42
|
+
self._prop_names = ['id', 'data', 'isDragging', 'loading_state', 'targetSelector']
|
|
43
|
+
self._valid_wildcard_attributes = []
|
|
44
|
+
self.available_properties = ['id', 'data', 'isDragging', 'loading_state', 'targetSelector']
|
|
45
|
+
self.available_wildcard_properties = []
|
|
46
|
+
_explicit_args = kwargs.pop('_explicit_args')
|
|
47
|
+
_locals = locals()
|
|
48
|
+
_locals.update(kwargs) # For wildcard attrs and excess named props
|
|
49
|
+
args = {k: _locals[k] for k in _explicit_args}
|
|
50
|
+
|
|
51
|
+
super(FefferyListenDrag, self).__init__(**args)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# AUTO GENERATED FILE - DO NOT EDIT
|
|
2
|
+
|
|
3
|
+
from dash.development.base_component import Component, _explicitize_args
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class FefferyListenDrop(Component):
|
|
7
|
+
"""A FefferyListenDrop component.
|
|
8
|
+
放置事件监听组件FefferyListenDrop
|
|
9
|
+
|
|
10
|
+
Keyword arguments:
|
|
11
|
+
|
|
12
|
+
- id (string; optional):
|
|
13
|
+
组件id.
|
|
14
|
+
|
|
15
|
+
- dropEvent (dict; optional):
|
|
16
|
+
监听最近一次基于FefferyListenDrag的元素拖拽放置事件.
|
|
17
|
+
|
|
18
|
+
`dropEvent` is a dict with keys:
|
|
19
|
+
|
|
20
|
+
- clientX (number; optional):
|
|
21
|
+
以浏览器窗口左上角为原点,记录x坐标.
|
|
22
|
+
|
|
23
|
+
- clientY (number; optional):
|
|
24
|
+
以浏览器窗口左上角为原点,记录y坐标.
|
|
25
|
+
|
|
26
|
+
- data (boolean | number | string | dict | list; optional):
|
|
27
|
+
事件携带数据.
|
|
28
|
+
|
|
29
|
+
- pageX (number; optional):
|
|
30
|
+
以页面整体左上角为原点,记录x坐标.
|
|
31
|
+
|
|
32
|
+
- pageY (number; optional):
|
|
33
|
+
以页面整体左上角为原点,记录y坐标.
|
|
34
|
+
|
|
35
|
+
- screenX (number; optional):
|
|
36
|
+
以屏幕左上角为原点,记录x坐标.
|
|
37
|
+
|
|
38
|
+
- screenY (number; optional):
|
|
39
|
+
以屏幕左上角为原点,记录y坐标.
|
|
40
|
+
|
|
41
|
+
- time (number; optional):
|
|
42
|
+
事件对应时间戳.
|
|
43
|
+
|
|
44
|
+
- hoverEvent (dict; optional):
|
|
45
|
+
监听最近一次正处于待放置鼠标悬停状态时的事件.
|
|
46
|
+
|
|
47
|
+
`hoverEvent` is a dict with keys:
|
|
48
|
+
|
|
49
|
+
- clientX (number; optional):
|
|
50
|
+
以浏览器窗口左上角为原点,记录x坐标.
|
|
51
|
+
|
|
52
|
+
- clientY (number; optional):
|
|
53
|
+
以浏览器窗口左上角为原点,记录y坐标.
|
|
54
|
+
|
|
55
|
+
- pageX (number; optional):
|
|
56
|
+
以页面整体左上角为原点,记录x坐标.
|
|
57
|
+
|
|
58
|
+
- pageY (number; optional):
|
|
59
|
+
以页面整体左上角为原点,记录y坐标.
|
|
60
|
+
|
|
61
|
+
- screenX (number; optional):
|
|
62
|
+
以屏幕左上角为原点,记录x坐标.
|
|
63
|
+
|
|
64
|
+
- screenY (number; optional):
|
|
65
|
+
以屏幕左上角为原点,记录y坐标.
|
|
66
|
+
|
|
67
|
+
- time (number; optional):
|
|
68
|
+
事件对应时间戳.
|
|
69
|
+
|
|
70
|
+
- isHovering (boolean; optional):
|
|
71
|
+
监听放置事件监听目标容器是否正处于待放置鼠标悬停状态.
|
|
72
|
+
|
|
73
|
+
- loading_state (dict; optional)
|
|
74
|
+
|
|
75
|
+
`loading_state` is a dict with keys:
|
|
76
|
+
|
|
77
|
+
- component_name (string; optional):
|
|
78
|
+
Holds the name of the component that is loading.
|
|
79
|
+
|
|
80
|
+
- is_loading (boolean; optional):
|
|
81
|
+
Determines if the component is loading or not.
|
|
82
|
+
|
|
83
|
+
- prop_name (string; optional):
|
|
84
|
+
Holds which property is loading.
|
|
85
|
+
|
|
86
|
+
- targetSelector (string; optional):
|
|
87
|
+
放置事件监听目标容器选择器规则字符串."""
|
|
88
|
+
_children_props = []
|
|
89
|
+
_base_nodes = ['children']
|
|
90
|
+
_namespace = 'feffery_utils_components'
|
|
91
|
+
_type = 'FefferyListenDrop'
|
|
92
|
+
@_explicitize_args
|
|
93
|
+
def __init__(self, id=Component.UNDEFINED, targetSelector=Component.UNDEFINED, dropEvent=Component.UNDEFINED, isHovering=Component.UNDEFINED, hoverEvent=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
94
|
+
self._prop_names = ['id', 'dropEvent', 'hoverEvent', 'isHovering', 'loading_state', 'targetSelector']
|
|
95
|
+
self._valid_wildcard_attributes = []
|
|
96
|
+
self.available_properties = ['id', 'dropEvent', 'hoverEvent', 'isHovering', 'loading_state', 'targetSelector']
|
|
97
|
+
self.available_wildcard_properties = []
|
|
98
|
+
_explicit_args = kwargs.pop('_explicit_args')
|
|
99
|
+
_locals = locals()
|
|
100
|
+
_locals.update(kwargs) # For wildcard attrs and excess named props
|
|
101
|
+
args = {k: _locals[k] for k in _explicit_args}
|
|
102
|
+
|
|
103
|
+
super(FefferyListenDrop, self).__init__(**args)
|
|
@@ -82,6 +82,8 @@ from .FefferyGeolocation import FefferyGeolocation
|
|
|
82
82
|
from .FefferyIdle import FefferyIdle
|
|
83
83
|
from .FefferyInViewport import FefferyInViewport
|
|
84
84
|
from .FefferyKeyPress import FefferyKeyPress
|
|
85
|
+
from .FefferyListenDrag import FefferyListenDrag
|
|
86
|
+
from .FefferyListenDrop import FefferyListenDrop
|
|
85
87
|
from .FefferyListenElementSize import FefferyListenElementSize
|
|
86
88
|
from .FefferyListenHover import FefferyListenHover
|
|
87
89
|
from .FefferyListenPaste import FefferyListenPaste
|
|
@@ -198,6 +200,8 @@ __all__ = [
|
|
|
198
200
|
"FefferyIdle",
|
|
199
201
|
"FefferyInViewport",
|
|
200
202
|
"FefferyKeyPress",
|
|
203
|
+
"FefferyListenDrag",
|
|
204
|
+
"FefferyListenDrop",
|
|
201
205
|
"FefferyListenElementSize",
|
|
202
206
|
"FefferyListenHover",
|
|
203
207
|
"FefferyListenPaste",
|