@semcore/feedback-form 6.43.0-prerelease.1 → 6.43.0-prerelease.5
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/lib/cjs/FeedbackForm.js +22 -28
- package/lib/cjs/FeedbackForm.js.map +1 -1
- package/lib/cjs/component/checkbox-button/CheckboxButton.js +34 -22
- package/lib/cjs/component/checkbox-button/CheckboxButton.js.map +1 -1
- package/lib/cjs/component/feedback-item/FeedbackItem.js +8 -8
- package/lib/cjs/component/feedback-item/FeedbackItem.js.map +1 -1
- package/lib/cjs/component/feedback-rating/FeedbackRating.js +63 -71
- package/lib/cjs/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/lib/cjs/component/feedback-rating/FeedbackRating.type.js.map +1 -1
- package/lib/cjs/component/slider-rating/SliderRating.js +37 -47
- package/lib/cjs/component/slider-rating/SliderRating.js.map +1 -1
- package/lib/cjs/component/submit-button/SubmitButton.js +1 -1
- package/lib/cjs/component/submit-button/SubmitButton.js.map +1 -1
- package/lib/cjs/index.d.js +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/style/checkbox-button.shadow.css +1 -1
- package/lib/cjs/style/feedback-form.shadow.css +1 -1
- package/lib/cjs/style/feedback-rating.shadow.css +8 -0
- package/lib/cjs/style/slider-rating.shadow.css +1 -6
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +4 -5
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/FeedbackForm.js +19 -22
- package/lib/es6/FeedbackForm.js.map +1 -1
- package/lib/es6/component/checkbox-button/CheckboxButton.js +31 -16
- package/lib/es6/component/checkbox-button/CheckboxButton.js.map +1 -1
- package/lib/es6/component/feedback-item/FeedbackItem.js +7 -7
- package/lib/es6/component/feedback-item/FeedbackItem.js.map +1 -1
- package/lib/es6/component/feedback-rating/FeedbackRating.js +56 -61
- package/lib/es6/component/feedback-rating/FeedbackRating.js.map +1 -1
- package/lib/es6/component/feedback-rating/FeedbackRating.type.js.map +1 -1
- package/lib/es6/component/slider-rating/SliderRating.js +33 -40
- package/lib/es6/component/slider-rating/SliderRating.js.map +1 -1
- package/lib/es6/component/submit-button/SubmitButton.js +1 -1
- package/lib/es6/component/submit-button/SubmitButton.js.map +1 -1
- package/lib/es6/index.d.js +0 -3
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/index.js.map +1 -1
- package/lib/es6/style/checkbox-button.shadow.css +1 -1
- package/lib/es6/style/feedback-form.shadow.css +1 -1
- package/lib/es6/style/feedback-rating.shadow.css +8 -0
- package/lib/es6/style/slider-rating.shadow.css +1 -6
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +2 -2
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/esm/FeedbackForm.mjs +27 -31
- package/lib/esm/component/checkbox-button/CheckboxButton.mjs +34 -22
- package/lib/esm/component/feedback-item/FeedbackItem.mjs +6 -6
- package/lib/esm/component/feedback-rating/FeedbackRating.mjs +52 -64
- package/lib/esm/component/slider-rating/SliderRating.mjs +37 -45
- package/lib/esm/style/checkbox-button.shadow.css +1 -1
- package/lib/esm/style/feedback-form.shadow.css +1 -1
- package/lib/esm/style/feedback-rating.shadow.css +8 -0
- package/lib/esm/style/slider-rating.shadow.css +1 -6
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +2 -2
- package/lib/types/component/checkbox-button/CheckboxButton.d.ts +1 -3
- package/lib/types/component/feedback-item/FeedbackItem.d.ts +3 -3
- package/lib/types/component/feedback-rating/FeedbackRating.d.ts +19 -184
- package/lib/types/component/feedback-rating/FeedbackRating.type.d.ts +35 -26
- package/lib/types/component/slider-rating/SliderRating.d.ts +3 -3
- package/lib/types/component/submit-button/SubmitButton.d.ts +1 -1
- package/lib/types/index.d.ts +6 -15
- package/package.json +17 -17
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
declare const CheckboxButton: import("@semcore/core").
|
|
2
|
-
[key: string]: (arg: unknown) => void;
|
|
3
|
-
}, null>;
|
|
1
|
+
declare const CheckboxButton: import("@semcore/core").Intergalactic.Component<"div", {}, {}, never[]>;
|
|
4
2
|
export default CheckboxButton;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function FeedbackItem({ Children, tag, uid, tooltipProps: tooltipPropsList, ...props }: any): JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare function FeedbackItem({ Children, tag, uid, tooltipProps: tooltipPropsList, ...props }: any): React.JSX.Element;
|
|
3
3
|
export declare namespace FeedbackItem {
|
|
4
4
|
var enhance: ((props: any) => {
|
|
5
|
-
uid:
|
|
5
|
+
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
6
6
|
})[];
|
|
7
7
|
}
|
|
@@ -1,196 +1,27 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type Button from '@semcore/button';
|
|
2
|
+
import type Checkbox from '@semcore/checkbox';
|
|
2
3
|
import { Component } from '@semcore/core';
|
|
3
|
-
import {
|
|
4
|
+
import type { Intergalactic } from '@semcore/core';
|
|
4
5
|
import { NoticeBubbleManager } from '@semcore/notice-bubble';
|
|
6
|
+
import { Text } from '@semcore/typography';
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import type { FeedbackRatingCheckboxProps, FeedbackRatingItemProps, FeedbackRatingProps, FormConfigItem, FeedbackRatingDefaultProps } from './FeedbackRating.type';
|
|
5
9
|
type State = {
|
|
6
10
|
error: boolean;
|
|
7
11
|
};
|
|
8
|
-
declare class FeedbackRatingRoot extends Component<FeedbackRatingProps, {},
|
|
12
|
+
declare class FeedbackRatingRoot extends Component<FeedbackRatingProps, typeof FeedbackRatingRoot.enhance, {}, FeedbackRatingDefaultProps, State> {
|
|
9
13
|
static displayName: string;
|
|
10
14
|
static style: {
|
|
11
15
|
[key: string]: string;
|
|
12
16
|
};
|
|
13
17
|
static enhance: readonly [(props: any) => {
|
|
14
|
-
getI18nText: (messageId: string, variables?: {
|
|
18
|
+
getI18nText: ReturnType<(dictionary: import("@semcore/core/lib/utils/enhances/WithI18n").Dictionary, locale?: import("@semcore/core/lib/utils/enhances/WithI18n").LocaleKeys, fallbackDictionary?: import("@semcore/core/lib/utils/enhances/WithI18n").Dictionary) => (messageId: string, variables?: {
|
|
15
19
|
[key: string]: string | number | undefined;
|
|
16
|
-
}
|
|
20
|
+
}) => string>;
|
|
17
21
|
}, (props: any) => {
|
|
18
|
-
uid:
|
|
22
|
+
uid: ReturnType<typeof import("@semcore/core/lib/utils/uniqueID").useUID>;
|
|
19
23
|
}];
|
|
20
|
-
static defaultProps:
|
|
21
|
-
onSubmit: () => void;
|
|
22
|
-
i18n: {
|
|
23
|
-
de: {
|
|
24
|
-
leaveFeedback: string;
|
|
25
|
-
learnMore: string;
|
|
26
|
-
formTitle: string;
|
|
27
|
-
submitButton: string;
|
|
28
|
-
successMessage: string;
|
|
29
|
-
errorMessage: string;
|
|
30
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
31
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
32
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
33
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
34
|
-
};
|
|
35
|
-
en: {
|
|
36
|
-
leaveFeedback: string;
|
|
37
|
-
learnMore: string;
|
|
38
|
-
formTitle: string;
|
|
39
|
-
submitButton: string;
|
|
40
|
-
successMessage: string;
|
|
41
|
-
errorMessage: string;
|
|
42
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
43
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
44
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
45
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
46
|
-
};
|
|
47
|
-
es: {
|
|
48
|
-
leaveFeedback: string;
|
|
49
|
-
learnMore: string;
|
|
50
|
-
formTitle: string;
|
|
51
|
-
submitButton: string;
|
|
52
|
-
successMessage: string;
|
|
53
|
-
errorMessage: string;
|
|
54
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
55
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
56
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
57
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
58
|
-
};
|
|
59
|
-
fr: {
|
|
60
|
-
leaveFeedback: string;
|
|
61
|
-
learnMore: string;
|
|
62
|
-
formTitle: string;
|
|
63
|
-
submitButton: string;
|
|
64
|
-
successMessage: string;
|
|
65
|
-
errorMessage: string;
|
|
66
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
67
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
68
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
69
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
70
|
-
};
|
|
71
|
-
it: {
|
|
72
|
-
leaveFeedback: string;
|
|
73
|
-
learnMore: string;
|
|
74
|
-
formTitle: string;
|
|
75
|
-
submitButton: string;
|
|
76
|
-
successMessage: string;
|
|
77
|
-
errorMessage: string;
|
|
78
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
79
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
80
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
81
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
82
|
-
};
|
|
83
|
-
ja: {
|
|
84
|
-
leaveFeedback: string;
|
|
85
|
-
learnMore: string;
|
|
86
|
-
formTitle: string;
|
|
87
|
-
submitButton: string;
|
|
88
|
-
successMessage: string;
|
|
89
|
-
errorMessage: string;
|
|
90
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
91
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
92
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
93
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
94
|
-
};
|
|
95
|
-
ko: {
|
|
96
|
-
leaveFeedback: string;
|
|
97
|
-
learnMore: string;
|
|
98
|
-
formTitle: string;
|
|
99
|
-
submitButton: string;
|
|
100
|
-
successMessage: string;
|
|
101
|
-
errorMessage: string;
|
|
102
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
103
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
104
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
105
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
106
|
-
};
|
|
107
|
-
nl: {
|
|
108
|
-
leaveFeedback: string;
|
|
109
|
-
learnMore: string;
|
|
110
|
-
formTitle: string;
|
|
111
|
-
submitButton: string;
|
|
112
|
-
successMessage: string;
|
|
113
|
-
errorMessage: string;
|
|
114
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
115
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
116
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
117
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
118
|
-
};
|
|
119
|
-
pt: {
|
|
120
|
-
leaveFeedback: string;
|
|
121
|
-
learnMore: string;
|
|
122
|
-
formTitle: string;
|
|
123
|
-
submitButton: string;
|
|
124
|
-
successMessage: string;
|
|
125
|
-
errorMessage: string;
|
|
126
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
127
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
128
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
129
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
130
|
-
};
|
|
131
|
-
tr: {
|
|
132
|
-
leaveFeedback: string;
|
|
133
|
-
learnMore: string;
|
|
134
|
-
formTitle: string;
|
|
135
|
-
submitButton: string;
|
|
136
|
-
successMessage: string;
|
|
137
|
-
errorMessage: string;
|
|
138
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
139
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
140
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
141
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
142
|
-
};
|
|
143
|
-
vi: {
|
|
144
|
-
leaveFeedback: string;
|
|
145
|
-
learnMore: string;
|
|
146
|
-
formTitle: string;
|
|
147
|
-
submitButton: string;
|
|
148
|
-
successMessage: string;
|
|
149
|
-
errorMessage: string;
|
|
150
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
151
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
152
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
153
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
154
|
-
};
|
|
155
|
-
zh: {
|
|
156
|
-
leaveFeedback: string;
|
|
157
|
-
learnMore: string;
|
|
158
|
-
formTitle: string;
|
|
159
|
-
submitButton: string;
|
|
160
|
-
successMessage: string;
|
|
161
|
-
errorMessage: string;
|
|
162
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
163
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
164
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
165
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
166
|
-
};
|
|
167
|
-
pl: {
|
|
168
|
-
leaveFeedback: string;
|
|
169
|
-
learnMore: string;
|
|
170
|
-
formTitle: string;
|
|
171
|
-
submitButton: string;
|
|
172
|
-
successMessage: string;
|
|
173
|
-
errorMessage: string;
|
|
174
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
175
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
176
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
177
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
178
|
-
};
|
|
179
|
-
sv: {
|
|
180
|
-
leaveFeedback: string;
|
|
181
|
-
learnMore: string;
|
|
182
|
-
formTitle: string;
|
|
183
|
-
submitButton: string;
|
|
184
|
-
successMessage: string;
|
|
185
|
-
errorMessage: string;
|
|
186
|
-
"FeedbackRating.SliderRating.ScreenReaderOnly.sliderDescriber": string;
|
|
187
|
-
"FeedbackRating.SliderRating.aria-valuetext.readonly": string;
|
|
188
|
-
"FeedbackRating.SliderRating.aria-valuetext.empty": string;
|
|
189
|
-
"FeedbackRating.SliderRating.aria-valuetext": string;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
locale: string;
|
|
193
|
-
};
|
|
24
|
+
static defaultProps: FeedbackRatingDefaultProps;
|
|
194
25
|
static validate: {
|
|
195
26
|
description: (error: Error | string) => (value?: string) => string | Error | undefined;
|
|
196
27
|
email: (error: Error | string) => (value?: string) => string | Error | undefined;
|
|
@@ -208,13 +39,17 @@ declare class FeedbackRatingRoot extends Component<FeedbackRatingProps, {}, Stat
|
|
|
208
39
|
getNoticeTextId(): string;
|
|
209
40
|
handleChangeRating: (rating: number) => void;
|
|
210
41
|
handelCloseModal: () => void;
|
|
211
|
-
handleChange: (fn: (e: React.SyntheticEvent) => void) => (
|
|
42
|
+
handleChange: (fn: (e: React.SyntheticEvent) => void) => (_value: any, e: React.SyntheticEvent) => void;
|
|
212
43
|
componentDidUpdate(prevProps: Readonly<FeedbackRatingProps>): void;
|
|
213
|
-
renderCheckbox: (config: FormConfigItem, index: number) => JSX.Element;
|
|
214
|
-
renderTextField: (config: FormConfigItem) => JSX.Element;
|
|
44
|
+
renderCheckbox: (config: FormConfigItem, index: number) => React.JSX.Element;
|
|
45
|
+
renderTextField: (config: FormConfigItem) => React.JSX.Element;
|
|
215
46
|
render(): React.ReactNode;
|
|
216
47
|
}
|
|
217
|
-
declare const FeedbackRating: typeof
|
|
48
|
+
declare const FeedbackRating: Intergalactic.Component<"form", FeedbackRatingProps, {}, typeof FeedbackRatingRoot.enhance> & {
|
|
218
49
|
validate: typeof FeedbackRatingRoot.validate;
|
|
50
|
+
Item: Intergalactic.Component<"div", FeedbackRatingItemProps>;
|
|
51
|
+
Submit: typeof Button;
|
|
52
|
+
Checkbox: Intergalactic.Component<typeof Checkbox, FeedbackRatingCheckboxProps>;
|
|
53
|
+
Header: typeof Text;
|
|
219
54
|
};
|
|
220
55
|
export default FeedbackRating;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
1
|
+
import type { NSCheckbox } from '@semcore/checkbox';
|
|
2
|
+
import type { Intergalactic } from '@semcore/core';
|
|
3
|
+
import type { IllustrationProps } from '@semcore/illustration';
|
|
4
|
+
import type Notice from '@semcore/notice';
|
|
5
|
+
import type React from 'react';
|
|
6
|
+
import type { FieldProps } from 'react-final-form';
|
|
7
|
+
import type { FeedbackFormProps } from '../../index';
|
|
8
|
+
import type { localizedMessages } from '../../translations/__intergalactic-dynamic-locales';
|
|
8
9
|
export type FormConfigItem = {
|
|
9
10
|
key: string;
|
|
10
11
|
label: React.ReactNode;
|
|
@@ -13,36 +14,44 @@ export type FormConfigItem = {
|
|
|
13
14
|
validate?: (value: any) => Error | string | undefined;
|
|
14
15
|
};
|
|
15
16
|
export type FeedbackRatingProps = Intergalactic.InternalTypings.EfficientOmit<FeedbackFormProps, 'initialValues' | 'loading'> & {
|
|
16
|
-
/**
|
|
17
|
+
/** Status of form */
|
|
17
18
|
status: 'default' | 'success' | 'error' | 'loading';
|
|
18
|
-
/**
|
|
19
|
+
/** Flag for show/hide notification */
|
|
19
20
|
notificationVisible: boolean;
|
|
20
|
-
/** */
|
|
21
|
+
/** Notification close callback */
|
|
21
22
|
onNotificationClose: () => void;
|
|
22
|
-
/**
|
|
23
|
+
/** Text in notification panel */
|
|
23
24
|
notificationText: string;
|
|
24
|
-
/**
|
|
25
|
+
/** Title in notification panel */
|
|
25
26
|
notificationTitle?: string;
|
|
26
|
-
/**
|
|
27
|
+
/** Optional link in notification panel */
|
|
27
28
|
learnMoreLink?: string;
|
|
28
|
-
/**
|
|
29
|
+
/** Rating value */
|
|
29
30
|
rating: number;
|
|
30
|
-
/**
|
|
31
|
+
/** Visible modal form flag */
|
|
31
32
|
visible: boolean;
|
|
33
|
+
/** Visibility changes callback */
|
|
32
34
|
onVisibleChange: (visible: boolean, rating: number) => void;
|
|
33
|
-
/**
|
|
35
|
+
/** Width for modal with form */
|
|
34
36
|
modalWidth?: number | string;
|
|
35
|
-
/**
|
|
37
|
+
/** Header of modal with form */
|
|
36
38
|
header: React.ReactNode;
|
|
37
|
-
/**
|
|
39
|
+
/** Text for submit button of form */
|
|
38
40
|
submitText?: string;
|
|
39
|
-
/**
|
|
41
|
+
/** Config for form fields */
|
|
40
42
|
formConfig: FormConfigItem[];
|
|
43
|
+
/** Initial form values including rating */
|
|
41
44
|
initialValues: Record<string, any> & {
|
|
42
45
|
rating: number;
|
|
43
46
|
};
|
|
47
|
+
/** Email address shown in error messages */
|
|
44
48
|
errorFeedbackEmail: string;
|
|
49
|
+
/** Specifies the locale for i18n support */
|
|
45
50
|
locale?: string;
|
|
51
|
+
/** Illustration element */
|
|
52
|
+
Illustration?: Intergalactic.Component<'svg', IllustrationProps>;
|
|
53
|
+
/** Notice component */
|
|
54
|
+
Notice?: typeof Notice;
|
|
46
55
|
};
|
|
47
56
|
export type FeedbackRatingItemProps = FieldProps<any, any> & {
|
|
48
57
|
/**
|
|
@@ -50,14 +59,14 @@ export type FeedbackRatingItemProps = FieldProps<any, any> & {
|
|
|
50
59
|
*/
|
|
51
60
|
tooltipProps?: string[];
|
|
52
61
|
};
|
|
53
|
-
export type FeedbackRatingCheckboxProps = Omit<
|
|
62
|
+
export type FeedbackRatingCheckboxProps = Omit<NSCheckbox.Props, 'label'> & {
|
|
54
63
|
focused: boolean;
|
|
55
64
|
label: React.ReactNode;
|
|
56
65
|
};
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
66
|
+
export type FeedbackRatingDefaultProps = {
|
|
67
|
+
onSubmit: () => void;
|
|
68
|
+
i18n: typeof localizedMessages;
|
|
69
|
+
locale: 'en';
|
|
70
|
+
Illustration: Intergalactic.Component<'svg', IllustrationProps>;
|
|
71
|
+
Notice: typeof Notice;
|
|
62
72
|
};
|
|
63
|
-
export { FeedbackRatingType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Flex, Box, type BoxProps } from '@semcore/base-components';
|
|
2
|
+
import { type Intergalactic } from '@semcore/core';
|
|
3
3
|
type SliderRatingProps = {
|
|
4
4
|
value: number;
|
|
5
5
|
onChange?: (value: number) => void;
|
|
@@ -8,7 +8,7 @@ type SliderRatingProps = {
|
|
|
8
8
|
type StarProps = BoxProps & {
|
|
9
9
|
filled?: boolean;
|
|
10
10
|
};
|
|
11
|
-
declare const SliderRating:
|
|
11
|
+
declare const SliderRating: Intergalactic.Component<typeof Flex, SliderRatingProps> & {
|
|
12
12
|
Star: Intergalactic.Component<typeof Box, StarProps>;
|
|
13
13
|
};
|
|
14
14
|
export default SliderRating;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
FieldRenderProps,
|
|
7
|
-
} from 'react-final-form';
|
|
8
|
-
|
|
9
|
-
import { Intergalactic } from '@semcore/core';
|
|
10
|
-
import Button from '@semcore/button';
|
|
11
|
-
import { NoticeSmart } from '@semcore/notice';
|
|
12
|
-
import { Box } from '@semcore/flex-box';
|
|
1
|
+
import type { Box } from '@semcore/base-components';
|
|
2
|
+
import type Button from '@semcore/button';
|
|
3
|
+
import type { Intergalactic } from '@semcore/core';
|
|
4
|
+
import type { NoticeSmart } from '@semcore/notice';
|
|
5
|
+
import type { FormProps, FieldProps, FieldInputProps, FieldMetaState } from 'react-final-form';
|
|
13
6
|
|
|
14
7
|
import { default as FeedbackRating } from './component/feedback-rating/FeedbackRating';
|
|
15
8
|
|
|
16
|
-
/** @deprecated */
|
|
17
|
-
export type IFeedbackForm = FeedbackFormProps;
|
|
18
9
|
export type FeedbackFormProps = FormProps & {
|
|
19
|
-
|
|
10
|
+
/** The event is called when the form is submitted */
|
|
20
11
|
onSubmit: (values: any, form: any, callback?: (errors?: {}) => void) => {} | Promise<{}> | void;
|
|
21
12
|
/**
|
|
22
13
|
* The property is in charge of the spinner showing
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/feedback-form",
|
|
3
3
|
"description": "Semrush Feedback Form Component",
|
|
4
|
-
"version": "6.43.0-prerelease.
|
|
4
|
+
"version": "6.43.0-prerelease.5",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,27 +14,27 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/checkbox": "7.45.0-prerelease.
|
|
18
|
-
"@semcore/notice-bubble": "5.55.0-prerelease.
|
|
19
|
-
"@semcore/typography": "5.54.0-prerelease.
|
|
20
|
-
"@semcore/link": "5.45.0-prerelease.
|
|
21
|
-
"@semcore/modal": "4.57.0-prerelease.
|
|
22
|
-
"@semcore/illustration": "2.45.0-prerelease.
|
|
23
|
-
"@semcore/icon": "4.63.0-prerelease.
|
|
24
|
-
"@semcore/textarea": "5.41.0-prerelease.
|
|
25
|
-
"@semcore/input": "4.43.0-prerelease.
|
|
17
|
+
"@semcore/checkbox": "7.45.0-prerelease.5",
|
|
18
|
+
"@semcore/notice-bubble": "5.55.0-prerelease.5",
|
|
19
|
+
"@semcore/typography": "5.54.0-prerelease.5",
|
|
20
|
+
"@semcore/link": "5.45.0-prerelease.5",
|
|
21
|
+
"@semcore/modal": "4.57.0-prerelease.5",
|
|
22
|
+
"@semcore/illustration": "2.45.0-prerelease.5",
|
|
23
|
+
"@semcore/icon": "4.63.0-prerelease.5",
|
|
24
|
+
"@semcore/textarea": "5.41.0-prerelease.5",
|
|
25
|
+
"@semcore/input": "4.43.0-prerelease.5",
|
|
26
26
|
"final-form": "4.20.7",
|
|
27
|
-
"@semcore/button": "5.44.0-prerelease.
|
|
28
|
-
"@semcore/flex-box": "5.42.0-prerelease.
|
|
29
|
-
"@semcore/notice": "5.48.0-prerelease.
|
|
30
|
-
"@semcore/spin-container": "7.42.0-prerelease.
|
|
31
|
-
"@semcore/tooltip": "6.50.0-prerelease.
|
|
32
|
-
"@semcore/utils": "4.49.0-prerelease.
|
|
27
|
+
"@semcore/button": "5.44.0-prerelease.5",
|
|
28
|
+
"@semcore/flex-box": "5.42.0-prerelease.5",
|
|
29
|
+
"@semcore/notice": "5.48.0-prerelease.5",
|
|
30
|
+
"@semcore/spin-container": "7.42.0-prerelease.5",
|
|
31
|
+
"@semcore/tooltip": "6.50.0-prerelease.5",
|
|
32
|
+
"@semcore/utils": "4.49.0-prerelease.5",
|
|
33
33
|
"final-form-focus": "1.1.2",
|
|
34
34
|
"react-final-form": "6.5.9"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
|
-
"@semcore/core": "^2.40.0-prerelease.
|
|
37
|
+
"@semcore/core": "^2.40.0-prerelease.5",
|
|
38
38
|
"react": "16.8 - 18",
|
|
39
39
|
"react-dom": "16.8 - 18"
|
|
40
40
|
},
|