@airalogy/aimd-recorder 1.24.5 → 1.25.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 +13 -1
- package/README.zh-CN.md +13 -1
- package/dist/{AimdDnaSequenceField-CxFtD5Au.js → AimdDnaSequenceField-BHV1_c2o.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-B0n0inzY.js → AimdEditor.vue_vue_type_style_index_0_lang-phvUVTHV.js} +643 -605
- package/dist/AimdEntityRefField-COzwbHwr.js +4 -0
- package/dist/{AimdEntityRefField-DCE79vca.js → AimdEntityRefField.vue_vue_type_script_setup_true_lang-BIvUuZFV.js} +2 -2
- package/dist/{AimdMarkdownField-Du0Fh5sG.js → AimdMarkdownField-t8hqazDv.js} +3 -3
- package/dist/{AimdMarkdownNoteField-YnyNmBvM.js → AimdMarkdownNoteField-BGjkSXEY.js} +2 -2
- package/dist/AimdResourceRefField-BBaRSLcL.js +264 -0
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-B0vwJ3nm.js → arc-CsBMJYPv.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-B5niz6cr.js → architectureDiagram-3BPJPVTR-BeKUSqHO.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-Qtk9HFm8.js → blockDiagram-GPEHLZMM-CJeAC_1p.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-DfTlAW2e.js → c4Diagram-AAUBKEIU-LoQMp4kW.js} +2 -2
- package/dist/{channel-CTIJccfL.js → channel-BoLQO6Dk.js} +1 -1
- package/dist/{chunk-2J33WTMH-9xMy_Pgx.js → chunk-2J33WTMH-D1vw38h5.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BYosfXC9.js → chunk-4BX2VUAB-BFSVnsyi.js} +1 -1
- package/dist/{chunk-55IACEB6-B8fHTImy.js → chunk-55IACEB6-D13UaCP1.js} +1 -1
- package/dist/{chunk-727SXJPM-C83DIicG.js → chunk-727SXJPM-BCcz4POX.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-C-IOiRzH.js → chunk-AQP2D5EJ-DTOfpg2m.js} +3 -3
- package/dist/{chunk-FMBD7UC4-BtkEX_DM.js → chunk-FMBD7UC4-XGRN-sFg.js} +1 -1
- package/dist/{chunk-ND2GUHAM-DIB3ib7j.js → chunk-ND2GUHAM-DSgp1I9F.js} +1 -1
- package/dist/{chunk-QZHKN3VN-BRsoqg2B.js → chunk-QZHKN3VN-DQl3-kKo.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-D39GKFwR.js → classDiagram-4FO5ZUOK-CI-4bhme.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-D39GKFwR.js → classDiagram-v2-Q7XG4LA2-CI-4bhme.js} +2 -2
- package/dist/components.js +2222 -2110
- package/dist/composables.js +2 -2
- package/dist/{cose-bilkent-S5V4N54A-CyRaJD1S.js → cose-bilkent-S5V4N54A-CU1K-fx3.js} +1 -1
- package/dist/{dagre-BM42HDAG-K85xJEFU.js → dagre-BM42HDAG-HIHsvvPF.js} +3 -3
- package/dist/{diagram-2AECGRRQ-DET7fuM5.js → diagram-2AECGRRQ-XlYRVMia.js} +2 -2
- package/dist/{diagram-5GNKFQAL-Dlba-FRw.js → diagram-5GNKFQAL-BeA9dVE2.js} +3 -3
- package/dist/{diagram-KO2AKTUF-J4PMcx3F.js → diagram-KO2AKTUF-D501LuyG.js} +2 -2
- package/dist/{diagram-LMA3HP47-ldR5Az83.js → diagram-LMA3HP47-ClkmdOf_.js} +2 -2
- package/dist/{diagram-OG6HWLK6-UM1_l5na.js → diagram-OG6HWLK6-30O5epks.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-eGmNSbi1.js → erDiagram-TEJ5UH35-Dk5azNFu.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-rHTJn3LZ.js → flowDiagram-I6XJVG4X-C4K9bB2d.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-DKmi_hWM.js → ganttDiagram-6RSMTGT7-sFuSkRH3.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-DpQ1cu5h.js → gitGraphDiagram-PVQCEYII-CC4Kf_0S.js} +3 -3
- package/dist/{graph-CSRKgcbg.js → graph-BBr12s4M.js} +1 -1
- package/dist/index.js +124 -122
- package/dist/{infoDiagram-5YYISTIA-v8jIxUL5.js → infoDiagram-5YYISTIA-PObcwLKW.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-BaV5bCe8.js → ishikawaDiagram-YF4QCWOH-B93dpm60.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-DeU65SpU.js → journeyDiagram-JHISSGLW-Z0_jIQ5z.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-TGHAcp6_.js → kanban-definition-UN3LZRKU-BicW7pfZ.js} +2 -2
- package/dist/{layout-D_sj0Eed.js → layout-jm5q2dTB.js} +2 -2
- package/dist/{linear-TldV7C5w.js → linear-Bv4EbUf4.js} +1 -1
- package/dist/{mermaid.core-CRSTqrrD.js → mermaid.core-BN0BM26i.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-CejyEBat.js → mindmap-definition-RKZ34NQL-Ba85mo62.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-CWLZWcAW.js → pieDiagram-4H26LBE5-CfU3ahlI.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-CYidUieH.js → quadrantDiagram-W4KKPZXB-BPTjR1PA.js} +2 -2
- package/dist/record.js +2 -2
- package/dist/{requirementDiagram-4Y6WPE33-Cw4ko-tB.js → requirementDiagram-4Y6WPE33-DVfyUAUL.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-BnX4Evuh.js → sankeyDiagram-5OEKKPKP-B_9c0VJt.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-BiGVMmS5.js → sequenceDiagram-3UESZ5HK-BFSDCMig.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-DIaBI1Uq.js → stateDiagram-AJRCARHV-DNCya3UT.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-BgfV-ldT.js → stateDiagram-v2-BHNVJYJU-BlmsFnk2.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-C0_5OwxD.js → timeline-definition-PNZ67QCA-B297WQKg.js} +2 -2
- package/dist/{useFieldRendering-B2iMfsEA.js → useFieldRendering-DQN_MbSg.js} +1 -1
- package/dist/{useVarHelpers-CSogsd1T.js → useVarHelpers-D00Za8e6.js} +975 -934
- package/dist/validation-Dn_j1py1.js +5712 -0
- package/dist/{vennDiagram-CIIHVFJN-_ktbUOEm.js → vennDiagram-CIIHVFJN-gDmDgx6K.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-iwftOr4-.js → wardleyDiagram-YWT4CUSO-ek5B-FUl.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-C_h9QW07.js → xychartDiagram-2RQKCTM6-DRtlxacH.js} +2 -2
- package/package.json +3 -3
- package/src/__tests__/record-validation.test.ts +121 -0
- package/src/__tests__/required-marker.test.ts +4 -0
- package/src/__tests__/resource-form.test.ts +20 -0
- package/src/__tests__/resource-ref-field.test.ts +125 -0
- package/src/__tests__/var-field-render.test.ts +39 -1
- package/src/components/AimdRecorder.vue +11 -1
- package/src/components/AimdRecorderEditor.vue +5 -0
- package/src/components/AimdRecorderWysiwygFieldHost.vue +1 -0
- package/src/components/AimdRecorderWysiwygSurface.vue +5 -0
- package/src/components/AimdResourceForm.vue +129 -0
- package/src/components/AimdResourceRefField.vue +393 -0
- package/src/components/AimdVarField.vue +39 -2
- package/src/components/index.ts +4 -0
- package/src/components/recorderMilkdownPlugin.ts +2 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +53 -4
- package/src/composables/useVarHelpers.ts +82 -3
- package/src/index.ts +12 -1
- package/src/locales.ts +57 -0
- package/src/record/validation.ts +145 -11
- package/src/styles/recorder.css +7 -0
- package/src/types.ts +30 -1
- package/dist/validation-BYjlufCM.js +0 -5629
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as P, ref as w, computed as p, watch as Q, openBlock as a, createElementBlock as r, Fragment as N, renderList as x, createElementVNode as y, toDisplayString as l, createCommentVNode as f, withDirectives as j, withKeys as U, withModifiers as G, vModelText as H } from "vue";
|
|
2
|
-
import { a4 as J } from "./useVarHelpers-
|
|
2
|
+
import { a4 as J } from "./useVarHelpers-D00Za8e6.js";
|
|
3
3
|
const O = { class: "aimd-rec-entity-ref" }, W = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "aimd-rec-entity-ref__selected"
|
|
@@ -225,5 +225,5 @@ const O = { class: "aimd-rec-entity-ref" }, W = {
|
|
|
225
225
|
}
|
|
226
226
|
});
|
|
227
227
|
export {
|
|
228
|
-
fe as
|
|
228
|
+
fe as _
|
|
229
229
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as p, ref as m, watch as V, h as x, computed as l, shallowRef as ie, onBeforeUnmount as oe, openBlock as r, createElementBlock as n, normalizeStyle as re, normalizeClass as C, createElementVNode as s, toDisplayString as c, unref as v, createBlock as F, createCommentVNode as w, createVNode as E } from "vue";
|
|
2
|
-
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import "./useVarHelpers-
|
|
2
|
+
import { g as ne, _ as de } from "./AimdEditor.vue_vue_type_style_index_0_lang-phvUVTHV.js";
|
|
3
|
+
import "./useVarHelpers-D00Za8e6.js";
|
|
4
4
|
import { u as le, c as se } from "./useCodeBlockRendering-D2viVPtA.js";
|
|
5
5
|
import "@airalogy/aimd-core";
|
|
6
6
|
import { renderToVue as ce, createMermaidRenderer as ue } from "@airalogy/aimd-renderer";
|
|
@@ -68,7 +68,7 @@ const we = { class: "aimd-field aimd-field--no-style aimd-field__label" }, he =
|
|
|
68
68
|
return;
|
|
69
69
|
}
|
|
70
70
|
try {
|
|
71
|
-
const T = (await import("./mermaid.core-
|
|
71
|
+
const T = (await import("./mermaid.core-BN0BM26i.js").then((te) => te.bm)).default;
|
|
72
72
|
T.initialize({
|
|
73
73
|
startOnLoad: !1,
|
|
74
74
|
securityLevel: "strict"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as K, ref as h, computed as a, shallowRef as re, watch as R, onBeforeUnmount as se, openBlock as r, createElementBlock as m, normalizeStyle as ue, normalizeClass as U, createElementVNode as l, toDisplayString as s, createCommentVNode as ce, createBlock as me, unref as M, createVNode as fe, nextTick as ve } from "vue";
|
|
2
|
-
import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import "./useVarHelpers-
|
|
2
|
+
import { _ as we } from "./AimdEditor.vue_vue_type_style_index_0_lang-phvUVTHV.js";
|
|
3
|
+
import "./useVarHelpers-D00Za8e6.js";
|
|
4
4
|
import { u as he } from "./useCodeBlockRendering-D2viVPtA.js";
|
|
5
5
|
import "@airalogy/aimd-core";
|
|
6
6
|
import { renderToVue as be } from "@airalogy/aimd-renderer";
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { defineComponent as L, ref as B, computed as _, watch as T, openBlock as l, createElementBlock as a, createVNode as z, toDisplayString as o, createCommentVNode as c, createElementVNode as d, Fragment as b, renderList as $, createTextVNode as R } from "vue";
|
|
2
|
+
import { a4 as S } from "./useVarHelpers-D00Za8e6.js";
|
|
3
|
+
import { _ as j } from "./AimdEntityRefField.vue_vue_type_script_setup_true_lang-BIvUuZFV.js";
|
|
4
|
+
import { a as D } from "./AimdRequiredMarker.vue_vue_type_script_setup_true_lang-B5qDiOZn.js";
|
|
5
|
+
const K = { class: "aimd-rec-resource-ref" }, P = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "aimd-rec-resource-ref__details"
|
|
8
|
+
}, G = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "aimd-rec-resource-ref__available"
|
|
11
|
+
}, H = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "aimd-rec-resource-ref__error"
|
|
14
|
+
}, J = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "aimd-rec-resource-ref__field"
|
|
17
|
+
}, Q = ["disabled", "value"], U = { value: "" }, W = ["value", "disabled"], X = {
|
|
18
|
+
key: 3,
|
|
19
|
+
class: "aimd-rec-resource-ref__field"
|
|
20
|
+
}, Y = ["disabled", "value"], Z = { value: "" }, ee = ["value", "disabled"], te = {
|
|
21
|
+
key: 4,
|
|
22
|
+
class: "aimd-rec-resource-ref__quantity-row"
|
|
23
|
+
}, re = {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "aimd-rec-resource-ref__field"
|
|
26
|
+
}, ie = ["disabled", "value"], se = { class: "aimd-rec-resource-ref__field aimd-rec-resource-ref__field--unit" }, oe = ["disabled", "value"], le = {
|
|
27
|
+
key: 5,
|
|
28
|
+
class: "aimd-rec-resource-ref__binding"
|
|
29
|
+
}, ae = {
|
|
30
|
+
key: 6,
|
|
31
|
+
class: "aimd-rec-resource-ref__field"
|
|
32
|
+
}, ne = ["disabled", "value"], ue = { value: "" }, de = ["value", "disabled"], ce = /* @__PURE__ */ L({
|
|
33
|
+
__name: "AimdResourceRefField",
|
|
34
|
+
props: {
|
|
35
|
+
node: {},
|
|
36
|
+
value: {},
|
|
37
|
+
disabled: { type: Boolean },
|
|
38
|
+
messages: {},
|
|
39
|
+
fieldMeta: {},
|
|
40
|
+
type: {},
|
|
41
|
+
resourceConfig: {},
|
|
42
|
+
resourceResolvers: {},
|
|
43
|
+
record: {}
|
|
44
|
+
},
|
|
45
|
+
emits: ["change", "blur"],
|
|
46
|
+
setup(s, { emit: x }) {
|
|
47
|
+
const i = s, v = x, n = B(null), f = B(""), C = B(!1);
|
|
48
|
+
let p = 0, k = 0;
|
|
49
|
+
const g = _(() => {
|
|
50
|
+
const r = i.resourceResolvers;
|
|
51
|
+
if (r)
|
|
52
|
+
return (i.resourceConfig.source ? r[i.resourceConfig.source] : void 0) ?? (i.resourceConfig.entity ? r[i.resourceConfig.entity] : void 0) ?? r.resource;
|
|
53
|
+
}), w = _(() => {
|
|
54
|
+
if (!g.value) return;
|
|
55
|
+
const r = {
|
|
56
|
+
search: g.value.search,
|
|
57
|
+
resolve: g.value.resolve
|
|
58
|
+
}, t = {};
|
|
59
|
+
return i.resourceConfig.source && (t[i.resourceConfig.source] = r), i.resourceConfig.entity && (t[i.resourceConfig.entity] = r), t;
|
|
60
|
+
});
|
|
61
|
+
function q(r) {
|
|
62
|
+
if (!r || typeof r != "object" || Array.isArray(r)) return null;
|
|
63
|
+
const t = r;
|
|
64
|
+
return typeof t.id != "string" || !t.id.trim() ? null : {
|
|
65
|
+
...t,
|
|
66
|
+
entity: typeof t.entity == "string" && t.entity.trim() ? t.entity : i.resourceConfig.entity ?? "resource",
|
|
67
|
+
id: t.id.trim()
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
const u = _(() => {
|
|
71
|
+
if (i.resourceConfig.multiple)
|
|
72
|
+
return (Array.isArray(i.value) ? i.value : []).map(q).filter((e) => e !== null);
|
|
73
|
+
const r = q(i.value);
|
|
74
|
+
return r ? [r] : [];
|
|
75
|
+
});
|
|
76
|
+
function A() {
|
|
77
|
+
return {
|
|
78
|
+
type: i.type,
|
|
79
|
+
normalizedType: S(i.type),
|
|
80
|
+
fieldKey: `var:${i.node.id}`,
|
|
81
|
+
node: i.node,
|
|
82
|
+
fieldMeta: i.fieldMeta,
|
|
83
|
+
entity: i.resourceConfig.entity,
|
|
84
|
+
source: i.resourceConfig.source,
|
|
85
|
+
multiple: i.resourceConfig.multiple,
|
|
86
|
+
record: i.record,
|
|
87
|
+
role: i.resourceConfig.role,
|
|
88
|
+
quantityField: i.resourceConfig.quantityField,
|
|
89
|
+
containerRequired: i.resourceConfig.containerRequired,
|
|
90
|
+
bookingRequired: i.resourceConfig.bookingRequired
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
async function N() {
|
|
94
|
+
const r = u.value[0], t = g.value, e = ++p;
|
|
95
|
+
if (n.value = null, f.value = "", !(!r || !t?.getAvailability || i.resourceConfig.multiple)) {
|
|
96
|
+
C.value = !0;
|
|
97
|
+
try {
|
|
98
|
+
const y = await t.getAvailability(r, A());
|
|
99
|
+
e === p && (n.value = y);
|
|
100
|
+
} catch {
|
|
101
|
+
e === p && (f.value = i.messages.resourceRef.availabilityFailed);
|
|
102
|
+
} finally {
|
|
103
|
+
e === p && (C.value = !1);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
T(
|
|
108
|
+
() => [
|
|
109
|
+
u.value[0]?.id,
|
|
110
|
+
u.value[0]?.lot_id,
|
|
111
|
+
i.resourceResolvers
|
|
112
|
+
],
|
|
113
|
+
() => {
|
|
114
|
+
N();
|
|
115
|
+
},
|
|
116
|
+
{ immediate: !0 }
|
|
117
|
+
);
|
|
118
|
+
function m(r) {
|
|
119
|
+
const t = u.value[0];
|
|
120
|
+
t && v("change", { value: { ...t, ...r } });
|
|
121
|
+
}
|
|
122
|
+
async function M(r) {
|
|
123
|
+
const t = g.value;
|
|
124
|
+
if (i.resourceConfig.role !== "output" || !t?.prepareOutput)
|
|
125
|
+
return r;
|
|
126
|
+
const e = i.resourceConfig.multiple ? Array.isArray(r) ? r : [] : [r], y = [];
|
|
127
|
+
for (const I of e) {
|
|
128
|
+
const F = q(I);
|
|
129
|
+
if (!F) continue;
|
|
130
|
+
const V = await t.prepareOutput(F, A());
|
|
131
|
+
y.push({
|
|
132
|
+
...V.value,
|
|
133
|
+
prepared_output: V.payload
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
return i.resourceConfig.multiple ? y : y[0] ?? r;
|
|
137
|
+
}
|
|
138
|
+
async function O(r) {
|
|
139
|
+
const t = ++k;
|
|
140
|
+
f.value = "";
|
|
141
|
+
try {
|
|
142
|
+
const e = await M(r);
|
|
143
|
+
t === k && v("change", { value: e });
|
|
144
|
+
} catch {
|
|
145
|
+
t === k && (f.value = i.messages.resourceRef.prepareOutputFailed);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
function h(r) {
|
|
149
|
+
return r.id ?? `${r.starts_at}/${r.ends_at}`;
|
|
150
|
+
}
|
|
151
|
+
function E(r) {
|
|
152
|
+
const t = n.value?.equipment_slots?.find((e) => h(e) === r);
|
|
153
|
+
m({
|
|
154
|
+
booking_id: r || void 0,
|
|
155
|
+
snapshot: t ? { ...u.value[0]?.snapshot ?? {}, booking_slot: t } : u.value[0]?.snapshot
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
return (r, t) => (l(), a("span", K, [
|
|
159
|
+
z(j, {
|
|
160
|
+
node: s.node,
|
|
161
|
+
value: s.value,
|
|
162
|
+
disabled: s.disabled,
|
|
163
|
+
messages: s.messages,
|
|
164
|
+
"field-meta": s.fieldMeta,
|
|
165
|
+
type: s.type,
|
|
166
|
+
"entity-config": s.resourceConfig,
|
|
167
|
+
"entity-resolvers": w.value,
|
|
168
|
+
record: s.record,
|
|
169
|
+
onChange: t[0] || (t[0] = (e) => O(e.value)),
|
|
170
|
+
onBlur: t[1] || (t[1] = (e) => v("blur"))
|
|
171
|
+
}, null, 8, ["node", "value", "disabled", "messages", "field-meta", "type", "entity-config", "entity-resolvers", "record"]),
|
|
172
|
+
u.value.length === 1 && !s.resourceConfig.multiple ? (l(), a("span", P, [
|
|
173
|
+
C.value || n.value?.available !== void 0 ? (l(), a("span", G, o(s.messages.resourceRef.available) + ": " + o(C.value ? "…" : n.value?.available) + " " + o(n.value?.unit || ""), 1)) : c("", !0),
|
|
174
|
+
f.value ? (l(), a("span", H, o(f.value), 1)) : c("", !0),
|
|
175
|
+
n.value?.lots?.length ? (l(), a("label", J, [
|
|
176
|
+
d("span", null, o(s.messages.resourceRef.lot), 1),
|
|
177
|
+
d("select", {
|
|
178
|
+
disabled: s.disabled,
|
|
179
|
+
value: u.value[0].lot_id || "",
|
|
180
|
+
onChange: t[2] || (t[2] = (e) => m({ lot_id: e.target.value || void 0, container_id: void 0 })),
|
|
181
|
+
onBlur: t[3] || (t[3] = (e) => v("blur"))
|
|
182
|
+
}, [
|
|
183
|
+
d("option", U, o(s.messages.resourceRef.selectLot), 1),
|
|
184
|
+
(l(!0), a(b, null, $(n.value.lots, (e) => (l(), a("option", {
|
|
185
|
+
key: e.id,
|
|
186
|
+
value: e.id,
|
|
187
|
+
disabled: e.disabled
|
|
188
|
+
}, [
|
|
189
|
+
R(o(e.label || e.id) + " ", 1),
|
|
190
|
+
e.available !== void 0 ? (l(), a(b, { key: 0 }, [
|
|
191
|
+
R(" — " + o(e.available) + " " + o(e.unit || n.value.unit || ""), 1)
|
|
192
|
+
], 64)) : c("", !0)
|
|
193
|
+
], 8, W))), 128))
|
|
194
|
+
], 40, Q)
|
|
195
|
+
])) : c("", !0),
|
|
196
|
+
n.value?.containers?.length || s.resourceConfig.containerRequired ? (l(), a("label", X, [
|
|
197
|
+
d("span", null, o(s.messages.resourceRef.container), 1),
|
|
198
|
+
d("select", {
|
|
199
|
+
disabled: s.disabled,
|
|
200
|
+
value: u.value[0].container_id || "",
|
|
201
|
+
onChange: t[4] || (t[4] = (e) => m({ container_id: e.target.value || void 0 })),
|
|
202
|
+
onBlur: t[5] || (t[5] = (e) => v("blur"))
|
|
203
|
+
}, [
|
|
204
|
+
d("option", Z, o(s.messages.resourceRef.selectContainer), 1),
|
|
205
|
+
(l(!0), a(b, null, $(n.value?.containers || [], (e) => (l(), a("option", {
|
|
206
|
+
key: e.id,
|
|
207
|
+
value: e.id,
|
|
208
|
+
disabled: e.disabled || !!(u.value[0].lot_id && e.lot_id && e.lot_id !== u.value[0].lot_id)
|
|
209
|
+
}, [
|
|
210
|
+
R(o(e.label || e.id) + " ", 1),
|
|
211
|
+
e.location ? (l(), a(b, { key: 0 }, [
|
|
212
|
+
R(" — " + o(e.location), 1)
|
|
213
|
+
], 64)) : c("", !0)
|
|
214
|
+
], 8, ee))), 128))
|
|
215
|
+
], 40, Y)
|
|
216
|
+
])) : c("", !0),
|
|
217
|
+
s.resourceConfig.role === "input" || s.resourceConfig.role === "output" ? (l(), a("span", te, [
|
|
218
|
+
s.resourceConfig.quantityField ? c("", !0) : (l(), a("label", re, [
|
|
219
|
+
d("span", null, o(s.messages.resourceRef.quantity), 1),
|
|
220
|
+
d("input", {
|
|
221
|
+
type: "number",
|
|
222
|
+
min: "0",
|
|
223
|
+
step: "any",
|
|
224
|
+
disabled: s.disabled,
|
|
225
|
+
value: u.value[0].quantity ?? "",
|
|
226
|
+
onInput: t[6] || (t[6] = (e) => m({ quantity: e.target.value || void 0 })),
|
|
227
|
+
onBlur: t[7] || (t[7] = (e) => v("blur"))
|
|
228
|
+
}, null, 40, ie)
|
|
229
|
+
])),
|
|
230
|
+
d("label", se, [
|
|
231
|
+
d("span", null, o(s.messages.resourceRef.unit), 1),
|
|
232
|
+
d("input", {
|
|
233
|
+
type: "text",
|
|
234
|
+
disabled: s.disabled,
|
|
235
|
+
value: u.value[0].unit || n.value?.unit || "",
|
|
236
|
+
onInput: t[8] || (t[8] = (e) => m({ unit: e.target.value || void 0 })),
|
|
237
|
+
onBlur: t[9] || (t[9] = (e) => v("blur"))
|
|
238
|
+
}, null, 40, oe)
|
|
239
|
+
])
|
|
240
|
+
])) : c("", !0),
|
|
241
|
+
s.resourceConfig.quantityField ? (l(), a("span", le, o(s.messages.resourceRef.quantityFrom(s.resourceConfig.quantityField)), 1)) : c("", !0),
|
|
242
|
+
s.resourceConfig.role === "equipment" && (n.value?.equipment_slots?.length || s.resourceConfig.bookingRequired) ? (l(), a("label", ae, [
|
|
243
|
+
d("span", null, o(s.messages.resourceRef.booking), 1),
|
|
244
|
+
d("select", {
|
|
245
|
+
disabled: s.disabled,
|
|
246
|
+
value: u.value[0].booking_id || "",
|
|
247
|
+
onChange: t[10] || (t[10] = (e) => E(e.target.value)),
|
|
248
|
+
onBlur: t[11] || (t[11] = (e) => v("blur"))
|
|
249
|
+
}, [
|
|
250
|
+
d("option", ue, o(s.messages.resourceRef.selectBooking), 1),
|
|
251
|
+
(l(!0), a(b, null, $(n.value?.equipment_slots || [], (e) => (l(), a("option", {
|
|
252
|
+
key: h(e),
|
|
253
|
+
value: h(e),
|
|
254
|
+
disabled: e.available === !1
|
|
255
|
+
}, o(e.label || `${e.starts_at} – ${e.ends_at}`), 9, de))), 128))
|
|
256
|
+
], 40, ne)
|
|
257
|
+
])) : c("", !0)
|
|
258
|
+
])) : c("", !0)
|
|
259
|
+
]));
|
|
260
|
+
}
|
|
261
|
+
}), ye = /* @__PURE__ */ D(ce, [["__scopeId", "data-v-f84d7013"]]);
|
|
262
|
+
export {
|
|
263
|
+
ye as default
|
|
264
|
+
};
|