@upstep/js 0.9.0 → 0.10.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.
- package/dist/index.cjs +25 -12
- package/dist/index.js +175 -154
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +354 -348
- package/dist/support.cjs +1 -1
- package/dist/support.d.ts +10 -1
- package/dist/support.d.ts.map +1 -1
- package/dist/support.js +50 -33
- package/dist/upstep.global.js +26 -13
- package/dist/widget.d.ts +1 -0
- package/dist/widget.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/react.js
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { jsxs as a, Fragment as
|
|
2
|
-
import J, { createContext as K, useState as m, useEffect as
|
|
1
|
+
import { jsxs as a, Fragment as B, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import J, { createContext as K, useState as m, useEffect as k, useCallback as F, useContext as Q, useRef as X } from "react";
|
|
3
3
|
import { U as Z } from "./api-CROQwfAo.mjs";
|
|
4
|
-
import { scaleRadius as
|
|
5
|
-
const
|
|
6
|
-
function N(
|
|
7
|
-
return
|
|
4
|
+
import { scaleRadius as x, DEFAULT_ACCENT as ee, buildWidgetPalette as te, withAlpha as oe } from "./theme.js";
|
|
5
|
+
const ne = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
|
|
6
|
+
function N(n, e) {
|
|
7
|
+
return oe(n, e) ?? `color-mix(in srgb, ${n} ${Math.round(e * 100)}%, transparent)`;
|
|
8
8
|
}
|
|
9
9
|
function P() {
|
|
10
10
|
if (typeof document > "u") return !1;
|
|
11
|
-
const
|
|
12
|
-
return
|
|
11
|
+
const n = document.documentElement;
|
|
12
|
+
return n.classList.contains("dark") || n.getAttribute("data-theme") === "dark";
|
|
13
13
|
}
|
|
14
|
-
function re(
|
|
15
|
-
const [
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
|
|
14
|
+
function re(n, e) {
|
|
15
|
+
const [o, p] = m(() => n === "dark");
|
|
16
|
+
k(() => {
|
|
17
|
+
if (n !== "auto") {
|
|
18
|
+
p(n === "dark");
|
|
19
19
|
return;
|
|
20
20
|
}
|
|
21
|
-
if (
|
|
22
|
-
const d = new MutationObserver(() =>
|
|
21
|
+
if (p(P()), typeof MutationObserver > "u") return;
|
|
22
|
+
const d = new MutationObserver(() => p(P()));
|
|
23
23
|
return d.observe(document.documentElement, {
|
|
24
24
|
attributes: !0,
|
|
25
25
|
attributeFilter: ["class", "data-theme"]
|
|
26
26
|
}), () => d.disconnect();
|
|
27
|
-
}, [
|
|
28
|
-
const { accentColor:
|
|
27
|
+
}, [n]);
|
|
28
|
+
const { accentColor: c, colors: b, radius: r } = e;
|
|
29
29
|
return J.useMemo(
|
|
30
30
|
() => te({
|
|
31
|
-
mode:
|
|
32
|
-
accentColor:
|
|
33
|
-
colors:
|
|
34
|
-
radius:
|
|
31
|
+
mode: o ? "dark" : "light",
|
|
32
|
+
accentColor: c,
|
|
33
|
+
colors: b,
|
|
34
|
+
radius: r
|
|
35
35
|
}),
|
|
36
36
|
// `colors` is usually an inline object literal, so compare it by value.
|
|
37
37
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
38
|
-
[
|
|
38
|
+
[o, c, JSON.stringify(b ?? null), r]
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
const
|
|
41
|
+
const H = K(null);
|
|
42
42
|
function be({
|
|
43
|
-
children:
|
|
43
|
+
children: n,
|
|
44
44
|
...e
|
|
45
45
|
}) {
|
|
46
|
-
const [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}, [
|
|
50
|
-
|
|
46
|
+
const [o] = m(() => new Z(e)), [p, c] = m([]), [b, r] = m(!1), [d, l] = m(!0);
|
|
47
|
+
k(() => {
|
|
48
|
+
o.setUserId(e.userId);
|
|
49
|
+
}, [o, e.userId]), k(() => {
|
|
50
|
+
o.supportIdentityToken = e.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach(
|
|
51
51
|
(s) => {
|
|
52
52
|
var u;
|
|
53
53
|
return (u = s.contentWindow) == null ? void 0 : u.postMessage(
|
|
@@ -55,56 +55,56 @@ function be({
|
|
|
55
55
|
type: "upstep:support:identity",
|
|
56
56
|
token: e.supportIdentityToken
|
|
57
57
|
},
|
|
58
|
-
new URL(
|
|
58
|
+
new URL(o.baseUrl).origin
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
);
|
|
62
|
-
}, [
|
|
63
|
-
const
|
|
62
|
+
}, [o, e.supportIdentityToken]);
|
|
63
|
+
const i = F(async () => {
|
|
64
64
|
try {
|
|
65
|
-
const s = await
|
|
66
|
-
|
|
65
|
+
const s = await o.listFeedback({ sort: "votes", limit: 20 });
|
|
66
|
+
c(s.items), l(s.showBranding ?? !0);
|
|
67
67
|
} catch {
|
|
68
68
|
}
|
|
69
|
-
}, [
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
}, [
|
|
73
|
-
const
|
|
69
|
+
}, [o]);
|
|
70
|
+
k(() => {
|
|
71
|
+
i();
|
|
72
|
+
}, [i]);
|
|
73
|
+
const g = F(
|
|
74
74
|
async (s, u, S) => {
|
|
75
|
-
const
|
|
76
|
-
s.trim() && (
|
|
75
|
+
const w = { content: u };
|
|
76
|
+
s.trim() && (w.title = s.trim()), S !== void 0 && (w.type = S), await o.submitFeedback(w), await i();
|
|
77
77
|
},
|
|
78
|
-
[
|
|
79
|
-
),
|
|
78
|
+
[o, i]
|
|
79
|
+
), v = F(
|
|
80
80
|
async (s, u) => {
|
|
81
81
|
try {
|
|
82
|
-
await
|
|
82
|
+
await o.vote(s, u), await i();
|
|
83
83
|
} catch {
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
|
-
[
|
|
87
|
-
),
|
|
88
|
-
(s) =>
|
|
89
|
-
[
|
|
90
|
-
),
|
|
91
|
-
(s) =>
|
|
92
|
-
[
|
|
86
|
+
[o, i]
|
|
87
|
+
), h = F(
|
|
88
|
+
(s) => o.getItem(s),
|
|
89
|
+
[o]
|
|
90
|
+
), C = F(() => r(!0), []), z = F(() => r(!1), []), I = F(
|
|
91
|
+
(s) => o.setUserId(s),
|
|
92
|
+
[o]
|
|
93
93
|
);
|
|
94
94
|
return /* @__PURE__ */ t(
|
|
95
|
-
|
|
95
|
+
H.Provider,
|
|
96
96
|
{
|
|
97
97
|
value: {
|
|
98
|
-
client:
|
|
99
|
-
feedItems:
|
|
100
|
-
loadFeed:
|
|
101
|
-
submit:
|
|
102
|
-
vote:
|
|
103
|
-
getItem:
|
|
104
|
-
isOpen:
|
|
105
|
-
open:
|
|
106
|
-
close:
|
|
107
|
-
identify:
|
|
98
|
+
client: o,
|
|
99
|
+
feedItems: p,
|
|
100
|
+
loadFeed: i,
|
|
101
|
+
submit: g,
|
|
102
|
+
vote: v,
|
|
103
|
+
getItem: h,
|
|
104
|
+
isOpen: b,
|
|
105
|
+
open: C,
|
|
106
|
+
close: z,
|
|
107
|
+
identify: I,
|
|
108
108
|
accentColor: e.accentColor ?? ee,
|
|
109
109
|
customAccentColor: e.accentColor,
|
|
110
110
|
theme: e.theme ?? "auto",
|
|
@@ -114,107 +114,107 @@ function be({
|
|
|
114
114
|
showBranding: d,
|
|
115
115
|
chat: e.chat !== !1
|
|
116
116
|
},
|
|
117
|
-
children:
|
|
117
|
+
children: n
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
const
|
|
123
|
-
if (!
|
|
124
|
-
return
|
|
121
|
+
function E() {
|
|
122
|
+
const n = Q(H);
|
|
123
|
+
if (!n) throw new Error("useUpstep must be used inside <UpstepProvider>");
|
|
124
|
+
return n;
|
|
125
125
|
}
|
|
126
126
|
function ye({
|
|
127
|
-
position:
|
|
127
|
+
position: n = "bottom-right",
|
|
128
128
|
accentColor: e,
|
|
129
|
-
theme:
|
|
130
|
-
colors:
|
|
131
|
-
radius:
|
|
132
|
-
fontFamily:
|
|
133
|
-
hideLauncher:
|
|
129
|
+
theme: o,
|
|
130
|
+
colors: p,
|
|
131
|
+
radius: c,
|
|
132
|
+
fontFamily: b,
|
|
133
|
+
hideLauncher: r = !1,
|
|
134
134
|
chat: d = !0
|
|
135
135
|
}) {
|
|
136
136
|
var A;
|
|
137
|
-
const l =
|
|
137
|
+
const l = E(), i = re(o ?? l.theme, {
|
|
138
138
|
accentColor: e ?? l.customAccentColor,
|
|
139
|
-
colors:
|
|
140
|
-
radius:
|
|
141
|
-
}),
|
|
142
|
-
colors:
|
|
143
|
-
radius:
|
|
144
|
-
fontFamily:
|
|
139
|
+
colors: p ?? l.colors,
|
|
140
|
+
radius: c ?? l.radius
|
|
141
|
+
}), g = i.accent, v = {
|
|
142
|
+
colors: p ?? l.colors,
|
|
143
|
+
radius: c ?? l.radius,
|
|
144
|
+
fontFamily: b ?? l.fontFamily
|
|
145
145
|
}, {
|
|
146
|
-
isOpen:
|
|
147
|
-
open:
|
|
148
|
-
close:
|
|
149
|
-
showBranding:
|
|
150
|
-
} = l, [s, u] = m("list"), [S,
|
|
151
|
-
|
|
146
|
+
isOpen: h,
|
|
147
|
+
open: C,
|
|
148
|
+
close: z,
|
|
149
|
+
showBranding: I
|
|
150
|
+
} = l, [s, u] = m("list"), [S, w] = m(!1);
|
|
151
|
+
k(() => {
|
|
152
152
|
let f = !0;
|
|
153
153
|
if (l.client.chat = l.chat, !l.chat || !d) {
|
|
154
|
-
|
|
154
|
+
w(!1);
|
|
155
155
|
return;
|
|
156
156
|
}
|
|
157
|
-
return l.client.supportEnabled().then((
|
|
158
|
-
f &&
|
|
157
|
+
return l.client.supportEnabled().then((T) => {
|
|
158
|
+
f && w(T);
|
|
159
159
|
}), () => {
|
|
160
160
|
f = !1;
|
|
161
161
|
};
|
|
162
|
-
}, [l.client, l.chat, d]),
|
|
162
|
+
}, [l.client, l.chat, d]), k(() => {
|
|
163
163
|
(!l.chat || !d) && s === "support" && u("list");
|
|
164
|
-
}, [l.chat, d, s]),
|
|
165
|
-
|
|
166
|
-
}, [
|
|
167
|
-
const [
|
|
168
|
-
|
|
164
|
+
}, [l.chat, d, s]), k(() => {
|
|
165
|
+
h && u(S && d && l.chat ? "support" : "list");
|
|
166
|
+
}, [h, S, d, l.chat]);
|
|
167
|
+
const [y, L] = m(null), [R, M] = m(!1);
|
|
168
|
+
k(() => {
|
|
169
169
|
const f = window.matchMedia("(max-width: 639px)");
|
|
170
170
|
M(f.matches);
|
|
171
|
-
const
|
|
172
|
-
return f.addEventListener("change",
|
|
171
|
+
const T = (q) => M(q.matches);
|
|
172
|
+
return f.addEventListener("change", T), () => f.removeEventListener("change", T);
|
|
173
173
|
}, []);
|
|
174
174
|
const _ = {
|
|
175
175
|
position: "fixed",
|
|
176
176
|
bottom: 24,
|
|
177
177
|
right: 24
|
|
178
|
-
},
|
|
179
|
-
function
|
|
180
|
-
|
|
178
|
+
}, W = ((A = v.fontFamily) == null ? void 0 : A.trim()) || ne;
|
|
179
|
+
function U() {
|
|
180
|
+
z(), L(null);
|
|
181
181
|
}
|
|
182
182
|
function Y(f) {
|
|
183
183
|
L(f), u("detail");
|
|
184
184
|
}
|
|
185
|
-
return /* @__PURE__ */ a(
|
|
186
|
-
!
|
|
185
|
+
return /* @__PURE__ */ a(B, { children: [
|
|
186
|
+
!r && /* @__PURE__ */ a(
|
|
187
187
|
"button",
|
|
188
188
|
{
|
|
189
189
|
"aria-label": "Open help and feedback",
|
|
190
|
-
onClick:
|
|
190
|
+
onClick: C,
|
|
191
191
|
style: {
|
|
192
192
|
..._,
|
|
193
193
|
zIndex: 9998,
|
|
194
194
|
display: "inline-flex",
|
|
195
195
|
alignItems: "center",
|
|
196
196
|
gap: 7,
|
|
197
|
-
background:
|
|
198
|
-
color:
|
|
197
|
+
background: g,
|
|
198
|
+
color: i.accentText,
|
|
199
199
|
border: "none",
|
|
200
|
-
borderRadius:
|
|
201
|
-
padding:
|
|
200
|
+
borderRadius: x(9999, i.radius),
|
|
201
|
+
padding: R ? "12px" : "12px 18px",
|
|
202
202
|
fontSize: 14,
|
|
203
203
|
fontWeight: 600,
|
|
204
204
|
cursor: "pointer",
|
|
205
|
-
fontFamily:
|
|
205
|
+
fontFamily: W,
|
|
206
206
|
boxShadow: "0 6px 20px rgba(26,25,21,.18)"
|
|
207
207
|
},
|
|
208
208
|
children: [
|
|
209
209
|
/* @__PURE__ */ t(he, { size: 16 }),
|
|
210
|
-
!
|
|
210
|
+
!R && (S && d && l.chat ? "Help & feedback" : "Feedback")
|
|
211
211
|
]
|
|
212
212
|
}
|
|
213
213
|
),
|
|
214
|
-
|
|
214
|
+
h && /* @__PURE__ */ t(
|
|
215
215
|
"div",
|
|
216
216
|
{
|
|
217
|
-
onClick: (f) => f.target === f.currentTarget &&
|
|
217
|
+
onClick: (f) => f.target === f.currentTarget && U(),
|
|
218
218
|
style: {
|
|
219
219
|
position: "fixed",
|
|
220
220
|
inset: 0,
|
|
@@ -223,16 +223,16 @@ function ye({
|
|
|
223
223
|
display: "flex",
|
|
224
224
|
alignItems: "flex-end",
|
|
225
225
|
justifyContent: "flex-end",
|
|
226
|
-
padding:
|
|
227
|
-
fontFamily:
|
|
226
|
+
padding: R ? "0 12px 80px" : "0 24px 88px",
|
|
227
|
+
fontFamily: W
|
|
228
228
|
},
|
|
229
229
|
children: /* @__PURE__ */ a(
|
|
230
230
|
"div",
|
|
231
231
|
{
|
|
232
232
|
style: {
|
|
233
|
-
background:
|
|
234
|
-
border: `1px solid ${
|
|
235
|
-
borderRadius:
|
|
233
|
+
background: i.bg,
|
|
234
|
+
border: `1px solid ${i.border}`,
|
|
235
|
+
borderRadius: x(20, i.radius),
|
|
236
236
|
width: "100%",
|
|
237
237
|
maxWidth: S && d && l.chat ? 460 : 440,
|
|
238
238
|
maxHeight: "calc(100dvh - 112px)",
|
|
@@ -250,29 +250,29 @@ function ye({
|
|
|
250
250
|
alignItems: "center",
|
|
251
251
|
gap: 14,
|
|
252
252
|
padding: "10px 14px",
|
|
253
|
-
borderBottom: `1px solid ${
|
|
253
|
+
borderBottom: `1px solid ${i.border}`,
|
|
254
254
|
flexShrink: 0
|
|
255
255
|
},
|
|
256
256
|
children: [
|
|
257
257
|
/* @__PURE__ */ t("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [
|
|
258
258
|
["support", "Support"],
|
|
259
|
-
["list", "
|
|
260
|
-
].map(([f,
|
|
259
|
+
["list", "Ideas"]
|
|
260
|
+
].map(([f, T]) => /* @__PURE__ */ t(
|
|
261
261
|
"button",
|
|
262
262
|
{
|
|
263
263
|
onClick: () => u(f),
|
|
264
264
|
style: {
|
|
265
265
|
flex: 1,
|
|
266
266
|
border: 0,
|
|
267
|
-
borderRadius:
|
|
267
|
+
borderRadius: x(8, i.radius),
|
|
268
268
|
padding: "9px 12px",
|
|
269
|
-
background: (s === "support" ? f === "support" : f === "list") ?
|
|
270
|
-
color: (s === "support" ? f === "support" : f === "list") ?
|
|
269
|
+
background: (s === "support" ? f === "support" : f === "list") ? i.bgSoft : "transparent",
|
|
270
|
+
color: (s === "support" ? f === "support" : f === "list") ? i.text : i.textSoft,
|
|
271
271
|
fontSize: 14,
|
|
272
272
|
fontWeight: 600,
|
|
273
273
|
cursor: "pointer"
|
|
274
274
|
},
|
|
275
|
-
children:
|
|
275
|
+
children: T
|
|
276
276
|
},
|
|
277
277
|
f
|
|
278
278
|
)) }),
|
|
@@ -280,11 +280,11 @@ function ye({
|
|
|
280
280
|
"button",
|
|
281
281
|
{
|
|
282
282
|
"aria-label": "Close",
|
|
283
|
-
onClick:
|
|
283
|
+
onClick: U,
|
|
284
284
|
style: {
|
|
285
285
|
border: 0,
|
|
286
286
|
background: "transparent",
|
|
287
|
-
color:
|
|
287
|
+
color: i.textSoft,
|
|
288
288
|
padding: 6,
|
|
289
289
|
cursor: "pointer",
|
|
290
290
|
fontSize: 14
|
|
@@ -302,7 +302,7 @@ function ye({
|
|
|
302
302
|
alignItems: "center",
|
|
303
303
|
justifyContent: "space-between",
|
|
304
304
|
padding: "16px 20px",
|
|
305
|
-
borderBottom: `1px solid ${
|
|
305
|
+
borderBottom: `1px solid ${i.border}`,
|
|
306
306
|
flexShrink: 0
|
|
307
307
|
},
|
|
308
308
|
children: [
|
|
@@ -315,7 +315,7 @@ function ye({
|
|
|
315
315
|
background: "none",
|
|
316
316
|
border: "none",
|
|
317
317
|
cursor: "pointer",
|
|
318
|
-
color:
|
|
318
|
+
color: g,
|
|
319
319
|
fontSize: 14,
|
|
320
320
|
fontWeight: 600,
|
|
321
321
|
padding: 0
|
|
@@ -329,7 +329,7 @@ function ye({
|
|
|
329
329
|
style: {
|
|
330
330
|
fontWeight: 700,
|
|
331
331
|
fontSize: 16,
|
|
332
|
-
color:
|
|
332
|
+
color: i.text,
|
|
333
333
|
letterSpacing: "-.01em"
|
|
334
334
|
},
|
|
335
335
|
children: "Feedback"
|
|
@@ -341,7 +341,7 @@ function ye({
|
|
|
341
341
|
style: {
|
|
342
342
|
fontWeight: 700,
|
|
343
343
|
fontSize: 16,
|
|
344
|
-
color:
|
|
344
|
+
color: i.text,
|
|
345
345
|
letterSpacing: "-.01em"
|
|
346
346
|
},
|
|
347
347
|
children: "New feedback"
|
|
@@ -354,10 +354,10 @@ function ye({
|
|
|
354
354
|
{
|
|
355
355
|
onClick: () => u("create"),
|
|
356
356
|
style: {
|
|
357
|
-
background:
|
|
358
|
-
color:
|
|
357
|
+
background: g,
|
|
358
|
+
color: i.accentText,
|
|
359
359
|
border: "none",
|
|
360
|
-
borderRadius:
|
|
360
|
+
borderRadius: x(20, i.radius),
|
|
361
361
|
padding: "6px 14px",
|
|
362
362
|
fontSize: 14,
|
|
363
363
|
fontWeight: 700,
|
|
@@ -369,16 +369,16 @@ function ye({
|
|
|
369
369
|
/* @__PURE__ */ t(
|
|
370
370
|
"button",
|
|
371
371
|
{
|
|
372
|
-
onClick:
|
|
372
|
+
onClick: U,
|
|
373
373
|
style: {
|
|
374
|
-
background:
|
|
374
|
+
background: i.bgSoft,
|
|
375
375
|
border: "none",
|
|
376
376
|
width: 28,
|
|
377
377
|
height: 28,
|
|
378
|
-
borderRadius:
|
|
378
|
+
borderRadius: x(8, i.radius),
|
|
379
379
|
fontSize: 14,
|
|
380
380
|
cursor: "pointer",
|
|
381
|
-
color:
|
|
381
|
+
color: i.textSoft,
|
|
382
382
|
display: "flex",
|
|
383
383
|
alignItems: "center",
|
|
384
384
|
justifyContent: "center"
|
|
@@ -403,9 +403,9 @@ function ye({
|
|
|
403
403
|
ie,
|
|
404
404
|
{
|
|
405
405
|
client: l.client,
|
|
406
|
-
accentColor:
|
|
407
|
-
theme:
|
|
408
|
-
appearance:
|
|
406
|
+
accentColor: g,
|
|
407
|
+
theme: i.dark ? "dark" : "light",
|
|
408
|
+
appearance: v
|
|
409
409
|
}
|
|
410
410
|
),
|
|
411
411
|
S && d && l.chat && s !== "support" && /* @__PURE__ */ t(
|
|
@@ -417,12 +417,12 @@ function ye({
|
|
|
417
417
|
justifyContent: "space-between",
|
|
418
418
|
marginBottom: 16
|
|
419
419
|
},
|
|
420
|
-
children: s === "list" ? /* @__PURE__ */ a(
|
|
420
|
+
children: s === "list" ? /* @__PURE__ */ a(B, { children: [
|
|
421
421
|
/* @__PURE__ */ t(
|
|
422
422
|
"span",
|
|
423
423
|
{
|
|
424
|
-
style: { fontSize: 14, fontWeight: 600, color:
|
|
425
|
-
children: "
|
|
424
|
+
style: { fontSize: 14, fontWeight: 600, color: i.text },
|
|
425
|
+
children: "Ideas"
|
|
426
426
|
}
|
|
427
427
|
),
|
|
428
428
|
/* @__PURE__ */ t(
|
|
@@ -431,14 +431,14 @@ function ye({
|
|
|
431
431
|
onClick: () => u("create"),
|
|
432
432
|
style: {
|
|
433
433
|
border: 0,
|
|
434
|
-
borderRadius:
|
|
435
|
-
background:
|
|
436
|
-
color:
|
|
434
|
+
borderRadius: x(8, i.radius),
|
|
435
|
+
background: g,
|
|
436
|
+
color: i.accentText,
|
|
437
437
|
fontSize: 14,
|
|
438
438
|
padding: "7px 10px",
|
|
439
439
|
cursor: "pointer"
|
|
440
440
|
},
|
|
441
|
-
children: "+
|
|
441
|
+
children: "+ Suggest an idea"
|
|
442
442
|
}
|
|
443
443
|
)
|
|
444
444
|
] }) : /* @__PURE__ */ t(
|
|
@@ -449,38 +449,39 @@ function ye({
|
|
|
449
449
|
border: 0,
|
|
450
450
|
background: "none",
|
|
451
451
|
padding: 0,
|
|
452
|
-
color:
|
|
452
|
+
color: i.textSoft,
|
|
453
453
|
fontSize: 14,
|
|
454
454
|
cursor: "pointer"
|
|
455
455
|
},
|
|
456
|
-
children: "← Back to
|
|
456
|
+
children: "← Back to ideas"
|
|
457
457
|
}
|
|
458
458
|
)
|
|
459
459
|
}
|
|
460
460
|
),
|
|
461
|
-
s === "list" && /* @__PURE__ */ t(le, { onSelect: Y, accent:
|
|
462
|
-
s === "detail" &&
|
|
461
|
+
s === "list" && /* @__PURE__ */ t(le, { onSelect: Y, accent: g, p: i }),
|
|
462
|
+
s === "detail" && y && /* @__PURE__ */ t(
|
|
463
463
|
se,
|
|
464
464
|
{
|
|
465
|
-
feedbackId:
|
|
466
|
-
accent:
|
|
467
|
-
p:
|
|
468
|
-
font:
|
|
465
|
+
feedbackId: y,
|
|
466
|
+
accent: g,
|
|
467
|
+
p: i,
|
|
468
|
+
font: W
|
|
469
469
|
}
|
|
470
470
|
),
|
|
471
471
|
s === "create" && /* @__PURE__ */ t(
|
|
472
472
|
de,
|
|
473
473
|
{
|
|
474
|
-
accent:
|
|
475
|
-
p:
|
|
476
|
-
font:
|
|
474
|
+
accent: g,
|
|
475
|
+
p: i,
|
|
476
|
+
font: W,
|
|
477
|
+
ideasOnly: !!(S && d && l.chat),
|
|
477
478
|
onDone: () => u("list")
|
|
478
479
|
}
|
|
479
480
|
)
|
|
480
481
|
]
|
|
481
482
|
}
|
|
482
483
|
),
|
|
483
|
-
|
|
484
|
+
I && s !== "support" && /* @__PURE__ */ a(
|
|
484
485
|
"a",
|
|
485
486
|
{
|
|
486
487
|
href: "https://upstep.dev",
|
|
@@ -490,9 +491,9 @@ function ye({
|
|
|
490
491
|
display: "block",
|
|
491
492
|
textAlign: "center",
|
|
492
493
|
padding: "8px 0",
|
|
493
|
-
borderTop: `1px solid ${
|
|
494
|
+
borderTop: `1px solid ${i.border}`,
|
|
494
495
|
fontSize: 11,
|
|
495
|
-
color:
|
|
496
|
+
color: i.textFaint,
|
|
496
497
|
textDecoration: "none",
|
|
497
498
|
flexShrink: 0
|
|
498
499
|
},
|
|
@@ -511,23 +512,23 @@ function ye({
|
|
|
511
512
|
] });
|
|
512
513
|
}
|
|
513
514
|
function ie({
|
|
514
|
-
client:
|
|
515
|
+
client: n,
|
|
515
516
|
theme: e,
|
|
516
|
-
accentColor:
|
|
517
|
-
appearance:
|
|
517
|
+
accentColor: o,
|
|
518
|
+
appearance: p
|
|
518
519
|
}) {
|
|
519
|
-
const
|
|
520
|
-
return
|
|
521
|
-
if (
|
|
522
|
-
}, [
|
|
520
|
+
const c = X(null);
|
|
521
|
+
return k(() => {
|
|
522
|
+
if (c.current) return n.connectSupportFrame(c.current);
|
|
523
|
+
}, [n]), /* @__PURE__ */ t(
|
|
523
524
|
"iframe",
|
|
524
525
|
{
|
|
525
|
-
ref:
|
|
526
|
+
ref: c,
|
|
526
527
|
"data-upstep-support": !0,
|
|
527
528
|
title: "Customer support",
|
|
528
|
-
src:
|
|
529
|
+
src: n.supportFrameUrl(e, o, p),
|
|
529
530
|
style: {
|
|
530
|
-
color:
|
|
531
|
+
color: o,
|
|
531
532
|
width: "100%",
|
|
532
533
|
height: "min(560px, calc(100dvh - 168px))",
|
|
533
534
|
minHeight: 300,
|
|
@@ -538,33 +539,33 @@ function ie({
|
|
|
538
539
|
);
|
|
539
540
|
}
|
|
540
541
|
function le({
|
|
541
|
-
onSelect:
|
|
542
|
+
onSelect: n,
|
|
542
543
|
accent: e,
|
|
543
|
-
p:
|
|
544
|
+
p: o
|
|
544
545
|
}) {
|
|
545
|
-
const { feedItems:
|
|
546
|
-
return
|
|
547
|
-
const d =
|
|
546
|
+
const { feedItems: p, vote: c } = E(), b = p.filter((r) => r.status !== "CLOSED");
|
|
547
|
+
return b.length ? /* @__PURE__ */ t(B, { children: b.map((r) => {
|
|
548
|
+
const d = r.userVote === "UP", l = r.title ?? r.content;
|
|
548
549
|
return /* @__PURE__ */ a(
|
|
549
550
|
"div",
|
|
550
551
|
{
|
|
551
|
-
onClick: () =>
|
|
552
|
+
onClick: () => n(r.id),
|
|
552
553
|
style: {
|
|
553
554
|
display: "flex",
|
|
554
555
|
gap: 12,
|
|
555
556
|
padding: 14,
|
|
556
|
-
border: `1px solid ${
|
|
557
|
-
borderRadius:
|
|
557
|
+
border: `1px solid ${o.border}`,
|
|
558
|
+
borderRadius: x(14, o.radius),
|
|
558
559
|
marginBottom: 10,
|
|
559
|
-
background:
|
|
560
|
+
background: o.bg,
|
|
560
561
|
cursor: "pointer"
|
|
561
562
|
},
|
|
562
563
|
children: [
|
|
563
564
|
/* @__PURE__ */ a(
|
|
564
565
|
"button",
|
|
565
566
|
{
|
|
566
|
-
onClick: (
|
|
567
|
-
|
|
567
|
+
onClick: (i) => {
|
|
568
|
+
i.stopPropagation(), c(r.id, "UP");
|
|
568
569
|
},
|
|
569
570
|
style: {
|
|
570
571
|
display: "flex",
|
|
@@ -574,24 +575,24 @@ function le({
|
|
|
574
575
|
gap: 2,
|
|
575
576
|
minWidth: 46,
|
|
576
577
|
padding: "7px 0",
|
|
577
|
-
borderRadius:
|
|
578
|
+
borderRadius: x(11, o.radius),
|
|
578
579
|
cursor: "pointer",
|
|
579
580
|
flexShrink: 0,
|
|
580
|
-
border: `1px solid ${d ? e :
|
|
581
|
-
background: d ?
|
|
581
|
+
border: `1px solid ${d ? e : o.border}`,
|
|
582
|
+
background: d ? o.accentTint : o.bgSoft
|
|
582
583
|
},
|
|
583
584
|
children: [
|
|
584
|
-
/* @__PURE__ */ t(
|
|
585
|
+
/* @__PURE__ */ t(O, { color: e }),
|
|
585
586
|
/* @__PURE__ */ t(
|
|
586
587
|
"span",
|
|
587
588
|
{
|
|
588
589
|
style: {
|
|
589
590
|
fontSize: 14,
|
|
590
591
|
fontWeight: 700,
|
|
591
|
-
color:
|
|
592
|
+
color: o.text,
|
|
592
593
|
lineHeight: 1.1
|
|
593
594
|
},
|
|
594
|
-
children:
|
|
595
|
+
children: r.upvotes
|
|
595
596
|
}
|
|
596
597
|
)
|
|
597
598
|
]
|
|
@@ -605,7 +606,7 @@ function le({
|
|
|
605
606
|
fontSize: 14,
|
|
606
607
|
fontWeight: 600,
|
|
607
608
|
lineHeight: 1.4,
|
|
608
|
-
color:
|
|
609
|
+
color: o.text,
|
|
609
610
|
margin: "0 0 6px",
|
|
610
611
|
overflow: "hidden",
|
|
611
612
|
display: "-webkit-box",
|
|
@@ -625,16 +626,16 @@ function le({
|
|
|
625
626
|
flexWrap: "wrap"
|
|
626
627
|
},
|
|
627
628
|
children: [
|
|
628
|
-
/* @__PURE__ */ t(
|
|
629
|
-
|
|
630
|
-
|
|
629
|
+
/* @__PURE__ */ t($, { type: r.type, p: o }),
|
|
630
|
+
r.status === "PENDING" ? /* @__PURE__ */ t(j, {}) : /* @__PURE__ */ t(
|
|
631
|
+
G,
|
|
631
632
|
{
|
|
632
|
-
status:
|
|
633
|
-
boardStatus:
|
|
634
|
-
p:
|
|
633
|
+
status: r.status,
|
|
634
|
+
boardStatus: r.boardStatus,
|
|
635
|
+
p: o
|
|
635
636
|
}
|
|
636
637
|
),
|
|
637
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 11, color:
|
|
638
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 11, color: o.textFaint }, children: V(r.createdAt) })
|
|
638
639
|
]
|
|
639
640
|
}
|
|
640
641
|
)
|
|
@@ -643,7 +644,7 @@ function le({
|
|
|
643
644
|
"span",
|
|
644
645
|
{
|
|
645
646
|
style: {
|
|
646
|
-
color:
|
|
647
|
+
color: o.textFaint,
|
|
647
648
|
fontSize: 18,
|
|
648
649
|
alignSelf: "center",
|
|
649
650
|
flexShrink: 0
|
|
@@ -653,14 +654,14 @@ function le({
|
|
|
653
654
|
)
|
|
654
655
|
]
|
|
655
656
|
},
|
|
656
|
-
|
|
657
|
+
r.id
|
|
657
658
|
);
|
|
658
659
|
}) }) : /* @__PURE__ */ a("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
|
|
659
660
|
/* @__PURE__ */ t(
|
|
660
661
|
"div",
|
|
661
662
|
{
|
|
662
663
|
style: {
|
|
663
|
-
color:
|
|
664
|
+
color: o.textSoft,
|
|
664
665
|
fontSize: 15,
|
|
665
666
|
fontWeight: 600,
|
|
666
667
|
marginBottom: 4
|
|
@@ -668,65 +669,65 @@ function le({
|
|
|
668
669
|
children: "No open feedback yet"
|
|
669
670
|
}
|
|
670
671
|
),
|
|
671
|
-
/* @__PURE__ */ t("div", { style: { color:
|
|
672
|
+
/* @__PURE__ */ t("div", { style: { color: o.textFaint, fontSize: 14 }, children: "Be the first to share one." })
|
|
672
673
|
] });
|
|
673
674
|
}
|
|
674
675
|
function se({
|
|
675
|
-
feedbackId:
|
|
676
|
+
feedbackId: n,
|
|
676
677
|
accent: e,
|
|
677
|
-
p:
|
|
678
|
-
font:
|
|
678
|
+
p: o,
|
|
679
|
+
font: p
|
|
679
680
|
}) {
|
|
680
|
-
const { vote:
|
|
681
|
-
|
|
682
|
-
let
|
|
683
|
-
return
|
|
684
|
-
|
|
681
|
+
const { vote: c, getItem: b } = E(), [r, d] = m(null), [l, i] = m(!1);
|
|
682
|
+
k(() => {
|
|
683
|
+
let h = !1;
|
|
684
|
+
return b(n).then((C) => {
|
|
685
|
+
h || d(C);
|
|
685
686
|
}).catch(() => {
|
|
686
687
|
}), () => {
|
|
687
|
-
|
|
688
|
+
h = !0;
|
|
688
689
|
};
|
|
689
|
-
}, [
|
|
690
|
-
async function
|
|
691
|
-
if (!(!
|
|
692
|
-
|
|
690
|
+
}, [n, b]);
|
|
691
|
+
async function g() {
|
|
692
|
+
if (!(!r || l)) {
|
|
693
|
+
i(!0);
|
|
693
694
|
try {
|
|
694
|
-
await
|
|
695
|
-
const
|
|
696
|
-
d(
|
|
695
|
+
await c(r.id, "UP");
|
|
696
|
+
const h = await b(n);
|
|
697
|
+
d(h);
|
|
697
698
|
} catch {
|
|
698
699
|
} finally {
|
|
699
|
-
|
|
700
|
+
i(!1);
|
|
700
701
|
}
|
|
701
702
|
}
|
|
702
703
|
}
|
|
703
|
-
if (!
|
|
704
|
+
if (!r)
|
|
704
705
|
return /* @__PURE__ */ t(
|
|
705
706
|
"div",
|
|
706
707
|
{
|
|
707
708
|
style: {
|
|
708
709
|
textAlign: "center",
|
|
709
710
|
padding: "40px 0",
|
|
710
|
-
color:
|
|
711
|
+
color: o.textFaint,
|
|
711
712
|
fontSize: 14
|
|
712
713
|
},
|
|
713
714
|
children: "Loading…"
|
|
714
715
|
}
|
|
715
716
|
);
|
|
716
|
-
const
|
|
717
|
+
const v = r.title;
|
|
717
718
|
return /* @__PURE__ */ a("div", { children: [
|
|
718
|
-
|
|
719
|
+
v && /* @__PURE__ */ t(
|
|
719
720
|
"div",
|
|
720
721
|
{
|
|
721
722
|
style: {
|
|
722
723
|
fontSize: 20,
|
|
723
724
|
fontWeight: 700,
|
|
724
|
-
color:
|
|
725
|
+
color: o.text,
|
|
725
726
|
letterSpacing: "-.02em",
|
|
726
727
|
marginBottom: 10,
|
|
727
728
|
lineHeight: 1.3
|
|
728
729
|
},
|
|
729
|
-
children:
|
|
730
|
+
children: v
|
|
730
731
|
}
|
|
731
732
|
),
|
|
732
733
|
/* @__PURE__ */ a(
|
|
@@ -734,13 +735,13 @@ function se({
|
|
|
734
735
|
{
|
|
735
736
|
style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" },
|
|
736
737
|
children: [
|
|
737
|
-
/* @__PURE__ */ t(
|
|
738
|
-
|
|
739
|
-
|
|
738
|
+
/* @__PURE__ */ t($, { type: r.type, p: o }),
|
|
739
|
+
r.status === "PENDING" ? /* @__PURE__ */ t(j, {}) : /* @__PURE__ */ t(
|
|
740
|
+
G,
|
|
740
741
|
{
|
|
741
|
-
status:
|
|
742
|
-
boardStatus:
|
|
743
|
-
p:
|
|
742
|
+
status: r.status,
|
|
743
|
+
boardStatus: r.boardStatus,
|
|
744
|
+
p: o
|
|
744
745
|
}
|
|
745
746
|
)
|
|
746
747
|
]
|
|
@@ -752,41 +753,41 @@ function se({
|
|
|
752
753
|
style: {
|
|
753
754
|
fontSize: 15,
|
|
754
755
|
lineHeight: 1.6,
|
|
755
|
-
color:
|
|
756
|
+
color: o.textSoft,
|
|
756
757
|
marginBottom: 20
|
|
757
758
|
},
|
|
758
|
-
children:
|
|
759
|
+
children: r.content
|
|
759
760
|
}
|
|
760
761
|
),
|
|
761
762
|
/* @__PURE__ */ a(
|
|
762
763
|
"button",
|
|
763
764
|
{
|
|
764
|
-
onClick:
|
|
765
|
+
onClick: g,
|
|
765
766
|
disabled: l,
|
|
766
767
|
style: {
|
|
767
768
|
display: "inline-flex",
|
|
768
769
|
alignItems: "center",
|
|
769
770
|
gap: 8,
|
|
770
|
-
border: `1px solid ${
|
|
771
|
-
background:
|
|
772
|
-
borderRadius:
|
|
771
|
+
border: `1px solid ${r.userVote === "UP" ? e : o.border}`,
|
|
772
|
+
background: r.userVote === "UP" ? N(e, 0.08) : o.bgSoft,
|
|
773
|
+
borderRadius: x(12, o.radius),
|
|
773
774
|
padding: "10px 16px",
|
|
774
775
|
cursor: "pointer",
|
|
775
|
-
fontFamily:
|
|
776
|
+
fontFamily: p
|
|
776
777
|
},
|
|
777
778
|
children: [
|
|
778
|
-
/* @__PURE__ */ t(
|
|
779
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 18, fontWeight: 700, color:
|
|
780
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 14, color:
|
|
779
|
+
/* @__PURE__ */ t(O, { color: e, size: 13 }),
|
|
780
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 18, fontWeight: 700, color: o.text }, children: r.upvotes }),
|
|
781
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 14, color: o.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
|
|
781
782
|
]
|
|
782
783
|
}
|
|
783
784
|
),
|
|
784
|
-
|
|
785
|
+
r.comments.length > 0 && /* @__PURE__ */ a(
|
|
785
786
|
"div",
|
|
786
787
|
{
|
|
787
788
|
style: {
|
|
788
789
|
marginTop: 28,
|
|
789
|
-
borderTop: `1px solid ${
|
|
790
|
+
borderTop: `1px solid ${o.border}`,
|
|
790
791
|
paddingTop: 20
|
|
791
792
|
},
|
|
792
793
|
children: [
|
|
@@ -797,32 +798,32 @@ function se({
|
|
|
797
798
|
fontSize: 10,
|
|
798
799
|
fontWeight: 700,
|
|
799
800
|
letterSpacing: ".08em",
|
|
800
|
-
color:
|
|
801
|
+
color: o.textFaint,
|
|
801
802
|
marginBottom: 12,
|
|
802
803
|
textTransform: "uppercase"
|
|
803
804
|
},
|
|
804
805
|
children: "Comments"
|
|
805
806
|
}
|
|
806
807
|
),
|
|
807
|
-
|
|
808
|
+
r.comments.map((h) => /* @__PURE__ */ t(ae, { comment: h, p: o, accent: e }, h.id))
|
|
808
809
|
]
|
|
809
810
|
}
|
|
810
811
|
)
|
|
811
812
|
] });
|
|
812
813
|
}
|
|
813
814
|
function ae({
|
|
814
|
-
comment:
|
|
815
|
+
comment: n,
|
|
815
816
|
p: e,
|
|
816
|
-
accent:
|
|
817
|
+
accent: o
|
|
817
818
|
}) {
|
|
818
|
-
var
|
|
819
|
+
var p;
|
|
819
820
|
return /* @__PURE__ */ a(
|
|
820
821
|
"div",
|
|
821
822
|
{
|
|
822
823
|
style: {
|
|
823
824
|
background: e.bgSoft,
|
|
824
825
|
border: `1px solid ${e.border}`,
|
|
825
|
-
borderRadius:
|
|
826
|
+
borderRadius: x(12, e.radius),
|
|
826
827
|
padding: 14,
|
|
827
828
|
marginBottom: 10
|
|
828
829
|
},
|
|
@@ -841,17 +842,17 @@ function ae({
|
|
|
841
842
|
"span",
|
|
842
843
|
{
|
|
843
844
|
style: {
|
|
844
|
-
background: N(
|
|
845
|
-
color:
|
|
845
|
+
background: N(o, 0.125),
|
|
846
|
+
color: o,
|
|
846
847
|
fontSize: 11,
|
|
847
848
|
fontWeight: 700,
|
|
848
|
-
borderRadius:
|
|
849
|
+
borderRadius: x(20, e.radius),
|
|
849
850
|
padding: "2px 8px"
|
|
850
851
|
},
|
|
851
|
-
children: ((
|
|
852
|
+
children: ((p = n.authorName) == null ? void 0 : p.trim()) || "UpStep Team"
|
|
852
853
|
}
|
|
853
854
|
),
|
|
854
|
-
/* @__PURE__ */ t("span", { style: { fontSize: 11, color: e.textFaint }, children: V(
|
|
855
|
+
/* @__PURE__ */ t("span", { style: { fontSize: 11, color: e.textFaint }, children: V(n.createdAt) })
|
|
855
856
|
]
|
|
856
857
|
}
|
|
857
858
|
),
|
|
@@ -859,7 +860,7 @@ function ae({
|
|
|
859
860
|
"p",
|
|
860
861
|
{
|
|
861
862
|
style: { fontSize: 16, lineHeight: 1.6, color: e.textSoft, margin: 0 },
|
|
862
|
-
children:
|
|
863
|
+
children: n.content
|
|
863
864
|
}
|
|
864
865
|
)
|
|
865
866
|
]
|
|
@@ -867,25 +868,28 @@ function ae({
|
|
|
867
868
|
);
|
|
868
869
|
}
|
|
869
870
|
function de({
|
|
870
|
-
accent:
|
|
871
|
+
accent: n,
|
|
871
872
|
p: e,
|
|
872
|
-
font:
|
|
873
|
-
onDone:
|
|
873
|
+
font: o,
|
|
874
|
+
onDone: p,
|
|
875
|
+
ideasOnly: c = !1
|
|
874
876
|
}) {
|
|
875
|
-
const { submit:
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
877
|
+
const { submit: b } = E(), [r, d] = m(""), [l, i] = m(""), [g, v] = m(
|
|
878
|
+
c ? "FEATURE" : "GENERAL"
|
|
879
|
+
), [h, C] = m(!1), [z, I] = m(!1), [s, u] = m("");
|
|
880
|
+
async function S() {
|
|
881
|
+
if (!(!r.trim() || h)) {
|
|
882
|
+
C(!0), u("");
|
|
879
883
|
try {
|
|
880
|
-
await
|
|
884
|
+
await b(r.trim(), l.trim() || r.trim(), g), I(!0), setTimeout(p, 1200);
|
|
881
885
|
} catch {
|
|
882
|
-
|
|
886
|
+
u("Something went wrong. Please try again.");
|
|
883
887
|
} finally {
|
|
884
|
-
|
|
888
|
+
C(!1);
|
|
885
889
|
}
|
|
886
890
|
}
|
|
887
891
|
}
|
|
888
|
-
if (
|
|
892
|
+
if (z)
|
|
889
893
|
return /* @__PURE__ */ a("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
|
|
890
894
|
/* @__PURE__ */ t(
|
|
891
895
|
"div",
|
|
@@ -899,63 +903,65 @@ function de({
|
|
|
899
903
|
children: "Submitted"
|
|
900
904
|
}
|
|
901
905
|
),
|
|
902
|
-
/* @__PURE__ */ t("div", { style: { fontSize: 14, color: e.textFaint }, children: "Feedback received. Thank you." })
|
|
906
|
+
/* @__PURE__ */ t("div", { style: { fontSize: 14, color: e.textFaint }, children: c ? "Idea received. Thank you." : "Feedback received. Thank you." })
|
|
903
907
|
] });
|
|
904
|
-
const
|
|
908
|
+
const w = {
|
|
905
909
|
width: "100%",
|
|
906
910
|
border: `1px solid ${e.border}`,
|
|
907
|
-
borderRadius:
|
|
911
|
+
borderRadius: x(12, e.radius),
|
|
908
912
|
padding: "10px 12px",
|
|
909
913
|
fontSize: 16,
|
|
910
914
|
lineHeight: 1.6,
|
|
911
915
|
outline: "none",
|
|
912
916
|
background: e.bgSoft,
|
|
913
917
|
color: e.text,
|
|
914
|
-
fontFamily:
|
|
918
|
+
fontFamily: o,
|
|
915
919
|
boxSizing: "border-box"
|
|
916
920
|
};
|
|
917
921
|
return /* @__PURE__ */ a("div", { children: [
|
|
918
|
-
/* @__PURE__ */
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
"
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
922
|
+
!c && /* @__PURE__ */ a(B, { children: [
|
|
923
|
+
/* @__PURE__ */ t(
|
|
924
|
+
"div",
|
|
925
|
+
{
|
|
926
|
+
style: {
|
|
927
|
+
fontSize: 10,
|
|
928
|
+
fontWeight: 700,
|
|
929
|
+
letterSpacing: ".08em",
|
|
930
|
+
color: e.textFaint,
|
|
931
|
+
marginBottom: 8,
|
|
932
|
+
textTransform: "uppercase"
|
|
933
|
+
},
|
|
934
|
+
children: "Type"
|
|
935
|
+
}
|
|
936
|
+
),
|
|
937
|
+
/* @__PURE__ */ t("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((y) => /* @__PURE__ */ a(
|
|
938
|
+
"button",
|
|
939
|
+
{
|
|
940
|
+
onClick: () => v(y),
|
|
941
|
+
style: {
|
|
942
|
+
flex: 1,
|
|
943
|
+
display: "flex",
|
|
944
|
+
alignItems: "center",
|
|
945
|
+
justifyContent: "center",
|
|
946
|
+
gap: 5,
|
|
947
|
+
padding: "8px 10px",
|
|
948
|
+
borderRadius: x(9, e.radius),
|
|
949
|
+
fontSize: 14,
|
|
950
|
+
fontWeight: 600,
|
|
951
|
+
cursor: "pointer",
|
|
952
|
+
background: g === y ? n : e.bg,
|
|
953
|
+
color: g === y ? e.accentText : e.textSoft,
|
|
954
|
+
border: `1px solid ${g === y ? n : e.border}`,
|
|
955
|
+
fontFamily: o
|
|
956
|
+
},
|
|
957
|
+
children: [
|
|
958
|
+
D[y].icon,
|
|
959
|
+
D[y].label
|
|
960
|
+
]
|
|
951
961
|
},
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
]
|
|
956
|
-
},
|
|
957
|
-
h
|
|
958
|
-
)) }),
|
|
962
|
+
y
|
|
963
|
+
)) })
|
|
964
|
+
] }),
|
|
959
965
|
/* @__PURE__ */ t(
|
|
960
966
|
"div",
|
|
961
967
|
{
|
|
@@ -973,11 +979,11 @@ function de({
|
|
|
973
979
|
/* @__PURE__ */ t(
|
|
974
980
|
"input",
|
|
975
981
|
{
|
|
976
|
-
value:
|
|
977
|
-
onChange: (
|
|
978
|
-
placeholder: "Short summary of the issue or idea",
|
|
982
|
+
value: r,
|
|
983
|
+
onChange: (y) => d(y.target.value),
|
|
984
|
+
placeholder: c ? "What would you like us to build?" : "Short summary of the issue or idea",
|
|
979
985
|
maxLength: 200,
|
|
980
|
-
style: { ...
|
|
986
|
+
style: { ...w, marginBottom: 16, display: "block" }
|
|
981
987
|
}
|
|
982
988
|
),
|
|
983
989
|
/* @__PURE__ */ a(
|
|
@@ -1007,34 +1013,34 @@ function de({
|
|
|
1007
1013
|
/* @__PURE__ */ t(
|
|
1008
1014
|
"textarea",
|
|
1009
1015
|
{
|
|
1010
|
-
value:
|
|
1011
|
-
onChange: (
|
|
1012
|
-
placeholder: "Steps to reproduce, expected behaviour, or more context",
|
|
1016
|
+
value: l,
|
|
1017
|
+
onChange: (y) => i(y.target.value),
|
|
1018
|
+
placeholder: c ? "Why would it help? (optional)" : "Steps to reproduce, expected behaviour, or more context",
|
|
1013
1019
|
maxLength: 2e3,
|
|
1014
1020
|
rows: 4,
|
|
1015
|
-
style: { ...
|
|
1021
|
+
style: { ...w, resize: "vertical", marginBottom: 16 }
|
|
1016
1022
|
}
|
|
1017
1023
|
),
|
|
1018
|
-
|
|
1024
|
+
s && /* @__PURE__ */ t("p", { style: { fontSize: 14, color: "#d6453d", marginBottom: 12 }, children: s }),
|
|
1019
1025
|
/* @__PURE__ */ t(
|
|
1020
1026
|
"button",
|
|
1021
1027
|
{
|
|
1022
|
-
onClick:
|
|
1023
|
-
disabled:
|
|
1028
|
+
onClick: S,
|
|
1029
|
+
disabled: h || !r.trim(),
|
|
1024
1030
|
style: {
|
|
1025
1031
|
width: "100%",
|
|
1026
1032
|
padding: 12,
|
|
1027
|
-
background:
|
|
1033
|
+
background: n,
|
|
1028
1034
|
color: e.accentText,
|
|
1029
1035
|
border: "none",
|
|
1030
|
-
borderRadius:
|
|
1036
|
+
borderRadius: x(11, e.radius),
|
|
1031
1037
|
fontSize: 14,
|
|
1032
1038
|
fontWeight: 600,
|
|
1033
1039
|
cursor: "pointer",
|
|
1034
|
-
opacity:
|
|
1035
|
-
fontFamily:
|
|
1040
|
+
opacity: h || !r.trim() ? 0.5 : 1,
|
|
1041
|
+
fontFamily: o
|
|
1036
1042
|
},
|
|
1037
|
-
children:
|
|
1043
|
+
children: h ? "Submitting…" : c ? "Suggest idea" : "Submit feedback"
|
|
1038
1044
|
}
|
|
1039
1045
|
)
|
|
1040
1046
|
] });
|
|
@@ -1098,20 +1104,20 @@ const D = {
|
|
|
1098
1104
|
)
|
|
1099
1105
|
}
|
|
1100
1106
|
}, ce = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, pe = { BUG: "#d6453d", FEATURE: "#3b76d6" };
|
|
1101
|
-
function
|
|
1107
|
+
function $({ type: n, p: e }) {
|
|
1102
1108
|
return /* @__PURE__ */ t(
|
|
1103
1109
|
"span",
|
|
1104
1110
|
{
|
|
1105
1111
|
style: {
|
|
1106
1112
|
padding: "2px 8px",
|
|
1107
|
-
borderRadius:
|
|
1113
|
+
borderRadius: x(9999, e.radius),
|
|
1108
1114
|
fontSize: 10.5,
|
|
1109
1115
|
fontWeight: 700,
|
|
1110
1116
|
letterSpacing: ".02em",
|
|
1111
|
-
background: ce[
|
|
1112
|
-
color: pe[
|
|
1117
|
+
background: ce[n] ?? e.bgSoft,
|
|
1118
|
+
color: pe[n] ?? e.textSoft
|
|
1113
1119
|
},
|
|
1114
|
-
children:
|
|
1120
|
+
children: n
|
|
1115
1121
|
}
|
|
1116
1122
|
);
|
|
1117
1123
|
}
|
|
@@ -1121,7 +1127,7 @@ const ue = {
|
|
|
1121
1127
|
DONE: "#15803d",
|
|
1122
1128
|
CLOSED: "#6b7280"
|
|
1123
1129
|
};
|
|
1124
|
-
function
|
|
1130
|
+
function j() {
|
|
1125
1131
|
return /* @__PURE__ */ a(
|
|
1126
1132
|
"span",
|
|
1127
1133
|
{
|
|
@@ -1155,12 +1161,12 @@ function $() {
|
|
|
1155
1161
|
}
|
|
1156
1162
|
);
|
|
1157
1163
|
}
|
|
1158
|
-
function
|
|
1159
|
-
status:
|
|
1164
|
+
function G({
|
|
1165
|
+
status: n,
|
|
1160
1166
|
boardStatus: e,
|
|
1161
|
-
p:
|
|
1167
|
+
p: o
|
|
1162
1168
|
}) {
|
|
1163
|
-
const
|
|
1169
|
+
const p = (e == null ? void 0 : e.color) ?? ue[n] ?? "#9ca3af";
|
|
1164
1170
|
return /* @__PURE__ */ a(
|
|
1165
1171
|
"span",
|
|
1166
1172
|
{
|
|
@@ -1168,13 +1174,13 @@ function j({
|
|
|
1168
1174
|
display: "inline-flex",
|
|
1169
1175
|
alignItems: "center",
|
|
1170
1176
|
gap: 5,
|
|
1171
|
-
background:
|
|
1172
|
-
border: `1px solid ${
|
|
1173
|
-
borderRadius:
|
|
1177
|
+
background: o.bgSoft,
|
|
1178
|
+
border: `1px solid ${o.border}`,
|
|
1179
|
+
borderRadius: x(6, o.radius),
|
|
1174
1180
|
padding: "2px 8px",
|
|
1175
1181
|
fontSize: 10,
|
|
1176
1182
|
fontWeight: 600,
|
|
1177
|
-
color:
|
|
1183
|
+
color: o.textSoft
|
|
1178
1184
|
},
|
|
1179
1185
|
children: [
|
|
1180
1186
|
/* @__PURE__ */ t(
|
|
@@ -1184,26 +1190,26 @@ function j({
|
|
|
1184
1190
|
width: 6,
|
|
1185
1191
|
height: 6,
|
|
1186
1192
|
borderRadius: "50%",
|
|
1187
|
-
background:
|
|
1193
|
+
background: p,
|
|
1188
1194
|
display: "inline-block",
|
|
1189
1195
|
flexShrink: 0
|
|
1190
1196
|
}
|
|
1191
1197
|
}
|
|
1192
1198
|
),
|
|
1193
|
-
(e == null ? void 0 : e.name) ??
|
|
1199
|
+
(e == null ? void 0 : e.name) ?? n.replace("_", " ")
|
|
1194
1200
|
]
|
|
1195
1201
|
}
|
|
1196
1202
|
);
|
|
1197
1203
|
}
|
|
1198
1204
|
function he({
|
|
1199
|
-
size:
|
|
1205
|
+
size: n = 16,
|
|
1200
1206
|
color: e = "currentColor"
|
|
1201
1207
|
}) {
|
|
1202
1208
|
return /* @__PURE__ */ t(
|
|
1203
1209
|
"svg",
|
|
1204
1210
|
{
|
|
1205
|
-
width:
|
|
1206
|
-
height:
|
|
1211
|
+
width: n,
|
|
1212
|
+
height: n,
|
|
1207
1213
|
viewBox: "0 0 24 24",
|
|
1208
1214
|
fill: "none",
|
|
1209
1215
|
stroke: e,
|
|
@@ -1214,8 +1220,8 @@ function he({
|
|
|
1214
1220
|
}
|
|
1215
1221
|
);
|
|
1216
1222
|
}
|
|
1217
|
-
function
|
|
1218
|
-
color:
|
|
1223
|
+
function O({
|
|
1224
|
+
color: n = "currentColor",
|
|
1219
1225
|
size: e = 11
|
|
1220
1226
|
}) {
|
|
1221
1227
|
return /* @__PURE__ */ t(
|
|
@@ -1225,7 +1231,7 @@ function G({
|
|
|
1225
1231
|
height: e,
|
|
1226
1232
|
viewBox: "0 0 16 16",
|
|
1227
1233
|
fill: "none",
|
|
1228
|
-
stroke:
|
|
1234
|
+
stroke: n,
|
|
1229
1235
|
strokeWidth: 2.2,
|
|
1230
1236
|
strokeLinecap: "round",
|
|
1231
1237
|
strokeLinejoin: "round",
|
|
@@ -1233,8 +1239,8 @@ function G({
|
|
|
1233
1239
|
}
|
|
1234
1240
|
);
|
|
1235
1241
|
}
|
|
1236
|
-
function V(
|
|
1237
|
-
return new Date(
|
|
1242
|
+
function V(n) {
|
|
1243
|
+
return new Date(n).toLocaleDateString(void 0, {
|
|
1238
1244
|
month: "short",
|
|
1239
1245
|
day: "numeric"
|
|
1240
1246
|
});
|
|
@@ -1242,5 +1248,5 @@ function V(o) {
|
|
|
1242
1248
|
export {
|
|
1243
1249
|
ye as FeedbackWidget,
|
|
1244
1250
|
be as UpstepProvider,
|
|
1245
|
-
|
|
1251
|
+
E as useUpstep
|
|
1246
1252
|
};
|