feffery_utils_components 0.1.13 → 0.1.15

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 (38) hide show
  1. package/DESCRIPTION +1 -1
  2. package/NAMESPACE +1 -0
  3. package/Project.toml +1 -1
  4. package/build/lib/feffery_utils_components/FefferyImagePaste.py +53 -0
  5. package/build/lib/feffery_utils_components/FefferyShortcutPanel.py +21 -10
  6. package/build/lib/feffery_utils_components/_imports_.py +2 -0
  7. package/build/lib/feffery_utils_components/feffery_utils_components.min.js +6 -6
  8. package/build/lib/feffery_utils_components/metadata.json +118 -21
  9. package/build/lib/feffery_utils_components/package-info.json +1 -1
  10. package/feffery_utils_components/FefferyImagePaste.py +53 -0
  11. package/feffery_utils_components/FefferyShortcutPanel.py +21 -10
  12. package/feffery_utils_components/_imports_.py +2 -0
  13. package/feffery_utils_components/feffery_utils_components.min.js +6 -6
  14. package/feffery_utils_components/metadata.json +118 -21
  15. package/feffery_utils_components/package-info.json +1 -1
  16. package/package.json +1 -1
  17. package/src/FefferyUtilsComponents.jl +4 -3
  18. package/src/jl/''_fefferyimagepaste.jl +29 -0
  19. package/src/jl/''_fefferyshortcutpanel.jl +8 -5
  20. package/src/lib/components/FefferyImagePaste.react.js +117 -0
  21. package/src/lib/components/FefferyShortcutPanel.react.js +106 -69
  22. package/src/lib/components/colorPickers/FefferyBlockColorPicker.react.js +1 -1
  23. package/src/lib/components/colorPickers/FefferyCircleColorPicker.react.js +1 -1
  24. package/src/lib/components/colorPickers/FefferyGithubColorPicker.react.js +1 -1
  25. package/src/lib/components/colorPickers/FefferyTwitterColorPicker.react.js +1 -1
  26. package/src/lib/components/styles.css +9 -0
  27. package/src/lib/index.js +3 -1
  28. package/src/lib/utils/gluejar/LICENSE +21 -0
  29. package/src/lib/utils/gluejar/Readme.md +58 -0
  30. package/src/lib/utils/gluejar/dist/index.d.ts +32 -0
  31. package/src/lib/utils/gluejar/dist/index.js +92 -0
  32. package/src/lib/utils/gluejar/dist/index.js.map +1 -0
  33. package/src/lib/utils/gluejar/package.json +53 -0
  34. package/src/lib/utils/gluejar/src/index.tsx +98 -0
  35. package/src/lib/utils/gluejar/tsconfig.json +21 -0
  36. package/tests/ImagePasteTest/app.py +58 -0
  37. package/tests/ShortcutPanelTest/app.py +32 -0
  38. package/src/lib/utils/react-json-view/.github/workflows/ci-tests.yml +0 -25
package/DESCRIPTION CHANGED
@@ -1,6 +1,6 @@
1
1
  Package: fefferyUtilsComponents
2
2
  Title: Build more utility components for Plotly Dash.
3
- Version: 0.1.13
3
+ Version: 0.1.15
4
4
  Description: Build more utility components for Plotly Dash.
5
5
  Depends: R (>= 3.0.2)
6
6
  Imports:
package/NAMESPACE CHANGED
@@ -23,6 +23,7 @@ export(''FefferyFancyMessage)
23
23
  export(''FefferyFancyNotification)
24
24
  export(''FefferyGuide)
25
25
  export(''FefferyHighlightWords)
26
+ export(''FefferyImagePaste)
26
27
  export(''FefferyJsonViewer)
27
28
  export(''FefferyLazyLoad)
28
29
  export(''FefferyLazyLoadImage)
package/Project.toml CHANGED
@@ -2,7 +2,7 @@
2
2
  name = "FefferyUtilsComponents"
3
3
  uuid = "1b08a953-4be3-4667-9a23-ea89cd6d0d23"
4
4
  authors = ["CNFeffery <fefferypzy@gmail.com>"]
5
- version = "0.1.13"
5
+ version = "0.1.15"
6
6
 
7
7
  [deps]
8
8
  Dash = "1b08a953-4be3-4667-9a23-3db579824955"
@@ -0,0 +1,53 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ from dash.development.base_component import Component, _explicitize_args
4
+
5
+
6
+ class FefferyImagePaste(Component):
7
+ """A FefferyImagePaste component.
8
+
9
+
10
+ Keyword arguments:
11
+
12
+ - id (string; optional)
13
+
14
+ - disabled (boolean; default False)
15
+
16
+ - imageInfo (dict; optional)
17
+
18
+ `imageInfo` is a dict with keys:
19
+
20
+ - base64 (string; optional)
21
+
22
+ - timestamp (number; optional)
23
+
24
+ - key (string; optional)
25
+
26
+ - loading_state (dict; optional)
27
+
28
+ `loading_state` is a dict with keys:
29
+
30
+ - component_name (string; optional):
31
+ Holds the name of the component that is loading.
32
+
33
+ - is_loading (boolean; optional):
34
+ Determines if the component is loading or not.
35
+
36
+ - prop_name (string; optional):
37
+ Holds which property is loading."""
38
+ _children_props = []
39
+ _base_nodes = ['children']
40
+ _namespace = 'feffery_utils_components'
41
+ _type = 'FefferyImagePaste'
42
+ @_explicitize_args
43
+ def __init__(self, id=Component.UNDEFINED, key=Component.UNDEFINED, imageInfo=Component.UNDEFINED, disabled=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
44
+ self._prop_names = ['id', 'disabled', 'imageInfo', 'key', 'loading_state']
45
+ self._valid_wildcard_attributes = []
46
+ self.available_properties = ['id', 'disabled', 'imageInfo', 'key', 'loading_state']
47
+ self.available_wildcard_properties = []
48
+ _explicit_args = kwargs.pop('_explicit_args')
49
+ _locals = locals()
50
+ _locals.update(kwargs) # For wildcard attrs and excess named props
51
+ args = {k: _locals[k] for k in _explicit_args}
52
+
53
+ super(FefferyImagePaste, self).__init__(**args)
@@ -11,7 +11,9 @@ Keyword arguments:
11
11
 
12
12
  - id (string; optional)
13
13
 
14
- - data (list of dicts; optional)
14
+ - close (boolean; default False)
15
+
16
+ - data (list of dicts; required)
15
17
 
16
18
  `data` is a list of dicts with keys:
17
19
 
@@ -31,8 +33,6 @@ Keyword arguments:
31
33
 
32
34
  - title (string; required)
33
35
 
34
- - disableHotkeys (boolean; optional)
35
-
36
36
  - loading_state (dict; optional)
37
37
 
38
38
  `loading_state` is a dict with keys:
@@ -48,28 +48,39 @@ Keyword arguments:
48
48
 
49
49
  - locale (a value equal to: 'en', 'zh'; default 'zh')
50
50
 
51
- - openHotkey (string; optional)
51
+ - open (boolean; default False)
52
52
 
53
- - placeholder (string; optional)
53
+ - openHotkey (string; default 'cmd+k,ctrl+k')
54
54
 
55
- - style (dict; optional)
55
+ - placeholder (string; optional)
56
56
 
57
57
  - theme (a value equal to: 'light', 'dark'; default 'light')
58
58
 
59
- - triggeredHotkey (string; optional)"""
59
+ - triggeredHotkey (dict; optional)
60
+
61
+ `triggeredHotkey` is a dict with keys:
62
+
63
+ - id (string; optional)
64
+
65
+ - timestamp (number; optional)"""
60
66
  _children_props = []
61
67
  _base_nodes = ['children']
62
68
  _namespace = 'feffery_utils_components'
63
69
  _type = 'FefferyShortcutPanel'
64
70
  @_explicitize_args
65
- def __init__(self, id=Component.UNDEFINED, style=Component.UNDEFINED, locale=Component.UNDEFINED, data=Component.UNDEFINED, triggeredHotkey=Component.UNDEFINED, placeholder=Component.UNDEFINED, disableHotkeys=Component.UNDEFINED, openHotkey=Component.UNDEFINED, theme=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
66
- self._prop_names = ['id', 'data', 'disableHotkeys', 'loading_state', 'locale', 'openHotkey', 'placeholder', 'style', 'theme', 'triggeredHotkey']
71
+ def __init__(self, id=Component.UNDEFINED, locale=Component.UNDEFINED, data=Component.REQUIRED, triggeredHotkey=Component.UNDEFINED, placeholder=Component.UNDEFINED, openHotkey=Component.UNDEFINED, theme=Component.UNDEFINED, open=Component.UNDEFINED, close=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
72
+ self._prop_names = ['id', 'close', 'data', 'loading_state', 'locale', 'open', 'openHotkey', 'placeholder', 'theme', 'triggeredHotkey']
67
73
  self._valid_wildcard_attributes = []
68
- self.available_properties = ['id', 'data', 'disableHotkeys', 'loading_state', 'locale', 'openHotkey', 'placeholder', 'style', 'theme', 'triggeredHotkey']
74
+ self.available_properties = ['id', 'close', 'data', 'loading_state', 'locale', 'open', 'openHotkey', 'placeholder', 'theme', 'triggeredHotkey']
69
75
  self.available_wildcard_properties = []
70
76
  _explicit_args = kwargs.pop('_explicit_args')
71
77
  _locals = locals()
72
78
  _locals.update(kwargs) # For wildcard attrs and excess named props
73
79
  args = {k: _locals[k] for k in _explicit_args}
74
80
 
81
+ for k in ['data']:
82
+ if k not in args:
83
+ raise TypeError(
84
+ 'Required argument `' + k + '` was not specified.')
85
+
75
86
  super(FefferyShortcutPanel, self).__init__(**args)
@@ -21,6 +21,7 @@ from .FefferyFancyMessage import FefferyFancyMessage
21
21
  from .FefferyFancyNotification import FefferyFancyNotification
22
22
  from .FefferyGuide import FefferyGuide
23
23
  from .FefferyHighlightWords import FefferyHighlightWords
24
+ from .FefferyImagePaste import FefferyImagePaste
24
25
  from .FefferyJsonViewer import FefferyJsonViewer
25
26
  from .FefferyLazyLoad import FefferyLazyLoad
26
27
  from .FefferyLazyLoadImage import FefferyLazyLoadImage
@@ -76,6 +77,7 @@ __all__ = [
76
77
  "FefferyFancyNotification",
77
78
  "FefferyGuide",
78
79
  "FefferyHighlightWords",
80
+ "FefferyImagePaste",
79
81
  "FefferyJsonViewer",
80
82
  "FefferyLazyLoad",
81
83
  "FefferyLazyLoadImage",