@datapos/datapos-shared 0.3.428 → 0.3.429
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.
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
const s = { id: "ascii", groupLabel: "", label: "ascii", isDetectable: !1, isDecodable: !0 }, o = { id: "big5", groupLabel: "Chinese Traditional", label: "Chinese Traditional (big5)", isDetectable: !0, isDecodable: !0 }, t = { id: "gb18030", groupLabel: "Chinese Simplified", label: "Chinese Simplified (gb18030)", isDetectable: !0, isDecodable: !0 }, b = { id: "gbk", groupLabel: "Chinese Simplified", label: "Chinese Simplified (gbk)", isDetectable: !1, isDecodable: !0 }, r = { id: "ibm866", groupLabel: "Cyrillic", label: "Cyrillic (ibm866)", isDetectable: !1, isDecodable: !0 }, c = { id: "latin1", groupLabel: "Western", label: "Western (latin1)", isDetectable: !1, isDecodable: !0 }, u = { id: "macintosh", groupLabel: "Western", label: "Western (macintosh)", isDetectable: !1, isDecodable: !0 }, d = { id: "shift_jis", groupLabel: "Japanese", label: "Japanese (shift_jis)", isDetectable: !0, isDecodable: !0 }, n = { id: "utf16", groupLabel: "Unicode 16", label: "Unicode 16 (utf16)", isDetectable: !1, isDecodable: !0 }, D = { id: "utf16be", groupLabel: "Unicode 16", label: "Unicode 16 (utf16be)", isDetectable: !0, isDecodable: !0 }, p = { id: "utf16le", groupLabel: "Unicode 16", label: "Unicode 16 (utf16le)", isDetectable: !0, isDecodable: !0 }, g = { id: "utf32be", groupLabel: "Unicode 32", label: "Unicode 32 (utf32be)", isDetectable: !0, isDecodable: !1 }, w = { id: "utf32le", groupLabel: "Unicode 32", label: "Unicode 32 (utf32le)", isDetectable: !0, isDecodable: !1 }, f = { id: "utf8", groupLabel: "", label: "utf8", isDetectable: !0, isDecodable: !0 }, L = {
|
|
2
|
+
ascii: s,
|
|
3
|
+
big5: o,
|
|
4
|
+
"euc-jp": { id: "euc-jp", groupLabel: "Japanese", label: "Japanese (euc-jp)", isDetectable: !0, isDecodable: !0 },
|
|
5
|
+
"euc-kr": { id: "euc-kr", groupLabel: "Korean", label: "Korean (euc-kr)", isDetectable: !0, isDecodable: !0 },
|
|
6
|
+
gb18030: t,
|
|
7
|
+
gbk: b,
|
|
8
|
+
ibm866: r,
|
|
9
|
+
"iso-2022-cn": { id: "iso-2022-cn", groupLabel: "Japanese", label: "Japanese (iso-2022-cn)", isDetectable: !0, isDecodable: !1 },
|
|
10
|
+
"iso-2022-jp": { id: "iso-2022-jp", groupLabel: "Japanese", label: "Japanese (iso-2022-jp)", isDetectable: !0, isDecodable: !0 },
|
|
11
|
+
"iso-2022-kr": { id: "iso-2022-kr", groupLabel: "Korean", label: "Korean (iso-2022-kr)", isDetectable: !0, isDecodable: !1 },
|
|
12
|
+
"iso-8859-1": { id: "iso-8859-1", groupLabel: "Western", label: "Western (iso-8859-1)", isDetectable: !0, isDecodable: !0 },
|
|
13
|
+
"iso-8859-2": { id: "iso-8859-2", groupLabel: "Central European", label: "Central European (iso-8859-2)", isDetectable: !0, isDecodable: !0 },
|
|
14
|
+
"iso-8859-3": { id: "iso-8859-3", groupLabel: "Southern European", label: "Southern European (iso-8859-3)", isDetectable: !1, isDecodable: !0 },
|
|
15
|
+
"iso-8859-4": { id: "iso-8859-4", groupLabel: "Baltic", label: "Baltic (iso-8859-4)", isDetectable: !1, isDecodable: !0 },
|
|
16
|
+
"iso-8859-5": { id: "iso-8859-5", groupLabel: "Cyrillic", label: "Cyrillic (iso-8859-5)", isDetectable: !0, isDecodable: !0 },
|
|
17
|
+
"iso-8859-6": { id: "iso-8859-6", groupLabel: "Arabic", label: "Arabic (iso-8859-6)", isDetectable: !0, isDecodable: !0 },
|
|
18
|
+
"iso-8859-7": { id: "iso-8859-7", groupLabel: "Greek", label: "Greek (iso-8859-7)", isDetectable: !0, isDecodable: !0 },
|
|
19
|
+
"iso-8859-8": { id: "iso-8859-8", groupLabel: "Hebrew", label: "Hebrew (iso-8859-8)", isDetectable: !0, isDecodable: !0 },
|
|
20
|
+
"iso-8859-9": { id: "iso-8859-9", groupLabel: "Turkish", label: "Turkish (iso-8859-9)", isDetectable: !0, isDecodable: !0 },
|
|
21
|
+
"iso-8859-10": { id: "iso-8859-10", groupLabel: "Nordic", label: "Nordic (iso-8859-10)", isDetectable: !1, isDecodable: !0 },
|
|
22
|
+
"iso-8859-11": { id: "iso-8859-11", groupLabel: "Thai", label: "Thai (iso-8859-11)", isDetectable: !1, isDecodable: !0 },
|
|
23
|
+
"iso-8859-13": { id: "iso-8859-13", groupLabel: "Baltic", label: "Baltic (iso-8859-13)", isDetectable: !1, isDecodable: !0 },
|
|
24
|
+
"iso-8859-14": { id: "iso-8859-14", groupLabel: "Celtic", label: "Celtic (iso-8859-14)", isDetectable: !1, isDecodable: !0 },
|
|
25
|
+
"iso-8859-15": { id: "iso-8859-15", groupLabel: "Western", label: "Western (iso-8859-15)", isDetectable: !1, isDecodable: !0 },
|
|
26
|
+
"iso-8859-16": { id: "iso-8859-16", groupLabel: "Romanian", label: "Romanian (iso-8859-16)", isDetectable: !1, isDecodable: !0 },
|
|
27
|
+
"kOi8-r": { id: "koi8-r", groupLabel: "Cyrillic", label: "Cyrillic (koi8-r)", isDetectable: !0, isDecodable: !0 },
|
|
28
|
+
"kOi8-u": { id: "koi8-u", groupLabel: "Cyrillic", label: "Cyrillic (koi8-u)", isDetectable: !1, isDecodable: !0 },
|
|
29
|
+
latin1: c,
|
|
30
|
+
macintosh: u,
|
|
31
|
+
shift_jis: d,
|
|
32
|
+
"tis-620": { id: "tis-620", groupLabel: "Thai", label: "Thai (tis-620)", isDetectable: !1, isDecodable: !0 },
|
|
33
|
+
utf16: n,
|
|
34
|
+
utf16be: D,
|
|
35
|
+
utf16le: p,
|
|
36
|
+
utf32be: g,
|
|
37
|
+
utf32le: w,
|
|
38
|
+
utf8: f,
|
|
39
|
+
"windows-1250": { id: "windows-1250", groupLabel: "Central European", label: "Central European (windows-1250)", isDetectable: !0, isDecodable: !0 },
|
|
40
|
+
"windows-1251": { id: "windows-1251", groupLabel: "Cyrillic", label: "Cyrillic (windows-1251)", isDetectable: !0, isDecodable: !0 },
|
|
41
|
+
"windows-1252": { id: "windows-1252", groupLabel: "Western", label: "Western (windows-1252)", isDetectable: !0, isDecodable: !0 },
|
|
42
|
+
"windows-1253": { id: "windows-1253", groupLabel: "Greek", label: "Greek (windows-1253)", isDetectable: !0, isDecodable: !0 },
|
|
43
|
+
"windows-1254": { id: "windows-1254", groupLabel: "Turkish", label: "Turkish (windows-1254)", isDetectable: !0, isDecodable: !0 },
|
|
44
|
+
"windows-1255": { id: "windows-1255", groupLabel: "Hebrew", label: "Hebrew (windows-1255)", isDetectable: !0, isDecodable: !0 },
|
|
45
|
+
"windows-1256": { id: "windows-1256", groupLabel: "Arabic", label: "Arabic (windows-1256)", isDetectable: !0, isDecodable: !0 },
|
|
46
|
+
"windows-1257": { id: "windows-1257", groupLabel: "Baltic", label: "Baltic (windows-1257)", isDetectable: !1, isDecodable: !0 },
|
|
47
|
+
"windows-1258": { id: "windows-1258", groupLabel: "Vietnamese", label: "Vietnamese (windows-1258)", isDetectable: !1, isDecodable: !0 },
|
|
48
|
+
"windows-874": { id: "windows-874", groupLabel: "Thai", label: "Thai (windows-874)", isDetectable: !1, isDecodable: !0 },
|
|
49
|
+
"x-mac-cyrillic": { id: "x-mac-cyrillic", groupLabel: "Cyrillic", label: "Cyrillic (x-mac-cyrillic)", isDetectable: !1, isDecodable: !0 },
|
|
50
|
+
"x-user-defined": { id: "x-user-defined", groupLabel: "Other", label: "Other (x-user-defined)", isDetectable: !1, isDecodable: !0 }
|
|
51
|
+
};
|
|
52
|
+
function h(C = "en") {
|
|
53
|
+
const i = [], a = L;
|
|
54
|
+
for (const [, e] of Object.entries(a))
|
|
55
|
+
e != null && i.push({ ...e, label: e.label || e.id });
|
|
56
|
+
return i.toSorted((e, l) => e.groupLabel.localeCompare(l.groupLabel) || e.label.localeCompare(l.label));
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
L as encodingConfigData,
|
|
60
|
+
h as getEncodingConfigs
|
|
61
|
+
};
|
|
@@ -43,13 +43,6 @@ export interface DataViewPreviewConfig {
|
|
|
43
43
|
export interface DataViewRelationshipsAuditConfig {
|
|
44
44
|
placeholder?: string;
|
|
45
45
|
}
|
|
46
|
-
export interface EncodingConfig {
|
|
47
|
-
id: string;
|
|
48
|
-
groupLabel: string;
|
|
49
|
-
label: string;
|
|
50
|
-
isDetectable: boolean;
|
|
51
|
-
isDecodable: boolean;
|
|
52
|
-
}
|
|
53
46
|
interface DataFormat {
|
|
54
47
|
id: string;
|
|
55
48
|
label: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encoding.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Encoding configuration.
|
|
6
|
+
*/
|
|
7
|
+
interface EncodingConfig {
|
|
8
|
+
id: string;
|
|
9
|
+
groupLabel: string;
|
|
10
|
+
label: string;
|
|
11
|
+
isDetectable: boolean;
|
|
12
|
+
isDecodable: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get encoding configurations.
|
|
16
|
+
*/
|
|
17
|
+
declare function getEncodingConfigs(localeId?: string): EncodingConfig[];
|
|
18
|
+
export { default as encodingConfigData } from './encodingConfigs.json';
|
|
19
|
+
export { type EncodingConfig, getEncodingConfigs };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ConnectionConfig } from '../component/connector/connection';
|
|
2
|
-
import {
|
|
2
|
+
import { EncodingConfig } from '../encoding';
|
|
3
3
|
import { ModuleConfig } from '../component/module';
|
|
4
4
|
import { ToolConfig } from '../component/tool';
|
|
5
|
+
import { ConnectorOperationOptions } from '../component/connector';
|
|
5
6
|
import { ContextCallbackData, ContextConfig, ContextOperationOptions } from '../component/context';
|
|
6
|
-
import { DataViewContentAuditConfig, DataViewPreviewConfig,
|
|
7
|
+
import { DataViewContentAuditConfig, DataViewPreviewConfig, ValueDelimiterId } from '../component/dataView';
|
|
7
8
|
/** Engine runtime interface. */
|
|
8
9
|
interface EngineRuntimeInterface {
|
|
9
10
|
getEncodingConfigs: (localeId: string) => EncodingConfig[];
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
/** Interfaces/Types */
|
|
5
5
|
/** Interfaces/Types - Context. */
|
|
6
6
|
export { contextConfigSchema } from './component/context';
|
|
7
|
-
export type { Context, ContextConfig, ContextLocalisedConfig,
|
|
7
|
+
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListOptions, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
|
|
8
8
|
/** Interfaces/Types - Context model. */
|
|
9
9
|
export type { ContextModelGroupConfig, ContextModelGroupLocalisedConfig, ContextModelConfig, ContextModelLocalisedConfig } from './component/context';
|
|
10
10
|
/** Interfaces/Types - Context model dimension. */
|
|
@@ -23,7 +23,7 @@ export interface ContextOperationSettings {
|
|
|
23
23
|
sessionAccessToken?: string;
|
|
24
24
|
}
|
|
25
25
|
/** Interfaces/Types - Data view. */
|
|
26
|
-
export type { DataFormatId,
|
|
26
|
+
export type { DataFormatId, RecordDelimiterId, ValueDelimiterId } from './component/dataView';
|
|
27
27
|
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './component/dataView';
|
|
28
28
|
/** Interfaces/Types - Dimension. */
|
|
29
29
|
export type { DimensionConfig, DimensionLocalisedConfig } from './component/dimension';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.429",
|
|
4
4
|
"description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Jonathan Terrell <terrell.jm@gmail.com>",
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
"import": "./dist/datapos-shared-tools.es.js",
|
|
34
34
|
"types": "./dist/types/src/component/tool/index.d.ts"
|
|
35
35
|
},
|
|
36
|
+
"./encoding": {
|
|
37
|
+
"import": "./dist/datapos-shared-encoding.es.js",
|
|
38
|
+
"types": "./dist/types/src/encoding/index.d.ts"
|
|
39
|
+
},
|
|
36
40
|
"./engine": {
|
|
37
41
|
"import": "./dist/datapos-shared-engine.es.js",
|
|
38
42
|
"types": "./dist/types/src/engine/index.d.ts"
|