@dovetail-v2/refine 0.0.66-pod-exec.0 → 0.0.66-pod-exec.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/{MonacoYamlDiffEditor-6b799b64.js → MonacoYamlDiffEditor-f07df2b6.js} +1 -1
- package/dist/{index-c07bed15.js → index-ea6dd427.js} +334 -168
- package/dist/refine.js +122 -115
- package/dist/refine.umd.cjs +221 -55
- package/lib/App.d.ts +2 -0
- package/lib/Dovetail.d.ts +18 -0
- package/lib/components/Breadcrumb/index.d.ts +5 -0
- package/lib/components/ConditionsTable/ConditionsTable.d.ts +7 -0
- package/lib/components/ConditionsTable/index.d.ts +1 -0
- package/lib/components/CreateButton/index.d.ts +1 -0
- package/lib/components/CronJobDropdown/index.d.ts +8 -0
- package/lib/components/CronjobJobsTable/index.d.ts +8 -0
- package/lib/components/DeleteButton/index.d.ts +2 -0
- package/lib/components/DeleteManyButton/index.d.ts +4 -0
- package/lib/components/DrawerShow/DrawerShow.d.ts +8 -0
- package/lib/components/DrawerShow/index.d.ts +1 -0
- package/lib/components/DurationTime/index.d.ts +5 -0
- package/lib/components/EditButton/index.d.ts +2 -0
- package/lib/components/EditField/index.d.ts +15 -0
- package/lib/components/ErrorContent/index.d.ts +17 -0
- package/lib/components/EventsTable/EventsTable.d.ts +6 -0
- package/lib/components/EventsTable/index.d.ts +1 -0
- package/lib/{src/components/FormModal/index.d.ts → components/Form/FormModal.d.ts} +2 -2
- package/lib/components/Form/RefineFormContent.d.ts +11 -0
- package/lib/components/Form/RefineFormPage.d.ts +6 -0
- package/lib/{src/components/YamlForm/index.d.ts → components/Form/YamlForm.d.ts} +9 -6
- package/lib/components/Form/index.d.ts +7 -0
- package/lib/components/Form/type.d.ts +17 -0
- package/lib/components/Form/useReactHookForm.d.ts +29 -0
- package/lib/components/Form/useRefineForm.d.ts +13 -0
- package/lib/{src/hooks/useEagleForm.d.ts → components/Form/useYamlForm.d.ts} +8 -5
- package/lib/components/FormErrorAlert/index.d.ts +9 -0
- package/lib/components/FormLayout/index.d.ts +7 -0
- package/lib/{src/components/Form → components/FormWidgets}/KeyValueListWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/MetadataForm.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NameInputWidget.d.ts +0 -1
- package/lib/{src/components/Form → components/FormWidgets}/NamespaceSelectWidget.d.ts +0 -1
- package/lib/components/FormWidgets/index.d.ts +4 -0
- package/lib/components/ImageNames/index.d.ts +5 -0
- package/lib/components/IngressRulesComponent/index.d.ts +5 -0
- package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
- package/lib/components/IngressRulesTable/index.d.ts +1 -0
- package/lib/components/K8sDropdown/index.d.ts +9 -0
- package/lib/components/KeyValue/KeyValue.d.ts +7 -0
- package/lib/components/KeyValue/KeyValueAnnotation.d.ts +5 -0
- package/lib/components/KeyValue/KeyValueSecret.d.ts +4 -0
- package/lib/components/KeyValue/index.d.ts +3 -0
- package/lib/components/Layout/index.d.ts +3 -0
- package/lib/components/LinkFallback/index.d.ts +3 -0
- package/lib/components/ListPage/index.d.ts +9 -0
- package/lib/components/Menu/index.d.ts +1 -0
- package/lib/components/NamespacesFilter/index.d.ts +11 -0
- package/lib/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
- package/lib/components/PageShow/PageShow.d.ts +12 -0
- package/lib/components/PageShow/index.d.ts +1 -0
- package/lib/components/PodContainersTable/PodContainersTable.d.ts +8 -0
- package/lib/components/PodContainersTable/index.d.ts +1 -0
- package/lib/components/PodDropdown/index.d.ts +9 -0
- package/lib/components/PodLog/index.d.ts +6 -0
- package/lib/components/PodSelectorTable/index.d.ts +6 -0
- package/lib/components/PodShellModal/PodShell.d.ts +18 -0
- package/lib/components/PodShellModal/index.d.ts +9 -0
- package/lib/components/PortsTable/index.d.ts +7 -0
- package/lib/components/ReferenceLink/index.d.ts +8 -0
- package/lib/components/ReplicasDropdown/index.d.ts +9 -0
- package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +7 -0
- package/lib/components/ResourceCRUD/create/index.d.ts +7 -0
- package/lib/components/ResourceCRUD/index.d.ts +4 -0
- package/lib/components/ResourceCRUD/list/index.d.ts +8 -0
- package/lib/components/ResourceCRUD/show/index.d.ts +8 -0
- package/lib/components/ResourceFiledDisplays.d.ts +6 -0
- package/lib/components/ResourceLink/index.d.ts +8 -0
- package/lib/components/ResourceSelect/index.d.ts +11 -0
- package/lib/components/ResourceUsageBar/index.d.ts +8 -0
- package/lib/components/Separator/index.d.ts +2 -0
- package/lib/components/ServiceComponents/index.d.ts +10 -0
- package/lib/components/Shell/index.d.ts +54 -0
- package/lib/components/ShowContent/ShowContent.d.ts +18 -0
- package/lib/components/ShowContent/fields.d.ts +68 -0
- package/lib/components/ShowContent/groups.d.ts +23 -0
- package/lib/components/ShowContent/index.d.ts +4 -0
- package/lib/components/ShowContent/tabs.d.ts +5 -0
- package/lib/components/StateTag/StateTag.d.ts +10 -0
- package/lib/components/StateTag/index.d.ts +1 -0
- package/lib/components/Table/TableToolBar.d.ts +8 -0
- package/lib/components/Table/TableWidgets.d.ts +6 -0
- package/lib/components/Table/index.d.ts +43 -0
- package/lib/components/Tabs/index.d.ts +10 -0
- package/lib/components/Tags/index.d.ts +6 -0
- package/lib/components/TextTags/index.d.ts +6 -0
- package/lib/components/Time/index.d.ts +8 -0
- package/lib/components/ValueDisplay/index.d.ts +9 -0
- package/lib/components/WorkloadDropdown/index.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
- package/lib/components/WorkloadPodsTable/index.d.ts +1 -0
- package/lib/components/WorkloadReplicas/index.d.ts +17 -0
- package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
- package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
- package/lib/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
- package/lib/components/YamlEditor/index.d.ts +1 -0
- package/lib/components/YamlEditor/style.d.ts +11 -0
- package/lib/components/YamlEditor/yaml.worker.d.ts +1 -0
- package/lib/components/index.d.ts +47 -0
- package/lib/constants/auth.d.ts +5 -0
- package/lib/constants/index.d.ts +3 -0
- package/lib/constants/k8s.d.ts +487 -0
- package/lib/constants/state.d.ts +15 -0
- package/lib/contexts/component.d.ts +7 -0
- package/lib/contexts/configs.d.ts +3 -0
- package/lib/contexts/global-store.d.ts +5 -0
- package/lib/contexts/index.d.ts +3 -0
- package/lib/hooks/index.d.ts +8 -0
- package/lib/hooks/useDeleteModal/index.d.ts +1 -0
- package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +7 -0
- package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
- package/lib/hooks/useDownloadYAML.d.ts +7 -0
- package/lib/hooks/useEagleTable/columns.d.ts +41 -0
- package/lib/hooks/useEagleTable/index.d.ts +2 -0
- package/lib/hooks/useEagleTable/useEagleTable.d.ts +55 -0
- package/lib/hooks/useEdit.d.ts +4 -0
- package/lib/hooks/useGlobalStore.d.ts +3 -0
- package/lib/hooks/useK8sYamlEditor.d.ts +5 -0
- package/lib/hooks/useOpenForm.d.ts +7 -0
- package/lib/hooks/useSchema.d.ts +14 -0
- package/lib/hooks/useSubmitForm.d.ts +14 -0
- package/lib/hooks/useTableData.d.ts +19 -0
- package/lib/i18n.d.ts +353 -0
- package/lib/index.d.ts +11 -0
- package/lib/locales/en-US/index.d.ts +175 -0
- package/lib/locales/index.d.ts +2 -0
- package/lib/locales/zh-CN/index.d.ts +175 -0
- package/lib/main.d.ts +3 -0
- package/lib/models/cronjob-model.d.ts +15 -0
- package/lib/models/daemonset-model.d.ts +15 -0
- package/lib/models/deployment-model.d.ts +13 -0
- package/lib/models/event-model.d.ts +7 -0
- package/lib/models/index.d.ts +19 -0
- package/lib/models/ingress-model.d.ts +20 -0
- package/lib/models/job-model.d.ts +20 -0
- package/lib/models/network-policy-model.d.ts +9 -0
- package/lib/models/node-model.d.ts +17 -0
- package/lib/models/persistent-volume-claim.d.ts +9 -0
- package/lib/models/persistent-volume.d.ts +9 -0
- package/lib/models/pod-metrics-model.d.ts +8 -0
- package/lib/models/pod-model.d.ts +20 -0
- package/lib/models/resource-model.d.ts +21 -0
- package/lib/models/service-model.d.ts +24 -0
- package/lib/models/statefulset-model.d.ts +13 -0
- package/lib/models/storage-class.d.ts +12 -0
- package/lib/models/types/index.d.ts +1 -0
- package/lib/{src → models}/types/metric.d.ts +2 -2
- package/lib/models/workload-base-model.d.ts +12 -0
- package/lib/models/workload-model.d.ts +18 -0
- package/lib/pages/configmaps/index.d.ts +4 -0
- package/lib/{src/pages/statefulsets → pages/cronjobs}/create/index.d.ts +1 -1
- package/lib/pages/cronjobs/index.d.ts +3 -0
- package/lib/{src/pages/statefulsets → pages/cronjobs}/list/index.d.ts +1 -1
- package/lib/{src/pages/statefulsets → pages/cronjobs}/show/index.d.ts +1 -1
- package/lib/pages/daemonsets/create/index.d.ts +3 -0
- package/lib/pages/daemonsets/index.d.ts +3 -0
- package/lib/{src/pages/storageclasses → pages/daemonsets}/list/index.d.ts +1 -1
- package/lib/{src/pages/storageclasses → pages/daemonsets}/show/index.d.ts +1 -1
- package/lib/pages/deployments/index.d.ts +2 -0
- package/lib/pages/deployments/list/index.d.ts +3 -0
- package/lib/pages/deployments/show/index.d.ts +3 -0
- package/lib/pages/ingresses/index.d.ts +4 -0
- package/lib/pages/jobs/index.d.ts +4 -0
- package/lib/pages/networkPolicies/index.d.ts +4 -0
- package/lib/pages/nodes/index.d.ts +2 -0
- package/lib/pages/nodes/list/index.d.ts +3 -0
- package/lib/pages/nodes/show/index.d.ts +3 -0
- package/lib/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/pages/persistentvolumes/index.d.ts +4 -0
- package/lib/pages/pods/create/index.d.ts +3 -0
- package/lib/pages/pods/index.d.ts +3 -0
- package/lib/pages/pods/list/index.d.ts +3 -0
- package/lib/pages/pods/show/index.d.ts +3 -0
- package/lib/pages/secrets/index.d.ts +4 -0
- package/lib/pages/services/index.d.ts +4 -0
- package/lib/pages/statefulsets/index.d.ts +4 -0
- package/lib/pages/storageclasses/form/index.d.ts +9 -0
- package/lib/pages/storageclasses/index.d.ts +44 -0
- package/lib/plugins/index.d.ts +4 -0
- package/lib/plugins/model-plugin.d.ts +13 -0
- package/lib/plugins/relation-plugin.d.ts +26 -0
- package/lib/plugins/type.d.ts +8 -0
- package/lib/providers/index.d.ts +1 -0
- package/lib/providers/router-provider/index.d.ts +21 -0
- package/lib/src/components/ListPage/index.d.ts +1 -0
- package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
- package/lib/src/components/Shell/index.d.ts +4 -0
- package/lib/src/components/ShowContent/fields.d.ts +7 -2
- package/lib/src/components/index.d.ts +1 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +6 -6
- package/lib/src/i18n.d.ts +26 -1
- package/lib/src/locales/en-US/index.d.ts +14 -0
- package/lib/src/locales/zh-CN/index.d.ts +12 -1
- package/lib/src/models/cronjob-model.d.ts +0 -1
- package/lib/src/models/daemonset-model.d.ts +0 -1
- package/lib/src/models/deployment-model.d.ts +0 -1
- package/lib/src/models/event-model.d.ts +0 -1
- package/lib/src/models/ingress-model.d.ts +0 -1
- package/lib/src/models/job-model.d.ts +0 -1
- package/lib/src/models/network-policy-model.d.ts +0 -1
- package/lib/src/models/node-model.d.ts +0 -1
- package/lib/src/models/persistent-volume-claim.d.ts +0 -1
- package/lib/src/models/persistent-volume.d.ts +0 -1
- package/lib/src/models/pod-metrics-model.d.ts +0 -1
- package/lib/src/models/pod-model.d.ts +0 -1
- package/lib/src/models/resource-model.d.ts +1 -1
- package/lib/src/models/service-model.d.ts +0 -1
- package/lib/src/models/statefulset-model.d.ts +0 -1
- package/lib/src/models/storage-class.d.ts +0 -1
- package/lib/src/models/workload-base-model.d.ts +0 -1
- package/lib/src/models/workload-model.d.ts +0 -1
- package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
- package/lib/src/pages/persistentvolumes/index.d.ts +3 -18
- package/lib/types/index.d.ts +1 -0
- package/lib/types/resource.d.ts +62 -0
- package/lib/utils/addId.d.ts +3 -0
- package/lib/utils/download.d.ts +1 -0
- package/lib/utils/error.d.ts +20 -0
- package/lib/utils/form.d.ts +3 -0
- package/lib/utils/k8s.d.ts +3 -0
- package/lib/utils/labels.d.ts +9 -0
- package/lib/utils/match-selector.d.ts +3 -0
- package/lib/utils/openapi.d.ts +45 -0
- package/lib/utils/schema.d.ts +17 -0
- package/lib/utils/selector.d.ts +3 -0
- package/lib/utils/shell.d.ts +15 -0
- package/lib/utils/string.d.ts +1 -0
- package/lib/utils/time.d.ts +13 -0
- package/lib/utils/unit.d.ts +12 -0
- package/lib/utils/yaml.d.ts +2 -0
- package/package.json +5 -5
- package/lib/src/components/KeyValueData/index.d.ts +0 -6
- package/lib/src/components/ModalContextProvider/index.d.ts +0 -12
- package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +0 -1
- package/lib/src/components/Shell/zmodem/index.d.ts +0 -51
- package/lib/src/components/Table/ErrorContent.d.ts +0 -10
- package/lib/src/hooks/useModal.d.ts +0 -0
- package/lib/src/model/cronjob-model.d.ts +0 -9
- package/lib/src/model/index.d.ts +0 -6
- package/lib/src/model/job-model.d.ts +0 -10
- package/lib/src/model/pod-metrics-model.d.ts +0 -7
- package/lib/src/model/pod-model.d.ts +0 -15
- package/lib/src/model/resource-model.d.ts +0 -17
- package/lib/src/model/workload-model.d.ts +0 -17
- package/lib/src/pages/deployments/create/index.d.ts +0 -3
- package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +0 -17
- /package/lib/{src/components/Form → components/FormWidgets}/widget.d.ts +0 -0
- /package/lib/{src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts → components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts} +0 -0
- /package/lib/{src/hooks/useNamespaceFilter.d.ts → hooks/useNamespaceRefineFilter.d.ts} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ErrorWrapper: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
3
|
+
export declare const ErrorContent: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
4
|
+
export declare enum ErrorContentType {
|
|
5
|
+
List = "list",
|
|
6
|
+
Card = "card",
|
|
7
|
+
Widget = "widget"
|
|
8
|
+
}
|
|
9
|
+
export type WidgetErrorContentProps = {
|
|
10
|
+
className?: string;
|
|
11
|
+
style?: React.CSSProperties;
|
|
12
|
+
errorText?: string;
|
|
13
|
+
type?: ErrorContentType;
|
|
14
|
+
refetch?: () => void;
|
|
15
|
+
};
|
|
16
|
+
declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
|
|
17
|
+
export default WidgetErrorContent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './EventsTable';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { YamlFormProps } from '
|
|
2
|
+
import { YamlFormProps } from './YamlForm';
|
|
3
|
+
export declare const FullscreenModalStyle: import("@linaria/core").LinariaClassName;
|
|
3
4
|
export type FormModalProps = {
|
|
4
5
|
resource?: string;
|
|
5
6
|
id?: string;
|
|
@@ -7,4 +8,3 @@ export type FormModalProps = {
|
|
|
7
8
|
renderForm?: (props: YamlFormProps) => React.ReactNode;
|
|
8
9
|
};
|
|
9
10
|
export declare function FormModal(props: FormModalProps): JSX.Element;
|
|
10
|
-
export default FormModal;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { UseFormReturnType } from '@refinedev/react-hook-form';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
import { ResourceConfig } from '../../types';
|
|
4
|
+
type Props<Model extends ResourceModel> = {
|
|
5
|
+
config?: ResourceConfig<Model>;
|
|
6
|
+
formResult: UseFormReturnType;
|
|
7
|
+
errorMsg?: string;
|
|
8
|
+
resourceId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const RefineFormContent: <Model extends ResourceModel>(props: Props<Model>) => JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FormAction } from '@refinedev/core';
|
|
3
|
-
import
|
|
2
|
+
import { Unstructured } from 'k8s-api-provider';
|
|
3
|
+
import useYamlForm from './useYamlForm';
|
|
4
4
|
export declare enum SchemaStrategy {
|
|
5
5
|
Required = "Required",
|
|
6
6
|
Optional = "Optional",
|
|
@@ -10,16 +10,19 @@ export interface YamlFormProps {
|
|
|
10
10
|
id?: string;
|
|
11
11
|
action?: FormAction;
|
|
12
12
|
initialValues?: Record<string, unknown>;
|
|
13
|
-
transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
|
|
14
13
|
schemaStrategy?: SchemaStrategy;
|
|
15
14
|
isShowLayout?: boolean;
|
|
16
|
-
useFormProps?: Parameters<typeof
|
|
15
|
+
useFormProps?: Parameters<typeof useYamlForm>[0];
|
|
16
|
+
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
17
|
+
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
17
18
|
onSaveButtonPropsChange?: (saveButtonProps: {
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
onClick: () => void;
|
|
21
|
+
loading?: boolean | {
|
|
22
|
+
delay?: number | undefined;
|
|
23
|
+
};
|
|
20
24
|
}) => void;
|
|
21
25
|
onErrorsChange?: (errors: string[]) => void;
|
|
22
26
|
onFinish?: () => void;
|
|
23
27
|
}
|
|
24
|
-
declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
25
|
-
export default YamlForm;
|
|
28
|
+
export declare function YamlForm(props: YamlFormProps): JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Control } from 'react-hook-form';
|
|
3
|
+
export type RefineFormValidator = (value: unknown, formValue: unknown) => {
|
|
4
|
+
isValid: boolean;
|
|
5
|
+
errorMsg: string;
|
|
6
|
+
};
|
|
7
|
+
export type RefineFormField = {
|
|
8
|
+
path: string[];
|
|
9
|
+
key: string;
|
|
10
|
+
label: string;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
helperText?: React.ReactNode;
|
|
13
|
+
type?: 'number';
|
|
14
|
+
validators?: RefineFormValidator[];
|
|
15
|
+
disabledWhenEdit?: boolean;
|
|
16
|
+
render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create', control: Control) => React.ReactElement;
|
|
17
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BaseRecord, HttpError, UseFormProps as UseFormCoreProps, UseFormReturnType as UseFormReturnTypeCore } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { UseFormProps as UseHookFormProps, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
4
|
+
export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturn<TVariables, TContext> & {
|
|
5
|
+
refineCore: UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
6
|
+
saveButtonProps: {
|
|
7
|
+
disabled: boolean;
|
|
8
|
+
onClick: (e: React.BaseSyntheticEvent) => void;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = {
|
|
12
|
+
/**
|
|
13
|
+
* Configuration object for the core of the [useForm](/docs/api-reference/core/hooks/useForm/)
|
|
14
|
+
* @type [`UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>`](/docs/api-reference/core/hooks/useForm/#properties)
|
|
15
|
+
*/
|
|
16
|
+
refineCoreProps?: UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
|
|
17
|
+
/**
|
|
18
|
+
* When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box.
|
|
19
|
+
* @default `false*`
|
|
20
|
+
*/
|
|
21
|
+
warnWhenUnsavedChanges?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Disables server-side validation
|
|
24
|
+
* @default false
|
|
25
|
+
* @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
|
|
26
|
+
*/
|
|
27
|
+
disableServerSideValidation?: boolean;
|
|
28
|
+
} & UseHookFormProps<TVariables, TContext>;
|
|
29
|
+
export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ResourceConfig } from '../../types';
|
|
2
|
+
import { UseFormProps } from './useReactHookForm';
|
|
3
|
+
export declare const useRefineForm: (props: {
|
|
4
|
+
config: ResourceConfig;
|
|
5
|
+
id?: string;
|
|
6
|
+
refineProps?: UseFormProps["refineCoreProps"];
|
|
7
|
+
useFormProps?: UseFormProps;
|
|
8
|
+
}) => {
|
|
9
|
+
formResult: import("./useReactHookForm").UseFormReturnType<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, {
|
|
10
|
+
[x: string]: any;
|
|
11
|
+
}, {}, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError>;
|
|
12
|
+
responseErrorMsg: string;
|
|
13
|
+
};
|
|
@@ -20,11 +20,14 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
|
|
|
20
20
|
isSkipSchema?: boolean;
|
|
21
21
|
};
|
|
22
22
|
initialValuesForCreate?: Record<string, unknown>;
|
|
23
|
-
|
|
23
|
+
transformInitValues?: (values: Unstructured) => Unstructured;
|
|
24
|
+
transformApplyValues?: (values: Unstructured) => Unstructured;
|
|
24
25
|
};
|
|
25
26
|
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
27
|
form: FormInstance;
|
|
27
|
-
formProps: FormProps
|
|
28
|
+
formProps: Omit<FormProps, 'onFinish'> & {
|
|
29
|
+
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void> | undefined;
|
|
30
|
+
};
|
|
28
31
|
saveButtonProps: ButtonProps & {
|
|
29
32
|
onClick: () => void;
|
|
30
33
|
};
|
|
@@ -38,11 +41,11 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
|
|
|
38
41
|
switchEditor: () => void;
|
|
39
42
|
onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
|
|
40
43
|
};
|
|
41
|
-
declare const
|
|
44
|
+
declare const useYamlForm: <TQueryFnData extends Unstructured = Unstructured & {
|
|
42
45
|
id: string;
|
|
43
46
|
}, TError extends HttpError = HttpError, TVariables extends {
|
|
44
47
|
[prop: string]: unknown;
|
|
45
48
|
} = {
|
|
46
49
|
[prop: string]: unknown;
|
|
47
|
-
}, 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,
|
|
48
|
-
export default
|
|
50
|
+
}, 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>;
|
|
51
|
+
export default useYamlForm;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './IngressRulesTable';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
export type DropdownSize = 'normal' | 'large';
|
|
4
|
+
interface K8sDropdownProps {
|
|
5
|
+
record: ResourceModel;
|
|
6
|
+
size?: DropdownSize;
|
|
7
|
+
}
|
|
8
|
+
export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
|
|
9
|
+
export default K8sDropdown;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { TableProps } from 'src/components/Table';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
interface ListPageProps<T extends ResourceModel> {
|
|
4
|
+
selectedKeys: string[];
|
|
5
|
+
tableProps: TableProps<T>;
|
|
6
|
+
contentClassName?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Menu: () => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const NS_STORE_KEY = "namespace-filter";
|
|
3
|
+
export declare const ALL_NS = "_all";
|
|
4
|
+
export declare const useNamespacesFilter: () => {
|
|
5
|
+
value: string[];
|
|
6
|
+
};
|
|
7
|
+
interface NamespaceFilterProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const NamespacesFilter: React.FC<NamespaceFilterProps>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './NetworkPolicyRulesViewer';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../models';
|
|
3
|
+
import { ShowConfig } from '../ShowContent';
|
|
4
|
+
type Props<Model extends ResourceModel> = {
|
|
5
|
+
showConfig: ShowConfig<Model>;
|
|
6
|
+
formatter?: (r: Model) => Model;
|
|
7
|
+
Dropdown?: React.FC<{
|
|
8
|
+
record: Model;
|
|
9
|
+
}>;
|
|
10
|
+
};
|
|
11
|
+
export declare const PageShow: <Model extends ResourceModel>(props: Props<Model>) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PageShow';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ContainerStatus } from 'kubernetes-types/core/v1';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
containerStatuses: ContainerStatus[];
|
|
5
|
+
initContainerStatuses: ContainerStatus[];
|
|
6
|
+
};
|
|
7
|
+
export declare const PodContainersTable: React.FC<Props>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './PodContainersTable';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PodModel } from '../../models';
|
|
3
|
+
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
+
type Props<Model extends PodModel> = {
|
|
5
|
+
record: Model;
|
|
6
|
+
size?: DropdownSize;
|
|
7
|
+
};
|
|
8
|
+
export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SocketStatus } from 'src/components/Shell';
|
|
3
|
+
import '@xterm/xterm/css/xterm.css';
|
|
4
|
+
import { PodModel } from 'src/models/pod-model';
|
|
5
|
+
export declare enum OS {
|
|
6
|
+
Linux = "linux",
|
|
7
|
+
Windows = "windows"
|
|
8
|
+
}
|
|
9
|
+
interface PodShellProps {
|
|
10
|
+
pod: PodModel;
|
|
11
|
+
basePath: string;
|
|
12
|
+
onSocketStatusChange?: (socketStatus: SocketStatus) => void;
|
|
13
|
+
}
|
|
14
|
+
interface PodShellHandler {
|
|
15
|
+
getAllTerminalContents: () => string[];
|
|
16
|
+
}
|
|
17
|
+
export declare const PodShell: React.ForwardRefExoticComponent<PodShellProps & React.RefAttributes<PodShellHandler>>;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SocketStatus } from 'src/components/Shell';
|
|
2
|
+
import { PodModel } from 'src/models';
|
|
3
|
+
import { PodShell } from './PodShell';
|
|
4
|
+
interface PodShellModalProps {
|
|
5
|
+
pod: PodModel;
|
|
6
|
+
onSocketStatusChange?: (socketStatus: SocketStatus) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function PodShellModal(props: PodShellModalProps): JSX.Element;
|
|
9
|
+
export { PodShell };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WorkloadModel } from '../../models';
|
|
3
|
+
import { DropdownSize } from '../K8sDropdown';
|
|
4
|
+
type Props<Model extends WorkloadModel> = {
|
|
5
|
+
record: Model;
|
|
6
|
+
size?: DropdownSize;
|
|
7
|
+
};
|
|
8
|
+
export declare function ReplicasDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResourceModel } from '../../../models';
|
|
2
|
+
import { ResourceConfig } from '../../../types';
|
|
3
|
+
type Props<Model extends ResourceModel> = {
|
|
4
|
+
config: ResourceConfig<Model>;
|
|
5
|
+
};
|
|
6
|
+
export declare function ResourceForm<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IResourceComponentsProps } from '@refinedev/core';
|
|
2
|
+
import { ResourceModel } from '../../../models';
|
|
3
|
+
import { ResourceConfig } from '../../../types';
|
|
4
|
+
type Props<Model extends ResourceModel> = IResourceComponentsProps & {
|
|
5
|
+
config: ResourceConfig<Model>;
|
|
6
|
+
};
|
|
7
|
+
export declare function ResourceList<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IResourceComponentsProps } from '@refinedev/core';
|
|
2
|
+
import { ResourceModel } from '../../../models';
|
|
3
|
+
import { ResourceConfig } from '../../../types';
|
|
4
|
+
type Props<Model extends ResourceModel> = IResourceComponentsProps & {
|
|
5
|
+
config: ResourceConfig<Model>;
|
|
6
|
+
};
|
|
7
|
+
export declare function ResourceShow<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KitSelectProps } from '@cloudtower/eagle';
|
|
2
|
+
type ResourceSelectProps = {
|
|
3
|
+
resource: string;
|
|
4
|
+
resourceBasePath: string;
|
|
5
|
+
kind: string;
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: (...params: unknown[]) => void;
|
|
8
|
+
selectProps?: KitSelectProps;
|
|
9
|
+
};
|
|
10
|
+
export declare function ResourceSelect(props: ResourceSelectProps): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ServiceModel } from '../../models';
|
|
3
|
+
type Props = {
|
|
4
|
+
service: ServiceModel;
|
|
5
|
+
};
|
|
6
|
+
export declare const ServiceInClusterAccessComponent: React.FC<Props>;
|
|
7
|
+
export declare const ServiceOutClusterAccessComponent: React.FC<Props & {
|
|
8
|
+
breakLine?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
export {};
|