@surveystudio/node-registery 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -1
- package/dist/builder.d.mts +923 -13
- package/dist/builder.mjs +683 -11
- package/dist/{coreTypes-CyFAym5A.d.mts → coreTypes-D5NniS2n.d.mts} +6 -1
- package/dist/logic.d.mts +29 -87
- package/dist/logic.mjs +577 -40
- package/dist/runner.d.mts +2 -2
- package/dist/{types-4zXsOMLb.d.mts → types-BMMQVXYP.d.mts} +1 -1
- package/dist/types-D3jarfsb.d.mts +265 -0
- package/package.json +1 -1
- package/dist/types-BMnck1ag.d.mts +0 -59
|
@@ -53,6 +53,9 @@ interface ExtractedValue {
|
|
|
53
53
|
readonly questionId?: string;
|
|
54
54
|
readonly columnKey?: string;
|
|
55
55
|
readonly columnLabel?: string;
|
|
56
|
+
readonly columnId?: string;
|
|
57
|
+
readonly columnTechnicalId?: string;
|
|
58
|
+
readonly columnText?: string;
|
|
56
59
|
readonly textValue?: string;
|
|
57
60
|
readonly numberValue?: number;
|
|
58
61
|
readonly booleanValue?: boolean;
|
|
@@ -60,6 +63,8 @@ interface ExtractedValue {
|
|
|
60
63
|
readonly optionText?: string;
|
|
61
64
|
readonly arrayValue?: readonly JsonValue[];
|
|
62
65
|
readonly objectValue?: Readonly<Record<string, JsonValue>>;
|
|
66
|
+
readonly cascadeLevel?: number;
|
|
67
|
+
readonly cascadeParentId?: string | null;
|
|
63
68
|
readonly metadata?: Readonly<Record<string, JsonValue>>;
|
|
64
69
|
}
|
|
65
70
|
interface ExtractionContext<TType extends SurveyNodeType = SurveyNodeType> extends NodeLogicContext<TType> {
|
|
@@ -82,4 +87,4 @@ type RegistryKeySet = Readonly<Partial<Record<SurveyNodeType, unknown>>>;
|
|
|
82
87
|
declare function defineLogicRegistry<const TRegistry extends RegistryKeySet>(registry: TRegistry): TRegistry;
|
|
83
88
|
declare function createInitialData<TData extends NodeData>(manifest: NodeManifest<SurveyNodeType, TData>): TData;
|
|
84
89
|
|
|
85
|
-
export { type CompleteLogicRegistry as C, type DataType as D, type ExtractedValue as E, type JsonValue as J, type LogicRegistry as L, type NodeManifest as N, type PropertyField as P, type QuestionNodeType as Q, type SelectOption as S, type ValidationContext as V, type PropertyFieldType as a, type
|
|
90
|
+
export { type CompleteLogicRegistry as C, type DataType as D, type ExtractedValue as E, type JsonValue as J, type LogicRegistry as L, type NodeManifest as N, type PropertyField as P, type QuestionNodeType as Q, type SelectOption as S, type ValidationContext as V, type PropertyFieldType as a, type NodeLogic as b, type ExtractionContext as c, type NodeLogicContext as d, type ValidationResult as e, createInitialData as f, defineLogicRegistry as g, type NodeData as h, type SurveyNodeType as i, type NodeValue as j };
|
package/dist/logic.d.mts
CHANGED
|
@@ -1,93 +1,21 @@
|
|
|
1
|
-
import { P as PlainTextData,
|
|
2
|
-
import { b as
|
|
3
|
-
export { C as CompleteLogicRegistry, D as DataType, E as ExtractedValue,
|
|
1
|
+
import { P as PlainTextData, m as PlainTextValue, C as CaptchaData, n as CaptchaValue, E as EmojiRatingData, o as EmojiRatingValue, A as AudioData, p as MediaValue, I as ImageData, V as VideoData, a as BranchData, c as EndData, S as StartData, d as ValidationData, e as ConsentData, q as ConsentValue, g as RatingData, r as ScaleValue, h as SliderData, D as DropdownData, s as SingleChoiceValue, M as MultipleChoiceData, t as MultipleChoiceValue, R as RankingData, u as RankingValue, f as SingleChoiceData, i as CascadingChoiceData, v as CascadingChoiceValue, j as MatrixChoiceData, w as MatrixChoiceValue, x as DateInputData, y as TextValue, z as EmailInputData, l as MultiInputData, F as MultiInputValue, N as NumberInputData, T as TextInputData, Z as ZipCodeInputData, k as BaseTextData } from './types-D3jarfsb.mjs';
|
|
2
|
+
import { b as NodeLogic } from './coreTypes-D5NniS2n.mjs';
|
|
3
|
+
export { C as CompleteLogicRegistry, D as DataType, E as ExtractedValue, c as ExtractionContext, L as LogicRegistry, d as NodeLogicContext, V as ValidationContext, e as ValidationResult, f as createInitialData, g as defineLogicRegistry } from './coreTypes-D5NniS2n.mjs';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
id: string;
|
|
7
|
-
type: "group";
|
|
8
|
-
logicType: "AND" | "OR";
|
|
9
|
-
children: JsonValue[];
|
|
10
|
-
};
|
|
11
|
-
type ConsentData = NodeData & {
|
|
12
|
-
label: string;
|
|
13
|
-
description: string;
|
|
14
|
-
condition: ConditionData$2;
|
|
15
|
-
checkboxLabel: string;
|
|
16
|
-
disagreeLabel?: string;
|
|
17
|
-
};
|
|
18
|
-
type ConsentValue = boolean;
|
|
5
|
+
declare const plainTextLogic: NodeLogic<"plainText", PlainTextData, PlainTextValue>;
|
|
19
6
|
|
|
20
|
-
|
|
21
|
-
id: string;
|
|
22
|
-
type: "group";
|
|
23
|
-
logicType: "AND" | "OR";
|
|
24
|
-
children: JsonValue[];
|
|
25
|
-
};
|
|
26
|
-
type ScaleItem = NodeData & {
|
|
27
|
-
id?: string;
|
|
28
|
-
exportId?: string;
|
|
29
|
-
technicalId?: string;
|
|
30
|
-
label?: string;
|
|
31
|
-
value?: string;
|
|
32
|
-
};
|
|
33
|
-
type ScaleResponseMode = "single" | "multi";
|
|
34
|
-
type BaseScaleData = NodeData & {
|
|
35
|
-
label: string;
|
|
36
|
-
description: string;
|
|
37
|
-
condition: ConditionData$1;
|
|
38
|
-
responseMode?: ScaleResponseMode;
|
|
39
|
-
items: ScaleItem[];
|
|
40
|
-
};
|
|
41
|
-
type RatingData = BaseScaleData & {
|
|
42
|
-
maxRating: number;
|
|
43
|
-
};
|
|
44
|
-
type SliderData = BaseScaleData & {
|
|
45
|
-
min: number;
|
|
46
|
-
max: number;
|
|
47
|
-
step: number;
|
|
48
|
-
startValue: number;
|
|
49
|
-
};
|
|
50
|
-
type ScaleValue = number | Record<string, number>;
|
|
7
|
+
declare const captchaLogic: NodeLogic<"captcha", CaptchaData, CaptchaValue>;
|
|
51
8
|
|
|
52
|
-
|
|
53
|
-
id: string;
|
|
54
|
-
type: "group";
|
|
55
|
-
logicType: "AND" | "OR";
|
|
56
|
-
children: JsonValue[];
|
|
57
|
-
};
|
|
58
|
-
type ChoiceOption = NodeData & {
|
|
59
|
-
id?: string;
|
|
60
|
-
label: string;
|
|
61
|
-
value: string;
|
|
62
|
-
imageUrl?: string;
|
|
63
|
-
};
|
|
64
|
-
type BaseChoiceData = NodeData & {
|
|
65
|
-
label: string;
|
|
66
|
-
description: string;
|
|
67
|
-
condition: ConditionData;
|
|
68
|
-
options: ChoiceOption[];
|
|
69
|
-
randomizeOptions?: boolean;
|
|
70
|
-
};
|
|
71
|
-
type SingleChoiceData = BaseChoiceData & {
|
|
72
|
-
allowOther?: boolean;
|
|
73
|
-
otherLabel?: string;
|
|
74
|
-
};
|
|
75
|
-
type DropdownData = BaseChoiceData & {
|
|
76
|
-
searchable?: boolean;
|
|
77
|
-
};
|
|
78
|
-
type MultipleChoiceData = BaseChoiceData & {
|
|
79
|
-
minChoices?: number;
|
|
80
|
-
maxChoices?: number;
|
|
81
|
-
};
|
|
82
|
-
type RankingData = BaseChoiceData & {
|
|
83
|
-
maxRank?: number;
|
|
84
|
-
displayMode?: "drag" | "select";
|
|
85
|
-
};
|
|
86
|
-
type SingleChoiceValue = string;
|
|
87
|
-
type MultipleChoiceValue = string[];
|
|
88
|
-
type RankingValue = string[];
|
|
9
|
+
declare const emojiRatingLogic: NodeLogic<"emojiRating", EmojiRatingData, EmojiRatingValue>;
|
|
89
10
|
|
|
90
|
-
declare const
|
|
11
|
+
declare const imageLogic: NodeLogic<"image", ImageData, MediaValue>;
|
|
12
|
+
declare const videoLogic: NodeLogic<"video", VideoData, MediaValue>;
|
|
13
|
+
declare const audioLogic: NodeLogic<"audio", AudioData, MediaValue>;
|
|
14
|
+
|
|
15
|
+
declare const startLogic: NodeLogic<"start", StartData, undefined>;
|
|
16
|
+
declare const branchLogic: NodeLogic<"branch", BranchData, undefined>;
|
|
17
|
+
declare const validationLogic: NodeLogic<"validation", ValidationData, undefined>;
|
|
18
|
+
declare const endLogic: NodeLogic<"end", EndData, undefined>;
|
|
91
19
|
|
|
92
20
|
declare const consentLogic: NodeLogic<"consent", ConsentData, ConsentValue>;
|
|
93
21
|
|
|
@@ -99,6 +27,9 @@ declare const dropdownLogic: NodeLogic<"dropdown", DropdownData, SingleChoiceVal
|
|
|
99
27
|
declare const multipleChoiceLogic: NodeLogic<"multipleChoice", MultipleChoiceData, MultipleChoiceValue>;
|
|
100
28
|
declare const rankingLogic: NodeLogic<"ranking", RankingData, RankingValue>;
|
|
101
29
|
|
|
30
|
+
declare const matrixChoiceLogic: NodeLogic<"matrixChoice", MatrixChoiceData, MatrixChoiceValue>;
|
|
31
|
+
declare const cascadingChoiceLogic: NodeLogic<"cascadingChoice", CascadingChoiceData, CascadingChoiceValue>;
|
|
32
|
+
|
|
102
33
|
declare const textInputLogic: NodeLogic<"textInput", TextInputData, TextValue>;
|
|
103
34
|
declare const emailInputLogic: NodeLogic<"emailInput", EmailInputData, TextValue>;
|
|
104
35
|
declare const dateInputLogic: NodeLogic<"dateInput", DateInputData, TextValue>;
|
|
@@ -117,10 +48,21 @@ declare const logicRegistry: {
|
|
|
117
48
|
readonly multipleChoice: NodeLogic<"multipleChoice", MultipleChoiceData, MultipleChoiceValue>;
|
|
118
49
|
readonly dropdown: NodeLogic<"dropdown", DropdownData, string>;
|
|
119
50
|
readonly ranking: NodeLogic<"ranking", RankingData, RankingValue>;
|
|
51
|
+
readonly cascadingChoice: NodeLogic<"cascadingChoice", CascadingChoiceData, CascadingChoiceValue>;
|
|
52
|
+
readonly matrixChoice: NodeLogic<"matrixChoice", MatrixChoiceData, MatrixChoiceValue>;
|
|
120
53
|
readonly rating: NodeLogic<"rating", RatingData, ScaleValue>;
|
|
121
54
|
readonly slider: NodeLogic<"slider", SliderData, ScaleValue>;
|
|
122
55
|
readonly consent: NodeLogic<"consent", ConsentData, boolean>;
|
|
56
|
+
readonly captcha: NodeLogic<"captcha", CaptchaData, string>;
|
|
57
|
+
readonly image: NodeLogic<"image", ImageData, MediaValue>;
|
|
58
|
+
readonly video: NodeLogic<"video", VideoData, MediaValue>;
|
|
59
|
+
readonly audio: NodeLogic<"audio", AudioData, MediaValue>;
|
|
123
60
|
readonly plainText: NodeLogic<"plainText", PlainTextData, PlainTextValue>;
|
|
61
|
+
readonly emojiRating: NodeLogic<"emojiRating", EmojiRatingData, string>;
|
|
62
|
+
readonly start: NodeLogic<"start", StartData, undefined>;
|
|
63
|
+
readonly end: NodeLogic<"end", EndData, undefined>;
|
|
64
|
+
readonly branch: NodeLogic<"branch", BranchData, undefined>;
|
|
65
|
+
readonly validation: NodeLogic<"validation", ValidationData, undefined>;
|
|
124
66
|
};
|
|
125
67
|
|
|
126
|
-
export { NodeLogic, consentLogic, dateInputLogic, dropdownLogic, emailInputLogic, logicRegistry, multiInputLogic, multipleChoiceLogic, numberInputLogic, plainTextLogic, rankingLogic, ratingLogic, singleChoiceLogic, sliderLogic, textInputLogic, zipCodeInputLogic };
|
|
68
|
+
export { NodeLogic, audioLogic, branchLogic, captchaLogic, cascadingChoiceLogic, consentLogic, dateInputLogic, dropdownLogic, emailInputLogic, emojiRatingLogic, endLogic, imageLogic, logicRegistry, matrixChoiceLogic, multiInputLogic, multipleChoiceLogic, numberInputLogic, plainTextLogic, rankingLogic, ratingLogic, singleChoiceLogic, sliderLogic, startLogic, textInputLogic, validationLogic, videoLogic, zipCodeInputLogic };
|