feffery_utils_components 0.2.0-rc11 → 0.2.0-rc13

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 (52) hide show
  1. package/DESCRIPTION +1 -1
  2. package/NAMESPACE +2 -0
  3. package/Project.toml +1 -1
  4. package/README.md +1 -1
  5. package/assets/demo.jpg +0 -0
  6. package/feffery_utils_components/FefferySetFavicon.py +45 -0
  7. package/feffery_utils_components/FefferySetTitle.py +7 -4
  8. package/feffery_utils_components/FefferySliderCaptcha.py +109 -0
  9. package/feffery_utils_components/__init__.py +2 -1
  10. package/feffery_utils_components/_imports_.py +4 -0
  11. package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
  12. package/feffery_utils_components/async-feffery_animated_3d_background_three.js +2 -2
  13. package/feffery_utils_components/async-feffery_animated_image.js +1 -1
  14. package/feffery_utils_components/async-feffery_aplayer.js +1 -1
  15. package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
  16. package/feffery_utils_components/async-feffery_auto_fit.js +1 -1
  17. package/feffery_utils_components/async-feffery_captcha.js +1 -1
  18. package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
  19. package/feffery_utils_components/async-feffery_dom2image.js +1 -1
  20. package/feffery_utils_components/async-feffery_dplayer.js +1 -1
  21. package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
  22. package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
  23. package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
  24. package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
  25. package/feffery_utils_components/async-feffery_grid.js +1 -1
  26. package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
  27. package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
  28. package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
  29. package/feffery_utils_components/async-feffery_markdown_editor.js +2 -2
  30. package/feffery_utils_components/async-feffery_motion.js +1 -1
  31. package/feffery_utils_components/async-feffery_music_player.js +1 -1
  32. package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
  33. package/feffery_utils_components/async-feffery_resizable.js +1 -1
  34. package/feffery_utils_components/async-feffery_rich_text_editor.js +2 -2
  35. package/feffery_utils_components/async-feffery_rnd.js +1 -1
  36. package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
  37. package/feffery_utils_components/async-feffery_shortcut_panel.js +1 -1
  38. package/feffery_utils_components/async-feffery_slider_captcha.js +1 -0
  39. package/feffery_utils_components/async-feffery_slider_captcha.js.LICENSE.txt +1 -0
  40. package/feffery_utils_components/async-feffery_sortable.js +1 -1
  41. package/feffery_utils_components/async-feffery_word_preview.js +1 -1
  42. package/feffery_utils_components/async-fuc-shared.js +2 -2
  43. package/feffery_utils_components/feffery_utils_components.min.js +2 -2
  44. package/feffery_utils_components/metadata.json +298 -1
  45. package/feffery_utils_components/package-info.json +3 -1
  46. package/package.json +3 -1
  47. package/src/lib/components/FefferySetFavicon.react.js +58 -0
  48. package/src/lib/components/FefferySetTitle.react.js +21 -6
  49. package/src/lib/components/FefferySliderCaptcha.react.js +160 -0
  50. package/src/lib/fragments/FefferySliderCaptcha.react.js +102 -0
  51. package/src/lib/index.js +5 -1
  52. package/usage.py +20 -48
@@ -13294,8 +13294,60 @@
13294
13294
  }
13295
13295
  }
13296
13296
  },
13297
+ "src/lib/components/FefferySetFavicon.react.js": {
13298
+ "description": "favicon\u8bbe\u7f6e\u7ec4\u4ef6FefferySetFavicon",
13299
+ "displayName": "FefferySetFavicon",
13300
+ "methods": [],
13301
+ "props": {
13302
+ "id": {
13303
+ "type": {
13304
+ "name": "string"
13305
+ },
13306
+ "required": false,
13307
+ "description": "\u7ec4\u4ef6id"
13308
+ },
13309
+ "favicon": {
13310
+ "type": {
13311
+ "name": "string"
13312
+ },
13313
+ "required": false,
13314
+ "description": "\u7528\u4e8e\u8bbe\u7f6e\u8981\u66f4\u65b0\u7684favicon\u56fe\u7247\u6587\u4ef6\u5730\u5740\uff0c\u652f\u6301svg\u3001png\u3001ico\u3001gif\u683c\u5f0f"
13315
+ },
13316
+ "setProps": {
13317
+ "type": {
13318
+ "name": "func"
13319
+ },
13320
+ "required": false,
13321
+ "description": "Dash-assigned callback that should be called to report property changes\r\nto Dash, to make them available for callbacks."
13322
+ },
13323
+ "loading_state": {
13324
+ "type": {
13325
+ "name": "shape",
13326
+ "value": {
13327
+ "is_loading": {
13328
+ "name": "bool",
13329
+ "description": "Determines if the component is loading or not",
13330
+ "required": false
13331
+ },
13332
+ "prop_name": {
13333
+ "name": "string",
13334
+ "description": "Holds which property is loading",
13335
+ "required": false
13336
+ },
13337
+ "component_name": {
13338
+ "name": "string",
13339
+ "description": "Holds the name of the component that is loading",
13340
+ "required": false
13341
+ }
13342
+ }
13343
+ },
13344
+ "required": false,
13345
+ "description": ""
13346
+ }
13347
+ }
13348
+ },
13297
13349
  "src/lib/components/FefferySetTitle.react.js": {
13298
- "description": "",
13350
+ "description": "\u9875\u9762title\u8bbe\u7f6e\u7ec4\u4ef6FefferySetTitle",
13299
13351
  "displayName": "FefferySetTitle",
13300
13352
  "methods": [],
13301
13353
  "props": {
@@ -13313,6 +13365,13 @@
13313
13365
  "required": false,
13314
13366
  "description": "\u7528\u4e8e\u8bbe\u7f6e\u8981\u66f4\u65b0\u7684title\u4fe1\u606f"
13315
13367
  },
13368
+ "originTitle": {
13369
+ "type": {
13370
+ "name": "string"
13371
+ },
13372
+ "required": false,
13373
+ "description": "\u5f53title\u53c2\u6570\u4e3a\u7a7a\uff0c\u6216\u5f53\u524d\u7ec4\u4ef6\u4ece\u9875\u9762\u4e2d\u5378\u8f7d\u540e\u5e94\u5f53\u8fd8\u539f\u7684title"
13374
+ },
13316
13375
  "setProps": {
13317
13376
  "type": {
13318
13377
  "name": "func"
@@ -13704,6 +13763,244 @@
13704
13763
  }
13705
13764
  }
13706
13765
  },
13766
+ "src/lib/components/FefferySliderCaptcha.react.js": {
13767
+ "description": "",
13768
+ "displayName": "FefferySliderCaptcha",
13769
+ "methods": [],
13770
+ "props": {
13771
+ "id": {
13772
+ "type": {
13773
+ "name": "string"
13774
+ },
13775
+ "required": false,
13776
+ "description": "\u7ec4\u4ef6id"
13777
+ },
13778
+ "className": {
13779
+ "type": {
13780
+ "name": "string"
13781
+ },
13782
+ "required": false,
13783
+ "description": "css\u7c7b\u540d"
13784
+ },
13785
+ "style": {
13786
+ "type": {
13787
+ "name": "object"
13788
+ },
13789
+ "required": false,
13790
+ "description": "css\u6837\u5f0f"
13791
+ },
13792
+ "imgSrc": {
13793
+ "type": {
13794
+ "name": "string"
13795
+ },
13796
+ "required": false,
13797
+ "description": "\u7528\u4e8e\u751f\u6210\u62fc\u56fe\u7684\u5b8c\u6574\u56fe\u7247\u5730\u5740"
13798
+ },
13799
+ "imgWidth": {
13800
+ "type": {
13801
+ "name": "number"
13802
+ },
13803
+ "required": false,
13804
+ "description": "\u58f0\u660e\u7528\u4e8e\u751f\u6210\u62fc\u56fe\u7684\u5b8c\u6574\u56fe\u7247\u50cf\u7d20\u5bbd\u5ea6\u503c"
13805
+ },
13806
+ "xOffset": {
13807
+ "type": {
13808
+ "name": "number"
13809
+ },
13810
+ "required": false,
13811
+ "description": "\u62fc\u56fe\u5408\u6cd5\u9a8c\u8bc1\u50cf\u7d20\u504f\u79fb\u91cf\r\n\u9ed8\u8ba4\u503c\uff1a`5`",
13812
+ "defaultValue": {
13813
+ "value": "5",
13814
+ "computed": false
13815
+ }
13816
+ },
13817
+ "mode": {
13818
+ "type": {
13819
+ "name": "enum",
13820
+ "value": [
13821
+ {
13822
+ "value": "'embed'",
13823
+ "computed": false
13824
+ },
13825
+ {
13826
+ "value": "'float'",
13827
+ "computed": false
13828
+ },
13829
+ {
13830
+ "value": "'slider'",
13831
+ "computed": false
13832
+ }
13833
+ ]
13834
+ },
13835
+ "required": false,
13836
+ "description": "\u663e\u793a\u6a21\u5f0f\uff0c\u53ef\u9009\u9879\u6709`'embed'`\u3001`'float'`\u3001`'slider'`\r\n\u9ed8\u8ba4\u503c\uff1a`'embed'`",
13837
+ "defaultValue": {
13838
+ "value": "'embed'",
13839
+ "computed": false
13840
+ }
13841
+ },
13842
+ "tipText": {
13843
+ "type": {
13844
+ "name": "exact",
13845
+ "value": {
13846
+ "default": {
13847
+ "name": "node",
13848
+ "description": "\u9ed8\u8ba4\u63d0\u793a\u5185\u5bb9",
13849
+ "required": false
13850
+ },
13851
+ "loading": {
13852
+ "name": "node",
13853
+ "description": "\u52a0\u8f7d\u4e2d\u63d0\u793a\u5185\u5bb9",
13854
+ "required": false
13855
+ },
13856
+ "moving": {
13857
+ "name": "node",
13858
+ "description": "\u79fb\u52a8\u4e2d\u63d0\u793a\u5185\u5bb9",
13859
+ "required": false
13860
+ },
13861
+ "verifying": {
13862
+ "name": "node",
13863
+ "description": "\u9a8c\u8bc1\u4e2d\u63d0\u793a\u5185\u5bb9",
13864
+ "required": false
13865
+ },
13866
+ "success": {
13867
+ "name": "node",
13868
+ "description": "\u9a8c\u8bc1\u6210\u529f\u63d0\u793a\u5185\u5bb9",
13869
+ "required": false
13870
+ },
13871
+ "error": {
13872
+ "name": "node",
13873
+ "description": "\u9a8c\u8bc1\u5931\u8d25\u63d0\u793a\u5185\u5bb9",
13874
+ "required": false
13875
+ }
13876
+ }
13877
+ },
13878
+ "required": false,
13879
+ "description": "\u914d\u7f6e\u76f8\u5173\u6587\u6848\u63d0\u793a\u5185\u5bb9"
13880
+ },
13881
+ "showRefreshIcon": {
13882
+ "type": {
13883
+ "name": "bool"
13884
+ },
13885
+ "required": false,
13886
+ "description": "\u663e\u793a\u53f3\u4e0a\u89d2\u5237\u65b0\u6309\u94ae\r\n\u9ed8\u8ba4\u503c\uff1a`true`",
13887
+ "defaultValue": {
13888
+ "value": "true",
13889
+ "computed": false
13890
+ }
13891
+ },
13892
+ "autoRefreshOnError": {
13893
+ "type": {
13894
+ "name": "bool"
13895
+ },
13896
+ "required": false,
13897
+ "description": "\u9a8c\u8bc1\u5931\u8d25\u540e\u662f\u5426\u81ea\u52a8\u5237\u65b0\r\n\u9ed8\u8ba4\u503c\uff1a`true`",
13898
+ "defaultValue": {
13899
+ "value": "true",
13900
+ "computed": false
13901
+ }
13902
+ },
13903
+ "errorHoldDuration": {
13904
+ "type": {
13905
+ "name": "number"
13906
+ },
13907
+ "required": false,
13908
+ "description": "\u5f53`autoRefreshOnError=True`\u65f6\uff0c\u6bcf\u6b21\u9a8c\u8bc1\u5931\u8d25\u540e\u505c\u987f\u591a\u5c11\u6beb\u79d2\u81ea\u52a8\u5237\u65b0\r\n\u9ed8\u8ba4\u503c\uff1a`500`",
13909
+ "defaultValue": {
13910
+ "value": "500",
13911
+ "computed": false
13912
+ }
13913
+ },
13914
+ "placement": {
13915
+ "type": {
13916
+ "name": "enum",
13917
+ "value": [
13918
+ {
13919
+ "value": "'top'",
13920
+ "computed": false
13921
+ },
13922
+ {
13923
+ "value": "'bottom'",
13924
+ "computed": false
13925
+ }
13926
+ ]
13927
+ },
13928
+ "required": false,
13929
+ "description": "\u62fc\u56fe\u56fe\u7247\u663e\u793a\u65b9\u4f4d\uff0c\u53ef\u9009\u9879\u6709`'top'`\u3001`'bottom'`\r\n\u9ed8\u8ba4\u503c\uff1a`'top'`",
13930
+ "defaultValue": {
13931
+ "value": "'top'",
13932
+ "computed": false
13933
+ }
13934
+ },
13935
+ "refresh": {
13936
+ "type": {
13937
+ "name": "bool"
13938
+ },
13939
+ "required": false,
13940
+ "description": "\u624b\u52a8\u5237\u65b0\u7528\uff0c\u6bcf\u6b21\u66f4\u65b0\u4e3a`True`\u65f6\u4f1a\u4e3b\u52a8\u89e6\u53d1\u5237\u65b0\uff0c\u6bcf\u6b21\u6210\u529f\u5237\u65b0\u540e\u4f1a\u91cd\u7f6e\u4e3a`False`"
13941
+ },
13942
+ "verifyResult": {
13943
+ "type": {
13944
+ "name": "exact",
13945
+ "value": {
13946
+ "status": {
13947
+ "name": "enum",
13948
+ "value": [
13949
+ {
13950
+ "value": "'success'",
13951
+ "computed": false
13952
+ },
13953
+ {
13954
+ "value": "'error'",
13955
+ "computed": false
13956
+ }
13957
+ ],
13958
+ "description": "\u9a8c\u8bc1\u72b6\u6001\uff0c`'success'`\u8868\u793a\u9a8c\u8bc1\u6210\u529f\uff0c`'error'`\u8868\u793a\u9a8c\u8bc1\u5931\u8d25",
13959
+ "required": false
13960
+ },
13961
+ "timestamp": {
13962
+ "name": "number",
13963
+ "description": "\u4e8b\u4ef6\u53d1\u751f\u65f6\u95f4\u6233",
13964
+ "required": false
13965
+ }
13966
+ }
13967
+ },
13968
+ "required": false,
13969
+ "description": "\u76d1\u542c\u6700\u8fd1\u4e00\u6b21\u9a8c\u8bc1\u7ed3\u679c"
13970
+ },
13971
+ "loading_state": {
13972
+ "type": {
13973
+ "name": "shape",
13974
+ "value": {
13975
+ "is_loading": {
13976
+ "name": "bool",
13977
+ "description": "Determines if the component is loading or not",
13978
+ "required": false
13979
+ },
13980
+ "prop_name": {
13981
+ "name": "string",
13982
+ "description": "Holds which property is loading",
13983
+ "required": false
13984
+ },
13985
+ "component_name": {
13986
+ "name": "string",
13987
+ "description": "Holds the name of the component that is loading",
13988
+ "required": false
13989
+ }
13990
+ }
13991
+ },
13992
+ "required": false,
13993
+ "description": ""
13994
+ },
13995
+ "setProps": {
13996
+ "type": {
13997
+ "name": "func"
13998
+ },
13999
+ "required": false,
14000
+ "description": "Dash-assigned callback that should be called to report property changes\r\nto Dash, to make them available for callbacks."
14001
+ }
14002
+ }
14003
+ },
13707
14004
  "src/lib/components/FefferySticky.react.js": {
13708
14005
  "description": "",
13709
14006
  "displayName": "FefferySticky",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.2.0-rc11",
3
+ "version": "0.2.0-rc13",
4
4
  "description": "Build more utility components for Plotly Dash.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  "byte-guide": "^1.0.7",
44
44
  "cherry-markdown": "^0.8.31",
45
45
  "comutils": "^1.1.19",
46
+ "create-puzzle": "^2.0.2",
46
47
  "dashjs": "4.7.2",
47
48
  "devtools-detector": "^2.0.15",
48
49
  "emoji-mart": "^5.5.2",
@@ -62,6 +63,7 @@
62
63
  "pinyin_js": "^1.0.4",
63
64
  "qrcode.react": "^3.1.0",
64
65
  "ramda": "^0.26.1",
66
+ "rc-slider-captcha": "^1.3.0",
65
67
  "rc-virtual-list": "^3.4.8",
66
68
  "re-resizable": "^6.9.9",
67
69
  "react-aplayer": "1.0.0",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "feffery_utils_components",
3
- "version": "0.2.0-rc11",
3
+ "version": "0.2.0-rc13",
4
4
  "description": "Build more utility components for Plotly Dash.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  "byte-guide": "^1.0.7",
44
44
  "cherry-markdown": "^0.8.31",
45
45
  "comutils": "^1.1.19",
46
+ "create-puzzle": "^2.0.2",
46
47
  "dashjs": "4.7.2",
47
48
  "devtools-detector": "^2.0.15",
48
49
  "emoji-mart": "^5.5.2",
@@ -62,6 +63,7 @@
62
63
  "pinyin_js": "^1.0.4",
63
64
  "qrcode.react": "^3.1.0",
64
65
  "ramda": "^0.26.1",
66
+ "rc-slider-captcha": "^1.3.0",
65
67
  "rc-virtual-list": "^3.4.8",
66
68
  "re-resizable": "^6.9.9",
67
69
  "react-aplayer": "1.0.0",
@@ -0,0 +1,58 @@
1
+ import { useFavicon } from 'ahooks';
2
+ import PropTypes from 'prop-types';
3
+
4
+ /**
5
+ * favicon设置组件FefferySetFavicon
6
+ */
7
+ const FefferySetFavicon = (props) => {
8
+
9
+ const {
10
+ favicon,
11
+ setProps,
12
+ loading_state
13
+ } = props;
14
+
15
+ useFavicon(favicon);
16
+
17
+ return <></>;
18
+ }
19
+
20
+ // 定义参数或属性
21
+ FefferySetFavicon.propTypes = {
22
+ /**
23
+ * 组件id
24
+ */
25
+ id: PropTypes.string,
26
+
27
+ /**
28
+ * 用于设置要更新的favicon图片文件地址,支持svg、png、ico、gif格式
29
+ */
30
+ favicon: PropTypes.string,
31
+
32
+ /**
33
+ * Dash-assigned callback that should be called to report property changes
34
+ * to Dash, to make them available for callbacks.
35
+ */
36
+ setProps: PropTypes.func,
37
+
38
+ loading_state: PropTypes.shape({
39
+ /**
40
+ * Determines if the component is loading or not
41
+ */
42
+ is_loading: PropTypes.bool,
43
+ /**
44
+ * Holds which property is loading
45
+ */
46
+ prop_name: PropTypes.string,
47
+ /**
48
+ * Holds the name of the component that is loading
49
+ */
50
+ component_name: PropTypes.string
51
+ })
52
+ };
53
+
54
+ // 设置默认参数
55
+ FefferySetFavicon.defaultProps = {
56
+ }
57
+
58
+ export default FefferySetFavicon;
@@ -1,20 +1,30 @@
1
+ import { useEffect } from 'react';
1
2
  import { useTitle } from 'ahooks';
2
3
  import PropTypes from 'prop-types';
3
4
 
4
- // 定义页面title设置组件FefferySetTitle
5
+ /**
6
+ * 页面title设置组件FefferySetTitle
7
+ */
5
8
  const FefferySetTitle = (props) => {
6
9
 
7
10
  const {
8
- id,
9
11
  title,
12
+ originTitle,
10
13
  setProps,
11
14
  loading_state
12
15
  } = props;
13
16
 
14
- // 随着title更新进而改变页面title
15
- if (title) {
16
- useTitle(title)
17
- }
17
+ // 组件卸载时,还原有效的originTitle
18
+ useEffect(() => {
19
+ return () => {
20
+ if (originTitle) {
21
+ document.title = originTitle;
22
+ }
23
+ }
24
+ }, [])
25
+
26
+ // 处理title变化时的更新
27
+ useTitle(title || originTitle);
18
28
 
19
29
  return <></>;
20
30
  }
@@ -31,6 +41,11 @@ FefferySetTitle.propTypes = {
31
41
  */
32
42
  title: PropTypes.string,
33
43
 
44
+ /**
45
+ * 当title参数为空,或当前组件从页面中卸载后应当还原的title
46
+ */
47
+ originTitle: PropTypes.string,
48
+
34
49
  /**
35
50
  * Dash-assigned callback that should be called to report property changes
36
51
  * to Dash, to make them available for callbacks.
@@ -0,0 +1,160 @@
1
+ import React, { Suspense } from 'react';
2
+ import PropTypes from 'prop-types';
3
+
4
+ const LazyFefferySliderCaptcha = React.lazy(() => import(/* webpackChunkName: "feffery_slider_captcha" */ '../fragments/FefferySliderCaptcha.react'));
5
+
6
+ const FefferySliderCaptcha = (props) => {
7
+ return (
8
+ <Suspense fallback={null}>
9
+ <LazyFefferySliderCaptcha {...props} />
10
+ </Suspense>
11
+ );
12
+ }
13
+
14
+ FefferySliderCaptcha.propTypes = {
15
+ /**
16
+ * 组件id
17
+ */
18
+ id: PropTypes.string,
19
+
20
+ /**
21
+ * css类名
22
+ */
23
+ className: PropTypes.string,
24
+
25
+ /**
26
+ * css样式
27
+ */
28
+ style: PropTypes.object,
29
+
30
+ /**
31
+ * 用于生成拼图的完整图片地址
32
+ */
33
+ imgSrc: PropTypes.string,
34
+
35
+ /**
36
+ * 声明用于生成拼图的完整图片像素宽度值
37
+ */
38
+ imgWidth: PropTypes.number,
39
+
40
+ /**
41
+ * 拼图合法验证像素偏移量
42
+ * 默认值:`5`
43
+ */
44
+ xOffset: PropTypes.number,
45
+
46
+ /**
47
+ * 显示模式,可选项有`'embed'`、`'float'`、`'slider'`
48
+ * 默认值:`'embed'`
49
+ */
50
+ mode: PropTypes.oneOf(['embed', 'float', 'slider']),
51
+
52
+ /**
53
+ * 配置相关文案提示内容
54
+ */
55
+ tipText: PropTypes.exact({
56
+ /**
57
+ * 默认提示内容
58
+ */
59
+ default: PropTypes.node,
60
+ /**
61
+ * 加载中提示内容
62
+ */
63
+ loading: PropTypes.node,
64
+ /**
65
+ * 移动中提示内容
66
+ */
67
+ moving: PropTypes.node,
68
+ /**
69
+ * 验证中提示内容
70
+ */
71
+ verifying: PropTypes.node,
72
+ /**
73
+ * 验证成功提示内容
74
+ */
75
+ success: PropTypes.node,
76
+ /**
77
+ * 验证失败提示内容
78
+ */
79
+ error: PropTypes.node
80
+ }),
81
+
82
+ /**
83
+ * 显示右上角刷新按钮
84
+ * 默认值:`true`
85
+ */
86
+ showRefreshIcon: PropTypes.bool,
87
+
88
+ /**
89
+ * 验证失败后是否自动刷新
90
+ * 默认值:`true`
91
+ */
92
+ autoRefreshOnError: PropTypes.bool,
93
+
94
+ /**
95
+ * 当`autoRefreshOnError=True`时,每次验证失败后停顿多少毫秒自动刷新
96
+ * 默认值:`500`
97
+ */
98
+ errorHoldDuration: PropTypes.number,
99
+
100
+ /**
101
+ * 拼图图片显示方位,可选项有`'top'`、`'bottom'`
102
+ * 默认值:`'top'`
103
+ */
104
+ placement: PropTypes.oneOf(['top', 'bottom']),
105
+
106
+ /**
107
+ * 手动刷新用,每次更新为`True`时会主动触发刷新,每次成功刷新后会重置为`False`
108
+ */
109
+ refresh: PropTypes.bool,
110
+
111
+ /**
112
+ * 监听最近一次验证结果
113
+ */
114
+ verifyResult: PropTypes.exact({
115
+ /**
116
+ * 验证状态,`'success'`表示验证成功,`'error'`表示验证失败
117
+ */
118
+ status: PropTypes.oneOf(['success', 'error']),
119
+ /**
120
+ * 事件发生时间戳
121
+ */
122
+ timestamp: PropTypes.number
123
+ }),
124
+
125
+ loading_state: PropTypes.shape({
126
+ /**
127
+ * Determines if the component is loading or not
128
+ */
129
+ is_loading: PropTypes.bool,
130
+ /**
131
+ * Holds which property is loading
132
+ */
133
+ prop_name: PropTypes.string,
134
+ /**
135
+ * Holds the name of the component that is loading
136
+ */
137
+ component_name: PropTypes.string
138
+ }),
139
+
140
+ /**
141
+ * Dash-assigned callback that should be called to report property changes
142
+ * to Dash, to make them available for callbacks.
143
+ */
144
+ setProps: PropTypes.func
145
+ };
146
+
147
+ // 设置默认参数
148
+ FefferySliderCaptcha.defaultProps = {
149
+ xOffset: 5,
150
+ mode: 'embed',
151
+ showRefreshIcon: true,
152
+ autoRefreshOnError: true,
153
+ errorHoldDuration: 500,
154
+ placement: 'top'
155
+ }
156
+
157
+ export default FefferySliderCaptcha;
158
+
159
+ export const propTypes = FefferySliderCaptcha.propTypes;
160
+ export const defaultProps = FefferySliderCaptcha.defaultProps;