@dovetail-v2/refine 0.1.9 → 0.1.11-alpha.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 (263) hide show
  1. package/dist/{MonacoYamlDiffEditor-0f76e977.js → MonacoYamlDiffEditor-adaa32ac.js} +1 -1
  2. package/dist/{index-aacb414b.js → index-906cb61f.js} +1161 -874
  3. package/dist/refine.js +208 -203
  4. package/dist/refine.umd.cjs +954 -667
  5. package/dist/style.css +44 -44
  6. package/lib/components/CreateButton/index.d.ts +5 -1
  7. package/lib/components/DropdownMenuItems/EditNodeTaintDropdownMenuItem.d.ts +12 -0
  8. package/lib/components/Dropdowns/CronJobDropdown/index.d.ts +9 -0
  9. package/lib/components/Dropdowns/K8sDropdown/index.d.ts +9 -0
  10. package/lib/components/Dropdowns/PodDropdown/index.d.ts +9 -0
  11. package/lib/components/Dropdowns/ReplicasDropdown/index.d.ts +9 -0
  12. package/lib/components/Dropdowns/WorkloadDropdown/index.d.ts +9 -0
  13. package/lib/components/EditField/index.d.ts +1 -1
  14. package/lib/components/EditMetadataForm/EditNodeTaintForm.d.ts +12 -0
  15. package/lib/components/InternalBaseTable/TableWidgets.d.ts +6 -0
  16. package/lib/components/InternalBaseTable/index.d.ts +43 -0
  17. package/lib/components/ListPage/index.d.ts +2 -2
  18. package/lib/components/NodeTaintsTable/NodeTaintsTable.d.ts +7 -0
  19. package/lib/components/NodeTaintsTable/index.d.ts +1 -0
  20. package/lib/components/PVCDistributeStorage/index.d.ts +1 -1
  21. package/lib/components/ResourceFiledDisplays.d.ts +2 -3
  22. package/lib/components/ResourceLink/index.d.ts +2 -2
  23. package/lib/components/ResourceSelect/index.d.ts +2 -2
  24. package/lib/components/ShowContent/fields.d.ts +2 -0
  25. package/lib/components/ShowContent/groups.d.ts +4 -2
  26. package/lib/components/StateTag/StateTag.d.ts +3 -3
  27. package/lib/components/Table/TableToolBar.d.ts +1 -0
  28. package/lib/components/Table/index.d.ts +11 -43
  29. package/lib/components/TableToolbar/index.d.ts +9 -0
  30. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +2 -0
  31. package/lib/components/index.d.ts +7 -5
  32. package/lib/constants/state.d.ts +8 -3
  33. package/lib/contexts/component.d.ts +1 -1
  34. package/lib/hooks/useEagleTable/columns.d.ts +2 -1
  35. package/lib/hooks/useEagleTable/useEagleTable.d.ts +3 -4
  36. package/lib/hooks/useSubmitForm.d.ts +1 -1
  37. package/lib/hooks/useTableData.d.ts +1 -1
  38. package/lib/i18n.d.ts +29 -18
  39. package/lib/locales/zh-CN/index.d.ts +29 -18
  40. package/lib/models/cronjob-model.d.ts +2 -2
  41. package/lib/models/daemonset-model.d.ts +2 -2
  42. package/lib/models/deployment-model.d.ts +2 -2
  43. package/lib/models/job-model.d.ts +2 -2
  44. package/lib/models/node-model.d.ts +2 -2
  45. package/lib/models/persistent-volume-claim.d.ts +2 -0
  46. package/lib/models/persistent-volume.d.ts +3 -0
  47. package/lib/models/statefulset-model.d.ts +2 -2
  48. package/lib/src/App.d.ts +3 -0
  49. package/lib/src/Dovetail.d.ts +18 -0
  50. package/lib/src/components/Breadcrumb/index.d.ts +6 -0
  51. package/lib/src/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  52. package/lib/src/components/ConditionsTable/index.d.ts +1 -0
  53. package/lib/src/components/CreateButton/index.d.ts +2 -0
  54. package/lib/src/components/CronJobDropdown/index.d.ts +9 -0
  55. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -0
  56. package/lib/src/components/DeleteButton/index.d.ts +2 -0
  57. package/lib/src/components/DeleteManyButton/index.d.ts +4 -0
  58. package/lib/src/components/DrawerShow/DrawerShow.d.ts +9 -0
  59. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  60. package/lib/src/components/DurationTime/index.d.ts +6 -0
  61. package/lib/src/components/EditButton/index.d.ts +2 -0
  62. package/lib/src/components/EditField/index.d.ts +15 -0
  63. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  64. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  65. package/lib/src/components/EventsTable/index.d.ts +1 -0
  66. package/lib/src/components/Form/FormModal.d.ts +9 -0
  67. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  68. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  69. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  70. package/lib/src/components/Form/index.d.ts +7 -0
  71. package/lib/src/components/Form/type.d.ts +17 -0
  72. package/lib/src/components/Form/useFieldsConfig.d.ts +4 -0
  73. package/lib/src/components/Form/useReactHookForm.d.ts +30 -0
  74. package/lib/src/components/Form/useRefineForm.d.ts +13 -0
  75. package/lib/src/components/Form/useYamlForm.d.ts +50 -0
  76. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  77. package/lib/src/components/FormLayout/index.d.ts +7 -0
  78. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  79. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  80. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  81. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  82. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  83. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  84. package/lib/src/components/ImageNames/index.d.ts +5 -0
  85. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  86. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  87. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  88. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  89. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  90. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  91. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  92. package/lib/src/components/KeyValue/index.d.ts +3 -0
  93. package/lib/src/components/Layout/index.d.ts +3 -0
  94. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  95. package/lib/src/components/ListPage/index.d.ts +10 -0
  96. package/lib/src/components/Menu/index.d.ts +2 -0
  97. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  98. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  99. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  100. package/lib/src/components/PVCDistributeStorage/index.d.ts +16 -0
  101. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  102. package/lib/src/components/PageShow/index.d.ts +1 -0
  103. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  104. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  105. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  106. package/lib/src/components/PodLog/index.d.ts +6 -0
  107. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  108. package/lib/src/components/PodShellModal/PodShell.d.ts +18 -0
  109. package/lib/src/components/PodShellModal/index.d.ts +10 -0
  110. package/lib/src/components/PortsTable/index.d.ts +7 -0
  111. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  112. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  113. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  114. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  115. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  116. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  117. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  118. package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
  119. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  120. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  121. package/lib/src/components/ResourceTable/index.d.ts +9 -0
  122. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  123. package/lib/src/components/Separator/index.d.ts +2 -0
  124. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  125. package/lib/src/components/Shell/ShellToolbar.d.ts +16 -0
  126. package/lib/src/components/Shell/index.d.ts +74 -0
  127. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  128. package/lib/src/components/ShowContent/fields.d.ts +76 -0
  129. package/lib/src/components/ShowContent/groups.d.ts +24 -0
  130. package/lib/src/components/ShowContent/index.d.ts +4 -0
  131. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  132. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  133. package/lib/src/components/StateTag/index.d.ts +1 -0
  134. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  135. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  136. package/lib/src/components/Table/index.d.ts +43 -0
  137. package/lib/src/components/Tabs/index.d.ts +10 -0
  138. package/lib/src/components/Tags/index.d.ts +6 -0
  139. package/lib/src/components/TextTags/index.d.ts +6 -0
  140. package/lib/src/components/Time/index.d.ts +8 -0
  141. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  142. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  143. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  144. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  145. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  146. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  147. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  148. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  149. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  150. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  151. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  152. package/lib/src/components/index.d.ts +49 -0
  153. package/lib/src/constants/auth.d.ts +5 -0
  154. package/lib/src/constants/index.d.ts +3 -0
  155. package/lib/src/constants/k8s.d.ts +522 -0
  156. package/lib/src/constants/state.d.ts +15 -0
  157. package/lib/src/contexts/component.d.ts +8 -0
  158. package/lib/src/contexts/configs.d.ts +4 -0
  159. package/lib/src/contexts/global-store.d.ts +6 -0
  160. package/lib/src/contexts/index.d.ts +3 -0
  161. package/lib/src/hooks/index.d.ts +8 -0
  162. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  163. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  164. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  165. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  166. package/lib/src/hooks/useEagleTable/columns.d.ts +47 -0
  167. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  168. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +56 -0
  169. package/lib/src/hooks/useEdit.d.ts +4 -0
  170. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  171. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  172. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  173. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  174. package/lib/src/hooks/useSchema.d.ts +21 -0
  175. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  176. package/lib/src/hooks/useTableData.d.ts +20 -0
  177. package/lib/src/i18n.d.ts +371 -0
  178. package/lib/src/index.d.ts +12 -0
  179. package/lib/src/locales/en-US/index.d.ts +175 -0
  180. package/lib/src/locales/index.d.ts +2 -0
  181. package/lib/src/locales/zh-CN/index.d.ts +193 -0
  182. package/lib/src/main.d.ts +3 -0
  183. package/lib/src/models/cronjob-model.d.ts +15 -0
  184. package/lib/src/models/daemonset-model.d.ts +15 -0
  185. package/lib/src/models/deployment-model.d.ts +13 -0
  186. package/lib/src/models/event-model.d.ts +7 -0
  187. package/lib/src/models/index.d.ts +19 -0
  188. package/lib/src/models/ingress-model.d.ts +20 -0
  189. package/lib/src/models/job-model.d.ts +20 -0
  190. package/lib/src/models/network-policy-model.d.ts +9 -0
  191. package/lib/src/models/node-model.d.ts +17 -0
  192. package/lib/src/models/persistent-volume-claim.d.ts +13 -0
  193. package/lib/src/models/persistent-volume.d.ts +13 -0
  194. package/lib/src/models/pod-metrics-model.d.ts +8 -0
  195. package/lib/src/models/pod-model.d.ts +20 -0
  196. package/lib/src/models/resource-model.d.ts +21 -0
  197. package/lib/src/models/service-model.d.ts +24 -0
  198. package/lib/src/models/statefulset-model.d.ts +13 -0
  199. package/lib/src/models/storage-class.d.ts +16 -0
  200. package/lib/src/models/types/index.d.ts +1 -0
  201. package/lib/src/models/types/metric.d.ts +25 -0
  202. package/lib/src/models/workload-base-model.d.ts +12 -0
  203. package/lib/src/models/workload-model.d.ts +18 -0
  204. package/lib/src/pages/configmaps/index.d.ts +4 -0
  205. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  206. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  207. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  208. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  209. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  210. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  211. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  212. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  213. package/lib/src/pages/deployments/index.d.ts +2 -0
  214. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  215. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  216. package/lib/src/pages/ingresses/index.d.ts +4 -0
  217. package/lib/src/pages/jobs/index.d.ts +4 -0
  218. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  219. package/lib/src/pages/nodes/index.d.ts +2 -0
  220. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  221. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  222. package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
  223. package/lib/src/pages/persistentvolumes/index.d.ts +4 -0
  224. package/lib/src/pages/pods/create/index.d.ts +3 -0
  225. package/lib/src/pages/pods/index.d.ts +3 -0
  226. package/lib/src/pages/pods/list/index.d.ts +3 -0
  227. package/lib/src/pages/pods/show/index.d.ts +3 -0
  228. package/lib/src/pages/secrets/index.d.ts +4 -0
  229. package/lib/src/pages/services/index.d.ts +4 -0
  230. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  231. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  232. package/lib/src/pages/storageclasses/index.d.ts +48 -0
  233. package/lib/src/plugins/index.d.ts +4 -0
  234. package/lib/src/plugins/model-plugin.d.ts +13 -0
  235. package/lib/src/plugins/relation-plugin.d.ts +26 -0
  236. package/lib/src/plugins/type.d.ts +8 -0
  237. package/lib/src/providers/index.d.ts +1 -0
  238. package/lib/src/providers/router-provider/index.d.ts +21 -0
  239. package/lib/src/styles/button.d.ts +1 -0
  240. package/lib/src/styles/modal.d.ts +1 -0
  241. package/lib/src/types/index.d.ts +1 -0
  242. package/lib/src/types/resource.d.ts +62 -0
  243. package/lib/src/utils/addId.d.ts +3 -0
  244. package/lib/src/utils/download.d.ts +1 -0
  245. package/lib/src/utils/error.d.ts +20 -0
  246. package/lib/src/utils/form.d.ts +3 -0
  247. package/lib/src/utils/index.d.ts +1 -0
  248. package/lib/src/utils/k8s.d.ts +3 -0
  249. package/lib/src/utils/labels.d.ts +9 -0
  250. package/lib/src/utils/match-selector.d.ts +3 -0
  251. package/lib/src/utils/openapi.d.ts +40 -0
  252. package/lib/src/utils/schema.d.ts +18 -0
  253. package/lib/src/utils/selector.d.ts +3 -0
  254. package/lib/src/utils/shell.d.ts +16 -0
  255. package/lib/src/utils/storage.d.ts +13 -0
  256. package/lib/src/utils/string.d.ts +1 -0
  257. package/lib/src/utils/time.d.ts +13 -0
  258. package/lib/src/utils/unit.d.ts +12 -0
  259. package/lib/src/utils/yaml.d.ts +2 -0
  260. package/lib/styles/tag.d.ts +1 -0
  261. package/lib/types/resource.d.ts +3 -3
  262. package/lib/vite.config.d.ts +2 -0
  263. package/package.json +5 -5
@@ -0,0 +1,56 @@
1
+ import { RequiredColumnProps } from '@cloudtower/eagle';
2
+ import { useTable } from '@refinedev/core';
3
+ import React from 'react';
4
+ import { Column, TableProps } from '../../components/Table';
5
+ import { ResourceModel } from '../../models';
6
+ type Params<Model extends ResourceModel> = {
7
+ useTableParams: Parameters<typeof useTable<Model>>[0];
8
+ resource?: string;
9
+ columns: Column<Model>[];
10
+ tableProps?: Partial<TableProps<Model>>;
11
+ formatter?: (d: Model) => Model;
12
+ Dropdown?: React.FC<{
13
+ record: Model;
14
+ }>;
15
+ };
16
+ export declare enum ColumnKeys {
17
+ age = "age",
18
+ name = "name",
19
+ namespace = "namespace",
20
+ phase = "phase",
21
+ replicas = "replicas",
22
+ deploymentImage = "deploymentImage",
23
+ podImage = "podImage"
24
+ }
25
+ export declare function addDefaultRenderToColumns<Data, Col extends RequiredColumnProps<Data> = RequiredColumnProps<Data>>(columns: Col[]): ({
26
+ render(value: unknown): JSX.Element;
27
+ } & Col)[];
28
+ export declare const useEagleTable: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(params: Params<Model>) => {
29
+ tableQueryResult: import("@tanstack/query-core").QueryObserverResult<import("@refinedev/core").GetListResponse<Model>, import("@refinedev/core").HttpError>;
30
+ sorter: import("@refinedev/core").CrudSorting;
31
+ sorters: import("@refinedev/core").CrudSorting;
32
+ setSorter: (sorter: import("@refinedev/core").CrudSorting) => void;
33
+ setSorters: (sorter: import("@refinedev/core").CrudSorting) => void;
34
+ filters: import("@refinedev/core").CrudFilters;
35
+ setFilters: ((filters: import("@refinedev/core").CrudFilters, behavior?: ("replace" | "merge") | undefined) => void) & ((setter: (prevFilters: import("@refinedev/core").CrudFilters) => import("@refinedev/core").CrudFilters) => void);
36
+ createLinkForSyncWithLocation: (params: {
37
+ pagination: {
38
+ current?: number | undefined;
39
+ pageSize?: number | undefined;
40
+ };
41
+ sorter?: import("@refinedev/core").CrudSorting | undefined;
42
+ sorters: import("@refinedev/core").CrudSorting;
43
+ filters: import("@refinedev/core").CrudFilters;
44
+ }) => string;
45
+ current: number;
46
+ setCurrent: (value: React.SetStateAction<number>) => void;
47
+ pageSize: number;
48
+ setPageSize: (value: React.SetStateAction<number>) => void;
49
+ pageCount: number;
50
+ overtime: {
51
+ elapsedTime?: number | undefined;
52
+ };
53
+ tableProps: TableProps<Model>;
54
+ selectedKeys: string[];
55
+ };
56
+ export {};
@@ -0,0 +1,4 @@
1
+ import { BaseKey } from '@refinedev/core';
2
+ export declare function useEdit(): {
3
+ edit: (id: BaseKey) => void;
4
+ };
@@ -0,0 +1,3 @@
1
+ export declare const useGlobalStore: () => {
2
+ globalStore?: import("k8s-api-provider").GlobalStore | undefined;
3
+ };
@@ -0,0 +1,5 @@
1
+ import * as monaco from 'monaco-editor';
2
+ declare function useK8sYamlEditor(): {
3
+ fold: (editor: monaco.editor.IStandaloneCodeEditor) => Promise<void>;
4
+ };
5
+ export default useK8sYamlEditor;
@@ -0,0 +1,5 @@
1
+ import { CrudFilters } from '@refinedev/core';
2
+ declare function useNamespaceRefineFilter(): {
3
+ permanent: CrudFilters;
4
+ };
5
+ export default useNamespaceRefineFilter;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import { YamlFormProps } from '../components';
3
+ interface UseOpenFormOptions {
4
+ id?: string;
5
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
6
+ }
7
+ export declare function useOpenForm(options?: UseOpenFormOptions): () => void;
8
+ export {};
@@ -0,0 +1,21 @@
1
+ import { type IResourceItem } from '@refinedev/core';
2
+ import { JSONSchema7 } from 'json-schema';
3
+ type UseSchemaOptions = {
4
+ resource?: IResourceItem;
5
+ skip?: boolean;
6
+ };
7
+ type UseSchemaResult = {
8
+ schema: JSONSchema7 | null;
9
+ loading: boolean;
10
+ error: Error | null;
11
+ fetchSchema: () => void;
12
+ };
13
+ export declare function useApiGroupSchema(): {
14
+ fetchSchema: (apiGroups: string[]) => Promise<void>;
15
+ schemas: JSONSchema7[] | null;
16
+ schemasMap: Record<string, JSONSchema7[]>;
17
+ loading: boolean;
18
+ error: Error | null;
19
+ };
20
+ export declare function useSchema(options?: UseSchemaOptions): UseSchemaResult;
21
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ interface UseSubmitFormOptions {
3
+ formRef: React.MutableRefObject<{
4
+ submit: () => (Promise<unknown> | undefined);
5
+ } | null>;
6
+ onSubmitSuccess?: () => void;
7
+ }
8
+ export declare function useSubmitForm(options: UseSubmitFormOptions): {
9
+ submitting: boolean;
10
+ errorMsgs: string[];
11
+ reset: () => void;
12
+ onSubmit: () => Promise<void>;
13
+ };
14
+ export {};
@@ -0,0 +1,20 @@
1
+ /// <reference types="react" />
2
+ import { CrudSorting } from '@refinedev/core';
3
+ import { Column, SorterOrder } from 'src/components/Table';
4
+ type UseTableDataProps<Data extends {
5
+ id: string;
6
+ }> = {
7
+ pageSize?: number;
8
+ defaultSorters?: CrudSorting;
9
+ data: Data[];
10
+ columns: Column<Data>[];
11
+ };
12
+ declare function useTableData<Data extends {
13
+ id: string;
14
+ }>({ data, columns, pageSize, defaultSorters }: UseTableDataProps<Data>): {
15
+ data: Data[];
16
+ currentPage: number;
17
+ onPageChange: import("react").Dispatch<import("react").SetStateAction<number>>;
18
+ onSorterChange: (order?: SorterOrder | null, key?: string) => void;
19
+ };
20
+ export default useTableData;
@@ -0,0 +1,371 @@
1
+ import 'dayjs/locale/zh';
2
+ import i18n from 'i18next';
3
+ export declare const resources: {
4
+ 'en-US': {
5
+ dovetail: {
6
+ copy: string;
7
+ reset_arguments: string;
8
+ view_changes: string;
9
+ back_to_edit: string;
10
+ configure_file: string;
11
+ yaml_format_wrong: string;
12
+ yaml_value_wrong: string;
13
+ edit_yaml: string;
14
+ copied: string;
15
+ already_reset: string;
16
+ fetch_schema_fail: string;
17
+ obtain_data_error: string;
18
+ retry: string;
19
+ create_resource: string;
20
+ edit_resource: string;
21
+ state: string;
22
+ name: string;
23
+ pod: string;
24
+ cancel: string;
25
+ delete: string;
26
+ create: string;
27
+ confirm_delete_text: string;
28
+ edit: string;
29
+ namespace: string;
30
+ created_time: string;
31
+ label: string;
32
+ annotation: string;
33
+ type: string;
34
+ event: string;
35
+ reason: string;
36
+ object: string;
37
+ note: string;
38
+ condition: string;
39
+ download_yaml: string;
40
+ detail: string;
41
+ message: string;
42
+ save: string;
43
+ workload: string;
44
+ empty: string;
45
+ schedule: string;
46
+ lastScheduleTime: string;
47
+ duration: string;
48
+ started: string;
49
+ container: string;
50
+ redeploy: string;
51
+ data: string;
52
+ resume: string;
53
+ sessionAffinity: string;
54
+ log: string;
55
+ ready: string;
56
+ updating: string;
57
+ completed: string;
58
+ failed: string;
59
+ suspended: string;
60
+ running: string;
61
+ terminating: string;
62
+ terminated: string;
63
+ succeeded: string;
64
+ unknown: string;
65
+ pending: string;
66
+ waiting: string;
67
+ expand: string;
68
+ fold: string;
69
+ rule: string;
70
+ port: string;
71
+ cert: string;
72
+ ip_address: string;
73
+ last_seen: string;
74
+ node_port: string;
75
+ protocol: string;
76
+ key: string;
77
+ value: string;
78
+ path: string;
79
+ backend: string;
80
+ belong_to_node: string;
81
+ true: string;
82
+ false: string;
83
+ warning: string;
84
+ normal: string;
85
+ delete_tip: string;
86
+ delete_resource: string;
87
+ password: string;
88
+ username: string;
89
+ host: string;
90
+ no_resource: string;
91
+ all_namespaces: string;
92
+ clusterIp: string;
93
+ select_container: string;
94
+ sec: string;
95
+ min: string;
96
+ hr: string;
97
+ day: string;
98
+ port_mapping: string;
99
+ out_cluster_access: string;
100
+ in_cluster_access: string;
101
+ fail_get_detail: string;
102
+ pod_num: string;
103
+ show_data_value: string;
104
+ hide_data_value: string;
105
+ please_input: string;
106
+ create_failed: string;
107
+ create_failed_tip: string;
108
+ save_failed: string;
109
+ save_failed_tip: string;
110
+ completion_num_tooltip: string;
111
+ ready_num_tooltip: string;
112
+ realtime_log: string;
113
+ previous_log: string;
114
+ auto_wrap: string;
115
+ container_num: string;
116
+ edit_resource_success: string;
117
+ redeploy_success_toast: string;
118
+ redeploy_failed_toast: string;
119
+ pause_success_toast: string;
120
+ pause_failed_toast: string;
121
+ resume_success_toast: string;
122
+ resume_failed_toast: string;
123
+ delete_success_toast: string;
124
+ delete_failed_toast: string;
125
+ create_success_toast: string;
126
+ save_yaml_success_toast: string;
127
+ save_replicas_success_toast: string;
128
+ save_replicas_failed_toast: string;
129
+ port_mapping_title_tooltip: string;
130
+ in_cluster_desc: string;
131
+ in_cluster_ip_desc: string;
132
+ in_cluster_external_name_desc: string;
133
+ out_cluster_ip_desc: string;
134
+ out_cluster_node_port_desc: string;
135
+ out_cluster_lb_desc: string;
136
+ out_external_name_desc: string;
137
+ image: string;
138
+ restarts: string;
139
+ updated_time: string;
140
+ init_container: string;
141
+ regular_container: string;
142
+ suspend: string;
143
+ default_backend: string;
144
+ ingress_class: string;
145
+ pod_ready_num: string;
146
+ pod_complete_num: string;
147
+ pod_replicas_num: string;
148
+ edit_replicas: string;
149
+ dns_record: string;
150
+ basic_info: string;
151
+ pod_selector: string;
152
+ ingress_rule: string;
153
+ egress_rule: string;
154
+ service_port: string;
155
+ pod_port: string;
156
+ path_type: string;
157
+ only_support_one_yaml: string;
158
+ not_support: string;
159
+ stopped: string;
160
+ any_node_ip: string;
161
+ storage_class: string;
162
+ persistent_volume: string;
163
+ provisioner: string;
164
+ file_system: string;
165
+ capacity: string;
166
+ volume_mode: string;
167
+ access_mode: string;
168
+ block: string;
169
+ pv_phase_available: string;
170
+ pv_phase_bound: string;
171
+ pv_phase_released: string;
172
+ pv_phase_failed: string;
173
+ pv_phase_pending: string;
174
+ exec_pod: string;
175
+ search: string;
176
+ };
177
+ };
178
+ 'zh-CN': {
179
+ dovetail: {
180
+ copy: string;
181
+ reset_arguments: string;
182
+ view_changes: string;
183
+ back_to_edit: string;
184
+ configure_file: string;
185
+ yaml_format_wrong: string;
186
+ yaml_value_wrong: string;
187
+ edit_yaml: string;
188
+ copied: string;
189
+ already_reset: string;
190
+ cancel: string;
191
+ delete: string;
192
+ create: string;
193
+ delete_resource: string;
194
+ confirm_delete_text: string;
195
+ delete_tip: string;
196
+ edit: string;
197
+ namespace: string;
198
+ name: string;
199
+ state: string;
200
+ image: string;
201
+ created_time: string;
202
+ label: string;
203
+ annotation: string;
204
+ type: string;
205
+ event: string;
206
+ reason: string;
207
+ object: string;
208
+ note: string;
209
+ condition: string;
210
+ download_yaml: string;
211
+ detail: string;
212
+ restarts: string;
213
+ updated_time: string;
214
+ message: string;
215
+ save: string;
216
+ workload: string;
217
+ all_namespaces: string;
218
+ empty: string;
219
+ schedule: string;
220
+ lastScheduleTime: string;
221
+ duration: string;
222
+ started: string;
223
+ init_container: string;
224
+ regular_container: string;
225
+ container: string;
226
+ redeploy: string;
227
+ data: string;
228
+ suspend: string;
229
+ resume: string;
230
+ clusterIp: string;
231
+ sessionAffinity: string;
232
+ log: string;
233
+ select_container: string;
234
+ fetch_schema_fail: string;
235
+ obtain_data_error: string;
236
+ retry: string;
237
+ ready: string;
238
+ updating: string;
239
+ completed: string;
240
+ failed: string;
241
+ suspended: string;
242
+ running: string;
243
+ terminating: string;
244
+ succeeded: string;
245
+ terminated: string;
246
+ unknown: string;
247
+ pending: string;
248
+ waiting: string;
249
+ create_resource: string;
250
+ edit_resource: string;
251
+ sec: string;
252
+ min: string;
253
+ hr: string;
254
+ day: string;
255
+ expand: string;
256
+ fold: string;
257
+ rule: string;
258
+ default_backend: string;
259
+ ingress_class: string;
260
+ port: string;
261
+ pod_ready_num: string;
262
+ pod_complete_num: string;
263
+ pod_replicas_num: string;
264
+ edit_replicas: string;
265
+ cert: string;
266
+ dns_record: string;
267
+ port_mapping: string;
268
+ out_cluster_access: string;
269
+ in_cluster_access: string;
270
+ fail_get_detail: string;
271
+ basic_info: string;
272
+ pod: string;
273
+ pod_num: string;
274
+ pod_selector: string;
275
+ ingress_rule: string;
276
+ egress_rule: string;
277
+ ip_address: string;
278
+ last_seen: string;
279
+ service_port: string;
280
+ pod_port: string;
281
+ node_port: string;
282
+ protocol: string;
283
+ key: string;
284
+ value: string;
285
+ show_data_value: string;
286
+ hide_data_value: string;
287
+ path_type: string;
288
+ path: string;
289
+ backend: string;
290
+ belong_to_node: string;
291
+ please_input: string;
292
+ create_failed: string;
293
+ create_failed_tip: string;
294
+ save_failed: string;
295
+ save_failed_tip: string;
296
+ completion_num_tooltip: string;
297
+ ready_num_tooltip: string;
298
+ true: string;
299
+ false: string;
300
+ warning: string;
301
+ normal: string;
302
+ realtime_log: string;
303
+ previous_log: string;
304
+ auto_wrap: string;
305
+ name_can_not_be_empty: string;
306
+ password: string;
307
+ username: string;
308
+ host: string;
309
+ container_num: string;
310
+ edit_resource_success: string;
311
+ redeploy_success_toast: string;
312
+ redeploy_failed_toast: string;
313
+ pause_success_toast: string;
314
+ pause_failed_toast: string;
315
+ resume_success_toast: string;
316
+ resume_failed_toast: string;
317
+ delete_success_toast: string;
318
+ delete_failed_toast: string;
319
+ create_success_toast: string;
320
+ save_yaml_success_toast: string;
321
+ save_replicas_success_toast: string;
322
+ save_replicas_failed_toast: string;
323
+ no_resource: string;
324
+ port_mapping_title_tooltip: string;
325
+ in_cluster_desc: string;
326
+ in_cluster_ip_desc: string;
327
+ in_cluster_external_name_desc: string;
328
+ out_cluster_ip_desc: string;
329
+ out_cluster_node_port_desc: string;
330
+ out_cluster_lb_desc: string;
331
+ out_external_name_desc: string;
332
+ only_support_one_yaml: string;
333
+ support: string;
334
+ not_support: string;
335
+ stopped: string;
336
+ any_node_ip: string;
337
+ storage_class: string;
338
+ persistent_volume: string;
339
+ provisioner: string;
340
+ file_system: string;
341
+ capacity: string;
342
+ distributed: string;
343
+ volume_mode: string;
344
+ access_mode: string;
345
+ block: string;
346
+ pv_phase_available: string;
347
+ pv_phase_bound: string;
348
+ pv_phase_released: string;
349
+ pv_phase_failed: string;
350
+ pv_phase_pending: string;
351
+ font_size: string;
352
+ download_shell_content: string;
353
+ clear_shell: string;
354
+ disconnected: string;
355
+ connecting: string;
356
+ reconnect: string;
357
+ search: string;
358
+ pvc: string;
359
+ pv: string;
360
+ csi: string;
361
+ retain: string;
362
+ default_sc: string;
363
+ reclaim_policy: string;
364
+ allow_expand: string;
365
+ edit_distribute_storage: string;
366
+ edit_distribute_storage_success_toast: string;
367
+ edit_distribute_storage_failed_toast: string;
368
+ };
369
+ };
370
+ };
371
+ export default i18n;
@@ -0,0 +1,12 @@
1
+ export declare const dovetailRefineI18n: import("i18next").i18n;
2
+ export * from './providers';
3
+ export * from './hooks';
4
+ export * from './components';
5
+ export * from './constants';
6
+ export * from './hooks';
7
+ export * from './Dovetail';
8
+ export * from './types';
9
+ export * from './contexts';
10
+ export * from './models';
11
+ export * from './plugins';
12
+ export * from './utils';