@schmitech/chatbot-widget 0.6.3 → 0.7.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/dist/ChatWidget.d.ts +11 -0
- package/dist/{_baseUniq-BPMphbq5-xiRWQlDn.js → _baseUniq-BRKsqoH--HqBVqMpT.js} +126 -126
- package/dist/arc-pab_su9s-DkImmxyv.js +84 -0
- package/dist/architecture-U656AL7Q-CRlU-eNB-vFayp_Gk.js +7 -0
- package/dist/{architectureDiagram-VXUJARFQ-BiqZtsDe-rYpYn0Hz.js → architectureDiagram-VXUJARFQ-DqQ8r_6g-DTzMoAeY.js} +5 -5
- package/dist/{blockDiagram-VD42YOAC-zcRIdFTD-B54KiQJD.js → blockDiagram-VD42YOAC-B-dKfcH3-DKPGmrNb.js} +50 -50
- package/dist/{c4Diagram-YG6GDRKO-DYXNcDX4-B9fXQAMg.js → c4Diagram-YG6GDRKO-DMUPaBEl-CXjiCiKq.js} +63 -63
- package/dist/channel-HKsfPa5q-B30_3C0d.js +6 -0
- package/dist/chatbot-widget.bundle.js +11596 -0
- package/dist/chatbot-widget.es.js +1 -1
- package/dist/chatbot-widget.umd.js +4342 -3550
- package/dist/{chunk-4BX2VUAB-DAh9ktmY-CF6YTNXg.js → chunk-4BX2VUAB-CX67kh_B-JdLaNmBY.js} +1 -1
- package/dist/chunk-55IACEB6-BocSyyvr--btUJ1po.js +9 -0
- package/dist/{chunk-B4BG7PRW-BTUSpeKy-CXaYsx4a.js → chunk-B4BG7PRW-CO8QAyfE-p5mLBzD4.js} +30 -30
- package/dist/{chunk-DI55MBZ5-DKt4WII7-CjsnNRFb.js → chunk-DI55MBZ5-Dw1L6Eos-zQC2oI_e.js} +149 -149
- package/dist/{chunk-FMBD7UC4-DdcCR8w3-BbYkKjQZ.js → chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js} +1 -1
- package/dist/{chunk-QN33PNHL-v6AkzOl1-DrzKpDUJ.js → chunk-QN33PNHL-vP2PqfVG-ByquTp49.js} +5 -5
- package/dist/{chunk-QZHKN3VN-DVJOrqBZ-BQORk0pj.js → chunk-QZHKN3VN-Bcidzu63-ukwvi4Mt.js} +1 -1
- package/dist/{chunk-TZMSLE5B-G2jJHqli-B_BRSOS0.js → chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js} +1 -1
- package/dist/{classDiagram-v2-WZHVMYZB-CxmgTanh-ByLirDpd.js → classDiagram-2ON5EDUG-C7cYN9hv-CtX4c_16.js} +2 -2
- package/dist/{classDiagram-2ON5EDUG-CxmgTanh-ByLirDpd.js → classDiagram-v2-WZHVMYZB-C7cYN9hv-CtX4c_16.js} +2 -2
- package/dist/{clone-CsNB4mMi-B2bGL_Hr.js → clone-DoPb9X13-BkFPVisk.js} +1 -1
- package/dist/config/index.d.ts +81 -0
- package/dist/{cose-bilkent-S5V4N54A-BRr2Y6dg-C4O3AMLV.js → cose-bilkent-S5V4N54A-BGzO4EsH-BNoSF82N.js} +1 -1
- package/dist/{dagre-6UL2VRFP-DX8gNHmJ-BSzSR8Xh.js → dagre-6UL2VRFP-TzNvXCds-Dnr2OGZv.js} +45 -45
- package/dist/{diagram-PSM6KHXK-DNX818To-D60Hp_rL.js → diagram-PSM6KHXK-BqY4RpUg-BAHxSfLA.js} +119 -119
- package/dist/{diagram-QEK2KX5R-BDO6hKtm-BHvRInjZ.js → diagram-QEK2KX5R-CTjgBsne-D-9APhrR.js} +74 -74
- package/dist/{diagram-S2PKOQOG-IEqaDwzi-CZZkmLuc.js → diagram-S2PKOQOG-BqrhTIpA-DvsAaFEx.js} +21 -21
- package/dist/{erDiagram-Q2GNP2WA-DbLpN8Jp-902zC-_U.js → erDiagram-Q2GNP2WA-B2hsi_Tl-CQQl2KTS.js} +24 -24
- package/dist/{flowDiagram-NV44I4VS-pJlHae8Y-hM8e9jah.js → flowDiagram-NV44I4VS-C03vtt_F-Ds5DxRz1.js} +37 -37
- package/dist/{ganttDiagram-JELNMOA3-J0Tkq5TR-C8n0Mtt1.js → ganttDiagram-JELNMOA3-B3hAg964-D9cHQTuZ.js} +110 -110
- package/dist/gitGraph-F6HP7TQM-B-XXB6PA-CXOJho2m.js +7 -0
- package/dist/{gitGraphDiagram-NY62KEGX-DgYonpsZ-CAVA4-Vo.js → gitGraphDiagram-NY62KEGX-ByhMH0yZ-DTWIR_Gp.js} +238 -238
- package/dist/{graph-BpcfrHXY-Dllj_YdG.js → graph-BmNkcFEM-CTJN7Ty_.js} +67 -67
- package/dist/hooks/useAnimationManagement.d.ts +16 -0
- package/dist/hooks/useInputManagement.d.ts +21 -0
- package/dist/hooks/useScrollManagement.d.ts +17 -0
- package/dist/index-BXexqYFc-Bn0M0HQB.js +13693 -0
- package/dist/{index-DlxA4QQ9.js → index-DU3Jqd59.js} +80142 -50172
- package/dist/index.d.ts +19 -0
- package/dist/info-NVLQJR56-BJV_yXNb-CH_hMh0K.js +7 -0
- package/dist/infoDiagram-WHAUD3N6-is6Ho4-T-E3qEjHYs.js +25 -0
- package/dist/{journeyDiagram-XKPGCS4Q-CfjB2Qdf-nD3bX36U.js → journeyDiagram-XKPGCS4Q-CRTOL26C-VvuJ7JPc.js} +71 -71
- package/dist/{kanban-definition-3W4ZIXB7-CrW8yVmd-C_Okjmcp.js → kanban-definition-3W4ZIXB7-CNnO_t6O-BsqhwZAY.js} +88 -88
- package/dist/{layout-bsfAhWjc-fb3F3QBs.js → layout-C0kZPebx-CrIgKtBd.js} +109 -109
- package/dist/{mermaid-parser.core-3GIbpcw--KxsyRnD0.js → mermaid-parser.core-C88_DDui-CHG6v5qB.js} +10 -10
- package/dist/min-7Gb0pNxh-Cd_K7Lpk.js +39 -0
- package/dist/{mindmap-definition-VGOIOE7T-Dj37RkY_-BXffQH_4.js → mindmap-definition-VGOIOE7T-CJZ2wTTa-D4yK-MK1.js} +40 -40
- package/dist/packet-BFZMPI3H-DPt2EftX-Bgsdgnv-.js +7 -0
- package/dist/pie-7BOR55EZ-aEOtXZZV-CT0TLfil.js +7 -0
- package/dist/{pieDiagram-ADFJNKIX-BiQvDx8I-DnApOdvY.js → pieDiagram-ADFJNKIX-C9OSknjr-DguaGmOm.js} +49 -49
- package/dist/{quadrantDiagram-AYHSOK5B-D4b-YFzI-DrTslixM.js → quadrantDiagram-AYHSOK5B-CW8yuAqv-Dp9c_xnT.js} +54 -54
- package/dist/radar-NHE76QYJ-Dv7iPziq-DzohugO5.js +7 -0
- package/dist/{requirementDiagram-UZGBJVZJ-km07nlVd-C-mMa1KG.js → requirementDiagram-UZGBJVZJ-nGPhruO1-DINXeP9u.js} +5 -5
- package/dist/{sankeyDiagram-TZEHDZUN-LfuSRRbf-4X6kl_ss.js → sankeyDiagram-TZEHDZUN-CmL90u-m-YTiy7xgb.js} +146 -146
- package/dist/{sequenceDiagram-WL72ISMW-CQ4J-0_7-CEQiE3WJ.js → sequenceDiagram-WL72ISMW-B02VRcnM-B0n6W8Zi.js} +3 -3
- package/dist/shared/styles.d.ts +76 -0
- package/dist/{stateDiagram-FKZM4ZOC-JtogJwt6-YmKguJGd.js → stateDiagram-FKZM4ZOC-DjoyLUdz-BEUNa8-U.js} +14 -14
- package/dist/{stateDiagram-v2-4FDKWEC3-DuQ7UaeU-D6r92VaJ.js → stateDiagram-v2-4FDKWEC3-Bq76BTB7-DJxNsvnB.js} +2 -2
- package/dist/store/chatStore.d.ts +19 -0
- package/dist/{timeline-definition-IT6M3QCI-Cs3NnF2M-BigQwSNM.js → timeline-definition-IT6M3QCI-CTn0Gm3T-sHrk-A3B.js} +78 -78
- package/dist/treemap-KMMF4GRG-BjgLKKyi-CXHyJ_sr.js +7 -0
- package/dist/ui/ChatInput.d.ts +17 -0
- package/dist/ui/Message.d.ts +22 -0
- package/dist/ui/MessagesList.d.ts +32 -0
- package/dist/utils/contentFiltering.d.ts +12 -0
- package/dist/utils/sessionManager.d.ts +2 -0
- package/dist/{xychartDiagram-PRI3JC2R-JzAaXa5z-k94imfkQ.js → xychartDiagram-PRI3JC2R-Cgg6Uija-BysdxdV7.js} +79 -79
- package/package.json +9 -9
- package/dist/arc-D9rhTKV0-3XdW6Lry.js +0 -84
- package/dist/architecture-U656AL7Q-BFNI3st4-ChEUjpe5.js +0 -6
- package/dist/channel-CUIutAfm-COC3Ib4R.js +0 -6
- package/dist/chunk-55IACEB6-Cza7pcpr-C1E53ZSc.js +0 -9
- package/dist/gitGraph-F6HP7TQM-CD3YuciB-WOZqeAgY.js +0 -6
- package/dist/index-DvNpGWs7-CTu7Fgm8.js +0 -13251
- package/dist/info-NVLQJR56-yPC6AWqF-CQWIUnLc.js +0 -6
- package/dist/infoDiagram-WHAUD3N6-C3JLOAnb-o3ipZ1gK.js +0 -25
- package/dist/min-C2aDz5ZK-NndI1eE7.js +0 -39
- package/dist/packet-BFZMPI3H-3ROFuof--C96yO55O.js +0 -6
- package/dist/pie-7BOR55EZ-BZ_QeD6P-Bs0c_r6N.js +0 -6
- package/dist/radar-NHE76QYJ-BkSncUeS-jHSdaVBc.js +0 -6
- package/dist/treemap-KMMF4GRG-CkW25-tn-CkfndsG5.js +0 -6
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ChatWidget, ChatWidgetProps } from './ChatWidget';
|
|
2
|
+
import { useChatStore } from './store/chatStore';
|
|
3
|
+
import './index.css';
|
|
4
|
+
import { getChatConfig, ChatConfig } from './config/index';
|
|
5
|
+
export { ChatWidget, useChatStore, getChatConfig };
|
|
6
|
+
export type { ChatWidgetProps, ChatConfig };
|
|
7
|
+
export default ChatWidget;
|
|
8
|
+
export declare function getApiUrl(): string;
|
|
9
|
+
export declare function getApiKey(): string;
|
|
10
|
+
export declare function setApiUrl(url: string): void;
|
|
11
|
+
export declare function setApiKey(key: string): void;
|
|
12
|
+
export declare function updateWidgetConfig(config: Partial<ChatConfig>): void;
|
|
13
|
+
export declare function injectChatWidget(config: {
|
|
14
|
+
apiUrl: string;
|
|
15
|
+
apiKey: string;
|
|
16
|
+
sessionId?: string;
|
|
17
|
+
containerSelector?: string;
|
|
18
|
+
widgetConfig?: Partial<ChatConfig>;
|
|
19
|
+
}): void;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { M as r, a as n, al as o, i as s, am as d } from "./index-DU3Jqd59.js";
|
|
2
|
+
import { j as p } from "./mermaid-parser.core-C88_DDui-CHG6v5qB.js";
|
|
3
|
+
typeof window < "u" && (window.global = window);
|
|
4
|
+
var f = {
|
|
5
|
+
parse: /* @__PURE__ */ r(async (a) => {
|
|
6
|
+
const e = await p("info", a);
|
|
7
|
+
n.debug(e);
|
|
8
|
+
}, "parse")
|
|
9
|
+
}, g = {
|
|
10
|
+
version: d.version + ""
|
|
11
|
+
}, m = /* @__PURE__ */ r(() => g.version, "getVersion"), w = {
|
|
12
|
+
getVersion: m
|
|
13
|
+
}, v = /* @__PURE__ */ r((a, e, i) => {
|
|
14
|
+
n.debug(`rendering info diagram
|
|
15
|
+
` + a);
|
|
16
|
+
const t = o(e);
|
|
17
|
+
s(t, 100, 400, !0), t.append("g").append("text").attr("x", 100).attr("y", 40).attr("class", "version").attr("font-size", 32).style("text-anchor", "middle").text(`v${i}`);
|
|
18
|
+
}, "draw"), l = { draw: v }, x = {
|
|
19
|
+
parser: f,
|
|
20
|
+
db: w,
|
|
21
|
+
renderer: l
|
|
22
|
+
};
|
|
23
|
+
export {
|
|
24
|
+
x as diagram
|
|
25
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { d as ft, y as rt, g as gt, x as mt } from "./chunk-TZMSLE5B-
|
|
2
|
-
import { l as xt } from "./chunk-FMBD7UC4-
|
|
3
|
-
import {
|
|
4
|
-
import { h as tt } from "./arc-
|
|
1
|
+
import { d as ft, y as rt, g as gt, x as mt } from "./chunk-TZMSLE5B-BtljMjlg-DP4v1MME.js";
|
|
2
|
+
import { l as xt } from "./chunk-FMBD7UC4-dPK7Boav-C-fxYlU9.js";
|
|
3
|
+
import { f as kt, e as bt, g as _t, h as wt, t as $t, s as vt, M as s, C as B, d as X, i as St, N as Ct } from "./index-DU3Jqd59.js";
|
|
4
|
+
import { h as tt } from "./arc-pab_su9s-DkImmxyv.js";
|
|
5
5
|
typeof window < "u" && (window.global = window);
|
|
6
|
-
var
|
|
6
|
+
var q = function() {
|
|
7
7
|
var t = /* @__PURE__ */ s(function(y, i, a, u) {
|
|
8
8
|
for (a = a || {}, u = y.length; u--; a[y[u]] = i) ;
|
|
9
9
|
return a;
|
|
@@ -62,32 +62,32 @@ var Q = function() {
|
|
|
62
62
|
}
|
|
63
63
|
}, "parseError"),
|
|
64
64
|
parse: /* @__PURE__ */ s(function(y) {
|
|
65
|
-
var i = this, a = [0], u = [], p = [null], o = [], x = this.table, k = "", T = 0, A = 0, ut = 2,
|
|
65
|
+
var i = this, a = [0], u = [], p = [null], o = [], x = this.table, k = "", T = 0, A = 0, ut = 2, J = 1, pt = o.slice.call(arguments, 1), b = Object.create(this.lexer), I = { yy: {} };
|
|
66
66
|
for (var Y in this.yy)
|
|
67
|
-
Object.prototype.hasOwnProperty.call(this.yy, Y) && (
|
|
68
|
-
b.setInput(y,
|
|
67
|
+
Object.prototype.hasOwnProperty.call(this.yy, Y) && (I.yy[Y] = this.yy[Y]);
|
|
68
|
+
b.setInput(y, I.yy), I.yy.lexer = b, I.yy.parser = this, typeof b.yylloc > "u" && (b.yylloc = {});
|
|
69
69
|
var z = b.yylloc;
|
|
70
70
|
o.push(z);
|
|
71
71
|
var yt = b.options && b.options.ranges;
|
|
72
|
-
typeof
|
|
72
|
+
typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
|
|
73
73
|
function dt(w) {
|
|
74
74
|
a.length = a.length - 2 * w, p.length = p.length - w, o.length = o.length - w;
|
|
75
75
|
}
|
|
76
76
|
s(dt, "popStack");
|
|
77
77
|
function K() {
|
|
78
78
|
var w;
|
|
79
|
-
return w = u.pop() || b.lex() ||
|
|
79
|
+
return w = u.pop() || b.lex() || J, typeof w != "number" && (w instanceof Array && (u = w, w = u.pop()), w = i.symbols_[w] || w), w;
|
|
80
80
|
}
|
|
81
81
|
s(K, "lex");
|
|
82
|
-
for (var _,
|
|
83
|
-
if (
|
|
82
|
+
for (var _, P, $, W, j = {}, D, C, H, O; ; ) {
|
|
83
|
+
if (P = a[a.length - 1], this.defaultActions[P] ? $ = this.defaultActions[P] : ((_ === null || typeof _ > "u") && (_ = K()), $ = x[P] && x[P][_]), typeof $ > "u" || !$.length || !$[0]) {
|
|
84
84
|
var G = "";
|
|
85
85
|
O = [];
|
|
86
|
-
for (D in x[
|
|
86
|
+
for (D in x[P])
|
|
87
87
|
this.terminals_[D] && D > ut && O.push("'" + this.terminals_[D] + "'");
|
|
88
88
|
b.showPosition ? G = "Parse error on line " + (T + 1) + `:
|
|
89
89
|
` + b.showPosition() + `
|
|
90
|
-
Expecting ` + O.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : G = "Parse error on line " + (T + 1) + ": Unexpected " + (_ ==
|
|
90
|
+
Expecting ` + O.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : G = "Parse error on line " + (T + 1) + ": Unexpected " + (_ == J ? "end of input" : "'" + (this.terminals_[_] || _) + "'"), this.parseError(G, {
|
|
91
91
|
text: b.match,
|
|
92
92
|
token: this.terminals_[_] || _,
|
|
93
93
|
line: b.yylineno,
|
|
@@ -96,31 +96,31 @@ Expecting ` + O.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : G = "
|
|
|
96
96
|
});
|
|
97
97
|
}
|
|
98
98
|
if ($[0] instanceof Array && $.length > 1)
|
|
99
|
-
throw new Error("Parse Error: multiple actions possible at state: " +
|
|
99
|
+
throw new Error("Parse Error: multiple actions possible at state: " + P + ", token: " + _);
|
|
100
100
|
switch ($[0]) {
|
|
101
101
|
case 1:
|
|
102
102
|
a.push(_), p.push(b.yytext), o.push(b.yylloc), a.push($[1]), _ = null, A = b.yyleng, k = b.yytext, T = b.yylineno, z = b.yylloc;
|
|
103
103
|
break;
|
|
104
104
|
case 2:
|
|
105
|
-
if (
|
|
106
|
-
first_line: o[o.length - (
|
|
105
|
+
if (C = this.productions_[$[1]][1], j.$ = p[p.length - C], j._$ = {
|
|
106
|
+
first_line: o[o.length - (C || 1)].first_line,
|
|
107
107
|
last_line: o[o.length - 1].last_line,
|
|
108
|
-
first_column: o[o.length - (
|
|
108
|
+
first_column: o[o.length - (C || 1)].first_column,
|
|
109
109
|
last_column: o[o.length - 1].last_column
|
|
110
110
|
}, yt && (j._$.range = [
|
|
111
|
-
o[o.length - (
|
|
111
|
+
o[o.length - (C || 1)].range[0],
|
|
112
112
|
o[o.length - 1].range[1]
|
|
113
113
|
]), W = this.performAction.apply(j, [
|
|
114
114
|
k,
|
|
115
115
|
A,
|
|
116
116
|
T,
|
|
117
|
-
|
|
117
|
+
I.yy,
|
|
118
118
|
$[1],
|
|
119
119
|
p,
|
|
120
120
|
o
|
|
121
121
|
].concat(pt)), typeof W < "u")
|
|
122
122
|
return W;
|
|
123
|
-
|
|
123
|
+
C && (a = a.slice(0, -1 * C * 2), p = p.slice(0, -1 * C), o = o.slice(0, -1 * C)), a.push(this.productions_[$[1]][0]), p.push(j.$), o.push(j._$), H = x[a[a.length - 2]][a[a.length - 1]], a.push(H);
|
|
124
124
|
break;
|
|
125
125
|
case 3:
|
|
126
126
|
return !0;
|
|
@@ -355,20 +355,20 @@ Expecting ` + O.join(", ") + ", got '" + (this.terminals_[_] || _) + "'" : G = "
|
|
|
355
355
|
}
|
|
356
356
|
return s(g, "Parser"), g.prototype = f, f.Parser = g, new g();
|
|
357
357
|
}();
|
|
358
|
-
|
|
359
|
-
var Mt =
|
|
360
|
-
|
|
358
|
+
q.parser = q;
|
|
359
|
+
var Mt = q, V = "", Q = [], L = [], R = [], Et = /* @__PURE__ */ s(function() {
|
|
360
|
+
Q.length = 0, L.length = 0, V = "", R.length = 0, Ct();
|
|
361
361
|
}, "clear"), Tt = /* @__PURE__ */ s(function(t) {
|
|
362
|
-
|
|
363
|
-
}, "addSection"),
|
|
364
|
-
return
|
|
365
|
-
}, "getSections"),
|
|
362
|
+
V = t, Q.push(t);
|
|
363
|
+
}, "addSection"), It = /* @__PURE__ */ s(function() {
|
|
364
|
+
return Q;
|
|
365
|
+
}, "getSections"), Pt = /* @__PURE__ */ s(function() {
|
|
366
366
|
let t = et();
|
|
367
367
|
const e = 100;
|
|
368
368
|
let r = 0;
|
|
369
369
|
for (; !t && r < e; )
|
|
370
370
|
t = et(), r++;
|
|
371
|
-
return L.push(...
|
|
371
|
+
return L.push(...R), L;
|
|
372
372
|
}, "getTasks"), At = /* @__PURE__ */ s(function() {
|
|
373
373
|
const t = [];
|
|
374
374
|
return L.forEach((e) => {
|
|
@@ -379,17 +379,17 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
379
379
|
let l = 0, n = [];
|
|
380
380
|
r.length === 1 ? (l = Number(r[0]), n = []) : (l = Number(r[0]), n = r[1].split(","));
|
|
381
381
|
const c = n.map((h) => h.trim()), d = {
|
|
382
|
-
section:
|
|
383
|
-
type:
|
|
382
|
+
section: V,
|
|
383
|
+
type: V,
|
|
384
384
|
people: c,
|
|
385
385
|
task: t,
|
|
386
386
|
score: l
|
|
387
387
|
};
|
|
388
|
-
|
|
389
|
-
}, "addTask"),
|
|
388
|
+
R.push(d);
|
|
389
|
+
}, "addTask"), Vt = /* @__PURE__ */ s(function(t) {
|
|
390
390
|
const e = {
|
|
391
|
-
section:
|
|
392
|
-
type:
|
|
391
|
+
section: V,
|
|
392
|
+
type: V,
|
|
393
393
|
description: t,
|
|
394
394
|
task: t,
|
|
395
395
|
classes: []
|
|
@@ -397,17 +397,17 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
397
397
|
L.push(e);
|
|
398
398
|
}, "addTaskOrg"), et = /* @__PURE__ */ s(function() {
|
|
399
399
|
const t = /* @__PURE__ */ s(function(r) {
|
|
400
|
-
return
|
|
400
|
+
return R[r].processed;
|
|
401
401
|
}, "compileTask");
|
|
402
402
|
let e = !0;
|
|
403
|
-
for (const [r, l] of
|
|
403
|
+
for (const [r, l] of R.entries())
|
|
404
404
|
t(r), e = e && l.processed;
|
|
405
405
|
return e;
|
|
406
|
-
}, "compileTasks"),
|
|
406
|
+
}, "compileTasks"), Bt = /* @__PURE__ */ s(function() {
|
|
407
407
|
return At();
|
|
408
408
|
}, "getActors"), it = {
|
|
409
|
-
getConfig: /* @__PURE__ */ s(() =>
|
|
410
|
-
clear:
|
|
409
|
+
getConfig: /* @__PURE__ */ s(() => B().journey, "getConfig"),
|
|
410
|
+
clear: Et,
|
|
411
411
|
setDiagramTitle: vt,
|
|
412
412
|
getDiagramTitle: $t,
|
|
413
413
|
setAccTitle: wt,
|
|
@@ -415,11 +415,11 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
415
415
|
setAccDescription: bt,
|
|
416
416
|
getAccDescription: kt,
|
|
417
417
|
addSection: Tt,
|
|
418
|
-
getSections:
|
|
419
|
-
getTasks:
|
|
418
|
+
getSections: It,
|
|
419
|
+
getTasks: Pt,
|
|
420
420
|
addTask: jt,
|
|
421
|
-
addTaskOrg:
|
|
422
|
-
getActors:
|
|
421
|
+
addTaskOrg: Vt,
|
|
422
|
+
getActors: Bt
|
|
423
423
|
}, Lt = /* @__PURE__ */ s((t) => `.label {
|
|
424
424
|
font-family: ${t.fontFamily};
|
|
425
425
|
color: ${t.textColor};
|
|
@@ -553,9 +553,9 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
553
553
|
${t.actor5 ? `fill: ${t.actor5}` : ""};
|
|
554
554
|
}
|
|
555
555
|
${xt()}
|
|
556
|
-
`, "getStyles"),
|
|
556
|
+
`, "getStyles"), Rt = Lt, Z = /* @__PURE__ */ s(function(t, e) {
|
|
557
557
|
return mt(t, e);
|
|
558
|
-
}, "drawRect"),
|
|
558
|
+
}, "drawRect"), Ft = /* @__PURE__ */ s(function(t, e) {
|
|
559
559
|
const r = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), l = t.append("g");
|
|
560
560
|
l.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), l.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
|
|
561
561
|
function n(h) {
|
|
@@ -587,7 +587,7 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
587
587
|
}, "drawLabel"), Ot = /* @__PURE__ */ s(function(t, e, r) {
|
|
588
588
|
const l = t.append("g"), n = rt();
|
|
589
589
|
n.x = e.x, n.y = e.y, n.fill = e.fill, n.width = r.width * e.taskCount + // width of the tasks
|
|
590
|
-
r.diagramMarginX * (e.taskCount - 1), n.height = r.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3,
|
|
590
|
+
r.diagramMarginX * (e.taskCount - 1), n.height = r.height, n.class = "journey-section section-type-" + e.num, n.rx = 3, n.ry = 3, Z(l, n), ct(r)(
|
|
591
591
|
e.text,
|
|
592
592
|
l,
|
|
593
593
|
n.x,
|
|
@@ -600,13 +600,13 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
600
600
|
);
|
|
601
601
|
}, "drawSection"), nt = -1, Nt = /* @__PURE__ */ s(function(t, e, r) {
|
|
602
602
|
const l = e.x + r.width / 2, n = t.append("g");
|
|
603
|
-
nt++, n.append("line").attr("id", "task" + nt).attr("x1", l).attr("y1", e.y).attr("x2", l).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"),
|
|
603
|
+
nt++, n.append("line").attr("id", "task" + nt).attr("x1", l).attr("y1", e.y).attr("x2", l).attr("y2", 450).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Ft(n, {
|
|
604
604
|
cx: l,
|
|
605
605
|
cy: 300 + (5 - e.score) * 30,
|
|
606
606
|
score: e.score
|
|
607
607
|
});
|
|
608
608
|
const c = rt();
|
|
609
|
-
c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = r.width, c.height = r.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3,
|
|
609
|
+
c.x = e.x, c.y = e.y, c.fill = e.fill, c.width = r.width, c.height = r.height, c.class = "task task-type-" + e.num, c.rx = 3, c.ry = 3, Z(n, c);
|
|
610
610
|
let d = e.x + 14;
|
|
611
611
|
e.people.forEach((h) => {
|
|
612
612
|
const f = e.actors[h].color, m = {
|
|
@@ -660,8 +660,8 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
660
660
|
};
|
|
661
661
|
}(), zt = /* @__PURE__ */ s(function(t) {
|
|
662
662
|
t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
|
|
663
|
-
}, "initGraphics"),
|
|
664
|
-
drawRect:
|
|
663
|
+
}, "initGraphics"), F = {
|
|
664
|
+
drawRect: Z,
|
|
665
665
|
drawCircle: ot,
|
|
666
666
|
drawSection: Ot,
|
|
667
667
|
drawText: lt,
|
|
@@ -675,7 +675,7 @@ var Mt = Q, B = "", U = [], L = [], F = [], Ct = /* @__PURE__ */ s(function() {
|
|
|
675
675
|
});
|
|
676
676
|
}, "setConf"), M = {}, N = 0;
|
|
677
677
|
function ht(t) {
|
|
678
|
-
const e =
|
|
678
|
+
const e = B().journey, r = e.maxLabelWidth;
|
|
679
679
|
N = 0;
|
|
680
680
|
let l = 60;
|
|
681
681
|
Object.keys(M).forEach((n) => {
|
|
@@ -687,7 +687,7 @@ function ht(t) {
|
|
|
687
687
|
stroke: "#000",
|
|
688
688
|
pos: M[n].position
|
|
689
689
|
};
|
|
690
|
-
|
|
690
|
+
F.drawCircle(t, d);
|
|
691
691
|
let h = t.append("text").attr("visibility", "hidden").text(n);
|
|
692
692
|
const f = h.node().getBoundingClientRect().width;
|
|
693
693
|
h.remove();
|
|
@@ -717,20 +717,20 @@ function ht(t) {
|
|
|
717
717
|
fill: "#666",
|
|
718
718
|
text: g,
|
|
719
719
|
textMargin: e.boxTextMargin ?? 5
|
|
720
|
-
}, a =
|
|
720
|
+
}, a = F.drawText(t, i).node().getBoundingClientRect().width;
|
|
721
721
|
a > N && a > e.leftMargin - a && (N = a);
|
|
722
722
|
}), l += Math.max(20, m.length * 20);
|
|
723
723
|
});
|
|
724
724
|
}
|
|
725
725
|
s(ht, "drawActorLegend");
|
|
726
|
-
var S =
|
|
727
|
-
const n =
|
|
726
|
+
var S = B().journey, E = 0, Gt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
727
|
+
const n = B(), c = n.journey.titleColor, d = n.journey.titleFontSize, h = n.journey.titleFontFamily, f = n.securityLevel;
|
|
728
728
|
let m;
|
|
729
729
|
f === "sandbox" && (m = X("#i" + e));
|
|
730
730
|
const g = f === "sandbox" ? X(m.nodes()[0].contentDocument.body) : X("body");
|
|
731
731
|
v.init();
|
|
732
732
|
const y = g.select("#" + e);
|
|
733
|
-
|
|
733
|
+
F.initGraphics(y);
|
|
734
734
|
const i = l.db.getTasks(), a = l.db.getDiagramTitle(), u = l.db.getActors();
|
|
735
735
|
for (const A in M)
|
|
736
736
|
delete M[A];
|
|
@@ -740,11 +740,11 @@ var S = V().journey, C = 0, Gt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
|
740
740
|
color: S.actorColours[p % S.actorColours.length],
|
|
741
741
|
position: p
|
|
742
742
|
}, p++;
|
|
743
|
-
}), ht(y),
|
|
743
|
+
}), ht(y), E = S.leftMargin + N, v.insert(0, 0, E, Object.keys(M).length * 50), Xt(y, i, 0);
|
|
744
744
|
const o = v.getBounds();
|
|
745
|
-
a && y.append("text").text(a).attr("x",
|
|
746
|
-
const x = o.stopy - o.starty + 2 * S.diagramMarginY, k =
|
|
747
|
-
St(y, x, k, S.useMaxWidth), y.append("line").attr("x1",
|
|
745
|
+
a && y.append("text").text(a).attr("x", E).attr("font-size", d).attr("font-weight", "bold").attr("y", 25).attr("fill", c).attr("font-family", h);
|
|
746
|
+
const x = o.stopy - o.starty + 2 * S.diagramMarginY, k = E + o.stopx + 2 * S.diagramMarginX;
|
|
747
|
+
St(y, x, k, S.useMaxWidth), y.append("line").attr("x1", E).attr("y1", S.height * 4).attr("x2", k - E - 4).attr("y2", S.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
|
|
748
748
|
const T = a ? 70 : 0;
|
|
749
749
|
y.attr("viewBox", `${o.startx} -25 ${k} ${x + T}`), y.attr("preserveAspectRatio", "xMinYMin meet"), y.attr("height", x + T + 25);
|
|
750
750
|
}, "draw"), v = {
|
|
@@ -768,7 +768,7 @@ var S = V().journey, C = 0, Gt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
|
768
768
|
t[e] === void 0 ? t[e] = r : t[e] = l(r, t[e]);
|
|
769
769
|
}, "updateVal"),
|
|
770
770
|
updateBounds: /* @__PURE__ */ s(function(t, e, r, l) {
|
|
771
|
-
const n =
|
|
771
|
+
const n = B().journey, c = this;
|
|
772
772
|
let d = 0;
|
|
773
773
|
function h(f) {
|
|
774
774
|
return /* @__PURE__ */ s(function(m) {
|
|
@@ -792,20 +792,20 @@ var S = V().journey, C = 0, Gt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
|
792
792
|
getBounds: /* @__PURE__ */ s(function() {
|
|
793
793
|
return this.data;
|
|
794
794
|
}, "getBounds")
|
|
795
|
-
},
|
|
796
|
-
const l =
|
|
795
|
+
}, U = S.sectionFills, st = S.sectionColours, Xt = /* @__PURE__ */ s(function(t, e, r) {
|
|
796
|
+
const l = B().journey;
|
|
797
797
|
let n = "";
|
|
798
798
|
const c = l.height * 2 + l.diagramMarginY, d = r + c;
|
|
799
799
|
let h = 0, f = "#CCC", m = "black", g = 0;
|
|
800
800
|
for (const [y, i] of e.entries()) {
|
|
801
801
|
if (n !== i.section) {
|
|
802
|
-
f =
|
|
802
|
+
f = U[h % U.length], g = h % U.length, m = st[h % st.length];
|
|
803
803
|
let u = 0;
|
|
804
804
|
const p = i.section;
|
|
805
805
|
for (let x = y; x < e.length && e[x].section == p; x++)
|
|
806
806
|
u = u + 1;
|
|
807
807
|
const o = {
|
|
808
|
-
x: y * l.taskMargin + y * l.width +
|
|
808
|
+
x: y * l.taskMargin + y * l.width + E,
|
|
809
809
|
y: 50,
|
|
810
810
|
text: i.section,
|
|
811
811
|
fill: f,
|
|
@@ -813,23 +813,23 @@ var S = V().journey, C = 0, Gt = /* @__PURE__ */ s(function(t, e, r, l) {
|
|
|
813
813
|
colour: m,
|
|
814
814
|
taskCount: u
|
|
815
815
|
};
|
|
816
|
-
|
|
816
|
+
F.drawSection(t, o, l), n = i.section, h++;
|
|
817
817
|
}
|
|
818
818
|
const a = i.people.reduce((u, p) => (M[p] && (u[p] = M[p]), u), {});
|
|
819
|
-
i.x = y * l.taskMargin + y * l.width +
|
|
819
|
+
i.x = y * l.taskMargin + y * l.width + E, i.y = d, i.width = l.diagramMarginX, i.height = l.diagramMarginY, i.colour = m, i.fill = f, i.num = g, i.actors = a, F.drawTask(t, i, l), v.insert(i.x, i.y, i.x + i.width + l.taskMargin, 450);
|
|
820
820
|
}
|
|
821
821
|
}, "drawTasks"), at = {
|
|
822
822
|
setConf: Wt,
|
|
823
823
|
draw: Gt
|
|
824
|
-
},
|
|
824
|
+
}, Jt = {
|
|
825
825
|
parser: Mt,
|
|
826
826
|
db: it,
|
|
827
827
|
renderer: at,
|
|
828
|
-
styles:
|
|
828
|
+
styles: Rt,
|
|
829
829
|
init: /* @__PURE__ */ s((t) => {
|
|
830
830
|
at.setConf(t.journey), it.clear();
|
|
831
831
|
}, "init")
|
|
832
832
|
};
|
|
833
833
|
export {
|
|
834
|
-
|
|
834
|
+
Jt as diagram
|
|
835
835
|
};
|