@datapos/datapos-shared 0.3.74 → 0.3.78
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.
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
const
|
|
2
|
-
class
|
|
1
|
+
const x = 0, w = (e) => e, D = () => Date.now();
|
|
2
|
+
class u extends Error {
|
|
3
3
|
locator;
|
|
4
4
|
constructor(t, n, r) {
|
|
5
5
|
super(t, r), this.name = "DataPosError", this.locator = n, Error.captureStackTrace?.(this, new.target);
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
-
class
|
|
8
|
+
class l extends u {
|
|
9
9
|
constructor(t, n, r) {
|
|
10
10
|
super(t, n, r), this.name = "ApplicationError";
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
|
-
class N extends
|
|
13
|
+
class N extends l {
|
|
14
14
|
constructor(t, n, r) {
|
|
15
15
|
super(t, n, r), this.name = "APIError";
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
class S extends
|
|
18
|
+
class S extends l {
|
|
19
19
|
constructor(t, n, r) {
|
|
20
20
|
super(t, n, r), this.name = "EngineError";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
class
|
|
23
|
+
class m extends l {
|
|
24
24
|
body;
|
|
25
25
|
constructor(t, n, r, a) {
|
|
26
26
|
super(t, n, a), this.name = "FetchError", this.body = r;
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
|
-
class
|
|
29
|
+
class g extends l {
|
|
30
30
|
componentName;
|
|
31
31
|
info;
|
|
32
32
|
constructor(t, n, r, a, s) {
|
|
33
33
|
super(t, n, s), this.name = "VueHandledError", this.info = r, this.componentName = a;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
class y extends
|
|
36
|
+
class y extends l {
|
|
37
37
|
constructor(t, n, r) {
|
|
38
38
|
super(t, n, r), this.name = "WindowHandledRuntimeError";
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
-
class
|
|
41
|
+
class $ extends l {
|
|
42
42
|
constructor(t, n, r) {
|
|
43
43
|
super(t, n, r), this.name = "WindowHandledPromiseRejectionError";
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
class
|
|
46
|
+
class v extends u {
|
|
47
47
|
constructor(t, n, r) {
|
|
48
48
|
super(t, n, r), this.name = "OperationalError";
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
async function
|
|
51
|
+
async function T(e, t, n) {
|
|
52
52
|
const r = `${t} Response status '${e.status}${e.statusText ? ` - ${e.statusText}` : ""}' received.`, a = await e.text();
|
|
53
|
-
return new
|
|
53
|
+
return new m(r, n, a);
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function F(e) {
|
|
56
56
|
return e.map((t) => t.message).join(" ");
|
|
57
57
|
}
|
|
58
58
|
function I(e, t = "Unknown error.") {
|
|
@@ -64,17 +64,17 @@ function I(e, t = "Unknown error.") {
|
|
|
64
64
|
return new Error(t);
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function A(e) {
|
|
68
68
|
const t = /* @__PURE__ */ new Set(), n = [];
|
|
69
69
|
let r = e;
|
|
70
70
|
for (; r && !t.has(r); ) {
|
|
71
71
|
t.add(r);
|
|
72
72
|
let a;
|
|
73
|
-
if (r instanceof
|
|
73
|
+
if (r instanceof m)
|
|
74
74
|
a = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
75
|
-
else if (r instanceof
|
|
75
|
+
else if (r instanceof g)
|
|
76
76
|
a = { componentName: r.componentName, info: r.info, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
77
|
-
else if (r instanceof
|
|
77
|
+
else if (r instanceof u)
|
|
78
78
|
a = { locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
79
79
|
else if (r instanceof Error) {
|
|
80
80
|
const s = r;
|
|
@@ -84,7 +84,7 @@ function F(e) {
|
|
|
84
84
|
}
|
|
85
85
|
return n;
|
|
86
86
|
}
|
|
87
|
-
const
|
|
87
|
+
const f = "en-US", c = {}, k = (e) => {
|
|
88
88
|
switch (e) {
|
|
89
89
|
case "Edm.Binary":
|
|
90
90
|
return "unknown";
|
|
@@ -123,7 +123,7 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
123
123
|
default:
|
|
124
124
|
return "unknown";
|
|
125
125
|
}
|
|
126
|
-
},
|
|
126
|
+
}, O = (e) => {
|
|
127
127
|
if (e) {
|
|
128
128
|
const t = e.lastIndexOf("/"), n = e.lastIndexOf(".", t > -1 ? t : e.length);
|
|
129
129
|
return n > -1 ? e.substring(0, n) : e;
|
|
@@ -133,10 +133,10 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
133
133
|
const t = e.lastIndexOf(".");
|
|
134
134
|
if (t > -1) return e.substring(t + 1);
|
|
135
135
|
}
|
|
136
|
-
}, o = (e, t = 2, n = t, r =
|
|
136
|
+
}, o = (e, t = 2, n = t, r = f) => {
|
|
137
137
|
if (e == null) return "";
|
|
138
138
|
const a = `${r}decimal${t}.${n}`;
|
|
139
|
-
let s =
|
|
139
|
+
let s = c[a];
|
|
140
140
|
return s || (s = new Intl.NumberFormat(r, {
|
|
141
141
|
localeMatcher: "best fit",
|
|
142
142
|
maximumFractionDigits: t,
|
|
@@ -144,11 +144,11 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
144
144
|
minimumIntegerDigits: 1,
|
|
145
145
|
style: "decimal",
|
|
146
146
|
useGrouping: !0
|
|
147
|
-
}),
|
|
148
|
-
},
|
|
147
|
+
}), c[a] = s), s.format(e);
|
|
148
|
+
}, C = (e) => e == null ? "" : e < 1e3 ? d(e) : e < 1e6 ? `${o(e / 1e3, 2, 0)}K` : e < 1e9 ? `${o(e / 1e6, 2, 0)}M` : e < 1e12 ? `${o(e / 1e9, 2, 0)}B` : `${o(e / 1e12, 2, 0)}T`, M = (e) => e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${d(e)} bytes` : e < 1048576 ? `${o(e / 1024, 2, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, 2, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, 2, 0)} GB` : `${o(e / 1099511627776, 2, 0)} TB`, R = (e) => e == null ? "" : e < 1e3 ? `${d(e)} ms` : e === 1e3 ? `${d(e)} sec` : e < 6e4 ? `${o(e / 1e3, 2, 0)} secs` : e === 6e4 ? "1 min" : e < 36e5 ? `${o(e / 6e4, 2, 0)} mins` : e === 36e5 ? "1 hr" : e < 864e5 ? `${o(e / 36e5, 2, 0)} hrs` : e === 864e5 ? "1 day" : `${o(e / 864e5, 2, 0)} days`, d = (e, t = f) => {
|
|
149
149
|
if (e == null) return "";
|
|
150
150
|
const n = `${t}decimal0.0`;
|
|
151
|
-
let r =
|
|
151
|
+
let r = c[n];
|
|
152
152
|
return r || (r = new Intl.NumberFormat(t, {
|
|
153
153
|
localeMatcher: "best fit",
|
|
154
154
|
maximumFractionDigits: 0,
|
|
@@ -156,8 +156,8 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
156
156
|
minimumIntegerDigits: 1,
|
|
157
157
|
style: "decimal",
|
|
158
158
|
useGrouping: !0
|
|
159
|
-
}),
|
|
160
|
-
},
|
|
159
|
+
}), c[n] = r), r.format(e);
|
|
160
|
+
}, L = (e) => {
|
|
161
161
|
switch (e) {
|
|
162
162
|
case "csv":
|
|
163
163
|
return "text/csv";
|
|
@@ -171,85 +171,88 @@ const m = "en-US", l = {}, k = (e) => {
|
|
|
171
171
|
default:
|
|
172
172
|
return "application/octet-stream";
|
|
173
173
|
}
|
|
174
|
-
},
|
|
175
|
-
{ id: "dtv", label: { en: "Delimited Text" } },
|
|
176
|
-
{ id: "e/e", label: { en: "Entity/Event" } },
|
|
177
|
-
{ id: "jsonArray", label: { en: "JSON Array" } },
|
|
178
|
-
{ id: "spss", label: { en: "SPSS" } },
|
|
179
|
-
{ id: "xls", label: { en: "XLS" } },
|
|
180
|
-
{ id: "xlsx", label: { en: "XLSX" } },
|
|
181
|
-
{ id: "xml", label: { en: "XML" } }
|
|
182
|
-
], U = (e =
|
|
174
|
+
}, b = [
|
|
175
|
+
{ id: "dtv", label: { "en-gb": "Delimited Text" } },
|
|
176
|
+
{ id: "e/e", label: { "en-gb": "Entity/Event" } },
|
|
177
|
+
{ id: "jsonArray", label: { "en-gb": "JSON Array" } },
|
|
178
|
+
{ id: "spss", label: { "en-gb": "SPSS" } },
|
|
179
|
+
{ id: "xls", label: { "en-gb": "XLS" } },
|
|
180
|
+
{ id: "xlsx", label: { "en-gb": "XLSX" } },
|
|
181
|
+
{ id: "xml", label: { "en-gb": "XML" } }
|
|
182
|
+
], U = (e = i) => {
|
|
183
183
|
const t = [];
|
|
184
|
-
for (const n of
|
|
184
|
+
for (const n of b) t.push({ ...n, label: n.label[e] || n.label[i] || n.id });
|
|
185
185
|
return t;
|
|
186
|
-
},
|
|
186
|
+
}, p = [
|
|
187
187
|
{ id: `
|
|
188
|
-
`, label: { en: "Newline" } },
|
|
189
|
-
{ id: "\r", label: { en: "Carriage Return" } },
|
|
188
|
+
`, label: { "en-gb": "Newline" } },
|
|
189
|
+
{ id: "\r", label: { "en-gb": "Carriage Return" } },
|
|
190
190
|
{ id: `\r
|
|
191
|
-
`, label: { en: "Carriage Return/Newline" } }
|
|
192
|
-
], W = (e =
|
|
191
|
+
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
192
|
+
], W = (e = i) => {
|
|
193
193
|
const t = [];
|
|
194
|
-
for (const n of
|
|
194
|
+
for (const n of p)
|
|
195
|
+
t.push({ ...n, label: n.label[e] || n.label[i] || n.id });
|
|
195
196
|
return t;
|
|
196
|
-
},
|
|
197
|
-
{ id: ":", label: { en: "Colon" } },
|
|
198
|
-
{ id: ",", label: { en: "Comma" } },
|
|
199
|
-
{ id: "!", label: { en: "Exclamation Mark" } },
|
|
200
|
-
// { id: '', label: { en: 'Other' } }, // TODO: Maybe set this to a 'not printing' or special ascii character when there is a user supplied delimited, rather than ''?
|
|
201
|
-
{ id: "0x1E", label: { en: "Record Separator" } },
|
|
202
|
-
{ id: ";", label: { en: "Semicolon" } },
|
|
203
|
-
{ id: " ", label: { en: "Space" } },
|
|
204
|
-
{ id: " ", label: { en: "Tab" } },
|
|
205
|
-
{ id: "_", label: { en: "Underscore" } },
|
|
206
|
-
{ id: "0x1F", label: { en: "Unit Separator" } },
|
|
207
|
-
{ id: "|", label: { en: "Vertical Bar" } }
|
|
208
|
-
], j = (e =
|
|
197
|
+
}, E = [
|
|
198
|
+
{ id: ":", label: { "en-gb": "Colon" } },
|
|
199
|
+
{ id: ",", label: { "en-gb": "Comma" } },
|
|
200
|
+
{ id: "!", label: { "en-gb": "Exclamation Mark" } },
|
|
201
|
+
// { 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 ''?
|
|
202
|
+
{ id: "0x1E", label: { "en-gb": "Record Separator" } },
|
|
203
|
+
{ id: ";", label: { "en-gb": "Semicolon" } },
|
|
204
|
+
{ id: " ", label: { "en-gb": "Space" } },
|
|
205
|
+
{ id: " ", label: { "en-gb": "Tab" } },
|
|
206
|
+
{ id: "_", label: { "en-gb": "Underscore" } },
|
|
207
|
+
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
208
|
+
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
209
|
+
], j = (e = i) => {
|
|
209
210
|
const t = [];
|
|
210
|
-
for (const n of
|
|
211
|
+
for (const n of E)
|
|
212
|
+
t.push({ ...n, label: n.label[e] || n.label[i] || n.id });
|
|
211
213
|
return t;
|
|
212
|
-
},
|
|
213
|
-
{ id: "alpha", color: "red", label: { en: "alpha" } },
|
|
214
|
-
{ id: "beta", color: "amber", label: { en: "beta" } },
|
|
215
|
-
{ id: "generalAvailability", label: { en: "" } },
|
|
216
|
-
{ id: "notApplicable", label: { en: "not-applicable" } },
|
|
217
|
-
{ id: "preAlpha", color: "red", label: { en: "pre-alpha" } },
|
|
218
|
-
{ id: "proposed", color: "other", label: { en: "proposed" } },
|
|
219
|
-
{ id: "releaseCandidate", label: { en: "release-candidate" } },
|
|
220
|
-
{ id: "unavailable", color: "other", label: { en: "unavailable" } },
|
|
221
|
-
{ id: "underReview", color: "other", label: { en: "under-review" } }
|
|
222
|
-
], G = (e, t =
|
|
223
|
-
const n =
|
|
224
|
-
return n ? { ...n, label: n.label[t] || n.label
|
|
225
|
-
};
|
|
214
|
+
}, h = [
|
|
215
|
+
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
216
|
+
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
217
|
+
{ id: "generalAvailability", color: "green", label: { "en-gb": "" } },
|
|
218
|
+
{ id: "notApplicable", color: "green", label: { "en-gb": "not-applicable" } },
|
|
219
|
+
{ id: "preAlpha", color: "red", label: { "en-gb": "pre-alpha" } },
|
|
220
|
+
{ id: "proposed", color: "other", label: { "en-gb": "proposed" } },
|
|
221
|
+
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
222
|
+
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
223
|
+
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
224
|
+
], G = (e, t = i) => {
|
|
225
|
+
const n = h.find((r) => r.id === e);
|
|
226
|
+
return n ? { ...n, label: n.label[t] || n.label[i] || e } : { id: e, color: "other", label: e };
|
|
227
|
+
}, i = "en-gb";
|
|
226
228
|
export {
|
|
227
229
|
N as APIError,
|
|
228
|
-
|
|
229
|
-
|
|
230
|
+
l as ApplicationError,
|
|
231
|
+
i as DEFAULT_LOCALE_CODE,
|
|
232
|
+
x as DefaultTimestamp,
|
|
230
233
|
S as EngineError,
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
234
|
+
m as FetchError,
|
|
235
|
+
v as OperationalError,
|
|
236
|
+
g as VueError,
|
|
237
|
+
$ as WindowPromiseRejectionError,
|
|
235
238
|
y as WindowRuntimeError,
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
+
T as buildFetchError,
|
|
240
|
+
F as concatenateSerialisedErrorMessages,
|
|
241
|
+
w as convertMillisecondsToTimestamp,
|
|
239
242
|
k as convertODataTypeIdToUsageTypeId,
|
|
240
243
|
B as extractExtensionFromPath,
|
|
241
|
-
|
|
244
|
+
O as extractNameFromPath,
|
|
242
245
|
o as formatNumberAsDecimalNumber,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
246
|
+
R as formatNumberAsDuration,
|
|
247
|
+
C as formatNumberAsSize,
|
|
248
|
+
M as formatNumberAsStorageSize,
|
|
249
|
+
d as formatNumberAsWholeNumber,
|
|
247
250
|
G as getComponentStatus,
|
|
248
|
-
|
|
251
|
+
D as getCurrentTimestamp,
|
|
249
252
|
U as getDataFormats,
|
|
250
253
|
W as getRecordDelimiters,
|
|
251
254
|
j as getValueDelimiters,
|
|
252
|
-
|
|
255
|
+
L as lookupMimeTypeForExtension,
|
|
253
256
|
I as normalizeToError,
|
|
254
|
-
|
|
257
|
+
A as serialiseError
|
|
255
258
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Timestamp } from './timestamp';
|
|
2
|
+
import { LocaleCode, StatusColorId } from './index';
|
|
2
3
|
export interface ComponentConfig {
|
|
3
|
-
description: Record<
|
|
4
|
+
description: Record<LocaleCode, string>;
|
|
4
5
|
firstCreatedAt?: Timestamp;
|
|
5
6
|
id: string;
|
|
6
|
-
label: Record<
|
|
7
|
+
label: Record<LocaleCode, string>;
|
|
7
8
|
lastUpdatedAt?: Timestamp;
|
|
8
9
|
icon?: string;
|
|
9
10
|
iconDark?: string;
|
|
@@ -13,14 +14,13 @@ export interface ComponentConfig {
|
|
|
13
14
|
}
|
|
14
15
|
export interface ComponentRef {
|
|
15
16
|
id: string;
|
|
16
|
-
label: Record<
|
|
17
|
+
label: Record<LocaleCode, string>;
|
|
17
18
|
}
|
|
18
|
-
export type ComponentTypeId = 'app' | 'connection' | 'connector' | 'dimension' | 'engine' | 'focus' | 'model' | 'dataView' | 'eventQuery' | 'presentation' | 'presenter' | 'recipe' | 'tutorial';
|
|
19
|
-
export type StatusColorId = 'amber' | 'red' | 'other';
|
|
20
|
-
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
21
19
|
export type ComponentStatus = {
|
|
22
20
|
id: string;
|
|
23
|
-
color
|
|
21
|
+
color: StatusColorId;
|
|
24
22
|
label: string;
|
|
25
23
|
};
|
|
24
|
+
export type ComponentStatusId = 'alpha' | 'beta' | 'generalAvailability' | 'notApplicable' | 'preAlpha' | 'proposed' | 'releaseCandidate' | 'unavailable' | 'underReview';
|
|
26
25
|
export declare const getComponentStatus: (id: string, localeId?: string) => ComponentStatus;
|
|
26
|
+
export type ComponentTypeId = 'app' | 'engine' | 'connector' | 'connectorConnection' | 'context' | 'contextFocus' | 'contextModel' | 'contextModelDimensionGroup' | 'contextModelDimension' | 'contextModelDimensionHierarchy' | 'contextModelEntityGroup' | 'contextModelEntity' | 'contextModelEntityDataItems' | 'contextModelEntityEvent' | 'contextModelEntityPrimaryMeasure' | 'contextModelSecondaryMeasureGroup' | 'contextModelSecondaryMeasure' | 'contextModelPresentationGroup' | 'contextModelPresentation' | 'dataView' | 'dimension' | 'eventQuery' | 'presenter' | 'presenterPresentation' | 'informer' | 'informerDocument';
|
|
@@ -2,9 +2,9 @@ import { parse as csvParse } from 'csv-parse/browser/esm';
|
|
|
2
2
|
import { parse as dateFnsParse } from 'date-fns';
|
|
3
3
|
import { nanoid } from 'nanoid';
|
|
4
4
|
import { ComponentConfig } from './component';
|
|
5
|
-
import { convertMillisecondsToTimestamp } from '.';
|
|
6
5
|
import { buildFetchError, OperationalError } from './errors';
|
|
7
6
|
import { ConnectionConfig, ConnectionDescription, ConnectionNodeConfig } from './connection';
|
|
7
|
+
import { convertMillisecondsToTimestamp } from './index';
|
|
8
8
|
import { DataViewContentAuditConfig, ValueDelimiterId } from './dataView';
|
|
9
9
|
import { extractExtensionFromPath, extractNameFromPath, lookupMimeTypeForExtension } from './utilities';
|
|
10
10
|
export interface Connector {
|
|
@@ -25,25 +25,6 @@ export interface Connector {
|
|
|
25
25
|
retrieveRecords?(connector: Connector, settings: RetrieveSettings, chunk: (records: (string[] | Record<string, unknown>)[]) => void, complete: (result: RetrieveSummary) => void): Promise<void>;
|
|
26
26
|
upsertRecords?(connector: Connector, settings: UpsertSettings): Promise<void>;
|
|
27
27
|
}
|
|
28
|
-
export interface ConnectorTools {
|
|
29
|
-
csvParse: typeof csvParse;
|
|
30
|
-
dateFns: {
|
|
31
|
-
parse: typeof dateFnsParse;
|
|
32
|
-
};
|
|
33
|
-
nanoid: typeof nanoid;
|
|
34
|
-
shared: {
|
|
35
|
-
buildFetchError: typeof buildFetchError;
|
|
36
|
-
convertMillisecondsToTimestamp: typeof convertMillisecondsToTimestamp;
|
|
37
|
-
extractExtensionFromPath: typeof extractExtensionFromPath;
|
|
38
|
-
extractNameFromPath: typeof extractNameFromPath;
|
|
39
|
-
lookupMimeTypeForExtension: typeof lookupMimeTypeForExtension;
|
|
40
|
-
OperationalError: typeof OperationalError;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
export interface ConnectorCallbackData {
|
|
44
|
-
typeId: string;
|
|
45
|
-
properties: Record<string, unknown>;
|
|
46
|
-
}
|
|
47
28
|
export interface ConnectorConfig extends ComponentConfig {
|
|
48
29
|
category?: ConnectorCategory;
|
|
49
30
|
categoryId: string;
|
|
@@ -54,7 +35,7 @@ export interface ConnectorConfig extends ComponentConfig {
|
|
|
54
35
|
vendorHomeURL?: string;
|
|
55
36
|
version: string;
|
|
56
37
|
}
|
|
57
|
-
export
|
|
38
|
+
export type ConnectorImplementation = {
|
|
58
39
|
activeConnectionCount?: number;
|
|
59
40
|
canDescribe?: boolean;
|
|
60
41
|
id?: string;
|
|
@@ -62,25 +43,43 @@ export interface ConnectorImplementation {
|
|
|
62
43
|
label?: Record<string, string>;
|
|
63
44
|
maxConnectionCount?: number;
|
|
64
45
|
params?: Record<string, string>[];
|
|
65
|
-
}
|
|
46
|
+
};
|
|
66
47
|
export type ConnectorLocalisedConfig = Omit<ConnectorConfig, 'label' | 'description'> & {
|
|
67
48
|
label: string;
|
|
68
49
|
description: string;
|
|
69
50
|
};
|
|
51
|
+
export type ConnectorTools = {
|
|
52
|
+
csvParse: typeof csvParse;
|
|
53
|
+
dataPos: {
|
|
54
|
+
buildFetchError: typeof buildFetchError;
|
|
55
|
+
convertMillisecondsToTimestamp: typeof convertMillisecondsToTimestamp;
|
|
56
|
+
extractExtensionFromPath: typeof extractExtensionFromPath;
|
|
57
|
+
extractNameFromPath: typeof extractNameFromPath;
|
|
58
|
+
lookupMimeTypeForExtension: typeof lookupMimeTypeForExtension;
|
|
59
|
+
OperationalError: typeof OperationalError;
|
|
60
|
+
};
|
|
61
|
+
dateFns: {
|
|
62
|
+
parse: typeof dateFnsParse;
|
|
63
|
+
};
|
|
64
|
+
nanoid: typeof nanoid;
|
|
65
|
+
};
|
|
66
|
+
export interface InitialiseSettings {
|
|
67
|
+
connectorStorageURLPrefix: string;
|
|
68
|
+
}
|
|
70
69
|
export interface ConnectorOperationSettings {
|
|
71
70
|
accountId?: string;
|
|
72
71
|
appCheckToken?: string;
|
|
73
72
|
sessionAccessToken?: string;
|
|
74
73
|
}
|
|
75
|
-
export interface AuditContentResult {
|
|
76
|
-
contentAuditConfig: DataViewContentAuditConfig;
|
|
77
|
-
}
|
|
78
74
|
export interface AuditContentSettings extends ConnectorOperationSettings {
|
|
79
75
|
chunkSize?: number;
|
|
80
76
|
encodingId: string;
|
|
81
77
|
path: string;
|
|
82
78
|
valueDelimiterId: ValueDelimiterId;
|
|
83
79
|
}
|
|
80
|
+
export interface AuditContentResult {
|
|
81
|
+
contentAuditConfig: DataViewContentAuditConfig;
|
|
82
|
+
}
|
|
84
83
|
export interface CreateSettings extends ConnectorOperationSettings {
|
|
85
84
|
accountId?: string;
|
|
86
85
|
path: string;
|
|
@@ -94,28 +93,19 @@ interface DescribeResult {
|
|
|
94
93
|
export interface DropSettings extends ConnectorOperationSettings {
|
|
95
94
|
path: string;
|
|
96
95
|
}
|
|
97
|
-
export interface FindResult {
|
|
98
|
-
folderPath?: string;
|
|
99
|
-
}
|
|
100
96
|
export interface FindSettings extends ConnectorOperationSettings {
|
|
101
97
|
containerName?: string;
|
|
102
98
|
objectName: string;
|
|
103
99
|
}
|
|
104
|
-
export interface
|
|
105
|
-
|
|
100
|
+
export interface FindResult {
|
|
101
|
+
folderPath?: string;
|
|
106
102
|
}
|
|
107
103
|
export interface GetSettings extends ConnectorOperationSettings {
|
|
108
104
|
id: string;
|
|
109
105
|
path: string;
|
|
110
106
|
}
|
|
111
|
-
export interface
|
|
112
|
-
|
|
113
|
-
}
|
|
114
|
-
export interface ListResult {
|
|
115
|
-
cursor: string | number | undefined;
|
|
116
|
-
connectionNodeConfigs: ConnectionNodeConfig[];
|
|
117
|
-
isMore: boolean;
|
|
118
|
-
totalCount: number;
|
|
107
|
+
export interface GetResult {
|
|
108
|
+
record?: string[] | Record<string, unknown>;
|
|
119
109
|
}
|
|
120
110
|
export interface ListSettings extends ConnectorOperationSettings {
|
|
121
111
|
folderPath: string;
|
|
@@ -123,15 +113,21 @@ export interface ListSettings extends ConnectorOperationSettings {
|
|
|
123
113
|
offset?: number;
|
|
124
114
|
totalCount?: number;
|
|
125
115
|
}
|
|
126
|
-
export interface
|
|
127
|
-
|
|
128
|
-
|
|
116
|
+
export interface ListResult {
|
|
117
|
+
cursor: string | number | undefined;
|
|
118
|
+
connectionNodeConfigs: ConnectionNodeConfig[];
|
|
119
|
+
isMore: boolean;
|
|
120
|
+
totalCount: number;
|
|
129
121
|
}
|
|
130
122
|
export interface PreviewSettings extends ConnectorOperationSettings {
|
|
131
123
|
chunkSize?: number;
|
|
132
124
|
extension?: string;
|
|
133
125
|
path: string;
|
|
134
126
|
}
|
|
127
|
+
export interface PreviewResult {
|
|
128
|
+
data: Record<string, unknown>[] | Uint8Array;
|
|
129
|
+
typeId: 'jsonArray' | 'uint8Array';
|
|
130
|
+
}
|
|
135
131
|
export interface RemoveSettings extends ConnectorOperationSettings {
|
|
136
132
|
keys: string[];
|
|
137
133
|
path: string;
|
|
@@ -157,6 +153,10 @@ export interface UpsertSettings extends ConnectorOperationSettings {
|
|
|
157
153
|
records: Record<string, unknown>[];
|
|
158
154
|
path: string;
|
|
159
155
|
}
|
|
156
|
+
export interface ConnectorCallbackData {
|
|
157
|
+
typeId: string;
|
|
158
|
+
properties: Record<string, unknown>;
|
|
159
|
+
}
|
|
160
160
|
type ConnectorCategory = {
|
|
161
161
|
id: string;
|
|
162
162
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
export declare const DEFAULT_LOCALE_CODE = "en-gb";
|
|
1
2
|
export { DefaultTimestamp } from './timestamp';
|
|
2
|
-
export type
|
|
3
|
-
export type
|
|
4
|
-
export type {
|
|
3
|
+
export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
4
|
+
export type StatusColorId = 'amber' | 'green' | 'red' | 'other';
|
|
5
|
+
export type { ComponentConfig, ComponentRef, ComponentStatus, ComponentStatusId, ComponentTypeId } from './component';
|
|
5
6
|
export type { AuditContentResult, AuditContentSettings } from './connector';
|
|
6
7
|
export type { Connector, ConnectorCallbackData, ConnectorConfig, ConnectorImplementation, ConnectorOperationSettings, ConnectorLocalisedConfig, ConnectorTools } from './connector';
|
|
7
8
|
export type { CreateSettings } from './connector';
|
|
@@ -14,6 +15,8 @@ export type { PreviewResult, PreviewSettings } from './connector';
|
|
|
14
15
|
export type { RemoveSettings } from './connector';
|
|
15
16
|
export type { RetrieveResult, RetrieveSettings, RetrieveSummary } from './connector';
|
|
16
17
|
export type { UpsertSettings } from './connector';
|
|
18
|
+
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig } from './connection';
|
|
19
|
+
export type { DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './connection';
|
|
17
20
|
export type { Context, ContextConfig, ContextFocusConfig, ContextFocusConfigListResult, ContextFocusConfigListSettings, ContextModelConfig, ContextDimensionConfig, ContextDimensionGroupConfig, ContextEntityCharacteristicConfig, ContextEntityGroupConfig, ContextEntityComputationConfig, ContextSecondaryMeasureGroupConfig, ContextViewGroupConfig, ContextFocusLocalisedConfig } from './context';
|
|
18
21
|
export type { ContextEntityConfig, ContextEntityEventConfig, ContextHierarchyConfig, ContextViewConfig, Event } from './context';
|
|
19
22
|
export type { DataFormatId, EncodingConfig, RecordDelimiterId, ValueDelimiterId } from './dataView';
|
|
@@ -2,16 +2,9 @@ import { default as markdownIt } from 'markdown-it';
|
|
|
2
2
|
import { ComponentConfig } from './component';
|
|
3
3
|
export interface Presenter {
|
|
4
4
|
readonly config: PresenterConfig;
|
|
5
|
-
tools: PresenterTools;
|
|
6
|
-
list(
|
|
7
|
-
render(
|
|
8
|
-
}
|
|
9
|
-
export type PresenterTools = {
|
|
10
|
-
markdownIt: typeof markdownIt;
|
|
11
|
-
};
|
|
12
|
-
export interface PresentationView {
|
|
13
|
-
resize: () => void;
|
|
14
|
-
vendorId: string;
|
|
5
|
+
readonly tools: PresenterTools;
|
|
6
|
+
list(): PresenterItemConfig[];
|
|
7
|
+
render(presentationPath: string, renderTo: HTMLElement): Promise<void>;
|
|
15
8
|
}
|
|
16
9
|
export interface PresenterConfig extends ComponentConfig {
|
|
17
10
|
version: string;
|
|
@@ -20,6 +13,13 @@ export type PresenterLocalisedConfig = Omit<PresenterConfig, 'label' | 'descript
|
|
|
20
13
|
label: string;
|
|
21
14
|
description: string;
|
|
22
15
|
};
|
|
16
|
+
export type PresenterTools = {
|
|
17
|
+
markdownIt: typeof markdownIt;
|
|
18
|
+
};
|
|
19
|
+
export interface PresentationView {
|
|
20
|
+
resize: () => void;
|
|
21
|
+
vendorId: string;
|
|
22
|
+
}
|
|
23
23
|
export interface PresenterItemConfig {
|
|
24
24
|
items?: PresenterItemConfig[];
|
|
25
25
|
label: Record<string, string>;
|