@datapos/datapos-shared 0.3.237 → 0.3.238
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,87 +1,87 @@
|
|
|
1
1
|
const x = ["createObject", "dropObject", "removeRecords", "upsertRecords"], N = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"];
|
|
2
2
|
function w() {
|
|
3
|
-
function e(
|
|
3
|
+
function e(n, t, r) {
|
|
4
4
|
r.textContent = "Cytoscape.js diagram goes here...";
|
|
5
5
|
}
|
|
6
6
|
return { render: e };
|
|
7
7
|
}
|
|
8
8
|
function S() {
|
|
9
|
-
function e(
|
|
10
|
-
console.log(1111,
|
|
9
|
+
function e(n, t) {
|
|
10
|
+
console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
|
|
11
11
|
}
|
|
12
12
|
return { render: e };
|
|
13
13
|
}
|
|
14
14
|
const T = 0, y = (e) => e, D = () => Date.now();
|
|
15
15
|
class u extends Error {
|
|
16
16
|
locator;
|
|
17
|
-
constructor(
|
|
18
|
-
super(
|
|
17
|
+
constructor(n, t, r) {
|
|
18
|
+
super(n, r), this.name = "DataPosError", this.locator = t, Error.captureStackTrace?.(this, new.target);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
class l extends u {
|
|
22
|
-
constructor(
|
|
23
|
-
super(
|
|
22
|
+
constructor(n, t, r) {
|
|
23
|
+
super(n, t, r), this.name = "ApplicationError";
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
class v extends l {
|
|
27
|
-
constructor(
|
|
28
|
-
super(
|
|
27
|
+
constructor(n, t, r) {
|
|
28
|
+
super(n, t, r), this.name = "APIError";
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
class O extends l {
|
|
32
|
-
constructor(
|
|
33
|
-
super(
|
|
32
|
+
constructor(n, t, r) {
|
|
33
|
+
super(n, t, r), this.name = "EngineError";
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
class m extends l {
|
|
37
37
|
body;
|
|
38
|
-
constructor(
|
|
39
|
-
super(
|
|
38
|
+
constructor(n, t, r, o) {
|
|
39
|
+
super(n, t, o), this.name = "FetchError", this.body = r;
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
class g extends l {
|
|
43
43
|
componentName;
|
|
44
44
|
info;
|
|
45
|
-
constructor(
|
|
46
|
-
super(
|
|
45
|
+
constructor(n, t, r, o, s) {
|
|
46
|
+
super(n, t, s), this.name = "VueHandledError", this.info = r, this.componentName = o;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
class $ extends l {
|
|
50
|
-
constructor(
|
|
51
|
-
super(
|
|
50
|
+
constructor(n, t, r) {
|
|
51
|
+
super(n, t, r), this.name = "WindowHandledRuntimeError";
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
class I extends l {
|
|
55
|
-
constructor(
|
|
56
|
-
super(
|
|
55
|
+
constructor(n, t, r) {
|
|
56
|
+
super(n, t, r), this.name = "WindowHandledPromiseRejectionError";
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
class A extends u {
|
|
60
|
-
constructor(
|
|
61
|
-
super(
|
|
60
|
+
constructor(n, t, r) {
|
|
61
|
+
super(n, t, r), this.name = "OperationalError";
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
async function C(e,
|
|
65
|
-
const r = `${
|
|
66
|
-
return new m(r,
|
|
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);
|
|
67
67
|
}
|
|
68
68
|
function F(e) {
|
|
69
|
-
return e.map((
|
|
69
|
+
return e.map((n) => n.message).join(" ");
|
|
70
70
|
}
|
|
71
|
-
function R(e,
|
|
71
|
+
function R(e, n = "Unknown error.") {
|
|
72
72
|
if (e instanceof Error) return e;
|
|
73
73
|
if (typeof e == "string") return new Error(e);
|
|
74
74
|
try {
|
|
75
|
-
return new Error(JSON.stringify(e ??
|
|
75
|
+
return new Error(JSON.stringify(e ?? n));
|
|
76
76
|
} catch {
|
|
77
|
-
return new Error(
|
|
77
|
+
return new Error(n);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
function k(e) {
|
|
81
|
-
const
|
|
81
|
+
const n = /* @__PURE__ */ new Set(), t = [];
|
|
82
82
|
let r = e;
|
|
83
|
-
for (; r && !
|
|
84
|
-
|
|
83
|
+
for (; r && !n.has(r); ) {
|
|
84
|
+
n.add(r);
|
|
85
85
|
let o;
|
|
86
86
|
if (r instanceof m)
|
|
87
87
|
o = { body: r.body, locator: r.locator, message: r.message, name: r.name, stack: r.stack }, r = r.cause;
|
|
@@ -93,9 +93,9 @@ function k(e) {
|
|
|
93
93
|
const s = r;
|
|
94
94
|
o = { locator: "", message: s.message, name: s.name, stack: s.stack }, r = s.cause;
|
|
95
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 += "."),
|
|
96
|
+
/(?:\.{3}|[.!?])$/.test(o.message) || (o.message += "."), t.push(o);
|
|
97
97
|
}
|
|
98
|
-
return
|
|
98
|
+
return t;
|
|
99
99
|
}
|
|
100
100
|
const f = "en-US", c = {}, B = (e) => {
|
|
101
101
|
switch (e) {
|
|
@@ -138,38 +138,38 @@ const f = "en-US", c = {}, B = (e) => {
|
|
|
138
138
|
}
|
|
139
139
|
}, M = (e) => {
|
|
140
140
|
if (e) {
|
|
141
|
-
const
|
|
142
|
-
return
|
|
141
|
+
const n = e.lastIndexOf("/"), t = e.lastIndexOf(".", n > -1 ? n : e.length);
|
|
142
|
+
return t > -1 ? e.substring(0, t) : e;
|
|
143
143
|
}
|
|
144
144
|
}, j = (e) => {
|
|
145
145
|
if (e) {
|
|
146
|
-
const
|
|
147
|
-
if (
|
|
146
|
+
const n = e.lastIndexOf(".");
|
|
147
|
+
if (n > -1) return e.substring(n + 1);
|
|
148
148
|
}
|
|
149
|
-
}, a = (e,
|
|
149
|
+
}, a = (e, n = 2, t = n, r = f) => {
|
|
150
150
|
if (e == null) return "";
|
|
151
|
-
const o = `${r}decimal${
|
|
151
|
+
const o = `${r}decimal${n}.${t}`;
|
|
152
152
|
let s = c[o];
|
|
153
153
|
return s || (s = new Intl.NumberFormat(r, {
|
|
154
154
|
localeMatcher: "best fit",
|
|
155
|
-
maximumFractionDigits:
|
|
156
|
-
minimumFractionDigits:
|
|
155
|
+
maximumFractionDigits: n,
|
|
156
|
+
minimumFractionDigits: t,
|
|
157
157
|
minimumIntegerDigits: 1,
|
|
158
158
|
style: "decimal",
|
|
159
159
|
useGrouping: !0
|
|
160
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,
|
|
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
162
|
if (e == null) return "";
|
|
163
|
-
const
|
|
164
|
-
let r = c[
|
|
165
|
-
return r || (r = new Intl.NumberFormat(
|
|
163
|
+
const t = `${n}decimal0.0`;
|
|
164
|
+
let r = c[t];
|
|
165
|
+
return r || (r = new Intl.NumberFormat(n, {
|
|
166
166
|
localeMatcher: "best fit",
|
|
167
167
|
maximumFractionDigits: 0,
|
|
168
168
|
minimumFractionDigits: 0,
|
|
169
169
|
minimumIntegerDigits: 1,
|
|
170
170
|
style: "decimal",
|
|
171
171
|
useGrouping: !0
|
|
172
|
-
}), c[
|
|
172
|
+
}), c[t] = r), r.format(e);
|
|
173
173
|
}, W = (e) => {
|
|
174
174
|
switch (e) {
|
|
175
175
|
case "csv":
|
|
@@ -193,9 +193,9 @@ const f = "en-US", c = {}, B = (e) => {
|
|
|
193
193
|
{ id: "xlsx", label: { "en-gb": "XLSX" } },
|
|
194
194
|
{ id: "xml", label: { "en-gb": "XML" } }
|
|
195
195
|
], G = (e = i) => {
|
|
196
|
-
const
|
|
197
|
-
for (const
|
|
198
|
-
return
|
|
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
199
|
}, p = [
|
|
200
200
|
{ id: `
|
|
201
201
|
`, label: { "en-gb": "Newline" } },
|
|
@@ -203,10 +203,10 @@ const f = "en-US", c = {}, B = (e) => {
|
|
|
203
203
|
{ id: `\r
|
|
204
204
|
`, label: { "en-gb": "Carriage Return/Newline" } }
|
|
205
205
|
], V = (e = i) => {
|
|
206
|
-
const
|
|
207
|
-
for (const
|
|
208
|
-
|
|
209
|
-
return
|
|
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
210
|
}, E = [
|
|
211
211
|
{ id: ":", label: { "en-gb": "Colon" } },
|
|
212
212
|
{ id: ",", label: { "en-gb": "Comma" } },
|
|
@@ -220,10 +220,10 @@ const f = "en-US", c = {}, B = (e) => {
|
|
|
220
220
|
{ id: "0x1F", label: { "en-gb": "Unit Separator" } },
|
|
221
221
|
{ id: "|", label: { "en-gb": "Vertical Bar" } }
|
|
222
222
|
], X = (e = i) => {
|
|
223
|
-
const
|
|
224
|
-
for (const
|
|
225
|
-
|
|
226
|
-
return
|
|
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
227
|
}, h = [
|
|
228
228
|
{ id: "alpha", color: "red", label: { "en-gb": "alpha" } },
|
|
229
229
|
{ id: "beta", color: "amber", label: { "en-gb": "beta" } },
|
|
@@ -234,9 +234,9 @@ const f = "en-US", c = {}, B = (e) => {
|
|
|
234
234
|
{ id: "releaseCandidate", color: "green", label: { "en-gb": "release-candidate" } },
|
|
235
235
|
{ id: "unavailable", color: "other", label: { "en-gb": "unavailable" } },
|
|
236
236
|
{ id: "underReview", color: "other", label: { "en-gb": "under-review" } }
|
|
237
|
-
], z = (e,
|
|
238
|
-
const
|
|
239
|
-
return
|
|
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
240
|
}, i = "en-gb";
|
|
241
241
|
export {
|
|
242
242
|
v as APIError,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PresentationVisualContentConfig
|
|
1
|
+
import { PresentationVisualContentConfig } from '../index';
|
|
2
2
|
export declare function useDataTable(): {
|
|
3
|
-
render: (
|
|
3
|
+
render: (contentConfig: PresentationVisualContentConfig, element: HTMLElement) => void;
|
|
4
4
|
};
|
package/package.json
CHANGED