@bigbinary/neeto-commons-frontend 4.13.93 → 4.13.94-beta.1

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.
Files changed (78) hide show
  1. package/README.md +1 -0
  2. package/configs/esbuild/index.js +4 -0
  3. package/configs/esbuild/plugins/packageTranslations.js +16 -0
  4. package/configs/esbuild/plugins/preval.js +16 -6
  5. package/configs/esbuild/plugins/reactGiphy.js +1 -0
  6. package/configs/scripts/buildTranslationImports.js +21 -0
  7. package/configs/scripts/getEnglishTranslation.js +11 -0
  8. package/configs/utils/packageTranslations.js +90 -0
  9. package/configs/vite/index.js +5 -0
  10. package/configs/vite/plugins/packageTranslations.js +14 -0
  11. package/configs/vite/plugins/preval.js +17 -11
  12. package/dist/cjs/initializers/i18n.js +120 -183
  13. package/dist/cjs/initializers/i18n.js.map +1 -1
  14. package/dist/cjs/initializers/index.js +43 -19
  15. package/dist/cjs/initializers/index.js.map +1 -1
  16. package/dist/cjs/react-utils/index.js +3 -0
  17. package/dist/cjs/react-utils/index.js.map +1 -1
  18. package/dist/cjs/react-utils/mount/mount.js +68 -69
  19. package/dist/cjs/react-utils/mount/mount.js.map +1 -1
  20. package/dist/cjs/react-utils/usePrefersReducedMotion/constants.js +6 -0
  21. package/dist/cjs/react-utils/usePrefersReducedMotion/constants.js.map +1 -0
  22. package/dist/cjs/react-utils/usePrefersReducedMotion/index.js +12 -0
  23. package/dist/cjs/react-utils/usePrefersReducedMotion/index.js.map +1 -0
  24. package/dist/cjs/react-utils/usePrefersReducedMotion/usePrefersReducedMotion.js +46 -0
  25. package/dist/cjs/react-utils/usePrefersReducedMotion/usePrefersReducedMotion.js.map +1 -0
  26. package/dist/initializers/i18n.js +120 -183
  27. package/dist/initializers/i18n.js.map +1 -1
  28. package/dist/initializers/index.js +43 -19
  29. package/dist/initializers/index.js.map +1 -1
  30. package/dist/react-utils/index.js +2 -0
  31. package/dist/react-utils/index.js.map +1 -1
  32. package/dist/react-utils/mount/mount.js +68 -69
  33. package/dist/react-utils/mount/mount.js.map +1 -1
  34. package/dist/react-utils/usePrefersReducedMotion/constants.js +4 -0
  35. package/dist/react-utils/usePrefersReducedMotion/constants.js.map +1 -0
  36. package/dist/react-utils/usePrefersReducedMotion/index.js +6 -0
  37. package/dist/react-utils/usePrefersReducedMotion/index.js.map +1 -0
  38. package/dist/react-utils/usePrefersReducedMotion/usePrefersReducedMotion.js +44 -0
  39. package/dist/react-utils/usePrefersReducedMotion/usePrefersReducedMotion.js.map +1 -0
  40. package/initializers.d.ts +1 -1
  41. package/package.json +4 -2
  42. package/react-utils.d.ts +68 -3
  43. package/src/translations/ar.json +111 -0
  44. package/src/translations/bg.json +111 -0
  45. package/src/translations/ca.json +111 -0
  46. package/src/translations/cs.json +111 -0
  47. package/src/translations/da.json +111 -0
  48. package/src/translations/de.json +111 -0
  49. package/src/translations/en.json +111 -0
  50. package/src/translations/es-MX.json +111 -0
  51. package/src/translations/es.json +111 -0
  52. package/src/translations/et.json +111 -0
  53. package/src/translations/fi.json +111 -0
  54. package/src/translations/fil.json +111 -0
  55. package/src/translations/fr.json +111 -0
  56. package/src/translations/he.json +111 -0
  57. package/src/translations/hi.json +111 -0
  58. package/src/translations/hr.json +111 -0
  59. package/src/translations/id.json +111 -0
  60. package/src/translations/it.json +111 -0
  61. package/src/translations/ja.json +111 -0
  62. package/src/translations/ko.json +111 -0
  63. package/src/translations/nl.json +111 -0
  64. package/src/translations/pl.json +111 -0
  65. package/src/translations/pt-BR.json +111 -0
  66. package/src/translations/pt.json +111 -0
  67. package/src/translations/ro.json +111 -0
  68. package/src/translations/ru.json +111 -0
  69. package/src/translations/sk.json +111 -0
  70. package/src/translations/sl.json +111 -0
  71. package/src/translations/sv.json +111 -0
  72. package/src/translations/th.json +111 -0
  73. package/src/translations/tr.json +111 -0
  74. package/src/translations/uk.json +111 -0
  75. package/src/translations/vi.json +111 -0
  76. package/src/translations/zh-CN.json +111 -0
  77. package/src/translations/zh-TW.json +111 -0
  78. package/configs/scripts/getPkgTranslations.js +0 -45
@@ -10,76 +10,75 @@ require('../../_commonjsHelpers-BJu3ubxk.js');
10
10
 
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { defineProperty._defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
13
- function mount(components) {
14
- var run = function run() {
15
- var mountPoints = document.querySelectorAll("[data-react-class]");
16
- Array.from(mountPoints).forEach(/*#__PURE__*/function () {
17
- var _ref = index._asyncToGenerator(/*#__PURE__*/index._regeneratorRuntime.mark(function _callee(element) {
18
- var _element$dataset;
19
- var _ref2, reactClass, reactProps, importFn, props, module, Component, root;
20
- return index._regeneratorRuntime.wrap(function _callee$(_context) {
21
- while (1) switch (_context.prev = _context.next) {
22
- case 0:
23
- if (!(((_element$dataset = element.dataset) === null || _element$dataset === void 0 ? void 0 : _element$dataset.mounted) === "true")) {
24
- _context.next = 2;
25
- break;
26
- }
27
- return _context.abrupt("return");
28
- case 2:
29
- _ref2 = element.dataset || {}, reactClass = _ref2.reactClass, reactProps = _ref2.reactProps;
30
- if (reactClass) {
31
- _context.next = 5;
32
- break;
33
- }
34
- return _context.abrupt("return");
35
- case 5:
36
- importFn = components[reactClass];
37
- if (importFn) {
38
- _context.next = 9;
39
- break;
40
- }
41
- console.warn("WARNING: No component found for:", reactClass, components);
42
- return _context.abrupt("return");
43
- case 9:
44
- props = {};
45
- if (reactProps) {
46
- try {
47
- props = JSON.parse(reactProps);
48
- } catch (_unused) {
49
- console.error("Invalid JSON in data-react-props:", reactProps);
50
- }
51
- }
52
- _context.prev = 11;
53
- _context.next = 14;
54
- return utils_retryImport(importFn);
55
- case 14:
56
- module = _context.sent;
57
- Component = module["default"] || module;
58
- root = ReactDOM.createRoot(element);
59
- root.render(/*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread({}, props)));
60
- if (element.dataset) element.dataset.mounted = "true";
61
- _context.next = 24;
62
- break;
63
- case 21:
64
- _context.prev = 21;
65
- _context.t0 = _context["catch"](11);
66
- console.error("Failed to load component \"".concat(reactClass, "\""), _context.t0);
67
- case 24:
68
- case "end":
69
- return _context.stop();
70
- }
71
- }, _callee, null, [[11, 21]]);
72
- }));
73
- return function (_x) {
74
- return _ref.apply(this, arguments);
75
- };
76
- }());
77
- };
78
- if (document.readyState === "loading") {
79
- document.addEventListener("DOMContentLoaded", run);
80
- } else {
81
- run();
13
+ var jsonParse = function jsonParse(value) {
14
+ if (typeof value !== "string") return {};
15
+ try {
16
+ return JSON.parse(value);
17
+ } catch (_unused) {
18
+ return {};
82
19
  }
20
+ };
21
+ function mount(_x) {
22
+ return _mount.apply(this, arguments);
23
+ }
24
+ function _mount() {
25
+ _mount = index._asyncToGenerator(/*#__PURE__*/index._regeneratorRuntime.mark(function _callee(componentMap) {
26
+ var _element$dataset;
27
+ var element, _ref, reactClass, reactProps, importFn, props, module, Component, root;
28
+ return index._regeneratorRuntime.wrap(function _callee$(_context) {
29
+ while (1) switch (_context.prev = _context.next) {
30
+ case 0:
31
+ element = document.querySelector("[data-react-class]");
32
+ if (element) {
33
+ _context.next = 3;
34
+ break;
35
+ }
36
+ return _context.abrupt("return");
37
+ case 3:
38
+ if (!(((_element$dataset = element.dataset) === null || _element$dataset === void 0 ? void 0 : _element$dataset.mounted) === "true")) {
39
+ _context.next = 5;
40
+ break;
41
+ }
42
+ return _context.abrupt("return");
43
+ case 5:
44
+ _ref = element.dataset || {}, reactClass = _ref.reactClass, reactProps = _ref.reactProps;
45
+ if (reactClass) {
46
+ _context.next = 8;
47
+ break;
48
+ }
49
+ return _context.abrupt("return");
50
+ case 8:
51
+ importFn = componentMap[reactClass];
52
+ if (importFn) {
53
+ _context.next = 12;
54
+ break;
55
+ }
56
+ console.warn("WARNING: No component found for:", reactClass, componentMap);
57
+ return _context.abrupt("return");
58
+ case 12:
59
+ props = jsonParse(reactProps);
60
+ _context.prev = 13;
61
+ _context.next = 16;
62
+ return utils_retryImport(importFn);
63
+ case 16:
64
+ module = _context.sent;
65
+ Component = module["default"] || module;
66
+ root = ReactDOM.createRoot(element);
67
+ root.render(/*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread({}, props)));
68
+ if (element.dataset) element.dataset.mounted = "true";
69
+ _context.next = 26;
70
+ break;
71
+ case 23:
72
+ _context.prev = 23;
73
+ _context.t0 = _context["catch"](13);
74
+ console.error("Failed to load component \"".concat(reactClass, "\""), _context.t0);
75
+ case 26:
76
+ case "end":
77
+ return _context.stop();
78
+ }
79
+ }, _callee, null, [[13, 23]]);
80
+ }));
81
+ return _mount.apply(this, arguments);
83
82
  }
84
83
 
85
84
  module.exports = mount;
@@ -1 +1 @@
1
- {"version":3,"file":"mount.js","sources":["../../../../src/react-utils/mount/mount.jsx"],"sourcesContent":["/* eslint-disable no-console */\nimport ReactDOM from \"react-dom/client\";\nimport retryImport from \"utils/retryImport\";\n\nexport default function mount(components) {\n const run = () => {\n const mountPoints = document.querySelectorAll(\"[data-react-class]\");\n\n Array.from(mountPoints).forEach(async element => {\n if (element.dataset?.mounted === \"true\") return;\n\n const { reactClass, reactProps } = element.dataset || {};\n\n if (!reactClass) return;\n\n const importFn = components[reactClass];\n\n if (!importFn) {\n console.warn(\n \"WARNING: No component found for:\",\n reactClass,\n components\n );\n\n return;\n }\n\n let props = {};\n if (reactProps) {\n try {\n props = JSON.parse(reactProps);\n } catch {\n console.error(\"Invalid JSON in data-react-props:\", reactProps);\n }\n }\n\n try {\n const module = await retryImport(importFn);\n const Component = module.default || module;\n\n const root = ReactDOM.createRoot(element);\n root.render(<Component {...props} />);\n\n if (element.dataset) element.dataset.mounted = \"true\";\n } catch (error) {\n console.error(`Failed to load component \"${reactClass}\"`, error);\n }\n });\n };\n\n if (document.readyState === \"loading\") {\n document.addEventListener(\"DOMContentLoaded\", run);\n } else {\n run();\n }\n}\n"],"names":["mount","components","run","mountPoints","document","querySelectorAll","Array","from","forEach","_ref","_asyncToGenerator","_regeneratorRuntime","mark","_callee","element","_element$dataset","_ref2","reactClass","reactProps","importFn","props","module","Component","root","wrap","_callee$","_context","prev","next","dataset","mounted","abrupt","console","warn","JSON","parse","_unused","error","retryImport","sent","ReactDOM","createRoot","render","_jsx","_objectSpread","t0","concat","stop","_x","apply","arguments","readyState","addEventListener"],"mappings":";;;;;;;;;;;;AAIe,SAASA,KAAKA,CAACC,UAAU,EAAE;AACxC,EAAA,IAAMC,GAAG,GAAG,SAANA,GAAGA,GAAS;AAChB,IAAA,IAAMC,WAAW,GAAGC,QAAQ,CAACC,gBAAgB,CAAC,oBAAoB,CAAC;AAEnEC,IAAAA,KAAK,CAACC,IAAI,CAACJ,WAAW,CAAC,CAACK,OAAO,cAAA,YAAA;MAAA,IAAAC,IAAA,GAAAC,uBAAA,cAAAC,yBAAA,CAAAC,IAAA,CAAC,SAAAC,OAAAA,CAAMC,OAAO,EAAA;AAAA,QAAA,IAAAC,gBAAA;AAAA,QAAA,IAAAC,KAAA,EAAAC,UAAA,EAAAC,UAAA,EAAAC,QAAA,EAAAC,KAAA,EAAAC,MAAA,EAAAC,SAAA,EAAAC,IAAA;AAAA,QAAA,OAAAZ,yBAAA,CAAAa,IAAA,CAAA,SAAAC,SAAAC,QAAA,EAAA;AAAA,UAAA,OAAA,CAAA,EAAA,QAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;AAAA,YAAA,KAAA,CAAA;AAAA,cAAA,IAAA,EACvC,CAAAb,CAAAA,gBAAA,GAAAD,OAAO,CAAC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C;AACpD,GAAC,MAAM;AACLA,IAAAA,GAAG,EAAE;AACP;AACF;;;;"}
1
+ {"version":3,"file":"mount.js","sources":["../../../../src/react-utils/mount/mount.jsx"],"sourcesContent":["/* eslint-disable no-console */\nimport ReactDOM from \"react-dom/client\";\nimport retryImport from \"utils/retryImport\";\n\nconst jsonParse = value => {\n if (typeof value !== \"string\") return {};\n\n try {\n return JSON.parse(value);\n } catch {\n return {};\n }\n};\n\nexport default async function mount(componentMap) {\n const element = document.querySelector(\"[data-react-class]\");\n if (!element) return;\n\n if (element.dataset?.mounted === \"true\") return;\n\n const { reactClass, reactProps } = element.dataset || {};\n if (!reactClass) return;\n\n const importFn = componentMap[reactClass];\n\n if (!importFn) {\n console.warn(\"WARNING: No component found for:\", reactClass, componentMap);\n\n return;\n }\n\n const props = jsonParse(reactProps);\n\n try {\n const module = await retryImport(importFn);\n const Component = module.default || module;\n\n const root = ReactDOM.createRoot(element);\n root.render(<Component {...props} />);\n\n if (element.dataset) element.dataset.mounted = \"true\";\n } catch (error) {\n console.error(`Failed to load component \"${reactClass}\"`, error);\n }\n}\n"],"names":["jsonParse","value","JSON","parse","_unused","mount","_x","_mount","apply","arguments","_asyncToGenerator","_regeneratorRuntime","mark","_callee","componentMap","_element$dataset","element","_ref","reactClass","reactProps","importFn","props","module","Component","root","wrap","_callee$","_context","prev","next","document","querySelector","abrupt","dataset","mounted","console","warn","retryImport","sent","ReactDOM","createRoot","render","_jsx","_objectSpread","t0","error","concat","stop"],"mappings":";;;;;;;;;;;;AAIA,IAAMA,SAAS,GAAG,SAAZA,SAASA,CAAGC,KAAK,EAAI;AACzB,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAO,EAAE;EAExC,IAAI;AACF,IAAA,OAAOC,IAAI,CAACC,KAAK,CAACF,KAAK,CAAC;GACzB,CAAC,OAAAG,OAAA,EAAM;AACN,IAAA,OAAO,EAAE;AACX;AACF,CAAC;AAE6BC,SAAAA,KAAKA,CAAAC,EAA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AjB,QAAA,CAAA,OAAA,CAAA,CAAA,EAAA,CAAA;UAEtDQ,OAAO,CAACU,KAAK,CAAA,6BAAA,CAAAC,MAAA,CAA8B5B,UAAU,EAAAS,IAAAA,CAAAA,EAAAA,QAAA,CAAAiB,EAAU,CAAC;AAAC,QAAA,KAAA,EAAA;AAAA,QAAA,KAAA,KAAA;UAAA,OAAAjB,QAAA,CAAAoB,IAAA,EAAA;AAAA;AAAA,KAAA,EAAAlC,OAAA,EAAA,IAAA,EAAA,CAAA,CAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA;GAEpE,CAAA,CAAA;AAAA,EAAA,OAAAN,MAAA,CAAAC,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA;;;;"}
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ var QUERY = "(prefers-reduced-motion: no-preference)";
4
+
5
+ exports.QUERY = QUERY;
6
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/react-utils/usePrefersReducedMotion/constants.js"],"sourcesContent":["export const QUERY = \"(prefers-reduced-motion: no-preference)\";\n"],"names":["QUERY"],"mappings":";;AAAO,IAAMA,KAAK,GAAG;;;;"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var reactUtils_usePrefersReducedMotion_usePrefersReducedMotion = require('./usePrefersReducedMotion.js');
4
+ require('../../slicedToArray-BcL7fKuL.js');
5
+ require('../../unsupportedIterableToArray-BoHMiKNA.js');
6
+ require('react');
7
+ require('./constants.js');
8
+
9
+
10
+
11
+ module.exports = reactUtils_usePrefersReducedMotion_usePrefersReducedMotion;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ var slicedToArray = require('../../slicedToArray-BcL7fKuL.js');
4
+ var React = require('react');
5
+ var reactUtils_usePrefersReducedMotion_constants = require('./constants.js');
6
+ require('../../unsupportedIterableToArray-BoHMiKNA.js');
7
+
8
+ var isRenderingOnServer = typeof window === "undefined";
9
+ var getInitialState = function getInitialState() {
10
+ return (
11
+ // For our initial server render, we won't know if the user
12
+ // prefers reduced motion, but it doesn't matter. This value
13
+ // will be overwritten on the client, before any animations
14
+ // occur.
15
+ isRenderingOnServer ? true : !window.matchMedia(reactUtils_usePrefersReducedMotion_constants.QUERY).matches
16
+ );
17
+ };
18
+ var usePrefersReducedMotion = function usePrefersReducedMotion() {
19
+ var _useState = React.useState(getInitialState),
20
+ _useState2 = slicedToArray._slicedToArray(_useState, 2),
21
+ prefersReducedMotion = _useState2[0],
22
+ setPrefersReducedMotion = _useState2[1];
23
+ React.useEffect(function () {
24
+ if (isRenderingOnServer) return undefined;
25
+ var mediaQueryList = window.matchMedia(reactUtils_usePrefersReducedMotion_constants.QUERY);
26
+ var listener = function listener(event) {
27
+ setPrefersReducedMotion(!event.matches);
28
+ };
29
+ if (mediaQueryList.addEventListener) {
30
+ mediaQueryList.addEventListener("change", listener);
31
+ } else {
32
+ mediaQueryList.addListener(listener);
33
+ }
34
+ return function () {
35
+ if (mediaQueryList.removeEventListener) {
36
+ mediaQueryList.removeEventListener("change", listener);
37
+ } else {
38
+ mediaQueryList.removeListener(listener);
39
+ }
40
+ };
41
+ }, []);
42
+ return prefersReducedMotion;
43
+ };
44
+
45
+ module.exports = usePrefersReducedMotion;
46
+ //# sourceMappingURL=usePrefersReducedMotion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrefersReducedMotion.js","sources":["../../../../src/react-utils/usePrefersReducedMotion/usePrefersReducedMotion.js"],"sourcesContent":["import { useState, useEffect } from \"react\";\n\nimport { QUERY } from \"./constants\";\n\nconst isRenderingOnServer = typeof window === \"undefined\";\n\nconst getInitialState = () =>\n // For our initial server render, we won't know if the user\n // prefers reduced motion, but it doesn't matter. This value\n // will be overwritten on the client, before any animations\n // occur.\n isRenderingOnServer ? true : !window.matchMedia(QUERY).matches;\n\nconst usePrefersReducedMotion = () => {\n const [prefersReducedMotion, setPrefersReducedMotion] =\n useState(getInitialState);\n\n useEffect(() => {\n if (isRenderingOnServer) return undefined;\n\n const mediaQueryList = window.matchMedia(QUERY);\n\n const listener = event => {\n setPrefersReducedMotion(!event.matches);\n };\n\n if (mediaQueryList.addEventListener) {\n mediaQueryList.addEventListener(\"change\", listener);\n } else {\n mediaQueryList.addListener(listener);\n }\n\n return () => {\n if (mediaQueryList.removeEventListener) {\n mediaQueryList.removeEventListener(\"change\", listener);\n } else {\n mediaQueryList.removeListener(listener);\n }\n };\n }, []);\n\n return prefersReducedMotion;\n};\n\nexport default usePrefersReducedMotion;\n"],"names":["isRenderingOnServer","window","getInitialState","matchMedia","QUERY","matches","usePrefersReducedMotion","_useState","useState","_useState2","_slicedToArray","prefersReducedMotion","setPrefersReducedMotion","useEffect","undefined","mediaQueryList","listener","event","addEventListener","addListener","removeEventListener","removeListener"],"mappings":";;;;;;;AAIA,IAAMA,mBAAmB,GAAG,OAAOC,MAAM,KAAK,WAAW;AAEzD,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAAA;AAAA,EAAA;AACnB;AACA;AACA;AACA;IACAF,mBAAmB,GAAG,IAAI,GAAG,CAACC,MAAM,CAACE,UAAU,CAACC,kDAAK,CAAC,CAACC;AAAO;AAAA,CAAA;AAEhE,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,GAAS;AACpC,EAAA,IAAAC,SAAA,GACEC,cAAQ,CAACN,eAAe,CAAC;IAAAO,UAAA,GAAAC,4BAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AADpBI,IAAAA,oBAAoB,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,uBAAuB,GAAAH,UAAA,CAAA,CAAA,CAAA;AAGpDI,EAAAA,eAAS,CAAC,YAAM;IACd,IAAIb,mBAAmB,EAAE,OAAOc,SAAS;AAEzC,IAAA,IAAMC,cAAc,GAAGd,MAAM,CAACE,UAAU,CAACC,kDAAK,CAAC;AAE/C,IAAA,IAAMY,QAAQ,GAAG,SAAXA,QAAQA,CAAGC,KAAK,EAAI;AACxBL,MAAAA,uBAAuB,CAAC,CAACK,KAAK,CAACZ,OAAO,CAAC;KACxC;IAED,IAAIU,cAAc,CAACG,gBAAgB,EAAE;AACnCH,MAAAA,cAAc,CAACG,gBAAgB,CAAC,QAAQ,EAAEF,QAAQ,CAAC;AACrD,KAAC,MAAM;AACLD,MAAAA,cAAc,CAACI,WAAW,CAACH,QAAQ,CAAC;AACtC;AAEA,IAAA,OAAO,YAAM;MACX,IAAID,cAAc,CAACK,mBAAmB,EAAE;AACtCL,QAAAA,cAAc,CAACK,mBAAmB,CAAC,QAAQ,EAAEJ,QAAQ,CAAC;AACxD,OAAC,MAAM;AACLD,QAAAA,cAAc,CAACM,cAAc,CAACL,QAAQ,CAAC;AACzC;KACD;GACF,EAAE,EAAE,CAAC;AAEN,EAAA,OAAOL,oBAAoB;AAC7B;;;;"}
@@ -1,10 +1,13 @@
1
+ import { _ as _asyncToGenerator, a as _regeneratorRuntime } from '../index-DbuxAQMD.js';
1
2
  import i18next from 'i18next';
2
3
  import { mergeDeepLeft } from 'ramda';
3
4
  import { initReactI18next } from 'react-i18next';
5
+ import _retryImport from '../utils/retryImport.js';
4
6
  import { LIST_FORMATS } from './constants.js';
5
7
  import { listFormatter, lowerCaseDynamicTextFormatter } from './utils/customFormatters.js';
6
8
  import { sentenceCaseProcessor } from './utils/customPostProcessors.js';
7
9
  import { replaceNullValuesWithGetter as _replaceNullValuesWithGetter } from './utils/utils.js';
10
+ import '../_commonjsHelpers-BFTU3MAI.js';
8
11
  import 'dompurify';
9
12
  import '../typeof-D-UKOauR.js';
10
13
  import '../slicedToArray-DmsZvA_9.js';
@@ -423,195 +426,129 @@ var Browser = /*#__PURE__*/function () {
423
426
  }();
424
427
  Browser.type = 'languageDetector';
425
428
 
426
- var generic = {
427
- error: "Something went wrong. Please try again later."
428
- };
429
- var authentication = {
430
- notLoggedIn: "Could not authenticate, please login to continue!",
431
- couldNotAuth: "Could not authenticate with the provided {{parameter}}.",
432
- incorrectPassword: "Current password is incorrect. Please try again.",
433
- incorrectEmailPassword: "Incorrect email or password. Please try again."
434
- };
435
- var authorization = {
436
- unauthorized: "You are not authorized to perform this action."
437
- };
438
- var resource = {
439
- add_one: "{{entity}} has been added successfully.",
440
- add_other: "{{entity}} have been added successfully.",
441
- save: "{{entity}} has been saved successfully.",
442
- save_one: "{{entity}} has been saved successfully.",
443
- save_other: "{{entity}} have been saved successfully.",
444
- update: "{{entity}} has been updated successfully.",
445
- update_one: "{{entity}} has been updated successfully.",
446
- update_other: "{{entity}} have been updated successfully.",
447
- delete_one: "{{entity}} has been deleted successfully.",
448
- delete_other: "{{entity}} have been deleted successfully.",
449
- clone: "{{entity}} has been cloned successfully.",
450
- notFound: "{{entity}} does not exist.",
451
- remove_one: "{{entity}} has been removed successfully.",
452
- remove_other: "{{entity}} have been removed successfully.",
453
- sent: "{{entity}} sent successfully.",
454
- merged: "{{entity}} have been successfully merged.",
455
- disconnected: "{{entity}} has been successfully disconnected."
456
- };
457
- var otp = {
458
- sent: "OTP has been sent successfully.",
459
- invalid: "Invalid OTP",
460
- verified: "OTP has been verified successfully."
461
- };
462
- var upload = {
463
- error: "An error occurred while uploading the file"
464
- };
465
- var image = {
466
- profile: {
467
- removalFailed: "Failed to remove profile picture",
468
- removalSuccess: "Profile picture successfully removed"
469
- },
470
- contentTypeInvalid: "Other than jpg, png, svg are not supported",
471
- sizeOutOfRange: "Should not be more than {{maxSize, number}} MB"
472
- };
473
- var userRole = {
474
- deactivateActiveAdmin: "You cannot deactivate active admin from the workspace!"
475
- };
476
- var activeRecord = {
477
- error: {
478
- blankName: "Name can't be blank",
479
- blankDescription: "Description can't be blank",
480
- blankValue: "Value can't be blank",
481
- prefixType: "Prefix type {{value}} is not valid",
482
- minimumEntryLimit: "Minimum entry limit must be less than or equal to {{maximumEntryLimit, number}}",
483
- maximumEntryLimit: "Maximum entry limit must be greater than or equal to {{minimumEntryLimit, number}}"
484
- }
485
- };
486
- var sessions = {
487
- expiry: "Your session has expired. Please login again."
488
- };
489
- var payment = {
490
- error: {
491
- incomplete: "Your payment could not be completed"
492
- }
493
- };
494
- var invitations = {
495
- deleted_one: "Invitation has been deleted successfully",
496
- deleted_other: "{{count, number}} Invitations have been deleted successfully",
497
- sent_one: "Invitation has been sent successfully",
498
- sent_other: "{{count, number}} Invitations have been sent successfully",
499
- notFound: "{{email}} was not invited to test this website."
500
- };
501
- var github = {
502
- error: {
503
- webhookPermissionDenied: "Permission denied. Ensure you have permission to create webhooks for the repository.",
504
- primaryNonDeletable: "Primary Github account cannot be deleted."
505
- }
506
- };
507
- var neetoCommons = {
508
- fallbackComponent: {
509
- somethingWentWrong: "Sorry, something went wrong.",
510
- description: "Please try <reloading>reloading</reloading> the page.<br> If the problem persists, <contactus>contact us</contactus>."
511
- },
512
- toastr: {
513
- success: {
514
- copiedToClipboard: "Copied to clipboard!"
515
- },
516
- error: {
517
- noInternetConnection: "No Internet Connection.",
518
- networkError: "Network error. Please check your connection and try again."
519
- }
520
- },
521
- notice: {
522
- errorOccurred: "Some error occurred."
523
- },
524
- validators: {
525
- isRequired: "{{what}} is required.",
526
- mustNotContainCapitalLetters: "{{what}} must not contain capital letters.",
527
- mustNotContainSpaces: "{{what}} must not contain spaces.",
528
- mustNotContainSpecialCharactersExceptHyphen: "{{what}} must not contain any special characters, except '-'",
529
- mustNotStartOrEndWithSpecialCharacters: "{{what}} must not start or end with special characters."
530
- },
531
- copyToClipboard: {
532
- failed: "Failed to copy to clipboard"
533
- }
534
- };
535
- var commonsEn = {
536
- generic: generic,
537
- authentication: authentication,
538
- authorization: authorization,
539
- resource: resource,
540
- otp: otp,
541
- upload: upload,
542
- image: image,
543
- userRole: userRole,
544
- activeRecord: activeRecord,
545
- sessions: sessions,
546
- payment: payment,
547
- invitations: invitations,
548
- github: github,
549
- neetoCommons: neetoCommons
429
+ var resourcesToBackend = function resourcesToBackend(res) {
430
+ return {
431
+ type: 'backend',
432
+ init: function init(services, backendOptions, i18nextOptions) {},
433
+ read: function read(language, namespace, callback) {
434
+ if (typeof res === 'function') {
435
+ if (res.length < 3) {
436
+ try {
437
+ var r = res(language, namespace);
438
+ if (r && typeof r.then === 'function') {
439
+ r.then(function (data) {
440
+ return callback(null, data && data.default || data);
441
+ }).catch(callback);
442
+ } else {
443
+ callback(null, r);
444
+ }
445
+ } catch (err) {
446
+ callback(err);
447
+ }
448
+ return;
449
+ }
450
+ res(language, namespace, callback);
451
+ return;
452
+ }
453
+ callback(null, res && res[language] && res[language][namespace]);
454
+ }
455
+ };
550
456
  };
551
457
 
552
458
  // eslint-disable-next-line import/no-mutable-exports
553
459
  var taxonomies = {};
554
- var initializeI18n = function initializeI18n(hostTranslations) {
555
- var _window$globalProps, _window$globalProps2;
556
- var enableDirAttribute = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
557
- document.documentElement.removeAttribute("lang");
558
- var userLanguage = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.language;
559
- if (userLanguage) document.documentElement.setAttribute("lang", userLanguage);
560
- var packageTranslations = preval.require("../../configs/scripts/getPkgTranslations.js");
561
- var commonsTranslations = {
562
- en: {
563
- translation: commonsEn
564
- }
565
- };
566
- var resources = [hostTranslations, commonsTranslations, packageTranslations].reduce(mergeDeepLeft);
567
- var defaultTaxonomyKeys = Object.keys(resources.en.translation.taxonomyDefaultLabels || {});
568
- var defaultTaxonomies = Object.fromEntries(defaultTaxonomyKeys.map(function (key) {
569
- return [key, {
570
- singular: null,
571
- plural: null
572
- }];
573
- }));
574
- var hostTaxonomies = ((_window$globalProps2 = window.globalProps) === null || _window$globalProps2 === void 0 ? void 0 : _window$globalProps2.taxonomies) || {};
575
- taxonomies = _replaceNullValuesWithGetter(mergeDeepLeft(hostTaxonomies, defaultTaxonomies));
576
- i18next.use(Browser).use(initReactI18next).use(sentenceCaseProcessor).init({
577
- resources: resources,
578
- fallbackLng: "en",
579
- interpolation: {
580
- defaultVariables: {
581
- taxonomies: taxonomies
582
- },
583
- escapeValue: false,
584
- skipOnVariables: false,
585
- alwaysFormat: true,
586
- format: function format(value, _format, lng, options) {
587
- var newValue = value;
588
- if (LIST_FORMATS.includes(_format)) {
589
- newValue = listFormatter({
590
- value: newValue,
591
- format: _format,
592
- lng: lng,
593
- options: options
460
+ var initializeI18n = /*#__PURE__*/function () {
461
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
462
+ var _window$globalProps, _window$globalProps2;
463
+ var hostTranslations,
464
+ enableDirAttribute,
465
+ userLanguage,
466
+ translationImports,
467
+ englishTranslations,
468
+ englishResource,
469
+ resources,
470
+ defaultTaxonomyKeys,
471
+ defaultTaxonomies,
472
+ hostTaxonomies,
473
+ _args = arguments;
474
+ return _regeneratorRuntime.wrap(function _callee$(_context) {
475
+ while (1) switch (_context.prev = _context.next) {
476
+ case 0:
477
+ hostTranslations = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
478
+ enableDirAttribute = _args.length > 1 && _args[1] !== undefined ? _args[1] : true;
479
+ document.documentElement.removeAttribute("lang");
480
+ userLanguage = (_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.language;
481
+ if (userLanguage) document.documentElement.setAttribute("lang", userLanguage);
482
+ translationImports = preval.require("../../configs/scripts/buildTranslationImports.js");
483
+ englishTranslations = preval.require("../../configs/scripts/getEnglishTranslation.js");
484
+ englishResource = {
485
+ en: {
486
+ translation: englishTranslations || {}
487
+ }
488
+ };
489
+ resources = mergeDeepLeft(hostTranslations, englishResource);
490
+ defaultTaxonomyKeys = Object.keys(resources.en.translation.taxonomyDefaultLabels || {});
491
+ defaultTaxonomies = Object.fromEntries(defaultTaxonomyKeys.map(function (key) {
492
+ return [key, {
493
+ singular: null,
494
+ plural: null
495
+ }];
496
+ }));
497
+ hostTaxonomies = ((_window$globalProps2 = window.globalProps) === null || _window$globalProps2 === void 0 ? void 0 : _window$globalProps2.taxonomies) || {};
498
+ taxonomies = _replaceNullValuesWithGetter(mergeDeepLeft(hostTaxonomies, defaultTaxonomies));
499
+ _context.next = 15;
500
+ return i18next.use(Browser).use(initReactI18next).use(sentenceCaseProcessor).use(resourcesToBackend(function (language) {
501
+ return _retryImport(translationImports === null || translationImports === void 0 ? void 0 : translationImports[language]);
502
+ })).init({
503
+ resources: resources,
504
+ partialBundledLanguages: true,
505
+ fallbackLng: "en",
506
+ interpolation: {
507
+ defaultVariables: {
508
+ taxonomies: taxonomies
509
+ },
510
+ escapeValue: false,
511
+ skipOnVariables: false,
512
+ alwaysFormat: true,
513
+ format: function format(value, _format, lng, options) {
514
+ var newValue = value;
515
+ if (LIST_FORMATS.includes(_format)) {
516
+ newValue = listFormatter({
517
+ value: newValue,
518
+ format: _format,
519
+ lng: lng,
520
+ options: options
521
+ });
522
+ return newValue;
523
+ }
524
+ return lowerCaseDynamicTextFormatter(newValue, _format);
525
+ }
526
+ },
527
+ postProcess: [sentenceCaseProcessor.name],
528
+ detection: {
529
+ order: ["querystring", "htmlTag", "navigator", "cookie"],
530
+ caches: ["cookie"],
531
+ lookupQuerystring: "lang",
532
+ lookupCookie: "lang"
533
+ }
594
534
  });
595
- return newValue;
596
- }
597
- return lowerCaseDynamicTextFormatter(newValue, _format);
535
+ case 15:
536
+ if (enableDirAttribute) {
537
+ document.documentElement.setAttribute("dir", i18next.dir() || "ltr");
538
+ }
539
+ if (!userLanguage) {
540
+ document.documentElement.setAttribute("lang", i18next.resolvedLanguage || "en");
541
+ }
542
+ case 17:
543
+ case "end":
544
+ return _context.stop();
598
545
  }
599
- },
600
- postProcess: [sentenceCaseProcessor.name],
601
- detection: {
602
- order: ["querystring", "htmlTag", "navigator", "cookie"],
603
- caches: ["cookie"],
604
- lookupQuerystring: "lang",
605
- lookupCookie: "lang"
606
- }
607
- });
608
- if (enableDirAttribute) {
609
- document.documentElement.setAttribute("dir", i18next.dir() || "ltr");
610
- }
611
- if (!userLanguage) {
612
- document.documentElement.setAttribute("lang", i18next.resolvedLanguage || "en");
613
- }
614
- };
546
+ }, _callee);
547
+ }));
548
+ return function initializeI18n() {
549
+ return _ref.apply(this, arguments);
550
+ };
551
+ }();
615
552
 
616
553
  export { initializeI18n as default, taxonomies };
617
554
  //# sourceMappingURL=i18n.js.map