@airalogy/aimd-recorder 1.24.4 → 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.
Files changed (86) hide show
  1. package/README.md +13 -1
  2. package/README.zh-CN.md +13 -1
  3. package/dist/{AimdDnaSequenceField-Opgy07Gt.js → AimdDnaSequenceField-BHV1_c2o.js} +1 -1
  4. package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-DHckC0bq.js → AimdEditor.vue_vue_type_style_index_0_lang-phvUVTHV.js} +643 -605
  5. package/dist/AimdEntityRefField-COzwbHwr.js +4 -0
  6. package/dist/{AimdEntityRefField-GA6-mhGU.js → AimdEntityRefField.vue_vue_type_script_setup_true_lang-BIvUuZFV.js} +2 -2
  7. package/dist/{AimdMarkdownField-jagZIbKc.js → AimdMarkdownField-t8hqazDv.js} +3 -3
  8. package/dist/{AimdMarkdownNoteField-BUq4fRcZ.js → AimdMarkdownNoteField-BGjkSXEY.js} +2 -2
  9. package/dist/AimdResourceRefField-BBaRSLcL.js +264 -0
  10. package/dist/aimd-recorder.css +1 -1
  11. package/dist/{arc-CR1cpc2k.js → arc-CsBMJYPv.js} +1 -1
  12. package/dist/{architectureDiagram-3BPJPVTR-B8OoiHF6.js → architectureDiagram-3BPJPVTR-BeKUSqHO.js} +2 -2
  13. package/dist/{blockDiagram-GPEHLZMM-Ddq40SrW.js → blockDiagram-GPEHLZMM-CJeAC_1p.js} +4 -4
  14. package/dist/{c4Diagram-AAUBKEIU-Cf3cjJMq.js → c4Diagram-AAUBKEIU-LoQMp4kW.js} +2 -2
  15. package/dist/{channel-C8Vd7nOK.js → channel-BoLQO6Dk.js} +1 -1
  16. package/dist/{chunk-2J33WTMH-Ck31ftjD.js → chunk-2J33WTMH-D1vw38h5.js} +1 -1
  17. package/dist/{chunk-4BX2VUAB-BJOkbq4i.js → chunk-4BX2VUAB-BFSVnsyi.js} +1 -1
  18. package/dist/{chunk-55IACEB6-lNZxrJyO.js → chunk-55IACEB6-D13UaCP1.js} +1 -1
  19. package/dist/{chunk-727SXJPM-mEDRtdd4.js → chunk-727SXJPM-BCcz4POX.js} +5 -5
  20. package/dist/{chunk-AQP2D5EJ-C1MU-m_K.js → chunk-AQP2D5EJ-DTOfpg2m.js} +3 -3
  21. package/dist/{chunk-FMBD7UC4-Pmfg_1nq.js → chunk-FMBD7UC4-XGRN-sFg.js} +1 -1
  22. package/dist/{chunk-ND2GUHAM-CipPchY0.js → chunk-ND2GUHAM-DSgp1I9F.js} +1 -1
  23. package/dist/{chunk-QZHKN3VN-BvE9EC7r.js → chunk-QZHKN3VN-DQl3-kKo.js} +1 -1
  24. package/dist/{classDiagram-v2-Q7XG4LA2-BM5OaktU.js → classDiagram-4FO5ZUOK-CI-4bhme.js} +2 -2
  25. package/dist/{classDiagram-4FO5ZUOK-BM5OaktU.js → classDiagram-v2-Q7XG4LA2-CI-4bhme.js} +2 -2
  26. package/dist/components.js +2222 -2110
  27. package/dist/composables.js +2 -2
  28. package/dist/{cose-bilkent-S5V4N54A-nmO7LFhz.js → cose-bilkent-S5V4N54A-CU1K-fx3.js} +1 -1
  29. package/dist/{dagre-BM42HDAG-D3xhjRxX.js → dagre-BM42HDAG-HIHsvvPF.js} +3 -3
  30. package/dist/{diagram-2AECGRRQ-kCJcuZOT.js → diagram-2AECGRRQ-XlYRVMia.js} +2 -2
  31. package/dist/{diagram-5GNKFQAL-Bdr1oGkv.js → diagram-5GNKFQAL-BeA9dVE2.js} +3 -3
  32. package/dist/{diagram-KO2AKTUF-CeBpcrbw.js → diagram-KO2AKTUF-D501LuyG.js} +2 -2
  33. package/dist/{diagram-LMA3HP47-C5oYYzCp.js → diagram-LMA3HP47-ClkmdOf_.js} +2 -2
  34. package/dist/{diagram-OG6HWLK6-CNzZuxZL.js → diagram-OG6HWLK6-30O5epks.js} +3 -3
  35. package/dist/{erDiagram-TEJ5UH35-MWNh4yWB.js → erDiagram-TEJ5UH35-Dk5azNFu.js} +4 -4
  36. package/dist/{flowDiagram-I6XJVG4X-DcREbXha.js → flowDiagram-I6XJVG4X-C4K9bB2d.js} +6 -6
  37. package/dist/{ganttDiagram-6RSMTGT7-DGZUsfa4.js → ganttDiagram-6RSMTGT7-sFuSkRH3.js} +2 -2
  38. package/dist/{gitGraphDiagram-PVQCEYII-DhpcTOAS.js → gitGraphDiagram-PVQCEYII-CC4Kf_0S.js} +3 -3
  39. package/dist/{graph-CXU7Rv38.js → graph-BBr12s4M.js} +1 -1
  40. package/dist/index.js +124 -122
  41. package/dist/{infoDiagram-5YYISTIA-CVZBlZ8R.js → infoDiagram-5YYISTIA-PObcwLKW.js} +1 -1
  42. package/dist/{ishikawaDiagram-YF4QCWOH-Bjyc47Lv.js → ishikawaDiagram-YF4QCWOH-B93dpm60.js} +1 -1
  43. package/dist/{journeyDiagram-JHISSGLW-e2G_PVGF.js → journeyDiagram-JHISSGLW-Z0_jIQ5z.js} +4 -4
  44. package/dist/{kanban-definition-UN3LZRKU-CKOBjcK9.js → kanban-definition-UN3LZRKU-BicW7pfZ.js} +2 -2
  45. package/dist/{layout-CBS27QDo.js → layout-jm5q2dTB.js} +2 -2
  46. package/dist/{linear-UyXZcrYY.js → linear-Bv4EbUf4.js} +1 -1
  47. package/dist/{mermaid.core-BeKK51C9.js → mermaid.core-BN0BM26i.js} +34 -34
  48. package/dist/{mindmap-definition-RKZ34NQL-T6_bnhal.js → mindmap-definition-RKZ34NQL-Ba85mo62.js} +3 -3
  49. package/dist/{pieDiagram-4H26LBE5-GGANuPvf.js → pieDiagram-4H26LBE5-CfU3ahlI.js} +3 -3
  50. package/dist/{quadrantDiagram-W4KKPZXB-BAtVKEgW.js → quadrantDiagram-W4KKPZXB-BPTjR1PA.js} +2 -2
  51. package/dist/record.js +2 -2
  52. package/dist/{requirementDiagram-4Y6WPE33-C2oozBsJ.js → requirementDiagram-4Y6WPE33-DVfyUAUL.js} +3 -3
  53. package/dist/{sankeyDiagram-5OEKKPKP-Bfc4Y-JM.js → sankeyDiagram-5OEKKPKP-B_9c0VJt.js} +1 -1
  54. package/dist/{sequenceDiagram-3UESZ5HK-e9yMBU3K.js → sequenceDiagram-3UESZ5HK-BFSDCMig.js} +3 -3
  55. package/dist/{stateDiagram-AJRCARHV-D1vciiPs.js → stateDiagram-AJRCARHV-DNCya3UT.js} +4 -4
  56. package/dist/{stateDiagram-v2-BHNVJYJU-DMXm3rUm.js → stateDiagram-v2-BHNVJYJU-BlmsFnk2.js} +2 -2
  57. package/dist/{timeline-definition-PNZ67QCA-Cg7TL_0Q.js → timeline-definition-PNZ67QCA-B297WQKg.js} +2 -2
  58. package/dist/{useFieldRendering-JFnqNEWH.js → useFieldRendering-DQN_MbSg.js} +1 -1
  59. package/dist/{useVarHelpers-CQQ-zhL0.js → useVarHelpers-D00Za8e6.js} +978 -932
  60. package/dist/validation-Dn_j1py1.js +5712 -0
  61. package/dist/{vennDiagram-CIIHVFJN-BEJdgPK5.js → vennDiagram-CIIHVFJN-gDmDgx6K.js} +1 -1
  62. package/dist/{wardleyDiagram-YWT4CUSO-DLxpx6Lm.js → wardleyDiagram-YWT4CUSO-ek5B-FUl.js} +2 -2
  63. package/dist/{xychartDiagram-2RQKCTM6-CG-K6knD.js → xychartDiagram-2RQKCTM6-DRtlxacH.js} +2 -2
  64. package/package.json +4 -4
  65. package/src/__tests__/record-validation.test.ts +121 -0
  66. package/src/__tests__/required-marker.test.ts +14 -0
  67. package/src/__tests__/resource-form.test.ts +20 -0
  68. package/src/__tests__/resource-ref-field.test.ts +125 -0
  69. package/src/__tests__/var-field-render.test.ts +87 -1
  70. package/src/components/AimdRecorder.vue +11 -1
  71. package/src/components/AimdRecorderEditor.vue +5 -0
  72. package/src/components/AimdRecorderWysiwygFieldHost.vue +1 -0
  73. package/src/components/AimdRecorderWysiwygSurface.vue +5 -0
  74. package/src/components/AimdResourceForm.vue +129 -0
  75. package/src/components/AimdResourceRefField.vue +393 -0
  76. package/src/components/AimdVarField.vue +41 -3
  77. package/src/components/index.ts +4 -0
  78. package/src/components/recorderMilkdownPlugin.ts +2 -0
  79. package/src/composables/__tests__/useVarHelpers.test.ts +96 -0
  80. package/src/composables/useVarHelpers.ts +91 -4
  81. package/src/index.ts +12 -1
  82. package/src/locales.ts +57 -0
  83. package/src/record/validation.ts +145 -11
  84. package/src/styles/recorder.css +8 -0
  85. package/src/types.ts +30 -1
  86. package/dist/validation-DSn_Ttx_.js +0 -5629
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "./AimdEntityRefField.vue_vue_type_script_setup_true_lang-BIvUuZFV.js";
2
+ export {
3
+ f as default
4
+ };
@@ -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-CQQ-zhL0.js";
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 default
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-DHckC0bq.js";
3
- import "./useVarHelpers-CQQ-zhL0.js";
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-BeKK51C9.js").then((te) => te.bm)).default;
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-DHckC0bq.js";
3
- import "./useVarHelpers-CQQ-zhL0.js";
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
+ };