@datapos/datapos-shared 0.3.454 → 0.3.455
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/datapos-shared-component.es.js +1 -1
- package/dist/datapos-shared-connector.es.js +1 -1
- package/dist/datapos-shared-dataview.es.js +4 -4
- package/dist/locale-DTTQsZic.js +5 -0
- package/dist/types/src/component/connector/index.d.ts +3 -3
- package/dist/types/src/component/dataView/index.d.ts +43 -26
- package/dist/types/src/engine/index.d.ts +11 -11
- package/dist/types/src/locale.d.ts +20 -6
- package/package.json +1 -1
- package/dist/locale-DR89RW6v.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { D as s } from "./locale-
|
|
1
|
+
import { D as s } from "./locale-DTTQsZic.js";
|
|
2
2
|
import { l as n, o as i, n as a, b as d, r as b, d as p, s as e, e as o, f as l, g as C, h as g, p as u } from "./componentConfig.schema-DInGC5Y6.js";
|
|
3
3
|
import { m as h } from "./moduleConfig.schema-BJfbCrO6.js";
|
|
4
4
|
const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
e({ "en-gb": "
|
|
1
|
+
import { c as e } from "./locale-DTTQsZic.js";
|
|
2
|
+
e({ "en-gb": "Data Positioning Events" }), e({ "en-gb": "Delimited Text" }), e({ "en-gb": "JSON" }), e({ "en-gb": "SPSS" }), e({ "en-gb": "XLSX" }), e({ "en-gb": "XML" });
|
|
3
3
|
e({ "en-gb": "Newline" }), e({ "en-gb": "Carriage Return" }), e({ "en-gb": "Carriage Return/Newline" });
|
|
4
4
|
e({ "en-gb": "Colon" }), e({ "en-gb": "Comma" }), e({ "en-gb": "Exclamation Mark" }), e({ "en-gb": "Record Separator" }), e({ "en-gb": "Semicolon" }), e({ "en-gb": "Space" }), e({ "en-gb": "Tab" }), e({ "en-gb": "Underscore" }), e({ "en-gb": "Unit Separator" }), e({ "en-gb": "Vertical Bar" });
|
|
5
|
-
const
|
|
5
|
+
const a = [",", ";", " ", "|", " ", ":", "_", "!", "0x1F", "0x1E"];
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
a as ORDERED_VALUE_DELIMITER_IDS
|
|
8
8
|
};
|
|
@@ -4,7 +4,7 @@ import { EngineUtilities } from '../../engine';
|
|
|
4
4
|
import { ToolConfig } from '../tool';
|
|
5
5
|
import { ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
6
6
|
import { connectorCategoryConfigSchema, connectorConfigSchema, connectorOperationNameSchema, connectorUsageIdSchema } from './connectorConfig.schema';
|
|
7
|
-
import { DataViewPreviewConfig,
|
|
7
|
+
import { DataViewPreviewConfig, RecordValueDelimiterId } from '../dataView';
|
|
8
8
|
/**
|
|
9
9
|
* Connector interface and constructor.
|
|
10
10
|
*/
|
|
@@ -178,7 +178,7 @@ interface RetrieveChunksOptions extends ConnectorOperationOptions {
|
|
|
178
178
|
chunkSize?: number;
|
|
179
179
|
encodingId: string;
|
|
180
180
|
path: string;
|
|
181
|
-
valueDelimiterId:
|
|
181
|
+
valueDelimiterId: RecordValueDelimiterId;
|
|
182
182
|
}
|
|
183
183
|
/**
|
|
184
184
|
* Retrieve records options and summary.
|
|
@@ -187,7 +187,7 @@ interface RetrieveRecordsOptions extends ConnectorOperationOptions {
|
|
|
187
187
|
chunkSize?: number;
|
|
188
188
|
encodingId: string;
|
|
189
189
|
path: string;
|
|
190
|
-
valueDelimiterId:
|
|
190
|
+
valueDelimiterId: RecordValueDelimiterId;
|
|
191
191
|
}
|
|
192
192
|
interface RetrieveRecordsSummary {
|
|
193
193
|
/**
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { FileTypeResult } from 'file-type';
|
|
2
|
-
import { ComponentConfig } from '..';
|
|
2
|
+
import { Component, ComponentConfig } from '..';
|
|
3
3
|
import { ConnectionColumnConfig, ConnectionNodeConfig, UsageTypeId } from '../connector/connection';
|
|
4
|
+
/**
|
|
5
|
+
* Data view interface.
|
|
6
|
+
*/
|
|
7
|
+
type DataViewInterface = Component;
|
|
4
8
|
/**
|
|
5
9
|
* Data view configuration.
|
|
6
10
|
*/
|
|
@@ -12,36 +16,43 @@ interface DataViewConfig extends ComponentConfig {
|
|
|
12
16
|
relationshipsAuditConfig?: DataViewRelationshipsAuditConfig;
|
|
13
17
|
}
|
|
14
18
|
/**
|
|
15
|
-
* Data view
|
|
19
|
+
* Data view localised configuration.
|
|
16
20
|
*/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
emptyLineCount: number;
|
|
22
|
-
invalidFieldLengthCount: number;
|
|
23
|
-
duration: number;
|
|
24
|
-
lineCount: number;
|
|
25
|
-
recordCount: number;
|
|
26
|
-
}
|
|
21
|
+
type DataViewLocalisedConfig = Omit<DataViewConfig, 'label' | 'description'> & {
|
|
22
|
+
label: string;
|
|
23
|
+
description: string;
|
|
24
|
+
};
|
|
27
25
|
/**
|
|
28
26
|
* Data view preview configuration.
|
|
29
27
|
*/
|
|
30
28
|
interface DataViewPreviewConfig {
|
|
31
29
|
asAt: number;
|
|
32
30
|
columnConfigs: ConnectionColumnConfig[];
|
|
33
|
-
dataFormatId:
|
|
31
|
+
dataFormatId: ObjectDataFormatId | undefined;
|
|
34
32
|
duration: number;
|
|
35
33
|
encodingConfidenceLevel: number | undefined;
|
|
36
34
|
encodingId: string | undefined;
|
|
37
35
|
errorMessage?: string;
|
|
38
36
|
fileType: FileTypeResult | undefined;
|
|
39
37
|
hasHeaders: boolean | undefined;
|
|
40
|
-
recordDelimiterId?:
|
|
38
|
+
recordDelimiterId?: ObjectRecordDelimiterId;
|
|
41
39
|
records: ParseResult[][];
|
|
42
40
|
size: number;
|
|
43
41
|
text: string;
|
|
44
|
-
valueDelimiterId?:
|
|
42
|
+
valueDelimiterId?: RecordValueDelimiterId;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Data view content audit configuration.
|
|
46
|
+
*/
|
|
47
|
+
interface DataViewContentAuditConfig {
|
|
48
|
+
asAt: number;
|
|
49
|
+
columns: ConnectionColumnConfig[];
|
|
50
|
+
commentLineCount: number;
|
|
51
|
+
emptyLineCount: number;
|
|
52
|
+
invalidFieldLengthCount: number;
|
|
53
|
+
duration: number;
|
|
54
|
+
lineCount: number;
|
|
55
|
+
recordCount: number;
|
|
45
56
|
}
|
|
46
57
|
/**
|
|
47
58
|
* Data view relationships audit configuration.
|
|
@@ -49,7 +60,13 @@ interface DataViewPreviewConfig {
|
|
|
49
60
|
interface DataViewRelationshipsAuditConfig {
|
|
50
61
|
placeholder?: string;
|
|
51
62
|
}
|
|
52
|
-
|
|
63
|
+
type ObjectDataFormatId = 'dpe' | 'dtv' | 'json' | 'spss' | 'xlsx' | 'xml';
|
|
64
|
+
type ObjectRecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
65
|
+
type RecordValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
66
|
+
/**
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
declare const ORDERED_VALUE_DELIMITER_IDS: RecordValueDelimiterId[];
|
|
53
70
|
/**
|
|
54
71
|
* Parsed value.
|
|
55
72
|
*/
|
|
@@ -63,14 +80,14 @@ interface ParseResult {
|
|
|
63
80
|
parsedValue: ParsedValue;
|
|
64
81
|
usageTypeId: UsageTypeId;
|
|
65
82
|
}
|
|
66
|
-
type
|
|
67
|
-
type
|
|
68
|
-
type
|
|
69
|
-
type
|
|
70
|
-
type
|
|
71
|
-
type NumericUnitsId = 'currency' | 'percentage' | 'plain';
|
|
72
|
-
type StringTypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
|
|
73
|
-
type TemporalTypeId = 'date' | 'dateTime' | 'time';
|
|
83
|
+
type ValueDataTypeId = 'boolean' | 'numeric' | 'string' | 'temporal';
|
|
84
|
+
type ValueNumericTypeId = 'bigint' | 'integer' | 'decimal';
|
|
85
|
+
type ValueNumericUnitsId = 'currency' | 'percentage' | 'plain';
|
|
86
|
+
type ValueStringTypeId = 'email' | 'ipv4' | 'ipv6' | 'ulid' | 'uuid' | 'url' | 'plain';
|
|
87
|
+
type ValueTemporalTypeId = 'date' | 'dateTime' | 'time';
|
|
74
88
|
export { ORDERED_VALUE_DELIMITER_IDS };
|
|
75
|
-
export type {
|
|
76
|
-
export type {
|
|
89
|
+
export type { DataViewInterface, DataViewConfig, DataViewLocalisedConfig };
|
|
90
|
+
export type { DataViewContentAuditConfig, DataViewPreviewConfig };
|
|
91
|
+
export type { ParseResult };
|
|
92
|
+
export type { ObjectDataFormatId, ObjectRecordDelimiterId, RecordValueDelimiterId };
|
|
93
|
+
export type { ValueDataTypeId, ValueNumericTypeId, ValueNumericUnitsId, ValueStringTypeId, ValueTemporalTypeId };
|
|
@@ -4,7 +4,7 @@ import { ModuleConfig } from '../component/module';
|
|
|
4
4
|
import { ToolConfig } from '../component/tool';
|
|
5
5
|
import { ConnectionColumnConfig, ConnectorOperationOptions } from '../component/connector';
|
|
6
6
|
import { ContextConfig, ContextOperationOptions } from '../component/context';
|
|
7
|
-
import { DataViewContentAuditConfig, ParseResult,
|
|
7
|
+
import { DataViewContentAuditConfig, ParseResult, RecordValueDelimiterId } from '../component/dataView';
|
|
8
8
|
/**
|
|
9
9
|
* Engine runtime interface.
|
|
10
10
|
*/
|
|
@@ -26,15 +26,6 @@ interface EngineWorkerInitialiseOptions {
|
|
|
26
26
|
connectorStorageURLPrefix: string;
|
|
27
27
|
toolConfigs: ToolConfig[];
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Engine shared.
|
|
31
|
-
*/
|
|
32
|
-
interface EngineUtilities {
|
|
33
|
-
parseRecord: (columnConfigs: ConnectionColumnConfig[], record: {
|
|
34
|
-
value: string | null | undefined;
|
|
35
|
-
isQuoted: boolean;
|
|
36
|
-
}[], isPreview: boolean) => ParseResult[];
|
|
37
|
-
}
|
|
38
29
|
/**
|
|
39
30
|
* Engine configuration.
|
|
40
31
|
*/
|
|
@@ -48,6 +39,15 @@ interface EngineCallbackData {
|
|
|
48
39
|
typeId: string;
|
|
49
40
|
properties: Record<string, unknown>;
|
|
50
41
|
}
|
|
42
|
+
/**
|
|
43
|
+
* Engine utilities.
|
|
44
|
+
*/
|
|
45
|
+
interface EngineUtilities {
|
|
46
|
+
parseRecord: (columnConfigs: ConnectionColumnConfig[], record: {
|
|
47
|
+
value: string | null | undefined;
|
|
48
|
+
isQuoted: boolean;
|
|
49
|
+
}[], isPreview: boolean) => ParseResult[];
|
|
50
|
+
}
|
|
51
51
|
/**
|
|
52
52
|
* Audit object content options and result.
|
|
53
53
|
*/
|
|
@@ -55,7 +55,7 @@ interface AuditObjectContentOptions extends ConnectorOperationOptions {
|
|
|
55
55
|
chunkSize: number | undefined;
|
|
56
56
|
encodingId: string;
|
|
57
57
|
path: string;
|
|
58
|
-
valueDelimiterId:
|
|
58
|
+
valueDelimiterId: RecordValueDelimiterId;
|
|
59
59
|
}
|
|
60
60
|
interface AuditObjectContentResult {
|
|
61
61
|
contentAuditConfig: DataViewContentAuditConfig;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Locale constants and type declarations.
|
|
3
3
|
*/
|
|
4
|
-
/** Constants */
|
|
5
4
|
declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
6
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Locale codes.
|
|
7
|
+
*/
|
|
7
8
|
type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
8
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Localised string.
|
|
11
|
+
*/
|
|
9
12
|
type LocalisedString = Record<LocaleCode, string>;
|
|
10
|
-
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
type LocaleLabelMap = ReadonlyMap<string, string>;
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
declare const createLabelMap: (labels: Record<string, string>) => LocaleLabelMap;
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
declare const resolveLabel: (labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: "en-gb") => string | undefined;
|
|
25
|
+
export { createLabelMap, DEFAULT_LOCALE_CODE, resolveLabel };
|
|
26
|
+
export type { LocaleCode, LocaleLabelMap, LocalisedString };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.455",
|
|
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>",
|
package/dist/locale-DR89RW6v.js
DELETED