authscape 1.0.752 → 1.0.754

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/index.js CHANGED
@@ -15,8 +15,6 @@ var _router = _interopRequireDefault(require("next/router"));
15
15
  var _ga4React = _interopRequireDefault(require("ga-4-react"));
16
16
  var _zustand = require("zustand");
17
17
  var _reactMicrosoftClarity = require("react-microsoft-clarity");
18
- var _authService = require("../services/authService");
19
- var _apiService = require("../services/apiService");
20
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
21
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
22
20
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
@@ -244,7 +242,7 @@ function AuthScapeApp(_ref) {
244
242
  if (typeof window === "undefined") return;
245
243
  if (pathName === "/signin-oidc") return;
246
244
  var host = window.location.protocol + "//" + window.location.host;
247
- (0, _apiService.apiService)().post("/Analytics/PageView", {
245
+ apiService().post("/Analytics/PageView", {
248
246
  userId: (_signedInUser$current = signedInUser.current) === null || _signedInUser$current === void 0 ? void 0 : _signedInUser$current.id,
249
247
  locationId: (_signedInUser$current2 = signedInUser.current) === null || _signedInUser$current2 === void 0 ? void 0 : _signedInUser$current2.locationId,
250
248
  companyId: (_signedInUser$current3 = signedInUser.current) === null || _signedInUser$current3 === void 0 ? void 0 : _signedInUser$current3.companyId,
@@ -262,7 +260,7 @@ function AuthScapeApp(_ref) {
262
260
  if (!loadingAuth.current) {
263
261
  loadingAuth.current = true;
264
262
  if (enableAuth) {
265
- (0, _apiService.apiService)().GetCurrentUser().then(function (usr) {
263
+ apiService().GetCurrentUser().then(function (usr) {
266
264
  signedInUser.current = ensureUserHelpers(usr);
267
265
  setSignedInUserState(signedInUser.current);
268
266
  setFrontEndLoadedState(true);
@@ -306,7 +304,7 @@ function AuthScapeApp(_ref) {
306
304
  // ----- Enforce login (client) -----
307
305
  (0, _react.useEffect)(function () {
308
306
  if (enforceLoggedIn && pathname !== "/signin-oidc" && frontEndLoadedState && !signedInUserState) {
309
- (0, _authService.authService)().login();
307
+ authService().login();
310
308
  }
311
309
  }, [signedInUserState, enforceLoggedIn, frontEndLoadedState, pathname]);
312
310
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.752",
3
+ "version": "1.0.754",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -9,8 +9,6 @@ import Router from "next/router";
9
9
  import GA4React from "ga-4-react";
10
10
  import { create } from "zustand";
11
11
  import { clarity } from "react-microsoft-clarity";
12
- import { authService } from "../services/authService";
13
- import { apiService } from "../services/apiService";
14
12
 
15
13
  // ---- optional: import your cookie util if not global ----
16
14
  // import { setCookie } from "cookies-next";