jett.admin.npmpackage 2.0.11 → 2.0.12

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
@@ -758,6 +758,10 @@ function getLogoFromJettIdCookie() {
758
758
  CDNBasePath: data.CDNBasePath
759
759
  };
760
760
  }
761
+ function getScopeFromJettIdCookie() {
762
+ const data = getJettIdCookieData();
763
+ return (data == null ? void 0 : data.Scope) ?? null;
764
+ }
761
765
  function buildLogoUrl(CDNBasePath, logoPath) {
762
766
  const base = (CDNBasePath || "").replace(/\/$/, "");
763
767
  const path = (logoPath || "").replace(/^\//, "");
@@ -772,7 +776,6 @@ var SCOPE_LABELS = {
772
776
  };
773
777
  var AppSideBar = ({
774
778
  username,
775
- scope,
776
779
  navItems,
777
780
  additionalItems,
778
781
  sideBarLogo
@@ -780,6 +783,7 @@ var AppSideBar = ({
780
783
  var _a, _b;
781
784
  const [authData, setAuthData] = (0, import_react12.useState)(null);
782
785
  const [cookieUserName, setCookieUserName] = (0, import_react12.useState)(null);
786
+ const [scope, setScope] = (0, import_react12.useState)(null);
783
787
  const [selectedCountry, setSelectedCountry] = (0, import_react12.useState)("dubai");
784
788
  const [isMobileMenuOpen, setIsMobileMenuOpen] = (0, import_react12.useState)(false);
785
789
  const [openMenus, setOpenMenus] = (0, import_react12.useState)(/* @__PURE__ */ new Set());
@@ -869,6 +873,10 @@ var AppSideBar = ({
869
873
  if (jettIdData == null ? void 0 : jettIdData.UserName) {
870
874
  setCookieUserName(jettIdData.UserName);
871
875
  }
876
+ const cookieScope = getScopeFromJettIdCookie();
877
+ if (cookieScope) {
878
+ setScope(cookieScope);
879
+ }
872
880
  }, []);
873
881
  const extractUrlFromOnClick = (onClick) => {
874
882
  if (!onClick || typeof onClick !== "function") return null;
package/dist/index.mjs CHANGED
@@ -725,6 +725,10 @@ function getLogoFromJettIdCookie() {
725
725
  CDNBasePath: data.CDNBasePath
726
726
  };
727
727
  }
728
+ function getScopeFromJettIdCookie() {
729
+ const data = getJettIdCookieData();
730
+ return (data == null ? void 0 : data.Scope) ?? null;
731
+ }
728
732
  function buildLogoUrl(CDNBasePath, logoPath) {
729
733
  const base = (CDNBasePath || "").replace(/\/$/, "");
730
734
  const path = (logoPath || "").replace(/^\//, "");
@@ -739,7 +743,6 @@ var SCOPE_LABELS = {
739
743
  };
740
744
  var AppSideBar = ({
741
745
  username,
742
- scope,
743
746
  navItems,
744
747
  additionalItems,
745
748
  sideBarLogo
@@ -747,6 +750,7 @@ var AppSideBar = ({
747
750
  var _a, _b;
748
751
  const [authData, setAuthData] = useState3(null);
749
752
  const [cookieUserName, setCookieUserName] = useState3(null);
753
+ const [scope, setScope] = useState3(null);
750
754
  const [selectedCountry, setSelectedCountry] = useState3("dubai");
751
755
  const [isMobileMenuOpen, setIsMobileMenuOpen] = useState3(false);
752
756
  const [openMenus, setOpenMenus] = useState3(/* @__PURE__ */ new Set());
@@ -836,6 +840,10 @@ var AppSideBar = ({
836
840
  if (jettIdData == null ? void 0 : jettIdData.UserName) {
837
841
  setCookieUserName(jettIdData.UserName);
838
842
  }
843
+ const cookieScope = getScopeFromJettIdCookie();
844
+ if (cookieScope) {
845
+ setScope(cookieScope);
846
+ }
839
847
  }, []);
840
848
  const extractUrlFromOnClick = (onClick) => {
841
849
  if (!onClick || typeof onClick !== "function") return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jett.admin.npmpackage",
3
- "version": "2.0.11",
3
+ "version": "2.0.12",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "exports": {