@dakataa/crud-react 1.0.0 → 1.0.2

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 (84) hide show
  1. package/dist/crud-react.css +5 -0
  2. package/dist/crud-react.js +14467 -0
  3. package/dist/denied-CgoMpaA7.js +27 -0
  4. package/dist/info-D-NzIEYs.js +144 -0
  5. package/dist/main.d.ts +19 -0
  6. package/dist/success-Bu_BJcf1.js +27 -0
  7. package/dist/warning-B1nr7TsB.js +27 -0
  8. package/package.json +14 -4
  9. package/.env +0 -3
  10. package/babel-plugin-macros.config.js +0 -5
  11. package/index.html +0 -12
  12. package/public/favicon.ico +0 -0
  13. package/public/logo192.png +0 -0
  14. package/public/logo512.png +0 -0
  15. package/public/manifest.json +0 -25
  16. package/public/robots.txt +0 -3
  17. package/src/Crud.tsx +0 -29
  18. package/src/CrudContext.tsx +0 -21
  19. package/src/CrudLoader.tsx +0 -27
  20. package/src/assets/images/alert/denied.json +0 -1
  21. package/src/assets/images/alert/info.json +0 -1
  22. package/src/assets/images/alert/success.json +0 -1
  23. package/src/assets/images/alert/warning.json +0 -1
  24. package/src/assets/style/alert.scss +0 -97
  25. package/src/component/Animation.tsx +0 -50
  26. package/src/component/BaseButton.tsx +0 -26
  27. package/src/component/Button.tsx +0 -15
  28. package/src/component/Dropdown.tsx +0 -55
  29. package/src/component/EmptyView.tsx +0 -5
  30. package/src/component/Link.tsx +0 -11
  31. package/src/component/Modal.tsx +0 -174
  32. package/src/component/ModifyForm.tsx +0 -139
  33. package/src/component/TemplateBlock.tsx +0 -21
  34. package/src/component/TemplateExtend.tsx +0 -17
  35. package/src/component/TemplateParentBlock.tsx +0 -7
  36. package/src/component/Translation.tsx +0 -7
  37. package/src/component/ViewLoader.tsx +0 -33
  38. package/src/component/crud/DynamicView.tsx +0 -42
  39. package/src/component/crud/FormView.tsx +0 -29
  40. package/src/component/crud/GridTableView.tsx +0 -205
  41. package/src/component/crud/PaginatorView.tsx +0 -80
  42. package/src/component/error/ErrorBoundary.tsx +0 -78
  43. package/src/component/error/Exception.tsx +0 -17
  44. package/src/component/error/HttpException.tsx +0 -24
  45. package/src/component/form/Choice.tsx +0 -119
  46. package/src/component/form/Form.tsx +0 -233
  47. package/src/component/form/FormAlert.tsx +0 -19
  48. package/src/component/form/FormFieldError.tsx +0 -16
  49. package/src/component/form/FormGroup.tsx +0 -53
  50. package/src/component/form/FormWidget.tsx +0 -34
  51. package/src/component/form/Input.tsx +0 -63
  52. package/src/component/form/constraint/Contraint.tsx +0 -8
  53. package/src/component/form/constraint/NotBlank.tsx +0 -20
  54. package/src/component/hooks/GetData.tsx +0 -137
  55. package/src/context/ActionContext.tsx +0 -99
  56. package/src/context/AlertContext.tsx +0 -181
  57. package/src/context/ModalContext.tsx +0 -56
  58. package/src/context/SessionContext.tsx +0 -97
  59. package/src/helper/ObjectUtils.tsx +0 -36
  60. package/src/helper/RouterUtils.tsx +0 -24
  61. package/src/helper/StingUtils.tsx +0 -25
  62. package/src/index.tsx +0 -23
  63. package/src/layout/default/Base.tsx +0 -15
  64. package/src/layout/default/Error.tsx +0 -27
  65. package/src/layout/default/Main.tsx +0 -64
  66. package/src/layout/default/component/Navigation.tsx +0 -197
  67. package/src/page/List.tsx +0 -268
  68. package/src/page/Modify.tsx +0 -156
  69. package/src/react-app-env.d.ts +0 -2
  70. package/src/setupTests.ts +0 -5
  71. package/src/type/ActionType.tsx +0 -10
  72. package/src/type/ColumnType.tsx +0 -18
  73. package/src/type/ExceptionType.tsx +0 -7
  74. package/src/type/FormType.tsx +0 -6
  75. package/src/type/FormViewType.tsx +0 -37
  76. package/src/type/ListMetaType.tsx +0 -7
  77. package/src/type/ListType.tsx +0 -20
  78. package/src/type/ModifyType.tsx +0 -10
  79. package/src/type/RedirectType.tsx +0 -6
  80. package/src/type/RouteType.tsx +0 -5
  81. package/tsconfig.app.json +0 -46
  82. package/tsconfig.json +0 -11
  83. package/tsconfig.node.json +0 -15
  84. package/vite.config.ts +0 -33
@@ -1,37 +0,0 @@
1
- export type FormViewType = {
2
- id: string;
3
- name: string;
4
- full_name: string
5
- label: string | undefined;
6
- label_attr?: { [key: string]: string } | Function;
7
- label_html?: boolean;
8
- placeholder?: string | undefined;
9
- placeholder_attr?: { [key: string]: string } | Function;
10
- placeholder_in_choices?: boolean;
11
- help?: string | null | undefined;
12
- help_attr?: { [key: string]: string } | Function;
13
- help_html?: boolean;
14
- disabled?: boolean;
15
- required?: boolean;
16
- submitted?: boolean;
17
- expanded?: boolean;
18
- multiple?: boolean;
19
- checked?: boolean;
20
- priority?: number;
21
- type: 'form' | string;
22
- valid?: boolean;
23
- errors?: string[];
24
- children?: { [key: string]: FormViewType };
25
- choices?: ChoiceType[];
26
- choice_attr?: {[key: string]: {[key: string]: string}} | Function
27
- preferred_choices?: { [key: string]: any };
28
- attr?: { [key: string]: string } | Function;
29
- data?: any;
30
- rendered?: boolean;
31
- }
32
-
33
- export type ChoiceType = {
34
- value: string | number | null | Function;
35
- label: string | (() => string);
36
- attr?: {[key: string]: {[key: string]: string}} | Function;
37
- }
@@ -1,7 +0,0 @@
1
- export type ListMetaType = {
2
- links: number[];
3
- maxResults: number;
4
- page: number;
5
- totalPages: number;
6
- totalResults: number;
7
- }
@@ -1,20 +0,0 @@
1
- import {ColumnType} from "@src/type/ColumnType";
2
- import {ActionType} from "@src/type/ActionType";
3
- import {ListMetaType} from "@src/type/ListMetaType";
4
- import {FormType} from "@src/type/FormType";
5
-
6
- export type ListType = {
7
- title: string | null;
8
- entity: {
9
- name: string;
10
- columns: ColumnType[];
11
- primaryColumn: ColumnType;
12
- data: {
13
- items: [{ [key: string]: any }],
14
- meta: ListMetaType
15
- }
16
- },
17
- form: { [key: string]: FormType, filter: FormType, batch: FormType },
18
- sort: { [key: string]: 'ASC' | 'DESC' | null },
19
- action: { [key: string]: ActionType }
20
- }
@@ -1,10 +0,0 @@
1
- import {FormType} from "@src/type/FormType";
2
- import {RedirectType} from "@src/type/RedirectType";
3
-
4
- export type ModifyType = {
5
- title: string | null;
6
- object: { [key: string]: any } | null,
7
- form: { [key: string]: FormType },
8
- messages: { [key: string]: string[] },
9
- redirect?: RedirectType
10
- }
@@ -1,6 +0,0 @@
1
- import {RouteType} from "@src/type/RouteType";
2
-
3
- export type RedirectType = {
4
- route: RouteType;
5
- parameters: {[key: string]: string};
6
- }
@@ -1,5 +0,0 @@
1
- export type RouteType = {
2
- path: string;
3
- defaults?: {[key:string]: string};
4
- methods?: string[];
5
- }
package/tsconfig.app.json DELETED
@@ -1,46 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
5
- "target": "ES2020",
6
- "useDefineForClassFields": true,
7
- "lib": [
8
- "ESNext",
9
- "DOM",
10
- "DOM.Iterable"
11
- ],
12
- "module": "ESNext",
13
- "skipLibCheck": true,
14
- "types": [
15
- "react",
16
- "vite/client"
17
- ],
18
-
19
- /* Bundler mode */
20
- "moduleResolution": "bundler",
21
- "allowImportingTsExtensions": true,
22
- "resolveJsonModule": true,
23
- "isolatedModules": true,
24
- "moduleDetection": "force",
25
- "noEmit": true,
26
- "jsx": "react-jsx",
27
-
28
- /* Linting */
29
- "strict": true,
30
- "noUnusedLocals": false,
31
- "noUnusedParameters": false,
32
- "noFallthroughCasesInSwitch": true,
33
- /* Paths */
34
- "baseUrl": ".",
35
- "paths": {
36
- "@src/*": [
37
- "./src/*"
38
- ]
39
- },
40
- "allowSyntheticDefaultImports": true
41
- },
42
- "include": [
43
- "src",
44
- "crud"
45
- ]
46
- }
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- {
5
- "path": "./tsconfig.app.json"
6
- },
7
- {
8
- "path": "./tsconfig.node.json"
9
- }
10
- ]
11
- }
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "composite": true,
4
- "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
5
- "skipLibCheck": true,
6
- "module": "ESNext",
7
- "moduleResolution": "bundler",
8
- "allowSyntheticDefaultImports": true,
9
- "strict": true,
10
- "noEmit": true
11
- },
12
- "include": [
13
- "vite.config.ts"
14
- ]
15
- }
package/vite.config.ts DELETED
@@ -1,33 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import react from '@vitejs/plugin-react';
3
- import tsconfigPaths from 'vite-tsconfig-paths'
4
- import path, {join} from "path";
5
-
6
- export default defineConfig(() => {
7
- return {
8
- build: {
9
- outDir: 'build',
10
- },
11
- plugins: [react(), tsconfigPaths()],
12
- envPrefix: 'CRUD_',
13
- resolve: {
14
- alias: [
15
- {
16
- find: /~(.+)/,
17
- replacement: join(process.cwd(), 'node_modules/$1'),
18
- },
19
- {
20
- find: /^@crud\/(.+)/,
21
- replacement: join(process.cwd(), '/crud/$1'),
22
- },
23
- {
24
- find: /^@src\/(.+)/,
25
- replacement: join(process.cwd(), '/src/$1'),
26
- }
27
- ]
28
- },
29
- optimizeDeps: {
30
- exclude: ['@dakataa/requester']
31
- }
32
- };
33
- });