@antelopejs/dms-lang 0.9.0 → 0.9.1
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/README.md +2 -2
- package/dist/utils/resolve.js +8 -3
- package/dist/utils/resolve.js.map +1 -1
- package/frontend-vue/app/build/composables/useCellMoves.ts +2 -1
- package/frontend-vue/app/build/composables/useCellSaves.ts +8 -3
- package/frontend-vue/app/build/composables/useKeySaves.ts +5 -3
- package/frontend-vue/app/build/composables/useQueueToasts.ts +2 -1
- package/frontend-vue/app/composables/translation/useWorkspaceTypes.ts +7 -3
- package/frontend-vue/app/utils/queuePass.ts +5 -1
- package/frontend-vue/package.json +6 -6
- package/frontend-vue/tsconfig.json +1 -1
- package/package.json +11 -11
package/README.md
CHANGED
|
@@ -50,9 +50,9 @@ Restart the backend, then the frontend, and open **Modules › Translations** (`
|
|
|
50
50
|
|
|
51
51
|
| Package | Supported | Tested with |
|
|
52
52
|
| ---------------------------- | ------------------ | ----------- |
|
|
53
|
-
| `@antelopejs/interface-api` | `>=0.3.
|
|
53
|
+
| `@antelopejs/interface-api` | `>=0.3.5 <0.4.0` | `0.3.5` |
|
|
54
54
|
| `@antelopejs/interface-core` | `>=0.5.2 <0.6.0` | `0.5.2` |
|
|
55
|
-
| `@antelopejs/interface-dms` | `>=0.17.
|
|
55
|
+
| `@antelopejs/interface-dms` | `>=0.17.3 <0.18.0` | `0.17.3` |
|
|
56
56
|
|
|
57
57
|
<!-- antelopejs-docs-compat:end -->
|
|
58
58
|
|
package/dist/utils/resolve.js
CHANGED
|
@@ -75,9 +75,14 @@ function addOverrides(row, context) {
|
|
|
75
75
|
if (row.overridden)
|
|
76
76
|
row.overrides = overrides;
|
|
77
77
|
}
|
|
78
|
+
function own(table, key) {
|
|
79
|
+
return table !== undefined && Object.hasOwn(table, key)
|
|
80
|
+
? table[key]
|
|
81
|
+
: undefined;
|
|
82
|
+
}
|
|
78
83
|
function issueLocales(context, row) {
|
|
79
|
-
const base = row.values
|
|
80
|
-
return context.locales.filter((locale) => (0, message_check_1.hasMessageIssue)(locale === context.defaultLocale ? "" : base, row.values
|
|
84
|
+
const base = own(row.values, context.defaultLocale);
|
|
85
|
+
return context.locales.filter((locale) => (0, message_check_1.hasMessageIssue)(locale === context.defaultLocale ? "" : base, own(row.values, locale)));
|
|
81
86
|
}
|
|
82
87
|
function buildFlatRow(context, key) {
|
|
83
88
|
const row = {
|
|
@@ -101,7 +106,7 @@ function needsReview(row, locale) {
|
|
|
101
106
|
(row.outdated?.includes(locale) ?? false));
|
|
102
107
|
}
|
|
103
108
|
function isRowMissing(row, locale) {
|
|
104
|
-
return (0, tree_1.isMissing)(row.values
|
|
109
|
+
return ((0, tree_1.isMissing)(own(row.values, locale)) && (0, tree_1.isMissing)(own(row.inherited, locale)));
|
|
105
110
|
}
|
|
106
111
|
function countMissing(rows, locale) {
|
|
107
112
|
return rows.filter((row) => isRowMissing(row, locale)).length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/utils/resolve.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"resolve.js","sourceRoot":"","sources":["../../src/utils/resolve.ts"],"names":[],"mappings":";;AA+LA,kCAKC;AAED,oCAIC;AAwDD,kCAGC;AAGD,gCASC;AAGD,gCAKC;AAzRD,mCAAiD;AACjD,uCAAiE;AACjE,yCAA6C;AAC7C,iCAAuD;AACvD,mDAAkD;AAClD,yCAAyE;AACzE,qCAA2C;AAC3C,iCAQgB;AAChB,6CAOsB;AAEtB,MAAM,WAAW,GAAG,IAAA,kBAAU,GAAc,CAAC;AAsC7C,SAAS,MAAM,CAAC,OAAoB;IAClC,MAAM,EAAE,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IACtE,OAAO,IAAA,gBAAS,EAAC,IAAI,IAAI,EAAE,EAAE,I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AK,GAAG,gBAAgB,CAAC,IAAA,0BAAa,EAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;IACpE,OAAO,WAAW,CAAC,QAAQ,SAAS,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AAC/E,CAAC;AAGD,SAAgB,UAAU,CAAC,SAAiB;IAC1C,MAAM,IAAI,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IACpC,OAAO;QACL,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,cAAc,EAAE,IAAI,CAAC,cAAc;KACpC,CAAC;AACJ,CAAC;AAGD,SAAgB,UAAU,CACxB,SAAiB,EACjB,GAAW;IAEX,OAAO,WAAW,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -149,7 +149,8 @@ export function focusNeighbourCell(
|
|
|
149
149
|
*/
|
|
150
150
|
export function useCellMoves(options: CellMovesOptions) {
|
|
151
151
|
return {
|
|
152
|
-
targetOf: (cell: CellRef, move: CellMove) =>
|
|
152
|
+
targetOf: (cell: CellRef, move: CellMove) =>
|
|
153
|
+
Object.hasOwn(MOVES, move) ? MOVES[move](options, cell) : null,
|
|
153
154
|
nextMissing: (from: CellRef | null, step: JumpStep) =>
|
|
154
155
|
pickMissing(options, from, step),
|
|
155
156
|
}
|
|
@@ -96,7 +96,8 @@ function failureExpected(
|
|
|
96
96
|
outcome: KeyWriteFailed,
|
|
97
97
|
): ExpectedText {
|
|
98
98
|
const { current, kind } = outcome.failure
|
|
99
|
-
const isOverwritable =
|
|
99
|
+
const isOverwritable =
|
|
100
|
+
kind === 'conflict' && Object.hasOwn(current, address.code)
|
|
100
101
|
return isOverwritable
|
|
101
102
|
? savedText(current[address.code])
|
|
102
103
|
: outcome.expected[address.code]
|
|
@@ -209,7 +210,10 @@ function useCellView(
|
|
|
209
210
|
store.failures.value[idOfCell(address)],
|
|
210
211
|
isPending(address: CellAddress): boolean {
|
|
211
212
|
const id = idOfCell(address)
|
|
212
|
-
return
|
|
213
|
+
return (
|
|
214
|
+
Object.hasOwn(store.pending.value, id) ||
|
|
215
|
+
Object.hasOwn(store.failures.value, id)
|
|
216
|
+
)
|
|
213
217
|
},
|
|
214
218
|
/** A text of the row that could not be saved: the row is not done. */
|
|
215
219
|
hasRowFailure: (workspace: string, key: string): boolean =>
|
|
@@ -252,7 +256,8 @@ function changedElsewhere(
|
|
|
252
256
|
row: FlatTranslationRow | undefined,
|
|
253
257
|
): string | undefined {
|
|
254
258
|
const id = idOfCell(address)
|
|
255
|
-
if (!starts.has(id) ||
|
|
259
|
+
if (!starts.has(id) || Object.hasOwn(store.pending.value, id) || !row)
|
|
260
|
+
return undefined
|
|
256
261
|
const current = savedText(row.values[address.code])
|
|
257
262
|
return current === starts.of(id) ? undefined : (current ?? '')
|
|
258
263
|
}
|
|
@@ -161,7 +161,9 @@ function queueWrite(
|
|
|
161
161
|
const texts = codes.map((code) => ({
|
|
162
162
|
id: saveIdOf(request.workspace, request.key, code),
|
|
163
163
|
text: request.values[code],
|
|
164
|
-
expected: request.expected
|
|
164
|
+
expected: Object.hasOwn(request.expected, code)
|
|
165
|
+
? request.expected[code]
|
|
166
|
+
: undefined,
|
|
165
167
|
}))
|
|
166
168
|
const sendCarried = (expected: ExpectedText[]) =>
|
|
167
169
|
send(
|
|
@@ -300,11 +302,11 @@ export function useEditStarts() {
|
|
|
300
302
|
const starts = ref<Record<string, ExpectedText>>({})
|
|
301
303
|
|
|
302
304
|
return {
|
|
303
|
-
has: (id: string) =>
|
|
305
|
+
has: (id: string) => Object.hasOwn(starts.value, id),
|
|
304
306
|
of: (id: string): ExpectedText => starts.value[id],
|
|
305
307
|
/** Remembers what a text shows as its edit begins (once per edit). */
|
|
306
308
|
begin(id: string, text: ExpectedText) {
|
|
307
|
-
if (!(
|
|
309
|
+
if (!Object.hasOwn(starts.value, id))
|
|
308
310
|
starts.value = withEntry(starts.value, id, text)
|
|
309
311
|
},
|
|
310
312
|
set(id: string, text: ExpectedText) {
|
|
@@ -64,7 +64,8 @@ function announceDeleted(context: ToastContext, key: string, draftText = '') {
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
function showStep({ t, toast }: ToastContext, step: QueueStep | undefined) {
|
|
67
|
-
const title =
|
|
67
|
+
const title =
|
|
68
|
+
step && Object.hasOwn(STEP_TOASTS, step) ? STEP_TOASTS[step] : undefined
|
|
68
69
|
if (!title) return
|
|
69
70
|
toast.add({ title: t(title), color: 'neutral', icon: 'i-ph-arrow-u-up-left' })
|
|
70
71
|
}
|
|
@@ -15,6 +15,10 @@ const KIND_ICONS: Record<WorkspaceKind, string> = {
|
|
|
15
15
|
modules: 'i-ph-puzzle-piece',
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
function iconOf(icons: Record<string, string>, key: string): string {
|
|
19
|
+
return Object.hasOwn(icons, key) ? icons[key] : ''
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
function isWorkspaceType(value: unknown): value is WorkspaceType {
|
|
19
23
|
return typeof value === 'string' && Object.hasOwn(TYPE_ICONS, value)
|
|
20
24
|
}
|
|
@@ -28,10 +32,10 @@ export const useWorkspaceTypes = () => {
|
|
|
28
32
|
.map((value) => ({
|
|
29
33
|
value,
|
|
30
34
|
label: t(`dms_lang.workspace_types.${value}`),
|
|
31
|
-
icon: TYPE_ICONS
|
|
35
|
+
icon: iconOf(TYPE_ICONS, value),
|
|
32
36
|
})),
|
|
33
37
|
)
|
|
34
|
-
const typeIcon = (type: WorkspaceType) => TYPE_ICONS
|
|
38
|
+
const typeIcon = (type: WorkspaceType) => iconOf(TYPE_ICONS, type)
|
|
35
39
|
const typeOf = (value: unknown): WorkspaceType | undefined =>
|
|
36
40
|
isWorkspaceType(value) ? value : undefined
|
|
37
41
|
const typeLabel = (type: WorkspaceType) =>
|
|
@@ -41,7 +45,7 @@ export const useWorkspaceTypes = () => {
|
|
|
41
45
|
typeIcon,
|
|
42
46
|
typeLabel,
|
|
43
47
|
typeOf,
|
|
44
|
-
kindIcon: (kind: WorkspaceKind) => KIND_ICONS
|
|
48
|
+
kindIcon: (kind: WorkspaceKind) => iconOf(KIND_ICONS, kind),
|
|
45
49
|
descriptionMax: WORKSPACE_DESCRIPTION_MAX,
|
|
46
50
|
}
|
|
47
51
|
}
|
|
@@ -47,7 +47,11 @@ export function isPendingKey(
|
|
|
47
47
|
key: string | undefined,
|
|
48
48
|
isOpen: KeyIsOpen,
|
|
49
49
|
): boolean {
|
|
50
|
-
if (
|
|
50
|
+
if (
|
|
51
|
+
key === undefined ||
|
|
52
|
+
(Object.hasOwn(pass.status, key) && pass.status[key] === 'done')
|
|
53
|
+
)
|
|
54
|
+
return false
|
|
51
55
|
return isOpen(key)
|
|
52
56
|
}
|
|
53
57
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dms.frontend.ts",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
|
-
"packageManager": "pnpm@10.
|
|
8
|
+
"packageManager": "pnpm@10.34.9",
|
|
9
9
|
"engines": {
|
|
10
10
|
"@antelopejs/dms-frontend": ">=0.11.4 <0.12.0"
|
|
11
11
|
},
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@antelopejs/core": "~1.24.7",
|
|
23
|
-
"@antelopejs/dms": ">=0.
|
|
24
|
-
"@antelopejs/dms-frontend": ">=0.11.
|
|
25
|
-
"@antelopejs/tooling-configs": "
|
|
23
|
+
"@antelopejs/dms": ">=0.25.0 <0.26.0",
|
|
24
|
+
"@antelopejs/dms-frontend": ">=0.11.11 <0.12.0",
|
|
25
|
+
"@antelopejs/tooling-configs": "^0.10.14",
|
|
26
26
|
"@nuxt/eslint-config": "^1.17.0",
|
|
27
|
-
"@vueuse/core": "^
|
|
28
|
-
"eslint": "^
|
|
27
|
+
"@vueuse/core": "^15.0.0",
|
|
28
|
+
"eslint": "^10.0.0",
|
|
29
29
|
"globals": "^15",
|
|
30
30
|
"prettier": "^3.5.3",
|
|
31
31
|
"prettier-plugin-tailwindcss": "^0.6.11",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "./.dms-types/tsconfig.json",
|
|
3
|
-
"compilerOptions": { "allowJs": true },
|
|
3
|
+
"compilerOptions": { "allowJs": true, "moduleDetection": "force" },
|
|
4
4
|
"include": ["./**/*.ts", "./**/*.vue", "./eslint.config.mjs"],
|
|
5
5
|
"exclude": ["./node_modules", "./.dms-types"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antelopejs/dms-lang",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
4
4
|
"description": "Language and translation management for the AntelopeJS DMS: coverage overview, translation matrix, translation queue and public translation workspaces.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"antelopejs",
|
|
@@ -41,21 +41,21 @@
|
|
|
41
41
|
"registry": "https://registry.npmjs.org/"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
-
"@antelopejs/interface-api": ">=0.3.
|
|
44
|
+
"@antelopejs/interface-api": ">=0.3.5 <0.4.0",
|
|
45
45
|
"@antelopejs/interface-core": ">=0.5.2 <0.6.0",
|
|
46
|
-
"@antelopejs/interface-dms": ">=0.17.
|
|
46
|
+
"@antelopejs/interface-dms": ">=0.17.3 <0.18.0",
|
|
47
47
|
"@intlify/message-compiler": "^11.1.12",
|
|
48
48
|
"zod": "^4.5.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@antelopejs/api": "~1.7.5",
|
|
52
52
|
"@antelopejs/core": "~1.24.7",
|
|
53
|
-
"@antelopejs/dms": ">=0.
|
|
54
|
-
"@antelopejs/dms-frontend": ">=0.11.
|
|
53
|
+
"@antelopejs/dms": ">=0.25.0 <0.26.0",
|
|
54
|
+
"@antelopejs/dms-frontend": ">=0.11.11 <0.12.0",
|
|
55
55
|
"@antelopejs/interface-data-api": ">=0.8.2 <0.9.0",
|
|
56
56
|
"@antelopejs/interface-database": ">=0.4.3 <0.5.0",
|
|
57
57
|
"@antelopejs/interface-database-decorators": ">=0.5.4 <0.6.0",
|
|
58
|
-
"@antelopejs/tooling-configs": "
|
|
58
|
+
"@antelopejs/tooling-configs": "^0.10.14",
|
|
59
59
|
"@playwright/test": "~1.65.0",
|
|
60
60
|
"@types/chai": "^5.2.3",
|
|
61
61
|
"@types/mocha": "^10.0.10",
|
|
@@ -67,8 +67,8 @@
|
|
|
67
67
|
"mocha": "^12.0.0",
|
|
68
68
|
"mongodb-memory-server": "^11.3.0",
|
|
69
69
|
"mongodb-memory-server-core": "^11.2.0",
|
|
70
|
-
"oxfmt": "^0.
|
|
71
|
-
"oxlint": "1.
|
|
70
|
+
"oxfmt": "^0.80.0",
|
|
71
|
+
"oxlint": "1.95.0",
|
|
72
72
|
"oxlint-tsgolint": "^7.0.2001",
|
|
73
73
|
"pixelmatch": "^8.0.0",
|
|
74
74
|
"playwright-core": "^1.65.1",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
}
|
|
92
92
|
},
|
|
93
93
|
"dmsFrontend": "dist/frontend-module.js",
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "7df577219ad0f27a3bdaa7b1b640a6c5ee53a1cb",
|
|
95
95
|
"scripts": {
|
|
96
96
|
"build": "rimraf dist && tsc",
|
|
97
97
|
"dev:frontend": "pnpm --dir playground frontend:dev",
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
"lint": "ajs dms prepare-types --out frontend-vue/.dms-types --quiet && oxlint && pnpm --dir frontend-vue lint && node node_modules/@antelopejs/dms/frontend-vue/scripts/check-api-error-presentation.mjs frontend-vue/app playground/frontend-vue && node scripts/check-locales.mts && node scripts/check-dms-versions.mjs",
|
|
103
103
|
"typecheck": "tsc --noEmit",
|
|
104
104
|
"format": "oxfmt . && pnpm --dir frontend-vue format",
|
|
105
|
-
"test": "[ -n \"$DMS_PREBUILT\" ] || pnpm run build && DMS_PREBUILT=1 ajs module test . && node --test tests/*.test.mjs",
|
|
106
|
-
"test:unit": "[ -n \"$DMS_PREBUILT\" ] || pnpm run build && mocha dist/test/locale-discovery.test.js dist/test/write-target.test.js && node --test tests/*.test.mjs",
|
|
105
|
+
"test": "[ -n \"$DMS_PREBUILT\" ] || pnpm run build && DMS_PREBUILT=1 ajs module test . --timeout 30000 && node --test tests/*.test.mjs",
|
|
106
|
+
"test:unit": "[ -n \"$DMS_PREBUILT\" ] || pnpm run build && mocha dist/test/locale-discovery.test.js dist/test/write-target.test.js --timeout 30000 && node --test tests/*.test.mjs",
|
|
107
107
|
"test:node": "[ -n \"$DMS_PREBUILT\" ] || pnpm run build && node --test tests/*.test.mjs",
|
|
108
108
|
"test:frontend": "ajs dms verify-source --layer node_modules/@antelopejs/dms/frontend-vue --module frontend-vue",
|
|
109
109
|
"release": "pnpm run typecheck && pnpm run lint && pnpm run format:check && release-it",
|