@dovetail-v2/refine 0.0.5 → 0.0.6
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.9693667c.js → MonacoYamlDiffEditor.8bad293e.js} +1 -1
- package/dist/{index.0d0d58f9.js → index.294b375a.js} +14 -7
- package/dist/refine.js +1 -1
- package/dist/refine.umd.cjs +12 -5
- package/lib/src/Dovetail.d.ts +1 -0
- package/lib/src/hooks/useEagleTable/columns.d.ts +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ var __publicField = (obj, key, value) => {
|
|
|
7
7
|
import React, { useCallback, useContext, createContext, useState, useRef, useEffect, useMemo, useLayoutEffect, forwardRef, useImperativeHandle, Suspense } from "react";
|
|
8
8
|
import { ResourceContext, matchResourceFromRoute, useResource, useForm as useForm$1, pickNotDeprecated, useWarnAboutChange, useDelete, useNavigation, useParsed, useGo, useList, useTable, useBreadcrumb, useUpdate, useDeleteMany, useShow, useMenu, Refine } from "@refinedev/core";
|
|
9
9
|
import { parse, stringify } from "qs";
|
|
10
|
-
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink,
|
|
10
|
+
import { useLocation, useHistory, useParams, matchPath, Link, Route, NavLink, Switch, Router } from "react-router-dom";
|
|
11
11
|
import { useUIKit, Icon, Typo, kitContext } from "@cloudtower/eagle";
|
|
12
12
|
import yaml from "js-yaml";
|
|
13
13
|
import { isObject, merge, get, cloneDeep, set } from "lodash-es";
|
|
@@ -9551,7 +9551,7 @@ const Separator = () => {
|
|
|
9551
9551
|
});
|
|
9552
9552
|
};
|
|
9553
9553
|
const MonacoYamlEditor = React.lazy(() => Promise.resolve().then(() => MonacoYamlEditor$2));
|
|
9554
|
-
const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.
|
|
9554
|
+
const MonacoYamlDiffEditor = React.lazy(() => import("./MonacoYamlDiffEditor.8bad293e.js"));
|
|
9555
9555
|
const YamlEditorComponent = forwardRef(
|
|
9556
9556
|
function YamlEditorComponent2(props, ref) {
|
|
9557
9557
|
const {
|
|
@@ -11614,7 +11614,7 @@ const globalStore = new GlobalStore({
|
|
|
11614
11614
|
prefix: "default"
|
|
11615
11615
|
});
|
|
11616
11616
|
const Dovetail = (props) => {
|
|
11617
|
-
const { resourcesConfig, urlPrefix, useHashUrl } = props;
|
|
11617
|
+
const { resourcesConfig, urlPrefix, useHashUrl, Layout: Layout2 } = props;
|
|
11618
11618
|
const history = useMemo(() => {
|
|
11619
11619
|
if (useHashUrl) {
|
|
11620
11620
|
return createHashHistory();
|
|
@@ -11624,6 +11624,16 @@ const Dovetail = (props) => {
|
|
|
11624
11624
|
const notCustomResources = useMemo(() => {
|
|
11625
11625
|
return resourcesConfig.filter((c) => !c.isCustom);
|
|
11626
11626
|
}, [resourcesConfig]);
|
|
11627
|
+
const content = useMemo(() => {
|
|
11628
|
+
const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(Switch, { children: [
|
|
11629
|
+
props.children,
|
|
11630
|
+
/* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix })
|
|
11631
|
+
] });
|
|
11632
|
+
if (Layout2) {
|
|
11633
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
|
|
11634
|
+
}
|
|
11635
|
+
return _content;
|
|
11636
|
+
}, [Layout2, notCustomResources, props.children, urlPrefix]);
|
|
11627
11637
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
11628
11638
|
Refine,
|
|
11629
11639
|
{
|
|
@@ -11651,10 +11661,7 @@ const Dovetail = (props) => {
|
|
|
11651
11661
|
edit: `${urlPrefix}/${c.name}/edit`
|
|
11652
11662
|
};
|
|
11653
11663
|
}),
|
|
11654
|
-
children:
|
|
11655
|
-
props.children,
|
|
11656
|
-
/* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix })
|
|
11657
|
-
] }) })
|
|
11664
|
+
children: content
|
|
11658
11665
|
}
|
|
11659
11666
|
) });
|
|
11660
11667
|
};
|
package/dist/refine.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V, $, B, a1, C, x, i, l, o, s, a2, a0, z, D, G, a7, O, T, v, I, a3, J, t, K, L, Q, M, U, N, h, Z, a5, P, k, y, a8, w, R, p, a4, A, S, F, E, H, a6, _, W, m, q, Y, e, n, g, f, r, a, c, b, d, X, u } from "./index.
|
|
1
|
+
import { V, $, B, a1, C, x, i, l, o, s, a2, a0, z, D, G, a7, O, T, v, I, a3, J, t, K, L, Q, M, U, N, h, Z, a5, P, k, y, a8, w, R, p, a4, A, S, F, E, H, a6, _, W, m, q, Y, e, n, g, f, r, a, c, b, d, X, u } from "./index.294b375a.js";
|
|
2
2
|
import "@cloudtower/eagle";
|
|
3
3
|
import "@refinedev/core";
|
|
4
4
|
import "js-yaml";
|
package/dist/refine.umd.cjs
CHANGED
|
@@ -11628,7 +11628,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11628
11628
|
prefix: "default"
|
|
11629
11629
|
});
|
|
11630
11630
|
const Dovetail = (props) => {
|
|
11631
|
-
const { resourcesConfig, urlPrefix, useHashUrl } = props;
|
|
11631
|
+
const { resourcesConfig, urlPrefix, useHashUrl, Layout: Layout2 } = props;
|
|
11632
11632
|
const history = React.useMemo(() => {
|
|
11633
11633
|
if (useHashUrl) {
|
|
11634
11634
|
return createHashHistory();
|
|
@@ -11638,6 +11638,16 @@ var __publicField = (obj, key, value) => {
|
|
|
11638
11638
|
const notCustomResources = React.useMemo(() => {
|
|
11639
11639
|
return resourcesConfig.filter((c) => !c.isCustom);
|
|
11640
11640
|
}, [resourcesConfig]);
|
|
11641
|
+
const content = React.useMemo(() => {
|
|
11642
|
+
const _content = /* @__PURE__ */ jsxRuntime.exports.jsxs(reactRouterDom.Switch, { children: [
|
|
11643
|
+
props.children,
|
|
11644
|
+
/* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix })
|
|
11645
|
+
] });
|
|
11646
|
+
if (Layout2) {
|
|
11647
|
+
return /* @__PURE__ */ jsxRuntime.exports.jsx(Layout2, { children: _content });
|
|
11648
|
+
}
|
|
11649
|
+
return _content;
|
|
11650
|
+
}, [Layout2, notCustomResources, props.children, urlPrefix]);
|
|
11641
11651
|
return /* @__PURE__ */ jsxRuntime.exports.jsx(reactRouterDom.Router, { history, children: /* @__PURE__ */ jsxRuntime.exports.jsx(
|
|
11642
11652
|
core.Refine,
|
|
11643
11653
|
{
|
|
@@ -11665,10 +11675,7 @@ var __publicField = (obj, key, value) => {
|
|
|
11665
11675
|
edit: `${urlPrefix}/${c.name}/edit`
|
|
11666
11676
|
};
|
|
11667
11677
|
}),
|
|
11668
|
-
children:
|
|
11669
|
-
props.children,
|
|
11670
|
-
/* @__PURE__ */ jsxRuntime.exports.jsx(ResourceCRUD, { configs: notCustomResources, urlPrefix })
|
|
11671
|
-
] }) })
|
|
11678
|
+
children: content
|
|
11672
11679
|
}
|
|
11673
11680
|
) });
|
|
11674
11681
|
};
|
package/lib/src/Dovetail.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { i18n } from 'i18next';
|
|
|
2
2
|
import { Column } from '../../components/Table';
|
|
3
3
|
import { JobModel, PodModel, ResourceModel } from '../../model';
|
|
4
4
|
import { WorkloadModel } from '../../model/workload-model';
|
|
5
|
-
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) =>
|
|
5
|
+
export declare const CommonSorter: (dataIndex: string[]) => (a: unknown, b: unknown) => 0 | 1 | -1;
|
|
6
6
|
export declare const NameColumnRenderer: <Model extends ResourceModel>(i18n: i18n, resource?: string) => Column<Model>;
|
|
7
7
|
export declare const NameSpaceColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|
|
8
8
|
export declare const PhaseColumnRenderer: <Model extends ResourceModel>(i18n: i18n) => Column<Model>;
|