@dpuse/dpuse-shared 0.3.593

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.
Files changed (39) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +137 -0
  3. package/README.pdf +0 -0
  4. package/dist/componentConfig.schema-Csigo0y4.js +449 -0
  5. package/dist/dpuse-shared-component.es.js +68 -0
  6. package/dist/dpuse-shared-connector.es.js +90 -0
  7. package/dist/dpuse-shared-dataview.es.js +16 -0
  8. package/dist/dpuse-shared-encoding.es.js +356 -0
  9. package/dist/dpuse-shared-engine.es.js +0 -0
  10. package/dist/dpuse-shared-errors.es.js +181 -0
  11. package/dist/dpuse-shared-locale.es.js +8 -0
  12. package/dist/dpuse-shared-tools.es.js +8 -0
  13. package/dist/dpuse-shared-utilities.es.js +79 -0
  14. package/dist/dpuse-shared.es.js +25 -0
  15. package/dist/moduleConfig.schema-WvtAJjAG.js +19 -0
  16. package/dist/types/src/component/componentConfig.schema.d.ts +129 -0
  17. package/dist/types/src/component/connector/connection.d.ts +92 -0
  18. package/dist/types/src/component/connector/connectorConfig.schema.d.ts +80 -0
  19. package/dist/types/src/component/connector/index.d.ts +219 -0
  20. package/dist/types/src/component/context/contextConfig.schema.d.ts +77 -0
  21. package/dist/types/src/component/context/index.d.ts +136 -0
  22. package/dist/types/src/component/dataView/index.d.ts +215 -0
  23. package/dist/types/src/component/dimension/index.d.ts +8 -0
  24. package/dist/types/src/component/eventQuery/index.d.ts +8 -0
  25. package/dist/types/src/component/index.d.ts +15 -0
  26. package/dist/types/src/component/module.d.ts +7 -0
  27. package/dist/types/src/component/moduleConfig.schema.d.ts +67 -0
  28. package/dist/types/src/component/presenter/index.d.ts +22 -0
  29. package/dist/types/src/component/presenter/presentation.d.ts +77 -0
  30. package/dist/types/src/component/presenter/presenterConfig.schema.d.ts +50 -0
  31. package/dist/types/src/component/tool/index.d.ts +13 -0
  32. package/dist/types/src/encoding/index.d.ts +26 -0
  33. package/dist/types/src/engine/index.d.ts +58 -0
  34. package/dist/types/src/errors/index.d.ts +37 -0
  35. package/dist/types/src/index.d.ts +34 -0
  36. package/dist/types/src/locale/index.d.ts +26 -0
  37. package/dist/types/src/utilities/index.d.ts +12 -0
  38. package/dist/types/vite.config.d.ts +5 -0
  39. package/package.json +120 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DPUse Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,137 @@
1
+ # Data Positioning Shared Library
2
+
3
+ <span><!-- OWASP_BADGES_START -->[![OWASP](https://img.shields.io/badge/OWASP-passed-4CAF50)](https://data-positioning.github.io/dpuse-shared/dependency-check-reports/dependency-check-report.html)<!-- OWASP_BADGES_END --></span>
4
+ [![npm version](https://img.shields.io/npm/v/@dpuse/dpuse-shared.svg)](https://www.npmjs.com/package/@dpuse/dpuse-shared)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)
6
+
7
+ A library containing common constants, types and utilities used across all Data Positioning projects.
8
+
9
+ ## Installation
10
+
11
+ Install as a production dependency:
12
+
13
+ ```bash
14
+ npm install @dpuse/dpuse-shared
15
+ ```
16
+
17
+ > See the Data Positioning security documentation for additional initialization requirements.
18
+
19
+ ## Declarations
20
+
21
+ This package provides constants, errors, types/interfaces and utilities used by Data Positioning modules.
22
+
23
+ [Documentation](https://data-positioning.github.io/dpuse-shared/docs/typedoc/index.html)
24
+
25
+ ### Modules
26
+
27
+ The Data Positioning solution consists of the following modules. All modules, except `App`, extend the base type `Module`.
28
+
29
+ | Type | Dynamic | Notes |
30
+ | --------- | :-----: | --------------------------------------------------------------- |
31
+ | App | | Implements the data positioning web application. |
32
+ | Engine | ✔ | Implements the data positioning engine. |
33
+ | Connector | ✔ | Implements a connector which handles one or more connections. |
34
+ | Context | ✔ | Implements a context which defines one or more models. |
35
+ | Presenter | ✔ | Implements a presenter which renders one or more presentations. |
36
+ | Tool | ✔ | Implements... |
37
+
38
+ ### Components
39
+
40
+ Each module implements a set of components. All module component types extend the base component types.
41
+
42
+ | Types | Notes |
43
+ | ------------------------------- | ------------------------------------------------------------ |
44
+ | [Component](./src/component.ts) | The Component type serves as a base type for all components. |
45
+ | ComponentReference | |
46
+ | ComponentStatus | |
47
+ | ComponentStatusId | |
48
+ | ComponentTypeId | |
49
+ | ComponentStatusColorId | |
50
+
51
+ #### Connector Module Components
52
+
53
+ | Item | Notes |
54
+ | --------------------------------------- | ----------------------------------------------------------------- |
55
+ | [Connector Types](./src/connector.ts) | Connector types. The Connector type extends the Component type. |
56
+ | [Connection Types](./src/connection.ts) | Connection types. The Connection type extends the Component type. |
57
+
58
+ #### Context Module Components
59
+
60
+ | Item | Notes |
61
+ | ---------------------------------------- | ------------------------------------------------------------------- |
62
+ | [Context Types](./src/context.ts) | Context types. The Context type extends the Component type. |
63
+ | [Data View Types](./src/dataView.ts) | DataView types. The DataView type extends the Component type. |
64
+ | [Dimension Types](./src/dimension.ts) | Dimension types. The Dimension type extends the Component type. |
65
+ | [Engine Types](./src/dimension.ts) | Engine types. |
66
+ | [Event Query Types](./src/eventQuery.ts) | Event Query types. The Event Query type extends the Component type. |
67
+
68
+ #### Engine Module Components
69
+
70
+ | Item | Notes |
71
+ | ---------------------------------- | ------------- |
72
+ | [Engine Types](./src/dimension.ts) | Engine types. |
73
+
74
+ #### Presenter Module Components
75
+
76
+ | Item | Notes |
77
+ | ------------------------------------------- | --------------------------------------------------------------------- |
78
+ | [Presenter Types](./src/presenter.ts) | Presenter types. The Presenter type extends the Component type. |
79
+ | [Presentation Types](./src/presentation.ts) | Presentation types. The Presentation type extends the Component type. |
80
+
81
+ ### Composables
82
+
83
+ ### Constants
84
+
85
+ ### Errors
86
+
87
+ ### Utilities
88
+
89
+ ## Usage
90
+
91
+ Import the library in your TypeScript project:
92
+
93
+ ```ts
94
+ import { type ConnectorConfig, getComponentStatus } from '@dpuse/dpuse-shared';
95
+
96
+ // Example type usage.
97
+ let connectorConfig: ConnectorConfig;
98
+
99
+ // Example function usage.
100
+ getComponentStatus('alpha');
101
+ ```
102
+
103
+ Implements the common Data Positioning repository management command set. For more information see [@dpuse/dpuse-development](https://github.com/data-positioning/dpuse-development).
104
+
105
+ ## Bundle Analysis Reports
106
+
107
+ The Bundle Analysis Report provides a detailed breakdown of the bundle's composition and module sizes, helping to identify which modules contribute most to the final build. It is generated automatically on each release using the npm package `rollup-plugin-visualizer`.
108
+
109
+ [View the Bundle Analysis Report](https://data-positioning.github.io/dpuse-shared/stats.html)
110
+
111
+ ## Dependency Check Report
112
+
113
+ The OWASP Dependency Check Report identifies known vulnerabilities in project dependencies. It is generated automatically on each release using the npm package [owasp-dependency-check](https://dependency-check.github.io/DependencyCheck/index.html). We also rely on GitHub Dependabot to continuously check for vulnerabilities across all dependencies.
114
+
115
+ [View the OWASP Dependency Check Report](https://data-positioning.github.io/dpuse-shared/dependency-check-report.html)
116
+
117
+ ## Dependency Licenses
118
+
119
+ The following table lists top-level production and peer dependencies. All these dependencies (including transitive ones) have been recursively verified to use Apache-2.0, BSD-2-Clause, CC0-1.0, or MIT—commercially friendly licenses with minimal restrictions. Developers cloning this repository should independently verify dev and optional dependencies; users of the uploaded library are covered by these checks. We do not include unlicensed dependencies. Used to support development activity and not released as part of the production release. Check if you clone. We use the `npm` packages [license-report](https://www.npmjs.com/package/license-report), [license-report-check](https://www.npmjs.com/package/license-report-check) and [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) to identify dependency licenses.
120
+
121
+ The following table lists top-level production and peer dependencies. All these dependencies (including transitive ones) have been recursively verified to use Apache-2.0, BSD-2-Clause, CC0-1.0, or MIT—commercially friendly licenses with minimal restrictions. Developers cloning this repository should independently verify dev and optional dependencies; users of the published library are covered by these checks. We do not include unlicensed dependencies. Used to support development activity and not released as part of the production release. Check if you clone. We use the `npm` packages [license-report](https://www.npmjs.com/package/license-report), [license-report-check](https://www.npmjs.com/package/license-report-check) and [license-report-recursive](https://www.npmjs.com/package/license-report-recursive) to identify dependency licenses.
122
+
123
+ <!-- DEPENDENCY_LICENSES_START -->
124
+
125
+ | Name | Type | Installed | Latest | Latest Released | Deps | Document |
126
+ | :-------- | :--- | :-------: | :----: | :----------------------- | ---: | :-------------------------------------------------------------------------------- |
127
+ | csv-parse | MIT | 6.1.0 | 6.1.0 | 5 months ago: 2025-07-16 | 0 | ⚠️ No license file |
128
+ | date-fns | MIT | 4.1.0 | 4.1.0 | 4 months ago: 2025-08-03 | 0 | [LICENSE.md](https://raw.githubusercontent.com/date-fns/date-fns/main/LICENSE.md) |
129
+ | nanoid | MIT | 5.1.6 | 5.1.6 | 2 months ago: 2025-09-22 | 0 | [LICENSE](https://raw.githubusercontent.com/ai/nanoid/main/LICENSE) |
130
+
131
+ <!-- DEPENDENCY_LICENSES_END -->
132
+
133
+ **Installed dependencies are kept up-to-date with latest releases.**
134
+
135
+ ## License
136
+
137
+ [MIT](./LICENSE) © 2026 Data Positioning Pty Ltd
package/README.pdf ADDED
Binary file
@@ -0,0 +1,449 @@
1
+ //#region node_modules/valibot/dist/index.mjs
2
+ var e;
3
+ /* @__NO_SIDE_EFFECTS__ */
4
+ function t(t) {
5
+ return {
6
+ lang: t?.lang ?? e?.lang,
7
+ message: t?.message,
8
+ abortEarly: t?.abortEarly ?? e?.abortEarly,
9
+ abortPipeEarly: t?.abortPipeEarly ?? e?.abortPipeEarly
10
+ };
11
+ }
12
+ var n;
13
+ /* @__NO_SIDE_EFFECTS__ */
14
+ function r(e) {
15
+ return n?.get(e);
16
+ }
17
+ var i;
18
+ /* @__NO_SIDE_EFFECTS__ */
19
+ function a(e) {
20
+ return i?.get(e);
21
+ }
22
+ var o;
23
+ /* @__NO_SIDE_EFFECTS__ */
24
+ function s(e, t) {
25
+ return o?.get(e)?.get(t);
26
+ }
27
+ /* @__NO_SIDE_EFFECTS__ */
28
+ function c(e) {
29
+ let t = typeof e;
30
+ return t === "string" ? `"${e}"` : t === "number" || t === "bigint" || t === "boolean" ? `${e}` : t === "object" || t === "function" ? (e && Object.getPrototypeOf(e)?.constructor?.name) ?? "null" : t;
31
+ }
32
+ function l(e, t, n, i, o) {
33
+ let l = o && "input" in o ? o.input : n.value, u = o?.expected ?? e.expects ?? null, d = o?.received ?? /* @__PURE__ */ c(l), f = {
34
+ kind: e.kind,
35
+ type: e.type,
36
+ input: l,
37
+ expected: u,
38
+ received: d,
39
+ message: `Invalid ${t}: ${u ? `Expected ${u} but r` : "R"}eceived ${d}`,
40
+ requirement: e.requirement,
41
+ path: o?.path,
42
+ issues: o?.issues,
43
+ lang: i.lang,
44
+ abortEarly: i.abortEarly,
45
+ abortPipeEarly: i.abortPipeEarly
46
+ }, p = e.kind === "schema", m = o?.message ?? e.message ?? /* @__PURE__ */ s(e.reference, f.lang) ?? (p ? /* @__PURE__ */ a(f.lang) : null) ?? i.message ?? /* @__PURE__ */ r(f.lang);
47
+ m !== void 0 && (f.message = typeof m == "function" ? m(f) : m), p && (n.typed = !1), n.issues ? n.issues.push(f) : n.issues = [f];
48
+ }
49
+ /* @__NO_SIDE_EFFECTS__ */
50
+ function u(e) {
51
+ return {
52
+ version: 1,
53
+ vendor: "valibot",
54
+ validate(n) {
55
+ return e["~run"]({ value: n }, /* @__PURE__ */ t());
56
+ }
57
+ };
58
+ }
59
+ /* @__NO_SIDE_EFFECTS__ */
60
+ function d(e, t) {
61
+ return Object.hasOwn(e, t) && t !== "__proto__" && t !== "prototype" && t !== "constructor";
62
+ }
63
+ /* @__NO_SIDE_EFFECTS__ */
64
+ function f(e, t) {
65
+ let n = [...new Set(e)];
66
+ return n.length > 1 ? `(${n.join(` ${t} `)})` : n[0] ?? "never";
67
+ }
68
+ /* @__NO_SIDE_EFFECTS__ */
69
+ function p(e, t, n) {
70
+ return typeof e.fallback == "function" ? e.fallback(t, n) : e.fallback;
71
+ }
72
+ /* @__NO_SIDE_EFFECTS__ */
73
+ function m(e, t, n) {
74
+ return typeof e.default == "function" ? e.default(t, n) : e.default;
75
+ }
76
+ /* @__NO_SIDE_EFFECTS__ */
77
+ function h(e, t) {
78
+ return {
79
+ kind: "schema",
80
+ type: "array",
81
+ reference: h,
82
+ expects: "Array",
83
+ async: !1,
84
+ item: e,
85
+ message: t,
86
+ get "~standard"() {
87
+ return /* @__PURE__ */ u(this);
88
+ },
89
+ "~run"(e, t) {
90
+ let n = e.value;
91
+ if (Array.isArray(n)) {
92
+ e.typed = !0, e.value = [];
93
+ for (let r = 0; r < n.length; r++) {
94
+ let i = n[r], a = this.item["~run"]({ value: i }, t);
95
+ if (a.issues) {
96
+ let o = {
97
+ type: "array",
98
+ origin: "value",
99
+ input: n,
100
+ key: r,
101
+ value: i
102
+ };
103
+ for (let t of a.issues) t.path ? t.path.unshift(o) : t.path = [o], e.issues?.push(t);
104
+ if (e.issues ||= a.issues, t.abortEarly) {
105
+ e.typed = !1;
106
+ break;
107
+ }
108
+ }
109
+ a.typed || (e.typed = !1), e.value.push(a.value);
110
+ }
111
+ } else l(this, "type", e, t);
112
+ return e;
113
+ }
114
+ };
115
+ }
116
+ /* @__NO_SIDE_EFFECTS__ */
117
+ function g(e) {
118
+ return {
119
+ kind: "schema",
120
+ type: "boolean",
121
+ reference: g,
122
+ expects: "boolean",
123
+ async: !1,
124
+ message: e,
125
+ get "~standard"() {
126
+ return /* @__PURE__ */ u(this);
127
+ },
128
+ "~run"(e, t) {
129
+ return typeof e.value == "boolean" ? e.typed = !0 : l(this, "type", e, t), e;
130
+ }
131
+ };
132
+ }
133
+ /* @__NO_SIDE_EFFECTS__ */
134
+ function _(e, t) {
135
+ return {
136
+ kind: "schema",
137
+ type: "literal",
138
+ reference: _,
139
+ expects: /* @__PURE__ */ c(e),
140
+ async: !1,
141
+ literal: e,
142
+ message: t,
143
+ get "~standard"() {
144
+ return /* @__PURE__ */ u(this);
145
+ },
146
+ "~run"(e, t) {
147
+ return e.value === this.literal ? e.typed = !0 : l(this, "type", e, t), e;
148
+ }
149
+ };
150
+ }
151
+ /* @__NO_SIDE_EFFECTS__ */
152
+ function v(e, t) {
153
+ return {
154
+ kind: "schema",
155
+ type: "nullable",
156
+ reference: v,
157
+ expects: `(${e.expects} | null)`,
158
+ async: !1,
159
+ wrapped: e,
160
+ default: t,
161
+ get "~standard"() {
162
+ return /* @__PURE__ */ u(this);
163
+ },
164
+ "~run"(e, t) {
165
+ return e.value === null && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === null) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
166
+ }
167
+ };
168
+ }
169
+ /* @__NO_SIDE_EFFECTS__ */
170
+ function y(e) {
171
+ return {
172
+ kind: "schema",
173
+ type: "number",
174
+ reference: y,
175
+ expects: "number",
176
+ async: !1,
177
+ message: e,
178
+ get "~standard"() {
179
+ return /* @__PURE__ */ u(this);
180
+ },
181
+ "~run"(e, t) {
182
+ return typeof e.value == "number" && !isNaN(e.value) ? e.typed = !0 : l(this, "type", e, t), e;
183
+ }
184
+ };
185
+ }
186
+ /* @__NO_SIDE_EFFECTS__ */
187
+ function b(e, t) {
188
+ return {
189
+ kind: "schema",
190
+ type: "object",
191
+ reference: b,
192
+ expects: "Object",
193
+ async: !1,
194
+ entries: e,
195
+ message: t,
196
+ get "~standard"() {
197
+ return /* @__PURE__ */ u(this);
198
+ },
199
+ "~run"(e, t) {
200
+ let n = e.value;
201
+ if (n && typeof n == "object") {
202
+ e.typed = !0, e.value = {};
203
+ for (let r in this.entries) {
204
+ let i = this.entries[r];
205
+ if (r in n || (i.type === "exact_optional" || i.type === "optional" || i.type === "nullish") && i.default !== void 0) {
206
+ let a = r in n ? n[r] : /* @__PURE__ */ m(i), o = i["~run"]({ value: a }, t);
207
+ if (o.issues) {
208
+ let i = {
209
+ type: "object",
210
+ origin: "value",
211
+ input: n,
212
+ key: r,
213
+ value: a
214
+ };
215
+ for (let t of o.issues) t.path ? t.path.unshift(i) : t.path = [i], e.issues?.push(t);
216
+ if (e.issues ||= o.issues, t.abortEarly) {
217
+ e.typed = !1;
218
+ break;
219
+ }
220
+ }
221
+ o.typed || (e.typed = !1), e.value[r] = o.value;
222
+ } else if (i.fallback !== void 0) e.value[r] = /* @__PURE__ */ p(i);
223
+ else if (i.type !== "exact_optional" && i.type !== "optional" && i.type !== "nullish" && (l(this, "key", e, t, {
224
+ input: void 0,
225
+ expected: `"${r}"`,
226
+ path: [{
227
+ type: "object",
228
+ origin: "key",
229
+ input: n,
230
+ key: r,
231
+ value: n[r]
232
+ }]
233
+ }), t.abortEarly)) break;
234
+ }
235
+ } else l(this, "type", e, t);
236
+ return e;
237
+ }
238
+ };
239
+ }
240
+ /* @__NO_SIDE_EFFECTS__ */
241
+ function x(e, t) {
242
+ return {
243
+ kind: "schema",
244
+ type: "optional",
245
+ reference: x,
246
+ expects: `(${e.expects} | undefined)`,
247
+ async: !1,
248
+ wrapped: e,
249
+ default: t,
250
+ get "~standard"() {
251
+ return /* @__PURE__ */ u(this);
252
+ },
253
+ "~run"(e, t) {
254
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ m(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
255
+ }
256
+ };
257
+ }
258
+ /* @__NO_SIDE_EFFECTS__ */
259
+ function S(e, t, n) {
260
+ return {
261
+ kind: "schema",
262
+ type: "record",
263
+ reference: S,
264
+ expects: "Object",
265
+ async: !1,
266
+ key: e,
267
+ value: t,
268
+ message: n,
269
+ get "~standard"() {
270
+ return /* @__PURE__ */ u(this);
271
+ },
272
+ "~run"(e, t) {
273
+ let n = e.value;
274
+ if (n && typeof n == "object") {
275
+ e.typed = !0, e.value = {};
276
+ for (let r in n) if (/* @__PURE__ */ d(n, r)) {
277
+ let i = n[r], a = this.key["~run"]({ value: r }, t);
278
+ if (a.issues) {
279
+ let o = {
280
+ type: "object",
281
+ origin: "key",
282
+ input: n,
283
+ key: r,
284
+ value: i
285
+ };
286
+ for (let t of a.issues) t.path = [o], e.issues?.push(t);
287
+ if (e.issues ||= a.issues, t.abortEarly) {
288
+ e.typed = !1;
289
+ break;
290
+ }
291
+ }
292
+ let o = this.value["~run"]({ value: i }, t);
293
+ if (o.issues) {
294
+ let a = {
295
+ type: "object",
296
+ origin: "value",
297
+ input: n,
298
+ key: r,
299
+ value: i
300
+ };
301
+ for (let t of o.issues) t.path ? t.path.unshift(a) : t.path = [a], e.issues?.push(t);
302
+ if (e.issues ||= o.issues, t.abortEarly) {
303
+ e.typed = !1;
304
+ break;
305
+ }
306
+ }
307
+ (!a.typed || !o.typed) && (e.typed = !1), a.typed && (e.value[a.value] = o.value);
308
+ }
309
+ } else l(this, "type", e, t);
310
+ return e;
311
+ }
312
+ };
313
+ }
314
+ /* @__NO_SIDE_EFFECTS__ */
315
+ function C(e) {
316
+ return {
317
+ kind: "schema",
318
+ type: "string",
319
+ reference: C,
320
+ expects: "string",
321
+ async: !1,
322
+ message: e,
323
+ get "~standard"() {
324
+ return /* @__PURE__ */ u(this);
325
+ },
326
+ "~run"(e, t) {
327
+ return typeof e.value == "string" ? e.typed = !0 : l(this, "type", e, t), e;
328
+ }
329
+ };
330
+ }
331
+ /* @__NO_SIDE_EFFECTS__ */
332
+ function w(e) {
333
+ let t;
334
+ if (e) for (let n of e) t ? t.push(...n.issues) : t = n.issues;
335
+ return t;
336
+ }
337
+ /* @__NO_SIDE_EFFECTS__ */
338
+ function T(e, t) {
339
+ return {
340
+ kind: "schema",
341
+ type: "union",
342
+ reference: T,
343
+ expects: /* @__PURE__ */ f(e.map((e) => e.expects), "|"),
344
+ async: !1,
345
+ options: e,
346
+ message: t,
347
+ get "~standard"() {
348
+ return /* @__PURE__ */ u(this);
349
+ },
350
+ "~run"(e, t) {
351
+ let n, r, i;
352
+ for (let a of this.options) {
353
+ let o = a["~run"]({ value: e.value }, t);
354
+ if (o.typed) if (o.issues) r ? r.push(o) : r = [o];
355
+ else {
356
+ n = o;
357
+ break;
358
+ }
359
+ else i ? i.push(o) : i = [o];
360
+ }
361
+ if (n) return n;
362
+ if (r) {
363
+ if (r.length === 1) return r[0];
364
+ l(this, "type", e, t, { issues: /* @__PURE__ */ w(r) }), e.typed = !0;
365
+ } else if (i?.length === 1) return i[0];
366
+ else l(this, "type", e, t, { issues: /* @__PURE__ */ w(i) });
367
+ return e;
368
+ }
369
+ };
370
+ }
371
+ //#endregion
372
+ //#region src/component/componentConfig.schema.ts
373
+ var E = (e) => /* @__PURE__ */ T(e.map((e) => /* @__PURE__ */ _(e))), D = /* @__PURE__ */ b({
374
+ "en-au": /* @__PURE__ */ C(),
375
+ "en-gb": /* @__PURE__ */ C(),
376
+ "en-us": /* @__PURE__ */ C(),
377
+ "es-es": /* @__PURE__ */ C()
378
+ }), O = /* @__PURE__ */ b({
379
+ "en-au": /* @__PURE__ */ x(/* @__PURE__ */ C()),
380
+ "en-gb": /* @__PURE__ */ x(/* @__PURE__ */ C()),
381
+ "en-us": /* @__PURE__ */ x(/* @__PURE__ */ C()),
382
+ "es-es": /* @__PURE__ */ x(/* @__PURE__ */ C())
383
+ }), k = E([
384
+ "amber",
385
+ "green",
386
+ "red",
387
+ "other"
388
+ ]), A = E([
389
+ "alpha",
390
+ "beta",
391
+ "generalAvailability",
392
+ "notApplicable",
393
+ "preAlpha",
394
+ "proposed",
395
+ "releaseCandidate",
396
+ "unavailable",
397
+ "underReview"
398
+ ]), j = E([
399
+ "app",
400
+ "connector",
401
+ "connectorConnection",
402
+ "context",
403
+ "contextModelGroup",
404
+ "contextModel",
405
+ "contextModelDimensionGroup",
406
+ "contextModelDimension",
407
+ "contextModelDimensionHierarchy",
408
+ "contextModelEntityGroup",
409
+ "contextModelEntity",
410
+ "contextModelEntityDataItem",
411
+ "contextModelEntityEvent",
412
+ "contextModelEntityPrimaryMeasure",
413
+ "contextModelSecondaryMeasureGroup",
414
+ "contextModelSecondaryMeasure",
415
+ "dataView",
416
+ "dimension",
417
+ "engine",
418
+ "eventQuery",
419
+ "presenter",
420
+ "presenterPresentation",
421
+ "tool"
422
+ ]), M = {
423
+ id: /* @__PURE__ */ C(),
424
+ label: O,
425
+ description: O,
426
+ firstCreatedAt: /* @__PURE__ */ x(/* @__PURE__ */ y()),
427
+ icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
428
+ iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C()),
429
+ lastUpdatedAt: /* @__PURE__ */ v(/* @__PURE__ */ y()),
430
+ status: /* @__PURE__ */ v(/* @__PURE__ */ b({
431
+ id: /* @__PURE__ */ C(),
432
+ color: k,
433
+ label: /* @__PURE__ */ C()
434
+ })),
435
+ statusId: A
436
+ }, N = /* @__PURE__ */ b({
437
+ ...M,
438
+ typeId: j
439
+ }), P = /* @__PURE__ */ b({
440
+ id: /* @__PURE__ */ C(),
441
+ label: O,
442
+ description: O,
443
+ icon: /* @__PURE__ */ v(/* @__PURE__ */ C()),
444
+ iconDark: /* @__PURE__ */ v(/* @__PURE__ */ C()),
445
+ order: /* @__PURE__ */ y(),
446
+ path: /* @__PURE__ */ C()
447
+ });
448
+ //#endregion
449
+ export { D as a, g as c, y as d, b as f, C as h, E as i, _ as l, S as m, N as n, O as o, x as p, P as r, h as s, M as t, v as u };
@@ -0,0 +1,68 @@
1
+ import { n as e } from "./componentConfig.schema-Csigo0y4.js";
2
+ import { DEFAULT_LOCALE_CODE as t } from "./dpuse-shared-locale.es.js";
3
+ //#region src/component/index.ts
4
+ var n = [
5
+ {
6
+ id: "alpha",
7
+ color: "red",
8
+ labels: { "en-gb": "alpha" }
9
+ },
10
+ {
11
+ id: "beta",
12
+ color: "amber",
13
+ labels: { "en-gb": "beta" }
14
+ },
15
+ {
16
+ id: "generalAvailability",
17
+ color: "green",
18
+ labels: { "en-gb": "" }
19
+ },
20
+ {
21
+ id: "notApplicable",
22
+ color: "green",
23
+ labels: { "en-gb": "not-applicable" }
24
+ },
25
+ {
26
+ id: "preAlpha",
27
+ color: "red",
28
+ labels: { "en-gb": "pre-alpha" }
29
+ },
30
+ {
31
+ id: "proposed",
32
+ color: "other",
33
+ labels: { "en-gb": "proposed" }
34
+ },
35
+ {
36
+ id: "releaseCandidate",
37
+ color: "green",
38
+ labels: { "en-gb": "release-candidate" }
39
+ },
40
+ {
41
+ id: "unavailable",
42
+ color: "other",
43
+ labels: { "en-gb": "unavailable" }
44
+ },
45
+ {
46
+ id: "underReview",
47
+ color: "other",
48
+ labels: { "en-gb": "under-review" }
49
+ }
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;
55
+ return {
56
+ id: i.id,
57
+ color: i.color,
58
+ label: e
59
+ };
60
+ }
61
+ return {
62
+ id: e,
63
+ color: "other",
64
+ label: e
65
+ };
66
+ }
67
+ //#endregion
68
+ export { e as componentConfigSchema, r as getComponentStatus };