@g1cloud/bpmn-modeler-next 5.0.0-beta.32 → 5.0.0-beta.34
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/dist/adapter/translationLocaleCopy.d.ts +11 -0
- package/dist/adapter/translationLocaleRestore.d.ts +86 -0
- package/dist/bpmn-modeler-next.css +1 -1
- package/dist/bpmn-modeler.js +5348 -5209
- package/dist/bpmn-modeler.umd.cjs +42 -42
- package/dist/headless/modeler.d.ts +4 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Any = any;
|
|
2
|
+
export declare class TranslationLocaleCopy {
|
|
3
|
+
static $inject: string[];
|
|
4
|
+
constructor(eventBus: Any);
|
|
5
|
+
}
|
|
6
|
+
/** bpmn-js 모듈 — 서비스 이름 = `translationLocaleCopy`. 헤드리스 기본 셋과 `BpmnModelerView` 가 붙인다. */
|
|
7
|
+
export declare const TranslationLocaleCopyModule: {
|
|
8
|
+
__init__: string[];
|
|
9
|
+
translationLocaleCopy: (string | typeof TranslationLocaleCopy)[];
|
|
10
|
+
};
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ScriptKind } from './i18nBackfill';
|
|
2
|
+
type Any = any;
|
|
3
|
+
/** 번역 칸 하나의 상태 — `locale` 없음 = `xml:lang` 이 없는 칸. */
|
|
4
|
+
export interface TranslationCellState {
|
|
5
|
+
locale?: string;
|
|
6
|
+
body: string;
|
|
7
|
+
}
|
|
8
|
+
/** 요소 하나의 번역 칸 상태(문서 순서). */
|
|
9
|
+
export interface TranslationElementState {
|
|
10
|
+
/** moddle 타입(`bpmn:Task` 등). */
|
|
11
|
+
type: string;
|
|
12
|
+
cells: TranslationCellState[];
|
|
13
|
+
}
|
|
14
|
+
/** 문서 한 판본의 번역 칸 상태 — 요소 id → 상태(번역 칸이 있는 DI 평면 요소만). */
|
|
15
|
+
export type TranslationStates = Map<string, TranslationElementState>;
|
|
16
|
+
/** 문서 한 판본의 번역 칸 상태를 뽑는다(문서 무변경). */
|
|
17
|
+
export declare function collectTranslationStates(definitions: Any): TranslationStates;
|
|
18
|
+
interface IndexedState {
|
|
19
|
+
doc: string;
|
|
20
|
+
version: number;
|
|
21
|
+
id: string;
|
|
22
|
+
state: TranslationElementState;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* 근거 색인 — 그룹 문서 전부의 판본(현재본 · 이력)을 담는다. 언어 칸이 하나도 없는 상태는 근거가 될 수 없어 담지 않는다.
|
|
26
|
+
* `doc` = 문서 식별자(호스트 문서 id) · `version` = 판본 번호(`history` 단계가 최근 판본부터 본다).
|
|
27
|
+
*/
|
|
28
|
+
export declare class TranslationStateIndex {
|
|
29
|
+
private readonly byId;
|
|
30
|
+
private readonly byBodies;
|
|
31
|
+
add(doc: string, version: number, states: TranslationStates): void;
|
|
32
|
+
/** @internal */
|
|
33
|
+
sameId(id: string): IndexedState[];
|
|
34
|
+
/** @internal */
|
|
35
|
+
sameBodies(cells: TranslationCellState[]): IndexedState[];
|
|
36
|
+
}
|
|
37
|
+
/** 근거 단계 — `history` 같은 문서 이전 판본 · `lineage` 다른 문서 같은 요소 id · `bodies` id 무관 같은 본문 묶음. */
|
|
38
|
+
export type TranslationLocaleRestoreSource = 'history' | 'lineage' | 'bodies';
|
|
39
|
+
/** 계획 항목이 가리키는 요소. */
|
|
40
|
+
export interface TranslationLocaleRestoreTarget {
|
|
41
|
+
id: string;
|
|
42
|
+
/** moddle 타입. */
|
|
43
|
+
type: string;
|
|
44
|
+
}
|
|
45
|
+
export interface TranslationLocaleRestorePlan {
|
|
46
|
+
/** 되살릴 칸 — 적용은 그 본문의 무언어 칸이 남아 있고 요소에 그 언어가 아직 없을 때만 쓴다. */
|
|
47
|
+
restores: Array<TranslationLocaleRestoreTarget & {
|
|
48
|
+
source: TranslationLocaleRestoreSource;
|
|
49
|
+
cells: Array<{
|
|
50
|
+
body: string;
|
|
51
|
+
locale: string;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
/** 맞는 근거 상태들이 서로 다른 배정을 낸다 — 쓰지 않는다(사람 확인). */
|
|
55
|
+
ambiguous: Array<TranslationLocaleRestoreTarget & {
|
|
56
|
+
source: TranslationLocaleRestoreSource;
|
|
57
|
+
}>;
|
|
58
|
+
/** 근거 언어가 이미 요소에 있다 — 손실 뒤 그 언어를 다시 썼다 · 무언어 칸은 낡은 문구(되살리지 않는다). */
|
|
59
|
+
stale: Array<TranslationLocaleRestoreTarget & {
|
|
60
|
+
body: string;
|
|
61
|
+
locale: string;
|
|
62
|
+
}>;
|
|
63
|
+
/**
|
|
64
|
+
* 후보인데 근거 상태가 없다 — 쓰지 않는다. `script` = 문자 체계(사람 확인 · 문자 판정 쓰기는 범위 밖).
|
|
65
|
+
* 문서에 나오는 언어를 그 요소가 이미 다 가졌으면 되살릴 언어가 없으므로 싣지 않는다(언어 칸 옆의 잔재 칸 — 로컬 실측 7).
|
|
66
|
+
*/
|
|
67
|
+
unresolved: Array<TranslationLocaleRestoreTarget & {
|
|
68
|
+
body: string;
|
|
69
|
+
script: ScriptKind;
|
|
70
|
+
}>;
|
|
71
|
+
}
|
|
72
|
+
export interface TranslationLocaleRestoreContext {
|
|
73
|
+
/** 이 문서의 식별자 — 색인의 `doc` 과 같은 값. */
|
|
74
|
+
doc: string;
|
|
75
|
+
index: TranslationStateIndex;
|
|
76
|
+
/** 문서 이력 첫 판본의 상태 — 그 뒤에 생긴 무언어 칸만 후보다. 없으면 칸 전부가 무언어인 요소만 본다. */
|
|
77
|
+
baseline?: TranslationStates;
|
|
78
|
+
}
|
|
79
|
+
/** 언어 복구 계획 — 문서를 바꾸지 않는다. */
|
|
80
|
+
export declare function planTranslationLocaleRestore(definitions: Any, ctx: TranslationLocaleRestoreContext): TranslationLocaleRestorePlan;
|
|
81
|
+
/**
|
|
82
|
+
* 계획을 문서에 쓴다 — 바꾼 칸 수를 돌려준다. **멱등**이고 계획 뒤 문서가 바뀌었어도 덮지 않는다: 그 본문의 무언어 칸이
|
|
83
|
+
* 남아 있고 요소에 그 언어가 아직 없을 때만 그 칸에 `xml:lang` 을 단다.
|
|
84
|
+
*/
|
|
85
|
+
export declare function applyTranslationLocaleRestore(definitions: Any, plan: TranslationLocaleRestorePlan): number;
|
|
86
|
+
export {};
|