@edifice.io/react 2.0.0-develop-rc.20 → 2.0.0-develop-rc.21
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
CHANGED
|
@@ -92,8 +92,7 @@ import { useResourceSearch } from "./hooks/useResourceSearch/useResourceSearch.j
|
|
|
92
92
|
import { default as default77 } from "./hooks/useToast/useToast.js";
|
|
93
93
|
import { default as default78 } from "./hooks/useUser/useUser.js";
|
|
94
94
|
import { EdificeClientProvider } from "./providers/EdificeClientProvider/EdificeClientProvider.js";
|
|
95
|
-
import {
|
|
96
|
-
import { EdificeThemeProvider } from "./providers/EdificeThemeProvider/EdificeThemeProvider.js";
|
|
95
|
+
import { EdificeThemeContext } from "./providers/EdificeThemeProvider/EdificeThemeProvider.context.js";
|
|
97
96
|
import { useEdificeTheme } from "./providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
98
97
|
import { checkUserRight } from "./utilities/check-user-rights/check-user-rights.js";
|
|
99
98
|
import { mergeRefs, setRef } from "./utilities/refs/ref.js";
|
|
@@ -120,7 +119,7 @@ export {
|
|
|
120
119
|
default14 as Dropzone,
|
|
121
120
|
DropzoneContext,
|
|
122
121
|
EdificeClientProvider,
|
|
123
|
-
|
|
122
|
+
EdificeThemeContext,
|
|
124
123
|
default15 as EmptyScreen,
|
|
125
124
|
default64 as FormControl,
|
|
126
125
|
default16 as FormText,
|
|
@@ -186,7 +185,6 @@ export {
|
|
|
186
185
|
default37 as useDropdown,
|
|
187
186
|
default38 as useDropzone,
|
|
188
187
|
useDropzoneContext,
|
|
189
|
-
useEdificeClient,
|
|
190
188
|
default39 as useEdificeIcons,
|
|
191
189
|
useEdificeTheme,
|
|
192
190
|
default74 as useHasWorkflow,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
export * from './EdificeClientProvider/EdificeClientProvider';
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './EdificeThemeProvider/EdificeThemeProvider';
|
|
2
|
+
export * from './EdificeThemeProvider/EdificeThemeProvider.context';
|
|
4
3
|
export * from './EdificeThemeProvider/EdificeThemeProvider.hook';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.0.0-develop-rc.
|
|
3
|
+
"version": "2.0.0-develop-rc.21",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -118,8 +118,8 @@
|
|
|
118
118
|
"react-slugify": "^3.0.3",
|
|
119
119
|
"swiper": "^10.1.0",
|
|
120
120
|
"ua-parser-js": "^1.0.36",
|
|
121
|
-
"@edifice.io/
|
|
122
|
-
"@edifice.io/
|
|
121
|
+
"@edifice.io/utilities": "2.0.0-develop-rc.21",
|
|
122
|
+
"@edifice.io/tiptap-extensions": "2.0.0-develop-rc.21"
|
|
123
123
|
},
|
|
124
124
|
"optionalDependencies": {
|
|
125
125
|
"@tiptap-pro/extension-mathematics": "2.2.1"
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
"rollup-plugin-visualizer": "5.12.0",
|
|
144
144
|
"vite": "^5.4.11",
|
|
145
145
|
"vite-plugin-dts": "^4.1.0",
|
|
146
|
-
"@edifice.io/ts-client": "2.0.0-develop-rc.
|
|
146
|
+
"@edifice.io/ts-client": "2.0.0-develop-rc.21"
|
|
147
147
|
},
|
|
148
148
|
"peerDependencies": {
|
|
149
149
|
"@react-spring/web": "^9.7.5",
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useEffect, useMemo } from "react";
|
|
3
|
-
import { useEdificeClient } from "../EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
4
|
-
import { EdificeThemeContext } from "./EdificeThemeProvider.context.js";
|
|
5
|
-
import useConf from "../../hooks/useConf/useConf.js";
|
|
6
|
-
function EdificeThemeProvider({
|
|
7
|
-
defaultTheme,
|
|
8
|
-
children
|
|
9
|
-
}) {
|
|
10
|
-
var _a;
|
|
11
|
-
const {
|
|
12
|
-
appCode
|
|
13
|
-
} = useEdificeClient(), confQuery = useConf({
|
|
14
|
-
appCode
|
|
15
|
-
});
|
|
16
|
-
useEffect(() => {
|
|
17
|
-
var _a2, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
18
|
-
const favicon = document.getElementById("favicon");
|
|
19
|
-
favicon.href = `${(_b = (_a2 = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a2.theme) == null ? void 0 : _b.basePath}/img/illustrations/favicon.ico`;
|
|
20
|
-
const bootstrapVersion = (_e = (_d = (_c = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _c.theme) == null ? void 0 : _d.bootstrapVersion) == null ? void 0 : _e.split("-"), dataProduct = bootstrapVersion ? bootstrapVersion[bootstrapVersion.length - 1] : void 0;
|
|
21
|
-
[{
|
|
22
|
-
data: "data-skin",
|
|
23
|
-
value: (_g = (_f = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _f.theme) == null ? void 0 : _g.skinName
|
|
24
|
-
}, {
|
|
25
|
-
data: "data-theme",
|
|
26
|
-
// WB2-1885, add npmTheme for dynamic theme on springboard
|
|
27
|
-
value: ((_i = (_h = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _h.theme) == null ? void 0 : _i.npmTheme) ?? ((_k = (_j = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _j.theme) == null ? void 0 : _k.themeName)
|
|
28
|
-
}, {
|
|
29
|
-
data: "data-product",
|
|
30
|
-
value: defaultTheme === "none" ? "" : defaultTheme ?? dataProduct
|
|
31
|
-
}].forEach((attribute) => {
|
|
32
|
-
var _a3;
|
|
33
|
-
return (_a3 = document.querySelector("html")) == null ? void 0 : _a3.setAttribute(attribute.data, attribute.value);
|
|
34
|
-
});
|
|
35
|
-
}, [confQuery == null ? void 0 : confQuery.data, defaultTheme]);
|
|
36
|
-
const values = useMemo(() => {
|
|
37
|
-
var _a2;
|
|
38
|
-
return {
|
|
39
|
-
theme: (_a2 = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a2.theme
|
|
40
|
-
};
|
|
41
|
-
}, [(_a = confQuery == null ? void 0 : confQuery.data) == null ? void 0 : _a.theme]);
|
|
42
|
-
return /* @__PURE__ */ jsx(EdificeThemeContext.Provider, { value: values, children });
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
EdificeThemeProvider
|
|
46
|
-
};
|