@dpuse/dpuse-shared 0.3.595 → 0.3.597

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,7 +1,7 @@
1
1
  import { n as e } from "./componentConfig.schema-Csigo0y4.js";
2
- import { DEFAULT_LOCALE_CODE as t } from "./dpuse-shared-locale.es.js";
2
+ import "./dpuse-shared-locale.es.js";
3
3
  //#region src/component/index.ts
4
- var n = [
4
+ var t = [
5
5
  {
6
6
  id: "alpha",
7
7
  color: "red",
@@ -48,13 +48,13 @@ var n = [
48
48
  labels: { "en-gb": "under-review" }
49
49
  }
50
50
  ];
51
- function r(e, r = t) {
52
- let i = n.find((t) => t.id === e);
53
- if (i) {
54
- let e = i.labels[r] ?? i.labels["en-gb"] ?? i.id;
51
+ function n(e, n = "en") {
52
+ let r = t.find((t) => t.id === e);
53
+ if (r) {
54
+ let e = r.labels[n] ?? r.labels.en ?? r.id;
55
55
  return {
56
- id: i.id,
57
- color: i.color,
56
+ id: r.id,
57
+ color: r.color,
58
58
  label: e
59
59
  };
60
60
  }
@@ -65,4 +65,4 @@ function r(e, r = t) {
65
65
  };
66
66
  }
67
67
  //#endregion
68
- export { e as componentConfigSchema, r as getComponentStatus };
68
+ export { e as componentConfigSchema, n as getComponentStatus };
@@ -1,8 +1,8 @@
1
1
  import { a as e, c as t, d as n, f as r, h as i, i as a, l as o, m as s, o as c, p as l, s as u, u as d } from "./componentConfig.schema-Csigo0y4.js";
2
2
  import { t as f } from "./moduleConfig.schema-WvtAJjAG.js";
3
- import { DEFAULT_LOCALE_CODE as p, createLabelMap as m, resolveLabel as h } from "./dpuse-shared-locale.es.js";
3
+ import { createLabelMap as p, resolveLabel as m } from "./dpuse-shared-locale.es.js";
4
4
  //#region src/component/connector/connectorConfig.schema.ts
5
- var g = r({
5
+ var h = r({
6
6
  authMethodId: a([
7
7
  "apiKey",
8
8
  "disabled",
@@ -15,12 +15,12 @@ var g = r({
15
15
  label: l(e),
16
16
  maxConnectionCount: d(n()),
17
17
  params: l(u(s(i(), i())))
18
- }), _ = a([
18
+ }), g = a([
19
19
  "application",
20
20
  "curatedDataset",
21
21
  "database",
22
22
  "fileStore"
23
- ]), v = a([
23
+ ]), _ = a([
24
24
  "abortOperation",
25
25
  "auditObjectContent",
26
26
  "authenticateConnection",
@@ -36,26 +36,26 @@ var g = r({
36
36
  "retrieveChunks",
37
37
  "retrieveRecords",
38
38
  "upsertRecords"
39
- ]), y = a([
39
+ ]), v = a([
40
40
  "bidirectional",
41
41
  "destination",
42
42
  "source",
43
43
  "unknown"
44
- ]), b = r({
44
+ ]), y = r({
45
45
  id: i(),
46
46
  label: c
47
- }), x = r({
47
+ }), b = r({
48
48
  ...f,
49
49
  typeId: o("connector"),
50
- category: d(b),
51
- categoryId: _,
52
- implementations: s(i(), g),
53
- operations: u(v),
54
- usageId: y,
50
+ category: d(y),
51
+ categoryId: g,
52
+ implementations: s(i(), h),
53
+ operations: u(_),
54
+ usageId: v,
55
55
  vendorAccountURL: d(i()),
56
56
  vendorDocumentationURL: d(i()),
57
57
  vendorHomeURL: d(i())
58
- }), S = [
58
+ }), x = [
59
59
  {
60
60
  id: "application",
61
61
  label: { "en-gb": "Application" }
@@ -72,10 +72,10 @@ var g = r({
72
72
  id: "fileStore",
73
73
  label: { "en-gb": "File Store" }
74
74
  }
75
- ], C = (e, t = p) => {
76
- let n = S.find((t) => t.id === e);
75
+ ], S = (e, t = "en") => {
76
+ let n = x.find((t) => t.id === e);
77
77
  if (n) {
78
- let e = h(m(n.label), t);
78
+ let e = m(p(n.label), t);
79
79
  return {
80
80
  id: n.id,
81
81
  label: e ?? n.id
@@ -87,4 +87,4 @@ var g = r({
87
87
  };
88
88
  };
89
89
  //#endregion
90
- export { x as connectorConfigSchema, C as constructConnectorCategoryConfig };
90
+ export { b as connectorConfigSchema, S as constructConnectorCategoryConfig };
@@ -1,8 +1,8 @@
1
1
  //#region src/locale/index.ts
2
- var e = "en-gb", t = (e) => new Map(Object.entries(e)), n = (t, n, r = e) => {
3
- let i = t.get(n);
4
- if (i !== void 0) return i;
5
- if (r !== n) return t.get(r);
2
+ var e = "en", t = (e) => new Map(Object.entries(e)), n = (e, t, n = "en") => {
3
+ let r = e.get(t);
4
+ if (r !== void 0) return r;
5
+ if (n !== t) return e.get(n);
6
6
  };
7
7
  //#endregion
8
8
  export { e as DEFAULT_LOCALE_CODE, t as createLabelMap, n as resolveLabel };
@@ -5,7 +5,7 @@ declare const DEFAULT_LOCALE_CODE: LocaleCode;
5
5
  /**
6
6
  * Locale codes.
7
7
  */
8
- type LocaleCode = 'en' | 'en-au' | 'en-gb' | 'en-us' | 'es-es';
8
+ type LocaleCode = 'en' | 'es';
9
9
  /**
10
10
  * Localised string.
11
11
  */
@@ -21,6 +21,6 @@ declare const createLabelMap: (labels: Record<string, string>) => LocaleLabelMap
21
21
  /**
22
22
  *
23
23
  */
24
- declare const resolveLabel: (labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: "en-gb") => string | undefined;
24
+ declare const resolveLabel: (labels: LocaleLabelMap, localeId: string, fallbackLocaleId?: "en") => string | undefined;
25
25
  export { createLabelMap, DEFAULT_LOCALE_CODE, resolveLabel };
26
26
  export type { LocaleCode, LocaleLabelMap, LocalisedString };
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Vitest configuration.
3
+ */
4
+ declare const _default: import('vite').UserConfig;
5
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dpuse/dpuse-shared",
3
- "version": "0.3.595",
3
+ "version": "0.3.597",
4
4
  "description": "Common constants, types and utilities used across all DPUse projects.",
5
5
  "license": "MIT",
6
6
  "author": "Jonathan Terrell <terrell.jm@gmail.com>",