dphelper 0.2.86 → 0.2.89
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/.editorconfig +13 -0
- package/.env +3 -0
- package/.eslintignore +13 -0
- package/.eslintrc.json +87 -0
- package/.eslintrc.legacy.json +91 -0
- package/.gitattributes +2 -0
- package/.hintrc +11 -0
- package/.jsbeautifyrc +25 -0
- package/.jshintrc +16 -0
- package/.prettierignore +2 -0
- package/.prettierrc.json +8 -0
- package/.stylelintignore +0 -0
- package/.stylelintrc.json +468 -0
- package/.vscode/launch.json +34 -0
- package/.vscode/settings.json +58 -0
- package/3party/shortcut.js +224 -0
- package/CHANGELOG.txt +4 -0
- package/SECURITY.md +3 -0
- package/__mocks__/fileMock.js +3 -0
- package/__mocks__/styleMock.js +3 -0
- package/babel.config.js +30 -0
- package/backup.bat +43 -0
- package/coverage/coverage-final.json +1 -0
- package/coverage/lcov-report/base.css +224 -0
- package/coverage/lcov-report/block-navigation.js +87 -0
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +101 -0
- package/coverage/lcov-report/prettify.css +1 -0
- package/coverage/lcov-report/prettify.js +2 -0
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +196 -0
- package/coverage/lcov.info +0 -0
- package/data/list.json +19 -0
- package/dist/LICENSE.txt +209 -0
- package/dist/README.md +79 -0
- package/elements/button/component.js +0 -0
- package/elements/code/component.js +0 -0
- package/elements/costants.tsx +13 -0
- package/elements/fieldset/component.js +0 -0
- package/elements/input/checkbox/component.js +0 -0
- package/elements/input/date/component.js +27 -0
- package/elements/input/number/component.js +0 -0
- package/elements/input/radio/component.js +0 -0
- package/elements/input/search/component.js +0 -0
- package/elements/input/select/component.js +0 -0
- package/elements/input/slider/component.js +0 -0
- package/elements/input/switch/component.js +0 -0
- package/elements/tab/component.js +0 -0
- package/elements/table/component.js +0 -0
- package/elements/tags.less +0 -0
- package/elements/textarea/component.js +0 -0
- package/elements/x-foo/define.js +33 -0
- package/elements/x-foo/namespace.d.ts +7 -0
- package/index.js +12 -2
- package/init.js +87 -0
- package/jest.config.js +81 -0
- package/node/createTag.js +7 -0
- package/node/gitDeploy.js +7 -0
- package/node/goLive.js +7 -0
- package/package.json +27 -20
- package/{assets → public/assets}/images/banner.png +0 -0
- package/{assets → public/assets}/logos/logo.svg +0 -0
- package/{documents → public/documents}/iDB/list.html +0 -0
- package/{documents → public/documents}/iDB/toState.html +0 -0
- package/scripts/.OLD/import.js +48 -0
- package/scripts/anchor.js +73 -0
- package/scripts/array.js +203 -0
- package/scripts/avoid.js +48 -0
- package/scripts/browser.js +100 -0
- package/scripts/color.js +121 -0
- package/scripts/console.js +97 -0
- package/scripts/console.mapped.js +160 -0
- package/scripts/coods.js +57 -0
- package/scripts/cookie.js +105 -0
- package/scripts/date.js +179 -0
- package/scripts/disable.js +91 -0
- package/scripts/errors.js +3 -0
- package/scripts/event.js +57 -0
- package/scripts/font.js +60 -0
- package/scripts/form.js +211 -0
- package/scripts/format.js +71 -0
- package/scripts/function.js +55 -0
- package/scripts/iDB.js +688 -0
- package/scripts/json.js +84 -0
- package/scripts/load.js +112 -0
- package/scripts/math.js +100 -0
- package/scripts/obj.js +118 -0
- package/scripts/path.js +101 -0
- package/scripts/promise.js +56 -0
- package/scripts/screen.js +82 -0
- package/scripts/scrollbar.js +293 -0
- package/scripts/shortcut.js +83 -0
- package/scripts/socket.js +184 -0
- package/scripts/state.js +87 -0
- package/scripts/storage.js +93 -0
- package/scripts/store.js +115 -0
- package/scripts/svg.js +380 -0
- package/scripts/text.js +116 -0
- package/scripts/time.js +43 -0
- package/scripts/timer.js +54 -0
- package/scripts/tool.js +73 -0
- package/scripts/trigger.js +57 -0
- package/scripts/type.js +76 -0
- package/scripts/ui.js +41 -0
- package/scripts/window.js +244 -0
- package/styles/console.less +95 -0
- package/tests/setupJest.tsx +4 -0
- package/typings/dphelper.d.ts +26 -0
- package/typings/image.d.ts +5 -0
- package/typings/styles.d.ts +23 -0
- package/webpack.config.js +249 -0
- package/index.js.LICENSE.txt +0 -31
package/.editorconfig
ADDED
package/.env
ADDED
package/.eslintignore
ADDED
package/.eslintrc.json
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
|
|
4
|
+
"env": {
|
|
5
|
+
"es2021": true,
|
|
6
|
+
"browser": true,
|
|
7
|
+
"node": true,
|
|
8
|
+
"jest": true
|
|
9
|
+
},
|
|
10
|
+
|
|
11
|
+
"parser": "@typescript-eslint/parser",
|
|
12
|
+
|
|
13
|
+
"parserOptions": {
|
|
14
|
+
"ecmaVersion": "latest",
|
|
15
|
+
"sourceType": "module",
|
|
16
|
+
"parser": "babel-eslint",
|
|
17
|
+
"ecmaFeatures": {
|
|
18
|
+
"modules": true,
|
|
19
|
+
"impliedStrict": true,
|
|
20
|
+
"jsx": true,
|
|
21
|
+
"experimentalObjectRestSpread": true
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
"globals": {
|
|
26
|
+
"jQuery": true,
|
|
27
|
+
"$": true,
|
|
28
|
+
"dphelper": true,
|
|
29
|
+
"menupro": true,
|
|
30
|
+
"layerpro": true,
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
"settings": {
|
|
34
|
+
"react": {
|
|
35
|
+
"version": "detect"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
"plugins": [
|
|
40
|
+
"react",
|
|
41
|
+
"@typescript-eslint",
|
|
42
|
+
"import",
|
|
43
|
+
"node",
|
|
44
|
+
"promise",
|
|
45
|
+
"jest"
|
|
46
|
+
],
|
|
47
|
+
|
|
48
|
+
"extends": [
|
|
49
|
+
"eslint:recommended",
|
|
50
|
+
"plugin:react/recommended",
|
|
51
|
+
"plugin:@typescript-eslint/recommended",
|
|
52
|
+
"plugin:node/recommended",
|
|
53
|
+
"plugin:promise/recommended",
|
|
54
|
+
"plugin:jest/recommended"
|
|
55
|
+
],
|
|
56
|
+
|
|
57
|
+
"rules": {
|
|
58
|
+
"allow": [
|
|
59
|
+
"arrowFunctions",
|
|
60
|
+
"generatorFunctions",
|
|
61
|
+
"methods",
|
|
62
|
+
"generatorMethods",
|
|
63
|
+
"getters",
|
|
64
|
+
"setters",
|
|
65
|
+
"asyncFunctions",
|
|
66
|
+
"asyncMethods"
|
|
67
|
+
],
|
|
68
|
+
"no-empty": 0,
|
|
69
|
+
"no-console": 0,
|
|
70
|
+
"no-process-exit": 0,
|
|
71
|
+
"no-underscore-dangle":["off"],
|
|
72
|
+
"no-plusplus":["warn",{"allowForLoopAfterthoughts": true}],
|
|
73
|
+
"no-param-reassign":["off"],
|
|
74
|
+
"no-prototype-builtins":["off"],
|
|
75
|
+
"no-unused-vars":["warn"],
|
|
76
|
+
"unicorn/no-process-exit": 0,
|
|
77
|
+
"comma-dangle": 0,
|
|
78
|
+
"semi": ["error","never"],
|
|
79
|
+
"consistent-return":["off"],
|
|
80
|
+
"max-nested-callbacks":["warn",3],
|
|
81
|
+
"import/no-mutable-exports":["warn"],
|
|
82
|
+
"valid-jsdoc":["warn",{"prefer": { "returns": "return","property": "prop"},"requireReturn": false}],
|
|
83
|
+
"operator-linebreak":["error","after",{"overrides": {"?": "ignore",":": "ignore"}}]
|
|
84
|
+
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "eslint:recommended",
|
|
3
|
+
"root": true,
|
|
4
|
+
"env": {
|
|
5
|
+
"browser": true
|
|
6
|
+
},
|
|
7
|
+
"globals": {
|
|
8
|
+
"domready": true,
|
|
9
|
+
"jQuery": true,
|
|
10
|
+
"_": true,
|
|
11
|
+
"matchMedia": true,
|
|
12
|
+
"Backbone": true,
|
|
13
|
+
"Modernizr": true,
|
|
14
|
+
"CKEDITOR": true
|
|
15
|
+
},
|
|
16
|
+
"rules": {
|
|
17
|
+
"array-bracket-spacing": ["error", "never"],
|
|
18
|
+
"block-scoped-var": "error",
|
|
19
|
+
"brace-style": ["error", "stroustrup", {"allowSingleLine": true}],
|
|
20
|
+
"comma-dangle": ["error", "never"],
|
|
21
|
+
"comma-spacing": "error",
|
|
22
|
+
"comma-style": ["error", "last"],
|
|
23
|
+
"computed-property-spacing": ["error", "never"],
|
|
24
|
+
"curly": ["error", "all"],
|
|
25
|
+
"eol-last": "error",
|
|
26
|
+
"eqeqeq": ["error", "smart"],
|
|
27
|
+
"guard-for-in": "error",
|
|
28
|
+
"indent": ["error", 2, {"SwitchCase": 1}],
|
|
29
|
+
"key-spacing": ["error", {"beforeColon": false, "afterColon": true}],
|
|
30
|
+
"keyword-spacing": ["error", {"before": true, "after": true}],
|
|
31
|
+
"linebreak-style": ["error", "unix"],
|
|
32
|
+
"lines-around-comment": ["error", {"beforeBlockComment": true, "afterBlockComment": false}],
|
|
33
|
+
"new-parens": "error",
|
|
34
|
+
"no-array-constructor": "error",
|
|
35
|
+
"no-caller": "error",
|
|
36
|
+
"no-catch-shadow": "error",
|
|
37
|
+
"no-eval": "error",
|
|
38
|
+
"no-extend-native": "error",
|
|
39
|
+
"no-extra-bind": "error",
|
|
40
|
+
"no-extra-parens": ["error", "functions"],
|
|
41
|
+
"no-implied-eval": "error",
|
|
42
|
+
"no-iterator": "error",
|
|
43
|
+
"no-label-var": "error",
|
|
44
|
+
"no-labels": "error",
|
|
45
|
+
"no-lone-blocks": "error",
|
|
46
|
+
"no-loop-func": "error",
|
|
47
|
+
"no-multi-spaces": "error",
|
|
48
|
+
"no-multi-str": "error",
|
|
49
|
+
"no-native-reassign": "error",
|
|
50
|
+
"no-nested-ternary": "error",
|
|
51
|
+
"no-new-func": "error",
|
|
52
|
+
"no-new-object": "error",
|
|
53
|
+
"no-new-wrappers": "error",
|
|
54
|
+
"no-octal-escape": "error",
|
|
55
|
+
"no-process-exit": "error",
|
|
56
|
+
"no-proto": "error",
|
|
57
|
+
"no-return-assign": "error",
|
|
58
|
+
"no-script-url": "error",
|
|
59
|
+
"no-sequences": "error",
|
|
60
|
+
"no-shadow-restricted-names": "error",
|
|
61
|
+
"no-spaced-func": "error",
|
|
62
|
+
"no-trailing-spaces": "error",
|
|
63
|
+
"no-undef-init": "error",
|
|
64
|
+
"no-undefined": "error",
|
|
65
|
+
"no-unused-expressions": "error",
|
|
66
|
+
"no-unused-vars": ["error", {"vars": "all", "args": "none"}],
|
|
67
|
+
"no-with": "error",
|
|
68
|
+
"object-curly-spacing": ["error", "never"],
|
|
69
|
+
"one-var": ["error", "never"],
|
|
70
|
+
"quote-props": ["error", "consistent-as-needed"],
|
|
71
|
+
"quotes": ["error", "single", "avoid-escape"],
|
|
72
|
+
"semi": ["error", "always"],
|
|
73
|
+
"semi-spacing": ["error", {"before": false, "after": true}],
|
|
74
|
+
"space-before-blocks": ["error", "always"],
|
|
75
|
+
"space-before-function-paren": ["error", {"anonymous": "always", "named": "never"}],
|
|
76
|
+
"space-in-parens": ["error", "never"],
|
|
77
|
+
"space-infix-ops": "error",
|
|
78
|
+
"space-unary-ops": ["error", { "words": true, "nonwords": false }],
|
|
79
|
+
"spaced-comment": ["error", "always"],
|
|
80
|
+
"strict": ["error", "function"],
|
|
81
|
+
"yoda": ["error", "never"],
|
|
82
|
+
"max-nested-callbacks": ["warn", 3],
|
|
83
|
+
"valid-jsdoc": ["warn", {
|
|
84
|
+
"prefer": {
|
|
85
|
+
"returns": "return",
|
|
86
|
+
"property": "prop"
|
|
87
|
+
},
|
|
88
|
+
"requireReturn": false
|
|
89
|
+
}]
|
|
90
|
+
}
|
|
91
|
+
}
|
package/.gitattributes
ADDED
package/.hintrc
ADDED
package/.jsbeautifyrc
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"js":
|
|
3
|
+
{
|
|
4
|
+
"allowed_file_extensions": ["js", "jsx", "ts", "tsx", "json", "jshintrc", "jsbeautifyrc"],
|
|
5
|
+
"brace_style": "collapse-preserve-inline",
|
|
6
|
+
"break_chained_methods": false,
|
|
7
|
+
"e4x": false,
|
|
8
|
+
"end_with_newline": true,
|
|
9
|
+
"indent_char": " ",
|
|
10
|
+
"indent_level": 0,
|
|
11
|
+
"indent_size": 2,
|
|
12
|
+
"indent_with_tabs": false,
|
|
13
|
+
"jslint_happy": true,
|
|
14
|
+
"keep_array_indentation": false,
|
|
15
|
+
"keep_function_indentation": false,
|
|
16
|
+
"max_preserve_newlines": 2,
|
|
17
|
+
"preserve_newlines": true,
|
|
18
|
+
"space_after_anon_function": false,
|
|
19
|
+
"space_before_conditional": true,
|
|
20
|
+
"space_in_empty_paren": false,
|
|
21
|
+
"space_in_paren": false,
|
|
22
|
+
"unescape_strings": false,
|
|
23
|
+
"wrap_line_length": 0
|
|
24
|
+
}
|
|
25
|
+
}
|
package/.jshintrc
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"esversion": 2021,
|
|
3
|
+
"sub": true,
|
|
4
|
+
"asi": false,
|
|
5
|
+
"esnext": false,
|
|
6
|
+
"moz": true,
|
|
7
|
+
"browser": true,
|
|
8
|
+
"boss": true,
|
|
9
|
+
"node": true,
|
|
10
|
+
"validthis": true,
|
|
11
|
+
"globals": {
|
|
12
|
+
"EventEmitter": true,
|
|
13
|
+
"Promise": true,
|
|
14
|
+
"document": true
|
|
15
|
+
}
|
|
16
|
+
}
|
package/.prettierignore
ADDED
package/.prettierrc.json
ADDED
package/.stylelintignore
ADDED
|
File without changes
|