@web-site-utilities/feedback 0.0.6 → 0.0.8
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/common/components/Checkbox.d.ts +1 -1
- package/dist/common/components/QuestionMatrix.d.ts +1 -1
- package/dist/common/components/Radio.d.ts +2 -2
- package/dist/common/components/Rating.d.ts +1 -1
- package/dist/common/components/Select.d.ts +1 -2
- package/dist/common/components/Textarea.d.ts +1 -2
- package/dist/fields/Field/Field.d.ts +2 -41
- package/dist/form/index.d.ts +46 -3
- package/dist/index.cjs.js +22 -22
- package/dist/index.d.ts +47 -2
- package/dist/index.es.js +993 -896
- package/dist/index.iife.js +22 -22
- package/package.json +1 -1
|
@@ -25,7 +25,7 @@ export declare const Checkbox: (props: CheckboxProps) => React.DOMElement<{
|
|
|
25
25
|
children?: React.ReactNode;
|
|
26
26
|
}>)[];
|
|
27
27
|
}, Element>;
|
|
28
|
-
type CheckboxGroupProps = {
|
|
28
|
+
export type CheckboxGroupProps = {
|
|
29
29
|
options: Options;
|
|
30
30
|
onChange: (value: Array<string>) => void;
|
|
31
31
|
elementsPerCol?: number;
|
|
@@ -13,7 +13,7 @@ export declare const QuestionMatrixItem: (props: QuestionMatrixItemProps) => Rea
|
|
|
13
13
|
$outlined: boolean;
|
|
14
14
|
children: string;
|
|
15
15
|
}, Element>;
|
|
16
|
-
type QuestionMatrixProps = {
|
|
16
|
+
export type QuestionMatrixProps = {
|
|
17
17
|
value: Nullable<number>;
|
|
18
18
|
minText?: string;
|
|
19
19
|
colorVariant?: Variants;
|
|
@@ -27,7 +27,7 @@ export declare const Radio: (props: RadioProps) => React.DOMElement<{
|
|
|
27
27
|
name: string;
|
|
28
28
|
}, Element>)[];
|
|
29
29
|
}, Element>;
|
|
30
|
-
type
|
|
30
|
+
export type RadioGroupProps = {
|
|
31
31
|
options: Options;
|
|
32
32
|
onChange: (value: string) => void;
|
|
33
33
|
value: Nullable<string>;
|
|
@@ -35,7 +35,7 @@ type CheckboxGroupProps = {
|
|
|
35
35
|
colorVariant?: Variants;
|
|
36
36
|
label: string;
|
|
37
37
|
} & CommonFieldProps;
|
|
38
|
-
export declare const RadioGroup: (props:
|
|
38
|
+
export declare const RadioGroup: (props: RadioGroupProps) => React.DetailedReactHTMLElement<{
|
|
39
39
|
children: (React.FunctionComponentElement<{
|
|
40
40
|
variant?: "title" | "section" | "subtitle" | "subsection" | "paragraph";
|
|
41
41
|
linear?: boolean;
|
|
@@ -9,7 +9,7 @@ type RatingItemProps = {
|
|
|
9
9
|
icon?: 'star' | 'star2' | 'heart';
|
|
10
10
|
};
|
|
11
11
|
export declare const RatingItem: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, RatingItemProps>> & string;
|
|
12
|
-
type RatingProps = {
|
|
12
|
+
export type RatingProps = {
|
|
13
13
|
value: number;
|
|
14
14
|
label: string;
|
|
15
15
|
onChange: (value: number) => void;
|
|
@@ -3,7 +3,7 @@ import { Variants } from '../theme/ThemeProvider';
|
|
|
3
3
|
import { CommonFieldProps } from '../types/CommonFieldProps';
|
|
4
4
|
import { Nullable } from '../types/Nullable';
|
|
5
5
|
import { Options } from '../types/Option';
|
|
6
|
-
type SelectProps = {
|
|
6
|
+
export type SelectProps = {
|
|
7
7
|
label: string;
|
|
8
8
|
value: Nullable<string>;
|
|
9
9
|
colorVariant?: Variants;
|
|
@@ -36,4 +36,3 @@ export declare const Select: (props: SelectProps) => React.DetailedReactHTMLElem
|
|
|
36
36
|
}, Element>[])[];
|
|
37
37
|
}, Element>)[];
|
|
38
38
|
}, HTMLElement>;
|
|
39
|
-
export {};
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Variants } from '../theme/ThemeProvider';
|
|
3
3
|
import { CommonFieldProps } from '../types/CommonFieldProps';
|
|
4
4
|
import { Nullable } from '../types/Nullable';
|
|
5
|
-
type TextareaProps = {
|
|
5
|
+
export type TextareaProps = {
|
|
6
6
|
value: Nullable<string>;
|
|
7
7
|
onChange: (value: string) => void;
|
|
8
8
|
placeholder?: string;
|
|
@@ -24,4 +24,3 @@ export declare const Textarea: (props: TextareaProps) => React.DOMElement<{
|
|
|
24
24
|
onChange: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
25
25
|
}, Element>)[];
|
|
26
26
|
}, Element>;
|
|
27
|
-
export {};
|
|
@@ -13,29 +13,7 @@ type Props = {
|
|
|
13
13
|
dataField: Nullable<string>;
|
|
14
14
|
};
|
|
15
15
|
export declare const Field: (props: Props) => React.DOMElement<{
|
|
16
|
-
children: React.FunctionComponentElement<{
|
|
17
|
-
value: Nullable<number>;
|
|
18
|
-
minText?: string;
|
|
19
|
-
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
20
|
-
maxText?: string;
|
|
21
|
-
onChange: (value: number) => void;
|
|
22
|
-
label: string;
|
|
23
|
-
max: number;
|
|
24
|
-
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
|
|
25
|
-
options: import("@web-site-utilities/common/types/Option").Options;
|
|
26
|
-
onChange: (value: string) => void;
|
|
27
|
-
value: Nullable<string>;
|
|
28
|
-
elementsPerCol?: number;
|
|
29
|
-
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
30
|
-
label: string;
|
|
31
|
-
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
|
|
32
|
-
options: import("@web-site-utilities/common/types/Option").Options;
|
|
33
|
-
onChange: (value: Array<string>) => void;
|
|
34
|
-
elementsPerCol?: number;
|
|
35
|
-
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
36
|
-
value: Array<string>;
|
|
37
|
-
label: string;
|
|
38
|
-
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
|
|
16
|
+
children: React.FunctionComponentElement<import("@web-site-utilities/common/components/QuestionMatrix").QuestionMatrixProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Radio").RadioGroupProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Checkbox").CheckboxGroupProps> | React.FunctionComponentElement<{
|
|
39
17
|
max?: number;
|
|
40
18
|
min?: number;
|
|
41
19
|
value: Nullable<number>;
|
|
@@ -43,23 +21,6 @@ export declare const Field: (props: Props) => React.DOMElement<{
|
|
|
43
21
|
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
44
22
|
label: string;
|
|
45
23
|
onChange: (value: number) => void;
|
|
46
|
-
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<
|
|
47
|
-
value: number;
|
|
48
|
-
label: string;
|
|
49
|
-
onChange: (value: number) => void;
|
|
50
|
-
max: number;
|
|
51
|
-
} & Omit<{
|
|
52
|
-
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
53
|
-
selected: boolean;
|
|
54
|
-
size?: "small" | "medium" | "large";
|
|
55
|
-
icon?: "star" | "star2" | "heart";
|
|
56
|
-
}, "selected"> & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<{
|
|
57
|
-
value: Nullable<string>;
|
|
58
|
-
onChange: (value: string) => void;
|
|
59
|
-
placeholder?: string;
|
|
60
|
-
colorVariant?: import("@web-site-utilities/common/theme/ThemeProvider").Variants;
|
|
61
|
-
rows?: number;
|
|
62
|
-
label: string;
|
|
63
|
-
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | null;
|
|
24
|
+
} & import("@web-site-utilities/common/types/CommonFieldProps").CommonFieldProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Rating").RatingProps> | React.FunctionComponentElement<import("@web-site-utilities/common/components/Textarea").TextareaProps> | null;
|
|
64
25
|
}, Element>;
|
|
65
26
|
export {};
|
package/dist/form/index.d.ts
CHANGED
|
@@ -2,7 +2,13 @@ import React from 'react';
|
|
|
2
2
|
import { InitiateFeedbackModuleOptions, InitiateFeedbackModuleOptionsCmp } from './types/InitiateFeedbackModuleOptions';
|
|
3
3
|
import { InPlaceFormProps } from "./features/InPlaceForm/InPlaceForm";
|
|
4
4
|
import { PopupFormProps } from "./features/PopupForm/PopupForm";
|
|
5
|
-
import { Variants } from "@web-site-utilities/common/theme/ThemeProvider";
|
|
5
|
+
import { theme, Variants } from "@web-site-utilities/common/theme/ThemeProvider";
|
|
6
|
+
import { CheckboxGroupProps } from "@web-site-utilities/common/components/Checkbox";
|
|
7
|
+
import { QuestionMatrixProps } from "@web-site-utilities/common/components/QuestionMatrix";
|
|
8
|
+
import { RadioGroupProps } from "@web-site-utilities/common/components/Radio";
|
|
9
|
+
import { RatingProps } from "@web-site-utilities/common/components/Rating";
|
|
10
|
+
import { SelectProps } from "@web-site-utilities/common/components/Select";
|
|
11
|
+
import { TextareaProps } from "@web-site-utilities/common/components/Textarea";
|
|
6
12
|
export declare const initiateFeedbackModule: (options: InitiateFeedbackModuleOptions) => void;
|
|
7
13
|
export declare const renderFeedbackModule: (options: InitiateFeedbackModuleOptionsCmp) => React.FunctionComponentElement<{
|
|
8
14
|
formId: string;
|
|
@@ -14,14 +20,51 @@ export declare const FeedbackModule: (options: InitiateFeedbackModuleOptionsCmp)
|
|
|
14
20
|
export declare const PreviewInPlaceForm: (props: InPlaceFormProps & {
|
|
15
21
|
variant: Variants;
|
|
16
22
|
}) => React.FunctionComponentElement<{
|
|
17
|
-
theme: typeof
|
|
23
|
+
theme: typeof theme;
|
|
18
24
|
selectedVariant?: Variants;
|
|
19
25
|
children: React.ReactNode;
|
|
20
26
|
}>;
|
|
21
27
|
export declare const PreviewPopupForm: (props: PopupFormProps & {
|
|
22
28
|
variant: Variants;
|
|
23
29
|
}) => React.FunctionComponentElement<{
|
|
24
|
-
theme: typeof
|
|
30
|
+
theme: typeof theme;
|
|
25
31
|
selectedVariant?: Variants;
|
|
26
32
|
children: React.ReactNode;
|
|
27
33
|
}>;
|
|
34
|
+
export type SurveyFormComponentsProps<T> = {
|
|
35
|
+
formTheme: typeof theme;
|
|
36
|
+
formVariant: Variants;
|
|
37
|
+
cmpProps: T;
|
|
38
|
+
};
|
|
39
|
+
export declare const SurveyFormComponents: {
|
|
40
|
+
Checkbox: (props: SurveyFormComponentsProps<CheckboxGroupProps>) => React.FunctionComponentElement<{
|
|
41
|
+
theme: typeof theme;
|
|
42
|
+
selectedVariant?: Variants;
|
|
43
|
+
children: React.ReactNode;
|
|
44
|
+
}>;
|
|
45
|
+
QuestionMatrix: (props: SurveyFormComponentsProps<QuestionMatrixProps>) => React.FunctionComponentElement<{
|
|
46
|
+
theme: typeof theme;
|
|
47
|
+
selectedVariant?: Variants;
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
Radio: (props: SurveyFormComponentsProps<RadioGroupProps>) => React.FunctionComponentElement<{
|
|
51
|
+
theme: typeof theme;
|
|
52
|
+
selectedVariant?: Variants;
|
|
53
|
+
children: React.ReactNode;
|
|
54
|
+
}>;
|
|
55
|
+
Rating: (props: SurveyFormComponentsProps<RatingProps>) => React.FunctionComponentElement<{
|
|
56
|
+
theme: typeof theme;
|
|
57
|
+
selectedVariant?: Variants;
|
|
58
|
+
children: React.ReactNode;
|
|
59
|
+
}>;
|
|
60
|
+
Select: (props: SurveyFormComponentsProps<SelectProps>) => React.FunctionComponentElement<{
|
|
61
|
+
theme: typeof theme;
|
|
62
|
+
selectedVariant?: Variants;
|
|
63
|
+
children: React.ReactNode;
|
|
64
|
+
}>;
|
|
65
|
+
Textarea: (props: SurveyFormComponentsProps<TextareaProps>) => React.FunctionComponentElement<{
|
|
66
|
+
theme: typeof theme;
|
|
67
|
+
selectedVariant?: Variants;
|
|
68
|
+
children: React.ReactNode;
|
|
69
|
+
}>;
|
|
70
|
+
};
|