@dovetail-v2/refine 0.1.23 → 0.1.25
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/{MonacoYamlDiffEditor-1fa1b6c5.js → MonacoYamlDiffEditor-89d9acb5.js} +1 -1
- package/dist/{index-135c79a4.js → index-c93276c4.js} +17 -12
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +16 -11
- package/dist/style.css +1 -0
- package/lib/hooks/useDeleteModal/useDeleteModal.d.ts +4 -1
- package/lib/types/resource.d.ts +1 -0
- package/package.json +1 -1
|
@@ -8516,13 +8516,15 @@ function isFirstLetterEnglish(str) {
|
|
|
8516
8516
|
return /^[a-zA-Z]/.test(str);
|
|
8517
8517
|
}
|
|
8518
8518
|
function addSpaceBeforeLetter(str) {
|
|
8519
|
-
return isFirstLetterEnglish(str) ? ` ${str}` : str;
|
|
8519
|
+
return isFirstLetterEnglish(str) ? ` ${str.toLocaleLowerCase()}` : str;
|
|
8520
8520
|
}
|
|
8521
8521
|
const useDeleteModal_mi8he5 = "";
|
|
8522
8522
|
const TextStyle = "t1vq0ett";
|
|
8523
8523
|
const TipStyle = "t139onst";
|
|
8524
8524
|
const NameStyle$1 = "n18lzor8";
|
|
8525
|
-
const useDeleteModal = (resource
|
|
8525
|
+
const useDeleteModal = (resource, {
|
|
8526
|
+
deleteTip
|
|
8527
|
+
} = {}) => {
|
|
8526
8528
|
const configs = useContext(ConfigsContext);
|
|
8527
8529
|
const config = configs[resource];
|
|
8528
8530
|
const {
|
|
@@ -8565,7 +8567,7 @@ const useDeleteModal = (resource) => {
|
|
|
8565
8567
|
})
|
|
8566
8568
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
8567
8569
|
className: cx_default(Typo.Label.l4_regular, TipStyle),
|
|
8568
|
-
children: t2("dovetail.delete_tip")
|
|
8570
|
+
children: deleteTip || t2("dovetail.delete_tip")
|
|
8569
8571
|
})]
|
|
8570
8572
|
}),
|
|
8571
8573
|
async onOk() {
|
|
@@ -9726,7 +9728,7 @@ function PVCDistributeStorage({ pvc: pvc2, editable }) {
|
|
|
9726
9728
|
{
|
|
9727
9729
|
modalProps: {
|
|
9728
9730
|
formRef,
|
|
9729
|
-
title: t2("dovetail.
|
|
9731
|
+
title: t2("dovetail.edit_distribute_storage"),
|
|
9730
9732
|
renderContent() {
|
|
9731
9733
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9732
9734
|
DistributeStorageForm,
|
|
@@ -11413,8 +11415,13 @@ function K8sDropdown(props) {
|
|
|
11413
11415
|
const { globalStore } = useGlobalStore();
|
|
11414
11416
|
const useResourceResult = useResource();
|
|
11415
11417
|
const resource = useResourceResult.resource;
|
|
11418
|
+
const configs = useContext(ConfigsContext);
|
|
11419
|
+
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11416
11420
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
11417
|
-
(resource == null ? void 0 : resource.name) || ""
|
|
11421
|
+
(resource == null ? void 0 : resource.name) || "",
|
|
11422
|
+
{
|
|
11423
|
+
deleteTip: config.deleteTip
|
|
11424
|
+
}
|
|
11418
11425
|
);
|
|
11419
11426
|
const download2 = useDownloadYAML();
|
|
11420
11427
|
const { t: t2 } = useTranslation();
|
|
@@ -11428,8 +11435,6 @@ function K8sDropdown(props) {
|
|
|
11428
11435
|
resource: resource == null ? void 0 : resource.name,
|
|
11429
11436
|
action: AccessControlAuth.Delete
|
|
11430
11437
|
});
|
|
11431
|
-
const configs = useContext(ConfigsContext);
|
|
11432
|
-
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11433
11438
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11434
11439
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11435
11440
|
Dropdown,
|
|
@@ -11645,7 +11650,7 @@ const DeleteManyButton = (props) => {
|
|
|
11645
11650
|
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(Modal, { ...modalProps }) : null
|
|
11646
11651
|
] });
|
|
11647
11652
|
};
|
|
11648
|
-
const
|
|
11653
|
+
const index_1iwpuwe = "";
|
|
11649
11654
|
const ToolbarWrapperStyle = "t1908hhn";
|
|
11650
11655
|
const ToolbarStyle$3 = "t1ym1gqo";
|
|
11651
11656
|
const TitleStyle$2 = "t38ugwl";
|
|
@@ -13098,8 +13103,8 @@ function WorkloadReplicas({
|
|
|
13098
13103
|
data: donutData,
|
|
13099
13104
|
width: 70,
|
|
13100
13105
|
height: 70,
|
|
13101
|
-
innerRadius:
|
|
13102
|
-
outerRadius:
|
|
13106
|
+
innerRadius: 28,
|
|
13107
|
+
outerRadius: 34,
|
|
13103
13108
|
centerRender: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
13104
13109
|
className: DonutChartCenterStyle,
|
|
13105
13110
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
@@ -38612,7 +38617,7 @@ const Separator = () => {
|
|
|
38612
38617
|
});
|
|
38613
38618
|
};
|
|
38614
38619
|
const MonacoYamlEditor = React__default.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
38615
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
38620
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-89d9acb5.js"));
|
|
38616
38621
|
const YamlEditorComponent = forwardRef(
|
|
38617
38622
|
function YamlEditorComponent2(props, ref) {
|
|
38618
38623
|
const {
|
|
@@ -39553,7 +39558,7 @@ function FormModal(props) {
|
|
|
39553
39558
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
39554
39559
|
className: FormDescStyle,
|
|
39555
39560
|
children: desc
|
|
39556
|
-
}) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
|
|
39561
|
+
}) : void 0, !isYamlForm && mode === "form" && !isDisabledChangeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(Alert, {
|
|
39557
39562
|
type: "warning",
|
|
39558
39563
|
message: i18n2.t("dovetail.change_form_mode_alert"),
|
|
39559
39564
|
style: {
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-
|
|
1
|
+
import { bN, cC, A, aW, aY, aF, ca, bk, a1, co, cc, aQ, T, C, i, cG, aI, bp, ac, cI, ai, ap, cR, ax, cd, cb, cU, aM, bw, w, aD, bD, cT, cD, bG, D, b1, as, bJ, ar, at, a0, c9, c8, cS, bi, aU, ad, bQ, cF, cH, cm, aG, aj, s, q, cJ, I, bt, aT, t, M, be, bg, ce, cL, aL, bs, aq, ay, az, a8, aA, aX, aE, bE, bH, a9, d2, cn, cx, bM, N, a2, e, aV, a6, bP, by, bx, cK, b$, cZ, g, cY, aJ, bq, cg, L, ba, bb, bo, H, bc, J, bd, B, b5, cA, z, b4, G, b8, E, b6, F, b7, K, c0, b9, cz, aa, d0, c$, P, bm, v, ae, ah, b_, bj, cP, cO, a$, bu, c6, c5, p, aK, bl, x, bv, b0, d1, y, cq, cE, bK, bR, bS, d4, aH, R, ag, an, am, bL, ak, cQ, c2, al, cB, c7, bh, bA, au, h, Q, O, bf, ct, cw, cs, cr, cu, cv, cp, ch, ck, cl, cj, ci, cf, cy, bT, aN, br, aB, m, bW, l, aZ, cX, o, bX, a_, n, aS, bn, k, cW, aP, aR, c4, bC, bB, c3, aO, S, bF, cV, c_, b2, b3, bz, bI, c1, bY, bZ, ab, $, cN, af, W, cM, ao, aw, av, f, aC, bU, U, a3, d, d7, d6, d9, d3, a7, da, d5, d8, a5, a4, r, a, c, X, V, Y, Z, u, bO, _, bV, b } from "./index-c93276c4.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -8522,13 +8522,15 @@ var __publicField = (obj, key, value) => {
|
|
|
8522
8522
|
return /^[a-zA-Z]/.test(str);
|
|
8523
8523
|
}
|
|
8524
8524
|
function addSpaceBeforeLetter(str) {
|
|
8525
|
-
return isFirstLetterEnglish(str) ? ` ${str}` : str;
|
|
8525
|
+
return isFirstLetterEnglish(str) ? ` ${str.toLocaleLowerCase()}` : str;
|
|
8526
8526
|
}
|
|
8527
8527
|
const useDeleteModal_mi8he5 = "";
|
|
8528
8528
|
const TextStyle = "t1vq0ett";
|
|
8529
8529
|
const TipStyle = "t139onst";
|
|
8530
8530
|
const NameStyle$1 = "n18lzor8";
|
|
8531
|
-
const useDeleteModal = (resource
|
|
8531
|
+
const useDeleteModal = (resource, {
|
|
8532
|
+
deleteTip
|
|
8533
|
+
} = {}) => {
|
|
8532
8534
|
const configs = React.useContext(ConfigsContext);
|
|
8533
8535
|
const config = configs[resource];
|
|
8534
8536
|
const {
|
|
@@ -8571,7 +8573,7 @@ var __publicField = (obj, key, value) => {
|
|
|
8571
8573
|
})
|
|
8572
8574
|
}), /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
8573
8575
|
className: cx_default(eagle.Typo.Label.l4_regular, TipStyle),
|
|
8574
|
-
children: t2("dovetail.delete_tip")
|
|
8576
|
+
children: deleteTip || t2("dovetail.delete_tip")
|
|
8575
8577
|
})]
|
|
8576
8578
|
}),
|
|
8577
8579
|
async onOk() {
|
|
@@ -9732,7 +9734,7 @@ var __publicField = (obj, key, value) => {
|
|
|
9732
9734
|
{
|
|
9733
9735
|
modalProps: {
|
|
9734
9736
|
formRef,
|
|
9735
|
-
title: t2("dovetail.
|
|
9737
|
+
title: t2("dovetail.edit_distribute_storage"),
|
|
9736
9738
|
renderContent() {
|
|
9737
9739
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
9738
9740
|
DistributeStorageForm,
|
|
@@ -11419,8 +11421,13 @@ var __publicField = (obj, key, value) => {
|
|
|
11419
11421
|
const { globalStore } = useGlobalStore();
|
|
11420
11422
|
const useResourceResult = core.useResource();
|
|
11421
11423
|
const resource = useResourceResult.resource;
|
|
11424
|
+
const configs = React.useContext(ConfigsContext);
|
|
11425
|
+
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11422
11426
|
const { modalProps, visible, openDeleteConfirmModal } = useDeleteModal(
|
|
11423
|
-
(resource == null ? void 0 : resource.name) || ""
|
|
11427
|
+
(resource == null ? void 0 : resource.name) || "",
|
|
11428
|
+
{
|
|
11429
|
+
deleteTip: config.deleteTip
|
|
11430
|
+
}
|
|
11424
11431
|
);
|
|
11425
11432
|
const download2 = useDownloadYAML();
|
|
11426
11433
|
const { t: t2 } = useTranslation();
|
|
@@ -11434,8 +11441,6 @@ var __publicField = (obj, key, value) => {
|
|
|
11434
11441
|
resource: resource == null ? void 0 : resource.name,
|
|
11435
11442
|
action: AccessControlAuth.Delete
|
|
11436
11443
|
});
|
|
11437
|
-
const configs = React.useContext(ConfigsContext);
|
|
11438
|
-
const config = configs[(resource == null ? void 0 : resource.name) || ""];
|
|
11439
11444
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
|
|
11440
11445
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
11441
11446
|
eagle.Dropdown,
|
|
@@ -11651,7 +11656,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11651
11656
|
visible ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Modal, { ...modalProps }) : null
|
|
11652
11657
|
] });
|
|
11653
11658
|
};
|
|
11654
|
-
const
|
|
11659
|
+
const index_1iwpuwe = "";
|
|
11655
11660
|
const ToolbarWrapperStyle = "t1908hhn";
|
|
11656
11661
|
const ToolbarStyle$3 = "t1ym1gqo";
|
|
11657
11662
|
const TitleStyle$2 = "t38ugwl";
|
|
@@ -13104,8 +13109,8 @@ var __publicField = (obj, key, value) => {
|
|
|
13104
13109
|
data: donutData,
|
|
13105
13110
|
width: 70,
|
|
13106
13111
|
height: 70,
|
|
13107
|
-
innerRadius:
|
|
13108
|
-
outerRadius:
|
|
13112
|
+
innerRadius: 28,
|
|
13113
|
+
outerRadius: 34,
|
|
13109
13114
|
centerRender: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", {
|
|
13110
13115
|
className: DonutChartCenterStyle,
|
|
13111
13116
|
children: [/* @__PURE__ */ jsxRuntimeExports.jsx("span", {
|
|
@@ -39559,7 +39564,7 @@ WARNING: This link could potentially be dangerous`)) {
|
|
|
39559
39564
|
children: [desc ? /* @__PURE__ */ jsxRuntimeExports.jsx("div", {
|
|
39560
39565
|
className: FormDescStyle,
|
|
39561
39566
|
children: desc
|
|
39562
|
-
}) : void 0, !isYamlForm && mode === "form" ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Alert, {
|
|
39567
|
+
}) : void 0, !isYamlForm && mode === "form" && !isDisabledChangeMode ? /* @__PURE__ */ jsxRuntimeExports.jsx(eagle.Alert, {
|
|
39563
39568
|
type: "warning",
|
|
39564
39569
|
message: i18n2.t("dovetail.change_form_mode_alert"),
|
|
39565
39570
|
style: {
|
package/dist/style.css
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ModalProps } from '@cloudtower/eagle';
|
|
2
|
-
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const useDeleteModal: (resource: string, { deleteTip }?: {
|
|
4
|
+
deleteTip?: React.ReactNode;
|
|
5
|
+
}) => {
|
|
3
6
|
modalProps: ModalProps;
|
|
4
7
|
visible: boolean;
|
|
5
8
|
openDeleteConfirmModal: (id: string) => void;
|
package/lib/types/resource.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export type ResourceConfig<Model extends ResourceModel = ResourceModel> = {
|
|
|
46
46
|
tableProps?: Partial<InternalTableProps<Model>>;
|
|
47
47
|
isCustom?: boolean;
|
|
48
48
|
createButtonText?: string;
|
|
49
|
+
deleteTip?: string;
|
|
49
50
|
formConfig?: {
|
|
50
51
|
fields?: (props: {
|
|
51
52
|
record?: Model;
|