feffery_utils_components 0.0.7 → 0.0.8

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 (36) hide show
  1. package/DESCRIPTION +1 -1
  2. package/NAMESPACE +6 -1
  3. package/Project.toml +2 -2
  4. package/build/lib/feffery_utils_components/FefferyShortcutPanel.py +53 -0
  5. package/build/lib/feffery_utils_components/_imports_.py +2 -0
  6. package/build/lib/feffery_utils_components/feffery_utils_components.min.js +404 -1
  7. package/build/lib/feffery_utils_components/metadata.json +111 -0
  8. package/build/lib/feffery_utils_components/package-info.json +2 -1
  9. package/feffery_utils_components/FefferyDashboard.py +39 -0
  10. package/feffery_utils_components/FefferyGuide.py +69 -0
  11. package/feffery_utils_components/FefferyResizable.py +39 -0
  12. package/feffery_utils_components/FefferyShortcutPanel.py +4 -6
  13. package/feffery_utils_components/FefferySplit.py +59 -0
  14. package/feffery_utils_components/FefferySplitPane.py +48 -0
  15. package/feffery_utils_components/_imports_.py +7 -1
  16. package/feffery_utils_components/feffery_utils_components.min.js +6 -6
  17. package/feffery_utils_components/metadata.json +374 -10
  18. package/feffery_utils_components/package-info.json +6 -2
  19. package/package.json +6 -2
  20. package/src/FefferyUtilsComponents.jl +6 -3
  21. package/src/jl/''_fefferydashboard.jl +23 -0
  22. package/src/jl/''_fefferyguide.jl +38 -0
  23. package/src/jl/''_fefferyresizable.jl +23 -0
  24. package/src/jl/''_fefferyshortcutpanel.jl +1 -2
  25. package/src/jl/''_fefferysplit.jl +39 -0
  26. package/src/jl/''_fefferysplitpane.jl +32 -0
  27. package/src/lib/components/FefferyExecuteJs.react.js +45 -0
  28. package/src/lib/components/FefferyGuide.react.js +174 -0
  29. package/src/lib/components/FefferyShortcutPanel.react.js +5 -9
  30. package/src/lib/components/split/FefferySplit.react.js +199 -0
  31. package/src/lib/components/split/FefferySplitPane.react.js +75 -0
  32. package/src/lib/components/styles.css +31 -1
  33. package/src/lib/index.js +9 -1
  34. package/usage.py +94 -2
  35. package/webpack.config.js +2 -0
  36. package/feffery_utils_components/feffery_utils_components.min.js.LICENSE.txt +0 -102
package/usage.py CHANGED
@@ -2,6 +2,7 @@ import feffery_utils_components as fuc
2
2
  import dash
3
3
  from dash.dependencies import Input, Output, State
4
4
  from dash import html
5
+ import uuid
5
6
 
6
7
  app = dash.Dash(__name__)
7
8
 
@@ -9,9 +10,99 @@ app = dash.Dash(__name__)
9
10
  app.layout = html.Div(
10
11
  fuc.FefferyTopProgress(
11
12
  [
13
+
14
+ fuc.FefferySplit(
15
+ [
16
+ fuc.FefferySplitPane(
17
+ fuc.FefferySplit(
18
+ [
19
+ fuc.FefferySplitPane(
20
+ html.Div(
21
+ 'a',
22
+ style={
23
+ 'width': '100px',
24
+ 'height': '100px',
25
+ 'border': '1px solid red'
26
+ }
27
+ )
28
+ ),
29
+ fuc.FefferySplitPane('b'),
30
+ fuc.FefferySplitPane('c'),
31
+ ],
32
+ # defaultSizes=[20, 40, 40],
33
+ minSize=20,
34
+ gutterSize=3,
35
+ # dragInterval=1,
36
+ # direction='vertical',
37
+ style={
38
+ 'height': '100%'
39
+ }
40
+ ),
41
+ style={
42
+ 'height': '100%'
43
+ }
44
+ ),
45
+ fuc.FefferySplitPane('b'),
46
+ fuc.FefferySplitPane('c'),
47
+ ],
48
+ # defaultSizes=[20, 40, 40],
49
+ minSize=20,
50
+ gutterSize=3,
51
+ # dragInterval=1,
52
+ direction='vertical',
53
+ style={
54
+ 'height': '400px',
55
+ # 'border': '1px dashed black'
56
+ }
57
+ ),
58
+
59
+ fuc.FefferyGuide(
60
+ steps=[
61
+ {
62
+ 'selector': '#step1',
63
+ 'title': '第1步',
64
+ 'content': '这是第1步balabalabalabala'
65
+ },
66
+ {
67
+ 'selector': '#step2',
68
+ 'placement': 'left-bottom',
69
+ 'title': '第2步',
70
+ 'content': '这是第2步balabalabalabala'
71
+ },
72
+ {
73
+ 'selector': '#step3',
74
+ 'title': '第3步',
75
+ 'content': '这是第3步balabalabalabala'
76
+ },
77
+ {
78
+ 'selector': '#test',
79
+ 'title': '第4步',
80
+ 'content': '这是第4步balabalabalabala'
81
+ },
82
+ {
83
+ 'selector': '#syntax-highlighter-demo',
84
+ 'title': '第5步',
85
+ 'content': '这是第5步balabalabalabala'
86
+ }
87
+ ],
88
+ localKey=str(uuid.uuid4()),
89
+ # hotspot=True,
90
+ showPreviousBtn=True,
91
+ closable=True,
92
+ # step=-1
93
+ ),
94
+
95
+ html.H2('节点1', id='step1', style={'marginBottom': '200px'}),
96
+
97
+ html.H2('节点2', id='step2', style={
98
+ 'float': 'right', 'marginBottom': '200px'}),
99
+ html.Hr(),
100
+
101
+ html.H2('节点3', id='step3', style={'marginBottom': '200px'}),
102
+
12
103
  fuc.FefferyShortcutPanel(
13
104
  id='shortcut-panel-demo',
14
- locale='cn',
105
+ locale='zh',
15
106
  placeholder='搜索热键功能...',
16
107
  theme='dark',
17
108
  data=[
@@ -57,7 +148,6 @@ app.layout = html.Div(
57
148
  ),
58
149
  html.Div(id='test-output'),
59
150
 
60
-
61
151
  fuc.FefferyCaptcha(id='captcha-demo',
62
152
  charNum=10,
63
153
  width=300,
@@ -73,6 +163,7 @@ app.layout = html.Div(
73
163
  ),
74
164
 
75
165
  fuc.FefferySyntaxHighlighter(
166
+ id='syntax-highlighter-demo',
76
167
  showLineNumbers=True,
77
168
  showInlineLineNumbers=True,
78
169
  codeString='''html.Div(
@@ -155,5 +246,6 @@ def shotycut_panel_demo(triggeredHotkey, theme):
155
246
 
156
247
  return 'dark' if theme == 'light' else 'light'
157
248
 
249
+
158
250
  if __name__ == '__main__':
159
251
  app.run_server(debug=True)
package/webpack.config.js CHANGED
@@ -37,6 +37,8 @@ module.exports = (env, argv) => {
37
37
 
38
38
  const devtool = overrides.devtool || 'source-map';
39
39
 
40
+ // const devtool = 'cheap-module-eval-source-map';
41
+
40
42
  const externals = ('externals' in overrides) ? overrides.externals : ({
41
43
  react: 'React',
42
44
  'react-dom': 'ReactDOM',
@@ -1,102 +0,0 @@
1
- /* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
2
- * @license MIT */
3
-
4
- /*!
5
- Copyright (c) 2018 Jed Watson.
6
- Licensed under the MIT License (MIT), see
7
- http://jedwatson.github.io/classnames
8
- */
9
-
10
- /*!
11
- * hotkeys-js v3.8.7
12
- * A simple micro-library for defining and dispatching keyboard shortcuts. It has no dependencies.
13
- *
14
- * Copyright (c) 2021 kenny wong <wowohoo@qq.com>
15
- * http://jaywcjlove.github.io/hotkeys
16
- *
17
- * Licensed under the MIT license.
18
- */
19
-
20
- /*! *****************************************************************************
21
- Copyright (c) Microsoft Corporation.
22
-
23
- Permission to use, copy, modify, and/or distribute this software for any
24
- purpose with or without fee is hereby granted.
25
-
26
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
27
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
28
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
29
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
30
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
31
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
32
- PERFORMANCE OF THIS SOFTWARE.
33
- ***************************************************************************** */
34
-
35
- /**
36
- * @license
37
- * Copyright 2017 Google LLC
38
- * SPDX-License-Identifier: BSD-3-Clause
39
- */
40
-
41
- /**
42
- * @license
43
- * Copyright 2018 Google LLC
44
- * SPDX-License-Identifier: Apache-2.0
45
- */
46
-
47
- /**
48
- * @license
49
- * Copyright 2018 Google LLC
50
- * SPDX-License-Identifier: BSD-3-Clause
51
- */
52
-
53
- /**
54
- * @license
55
- * Copyright 2019 Google LLC
56
- * SPDX-License-Identifier: BSD-3-Clause
57
- */
58
-
59
- /**
60
- * @license
61
- * Copyright 2020 Google LLC
62
- * SPDX-License-Identifier: BSD-3-Clause
63
- */
64
-
65
- /**
66
- * @license
67
- * Copyright 2021 Google LLC
68
- * SPDX-LIcense-Identifier: Apache-2.0
69
- */
70
-
71
- /**
72
- * @license
73
- * Copyright 2021 Google LLC
74
- * SPDX-License-Identifier: BSD-3-Clause
75
- */
76
-
77
- /**
78
- * @license
79
- * Lodash <https://lodash.com/>
80
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
81
- * Released under MIT license <https://lodash.com/license>
82
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
83
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
84
- */
85
-
86
- /**
87
- * Prism: Lightweight, robust, elegant syntax highlighting
88
- *
89
- * @license MIT <https://opensource.org/licenses/MIT>
90
- * @author Lea Verou <https://lea.verou.me>
91
- * @namespace
92
- * @public
93
- */
94
-
95
- /** @license React v16.13.1
96
- * react-is.production.min.js
97
- *
98
- * Copyright (c) Facebook, Inc. and its affiliates.
99
- *
100
- * This source code is licensed under the MIT license found in the
101
- * LICENSE file in the root directory of this source tree.
102
- */