@case-framework/survey-core 0.3.0 → 0.4.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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@case-framework/survey-core",
3
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Implementation of the survey core to use in typescript/javascript projects.",
5
5
  "type": "module",
6
6
  "files": [
@@ -22,10 +22,10 @@
22
22
  "@types/jest": "^30.0.0",
23
23
  "eslint": "^9.39.4",
24
24
  "jest": "^30.3.0",
25
- "ts-jest": "^29.4.6",
26
- "tsdown": "^0.21.4",
27
- "typescript": "^5.8.3",
28
- "typescript-eslint": "^8.57.1"
25
+ "ts-jest": "^29.4.9",
26
+ "tsdown": "^0.21.10",
27
+ "typescript": "^6.0.3",
28
+ "typescript-eslint": "^8.59.1"
29
29
  },
30
30
  "dependencies": {
31
31
  "date-fns": "^4.1.0"
@@ -74,14 +74,8 @@ type ResponseValue = StringResponse | DurationResponse | ReferenceResponse | Num
74
74
  type ValueRefTypeLookup = {
75
75
  [valueRefString: string]: ValueType;
76
76
  };
77
- //#endregion
78
- //#region src/survey/responses/slot-definition.d.ts
79
- interface ResponseSlotDefinition {
80
- slotId: string;
81
- key: string;
82
- keyPath: string[];
83
- valueType: ValueType;
84
- }
77
+ declare function isResponseValue(value: unknown): value is ResponseValue;
78
+ declare function assertResponseValue(value: unknown, path: string): asserts value is ResponseValue;
85
79
  //#endregion
86
80
  //#region src/survey/utils/value-reference.d.ts
87
81
  declare enum ValueReferenceMethod {
@@ -104,7 +98,8 @@ declare enum ReferenceUsageType {
104
98
  displayConditions = "displayConditions",
105
99
  templateValues = "templateValues",
106
100
  validations = "validations",
107
- disabledConditions = "disabledConditions"
101
+ disabledConditions = "disabledConditions",
102
+ prefills = "prefills"
108
103
  }
109
104
  interface ReferenceUsage {
110
105
  itemId: string;
@@ -130,6 +125,8 @@ declare const ContextVariableType: {
130
125
  type ContextVariableType = (typeof ContextVariableType)[keyof typeof ContextVariableType];
131
126
  interface ExpressionEditorConfig {
132
127
  usedTemplate?: string;
128
+ label?: string;
129
+ description?: string;
133
130
  }
134
131
  interface JsonConstExpression {
135
132
  type: typeof ExpressionType.Const;
@@ -228,35 +225,36 @@ declare class FunctionExpression extends Expression {
228
225
  serialize(): JsonExpression | undefined;
229
226
  }
230
227
  //#endregion
231
- //#region src/expressions/template-value.d.ts
232
- declare enum TemplateDefTypes {
233
- Default = "default",
234
- Date2String = "date2string"
228
+ //#region src/survey/items/survey-item-json.d.ts
229
+ interface RawSurveyItem {
230
+ id: string;
231
+ key: string;
232
+ itemType: string;
233
+ metadata?: {
234
+ [key: string]: string;
235
+ };
236
+ config?: unknown;
237
+ validations?: {
238
+ [validationKey: string]: JsonExpression | undefined;
239
+ };
240
+ displayConditions?: {
241
+ root?: JsonExpression;
242
+ components?: {
243
+ [componentId: string]: JsonExpression | undefined;
244
+ };
245
+ };
246
+ disabledConditions?: {
247
+ components?: {
248
+ [componentId: string]: JsonExpression | undefined;
249
+ };
250
+ };
251
+ prefills?: JsonSurveyItemPrefill[];
235
252
  }
236
- type TemplateValueBase = {
237
- type: TemplateDefTypes;
238
- returnType: ValueType;
239
- expression?: Expression;
240
- };
241
- type TemplateValueFormatDate = TemplateValueBase & {
242
- type: TemplateDefTypes.Date2String;
243
- returnType: typeof ValueType.string;
244
- dateFormat: string;
245
- };
246
- type TemplateValueDefinition = TemplateValueBase | TemplateValueFormatDate;
247
- declare const serializeTemplateValue: (templateValue: TemplateValueDefinition) => JsonTemplateValue;
248
- declare const serializeTemplateValues: (templateValues: Map<string, TemplateValueDefinition>) => {
249
- [templateValueKey: string]: JsonTemplateValue;
250
- };
251
- declare const deserializeTemplateValue: (json: JsonTemplateValue) => TemplateValueDefinition;
252
- declare const deserializeTemplateValues: (json: {
253
- [templateValueKey: string]: JsonTemplateValue;
254
- }) => Map<string, TemplateValueDefinition>;
255
- interface JsonTemplateValue {
256
- type: TemplateDefTypes;
257
- expression?: JsonExpression;
258
- returnType: ValueType;
259
- dateFormat?: string;
253
+ //#endregion
254
+ //#region src/survey/items/types.d.ts
255
+ declare enum ReservedSurveyItemTypes {
256
+ Group = "group",
257
+ PageBreak = "page-break"
260
258
  }
261
259
  //#endregion
262
260
  //#region src/survey/items/utils.d.ts
@@ -303,7 +301,7 @@ declare abstract class SurveyItemCore<TType extends string = string, TConfig = u
303
301
  validations?: {
304
302
  [validationKey: string]: Expression | undefined;
305
303
  };
306
- prefillRules?: Array<Expression | undefined>;
304
+ prefills?: SurveyItemPrefill[];
307
305
  constructor(rawItem: RawSurveyItem);
308
306
  /** Parse raw config from JSON into typed config. Override in subclasses. */
309
307
  abstract parseConfig(rawConfig: unknown): TConfig;
@@ -321,75 +319,301 @@ declare abstract class SurveyItemCore<TType extends string = string, TConfig = u
321
319
  updateRawItem(rawItem: RawSurveyItem): void;
322
320
  private updateExpressions;
323
321
  getReferenceUsages(): ReferenceUsage[];
322
+ resolvePrefillTarget(target: SurveyItemPrefillTarget): ResponseSlotDefinition | undefined;
323
+ normalizePrefillValue(_prefill: SurveyItemPrefill, targetSlot: ResponseSlotDefinition, value: ResponseValue): ResponseValue | undefined;
324
324
  }
325
325
  /**
326
326
  * Constructor type for handler classes. Used by the registry to instantiate handlers.
327
327
  */
328
328
  type ItemCoreConstructor<TType extends string = string, TConfig = unknown> = new (rawItem: RawSurveyItem) => SurveyItemCore<TType, TConfig>;
329
329
  //#endregion
330
- //#region src/survey/items/survey-item-json.d.ts
331
- interface RawSurveyItem {
330
+ //#region src/expressions/item-expression-registry.d.ts
331
+ type ItemExpressionParameterInput = "string" | "number" | "boolean" | "singleSelect" | "multiSelect";
332
+ interface ItemExpressionParameterOption {
333
+ value: string;
334
+ label: string;
335
+ description?: string;
336
+ }
337
+ interface ItemExpressionParameterDefinition<TItem extends SurveyItemCore = SurveyItemCore> {
338
+ key: string;
339
+ label: string;
340
+ description?: string;
341
+ input: ItemExpressionParameterInput;
342
+ required?: boolean;
343
+ defaultValue?: unknown;
344
+ getOptions?: (item: TItem) => ItemExpressionParameterOption[];
345
+ }
346
+ interface ItemExpressionDefinition<TItem extends SurveyItemCore = SurveyItemCore> {
332
347
  id: string;
348
+ label: string;
349
+ description?: string;
350
+ returnType: ValueType;
351
+ parameters?: Array<ItemExpressionParameterDefinition<TItem>>;
352
+ buildExpression: (item: TItem, params?: Record<string, unknown>) => Expression;
353
+ }
354
+ type AnyItemExpressionDefinition = ItemExpressionDefinition<any>;
355
+ declare function getItemExpressionDefinition<TItem extends SurveyItemCore>(definitions: ReadonlyArray<ItemExpressionDefinition<TItem>> | undefined, expressionId: string): ItemExpressionDefinition<TItem> | undefined;
356
+ declare function buildItemExpression<TItem extends SurveyItemCore>(item: TItem, definitions: ReadonlyArray<ItemExpressionDefinition<TItem>> | undefined, expressionId: string, params?: Record<string, unknown>): Expression;
357
+ //#endregion
358
+ //#region src/survey/items/prefill.d.ts
359
+ declare const SurveyItemPrefillApplyMode: {
360
+ readonly ifEmpty: "ifEmpty";
361
+ };
362
+ type SurveyItemPrefillApplyMode = (typeof SurveyItemPrefillApplyMode)[keyof typeof SurveyItemPrefillApplyMode];
363
+ declare const SurveyItemPrefillTargetType: {
364
+ readonly itemResponse: "itemResponse";
365
+ readonly field: "field";
366
+ readonly embeddedField: "embeddedField";
367
+ };
368
+ type SurveyItemPrefillTargetType = (typeof SurveyItemPrefillTargetType)[keyof typeof SurveyItemPrefillTargetType];
369
+ type JsonSurveyItemPrefillTarget = {
370
+ type: typeof SurveyItemPrefillTargetType.itemResponse;
371
+ } | {
372
+ type: typeof SurveyItemPrefillTargetType.field;
373
+ fieldId: string;
374
+ } | {
375
+ type: typeof SurveyItemPrefillTargetType.embeddedField;
376
+ optionId: string;
377
+ fieldId: string;
378
+ };
379
+ type SurveyItemPrefillTarget = JsonSurveyItemPrefillTarget;
380
+ interface SurveyItemPreviousResponseRef {
381
+ surveyKey?: string;
382
+ itemId: string;
383
+ target?: SurveyItemPrefillTarget;
384
+ }
385
+ type JsonSurveyItemPrefillSource = {
386
+ type: "static";
387
+ value: ResponseValue;
388
+ } | {
389
+ type: "expression";
390
+ expression: JsonExpression;
391
+ } | {
392
+ type: "templateValue";
333
393
  key: string;
334
- itemType: string;
335
- metadata?: {
336
- [key: string]: string;
337
- };
338
- config?: unknown;
339
- validations?: {
340
- [validationKey: string]: JsonExpression | undefined;
341
- };
342
- displayConditions?: {
343
- root?: JsonExpression;
344
- components?: {
345
- [componentId: string]: JsonExpression | undefined;
346
- };
347
- };
348
- disabledConditions?: {
349
- components?: {
350
- [componentId: string]: JsonExpression | undefined;
351
- };
352
- };
353
- prefillRules?: Array<JsonExpression | undefined>;
394
+ } | {
395
+ type: "previousResponse";
396
+ ref: SurveyItemPreviousResponseRef;
397
+ ifUnsupported?: "skip";
398
+ };
399
+ type SurveyItemPrefillSource = {
400
+ type: "static";
401
+ value: ResponseValue;
402
+ } | {
403
+ type: "expression";
404
+ expression: Expression;
405
+ } | {
406
+ type: "templateValue";
407
+ key: string;
408
+ } | {
409
+ type: "previousResponse";
410
+ ref: SurveyItemPreviousResponseRef;
411
+ ifUnsupported?: "skip";
412
+ };
413
+ interface JsonSurveyItemPrefill {
414
+ id: string;
415
+ target: JsonSurveyItemPrefillTarget;
416
+ when?: JsonExpression;
417
+ apply?: SurveyItemPrefillApplyMode;
418
+ source: JsonSurveyItemPrefillSource;
354
419
  }
420
+ interface SurveyItemPrefill {
421
+ id: string;
422
+ target: SurveyItemPrefillTarget;
423
+ when?: Expression;
424
+ apply?: SurveyItemPrefillApplyMode;
425
+ source: SurveyItemPrefillSource;
426
+ }
427
+ declare function deserializeSurveyItemPrefill(json: JsonSurveyItemPrefill): SurveyItemPrefill;
428
+ declare function serializeSurveyItemPrefill(prefill: SurveyItemPrefill): JsonSurveyItemPrefill;
429
+ declare function prefillTargetsEqual(left: SurveyItemPrefillTarget, right: SurveyItemPrefillTarget): boolean;
355
430
  //#endregion
356
- //#region src/survey/items/types.d.ts
357
- declare enum ReservedSurveyItemTypes {
358
- Group = "group",
359
- PageBreak = "page-break"
431
+ //#region src/survey/responses/slot-definition.d.ts
432
+ interface ResponseSlotDefinition {
433
+ slotId: string;
434
+ key: string;
435
+ keyPath: string[];
436
+ valueType: ValueType;
437
+ prefillTarget?: SurveyItemPrefillTarget;
438
+ }
439
+ //#endregion
440
+ //#region src/expressions/template-value.d.ts
441
+ declare enum TemplateDefTypes {
442
+ Default = "default",
443
+ Date2String = "date2string"
444
+ }
445
+ type TemplateValueBase = {
446
+ type: TemplateDefTypes;
447
+ returnType: ValueType;
448
+ expression?: Expression;
449
+ };
450
+ type TemplateValueFormatDate = TemplateValueBase & {
451
+ type: TemplateDefTypes.Date2String;
452
+ returnType: typeof ValueType.string;
453
+ dateFormat: string;
454
+ };
455
+ type TemplateValueDefinition = TemplateValueBase | TemplateValueFormatDate;
456
+ declare const serializeTemplateValue: (templateValue: TemplateValueDefinition) => JsonTemplateValue;
457
+ declare const serializeTemplateValues: (templateValues: Map<string, TemplateValueDefinition>) => {
458
+ [templateValueKey: string]: JsonTemplateValue;
459
+ };
460
+ declare const deserializeTemplateValue: (json: JsonTemplateValue) => TemplateValueDefinition;
461
+ declare const deserializeTemplateValues: (json: {
462
+ [templateValueKey: string]: JsonTemplateValue;
463
+ }) => Map<string, TemplateValueDefinition>;
464
+ interface JsonTemplateValue {
465
+ type: TemplateDefTypes;
466
+ expression?: JsonExpression;
467
+ returnType: ValueType;
468
+ dateFormat?: string;
360
469
  }
361
470
  //#endregion
362
471
  //#region src/survey/utils/content.d.ts
363
472
  declare enum ContentType {
364
- CQM = "CQM",
473
+ richText = "richText",
474
+ plain = "plain",
365
475
  md = "md"
366
476
  }
367
- declare enum AttributionType {
368
- style = "style",
369
- template = "template"
370
- }
371
- type StyleAttribution = {
372
- type: AttributionType.style;
373
- styleKey: string;
374
- start: number;
375
- end: number;
477
+ type ContentAttributes = Record<string, unknown>;
478
+ type TextAlignment = 'left' | 'center' | 'right' | 'justify';
479
+ type RichTextStyle = {
480
+ weight?: 'strong' | 'normal';
481
+ italic?: 'italic' | 'normal';
482
+ underline?: 'underline' | 'none';
483
+ color?: 'primary' | 'accent' | 'default';
376
484
  };
377
- type TemplateAttribution = {
378
- type: AttributionType.template;
379
- templateKey: string;
380
- position: number;
485
+ type RichTextTextInline = {
486
+ type: 'text';
487
+ text: string;
488
+ style?: RichTextStyle;
489
+ attrs?: ContentAttributes;
381
490
  };
382
- type Attribution = StyleAttribution | TemplateAttribution;
383
- type CQMContent = {
384
- type: ContentType.CQM;
385
- content: string;
386
- attributions?: Array<Attribution>;
491
+ type RichTextTemplateInline = {
492
+ type: 'template';
493
+ key: string;
494
+ style?: RichTextStyle;
495
+ attrs?: ContentAttributes;
496
+ };
497
+ type RichTextLineBreakInline = {
498
+ type: 'lineBreak';
499
+ attrs?: ContentAttributes;
500
+ };
501
+ /** Inline nodes allowed inside a {@link RichTextLinkInline} (no nested links). */
502
+ type RichTextLinkChildInline = RichTextTextInline | RichTextTemplateInline | RichTextLineBreakInline;
503
+ type RichTextLinkInline = {
504
+ type: 'link';
505
+ href: string;
506
+ target?: string | null;
507
+ rel?: string | null;
508
+ title?: string | null;
509
+ attrs?: ContentAttributes;
510
+ children: RichTextLinkChildInline[];
511
+ };
512
+ type RichTextInlineExtension = {
513
+ type: 'inlineExtension';
514
+ name: string;
515
+ attrs?: ContentAttributes;
516
+ };
517
+ type RichTextInlineNode = RichTextTextInline | RichTextTemplateInline | RichTextLinkInline | RichTextLineBreakInline | RichTextInlineExtension;
518
+ type RichTextParagraphBlock = {
519
+ type: 'paragraph';
520
+ children: RichTextInlineNode[];
521
+ alignment?: TextAlignment;
522
+ attrs?: ContentAttributes;
523
+ };
524
+ type RichTextHeadingBlock = {
525
+ type: 'heading';
526
+ level: 1 | 2 | 3 | 4 | 5 | 6;
527
+ children: RichTextInlineNode[];
528
+ alignment?: TextAlignment;
529
+ attrs?: ContentAttributes;
530
+ };
531
+ type RichTextListItemBlock = {
532
+ type: 'listItem';
533
+ children: RichTextParagraphBlock[];
534
+ attrs?: ContentAttributes;
535
+ };
536
+ type RichTextBulletListBlock = {
537
+ type: 'bulletList';
538
+ items: RichTextListItemBlock[];
539
+ attrs?: ContentAttributes;
540
+ };
541
+ type SurveyContentImageSource = {
542
+ type: 'external';
543
+ url: string;
544
+ } | {
545
+ type: 'asset';
546
+ assetId: string;
547
+ };
548
+ type RichTextImageDimension = {
549
+ unit: 'px';
550
+ value: number;
551
+ } | {
552
+ unit: '%';
553
+ value: number;
554
+ };
555
+ type RichTextImageSize = {
556
+ width?: RichTextImageDimension;
557
+ maxWidth?: RichTextImageDimension;
558
+ };
559
+ type RichTextImageBlock = {
560
+ type: 'image';
561
+ source: SurveyContentImageSource;
562
+ alt?: string;
563
+ caption?: RichTextParagraphBlock[];
564
+ size?: RichTextImageSize;
565
+ alignment?: TextAlignment;
566
+ attrs?: ContentAttributes;
567
+ };
568
+ type RichTextInfoBoxBlock = {
569
+ type: 'infoBox';
570
+ tone?: 'info' | 'warning';
571
+ title?: RichTextInlineNode[];
572
+ collapsible?: boolean;
573
+ defaultOpen?: boolean;
574
+ children: RichTextParagraphBlock[];
575
+ attrs?: ContentAttributes;
576
+ };
577
+ type RichTextSeparatorBlock = {
578
+ type: 'separator';
579
+ attrs?: ContentAttributes;
580
+ };
581
+ type RichTextBlockExtension = {
582
+ type: 'blockExtension';
583
+ name: string;
584
+ attrs?: ContentAttributes;
585
+ };
586
+ type RichTextBlockNode = RichTextParagraphBlock | RichTextHeadingBlock | RichTextBulletListBlock | RichTextImageBlock | RichTextInfoBoxBlock | RichTextSeparatorBlock | RichTextBlockExtension;
587
+ type RichTextDocument = {
588
+ type: 'doc';
589
+ blocks: RichTextBlockNode[];
590
+ };
591
+ type RichTextContent = {
592
+ type: ContentType.richText;
593
+ version: 1;
594
+ doc: RichTextDocument;
387
595
  };
388
596
  type MDContent = {
389
597
  type: ContentType.md;
390
598
  content: string;
391
599
  };
392
- type Content = CQMContent | MDContent;
600
+ type PlainTextContent = {
601
+ type: ContentType.plain;
602
+ content: string;
603
+ };
604
+ type Content = RichTextContent | MDContent | PlainTextContent;
605
+ type RichTextInline = RichTextInlineNode;
606
+ interface ContentAssetUsage {
607
+ assetId: string;
608
+ blockIndex: number;
609
+ }
610
+ declare function hasRenderableRichTextBlock(block: RichTextBlockNode): boolean;
611
+ declare function hasRenderableRichTextContent(content: RichTextContent): boolean;
612
+ declare function createRichTextContent(text?: string): RichTextContent;
613
+ declare function getPlainTextFromRichTextContent(content: RichTextContent): string;
614
+ declare function getContentPlainText(content?: Content): string;
615
+ declare function isContentEmpty(content?: Content): boolean;
616
+ declare function getAssetUsagesFromContent(content?: Content): ContentAssetUsage[];
393
617
  //#endregion
394
618
  //#region src/survey/utils/translations.d.ts
395
619
  declare const validateLocale: (locale: string) => void;
@@ -401,6 +625,25 @@ declare class SurveyItemTranslations {
401
625
  get locales(): string[];
402
626
  getAllForLocale(locale: string): JsonComponentContent | undefined;
403
627
  getContent(locale: string, contentKey: string, fallbackLocale?: string): Content | undefined;
628
+ /**
629
+ * Create a deep clone that can be safely mutated before persisting with
630
+ * `setItemTranslations` or `updateItemTranslations`.
631
+ */
632
+ clone(): SurveyItemTranslations;
633
+ /**
634
+ * Remove a single content key from every locale in this translation set.
635
+ */
636
+ removeContentKey(contentKey: string): void;
637
+ /**
638
+ * Remove every content key that is exactly the prefix or nested beneath it.
639
+ */
640
+ removeContentKeysWithPrefix(prefix: string): void;
641
+ /**
642
+ * Remove empty locales in place.
643
+ * Returns `undefined` when no translations remain so callers can pass the
644
+ * result directly into `setItemTranslations` / `updateItemTranslations`.
645
+ */
646
+ compact(): SurveyItemTranslations | undefined;
404
647
  }
405
648
  interface SurveyCardTranslations {
406
649
  [locale: string]: SurveyCardContent;
@@ -428,6 +671,11 @@ declare class SurveyTranslations {
428
671
  invalidResponse?: Content;
429
672
  }): void;
430
673
  getItemTranslations(itemId: string): SurveyItemTranslations | undefined;
674
+ /**
675
+ * Persist item translations after normalizing them:
676
+ * empty keys/locales are removed automatically, and an empty translation set
677
+ * clears the item's stored translations entirely.
678
+ */
431
679
  setItemTranslations(itemId: string, itemContent?: SurveyItemTranslations): void;
432
680
  /**
433
681
  * Rename a component key (within an item) - update key in all translations and remove old key
@@ -463,6 +711,7 @@ interface NavigationContent {
463
711
  previousButtonText?: Content;
464
712
  nextButtonText?: Content;
465
713
  submitButtonText?: Content;
714
+ pageIndicatorText?: Content;
466
715
  submitBoxMessage?: Content;
467
716
  }
468
717
  interface JsonSurveyTranslations {
@@ -479,6 +728,31 @@ interface JsonSurveyTranslations {
479
728
  }
480
729
  //#endregion
481
730
  //#region src/survey/survey-file-schema.d.ts
731
+ declare const CURRENT_SURVEY_SCHEMA = "https://github.com/case-framework/case-survey-toolkit/packages/survey-core/schemas/survey-schema.json";
732
+ interface SurveyVersion {
733
+ id?: string;
734
+ surveyKey: string;
735
+ published?: number;
736
+ unpublished?: number;
737
+ versionId?: string;
738
+ survey: RawSurvey;
739
+ }
740
+ type RawSurveyAsset = {
741
+ kind: 'image';
742
+ source: {
743
+ type: 'embedded';
744
+ mediaType: string;
745
+ encoding: 'base64';
746
+ data: string;
747
+ };
748
+ metadata?: {
749
+ name?: string;
750
+ filename?: string;
751
+ alt?: string;
752
+ width?: number;
753
+ height?: number;
754
+ };
755
+ };
482
756
  type RawSurvey = {
483
757
  $schema: string;
484
758
  maxItemsPerPage?: {
@@ -486,6 +760,7 @@ type RawSurvey = {
486
760
  small: number;
487
761
  };
488
762
  surveyItems: Array<RawSurveyItem>;
763
+ assets?: Record<string, RawSurveyAsset>;
489
764
  metadata?: {
490
765
  [key: string]: string;
491
766
  };
@@ -534,6 +809,7 @@ interface ItemTypeDefinition {
534
809
  itemType: ItemTypeName;
535
810
  constructor: ItemCoreConstructor;
536
811
  capabilities?: ItemTypeCapabilities;
812
+ expressions?: AnyItemExpressionDefinition[];
537
813
  }
538
814
  /** Registry mapping item type name → definition. */
539
815
  type ItemTypeDefinitionRegistry = Record<ItemTypeName, ItemTypeDefinition>;
@@ -625,6 +901,14 @@ declare const builtInItemCoreRegistry: Record<BuiltInItemType, ItemCoreConstruct
625
901
  declare const isBuiltInItemType: (itemType: string) => itemType is BuiltInItemType;
626
902
  //#endregion
627
903
  //#region src/survey/survey.d.ts
904
+ interface SurveyAssetUsage {
905
+ assetId: string;
906
+ itemId?: string;
907
+ locale?: string;
908
+ contentKey: string;
909
+ usageScope: 'itemTranslation' | 'surveyCard' | 'navigation' | 'validationMessages';
910
+ blockIndex: number;
911
+ }
628
912
  declare class Survey {
629
913
  private readonly pluginRegistry?;
630
914
  maxItemsPerPage?: {
@@ -636,6 +920,7 @@ declare class Survey {
636
920
  };
637
921
  surveyItems: Map<string, SurveyItemCore>;
638
922
  private _templateValues?;
923
+ private _assets?;
639
924
  private _translations?;
640
925
  constructor(pluginRegistry?: ItemTypeRegistry | undefined);
641
926
  /** Plugin registry used when parsing items. Exposed for editors that re-parse without their own registry. */
@@ -671,6 +956,13 @@ declare class Survey {
671
956
  setTemplateValue(templateValueKey: string, templateValue: TemplateValueDefinition): void;
672
957
  deleteTemplateValue(templateValueKey: string): void;
673
958
  getTemplateValueKeys(): string[];
959
+ getAsset(assetId: string): RawSurveyAsset | undefined;
960
+ setAsset(assetId: string, asset: RawSurveyAsset): void;
961
+ deleteAsset(assetId: string): void;
962
+ hasAsset(assetId: string): boolean;
963
+ getAssetIds(): string[];
964
+ getAssets(): Map<string, RawSurveyAsset>;
965
+ getAssetUsages(filterAssetId?: string): SurveyAssetUsage[];
674
966
  getAvailableResponseValueSlots(byType?: ValueType): ValueRefTypeLookup;
675
967
  getResponseSlotDefinitions(): Array<{
676
968
  itemId: string;
@@ -685,5 +977,5 @@ declare class Survey {
685
977
  isDescendantOf(targetId: string, ancestorId: string): boolean;
686
978
  }
687
979
  //#endregion
688
- export { Expression as $, CQMContent as A, StringResponse as At, SurveyItemCoreType as B, SurveyCardContent as C, NumberPrecision as Ct, validateLocale as D, ResponseValue as Dt, SurveyTranslations as E, ReferenceResponse as Et, TemplateAttribution as F, TemplateValueFormatDate as G, TemplateDefTypes as H, ReservedSurveyItemTypes as I, serializeTemplateValue as J, deserializeTemplateValue as K, RawSurveyItem as L, ContentType as M, ValueType as Mt, MDContent as N, Attribution as O, SlotResponseBase as Ot, StyleAttribution as P, ContextVariableType as Q, ItemCoreConstructor as R, NavigationContent as S, NumberArrayResponse as St, SurveyItemTranslations as T, ReferenceArrayResponse as Tt, TemplateValueBase as U, JsonTemplateValue as V, TemplateValueDefinition as W, ConstExpression as X, serializeTemplateValues as Y, ContextVariableExpression as Z, toItemTypeDefinitionRegistry as _, DateResponse as _t, PageBreakConfig as a, JsonContextVariableExpression as at, JsonComponentContent as b, DurationUnit as bt, isBuiltInItemType as c, JsonResponseVariableExpression as ct, ItemTypeDefinitionRegistry as d, ReferenceUsageType as dt, ExpressionEditorConfig as et, ItemTypeName as f, ValueReference as ft, createItemTypeDefinitionRegistry as g, DateArrayResponse as gt, createItemCore as h, BooleanResponse as ht, GroupItemCore as i, JsonConstExpression as it, Content as j, ValueRefTypeLookup as jt, AttributionType as k, StringArrayResponse as kt, ItemTypeCapabilities as l, ResponseVariableExpression as lt, createFullRegistry as m, ResponseSlotDefinition as mt, BuiltInItemType as n, FunctionExpression as nt, PageBreakItemCore as o, JsonExpression as ot, ItemTypeRegistry as p, ValueReferenceMethod as pt, deserializeTemplateValues as q, GroupConfig as r, FunctionExpressionNames as rt, builtInItemCoreRegistry as s, JsonFunctionExpression as st, Survey as t, ExpressionType as tt, ItemTypeDefinition as u, ReferenceUsage as ut, SurveyItemKey as v, DurationArrayResponse as vt, SurveyCardTranslations as w, NumberResponse as wt, JsonSurveyTranslations as x, DurationUnits as xt, RawSurvey as y, DurationResponse as yt, SurveyItemCore as z };
689
- //# sourceMappingURL=survey-wnGyIY66.d.mts.map
980
+ export { RichTextLinkInline as $, ExpressionEditorConfig as $t, SurveyTranslations as A, ValueType as An, SurveyItemPrefillSource as At, RichTextBulletListBlock as B, ItemExpressionParameterInput as Bt, SurveyVersion as C, ReferenceArrayResponse as Cn, serializeTemplateValues as Ct, SurveyCardContent as D, StringArrayResponse as Dn, JsonSurveyItemPrefillTarget as Dt, NavigationContent as E, SlotResponseBase as En, JsonSurveyItemPrefillSource as Et, ContentType as F, prefillTargetsEqual as Ft, RichTextImageDimension as G, SurveyItemCore as Gt, RichTextDocument as H, buildItemExpression as Ht, MDContent as I, serializeSurveyItemPrefill as It, RichTextInline as J, RawSurveyItem as Jt, RichTextImageSize as K, SurveyItemCoreType as Kt, PlainTextContent as L, AnyItemExpressionDefinition as Lt, Content as M, isResponseValue as Mn, SurveyItemPrefillTargetType as Mt, ContentAssetUsage as N, SurveyItemPreviousResponseRef as Nt, SurveyCardTranslations as O, StringResponse as On, SurveyItemPrefill as Ot, ContentAttributes as P, deserializeSurveyItemPrefill as Pt, RichTextLinkChildInline as Q, Expression as Qt, RichTextBlockExtension as R, ItemExpressionDefinition as Rt, RawSurveyAsset as S, NumberResponse as Sn, serializeTemplateValue as St, JsonSurveyTranslations as T, ResponseValue as Tn, JsonSurveyItemPrefill as Tt, RichTextHeadingBlock as U, getItemExpressionDefinition as Ut, RichTextContent as V, ItemExpressionParameterOption as Vt, RichTextImageBlock as W, ItemCoreConstructor as Wt, RichTextInlineNode as X, ContextVariableExpression as Xt, RichTextInlineExtension as Y, ConstExpression as Yt, RichTextLineBreakInline as Z, ContextVariableType as Zt, createItemTypeDefinitionRegistry as _, DurationResponse as _n, TemplateValueBase as _t, GroupItemCore as a, JsonExpression as an, RichTextTextInline as at, CURRENT_SURVEY_SCHEMA as b, NumberArrayResponse as bn, deserializeTemplateValue as bt, builtInItemCoreRegistry as c, ResponseVariableExpression as cn, createRichTextContent as ct, ItemTypeDefinition as d, ValueReference as dn, getPlainTextFromRichTextContent as dt, ExpressionType as en, RichTextListItemBlock as et, ItemTypeDefinitionRegistry as f, ValueReferenceMethod as fn, hasRenderableRichTextBlock as ft, createItemCore as g, DurationArrayResponse as gn, TemplateDefTypes as gt, createFullRegistry as h, DateResponse as hn, JsonTemplateValue as ht, GroupConfig as i, JsonContextVariableExpression as in, RichTextTemplateInline as it, validateLocale as j, assertResponseValue as jn, SurveyItemPrefillTarget as jt, SurveyItemTranslations as k, ValueRefTypeLookup as kn, SurveyItemPrefillApplyMode as kt, isBuiltInItemType as l, ReferenceUsage as ln, getAssetUsagesFromContent as lt, ItemTypeRegistry as m, DateArrayResponse as mn, isContentEmpty as mt, SurveyAssetUsage as n, FunctionExpressionNames as nn, RichTextSeparatorBlock as nt, PageBreakConfig as o, JsonFunctionExpression as on, SurveyContentImageSource as ot, ItemTypeName as p, BooleanResponse as pn, hasRenderableRichTextContent as pt, RichTextInfoBoxBlock as q, ReservedSurveyItemTypes as qt, BuiltInItemType as r, JsonConstExpression as rn, RichTextStyle as rt, PageBreakItemCore as s, JsonResponseVariableExpression as sn, TextAlignment as st, Survey as t, FunctionExpression as tn, RichTextParagraphBlock as tt, ItemTypeCapabilities as u, ReferenceUsageType as un, getContentPlainText as ut, toItemTypeDefinitionRegistry as v, DurationUnit as vn, TemplateValueDefinition as vt, JsonComponentContent as w, ReferenceResponse as wn, ResponseSlotDefinition as wt, RawSurvey as x, NumberPrecision as xn, deserializeTemplateValues as xt, SurveyItemKey as y, DurationUnits as yn, TemplateValueFormatDate as yt, RichTextBlockNode as z, ItemExpressionParameterDefinition as zt };
981
+ //# sourceMappingURL=survey-DShEOjyz.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"survey-DShEOjyz.d.mts","names":[],"sources":["../src/survey/responses/value-types.ts","../src/survey/utils/value-reference.ts","../src/expressions/expression.ts","../src/survey/items/survey-item-json.ts","../src/survey/items/types.ts","../src/survey/items/utils.ts","../src/survey/items/survey-item.ts","../src/expressions/item-expression-registry.ts","../src/survey/items/prefill.ts","../src/survey/responses/slot-definition.ts","../src/expressions/template-value.ts","../src/survey/utils/content.ts","../src/survey/utils/translations.ts","../src/survey/survey-file-schema.ts","../src/survey/item-key.ts","../src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