@g1cloud/bpmn-modeler-next 5.0.0-beta.8 → 5.0.0-beta.9
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 +21 -0
- package/dist/agent/agentBatch.d.ts +7 -1
- package/dist/agent/describeProcess.d.ts +29 -2
- package/dist/agent/resolver/documentIndex.d.ts +5 -0
- package/dist/agent/resolver/index.d.ts +14 -2
- package/dist/agent/resolver/issues.d.ts +53 -0
- package/dist/agent/resolver/localeTexts.d.ts +24 -0
- package/dist/agent/resolver/validate.d.ts +10 -1
- package/dist/agent/symbolicOp.d.ts +20 -2
- package/dist/bpmn-modeler.js +9366 -8982
- package/dist/bpmn-modeler.umd.cjs +61 -61
- package/dist/command/setTranslations.d.ts +42 -0
- package/dist/command/translationCommands.d.ts +11 -0
- package/dist/core/ir.d.ts +48 -1
- package/dist/editor/controller.d.ts +2 -0
- package/dist/headless/modeler.d.ts +8 -2
- package/dist/index.d.ts +2 -0
- package/dist/view/i18nDisplay.d.ts +10 -5
- package/package.json +1 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** 커맨드 이름 — bwl 소유 네임스페이스(`bwl.updateTranslation` 과 같은 소유권 경계). */
|
|
2
|
+
export declare const SET_TRANSLATIONS_COMMAND = "bwl.setTranslations";
|
|
3
|
+
type Any = any;
|
|
4
|
+
/** 확인 요청 표식 한 건의 값 — moddle 객체와 무관한 비교 단위. */
|
|
5
|
+
export interface ReviewRequestValue {
|
|
6
|
+
locale: string;
|
|
7
|
+
sourceLocale?: string;
|
|
8
|
+
previous: string;
|
|
9
|
+
}
|
|
10
|
+
export interface SetTranslationsContext {
|
|
11
|
+
element: Any;
|
|
12
|
+
/**
|
|
13
|
+
* 쓸 문구 — 문서 언어 **전부**(validator 가 보장한다). `undefined` = 문구를 쓰지 않는다(확인만) ·
|
|
14
|
+
* `null` = 라벨 제거(문서 언어 칸과 표식을 전부 걷는다 — `name` 은 하강이 이미 지웠다).
|
|
15
|
+
*/
|
|
16
|
+
texts?: Record<string, string> | null;
|
|
17
|
+
/** 문구를 바꾸지 않고 해소할 확인 요청의 언어들(`translation.confirm`). */
|
|
18
|
+
confirm?: string[];
|
|
19
|
+
designLocale: string;
|
|
20
|
+
/** 문서 언어(설계 + 병기). */
|
|
21
|
+
locales: string[];
|
|
22
|
+
/** 루트 `xml:lang`. */
|
|
23
|
+
rootLang?: string;
|
|
24
|
+
/** 배치 직전 상태 — 「바뀌었나」 판정과 표식의 출발점. 새 요소는 둘 다 비어 있다. */
|
|
25
|
+
before: {
|
|
26
|
+
texts: Record<string, string>;
|
|
27
|
+
requests: ReviewRequestValue[];
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
interface ExecutedContext extends SetTranslationsContext {
|
|
31
|
+
undo: Array<() => void>;
|
|
32
|
+
}
|
|
33
|
+
export declare class SetTranslationsHandler {
|
|
34
|
+
private moddle;
|
|
35
|
+
static $inject: string[];
|
|
36
|
+
constructor(moddle: Any);
|
|
37
|
+
execute(ctx: ExecutedContext): Any[];
|
|
38
|
+
revert(ctx: ExecutedContext): Any[];
|
|
39
|
+
}
|
|
40
|
+
/** 요소의 확인 요청 표식을 비교 단위 값으로 읽는다(배치 직전 스냅샷용). */
|
|
41
|
+
export declare function reviewRequestValuesOf(bo: Any): ReviewRequestValue[];
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Any = any;
|
|
2
|
+
export declare class TranslationCommands {
|
|
3
|
+
static $inject: string[];
|
|
4
|
+
constructor(commandStack: Any);
|
|
5
|
+
}
|
|
6
|
+
/** bpmn-js 모듈 — 서비스 이름 = `translationCommands`. 헤드리스 기본 셋(`HEADLESS_BPMN_MODULES`)에 들어 있다. */
|
|
7
|
+
export declare const TranslationCommandsModule: {
|
|
8
|
+
__init__: string[];
|
|
9
|
+
translationCommands: (string | typeof TranslationCommands)[];
|
|
10
|
+
};
|
|
11
|
+
export {};
|
package/dist/core/ir.d.ts
CHANGED
|
@@ -64,9 +64,35 @@ export declare function isIrEventDefinition(v: unknown): v is IrEventDefinition;
|
|
|
64
64
|
* 어휘 안의 것일 때만** 값을 낸다 — 다중 정의(BPMN 의 multiple 이벤트)와 어휘 밖 정의는 undefined.
|
|
65
65
|
*/
|
|
66
66
|
export declare function irEventDefinitionOf(definitionTypes: readonly string[]): IrEventDefinition | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* **문구 로케일 어휘**(B-4 ④ · 2026-10-02) — 다국어 그룹의 op 가 문구마다 붙이는 로케일의 닫힌 집합.
|
|
69
|
+
*
|
|
70
|
+
* 🔴 **열린 맵이 아니라 닫힌 집합인 이유** — op 스키마는 Anthropic 엄격 서브셋을 지킨다(`strictSubset.ts`)는데
|
|
71
|
+
* 그 서브셋은 `additionalProperties` 에 false 밖에 못 쓴다. 로케일을 키로 받는 맵은 **키를 열거해야만** 표현된다.
|
|
72
|
+
* 값은 호스트 그룹 설정의 선택지(`GROUP_DOC_LOCALES` = ko · en · ja · zh)와 같다 — 🔴 **호스트 선택지는 이 집합의
|
|
73
|
+
* 부분집합이어야 한다**(밖의 언어를 문서 언어로 켜면 에이전트가 그 칸을 스키마상 쓸 수 없어 「전 언어 필수」를
|
|
74
|
+
* 영원히 못 채운다). 늘릴 때는 additive 다(불변식 5).
|
|
75
|
+
*
|
|
76
|
+
* 실제로 요구되는 언어는 이 집합이 아니라 **그 그룹의 문서 언어**(설계 + 병기)다 — validator 가 집행한다.
|
|
77
|
+
*/
|
|
78
|
+
export declare const IR_TEXT_LOCALES: readonly ["ko", "en", "ja", "zh"];
|
|
79
|
+
export type IrTextLocale = (typeof IR_TEXT_LOCALES)[number];
|
|
80
|
+
export declare function isIrTextLocale(v: unknown): v is IrTextLocale;
|
|
81
|
+
/**
|
|
82
|
+
* 로케일 → 문구 (B-4 ④). 다국어 그룹에서 평문 `name`/`text` 대신 쓰는 짝 필드(`names`/`texts`)의 형태다.
|
|
83
|
+
*
|
|
84
|
+
* - **write** — 그 그룹의 문서 언어(설계 + 병기)를 **전부** 담아야 한다(빠지거나 밖의 언어면 거부). 평문과 함께
|
|
85
|
+
* 주면 모호해 거부한다(🔁 A-5 `condition-name-conflict`). `name` 은 설계 언어 문구로 하강한다.
|
|
86
|
+
* - **read** — 문서 언어 중 **문구가 있는 칸만** 담는다. 빠진 키 = 그 언어로는 미번역이다.
|
|
87
|
+
*
|
|
88
|
+
* 기능이 꺼진 그룹(문서 언어 미설정)은 지금처럼 평문만 쓴다 — 이 필드를 주면 거부한다.
|
|
89
|
+
*/
|
|
90
|
+
export type IrLocaleTexts = Partial<Record<IrTextLocale, string>>;
|
|
67
91
|
export interface IrLane {
|
|
68
92
|
id: string;
|
|
69
93
|
name?: string;
|
|
94
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
95
|
+
names?: IrLocaleTexts;
|
|
70
96
|
}
|
|
71
97
|
/**
|
|
72
98
|
* 풀(participant). 레인은 풀 정의에 선언하고 노드가 `lane` 인자로 배정된다(A-3) —
|
|
@@ -75,6 +101,8 @@ export interface IrLane {
|
|
|
75
101
|
export interface IrParticipant {
|
|
76
102
|
id: string;
|
|
77
103
|
name?: string;
|
|
104
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
105
|
+
names?: IrLocaleTexts;
|
|
78
106
|
/** true 면 내부 프로세스 없는 블랙박스 풀 */
|
|
79
107
|
blackBox?: boolean;
|
|
80
108
|
lanes?: IrLane[];
|
|
@@ -83,6 +111,8 @@ export interface IrNode {
|
|
|
83
111
|
id: string;
|
|
84
112
|
type: IrFlowNodeType;
|
|
85
113
|
name?: string;
|
|
114
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
115
|
+
names?: IrLocaleTexts;
|
|
86
116
|
/** 소속 풀 (협업 문서) */
|
|
87
117
|
participant?: string;
|
|
88
118
|
/** 소속 레인 (A-3) */
|
|
@@ -112,6 +142,11 @@ export interface IrSequenceFlow {
|
|
|
112
142
|
source: string;
|
|
113
143
|
target: string;
|
|
114
144
|
name?: string;
|
|
145
|
+
/**
|
|
146
|
+
* 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). 🔴 **다국어 그룹의 조건 라벨도 이것이다** — `condition.label` 은
|
|
147
|
+
* name 채널의 별칭이라(A-5) 평문 하나로는 언어를 못 싣는다. 그 그룹에서 `condition` 을 주면 거부한다.
|
|
148
|
+
*/
|
|
149
|
+
names?: IrLocaleTexts;
|
|
115
150
|
condition?: IrFlowCondition;
|
|
116
151
|
}
|
|
117
152
|
export interface IrMessageFlow {
|
|
@@ -119,10 +154,14 @@ export interface IrMessageFlow {
|
|
|
119
154
|
source: string;
|
|
120
155
|
target: string;
|
|
121
156
|
name?: string;
|
|
157
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
158
|
+
names?: IrLocaleTexts;
|
|
122
159
|
}
|
|
123
160
|
export interface IrDataStore {
|
|
124
161
|
id: string;
|
|
125
162
|
name?: string;
|
|
163
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
164
|
+
names?: IrLocaleTexts;
|
|
126
165
|
}
|
|
127
166
|
/** 데이터 입출력 연관 (노드 ↔ 데이터 스토어, 방향 = source→target) */
|
|
128
167
|
export interface IrDataAssociation {
|
|
@@ -133,7 +172,13 @@ export interface IrDataAssociation {
|
|
|
133
172
|
}
|
|
134
173
|
export interface IrTextAnnotation {
|
|
135
174
|
id: string;
|
|
136
|
-
|
|
175
|
+
/**
|
|
176
|
+
* 본문. read 는 늘 낸다(다국어 그룹이면 설계 언어 문구). write 는 이것 또는 `texts` 중 **하나**가 필수다 —
|
|
177
|
+
* 다국어 그룹은 `texts`, 기능이 꺼진 그룹은 `text`(B-4 ④ · 종전엔 늘 필수였다).
|
|
178
|
+
*/
|
|
179
|
+
text?: string;
|
|
180
|
+
/** 다국어 그룹의 본문(B-4 ④ — `IrLocaleTexts`). `text` 와 동시 지정 금지. */
|
|
181
|
+
texts?: IrLocaleTexts;
|
|
137
182
|
}
|
|
138
183
|
/** 연관선 (주석 ↔ 요소) */
|
|
139
184
|
export interface IrAssociation {
|
|
@@ -145,6 +190,8 @@ export interface IrAssociation {
|
|
|
145
190
|
export interface IrGroup {
|
|
146
191
|
id: string;
|
|
147
192
|
name?: string;
|
|
193
|
+
/** 다국어 그룹의 이름(B-4 ④ — `IrLocaleTexts`). `name` 과 동시 지정 금지. */
|
|
194
|
+
names?: IrLocaleTexts;
|
|
148
195
|
members?: string[];
|
|
149
196
|
}
|
|
150
197
|
/** describeProcess 가 반환하는 문서 전체 파생 뷰의 골격 */
|
|
@@ -68,6 +68,8 @@ export interface BpmnEditorController extends CommandSeam {
|
|
|
68
68
|
/**
|
|
69
69
|
* 에이전트 배치 적용 — 단일 undo 에피소드. `applied` 의 `xml` 이 호스트 영속 페이로드다
|
|
70
70
|
* (내부적으로 `saveXml()` 경로를 타므로 dirty 도 리셋된다 = "영속 진실로 내보낸 시점").
|
|
71
|
+
* 다국어 설정(`configureI18n`)이 걸려 있으면 그것이 그 문서의 문서 언어다 — op 의 문구는 `names`/`texts` 로
|
|
72
|
+
* 문서 언어 전부를 요구하고 평문은 거부된다(B-4 ④).
|
|
71
73
|
*/
|
|
72
74
|
applyAgentBatch(batch: BpmnOpBatch, currentVersion: number): Promise<ApplyBatchOutcome>;
|
|
73
75
|
/** 사용자 입력 잠금 — 에이전트 턴 시작/종료에서 호출. 프로그램 경로는 영향 없음. */
|
|
@@ -4,10 +4,16 @@ import { default as CoreModule } from 'bpmn-js/lib/core';
|
|
|
4
4
|
import { default as ModelingModule } from 'bpmn-js/lib/features/modeling';
|
|
5
5
|
import { default as AutoPlaceModule } from 'bpmn-js/lib/features/auto-place';
|
|
6
6
|
import { HeadlessDomOptions } from './dom';
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* 헤드리스 하강에 필요한 최소 모듈 셋 — 이 목록이 곧 "에디터 없이 성립하는 표면"의 정의다.
|
|
9
|
+
* `TranslationCommandsModule` = 번역 칸 커맨드(B-4 ④ — 다국어 그룹의 에이전트 op 가 쓴다 · 그래픽스 무관).
|
|
10
|
+
*/
|
|
8
11
|
export declare const HEADLESS_BPMN_MODULES: readonly [typeof CoreModule, {
|
|
9
12
|
translate: (string | typeof import('diagram-js/lib/i18n/translate/translate').default)[];
|
|
10
|
-
}, typeof ModelingModule, typeof AutoPlaceModule
|
|
13
|
+
}, typeof ModelingModule, typeof AutoPlaceModule, {
|
|
14
|
+
__init__: string[];
|
|
15
|
+
translationCommands: (string | typeof import('..').TranslationCommands)[];
|
|
16
|
+
}];
|
|
11
17
|
export interface HeadlessBpmnModelerOptions {
|
|
12
18
|
/** 추가 모듈(호스트 확장). 기본 셋을 대체하지 않고 덧붙인다. */
|
|
13
19
|
additionalModules?: ModuleDeclaration[];
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,8 @@ export * from './core/hints';
|
|
|
4
4
|
export * from './command/commandSeam';
|
|
5
5
|
export * from './command/undoEpisode';
|
|
6
6
|
export * from './command/updateTranslation';
|
|
7
|
+
export * from './command/setTranslations';
|
|
8
|
+
export * from './command/translationCommands';
|
|
7
9
|
export * from './agent/symbolicOp';
|
|
8
10
|
export * from './agent/schema';
|
|
9
11
|
export * from './agent/resolver';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { BpmnDocumentLocales } from '../adapter/i18n';
|
|
2
|
+
/**
|
|
3
|
+
* 다국어 표시 설정 — 문서 언어(`designLocale` = 설계 언어 · `name` 이 따른다 · `companionLocales` = 병기 언어 ·
|
|
4
|
+
* 표시 언어 선택지는 설계 언어 + 이것)에 표시 옵션을 더한다.
|
|
5
|
+
*/
|
|
6
|
+
export interface I18nDisplayConfig extends BpmnDocumentLocales {
|
|
6
7
|
/**
|
|
7
8
|
* 외부 라벨(이벤트 · 게이트웨이 · 흐름 · 그룹)을 표시 문구 폭으로 그린다 — 기본 켬.
|
|
8
9
|
* 끄면 DI 폭(설계 언어 문구 기준)에서 줄바꿈되어 긴 문구가 세로 기둥이 된다(스파이크 F7 — 폭 19 ·
|
|
@@ -69,6 +70,10 @@ export declare class I18nDisplay {
|
|
|
69
70
|
}
|
|
70
71
|
/** bpmn-js 모듈 — `BpmnModelerView` 가 붙인다. 서비스 이름 = `i18nDisplay`. */
|
|
71
72
|
export declare const I18nDisplayModule: {
|
|
73
|
+
__depends__: {
|
|
74
|
+
__init__: string[];
|
|
75
|
+
translationCommands: (string | typeof import('..').TranslationCommands)[];
|
|
76
|
+
}[];
|
|
72
77
|
__init__: string[];
|
|
73
78
|
i18nDisplay: (string | typeof I18nDisplay)[];
|
|
74
79
|
};
|
package/package.json
CHANGED