feffery_utils_components 0.0.5 → 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.
- package/.Rbuildignore +34 -0
- package/DESCRIPTION +1 -1
- package/NAMESPACE +8 -0
- package/Project.toml +2 -2
- package/build/lib/feffery_utils_components/FefferyCaptcha.py +51 -0
- package/build/lib/feffery_utils_components/FefferyPasteImage.py +56 -0
- package/build/lib/feffery_utils_components/FefferyShortcutPanel.py +53 -0
- package/build/lib/feffery_utils_components/FefferySyntaxHighlighter.py +52 -0
- package/build/lib/feffery_utils_components/FefferyTopProgress.py +68 -0
- package/build/lib/feffery_utils_components/FefferyUtilsComponents.py +40 -0
- package/build/lib/feffery_utils_components/FefferyWaterMark.py +64 -0
- package/build/lib/feffery_utils_components/__init__.py +89 -0
- package/build/lib/feffery_utils_components/_imports_.py +15 -0
- package/build/lib/feffery_utils_components/feffery_utils_components.min.js +407 -0
- package/build/lib/feffery_utils_components/metadata.json +689 -0
- package/build/lib/feffery_utils_components/package-info.json +80 -0
- package/feffery_utils_components/{FefferyContextMenu.py → FefferyDashboard.py} +4 -4
- package/feffery_utils_components/FefferyGuide.py +69 -0
- package/feffery_utils_components/FefferyResizable.py +39 -0
- package/feffery_utils_components/FefferyShortcutPanel.py +51 -0
- package/feffery_utils_components/FefferySplit.py +59 -0
- package/feffery_utils_components/{FefferyNprogress.py → FefferySplitPane.py} +8 -12
- package/feffery_utils_components/FefferyTopProgress.py +68 -0
- package/feffery_utils_components/_imports_.py +11 -1
- package/feffery_utils_components/feffery_utils_components.min.js +404 -1
- package/feffery_utils_components/metadata.json +657 -13
- package/feffery_utils_components/package-info.json +7 -3
- package/git-operations.md +23 -0
- package/package.json +7 -1
- package/src/FefferyUtilsComponents.jl +8 -3
- package/src/jl/''_fefferydashboard.jl +23 -0
- package/src/jl/''_fefferyguide.jl +38 -0
- package/src/jl/''_fefferykeyboardshortcut.jl +36 -0
- package/src/jl/''_fefferyresizable.jl +23 -0
- package/src/jl/''_fefferyshortcutpanel.jl +29 -0
- package/src/jl/''_fefferysplit.jl +39 -0
- package/src/jl/''_fefferysplitpane.jl +32 -0
- package/src/jl/''_fefferytopprogress.jl +41 -0
- package/src/lib/components/FefferyExecuteJs.react.js +45 -0
- package/src/lib/components/FefferyGuide.react.js +174 -0
- package/src/lib/components/FefferyShortcutPanel.react.js +277 -0
- package/src/lib/components/FefferyTopProgress.react.js +180 -0
- package/src/lib/components/split/FefferySplit.react.js +199 -0
- package/src/lib/components/split/FefferySplitPane.react.js +75 -0
- package/src/lib/components/styles.css +70 -3
- package/src/lib/index.js +13 -1
- package/usage.py +184 -38
- package/webpack.config.js +2 -0
- package/feffery_utils_components/FefferyFefferySyntaxHighlighter.py +0 -46
- package/feffery_utils_components/__pycache__/FefferyCaptcha.cpython-37.pyc +0 -0
- package/feffery_utils_components/__pycache__/FefferyPasteImage.cpython-37.pyc +0 -0
- package/feffery_utils_components/__pycache__/FefferySyntaxHighlighter.cpython-37.pyc +0 -0
- package/feffery_utils_components/__pycache__/FefferyWaterMark.cpython-37.pyc +0 -0
- package/feffery_utils_components/__pycache__/__init__.cpython-37.pyc +0 -0
- package/feffery_utils_components/__pycache__/_imports_.cpython-37.pyc +0 -0
- package/feffery_utils_components/feffery_utils_components.min.js.LICENSE.txt +0 -32
- package/feffery_utils_components/feffery_utils_components.min.js.map +0 -1
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
|
|
4
|
+
const parseChildrenToArray = children => {
|
|
5
|
+
if (children && !Array.isArray(children)) {
|
|
6
|
+
return [children];
|
|
7
|
+
}
|
|
8
|
+
return children;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
// 定义分割子面板组件FefferySplitPane
|
|
12
|
+
export default class FefferySplitPane extends Component {
|
|
13
|
+
render() {
|
|
14
|
+
// 取得必要属性或参数
|
|
15
|
+
let {
|
|
16
|
+
id,
|
|
17
|
+
children,
|
|
18
|
+
className,
|
|
19
|
+
style,
|
|
20
|
+
loading_state
|
|
21
|
+
} = this.props;
|
|
22
|
+
|
|
23
|
+
children = parseChildrenToArray(children)
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<div id={id}
|
|
27
|
+
className={className}
|
|
28
|
+
style={style}
|
|
29
|
+
children={children}
|
|
30
|
+
data-dash-is-loading={
|
|
31
|
+
(loading_state && loading_state.is_loading) || undefined
|
|
32
|
+
}>
|
|
33
|
+
</div>
|
|
34
|
+
);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// 定义参数或属性
|
|
39
|
+
FefferySplitPane.propTypes = {
|
|
40
|
+
// 组件id
|
|
41
|
+
id: PropTypes.string,
|
|
42
|
+
|
|
43
|
+
children: PropTypes.node,
|
|
44
|
+
|
|
45
|
+
// css类名
|
|
46
|
+
className: PropTypes.string,
|
|
47
|
+
|
|
48
|
+
// 自定义css字典
|
|
49
|
+
style: PropTypes.object,
|
|
50
|
+
|
|
51
|
+
loading_state: PropTypes.shape({
|
|
52
|
+
/**
|
|
53
|
+
* Determines if the component is loading or not
|
|
54
|
+
*/
|
|
55
|
+
is_loading: PropTypes.bool,
|
|
56
|
+
/**
|
|
57
|
+
* Holds which property is loading
|
|
58
|
+
*/
|
|
59
|
+
prop_name: PropTypes.string,
|
|
60
|
+
/**
|
|
61
|
+
* Holds the name of the component that is loading
|
|
62
|
+
*/
|
|
63
|
+
component_name: PropTypes.string
|
|
64
|
+
}),
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Dash-assigned callback that should be called to report property changes
|
|
68
|
+
* to Dash, to make them available for callbacks.
|
|
69
|
+
*/
|
|
70
|
+
setProps: PropTypes.func
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// 设置默认参数
|
|
74
|
+
FefferySplitPane.defaultProps = {
|
|
75
|
+
}
|
|
@@ -1,16 +1,83 @@
|
|
|
1
1
|
.linenumber react-syntax-highlighter-line-number {
|
|
2
|
-
min-width: 2rem!important;
|
|
2
|
+
min-width: 2rem !important;
|
|
3
3
|
}
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
.feffery-paste-image-container {
|
|
7
6
|
height: 400px;
|
|
8
7
|
overflow: auto;
|
|
9
8
|
border: 1px solid #d9d9d9;
|
|
10
|
-
transition: all .3s,height 0s;
|
|
9
|
+
transition: all .3s, height 0s;
|
|
11
10
|
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAAXNSR0IArs4c6QAAAkdJREFUSEtjZMABcnNny3ByMpQyMzNpISv59u3XtokTM/tx6UMXZ4QJJCTM5+Dh+WIB4zMxMe83M1NhkJUVRdFz8eJ9hgcPXr/+9etXGEzi3z+mG9OmZb/AZinYgqbqqWVvvzC2Gyv8YgLxP3xjYvjwR4AhM8sTq0Obm1czmCj+gsu9+cx879MPxicNbTn2WH2Qnzftb5rTF7Dhh2+yM7z8yMzw8x8rgyAfKwPci1Cd/xkYGF69+8Ugwv2bQV3yN4OqxB+wzPaLnA+fvGdxmDAh8wGyJWD9teVT70dYflUAsb/+ZGTgZAMZQxgwIdl+9Bbbg0uPmBOnTMk9gNcCwsZiV0GRBTP38eC1l52dlYGL+efnt1/++5Hlg23XJRmi4/1xWjJ16jqGz5+/MTAw/N84aVJ2AMlBRMiCSZPWMLS3JzLk509nYGRknDZxYmY2zBKMSMbmTEIW9PevZOjqSgFrBVnCwMAwf9KkrCQQgyoW9PQsZ+jtTYO7DdkSqljQ2bmU4f9/rEm7iioWgJz+8+d3hl+/fsJ9cfHi7W+HDl3zppoF6JbQxAJkS2hmAcyS06evUD+IkJP44cNnvh4+fNWHqnGAbMGhQ+c/HzlyyQ9sQU3ZlIeRVt/kcJUFhDIaNn0oFlSXTX0UZfVVlmYWVJVNeRxk8l2GlQV7PbDrJv7CjhgfzFEQ/R0oyvtPCJvim+/FGWLjfUmqKlCCCKSzrHhyAA87QzA2U5i5RMKcXUzYSLHhwYNniEgmpLGsbG4XITXY5Lu6kssAynVWbI/9nxAAAAAASUVORK5CYII=), auto;
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
.feffery-paste-image-container:hover {
|
|
15
14
|
border: 1px solid rgb(64, 169, 255);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.modal-footer {
|
|
18
|
+
background: var(--ninja-footer-background);
|
|
19
|
+
padding: 0.5em 1em;
|
|
20
|
+
display: flex;
|
|
21
|
+
/* font-size: 0.75em; */
|
|
22
|
+
border-top: var(--ninja-separate-border);
|
|
23
|
+
color: var(--ninja-secondary-text-color);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.modal-footer .help {
|
|
27
|
+
display: flex;
|
|
28
|
+
margin-right: 1em;
|
|
29
|
+
align-items: center;
|
|
30
|
+
font-size: 0.75em;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ninja-examplekey {
|
|
34
|
+
background: var(--ninja-secondary-background-color);
|
|
35
|
+
padding: 0.06em 0.25em;
|
|
36
|
+
border-radius: var(--ninja-key-border-radius);
|
|
37
|
+
color: var(--ninja-secondary-text-color);
|
|
38
|
+
height: 1em;
|
|
39
|
+
margin-right: 0.5em;
|
|
40
|
+
font-size: 1.25em;
|
|
41
|
+
fill: currentColor;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.ninja-examplekey.esc {
|
|
45
|
+
width: auto;
|
|
46
|
+
height: auto;
|
|
47
|
+
font-size: 1.1em;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.ninja-examplekey.backspace {
|
|
51
|
+
opacity: 0.7;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
html {
|
|
55
|
+
overflow: auto !important;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.feffery-split-vertical {
|
|
59
|
+
border: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.feffery-split-horizontal {
|
|
63
|
+
display: flex;
|
|
64
|
+
flex-direction: row;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.gutter {
|
|
68
|
+
background-color: #e3f2fd;
|
|
69
|
+
background-repeat: no-repeat;
|
|
70
|
+
background-position: 50%;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.gutter:hover {
|
|
74
|
+
background-color: #42a5f5;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.gutter.gutter-horizontal {
|
|
78
|
+
cursor: col-resize;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.gutter.gutter-vertical {
|
|
82
|
+
cursor: row-resize;
|
|
16
83
|
}
|
package/src/lib/index.js
CHANGED
|
@@ -3,11 +3,23 @@ import FefferyCaptcha from "./components/FefferyCaptcha.react";
|
|
|
3
3
|
import FefferyWaterMark from "./components/FefferyWaterMark.react";
|
|
4
4
|
import FefferySyntaxHighlighter from "./components/FefferySyntaxHighlighter.react";
|
|
5
5
|
import FefferyPasteImage from "./components/FefferyPasteImage.react";
|
|
6
|
+
import FefferyTopProgress from "./components/FefferyTopProgress.react"
|
|
7
|
+
import FefferyShortcutPanel from "./components/FefferyShortcutPanel.react"
|
|
8
|
+
import FefferyGuide from "./components/FefferyGuide.react"
|
|
9
|
+
import FefferySplit from "./components/split/FefferySplit.react";
|
|
10
|
+
import FefferySplitPane from "./components/split/FefferySplitPane.react"
|
|
11
|
+
import FefferyExecuteJs from "./components/FefferyExecuteJs.react";
|
|
6
12
|
|
|
7
13
|
|
|
8
14
|
export {
|
|
9
15
|
FefferyCaptcha,
|
|
10
16
|
FefferyWaterMark,
|
|
11
17
|
FefferySyntaxHighlighter,
|
|
12
|
-
FefferyPasteImage
|
|
18
|
+
FefferyPasteImage,
|
|
19
|
+
FefferyTopProgress,
|
|
20
|
+
FefferyShortcutPanel,
|
|
21
|
+
FefferyGuide,
|
|
22
|
+
FefferySplit,
|
|
23
|
+
FefferySplitPane,
|
|
24
|
+
FefferyExecuteJs
|
|
13
25
|
};
|
package/usage.py
CHANGED
|
@@ -1,41 +1,172 @@
|
|
|
1
1
|
import feffery_utils_components as fuc
|
|
2
2
|
import dash
|
|
3
|
-
from dash.dependencies import Input, Output
|
|
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
|
|
|
8
|
-
app.layout = html.Div(
|
|
9
|
-
[
|
|
10
|
-
fuc.FefferyPasteImage(
|
|
11
|
-
id='test',
|
|
12
|
-
style={
|
|
13
|
-
'height': '500px',
|
|
14
|
-
'width': '800px',
|
|
15
|
-
'marginBottom': '100px'
|
|
16
|
-
}
|
|
17
|
-
),
|
|
18
|
-
html.Div(id='test-output'),
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
fuc.FefferyCaptcha(id='captcha-demo',
|
|
22
|
-
charNum=10,
|
|
23
|
-
width=300,
|
|
24
|
-
height=100,
|
|
25
|
-
fontSize=60),
|
|
26
|
-
html.Div(
|
|
27
|
-
html.Em(id='output-demo')
|
|
28
|
-
),
|
|
29
|
-
|
|
30
|
-
fuc.FefferyWaterMark(
|
|
31
|
-
content='fuc FefferyWaterMark',
|
|
32
|
-
fontSize=26
|
|
33
|
-
),
|
|
34
9
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
10
|
+
app.layout = html.Div(
|
|
11
|
+
fuc.FefferyTopProgress(
|
|
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
|
+
|
|
103
|
+
fuc.FefferyShortcutPanel(
|
|
104
|
+
id='shortcut-panel-demo',
|
|
105
|
+
locale='zh',
|
|
106
|
+
placeholder='搜索热键功能...',
|
|
107
|
+
theme='dark',
|
|
108
|
+
data=[
|
|
109
|
+
{
|
|
110
|
+
'id': "主页",
|
|
111
|
+
'title': "打开主页",
|
|
112
|
+
'hotkey': "ctrl+h",
|
|
113
|
+
'section': '分组1',
|
|
114
|
+
'handler': '() => window.open("http://www.baidu.com")'
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
'id': '主题',
|
|
118
|
+
'title': '切换主题',
|
|
119
|
+
'hotkey': 'ctrl+t',
|
|
120
|
+
'section': '分组1'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
'id': '指令1',
|
|
124
|
+
'title': '指令1',
|
|
125
|
+
'children': ['指令1-2', '指令1-1'],
|
|
126
|
+
'section': '分组2'
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
'id': '指令1-1',
|
|
130
|
+
'title': '指令1-1',
|
|
131
|
+
'parent': '指令1'
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
'id': '指令1-2',
|
|
135
|
+
'title': '指令1-2',
|
|
136
|
+
'parent': '指令1'
|
|
137
|
+
}
|
|
138
|
+
]
|
|
139
|
+
),
|
|
140
|
+
|
|
141
|
+
fuc.FefferyPasteImage(
|
|
142
|
+
id='test',
|
|
143
|
+
style={
|
|
144
|
+
'height': '500px',
|
|
145
|
+
'width': '800px',
|
|
146
|
+
'marginBottom': '100px'
|
|
147
|
+
}
|
|
148
|
+
),
|
|
149
|
+
html.Div(id='test-output'),
|
|
150
|
+
|
|
151
|
+
fuc.FefferyCaptcha(id='captcha-demo',
|
|
152
|
+
charNum=10,
|
|
153
|
+
width=300,
|
|
154
|
+
height=100,
|
|
155
|
+
fontSize=60),
|
|
156
|
+
html.Div(
|
|
157
|
+
html.Em(id='output-demo')
|
|
158
|
+
),
|
|
159
|
+
|
|
160
|
+
fuc.FefferyWaterMark(
|
|
161
|
+
content='fuc FefferyWaterMark',
|
|
162
|
+
fontSize=26
|
|
163
|
+
),
|
|
164
|
+
|
|
165
|
+
fuc.FefferySyntaxHighlighter(
|
|
166
|
+
id='syntax-highlighter-demo',
|
|
167
|
+
showLineNumbers=True,
|
|
168
|
+
showInlineLineNumbers=True,
|
|
169
|
+
codeString='''html.Div(
|
|
39
170
|
[
|
|
40
171
|
fac.AntdBackTop(
|
|
41
172
|
containerId='back-top-container-demo',
|
|
@@ -62,10 +193,15 @@ app.layout = html.Div(
|
|
|
62
193
|
}
|
|
63
194
|
)
|
|
64
195
|
''',
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
196
|
+
language='python',
|
|
197
|
+
codeStyle='coy-without-shadows'
|
|
198
|
+
)
|
|
199
|
+
],
|
|
200
|
+
# listenPropsMode='exclude',
|
|
201
|
+
# excludeProps=['output-demo.children'],
|
|
202
|
+
debug=True,
|
|
203
|
+
showSpinner=False
|
|
204
|
+
),
|
|
69
205
|
style={
|
|
70
206
|
'padding': '100px'
|
|
71
207
|
}
|
|
@@ -74,14 +210,13 @@ app.layout = html.Div(
|
|
|
74
210
|
|
|
75
211
|
@app.callback(
|
|
76
212
|
Output('output-demo', 'children'),
|
|
77
|
-
Input('captcha-demo', 'captcha')
|
|
78
|
-
prevent_initial_call=True
|
|
213
|
+
Input('captcha-demo', 'captcha')
|
|
79
214
|
)
|
|
80
215
|
def test(captcha):
|
|
81
216
|
|
|
82
217
|
import time
|
|
83
218
|
|
|
84
|
-
time.sleep(3)
|
|
219
|
+
# time.sleep(3)
|
|
85
220
|
|
|
86
221
|
return captcha
|
|
87
222
|
|
|
@@ -101,5 +236,16 @@ def test_(currentPastedImages):
|
|
|
101
236
|
]
|
|
102
237
|
|
|
103
238
|
|
|
239
|
+
@app.callback(
|
|
240
|
+
Output('shortcut-panel-demo', 'theme'),
|
|
241
|
+
Input('shortcut-panel-demo', 'triggeredHotkey'),
|
|
242
|
+
State('shortcut-panel-demo', 'theme')
|
|
243
|
+
)
|
|
244
|
+
def shotycut_panel_demo(triggeredHotkey, theme):
|
|
245
|
+
print(triggeredHotkey, theme)
|
|
246
|
+
|
|
247
|
+
return 'dark' if theme == 'light' else 'light'
|
|
248
|
+
|
|
249
|
+
|
|
104
250
|
if __name__ == '__main__':
|
|
105
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,46 +0,0 @@
|
|
|
1
|
-
# AUTO GENERATED FILE - DO NOT EDIT
|
|
2
|
-
|
|
3
|
-
from dash.development.base_component import Component, _explicitize_args
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
class FefferyFefferySyntaxHighlighter(Component):
|
|
7
|
-
"""A FefferyFefferySyntaxHighlighter component.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
Keyword arguments:
|
|
11
|
-
|
|
12
|
-
- id (string; optional)
|
|
13
|
-
|
|
14
|
-
- codeString (string; required)
|
|
15
|
-
|
|
16
|
-
- language (string; default 'python')
|
|
17
|
-
|
|
18
|
-
- loading_state (dict; optional)
|
|
19
|
-
|
|
20
|
-
`loading_state` is a dict with keys:
|
|
21
|
-
|
|
22
|
-
- component_name (string; optional):
|
|
23
|
-
Holds the name of the component that is loading.
|
|
24
|
-
|
|
25
|
-
- is_loading (boolean; optional):
|
|
26
|
-
Determines if the component is loading or not.
|
|
27
|
-
|
|
28
|
-
- prop_name (string; optional):
|
|
29
|
-
Holds which property is loading."""
|
|
30
|
-
@_explicitize_args
|
|
31
|
-
def __init__(self, id=Component.UNDEFINED, codeString=Component.REQUIRED, language=Component.UNDEFINED, loading_state=Component.UNDEFINED, **kwargs):
|
|
32
|
-
self._prop_names = ['id', 'codeString', 'language', 'loading_state']
|
|
33
|
-
self._type = 'FefferyFefferySyntaxHighlighter'
|
|
34
|
-
self._namespace = 'feffery_utils_components'
|
|
35
|
-
self._valid_wildcard_attributes = []
|
|
36
|
-
self.available_properties = ['id', 'codeString', 'language', 'loading_state']
|
|
37
|
-
self.available_wildcard_properties = []
|
|
38
|
-
_explicit_args = kwargs.pop('_explicit_args')
|
|
39
|
-
_locals = locals()
|
|
40
|
-
_locals.update(kwargs) # For wildcard attrs
|
|
41
|
-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
|
|
42
|
-
for k in ['codeString']:
|
|
43
|
-
if k not in args:
|
|
44
|
-
raise TypeError(
|
|
45
|
-
'Required argument `' + k + '` was not specified.')
|
|
46
|
-
super(FefferyFefferySyntaxHighlighter, self).__init__(**args)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
Copyright (c) 2018 Jed Watson.
|
|
3
|
-
Licensed under the MIT License (MIT), see
|
|
4
|
-
http://jedwatson.github.io/classnames
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @license
|
|
9
|
-
* Lodash <https://lodash.com/>
|
|
10
|
-
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
11
|
-
* Released under MIT license <https://lodash.com/license>
|
|
12
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
13
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
18
|
-
*
|
|
19
|
-
* @license MIT <https://opensource.org/licenses/MIT>
|
|
20
|
-
* @author Lea Verou <https://lea.verou.me>
|
|
21
|
-
* @namespace
|
|
22
|
-
* @public
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/** @license React v16.13.1
|
|
26
|
-
* react-is.production.min.js
|
|
27
|
-
*
|
|
28
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
29
|
-
*
|
|
30
|
-
* This source code is licensed under the MIT license found in the
|
|
31
|
-
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"feffery_utils_components.min.js","sourceRoot":""}
|