andoncloud-sdk 1.7.36 → 1.7.37
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 +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4026 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +17 -16
package/dist/index.js
CHANGED
|
@@ -679,9 +679,10 @@ const useAccess = (features = [], options = {}) => {
|
|
|
679
679
|
});
|
|
680
680
|
const aggregatedState = featureResults.reduce((acc, feat) => ACCESS_STATE_PRIORITY[feat.accessState] < ACCESS_STATE_PRIORITY[acc] ? feat.accessState : acc, "accessible");
|
|
681
681
|
const extraPermissionsResult = checkPermissions(extraPermissions);
|
|
682
|
-
const
|
|
682
|
+
const featurePermissions = features.flatMap((key) => {
|
|
683
683
|
return getFeature(key)?.permissions || [];
|
|
684
|
-
})
|
|
684
|
+
});
|
|
685
|
+
const allPermissionsResult = checkPermissions([...featurePermissions, ...extraPermissions]);
|
|
685
686
|
const hasAccess = aggregatedState === "accessible" && extraPermissionsResult.allAllowed;
|
|
686
687
|
const mostRestrictiveFeature = featureResults.reduce((acc, feat) => ACCESS_STATE_PRIORITY[feat.accessState] < ACCESS_STATE_PRIORITY[acc?.accessState || "accessible"] ? feat : acc, featureResults[0]);
|
|
687
688
|
const buttons = mostRestrictiveFeature?.buttons || [];
|
|
@@ -1918,10 +1919,7 @@ const baseTheme = responsiveFontSizes(createTheme({
|
|
|
1918
1919
|
}
|
|
1919
1920
|
` } },
|
|
1920
1921
|
palette: {
|
|
1921
|
-
background:
|
|
1922
|
-
default: "#090B0E",
|
|
1923
|
-
paper: "#252A32"
|
|
1924
|
-
},
|
|
1922
|
+
background: "#090B0E",
|
|
1925
1923
|
primary: {
|
|
1926
1924
|
main: "#0366EB",
|
|
1927
1925
|
light: "#71A9F4"
|
|
@@ -2008,6 +2006,7 @@ var theme_default = createTheme(baseTheme, { components: {
|
|
|
2008
2006
|
"&:last-child": { paddingBottom: 16 }
|
|
2009
2007
|
} } },
|
|
2010
2008
|
MuiDayCalendar: { styleOverrides: { weekDayLabel: { color: "#E0E0E0" } } },
|
|
2009
|
+
MuiDialog: { styleOverrides: { paper: { borderRadius: "6px" } } },
|
|
2011
2010
|
MuiDialogTitle: { styleOverrides: { root: {
|
|
2012
2011
|
textAlign: "center",
|
|
2013
2012
|
color: "white",
|
|
@@ -2018,6 +2017,12 @@ var theme_default = createTheme(baseTheme, { components: {
|
|
|
2018
2017
|
padding: "16px 24px",
|
|
2019
2018
|
background: "#252A32"
|
|
2020
2019
|
} } },
|
|
2020
|
+
MuiDialogActions: { styleOverrides: { root: {
|
|
2021
|
+
padding: "16px 24px",
|
|
2022
|
+
background: "#30353D",
|
|
2023
|
+
borderTop: "1px solid rgba(255, 255, 255, 0.08)",
|
|
2024
|
+
justifyContent: "space-evenly"
|
|
2025
|
+
} } },
|
|
2021
2026
|
MuiDialogContentText: { styleOverrides: { root: {
|
|
2022
2027
|
textAlign: "center",
|
|
2023
2028
|
color: "white"
|
|
@@ -2806,7 +2811,7 @@ const LoginModal = ({ isOpen, title, subtitle, scope, redirectPath, onSuccess, o
|
|
|
2806
2811
|
};
|
|
2807
2812
|
const OAUTH_STATE_KEY = "oauth2_state";
|
|
2808
2813
|
const generateOAuthState = () => {
|
|
2809
|
-
const bytes = crypto.getRandomValues(new Uint8Array(16));
|
|
2814
|
+
const bytes = crypto.getRandomValues(/* @__PURE__ */ new Uint8Array(16));
|
|
2810
2815
|
return Array.from(bytes, (b) => b.toString(16).padStart(2, "0")).join("");
|
|
2811
2816
|
};
|
|
2812
2817
|
const useLogin = (scope, loginProps = {}) => {
|
|
@@ -3747,10 +3752,8 @@ App.defaultProps = {
|
|
|
3747
3752
|
};
|
|
3748
3753
|
var app_default = Sentry.withProfiler(App);
|
|
3749
3754
|
//#endregion
|
|
3750
|
-
//#region src/assets/check.svg
|
|
3751
|
-
var check_default = "data:image/svg+xml,<svg width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">%0A<g id=\"Check\">%0A<path id=\"Vector\" d=\"M17.6758 3.92578L6.875 14.7266L2.32422 10.1758L1.42578 11.0742L6.42578 16.0742L6.875 16.5039L7.32422 16.0742L18.5742 4.82422L17.6758 3.92578Z\" fill=\"white\"/>%0A</g>%0A</svg>%0A";
|
|
3752
|
-
//#endregion
|
|
3753
3755
|
//#region src/core/ui/Checkbox/styled.ts
|
|
3756
|
+
const checkIcon = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M17.6758 3.92578L6.875 14.7266L2.32422 10.1758L1.42578 11.0742L6.42578 16.0742L6.875 16.5039L7.32422 16.0742L18.5742 4.82422L17.6758 3.92578Z' fill='white'/%3E%3C/svg%3E";
|
|
3754
3757
|
const UncheckedIcon$1 = styled$1("span")(({ theme }) => ({
|
|
3755
3758
|
width: "16px",
|
|
3756
3759
|
height: "16px",
|
|
@@ -3771,7 +3774,7 @@ const CheckedIcon$1 = styled$1(UncheckedIcon$1)(({ theme }) => ({
|
|
|
3771
3774
|
height: "16px",
|
|
3772
3775
|
top: 0,
|
|
3773
3776
|
left: 0,
|
|
3774
|
-
background: `url(${
|
|
3777
|
+
background: `url("${checkIcon}") no-repeat center`,
|
|
3775
3778
|
backgroundSize: "80%"
|
|
3776
3779
|
}
|
|
3777
3780
|
}));
|