@redocly/theme 0.27.1 → 0.27.3
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/components/Feedback/Comment.js +2 -2
- package/lib/components/Feedback/Mood.js +1 -0
- package/lib/components/Feedback/Rating.js +1 -0
- package/lib/components/Feedback/Scale.js +1 -0
- package/lib/components/Feedback/Sentiment.js +1 -0
- package/lib/components/Feedback/types.d.ts +5 -0
- package/lib/icons/ReportIcon/ReportIcon.js +2 -2
- package/package.json +1 -1
- package/src/components/Feedback/Comment.tsx +2 -2
- package/src/components/Feedback/Mood.tsx +1 -0
- package/src/components/Feedback/Rating.tsx +1 -0
- package/src/components/Feedback/Scale.tsx +1 -0
- package/src/components/Feedback/Sentiment.tsx +1 -0
- package/src/components/Feedback/types.ts +17 -5
- package/src/icons/ReportIcon/ReportIcon.tsx +2 -2
|
@@ -42,13 +42,13 @@ const Comment = ({ settings, onSubmit, onCancel, className, standAlone = true, }
|
|
|
42
42
|
if (!text)
|
|
43
43
|
return;
|
|
44
44
|
setSubmitValue(text);
|
|
45
|
-
onSubmit({ comment: text });
|
|
45
|
+
onSubmit({ comment: text, path: window.location.href });
|
|
46
46
|
};
|
|
47
47
|
const handleTextAreaChange = (e) => {
|
|
48
48
|
const commentValue = e.target.value;
|
|
49
49
|
setText(commentValue);
|
|
50
50
|
if (!standAlone) {
|
|
51
|
-
onSubmit({ comment: commentValue });
|
|
51
|
+
onSubmit({ comment: commentValue, path: window.location.href });
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
if (submitValue) {
|
|
@@ -5,6 +5,7 @@ export type RatingProps = {
|
|
|
5
5
|
comment?: string;
|
|
6
6
|
reasons?: string[];
|
|
7
7
|
max: number;
|
|
8
|
+
path?: string;
|
|
8
9
|
}) => void;
|
|
9
10
|
settings?: {
|
|
10
11
|
label?: string;
|
|
@@ -28,6 +29,7 @@ export type ScaleProps = {
|
|
|
28
29
|
comment?: string;
|
|
29
30
|
reasons?: string[];
|
|
30
31
|
max?: number;
|
|
32
|
+
path?: string;
|
|
31
33
|
}) => void;
|
|
32
34
|
settings?: {
|
|
33
35
|
label?: string;
|
|
@@ -52,6 +54,7 @@ export type MoodProps = {
|
|
|
52
54
|
score: number;
|
|
53
55
|
comment?: string;
|
|
54
56
|
reasons?: string[];
|
|
57
|
+
path?: string;
|
|
55
58
|
}) => void;
|
|
56
59
|
settings?: {
|
|
57
60
|
label?: string;
|
|
@@ -76,6 +79,7 @@ export type SentimentProps = {
|
|
|
76
79
|
score: number;
|
|
77
80
|
comment?: string;
|
|
78
81
|
reasons?: string[];
|
|
82
|
+
path?: string;
|
|
79
83
|
}) => void;
|
|
80
84
|
settings?: {
|
|
81
85
|
label?: string;
|
|
@@ -97,6 +101,7 @@ export type SentimentProps = {
|
|
|
97
101
|
export type CommentProps = {
|
|
98
102
|
onSubmit: (value: {
|
|
99
103
|
comment: string;
|
|
104
|
+
path?: string;
|
|
100
105
|
}) => void;
|
|
101
106
|
onCancel?: () => unknown;
|
|
102
107
|
settings?: {
|
|
@@ -7,9 +7,9 @@ exports.ReportIcon = void 0;
|
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const styled_components_1 = __importDefault(require("styled-components"));
|
|
9
9
|
const Icon = ({ className }) => (react_1.default.createElement("svg", { "data-component-name": "icons/ReportIcon", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: className },
|
|
10
|
-
react_1.default.createElement("rect", { width: "14", height: "14", fill: "none"
|
|
10
|
+
react_1.default.createElement("rect", { width: "14", height: "14", fill: "none" }),
|
|
11
11
|
react_1.default.createElement("path", { d: "M7 8.75C6.87021 8.75 6.74333 8.78849 6.63541 8.8606C6.52749 8.93271 6.44337 9.0352 6.3937 9.15511C6.34403 9.27503 6.33104 9.40698 6.35636 9.53428C6.38168 9.66158 6.44418 9.77851 6.53596 9.87029C6.62774 9.96207 6.74467 10.0246 6.87197 10.0499C6.99927 10.0752 7.13122 10.0622 7.25114 10.0125C7.37105 9.96288 7.47354 9.87876 7.54565 9.77084C7.61776 9.66292 7.65625 9.53604 7.65625 9.40625C7.65625 9.2322 7.58711 9.06528 7.46404 8.94221C7.34097 8.81914 7.17405 8.75 7 8.75Z", fill: "currentColor", fillOpacity: "1" }),
|
|
12
|
-
react_1.default.createElement("path", { d: "M7.4375 3.9375H6.5625V7.875H7.4375V3.9375Z", fill: "
|
|
12
|
+
react_1.default.createElement("path", { d: "M7.4375 3.9375H6.5625V7.875H7.4375V3.9375Z", fill: "currentColor", fillOpacity: "1" }),
|
|
13
13
|
react_1.default.createElement("path", { d: "M11.375 12.25H2.625C2.39302 12.2497 2.17061 12.1575 2.00658 11.9934C1.84254 11.8294 1.75027 11.607 1.75 11.375V2.625C1.75027 2.39302 1.84254 2.17061 2.00658 2.00658C2.17061 1.84254 2.39302 1.75027 2.625 1.75H11.375C11.607 1.75027 11.8294 1.84254 11.9934 2.00658C12.1575 2.17061 12.2497 2.39302 12.25 2.625V11.375C12.2497 11.607 12.1575 11.8294 11.9934 11.9934C11.8294 12.1575 11.607 12.2497 11.375 12.25ZM2.625 2.625V11.375H11.3755L11.375 2.625H2.625Z", fill: "currentColor", fillOpacity: "1" })));
|
|
14
14
|
exports.ReportIcon = (0, styled_components_1.default)(Icon) `
|
|
15
15
|
width: 1.3em;
|
package/package.json
CHANGED
|
@@ -22,14 +22,14 @@ export const Comment = ({
|
|
|
22
22
|
const send = () => {
|
|
23
23
|
if (!text) return;
|
|
24
24
|
setSubmitValue(text);
|
|
25
|
-
onSubmit({ comment: text });
|
|
25
|
+
onSubmit({ comment: text, path: window.location.href });
|
|
26
26
|
};
|
|
27
27
|
const handleTextAreaChange = (e: any) => {
|
|
28
28
|
const commentValue = e.target.value;
|
|
29
29
|
setText(commentValue);
|
|
30
30
|
|
|
31
31
|
if (!standAlone) {
|
|
32
|
-
onSubmit({ comment: commentValue });
|
|
32
|
+
onSubmit({ comment: commentValue, path: window.location.href });
|
|
33
33
|
}
|
|
34
34
|
};
|
|
35
35
|
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import type { SubmitFeedbackParams } from '@theme/types/portal/src/shared/types/feedback';
|
|
2
2
|
|
|
3
3
|
export type RatingProps = {
|
|
4
|
-
onSubmit: (value: {
|
|
4
|
+
onSubmit: (value: {
|
|
5
|
+
score: number;
|
|
6
|
+
comment?: string;
|
|
7
|
+
reasons?: string[];
|
|
8
|
+
max: number;
|
|
9
|
+
path?: string;
|
|
10
|
+
}) => void;
|
|
5
11
|
settings?: {
|
|
6
12
|
label?: string;
|
|
7
13
|
submitText?: string;
|
|
@@ -20,7 +26,13 @@ export type RatingProps = {
|
|
|
20
26
|
};
|
|
21
27
|
|
|
22
28
|
export type ScaleProps = {
|
|
23
|
-
onSubmit: (value: {
|
|
29
|
+
onSubmit: (value: {
|
|
30
|
+
score: number;
|
|
31
|
+
comment?: string;
|
|
32
|
+
reasons?: string[];
|
|
33
|
+
max?: number;
|
|
34
|
+
path?: string;
|
|
35
|
+
}) => void;
|
|
24
36
|
settings?: {
|
|
25
37
|
label?: string;
|
|
26
38
|
submitText?: string;
|
|
@@ -41,7 +53,7 @@ export type ScaleProps = {
|
|
|
41
53
|
};
|
|
42
54
|
|
|
43
55
|
export type MoodProps = {
|
|
44
|
-
onSubmit: (value: { score: number; comment?: string; reasons?: string[] }) => void;
|
|
56
|
+
onSubmit: (value: { score: number; comment?: string; reasons?: string[]; path?: string }) => void;
|
|
45
57
|
settings?: {
|
|
46
58
|
label?: string;
|
|
47
59
|
submitText?: string;
|
|
@@ -62,7 +74,7 @@ export type MoodProps = {
|
|
|
62
74
|
};
|
|
63
75
|
|
|
64
76
|
export type SentimentProps = {
|
|
65
|
-
onSubmit: (value: { score: number; comment?: string; reasons?: string[] }) => void;
|
|
77
|
+
onSubmit: (value: { score: number; comment?: string; reasons?: string[]; path?: string }) => void;
|
|
66
78
|
settings?: {
|
|
67
79
|
label?: string;
|
|
68
80
|
submitText?: string;
|
|
@@ -82,7 +94,7 @@ export type SentimentProps = {
|
|
|
82
94
|
};
|
|
83
95
|
|
|
84
96
|
export type CommentProps = {
|
|
85
|
-
onSubmit: (value: { comment: string }) => void;
|
|
97
|
+
onSubmit: (value: { comment: string; path?: string }) => void;
|
|
86
98
|
onCancel?: () => unknown;
|
|
87
99
|
settings?: {
|
|
88
100
|
label?: string;
|
|
@@ -13,13 +13,13 @@ const Icon = ({ className }: IconProps) => (
|
|
|
13
13
|
xmlns="http://www.w3.org/2000/svg"
|
|
14
14
|
className={className}
|
|
15
15
|
>
|
|
16
|
-
<rect width="14" height="14" fill="none"
|
|
16
|
+
<rect width="14" height="14" fill="none" />
|
|
17
17
|
<path
|
|
18
18
|
d="M7 8.75C6.87021 8.75 6.74333 8.78849 6.63541 8.8606C6.52749 8.93271 6.44337 9.0352 6.3937 9.15511C6.34403 9.27503 6.33104 9.40698 6.35636 9.53428C6.38168 9.66158 6.44418 9.77851 6.53596 9.87029C6.62774 9.96207 6.74467 10.0246 6.87197 10.0499C6.99927 10.0752 7.13122 10.0622 7.25114 10.0125C7.37105 9.96288 7.47354 9.87876 7.54565 9.77084C7.61776 9.66292 7.65625 9.53604 7.65625 9.40625C7.65625 9.2322 7.58711 9.06528 7.46404 8.94221C7.34097 8.81914 7.17405 8.75 7 8.75Z"
|
|
19
19
|
fill="currentColor"
|
|
20
20
|
fillOpacity="1"
|
|
21
21
|
/>
|
|
22
|
-
<path d="M7.4375 3.9375H6.5625V7.875H7.4375V3.9375Z" fill="
|
|
22
|
+
<path d="M7.4375 3.9375H6.5625V7.875H7.4375V3.9375Z" fill="currentColor" fillOpacity="1" />
|
|
23
23
|
<path
|
|
24
24
|
d="M11.375 12.25H2.625C2.39302 12.2497 2.17061 12.1575 2.00658 11.9934C1.84254 11.8294 1.75027 11.607 1.75 11.375V2.625C1.75027 2.39302 1.84254 2.17061 2.00658 2.00658C2.17061 1.84254 2.39302 1.75027 2.625 1.75H11.375C11.607 1.75027 11.8294 1.84254 11.9934 2.00658C12.1575 2.17061 12.2497 2.39302 12.25 2.625V11.375C12.2497 11.607 12.1575 11.8294 11.9934 11.9934C11.8294 12.1575 11.607 12.2497 11.375 12.25ZM2.625 2.625V11.375H11.3755L11.375 2.625H2.625Z"
|
|
25
25
|
fill="currentColor"
|