@datapos/datapos-shared 0.3.391 → 0.3.393

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,4 +1,5 @@
1
- import { componentConfigSchema as m } from "./datapos-shared.es.js";
1
+ import { a, g as e } from "./index-shYsk_2c.js";
2
2
  export {
3
- m as componentConfigSchema
3
+ a as componentConfigSchema,
4
+ e as getComponentStatus
4
5
  };
@@ -1,4 +1,4 @@
1
- import { connectorConfigSchema as r } from "./datapos-shared.es.js";
1
+ import { c as r } from "./index-shYsk_2c.js";
2
2
  const e = (a) => {
3
3
  const t = Object.entries(a).filter((n) => typeof n[1] == "string");
4
4
  return new Map(t);
@@ -1,581 +1,13 @@
1
- let M;
2
- // @__NO_SIDE_EFFECTS__
3
- function F(n) {
4
- return {
5
- lang: n?.lang ?? M?.lang,
6
- message: n?.message,
7
- abortEarly: n?.abortEarly ?? M?.abortEarly,
8
- abortPipeEarly: n?.abortPipeEarly ?? M?.abortPipeEarly
9
- };
10
- }
11
- let G;
12
- // @__NO_SIDE_EFFECTS__
13
- function N(n) {
14
- return G?.get(n);
15
- }
16
- let T;
17
- // @__NO_SIDE_EFFECTS__
18
- function V(n) {
19
- return T?.get(n);
20
- }
21
- let z;
22
- // @__NO_SIDE_EFFECTS__
23
- function X(n, t) {
24
- return z?.get(n)?.get(t);
25
- }
26
- // @__NO_SIDE_EFFECTS__
27
- function _(n) {
28
- const t = typeof n;
29
- return t === "string" ? `"${n}"` : t === "number" || t === "bigint" || t === "boolean" ? `${n}` : t === "object" || t === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : t;
30
- }
31
- function g(n, t, e, r, o) {
32
- const s = o && "input" in o ? o.input : e.value, i = o?.expected ?? n.expects ?? null, c = o?.received ?? /* @__PURE__ */ _(s), l = {
33
- kind: n.kind,
34
- type: n.type,
35
- input: s,
36
- expected: i,
37
- received: c,
38
- message: `Invalid ${t}: ${i ? `Expected ${i} but r` : "R"}eceived ${c}`,
39
- requirement: n.requirement,
40
- path: o?.path,
41
- issues: o?.issues,
42
- lang: r.lang,
43
- abortEarly: r.abortEarly,
44
- abortPipeEarly: r.abortPipeEarly
45
- }, p = n.kind === "schema", d = o?.message ?? n.message ?? /* @__PURE__ */ X(n.reference, l.lang) ?? (p ? /* @__PURE__ */ V(l.lang) : null) ?? r.message ?? /* @__PURE__ */ N(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(n) {
50
- return {
51
- version: 1,
52
- vendor: "valibot",
53
- validate(t) {
54
- return n["~run"]({ value: t }, /* @__PURE__ */ F());
55
- }
56
- };
57
- }
58
- // @__NO_SIDE_EFFECTS__
59
- function K(n, t) {
60
- return Object.hasOwn(n, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
61
- }
62
- // @__NO_SIDE_EFFECTS__
63
- function q(n, t) {
64
- const e = [...new Set(n)];
65
- return e.length > 1 ? `(${e.join(` ${t} `)})` : e[0] ?? "never";
66
- }
67
- // @__NO_SIDE_EFFECTS__
68
- function H(n, t, e) {
69
- return typeof n.fallback == "function" ? n.fallback(t, e) : n.fallback;
70
- }
71
- // @__NO_SIDE_EFFECTS__
72
- function j(n, t, e) {
73
- return typeof n.default == "function" ? n.default(t, e) : n.default;
74
- }
75
- // @__NO_SIDE_EFFECTS__
76
- function x(n, t) {
77
- return {
78
- kind: "schema",
79
- type: "array",
80
- reference: x,
81
- expects: "Array",
82
- async: !1,
83
- item: n,
84
- message: t,
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], c = this.item["~run"]({ value: i }, r);
94
- if (c.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 c.issues)
103
- p.path ? p.path.unshift(l) : p.path = [l], e.issues?.push(p);
104
- if (e.issues || (e.issues = c.issues), r.abortEarly) {
105
- e.typed = !1;
106
- break;
107
- }
108
- }
109
- c.typed || (e.typed = !1), e.value.push(c.value);
110
- }
111
- } else g(this, "type", e, r);
112
- return e;
113
- }
114
- };
115
- }
116
- // @__NO_SIDE_EFFECTS__
117
- function w(n) {
118
- return {
119
- kind: "schema",
120
- type: "boolean",
121
- reference: w,
122
- expects: "boolean",
123
- async: !1,
124
- message: n,
125
- get "~standard"() {
126
- return /* @__PURE__ */ h(this);
127
- },
128
- "~run"(t, e) {
129
- return typeof t.value == "boolean" ? t.typed = !0 : g(this, "type", t, e), t;
130
- }
131
- };
132
- }
133
- // @__NO_SIDE_EFFECTS__
134
- function C(n, t) {
135
- return {
136
- kind: "schema",
137
- type: "literal",
138
- reference: C,
139
- expects: /* @__PURE__ */ _(n),
140
- async: !1,
141
- literal: n,
142
- message: t,
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(n, t) {
153
- return {
154
- kind: "schema",
155
- type: "nullable",
156
- reference: y,
157
- expects: `(${n.expects} | null)`,
158
- async: !1,
159
- wrapped: n,
160
- default: t,
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 k(n) {
171
- return {
172
- kind: "schema",
173
- type: "number",
174
- reference: k,
175
- expects: "number",
176
- async: !1,
177
- message: n,
178
- get "~standard"() {
179
- return /* @__PURE__ */ h(this);
180
- },
181
- "~run"(t, e) {
182
- return typeof t.value == "number" && !isNaN(t.value) ? t.typed = !0 : g(this, "type", t, e), t;
183
- }
184
- };
185
- }
186
- // @__NO_SIDE_EFFECTS__
187
- function f(n, t) {
188
- return {
189
- kind: "schema",
190
- type: "object",
191
- reference: f,
192
- expects: "Object",
193
- async: !1,
194
- entries: n,
195
- message: t,
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 c = s in o ? o[s] : /* @__PURE__ */ j(i), l = i["~run"]({ value: c }, r);
207
- if (l.issues) {
208
- const p = {
209
- type: "object",
210
- origin: "value",
211
- input: o,
212
- key: s,
213
- value: c
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__ */ H(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(n, t) {
244
- return {
245
- kind: "schema",
246
- type: "optional",
247
- reference: b,
248
- expects: `(${n.expects} | undefined)`,
249
- async: !1,
250
- wrapped: n,
251
- default: t,
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 I(n, t, e) {
262
- return {
263
- kind: "schema",
264
- type: "record",
265
- reference: I,
266
- expects: "Object",
267
- async: !1,
268
- key: n,
269
- value: t,
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__ */ K(s, i)) {
279
- const c = 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: c
287
- };
288
- for (const S of l.issues)
289
- S.path = [d], r.issues?.push(S);
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: c }, o);
296
- if (p.issues) {
297
- const d = {
298
- type: "object",
299
- origin: "value",
300
- input: s,
301
- key: i,
302
- value: c
303
- };
304
- for (const S of p.issues)
305
- S.path ? S.path.unshift(d) : S.path = [d], r.issues?.push(S);
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(n) {
320
- return {
321
- kind: "schema",
322
- type: "string",
323
- reference: a,
324
- expects: "string",
325
- async: !1,
326
- message: n,
327
- get "~standard"() {
328
- return /* @__PURE__ */ h(this);
329
- },
330
- "~run"(t, e) {
331
- return typeof t.value == "string" ? t.typed = !0 : g(this, "type", t, e), t;
332
- }
333
- };
334
- }
335
- // @__NO_SIDE_EFFECTS__
336
- function R(n) {
337
- let t;
338
- if (n) for (const e of n) t ? t.push(...e.issues) : t = e.issues;
339
- return t;
340
- }
341
- // @__NO_SIDE_EFFECTS__
342
- function P(n, t) {
343
- return {
344
- kind: "schema",
345
- type: "union",
346
- reference: P,
347
- expects: /* @__PURE__ */ q(n.map((e) => e.expects), "|"),
348
- async: !1,
349
- options: n,
350
- message: t,
351
- get "~standard"() {
352
- return /* @__PURE__ */ h(this);
353
- },
354
- "~run"(e, r) {
355
- let o, s, i;
356
- for (const c of this.options) {
357
- const l = c["~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__ */ R(s) }), e.typed = !0;
369
- } else {
370
- if (i?.length === 1) return i[0];
371
- g(this, "type", e, r, { issues: /* @__PURE__ */ R(i) });
372
- }
373
- return e;
374
- }
375
- };
376
- }
377
- const m = (n) => /* @__PURE__ */ P(n.map((t) => /* @__PURE__ */ C(t))), J = /* @__PURE__ */ f({
378
- "en-au": /* @__PURE__ */ a(),
379
- "en-gb": /* @__PURE__ */ a(),
380
- "en-us": /* @__PURE__ */ a(),
381
- "es-es": /* @__PURE__ */ a()
382
- }), E = /* @__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
- }), B = m(["amber", "green", "red", "other"]), Q = m([
388
- "alpha",
389
- "beta",
390
- "generalAvailability",
391
- "notApplicable",
392
- "preAlpha",
393
- "proposed",
394
- "releaseCandidate",
395
- "unavailable",
396
- "underReview"
397
- ]), W = 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
- ]), Y = /* @__PURE__ */ f({
422
- id: /* @__PURE__ */ a(),
423
- color: B,
424
- label: /* @__PURE__ */ a()
425
- }), O = {
426
- id: /* @__PURE__ */ a(),
427
- label: E,
428
- description: E,
429
- firstCreatedAt: /* @__PURE__ */ b(/* @__PURE__ */ k()),
430
- icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
431
- iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
432
- lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ k()),
433
- status: /* @__PURE__ */ y(Y),
434
- statusId: Q
435
- }, pe = /* @__PURE__ */ f({
436
- ...O,
437
- typeId: W
438
- }), U = /* @__PURE__ */ f({
439
- id: /* @__PURE__ */ a(),
440
- label: E,
441
- description: E,
442
- icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
443
- iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
444
- order: /* @__PURE__ */ k(),
445
- path: /* @__PURE__ */ a()
446
- }), v = (n) => {
447
- const t = Object.entries(n).filter((e) => typeof e[1] == "string");
448
- return new Map(t);
449
- };
450
- v({ "en-gb": "alpha" }), v({ "en-gb": "beta" }), v({ "en-gb": "" }), v({ "en-gb": "not-applicable" }), v({ "en-gb": "pre-alpha" }), v({ "en-gb": "proposed" }), v({ "en-gb": "release-candidate" }), v({ "en-gb": "unavailable" }), v({ "en-gb": "under-review" });
451
- m(["app", "engine", "connector", "context", "presenter", "tool"]);
452
- const A = {
453
- ...O,
454
- version: /* @__PURE__ */ a()
455
- }, Z = m(["apiKey", "disabled", "oAuth2", "none"]), $ = /* @__PURE__ */ f({
456
- authMethodId: Z,
457
- activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ k()),
458
- canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ w()),
459
- id: /* @__PURE__ */ b(/* @__PURE__ */ a()),
460
- label: /* @__PURE__ */ b(J),
461
- maxConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ k()),
462
- params: /* @__PURE__ */ b(/* @__PURE__ */ x(/* @__PURE__ */ I(/* @__PURE__ */ a(), /* @__PURE__ */ a())))
463
- }), ee = m(["application", "curatedDataset", "database", "fileStore"]), ne = m([
464
- "abortOperation",
465
- "authenticateConnection",
466
- "createObject",
467
- "describeConnection",
468
- "dropObject",
469
- "findObject",
470
- "getReadableStream",
471
- "getRecord",
472
- "listNodes",
473
- "previewObject",
474
- "removeRecords",
475
- "retrieveChunks",
476
- "retrieveRecords",
477
- "upsertRecords"
478
- ]), te = m(["bidirectional", "destination", "source", "unknown"]), de = /* @__PURE__ */ f({
479
- ...A,
480
- typeId: /* @__PURE__ */ C("connector"),
481
- category: /* @__PURE__ */ y(/* @__PURE__ */ f({ id: /* @__PURE__ */ a(), label: /* @__PURE__ */ a() })),
482
- categoryId: ee,
483
- implementations: /* @__PURE__ */ I(/* @__PURE__ */ a(), $),
484
- operations: /* @__PURE__ */ x(ne),
485
- usageId: te,
486
- vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
487
- vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
488
- vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ a())
489
- }), re = m(["list"]), se = /* @__PURE__ */ f({
490
- ...O,
491
- typeId: /* @__PURE__ */ C("contextModelGroup"),
492
- modelRefs: /* @__PURE__ */ x(U),
493
- order: /* @__PURE__ */ k()
494
- }), be = /* @__PURE__ */ f({
495
- ...A,
496
- typeId: /* @__PURE__ */ C("context"),
497
- models: /* @__PURE__ */ x(se),
498
- operations: /* @__PURE__ */ x(re)
499
- }), oe = m(["list", "render", "setColorMode"]), fe = /* @__PURE__ */ f({
500
- ...A,
501
- typeId: /* @__PURE__ */ C("presenter"),
502
- presentations: /* @__PURE__ */ x(U),
503
- operations: /* @__PURE__ */ x(oe)
504
- });
505
- function ye() {
506
- return { render: ie };
507
- }
508
- function ie(n, t, e) {
509
- e.textContent = "Cytoscape.js diagram goes here...";
510
- }
511
- function ge() {
512
- return { render: le };
513
- }
514
- function le(n, t) {
515
- console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
516
- }
517
- const u = (n) => new Map(Object.entries(n)), L = (n, t, e = D) => {
518
- const r = n.get(t);
519
- if (r !== void 0) return r;
520
- if (e !== t)
521
- return n.get(e);
522
- }, ae = [
523
- { id: "dtv", labels: u({ "en-gb": "Delimited Text" }) },
524
- { id: "e/e", labels: u({ "en-gb": "Entity/Event" }) },
525
- { id: "jsonArray", labels: u({ "en-gb": "JSON Array" }) },
526
- { id: "spss", labels: u({ "en-gb": "SPSS" }) },
527
- { id: "xls", labels: u({ "en-gb": "XLS" }) },
528
- { id: "xlsx", labels: u({ "en-gb": "XLSX" }) },
529
- { id: "xml", labels: u({ "en-gb": "XML" }) }
530
- ], he = (n = D) => {
531
- const t = [];
532
- for (const e of ae) {
533
- const r = L(e.labels, n);
534
- t.push({ id: e.id, label: r ?? e.id });
535
- }
536
- return t;
537
- }, ue = [
538
- { id: `
539
- `, labels: u({ "en-gb": "Newline" }) },
540
- { id: "\r", labels: u({ "en-gb": "Carriage Return" }) },
541
- { id: `\r
542
- `, labels: u({ "en-gb": "Carriage Return/Newline" }) }
543
- ], me = (n = D) => {
544
- const t = [];
545
- for (const e of ue) {
546
- const r = L(e.labels, n);
547
- t.push({ id: e.id, label: r ?? e.id });
548
- }
549
- return t;
550
- }, ce = [
551
- { id: ":", labels: u({ "en-gb": "Colon" }) },
552
- { id: ",", labels: u({ "en-gb": "Comma" }) },
553
- { id: "!", labels: u({ "en-gb": "Exclamation Mark" }) },
554
- // { 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 ''?
555
- { id: "0x1E", labels: u({ "en-gb": "Record Separator" }) },
556
- { id: ";", labels: u({ "en-gb": "Semicolon" }) },
557
- { id: " ", labels: u({ "en-gb": "Space" }) },
558
- { id: " ", labels: u({ "en-gb": "Tab" }) },
559
- { id: "_", labels: u({ "en-gb": "Underscore" }) },
560
- { id: "0x1F", labels: u({ "en-gb": "Unit Separator" }) },
561
- { id: "|", labels: u({ "en-gb": "Vertical Bar" }) }
562
- ], ve = (n = D) => {
563
- const t = [];
564
- for (const e of ce) {
565
- const r = L(e.labels, n);
566
- t.push({ id: e.id, label: r ?? e.id });
567
- }
568
- return t;
569
- }, D = "en-gb";
1
+ import { D as s, a as t, c as o, b as c, e as n, f as m, h as r, p as i, u as g, d as C } from "./index-shYsk_2c.js";
570
2
  export {
571
- D as DEFAULT_LOCALE_CODE,
572
- pe as componentConfigSchema,
573
- de as connectorConfigSchema,
574
- be as contextConfigSchema,
575
- he as getDataFormats,
576
- me as getRecordDelimiters,
577
- ve as getValueDelimiters,
578
- fe as presenterConfigSchema,
579
- ye as useCytoscapeJS,
580
- ge as useDataTable
3
+ s as DEFAULT_LOCALE_CODE,
4
+ t as componentConfigSchema,
5
+ o as connectorConfigSchema,
6
+ c as contextConfigSchema,
7
+ n as getDataFormats,
8
+ m as getRecordDelimiters,
9
+ r as getValueDelimiters,
10
+ i as presenterConfigSchema,
11
+ g as useCytoscapeJS,
12
+ C as useDataTable
581
13
  };
@@ -0,0 +1,607 @@
1
+ let M;
2
+ // @__NO_SIDE_EFFECTS__
3
+ function G(n) {
4
+ return {
5
+ lang: n?.lang ?? M?.lang,
6
+ message: n?.message,
7
+ abortEarly: n?.abortEarly ?? M?.abortEarly,
8
+ abortPipeEarly: n?.abortPipeEarly ?? M?.abortPipeEarly
9
+ };
10
+ }
11
+ let N;
12
+ // @__NO_SIDE_EFFECTS__
13
+ function T(n) {
14
+ return N?.get(n);
15
+ }
16
+ let z;
17
+ // @__NO_SIDE_EFFECTS__
18
+ function V(n) {
19
+ return z?.get(n);
20
+ }
21
+ let X;
22
+ // @__NO_SIDE_EFFECTS__
23
+ function K(n, t) {
24
+ return X?.get(n)?.get(t);
25
+ }
26
+ // @__NO_SIDE_EFFECTS__
27
+ function w(n) {
28
+ const t = typeof n;
29
+ return t === "string" ? `"${n}"` : t === "number" || t === "bigint" || t === "boolean" ? `${n}` : t === "object" || t === "function" ? (n && Object.getPrototypeOf(n)?.constructor?.name) ?? "null" : t;
30
+ }
31
+ function g(n, t, e, r, o) {
32
+ const s = o && "input" in o ? o.input : e.value, i = o?.expected ?? n.expects ?? null, c = o?.received ?? /* @__PURE__ */ w(s), l = {
33
+ kind: n.kind,
34
+ type: n.type,
35
+ input: s,
36
+ expected: i,
37
+ received: c,
38
+ message: `Invalid ${t}: ${i ? `Expected ${i} but r` : "R"}eceived ${c}`,
39
+ requirement: n.requirement,
40
+ path: o?.path,
41
+ issues: o?.issues,
42
+ lang: r.lang,
43
+ abortEarly: r.abortEarly,
44
+ abortPipeEarly: r.abortPipeEarly
45
+ }, p = n.kind === "schema", d = o?.message ?? n.message ?? /* @__PURE__ */ K(n.reference, l.lang) ?? (p ? /* @__PURE__ */ V(l.lang) : null) ?? r.message ?? /* @__PURE__ */ T(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(n) {
50
+ return {
51
+ version: 1,
52
+ vendor: "valibot",
53
+ validate(t) {
54
+ return n["~run"]({ value: t }, /* @__PURE__ */ G());
55
+ }
56
+ };
57
+ }
58
+ // @__NO_SIDE_EFFECTS__
59
+ function q(n, t) {
60
+ return Object.hasOwn(n, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
61
+ }
62
+ // @__NO_SIDE_EFFECTS__
63
+ function H(n, t) {
64
+ const e = [...new Set(n)];
65
+ return e.length > 1 ? `(${e.join(` ${t} `)})` : e[0] ?? "never";
66
+ }
67
+ // @__NO_SIDE_EFFECTS__
68
+ function J(n, t, e) {
69
+ return typeof n.fallback == "function" ? n.fallback(t, e) : n.fallback;
70
+ }
71
+ // @__NO_SIDE_EFFECTS__
72
+ function j(n, t, e) {
73
+ return typeof n.default == "function" ? n.default(t, e) : n.default;
74
+ }
75
+ // @__NO_SIDE_EFFECTS__
76
+ function S(n, t) {
77
+ return {
78
+ kind: "schema",
79
+ type: "array",
80
+ reference: S,
81
+ expects: "Array",
82
+ async: !1,
83
+ item: n,
84
+ message: t,
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], c = this.item["~run"]({ value: i }, r);
94
+ if (c.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 c.issues)
103
+ p.path ? p.path.unshift(l) : p.path = [l], e.issues?.push(p);
104
+ if (e.issues || (e.issues = c.issues), r.abortEarly) {
105
+ e.typed = !1;
106
+ break;
107
+ }
108
+ }
109
+ c.typed || (e.typed = !1), e.value.push(c.value);
110
+ }
111
+ } else g(this, "type", e, r);
112
+ return e;
113
+ }
114
+ };
115
+ }
116
+ // @__NO_SIDE_EFFECTS__
117
+ function P(n) {
118
+ return {
119
+ kind: "schema",
120
+ type: "boolean",
121
+ reference: P,
122
+ expects: "boolean",
123
+ async: !1,
124
+ message: n,
125
+ get "~standard"() {
126
+ return /* @__PURE__ */ h(this);
127
+ },
128
+ "~run"(t, e) {
129
+ return typeof t.value == "boolean" ? t.typed = !0 : g(this, "type", t, e), t;
130
+ }
131
+ };
132
+ }
133
+ // @__NO_SIDE_EFFECTS__
134
+ function k(n, t) {
135
+ return {
136
+ kind: "schema",
137
+ type: "literal",
138
+ reference: k,
139
+ expects: /* @__PURE__ */ w(n),
140
+ async: !1,
141
+ literal: n,
142
+ message: t,
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(n, t) {
153
+ return {
154
+ kind: "schema",
155
+ type: "nullable",
156
+ reference: y,
157
+ expects: `(${n.expects} | null)`,
158
+ async: !1,
159
+ wrapped: n,
160
+ default: t,
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(n) {
171
+ return {
172
+ kind: "schema",
173
+ type: "number",
174
+ reference: C,
175
+ expects: "number",
176
+ async: !1,
177
+ message: n,
178
+ get "~standard"() {
179
+ return /* @__PURE__ */ h(this);
180
+ },
181
+ "~run"(t, e) {
182
+ return typeof t.value == "number" && !isNaN(t.value) ? t.typed = !0 : g(this, "type", t, e), t;
183
+ }
184
+ };
185
+ }
186
+ // @__NO_SIDE_EFFECTS__
187
+ function f(n, t) {
188
+ return {
189
+ kind: "schema",
190
+ type: "object",
191
+ reference: f,
192
+ expects: "Object",
193
+ async: !1,
194
+ entries: n,
195
+ message: t,
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 c = s in o ? o[s] : /* @__PURE__ */ j(i), l = i["~run"]({ value: c }, r);
207
+ if (l.issues) {
208
+ const p = {
209
+ type: "object",
210
+ origin: "value",
211
+ input: o,
212
+ key: s,
213
+ value: c
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(n, t) {
244
+ return {
245
+ kind: "schema",
246
+ type: "optional",
247
+ reference: b,
248
+ expects: `(${n.expects} | undefined)`,
249
+ async: !1,
250
+ wrapped: n,
251
+ default: t,
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 I(n, t, e) {
262
+ return {
263
+ kind: "schema",
264
+ type: "record",
265
+ reference: I,
266
+ expects: "Object",
267
+ async: !1,
268
+ key: n,
269
+ value: t,
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 c = 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: c
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: c }, o);
296
+ if (p.issues) {
297
+ const d = {
298
+ type: "object",
299
+ origin: "value",
300
+ input: s,
301
+ key: i,
302
+ value: c
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(n) {
320
+ return {
321
+ kind: "schema",
322
+ type: "string",
323
+ reference: a,
324
+ expects: "string",
325
+ async: !1,
326
+ message: n,
327
+ get "~standard"() {
328
+ return /* @__PURE__ */ h(this);
329
+ },
330
+ "~run"(t, e) {
331
+ return typeof t.value == "string" ? t.typed = !0 : g(this, "type", t, e), t;
332
+ }
333
+ };
334
+ }
335
+ // @__NO_SIDE_EFFECTS__
336
+ function R(n) {
337
+ let t;
338
+ if (n) for (const e of n) t ? t.push(...e.issues) : t = e.issues;
339
+ return t;
340
+ }
341
+ // @__NO_SIDE_EFFECTS__
342
+ function U(n, t) {
343
+ return {
344
+ kind: "schema",
345
+ type: "union",
346
+ reference: U,
347
+ expects: /* @__PURE__ */ H(n.map((e) => e.expects), "|"),
348
+ async: !1,
349
+ options: n,
350
+ message: t,
351
+ get "~standard"() {
352
+ return /* @__PURE__ */ h(this);
353
+ },
354
+ "~run"(e, r) {
355
+ let o, s, i;
356
+ for (const c of this.options) {
357
+ const l = c["~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__ */ R(s) }), e.typed = !0;
369
+ } else {
370
+ if (i?.length === 1) return i[0];
371
+ g(this, "type", e, r, { issues: /* @__PURE__ */ R(i) });
372
+ }
373
+ return e;
374
+ }
375
+ };
376
+ }
377
+ const m = (n) => /* @__PURE__ */ U(n.map((t) => /* @__PURE__ */ k(t))), B = /* @__PURE__ */ f({
378
+ "en-au": /* @__PURE__ */ a(),
379
+ "en-gb": /* @__PURE__ */ a(),
380
+ "en-us": /* @__PURE__ */ a(),
381
+ "es-es": /* @__PURE__ */ a()
382
+ }), D = /* @__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
+ ]), Z = /* @__PURE__ */ f({
422
+ id: /* @__PURE__ */ a(),
423
+ color: Q,
424
+ label: /* @__PURE__ */ a()
425
+ }), L = {
426
+ id: /* @__PURE__ */ a(),
427
+ label: D,
428
+ description: D,
429
+ firstCreatedAt: /* @__PURE__ */ b(/* @__PURE__ */ C()),
430
+ icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
431
+ iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
432
+ lastUpdatedAt: /* @__PURE__ */ y(/* @__PURE__ */ C()),
433
+ status: /* @__PURE__ */ y(Z),
434
+ statusId: W
435
+ }, be = /* @__PURE__ */ f({
436
+ ...L,
437
+ typeId: Y
438
+ }), F = /* @__PURE__ */ f({
439
+ id: /* @__PURE__ */ a(),
440
+ label: D,
441
+ description: D,
442
+ icon: /* @__PURE__ */ y(/* @__PURE__ */ a()),
443
+ iconDark: /* @__PURE__ */ y(/* @__PURE__ */ a()),
444
+ order: /* @__PURE__ */ C(),
445
+ path: /* @__PURE__ */ a()
446
+ }), _ = [
447
+ { id: "alpha", color: "red", labels: v({ "en-gb": "alpha" }) },
448
+ { id: "beta", color: "amber", labels: v({ "en-gb": "beta" }) },
449
+ { id: "generalAvailability", color: "green", labels: v({ "en-gb": "" }) },
450
+ { id: "notApplicable", color: "green", labels: v({ "en-gb": "not-applicable" }) },
451
+ { id: "preAlpha", color: "red", labels: v({ "en-gb": "pre-alpha" }) },
452
+ { id: "proposed", color: "other", labels: v({ "en-gb": "proposed" }) },
453
+ { id: "releaseCandidate", color: "green", labels: v({ "en-gb": "release-candidate" }) },
454
+ { id: "unavailable", color: "other", labels: v({ "en-gb": "unavailable" }) },
455
+ { id: "underReview", color: "other", labels: v({ "en-gb": "under-review" }) }
456
+ ];
457
+ function v(n) {
458
+ const t = Object.entries(n).filter((e) => typeof e[1] == "string");
459
+ return new Map(t);
460
+ }
461
+ function fe(n, t = E) {
462
+ console.log(1111, _);
463
+ const e = _.find((r) => r.id === n);
464
+ if (e) {
465
+ const r = $(e.labels, t);
466
+ return { id: e.id, color: e.color, label: r ?? e.id };
467
+ }
468
+ return { id: n, color: "other", label: n };
469
+ }
470
+ function $(n, t, e = E) {
471
+ const r = n.get(t);
472
+ if (r != null) return r;
473
+ if (e !== t)
474
+ return n.get(e);
475
+ }
476
+ m(["app", "engine", "connector", "context", "presenter", "tool"]);
477
+ const O = {
478
+ ...L,
479
+ version: /* @__PURE__ */ a()
480
+ }, ee = m(["apiKey", "disabled", "oAuth2", "none"]), ne = /* @__PURE__ */ f({
481
+ authMethodId: ee,
482
+ activeConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ C()),
483
+ canDescribe: /* @__PURE__ */ b(/* @__PURE__ */ P()),
484
+ id: /* @__PURE__ */ b(/* @__PURE__ */ a()),
485
+ label: /* @__PURE__ */ b(B),
486
+ maxConnectionCount: /* @__PURE__ */ b(/* @__PURE__ */ C()),
487
+ params: /* @__PURE__ */ b(/* @__PURE__ */ S(/* @__PURE__ */ I(/* @__PURE__ */ a(), /* @__PURE__ */ a())))
488
+ }), te = m(["application", "curatedDataset", "database", "fileStore"]), re = m([
489
+ "abortOperation",
490
+ "authenticateConnection",
491
+ "createObject",
492
+ "describeConnection",
493
+ "dropObject",
494
+ "findObject",
495
+ "getReadableStream",
496
+ "getRecord",
497
+ "listNodes",
498
+ "previewObject",
499
+ "removeRecords",
500
+ "retrieveChunks",
501
+ "retrieveRecords",
502
+ "upsertRecords"
503
+ ]), se = m(["bidirectional", "destination", "source", "unknown"]), ye = /* @__PURE__ */ f({
504
+ ...O,
505
+ typeId: /* @__PURE__ */ k("connector"),
506
+ category: /* @__PURE__ */ y(/* @__PURE__ */ f({ id: /* @__PURE__ */ a(), label: /* @__PURE__ */ a() })),
507
+ categoryId: te,
508
+ implementations: /* @__PURE__ */ I(/* @__PURE__ */ a(), ne),
509
+ operations: /* @__PURE__ */ S(re),
510
+ usageId: se,
511
+ vendorAccountURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
512
+ vendorDocumentationURL: /* @__PURE__ */ y(/* @__PURE__ */ a()),
513
+ vendorHomeURL: /* @__PURE__ */ y(/* @__PURE__ */ a())
514
+ }), oe = m(["list"]), ie = /* @__PURE__ */ f({
515
+ ...L,
516
+ typeId: /* @__PURE__ */ k("contextModelGroup"),
517
+ modelRefs: /* @__PURE__ */ S(F),
518
+ order: /* @__PURE__ */ C()
519
+ }), ge = /* @__PURE__ */ f({
520
+ ...O,
521
+ typeId: /* @__PURE__ */ k("context"),
522
+ models: /* @__PURE__ */ S(ie),
523
+ operations: /* @__PURE__ */ S(oe)
524
+ }), le = m(["list", "render", "setColorMode"]), he = /* @__PURE__ */ f({
525
+ ...O,
526
+ typeId: /* @__PURE__ */ k("presenter"),
527
+ presentations: /* @__PURE__ */ S(F),
528
+ operations: /* @__PURE__ */ S(le)
529
+ });
530
+ function me() {
531
+ return { render: ae };
532
+ }
533
+ function ae(n, t, e) {
534
+ e.textContent = "Cytoscape.js diagram goes here...";
535
+ }
536
+ function ve() {
537
+ return { render: ue };
538
+ }
539
+ function ue(n, t) {
540
+ console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
541
+ }
542
+ const u = (n) => new Map(Object.entries(n)), A = (n, t, e = E) => {
543
+ const r = n.get(t);
544
+ if (r !== void 0) return r;
545
+ if (e !== t)
546
+ return n.get(e);
547
+ }, ce = [
548
+ { id: "dtv", labels: u({ "en-gb": "Delimited Text" }) },
549
+ { id: "e/e", labels: u({ "en-gb": "Entity/Event" }) },
550
+ { id: "jsonArray", labels: u({ "en-gb": "JSON Array" }) },
551
+ { id: "spss", labels: u({ "en-gb": "SPSS" }) },
552
+ { id: "xls", labels: u({ "en-gb": "XLS" }) },
553
+ { id: "xlsx", labels: u({ "en-gb": "XLSX" }) },
554
+ { id: "xml", labels: u({ "en-gb": "XML" }) }
555
+ ], Se = (n = E) => {
556
+ const t = [];
557
+ for (const e of ce) {
558
+ const r = A(e.labels, n);
559
+ t.push({ id: e.id, label: r ?? e.id });
560
+ }
561
+ return t;
562
+ }, pe = [
563
+ { id: `
564
+ `, labels: u({ "en-gb": "Newline" }) },
565
+ { id: "\r", labels: u({ "en-gb": "Carriage Return" }) },
566
+ { id: `\r
567
+ `, labels: u({ "en-gb": "Carriage Return/Newline" }) }
568
+ ], xe = (n = E) => {
569
+ const t = [];
570
+ for (const e of pe) {
571
+ const r = A(e.labels, n);
572
+ t.push({ id: e.id, label: r ?? e.id });
573
+ }
574
+ return t;
575
+ }, de = [
576
+ { id: ":", labels: u({ "en-gb": "Colon" }) },
577
+ { id: ",", labels: u({ "en-gb": "Comma" }) },
578
+ { id: "!", labels: u({ "en-gb": "Exclamation Mark" }) },
579
+ // { 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 ''?
580
+ { id: "0x1E", labels: u({ "en-gb": "Record Separator" }) },
581
+ { id: ";", labels: u({ "en-gb": "Semicolon" }) },
582
+ { id: " ", labels: u({ "en-gb": "Space" }) },
583
+ { id: " ", labels: u({ "en-gb": "Tab" }) },
584
+ { id: "_", labels: u({ "en-gb": "Underscore" }) },
585
+ { id: "0x1F", labels: u({ "en-gb": "Unit Separator" }) },
586
+ { id: "|", labels: u({ "en-gb": "Vertical Bar" }) }
587
+ ], Ce = (n = E) => {
588
+ const t = [];
589
+ for (const e of de) {
590
+ const r = A(e.labels, n);
591
+ t.push({ id: e.id, label: r ?? e.id });
592
+ }
593
+ return t;
594
+ }, E = "en-gb";
595
+ export {
596
+ E as D,
597
+ be as a,
598
+ ge as b,
599
+ ye as c,
600
+ ve as d,
601
+ Se as e,
602
+ xe as f,
603
+ fe as g,
604
+ Ce as h,
605
+ he as p,
606
+ me as u
607
+ };
@@ -1,15 +1,17 @@
1
1
  import { InferOutput } from 'valibot';
2
2
  import { componentConfigSchema, componentStatusColorIdSchema, componentStatusIdSchema, componentStatusSchema, componentTypeIdSchema } from './componentConfig.schema';
3
- import { LocalisedString } from '../index';
3
+ import { LocaleCode, LocalisedString } from '../index';
4
4
  /** Component. */
5
5
  interface Component {
6
6
  readonly config: ComponentConfig;
7
7
  }
8
+ /** Component configuration. */
8
9
  type ComponentConfig = InferOutput<typeof componentConfigSchema>;
9
10
  type ComponentStatus = InferOutput<typeof componentStatusSchema>;
10
11
  type ComponentStatusColorId = InferOutput<typeof componentStatusColorIdSchema>;
11
12
  type ComponentStatusId = InferOutput<typeof componentStatusIdSchema>;
12
13
  type ComponentTypeId = InferOutput<typeof componentTypeIdSchema>;
14
+ /** Component reference. */
13
15
  interface ComponentReference {
14
16
  id: string;
15
17
  label: Partial<LocalisedString>;
@@ -19,7 +21,9 @@ interface ComponentReference {
19
21
  order: number;
20
22
  path: string;
21
23
  }
24
+ declare function getComponentStatus(id: string, localeId?: LocaleCode): ComponentStatus;
22
25
  /** Exports */
23
- export type { Component, ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ComponentStatusColorId };
26
+ export { getComponentStatus };
24
27
  export { componentConfigSchema } from './componentConfig.schema';
28
+ export type { Component, ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ComponentStatusColorId };
25
29
  export type { ModuleConfig, ModuleTypeId } from './module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datapos/datapos-shared",
3
- "version": "0.3.391",
3
+ "version": "0.3.393",
4
4
  "description": "A library containing common constants, types and utilities used across all Data Positioning projects.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",