@datapos/datapos-shared 0.3.332 → 0.3.333
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.es.js +24 -23
- package/dist/types/src/component/context/index.d.ts +1 -1
- package/dist/types/src/component/dataView/index.d.ts +6 -6
- package/dist/types/src/component/index.d.ts +1 -1
- package/dist/types/src/composables/useCytoscapeJS.d.ts +1 -1
- package/dist/types/src/composables/useDataTable.d.ts +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/locales.d.ts +7 -0
- package/package.json +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const D = "en-gb";
|
|
1
2
|
let j;
|
|
2
3
|
// @__NO_SIDE_EFFECTS__
|
|
3
4
|
function H(e) {
|
|
@@ -131,11 +132,11 @@ function B(e) {
|
|
|
131
132
|
};
|
|
132
133
|
}
|
|
133
134
|
// @__NO_SIDE_EFFECTS__
|
|
134
|
-
function
|
|
135
|
+
function w(e, r) {
|
|
135
136
|
return {
|
|
136
137
|
kind: "schema",
|
|
137
138
|
type: "literal",
|
|
138
|
-
reference:
|
|
139
|
+
reference: w,
|
|
139
140
|
expects: /* @__PURE__ */ U(e),
|
|
140
141
|
async: !1,
|
|
141
142
|
literal: e,
|
|
@@ -374,7 +375,7 @@ function G(e, r) {
|
|
|
374
375
|
}
|
|
375
376
|
};
|
|
376
377
|
}
|
|
377
|
-
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */
|
|
378
|
+
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ w(r))), te = /* @__PURE__ */ b({
|
|
378
379
|
"en-au": /* @__PURE__ */ l(),
|
|
379
380
|
"en-gb": /* @__PURE__ */ l(),
|
|
380
381
|
"en-us": /* @__PURE__ */ l(),
|
|
@@ -451,7 +452,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
451
452
|
}), E = (e) => {
|
|
452
453
|
const r = Object.entries(e).filter((t) => typeof t[1] == "string");
|
|
453
454
|
return new Map(r);
|
|
454
|
-
}, ie = (e, r, t =
|
|
455
|
+
}, ie = (e, r, t = D) => {
|
|
455
456
|
const n = e.get(r);
|
|
456
457
|
if (n !== void 0) return n;
|
|
457
458
|
if (t !== r)
|
|
@@ -466,7 +467,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
466
467
|
{ id: "releaseCandidate", color: "green", labels: E({ "en-gb": "release-candidate" }) },
|
|
467
468
|
{ id: "unavailable", color: "other", labels: E({ "en-gb": "unavailable" }) },
|
|
468
469
|
{ id: "underReview", color: "other", labels: E({ "en-gb": "under-review" }) }
|
|
469
|
-
], ke = (e, r =
|
|
470
|
+
], ke = (e, r = D) => {
|
|
470
471
|
const t = ae.find((n) => n.id === e);
|
|
471
472
|
if (t) {
|
|
472
473
|
const n = ie(t.labels, r);
|
|
@@ -498,7 +499,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
498
499
|
params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
|
|
499
500
|
}), De = /* @__PURE__ */ b({
|
|
500
501
|
...$,
|
|
501
|
-
typeId: /* @__PURE__ */
|
|
502
|
+
typeId: /* @__PURE__ */ w("connector"),
|
|
502
503
|
category: /* @__PURE__ */ y(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),
|
|
503
504
|
categoryId: ce,
|
|
504
505
|
implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), de),
|
|
@@ -514,12 +515,12 @@ const oe = /* @__PURE__ */ b({
|
|
|
514
515
|
O({ "en-gb": "Application" }), O({ "en-gb": "Curated Dataset" }), O({ "en-gb": "Database" }), O({ "en-gb": "File Store" });
|
|
515
516
|
const fe = v(["list"]), me = /* @__PURE__ */ b({
|
|
516
517
|
...T,
|
|
517
|
-
typeId: /* @__PURE__ */
|
|
518
|
+
typeId: /* @__PURE__ */ w("contextModelGroup"),
|
|
518
519
|
modelRefs: /* @__PURE__ */ x(P),
|
|
519
520
|
order: /* @__PURE__ */ k()
|
|
520
521
|
}), Oe = /* @__PURE__ */ b({
|
|
521
522
|
...$,
|
|
522
|
-
typeId: /* @__PURE__ */
|
|
523
|
+
typeId: /* @__PURE__ */ w("context"),
|
|
523
524
|
models: /* @__PURE__ */ x(me),
|
|
524
525
|
operations: /* @__PURE__ */ x(fe)
|
|
525
526
|
});
|
|
@@ -529,40 +530,40 @@ class F extends Error {
|
|
|
529
530
|
super(r, n), this.name = "DataPosError", this.locator = t;
|
|
530
531
|
}
|
|
531
532
|
}
|
|
532
|
-
class
|
|
533
|
+
class I extends F {
|
|
533
534
|
constructor(r, t, n) {
|
|
534
535
|
super(r, t, n), this.name = "ApplicationError";
|
|
535
536
|
}
|
|
536
537
|
}
|
|
537
|
-
class Ce extends
|
|
538
|
+
class Ce extends I {
|
|
538
539
|
constructor(r, t, n) {
|
|
539
540
|
super(r, t, n), this.name = "APIError";
|
|
540
541
|
}
|
|
541
542
|
}
|
|
542
|
-
class Me extends
|
|
543
|
+
class Me extends I {
|
|
543
544
|
constructor(r, t, n) {
|
|
544
545
|
super(r, t, n), this.name = "EngineError";
|
|
545
546
|
}
|
|
546
547
|
}
|
|
547
|
-
class z extends
|
|
548
|
+
class z extends I {
|
|
548
549
|
body;
|
|
549
550
|
constructor(r, t, n, s) {
|
|
550
551
|
super(r, t, s), this.name = "FetchError", this.body = n;
|
|
551
552
|
}
|
|
552
553
|
}
|
|
553
|
-
class be extends
|
|
554
|
+
class be extends I {
|
|
554
555
|
componentName;
|
|
555
556
|
info;
|
|
556
557
|
constructor(r, t, n, s, o) {
|
|
557
558
|
super(r, t, o), this.name = "VueHandledError", this.info = n, this.componentName = s;
|
|
558
559
|
}
|
|
559
560
|
}
|
|
560
|
-
class Ne extends
|
|
561
|
+
class Ne extends I {
|
|
561
562
|
constructor(r, t, n) {
|
|
562
563
|
super(r, t, n), this.name = "WindowHandledRuntimeError";
|
|
563
564
|
}
|
|
564
565
|
}
|
|
565
|
-
class je extends
|
|
566
|
+
class je extends I {
|
|
566
567
|
constructor(r, t, n) {
|
|
567
568
|
super(r, t, n), this.name = "WindowHandledPromiseRejectionError";
|
|
568
569
|
}
|
|
@@ -615,7 +616,7 @@ function Fe(e) {
|
|
|
615
616
|
}
|
|
616
617
|
const ye = v(["list", "render", "setColorMode"]), Le = /* @__PURE__ */ b({
|
|
617
618
|
...$,
|
|
618
|
-
typeId: /* @__PURE__ */
|
|
619
|
+
typeId: /* @__PURE__ */ w("presenter"),
|
|
619
620
|
presentations: /* @__PURE__ */ x(P),
|
|
620
621
|
operations: /* @__PURE__ */ x(ye)
|
|
621
622
|
});
|
|
@@ -734,7 +735,7 @@ function Ke(e) {
|
|
|
734
735
|
return "application/octet-stream";
|
|
735
736
|
}
|
|
736
737
|
}
|
|
737
|
-
const c = (e) => new Map(Object.entries(e)), L = (e, r, t =
|
|
738
|
+
const c = (e) => new Map(Object.entries(e)), L = (e, r, t = D) => {
|
|
738
739
|
const n = e.get(r);
|
|
739
740
|
if (n !== void 0) return n;
|
|
740
741
|
if (t !== r)
|
|
@@ -747,7 +748,7 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
747
748
|
{ id: "xls", labels: c({ "en-gb": "XLS" }) },
|
|
748
749
|
{ id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
|
|
749
750
|
{ id: "xml", labels: c({ "en-gb": "XML" }) }
|
|
750
|
-
], We = (e =
|
|
751
|
+
], We = (e = D) => {
|
|
751
752
|
const r = [];
|
|
752
753
|
for (const t of ve) {
|
|
753
754
|
const n = L(t.labels, e);
|
|
@@ -760,7 +761,7 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
760
761
|
{ id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
|
|
761
762
|
{ id: `\r
|
|
762
763
|
`, labels: c({ "en-gb": "Carriage Return/Newline" }) }
|
|
763
|
-
], Xe = (e =
|
|
764
|
+
], Xe = (e = D) => {
|
|
764
765
|
const r = [];
|
|
765
766
|
for (const t of Ee) {
|
|
766
767
|
const n = L(t.labels, e);
|
|
@@ -779,20 +780,20 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
|
779
780
|
{ id: "_", labels: c({ "en-gb": "Underscore" }) },
|
|
780
781
|
{ id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
|
|
781
782
|
{ id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
|
|
782
|
-
], Je = (e =
|
|
783
|
+
], Je = (e = D) => {
|
|
783
784
|
const r = [];
|
|
784
785
|
for (const t of xe) {
|
|
785
786
|
const n = L(t.labels, e);
|
|
786
787
|
r.push({ id: t.id, label: n ?? t.id });
|
|
787
788
|
}
|
|
788
789
|
return r;
|
|
789
|
-
}
|
|
790
|
+
};
|
|
790
791
|
export {
|
|
791
792
|
Ce as APIError,
|
|
792
|
-
|
|
793
|
+
I as ApplicationError,
|
|
793
794
|
we as CONNECTOR_DESTINATION_OPERATIONS,
|
|
794
795
|
Ie as CONNECTOR_SOURCE_OPERATIONS,
|
|
795
|
-
|
|
796
|
+
D as DEFAULT_LOCALE_CODE,
|
|
796
797
|
Me as EngineError,
|
|
797
798
|
z as FetchError,
|
|
798
799
|
Ae as OperationalError,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { contextConfigSchema } from './contextConfig.schema';
|
|
3
|
-
import { LocalisedString } from '../../
|
|
3
|
+
import { LocalisedString } from '../../locales';
|
|
4
4
|
import { Component, ComponentConfig, ComponentReference, ModuleConfig } from '..';
|
|
5
5
|
export interface Context extends Component {
|
|
6
6
|
readonly config: ContextConfig;
|
|
@@ -54,20 +54,20 @@ interface DataFormat {
|
|
|
54
54
|
id: string;
|
|
55
55
|
label: string;
|
|
56
56
|
}
|
|
57
|
-
export declare const getDataFormat: (id: string, localeId?: import('../../
|
|
58
|
-
export declare const getDataFormats: (localeId?: import('../../
|
|
57
|
+
export declare const getDataFormat: (id: string, localeId?: import('../../locales').LocaleCode) => DataFormat;
|
|
58
|
+
export declare const getDataFormats: (localeId?: import('../../locales').LocaleCode) => DataFormat[];
|
|
59
59
|
interface RecordDelimiter {
|
|
60
60
|
id: string;
|
|
61
61
|
label: string;
|
|
62
62
|
}
|
|
63
|
-
export declare const getRecordDelimiter: (id: string, localeId?: import('../../
|
|
64
|
-
export declare const getRecordDelimiters: (localeId?: import('../../
|
|
63
|
+
export declare const getRecordDelimiter: (id: string, localeId?: import('../../locales').LocaleCode) => RecordDelimiter;
|
|
64
|
+
export declare const getRecordDelimiters: (localeId?: import('../../locales').LocaleCode) => RecordDelimiter[];
|
|
65
65
|
interface ValueDelimiter {
|
|
66
66
|
id: string;
|
|
67
67
|
label: string;
|
|
68
68
|
}
|
|
69
|
-
export declare const getValueDelimiter: (id: string, localeId?: import('../../
|
|
70
|
-
export declare const getValueDelimiters: (localeId?: import('../../
|
|
69
|
+
export declare const getValueDelimiter: (id: string, localeId?: import('../../locales').LocaleCode) => ValueDelimiter;
|
|
70
|
+
export declare const getValueDelimiters: (localeId?: import('../../locales').LocaleCode) => ValueDelimiter[];
|
|
71
71
|
export type ParsedValue = bigint | boolean | number | string | null;
|
|
72
72
|
export type DataFormatId = 'dtv' | 'e/e' | 'jsonArray' | 'spss' | 'xls' | 'xlsx' | 'xml';
|
|
73
73
|
export type RecordDelimiterId = '\n' | '\r' | '\r\n';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InferOutput } from 'valibot';
|
|
2
2
|
import { componentConfigSchema, componentStatusColorIdSchema, componentStatusIdSchema, componentStatusSchema, componentTypeIdSchema } from './componentConfig.schema';
|
|
3
|
-
import { LocaleCode, LocalisedString } from '../
|
|
3
|
+
import { LocaleCode, LocalisedString } from '../locales';
|
|
4
4
|
export interface Component {
|
|
5
5
|
readonly config: ComponentConfig;
|
|
6
6
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PresentationVisualContentConfig } from '../
|
|
1
|
+
import { PresentationVisualContentConfig } from '../component/presenter/presentation';
|
|
2
2
|
export declare function useDataTable(): {
|
|
3
3
|
render: (contentConfig: PresentationVisualContentConfig, element: HTMLElement) => void;
|
|
4
4
|
};
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
* Shared composables, constants, errors, interfaces, schemas, types and utilities.
|
|
3
3
|
*/
|
|
4
4
|
/** Interfaces/Types */
|
|
5
|
-
export type LocaleCode
|
|
6
|
-
export type LocalisedString = Record<LocaleCode, string>;
|
|
5
|
+
export type { LocaleCode, LocalisedString } from './locales';
|
|
7
6
|
/** Interfaces/Types - Component */
|
|
8
7
|
export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId, ComponentStatusColorId } from './component';
|
|
9
8
|
/** Schemas - Component */
|
|
@@ -62,7 +61,7 @@ export type { ToolConfig } from './component/tool';
|
|
|
62
61
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
63
62
|
export { useDataTable } from './composables/useDataTable';
|
|
64
63
|
/** Constants */
|
|
65
|
-
export
|
|
64
|
+
export { DEFAULT_LOCALE_CODE } from './locales';
|
|
66
65
|
/** Utilities */
|
|
67
66
|
export { convertODataTypeIdToUsageTypeId } from './utilities';
|
|
68
67
|
export { extractExtensionFromPath, extractNameFromPath } from './utilities';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locale-related types and defaults shared across modules.
|
|
3
|
+
*/
|
|
4
|
+
export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
5
|
+
export type LocalisedString = Record<LocaleCode, string>;
|
|
6
|
+
/** Fallback locale used whenever a more specific locale is unavailable. */
|
|
7
|
+
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.333",
|
|
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>",
|