rasp-feedback 1.0.3 → 1.0.4
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/nextjs/components/PostItem.d.ts.map +1 -1
- package/dist/nextjs/components/PostItem.js +34 -12
- package/dist/nextjs/components/RaspForm.d.ts.map +1 -1
- package/dist/nextjs/components/RaspForm.js +35 -12
- package/dist/nextjs/components/RaspProvider.d.ts.map +1 -1
- package/dist/nextjs/components/RaspProvider.js +187 -101
- package/dist/nextjs/components/StaticFormComponent.d.ts.map +1 -1
- package/dist/nextjs/components/StaticFormComponent.js +55 -14
- package/dist/vue/components/PostItem.vue.d.ts +10 -17
- package/dist/vue/components/PostItem.vue.d.ts.map +1 -1
- package/dist/vue/components/RaspForm.vue.d.ts.map +1 -1
- package/dist/vue/components/RaspProvider.vue.d.ts.map +1 -1
- package/dist/vue/components/Skeleton.vue.d.ts.map +1 -1
- package/dist/vue/components/StaticFormComponent.vue.d.ts +3 -3
- package/dist/vue/components/StaticFormComponent.vue.d.ts.map +1 -1
- package/dist/vue/index.css +1 -1
- package/dist/vue/index.js +810 -665
- package/dist/vue/index.umd.cjs +1 -1
- package/dist/vue/rasp-feedback.css +1 -0
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PostItem.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/PostItem.tsx"],"names":[],"mappings":"AAIA,iBAAS,QAAQ,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,cAAc,EAAC,EAAC;IACpD,IAAI,EAAC,GAAG,CAAC;IACT,aAAa,EAAC,GAAG,CAAC;IAClB,cAAc,EAAC,GAAG,CAAC;CAEtB,
|
|
1
|
+
{"version":3,"file":"PostItem.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/PostItem.tsx"],"names":[],"mappings":"AAIA,iBAAS,QAAQ,CAAC,EAAC,IAAI,EAAE,aAAa,EAAE,cAAc,EAAC,EAAC;IACpD,IAAI,EAAC,GAAG,CAAC;IACT,aAAa,EAAC,GAAG,CAAC;IAClB,cAAc,EAAC,GAAG,CAAC;CAEtB,2CAoEA;AAED,eAAe,QAAQ,CAAA"}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect, useState } from 'react';
|
|
2
3
|
import { fontMap } from '../constants/fontexp';
|
|
3
4
|
import { CircleArrowDown, CircleArrowUp } from 'lucide-react';
|
|
4
5
|
function PostItem({ post, setShowVoteUI, setCurrentPost }) {
|
|
6
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (typeof window === 'undefined')
|
|
9
|
+
return;
|
|
10
|
+
const checkMobile = () => {
|
|
11
|
+
setIsMobile(window.innerWidth <= 768);
|
|
12
|
+
};
|
|
13
|
+
checkMobile();
|
|
14
|
+
window.addEventListener('resize', checkMobile);
|
|
15
|
+
return () => window.removeEventListener('resize', checkMobile);
|
|
16
|
+
}, []);
|
|
5
17
|
return (_jsxs("div", { onClick: () => {
|
|
6
18
|
setCurrentPost(post);
|
|
7
19
|
setShowVoteUI(true);
|
|
8
20
|
}, style: {
|
|
9
|
-
padding: "5px",
|
|
21
|
+
padding: isMobile ? "8px" : "5px",
|
|
10
22
|
width: "100%",
|
|
11
23
|
display: "flex",
|
|
12
24
|
flexDirection: "row",
|
|
13
|
-
gap: "20px",
|
|
25
|
+
gap: isMobile ? "10px" : "20px",
|
|
14
26
|
justifyContent: "start",
|
|
15
27
|
alignItems: "center",
|
|
16
28
|
borderBottom: "2px solid black",
|
|
@@ -19,16 +31,26 @@ function PostItem({ post, setShowVoteUI, setCurrentPost }) {
|
|
|
19
31
|
display: "flex",
|
|
20
32
|
flexDirection: "row",
|
|
21
33
|
gap: "5px",
|
|
22
|
-
alignItems: "center"
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
minWidth: isMobile ? "60px" : "auto"
|
|
36
|
+
}, children: [_jsx(CircleArrowUp, { size: isMobile ? 16 : 20 }), _jsx("p", { className: fontMap.wixmadefor.className, style: {
|
|
37
|
+
fontSize: isMobile ? "12px" : "14px"
|
|
38
|
+
}, children: post.upvote_count }), _jsx(CircleArrowDown, { size: isMobile ? 16 : 20 }), _jsx("p", { className: fontMap.wixmadefor.className, style: {
|
|
39
|
+
fontSize: isMobile ? "12px" : "14px"
|
|
40
|
+
}, children: post.downvote_count })] }), _jsxs("div", { style: {
|
|
41
|
+
flex: 1,
|
|
42
|
+
overflow: "hidden"
|
|
43
|
+
}, children: [_jsx("h1", { className: fontMap.poppins.className, style: {
|
|
44
|
+
fontSize: isMobile ? "11px" : "12px",
|
|
45
|
+
whiteSpace: isMobile ? "nowrap" : "normal",
|
|
46
|
+
overflow: isMobile ? "hidden" : "visible",
|
|
47
|
+
textOverflow: isMobile ? "ellipsis" : "clip"
|
|
29
48
|
}, children: post.title }), _jsx("h2", { className: fontMap.wixmadefor.className, style: {
|
|
30
|
-
fontSize: "10px",
|
|
31
|
-
color: "gray"
|
|
32
|
-
|
|
49
|
+
fontSize: isMobile ? "9px" : "10px",
|
|
50
|
+
color: "gray",
|
|
51
|
+
whiteSpace: isMobile ? "nowrap" : "normal",
|
|
52
|
+
overflow: isMobile ? "hidden" : "visible",
|
|
53
|
+
textOverflow: isMobile ? "ellipsis" : "clip"
|
|
54
|
+
}, children: isMobile ? post.subtitle.slice(0, 45) + "..." : post.subtitle.slice(0, 65) + "..." })] })] }));
|
|
33
55
|
}
|
|
34
56
|
export default PostItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RaspForm.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"RaspForm.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspForm.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAS3C,UAAU,KAAK;IACb,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,wBAAgB,QAAQ,CAAC,EAAE,WAAW,EAAE,EAAE,KAAK,2CA6L9C"}
|
|
@@ -14,6 +14,7 @@ export function RaspForm({ otherStyles }) {
|
|
|
14
14
|
const [fields, setFields] = useState(null);
|
|
15
15
|
const [mainTheme, setMainTheme] = useState(null);
|
|
16
16
|
const [isLoading, setIsLoading] = useState(true);
|
|
17
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
17
18
|
const getForm = async () => {
|
|
18
19
|
const f = await getFormByDomainOrCompany(companyId, currentUrl);
|
|
19
20
|
if (!f) {
|
|
@@ -27,6 +28,13 @@ export function RaspForm({ otherStyles }) {
|
|
|
27
28
|
if (typeof window !== 'undefined') {
|
|
28
29
|
setCompanyId(process.env.NEXT_PUBLIC_RASP_COMPANY_ID);
|
|
29
30
|
setCurrentUrl(window.location.href);
|
|
31
|
+
// Check if mobile
|
|
32
|
+
const checkMobile = () => {
|
|
33
|
+
setIsMobile(window.innerWidth <= 768);
|
|
34
|
+
};
|
|
35
|
+
checkMobile();
|
|
36
|
+
window.addEventListener('resize', checkMobile);
|
|
37
|
+
return () => window.removeEventListener('resize', checkMobile);
|
|
30
38
|
}
|
|
31
39
|
}, []);
|
|
32
40
|
useEffect(() => {
|
|
@@ -74,7 +82,7 @@ export function RaspForm({ otherStyles }) {
|
|
|
74
82
|
width: "auto",
|
|
75
83
|
height: "auto",
|
|
76
84
|
display: "inline-block",
|
|
77
|
-
transform: "translate(-50%, -25%)",
|
|
85
|
+
transform: isMobile ? "none" : "translate(-50%, -25%)",
|
|
78
86
|
overflow: "visible",
|
|
79
87
|
...otherStyles
|
|
80
88
|
}, children: _jsx(StaticFormComponent, { form: form, mainTheme: mainTheme, fields: fields }) }) }), !isLoading && !form && _jsxs("div", { style: {
|
|
@@ -83,13 +91,27 @@ export function RaspForm({ otherStyles }) {
|
|
|
83
91
|
alignItems: 'center',
|
|
84
92
|
borderRadius: '0.75rem',
|
|
85
93
|
backgroundColor: 'white',
|
|
86
|
-
margin: '1.25rem',
|
|
87
|
-
width: '470px',
|
|
88
|
-
|
|
94
|
+
margin: isMobile ? '0.75rem' : '1.25rem',
|
|
95
|
+
width: isMobile ? '90vw' : '470px',
|
|
96
|
+
maxWidth: '470px',
|
|
97
|
+
minHeight: isMobile ? '350px' : '400px',
|
|
89
98
|
border: '1px solid black',
|
|
90
|
-
padding: '1rem',
|
|
99
|
+
padding: isMobile ? '0.75rem' : '1rem',
|
|
91
100
|
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)'
|
|
92
|
-
}, children: [_jsx("br", {}), _jsx("br", {}), _jsx("img", { src: RASP_LOGO_BASE64, width: "
|
|
101
|
+
}, children: [_jsx("br", {}), _jsx("br", {}), _jsx("img", { src: RASP_LOGO_BASE64, width: isMobile ? "120px" : "150px", height: isMobile ? "120px" : "150px", alt: "rasp logo" }), _jsx("h1", { className: `${fontMap.poppins.className}`, style: { fontSize: isMobile ? '2rem' : '2.5rem' }, children: "404" }), _jsx("h2", { className: `${fontMap.wixmadefor.className}`, style: {
|
|
102
|
+
textAlign: 'center',
|
|
103
|
+
fontSize: isMobile ? '0.9rem' : '1rem',
|
|
104
|
+
padding: isMobile ? '0 0.5rem' : '0'
|
|
105
|
+
}, children: !companyId ? "CompanyId is not provided. Please provide companyId in your env file." : "No forms found for this URL." }), !companyId && _jsxs("p", { className: `${fontMap.wixmadefor.className}`, style: {
|
|
106
|
+
textAlign: 'center',
|
|
107
|
+
fontSize: isMobile ? '0.85rem' : '1rem',
|
|
108
|
+
padding: isMobile ? '0 0.5rem' : '0'
|
|
109
|
+
}, children: [" Refer to Rasp docs for help: ", _jsx("a", { href: 'https://tryrasp.online/docs', style: { textDecoration: "underline" }, children: "https://tryrasp.online/docs" })] }), companyId && _jsxs("p", { className: `${fontMap.wixmadefor.className}`, style: {
|
|
110
|
+
textAlign: 'center',
|
|
111
|
+
fontSize: isMobile ? '0.85rem' : '1rem',
|
|
112
|
+
padding: isMobile ? '0 0.5rem' : '0',
|
|
113
|
+
wordBreak: 'break-all'
|
|
114
|
+
}, children: [" Set this as your form domain url: ", currentUrl] })] }), isLoading &&
|
|
93
115
|
_jsx("div", { id: "rasp-form-div", style: {
|
|
94
116
|
padding: 0,
|
|
95
117
|
margin: 0,
|
|
@@ -98,7 +120,7 @@ export function RaspForm({ otherStyles }) {
|
|
|
98
120
|
width: "auto",
|
|
99
121
|
height: "auto",
|
|
100
122
|
display: "inline-block",
|
|
101
|
-
transform: "translate(-50%, -25%)",
|
|
123
|
+
transform: isMobile ? "none" : "translate(-50%, -25%)",
|
|
102
124
|
overflow: "visible",
|
|
103
125
|
}, children: _jsx("div", { style: {
|
|
104
126
|
display: 'flex',
|
|
@@ -106,11 +128,12 @@ export function RaspForm({ otherStyles }) {
|
|
|
106
128
|
justifyContent: 'center',
|
|
107
129
|
borderRadius: '0.75rem',
|
|
108
130
|
backgroundColor: "white",
|
|
109
|
-
margin: '1.25rem',
|
|
110
|
-
width: '470px',
|
|
111
|
-
|
|
131
|
+
margin: isMobile ? '0.75rem' : '1.25rem',
|
|
132
|
+
width: isMobile ? '90vw' : '470px',
|
|
133
|
+
maxWidth: '470px',
|
|
134
|
+
minHeight: isMobile ? '350px' : '400px',
|
|
112
135
|
border: '1px solid whitesmoke',
|
|
113
|
-
padding: '2rem',
|
|
136
|
+
padding: isMobile ? '1.5rem' : '2rem',
|
|
114
137
|
paddingTop: "0px"
|
|
115
|
-
}, children: _jsxs("div", { style: { marginTop: "-30px" }, children: [_jsx(Skeleton, { width: 400, height: 40 }), _jsx(Skeleton, { width: 400, height: 30 }), _jsx("br", {}), _jsx(Skeleton, { width: 400, height: 70 }), _jsx(Skeleton, { width: 400, height: 100 })] }) }) })] }));
|
|
138
|
+
}, children: _jsxs("div", { style: { marginTop: "-30px" }, children: [_jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 40 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 30 }), _jsx("br", {}), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 70 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 100 })] }) }) })] }));
|
|
116
139
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RaspProvider.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAKlD,OAAO,cAAc,CAAA;AAQrB,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAC;QAChB,GAAG,CAAC,EAAC,MAAM,CAAC;QACZ,IAAI,CAAC,EAAC,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"RaspProvider.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/RaspProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAKlD,OAAO,cAAc,CAAA;AAQrB,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,CAAC,EAAC;QAChB,GAAG,CAAC,EAAC,MAAM,CAAC;QACZ,IAAI,CAAC,EAAC,MAAM,CAAA;KACb,CAAA;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAGD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqiBpD,CAAA"}
|
|
@@ -27,6 +27,7 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
27
27
|
const [posts, setPosts] = useState(null);
|
|
28
28
|
const [showVoteUI, setShowVoteUI] = useState(false);
|
|
29
29
|
const [currentPost, setCurrentPost] = useState(null);
|
|
30
|
+
const [isMobile, setIsMobile] = useState(false);
|
|
30
31
|
const getForm = async () => {
|
|
31
32
|
setIsLoadingFeedbackModal(true);
|
|
32
33
|
const f = await getFormByDomainOrCompany(companyId, currentUrl);
|
|
@@ -50,6 +51,13 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
50
51
|
if (typeof window !== 'undefined') {
|
|
51
52
|
setCompanyId(process.env.NEXT_PUBLIC_RASP_COMPANY_ID);
|
|
52
53
|
setCurrentUrl(window.location.href);
|
|
54
|
+
// Check if mobile
|
|
55
|
+
const checkMobile = () => {
|
|
56
|
+
setIsMobile(window.innerWidth <= 768);
|
|
57
|
+
};
|
|
58
|
+
checkMobile();
|
|
59
|
+
window.addEventListener('resize', checkMobile);
|
|
60
|
+
return () => window.removeEventListener('resize', checkMobile);
|
|
53
61
|
}
|
|
54
62
|
}, []);
|
|
55
63
|
useEffect(() => {
|
|
@@ -111,93 +119,194 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
111
119
|
// If vote fails, localStorage won't be set, so user can retry
|
|
112
120
|
}
|
|
113
121
|
}
|
|
122
|
+
// Responsive positioning helpers
|
|
123
|
+
const getModalPosition = () => {
|
|
124
|
+
if (isMobile) {
|
|
125
|
+
return {
|
|
126
|
+
position: "fixed",
|
|
127
|
+
top: "50%",
|
|
128
|
+
left: "50%",
|
|
129
|
+
transform: "translate(-50%, -50%)",
|
|
130
|
+
zIndex: 1000000000000000,
|
|
131
|
+
padding: 0,
|
|
132
|
+
margin: 0,
|
|
133
|
+
border: 0,
|
|
134
|
+
background: "transparent",
|
|
135
|
+
width: "auto",
|
|
136
|
+
height: "auto",
|
|
137
|
+
display: "inline-block",
|
|
138
|
+
overflow: "visible"
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
position: "fixed",
|
|
143
|
+
bottom: "8%",
|
|
144
|
+
right: "3%",
|
|
145
|
+
zIndex: 1000000000000000,
|
|
146
|
+
padding: 0,
|
|
147
|
+
margin: 0,
|
|
148
|
+
border: 0,
|
|
149
|
+
background: "transparent",
|
|
150
|
+
width: "auto",
|
|
151
|
+
height: "auto",
|
|
152
|
+
display: "inline-block",
|
|
153
|
+
transform: "translate(-50%, -25%)",
|
|
154
|
+
overflow: "visible"
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
const getBoardModalPosition = () => {
|
|
158
|
+
if (isMobile) {
|
|
159
|
+
return {
|
|
160
|
+
width: "90vw",
|
|
161
|
+
maxWidth: "470px",
|
|
162
|
+
height: "70vh",
|
|
163
|
+
maxHeight: "500px",
|
|
164
|
+
position: "fixed",
|
|
165
|
+
border: "2px solid black",
|
|
166
|
+
borderRadius: "20px",
|
|
167
|
+
alignItems: "center",
|
|
168
|
+
top: "50%",
|
|
169
|
+
left: "50%",
|
|
170
|
+
transform: "translate(-50%, -50%)",
|
|
171
|
+
zIndex: 1000000000000000,
|
|
172
|
+
backgroundColor: "white",
|
|
173
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
|
174
|
+
overflow: "hidden"
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
width: "470px",
|
|
179
|
+
height: "400px",
|
|
180
|
+
position: "fixed",
|
|
181
|
+
border: "2px solid black",
|
|
182
|
+
borderRadius: "20px",
|
|
183
|
+
alignItems: "center",
|
|
184
|
+
top: "22%",
|
|
185
|
+
left: "61%",
|
|
186
|
+
zIndex: 1000000000000000,
|
|
187
|
+
backgroundColor: "white",
|
|
188
|
+
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
|
189
|
+
overflow: "hidden"
|
|
190
|
+
};
|
|
191
|
+
};
|
|
192
|
+
const getControllerPosition = () => {
|
|
193
|
+
if (isMobile) {
|
|
194
|
+
return {
|
|
195
|
+
border: "2px solid black",
|
|
196
|
+
borderWidth: "1px",
|
|
197
|
+
borderRadius: "30px",
|
|
198
|
+
width: "220px",
|
|
199
|
+
height: "40px",
|
|
200
|
+
zIndex: 100000000000000,
|
|
201
|
+
padding: "10px",
|
|
202
|
+
display: "flex",
|
|
203
|
+
flexDirection: "row",
|
|
204
|
+
backgroundColor: "white",
|
|
205
|
+
position: "fixed",
|
|
206
|
+
gap: "10px",
|
|
207
|
+
bottom: "80px",
|
|
208
|
+
left: "50%",
|
|
209
|
+
transform: "translateX(-50%)"
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
border: "2px solid black",
|
|
214
|
+
borderWidth: "1px",
|
|
215
|
+
borderRadius: "30px",
|
|
216
|
+
width: "240px",
|
|
217
|
+
height: "40px",
|
|
218
|
+
zIndex: 100000000000000,
|
|
219
|
+
padding: "10px",
|
|
220
|
+
display: "flex",
|
|
221
|
+
flexDirection: "row",
|
|
222
|
+
backgroundColor: "white",
|
|
223
|
+
position: "fixed",
|
|
224
|
+
gap: "10px",
|
|
225
|
+
top: "84%",
|
|
226
|
+
left: "77%"
|
|
227
|
+
};
|
|
228
|
+
};
|
|
229
|
+
const getLauncherPosition = () => {
|
|
230
|
+
if (isMobile) {
|
|
231
|
+
return {
|
|
232
|
+
backgroundColor: "white",
|
|
233
|
+
padding: 15,
|
|
234
|
+
borderWidth: 1,
|
|
235
|
+
borderColor: "black",
|
|
236
|
+
borderRadius: "100%",
|
|
237
|
+
width: "50px",
|
|
238
|
+
height: "50px",
|
|
239
|
+
position: "fixed",
|
|
240
|
+
zIndex: 1000000000000000,
|
|
241
|
+
cursor: "pointer",
|
|
242
|
+
bottom: "20px",
|
|
243
|
+
right: "20px"
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
return {
|
|
247
|
+
backgroundColor: "white",
|
|
248
|
+
padding: 15,
|
|
249
|
+
borderWidth: 1,
|
|
250
|
+
borderColor: "black",
|
|
251
|
+
borderRadius: "100%",
|
|
252
|
+
width: "50px",
|
|
253
|
+
height: "50px",
|
|
254
|
+
position: "fixed",
|
|
255
|
+
zIndex: 1000000000000000,
|
|
256
|
+
cursor: "pointer",
|
|
257
|
+
top: launcherPosition ? launcherPosition.top : "89%",
|
|
258
|
+
left: launcherPosition ? launcherPosition.left : "95%"
|
|
259
|
+
};
|
|
260
|
+
};
|
|
114
261
|
return (_jsxs("div", { children: [children, showFeedbackModal && form && !isLoadingFeedbackModal && form.active && mainTheme && fields &&
|
|
115
|
-
_jsx("div", { id: "rasp-form-div", style: {
|
|
116
|
-
|
|
117
|
-
bottom: "8%",
|
|
118
|
-
right: "3%",
|
|
119
|
-
zIndex: 1000000000000000,
|
|
120
|
-
padding: 0,
|
|
121
|
-
margin: 0,
|
|
122
|
-
border: 0,
|
|
123
|
-
background: "transparent",
|
|
124
|
-
width: "auto",
|
|
125
|
-
height: "auto",
|
|
126
|
-
display: "inline-block",
|
|
127
|
-
transform: "translate(-50%, -25%)",
|
|
128
|
-
overflow: "visible"
|
|
129
|
-
}, children: _jsx(StaticFormComponent, { form: form, mainTheme: mainTheme, fields: fields }) }), !isLoadingFeedbackModal && showFeedbackModal && !form && _jsxs("div", { style: {
|
|
130
|
-
position: "fixed",
|
|
131
|
-
bottom: "8%",
|
|
132
|
-
right: "3%",
|
|
133
|
-
zIndex: 1000000000000000,
|
|
262
|
+
_jsx("div", { id: "rasp-form-div", style: getModalPosition(), children: _jsx(StaticFormComponent, { form: form, mainTheme: mainTheme, fields: fields }) }), !isLoadingFeedbackModal && showFeedbackModal && !form && _jsxs("div", { style: {
|
|
263
|
+
...getModalPosition(),
|
|
134
264
|
display: 'flex',
|
|
135
265
|
flexDirection: 'column',
|
|
136
266
|
alignItems: 'center',
|
|
137
267
|
borderRadius: '0.75rem',
|
|
138
268
|
backgroundColor: 'white',
|
|
139
|
-
margin: '1.25rem',
|
|
140
|
-
width: '470px',
|
|
141
|
-
|
|
269
|
+
margin: isMobile ? '1rem' : '1.25rem',
|
|
270
|
+
width: isMobile ? '90vw' : '470px',
|
|
271
|
+
maxWidth: '470px',
|
|
272
|
+
minHeight: isMobile ? '300px' : '300px',
|
|
142
273
|
border: '1px solid black',
|
|
143
274
|
padding: '1rem',
|
|
144
275
|
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)'
|
|
145
276
|
}, children: [_jsx("br", {}), _jsx("br", {}), _jsx("img", { src: RASP_LOGO_BASE64, width: "150px", height: "150px", alt: "rasp logo" }), _jsx("h1", { className: `${fontMap.poppins.className}`, children: "404" }), _jsx("h2", { className: `${fontMap.wixmadefor.className}`, style: { textAlign: 'center' }, children: !companyId ? "CompanyId is not provided. Please provide companyId in your env file." : "No forms found for this URL." }), !companyId && _jsxs("p", { className: `${fontMap.wixmadefor.className}`, style: { textAlign: 'center' }, children: [" Refer to Rasp docs for help: ", _jsx("a", { href: 'https://www.tryrasp.online/docs', style: { textDecoration: "underline" }, children: "https://www.tryrasp.online/docs" })] }), companyId && _jsxs("p", { className: `${fontMap.wixmadefor.className}`, style: { textAlign: 'center' }, children: [" Set this as your form domain url: ", currentUrl] })] }), isLoadingFeedbackModal && showFeedbackModalSkeleton && !form && !mainTheme &&
|
|
146
|
-
_jsx("div", { id: "rasp-form-div", style: {
|
|
147
|
-
position: "fixed",
|
|
148
|
-
bottom: "8%",
|
|
149
|
-
right: "3%",
|
|
150
|
-
zIndex: 1000000000000000,
|
|
151
|
-
padding: 0,
|
|
152
|
-
margin: 0,
|
|
153
|
-
background: "transparent",
|
|
154
|
-
width: "auto",
|
|
155
|
-
height: "auto",
|
|
156
|
-
display: "inline-block",
|
|
157
|
-
transform: "translate(-50%, -25%)",
|
|
158
|
-
overflow: "visible"
|
|
159
|
-
}, children: _jsx("div", { style: {
|
|
277
|
+
_jsx("div", { id: "rasp-form-div", style: getModalPosition(), children: _jsx("div", { style: {
|
|
160
278
|
display: 'flex',
|
|
161
279
|
flexDirection: "column",
|
|
162
280
|
justifyContent: 'center',
|
|
163
281
|
backgroundColor: "white",
|
|
164
|
-
margin: '1.25rem',
|
|
165
|
-
width: '470px',
|
|
282
|
+
margin: isMobile ? '1rem' : '1.25rem',
|
|
283
|
+
width: isMobile ? '90vw' : '470px',
|
|
284
|
+
maxWidth: '470px',
|
|
166
285
|
height: 'auto',
|
|
167
286
|
border: "2px solid black",
|
|
168
287
|
borderRadius: "20px",
|
|
169
288
|
padding: '2rem',
|
|
170
289
|
paddingTop: "0px"
|
|
171
|
-
}, children: _jsxs("div", { children: [_jsx("br", {}), _jsx(Skeleton, { width: 400, height: 40 }), _jsx(Skeleton, { width: 400, height: 30 }), _jsx("br", {}), _jsx(Skeleton, { width: 400, height: 70 }), _jsx(Skeleton, { width:
|
|
290
|
+
}, children: _jsxs("div", { children: [_jsx("br", {}), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 40 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 30 }), _jsx("br", {}), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 70 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 400) : 400, height: 100 })] }) }) }), showBoardModalSkeleton && showBoardModal &&
|
|
172
291
|
_jsxs("div", { style: {
|
|
173
292
|
display: "flex",
|
|
174
293
|
flexDirection: "column",
|
|
175
294
|
gap: "5px",
|
|
176
|
-
width: "470px",
|
|
177
|
-
|
|
295
|
+
width: isMobile ? "90vw" : "470px",
|
|
296
|
+
maxWidth: "470px",
|
|
297
|
+
height: isMobile ? "70vh" : "400px",
|
|
298
|
+
maxHeight: "500px",
|
|
178
299
|
position: "fixed",
|
|
179
300
|
border: "2px solid black",
|
|
180
301
|
borderRadius: "20px",
|
|
181
302
|
alignItems: 'center',
|
|
182
|
-
top: "22%",
|
|
183
|
-
left: "61%",
|
|
303
|
+
top: isMobile ? "50%" : "22%",
|
|
304
|
+
left: isMobile ? "50%" : "61%",
|
|
305
|
+
transform: isMobile ? "translate(-50%, -50%)" : "none",
|
|
184
306
|
zIndex: 1000000000000000,
|
|
185
307
|
backgroundColor: "white"
|
|
186
|
-
}, children: [_jsx("br", {}), _jsx(Skeleton, { width: 440, height: 70 }), _jsx(Skeleton, { width: 440, height: 70 }), _jsx(Skeleton, { width: 440, height: 70 }), _jsx(Skeleton, { width: 440, height: 70 })] }), showBoardModal && !isLoadingBoardModal &&
|
|
187
|
-
_jsxs("div", { style: {
|
|
188
|
-
width: "470px",
|
|
189
|
-
height: "400px",
|
|
190
|
-
position: "fixed",
|
|
191
|
-
border: "2px solid black",
|
|
192
|
-
borderRadius: "20px",
|
|
193
|
-
alignItems: 'center',
|
|
194
|
-
top: "22%",
|
|
195
|
-
left: "61%",
|
|
196
|
-
zIndex: 1000000000000000,
|
|
197
|
-
backgroundColor: "white",
|
|
198
|
-
boxShadow: '0 1px 3px 0 rgba(0, 0, 0, 1), 0 1px 2px 0 rgba(0, 0, 0, 0.06)',
|
|
199
|
-
overflow: "hidden"
|
|
200
|
-
}, children: [_jsx("div", { style: {
|
|
308
|
+
}, children: [_jsx("br", {}), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 440) : 440, height: 70 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 440) : 440, height: 70 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 440) : 440, height: 70 }), _jsx(Skeleton, { width: isMobile ? Math.min(window.innerWidth * 0.8, 440) : 440, height: 70 })] }), showBoardModal && !isLoadingBoardModal &&
|
|
309
|
+
_jsxs("div", { style: getBoardModalPosition(), children: [_jsx("div", { style: {
|
|
201
310
|
display: "flex",
|
|
202
311
|
flexDirection: "column",
|
|
203
312
|
alignItems: "center",
|
|
@@ -206,30 +315,35 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
206
315
|
height: "50px",
|
|
207
316
|
backgroundColor: "#9e54df",
|
|
208
317
|
}, children: _jsx("h1", { className: fontMap.poppins.className, style: {
|
|
209
|
-
color: "white"
|
|
318
|
+
color: "white",
|
|
319
|
+
fontSize: isMobile ? "13px" : "15px",
|
|
320
|
+
textAlign: "center",
|
|
321
|
+
padding: "0 10px"
|
|
210
322
|
}, children: "Vote for New Potential Features" }) }), _jsxs("div", { style: {
|
|
211
323
|
display: "flex",
|
|
212
324
|
flexDirection: "column",
|
|
213
325
|
gap: "5px",
|
|
214
326
|
margin: "10px",
|
|
215
|
-
height: "260px"
|
|
216
|
-
|
|
327
|
+
height: isMobile ? "calc(70vh - 120px)" : "260px",
|
|
328
|
+
overflowY: "auto"
|
|
329
|
+
}, children: [posts && posts.length === 0 && _jsx(CircleArrowUp, { size: isMobile ? 80 : 100, color: "black", style: {
|
|
217
330
|
marginTop: '40px',
|
|
218
|
-
marginLeft: '40%'
|
|
331
|
+
marginLeft: isMobile ? '30%' : '40%'
|
|
219
332
|
} }), posts && posts.length === 0 && _jsx("h1", { className: fontMap.poppins.className, style: {
|
|
220
333
|
color: 'black',
|
|
221
334
|
textAlign: 'center',
|
|
222
|
-
fontSize: '16px',
|
|
223
|
-
marginTop: '40px'
|
|
335
|
+
fontSize: isMobile ? '14px' : '16px',
|
|
336
|
+
marginTop: '40px',
|
|
337
|
+
padding: '0 10px'
|
|
224
338
|
}, children: "No New Features in the works at the moment. Please Check in later..." }), !showVoteUI && posts && posts.map((post, index) => (_jsx(PostItem, { post: post, setShowVoteUI: setShowVoteUI, setCurrentPost: setCurrentPost }, index))), showVoteUI && currentPost && _jsxs("div", { style: {
|
|
225
339
|
margin: "10px"
|
|
226
340
|
}, children: [_jsx("h1", { className: fontMap.poppins.className, style: {
|
|
227
|
-
fontSize: "20px"
|
|
341
|
+
fontSize: isMobile ? "18px" : "20px"
|
|
228
342
|
}, children: currentPost.title }), _jsx("h2", { className: fontMap.wixmadefor.className, style: {
|
|
229
|
-
fontSize: "15px",
|
|
343
|
+
fontSize: isMobile ? "13px" : "15px",
|
|
230
344
|
color: "gray"
|
|
231
345
|
}, children: currentPost.subtitle }), _jsx("p", { className: fontMap.wixmadefor.className, style: {
|
|
232
|
-
fontSize: "11px",
|
|
346
|
+
fontSize: isMobile ? "10px" : "11px",
|
|
233
347
|
marginTop: "10px"
|
|
234
348
|
}, children: currentPost.description })] })] }), showVoteUI && currentPost &&
|
|
235
349
|
_jsx("div", { style: {
|
|
@@ -248,25 +362,10 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
248
362
|
cursor: "pointer"
|
|
249
363
|
}, onClick: () => VoteFor(currentPost._id, true), children: _jsx(CircleArrowUp, { color: "#52f052", size: 30 }) }), _jsx("div", { title: "Downvote this feature", style: {
|
|
250
364
|
cursor: "pointer"
|
|
251
|
-
}, onClick: () => VoteFor(currentPost._id, false), children: _jsx(CircleArrowDown, { color: "red", size: 30 }) })] }) })] }), showController && _jsxs("div", { style: {
|
|
252
|
-
border: "2px solid black",
|
|
253
|
-
borderWidth: "1px",
|
|
254
|
-
borderRadius: "30px",
|
|
255
|
-
width: "240px",
|
|
256
|
-
height: "40px",
|
|
257
|
-
zIndex: 100000000000000,
|
|
258
|
-
padding: "10px",
|
|
259
|
-
display: "flex",
|
|
260
|
-
flexDirection: "row",
|
|
261
|
-
backgroundColor: "white",
|
|
262
|
-
position: "fixed",
|
|
263
|
-
gap: "10px",
|
|
264
|
-
top: "84%",
|
|
265
|
-
left: "77%"
|
|
266
|
-
}, children: [_jsxs("div", { style: {
|
|
365
|
+
}, onClick: () => VoteFor(currentPost._id, false), children: _jsx(CircleArrowDown, { color: "red", size: 30 }) })] }) })] }), showController && _jsxs("div", { style: getControllerPosition(), children: [_jsxs("div", { style: {
|
|
267
366
|
display: "flex",
|
|
268
367
|
alignItems: "center",
|
|
269
|
-
gap: "10px",
|
|
368
|
+
gap: isMobile ? "5px" : "10px",
|
|
270
369
|
flex: 0.8,
|
|
271
370
|
cursor: "pointer",
|
|
272
371
|
}, onClick: () => {
|
|
@@ -280,7 +379,7 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
280
379
|
setShowFeedbackModal(true);
|
|
281
380
|
});
|
|
282
381
|
}, children: [_jsx(MessageCircle, { size: 15 }), _jsx("b", { className: fontMap.poppins.className, style: {
|
|
283
|
-
fontSize: "10px"
|
|
382
|
+
fontSize: isMobile ? "9px" : "10px"
|
|
284
383
|
}, children: "Feedback" })] }), _jsx("div", { style: {
|
|
285
384
|
width: "1px",
|
|
286
385
|
height: "100%",
|
|
@@ -295,27 +394,14 @@ export const RaspProvider = ({ children, launcherPosition }) => {
|
|
|
295
394
|
}, style: {
|
|
296
395
|
display: "flex",
|
|
297
396
|
alignItems: "center",
|
|
298
|
-
gap: "10px",
|
|
397
|
+
gap: isMobile ? "5px" : "10px",
|
|
299
398
|
flex: 1,
|
|
300
399
|
cursor: "pointer",
|
|
301
400
|
}, children: [_jsx(CircleArrowUp, { size: 15 }), _jsx("b", { className: fontMap.poppins.className, style: {
|
|
302
|
-
fontSize: "10px"
|
|
401
|
+
fontSize: isMobile ? "9px" : "10px"
|
|
303
402
|
}, children: "Feature Vote" })] })] }), _jsx("div", { id: "rasp-launcher", onClick: () => {
|
|
304
403
|
setShowController(!showController);
|
|
305
404
|
setShowFeedbackModal(false);
|
|
306
405
|
setShowBoardModal(false);
|
|
307
|
-
}, style: {
|
|
308
|
-
backgroundColor: "white",
|
|
309
|
-
padding: 15,
|
|
310
|
-
borderWidth: 1,
|
|
311
|
-
borderColor: "black",
|
|
312
|
-
borderRadius: "100%",
|
|
313
|
-
width: "50px",
|
|
314
|
-
height: "50px",
|
|
315
|
-
position: "fixed",
|
|
316
|
-
zIndex: 1000000000000000,
|
|
317
|
-
cursor: "pointer",
|
|
318
|
-
top: launcherPosition ? launcherPosition.top : "89%",
|
|
319
|
-
left: launcherPosition ? launcherPosition.left : "95%"
|
|
320
|
-
}, children: _jsx(MessageSquare, { color: 'black', size: 20 }) })] }));
|
|
406
|
+
}, style: getLauncherPosition(), children: _jsx(MessageSquare, { color: 'black', size: 20 }) })] }));
|
|
321
407
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StaticFormComponent.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/StaticFormComponent.tsx"],"names":[],"mappings":"AAMA,iBAAS,mBAAmB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAC,EAAC;IAAG,IAAI,EAAE,GAAG,CAAC;IAClE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CAAC,
|
|
1
|
+
{"version":3,"file":"StaticFormComponent.d.ts","sourceRoot":"","sources":["../../../src/nextjs/components/StaticFormComponent.tsx"],"names":[],"mappings":"AAMA,iBAAS,mBAAmB,CAAC,EAAC,IAAI,EAAE,SAAS,EAAE,MAAM,EAAC,EAAC;IAAG,IAAI,EAAE,GAAG,CAAC;IAClE,SAAS,EAAE,GAAG,CAAC;IACf,MAAM,EAAE,GAAG,EAAE,CAAC;CAAC,2CAwPhB;AAED,eAAe,mBAAmB,CAAA"}
|