@kbss-cvut/s-forms 0.4.2-alpha-8c711c4.0 → 0.4.2-alpha-e59e792.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.
@@ -7,11 +7,13 @@ declare const _default: ComponentMeta<{
7
7
  iconClass: import("prop-types").Requireable<string>;
8
8
  overlayPlacement: import("prop-types").Requireable<string>;
9
9
  absolutePosition: import("prop-types").Requireable<boolean>;
10
+ showOverlay: import("prop-types").Requireable<boolean>;
10
11
  };
11
12
  defaultProps: {
12
13
  iconClassContainer: string;
13
14
  iconClass: string;
14
15
  absolutePosition: boolean;
16
+ showOverlay: boolean;
15
17
  };
16
18
  }>;
17
19
  export default _default;
@@ -23,10 +25,12 @@ export declare const Default: ComponentStory<{
23
25
  iconClass: import("prop-types").Requireable<string>;
24
26
  overlayPlacement: import("prop-types").Requireable<string>;
25
27
  absolutePosition: import("prop-types").Requireable<boolean>;
28
+ showOverlay: import("prop-types").Requireable<boolean>;
26
29
  };
27
30
  defaultProps: {
28
31
  iconClassContainer: string;
29
32
  iconClass: string;
30
33
  absolutePosition: boolean;
34
+ showOverlay: boolean;
31
35
  };
32
36
  }>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kbss-cvut/s-forms",
3
- "version": "0.4.2-alpha-8c711c4.0",
3
+ "version": "0.4.2-alpha-e59e792.0",
4
4
  "description": "Semantic forms generator and processor",
5
5
  "keywords": [
6
6
  "react",
@@ -117,9 +117,8 @@
117
117
  "releaseCommitMessageFormat": "[{{currentTag}}] Bump version"
118
118
  },
119
119
  "files": [
120
- "dist/",
121
- "css/",
122
- "types/"
120
+ "dist/*.*",
121
+ "dist/**/*"
123
122
  ],
124
123
  "types": "./dist/s-forms.d.ts"
125
124
  }
@@ -1,216 +0,0 @@
1
- import * as React from "react";
2
- import { Modal } from "react-bootstrap";
3
- import { JsonLdObj } from "jsonld/jsonld-spec";
4
-
5
- export type Intl = {
6
- locale?: string;
7
- };
8
-
9
- export interface SOptions {
10
- intl?: Intl; // default 'en'
11
- i18n?: {
12
- "wizard.next": string; // default 'Next'
13
- "wizard.previous": string; // default 'Previous'
14
- "section.expand": string; // default 'Expand'
15
- "section.collapse": string; // default 'Collapse'
16
- };
17
- modalView?: boolean; // default false
18
- modalProps?: Modal;
19
- horizontalWizardNav?: boolean; // default true
20
- wizardStepButtons?: boolean; // default true
21
- enableForwardSkip?: boolean; // default false
22
- startingStep?: number; // default 0; indexed from 0
23
- startingQuestionId?: string; // default undefined; overrides startingStep
24
- }
25
-
26
- export interface SComponents {
27
- inputComponent?: React.ElementType;
28
- }
29
-
30
- export interface SComponentsOptions {
31
- dateTimeAnswer?: {
32
- dateFormat: string; // default 'yyyy-MM-dd'
33
- timeFormat: string; // default 'HH:mm:ss'
34
- dateTimeFormat: string; // default 'yyyy-MM-dd HH:mm:ss'
35
- };
36
- readOnly?: boolean; // default false
37
- }
38
-
39
- export interface SFormsProps {
40
- ref?: React.RefObject<HTMLDivElement>;
41
- form: object;
42
- options?: SOptions;
43
- components?: SComponents;
44
- componentsOptions?: SComponentsOptions;
45
- fetchTypeAheadValues: (query: string) => Promise<object>;
46
- isFormValid?: (isFormValid: boolean) => void;
47
- loader?: React.ElementType; // default <div>Loading SForms...</div>
48
- }
49
-
50
- type ArrayLengthMutationKeys =
51
- | "category-1"
52
- | "category-2"
53
- | "category-3"
54
- | "category-4"
55
- | "category-5";
56
- type ArrayItems<T extends Array<any>> = T extends Array<infer TItems>
57
- ? TItems
58
- : never;
59
- type FixedLengthArray<T extends any[]> = Pick<
60
- T,
61
- Exclude<keyof T, ArrayLengthMutationKeys>
62
- > & {
63
- [Symbol.iterator]: () => IterableIterator<ArrayItems<T>>;
64
- };
65
-
66
- export class Constants {
67
- static COLUMN_COUNT: string;
68
- static INPUT_LENGTH_THRESHOLD: string;
69
- static DATETIME_NUMBER_FORMAT: string;
70
- static FORM: string;
71
- static HAS_SUBQUESTION: string;
72
- static HAS_ANSWER: string;
73
- static HAS_OPTION: string;
74
- static HAS_OPTIONS_QUERY: string;
75
- static HAS_VALUE_TYPE: string;
76
- static IS_DISABLED: string;
77
- static INPUT_MASK: string;
78
- static LAYOUT_CLASS: string;
79
- static LAYOUT: {
80
- FORM: string;
81
- QUESTION_SECTION: string;
82
- WIZARD_STEP: string;
83
- DATE: string;
84
- TIME: string;
85
- DATETIME: string;
86
- TEXTAREA: string;
87
- TEXT: string;
88
- CHECKBOX: string;
89
- QUESTION_TYPEAHEAD: string;
90
- MASKED_INPUT: string;
91
- SPARQL: string;
92
- TURTLE: string;
93
- ANSWERABLE: string;
94
- COLLAPSED: string;
95
- DISABLED: string;
96
- EMPHASISED: string;
97
- HIDDEN: string;
98
- CATEGORY: FixedLengthArray<[string, string, string, string, string]>;
99
- };
100
- static VALUE_TYPE_CODE: string;
101
- static VALUE_TYPE_TEXT: string;
102
- static GENERATED_ROW_SIZE: string;
103
- static HAS_QUESTION_ORIGIN: string;
104
- static HAS_ANSWER_ORIGIN: string;
105
- static HAS_DATA_VALUE: string;
106
- static HAS_OBJECT_VALUE: string;
107
- static HELP_DESCRIPTION: string;
108
- static XSD: {
109
- MAX_EXCLUSIVE: string;
110
- MAX_INCLUSIVE: string;
111
- MIN_EXCLUSIVE: string;
112
- MIN_INCLUSIVE: string;
113
- INT: string;
114
- INTEGER: string;
115
- NEGATIVE_INTEGER: string;
116
- NON_NEGATIVE_INTEGER: string;
117
- NON_POSITIVE_INTEGER: string;
118
- POSITIVE_INTEGER: string;
119
- BOOLEAN: string;
120
- };
121
- static ACCEPTS_ANSWER_VALUE: string;
122
- static HAS_DATATYPE: string;
123
- static HAS_LAYOUT_CLASS: string;
124
- static HAS_POSSIBLE_VALUES_QUERY: string;
125
- static HAS_REQUIRED_VALUE: string;
126
- static HAS_TESTED_QUESTION: string;
127
- static HAS_UNIT: string;
128
- static HAS_VALID_ANSWER: string;
129
- static IS_RELEVANT_IF: string;
130
- static ACCEPTS_VALIDATION_VALUE: string;
131
- static HAS_VALIDATION_MESSAGE: string;
132
- static NEGATIVE_CONDITION: string;
133
- static REQUIRES_ANSWER: string;
134
- static REQUIRES_ANSWER_DESCRIPTION_IF: string;
135
- static REQUIRES_ANSWER_IF: string;
136
- static REQUIRES_ANSWER_VALUE: string;
137
- static REQUIRES_DESCRIPTION: string;
138
- static HAS_PRECEDING_QUESTION: string;
139
- static HAS_PRECEDING_VALUE: string;
140
- static HAS_MEDIA_CONTENT: string;
141
- static CONDITION: string;
142
- static HAS_PATTERN: string;
143
- static HAS_DECLARED_PREFIX: string;
144
- static PREFIX: string;
145
- static NAMESPACE: string;
146
-
147
- static RDFS_LABEL: string;
148
- static RDFS_COMMENT: string;
149
- static DEFAULT_HAS_CHILD: string;
150
-
151
- static ICONS: {
152
- QUESTION_COMMENTS: string;
153
- QUESTION_HELP: string;
154
- QUESTION_LINK: string;
155
- };
156
-
157
- static ICON_BEHAVIOR: {
158
- ENABLE: string;
159
- DISABLE: string;
160
- ON_HOVER: string;
161
- };
162
- }
163
-
164
- export class JsonLdObjectUtils {
165
- static getFirstObject(subject, predicate): any;
166
- static compareValues(jsonLdValue1, jsonLdValue2): any;
167
- static toplogicalSort(data, gtProperty): any;
168
- static orderPreservingToplogicalSort(data, gtProperty): any;
169
- static getCompareLocalizedLabelFunction(intl): any;
170
- static orderByLocalizedLabels(data, intl): any;
171
- }
172
-
173
- export class JsonLdFramingUtils {
174
- static customFrame(input, shape, callback): any;
175
- static expandStructure(structure: JsonLdObj): JsonLdObj;
176
- static compressStructure(structure: JsonLdObj): JsonLdObj;
177
- }
178
-
179
- export class JsonLdObjectMap {
180
- static putObject(id, question): void;
181
- static getObject(id): any;
182
- }
183
-
184
- export class FormUtils {
185
- static isForm(structure): boolean;
186
- static isWizardStep(structure): boolean;
187
- static isSection(question): boolean;
188
- static isAnswerable(question): boolean;
189
- static isTypeahead(question): boolean;
190
- static getPossibleValuesQuery(question): boolean;
191
- static isDisabled(question): boolean;
192
- static isHidden(question): boolean;
193
- static isTextarea(question, answerValue): boolean;
194
- static isText(question): boolean;
195
- static isCalendar(question): boolean;
196
- static isDate(question): boolean;
197
- static isTime(question): boolean;
198
- static isDateTime(question): boolean;
199
- static isCheckbox(question): boolean;
200
- static isMaskedInput(question): boolean;
201
- static isSparqlInput(question): boolean;
202
- static isTurtleInput(question): boolean;
203
- static isCollapsed(question): boolean;
204
- static getCategory(question): string;
205
- static isEmphasised(question): boolean;
206
- static resolveValue(answer): any;
207
- static resolveValueObject(answer): any;
208
- static isRelevant(question): boolean;
209
- static hasValidationLogic(question): boolean;
210
- static isValid(question): boolean;
211
- static testCondition(condition): boolean;
212
- }
213
-
214
- declare const SForms: React.ForwardRefExoticComponent<SFormsProps>;
215
-
216
- export default SForms;