@dovetail-v2/refine 0.0.0
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/README.MD +49 -0
- package/dist/MonacoYamlDiffEditor.15cce01f.js +54 -0
- package/dist/assets/yaml.worker.bb17811d.js +39447 -0
- package/dist/favicon.ico +0 -0
- package/dist/images/flags/de.svg +1 -0
- package/dist/images/flags/en.svg +1 -0
- package/dist/index.cbb145c9.js +9820 -0
- package/dist/locales/de/common.json +167 -0
- package/dist/locales/en/common.json +167 -0
- package/dist/refine.js +30 -0
- package/dist/refine.umd.cjs +9874 -0
- package/dist/style.css +32634 -0
- package/lib/src/App.d.ts +6 -0
- package/lib/src/Dovetail.d.ts +10 -0
- package/lib/src/components/Breadcrumb/index.d.ts +6 -0
- package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
- package/lib/src/components/ConditionsTable/index.d.ts +1 -0
- package/lib/src/components/CreateButton/index.d.ts +2 -0
- package/lib/src/components/CronJobDropdown/index.d.ts +7 -0
- package/lib/src/components/CronjobJobsTable/index.d.ts +7 -0
- package/lib/src/components/DeleteButton/index.d.ts +2 -0
- package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
- package/lib/src/components/DrawerShow/DrawerShow.d.ts +10 -0
- package/lib/src/components/DrawerShow/index.d.ts +1 -0
- package/lib/src/components/EditButton/index.d.ts +2 -0
- package/lib/src/components/Form/KeyValueListWidget.d.ts +6 -0
- package/lib/src/components/Form/MetadataForm.d.ts +2 -0
- package/lib/src/components/Form/NameInputWidget.d.ts +51 -0
- package/lib/src/components/Form/NamespaceSelectWidget.d.ts +9 -0
- package/lib/src/components/Form/index.d.ts +4 -0
- package/lib/src/components/Form/widget.d.ts +5 -0
- package/lib/src/components/FormLayout/index.d.ts +3 -0
- package/lib/src/components/ImageNames/index.d.ts +4 -0
- package/lib/src/components/K8sDropdown/index.d.ts +7 -0
- package/lib/src/components/KeyValue/KeyValue.d.ts +6 -0
- package/lib/src/components/KeyValue/index.d.ts +1 -0
- package/lib/src/components/Layout/index.d.ts +3 -0
- package/lib/src/components/ListPage/index.d.ts +10 -0
- package/lib/src/components/Menu/index.d.ts +2 -0
- package/lib/src/components/NamespacesFilter/index.d.ts +7 -0
- package/lib/src/components/PageShow/PageShow.d.ts +13 -0
- package/lib/src/components/PageShow/index.d.ts +1 -0
- package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
- package/lib/src/components/PodContainersTable/index.d.ts +1 -0
- package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
- package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
- package/lib/src/components/ResourceCRUD/index.d.ts +1 -0
- package/lib/src/components/ResourceCRUD/list/index.d.ts +14 -0
- package/lib/src/components/ResourceCRUD/show/index.d.ts +14 -0
- package/lib/src/components/Separator/index.d.ts +2 -0
- package/lib/src/components/ShowContent/ShowContent.d.ts +13 -0
- package/lib/src/components/ShowContent/fields.d.ts +16 -0
- package/lib/src/components/ShowContent/index.d.ts +2 -0
- package/lib/src/components/StateTag/StateTag.d.ts +6 -0
- package/lib/src/components/StateTag/index.d.ts +1 -0
- package/lib/src/components/Table/ErrorContent.d.ts +10 -0
- package/lib/src/components/Table/TableToolBar.d.ts +8 -0
- package/lib/src/components/Table/TableWidgets.d.ts +6 -0
- package/lib/src/components/Table/index.d.ts +28 -0
- package/lib/src/components/Tags/index.d.ts +6 -0
- package/lib/src/components/Time/index.d.ts +9 -0
- package/lib/src/components/WorkloadDropdown/index.d.ts +7 -0
- package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +5 -0
- package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
- package/lib/src/components/WorkloadReplicas/index.d.ts +5 -0
- package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
- package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
- package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +26 -0
- package/lib/src/components/YamlEditor/index.d.ts +1 -0
- package/lib/src/components/YamlEditor/style.d.ts +11 -0
- package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
- package/lib/src/components/YamlForm/index.d.ts +6 -0
- package/lib/src/constants/k8s.d.ts +204 -0
- package/lib/src/hooks/index.d.ts +2 -0
- package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
- package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
- package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
- package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
- package/lib/src/hooks/useEagleForm.d.ts +39 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +15 -0
- package/lib/src/hooks/useEagleTable/index.d.ts +52 -0
- package/lib/src/hooks/useEdit.d.ts +4 -0
- package/lib/src/hooks/useSchema.d.ts +7 -0
- package/lib/src/i18n.d.ts +72 -0
- package/lib/src/index.d.ts +6 -0
- package/lib/src/locales/en-US/index.d.ts +15 -0
- package/lib/src/locales/index.d.ts +2 -0
- package/lib/src/locales/zh-CN/index.d.ts +55 -0
- package/lib/src/main.d.ts +1 -0
- package/lib/src/model/cronjob-model.d.ts +9 -0
- package/lib/src/model/index.d.ts +5 -0
- package/lib/src/model/job-model.d.ts +10 -0
- package/lib/src/model/pod-model.d.ts +10 -0
- package/lib/src/model/resource-model.d.ts +17 -0
- package/lib/src/model/workload-model.d.ts +17 -0
- package/lib/src/pages/configmaps/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
- package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
- package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
- package/lib/src/pages/deployments/create/index.d.ts +3 -0
- package/lib/src/pages/deployments/index.d.ts +3 -0
- package/lib/src/pages/deployments/list/index.d.ts +3 -0
- package/lib/src/pages/deployments/show/index.d.ts +3 -0
- package/lib/src/pages/jobs/index.d.ts +4 -0
- package/lib/src/pages/pods/create/index.d.ts +3 -0
- package/lib/src/pages/pods/index.d.ts +3 -0
- package/lib/src/pages/pods/list/index.d.ts +3 -0
- package/lib/src/pages/pods/show/index.d.ts +3 -0
- package/lib/src/pages/secrets/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/create/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/list/index.d.ts +3 -0
- package/lib/src/pages/statefulsets/show/index.d.ts +3 -0
- package/lib/src/providers/index.d.ts +1 -0
- package/lib/src/providers/router-provider/index.d.ts +21 -0
- package/lib/src/types/index.d.ts +1 -0
- package/lib/src/types/resource.d.ts +39 -0
- package/lib/src/utils/addId.d.ts +3 -0
- package/lib/src/utils/download.d.ts +1 -0
- package/lib/src/utils/error.d.ts +20 -0
- package/lib/src/utils/k8s.d.ts +3 -0
- package/lib/src/utils/labels.d.ts +9 -0
- package/lib/src/utils/openapi.d.ts +45 -0
- package/lib/src/utils/schema.d.ts +17 -0
- package/lib/src/utils/string.d.ts +1 -0
- package/lib/src/utils/time.d.ts +8 -0
- package/lib/src/utils/yaml.d.ts +2 -0
- package/lib/vite.config.d.ts +2 -0
- package/package.json +90 -0
package/lib/src/App.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './styles.css';
|
|
3
|
+
import 'antd/dist/antd.css';
|
|
4
|
+
import '@cloudtower/eagle/dist/style.css';
|
|
5
|
+
import { ResourceConfig } from './types';
|
|
6
|
+
type Props = {
|
|
7
|
+
resourcesConfig: ResourceConfig[];
|
|
8
|
+
};
|
|
9
|
+
export declare const Dovetail: React.FC<Props>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ConditionsTable';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ResourceModel } from '../../model';
|
|
3
|
+
import { Resource } from '../../types';
|
|
4
|
+
import { ShowField } from '../ShowContent';
|
|
5
|
+
type Props<Raw extends Resource, Model extends ResourceModel> = {
|
|
6
|
+
fieldGroups: ShowField<Model>[][];
|
|
7
|
+
formatter: (r: Raw) => Model;
|
|
8
|
+
};
|
|
9
|
+
export declare const DrawerShow: <Raw extends Resource, Model extends ResourceModel>(props: Props<Raw, Model>) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DrawerShow';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FormWidgetProps } from './widget';
|
|
3
|
+
export type KeyValueListWidgetProps = FormWidgetProps<Record<string, string>> & {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
};
|
|
6
|
+
export declare function KeyValueListWidget(props: KeyValueListWidgetProps): JSX.Element;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AntdInputProps } from '@cloudtower/eagle';
|
|
3
|
+
export declare function NameInputWidget(props: AntdInputProps): JSX.Element;
|
|
4
|
+
export declare const dnsSubDomainRules: ({
|
|
5
|
+
required: boolean;
|
|
6
|
+
message: string;
|
|
7
|
+
pattern?: undefined;
|
|
8
|
+
max?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
pattern: RegExp;
|
|
11
|
+
message: string;
|
|
12
|
+
required?: undefined;
|
|
13
|
+
max?: undefined;
|
|
14
|
+
} | {
|
|
15
|
+
max: number;
|
|
16
|
+
message: string;
|
|
17
|
+
required?: undefined;
|
|
18
|
+
pattern?: undefined;
|
|
19
|
+
})[];
|
|
20
|
+
export declare const rfc1123LabelRules: ({
|
|
21
|
+
required: boolean;
|
|
22
|
+
message: string;
|
|
23
|
+
pattern?: undefined;
|
|
24
|
+
max?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
pattern: RegExp;
|
|
27
|
+
message: string;
|
|
28
|
+
required?: undefined;
|
|
29
|
+
max?: undefined;
|
|
30
|
+
} | {
|
|
31
|
+
max: number;
|
|
32
|
+
message: string;
|
|
33
|
+
required?: undefined;
|
|
34
|
+
pattern?: undefined;
|
|
35
|
+
})[];
|
|
36
|
+
export declare const rfc1035LabelRules: ({
|
|
37
|
+
required: boolean;
|
|
38
|
+
message: string;
|
|
39
|
+
pattern?: undefined;
|
|
40
|
+
max?: undefined;
|
|
41
|
+
} | {
|
|
42
|
+
pattern: RegExp;
|
|
43
|
+
message: string;
|
|
44
|
+
required?: undefined;
|
|
45
|
+
max?: undefined;
|
|
46
|
+
} | {
|
|
47
|
+
max: number;
|
|
48
|
+
message: string;
|
|
49
|
+
required?: undefined;
|
|
50
|
+
pattern?: undefined;
|
|
51
|
+
})[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { FormWidgetProps } from './widget';
|
|
3
|
+
type NamespaceSelectProps = FormWidgetProps<string | string[]>;
|
|
4
|
+
export declare function NamespaceSelectWidget(props: NamespaceSelectProps): JSX.Element;
|
|
5
|
+
export declare const namespaceRules: {
|
|
6
|
+
required: boolean;
|
|
7
|
+
message: string;
|
|
8
|
+
}[];
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './KeyValue';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TableProps } from 'src/components/Table';
|
|
3
|
+
import { ResourceModel } from 'src/model';
|
|
4
|
+
interface ListPageProps<T extends ResourceModel> {
|
|
5
|
+
title: string;
|
|
6
|
+
selectedKeys: string[];
|
|
7
|
+
tableProps: TableProps<T>;
|
|
8
|
+
}
|
|
9
|
+
declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
|
|
10
|
+
export default ListPage;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../model';
|
|
3
|
+
import { Resource } from '../../types';
|
|
4
|
+
import { ShowField } from '../ShowContent';
|
|
5
|
+
type Props<Raw extends Resource, Model extends ResourceModel> = {
|
|
6
|
+
fieldGroups: ShowField<Model>[][];
|
|
7
|
+
formatter: (r: Raw) => Model;
|
|
8
|
+
Dropdown?: React.FC<{
|
|
9
|
+
data: Model;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const PageShow: <Raw extends Resource, Model extends ResourceModel>(props: Props<Raw, Model>) => JSX.Element;
|
|
13
|
+
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 @@
|
|
|
1
|
+
export * from './ResourceCRUD';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IResourceComponentsProps } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ResourceModel } from '../../../model';
|
|
4
|
+
import { Resource } from '../../../types';
|
|
5
|
+
import { Column } from '../../Table';
|
|
6
|
+
type Props<Model extends ResourceModel> = IResourceComponentsProps & {
|
|
7
|
+
formatter: (v: Resource) => Model;
|
|
8
|
+
columns: Column<Model>[];
|
|
9
|
+
Dropdown?: React.FC<{
|
|
10
|
+
data: Model;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export declare function ResourceList<Raw extends Resource, Model extends ResourceModel>(props: Props<Model>): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IResourceComponentsProps } from '@refinedev/core';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ResourceModel } from '../../../model';
|
|
4
|
+
import { Resource } from '../../../types';
|
|
5
|
+
import { ShowField } from '../../ShowContent';
|
|
6
|
+
type Props<Model extends ResourceModel> = IResourceComponentsProps & {
|
|
7
|
+
formatter: (v: Resource) => Model;
|
|
8
|
+
filedGroups: ShowField<Model>[][];
|
|
9
|
+
Dropdown?: React.FC<{
|
|
10
|
+
data: Model;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
export declare function ResourceShow<Raw extends Resource, Model extends ResourceModel>(props: Props<Model>): JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ResourceModel } from '../../model';
|
|
3
|
+
import { Resource } from '../../types';
|
|
4
|
+
import { ShowField } from './fields';
|
|
5
|
+
type Props<Raw extends Resource, Model extends ResourceModel> = {
|
|
6
|
+
fieldGroups: ShowField<Model>[][];
|
|
7
|
+
formatter: (r: Raw) => Model;
|
|
8
|
+
Dropdown?: React.FC<{
|
|
9
|
+
data: Model;
|
|
10
|
+
}>;
|
|
11
|
+
};
|
|
12
|
+
export declare const ShowContent: <Raw extends Resource, Model extends ResourceModel>(props: Props<Raw, Model>) => JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { i18n } from 'i18next';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { JobModel, ResourceModel, WorkloadModel } from '../../model';
|
|
4
|
+
export type ShowField<Model extends ResourceModel> = {
|
|
5
|
+
key: string;
|
|
6
|
+
title: string;
|
|
7
|
+
path: string[];
|
|
8
|
+
render?: (val: unknown, record: Model) => React.ReactElement | undefined;
|
|
9
|
+
};
|
|
10
|
+
export declare const ImageField: (i18n: i18n) => ShowField<WorkloadModel>;
|
|
11
|
+
export declare const ReplicaField: (i18n: i18n) => ShowField<WorkloadModel>;
|
|
12
|
+
export declare const ConditionsField: (i18n: i18n) => ShowField<WorkloadModel>;
|
|
13
|
+
export declare const PodsField: (_: i18n) => ShowField<WorkloadModel>;
|
|
14
|
+
export declare const JobsField: (_: i18n) => ShowField<WorkloadModel>;
|
|
15
|
+
export declare const DataField: (i18n: i18n) => ShowField<ResourceModel>;
|
|
16
|
+
export declare const StartTimeField: (i18n: i18n) => ShowField<JobModel>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './StateTag';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ErrorWrapper: import("@linaria/core").LinariaClassName;
|
|
3
|
+
export declare const ErrorContent: import("@linaria/core").LinariaClassName;
|
|
4
|
+
export type WidgetErrorContentProps = {
|
|
5
|
+
errorText?: string;
|
|
6
|
+
style?: React.CSSProperties;
|
|
7
|
+
refetch?: () => void;
|
|
8
|
+
};
|
|
9
|
+
declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
|
|
10
|
+
export default WidgetErrorContent;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const ColumnTitle: React.FC<{
|
|
3
|
+
sortOrder?: 'descend' | 'ascend' | null;
|
|
4
|
+
title: React.ReactNode;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const AuxiliaryLine: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { TableProps as BaseTableProps } from '@cloudtower/eagle';
|
|
2
|
+
import { RequiredColumnProps } from '@cloudtower/eagle/dist/spec/base';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { ResourceModel } from '../../model';
|
|
5
|
+
export type IDObject = {
|
|
6
|
+
id: string;
|
|
7
|
+
};
|
|
8
|
+
export type Column<Data extends ResourceModel> = RequiredColumnProps<Data> & {
|
|
9
|
+
display: boolean;
|
|
10
|
+
};
|
|
11
|
+
export type TableProps<Data extends ResourceModel> = {
|
|
12
|
+
className?: string;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
error: boolean;
|
|
15
|
+
dataSource: Data[];
|
|
16
|
+
refetch: () => void;
|
|
17
|
+
rowKey: (string & keyof Data) | ((record: Data) => string);
|
|
18
|
+
columns: Array<Column<Data>>;
|
|
19
|
+
scroll?: BaseTableProps<Data>['scroll'];
|
|
20
|
+
currentPage: number;
|
|
21
|
+
currentSize: number;
|
|
22
|
+
onActive?: (key: unknown, record: Data) => void;
|
|
23
|
+
onSelect?: (keys: React.Key[], rows: Data[]) => void;
|
|
24
|
+
onPageChange: (page: number) => void;
|
|
25
|
+
onSizeChange?: (size: number) => void;
|
|
26
|
+
};
|
|
27
|
+
declare function Table<Data extends ResourceModel>(props: TableProps<Data>): JSX.Element;
|
|
28
|
+
export default Table;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './WorkloadPodsTable';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type JSONSchema7 } from 'json-schema';
|
|
2
|
+
import * as monaco from 'monaco-editor';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
type Props = {
|
|
5
|
+
className?: string;
|
|
6
|
+
id?: string;
|
|
7
|
+
defaultValue: string;
|
|
8
|
+
height?: string;
|
|
9
|
+
onChange?: (val: string) => void;
|
|
10
|
+
onValidate?: (valid: boolean, schemaValid: boolean) => void;
|
|
11
|
+
isScrollOnFocus?: boolean;
|
|
12
|
+
onEditorCreate?: (editor: monaco.editor.ICodeEditor) => void;
|
|
13
|
+
onBlur?: () => void;
|
|
14
|
+
getInstance?: (ins: monaco.editor.IStandaloneCodeEditor) => void;
|
|
15
|
+
schema?: JSONSchema7;
|
|
16
|
+
readOnly?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const MonacoYamlEditor: React.FC<Props>;
|
|
19
|
+
export default MonacoYamlEditor;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { JSONSchema7 } from 'json-schema';
|
|
2
|
+
import type * as monaco from 'monaco-editor';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
export type YamlEditorProps = {
|
|
5
|
+
eleRef?: React.MutableRefObject<HTMLDivElement>;
|
|
6
|
+
title?: string;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
errorMsgs?: string[];
|
|
9
|
+
schema: JSONSchema7;
|
|
10
|
+
id?: string;
|
|
11
|
+
className?: string;
|
|
12
|
+
height?: string;
|
|
13
|
+
collapsable?: boolean;
|
|
14
|
+
isDefaultCollapsed?: boolean;
|
|
15
|
+
readOnly?: boolean;
|
|
16
|
+
onChange?: (value: string) => void;
|
|
17
|
+
onValidate?: (valid: boolean, schemaValid: boolean) => void;
|
|
18
|
+
onEditorCreate?: (editor: monaco.editor.ICodeEditor) => void;
|
|
19
|
+
onBlur?: () => void;
|
|
20
|
+
};
|
|
21
|
+
export type YamlEditorHandle = {
|
|
22
|
+
setValue: (value: string) => void;
|
|
23
|
+
setEditorValue: (value: string) => void;
|
|
24
|
+
getEditorValue: () => string;
|
|
25
|
+
};
|
|
26
|
+
export declare const YamlEditorComponent: React.ForwardRefExoticComponent<YamlEditorProps & React.RefAttributes<YamlEditorHandle>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './YamlEditorComponent';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const ToolBarStyle: import("@linaria/core").LinariaClassName;
|
|
2
|
+
export declare const ToolBarHeaderStyle: import("@linaria/core").LinariaClassName;
|
|
3
|
+
export declare const ErrorIconStyle: import("@linaria/core").LinariaClassName;
|
|
4
|
+
export declare const WrapperStyle: import("@linaria/core").LinariaClassName;
|
|
5
|
+
export declare const TitleStyle: import("@linaria/core").LinariaClassName;
|
|
6
|
+
export declare const IconStyle: import("@linaria/core").LinariaClassName;
|
|
7
|
+
export declare const DisabledIconStyle: import("@linaria/core").LinariaClassName;
|
|
8
|
+
export declare const PlainCodeStyle: import("@linaria/core").LinariaClassName;
|
|
9
|
+
export declare const ErrorMsgStyle: import("@linaria/core").LinariaClassName;
|
|
10
|
+
export declare const ErrorWrapperStyle: import("@linaria/core").LinariaClassName;
|
|
11
|
+
export declare const YamlEditorStyle: import("@linaria/core").LinariaClassName;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import 'monaco-yaml/yaml.worker.js';
|