ode-explorer 2.4.4 → 2.4.5
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/index.js +34 -34
- package/dist/style.css +1 -1
- package/lib/AppAction.js +28 -24
- package/lib/components/AppAction/AppAction.d.ts +4 -1
- package/lib/config/explorer.d.ts +3 -1
- package/lib/index2.js +339 -337
- package/lib/services/queries/index.d.ts +3 -1
- package/package.json +4 -4
package/lib/AppAction.js
CHANGED
|
@@ -1,35 +1,39 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Suspense as
|
|
3
|
-
import { isActionAvailable as
|
|
4
|
-
import { useToggle as
|
|
5
|
-
import { u as
|
|
6
|
-
import { useTranslation as
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
|
|
1
|
+
import { jsxs as h, Fragment as A, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Suspense as x, lazy as I } from "react";
|
|
3
|
+
import { isActionAvailable as P } from "@edifice.io/client";
|
|
4
|
+
import { useToggle as R, useEdificeClient as y, Button as O, BlogPublic as k, LoadingScreen as v } from "@edifice.io/react";
|
|
5
|
+
import { u as F, a as T, b as j, c as B, d as w, e as z, S as E, g as L } from "./index2.js";
|
|
6
|
+
import { useTranslation as M } from "react-i18next";
|
|
7
|
+
const N = /* @__PURE__ */ I(async () => await import("./ResourceModal.js"));
|
|
8
|
+
function U({
|
|
9
|
+
onResourceCreated: l
|
|
10
|
+
}) {
|
|
11
|
+
const [c, s] = R(), a = F((o) => o.config), {
|
|
10
12
|
appCode: t
|
|
11
|
-
} =
|
|
12
|
-
t:
|
|
13
|
-
} =
|
|
14
|
-
clearSelectedItems:
|
|
15
|
-
clearSelectedIds:
|
|
16
|
-
} =
|
|
13
|
+
} = y(), {
|
|
14
|
+
t: i
|
|
15
|
+
} = M(t), {
|
|
16
|
+
clearSelectedItems: u,
|
|
17
|
+
clearSelectedIds: d
|
|
18
|
+
} = T(), {
|
|
17
19
|
data: r
|
|
18
|
-
} =
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
} = j(a == null ? void 0 : a.actions), m = r == null ? void 0 : r.find((o) => o.id === "create"), n = B(), p = w({
|
|
21
|
+
onResourceCreated: l
|
|
22
|
+
}), f = z();
|
|
23
|
+
return m ? /* @__PURE__ */ h(A, { children: [
|
|
24
|
+
/* @__PURE__ */ e(O, { type: "button", color: "primary", variant: "filled", leftIcon: /* @__PURE__ */ e(E, {}), className: "ms-auto", onClick: () => {
|
|
21
25
|
if (t == "scrapbook") {
|
|
22
|
-
|
|
23
|
-
searchParams:
|
|
26
|
+
L({
|
|
27
|
+
searchParams: f,
|
|
24
28
|
folderId: n.id
|
|
25
29
|
});
|
|
26
30
|
return;
|
|
27
31
|
}
|
|
28
|
-
|
|
29
|
-
}, children:
|
|
30
|
-
/* @__PURE__ */ e(
|
|
32
|
+
u(), d(), s();
|
|
33
|
+
}, children: i("explorer.create.title") }),
|
|
34
|
+
/* @__PURE__ */ e(x, { fallback: /* @__PURE__ */ e(v, {}), children: c && /* @__PURE__ */ e(N, { mode: "create", currentFolder: n, createResource: p, isOpen: c, onSuccess: s, onCancel: s, children: (o, C, g, S, b) => t === "blog" && P("createPublic", r) && /* @__PURE__ */ e(k, { appCode: t, isUpdating: C, resource: o, watch: g, setValue: S, register: b }) }) })
|
|
31
35
|
] }) : null;
|
|
32
36
|
}
|
|
33
37
|
export {
|
|
34
|
-
|
|
38
|
+
U as default
|
|
35
39
|
};
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { IResource } from '@edifice.io/client';
|
|
2
|
+
export default function AppAction({ onResourceCreated, }: {
|
|
3
|
+
onResourceCreated?: (resource: IResource) => void;
|
|
4
|
+
}): import("react/jsx-runtime").JSX.Element | null;
|
package/lib/config/explorer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResourceService, App, IAction, IFilter, IOrder, ResourceType } from '@edifice.io/client';
|
|
1
|
+
import { IResource, ResourceService, App, IAction, IFilter, IOrder, ResourceType } from '@edifice.io/client';
|
|
2
2
|
export interface AppParams {
|
|
3
3
|
/** Application code */
|
|
4
4
|
app: App;
|
|
@@ -20,5 +20,7 @@ export interface AppParams {
|
|
|
20
20
|
libraryAppFilter?: string;
|
|
21
21
|
/** Enable or disable Explorer Onboarding Modal */
|
|
22
22
|
enableOnboarding?: boolean;
|
|
23
|
+
/** Callback function triggered when a resource is created */
|
|
24
|
+
onResourceCreated?: (resource: IResource) => void;
|
|
23
25
|
}
|
|
24
26
|
export declare function getExplorerConfig(): AppParams;
|