@churchapps/apphelper-login 0.5.0 → 0.5.5

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/README.md CHANGED
@@ -1,104 +1,104 @@
1
- # @churchapps/apphelper-login
2
-
3
- Login and authentication components for ChurchApps applications.
4
-
5
- ## Features
6
-
7
- - **LoginPage** - Complete login page with tabs for login, register, and forgot password
8
- - **Login** - Simple login form component
9
- - **Register** - User registration form
10
- - **Forgot** - Password recovery form
11
- - **LoginSetPassword** - Password reset component
12
- - **SelectChurchSearch** - Church search functionality
13
- - **SelectChurchRegister** - New church registration
14
- - **SelectChurchModal** - Church selection modal
15
-
16
- ## Language Support
17
-
18
- The components include built-in English fallback values for all labels, ensuring they work even without language files present.
19
-
20
- ### Internationalization (i18n)
21
-
22
- The components support full internationalization through language files. When language files are available, they will be used automatically. If no language files are found, the components fall back to English labels.
23
-
24
- #### Supported Languages
25
- - English (en) - Built-in fallbacks
26
- - German (de)
27
- - Spanish (es)
28
- - French (fr)
29
- - Hindi (hi)
30
- - Italian (it)
31
- - Korean (ko)
32
- - Norwegian (no)
33
- - Portuguese (pt)
34
- - Russian (ru)
35
- - Tagalog (tl)
36
- - Chinese (zh)
37
-
38
- #### Using with Language Files
39
-
40
- ```javascript
41
- import { Locale } from '@churchapps/apphelper-login';
42
-
43
- // Initialize with language backends
44
- await Locale.init([
45
- '/locales/{{lng}}.json',
46
- 'https://api.example.com/translations/{{lng}}.json'
47
- ]);
48
- ```
49
-
50
- #### Using Without Language Files
51
-
52
- The components work automatically without any setup - they use English fallbacks:
53
-
54
- ```javascript
55
- import { LoginPage } from '@churchapps/apphelper-login';
56
-
57
- // No language initialization needed - fallbacks are automatic
58
- <LoginPage {...props} />
59
- ```
60
-
61
- ## Installation
62
-
63
- ```bash
64
- npm install @churchapps/apphelper-login
65
- ```
66
-
67
- ## Dependencies
68
-
69
- - `@churchapps/helpers` - Core utilities and interfaces
70
- - `@churchapps/apphelper` - UI components (InputBox, ErrorMessages, etc.)
71
- - React 19+
72
- - Material-UI 7+
73
- - i18next (for internationalization)
74
-
75
- ## Usage
76
-
77
- ```javascript
78
- import { LoginPage, Login, Register } from '@churchapps/apphelper-login';
79
-
80
- // Full login page
81
- <LoginPage
82
- context={userContext}
83
- appName="My App"
84
- appUrl={window.location.href}
85
- handleRedirect={(url) => navigate(url)}
86
- />
87
-
88
- // Simple login form
89
- <Login
90
- context={userContext}
91
- appName="My App"
92
- onSuccess={() => console.log('Success')}
93
- />
94
- ```
95
-
96
- ## Playground
97
-
98
- A development playground is available for testing components:
99
-
100
- ```bash
101
- npm run test:login
102
- ```
103
-
1
+ # @churchapps/apphelper-login
2
+
3
+ Login and authentication components for ChurchApps applications.
4
+
5
+ ## Features
6
+
7
+ - **LoginPage** - Complete login page with tabs for login, register, and forgot password
8
+ - **Login** - Simple login form component
9
+ - **Register** - User registration form
10
+ - **Forgot** - Password recovery form
11
+ - **LoginSetPassword** - Password reset component
12
+ - **SelectChurchSearch** - Church search functionality
13
+ - **SelectChurchRegister** - New church registration
14
+ - **SelectChurchModal** - Church selection modal
15
+
16
+ ## Language Support
17
+
18
+ The components include built-in English fallback values for all labels, ensuring they work even without language files present.
19
+
20
+ ### Internationalization (i18n)
21
+
22
+ The components support full internationalization through language files. When language files are available, they will be used automatically. If no language files are found, the components fall back to English labels.
23
+
24
+ #### Supported Languages
25
+ - English (en) - Built-in fallbacks
26
+ - German (de)
27
+ - Spanish (es)
28
+ - French (fr)
29
+ - Hindi (hi)
30
+ - Italian (it)
31
+ - Korean (ko)
32
+ - Norwegian (no)
33
+ - Portuguese (pt)
34
+ - Russian (ru)
35
+ - Tagalog (tl)
36
+ - Chinese (zh)
37
+
38
+ #### Using with Language Files
39
+
40
+ ```javascript
41
+ import { Locale } from '@churchapps/apphelper-login';
42
+
43
+ // Initialize with language backends
44
+ await Locale.init([
45
+ '/locales/{{lng}}.json',
46
+ 'https://api.example.com/translations/{{lng}}.json'
47
+ ]);
48
+ ```
49
+
50
+ #### Using Without Language Files
51
+
52
+ The components work automatically without any setup - they use English fallbacks:
53
+
54
+ ```javascript
55
+ import { LoginPage } from '@churchapps/apphelper-login';
56
+
57
+ // No language initialization needed - fallbacks are automatic
58
+ <LoginPage {...props} />
59
+ ```
60
+
61
+ ## Installation
62
+
63
+ ```bash
64
+ npm install @churchapps/apphelper-login
65
+ ```
66
+
67
+ ## Dependencies
68
+
69
+ - `@churchapps/helpers` - Core utilities and interfaces
70
+ - `@churchapps/apphelper` - UI components (InputBox, ErrorMessages, etc.)
71
+ - React 19+
72
+ - Material-UI 7+
73
+ - i18next (for internationalization)
74
+
75
+ ## Usage
76
+
77
+ ```javascript
78
+ import { LoginPage, Login, Register } from '@churchapps/apphelper-login';
79
+
80
+ // Full login page
81
+ <LoginPage
82
+ context={userContext}
83
+ appName="My App"
84
+ appUrl={window.location.href}
85
+ handleRedirect={(url) => navigate(url)}
86
+ />
87
+
88
+ // Simple login form
89
+ <Login
90
+ context={userContext}
91
+ appName="My App"
92
+ onSuccess={() => console.log('Success')}
93
+ />
94
+ ```
95
+
96
+ ## Playground
97
+
98
+ A development playground is available for testing components:
99
+
100
+ ```bash
101
+ npm run test:login
102
+ ```
103
+
104
104
  This will start a browser-based playground where you can interact with all components.
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAE1B,MAAM,CAAC,IAAI,aAKV;IAED,MAAM,CAAC,WAAW,aAKjB;IAED,MAAM,CAAC,QAAQ,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,EAAE,QAAO,MAAM,UAKjE;IAED,OAAO,CAAC,MAAM,CAAC,YAAY,CAG1B;CAEF"}
1
+ {"version":3,"file":"AnalyticsHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.ts"],"names":[],"mappings":"AAGA,qBAAa,eAAe;IAE1B,MAAM,CAAC,IAAI,aASV;IAED,MAAM,CAAC,WAAW,aASjB;IAED,MAAM,CAAC,QAAQ,GAAI,UAAU,MAAM,EAAE,QAAQ,MAAM,EAAE,QAAO,MAAM,UASjE;IAED,OAAO,CAAC,MAAM,CAAC,YAAY,CAG1B;CAEF"}
@@ -6,20 +6,35 @@ export class AnalyticsHelper {
6
6
  _a = AnalyticsHelper;
7
7
  AnalyticsHelper.init = () => {
8
8
  if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
9
- ReactGA.initialize([{ trackingId: CommonEnvironmentHelper.GoogleAnalyticsTag }]);
10
- _a.logPageView();
9
+ try {
10
+ ReactGA.initialize([{ trackingId: CommonEnvironmentHelper.GoogleAnalyticsTag }]);
11
+ _a.logPageView();
12
+ }
13
+ catch (error) {
14
+ console.warn('Analytics initialization failed:', error);
15
+ }
11
16
  }
12
17
  };
13
18
  AnalyticsHelper.logPageView = () => {
14
19
  if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
15
- _a.setChurchKey();
16
- ReactGA.send({ hitType: "pageview", page: window.location.pathname + window.location.search });
20
+ try {
21
+ _a.setChurchKey();
22
+ ReactGA.send({ hitType: "pageview", page: window.location.pathname + window.location.search });
23
+ }
24
+ catch (error) {
25
+ console.warn('Analytics page view logging failed:', error);
26
+ }
17
27
  }
18
28
  };
19
29
  AnalyticsHelper.logEvent = (category, action, label) => {
20
30
  if (CommonEnvironmentHelper.GoogleAnalyticsTag !== "" && typeof (window) !== "undefined") {
21
- _a.setChurchKey();
22
- ReactGA.event({ category, action, label });
31
+ try {
32
+ _a.setChurchKey();
33
+ ReactGA.event({ category, action, label });
34
+ }
35
+ catch (error) {
36
+ console.warn('Analytics event logging failed:', error);
37
+ }
23
38
  }
24
39
  };
25
40
  AnalyticsHelper.setChurchKey = () => {
@@ -1 +1 @@
1
- {"version":3,"file":"AnalyticsHelper.js","sourceRoot":"","sources":["../../src/helpers/AnalyticsHelper.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AAC;QAC7D,CAAC;IACH,CAAC;AACH,CAAC,AATiB,CASjB;AAEM,wBAAQ,GAAG,CAAC,QAAgB,EAAE,MAAc,EAAE,KAAa,EAAE,EAAE;IACpE,IAAI,uBAAuB,CAAC,kBAAkB,KAAK,EAAE,IAAI,OAAM,CAAC,MAAM,CAAC,KAAG,WAAW,EAAE,CAAC;QACtF,IAAI,CAAC;YACH,EAAI,CAAC,YAAY,EAAE,CAAC;YACpB,OAAO,CAAC,KAAK,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC;IACH,CAAC;AACH,CAAC,AATc,CASd;AAEc,4BAAY,GAAG,GAAG,EAAE;IACjC,MAAM,SAAS,GAAG,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,SAAS,CAAC;IACnE,IAAI,SAAS;QAAE,OAAO,CAAC,GAAG,CAAC,EAAC,UAAU,EAAE,SAAS,EAAE,CAAC,CAAC;AACvD,CAAC,AAH0B,CAG1B"}
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
- {
2
- "name": "@churchapps/apphelper-login",
3
- "version": "0.5.0",
4
- "description": "Login components for ChurchApps AppHelper",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "types": "dist/index.d.ts",
8
- "scripts": {
9
- "test": "echo \"Error: no test specified\" && exit 1",
10
- "clean": "rimraf dist",
11
- "tsc": "tsc",
12
- "build": "npm-run-all clean tsc"
13
- },
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/LiveChurchSolutions/AppHelper.git"
17
- },
18
- "keywords": [
19
- "ChurchApps",
20
- "login",
21
- "authentication"
22
- ],
23
- "author": "ChurchApps.org",
24
- "license": "MIT",
25
- "bugs": {
26
- "url": "https://github.com/LiveChurchSolutions/AppHelper/issues"
27
- },
28
- "homepage": "https://github.com/LiveChurchSolutions/AppHelper#readme",
29
- "peerDependencies": {
30
- "@churchapps/helpers": "^1.2.3",
31
- "@churchapps/apphelper": "^0.5.0",
32
- "react": "^18.0.0 || ^19.0.0",
33
- "react-dom": "^18.0.0 || ^19.0.0",
34
- "react-router-dom": "^7.6.3"
35
- },
36
- "dependencies": {
37
- "@emotion/react": "^11.14.0",
38
- "@emotion/styled": "^11.14.1",
39
- "@mui/material": "^7.3.1",
40
- "axios": "^1.11.0",
41
- "i18next": "^25.3.2",
42
- "jwt-decode": "^4.0.0",
43
- "react-cookie": "^8.0.1",
44
- "react-google-recaptcha": "^3.1.0",
45
- "react-i18next": "^15.6.1",
46
- "react-ga4": "^2.1.0"
47
- },
48
- "devDependencies": {
49
- "@types/node": "^24.2.0",
50
- "@types/react": "^19.1.9",
51
- "@types/react-dom": "^19.1.7",
52
- "@types/react-google-recaptcha": "^2.1.9",
53
- "npm-run-all2": "^8.0.4",
54
- "rimraf": "^6.0.1",
55
- "typescript": "^5.9.2"
56
- }
57
- }
1
+ {
2
+ "name": "@churchapps/apphelper-login",
3
+ "version": "0.5.5",
4
+ "description": "Login components for ChurchApps AppHelper",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "scripts": {
9
+ "test": "echo \"Error: no test specified\" && exit 1",
10
+ "clean": "rimraf dist",
11
+ "tsc": "tsc",
12
+ "build": "npm-run-all clean tsc"
13
+ },
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/LiveChurchSolutions/AppHelper.git"
17
+ },
18
+ "keywords": [
19
+ "ChurchApps",
20
+ "login",
21
+ "authentication"
22
+ ],
23
+ "author": "ChurchApps.org",
24
+ "license": "MIT",
25
+ "bugs": {
26
+ "url": "https://github.com/LiveChurchSolutions/AppHelper/issues"
27
+ },
28
+ "homepage": "https://github.com/LiveChurchSolutions/AppHelper#readme",
29
+ "peerDependencies": {
30
+ "@churchapps/helpers": "^1.2.3",
31
+ "@churchapps/apphelper": "^0.5.5",
32
+ "react": "^18.0.0 || ^19.0.0",
33
+ "react-dom": "^18.0.0 || ^19.0.0",
34
+ "react-router-dom": "^7.6.3"
35
+ },
36
+ "dependencies": {
37
+ "@emotion/react": "^11.14.0",
38
+ "@emotion/styled": "^11.14.1",
39
+ "@mui/material": "^7.3.1",
40
+ "axios": "^1.11.0",
41
+ "i18next": "^25.3.2",
42
+ "jwt-decode": "^4.0.0",
43
+ "react-cookie": "^8.0.1",
44
+ "react-google-recaptcha": "^3.1.0",
45
+ "react-i18next": "^15.6.1",
46
+ "react-ga4": "^2.1.0"
47
+ },
48
+ "devDependencies": {
49
+ "@types/node": "^24.2.0",
50
+ "@types/react": "^19.1.9",
51
+ "@types/react-dom": "^19.1.7",
52
+ "@types/react-google-recaptcha": "^2.1.9",
53
+ "npm-run-all2": "^8.0.4",
54
+ "rimraf": "^6.0.1",
55
+ "typescript": "^5.9.2"
56
+ }
57
+ }