@churchapps/apphelper 0.3.24 → 0.3.26

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.
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIhF,qBAAa,WAAW;IAEvB,MAAM,CAAC,UAAU,EAAE,MAAM;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACtG,MAAM,CAAC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEjE,MAAM,CAAC,IAAI,eAAgB,MAAM,sBAAsB,iCAAiC,iBAAiB,KAAK,IAAI,UAGjH;IAED,MAAM,CAAC,QAAQ,cAAe,MAAM,WAAW,MAAM,WAAW,MAAM,UAoBrE;CAED"}
1
+ {"version":3,"file":"ErrorHelper.d.ts","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAIhF,qBAAa,WAAW;IAEvB,MAAM,CAAC,UAAU,EAAE,MAAM;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACtG,MAAM,CAAC,kBAAkB,EAAE,CAAC,QAAQ,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAEjE,MAAM,CAAC,IAAI,eAAgB,MAAM,sBAAsB,iCAAiC,iBAAiB,KAAK,IAAI,UAGjH;IAED,MAAM,CAAC,QAAQ,cAAe,MAAM,WAAW,MAAM,WAAW,MAAM,UAwBrE;CAED"}
@@ -27,7 +27,12 @@ ErrorHelper.logError = (errorType, message, details) => {
27
27
  console.log("ERROR LOG", log);
28
28
  if (log.errorType === "401" && log.message.indexOf("/users/login") > -1)
29
29
  return;
30
- ApiHelper_1.ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
30
+ try {
31
+ ApiHelper_1.ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
32
+ }
33
+ catch (error) {
34
+ console.log(error);
35
+ }
31
36
  if (_a.customErrorHandler)
32
37
  _a.customErrorHandler(log);
33
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorHelper.js","sourceRoot":"","sources":["../../src/helpers/ErrorHelper.ts"],"names":[],"mappings":";;;;AACA,2CAAwC;AAGxC,MAAa,WAAW;;AAAxB,kCAgCC;;AA3BO,gBAAI,GAAG,CAAC,UAAwC,EAAE,kBAAyD,EAAE,EAAE;IACrH,EAAW,CAAC,UAAU,GAAG,UAAU,CAAC;IACpC,EAAW,CAAC,kBAAkB,GAAG,kBAAkB,CAAC;AACrD,CAAC,AAHU,CAGV;AAEM,oBAAQ,GAAG,CAAC,SAAiB,EAAE,OAAe,EAAE,OAAe,EAAE,EAAE;IACzE,IAAI,EAAI,CAAC,UAAU,EAAE;QACpB,MAAM,IAAI,GAAG,EAAI,CAAC,UAAU,EAAE,CAAC;QAC/B,MAAM,GAAG,GAAsB;YAC9B,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,SAAS,EAAE,IAAI,IAAI,EAAE;YACrB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,SAAS,EAAE,SAAS;YACpB,OAAO,EAAE,OAAO;YAChB,OAAO,EAAE,OAAO;SAChB,CAAA;QAED,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;Q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AAC,cAAc,CAAC,GAAG,CAAC,CAAC;YAAE,OAAO;QAChF,IAAI;YACH,qBAAS,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,GAAG,CAAC,EAAE,eAAe,CAAC,CAAC;SACjE;QAAC,OAAO,KAAK,EAAE;YACf,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;SAClB;QACD,IAAI,EAAW,CAAC,kBAAkB;YAAE,EAAW,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC;KACxE;AACF,CAAC,AAxBc,CAwBd"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@churchapps/apphelper",
3
- "version": "0.3.24",
3
+ "version": "0.3.26",
4
4
  "description": "Library of helper functions for React and NextJS ChurchApps",
5
5
  "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
6
+ "types": "dist/index.d.ts",
7
7
  "scripts": {
8
8
  "test": "echo \"Error: no test specified\" && exit 1",
9
9
  "clean": "rimraf dist",
@@ -14,7 +14,7 @@
14
14
  "copy-assets": "npm-run-all copy-css copy-icons copy-emojis copy-languages",
15
15
  "link": "link",
16
16
  "tsc": "tsc",
17
- "prepare": "npm run build",
17
+ "prepare": "npm run build",
18
18
  "build": "npm-run-all clean tsc copy-assets",
19
19
  "updateLink": "npm-run-all clean tsc && npm rm @churchapps/apphelper -g && npm link"
20
20
  },
@@ -58,6 +58,10 @@
58
58
  "cropperjs": "^1.6.0",
59
59
  "date-fns": "^2.30.0",
60
60
  "flexsearch": "0.7.43",
61
+ "i18next": "^25.0.2",
62
+ "i18next-browser-languagedetector": "^8.1.0",
63
+ "i18next-chained-backend": "^4.6.2",
64
+ "i18next-http-backend": "^3.0.2",
61
65
  "jwt-decode": "^3.1.2",
62
66
  "lexical": "^0.12.0",
63
67
  "marked": "15.0.6",
@@ -70,6 +74,7 @@
70
74
  "react-ga4": "^2.1.0",
71
75
  "react-google-charts": "^3.0.15",
72
76
  "react-google-recaptcha": "^3.1.0",
77
+ "react-i18next": "^15.5.1",
73
78
  "react-to-print": "^2.14.13",
74
79
  "rrule": "^2.8.1",
75
80
  "slug": "^8.2.3"
@@ -29,7 +29,11 @@ export class ErrorHelper {
29
29
  console.log("ERROR LOG", log);
30
30
 
31
31
  if (log.errorType === "401" && log.message.indexOf("/users/login") > -1) return;
32
- ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
32
+ try {
33
+ ApiHelper.postAnonymous("/clientErrors", [log], "MembershipApi");
34
+ } catch (error) {
35
+ console.log(error)
36
+ }
33
37
  if (ErrorHelper.customErrorHandler) ErrorHelper.customErrorHandler(log);
34
38
  }
35
39
  }