@g1cloud/bpmn-modeler-next 5.0.0-beta.6 → 5.0.0-beta.7
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/i18n.d.ts +18 -7
- package/dist/bpmn-modeler-next.css +1 -1
- package/dist/bpmn-modeler.js +8545 -8193
- package/dist/bpmn-modeler.umd.cjs +77 -77
- package/dist/command/commandSeam.d.ts +2 -1
- package/dist/command/updateTranslation.d.ts +31 -0
- package/dist/core/hints.d.ts +29 -0
- package/dist/editor/controller.d.ts +29 -0
- package/dist/index.d.ts +3 -0
- package/dist/view/BpmnDisplayLocaleSwitcher.vue.d.ts +6 -0
- package/dist/view/i18nDisplay.d.ts +75 -0
- package/package.json +1 -1
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* 모든 모델 변경은 bpmn-js commandStack 을 경유해야 한다 — 레거시 i18n 이
|
|
5
5
|
* commandStack 을 우회해 businessObject.name 을 직접 변조하다 undo 버그를 만든 것이
|
|
6
|
-
* 반면교사(백로그 B-4
|
|
6
|
+
* 반면교사(백로그 B-4 — 번역 칸 쓰기는 이제 `bwl.updateTranslation` 커맨드다). resolver 하강도
|
|
7
|
+
* modeling API(= commandStack 경유)만 사용한다.
|
|
7
8
|
*/
|
|
8
9
|
export interface CommandSeam {
|
|
9
10
|
undo(): void;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/** 커맨드 이름 — bwl 소유 네임스페이스(`bwl.undoEpisode` 와 같은 소유권 경계). */
|
|
2
|
+
export declare const UPDATE_TRANSLATION_COMMAND = "bwl.updateTranslation";
|
|
3
|
+
type Any = any;
|
|
4
|
+
export interface UpdateTranslationContext {
|
|
5
|
+
/** 라벨 요소가 아니라 주인 요소(`label.labelTarget`). */
|
|
6
|
+
element: Any;
|
|
7
|
+
/**
|
|
8
|
+
* 쓰는 칸의 로케일(= 사람이 보고 있던 표시 언어). 기본 경로 뒤처리에서는 **힌트**다 — 바뀌기 전
|
|
9
|
+
* `name` 의 언어에 이것이 없으면(프로그램 경로의 `updateLabel`) 그 언어로 바로잡는다.
|
|
10
|
+
*/
|
|
11
|
+
locale: string;
|
|
12
|
+
text: string;
|
|
13
|
+
designLocale: string;
|
|
14
|
+
/** 문서 언어(설계 + 병기) — 표식 대상의 범위. 목록 밖 칸은 표시도 판정도 안 하므로 건드리지 않는다. */
|
|
15
|
+
locales: string[];
|
|
16
|
+
/** 루트 `xml:lang` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
|
|
17
|
+
rootLang?: string;
|
|
18
|
+
/** 기본 경로가 `name` 을 이미 바꿨다 — 그 직전 문구(`UpdateLabelHandler` 의 `oldLabel`). */
|
|
19
|
+
nameChangedFrom?: string;
|
|
20
|
+
}
|
|
21
|
+
interface ExecutedContext extends UpdateTranslationContext {
|
|
22
|
+
undo: Array<() => void>;
|
|
23
|
+
}
|
|
24
|
+
export declare class UpdateTranslationHandler {
|
|
25
|
+
private moddle;
|
|
26
|
+
static $inject: string[];
|
|
27
|
+
constructor(moddle: Any);
|
|
28
|
+
execute(ctx: ExecutedContext): Any[];
|
|
29
|
+
revert(ctx: ExecutedContext): Any[];
|
|
30
|
+
}
|
|
31
|
+
export {};
|
package/dist/core/hints.d.ts
CHANGED
|
@@ -41,6 +41,18 @@ export type BwlBand = number;
|
|
|
41
41
|
export type BwlAfterColumn = string;
|
|
42
42
|
/** 풀 세로 순서 힌트 */
|
|
43
43
|
export type BwlPoolOrder = number;
|
|
44
|
+
/**
|
|
45
|
+
* 확인 요청 표식(B-4 ③ · 2026-10-01) — 🔴 **힌트가 아니라 상태다**(C-1 「상태 표식」 범주).
|
|
46
|
+
*
|
|
47
|
+
* 정상 칸의 내용을 바꾸면 다른 언어의 정상 칸마다 하나씩 붙는다: `locale` = 확인을 요청받은 칸 ·
|
|
48
|
+
* `sourceLocale` = 수정된 언어 · `previous`(본문) = 수정 **전** 원문 — 에이전트가 이전 → 이후를 대조해
|
|
49
|
+
* 「확인만」/「번역 갱신」을 고르는 재료다.
|
|
50
|
+
*
|
|
51
|
+
* 힌트와 달리 잃으면 **재생성되지 않는다** — 문구는 안전하고(칸은 그대로) 판정만 잃는다. 그래서 쓰는
|
|
52
|
+
* 주체는 라이브러리(사람 편집 경로 · `command/updateTranslation`)뿐이고 에이전트는 해소만 한다.
|
|
53
|
+
* 번역 칸과 같은 `extensionElements` 에 둔다 — 복사·형태 변환에서 번역 칸과 같은 운명을 겪게.
|
|
54
|
+
*/
|
|
55
|
+
export declare const BWL_REVIEW_REQUEST_TYPE = "bwl:ReviewRequest";
|
|
44
56
|
/**
|
|
45
57
|
* bwl moddle 스키마 (세션 ②-b) — `BPMN_MODDLE_EXTENSIONS`(adapter/extensions.ts)에 등록해
|
|
46
58
|
* 캔버스·헤드리스 양 경로의 파싱 의미를 일치시킨다(M1-2 원칙). 어휘는 additive-only(불변식 5).
|
|
@@ -49,6 +61,7 @@ export type BwlPoolOrder = number;
|
|
|
49
61
|
* - 구조 힌트 = extensionElements 자식: `<bwl:placement anchor=".." side=".." offset=".."/>`,
|
|
50
62
|
* `<bwl:members refs="Id_a Id_b"/>` (공백 구분 id 목록)
|
|
51
63
|
* - 스칼라 힌트 = 요소 속성(`extends` 확장): `bwl:band`(플로우 노드), `bwl:poolOrder`(참여자)
|
|
64
|
+
* - 상태 표식(힌트 아님 · B-4) = extensionElements 자식: `<bwl:reviewRequest locale=".." sourceLocale="..">이전 문구</bwl:reviewRequest>`
|
|
52
65
|
* 미등록 도구 왕복 보존은 두 형태 모두 스파이크 게이트 ①에서 실증됨.
|
|
53
66
|
*/
|
|
54
67
|
export declare const BWL_MODDLE_SCHEMA: {
|
|
@@ -106,5 +119,21 @@ export declare const BWL_MODDLE_SCHEMA: {
|
|
|
106
119
|
readonly isAttr: true;
|
|
107
120
|
readonly type: "Integer";
|
|
108
121
|
}];
|
|
122
|
+
}, {
|
|
123
|
+
readonly name: "ReviewRequest";
|
|
124
|
+
readonly superClass: readonly ["Element"];
|
|
125
|
+
readonly properties: readonly [{
|
|
126
|
+
readonly name: "locale";
|
|
127
|
+
readonly isAttr: true;
|
|
128
|
+
readonly type: "String";
|
|
129
|
+
}, {
|
|
130
|
+
readonly name: "sourceLocale";
|
|
131
|
+
readonly isAttr: true;
|
|
132
|
+
readonly type: "String";
|
|
133
|
+
}, {
|
|
134
|
+
readonly name: "previous";
|
|
135
|
+
readonly isBody: true;
|
|
136
|
+
readonly type: "String";
|
|
137
|
+
}];
|
|
109
138
|
}];
|
|
110
139
|
};
|
|
@@ -4,6 +4,7 @@ import { CommandSeam } from '../command/commandSeam';
|
|
|
4
4
|
import { ApplyBatchOutcome, BpmnOpBatch } from '../agent/agentBatch';
|
|
5
5
|
import { GeometryFinding } from '../agent/geometryAudit';
|
|
6
6
|
import { SemanticIssue } from '../agent/semanticAudit';
|
|
7
|
+
import { I18nDisplayConfig } from '../view/i18nDisplay';
|
|
7
8
|
/**
|
|
8
9
|
* 판정 2종의 **현재 캔버스 결과** — 하단 검증 패널(B-103 ⓑ · B-105 ⓑ)의 단일 출처.
|
|
9
10
|
*
|
|
@@ -21,6 +22,24 @@ export interface BpmnDocumentIssues {
|
|
|
21
22
|
geometry: GeometryFinding[];
|
|
22
23
|
semantic: SemanticIssue[];
|
|
23
24
|
}
|
|
25
|
+
/** 한 언어로 볼 때의 상태 수(B-4). */
|
|
26
|
+
export interface BpmnI18nCounts {
|
|
27
|
+
/** 그 언어 칸이 없어 대체 문구로 보이는 요소. */
|
|
28
|
+
untranslated: number;
|
|
29
|
+
/** 그 언어 칸에 확인 요청 표식이 걸린 요소. */
|
|
30
|
+
reviewRequested: number;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* 다국어 표시 상태(B-4) — 표시 언어 전환 UI · 납품 판정 배지의 단일 출처. 미설정이면 `undefined`(기능 끔).
|
|
34
|
+
* 납품 판정 = 설계 언어의 두 수가 0 · 동기 완료 = 전 언어의 두 수가 0.
|
|
35
|
+
*/
|
|
36
|
+
export interface BpmnI18nState {
|
|
37
|
+
designLocale: string;
|
|
38
|
+
/** 표시 언어 선택지 — 설계 언어가 맨 앞. */
|
|
39
|
+
locales: string[];
|
|
40
|
+
displayLocale: string;
|
|
41
|
+
counts: Record<string, BpmnI18nCounts>;
|
|
42
|
+
}
|
|
24
43
|
export interface ImportXmlResult {
|
|
25
44
|
/** import 경고(표시용 메시지) — 수용 기준상 실운영 문서는 빈 배열이어야 한다. */
|
|
26
45
|
warnings: string[];
|
|
@@ -95,6 +114,16 @@ export interface BpmnEditorController extends CommandSeam {
|
|
|
95
114
|
* moddle `$type` 원본만 넘긴다.
|
|
96
115
|
*/
|
|
97
116
|
describeElement(elementId: string): ElementDescription | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* 다국어 설정(B-4 — 설계 언어 · 병기 언어). `undefined` = 기능 끔. 호스트는 그룹 설정을 넘긴다.
|
|
119
|
+
* 🔴 **컨트롤러 세션 상태다** — attach 를 넘어 유지되고 재attach 때 다시 적용된다(잠금과 같은 성격).
|
|
120
|
+
* attach 전에 불러도 된다.
|
|
121
|
+
*/
|
|
122
|
+
configureI18n(config: I18nDisplayConfig | undefined): void;
|
|
123
|
+
/** 표시 언어 전환 — 선택지 밖이면 설계 언어로. 문서를 바꾸지 않는다(dirty · 드래프트 저장 비발동). */
|
|
124
|
+
setDisplayLocale(locale: string): void;
|
|
125
|
+
/** 다국어 표시 상태 — `issues` 와 같은 시점(attach · importXml · 모든 모델 변경)에 갱신된다. */
|
|
126
|
+
readonly i18n: Readonly<Ref<BpmnI18nState | undefined>>;
|
|
98
127
|
}
|
|
99
128
|
/** `describeElement` 의 반환 — 표시 문장을 만들기 위한 최소 단서. */
|
|
100
129
|
export interface ElementDescription {
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './core/modelerLike';
|
|
|
3
3
|
export * from './core/hints';
|
|
4
4
|
export * from './command/commandSeam';
|
|
5
5
|
export * from './command/undoEpisode';
|
|
6
|
+
export * from './command/updateTranslation';
|
|
6
7
|
export * from './agent/symbolicOp';
|
|
7
8
|
export * from './agent/schema';
|
|
8
9
|
export * from './agent/resolver';
|
|
@@ -17,5 +18,7 @@ export * from './adapter/extensions';
|
|
|
17
18
|
export * from './adapter/xml';
|
|
18
19
|
export * from './headless';
|
|
19
20
|
export * from './view/validationDisplay';
|
|
21
|
+
export * from './view/i18nDisplay';
|
|
20
22
|
export { default as BpmnModelerView } from './view/BpmnModelerView.vue';
|
|
21
23
|
export { default as BpmnValidationPanel } from './view/BpmnValidationPanel.vue';
|
|
24
|
+
export { default as BpmnDisplayLocaleSwitcher } from './view/BpmnDisplayLocaleSwitcher.vue';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BpmnEditorController } from '../editor/controller';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
controller: BpmnEditorController;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
6
|
+
export default _default;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface I18nDisplayConfig {
|
|
2
|
+
/** 설계 언어 — 고객에게 전달하는 설계 문서의 언어. `name` 이 따른다(B-4 Ⓐ). */
|
|
3
|
+
designLocale: string;
|
|
4
|
+
/** 병기 언어 — 함께 최신으로 유지할 언어들. 표시 언어 선택지는 설계 언어 + 이것. */
|
|
5
|
+
companionLocales: string[];
|
|
6
|
+
/**
|
|
7
|
+
* 외부 라벨(이벤트 · 게이트웨이 · 흐름 · 그룹)을 표시 문구 폭으로 그린다 — 기본 켬.
|
|
8
|
+
* 끄면 DI 폭(설계 언어 문구 기준)에서 줄바꿈되어 긴 문구가 세로 기둥이 된다(스파이크 F7 — 폭 19 ·
|
|
9
|
+
* 10줄). ⚠ 대가 — 히트 영역은 DI 크기 그대로 · `geometryAudit` 은 `name` 문구 기준이라 표시 언어
|
|
10
|
+
* 라벨의 겹침은 판정 밖.
|
|
11
|
+
*/
|
|
12
|
+
adaptiveExternalLabel?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 표시 상태 — `untranslated` = 표시 언어 칸이 없어 대체 문구(`name`)를 그린다 · `reviewRequested` = 그 칸에
|
|
16
|
+
* 확인 요청 표식이 있다(다른 언어가 내용 변경됐다 — 문구는 칸의 현재 문구 그대로 그린다).
|
|
17
|
+
*/
|
|
18
|
+
export type I18nDisplayStatus = 'ok' | 'untranslated' | 'reviewRequested';
|
|
19
|
+
export interface I18nDisplayResolution {
|
|
20
|
+
text: string;
|
|
21
|
+
status: I18nDisplayStatus;
|
|
22
|
+
/** true = `name` 자체가 표시 언어다 → 치환 없음 · 편집은 기본 경로(`modeling.updateLabel`). */
|
|
23
|
+
native: boolean;
|
|
24
|
+
}
|
|
25
|
+
/** 미번역 요소의 그래픽(`djs-element`)에 붙는 클래스. */
|
|
26
|
+
export declare const I18N_UNTRANSLATED_CLASS = "i18n-untranslated";
|
|
27
|
+
/** 확인 요청 요소의 그래픽(`djs-element`)에 붙는 클래스. */
|
|
28
|
+
export declare const I18N_REVIEW_REQUESTED_CLASS = "i18n-review-requested";
|
|
29
|
+
type Any = any;
|
|
30
|
+
export declare class I18nDisplay {
|
|
31
|
+
private elementRegistry;
|
|
32
|
+
private canvas;
|
|
33
|
+
private textRenderer;
|
|
34
|
+
private graphicsFactory;
|
|
35
|
+
static $inject: string[];
|
|
36
|
+
private config;
|
|
37
|
+
private displayLocale;
|
|
38
|
+
constructor(eventBus: Any, elementRegistry: Any, commandStack: Any, bpmnRenderer: Any, labelEditingProvider: Any, canvas: Any, textRenderer: Any, graphicsFactory: Any);
|
|
39
|
+
/** 다국어 설정. `undefined` = 기능 끔. 표시 언어는 설계 언어로 돌아간다. */
|
|
40
|
+
configure(config: I18nDisplayConfig | undefined): void;
|
|
41
|
+
/** 표시 언어 선택지 — 설계 언어가 맨 앞. 미설정이면 빈 배열. */
|
|
42
|
+
locales(): string[];
|
|
43
|
+
/**
|
|
44
|
+
* 표시 언어 전환 — 선택지 밖은 설계 언어로(B-4 「보이는 언어 = 쓰이는 칸」: 목록 밖 화면에서 친
|
|
45
|
+
* 문구가 설계 언어 칸에 들어가는 경로를 막는다). 실제로 적용된 언어를 돌려준다.
|
|
46
|
+
* commandStack 밖이라 `commandStack.changed` 가 없다 → dirty · 드래프트 저장 비발동(C-3).
|
|
47
|
+
*/
|
|
48
|
+
setDisplayLocale(locale: string): string | undefined;
|
|
49
|
+
getDisplayLocale(): string | undefined;
|
|
50
|
+
/** 루트 `<bpmn:definitions xml:lang>` — 번역 칸으로 판정되지 않는 `name` 의 언어. */
|
|
51
|
+
rootLang(): string | undefined;
|
|
52
|
+
/** 표시 판정 — `name` 언어 = 같은 문구의 번역 칸 → 없으면 루트 `xml:lang` → 설계 언어. */
|
|
53
|
+
resolve(element: Any): I18nDisplayResolution | undefined;
|
|
54
|
+
/** 그 언어로 볼 때 미번역인 요소 수(납품 판정 = 설계 언어 미번역 0 · 확인 요청 0). */
|
|
55
|
+
untranslatedCount(locale: string): number;
|
|
56
|
+
/** 그 언어 칸에 확인 요청이 걸린 요소 수. */
|
|
57
|
+
reviewRequestedCount(locale: string): number;
|
|
58
|
+
private countStatus;
|
|
59
|
+
private withDisplayText;
|
|
60
|
+
/** 라벨 요소 폭을 표시 문구 기준으로 잠시 바꾼다. GraphicsFactory 는 drawShape **뒤에** translate 한다. */
|
|
61
|
+
private widen;
|
|
62
|
+
/**
|
|
63
|
+
* 이벤트 없이 다시 그린다. 🔴 `elements.changed` 를 쓰면 안 된다 — 임포트가 외부 라벨 요소 크기를
|
|
64
|
+
* 문구 측정값으로 보정해 두고(DI 엔 안 씀 · `BpmnImporter.addLabel`), `shape.changed` 가 나면
|
|
65
|
+
* `BpmnUpdater` 가 그 보정값을 DI 에 쓴다(upstream). 토글 한 번이 문서 전체 라벨 DI 를 고치는 셈이
|
|
66
|
+
* 된다(스파이크 F2 — 그룹 라벨 폭 36 → 31 · 흐름 라벨 22 → 20).
|
|
67
|
+
*/
|
|
68
|
+
private rerenderAll;
|
|
69
|
+
}
|
|
70
|
+
/** bpmn-js 모듈 — `BpmnModelerView` 가 붙인다. 서비스 이름 = `i18nDisplay`. */
|
|
71
|
+
export declare const I18nDisplayModule: {
|
|
72
|
+
__init__: string[];
|
|
73
|
+
i18nDisplay: (string | typeof I18nDisplay)[];
|
|
74
|
+
};
|
|
75
|
+
export {};
|
package/package.json
CHANGED