@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.
Files changed (134) hide show
  1. package/README.MD +49 -0
  2. package/dist/MonacoYamlDiffEditor.15cce01f.js +54 -0
  3. package/dist/assets/yaml.worker.bb17811d.js +39447 -0
  4. package/dist/favicon.ico +0 -0
  5. package/dist/images/flags/de.svg +1 -0
  6. package/dist/images/flags/en.svg +1 -0
  7. package/dist/index.cbb145c9.js +9820 -0
  8. package/dist/locales/de/common.json +167 -0
  9. package/dist/locales/en/common.json +167 -0
  10. package/dist/refine.js +30 -0
  11. package/dist/refine.umd.cjs +9874 -0
  12. package/dist/style.css +32634 -0
  13. package/lib/src/App.d.ts +6 -0
  14. package/lib/src/Dovetail.d.ts +10 -0
  15. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  16. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  17. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  18. package/lib/src/components/CreateButton/index.d.ts +2 -0
  19. package/lib/src/components/CronJobDropdown/index.d.ts +7 -0
  20. package/lib/src/components/CronjobJobsTable/index.d.ts +7 -0
  21. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  22. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  23. package/lib/src/components/DrawerShow/DrawerShow.d.ts +10 -0
  24. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  25. package/lib/src/components/EditButton/index.d.ts +2 -0
  26. package/lib/src/components/Form/KeyValueListWidget.d.ts +6 -0
  27. package/lib/src/components/Form/MetadataForm.d.ts +2 -0
  28. package/lib/src/components/Form/NameInputWidget.d.ts +51 -0
  29. package/lib/src/components/Form/NamespaceSelectWidget.d.ts +9 -0
  30. package/lib/src/components/Form/index.d.ts +4 -0
  31. package/lib/src/components/Form/widget.d.ts +5 -0
  32. package/lib/src/components/FormLayout/index.d.ts +3 -0
  33. package/lib/src/components/ImageNames/index.d.ts +4 -0
  34. package/lib/src/components/K8sDropdown/index.d.ts +7 -0
  35. package/lib/src/components/KeyValue/KeyValue.d.ts +6 -0
  36. package/lib/src/components/KeyValue/index.d.ts +1 -0
  37. package/lib/src/components/Layout/index.d.ts +3 -0
  38. package/lib/src/components/ListPage/index.d.ts +10 -0
  39. package/lib/src/components/Menu/index.d.ts +2 -0
  40. package/lib/src/components/NamespacesFilter/index.d.ts +7 -0
  41. package/lib/src/components/PageShow/PageShow.d.ts +13 -0
  42. package/lib/src/components/PageShow/index.d.ts +1 -0
  43. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  44. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  45. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  46. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  47. package/lib/src/components/ResourceCRUD/index.d.ts +1 -0
  48. package/lib/src/components/ResourceCRUD/list/index.d.ts +14 -0
  49. package/lib/src/components/ResourceCRUD/show/index.d.ts +14 -0
  50. package/lib/src/components/Separator/index.d.ts +2 -0
  51. package/lib/src/components/ShowContent/ShowContent.d.ts +13 -0
  52. package/lib/src/components/ShowContent/fields.d.ts +16 -0
  53. package/lib/src/components/ShowContent/index.d.ts +2 -0
  54. package/lib/src/components/StateTag/StateTag.d.ts +6 -0
  55. package/lib/src/components/StateTag/index.d.ts +1 -0
  56. package/lib/src/components/Table/ErrorContent.d.ts +10 -0
  57. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  58. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  59. package/lib/src/components/Table/index.d.ts +28 -0
  60. package/lib/src/components/Tags/index.d.ts +6 -0
  61. package/lib/src/components/Time/index.d.ts +9 -0
  62. package/lib/src/components/WorkloadDropdown/index.d.ts +7 -0
  63. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +5 -0
  64. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  65. package/lib/src/components/WorkloadReplicas/index.d.ts +5 -0
  66. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  67. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  68. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +26 -0
  69. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  70. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  71. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  72. package/lib/src/components/YamlForm/index.d.ts +6 -0
  73. package/lib/src/constants/k8s.d.ts +204 -0
  74. package/lib/src/hooks/index.d.ts +2 -0
  75. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  76. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  77. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  78. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  79. package/lib/src/hooks/useEagleForm.d.ts +39 -0
  80. package/lib/src/hooks/useEagleTable/columns.d.ts +15 -0
  81. package/lib/src/hooks/useEagleTable/index.d.ts +52 -0
  82. package/lib/src/hooks/useEdit.d.ts +4 -0
  83. package/lib/src/hooks/useSchema.d.ts +7 -0
  84. package/lib/src/i18n.d.ts +72 -0
  85. package/lib/src/index.d.ts +6 -0
  86. package/lib/src/locales/en-US/index.d.ts +15 -0
  87. package/lib/src/locales/index.d.ts +2 -0
  88. package/lib/src/locales/zh-CN/index.d.ts +55 -0
  89. package/lib/src/main.d.ts +1 -0
  90. package/lib/src/model/cronjob-model.d.ts +9 -0
  91. package/lib/src/model/index.d.ts +5 -0
  92. package/lib/src/model/job-model.d.ts +10 -0
  93. package/lib/src/model/pod-model.d.ts +10 -0
  94. package/lib/src/model/resource-model.d.ts +17 -0
  95. package/lib/src/model/workload-model.d.ts +17 -0
  96. package/lib/src/pages/configmaps/index.d.ts +3 -0
  97. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  98. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  99. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  100. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  101. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  102. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  103. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  104. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  105. package/lib/src/pages/deployments/create/index.d.ts +3 -0
  106. package/lib/src/pages/deployments/index.d.ts +3 -0
  107. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  108. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  109. package/lib/src/pages/jobs/index.d.ts +4 -0
  110. package/lib/src/pages/pods/create/index.d.ts +3 -0
  111. package/lib/src/pages/pods/index.d.ts +3 -0
  112. package/lib/src/pages/pods/list/index.d.ts +3 -0
  113. package/lib/src/pages/pods/show/index.d.ts +3 -0
  114. package/lib/src/pages/secrets/index.d.ts +3 -0
  115. package/lib/src/pages/statefulsets/create/index.d.ts +3 -0
  116. package/lib/src/pages/statefulsets/index.d.ts +3 -0
  117. package/lib/src/pages/statefulsets/list/index.d.ts +3 -0
  118. package/lib/src/pages/statefulsets/show/index.d.ts +3 -0
  119. package/lib/src/providers/index.d.ts +1 -0
  120. package/lib/src/providers/router-provider/index.d.ts +21 -0
  121. package/lib/src/types/index.d.ts +1 -0
  122. package/lib/src/types/resource.d.ts +39 -0
  123. package/lib/src/utils/addId.d.ts +3 -0
  124. package/lib/src/utils/download.d.ts +1 -0
  125. package/lib/src/utils/error.d.ts +20 -0
  126. package/lib/src/utils/k8s.d.ts +3 -0
  127. package/lib/src/utils/labels.d.ts +9 -0
  128. package/lib/src/utils/openapi.d.ts +45 -0
  129. package/lib/src/utils/schema.d.ts +17 -0
  130. package/lib/src/utils/string.d.ts +1 -0
  131. package/lib/src/utils/time.d.ts +8 -0
  132. package/lib/src/utils/yaml.d.ts +2 -0
  133. package/lib/vite.config.d.ts +2 -0
  134. package/package.json +90 -0
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import './styles.css';
3
+ import 'antd/dist/antd.css';
4
+ import '@cloudtower/eagle/dist/style.css';
5
+ declare function App(): JSX.Element;
6
+ export default App;
@@ -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,6 @@
1
+ /// <reference types="react" />
2
+ interface BreadcrumbProps {
3
+ className?: string;
4
+ }
5
+ export declare function Breadcrumb(props: BreadcrumbProps): JSX.Element;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Condition } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ type Props = {
4
+ conditions: Condition[];
5
+ };
6
+ export declare const ConditionsTable: React.FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './ConditionsTable';
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare function CreateButton(): JSX.Element;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { CronJobModel } from '../../model';
3
+ type Props<Model extends CronJobModel> = {
4
+ data: Model;
5
+ };
6
+ export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { OwnerReference } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ export declare const CronjobJobsTable: React.FC<{
4
+ owner?: OwnerReference & {
5
+ namespace: string;
6
+ };
7
+ }>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const DeleteButton: React.FC;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const DeleteManyButton: React.FC<{
3
+ ids: string[];
4
+ }>;
@@ -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,2 @@
1
+ import React from 'react';
2
+ export declare const EditButton: React.FC;
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export declare function MetadataForm(): 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,4 @@
1
+ export * from './NameInputWidget';
2
+ export * from './NamespaceSelectWidget';
3
+ export * from './KeyValueListWidget';
4
+ export * from './MetadataForm';
@@ -0,0 +1,5 @@
1
+ export interface FormWidgetProps<V> {
2
+ value?: V;
3
+ onChange?: (value: V) => void;
4
+ [prop: string]: unknown;
5
+ }
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare function FormLayout(props: React.PropsWithChildren<Record<string, unknown>>): JSX.Element;
3
+ export default FormLayout;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const ImageNames: React.FC<{
3
+ value: string[];
4
+ }>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ResourceModel } from '../../model';
3
+ interface K8sDropdownProps {
4
+ data: ResourceModel;
5
+ }
6
+ declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
7
+ export default K8sDropdown;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ value?: Record<string, string>;
4
+ };
5
+ export declare const KeyValue: React.FC<Props>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './KeyValue';
@@ -0,0 +1,3 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import React from 'react';
3
+ export declare const Layout: React.FC<PropsWithChildren<Record<string, unknown>>>;
@@ -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,2 @@
1
+ /// <reference types="react" />
2
+ export declare const Menu: () => JSX.Element;
@@ -0,0 +1,7 @@
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
+ export declare const NamespacesFilter: React.FC;
@@ -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,8 @@
1
+ import React from 'react';
2
+ import { ResourceConfig } from '../../types';
3
+ type Props = {
4
+ configs: ResourceConfig[];
5
+ urlPrefix?: string;
6
+ };
7
+ export declare const ResourceCRUD: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { FormProps } from 'antd/lib/form';
2
+ import React from 'react';
3
+ import { ResourceConfig } from '../../../types';
4
+ type Props = {
5
+ config: ResourceConfig;
6
+ } & FormProps;
7
+ export declare const ResourceForm: React.FC<Props>;
8
+ export {};
@@ -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,2 @@
1
+ import React from 'react';
2
+ export declare const Separator: React.FC;
@@ -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,2 @@
1
+ export * from './fields';
2
+ export * from './ShowContent';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ state?: string;
4
+ };
5
+ export declare const StateTag: React.FC<Props>;
6
+ export {};
@@ -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,8 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ title: string;
4
+ selectedKeys: string[];
5
+ hideCreate?: boolean;
6
+ };
7
+ export declare const TableToolBar: React.FC<Props>;
8
+ export {};
@@ -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,6 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ value: Record<string, string>;
4
+ };
5
+ export declare const Tags: React.FC<Props>;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare const Time: React.FunctionComponent<{
3
+ className?: string;
4
+ date?: string | number | Date | null;
5
+ dateTemplate?: string | null;
6
+ timeTemplate?: string | null;
7
+ plainText?: boolean;
8
+ }>;
9
+ export default Time;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { WorkloadModel } from '../../model';
3
+ type Props<Model extends WorkloadModel> = {
4
+ data: Model;
5
+ };
6
+ export declare function WorkloadDropdown<Model extends WorkloadModel>(props: Props<Model>): JSX.Element;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { LabelSelector } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ export declare const WorkloadPodsTable: React.FC<{
4
+ selector?: LabelSelector;
5
+ }>;
@@ -0,0 +1 @@
1
+ export * from './WorkloadPodsTable';
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { WorkloadModel } from '../../model/workload-model';
3
+ export declare const WorkloadReplicas: React.FC<{
4
+ record: WorkloadModel;
5
+ }>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ id?: string;
4
+ origin: string;
5
+ height?: string;
6
+ modified: string;
7
+ };
8
+ declare const MonacoYamlDiffEditor: React.FC<Props>;
9
+ export default MonacoYamlDiffEditor;
@@ -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';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface YamlFormProps {
3
+ initialValues?: Record<string, unknown>;
4
+ }
5
+ declare function YamlForm(props: YamlFormProps): JSX.Element;
6
+ export default YamlForm;