dce-reactkit 3.0.0-beta.3 → 3.0.0-beta.30

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 (41) hide show
  1. package/.eslintrc.js +95 -0
  2. package/dist/cjs/index.js +786 -35684
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/cjs/types/components/AppWrapper.d.ts +26 -1
  5. package/dist/cjs/types/components/TabBox.d.ts +1 -0
  6. package/dist/cjs/types/helpers/genRouteHandler.d.ts +30 -0
  7. package/dist/cjs/types/helpers/handleError.d.ts +18 -0
  8. package/dist/cjs/types/helpers/handleSuccess.d.ts +8 -0
  9. package/dist/cjs/types/helpers/visitServerEndpoint.d.ts +23 -0
  10. package/dist/cjs/types/index.d.ts +7 -1
  11. package/dist/cjs/types/server/initServer.d.ts +21 -0
  12. package/dist/cjs/types/types/ParamType.d.ts +17 -0
  13. package/dist/cjs/types/types/ReactKitErrorCode.d.ts +3 -1
  14. package/dist/esm/index.js +716 -35602
  15. package/dist/esm/index.js.map +1 -1
  16. package/dist/esm/types/components/AppWrapper.d.ts +26 -1
  17. package/dist/esm/types/components/TabBox.d.ts +1 -0
  18. package/dist/esm/types/helpers/genRouteHandler.d.ts +30 -0
  19. package/dist/esm/types/helpers/handleError.d.ts +18 -0
  20. package/dist/esm/types/helpers/handleSuccess.d.ts +8 -0
  21. package/dist/esm/types/helpers/visitServerEndpoint.d.ts +23 -0
  22. package/dist/esm/types/index.d.ts +7 -1
  23. package/dist/esm/types/server/initServer.d.ts +21 -0
  24. package/dist/esm/types/types/ParamType.d.ts +17 -0
  25. package/dist/esm/types/types/ReactKitErrorCode.d.ts +3 -1
  26. package/dist/index.d.ts +125 -3
  27. package/package.json +13 -3
  28. package/rollup.config.js +0 -1
  29. package/src/components/AppWrapper.tsx +71 -12
  30. package/src/components/ErrorBox.tsx +4 -4
  31. package/src/components/LoadingSpinner.tsx +3 -3
  32. package/src/components/Modal.tsx +213 -97
  33. package/src/components/TabBox.tsx +65 -58
  34. package/src/helpers/genRouteHandler.ts +326 -0
  35. package/src/helpers/handleError.ts +65 -0
  36. package/src/helpers/handleSuccess.ts +18 -0
  37. package/src/helpers/visitServerEndpoint.tsx +110 -0
  38. package/src/index.ts +15 -0
  39. package/src/server/initServer.ts +53 -0
  40. package/src/types/ParamType.tsx +18 -0
  41. package/src/types/ReactKitErrorCode.tsx +3 -1
package/.eslintrc.js ADDED
@@ -0,0 +1,95 @@
1
+ const config = {
2
+ extends: [
3
+ 'airbnb',
4
+ 'airbnb/hooks',
5
+ 'react-app',
6
+ 'react-app/jest',
7
+ ],
8
+ overrides: [
9
+ {
10
+ files: [
11
+ '*.ts',
12
+ '*.tsx',
13
+ ],
14
+ extends: [
15
+ 'airbnb-typescript',
16
+ ],
17
+ parserOptions: {
18
+ project: './tsconfig.json',
19
+ tsconfigRootDir: __dirname,
20
+ sourceType: 'module',
21
+ },
22
+ rules: {
23
+ '@typescript-eslint/lines-between-class-members': 'off',
24
+ '@typescript-eslint/no-unused-expressions': 'off',
25
+ },
26
+ },
27
+ ],
28
+ rules: {
29
+ 'arrow-body-style': [
30
+ 'warn',
31
+ 'always',
32
+ ],
33
+ 'react/prop-types': 'off',
34
+ 'react/function-component-definition': [
35
+ 2,
36
+ {
37
+ namedComponents: 'arrow-function',
38
+ },
39
+ ],
40
+ 'no-spaced-func': 'off',
41
+ 'react-hooks/exhaustive-deps': 'off',
42
+ 'lines-between-class-members': 'off',
43
+ 'no-case-declarations': 'off',
44
+ 'react/require-default-props': 'off',
45
+ 'react/react-in-jsx-scope': 'off',
46
+ 'arrow-parens': [
47
+ 'warn',
48
+ 'always',
49
+ ],
50
+ 'comma-dangle': [
51
+ 'error',
52
+ {
53
+ arrays: 'always-multiline',
54
+ objects: 'always-multiline',
55
+ imports: 'always-multiline',
56
+ exports: 'always-multiline',
57
+ functions: 'always-multiline',
58
+ },
59
+ ],
60
+ 'consistent-return': 'off',
61
+ 'id-length': 'off',
62
+ 'max-len': [
63
+ 'error',
64
+ {
65
+ code: 125,
66
+ ignoreStrings: true,
67
+ ignoreTemplateLiterals: true,
68
+ ignoreUrls: true,
69
+ },
70
+ ],
71
+ 'newline-per-chained-call': [
72
+ 'error',
73
+ {
74
+ ignoreChainWithDepth: 2,
75
+ },
76
+ ],
77
+ 'no-plusplus': [
78
+ 'warn',
79
+ {
80
+ allowForLoopAfterthoughts: true,
81
+ },
82
+ ],
83
+ 'prefer-template': 1,
84
+ radix: 'error',
85
+ 'no-await-in-loop': 'off',
86
+ 'max-params': [
87
+ 'warn',
88
+ {
89
+ max: 3,
90
+ },
91
+ ],
92
+ },
93
+ };
94
+
95
+ module.exports = config;