@edifice.io/react 2.2.2-develop-pedago.20250415152827 → 2.2.2-develop-pedago.20250417154221
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.
|
@@ -73,18 +73,15 @@ const InternalLinker = ({
|
|
|
73
73
|
}, [setSelectedDocuments, multiple]), toggleResourceSelection = useCallback((resource) => {
|
|
74
74
|
const index = getSelectedResourceIndex(resource.assetId);
|
|
75
75
|
index < 0 ? selectResource(resource) : setSelectedDocuments(selectedDocuments.filter((_value, i) => i !== index));
|
|
76
|
-
}, [getSelectedResourceIndex, selectResource, selectedDocuments]),
|
|
77
|
-
...option,
|
|
78
|
-
displayName: option.application === "exercizer" ? `${t2("bbm.linker.int.app.exercizer")}` : option.application === "forms" ? `${t2("bbm.linker.int.app.forms")}` : option.displayName
|
|
79
|
-
}));
|
|
76
|
+
}, [getSelectedResourceIndex, selectResource, selectedDocuments]), processApplicationDisplayName = (option) => option.application === "exercizer" ? `${t("bbm.linker.int.app.exercizer")}` : option.application === "form" ? `${t("bbm.linker.int.app.forms")}` : option.displayName;
|
|
80
77
|
return useEffect(() => {
|
|
81
78
|
(async () => {
|
|
82
79
|
if (applicationList) {
|
|
83
|
-
setOptions(
|
|
80
|
+
setOptions(applicationList.sort((app1, app2) => app1.displayName.localeCompare(app2.displayName)));
|
|
84
81
|
return;
|
|
85
82
|
}
|
|
86
83
|
const appPromises = resourceApplications.map((application) => odeServices.session().getWebApp(application)), webApps = await Promise.all(appPromises);
|
|
87
|
-
setOptions(
|
|
84
|
+
setOptions(resourceApplications.map((application, index) => {
|
|
88
85
|
var _a;
|
|
89
86
|
const displayName = ((_a = webApps[index]) == null ? void 0 : _a.displayName) ?? application;
|
|
90
87
|
return {
|
|
@@ -92,7 +89,7 @@ const InternalLinker = ({
|
|
|
92
89
|
displayName,
|
|
93
90
|
icon: /* @__PURE__ */ jsx(AppIcon, { app: webApps[index], size: "24" })
|
|
94
91
|
};
|
|
95
|
-
}).sort((app1, app2) => app1.displayName.localeCompare(app2.displayName))
|
|
92
|
+
}).sort((app1, app2) => app1.displayName.localeCompare(app2.displayName)));
|
|
96
93
|
})();
|
|
97
94
|
}, [resourceApplications, t, applicationList]), useEffect(() => {
|
|
98
95
|
loadAndDisplayResources(debounceSearch);
|
|
@@ -114,7 +111,7 @@ const InternalLinker = ({
|
|
|
114
111
|
/* @__PURE__ */ jsxs("div", { className: "search d-flex bg-light rounded-top border border-bottom-0", children: [
|
|
115
112
|
showApplicationSelector && /* @__PURE__ */ jsx("div", { className: "flex-shrink-1 px-8 py-12 border-end", children: /* @__PURE__ */ jsxs(Dropdown, { overflow: !0, children: [
|
|
116
113
|
/* @__PURE__ */ jsx(Dropdown.Trigger, { icon: /* @__PURE__ */ jsx("div", { className: "pe-8", children: (selectedApplication == null ? void 0 : selectedApplication.icon) || /* @__PURE__ */ jsx(SvgIconApplications, {}) }), label: t((selectedApplication == null ? void 0 : selectedApplication.displayName) || "bbm.linker.int.choose"), variant: "ghost", size: "md" }),
|
|
117
|
-
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: option
|
|
114
|
+
/* @__PURE__ */ jsx(Dropdown.Menu, { children: options == null ? void 0 : options.map((option) => /* @__PURE__ */ jsx(Dropdown.Item, { icon: option.icon, onClick: () => handleOptionClick(option), children: processApplicationDisplayName(option) }, option.application)) })
|
|
118
115
|
] }) }),
|
|
119
116
|
/* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
|
|
120
117
|
] }),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.2.2-develop-pedago.
|
|
3
|
+
"version": "2.2.2-develop-pedago.20250417154221",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -118,9 +118,9 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/bootstrap": "2.2.2-develop-pedago.
|
|
122
|
-
"@edifice.io/tiptap-extensions": "2.2.2-develop-pedago.
|
|
123
|
-
"@edifice.io/utilities": "2.2.2-develop-pedago.
|
|
121
|
+
"@edifice.io/bootstrap": "2.2.2-develop-pedago.20250417154221",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.2.2-develop-pedago.20250417154221",
|
|
123
|
+
"@edifice.io/utilities": "2.2.2-develop-pedago.20250417154221"
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -151,8 +151,8 @@
|
|
|
151
151
|
"vite": "^5.4.11",
|
|
152
152
|
"vite-plugin-dts": "^4.1.0",
|
|
153
153
|
"vite-tsconfig-paths": "^5.0.1",
|
|
154
|
-
"@edifice.io/client": "2.2.2-develop-pedago.
|
|
155
|
-
"@edifice.io/config": "2.2.2-develop-pedago.
|
|
154
|
+
"@edifice.io/client": "2.2.2-develop-pedago.20250417154221",
|
|
155
|
+
"@edifice.io/config": "2.2.2-develop-pedago.20250417154221"
|
|
156
156
|
},
|
|
157
157
|
"peerDependencies": {
|
|
158
158
|
"@react-spring/web": "^9.7.5",
|