feffery_utils_components 0.0.8 → 0.0.9

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.
@@ -98,6 +98,37 @@
98
98
  }
99
99
  }
100
100
  },
101
+ "src/lib/components/FefferyExecuteJs.react.js": {
102
+ "description": "",
103
+ "displayName": "FefferyExecuteJs",
104
+ "methods": [],
105
+ "props": {
106
+ "id": {
107
+ "type": {
108
+ "name": "custom",
109
+ "raw": "PropTypes.string"
110
+ },
111
+ "required": false,
112
+ "description": ""
113
+ },
114
+ "jsString": {
115
+ "type": {
116
+ "name": "custom",
117
+ "raw": "PropTypes.string"
118
+ },
119
+ "required": false,
120
+ "description": ""
121
+ },
122
+ "loading_state": {
123
+ "type": {
124
+ "name": "custom",
125
+ "raw": "PropTypes.shape({\r\n /**\r\n * Determines if the component is loading or not\r\n */\r\n is_loading: PropTypes.bool,\r\n /**\r\n * Holds which property is loading\r\n */\r\n prop_name: PropTypes.string,\r\n /**\r\n * Holds the name of the component that is loading\r\n */\r\n component_name: PropTypes.string\r\n})"
126
+ },
127
+ "required": false,
128
+ "description": ""
129
+ }
130
+ }
131
+ },
101
132
  "src/lib/components/FefferyGuide.react.js": {
102
133
  "description": "",
103
134
  "displayName": "FefferyGuide",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Utility augments components of Dash!",
5
5
  "repository": {
6
6
  "type": "git",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "Utility augments components of Dash!",
5
5
  "repository": {
6
6
  "type": "git",
@@ -3,9 +3,10 @@ module FefferyUtilsComponents
3
3
  using Dash
4
4
 
5
5
  const resources_path = realpath(joinpath( @__DIR__, "..", "deps"))
6
- const version = "0.0.8"
6
+ const version = "0.0.9"
7
7
 
8
8
  include("jl/''_fefferycaptcha.jl")
9
+ include("jl/''_fefferyexecutejs.jl")
9
10
  include("jl/''_fefferyguide.jl")
10
11
  include("jl/''_fefferypasteimage.jl")
11
12
  include("jl/''_fefferyshortcutpanel.jl")
@@ -24,14 +25,14 @@ function __init__()
24
25
  [
25
26
  DashBase.Resource(
26
27
  relative_package_path = "feffery_utils_components.min.js",
27
- external_url = "https://unpkg.com/feffery_utils_components@0.0.8/feffery_utils_components/feffery_utils_components.min.js",
28
+ external_url = "https://unpkg.com/feffery_utils_components@0.0.9/feffery_utils_components/feffery_utils_components.min.js",
28
29
  dynamic = nothing,
29
30
  async = nothing,
30
31
  type = :js
31
32
  ),
32
33
  DashBase.Resource(
33
34
  relative_package_path = "feffery_utils_components.min.js.map",
34
- external_url = "https://unpkg.com/feffery_utils_components@0.0.8/feffery_utils_components/feffery_utils_components.min.js.map",
35
+ external_url = "https://unpkg.com/feffery_utils_components@0.0.9/feffery_utils_components/feffery_utils_components.min.js.map",
35
36
  dynamic = true,
36
37
  async = nothing,
37
38
  type = :js
@@ -0,0 +1,20 @@
1
+ # AUTO GENERATED FILE - DO NOT EDIT
2
+
3
+ export ''_fefferyexecutejs
4
+
5
+ """
6
+ ''_fefferyexecutejs(;kwargs...)
7
+
8
+ A FefferyExecuteJs component.
9
+
10
+ Keyword arguments:
11
+ - `id` (optional)
12
+ - `jsString` (optional)
13
+ - `loading_state` (optional)
14
+ """
15
+ function ''_fefferyexecutejs(; kwargs...)
16
+ available_props = Symbol[:id, :jsString, :loading_state]
17
+ wild_props = Symbol[]
18
+ return Component("''_fefferyexecutejs", "FefferyExecuteJs", "feffery_utils_components", available_props, wild_props; kwargs...)
19
+ end
20
+
@@ -1,19 +1,23 @@
1
+ import { Component } from 'react';
2
+
1
3
 
2
4
  // 定义js直接执行部件FefferyExecuteJs
3
- const FefferyExecuteJs = (props) => {
4
- // 取得必要属性或参数
5
- const {
6
- jsString
7
- } = props;
8
-
9
- // 执行原生js程序
10
- if (jsString) {
11
- eval(jsString)
5
+ export default class FefferyExecuteJs extends Component {
6
+ render() {
7
+ // 取得必要属性或参数
8
+ const {
9
+ jsString
10
+ } = this.props;
11
+
12
+ // 执行原生js程序
13
+ if (jsString) {
14
+ eval(jsString)
15
+ }
16
+
17
+ return <></>
12
18
  }
13
19
 
14
- return
15
20
  }
16
-
17
21
  // 定义参数或属性
18
22
  FefferyExecuteJs.propTypes = {
19
23
  // 部件id
@@ -40,6 +44,4 @@ FefferyExecuteJs.propTypes = {
40
44
 
41
45
  // 设置默认参数
42
46
  FefferyExecuteJs.defaultProps = {
43
- }
44
-
45
- export default FefferyExecuteJs;
47
+ }
package/usage.py CHANGED
@@ -11,6 +11,8 @@ app.layout = html.Div(
11
11
  fuc.FefferyTopProgress(
12
12
  [
13
13
 
14
+ fuc.FefferyExecuteJs(),
15
+
14
16
  fuc.FefferySplit(
15
17
  [
16
18
  fuc.FefferySplitPane(