@dovetail-v2/refine 0.0.16 → 0.0.18
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/{MonacoYamlDiffEditor.4fe9fad1.js → MonacoYamlDiffEditor-63ab8a31.js} +2 -2
- package/dist/assets/{yaml.worker.bb17811d.js → yaml.worker-5e5f190c.js} +2153 -992
- package/dist/{index.8dfa48ab.js → index-9b2c04b5.js} +5176 -2908
- package/dist/refine.js +89 -78
- package/dist/refine.umd.cjs +5106 -2845
- package/dist/style.css +18 -17
- package/lib/src/Dovetail.d.ts +2 -2
- package/lib/src/components/DrawerShow/DrawerShow.d.ts +2 -2
- package/lib/src/components/EditField/index.d.ts +15 -0
- package/lib/src/components/FormErrorAlert/index.d.ts +8 -0
- package/lib/src/components/FormLayout/index.d.ts +5 -1
- package/lib/src/components/FormModal/index.d.ts +10 -0
- package/lib/src/components/PageShow/PageShow.d.ts +2 -2
- package/lib/src/components/ReferenceLink/index.d.ts +8 -0
- package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +3 -3
- package/lib/src/components/ResourceCRUD/show/index.d.ts +2 -2
- package/lib/src/components/ShowContent/ShowContent.d.ts +2 -2
- package/lib/src/components/ShowContent/fields.d.ts +23 -6
- package/lib/src/components/StateTag/StateTag.d.ts +2 -1
- package/lib/src/components/Table/index.d.ts +3 -2
- package/lib/src/components/WorkloadReplicas/index.d.ts +6 -3
- package/lib/src/components/YamlForm/index.d.ts +8 -1
- package/lib/src/components/index.d.ts +2 -0
- package/lib/src/constants/index.d.ts +1 -0
- package/lib/src/constants/state.d.ts +13 -0
- package/lib/src/contexts/configs.d.ts +4 -0
- package/lib/src/contexts/index.d.ts +2 -0
- package/lib/src/hooks/useEagleForm.d.ts +2 -1
- package/lib/src/hooks/useEagleTable/columns.d.ts +2 -1
- package/lib/src/hooks/useOpenForm.d.ts +5 -0
- package/lib/src/hooks/useSubmitForm.d.ts +14 -0
- package/lib/src/i18n.d.ts +19 -1
- package/lib/src/index.d.ts +1 -0
- package/lib/src/locales/en-US/index.d.ts +2 -0
- package/lib/src/locales/zh-CN/index.d.ts +17 -1
- package/lib/src/models/cronjob-model.d.ts +2 -0
- package/lib/src/models/daemonset-model.d.ts +14 -0
- package/lib/src/models/deployment-model.d.ts +14 -0
- package/lib/src/models/index.d.ts +3 -0
- package/lib/src/models/job-model.d.ts +5 -1
- package/lib/src/models/pod-model.d.ts +1 -0
- package/lib/src/models/service-model.d.ts +10 -0
- package/lib/src/models/statefulset-model.d.ts +14 -0
- package/lib/src/models/workload-model.d.ts +2 -0
- package/lib/src/pages/deployments/create/index.d.ts +2 -2
- package/lib/src/types/resource.d.ts +9 -2
- package/lib/src/utils/error.d.ts +3 -3
- package/lib/src/utils/form.d.ts +3 -0
- package/lib/src/utils/time.d.ts +6 -1
- package/lib/vite.config.d.ts +1 -1
- package/package.json +11 -11
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { FormModalProps } from 'src/components/FormModal';
|
|
3
|
+
import { ShowConfig } from '../components/ShowContent';
|
|
3
4
|
import { Column } from '../components/Table';
|
|
4
5
|
import { ResourceModel } from '../models';
|
|
5
6
|
export declare enum RESOURCE_GROUP {
|
|
@@ -8,6 +9,10 @@ export declare enum RESOURCE_GROUP {
|
|
|
8
9
|
NETWORK = "NETWORK",
|
|
9
10
|
CLUSTER = "CLUSTER"
|
|
10
11
|
}
|
|
12
|
+
export declare enum FormType {
|
|
13
|
+
PAGE = "PAGE",
|
|
14
|
+
MODAL = "MODAL"
|
|
15
|
+
}
|
|
11
16
|
export type WithId<T> = T & {
|
|
12
17
|
id: string;
|
|
13
18
|
};
|
|
@@ -21,9 +26,11 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
21
26
|
formatter?: (v: Model) => Model;
|
|
22
27
|
initValue?: Record<string, unknown>;
|
|
23
28
|
columns?: () => Column<Model>[];
|
|
24
|
-
|
|
29
|
+
showConfig?: () => ShowConfig<Model>;
|
|
25
30
|
Dropdown?: React.FC<{
|
|
26
31
|
record: Model;
|
|
27
32
|
}>;
|
|
33
|
+
formType?: FormType;
|
|
34
|
+
FormModal?: React.FC<FormModalProps>;
|
|
28
35
|
isCustom?: boolean;
|
|
29
36
|
};
|
package/lib/src/utils/error.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ type Cause = {
|
|
|
5
5
|
message: string;
|
|
6
6
|
field?: string;
|
|
7
7
|
};
|
|
8
|
-
type
|
|
8
|
+
export type ErrorResponseBody = {
|
|
9
9
|
message?: string;
|
|
10
10
|
code?: number;
|
|
11
11
|
reason?: string;
|
|
@@ -15,6 +15,6 @@ type ErrorResponse = {
|
|
|
15
15
|
graphQLErrors?: Cause[];
|
|
16
16
|
};
|
|
17
17
|
export declare function isNetworkError(errors?: Cause[]): boolean;
|
|
18
|
-
export declare function getSubmitError(errorResponse:
|
|
19
|
-
export declare function getCommonErrors(
|
|
18
|
+
export declare function getSubmitError(errorResponse: ErrorResponseBody | undefined, text: string, i18n: I18n): string;
|
|
19
|
+
export declare function getCommonErrors(responseBody: ErrorResponseBody, i18n: I18n): string[];
|
|
20
20
|
export {};
|
package/lib/src/utils/time.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
export declare function getSecondsDiff(startDate: string, endDate: string): number;
|
|
2
|
-
export declare function elapsedTime(seconds: number
|
|
2
|
+
export declare function elapsedTime(seconds: number, i18nMap: {
|
|
3
|
+
min: string;
|
|
4
|
+
sec: string;
|
|
5
|
+
hr: string;
|
|
6
|
+
day: string;
|
|
7
|
+
}): {
|
|
3
8
|
diff?: undefined;
|
|
4
9
|
label?: undefined;
|
|
5
10
|
} | {
|
package/lib/vite.config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: import("vite").
|
|
1
|
+
declare const _default: import("vite").UserConfig;
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.18",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"module": "./dist/refine.js",
|
|
11
11
|
"types": "./lib/src/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@cloudtower/eagle": "^0.
|
|
14
|
-
"@cloudtower/icons-react": "^0.
|
|
13
|
+
"@cloudtower/eagle": "^0.27.59",
|
|
14
|
+
"@cloudtower/icons-react": "^0.27.59",
|
|
15
15
|
"@patternfly/react-core": "^5.1.1",
|
|
16
16
|
"@patternfly/react-log-viewer": "^5.0.0",
|
|
17
17
|
"@refinedev/core": "^4.38.0",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dayjs": "^1.11.10",
|
|
21
21
|
"i18next": "^23.2.3",
|
|
22
22
|
"js-yaml": "^4.1.0",
|
|
23
|
-
"k8s-api-provider": "0.0.
|
|
23
|
+
"k8s-api-provider": "0.0.16",
|
|
24
24
|
"ky": "^0.33.3",
|
|
25
25
|
"lodash-es": "^4.17.21",
|
|
26
26
|
"mitt": "^3.0.1",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@babel/core": "^7.4.0",
|
|
38
38
|
"@babel/preset-env": "^7.1.6",
|
|
39
|
+
"@babel/preset-typescript": "^7.10.4",
|
|
39
40
|
"@kubernetes/client-node": "^0.20.0",
|
|
40
41
|
"@linaria/core": "^4.5.4",
|
|
41
42
|
"@linaria/react": "^4.5.4",
|
|
@@ -43,6 +44,7 @@
|
|
|
43
44
|
"@playwright/test": "^1.39.0",
|
|
44
45
|
"@refinedev/cli": "^2.9.0",
|
|
45
46
|
"@types/body-parser": "^1.19.5",
|
|
47
|
+
"@types/jest": "^29",
|
|
46
48
|
"@types/js-yaml": "^4.0.6",
|
|
47
49
|
"@types/json-schema": "^7.0.13",
|
|
48
50
|
"@types/lodash-es": "^4.17.9",
|
|
@@ -58,17 +60,15 @@
|
|
|
58
60
|
"eslint": "^8.38.0",
|
|
59
61
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
60
62
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
61
|
-
"kubernetes-types": "^1.26.0",
|
|
62
|
-
"vite": "^3.2.7",
|
|
63
|
-
"vite-plugin-commonjs": "^0.10.0",
|
|
64
63
|
"jest": "^29",
|
|
64
|
+
"kubernetes-types": "^1.26.0",
|
|
65
65
|
"ts-jest": "^29",
|
|
66
|
-
"
|
|
67
|
-
"
|
|
66
|
+
"vite": "^4.5.2",
|
|
67
|
+
"vite-plugin-commonjs": "^0.10.0"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@cloudtower/eagle": "^0.
|
|
71
|
-
"@cloudtower/icons-react": "^0.
|
|
70
|
+
"@cloudtower/eagle": "^0.27.70",
|
|
71
|
+
"@cloudtower/icons-react": "^0.27.70",
|
|
72
72
|
"@refinedev/core": "^4.38.0",
|
|
73
73
|
"antd": "4.5.0",
|
|
74
74
|
"i18next": "^23.2.3",
|