@dovetail-v2/refine 0.3.12-alpha.0 → 0.3.12-alpha.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.
@@ -4,6 +4,7 @@ export type DropdownSize = 'normal' | 'large';
4
4
  interface K8sDropdownProps {
5
5
  record: ResourceModel;
6
6
  size?: DropdownSize;
7
+ customButton?: React.ReactNode;
7
8
  }
8
9
  export declare function K8sDropdown(props: React.PropsWithChildren<K8sDropdownProps>): JSX.Element;
9
10
  export default K8sDropdown;
@@ -4,7 +4,7 @@ type Props = {
4
4
  namespace: string;
5
5
  name: string;
6
6
  displayName?: string;
7
- uid?: string;
7
+ query?: Record<string, unknown>;
8
8
  };
9
9
  export declare const ResourceLink: React.FC<Props>;
10
10
  export {};
@@ -13,20 +13,13 @@ export type ShowContentViewProps<Model extends ResourceModel> = React.PropsWithC
13
13
  canCollapseTabs?: boolean;
14
14
  hideTopBar?: boolean;
15
15
  className?: string;
16
- size?: 'small' | 'medium';
17
16
  }>;
18
17
  type ShowGroupComponentProps = React.PropsWithChildren<{
19
18
  title: string;
20
19
  className?: string;
21
- size?: 'small' | 'medium';
22
20
  operationEle?: React.ReactElement | null;
23
- [key: string]: unknown;
24
21
  }>;
25
22
  export declare function ShowGroupWithTitleComponent(props: ShowGroupComponentProps): JSX.Element;
26
- type BasicShowGroupComponentProps = React.PropsWithChildren<{
27
- size?: 'small' | 'medium';
28
- [key: string]: unknown;
29
- }>;
30
- export declare function BasicShowGroupComponent(props: BasicShowGroupComponentProps): JSX.Element;
23
+ export declare function BasicShowGroupComponent(props: React.PropsWithChildren<unknown>): JSX.Element;
31
24
  export declare const ShowContentView: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(props: ShowContentViewProps<Model>) => JSX.Element | null;
32
25
  export {};
@@ -12,8 +12,8 @@ export type ShowField<Model extends ResourceModel> = {
12
12
  labelWidth?: string;
13
13
  col?: number;
14
14
  hidden?: boolean;
15
- render?: (val: unknown, record: Model, field: ShowField<Model>, size: 'small' | 'medium') => React.ReactNode | undefined;
16
- renderContent?: (val: unknown, record: Model, field: ShowField<Model>, size: 'small' | 'medium') => React.ReactNode | undefined;
15
+ render?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
16
+ renderContent?: (val: unknown, record: Model, field: ShowField<Model>) => React.ReactNode | undefined;
17
17
  };
18
18
  export declare enum AreaType {
19
19
  Inline = "Inline",
@@ -31,12 +31,12 @@ export type ShowTab<Model extends ResourceModel> = {
31
31
  title: string;
32
32
  key: string;
33
33
  groups: ShowGroup<Model>[];
34
- background?: 'white' | 'gray';
35
34
  };
36
35
  export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
37
36
  basicGroup?: ShowGroup<Model>;
38
37
  tabs?: ShowTab<Model>[];
39
38
  renderExtraButton?: (record: Model) => React.ReactNode;
39
+ renderCustomBackButton?: (record: Model) => React.ReactNode;
40
40
  resourceStateMap?: {
41
41
  color: Record<string, StatusCapsuleColor | 'loading'>;
42
42
  text: Record<string, string>;
@@ -57,9 +57,7 @@ export declare const ClusterIpField: <Model extends ServiceModel>(i18n: I18nType
57
57
  export declare const SessionAffinityField: <Model extends ServiceModel>(i18n: I18nType) => ShowField<Model>;
58
58
  export declare const ServicePodsField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
59
59
  export declare const IngressRulesTableTabField: <Model extends IngressModel>() => ShowField<Model>;
60
- export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>({ size, }: {
61
- size?: "small" | "medium" | undefined;
62
- }) => ShowField<Model>;
60
+ export declare const EventsTableTabField: <Model extends ResourceModel<Unstructured>>() => ShowField<Model>;
63
61
  export declare const NamespaceField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
64
62
  export declare const AgeField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
65
63
  export declare const LabelsField: <Model extends ResourceModel<Unstructured>>(i18n: I18nType) => ShowField<Model>;
@@ -85,4 +83,3 @@ export declare const IsDefaultSCField: <Model extends StorageClassModel>(i18n: I
85
83
  export declare const SCReclaimPolicyField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
86
84
  export declare const IsSCAllowVolumeExpansionField: <Model extends StorageClassModel>(i18n: I18nType) => ShowField<Model>;
87
85
  export declare const ResourceTableField: <Model extends ResourceModel<Unstructured>>(resource: string, useTableParams?: import("@refinedev/core").useTableProps<Model, import("@refinedev/core").HttpError, Model> | undefined) => ShowField<Model>;
88
- export declare const PodCountOfJobField: <Model extends JobModel>(i18n: I18nType) => ShowField<Model>;
@@ -1,16 +1,7 @@
1
1
  import { i18n as I18nType } from 'i18next';
2
2
  import { ResourceModel, PodModel } from 'src/models';
3
3
  import { ShowTab } from './fields';
4
- export declare const EventsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
5
- i18n: I18nType;
6
- size?: "small" | "medium" | undefined;
7
- }) => ShowTab<Model>;
8
- export declare const ConditionsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
9
- i18n: I18nType;
10
- size?: "small" | "medium" | undefined;
11
- }) => ShowTab<Model>;
12
- export declare const LabelAnnotationsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>({ i18n, size, }: {
13
- i18n: I18nType;
14
- size?: "small" | "medium" | undefined;
15
- }) => ShowTab<Model>;
4
+ export declare const EventsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTab<Model>;
5
+ export declare const ConditionsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTab<Model>;
6
+ export declare const LabelAnnotationsTab: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => ShowTab<Model>;
16
7
  export declare const PodLogTab: <Model extends PodModel>(i18n: I18nType, apiUrl: string) => ShowTab<Model>;
@@ -57,4 +57,3 @@ export * from './MatchLabelSelector';
57
57
  export * from './PortsConfigForm';
58
58
  export * from './SectionTitle';
59
59
  export * from './EditMetadataForm';
60
- export * from './LabelsAndAnnotationsShow';
@@ -17,7 +17,7 @@ export declare const AgeColumnRenderer: <Model extends ResourceModel<import("k8s
17
17
  isRelativeTime?: boolean | undefined;
18
18
  }) => Column<Model>;
19
19
  export declare const NodeNameColumnRenderer: <Model extends PodModel>(i18n: I18nType, options?: Partial<Column<Model>> | undefined) => Column<Model>;
20
- export declare const PodCountOfJobColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
20
+ export declare const CompletionsCountColumnRenderer: <Model extends JobModel>(i18n: I18nType) => Column<Model>;
21
21
  export declare const DurationColumnRenderer: <Model extends JobModel | CronJobModel>(i18n: I18nType) => Column<Model>;
22
22
  export declare const ServiceTypeColumnRenderer: <Model extends ResourceModel<import("k8s-api-provider").Unstructured>>(i18n: I18nType) => Column<Model>;
23
23
  export declare function ServiceInClusterAccessTitle(): JSX.Element;
package/dist/i18n.d.ts CHANGED
@@ -109,6 +109,7 @@ export declare const resources: {
109
109
  create_failed_tip: string;
110
110
  save_failed: string;
111
111
  save_failed_tip: string;
112
+ completion_num_tooltip: string;
112
113
  ready_num_tooltip: string;
113
114
  realtime_log: string;
114
115
  previous_log: string;
@@ -375,7 +376,7 @@ export declare const resources: {
375
376
  create_failed_tip: string;
376
377
  save_failed: string;
377
378
  save_failed_tip: string;
378
- job_pod_count_tooltip: string;
379
+ completion_num_tooltip: string;
379
380
  ready_num_tooltip: string;
380
381
  true: string;
381
382
  false: string;
@@ -106,6 +106,7 @@ declare const _default: {
106
106
  create_failed_tip: string;
107
107
  save_failed: string;
108
108
  save_failed_tip: string;
109
+ completion_num_tooltip: string;
109
110
  ready_num_tooltip: string;
110
111
  realtime_log: string;
111
112
  previous_log: string;
@@ -119,7 +119,7 @@ declare const _default: {
119
119
  create_failed_tip: string;
120
120
  save_failed: string;
121
121
  save_failed_tip: string;
122
- job_pod_count_tooltip: string;
122
+ completion_num_tooltip: string;
123
123
  ready_num_tooltip: string;
124
124
  true: string;
125
125
  false: string;
@@ -1,7 +1,6 @@
1
1
  import { GlobalStore, Unstructured } from 'k8s-api-provider';
2
2
  import { CronJob } from 'kubernetes-types/batch/v1';
3
3
  import { ResourceState } from '../constants';
4
- import { JobModel } from './job-model';
5
4
  import { WorkloadBaseModel } from './workload-base-model';
6
5
  type RequiredCronJob = Required<CronJob> & Unstructured;
7
6
  export declare class CronJobModel extends WorkloadBaseModel {
@@ -12,6 +11,5 @@ export declare class CronJobModel extends WorkloadBaseModel {
12
11
  get stateDisplay(): ResourceState.SUSPENDED | ResourceState.RUNNING;
13
12
  suspend(): RequiredCronJob;
14
13
  resume(): RequiredCronJob;
15
- getJobsCountDisplay(jobs: JobModel[]): string;
16
14
  }
17
15
  export {};
@@ -13,7 +13,6 @@ export declare class JobModel extends WorkloadBaseModel {
13
13
  private getRestarts;
14
14
  get duration(): number;
15
15
  get completionsDisplay(): string;
16
- get podCountDisplay(): string;
17
16
  get succeeded(): number;
18
17
  get completions(): number | undefined;
19
18
  get stateDisplay(): ResourceState.COMPLETED | ResourceState.ABNORMAL | ResourceState.SUSPENDED | ResourceState.RUNNING;