@dovetail-v2/refine 0.2.0 → 0.2.2-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.
package/dist/style.css CHANGED
@@ -45,92 +45,6 @@
45
45
  /* box shadow */
46
46
  /* fisheye */
47
47
  /* z-index */
48
- .fq4465w.ant-modal.fullscreen .ant-modal-header {
49
- padding: 60px 0 32px 0;
50
- max-width: var(--max-modal-width, 1024px);
51
- width: 100%;
52
- margin: auto;
53
- }
54
- .fq4465w.ant-modal.fullscreen .ant-modal-body {
55
- padding: 0 4px;
56
- max-width: var(--max-modal-width, 1024px);
57
- width: 100%;
58
- margin: auto;
59
- }
60
- .fq4465w.ant-modal.fullscreen .ant-modal-footer .footer-content {
61
- padding: 0;
62
- max-width: var(--max-modal-width, 1024px);
63
- width: 100%;
64
- margin: auto;
65
- }
66
-
67
- .s1nc293e.ant-modal.normal-modal .ant-modal-content {
68
- width: 492px;
69
- border-radius: 16px;
70
- }
71
- .s1nc293e.ant-modal.normal-modal .ant-modal-body {
72
- padding: 32px 40px;
73
- min-height: 160px;
74
- overflow-x: hidden;
75
- }
76
- .s1nc293e.ant-modal.normal-modal .ant-modal-header {
77
- border-radius: 16px 16px 0 0;
78
- padding: 32px 40px;
79
- padding-bottom: 0;
80
- }
81
- .s1nc293e.ant-modal.normal-modal .ant-modal-footer {
82
- padding: 24px 40px;
83
- }
84
- .s1nc293e.ant-modal.normal-modal .ant-modal-close-x {
85
- top: 35px;
86
- right: 40px;
87
- }/* // basic */
88
- /* FishEye Color Variables and Functions */
89
- /*
90
- --------------------------- Primary Color ---------------------------
91
- */
92
- /*
93
- ---------------------------When necessary to add at any time---------------------------
94
- */
95
- /* computed */
96
- /* blue */
97
- /* green */
98
- /* yellow */
99
- /* red */
100
- /* purple */
101
- /* palette global token*/
102
- /* color opaque */
103
- /* color transparent */
104
- /* blue transparent */
105
- /* green transparent */
106
- /* yellow transparent */
107
- /* red transparent */
108
- /* gray transparent */
109
- /* white transparent */
110
- /* gradient opaque */
111
- /* blue radial gradient */
112
- /* blue linear gradient */
113
- /* green radial gradient */
114
- /* yellow radial gradient */
115
- /* red radial gradient */
116
- /* gray radial gradient */
117
- /* white to gray radial gradient */
118
- /* white to gray linear gradient */
119
- /* gradient transparent */
120
- /* secondary palette */
121
- /* purple radial gradient */
122
- /* refine alias color */
123
- /* text */
124
- /* link */
125
- /* fill */
126
- /* fill element */
127
- /* fill interaction */
128
- /* stroke */
129
- /* background */
130
- /* dim */
131
- /* box shadow */
132
- /* fisheye */
133
- /* z-index */
134
48
  .s82411.ant-tag {
135
49
  padding: 3px 16px;
136
50
  height: 24px;
@@ -195,169 +109,6 @@
195
109
  /* box shadow */
196
110
  /* fisheye */
197
111
  /* z-index */
198
- .t1vq0ett {
199
- margin-bottom: 4px;
200
- }
201
-
202
- .t139onst {
203
- color: rgba(44, 56, 82, 0.6);
204
- }/* // basic */
205
- /* FishEye Color Variables and Functions */
206
- /*
207
- --------------------------- Primary Color ---------------------------
208
- */
209
- /*
210
- ---------------------------When necessary to add at any time---------------------------
211
- */
212
- /* computed */
213
- /* blue */
214
- /* green */
215
- /* yellow */
216
- /* red */
217
- /* purple */
218
- /* palette global token*/
219
- /* color opaque */
220
- /* color transparent */
221
- /* blue transparent */
222
- /* green transparent */
223
- /* yellow transparent */
224
- /* red transparent */
225
- /* gray transparent */
226
- /* white transparent */
227
- /* gradient opaque */
228
- /* blue radial gradient */
229
- /* blue linear gradient */
230
- /* green radial gradient */
231
- /* yellow radial gradient */
232
- /* red radial gradient */
233
- /* gray radial gradient */
234
- /* white to gray radial gradient */
235
- /* white to gray linear gradient */
236
- /* gradient transparent */
237
- /* secondary palette */
238
- /* purple radial gradient */
239
- /* refine alias color */
240
- /* text */
241
- /* link */
242
- /* fill */
243
- /* fill element */
244
- /* fill interaction */
245
- /* stroke */
246
- /* background */
247
- /* dim */
248
- /* box shadow */
249
- /* fisheye */
250
- /* z-index */
251
- .wwyz7ti.ant-btn.ant-btn.ant-btn-primary {
252
- background-color: #fea008;
253
- }
254
- .wwyz7ti.ant-btn.ant-btn.ant-btn-primary:hover {
255
- background-color: #feba33;
256
- }
257
-
258
- .c1xsou5f.ant-btn {
259
- border-radius: 6px;
260
- border: 1px solid rgba(172, 186, 211, 0.6) !important;
261
- }/* // basic */
262
- /* FishEye Color Variables and Functions */
263
- /*
264
- --------------------------- Primary Color ---------------------------
265
- */
266
- /*
267
- ---------------------------When necessary to add at any time---------------------------
268
- */
269
- /* computed */
270
- /* blue */
271
- /* green */
272
- /* yellow */
273
- /* red */
274
- /* purple */
275
- /* palette global token*/
276
- /* color opaque */
277
- /* color transparent */
278
- /* blue transparent */
279
- /* green transparent */
280
- /* yellow transparent */
281
- /* red transparent */
282
- /* gray transparent */
283
- /* white transparent */
284
- /* gradient opaque */
285
- /* blue radial gradient */
286
- /* blue linear gradient */
287
- /* green radial gradient */
288
- /* yellow radial gradient */
289
- /* red radial gradient */
290
- /* gray radial gradient */
291
- /* white to gray radial gradient */
292
- /* white to gray linear gradient */
293
- /* gradient transparent */
294
- /* secondary palette */
295
- /* purple radial gradient */
296
- /* refine alias color */
297
- /* text */
298
- /* link */
299
- /* fill */
300
- /* fill element */
301
- /* fill interaction */
302
- /* stroke */
303
- /* background */
304
- /* dim */
305
- /* box shadow */
306
- /* fisheye */
307
- /* z-index */
308
- .t56wb76 {
309
- margin-bottom: 4px;
310
- }
311
-
312
- .tnei7dl {
313
- color: rgba(44, 56, 82, 0.6);
314
- }/* // basic */
315
- /* FishEye Color Variables and Functions */
316
- /*
317
- --------------------------- Primary Color ---------------------------
318
- */
319
- /*
320
- ---------------------------When necessary to add at any time---------------------------
321
- */
322
- /* computed */
323
- /* blue */
324
- /* green */
325
- /* yellow */
326
- /* red */
327
- /* purple */
328
- /* palette global token*/
329
- /* color opaque */
330
- /* color transparent */
331
- /* blue transparent */
332
- /* green transparent */
333
- /* yellow transparent */
334
- /* red transparent */
335
- /* gray transparent */
336
- /* white transparent */
337
- /* gradient opaque */
338
- /* blue radial gradient */
339
- /* blue linear gradient */
340
- /* green radial gradient */
341
- /* yellow radial gradient */
342
- /* red radial gradient */
343
- /* gray radial gradient */
344
- /* white to gray radial gradient */
345
- /* white to gray linear gradient */
346
- /* gradient transparent */
347
- /* secondary palette */
348
- /* purple radial gradient */
349
- /* refine alias color */
350
- /* text */
351
- /* link */
352
- /* fill */
353
- /* fill element */
354
- /* fill interaction */
355
- /* stroke */
356
- /* background */
357
- /* dim */
358
- /* box shadow */
359
- /* fisheye */
360
- /* z-index */
361
112
  .e5223w8.empty-text {
362
113
  color: rgba(0, 21, 64, 0.3);
363
114
  }
@@ -673,6 +424,92 @@
673
424
  /* box shadow */
674
425
  /* fisheye */
675
426
  /* z-index */
427
+ .fq4465w.ant-modal.fullscreen .ant-modal-header {
428
+ padding: 60px 0 32px 0;
429
+ max-width: var(--max-modal-width, 1024px);
430
+ width: 100%;
431
+ margin: auto;
432
+ }
433
+ .fq4465w.ant-modal.fullscreen .ant-modal-body {
434
+ padding: 0 4px;
435
+ max-width: var(--max-modal-width, 1024px);
436
+ width: 100%;
437
+ margin: auto;
438
+ }
439
+ .fq4465w.ant-modal.fullscreen .ant-modal-footer .footer-content {
440
+ padding: 0;
441
+ max-width: var(--max-modal-width, 1024px);
442
+ width: 100%;
443
+ margin: auto;
444
+ }
445
+
446
+ .s1nc293e.ant-modal.normal-modal .ant-modal-content {
447
+ width: 492px;
448
+ border-radius: 16px;
449
+ }
450
+ .s1nc293e.ant-modal.normal-modal .ant-modal-body {
451
+ padding: 32px 40px;
452
+ min-height: 160px;
453
+ overflow-x: hidden;
454
+ }
455
+ .s1nc293e.ant-modal.normal-modal .ant-modal-header {
456
+ border-radius: 16px 16px 0 0;
457
+ padding: 32px 40px;
458
+ padding-bottom: 0;
459
+ }
460
+ .s1nc293e.ant-modal.normal-modal .ant-modal-footer {
461
+ padding: 24px 40px;
462
+ }
463
+ .s1nc293e.ant-modal.normal-modal .ant-modal-close-x {
464
+ top: 35px;
465
+ right: 40px;
466
+ }/* // basic */
467
+ /* FishEye Color Variables and Functions */
468
+ /*
469
+ --------------------------- Primary Color ---------------------------
470
+ */
471
+ /*
472
+ ---------------------------When necessary to add at any time---------------------------
473
+ */
474
+ /* computed */
475
+ /* blue */
476
+ /* green */
477
+ /* yellow */
478
+ /* red */
479
+ /* purple */
480
+ /* palette global token*/
481
+ /* color opaque */
482
+ /* color transparent */
483
+ /* blue transparent */
484
+ /* green transparent */
485
+ /* yellow transparent */
486
+ /* red transparent */
487
+ /* gray transparent */
488
+ /* white transparent */
489
+ /* gradient opaque */
490
+ /* blue radial gradient */
491
+ /* blue linear gradient */
492
+ /* green radial gradient */
493
+ /* yellow radial gradient */
494
+ /* red radial gradient */
495
+ /* gray radial gradient */
496
+ /* white to gray radial gradient */
497
+ /* white to gray linear gradient */
498
+ /* gradient transparent */
499
+ /* secondary palette */
500
+ /* purple radial gradient */
501
+ /* refine alias color */
502
+ /* text */
503
+ /* link */
504
+ /* fill */
505
+ /* fill element */
506
+ /* fill interaction */
507
+ /* stroke */
508
+ /* background */
509
+ /* dim */
510
+ /* box shadow */
511
+ /* fisheye */
512
+ /* z-index */
676
513
  .esoz3jw.ant-btn.ant-btn-link {
677
514
  font-size: 13px;
678
515
  height: 18px;
@@ -4225,6 +4062,63 @@
4225
4062
  /* box shadow */
4226
4063
  /* fisheye */
4227
4064
  /* z-index */
4065
+ .wwyz7ti.ant-btn.ant-btn.ant-btn-primary {
4066
+ background-color: #fea008;
4067
+ }
4068
+ .wwyz7ti.ant-btn.ant-btn.ant-btn-primary:hover {
4069
+ background-color: #feba33;
4070
+ }
4071
+
4072
+ .c1xsou5f.ant-btn {
4073
+ border-radius: 6px;
4074
+ border: 1px solid rgba(172, 186, 211, 0.6) !important;
4075
+ }/* // basic */
4076
+ /* FishEye Color Variables and Functions */
4077
+ /*
4078
+ --------------------------- Primary Color ---------------------------
4079
+ */
4080
+ /*
4081
+ ---------------------------When necessary to add at any time---------------------------
4082
+ */
4083
+ /* computed */
4084
+ /* blue */
4085
+ /* green */
4086
+ /* yellow */
4087
+ /* red */
4088
+ /* purple */
4089
+ /* palette global token*/
4090
+ /* color opaque */
4091
+ /* color transparent */
4092
+ /* blue transparent */
4093
+ /* green transparent */
4094
+ /* yellow transparent */
4095
+ /* red transparent */
4096
+ /* gray transparent */
4097
+ /* white transparent */
4098
+ /* gradient opaque */
4099
+ /* blue radial gradient */
4100
+ /* blue linear gradient */
4101
+ /* green radial gradient */
4102
+ /* yellow radial gradient */
4103
+ /* red radial gradient */
4104
+ /* gray radial gradient */
4105
+ /* white to gray radial gradient */
4106
+ /* white to gray linear gradient */
4107
+ /* gradient transparent */
4108
+ /* secondary palette */
4109
+ /* purple radial gradient */
4110
+ /* refine alias color */
4111
+ /* text */
4112
+ /* link */
4113
+ /* fill */
4114
+ /* fill element */
4115
+ /* fill interaction */
4116
+ /* stroke */
4117
+ /* background */
4118
+ /* dim */
4119
+ /* box shadow */
4120
+ /* fisheye */
4121
+ /* z-index */
4228
4122
  .c154n7ie {
4229
4123
  max-width: 144px;
4230
4124
  }
@@ -37,6 +37,7 @@ export type InternalTableProps<Data extends {
37
37
  empty?: string;
38
38
  showMenuColumn?: boolean;
39
39
  hideNamespacesFilter?: boolean;
40
+ customNamespaceFilter?: React.ReactNode;
40
41
  };
41
42
  declare function Table<Data extends {
42
43
  id: string;
@@ -3,6 +3,7 @@ type Props = {
3
3
  resourceKind: string;
4
4
  namespace: string;
5
5
  name: string;
6
+ displayName?: string;
6
7
  uid?: string;
7
8
  };
8
9
  export declare const ResourceLink: React.FC<Props>;
@@ -39,6 +39,7 @@ export interface ShowConfig<Model extends ResourceModel = ResourceModel> {
39
39
  color: Record<string, StatusCapsuleColor | 'loading'>;
40
40
  text: Record<string, string>;
41
41
  };
42
+ displayName?: string;
42
43
  }
43
44
  export declare const ImageField: <Model extends WorkloadBaseModel>(i18n: I18nType) => ShowField<Model>;
44
45
  export declare const ReplicaField: <Model extends JobModel | WorkloadModel>() => ShowField<Model>;
@@ -4,6 +4,7 @@ import React from 'react';
4
4
  export type YamlEditorProps = {
5
5
  eleRef?: React.MutableRefObject<HTMLDivElement>;
6
6
  title?: string;
7
+ value?: string;
7
8
  defaultValue?: string;
8
9
  errorMsgs?: string[];
9
10
  schemas?: JSONSchema7[] | null;
@@ -13,6 +14,8 @@ export type YamlEditorProps = {
13
14
  collapsable?: boolean;
14
15
  isDefaultCollapsed?: boolean;
15
16
  readOnly?: boolean;
17
+ debounceTime?: number;
18
+ isScrollOnFocus?: boolean;
16
19
  onChange?: (value: string) => void;
17
20
  onValidate?: (valid: boolean, schemaValid: boolean) => void;
18
21
  onEditorCreate?: (editor: monaco.editor.IStandaloneCodeEditor) => void;
@@ -1,6 +1,6 @@
1
1
  export * from './useSchema';
2
2
  export * from './useDeleteModal';
3
- export * from './useFailedModal';
3
+ export * from './useDeleteModal/useFailedModal';
4
4
  export * from './useEagleTable';
5
5
  export * from './useDownloadYAML';
6
6
  export * from './useEdit';
@@ -1 +1,3 @@
1
1
  export * from './useDeleteModal';
2
+ export * from './useDeleteModalOnly';
3
+ export * from './useFailedModal';
@@ -1,11 +1,13 @@
1
- import { ModalProps } from '@cloudtower/eagle';
2
- import React from 'react';
3
- export declare const useDeleteModal: (resource: string, { deleteTip, onError }?: {
4
- deleteTip?: React.ReactNode;
5
- onError?: ((error: any) => void) | undefined;
6
- }) => {
7
- modalProps: ModalProps;
8
- visible: boolean;
9
- setVisible: React.Dispatch<React.SetStateAction<boolean>>;
1
+ import { DeleteDialogProps } from '@cloudtower/eagle';
2
+ type useDeleteDialogProps = {
3
+ resourceName: string;
4
+ deleteDialogProps?: Partial<DeleteDialogProps>;
5
+ };
6
+ /**
7
+ * 打开确认删除弹窗,如果失败会自动弹出回绝弹窗
8
+ */
9
+ export declare const useDeleteModal: ({ resourceName, deleteDialogProps, }: useDeleteDialogProps) => {
10
10
  openDeleteConfirmModal: (id: string) => void;
11
+ closeDeleteConfirmModal: () => void;
11
12
  };
13
+ export {};
@@ -0,0 +1,12 @@
1
+ import { DeleteDialogProps } from '@cloudtower/eagle';
2
+ import { HttpError } from '@refinedev/core';
3
+ type useDeleteModalOnlyProps = {
4
+ resource: string;
5
+ onError?: (resourceId: string, error?: HttpError) => void;
6
+ deleteDialogProps?: Partial<DeleteDialogProps>;
7
+ };
8
+ export declare const useDeleteModalOnly: ({ resource, deleteDialogProps, onError, }: useDeleteModalOnlyProps) => {
9
+ openDeleteConfirmModal: (id: string) => void;
10
+ closeDeleteConfirmModal: () => void;
11
+ };
12
+ export {};
@@ -1,6 +1,4 @@
1
- import { ModalProps } from '@cloudtower/eagle';
2
1
  export declare const useFailedModal: (resource: string) => {
3
- modalProps: ModalProps;
4
- visible: boolean;
5
2
  openFailedModal: (id: string, errorMsgs: string[]) => void;
3
+ closeFailedModal: () => void;
6
4
  };
@@ -159,6 +159,8 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
159
159
  hideListToolBar?: boolean;
160
160
  /** 是否隐藏命名空间过滤器 */
161
161
  hideNamespacesFilter?: boolean;
162
+ /** 自定义命名空间过滤器 */
163
+ customNamespaceFilter?: React.ReactNode;
162
164
  /** 是否隐藏编辑功能。会隐藏 Dropdown 和详情中的编辑按钮 */
163
165
  hideEdit?: boolean;
164
166
  /** 是否隐藏创建功能 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dovetail-v2/refine",
3
- "version": "0.2.0",
3
+ "version": "0.2.2-alpha.0",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",
@@ -10,8 +10,8 @@
10
10
  "module": "./dist/refine.js",
11
11
  "types": "./lib/index.d.ts",
12
12
  "dependencies": {
13
- "@cloudtower/eagle": "^0.32.46",
14
- "@cloudtower/icons-react": "^0.32.46",
13
+ "@cloudtower/eagle": "^0.32.50",
14
+ "@cloudtower/icons-react": "^0.32.50",
15
15
  "@patternfly/react-core": "^5.1.1",
16
16
  "@patternfly/react-log-viewer": "^5.0.0",
17
17
  "@refinedev/core": "^4.47.2",
@@ -83,8 +83,8 @@
83
83
  "vite-plugin-commonjs": "^0.10.0"
84
84
  },
85
85
  "peerDependencies": {
86
- "@cloudtower/eagle": "^0.31.18",
87
- "@cloudtower/icons-react": "^0.31.18",
86
+ "@cloudtower/eagle": "^0.32.50",
87
+ "@cloudtower/icons-react": "^0.32.50",
88
88
  "@refinedev/core": "^4.47.2",
89
89
  "antd": "4.5.0",
90
90
  "i18next": "^23.2.3",