@datapos/datapos-shared 0.3.436 → 0.3.438
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.
|
@@ -5,24 +5,24 @@ const u = d(["list"]), f = r({
|
|
|
5
5
|
typeId: i("contextModelGroup"),
|
|
6
6
|
modelRefs: s(b),
|
|
7
7
|
order: m()
|
|
8
|
-
}),
|
|
8
|
+
}), v = r({
|
|
9
9
|
...g,
|
|
10
10
|
typeId: i("context"),
|
|
11
11
|
models: s(f),
|
|
12
12
|
operations: s(u)
|
|
13
|
-
}), C = d(["list", "render", "setColorMode"]),
|
|
13
|
+
}), C = d(["list", "render", "setColorMode"]), y = r({
|
|
14
14
|
...g,
|
|
15
15
|
typeId: i("presenter"),
|
|
16
16
|
presentations: s(b),
|
|
17
17
|
operations: s(C)
|
|
18
18
|
});
|
|
19
|
-
function
|
|
19
|
+
function F() {
|
|
20
20
|
return { render: S };
|
|
21
21
|
}
|
|
22
22
|
function S(t, o, n) {
|
|
23
23
|
n.textContent = "Cytoscape.js diagram goes here...";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
25
|
+
function M() {
|
|
26
26
|
return { render: x };
|
|
27
27
|
}
|
|
28
28
|
function x(t, o) {
|
|
@@ -33,7 +33,7 @@ const e = (t) => new Map(Object.entries(t)), c = (t, o, n = a) => {
|
|
|
33
33
|
if (l !== void 0) return l;
|
|
34
34
|
if (n !== o)
|
|
35
35
|
return t.get(n);
|
|
36
|
-
},
|
|
36
|
+
}, D = [
|
|
37
37
|
{ id: "dtv", labels: e({ "en-gb": "Delimited Text" }) },
|
|
38
38
|
{ id: "e/e", labels: e({ "en-gb": "Entity/Event" }) },
|
|
39
39
|
{ id: "json", labels: e({ "en-gb": "JSON" }) },
|
|
@@ -41,22 +41,22 @@ const e = (t) => new Map(Object.entries(t)), c = (t, o, n = a) => {
|
|
|
41
41
|
{ id: "xls", labels: e({ "en-gb": "XLS" }) },
|
|
42
42
|
{ id: "xlsx", labels: e({ "en-gb": "XLSX" }) },
|
|
43
43
|
{ id: "xml", labels: e({ "en-gb": "XML" }) }
|
|
44
|
-
],
|
|
44
|
+
], O = (t = a) => {
|
|
45
45
|
const o = [];
|
|
46
|
-
for (const n of
|
|
46
|
+
for (const n of D) {
|
|
47
47
|
const l = c(n.labels, t);
|
|
48
48
|
o.push({ id: n.id, label: l ?? n.id });
|
|
49
49
|
}
|
|
50
50
|
return o;
|
|
51
|
-
},
|
|
51
|
+
}, E = [
|
|
52
52
|
{ id: `
|
|
53
53
|
`, labels: e({ "en-gb": "Newline" }) },
|
|
54
54
|
{ id: "\r", labels: e({ "en-gb": "Carriage Return" }) },
|
|
55
55
|
{ id: `\r
|
|
56
56
|
`, labels: e({ "en-gb": "Carriage Return/Newline" }) }
|
|
57
|
-
],
|
|
57
|
+
], _ = (t = a) => {
|
|
58
58
|
const o = [];
|
|
59
|
-
for (const n of
|
|
59
|
+
for (const n of E) {
|
|
60
60
|
const l = c(n.labels, t);
|
|
61
61
|
o.push({ id: n.id, label: l ?? n.id });
|
|
62
62
|
}
|
|
@@ -73,7 +73,7 @@ const e = (t) => new Map(Object.entries(t)), c = (t, o, n = a) => {
|
|
|
73
73
|
{ id: "_", labels: e({ "en-gb": "Underscore" }) },
|
|
74
74
|
{ id: "0x1F", labels: e({ "en-gb": "Unit Separator" }) },
|
|
75
75
|
{ id: "|", labels: e({ "en-gb": "Vertical Bar" }) }
|
|
76
|
-
],
|
|
76
|
+
], T = [",", ";", " ", "|", " ", ":", "_", "!", "0x1F", "0x1E"], U = (t = a) => {
|
|
77
77
|
const o = [];
|
|
78
78
|
for (const n of L) {
|
|
79
79
|
const l = c(n.labels, t);
|
|
@@ -82,11 +82,12 @@ const e = (t) => new Map(Object.entries(t)), c = (t, o, n = a) => {
|
|
|
82
82
|
return o;
|
|
83
83
|
};
|
|
84
84
|
export {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
T as ORDERED_VALUE_DELIMITER_IDS,
|
|
86
|
+
v as contextConfigSchema,
|
|
87
|
+
O as getDataFormats,
|
|
88
|
+
_ as getRecordDelimiters,
|
|
89
|
+
U as getValueDelimiters,
|
|
90
|
+
y as presenterConfigSchema,
|
|
91
|
+
F as useCytoscapeJS,
|
|
92
|
+
M as useDataTable
|
|
92
93
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { FileTypeResult } from 'file-type';
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentConfig } from '..';
|
|
3
3
|
import { ConnectionColumnConfig, ConnectionNodeConfig } from '../connector/connection';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/** Data view configuration. */
|
|
5
|
+
interface DataViewConfig extends ComponentConfig {
|
|
6
6
|
connectionId?: string;
|
|
7
7
|
connectionNodeConfig?: ConnectionNodeConfig;
|
|
8
8
|
previewConfig?: DataViewPreviewConfig;
|
|
@@ -61,10 +61,11 @@ interface ValueDelimiter {
|
|
|
61
61
|
id: string;
|
|
62
62
|
label: string;
|
|
63
63
|
}
|
|
64
|
+
export declare const ORDERED_VALUE_DELIMITER_IDS: string[];
|
|
64
65
|
export declare const getValueDelimiter: (id: string, localeId?: import('../../locale').LocaleCode) => ValueDelimiter;
|
|
65
66
|
export declare const getValueDelimiters: (localeId?: import('../../locale').LocaleCode) => ValueDelimiter[];
|
|
66
67
|
export type ParsedValue = bigint | boolean | number | string | null;
|
|
67
68
|
export type DataFormatId = 'dtv' | 'e/e' | 'json' | 'spss' | 'xls' | 'xlsx' | 'xml';
|
|
68
69
|
export type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
69
70
|
export type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
70
|
-
export {};
|
|
71
|
+
export type { DataViewConfig };
|
|
@@ -40,4 +40,4 @@ export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscape
|
|
|
40
40
|
export { useDataTable } from './composables/useDataTable';
|
|
41
41
|
/** Constants */
|
|
42
42
|
/** Utilities */
|
|
43
|
-
export { getDataFormats, getRecordDelimiters, getValueDelimiters } from './component/dataView';
|
|
43
|
+
export { getDataFormats, getRecordDelimiters, getValueDelimiters, ORDERED_VALUE_DELIMITER_IDS } from './component/dataView';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.438",
|
|
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>",
|