@exenai/questionnaire-builder
v3.2.27
Published
Exenai Limited's Questionnaire Builder/Answerer
Downloads
605
Maintainers
Readme
Questionnaire Builder
React 16 lib for building/answering a pair of questionnaires.
Published to npm as @exenai/questionnaire-builder
Usage & Demo
Build
yarn install
yarn build
Run via questionnaire-demo
- clone @exenai/questionnaire-demo
- setup yarn link (
yarn link
from questionnaire-builder;yarn link "@exenai/questionnaire-builder"
in root of that project) yarn dev
Data model
At the top level, you have an Array of QuestionSectionModels
class QuestionSectionModel {
id: number;
title: string;
questions: Array<QuestionModel> = [];
canCustomize = true;
canAdd = false;
canDelete = false;
constructor() {
this.title = '';
}
}
With each Section having an Array of Questions
class QuestionModel {
id: number;
title: string;
type: QuestionTypeEnum;
config?: RadioConfig | SliderConfig | CheckboxConfig;
criteria: Array<CriteriaModel> = [];
atsFieldMapping?: string;
constructor() {
this.title = '';
}
}
Publish
- Update Version
npm login
(if you're not logged in already 😉)npm publish --dry-run
npm publish