@dovetail-v2/refine 0.0.66-pod-exec.0 → 0.0.66-pod-exec.1

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 (253) hide show
  1. package/dist/{MonacoYamlDiffEditor-6b799b64.js → MonacoYamlDiffEditor-f07df2b6.js} +1 -1
  2. package/dist/{index-c07bed15.js → index-ea6dd427.js} +334 -168
  3. package/dist/refine.js +122 -115
  4. package/dist/refine.umd.cjs +221 -55
  5. package/lib/App.d.ts +2 -0
  6. package/lib/Dovetail.d.ts +18 -0
  7. package/lib/components/Breadcrumb/index.d.ts +5 -0
  8. package/lib/components/ConditionsTable/ConditionsTable.d.ts +7 -0
  9. package/lib/components/ConditionsTable/index.d.ts +1 -0
  10. package/lib/components/CreateButton/index.d.ts +1 -0
  11. package/lib/components/CronJobDropdown/index.d.ts +8 -0
  12. package/lib/components/CronjobJobsTable/index.d.ts +8 -0
  13. package/lib/components/DeleteButton/index.d.ts +2 -0
  14. package/lib/components/DeleteManyButton/index.d.ts +4 -0
  15. package/lib/components/DrawerShow/DrawerShow.d.ts +8 -0
  16. package/lib/components/DrawerShow/index.d.ts +1 -0
  17. package/lib/components/DurationTime/index.d.ts +5 -0
  18. package/lib/components/EditButton/index.d.ts +2 -0
  19. package/lib/components/EditField/index.d.ts +15 -0
  20. package/lib/components/ErrorContent/index.d.ts +17 -0
  21. package/lib/components/EventsTable/EventsTable.d.ts +6 -0
  22. package/lib/components/EventsTable/index.d.ts +1 -0
  23. package/lib/{src/components/FormModal/index.d.ts → components/Form/FormModal.d.ts} +2 -2
  24. package/lib/components/Form/RefineFormContent.d.ts +11 -0
  25. package/lib/components/Form/RefineFormPage.d.ts +6 -0
  26. package/lib/{src/components/YamlForm/index.d.ts → components/Form/YamlForm.d.ts} +9 -6
  27. package/lib/components/Form/index.d.ts +7 -0
  28. package/lib/components/Form/type.d.ts +17 -0
  29. package/lib/components/Form/useReactHookForm.d.ts +29 -0
  30. package/lib/components/Form/useRefineForm.d.ts +13 -0
  31. package/lib/{src/hooks/useEagleForm.d.ts → components/Form/useYamlForm.d.ts} +8 -5
  32. package/lib/components/FormErrorAlert/index.d.ts +9 -0
  33. package/lib/components/FormLayout/index.d.ts +7 -0
  34. package/lib/{src/components/Form → components/FormWidgets}/KeyValueListWidget.d.ts +0 -1
  35. package/lib/{src/components/Form → components/FormWidgets}/MetadataForm.d.ts +0 -1
  36. package/lib/{src/components/Form → components/FormWidgets}/NameInputWidget.d.ts +0 -1
  37. package/lib/{src/components/Form → components/FormWidgets}/NamespaceSelectWidget.d.ts +0 -1
  38. package/lib/components/FormWidgets/index.d.ts +4 -0
  39. package/lib/components/ImageNames/index.d.ts +5 -0
  40. package/lib/components/IngressRulesComponent/index.d.ts +5 -0
  41. package/lib/components/IngressRulesTable/IngressRulesTable.d.ts +7 -0
  42. package/lib/components/IngressRulesTable/index.d.ts +1 -0
  43. package/lib/components/K8sDropdown/index.d.ts +9 -0
  44. package/lib/components/KeyValue/KeyValue.d.ts +7 -0
  45. package/lib/components/KeyValue/KeyValueAnnotation.d.ts +5 -0
  46. package/lib/components/KeyValue/KeyValueSecret.d.ts +4 -0
  47. package/lib/components/KeyValue/index.d.ts +3 -0
  48. package/lib/components/Layout/index.d.ts +3 -0
  49. package/lib/components/LinkFallback/index.d.ts +3 -0
  50. package/lib/components/ListPage/index.d.ts +9 -0
  51. package/lib/components/Menu/index.d.ts +1 -0
  52. package/lib/components/NamespacesFilter/index.d.ts +11 -0
  53. package/lib/components/NetworkPolicyRulesViewer/index.d.ts +1 -0
  54. package/lib/components/PageShow/PageShow.d.ts +12 -0
  55. package/lib/components/PageShow/index.d.ts +1 -0
  56. package/lib/components/PodContainersTable/PodContainersTable.d.ts +8 -0
  57. package/lib/components/PodContainersTable/index.d.ts +1 -0
  58. package/lib/components/PodDropdown/index.d.ts +9 -0
  59. package/lib/components/PodLog/index.d.ts +6 -0
  60. package/lib/components/PodSelectorTable/index.d.ts +6 -0
  61. package/lib/components/PodShellModal/PodShell.d.ts +18 -0
  62. package/lib/components/PodShellModal/index.d.ts +9 -0
  63. package/lib/components/PortsTable/index.d.ts +7 -0
  64. package/lib/components/ReferenceLink/index.d.ts +8 -0
  65. package/lib/components/ReplicasDropdown/index.d.ts +9 -0
  66. package/lib/components/ResourceCRUD/ResourceCRUD.d.ts +7 -0
  67. package/lib/components/ResourceCRUD/create/index.d.ts +7 -0
  68. package/lib/components/ResourceCRUD/index.d.ts +4 -0
  69. package/lib/components/ResourceCRUD/list/index.d.ts +8 -0
  70. package/lib/components/ResourceCRUD/show/index.d.ts +8 -0
  71. package/lib/components/ResourceFiledDisplays.d.ts +6 -0
  72. package/lib/components/ResourceLink/index.d.ts +8 -0
  73. package/lib/components/ResourceSelect/index.d.ts +11 -0
  74. package/lib/components/ResourceUsageBar/index.d.ts +8 -0
  75. package/lib/components/Separator/index.d.ts +2 -0
  76. package/lib/components/ServiceComponents/index.d.ts +10 -0
  77. package/lib/components/Shell/index.d.ts +54 -0
  78. package/lib/components/ShowContent/ShowContent.d.ts +18 -0
  79. package/lib/components/ShowContent/fields.d.ts +68 -0
  80. package/lib/components/ShowContent/groups.d.ts +23 -0
  81. package/lib/components/ShowContent/index.d.ts +4 -0
  82. package/lib/components/ShowContent/tabs.d.ts +5 -0
  83. package/lib/components/StateTag/StateTag.d.ts +10 -0
  84. package/lib/components/StateTag/index.d.ts +1 -0
  85. package/lib/components/Table/TableToolBar.d.ts +8 -0
  86. package/lib/components/Table/TableWidgets.d.ts +6 -0
  87. package/lib/components/Table/index.d.ts +43 -0
  88. package/lib/components/Tabs/index.d.ts +10 -0
  89. package/lib/components/Tags/index.d.ts +6 -0
  90. package/lib/components/TextTags/index.d.ts +6 -0
  91. package/lib/components/Time/index.d.ts +8 -0
  92. package/lib/components/ValueDisplay/index.d.ts +9 -0
  93. package/lib/components/WorkloadDropdown/index.d.ts +9 -0
  94. package/lib/components/WorkloadPodsTable/WorkloadPodsTable.d.ts +9 -0
  95. package/lib/components/WorkloadPodsTable/index.d.ts +1 -0
  96. package/lib/components/WorkloadReplicas/index.d.ts +17 -0
  97. package/lib/components/YamlEditor/MonacoYamlDiffEditor.d.ts +9 -0
  98. package/lib/components/YamlEditor/MonacoYamlEditor.d.ts +19 -0
  99. package/lib/components/YamlEditor/YamlEditorComponent.d.ts +27 -0
  100. package/lib/components/YamlEditor/index.d.ts +1 -0
  101. package/lib/components/YamlEditor/style.d.ts +11 -0
  102. package/lib/components/YamlEditor/yaml.worker.d.ts +1 -0
  103. package/lib/components/index.d.ts +47 -0
  104. package/lib/constants/auth.d.ts +5 -0
  105. package/lib/constants/index.d.ts +3 -0
  106. package/lib/constants/k8s.d.ts +487 -0
  107. package/lib/constants/state.d.ts +15 -0
  108. package/lib/contexts/component.d.ts +7 -0
  109. package/lib/contexts/configs.d.ts +3 -0
  110. package/lib/contexts/global-store.d.ts +5 -0
  111. package/lib/contexts/index.d.ts +3 -0
  112. package/lib/hooks/index.d.ts +8 -0
  113. package/lib/hooks/useDeleteModal/index.d.ts +1 -0
  114. package/lib/hooks/useDeleteModal/useDeleteManyModal.d.ts +7 -0
  115. package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +7 -0
  116. package/lib/hooks/useDownloadYAML.d.ts +7 -0
  117. package/lib/hooks/useEagleTable/columns.d.ts +41 -0
  118. package/lib/hooks/useEagleTable/index.d.ts +2 -0
  119. package/lib/hooks/useEagleTable/useEagleTable.d.ts +55 -0
  120. package/lib/hooks/useEdit.d.ts +4 -0
  121. package/lib/hooks/useGlobalStore.d.ts +3 -0
  122. package/lib/hooks/useK8sYamlEditor.d.ts +5 -0
  123. package/lib/hooks/useOpenForm.d.ts +7 -0
  124. package/lib/hooks/useSchema.d.ts +14 -0
  125. package/lib/hooks/useSubmitForm.d.ts +14 -0
  126. package/lib/hooks/useTableData.d.ts +19 -0
  127. package/lib/i18n.d.ts +353 -0
  128. package/lib/index.d.ts +11 -0
  129. package/lib/locales/en-US/index.d.ts +175 -0
  130. package/lib/locales/index.d.ts +2 -0
  131. package/lib/locales/zh-CN/index.d.ts +175 -0
  132. package/lib/main.d.ts +3 -0
  133. package/lib/models/cronjob-model.d.ts +15 -0
  134. package/lib/models/daemonset-model.d.ts +15 -0
  135. package/lib/models/deployment-model.d.ts +13 -0
  136. package/lib/models/event-model.d.ts +7 -0
  137. package/lib/models/index.d.ts +19 -0
  138. package/lib/models/ingress-model.d.ts +20 -0
  139. package/lib/models/job-model.d.ts +20 -0
  140. package/lib/models/network-policy-model.d.ts +9 -0
  141. package/lib/models/node-model.d.ts +17 -0
  142. package/lib/models/persistent-volume-claim.d.ts +9 -0
  143. package/lib/models/persistent-volume.d.ts +9 -0
  144. package/lib/models/pod-metrics-model.d.ts +8 -0
  145. package/lib/models/pod-model.d.ts +20 -0
  146. package/lib/models/resource-model.d.ts +21 -0
  147. package/lib/models/service-model.d.ts +24 -0
  148. package/lib/models/statefulset-model.d.ts +13 -0
  149. package/lib/models/storage-class.d.ts +12 -0
  150. package/lib/models/types/index.d.ts +1 -0
  151. package/lib/{src → models}/types/metric.d.ts +2 -2
  152. package/lib/models/workload-base-model.d.ts +12 -0
  153. package/lib/models/workload-model.d.ts +18 -0
  154. package/lib/pages/configmaps/index.d.ts +4 -0
  155. package/lib/{src/pages/statefulsets → pages/cronjobs}/create/index.d.ts +1 -1
  156. package/lib/pages/cronjobs/index.d.ts +3 -0
  157. package/lib/{src/pages/statefulsets → pages/cronjobs}/list/index.d.ts +1 -1
  158. package/lib/{src/pages/statefulsets → pages/cronjobs}/show/index.d.ts +1 -1
  159. package/lib/pages/daemonsets/create/index.d.ts +3 -0
  160. package/lib/pages/daemonsets/index.d.ts +3 -0
  161. package/lib/{src/pages/storageclasses → pages/daemonsets}/list/index.d.ts +1 -1
  162. package/lib/{src/pages/storageclasses → pages/daemonsets}/show/index.d.ts +1 -1
  163. package/lib/pages/deployments/index.d.ts +2 -0
  164. package/lib/pages/deployments/list/index.d.ts +3 -0
  165. package/lib/pages/deployments/show/index.d.ts +3 -0
  166. package/lib/pages/ingresses/index.d.ts +4 -0
  167. package/lib/pages/jobs/index.d.ts +4 -0
  168. package/lib/pages/networkPolicies/index.d.ts +4 -0
  169. package/lib/pages/nodes/index.d.ts +2 -0
  170. package/lib/pages/nodes/list/index.d.ts +3 -0
  171. package/lib/pages/nodes/show/index.d.ts +3 -0
  172. package/lib/pages/persistentvolumeclaims/index.d.ts +4 -0
  173. package/lib/pages/persistentvolumes/index.d.ts +4 -0
  174. package/lib/pages/pods/create/index.d.ts +3 -0
  175. package/lib/pages/pods/index.d.ts +3 -0
  176. package/lib/pages/pods/list/index.d.ts +3 -0
  177. package/lib/pages/pods/show/index.d.ts +3 -0
  178. package/lib/pages/secrets/index.d.ts +4 -0
  179. package/lib/pages/services/index.d.ts +4 -0
  180. package/lib/pages/statefulsets/index.d.ts +4 -0
  181. package/lib/pages/storageclasses/form/index.d.ts +9 -0
  182. package/lib/pages/storageclasses/index.d.ts +44 -0
  183. package/lib/plugins/index.d.ts +4 -0
  184. package/lib/plugins/model-plugin.d.ts +13 -0
  185. package/lib/plugins/relation-plugin.d.ts +26 -0
  186. package/lib/plugins/type.d.ts +8 -0
  187. package/lib/providers/index.d.ts +1 -0
  188. package/lib/providers/router-provider/index.d.ts +21 -0
  189. package/lib/src/components/ListPage/index.d.ts +1 -0
  190. package/lib/src/components/ResourceFiledDisplays.d.ts +7 -0
  191. package/lib/src/components/Shell/index.d.ts +4 -0
  192. package/lib/src/components/ShowContent/fields.d.ts +7 -2
  193. package/lib/src/components/index.d.ts +1 -0
  194. package/lib/src/hooks/useEagleTable/columns.d.ts +6 -6
  195. package/lib/src/i18n.d.ts +26 -1
  196. package/lib/src/locales/en-US/index.d.ts +14 -0
  197. package/lib/src/locales/zh-CN/index.d.ts +12 -1
  198. package/lib/src/models/cronjob-model.d.ts +0 -1
  199. package/lib/src/models/daemonset-model.d.ts +0 -1
  200. package/lib/src/models/deployment-model.d.ts +0 -1
  201. package/lib/src/models/event-model.d.ts +0 -1
  202. package/lib/src/models/ingress-model.d.ts +0 -1
  203. package/lib/src/models/job-model.d.ts +0 -1
  204. package/lib/src/models/network-policy-model.d.ts +0 -1
  205. package/lib/src/models/node-model.d.ts +0 -1
  206. package/lib/src/models/persistent-volume-claim.d.ts +0 -1
  207. package/lib/src/models/persistent-volume.d.ts +0 -1
  208. package/lib/src/models/pod-metrics-model.d.ts +0 -1
  209. package/lib/src/models/pod-model.d.ts +0 -1
  210. package/lib/src/models/resource-model.d.ts +1 -1
  211. package/lib/src/models/service-model.d.ts +0 -1
  212. package/lib/src/models/statefulset-model.d.ts +0 -1
  213. package/lib/src/models/storage-class.d.ts +0 -1
  214. package/lib/src/models/workload-base-model.d.ts +0 -1
  215. package/lib/src/models/workload-model.d.ts +0 -1
  216. package/lib/src/pages/persistentvolumeclaims/index.d.ts +4 -0
  217. package/lib/src/pages/persistentvolumes/index.d.ts +3 -18
  218. package/lib/types/index.d.ts +1 -0
  219. package/lib/types/resource.d.ts +62 -0
  220. package/lib/utils/addId.d.ts +3 -0
  221. package/lib/utils/download.d.ts +1 -0
  222. package/lib/utils/error.d.ts +20 -0
  223. package/lib/utils/form.d.ts +3 -0
  224. package/lib/utils/k8s.d.ts +3 -0
  225. package/lib/utils/labels.d.ts +9 -0
  226. package/lib/utils/match-selector.d.ts +3 -0
  227. package/lib/utils/openapi.d.ts +45 -0
  228. package/lib/utils/schema.d.ts +17 -0
  229. package/lib/utils/selector.d.ts +3 -0
  230. package/lib/utils/shell.d.ts +15 -0
  231. package/lib/utils/string.d.ts +1 -0
  232. package/lib/utils/time.d.ts +13 -0
  233. package/lib/utils/unit.d.ts +12 -0
  234. package/lib/utils/yaml.d.ts +2 -0
  235. package/package.json +5 -5
  236. package/lib/src/components/KeyValueData/index.d.ts +0 -6
  237. package/lib/src/components/ModalContextProvider/index.d.ts +0 -12
  238. package/lib/src/components/NetworkPolicyRulesTable/index.d.ts +0 -1
  239. package/lib/src/components/Shell/zmodem/index.d.ts +0 -51
  240. package/lib/src/components/Table/ErrorContent.d.ts +0 -10
  241. package/lib/src/hooks/useModal.d.ts +0 -0
  242. package/lib/src/model/cronjob-model.d.ts +0 -9
  243. package/lib/src/model/index.d.ts +0 -6
  244. package/lib/src/model/job-model.d.ts +0 -10
  245. package/lib/src/model/pod-metrics-model.d.ts +0 -7
  246. package/lib/src/model/pod-model.d.ts +0 -15
  247. package/lib/src/model/resource-model.d.ts +0 -17
  248. package/lib/src/model/workload-model.d.ts +0 -17
  249. package/lib/src/pages/deployments/create/index.d.ts +0 -3
  250. package/lib/src/pages/nodes/hooks/useNodeMetrics.d.ts +0 -17
  251. /package/lib/{src/components/Form → components/FormWidgets}/widget.d.ts +0 -0
  252. /package/lib/{src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.d.ts → components/NetworkPolicyRulesViewer/NetworkPolicyRulesViewer.d.ts} +0 -0
  253. /package/lib/{src/hooks/useNamespaceFilter.d.ts → hooks/useNamespaceRefineFilter.d.ts} +0 -0
@@ -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';
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
- import { YamlFormProps } from 'src/components/YamlForm';
2
+ import { YamlFormProps } from './YamlForm';
3
+ export declare const FullscreenModalStyle: import("@linaria/core").LinariaClassName;
3
4
  export type FormModalProps = {
4
5
  resource?: string;
5
6
  id?: string;
@@ -7,4 +8,3 @@ export type FormModalProps = {
7
8
  renderForm?: (props: YamlFormProps) => React.ReactNode;
8
9
  };
9
10
  export declare function FormModal(props: FormModalProps): JSX.Element;
10
- export default FormModal;
@@ -0,0 +1,11 @@
1
+ import { UseFormReturnType } from '@refinedev/react-hook-form';
2
+ import { ResourceModel } from '../../models';
3
+ import { ResourceConfig } from '../../types';
4
+ type Props<Model extends ResourceModel> = {
5
+ config?: ResourceConfig<Model>;
6
+ formResult: UseFormReturnType;
7
+ errorMsg?: string;
8
+ resourceId?: string;
9
+ };
10
+ export declare const RefineFormContent: <Model extends ResourceModel>(props: Props<Model>) => JSX.Element;
11
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ResourceConfig } from '../../types';
2
+ type Props = {
3
+ config: ResourceConfig<any>;
4
+ };
5
+ export declare const RefineFormPage: (props: Props) => JSX.Element;
6
+ export {};
@@ -1,6 +1,6 @@
1
- /// <reference types="react" />
2
1
  import { FormAction } from '@refinedev/core';
3
- import useEagleForm from 'src/hooks/useEagleForm';
2
+ import { Unstructured } from 'k8s-api-provider';
3
+ import useYamlForm from './useYamlForm';
4
4
  export declare enum SchemaStrategy {
5
5
  Required = "Required",
6
6
  Optional = "Optional",
@@ -10,16 +10,19 @@ export interface YamlFormProps {
10
10
  id?: string;
11
11
  action?: FormAction;
12
12
  initialValues?: Record<string, unknown>;
13
- transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
14
13
  schemaStrategy?: SchemaStrategy;
15
14
  isShowLayout?: boolean;
16
- useFormProps?: Parameters<typeof useEagleForm>[0];
15
+ useFormProps?: Parameters<typeof useYamlForm>[0];
16
+ transformInitValues?: (values: Unstructured) => Unstructured;
17
+ transformApplyValues?: (values: Unstructured) => Unstructured;
17
18
  onSaveButtonPropsChange?: (saveButtonProps: {
18
19
  disabled?: boolean;
19
20
  onClick: () => void;
21
+ loading?: boolean | {
22
+ delay?: number | undefined;
23
+ };
20
24
  }) => void;
21
25
  onErrorsChange?: (errors: string[]) => void;
22
26
  onFinish?: () => void;
23
27
  }
24
- declare function YamlForm(props: YamlFormProps): JSX.Element;
25
- export default YamlForm;
28
+ 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,17 @@
1
+ import React from 'react';
2
+ import { Control } from 'react-hook-form';
3
+ export type RefineFormValidator = (value: unknown, formValue: unknown) => {
4
+ isValid: boolean;
5
+ errorMsg: string;
6
+ };
7
+ export type RefineFormField = {
8
+ path: string[];
9
+ key: string;
10
+ label: string;
11
+ placeholder?: string;
12
+ helperText?: React.ReactNode;
13
+ type?: 'number';
14
+ validators?: RefineFormValidator[];
15
+ disabledWhenEdit?: boolean;
16
+ render?: (value: unknown, onChange: (event: unknown) => void, formValue: unknown, onBlur: () => void, action: 'edit' | 'create', control: Control) => React.ReactElement;
17
+ };
@@ -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,13 @@
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
+ useFormProps?: UseFormProps;
8
+ }) => {
9
+ formResult: import("./useReactHookForm").UseFormReturnType<import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError, {
10
+ [x: string]: any;
11
+ }, {}, import("@refinedev/core").BaseRecord, import("@refinedev/core").BaseRecord, import("@refinedev/core").HttpError>;
12
+ responseErrorMsg: string;
13
+ };
@@ -20,11 +20,14 @@ export type UseFormProps<TQueryFnData extends BaseRecord = BaseRecord, TError ex
20
20
  isSkipSchema?: boolean;
21
21
  };
22
22
  initialValuesForCreate?: Record<string, unknown>;
23
- transformValues?: (values: Record<string, unknown>) => Record<string, unknown>;
23
+ transformInitValues?: (values: Unstructured) => Unstructured;
24
+ transformApplyValues?: (values: Unstructured) => Unstructured;
24
25
  };
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> & {
26
27
  form: FormInstance;
27
- formProps: FormProps;
28
+ formProps: Omit<FormProps, 'onFinish'> & {
29
+ onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void> | undefined;
30
+ };
28
31
  saveButtonProps: ButtonProps & {
29
32
  onClick: () => void;
30
33
  };
@@ -38,11 +41,11 @@ export type UseFormReturnType<TQueryFnData extends BaseRecord = BaseRecord, TErr
38
41
  switchEditor: () => void;
39
42
  onFinish: (values?: TVariables) => Promise<CreateResponse<TResponse> | UpdateResponse<TResponse> | void>;
40
43
  };
41
- declare const useEagleForm: <TQueryFnData extends Unstructured = Unstructured & {
44
+ declare const useYamlForm: <TQueryFnData extends Unstructured = Unstructured & {
42
45
  id: string;
43
46
  }, TError extends HttpError = HttpError, TVariables extends {
44
47
  [prop: string]: unknown;
45
48
  } = {
46
49
  [prop: string]: unknown;
47
- }, 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, transformValues, }?: UseFormProps<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>) => UseFormReturnType<TQueryFnData, TError, TVariables, TData, TResponse, TResponseError>;
48
- export default useEagleForm;
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,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;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormWidgetProps } from './widget';
3
2
  export type KeyValueListWidgetProps = FormWidgetProps<Record<string, string>> & {
4
3
  disabled?: boolean;
@@ -1,2 +1 @@
1
- /// <reference types="react" />
2
1
  export declare function MetadataForm(): JSX.Element;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import { AntdInputProps } from '@cloudtower/eagle';
3
2
  export declare function NameInputWidget(props: AntdInputProps): JSX.Element;
4
3
  export declare const dnsSubDomainRules: ({
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { FormWidgetProps } from './widget';
3
2
  type NamespaceSelectProps = FormWidgetProps<string | string[]>;
4
3
  export declare function NamespaceSelectWidget(props: NamespaceSelectProps): JSX.Element;
@@ -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
+ 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
+ export 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,5 @@
1
+ export interface KeyValueDataProps {
2
+ data: Record<string, string>;
3
+ expandable?: boolean;
4
+ }
5
+ export declare function KeyValueAnnotation(props: KeyValueDataProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface KeyValueSecretProps {
2
+ data: Record<string, string>;
3
+ }
4
+ 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,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,3 @@
1
+ export declare function LinkFallback({ fullPath }: {
2
+ fullPath: string;
3
+ }): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { TableProps } from 'src/components/Table';
2
+ import { ResourceModel } from '../../models';
3
+ interface ListPageProps<T extends ResourceModel> {
4
+ selectedKeys: string[];
5
+ tableProps: TableProps<T>;
6
+ contentClassName?: string;
7
+ }
8
+ export declare function ListPage<T extends ResourceModel>(props: ListPageProps<T>): JSX.Element;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare const Menu: () => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ export declare const NS_STORE_KEY = "namespace-filter";
3
+ export declare const ALL_NS = "_all";
4
+ export declare const useNamespacesFilter: () => {
5
+ value: string[];
6
+ };
7
+ interface NamespaceFilterProps {
8
+ className?: string;
9
+ }
10
+ export declare const NamespacesFilter: React.FC<NamespaceFilterProps>;
11
+ export {};
@@ -0,0 +1 @@
1
+ export * from './NetworkPolicyRulesViewer';
@@ -0,0 +1,12 @@
1
+ import React from '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
+ Dropdown?: React.FC<{
8
+ record: Model;
9
+ }>;
10
+ };
11
+ export declare const PageShow: <Model extends ResourceModel>(props: Props<Model>) => JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from './PageShow';
@@ -0,0 +1,8 @@
1
+ import { ContainerStatus } from 'kubernetes-types/core/v1';
2
+ import React from 'react';
3
+ type Props = {
4
+ containerStatuses: ContainerStatus[];
5
+ initContainerStatuses: ContainerStatus[];
6
+ };
7
+ export declare const PodContainersTable: React.FC<Props>;
8
+ export {};
@@ -0,0 +1 @@
1
+ export * from './PodContainersTable';
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { PodModel } from '../../models';
3
+ import { DropdownSize } from '../K8sDropdown';
4
+ type Props<Model extends PodModel> = {
5
+ record: Model;
6
+ size?: DropdownSize;
7
+ };
8
+ export declare function PodDropdown<Model extends PodModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
9
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import '@patternfly/react-core/dist/styles/base-no-reset.css';
3
+ import { PodModel } from '../../models';
4
+ export declare const PodLog: React.FC<{
5
+ pod: PodModel;
6
+ }>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ podSelectors: Record<string, string>;
4
+ };
5
+ export declare const PodSelectorTable: React.FC<Props>;
6
+ export {};
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ import { SocketStatus } from 'src/components/Shell';
3
+ import '@xterm/xterm/css/xterm.css';
4
+ import { PodModel } from 'src/models/pod-model';
5
+ export declare enum OS {
6
+ Linux = "linux",
7
+ Windows = "windows"
8
+ }
9
+ interface PodShellProps {
10
+ pod: PodModel;
11
+ basePath: string;
12
+ onSocketStatusChange?: (socketStatus: SocketStatus) => void;
13
+ }
14
+ interface PodShellHandler {
15
+ getAllTerminalContents: () => string[];
16
+ }
17
+ export declare const PodShell: React.ForwardRefExoticComponent<PodShellProps & React.RefAttributes<PodShellHandler>>;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { SocketStatus } from 'src/components/Shell';
2
+ import { PodModel } from 'src/models';
3
+ import { PodShell } from './PodShell';
4
+ interface PodShellModalProps {
5
+ pod: PodModel;
6
+ onSocketStatusChange?: (socketStatus: SocketStatus) => void;
7
+ }
8
+ export declare function PodShellModal(props: PodShellModalProps): JSX.Element;
9
+ export { PodShell };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { ServiceModel } from 'src/models/service-model';
3
+ type Props = {
4
+ service: ServiceModel;
5
+ };
6
+ export declare const PortsTable: React.FC<Props>;
7
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { OwnerReference } from 'kubernetes-types/meta/v1';
2
+ import React from 'react';
3
+ type Props = {
4
+ ownerReference: OwnerReference;
5
+ namespace: string;
6
+ };
7
+ export declare const ReferenceLink: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { WorkloadModel } from '../../models';
3
+ import { DropdownSize } from '../K8sDropdown';
4
+ type Props<Model extends WorkloadModel> = {
5
+ record: Model;
6
+ size?: DropdownSize;
7
+ };
8
+ export declare function ReplicasDropdown<Model extends WorkloadModel>(props: React.PropsWithChildren<Props<Model>>): JSX.Element;
9
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ResourceConfig } from '../../types';
2
+ type Props = {
3
+ configs: ResourceConfig[];
4
+ urlPrefix?: string;
5
+ };
6
+ export declare function ResourceCRUD(props: Props): JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ResourceModel } from '../../../models';
2
+ import { ResourceConfig } from '../../../types';
3
+ type Props<Model extends ResourceModel> = {
4
+ config: ResourceConfig<Model>;
5
+ };
6
+ export declare function ResourceForm<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
7
+ export {};
@@ -0,0 +1,4 @@
1
+ export * from './list';
2
+ export * from './show';
3
+ export * from './create';
4
+ export * from './ResourceCRUD';
@@ -0,0 +1,8 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import { ResourceModel } from '../../../models';
3
+ import { ResourceConfig } from '../../../types';
4
+ type Props<Model extends ResourceModel> = IResourceComponentsProps & {
5
+ config: ResourceConfig<Model>;
6
+ };
7
+ export declare function ResourceList<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
8
+ export {};
@@ -0,0 +1,8 @@
1
+ import { IResourceComponentsProps } from '@refinedev/core';
2
+ import { ResourceModel } from '../../../models';
3
+ import { ResourceConfig } from '../../../types';
4
+ type Props<Model extends ResourceModel> = IResourceComponentsProps & {
5
+ config: ResourceConfig<Model>;
6
+ };
7
+ export declare function ResourceShow<Model extends ResourceModel>(props: Props<Model>): JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ value: string;
3
+ }
4
+ export declare function PVPhaseDisplay(props: Props): JSX.Element;
5
+ export declare function PVVolumeModeDisplay(props: Props): JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ resourceName: string;
4
+ namespace: string;
5
+ resourceId: string;
6
+ };
7
+ export declare const ResourceLink: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,11 @@
1
+ import { KitSelectProps } from '@cloudtower/eagle';
2
+ type ResourceSelectProps = {
3
+ resource: string;
4
+ resourceBasePath: string;
5
+ kind: string;
6
+ value: string;
7
+ onChange: (...params: unknown[]) => void;
8
+ selectProps?: KitSelectProps;
9
+ };
10
+ export declare function ResourceSelect(props: ResourceSelectProps): JSX.Element;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ usage: string;
4
+ requestNum: number;
5
+ limitNum: number;
6
+ };
7
+ export declare const ResourceUsageBar: React.FC<Props>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const Separator: React.FC;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { ServiceModel } from '../../models';
3
+ type Props = {
4
+ service: ServiceModel;
5
+ };
6
+ export declare const ServiceInClusterAccessComponent: React.FC<Props>;
7
+ export declare const ServiceOutClusterAccessComponent: React.FC<Props & {
8
+ breakLine?: boolean;
9
+ }>;
10
+ export {};