@dovetail-v2/refine 0.0.28 → 0.0.30

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 (51) hide show
  1. package/dist/{MonacoYamlDiffEditor-b459d49b.js → MonacoYamlDiffEditor-7505595f.js} +1 -1
  2. package/dist/{index-432360ef.js → index-d02782c8.js} +104 -106
  3. package/dist/refine.js +99 -100
  4. package/dist/refine.umd.cjs +5 -7
  5. package/lib/src/App.js +0 -2
  6. package/lib/src/components/ConditionsTable/ConditionsTable.js +2 -2
  7. package/lib/src/components/CreateButton/index.js +2 -2
  8. package/lib/src/components/CronJobDropdown/index.js +2 -2
  9. package/lib/src/components/CronjobJobsTable/index.js +2 -2
  10. package/lib/src/components/DeleteButton/index.js +2 -2
  11. package/lib/src/components/DeleteManyButton/index.js +2 -2
  12. package/lib/src/components/EditField/index.js +3 -3
  13. package/lib/src/components/ErrorContent/index.js +2 -2
  14. package/lib/src/components/EventsTable/EventsTable.js +2 -2
  15. package/lib/src/components/FormLayout/index.js +2 -2
  16. package/lib/src/components/FormModal/index.js +2 -2
  17. package/lib/src/components/ImageNames/index.js +2 -2
  18. package/lib/src/components/IngressRulesTable/IngressRulesTable.js +2 -2
  19. package/lib/src/components/K8sDropdown/index.js +2 -2
  20. package/lib/src/components/KeyValueData/index.js +2 -2
  21. package/lib/src/components/NamespacesFilter/index.js +2 -2
  22. package/lib/src/components/NetworkPolicyRulesTable/NetworkPolicyRulesTable.js +2 -2
  23. package/lib/src/components/PodContainersTable/PodContainersTable.js +2 -2
  24. package/lib/src/components/PodLog/index.js +2 -2
  25. package/lib/src/components/ResourceCRUD/list/index.js +2 -2
  26. package/lib/src/components/ShowContent/ShowContent.js +2 -2
  27. package/lib/src/components/StateTag/StateTag.js +2 -2
  28. package/lib/src/components/Table/ErrorContent.js +2 -2
  29. package/lib/src/components/Table/index.js +2 -2
  30. package/lib/src/components/WorkloadDropdown/index.js +2 -2
  31. package/lib/src/components/WorkloadPodsTable/WorkloadPodsTable.js +2 -2
  32. package/lib/src/components/YamlEditor/YamlEditorComponent.js +2 -2
  33. package/lib/src/components/YamlForm/index.js +2 -2
  34. package/lib/src/hooks/useDeleteModal/useDeleteManyModal.js +2 -2
  35. package/lib/src/hooks/useDeleteModal/useDeleteModal.js +2 -2
  36. package/lib/src/hooks/useEagleForm.js +2 -2
  37. package/lib/src/hooks/useSubmitForm.js +2 -2
  38. package/lib/src/i18n.js +6 -1
  39. package/lib/src/index.d.ts +0 -1
  40. package/lib/src/locales/index.d.ts +2 -115
  41. package/lib/src/pages/cronjobs/list/index.js +2 -2
  42. package/lib/src/pages/cronjobs/show/index.js +2 -2
  43. package/lib/src/pages/daemonsets/list/index.js +2 -2
  44. package/lib/src/pages/daemonsets/show/index.js +2 -2
  45. package/lib/src/pages/deployments/list/index.js +2 -2
  46. package/lib/src/pages/deployments/show/index.js +2 -2
  47. package/lib/src/pages/pods/list/index.js +2 -2
  48. package/lib/src/pages/pods/show/index.js +2 -2
  49. package/lib/src/pages/statefulsets/list/index.js +2 -2
  50. package/lib/src/pages/statefulsets/show/index.js +2 -2
  51. package/package.json +2 -2
@@ -1,4 +1,4 @@
1
- import { j as jsxRuntimeExports } from "./index-432360ef.js";
1
+ import { j as jsxRuntimeExports } from "./index-d02782c8.js";
2
2
  import * as monaco from "monaco-editor";
3
3
  import { useRef, useEffect } from "react";
4
4
  import "i18next";
@@ -337,7 +337,7 @@ const dovetail$1 = {
337
337
  edit_resource: edit_resource$1,
338
338
  status: status$1
339
339
  };
340
- const D2LocalesEN = {
340
+ const EN = {
341
341
  dovetail: dovetail$1
342
342
  };
343
343
  const copy = "复制";
@@ -519,14 +519,13 @@ const dovetail = {
519
519
  ingress_rule_type,
520
520
  port
521
521
  };
522
- const D2LocalesZH = {
522
+ const ZH = {
523
523
  dovetail
524
524
  };
525
- const D2Locales = {
526
- "en-US": D2LocalesEN,
527
- "zh-CN": D2LocalesZH
525
+ const resources = {
526
+ "en-US": EN,
527
+ "zh-CN": ZH
528
528
  };
529
- const resources = D2Locales;
530
529
  i18n.use(initReactI18next).init({
531
530
  supportedLngs: ["en-US", "zh-CN"],
532
531
  resources,
@@ -9859,7 +9858,7 @@ const ErrorMsgStyle = "eh2qjnl";
9859
9858
  const ErrorWrapperStyle = "e19q2bnp";
9860
9859
  const YamlEditorStyle = "y16u5v3w";
9861
9860
  const MonacoYamlEditor$2 = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$1));
9862
- const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-b459d49b.js"));
9861
+ const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-7505595f.js"));
9863
9862
  const YamlEditorComponent = forwardRef(
9864
9863
  function YamlEditorComponent2(props, ref) {
9865
9864
  const {
@@ -19324,124 +19323,123 @@ const relationPlugin = new RelationPlugin();
19324
19323
  const ProviderPlugins = [relationPlugin, modelPlugin];
19325
19324
  const dovetailRefineI18n = i18n;
19326
19325
  export {
19327
- YamlEditorComponent as $,
19326
+ DeleteButton as $,
19328
19327
  AgeColumnRenderer as A,
19329
19328
  Breadcrumb as B,
19330
19329
  CommonSorter as C,
19331
- D2Locales as D,
19332
- PodContainersTable as E,
19333
- WorkloadDropdown as F,
19334
- CreateButton as G,
19335
- ImageNames as H,
19330
+ DurationColumnRenderer as D,
19331
+ WorkloadDropdown as E,
19332
+ CreateButton as F,
19333
+ ImageNames as G,
19334
+ ResourceList as H,
19336
19335
  IngressRulesColumnRenderer as I,
19337
- ResourceList as J,
19336
+ ResourceShow as J,
19338
19337
  KeyValueListWidget as K,
19339
- ResourceShow as L,
19338
+ ResourceForm as L,
19340
19339
  MetadataForm as M,
19341
19340
  NameColumnRenderer as N,
19342
- ResourceForm as O,
19341
+ ResourceCRUD as O,
19343
19342
  PodWorkloadColumnRenderer as P,
19344
- ResourceCRUD as Q,
19343
+ WorkloadPodsTable as Q,
19345
19344
  ReplicasColumnRenderer as R,
19346
19345
  StateDisplayColumnRenderer as S,
19347
- WorkloadPodsTable as T,
19348
- CronJobDropdown as U,
19349
- ResourceUsageBar as V,
19346
+ CronJobDropdown as T,
19347
+ ResourceUsageBar as U,
19348
+ WorkloadReplicas as V,
19350
19349
  WorkloadImageColumnRenderer as W,
19351
- WorkloadReplicas as X,
19352
- CronjobJobsTable as Y,
19353
- KeyValue as Z,
19354
- Separator as _,
19350
+ CronjobJobsTable as X,
19351
+ KeyValue as Y,
19352
+ Separator as Z,
19353
+ YamlEditorComponent as _,
19355
19354
  useDeleteModal as a,
19356
- DaemonSetModel as a$,
19357
- DeleteButton as a0,
19358
- Layout as a1,
19359
- ImageField as a2,
19360
- ReplicaField as a3,
19361
- ConditionsField as a4,
19362
- PodsField as a5,
19363
- JobsField as a6,
19364
- DataField as a7,
19365
- SecretDataField as a8,
19366
- StartTimeField as a9,
19367
- CRONJOB_INIT_VALUE as aA,
19368
- DAEMONSET_INIT_VALUE as aB,
19369
- JOB_INIT_VALUE as aC,
19370
- STATEFULSET_INIT_VALUE as aD,
19371
- POD_INIT_VALUE as aE,
19372
- SERVICE_INIT_VALUE as aF,
19373
- INGRESS_INIT_VALUE as aG,
19374
- NETWORK_POLICY_INIT_VALUE as aH,
19375
- TIMESTAMP_LABEL as aI,
19376
- WorkloadState as aJ,
19377
- Dovetail as aK,
19378
- RESOURCE_GROUP as aL,
19379
- FormType as aM,
19380
- ComponentContext as aN,
19381
- GlobalStoreContext as aO,
19382
- ConfigsContext as aP,
19383
- IngressModel as aQ,
19384
- NetworkPolicyModel as aR,
19385
- JobModel as aS,
19386
- WorkloadModel as aT,
19387
- WorkloadBaseModel as aU,
19388
- PodModel as aV,
19389
- PodMetricsModel as aW,
19390
- ResourceModel as aX,
19391
- CronJobModel as aY,
19392
- EventModel as aZ,
19393
- DeploymentModel as a_,
19394
- ServiceTypeField as aa,
19395
- ClusterIpField as ab,
19396
- SessionAffinityField as ac,
19397
- ServicePodsField as ad,
19398
- IngressRulesTableTabField as ae,
19399
- EventsTableTabField as af,
19400
- ShowContent as ag,
19401
- SchemaStrategy as ah,
19402
- DeleteManyButton as ai,
19403
- ListPage as aj,
19404
- StateTag as ak,
19405
- DrawerShow as al,
19406
- Menu as am,
19407
- EditButton as an,
19408
- ReferenceLink as ao,
19409
- ResourceLink as ap,
19410
- NS_STORE_KEY as aq,
19411
- ALL_NS as ar,
19412
- useNamespacesFilter as as,
19413
- NamespacesFilter as at,
19414
- Tags as au,
19415
- PodLog as av,
19416
- FormModal as aw,
19417
- NetworkPolicyRulesTable as ax,
19418
- BASE_INIT_VALUE as ay,
19419
- DEPLOYMENT_INIT_VALUE as az,
19355
+ StatefulSetModel as a$,
19356
+ Layout as a0,
19357
+ ImageField as a1,
19358
+ ReplicaField as a2,
19359
+ ConditionsField as a3,
19360
+ PodsField as a4,
19361
+ JobsField as a5,
19362
+ DataField as a6,
19363
+ SecretDataField as a7,
19364
+ StartTimeField as a8,
19365
+ ServiceTypeField as a9,
19366
+ DAEMONSET_INIT_VALUE as aA,
19367
+ JOB_INIT_VALUE as aB,
19368
+ STATEFULSET_INIT_VALUE as aC,
19369
+ POD_INIT_VALUE as aD,
19370
+ SERVICE_INIT_VALUE as aE,
19371
+ INGRESS_INIT_VALUE as aF,
19372
+ NETWORK_POLICY_INIT_VALUE as aG,
19373
+ TIMESTAMP_LABEL as aH,
19374
+ WorkloadState as aI,
19375
+ Dovetail as aJ,
19376
+ RESOURCE_GROUP as aK,
19377
+ FormType as aL,
19378
+ ComponentContext as aM,
19379
+ GlobalStoreContext as aN,
19380
+ ConfigsContext as aO,
19381
+ IngressModel as aP,
19382
+ NetworkPolicyModel as aQ,
19383
+ JobModel as aR,
19384
+ WorkloadModel as aS,
19385
+ WorkloadBaseModel as aT,
19386
+ PodModel as aU,
19387
+ PodMetricsModel as aV,
19388
+ ResourceModel as aW,
19389
+ CronJobModel as aX,
19390
+ EventModel as aY,
19391
+ DeploymentModel as aZ,
19392
+ DaemonSetModel as a_,
19393
+ ClusterIpField as aa,
19394
+ SessionAffinityField as ab,
19395
+ ServicePodsField as ac,
19396
+ IngressRulesTableTabField as ad,
19397
+ EventsTableTabField as ae,
19398
+ ShowContent as af,
19399
+ SchemaStrategy as ag,
19400
+ DeleteManyButton as ah,
19401
+ ListPage as ai,
19402
+ StateTag as aj,
19403
+ DrawerShow as ak,
19404
+ Menu as al,
19405
+ EditButton as am,
19406
+ ReferenceLink as an,
19407
+ ResourceLink as ao,
19408
+ NS_STORE_KEY as ap,
19409
+ ALL_NS as aq,
19410
+ useNamespacesFilter as ar,
19411
+ NamespacesFilter as as,
19412
+ Tags as at,
19413
+ PodLog as au,
19414
+ FormModal as av,
19415
+ NetworkPolicyRulesTable as aw,
19416
+ BASE_INIT_VALUE as ax,
19417
+ DEPLOYMENT_INIT_VALUE as ay,
19418
+ CRONJOB_INIT_VALUE as az,
19420
19419
  NameSpaceColumnRenderer as b,
19421
- StatefulSetModel as b0,
19422
- ProviderPlugins as b1,
19420
+ ProviderPlugins as b0,
19423
19421
  WorkloadRestartsColumnRenderer as c,
19424
19422
  dovetailRefineI18n as d,
19425
19423
  NodeNameColumnRenderer as e,
19426
19424
  RestartCountColumnRenderer as f,
19427
19425
  CompletionsCountColumnRenderer as g,
19428
- DurationColumnRenderer as h,
19429
- ServiceTypeColumnRenderer as i,
19426
+ ServiceTypeColumnRenderer as h,
19427
+ IngressDefaultBackendColumnRenderer as i,
19430
19428
  jsxRuntimeExports as j,
19431
- IngressDefaultBackendColumnRenderer as k,
19432
- ColumnKeys as l,
19433
- useEagleTable as m,
19434
- useDownloadYAML as n,
19435
- useEdit as o,
19436
- useGlobalStore as p,
19437
- NameInputWidget as q,
19429
+ ColumnKeys as k,
19430
+ useEagleTable as l,
19431
+ useDownloadYAML as m,
19432
+ useEdit as n,
19433
+ useGlobalStore as o,
19434
+ NameInputWidget as p,
19435
+ dnsSubDomainRules as q,
19438
19436
  routerProvider as r,
19439
- dnsSubDomainRules as s,
19440
- rfc1123LabelRules as t,
19437
+ rfc1123LabelRules as s,
19438
+ rfc1035LabelRules as t,
19441
19439
  useSchema as u,
19442
- rfc1035LabelRules as v,
19443
- NamespaceSelectWidget as w,
19444
- namespaceRules as x,
19445
- PageShow as y,
19446
- ConditionsTable as z
19440
+ NamespaceSelectWidget as v,
19441
+ namespaceRules as w,
19442
+ PageShow as x,
19443
+ ConditionsTable as y,
19444
+ PodContainersTable as z
19447
19445
  };
package/dist/refine.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ar, A, ay, B, aA, ab, l, C, g, aN, a4, z, aP, G, U, aY, Y, D, aB, az, a$, a7, a0, ai, a_, aK, al, h, an, aZ, af, aw, aM, aO, aG, a2, H, k, aQ, I, ae, aC, aS, a6, Z, K, a1, aj, am, M, aH, aq, N, q, b, w, at, aR, ax, e, aE, y, E, av, aW, aV, P, a5, b1, aL, ao, a3, R, Q, O, ap, J, aX, L, V, f, aF, aD, ah, a8, _, ad, i, aa, ac, ag, a9, S, ak, b0, aI, au, aU, F, W, aT, T, X, c, aJ, $, s, d, x, v, t, r, a, n, m, o, p, as, u } from "./index-432360ef.js";
1
+ import { aq, A, ax, B, az, aa, k, C, g, aM, a3, y, aO, F, T, aX, X, aA, ay, a_, a6, $, ah, aZ, aJ, ak, D, am, aY, ae, av, aL, aN, aF, a1, G, i, aP, I, ad, aB, aR, a5, Y, K, a0, ai, al, M, aG, ap, N, p, b, v, as, aQ, aw, e, aD, x, z, au, aV, aU, P, a4, b0, aK, an, a2, R, O, L, ao, H, aW, J, U, f, aE, aC, ag, a7, Z, ac, h, a9, ab, af, a8, S, aj, a$, aH, at, aT, E, W, aS, Q, V, c, aI, _, q, d, w, t, s, r, a, m, l, n, o, ar, u } from "./index-d02782c8.js";
2
2
  import "@cloudtower/eagle";
3
3
  import "@refinedev/core";
4
4
  import "js-yaml";
@@ -15,123 +15,122 @@ import "react-dom";
15
15
  import "antd";
16
16
  import "k8s-api-provider";
17
17
  export {
18
- ar as ALL_NS,
18
+ aq as ALL_NS,
19
19
  A as AgeColumnRenderer,
20
- ay as BASE_INIT_VALUE,
20
+ ax as BASE_INIT_VALUE,
21
21
  B as Breadcrumb,
22
- aA as CRONJOB_INIT_VALUE,
23
- ab as ClusterIpField,
24
- l as ColumnKeys,
22
+ az as CRONJOB_INIT_VALUE,
23
+ aa as ClusterIpField,
24
+ k as ColumnKeys,
25
25
  C as CommonSorter,
26
26
  g as CompletionsCountColumnRenderer,
27
- aN as ComponentContext,
28
- a4 as ConditionsField,
29
- z as ConditionsTable,
30
- aP as ConfigsContext,
31
- G as CreateButton,
32
- U as CronJobDropdown,
33
- aY as CronJobModel,
34
- Y as CronjobJobsTable,
35
- D as D2Locales,
36
- aB as DAEMONSET_INIT_VALUE,
37
- az as DEPLOYMENT_INIT_VALUE,
38
- a$ as DaemonSetModel,
39
- a7 as DataField,
40
- a0 as DeleteButton,
41
- ai as DeleteManyButton,
42
- a_ as DeploymentModel,
43
- aK as Dovetail,
44
- al as DrawerShow,
45
- h as DurationColumnRenderer,
46
- an as EditButton,
47
- aZ as EventModel,
48
- af as EventsTableTabField,
49
- aw as FormModal,
50
- aM as FormType,
51
- aO as GlobalStoreContext,
52
- aG as INGRESS_INIT_VALUE,
53
- a2 as ImageField,
54
- H as ImageNames,
55
- k as IngressDefaultBackendColumnRenderer,
56
- aQ as IngressModel,
27
+ aM as ComponentContext,
28
+ a3 as ConditionsField,
29
+ y as ConditionsTable,
30
+ aO as ConfigsContext,
31
+ F as CreateButton,
32
+ T as CronJobDropdown,
33
+ aX as CronJobModel,
34
+ X as CronjobJobsTable,
35
+ aA as DAEMONSET_INIT_VALUE,
36
+ ay as DEPLOYMENT_INIT_VALUE,
37
+ a_ as DaemonSetModel,
38
+ a6 as DataField,
39
+ $ as DeleteButton,
40
+ ah as DeleteManyButton,
41
+ aZ as DeploymentModel,
42
+ aJ as Dovetail,
43
+ ak as DrawerShow,
44
+ D as DurationColumnRenderer,
45
+ am as EditButton,
46
+ aY as EventModel,
47
+ ae as EventsTableTabField,
48
+ av as FormModal,
49
+ aL as FormType,
50
+ aN as GlobalStoreContext,
51
+ aF as INGRESS_INIT_VALUE,
52
+ a1 as ImageField,
53
+ G as ImageNames,
54
+ i as IngressDefaultBackendColumnRenderer,
55
+ aP as IngressModel,
57
56
  I as IngressRulesColumnRenderer,
58
- ae as IngressRulesTableTabField,
59
- aC as JOB_INIT_VALUE,
60
- aS as JobModel,
61
- a6 as JobsField,
62
- Z as KeyValue,
57
+ ad as IngressRulesTableTabField,
58
+ aB as JOB_INIT_VALUE,
59
+ aR as JobModel,
60
+ a5 as JobsField,
61
+ Y as KeyValue,
63
62
  K as KeyValueListWidget,
64
- a1 as Layout,
65
- aj as ListPage,
66
- am as Menu,
63
+ a0 as Layout,
64
+ ai as ListPage,
65
+ al as Menu,
67
66
  M as MetadataForm,
68
- aH as NETWORK_POLICY_INIT_VALUE,
69
- aq as NS_STORE_KEY,
67
+ aG as NETWORK_POLICY_INIT_VALUE,
68
+ ap as NS_STORE_KEY,
70
69
  N as NameColumnRenderer,
71
- q as NameInputWidget,
70
+ p as NameInputWidget,
72
71
  b as NameSpaceColumnRenderer,
73
- w as NamespaceSelectWidget,
74
- at as NamespacesFilter,
75
- aR as NetworkPolicyModel,
76
- ax as NetworkPolicyRulesTable,
72
+ v as NamespaceSelectWidget,
73
+ as as NamespacesFilter,
74
+ aQ as NetworkPolicyModel,
75
+ aw as NetworkPolicyRulesTable,
77
76
  e as NodeNameColumnRenderer,
78
- aE as POD_INIT_VALUE,
79
- y as PageShow,
80
- E as PodContainersTable,
81
- av as PodLog,
82
- aW as PodMetricsModel,
83
- aV as PodModel,
77
+ aD as POD_INIT_VALUE,
78
+ x as PageShow,
79
+ z as PodContainersTable,
80
+ au as PodLog,
81
+ aV as PodMetricsModel,
82
+ aU as PodModel,
84
83
  P as PodWorkloadColumnRenderer,
85
- a5 as PodsField,
86
- b1 as ProviderPlugins,
87
- aL as RESOURCE_GROUP,
88
- ao as ReferenceLink,
89
- a3 as ReplicaField,
84
+ a4 as PodsField,
85
+ b0 as ProviderPlugins,
86
+ aK as RESOURCE_GROUP,
87
+ an as ReferenceLink,
88
+ a2 as ReplicaField,
90
89
  R as ReplicasColumnRenderer,
91
- Q as ResourceCRUD,
92
- O as ResourceForm,
93
- ap as ResourceLink,
94
- J as ResourceList,
95
- aX as ResourceModel,
96
- L as ResourceShow,
97
- V as ResourceUsageBar,
90
+ O as ResourceCRUD,
91
+ L as ResourceForm,
92
+ ao as ResourceLink,
93
+ H as ResourceList,
94
+ aW as ResourceModel,
95
+ J as ResourceShow,
96
+ U as ResourceUsageBar,
98
97
  f as RestartCountColumnRenderer,
99
- aF as SERVICE_INIT_VALUE,
100
- aD as STATEFULSET_INIT_VALUE,
101
- ah as SchemaStrategy,
102
- a8 as SecretDataField,
103
- _ as Separator,
104
- ad as ServicePodsField,
105
- i as ServiceTypeColumnRenderer,
106
- aa as ServiceTypeField,
107
- ac as SessionAffinityField,
108
- ag as ShowContent,
109
- a9 as StartTimeField,
98
+ aE as SERVICE_INIT_VALUE,
99
+ aC as STATEFULSET_INIT_VALUE,
100
+ ag as SchemaStrategy,
101
+ a7 as SecretDataField,
102
+ Z as Separator,
103
+ ac as ServicePodsField,
104
+ h as ServiceTypeColumnRenderer,
105
+ a9 as ServiceTypeField,
106
+ ab as SessionAffinityField,
107
+ af as ShowContent,
108
+ a8 as StartTimeField,
110
109
  S as StateDisplayColumnRenderer,
111
- ak as StateTag,
112
- b0 as StatefulSetModel,
113
- aI as TIMESTAMP_LABEL,
114
- au as Tags,
115
- aU as WorkloadBaseModel,
116
- F as WorkloadDropdown,
110
+ aj as StateTag,
111
+ a$ as StatefulSetModel,
112
+ aH as TIMESTAMP_LABEL,
113
+ at as Tags,
114
+ aT as WorkloadBaseModel,
115
+ E as WorkloadDropdown,
117
116
  W as WorkloadImageColumnRenderer,
118
- aT as WorkloadModel,
119
- T as WorkloadPodsTable,
120
- X as WorkloadReplicas,
117
+ aS as WorkloadModel,
118
+ Q as WorkloadPodsTable,
119
+ V as WorkloadReplicas,
121
120
  c as WorkloadRestartsColumnRenderer,
122
- aJ as WorkloadState,
123
- $ as YamlEditorComponent,
124
- s as dnsSubDomainRules,
121
+ aI as WorkloadState,
122
+ _ as YamlEditorComponent,
123
+ q as dnsSubDomainRules,
125
124
  d as dovetailRefineI18n,
126
- x as namespaceRules,
127
- v as rfc1035LabelRules,
128
- t as rfc1123LabelRules,
125
+ w as namespaceRules,
126
+ t as rfc1035LabelRules,
127
+ s as rfc1123LabelRules,
129
128
  r as routerProvider,
130
129
  a as useDeleteModal,
131
- n as useDownloadYAML,
132
- m as useEagleTable,
133
- o as useEdit,
134
- p as useGlobalStore,
135
- as as useNamespacesFilter,
130
+ m as useDownloadYAML,
131
+ l as useEagleTable,
132
+ n as useEdit,
133
+ o as useGlobalStore,
134
+ ar as useNamespacesFilter,
136
135
  u as useSchema
137
136
  };
@@ -343,7 +343,7 @@ var __publicField = (obj, key, value) => {
343
343
  edit_resource: edit_resource$1,
344
344
  status: status$1
345
345
  };
346
- const D2LocalesEN = {
346
+ const EN = {
347
347
  dovetail: dovetail$1
348
348
  };
349
349
  const copy = "复制";
@@ -525,14 +525,13 @@ var __publicField = (obj, key, value) => {
525
525
  ingress_rule_type,
526
526
  port
527
527
  };
528
- const D2LocalesZH = {
528
+ const ZH = {
529
529
  dovetail
530
530
  };
531
- const D2Locales = {
532
- "en-US": D2LocalesEN,
533
- "zh-CN": D2LocalesZH
531
+ const resources = {
532
+ "en-US": EN,
533
+ "zh-CN": ZH
534
534
  };
535
- const resources = D2Locales;
536
535
  i18n.use(initReactI18next).init({
537
536
  supportedLngs: ["en-US", "zh-CN"],
538
537
  resources,
@@ -19386,7 +19385,6 @@ var __publicField = (obj, key, value) => {
19386
19385
  exports2.CronJobDropdown = CronJobDropdown;
19387
19386
  exports2.CronJobModel = CronJobModel;
19388
19387
  exports2.CronjobJobsTable = CronjobJobsTable;
19389
- exports2.D2Locales = D2Locales;
19390
19388
  exports2.DAEMONSET_INIT_VALUE = DAEMONSET_INIT_VALUE;
19391
19389
  exports2.DEPLOYMENT_INIT_VALUE = DEPLOYMENT_INIT_VALUE;
19392
19390
  exports2.DaemonSetModel = DaemonSetModel;
package/lib/src/App.js CHANGED
@@ -21,8 +21,6 @@ import { ServicesConfig } from './pages/services';
21
21
  import { StatefulSetShow, StatefulSetList, StatefulSetForm } from './pages/statefulsets';
22
22
  import { ProviderPlugins } from './plugins';
23
23
  import { RESOURCE_GROUP, FormType } from './types';
24
- import * as resources from './locales';
25
- console.log('resources', resources);
26
24
  function App() {
27
25
  const histroy = createBrowserHistory();
28
26
  const resourcesConfig = useMemo(() => {
@@ -1,12 +1,12 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useUIKit } from '@cloudtower/eagle';
3
- import { useTranslation } from 'react-i18next';
3
+ import { useD2Translation } from '../../i18n';
4
4
  import { addId } from '../../utils/addId';
5
5
  import ErrorContent from '../Table/ErrorContent';
6
6
  import Time from '../Time';
7
7
  export const ConditionsTable = ({ conditions = [] }) => {
8
8
  const kit = useUIKit();
9
- const { t } = useTranslation();
9
+ const { t } = useD2Translation();
10
10
  const conditionsWithId = addId(conditions, 'type');
11
11
  const columns = [
12
12
  {
@@ -1,10 +1,10 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useUIKit } from '@cloudtower/eagle';
3
- import { useTranslation } from 'react-i18next';
4
3
  import { useOpenForm } from 'src/hooks/useOpenForm';
4
+ import { useD2Translation } from '../../i18n';
5
5
  export function CreateButton() {
6
6
  const kit = useUIKit();
7
- const { t } = useTranslation();
7
+ const { t } = useD2Translation();
8
8
  const openForm = useOpenForm();
9
9
  return (_jsx(kit.button, { type: "primary", onClick: openForm, children: t('dovetail.create') }));
10
10
  }
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Icon, useUIKit } from '@cloudtower/eagle';
3
3
  import { SuspendedPause16GradientGrayIcon, VmResume16Icon, } from '@cloudtower/icons-react';
4
4
  import { useResource, useUpdate } from '@refinedev/core';
5
- import { useTranslation } from 'react-i18next';
5
+ import { useD2Translation } from '../../i18n';
6
6
  import { pruneBeforeEdit } from '../../utils/k8s';
7
7
  import K8sDropdown from '../K8sDropdown';
8
8
  export function CronJobDropdown(props) {
@@ -11,7 +11,7 @@ export function CronJobDropdown(props) {
11
11
  const kit = useUIKit();
12
12
  const { resource } = useResource();
13
13
  const { mutate } = useUpdate();
14
- const { t } = useTranslation();
14
+ const { t } = useD2Translation();
15
15
  const suspended = Boolean(spec?.suspend);
16
16
  return (_jsx(K8sDropdown, { record: record, children: _jsx(kit.menu.Item, { onClick: () => {
17
17
  const v = suspended ? record.resume() : record.suspend();
@@ -3,8 +3,8 @@ import { useUIKit } from '@cloudtower/eagle';
3
3
  import { css } from '@linaria/core';
4
4
  import { useList } from '@refinedev/core';
5
5
  import { useMemo, useState } from 'react';
6
- import { useTranslation } from 'react-i18next';
7
6
  import { AgeColumnRenderer, CompletionsCountColumnRenderer, DurationColumnRenderer, NameColumnRenderer, NameSpaceColumnRenderer, StateDisplayColumnRenderer, WorkloadImageColumnRenderer, } from '../../hooks/useEagleTable/columns';
7
+ import { useD2Translation } from '../../i18n';
8
8
  import Table from '../Table';
9
9
  import { TableToolBar } from '../Table/TableToolBar';
10
10
  function matchOwner(job, owner) {
@@ -21,7 +21,7 @@ function matchOwner(job, owner) {
21
21
  return match;
22
22
  }
23
23
  export const CronjobJobsTable = ({ owner }) => {
24
- const { i18n } = useTranslation();
24
+ const { i18n } = useD2Translation();
25
25
  const kit = useUIKit();
26
26
  const [selectedKeys, setSelectedKeys] = useState([]);
27
27
  const [currentPage, setCurrentPage] = useState(1);
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useUIKit } from '@cloudtower/eagle';
3
3
  import { useResource, useParsed } from '@refinedev/core';
4
- import { useTranslation } from 'react-i18next';
5
4
  import { useDeleteModal } from '../../hooks/useDeleteModal';
5
+ import { useD2Translation } from '../../i18n';
6
6
  export const DeleteButton = () => {
7
7
  const { resource } = useResource();
8
8
  const { id } = useParsed();
9
9
  const kit = useUIKit();
10
- const { t } = useTranslation();
10
+ const { t } = useD2Translation();
11
11
  const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(resource?.name || '');
12
12
  return (_jsxs(_Fragment, { children: [_jsx(kit.button, { type: "primary", danger: true, onClick: () => openDeleteConfirmModal(id || ''), children: t('dovetail.delete') }), visible ? _jsx(kit.modal, { ...modalProps }) : null] }));
13
13
  };
@@ -2,12 +2,12 @@ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-run
2
2
  import { useUIKit } from '@cloudtower/eagle';
3
3
  import { useResource } from '@refinedev/core';
4
4
  import { useCallback } from 'react';
5
- import { useTranslation } from 'react-i18next';
6
5
  import { useDeleteManyModal } from '../../hooks/useDeleteModal/useDeleteManyModal';
6
+ import { useD2Translation } from '../../i18n';
7
7
  export const DeleteManyButton = props => {
8
8
  const { resource } = useResource();
9
9
  const kit = useUIKit();
10
- const { t } = useTranslation();
10
+ const { t } = useD2Translation();
11
11
  const { modalProps, visible, setVisible } = useDeleteManyModal(resource?.name || '', props.ids);
12
12
  const onClick = useCallback(() => {
13
13
  setVisible(true);