@dovetail-v2/refine 0.1.5-alpha.0 → 0.1.5-alpha.2

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 (219) hide show
  1. package/dist/{MonacoYamlDiffEditor-c27ab21c.js → MonacoYamlDiffEditor-d4280e1a.js} +1 -1
  2. package/dist/{index-984f2ec7.js → index-ac7d0fe5.js} +395 -317
  3. package/dist/refine.js +216 -212
  4. package/dist/refine.umd.cjs +183 -105
  5. package/dist/style.css +1 -0
  6. package/lib/src/components/Form/useYamlForm.d.ts +2 -3
  7. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +1 -1
  8. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +1 -1
  9. package/lib/src/hooks/useSchema.d.ts +7 -0
  10. package/lib/src/i18n.d.ts +1 -0
  11. package/lib/src/index.d.ts +1 -0
  12. package/lib/src/locales/en-US/index.d.ts +1 -0
  13. package/lib/src/utils/openapi.d.ts +6 -11
  14. package/lib/src/utils/schema.d.ts +1 -0
  15. package/package.json +1 -1
  16. package/lib/App.d.ts +0 -2
  17. package/lib/Dovetail.d.ts +0 -18
  18. package/lib/components/Breadcrumb/index.d.ts +0 -5
  19. package/lib/components/ConditionsTable/ConditionsTable.d.ts +0 -7
  20. package/lib/components/ConditionsTable/index.d.ts +0 -1
  21. package/lib/components/CreateButton/index.d.ts +0 -1
  22. package/lib/components/CronJobDropdown/index.d.ts +0 -8
  23. package/lib/components/CronjobJobsTable/index.d.ts +0 -8
  24. package/lib/components/DeleteButton/index.d.ts +0 -2
  25. package/lib/components/DeleteManyButton/index.d.ts +0 -4
  26. package/lib/components/DrawerShow/DrawerShow.d.ts +0 -8
  27. package/lib/components/DrawerShow/index.d.ts +0 -1
  28. package/lib/components/DurationTime/index.d.ts +0 -5
  29. package/lib/components/EditButton/index.d.ts +0 -2
  30. package/lib/components/EditField/index.d.ts +0 -15
  31. package/lib/components/ErrorContent/index.d.ts +0 -17
  32. package/lib/components/EventsTable/EventsTable.d.ts +0 -6
  33. package/lib/components/EventsTable/index.d.ts +0 -1
  34. package/lib/components/Form/FormModal.d.ts +0 -10
  35. package/lib/components/Form/RefineFormContent.d.ts +0 -11
  36. package/lib/components/Form/RefineFormPage.d.ts +0 -6
  37. package/lib/components/Form/YamlForm.d.ts +0 -28
  38. package/lib/components/Form/index.d.ts +0 -7
  39. package/lib/components/Form/type.d.ts +0 -17
  40. package/lib/components/Form/useReactHookForm.d.ts +0 -29
  41. package/lib/components/Form/useRefineForm.d.ts +0 -13
  42. package/lib/components/Form/useYamlForm.d.ts +0 -51
  43. package/lib/components/FormErrorAlert/index.d.ts +0 -9
  44. package/lib/components/FormLayout/index.d.ts +0 -7
  45. package/lib/components/FormWidgets/KeyValueListWidget.d.ts +0 -5
  46. package/lib/components/FormWidgets/MetadataForm.d.ts +0 -1
  47. package/lib/components/FormWidgets/NameInputWidget.d.ts +0 -50
  48. package/lib/components/FormWidgets/NamespaceSelectWidget.d.ts +0 -8
  49. package/lib/components/FormWidgets/index.d.ts +0 -4
  50. package/lib/components/FormWidgets/widget.d.ts +0 -5
  51. package/lib/components/ImageNames/index.d.ts +0 -5
  52. package/lib/components/IngressRulesComponent/index.d.ts +0 -5
  53. package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +0 -7
  54. package/lib/components/IngressRulesTable/index.d.ts +0 -1
  55. package/lib/components/K8sDropdown/index.d.ts +0 -9
  56. package/lib/components/KeyValue/KeyValue.d.ts +0 -7
  57. package/lib/components/KeyValue/KeyValueAnnotation.d.ts +0 -5
  58. package/lib/components/KeyValue/KeyValueSecret.d.ts +0 -4
  59. package/lib/components/KeyValue/index.d.ts +0 -3
  60. package/lib/components/Layout/index.d.ts +0 -3
  61. package/lib/components/LinkFallback/index.d.ts +0 -3
  62. package/lib/components/ListPage/index.d.ts +0 -9
  63. package/lib/components/Menu/index.d.ts +0 -1
  64. package/lib/components/NamespacesFilter/index.d.ts +0 -11
  65. package/lib/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +0 -8
  66. package/lib/components/NetworkPolicyRulesViewer/index.d.ts +0 -1
  67. package/lib/components/PageShow/PageShow.d.ts +0 -12
  68. package/lib/components/PageShow/index.d.ts +0 -1
  69. package/lib/components/PodContainersTable/PodContainersTable.d.ts +0 -8
  70. package/lib/components/PodContainersTable/index.d.ts +0 -1
  71. package/lib/components/PodDropdown/index.d.ts +0 -9
  72. package/lib/components/PodLog/index.d.ts +0 -6
  73. package/lib/components/PodSelectorTable/index.d.ts +0 -6
  74. package/lib/components/PodShellModal/PodShell.d.ts +0 -18
  75. package/lib/components/PodShellModal/index.d.ts +0 -9
  76. package/lib/components/PortsTable/index.d.ts +0 -7
  77. package/lib/components/ReferenceLink/index.d.ts +0 -8
  78. package/lib/components/ReplicasDropdown/index.d.ts +0 -9
  79. package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +0 -7
  80. package/lib/components/ResourceCRUD/create/index.d.ts +0 -7
  81. package/lib/components/ResourceCRUD/index.d.ts +0 -4
  82. package/lib/components/ResourceCRUD/list/index.d.ts +0 -8
  83. package/lib/components/ResourceCRUD/show/index.d.ts +0 -8
  84. package/lib/components/ResourceFiledDisplays.d.ts +0 -6
  85. package/lib/components/ResourceLink/index.d.ts +0 -8
  86. package/lib/components/ResourceSelect/index.d.ts +0 -11
  87. package/lib/components/ResourceUsageBar/index.d.ts +0 -8
  88. package/lib/components/Separator/index.d.ts +0 -2
  89. package/lib/components/ServiceComponents/index.d.ts +0 -10
  90. package/lib/components/Shell/index.d.ts +0 -54
  91. package/lib/components/ShowContent/ShowContent.d.ts +0 -18
  92. package/lib/components/ShowContent/fields.d.ts +0 -68
  93. package/lib/components/ShowContent/groups.d.ts +0 -23
  94. package/lib/components/ShowContent/index.d.ts +0 -4
  95. package/lib/components/ShowContent/tabs.d.ts +0 -5
  96. package/lib/components/StateTag/StateTag.d.ts +0 -10
  97. package/lib/components/StateTag/index.d.ts +0 -1
  98. package/lib/components/Table/TableToolBar.d.ts +0 -8
  99. package/lib/components/Table/TableWidgets.d.ts +0 -6
  100. package/lib/components/Table/index.d.ts +0 -43
  101. package/lib/components/Tabs/index.d.ts +0 -10
  102. package/lib/components/Tags/index.d.ts +0 -6
  103. package/lib/components/TextTags/index.d.ts +0 -6
  104. package/lib/components/Time/index.d.ts +0 -8
  105. package/lib/components/ValueDisplay/index.d.ts +0 -9
  106. package/lib/components/WorkloadDropdown/index.d.ts +0 -9
  107. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +0 -9
  108. package/lib/components/WorkloadPodsTable/index.d.ts +0 -1
  109. package/lib/components/WorkloadReplicas/index.d.ts +0 -17
  110. package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +0 -9
  111. package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +0 -19
  112. package/lib/components/YamlEditor/YamlEditorComponent.d.ts +0 -27
  113. package/lib/components/YamlEditor/index.d.ts +0 -1
  114. package/lib/components/YamlEditor/style.d.ts +0 -11
  115. package/lib/components/YamlEditor/yaml.worker.d.ts +0 -1
  116. package/lib/components/index.d.ts +0 -47
  117. package/lib/constants/auth.d.ts +0 -5
  118. package/lib/constants/index.d.ts +0 -3
  119. package/lib/constants/k8s.d.ts +0 -487
  120. package/lib/constants/state.d.ts +0 -15
  121. package/lib/contexts/component.d.ts +0 -7
  122. package/lib/contexts/configs.d.ts +0 -3
  123. package/lib/contexts/global-store.d.ts +0 -5
  124. package/lib/contexts/index.d.ts +0 -3
  125. package/lib/hooks/index.d.ts +0 -8
  126. package/lib/hooks/useDeleteModal/index.d.ts +0 -1
  127. package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +0 -7
  128. package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +0 -7
  129. package/lib/hooks/useDownloadYAML.d.ts +0 -7
  130. package/lib/hooks/useEagleTable/columns.d.ts +0 -41
  131. package/lib/hooks/useEagleTable/index.d.ts +0 -2
  132. package/lib/hooks/useEagleTable/useEagleTable.d.ts +0 -55
  133. package/lib/hooks/useEdit.d.ts +0 -4
  134. package/lib/hooks/useGlobalStore.d.ts +0 -3
  135. package/lib/hooks/useK8sYamlEditor.d.ts +0 -5
  136. package/lib/hooks/useNamespaceRefineFilter.d.ts +0 -5
  137. package/lib/hooks/useOpenForm.d.ts +0 -7
  138. package/lib/hooks/useSchema.d.ts +0 -14
  139. package/lib/hooks/useSubmitForm.d.ts +0 -14
  140. package/lib/hooks/useTableData.d.ts +0 -19
  141. package/lib/i18n.d.ts +0 -353
  142. package/lib/index.d.ts +0 -11
  143. package/lib/locales/en-US/index.d.ts +0 -175
  144. package/lib/locales/index.d.ts +0 -2
  145. package/lib/locales/zh-CN/index.d.ts +0 -175
  146. package/lib/main.d.ts +0 -3
  147. package/lib/models/cronjob-model.d.ts +0 -15
  148. package/lib/models/daemonset-model.d.ts +0 -15
  149. package/lib/models/deployment-model.d.ts +0 -13
  150. package/lib/models/event-model.d.ts +0 -7
  151. package/lib/models/index.d.ts +0 -19
  152. package/lib/models/ingress-model.d.ts +0 -20
  153. package/lib/models/job-model.d.ts +0 -20
  154. package/lib/models/network-policy-model.d.ts +0 -9
  155. package/lib/models/node-model.d.ts +0 -17
  156. package/lib/models/persistent-volume-claim.d.ts +0 -9
  157. package/lib/models/persistent-volume.d.ts +0 -9
  158. package/lib/models/pod-metrics-model.d.ts +0 -8
  159. package/lib/models/pod-model.d.ts +0 -20
  160. package/lib/models/resource-model.d.ts +0 -21
  161. package/lib/models/service-model.d.ts +0 -24
  162. package/lib/models/statefulset-model.d.ts +0 -13
  163. package/lib/models/storage-class.d.ts +0 -12
  164. package/lib/models/types/index.d.ts +0 -1
  165. package/lib/models/types/metric.d.ts +0 -25
  166. package/lib/models/workload-base-model.d.ts +0 -12
  167. package/lib/models/workload-model.d.ts +0 -18
  168. package/lib/pages/configmaps/index.d.ts +0 -4
  169. package/lib/pages/cronjobs/create/index.d.ts +0 -3
  170. package/lib/pages/cronjobs/index.d.ts +0 -3
  171. package/lib/pages/cronjobs/list/index.d.ts +0 -3
  172. package/lib/pages/cronjobs/show/index.d.ts +0 -3
  173. package/lib/pages/daemonsets/create/index.d.ts +0 -3
  174. package/lib/pages/daemonsets/index.d.ts +0 -3
  175. package/lib/pages/daemonsets/list/index.d.ts +0 -3
  176. package/lib/pages/daemonsets/show/index.d.ts +0 -3
  177. package/lib/pages/deployments/index.d.ts +0 -2
  178. package/lib/pages/deployments/list/index.d.ts +0 -3
  179. package/lib/pages/deployments/show/index.d.ts +0 -3
  180. package/lib/pages/ingresses/index.d.ts +0 -4
  181. package/lib/pages/jobs/index.d.ts +0 -4
  182. package/lib/pages/networkPolicies/index.d.ts +0 -4
  183. package/lib/pages/nodes/index.d.ts +0 -2
  184. package/lib/pages/nodes/list/index.d.ts +0 -3
  185. package/lib/pages/nodes/show/index.d.ts +0 -3
  186. package/lib/pages/persistentvolumeclaims/index.d.ts +0 -4
  187. package/lib/pages/persistentvolumes/index.d.ts +0 -4
  188. package/lib/pages/pods/create/index.d.ts +0 -3
  189. package/lib/pages/pods/index.d.ts +0 -3
  190. package/lib/pages/pods/list/index.d.ts +0 -3
  191. package/lib/pages/pods/show/index.d.ts +0 -3
  192. package/lib/pages/secrets/index.d.ts +0 -4
  193. package/lib/pages/services/index.d.ts +0 -4
  194. package/lib/pages/statefulsets/index.d.ts +0 -4
  195. package/lib/pages/storageclasses/form/index.d.ts +0 -9
  196. package/lib/pages/storageclasses/index.d.ts +0 -44
  197. package/lib/plugins/index.d.ts +0 -4
  198. package/lib/plugins/model-plugin.d.ts +0 -13
  199. package/lib/plugins/relation-plugin.d.ts +0 -26
  200. package/lib/plugins/type.d.ts +0 -8
  201. package/lib/providers/index.d.ts +0 -1
  202. package/lib/providers/router-provider/index.d.ts +0 -21
  203. package/lib/types/index.d.ts +0 -1
  204. package/lib/types/resource.d.ts +0 -62
  205. package/lib/utils/addId.d.ts +0 -3
  206. package/lib/utils/download.d.ts +0 -1
  207. package/lib/utils/error.d.ts +0 -20
  208. package/lib/utils/form.d.ts +0 -3
  209. package/lib/utils/k8s.d.ts +0 -3
  210. package/lib/utils/labels.d.ts +0 -9
  211. package/lib/utils/match-selector.d.ts +0 -3
  212. package/lib/utils/openapi.d.ts +0 -45
  213. package/lib/utils/schema.d.ts +0 -17
  214. package/lib/utils/selector.d.ts +0 -3
  215. package/lib/utils/shell.d.ts +0 -15
  216. package/lib/utils/string.d.ts +0 -1
  217. package/lib/utils/time.d.ts +0 -13
  218. package/lib/utils/unit.d.ts +0 -12
  219. package/lib/utils/yaml.d.ts +0 -2
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { ResourceModel } from '../../models';
3
- import { ResourceConfig } from '../../types';
4
- export declare const SecretsConfig: (i18n: i18n) => ResourceConfig<ResourceModel>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { ServiceModel } from '../../models/service-model';
3
- import { ResourceConfig } from '../../types';
4
- export declare const ServicesConfig: (i18n: i18n) => ResourceConfig<ServiceModel>;
@@ -1,4 +0,0 @@
1
- import { i18n } from 'i18next';
2
- import { StatefulSetModel } from 'src/models/statefulset-model';
3
- import { ResourceConfig } from 'src/types';
4
- export declare const StatefulSetConfig: (i18n: i18n) => ResourceConfig<StatefulSetModel>;
@@ -1,9 +0,0 @@
1
- import { ResourceModel } from 'src/models';
2
- import { ResourceConfig } from 'src/types';
3
- type GenerateStorageClassFormConfig = {
4
- isEnabledZbs?: boolean;
5
- isEnabledElf?: boolean;
6
- isVmKsc?: boolean;
7
- };
8
- export declare function generateStorageClassFormConfig(options: GenerateStorageClassFormConfig): ResourceConfig<ResourceModel>['formConfig'];
9
- export {};
@@ -1,44 +0,0 @@
1
- import { i18n as I18n } from 'i18next';
2
- import { RESOURCE_GROUP } from 'src/types';
3
- export declare const StorageClassConfig: (i18n: I18n) => {
4
- name: string;
5
- basePath: string;
6
- kind: string;
7
- parent: RESOURCE_GROUP;
8
- label: string;
9
- initValue: {
10
- apiVersion: string;
11
- kind: string;
12
- metadata: {
13
- name: string;
14
- namespace: string;
15
- };
16
- spec: {};
17
- };
18
- formConfig: {
19
- fields?: ((props: {
20
- record?: import("../..").ResourceModel<import("k8s-api-provider").Unstructured> | undefined;
21
- records: import("../..").ResourceModel<import("k8s-api-provider").Unstructured>[];
22
- action: "create" | "edit";
23
- }) => import("../../components").RefineFormField[]) | undefined;
24
- saveButtonText?: string;
25
- renderForm?: (props: import("../../components").YamlFormProps) => React.ReactNode;
26
- formType?: import("src/types").FormType;
27
- transformInitValues?: (values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured;
28
- transformApplyValues?: (values: import("k8s-api-provider").Unstructured) => import("k8s-api-provider").Unstructured;
29
- formTitle?: string | ((action: "create" | "edit") => string);
30
- formDesc?: string | ((action: "create" | "edit") => string);
31
- formatError?: (errorBody: any) => string;
32
- refineCoreProps?: import("@refinedev/react-hook-form").UseFormProps["refineCoreProps"];
33
- useFormProps?: import("@refinedev/react-hook-form").UseFormProps;
34
- } | undefined;
35
- columns: () => (import("../../components").Column<import("../..").ResourceModel<import("k8s-api-provider").Unstructured>> | import("../../components").Column<import("../..").StorageClassModel>)[];
36
- showConfig: () => {
37
- tabs: {
38
- title: string;
39
- key: string;
40
- groups: import("../../components").ShowGroup<import("../..").StorageClassModel>[];
41
- }[];
42
- };
43
- };
44
- export * from './form';
@@ -1,4 +0,0 @@
1
- import { IProviderPlugin } from 'k8s-api-provider';
2
- export * from './model-plugin';
3
- export * from './relation-plugin';
4
- export declare const ProviderPlugins: IProviderPlugin[];
@@ -1,13 +0,0 @@
1
- import { GlobalStore, Unstructured, UnstructuredList, IProviderPlugin, DataList } from 'k8s-api-provider';
2
- import { ResourceModel } from '../models';
3
- export declare class ModelPlugin implements IProviderPlugin<ResourceModel> {
4
- _globalStore?: GlobalStore;
5
- private ModelMap;
6
- init(globalStore: GlobalStore): void;
7
- processData(res: UnstructuredList): Promise<DataList<ResourceModel<Unstructured>>>;
8
- processItem(item: Unstructured): Promise<ResourceModel>;
9
- restoreData(res: DataList<ResourceModel>): UnstructuredList;
10
- restoreItem(item: ResourceModel): Unstructured;
11
- setModelMap(key: string, model: ResourceModel): void;
12
- }
13
- export declare const modelPlugin: ModelPlugin;
@@ -1,26 +0,0 @@
1
- import { GlobalStore, Unstructured, UnstructuredList } from 'k8s-api-provider';
2
- import { LabelSelector, ObjectMeta } from 'kubernetes-types/meta/v1';
3
- import { ResourceModel } from '../models';
4
- export type Relation = {
5
- kind: string;
6
- apiVersion: string;
7
- type: 'creates' | 'uses' | 'applies' | 'owner' | 'selects';
8
- inbound: boolean;
9
- name?: string;
10
- namespace?: string;
11
- selector?: LabelSelector;
12
- };
13
- export type ExtendObjectMeta = ObjectMeta & {
14
- relations?: Relation[];
15
- };
16
- export declare class RelationPlugin {
17
- private globalStore?;
18
- init(globalStore: GlobalStore): void;
19
- processData(res: UnstructuredList): Promise<UnstructuredList>;
20
- processItem(item: Unstructured): Promise<ResourceModel>;
21
- restoreData(res: UnstructuredList): UnstructuredList;
22
- restoreItem(item: Unstructured): Unstructured;
23
- private processPodSelector;
24
- private appendRelation;
25
- }
26
- export declare const relationPlugin: RelationPlugin;
@@ -1,8 +0,0 @@
1
- import { Unstructured } from 'k8s-api-provider';
2
- import { ListMeta } from 'kubernetes-types/meta/v1';
3
- export type DataList<Output extends Unstructured = Unstructured> = {
4
- apiVersion: string;
5
- kind: string;
6
- metadata: ListMeta;
7
- items: Array<Unstructured & Output>;
8
- };
@@ -1 +0,0 @@
1
- export { routerProvider } from './router-provider';
@@ -1,21 +0,0 @@
1
- import { GoConfig, ParseResponse } from '@refinedev/core';
2
- import React from 'react';
3
- export declare const stringifyConfig: {
4
- addQueryPrefix: boolean;
5
- skipNulls: boolean;
6
- arrayFormat: "indices";
7
- encode: boolean;
8
- encodeValuesOnly: boolean;
9
- };
10
- export declare const convertToNumberIfPossible: (value: string | undefined) => string | number | undefined;
11
- export declare const routerProvider: {
12
- go: () => ({ to, type, query, hash, options: { keepQuery, keepHash } }: GoConfig) => string | void;
13
- back: () => () => void;
14
- parse: () => () => ParseResponse;
15
- Link: React.ForwardRefExoticComponent<Pick<{
16
- [prop: string]: any;
17
- to: string;
18
- } & {
19
- children?: React.ReactNode | undefined;
20
- }, string | number> & React.RefAttributes<HTMLAnchorElement>>;
21
- };
@@ -1 +0,0 @@
1
- export * from './resource';
@@ -1,62 +0,0 @@
1
- import { UseFormProps } from '@refinedev/react-hook-form';
2
- import { Unstructured } from 'k8s-api-provider';
3
- import { YamlFormProps } from '../components';
4
- import { RefineFormField } from '../components/Form';
5
- import { ShowConfig } from '../components/ShowContent';
6
- import { Column, TableProps } from '../components/Table';
7
- import { ResourceModel } from '../models';
8
- export declare enum RESOURCE_GROUP {
9
- WORKLOAD = "WORKLOAD",
10
- STORAGE = "STORAGE",
11
- NETWORK = "NETWORK",
12
- CLUSTER = "CLUSTER",
13
- SERVICE = "SERVICE",
14
- SERVICE_AND_NETWORK = "SERVICE_AND_NETWORK",
15
- CONFIG = "CONFIG",
16
- NODE_MANAGEMENT = "NODE_MANAGEMENT"
17
- }
18
- export declare enum FormType {
19
- PAGE = "PAGE",
20
- MODAL = "MODAL"
21
- }
22
- export type WithId<T> = T & {
23
- id: string;
24
- };
25
- export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
26
- name: string;
27
- kind: string;
28
- basePath: string;
29
- apiVersion: string;
30
- label: string;
31
- hideListToolBar?: boolean;
32
- hideNamespacesFilter?: boolean;
33
- description?: string;
34
- parent?: RESOURCE_GROUP;
35
- formatter?: (v: Model) => Model;
36
- initValue?: Record<string, unknown>;
37
- columns?: () => Column<Model>[];
38
- noShow?: boolean;
39
- showConfig?: () => ShowConfig<Model>;
40
- Dropdown?: React.FC<{
41
- record: Model;
42
- }>;
43
- tableProps?: Partial<TableProps<Model>>;
44
- isCustom?: boolean;
45
- formConfig?: {
46
- fields?: (props: {
47
- record?: Model;
48
- records: Model[];
49
- action: 'create' | 'edit';
50
- }) => RefineFormField[];
51
- saveButtonText?: string;
52
- renderForm?: (props: YamlFormProps) => React.ReactNode;
53
- formType?: FormType;
54
- transformInitValues?: (values: Unstructured) => Unstructured;
55
- transformApplyValues?: (values: Unstructured) => Unstructured;
56
- formTitle?: string | ((action: 'create' | 'edit') => string);
57
- formDesc?: string | ((action: 'create' | 'edit') => string);
58
- formatError?: (errorBody: any) => string;
59
- refineCoreProps?: UseFormProps['refineCoreProps'];
60
- useFormProps?: UseFormProps;
61
- };
62
- };
@@ -1,3 +0,0 @@
1
- export declare function addId<T extends object>(arr: T[], idKey: keyof T): ({
2
- id: string;
3
- } & T)[];
@@ -1 +0,0 @@
1
- export declare function download(filename: string, content: string): void;
@@ -1,20 +0,0 @@
1
- import { i18n as I18n } from 'i18next';
2
- type Cause = {
3
- code?: string;
4
- reason?: string;
5
- message: string;
6
- field?: string;
7
- };
8
- export type ErrorResponseBody = {
9
- message?: string;
10
- code?: number;
11
- reason?: string;
12
- details?: {
13
- causes?: Cause[];
14
- };
15
- graphQLErrors?: Cause[];
16
- };
17
- export declare function isNetworkError(errors?: Cause[]): boolean;
18
- export declare function getSubmitError(errorResponse: ErrorResponseBody | undefined, text: string, i18n: I18n): string;
19
- export declare function getCommonErrors(responseBody: ErrorResponseBody, i18n: I18n): string[];
20
- export {};
@@ -1,3 +0,0 @@
1
- import { ResourceModel } from 'src/models';
2
- import { ResourceConfig } from 'src/types';
3
- export declare function getInitialValues<Model extends ResourceModel = ResourceModel>(config: ResourceConfig<Model>): Record<string, unknown>;
@@ -1,3 +0,0 @@
1
- import { BaseRecord } from '@refinedev/core';
2
- export declare function getApiVersion(resourceBasePath: string): string;
3
- export declare function pruneBeforeEdit(v: BaseRecord): void;
@@ -1,9 +0,0 @@
1
- type Labels = Record<string, string>;
2
- type LabelsArray = {
3
- key: string;
4
- value: string;
5
- }[];
6
- export declare function toLabelStrings(labels?: Labels): string[];
7
- export declare function toLabelsArray(labels?: Labels): LabelsArray;
8
- export declare function toLabelsRecord(labels: LabelsArray): Labels;
9
- export {};
@@ -1,3 +0,0 @@
1
- import { LabelSelector } from 'kubernetes-types/meta/v1';
2
- import { PodModel } from '../models/pod-model';
3
- export declare function matchSelector(pod: PodModel, selector?: LabelSelector, namespace?: string): boolean;
@@ -1,45 +0,0 @@
1
- import { JSONSchema7 } from 'json-schema';
2
- interface OpenAPIResponse {
3
- openapi: string;
4
- paths: {
5
- [prop: string]: {
6
- get: {
7
- responses: {
8
- 200: {
9
- content: {
10
- 'application/json': {
11
- schema: JSONSchema7;
12
- };
13
- };
14
- };
15
- };
16
- };
17
- };
18
- };
19
- components: {
20
- schemas: {
21
- [prop: string]: JSONSchema7 & {
22
- 'x-kubernetes-group-version-kind': {
23
- group: string;
24
- kind: string;
25
- version: string;
26
- }[];
27
- };
28
- };
29
- };
30
- }
31
- declare class K8sOpenAPI {
32
- resourceBasePath: string;
33
- response: OpenAPIResponse | null;
34
- apiVersion: string;
35
- constructor(resourceBasePath: string);
36
- fetch(): Promise<OpenAPIResponse>;
37
- findSchema(kind: string): Promise<(JSONSchema7 & {
38
- 'x-kubernetes-group-version-kind': {
39
- group: string;
40
- kind: string;
41
- version: string;
42
- }[];
43
- }) | undefined>;
44
- }
45
- export default K8sOpenAPI;
@@ -1,17 +0,0 @@
1
- import { JSONSchema7, JSONSchema7Type } from 'json-schema';
2
- type TransformOptions = {
3
- generateValue?: (schema: JSONSchema7) => JSONSchema7Type | undefined | null | Record<string, unknown>;
4
- };
5
- export declare function generateValueFromSchema(schema: JSONSchema7, options: TransformOptions): JSONSchema7Type | undefined | Record<string, unknown>;
6
- export declare function generateSchemaTypeValue(schema: JSONSchema7): JSONSchema7Type | undefined | Record<string, unknown>;
7
- type ResolveOptions = {
8
- prune: {
9
- description: boolean;
10
- optional: boolean;
11
- metadata: boolean;
12
- fields: string[];
13
- xProperty: boolean;
14
- };
15
- };
16
- export declare function resolveRef(schema: JSONSchema7, schemas: Record<string, JSONSchema7>, options: ResolveOptions): JSONSchema7;
17
- export {};
@@ -1,3 +0,0 @@
1
- import { LabelSelector } from 'kubernetes-types/meta/v1';
2
- import { PodModel } from '../models';
3
- export declare function matchSelector(pod: PodModel, selector: LabelSelector): boolean;
@@ -1,15 +0,0 @@
1
- import { Buffer } from 'buffer';
2
- export type QueryParams = {
3
- [key: string]: string | string[];
4
- };
5
- export declare const stdin: (characters: string) => Buffer;
6
- export declare function addParam(url: string, key: string, val: string | string[]): string;
7
- export declare function addParams(url: string, params: QueryParams): string;
8
- declare enum Alphabet {
9
- NORMAL = "normal",
10
- URL = "url"
11
- }
12
- export declare function base64Encode(str: string, alphabet?: Alphabet): string;
13
- export declare function base64DecodeToBuffer(str: string): Buffer;
14
- export declare function base64Decode(str: string): string;
15
- export {};
@@ -1 +0,0 @@
1
- export declare function shortenedImage(image: string): string;
@@ -1,13 +0,0 @@
1
- export declare function getSecondsDiff(startDate: string, endDate: string): number;
2
- export declare function elapsedTime(seconds: number, i18nMap: {
3
- min: string;
4
- sec: string;
5
- hr: string;
6
- day: string;
7
- }): {
8
- diff?: undefined;
9
- label?: undefined;
10
- } | {
11
- diff: number;
12
- label: string;
13
- };
@@ -1,12 +0,0 @@
1
- type FormatOptions = {
2
- increment: number;
3
- suffix: string | null;
4
- firstSuffix: string | null;
5
- startingExponent: number;
6
- minExponent: number;
7
- maxPrecision: number;
8
- atLeastOne: boolean;
9
- };
10
- export declare function formatSi(inValue: number, options?: Partial<FormatOptions>): string;
11
- export declare function parseSi(inValue: string, increment?: number | null, allowFractional?: boolean): number;
12
- export {};
@@ -1,2 +0,0 @@
1
- import { JSONSchema7 } from 'json-schema';
2
- export declare function generateYamlBySchema(defaultValue: Record<string, unknown>, schema: JSONSchema7): string;