headless-survey-engine 4.4.0 → 4.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.
Files changed (3) hide show
  1. package/dist/index.d.ts +16 -15
  2. package/dist/index.js +30 -19
  3. package/package.json +14 -13
package/dist/index.d.ts CHANGED
@@ -216,21 +216,25 @@ export declare enum SurveyImageFit {
216
216
  Fill = "fill",
217
217
  None = "none"
218
218
  }
219
- export interface SurveyImageNodeProps extends BlockNodeProps {
220
- altText: string;
219
+ export interface SurveyImageBoxProps {
221
220
  imageFit: SurveyImageFit;
222
221
  imageHeight?: number;
223
- imageLink: string;
224
222
  imageWidth?: number;
223
+ }
224
+ export declare const surveyImageBoxPropsShape: {
225
+ imageFit: z.ZodDefault<z.ZodEnum<typeof SurveyImageFit>>;
226
+ imageHeight: z.ZodOptional<z.ZodInt>;
227
+ imageWidth: z.ZodOptional<z.ZodInt>;
228
+ };
229
+ export interface SurveyImageNodeProps extends BlockNodeProps, SurveyImageBoxProps {
230
+ altText: string;
231
+ imageLink: string;
225
232
  name: string;
226
233
  visibleIf: string;
227
234
  }
228
- export declare const surveyImageNodePropsSchema: z.ZodObject<{
235
+ export declare const surveyImageNodePropsSchema: z.ZodObject<typeof surveyImageBoxPropsShape & {
229
236
  altText: z.ZodDefault<z.ZodString>;
230
- imageFit: z.ZodDefault<z.ZodEnum<typeof SurveyImageFit>>;
231
- imageHeight: z.ZodOptional<z.ZodInt>;
232
237
  imageLink: z.ZodDefault<z.ZodString>;
233
- imageWidth: z.ZodOptional<z.ZodInt>;
234
238
  name: typeof surveyNameSchema;
235
239
  visibleIf: typeof surveyConditionSchema;
236
240
  }>;
@@ -241,19 +245,13 @@ export interface SurveyImageChoice extends SurveyChoice {
241
245
  export declare const surveyImageChoiceSchema: z.ZodObject<typeof surveyChoiceSchema.shape & {
242
246
  imageLink: z.ZodString;
243
247
  }>;
244
- export interface SurveyImagePickerNodeProps extends SurveyQuestionBaseProps {
248
+ export interface SurveyImagePickerNodeProps extends SurveyImageBoxProps, SurveyQuestionBaseProps {
245
249
  choices: SurveyImageChoice[];
246
- imageFit: SurveyImageFit;
247
- imageHeight?: number;
248
- imageWidth?: number;
249
250
  isLabelVisible: boolean;
250
251
  multiSelect: boolean;
251
252
  }
252
- export declare const surveyImagePickerNodePropsSchema: z.ZodObject<typeof surveyQuestionBasePropsShape & {
253
+ export declare const surveyImagePickerNodePropsSchema: z.ZodObject<typeof surveyImageBoxPropsShape & typeof surveyQuestionBasePropsShape & {
253
254
  choices: z.ZodDefault<z.ZodArray<typeof surveyImageChoiceSchema>>;
254
- imageFit: z.ZodDefault<z.ZodEnum<typeof SurveyImageFit>>;
255
- imageHeight: z.ZodOptional<z.ZodInt>;
256
- imageWidth: z.ZodOptional<z.ZodInt>;
257
255
  isLabelVisible: z.ZodDefault<z.ZodBoolean>;
258
256
  multiSelect: z.ZodDefault<z.ZodBoolean>;
259
257
  }>;
@@ -522,6 +520,7 @@ export declare const boundedChildren: <TSchema extends z.ZodType>(schema: TSchem
522
520
  export declare const checkSurveyCalculatedValues: (calculatedValues: readonly SurveyCalculatedValue[], listPointer: string, names: Set<string>, issues: SurveyDocumentIssue[]) => void;
523
521
  export declare const checkSurveyDocument: (document: SurveyDocument) => SurveyDocumentIssue[];
524
522
  export declare const checkSurveyExpressionField: (source: string, label: string, pointer: string, issues: SurveyDocumentIssue[]) => void;
523
+ export declare const checkSurveyMinimumWithinMaximum: (minimum: number | undefined, maximum: number | undefined, minimumPointer: string, issues: SurveyDocumentIssue[]) => void;
525
524
  export declare const checkSurveyNodes: (nodes: readonly SurveyNode[], listPointer: string, names: Set<string>, issues: SurveyDocumentIssue[]) => void;
526
525
  export declare const checkSurveyNoneChoice: (props: SurveyChoicesProps & SurveyNoneChoiceProps, nodePointer: string, issues: SurveyDocumentIssue[]) => void;
527
526
  export declare const checkSurveyOptionalExpression: (source: string, label: string, pointer: string, issues: SurveyDocumentIssue[]) => void;
@@ -531,6 +530,8 @@ export declare const MAX_SURVEY_QUESTION_COUNT = 1e3;
531
530
  export declare const MAX_SURVEY_NODE_COUNT = 1500;
532
531
  export declare const MAX_SURVEY_CHOICE_COUNT = 200;
533
532
  export declare const MAX_SURVEY_MULTIPLE_TEXT_ITEM_COUNT = 50;
533
+ export declare const MAX_SURVEY_COMMENT_ROW_COUNT = 20;
534
+ export declare const MAX_SURVEY_PANEL_COUNT = 20;
534
535
  export declare const MAX_SURVEY_MATRIX_COLUMN_COUNT = 50;
535
536
  export declare const MAX_SURVEY_MATRIX_ROW_COUNT = 100;
536
537
  export declare const MAX_SURVEY_TEXT_LENGTH = 1e3;
package/dist/index.js CHANGED
@@ -22,6 +22,8 @@ const MAX_SURVEY_QUESTION_COUNT = 1e3;
22
22
  const MAX_SURVEY_NODE_COUNT = 1500;
23
23
  const MAX_SURVEY_CHOICE_COUNT = 200;
24
24
  const MAX_SURVEY_MULTIPLE_TEXT_ITEM_COUNT = 50;
25
+ const MAX_SURVEY_COMMENT_ROW_COUNT = 20;
26
+ const MAX_SURVEY_PANEL_COUNT = 20;
25
27
  const MAX_SURVEY_MATRIX_COLUMN_COUNT = 50;
26
28
  const MAX_SURVEY_MATRIX_ROW_COUNT = 100;
27
29
  const MAX_SURVEY_TEXT_LENGTH = 1e3;
@@ -118,12 +120,11 @@ const surveyCheckboxNodePropsSchema = z.object({
118
120
  selectAllText: z.string().max(MAX_SURVEY_TEXT_LENGTH).default("")
119
121
  });
120
122
  // src/models/SurveyCommentNodeProps.ts
121
- const MAX_SURVEY_COMMENT_ROWS = 20;
122
123
  const surveyCommentNodePropsSchema = z.object({
123
124
  ...surveyQuestionBasePropsShape,
124
125
  maxLength: z.int().positive().optional(),
125
126
  placeholder: z.string().max(MAX_SURVEY_TEXT_LENGTH).default(""),
126
- rows: z.int().min(1).max(MAX_SURVEY_COMMENT_ROWS).default(4)
127
+ rows: z.int().min(1).max(20).default(4)
127
128
  });
128
129
  // src/models/SurveyContainerBaseProps.ts
129
130
  const surveyContainerBasePropsShape = {
@@ -159,11 +160,6 @@ const surveyHtmlNodePropsSchema = z.object({
159
160
  name: surveyNameSchema,
160
161
  visibleIf: surveyConditionSchema
161
162
  });
162
- // src/models/SurveyImageChoice.ts
163
- const surveyImageChoiceSchema = z.object({
164
- ...surveyChoiceSchema.shape,
165
- imageLink: z.string().min(1).max(MAX_SURVEY_URL_LENGTH)
166
- });
167
163
  // src/models/SurveyImageFit.ts
168
164
  let SurveyImageFit = /* @__PURE__ */ function(SurveyImageFit) {
169
165
  SurveyImageFit["Contain"] = "contain";
@@ -172,23 +168,30 @@ let SurveyImageFit = /* @__PURE__ */ function(SurveyImageFit) {
172
168
  SurveyImageFit["None"] = "none";
173
169
  return SurveyImageFit;
174
170
  }({});
171
+ // src/models/SurveyImageBoxProps.ts
172
+ const surveyImageBoxPropsShape = {
173
+ imageFit: z.enum(SurveyImageFit).default("contain"),
174
+ imageHeight: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional(),
175
+ imageWidth: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional()
176
+ };
177
+ // src/models/SurveyImageChoice.ts
178
+ const surveyImageChoiceSchema = z.object({
179
+ ...surveyChoiceSchema.shape,
180
+ imageLink: z.string().min(1).max(MAX_SURVEY_URL_LENGTH)
181
+ });
175
182
  // src/models/SurveyImageNodeProps.ts
176
183
  const surveyImageNodePropsSchema = z.object({
184
+ ...surveyImageBoxPropsShape,
177
185
  altText: z.string().max(MAX_SURVEY_TEXT_LENGTH).default(""),
178
- imageFit: z.enum(SurveyImageFit).default("contain"),
179
- imageHeight: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional(),
180
186
  imageLink: z.string().max(MAX_SURVEY_URL_LENGTH).default(""),
181
- imageWidth: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional(),
182
187
  name: surveyNameSchema,
183
188
  visibleIf: surveyConditionSchema
184
189
  });
185
190
  // src/models/SurveyImagePickerNodeProps.ts
186
191
  const surveyImagePickerNodePropsSchema = z.object({
187
192
  ...surveyQuestionBasePropsShape,
193
+ ...surveyImageBoxPropsShape,
188
194
  choices: createUniqueArraySchema(surveyImageChoiceSchema, "value").max(200).default([]),
189
- imageFit: z.enum(SurveyImageFit).default("contain"),
190
- imageHeight: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional(),
191
- imageWidth: z.int().positive().max(MAX_SURVEY_IMAGE_SIZE).optional(),
192
195
  isLabelVisible: z.boolean().default(true),
193
196
  multiSelect: z.boolean().default(false)
194
197
  });
@@ -274,13 +277,12 @@ let SurveyNodeType = /* @__PURE__ */ function(SurveyNodeType) {
274
277
  // src/models/SurveyPageNodeProps.ts
275
278
  const surveyPageNodePropsSchema = z.object({ ...surveyContainerBasePropsShape });
276
279
  // src/models/SurveyPanelDynamicNodeProps.ts
277
- const MAX_SURVEY_PANEL_COUNT = 20;
278
280
  const surveyPanelDynamicNodePropsSchema = z.object({
279
281
  ...surveyQuestionBasePropsShape,
280
282
  addPanelText: z.string().max(MAX_SURVEY_TEXT_LENGTH).default(""),
281
- maxPanelCount: z.int().min(1).max(MAX_SURVEY_PANEL_COUNT).default(MAX_SURVEY_PANEL_COUNT),
282
- minPanelCount: z.int().min(0).max(MAX_SURVEY_PANEL_COUNT).default(0),
283
- panelCount: z.int().min(0).max(MAX_SURVEY_PANEL_COUNT).default(1),
283
+ maxPanelCount: z.int().min(1).max(20).default(20),
284
+ minPanelCount: z.int().min(0).max(20).default(0),
285
+ panelCount: z.int().min(0).max(20).default(1),
284
286
  removePanelText: z.string().max(MAX_SURVEY_TEXT_LENGTH).default("")
285
287
  });
286
288
  // src/models/SurveyPanelNodeProps.ts
@@ -401,6 +403,13 @@ const checkSurveyCalculatedValues = (calculatedValues, listPointer, names, issue
401
403
  checkSurveyExpressionField(calculatedValue.expression, "calculated value expression", `${calculatedValuePointer}/expression`, issues);
402
404
  }
403
405
  };
406
+ // src/services/checkSurveyMinimumWithinMaximum.ts
407
+ const checkSurveyMinimumWithinMaximum = (minimum, maximum, minimumPointer, issues) => {
408
+ if (minimum !== void 0 && maximum !== void 0 && minimum > maximum) issues.push({
409
+ message: `The minimum ${minimum} is above the maximum ${maximum}, so no answer could meet both`,
410
+ pointer: minimumPointer
411
+ });
412
+ };
404
413
  // src/services/runner/constants.ts
405
414
  const SURVEY_REQUIRED_MESSAGE = "Please answer this question.";
406
415
  const SURVEY_INVALID_ANSWER_MESSAGE = "This answer is not valid.";
@@ -445,6 +454,8 @@ const checkSurveyNodes = (nodes, listPointer, names, issues) => {
445
454
  for (const [index, node] of nodes.entries()) {
446
455
  const nodePointer = `${listPointer}/${index}`;
447
456
  if (node.type === "radiogroup" || node.type === "checkbox") checkSurveyNoneChoice(node.props, nodePointer, issues);
457
+ if (node.type === "checkbox") checkSurveyMinimumWithinMaximum(node.props.minSelected, node.props.maxSelected, getBlockPropPointer(nodePointer, "minSelected"), issues);
458
+ if (node.type === "matrixdynamic") checkSurveyMinimumWithinMaximum(node.props.minRowCount, node.props.maxRowCount, getBlockPropPointer(nodePointer, "minRowCount"), issues);
448
459
  switch (node.type) {
449
460
  case "expression":
450
461
  checkSurveyQuestion(node.props, nodePointer, names, issues);
@@ -1041,7 +1052,7 @@ const validateSurveyAnswers = (document, answers, mode, now) => {
1041
1052
  const views = flattenSurveyElementViews(document.content.flatMap((_node, pageIndex) => getSurveyPageViews(document, pageIndex, values, now)));
1042
1053
  const questionNames = new Set(flattenSurveyQuestions(document.content).filter((node) => checkIsSurveyAnsweringNode(node)).map((node) => node.props.name));
1043
1054
  const shownNames = new Set(views.flatMap(({ node }) => node.type === "panel" ? [] : [node.props.name]));
1044
- const calculatedNames = new Set(isSubmit ? document.root.props.calculatedValues.map(({ name }) => name) : []);
1055
+ const calculatedNames = new Set(isSubmit ? document.root.props.calculatedValues.filter(({ includeIntoResult }) => includeIntoResult).map(({ name }) => name) : []);
1045
1056
  const issues = [];
1046
1057
  for (const name of Object.keys(answers)) {
1047
1058
  if (calculatedNames.has(name)) continue;
@@ -1500,4 +1511,4 @@ const surveyRegistry = {
1500
1511
  };
1501
1512
  // src/services/surveyDocumentSchema.ts
1502
1513
  const surveyDocumentSchema = createBlockDocumentSchema(surveyPageNodeSchema, surveyRegistry, surveyNodeChildren, MAX_SURVEY_NODE_COUNT);
1503
- export { MATRIX_CELL_RATING_COUNT, MAX_SURVEY_ANSWER_ENTRY_COUNT, MAX_SURVEY_ANSWER_LENGTH, MAX_SURVEY_CALCULATED_VALUE_COUNT, MAX_SURVEY_CHOICE_COUNT, MAX_SURVEY_HTML_LENGTH, MAX_SURVEY_ID_LENGTH, MAX_SURVEY_IMAGE_SIZE, MAX_SURVEY_MATRIX_COLUMN_COUNT, MAX_SURVEY_MATRIX_ROW_COUNT, MAX_SURVEY_MULTIPLE_TEXT_ITEM_COUNT, MAX_SURVEY_NODE_COUNT, MAX_SURVEY_PATTERN_LENGTH, MAX_SURVEY_QUESTION_COUNT, MAX_SURVEY_QUESTION_NAME_LENGTH, MAX_SURVEY_TEXT_LENGTH, MAX_SURVEY_URL_LENGTH, MAX_SURVEY_VALIDATOR_COUNT, SURVEY_INVALID_ANSWER_MESSAGE, SURVEY_NONE_ANSWER, SURVEY_NOT_A_CHOICE_MESSAGE, SURVEY_NOT_SHOWN_MESSAGE, SURVEY_OUT_OF_RANGE_MESSAGE, SURVEY_PLACEABLE_NODE_TYPES, SURVEY_REQUIRED_MESSAGE, SURVEY_ROOT_NODE_TYPES, SURVEY_TEMPLATE_NODE_TYPES, SURVEY_TOO_FEW_SELECTED_MESSAGE, SURVEY_TOO_LONG_MESSAGE, SURVEY_TOO_MANY_SELECTED_MESSAGE, SURVEY_TOO_SHORT_MESSAGE, SURVEY_UNKNOWN_QUESTION_MESSAGE, SURVEY_WRONG_COUNT_MESSAGE, SurveyAnswerValidationMode, SurveyBooleanDisplayStyle, SurveyChoicesOrder, SurveyExpressionDisplayFormat, SurveyImageFit, SurveyMatrixCellType, SurveyMultipleTextItemInputType, SurveyNodeType, SurveyProgressBarPlacement, SurveyRatingType, SurveyTextInputType, boundedChildren, checkIsLastSurveyPage, checkIsSurveyAnsweringNode, checkSurveyAnswerEmpty, checkSurveyCalculatedValues, checkSurveyDocument, checkSurveyExpressionField, checkSurveyExpressionHolds, checkSurveyNodeEnabled, checkSurveyNodeRequired, checkSurveyNodeVisible, checkSurveyNodes, checkSurveyNoneChoice, checkSurveyOptionalExpression, checkSurveyQuestion, completeSurvey, createSeededRandom, createSurveyAnswerSchema, createSurveyBooleanAnswerSchema, createSurveyButtonGroupAnswerSchema, createSurveyCheckboxAnswerSchema, createSurveyChoiceValueSchema, createSurveyCommentAnswerSchema, createSurveyDocument, createSurveyDropdownAnswerSchema, createSurveyExpressionAnswerSchema, createSurveyImagePickerAnswerSchema, createSurveyMatrixAnswerSchema, createSurveyMatrixCellAnswerSchema, createSurveyMatrixDynamicAnswerSchema, createSurveyMultipleTextAnswerSchema, createSurveyNamedAnswerSchema, createSurveyNestedAnswerSchema, createSurveyNumberAnswerSchema, createSurveyPanelDynamicAnswerSchema, createSurveyPatternAnswerSchema, createSurveyRadioGroupAnswerSchema, createSurveyRankingAnswerSchema, createSurveyRatingAnswerSchema, createSurveyRatingValueSchema, createSurveyRunnerState, createSurveySelectionAnswerSchema, createSurveySliderAnswerSchema, createSurveyStringAnswerSchema, createSurveyStringRangeAnswerSchema, createSurveyTagBoxAnswerSchema, createSurveyTextAnswerSchema, flattenSurveyElementViews, flattenSurveyQuestions, getSurveyChoiceText, getSurveyElementViews, getSurveyExpressionNodes, getSurveyOrderedChoices, getSurveyPageElements, getSurveyPageErrors, getSurveyPageViews, getSurveyPanelRowAnswers, getSurveyPanelRowViews, getSurveyProgress, getSurveyQuestionErrors, getSurveyRunnerValues, getSurveyVisiblePageIndexes, getSurveyVisiblePageIndexesFromValues, goToNextSurveyPage, goToPreviousSurveyPage, hashSurveySeed, parseSurveyNumberBound, setSurveyAnswer, surveyAnswerScalarSchema, surveyAnswerValueSchema, surveyBooleanNodePropsSchema, surveyBooleanNodeType, surveyButtonGroupNodePropsSchema, surveyButtonGroupNodeType, surveyCalculatedValueSchema, surveyCheckboxNodePropsSchema, surveyCheckboxNodeType, surveyChoiceOptionsPropsShape, surveyChoiceSchema, surveyChoicesPropsShape, surveyCommentNodePropsSchema, surveyCommentNodeType, surveyConditionSchema, surveyContainerBasePropsShape, surveyDocumentSchema, surveyDropdownNodePropsSchema, surveyDropdownNodeType, surveyExpressionNodePropsSchema, surveyExpressionNodeType, surveyExpressionSchema, surveyHtmlNodePropsSchema, surveyHtmlNodeType, surveyIdSchema, surveyImageChoiceSchema, surveyImageNodePropsSchema, surveyImageNodeType, surveyImagePickerNodePropsSchema, surveyImagePickerNodeType, surveyMatrixColumnSchema, surveyMatrixDynamicNodePropsSchema, surveyMatrixDynamicNodeType, surveyMatrixNodePropsSchema, surveyMatrixNodeType, surveyMultipleTextItemSchema, surveyMultipleTextNodePropsSchema, surveyMultipleTextNodeType, surveyNameSchema, surveyNodeChildren, surveyNodeSchema, surveyNodeTypeDefinitionMap, surveyNoneChoicePropsShape, surveyPageNodePropsSchema, surveyPageNodeSchema, surveyPageNodeType, surveyPanelDynamicNodePropsSchema, surveyPanelDynamicNodeType, surveyPanelNodePropsSchema, surveyPanelNodeType, surveyPlaceableNodeSchema, surveyQuestionBasePropsShape, surveyRadioGroupNodePropsSchema, surveyRadioGroupNodeType, surveyRankingNodePropsSchema, surveyRankingNodeType, surveyRatingNodePropsSchema, surveyRatingNodeType, surveyRegistry, surveyRootPropsSchema, surveySliderNodePropsSchema, surveySliderNodeType, surveyTagBoxNodePropsSchema, surveyTagBoxNodeType, surveyTextNodePropsSchema, surveyTextNodeType, surveyValidatorSchema, toSurveyAnswerValue, toSurveyPanelScope, validateSurveyAnswers, validateSurveyPage };
1514
+ export { MATRIX_CELL_RATING_COUNT, MAX_SURVEY_ANSWER_ENTRY_COUNT, MAX_SURVEY_ANSWER_LENGTH, MAX_SURVEY_CALCULATED_VALUE_COUNT, MAX_SURVEY_CHOICE_COUNT, MAX_SURVEY_COMMENT_ROW_COUNT, MAX_SURVEY_HTML_LENGTH, MAX_SURVEY_ID_LENGTH, MAX_SURVEY_IMAGE_SIZE, MAX_SURVEY_MATRIX_COLUMN_COUNT, MAX_SURVEY_MATRIX_ROW_COUNT, MAX_SURVEY_MULTIPLE_TEXT_ITEM_COUNT, MAX_SURVEY_NODE_COUNT, MAX_SURVEY_PANEL_COUNT, MAX_SURVEY_PATTERN_LENGTH, MAX_SURVEY_QUESTION_COUNT, MAX_SURVEY_QUESTION_NAME_LENGTH, MAX_SURVEY_TEXT_LENGTH, MAX_SURVEY_URL_LENGTH, MAX_SURVEY_VALIDATOR_COUNT, SURVEY_INVALID_ANSWER_MESSAGE, SURVEY_NONE_ANSWER, SURVEY_NOT_A_CHOICE_MESSAGE, SURVEY_NOT_SHOWN_MESSAGE, SURVEY_OUT_OF_RANGE_MESSAGE, SURVEY_PLACEABLE_NODE_TYPES, SURVEY_REQUIRED_MESSAGE, SURVEY_ROOT_NODE_TYPES, SURVEY_TEMPLATE_NODE_TYPES, SURVEY_TOO_FEW_SELECTED_MESSAGE, SURVEY_TOO_LONG_MESSAGE, SURVEY_TOO_MANY_SELECTED_MESSAGE, SURVEY_TOO_SHORT_MESSAGE, SURVEY_UNKNOWN_QUESTION_MESSAGE, SURVEY_WRONG_COUNT_MESSAGE, SurveyAnswerValidationMode, SurveyBooleanDisplayStyle, SurveyChoicesOrder, SurveyExpressionDisplayFormat, SurveyImageFit, SurveyMatrixCellType, SurveyMultipleTextItemInputType, SurveyNodeType, SurveyProgressBarPlacement, SurveyRatingType, SurveyTextInputType, boundedChildren, checkIsLastSurveyPage, checkIsSurveyAnsweringNode, checkSurveyAnswerEmpty, checkSurveyCalculatedValues, checkSurveyDocument, checkSurveyExpressionField, checkSurveyExpressionHolds, checkSurveyMinimumWithinMaximum, checkSurveyNodeEnabled, checkSurveyNodeRequired, checkSurveyNodeVisible, checkSurveyNodes, checkSurveyNoneChoice, checkSurveyOptionalExpression, checkSurveyQuestion, completeSurvey, createSeededRandom, createSurveyAnswerSchema, createSurveyBooleanAnswerSchema, createSurveyButtonGroupAnswerSchema, createSurveyCheckboxAnswerSchema, createSurveyChoiceValueSchema, createSurveyCommentAnswerSchema, createSurveyDocument, createSurveyDropdownAnswerSchema, createSurveyExpressionAnswerSchema, createSurveyImagePickerAnswerSchema, createSurveyMatrixAnswerSchema, createSurveyMatrixCellAnswerSchema, createSurveyMatrixDynamicAnswerSchema, createSurveyMultipleTextAnswerSchema, createSurveyNamedAnswerSchema, createSurveyNestedAnswerSchema, createSurveyNumberAnswerSchema, createSurveyPanelDynamicAnswerSchema, createSurveyPatternAnswerSchema, createSurveyRadioGroupAnswerSchema, createSurveyRankingAnswerSchema, createSurveyRatingAnswerSchema, createSurveyRatingValueSchema, createSurveyRunnerState, createSurveySelectionAnswerSchema, createSurveySliderAnswerSchema, createSurveyStringAnswerSchema, createSurveyStringRangeAnswerSchema, createSurveyTagBoxAnswerSchema, createSurveyTextAnswerSchema, flattenSurveyElementViews, flattenSurveyQuestions, getSurveyChoiceText, getSurveyElementViews, getSurveyExpressionNodes, getSurveyOrderedChoices, getSurveyPageElements, getSurveyPageErrors, getSurveyPageViews, getSurveyPanelRowAnswers, getSurveyPanelRowViews, getSurveyProgress, getSurveyQuestionErrors, getSurveyRunnerValues, getSurveyVisiblePageIndexes, getSurveyVisiblePageIndexesFromValues, goToNextSurveyPage, goToPreviousSurveyPage, hashSurveySeed, parseSurveyNumberBound, setSurveyAnswer, surveyAnswerScalarSchema, surveyAnswerValueSchema, surveyBooleanNodePropsSchema, surveyBooleanNodeType, surveyButtonGroupNodePropsSchema, surveyButtonGroupNodeType, surveyCalculatedValueSchema, surveyCheckboxNodePropsSchema, surveyCheckboxNodeType, surveyChoiceOptionsPropsShape, surveyChoiceSchema, surveyChoicesPropsShape, surveyCommentNodePropsSchema, surveyCommentNodeType, surveyConditionSchema, surveyContainerBasePropsShape, surveyDocumentSchema, surveyDropdownNodePropsSchema, surveyDropdownNodeType, surveyExpressionNodePropsSchema, surveyExpressionNodeType, surveyExpressionSchema, surveyHtmlNodePropsSchema, surveyHtmlNodeType, surveyIdSchema, surveyImageBoxPropsShape, surveyImageChoiceSchema, surveyImageNodePropsSchema, surveyImageNodeType, surveyImagePickerNodePropsSchema, surveyImagePickerNodeType, surveyMatrixColumnSchema, surveyMatrixDynamicNodePropsSchema, surveyMatrixDynamicNodeType, surveyMatrixNodePropsSchema, surveyMatrixNodeType, surveyMultipleTextItemSchema, surveyMultipleTextNodePropsSchema, surveyMultipleTextNodeType, surveyNameSchema, surveyNodeChildren, surveyNodeSchema, surveyNodeTypeDefinitionMap, surveyNoneChoicePropsShape, surveyPageNodePropsSchema, surveyPageNodeSchema, surveyPageNodeType, surveyPanelDynamicNodePropsSchema, surveyPanelDynamicNodeType, surveyPanelNodePropsSchema, surveyPanelNodeType, surveyPlaceableNodeSchema, surveyQuestionBasePropsShape, surveyRadioGroupNodePropsSchema, surveyRadioGroupNodeType, surveyRankingNodePropsSchema, surveyRankingNodeType, surveyRatingNodePropsSchema, surveyRatingNodeType, surveyRegistry, surveyRootPropsSchema, surveySliderNodePropsSchema, surveySliderNodeType, surveyTagBoxNodePropsSchema, surveyTagBoxNodeType, surveyTextNodePropsSchema, surveyTextNodeType, surveyValidatorSchema, toSurveyAnswerValue, toSurveyPanelScope, validateSurveyAnswers, validateSurveyPage };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "headless-survey-engine",
3
- "version": "4.4.0",
3
+ "version": "4.5.0",
4
4
  "description": "The survey as a typed document on the headless block editor — its question kinds, the checks on a save and a runner whose state is plain functions, with no framework or DOM",
5
5
  "keywords": [
6
6
  "typescript"
@@ -31,24 +31,25 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
+ "scripts": {
35
+ "build": "tsdown",
36
+ "lint": "eslint .",
37
+ "lint:fix": "eslint --fix .",
38
+ "test": "vitest",
39
+ "typecheck": "tsrs --fast"
40
+ },
34
41
  "dependencies": {
35
- "@esposter/shared": "4.4.0",
36
- "headless-block-editor": "4.4.0",
42
+ "@esposter/shared": "4.5.0",
43
+ "headless-block-editor": "4.5.0",
37
44
  "re2js": "^2.9.1",
38
- "survey-expression": "4.4.0"
45
+ "survey-expression": "4.5.0"
39
46
  },
40
47
  "devDependencies": {
41
- "@esposter/configuration": "4.4.0",
48
+ "@esposter/configuration": "4.5.0",
42
49
  "tsdown": "^0.23.5"
43
50
  },
44
51
  "peerDependencies": {
45
52
  "zod": "^4.6.7"
46
53
  },
47
- "scripts": {
48
- "build": "tsdown",
49
- "lint": "eslint .",
50
- "lint:fix": "eslint --fix .",
51
- "test": "vitest",
52
- "typecheck": "tsrs --fast"
53
- }
54
- }
54
+ "gitHead": "e30c001f3b4b15693e75fb53092d62a97ade4d2b"
55
+ }