@kbss-cvut/s-forms 0.7.1-beta-b00a1cf.0 → 0.7.1-beta-c22f5eb.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/components/Answer.d.ts +13 -13
- package/dist/components/DefaultInput.d.ts +39 -39
- package/dist/components/FormManager.d.ts +23 -23
- package/dist/components/FormWindow.d.ts +3 -3
- package/dist/components/HelpIcon.d.ts +20 -20
- package/dist/components/IconOverlay.d.ts +17 -17
- package/dist/components/LinkIcon.d.ts +20 -20
- package/dist/components/MaskedInput.d.ts +41 -42
- package/dist/components/MediaContent.d.ts +5 -6
- package/dist/components/PrefixIcon.d.ts +21 -21
- package/dist/components/Question.d.ts +86 -86
- package/dist/components/QuestionStatic.d.ts +9 -9
- package/dist/components/SForms.d.ts +3 -3
- package/dist/components/answer/CheckboxAnswer.d.ts +23 -23
- package/dist/components/answer/DateTimeAnswer.d.ts +12 -12
- package/dist/components/answer/InputAnswer.d.ts +25 -25
- package/dist/components/answer/MaskedInputAnswer.d.ts +13 -13
- package/dist/components/answer/SelectAnswer.d.ts +27 -27
- package/dist/components/answer/TypeaheadAnswer.d.ts +13 -13
- package/dist/components/comment/CommentForm.d.ts +8 -8
- package/dist/components/comment/CommentList.d.ts +6 -7
- package/dist/components/comment/CommentView.d.ts +13 -13
- package/dist/components/comment/QuestionCommentIcon.d.ts +9 -9
- package/dist/components/wizard/HorizontalWizardNav.d.ts +14 -14
- package/dist/components/wizard/VerticalWizardNav.d.ts +14 -14
- package/dist/components/wizard/Wizard.d.ts +2 -2
- package/dist/components/wizard/WizardStep.d.ts +25 -25
- package/dist/constants/Constants.d.ts +127 -127
- package/dist/contexts/ConfigurationContext.d.ts +15 -15
- package/dist/contexts/FormGenContext.d.ts +13 -13
- package/dist/contexts/FormQuestionsContext.d.ts +12 -12
- package/dist/contexts/IntlContextProvider.d.ts +8 -8
- package/dist/model/DefaultFormGenerator.d.ts +8 -8
- package/dist/model/FormGenerator.d.ts +20 -20
- package/dist/model/QuestionAnswerProcessor.d.ts +44 -44
- package/dist/model/ValidatorFactory.d.ts +5 -5
- package/dist/s-forms.cjs +1 -1
- package/dist/s-forms.cjs.map +1 -1
- package/dist/s-forms.d.ts +16 -16
- package/dist/s-forms.js +1 -1
- package/dist/s-forms.js.map +1 -1
- package/dist/s-forms.modern.js +1 -1
- package/dist/s-forms.modern.js.map +1 -1
- package/dist/s-forms.umd.js +1 -1
- package/dist/s-forms.umd.js.map +1 -1
- package/dist/stories/Answer.stories.d.ts +12 -12
- package/dist/stories/CommentForm.stories.d.ts +3 -3
- package/dist/stories/HelpIcon.stories.d.ts +4 -4
- package/dist/stories/LinkIcon.stories.d.ts +3 -3
- package/dist/stories/PrefixIcon.stories.d.ts +3 -3
- package/dist/stories/Question.stories.d.ts +11 -11
- package/dist/stories/QuestionCommentIcon.stories.d.ts +4 -4
- package/dist/stories/SForms.stories.d.ts +8 -8
- package/dist/styles/icons/ArrowRight.d.ts +2 -2
- package/dist/styles/icons/CaretSquareDown.d.ts +4 -4
- package/dist/styles/icons/CaretSquareUp.d.ts +4 -4
- package/dist/styles/icons/Close.d.ts +2 -2
- package/dist/styles/icons/CommentBubble.d.ts +2 -2
- package/dist/styles/icons/ExternalLink.d.ts +2 -2
- package/dist/styles/icons/InfoCircle.d.ts +2 -2
- package/dist/styles/icons/QuestionCircle.d.ts +2 -2
- package/dist/styles/icons/RecycleBin.d.ts +2 -2
- package/dist/styles/icons/index.d.ts +4 -4
- package/dist/util/FormUtils.d.ts +40 -40
- package/dist/util/JsonLdFramingUtils.d.ts +16 -16
- package/dist/util/JsonLdObjectMap.d.ts +5 -5
- package/dist/util/JsonLdObjectUtils.d.ts +32 -32
- package/dist/util/Logger.d.ts +5 -5
- package/dist/util/MaskMapper.d.ts +12 -12
- package/dist/util/Utils.d.ts +15 -15
- package/package.json +5 -6
- package/dist/components/answer/OptimizedMenuList.d.ts +0 -5
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
export default class Constants {
|
|
2
|
-
static COLUMN_COUNT: number;
|
|
3
|
-
static INPUT_LENGTH_THRESHOLD: number;
|
|
4
|
-
static DATETIME_NUMBER_FORMAT: string;
|
|
5
|
-
/**
|
|
6
|
-
* Contains mainly definition of constants used to parse the form declaration.
|
|
7
|
-
*/
|
|
8
|
-
static FORM: string;
|
|
9
|
-
static HAS_SUBQUESTION: string;
|
|
10
|
-
static HAS_ANSWER: string;
|
|
11
|
-
static HAS_OPTION: string;
|
|
12
|
-
static HAS_OPTIONS_QUERY: string;
|
|
13
|
-
static HAS_VALUE_TYPE: string;
|
|
14
|
-
static IS_DISABLED: string;
|
|
15
|
-
static INPUT_MASK: string;
|
|
16
|
-
static LAYOUT_CLASS: string;
|
|
17
|
-
static LAYOUT: {
|
|
18
|
-
FORM: string;
|
|
19
|
-
QUESTION_SECTION: string;
|
|
20
|
-
WIZARD_STEP: string;
|
|
21
|
-
DATE: string;
|
|
22
|
-
TIME: string;
|
|
23
|
-
DATETIME: string;
|
|
24
|
-
TEXT: string;
|
|
25
|
-
TEXTAREA: string;
|
|
26
|
-
CHECKBOX: string;
|
|
27
|
-
QUESTION_TYPEAHEAD: string;
|
|
28
|
-
MASKED_INPUT: string;
|
|
29
|
-
ANSWERABLE: string;
|
|
30
|
-
SPARQL: string;
|
|
31
|
-
TURTLE: string;
|
|
32
|
-
DISABLED: string;
|
|
33
|
-
HIDDEN: string;
|
|
34
|
-
COLLAPSED: string;
|
|
35
|
-
EMPHASISED: string;
|
|
36
|
-
EMPHASISE_ON_RELEVANT: string;
|
|
37
|
-
CATEGORY: string[];
|
|
38
|
-
};
|
|
39
|
-
static HAS_INITIAL_INPUT_LENGTH: string;
|
|
40
|
-
static VALUE_TYPE_CODE: string;
|
|
41
|
-
static VALUE_TYPE_TEXT: string;
|
|
42
|
-
static GENERATED_ROW_SIZE: number;
|
|
43
|
-
static HAS_QUESTION_ORIGIN: string;
|
|
44
|
-
static HAS_ANSWER_ORIGIN: string;
|
|
45
|
-
static HAS_DATA_VALUE: string;
|
|
46
|
-
static HAS_OBJECT_VALUE: string;
|
|
47
|
-
static HELP_DESCRIPTION: string;
|
|
48
|
-
static SOURCE: string;
|
|
49
|
-
static XSD: {
|
|
50
|
-
MAX_EXCLUSIVE: string;
|
|
51
|
-
MAX_INCLUSIVE: string;
|
|
52
|
-
MIN_EXCLUSIVE: string;
|
|
53
|
-
MIN_INCLUSIVE: string;
|
|
54
|
-
INT: string;
|
|
55
|
-
INTEGER: string;
|
|
56
|
-
NEGATIVE_INTEGER: string;
|
|
57
|
-
NON_NEGATIVE_INTEGER: string;
|
|
58
|
-
NON_POSITIVE_INTEGER: string;
|
|
59
|
-
POSITIVE_INTEGER: string;
|
|
60
|
-
BOOLEAN: string;
|
|
61
|
-
};
|
|
62
|
-
static STEP: string;
|
|
63
|
-
static ACCEPTS_ANSWER_VALUE: string;
|
|
64
|
-
static ACCEPTS: string;
|
|
65
|
-
static HAS_DATATYPE: string;
|
|
66
|
-
static HAS_LAYOUT_CLASS: string;
|
|
67
|
-
static HAS_POSSIBLE_VALUES_QUERY: string;
|
|
68
|
-
static HAS_REQUIRED_VALUE: string;
|
|
69
|
-
static HAS_TESTED_QUESTION: string;
|
|
70
|
-
static HAS_TESTED_FORM: string;
|
|
71
|
-
static HAS_UNIT: string;
|
|
72
|
-
static HAS_VALID_ANSWER: string;
|
|
73
|
-
static IS_RELEVANT_IF: string;
|
|
74
|
-
static ACCEPTS_VALIDATION_VALUE: string;
|
|
75
|
-
static HAS_VALIDATION_MESSAGE: string;
|
|
76
|
-
static NEGATIVE_CONDITION: string;
|
|
77
|
-
static REQUIRES_ANSWER: string;
|
|
78
|
-
static REQUIRES_ANSWER_DESCRIPTION_IF: string;
|
|
79
|
-
static REQUIRES_ANSWER_IF: string;
|
|
80
|
-
static REQUIRES_ANSWER_VALUE: string;
|
|
81
|
-
static REQUIRES_DESCRIPTION: string;
|
|
82
|
-
static HAS_PRECEDING_QUESTION: string;
|
|
83
|
-
static HAS_PRECEDING_VALUE: string;
|
|
84
|
-
static HAS_MEDIA_CONTENT: string;
|
|
85
|
-
static CONDITION: string;
|
|
86
|
-
static OR_CONDITION: string;
|
|
87
|
-
static HAS_SUB_CONDITION: string;
|
|
88
|
-
static HAS_PATTERN: string;
|
|
89
|
-
static HAS_DECLARED_PREFIX: string;
|
|
90
|
-
static PREFIX: string;
|
|
91
|
-
static NAMESPACE: string;
|
|
92
|
-
static HAS_COMMENT: string;
|
|
93
|
-
static HAS_COMMENT_VALUE: string;
|
|
94
|
-
static HAS_AUTHOR: string;
|
|
95
|
-
static HAS_TIMESTAMP: string;
|
|
96
|
-
static NOT_ANSWERED_QUESTION: string;
|
|
97
|
-
static ANSWERED_QUESTION: string;
|
|
98
|
-
static RDFS_LABEL: any;
|
|
99
|
-
static RDFS_COMMENT: any;
|
|
100
|
-
static DEFAULT_HAS_CHILD: any;
|
|
101
|
-
static ICONS: {
|
|
102
|
-
QUESTION_COMMENTS: string;
|
|
103
|
-
QUESTION_HELP: string;
|
|
104
|
-
QUESTION_LINK: string;
|
|
105
|
-
};
|
|
106
|
-
static ICON_BEHAVIOR: {
|
|
107
|
-
ENABLE: string;
|
|
108
|
-
DISABLE: string;
|
|
109
|
-
ON_HOVER: string;
|
|
110
|
-
};
|
|
111
|
-
static DEFAULT_OPTIONS: {
|
|
112
|
-
icons: {
|
|
113
|
-
id: string;
|
|
114
|
-
behavior: string;
|
|
115
|
-
}[];
|
|
116
|
-
};
|
|
117
|
-
static LANG: {
|
|
118
|
-
cs: {
|
|
119
|
-
locale: string;
|
|
120
|
-
label: string;
|
|
121
|
-
};
|
|
122
|
-
en: {
|
|
123
|
-
locale: string;
|
|
124
|
-
label: string;
|
|
125
|
-
};
|
|
126
|
-
};
|
|
127
|
-
}
|
|
1
|
+
export default class Constants {
|
|
2
|
+
static COLUMN_COUNT: number;
|
|
3
|
+
static INPUT_LENGTH_THRESHOLD: number;
|
|
4
|
+
static DATETIME_NUMBER_FORMAT: string;
|
|
5
|
+
/**
|
|
6
|
+
* Contains mainly definition of constants used to parse the form declaration.
|
|
7
|
+
*/
|
|
8
|
+
static FORM: string;
|
|
9
|
+
static HAS_SUBQUESTION: string;
|
|
10
|
+
static HAS_ANSWER: string;
|
|
11
|
+
static HAS_OPTION: string;
|
|
12
|
+
static HAS_OPTIONS_QUERY: string;
|
|
13
|
+
static HAS_VALUE_TYPE: string;
|
|
14
|
+
static IS_DISABLED: string;
|
|
15
|
+
static INPUT_MASK: string;
|
|
16
|
+
static LAYOUT_CLASS: string;
|
|
17
|
+
static LAYOUT: {
|
|
18
|
+
FORM: string;
|
|
19
|
+
QUESTION_SECTION: string;
|
|
20
|
+
WIZARD_STEP: string;
|
|
21
|
+
DATE: string;
|
|
22
|
+
TIME: string;
|
|
23
|
+
DATETIME: string;
|
|
24
|
+
TEXT: string;
|
|
25
|
+
TEXTAREA: string;
|
|
26
|
+
CHECKBOX: string;
|
|
27
|
+
QUESTION_TYPEAHEAD: string;
|
|
28
|
+
MASKED_INPUT: string;
|
|
29
|
+
ANSWERABLE: string;
|
|
30
|
+
SPARQL: string;
|
|
31
|
+
TURTLE: string;
|
|
32
|
+
DISABLED: string;
|
|
33
|
+
HIDDEN: string;
|
|
34
|
+
COLLAPSED: string;
|
|
35
|
+
EMPHASISED: string;
|
|
36
|
+
EMPHASISE_ON_RELEVANT: string;
|
|
37
|
+
CATEGORY: string[];
|
|
38
|
+
};
|
|
39
|
+
static HAS_INITIAL_INPUT_LENGTH: string;
|
|
40
|
+
static VALUE_TYPE_CODE: string;
|
|
41
|
+
static VALUE_TYPE_TEXT: string;
|
|
42
|
+
static GENERATED_ROW_SIZE: number;
|
|
43
|
+
static HAS_QUESTION_ORIGIN: string;
|
|
44
|
+
static HAS_ANSWER_ORIGIN: string;
|
|
45
|
+
static HAS_DATA_VALUE: string;
|
|
46
|
+
static HAS_OBJECT_VALUE: string;
|
|
47
|
+
static HELP_DESCRIPTION: string;
|
|
48
|
+
static SOURCE: string;
|
|
49
|
+
static XSD: {
|
|
50
|
+
MAX_EXCLUSIVE: string;
|
|
51
|
+
MAX_INCLUSIVE: string;
|
|
52
|
+
MIN_EXCLUSIVE: string;
|
|
53
|
+
MIN_INCLUSIVE: string;
|
|
54
|
+
INT: string;
|
|
55
|
+
INTEGER: string;
|
|
56
|
+
NEGATIVE_INTEGER: string;
|
|
57
|
+
NON_NEGATIVE_INTEGER: string;
|
|
58
|
+
NON_POSITIVE_INTEGER: string;
|
|
59
|
+
POSITIVE_INTEGER: string;
|
|
60
|
+
BOOLEAN: string;
|
|
61
|
+
};
|
|
62
|
+
static STEP: string;
|
|
63
|
+
static ACCEPTS_ANSWER_VALUE: string;
|
|
64
|
+
static ACCEPTS: string;
|
|
65
|
+
static HAS_DATATYPE: string;
|
|
66
|
+
static HAS_LAYOUT_CLASS: string;
|
|
67
|
+
static HAS_POSSIBLE_VALUES_QUERY: string;
|
|
68
|
+
static HAS_REQUIRED_VALUE: string;
|
|
69
|
+
static HAS_TESTED_QUESTION: string;
|
|
70
|
+
static HAS_TESTED_FORM: string;
|
|
71
|
+
static HAS_UNIT: string;
|
|
72
|
+
static HAS_VALID_ANSWER: string;
|
|
73
|
+
static IS_RELEVANT_IF: string;
|
|
74
|
+
static ACCEPTS_VALIDATION_VALUE: string;
|
|
75
|
+
static HAS_VALIDATION_MESSAGE: string;
|
|
76
|
+
static NEGATIVE_CONDITION: string;
|
|
77
|
+
static REQUIRES_ANSWER: string;
|
|
78
|
+
static REQUIRES_ANSWER_DESCRIPTION_IF: string;
|
|
79
|
+
static REQUIRES_ANSWER_IF: string;
|
|
80
|
+
static REQUIRES_ANSWER_VALUE: string;
|
|
81
|
+
static REQUIRES_DESCRIPTION: string;
|
|
82
|
+
static HAS_PRECEDING_QUESTION: string;
|
|
83
|
+
static HAS_PRECEDING_VALUE: string;
|
|
84
|
+
static HAS_MEDIA_CONTENT: string;
|
|
85
|
+
static CONDITION: string;
|
|
86
|
+
static OR_CONDITION: string;
|
|
87
|
+
static HAS_SUB_CONDITION: string;
|
|
88
|
+
static HAS_PATTERN: string;
|
|
89
|
+
static HAS_DECLARED_PREFIX: string;
|
|
90
|
+
static PREFIX: string;
|
|
91
|
+
static NAMESPACE: string;
|
|
92
|
+
static HAS_COMMENT: string;
|
|
93
|
+
static HAS_COMMENT_VALUE: string;
|
|
94
|
+
static HAS_AUTHOR: string;
|
|
95
|
+
static HAS_TIMESTAMP: string;
|
|
96
|
+
static NOT_ANSWERED_QUESTION: string;
|
|
97
|
+
static ANSWERED_QUESTION: string;
|
|
98
|
+
static RDFS_LABEL: any;
|
|
99
|
+
static RDFS_COMMENT: any;
|
|
100
|
+
static DEFAULT_HAS_CHILD: any;
|
|
101
|
+
static ICONS: {
|
|
102
|
+
QUESTION_COMMENTS: string;
|
|
103
|
+
QUESTION_HELP: string;
|
|
104
|
+
QUESTION_LINK: string;
|
|
105
|
+
};
|
|
106
|
+
static ICON_BEHAVIOR: {
|
|
107
|
+
ENABLE: string;
|
|
108
|
+
DISABLE: string;
|
|
109
|
+
ON_HOVER: string;
|
|
110
|
+
};
|
|
111
|
+
static DEFAULT_OPTIONS: {
|
|
112
|
+
icons: {
|
|
113
|
+
id: string;
|
|
114
|
+
behavior: string;
|
|
115
|
+
}[];
|
|
116
|
+
};
|
|
117
|
+
static LANG: {
|
|
118
|
+
cs: {
|
|
119
|
+
locale: string;
|
|
120
|
+
label: string;
|
|
121
|
+
};
|
|
122
|
+
en: {
|
|
123
|
+
locale: string;
|
|
124
|
+
label: string;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export const ConfigurationContext: React.Context<{}>;
|
|
2
|
-
export function ConfigurationContextProvider({ children, ...props }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
children: any;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
export namespace ConfigurationContextProvider {
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
import React from "react";
|
|
15
|
-
import PropTypes from "prop-types";
|
|
1
|
+
export const ConfigurationContext: React.Context<{}>;
|
|
2
|
+
export function ConfigurationContextProvider({ children, ...props }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export namespace ConfigurationContextProvider {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
9
|
+
let components: PropTypes.Requireable<object>;
|
|
10
|
+
let mapComponent: PropTypes.Requireable<(...args: any[]) => any>;
|
|
11
|
+
let options: PropTypes.Requireable<object>;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
import React from "react";
|
|
15
|
+
import PropTypes from "prop-types";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export const FormGenContext: React.Context<{}>;
|
|
2
|
-
export function FormGenContextProvider({ children, ...props }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
children: any;
|
|
5
|
-
}): JSX.Element;
|
|
6
|
-
export namespace FormGenContextProvider {
|
|
7
|
-
namespace propTypes {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
import React from "react";
|
|
13
|
-
import PropTypes from "prop-types";
|
|
1
|
+
export const FormGenContext: React.Context<{}>;
|
|
2
|
+
export function FormGenContextProvider({ children, ...props }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
children: any;
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export namespace FormGenContextProvider {
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
let children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
9
|
+
let fetchTypeAheadValues: PropTypes.Requireable<(...args: any[]) => any>;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
import React from "react";
|
|
13
|
+
import PropTypes from "prop-types";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export const FormQuestionsContext: React.Context<{}>;
|
|
2
|
-
export function FormQuestionsProvider(props: any): JSX.Element;
|
|
3
|
-
export namespace FormQuestionsProvider {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
import React from "react";
|
|
12
|
-
import PropTypes from "prop-types";
|
|
1
|
+
export const FormQuestionsContext: React.Context<{}>;
|
|
2
|
+
export function FormQuestionsProvider(props: any): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
export namespace FormQuestionsProvider {
|
|
4
|
+
namespace propTypes {
|
|
5
|
+
let children: PropTypes.Validator<PropTypes.ReactElementLike>;
|
|
6
|
+
let data: PropTypes.Validator<object>;
|
|
7
|
+
let formQuestions: PropTypes.Validator<any[]>;
|
|
8
|
+
let isFormValid: PropTypes.Requireable<(...args: any[]) => any>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
import React from "react";
|
|
12
|
+
import PropTypes from "prop-types";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React, { ReactNode } from "react";
|
|
2
|
-
export declare const IntlContext: React.Context<{}>;
|
|
3
|
-
interface Props {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
locale?: string;
|
|
6
|
-
}
|
|
7
|
-
declare const IntlContextProvider: ({ children, locale, }: Props) => JSX.Element;
|
|
8
|
-
export default IntlContextProvider;
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export declare const IntlContext: React.Context<{}>;
|
|
3
|
+
interface Props {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
locale?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const IntlContextProvider: ({ children, locale, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default IntlContextProvider;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export default class DefaultFormGenerator {
|
|
2
|
-
/**
|
|
3
|
-
* Generates default form for the wizard framework.
|
|
4
|
-
*
|
|
5
|
-
* The form consists of a single step, which contains one text area for the description.
|
|
6
|
-
*/
|
|
7
|
-
static generateForm(): any;
|
|
8
|
-
}
|
|
1
|
+
export default class DefaultFormGenerator {
|
|
2
|
+
/**
|
|
3
|
+
* Generates default form for the wizard framework.
|
|
4
|
+
*
|
|
5
|
+
* The form consists of a single step, which contains one text area for the description.
|
|
6
|
+
*/
|
|
7
|
+
static generateForm(): any;
|
|
8
|
+
}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
export default class FormGenerator {
|
|
2
|
-
/**
|
|
3
|
-
* Generates a default form with one-step wizard.
|
|
4
|
-
*
|
|
5
|
-
* @param intl Preferred language of questions
|
|
6
|
-
*
|
|
7
|
-
* @return Form definition (a one-step wizard with one question) and form data
|
|
8
|
-
*/
|
|
9
|
-
static constructDefaultForm(intl: any): any[];
|
|
10
|
-
/**
|
|
11
|
-
* Generates form definition from the specified data-enriched template.
|
|
12
|
-
*
|
|
13
|
-
* @param structure The form structure in JSON-LD
|
|
14
|
-
* @param intl Preferred language of questions
|
|
15
|
-
*
|
|
16
|
-
* @return Promise with generated form definition and form data
|
|
17
|
-
*/
|
|
18
|
-
static constructForm(structure: any, intl: any): Promise<any>;
|
|
19
|
-
static _constructFormQuestions(structure: any, intl: any): any[];
|
|
20
|
-
}
|
|
1
|
+
export default class FormGenerator {
|
|
2
|
+
/**
|
|
3
|
+
* Generates a default form with one-step wizard.
|
|
4
|
+
*
|
|
5
|
+
* @param intl Preferred language of questions
|
|
6
|
+
*
|
|
7
|
+
* @return Form definition (a one-step wizard with one question) and form data
|
|
8
|
+
*/
|
|
9
|
+
static constructDefaultForm(intl: any): any[];
|
|
10
|
+
/**
|
|
11
|
+
* Generates form definition from the specified data-enriched template.
|
|
12
|
+
*
|
|
13
|
+
* @param structure The form structure in JSON-LD
|
|
14
|
+
* @param intl Preferred language of questions
|
|
15
|
+
*
|
|
16
|
+
* @return Promise with generated form definition and form data
|
|
17
|
+
*/
|
|
18
|
+
static constructForm(structure: any, intl: any): Promise<any>;
|
|
19
|
+
static _constructFormQuestions(structure: any, intl: any): any[];
|
|
20
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
export default class QuestionAnswerProcessor {
|
|
2
|
-
/**
|
|
3
|
-
* Builds question answer model from the specified wizard data.
|
|
4
|
-
* @param wizardData Global wizard data
|
|
5
|
-
* @param stepData Data from individual wizard steps
|
|
6
|
-
*/
|
|
7
|
-
static buildQuestionAnswerModel(wizardData: any, stepData: any): {
|
|
8
|
-
subQuestions: never[];
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Transforms the QA hierarchy from JSON-LD-based structure to the object model-based one.
|
|
12
|
-
* @param rootQuestion
|
|
13
|
-
*/
|
|
14
|
-
static processQuestionAnswerHierarchy(rootQuestion: any): {
|
|
15
|
-
uri: any;
|
|
16
|
-
origin: any;
|
|
17
|
-
subQuestions: any[];
|
|
18
|
-
answers: any[];
|
|
19
|
-
comments: any[];
|
|
20
|
-
} | null;
|
|
21
|
-
static _processQuestion(question: any): {
|
|
22
|
-
uri: any;
|
|
23
|
-
origin: any;
|
|
24
|
-
subQuestions: any[];
|
|
25
|
-
answers: any[];
|
|
26
|
-
comments: any[];
|
|
27
|
-
};
|
|
28
|
-
static processComment(comment: any): {
|
|
29
|
-
author: any;
|
|
30
|
-
value: any;
|
|
31
|
-
timestamp: any;
|
|
32
|
-
};
|
|
33
|
-
static processAnswer(answer: any): {
|
|
34
|
-
uri: any;
|
|
35
|
-
origin: any;
|
|
36
|
-
codeValue: any;
|
|
37
|
-
textValue: any;
|
|
38
|
-
};
|
|
39
|
-
/**
|
|
40
|
-
* Generates an empty answer for the specified question
|
|
41
|
-
* @param question
|
|
42
|
-
*/
|
|
43
|
-
static generateAnswer(question: any): {};
|
|
44
|
-
}
|
|
1
|
+
export default class QuestionAnswerProcessor {
|
|
2
|
+
/**
|
|
3
|
+
* Builds question answer model from the specified wizard data.
|
|
4
|
+
* @param wizardData Global wizard data
|
|
5
|
+
* @param stepData Data from individual wizard steps
|
|
6
|
+
*/
|
|
7
|
+
static buildQuestionAnswerModel(wizardData: any, stepData: any): {
|
|
8
|
+
subQuestions: never[];
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Transforms the QA hierarchy from JSON-LD-based structure to the object model-based one.
|
|
12
|
+
* @param rootQuestion
|
|
13
|
+
*/
|
|
14
|
+
static processQuestionAnswerHierarchy(rootQuestion: any): {
|
|
15
|
+
uri: any;
|
|
16
|
+
origin: any;
|
|
17
|
+
subQuestions: any[];
|
|
18
|
+
answers: any[];
|
|
19
|
+
comments: any[];
|
|
20
|
+
} | null;
|
|
21
|
+
static _processQuestion(question: any): {
|
|
22
|
+
uri: any;
|
|
23
|
+
origin: any;
|
|
24
|
+
subQuestions: any[];
|
|
25
|
+
answers: any[];
|
|
26
|
+
comments: any[];
|
|
27
|
+
};
|
|
28
|
+
static processComment(comment: any): {
|
|
29
|
+
author: any;
|
|
30
|
+
value: any;
|
|
31
|
+
timestamp: any;
|
|
32
|
+
};
|
|
33
|
+
static processAnswer(answer: any): {
|
|
34
|
+
uri: any;
|
|
35
|
+
origin: any;
|
|
36
|
+
codeValue: any;
|
|
37
|
+
textValue: any;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Generates an empty answer for the specified question
|
|
41
|
+
* @param question
|
|
42
|
+
*/
|
|
43
|
+
static generateAnswer(question: any): {};
|
|
44
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export default class ValidatorFactory {
|
|
2
|
-
static createValidator(question: any, intl: any): (answer: any) => {};
|
|
3
|
-
static _generateRequiresAnswerValidator(question: any, intl: any): (answer: any) => {};
|
|
4
|
-
static _generateRequiresAnswerCheckBoxValidator(question: any, intl: any): (answer: any) => {};
|
|
5
|
-
}
|
|
1
|
+
export default class ValidatorFactory {
|
|
2
|
+
static createValidator(question: any, intl: any): (answer: any) => {};
|
|
3
|
+
static _generateRequiresAnswerValidator(question: any, intl: any): (answer: any) => {};
|
|
4
|
+
static _generateRequiresAnswerCheckBoxValidator(question: any, intl: any): (answer: any) => {};
|
|
5
|
+
}
|