feffery_utils_components 0.2.0-rc26 → 0.2.0-rc27
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/README.md +1 -1
- package/feffery_utils_components/FefferyDiv.py +16 -5
- package/feffery_utils_components/FefferyWebNotification.py +51 -0
- package/feffery_utils_components/_imports_.py +2 -0
- package/feffery_utils_components/alias.py +2 -0
- package/feffery_utils_components/feffery_utils_components.min.js +2 -2
- package/feffery_utils_components/metadata.json +1 -1
- package/feffery_utils_components/package-info.json +2 -2
- package/package.json +2 -2
- package/src/lib/components/communication/FefferyPostEventSource.react.js +2 -1
- package/src/lib/components/container/FefferyDiv.react.js +30 -2
- package/src/lib/components/feedback/FefferyWebNotification.react.js +78 -0
- package/src/lib/index.js +2 -0
- package/tests/FefferyDiv/feat_paste.py +38 -0
- package/tests/FefferyPostEventSource/fix_extra_request.py +22 -0
- package/tests/FefferyWebNotification/feat.py +35 -0
package/DESCRIPTION
CHANGED
package/NAMESPACE
CHANGED
package/Project.toml
CHANGED
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ Keyword arguments:
|
|
|
24
24
|
- className (string | dict; optional):
|
|
25
25
|
当前组件css类名.
|
|
26
26
|
|
|
27
|
-
- enableEvents (list of a value equal to: 'click', 'dbclick', 'size', 'mouseenter', 'mouseleave', 'contextmenu', 'hover', 'touch', 'clickaway', 'position', 'focus's; default ['click', 'dbclick']):
|
|
27
|
+
- enableEvents (list of a value equal to: 'click', 'dbclick', 'size', 'mouseenter', 'mouseleave', 'contextmenu', 'hover', 'touch', 'clickaway', 'position', 'focus', 'paste's; default ['click', 'dbclick']):
|
|
28
28
|
控制要开启的事件监听类型数组,可选项有`'click'`(单击事件)、`'dbclick'`(双击事件)、`'size'`(尺寸变化事件)、
|
|
29
29
|
`'mouseenter'`(鼠标移入事件),`'mouseleave'`(鼠标移出事件)、`'contextmenu'`(鼠标右键点击事件)、
|
|
30
30
|
`'hover'`(鼠标悬停事件)、`'touch'`(移动端触碰事件)、`'clickaway'`(元素外点击事件)、`'position'`(左上角坐标位置变化事件)、
|
|
31
|
-
`'focus'
|
|
31
|
+
`'focus'`(聚焦状态切换事件)、`'paste'`(文本粘贴事件) 默认值:`['click', 'dbclick']`.
|
|
32
32
|
|
|
33
33
|
- _width (number; optional):
|
|
34
34
|
监听容器当前像素宽度值.
|
|
@@ -161,6 +161,17 @@ Keyword arguments:
|
|
|
161
161
|
- isFocused (boolean; optional):
|
|
162
162
|
监听或设置当前元素是否聚焦中.
|
|
163
163
|
|
|
164
|
+
- pasteEvent (dict; optional):
|
|
165
|
+
监听文本粘贴事件.
|
|
166
|
+
|
|
167
|
+
`pasteEvent` is a dict with keys:
|
|
168
|
+
|
|
169
|
+
- text (string; optional):
|
|
170
|
+
已粘贴文本内容.
|
|
171
|
+
|
|
172
|
+
- timestamp (number; optional):
|
|
173
|
+
粘贴事件对应的时间戳.
|
|
174
|
+
|
|
164
175
|
- wheelEventStrategy (a value equal to: 'default', 'internally-only'; default 'default'):
|
|
165
176
|
设置当前组件内部处理鼠标滑轮事件的策略,可选项有`'default'`、`'internally-only'`(不向外传递)
|
|
166
177
|
默认值:`'default'.
|
|
@@ -211,10 +222,10 @@ Keyword arguments:
|
|
|
211
222
|
_namespace = 'feffery_utils_components'
|
|
212
223
|
_type = 'FefferyDiv'
|
|
213
224
|
@_explicitize_args
|
|
214
|
-
def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, enableEvents=Component.UNDEFINED, _width=Component.UNDEFINED, _height=Component.UNDEFINED, debounceWait=Component.UNDEFINED, mouseEnterCount=Component.UNDEFINED, mouseLeaveCount=Component.UNDEFINED, nClicks=Component.UNDEFINED, clickEvent=Component.UNDEFINED, nDoubleClicks=Component.UNDEFINED, doubleClickEvent=Component.UNDEFINED, enableListenContextMenu=Component.UNDEFINED, contextMenuEvent=Component.UNDEFINED, isHovering=Component.UNDEFINED, isTouching=Component.UNDEFINED, enableClickAway=Component.UNDEFINED, clickAwayCount=Component.UNDEFINED, position=Component.UNDEFINED, enableFocus=Component.UNDEFINED, isFocused=Component.UNDEFINED, wheelEventStrategy=Component.UNDEFINED, shadow=Component.UNDEFINED, scrollbar=Component.UNDEFINED, textAlign=Component.UNDEFINED, justify=Component.UNDEFINED, align=Component.UNDEFINED, padding=Component.UNDEFINED, margin=Component.UNDEFINED, border=Component.UNDEFINED, borderRadius=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
215
|
-
self._prop_names = ['id', 'key', 'children', 'style', 'className', 'enableEvents', '_width', '_height', 'debounceWait', 'mouseEnterCount', 'mouseLeaveCount', 'nClicks', 'clickEvent', 'nDoubleClicks', 'doubleClickEvent', 'enableListenContextMenu', 'contextMenuEvent', 'isHovering', 'isTouching', 'enableClickAway', 'clickAwayCount', 'position', 'enableFocus', 'isFocused', 'wheelEventStrategy', 'shadow', 'scrollbar', 'textAlign', 'justify', 'align', 'padding', 'margin', 'border', 'borderRadius', 'loading_state']
|
|
225
|
+
def __init__(self, children=None, id=Component.UNDEFINED, key=Component.UNDEFINED, style=Component.UNDEFINED, className=Component.UNDEFINED, enableEvents=Component.UNDEFINED, _width=Component.UNDEFINED, _height=Component.UNDEFINED, debounceWait=Component.UNDEFINED, mouseEnterCount=Component.UNDEFINED, mouseLeaveCount=Component.UNDEFINED, nClicks=Component.UNDEFINED, clickEvent=Component.UNDEFINED, nDoubleClicks=Component.UNDEFINED, doubleClickEvent=Component.UNDEFINED, enableListenContextMenu=Component.UNDEFINED, contextMenuEvent=Component.UNDEFINED, isHovering=Component.UNDEFINED, isTouching=Component.UNDEFINED, enableClickAway=Component.UNDEFINED, clickAwayCount=Component.UNDEFINED, position=Component.UNDEFINED, enableFocus=Component.UNDEFINED, isFocused=Component.UNDEFINED, pasteEvent=Component.UNDEFINED, wheelEventStrategy=Component.UNDEFINED, shadow=Component.UNDEFINED, scrollbar=Component.UNDEFINED, textAlign=Component.UNDEFINED, justify=Component.UNDEFINED, align=Component.UNDEFINED, padding=Component.UNDEFINED, margin=Component.UNDEFINED, border=Component.UNDEFINED, borderRadius=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
226
|
+
self._prop_names = ['id', 'key', 'children', 'style', 'className', 'enableEvents', '_width', '_height', 'debounceWait', 'mouseEnterCount', 'mouseLeaveCount', 'nClicks', 'clickEvent', 'nDoubleClicks', 'doubleClickEvent', 'enableListenContextMenu', 'contextMenuEvent', 'isHovering', 'isTouching', 'enableClickAway', 'clickAwayCount', 'position', 'enableFocus', 'isFocused', 'pasteEvent', 'wheelEventStrategy', 'shadow', 'scrollbar', 'textAlign', 'justify', 'align', 'padding', 'margin', 'border', 'borderRadius', 'loading_state']
|
|
216
227
|
self._valid_wildcard_attributes = []
|
|
217
|
-
self.available_properties = ['id', 'key', 'children', 'style', 'className', 'enableEvents', '_width', '_height', 'debounceWait', 'mouseEnterCount', 'mouseLeaveCount', 'nClicks', 'clickEvent', 'nDoubleClicks', 'doubleClickEvent', 'enableListenContextMenu', 'contextMenuEvent', 'isHovering', 'isTouching', 'enableClickAway', 'clickAwayCount', 'position', 'enableFocus', 'isFocused', 'wheelEventStrategy', 'shadow', 'scrollbar', 'textAlign', 'justify', 'align', 'padding', 'margin', 'border', 'borderRadius', 'loading_state']
|
|
228
|
+
self.available_properties = ['id', 'key', 'children', 'style', 'className', 'enableEvents', '_width', '_height', 'debounceWait', 'mouseEnterCount', 'mouseLeaveCount', 'nClicks', 'clickEvent', 'nDoubleClicks', 'doubleClickEvent', 'enableListenContextMenu', 'contextMenuEvent', 'isHovering', 'isTouching', 'enableClickAway', 'clickAwayCount', 'position', 'enableFocus', 'isFocused', 'pasteEvent', 'wheelEventStrategy', 'shadow', 'scrollbar', 'textAlign', 'justify', 'align', 'padding', 'margin', 'border', 'borderRadius', 'loading_state']
|
|
218
229
|
self.available_wildcard_properties = []
|
|
219
230
|
_explicit_args = kwargs.pop('_explicit_args')
|
|
220
231
|
_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 FefferyWebNotification(Component):
|
|
7
|
+
"""A FefferyWebNotification component.
|
|
8
|
+
web通知组件FefferyWebNotification
|
|
9
|
+
|
|
10
|
+
Keyword arguments:
|
|
11
|
+
|
|
12
|
+
- id (string; optional):
|
|
13
|
+
组件唯一id.
|
|
14
|
+
|
|
15
|
+
- key (string; optional):
|
|
16
|
+
对当前组件的`key`值进行更新,可实现强制重绘当前组件的效果.
|
|
17
|
+
|
|
18
|
+
- message (string; optional):
|
|
19
|
+
设置要发送的信息内容,每次成功发送后都会重置为空.
|
|
20
|
+
|
|
21
|
+
- isSupported (boolean; optional):
|
|
22
|
+
监听用户浏览器中是否支持web通知.
|
|
23
|
+
|
|
24
|
+
- loading_state (dict; optional)
|
|
25
|
+
|
|
26
|
+
`loading_state` is a dict with keys:
|
|
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
|
+
- component_name (string; optional):
|
|
35
|
+
Holds the name of the component that is loading."""
|
|
36
|
+
_children_props = []
|
|
37
|
+
_base_nodes = ['children']
|
|
38
|
+
_namespace = 'feffery_utils_components'
|
|
39
|
+
_type = 'FefferyWebNotification'
|
|
40
|
+
@_explicitize_args
|
|
41
|
+
def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, message=Component.UNDEFINED, isSupported=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
42
|
+
self._prop_names = ['id', 'key', 'message', 'isSupported', 'loading_state']
|
|
43
|
+
self._valid_wildcard_attributes = []
|
|
44
|
+
self.available_properties = ['id', 'key', 'message', 'isSupported', 'loading_state']
|
|
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(FefferyWebNotification, self).__init__(**args)
|
|
@@ -55,6 +55,7 @@ from .FefferyRichTextEditor import FefferyRichTextEditor
|
|
|
55
55
|
from .FefferyVditor import FefferyVditor
|
|
56
56
|
from .FefferyFancyMessage import FefferyFancyMessage
|
|
57
57
|
from .FefferyFancyNotification import FefferyFancyNotification
|
|
58
|
+
from .FefferyWebNotification import FefferyWebNotification
|
|
58
59
|
from .FefferyExcelPreview import FefferyExcelPreview
|
|
59
60
|
from .FefferyWordPreview import FefferyWordPreview
|
|
60
61
|
from .FefferyBurger import FefferyBurger
|
|
@@ -179,6 +180,7 @@ __all__ = [
|
|
|
179
180
|
"FefferyVditor",
|
|
180
181
|
"FefferyFancyMessage",
|
|
181
182
|
"FefferyFancyNotification",
|
|
183
|
+
"FefferyWebNotification",
|
|
182
184
|
"FefferyExcelPreview",
|
|
183
185
|
"FefferyWordPreview",
|
|
184
186
|
"FefferyBurger",
|
|
@@ -54,6 +54,7 @@ from .FefferyRichTextEditor import FefferyRichTextEditor as RichTextEditor
|
|
|
54
54
|
from .FefferyVditor import FefferyVditor as Vditor
|
|
55
55
|
from .FefferyFancyMessage import FefferyFancyMessage as FancyMessage
|
|
56
56
|
from .FefferyFancyNotification import FefferyFancyNotification as FancyNotification
|
|
57
|
+
from .FefferyWebNotification import FefferyWebNotification as WebNotification
|
|
57
58
|
from .FefferyExcelPreview import FefferyExcelPreview as ExcelPreview
|
|
58
59
|
from .FefferyWordPreview import FefferyWordPreview as WordPreview
|
|
59
60
|
from .FefferyBurger import FefferyBurger as Burger
|
|
@@ -177,6 +178,7 @@ __all__ = [
|
|
|
177
178
|
"Vditor",
|
|
178
179
|
"FancyMessage",
|
|
179
180
|
"FancyNotification",
|
|
181
|
+
"WebNotification",
|
|
180
182
|
"ExcelPreview",
|
|
181
183
|
"WordPreview",
|
|
182
184
|
"Burger",
|