authscape 1.0.754 → 1.0.758

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.758",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -48,7 +48,7 @@
48
48
  "html2canvas": "^1.4.1",
49
49
  "js-cookie": "^3.0.5",
50
50
  "js-file-download": "^0.4.12",
51
- "jspdf": "^3.0.0",
51
+ "jspdf": "^4.0.0",
52
52
  "query-string": "^7.1.1",
53
53
  "react": "^18.2.0",
54
54
  "react-color": "^2.19.3",
package/readme.md CHANGED
@@ -1,103 +1,103 @@
1
- # AuthScape NPM Package
2
-
3
- Complete authentication and user management solution for Next.js applications.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install authscape
9
- ```
10
-
11
- ## Quick Start
12
-
13
- See the main [AuthScape Documentation](https://authscape.com/docs) for complete setup instructions.
14
-
15
- ## Features
16
-
17
- ### Core Features
18
- - OAuth2/PKCE Authentication
19
- - Multi-tenant support
20
- - User management
21
- - Role-based permissions
22
- - Analytics integration (GA4, Microsoft Clarity)
23
- - Material-UI components
24
-
25
- ### Components
26
- - Document Manager
27
- - File Uploader
28
- - Rich Text Editor
29
- - Data Tables
30
- - Stripe Payment Integration
31
- - Google Maps Integration
32
- - And more...
33
-
34
- ## Additional Features
35
-
36
- ### Sitemap Generation (NEW!)
37
-
38
- Automatically generate SEO-friendly sitemaps for your Next.js application.
39
-
40
- **Automatic setup on install:**
41
-
42
- When you run `npm install authscape`, a sitemap is automatically configured at `/sitemap.xml` that syncs with your AuthScape content.
43
-
44
- - Supports both Pages Router and App Router
45
- - Automatically detects your Next.js project structure
46
- - Works with both `pages/` and `src/pages/` layouts
47
- - Works with both `app/` and `src/app/` layouts
48
-
49
- **To disable:** Simply delete the auto-generated file:
50
- - Pages Router: `pages/sitemap.xml.js`
51
- - App Router: `app/sitemap.xml/route.js`
52
-
53
- ## Environment Variables
54
-
55
- Required environment variables in your `.env.local`:
56
-
57
- ```env
58
- apiUri=https://your-authscape-api.com
59
- authorityUri=https://your-auth-server.com
60
- client_id=your-client-id
61
- client_secret=your-client-secret
62
- ```
63
-
64
- Optional analytics:
65
-
66
- ```env
67
- googleAnalytics4=G-XXXXXXXXXX
68
- microsoftClarityTrackingCode=xxxxxxxxxx
69
- enableDatabaseAnalytics=true
70
- ```
71
-
72
- ## Usage Example
73
-
74
- ```javascript
75
- // pages/_app.js
76
- import { AuthScapeApp } from 'authscape';
77
- import 'react-toastify/dist/ReactToastify.css';
78
-
79
- function MyApp({ Component, pageProps }) {
80
- return (
81
- <AuthScapeApp
82
- Component={Component}
83
- pageProps={pageProps}
84
- enforceLoggedIn={false}
85
- enableAuth={true}
86
- />
87
- );
88
- }
89
-
90
- export default MyApp;
91
- ```
92
-
93
- ## Documentation
94
-
95
- - [AuthScape Docs](https://authscape.com/docs) - Complete documentation
96
-
97
- ## Support
98
-
99
- For issues or questions, contact AuthScape support or visit [authscape.com](https://authscape.com).
100
-
101
- ## License
102
-
103
- ISC
1
+ # AuthScape NPM Package
2
+
3
+ Complete authentication and user management solution for Next.js applications.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install authscape
9
+ ```
10
+
11
+ ## Quick Start
12
+
13
+ See the main [AuthScape Documentation](https://authscape.com/docs) for complete setup instructions.
14
+
15
+ ## Features
16
+
17
+ ### Core Features
18
+ - OAuth2/PKCE Authentication
19
+ - Multi-tenant support
20
+ - User management
21
+ - Role-based permissions
22
+ - Analytics integration (GA4, Microsoft Clarity)
23
+ - Material-UI components
24
+
25
+ ### Components
26
+ - Document Manager
27
+ - File Uploader
28
+ - Rich Text Editor
29
+ - Data Tables
30
+ - Stripe Payment Integration
31
+ - Google Maps Integration
32
+ - And more...
33
+
34
+ ## Additional Features
35
+
36
+ ### Sitemap Generation (NEW!)
37
+
38
+ Automatically generate SEO-friendly sitemaps for your Next.js application.
39
+
40
+ **Automatic setup on install:**
41
+
42
+ When you run `npm install authscape`, a sitemap is automatically configured at `/sitemap.xml` that syncs with your AuthScape content.
43
+
44
+ - Supports both Pages Router and App Router
45
+ - Automatically detects your Next.js project structure
46
+ - Works with both `pages/` and `src/pages/` layouts
47
+ - Works with both `app/` and `src/app/` layouts
48
+
49
+ **To disable:** Simply delete the auto-generated file:
50
+ - Pages Router: `pages/sitemap.xml.js`
51
+ - App Router: `app/sitemap.xml/route.js`
52
+
53
+ ## Environment Variables
54
+
55
+ Required environment variables in your `.env.local`:
56
+
57
+ ```env
58
+ apiUri=https://your-authscape-api.com
59
+ authorityUri=https://your-auth-server.com
60
+ client_id=your-client-id
61
+ client_secret=your-client-secret
62
+ ```
63
+
64
+ Optional analytics:
65
+
66
+ ```env
67
+ googleAnalytics4=G-XXXXXXXXXX
68
+ microsoftClarityTrackingCode=xxxxxxxxxx
69
+ enableDatabaseAnalytics=true
70
+ ```
71
+
72
+ ## Usage Example
73
+
74
+ ```javascript
75
+ // pages/_app.js
76
+ import { AuthScapeApp } from 'authscape';
77
+ import 'react-toastify/dist/ReactToastify.css';
78
+
79
+ function MyApp({ Component, pageProps }) {
80
+ return (
81
+ <AuthScapeApp
82
+ Component={Component}
83
+ pageProps={pageProps}
84
+ enforceLoggedIn={false}
85
+ enableAuth={true}
86
+ />
87
+ );
88
+ }
89
+
90
+ export default MyApp;
91
+ ```
92
+
93
+ ## Documentation
94
+
95
+ - [AuthScape Docs](https://authscape.com/docs) - Complete documentation
96
+
97
+ ## Support
98
+
99
+ For issues or questions, contact AuthScape support or visit [authscape.com](https://authscape.com).
100
+
101
+ ## License
102
+
103
+ ISC
@@ -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