@datapos/datapos-shared 0.3.359 → 0.3.363
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-connector.es.js +6 -607
- package/dist/datapos-shared.es.js +601 -14
- package/dist/types/src/component/connector/connection.d.ts +16 -14
- package/dist/types/src/component/connector/connectorConfig.schema.d.ts +16 -9
- package/dist/types/src/component/connector/index.d.ts +16 -38
- package/dist/types/src/errors/index.d.ts +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/package.json +1 -1
|
@@ -1,610 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return
|
|
5
|
-
lang: t?.lang ?? M?.lang,
|
|
6
|
-
message: t?.message,
|
|
7
|
-
abortEarly: t?.abortEarly ?? M?.abortEarly,
|
|
8
|
-
abortPipeEarly: t?.abortPipeEarly ?? M?.abortPipeEarly
|
|
9
|
-
};
|
|
10
|
-
}
|
|
11
|
-
let F;
|
|
12
|
-
// @__NO_SIDE_EFFECTS__
|
|
13
|
-
function G(t) {
|
|
14
|
-
return F?.get(t);
|
|
15
|
-
}
|
|
16
|
-
let z;
|
|
17
|
-
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function V(t) {
|
|
19
|
-
return z?.get(t);
|
|
20
|
-
}
|
|
21
|
-
let X;
|
|
22
|
-
// @__NO_SIDE_EFFECTS__
|
|
23
|
-
function K(t, n) {
|
|
24
|
-
return X?.get(t)?.get(n);
|
|
25
|
-
}
|
|
26
|
-
// @__NO_SIDE_EFFECTS__
|
|
27
|
-
function N(t) {
|
|
28
|
-
const n = typeof t;
|
|
29
|
-
return n === "string" ? `"${t}"` : n === "number" || n === "bigint" || n === "boolean" ? `${t}` : n === "object" || n === "function" ? (t && Object.getPrototypeOf(t)?.constructor?.name) ?? "null" : n;
|
|
30
|
-
}
|
|
31
|
-
function g(t, n, e, r, o) {
|
|
32
|
-
const s = o && "input" in o ? o.input : e.value, i = o?.expected ?? t.expects ?? null, u = o?.received ?? /* @__PURE__ */ N(s), l = {
|
|
33
|
-
kind: t.kind,
|
|
34
|
-
type: t.type,
|
|
35
|
-
input: s,
|
|
36
|
-
expected: i,
|
|
37
|
-
received: u,
|
|
38
|
-
message: `Invalid ${n}: ${i ? `Expected ${i} but r` : "R"}eceived ${u}`,
|
|
39
|
-
requirement: t.requirement,
|
|
40
|
-
path: o?.path,
|
|
41
|
-
issues: o?.issues,
|
|
42
|
-
lang: r.lang,
|
|
43
|
-
abortEarly: r.abortEarly,
|
|
44
|
-
abortPipeEarly: r.abortPipeEarly
|
|
45
|
-
}, p = t.kind === "schema", d = o?.message ?? t.message ?? /* @__PURE__ */ K(t.reference, l.lang) ?? (p ? /* @__PURE__ */ V(l.lang) : null) ?? r.message ?? /* @__PURE__ */ G(l.lang);
|
|
46
|
-
d !== void 0 && (l.message = typeof d == "function" ? d(l) : d), p && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
|
|
47
|
-
}
|
|
48
|
-
// @__NO_SIDE_EFFECTS__
|
|
49
|
-
function h(t) {
|
|
50
|
-
return {
|
|
51
|
-
version: 1,
|
|
52
|
-
vendor: "valibot",
|
|
53
|
-
validate(n) {
|
|
54
|
-
return t["~run"]({ value: n }, /* @__PURE__ */ U());
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
// @__NO_SIDE_EFFECTS__
|
|
59
|
-
function q(t, n) {
|
|
60
|
-
return Object.hasOwn(t, n) && n !== "__proto__" && n !== "prototype" && n !== "constructor";
|
|
61
|
-
}
|
|
62
|
-
// @__NO_SIDE_EFFECTS__
|
|
63
|
-
function H(t, n) {
|
|
64
|
-
const e = [...new Set(t)];
|
|
65
|
-
return e.length > 1 ? `(${e.join(` ${n} `)})` : e[0] ?? "never";
|
|
66
|
-
}
|
|
67
|
-
// @__NO_SIDE_EFFECTS__
|
|
68
|
-
function J(t, n, e) {
|
|
69
|
-
return typeof t.fallback == "function" ? t.fallback(n, e) : t.fallback;
|
|
70
|
-
}
|
|
71
|
-
// @__NO_SIDE_EFFECTS__
|
|
72
|
-
function j(t, n, e) {
|
|
73
|
-
return typeof t.default == "function" ? t.default(n, e) : t.default;
|
|
74
|
-
}
|
|
75
|
-
// @__NO_SIDE_EFFECTS__
|
|
76
|
-
function S(t, n) {
|
|
77
|
-
return {
|
|
78
|
-
kind: "schema",
|
|
79
|
-
type: "array",
|
|
80
|
-
reference: S,
|
|
81
|
-
expects: "Array",
|
|
82
|
-
async: !1,
|
|
83
|
-
item: t,
|
|
84
|
-
message: n,
|
|
85
|
-
get "~standard"() {
|
|
86
|
-
return /* @__PURE__ */ h(this);
|
|
87
|
-
},
|
|
88
|
-
"~run"(e, r) {
|
|
89
|
-
const o = e.value;
|
|
90
|
-
if (Array.isArray(o)) {
|
|
91
|
-
e.typed = !0, e.value = [];
|
|
92
|
-
for (let s = 0; s < o.length; s++) {
|
|
93
|
-
const i = o[s], u = this.item["~run"]({ value: i }, r);
|
|
94
|
-
if (u.issues) {
|
|
95
|
-
const l = {
|
|
96
|
-
type: "array",
|
|
97
|
-
origin: "value",
|
|
98
|
-
input: o,
|
|
99
|
-
key: s,
|
|
100
|
-
value: i
|
|
101
|
-
};
|
|
102
|
-
for (const p of u.issues)
|
|
103
|
-
p.path ? p.path.unshift(l) : p.path = [l], e.issues?.push(p);
|
|
104
|
-
if (e.issues || (e.issues = u.issues), r.abortEarly) {
|
|
105
|
-
e.typed = !1;
|
|
106
|
-
break;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
u.typed || (e.typed = !1), e.value.push(u.value);
|
|
110
|
-
}
|
|
111
|
-
} else g(this, "type", e, r);
|
|
112
|
-
return e;
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
// @__NO_SIDE_EFFECTS__
|
|
117
|
-
function w(t) {
|
|
118
|
-
return {
|
|
119
|
-
kind: "schema",
|
|
120
|
-
type: "boolean",
|
|
121
|
-
reference: w,
|
|
122
|
-
expects: "boolean",
|
|
123
|
-
async: !1,
|
|
124
|
-
message: t,
|
|
125
|
-
get "~standard"() {
|
|
126
|
-
return /* @__PURE__ */ h(this);
|
|
127
|
-
},
|
|
128
|
-
"~run"(n, e) {
|
|
129
|
-
return typeof n.value == "boolean" ? n.typed = !0 : g(this, "type", n, e), n;
|
|
130
|
-
}
|
|
131
|
-
};
|
|
132
|
-
}
|
|
133
|
-
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function E(t, n) {
|
|
135
|
-
return {
|
|
136
|
-
kind: "schema",
|
|
137
|
-
type: "literal",
|
|
138
|
-
reference: E,
|
|
139
|
-
expects: /* @__PURE__ */ N(t),
|
|
140
|
-
async: !1,
|
|
141
|
-
literal: t,
|
|
142
|
-
message: n,
|
|
143
|
-
get "~standard"() {
|
|
144
|
-
return /* @__PURE__ */ h(this);
|
|
145
|
-
},
|
|
146
|
-
"~run"(e, r) {
|
|
147
|
-
return e.value === this.literal ? e.typed = !0 : g(this, "type", e, r), e;
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
// @__NO_SIDE_EFFECTS__
|
|
152
|
-
function y(t, n) {
|
|
153
|
-
return {
|
|
154
|
-
kind: "schema",
|
|
155
|
-
type: "nullable",
|
|
156
|
-
reference: y,
|
|
157
|
-
expects: `(${t.expects} | null)`,
|
|
158
|
-
async: !1,
|
|
159
|
-
wrapped: t,
|
|
160
|
-
default: n,
|
|
161
|
-
get "~standard"() {
|
|
162
|
-
return /* @__PURE__ */ h(this);
|
|
163
|
-
},
|
|
164
|
-
"~run"(e, r) {
|
|
165
|
-
return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ j(this, e, r)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
}
|
|
169
|
-
// @__NO_SIDE_EFFECTS__
|
|
170
|
-
function C(t) {
|
|
171
|
-
return {
|
|
172
|
-
kind: "schema",
|
|
173
|
-
type: "number",
|
|
174
|
-
reference: C,
|
|
175
|
-
expects: "number",
|
|
176
|
-
async: !1,
|
|
177
|
-
message: t,
|
|
178
|
-
get "~standard"() {
|
|
179
|
-
return /* @__PURE__ */ h(this);
|
|
180
|
-
},
|
|
181
|
-
"~run"(n, e) {
|
|
182
|
-
return typeof n.value == "number" && !isNaN(n.value) ? n.typed = !0 : g(this, "type", n, e), n;
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
// @__NO_SIDE_EFFECTS__
|
|
187
|
-
function f(t, n) {
|
|
188
|
-
return {
|
|
189
|
-
kind: "schema",
|
|
190
|
-
type: "object",
|
|
191
|
-
reference: f,
|
|
192
|
-
expects: "Object",
|
|
193
|
-
async: !1,
|
|
194
|
-
entries: t,
|
|
195
|
-
message: n,
|
|
196
|
-
get "~standard"() {
|
|
197
|
-
return /* @__PURE__ */ h(this);
|
|
198
|
-
},
|
|
199
|
-
"~run"(e, r) {
|
|
200
|
-
const o = e.value;
|
|
201
|
-
if (o && typeof o == "object") {
|
|
202
|
-
e.typed = !0, e.value = {};
|
|
203
|
-
for (const s in this.entries) {
|
|
204
|
-
const i = this.entries[s];
|
|
205
|
-
if (s in o || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
|
|
206
|
-
const u = s in o ? o[s] : /* @__PURE__ */ j(i), l = i["~run"]({ value: u }, r);
|
|
207
|
-
if (l.issues) {
|
|
208
|
-
const p = {
|
|
209
|
-
type: "object",
|
|
210
|
-
origin: "value",
|
|
211
|
-
input: o,
|
|
212
|
-
key: s,
|
|
213
|
-
value: u
|
|
214
|
-
};
|
|
215
|
-
for (const d of l.issues)
|
|
216
|
-
d.path ? d.path.unshift(p) : d.path = [p], e.issues?.push(d);
|
|
217
|
-
if (e.issues || (e.issues = l.issues), r.abortEarly) {
|
|
218
|
-
e.typed = !1;
|
|
219
|
-
break;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
l.typed || (e.typed = !1), e.value[s] = l.value;
|
|
223
|
-
} else if (i.fallback !== void 0) e.value[s] = /* @__PURE__ */ J(i);
|
|
224
|
-
else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (g(this, "key", e, r, {
|
|
225
|
-
input: void 0,
|
|
226
|
-
expected: `"${s}"`,
|
|
227
|
-
path: [{
|
|
228
|
-
type: "object",
|
|
229
|
-
origin: "key",
|
|
230
|
-
input: o,
|
|
231
|
-
key: s,
|
|
232
|
-
value: o[s]
|
|
233
|
-
}]
|
|
234
|
-
}), r.abortEarly))
|
|
235
|
-
break;
|
|
236
|
-
}
|
|
237
|
-
} else g(this, "type", e, r);
|
|
238
|
-
return e;
|
|
239
|
-
}
|
|
240
|
-
};
|
|
241
|
-
}
|
|
242
|
-
// @__NO_SIDE_EFFECTS__
|
|
243
|
-
function b(t, n) {
|
|
244
|
-
return {
|
|
245
|
-
kind: "schema",
|
|
246
|
-
type: "optional",
|
|
247
|
-
reference: b,
|
|
248
|
-
expects: `(${t.expects} | undefined)`,
|
|
249
|
-
async: !1,
|
|
250
|
-
wrapped: t,
|
|
251
|
-
default: n,
|
|
252
|
-
get "~standard"() {
|
|
253
|
-
return /* @__PURE__ */ h(this);
|
|
254
|
-
},
|
|
255
|
-
"~run"(e, r) {
|
|
256
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ j(this, e, r)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, r);
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
// @__NO_SIDE_EFFECTS__
|
|
261
|
-
function R(t, n, e) {
|
|
262
|
-
return {
|
|
263
|
-
kind: "schema",
|
|
264
|
-
type: "record",
|
|
265
|
-
reference: R,
|
|
266
|
-
expects: "Object",
|
|
267
|
-
async: !1,
|
|
268
|
-
key: t,
|
|
269
|
-
value: n,
|
|
270
|
-
message: e,
|
|
271
|
-
get "~standard"() {
|
|
272
|
-
return /* @__PURE__ */ h(this);
|
|
273
|
-
},
|
|
274
|
-
"~run"(r, o) {
|
|
275
|
-
const s = r.value;
|
|
276
|
-
if (s && typeof s == "object") {
|
|
277
|
-
r.typed = !0, r.value = {};
|
|
278
|
-
for (const i in s) if (/* @__PURE__ */ q(s, i)) {
|
|
279
|
-
const u = s[i], l = this.key["~run"]({ value: i }, o);
|
|
280
|
-
if (l.issues) {
|
|
281
|
-
const d = {
|
|
282
|
-
type: "object",
|
|
283
|
-
origin: "key",
|
|
284
|
-
input: s,
|
|
285
|
-
key: i,
|
|
286
|
-
value: u
|
|
287
|
-
};
|
|
288
|
-
for (const x of l.issues)
|
|
289
|
-
x.path = [d], r.issues?.push(x);
|
|
290
|
-
if (r.issues || (r.issues = l.issues), o.abortEarly) {
|
|
291
|
-
r.typed = !1;
|
|
292
|
-
break;
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
const p = this.value["~run"]({ value: u }, o);
|
|
296
|
-
if (p.issues) {
|
|
297
|
-
const d = {
|
|
298
|
-
type: "object",
|
|
299
|
-
origin: "value",
|
|
300
|
-
input: s,
|
|
301
|
-
key: i,
|
|
302
|
-
value: u
|
|
303
|
-
};
|
|
304
|
-
for (const x of p.issues)
|
|
305
|
-
x.path ? x.path.unshift(d) : x.path = [d], r.issues?.push(x);
|
|
306
|
-
if (r.issues || (r.issues = p.issues), o.abortEarly) {
|
|
307
|
-
r.typed = !1;
|
|
308
|
-
break;
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
(!l.typed || !p.typed) && (r.typed = !1), l.typed && (r.value[l.value] = p.value);
|
|
312
|
-
}
|
|
313
|
-
} else g(this, "type", r, o);
|
|
314
|
-
return r;
|
|
315
|
-
}
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
// @__NO_SIDE_EFFECTS__
|
|
319
|
-
function a(t) {
|
|
320
|
-
return {
|
|
321
|
-
kind: "schema",
|
|
322
|
-
type: "string",
|
|
323
|
-
reference: a,
|
|
324
|
-
expects: "string",
|
|
325
|
-
async: !1,
|
|
326
|
-
message: t,
|
|
327
|
-
get "~standard"() {
|
|
328
|
-
return /* @__PURE__ */ h(this);
|
|
329
|
-
},
|
|
330
|
-
"~run"(n, e) {
|
|
331
|
-
return typeof n.value == "string" ? n.typed = !0 : g(this, "type", n, e), n;
|
|
332
|
-
}
|
|
333
|
-
};
|
|
334
|
-
}
|
|
335
|
-
// @__NO_SIDE_EFFECTS__
|
|
336
|
-
function _(t) {
|
|
337
|
-
let n;
|
|
338
|
-
if (t) for (const e of t) n ? n.push(...e.issues) : n = e.issues;
|
|
339
|
-
return n;
|
|
340
|
-
}
|
|
341
|
-
// @__NO_SIDE_EFFECTS__
|
|
342
|
-
function P(t, n) {
|
|
343
|
-
return {
|
|
344
|
-
kind: "schema",
|
|
345
|
-
type: "union",
|
|
346
|
-
reference: P,
|
|
347
|
-
expects: /* @__PURE__ */ H(t.map((e) => e.expects), "|"),
|
|
348
|
-
async: !1,
|
|
349
|
-
options: t,
|
|
350
|
-
message: n,
|
|
351
|
-
get "~standard"() {
|
|
352
|
-
return /* @__PURE__ */ h(this);
|
|
353
|
-
},
|
|
354
|
-
"~run"(e, r) {
|
|
355
|
-
let o, s, i;
|
|
356
|
-
for (const u of this.options) {
|
|
357
|
-
const l = u["~run"]({ value: e.value }, r);
|
|
358
|
-
if (l.typed) if (l.issues) s ? s.push(l) : s = [l];
|
|
359
|
-
else {
|
|
360
|
-
o = l;
|
|
361
|
-
break;
|
|
362
|
-
}
|
|
363
|
-
else i ? i.push(l) : i = [l];
|
|
364
|
-
}
|
|
365
|
-
if (o) return o;
|
|
366
|
-
if (s) {
|
|
367
|
-
if (s.length === 1) return s[0];
|
|
368
|
-
g(this, "type", e, r, { issues: /* @__PURE__ */ _(s) }), e.typed = !0;
|
|
369
|
-
} else {
|
|
370
|
-
if (i?.length === 1) return i[0];
|
|
371
|
-
g(this, "type", e, r, { issues: /* @__PURE__ */ _(i) });
|
|
372
|
-
}
|
|
373
|
-
return e;
|
|
374
|
-
}
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
const m = (t) => /* @__PURE__ */ P(t.map((n) => /* @__PURE__ */ E(n))), B = /* @__PURE__ */ f({
|
|
378
|
-
"en-au": /* @__PURE__ */ a(),
|
|
379
|
-
"en-gb": /* @__PURE__ */ a(),
|
|
380
|
-
"en-us": /* @__PURE__ */ a(),
|
|
381
|
-
"es-es": /* @__PURE__ */ a()
|
|
382
|
-
}), k = /* @__PURE__ */ f({
|
|
383
|
-
"en-au": /* @__PURE__ */ b(/* @__PURE__ */ a()),
|
|
384
|
-
"en-gb": /* @__PURE__ */ b(/* @__PURE__ */ a()),
|
|
385
|
-
"en-us": /* @__PURE__ */ b(/* @__PURE__ */ a()),
|
|
386
|
-
"es-es": /* @__PURE__ */ b(/* @__PURE__ */ a())
|
|
387
|
-
}), Q = m(["amber", "green", "red", "other"]), W = m([
|
|
388
|
-
"alpha",
|
|
389
|
-
"beta",
|
|
390
|
-
"generalAvailability",
|
|
391
|
-
"notApplicable",
|
|
392
|
-
"preAlpha",
|
|
393
|
-
"proposed",
|
|
394
|
-
"releaseCandidate",
|
|
395
|
-
"unavailable",
|
|
396
|
-
"underReview"
|
|
397
|
-
]), Y = m([
|
|
398
|
-
"app",
|
|
399
|
-
"connector",
|
|
400
|
-
"connectorConnection",
|
|
401
|
-
"context",
|
|
402
|
-
"contextModelGroup",
|
|
403
|
-
"contextModel",
|
|
404
|
-
"contextModelDimensionGroup",
|
|
405
|
-
"contextModelDimension",
|
|
406
|
-
"contextModelDimensionHierarchy",
|
|
407
|
-
"contextModelEntityGroup",
|
|
408
|
-
"contextModelEntity",
|
|
409
|
-
"contextModelEntityDataItem",
|
|
410
|
-
"contextModelEntityEvent",
|
|
411
|
-
"contextModelEntityPrimaryMeasure",
|
|
412
|
-
"contextModelSecondaryMeasureGroup",
|
|
413
|
-
"contextModelSecondaryMeasure",
|
|
414
|
-
"dataView",
|
|
415
|
-
"dimension",
|
|
416
|
-
"engine",
|
|
417
|
-
"eventQuery",
|
|
418
|
-
"presenter",
|
|
419
|
-
"presenterPresentation",
|
|
420
|
-
"tool"
|
|
421
|
-
]);
|
|
422
|
-
m(["app", "engine", "connector", "context", "presenter", "tool"]);
|
|
423
|
-
const Z = /* @__PURE__ */ f({
|
|
424
|
-
id: /* @__PURE__ */ a(),
|
|
425
|
-
color: Q,
|
|
426
|
-
label: /* @__PURE__ */ a()
|
|
427
|
-
}), I = {
|
|
428
|
-
id: /* @__PURE__ */ a(),
|
|
429
|
-
label: k,
|
|
430
|
-
description: k,
|
|
431
|
-
firstCreatedAt: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
432
|
-
icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
433
|
-
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
434
|
-
lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ C()),
|
|
435
|
-
status: /* @__PURE__ */ y(Z),
|
|
436
|
-
statusId: W
|
|
437
|
-
}, fe = /* @__PURE__ */ f({
|
|
438
|
-
...I,
|
|
439
|
-
typeId: Y
|
|
440
|
-
}), A = {
|
|
441
|
-
...I,
|
|
442
|
-
version: /* @__PURE__ */ a()
|
|
443
|
-
}, T = /* @__PURE__ */ f({
|
|
444
|
-
id: /* @__PURE__ */ a(),
|
|
445
|
-
label: k,
|
|
446
|
-
description: k,
|
|
447
|
-
icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
448
|
-
iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
449
|
-
order: /* @__PURE__ */ C(),
|
|
450
|
-
path: /* @__PURE__ */ a()
|
|
451
|
-
}), v = (t) => {
|
|
452
|
-
const n = Object.entries(t).filter((e) => typeof e[1] == "string");
|
|
453
|
-
return new Map(n);
|
|
454
|
-
}, $ = (t, n, e = O) => {
|
|
455
|
-
const r = t.get(n);
|
|
456
|
-
if (r !== void 0) return r;
|
|
457
|
-
if (e !== n)
|
|
458
|
-
return t.get(e);
|
|
459
|
-
}, ee = [
|
|
460
|
-
{ id: "alpha", color: "red", labels: v({ "en-gb": "alpha" }) },
|
|
461
|
-
{ id: "beta", color: "amber", labels: v({ "en-gb": "beta" }) },
|
|
462
|
-
{ id: "generalAvailability", color: "green", labels: v({ "en-gb": "" }) },
|
|
463
|
-
{ id: "notApplicable", color: "green", labels: v({ "en-gb": "not-applicable" }) },
|
|
464
|
-
{ id: "preAlpha", color: "red", labels: v({ "en-gb": "pre-alpha" }) },
|
|
465
|
-
{ id: "proposed", color: "other", labels: v({ "en-gb": "proposed" }) },
|
|
466
|
-
{ id: "releaseCandidate", color: "green", labels: v({ "en-gb": "release-candidate" }) },
|
|
467
|
-
{ id: "unavailable", color: "other", labels: v({ "en-gb": "unavailable" }) },
|
|
468
|
-
{ id: "underReview", color: "other", labels: v({ "en-gb": "under-review" }) }
|
|
469
|
-
], ye = (t, n = O) => {
|
|
470
|
-
const e = ee.find((r) => r.id === t);
|
|
471
|
-
if (e) {
|
|
472
|
-
const r = $(e.labels, n);
|
|
473
|
-
return { id: e.id, color: e.color, label: r ?? e.id };
|
|
474
|
-
}
|
|
475
|
-
return { id: t, color: "other", label: t };
|
|
476
|
-
}, te = m(["apiKey", "disabled", "oAuth2", "none"]), ne = m(["application", "curatedDataset", "database", "fileStore"]), re = m([
|
|
477
|
-
"abortOperation",
|
|
478
|
-
"authenticateConnection",
|
|
479
|
-
"createObject",
|
|
480
|
-
"describeConnection",
|
|
481
|
-
"dropObject",
|
|
482
|
-
"findObject",
|
|
483
|
-
"getReadableStream",
|
|
484
|
-
"getRecord",
|
|
485
|
-
"listNodes",
|
|
486
|
-
"previewObject",
|
|
487
|
-
"removeRecords",
|
|
488
|
-
"retrieveChunks",
|
|
489
|
-
"retrieveRecords",
|
|
490
|
-
"upsertRecords"
|
|
491
|
-
]), se = m(["bidirectional", "destination", "source", "unknown"]), oe = /* @__PURE__ */ f({
|
|
492
|
-
authMethodId: te,
|
|
493
|
-
activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
494
|
-
canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ w()),
|
|
495
|
-
id: /* @__PURE__ */ b(/* @__PURE__ */ a()),
|
|
496
|
-
label: /* @__PURE__ */ b(B),
|
|
497
|
-
maxConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ C()),
|
|
498
|
-
params: /* @__PURE__ */ b(/* @__PURE__ */ S(/* @__PURE__ */ R(/* @__PURE__ */ a(), /* @__PURE__ */ a())))
|
|
499
|
-
}), ge = /* @__PURE__ */ f({
|
|
500
|
-
...A,
|
|
501
|
-
typeId: /* @__PURE__ */ E("connector"),
|
|
502
|
-
category: /* @__PURE__ */ y(/* @__PURE__ */ f({ id: /* @__PURE__ */ a(), label: /* @__PURE__ */ a() })),
|
|
503
|
-
categoryId: ne,
|
|
504
|
-
implementations: /* @__PURE__ */ R(/* @__PURE__ */ a(), oe),
|
|
505
|
-
operations: /* @__PURE__ */ S(re),
|
|
506
|
-
usageId: se,
|
|
507
|
-
vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
508
|
-
vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
|
|
509
|
-
vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ a())
|
|
510
|
-
}), he = ["createObject", "dropObject", "removeRecords", "upsertRecords"], me = ["findObject", "getRecord", "listNodes", "previewObject", "retrieveRecords"], D = (t) => {
|
|
511
|
-
const n = Object.entries(t).filter((e) => typeof e[1] == "string");
|
|
512
|
-
return new Map(n);
|
|
1
|
+
import { connectorConfigSchema as r } from "./datapos-shared.es.js";
|
|
2
|
+
const e = (a) => {
|
|
3
|
+
const t = Object.entries(a).filter((n) => typeof n[1] == "string");
|
|
4
|
+
return new Map(t);
|
|
513
5
|
};
|
|
514
|
-
|
|
515
|
-
const ie = m(["list"]), le = /* @__PURE__ */ f({
|
|
516
|
-
...I,
|
|
517
|
-
typeId: /* @__PURE__ */ E("contextModelGroup"),
|
|
518
|
-
modelRefs: /* @__PURE__ */ S(T),
|
|
519
|
-
order: /* @__PURE__ */ C()
|
|
520
|
-
}), ve = /* @__PURE__ */ f({
|
|
521
|
-
...A,
|
|
522
|
-
typeId: /* @__PURE__ */ E("context"),
|
|
523
|
-
models: /* @__PURE__ */ S(le),
|
|
524
|
-
operations: /* @__PURE__ */ S(ie)
|
|
525
|
-
}), ae = m(["list", "render", "setColorMode"]), Se = /* @__PURE__ */ f({
|
|
526
|
-
...A,
|
|
527
|
-
typeId: /* @__PURE__ */ E("presenter"),
|
|
528
|
-
presentations: /* @__PURE__ */ S(T),
|
|
529
|
-
operations: /* @__PURE__ */ S(ae)
|
|
530
|
-
});
|
|
531
|
-
function xe() {
|
|
532
|
-
return { render: ce };
|
|
533
|
-
}
|
|
534
|
-
function ce(t, n, e) {
|
|
535
|
-
e.textContent = "Cytoscape.js diagram goes here...";
|
|
536
|
-
}
|
|
537
|
-
function Ce() {
|
|
538
|
-
return { render: ue };
|
|
539
|
-
}
|
|
540
|
-
function ue(t, n) {
|
|
541
|
-
console.log(1111, t), console.log(2222, n), console.log(3333, n.childNodes), console.log(4444, n.children);
|
|
542
|
-
}
|
|
543
|
-
const c = (t) => new Map(Object.entries(t)), L = (t, n, e = O) => {
|
|
544
|
-
const r = t.get(n);
|
|
545
|
-
if (r !== void 0) return r;
|
|
546
|
-
if (e !== n)
|
|
547
|
-
return t.get(e);
|
|
548
|
-
}, pe = [
|
|
549
|
-
{ id: "dtv", labels: c({ "en-gb": "Delimited Text" }) },
|
|
550
|
-
{ id: "e/e", labels: c({ "en-gb": "Entity/Event" }) },
|
|
551
|
-
{ id: "jsonArray", labels: c({ "en-gb": "JSON Array" }) },
|
|
552
|
-
{ id: "spss", labels: c({ "en-gb": "SPSS" }) },
|
|
553
|
-
{ id: "xls", labels: c({ "en-gb": "XLS" }) },
|
|
554
|
-
{ id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
|
|
555
|
-
{ id: "xml", labels: c({ "en-gb": "XML" }) }
|
|
556
|
-
], Ee = (t = O) => {
|
|
557
|
-
const n = [];
|
|
558
|
-
for (const e of pe) {
|
|
559
|
-
const r = L(e.labels, t);
|
|
560
|
-
n.push({ id: e.id, label: r ?? e.id });
|
|
561
|
-
}
|
|
562
|
-
return n;
|
|
563
|
-
}, de = [
|
|
564
|
-
{ id: `
|
|
565
|
-
`, labels: c({ "en-gb": "Newline" }) },
|
|
566
|
-
{ id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
|
|
567
|
-
{ id: `\r
|
|
568
|
-
`, labels: c({ "en-gb": "Carriage Return/Newline" }) }
|
|
569
|
-
], Oe = (t = O) => {
|
|
570
|
-
const n = [];
|
|
571
|
-
for (const e of de) {
|
|
572
|
-
const r = L(e.labels, t);
|
|
573
|
-
n.push({ id: e.id, label: r ?? e.id });
|
|
574
|
-
}
|
|
575
|
-
return n;
|
|
576
|
-
}, be = [
|
|
577
|
-
{ id: ":", labels: c({ "en-gb": "Colon" }) },
|
|
578
|
-
{ id: ",", labels: c({ "en-gb": "Comma" }) },
|
|
579
|
-
{ id: "!", labels: c({ "en-gb": "Exclamation Mark" }) },
|
|
580
|
-
// { 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 ''?
|
|
581
|
-
{ id: "0x1E", labels: c({ "en-gb": "Record Separator" }) },
|
|
582
|
-
{ id: ";", labels: c({ "en-gb": "Semicolon" }) },
|
|
583
|
-
{ id: " ", labels: c({ "en-gb": "Space" }) },
|
|
584
|
-
{ id: " ", labels: c({ "en-gb": "Tab" }) },
|
|
585
|
-
{ id: "_", labels: c({ "en-gb": "Underscore" }) },
|
|
586
|
-
{ id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
|
|
587
|
-
{ id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
|
|
588
|
-
], De = (t = O) => {
|
|
589
|
-
const n = [];
|
|
590
|
-
for (const e of be) {
|
|
591
|
-
const r = L(e.labels, t);
|
|
592
|
-
n.push({ id: e.id, label: r ?? e.id });
|
|
593
|
-
}
|
|
594
|
-
return n;
|
|
595
|
-
}, O = "en-gb";
|
|
6
|
+
e({ "en-gb": "Application" }), e({ "en-gb": "Curated Dataset" }), e({ "en-gb": "Database" }), e({ "en-gb": "File Store" });
|
|
596
7
|
export {
|
|
597
|
-
|
|
598
|
-
me as CONNECTOR_SOURCE_OPERATIONS,
|
|
599
|
-
O as D,
|
|
600
|
-
ve as a,
|
|
601
|
-
Ce as b,
|
|
602
|
-
fe as c,
|
|
603
|
-
ge as connectorConfigSchema,
|
|
604
|
-
Oe as d,
|
|
605
|
-
De as e,
|
|
606
|
-
ye as f,
|
|
607
|
-
Ee as g,
|
|
608
|
-
Se as p,
|
|
609
|
-
xe as u
|
|
8
|
+
r as connectorConfigSchema
|
|
610
9
|
};
|