@altimateai/ui-components 0.0.77-beta.5 → 0.0.77-combobox-beta1
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/CoachForm.css +1 -1
- package/dist/CoachForm.js +20266 -23806
- package/dist/Stack.js +2211 -2808
- package/dist/Switch.js +87 -128
- package/dist/ToggleGroup.js +5000 -6188
- package/dist/_basePickBy.js +25 -25
- package/dist/_baseUniq.js +122 -122
- package/dist/arc.js +36 -36
- package/dist/architectureDiagram-VXUJARFQ.js +1 -1
- package/dist/assets/icons/index.js +1 -1
- package/dist/blockDiagram-VD42YOAC.js +1 -1
- package/dist/c4Diagram-YG6GDRKO.js +22 -22
- package/dist/channel.js +2 -2
- package/dist/chatbotV2/index.d.ts +10 -61
- package/dist/chatbotV2/index.js +56 -442
- package/dist/chunk-4BX2VUAB.js +1 -1
- package/dist/chunk-55IACEB6.js +2 -2
- package/dist/chunk-B4BG7PRW.js +1 -1
- package/dist/chunk-DI55MBZ5.js +1 -1
- package/dist/chunk-FMBD7UC4.js +1 -1
- package/dist/chunk-QN33PNHL.js +5 -5
- package/dist/chunk-QZHKN3VN.js +1 -1
- package/dist/chunk-TZMSLE5B.js +1 -1
- package/dist/classDiagram-2ON5EDUG.js +1 -1
- package/dist/classDiagram-v2-WZHVMYZB.js +1 -1
- package/dist/cose-bilkent-S5V4N54A.js +1 -1
- package/dist/dagre-6UL2VRFP.js +58 -58
- package/dist/dayjs.min.js +1 -1
- package/dist/diagram-PSM6KHXK.js +48 -48
- package/dist/diagram-QEK2KX5R.js +26 -26
- package/dist/diagram-S2PKOQOG.js +9 -9
- package/dist/erDiagram-Q2GNP2WA.js +12 -12
- package/dist/flowDiagram-NV44I4VS.js +6 -6
- package/dist/ganttDiagram-LVOFAZNH.js +322 -322
- package/dist/gitGraphDiagram-NY62KEGX.js +13 -13
- package/dist/graph.js +5 -5
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -9
- package/dist/index.js +23 -24
- package/dist/index2.js +22 -22
- package/dist/infoDiagram-F6ZHWCRC.js +14 -14
- package/dist/journeyDiagram-XKPGCS4Q.js +1 -1
- package/dist/kanban-definition-3W4ZIXB7.js +54 -54
- package/dist/layout.js +52 -52
- package/dist/lineage/index.js +15 -15
- package/dist/main.js +5 -5
- package/dist/mermaid-parser.core.js +1 -1
- package/dist/mindmap-definition-VGOIOE7T.js +16 -16
- package/dist/pieDiagram-ADFJNKIX.js +25 -25
- package/dist/quadrantDiagram-AYHSOK5B.js +1 -1
- package/dist/redux-toolkit.modern.js +7 -7
- package/dist/requirementDiagram-UZGBJVZJ.js +1 -1
- package/dist/sankeyDiagram-TZEHDZUN.js +16 -16
- package/dist/sequenceDiagram-WL72ISMW.js +28 -28
- package/dist/shadcn/index.d.ts +8 -11
- package/dist/shadcn/index.js +4869 -6296
- package/dist/stateDiagram-FKZM4ZOC.js +34 -34
- package/dist/stateDiagram-v2-4FDKWEC3.js +6 -6
- package/dist/timeline-definition-IT6M3QCI.js +54 -54
- package/dist/xychartDiagram-PRI3JC2R.js +32 -32
- package/package.json +1 -1
- package/dist/Accordion.js +0 -402
- package/dist/index2.css +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import {
|
|
1
|
+
import { s as R, S as N, a as W } from "./chunk-DI55MBZ5.js";
|
|
2
|
+
import { a1 as f, a7 as t, ad as S, ae as P, a9 as z, aJ as U, aK as _, aE as C, am as F } from "./CoachForm.js";
|
|
3
3
|
import { s as H } from "./redux-toolkit.modern.js";
|
|
4
|
-
import { G as
|
|
5
|
-
import { l as
|
|
4
|
+
import { G as J } from "./graph.js";
|
|
5
|
+
import { l as O } from "./layout.js";
|
|
6
6
|
var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), "drawStartState"), D = /* @__PURE__ */ f((e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), "drawDivider"), Y = /* @__PURE__ */ f((e, i) => {
|
|
7
7
|
const d = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 2 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.id), c = d.node().getBBox();
|
|
8
8
|
return e.insert("rect", ":first-child").attr("x", t().state.padding).attr("y", t().state.padding).attr("width", c.width + 2 * t().state.padding).attr("height", c.height + 2 * t().state.padding).attr("rx", t().state.radius), d;
|
|
9
9
|
}, "drawSimpleState"), I = /* @__PURE__ */ f((e, i) => {
|
|
10
10
|
const d = /* @__PURE__ */ f(function(g, B, m) {
|
|
11
|
-
const
|
|
12
|
-
m ||
|
|
11
|
+
const v = g.append("tspan").attr("x", 2 * t().state.padding).text(B);
|
|
12
|
+
m || v.attr("dy", t().state.textHeight);
|
|
13
13
|
}, "addTspan"), n = e.append("text").attr("x", 2 * t().state.padding).attr("y", t().state.textHeight + 1.3 * t().state.padding).attr("font-size", t().state.fontSize).attr("class", "state-title").text(i.descriptions[0]).node().getBBox(), l = n.height, x = e.append("text").attr("x", t().state.padding).attr(
|
|
14
14
|
"y",
|
|
15
15
|
l + t().state.padding * 0.4 + t().state.dividerMargin + t().state.textHeight
|
|
@@ -38,20 +38,20 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
38
38
|
"y",
|
|
39
39
|
t().state.titleShift - t().state.textHeight - t().state.padding
|
|
40
40
|
).attr("width", o).attr("height", B.height + 3 + 2 * t().state.textHeight).attr("rx", t().state.radius), e;
|
|
41
|
-
}, "addTitleAndBox"),
|
|
41
|
+
}, "addTitleAndBox"), q = /* @__PURE__ */ f((e) => (e.append("circle").attr("class", "end-state-outer").attr("r", t().state.sizeUnit + t().state.miniPadding).attr(
|
|
42
42
|
"cx",
|
|
43
43
|
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
44
44
|
).attr(
|
|
45
45
|
"cy",
|
|
46
46
|
t().state.padding + t().state.sizeUnit + t().state.miniPadding
|
|
47
|
-
), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), "drawEndState"),
|
|
47
|
+
), e.append("circle").attr("class", "end-state-inner").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit + 2).attr("cy", t().state.padding + t().state.sizeUnit + 2)), "drawEndState"), K = /* @__PURE__ */ f((e, i) => {
|
|
48
48
|
let d = t().state.forkWidth, c = t().state.forkHeight;
|
|
49
49
|
if (i.parentId) {
|
|
50
50
|
let n = d;
|
|
51
51
|
d = c, c = n;
|
|
52
52
|
}
|
|
53
53
|
return e.append("rect").style("stroke", "black").style("fill", "black").attr("width", d).attr("height", c).attr("x", t().state.padding).attr("y", t().state.padding);
|
|
54
|
-
}, "drawForkJoinState"),
|
|
54
|
+
}, "drawForkJoinState"), Z = /* @__PURE__ */ f((e, i, d, c) => {
|
|
55
55
|
let n = 0;
|
|
56
56
|
const l = c.append("text");
|
|
57
57
|
l.style("text-anchor", "start"), l.attr("class", "noteText");
|
|
@@ -71,9 +71,9 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
return { textWidth: l.node().getBBox().width, textHeight: n };
|
|
74
|
-
}, "_drawLongText"),
|
|
74
|
+
}, "_drawLongText"), j = /* @__PURE__ */ f((e, i) => {
|
|
75
75
|
i.attr("class", "state-note");
|
|
76
|
-
const d = i.append("rect").attr("x", 0).attr("y", t().state.padding), c = i.append("g"), { textWidth: n, textHeight: l } =
|
|
76
|
+
const d = i.append("rect").attr("x", 0).attr("y", t().state.padding), c = i.append("g"), { textWidth: n, textHeight: l } = Z(e, 0, 0, c);
|
|
77
77
|
return d.attr("height", l + 2 * t().state.noteMargin), d.attr("width", n + t().state.noteMargin * 2), d;
|
|
78
78
|
}, "drawNote"), L = /* @__PURE__ */ f(function(e, i) {
|
|
79
79
|
const d = i.id, c = {
|
|
@@ -82,10 +82,10 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
82
82
|
width: 0,
|
|
83
83
|
height: 0
|
|
84
84
|
}, n = e.append("g").attr("id", d).attr("class", "stateGroup");
|
|
85
|
-
i.type === "start" && X(n), i.type === "end" &&
|
|
85
|
+
i.type === "start" && X(n), i.type === "end" && q(n), (i.type === "fork" || i.type === "join") && K(n, i), i.type === "note" && j(i.note.text, n), i.type === "divider" && D(n), i.type === "default" && i.descriptions.length === 0 && Y(n, i), i.type === "default" && i.descriptions.length > 0 && I(n, i);
|
|
86
86
|
const l = n.node().getBBox();
|
|
87
87
|
return c.width = l.width + 2 * t().state.padding, c.height = l.height + 2 * t().state.padding, c;
|
|
88
|
-
}, "drawState"),
|
|
88
|
+
}, "drawState"), A = 0, Q = /* @__PURE__ */ f(function(e, i, d) {
|
|
89
89
|
const c = /* @__PURE__ */ f(function(s) {
|
|
90
90
|
switch (s) {
|
|
91
91
|
case N.relationType.AGGREGATION:
|
|
@@ -99,11 +99,11 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
99
99
|
}
|
|
100
100
|
}, "getRelationType");
|
|
101
101
|
i.points = i.points.filter((s) => !Number.isNaN(s.y));
|
|
102
|
-
const n = i.points, l =
|
|
102
|
+
const n = i.points, l = U().x(function(s) {
|
|
103
103
|
return s.x;
|
|
104
104
|
}).y(function(s) {
|
|
105
105
|
return s.y;
|
|
106
|
-
}).curve(
|
|
106
|
+
}).curve(_), x = e.append("path").attr("d", l(n)).attr("id", "edge" + A).attr("class", "transition");
|
|
107
107
|
let a = "";
|
|
108
108
|
if (t().state.arrowMarkerAbsolute && (a = C(!0)), x.attr(
|
|
109
109
|
"marker-end",
|
|
@@ -112,10 +112,10 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
112
112
|
const s = e.append("g").attr("class", "stateLabel"), { x: w, y: p } = F.calcLabelPosition(i.points), o = z.getRows(d.title);
|
|
113
113
|
let g = 0;
|
|
114
114
|
const B = [];
|
|
115
|
-
let m = 0,
|
|
115
|
+
let m = 0, v = 0;
|
|
116
116
|
for (let u = 0; u <= o.length; u++) {
|
|
117
117
|
const h = s.append("text").attr("text-anchor", "middle").text(o[u]).attr("x", w).attr("y", p + g), y = h.node().getBBox();
|
|
118
|
-
m = Math.max(m, y.width),
|
|
118
|
+
m = Math.max(m, y.width), v = Math.min(v, y.x), S.info(y.x, w, p + g), g === 0 && (g = h.node().getBBox().height, S.info("Title height", g, p)), B.push(h);
|
|
119
119
|
}
|
|
120
120
|
let k = g * o.length;
|
|
121
121
|
if (o.length > 1) {
|
|
@@ -125,7 +125,7 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
125
125
|
const r = s.node().getBBox();
|
|
126
126
|
s.insert("rect", ":first-child").attr("class", "box").attr("x", w - m / 2 - t().state.padding / 2).attr("y", p - k / 2 - t().state.padding / 2 - 3.5).attr("width", m + t().state.padding).attr("height", k + t().state.padding), S.info(r);
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
A++;
|
|
129
129
|
}, "drawEdge"), b, T = {}, V = /* @__PURE__ */ f(function() {
|
|
130
130
|
}, "setConf"), tt = /* @__PURE__ */ f(function(e) {
|
|
131
131
|
e.append("defs").append("marker").attr("id", "dependencyEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
@@ -139,14 +139,14 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
139
139
|
const s = x.select(`[id='${i}']`);
|
|
140
140
|
tt(s);
|
|
141
141
|
const w = c.db.getRootDoc();
|
|
142
|
-
|
|
142
|
+
G(w, s, void 0, !1, x, a, c);
|
|
143
143
|
const p = b.padding, o = s.node().getBBox(), g = o.width + p * 2, B = o.height + p * 2, m = g * 1.75;
|
|
144
144
|
P(s, B, m, b.useMaxWidth), s.attr(
|
|
145
145
|
"viewBox",
|
|
146
146
|
`${o.x - b.padding} ${o.y - b.padding} ` + g + " " + B
|
|
147
147
|
);
|
|
148
|
-
}, "draw"), at = /* @__PURE__ */ f((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"),
|
|
149
|
-
const a = new
|
|
148
|
+
}, "draw"), at = /* @__PURE__ */ f((e) => e ? e.length * b.fontSizeFactor : 1, "getLabelWidth"), G = /* @__PURE__ */ f((e, i, d, c, n, l, x) => {
|
|
149
|
+
const a = new J({
|
|
150
150
|
compound: !0,
|
|
151
151
|
multigraph: !0
|
|
152
152
|
});
|
|
@@ -189,11 +189,11 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
189
189
|
let h;
|
|
190
190
|
if (u.doc) {
|
|
191
191
|
let y = i.append("g").attr("id", u.id).attr("class", "stateGroup");
|
|
192
|
-
h =
|
|
192
|
+
h = G(u.doc, y, u.id, !c, n, l, x);
|
|
193
193
|
{
|
|
194
194
|
y = $(y, u, c);
|
|
195
|
-
let
|
|
196
|
-
h.width =
|
|
195
|
+
let E = y.node().getBBox();
|
|
196
|
+
h.width = E.width, h.height = E.height + b.padding / 2, T[u.id] = { y: b.compositTitleSize };
|
|
197
197
|
}
|
|
198
198
|
} else
|
|
199
199
|
h = L(i, u, a);
|
|
@@ -203,8 +203,8 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
203
203
|
id: u.id + "-note",
|
|
204
204
|
note: u.note,
|
|
205
205
|
type: "note"
|
|
206
|
-
},
|
|
207
|
-
u.note.position === "left of" ? (a.setNode(h.id + "-note",
|
|
206
|
+
}, E = L(i, y, a);
|
|
207
|
+
u.note.position === "left of" ? (a.setNode(h.id + "-note", E), a.setNode(h.id, h)) : (a.setNode(h.id, h), a.setNode(h.id + "-note", E)), a.setParent(h.id, h.id + "-group"), a.setParent(h.id + "-note", h.id + "-group");
|
|
208
208
|
} else
|
|
209
209
|
a.setNode(h.id, h);
|
|
210
210
|
}
|
|
@@ -222,7 +222,7 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
222
222
|
},
|
|
223
223
|
"id" + B
|
|
224
224
|
);
|
|
225
|
-
}),
|
|
225
|
+
}), O(a), S.debug("Graph after layout", a.nodes());
|
|
226
226
|
const m = i.node();
|
|
227
227
|
a.nodes().forEach(function(r) {
|
|
228
228
|
r !== void 0 && a.node(r) !== void 0 ? (S.warn("Node " + r + ": " + JSON.stringify(a.node(r))), n.select("#" + m.id + " #" + r).attr(
|
|
@@ -230,26 +230,26 @@ var X = /* @__PURE__ */ f((e) => e.append("circle").attr("class", "start-state")
|
|
|
230
230
|
"translate(" + (a.node(r).x - a.node(r).width / 2) + "," + (a.node(r).y + (T[r] ? T[r].y : 0) - a.node(r).height / 2) + " )"
|
|
231
231
|
), n.select("#" + m.id + " #" + r).attr("data-x-shift", a.node(r).x - a.node(r).width / 2), l.querySelectorAll("#" + m.id + " #" + r + " .divider").forEach((h) => {
|
|
232
232
|
const y = h.parentElement;
|
|
233
|
-
let
|
|
234
|
-
y && (y.parentElement && (
|
|
233
|
+
let E = 0, M = 0;
|
|
234
|
+
y && (y.parentElement && (E = y.parentElement.getBBox().width), M = parseInt(y.getAttribute("data-x-shift"), 10), Number.isNaN(M) && (M = 0)), h.setAttribute("x1", 0 - M + 8), h.setAttribute("x2", E - M - 8);
|
|
235
235
|
})) : S.debug("No Node " + r + ": " + JSON.stringify(a.node(r)));
|
|
236
236
|
});
|
|
237
|
-
let
|
|
237
|
+
let v = m.getBBox();
|
|
238
238
|
a.edges().forEach(function(r) {
|
|
239
|
-
r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))),
|
|
240
|
-
}),
|
|
239
|
+
r !== void 0 && a.edge(r) !== void 0 && (S.debug("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(a.edge(r))), Q(i, a.edge(r), a.edge(r).relation));
|
|
240
|
+
}), v = m.getBBox();
|
|
241
241
|
const k = {
|
|
242
242
|
id: d || "root",
|
|
243
243
|
label: d || "root",
|
|
244
244
|
width: 0,
|
|
245
245
|
height: 0
|
|
246
246
|
};
|
|
247
|
-
return k.width =
|
|
247
|
+
return k.width = v.width + 2 * b.padding, k.height = v.height + 2 * b.padding, S.debug("Doc rendered", k, a), k;
|
|
248
248
|
}, "renderDoc"), it = {
|
|
249
249
|
setConf: V,
|
|
250
250
|
draw: et
|
|
251
251
|
}, ct = {
|
|
252
|
-
parser:
|
|
252
|
+
parser: R,
|
|
253
253
|
get db() {
|
|
254
254
|
return new N(1);
|
|
255
255
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { s as
|
|
2
|
-
import {
|
|
1
|
+
import { s as a, S as t, b as r, a as s } from "./chunk-DI55MBZ5.js";
|
|
2
|
+
import { a1 as i } from "./CoachForm.js";
|
|
3
3
|
import "./redux-toolkit.modern.js";
|
|
4
|
-
var
|
|
5
|
-
parser:
|
|
4
|
+
var l = {
|
|
5
|
+
parser: a,
|
|
6
6
|
get db() {
|
|
7
|
-
return new
|
|
7
|
+
return new t(2);
|
|
8
8
|
},
|
|
9
9
|
renderer: r,
|
|
10
10
|
styles: s,
|
|
@@ -13,5 +13,5 @@ var _ = {
|
|
|
13
13
|
}, "init")
|
|
14
14
|
};
|
|
15
15
|
export {
|
|
16
|
-
|
|
16
|
+
l as diagram
|
|
17
17
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { s as
|
|
1
|
+
import { a1 as s, at as xt, aN as kt, an as vt, a7 as _t, ad as E, aO as bt, aP as wt, aQ as St, aR as Et } from "./CoachForm.js";
|
|
2
|
+
import { s as q } from "./redux-toolkit.modern.js";
|
|
3
3
|
import { d as nt } from "./arc.js";
|
|
4
4
|
var X = function() {
|
|
5
5
|
var n = /* @__PURE__ */ s(function(f, i, a, h) {
|
|
@@ -63,7 +63,7 @@ var X = function() {
|
|
|
63
63
|
}
|
|
64
64
|
}, "parseError"),
|
|
65
65
|
parse: /* @__PURE__ */ s(function(i) {
|
|
66
|
-
var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, C = 0, B = 2,
|
|
66
|
+
var a = this, h = [0], u = [], y = [null], o = [], S = this.table, k = "", M = 0, C = 0, B = 2, Q = 1, O = o.slice.call(arguments, 1), v = Object.create(this.lexer), N = { yy: {} };
|
|
67
67
|
for (var L in this.yy)
|
|
68
68
|
Object.prototype.hasOwnProperty.call(this.yy, L) && (N.yy[L] = this.yy[L]);
|
|
69
69
|
v.setInput(i, N.yy), N.yy.lexer = v, N.yy.parser = this, typeof v.yylloc > "u" && (v.yylloc = {});
|
|
@@ -75,20 +75,20 @@ var X = function() {
|
|
|
75
75
|
h.length = h.length - 2 * T, y.length = y.length - T, o.length = o.length - T;
|
|
76
76
|
}
|
|
77
77
|
s(R, "popStack");
|
|
78
|
-
function
|
|
78
|
+
function A() {
|
|
79
79
|
var T;
|
|
80
|
-
return T = u.pop() || v.lex() ||
|
|
80
|
+
return T = u.pop() || v.lex() || Q, typeof T != "number" && (T instanceof Array && (u = T, T = u.pop()), T = a.symbols_[T] || T), T;
|
|
81
81
|
}
|
|
82
|
-
s(
|
|
83
|
-
for (var w,
|
|
84
|
-
if (
|
|
85
|
-
var
|
|
82
|
+
s(A, "lex");
|
|
83
|
+
for (var w, P, I, J, z = {}, j, H, et, G; ; ) {
|
|
84
|
+
if (P = h[h.length - 1], this.defaultActions[P] ? I = this.defaultActions[P] : ((w === null || typeof w > "u") && (w = A()), I = S[P] && S[P][w]), typeof I > "u" || !I.length || !I[0]) {
|
|
85
|
+
var K = "";
|
|
86
86
|
G = [];
|
|
87
|
-
for (j in S[
|
|
87
|
+
for (j in S[P])
|
|
88
88
|
this.terminals_[j] && j > B && G.push("'" + this.terminals_[j] + "'");
|
|
89
|
-
v.showPosition ?
|
|
89
|
+
v.showPosition ? K = "Parse error on line " + (M + 1) + `:
|
|
90
90
|
` + v.showPosition() + `
|
|
91
|
-
Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" :
|
|
91
|
+
Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : K = "Parse error on line " + (M + 1) + ": Unexpected " + (w == Q ? "end of input" : "'" + (this.terminals_[w] || w) + "'"), this.parseError(K, {
|
|
92
92
|
text: v.match,
|
|
93
93
|
token: this.terminals_[w] || w,
|
|
94
94
|
line: v.yylineno,
|
|
@@ -97,21 +97,21 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "
|
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
99
|
if (I[0] instanceof Array && I.length > 1)
|
|
100
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
100
|
+
throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + w);
|
|
101
101
|
switch (I[0]) {
|
|
102
102
|
case 1:
|
|
103
103
|
h.push(w), y.push(v.yytext), o.push(v.yylloc), h.push(I[1]), w = null, C = v.yyleng, k = v.yytext, M = v.yylineno, b = v.yylloc;
|
|
104
104
|
break;
|
|
105
105
|
case 2:
|
|
106
|
-
if (H = this.productions_[I[1]][1],
|
|
106
|
+
if (H = this.productions_[I[1]][1], z.$ = y[y.length - H], z._$ = {
|
|
107
107
|
first_line: o[o.length - (H || 1)].first_line,
|
|
108
108
|
last_line: o[o.length - 1].last_line,
|
|
109
109
|
first_column: o[o.length - (H || 1)].first_column,
|
|
110
110
|
last_column: o[o.length - 1].last_column
|
|
111
|
-
}, $ && (
|
|
111
|
+
}, $ && (z._$.range = [
|
|
112
112
|
o[o.length - (H || 1)].range[0],
|
|
113
113
|
o[o.length - 1].range[1]
|
|
114
|
-
]),
|
|
114
|
+
]), J = this.performAction.apply(z, [
|
|
115
115
|
k,
|
|
116
116
|
C,
|
|
117
117
|
M,
|
|
@@ -119,9 +119,9 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[w] || w) + "'" : Q = "
|
|
|
119
119
|
I[1],
|
|
120
120
|
y,
|
|
121
121
|
o
|
|
122
|
-
].concat(O)), typeof
|
|
123
|
-
return
|
|
124
|
-
H && (h = h.slice(0, -1 * H * 2), y = y.slice(0, -1 * H), o = o.slice(0, -1 * H)), h.push(this.productions_[I[1]][0]), y.push(
|
|
122
|
+
].concat(O)), typeof J < "u")
|
|
123
|
+
return J;
|
|
124
|
+
H && (h = h.slice(0, -1 * H * 2), y = y.slice(0, -1 * H), o = o.slice(0, -1 * H)), h.push(this.productions_[I[1]][0]), y.push(z.$), o.push(z._$), et = S[h[h.length - 2]][h[h.length - 1]], h.push(et);
|
|
125
125
|
break;
|
|
126
126
|
case 3:
|
|
127
127
|
return !0;
|
|
@@ -367,10 +367,10 @@ xt(at, {
|
|
|
367
367
|
getSections: () => dt,
|
|
368
368
|
getTasks: () => ut
|
|
369
369
|
});
|
|
370
|
-
var
|
|
371
|
-
Y.length = 0,
|
|
370
|
+
var V = "", lt = 0, Y = [], U = [], W = [], ot = /* @__PURE__ */ s(() => kt, "getCommonDb"), ct = /* @__PURE__ */ s(function() {
|
|
371
|
+
Y.length = 0, U.length = 0, V = "", W.length = 0, vt();
|
|
372
372
|
}, "clear"), ht = /* @__PURE__ */ s(function(n) {
|
|
373
|
-
|
|
373
|
+
V = n, Y.push(n);
|
|
374
374
|
}, "addSection"), dt = /* @__PURE__ */ s(function() {
|
|
375
375
|
return Y;
|
|
376
376
|
}, "getSections"), ut = /* @__PURE__ */ s(function() {
|
|
@@ -379,35 +379,35 @@ var W = "", lt = 0, Y = [], q = [], z = [], ot = /* @__PURE__ */ s(() => kt, "ge
|
|
|
379
379
|
let e = 0;
|
|
380
380
|
for (; !n && e < t; )
|
|
381
381
|
n = rt(), e++;
|
|
382
|
-
return
|
|
382
|
+
return U.push(...W), U;
|
|
383
383
|
}, "getTasks"), pt = /* @__PURE__ */ s(function(n, t, e) {
|
|
384
384
|
const l = {
|
|
385
385
|
id: lt++,
|
|
386
|
-
section:
|
|
387
|
-
type:
|
|
386
|
+
section: V,
|
|
387
|
+
type: V,
|
|
388
388
|
task: n,
|
|
389
389
|
score: t || 0,
|
|
390
390
|
//if event is defined, then add it the events array
|
|
391
391
|
events: e ? [e] : []
|
|
392
392
|
};
|
|
393
|
-
|
|
393
|
+
W.push(l);
|
|
394
394
|
}, "addTask"), yt = /* @__PURE__ */ s(function(n) {
|
|
395
|
-
|
|
395
|
+
W.find((e) => e.id === lt - 1).events.push(n);
|
|
396
396
|
}, "addEvent"), gt = /* @__PURE__ */ s(function(n) {
|
|
397
397
|
const t = {
|
|
398
|
-
section:
|
|
399
|
-
type:
|
|
398
|
+
section: V,
|
|
399
|
+
type: V,
|
|
400
400
|
description: n,
|
|
401
401
|
task: n,
|
|
402
402
|
classes: []
|
|
403
403
|
};
|
|
404
|
-
|
|
404
|
+
U.push(t);
|
|
405
405
|
}, "addTaskOrg"), rt = /* @__PURE__ */ s(function() {
|
|
406
406
|
const n = /* @__PURE__ */ s(function(e) {
|
|
407
|
-
return
|
|
407
|
+
return W[e].processed;
|
|
408
408
|
}, "compileTask");
|
|
409
409
|
let t = !0;
|
|
410
|
-
for (const [e, l] of
|
|
410
|
+
for (const [e, l] of W.entries())
|
|
411
411
|
n(e), t = t && l.processed;
|
|
412
412
|
return t;
|
|
413
413
|
}, "compileTasks"), It = {
|
|
@@ -454,7 +454,7 @@ var W = "", lt = 0, Y = [], q = [], z = [], ot = /* @__PURE__ */ s(() => kt, "ge
|
|
|
454
454
|
s(e, "genPoints");
|
|
455
455
|
const l = n.append("polygon");
|
|
456
456
|
l.attr("points", e(t.x, t.y, 50, 20, 7)), l.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
|
|
457
|
-
}, "drawLabel"),
|
|
457
|
+
}, "drawLabel"), Pt = /* @__PURE__ */ s(function(n, t, e) {
|
|
458
458
|
const l = n.append("g"), r = D();
|
|
459
459
|
r.x = t.x, r.y = t.y, r.fill = t.fill, r.width = e.width, r.height = e.height, r.class = "journey-section section-type-" + t.num, r.rx = 3, r.ry = 3, Z(l, r), mt(e)(
|
|
460
460
|
t.text,
|
|
@@ -488,7 +488,7 @@ var W = "", lt = 0, Y = [], q = [], z = [], ot = /* @__PURE__ */ s(() => kt, "ge
|
|
|
488
488
|
e,
|
|
489
489
|
t.colour
|
|
490
490
|
);
|
|
491
|
-
}, "drawTask"),
|
|
491
|
+
}, "drawTask"), At = /* @__PURE__ */ s(function(n, t) {
|
|
492
492
|
Z(n, {
|
|
493
493
|
x: t.startx,
|
|
494
494
|
y: t.starty,
|
|
@@ -550,7 +550,7 @@ var W = "", lt = 0, Y = [], q = [], z = [], ot = /* @__PURE__ */ s(() => kt, "ge
|
|
|
550
550
|
}, "initGraphics");
|
|
551
551
|
function tt(n, t) {
|
|
552
552
|
n.each(function() {
|
|
553
|
-
var e =
|
|
553
|
+
var e = q(this), l = e.text().split(/(\s+|<br>)/).reverse(), r, d = [], c = 1.1, g = e.attr("y"), m = parseFloat(e.attr("dy")), p = e.text(null).append("tspan").attr("x", 0).attr("y", g).attr("dy", m + "em");
|
|
554
554
|
for (let x = 0; x < l.length; x++)
|
|
555
555
|
r = l[l.length - 1 - x], d.push(r), p.text(d.join(" ").trim()), (p.node().getComputedTextLength() > t || r === "<br>") && (d.pop(), p.text(d.join(" ").trim()), r === "<br>" ? d = [""] : d = [r], p = e.append("tspan").attr("x", 0).attr("y", g).attr("dy", c + "em").text(r));
|
|
556
556
|
});
|
|
@@ -564,12 +564,12 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
564
564
|
(t.class ? t.class + " " : "") + "timeline-node " + ("section-" + r)
|
|
565
565
|
);
|
|
566
566
|
const c = d.append("g"), g = d.append("g"), p = g.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), x = (_ = l.fontSize) != null && _.replace ? l.fontSize.replace("px", "") : l.fontSize;
|
|
567
|
-
return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"),
|
|
568
|
-
}, "drawNode"),
|
|
567
|
+
return t.height = p.height + x * 1.1 * 0.5 + t.padding, t.height = Math.max(t.height, t.maxHeight), t.width = t.width + 2 * t.padding, g.attr("transform", "translate(" + t.width / 2 + ", " + t.padding / 2 + ")"), Vt(c, t, r, l), t;
|
|
568
|
+
}, "drawNode"), zt = /* @__PURE__ */ s(function(n, t, e) {
|
|
569
569
|
var g;
|
|
570
570
|
const l = n.append("g"), d = l.append("text").text(t.descr).attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle").call(tt, t.width).node().getBBox(), c = (g = e.fontSize) != null && g.replace ? e.fontSize.replace("px", "") : e.fontSize;
|
|
571
571
|
return l.remove(), d.height + c * 1.1 * 0.5 + t.padding;
|
|
572
|
-
}, "getVirtualNodeHeight"),
|
|
572
|
+
}, "getVirtualNodeHeight"), Vt = /* @__PURE__ */ s(function(n, t, e) {
|
|
573
573
|
n.append("path").attr("id", "node-" + t.id).attr("class", "node-bkg node-" + t.type).attr(
|
|
574
574
|
"d",
|
|
575
575
|
`M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
|
|
@@ -577,24 +577,24 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
577
577
|
}, "defaultBkg"), F = {
|
|
578
578
|
drawRect: Z,
|
|
579
579
|
drawCircle: Mt,
|
|
580
|
-
drawSection:
|
|
580
|
+
drawSection: Pt,
|
|
581
581
|
drawText: ft,
|
|
582
582
|
drawLabel: $t,
|
|
583
583
|
drawTask: Ht,
|
|
584
|
-
drawBackgroundRect:
|
|
584
|
+
drawBackgroundRect: At,
|
|
585
585
|
getTextObj: Ct,
|
|
586
586
|
getNoteRect: D,
|
|
587
587
|
initGraphics: Rt,
|
|
588
588
|
drawNode: Ft,
|
|
589
|
-
getVirtualNodeHeight:
|
|
590
|
-
},
|
|
589
|
+
getVirtualNodeHeight: zt
|
|
590
|
+
}, Wt = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
591
591
|
var O, v, N;
|
|
592
592
|
const r = _t(), d = ((O = r.timeline) == null ? void 0 : O.leftMargin) ?? 50;
|
|
593
593
|
E.debug("timeline", l.db);
|
|
594
594
|
const c = r.securityLevel;
|
|
595
595
|
let g;
|
|
596
|
-
c === "sandbox" && (g =
|
|
597
|
-
const p = (c === "sandbox" ?
|
|
596
|
+
c === "sandbox" && (g = q("#i" + t));
|
|
597
|
+
const p = (c === "sandbox" ? q(g.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
|
|
598
598
|
p.append("g");
|
|
599
599
|
const x = l.db.getTasks(), _ = l.db.getCommonDb().getDiagramTitle();
|
|
600
600
|
E.debug("task", x), F.initGraphics(p);
|
|
@@ -626,9 +626,9 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
626
626
|
maxHeight: a
|
|
627
627
|
}, R = F.getVirtualNodeHeight(p, $, r);
|
|
628
628
|
E.debug("taskHeight before draw", R), a = Math.max(a, R + 20), M = Math.max(M, b.events.length);
|
|
629
|
-
let
|
|
629
|
+
let A = 0;
|
|
630
630
|
for (const w of b.events) {
|
|
631
|
-
const
|
|
631
|
+
const P = {
|
|
632
632
|
descr: w,
|
|
633
633
|
section: b.section,
|
|
634
634
|
number: b.section,
|
|
@@ -636,9 +636,9 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
636
636
|
padding: 20,
|
|
637
637
|
maxHeight: 50
|
|
638
638
|
};
|
|
639
|
-
|
|
639
|
+
A += F.getVirtualNodeHeight(p, P, r);
|
|
640
640
|
}
|
|
641
|
-
b.events.length > 0 && (
|
|
641
|
+
b.events.length > 0 && (A += (b.events.length - 1) * 10), C = Math.max(C, A);
|
|
642
642
|
}
|
|
643
643
|
E.debug("maxSectionHeight before draw", i), E.debug("maxTaskHeight before draw", a), f && f.length > 0 ? f.forEach((L) => {
|
|
644
644
|
const b = x.filter((w) => w.section === L), $ = {
|
|
@@ -650,8 +650,8 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
650
650
|
maxHeight: i
|
|
651
651
|
};
|
|
652
652
|
E.debug("sectionNode", $);
|
|
653
|
-
const R = p.append("g"),
|
|
654
|
-
E.debug("sectionNode output",
|
|
653
|
+
const R = p.append("g"), A = F.drawNode(R, $, S, r);
|
|
654
|
+
E.debug("sectionNode output", A), R.attr("transform", `translate(${y}, ${u})`), o += i + 50, b.length > 0 && st(
|
|
655
655
|
p,
|
|
656
656
|
b,
|
|
657
657
|
S,
|
|
@@ -726,7 +726,7 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
726
726
|
}, "drawEvents"), Ot = {
|
|
727
727
|
setConf: /* @__PURE__ */ s(() => {
|
|
728
728
|
}, "setConf"),
|
|
729
|
-
draw:
|
|
729
|
+
draw: Wt
|
|
730
730
|
}, jt = /* @__PURE__ */ s((n) => {
|
|
731
731
|
let t = "";
|
|
732
732
|
for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
|
|
@@ -791,12 +791,12 @@ var Ft = /* @__PURE__ */ s(function(n, t, e, l) {
|
|
|
791
791
|
.eventWrapper {
|
|
792
792
|
filter: brightness(120%);
|
|
793
793
|
}
|
|
794
|
-
`, "getStyles"),
|
|
794
|
+
`, "getStyles"), qt = Gt, Jt = {
|
|
795
795
|
db: at,
|
|
796
796
|
renderer: Ot,
|
|
797
797
|
parser: Tt,
|
|
798
|
-
styles:
|
|
798
|
+
styles: qt
|
|
799
799
|
};
|
|
800
800
|
export {
|
|
801
|
-
|
|
801
|
+
Jt as diagram
|
|
802
802
|
};
|