@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/dist/runner.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- export { e as CompleteRunnerRegistry, f as NodeRunner, g as NodeRunnerProps, Q as QuestionNodeDefinition, R as RunnerRegistry, c as defineQuestionNode, h as defineRunnerRegistry } from './types-4zXsOMLb.mjs';
1
+ export { e as CompleteRunnerRegistry, f as NodeRunner, g as NodeRunnerProps, Q as QuestionNodeDefinition, R as RunnerRegistry, c as defineQuestionNode, h as defineRunnerRegistry } from './types-BMMQVXYP.mjs';
2
2
  import 'react';
3
- import './coreTypes-CyFAym5A.mjs';
3
+ import './coreTypes-D5NniS2n.mjs';
4
4
 
5
5
  declare const plainTextRunner: {
6
6
  type: "plainText";
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, ComponentType } from 'react';
2
- import { i as SurveyNodeType, b as NodeData, Q as QuestionNodeType, j as NodeValue, N as NodeManifest, c as NodeLogic } from './coreTypes-CyFAym5A.mjs';
2
+ import { i as SurveyNodeType, h as NodeData, Q as QuestionNodeType, j as NodeValue, N as NodeManifest, b as NodeLogic } from './coreTypes-D5NniS2n.mjs';
3
3
 
4
4
  interface NodeRunnerProps<TData extends NodeData = NodeData, TValue extends NodeValue = NodeValue> {
5
5
  readonly data: Readonly<TData>;
@@ -0,0 +1,265 @@
1
+ import { h as NodeData, J as JsonValue } from './coreTypes-D5NniS2n.mjs';
2
+
3
+ type PlainTextData = NodeData & {
4
+ label: string;
5
+ description: string;
6
+ buttonLabel: string;
7
+ condition: {
8
+ id: string;
9
+ type: "group";
10
+ logicType: "AND" | "OR";
11
+ children: JsonValue[];
12
+ };
13
+ };
14
+ type PlainTextValue = {
15
+ viewed: boolean;
16
+ };
17
+
18
+ type CaptchaData = NodeData & {
19
+ label: string;
20
+ description: string;
21
+ isPii: boolean;
22
+ condition?: NodeData;
23
+ sitekey: string;
24
+ };
25
+ type CaptchaValue = string;
26
+
27
+ type EmojiOption = NodeData & {
28
+ id?: string;
29
+ exportId?: string;
30
+ label: string;
31
+ value: string;
32
+ };
33
+ type EmojiRatingData = NodeData & {
34
+ label: string;
35
+ description: string;
36
+ isPii: boolean;
37
+ condition?: NodeData;
38
+ options: EmojiOption[];
39
+ };
40
+ type EmojiRatingValue = string;
41
+
42
+ type MediaChoice = NodeData & {
43
+ id?: string;
44
+ exportId?: string;
45
+ label: string;
46
+ value: string;
47
+ imageUrl?: string;
48
+ };
49
+ type MediaInteractionType = "none" | "text" | "slider" | "choice";
50
+ type BaseMediaData = NodeData & {
51
+ label: string;
52
+ description: string;
53
+ isPii: boolean;
54
+ condition?: NodeData;
55
+ interactionType: MediaInteractionType;
56
+ questionLabel?: string;
57
+ sliderConfig?: string;
58
+ choices?: MediaChoice[];
59
+ };
60
+ type ImageData = BaseMediaData & {
61
+ urls: string[];
62
+ alt?: string;
63
+ };
64
+ type VideoData = BaseMediaData & {
65
+ url: string;
66
+ autoplay: boolean;
67
+ };
68
+ type AudioData = BaseMediaData & {
69
+ url: string;
70
+ autoplay: boolean;
71
+ };
72
+ type MediaValue = string | number | undefined;
73
+
74
+ type ConditionData$5 = {
75
+ id: string;
76
+ type: "group";
77
+ logicType: "AND" | "OR";
78
+ children: JsonValue[];
79
+ };
80
+ type StartData = NodeData & {
81
+ welcomeMessage?: string;
82
+ };
83
+ type BranchData = NodeData & {
84
+ condition: ConditionData$5;
85
+ };
86
+ type ValidationData = NodeData & {
87
+ label: string;
88
+ condition: ConditionData$5;
89
+ outcome: "security_terminate" | "disqualified" | "dropped";
90
+ };
91
+ type EndData = NodeData & {
92
+ message: string;
93
+ redirectUrl?: string;
94
+ outcome: "completed" | "disqualified" | "quality_terminate" | "security_terminate";
95
+ };
96
+
97
+ type ConditionData$4 = {
98
+ id: string;
99
+ type: "group";
100
+ logicType: "AND" | "OR";
101
+ children: JsonValue[];
102
+ };
103
+ type ConsentData = NodeData & {
104
+ label: string;
105
+ description: string;
106
+ condition: ConditionData$4;
107
+ checkboxLabel: string;
108
+ disagreeLabel?: string;
109
+ };
110
+ type ConsentValue = boolean;
111
+
112
+ type ConditionData$3 = {
113
+ id: string;
114
+ type: "group";
115
+ logicType: "AND" | "OR";
116
+ children: JsonValue[];
117
+ };
118
+ type ChoiceOption = NodeData & {
119
+ id?: string;
120
+ label: string;
121
+ value: string;
122
+ imageUrl?: string;
123
+ };
124
+ type BaseChoiceData = NodeData & {
125
+ label: string;
126
+ description: string;
127
+ condition: ConditionData$3;
128
+ options: ChoiceOption[];
129
+ randomizeOptions?: boolean;
130
+ };
131
+ type SingleChoiceData = BaseChoiceData & {
132
+ allowOther?: boolean;
133
+ otherLabel?: string;
134
+ allowNone?: boolean;
135
+ noneLabel?: string;
136
+ };
137
+ type DropdownData = BaseChoiceData & {
138
+ placeholder?: string;
139
+ searchable?: boolean;
140
+ };
141
+ type MultipleChoiceData = BaseChoiceData & {
142
+ minChoices?: number;
143
+ maxChoices?: number;
144
+ allowOther?: boolean;
145
+ otherLabel?: string;
146
+ allowNone?: boolean;
147
+ noneLabel?: string;
148
+ };
149
+ type RankingData = BaseChoiceData & {
150
+ maxRank?: number;
151
+ displayMode?: "drag" | "select";
152
+ };
153
+ type SingleChoiceValue = string;
154
+ type MultipleChoiceValue = string[];
155
+ type RankingValue = string[];
156
+
157
+ type ConditionData$2 = {
158
+ id: string;
159
+ type: "group";
160
+ logicType: "AND" | "OR";
161
+ children: JsonValue[];
162
+ };
163
+ type ScaleItem = NodeData & {
164
+ id?: string;
165
+ exportId?: string;
166
+ technicalId?: string;
167
+ label?: string;
168
+ value?: string;
169
+ };
170
+ type ScaleResponseMode = "single" | "multi";
171
+ type BaseScaleData = NodeData & {
172
+ label: string;
173
+ description: string;
174
+ condition: ConditionData$2;
175
+ responseMode?: ScaleResponseMode;
176
+ items: ScaleItem[];
177
+ };
178
+ type RatingData = BaseScaleData & {
179
+ maxRating: number;
180
+ };
181
+ type SliderData = BaseScaleData & {
182
+ min: number;
183
+ max: number;
184
+ step: number;
185
+ startValue: number;
186
+ };
187
+ type ScaleValue = number | Record<string, number>;
188
+
189
+ type ConditionData$1 = {
190
+ id: string;
191
+ type: "group";
192
+ logicType: "AND" | "OR";
193
+ children: JsonValue[];
194
+ };
195
+ type OptionItem = NodeData & {
196
+ id?: string;
197
+ exportId?: string;
198
+ label: string;
199
+ value: string;
200
+ };
201
+ type MatrixChoiceData = NodeData & {
202
+ label: string;
203
+ description: string;
204
+ condition: ConditionData$1;
205
+ rows: OptionItem[];
206
+ columns: OptionItem[];
207
+ multiple?: boolean;
208
+ };
209
+ type CascadingStep = NodeData & {
210
+ id?: string;
211
+ exportId?: string;
212
+ title: string;
213
+ options: OptionItem[];
214
+ };
215
+ type CascadingChoiceData = NodeData & {
216
+ label: string;
217
+ description: string;
218
+ condition: ConditionData$1;
219
+ steps: CascadingStep[];
220
+ };
221
+ type MatrixChoiceValue = Record<string, string | string[] | boolean>;
222
+ type CascadingChoiceValue = string[];
223
+
224
+ type ConditionData = {
225
+ id: string;
226
+ type: "group";
227
+ logicType: "AND" | "OR";
228
+ children: JsonValue[];
229
+ };
230
+ type TextLimitData = NodeData & {
231
+ minChars?: number;
232
+ maxChars?: number;
233
+ minWords?: number;
234
+ maxWords?: number;
235
+ };
236
+ type BaseTextData = TextLimitData & {
237
+ label: string;
238
+ description: string;
239
+ condition: ConditionData;
240
+ };
241
+ type TextInputData = BaseTextData & {
242
+ placeholder: string;
243
+ longAnswer: boolean;
244
+ };
245
+ type EmailInputData = BaseTextData;
246
+ type DateInputData = BaseTextData;
247
+ type NumberInputData = BaseTextData & {
248
+ min?: number;
249
+ max?: number;
250
+ };
251
+ type ZipCodeInputData = BaseTextData & {
252
+ allowedZips: string;
253
+ };
254
+ type MultiInputField = {
255
+ id: string;
256
+ label?: string;
257
+ value?: string;
258
+ };
259
+ type MultiInputData = BaseTextData & {
260
+ fields: MultiInputField[];
261
+ };
262
+ type TextValue = string;
263
+ type MultiInputValue = Record<string, string>;
264
+
265
+ export type { AudioData as A, BaseMediaData as B, CaptchaData as C, DropdownData as D, EmojiRatingData as E, MultiInputValue as F, ImageData as I, MultipleChoiceData as M, NumberInputData as N, PlainTextData as P, RankingData as R, StartData as S, TextInputData as T, VideoData as V, ZipCodeInputData as Z, BranchData as a, ConditionData$5 as b, EndData as c, ValidationData as d, ConsentData as e, SingleChoiceData as f, RatingData as g, SliderData as h, CascadingChoiceData as i, MatrixChoiceData as j, BaseTextData as k, MultiInputData as l, PlainTextValue as m, CaptchaValue as n, EmojiRatingValue as o, MediaValue as p, ConsentValue as q, ScaleValue as r, SingleChoiceValue as s, MultipleChoiceValue as t, RankingValue as u, CascadingChoiceValue as v, MatrixChoiceValue as w, DateInputData as x, TextValue as y, EmailInputData as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surveystudio/node-registery",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "description": "Typed survey question node registry with split builder, runner, and logic entrypoints.",
5
5
  "main": "./dist/logic.mjs",
6
6
  "types": "./dist/logic.d.mts",
@@ -1,59 +0,0 @@
1
- import { b as NodeData, J as JsonValue } from './coreTypes-CyFAym5A.mjs';
2
-
3
- type PlainTextData = NodeData & {
4
- label: string;
5
- description: string;
6
- buttonLabel: string;
7
- condition: {
8
- id: string;
9
- type: "group";
10
- logicType: "AND" | "OR";
11
- children: JsonValue[];
12
- };
13
- };
14
- type PlainTextValue = {
15
- viewed: boolean;
16
- };
17
-
18
- type ConditionData = {
19
- id: string;
20
- type: "group";
21
- logicType: "AND" | "OR";
22
- children: JsonValue[];
23
- };
24
- type TextLimitData = NodeData & {
25
- minChars?: number;
26
- maxChars?: number;
27
- minWords?: number;
28
- maxWords?: number;
29
- };
30
- type BaseTextData = TextLimitData & {
31
- label: string;
32
- description: string;
33
- condition: ConditionData;
34
- };
35
- type TextInputData = BaseTextData & {
36
- placeholder: string;
37
- longAnswer: boolean;
38
- };
39
- type EmailInputData = BaseTextData;
40
- type DateInputData = BaseTextData;
41
- type NumberInputData = BaseTextData & {
42
- min?: number;
43
- max?: number;
44
- };
45
- type ZipCodeInputData = BaseTextData & {
46
- allowedZips: string;
47
- };
48
- type MultiInputField = {
49
- id: string;
50
- label?: string;
51
- value?: string;
52
- };
53
- type MultiInputData = BaseTextData & {
54
- fields: MultiInputField[];
55
- };
56
- type TextValue = string;
57
- type MultiInputValue = Record<string, string>;
58
-
59
- export type { BaseTextData as B, DateInputData as D, EmailInputData as E, MultiInputData as M, NumberInputData as N, PlainTextData as P, TextInputData as T, ZipCodeInputData as Z, PlainTextValue as a, TextValue as b, MultiInputValue as c };