@dovetail-v2/refine 0.2.3-alpha.0 → 0.2.3
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-4d765c36.js → MonacoYamlDiffEditor-f0e8bc5c.js} +1 -1
- package/dist/{MonacoYamlEditor-267b3405.js → MonacoYamlEditor-bac0d2aa.js} +1 -1
- package/dist/{index-49e0db41.js → index-3f683ca1.js} +39 -47
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +36 -44
- package/package.json +3 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-
|
|
1
|
+
import { j as jsxRuntimeExports, c as cx_default, Y as YamlEditorStyle } from "./index-3f683ca1.js";
|
|
2
2
|
import * as monaco from "monaco-editor";
|
|
3
3
|
import { setDiagnosticsOptions } from "monaco-yaml";
|
|
4
4
|
import { useRef, useEffect } from "react";
|
|
@@ -13611,7 +13611,7 @@ const PodLogTab = (i18n2) => ({
|
|
|
13611
13611
|
]
|
|
13612
13612
|
});
|
|
13613
13613
|
const NetworkPolicyRulesViewer_r6jity = "";
|
|
13614
|
-
const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-
|
|
13614
|
+
const MonacoYamlEditor$1 = lazy(() => import("./MonacoYamlEditor-bac0d2aa.js"));
|
|
13615
13615
|
const EditorStyle$1 = "e1cjl2b8";
|
|
13616
13616
|
const NetworkPolicyRulesViewer = ({
|
|
13617
13617
|
ingressOrEgress,
|
|
@@ -16794,53 +16794,45 @@ function immutableSet(obj, path2, value2) {
|
|
|
16794
16794
|
return setWith(clone(obj), path2, value2, clone);
|
|
16795
16795
|
}
|
|
16796
16796
|
function usePathMap(options) {
|
|
16797
|
-
const { pathMap, transformInitValues, transformApplyValues } = options;
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
|
|
16826
|
-
|
|
16827
|
-
|
|
16828
|
-
result = immutableSet(
|
|
16829
|
-
values,
|
|
16830
|
-
from,
|
|
16831
|
-
get$2(result, to)
|
|
16832
|
-
);
|
|
16833
|
-
const toPath = [...to];
|
|
16834
|
-
const lastKey = toPath.pop();
|
|
16835
|
-
if (lastKey) {
|
|
16836
|
-
const obj = get$2(result, toPath);
|
|
16837
|
-
if (obj && typeof obj === "object") {
|
|
16838
|
-
delete obj[lastKey];
|
|
16839
|
-
}
|
|
16797
|
+
const { pathMap, transformInitValues: transformInitValuesFromOptions, transformApplyValues: transformApplyValuesFromOptions } = options;
|
|
16798
|
+
const transformInitValues = useCallback((values) => {
|
|
16799
|
+
const initValues = values._rawYaml || values;
|
|
16800
|
+
let result = initValues;
|
|
16801
|
+
for (const { from, to } of pathMap || []) {
|
|
16802
|
+
result = immutableSet(initValues, to, get$2(initValues, from));
|
|
16803
|
+
const fromPath = [...from];
|
|
16804
|
+
const lastKey = fromPath.pop();
|
|
16805
|
+
if (lastKey) {
|
|
16806
|
+
const obj = get$2(result, fromPath);
|
|
16807
|
+
if (obj && typeof obj === "object") {
|
|
16808
|
+
delete obj[lastKey];
|
|
16809
|
+
}
|
|
16810
|
+
}
|
|
16811
|
+
}
|
|
16812
|
+
return (transformInitValuesFromOptions == null ? void 0 : transformInitValuesFromOptions(result)) || result;
|
|
16813
|
+
}, [transformInitValuesFromOptions, pathMap]);
|
|
16814
|
+
const transformApplyValues = useCallback((values) => {
|
|
16815
|
+
let result = values;
|
|
16816
|
+
for (const { from, to } of pathMap || []) {
|
|
16817
|
+
result = immutableSet(
|
|
16818
|
+
values,
|
|
16819
|
+
from,
|
|
16820
|
+
get$2(result, to)
|
|
16821
|
+
);
|
|
16822
|
+
const toPath = [...to];
|
|
16823
|
+
const lastKey = toPath.pop();
|
|
16824
|
+
if (lastKey) {
|
|
16825
|
+
const obj = get$2(result, toPath);
|
|
16826
|
+
if (obj && typeof obj === "object") {
|
|
16827
|
+
delete obj[lastKey];
|
|
16840
16828
|
}
|
|
16841
16829
|
}
|
|
16842
|
-
return (transformApplyValues == null ? void 0 : transformApplyValues(result)) || result;
|
|
16843
16830
|
}
|
|
16831
|
+
return (transformApplyValuesFromOptions == null ? void 0 : transformApplyValuesFromOptions(result)) || result;
|
|
16832
|
+
}, [transformApplyValuesFromOptions, pathMap]);
|
|
16833
|
+
return {
|
|
16834
|
+
transformInitValues,
|
|
16835
|
+
transformApplyValues
|
|
16844
16836
|
};
|
|
16845
16837
|
}
|
|
16846
16838
|
function useFieldsConfig(config, formConfig, resourceId) {
|
|
@@ -17704,8 +17696,8 @@ const PlainCodeStyle = "pqch97v";
|
|
|
17704
17696
|
const ErrorMsgStyle = "eh2qjnl";
|
|
17705
17697
|
const ErrorWrapperStyle = "e19q2bnp";
|
|
17706
17698
|
const YamlEditorStyle = "y16u5v3w";
|
|
17707
|
-
const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-
|
|
17708
|
-
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-
|
|
17699
|
+
const MonacoYamlEditor = React__default.lazy(() => import("./MonacoYamlEditor-bac0d2aa.js"));
|
|
17700
|
+
const MonacoYamlDiffEditor = React__default.lazy(() => import("./MonacoYamlDiffEditor-f0e8bc5c.js"));
|
|
17709
17701
|
const YamlEditorComponent = forwardRef(
|
|
17710
17702
|
function YamlEditorComponent2(props, ref) {
|
|
17711
17703
|
const {
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bR, cH, A, a_, b0, aJ, cf, bo, a5, ct, ch, aU, X, C, m, cN, aM, bt, ag, cP, am, at, cY, aB, ci, cg, c$, aQ, bA, z, aH, bH, c_, cI, bK, D, b5, aw, bN, av, ax, a4, ce, cd, cZ, bm, aY, cK, ah, bU, cM, cL, cO, cr, aK, an, w, v, cQ, I, bx, aX, x, T, bi, bk, cj, cS, aP, bw, au, aC, aD, ac, aE, a$, aI, bI, bL, ad, d9, cs, cC, bQ, N, a6, h, aZ, aa, bT, bC, bB, cR, c4, d4, k, d3, aN, bu, cl, Q, be, bf, bs, L, bg, M, bh, G, b9, cF, F, b8, K, bc, H, ba, J, bb, O, c5, bd, cE, ae, d7, d6, P, bq, y, ai, al, c3, bn, cW, cV, b3, by, cb, ca, t, aO, bp, B, bz, b4, d8, E, cv, cJ, bO, bW, bX, db, aL, R, ak, ar, aq, bP, ao, cX, c7, ap, cG, cc, bl, bE, ay, l, V, U, bj, cy, cB, cx, cw, cz, cA, cu, cm, cp, cq, co, cn, ck, cD, bY, aR, bv, aF, p, b$, o, b1, d2, s, c0, b2, q, aW, br, n, d1, aT, aV, c9, bG, bF, c8, aS, S, bJ, d0, d5, b6, b7, bD, bM, c6, c1, c2, af, a3, cU, aj, W, cT, as, aA, az, i, aG, bZ, Z, a7, d, de, dd, dg, da, ab, dh, dc, bV, df, a9, a8, r, a, e, f, $, _, a0, g, a1, u, bS, a2, b_, b } from "./index-
|
|
1
|
+
import { bR, cH, A, a_, b0, aJ, cf, bo, a5, ct, ch, aU, X, C, m, cN, aM, bt, ag, cP, am, at, cY, aB, ci, cg, c$, aQ, bA, z, aH, bH, c_, cI, bK, D, b5, aw, bN, av, ax, a4, ce, cd, cZ, bm, aY, cK, ah, bU, cM, cL, cO, cr, aK, an, w, v, cQ, I, bx, aX, x, T, bi, bk, cj, cS, aP, bw, au, aC, aD, ac, aE, a$, aI, bI, bL, ad, d9, cs, cC, bQ, N, a6, h, aZ, aa, bT, bC, bB, cR, c4, d4, k, d3, aN, bu, cl, Q, be, bf, bs, L, bg, M, bh, G, b9, cF, F, b8, K, bc, H, ba, J, bb, O, c5, bd, cE, ae, d7, d6, P, bq, y, ai, al, c3, bn, cW, cV, b3, by, cb, ca, t, aO, bp, B, bz, b4, d8, E, cv, cJ, bO, bW, bX, db, aL, R, ak, ar, aq, bP, ao, cX, c7, ap, cG, cc, bl, bE, ay, l, V, U, bj, cy, cB, cx, cw, cz, cA, cu, cm, cp, cq, co, cn, ck, cD, bY, aR, bv, aF, p, b$, o, b1, d2, s, c0, b2, q, aW, br, n, d1, aT, aV, c9, bG, bF, c8, aS, S, bJ, d0, d5, b6, b7, bD, bM, c6, c1, c2, af, a3, cU, aj, W, cT, as, aA, az, i, aG, bZ, Z, a7, d, de, dd, dg, da, ab, dh, dc, bV, df, a9, a8, r, a, e, f, $, _, a0, g, a1, u, bS, a2, b_, b } from "./index-3f683ca1.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "react";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -16791,53 +16791,45 @@ var __publicField = (obj, key, value) => {
|
|
|
16791
16791
|
return lodashEs.setWith(lodashEs.clone(obj), path2, value2, lodashEs.clone);
|
|
16792
16792
|
}
|
|
16793
16793
|
function usePathMap(options) {
|
|
16794
|
-
const { pathMap, transformInitValues, transformApplyValues } = options;
|
|
16795
|
-
|
|
16796
|
-
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16800
|
-
|
|
16801
|
-
|
|
16802
|
-
|
|
16803
|
-
|
|
16804
|
-
|
|
16805
|
-
|
|
16806
|
-
|
|
16807
|
-
|
|
16808
|
-
|
|
16809
|
-
|
|
16810
|
-
|
|
16811
|
-
|
|
16812
|
-
|
|
16813
|
-
|
|
16814
|
-
|
|
16815
|
-
|
|
16816
|
-
|
|
16817
|
-
|
|
16818
|
-
|
|
16819
|
-
|
|
16820
|
-
|
|
16821
|
-
|
|
16822
|
-
|
|
16823
|
-
|
|
16824
|
-
|
|
16825
|
-
result = immutableSet(
|
|
16826
|
-
values,
|
|
16827
|
-
from,
|
|
16828
|
-
lodashEs.get(result, to)
|
|
16829
|
-
);
|
|
16830
|
-
const toPath = [...to];
|
|
16831
|
-
const lastKey = toPath.pop();
|
|
16832
|
-
if (lastKey) {
|
|
16833
|
-
const obj = lodashEs.get(result, toPath);
|
|
16834
|
-
if (obj && typeof obj === "object") {
|
|
16835
|
-
delete obj[lastKey];
|
|
16836
|
-
}
|
|
16794
|
+
const { pathMap, transformInitValues: transformInitValuesFromOptions, transformApplyValues: transformApplyValuesFromOptions } = options;
|
|
16795
|
+
const transformInitValues = React.useCallback((values) => {
|
|
16796
|
+
const initValues = values._rawYaml || values;
|
|
16797
|
+
let result = initValues;
|
|
16798
|
+
for (const { from, to } of pathMap || []) {
|
|
16799
|
+
result = immutableSet(initValues, to, lodashEs.get(initValues, from));
|
|
16800
|
+
const fromPath = [...from];
|
|
16801
|
+
const lastKey = fromPath.pop();
|
|
16802
|
+
if (lastKey) {
|
|
16803
|
+
const obj = lodashEs.get(result, fromPath);
|
|
16804
|
+
if (obj && typeof obj === "object") {
|
|
16805
|
+
delete obj[lastKey];
|
|
16806
|
+
}
|
|
16807
|
+
}
|
|
16808
|
+
}
|
|
16809
|
+
return (transformInitValuesFromOptions == null ? void 0 : transformInitValuesFromOptions(result)) || result;
|
|
16810
|
+
}, [transformInitValuesFromOptions, pathMap]);
|
|
16811
|
+
const transformApplyValues = React.useCallback((values) => {
|
|
16812
|
+
let result = values;
|
|
16813
|
+
for (const { from, to } of pathMap || []) {
|
|
16814
|
+
result = immutableSet(
|
|
16815
|
+
values,
|
|
16816
|
+
from,
|
|
16817
|
+
lodashEs.get(result, to)
|
|
16818
|
+
);
|
|
16819
|
+
const toPath = [...to];
|
|
16820
|
+
const lastKey = toPath.pop();
|
|
16821
|
+
if (lastKey) {
|
|
16822
|
+
const obj = lodashEs.get(result, toPath);
|
|
16823
|
+
if (obj && typeof obj === "object") {
|
|
16824
|
+
delete obj[lastKey];
|
|
16837
16825
|
}
|
|
16838
16826
|
}
|
|
16839
|
-
return (transformApplyValues == null ? void 0 : transformApplyValues(result)) || result;
|
|
16840
16827
|
}
|
|
16828
|
+
return (transformApplyValuesFromOptions == null ? void 0 : transformApplyValuesFromOptions(result)) || result;
|
|
16829
|
+
}, [transformApplyValuesFromOptions, pathMap]);
|
|
16830
|
+
return {
|
|
16831
|
+
transformInitValues,
|
|
16832
|
+
transformApplyValues
|
|
16841
16833
|
};
|
|
16842
16834
|
}
|
|
16843
16835
|
function useFieldsConfig(config, formConfig, resourceId) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dovetail-v2/refine",
|
|
3
|
-
"version": "0.2.3
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"@playwright/test": "^1.39.0",
|
|
59
59
|
"@refinedev/cli": "^2.9.0",
|
|
60
60
|
"@rollup/pluginutils": "^4.2.1",
|
|
61
|
+
"@testing-library/react-hooks": "7",
|
|
61
62
|
"@types/body-parser": "^1.19.5",
|
|
62
63
|
"@types/jest": "^29",
|
|
63
64
|
"@types/js-yaml": "^4.0.6",
|
|
@@ -76,6 +77,7 @@
|
|
|
76
77
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
77
78
|
"eslint-plugin-react-refresh": "^0.3.4",
|
|
78
79
|
"jest": "^29",
|
|
80
|
+
"jest-environment-jsdom": "^30.0.0",
|
|
79
81
|
"kubernetes-types": "^1.26.0",
|
|
80
82
|
"sass": "1.51.0",
|
|
81
83
|
"ts-jest": "^29",
|