@dovetail-v2/refine 0.0.0-pod-exec.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 (243) hide show
  1. package/README.MD +49 -0
  2. package/dist/MonacoYamlDiffEditor-9f67fdf5.js +55 -0
  3. package/dist/assets/yaml.worker-5e5f190c.js +40608 -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-cd4b193d.js +34099 -0
  8. package/dist/locales/de/common.json +167 -0
  9. package/dist/locales/en/common.json +167 -0
  10. package/dist/refine.js +207 -0
  11. package/dist/refine.umd.cjs +34144 -0
  12. package/dist/style.css +1767 -0
  13. package/lib/src/App.d.ts +3 -0
  14. package/lib/src/Dovetail.d.ts +18 -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 +9 -0
  20. package/lib/src/components/CronjobJobsTable/index.d.ts +8 -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 +9 -0
  24. package/lib/src/components/DrawerShow/index.d.ts +1 -0
  25. package/lib/src/components/DurationTime/index.d.ts +6 -0
  26. package/lib/src/components/EditButton/index.d.ts +2 -0
  27. package/lib/src/components/EditField/index.d.ts +15 -0
  28. package/lib/src/components/ErrorContent/index.d.ts +17 -0
  29. package/lib/src/components/EventsTable/EventsTable.d.ts +6 -0
  30. package/lib/src/components/EventsTable/index.d.ts +1 -0
  31. package/lib/src/components/Form/FormModal.d.ts +10 -0
  32. package/lib/src/components/Form/KeyValueListWidget.d.ts +6 -0
  33. package/lib/src/components/Form/MetadataForm.d.ts +2 -0
  34. package/lib/src/components/Form/NameInputWidget.d.ts +51 -0
  35. package/lib/src/components/Form/NamespaceSelectWidget.d.ts +9 -0
  36. package/lib/src/components/Form/RefineFormContent.d.ts +12 -0
  37. package/lib/src/components/Form/RefineFormPage.d.ts +7 -0
  38. package/lib/src/components/Form/YamlForm.d.ts +29 -0
  39. package/lib/src/components/Form/index.d.ts +7 -0
  40. package/lib/src/components/Form/type.d.ts +16 -0
  41. package/lib/src/components/Form/useReactHookForm.d.ts +29 -0
  42. package/lib/src/components/Form/useRefineForm.d.ts +10 -0
  43. package/lib/src/components/Form/useYamlForm.d.ts +51 -0
  44. package/lib/src/components/Form/widget.d.ts +5 -0
  45. package/lib/src/components/FormErrorAlert/index.d.ts +9 -0
  46. package/lib/src/components/FormLayout/index.d.ts +7 -0
  47. package/lib/src/components/FormModal/index.d.ts +10 -0
  48. package/lib/src/components/FormWidgets/KeyValueListWidget.d.ts +6 -0
  49. package/lib/src/components/FormWidgets/MetadataForm.d.ts +2 -0
  50. package/lib/src/components/FormWidgets/NameInputWidget.d.ts +51 -0
  51. package/lib/src/components/FormWidgets/NamespaceSelectWidget.d.ts +9 -0
  52. package/lib/src/components/FormWidgets/index.d.ts +4 -0
  53. package/lib/src/components/FormWidgets/widget.d.ts +5 -0
  54. package/lib/src/components/ImageNames/index.d.ts +5 -0
  55. package/lib/src/components/IngressRulesComponent/index.d.ts +5 -0
  56. package/lib/src/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  57. package/lib/src/components/IngressRulesTable/index.d.ts +1 -0
  58. package/lib/src/components/K8sDropdown/index.d.ts +9 -0
  59. package/lib/src/components/KeyValue/KeyValue.d.ts +7 -0
  60. package/lib/src/components/KeyValue/KeyValueAnnotation.d.ts +6 -0
  61. package/lib/src/components/KeyValue/KeyValueSecret.d.ts +5 -0
  62. package/lib/src/components/KeyValue/index.d.ts +3 -0
  63. package/lib/src/components/KeyValueData/index.d.ts +6 -0
  64. package/lib/src/components/Layout/index.d.ts +3 -0
  65. package/lib/src/components/LinkFallback/index.d.ts +4 -0
  66. package/lib/src/components/ListPage/index.d.ts +9 -0
  67. package/lib/src/components/Menu/index.d.ts +2 -0
  68. package/lib/src/components/ModalContextProvider/index.d.ts +12 -0
  69. package/lib/src/components/NamespacesFilter/index.d.ts +11 -0
  70. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts +8 -0
  71. package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +1 -0
  72. package/lib/src/components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts +8 -0
  73. package/lib/src/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  74. package/lib/src/components/PageShow/PageShow.d.ts +12 -0
  75. package/lib/src/components/PageShow/index.d.ts +1 -0
  76. package/lib/src/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  77. package/lib/src/components/PodContainersTable/index.d.ts +1 -0
  78. package/lib/src/components/PodDropdown/index.d.ts +9 -0
  79. package/lib/src/components/PodLog/index.d.ts +6 -0
  80. package/lib/src/components/PodSelectorTable/index.d.ts +6 -0
  81. package/lib/src/components/PodShellModal/index.d.ts +7 -0
  82. package/lib/src/components/PortsTable/index.d.ts +7 -0
  83. package/lib/src/components/ReferenceLink/index.d.ts +8 -0
  84. package/lib/src/components/ReplicasDropdown/index.d.ts +9 -0
  85. package/lib/src/components/ResourceCRUD/ResourceCRUD.d.ts +8 -0
  86. package/lib/src/components/ResourceCRUD/create/index.d.ts +8 -0
  87. package/lib/src/components/ResourceCRUD/index.d.ts +4 -0
  88. package/lib/src/components/ResourceCRUD/list/index.d.ts +9 -0
  89. package/lib/src/components/ResourceCRUD/show/index.d.ts +9 -0
  90. package/lib/src/components/ResourceLink/index.d.ts +8 -0
  91. package/lib/src/components/ResourceSelect/index.d.ts +12 -0
  92. package/lib/src/components/ResourceUsageBar/index.d.ts +8 -0
  93. package/lib/src/components/Separator/index.d.ts +2 -0
  94. package/lib/src/components/ServiceComponents/index.d.ts +10 -0
  95. package/lib/src/components/ShowContent/ShowContent.d.ts +18 -0
  96. package/lib/src/components/ShowContent/fields.d.ts +57 -0
  97. package/lib/src/components/ShowContent/groups.d.ts +22 -0
  98. package/lib/src/components/ShowContent/index.d.ts +4 -0
  99. package/lib/src/components/ShowContent/tabs.d.ts +5 -0
  100. package/lib/src/components/StateTag/StateTag.d.ts +10 -0
  101. package/lib/src/components/StateTag/index.d.ts +1 -0
  102. package/lib/src/components/Table/ErrorContent.d.ts +10 -0
  103. package/lib/src/components/Table/TableToolBar.d.ts +8 -0
  104. package/lib/src/components/Table/TableWidgets.d.ts +6 -0
  105. package/lib/src/components/Table/index.d.ts +43 -0
  106. package/lib/src/components/Tabs/index.d.ts +10 -0
  107. package/lib/src/components/Tags/index.d.ts +6 -0
  108. package/lib/src/components/TextTags/index.d.ts +6 -0
  109. package/lib/src/components/Time/index.d.ts +8 -0
  110. package/lib/src/components/ValueDisplay/index.d.ts +9 -0
  111. package/lib/src/components/WorkloadDropdown/index.d.ts +9 -0
  112. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  113. package/lib/src/components/WorkloadPodsTable/index.d.ts +1 -0
  114. package/lib/src/components/WorkloadReplicas/index.d.ts +17 -0
  115. package/lib/src/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  116. package/lib/src/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  117. package/lib/src/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  118. package/lib/src/components/YamlEditor/index.d.ts +1 -0
  119. package/lib/src/components/YamlEditor/style.d.ts +11 -0
  120. package/lib/src/components/YamlEditor/yaml.worker.d.ts +1 -0
  121. package/lib/src/components/YamlForm/index.d.ts +25 -0
  122. package/lib/src/components/index.d.ts +42 -0
  123. package/lib/src/constants/auth.d.ts +5 -0
  124. package/lib/src/constants/index.d.ts +3 -0
  125. package/lib/src/constants/k8s.d.ts +469 -0
  126. package/lib/src/constants/state.d.ts +15 -0
  127. package/lib/src/contexts/component.d.ts +8 -0
  128. package/lib/src/contexts/configs.d.ts +4 -0
  129. package/lib/src/contexts/global-store.d.ts +6 -0
  130. package/lib/src/contexts/index.d.ts +3 -0
  131. package/lib/src/hooks/index.d.ts +8 -0
  132. package/lib/src/hooks/useDeleteModal/index.d.ts +1 -0
  133. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.d.ts +8 -0
  134. package/lib/src/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  135. package/lib/src/hooks/useDownloadYAML.d.ts +7 -0
  136. package/lib/src/hooks/useEagleForm.d.ts +48 -0
  137. package/lib/src/hooks/useEagleTable/columns.d.ts +35 -0
  138. package/lib/src/hooks/useEagleTable/index.d.ts +2 -0
  139. package/lib/src/hooks/useEagleTable/useEagleTable.d.ts +55 -0
  140. package/lib/src/hooks/useEdit.d.ts +4 -0
  141. package/lib/src/hooks/useGlobalStore.d.ts +3 -0
  142. package/lib/src/hooks/useK8sYamlEditor.d.ts +5 -0
  143. package/lib/src/hooks/useModal.d.ts +0 -0
  144. package/lib/src/hooks/useNamespaceFilter.d.ts +5 -0
  145. package/lib/src/hooks/useNamespaceRefineFilter.d.ts +5 -0
  146. package/lib/src/hooks/useOpenForm.d.ts +8 -0
  147. package/lib/src/hooks/useSchema.d.ts +14 -0
  148. package/lib/src/hooks/useSubmitForm.d.ts +14 -0
  149. package/lib/src/hooks/useTableData.d.ts +20 -0
  150. package/lib/src/i18n.d.ts +325 -0
  151. package/lib/src/index.d.ts +11 -0
  152. package/lib/src/locales/en-US/index.d.ts +161 -0
  153. package/lib/src/locales/index.d.ts +2 -0
  154. package/lib/src/locales/zh-CN/index.d.ts +161 -0
  155. package/lib/src/main.d.ts +3 -0
  156. package/lib/src/model/cronjob-model.d.ts +9 -0
  157. package/lib/src/model/index.d.ts +6 -0
  158. package/lib/src/model/job-model.d.ts +10 -0
  159. package/lib/src/model/pod-metrics-model.d.ts +7 -0
  160. package/lib/src/model/pod-model.d.ts +15 -0
  161. package/lib/src/model/resource-model.d.ts +17 -0
  162. package/lib/src/model/workload-model.d.ts +17 -0
  163. package/lib/src/models/cronjob-model.d.ts +16 -0
  164. package/lib/src/models/daemonset-model.d.ts +16 -0
  165. package/lib/src/models/deployment-model.d.ts +14 -0
  166. package/lib/src/models/event-model.d.ts +8 -0
  167. package/lib/src/models/index.d.ts +15 -0
  168. package/lib/src/models/ingress-model.d.ts +20 -0
  169. package/lib/src/models/job-model.d.ts +21 -0
  170. package/lib/src/models/network-policy-model.d.ts +10 -0
  171. package/lib/src/models/node-model.d.ts +15 -0
  172. package/lib/src/models/persistent-volume-claim.d.ts +10 -0
  173. package/lib/src/models/persistent-volume.d.ts +10 -0
  174. package/lib/src/models/pod-metrics-model.d.ts +9 -0
  175. package/lib/src/models/pod-model.d.ts +21 -0
  176. package/lib/src/models/resource-model.d.ts +21 -0
  177. package/lib/src/models/service-model.d.ts +25 -0
  178. package/lib/src/models/statefulset-model.d.ts +14 -0
  179. package/lib/src/models/storage-class.d.ts +10 -0
  180. package/lib/src/models/types/index.d.ts +1 -0
  181. package/lib/src/models/types/metric.d.ts +25 -0
  182. package/lib/src/models/workload-base-model.d.ts +13 -0
  183. package/lib/src/models/workload-model.d.ts +19 -0
  184. package/lib/src/pages/configmaps/index.d.ts +4 -0
  185. package/lib/src/pages/cronjobs/create/index.d.ts +3 -0
  186. package/lib/src/pages/cronjobs/index.d.ts +3 -0
  187. package/lib/src/pages/cronjobs/list/index.d.ts +3 -0
  188. package/lib/src/pages/cronjobs/show/index.d.ts +3 -0
  189. package/lib/src/pages/daemonsets/create/index.d.ts +3 -0
  190. package/lib/src/pages/daemonsets/index.d.ts +3 -0
  191. package/lib/src/pages/daemonsets/list/index.d.ts +3 -0
  192. package/lib/src/pages/daemonsets/show/index.d.ts +3 -0
  193. package/lib/src/pages/deployments/create/index.d.ts +3 -0
  194. package/lib/src/pages/deployments/index.d.ts +2 -0
  195. package/lib/src/pages/deployments/list/index.d.ts +3 -0
  196. package/lib/src/pages/deployments/show/index.d.ts +3 -0
  197. package/lib/src/pages/ingresses/index.d.ts +4 -0
  198. package/lib/src/pages/jobs/index.d.ts +4 -0
  199. package/lib/src/pages/networkPolicies/index.d.ts +4 -0
  200. package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +17 -0
  201. package/lib/src/pages/nodes/index.d.ts +2 -0
  202. package/lib/src/pages/nodes/list/index.d.ts +3 -0
  203. package/lib/src/pages/nodes/show/index.d.ts +3 -0
  204. package/lib/src/pages/pods/create/index.d.ts +3 -0
  205. package/lib/src/pages/pods/index.d.ts +3 -0
  206. package/lib/src/pages/pods/list/index.d.ts +3 -0
  207. package/lib/src/pages/pods/show/index.d.ts +3 -0
  208. package/lib/src/pages/secrets/index.d.ts +4 -0
  209. package/lib/src/pages/services/index.d.ts +4 -0
  210. package/lib/src/pages/statefulsets/create/index.d.ts +3 -0
  211. package/lib/src/pages/statefulsets/index.d.ts +4 -0
  212. package/lib/src/pages/statefulsets/list/index.d.ts +3 -0
  213. package/lib/src/pages/statefulsets/show/index.d.ts +3 -0
  214. package/lib/src/pages/storageclasses/form/index.d.ts +9 -0
  215. package/lib/src/pages/storageclasses/index.d.ts +44 -0
  216. package/lib/src/pages/storageclasses/list/index.d.ts +3 -0
  217. package/lib/src/pages/storageclasses/show/index.d.ts +3 -0
  218. package/lib/src/plugins/index.d.ts +2 -0
  219. package/lib/src/plugins/model-plugin.d.ts +12 -0
  220. package/lib/src/plugins/relation-plugin.d.ts +27 -0
  221. package/lib/src/plugins/type.d.ts +8 -0
  222. package/lib/src/providers/index.d.ts +1 -0
  223. package/lib/src/providers/router-provider/index.d.ts +21 -0
  224. package/lib/src/types/index.d.ts +1 -0
  225. package/lib/src/types/metric.d.ts +25 -0
  226. package/lib/src/types/resource.d.ts +60 -0
  227. package/lib/src/utils/addId.d.ts +3 -0
  228. package/lib/src/utils/download.d.ts +1 -0
  229. package/lib/src/utils/error.d.ts +20 -0
  230. package/lib/src/utils/form.d.ts +3 -0
  231. package/lib/src/utils/k8s.d.ts +3 -0
  232. package/lib/src/utils/labels.d.ts +9 -0
  233. package/lib/src/utils/match-selector.d.ts +3 -0
  234. package/lib/src/utils/openapi.d.ts +45 -0
  235. package/lib/src/utils/schema.d.ts +17 -0
  236. package/lib/src/utils/selector.d.ts +3 -0
  237. package/lib/src/utils/shell.d.ts +16 -0
  238. package/lib/src/utils/string.d.ts +1 -0
  239. package/lib/src/utils/time.d.ts +13 -0
  240. package/lib/src/utils/unit.d.ts +12 -0
  241. package/lib/src/utils/yaml.d.ts +2 -0
  242. package/lib/vite.config.d.ts +2 -0
  243. package/package.json +112 -0
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare function App(): JSX.Element;
3
+ export default App;
@@ -0,0 +1,18 @@
1
+ import { AccessControlProvider } from '@refinedev/core';
2
+ import { History } from 'history';
3
+ import { GlobalStore } from 'k8s-api-provider';
4
+ import React from 'react';
5
+ import { ResourceConfig } from './types';
6
+ import './styles.css';
7
+ type Props = {
8
+ resourcesConfig: ResourceConfig[];
9
+ useHashUrl?: boolean;
10
+ urlPrefix?: string;
11
+ Layout?: React.FC<unknown>;
12
+ history: History;
13
+ globalStore: GlobalStore;
14
+ accessControlProvider?: AccessControlProvider;
15
+ routerProvider?: any;
16
+ };
17
+ export declare const Dovetail: React.FC<Props>;
18
+ 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,9 @@
1
+ /// <reference types="react" />
2
+ import { CronJobModel } from '../../models';
3
+ import { DropdownSize } from '../K8sDropdown';
4
+ type Props<Model extends CronJobModel> = {
5
+ record: Model;
6
+ size?: DropdownSize;
7
+ };
8
+ export declare function CronJobDropdown<Model extends CronJobModel>(props: Props<Model>): JSX.Element;
9
+ export {};
@@ -0,0 +1,8 @@
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
+ hideToolBar?: boolean;
8
+ }>;
@@ -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,9 @@
1
+ /// <reference types="react" />
2
+ import { ResourceModel } from '../../models';
3
+ import { ShowConfig } from '../ShowContent';
4
+ type Props<Model extends ResourceModel> = {
5
+ showConfig: ShowConfig<Model>;
6
+ formatter?: (r: Model) => Model;
7
+ };
8
+ export declare const DrawerShow: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export * from './DrawerShow';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ interface DurationTimeProps {
3
+ value: number;
4
+ }
5
+ declare function DurationTime(props: DurationTimeProps): JSX.Element;
6
+ export { DurationTime };
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const EditButton: React.FC;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface EditFieldModalProps {
3
+ title?: string;
4
+ submitting?: boolean;
5
+ errorMsgs?: string[];
6
+ formRef: React.MutableRefObject<{
7
+ submit: () => (Promise<unknown> | undefined);
8
+ } | null>;
9
+ renderContent: () => React.ReactNode;
10
+ }
11
+ export declare function EditFieldModal(props: EditFieldModalProps): JSX.Element;
12
+ export interface EditField {
13
+ modalProps: EditFieldModalProps;
14
+ }
15
+ export declare function EditField(props: EditField): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export declare const ErrorWrapper: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
+ export declare const ErrorContent: import("@linaria/react").StyledComponent<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
+ export declare enum ErrorContentType {
5
+ List = "list",
6
+ Card = "card",
7
+ Widget = "widget"
8
+ }
9
+ export type WidgetErrorContentProps = {
10
+ className?: string;
11
+ style?: React.CSSProperties;
12
+ errorText?: string;
13
+ type?: ErrorContentType;
14
+ refetch?: () => void;
15
+ };
16
+ declare const WidgetErrorContent: React.FunctionComponent<WidgetErrorContentProps>;
17
+ export default WidgetErrorContent;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type EventTableProps = {
3
+ uid: string;
4
+ };
5
+ export declare const EventsTable: React.FC<EventTableProps>;
6
+ export {};
@@ -0,0 +1 @@
1
+ export * from './EventsTable';
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { YamlFormProps } from './YamlForm';
3
+ export declare const FullscreenModalStyle: import("@linaria/core").LinariaClassName;
4
+ export type FormModalProps = {
5
+ resource?: string;
6
+ id?: string;
7
+ formProps?: YamlFormProps;
8
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
9
+ };
10
+ export declare function FormModal(props: FormModalProps): JSX.Element;
@@ -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,12 @@
1
+ /// <reference types="react" />
2
+ import { UseFormReturnType } from '@refinedev/react-hook-form';
3
+ import { ResourceModel } from '../../models';
4
+ import { ResourceConfig } from '../../types';
5
+ type Props<Model extends ResourceModel> = {
6
+ config?: ResourceConfig<Model>;
7
+ formResult: UseFormReturnType;
8
+ errorMsg?: string;
9
+ resourceId?: string;
10
+ };
11
+ export declare const RefineFormContent: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: Props<Model>) => JSX.Element;
12
+ export {};
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ResourceConfig } from '../../types';
3
+ type Props = {
4
+ config: ResourceConfig<any>;
5
+ };
6
+ export declare const RefineFormPage: (props: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,29 @@
1
+ /// <reference types="react" />
2
+ import { FormAction } from '@refinedev/core';
3
+ import { Unstructured } from 'k8s-api-provider';
4
+ import useYamlForm from './useYamlForm';
5
+ export declare enum SchemaStrategy {
6
+ Required = "Required",
7
+ Optional = "Optional",
8
+ None = "None"
9
+ }
10
+ export interface YamlFormProps {
11
+ id?: string;
12
+ action?: FormAction;
13
+ initialValues?: Record<string, unknown>;
14
+ schemaStrategy?: SchemaStrategy;
15
+ isShowLayout?: boolean;
16
+ useFormProps?: Parameters<typeof useYamlForm>[0];
17
+ transformInitValues?: (values: Unstructured) => Unstructured;
18
+ transformApplyValues?: (values: Unstructured) => Unstructured;
19
+ onSaveButtonPropsChange?: (saveButtonProps: {
20
+ disabled?: boolean;
21
+ onClick: () => void;
22
+ loading?: boolean | {
23
+ delay?: number | undefined;
24
+ };
25
+ }) => void;
26
+ onErrorsChange?: (errors: string[]) => void;
27
+ onFinish?: () => void;
28
+ }
29
+ export declare function YamlForm(props: YamlFormProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ export * from './FormModal';
2
+ export * from './RefineFormContent';
3
+ export * from './RefineFormPage';
4
+ export * from './YamlForm';
5
+ export * from './useRefineForm';
6
+ export * from './useYamlForm';
7
+ export * from './type';
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ export type RefineFormValidator = (value: unknown, formValue: unknown) => {
3
+ isValid: boolean;
4
+ errorMsg: string;
5
+ };
6
+ export type RefineFormField = {
7
+ path: string[];
8
+ key: string;
9
+ label: string;
10
+ placeholder?: string;
11
+ helperText?: string;
12
+ type?: 'number';
13
+ validators?: RefineFormValidator[];
14
+ disabledWhenEdit?: boolean;
15
+ render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create') => React.ReactElement;
16
+ };
@@ -0,0 +1,29 @@
1
+ import { BaseRecord, HttpError, UseFormProps as UseFormCoreProps, UseFormReturnType as UseFormReturnTypeCore } from '@refinedev/core';
2
+ import React from 'react';
3
+ import { UseFormProps as UseHookFormProps, UseFormReturn, FieldValues } from 'react-hook-form';
4
+ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturn<TVariables, TContext> & {
5
+ refineCore: UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
6
+ saveButtonProps: {
7
+ disabled: boolean;
8
+ onClick: (e: React.BaseSyntheticEvent) => void;
9
+ };
10
+ };
11
+ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = {
12
+ /**
13
+ * Configuration object for the core of the [useForm](/docs/api-reference/core/hooks/useForm/)
14
+ * @type [`UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>`](/docs/api-reference/core/hooks/useForm/#properties)
15
+ */
16
+ refineCoreProps?: UseFormCoreProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
17
+ /**
18
+ * When you have unsaved changes and try to leave the current page, **refine** shows a confirmation modal box.
19
+ * @default `false*`
20
+ */
21
+ warnWhenUnsavedChanges?: boolean;
22
+ /**
23
+ * Disables server-side validation
24
+ * @default false
25
+ * @see {@link https://refine.dev/docs/advanced-tutorials/forms/server-side-form-validation/}
26
+ */
27
+ disableServerSideValidation?: boolean;
28
+ } & UseHookFormProps<TVariables, TContext>;
29
+ export declare const useForm: <TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends FieldValues = FieldValues, TContext extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ refineCoreProps, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, disableServerSideValidation: disableServerSideValidationProp, ...rest }?: UseFormProps<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TContext, TData, TResponse, TResponseError>;
@@ -0,0 +1,10 @@
1
+ import { ResourceConfig } from '../../types';
2
+ import { UseFormProps } from './useReactHookForm';
3
+ export declare const useRefineForm: (props: {
4
+ config: ResourceConfig;
5
+ id?: string;
6
+ refineProps?: UseFormProps['refineCoreProps'];
7
+ }) => {
8
+ formResult: import("./useReactHookForm").UseFormReturnType<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, Record<string, unknown>, object, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError>;
9
+ responseErrorMsg: string;
10
+ };
@@ -0,0 +1,51 @@
1
+ import { HttpError, BaseRecord, UseFormReturnType as UseFormReturnTypeCore, UseFormProps as UseFormPropsCore, CreateResponse, UpdateResponse } from '@refinedev/core';
2
+ import { ButtonProps } from 'antd/lib/button';
3
+ import { FormInstance, FormProps } from 'antd/lib/form';
4
+ import { JSONSchema7 } from 'json-schema';
5
+ import { Unstructured } from 'k8s-api-provider';
6
+ import React from 'react';
7
+ import { type YamlEditorHandle, type YamlEditorProps } from 'src/components/YamlEditor';
8
+ type EditorProps = Omit<YamlEditorProps, 'schema'> & {
9
+ ref: React.RefObject<YamlEditorHandle>;
10
+ schema: JSONSchema7 | null;
11
+ };
12
+ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormPropsCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
13
+ submitOnEnter?: boolean;
14
+ /**
15
+ * Shows notification when unsaved changes exist
16
+ */
17
+ warnWhenUnsavedChanges?: boolean;
18
+ editorOptions?: {
19
+ isGenerateAnnotations?: boolean;
20
+ isSkipSchema?: boolean;
21
+ };
22
+ initialValuesForCreate?: Record<string, unknown>;
23
+ transformInitValues?: (values: Unstructured) => Unstructured;
24
+ transformApplyValues?: (values: Unstructured) => Unstructured;
25
+ };
26
+ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TError extends HttpError = HttpError, TVariables extends object = object, TData extends BaseRecord = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError> = UseFormReturnTypeCore<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError> & {
27
+ form: FormInstance;
28
+ formProps: Omit<FormProps, 'onFinish'> & {
29
+ onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void> | undefined;
30
+ };
31
+ saveButtonProps: ButtonProps & {
32
+ onClick: () => void;
33
+ };
34
+ editorProps: EditorProps;
35
+ schema: JSONSchema7 | null;
36
+ isLoadingSchema: boolean;
37
+ loadSchemaError: Error | null;
38
+ fetchSchema: () => void;
39
+ enableEditor: boolean;
40
+ errorResponseBody?: Record<string, unknown> | null;
41
+ switchEditor: () => void;
42
+ onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
43
+ };
44
+ declare const useYamlForm: <TQueryFnData extends Unstructured = Unstructured & {
45
+ id: string;
46
+ }, TError extends HttpError = HttpError, TVariables extends {
47
+ [prop: string]: unknown;
48
+ } = {
49
+ [prop: string]: unknown;
50
+ }, TData extends Unstructured = TQueryFnData, TResponse extends BaseRecord = TData, TResponseError extends HttpError = TError>({ action: actionFromProps, resource, onMutationSuccess: onMutationSuccessProp, onMutationError, submitOnEnter, warnWhenUnsavedChanges: warnWhenUnsavedChangesProp, redirect, successNotification, errorNotification, meta, metaData, queryMeta, mutationMeta, liveMode, liveParams, mutationMode, dataProviderName, onLiveEvent, invalidates, undoableTimeout, queryOptions, createMutationOptions, updateMutationOptions, id: idFromProps, overtimeOptions, editorOptions, initialValuesForCreate, transformInitValues, transformApplyValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
51
+ export default useYamlForm;
@@ -0,0 +1,5 @@
1
+ export interface FormWidgetProps<V> {
2
+ value?: V;
3
+ onChange?: (value: V) => void;
4
+ [prop: string]: unknown;
5
+ }
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ interface FormErrorAlertProps {
3
+ errorMsgs: string[];
4
+ style?: React.CSSProperties;
5
+ className?: string;
6
+ isEdit?: boolean;
7
+ }
8
+ export declare function FormErrorAlert(props: FormErrorAlertProps): JSX.Element | null;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ButtonProps } from '@cloudtower/eagle';
2
+ import React from 'react';
3
+ type FormLayoutProps = {
4
+ saveButtonProps?: ButtonProps;
5
+ };
6
+ declare function FormLayout(props: React.PropsWithChildren<FormLayoutProps>): JSX.Element;
7
+ export default FormLayout;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { YamlFormProps } from 'src/components/YamlForm';
3
+ export type FormModalProps = {
4
+ resource?: string;
5
+ id?: string;
6
+ formProps?: YamlFormProps;
7
+ renderForm?: (props: YamlFormProps) => React.ReactNode;
8
+ };
9
+ export declare function FormModal(props: FormModalProps): JSX.Element;
10
+ export default FormModal;
@@ -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,5 @@
1
+ import React from 'react';
2
+ export declare const ImageNames: React.FC<{
3
+ value: string[];
4
+ breakLine?: boolean;
5
+ }>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { IngressModel } from '../../models';
3
+ export declare const IngressRulesComponent: React.FC<{
4
+ ingress: IngressModel;
5
+ }>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { IngressModel } from '../../models';
3
+ type Props = {
4
+ ingress: IngressModel;
5
+ };
6
+ export declare const IngressRulesTable: React.FC<Props>;
7
+ export {};
@@ -0,0 +1 @@
1
+ export * from './IngressRulesTable';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { ResourceModel } from '../../models';
3
+ export type DropdownSize = 'normal' | 'large';
4
+ interface K8sDropdownProps {
5
+ record: ResourceModel;
6
+ size?: DropdownSize;
7
+ }
8
+ declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
9
+ export default K8sDropdown;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface KeyValueProps {
3
+ data: Record<string, string>;
4
+ empty?: string;
5
+ hideSecret?: boolean;
6
+ }
7
+ export declare const KeyValue: React.FC<KeyValueProps>;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface KeyValueDataProps {
3
+ data: Record<string, string>;
4
+ expandable?: boolean;
5
+ }
6
+ export declare function KeyValueAnnotation(props: KeyValueDataProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ export interface KeyValueSecretProps {
3
+ data: Record<string, string>;
4
+ }
5
+ export declare function KeyValueSecret(props: KeyValueSecretProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ export * from './KeyValue';
2
+ export * from './KeyValueAnnotation';
3
+ export * from './KeyValueSecret';
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export interface KeyValueDataProps {
3
+ datas: Record<string, string>;
4
+ expandable?: boolean;
5
+ }
6
+ export declare function KeyValueData(props: KeyValueDataProps): JSX.Element;
@@ -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,4 @@
1
+ /// <reference types="react" />
2
+ export declare function LinkFallback({ fullPath }: {
3
+ fullPath: string;
4
+ }): JSX.Element;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import { TableProps } from 'src/components/Table';
3
+ import { ResourceModel } from '../../models';
4
+ interface ListPageProps<T extends ResourceModel> {
5
+ selectedKeys: string[];
6
+ tableProps: TableProps<T>;
7
+ }
8
+ export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
9
+ export {};