ode-explorer 1.3.3-develop-pedago.202402191534 → 1.3.3-develop-pedago.202402201007
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 +16 -12
- package/dist/version.txt +1 -1
- package/lib/Library.js +6 -8
- package/lib/features/SideBar/Library/Library.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38168,11 +38168,12 @@ var hasSymbols$1 = function hasNativeSymbols() {
|
|
|
38168
38168
|
return hasSymbolSham();
|
|
38169
38169
|
};
|
|
38170
38170
|
var test = {
|
|
38171
|
+
__proto__: null,
|
|
38171
38172
|
foo: {}
|
|
38172
38173
|
};
|
|
38173
38174
|
var $Object = Object;
|
|
38174
38175
|
var hasProto$1 = function hasProto() {
|
|
38175
|
-
return { __proto__: test }.foo === test.foo && !(
|
|
38176
|
+
return { __proto__: test }.foo === test.foo && !(test instanceof $Object);
|
|
38176
38177
|
};
|
|
38177
38178
|
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
38178
38179
|
var toStr$1 = Object.prototype.toString;
|
|
@@ -62867,13 +62868,16 @@ const useLibraryUrl = () => {
|
|
|
62867
62868
|
const {
|
|
62868
62869
|
user,
|
|
62869
62870
|
appCode
|
|
62870
|
-
} = useOdeClient(), appName = libraryMaps[appCode],
|
|
62871
|
-
|
|
62872
|
-
|
|
62873
|
-
const
|
|
62874
|
-
|
|
62875
|
-
|
|
62876
|
-
|
|
62871
|
+
} = useOdeClient(), appName = libraryMaps[appCode], libraryApp = user.apps.find((app) => app.isExternal && app.address.includes("library"));
|
|
62872
|
+
if (!libraryApp)
|
|
62873
|
+
return null;
|
|
62874
|
+
const libraryUrlSplit = (_a2 = libraryApp.address) == null ? void 0 : _a2.split("?");
|
|
62875
|
+
if (!libraryUrlSplit || libraryUrlSplit.length < 2)
|
|
62876
|
+
return null;
|
|
62877
|
+
let libraryHost = libraryUrlSplit[0];
|
|
62878
|
+
libraryHost.endsWith("/") || (libraryHost = `${libraryHost}/`);
|
|
62879
|
+
const platformURLParam = libraryUrlSplit == null ? void 0 : libraryUrlSplit[1], searchParams = `application%5B0%5D=${appName}&page=1&sort_field=views&sort_order=desc`;
|
|
62880
|
+
return `${libraryHost}search/?${platformURLParam}&${searchParams}`;
|
|
62877
62881
|
}, useLibraryUrl$1 = useLibraryUrl;
|
|
62878
62882
|
function useOdeIcons() {
|
|
62879
62883
|
const iconOfWidget = {
|
|
@@ -68908,9 +68912,9 @@ const AppAction$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
|
|
|
68908
68912
|
const Library = () => {
|
|
68909
68913
|
const { t: t2 } = useTranslation();
|
|
68910
68914
|
const { theme } = useOdeTheme();
|
|
68911
|
-
const
|
|
68915
|
+
const libraryUrl = useLibraryUrl$1();
|
|
68912
68916
|
const [imagePath] = usePaths();
|
|
68913
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-16", children: [
|
|
68917
|
+
return libraryUrl && /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-16", children: [
|
|
68914
68918
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68915
68919
|
Image$2,
|
|
68916
68920
|
{
|
|
@@ -68931,8 +68935,8 @@ const Library = () => {
|
|
|
68931
68935
|
rel: "noreferrer",
|
|
68932
68936
|
className: "d-inline-flex gap-4 btn btn-ghost-primary py-0 p-0 pe-8",
|
|
68933
68937
|
children: [
|
|
68934
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68935
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
68938
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("span", { children: t2("explorer.libray.btn") }),
|
|
68939
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(SvgArrowRight$1, {})
|
|
68936
68940
|
]
|
|
68937
68941
|
}
|
|
68938
68942
|
)
|
package/dist/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
ode-explorer=1.0-b2school-SNAPSHOT
|
|
1
|
+
ode-explorer=1.0-b2school-SNAPSHOT 20/02/2024 10:07:52
|
package/lib/Library.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as i, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { ArrowRight as s } from "@edifice-ui/icons";
|
|
3
3
|
import { useOdeTheme as o, useLibraryUrl as n, usePaths as m, Image as p } from "@edifice-ui/react";
|
|
4
4
|
import { useTranslation as c } from "react-i18next";
|
|
@@ -7,15 +7,13 @@ const y = () => {
|
|
|
7
7
|
t: e
|
|
8
8
|
} = c(), {
|
|
9
9
|
theme: a
|
|
10
|
-
} = o(),
|
|
11
|
-
|
|
12
|
-
} = n(), [l] = m();
|
|
13
|
-
return /* @__PURE__ */ t("div", { className: "p-16", children: [
|
|
10
|
+
} = o(), t = n(), [l] = m();
|
|
11
|
+
return t && /* @__PURE__ */ i("div", { className: "p-16", children: [
|
|
14
12
|
/* @__PURE__ */ r(p, { width: "270", height: "140", loading: "lazy", className: "rounded", src: `${l}/${a == null ? void 0 : a.bootstrapVersion}/image-library.svg`, alt: e("explorer.libray.img.alt") }),
|
|
15
13
|
/* @__PURE__ */ r("p", { className: "m-8", children: e("explorer.libray.title") }),
|
|
16
|
-
/* @__PURE__ */
|
|
17
|
-
/* @__PURE__ */ r(
|
|
18
|
-
/* @__PURE__ */ r(
|
|
14
|
+
/* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer", className: "d-inline-flex gap-4 btn btn-ghost-primary py-0 p-0 pe-8", children: [
|
|
15
|
+
/* @__PURE__ */ r("span", { children: e("explorer.libray.btn") }),
|
|
16
|
+
/* @__PURE__ */ r(s, {})
|
|
19
17
|
] })
|
|
20
18
|
] });
|
|
21
19
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const Library: () => import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
declare const Library: () => "" | import("react/jsx-runtime").JSX.Element | null;
|
|
2
2
|
export default Library;
|
package/package.json
CHANGED