@nxgt/material-vue 0.15.3 → 0.19.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/README.md +5 -1
- package/dist/_baseIsEqual-Cj6hHjs0.js +226 -0
- package/dist/abnfDiagram-O67JEVCF-Cl_I9xuI.js +89 -0
- package/dist/arc-DNNg1pxp.js +80 -0
- package/dist/architecture-7GRP2DOG-DDr0RGVC.js +3 -0
- package/dist/architectureDiagram-NJMV4G6O-CVS4UUCi.js +4146 -0
- package/dist/array-CApNbSU9.js +6 -0
- package/dist/blockDiagram-BEXU5L5S-B5Z0jbc8.js +1946 -0
- package/dist/c4Diagram-YGBWAQC7-B6jKsl3h.js +2990 -0
- package/dist/{camera-DmcoWLY_.js → camera-oxz1xItP.js} +4 -4
- package/dist/channel-BA1GJyZ7.js +5 -0
- package/dist/chunk-2Q5K7J3B-kzxEEeTu.js +15 -0
- package/dist/chunk-3FUC2YCW-CX-v_TQz.js +364 -0
- package/dist/chunk-5DYCD2WN-B9vjeX2u.js +37 -0
- package/dist/chunk-5VM5RSS4-Cr17nBXp.js +5 -0
- package/dist/chunk-6AEJRKK7-D9IaQdwq.js +10 -0
- package/dist/chunk-742MDFTN-BIhVe9GR.js +275 -0
- package/dist/chunk-7INBJB4K-CwPgdc2G.js +4487 -0
- package/dist/chunk-7M6MHVWA-Deh_-m6x.js +4256 -0
- package/dist/chunk-7PRAP22T-CofnNOEr.js +67 -0
- package/dist/chunk-DUW6YSOI-BdOla2G8.js +10 -0
- package/dist/chunk-FOHPRMQF-Crq0JMf2.js +21388 -0
- package/dist/chunk-GNY47TPC-rS2K544k.js +75 -0
- package/dist/chunk-GTNCS2PH-BR0O70z_.js +490 -0
- package/dist/chunk-GWA4HPMP-DU9lUCZD.js +61 -0
- package/dist/chunk-J5ZVWO5B-CYzz6Pq8.js +12 -0
- package/dist/chunk-JWPE2WC7-Ccb0QaC8.js +8 -0
- package/dist/chunk-LNGE3PJU-CiGrDO_F.js +1513 -0
- package/dist/chunk-MBY4JIJT-HYVRUG_P.js +1847 -0
- package/dist/chunk-NETBCI7D-C8amwD_P.js +236 -0
- package/dist/chunk-O7XYJQB3-WMQqqzRb.js +3922 -0
- package/dist/chunk-UA2S7LBM-DtBatid7.js +363 -0
- package/dist/chunk-WEXAMYUT-Cc10h8ed.js +26 -0
- package/dist/chunk-XXDRQBXY-B2pGFcse.js +9 -0
- package/dist/chunk-Y2CYZVJY-i11wjrBe.js +12 -0
- package/dist/chunk-Z7XXMR3K-CJmsOGTV.js +676 -0
- package/dist/chunk-ZIGJFQKS-DBdWb0bj.js +1366 -0
- package/dist/classDiagram-v2-NBCMYWYE-Caqw5P6A.js +3397 -0
- package/dist/{components-CzlSXpgn.js → components-IbdMALGv.js} +43231 -18341
- package/dist/components.js +5 -5
- package/dist/{composables-CJfjxkud.js → composables-6zV0t-y7.js} +1 -1
- package/dist/composables.js +1 -1
- package/dist/cose-bilkent-JH36ORCC-DStMi-eo.js +2251 -0
- package/dist/cynefin-OW5HDTMX-B8HVdZhp.js +3 -0
- package/dist/cynefinDiagram-VND7K2PF-0Mq0e5NQ.js +349 -0
- package/dist/cytoscape.esm-_jXi1N4y.js +18151 -0
- package/dist/dagre-6A5THRUB-EHXNn6Wq.js +2192 -0
- package/dist/defaultLocale-DnzPsei5.js +201 -0
- package/dist/diagram-22UHCM2B-B3RAQlqQ.js +5084 -0
- package/dist/diagram-3UASUU5V-BznCZHss.js +525 -0
- package/dist/diagram-ATOU4E4O-DtIUxSAn.js +432 -0
- package/dist/diagram-CDSNMT55-DOjN3BR2.js +301 -0
- package/dist/diagram-MLGK6HIB-Dx2UboD6.js +134 -0
- package/dist/diagram-MPIPVDR6-DnPL3RV0.js +214 -0
- package/dist/dist-D9zvfe2i.js +59 -0
- package/dist/{dnd-CnXShic8.js → dnd-CaDeYjQx.js} +1 -1
- package/dist/dnd.js +1 -1
- package/dist/ebnfDiagram-ZINNZB2B-BNbxCL0b.js +100 -0
- package/dist/elk-276RUBZZ-B9WeHolc.js +47597 -0
- package/dist/erDiagram-OPXOYQCR-DReZElBu.js +1970 -0
- package/dist/eventmodeling-NTZA5JFV-C1CEo-26.js +3 -0
- package/dist/flowDiagram-KWPJA3E3-DYss4vEI.js +17 -0
- package/dist/ganttDiagram-FUAMR5RP-64EZDDmC.js +3083 -0
- package/dist/gitGraph-4MIJSDKK-BTeCS_5q.js +3 -0
- package/dist/gitGraphDiagram-X574FWY7-DmMMrp5A.js +729 -0
- package/dist/graphlib-CrmIPC4m.js +372 -0
- package/dist/{i18n-weSTOoFJ.js → i18n-OBzfa-B7.js} +247 -926
- package/dist/i18n.js +2 -2
- package/dist/info-A6RAGUB7-BvtuPd9C.js +3 -0
- package/dist/infoDiagram-VRGFBTTK-XlBUAu0t.js +20 -0
- package/dist/init-MwSGRDIl.js +15 -0
- package/dist/isArrayLikeObject-VG1KOJ3m.js +539 -0
- package/dist/isEmpty-CMjyBU-a.js +136 -0
- package/dist/ishikawaDiagram-OU5B5YK6-C9cMWMPO.js +719 -0
- package/dist/journeyDiagram-ZHPQQLJL-DXdfP9BW.js +884 -0
- package/dist/kanban-definition-PNTS6WVX-DhOBy3A0.js +976 -0
- package/dist/katex-BMQ6LGsM.js +21962 -0
- package/dist/lib/components/index.d.ts +4 -0
- package/dist/lib/components/ui/chat/chat-composer-mentions.vue.d.ts +13 -0
- package/dist/lib/components/ui/chat/chat-composer.vue.d.ts +6 -2
- package/dist/lib/components/ui/contacts/consts.d.ts +1 -1
- package/dist/lib/components/ui/emoji/emoji-list.vue.d.ts +11 -0
- package/dist/lib/components/ui/emoji/emoji-picker.vue.d.ts +12 -0
- package/dist/lib/components/ui/emoji/emoji.utils.d.ts +2 -0
- package/dist/lib/components/ui/emoji/index.d.ts +4 -0
- package/dist/lib/components/ui/emoji/types.d.ts +6 -0
- package/dist/lib/components/ui/markdown/index.d.ts +2 -0
- package/dist/lib/components/ui/markdown/markdown.utils.d.ts +10 -0
- package/dist/lib/components/ui/markdown/markdown.vue.d.ts +10 -0
- package/dist/lib/components/ui/markdown/mermaid.lazy.d.ts +12 -0
- package/dist/lib/components/ui/markdown/partials/mermaid-diagram.vue.d.ts +7 -0
- package/dist/lib/components/ui/mentions/index.d.ts +4 -0
- package/dist/lib/components/ui/mentions/mention-list.vue.d.ts +16 -0
- package/dist/lib/components/ui/mentions/mentions.utils.d.ts +7 -0
- package/dist/lib/components/ui/mentions/types.d.ts +5 -0
- package/dist/lib/components/ui/terminal/index.d.ts +3 -0
- package/dist/lib/components/ui/terminal/terminal.utils.d.ts +5 -0
- package/dist/lib/components/ui/terminal/terminal.vue.d.ts +17 -0
- package/dist/lib/i18n/resources/en/index.d.ts +13 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/fr/index.d.ts +13 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +14 -1
- package/dist/lib/i18n/resources/index.d.ts +26 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/nuxt/component-names.d.ts +1 -1
- package/dist/lib-B9AHrvmh.js +389 -0
- package/dist/lib.js +1 -1
- package/dist/line-UP6dkL36.js +34 -0
- package/dist/linear-bD_QoED_.js +289 -0
- package/dist/main.js +9 -9
- package/dist/material-vue.css +1 -1
- package/dist/merge-B4IBXGaq.js +170 -0
- package/dist/mermaid-parser.core-Cz-MfB4Z.js +638 -0
- package/dist/mermaid.core-C_Rtflmc.js +1096 -0
- package/dist/mindmap-definition-NLK3R4M7-CO6s2Afv.js +1008 -0
- package/dist/ordinal-D_ZgubzR.js +65 -0
- package/dist/packet-AYTQ26CC-CshIswP8.js +3 -0
- package/dist/path-DGNPZRdx.js +85 -0
- package/dist/{pdf-outline-sidebar-iX41cMWg.js → pdf-outline-sidebar-D5VedBgk.js} +3 -2
- package/dist/{pdf-page-D_i3wZ_q.js → pdf-page-B1Ze518d.js} +1 -1
- package/dist/{pdf-page-list-bB0_8jk4.js → pdf-page-list-CBJziavm.js} +3 -2
- package/dist/{pdf-reader-CRipdUQO.js → pdf-reader-Cn1uxtJN.js} +13 -13
- package/dist/{pdf-sidebar-BLZLycW6.js → pdf-sidebar-PXfgGlmq.js} +4 -4
- package/dist/{pdf-thumbnail-sidebar-CStX_EPU.js → pdf-thumbnail-sidebar-7agqWsXT.js} +4 -3
- package/dist/{pdf-toolbar-Cp2i5Vhc.js → pdf-toolbar-Blm9CFvh.js} +22 -21
- package/dist/pegDiagram-GJSIUBJH-gvsGke9W.js +94 -0
- package/dist/pie-WAS4IAKB-CYs22y4X.js +3 -0
- package/dist/pieDiagram-5QR66LMP-DLBcErnI.js +205 -0
- package/dist/quadrantDiagram-O4NWA36T-Bn3CmGxM.js +2001 -0
- package/dist/radar-RG4KPBEZ-BOJKjbGv.js +3 -0
- package/dist/railroad-74A4TZTK-Dt1BmUkI.js +3 -0
- package/dist/railroad-abnf-HS5TGJTU-Cs9GMUMY.js +3 -0
- package/dist/railroad-ebnf-LZEXJU2U-D4y0fXoW.js +3 -0
- package/dist/railroad-peg-WCYAUIDC-D2f_ZNR5.js +3 -0
- package/dist/railroadDiagram-XR7U4H2S-DLeBxWbV.js +76 -0
- package/dist/requirementDiagram-PLB6GJNP-JpWB5sEv.js +2228 -0
- package/dist/rolldown-runtime-CWhphoD1.js +23 -0
- package/dist/rough.esm-rcMoXTJj.js +1352 -0
- package/dist/sankeyDiagram-IPEJSGJF-a4rFl5rR.js +970 -0
- package/dist/sequenceDiagram-PO4LG4MO-CjUigcL2.js +4200 -0
- package/dist/sizeCapture-INFHLROL-CHXIsPO_.js +46 -0
- package/dist/src-CNRY2AUH.js +2142 -0
- package/dist/stateDiagram-v2-GCMORJYK-DJkVDIb0.js +2143 -0
- package/dist/{stx-player-DNXToHKV.js → stx-player-rs3uH0iI.js} +17 -17
- package/dist/swimlanes-2SLR337P-D7Ff0hLr.js +4763 -0
- package/dist/swimlanesDiagram-TC7HE7FX-DZZ9d76C.js +28 -0
- package/dist/timeline-definition-EJHVYXUP-C0aHlt9K.js +1073 -0
- package/dist/treeView-Q6P3EWNA-BrJylG9N.js +3 -0
- package/dist/treemap-WGGIJYW6-DpIZuqbj.js +3 -0
- package/dist/usecaseDiagram-POWQR4AR-BrRAt7Wu.js +9932 -0
- package/dist/vennDiagram-UO4OBE2U-B22Jhju8.js +1880 -0
- package/dist/wardley-WFR3VGLG-CbwdAAbH.js +3 -0
- package/dist/wardleyDiagram-VNRHLVJA-Dw4YgRiQ.js +645 -0
- package/dist/xychartDiagram-PMCCYNJV-DtuDs9I7.js +2214 -0
- package/lib/nuxt/component-names.ts +2 -0
- package/package.json +5 -1
- package/dist/lib-DfpwxO6u.js +0 -611
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
import { T as e } from "./chunk-FOHPRMQF-Crq0JMf2.js";
|
|
2
|
+
import { n as t } from "./mermaid-parser.core-Cz-MfB4Z.js";
|
|
3
|
+
import { n } from "./chunk-Y2CYZVJY-i11wjrBe.js";
|
|
4
|
+
import { m as r, p as i } from "./src-CNRY2AUH.js";
|
|
5
|
+
import { H as a, U as o, X as s, a as c, b as l, f as u, q as d, v as f, w as p, x as m, y as h, z as g } from "./chunk-O7XYJQB3-WMQqqzRb.js";
|
|
6
|
+
import { _, i as ee, t as te } from "./chunk-ZIGJFQKS-DBdWb0bj.js";
|
|
7
|
+
import { t as ne } from "./chunk-JWPE2WC7-Ccb0QaC8.js";
|
|
8
|
+
//#region node_modules/mermaid/dist/chunks/mermaid.core/diagram-ATOU4E4O.mjs
|
|
9
|
+
var v = "position frame", y = "frame positioned", b = "position relation", x = "relation positioned", re = /* @__PURE__ */ n(function(e) {
|
|
10
|
+
r.debug("options str", e);
|
|
11
|
+
}, "setOptions"), ie = /* @__PURE__ */ n(function() {
|
|
12
|
+
return {};
|
|
13
|
+
}, "getOptions"), ae = /* @__PURE__ */ n(function() {
|
|
14
|
+
S(), c();
|
|
15
|
+
}, "clear");
|
|
16
|
+
function S() {
|
|
17
|
+
C = {};
|
|
18
|
+
}
|
|
19
|
+
n(S, "reset");
|
|
20
|
+
var oe = u.eventmodeling, se = /* @__PURE__ */ n(() => ee({
|
|
21
|
+
...oe,
|
|
22
|
+
...l().eventmodeling
|
|
23
|
+
}), "getConfig"), C = {};
|
|
24
|
+
function w() {
|
|
25
|
+
let e = ce, { ast: t } = C, n = D();
|
|
26
|
+
if (!t) throw Error("No data for EventModel");
|
|
27
|
+
return t.frames.forEach((i, a) => {
|
|
28
|
+
let o = P(i, t.dataEntities, n);
|
|
29
|
+
e = J(e, {
|
|
30
|
+
$kind: v,
|
|
31
|
+
index: a,
|
|
32
|
+
frame: i,
|
|
33
|
+
textProps: o
|
|
34
|
+
});
|
|
35
|
+
let s;
|
|
36
|
+
V(i) ? (r.debug("source frame", i.sourceFrames), s = t.frames.filter((e) => i.sourceFrames.some((t) => t.$refText === e.name)), s.forEach((t) => {
|
|
37
|
+
e = J(e, {
|
|
38
|
+
$kind: b,
|
|
39
|
+
index: a,
|
|
40
|
+
frame: i,
|
|
41
|
+
sourceFrame: t
|
|
42
|
+
});
|
|
43
|
+
})) : e = J(e, {
|
|
44
|
+
$kind: b,
|
|
45
|
+
index: a,
|
|
46
|
+
frame: i
|
|
47
|
+
});
|
|
48
|
+
}), e = {
|
|
49
|
+
...e,
|
|
50
|
+
sortedSwimlanesArray: R(e.swimlanes)
|
|
51
|
+
}, e;
|
|
52
|
+
}
|
|
53
|
+
n(w, "getState");
|
|
54
|
+
function T(e) {
|
|
55
|
+
C.ast = e;
|
|
56
|
+
}
|
|
57
|
+
n(T, "setAst");
|
|
58
|
+
var E = {
|
|
59
|
+
swimlaneMinHeight: 70,
|
|
60
|
+
swimlanePadding: 15,
|
|
61
|
+
swimlaneGap: 10,
|
|
62
|
+
boxPadding: 10,
|
|
63
|
+
boxOverlap: 90,
|
|
64
|
+
boxDefaultY: 0,
|
|
65
|
+
boxMinWidth: 80,
|
|
66
|
+
boxMaxWidth: 450,
|
|
67
|
+
boxMinHeight: 80,
|
|
68
|
+
boxMaxHeight: 750,
|
|
69
|
+
contentStartX: 250,
|
|
70
|
+
textMaxWidth: 430,
|
|
71
|
+
boxTextFontWeight: "bold",
|
|
72
|
+
boxTextPadding: 10,
|
|
73
|
+
swimlaneTextFontWeight: "bold",
|
|
74
|
+
labelUiAutomation: "UI/Automation",
|
|
75
|
+
labelUiAutomationPrefix: "UI/A: ",
|
|
76
|
+
labelCommandReadModel: "Command/Read Model",
|
|
77
|
+
labelCommandReadModelPrefix: "C/RM: ",
|
|
78
|
+
labelEvents: "Events",
|
|
79
|
+
labelEventsPrefix: "Stream: "
|
|
80
|
+
};
|
|
81
|
+
function D() {
|
|
82
|
+
return E;
|
|
83
|
+
}
|
|
84
|
+
n(D, "getDiagramProps");
|
|
85
|
+
var ce = {
|
|
86
|
+
boxes: [],
|
|
87
|
+
swimlanes: {},
|
|
88
|
+
relations: [],
|
|
89
|
+
maxR: 0,
|
|
90
|
+
sortedSwimlanesArray: []
|
|
91
|
+
};
|
|
92
|
+
function O(e) {
|
|
93
|
+
let t = e.split(".");
|
|
94
|
+
if (t.length === 2) return t[0];
|
|
95
|
+
}
|
|
96
|
+
n(O, "extractNamespace");
|
|
97
|
+
function k(e) {
|
|
98
|
+
let t = e.split(".");
|
|
99
|
+
return t.length === 2 ? t[1] : e;
|
|
100
|
+
}
|
|
101
|
+
n(k, "extractName");
|
|
102
|
+
function A(e, t) {
|
|
103
|
+
if (!(!t || t.length === 0)) return Object.values(e).find((e) => e.namespace === t);
|
|
104
|
+
}
|
|
105
|
+
n(A, "findSwimlaneByNamespace");
|
|
106
|
+
function j(e, t, n) {
|
|
107
|
+
return Math.max(t, ...Object.keys(e).filter((e) => {
|
|
108
|
+
let r = Number.parseInt(e);
|
|
109
|
+
return r > t && r < n;
|
|
110
|
+
}).map((e) => Number.parseInt(e))) + 1;
|
|
111
|
+
}
|
|
112
|
+
n(j, "findNextAvailableIndex");
|
|
113
|
+
function M(e, t) {
|
|
114
|
+
let n = O(e.entityIdentifier), r = A(t, n);
|
|
115
|
+
switch (e.modelEntityType) {
|
|
116
|
+
case "ui":
|
|
117
|
+
case "pcr":
|
|
118
|
+
case "processor": return r ? {
|
|
119
|
+
index: r.index,
|
|
120
|
+
label: r.namespace || E.labelUiAutomation
|
|
121
|
+
} : n ? {
|
|
122
|
+
index: j(t, 0, 100),
|
|
123
|
+
label: E.labelUiAutomationPrefix + n
|
|
124
|
+
} : {
|
|
125
|
+
index: 0,
|
|
126
|
+
label: E.labelUiAutomation
|
|
127
|
+
};
|
|
128
|
+
case "rmo":
|
|
129
|
+
case "readmodel":
|
|
130
|
+
case "cmd":
|
|
131
|
+
case "command": return r ? {
|
|
132
|
+
index: r.index,
|
|
133
|
+
label: r.namespace || E.labelCommandReadModel
|
|
134
|
+
} : n ? {
|
|
135
|
+
index: j(t, 100, 200),
|
|
136
|
+
label: E.labelCommandReadModelPrefix + n
|
|
137
|
+
} : {
|
|
138
|
+
index: 100,
|
|
139
|
+
label: E.labelCommandReadModel
|
|
140
|
+
};
|
|
141
|
+
default: return r ? {
|
|
142
|
+
index: r.index,
|
|
143
|
+
label: r.namespace || E.labelEvents
|
|
144
|
+
} : n ? {
|
|
145
|
+
index: j(t, 200, 300),
|
|
146
|
+
label: E.labelEventsPrefix + n
|
|
147
|
+
} : {
|
|
148
|
+
index: 200,
|
|
149
|
+
label: E.labelEvents
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
n(M, "calculateSwimlaneProps");
|
|
154
|
+
function N(e) {
|
|
155
|
+
let { themeVariables: t } = l();
|
|
156
|
+
switch (e.modelEntityType) {
|
|
157
|
+
case "ui": return {
|
|
158
|
+
fill: t.emUiFill ?? "white",
|
|
159
|
+
stroke: t.emUiStroke ?? "#dbdada"
|
|
160
|
+
};
|
|
161
|
+
case "pcr":
|
|
162
|
+
case "processor": return {
|
|
163
|
+
fill: t.emProcessorFill ?? "#edb3f6",
|
|
164
|
+
stroke: t.emProcessorStroke ?? "#b88cbf"
|
|
165
|
+
};
|
|
166
|
+
case "rmo":
|
|
167
|
+
case "readmodel": return {
|
|
168
|
+
fill: t.emReadModelFill ?? "#d3f1a2",
|
|
169
|
+
stroke: t.emReadModelStroke ?? "#a3b732"
|
|
170
|
+
};
|
|
171
|
+
case "cmd":
|
|
172
|
+
case "command": return {
|
|
173
|
+
fill: t.emCommandFill ?? "#bcd6fe",
|
|
174
|
+
stroke: t.emCommandStroke ?? "#679ac3"
|
|
175
|
+
};
|
|
176
|
+
case "evt":
|
|
177
|
+
case "event": return {
|
|
178
|
+
fill: t.emEventFill ?? "#ffb778",
|
|
179
|
+
stroke: t.emEventStroke ?? "#c19a0f"
|
|
180
|
+
};
|
|
181
|
+
default: return {
|
|
182
|
+
fill: "red",
|
|
183
|
+
stroke: "black"
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
n(N, "calculateEntityVisualProps");
|
|
188
|
+
function P(e, t, n) {
|
|
189
|
+
let i = l(), a = g(k(e.entityIdentifier) ?? "", i), o, s = {
|
|
190
|
+
fontSize: 16,
|
|
191
|
+
fontWeight: 700,
|
|
192
|
+
fontFamily: "\"trebuchet ms\", verdana, arial, sans-serif",
|
|
193
|
+
joinWith: "<br/>"
|
|
194
|
+
}, c = `<b>${_(a, n.textMaxWidth, s)}</b>`;
|
|
195
|
+
if (e.dataInlineValue && (o = e.dataInlineValue, o = o.substring(o.indexOf("{") + 1), o = o.substring(0, o.lastIndexOf("}") - 1), o = g(o, i), o = _(o, n.textMaxWidth, s), o = o.replaceAll(" ", " ")), e.dataReference) {
|
|
196
|
+
let r = t.find((t) => t.name === e.dataReference?.$refText);
|
|
197
|
+
r && (o = r.dataBlockValue, o = o.substring(o.indexOf("{\n") + 2), o = o.substring(0, o.lastIndexOf("}") - 1), o = g(o, i), o = _(o, n.textMaxWidth, s), o = o.replaceAll(" ", " "), o += "<br/>");
|
|
198
|
+
}
|
|
199
|
+
let u = o !== void 0;
|
|
200
|
+
u && (c += `<br/><br/><code style="text-align: left; display: block;max-width:${n.textMaxWidth}px">${o}</code>`);
|
|
201
|
+
let d = {
|
|
202
|
+
fontSize: s.fontSize,
|
|
203
|
+
fontWeight: s.fontWeight,
|
|
204
|
+
fontFamily: s.fontFamily
|
|
205
|
+
}, f = te(c, d), p = u ? f.width / 3 : f.width, m = {
|
|
206
|
+
content: c,
|
|
207
|
+
width: p,
|
|
208
|
+
height: f.height
|
|
209
|
+
};
|
|
210
|
+
return r.debug(`[${e.name}] ${e.entityIdentifier} text`, m), m;
|
|
211
|
+
}
|
|
212
|
+
n(P, "calculateTextProps");
|
|
213
|
+
function F(e, t) {
|
|
214
|
+
let n = t, r = N(n.frame), i = {
|
|
215
|
+
width: n.textProps.width + 2 * E.boxTextPadding,
|
|
216
|
+
height: n.textProps.height + 2 * E.boxTextPadding
|
|
217
|
+
};
|
|
218
|
+
return [{
|
|
219
|
+
$kind: y,
|
|
220
|
+
frame: n.frame,
|
|
221
|
+
index: n.index,
|
|
222
|
+
visual: r,
|
|
223
|
+
dimension: i,
|
|
224
|
+
textProps: n.textProps
|
|
225
|
+
}];
|
|
226
|
+
}
|
|
227
|
+
n(F, "decidePositionFrame");
|
|
228
|
+
function I(e, t, n) {
|
|
229
|
+
return t === void 0 ? E.contentStartX : t.index === e.index && e.r ? e.r + E.boxPadding : n === void 0 ? E.contentStartX : n.r - E.boxOverlap + E.boxPadding;
|
|
230
|
+
}
|
|
231
|
+
n(I, "calculateX");
|
|
232
|
+
function L(e, t) {
|
|
233
|
+
let n = [...e.map((e) => e.r), t];
|
|
234
|
+
return Math.max(...n);
|
|
235
|
+
}
|
|
236
|
+
n(L, "calculateMaxRight");
|
|
237
|
+
function R(e) {
|
|
238
|
+
return Object.values(e).sort((e, t) => e.index - t.index);
|
|
239
|
+
}
|
|
240
|
+
n(R, "sortedSwimlanesArray");
|
|
241
|
+
function z(e, t) {
|
|
242
|
+
let n = t, r = M(n.frame, e.swimlanes), i;
|
|
243
|
+
i = r.index in e.swimlanes ? e.swimlanes[r.index] : {
|
|
244
|
+
index: r.index,
|
|
245
|
+
label: r.label,
|
|
246
|
+
r: 0,
|
|
247
|
+
y: r.index * E.swimlaneMinHeight + E.swimlaneGap,
|
|
248
|
+
height: E.swimlaneMinHeight,
|
|
249
|
+
maxHeight: E.swimlaneMinHeight
|
|
250
|
+
};
|
|
251
|
+
let a = e.boxes.length > 0 ? e.boxes[e.boxes.length - 1] : void 0, o = e.previousSwimlaneNumber === void 0 ? void 0 : e.swimlanes[e.previousSwimlaneNumber], s = {
|
|
252
|
+
width: Math.max(E.boxMinWidth, Math.min(E.boxMaxWidth, n.dimension.width)) + 2 * E.boxPadding,
|
|
253
|
+
height: Math.max(E.boxMinHeight, Math.min(E.boxMaxHeight, n.dimension.height)) + 2 * E.boxPadding
|
|
254
|
+
}, c = I(i, o, a), l = c + s.width + E.boxPadding, u = L(Object.values(e.swimlanes), l);
|
|
255
|
+
i.r = c + s.width, i.maxHeight = Math.max(i.maxHeight, s.height), i.height = Math.max(E.swimlaneMinHeight, i.maxHeight) + 2 * E.swimlanePadding;
|
|
256
|
+
let d = {
|
|
257
|
+
x: c,
|
|
258
|
+
y: E.swimlanePadding + i.y,
|
|
259
|
+
r: l,
|
|
260
|
+
dimension: s,
|
|
261
|
+
leftSibling: !1,
|
|
262
|
+
swimlane: i,
|
|
263
|
+
visual: n.visual,
|
|
264
|
+
text: n.textProps.content,
|
|
265
|
+
frame: n.frame,
|
|
266
|
+
index: n.index
|
|
267
|
+
}, f = {
|
|
268
|
+
...e,
|
|
269
|
+
boxes: [...e.boxes, d],
|
|
270
|
+
swimlanes: {
|
|
271
|
+
...e.swimlanes,
|
|
272
|
+
[`${i.index}`]: i
|
|
273
|
+
},
|
|
274
|
+
previousSwimlaneNumber: r.index,
|
|
275
|
+
previousFrame: n.frame,
|
|
276
|
+
maxR: u
|
|
277
|
+
}, p = R(f.swimlanes);
|
|
278
|
+
p.length > 0 && (p[0].y = 0);
|
|
279
|
+
for (let e = 1; e < p.length; e++) {
|
|
280
|
+
let t = p[e], n = p[e - 1];
|
|
281
|
+
t.y = n.y + n.height + E.swimlaneGap;
|
|
282
|
+
}
|
|
283
|
+
return f;
|
|
284
|
+
}
|
|
285
|
+
n(z, "evolveFramePositioned");
|
|
286
|
+
function B(e, t) {
|
|
287
|
+
return e === 0 && t.sourceFrames.length === 0;
|
|
288
|
+
}
|
|
289
|
+
n(B, "isFirstFrame");
|
|
290
|
+
function V(e) {
|
|
291
|
+
return e.sourceFrames !== void 0 && e.sourceFrames !== null && e.sourceFrames.length > 0;
|
|
292
|
+
}
|
|
293
|
+
n(V, "hasSourceFrame");
|
|
294
|
+
function H(e, t) {
|
|
295
|
+
if (t != null) return e.find((e) => e.frame.name === t.name);
|
|
296
|
+
}
|
|
297
|
+
n(H, "findBoxByFrame");
|
|
298
|
+
function U(e, t, n) {
|
|
299
|
+
if (!(n < 0)) for (let r = n; r >= 0; r--) {
|
|
300
|
+
let n = e[r];
|
|
301
|
+
if (n.swimlane.index !== t) return n;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
n(U, "findBoxByLineIndex");
|
|
305
|
+
function W(t, n) {
|
|
306
|
+
let r = n;
|
|
307
|
+
if (e(r.frame) || B(r.index, r.frame)) return [];
|
|
308
|
+
let i = H(t.boxes, r.frame);
|
|
309
|
+
if (i === void 0) throw Error(`Target box not found for frame ${r.frame.name}`);
|
|
310
|
+
let a;
|
|
311
|
+
return a = r.sourceFrame ? H(t.boxes, r.sourceFrame) : U(t.boxes, i.swimlane.index, r.index - 1), a === void 0 ? [] : [{
|
|
312
|
+
$kind: x,
|
|
313
|
+
frame: r.frame,
|
|
314
|
+
index: r.index,
|
|
315
|
+
sourceBox: a,
|
|
316
|
+
targetBox: i
|
|
317
|
+
}];
|
|
318
|
+
}
|
|
319
|
+
n(W, "decidePositionRelation");
|
|
320
|
+
function G(e, t) {
|
|
321
|
+
let n = t, r = {
|
|
322
|
+
visual: {
|
|
323
|
+
fill: "none",
|
|
324
|
+
stroke: "#000"
|
|
325
|
+
},
|
|
326
|
+
source: {
|
|
327
|
+
x: n.sourceBox.x,
|
|
328
|
+
y: n.sourceBox.y
|
|
329
|
+
},
|
|
330
|
+
target: {
|
|
331
|
+
x: n.targetBox.x,
|
|
332
|
+
y: n.targetBox.y
|
|
333
|
+
},
|
|
334
|
+
sourceBox: n.sourceBox,
|
|
335
|
+
targetBox: n.targetBox
|
|
336
|
+
};
|
|
337
|
+
return {
|
|
338
|
+
...e,
|
|
339
|
+
relations: [...e.relations, r]
|
|
340
|
+
};
|
|
341
|
+
}
|
|
342
|
+
n(G, "evolveRelationPositioned");
|
|
343
|
+
var le = {
|
|
344
|
+
[v]: F,
|
|
345
|
+
[b]: W
|
|
346
|
+
}, ue = {
|
|
347
|
+
[y]: z,
|
|
348
|
+
[x]: G
|
|
349
|
+
};
|
|
350
|
+
function K(e, t) {
|
|
351
|
+
let n = le[t.$kind];
|
|
352
|
+
if (n == null) return [];
|
|
353
|
+
let i = n(e, t);
|
|
354
|
+
return r.debug("decided events", i), i;
|
|
355
|
+
}
|
|
356
|
+
n(K, "decide");
|
|
357
|
+
function q(e, t) {
|
|
358
|
+
let n = t.reduce((e, t) => {
|
|
359
|
+
let n = ue[t.$kind];
|
|
360
|
+
return n == null ? e : n(e, t);
|
|
361
|
+
}, e);
|
|
362
|
+
return r.debug("evolve events", {
|
|
363
|
+
state: e,
|
|
364
|
+
newState: n,
|
|
365
|
+
events: t
|
|
366
|
+
}), n;
|
|
367
|
+
}
|
|
368
|
+
n(q, "evolve");
|
|
369
|
+
function J(e, t) {
|
|
370
|
+
return q(e, K(e, t));
|
|
371
|
+
}
|
|
372
|
+
n(J, "dispatch");
|
|
373
|
+
var Y = {
|
|
374
|
+
getConfig: se,
|
|
375
|
+
setOptions: re,
|
|
376
|
+
getOptions: ie,
|
|
377
|
+
clear: ae,
|
|
378
|
+
setAccTitle: o,
|
|
379
|
+
getAccTitle: h,
|
|
380
|
+
getAccDescription: f,
|
|
381
|
+
setAccDescription: a,
|
|
382
|
+
setDiagramTitle: d,
|
|
383
|
+
getDiagramTitle: p,
|
|
384
|
+
setAst: T,
|
|
385
|
+
getDiagramProps: D,
|
|
386
|
+
getState: w
|
|
387
|
+
}, de = { parse: /* @__PURE__ */ n(async (e) => {
|
|
388
|
+
let n = await t("eventmodeling", e);
|
|
389
|
+
r.debug(n), Y.setAst(n), ne(n, Y);
|
|
390
|
+
}, "parse") }, fe = m()?.eventmodeling;
|
|
391
|
+
function X(e, t) {
|
|
392
|
+
return (n) => {
|
|
393
|
+
let r = n.swimlane.y + t.swimlanePadding, i = e.append("g").attr("class", "em-box");
|
|
394
|
+
i.append("rect").attr("x", n.x).attr("y", r).attr("rx", "3").attr("width", n.dimension.width).attr("height", n.dimension.height).attr("stroke", n.visual.stroke).attr("fill", n.visual.fill), i.append("foreignObject").attr("x", n.x + t.boxPadding).attr("y", r + 10).attr("width", n.dimension.width - 2 * t.boxPadding).attr("height", n.dimension.height - 2 * t.boxPadding).append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%").append("span").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").html(n.text);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
n(X, "renderD3Box");
|
|
398
|
+
function Z(e, t) {
|
|
399
|
+
return e > t;
|
|
400
|
+
}
|
|
401
|
+
n(Z, "dirUpwards");
|
|
402
|
+
function Q(e, t, n, i) {
|
|
403
|
+
return (a) => {
|
|
404
|
+
let o = a.sourceBox.swimlane.y + t.swimlanePadding, s = a.targetBox.swimlane.y + t.swimlanePadding, c = Z(o, s), l = a.sourceBox.x + a.sourceBox.dimension.width * 2 / 3, u = a.targetBox.x + a.targetBox.dimension.width / 3, d, f;
|
|
405
|
+
r.debug(`rendering relation up=${c} for `, {
|
|
406
|
+
sourceBox: a.sourceBox,
|
|
407
|
+
targetBox: a.targetBox
|
|
408
|
+
}), c ? (d = o, f = s + a.targetBox.dimension.height) : (d = o + a.sourceBox.dimension.height, f = s);
|
|
409
|
+
let p = i.emRelationStroke ?? a.visual.stroke;
|
|
410
|
+
e.append("path").attr("class", "em-relation").attr("fill", a.visual.fill).attr("stroke", p).attr("stroke-width", "1").attr("marker-end", `url(#${n})`).attr("d", `M${l} ${d} L${u} ${f}`);
|
|
411
|
+
};
|
|
412
|
+
}
|
|
413
|
+
n(Q, "renderD3Relation");
|
|
414
|
+
function $(e, t, n, r) {
|
|
415
|
+
return (i) => {
|
|
416
|
+
let a = e.append("g").attr("class", "em-swimlane"), o = r.emSwimlaneBackgroundOdd ?? "rgb(250,250,250)", s = r.emSwimlaneBackgroundStroke ?? "rgb(240,240,240)";
|
|
417
|
+
a.append("rect").attr("x", 0).attr("y", i.y).attr("rx", "3").attr("width", t + n.swimlanePadding).attr("height", i.height).attr("fill", o).attr("stroke", s), a.append("text").attr("font-weight", n.swimlaneTextFontWeight).attr("x", 30).attr("y", i.y + 30).text(i.label);
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
n($, "renderD3Swimlane");
|
|
421
|
+
var pe = {
|
|
422
|
+
parser: de,
|
|
423
|
+
db: Y,
|
|
424
|
+
renderer: { draw: /* @__PURE__ */ n(function(e, t, n, a) {
|
|
425
|
+
if (r.debug("in eventmodeling renderer", e + "\n", "id:", t, n), !fe) throw Error("EventModeling config not found");
|
|
426
|
+
let o = a.db, { themeVariables: c, eventmodeling: l } = m(), u = i(`[id="${t}"]`), d = o.getDiagramProps(), f = o.getState(), p = `em-arrowhead-${t}`, h = c.emArrowhead ?? "#000000";
|
|
427
|
+
f.sortedSwimlanesArray.forEach($(u, f.maxR, d, c)), f.boxes.forEach(X(u, d)), f.relations.forEach(Q(u, d, p, c)), u.append("defs").append("marker").attr("id", p).attr("markerWidth", "10").attr("markerHeight", "7").attr("refX", "10").attr("refY", "3.5").attr("orient", "auto").append("polygon").attr("points", "0 0, 10 3.5, 0 7").attr("fill", h), s(void 0, u, l?.padding ?? 30, l?.useMaxWidth);
|
|
428
|
+
}, "draw") },
|
|
429
|
+
styles: /* @__PURE__ */ n((e) => "", "getStyles")
|
|
430
|
+
};
|
|
431
|
+
//#endregion
|
|
432
|
+
export { pe as diagram };
|