@airalogy/aimd-recorder 1.19.2 → 1.20.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 +2 -0
- package/README.zh-CN.md +2 -0
- package/dist/{AimdDnaSequenceField-TBKunqU_.js → AimdDnaSequenceField-Cp0cgBYl.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-gTySIxvX.js → AimdEditor.vue_vue_type_style_index_0_lang-DTdcoNs1.js} +1588 -1584
- package/dist/{AimdMarkdownField-DGV5KFUs.js → AimdMarkdownField-D4AEz_mB.js} +18 -17
- package/dist/{AimdMarkdownNoteField-C78KHCBA.js → AimdMarkdownNoteField-CSGaShKi.js} +5 -4
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-BMhAnOm7.js → arc-jL17V0L2.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-DXuPTBR3.js → architectureDiagram-3BPJPVTR-CijadmFI.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-HKz9kQ49.js → blockDiagram-GPEHLZMM-BPqvb85_.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-B2a8Aupm.js → c4Diagram-AAUBKEIU-i4fqlMXu.js} +2 -2
- package/dist/{channel-CQnbPm6T.js → channel-DnnUQTdl.js} +1 -1
- package/dist/{chunk-2J33WTMH-CPwhDANL.js → chunk-2J33WTMH-DKKEpdr1.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BJV0R8-Z.js → chunk-4BX2VUAB-WvuuiYYH.js} +1 -1
- package/dist/{chunk-55IACEB6-CSqUgTVA.js → chunk-55IACEB6-B_UkHTnd.js} +1 -1
- package/dist/{chunk-727SXJPM-C3LCZWaC.js → chunk-727SXJPM-CR6Pb04P.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-BC5kHyik.js → chunk-AQP2D5EJ-B68Ie417.js} +3 -3
- package/dist/{chunk-FMBD7UC4-lv-SQuSa.js → chunk-FMBD7UC4-CeCGT6rb.js} +1 -1
- package/dist/{chunk-ND2GUHAM-BnnHbOOp.js → chunk-ND2GUHAM-BYN-eC_q.js} +1 -1
- package/dist/{chunk-QZHKN3VN-DE1_5lrn.js → chunk-QZHKN3VN-BNSp120j.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-32SrXsR3.js → classDiagram-4FO5ZUOK-Cgbn4w3f.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-32SrXsR3.js → classDiagram-v2-Q7XG4LA2-Cgbn4w3f.js} +2 -2
- package/dist/components.js +90 -89
- package/dist/composables.js +22 -22
- package/dist/{cose-bilkent-S5V4N54A-BKyR6PrF.js → cose-bilkent-S5V4N54A-TfrsQ2c3.js} +1 -1
- package/dist/{dagre-BM42HDAG-D8Nwouf2.js → dagre-BM42HDAG-BAyvB_JI.js} +3 -3
- package/dist/{diagram-2AECGRRQ-DfoNEchZ.js → diagram-2AECGRRQ-Bijq8bHO.js} +2 -2
- package/dist/{diagram-5GNKFQAL-Dlpl3XO8.js → diagram-5GNKFQAL-B3ZuTuxm.js} +3 -3
- package/dist/{diagram-KO2AKTUF-CgwROod_.js → diagram-KO2AKTUF-DrqLeGCI.js} +2 -2
- package/dist/{diagram-LMA3HP47-UiiviX43.js → diagram-LMA3HP47-CCSQH8O0.js} +2 -2
- package/dist/{diagram-OG6HWLK6-BPuH-4Wa.js → diagram-OG6HWLK6-DM5cUEjW.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-B19WKSiS.js → erDiagram-TEJ5UH35-DQhmDdAF.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-SsfO1IYz.js → flowDiagram-I6XJVG4X-DrqiPSHI.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-8BCxW9SC.js → ganttDiagram-6RSMTGT7-DpX_Y2vA.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-D-jzaXKg.js → gitGraphDiagram-PVQCEYII-3isOhIyZ.js} +3 -3
- package/dist/{graph-Dd8Vx0lj.js → graph-C30SJlSk.js} +1 -1
- package/dist/index-Dtvv88SS.js +1308 -0
- package/dist/index.js +19 -19
- package/dist/{infoDiagram-5YYISTIA-B_XwkyXw.js → infoDiagram-5YYISTIA-Cr_MlPvz.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-nevqOMkV.js → ishikawaDiagram-YF4QCWOH-DydyFn3h.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-DKQOkZNx.js → journeyDiagram-JHISSGLW-V_5MmeOu.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-BYvizbN0.js → kanban-definition-UN3LZRKU-C_XXCuvp.js} +2 -2
- package/dist/{layout-BiHDh2wu.js → layout-85j-z7Lr.js} +2 -2
- package/dist/{linear-BcUgIsNC.js → linear-DMtodz-6.js} +1 -1
- package/dist/{mermaid.core-DPv1ut6K.js → mermaid.core-CkanUCyS.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-CiT97EC2.js → mindmap-definition-RKZ34NQL-CyikmuF2.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-BHcFVpCC.js → pieDiagram-4H26LBE5-CesqzEGg.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-BFBAb3Zx.js → quadrantDiagram-W4KKPZXB-BsPKPfNd.js} +2 -2
- package/dist/record.js +90 -1196
- package/dist/{requirementDiagram-4Y6WPE33-CUS2OOyE.js → requirementDiagram-4Y6WPE33-BwB1tQvi.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-IuhX4tCb.js → sankeyDiagram-5OEKKPKP-CfSNbWMY.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-DWHcFiUF.js → sequenceDiagram-3UESZ5HK-DZZlUNys.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-J49Kafj_.js → stateDiagram-AJRCARHV-DNJmz_op.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-DL2VCR5X.js → stateDiagram-v2-BHNVJYJU-DVfDNM6l.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-l9xSQ_pX.js → timeline-definition-PNZ67QCA-DEUCAg_N.js} +2 -2
- package/dist/{useCodeBlockRendering-CY70U0Xm.js → useCodeBlockRendering-DF6zm7nf.js} +475 -526
- package/dist/{vennDiagram-CIIHVFJN-BQjdmOkd.js → vennDiagram-CIIHVFJN-DVDP__od.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-CmVdsV9b.js → wardleyDiagram-YWT4CUSO-sEtxBd33.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-F-cC_Igm.js → xychartDiagram-2RQKCTM6-DM8QeR5M.js} +2 -2
- package/package.json +4 -4
- package/src/__tests__/recorder-editor.test.ts +3 -1
- package/src/__tests__/var-field-render.test.ts +33 -0
- package/src/components/AimdRecorderEditor.vue +3 -1
package/dist/components.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineComponent as Le, ref as W, getCurrentInstance as nn, computed as w, watch as Ae, nextTick as Oe, onMounted as wa, onBeforeUnmount as _t, openBlock as _, createElementBlock as C, normalizeStyle as ut, normalizeClass as qe, createElementVNode as m, toDisplayString as z, createTextVNode as We, createCommentVNode as ee, withModifiers as mt, Fragment as Te, renderList as De, withKeys as xa, defineAsyncComponent as Qt, h as l, Transition as yn, unref as Ye, withDirectives as Nt, vModelRadio as Fa, createBlock as xt, vModelText as rn, reactive as ha, createVNode as yt, render as Ta, watchEffect as bn, mergeProps as _n } from "vue";
|
|
2
2
|
import { _ as it } from "./_commonjsHelpers-B5RozER-.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { U as Wt, V as Yt, W as ga, X as Ht, Y as ln, Z as Kt, s as kn, m as at, P as wn, v as Gt, u as Cn, t as Sn, w as $n, T as Ca, p as An, q as zn, _ as bt, a as pa, d as ya, l as En, r as xn, f as Fn, j as Tn, O as Mn, M as Rn, S as Dn, R as qn, $ as Vn, a0 as In, F as Ut, H as Bn, x as Pn, G as On, K as Ln } from "./index-Dtvv88SS.js";
|
|
4
|
+
import { renderToVue as Nn, parseAndExtract as ba } from "@airalogy/aimd-renderer";
|
|
5
|
+
import { g as Ft, c as sn, a as Hn, r as Kn, P as Un, d as jn, $ as Wn, b as Gn, h as Qn, e as Yn, f as Xn, i as Zn, j as Ma, k as Jn, l as Ra, N as ei, m as ti, n as ai, o as ni, u as ii, p as ri, q as li, s as si, t as oi, _ as di } from "./AimdEditor.vue_vue_type_style_index_0_lang-DTdcoNs1.js";
|
|
6
|
+
import { H as jt, r as It, X as zt, q as Da, Y as ci, Z as ui, _ as qa, s as on, t as dn, b as ht, N as mi, I as fi, h as vi, M as hi, x as Va, V as gi, J as pi, z as yi, F as Bt, R as bi, S as _i, f as ki, c as Ia, $ as wi, i as Ci, a as Si, Q as $i, T as Ai, L as zi, w as Ei, v as xi, G as Fi, K as Ti, p as Mi } from "./useCodeBlockRendering-DF6zm7nf.js";
|
|
7
7
|
import { isScaleQuizAnswerComplete as Ri, gradeScaleQuizLocally as Di } from "@airalogy/aimd-core";
|
|
8
8
|
const qi = {
|
|
9
9
|
key: 0,
|
|
@@ -597,7 +597,7 @@ const or = Le({
|
|
|
597
597
|
let u = 0;
|
|
598
598
|
return Ae(
|
|
599
599
|
() => {
|
|
600
|
-
const f = e.node.definition?.type || "str", c =
|
|
600
|
+
const f = e.node.definition?.type || "str", c = jt(f), T = It(f, e.node.definition?.kwargs, e.fieldMeta), V = zt(e.value), M = r.value?.url || (V && e.resolveFile ? e.resolveFile(V) : null);
|
|
601
601
|
return T.kind === "csv" && M ? `${c}
|
|
602
602
|
${M}` : "";
|
|
603
603
|
},
|
|
@@ -614,7 +614,7 @@ ${M}` : "";
|
|
|
614
614
|
{ immediate: !0 }
|
|
615
615
|
), Ae(
|
|
616
616
|
() => {
|
|
617
|
-
const f = e.node.definition?.type || "str", c =
|
|
617
|
+
const f = e.node.definition?.type || "str", c = jt(f), T = It(f, e.node.definition?.kwargs, e.fieldMeta), V = zt(e.value), M = V && e.resolveFile ? e.resolveFile(V) : null;
|
|
618
618
|
return {
|
|
619
619
|
fileId: V ?? "",
|
|
620
620
|
fallbackUrl: M ?? "",
|
|
@@ -630,7 +630,7 @@ ${M}` : "";
|
|
|
630
630
|
}
|
|
631
631
|
const X = y.value?.id === f ? y.value : null, ue = {
|
|
632
632
|
id: f,
|
|
633
|
-
name:
|
|
633
|
+
name: Da(e.value) || X?.name,
|
|
634
634
|
url: c || X?.url,
|
|
635
635
|
thumbnailUrl: X?.thumbnailUrl,
|
|
636
636
|
type: pt(e.value, ["type", "contentType", "content_type", "mimeType"]) ?? X?.type,
|
|
@@ -659,9 +659,9 @@ ${M}` : "";
|
|
|
659
659
|
},
|
|
660
660
|
{ immediate: !0 }
|
|
661
661
|
), () => {
|
|
662
|
-
const f = e.node, c = f.id, T = f.definition?.type || "str", V =
|
|
662
|
+
const f = e.node, c = f.id, T = f.definition?.type || "str", V = jt(T), M = e.inputKind, X = V === "int" || V === "integer", ue = M === "number" && !X, ne = e.fieldMeta, P = e.disabled, N = e.extraClasses, ce = ne?.placeholder ?? dr(f, ne), K = e.displayValue, se = ci(T, ne) ?? "plaintext", ie = M === "number" ? ui(T, f.definition?.kwargs) : {}, he = M === "number" ? qa(K, T, f.definition?.kwargs) : null;
|
|
663
663
|
function q($) {
|
|
664
|
-
const F =
|
|
664
|
+
const F = fi($, T, M, {
|
|
665
665
|
typePlugin: e.typePlugin
|
|
666
666
|
});
|
|
667
667
|
t("change", { id: c, value: F, type: T, inputKind: M });
|
|
@@ -670,7 +670,7 @@ ${M}` : "";
|
|
|
670
670
|
t("blur", { id: c });
|
|
671
671
|
}
|
|
672
672
|
function ve($) {
|
|
673
|
-
ht($, M), typeof HTMLTextAreaElement < "u" && $ instanceof HTMLTextAreaElement &&
|
|
673
|
+
ht($, M), typeof HTMLTextAreaElement < "u" && $ instanceof HTMLTextAreaElement && hi($);
|
|
674
674
|
}
|
|
675
675
|
function ke($) {
|
|
676
676
|
ht($, M);
|
|
@@ -689,7 +689,7 @@ ${M}` : "";
|
|
|
689
689
|
node: f,
|
|
690
690
|
fieldMeta: ne,
|
|
691
691
|
accept: te.accept
|
|
692
|
-
}) : void 0) ??
|
|
692
|
+
}) : void 0) ?? vi(U), ae = zt(J);
|
|
693
693
|
y.value = {
|
|
694
694
|
id: ae,
|
|
695
695
|
name: U.name,
|
|
@@ -710,7 +710,7 @@ ${M}` : "";
|
|
|
710
710
|
e.assignerControl ? l("span", { class: "aimd-rec-inline__header-assigner-action" }, [e.assignerControl]) : null,
|
|
711
711
|
e.assignerStatus ? l("span", { class: "aimd-rec-inline__header-assigner-state" }, [e.assignerStatus]) : null
|
|
712
712
|
]), O = () => {
|
|
713
|
-
const $ = Ha(ne?.title), F = ga(f.definition), U = $ ??
|
|
713
|
+
const $ = Ha(ne?.title), F = ga(f.definition), U = $ ?? Ht(c, f.definition), te = ($ ?? F) !== void 0 && U !== c, pe = Ha(ne?.description) ?? ln(f.definition), J = cn(ne), ae = J.length > 0 ? J : Wt(f.definition), ge = lr(pe, ae), A = !!ge.description || ge.examples.length > 0;
|
|
714
714
|
return l("span", {
|
|
715
715
|
class: [
|
|
716
716
|
"aimd-field",
|
|
@@ -741,7 +741,7 @@ ${M}` : "";
|
|
|
741
741
|
e.assignerStatus ? l("span", { class: "aimd-rec-inline__assigner-status" }, [e.assignerStatus]) : null
|
|
742
742
|
]), H = () => e.assignerError ? l("span", { class: "aimd-rec-inline__assigner-error" }, e.assignerError) : null, G = ne?.enumOptions ?? [];
|
|
743
743
|
if (G.length) {
|
|
744
|
-
const $ =
|
|
744
|
+
const $ = on(G, e.value);
|
|
745
745
|
return l("span", {
|
|
746
746
|
class: [
|
|
747
747
|
"aimd-rec-inline aimd-rec-inline--var-stacked aimd-field-wrapper",
|
|
@@ -756,7 +756,7 @@ ${M}` : "";
|
|
|
756
756
|
disabled: P,
|
|
757
757
|
value: $,
|
|
758
758
|
onChange: (F) => {
|
|
759
|
-
const U =
|
|
759
|
+
const U = dn(G, F.target.value);
|
|
760
760
|
t("change", { id: c, value: U, type: T, inputKind: M });
|
|
761
761
|
},
|
|
762
762
|
onBlur: fe
|
|
@@ -787,7 +787,7 @@ ${M}` : "";
|
|
|
787
787
|
"data-rec-focus-key": `var:${c}`,
|
|
788
788
|
type: "checkbox",
|
|
789
789
|
disabled: P,
|
|
790
|
-
checked:
|
|
790
|
+
checked: mi(e.value),
|
|
791
791
|
onVnodeMounted: ($) => ht($.el, M),
|
|
792
792
|
onVnodeUpdated: ($) => ht($.el, M),
|
|
793
793
|
onChange: ($) => {
|
|
@@ -827,7 +827,7 @@ ${M}` : "";
|
|
|
827
827
|
{ controlRow: !1 }
|
|
828
828
|
);
|
|
829
829
|
if (M === "file") {
|
|
830
|
-
const $ = It(T, f.definition?.kwargs, ne), F = zt(e.value), U = r.value, te = U?.name ||
|
|
830
|
+
const $ = It(T, f.definition?.kwargs, ne), F = zt(e.value), U = r.value, te = U?.name || Da(e.value), pe = !!(F || te), J = te || (pe ? e.messages.file.selected : ce || e.messages.file.choose), ae = U?.url || (F && e.resolveFile ? e.resolveFile(F) : null), ge = U?.thumbnailUrl || ae, A = rr(U?.size), R = [$.badge, A].filter(Boolean).join(" · "), D = l("input", {
|
|
831
831
|
"data-rec-focus-key": `var:${c}`,
|
|
832
832
|
class: "aimd-rec-file-field__input",
|
|
833
833
|
type: "file",
|
|
@@ -980,7 +980,7 @@ ${M}` : "";
|
|
|
980
980
|
function L($) {
|
|
981
981
|
if (M !== "number")
|
|
982
982
|
return;
|
|
983
|
-
const F =
|
|
983
|
+
const F = qa($.value, T, f.definition?.kwargs);
|
|
984
984
|
$.setCustomValidity(F ?? "");
|
|
985
985
|
}
|
|
986
986
|
return Z(
|
|
@@ -1181,18 +1181,18 @@ const mr = Le({
|
|
|
1181
1181
|
return e.fieldMeta?.[`var_table:${e.node.id}`];
|
|
1182
1182
|
}
|
|
1183
1183
|
function ie(k) {
|
|
1184
|
-
const O = e.fieldMeta?.[`var_table:${e.node.id}:${k}`], Q =
|
|
1184
|
+
const O = e.fieldMeta?.[`var_table:${e.node.id}:${k}`], Q = Kt(K(k));
|
|
1185
1185
|
return Q.length > 0 && !O?.enumOptions ? {
|
|
1186
1186
|
...O ?? {},
|
|
1187
1187
|
enumOptions: cr(Q)
|
|
1188
1188
|
} : O;
|
|
1189
1189
|
}
|
|
1190
1190
|
function he(k, O) {
|
|
1191
|
-
const Q = Lt(O?.description) ??
|
|
1191
|
+
const Q = Lt(O?.description) ?? ln(k), H = Wa(O), G = H.length > 0 ? H : Wt(k);
|
|
1192
1192
|
return ur(Q, G);
|
|
1193
1193
|
}
|
|
1194
1194
|
function q(k) {
|
|
1195
|
-
return Lt(ie(k)?.title) ??
|
|
1195
|
+
return Lt(ie(k)?.title) ?? Ht(k, K(k));
|
|
1196
1196
|
}
|
|
1197
1197
|
function fe(k) {
|
|
1198
1198
|
const O = K(k), Q = ie(k);
|
|
@@ -1207,7 +1207,7 @@ const mr = Le({
|
|
|
1207
1207
|
function ve(k, O, Q, H, G) {
|
|
1208
1208
|
const Z = ie(O)?.enumOptions ?? [], x = `var_table:${k}:${Q}:${O}`, le = V(O), L = fe(O);
|
|
1209
1209
|
if (Z.length > 0) {
|
|
1210
|
-
const $ =
|
|
1210
|
+
const $ = on(Z, H[O]);
|
|
1211
1211
|
return l("select", {
|
|
1212
1212
|
"data-rec-focus-key": x,
|
|
1213
1213
|
class: [G, "aimd-rec-enum-select"],
|
|
@@ -1218,7 +1218,7 @@ const mr = Le({
|
|
|
1218
1218
|
tableName: k,
|
|
1219
1219
|
column: O,
|
|
1220
1220
|
rowIndex: Q,
|
|
1221
|
-
value:
|
|
1221
|
+
value: dn(Z, F.target.value),
|
|
1222
1222
|
row: H
|
|
1223
1223
|
});
|
|
1224
1224
|
},
|
|
@@ -1259,7 +1259,7 @@ const mr = Le({
|
|
|
1259
1259
|
});
|
|
1260
1260
|
}
|
|
1261
1261
|
function ke(k, O, Q, H) {
|
|
1262
|
-
const G = Lt(H?.title), Z = ga(O), x = G ??
|
|
1262
|
+
const G = Lt(H?.title), Z = ga(O), x = G ?? Ht(k, O), le = (G ?? Z) !== void 0 && x !== k, L = he(O, H), $ = !!L.description || L.examples.length > 0;
|
|
1263
1263
|
return l("span", {
|
|
1264
1264
|
class: [
|
|
1265
1265
|
Q,
|
|
@@ -1276,7 +1276,7 @@ const mr = Le({
|
|
|
1276
1276
|
}
|
|
1277
1277
|
function we(k, O, Q, H, G) {
|
|
1278
1278
|
return Q.map((Z, x) => {
|
|
1279
|
-
const le =
|
|
1279
|
+
const le = Va(Z), L = O[0] ?? "", $ = O.slice(L ? 1 : 0);
|
|
1280
1280
|
return l("div", {
|
|
1281
1281
|
key: `${k}-card-${le}`,
|
|
1282
1282
|
class: "aimd-rec-card",
|
|
@@ -1331,7 +1331,7 @@ const mr = Le({
|
|
|
1331
1331
|
}), _t(() => {
|
|
1332
1332
|
y?.disconnect(), u !== null && cancelAnimationFrame(u);
|
|
1333
1333
|
}), Ae(() => e.columns, () => Oe(() => N())), Ae(() => e.rows, () => Oe(() => N()), { deep: !0 }), () => {
|
|
1334
|
-
const k = e.node.id, O = e.columns, Q = e.rows, H = e.disabled, G = e.messages, Z = se(), x = Lt(Z?.title), le = ga(e.node.definition), L = he(e.node.definition, Z), $ = x ??
|
|
1334
|
+
const k = e.node.id, O = e.columns, Q = e.rows, H = e.disabled, G = e.messages, Z = se(), x = Lt(Z?.title), le = ga(e.node.definition), L = he(e.node.definition, Z), $ = x ?? Ht(k, e.node.definition), F = (x ?? le) !== void 0 && $ !== k, U = !!L.description || L.examples.length > 0;
|
|
1335
1335
|
return l("div", {
|
|
1336
1336
|
ref: n,
|
|
1337
1337
|
class: "aimd-field aimd-field--var-table aimd-rec-inline-table",
|
|
@@ -1398,7 +1398,7 @@ const mr = Le({
|
|
|
1398
1398
|
])
|
|
1399
1399
|
]),
|
|
1400
1400
|
l("tbody", Q.map((te, pe) => {
|
|
1401
|
-
const J =
|
|
1401
|
+
const J = Va(te);
|
|
1402
1402
|
return l("tr", {
|
|
1403
1403
|
key: `${k}-${J}`,
|
|
1404
1404
|
class: [
|
|
@@ -1473,7 +1473,7 @@ const mr = Le({
|
|
|
1473
1473
|
]);
|
|
1474
1474
|
};
|
|
1475
1475
|
}
|
|
1476
|
-
}), mn = Qt(() => import("./AimdMarkdownNoteField-
|
|
1476
|
+
}), mn = Qt(() => import("./AimdMarkdownNoteField-CSGaShKi.js")), fr = Le({
|
|
1477
1477
|
name: "AimdStepField",
|
|
1478
1478
|
props: {
|
|
1479
1479
|
node: { type: Object, required: !0 },
|
|
@@ -1499,7 +1499,7 @@ const mr = Le({
|
|
|
1499
1499
|
}, { immediate: !0 }), _t(() => {
|
|
1500
1500
|
f && clearInterval(f), c && clearTimeout(c);
|
|
1501
1501
|
});
|
|
1502
|
-
const V = w(() => e.detailDisplay === "always"), M = w(() =>
|
|
1502
|
+
const V = w(() => e.detailDisplay === "always"), M = w(() => kn(e.state, n.value)), X = w(() => at(M.value, e.locale)), ue = w(() => typeof e.node.estimated_duration_ms == "number" ? at(e.node.estimated_duration_ms, e.locale) : ""), ne = w(() => wn(e.node)), P = w(() => Gt(e.state)), N = w(() => Cn(e.state)), ce = w(() => !!e.state.annotation?.trim()), K = w(() => Sn(e.state, e.node.estimated_duration_ms, n.value)), se = w(() => ne.value === "countdown" || ne.value === "both"), ie = w(() => ne.value === "elapsed" || ne.value === "both"), he = w(() => (P.value || N.value) && $n(K.value, e.node.estimated_duration_ms)), q = w(() => typeof K.value == "number" && K.value < 0), fe = w(() => K.value == null ? "" : q.value ? e.messages.step.overtimeBadge(at(Math.abs(K.value), e.locale)) : e.messages.step.remainingBadge(at(Math.max(0, K.value), e.locale))), ve = w(() => K.value == null ? "" : q.value ? e.messages.step.overtimeDuration(at(Math.abs(K.value), e.locale)) : e.messages.step.remainingDuration(at(Math.max(0, K.value), e.locale))), ke = w(() => se.value), we = w(() => V.value || ce.value || y.value), k = w(() => V.value || ke.value || P.value || N.value || u.value), O = w(() => !k.value && (P.value || N.value));
|
|
1503
1503
|
function Q() {
|
|
1504
1504
|
c && (clearTimeout(c), c = null);
|
|
1505
1505
|
}
|
|
@@ -2125,7 +2125,7 @@ const mr = Le({
|
|
|
2125
2125
|
function le(g) {
|
|
2126
2126
|
return typeof g.points == "number" && Number.isFinite(g.points) ? `${g.text} (${g.points})` : g.text;
|
|
2127
2127
|
}
|
|
2128
|
-
const L = w(() =>
|
|
2128
|
+
const L = w(() => sn(n.locale, n.messages)), $ = w(() => Hn(n.quiz.type, L.value, n.quiz.mode)), F = w(() => n.quiz.type === "scale" && Array.isArray(n.quiz.items) ? n.quiz.items : []), U = w(() => n.quiz.type === "scale" && Array.isArray(n.quiz.options) ? n.quiz.options : []), te = w(() => n.quiz.type === "scale" && Ri(n.quiz, n.modelValue)), pe = w(() => n.quiz.type !== "scale" || !te.value ? null : Di(n.quiz, n.modelValue)), J = w(() => {
|
|
2129
2129
|
if (n.grade)
|
|
2130
2130
|
return n.grade;
|
|
2131
2131
|
if (n.quiz.type !== "scale")
|
|
@@ -2508,7 +2508,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2508
2508
|
let ce = null;
|
|
2509
2509
|
const K = /* @__PURE__ */ new Map(), se = /* @__PURE__ */ new Map();
|
|
2510
2510
|
let ie = !1;
|
|
2511
|
-
const he = w(() =>
|
|
2511
|
+
const he = w(() => Kn(a.locale)), q = w(() => sn(he.value, a.messages)), fe = w(() => gi(a.typePlugins)), ve = w(() => a.serverAssigners ?? a.assigners), ke = w(() => a.runServerAssigner ?? a.assignerRunner), we = Le({
|
|
2512
2512
|
name: "AimdRecorderInlineNodesOutlet",
|
|
2513
2513
|
props: {
|
|
2514
2514
|
nodes: {
|
|
@@ -2521,7 +2521,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2521
2521
|
}
|
|
2522
2522
|
});
|
|
2523
2523
|
function k(i, o, h, E, S) {
|
|
2524
|
-
return
|
|
2524
|
+
return Ti(i, o, h, E, S, {
|
|
2525
2525
|
fieldAdapters: a.fieldAdapters,
|
|
2526
2526
|
wrapField: a.wrapField,
|
|
2527
2527
|
readonly: a.readonly,
|
|
@@ -2533,7 +2533,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2533
2533
|
});
|
|
2534
2534
|
}
|
|
2535
2535
|
function O(i, o) {
|
|
2536
|
-
return
|
|
2536
|
+
return Mi(i, o);
|
|
2537
2537
|
}
|
|
2538
2538
|
function Q(i, o) {
|
|
2539
2539
|
if (i === "var")
|
|
@@ -2646,7 +2646,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2646
2646
|
kwargs: o.kwargs
|
|
2647
2647
|
};
|
|
2648
2648
|
return i;
|
|
2649
|
-
}), te = w(() =>
|
|
2649
|
+
}), te = w(() => pi(ve.value, L.value)), pe = w(() => Object.fromEntries(te.value.map((i) => [i.fieldKey, i]))), J = w(() => Object.fromEntries(te.value.map((i) => [i.assignedField, i])));
|
|
2650
2650
|
function ae(i) {
|
|
2651
2651
|
return i.map((o) => ({
|
|
2652
2652
|
label: String(o),
|
|
@@ -2664,14 +2664,14 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2664
2664
|
const A = w(() => {
|
|
2665
2665
|
const i = {};
|
|
2666
2666
|
for (const o of L.value.var_definitions ?? []) {
|
|
2667
|
-
const h =
|
|
2667
|
+
const h = Kt(o);
|
|
2668
2668
|
h.length > 0 && ge(i, `var:${o.id}`, {
|
|
2669
2669
|
enumOptions: ae(h)
|
|
2670
2670
|
});
|
|
2671
2671
|
}
|
|
2672
2672
|
for (const o of L.value.var_table ?? [])
|
|
2673
2673
|
for (const h of o.subvars ?? []) {
|
|
2674
|
-
const E =
|
|
2674
|
+
const E = Kt(h);
|
|
2675
2675
|
E.length > 0 && ge(i, `var_table:${o.id}:${h.id}`, {
|
|
2676
2676
|
enumOptions: ae(E)
|
|
2677
2677
|
});
|
|
@@ -2682,7 +2682,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2682
2682
|
for (const o of te.value)
|
|
2683
2683
|
i[o.fieldKey] = {
|
|
2684
2684
|
assigner: { mode: Bt(o.mode) },
|
|
2685
|
-
disabled:
|
|
2685
|
+
disabled: yi(o.mode) || void 0
|
|
2686
2686
|
};
|
|
2687
2687
|
return i;
|
|
2688
2688
|
}), D = w(() => {
|
|
@@ -2709,7 +2709,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2709
2709
|
};
|
|
2710
2710
|
}
|
|
2711
2711
|
return o;
|
|
2712
|
-
}), de = w(() =>
|
|
2712
|
+
}), de = w(() => An(L.value.step_hierarchy ?? [])), g = w(() => zn(c.step, N.value)), I = w(() => de.value > 0 || g.value > 0), v = w(() => at(de.value, he.value)), b = w(() => at(g.value, he.value)), Y = w(() => Object.values(c.step).some((i) => Gt(i)));
|
|
2713
2713
|
function be() {
|
|
2714
2714
|
ce && (clearInterval(ce), ce = null), Y.value && (ce = setInterval(() => {
|
|
2715
2715
|
N.value = Date.now();
|
|
@@ -2727,13 +2727,13 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2727
2727
|
M || r("update:modelValue", ya(c));
|
|
2728
2728
|
}
|
|
2729
2729
|
function ze() {
|
|
2730
|
-
ne =
|
|
2730
|
+
ne = ki(f.value) ?? ne, P = ++V, !X && (X = !0, Promise.resolve().then(() => {
|
|
2731
2731
|
X = !1;
|
|
2732
2732
|
const i = ne, o = P ?? V;
|
|
2733
2733
|
ne = null, P = null, Ct(void 0, i, o);
|
|
2734
2734
|
}));
|
|
2735
2735
|
}
|
|
2736
|
-
const { preRenderer: ft } =
|
|
2736
|
+
const { preRenderer: ft } = bi(ze);
|
|
2737
2737
|
function Me(i) {
|
|
2738
2738
|
const o = i?.runClientAssigners ? Ze.applyCurrentClientAssigners() : !1;
|
|
2739
2739
|
Ve(), (i?.rebuild || o) && ze(), st();
|
|
@@ -2804,7 +2804,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2804
2804
|
const h = lt(o);
|
|
2805
2805
|
if (i.has(h) || (i.add(h), K.has(h)) || !Be(o))
|
|
2806
2806
|
continue;
|
|
2807
|
-
const E =
|
|
2807
|
+
const E = Ia(c, o);
|
|
2808
2808
|
if (!Zt(o, E))
|
|
2809
2809
|
continue;
|
|
2810
2810
|
const S = JSON.stringify(E);
|
|
@@ -2867,15 +2867,15 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2867
2867
|
section: o,
|
|
2868
2868
|
fieldKey: h,
|
|
2869
2869
|
assignedField: i.assignedField,
|
|
2870
|
-
dependentData:
|
|
2870
|
+
dependentData: Ia(c, i),
|
|
2871
2871
|
record: ya(c),
|
|
2872
2872
|
assigner: i.assigner,
|
|
2873
2873
|
signal: _e.signal
|
|
2874
|
-
}), Se =
|
|
2874
|
+
}), Se = wi(ye);
|
|
2875
2875
|
if (Se)
|
|
2876
2876
|
throw new Error(Se);
|
|
2877
|
-
const Fe =
|
|
2878
|
-
Object.keys(Fe).length > 0 ? (
|
|
2877
|
+
const Fe = Ci(ye), B = Mt(Fe, h), Pe = [.../* @__PURE__ */ new Set([...oe, ...B])];
|
|
2878
|
+
Object.keys(Fe).length > 0 ? (Si(c, Fe), Me({ rebuild: !0, runClientAssigners: !0 })) : Ve(), K.get(S) === _e && Xe(Pe, { loading: !1, error: void 0 });
|
|
2879
2879
|
} catch (ye) {
|
|
2880
2880
|
if (_e.signal.aborted) {
|
|
2881
2881
|
K.get(S) === _e && Xe(oe, { loading: !1, error: void 0 });
|
|
@@ -2887,7 +2887,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2887
2887
|
K.get(S) === _e && K.delete(S);
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
|
-
const Ze =
|
|
2890
|
+
const Ze = $i({
|
|
2891
2891
|
readonly: () => a.readonly,
|
|
2892
2892
|
clientAssigners: $,
|
|
2893
2893
|
fieldDefinitions: () => U.value,
|
|
@@ -2895,14 +2895,14 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2895
2895
|
onError: (i) => r("error", i),
|
|
2896
2896
|
emitRecordUpdate: Ve,
|
|
2897
2897
|
scheduleInlineRebuild: ze
|
|
2898
|
-
}), Ke =
|
|
2898
|
+
}), Ke = Ai({
|
|
2899
2899
|
readonly: () => a.readonly,
|
|
2900
2900
|
localRecord: c,
|
|
2901
2901
|
markRecordChanged: Me,
|
|
2902
2902
|
scheduleInlineRebuild: ze,
|
|
2903
2903
|
emitTableAddRow: (i) => r("table-add-row", i),
|
|
2904
2904
|
emitTableRemoveRow: (i) => r("table-remove-row", i)
|
|
2905
|
-
}), xe =
|
|
2905
|
+
}), xe = _i({
|
|
2906
2906
|
readonly: () => a.readonly,
|
|
2907
2907
|
currentUserName: () => a.currentUserName,
|
|
2908
2908
|
now: () => a.now,
|
|
@@ -2912,7 +2912,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2912
2912
|
wrapField: () => a.wrapField
|
|
2913
2913
|
});
|
|
2914
2914
|
function ta(i) {
|
|
2915
|
-
const o = i.id, h = `var:${o}`, E = D.value[h], S =
|
|
2915
|
+
const o = i.id, h = `var:${o}`, E = D.value[h], S = Kt(i.definition), oe = S.length > 0 && !E?.enumOptions ? {
|
|
2916
2916
|
...E ?? {},
|
|
2917
2917
|
enumOptions: ae(S)
|
|
2918
2918
|
} : E;
|
|
@@ -2923,7 +2923,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2923
2923
|
return k("var", h, i, c.var[o], je);
|
|
2924
2924
|
}
|
|
2925
2925
|
}
|
|
2926
|
-
const _e = i.definition?.type || "str", ye = xe.getTypePlugin(h, _e), Se =
|
|
2926
|
+
const _e = i.definition?.type || "str", ye = xe.getTypePlugin(h, _e), Se = xi(_e, {
|
|
2927
2927
|
inputType: oe?.inputType,
|
|
2928
2928
|
codeLanguage: oe?.codeLanguage,
|
|
2929
2929
|
kwargs: i.definition?.kwargs,
|
|
@@ -2942,7 +2942,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2942
2942
|
Re && xe.setVarInputDisplayOverride(o, Re), ue = !0;
|
|
2943
2943
|
}
|
|
2944
2944
|
if (Se === "datetime") {
|
|
2945
|
-
const Re =
|
|
2945
|
+
const Re = Fi(c.var[o]);
|
|
2946
2946
|
Re !== c.var[o] && (c.var[o] = Re, ue = !0);
|
|
2947
2947
|
}
|
|
2948
2948
|
const Je = xe.normalizeVarValue(
|
|
@@ -2964,7 +2964,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
2964
2964
|
if (ye?.renderField) {
|
|
2965
2965
|
const je = ye.supportsInlineAssignerControl === !0 ? Qe : null, $t = ye.renderField({
|
|
2966
2966
|
type: _e,
|
|
2967
|
-
normalizedType:
|
|
2967
|
+
normalizedType: jt(_e),
|
|
2968
2968
|
fieldKey: h,
|
|
2969
2969
|
node: i,
|
|
2970
2970
|
value: c.var[o],
|
|
@@ -3020,7 +3020,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3020
3020
|
return k("var", h, i, c.var[o], da);
|
|
3021
3021
|
}
|
|
3022
3022
|
function ot(i) {
|
|
3023
|
-
const o = i.id, h = `var_table:${o}`, E =
|
|
3023
|
+
const o = i.id, h = `var_table:${o}`, E = Ei(i), S = Ke.ensureVarTableRows(o, E), oe = xe.isFieldDisabled(h), _e = E.filter((B) => !!D.value[`var_table:${o}:${B}`]?.disabled), ye = H("var_table", h), Se = l(mr, {
|
|
3024
3024
|
node: i,
|
|
3025
3025
|
rows: S,
|
|
3026
3026
|
columns: E,
|
|
@@ -3044,7 +3044,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3044
3044
|
const Pe = E.indexOf(B.column);
|
|
3045
3045
|
if (Pe < 0)
|
|
3046
3046
|
return;
|
|
3047
|
-
const Je =
|
|
3047
|
+
const Je = Vn(B.text), Ne = In(
|
|
3048
3048
|
S,
|
|
3049
3049
|
E,
|
|
3050
3050
|
B.rowIndex,
|
|
@@ -3140,7 +3140,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3140
3140
|
}
|
|
3141
3141
|
function la(i, o = []) {
|
|
3142
3142
|
const h = i.id, E = `step:${h}`;
|
|
3143
|
-
h in c.step || (c.step[h] =
|
|
3143
|
+
h in c.step || (c.step[h] = Tn(), ue = !0);
|
|
3144
3144
|
const S = c.step[h], oe = xe.isFieldDisabled(E), _e = xe.fieldStateClasses(E), ye = na(o), Se = l(fr, {
|
|
3145
3145
|
node: i,
|
|
3146
3146
|
state: S,
|
|
@@ -3152,19 +3152,19 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3152
3152
|
messages: q.value,
|
|
3153
3153
|
onCheckChange: (B) => {
|
|
3154
3154
|
const Pe = Gt(S);
|
|
3155
|
-
|
|
3155
|
+
qn(S, B.value, Date.now()), N.value = Date.now(), Me(), r("field-change", { section: "step", fieldKey: B.id, value: B.value }), Pe && r("field-change", { section: "step", fieldKey: `${B.id}:timer`, value: Ce(S) });
|
|
3156
3156
|
},
|
|
3157
3157
|
onAnnotationChange: (B) => {
|
|
3158
3158
|
S.annotation = B.value, Me(), r("field-change", { section: "step", fieldKey: `${B.id}:annotation`, value: B.value });
|
|
3159
3159
|
},
|
|
3160
3160
|
onTimerStart: (B) => {
|
|
3161
|
-
|
|
3161
|
+
Dn(S, Date.now()) && (N.value = Date.now(), Me(), r("field-change", { section: "step", fieldKey: `${B.id}:timer`, value: Ce(S) }));
|
|
3162
3162
|
},
|
|
3163
3163
|
onTimerPause: (B) => {
|
|
3164
|
-
|
|
3164
|
+
Rn(S, Date.now()) && (N.value = Date.now(), Me(), r("field-change", { section: "step", fieldKey: `${B.id}:timer`, value: Ce(S) }));
|
|
3165
3165
|
},
|
|
3166
3166
|
onTimerReset: (B) => {
|
|
3167
|
-
|
|
3167
|
+
Mn(S) && (N.value = Date.now(), Me(), r("field-change", { section: "step", fieldKey: `${B.id}:timer`, value: Ce(S) }));
|
|
3168
3168
|
},
|
|
3169
3169
|
onBlur: (B) => {
|
|
3170
3170
|
r("field-blur", { section: "step", fieldKey: B.id });
|
|
@@ -3174,7 +3174,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3174
3174
|
}
|
|
3175
3175
|
function sa(i, o = []) {
|
|
3176
3176
|
const h = i.id, E = `check:${h}`;
|
|
3177
|
-
h in c.check || (c.check[h] =
|
|
3177
|
+
h in c.check || (c.check[h] = Fn(), ue = !0);
|
|
3178
3178
|
const S = c.check[h], oe = xe.isFieldDisabled(E), _e = xe.fieldStateClasses(E), ye = ra(o), Se = l(vr, {
|
|
3179
3179
|
node: i,
|
|
3180
3180
|
state: S,
|
|
@@ -3213,7 +3213,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3213
3213
|
score: i.score,
|
|
3214
3214
|
extra: i.extra
|
|
3215
3215
|
};
|
|
3216
|
-
o in c.quiz || (c.quiz[o] =
|
|
3216
|
+
o in c.quiz || (c.quiz[o] = xn(E));
|
|
3217
3217
|
const S = l(vl, {
|
|
3218
3218
|
class: "aimd-rec-inline aimd-rec-inline--quiz",
|
|
3219
3219
|
quiz: E,
|
|
@@ -3234,7 +3234,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
async function Ct(i, o, h) {
|
|
3236
3236
|
ue = !1;
|
|
3237
|
-
const E = await
|
|
3237
|
+
const E = await Nn(a.content || "", {
|
|
3238
3238
|
locale: he.value,
|
|
3239
3239
|
groupStepBodies: !0,
|
|
3240
3240
|
groupCheckBodies: !0,
|
|
@@ -3256,7 +3256,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3256
3256
|
quiz: (S) => oa(S)
|
|
3257
3257
|
}
|
|
3258
3258
|
});
|
|
3259
|
-
i !== void 0 && i !== T || h !== void 0 && h !== V || (y.value = E.nodes, await Oe(),
|
|
3259
|
+
i !== void 0 && i !== T || h !== void 0 && h !== V || (y.value = E.nodes, await Oe(), zi(f.value, o ?? null), ue && Ve());
|
|
3260
3260
|
}
|
|
3261
3261
|
async function Dt() {
|
|
3262
3262
|
const i = ++T, o = ++V;
|
|
@@ -3266,7 +3266,7 @@ const yl = /* @__PURE__ */ it(hl, [["render", pl]]), bl = {
|
|
|
3266
3266
|
const h = ba(a.content || "");
|
|
3267
3267
|
if (i !== T) return;
|
|
3268
3268
|
L.value = h, $.value = h.client_assigner || [], r("fields-change", h);
|
|
3269
|
-
const E =
|
|
3269
|
+
const E = En(c, h), S = Ze.applyCurrentClientAssigners();
|
|
3270
3270
|
(E || S) && Ve(), await Ct(i, void 0, o), st();
|
|
3271
3271
|
} catch (h) {
|
|
3272
3272
|
if (i !== T)
|
|
@@ -3778,7 +3778,7 @@ function Xl(e, t, n, a) {
|
|
|
3778
3778
|
return nt(c, M, M, f);
|
|
3779
3779
|
}
|
|
3780
3780
|
function Zl(e = {}) {
|
|
3781
|
-
return new
|
|
3781
|
+
return new Un({
|
|
3782
3782
|
view(t) {
|
|
3783
3783
|
return new Jl(t, e);
|
|
3784
3784
|
}
|
|
@@ -3842,7 +3842,7 @@ class Jl {
|
|
|
3842
3842
|
if (n && !y) {
|
|
3843
3843
|
let u = n.pos;
|
|
3844
3844
|
if (this.editorView.dragging && this.editorView.dragging.slice) {
|
|
3845
|
-
let f =
|
|
3845
|
+
let f = jn(this.editorView.state.doc, u, this.editorView.dragging.slice);
|
|
3846
3846
|
f != null && (u = f);
|
|
3847
3847
|
}
|
|
3848
3848
|
this.setCursor(u), this.scheduleRemoval(5e3);
|
|
@@ -3990,7 +3990,7 @@ function ds() {
|
|
|
3990
3990
|
}
|
|
3991
3991
|
return e;
|
|
3992
3992
|
}
|
|
3993
|
-
const cs =
|
|
3993
|
+
const cs = Wn("aimdRecorderQuizBlock", () => ds()), tn = Gn("aimd_recorder_quiz", () => ({
|
|
3994
3994
|
group: "block",
|
|
3995
3995
|
atom: !0,
|
|
3996
3996
|
draggable: !0,
|
|
@@ -4056,7 +4056,7 @@ class an {
|
|
|
4056
4056
|
const t = this.getPos();
|
|
4057
4057
|
if (typeof t != "number")
|
|
4058
4058
|
return;
|
|
4059
|
-
const n = this.view.state.tr.setSelection(
|
|
4059
|
+
const n = this.view.state.tr.setSelection(ei.create(this.view.state.doc, t));
|
|
4060
4060
|
this.view.dispatch(n);
|
|
4061
4061
|
}
|
|
4062
4062
|
resolveIdentity() {
|
|
@@ -4175,29 +4175,29 @@ class us {
|
|
|
4175
4175
|
destroy() {
|
|
4176
4176
|
}
|
|
4177
4177
|
}
|
|
4178
|
-
const ms =
|
|
4178
|
+
const ms = Qn.extendSchema((e) => (t) => ({
|
|
4179
4179
|
...e(t),
|
|
4180
|
-
toDOM: (a) => ["br", t.get(
|
|
4181
|
-
})), fs =
|
|
4180
|
+
toDOM: (a) => ["br", t.get(Yn.key)(a)]
|
|
4181
|
+
})), fs = Xn(() => Zl({
|
|
4182
4182
|
class: "aimd-recorder-dropcursor",
|
|
4183
4183
|
color: !1,
|
|
4184
4184
|
width: 4
|
|
4185
4185
|
}));
|
|
4186
4186
|
function vs(e) {
|
|
4187
|
-
const t =
|
|
4187
|
+
const t = Ra(Ma, () => (a, r, y) => {
|
|
4188
4188
|
const u = String(a.attrs.fieldType || "var");
|
|
4189
4189
|
return as.has(u) ? new an(a, r, y, e, !1) : new us(a, r, y);
|
|
4190
|
-
}), n =
|
|
4190
|
+
}), n = Ra(tn, () => (a, r, y) => new an(a, r, y, e, !0));
|
|
4191
4191
|
return [
|
|
4192
|
-
|
|
4192
|
+
Zn,
|
|
4193
4193
|
cs,
|
|
4194
|
-
|
|
4194
|
+
Ma,
|
|
4195
4195
|
tn,
|
|
4196
4196
|
t,
|
|
4197
4197
|
n,
|
|
4198
4198
|
ms,
|
|
4199
4199
|
fs,
|
|
4200
|
-
|
|
4200
|
+
Jn
|
|
4201
4201
|
].flat();
|
|
4202
4202
|
}
|
|
4203
4203
|
const hs = /* @__PURE__ */ Le({
|
|
@@ -4233,7 +4233,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4233
4233
|
},
|
|
4234
4234
|
emits: ["update:content", "update:modelValue", "ready", "fields-change", "error", "field-change", "field-blur", "assigner-request", "assigner-cancel", "table-add-row", "table-remove-row", "edit-field", "delete-field"],
|
|
4235
4235
|
setup(e, { expose: t, emit: n }) {
|
|
4236
|
-
const a = ["var", "var_table", "quiz", "step", "check"], r = new Set(a), y = [...a], u = e, f = n, c = w(() =>
|
|
4236
|
+
const a = ["var", "var_table", "quiz", "step", "check"], r = new Set(a), y = [...a], u = e, f = n, c = w(() => ti(u.locale)), T = w(() => ai(c.value).filter((x) => r.has(x.type))), V = w(() => ni(c.value)), M = w(() => (u.locale || "").toLowerCase().startsWith("zh") ? "拖到这里" : "Drop here"), X = w(() => ({
|
|
4237
4237
|
"--aimd-recorder-drop-label": JSON.stringify(M.value)
|
|
4238
4238
|
})), ue = w(() => (u.typePlugins ?? []).map((x) => ({
|
|
4239
4239
|
key: x.type,
|
|
@@ -4247,7 +4247,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4247
4247
|
handleMdAction: ce,
|
|
4248
4248
|
onMilkdownMarkdownUpdated: K,
|
|
4249
4249
|
onMilkdownReady: se
|
|
4250
|
-
} =
|
|
4250
|
+
} = ii({
|
|
4251
4251
|
initialContent: u.content,
|
|
4252
4252
|
initialMode: "wysiwyg",
|
|
4253
4253
|
resolvedMessages: c,
|
|
@@ -4266,7 +4266,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4266
4266
|
}, { immediate: !0 });
|
|
4267
4267
|
const ie = ha(Ca());
|
|
4268
4268
|
Ae(() => u.modelValue, (x) => {
|
|
4269
|
-
const le =
|
|
4269
|
+
const le = Ut(x);
|
|
4270
4270
|
bt(le) !== bt(ie) && pa(ie, le);
|
|
4271
4271
|
}, { deep: !0, immediate: !0 });
|
|
4272
4272
|
function he(x) {
|
|
@@ -4328,7 +4328,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4328
4328
|
k.value = r.has(x) ? x : "var", we.value = !0;
|
|
4329
4329
|
}
|
|
4330
4330
|
function Q(x) {
|
|
4331
|
-
r.has(x) && N(
|
|
4331
|
+
r.has(x) && N(oi(x, c.value));
|
|
4332
4332
|
}
|
|
4333
4333
|
function H(x) {
|
|
4334
4334
|
N(x);
|
|
@@ -4343,7 +4343,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4343
4343
|
class: "aimd-recorder-wysiwyg-surface",
|
|
4344
4344
|
style: ut(X.value)
|
|
4345
4345
|
}, [
|
|
4346
|
-
yt(Ye(
|
|
4346
|
+
yt(Ye(ri), {
|
|
4347
4347
|
"show-top-bar": !1,
|
|
4348
4348
|
"show-md-toolbar": !0,
|
|
4349
4349
|
"show-aimd-toolbar": !0,
|
|
@@ -4355,7 +4355,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4355
4355
|
onOpenAimdDialog: O,
|
|
4356
4356
|
onQuickInsertAimd: Q
|
|
4357
4357
|
}, null, 8, ["resolved-messages", "localized-field-types", "localized-md-toolbar-items", "onMdAction"]),
|
|
4358
|
-
yt(Ye(
|
|
4358
|
+
yt(Ye(li), {
|
|
4359
4359
|
ref_key: "wysiwygEditorRef",
|
|
4360
4360
|
ref: Z,
|
|
4361
4361
|
content: Ye(ne),
|
|
@@ -4370,7 +4370,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4370
4370
|
onReady: G,
|
|
4371
4371
|
onOpenAimdDialog: O
|
|
4372
4372
|
}, null, 8, ["content", "min-height", "enable-block-handle", "readonly", "resolved-messages", "localized-field-types", "onMarkdownUpdated"]),
|
|
4373
|
-
yt(Ye(
|
|
4373
|
+
yt(Ye(si), {
|
|
4374
4374
|
visible: we.value,
|
|
4375
4375
|
"initial-type": k.value,
|
|
4376
4376
|
messages: c.value,
|
|
@@ -4464,6 +4464,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4464
4464
|
showFieldStructure: { type: Boolean, default: !1 },
|
|
4465
4465
|
showVisualEditToggle: { type: Boolean, default: !0 },
|
|
4466
4466
|
initialVisualEditMode: { type: Boolean, default: !1 },
|
|
4467
|
+
initialSourceCollapsed: { type: Boolean, default: !1 },
|
|
4467
4468
|
allowRawFieldSourceEditing: { type: Boolean, default: !0 },
|
|
4468
4469
|
showRecordData: { type: Boolean, default: !1 },
|
|
4469
4470
|
showDetachedData: { type: Boolean, default: !0 },
|
|
@@ -4488,7 +4489,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4488
4489
|
ref_fig: [],
|
|
4489
4490
|
cite: [],
|
|
4490
4491
|
fig: []
|
|
4491
|
-
}, u = W(null), f = W(null), c = W(null), T = W(null), V = W(null), M = W(null), X = W(null), ue = W(null), ne = W(null), P = W(y), N = W(a.content || ""), ce = W(a.content || ""), K = W(
|
|
4492
|
+
}, u = W(null), f = W(null), c = W(null), T = W(null), V = W(null), M = W(null), X = W(null), ue = W(null), ne = W(null), P = W(y), N = W(a.content || ""), ce = W(a.content || ""), K = W(Ut(a.modelValue)), se = W(null), ie = W(a.initialVisualEditMode), he = W(null), q = W("recorder"), fe = W(a.initialSourceCollapsed), ve = W(50), ke = W(!1), we = W(a.editorMinHeight), k = W(a.recorderMinHeight), O = W(Math.max(320, a.recorderMinHeight)), Q = W(null), H = W(null), G = W(""), Z = W(null);
|
|
4492
4493
|
let x = 0, le = null, L = null, $ = [], F = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map();
|
|
4493
4494
|
const te = /* @__PURE__ */ new Set(), pe = /* @__PURE__ */ new Set();
|
|
4494
4495
|
function J(s) {
|
|
@@ -4558,7 +4559,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4558
4559
|
}, { immediate: !0 }), Ae(ie, (s) => {
|
|
4559
4560
|
s && de(N.value);
|
|
4560
4561
|
}), Ae(() => a.modelValue, (s) => {
|
|
4561
|
-
const d =
|
|
4562
|
+
const d = Ut(s);
|
|
4562
4563
|
bt(d) !== bt(K.value) && (K.value = d);
|
|
4563
4564
|
}, { deep: !0, immediate: !0 });
|
|
4564
4565
|
const b = w(() => `${a.editorProps?.locale ?? a.locale ?? ""}`.trim().toLowerCase().startsWith("zh")), Y = w(() => a.editorTitle ?? (b.value ? "Protocol 源码" : "Protocol Source")), be = w(() => a.recorderTitle ?? (b.value ? "Recorder 录入" : "Recorder")), Ce = w(() => a.recordDataTitle ?? (b.value ? "Record 数据" : "Record Data")), Ve = w(() => a.detachedDataTitle ?? (b.value ? "脱离当前 Protocol 的旧数据" : "Detached Data")), ze = w(() => a.detachedDataDescription ?? (b.value ? "这些值对应的字段 id 已不在当前 protocol 结构里。改结构、重命名或删字段之后,可以从这里把旧值搬到新 field。" : "These values belong to field ids that are no longer present in the current protocol. After restructuring, renaming, or removing fields, copy them into newly created fields here.")), ft = w(() => a.fieldStructureTitle ?? (b.value ? "Field 结构编辑" : "Field Structure")), Me = w(() => a.fieldStructureDescription ?? (b.value ? "这里可以直接改 recorder field 的 kind、id 和顺序,也可以新增或删除 field。按住每个字段顶部的“拖动排序”即可重排。拖拽当前是按源码片段重排;如果 field 嵌在句子里,周围 prose 仍可在左侧源码里继续微调。" : "Edit recorder field kind, id, and order here, and add or remove fields without leaving the editor. Grab the “Drag to reorder” handle at the top of each field to move it. Dragging currently reorders source fragments; if a field is embedded inside prose, you can fine-tune the surrounding text in the source editor.")), Xe = w(() => b.value ? "右侧切到 recorder-aware 所见即所得编辑器,字段会直接显示为可交互 recorder widget" : "Switch the right side into a recorder-aware WYSIWYG editor with real recorder widgets and full caret-based Markdown editing"), j = w(() => b.value ? {
|
|
@@ -4693,8 +4694,8 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4693
4694
|
return s.find((me) => me.start === d.start) ?? s.find((me) => me.uid === d.uid) ?? s.find((me) => me.fieldType === d.fieldType && me.id === d.id) ?? null;
|
|
4694
4695
|
}
|
|
4695
4696
|
function ea(s, d) {
|
|
4696
|
-
const p = Ca(), me = new Set(d.var), $e = new Set(
|
|
4697
|
-
for (const Ee of
|
|
4697
|
+
const p = Ca(), me = new Set(d.var), $e = new Set(Bn(d.step).map((Ee) => Ee.name)), He = new Set(Pn(d.check).map((Ee) => Ee.name)), At = new Set(On(d.quiz).map((Ee) => Ee.id));
|
|
4698
|
+
for (const Ee of Ln(d.var_table))
|
|
4698
4699
|
me.add(Ee.id);
|
|
4699
4700
|
for (const [Ee, ct] of Object.entries(s.var))
|
|
4700
4701
|
me.has(Ee) || (p.var[Ee] = ct);
|
|
@@ -4786,7 +4787,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
4786
4787
|
p instanceof Node && me instanceof Node && p.contains(me) || he.value === s && (he.value = null);
|
|
4787
4788
|
}
|
|
4788
4789
|
function Dt(s) {
|
|
4789
|
-
K.value =
|
|
4790
|
+
K.value = Ut(s), r("update:modelValue", s);
|
|
4790
4791
|
}
|
|
4791
4792
|
function i(s) {
|
|
4792
4793
|
return Math.min(76, Math.max(24, s));
|
|
@@ -5084,7 +5085,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
5084
5085
|
onFocusinCapture: sa,
|
|
5085
5086
|
onFocusoutCapture: d[3] || (d[3] = (p) => Ct("source", p))
|
|
5086
5087
|
}, [
|
|
5087
|
-
yt(Ye(
|
|
5088
|
+
yt(Ye(di), _n({
|
|
5088
5089
|
ref_key: "editorRef",
|
|
5089
5090
|
ref: u
|
|
5090
5091
|
}, Zt.value, {
|
|
@@ -5470,7 +5471,7 @@ const hs = /* @__PURE__ */ Le({
|
|
|
5470
5471
|
])) : ee("", !0)
|
|
5471
5472
|
], 2));
|
|
5472
5473
|
}
|
|
5473
|
-
}), Wo = /* @__PURE__ */ it(Bo, [["__scopeId", "data-v-
|
|
5474
|
+
}), Wo = /* @__PURE__ */ it(Bo, [["__scopeId", "data-v-eba944d2"]]), Go = Qt(() => import("./AimdDnaSequenceField-Cp0cgBYl.js")), Qo = Qt(() => import("./AimdMarkdownField-D4AEz_mB.js")), Yo = Sa;
|
|
5474
5475
|
export {
|
|
5475
5476
|
jo as AimdAssignerGraph,
|
|
5476
5477
|
Go as AimdDnaSequenceField,
|