authscape 1.0.754 → 1.0.755

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
@@ -242,7 +242,9 @@ function AuthScapeApp(_ref) {
242
242
  if (typeof window === "undefined") return;
243
243
  if (pathName === "/signin-oidc") return;
244
244
  var host = window.location.protocol + "//" + window.location.host;
245
- apiService().post("/Analytics/PageView", {
245
+
246
+ // Use module.exports to access sibling exports in babel bundle
247
+ module.exports.apiService().post("/Analytics/PageView", {
246
248
  userId: (_signedInUser$current = signedInUser.current) === null || _signedInUser$current === void 0 ? void 0 : _signedInUser$current.id,
247
249
  locationId: (_signedInUser$current2 = signedInUser.current) === null || _signedInUser$current2 === void 0 ? void 0 : _signedInUser$current2.locationId,
248
250
  companyId: (_signedInUser$current3 = signedInUser.current) === null || _signedInUser$current3 === void 0 ? void 0 : _signedInUser$current3.companyId,
@@ -260,7 +262,8 @@ function AuthScapeApp(_ref) {
260
262
  if (!loadingAuth.current) {
261
263
  loadingAuth.current = true;
262
264
  if (enableAuth) {
263
- apiService().GetCurrentUser().then(function (usr) {
265
+ // Use module.exports to access sibling exports in babel bundle
266
+ module.exports.apiService().GetCurrentUser().then(function (usr) {
264
267
  signedInUser.current = ensureUserHelpers(usr);
265
268
  setSignedInUserState(signedInUser.current);
266
269
  setFrontEndLoadedState(true);
@@ -304,7 +307,8 @@ function AuthScapeApp(_ref) {
304
307
  // ----- Enforce login (client) -----
305
308
  (0, _react.useEffect)(function () {
306
309
  if (enforceLoggedIn && pathname !== "/signin-oidc" && frontEndLoadedState && !signedInUserState) {
307
- authService().login();
310
+ // Use module.exports to access sibling exports in babel bundle
311
+ module.exports.authService().login();
308
312
  }
309
313
  }, [signedInUserState, enforceLoggedIn, frontEndLoadedState, pathname]);
310
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.754",
3
+ "version": "1.0.755",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -163,7 +163,8 @@ export function AuthScapeApp({
163
163
 
164
164
  const host = window.location.protocol + "//" + window.location.host;
165
165
 
166
- apiService().post("/Analytics/PageView", {
166
+ // Use module.exports to access sibling exports in babel bundle
167
+ module.exports.apiService().post("/Analytics/PageView", {
167
168
  userId: signedInUser.current?.id,
168
169
  locationId: signedInUser.current?.locationId,
169
170
  companyId: signedInUser.current?.companyId,
@@ -183,7 +184,8 @@ export function AuthScapeApp({
183
184
  loadingAuth.current = true;
184
185
 
185
186
  if (enableAuth) {
186
- apiService().GetCurrentUser().then((usr) => {
187
+ // Use module.exports to access sibling exports in babel bundle
188
+ module.exports.apiService().GetCurrentUser().then((usr) => {
187
189
  signedInUser.current = ensureUserHelpers(usr);
188
190
  setSignedInUserState(signedInUser.current);
189
191
  setFrontEndLoadedState(true);
@@ -233,7 +235,8 @@ export function AuthScapeApp({
233
235
  frontEndLoadedState &&
234
236
  !signedInUserState
235
237
  ) {
236
- authService().login();
238
+ // Use module.exports to access sibling exports in babel bundle
239
+ module.exports.authService().login();
237
240
  }
238
241
  }, [signedInUserState, enforceLoggedIn, frontEndLoadedState, pathname]);
239
242