@datapos/datapos-shared 0.3.441 → 0.3.444
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/{locale-CPeRw0Am.js → componentConfig.schema-DInGC5Y6.js} +41 -42
- package/dist/datapos-shared-component.es.js +2 -2
- package/dist/datapos-shared-connector.es.js +12 -11
- package/dist/datapos-shared-dataview.es.js +4 -0
- package/dist/datapos-shared-encoding.es.js +1 -1
- package/dist/datapos-shared.es.js +28 -85
- package/dist/locale-DR89RW6v.js +4 -0
- package/dist/{moduleConfig.schema-ElDY1bZx.js → moduleConfig.schema-BJfbCrO6.js} +1 -1
- package/dist/types/src/component/connector/index.d.ts +57 -22
- package/dist/types/src/component/dataView/index.d.ts +32 -32
- package/dist/types/src/encoding/index.d.ts +3 -3
- package/dist/types/src/engine/index.d.ts +7 -11
- package/dist/types/src/index.d.ts +0 -5
- package/package.json +5 -1
|
@@ -10,26 +10,26 @@ function I(n) {
|
|
|
10
10
|
}
|
|
11
11
|
let _;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
|
-
function
|
|
13
|
+
function P(n) {
|
|
14
14
|
return _?.get(n);
|
|
15
15
|
}
|
|
16
|
-
let
|
|
16
|
+
let A;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function C(n) {
|
|
19
|
+
return A?.get(n);
|
|
20
20
|
}
|
|
21
|
-
let
|
|
21
|
+
let O;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
23
|
function G(n, t) {
|
|
24
|
-
return
|
|
24
|
+
return O?.get(n)?.get(t);
|
|
25
25
|
}
|
|
26
26
|
// @__NO_SIDE_EFFECTS__
|
|
27
|
-
function
|
|
27
|
+
function M(n) {
|
|
28
28
|
const t = typeof n;
|
|
29
29
|
return t === "string" ? `"${n}"` : t === "number" || t === "bigint" || t === "boolean" ? `${n}` : t === "object" || t === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : t;
|
|
30
30
|
}
|
|
31
31
|
function f(n, t, e, s, i) {
|
|
32
|
-
const r = i && "input" in i ? i.input : e.value, u = i?.expected ?? n.expects ?? null, a = i?.received ?? /* @__PURE__ */
|
|
32
|
+
const r = i && "input" in i ? i.input : e.value, u = i?.expected ?? n.expects ?? null, a = i?.received ?? /* @__PURE__ */ M(r), l = {
|
|
33
33
|
kind: n.kind,
|
|
34
34
|
type: n.type,
|
|
35
35
|
input: r,
|
|
@@ -42,7 +42,7 @@ function f(n, t, e, s, i) {
|
|
|
42
42
|
lang: s.lang,
|
|
43
43
|
abortEarly: s.abortEarly,
|
|
44
44
|
abortPipeEarly: s.abortPipeEarly
|
|
45
|
-
}, c = n.kind === "schema", p = i?.message ?? n.message ?? /* @__PURE__ */ G(n.reference, l.lang) ?? (c ? /* @__PURE__ */
|
|
45
|
+
}, c = n.kind === "schema", p = i?.message ?? n.message ?? /* @__PURE__ */ G(n.reference, l.lang) ?? (c ? /* @__PURE__ */ C(l.lang) : null) ?? s.message ?? /* @__PURE__ */ P(l.lang);
|
|
46
46
|
p !== void 0 && (l.message = typeof p == "function" ? p(l) : p), c && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
|
|
47
47
|
}
|
|
48
48
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -60,12 +60,12 @@ function w(n, t) {
|
|
|
60
60
|
return Object.hasOwn(n, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
|
|
61
61
|
}
|
|
62
62
|
// @__NO_SIDE_EFFECTS__
|
|
63
|
-
function
|
|
63
|
+
function R(n, t) {
|
|
64
64
|
const e = [...new Set(n)];
|
|
65
65
|
return e.length > 1 ? `(${e.join(` ${t} `)})` : e[0] ?? "never";
|
|
66
66
|
}
|
|
67
67
|
// @__NO_SIDE_EFFECTS__
|
|
68
|
-
function
|
|
68
|
+
function V(n, t, e) {
|
|
69
69
|
return typeof n.fallback == "function" ? n.fallback(t, e) : n.fallback;
|
|
70
70
|
}
|
|
71
71
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -73,11 +73,11 @@ function x(n, t, e) {
|
|
|
73
73
|
return typeof n.default == "function" ? n.default(t, e) : n.default;
|
|
74
74
|
}
|
|
75
75
|
// @__NO_SIDE_EFFECTS__
|
|
76
|
-
function
|
|
76
|
+
function q(n, t) {
|
|
77
77
|
return {
|
|
78
78
|
kind: "schema",
|
|
79
79
|
type: "array",
|
|
80
|
-
reference:
|
|
80
|
+
reference: q,
|
|
81
81
|
expects: "Array",
|
|
82
82
|
async: !1,
|
|
83
83
|
item: n,
|
|
@@ -114,11 +114,11 @@ function R(n, t) {
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
// @__NO_SIDE_EFFECTS__
|
|
117
|
-
function
|
|
117
|
+
function F(n) {
|
|
118
118
|
return {
|
|
119
119
|
kind: "schema",
|
|
120
120
|
type: "boolean",
|
|
121
|
-
reference:
|
|
121
|
+
reference: F,
|
|
122
122
|
expects: "boolean",
|
|
123
123
|
async: !1,
|
|
124
124
|
message: n,
|
|
@@ -131,12 +131,12 @@ function U(n) {
|
|
|
131
131
|
};
|
|
132
132
|
}
|
|
133
133
|
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function
|
|
134
|
+
function j(n, t) {
|
|
135
135
|
return {
|
|
136
136
|
kind: "schema",
|
|
137
137
|
type: "literal",
|
|
138
|
-
reference:
|
|
139
|
-
expects: /* @__PURE__ */
|
|
138
|
+
reference: j,
|
|
139
|
+
expects: /* @__PURE__ */ M(n),
|
|
140
140
|
async: !1,
|
|
141
141
|
literal: n,
|
|
142
142
|
message: t,
|
|
@@ -220,7 +220,7 @@ function d(n, t) {
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
l.typed || (e.typed = !1), e.value[r] = l.value;
|
|
223
|
-
} else if (u.fallback !== void 0) e.value[r] = /* @__PURE__ */
|
|
223
|
+
} else if (u.fallback !== void 0) e.value[r] = /* @__PURE__ */ V(u);
|
|
224
224
|
else if (u.type !== "exact_optional" && u.type !== "optional" && u.type !== "nullish" && (f(this, "key", e, s, {
|
|
225
225
|
input: void 0,
|
|
226
226
|
expected: `"${r}"`,
|
|
@@ -258,11 +258,11 @@ function b(n, t) {
|
|
|
258
258
|
};
|
|
259
259
|
}
|
|
260
260
|
// @__NO_SIDE_EFFECTS__
|
|
261
|
-
function
|
|
261
|
+
function K(n, t, e) {
|
|
262
262
|
return {
|
|
263
263
|
kind: "schema",
|
|
264
264
|
type: "record",
|
|
265
|
-
reference:
|
|
265
|
+
reference: K,
|
|
266
266
|
expects: "Object",
|
|
267
267
|
async: !1,
|
|
268
268
|
key: n,
|
|
@@ -339,12 +339,12 @@ function S(n) {
|
|
|
339
339
|
return t;
|
|
340
340
|
}
|
|
341
341
|
// @__NO_SIDE_EFFECTS__
|
|
342
|
-
function
|
|
342
|
+
function D(n, t) {
|
|
343
343
|
return {
|
|
344
344
|
kind: "schema",
|
|
345
345
|
type: "union",
|
|
346
|
-
reference:
|
|
347
|
-
expects: /* @__PURE__ */
|
|
346
|
+
reference: D,
|
|
347
|
+
expects: /* @__PURE__ */ R(n.map((e) => e.expects), "|"),
|
|
348
348
|
async: !1,
|
|
349
349
|
options: n,
|
|
350
350
|
message: t,
|
|
@@ -374,7 +374,7 @@ function j(n, t) {
|
|
|
374
374
|
}
|
|
375
375
|
};
|
|
376
376
|
}
|
|
377
|
-
const E = (n) => /* @__PURE__ */
|
|
377
|
+
const E = (n) => /* @__PURE__ */ D(n.map((t) => /* @__PURE__ */ j(t))), T = /* @__PURE__ */ d({
|
|
378
378
|
"en-au": /* @__PURE__ */ o(),
|
|
379
379
|
"en-gb": /* @__PURE__ */ o(),
|
|
380
380
|
"en-us": /* @__PURE__ */ o(),
|
|
@@ -384,7 +384,7 @@ const E = (n) => /* @__PURE__ */ j(n.map((t) => /* @__PURE__ */ M(t))), Q = /* @
|
|
|
384
384
|
"en-gb": /* @__PURE__ */ b(/* @__PURE__ */ o()),
|
|
385
385
|
"en-us": /* @__PURE__ */ b(/* @__PURE__ */ o()),
|
|
386
386
|
"es-es": /* @__PURE__ */ b(/* @__PURE__ */ o())
|
|
387
|
-
}),
|
|
387
|
+
}), N = E(["amber", "green", "red", "other"]), U = E([
|
|
388
388
|
"alpha",
|
|
389
389
|
"beta",
|
|
390
390
|
"generalAvailability",
|
|
@@ -394,7 +394,7 @@ const E = (n) => /* @__PURE__ */ j(n.map((t) => /* @__PURE__ */ M(t))), Q = /* @
|
|
|
394
394
|
"releaseCandidate",
|
|
395
395
|
"unavailable",
|
|
396
396
|
"underReview"
|
|
397
|
-
]),
|
|
397
|
+
]), H = E([
|
|
398
398
|
"app",
|
|
399
399
|
"connector",
|
|
400
400
|
"connectorConnection",
|
|
@@ -418,11 +418,11 @@ const E = (n) => /* @__PURE__ */ j(n.map((t) => /* @__PURE__ */ M(t))), Q = /* @
|
|
|
418
418
|
"presenter",
|
|
419
419
|
"presenterPresentation",
|
|
420
420
|
"tool"
|
|
421
|
-
]),
|
|
421
|
+
]), L = /* @__PURE__ */ d({
|
|
422
422
|
id: /* @__PURE__ */ o(),
|
|
423
|
-
color:
|
|
423
|
+
color: N,
|
|
424
424
|
label: /* @__PURE__ */ o()
|
|
425
|
-
}),
|
|
425
|
+
}), Q = {
|
|
426
426
|
id: /* @__PURE__ */ o(),
|
|
427
427
|
label: g,
|
|
428
428
|
description: g,
|
|
@@ -430,11 +430,11 @@ const E = (n) => /* @__PURE__ */ j(n.map((t) => /* @__PURE__ */ M(t))), Q = /* @
|
|
|
430
430
|
icon: /* @__PURE__ */ v(/* @__PURE__ */ o()),
|
|
431
431
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ o()),
|
|
432
432
|
lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ m()),
|
|
433
|
-
status: /* @__PURE__ */ v(
|
|
434
|
-
statusId:
|
|
433
|
+
status: /* @__PURE__ */ v(L),
|
|
434
|
+
statusId: U
|
|
435
435
|
}, z = /* @__PURE__ */ d({
|
|
436
|
-
...
|
|
437
|
-
typeId:
|
|
436
|
+
...Q,
|
|
437
|
+
typeId: H
|
|
438
438
|
}), B = /* @__PURE__ */ d({
|
|
439
439
|
id: /* @__PURE__ */ o(),
|
|
440
440
|
label: g,
|
|
@@ -443,22 +443,21 @@ const E = (n) => /* @__PURE__ */ j(n.map((t) => /* @__PURE__ */ M(t))), Q = /* @
|
|
|
443
443
|
iconDark: /* @__PURE__ */ v(/* @__PURE__ */ o()),
|
|
444
444
|
order: /* @__PURE__ */ m(),
|
|
445
445
|
path: /* @__PURE__ */ o()
|
|
446
|
-
})
|
|
446
|
+
});
|
|
447
447
|
export {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
R as b,
|
|
448
|
+
Q as a,
|
|
449
|
+
q as b,
|
|
451
450
|
z as c,
|
|
452
|
-
|
|
451
|
+
j as d,
|
|
453
452
|
b as e,
|
|
454
453
|
m as f,
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
T as g,
|
|
455
|
+
F as h,
|
|
457
456
|
B as i,
|
|
458
457
|
E as l,
|
|
459
458
|
v as n,
|
|
460
459
|
d as o,
|
|
461
460
|
g as p,
|
|
462
|
-
|
|
461
|
+
K as r,
|
|
463
462
|
o as s
|
|
464
463
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as a } from "./locale-
|
|
2
|
-
import { c as s } from "./
|
|
1
|
+
import { D as a } from "./locale-DR89RW6v.js";
|
|
2
|
+
import { c as s } from "./componentConfig.schema-DInGC5Y6.js";
|
|
3
3
|
const n = [
|
|
4
4
|
{ id: "alpha", color: "red", labels: { "en-gb": "alpha" } },
|
|
5
5
|
{ id: "beta", color: "amber", labels: { "en-gb": "beta" } },
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { D as s } from "./locale-DR89RW6v.js";
|
|
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
|
+
import { m as h } from "./moduleConfig.schema-BJfbCrO6.js";
|
|
3
4
|
const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
4
5
|
authMethodId: S,
|
|
5
|
-
activeConnectionCount: o(
|
|
6
|
+
activeConnectionCount: o(l()),
|
|
6
7
|
canDescribe: o(g()),
|
|
7
8
|
id: o(e()),
|
|
8
|
-
label: o(
|
|
9
|
-
maxConnectionCount: o(
|
|
9
|
+
label: o(C),
|
|
10
|
+
maxConnectionCount: o(l()),
|
|
10
11
|
params: o(d(b(e(), e())))
|
|
11
12
|
}), O = n(["application", "curatedDataset", "database", "fileStore"]), R = n([
|
|
12
13
|
"abortOperation",
|
|
@@ -26,9 +27,9 @@ const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
|
26
27
|
]), y = n(["bidirectional", "destination", "source", "unknown"]), D = i({
|
|
27
28
|
id: e(),
|
|
28
29
|
label: u
|
|
29
|
-
}),
|
|
30
|
+
}), U = i({
|
|
30
31
|
...h,
|
|
31
|
-
typeId:
|
|
32
|
+
typeId: p("connector"),
|
|
32
33
|
category: a(D),
|
|
33
34
|
categoryId: O,
|
|
34
35
|
implementations: b(e(), f),
|
|
@@ -42,15 +43,15 @@ const S = n(["apiKey", "disabled", "oAuth2", "none"]), f = i({
|
|
|
42
43
|
{ id: "curatedDataset", label: { "en-gb": "Curated Dataset" } },
|
|
43
44
|
{ id: "database", label: { "en-gb": "Database" } },
|
|
44
45
|
{ id: "fileStore", label: { "en-gb": "File Store" } }
|
|
45
|
-
],
|
|
46
|
+
], j = (c, m = s) => {
|
|
46
47
|
const t = I.find((r) => r.id === c);
|
|
47
48
|
if (t) {
|
|
48
|
-
const r = t.label[m] ?? t.label[
|
|
49
|
+
const r = t.label[m] ?? t.label[s] ?? t.id;
|
|
49
50
|
return { id: t.id, label: r };
|
|
50
51
|
}
|
|
51
52
|
return { id: c, label: c };
|
|
52
53
|
};
|
|
53
54
|
export {
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
U as connectorConfigSchema,
|
|
56
|
+
j as constructConnectorCategoryConfig
|
|
56
57
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const e = (l) => new Map(Object.entries(l));
|
|
2
|
+
e({ "en-gb": "Delimited Text" }), e({ "en-gb": "Entity/Event" }), e({ "en-gb": "JSON" }), e({ "en-gb": "SPSS" }), e({ "en-gb": "XLS" }), e({ "en-gb": "XLSX" }), e({ "en-gb": "XML" });
|
|
3
|
+
e({ "en-gb": "Newline" }), e({ "en-gb": "Carriage Return" }), e({ "en-gb": "Carriage Return/Newline" });
|
|
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" });
|
|
@@ -1,93 +1,36 @@
|
|
|
1
|
-
import { l as
|
|
2
|
-
import { m as
|
|
3
|
-
const
|
|
4
|
-
...
|
|
5
|
-
typeId:
|
|
6
|
-
modelRefs:
|
|
7
|
-
order:
|
|
8
|
-
}),
|
|
9
|
-
...
|
|
10
|
-
typeId:
|
|
11
|
-
models:
|
|
12
|
-
operations:
|
|
13
|
-
}),
|
|
14
|
-
...
|
|
15
|
-
typeId:
|
|
16
|
-
presentations:
|
|
17
|
-
operations:
|
|
1
|
+
import { l as s, o as n, b as e, d as t, f as l, a as d, i as c } from "./componentConfig.schema-DInGC5Y6.js";
|
|
2
|
+
import { m as a } from "./moduleConfig.schema-BJfbCrO6.js";
|
|
3
|
+
const p = s(["list"]), m = n({
|
|
4
|
+
...d,
|
|
5
|
+
typeId: t("contextModelGroup"),
|
|
6
|
+
modelRefs: e(c),
|
|
7
|
+
order: l()
|
|
8
|
+
}), x = n({
|
|
9
|
+
...a,
|
|
10
|
+
typeId: t("context"),
|
|
11
|
+
models: e(m),
|
|
12
|
+
operations: e(p)
|
|
13
|
+
}), f = s(["list", "render", "setColorMode"]), y = n({
|
|
14
|
+
...a,
|
|
15
|
+
typeId: t("presenter"),
|
|
16
|
+
presentations: e(c),
|
|
17
|
+
operations: e(f)
|
|
18
18
|
});
|
|
19
|
-
function
|
|
20
|
-
return { render:
|
|
19
|
+
function S() {
|
|
20
|
+
return { render: g };
|
|
21
21
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
22
|
+
function g(r, o, i) {
|
|
23
|
+
i.textContent = "Cytoscape.js diagram goes here...";
|
|
24
24
|
}
|
|
25
|
-
function
|
|
26
|
-
return { render:
|
|
25
|
+
function b() {
|
|
26
|
+
return { render: u };
|
|
27
27
|
}
|
|
28
|
-
function
|
|
29
|
-
console.log(1111,
|
|
28
|
+
function u(r, o) {
|
|
29
|
+
console.log(1111, r), console.log(2222, o), console.log(3333, o.childNodes), console.log(4444, o.children);
|
|
30
30
|
}
|
|
31
|
-
const e = (t) => new Map(Object.entries(t)), c = (t, o, n = a) => {
|
|
32
|
-
const l = t.get(o);
|
|
33
|
-
if (l !== void 0) return l;
|
|
34
|
-
if (n !== o)
|
|
35
|
-
return t.get(n);
|
|
36
|
-
}, D = [
|
|
37
|
-
{ id: "dtv", labels: e({ "en-gb": "Delimited Text" }) },
|
|
38
|
-
{ id: "e/e", labels: e({ "en-gb": "Entity/Event" }) },
|
|
39
|
-
{ id: "json", labels: e({ "en-gb": "JSON" }) },
|
|
40
|
-
{ id: "spss", labels: e({ "en-gb": "SPSS" }) },
|
|
41
|
-
{ id: "xls", labels: e({ "en-gb": "XLS" }) },
|
|
42
|
-
{ id: "xlsx", labels: e({ "en-gb": "XLSX" }) },
|
|
43
|
-
{ id: "xml", labels: e({ "en-gb": "XML" }) }
|
|
44
|
-
], O = (t = a) => {
|
|
45
|
-
const o = [];
|
|
46
|
-
for (const n of D) {
|
|
47
|
-
const l = c(n.labels, t);
|
|
48
|
-
o.push({ id: n.id, label: l ?? n.id });
|
|
49
|
-
}
|
|
50
|
-
return o;
|
|
51
|
-
}, E = [
|
|
52
|
-
{ id: `
|
|
53
|
-
`, labels: e({ "en-gb": "Newline" }) },
|
|
54
|
-
{ id: "\r", labels: e({ "en-gb": "Carriage Return" }) },
|
|
55
|
-
{ id: `\r
|
|
56
|
-
`, labels: e({ "en-gb": "Carriage Return/Newline" }) }
|
|
57
|
-
], _ = (t = a) => {
|
|
58
|
-
const o = [];
|
|
59
|
-
for (const n of E) {
|
|
60
|
-
const l = c(n.labels, t);
|
|
61
|
-
o.push({ id: n.id, label: l ?? n.id });
|
|
62
|
-
}
|
|
63
|
-
return o;
|
|
64
|
-
}, L = [
|
|
65
|
-
{ id: ":", labels: e({ "en-gb": "Colon" }) },
|
|
66
|
-
{ id: ",", labels: e({ "en-gb": "Comma" }) },
|
|
67
|
-
{ id: "!", labels: e({ "en-gb": "Exclamation Mark" }) },
|
|
68
|
-
// { id: '', label: { 'en-gb': 'Other' } }, // TODO: Maybe set this to a 'not printing' or special ascii character when there is a user supplied delimited, rather than ''?
|
|
69
|
-
{ id: "0x1E", labels: e({ "en-gb": "Record Separator" }) },
|
|
70
|
-
{ id: ";", labels: e({ "en-gb": "Semicolon" }) },
|
|
71
|
-
{ id: " ", labels: e({ "en-gb": "Space" }) },
|
|
72
|
-
{ id: " ", labels: e({ "en-gb": "Tab" }) },
|
|
73
|
-
{ id: "_", labels: e({ "en-gb": "Underscore" }) },
|
|
74
|
-
{ id: "0x1F", labels: e({ "en-gb": "Unit Separator" }) },
|
|
75
|
-
{ id: "|", labels: e({ "en-gb": "Vertical Bar" }) }
|
|
76
|
-
], T = [",", ";", " ", "|", " ", ":", "_", "!", "0x1F", "0x1E"], U = (t = a) => {
|
|
77
|
-
const o = [];
|
|
78
|
-
for (const n of L) {
|
|
79
|
-
const l = c(n.labels, t);
|
|
80
|
-
o.push({ id: n.id, label: l ?? n.id });
|
|
81
|
-
}
|
|
82
|
-
return o;
|
|
83
|
-
};
|
|
84
31
|
export {
|
|
85
|
-
|
|
86
|
-
v as contextConfigSchema,
|
|
87
|
-
O as getDataFormats,
|
|
88
|
-
_ as getRecordDelimiters,
|
|
89
|
-
U as getValueDelimiters,
|
|
32
|
+
x as contextConfigSchema,
|
|
90
33
|
y as presenterConfigSchema,
|
|
91
|
-
|
|
92
|
-
|
|
34
|
+
S as useCytoscapeJS,
|
|
35
|
+
b as useDataTable
|
|
93
36
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { Component } from '..';
|
|
3
|
-
import {
|
|
3
|
+
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
7
|
import { DataViewPreviewConfig, ValueDelimiterId } from '../dataView';
|
|
8
8
|
/**
|
|
9
|
-
* Connector interface
|
|
9
|
+
* Connector interface and constructor.
|
|
10
10
|
*/
|
|
11
11
|
interface ConnectorInterface extends Component {
|
|
12
12
|
abortController: AbortController | undefined;
|
|
@@ -27,48 +27,68 @@ interface ConnectorInterface extends Component {
|
|
|
27
27
|
retrieveRecords?(connector: ConnectorInterface, options: RetrieveRecordsOptions, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveRecordsSummary) => void): Promise<void>;
|
|
28
28
|
upsertRecords?(connector: ConnectorInterface, options: UpsertRecordsOptions): Promise<void>;
|
|
29
29
|
}
|
|
30
|
-
type ConnectorConstructor = new (
|
|
31
|
-
/**
|
|
30
|
+
type ConnectorConstructor = new (EngineUtilities: EngineUtilities, toolConfigs: ToolConfig[]) => ConnectorInterface;
|
|
31
|
+
/**
|
|
32
|
+
* Operation names a connector may support.
|
|
33
|
+
*/
|
|
32
34
|
type ConnectorOperationName = InferOutput<typeof connectorOperationNameSchema>;
|
|
33
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Connector data pipeline usage identifiers.
|
|
37
|
+
*/
|
|
34
38
|
type ConnectorUsageId = InferOutput<typeof connectorUsageIdSchema>;
|
|
35
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* Connector configuration.
|
|
41
|
+
*/
|
|
36
42
|
type ConnectorConfig = InferOutput<typeof connectorConfigSchema>;
|
|
37
43
|
type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
38
44
|
label: string;
|
|
39
45
|
description: string;
|
|
40
46
|
};
|
|
41
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Connector operation options.
|
|
49
|
+
*/
|
|
42
50
|
interface ConnectorOperationOptions {
|
|
43
51
|
accountId?: string;
|
|
44
52
|
appCheckToken?: string;
|
|
45
53
|
sessionAccessToken?: string;
|
|
46
54
|
}
|
|
47
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* Create object options.
|
|
57
|
+
*/
|
|
48
58
|
interface CreateObjectOptions extends ConnectorOperationOptions {
|
|
49
59
|
path: string;
|
|
50
60
|
structure: string;
|
|
51
61
|
}
|
|
52
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* Describe connection options and result.
|
|
64
|
+
*/
|
|
53
65
|
type DescribeConnectionOptions = ConnectorOperationOptions;
|
|
54
66
|
interface DescribeConnectionResult {
|
|
55
67
|
description: ConnectionDescription;
|
|
56
68
|
}
|
|
57
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* Drop object options.
|
|
71
|
+
*/
|
|
58
72
|
interface DropObjectOptions extends ConnectorOperationOptions {
|
|
59
73
|
path: string;
|
|
60
74
|
}
|
|
61
|
-
/**
|
|
75
|
+
/**
|
|
76
|
+
* Find object folder path options.
|
|
77
|
+
*/
|
|
62
78
|
interface FindObjectFolderPathOptions extends ConnectorOperationOptions {
|
|
63
79
|
containerName: string | undefined;
|
|
64
80
|
nodeId: string;
|
|
65
81
|
}
|
|
66
|
-
/**
|
|
82
|
+
/**
|
|
83
|
+
* Get readable stream options.
|
|
84
|
+
*/
|
|
67
85
|
interface GetReadableStreamOptions extends ConnectorOperationOptions {
|
|
68
86
|
id: string;
|
|
69
87
|
path: string;
|
|
70
88
|
}
|
|
71
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Get record options and result.
|
|
91
|
+
*/
|
|
72
92
|
interface GetRecordOptions extends ConnectorOperationOptions {
|
|
73
93
|
id: string;
|
|
74
94
|
path: string;
|
|
@@ -76,7 +96,9 @@ interface GetRecordOptions extends ConnectorOperationOptions {
|
|
|
76
96
|
interface GetRecordResult {
|
|
77
97
|
record?: string[] | Record<string, unknown>;
|
|
78
98
|
}
|
|
79
|
-
/**
|
|
99
|
+
/**
|
|
100
|
+
* List nodes options and result.
|
|
101
|
+
*/
|
|
80
102
|
interface ListNodesOptions extends ConnectorOperationOptions {
|
|
81
103
|
folderPath: string;
|
|
82
104
|
limit?: number;
|
|
@@ -89,25 +111,33 @@ interface ListNodesResult {
|
|
|
89
111
|
isMore: boolean;
|
|
90
112
|
totalCount: number;
|
|
91
113
|
}
|
|
92
|
-
/**
|
|
114
|
+
/**
|
|
115
|
+
* Preview object options.
|
|
116
|
+
*/
|
|
93
117
|
interface PreviewObjectOptions extends ConnectorOperationOptions {
|
|
94
118
|
chunkSize?: number;
|
|
95
119
|
extension?: string;
|
|
96
120
|
path: string;
|
|
97
121
|
}
|
|
98
|
-
/**
|
|
122
|
+
/**
|
|
123
|
+
* Remove records options.
|
|
124
|
+
*/
|
|
99
125
|
interface RemoveRecordsOptions extends ConnectorOperationOptions {
|
|
100
126
|
keys: string[];
|
|
101
127
|
path: string;
|
|
102
128
|
}
|
|
103
|
-
/**
|
|
129
|
+
/**
|
|
130
|
+
* Retrieve chunks options.
|
|
131
|
+
*/
|
|
104
132
|
interface RetrieveChunksOptions extends ConnectorOperationOptions {
|
|
105
133
|
chunkSize?: number;
|
|
106
134
|
encodingId: string;
|
|
107
135
|
path: string;
|
|
108
136
|
valueDelimiterId: ValueDelimiterId;
|
|
109
137
|
}
|
|
110
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Retrieve records options and summary.
|
|
140
|
+
*/
|
|
111
141
|
interface RetrieveRecordsOptions extends ConnectorOperationOptions {
|
|
112
142
|
chunkSize?: number;
|
|
113
143
|
encodingId: string;
|
|
@@ -122,19 +152,24 @@ interface RetrieveRecordsSummary {
|
|
|
122
152
|
nonUniformRecordCount: number;
|
|
123
153
|
recordCount: number;
|
|
124
154
|
}
|
|
125
|
-
/**
|
|
155
|
+
/**
|
|
156
|
+
* Upsert records options.
|
|
157
|
+
*/
|
|
126
158
|
interface UpsertRecordsOptions extends ConnectorOperationOptions {
|
|
127
159
|
records: Record<string, unknown>[];
|
|
128
160
|
path: string;
|
|
129
161
|
}
|
|
130
|
-
/**
|
|
162
|
+
/**
|
|
163
|
+
* Connector category configuration.
|
|
164
|
+
*/
|
|
131
165
|
type ConnectorCategoryConfig = InferOutput<typeof connectorCategoryConfigSchema>;
|
|
132
166
|
type ConnectorCategoryLocalisedConfig = Omit<ConnectorCategoryConfig, 'label'> & {
|
|
133
167
|
label: string;
|
|
134
168
|
};
|
|
135
|
-
/**
|
|
169
|
+
/**
|
|
170
|
+
* Construct connector category configuration.
|
|
171
|
+
*/
|
|
136
172
|
declare const constructConnectorCategoryConfig: (id: string, localeId?: import('../../locale').LocaleCode) => ConnectorCategoryLocalisedConfig;
|
|
137
|
-
/** Exports. */
|
|
138
173
|
export { connectorConfigSchema } from './connectorConfig.schema';
|
|
139
174
|
export { constructConnectorCategoryConfig };
|
|
140
175
|
export type { ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, UsageTypeId } from './connection';
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FileTypeResult } from 'file-type';
|
|
2
2
|
import { ComponentConfig } from '..';
|
|
3
|
-
import { ConnectionColumnConfig, ConnectionNodeConfig } from '../connector/connection';
|
|
4
|
-
/**
|
|
3
|
+
import { ConnectionColumnConfig, ConnectionNodeConfig, UsageTypeId } from '../connector/connection';
|
|
4
|
+
/**
|
|
5
|
+
* Data view configuration.
|
|
6
|
+
*/
|
|
5
7
|
interface DataViewConfig extends ComponentConfig {
|
|
6
8
|
connectionId?: string;
|
|
7
9
|
connectionNodeConfig?: ConnectionNodeConfig;
|
|
@@ -9,11 +11,10 @@ interface DataViewConfig extends ComponentConfig {
|
|
|
9
11
|
contentAuditConfig?: DataViewContentAuditConfig;
|
|
10
12
|
relationshipsAuditConfig?: DataViewRelationshipsAuditConfig;
|
|
11
13
|
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
export interface DataViewContentAuditConfig {
|
|
14
|
+
/**
|
|
15
|
+
* Data view content audit configuration.
|
|
16
|
+
*/
|
|
17
|
+
interface DataViewContentAuditConfig {
|
|
17
18
|
asAt: number;
|
|
18
19
|
columns: ConnectionColumnConfig[];
|
|
19
20
|
commentLineCount: number;
|
|
@@ -23,7 +24,10 @@ export interface DataViewContentAuditConfig {
|
|
|
23
24
|
lineCount: number;
|
|
24
25
|
recordCount: number;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Data view preview configuration.
|
|
29
|
+
*/
|
|
30
|
+
interface DataViewPreviewConfig {
|
|
27
31
|
asAt: number;
|
|
28
32
|
columnConfigs: ConnectionColumnConfig[];
|
|
29
33
|
dataFormatId: DataFormatId | undefined;
|
|
@@ -42,30 +46,26 @@ export interface DataViewPreviewConfig {
|
|
|
42
46
|
text: string;
|
|
43
47
|
valueDelimiterId?: ValueDelimiterId;
|
|
44
48
|
}
|
|
45
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Data view relationships audit configuration.
|
|
51
|
+
*/
|
|
52
|
+
interface DataViewRelationshipsAuditConfig {
|
|
46
53
|
placeholder?: string;
|
|
47
54
|
}
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
55
|
+
/**
|
|
56
|
+
* Parsed value.
|
|
57
|
+
*/
|
|
58
|
+
type ParsedValue = bigint | boolean | number | string | null;
|
|
59
|
+
/**
|
|
60
|
+
* Parse result.
|
|
61
|
+
*/
|
|
62
|
+
interface ParseResult {
|
|
63
|
+
isValid: boolean;
|
|
64
|
+
originalValue: string | null | undefined;
|
|
65
|
+
parsedValue: ParsedValue;
|
|
66
|
+
usageTypeId: UsageTypeId;
|
|
51
67
|
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
label: string;
|
|
57
|
-
}
|
|
58
|
-
export declare const getRecordDelimiter: (id: string, localeId?: import('../../locale').LocaleCode) => RecordDelimiter;
|
|
59
|
-
export declare const getRecordDelimiters: (localeId?: import('../../locale').LocaleCode) => RecordDelimiter[];
|
|
60
|
-
interface ValueDelimiter {
|
|
61
|
-
id: string;
|
|
62
|
-
label: string;
|
|
63
|
-
}
|
|
64
|
-
export declare const ORDERED_VALUE_DELIMITER_IDS: ValueDelimiterId[];
|
|
65
|
-
export declare const getValueDelimiter: (id: string, localeId?: import('../../locale').LocaleCode) => ValueDelimiter;
|
|
66
|
-
export declare const getValueDelimiters: (localeId?: import('../../locale').LocaleCode) => ValueDelimiter[];
|
|
67
|
-
export type ParsedValue = bigint | boolean | number | string | null;
|
|
68
|
-
export type DataFormatId = 'dtv' | 'e/e' | 'json' | 'spss' | 'xls' | 'xlsx' | 'xml';
|
|
69
|
-
export type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
70
|
-
export type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
71
|
-
export type { DataViewConfig };
|
|
68
|
+
type DataFormatId = 'dtv' | 'e/e' | 'json' | 'spss' | 'xls' | 'xlsx' | 'xml';
|
|
69
|
+
type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
70
|
+
type ValueDelimiterId = '' | ':' | ',' | '!' | '0x1E' | ';' | ' ' | '\t' | '_' | '0x1F' | '|';
|
|
71
|
+
export type { DataViewContentAuditConfig, DataViewConfig, DataViewPreviewConfig, ParseResult, ParsedValue, ValueDelimiterId };
|
|
@@ -20,7 +20,7 @@ interface EncodingTypeConfig {
|
|
|
20
20
|
}
|
|
21
21
|
declare const encodingConfigMap: Record<string, EncodingTypeConfig>;
|
|
22
22
|
/**
|
|
23
|
-
* Get encoding configurations.
|
|
23
|
+
* Get encoding type configurations.
|
|
24
24
|
*/
|
|
25
|
-
declare function
|
|
26
|
-
export { type EncodingConfig, encodingConfigMap, type EncodingTypeConfig,
|
|
25
|
+
declare function getEncodingTypeConfigs(localeId?: string): EncodingTypeConfig[];
|
|
26
|
+
export { type EncodingConfig, encodingConfigMap, type EncodingTypeConfig, getEncodingTypeConfigs };
|
|
@@ -2,9 +2,9 @@ import { ConnectionConfig } from '../component/connector/connection';
|
|
|
2
2
|
import { EncodingTypeConfig } from '../encoding';
|
|
3
3
|
import { ModuleConfig } from '../component/module';
|
|
4
4
|
import { ToolConfig } from '../component/tool';
|
|
5
|
-
import { ConnectionColumnConfig, ConnectorOperationOptions
|
|
5
|
+
import { ConnectionColumnConfig, ConnectorOperationOptions } from '../component/connector';
|
|
6
6
|
import { ContextCallbackData, ContextConfig, ContextOperationOptions } from '../component/context';
|
|
7
|
-
import { DataViewContentAuditConfig,
|
|
7
|
+
import { DataViewContentAuditConfig, ParseResult, ValueDelimiterId } from '../component/dataView';
|
|
8
8
|
/**
|
|
9
9
|
* Engine runtime interface.
|
|
10
10
|
*/
|
|
@@ -12,7 +12,9 @@ interface EngineRuntimeInterface {
|
|
|
12
12
|
getEncodingTypeConfigs: (localeId: string) => EncodingTypeConfig[];
|
|
13
13
|
invokeWorker(errorEventCallback: (errorEvent: ErrorEvent) => void): EngineWorkerInterface;
|
|
14
14
|
}
|
|
15
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Engine worker interface.
|
|
17
|
+
*/
|
|
16
18
|
interface EngineWorkerInterface {
|
|
17
19
|
initialise: (options: EngineWorkerInitialiseOptions) => Promise<void>;
|
|
18
20
|
processConnectorRequest: (id: string, connectionConfig: ConnectionConfig, options: ConnectorOperationOptions, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<unknown>;
|
|
@@ -24,16 +26,10 @@ interface EngineWorkerInitialiseOptions {
|
|
|
24
26
|
connectorStorageURLPrefix: string;
|
|
25
27
|
toolConfigs: ToolConfig[];
|
|
26
28
|
}
|
|
27
|
-
export interface ParseResult {
|
|
28
|
-
isValid: boolean;
|
|
29
|
-
originalValue: string | null | undefined;
|
|
30
|
-
parsedValue: ParsedValue;
|
|
31
|
-
usageTypeId: UsageTypeId;
|
|
32
|
-
}
|
|
33
29
|
/**
|
|
34
30
|
* Engine shared.
|
|
35
31
|
*/
|
|
36
|
-
interface
|
|
32
|
+
interface EngineUtilities {
|
|
37
33
|
parseRecord: (columnConfigs: ConnectionColumnConfig[], record: {
|
|
38
34
|
value: string | null | undefined;
|
|
39
35
|
isQuoted: boolean;
|
|
@@ -71,4 +67,4 @@ interface TestSettings {
|
|
|
71
67
|
hasHeaders?: boolean;
|
|
72
68
|
readable: ReadableStream<Uint8Array>;
|
|
73
69
|
}
|
|
74
|
-
export type { AuditObjectContentOptions, AuditObjectContentResult, ConnectorCallbackData, EngineConfig, EngineRuntimeInterface,
|
|
70
|
+
export type { AuditObjectContentOptions, AuditObjectContentResult, ConnectorCallbackData, EngineConfig, EngineRuntimeInterface, EngineUtilities, EngineWorkerInitialiseOptions, EngineWorkerInterface, TestSettings };
|
|
@@ -21,9 +21,6 @@ export interface ContextOperationSettings {
|
|
|
21
21
|
appCheckToken?: string;
|
|
22
22
|
sessionAccessToken?: string;
|
|
23
23
|
}
|
|
24
|
-
/** Interfaces/Types - Data view. */
|
|
25
|
-
export type { DataFormatId, RecordDelimiterId, ValueDelimiterId } from './component/dataView';
|
|
26
|
-
export type { DataViewConfig, DataViewContentAuditConfig, DataViewLocalisedConfig, DataViewPreviewConfig, DataViewRelationshipsAuditConfig, ParsedValue } from './component/dataView';
|
|
27
24
|
/** Interfaces/Types - Dimension. */
|
|
28
25
|
export type { DimensionConfig, DimensionLocalisedConfig } from './component/dimension';
|
|
29
26
|
/** Interfaces/Types - Event query. */
|
|
@@ -37,6 +34,4 @@ export type { PresentationCategoryId, PresentationCartesianTypeId, PresentationP
|
|
|
37
34
|
/** Composables */
|
|
38
35
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
39
36
|
export { useDataTable } from './composables/useDataTable';
|
|
40
|
-
/** Constants */
|
|
41
37
|
/** Utilities */
|
|
42
|
-
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.444",
|
|
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
|
+
"./dataview": {
|
|
37
|
+
"import": "./dist/datapos-shared-dataview.es.js",
|
|
38
|
+
"types": "./dist/types/src/component/dataview/index.d.ts"
|
|
39
|
+
},
|
|
36
40
|
"./encoding": {
|
|
37
41
|
"import": "./dist/datapos-shared-encoding.es.js",
|
|
38
42
|
"types": "./dist/types/src/encoding/index.d.ts"
|