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.
Files changed (55) hide show
  1. package/DESCRIPTION +1 -1
  2. package/NAMESPACE +2 -0
  3. package/Project.toml +1 -1
  4. package/README.md +1 -1
  5. package/feffery_utils_components/FefferyGrid.py +13 -8
  6. package/feffery_utils_components/FefferyListenDrag.py +51 -0
  7. package/feffery_utils_components/FefferyListenDrop.py +103 -0
  8. package/feffery_utils_components/_imports_.py +4 -0
  9. package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
  10. package/feffery_utils_components/async-feffery_animated_3d_background_three.js +1 -1
  11. package/feffery_utils_components/async-feffery_animated_image.js +1 -1
  12. package/feffery_utils_components/async-feffery_aplayer.js +1 -1
  13. package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
  14. package/feffery_utils_components/async-feffery_auto_fit.js +2 -2
  15. package/feffery_utils_components/async-feffery_burger.js +1 -1
  16. package/feffery_utils_components/async-feffery_captcha.js +1 -1
  17. package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
  18. package/feffery_utils_components/async-feffery_dom2image.js +2 -2
  19. package/feffery_utils_components/async-feffery_dplayer.js +1 -1
  20. package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
  21. package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
  22. package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
  23. package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
  24. package/feffery_utils_components/async-feffery_grid.js +1 -1
  25. package/feffery_utils_components/async-feffery_http_requests.js +1 -1
  26. package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
  27. package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
  28. package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
  29. package/feffery_utils_components/async-feffery_markdown_editor.js +2 -2
  30. package/feffery_utils_components/async-feffery_motion.js +1 -1
  31. package/feffery_utils_components/async-feffery_music_player.js +1 -1
  32. package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
  33. package/feffery_utils_components/async-feffery_photo_sphere_viewer.js.LICENSE.txt +8 -2
  34. package/feffery_utils_components/async-feffery_resizable.js +1 -1
  35. package/feffery_utils_components/async-feffery_rich_text_editor.js +3 -3
  36. package/feffery_utils_components/async-feffery_rnd.js +1 -1
  37. package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
  38. package/feffery_utils_components/async-feffery_shortcut_panel.js +16 -16
  39. package/feffery_utils_components/async-feffery_slider_captcha.js +1 -1
  40. package/feffery_utils_components/async-feffery_sortable.js +1 -1
  41. package/feffery_utils_components/async-feffery_vditor.js +1 -1
  42. package/feffery_utils_components/async-feffery_word_preview.js +1 -1
  43. package/feffery_utils_components/async-fuc-shared.js +15 -15
  44. package/feffery_utils_components/feffery_utils_components.min.js +7 -7
  45. package/feffery_utils_components/metadata.json +228 -3
  46. package/feffery_utils_components/package-info.json +1 -1
  47. package/package.json +1 -1
  48. package/src/lib/components/draggable/FefferyGrid.react.js +12 -1
  49. package/src/lib/components/listeners/FefferyListenDrag.react.js +83 -0
  50. package/src/lib/components/listeners/FefferyListenDrop.react.js +177 -0
  51. package/src/lib/components/styles.css +126 -124
  52. package/src/lib/fragments/draggable/FefferyGrid.react.js +112 -107
  53. package/src/lib/index.js +5 -1
  54. package/usage.py +61 -12
  55. package/.vscode/settings.json +0 -11
package/DESCRIPTION CHANGED
@@ -1,6 +1,6 @@
1
1
  Package: fefferyUtilsComponents
2
2
  Title: Build more utility components for Plotly Dash.
3
- Version: 0.2.0-rc20
3
+ Version: 0.2.0-rc22
4
4
  Description: Build more utility components for Plotly Dash.
5
5
  Depends: R (>= 3.0.2)
6
6
  Imports:
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
@@ -2,7 +2,7 @@
2
2
  name = "FefferyUtilsComponents"
3
3
  uuid = "1b08a953-4be3-4667-9a23-209fcf3199fa"
4
4
  authors = ["CNFeffery <fefferypzy@gmail.com>"]
5
- version = "0.2.0-rc20"
5
+ version = "0.2.0-rc22"
6
6
 
7
7
  [deps]
8
8
  Dash = "1b08a953-4be3-4667-9a23-3db579824955"
package/README.md CHANGED
@@ -22,7 +22,7 @@ pip install feffery-utils-components -U
22
22
  ## 2 最新预发布版本安装方式
23
23
 
24
24
  > [!NOTE]
25
- > 最新预发布版本(2024-06-10):`0.2.0rc19`
25
+ > 最新预发布版本(2024-07-23):`0.2.0rc21`
26
26
 
27
27
  ```bash
28
28
  pip install feffery-utils-components --pre -U
@@ -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
- _children_props = []
179
- _base_nodes = ['children']
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",