@datapos/datapos-shared 0.3.333 → 0.3.335
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 +23 -24
- package/dist/types/src/component/connector/index.d.ts +2 -2
- 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/engine/index.d.ts +3 -3
- package/dist/types/src/index.d.ts +4 -3
- package/package.json +1 -1
- package/dist/types/src/locales.d.ts +0 -7
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
const D = "en-gb";
|
|
2
1
|
let j;
|
|
3
2
|
// @__NO_SIDE_EFFECTS__
|
|
4
3
|
function H(e) {
|
|
@@ -132,11 +131,11 @@ function B(e) {
|
|
|
132
131
|
};
|
|
133
132
|
}
|
|
134
133
|
// @__NO_SIDE_EFFECTS__
|
|
135
|
-
function
|
|
134
|
+
function D(e, r) {
|
|
136
135
|
return {
|
|
137
136
|
kind: "schema",
|
|
138
137
|
type: "literal",
|
|
139
|
-
reference:
|
|
138
|
+
reference: D,
|
|
140
139
|
expects: /* @__PURE__ */ U(e),
|
|
141
140
|
async: !1,
|
|
142
141
|
literal: e,
|
|
@@ -375,7 +374,7 @@ function G(e, r) {
|
|
|
375
374
|
}
|
|
376
375
|
};
|
|
377
376
|
}
|
|
378
|
-
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */
|
|
377
|
+
const v = (e) => /* @__PURE__ */ G(e.map((r) => /* @__PURE__ */ D(r))), te = /* @__PURE__ */ b({
|
|
379
378
|
"en-au": /* @__PURE__ */ l(),
|
|
380
379
|
"en-gb": /* @__PURE__ */ l(),
|
|
381
380
|
"en-us": /* @__PURE__ */ l(),
|
|
@@ -452,7 +451,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
452
451
|
}), E = (e) => {
|
|
453
452
|
const r = Object.entries(e).filter((t) => typeof t[1] == "string");
|
|
454
453
|
return new Map(r);
|
|
455
|
-
}, ie = (e, r, t =
|
|
454
|
+
}, ie = (e, r, t = I) => {
|
|
456
455
|
const n = e.get(r);
|
|
457
456
|
if (n !== void 0) return n;
|
|
458
457
|
if (t !== r)
|
|
@@ -467,7 +466,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
467
466
|
{ id: "releaseCandidate", color: "green", labels: E({ "en-gb": "release-candidate" }) },
|
|
468
467
|
{ id: "unavailable", color: "other", labels: E({ "en-gb": "unavailable" }) },
|
|
469
468
|
{ id: "underReview", color: "other", labels: E({ "en-gb": "under-review" }) }
|
|
470
|
-
], ke = (e, r =
|
|
469
|
+
], ke = (e, r = I) => {
|
|
471
470
|
const t = ae.find((n) => n.id === e);
|
|
472
471
|
if (t) {
|
|
473
472
|
const n = ie(t.labels, r);
|
|
@@ -499,7 +498,7 @@ const oe = /* @__PURE__ */ b({
|
|
|
499
498
|
params: /* @__PURE__ */ f(/* @__PURE__ */ x(/* @__PURE__ */ R(/* @__PURE__ */ l(), /* @__PURE__ */ l())))
|
|
500
499
|
}), De = /* @__PURE__ */ b({
|
|
501
500
|
...$,
|
|
502
|
-
typeId: /* @__PURE__ */
|
|
501
|
+
typeId: /* @__PURE__ */ D("connector"),
|
|
503
502
|
category: /* @__PURE__ */ y(/* @__PURE__ */ b({ id: /* @__PURE__ */ l(), label: /* @__PURE__ */ l() })),
|
|
504
503
|
categoryId: ce,
|
|
505
504
|
implementations: /* @__PURE__ */ R(/* @__PURE__ */ l(), de),
|
|
@@ -515,12 +514,12 @@ const oe = /* @__PURE__ */ b({
|
|
|
515
514
|
O({ "en-gb": "Application" }), O({ "en-gb": "Curated Dataset" }), O({ "en-gb": "Database" }), O({ "en-gb": "File Store" });
|
|
516
515
|
const fe = v(["list"]), me = /* @__PURE__ */ b({
|
|
517
516
|
...T,
|
|
518
|
-
typeId: /* @__PURE__ */
|
|
517
|
+
typeId: /* @__PURE__ */ D("contextModelGroup"),
|
|
519
518
|
modelRefs: /* @__PURE__ */ x(P),
|
|
520
519
|
order: /* @__PURE__ */ k()
|
|
521
520
|
}), Oe = /* @__PURE__ */ b({
|
|
522
521
|
...$,
|
|
523
|
-
typeId: /* @__PURE__ */
|
|
522
|
+
typeId: /* @__PURE__ */ D("context"),
|
|
524
523
|
models: /* @__PURE__ */ x(me),
|
|
525
524
|
operations: /* @__PURE__ */ x(fe)
|
|
526
525
|
});
|
|
@@ -530,40 +529,40 @@ class F extends Error {
|
|
|
530
529
|
super(r, n), this.name = "DataPosError", this.locator = t;
|
|
531
530
|
}
|
|
532
531
|
}
|
|
533
|
-
class
|
|
532
|
+
class w extends F {
|
|
534
533
|
constructor(r, t, n) {
|
|
535
534
|
super(r, t, n), this.name = "ApplicationError";
|
|
536
535
|
}
|
|
537
536
|
}
|
|
538
|
-
class Ce extends
|
|
537
|
+
class Ce extends w {
|
|
539
538
|
constructor(r, t, n) {
|
|
540
539
|
super(r, t, n), this.name = "APIError";
|
|
541
540
|
}
|
|
542
541
|
}
|
|
543
|
-
class Me extends
|
|
542
|
+
class Me extends w {
|
|
544
543
|
constructor(r, t, n) {
|
|
545
544
|
super(r, t, n), this.name = "EngineError";
|
|
546
545
|
}
|
|
547
546
|
}
|
|
548
|
-
class z extends
|
|
547
|
+
class z extends w {
|
|
549
548
|
body;
|
|
550
549
|
constructor(r, t, n, s) {
|
|
551
550
|
super(r, t, s), this.name = "FetchError", this.body = n;
|
|
552
551
|
}
|
|
553
552
|
}
|
|
554
|
-
class be extends
|
|
553
|
+
class be extends w {
|
|
555
554
|
componentName;
|
|
556
555
|
info;
|
|
557
556
|
constructor(r, t, n, s, o) {
|
|
558
557
|
super(r, t, o), this.name = "VueHandledError", this.info = n, this.componentName = s;
|
|
559
558
|
}
|
|
560
559
|
}
|
|
561
|
-
class Ne extends
|
|
560
|
+
class Ne extends w {
|
|
562
561
|
constructor(r, t, n) {
|
|
563
562
|
super(r, t, n), this.name = "WindowHandledRuntimeError";
|
|
564
563
|
}
|
|
565
564
|
}
|
|
566
|
-
class je extends
|
|
565
|
+
class je extends w {
|
|
567
566
|
constructor(r, t, n) {
|
|
568
567
|
super(r, t, n), this.name = "WindowHandledPromiseRejectionError";
|
|
569
568
|
}
|
|
@@ -616,7 +615,7 @@ function Fe(e) {
|
|
|
616
615
|
}
|
|
617
616
|
const ye = v(["list", "render", "setColorMode"]), Le = /* @__PURE__ */ b({
|
|
618
617
|
...$,
|
|
619
|
-
typeId: /* @__PURE__ */
|
|
618
|
+
typeId: /* @__PURE__ */ D("presenter"),
|
|
620
619
|
presentations: /* @__PURE__ */ x(P),
|
|
621
620
|
operations: /* @__PURE__ */ x(ye)
|
|
622
621
|
});
|
|
@@ -735,7 +734,7 @@ function Ke(e) {
|
|
|
735
734
|
return "application/octet-stream";
|
|
736
735
|
}
|
|
737
736
|
}
|
|
738
|
-
const c = (e) => new Map(Object.entries(e)), L = (e, r, t =
|
|
737
|
+
const c = (e) => new Map(Object.entries(e)), L = (e, r, t = I) => {
|
|
739
738
|
const n = e.get(r);
|
|
740
739
|
if (n !== void 0) return n;
|
|
741
740
|
if (t !== r)
|
|
@@ -748,7 +747,7 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = D) => {
|
|
|
748
747
|
{ id: "xls", labels: c({ "en-gb": "XLS" }) },
|
|
749
748
|
{ id: "xlsx", labels: c({ "en-gb": "XLSX" }) },
|
|
750
749
|
{ id: "xml", labels: c({ "en-gb": "XML" }) }
|
|
751
|
-
], We = (e =
|
|
750
|
+
], We = (e = I) => {
|
|
752
751
|
const r = [];
|
|
753
752
|
for (const t of ve) {
|
|
754
753
|
const n = L(t.labels, e);
|
|
@@ -761,7 +760,7 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = D) => {
|
|
|
761
760
|
{ id: "\r", labels: c({ "en-gb": "Carriage Return" }) },
|
|
762
761
|
{ id: `\r
|
|
763
762
|
`, labels: c({ "en-gb": "Carriage Return/Newline" }) }
|
|
764
|
-
], Xe = (e =
|
|
763
|
+
], Xe = (e = I) => {
|
|
765
764
|
const r = [];
|
|
766
765
|
for (const t of Ee) {
|
|
767
766
|
const n = L(t.labels, e);
|
|
@@ -780,20 +779,20 @@ const c = (e) => new Map(Object.entries(e)), L = (e, r, t = D) => {
|
|
|
780
779
|
{ id: "_", labels: c({ "en-gb": "Underscore" }) },
|
|
781
780
|
{ id: "0x1F", labels: c({ "en-gb": "Unit Separator" }) },
|
|
782
781
|
{ id: "|", labels: c({ "en-gb": "Vertical Bar" }) }
|
|
783
|
-
], Je = (e =
|
|
782
|
+
], Je = (e = I) => {
|
|
784
783
|
const r = [];
|
|
785
784
|
for (const t of xe) {
|
|
786
785
|
const n = L(t.labels, e);
|
|
787
786
|
r.push({ id: t.id, label: n ?? t.id });
|
|
788
787
|
}
|
|
789
788
|
return r;
|
|
790
|
-
};
|
|
789
|
+
}, I = "en-gb";
|
|
791
790
|
export {
|
|
792
791
|
Ce as APIError,
|
|
793
|
-
|
|
792
|
+
w as ApplicationError,
|
|
794
793
|
we as CONNECTOR_DESTINATION_OPERATIONS,
|
|
795
794
|
Ie as CONNECTOR_SOURCE_OPERATIONS,
|
|
796
|
-
|
|
795
|
+
I as DEFAULT_LOCALE_CODE,
|
|
797
796
|
Me as EngineError,
|
|
798
797
|
z as FetchError,
|
|
799
798
|
Ae as OperationalError,
|
|
@@ -82,8 +82,8 @@ export interface CreateSettings extends ConnectorOperationSettings {
|
|
|
82
82
|
path: string;
|
|
83
83
|
structure: string;
|
|
84
84
|
}
|
|
85
|
-
type DescribeSettings = ConnectorOperationSettings;
|
|
86
|
-
interface DescribeResult {
|
|
85
|
+
export type DescribeSettings = ConnectorOperationSettings;
|
|
86
|
+
export interface DescribeResult {
|
|
87
87
|
description: ConnectionDescription;
|
|
88
88
|
}
|
|
89
89
|
export interface DropSettings extends ConnectorOperationSettings {
|
|
@@ -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 '../../index';
|
|
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('../../index').LocaleCode) => DataFormat;
|
|
58
|
+
export declare const getDataFormats: (localeId?: import('../../index').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('../../index').LocaleCode) => RecordDelimiter;
|
|
64
|
+
export declare const getRecordDelimiters: (localeId?: import('../../index').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('../../index').LocaleCode) => ValueDelimiter;
|
|
70
|
+
export declare const getValueDelimiters: (localeId?: import('../../index').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 '../index';
|
|
4
4
|
export interface Component {
|
|
5
5
|
readonly config: ComponentConfig;
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectionConfig } from '../component/connector/connection';
|
|
2
|
-
import { AuditContentResult, ConnectorCallbackData, ConnectorOperationSettings, InitialiseSettings, ListResult,
|
|
2
|
+
import { AuditContentResult, ConnectorCallbackData, ConnectorOperationSettings, InitialiseSettings, ListResult, RetrieveRecordsResult } from '../component/connector';
|
|
3
3
|
import { Component, ModuleConfig } from '../component';
|
|
4
4
|
import { ContextCallbackData, ContextConfig, ContextOperationSettings } from '../component/context';
|
|
5
5
|
import { DataViewPreviewConfig, EncodingConfig } from '../component/dataView';
|
|
@@ -8,9 +8,9 @@ export interface EngineConfig extends ModuleConfig {
|
|
|
8
8
|
}
|
|
9
9
|
type InitialiseEngine = (settings: InitialiseSettings) => Promise<void>;
|
|
10
10
|
type ProcessConnectorRequest = (id: string, connectionConfig: ConnectionConfig, settings: ConnectorOperationSettings, callback?: (callbackData: ContextCallbackData) => void) => Promise<ConnectorInterfaceResult>;
|
|
11
|
-
export type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult |
|
|
11
|
+
export type ConnectorInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveRecordsResult;
|
|
12
12
|
type ProcessContextRequest = (id: string, contextConfig: ContextConfig, settings: ContextOperationSettings, callback?: (callbackData: ConnectorCallbackData) => void) => Promise<ContextInterfaceResult>;
|
|
13
|
-
export type ContextInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult |
|
|
13
|
+
export type ContextInterfaceResult = AuditContentResult | DataViewPreviewConfig | ListResult | RetrieveRecordsResult;
|
|
14
14
|
type ProcessTestRequest = (settings: TestSettings) => Promise<Record<string, unknown>>;
|
|
15
15
|
export interface TestSettings {
|
|
16
16
|
action?: string;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Shared composables, constants, errors, interfaces, schemas, types and utilities.
|
|
3
3
|
*/
|
|
4
4
|
/** Interfaces/Types */
|
|
5
|
-
export type
|
|
5
|
+
export type LocaleCode = 'en-au' | 'en-gb' | 'en-us' | 'es-es';
|
|
6
|
+
export type LocalisedString = Record<LocaleCode, string>;
|
|
6
7
|
/** Interfaces/Types - Component */
|
|
7
8
|
export type { ComponentConfig, ComponentReference, ComponentStatus, ComponentStatusId, ComponentTypeId, ModuleConfig, ModuleTypeId, ComponentStatusColorId } from './component';
|
|
8
9
|
/** Schemas - Component */
|
|
@@ -14,7 +15,7 @@ export type { AuditContentResult, AuditContentSettings, Connector, ConnectorCall
|
|
|
14
15
|
/** Interfaces/Types - Connection */
|
|
15
16
|
export type { ConnectionAuthorizationConfig, ConnectionColumnConfig, ConnectionConfig, ConnectionNodeConfig, DPAFileSystemFileHandle, Encoding, StorageTypeId, UsageTypeId } from './component/connector/connection';
|
|
16
17
|
/** Schemas - Connector */
|
|
17
|
-
export { connectorConfigSchema } from './component/connector';
|
|
18
|
+
export { connectorConfigSchema } from './component/connector/connectorConfig.schema';
|
|
18
19
|
/** Interfaces/Types - Context. */
|
|
19
20
|
export { contextConfigSchema } from './component/context';
|
|
20
21
|
export type { Context, ContextConfig, ContextLocalisedConfig, ContextListSettings, ContextListResult, ContextOperation, ContextCallbackData } from './component/context';
|
|
@@ -61,7 +62,7 @@ export type { ToolConfig } from './component/tool';
|
|
|
61
62
|
export { type CytoscapeJSView, useCytoscapeJS } from './composables/useCytoscapeJS';
|
|
62
63
|
export { useDataTable } from './composables/useDataTable';
|
|
63
64
|
/** Constants */
|
|
64
|
-
export
|
|
65
|
+
export declare const DEFAULT_LOCALE_CODE: LocaleCode;
|
|
65
66
|
/** Utilities */
|
|
66
67
|
export { convertODataTypeIdToUsageTypeId } from './utilities';
|
|
67
68
|
export { extractExtensionFromPath, extractNameFromPath } from './utilities';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datapos/datapos-shared",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.335",
|
|
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>",
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|