@dakataa/crud-react 1.0.0 → 1.0.1
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/dist/crud-react.css +5 -0
- package/dist/crud-react.js +14467 -0
- package/dist/denied-CgoMpaA7.js +27 -0
- package/dist/info-D-NzIEYs.js +144 -0
- package/dist/main.d.ts +19 -0
- package/dist/success-Bu_BJcf1.js +27 -0
- package/dist/warning-B1nr7TsB.js +27 -0
- package/package.json +11 -3
- package/.env +0 -3
- package/babel-plugin-macros.config.js +0 -5
- package/index.html +0 -12
- package/public/favicon.ico +0 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +0 -25
- package/public/robots.txt +0 -3
- package/src/Crud.tsx +0 -29
- package/src/CrudContext.tsx +0 -21
- package/src/CrudLoader.tsx +0 -27
- package/src/assets/images/alert/denied.json +0 -1
- package/src/assets/images/alert/info.json +0 -1
- package/src/assets/images/alert/success.json +0 -1
- package/src/assets/images/alert/warning.json +0 -1
- package/src/assets/style/alert.scss +0 -97
- package/src/component/Animation.tsx +0 -50
- package/src/component/BaseButton.tsx +0 -26
- package/src/component/Button.tsx +0 -15
- package/src/component/Dropdown.tsx +0 -55
- package/src/component/EmptyView.tsx +0 -5
- package/src/component/Link.tsx +0 -11
- package/src/component/Modal.tsx +0 -174
- package/src/component/ModifyForm.tsx +0 -139
- package/src/component/TemplateBlock.tsx +0 -21
- package/src/component/TemplateExtend.tsx +0 -17
- package/src/component/TemplateParentBlock.tsx +0 -7
- package/src/component/Translation.tsx +0 -7
- package/src/component/ViewLoader.tsx +0 -33
- package/src/component/crud/DynamicView.tsx +0 -42
- package/src/component/crud/FormView.tsx +0 -29
- package/src/component/crud/GridTableView.tsx +0 -205
- package/src/component/crud/PaginatorView.tsx +0 -80
- package/src/component/error/ErrorBoundary.tsx +0 -78
- package/src/component/error/Exception.tsx +0 -17
- package/src/component/error/HttpException.tsx +0 -24
- package/src/component/form/Choice.tsx +0 -119
- package/src/component/form/Form.tsx +0 -233
- package/src/component/form/FormAlert.tsx +0 -19
- package/src/component/form/FormFieldError.tsx +0 -16
- package/src/component/form/FormGroup.tsx +0 -53
- package/src/component/form/FormWidget.tsx +0 -34
- package/src/component/form/Input.tsx +0 -63
- package/src/component/form/constraint/Contraint.tsx +0 -8
- package/src/component/form/constraint/NotBlank.tsx +0 -20
- package/src/component/hooks/GetData.tsx +0 -137
- package/src/context/ActionContext.tsx +0 -99
- package/src/context/AlertContext.tsx +0 -181
- package/src/context/ModalContext.tsx +0 -56
- package/src/context/SessionContext.tsx +0 -97
- package/src/helper/ObjectUtils.tsx +0 -36
- package/src/helper/RouterUtils.tsx +0 -24
- package/src/helper/StingUtils.tsx +0 -25
- package/src/index.tsx +0 -23
- package/src/layout/default/Base.tsx +0 -15
- package/src/layout/default/Error.tsx +0 -27
- package/src/layout/default/Main.tsx +0 -64
- package/src/layout/default/component/Navigation.tsx +0 -197
- package/src/page/List.tsx +0 -268
- package/src/page/Modify.tsx +0 -156
- package/src/react-app-env.d.ts +0 -2
- package/src/setupTests.ts +0 -5
- package/src/type/ActionType.tsx +0 -10
- package/src/type/ColumnType.tsx +0 -18
- package/src/type/ExceptionType.tsx +0 -7
- package/src/type/FormType.tsx +0 -6
- package/src/type/FormViewType.tsx +0 -37
- package/src/type/ListMetaType.tsx +0 -7
- package/src/type/ListType.tsx +0 -20
- package/src/type/ModifyType.tsx +0 -10
- package/src/type/RedirectType.tsx +0 -6
- package/src/type/RouteType.tsx +0 -5
- package/tsconfig.app.json +0 -46
- package/tsconfig.json +0 -11
- package/tsconfig.node.json +0 -15
- 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
|
-
}
|
package/src/type/ListType.tsx
DELETED
|
@@ -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
|
-
}
|
package/src/type/ModifyType.tsx
DELETED
|
@@ -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
|
-
}
|
package/src/type/RouteType.tsx
DELETED
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
package/tsconfig.node.json
DELETED
|
@@ -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
|
-
});
|