@dovetail-v2/refine 0.1.6 → 0.1.8
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-2612b8d0.js → MonacoYamlDiffEditor-1593cfad.js} +1 -1
- package/dist/{index-69d5e3e9.js → index-45031697.js} +1218 -838
- package/dist/refine.js +189 -188
- package/dist/refine.umd.cjs +1027 -647
- package/dist/style.css +2795 -124
- package/lib/{src/Dovetail.d.ts → Dovetail.d.ts} +2 -0
- package/lib/components/DropdownMenuItems/EditAnnotationDropdownMenuItem.d.ts +10 -0
- package/lib/components/DropdownMenuItems/EditLabelDropdownMenuItem.d.ts +10 -0
- package/lib/components/DropdownMenuItems/index.d.ts +2 -0
- package/lib/{src/components → components}/EditField/index.d.ts +2 -1
- package/lib/components/EditMetadataForm/EditAnnotationForm.d.ts +10 -0
- package/lib/components/EditMetadataForm/EditLabelForm.d.ts +10 -0
- package/lib/components/EditMetadataForm/index.d.ts +2 -0
- package/lib/{src/components → components}/Form/FormModal.d.ts +3 -0
- package/lib/{src/components → components}/Form/RefineFormContent.d.ts +2 -2
- package/lib/{src/components → components}/Form/YamlForm.d.ts +4 -1
- package/lib/components/Form/useFieldsConfig.d.ts +4 -0
- package/lib/{src/components → components}/Form/useYamlForm.d.ts +8 -1
- package/lib/{src/components → components}/index.d.ts +1 -0
- package/lib/{src/constants → constants}/k8s.d.ts +1 -1
- package/lib/contexts/constants.d.ts +6 -0
- package/lib/{src/hooks → hooks}/useDeleteModal/useDeleteModal.d.ts +0 -1
- package/lib/{src/hooks → hooks}/useSchema.d.ts +1 -1
- package/lib/{src/i18n.d.ts → i18n.d.ts} +9 -0
- package/lib/{src/locales → locales}/en-US/index.d.ts +1 -0
- package/lib/{src/locales → locales}/zh-CN/index.d.ts +8 -0
- package/lib/{src/models → models}/resource-model.d.ts +2 -0
- package/lib/{src/pages → pages}/storageclasses/index.d.ts +2 -1
- package/lib/styles/button.d.ts +1 -0
- package/lib/{src/styles → styles}/modal.d.ts +1 -0
- package/lib/{src/types → types}/resource.d.ts +2 -1
- package/lib/{src/utils → utils}/openapi.d.ts +2 -1
- package/package.json +7 -2
- package/lib/vite.config.d.ts +0 -2
- /package/lib/{src/App.d.ts → App.d.ts} +0 -0
- /package/lib/{src/components → components}/Breadcrumb/index.d.ts +0 -0
- /package/lib/{src/components → components}/ConditionsTable/ConditionsTable.d.ts +0 -0
- /package/lib/{src/components → components}/ConditionsTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/CreateButton/index.d.ts +0 -0
- /package/lib/{src/components → components}/CronJobDropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/CronjobJobsTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/DeleteButton/index.d.ts +0 -0
- /package/lib/{src/components → components}/DeleteManyButton/index.d.ts +0 -0
- /package/lib/{src/components → components}/DrawerShow/DrawerShow.d.ts +0 -0
- /package/lib/{src/components → components}/DrawerShow/index.d.ts +0 -0
- /package/lib/{src/components → components}/DurationTime/index.d.ts +0 -0
- /package/lib/{src/components → components}/EditButton/index.d.ts +0 -0
- /package/lib/{src/components → components}/ErrorContent/index.d.ts +0 -0
- /package/lib/{src/components → components}/EventsTable/EventsTable.d.ts +0 -0
- /package/lib/{src/components → components}/EventsTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/Form/RefineFormPage.d.ts +0 -0
- /package/lib/{src/components → components}/Form/index.d.ts +0 -0
- /package/lib/{src/components → components}/Form/type.d.ts +0 -0
- /package/lib/{src/components → components}/Form/useReactHookForm.d.ts +0 -0
- /package/lib/{src/components → components}/Form/useRefineForm.d.ts +0 -0
- /package/lib/{src/components → components}/FormErrorAlert/index.d.ts +0 -0
- /package/lib/{src/components → components}/FormLayout/index.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/KeyValueListWidget.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/MetadataForm.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/NameInputWidget.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/NamespaceSelectWidget.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/index.d.ts +0 -0
- /package/lib/{src/components → components}/FormWidgets/widget.d.ts +0 -0
- /package/lib/{src/components → components}/ImageNames/index.d.ts +0 -0
- /package/lib/{src/components → components}/IngressRulesComponent/index.d.ts +0 -0
- /package/lib/{src/components → components}/IngressRulesTable/IngressRulesTable.d.ts +0 -0
- /package/lib/{src/components → components}/IngressRulesTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/K8sDropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/KeyValue/KeyValue.d.ts +0 -0
- /package/lib/{src/components → components}/KeyValue/KeyValueAnnotation.d.ts +0 -0
- /package/lib/{src/components → components}/KeyValue/KeyValueSecret.d.ts +0 -0
- /package/lib/{src/components → components}/KeyValue/index.d.ts +0 -0
- /package/lib/{src/components → components}/Layout/index.d.ts +0 -0
- /package/lib/{src/components → components}/LinkFallback/index.d.ts +0 -0
- /package/lib/{src/components → components}/ListPage/index.d.ts +0 -0
- /package/lib/{src/components → components}/Menu/index.d.ts +0 -0
- /package/lib/{src/components → components}/NamespacesFilter/index.d.ts +0 -0
- /package/lib/{src/components → components}/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -0
- /package/lib/{src/components → components}/NetworkPolicyRulesViewer/index.d.ts +0 -0
- /package/lib/{src/components → components}/PageShow/PageShow.d.ts +0 -0
- /package/lib/{src/components → components}/PageShow/index.d.ts +0 -0
- /package/lib/{src/components → components}/PodContainersTable/PodContainersTable.d.ts +0 -0
- /package/lib/{src/components → components}/PodContainersTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/PodDropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/PodLog/index.d.ts +0 -0
- /package/lib/{src/components → components}/PodSelectorTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/PodShellModal/PodShell.d.ts +0 -0
- /package/lib/{src/components → components}/PodShellModal/index.d.ts +0 -0
- /package/lib/{src/components → components}/PortsTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/ReferenceLink/index.d.ts +0 -0
- /package/lib/{src/components → components}/ReplicasDropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceCRUD/ResourceCRUD.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceCRUD/create/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceCRUD/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceCRUD/list/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceCRUD/show/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceFiledDisplays.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceLink/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceSelect/index.d.ts +0 -0
- /package/lib/{src/components → components}/ResourceUsageBar/index.d.ts +0 -0
- /package/lib/{src/components → components}/Separator/index.d.ts +0 -0
- /package/lib/{src/components → components}/ServiceComponents/index.d.ts +0 -0
- /package/lib/{src/components → components}/Shell/ShellToolbar.d.ts +0 -0
- /package/lib/{src/components → components}/Shell/index.d.ts +0 -0
- /package/lib/{src/components → components}/ShowContent/ShowContent.d.ts +0 -0
- /package/lib/{src/components → components}/ShowContent/fields.d.ts +0 -0
- /package/lib/{src/components → components}/ShowContent/groups.d.ts +0 -0
- /package/lib/{src/components → components}/ShowContent/index.d.ts +0 -0
- /package/lib/{src/components → components}/ShowContent/tabs.d.ts +0 -0
- /package/lib/{src/components → components}/StateTag/StateTag.d.ts +0 -0
- /package/lib/{src/components → components}/StateTag/index.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableToolBar.d.ts +0 -0
- /package/lib/{src/components → components}/Table/TableWidgets.d.ts +0 -0
- /package/lib/{src/components → components}/Table/index.d.ts +0 -0
- /package/lib/{src/components → components}/Tabs/index.d.ts +0 -0
- /package/lib/{src/components → components}/Tags/index.d.ts +0 -0
- /package/lib/{src/components → components}/TextTags/index.d.ts +0 -0
- /package/lib/{src/components → components}/Time/index.d.ts +0 -0
- /package/lib/{src/components → components}/ValueDisplay/index.d.ts +0 -0
- /package/lib/{src/components → components}/WorkloadDropdown/index.d.ts +0 -0
- /package/lib/{src/components → components}/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -0
- /package/lib/{src/components → components}/WorkloadPodsTable/index.d.ts +0 -0
- /package/lib/{src/components → components}/WorkloadReplicas/index.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/MonacoYamlEditor.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/YamlEditorComponent.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/index.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/style.d.ts +0 -0
- /package/lib/{src/components → components}/YamlEditor/yaml.worker.d.ts +0 -0
- /package/lib/{src/constants → constants}/auth.d.ts +0 -0
- /package/lib/{src/constants → constants}/index.d.ts +0 -0
- /package/lib/{src/constants → constants}/state.d.ts +0 -0
- /package/lib/{src/contexts → contexts}/component.d.ts +0 -0
- /package/lib/{src/contexts → contexts}/configs.d.ts +0 -0
- /package/lib/{src/contexts → contexts}/global-store.d.ts +0 -0
- /package/lib/{src/contexts → contexts}/index.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/index.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useDeleteModal/index.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useDeleteModal/useDeleteManyModal.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useDownloadYAML.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useEagleTable/columns.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useEagleTable/index.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useEagleTable/useEagleTable.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useEdit.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useGlobalStore.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useK8sYamlEditor.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useNamespaceRefineFilter.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useOpenForm.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useSubmitForm.d.ts +0 -0
- /package/lib/{src/hooks → hooks}/useTableData.d.ts +0 -0
- /package/lib/{src/index.d.ts → index.d.ts} +0 -0
- /package/lib/{src/locales → locales}/index.d.ts +0 -0
- /package/lib/{src/main.d.ts → main.d.ts} +0 -0
- /package/lib/{src/models → models}/cronjob-model.d.ts +0 -0
- /package/lib/{src/models → models}/daemonset-model.d.ts +0 -0
- /package/lib/{src/models → models}/deployment-model.d.ts +0 -0
- /package/lib/{src/models → models}/event-model.d.ts +0 -0
- /package/lib/{src/models → models}/index.d.ts +0 -0
- /package/lib/{src/models → models}/ingress-model.d.ts +0 -0
- /package/lib/{src/models → models}/job-model.d.ts +0 -0
- /package/lib/{src/models → models}/network-policy-model.d.ts +0 -0
- /package/lib/{src/models → models}/node-model.d.ts +0 -0
- /package/lib/{src/models → models}/persistent-volume-claim.d.ts +0 -0
- /package/lib/{src/models → models}/persistent-volume.d.ts +0 -0
- /package/lib/{src/models → models}/pod-metrics-model.d.ts +0 -0
- /package/lib/{src/models → models}/pod-model.d.ts +0 -0
- /package/lib/{src/models → models}/service-model.d.ts +0 -0
- /package/lib/{src/models → models}/statefulset-model.d.ts +0 -0
- /package/lib/{src/models → models}/storage-class.d.ts +0 -0
- /package/lib/{src/models → models}/types/index.d.ts +0 -0
- /package/lib/{src/models → models}/types/metric.d.ts +0 -0
- /package/lib/{src/models → models}/workload-base-model.d.ts +0 -0
- /package/lib/{src/models → models}/workload-model.d.ts +0 -0
- /package/lib/{src/pages → pages}/configmaps/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/cronjobs/create/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/cronjobs/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/cronjobs/list/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/cronjobs/show/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/daemonsets/create/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/daemonsets/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/daemonsets/list/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/daemonsets/show/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/deployments/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/deployments/list/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/deployments/show/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/ingresses/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/jobs/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/networkPolicies/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/nodes/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/nodes/list/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/nodes/show/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/persistentvolumeclaims/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/persistentvolumes/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/pods/create/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/pods/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/pods/list/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/pods/show/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/secrets/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/services/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/statefulsets/index.d.ts +0 -0
- /package/lib/{src/pages → pages}/storageclasses/form/index.d.ts +0 -0
- /package/lib/{src/plugins → plugins}/index.d.ts +0 -0
- /package/lib/{src/plugins → plugins}/model-plugin.d.ts +0 -0
- /package/lib/{src/plugins → plugins}/relation-plugin.d.ts +0 -0
- /package/lib/{src/plugins → plugins}/type.d.ts +0 -0
- /package/lib/{src/providers → providers}/index.d.ts +0 -0
- /package/lib/{src/providers → providers}/router-provider/index.d.ts +0 -0
- /package/lib/{src/types → types}/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/addId.d.ts +0 -0
- /package/lib/{src/utils → utils}/download.d.ts +0 -0
- /package/lib/{src/utils → utils}/error.d.ts +0 -0
- /package/lib/{src/utils → utils}/form.d.ts +0 -0
- /package/lib/{src/utils → utils}/index.d.ts +0 -0
- /package/lib/{src/utils → utils}/k8s.d.ts +0 -0
- /package/lib/{src/utils → utils}/labels.d.ts +0 -0
- /package/lib/{src/utils → utils}/match-selector.d.ts +0 -0
- /package/lib/{src/utils → utils}/schema.d.ts +0 -0
- /package/lib/{src/utils → utils}/selector.d.ts +0 -0
- /package/lib/{src/utils → utils}/shell.d.ts +0 -0
- /package/lib/{src/utils → utils}/string.d.ts +0 -0
- /package/lib/{src/utils → utils}/time.d.ts +0 -0
- /package/lib/{src/utils → utils}/unit.d.ts +0 -0
- /package/lib/{src/utils → utils}/yaml.d.ts +0 -0
|
@@ -6,6 +6,7 @@ import { ResourceConfig } from './types';
|
|
|
6
6
|
import './styles.css';
|
|
7
7
|
type Props = {
|
|
8
8
|
resourcesConfig: ResourceConfig[];
|
|
9
|
+
schemaUrlPrefix: string;
|
|
9
10
|
useHashUrl?: boolean;
|
|
10
11
|
urlPrefix?: string;
|
|
11
12
|
Layout?: React.FC<unknown>;
|
|
@@ -13,6 +14,7 @@ type Props = {
|
|
|
13
14
|
globalStore: GlobalStore;
|
|
14
15
|
accessControlProvider?: AccessControlProvider;
|
|
15
16
|
routerProvider?: any;
|
|
17
|
+
antdGetPopupContainer?: (triggerNode?: HTMLElement) => HTMLElement;
|
|
16
18
|
};
|
|
17
19
|
export declare const Dovetail: React.FC<Props>;
|
|
18
20
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
type EditMenuItemProps<Model extends ResourceModel> = {
|
|
4
|
+
formRef: React.MutableRefObject<{
|
|
5
|
+
submit: () => Promise<unknown> | undefined;
|
|
6
|
+
} | null>;
|
|
7
|
+
resourceModel: Model;
|
|
8
|
+
};
|
|
9
|
+
export declare function EditAnnotationDropdownMenuItem<Model extends ResourceModel>(props: EditMenuItemProps<Model>): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
type EditMenuItemProps<Model extends ResourceModel> = {
|
|
4
|
+
formRef: React.MutableRefObject<{
|
|
5
|
+
submit: () => Promise<unknown> | undefined;
|
|
6
|
+
} | null>;
|
|
7
|
+
resourceModel: Model;
|
|
8
|
+
};
|
|
9
|
+
export declare function EditLabelDropdownMenuItem<Model extends ResourceModel>(props: EditMenuItemProps<Model>): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -4,9 +4,10 @@ export interface EditFieldModalProps {
|
|
|
4
4
|
submitting?: boolean;
|
|
5
5
|
errorMsgs?: string[];
|
|
6
6
|
formRef: React.MutableRefObject<{
|
|
7
|
-
submit: () =>
|
|
7
|
+
submit: () => Promise<unknown> | undefined;
|
|
8
8
|
} | null>;
|
|
9
9
|
renderContent: () => React.ReactNode;
|
|
10
|
+
fullscreen?: boolean;
|
|
10
11
|
}
|
|
11
12
|
export declare function EditFieldModal(props: EditFieldModalProps): JSX.Element;
|
|
12
13
|
export interface EditField {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
interface EditAnnotationFormProps {
|
|
4
|
+
resourceModel: ResourceModel;
|
|
5
|
+
}
|
|
6
|
+
interface EditAnnotationFormHandler {
|
|
7
|
+
submit: () => Promise<unknown> | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const EditAnnotationForm: React.ForwardRefExoticComponent<EditAnnotationFormProps & React.RefAttributes<EditAnnotationFormHandler>>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
interface EditLabelFormProps {
|
|
4
|
+
resourceModel: ResourceModel;
|
|
5
|
+
}
|
|
6
|
+
interface EditLabelFormHandler {
|
|
7
|
+
submit: () => Promise<unknown> | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const EditLabelForm: React.ForwardRefExoticComponent<EditLabelFormProps & React.RefAttributes<EditLabelFormHandler>>;
|
|
10
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { UseFormReturnType } from '@refinedev/react-hook-form';
|
|
3
|
-
import { ResourceModel } from '
|
|
4
|
-
import { ResourceConfig } from '
|
|
3
|
+
import { ResourceModel } from 'src/models';
|
|
4
|
+
import { ResourceConfig } from 'src/types';
|
|
5
5
|
type Props<Model extends ResourceModel> = {
|
|
6
6
|
config?: ResourceConfig<Model>;
|
|
7
7
|
formResult: UseFormReturnType;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { FormAction } from '@refinedev/core';
|
|
3
3
|
import { Unstructured } from 'k8s-api-provider';
|
|
4
4
|
import useYamlForm from './useYamlForm';
|
|
5
|
+
import { YamlFormRule } from './useYamlForm';
|
|
5
6
|
export declare enum SchemaStrategy {
|
|
6
7
|
Required = "Required",
|
|
7
8
|
Optional = "Optional",
|
|
@@ -10,10 +11,12 @@ export declare enum SchemaStrategy {
|
|
|
10
11
|
export interface YamlFormProps {
|
|
11
12
|
id?: string;
|
|
12
13
|
action?: FormAction;
|
|
13
|
-
|
|
14
|
+
initialValuesForCreate?: Record<string, unknown>;
|
|
15
|
+
initialValuesForEdit?: Record<string, unknown>;
|
|
14
16
|
schemaStrategy?: SchemaStrategy;
|
|
15
17
|
isShowLayout?: boolean;
|
|
16
18
|
useFormProps?: Parameters<typeof useYamlForm>[0];
|
|
19
|
+
rules?: YamlFormRule[];
|
|
17
20
|
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
18
21
|
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
19
22
|
onSaveButtonPropsChange?: (saveButtonProps: {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ResourceModel } from 'src/models';
|
|
2
|
+
import { ResourceConfig } from 'src/types';
|
|
3
|
+
declare function useFieldsConfig<Model extends ResourceModel>(config?: ResourceConfig<Model>, resourceId?: string): import("./type").RefineFormField[] | undefined;
|
|
4
|
+
export default useFieldsConfig;
|
|
@@ -5,9 +5,14 @@ import { JSONSchema7 } from 'json-schema';
|
|
|
5
5
|
import { Unstructured } from 'k8s-api-provider';
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { type YamlEditorHandle, type YamlEditorProps } from 'src/components/YamlEditor';
|
|
8
|
+
import { RefineFormValidator } from 'src/components/Form/type';
|
|
8
9
|
type EditorProps = YamlEditorProps & {
|
|
9
10
|
ref: React.RefObject<YamlEditorHandle>;
|
|
10
11
|
};
|
|
12
|
+
export type YamlFormRule = {
|
|
13
|
+
path: string[];
|
|
14
|
+
validators?: RefineFormValidator[];
|
|
15
|
+
};
|
|
11
16
|
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
12
17
|
submitOnEnter?: boolean;
|
|
13
18
|
/**
|
|
@@ -19,8 +24,10 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
19
24
|
isSkipSchema?: boolean;
|
|
20
25
|
};
|
|
21
26
|
initialValuesForCreate?: Record<string, unknown>;
|
|
27
|
+
initialValuesForEdit?: Record<string, unknown>;
|
|
22
28
|
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
23
29
|
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
30
|
+
rules?: YamlFormRule[];
|
|
24
31
|
};
|
|
25
32
|
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
|
|
26
33
|
form: FormInstance;
|
|
@@ -46,5 +53,5 @@ declare const useYamlForm: <TQueryFnData extends Unstructured = Unstructured & {
|
|
|
46
53
|
[prop: string]: unknown;
|
|
47
54
|
} = {
|
|
48
55
|
[prop: string]: unknown;
|
|
49
|
-
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformInitValues, transformApplyValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
56
|
+
}, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, initialValuesForEdit, transformInitValues, transformApplyValues, rules, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
50
57
|
export default useYamlForm;
|
|
@@ -15,6 +15,7 @@ export * from './ResourceCRUD';
|
|
|
15
15
|
export * from './WorkloadPodsTable';
|
|
16
16
|
export * from './CronJobDropdown';
|
|
17
17
|
export * from './K8sDropdown';
|
|
18
|
+
export * from './DropdownMenuItems';
|
|
18
19
|
export * from './ResourceUsageBar';
|
|
19
20
|
export * from './WorkloadReplicas';
|
|
20
21
|
export * from './CronjobJobsTable';
|
|
@@ -393,7 +393,7 @@ export declare const SERVER_INSTANCE_INIT_VALUE: {
|
|
|
393
393
|
apiVersion: string;
|
|
394
394
|
kind: string;
|
|
395
395
|
};
|
|
396
|
-
export declare const
|
|
396
|
+
export declare const REDEPLOY_TIMESTAMP_KEY = "kubectl.kubernetes.io/restartedAt";
|
|
397
397
|
export declare const SECRET_OPAQUE_INIT_VALUE: {
|
|
398
398
|
apiVersion: string;
|
|
399
399
|
kind: string;
|
|
@@ -11,7 +11,7 @@ type UseSchemaResult = {
|
|
|
11
11
|
fetchSchema: () => void;
|
|
12
12
|
};
|
|
13
13
|
export declare function useApiGroupSchema(): {
|
|
14
|
-
fetchSchema: (apiGroups: string[]) => Promise<void>;
|
|
14
|
+
fetchSchema: (apiGroups: string[], schemaUrlPrefix: string) => Promise<void>;
|
|
15
15
|
schemas: JSONSchema7[] | null;
|
|
16
16
|
schemasMap: Record<string, JSONSchema7[]>;
|
|
17
17
|
loading: boolean;
|
|
@@ -174,6 +174,7 @@ export declare const resources: {
|
|
|
174
174
|
pv_phase_pending: string;
|
|
175
175
|
exec_pod: string;
|
|
176
176
|
search: string;
|
|
177
|
+
edit_label: string;
|
|
177
178
|
};
|
|
178
179
|
};
|
|
179
180
|
'zh-CN': {
|
|
@@ -355,6 +356,14 @@ export declare const resources: {
|
|
|
355
356
|
connecting: string;
|
|
356
357
|
reconnect: string;
|
|
357
358
|
search: string;
|
|
359
|
+
edit_form: string;
|
|
360
|
+
exit_yaml_tip: string;
|
|
361
|
+
form: string;
|
|
362
|
+
yaml: string;
|
|
363
|
+
edit_label: string;
|
|
364
|
+
edit_label_success_toast: string;
|
|
365
|
+
edit_annotation: string;
|
|
366
|
+
edit_annotation_success_toast: string;
|
|
358
367
|
};
|
|
359
368
|
};
|
|
360
369
|
};
|
|
@@ -177,6 +177,14 @@ declare const _default: {
|
|
|
177
177
|
connecting: string;
|
|
178
178
|
reconnect: string;
|
|
179
179
|
search: string;
|
|
180
|
+
edit_form: string;
|
|
181
|
+
exit_yaml_tip: string;
|
|
182
|
+
form: string;
|
|
183
|
+
yaml: string;
|
|
184
|
+
edit_label: string;
|
|
185
|
+
edit_label_success_toast: string;
|
|
186
|
+
edit_annotation: string;
|
|
187
|
+
edit_annotation_success_toast: string;
|
|
180
188
|
};
|
|
181
189
|
};
|
|
182
190
|
export default _default;
|
|
@@ -18,4 +18,6 @@ export declare class ResourceModel<T extends Unstructured = Unstructured> {
|
|
|
18
18
|
[name: string]: string;
|
|
19
19
|
} | undefined;
|
|
20
20
|
restore(): T;
|
|
21
|
+
updateLabel(labels: Record<string, string>): Unstructured;
|
|
22
|
+
updateAnnotation(annotations: Record<string, string>): Unstructured;
|
|
21
23
|
}
|
|
@@ -29,9 +29,10 @@ export declare const StorageClassConfig: (i18n: I18n) => {
|
|
|
29
29
|
transformApplyValues?: ((values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured) | undefined;
|
|
30
30
|
formTitle?: string | ((action: "create" | "edit") => string) | undefined;
|
|
31
31
|
formDesc?: string | ((action: "create" | "edit") => string) | undefined;
|
|
32
|
-
formatError?: ((errorBody:
|
|
32
|
+
formatError?: ((errorBody: unknown) => string) | undefined;
|
|
33
33
|
refineCoreProps?: import("@refinedev/core").UseFormProps<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, import("react-hook-form").FieldValues, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError> | undefined;
|
|
34
34
|
useFormProps?: import("@refinedev/react-hook-form").UseFormProps | undefined;
|
|
35
|
+
isDisabledChangeMode?: boolean | undefined;
|
|
35
36
|
} | undefined;
|
|
36
37
|
columns: () => (import("../../components").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../../components").Column<import("../..").StorageClassModel>)[];
|
|
37
38
|
showConfig: () => {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WarningButtonStyle: import("@linaria/core").LinariaClassName;
|
|
@@ -56,8 +56,9 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
56
56
|
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
57
57
|
formTitle?: string | ((action: 'create' | 'edit') => string);
|
|
58
58
|
formDesc?: string | ((action: 'create' | 'edit') => string);
|
|
59
|
-
formatError?: (errorBody:
|
|
59
|
+
formatError?: (errorBody: unknown) => string;
|
|
60
60
|
refineCoreProps?: UseFormProps['refineCoreProps'];
|
|
61
61
|
useFormProps?: UseFormProps;
|
|
62
|
+
isDisabledChangeMode?: boolean;
|
|
62
63
|
};
|
|
63
64
|
};
|
|
@@ -30,9 +30,10 @@ interface OpenAPIResponse {
|
|
|
30
30
|
}
|
|
31
31
|
declare class K8sOpenAPI {
|
|
32
32
|
private resourceBasePath;
|
|
33
|
+
private pathPrefix;
|
|
33
34
|
private apiVersion;
|
|
34
35
|
private schemas;
|
|
35
|
-
constructor(resourceBasePath: string);
|
|
36
|
+
constructor(resourceBasePath: string, pathPrefix: string);
|
|
36
37
|
fetch(): Promise<Array<OpenAPIResponse['components']['schemas'][string]> | null>;
|
|
37
38
|
findSchema(kind: string): JSONSchema7 | undefined;
|
|
38
39
|
private processSchemas;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"main": "./dist/refine.umd.js",
|
|
10
10
|
"module": "./dist/refine.js",
|
|
11
|
-
"types": "./lib/
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@cloudtower/eagle": "^0.31.7",
|
|
14
14
|
"@cloudtower/icons-react": "^0.31.7",
|
|
@@ -52,6 +52,10 @@
|
|
|
52
52
|
"@linaria/core": "^4.5.4",
|
|
53
53
|
"@linaria/react": "^4.5.4",
|
|
54
54
|
"@linaria/vite": "^4.5.4",
|
|
55
|
+
"@linaria/babel-preset": "^4.5.4",
|
|
56
|
+
"@linaria/logger": "^4.5.0",
|
|
57
|
+
"@linaria/utils": "^4.5.3",
|
|
58
|
+
"@rollup/pluginutils": "^4.2.1",
|
|
55
59
|
"@playwright/test": "^1.39.0",
|
|
56
60
|
"@refinedev/cli": "^2.9.0",
|
|
57
61
|
"@types/body-parser": "^1.19.5",
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
74
78
|
"jest": "^29",
|
|
75
79
|
"kubernetes-types": "^1.26.0",
|
|
80
|
+
"sass": "1.51.0",
|
|
76
81
|
"ts-jest": "^29",
|
|
77
82
|
"vite": "^4.5.2",
|
|
78
83
|
"vite-plugin-commonjs": "^0.10.0"
|
package/lib/vite.config.d.ts
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/lib/{src/components → components}/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|