@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.
- package/README.md +13 -1
- package/README.zh-CN.md +13 -1
- package/dist/{AimdDnaSequenceField-Opgy07Gt.js → AimdDnaSequenceField-BHV1_c2o.js} +1 -1
- package/dist/{AimdEditor.vue_vue_type_style_index_0_lang-DHckC0bq.js → AimdEditor.vue_vue_type_style_index_0_lang-phvUVTHV.js} +643 -605
- package/dist/AimdEntityRefField-COzwbHwr.js +4 -0
- package/dist/{AimdEntityRefField-GA6-mhGU.js → AimdEntityRefField.vue_vue_type_script_setup_true_lang-BIvUuZFV.js} +2 -2
- package/dist/{AimdMarkdownField-jagZIbKc.js → AimdMarkdownField-t8hqazDv.js} +3 -3
- package/dist/{AimdMarkdownNoteField-BUq4fRcZ.js → AimdMarkdownNoteField-BGjkSXEY.js} +2 -2
- package/dist/AimdResourceRefField-BBaRSLcL.js +264 -0
- package/dist/aimd-recorder.css +1 -1
- package/dist/{arc-CR1cpc2k.js → arc-CsBMJYPv.js} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-B8OoiHF6.js → architectureDiagram-3BPJPVTR-BeKUSqHO.js} +2 -2
- package/dist/{blockDiagram-GPEHLZMM-Ddq40SrW.js → blockDiagram-GPEHLZMM-CJeAC_1p.js} +4 -4
- package/dist/{c4Diagram-AAUBKEIU-Cf3cjJMq.js → c4Diagram-AAUBKEIU-LoQMp4kW.js} +2 -2
- package/dist/{channel-C8Vd7nOK.js → channel-BoLQO6Dk.js} +1 -1
- package/dist/{chunk-2J33WTMH-Ck31ftjD.js → chunk-2J33WTMH-D1vw38h5.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BJOkbq4i.js → chunk-4BX2VUAB-BFSVnsyi.js} +1 -1
- package/dist/{chunk-55IACEB6-lNZxrJyO.js → chunk-55IACEB6-D13UaCP1.js} +1 -1
- package/dist/{chunk-727SXJPM-mEDRtdd4.js → chunk-727SXJPM-BCcz4POX.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-C1MU-m_K.js → chunk-AQP2D5EJ-DTOfpg2m.js} +3 -3
- package/dist/{chunk-FMBD7UC4-Pmfg_1nq.js → chunk-FMBD7UC4-XGRN-sFg.js} +1 -1
- package/dist/{chunk-ND2GUHAM-CipPchY0.js → chunk-ND2GUHAM-DSgp1I9F.js} +1 -1
- package/dist/{chunk-QZHKN3VN-BvE9EC7r.js → chunk-QZHKN3VN-DQl3-kKo.js} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-BM5OaktU.js → classDiagram-4FO5ZUOK-CI-4bhme.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-BM5OaktU.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-nmO7LFhz.js → cose-bilkent-S5V4N54A-CU1K-fx3.js} +1 -1
- package/dist/{dagre-BM42HDAG-D3xhjRxX.js → dagre-BM42HDAG-HIHsvvPF.js} +3 -3
- package/dist/{diagram-2AECGRRQ-kCJcuZOT.js → diagram-2AECGRRQ-XlYRVMia.js} +2 -2
- package/dist/{diagram-5GNKFQAL-Bdr1oGkv.js → diagram-5GNKFQAL-BeA9dVE2.js} +3 -3
- package/dist/{diagram-KO2AKTUF-CeBpcrbw.js → diagram-KO2AKTUF-D501LuyG.js} +2 -2
- package/dist/{diagram-LMA3HP47-C5oYYzCp.js → diagram-LMA3HP47-ClkmdOf_.js} +2 -2
- package/dist/{diagram-OG6HWLK6-CNzZuxZL.js → diagram-OG6HWLK6-30O5epks.js} +3 -3
- package/dist/{erDiagram-TEJ5UH35-MWNh4yWB.js → erDiagram-TEJ5UH35-Dk5azNFu.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-DcREbXha.js → flowDiagram-I6XJVG4X-C4K9bB2d.js} +6 -6
- package/dist/{ganttDiagram-6RSMTGT7-DGZUsfa4.js → ganttDiagram-6RSMTGT7-sFuSkRH3.js} +2 -2
- package/dist/{gitGraphDiagram-PVQCEYII-DhpcTOAS.js → gitGraphDiagram-PVQCEYII-CC4Kf_0S.js} +3 -3
- package/dist/{graph-CXU7Rv38.js → graph-BBr12s4M.js} +1 -1
- package/dist/index.js +124 -122
- package/dist/{infoDiagram-5YYISTIA-CVZBlZ8R.js → infoDiagram-5YYISTIA-PObcwLKW.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-Bjyc47Lv.js → ishikawaDiagram-YF4QCWOH-B93dpm60.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-e2G_PVGF.js → journeyDiagram-JHISSGLW-Z0_jIQ5z.js} +4 -4
- package/dist/{kanban-definition-UN3LZRKU-CKOBjcK9.js → kanban-definition-UN3LZRKU-BicW7pfZ.js} +2 -2
- package/dist/{layout-CBS27QDo.js → layout-jm5q2dTB.js} +2 -2
- package/dist/{linear-UyXZcrYY.js → linear-Bv4EbUf4.js} +1 -1
- package/dist/{mermaid.core-BeKK51C9.js → mermaid.core-BN0BM26i.js} +34 -34
- package/dist/{mindmap-definition-RKZ34NQL-T6_bnhal.js → mindmap-definition-RKZ34NQL-Ba85mo62.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-GGANuPvf.js → pieDiagram-4H26LBE5-CfU3ahlI.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-BAtVKEgW.js → quadrantDiagram-W4KKPZXB-BPTjR1PA.js} +2 -2
- package/dist/record.js +2 -2
- package/dist/{requirementDiagram-4Y6WPE33-C2oozBsJ.js → requirementDiagram-4Y6WPE33-DVfyUAUL.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-Bfc4Y-JM.js → sankeyDiagram-5OEKKPKP-B_9c0VJt.js} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-e9yMBU3K.js → sequenceDiagram-3UESZ5HK-BFSDCMig.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-D1vciiPs.js → stateDiagram-AJRCARHV-DNCya3UT.js} +4 -4
- package/dist/{stateDiagram-v2-BHNVJYJU-DMXm3rUm.js → stateDiagram-v2-BHNVJYJU-BlmsFnk2.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-Cg7TL_0Q.js → timeline-definition-PNZ67QCA-B297WQKg.js} +2 -2
- package/dist/{useFieldRendering-JFnqNEWH.js → useFieldRendering-DQN_MbSg.js} +1 -1
- package/dist/{useVarHelpers-CQQ-zhL0.js → useVarHelpers-D00Za8e6.js} +978 -932
- package/dist/validation-Dn_j1py1.js +5712 -0
- package/dist/{vennDiagram-CIIHVFJN-BEJdgPK5.js → vennDiagram-CIIHVFJN-gDmDgx6K.js} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-DLxpx6Lm.js → wardleyDiagram-YWT4CUSO-ek5B-FUl.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-CG-K6knD.js → xychartDiagram-2RQKCTM6-DRtlxacH.js} +2 -2
- package/package.json +4 -4
- package/src/__tests__/record-validation.test.ts +121 -0
- package/src/__tests__/required-marker.test.ts +14 -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 +87 -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 +41 -3
- package/src/components/index.ts +4 -0
- package/src/components/recorderMilkdownPlugin.ts +2 -0
- package/src/composables/__tests__/useVarHelpers.test.ts +96 -0
- package/src/composables/useVarHelpers.ts +91 -4
- package/src/index.ts +12 -1
- package/src/locales.ts +57 -0
- package/src/record/validation.ts +145 -11
- package/src/styles/recorder.css +8 -0
- package/src/types.ts +30 -1
- package/dist/validation-DSn_Ttx_.js +0 -5629
package/src/styles/recorder.css
CHANGED
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
justify-content: center;
|
|
132
132
|
min-width: 0.75rem;
|
|
133
133
|
margin-inline-start: 0.3rem;
|
|
134
|
+
margin-inline-end: 0.35rem;
|
|
134
135
|
color: var(--aimd-required-color, #d03050);
|
|
135
136
|
font-size: 1em;
|
|
136
137
|
font-weight: 800;
|
|
@@ -138,6 +139,13 @@
|
|
|
138
139
|
transform: translateY(-0.08em);
|
|
139
140
|
}
|
|
140
141
|
|
|
142
|
+
.aimd-field__title-row {
|
|
143
|
+
display: inline-flex;
|
|
144
|
+
align-items: baseline;
|
|
145
|
+
min-width: 0;
|
|
146
|
+
max-width: 100%;
|
|
147
|
+
}
|
|
148
|
+
|
|
141
149
|
.aimd-field--no-style.aimd-field__label .aimd-field__name--with-metadata {
|
|
142
150
|
align-items: flex-start;
|
|
143
151
|
justify-content: center;
|
package/src/types.ts
CHANGED
|
@@ -9,6 +9,18 @@ import type {
|
|
|
9
9
|
AimdVarTableNode,
|
|
10
10
|
} from "@airalogy/aimd-core/types"
|
|
11
11
|
import type { AimdRecorderMessages } from "./locales"
|
|
12
|
+
import type {
|
|
13
|
+
AimdEquipmentSlotOption as CoreAimdEquipmentSlotOption,
|
|
14
|
+
AimdPreparedResourceOutput as CoreAimdPreparedResourceOutput,
|
|
15
|
+
AimdResourceAvailability as CoreAimdResourceAvailability,
|
|
16
|
+
AimdResourceContainerOption as CoreAimdResourceContainerOption,
|
|
17
|
+
AimdResourceLotOption as CoreAimdResourceLotOption,
|
|
18
|
+
AimdResourceRefOption as CoreAimdResourceRefOption,
|
|
19
|
+
AimdResourceRefValue as CoreAimdResourceRefValue,
|
|
20
|
+
AimdResourceResolveContext as CoreAimdResourceResolveContext,
|
|
21
|
+
AimdResourceResolver as CoreAimdResourceResolver,
|
|
22
|
+
AimdResourceResolverMap as CoreAimdResourceResolverMap,
|
|
23
|
+
} from "@airalogy/aimd-core"
|
|
12
24
|
|
|
13
25
|
export interface AimdStepOrCheckRecordItem {
|
|
14
26
|
checked: boolean
|
|
@@ -158,6 +170,17 @@ export interface AimdEntityResolver {
|
|
|
158
170
|
export type AimdEntityResolverEntry = AimdEntityResolver | AimdEntitySearchHandler
|
|
159
171
|
export type AimdEntityResolverMap = Record<string, AimdEntityResolverEntry>
|
|
160
172
|
|
|
173
|
+
export type AimdResourceRefValue = CoreAimdResourceRefValue
|
|
174
|
+
export type AimdResourceRefOption = CoreAimdResourceRefOption
|
|
175
|
+
export type AimdResourceLotOption = CoreAimdResourceLotOption
|
|
176
|
+
export type AimdResourceContainerOption = CoreAimdResourceContainerOption
|
|
177
|
+
export type AimdEquipmentSlotOption = CoreAimdEquipmentSlotOption
|
|
178
|
+
export type AimdResourceAvailability = CoreAimdResourceAvailability
|
|
179
|
+
export type AimdPreparedResourceOutput = CoreAimdPreparedResourceOutput
|
|
180
|
+
export type AimdResourceResolveContext = CoreAimdResourceResolveContext
|
|
181
|
+
export type AimdResourceResolver = CoreAimdResourceResolver
|
|
182
|
+
export type AimdResourceResolverMap = CoreAimdResourceResolverMap
|
|
183
|
+
|
|
161
184
|
export type AimdCollectorRuntimeStatus =
|
|
162
185
|
| "idle"
|
|
163
186
|
| "waiting_for_permission"
|
|
@@ -235,7 +258,7 @@ export type AimdCollectorPermissionHandler = (
|
|
|
235
258
|
request: AimdCollectorPermissionRequest,
|
|
236
259
|
) => AimdCollectorPermissionDecision | Promise<AimdCollectorPermissionDecision>
|
|
237
260
|
|
|
238
|
-
export type AimdVarInputKind = "text" | "number" | "checkbox" | "boolean-select" | "textarea" | "scalar-list" | "entity-ref" | "date" | "datetime" | "time" | "dna" | "code" | "file"
|
|
261
|
+
export type AimdVarInputKind = "text" | "number" | "checkbox" | "boolean-select" | "textarea" | "scalar-list" | "entity-ref" | "resource-ref" | "date" | "datetime" | "time" | "dna" | "code" | "file"
|
|
239
262
|
export type AimdStepDetailDisplay = "auto" | "always"
|
|
240
263
|
export type AimdChoiceOptionExplanationMode = "hidden" | "selected" | "submitted" | "graded"
|
|
241
264
|
export type AimdScaleGradeDisplayMode = "hidden" | "completed" | "submitted" | "graded"
|
|
@@ -271,6 +294,10 @@ export interface AimdFieldMeta {
|
|
|
271
294
|
accept?: string // native file input accept string for file-like vars
|
|
272
295
|
entity?: string // entity namespace for EntityRef fields
|
|
273
296
|
source?: string // connector id/source for EntityRef fields
|
|
297
|
+
resource_role?: "input" | "output" | "reference" | "equipment"
|
|
298
|
+
quantity_field?: string
|
|
299
|
+
container_required?: boolean
|
|
300
|
+
booking_required?: boolean
|
|
274
301
|
assigner?: { mode: AimdAssignerMode }
|
|
275
302
|
}
|
|
276
303
|
|
|
@@ -289,6 +316,7 @@ export type AimdRecorderValidationCode =
|
|
|
289
316
|
| "numeric"
|
|
290
317
|
| "type"
|
|
291
318
|
| "format"
|
|
319
|
+
| "resource"
|
|
292
320
|
| "schema"
|
|
293
321
|
|
|
294
322
|
export type AimdRecorderValidationTrigger = "change" | "blur" | "submit"
|
|
@@ -448,6 +476,7 @@ export interface AimdTypePluginRenderContext extends AimdTypePluginValueContext
|
|
|
448
476
|
resolveFile?: (src: string) => string | null
|
|
449
477
|
resolveFileInfo?: AimdFileInfoResolver
|
|
450
478
|
entityResolvers?: AimdEntityResolverMap
|
|
479
|
+
resourceResolvers?: AimdResourceResolverMap
|
|
451
480
|
emitChange: (value: unknown) => void
|
|
452
481
|
emitBlur: () => void
|
|
453
482
|
}
|