@datapos/datapos-shared 0.3.269 → 0.3.271
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.es.js +144 -331
- package/dist/schemas.js +190 -0
- package/dist/types/index.d.ts +0 -3
- package/package.json +8 -2
- package/schemas.d.ts +1 -0
- package/schemas.js +1 -0
|
@@ -1,288 +1,104 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
e
|
|
4
|
-
e.literal("beta"),
|
|
5
|
-
e.literal("generalAvailability"),
|
|
6
|
-
e.literal("notApplicable"),
|
|
7
|
-
e.literal("preAlpha"),
|
|
8
|
-
e.literal("proposed"),
|
|
9
|
-
e.literal("releaseCandidate"),
|
|
10
|
-
e.literal("unavailable"),
|
|
11
|
-
e.literal("underReview")
|
|
12
|
-
]), E = e.union([
|
|
13
|
-
e.literal("app"),
|
|
14
|
-
e.literal("connector"),
|
|
15
|
-
e.literal("connectorConnection"),
|
|
16
|
-
e.literal("context"),
|
|
17
|
-
e.literal("contextModelGroup"),
|
|
18
|
-
e.literal("contextModel"),
|
|
19
|
-
e.literal("contextModelDimensionGroup"),
|
|
20
|
-
e.literal("contextModelDimension"),
|
|
21
|
-
e.literal("contextModelDimensionHierarchy"),
|
|
22
|
-
e.literal("contextModelEntityGroup"),
|
|
23
|
-
e.literal("contextModelEntity"),
|
|
24
|
-
e.literal("contextModelEntityDataItem"),
|
|
25
|
-
e.literal("contextModelEntityEvent"),
|
|
26
|
-
e.literal("contextModelEntityPrimaryMeasure"),
|
|
27
|
-
e.literal("contextModelSecondaryMeasureGroup"),
|
|
28
|
-
e.literal("contextModelSecondaryMeasure"),
|
|
29
|
-
e.literal("dataView"),
|
|
30
|
-
e.literal("dimension"),
|
|
31
|
-
e.literal("engine"),
|
|
32
|
-
e.literal("eventQuery"),
|
|
33
|
-
e.literal("presenter"),
|
|
34
|
-
e.literal("presenterPresentation"),
|
|
35
|
-
e.literal("tool")
|
|
36
|
-
]), S = e.union([e.literal("en-au"), e.literal("en-gb"), e.literal("en-us"), e.literal("es-es")]), M = e.record(S, e.string()), I = e.object({
|
|
37
|
-
id: e.string(),
|
|
38
|
-
color: x,
|
|
39
|
-
label: e.string()
|
|
40
|
-
}), v = e.object({
|
|
41
|
-
id: e.string(),
|
|
42
|
-
label: e.record(e.string(), e.string()),
|
|
43
|
-
description: e.record(e.string(), e.string()),
|
|
44
|
-
firstCreatedAt: e.number().optional(),
|
|
45
|
-
icon: e.string().optional(),
|
|
46
|
-
iconDark: e.string().optional(),
|
|
47
|
-
lastUpdatedAt: e.number().optional(),
|
|
48
|
-
status: I.nullable().optional(),
|
|
49
|
-
statusId: y,
|
|
50
|
-
typeId: E
|
|
51
|
-
}), C = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), D = e.object({
|
|
52
|
-
id: e.string(),
|
|
53
|
-
label: e.string()
|
|
54
|
-
}), w = e.object({
|
|
55
|
-
activeConnectionCount: e.number().optional(),
|
|
56
|
-
canDescribe: e.boolean().optional(),
|
|
57
|
-
id: e.string().optional(),
|
|
58
|
-
authMethodId: e.union([e.literal("apiKey"), e.literal("disabled"), e.literal("oAuth2"), e.literal("none")]),
|
|
59
|
-
label: M.optional(),
|
|
60
|
-
maxConnectionCount: e.number().optional(),
|
|
61
|
-
params: e.array(e.record(e.string(), e.string())).optional()
|
|
62
|
-
}), $ = e.union([e.literal("application"), e.literal("curatedDataset"), e.literal("database"), e.literal("fileStore")]), N = e.union([
|
|
63
|
-
e.literal("abortOperation"),
|
|
64
|
-
e.literal("authenticateConnection"),
|
|
65
|
-
e.literal("createObject"),
|
|
66
|
-
e.literal("describeConnection"),
|
|
67
|
-
e.literal("dropObject"),
|
|
68
|
-
e.literal("findObject"),
|
|
69
|
-
e.literal("getRecord"),
|
|
70
|
-
e.literal("listNodes"),
|
|
71
|
-
e.literal("previewObject"),
|
|
72
|
-
e.literal("removeRecords"),
|
|
73
|
-
e.literal("retrieveRecords"),
|
|
74
|
-
e.literal("upsertRecords")
|
|
75
|
-
]), A = e.union([e.literal("bidirectional"), e.literal("destination"), e.literal("source"), e.literal("unknown")]), T = v.extend({
|
|
76
|
-
typeId: C,
|
|
77
|
-
version: e.string()
|
|
78
|
-
}), oe = T.extend({
|
|
79
|
-
category: D.optional(),
|
|
80
|
-
categoryId: $,
|
|
81
|
-
implementations: e.record(e.string(), w),
|
|
82
|
-
operations: e.array(N),
|
|
83
|
-
typeId: e.literal("connector"),
|
|
84
|
-
usageId: A,
|
|
85
|
-
vendorAccountURL: e.string().nullable().optional(),
|
|
86
|
-
vendorDocumentationURL: e.string().nullable().optional(),
|
|
87
|
-
vendorHomeURL: e.string().nullable().optional()
|
|
88
|
-
}), O = e.union([e.literal("amber"), e.literal("green"), e.literal("red"), e.literal("other")]), R = e.union([
|
|
89
|
-
e.literal("alpha"),
|
|
90
|
-
e.literal("beta"),
|
|
91
|
-
e.literal("generalAvailability"),
|
|
92
|
-
e.literal("notApplicable"),
|
|
93
|
-
e.literal("preAlpha"),
|
|
94
|
-
e.literal("proposed"),
|
|
95
|
-
e.literal("releaseCandidate"),
|
|
96
|
-
e.literal("unavailable"),
|
|
97
|
-
e.literal("underReview")
|
|
98
|
-
]), j = e.union([
|
|
99
|
-
e.literal("app"),
|
|
100
|
-
e.literal("connector"),
|
|
101
|
-
e.literal("connectorConnection"),
|
|
102
|
-
e.literal("context"),
|
|
103
|
-
e.literal("contextModelGroup"),
|
|
104
|
-
e.literal("contextModel"),
|
|
105
|
-
e.literal("contextModelDimensionGroup"),
|
|
106
|
-
e.literal("contextModelDimension"),
|
|
107
|
-
e.literal("contextModelDimensionHierarchy"),
|
|
108
|
-
e.literal("contextModelEntityGroup"),
|
|
109
|
-
e.literal("contextModelEntity"),
|
|
110
|
-
e.literal("contextModelEntityDataItem"),
|
|
111
|
-
e.literal("contextModelEntityEvent"),
|
|
112
|
-
e.literal("contextModelEntityPrimaryMeasure"),
|
|
113
|
-
e.literal("contextModelSecondaryMeasureGroup"),
|
|
114
|
-
e.literal("contextModelSecondaryMeasure"),
|
|
115
|
-
e.literal("dataView"),
|
|
116
|
-
e.literal("dimension"),
|
|
117
|
-
e.literal("engine"),
|
|
118
|
-
e.literal("eventQuery"),
|
|
119
|
-
e.literal("presenter"),
|
|
120
|
-
e.literal("presenterPresentation"),
|
|
121
|
-
e.literal("tool")
|
|
122
|
-
]), p = e.number(), k = e.object({
|
|
123
|
-
id: e.string(),
|
|
124
|
-
color: O,
|
|
125
|
-
label: e.string()
|
|
126
|
-
}), F = e.object({
|
|
127
|
-
id: e.string(),
|
|
128
|
-
label: e.record(e.string(), e.string()),
|
|
129
|
-
description: e.record(e.string(), e.string()),
|
|
130
|
-
icon: e.string().optional(),
|
|
131
|
-
iconDark: e.string().optional(),
|
|
132
|
-
order: e.number(),
|
|
133
|
-
path: e.string()
|
|
134
|
-
}), b = e.object({
|
|
135
|
-
id: e.string(),
|
|
136
|
-
label: e.record(e.string(), e.string()),
|
|
137
|
-
description: e.record(e.string(), e.string()),
|
|
138
|
-
firstCreatedAt: p.optional(),
|
|
139
|
-
icon: e.string().optional(),
|
|
140
|
-
iconDark: e.string().optional(),
|
|
141
|
-
lastUpdatedAt: p.optional(),
|
|
142
|
-
status: k.optional(),
|
|
143
|
-
statusId: R,
|
|
144
|
-
typeId: j
|
|
145
|
-
}), G = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), U = b.extend({
|
|
146
|
-
typeId: G,
|
|
147
|
-
version: e.string()
|
|
148
|
-
}), B = b.extend({
|
|
149
|
-
modelRefs: e.array(F),
|
|
150
|
-
order: e.number()
|
|
151
|
-
}), L = e.literal("list"), ae = U.extend({
|
|
152
|
-
models: e.array(B),
|
|
153
|
-
operations: e.array(L),
|
|
154
|
-
typeId: e.literal("context")
|
|
155
|
-
}), P = e.union([e.literal("amber"), e.literal("green"), e.literal("red"), e.literal("other")]), H = e.union([e.literal("alpha"), e.literal("beta"), e.literal("generalAvailability"), e.literal("notApplicable"), e.literal("preAlpha"), e.literal("proposed"), e.literal("releaseCandidate"), e.literal("unavailable"), e.literal("underReview")]), V = e.union([e.literal("app"), e.literal("connector"), e.literal("connectorConnection"), e.literal("context"), e.literal("contextModelGroup"), e.literal("contextModel"), e.literal("contextModelDimensionGroup"), e.literal("contextModelDimension"), e.literal("contextModelDimensionHierarchy"), e.literal("contextModelEntityGroup"), e.literal("contextModelEntity"), e.literal("contextModelEntityDataItem"), e.literal("contextModelEntityEvent"), e.literal("contextModelEntityPrimaryMeasure"), e.literal("contextModelSecondaryMeasureGroup"), e.literal("contextModelSecondaryMeasure"), e.literal("dataView"), e.literal("dimension"), e.literal("engine"), e.literal("eventQuery"), e.literal("presenter"), e.literal("presenterPresentation"), e.literal("tool")]), g = e.number(), _ = e.object({
|
|
156
|
-
id: e.string(),
|
|
157
|
-
color: P,
|
|
158
|
-
label: e.string()
|
|
159
|
-
}), W = e.object({
|
|
160
|
-
id: e.string(),
|
|
161
|
-
label: e.record(e.string(), e.string()),
|
|
162
|
-
description: e.record(e.string(), e.string()),
|
|
163
|
-
icon: e.string().optional(),
|
|
164
|
-
iconDark: e.string().optional(),
|
|
165
|
-
order: e.number(),
|
|
166
|
-
path: e.string()
|
|
167
|
-
}), z = e.object({
|
|
168
|
-
id: e.string(),
|
|
169
|
-
label: e.record(e.string(), e.string()),
|
|
170
|
-
description: e.record(e.string(), e.string()),
|
|
171
|
-
firstCreatedAt: g.optional(),
|
|
172
|
-
icon: e.string().optional(),
|
|
173
|
-
iconDark: e.string().optional(),
|
|
174
|
-
lastUpdatedAt: g.optional(),
|
|
175
|
-
status: _.optional(),
|
|
176
|
-
statusId: H,
|
|
177
|
-
typeId: V
|
|
178
|
-
}), X = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), J = z.extend({
|
|
179
|
-
typeId: X,
|
|
180
|
-
version: e.string()
|
|
181
|
-
}), K = e.union([e.literal("list"), e.literal("render"), e.literal("setColorMode")]), le = J.extend({
|
|
182
|
-
presentations: e.array(W),
|
|
183
|
-
operations: e.array(K),
|
|
184
|
-
typeId: e.literal("presenter")
|
|
185
|
-
});
|
|
186
|
-
function ie() {
|
|
187
|
-
function t(o, n, r) {
|
|
1
|
+
const x = ["createObject", "dropObject", "removeRecords", "upsertRecords"], N = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
2
|
+
function w() {
|
|
3
|
+
function e(n, t, r) {
|
|
188
4
|
r.textContent = "Cytoscape.js diagram goes here...";
|
|
189
5
|
}
|
|
190
|
-
return { render:
|
|
6
|
+
return { render: e };
|
|
191
7
|
}
|
|
192
|
-
function
|
|
193
|
-
function
|
|
194
|
-
console.log(1111,
|
|
8
|
+
function S() {
|
|
9
|
+
function e(n, t) {
|
|
10
|
+
console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
|
|
195
11
|
}
|
|
196
|
-
return { render:
|
|
12
|
+
return { render: e };
|
|
197
13
|
}
|
|
198
|
-
const
|
|
199
|
-
class
|
|
14
|
+
const T = 0, y = (e) => e, D = () => Date.now();
|
|
15
|
+
class u extends Error {
|
|
200
16
|
locator;
|
|
201
|
-
constructor(
|
|
202
|
-
super(
|
|
17
|
+
constructor(n, t, r) {
|
|
18
|
+
super(n, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
|
|
203
19
|
}
|
|
204
20
|
}
|
|
205
|
-
class
|
|
206
|
-
constructor(
|
|
207
|
-
super(
|
|
21
|
+
class l extends u {
|
|
22
|
+
constructor(n, t, r) {
|
|
23
|
+
super(n, t, r), this.name = "ApplicationError";
|
|
208
24
|
}
|
|
209
25
|
}
|
|
210
|
-
class
|
|
211
|
-
constructor(
|
|
212
|
-
super(
|
|
26
|
+
class v extends l {
|
|
27
|
+
constructor(n, t, r) {
|
|
28
|
+
super(n, t, r), this.name = "APIError";
|
|
213
29
|
}
|
|
214
30
|
}
|
|
215
|
-
class
|
|
216
|
-
constructor(
|
|
217
|
-
super(
|
|
31
|
+
class O extends l {
|
|
32
|
+
constructor(n, t, r) {
|
|
33
|
+
super(n, t, r), this.name = "EngineError";
|
|
218
34
|
}
|
|
219
35
|
}
|
|
220
|
-
class
|
|
36
|
+
class m extends l {
|
|
221
37
|
body;
|
|
222
|
-
constructor(
|
|
223
|
-
super(
|
|
38
|
+
constructor(n, t, r, o) {
|
|
39
|
+
super(n, t, o), this.name = "FetchError", this.body = r;
|
|
224
40
|
}
|
|
225
41
|
}
|
|
226
|
-
class
|
|
42
|
+
class g extends l {
|
|
227
43
|
componentName;
|
|
228
44
|
info;
|
|
229
|
-
constructor(
|
|
230
|
-
super(
|
|
45
|
+
constructor(n, t, r, o, s) {
|
|
46
|
+
super(n, t, s), this.name = "VueHandledError", this.info = r, this.componentName = o;
|
|
231
47
|
}
|
|
232
48
|
}
|
|
233
|
-
class
|
|
234
|
-
constructor(
|
|
235
|
-
super(
|
|
49
|
+
class $ extends l {
|
|
50
|
+
constructor(n, t, r) {
|
|
51
|
+
super(n, t, r), this.name = "WindowHandledRuntimeError";
|
|
236
52
|
}
|
|
237
53
|
}
|
|
238
|
-
class
|
|
239
|
-
constructor(
|
|
240
|
-
super(
|
|
54
|
+
class I extends l {
|
|
55
|
+
constructor(n, t, r) {
|
|
56
|
+
super(n, t, r), this.name = "WindowHandledPromiseRejectionError";
|
|
241
57
|
}
|
|
242
58
|
}
|
|
243
|
-
class
|
|
244
|
-
constructor(
|
|
245
|
-
super(
|
|
59
|
+
class A extends u {
|
|
60
|
+
constructor(n, t, r) {
|
|
61
|
+
super(n, t, r), this.name = "OperationalError";
|
|
246
62
|
}
|
|
247
63
|
}
|
|
248
|
-
async function
|
|
249
|
-
const r = `${
|
|
250
|
-
return new
|
|
64
|
+
async function C(e, n, t) {
|
|
65
|
+
const r = `${n} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, o = await e.text();
|
|
66
|
+
return new m(r, t, o);
|
|
251
67
|
}
|
|
252
|
-
function
|
|
253
|
-
return
|
|
68
|
+
function F(e) {
|
|
69
|
+
return e.map((n) => n.message).join(" ");
|
|
254
70
|
}
|
|
255
|
-
function
|
|
256
|
-
if (
|
|
257
|
-
if (typeof
|
|
71
|
+
function R(e, n = "Unknown error.") {
|
|
72
|
+
if (e instanceof Error) return e;
|
|
73
|
+
if (typeof e == "string") return new Error(e);
|
|
258
74
|
try {
|
|
259
|
-
return new Error(JSON.stringify(
|
|
75
|
+
return new Error(JSON.stringify(e ?? n));
|
|
260
76
|
} catch {
|
|
261
|
-
return new Error(
|
|
77
|
+
return new Error(n);
|
|
262
78
|
}
|
|
263
79
|
}
|
|
264
|
-
function
|
|
265
|
-
const
|
|
266
|
-
let r =
|
|
267
|
-
for (; r && !
|
|
268
|
-
|
|
269
|
-
let
|
|
270
|
-
if (r instanceof
|
|
271
|
-
|
|
272
|
-
else if (r instanceof
|
|
273
|
-
|
|
274
|
-
else if (r instanceof
|
|
275
|
-
|
|
80
|
+
function k(e) {
|
|
81
|
+
const n = /* @__PURE__ */ new Set(), t = [];
|
|
82
|
+
let r = e;
|
|
83
|
+
for (; r && !n.has(r); ) {
|
|
84
|
+
n.add(r);
|
|
85
|
+
let o;
|
|
86
|
+
if (r instanceof m)
|
|
87
|
+
o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
88
|
+
else if (r instanceof g)
|
|
89
|
+
o = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
90
|
+
else if (r instanceof u)
|
|
91
|
+
o = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
276
92
|
else if (r instanceof Error) {
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
} else r ? (
|
|
280
|
-
/(?:\.{3}|[.!?])$/.test(
|
|
93
|
+
const s = r;
|
|
94
|
+
o = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
|
|
95
|
+
} else r ? (o = { locator: "", message: String(r), name: "Error" }, r = void 0) : (o = { locator: "", message: "Unknown error.", name: "Error" }, r = void 0);
|
|
96
|
+
/(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), t.push(o);
|
|
281
97
|
}
|
|
282
|
-
return
|
|
98
|
+
return t;
|
|
283
99
|
}
|
|
284
|
-
const
|
|
285
|
-
switch (
|
|
100
|
+
const f = "en-US", c = {}, B = (e) => {
|
|
101
|
+
switch (e) {
|
|
286
102
|
case "Edm.Binary":
|
|
287
103
|
return "unknown";
|
|
288
104
|
// Binary...
|
|
@@ -320,42 +136,42 @@ const h = "en-US", d = {}, Se = (t) => {
|
|
|
320
136
|
default:
|
|
321
137
|
return "unknown";
|
|
322
138
|
}
|
|
323
|
-
},
|
|
324
|
-
if (
|
|
325
|
-
const
|
|
326
|
-
return
|
|
139
|
+
}, M = (e) => {
|
|
140
|
+
if (e) {
|
|
141
|
+
const n = e.lastIndexOf("/"), t = e.lastIndexOf(".", n > -1 ? n : e.length);
|
|
142
|
+
return t > -1 ? e.substring(0, t) : e;
|
|
327
143
|
}
|
|
328
|
-
},
|
|
329
|
-
if (
|
|
330
|
-
const
|
|
331
|
-
if (
|
|
144
|
+
}, j = (e) => {
|
|
145
|
+
if (e) {
|
|
146
|
+
const n = e.lastIndexOf(".");
|
|
147
|
+
if (n > -1) return e.substring(n + 1);
|
|
332
148
|
}
|
|
333
|
-
},
|
|
334
|
-
if (
|
|
335
|
-
const
|
|
336
|
-
let
|
|
337
|
-
return
|
|
149
|
+
}, a = (e, n = 2, t = n, r = f) => {
|
|
150
|
+
if (e == null) return "";
|
|
151
|
+
const o = `${r}decimal${n}.${t}`;
|
|
152
|
+
let s = c[o];
|
|
153
|
+
return s || (s = new Intl.NumberFormat(r, {
|
|
338
154
|
localeMatcher: "best fit",
|
|
339
|
-
maximumFractionDigits:
|
|
340
|
-
minimumFractionDigits:
|
|
155
|
+
maximumFractionDigits: n,
|
|
156
|
+
minimumFractionDigits: t,
|
|
341
157
|
minimumIntegerDigits: 1,
|
|
342
158
|
style: "decimal",
|
|
343
159
|
useGrouping: !0
|
|
344
|
-
}),
|
|
345
|
-
},
|
|
346
|
-
if (
|
|
347
|
-
const
|
|
348
|
-
let r =
|
|
349
|
-
return r || (r = new Intl.NumberFormat(
|
|
160
|
+
}), c[o] = s), s.format(e);
|
|
161
|
+
}, U = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${a(e / 1e3, 2, 0)}K` : e < 1e9 ? `${a(e / 1e6, 2, 0)}M` : e < 1e12 ? `${a(e / 1e9, 2, 0)}B` : `${a(e / 1e12, 2, 0)}T`, L = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${a(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${a(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${a(e / 1073741824, 2, 0)} GB` : `${a(e / 1099511627776, 2, 0)} TB`, _ = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${a(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${a(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${a(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${a(e / 864e5, 2, 0)} days`, d = (e, n = f) => {
|
|
162
|
+
if (e == null) return "";
|
|
163
|
+
const t = `${n}decimal0.0`;
|
|
164
|
+
let r = c[t];
|
|
165
|
+
return r || (r = new Intl.NumberFormat(n, {
|
|
350
166
|
localeMatcher: "best fit",
|
|
351
167
|
maximumFractionDigits: 0,
|
|
352
168
|
minimumFractionDigits: 0,
|
|
353
169
|
minimumIntegerDigits: 1,
|
|
354
170
|
style: "decimal",
|
|
355
171
|
useGrouping: !0
|
|
356
|
-
}),
|
|
357
|
-
},
|
|
358
|
-
switch (
|
|
172
|
+
}), c[t] = r), r.format(e);
|
|
173
|
+
}, W = (e) => {
|
|
174
|
+
switch (e) {
|
|
359
175
|
case "csv":
|
|
360
176
|
return "text/csv";
|
|
361
177
|
case "tab":
|
|
@@ -368,7 +184,7 @@ const h = "en-US", d = {}, Se = (t) => {
|
|
|
368
184
|
default:
|
|
369
185
|
return "application/octet-stream";
|
|
370
186
|
}
|
|
371
|
-
},
|
|
187
|
+
}, b = [
|
|
372
188
|
{ id: "dtv", label: { "en-gb": "Delimited Text" } },
|
|
373
189
|
{ id: "e/e", label: { "en-gb": "Entity/Event" } },
|
|
374
190
|
{ id: "jsonArray", label: { "en-gb": "JSON Array" } },
|
|
@@ -376,22 +192,22 @@ const h = "en-US", d = {}, Se = (t) => {
|
|
|
376
192
|
{ id: "xls", label: { "en-gb": "XLS" } },
|
|
377
193
|
{ id: "xlsx", label: { "en-gb": "XLSX" } },
|
|
378
194
|
{ id: "xml", label: { "en-gb": "XML" } }
|
|
379
|
-
],
|
|
380
|
-
const
|
|
381
|
-
for (const
|
|
382
|
-
return
|
|
383
|
-
},
|
|
195
|
+
], G = (e = i) => {
|
|
196
|
+
const n = [];
|
|
197
|
+
for (const t of b) n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
|
|
198
|
+
return n;
|
|
199
|
+
}, p = [
|
|
384
200
|
{ id: `
|
|
385
201
|
`, label: { "en-gb": "Newline" } },
|
|
386
202
|
{ id: "\r", label: { "en-gb": "Carriage Return" } },
|
|
387
203
|
{ id: `\r
|
|
388
204
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
389
|
-
],
|
|
390
|
-
const
|
|
391
|
-
for (const
|
|
392
|
-
|
|
393
|
-
return
|
|
394
|
-
},
|
|
205
|
+
], V = (e = i) => {
|
|
206
|
+
const n = [];
|
|
207
|
+
for (const t of p)
|
|
208
|
+
n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
|
|
209
|
+
return n;
|
|
210
|
+
}, E = [
|
|
395
211
|
{ id: ":", label: { "en-gb": "Colon" } },
|
|
396
212
|
{ id: ",", label: { "en-gb": "Comma" } },
|
|
397
213
|
{ id: "!", label: { "en-gb": "Exclamation Mark" } },
|
|
@@ -403,12 +219,12 @@ const h = "en-US", d = {}, Se = (t) => {
|
|
|
403
219
|
{ id: "_", label: { "en-gb": "Underscore" } },
|
|
404
220
|
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
405
221
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
406
|
-
],
|
|
407
|
-
const
|
|
408
|
-
for (const
|
|
409
|
-
|
|
410
|
-
return
|
|
411
|
-
},
|
|
222
|
+
], X = (e = i) => {
|
|
223
|
+
const n = [];
|
|
224
|
+
for (const t of E)
|
|
225
|
+
n.push({ ...t, label: t.label[e] || t.label[i] || t.id });
|
|
226
|
+
return n;
|
|
227
|
+
}, h = [
|
|
412
228
|
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
413
229
|
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
414
230
|
{ id: "generalAvailability", color: "green", label: { "en-gb": "" } },
|
|
@@ -418,45 +234,42 @@ const h = "en-US", d = {}, Se = (t) => {
|
|
|
418
234
|
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
419
235
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
420
236
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
421
|
-
],
|
|
422
|
-
const
|
|
423
|
-
return
|
|
424
|
-
},
|
|
237
|
+
], z = (e, n = i) => {
|
|
238
|
+
const t = h.find((r) => r.id === e);
|
|
239
|
+
return t ? { ...t, label: t.label[n] || t.label[i] || e } : { id: e, color: "other", label: e };
|
|
240
|
+
}, i = "en-gb";
|
|
425
241
|
export {
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
Ee as serialiseError,
|
|
460
|
-
ie as useCytoscapeJS,
|
|
461
|
-
se as useDataTable
|
|
242
|
+
v as APIError,
|
|
243
|
+
l as ApplicationError,
|
|
244
|
+
x as CONNECTOR_DESTINATION_OPERATIONS,
|
|
245
|
+
N as CONNECTOR_SOURCE_OPERATIONS,
|
|
246
|
+
i as DEFAULT_LOCALE_CODE,
|
|
247
|
+
T as DefaultTimestamp,
|
|
248
|
+
O as EngineError,
|
|
249
|
+
m as FetchError,
|
|
250
|
+
A as OperationalError,
|
|
251
|
+
g as VueError,
|
|
252
|
+
I as WindowPromiseRejectionError,
|
|
253
|
+
$ as WindowRuntimeError,
|
|
254
|
+
C as buildFetchError,
|
|
255
|
+
F as concatenateSerialisedErrorMessages,
|
|
256
|
+
y as convertMillisecondsToTimestamp,
|
|
257
|
+
B as convertODataTypeIdToUsageTypeId,
|
|
258
|
+
j as extractExtensionFromPath,
|
|
259
|
+
M as extractNameFromPath,
|
|
260
|
+
a as formatNumberAsDecimalNumber,
|
|
261
|
+
_ as formatNumberAsDuration,
|
|
262
|
+
U as formatNumberAsSize,
|
|
263
|
+
L as formatNumberAsStorageSize,
|
|
264
|
+
d as formatNumberAsWholeNumber,
|
|
265
|
+
z as getComponentStatus,
|
|
266
|
+
D as getCurrentTimestamp,
|
|
267
|
+
G as getDataFormats,
|
|
268
|
+
V as getRecordDelimiters,
|
|
269
|
+
X as getValueDelimiters,
|
|
270
|
+
W as lookupMimeTypeForExtension,
|
|
271
|
+
R as normalizeToError,
|
|
272
|
+
k as serialiseError,
|
|
273
|
+
w as useCytoscapeJS,
|
|
274
|
+
S as useDataTable
|
|
462
275
|
};
|
package/dist/schemas.js
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { z as e } from "zod";
|
|
2
|
+
const o = e.union([e.literal("amber"), e.literal("green"), e.literal("red"), e.literal("other")]), r = e.union([
|
|
3
|
+
e.literal("alpha"),
|
|
4
|
+
e.literal("beta"),
|
|
5
|
+
e.literal("generalAvailability"),
|
|
6
|
+
e.literal("notApplicable"),
|
|
7
|
+
e.literal("preAlpha"),
|
|
8
|
+
e.literal("proposed"),
|
|
9
|
+
e.literal("releaseCandidate"),
|
|
10
|
+
e.literal("unavailable"),
|
|
11
|
+
e.literal("underReview")
|
|
12
|
+
]), i = e.union([
|
|
13
|
+
e.literal("app"),
|
|
14
|
+
e.literal("connector"),
|
|
15
|
+
e.literal("connectorConnection"),
|
|
16
|
+
e.literal("context"),
|
|
17
|
+
e.literal("contextModelGroup"),
|
|
18
|
+
e.literal("contextModel"),
|
|
19
|
+
e.literal("contextModelDimensionGroup"),
|
|
20
|
+
e.literal("contextModelDimension"),
|
|
21
|
+
e.literal("contextModelDimensionHierarchy"),
|
|
22
|
+
e.literal("contextModelEntityGroup"),
|
|
23
|
+
e.literal("contextModelEntity"),
|
|
24
|
+
e.literal("contextModelEntityDataItem"),
|
|
25
|
+
e.literal("contextModelEntityEvent"),
|
|
26
|
+
e.literal("contextModelEntityPrimaryMeasure"),
|
|
27
|
+
e.literal("contextModelSecondaryMeasureGroup"),
|
|
28
|
+
e.literal("contextModelSecondaryMeasure"),
|
|
29
|
+
e.literal("dataView"),
|
|
30
|
+
e.literal("dimension"),
|
|
31
|
+
e.literal("engine"),
|
|
32
|
+
e.literal("eventQuery"),
|
|
33
|
+
e.literal("presenter"),
|
|
34
|
+
e.literal("presenterPresentation"),
|
|
35
|
+
e.literal("tool")
|
|
36
|
+
]), a = e.union([e.literal("en-au"), e.literal("en-gb"), e.literal("en-us"), e.literal("es-es")]), c = e.record(a, e.string()), s = e.object({
|
|
37
|
+
id: e.string(),
|
|
38
|
+
color: o,
|
|
39
|
+
label: e.string()
|
|
40
|
+
}), d = e.object({
|
|
41
|
+
id: e.string(),
|
|
42
|
+
label: e.record(e.string(), e.string()),
|
|
43
|
+
description: e.record(e.string(), e.string()),
|
|
44
|
+
firstCreatedAt: e.number().optional(),
|
|
45
|
+
icon: e.string().optional(),
|
|
46
|
+
iconDark: e.string().optional(),
|
|
47
|
+
lastUpdatedAt: e.number().optional(),
|
|
48
|
+
status: s.nullable().optional(),
|
|
49
|
+
statusId: r,
|
|
50
|
+
typeId: i
|
|
51
|
+
}), p = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), m = e.object({
|
|
52
|
+
id: e.string(),
|
|
53
|
+
label: e.string()
|
|
54
|
+
}), u = e.object({
|
|
55
|
+
activeConnectionCount: e.number().optional(),
|
|
56
|
+
canDescribe: e.boolean().optional(),
|
|
57
|
+
id: e.string().optional(),
|
|
58
|
+
authMethodId: e.union([e.literal("apiKey"), e.literal("disabled"), e.literal("oAuth2"), e.literal("none")]),
|
|
59
|
+
label: c.optional(),
|
|
60
|
+
maxConnectionCount: e.number().optional(),
|
|
61
|
+
params: e.array(e.record(e.string(), e.string())).optional()
|
|
62
|
+
}), g = e.union([e.literal("application"), e.literal("curatedDataset"), e.literal("database"), e.literal("fileStore")]), b = e.union([
|
|
63
|
+
e.literal("abortOperation"),
|
|
64
|
+
e.literal("authenticateConnection"),
|
|
65
|
+
e.literal("createObject"),
|
|
66
|
+
e.literal("describeConnection"),
|
|
67
|
+
e.literal("dropObject"),
|
|
68
|
+
e.literal("findObject"),
|
|
69
|
+
e.literal("getRecord"),
|
|
70
|
+
e.literal("listNodes"),
|
|
71
|
+
e.literal("previewObject"),
|
|
72
|
+
e.literal("removeRecords"),
|
|
73
|
+
e.literal("retrieveRecords"),
|
|
74
|
+
e.literal("upsertRecords")
|
|
75
|
+
]), y = e.union([e.literal("bidirectional"), e.literal("destination"), e.literal("source"), e.literal("unknown")]), h = d.extend({
|
|
76
|
+
typeId: p,
|
|
77
|
+
version: e.string()
|
|
78
|
+
}), T = h.extend({
|
|
79
|
+
category: m.optional(),
|
|
80
|
+
categoryId: g,
|
|
81
|
+
implementations: e.record(e.string(), u),
|
|
82
|
+
operations: e.array(b),
|
|
83
|
+
typeId: e.literal("connector"),
|
|
84
|
+
usageId: y,
|
|
85
|
+
vendorAccountURL: e.string().nullable().optional(),
|
|
86
|
+
vendorDocumentationURL: e.string().nullable().optional(),
|
|
87
|
+
vendorHomeURL: e.string().nullable().optional()
|
|
88
|
+
}), x = e.union([e.literal("amber"), e.literal("green"), e.literal("red"), e.literal("other")]), S = e.union([
|
|
89
|
+
e.literal("alpha"),
|
|
90
|
+
e.literal("beta"),
|
|
91
|
+
e.literal("generalAvailability"),
|
|
92
|
+
e.literal("notApplicable"),
|
|
93
|
+
e.literal("preAlpha"),
|
|
94
|
+
e.literal("proposed"),
|
|
95
|
+
e.literal("releaseCandidate"),
|
|
96
|
+
e.literal("unavailable"),
|
|
97
|
+
e.literal("underReview")
|
|
98
|
+
]), M = e.union([
|
|
99
|
+
e.literal("app"),
|
|
100
|
+
e.literal("connector"),
|
|
101
|
+
e.literal("connectorConnection"),
|
|
102
|
+
e.literal("context"),
|
|
103
|
+
e.literal("contextModelGroup"),
|
|
104
|
+
e.literal("contextModel"),
|
|
105
|
+
e.literal("contextModelDimensionGroup"),
|
|
106
|
+
e.literal("contextModelDimension"),
|
|
107
|
+
e.literal("contextModelDimensionHierarchy"),
|
|
108
|
+
e.literal("contextModelEntityGroup"),
|
|
109
|
+
e.literal("contextModelEntity"),
|
|
110
|
+
e.literal("contextModelEntityDataItem"),
|
|
111
|
+
e.literal("contextModelEntityEvent"),
|
|
112
|
+
e.literal("contextModelEntityPrimaryMeasure"),
|
|
113
|
+
e.literal("contextModelSecondaryMeasureGroup"),
|
|
114
|
+
e.literal("contextModelSecondaryMeasure"),
|
|
115
|
+
e.literal("dataView"),
|
|
116
|
+
e.literal("dimension"),
|
|
117
|
+
e.literal("engine"),
|
|
118
|
+
e.literal("eventQuery"),
|
|
119
|
+
e.literal("presenter"),
|
|
120
|
+
e.literal("presenterPresentation"),
|
|
121
|
+
e.literal("tool")
|
|
122
|
+
]), t = e.number(), I = e.object({
|
|
123
|
+
id: e.string(),
|
|
124
|
+
color: x,
|
|
125
|
+
label: e.string()
|
|
126
|
+
}), C = e.object({
|
|
127
|
+
id: e.string(),
|
|
128
|
+
label: e.record(e.string(), e.string()),
|
|
129
|
+
description: e.record(e.string(), e.string()),
|
|
130
|
+
icon: e.string().optional(),
|
|
131
|
+
iconDark: e.string().optional(),
|
|
132
|
+
order: e.number(),
|
|
133
|
+
path: e.string()
|
|
134
|
+
}), n = e.object({
|
|
135
|
+
id: e.string(),
|
|
136
|
+
label: e.record(e.string(), e.string()),
|
|
137
|
+
description: e.record(e.string(), e.string()),
|
|
138
|
+
firstCreatedAt: t.optional(),
|
|
139
|
+
icon: e.string().optional(),
|
|
140
|
+
iconDark: e.string().optional(),
|
|
141
|
+
lastUpdatedAt: t.optional(),
|
|
142
|
+
status: I.optional(),
|
|
143
|
+
statusId: S,
|
|
144
|
+
typeId: M
|
|
145
|
+
}), v = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), D = n.extend({
|
|
146
|
+
typeId: v,
|
|
147
|
+
version: e.string()
|
|
148
|
+
}), f = n.extend({
|
|
149
|
+
modelRefs: e.array(C),
|
|
150
|
+
order: e.number()
|
|
151
|
+
}), E = e.literal("list"), H = D.extend({
|
|
152
|
+
models: e.array(f),
|
|
153
|
+
operations: e.array(E),
|
|
154
|
+
typeId: e.literal("context")
|
|
155
|
+
}), A = e.union([e.literal("amber"), e.literal("green"), e.literal("red"), e.literal("other")]), $ = e.union([e.literal("alpha"), e.literal("beta"), e.literal("generalAvailability"), e.literal("notApplicable"), e.literal("preAlpha"), e.literal("proposed"), e.literal("releaseCandidate"), e.literal("unavailable"), e.literal("underReview")]), j = e.union([e.literal("app"), e.literal("connector"), e.literal("connectorConnection"), e.literal("context"), e.literal("contextModelGroup"), e.literal("contextModel"), e.literal("contextModelDimensionGroup"), e.literal("contextModelDimension"), e.literal("contextModelDimensionHierarchy"), e.literal("contextModelEntityGroup"), e.literal("contextModelEntity"), e.literal("contextModelEntityDataItem"), e.literal("contextModelEntityEvent"), e.literal("contextModelEntityPrimaryMeasure"), e.literal("contextModelSecondaryMeasureGroup"), e.literal("contextModelSecondaryMeasure"), e.literal("dataView"), e.literal("dimension"), e.literal("engine"), e.literal("eventQuery"), e.literal("presenter"), e.literal("presenterPresentation"), e.literal("tool")]), l = e.number(), G = e.object({
|
|
156
|
+
id: e.string(),
|
|
157
|
+
color: A,
|
|
158
|
+
label: e.string()
|
|
159
|
+
}), R = e.object({
|
|
160
|
+
id: e.string(),
|
|
161
|
+
label: e.record(e.string(), e.string()),
|
|
162
|
+
description: e.record(e.string(), e.string()),
|
|
163
|
+
icon: e.string().optional(),
|
|
164
|
+
iconDark: e.string().optional(),
|
|
165
|
+
order: e.number(),
|
|
166
|
+
path: e.string()
|
|
167
|
+
}), w = e.object({
|
|
168
|
+
id: e.string(),
|
|
169
|
+
label: e.record(e.string(), e.string()),
|
|
170
|
+
description: e.record(e.string(), e.string()),
|
|
171
|
+
firstCreatedAt: l.optional(),
|
|
172
|
+
icon: e.string().optional(),
|
|
173
|
+
iconDark: e.string().optional(),
|
|
174
|
+
lastUpdatedAt: l.optional(),
|
|
175
|
+
status: G.optional(),
|
|
176
|
+
statusId: $,
|
|
177
|
+
typeId: j
|
|
178
|
+
}), O = e.union([e.literal("app"), e.literal("engine"), e.literal("connector"), e.literal("context"), e.literal("presenter"), e.literal("tool")]), U = w.extend({
|
|
179
|
+
typeId: O,
|
|
180
|
+
version: e.string()
|
|
181
|
+
}), k = e.union([e.literal("list"), e.literal("render"), e.literal("setColorMode")]), L = U.extend({
|
|
182
|
+
presentations: e.array(R),
|
|
183
|
+
operations: e.array(k),
|
|
184
|
+
typeId: e.literal("presenter")
|
|
185
|
+
});
|
|
186
|
+
export {
|
|
187
|
+
T as connectorConfigSchema,
|
|
188
|
+
H as contextConfigSchema,
|
|
189
|
+
L as presenterConfigSchema
|
|
190
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -19,9 +19,6 @@ export type { PreviewResult, PreviewSettings } from './component/connector';
|
|
|
19
19
|
export type { RemoveSettings } from './component/connector';
|
|
20
20
|
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './component/connector';
|
|
21
21
|
export type { UpsertSettings } from './component/connector';
|
|
22
|
-
export { connectorConfigSchema } from './component/connector/connectorSchema';
|
|
23
|
-
export { contextConfigSchema } from './component/context/contextSchema';
|
|
24
|
-
export { presenterConfigSchema } from './component/presenter/presenterSchema';
|
|
25
22
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './component/connector/connection';
|
|
26
23
|
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
27
24
|
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.271",
|
|
4
4
|
"description": "A TypeScript library containing common declarations and utilities used across other Data Positioning repositories.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|
|
@@ -19,11 +19,17 @@
|
|
|
19
19
|
".": {
|
|
20
20
|
"import": "./dist/datapos-shared.es.js",
|
|
21
21
|
"types": "./dist/types/index.d.ts"
|
|
22
|
+
},
|
|
23
|
+
"./schemas": {
|
|
24
|
+
"import": "./dist/schemas.js",
|
|
25
|
+
"types": "./dist/types/schemas.d.ts"
|
|
22
26
|
}
|
|
23
27
|
},
|
|
24
28
|
"sideEffects": false,
|
|
25
29
|
"files": [
|
|
26
|
-
"dist"
|
|
30
|
+
"dist",
|
|
31
|
+
"schemas.d.ts",
|
|
32
|
+
"schemas.js"
|
|
27
33
|
],
|
|
28
34
|
"peerDependencies": {
|
|
29
35
|
"csv-parse": "^6.1.0",
|
package/schemas.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/types/schemas';
|
package/schemas.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/schemas.js';
|