@dpuse/dpuse-shared 0.3.863 → 0.3.867

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 (46) hide show
  1. package/README.md +30 -84
  2. package/dist/dpuse-shared.es.js +1473 -0
  3. package/dist/dpuse-shared.es.js.map +1 -0
  4. package/dist/types/src/index.d.ts +24 -0
  5. package/package.json +10 -110
  6. package/dist/componentConfig.schema-DT3mO5rS.js +0 -416
  7. package/dist/componentConfig.schema-DT3mO5rS.js.map +0 -1
  8. package/dist/dpuse-shared-component.es.js +0 -53
  9. package/dist/dpuse-shared-component.es.js.map +0 -1
  10. package/dist/dpuse-shared-componentConnection.es.js +0 -0
  11. package/dist/dpuse-shared-componentContext.es.js +0 -0
  12. package/dist/dpuse-shared-componentContextModel.es.js +0 -0
  13. package/dist/dpuse-shared-componentContextModelDimension.es.js +0 -0
  14. package/dist/dpuse-shared-componentContextModelDimensionHierarchy.es.js +0 -0
  15. package/dist/dpuse-shared-componentContextModelEntity.es.js +0 -0
  16. package/dist/dpuse-shared-componentContextModelEntityDataItem.es.js +0 -0
  17. package/dist/dpuse-shared-componentContextModelEntityEvent.es.js +0 -0
  18. package/dist/dpuse-shared-componentContextModelEntityPrimaryMeasure.es.js +0 -0
  19. package/dist/dpuse-shared-componentContextModelSecondaryMeasure.es.js +0 -0
  20. package/dist/dpuse-shared-componentDataView.es.js +0 -18
  21. package/dist/dpuse-shared-componentDataView.es.js.map +0 -1
  22. package/dist/dpuse-shared-componentEventQuery.es.js +0 -0
  23. package/dist/dpuse-shared-componentModule.es.js +0 -0
  24. package/dist/dpuse-shared-componentModuleConnector.es.js +0 -182
  25. package/dist/dpuse-shared-componentModuleConnector.es.js.map +0 -1
  26. package/dist/dpuse-shared-componentModuleCookbook.es.js +0 -11
  27. package/dist/dpuse-shared-componentModuleCookbook.es.js.map +0 -1
  28. package/dist/dpuse-shared-componentModuleEngine.es.js +0 -0
  29. package/dist/dpuse-shared-componentModulePresenter.es.js +0 -15
  30. package/dist/dpuse-shared-componentModulePresenter.es.js.map +0 -1
  31. package/dist/dpuse-shared-componentModuleTool.es.js +0 -29
  32. package/dist/dpuse-shared-componentModuleTool.es.js.map +0 -1
  33. package/dist/dpuse-shared-componentPresentation.es.js +0 -0
  34. package/dist/dpuse-shared-componentRecipe.es.js +0 -0
  35. package/dist/dpuse-shared-encoding.es.js +0 -467
  36. package/dist/dpuse-shared-encoding.es.js.map +0 -1
  37. package/dist/dpuse-shared-errors.es.js +0 -150
  38. package/dist/dpuse-shared-errors.es.js.map +0 -1
  39. package/dist/dpuse-shared-locale.es.js +0 -28
  40. package/dist/dpuse-shared-locale.es.js.map +0 -1
  41. package/dist/dpuse-shared-utilities.es.js +0 -109
  42. package/dist/dpuse-shared-utilities.es.js.map +0 -1
  43. package/dist/label-DexpXrnC.js +0 -19
  44. package/dist/label-DexpXrnC.js.map +0 -1
  45. package/dist/moduleConfig.schema-aYmFWSrn.js +0 -22
  46. package/dist/moduleConfig.schema-aYmFWSrn.js.map +0 -1
@@ -1,28 +0,0 @@
1
- import { i as e, n as t, r as n, t as r } from "./label-DexpXrnC.js";
2
- //#region src/locale/index.ts
3
- function i(e, t) {
4
- return {
5
- ...e,
6
- label: e.label[t] ?? e.id,
7
- description: e.description[t] ?? e.description.en ?? "",
8
- verb: e.verb?.[t] ?? void 0
9
- };
10
- }
11
- function a(e, t, n = !1) {
12
- let r = e.map((e) => ({
13
- ...e,
14
- label: e.label[t] ?? e.id,
15
- description: e.description[t] ?? e.description.en ?? "",
16
- verb: e.verb?.[t] ?? void 0
17
- }));
18
- return n ? r.toSorted((e, t) => e.label.localeCompare(t.label) || e.id.localeCompare(t.id)) : r;
19
- }
20
- function o(e, t) {
21
- return {
22
- ...e,
23
- label: e.label[t] ?? e.id,
24
- description: e.description[t] ?? e.description.en ?? ""
25
- };
26
- }
27
- //#endregion
28
- export { r as DEFAULT_LOCALE_ID, t as SUPPORTED_LANGUAGES, n as createLabelMap, i as localiseConfig, a as localiseConfigs, o as localiseReference, e as resolveLabel };
@@ -1 +0,0 @@
1
- {"version":3,"file":"dpuse-shared-locale.es.js","names":[],"sources":["../src/locale/index.ts"],"sourcesContent":["// ── DPUse Framework\nimport { DEFAULT_LOCALE_ID } from './label';\nimport type { LocaleDescription, LocaleId, LocaleLabel } from './label';\n\n// The label vocabulary is re-exported so that the published '@dpuse/dpuse-shared/locale' entry point stays one import\n// for consumers, while modules inside this package can depend on '@/locale/label' alone.\nexport * from './label';\n\n// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport type LocalisedConfig<T> = Omit<T, 'label' | 'description' | 'verb'> & { label: string; description: string; verb?: string | undefined };\n\ninterface UnlocalisedConfig {\n id: string;\n label: LocaleLabel;\n description: LocaleDescription;\n verb?: LocaleLabel | undefined;\n}\n\nexport type LocalisedReference<T> = Omit<T, 'label' | 'description'> & { label: string; description: string };\n\ninterface UnlocalisedReference {\n id: string;\n label: LocaleLabel;\n description: LocaleDescription;\n}\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function localiseConfig<T extends UnlocalisedConfig>(config: T, localeId: LocaleId): LocalisedConfig<T> {\n return {\n ...config,\n label: config.label[localeId] ?? config.id,\n description: config.description[localeId] ?? config.description[DEFAULT_LOCALE_ID] ?? '',\n verb: config.verb?.[localeId] ?? undefined\n };\n}\n\nexport function localiseConfigs<T extends UnlocalisedConfig>(configs: T[], localeId: LocaleId, isResultSorted = false): LocalisedConfig<T>[] {\n const mapped = configs.map((config) => ({\n ...config,\n label: config.label[localeId] ?? config.id,\n description: config.description[localeId] ?? config.description[DEFAULT_LOCALE_ID] ?? '',\n verb: config.verb?.[localeId] ?? undefined\n }));\n return isResultSorted ? mapped.toSorted((a, b) => a.label.localeCompare(b.label) || a.id.localeCompare(b.id)) : mapped;\n}\n\nexport function localiseReference<T extends UnlocalisedReference>(reference: T, localeId: LocaleId): LocalisedReference<T> {\n return {\n ...reference,\n label: reference.label[localeId] ?? reference.id,\n description: reference.description[localeId] ?? reference.description[DEFAULT_LOCALE_ID] ?? ''\n };\n}\n"],"mappings":";;AA6BA,SAAgB,EAA4C,GAAW,GAAwC;CAC3G,OAAO;EACH,GAAG;EACH,OAAO,EAAO,MAAM,MAAa,EAAO;EACxC,aAAa,EAAO,YAAY,MAAa,EAAO,YAAA,MAAkC;EACtF,MAAM,EAAO,OAAO,MAAa,KAAA;CACrC;AACJ;AAEA,SAAgB,EAA6C,GAAc,GAAoB,IAAiB,IAA6B;CACzI,IAAM,IAAS,EAAQ,KAAK,OAAY;EACpC,GAAG;EACH,OAAO,EAAO,MAAM,MAAa,EAAO;EACxC,aAAa,EAAO,YAAY,MAAa,EAAO,YAAA,MAAkC;EACtF,MAAM,EAAO,OAAO,MAAa,KAAA;CACrC,EAAE;CACF,OAAO,IAAiB,EAAO,UAAU,GAAG,MAAM,EAAE,MAAM,cAAc,EAAE,KAAK,KAAK,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC,IAAI;AACpH;AAEA,SAAgB,EAAkD,GAAc,GAA2C;CACvH,OAAO;EACH,GAAG;EACH,OAAO,EAAU,MAAM,MAAa,EAAU;EAC9C,aAAa,EAAU,YAAY,MAAa,EAAU,YAAA,MAAkC;CAChG;AACJ"}
@@ -1,109 +0,0 @@
1
- //#region src/utilities/index.ts
2
- var e = [
3
- [
4
- "days",
5
- 864e5,
6
- (e) => e === 1 ? "1 day" : `${u(e)} days`
7
- ],
8
- [
9
- "hrs",
10
- 36e5,
11
- (e) => e === 1 ? "1 hr" : `${u(e)} hrs`
12
- ],
13
- [
14
- "mins",
15
- 6e4,
16
- (e) => e === 1 ? "1 min" : `${u(e)} mins`
17
- ],
18
- [
19
- "secs",
20
- 1e3,
21
- (e) => e === 1 ? "1 sec" : `${u(e)} secs`
22
- ],
23
- [
24
- "ms",
25
- 0,
26
- (e) => `${u(e)} ms`
27
- ]
28
- ], t = "en", n = /* @__PURE__ */ new Map();
29
- function r(e) {
30
- switch (e) {
31
- case "Edm.Binary": return "unknown";
32
- case "Edm.Boolean": return "boolean";
33
- case "Edm.Byte": return "wholeNumber";
34
- case "Edm.DateTime": return "moment";
35
- case "Edm.DateTimeOffset": return "moment";
36
- case "Edm.Decimal": return "decimalNumber";
37
- case "Edm.Double": return "decimalNumber";
38
- case "Edm.Guid": return "string";
39
- case "Edm.Int16": return "wholeNumber";
40
- case "Edm.Int32": return "wholeNumber";
41
- case "Edm.Int64": return "wholeNumber";
42
- case "Edm.SByte": return "wholeNumber";
43
- case "Edm.Single": return "decimalNumber";
44
- case "Edm.String": return "string";
45
- case "Edm.Time": return "momentTime";
46
- default: return "unknown";
47
- }
48
- }
49
- function i(e) {
50
- if (e) {
51
- let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
52
- return n <= t || n === -1 ? e : e.slice(0, Math.max(0, n));
53
- }
54
- }
55
- function a(e) {
56
- if (e) {
57
- let t = e.lastIndexOf("/") + 1, n = e.lastIndexOf(".");
58
- if (n <= t) return;
59
- if (n !== -1) return e.slice(Math.max(0, n + 1));
60
- }
61
- }
62
- function o(e, r = 2, i = r, a = t) {
63
- if (e == null) return "";
64
- let o = `${a}decimal${String(r)}.${String(i)}`, s = n.get(o);
65
- return s || (s = new Intl.NumberFormat(a, {
66
- localeMatcher: "best fit",
67
- maximumFractionDigits: r,
68
- minimumFractionDigits: i,
69
- minimumIntegerDigits: 1,
70
- style: "decimal",
71
- useGrouping: !0
72
- }), n.set(o, s)), s.format(e);
73
- }
74
- function s(e, t = 1) {
75
- return e == null ? "" : e < 1e3 ? u(e) : e < 1e6 ? `${o(e / 1e3, t, 0)}K` : e < 1e9 ? `${o(e / 1e6, t, 0)}M` : e < 0xe8d4a51000 ? `${o(e / 1e9, t, 0)}B` : `${o(e / 0xe8d4a51000, t, 0)}T`;
76
- }
77
- function c(e, t = 1) {
78
- return e == null ? "" : e === 1 ? "1 byte" : e < 1024 ? `${u(e)} bytes` : e < 1048576 ? `${o(e / 1024, t, 0)} KB` : e < 1073741824 ? `${o(e / 1048576, t, 0)} MB` : e < 1099511627776 ? `${o(e / 1073741824, t, 0)} GB` : `${o(e / 1099511627776, t, 0)} TB`;
79
- }
80
- function l(t, n = "ms") {
81
- if (t == null) return "";
82
- let r = e.findIndex(([, e]) => t >= e), i = r === -1 ? e.length - 1 : r, a = e.findIndex(([e]) => e === n), o = e.slice(i, Math.max(a, i) + 1), s = [], c = t;
83
- for (let [, e, t] of o) c < e || c === 0 && s.length > 0 || (s.push(t(e > 0 ? Math.floor(c / e) : c)), c %= e > 0 ? e : 1);
84
- return s.join(" ");
85
- }
86
- function u(e, r = t) {
87
- if (e == null) return "";
88
- let i = `${r}decimal0.0`, a = n.get(i);
89
- return a || (a = new Intl.NumberFormat(r, {
90
- localeMatcher: "best fit",
91
- maximumFractionDigits: 0,
92
- minimumFractionDigits: 0,
93
- minimumIntegerDigits: 1,
94
- style: "decimal",
95
- useGrouping: !0
96
- }), n.set(i, a)), a.format(e);
97
- }
98
- function d(e) {
99
- switch (e?.toLowerCase()) {
100
- case "csv": return "text/csv";
101
- case "tab":
102
- case "tsv": return "text/tab-separated-values";
103
- case "xls": return "application/vnd.ms-excel";
104
- case "xlsx": return "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
105
- default: return "application/octet-stream";
106
- }
107
- }
108
- //#endregion
109
- export { r as convertODataTypeIdToUsageTypeId, a as extractExtensionFromPath, i as extractNameFromPath, o as formatNumberAsDecimalNumber, l as formatNumberAsDuration, s as formatNumberAsSize, c as formatNumberAsStorageSize, u as formatNumberAsWholeNumber, d as lookupMimeTypeForExtension };
@@ -1 +0,0 @@
1
- {"version":3,"file":"dpuse-shared-utilities.es.js","names":[],"sources":["../src/utilities/index.ts"],"sourcesContent":["// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\ntype DurationLevel = 'days' | 'hrs' | 'mins' | 'secs' | 'ms';\ntype DurationLevelTuple = [DurationLevel, number, (n: number) => string];\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nconst DURATION_LEVELS: DurationLevelTuple[] = [\n ['days', 86_400_000, (n: number): string => (n === 1 ? '1 day' : `${formatNumberAsWholeNumber(n)} days`)],\n ['hrs', 3_600_000, (n: number): string => (n === 1 ? '1 hr' : `${formatNumberAsWholeNumber(n)} hrs`)],\n ['mins', 60_000, (n: number): string => (n === 1 ? '1 min' : `${formatNumberAsWholeNumber(n)} mins`)],\n ['secs', 1000, (n: number): string => (n === 1 ? '1 sec' : `${formatNumberAsWholeNumber(n)} secs`)],\n ['ms', 0, (n: number): string => `${formatNumberAsWholeNumber(n)} ms`]\n];\n\nconst NUMBER_FORMATTER_DEFAULT_LOCALE = 'en';\nconst NUMBER_FORMATTER_MAP = new Map<string, Intl.NumberFormat>();\n\n// ── Actions - Data Type Conversion ───────────────────────────────────────────────────────────────────────────────────\n\n// See: https://www.odata.org/documentation/odata-version-2-0/overview/.\nexport function convertODataTypeIdToUsageTypeId(oDataTypeId: string): string {\n switch (oDataTypeId) {\n case 'Edm.Binary':\n return 'unknown'; // Binary...\n case 'Edm.Boolean':\n return 'boolean';\n case 'Edm.Byte':\n return 'wholeNumber';\n case 'Edm.DateTime':\n return 'moment'; // DateTime...\n case 'Edm.DateTimeOffset':\n return 'moment'; // DateTimeOffset...\n case 'Edm.Decimal':\n return 'decimalNumber';\n case 'Edm.Double':\n return 'decimalNumber';\n case 'Edm.Guid':\n return 'string';\n case 'Edm.Int16':\n return 'wholeNumber';\n case 'Edm.Int32':\n return 'wholeNumber';\n case 'Edm.Int64':\n return 'wholeNumber';\n case 'Edm.SByte':\n return 'wholeNumber';\n case 'Edm.Single':\n return 'decimalNumber';\n case 'Edm.String':\n return 'string';\n case 'Edm.Time':\n return 'momentTime'; // Time...\n default:\n return 'unknown';\n }\n}\n\n// ── Actions - File Path Segment Extraction ───────────────────────────────────────────────────────────────────────────\n\n// Extract the path without its final basename extension.\n// Dots in parent directories are ignored, and leading dots in the basename\n// are treated as part of dotfile names rather than as an extension separator.\nexport function extractNameFromPath(itemPath: string): string | undefined {\n if (itemPath) {\n const lastSeparatorIndex = itemPath.lastIndexOf('/');\n const basenameStartIndex = lastSeparatorIndex + 1;\n const lastExtensionIndex = itemPath.lastIndexOf('.');\n if (lastExtensionIndex <= basenameStartIndex) return itemPath;\n return lastExtensionIndex === -1 ? itemPath : itemPath.slice(0, Math.max(0, lastExtensionIndex));\n }\n return undefined;\n}\n\n// Extract only the final basename extension.\n// Returns undefined when the basename has no extension, including dotfiles such\n// as .gitignore where the only dot is the leading character of the basename.\nexport function extractExtensionFromPath(itemPath: string): string | undefined {\n if (itemPath) {\n const lastSeparatorIndex = itemPath.lastIndexOf('/');\n const basenameStartIndex = lastSeparatorIndex + 1;\n const lastExtensionIndex = itemPath.lastIndexOf('.');\n if (lastExtensionIndex <= basenameStartIndex) return undefined;\n if (lastExtensionIndex !== -1) return itemPath.slice(Math.max(0, lastExtensionIndex + 1));\n }\n return undefined;\n}\n\n// ── Actions - String Formatting ──────────────────────────────────────────────────────────────────────────────────────\n\nexport function formatNumberAsDecimalNumber(number?: number, decimalPlaces = 2, minimumFractionDigits = decimalPlaces, locale = NUMBER_FORMATTER_DEFAULT_LOCALE): string {\n if (number == null) return '';\n const formatterId = `${locale}decimal${String(decimalPlaces)}.${String(minimumFractionDigits)}`;\n let numberFormatter = NUMBER_FORMATTER_MAP.get(formatterId);\n if (!numberFormatter) {\n numberFormatter = new Intl.NumberFormat(locale, {\n localeMatcher: 'best fit',\n maximumFractionDigits: decimalPlaces,\n minimumFractionDigits,\n minimumIntegerDigits: 1,\n style: 'decimal',\n useGrouping: true\n });\n NUMBER_FORMATTER_MAP.set(formatterId, numberFormatter);\n }\n return numberFormatter.format(number);\n}\n\nexport function formatNumberAsSize(number?: number, decimalPlaces = 1): string {\n if (number == null) return '';\n if (number < 1000) return formatNumberAsWholeNumber(number);\n if (number < 1_000_000) return `${formatNumberAsDecimalNumber(number / 1000, decimalPlaces, 0)}K`;\n if (number < 1_000_000_000) return `${formatNumberAsDecimalNumber(number / 1_000_000, decimalPlaces, 0)}M`;\n return number < 1_000_000_000_000\n ? `${formatNumberAsDecimalNumber(number / 1_000_000_000, decimalPlaces, 0)}B`\n : `${formatNumberAsDecimalNumber(number / 1_000_000_000_000, decimalPlaces, 0)}T`;\n}\n\nexport function formatNumberAsStorageSize(number?: number, decimalPlaces = 1): string {\n if (number == null) return '';\n if (number === 1) return '1 byte';\n if (number < 1024) return `${formatNumberAsWholeNumber(number)} bytes`;\n if (number < 1_048_576) return `${formatNumberAsDecimalNumber(number / 1024, decimalPlaces, 0)} KB`;\n if (number < 1_073_741_824) return `${formatNumberAsDecimalNumber(number / 1_048_576, decimalPlaces, 0)} MB`;\n return number < 1_099_511_627_776\n ? `${formatNumberAsDecimalNumber(number / 1_073_741_824, decimalPlaces, 0)} GB`\n : `${formatNumberAsDecimalNumber(number / 1_099_511_627_776, decimalPlaces, 0)} TB`;\n}\n\nexport function formatNumberAsDuration(number?: number, stopAt: DurationLevel = 'ms'): string {\n if (number == null) return '';\n\n // Start at the largest unit the value actually fills, so a value below the requested level still reads sensibly\n // rather than as a run of zeroes.\n const startIndex = DURATION_LEVELS.findIndex(([, threshold]) => number >= threshold);\n const firstIndex = startIndex === -1 ? DURATION_LEVELS.length - 1 : startIndex;\n const stopIndex = DURATION_LEVELS.findIndex(([level]) => level === stopAt);\n\n const durationLevels = DURATION_LEVELS.slice(firstIndex, Math.max(stopIndex, firstIndex) + 1);\n const parts: string[] = [];\n let remaining = number;\n for (const [, threshold, format] of durationLevels) {\n if (remaining < threshold || (remaining === 0 && parts.length > 0)) continue;\n parts.push(format(threshold > 0 ? Math.floor(remaining / threshold) : remaining));\n remaining %= threshold > 0 ? threshold : 1;\n }\n return parts.join(' ');\n}\n\nexport function formatNumberAsWholeNumber(number?: number, locale = NUMBER_FORMATTER_DEFAULT_LOCALE): string {\n if (number == null) return '';\n const formatterId = `${locale}decimal0.0`;\n let numberFormatter = NUMBER_FORMATTER_MAP.get(formatterId);\n if (!numberFormatter) {\n numberFormatter = new Intl.NumberFormat(locale, {\n localeMatcher: 'best fit',\n maximumFractionDigits: 0,\n minimumFractionDigits: 0,\n minimumIntegerDigits: 1,\n style: 'decimal',\n useGrouping: true\n });\n NUMBER_FORMATTER_MAP.set(formatterId, numberFormatter);\n }\n return numberFormatter.format(number);\n}\n\n// ── Actions - Lookup ─────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function lookupMimeTypeForExtension(extension?: string): string {\n // Extensions arrive from file names as typed, so 'REPORT.CSV' must resolve the same as 'report.csv'.\n switch (extension?.toLowerCase()) {\n case 'csv':\n return 'text/csv';\n case 'tab':\n case 'tsv':\n return 'text/tab-separated-values';\n case 'xls':\n return 'application/vnd.ms-excel';\n case 'xlsx':\n return 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet';\n default:\n return 'application/octet-stream';\n }\n}\n\n// TODO: Do we need this?\n// // export const establishVendorAccessToken = async (item: Item, accountId: string, sessionAccessToken: string, vendorRefreshURI: string): Promise<string> => {\n// export const establishVendorAccessToken = async (connectionConfig: ConnectionConfig, settings: ReadSettings, vendorRefreshURI: string): Promise<string> => {\n// let accessToken;\n//\n// // If the current dropbox access token expires within 5 minutes then refresh it and return the new one, otherwise return the current one.\n// if (connectionConfig.authorisation[''].expires_at - Date.now() < 300000) {\n// // TODO: Above is WRONG 'item.authorization!['']'. We need to know what authorisation.\n// const headers: HeadersInit = {\n// 'Account-Id': settings.accountId || '',\n// Authorization: settings.sessionAccessToken || '',\n// 'Connection-Id': connectionConfig.id\n// };\n// const response = await fetch(vendorRefreshURI, { headers });\n// if (!response.ok) {\n// const data = {\n// body: {\n// context: 'establishVendorAccessToken',\n// message: await response.text()\n// },\n// statusCode: response.status,\n// statusText: response.statusText\n// };\n// throw new Error('Unable to establish access token.|' + JSON.stringify(data));\n// }\n// accessToken = await response.text();\n// } else {\n// accessToken = connectionConfig.authorisation[''].access_token; // TODO: This is WRONG 'item.authorization!['']'. We need to know what authorisation.\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AAE;AACvF;AAEA,SAAgB,EAAuB,GAAiB,IAAwB,MAAc;CAC1F,IAAI,KAAU,MAAM,OAAO;CAI3B,IAAM,IAAa,EAAgB,WAAW,GAAG,OAAe,KAAU,CAAS,GAC7E,IAAa,MAAe,KAAK,EAAgB,SAAS,IAAI,GAC9D,IAAY,EAAgB,WAAW,CAAC,OAAW,MAAU,CAAM,GAEnE,IAAiB,EAAgB,MAAM,GAAY,KAAK,IAAI,GAAW,CAAU,IAAI,CAAC,GACtF,IAAkB,CAAC,GACrB,IAAY;CAChB,KAAK,IAAM,GAAG,GAAW,MAAW,GAChC,AAAI,IAAY,KAAc,MAAc,KAAK,EAAM,SAAS,MAChE,EAAM,KAAK,EAAO,IAAY,IAAI,KAAK,MAAM,IAAY,CAAS,IAAI,CAAS,CAAC,GAChF,KAAa,IAAY,IAAI,IAAY;CAE7C,OAAO,EAAM,KAAK,GAAG;AACzB;AAEA,SAAgB,EAA0B,GAAiB,IAAS,GAAyC;CACzG,IAAI,KAAU,MAAM,OAAO;CAC3B,IAAM,IAAc,GAAG,EAAO,aAC1B,IAAkB,EAAqB,IAAI,CAAW;CAY1D,OAXK,MACD,IAAkB,IAAI,KAAK,aAAa,GAAQ;EAC5C,eAAe;EACf,uBAAuB;EACvB,uBAAuB;EACvB,sBAAsB;EACtB,OAAO;EACP,aAAa;CACjB,CAAC,GACD,EAAqB,IAAI,GAAa,CAAe,IAElD,EAAgB,OAAO,CAAM;AACxC;AAIA,SAAgB,EAA2B,GAA4B;CAEnE,QAAQ,GAAW,YAAY,GAA/B;EACI,KAAK,OACD,OAAO;EACX,KAAK;EACL,KAAK,OACD,OAAO;EACX,KAAK,OACD,OAAO;EACX,KAAK,QACD,OAAO;EACX,SACI,OAAO;CACf;AACJ"}
@@ -1,19 +0,0 @@
1
- //#region src/locale/label.ts
2
- var e = "en", t = [{
3
- id: "en",
4
- flag: "gb",
5
- label: "English"
6
- }, {
7
- id: "es",
8
- flag: "es",
9
- label: "Español"
10
- }];
11
- function n(e) {
12
- return new Map(Object.entries(e));
13
- }
14
- function r(e, t, n = "en") {
15
- let r = e.get(t);
16
- return r === void 0 ? n === t ? void 0 : e.get(n) : r;
17
- }
18
- //#endregion
19
- export { r as i, t as n, n as r, e as t };
@@ -1 +0,0 @@
1
- {"version":3,"file":"label-DexpXrnC.js","names":[],"sources":["../src/locale/label.ts"],"sourcesContent":["// ── Types ────────────────────────────────────────────────────────────────────────────────────────────────────────────\n\ntype FlagId = 'es' | 'gb';\n\nexport type LocaleId = 'en' | 'es';\n\nexport type LocaleLabel = Partial<Record<LocaleId, string>>;\n\nexport type LocaleDescription = Partial<Record<LocaleId, string>>;\n\nexport type LocaleLabelMap = ReadonlyMap<string, string>;\n\n// ── Constants ────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport const DEFAULT_LOCALE_ID: LocaleId = 'en';\n\nexport const SUPPORTED_LANGUAGES: { id: LocaleId; flag: FlagId; label: string }[] = [\n { id: 'en', flag: 'gb', label: 'English' },\n { id: 'es', flag: 'es', label: 'Español' }\n];\n\n// ── Actions ──────────────────────────────────────────────────────────────────────────────────────────────────────────\n\nexport function createLabelMap(labels: Record<string, string>): LocaleLabelMap {\n return new Map(Object.entries(labels));\n}\n\nexport function resolveLabel(labels: LocaleLabelMap, localeId: string, fallbackLocaleId = DEFAULT_LOCALE_ID): string | undefined {\n const localizedLabel = labels.get(localeId);\n if (localizedLabel !== undefined) return localizedLabel;\n return fallbackLocaleId === localeId ? undefined : labels.get(fallbackLocaleId);\n}\n"],"mappings":";AAcA,IAAa,IAA8B,MAE9B,IAAuE,CAChF;CAAE,IAAI;CAAM,MAAM;CAAM,OAAO;AAAU,GACzC;CAAE,IAAI;CAAM,MAAM;CAAM,OAAO;AAAU,CAC7C;AAIA,SAAgB,EAAe,GAAgD;CAC3E,OAAO,IAAI,IAAI,OAAO,QAAQ,CAAM,CAAC;AACzC;AAEA,SAAgB,EAAa,GAAwB,GAAkB,IAAA,MAA0D;CAC7H,IAAM,IAAiB,EAAO,IAAI,CAAQ;CAE1C,OADI,MAAmB,KAAA,IAChB,MAAqB,IAAW,KAAA,IAAY,EAAO,IAAI,CAAgB,IADrC;AAE7C"}
@@ -1,22 +0,0 @@
1
- import { i as e, l as t, m as n, p as r, t as i } from "./componentConfig.schema-DT3mO5rS.js";
2
- //#region src/component/module/moduleConfig.schema.ts
3
- var a = e([
4
- "app",
5
- "engine",
6
- "connector",
7
- "cookbook",
8
- "presenter",
9
- "tool"
10
- ]), o = {
11
- ...i,
12
- vendorAccountURL: t(n()),
13
- vendorDocumentationURL: t(n()),
14
- vendorHomeURL: t(n()),
15
- version: n()
16
- };
17
- r({
18
- ...o,
19
- typeId: a
20
- });
21
- //#endregion
22
- export { o as t };
@@ -1 +0,0 @@
1
- {"version":3,"file":"moduleConfig.schema-aYmFWSrn.js","names":[],"sources":["../src/component/module/moduleConfig.schema.ts"],"sourcesContent":["// ── External Dependencies & Registrations\nimport { nullable, strictObject, string } from 'valibot';\n\n// ── DPUse Framework\nimport { componentCoreFieldsConfig } from '@/component/componentConfig.schema';\nimport { literalUnion } from '@/schema';\n\n// ── Schemas - Type Identifier ────────────────────────────────────────────────────────────────────────────────────────\n\n// We include 'app' here so we can monitor updates in 'dpuse-app'.\nexport const moduleTypeIdSchema = literalUnion(['app', 'engine', 'connector', 'cookbook', 'presenter', 'tool']);\n\n// ── Schemas - Configuration ──────────────────────────────────────────────────────────────────────────────────────────\n\nexport const moduleConfigCoreFields = {\n ...componentCoreFieldsConfig,\n vendorAccountURL: nullable(string()),\n vendorDocumentationURL: nullable(string()),\n vendorHomeURL: nullable(string()),\n version: string()\n};\n\nexport const moduleConfigSchema = strictObject({\n ...moduleConfigCoreFields,\n typeId: moduleTypeIdSchema\n});\n"],"mappings":";;AAUA,IAAa,IAAqB,EAAa;CAAC;CAAO;CAAU;CAAa;CAAY;CAAa;AAAM,CAAC,GAIjG,IAAyB;CAClC,GAAG;CACH,kBAAkB,EAAS,EAAO,CAAC;CACnC,wBAAwB,EAAS,EAAO,CAAC;CACzC,eAAe,EAAS,EAAO,CAAC;CAChC,SAAS,EAAO;AACpB;AAEkC,EAAa;CAC3C,GAAG;CACH,QAAQ;AACZ,CAAC"}