@case-framework/survey-core 0.1.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/build/editor.d.mts +245 -0
- package/build/editor.d.mts.map +1 -0
- package/build/editor.mjs +603 -0
- package/build/editor.mjs.map +1 -0
- package/build/index.d.mts +597 -0
- package/build/index.d.mts.map +1 -0
- package/build/index.mjs +1586 -0
- package/build/index.mjs.map +1 -0
- package/build/package.json/package.json +49 -0
- package/build/survey-C3ZHI-5z.mjs +931 -0
- package/build/survey-C3ZHI-5z.mjs.map +1 -0
- package/build/survey-TUPUXiXl.d.mts +614 -0
- package/build/survey-TUPUXiXl.d.mts.map +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,614 @@
|
|
|
1
|
+
//#region src/survey/responses/value-types.d.ts
|
|
2
|
+
declare const ValueType: {
|
|
3
|
+
readonly string: "string";
|
|
4
|
+
readonly duration: "duration";
|
|
5
|
+
readonly reference: "reference";
|
|
6
|
+
readonly number: "number";
|
|
7
|
+
readonly boolean: "boolean";
|
|
8
|
+
readonly date: "date";
|
|
9
|
+
readonly stringArray: "string[]";
|
|
10
|
+
readonly durationArray: "duration[]";
|
|
11
|
+
readonly referenceArray: "reference[]";
|
|
12
|
+
readonly numberArray: "number[]";
|
|
13
|
+
readonly dateArray: "date[]";
|
|
14
|
+
};
|
|
15
|
+
type ValueType = (typeof ValueType)[keyof typeof ValueType];
|
|
16
|
+
declare const DurationUnits: {
|
|
17
|
+
readonly seconds: "seconds";
|
|
18
|
+
readonly minutes: "minutes";
|
|
19
|
+
readonly hours: "hours";
|
|
20
|
+
readonly days: "days";
|
|
21
|
+
readonly weeks: "weeks";
|
|
22
|
+
readonly months: "months";
|
|
23
|
+
readonly years: "years";
|
|
24
|
+
};
|
|
25
|
+
type DurationUnit = (typeof DurationUnits)[keyof typeof DurationUnits];
|
|
26
|
+
declare const NumberPrecision: {
|
|
27
|
+
readonly int: "int";
|
|
28
|
+
readonly float: "float";
|
|
29
|
+
};
|
|
30
|
+
type NumberPrecision = (typeof NumberPrecision)[keyof typeof NumberPrecision];
|
|
31
|
+
interface SlotResponseBase<TValueType extends ValueType> {
|
|
32
|
+
type: TValueType;
|
|
33
|
+
}
|
|
34
|
+
interface StringResponse extends SlotResponseBase<typeof ValueType.string> {
|
|
35
|
+
value: string;
|
|
36
|
+
}
|
|
37
|
+
interface DurationResponse extends SlotResponseBase<typeof ValueType.duration> {
|
|
38
|
+
value: number;
|
|
39
|
+
unit: DurationUnit;
|
|
40
|
+
precision?: NumberPrecision;
|
|
41
|
+
}
|
|
42
|
+
interface NumberResponse extends SlotResponseBase<typeof ValueType.number> {
|
|
43
|
+
value: number;
|
|
44
|
+
precision?: NumberPrecision;
|
|
45
|
+
}
|
|
46
|
+
interface BooleanResponse extends SlotResponseBase<typeof ValueType.boolean> {
|
|
47
|
+
value: boolean;
|
|
48
|
+
}
|
|
49
|
+
interface ReferenceResponse extends SlotResponseBase<typeof ValueType.reference> {
|
|
50
|
+
value: string;
|
|
51
|
+
}
|
|
52
|
+
interface DateResponse extends SlotResponseBase<typeof ValueType.date> {
|
|
53
|
+
value: number;
|
|
54
|
+
}
|
|
55
|
+
interface StringArrayResponse extends SlotResponseBase<typeof ValueType.stringArray> {
|
|
56
|
+
value: string[];
|
|
57
|
+
}
|
|
58
|
+
interface DurationArrayResponse extends SlotResponseBase<typeof ValueType.durationArray> {
|
|
59
|
+
value: number[];
|
|
60
|
+
unit: DurationUnit;
|
|
61
|
+
precision?: NumberPrecision;
|
|
62
|
+
}
|
|
63
|
+
interface NumberArrayResponse extends SlotResponseBase<typeof ValueType.numberArray> {
|
|
64
|
+
value: number[];
|
|
65
|
+
precision?: NumberPrecision;
|
|
66
|
+
}
|
|
67
|
+
interface DateArrayResponse extends SlotResponseBase<typeof ValueType.dateArray> {
|
|
68
|
+
value: number[];
|
|
69
|
+
}
|
|
70
|
+
interface ReferenceArrayResponse extends SlotResponseBase<typeof ValueType.referenceArray> {
|
|
71
|
+
value: string[];
|
|
72
|
+
}
|
|
73
|
+
type ResponseValue = StringResponse | DurationResponse | ReferenceResponse | NumberResponse | BooleanResponse | DateResponse | StringArrayResponse | DurationArrayResponse | NumberArrayResponse | DateArrayResponse | ReferenceArrayResponse;
|
|
74
|
+
type ValueRefTypeLookup = {
|
|
75
|
+
[valueRefString: string]: ValueType;
|
|
76
|
+
};
|
|
77
|
+
//#endregion
|
|
78
|
+
//#region src/survey/utils/value-reference.d.ts
|
|
79
|
+
declare enum ValueReferenceMethod {
|
|
80
|
+
get = "get",
|
|
81
|
+
isDefined = "isDefined"
|
|
82
|
+
}
|
|
83
|
+
declare class ValueReference {
|
|
84
|
+
_itemId: string;
|
|
85
|
+
_name: ValueReferenceMethod;
|
|
86
|
+
_slotId: string;
|
|
87
|
+
constructor(str: string);
|
|
88
|
+
get itemId(): string;
|
|
89
|
+
get name(): ValueReferenceMethod;
|
|
90
|
+
get slotId(): string;
|
|
91
|
+
set itemId(itemId: string);
|
|
92
|
+
toString(): string;
|
|
93
|
+
static fromParts(itemId: string, name: ValueReferenceMethod, slotId: string): ValueReference;
|
|
94
|
+
}
|
|
95
|
+
declare enum ReferenceUsageType {
|
|
96
|
+
displayConditions = "displayConditions",
|
|
97
|
+
templateValues = "templateValues",
|
|
98
|
+
validations = "validations",
|
|
99
|
+
disabledConditions = "disabledConditions"
|
|
100
|
+
}
|
|
101
|
+
interface ReferenceUsage {
|
|
102
|
+
itemId: string;
|
|
103
|
+
fullComponentKey?: string;
|
|
104
|
+
usageType?: ReferenceUsageType;
|
|
105
|
+
valueReference: ValueReference;
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/expressions/expression.d.ts
|
|
109
|
+
declare const ExpressionType: {
|
|
110
|
+
readonly Const: "const";
|
|
111
|
+
readonly ResponseVariable: "responseVariable";
|
|
112
|
+
readonly ContextVariable: "contextVariable";
|
|
113
|
+
readonly Function: "function";
|
|
114
|
+
};
|
|
115
|
+
type ExpressionType = (typeof ExpressionType)[keyof typeof ExpressionType];
|
|
116
|
+
declare const ContextVariableType: {
|
|
117
|
+
readonly Locale: "locale";
|
|
118
|
+
readonly ParticipantFlag: "participantFlag";
|
|
119
|
+
readonly CustomValue: "customValue";
|
|
120
|
+
readonly CustomExpression: "customExpression";
|
|
121
|
+
};
|
|
122
|
+
type ContextVariableType = (typeof ContextVariableType)[keyof typeof ContextVariableType];
|
|
123
|
+
interface ExpressionEditorConfig {
|
|
124
|
+
usedTemplate?: string;
|
|
125
|
+
}
|
|
126
|
+
interface JsonConstExpression {
|
|
127
|
+
type: typeof ExpressionType.Const;
|
|
128
|
+
value?: ResponseValue;
|
|
129
|
+
editorConfig?: ExpressionEditorConfig;
|
|
130
|
+
}
|
|
131
|
+
interface JsonResponseVariableExpression {
|
|
132
|
+
type: typeof ExpressionType.ResponseVariable;
|
|
133
|
+
variableRef: string;
|
|
134
|
+
editorConfig?: ExpressionEditorConfig;
|
|
135
|
+
}
|
|
136
|
+
interface JsonContextVariableExpression {
|
|
137
|
+
type: typeof ExpressionType.ContextVariable;
|
|
138
|
+
contextType: ContextVariableType;
|
|
139
|
+
key?: JsonExpression;
|
|
140
|
+
arguments?: Array<JsonExpression | undefined>;
|
|
141
|
+
asType?: ValueType;
|
|
142
|
+
editorConfig?: ExpressionEditorConfig;
|
|
143
|
+
}
|
|
144
|
+
interface JsonFunctionExpression {
|
|
145
|
+
type: typeof ExpressionType.Function;
|
|
146
|
+
functionName: string;
|
|
147
|
+
arguments: Array<JsonExpression | undefined>;
|
|
148
|
+
editorConfig?: ExpressionEditorConfig;
|
|
149
|
+
}
|
|
150
|
+
type JsonExpression = JsonConstExpression | JsonResponseVariableExpression | JsonContextVariableExpression | JsonFunctionExpression;
|
|
151
|
+
/**
|
|
152
|
+
* Base class for all expressions.
|
|
153
|
+
*/
|
|
154
|
+
declare abstract class Expression {
|
|
155
|
+
type: ExpressionType;
|
|
156
|
+
editorConfig?: ExpressionEditorConfig;
|
|
157
|
+
constructor(type: ExpressionType, editorConfig?: ExpressionEditorConfig);
|
|
158
|
+
static deserialize(json: JsonExpression | undefined): Expression | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Returns all unique response variable references in the expression.
|
|
161
|
+
* @returns A list of ValueReference objects.
|
|
162
|
+
*/
|
|
163
|
+
abstract get responseVariableRefs(): ValueReference[];
|
|
164
|
+
abstract serialize(): JsonExpression | undefined;
|
|
165
|
+
clone(): Expression;
|
|
166
|
+
}
|
|
167
|
+
declare class ConstExpression extends Expression {
|
|
168
|
+
type: typeof ExpressionType.Const;
|
|
169
|
+
value?: ResponseValue;
|
|
170
|
+
constructor(value?: ResponseValue, editorConfig?: ExpressionEditorConfig);
|
|
171
|
+
static deserialize(json: JsonExpression): ConstExpression;
|
|
172
|
+
get responseVariableRefs(): ValueReference[];
|
|
173
|
+
serialize(): JsonExpression;
|
|
174
|
+
updateItemKeyReferences(_oldItemKey: string, _newItemKey: string): boolean;
|
|
175
|
+
}
|
|
176
|
+
declare class ResponseVariableExpression extends Expression {
|
|
177
|
+
type: typeof ExpressionType.ResponseVariable;
|
|
178
|
+
variableRef: string;
|
|
179
|
+
constructor(variableRef: string, editorConfig?: ExpressionEditorConfig);
|
|
180
|
+
static deserialize(json: JsonExpression): ResponseVariableExpression;
|
|
181
|
+
get responseVariableRefs(): ValueReference[];
|
|
182
|
+
get responseVariableRef(): ValueReference;
|
|
183
|
+
serialize(): JsonExpression;
|
|
184
|
+
}
|
|
185
|
+
declare class ContextVariableExpression extends Expression {
|
|
186
|
+
type: typeof ExpressionType.ContextVariable;
|
|
187
|
+
contextType: ContextVariableType;
|
|
188
|
+
key?: Expression;
|
|
189
|
+
arguments?: Array<Expression | undefined>;
|
|
190
|
+
asType?: ValueType;
|
|
191
|
+
constructor(contextType: ContextVariableType, key?: Expression, args?: Array<Expression | undefined>, asType?: ValueType, editorConfig?: ExpressionEditorConfig);
|
|
192
|
+
static deserialize(json: JsonExpression): ContextVariableExpression;
|
|
193
|
+
get responseVariableRefs(): ValueReference[];
|
|
194
|
+
serialize(): JsonExpression;
|
|
195
|
+
}
|
|
196
|
+
declare enum FunctionExpressionNames {
|
|
197
|
+
and = "and",
|
|
198
|
+
or = "or",
|
|
199
|
+
not = "not",
|
|
200
|
+
list_contains = "list_contains",
|
|
201
|
+
eq = "eq",
|
|
202
|
+
gt = "gt",
|
|
203
|
+
gte = "gte",
|
|
204
|
+
lt = "lt",
|
|
205
|
+
lte = "lte",
|
|
206
|
+
in_range = "in_range",
|
|
207
|
+
sum = "sum",
|
|
208
|
+
min = "min",
|
|
209
|
+
max = "max",
|
|
210
|
+
str_eq = "str_eq",
|
|
211
|
+
date_eq = "date_eq"
|
|
212
|
+
}
|
|
213
|
+
declare class FunctionExpression extends Expression {
|
|
214
|
+
type: typeof ExpressionType.Function;
|
|
215
|
+
functionName: FunctionExpressionNames;
|
|
216
|
+
arguments: Array<Expression | undefined>;
|
|
217
|
+
constructor(functionName: FunctionExpressionNames, args: Array<Expression | undefined>, editorConfig?: ExpressionEditorConfig);
|
|
218
|
+
static deserialize(json: JsonExpression): FunctionExpression;
|
|
219
|
+
get responseVariableRefs(): ValueReference[];
|
|
220
|
+
serialize(): JsonExpression | undefined;
|
|
221
|
+
}
|
|
222
|
+
//#endregion
|
|
223
|
+
//#region src/expressions/template-value.d.ts
|
|
224
|
+
declare enum TemplateDefTypes {
|
|
225
|
+
Default = "default",
|
|
226
|
+
Date2String = "date2string"
|
|
227
|
+
}
|
|
228
|
+
type TemplateValueBase = {
|
|
229
|
+
type: TemplateDefTypes;
|
|
230
|
+
returnType: ValueType;
|
|
231
|
+
expression?: Expression;
|
|
232
|
+
};
|
|
233
|
+
type TemplateValueFormatDate = TemplateValueBase & {
|
|
234
|
+
type: TemplateDefTypes.Date2String;
|
|
235
|
+
returnType: typeof ValueType.string;
|
|
236
|
+
dateFormat: string;
|
|
237
|
+
};
|
|
238
|
+
type TemplateValueDefinition = TemplateValueBase | TemplateValueFormatDate;
|
|
239
|
+
declare const serializeTemplateValue: (templateValue: TemplateValueDefinition) => JsonTemplateValue;
|
|
240
|
+
declare const serializeTemplateValues: (templateValues: Map<string, TemplateValueDefinition>) => {
|
|
241
|
+
[templateValueKey: string]: JsonTemplateValue;
|
|
242
|
+
};
|
|
243
|
+
declare const deserializeTemplateValue: (json: JsonTemplateValue) => TemplateValueDefinition;
|
|
244
|
+
declare const deserializeTemplateValues: (json: {
|
|
245
|
+
[templateValueKey: string]: JsonTemplateValue;
|
|
246
|
+
}) => Map<string, TemplateValueDefinition>;
|
|
247
|
+
interface JsonTemplateValue {
|
|
248
|
+
type: TemplateDefTypes;
|
|
249
|
+
expression?: JsonExpression;
|
|
250
|
+
returnType: ValueType;
|
|
251
|
+
dateFormat?: string;
|
|
252
|
+
}
|
|
253
|
+
//#endregion
|
|
254
|
+
//#region src/survey/items/utils.d.ts
|
|
255
|
+
interface DisplayConditions {
|
|
256
|
+
root?: Expression;
|
|
257
|
+
components?: {
|
|
258
|
+
[componentKey: string]: Expression | undefined;
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
interface DisabledConditions {
|
|
262
|
+
components?: {
|
|
263
|
+
[componentKey: string]: Expression | undefined;
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/survey/items/survey-item.d.ts
|
|
268
|
+
/**
|
|
269
|
+
* Core contract for survey item handlers.
|
|
270
|
+
* Every item type (built-in and plugin) is represented by a handler class implementing this interface.
|
|
271
|
+
* The core uses these methods without any casting.
|
|
272
|
+
*/
|
|
273
|
+
interface SurveyItemCoreType<TConfig = unknown> {
|
|
274
|
+
readonly type: string;
|
|
275
|
+
readonly id: string;
|
|
276
|
+
readonly key: string;
|
|
277
|
+
readonly config: TConfig;
|
|
278
|
+
isInteractive(): boolean;
|
|
279
|
+
getAvailableResponseValueSlots(): ValueRefTypeLookup;
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Base class for survey item handlers.
|
|
283
|
+
* Each handler holds type, id, key, and config (properly typed) and implements core methods.
|
|
284
|
+
* Subclass for each item type; the core works with SurveyItemHandler only—no casting needed.
|
|
285
|
+
*/
|
|
286
|
+
declare abstract class SurveyItemCore<TType extends string = string, TConfig = unknown> implements SurveyItemCoreType<TConfig> {
|
|
287
|
+
abstract readonly type: TType;
|
|
288
|
+
readonly id: string;
|
|
289
|
+
key: string;
|
|
290
|
+
config: TConfig;
|
|
291
|
+
private _rawItem;
|
|
292
|
+
displayConditions?: DisplayConditions;
|
|
293
|
+
disabledConditions?: DisabledConditions;
|
|
294
|
+
validations?: {
|
|
295
|
+
[validationKey: string]: Expression | undefined;
|
|
296
|
+
};
|
|
297
|
+
prefillRules?: Array<Expression | undefined>;
|
|
298
|
+
constructor(rawItem: RawSurveyItem);
|
|
299
|
+
/** Parse raw config from JSON into typed config. Override in subclasses. */
|
|
300
|
+
abstract parseConfig(rawConfig: unknown): TConfig;
|
|
301
|
+
abstract isInteractive(): boolean;
|
|
302
|
+
abstract getAvailableResponseValueSlots(byType?: ValueType): ValueRefTypeLookup;
|
|
303
|
+
get rawItem(): RawSurveyItem;
|
|
304
|
+
updateRawItem(rawItem: RawSurveyItem): void;
|
|
305
|
+
private updateExpressions;
|
|
306
|
+
getReferenceUsages(): ReferenceUsage[];
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Constructor type for handler classes. Used by the registry to instantiate handlers.
|
|
310
|
+
*/
|
|
311
|
+
type ItemCoreConstructor<TType extends string = string, TConfig = unknown> = new (rawItem: RawSurveyItem) => SurveyItemCore<TType, TConfig>;
|
|
312
|
+
//#endregion
|
|
313
|
+
//#region src/survey/items/survey-item-json.d.ts
|
|
314
|
+
interface RawSurveyItem {
|
|
315
|
+
id: string;
|
|
316
|
+
key: string;
|
|
317
|
+
itemType: string;
|
|
318
|
+
metadata?: {
|
|
319
|
+
[key: string]: string;
|
|
320
|
+
};
|
|
321
|
+
config?: unknown;
|
|
322
|
+
validations?: {
|
|
323
|
+
[validationKey: string]: JsonExpression | undefined;
|
|
324
|
+
};
|
|
325
|
+
displayConditions?: {
|
|
326
|
+
root?: JsonExpression;
|
|
327
|
+
components?: {
|
|
328
|
+
[componentId: string]: JsonExpression | undefined;
|
|
329
|
+
};
|
|
330
|
+
};
|
|
331
|
+
disabledConditions?: {
|
|
332
|
+
components?: {
|
|
333
|
+
[componentId: string]: JsonExpression | undefined;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
prefillRules?: Array<JsonExpression | undefined>;
|
|
337
|
+
}
|
|
338
|
+
//#endregion
|
|
339
|
+
//#region src/survey/items/types.d.ts
|
|
340
|
+
declare enum ReservedSurveyItemTypes {
|
|
341
|
+
Group = "group",
|
|
342
|
+
PageBreak = "page-break"
|
|
343
|
+
}
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region src/survey/utils/content.d.ts
|
|
346
|
+
declare enum ContentType {
|
|
347
|
+
CQM = "CQM",
|
|
348
|
+
md = "md"
|
|
349
|
+
}
|
|
350
|
+
declare enum AttributionType {
|
|
351
|
+
style = "style",
|
|
352
|
+
template = "template"
|
|
353
|
+
}
|
|
354
|
+
type StyleAttribution = {
|
|
355
|
+
type: AttributionType.style;
|
|
356
|
+
styleKey: string;
|
|
357
|
+
start: number;
|
|
358
|
+
end: number;
|
|
359
|
+
};
|
|
360
|
+
type TemplateAttribution = {
|
|
361
|
+
type: AttributionType.template;
|
|
362
|
+
templateKey: string;
|
|
363
|
+
position: number;
|
|
364
|
+
};
|
|
365
|
+
type Attribution = StyleAttribution | TemplateAttribution;
|
|
366
|
+
type CQMContent = {
|
|
367
|
+
type: ContentType.CQM;
|
|
368
|
+
content: string;
|
|
369
|
+
attributions?: Array<Attribution>;
|
|
370
|
+
};
|
|
371
|
+
type MDContent = {
|
|
372
|
+
type: ContentType.md;
|
|
373
|
+
content: string;
|
|
374
|
+
};
|
|
375
|
+
type Content = CQMContent | MDContent;
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/survey/utils/translations.d.ts
|
|
378
|
+
declare const validateLocale: (locale: string) => void;
|
|
379
|
+
declare class SurveyItemTranslations {
|
|
380
|
+
private _translations?;
|
|
381
|
+
constructor();
|
|
382
|
+
setContent(locale: string, contentKey: string, content?: Content): void;
|
|
383
|
+
setAllForLocale(locale: string, content?: JsonComponentContent): void;
|
|
384
|
+
get locales(): string[];
|
|
385
|
+
getAllForLocale(locale: string): JsonComponentContent | undefined;
|
|
386
|
+
getContent(locale: string, contentKey: string, fallbackLocale?: string): Content | undefined;
|
|
387
|
+
}
|
|
388
|
+
interface SurveyCardTranslations {
|
|
389
|
+
[locale: string]: SurveyCardContent;
|
|
390
|
+
}
|
|
391
|
+
declare class SurveyTranslations {
|
|
392
|
+
private _translations;
|
|
393
|
+
constructor(translations?: JsonSurveyTranslations);
|
|
394
|
+
serialize(): JsonSurveyTranslations | undefined;
|
|
395
|
+
get locales(): string[];
|
|
396
|
+
removeLocale(locale: string): void;
|
|
397
|
+
renameLocale(oldLocale: string, newLocale: string): void;
|
|
398
|
+
cloneLocaleAs(locale: string, newLocale: string): void;
|
|
399
|
+
get surveyCardContent(): SurveyCardTranslations | undefined;
|
|
400
|
+
get navigationContent(): {
|
|
401
|
+
[locale: string]: NavigationContent;
|
|
402
|
+
} | undefined;
|
|
403
|
+
get validationMessages(): {
|
|
404
|
+
[locale: string]: {
|
|
405
|
+
invalidResponse?: Content;
|
|
406
|
+
};
|
|
407
|
+
} | undefined;
|
|
408
|
+
setSurveyCardContent(locale: string, content?: SurveyCardContent): void;
|
|
409
|
+
setNavigationContent(locale: string, content?: NavigationContent): void;
|
|
410
|
+
setValidationMessages(locale: string, content?: {
|
|
411
|
+
invalidResponse?: Content;
|
|
412
|
+
}): void;
|
|
413
|
+
getItemTranslations(itemId: string): SurveyItemTranslations | undefined;
|
|
414
|
+
setItemTranslations(itemId: string, itemContent?: SurveyItemTranslations): void;
|
|
415
|
+
/**
|
|
416
|
+
* Rename a component key (within an item) - update key in all translations and remove old key
|
|
417
|
+
* @param itemKey - The key of the item
|
|
418
|
+
* @param oldKey - The old key of the component
|
|
419
|
+
* @param newKey - The new key of the component
|
|
420
|
+
*/
|
|
421
|
+
onComponentKeyChanged(itemKey: string, oldKey: string, newKey: string): void;
|
|
422
|
+
/**
|
|
423
|
+
* Remove all translations for a component
|
|
424
|
+
* @param itemId - The id of the item
|
|
425
|
+
* @param componentKey - The key of the component
|
|
426
|
+
*/
|
|
427
|
+
onComponentDeleted(itemId: string, componentKey: string): void;
|
|
428
|
+
/**
|
|
429
|
+
* Remove all translations for an item
|
|
430
|
+
* @param id - The id of the item
|
|
431
|
+
*/
|
|
432
|
+
onItemDeleted(id: string): void;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Json Schemas for translations
|
|
436
|
+
*/
|
|
437
|
+
type JsonComponentContent = {
|
|
438
|
+
[contentKey: string]: Content;
|
|
439
|
+
};
|
|
440
|
+
interface SurveyCardContent {
|
|
441
|
+
name?: Content;
|
|
442
|
+
description?: Content;
|
|
443
|
+
typicalDuration?: Content;
|
|
444
|
+
}
|
|
445
|
+
interface NavigationContent {
|
|
446
|
+
previousButtonText?: Content;
|
|
447
|
+
nextButtonText?: Content;
|
|
448
|
+
submitButtonText?: Content;
|
|
449
|
+
submitBoxMessage?: Content;
|
|
450
|
+
}
|
|
451
|
+
interface JsonSurveyTranslations {
|
|
452
|
+
[locale: string]: {
|
|
453
|
+
surveyCardContent?: SurveyCardContent;
|
|
454
|
+
navigationContent?: NavigationContent;
|
|
455
|
+
validationMessages?: {
|
|
456
|
+
invalidResponse?: Content;
|
|
457
|
+
};
|
|
458
|
+
itemTranslations?: {
|
|
459
|
+
[itemId: string]: JsonComponentContent;
|
|
460
|
+
};
|
|
461
|
+
};
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/survey/survey-file-schema.d.ts
|
|
465
|
+
type RawSurvey = {
|
|
466
|
+
$schema: string;
|
|
467
|
+
maxItemsPerPage?: {
|
|
468
|
+
large: number;
|
|
469
|
+
small: number;
|
|
470
|
+
};
|
|
471
|
+
surveyItems: Array<RawSurveyItem>;
|
|
472
|
+
metadata?: {
|
|
473
|
+
[key: string]: string;
|
|
474
|
+
};
|
|
475
|
+
templateValues?: {
|
|
476
|
+
[templateValueKey: string]: JsonTemplateValue;
|
|
477
|
+
};
|
|
478
|
+
translations?: JsonSurveyTranslations;
|
|
479
|
+
};
|
|
480
|
+
//#endregion
|
|
481
|
+
//#region src/survey/item-key.d.ts
|
|
482
|
+
/**
|
|
483
|
+
* SurveyItemKey stores the key of the item and the path to the item.
|
|
484
|
+
*/
|
|
485
|
+
declare class SurveyItemKey {
|
|
486
|
+
private _itemKey;
|
|
487
|
+
private _path;
|
|
488
|
+
private _keySeparator;
|
|
489
|
+
constructor(itemKey: string, path: string[] | undefined, keySeparator?: string);
|
|
490
|
+
get itemKey(): string;
|
|
491
|
+
get path(): Array<string>;
|
|
492
|
+
get parentFullKey(): string;
|
|
493
|
+
get fullKey(): string;
|
|
494
|
+
get isRoot(): boolean;
|
|
495
|
+
get keySeparator(): string;
|
|
496
|
+
set keySeparator(keySeparator: string);
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
499
|
+
//#region src/survey/registry/item-registry.d.ts
|
|
500
|
+
/**
|
|
501
|
+
* Registry maps item type string -> Handler constructor.
|
|
502
|
+
* Plugins extend this with their own handler classes.
|
|
503
|
+
*/
|
|
504
|
+
type ItemTypeRegistry = Record<string, new (rawItem: RawSurveyItem) => SurveyItemCore>;
|
|
505
|
+
//#endregion
|
|
506
|
+
//#region src/survey/registry/built-in-items.d.ts
|
|
507
|
+
/**
|
|
508
|
+
* Group item core.
|
|
509
|
+
*/
|
|
510
|
+
type GroupConfig = {
|
|
511
|
+
items?: string[];
|
|
512
|
+
shuffleItems?: boolean;
|
|
513
|
+
isRoot?: boolean;
|
|
514
|
+
};
|
|
515
|
+
declare class GroupItemCore extends SurveyItemCore<typeof ReservedSurveyItemTypes.Group, GroupConfig> {
|
|
516
|
+
readonly type = ReservedSurveyItemTypes.Group;
|
|
517
|
+
parseConfig(rawConfig: unknown): GroupConfig;
|
|
518
|
+
serializeConfig(): unknown;
|
|
519
|
+
isInteractive(): boolean;
|
|
520
|
+
getAvailableResponseValueSlots(): {};
|
|
521
|
+
isRoot(): boolean;
|
|
522
|
+
get items(): string[];
|
|
523
|
+
/**
|
|
524
|
+
* Add a child item id to this group at the given index.
|
|
525
|
+
* @param itemId The id of the item to add to this group.
|
|
526
|
+
* @param index The index at which to add the item. If not provided, the item is added to the end of the group.
|
|
527
|
+
*/
|
|
528
|
+
addChild(itemId: string, index?: number): void;
|
|
529
|
+
/**
|
|
530
|
+
* Remove a child item id from this group.
|
|
531
|
+
* @param itemId The id of the item to remove from this group.
|
|
532
|
+
*/
|
|
533
|
+
removeChild(itemId: string): void;
|
|
534
|
+
/**
|
|
535
|
+
* Check if an item is a direct child of this group.
|
|
536
|
+
*/
|
|
537
|
+
hasChild(itemId: string): boolean;
|
|
538
|
+
/** Whether items in this group should be shuffled. */
|
|
539
|
+
get shuffleItems(): boolean;
|
|
540
|
+
set shuffleItems(value: boolean);
|
|
541
|
+
/**
|
|
542
|
+
* Get the ordered list of child item ids.
|
|
543
|
+
*/
|
|
544
|
+
getChildrenIds(): string[];
|
|
545
|
+
/**
|
|
546
|
+
* Swap two items by their positions in the group.
|
|
547
|
+
* @throws Error if indices are out of bounds
|
|
548
|
+
*/
|
|
549
|
+
swapItemsByIndex(from: number, to: number): void;
|
|
550
|
+
/**
|
|
551
|
+
* Swap two items by their ids.
|
|
552
|
+
* @throws Error if either id is not found in this group
|
|
553
|
+
*/
|
|
554
|
+
swapItemsById(id: string, withId: string): void;
|
|
555
|
+
/**
|
|
556
|
+
* Move an item by id to a specific index.
|
|
557
|
+
* @throws Error if the item is not found or index is out of bounds
|
|
558
|
+
*/
|
|
559
|
+
moveItemToIndex(id: string, index: number): void;
|
|
560
|
+
}
|
|
561
|
+
//#endregion
|
|
562
|
+
//#region src/survey/survey.d.ts
|
|
563
|
+
declare class Survey {
|
|
564
|
+
private readonly pluginRegistry?;
|
|
565
|
+
maxItemsPerPage?: {
|
|
566
|
+
large: number;
|
|
567
|
+
small: number;
|
|
568
|
+
};
|
|
569
|
+
metadata?: {
|
|
570
|
+
[key: string]: string;
|
|
571
|
+
};
|
|
572
|
+
surveyItems: Map<string, SurveyItemCore>;
|
|
573
|
+
private _templateValues?;
|
|
574
|
+
private _translations?;
|
|
575
|
+
constructor(pluginRegistry?: ItemTypeRegistry | undefined);
|
|
576
|
+
/**
|
|
577
|
+
* Create a survey item from raw JSON data.
|
|
578
|
+
* Uses the survey's plugin registry when available.
|
|
579
|
+
*/
|
|
580
|
+
createItemFromRaw(rawItem: RawSurveyItem): SurveyItemCore;
|
|
581
|
+
static fromJson(json: RawSurvey, pluginRegistry?: ItemTypeRegistry): Survey;
|
|
582
|
+
serialize(): RawSurvey;
|
|
583
|
+
get surveyKey(): string | undefined;
|
|
584
|
+
get locales(): string[];
|
|
585
|
+
get rootItem(): GroupItemCore | undefined;
|
|
586
|
+
get keyIndex(): Array<{
|
|
587
|
+
itemId: string;
|
|
588
|
+
key: string;
|
|
589
|
+
keyPath: string[];
|
|
590
|
+
path: string[];
|
|
591
|
+
}>;
|
|
592
|
+
getItemPath(itemId: string): string[];
|
|
593
|
+
getItemKey(itemId: string): SurveyItemKey | undefined;
|
|
594
|
+
getParentItem(itemId: string): GroupItemCore | undefined;
|
|
595
|
+
getChildrenItems(parentId: string): SurveyItemCore[];
|
|
596
|
+
getSiblings(itemId: string): SurveyItemCore[];
|
|
597
|
+
get translations(): SurveyTranslations;
|
|
598
|
+
getItemTranslations(id: string): SurveyItemTranslations | undefined;
|
|
599
|
+
getTemplateValue(templateValueKey: string): TemplateValueDefinition | undefined;
|
|
600
|
+
setTemplateValue(templateValueKey: string, templateValue: TemplateValueDefinition): void;
|
|
601
|
+
deleteTemplateValue(templateValueKey: string): void;
|
|
602
|
+
getTemplateValueKeys(): string[];
|
|
603
|
+
getAvailableResponseValueSlots(byType?: ValueType): ValueRefTypeLookup;
|
|
604
|
+
/**
|
|
605
|
+
* Get all reference usages for the survey
|
|
606
|
+
* @param forItemId - optional item id to filter usages for a specific item and its children (if not provided, all usages are returned)
|
|
607
|
+
* @returns all reference usages for the survey (or for a specific item and its children)
|
|
608
|
+
*/
|
|
609
|
+
getReferenceUsages(forItemId?: string): ReferenceUsage[];
|
|
610
|
+
isDescendantOf(targetId: string, ancestorId: string): boolean;
|
|
611
|
+
}
|
|
612
|
+
//#endregion
|
|
613
|
+
export { BooleanResponse as $, TemplateValueFormatDate as A, ExpressionType as B, ItemCoreConstructor as C, TemplateDefTypes as D, JsonTemplateValue as E, ConstExpression as F, JsonExpression as G, FunctionExpressionNames as H, ContextVariableExpression as I, ResponseVariableExpression as J, JsonFunctionExpression as K, ContextVariableType as L, deserializeTemplateValues as M, serializeTemplateValue as N, TemplateValueBase as O, serializeTemplateValues as P, ValueReferenceMethod as Q, Expression as R, RawSurveyItem as S, SurveyItemCoreType as T, JsonConstExpression as U, FunctionExpression as V, JsonContextVariableExpression as W, ReferenceUsageType as X, ReferenceUsage as Y, ValueReference as Z, ContentType as _, JsonComponentContent as a, DurationUnits as at, TemplateAttribution as b, SurveyCardContent as c, NumberResponse as ct, SurveyTranslations as d, ResponseValue as dt, DateArrayResponse as et, validateLocale as f, SlotResponseBase as ft, Content as g, ValueType as gt, CQMContent as h, ValueRefTypeLookup as ht, RawSurvey as i, DurationUnit as it, deserializeTemplateValue as j, TemplateValueDefinition as k, SurveyCardTranslations as l, ReferenceArrayResponse as lt, AttributionType as m, StringResponse as mt, ItemTypeRegistry as n, DurationArrayResponse as nt, JsonSurveyTranslations as o, NumberArrayResponse as ot, Attribution as p, StringArrayResponse as pt, JsonResponseVariableExpression as q, SurveyItemKey as r, DurationResponse as rt, NavigationContent as s, NumberPrecision as st, Survey as t, DateResponse as tt, SurveyItemTranslations as u, ReferenceResponse as ut, MDContent as v, SurveyItemCore as w, ReservedSurveyItemTypes as x, StyleAttribution as y, ExpressionEditorConfig as z };
|
|
614
|
+
//# sourceMappingURL=survey-TUPUXiXl.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"survey-TUPUXiXl.d.mts","names":[],"sources":["../src/survey/responses/value-types.ts","../src/survey/utils/value-reference.ts","../src/expressions/expression.ts","../src/expressions/template-value.ts","../src/survey/items/utils.ts","../src/survey/items/survey-item.ts","../src/survey/items/survey-item-json.ts","../src/survey/items/types.ts","../src/survey/utils/content.ts","../src/survey/utils/translations.ts","../src/survey/survey-file-schema.ts","../src/survey/item-key.ts","../src/survey/registry/item-registry.ts","../src/survey/registry/built-in-items.ts","../src/survey/survey.ts"],"mappings":";cAAa,SAAA;EAAA;;;;;;;;;;;;KAcD,SAAA,WAAoB,SAAA,eAAwB,SAAA;AAAA,cAG3C,aAAA;EAAA;;;;;;;;KAUD,YAAA,WAAuB,aAAA,eAA4B,aAAA;AAAA,cAGlD,eAAA;EAAA,SAGH,GAAA;EAAA,SAAA,KAAA;AAAA;AAAA,KAEE,eAAA,WAA0B,eAAA,eAA8B,eAAA;AAAA,UAGnD,gBAAA,oBAAoC,SAAA;EACjD,IAAA,EAAM,UAAA;AAAA;AAAA,UAGO,cAAA,SAAuB,gBAAA,QAAwB,SAAA,CAAU,MAAA;EACtE,KAAA;AAAA;AAAA,UAGa,gBAAA,SAAyB,gBAAA,QAAwB,SAAA,CAAU,QAAA;EACxE,KAAA;EACA,IAAA,EAAM,YAAA;EACN,SAAA,GAAY,eAAA;AAAA;AAAA,UAGC,cAAA,SAAuB,gBAAA,QAAwB,SAAA,CAAU,MAAA;EACtE,KAAA;EACA,SAAA,GAAY,eAAA;AAAA;AAAA,UAGC,eAAA,SAAwB,gBAAA,QAAwB,SAAA,CAAU,OAAA;EACvE,KAAA;AAAA;AAAA,UAGa,iBAAA,SAA0B,gBAAA,QAAwB,SAAA,CAAU,SAAA;EACzE,KAAA;AAAA;AAAA,UAGa,YAAA,SAAqB,gBA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AA,GAAgB,cAAA;EAAA,OAIpC,QAAA,CAAS,IAAA,EAAM,SAAA,EAAW,cAAA,GAAiB,gBAAA,GAAmB,MAAA;EAkCrE,SAAA,CAAA,GAAa,SAAA;EAAA,IAuBT,SAAA,CAAA;EAAA,IAQA,OAAA,CAAA;EAAA,IAIA,QAAA,CAAA,GAAY,aAAA;EAAA,IAMZ,QAAA,CAAA,GAAY,KAAA;IAAQ,MAAA;IAAgB,GAAA;IAAa,OAAA;IAAmB,IAAA;EAAA;EAaxE,WAAA,CAAY,MAAA;EAkBZ,UAAA,CAAW,MAAA,WAAiB,aAAA;EAU5B,aAAA,CAAc,MAAA,WAAiB,aAAA;EAe/B,gBAAA,CAAiB,QAAA,WAAmB,cAAA;EAQpC,WAAA,CAAY,MAAA,WAAiB,cAAA;EAAA,IASzB,YAAA,CAAA,GAAgB,kBAAA;EAOpB,mBAAA,CAAoB,EAAA,WAAa,sBAAA;EASjC,gBAAA,CAAiB,gBAAA,WAA2B,uBAAA;EAI5C,gBAAA,CAAiB,gBAAA,UAA0B,aAAA,EAAe,uBAAA;EAO1D,mBAAA,CAAoB,gBAAA;EAIpB,oBAAA,CAAA;EAIA,8BAAA,CAA+B,MAAA,GAAS,SAAA,GAAY,kBAAA;EdrLrC;;;;;EckMf,kBAAA,CAAmB,SAAA,YAAqB,cAAA;EAyBxC,cAAA,CAAe,QAAA,UAAkB,UAAA;AAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@case-framework/survey-core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Implementation of the survey core to use in typescript/javascript projects.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"files": [
|
|
7
|
+
"build"
|
|
8
|
+
],
|
|
9
|
+
"keywords": [
|
|
10
|
+
"survey engine"
|
|
11
|
+
],
|
|
12
|
+
"author": "phev8",
|
|
13
|
+
"license": "ISC",
|
|
14
|
+
"devDependencies": {
|
|
15
|
+
"@eslint/js": "^9.39.2",
|
|
16
|
+
"@types/jest": "^30.0.0",
|
|
17
|
+
"eslint": "^9.39.2",
|
|
18
|
+
"jest": "^30.0.2",
|
|
19
|
+
"ts-jest": "^29.4.6",
|
|
20
|
+
"tsdown": "^0.20.1",
|
|
21
|
+
"typescript": "^5.8.3",
|
|
22
|
+
"typescript-eslint": "^8.54.0"
|
|
23
|
+
},
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"date-fns": "^4.1.0"
|
|
26
|
+
},
|
|
27
|
+
"main": "./build/index.mjs",
|
|
28
|
+
"types": "./build/index.d.mts",
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./build/index.d.mts",
|
|
32
|
+
"import": "./build/index.mjs"
|
|
33
|
+
},
|
|
34
|
+
"./editor": {
|
|
35
|
+
"types": "./build/editor.d.mts",
|
|
36
|
+
"import": "./build/editor.mjs"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"repository": {
|
|
40
|
+
"type": "git",
|
|
41
|
+
"url": "https://github.com/case-framework/case-survey-toolkit"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"test": "jest --config jestconfig.json",
|
|
45
|
+
"build": "tsdown",
|
|
46
|
+
"lint": "eslint src",
|
|
47
|
+
"lint:fix": "eslint src --fix"
|
|
48
|
+
}
|
|
49
|
+
}
|