@intlayer/core 1.0.0 → 1.2.0
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/dist/cjs/getLocaleName.cjs +8 -13
- package/dist/cjs/getLocaleName.d.ts +1 -1
- package/dist/cjs/index.cjs +20 -27
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/index.d.ts +12 -25
- package/dist/cjs/localeList.cjs +9 -14
- package/dist/cjs/localeList.d.ts +1 -1
- package/dist/cjs/transpiler/content_transformers/enumeration/enumeration.cjs +12 -17
- package/dist/cjs/transpiler/content_transformers/enumeration/enumeration.cjs.map +1 -1
- package/dist/cjs/transpiler/content_transformers/enumeration/enumeration.d.ts +21 -16
- package/dist/cjs/transpiler/content_transformers/enumeration/getEnumerationContent.cjs +14 -34
- package/dist/cjs/transpiler/content_transformers/enumeration/getEnumerationContent.cjs.map +1 -1
- package/dist/cjs/transpiler/content_transformers/enumeration/getEnumerationContent.d.ts +27 -7
- package/dist/cjs/transpiler/content_transformers/enumeration/index.cjs +11 -23
- package/dist/cjs/transpiler/content_transformers/enumeration/index.d.ts +4 -4
- package/dist/cjs/transpiler/content_transformers/index.cjs +11 -27
- package/dist/cjs/transpiler/content_transformers/index.d.ts +9 -15
- package/dist/cjs/transpiler/content_transformers/translation/getTranslationContent.cjs +9 -15
- package/dist/cjs/transpiler/content_transformers/translation/getTranslationContent.cjs.map +1 -1
- package/dist/cjs/transpiler/content_transformers/translation/getTranslationContent.d.ts +25 -8
- package/dist/cjs/transpiler/content_transformers/translation/index.cjs +13 -23
- package/dist/cjs/transpiler/content_transformers/translation/index.cjs.map +1 -1
- package/dist/cjs/transpiler/content_transformers/translation/index.d.ts +7 -5
- package/dist/cjs/transpiler/content_transformers/translation/{translations.cjs → translation.cjs} +17 -22
- package/dist/cjs/transpiler/content_transformers/translation/translation.cjs.map +1 -0
- package/dist/cjs/transpiler/content_transformers/translation/translation.d.ts +27 -0
- package/dist/cjs/transpiler/content_transformers/translation/types.cjs +17 -0
- package/dist/cjs/transpiler/content_transformers/translation/types.cjs.map +1 -0
- package/dist/cjs/transpiler/content_transformers/translation/types.d.ts +63 -0
- package/dist/cjs/transpiler/index.cjs +9 -22
- package/dist/cjs/transpiler/index.cjs.map +1 -1
- package/dist/cjs/transpiler/index.d.ts +9 -13
- package/dist/cjs/types/contentModule.cjs +4 -8
- package/dist/cjs/types/contentModule.d.ts +14 -28
- package/dist/cjs/types/index.cjs +9 -14
- package/dist/cjs/types/index.d.ts +7 -13
- package/dist/cjs/types/nodeType.cjs +8 -13
- package/dist/cjs/types/nodeType.d.ts +2 -2
- package/dist/cjs/utils/getStackTraceInfo.cjs +9 -14
- package/dist/cjs/utils/getStackTraceInfo.cjs.map +1 -1
- package/dist/cjs/utils/getStackTraceInfo.d.ts +4 -4
- package/dist/esm/getLocaleName.d.mts +1 -1
- package/dist/esm/getLocaleName.mjs +4 -2
- package/dist/esm/index.d.mts +12 -25
- package/dist/esm/index.mjs +7 -7
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/localeList.d.mts +1 -1
- package/dist/esm/localeList.mjs +5 -3
- package/dist/esm/transpiler/content_transformers/enumeration/enumeration.d.mts +21 -16
- package/dist/esm/transpiler/content_transformers/enumeration/enumeration.mjs +10 -6
- package/dist/esm/transpiler/content_transformers/enumeration/enumeration.mjs.map +1 -1
- package/dist/esm/transpiler/content_transformers/enumeration/getEnumerationContent.d.mts +27 -7
- package/dist/esm/transpiler/content_transformers/enumeration/getEnumerationContent.mjs +10 -23
- package/dist/esm/transpiler/content_transformers/enumeration/getEnumerationContent.mjs.map +1 -1
- package/dist/esm/transpiler/content_transformers/enumeration/index.d.mts +4 -4
- package/dist/esm/transpiler/content_transformers/enumeration/index.mjs +3 -3
- package/dist/esm/transpiler/content_transformers/index.d.mts +9 -15
- package/dist/esm/transpiler/content_transformers/index.mjs +3 -3
- package/dist/esm/transpiler/content_transformers/translation/getTranslationContent.d.mts +25 -8
- package/dist/esm/transpiler/content_transformers/translation/getTranslationContent.mjs +8 -5
- package/dist/esm/transpiler/content_transformers/translation/getTranslationContent.mjs.map +1 -1
- package/dist/esm/transpiler/content_transformers/translation/index.d.mts +7 -5
- package/dist/esm/transpiler/content_transformers/translation/index.mjs +4 -3
- package/dist/esm/transpiler/content_transformers/translation/index.mjs.map +1 -1
- package/dist/esm/transpiler/content_transformers/translation/translation.d.mts +27 -0
- package/dist/esm/transpiler/content_transformers/translation/{translations.mjs → translation.mjs} +10 -7
- package/dist/esm/transpiler/content_transformers/translation/translation.mjs.map +1 -0
- package/dist/esm/transpiler/content_transformers/translation/types.d.mts +63 -0
- package/dist/esm/transpiler/content_transformers/translation/types.mjs +1 -0
- package/dist/esm/transpiler/content_transformers/translation/types.mjs.map +1 -0
- package/dist/esm/transpiler/index.d.mts +9 -13
- package/dist/esm/transpiler/index.mjs +2 -3
- package/dist/esm/transpiler/index.mjs.map +1 -1
- package/dist/esm/types/contentModule.d.mts +14 -28
- package/dist/esm/types/contentModule.mjs +1 -1
- package/dist/esm/types/index.d.mts +7 -13
- package/dist/esm/types/index.mjs +5 -3
- package/dist/esm/types/nodeType.d.mts +2 -2
- package/dist/esm/types/nodeType.mjs +4 -2
- package/dist/esm/utils/getStackTraceInfo.d.mts +4 -4
- package/dist/esm/utils/getStackTraceInfo.mjs +5 -3
- package/dist/esm/utils/getStackTraceInfo.mjs.map +1 -1
- package/package.json +12 -8
- package/src/index.ts +2 -0
- package/src/transpiler/content_transformers/enumeration/enumeration.ts +15 -1
- package/src/transpiler/content_transformers/enumeration/getEnumerationContent.ts +23 -0
- package/src/transpiler/content_transformers/translation/getTranslationContent.ts +27 -5
- package/src/transpiler/content_transformers/translation/index.ts +2 -1
- package/src/transpiler/content_transformers/translation/translation.ts +50 -0
- package/src/transpiler/content_transformers/translation/types.ts +72 -0
- package/src/transpiler/index.ts +1 -7
- package/src/utils/getStackTraceInfo.ts +1 -1
- package/dist/cjs/transpiler/content_transformers/translation/translations.cjs.map +0 -1
- package/dist/cjs/transpiler/content_transformers/translation/translations.d.ts +0 -17
- package/dist/esm/transpiler/content_transformers/translation/translations.d.mts +0 -17
- package/dist/esm/transpiler/content_transformers/translation/translations.mjs.map +0 -1
- package/src/transpiler/content_transformers/translation/translations.ts +0 -42
|
@@ -8,21 +8,17 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var getLocaleName_exports = {};
|
|
24
20
|
__export(getLocaleName_exports, {
|
|
25
|
-
getLocaleName: () => getLocaleName
|
|
21
|
+
getLocaleName: () => getLocaleName
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(getLocaleName_exports);
|
|
28
24
|
var import_client = require("@intlayer/config/client");
|
|
@@ -487,8 +483,7 @@ const getLocaleName = (locale) => {
|
|
|
487
483
|
}
|
|
488
484
|
};
|
|
489
485
|
// Annotate the CommonJS export names for ESM import in node:
|
|
490
|
-
0 &&
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
//# sourceMappingURL=getLocaleName.cjs.map
|
|
486
|
+
0 && (module.exports = {
|
|
487
|
+
getLocaleName
|
|
488
|
+
});
|
|
489
|
+
//# sourceMappingURL=getLocaleName.cjs.map
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -8,44 +8,37 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var src_exports = {};
|
|
24
20
|
__export(src_exports, {
|
|
25
21
|
NodeType: () => import_types.NodeType,
|
|
26
22
|
enu: () => import_content_transformers.enu,
|
|
27
|
-
getEnumerationContent: () =>
|
|
28
|
-
import_content_transformers.getEnumerationContent,
|
|
23
|
+
getEnumerationContent: () => import_content_transformers.getEnumerationContent,
|
|
29
24
|
getLocaleName: () => import_getLocaleName.getLocaleName,
|
|
30
|
-
getTranslationContent: () =>
|
|
31
|
-
import_content_transformers.getTranslationContent,
|
|
25
|
+
getTranslationContent: () => import_content_transformers.getTranslationContent,
|
|
32
26
|
localeList: () => import_localeList.localeList,
|
|
33
|
-
t: () => import_content_transformers.t
|
|
27
|
+
t: () => import_content_transformers.t
|
|
34
28
|
});
|
|
35
29
|
module.exports = __toCommonJS(src_exports);
|
|
36
|
-
var import_content_transformers = require(
|
|
37
|
-
var import_types = require(
|
|
38
|
-
var import_getLocaleName = require(
|
|
39
|
-
var import_localeList = require(
|
|
30
|
+
var import_content_transformers = require('./transpiler/content_transformers/index.cjs');
|
|
31
|
+
var import_types = require('./types/index.cjs');
|
|
32
|
+
var import_getLocaleName = require('./getLocaleName.cjs');
|
|
33
|
+
var import_localeList = require('./localeList.cjs');
|
|
40
34
|
// Annotate the CommonJS export names for ESM import in node:
|
|
41
|
-
0 &&
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
//# sourceMappingURL=index.cjs.map
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
NodeType,
|
|
37
|
+
enu,
|
|
38
|
+
getEnumerationContent,
|
|
39
|
+
getLocaleName,
|
|
40
|
+
getTranslationContent,
|
|
41
|
+
localeList,
|
|
42
|
+
t
|
|
43
|
+
});
|
|
44
|
+
//# sourceMappingURL=index.cjs.map
|
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export type {\n LanguageContent,\n TranslationContent,\n EnumerationContent,\n QuantityContent,\n} from './transpiler/content_transformers/index';\nexport {\n t,\n enu,\n getTranslationContent,\n getEnumerationContent,\n} from './transpiler/content_transformers/index';\nexport type {\n ContentValue,\n Content,\n FlatContentValue,\n FlatContent,\n TypedNode,\n ContentModule,\n} from './types/index';\nexport { NodeType } from './types/index';\nexport { getLocaleName } from './getLocaleName';\nexport { localeList } from './localeList';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export type {\n CustomizableLanguageContent,\n LanguageContent,\n TranslationContent,\n EnumerationContent,\n QuantityContent,\n CustomLocales as Locales,\n} from './transpiler/content_transformers/index';\nexport {\n t,\n enu,\n getTranslationContent,\n getEnumerationContent,\n} from './transpiler/content_transformers/index';\nexport type {\n ContentValue,\n Content,\n FlatContentValue,\n FlatContent,\n TypedNode,\n ContentModule,\n} from './types/index';\nexport { NodeType } from './types/index';\nexport { getLocaleName } from './getLocaleName';\nexport { localeList } from './localeList';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQA,kCAKO;AASP,mBAAyB;AACzB,2BAA8B;AAC9B,wBAA2B;","names":[]}
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,25 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
export {
|
|
14
|
-
Content,
|
|
15
|
-
ContentModule,
|
|
16
|
-
ContentValue,
|
|
17
|
-
FlatContent,
|
|
18
|
-
FlatContentValue,
|
|
19
|
-
TypedNode,
|
|
20
|
-
} from "./types/contentModule.js";
|
|
21
|
-
export { NodeType } from "./types/nodeType.js";
|
|
22
|
-
export { getLocaleName } from "./getLocaleName.js";
|
|
23
|
-
export { localeList } from "./localeList.js";
|
|
24
|
-
import "@intlayer/config/client";
|
|
25
|
-
import "./utils/getStackTraceInfo.js";
|
|
1
|
+
export { t } from './transpiler/content_transformers/translation/translation.js';
|
|
2
|
+
export { getTranslationContent } from './transpiler/content_transformers/translation/getTranslationContent.js';
|
|
3
|
+
export { CustomizableLanguageContent, LanguageContent, CustomLocales as Locales, TranslationContent } from './transpiler/content_transformers/translation/types.js';
|
|
4
|
+
export { EnumerationContent, QuantityContent, enu } from './transpiler/content_transformers/enumeration/enumeration.js';
|
|
5
|
+
export { getEnumerationContent } from './transpiler/content_transformers/enumeration/getEnumerationContent.js';
|
|
6
|
+
export { Content, ContentModule, ContentValue, FlatContent, FlatContentValue, TypedNode } from './types/contentModule.js';
|
|
7
|
+
export { NodeType } from './types/nodeType.js';
|
|
8
|
+
export { getLocaleName } from './getLocaleName.js';
|
|
9
|
+
export { localeList } from './localeList.js';
|
|
10
|
+
import '@intlayer/config/client';
|
|
11
|
+
import 'intlayer';
|
|
12
|
+
import './utils/getStackTraceInfo.js';
|
package/dist/cjs/localeList.cjs
CHANGED
|
@@ -8,21 +8,17 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var localeList_exports = {};
|
|
24
20
|
__export(localeList_exports, {
|
|
25
|
-
localeList: () => localeList
|
|
21
|
+
localeList: () => localeList
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(localeList_exports);
|
|
28
24
|
var import_client = require("@intlayer/config/client");
|
|
@@ -251,11 +247,10 @@ const localeList = [
|
|
|
251
247
|
import_client.Locales.CHINESE_MACAU,
|
|
252
248
|
import_client.Locales.CHINESE_SINGAPORE,
|
|
253
249
|
import_client.Locales.CHINESE_TRADITIONAL,
|
|
254
|
-
import_client.Locales.ZULU_SOUTH_AFRICA
|
|
250
|
+
import_client.Locales.ZULU_SOUTH_AFRICA
|
|
255
251
|
];
|
|
256
252
|
// Annotate the CommonJS export names for ESM import in node:
|
|
257
|
-
0 &&
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
//# sourceMappingURL=localeList.cjs.map
|
|
253
|
+
0 && (module.exports = {
|
|
254
|
+
localeList
|
|
255
|
+
});
|
|
256
|
+
//# sourceMappingURL=localeList.cjs.map
|
package/dist/cjs/localeList.d.ts
CHANGED
|
@@ -8,45 +8,40 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var enumeration_exports = {};
|
|
24
20
|
__export(enumeration_exports, {
|
|
25
|
-
enu: () => enumeration
|
|
21
|
+
enu: () => enumeration
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(enumeration_exports);
|
|
28
|
-
var import_types = require(
|
|
29
|
-
var import_getStackTraceInfo = require(
|
|
24
|
+
var import_types = require('../../../types/index.cjs');
|
|
25
|
+
var import_getStackTraceInfo = require('../../../utils/getStackTraceInfo.cjs');
|
|
30
26
|
const enumeration = (content) => {
|
|
31
27
|
const stackTraceInfo = (0, import_getStackTraceInfo.getStackTraceInfo)();
|
|
32
28
|
if (typeof content === "string") {
|
|
33
29
|
const result2 = {
|
|
34
30
|
nodeType: import_types.NodeType.Enumeration,
|
|
35
31
|
...stackTraceInfo,
|
|
36
|
-
1: content
|
|
32
|
+
1: content
|
|
37
33
|
};
|
|
38
34
|
return result2;
|
|
39
35
|
}
|
|
40
36
|
const result = {
|
|
41
37
|
nodeType: import_types.NodeType.Enumeration,
|
|
42
38
|
...stackTraceInfo,
|
|
43
|
-
...content
|
|
39
|
+
...content
|
|
44
40
|
};
|
|
45
41
|
return result;
|
|
46
42
|
};
|
|
47
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 &&
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
//# sourceMappingURL=enumeration.cjs.map
|
|
44
|
+
0 && (module.exports = {
|
|
45
|
+
enu
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=enumeration.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/content_transformers/enumeration/enumeration.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NodeType } from '../../../types/index';\nimport {\n getStackTraceInfo,\n type NoteStackTraceInfo,\n} from '../../../utils/getStackTraceInfo';\n\ntype Positif = number | `${number}`;\ntype Negatif = `-${number}`;\ntype Numbers = Positif | Negatif;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\ntype EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type QuantityContent<Content> = Record<EnterFormat, Content>;\n\nexport type EnumerationContent<Content> = Partial<QuantityContent<Content>> &\n NoteStackTraceInfo & {\n nodeType: NodeType.Enumeration;\n };\n\n/**\n *
|
|
1
|
+
{"version":3,"sources":["../../../../../src/transpiler/content_transformers/enumeration/enumeration.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NodeType } from '../../../types/index';\nimport {\n getStackTraceInfo,\n type NoteStackTraceInfo,\n} from '../../../utils/getStackTraceInfo';\n\ntype Positif = number | `${number}`;\ntype Negatif = `-${number}`;\ntype Numbers = Positif | Negatif;\n\ntype Equal = Numbers;\ntype EqualString = `=${Numbers}`;\ntype Superior = `>${Numbers}`;\ntype SuperiorOrEqual = `>=${Numbers}`;\ntype Inferior = `<${Numbers}`;\ntype InferiorOrEqual = `<=${Numbers}`;\n\ntype EnterFormat =\n | Equal\n | EqualString\n | Superior\n | SuperiorOrEqual\n | Inferior\n | InferiorOrEqual;\n\nexport type QuantityContent<Content> = Record<EnterFormat, Content>;\n\nexport type EnumerationContent<Content> = Partial<QuantityContent<Content>> &\n NoteStackTraceInfo & {\n nodeType: NodeType.Enumeration;\n };\n\n/**\n * Function intended to be used to build intlayer dictionaries.\n *\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * const content = enu({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * });\n *\n * The order of the keys will define the priority of the content.\n *\n */\nconst enumeration = <Content>(content?: Partial<QuantityContent<Content>>) => {\n const stackTraceInfo = getStackTraceInfo();\n\n if (typeof content === 'string') {\n const result: EnumerationContent<Content> = {\n nodeType: NodeType.Enumeration,\n ...stackTraceInfo,\n 1: content,\n };\n\n return result;\n }\n\n const result: EnumerationContent<Content> = {\n nodeType: NodeType.Enumeration,\n ...stackTraceInfo,\n ...content,\n };\n\n return result;\n};\n\nexport { enumeration as enu };\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,mBAAyB;AACzB,+BAGO;AA6CP,MAAM,cAAc,CAAU,YAAgD;AAC5E,QAAM,qBAAiB,4CAAkB;AAEzC,MAAI,OAAO,YAAY,UAAU;AAC/B,UAAMA,UAAsC;AAAA,MAC1C,UAAU,sBAAS;AAAA,MACnB,GAAG;AAAA,MACH,GAAG;AAAA,IACL;AAEA,WAAOA;AAAA,EACT;AAEA,QAAM,SAAsC;AAAA,IAC1C,UAAU,sBAAS;AAAA,IACnB,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,SAAO;AACT;","names":["result"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NoteStackTraceInfo } from
|
|
2
|
-
import { NodeType } from
|
|
1
|
+
import { NoteStackTraceInfo } from '../../../utils/getStackTraceInfo.js';
|
|
2
|
+
import { NodeType } from '../../../types/nodeType.js';
|
|
3
3
|
|
|
4
4
|
type Positif = number | `${number}`;
|
|
5
5
|
type Negatif = `-${number}`;
|
|
@@ -10,23 +10,28 @@ type Superior = `>${Numbers}`;
|
|
|
10
10
|
type SuperiorOrEqual = `>=${Numbers}`;
|
|
11
11
|
type Inferior = `<${Numbers}`;
|
|
12
12
|
type InferiorOrEqual = `<=${Numbers}`;
|
|
13
|
-
type EnterFormat =
|
|
14
|
-
| Equal
|
|
15
|
-
| EqualString
|
|
16
|
-
| Superior
|
|
17
|
-
| SuperiorOrEqual
|
|
18
|
-
| Inferior
|
|
19
|
-
| InferiorOrEqual;
|
|
13
|
+
type EnterFormat = Equal | EqualString | Superior | SuperiorOrEqual | Inferior | InferiorOrEqual;
|
|
20
14
|
type QuantityContent<Content> = Record<EnterFormat, Content>;
|
|
21
|
-
type EnumerationContent<Content> = Partial<QuantityContent<Content>> &
|
|
22
|
-
NoteStackTraceInfo & {
|
|
15
|
+
type EnumerationContent<Content> = Partial<QuantityContent<Content>> & NoteStackTraceInfo & {
|
|
23
16
|
nodeType: NodeType.Enumeration;
|
|
24
|
-
|
|
17
|
+
};
|
|
25
18
|
/**
|
|
26
|
-
*
|
|
19
|
+
* Function intended to be used to build intlayer dictionaries.
|
|
20
|
+
*
|
|
21
|
+
* Allow to pick a content based on a quantity.
|
|
22
|
+
*
|
|
23
|
+
* Usage:
|
|
24
|
+
*
|
|
25
|
+
* const content = enu({
|
|
26
|
+
* '<=-2.3': 'You have less than -2.3',
|
|
27
|
+
* '<1': 'You have less than one',
|
|
28
|
+
* '2': 'You have two',
|
|
29
|
+
* '>=3': 'You have three or more',
|
|
30
|
+
* });
|
|
31
|
+
*
|
|
32
|
+
* The order of the keys will define the priority of the content.
|
|
33
|
+
*
|
|
27
34
|
*/
|
|
28
|
-
declare const enumeration: <Content>(
|
|
29
|
-
content?: Partial<QuantityContent<Content>>
|
|
30
|
-
) => EnumerationContent<Content>;
|
|
35
|
+
declare const enumeration: <Content>(content?: Partial<QuantityContent<Content>>) => EnumerationContent<Content>;
|
|
31
36
|
|
|
32
37
|
export { type EnumerationContent, type QuantityContent, enumeration as enu };
|
|
@@ -8,55 +8,35 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var getEnumerationContent_exports = {};
|
|
24
20
|
__export(getEnumerationContent_exports, {
|
|
25
|
-
getEnumerationContent: () => getEnumerationContent
|
|
21
|
+
getEnumerationContent: () => getEnumerationContent
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(getEnumerationContent_exports);
|
|
28
24
|
const getEnumerationContent = (enumerationContent, quantity) => {
|
|
29
25
|
const numericKeys = Object.keys(enumerationContent);
|
|
30
26
|
for (const key of numericKeys) {
|
|
31
|
-
const isEqual =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const isSuperior =
|
|
38
|
-
key.startsWith(">") && quantity > parseFloat(key.slice(1));
|
|
39
|
-
const isSuperiorOrEqual =
|
|
40
|
-
key.startsWith(">=") && quantity >= parseFloat(key.slice(2));
|
|
41
|
-
const isInferior =
|
|
42
|
-
key.startsWith("<") && quantity < parseFloat(key.slice(1));
|
|
43
|
-
const isInferiorOrEqual =
|
|
44
|
-
key.startsWith("<=") && quantity <= parseFloat(key.slice(2));
|
|
45
|
-
if (
|
|
46
|
-
isEqual ||
|
|
47
|
-
isSuperior ||
|
|
48
|
-
isSuperiorOrEqual ||
|
|
49
|
-
isInferior ||
|
|
50
|
-
isInferiorOrEqual
|
|
51
|
-
) {
|
|
27
|
+
const isEqual = !key.startsWith(">") && !key.startsWith("<") && !key.startsWith("=") && parseFloat(key) === quantity || key.startsWith("=") && parseFloat(key.slice(1)) === quantity;
|
|
28
|
+
const isSuperior = key.startsWith(">") && quantity > parseFloat(key.slice(1));
|
|
29
|
+
const isSuperiorOrEqual = key.startsWith(">=") && quantity >= parseFloat(key.slice(2));
|
|
30
|
+
const isInferior = key.startsWith("<") && quantity < parseFloat(key.slice(1));
|
|
31
|
+
const isInferiorOrEqual = key.startsWith("<=") && quantity <= parseFloat(key.slice(2));
|
|
32
|
+
if (isEqual || isSuperior || isSuperiorOrEqual || isInferior || isInferiorOrEqual) {
|
|
52
33
|
return enumerationContent[key];
|
|
53
34
|
}
|
|
54
35
|
}
|
|
55
36
|
return enumerationContent["1"];
|
|
56
37
|
};
|
|
57
38
|
// Annotate the CommonJS export names for ESM import in node:
|
|
58
|
-
0 &&
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
//# sourceMappingURL=getEnumerationContent.cjs.map
|
|
39
|
+
0 && (module.exports = {
|
|
40
|
+
getEnumerationContent
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=getEnumerationContent.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/transpiler/content_transformers/enumeration/getEnumerationContent.ts"],"sourcesContent":["import type { QuantityContent } from './enumeration';\n\ntype Key = keyof QuantityContent<string>;\n\nexport const getEnumerationContent = <Content>(\n enumerationContent: QuantityContent<Content>,\n quantity: number\n): Content => {\n const numericKeys = Object.keys(enumerationContent);\n\n for (const key of numericKeys) {\n const isEqual =\n (!key.startsWith('>') &&\n !key.startsWith('<') &&\n !key.startsWith('=') &&\n parseFloat(key) === quantity) ||\n (key.startsWith('=') && parseFloat(key.slice(1)) === quantity);\n const isSuperior =\n key.startsWith('>') && quantity > parseFloat(key.slice(1));\n const isSuperiorOrEqual =\n key.startsWith('>=') && quantity >= parseFloat(key.slice(2));\n const isInferior =\n key.startsWith('<') && quantity < parseFloat(key.slice(1));\n const isInferiorOrEqual =\n key.startsWith('<=') && quantity <= parseFloat(key.slice(2));\n\n if (\n isEqual ||\n isSuperior ||\n isSuperiorOrEqual ||\n isInferior ||\n isInferiorOrEqual\n ) {\n return enumerationContent[key as Key];\n }\n }\n\n // Default or error handling if no keys match\n return enumerationContent['1'];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/transpiler/content_transformers/enumeration/getEnumerationContent.ts"],"sourcesContent":["import type { QuantityContent } from './enumeration';\n\ntype Key = keyof QuantityContent<string>;\n\n/**\n * Allow to pick a content based on a quantity.\n *\n * Usage:\n *\n * const content = getEnumerationContent({\n * '<=-2.3': 'You have less than -2.3',\n * '<1': 'You have less than one',\n * '2': 'You have two',\n * '>=3': 'You have three or more',\n * },\n * 2);\n * // 'You have two'\n *\n * The order of the keys will define the priority of the content.\n *\n * const content = getEnumerationContent({\n * '<4': 'You have less than four',\n * '2': 'You have two',\n * });\n * // 'You have less than four'\n *\n */\nexport const getEnumerationContent = <Content>(\n enumerationContent: QuantityContent<Content>,\n quantity: number\n): Content => {\n const numericKeys = Object.keys(enumerationContent);\n\n for (const key of numericKeys) {\n const isEqual =\n (!key.startsWith('>') &&\n !key.startsWith('<') &&\n !key.startsWith('=') &&\n parseFloat(key) === quantity) ||\n (key.startsWith('=') && parseFloat(key.slice(1)) === quantity);\n const isSuperior =\n key.startsWith('>') && quantity > parseFloat(key.slice(1));\n const isSuperiorOrEqual =\n key.startsWith('>=') && quantity >= parseFloat(key.slice(2));\n const isInferior =\n key.startsWith('<') && quantity < parseFloat(key.slice(1));\n const isInferiorOrEqual =\n key.startsWith('<=') && quantity <= parseFloat(key.slice(2));\n\n if (\n isEqual ||\n isSuperior ||\n isSuperiorOrEqual ||\n isInferior ||\n isInferiorOrEqual\n ) {\n return enumerationContent[key as Key];\n }\n }\n\n // Default or error handling if no keys match\n return enumerationContent['1'];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BO,MAAM,wBAAwB,CACnC,oBACA,aACY;AACZ,QAAM,cAAc,OAAO,KAAK,kBAAkB;AAElD,aAAW,OAAO,aAAa;AAC7B,UAAM,UACH,CAAC,IAAI,WAAW,GAAG,KAClB,CAAC,IAAI,WAAW,GAAG,KACnB,CAAC,IAAI,WAAW,GAAG,KACnB,WAAW,GAAG,MAAM,YACrB,IAAI,WAAW,GAAG,KAAK,WAAW,IAAI,MAAM,CAAC,CAAC,MAAM;AACvD,UAAM,aACJ,IAAI,WAAW,GAAG,KAAK,WAAW,WAAW,IAAI,MAAM,CAAC,CAAC;AAC3D,UAAM,oBACJ,IAAI,WAAW,IAAI,KAAK,YAAY,WAAW,IAAI,MAAM,CAAC,CAAC;AAC7D,UAAM,aACJ,IAAI,WAAW,GAAG,KAAK,WAAW,WAAW,IAAI,MAAM,CAAC,CAAC;AAC3D,UAAM,oBACJ,IAAI,WAAW,IAAI,KAAK,YAAY,WAAW,IAAI,MAAM,CAAC,CAAC;AAE7D,QACE,WACA,cACA,qBACA,cACA,mBACA;AACA,aAAO,mBAAmB,GAAU;AAAA,IACtC;AAAA,EACF;AAGA,SAAO,mBAAmB,GAAG;AAC/B;","names":[]}
|
|
@@ -1,10 +1,30 @@
|
|
|
1
|
-
import { QuantityContent } from
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { QuantityContent } from './enumeration.js';
|
|
2
|
+
import '../../../utils/getStackTraceInfo.js';
|
|
3
|
+
import '../../../types/nodeType.js';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Allow to pick a content based on a quantity.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
*
|
|
10
|
+
* const content = getEnumerationContent({
|
|
11
|
+
* '<=-2.3': 'You have less than -2.3',
|
|
12
|
+
* '<1': 'You have less than one',
|
|
13
|
+
* '2': 'You have two',
|
|
14
|
+
* '>=3': 'You have three or more',
|
|
15
|
+
* },
|
|
16
|
+
* 2);
|
|
17
|
+
* // 'You have two'
|
|
18
|
+
*
|
|
19
|
+
* The order of the keys will define the priority of the content.
|
|
20
|
+
*
|
|
21
|
+
* const content = getEnumerationContent({
|
|
22
|
+
* '<4': 'You have less than four',
|
|
23
|
+
* '2': 'You have two',
|
|
24
|
+
* });
|
|
25
|
+
* // 'You have less than four'
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
declare const getEnumerationContent: <Content>(enumerationContent: QuantityContent<Content>, quantity: number) => Content;
|
|
9
29
|
|
|
10
30
|
export { getEnumerationContent };
|
|
@@ -4,34 +4,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
8
|
for (let key of __getOwnPropNames(from))
|
|
9
9
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
13
|
-
});
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
11
|
}
|
|
15
12
|
return to;
|
|
16
13
|
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
18
|
-
|
|
19
|
-
secondTarget && __copyProps(secondTarget, mod, "default")
|
|
20
|
-
);
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
16
|
var enumeration_exports = {};
|
|
24
17
|
module.exports = __toCommonJS(enumeration_exports);
|
|
25
|
-
__reExport(enumeration_exports, require(
|
|
26
|
-
__reExport(
|
|
27
|
-
enumeration_exports,
|
|
28
|
-
require("./getEnumerationContent.cjs"),
|
|
29
|
-
module.exports
|
|
30
|
-
);
|
|
18
|
+
__reExport(enumeration_exports, require('./enumeration.cjs'), module.exports);
|
|
19
|
+
__reExport(enumeration_exports, require('./getEnumerationContent.cjs'), module.exports);
|
|
31
20
|
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 &&
|
|
33
|
-
(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=index.cjs.map
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require('./enumeration.cjs'),
|
|
23
|
+
...require('./getEnumerationContent.cjs')
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { EnumerationContent, QuantityContent, enu } from
|
|
2
|
-
export { getEnumerationContent } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
export { EnumerationContent, QuantityContent, enu } from './enumeration.js';
|
|
2
|
+
export { getEnumerationContent } from './getEnumerationContent.js';
|
|
3
|
+
import '../../../utils/getStackTraceInfo.js';
|
|
4
|
+
import '../../../types/nodeType.js';
|
|
@@ -4,38 +4,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
4
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
6
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
8
|
for (let key of __getOwnPropNames(from))
|
|
9
9
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
-
__defProp(to, key, {
|
|
11
|
-
get: () => from[key],
|
|
12
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
13
|
-
});
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
11
|
}
|
|
15
12
|
return to;
|
|
16
13
|
};
|
|
17
|
-
var __reExport = (target, mod, secondTarget) => (
|
|
18
|
-
|
|
19
|
-
secondTarget && __copyProps(secondTarget, mod, "default")
|
|
20
|
-
);
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
14
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
16
|
var content_transformers_exports = {};
|
|
24
17
|
module.exports = __toCommonJS(content_transformers_exports);
|
|
25
|
-
__reExport(
|
|
26
|
-
|
|
27
|
-
require("./translation/index.cjs"),
|
|
28
|
-
module.exports
|
|
29
|
-
);
|
|
30
|
-
__reExport(
|
|
31
|
-
content_transformers_exports,
|
|
32
|
-
require("./enumeration/index.cjs"),
|
|
33
|
-
module.exports
|
|
34
|
-
);
|
|
18
|
+
__reExport(content_transformers_exports, require('./translation/index.cjs'), module.exports);
|
|
19
|
+
__reExport(content_transformers_exports, require('./enumeration/index.cjs'), module.exports);
|
|
35
20
|
// Annotate the CommonJS export names for ESM import in node:
|
|
36
|
-
0 &&
|
|
37
|
-
(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
//# sourceMappingURL=index.cjs.map
|
|
21
|
+
0 && (module.exports = {
|
|
22
|
+
...require('./translation/index.cjs'),
|
|
23
|
+
...require('./enumeration/index.cjs')
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,15 +1,9 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
enu,
|
|
11
|
-
} from "./enumeration/enumeration.js";
|
|
12
|
-
export { getEnumerationContent } from "./enumeration/getEnumerationContent.js";
|
|
13
|
-
import "@intlayer/config/client";
|
|
14
|
-
import "../../utils/getStackTraceInfo.js";
|
|
15
|
-
import "../../types/nodeType.js";
|
|
1
|
+
export { t } from './translation/translation.js';
|
|
2
|
+
export { getTranslationContent } from './translation/getTranslationContent.js';
|
|
3
|
+
export { ConfigLanguageContent, ConfigLocales, CustomLocales, CustomizableLanguageContent, LanguageContent, TranslationContent } from './translation/types.js';
|
|
4
|
+
export { EnumerationContent, QuantityContent, enu } from './enumeration/enumeration.js';
|
|
5
|
+
export { getEnumerationContent } from './enumeration/getEnumerationContent.js';
|
|
6
|
+
import '@intlayer/config/client';
|
|
7
|
+
import 'intlayer';
|
|
8
|
+
import '../../utils/getStackTraceInfo.js';
|
|
9
|
+
import '../../types/nodeType.js';
|
|
@@ -8,30 +8,24 @@ var __export = (target, all) => {
|
|
|
8
8
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
9
|
};
|
|
10
10
|
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
12
|
for (let key of __getOwnPropNames(from))
|
|
13
13
|
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable,
|
|
17
|
-
});
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
15
|
}
|
|
19
16
|
return to;
|
|
20
17
|
};
|
|
21
|
-
var __toCommonJS = (mod) =>
|
|
22
|
-
__copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
19
|
var getTranslationContent_exports = {};
|
|
24
20
|
__export(getTranslationContent_exports, {
|
|
25
|
-
getTranslationContent: () => getTranslationContent
|
|
21
|
+
getTranslationContent: () => getTranslationContent
|
|
26
22
|
});
|
|
27
23
|
module.exports = __toCommonJS(getTranslationContent_exports);
|
|
28
24
|
var import_client = require("@intlayer/config/client");
|
|
29
25
|
const defaultLocale = import_client.intlayerIntlConfiguration.defaultLocale;
|
|
30
|
-
const getTranslationContent = (languageContent, locale) =>
|
|
31
|
-
languageContent[locale ?? defaultLocale] ?? languageContent[defaultLocale];
|
|
26
|
+
const getTranslationContent = (languageContent, locale) => languageContent[locale ?? defaultLocale] ?? languageContent[defaultLocale];
|
|
32
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 &&
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
//# sourceMappingURL=getTranslationContent.cjs.map
|
|
28
|
+
0 && (module.exports = {
|
|
29
|
+
getTranslationContent
|
|
30
|
+
});
|
|
31
|
+
//# sourceMappingURL=getTranslationContent.cjs.map
|