@messagevisor/catalog 0.0.1 → 0.1.0
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/LICENSE +21 -0
- package/README.md +7 -0
- package/dist/assets/index-CfGbXx4X.css +1 -0
- package/dist/assets/index-r8ugP5JL.js +73 -0
- package/dist/favicon.png +0 -0
- package/dist/index.html +14 -0
- package/dist/logo-text.png +0 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +18 -0
- package/lib/index.js.map +1 -0
- package/lib/node/formatExamplePreview.d.ts +10 -0
- package/lib/node/formatExamplePreview.js +79 -0
- package/lib/node/formatExamplePreview.js.map +1 -0
- package/lib/node/index.d.ts +191 -0
- package/lib/node/index.js +1645 -0
- package/lib/node/index.js.map +1 -0
- package/package.json +59 -13
- package/src/App.tsx +73 -0
- package/src/api.spec.ts +42 -0
- package/src/api.ts +87 -0
- package/src/catalogBrandAssets.ts +8 -0
- package/src/components/details/ConditionTree.tsx +146 -0
- package/src/components/details/FieldGrid.tsx +16 -0
- package/src/components/details/GroupSegmentTree.tsx +73 -0
- package/src/components/details/MarkdownContent.tsx +23 -0
- package/src/components/details/TranslationsTable.tsx +263 -0
- package/src/components/details/UsageLinks.tsx +29 -0
- package/src/components/history/HistoryTimeline.tsx +122 -0
- package/src/components/layout/AppShell.tsx +338 -0
- package/src/components/layout/PageHeader.tsx +13 -0
- package/src/components/layout/Tabs.tsx +35 -0
- package/src/components/lists/EntityList.tsx +451 -0
- package/src/components/ui/Badge.tsx +21 -0
- package/src/components/ui/Button.tsx +12 -0
- package/src/components/ui/Card.tsx +9 -0
- package/src/components/ui/CodeBlock.tsx +7 -0
- package/src/components/ui/EmptyState.tsx +8 -0
- package/src/components/ui/Input.tsx +12 -0
- package/src/components/ui/LabelValueBadge.tsx +55 -0
- package/src/config.ts +2 -0
- package/src/context/CatalogContext.tsx +50 -0
- package/src/entityTypes.ts +49 -0
- package/src/index.ts +1 -0
- package/src/main.tsx +28 -0
- package/src/node/formatExamplePreview.ts +85 -0
- package/src/node/index.spec.ts +713 -0
- package/src/node/index.ts +2007 -0
- package/src/pages/EntityDetailPage.tsx +3345 -0
- package/src/pages/HistoryPage.tsx +26 -0
- package/src/pages/HomePage.tsx +21 -0
- package/src/pages/ListPage.tsx +59 -0
- package/src/styles.css +95 -0
- package/src/theme.ts +36 -0
- package/src/types.ts +127 -0
- package/src/utils/formatCatalogTimestamp.ts +77 -0
- package/src/utils/hashTranslationValue.spec.ts +20 -0
- package/src/utils/hashTranslationValue.ts +22 -0
- package/src/utils/searchQuery.ts +46 -0
package/dist/favicon.png
ADDED
|
Binary file
|
package/dist/index.html
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<link rel="icon" type="image/png" href="/favicon.png" />
|
|
7
|
+
<title>Messagevisor Catalog</title>
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-r8ugP5JL.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-CfGbXx4X.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="root"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|
|
Binary file
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./node";
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./node"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yCAAuB"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FormatPresets } from "@messagevisor/types";
|
|
2
|
+
/**
|
|
3
|
+
* Adds `examplePreview` to format rows under `number.*`, `date.*`, and `time.*` (same preview
|
|
4
|
+
* for all rows that share the same preset bucket, e.g. `number.money`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function attachFormatExamplePreviews<R extends {
|
|
7
|
+
path: string;
|
|
8
|
+
}>(localeKey: string, computedFormats: FormatPresets | undefined, rows: R[]): Array<R & {
|
|
9
|
+
examplePreview?: string;
|
|
10
|
+
}>;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
+
exports.attachFormatExamplePreviews = attachFormatExamplePreviews;
|
|
15
|
+
/** Fixed instants for stable catalog output across builds and locales. */
|
|
16
|
+
var SAMPLE_DATE_UTC = Date.UTC(2004, 2, 14, 15, 9, 26);
|
|
17
|
+
function sampleNumberForPreset(style) {
|
|
18
|
+
switch (style) {
|
|
19
|
+
case "percent":
|
|
20
|
+
return 0.715;
|
|
21
|
+
case "currency":
|
|
22
|
+
return 1234.56;
|
|
23
|
+
case "unit":
|
|
24
|
+
return 3.5;
|
|
25
|
+
default:
|
|
26
|
+
return 1234.567;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
function computePreviewForBucket(locale, kind, presetKey, computedFormats) {
|
|
30
|
+
var _a, _b, _c;
|
|
31
|
+
var bucket = kind === "number"
|
|
32
|
+
? (_a = computedFormats === null || computedFormats === void 0 ? void 0 : computedFormats.number) === null || _a === void 0 ? void 0 : _a[presetKey]
|
|
33
|
+
: kind === "date"
|
|
34
|
+
? (_b = computedFormats === null || computedFormats === void 0 ? void 0 : computedFormats.date) === null || _b === void 0 ? void 0 : _b[presetKey]
|
|
35
|
+
: (_c = computedFormats === null || computedFormats === void 0 ? void 0 : computedFormats.time) === null || _c === void 0 ? void 0 : _c[presetKey];
|
|
36
|
+
if (!bucket || typeof bucket !== "object" || Array.isArray(bucket)) {
|
|
37
|
+
return undefined;
|
|
38
|
+
}
|
|
39
|
+
try {
|
|
40
|
+
if (kind === "number") {
|
|
41
|
+
var opts = bucket;
|
|
42
|
+
var sample = sampleNumberForPreset(opts.style);
|
|
43
|
+
return new Intl.NumberFormat(locale, opts).format(sample);
|
|
44
|
+
}
|
|
45
|
+
var sampleDate = new Date(SAMPLE_DATE_UTC);
|
|
46
|
+
return new Intl.DateTimeFormat(locale, bucket).format(sampleDate);
|
|
47
|
+
}
|
|
48
|
+
catch (_d) {
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Adds `examplePreview` to format rows under `number.*`, `date.*`, and `time.*` (same preview
|
|
54
|
+
* for all rows that share the same preset bucket, e.g. `number.money`).
|
|
55
|
+
*/
|
|
56
|
+
function attachFormatExamplePreviews(localeKey, computedFormats, rows) {
|
|
57
|
+
var cache = new Map();
|
|
58
|
+
return rows.map(function (row) {
|
|
59
|
+
var segments = row.path.split(".").filter(Boolean);
|
|
60
|
+
if (segments.length < 2) {
|
|
61
|
+
return row;
|
|
62
|
+
}
|
|
63
|
+
var kind = segments[0];
|
|
64
|
+
if (kind !== "number" && kind !== "date" && kind !== "time") {
|
|
65
|
+
return row;
|
|
66
|
+
}
|
|
67
|
+
var presetKey = segments[1];
|
|
68
|
+
var cacheKey = "".concat(kind, ".").concat(presetKey);
|
|
69
|
+
if (!cache.has(cacheKey)) {
|
|
70
|
+
cache.set(cacheKey, computePreviewForBucket(localeKey, kind, presetKey, computedFormats));
|
|
71
|
+
}
|
|
72
|
+
var preview = cache.get(cacheKey);
|
|
73
|
+
if (!preview) {
|
|
74
|
+
return row;
|
|
75
|
+
}
|
|
76
|
+
return __assign(__assign({}, row), { examplePreview: preview });
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=formatExamplePreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatExamplePreview.js","sourceRoot":"","sources":["../../src/node/formatExamplePreview.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import type { FormatPresets, Locale, Target } from "@messagevisor/types";
|
|
2
|
+
export interface CatalogPluginParsedOptions {
|
|
3
|
+
_: string[];
|
|
4
|
+
[key: string]: any;
|
|
5
|
+
}
|
|
6
|
+
export interface CatalogPluginHandlerOptions {
|
|
7
|
+
rootDirectoryPath: string;
|
|
8
|
+
projectConfig: any;
|
|
9
|
+
datasource: any;
|
|
10
|
+
parsed: CatalogPluginParsedOptions;
|
|
11
|
+
}
|
|
12
|
+
export interface CatalogPlugin {
|
|
13
|
+
command: string;
|
|
14
|
+
handler: (options: CatalogPluginHandlerOptions) => Promise<void | boolean>;
|
|
15
|
+
examples: {
|
|
16
|
+
command: string;
|
|
17
|
+
description: string;
|
|
18
|
+
}[];
|
|
19
|
+
}
|
|
20
|
+
export interface CatalogRuntime {
|
|
21
|
+
mergeFormats: (parent?: FormatPresets, child?: FormatPresets) => FormatPresets | undefined;
|
|
22
|
+
resolveFormats: (localeKey: string, locales: Record<string, Locale>, target?: Target) => FormatPresets | undefined;
|
|
23
|
+
getProjectSetExecutions: (projectConfig: any, datasource: any, selectedSet?: string) => Promise<Array<{
|
|
24
|
+
set: string;
|
|
25
|
+
projectConfig: any;
|
|
26
|
+
datasource: any;
|
|
27
|
+
}>>;
|
|
28
|
+
resolveExamples: (projectConfig: any, datasource: any, options?: {
|
|
29
|
+
set?: string;
|
|
30
|
+
locale?: string;
|
|
31
|
+
message?: string;
|
|
32
|
+
exampleIndex?: number | string;
|
|
33
|
+
matrixIndex?: number | string;
|
|
34
|
+
descriptionPattern?: string | RegExp;
|
|
35
|
+
translationPattern?: string | RegExp;
|
|
36
|
+
onlyMessages?: boolean;
|
|
37
|
+
onlyLocales?: boolean;
|
|
38
|
+
}) => Promise<{
|
|
39
|
+
locales: CatalogEvaluatedLocaleExample[];
|
|
40
|
+
messages: CatalogEvaluatedMessageExample[];
|
|
41
|
+
}>;
|
|
42
|
+
findDuplicateTranslations: (projectConfig: any, datasource: any) => Promise<CatalogDuplicateTranslationsResult>;
|
|
43
|
+
}
|
|
44
|
+
export declare const CATALOG_SCHEMA_VERSION = "1";
|
|
45
|
+
export declare const CATALOG_HISTORY_PAGE_SIZE = 50;
|
|
46
|
+
type CatalogEntityType = "locale" | "message" | "attribute" | "segment" | "target";
|
|
47
|
+
export type CatalogGitProvider = "github" | "gitlab" | "bitbucket";
|
|
48
|
+
export type CatalogDevEditorId = "cursor" | "vscode";
|
|
49
|
+
export interface CatalogDevEditor {
|
|
50
|
+
id: CatalogDevEditorId;
|
|
51
|
+
label: string;
|
|
52
|
+
icon: CatalogDevEditorId;
|
|
53
|
+
}
|
|
54
|
+
interface CatalogEvaluatedMessageExample {
|
|
55
|
+
set?: string;
|
|
56
|
+
message: string;
|
|
57
|
+
locale: string;
|
|
58
|
+
exampleIndex: number;
|
|
59
|
+
matrixIndex?: number;
|
|
60
|
+
description?: string;
|
|
61
|
+
values?: Record<string, unknown>;
|
|
62
|
+
context?: Record<string, unknown>;
|
|
63
|
+
formats?: FormatPresets;
|
|
64
|
+
currency?: string;
|
|
65
|
+
timeZone?: string;
|
|
66
|
+
evaluatedTranslation: unknown;
|
|
67
|
+
}
|
|
68
|
+
interface CatalogEvaluatedLocaleExample {
|
|
69
|
+
set?: string;
|
|
70
|
+
locale: string;
|
|
71
|
+
sourceLocale: string;
|
|
72
|
+
exampleIndex: number;
|
|
73
|
+
matrixIndex?: number;
|
|
74
|
+
description?: string;
|
|
75
|
+
rawMessage?: string;
|
|
76
|
+
message?: string;
|
|
77
|
+
originalTranslation?: string;
|
|
78
|
+
values?: Record<string, unknown>;
|
|
79
|
+
context?: Record<string, unknown>;
|
|
80
|
+
formats?: FormatPresets;
|
|
81
|
+
currency?: string;
|
|
82
|
+
timeZone?: string;
|
|
83
|
+
evaluatedTranslation: unknown;
|
|
84
|
+
}
|
|
85
|
+
interface CatalogDuplicateTranslationSource {
|
|
86
|
+
messageKey: string;
|
|
87
|
+
locale: string;
|
|
88
|
+
}
|
|
89
|
+
interface CatalogDuplicateTranslationValue {
|
|
90
|
+
value: string;
|
|
91
|
+
messageKeys: string[];
|
|
92
|
+
sources: CatalogDuplicateTranslationSource[];
|
|
93
|
+
}
|
|
94
|
+
interface CatalogDuplicateTranslationsLocaleResult {
|
|
95
|
+
locale: string;
|
|
96
|
+
duplicateValues: CatalogDuplicateTranslationValue[];
|
|
97
|
+
}
|
|
98
|
+
interface CatalogDuplicateTranslationsSetResult {
|
|
99
|
+
set: string | null;
|
|
100
|
+
locales: CatalogDuplicateTranslationsLocaleResult[];
|
|
101
|
+
}
|
|
102
|
+
interface CatalogDuplicateTranslationsResult {
|
|
103
|
+
summary: {
|
|
104
|
+
sets: number;
|
|
105
|
+
locales: number;
|
|
106
|
+
duplicateValues: number;
|
|
107
|
+
duplicateMessageKeys: number;
|
|
108
|
+
};
|
|
109
|
+
results: CatalogDuplicateTranslationsSetResult[];
|
|
110
|
+
}
|
|
111
|
+
export interface CatalogExportOptions {
|
|
112
|
+
outDir?: string;
|
|
113
|
+
copyAssets?: boolean;
|
|
114
|
+
browserRouter?: boolean;
|
|
115
|
+
dev?: boolean;
|
|
116
|
+
devEditors?: CatalogDevEditor[];
|
|
117
|
+
}
|
|
118
|
+
export interface CatalogServeOptions {
|
|
119
|
+
outDir?: string;
|
|
120
|
+
port?: number | string;
|
|
121
|
+
browserRouter?: boolean;
|
|
122
|
+
liveReload?: boolean;
|
|
123
|
+
}
|
|
124
|
+
export interface CatalogServerHandle {
|
|
125
|
+
close: () => Promise<void>;
|
|
126
|
+
triggerReload: () => void;
|
|
127
|
+
}
|
|
128
|
+
export declare function exportCatalog(runtime: CatalogRuntime, rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogExportOptions): Promise<{
|
|
129
|
+
outputDirectoryPath: any;
|
|
130
|
+
manifest: {
|
|
131
|
+
schemaVersion: string;
|
|
132
|
+
generatedAt: string;
|
|
133
|
+
router: string;
|
|
134
|
+
sets: any;
|
|
135
|
+
setKeys: string[];
|
|
136
|
+
dev: {
|
|
137
|
+
editors: CatalogDevEditor[];
|
|
138
|
+
};
|
|
139
|
+
links: {
|
|
140
|
+
provider: CatalogGitProvider;
|
|
141
|
+
repository: string;
|
|
142
|
+
source: string;
|
|
143
|
+
commit: string;
|
|
144
|
+
};
|
|
145
|
+
paths: {
|
|
146
|
+
projectHistory: string;
|
|
147
|
+
root: string;
|
|
148
|
+
sets: {
|
|
149
|
+
[k: string]: string;
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
counts: {
|
|
153
|
+
[k: string]: Record<CatalogEntityType, number>;
|
|
154
|
+
};
|
|
155
|
+
};
|
|
156
|
+
}>;
|
|
157
|
+
export declare function serveCatalog(runtime: CatalogRuntime, rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogServeOptions): Promise<CatalogServerHandle>;
|
|
158
|
+
export declare function createCatalogApi(runtime: CatalogRuntime): {
|
|
159
|
+
exportCatalog: (rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogExportOptions) => Promise<{
|
|
160
|
+
outputDirectoryPath: any;
|
|
161
|
+
manifest: {
|
|
162
|
+
schemaVersion: string;
|
|
163
|
+
generatedAt: string;
|
|
164
|
+
router: string;
|
|
165
|
+
sets: any;
|
|
166
|
+
setKeys: string[];
|
|
167
|
+
dev: {
|
|
168
|
+
editors: CatalogDevEditor[];
|
|
169
|
+
};
|
|
170
|
+
links: {
|
|
171
|
+
provider: CatalogGitProvider;
|
|
172
|
+
repository: string;
|
|
173
|
+
source: string;
|
|
174
|
+
commit: string;
|
|
175
|
+
};
|
|
176
|
+
paths: {
|
|
177
|
+
projectHistory: string;
|
|
178
|
+
root: string;
|
|
179
|
+
sets: {
|
|
180
|
+
[k: string]: string;
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
counts: {
|
|
184
|
+
[k: string]: Record<CatalogEntityType, number>;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}>;
|
|
188
|
+
serveCatalog: (rootDirectoryPath: string, projectConfig: any, datasource: any, options?: CatalogServeOptions) => Promise<CatalogServerHandle>;
|
|
189
|
+
};
|
|
190
|
+
export declare function createCatalogPlugin(runtime: CatalogRuntime, api?: ReturnType<typeof createCatalogApi>): CatalogPlugin;
|
|
191
|
+
export {};
|