@bigbinary/neeto-commons-frontend 4.13.102 → 4.13.104
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/configs/esbuild/constants.js +3 -0
- package/configs/esbuild/index.js +2 -0
- package/configs/esbuild/plugins/preval.js +3 -0
- package/configs/esbuild/plugins/stripSourcemaps.js +46 -0
- package/configs/esbuild/utils.js +75 -1
- package/dist/cjs/initializers/dayjs.js +5 -3
- package/dist/cjs/initializers/dayjs.js.map +1 -1
- package/dist/cjs/initializers/i18n.js +3 -3
- package/dist/cjs/initializers/i18n.js.map +1 -1
- package/dist/cjs/initializers/index.js +3 -1
- package/dist/cjs/initializers/index.js.map +1 -1
- package/dist/cjs/initializers/utils/{utils.js → index.js} +1 -1
- package/dist/cjs/initializers/utils/index.js.map +1 -0
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +1 -1
- package/dist/cjs/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/cjs/react-utils/index.js +4 -0
- package/dist/cjs/react-utils/index.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/index.js +4 -0
- package/dist/cjs/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js +7 -3
- package/dist/cjs/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/cjs/utils/constants.js +14 -0
- package/dist/cjs/utils/constants.js.map +1 -0
- package/dist/cjs/utils/datetime.js +75 -50
- package/dist/cjs/utils/datetime.js.map +1 -1
- package/dist/cjs/utils/dayjsFormatOverrides/default.js +26 -0
- package/dist/cjs/utils/dayjsFormatOverrides/default.js.map +1 -0
- package/dist/cjs/utils/dayjsFormatOverrides/ja.js +25 -0
- package/dist/cjs/utils/dayjsFormatOverrides/ja.js.map +1 -0
- package/dist/cjs/utils/index.js +5 -0
- package/dist/cjs/utils/index.js.map +1 -1
- package/dist/cjs/utils/localePlugin.js +41 -8
- package/dist/cjs/utils/localePlugin.js.map +1 -1
- package/dist/initializers/dayjs.js +4 -2
- package/dist/initializers/dayjs.js.map +1 -1
- package/dist/initializers/i18n.js +2 -2
- package/dist/initializers/i18n.js.map +1 -1
- package/dist/initializers/index.js +3 -1
- package/dist/initializers/index.js.map +1 -1
- package/dist/initializers/utils/{utils.js → index.js} +1 -1
- package/dist/initializers/utils/index.js.map +1 -0
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js +1 -1
- package/dist/react-utils/HoneybadgerErrorBoundary/HoneybadgerErrorBoundary.js.map +1 -1
- package/dist/react-utils/index.js +4 -0
- package/dist/react-utils/index.js.map +1 -1
- package/dist/react-utils/useLocalStorage/index.js +4 -0
- package/dist/react-utils/useLocalStorage/index.js.map +1 -1
- package/dist/react-utils/useLocalStorage/useLocalStorage.js +7 -3
- package/dist/react-utils/useLocalStorage/useLocalStorage.js.map +1 -1
- package/dist/utils/constants.js +9 -0
- package/dist/utils/constants.js.map +1 -0
- package/dist/utils/datetime.js +74 -51
- package/dist/utils/datetime.js.map +1 -1
- package/dist/utils/dayjsFormatOverrides/default.js +24 -0
- package/dist/utils/dayjsFormatOverrides/default.js.map +1 -0
- package/dist/utils/dayjsFormatOverrides/ja.js +23 -0
- package/dist/utils/dayjsFormatOverrides/ja.js.map +1 -0
- package/dist/utils/index.js +4 -1
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/localePlugin.js +37 -8
- package/dist/utils/localePlugin.js.map +1 -1
- package/package.json +2 -1
- package/utils.d.ts +8 -6
- package/dist/cjs/initializers/utils/utils.js.map +0 -1
- package/dist/initializers/utils/utils.js.map +0 -1
|
@@ -41,8 +41,11 @@ const BABEL_CONFIG = {
|
|
|
41
41
|
|
|
42
42
|
const DEFAULT_VISUALIZER_TEMPLATE = "treemap";
|
|
43
43
|
|
|
44
|
+
const NODE_MODULES_PKG_REGEX = /node_modules\/(@bigbinary\/[^/]+)\/(.*)/;
|
|
45
|
+
|
|
44
46
|
module.exports = {
|
|
45
47
|
BABEL_CONFIG,
|
|
46
48
|
VITE_BABEL_CONFIG,
|
|
47
49
|
DEFAULT_VISUALIZER_TEMPLATE,
|
|
50
|
+
NODE_MODULES_PKG_REGEX,
|
|
48
51
|
};
|
package/configs/esbuild/index.js
CHANGED
|
@@ -20,6 +20,7 @@ const {
|
|
|
20
20
|
} = require("./plugins/packageTranslations.js");
|
|
21
21
|
const { prevalPlugin } = require("./plugins/preval.js");
|
|
22
22
|
const { reactGiphyPlugin } = require("./plugins/reactGiphy.js");
|
|
23
|
+
const { stripSourcemapsPlugin } = require("./plugins/stripSourcemaps.js");
|
|
23
24
|
const { virtualizedPlugin } = require("./plugins/virtualized.js");
|
|
24
25
|
const { createDefinitions, entryPoint, build, watch } = require("./utils.js");
|
|
25
26
|
|
|
@@ -50,6 +51,7 @@ const config = {
|
|
|
50
51
|
assetNames: "assets/[name]-[hash].digested",
|
|
51
52
|
chunkNames: "chunks/[name]-[hash].digested",
|
|
52
53
|
plugins: [
|
|
54
|
+
stripSourcemapsPlugin(),
|
|
53
55
|
rails(),
|
|
54
56
|
entrypointPlugin(isWatchMode),
|
|
55
57
|
packageTranslationsPlugin(),
|
|
@@ -9,6 +9,8 @@ const PREVAL_IMPORT_TRANSLATION_IMPORTS =
|
|
|
9
9
|
const PREVAL_IMPORT_ENGLISH_TRANSLATIONS =
|
|
10
10
|
'preval.require("../../configs/scripts/getEnglishTranslation.js")';
|
|
11
11
|
|
|
12
|
+
const SOURCEMAP_URL_RE = /\/\/[#@] sourceMappingURL=[^\n]+/gm;
|
|
13
|
+
|
|
12
14
|
const prevalPlugin = () => ({
|
|
13
15
|
name: "preval-plugin",
|
|
14
16
|
setup(build) {
|
|
@@ -22,6 +24,7 @@ const prevalPlugin = () => ({
|
|
|
22
24
|
const contents = await fs.readFile(args.path, "utf8");
|
|
23
25
|
|
|
24
26
|
const transformedContent = contents
|
|
27
|
+
.replace(SOURCEMAP_URL_RE, "")
|
|
25
28
|
.replace(PREVAL_IMPORT_TRANSLATION_IMPORTS, getTranslationImports())
|
|
26
29
|
.replace(
|
|
27
30
|
PREVAL_IMPORT_ENGLISH_TRANSLATIONS,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// esbuild has a bug in its sourcemap chaining logic. When it bundles the host
|
|
2
|
+
// app and encounters @bigbinary packages built with Rollup (which code-splits
|
|
3
|
+
// shared code into chunks like lodash-CAzW54WT.js, slicedToArray-BcL7fKuL.js),
|
|
4
|
+
// esbuild tries to chain through the upstream .map files. During this chaining,
|
|
5
|
+
// it corrupts source indices in the mappings — causing code from one package
|
|
6
|
+
// file (e.g. FinderModal/Body.jsx) to be attributed to a completely unrelated
|
|
7
|
+
// host app file (e.g. apis/s3.js). The line/column numbers are correct, but
|
|
8
|
+
// they point to the wrong file. This is a known class of esbuild issues
|
|
9
|
+
// (evanw/esbuild#3553, evanw/esbuild#3460).
|
|
10
|
+
//
|
|
11
|
+
// To work around this, we strip `//# sourceMappingURL=...` comments from
|
|
12
|
+
// @bigbinary package files before esbuild sees them, preventing it from
|
|
13
|
+
// attempting the broken chaining. After the build, `fixSourcemaps` in utils.js
|
|
14
|
+
// correctly re-composes sourcemaps using @ampproject/remapping.
|
|
15
|
+
//
|
|
16
|
+
// Files handled by other onLoad plugins (e.g. preval handles i18n.js) are
|
|
17
|
+
// skipped since esbuild only allows one onLoad handler per file — those plugins
|
|
18
|
+
// strip the comment themselves.
|
|
19
|
+
|
|
20
|
+
/* eslint-disable @bigbinary/neeto/no-dangling-constants */
|
|
21
|
+
const fs = require("fs").promises;
|
|
22
|
+
|
|
23
|
+
const SKIP_RE = /initializers\/i18n\.js$/;
|
|
24
|
+
const SOURCEMAP_URL_RE = /\/\/[#@] sourceMappingURL=[^\n]+/gm;
|
|
25
|
+
|
|
26
|
+
const stripSourcemapsPlugin = () => ({
|
|
27
|
+
name: "strip-node-modules-sourcemaps",
|
|
28
|
+
setup(build) {
|
|
29
|
+
build.onLoad(
|
|
30
|
+
{ filter: /node_modules\/@bigbinary\/.*\.js$/ },
|
|
31
|
+
async args => {
|
|
32
|
+
if (SKIP_RE.test(args.path)) return null;
|
|
33
|
+
|
|
34
|
+
const contents = await fs.readFile(args.path, "utf8");
|
|
35
|
+
if (!SOURCEMAP_URL_RE.test(contents)) return null;
|
|
36
|
+
|
|
37
|
+
return {
|
|
38
|
+
contents: contents.replace(SOURCEMAP_URL_RE, ""),
|
|
39
|
+
loader: "js",
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
module.exports = { stripSourcemapsPlugin };
|
package/configs/esbuild/utils.js
CHANGED
|
@@ -3,7 +3,12 @@ const path = require("path");
|
|
|
3
3
|
const fs = require("fs");
|
|
4
4
|
const { execSync, spawn } = require("child_process");
|
|
5
5
|
const { pick } = require("ramda");
|
|
6
|
-
const {
|
|
6
|
+
const { globSync } = require("glob");
|
|
7
|
+
const remapping = require("@ampproject/remapping");
|
|
8
|
+
const {
|
|
9
|
+
DEFAULT_VISUALIZER_TEMPLATE,
|
|
10
|
+
NODE_MODULES_PKG_REGEX,
|
|
11
|
+
} = require("./constants");
|
|
7
12
|
|
|
8
13
|
// colors for console output
|
|
9
14
|
const consoleColors = {
|
|
@@ -60,6 +65,73 @@ const generateBundleReport = async ({ metaFilePath, outdir, template }) => {
|
|
|
60
65
|
}
|
|
61
66
|
};
|
|
62
67
|
|
|
68
|
+
const loadUpstreamMap = jsAbsPath => {
|
|
69
|
+
const mapPath = jsAbsPath + ".map";
|
|
70
|
+
if (!fs.existsSync(mapPath)) return null;
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
const map = JSON.parse(fs.readFileSync(mapPath, "utf-8"));
|
|
74
|
+
if (!map.sources?.length || map.sources.every(s => !s)) return null;
|
|
75
|
+
|
|
76
|
+
return map;
|
|
77
|
+
} catch {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
const normalizeSourcePath = source => {
|
|
83
|
+
const match = source.match(NODE_MODULES_PKG_REGEX);
|
|
84
|
+
if (match) return `${match[1]}:${match[2]}`;
|
|
85
|
+
|
|
86
|
+
return source;
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
const fixSourcemaps = outdir => {
|
|
90
|
+
const mapFiles = globSync("**/*.map", {
|
|
91
|
+
cwd: outdir,
|
|
92
|
+
absolute: true,
|
|
93
|
+
nodir: true,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
if (!mapFiles.length) return;
|
|
97
|
+
|
|
98
|
+
for (const mapFile of mapFiles) {
|
|
99
|
+
let parsed;
|
|
100
|
+
|
|
101
|
+
try {
|
|
102
|
+
const raw = fs.readFileSync(mapFile, "utf-8");
|
|
103
|
+
parsed = JSON.parse(raw);
|
|
104
|
+
} catch {
|
|
105
|
+
continue;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
if (!parsed.sources?.length) continue;
|
|
109
|
+
|
|
110
|
+
try {
|
|
111
|
+
const mapDir = path.dirname(mapFile);
|
|
112
|
+
|
|
113
|
+
const result = remapping(parsed, (sourcePath, ctx) => {
|
|
114
|
+
if (!sourcePath) return null;
|
|
115
|
+
|
|
116
|
+
const baseDir = ctx.importer
|
|
117
|
+
? path.dirname(path.resolve(mapDir, ctx.importer))
|
|
118
|
+
: mapDir;
|
|
119
|
+
const absPath = path.resolve(baseDir, sourcePath);
|
|
120
|
+
if (!absPath.includes("node_modules/@bigbinary")) return null;
|
|
121
|
+
|
|
122
|
+
return loadUpstreamMap(absPath);
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
result.sources = result.sources.map(normalizeSourcePath);
|
|
126
|
+
|
|
127
|
+
fs.writeFileSync(mapFile, JSON.stringify(result));
|
|
128
|
+
} catch {
|
|
129
|
+
parsed.sources = parsed.sources.map(normalizeSourcePath);
|
|
130
|
+
fs.writeFileSync(mapFile, JSON.stringify(parsed));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
63
135
|
const build = async config => {
|
|
64
136
|
try {
|
|
65
137
|
console.info(
|
|
@@ -80,6 +152,8 @@ const build = async config => {
|
|
|
80
152
|
|
|
81
153
|
const result = await esbuild.build(buildConfig);
|
|
82
154
|
|
|
155
|
+
fixSourcemaps(buildConfig.outdir);
|
|
156
|
+
|
|
83
157
|
if (result.metafile) {
|
|
84
158
|
const metaFilePath = writeMetafile(result.metafile, buildConfig.outdir);
|
|
85
159
|
await generateBundleReport({
|
|
@@ -20,11 +20,13 @@ var utils_localePlugin = require('../utils/localePlugin.js');
|
|
|
20
20
|
var utils_timezonePlugin = require('../utils/timezonePlugin.js');
|
|
21
21
|
require('../slicedToArray-BcL7fKuL.js');
|
|
22
22
|
require('../unsupportedIterableToArray-BoHMiKNA.js');
|
|
23
|
+
require('../defineProperty-lChFfVqi.js');
|
|
24
|
+
require('../typeof-D4ZZ_FlZ.js');
|
|
23
25
|
require('../index-bFmfHzbL.js');
|
|
24
26
|
require('../_commonjsHelpers-BJu3ubxk.js');
|
|
25
27
|
require('i18next');
|
|
26
|
-
require('../
|
|
27
|
-
require('../
|
|
28
|
+
require('../utils/constants.js');
|
|
29
|
+
require('../utils/dayjsFormatOverrides/default.js');
|
|
28
30
|
|
|
29
31
|
// eslint-disable-next-line @bigbinary/neeto/use-dayjs-from-neeto-commons-fronted
|
|
30
32
|
var isValidTimezone = function isValidTimezone(timezone) {
|
|
@@ -54,7 +56,7 @@ var initializeDayjs = function initializeDayjs() {
|
|
|
54
56
|
pureDayjs.extend(utc);
|
|
55
57
|
pureDayjs.extend(weekday);
|
|
56
58
|
pureDayjs.extend(weekOfYear);
|
|
57
|
-
pureDayjs.extend(utils_localePlugin);
|
|
59
|
+
pureDayjs.extend(utils_localePlugin.default);
|
|
58
60
|
var shouldInitializeTimezone = !skipTimezone && ((_globalProps = globalProps) === null || _globalProps === void 0 || (_globalProps = _globalProps.user) === null || _globalProps === void 0 ? void 0 : _globalProps.timeZone) && isValidTimezone((_globalProps2 = globalProps) === null || _globalProps2 === void 0 || (_globalProps2 = _globalProps2.user) === null || _globalProps2 === void 0 ? void 0 : _globalProps2.timeZone);
|
|
59
61
|
if (shouldInitializeTimezone) {
|
|
60
62
|
var _globalProps3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dayjs.js","sources":["../../../src/initializers/dayjs.js"],"sourcesContent":["// eslint-disable-next-line @bigbinary/neeto/use-dayjs-from-neeto-commons-fronted\nimport pureDayjs from \"dayjs\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport duration from \"dayjs/plugin/duration\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport isToday from \"dayjs/plugin/isToday\";\nimport localeData from \"dayjs/plugin/localeData\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport minMax from \"dayjs/plugin/minMax\";\nimport quarterOfYear from \"dayjs/plugin/quarterOfYear\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\nimport utc from \"dayjs/plugin/utc\";\nimport weekday from \"dayjs/plugin/weekday\";\nimport weekOfYear from \"dayjs/plugin/weekOfYear\";\n\nimport customParseFormat from \"../utils/customParseFormatPlugin\";\nimport localePlugin from \"../utils/localePlugin\";\nimport timezone from \"../utils/timezonePlugin\";\n\nconst isValidTimezone = timezone => {\n try {\n pureDayjs().tz(timezone);\n\n return true;\n } catch {\n return false;\n }\n};\n\nconst initializeDayjs = (skipTimezone = false) => {\n pureDayjs.extend(advancedFormat);\n pureDayjs.extend(customParseFormat);\n pureDayjs.extend(duration);\n pureDayjs.extend(isSameOrAfter);\n pureDayjs.extend(isSameOrBefore);\n pureDayjs.extend(isToday);\n pureDayjs.extend(localeData);\n pureDayjs.extend(localizedFormat);\n pureDayjs.extend(minMax);\n pureDayjs.extend(quarterOfYear);\n pureDayjs.extend(relativeTime);\n pureDayjs.extend(timezone);\n pureDayjs.extend(updateLocale);\n pureDayjs.extend(utc);\n pureDayjs.extend(weekday);\n pureDayjs.extend(weekOfYear);\n pureDayjs.extend(localePlugin);\n\n const shouldInitializeTimezone =\n !skipTimezone &&\n globalProps?.user?.timeZone &&\n isValidTimezone(globalProps?.user?.timeZone);\n\n if (shouldInitializeTimezone) {\n pureDayjs.tz.setDefault(globalProps?.user?.timeZone);\n }\n};\n\nexport default initializeDayjs;\n"],"names":["isValidTimezone","timezone","pureDayjs","tz","_unused","initializeDayjs","_globalProps","_globalProps2","skipTimezone","arguments","length","undefined","extend","advancedFormat","customParseFormat","duration","isSameOrAfter","isSameOrBefore","isToday","localeData","localizedFormat","minMax","quarterOfYear","relativeTime","updateLocale","utc","weekday","weekOfYear","localePlugin","shouldInitializeTimezone","globalProps","user","timeZone","_globalProps3","setDefault"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dayjs.js","sources":["../../../src/initializers/dayjs.js"],"sourcesContent":["// eslint-disable-next-line @bigbinary/neeto/use-dayjs-from-neeto-commons-fronted\nimport pureDayjs from \"dayjs\";\nimport advancedFormat from \"dayjs/plugin/advancedFormat\";\nimport duration from \"dayjs/plugin/duration\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport isSameOrBefore from \"dayjs/plugin/isSameOrBefore\";\nimport isToday from \"dayjs/plugin/isToday\";\nimport localeData from \"dayjs/plugin/localeData\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport minMax from \"dayjs/plugin/minMax\";\nimport quarterOfYear from \"dayjs/plugin/quarterOfYear\";\nimport relativeTime from \"dayjs/plugin/relativeTime\";\nimport updateLocale from \"dayjs/plugin/updateLocale\";\nimport utc from \"dayjs/plugin/utc\";\nimport weekday from \"dayjs/plugin/weekday\";\nimport weekOfYear from \"dayjs/plugin/weekOfYear\";\n\nimport customParseFormat from \"../utils/customParseFormatPlugin\";\nimport localePlugin from \"../utils/localePlugin\";\nimport timezone from \"../utils/timezonePlugin\";\n\nconst isValidTimezone = timezone => {\n try {\n pureDayjs().tz(timezone);\n\n return true;\n } catch {\n return false;\n }\n};\n\nconst initializeDayjs = (skipTimezone = false) => {\n pureDayjs.extend(advancedFormat);\n pureDayjs.extend(customParseFormat);\n pureDayjs.extend(duration);\n pureDayjs.extend(isSameOrAfter);\n pureDayjs.extend(isSameOrBefore);\n pureDayjs.extend(isToday);\n pureDayjs.extend(localeData);\n pureDayjs.extend(localizedFormat);\n pureDayjs.extend(minMax);\n pureDayjs.extend(quarterOfYear);\n pureDayjs.extend(relativeTime);\n pureDayjs.extend(timezone);\n pureDayjs.extend(updateLocale);\n pureDayjs.extend(utc);\n pureDayjs.extend(weekday);\n pureDayjs.extend(weekOfYear);\n pureDayjs.extend(localePlugin);\n\n const shouldInitializeTimezone =\n !skipTimezone &&\n globalProps?.user?.timeZone &&\n isValidTimezone(globalProps?.user?.timeZone);\n\n if (shouldInitializeTimezone) {\n pureDayjs.tz.setDefault(globalProps?.user?.timeZone);\n }\n};\n\nexport default initializeDayjs;\n"],"names":["isValidTimezone","timezone","pureDayjs","tz","_unused","initializeDayjs","_globalProps","_globalProps2","skipTimezone","arguments","length","undefined","extend","advancedFormat","customParseFormat","duration","isSameOrAfter","isSameOrBefore","isToday","localeData","localizedFormat","minMax","quarterOfYear","relativeTime","updateLocale","utc","weekday","weekOfYear","localePlugin","shouldInitializeTimezone","globalProps","user","timeZone","_globalProps3","setDefault"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAqBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,QAAQ,EAAI;EAClC,IAAI;AACFC,IAAAA,SAAS,EAAE,CAACC,EAAE,CAACF,QAAQ,CAAC;AAExB,IAAA,OAAO,IAAI;GACZ,CAAC,OAAAG,OAAA,EAAM;AACN,IAAA,OAAO,KAAK;AACd;AACF,CAAC;AAED,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,GAA6B;EAAA,IAAAC,YAAA,EAAAC,aAAA;AAAA,EAAA,IAAzBC,YAAY,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,KAAK;AAC3CP,EAAAA,SAAS,CAACU,MAAM,CAACC,cAAc,CAAC;AAChCX,EAAAA,SAAS,CAACU,MAAM,CAACE,6BAAiB,CAAC;AACnCZ,EAAAA,SAAS,CAACU,MAAM,CAACG,QAAQ,CAAC;AAC1Bb,EAAAA,SAAS,CAACU,MAAM,CAACI,aAAa,CAAC;AAC/Bd,EAAAA,SAAS,CAACU,MAAM,CAACK,cAAc,CAAC;AAChCf,EAAAA,SAAS,CAACU,MAAM,CAACM,OAAO,CAAC;AACzBhB,EAAAA,SAAS,CAACU,MAAM,CAACO,UAAU,CAAC;AAC5BjB,EAAAA,SAAS,CAACU,MAAM,CAACQ,eAAe,CAAC;AACjClB,EAAAA,SAAS,CAACU,MAAM,CAACS,MAAM,CAAC;AACxBnB,EAAAA,SAAS,CAACU,MAAM,CAACU,aAAa,CAAC;AAC/BpB,EAAAA,SAAS,CAACU,MAAM,CAACW,YAAY,CAAC;AAC9BrB,EAAAA,SAAS,CAACU,MAAM,CAACX,oBAAQ,CAAC;AAC1BC,EAAAA,SAAS,CAACU,MAAM,CAACY,YAAY,CAAC;AAC9BtB,EAAAA,SAAS,CAACU,MAAM,CAACa,GAAG,CAAC;AACrBvB,EAAAA,SAAS,CAACU,MAAM,CAACc,OAAO,CAAC;AACzBxB,EAAAA,SAAS,CAACU,MAAM,CAACe,UAAU,CAAC;AAC5BzB,EAAAA,SAAS,CAACU,MAAM,CAACgB,0BAAY,CAAC;AAE9B,EAAA,IAAMC,wBAAwB,GAC5B,CAACrB,YAAY,KAAAF,CAAAA,YAAA,GACbwB,WAAW,MAAA,IAAA,IAAAxB,YAAA,KAAAA,MAAAA,IAAAA,CAAAA,YAAA,GAAXA,YAAA,CAAayB,IAAI,MAAAzB,IAAAA,IAAAA,YAAA,uBAAjBA,YAAA,CAAmB0B,QAAQ,CAAA,IAC3BhC,eAAe,CAAAO,CAAAA,aAAA,GAACuB,WAAW,MAAA,IAAA,IAAAvB,aAAA,KAAAA,MAAAA,IAAAA,CAAAA,aAAA,GAAXA,aAAA,CAAawB,IAAI,MAAAxB,IAAAA,IAAAA,aAAA,uBAAjBA,aAAA,CAAmByB,QAAQ,CAAC;AAE9C,EAAA,IAAIH,wBAAwB,EAAE;AAAA,IAAA,IAAAI,aAAA;IAC5B/B,SAAS,CAACC,EAAE,CAAC+B,UAAU,EAAAD,aAAA,GAACH,WAAW,MAAA,IAAA,IAAAG,aAAA,KAAA,MAAA,IAAA,CAAAA,aAAA,GAAXA,aAAA,CAAaF,IAAI,MAAA,IAAA,IAAAE,aAAA,KAAjBA,MAAAA,GAAAA,MAAAA,GAAAA,aAAA,CAAmBD,QAAQ,CAAC;AACtD;AACF;;;;"}
|
|
@@ -9,14 +9,14 @@ var ramda = require('ramda');
|
|
|
9
9
|
var reactI18next = require('react-i18next');
|
|
10
10
|
var utils_retryImport = require('../utils/retryImport.js');
|
|
11
11
|
var initializers_constants = require('./constants.js');
|
|
12
|
+
var initializers_utils_index = require('./utils/index.js');
|
|
12
13
|
var initializers_utils_customFormatters = require('./utils/customFormatters.js');
|
|
13
14
|
var initializers_utils_customPostProcessors = require('./utils/customPostProcessors.js');
|
|
14
|
-
var initializers_utils_utils = require('./utils/utils.js');
|
|
15
15
|
require('../unsupportedIterableToArray-BoHMiKNA.js');
|
|
16
16
|
require('../_commonjsHelpers-BJu3ubxk.js');
|
|
17
|
-
require('dompurify');
|
|
18
17
|
require('../typeof-D4ZZ_FlZ.js');
|
|
19
18
|
require('../slicedToArray-BcL7fKuL.js');
|
|
19
|
+
require('dompurify');
|
|
20
20
|
|
|
21
21
|
function _classCallCheck(a, n) {
|
|
22
22
|
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -492,7 +492,7 @@ var initializeI18n = /*#__PURE__*/function () {
|
|
|
492
492
|
}];
|
|
493
493
|
}));
|
|
494
494
|
hostTaxonomies = ((_window$globalProps2 = window.globalProps) === null || _window$globalProps2 === void 0 ? void 0 : _window$globalProps2.taxonomies) || {};
|
|
495
|
-
exports.taxonomies =
|
|
495
|
+
exports.taxonomies = initializers_utils_index.replaceNullValuesWithGetter(ramda.mergeDeepLeft(hostTaxonomies, defaultTaxonomies));
|
|
496
496
|
_context.next = 12;
|
|
497
497
|
return i18next.use(Browser).use(reactI18next.initReactI18next).use(initializers_utils_customPostProcessors.sentenceCaseProcessor).use(resourcesToBackend(function (language) {
|
|
498
498
|
return utils_retryImport(translationImports === null || translationImports === void 0 ? void 0 : translationImports[language]);
|