@acorex-platform/module-assessment-management-client 0.0.20

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 (35) hide show
  1. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-jljmsqNu.mjs +10593 -0
  2. package/fesm2022/acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-jljmsqNu.mjs.map +1 -0
  3. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-case-status.provider-i48XDX-I.mjs +83 -0
  4. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-case-status.provider-i48XDX-I.mjs.map +1 -0
  5. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs +124 -0
  6. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-answers-view.util-42ZcOY2C.mjs.map +1 -0
  7. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-status.provider-Bk9hHj5V.mjs +97 -0
  8. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-session-status.provider-Bk9hHj5V.mjs.map +1 -0
  9. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-voice.commands-CduVfWQ-.mjs +134 -0
  10. package/fesm2022/acorex-platform-module-assessment-management-client-assessment-voice.commands-CduVfWQ-.mjs.map +1 -0
  11. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs +1171 -0
  12. package/fesm2022/acorex-platform-module-assessment-management-client-contracts.mjs.map +1 -0
  13. package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-VF80DWQf.mjs +270 -0
  14. package/fesm2022/acorex-platform-module-assessment-management-client-fill-assessment-session.command-VF80DWQf.mjs.map +1 -0
  15. package/fesm2022/acorex-platform-module-assessment-management-client-list-question-difficulty-options.query-h3xT-MNd.mjs +59 -0
  16. package/fesm2022/acorex-platform-module-assessment-management-client-list-question-difficulty-options.query-h3xT-MNd.mjs.map +1 -0
  17. package/fesm2022/acorex-platform-module-assessment-management-client-preview-question.command-C1ODQxDn.mjs +123 -0
  18. package/fesm2022/acorex-platform-module-assessment-management-client-preview-question.command-C1ODQxDn.mjs.map +1 -0
  19. package/fesm2022/acorex-platform-module-assessment-management-client-preview-questionnaire.command-DBm7ve4w.mjs +165 -0
  20. package/fesm2022/acorex-platform-module-assessment-management-client-preview-questionnaire.command-DBm7ve4w.mjs.map +1 -0
  21. package/fesm2022/acorex-platform-module-assessment-management-client-preview-session-pdf.command-BsiJU6ep.mjs +178 -0
  22. package/fesm2022/acorex-platform-module-assessment-management-client-preview-session-pdf.command-BsiJU6ep.mjs.map +1 -0
  23. package/fesm2022/acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs +489 -0
  24. package/fesm2022/acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs.map +1 -0
  25. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Djcfg0dv.mjs +609 -0
  26. package/fesm2022/acorex-platform-module-assessment-management-client-questionnaire-viewer-popup.component-Djcfg0dv.mjs.map +1 -0
  27. package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-CZ96KQ-l.mjs +228 -0
  28. package/fesm2022/acorex-platform-module-assessment-management-client-review-assessment-session.command-CZ96KQ-l.mjs.map +1 -0
  29. package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-CCzJoJ4p.mjs +280 -0
  30. package/fesm2022/acorex-platform-module-assessment-management-client-view-session-answers.command-CCzJoJ4p.mjs.map +1 -0
  31. package/fesm2022/acorex-platform-module-assessment-management-client.mjs +2 -0
  32. package/fesm2022/acorex-platform-module-assessment-management-client.mjs.map +1 -0
  33. package/package.json +28 -0
  34. package/types/acorex-platform-module-assessment-management-client-contracts.d.ts +752 -0
  35. package/types/acorex-platform-module-assessment-management-client.d.ts +1279 -0
@@ -0,0 +1,489 @@
1
+ import { RootConfig } from '@acorex-platform/module-data-management-client/contracts';
2
+ import { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';
3
+ import { AXToastService } from '@acorex/components/toast';
4
+ import * as i1 from '@acorex/components/button';
5
+ import { AXButtonModule } from '@acorex/components/button';
6
+ import * as i4 from '@acorex/core/translation';
7
+ import { AXTranslationService, AXTranslationModule } from '@acorex/core/translation';
8
+ import { AXMetaDataConfiguratorComponent } from '@acorex-platform/module-data-management-client';
9
+ import { AXPWidgetFieldConfiguratorComponent } from '@acorex-platform/framework-client/layout/components';
10
+ import { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';
11
+ import { AsyncPipe } from '@angular/common';
12
+ import * as i0 from '@angular/core';
13
+ import { inject, computed, signal, model, effect, untracked, ChangeDetectionStrategy, Component } from '@angular/core';
14
+ import { isEqual } from 'lodash';
15
+ import { s as stripQuestionBankInterfaceMetadata, r as resolveWidgetNodeFromMetaDataDefinitionInterface } from './acorex-platform-module-assessment-management-client-acorex-platform-module-assessment-management-client-jljmsqNu.mjs';
16
+ import * as i2 from '@acorex/components/decorators';
17
+ import { AXDecoratorModule } from '@acorex/components/decorators';
18
+
19
+ //#endregion
20
+ //#region ---- Helpers ----
21
+ function hasMetadataProvenance(v) {
22
+ const id = v?.metadata?.id;
23
+ return id != null && String(id).trim() !== '';
24
+ }
25
+ function hasConfiguredWidget(v) {
26
+ const w = stripQuestionBankInterfaceMetadata(v ?? undefined);
27
+ const t = w?.type;
28
+ return typeof t === 'string' && t.trim() !== '';
29
+ }
30
+ //#endregion
31
+ //#region ---- Component ----
32
+ class AXMQuestionBankInterfaceEditorWidgetEditComponent extends AXPValueWidgetComponent {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.entityService = inject(AXPEntityService);
36
+ //#region ---- Services ----
37
+ this.translate = inject(AXTranslationService);
38
+ this.toast = inject(AXToastService);
39
+ this.metaDataDefinitionService = this.entityService
40
+ .withEntity(RootConfig.module.name, RootConfig.entities.metaDataDefinition.name)
41
+ .data();
42
+ //#endregion
43
+ //#region ---- Computed ----
44
+ this.readonly = computed(() => this.options()['readonly'], /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
46
+ this.fieldName = computed(() => {
47
+ const fieldNameValue = this.options()['fieldName'];
48
+ if (fieldNameValue !== undefined && fieldNameValue !== null) {
49
+ const stringValue = String(fieldNameValue).trim();
50
+ return stringValue || 'field';
51
+ }
52
+ return 'field';
53
+ }, /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "fieldName" }] : /* istanbul ignore next */ []));
55
+ this.fieldTitle = computed(() => {
56
+ const fieldTitleValue = this.options()['fieldTitle'];
57
+ if (fieldTitleValue === undefined || fieldTitleValue === null) {
58
+ return '';
59
+ }
60
+ if (typeof fieldTitleValue === 'object' &&
61
+ !Array.isArray(fieldTitleValue)) {
62
+ return fieldTitleValue;
63
+ }
64
+ const stringValue = String(fieldTitleValue).trim();
65
+ return stringValue;
66
+ }, /* @ts-ignore */
67
+ ...(ngDevMode ? [{ debugName: "fieldTitle" }] : /* istanbul ignore next */ []));
68
+ this.label = computed(() => this.options()['label'] || 'Widget Type', /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
70
+ this.metaDataConfiguratorLabel = computed(() => this.options()['metaDataConfiguratorLabel'] ||
71
+ '@assessment-management:question-bank.entities.question-bank-item.fields.interface.meta-data-configurator-label', /* @ts-ignore */
72
+ ...(ngDevMode ? [{ debugName: "metaDataConfiguratorLabel" }] : /* istanbul ignore next */ []));
73
+ /** No widget type and no metadata definition binding — user must pick a configuration path. */
74
+ this.interfaceIsUnset = computed(() => {
75
+ const v = this.getValue();
76
+ return !hasMetadataProvenance(v) && !hasConfiguredWidget(v);
77
+ }, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "interfaceIsUnset" }] : /* istanbul ignore next */ []));
79
+ /** Widget-only path after save, or after the user chose “Widget” on an empty interface. */
80
+ this.showWidgetEditor = computed(() => {
81
+ const v = this.getValue();
82
+ if (hasMetadataProvenance(v)) {
83
+ return false;
84
+ }
85
+ if (hasConfiguredWidget(v)) {
86
+ return true;
87
+ }
88
+ return this.emptyFlowChoice() === 'widget';
89
+ }, /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "showWidgetEditor" }] : /* istanbul ignore next */ []));
91
+ /** Meta-data definition path after save, or after the user chose “MetaData definition” on an empty interface. */
92
+ this.showMetaDataEditor = computed(() => {
93
+ const v = this.getValue();
94
+ if (hasMetadataProvenance(v)) {
95
+ return true;
96
+ }
97
+ if (!this.interfaceIsUnset()) {
98
+ return false;
99
+ }
100
+ return this.emptyFlowChoice() === 'metadata';
101
+ }, /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "showMetaDataEditor" }] : /* istanbul ignore next */ []));
103
+ this.showSourceChoice = computed(() => this.interfaceIsUnset() &&
104
+ this.emptyFlowChoice() === null &&
105
+ !this.readonly(), /* @ts-ignore */
106
+ ...(ngDevMode ? [{ debugName: "showSourceChoice" }] : /* istanbul ignore next */ []));
107
+ this.showReadonlyEmpty = computed(() => this.interfaceIsUnset() &&
108
+ this.emptyFlowChoice() === null &&
109
+ this.readonly(), /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "showReadonlyEmpty" }] : /* istanbul ignore next */ []));
111
+ //#endregion
112
+ //#region ---- State ----
113
+ this.isInitialized = signal(false, /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "isInitialized" }] : /* istanbul ignore next */ []));
115
+ /** Set only while {@link interfaceIsUnset}; cleared once the value has a widget or metadata. */
116
+ this.emptyFlowChoice = signal(null, /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "emptyFlowChoice" }] : /* istanbul ignore next */ []));
118
+ this.definitionIdModel = model('', /* @ts-ignore */
119
+ ...(ngDevMode ? [{ debugName: "definitionIdModel" }] : /* istanbul ignore next */ []));
120
+ this.widgetConfigModel = model({ type: '', options: {} }, /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "widgetConfigModel" }] : /* istanbul ignore next */ []));
122
+ //#endregion
123
+ //#region ---- Sync value ↔ configurator (preserve sibling metadata) ----
124
+ this.syncValueToConfigurator = effect(() => {
125
+ const value = this.getValue();
126
+ const widgetOnly = stripQuestionBankInterfaceMetadata(value ?? undefined);
127
+ if (widgetOnly && widgetOnly.type) {
128
+ const currentModel = untracked(() => this.widgetConfigModel());
129
+ if (!isEqual(widgetOnly, currentModel)) {
130
+ untracked(() => {
131
+ this.widgetConfigModel.set(widgetOnly);
132
+ this.isInitialized.set(true);
133
+ });
134
+ }
135
+ }
136
+ else {
137
+ untracked(() => {
138
+ if (!this.isInitialized()) {
139
+ this.isInitialized.set(true);
140
+ }
141
+ });
142
+ }
143
+ }, /* @ts-ignore */
144
+ ...(ngDevMode ? [{ debugName: "syncValueToConfigurator" }] : /* istanbul ignore next */ []));
145
+ this.clearEmptyFlowWhenConfigured = effect(() => {
146
+ if (untracked(() => this.interfaceIsUnset())) {
147
+ return;
148
+ }
149
+ untracked(() => {
150
+ if (this.emptyFlowChoice() !== null) {
151
+ this.emptyFlowChoice.set(null);
152
+ }
153
+ });
154
+ }, /* @ts-ignore */
155
+ ...(ngDevMode ? [{ debugName: "clearEmptyFlowWhenConfigured" }] : /* istanbul ignore next */ []));
156
+ this.syncConfiguratorToValue = effect(() => {
157
+ const modelValue = this.widgetConfigModel();
158
+ if (!untracked(() => this.isInitialized())) {
159
+ return;
160
+ }
161
+ if (!modelValue || !modelValue.type) {
162
+ return;
163
+ }
164
+ const full = untracked(() => this.getValue());
165
+ const metadata = (full &&
166
+ typeof full === 'object' &&
167
+ full.metadata) ||
168
+ undefined;
169
+ const next = metadata
170
+ ? { ...modelValue, metadata }
171
+ : modelValue;
172
+ const currentFlat = untracked(() => this.getValue());
173
+ if (!isEqual(next, currentFlat)) {
174
+ untracked(() => {
175
+ this.setValue(next);
176
+ });
177
+ }
178
+ }, /* @ts-ignore */
179
+ ...(ngDevMode ? [{ debugName: "syncConfiguratorToValue" }] : /* istanbul ignore next */ []));
180
+ this.syncDefinitionIdFromValue = effect(() => {
181
+ const value = this.getValue();
182
+ const metaId = value?.metadata?.id;
183
+ if (metaId != null && String(metaId) !== '') {
184
+ const sid = String(metaId);
185
+ if (untracked(() => this.definitionIdModel()) !== sid) {
186
+ untracked(() => this.definitionIdModel.set(sid));
187
+ }
188
+ }
189
+ }, /* @ts-ignore */
190
+ ...(ngDevMode ? [{ debugName: "syncDefinitionIdFromValue" }] : /* istanbul ignore next */ []));
191
+ //#endregion
192
+ //#region ---- Meta-data definition selection ----
193
+ /** True while the meta-data configurator should be active (saved provenance or empty-flow metadata path). */
194
+ this.metadataFlowActive = computed(() => {
195
+ const v = this.getValue();
196
+ if (hasMetadataProvenance(v)) {
197
+ return true;
198
+ }
199
+ if (!this.interfaceIsUnset()) {
200
+ return false;
201
+ }
202
+ return this.emptyFlowChoice() === 'metadata';
203
+ }, /* @ts-ignore */
204
+ ...(ngDevMode ? [{ debugName: "metadataFlowActive" }] : /* istanbul ignore next */ []));
205
+ this.applyMetadataDefinitionSelection = effect(() => {
206
+ if (!this.metadataFlowActive()) {
207
+ return;
208
+ }
209
+ if (!untracked(() => this.isInitialized())) {
210
+ return;
211
+ }
212
+ const id = this.definitionIdModel();
213
+ if (!id?.trim()) {
214
+ return;
215
+ }
216
+ const current = untracked(() => this.getValue());
217
+ if (current?.metadata?.id === id) {
218
+ const stripped = stripQuestionBankInterfaceMetadata(current);
219
+ if (stripped?.type) {
220
+ return;
221
+ }
222
+ }
223
+ if (this.readonly()) {
224
+ return;
225
+ }
226
+ void this.loadAndApplyMetadataDefinition(id);
227
+ }, /* @ts-ignore */
228
+ ...(ngDevMode ? [{ debugName: "applyMetadataDefinitionSelection" }] : /* istanbul ignore next */ []));
229
+ }
230
+ //#endregion
231
+ //#region ---- Empty flow ----
232
+ chooseWidgetSource() {
233
+ if (this.readonly()) {
234
+ return;
235
+ }
236
+ this.emptyFlowChoice.set('widget');
237
+ }
238
+ chooseMetadataSource() {
239
+ if (this.readonly()) {
240
+ return;
241
+ }
242
+ this.emptyFlowChoice.set('metadata');
243
+ }
244
+ /** Clears both widget config and metadata provenance, then returns to source chooser. */
245
+ clearInterfaceConfiguration() {
246
+ if (this.readonly()) {
247
+ return;
248
+ }
249
+ untracked(() => {
250
+ this.widgetConfigModel.set({ type: '', options: {} });
251
+ this.definitionIdModel.set('');
252
+ this.emptyFlowChoice.set(null);
253
+ this.setValue(null);
254
+ });
255
+ }
256
+ async loadAndApplyMetadataDefinition(id) {
257
+ try {
258
+ const row = await this.metaDataDefinitionService.byKey(id);
259
+ const resolved = await resolveWidgetNodeFromMetaDataDefinitionInterface(row.interface);
260
+ if (!resolved?.type) {
261
+ this.toast.danger((await this.translate.translateAsync('@assessment-management:question-bank.entities.question-bank-item.fields.interface.load-from-metadata-invalid')) ??
262
+ 'The selected metadata definition has no valid widget interface.');
263
+ return;
264
+ }
265
+ const titleRaw = row.title;
266
+ const metadata = {
267
+ id: String(row.id ?? ''),
268
+ name: String(row.name ?? ''),
269
+ title: (typeof titleRaw === 'object' && titleRaw !== null
270
+ ? titleRaw
271
+ : String(titleRaw ?? '')),
272
+ version: 0,
273
+ };
274
+ const next = {
275
+ ...resolved,
276
+ metadata,
277
+ };
278
+ untracked(() => {
279
+ this.setValue(next);
280
+ this.widgetConfigModel.set(resolved);
281
+ });
282
+ }
283
+ catch (err) {
284
+ console.error('[QuestionBankInterfaceEditor] metadata definition load failed', err);
285
+ this.toast.danger((await this.translate.translateAsync('@assessment-management:question-bank.entities.question-bank-item.fields.interface.load-from-metadata-failed')) ?? 'Could not load metadata definitions.');
286
+ }
287
+ }
288
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMQuestionBankInterfaceEditorWidgetEditComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
289
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXMQuestionBankInterfaceEditorWidgetEditComponent, isStandalone: true, selector: "axm-question-bank-interface-editor-widget-edit", inputs: { definitionIdModel: { classPropertyName: "definitionIdModel", publicName: "definitionIdModel", isSignal: true, isRequired: false, transformFunction: null }, widgetConfigModel: { classPropertyName: "widgetConfigModel", publicName: "widgetConfigModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { definitionIdModel: "definitionIdModelChange", widgetConfigModel: "widgetConfigModelChange" }, usesInheritance: true, ngImport: i0, template: `
290
+ <div class="flex flex-col gap-1">
291
+ @if (isInitialized()) {
292
+ @if (showSourceChoice()) {
293
+ <div class="flex flex-col gap-3">
294
+ <p class="text-sm text-neutral-700">
295
+ {{
296
+ '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.prompt'
297
+ | translate
298
+ | async
299
+ }}
300
+ </p>
301
+ <div class="flex w-full gap-2">
302
+ <ax-button
303
+ class="flex-1"
304
+ type="button"
305
+ look="twotone"
306
+ color="primary"
307
+ [disabled]="readonly()"
308
+ [text]="
309
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-widget'
310
+ | translate
311
+ | async)!
312
+ "
313
+ (onClick)="chooseWidgetSource()"
314
+ >
315
+ <ax-icon icon="fa-solid fa-puzzle-piece"></ax-icon>
316
+ </ax-button>
317
+ <ax-button
318
+ class="flex-1"
319
+ type="button"
320
+ look="twotone"
321
+ color="secondary"
322
+ [disabled]="readonly()"
323
+ [text]="
324
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-meta-data'
325
+ | translate
326
+ | async)!
327
+ "
328
+ (onClick)="chooseMetadataSource()"
329
+ >
330
+ <ax-icon icon="fa-light fa-database"></ax-icon>
331
+ </ax-button>
332
+ </div>
333
+ </div>
334
+ } @else if (showReadonlyEmpty()) {
335
+ <p class="text-sm text-neutral-600">
336
+ {{
337
+ '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.readonly'
338
+ | translate
339
+ | async
340
+ }}
341
+ </p>
342
+ }
343
+ @if (showWidgetEditor() || showMetaDataEditor()) {
344
+ @if (showMetaDataEditor()) {
345
+ <axm-meta-data-configurator
346
+ [(definitionId)]="definitionIdModel"
347
+ [fieldName]="fieldName()"
348
+ [fieldTitle]="fieldTitle()"
349
+ [label]="metaDataConfiguratorLabel()"
350
+ [readonly]="readonly()"
351
+ ></axm-meta-data-configurator>
352
+ } @else if (showWidgetEditor()) {
353
+ <axp-widget-field-configurator
354
+ [(widget)]="widgetConfigModel"
355
+ [fieldName]="fieldName()"
356
+ [fieldTitle]="fieldTitle()"
357
+ [label]="label()"
358
+ [readonly]="readonly()"
359
+ ></axp-widget-field-configurator>
360
+ }
361
+ <div class="flex justify-end ax-sm">
362
+ <ax-button
363
+ look="twotone"
364
+ color="danger"
365
+ [disabled]="readonly()"
366
+ [text]="
367
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.switch-source'
368
+ | translate
369
+ | async)!
370
+ "
371
+ (onClick)="clearInterfaceConfiguration()"
372
+ >
373
+ <ax-icon icon="fa-light fa-link-slash"></ax-icon>
374
+ </ax-button>
375
+ </div>
376
+ }
377
+ }
378
+ </div>
379
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: AXButtonModule }, { kind: "component", type: i1.AXButtonComponent, selector: "ax-button", inputs: ["disabled", "size", "tabIndex", "color", "look", "text", "toggleable", "selected", "iconOnly", "type", "loadingText"], outputs: ["onBlur", "onFocus", "onClick", "selectedChange", "toggleableChange", "lookChange", "colorChange", "disabledChange", "loadingTextChange"] }, { kind: "component", type: AXPWidgetFieldConfiguratorComponent, selector: "axp-widget-field-configurator", inputs: ["widget", "label", "fieldName", "fieldTitle", "readonly", "selectedItemIdModel", "valuesModel"], outputs: ["widgetChange", "selectedItemIdModelChange", "valuesModelChange"] }, { kind: "component", type: AXMetaDataConfiguratorComponent, selector: "axm-meta-data-configurator", inputs: ["items", "label", "definitionId", "fieldName", "fieldTitle", "readonly"], outputs: ["definitionIdChange"] }, { kind: "ngmodule", type: AXDecoratorModule }, { kind: "component", type: i2.AXDecoratorIconComponent, selector: "ax-icon", inputs: ["icon"] }, { kind: "ngmodule", type: AXTranslationModule }, { kind: "pipe", type: i4.AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
380
+ }
381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXMQuestionBankInterfaceEditorWidgetEditComponent, decorators: [{
382
+ type: Component,
383
+ args: [{
384
+ selector: 'axm-question-bank-interface-editor-widget-edit',
385
+ template: `
386
+ <div class="flex flex-col gap-1">
387
+ @if (isInitialized()) {
388
+ @if (showSourceChoice()) {
389
+ <div class="flex flex-col gap-3">
390
+ <p class="text-sm text-neutral-700">
391
+ {{
392
+ '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.prompt'
393
+ | translate
394
+ | async
395
+ }}
396
+ </p>
397
+ <div class="flex w-full gap-2">
398
+ <ax-button
399
+ class="flex-1"
400
+ type="button"
401
+ look="twotone"
402
+ color="primary"
403
+ [disabled]="readonly()"
404
+ [text]="
405
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-widget'
406
+ | translate
407
+ | async)!
408
+ "
409
+ (onClick)="chooseWidgetSource()"
410
+ >
411
+ <ax-icon icon="fa-solid fa-puzzle-piece"></ax-icon>
412
+ </ax-button>
413
+ <ax-button
414
+ class="flex-1"
415
+ type="button"
416
+ look="twotone"
417
+ color="secondary"
418
+ [disabled]="readonly()"
419
+ [text]="
420
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-meta-data'
421
+ | translate
422
+ | async)!
423
+ "
424
+ (onClick)="chooseMetadataSource()"
425
+ >
426
+ <ax-icon icon="fa-light fa-database"></ax-icon>
427
+ </ax-button>
428
+ </div>
429
+ </div>
430
+ } @else if (showReadonlyEmpty()) {
431
+ <p class="text-sm text-neutral-600">
432
+ {{
433
+ '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.readonly'
434
+ | translate
435
+ | async
436
+ }}
437
+ </p>
438
+ }
439
+ @if (showWidgetEditor() || showMetaDataEditor()) {
440
+ @if (showMetaDataEditor()) {
441
+ <axm-meta-data-configurator
442
+ [(definitionId)]="definitionIdModel"
443
+ [fieldName]="fieldName()"
444
+ [fieldTitle]="fieldTitle()"
445
+ [label]="metaDataConfiguratorLabel()"
446
+ [readonly]="readonly()"
447
+ ></axm-meta-data-configurator>
448
+ } @else if (showWidgetEditor()) {
449
+ <axp-widget-field-configurator
450
+ [(widget)]="widgetConfigModel"
451
+ [fieldName]="fieldName()"
452
+ [fieldTitle]="fieldTitle()"
453
+ [label]="label()"
454
+ [readonly]="readonly()"
455
+ ></axp-widget-field-configurator>
456
+ }
457
+ <div class="flex justify-end ax-sm">
458
+ <ax-button
459
+ look="twotone"
460
+ color="danger"
461
+ [disabled]="readonly()"
462
+ [text]="
463
+ ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.switch-source'
464
+ | translate
465
+ | async)!
466
+ "
467
+ (onClick)="clearInterfaceConfiguration()"
468
+ >
469
+ <ax-icon icon="fa-light fa-link-slash"></ax-icon>
470
+ </ax-button>
471
+ </div>
472
+ }
473
+ }
474
+ </div>
475
+ `,
476
+ changeDetection: ChangeDetectionStrategy.OnPush,
477
+ imports: [
478
+ AXButtonModule,
479
+ AXPWidgetFieldConfiguratorComponent,
480
+ AXMetaDataConfiguratorComponent,
481
+ AXDecoratorModule,
482
+ AXTranslationModule,
483
+ AsyncPipe,
484
+ ],
485
+ }]
486
+ }], propDecorators: { definitionIdModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "definitionIdModel", required: false }] }, { type: i0.Output, args: ["definitionIdModelChange"] }], widgetConfigModel: [{ type: i0.Input, args: [{ isSignal: true, alias: "widgetConfigModel", required: false }] }, { type: i0.Output, args: ["widgetConfigModelChange"] }] } });
487
+
488
+ export { AXMQuestionBankInterfaceEditorWidgetEditComponent };
489
+ //# sourceMappingURL=acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-platform-module-assessment-management-client-question-bank-interface-editor-widget-edit.component-Bbl-efrl.mjs","sources":["../../../../libs/modules/assessment-management/client/src/lib/features/questionnaire-builder/questions/widgets/question-bank-interface-editor-widget/question-bank-interface-editor-widget-edit.component.ts"],"sourcesContent":["import { RootConfig as DataManagementRootConfig } from '@acorex-platform/module-data-management-client/contracts';\nimport { AXPEntityService } from '@acorex-platform/framework-client/layout/entity';\n//#region ---- Imports ----\n\nimport { AXToastService } from '@acorex/components/toast';\nimport { AXButtonModule } from '@acorex/components/button';\nimport {\n AXTranslationModule,\n AXTranslationService,\n} from '@acorex/core/translation';\nimport { AXMetaDataConfiguratorComponent } from '@acorex-platform/module-data-management-client';\nimport { type AXMMetaDataDefinitionEntityModel } from '@acorex-platform/module-data-management-client/contracts';\nimport {\n AXPMultiLanguageString,\n type AXPWidgetNode,\n} from '@acorex-platform/framework-shared/core';\nimport { AXPWidgetFieldConfiguratorComponent } from '@acorex-platform/framework-client/layout/components';\nimport { AXPValueWidgetComponent } from '@acorex-platform/framework-client/layout/widget-core';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n model,\n signal,\n untracked,\n} from '@angular/core';\nimport { isEqual } from 'lodash';\nimport {\n resolveWidgetNodeFromMetaDataDefinitionInterface,\n stripQuestionBankInterfaceMetadata,\n} from '../../../../entities/question-bank-item/question-bank-interface.utils';\nimport type {\n AXMQuestionBankItemInterfaceMetadata,\n AXMQuestionBankItemInterfaceValue,\n} from '@acorex-platform/module-assessment-management-client/contracts';\nimport { AXDecoratorModule } from '@acorex/components/decorators';\n//#endregion\n\n//#region ---- Helpers ----\n\nfunction hasMetadataProvenance(\n v: AXMQuestionBankItemInterfaceValue | null | undefined,\n): boolean {\n const id = v?.metadata?.id;\n return id != null && String(id).trim() !== '';\n}\n\nfunction hasConfiguredWidget(\n v: AXMQuestionBankItemInterfaceValue | null | undefined,\n): boolean {\n const w = stripQuestionBankInterfaceMetadata(v ?? undefined);\n const t = w?.type;\n return typeof t === 'string' && t.trim() !== '';\n}\n\n//#endregion\n\n//#region ---- Component ----\n\n@Component({\n selector: 'axm-question-bank-interface-editor-widget-edit',\n template: `\n <div class=\"flex flex-col gap-1\">\n @if (isInitialized()) {\n @if (showSourceChoice()) {\n <div class=\"flex flex-col gap-3\">\n <p class=\"text-sm text-neutral-700\">\n {{\n '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.prompt'\n | translate\n | async\n }}\n </p>\n <div class=\"flex w-full gap-2\">\n <ax-button\n class=\"flex-1\"\n type=\"button\"\n look=\"twotone\"\n color=\"primary\"\n [disabled]=\"readonly()\"\n [text]=\"\n ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-widget'\n | translate\n | async)!\n \"\n (onClick)=\"chooseWidgetSource()\"\n >\n <ax-icon icon=\"fa-solid fa-puzzle-piece\"></ax-icon>\n </ax-button>\n <ax-button\n class=\"flex-1\"\n type=\"button\"\n look=\"twotone\"\n color=\"secondary\"\n [disabled]=\"readonly()\"\n [text]=\"\n ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.editor-mode-meta-data'\n | translate\n | async)!\n \"\n (onClick)=\"chooseMetadataSource()\"\n >\n <ax-icon icon=\"fa-light fa-database\"></ax-icon>\n </ax-button>\n </div>\n </div>\n } @else if (showReadonlyEmpty()) {\n <p class=\"text-sm text-neutral-600\">\n {{\n '@assessment-management:question-bank.entities.question-bank-item.fields.interface.empty-source.readonly'\n | translate\n | async\n }}\n </p>\n }\n @if (showWidgetEditor() || showMetaDataEditor()) {\n @if (showMetaDataEditor()) {\n <axm-meta-data-configurator\n [(definitionId)]=\"definitionIdModel\"\n [fieldName]=\"fieldName()\"\n [fieldTitle]=\"fieldTitle()\"\n [label]=\"metaDataConfiguratorLabel()\"\n [readonly]=\"readonly()\"\n ></axm-meta-data-configurator>\n } @else if (showWidgetEditor()) {\n <axp-widget-field-configurator\n [(widget)]=\"widgetConfigModel\"\n [fieldName]=\"fieldName()\"\n [fieldTitle]=\"fieldTitle()\"\n [label]=\"label()\"\n [readonly]=\"readonly()\"\n ></axp-widget-field-configurator>\n }\n <div class=\"flex justify-end ax-sm\">\n <ax-button\n look=\"twotone\"\n color=\"danger\"\n [disabled]=\"readonly()\"\n [text]=\"\n ('@assessment-management:question-bank.entities.question-bank-item.fields.interface.switch-source'\n | translate\n | async)!\n \"\n (onClick)=\"clearInterfaceConfiguration()\"\n >\n <ax-icon icon=\"fa-light fa-link-slash\"></ax-icon>\n </ax-button>\n </div>\n }\n }\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n AXButtonModule,\n AXPWidgetFieldConfiguratorComponent,\n AXMetaDataConfiguratorComponent,\n AXDecoratorModule,\n AXTranslationModule,\n AsyncPipe,\n ],\n})\nexport class AXMQuestionBankInterfaceEditorWidgetEditComponent extends AXPValueWidgetComponent<AXMQuestionBankItemInterfaceValue | null> {\n private readonly entityService = inject(AXPEntityService);\n //#region ---- Services ----\n\n private readonly translate = inject(AXTranslationService);\n private readonly toast = inject(AXToastService);\n private readonly metaDataDefinitionService = this.entityService\n .withEntity(\n DataManagementRootConfig.module.name,\n DataManagementRootConfig.entities.metaDataDefinition.name,\n )\n .data<any, any>();\n\n //#endregion\n\n //#region ---- Computed ----\n\n protected readonly = computed<boolean>(\n () => this.options()['readonly'] as boolean,\n );\n protected fieldName = computed<string>(() => {\n const fieldNameValue = this.options()['fieldName'];\n if (fieldNameValue !== undefined && fieldNameValue !== null) {\n const stringValue = String(fieldNameValue).trim();\n return stringValue || 'field';\n }\n return 'field';\n });\n protected fieldTitle = computed<AXPMultiLanguageString>(() => {\n const fieldTitleValue = this.options()['fieldTitle'];\n if (fieldTitleValue === undefined || fieldTitleValue === null) {\n return '';\n }\n if (\n typeof fieldTitleValue === 'object' &&\n !Array.isArray(fieldTitleValue)\n ) {\n return fieldTitleValue as Record<string, string>;\n }\n const stringValue = String(fieldTitleValue).trim();\n return stringValue;\n });\n protected label = computed<string>(\n () => (this.options()['label'] as string) || 'Widget Type',\n );\n protected metaDataConfiguratorLabel = computed(\n () =>\n (this.options()['metaDataConfiguratorLabel'] as string) ||\n '@assessment-management:question-bank.entities.question-bank-item.fields.interface.meta-data-configurator-label',\n );\n\n /** No widget type and no metadata definition binding — user must pick a configuration path. */\n protected interfaceIsUnset = computed<boolean>(() => {\n const v = this.getValue() as\n | AXMQuestionBankItemInterfaceValue\n | null\n | undefined;\n return !hasMetadataProvenance(v) && !hasConfiguredWidget(v);\n });\n\n /** Widget-only path after save, or after the user chose “Widget” on an empty interface. */\n protected showWidgetEditor = computed<boolean>(() => {\n const v = this.getValue() as\n | AXMQuestionBankItemInterfaceValue\n | null\n | undefined;\n if (hasMetadataProvenance(v)) {\n return false;\n }\n if (hasConfiguredWidget(v)) {\n return true;\n }\n return this.emptyFlowChoice() === 'widget';\n });\n\n /** Meta-data definition path after save, or after the user chose “MetaData definition” on an empty interface. */\n protected showMetaDataEditor = computed<boolean>(() => {\n const v = this.getValue() as\n | AXMQuestionBankItemInterfaceValue\n | null\n | undefined;\n if (hasMetadataProvenance(v)) {\n return true;\n }\n if (!this.interfaceIsUnset()) {\n return false;\n }\n return this.emptyFlowChoice() === 'metadata';\n });\n\n protected showSourceChoice = computed<boolean>(\n () =>\n this.interfaceIsUnset() &&\n this.emptyFlowChoice() === null &&\n !this.readonly(),\n );\n\n protected showReadonlyEmpty = computed<boolean>(\n () =>\n this.interfaceIsUnset() &&\n this.emptyFlowChoice() === null &&\n this.readonly(),\n );\n\n //#endregion\n\n //#region ---- State ----\n\n protected isInitialized = signal(false);\n /** Set only while {@link interfaceIsUnset}; cleared once the value has a widget or metadata. */\n protected emptyFlowChoice = signal<'widget' | 'metadata' | null>(null);\n protected definitionIdModel = model<string>('');\n protected widgetConfigModel = model<AXPWidgetNode>({ type: '', options: {} });\n\n //#endregion\n\n //#region ---- Empty flow ----\n\n protected chooseWidgetSource(): void {\n if (this.readonly()) {\n return;\n }\n this.emptyFlowChoice.set('widget');\n }\n\n protected chooseMetadataSource(): void {\n if (this.readonly()) {\n return;\n }\n this.emptyFlowChoice.set('metadata');\n }\n\n /** Clears both widget config and metadata provenance, then returns to source chooser. */\n protected clearInterfaceConfiguration(): void {\n if (this.readonly()) {\n return;\n }\n untracked(() => {\n this.widgetConfigModel.set({ type: '', options: {} });\n this.definitionIdModel.set('');\n this.emptyFlowChoice.set(null);\n this.setValue(null);\n });\n }\n\n //#endregion\n\n //#region ---- Sync value ↔ configurator (preserve sibling metadata) ----\n\n private syncValueToConfigurator = effect(() => {\n const value = this.getValue();\n const widgetOnly = stripQuestionBankInterfaceMetadata(value ?? undefined);\n\n if (widgetOnly && widgetOnly.type) {\n const currentModel = untracked(() => this.widgetConfigModel());\n if (!isEqual(widgetOnly, currentModel)) {\n untracked(() => {\n this.widgetConfigModel.set(widgetOnly);\n this.isInitialized.set(true);\n });\n }\n } else {\n untracked(() => {\n if (!this.isInitialized()) {\n this.isInitialized.set(true);\n }\n });\n }\n });\n\n private clearEmptyFlowWhenConfigured = effect(() => {\n if (untracked(() => this.interfaceIsUnset())) {\n return;\n }\n untracked(() => {\n if (this.emptyFlowChoice() !== null) {\n this.emptyFlowChoice.set(null);\n }\n });\n });\n\n private syncConfiguratorToValue = effect(() => {\n const modelValue = this.widgetConfigModel();\n\n if (!untracked(() => this.isInitialized())) {\n return;\n }\n\n if (!modelValue || !modelValue.type) {\n return;\n }\n\n const full = untracked(() => this.getValue());\n const metadata =\n (full &&\n typeof full === 'object' &&\n (full as AXMQuestionBankItemInterfaceValue).metadata) ||\n undefined;\n\n const next: AXMQuestionBankItemInterfaceValue = metadata\n ? { ...modelValue, metadata }\n : (modelValue as AXMQuestionBankItemInterfaceValue);\n\n const currentFlat = untracked(() => this.getValue());\n if (!isEqual(next, currentFlat)) {\n untracked(() => {\n this.setValue(next);\n });\n }\n });\n\n private syncDefinitionIdFromValue = effect(() => {\n const value = this.getValue();\n const metaId = value?.metadata?.id;\n if (metaId != null && String(metaId) !== '') {\n const sid = String(metaId);\n if (untracked(() => this.definitionIdModel()) !== sid) {\n untracked(() => this.definitionIdModel.set(sid));\n }\n }\n });\n\n //#endregion\n\n //#region ---- Meta-data definition selection ----\n\n /** True while the meta-data configurator should be active (saved provenance or empty-flow metadata path). */\n private metadataFlowActive = computed<boolean>(() => {\n const v = this.getValue() as\n | AXMQuestionBankItemInterfaceValue\n | null\n | undefined;\n if (hasMetadataProvenance(v)) {\n return true;\n }\n if (!this.interfaceIsUnset()) {\n return false;\n }\n return this.emptyFlowChoice() === 'metadata';\n });\n\n private applyMetadataDefinitionSelection = effect(() => {\n if (!this.metadataFlowActive()) {\n return;\n }\n if (!untracked(() => this.isInitialized())) {\n return;\n }\n const id = this.definitionIdModel();\n if (!id?.trim()) {\n return;\n }\n\n const current = untracked(() => this.getValue());\n if (current?.metadata?.id === id) {\n const stripped = stripQuestionBankInterfaceMetadata(current);\n if (stripped?.type) {\n return;\n }\n }\n\n if (this.readonly()) {\n return;\n }\n\n void this.loadAndApplyMetadataDefinition(id);\n });\n\n private async loadAndApplyMetadataDefinition(id: string): Promise<void> {\n try {\n const row = await this.metaDataDefinitionService.byKey(id);\n const resolved = await resolveWidgetNodeFromMetaDataDefinitionInterface(\n row.interface as AXMMetaDataDefinitionEntityModel['interface'],\n );\n if (!resolved?.type) {\n this.toast.danger(\n (await this.translate.translateAsync(\n '@assessment-management:question-bank.entities.question-bank-item.fields.interface.load-from-metadata-invalid',\n )) ??\n 'The selected metadata definition has no valid widget interface.',\n );\n return;\n }\n\n const titleRaw = row.title;\n const metadata: AXMQuestionBankItemInterfaceMetadata = {\n id: String(row.id ?? ''),\n name: String(row.name ?? ''),\n title: (typeof titleRaw === 'object' && titleRaw !== null\n ? titleRaw\n : String(titleRaw ?? '')) as AXPMultiLanguageString | string,\n version: 0,\n };\n\n const next: AXMQuestionBankItemInterfaceValue = {\n ...resolved,\n metadata,\n };\n\n untracked(() => {\n this.setValue(next);\n this.widgetConfigModel.set(resolved);\n });\n } catch (err) {\n console.error(\n '[QuestionBankInterfaceEditor] metadata definition load failed',\n err,\n );\n this.toast.danger(\n (await this.translate.translateAsync(\n '@assessment-management:question-bank.entities.question-bank-item.fields.interface.load-from-metadata-failed',\n )) ?? 'Could not load metadata definitions.',\n );\n }\n }\n\n //#endregion\n}\n\n//#endregion\n"],"names":["DataManagementRootConfig","i3"],"mappings":";;;;;;;;;;;;;;;;;;AAuCA;AAEA;AAEA,SAAS,qBAAqB,CAC5B,CAAuD,EAAA;AAEvD,IAAA,MAAM,EAAE,GAAG,CAAC,EAAE,QAAQ,EAAE,EAAE;AAC1B,IAAA,OAAO,EAAE,IAAI,IAAI,IAAI,MAAM,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;AAC/C;AAEA,SAAS,mBAAmB,CAC1B,CAAuD,EAAA;IAEvD,MAAM,CAAC,GAAG,kCAAkC,CAAC,CAAC,IAAI,SAAS,CAAC;AAC5D,IAAA,MAAM,CAAC,GAAG,CAAC,EAAE,IAAI;IACjB,OAAO,OAAO,CAAC,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE;AACjD;AAEA;AAEA;AAyGM,MAAO,iDAAkD,SAAQ,uBAAiE,CAAA;AAvGxI,IAAA,WAAA,GAAA;;AAwGmB,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAC,gBAAgB,CAAC;;AAGxC,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACxC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;QAC9B,IAAA,CAAA,yBAAyB,GAAG,IAAI,CAAC;AAC/C,aAAA,UAAU,CACTA,UAAwB,CAAC,MAAM,CAAC,IAAI,E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