@datapos/datapos-shared 0.3.413 → 0.3.415

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,554 +0,0 @@
1
- let M;
2
- // @__NO_SIDE_EFFECTS__
3
- function w(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 F;
12
- // @__NO_SIDE_EFFECTS__
13
- function G(n) {
14
- return F?.get(n);
15
- }
16
- let R;
17
- // @__NO_SIDE_EFFECTS__
18
- function N(n) {
19
- return R?.get(n);
20
- }
21
- let T;
22
- // @__NO_SIDE_EFFECTS__
23
- function U(n, t) {
24
- return T?.get(n)?.get(t);
25
- }
26
- // @__NO_SIDE_EFFECTS__
27
- function O(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 y(n, t, e, s, i) {
32
- const r = i && "input" in i ? i.input : e.value, o = i?.expected ?? n.expects ?? null, c = i?.received ?? /* @__PURE__ */ O(r), l = {
33
- kind: n.kind,
34
- type: n.type,
35
- input: r,
36
- expected: o,
37
- received: c,
38
- message: `Invalid ${t}: ${o ? `Expected ${o} but r` : "R"}eceived ${c}`,
39
- requirement: n.requirement,
40
- path: i?.path,
41
- issues: i?.issues,
42
- lang: s.lang,
43
- abortEarly: s.abortEarly,
44
- abortPipeEarly: s.abortPipeEarly
45
- }, p = n.kind === "schema", f = i?.message ?? n.message ?? /* @__PURE__ */ U(n.reference, l.lang) ?? (p ? /* @__PURE__ */ N(l.lang) : null) ?? s.message ?? /* @__PURE__ */ G(l.lang);
46
- f !== void 0 && (l.message = typeof f == "function" ? f(l) : f), p && (e.typed = !1), e.issues ? e.issues.push(l) : e.issues = [l];
47
- }
48
- // @__NO_SIDE_EFFECTS__
49
- function d(n) {
50
- return {
51
- version: 1,
52
- vendor: "valibot",
53
- validate(t) {
54
- return n["~run"]({ value: t }, /* @__PURE__ */ w());
55
- }
56
- };
57
- }
58
- // @__NO_SIDE_EFFECTS__
59
- function V(n, t) {
60
- return Object.hasOwn(n, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
61
- }
62
- // @__NO_SIDE_EFFECTS__
63
- function z(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 X(n, t, e) {
69
- return typeof n.fallback == "function" ? n.fallback(t, e) : n.fallback;
70
- }
71
- // @__NO_SIDE_EFFECTS__
72
- function C(n, t, e) {
73
- return typeof n.default == "function" ? n.default(t, e) : n.default;
74
- }
75
- // @__NO_SIDE_EFFECTS__
76
- function v(n, t) {
77
- return {
78
- kind: "schema",
79
- type: "array",
80
- reference: v,
81
- expects: "Array",
82
- async: !1,
83
- item: n,
84
- message: t,
85
- get "~standard"() {
86
- return /* @__PURE__ */ d(this);
87
- },
88
- "~run"(e, s) {
89
- const i = e.value;
90
- if (Array.isArray(i)) {
91
- e.typed = !0, e.value = [];
92
- for (let r = 0; r < i.length; r++) {
93
- const o = i[r], c = this.item["~run"]({ value: o }, s);
94
- if (c.issues) {
95
- const l = {
96
- type: "array",
97
- origin: "value",
98
- input: i,
99
- key: r,
100
- value: o
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), s.abortEarly) {
105
- e.typed = !1;
106
- break;
107
- }
108
- }
109
- c.typed || (e.typed = !1), e.value.push(c.value);
110
- }
111
- } else y(this, "type", e, s);
112
- return e;
113
- }
114
- };
115
- }
116
- // @__NO_SIDE_EFFECTS__
117
- function q(n) {
118
- return {
119
- kind: "schema",
120
- type: "boolean",
121
- reference: q,
122
- expects: "boolean",
123
- async: !1,
124
- message: n,
125
- get "~standard"() {
126
- return /* @__PURE__ */ d(this);
127
- },
128
- "~run"(t, e) {
129
- return typeof t.value == "boolean" ? t.typed = !0 : y(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__ */ O(n),
140
- async: !1,
141
- literal: n,
142
- message: t,
143
- get "~standard"() {
144
- return /* @__PURE__ */ d(this);
145
- },
146
- "~run"(e, s) {
147
- return e.value === this.literal ? e.typed = !0 : y(this, "type", e, s), e;
148
- }
149
- };
150
- }
151
- // @__NO_SIDE_EFFECTS__
152
- function g(n, t) {
153
- return {
154
- kind: "schema",
155
- type: "nullable",
156
- reference: g,
157
- expects: `(${n.expects} | null)`,
158
- async: !1,
159
- wrapped: n,
160
- default: t,
161
- get "~standard"() {
162
- return /* @__PURE__ */ d(this);
163
- },
164
- "~run"(e, s) {
165
- return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ C(this, e, s)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
166
- }
167
- };
168
- }
169
- // @__NO_SIDE_EFFECTS__
170
- function S(n) {
171
- return {
172
- kind: "schema",
173
- type: "number",
174
- reference: S,
175
- expects: "number",
176
- async: !1,
177
- message: n,
178
- get "~standard"() {
179
- return /* @__PURE__ */ d(this);
180
- },
181
- "~run"(t, e) {
182
- return typeof t.value == "number" && !isNaN(t.value) ? t.typed = !0 : y(this, "type", t, e), t;
183
- }
184
- };
185
- }
186
- // @__NO_SIDE_EFFECTS__
187
- function b(n, t) {
188
- return {
189
- kind: "schema",
190
- type: "object",
191
- reference: b,
192
- expects: "Object",
193
- async: !1,
194
- entries: n,
195
- message: t,
196
- get "~standard"() {
197
- return /* @__PURE__ */ d(this);
198
- },
199
- "~run"(e, s) {
200
- const i = e.value;
201
- if (i && typeof i == "object") {
202
- e.typed = !0, e.value = {};
203
- for (const r in this.entries) {
204
- const o = this.entries[r];
205
- if (r in i || (o.type === "exact_optional" || o.type === "optional" || o.type === "nullish") && o.default !== void 0) {
206
- const c = r in i ? i[r] : /* @__PURE__ */ C(o), l = o["~run"]({ value: c }, s);
207
- if (l.issues) {
208
- const p = {
209
- type: "object",
210
- origin: "value",
211
- input: i,
212
- key: r,
213
- value: c
214
- };
215
- for (const f of l.issues)
216
- f.path ? f.path.unshift(p) : f.path = [p], e.issues?.push(f);
217
- if (e.issues || (e.issues = l.issues), s.abortEarly) {
218
- e.typed = !1;
219
- break;
220
- }
221
- }
222
- l.typed || (e.typed = !1), e.value[r] = l.value;
223
- } else if (o.fallback !== void 0) e.value[r] = /* @__PURE__ */ X(o);
224
- else if (o.type !== "exact_optional" && o.type !== "optional" && o.type !== "nullish" && (y(this, "key", e, s, {
225
- input: void 0,
226
- expected: `"${r}"`,
227
- path: [{
228
- type: "object",
229
- origin: "key",
230
- input: i,
231
- key: r,
232
- value: i[r]
233
- }]
234
- }), s.abortEarly))
235
- break;
236
- }
237
- } else y(this, "type", e, s);
238
- return e;
239
- }
240
- };
241
- }
242
- // @__NO_SIDE_EFFECTS__
243
- function m(n, t) {
244
- return {
245
- kind: "schema",
246
- type: "optional",
247
- reference: m,
248
- expects: `(${n.expects} | undefined)`,
249
- async: !1,
250
- wrapped: n,
251
- default: t,
252
- get "~standard"() {
253
- return /* @__PURE__ */ d(this);
254
- },
255
- "~run"(e, s) {
256
- return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ C(this, e, s)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
257
- }
258
- };
259
- }
260
- // @__NO_SIDE_EFFECTS__
261
- function J(n, t, e) {
262
- return {
263
- kind: "schema",
264
- type: "record",
265
- reference: J,
266
- expects: "Object",
267
- async: !1,
268
- key: n,
269
- value: t,
270
- message: e,
271
- get "~standard"() {
272
- return /* @__PURE__ */ d(this);
273
- },
274
- "~run"(s, i) {
275
- const r = s.value;
276
- if (r && typeof r == "object") {
277
- s.typed = !0, s.value = {};
278
- for (const o in r) if (/* @__PURE__ */ V(r, o)) {
279
- const c = r[o], l = this.key["~run"]({ value: o }, i);
280
- if (l.issues) {
281
- const f = {
282
- type: "object",
283
- origin: "key",
284
- input: r,
285
- key: o,
286
- value: c
287
- };
288
- for (const h of l.issues)
289
- h.path = [f], s.issues?.push(h);
290
- if (s.issues || (s.issues = l.issues), i.abortEarly) {
291
- s.typed = !1;
292
- break;
293
- }
294
- }
295
- const p = this.value["~run"]({ value: c }, i);
296
- if (p.issues) {
297
- const f = {
298
- type: "object",
299
- origin: "value",
300
- input: r,
301
- key: o,
302
- value: c
303
- };
304
- for (const h of p.issues)
305
- h.path ? h.path.unshift(f) : h.path = [f], s.issues?.push(h);
306
- if (s.issues || (s.issues = p.issues), i.abortEarly) {
307
- s.typed = !1;
308
- break;
309
- }
310
- }
311
- (!l.typed || !p.typed) && (s.typed = !1), l.typed && (s.value[l.value] = p.value);
312
- }
313
- } else y(this, "type", s, i);
314
- return s;
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__ */ d(this);
329
- },
330
- "~run"(t, e) {
331
- return typeof t.value == "string" ? t.typed = !0 : y(this, "type", t, e), t;
332
- }
333
- };
334
- }
335
- // @__NO_SIDE_EFFECTS__
336
- function _(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 A(n, t) {
343
- return {
344
- kind: "schema",
345
- type: "union",
346
- reference: A,
347
- expects: /* @__PURE__ */ z(n.map((e) => e.expects), "|"),
348
- async: !1,
349
- options: n,
350
- message: t,
351
- get "~standard"() {
352
- return /* @__PURE__ */ d(this);
353
- },
354
- "~run"(e, s) {
355
- let i, r, o;
356
- for (const c of this.options) {
357
- const l = c["~run"]({ value: e.value }, s);
358
- if (l.typed) if (l.issues) r ? r.push(l) : r = [l];
359
- else {
360
- i = l;
361
- break;
362
- }
363
- else o ? o.push(l) : o = [l];
364
- }
365
- if (i) return i;
366
- if (r) {
367
- if (r.length === 1) return r[0];
368
- y(this, "type", e, s, { issues: /* @__PURE__ */ _(r) }), e.typed = !0;
369
- } else {
370
- if (o?.length === 1) return o[0];
371
- y(this, "type", e, s, { issues: /* @__PURE__ */ _(o) });
372
- }
373
- return e;
374
- }
375
- };
376
- }
377
- const x = (n) => /* @__PURE__ */ A(n.map((t) => /* @__PURE__ */ k(t))), re = /* @__PURE__ */ b({
378
- "en-au": /* @__PURE__ */ a(),
379
- "en-gb": /* @__PURE__ */ a(),
380
- "en-us": /* @__PURE__ */ a(),
381
- "es-es": /* @__PURE__ */ a()
382
- }), E = /* @__PURE__ */ b({
383
- "en-au": /* @__PURE__ */ m(/* @__PURE__ */ a()),
384
- "en-gb": /* @__PURE__ */ m(/* @__PURE__ */ a()),
385
- "en-us": /* @__PURE__ */ m(/* @__PURE__ */ a()),
386
- "es-es": /* @__PURE__ */ m(/* @__PURE__ */ a())
387
- }), K = x(["amber", "green", "red", "other"]), B = x([
388
- "alpha",
389
- "beta",
390
- "generalAvailability",
391
- "notApplicable",
392
- "preAlpha",
393
- "proposed",
394
- "releaseCandidate",
395
- "unavailable",
396
- "underReview"
397
- ]), H = x([
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
- ]), Q = /* @__PURE__ */ b({
422
- id: /* @__PURE__ */ a(),
423
- color: K,
424
- label: /* @__PURE__ */ a()
425
- }), j = {
426
- id: /* @__PURE__ */ a(),
427
- label: E,
428
- description: E,
429
- firstCreatedAt: /* @__PURE__ */ m(/* @__PURE__ */ S()),
430
- icon: /* @__PURE__ */ g(/* @__PURE__ */ a()),
431
- iconDark: /* @__PURE__ */ g(/* @__PURE__ */ a()),
432
- lastUpdatedAt: /* @__PURE__ */ g(/* @__PURE__ */ S()),
433
- status: /* @__PURE__ */ g(Q),
434
- statusId: B
435
- }, ie = /* @__PURE__ */ b({
436
- ...j,
437
- typeId: H
438
- }), L = /* @__PURE__ */ b({
439
- id: /* @__PURE__ */ a(),
440
- label: E,
441
- description: E,
442
- icon: /* @__PURE__ */ g(/* @__PURE__ */ a()),
443
- iconDark: /* @__PURE__ */ g(/* @__PURE__ */ a()),
444
- order: /* @__PURE__ */ S(),
445
- path: /* @__PURE__ */ a()
446
- });
447
- x(["app", "engine", "connector", "context", "presenter", "tool"]);
448
- const P = {
449
- ...j,
450
- version: /* @__PURE__ */ a()
451
- }, W = x(["list"]), Y = /* @__PURE__ */ b({
452
- ...j,
453
- typeId: /* @__PURE__ */ k("contextModelGroup"),
454
- modelRefs: /* @__PURE__ */ v(L),
455
- order: /* @__PURE__ */ S()
456
- }), oe = /* @__PURE__ */ b({
457
- ...P,
458
- typeId: /* @__PURE__ */ k("context"),
459
- models: /* @__PURE__ */ v(Y),
460
- operations: /* @__PURE__ */ v(W)
461
- }), Z = x(["list", "render", "setColorMode"]), le = /* @__PURE__ */ b({
462
- ...P,
463
- typeId: /* @__PURE__ */ k("presenter"),
464
- presentations: /* @__PURE__ */ v(L),
465
- operations: /* @__PURE__ */ v(Z)
466
- });
467
- function ue() {
468
- return { render: $ };
469
- }
470
- function $(n, t, e) {
471
- e.textContent = "Cytoscape.js diagram goes here...";
472
- }
473
- function ae() {
474
- return { render: ee };
475
- }
476
- function ee(n, t) {
477
- console.log(1111, n), console.log(2222, t), console.log(3333, t.childNodes), console.log(4444, t.children);
478
- }
479
- const u = (n) => new Map(Object.entries(n)), I = (n, t, e = D) => {
480
- const s = n.get(t);
481
- if (s !== void 0) return s;
482
- if (e !== t)
483
- return n.get(e);
484
- }, ne = [
485
- { id: "dtv", labels: u({ "en-gb": "Delimited Text" }) },
486
- { id: "e/e", labels: u({ "en-gb": "Entity/Event" }) },
487
- { id: "jsonArray", labels: u({ "en-gb": "JSON Array" }) },
488
- { id: "spss", labels: u({ "en-gb": "SPSS" }) },
489
- { id: "xls", labels: u({ "en-gb": "XLS" }) },
490
- { id: "xlsx", labels: u({ "en-gb": "XLSX" }) },
491
- { id: "xml", labels: u({ "en-gb": "XML" }) }
492
- ], ce = (n = D) => {
493
- const t = [];
494
- for (const e of ne) {
495
- const s = I(e.labels, n);
496
- t.push({ id: e.id, label: s ?? e.id });
497
- }
498
- return t;
499
- }, te = [
500
- { id: `
501
- `, labels: u({ "en-gb": "Newline" }) },
502
- { id: "\r", labels: u({ "en-gb": "Carriage Return" }) },
503
- { id: `\r
504
- `, labels: u({ "en-gb": "Carriage Return/Newline" }) }
505
- ], pe = (n = D) => {
506
- const t = [];
507
- for (const e of te) {
508
- const s = I(e.labels, n);
509
- t.push({ id: e.id, label: s ?? e.id });
510
- }
511
- return t;
512
- }, se = [
513
- { id: ":", labels: u({ "en-gb": "Colon" }) },
514
- { id: ",", labels: u({ "en-gb": "Comma" }) },
515
- { id: "!", labels: u({ "en-gb": "Exclamation Mark" }) },
516
- // { 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 ''?
517
- { id: "0x1E", labels: u({ "en-gb": "Record Separator" }) },
518
- { id: ";", labels: u({ "en-gb": "Semicolon" }) },
519
- { id: " ", labels: u({ "en-gb": "Space" }) },
520
- { id: " ", labels: u({ "en-gb": "Tab" }) },
521
- { id: "_", labels: u({ "en-gb": "Underscore" }) },
522
- { id: "0x1F", labels: u({ "en-gb": "Unit Separator" }) },
523
- { id: "|", labels: u({ "en-gb": "Vertical Bar" }) }
524
- ], fe = (n = D) => {
525
- const t = [];
526
- for (const e of se) {
527
- const s = I(e.labels, n);
528
- t.push({ id: e.id, label: s ?? e.id });
529
- }
530
- return t;
531
- }, D = "en-gb";
532
- export {
533
- D,
534
- v as a,
535
- k as b,
536
- ie as c,
537
- m as d,
538
- S as e,
539
- re as f,
540
- q as g,
541
- oe as h,
542
- ae as i,
543
- ce as j,
544
- pe as k,
545
- x as l,
546
- P as m,
547
- g as n,
548
- b as o,
549
- le as p,
550
- fe as q,
551
- J as r,
552
- a as s,
553
- ue as u
554
- };