@upstep/js 0.6.0 → 0.7.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/README.md +13 -5
- package/dist/index.cjs +44 -54
- package/dist/index.js +140 -169
- package/dist/react.cjs +1 -1
- package/dist/react.d.ts.map +1 -1
- package/dist/react.js +886 -271
- package/dist/support.cjs +1 -0
- package/dist/support.d.ts +47 -0
- package/dist/support.d.ts.map +1 -0
- package/dist/support.js +127 -0
- package/dist/upstep.global.js +20 -30
- package/dist/widget.d.ts +0 -2
- package/dist/widget.d.ts.map +1 -1
- package/package.json +9 -4
package/dist/react.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as G, useState as
|
|
1
|
+
import { jsxs as d, Fragment as T, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as G, useState as h, useEffect as k, useCallback as F, useContext as O, useRef as j } from "react";
|
|
3
3
|
import { U as V } from "./api-C1UV7Szw.mjs";
|
|
4
|
-
const _ = "#
|
|
4
|
+
const _ = "#5B7168", Y = {
|
|
5
5
|
bg: "#ffffff",
|
|
6
|
-
bgSoft: "#
|
|
7
|
-
bgHover: "#
|
|
6
|
+
bgSoft: "#f4f6f4",
|
|
7
|
+
bgHover: "#eaf0eb",
|
|
8
8
|
text: "#1a1915",
|
|
9
9
|
textSoft: "#56544d",
|
|
10
10
|
textFaint: "#9b9890",
|
|
@@ -12,32 +12,32 @@ const _ = "#D97757", Y = {
|
|
|
12
12
|
overlay: "rgba(26,25,21,.45)"
|
|
13
13
|
}, q = {
|
|
14
14
|
bg: "#000000",
|
|
15
|
-
bgSoft: "#
|
|
16
|
-
bgHover: "#
|
|
15
|
+
bgSoft: "#191d1b",
|
|
16
|
+
bgHover: "#252d28",
|
|
17
17
|
text: "#f5f4f0",
|
|
18
18
|
textSoft: "#b4b1a8",
|
|
19
19
|
textFaint: "#7d7a72",
|
|
20
20
|
border: "#33312c",
|
|
21
21
|
overlay: "rgba(0,0,0,.6)"
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function E() {
|
|
24
24
|
if (typeof document > "u") return !1;
|
|
25
25
|
const o = document.documentElement;
|
|
26
26
|
return o.classList.contains("dark") || o.getAttribute("data-theme") === "dark";
|
|
27
27
|
}
|
|
28
28
|
function K(o) {
|
|
29
|
-
const [n, t] =
|
|
30
|
-
return
|
|
29
|
+
const [n, t] = h(() => o === "dark");
|
|
30
|
+
return k(() => {
|
|
31
31
|
if (o !== "auto") {
|
|
32
32
|
t(o === "dark");
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
if (t(
|
|
36
|
-
const
|
|
37
|
-
return
|
|
35
|
+
if (t(E()), typeof MutationObserver > "u") return;
|
|
36
|
+
const g = new MutationObserver(() => t(E()));
|
|
37
|
+
return g.observe(document.documentElement, {
|
|
38
38
|
attributes: !0,
|
|
39
39
|
attributeFilter: ["class", "data-theme"]
|
|
40
|
-
}), () =>
|
|
40
|
+
}), () => g.disconnect();
|
|
41
41
|
}, [o]), n ? q : Y;
|
|
42
42
|
}
|
|
43
43
|
const R = G(null);
|
|
@@ -45,51 +45,68 @@ function de({
|
|
|
45
45
|
children: o,
|
|
46
46
|
...n
|
|
47
47
|
}) {
|
|
48
|
-
const [t] =
|
|
49
|
-
|
|
48
|
+
const [t] = h(() => new V(n)), [g, a] = h([]), [i, r] = h(!1), [l, x] = h(!0);
|
|
49
|
+
k(() => {
|
|
50
50
|
t.setUserId(n.userId);
|
|
51
|
-
}, [t, n.userId]),
|
|
52
|
-
t.supportIdentityToken = n.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach(
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
51
|
+
}, [t, n.userId]), k(() => {
|
|
52
|
+
t.supportIdentityToken = n.supportIdentityToken, document.querySelectorAll("iframe[data-upstep-support]").forEach(
|
|
53
|
+
(p) => {
|
|
54
|
+
var y;
|
|
55
|
+
return (y = p.contentWindow) == null ? void 0 : y.postMessage(
|
|
56
|
+
{
|
|
57
|
+
type: "upstep:support:identity",
|
|
58
|
+
token: n.supportIdentityToken
|
|
59
|
+
},
|
|
60
|
+
new URL(t.baseUrl).origin
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
);
|
|
56
64
|
}, [t, n.supportIdentityToken]);
|
|
57
|
-
const
|
|
65
|
+
const c = F(async () => {
|
|
58
66
|
try {
|
|
59
|
-
const
|
|
60
|
-
|
|
67
|
+
const p = await t.listFeedback({ sort: "votes", limit: 20 });
|
|
68
|
+
a(p.items), x(p.showBranding ?? !0);
|
|
61
69
|
} catch {
|
|
62
70
|
}
|
|
63
71
|
}, [t]);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}, [
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
72
|
+
k(() => {
|
|
73
|
+
c();
|
|
74
|
+
}, [c]);
|
|
75
|
+
const w = F(
|
|
76
|
+
async (p, y, v) => {
|
|
77
|
+
const u = { content: y };
|
|
78
|
+
p.trim() && (u.title = p.trim()), v !== void 0 && (u.type = v), await t.submitFeedback(u), await c();
|
|
79
|
+
},
|
|
80
|
+
[t, c]
|
|
81
|
+
), m = F(
|
|
82
|
+
async (p, y) => {
|
|
83
|
+
try {
|
|
84
|
+
await t.vote(p, y), await c();
|
|
85
|
+
} catch {
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
[t, c]
|
|
89
|
+
), s = F(
|
|
90
|
+
(p) => t.getItem(p),
|
|
91
|
+
[t]
|
|
92
|
+
), b = F(() => r(!0), []), S = F(() => r(!1), []), C = F(
|
|
93
|
+
(p) => t.setUserId(p),
|
|
77
94
|
[t]
|
|
78
|
-
)
|
|
95
|
+
);
|
|
79
96
|
return /* @__PURE__ */ e(
|
|
80
97
|
R.Provider,
|
|
81
98
|
{
|
|
82
99
|
value: {
|
|
83
100
|
client: t,
|
|
84
|
-
feedItems:
|
|
85
|
-
loadFeed:
|
|
86
|
-
submit:
|
|
101
|
+
feedItems: g,
|
|
102
|
+
loadFeed: c,
|
|
103
|
+
submit: w,
|
|
87
104
|
vote: m,
|
|
88
|
-
getItem:
|
|
105
|
+
getItem: s,
|
|
89
106
|
isOpen: i,
|
|
90
107
|
open: b,
|
|
91
|
-
close:
|
|
92
|
-
identify:
|
|
108
|
+
close: S,
|
|
109
|
+
identify: C,
|
|
93
110
|
accentColor: n.accentColor ?? _,
|
|
94
111
|
theme: n.theme ?? "auto",
|
|
95
112
|
showBranding: l,
|
|
@@ -99,7 +116,7 @@ function de({
|
|
|
99
116
|
}
|
|
100
117
|
);
|
|
101
118
|
}
|
|
102
|
-
function
|
|
119
|
+
function I() {
|
|
103
120
|
const o = O(R);
|
|
104
121
|
if (!o) throw new Error("useUpstep must be used inside <UpstepProvider>");
|
|
105
122
|
return o;
|
|
@@ -108,45 +125,55 @@ function ae({
|
|
|
108
125
|
position: o = "bottom-right",
|
|
109
126
|
accentColor: n,
|
|
110
127
|
theme: t,
|
|
111
|
-
hideLauncher:
|
|
112
|
-
chat:
|
|
128
|
+
hideLauncher: g = !1,
|
|
129
|
+
chat: a = !0
|
|
113
130
|
}) {
|
|
114
|
-
const i =
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
131
|
+
const i = I(), r = n ?? i.accentColor, l = K(t ?? i.theme), {
|
|
132
|
+
isOpen: x,
|
|
133
|
+
open: c,
|
|
134
|
+
close: w,
|
|
135
|
+
showBranding: m
|
|
136
|
+
} = i, [s, b] = h("list"), [S, C] = h(!1);
|
|
137
|
+
k(() => {
|
|
138
|
+
let f = !0;
|
|
139
|
+
if (i.client.chat = i.chat, !i.chat || !a) {
|
|
140
|
+
C(!1);
|
|
119
141
|
return;
|
|
120
142
|
}
|
|
121
|
-
return i.client.supportEnabled().then((
|
|
122
|
-
|
|
143
|
+
return i.client.supportEnabled().then((z) => {
|
|
144
|
+
f && C(z);
|
|
123
145
|
}), () => {
|
|
124
|
-
|
|
146
|
+
f = !1;
|
|
125
147
|
};
|
|
126
|
-
}, [i.client, i.chat,
|
|
127
|
-
(!i.chat || !
|
|
128
|
-
}, [i.chat,
|
|
129
|
-
|
|
130
|
-
S
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
148
|
+
}, [i.client, i.chat, a]), k(() => {
|
|
149
|
+
(!i.chat || !a) && s === "support" && b("list");
|
|
150
|
+
}, [i.chat, a, s]), k(() => {
|
|
151
|
+
x && b(S && a && i.chat ? "support" : "list");
|
|
152
|
+
}, [x, S, a, i.chat]);
|
|
153
|
+
const [p, y] = h(null), [v, u] = h(!1);
|
|
154
|
+
k(() => {
|
|
155
|
+
const f = window.matchMedia("(max-width: 639px)");
|
|
156
|
+
u(f.matches);
|
|
157
|
+
const z = ($) => u($.matches);
|
|
158
|
+
return f.addEventListener("change", z), () => f.removeEventListener("change", z);
|
|
135
159
|
}, []);
|
|
136
|
-
const H =
|
|
160
|
+
const H = {
|
|
161
|
+
position: "fixed",
|
|
162
|
+
bottom: 24,
|
|
163
|
+
right: 24
|
|
164
|
+
}, B = '-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif';
|
|
137
165
|
function W() {
|
|
138
|
-
|
|
139
|
-
b("list"), x(null);
|
|
140
|
-
}, 300);
|
|
166
|
+
w(), y(null);
|
|
141
167
|
}
|
|
142
|
-
function N(
|
|
143
|
-
|
|
168
|
+
function N(f) {
|
|
169
|
+
y(f), b("detail");
|
|
144
170
|
}
|
|
145
|
-
return /* @__PURE__ */
|
|
146
|
-
!
|
|
171
|
+
return /* @__PURE__ */ d(T, { children: [
|
|
172
|
+
!g && /* @__PURE__ */ d(
|
|
147
173
|
"button",
|
|
148
174
|
{
|
|
149
|
-
|
|
175
|
+
"aria-label": "Open help and feedback",
|
|
176
|
+
onClick: c,
|
|
150
177
|
style: {
|
|
151
178
|
...H,
|
|
152
179
|
zIndex: 9998,
|
|
@@ -157,36 +184,35 @@ function ae({
|
|
|
157
184
|
color: "#fff",
|
|
158
185
|
border: "none",
|
|
159
186
|
borderRadius: 9999,
|
|
160
|
-
padding:
|
|
187
|
+
padding: v ? "12px" : "12px 18px",
|
|
161
188
|
fontSize: 14,
|
|
162
189
|
fontWeight: 600,
|
|
163
190
|
cursor: "pointer",
|
|
164
|
-
fontFamily:
|
|
191
|
+
fontFamily: B,
|
|
165
192
|
boxShadow: "0 6px 20px rgba(26,25,21,.18)"
|
|
166
193
|
},
|
|
167
194
|
children: [
|
|
168
195
|
/* @__PURE__ */ e(re, { size: 16 }),
|
|
169
|
-
!
|
|
196
|
+
!v && (S && a && i.chat ? "Help & feedback" : "Feedback")
|
|
170
197
|
]
|
|
171
198
|
}
|
|
172
199
|
),
|
|
173
|
-
|
|
200
|
+
x && /* @__PURE__ */ e(
|
|
174
201
|
"div",
|
|
175
202
|
{
|
|
176
|
-
onClick: (
|
|
203
|
+
onClick: (f) => f.target === f.currentTarget && W(),
|
|
177
204
|
style: {
|
|
178
205
|
position: "fixed",
|
|
179
206
|
inset: 0,
|
|
180
|
-
background:
|
|
181
|
-
backdropFilter: "blur(3px)",
|
|
207
|
+
background: "transparent",
|
|
182
208
|
zIndex: 9999,
|
|
183
209
|
display: "flex",
|
|
184
|
-
alignItems: "
|
|
185
|
-
justifyContent: "
|
|
186
|
-
padding:
|
|
187
|
-
fontFamily:
|
|
210
|
+
alignItems: "flex-end",
|
|
211
|
+
justifyContent: "flex-end",
|
|
212
|
+
padding: v ? "0 12px 80px" : "0 24px 88px",
|
|
213
|
+
fontFamily: B
|
|
188
214
|
},
|
|
189
|
-
children: /* @__PURE__ */
|
|
215
|
+
children: /* @__PURE__ */ d(
|
|
190
216
|
"div",
|
|
191
217
|
{
|
|
192
218
|
style: {
|
|
@@ -194,69 +220,251 @@ function ae({
|
|
|
194
220
|
border: `1px solid ${l.border}`,
|
|
195
221
|
borderRadius: 20,
|
|
196
222
|
width: "100%",
|
|
197
|
-
maxWidth: 440,
|
|
198
|
-
maxHeight: "
|
|
223
|
+
maxWidth: S && a && i.chat ? 460 : 440,
|
|
224
|
+
maxHeight: "calc(100dvh - 112px)",
|
|
199
225
|
display: "flex",
|
|
200
226
|
flexDirection: "column",
|
|
201
227
|
overflow: "hidden",
|
|
202
228
|
boxShadow: "0 24px 64px rgba(0,0,0,.28)"
|
|
203
229
|
},
|
|
204
230
|
children: [
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
231
|
+
S && a && i.chat ? /* @__PURE__ */ d(
|
|
232
|
+
"div",
|
|
233
|
+
{
|
|
234
|
+
style: {
|
|
235
|
+
display: "flex",
|
|
236
|
+
alignItems: "center",
|
|
237
|
+
gap: 14,
|
|
238
|
+
padding: "10px 14px",
|
|
239
|
+
borderBottom: `1px solid ${l.border}`,
|
|
240
|
+
flexShrink: 0
|
|
241
|
+
},
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", flex: 1, gap: 4 }, children: [
|
|
244
|
+
["support", "Support"],
|
|
245
|
+
["list", "Feedback"]
|
|
246
|
+
].map(([f, z]) => /* @__PURE__ */ e(
|
|
247
|
+
"button",
|
|
248
|
+
{
|
|
249
|
+
onClick: () => b(f),
|
|
250
|
+
style: {
|
|
251
|
+
flex: 1,
|
|
252
|
+
border: 0,
|
|
253
|
+
borderRadius: 8,
|
|
254
|
+
padding: "9px 12px",
|
|
255
|
+
background: (s === "support" ? f === "support" : f === "list") ? l.bgSoft : "transparent",
|
|
256
|
+
color: (s === "support" ? f === "support" : f === "list") ? l.text : l.textSoft,
|
|
257
|
+
fontSize: 14,
|
|
258
|
+
fontWeight: 600,
|
|
259
|
+
cursor: "pointer"
|
|
260
|
+
},
|
|
261
|
+
children: z
|
|
262
|
+
},
|
|
263
|
+
f
|
|
264
|
+
)) }),
|
|
265
|
+
/* @__PURE__ */ e(
|
|
266
|
+
"button",
|
|
267
|
+
{
|
|
268
|
+
"aria-label": "Close",
|
|
269
|
+
onClick: W,
|
|
270
|
+
style: {
|
|
271
|
+
border: 0,
|
|
272
|
+
background: "transparent",
|
|
273
|
+
color: l.textSoft,
|
|
274
|
+
padding: 6,
|
|
275
|
+
cursor: "pointer",
|
|
276
|
+
fontSize: 14
|
|
277
|
+
},
|
|
278
|
+
children: "✕"
|
|
279
|
+
}
|
|
280
|
+
)
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
) : /* @__PURE__ */ d(
|
|
284
|
+
"div",
|
|
285
|
+
{
|
|
286
|
+
style: {
|
|
287
|
+
display: "flex",
|
|
288
|
+
alignItems: "center",
|
|
289
|
+
justifyContent: "space-between",
|
|
290
|
+
padding: "16px 20px",
|
|
291
|
+
borderBottom: `1px solid ${l.border}`,
|
|
292
|
+
flexShrink: 0
|
|
293
|
+
},
|
|
294
|
+
children: [
|
|
295
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
296
|
+
s !== "list" && /* @__PURE__ */ e(
|
|
297
|
+
"button",
|
|
298
|
+
{
|
|
299
|
+
onClick: () => b("list"),
|
|
300
|
+
style: {
|
|
301
|
+
background: "none",
|
|
302
|
+
border: "none",
|
|
303
|
+
cursor: "pointer",
|
|
304
|
+
color: r,
|
|
305
|
+
fontSize: 14,
|
|
306
|
+
fontWeight: 600,
|
|
307
|
+
padding: 0
|
|
308
|
+
},
|
|
309
|
+
children: "← Back"
|
|
310
|
+
}
|
|
311
|
+
),
|
|
312
|
+
s === "list" && /* @__PURE__ */ e(
|
|
313
|
+
"span",
|
|
314
|
+
{
|
|
315
|
+
style: {
|
|
316
|
+
fontWeight: 700,
|
|
317
|
+
fontSize: 16,
|
|
318
|
+
color: l.text,
|
|
319
|
+
letterSpacing: "-.01em"
|
|
320
|
+
},
|
|
321
|
+
children: "Feedback"
|
|
322
|
+
}
|
|
323
|
+
),
|
|
324
|
+
s === "create" && /* @__PURE__ */ e(
|
|
325
|
+
"span",
|
|
326
|
+
{
|
|
327
|
+
style: {
|
|
328
|
+
fontWeight: 700,
|
|
329
|
+
fontSize: 16,
|
|
330
|
+
color: l.text,
|
|
331
|
+
letterSpacing: "-.01em"
|
|
332
|
+
},
|
|
333
|
+
children: "New feedback"
|
|
334
|
+
}
|
|
335
|
+
)
|
|
336
|
+
] }),
|
|
337
|
+
/* @__PURE__ */ d("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
338
|
+
s === "list" && /* @__PURE__ */ e(
|
|
339
|
+
"button",
|
|
340
|
+
{
|
|
341
|
+
onClick: () => b("create"),
|
|
342
|
+
style: {
|
|
343
|
+
background: r,
|
|
344
|
+
color: "#fff",
|
|
345
|
+
border: "none",
|
|
346
|
+
borderRadius: 20,
|
|
347
|
+
padding: "6px 14px",
|
|
348
|
+
fontSize: 14,
|
|
349
|
+
fontWeight: 700,
|
|
350
|
+
cursor: "pointer"
|
|
351
|
+
},
|
|
352
|
+
children: "+ New"
|
|
353
|
+
}
|
|
354
|
+
),
|
|
355
|
+
/* @__PURE__ */ e(
|
|
356
|
+
"button",
|
|
357
|
+
{
|
|
358
|
+
onClick: W,
|
|
359
|
+
style: {
|
|
360
|
+
background: l.bgSoft,
|
|
361
|
+
border: "none",
|
|
362
|
+
width: 28,
|
|
363
|
+
height: 28,
|
|
364
|
+
borderRadius: 8,
|
|
365
|
+
fontSize: 14,
|
|
366
|
+
cursor: "pointer",
|
|
367
|
+
color: l.textSoft,
|
|
368
|
+
display: "flex",
|
|
369
|
+
alignItems: "center",
|
|
370
|
+
justifyContent: "center"
|
|
371
|
+
},
|
|
372
|
+
children: "✕"
|
|
373
|
+
}
|
|
374
|
+
)
|
|
375
|
+
] })
|
|
376
|
+
]
|
|
377
|
+
}
|
|
378
|
+
),
|
|
379
|
+
/* @__PURE__ */ d(
|
|
380
|
+
"div",
|
|
381
|
+
{
|
|
382
|
+
style: {
|
|
383
|
+
flex: 1,
|
|
384
|
+
overflowY: "auto",
|
|
385
|
+
padding: s === "support" ? 0 : "16px 20px 24px"
|
|
386
|
+
},
|
|
387
|
+
children: [
|
|
388
|
+
s === "support" && a && i.chat && /* @__PURE__ */ e(
|
|
389
|
+
J,
|
|
390
|
+
{
|
|
391
|
+
client: i.client,
|
|
392
|
+
theme: l.bg === "#000000" ? "dark" : "light"
|
|
393
|
+
}
|
|
394
|
+
),
|
|
395
|
+
S && a && i.chat && s !== "support" && /* @__PURE__ */ e(
|
|
396
|
+
"div",
|
|
397
|
+
{
|
|
398
|
+
style: {
|
|
399
|
+
display: "flex",
|
|
400
|
+
alignItems: "center",
|
|
401
|
+
justifyContent: "space-between",
|
|
402
|
+
marginBottom: 16
|
|
403
|
+
},
|
|
404
|
+
children: s === "list" ? /* @__PURE__ */ d(T, { children: [
|
|
405
|
+
/* @__PURE__ */ e(
|
|
406
|
+
"span",
|
|
407
|
+
{
|
|
408
|
+
style: { fontSize: 14, fontWeight: 600, color: l.text },
|
|
409
|
+
children: "Feedback & ideas"
|
|
410
|
+
}
|
|
411
|
+
),
|
|
412
|
+
/* @__PURE__ */ e(
|
|
413
|
+
"button",
|
|
414
|
+
{
|
|
415
|
+
onClick: () => b("create"),
|
|
416
|
+
style: {
|
|
417
|
+
border: 0,
|
|
418
|
+
borderRadius: 8,
|
|
419
|
+
background: r,
|
|
420
|
+
color: "white",
|
|
421
|
+
fontSize: 14,
|
|
422
|
+
padding: "7px 10px",
|
|
423
|
+
cursor: "pointer"
|
|
424
|
+
},
|
|
425
|
+
children: "+ New"
|
|
426
|
+
}
|
|
427
|
+
)
|
|
428
|
+
] }) : /* @__PURE__ */ e(
|
|
429
|
+
"button",
|
|
430
|
+
{
|
|
431
|
+
onClick: () => b("list"),
|
|
432
|
+
style: {
|
|
433
|
+
border: 0,
|
|
434
|
+
background: "none",
|
|
435
|
+
padding: 0,
|
|
436
|
+
color: l.textSoft,
|
|
437
|
+
fontSize: 14,
|
|
438
|
+
cursor: "pointer"
|
|
439
|
+
},
|
|
440
|
+
children: "← Back to feedback"
|
|
441
|
+
}
|
|
442
|
+
)
|
|
443
|
+
}
|
|
444
|
+
),
|
|
445
|
+
s === "list" && /* @__PURE__ */ e(Q, { onSelect: N, accent: r, p: l }),
|
|
446
|
+
s === "detail" && p && /* @__PURE__ */ e(
|
|
447
|
+
X,
|
|
448
|
+
{
|
|
449
|
+
feedbackId: p,
|
|
450
|
+
accent: r,
|
|
451
|
+
p: l,
|
|
452
|
+
font: B
|
|
453
|
+
}
|
|
454
|
+
),
|
|
455
|
+
s === "create" && /* @__PURE__ */ e(
|
|
456
|
+
ee,
|
|
457
|
+
{
|
|
458
|
+
accent: r,
|
|
459
|
+
p: l,
|
|
460
|
+
font: B,
|
|
461
|
+
onDone: () => b("list")
|
|
462
|
+
}
|
|
463
|
+
)
|
|
464
|
+
]
|
|
465
|
+
}
|
|
466
|
+
),
|
|
467
|
+
m && s !== "support" && /* @__PURE__ */ d(
|
|
260
468
|
"a",
|
|
261
469
|
{
|
|
262
470
|
href: "https://upstep.dev",
|
|
@@ -273,7 +481,8 @@ function ae({
|
|
|
273
481
|
flexShrink: 0
|
|
274
482
|
},
|
|
275
483
|
children: [
|
|
276
|
-
"Powered by
|
|
484
|
+
"Powered by",
|
|
485
|
+
" ",
|
|
277
486
|
/* @__PURE__ */ e("strong", { style: { fontWeight: 700 }, children: "Upstep.dev" })
|
|
278
487
|
]
|
|
279
488
|
}
|
|
@@ -285,21 +494,39 @@ function ae({
|
|
|
285
494
|
)
|
|
286
495
|
] });
|
|
287
496
|
}
|
|
288
|
-
function J({
|
|
497
|
+
function J({
|
|
498
|
+
client: o,
|
|
499
|
+
theme: n
|
|
500
|
+
}) {
|
|
289
501
|
const t = j(null);
|
|
290
|
-
return
|
|
502
|
+
return k(() => {
|
|
291
503
|
if (t.current) return o.connectSupportFrame(t.current);
|
|
292
|
-
}, [o]), /* @__PURE__ */ e(
|
|
504
|
+
}, [o]), /* @__PURE__ */ e(
|
|
505
|
+
"iframe",
|
|
506
|
+
{
|
|
507
|
+
ref: t,
|
|
508
|
+
"data-upstep-support": !0,
|
|
509
|
+
title: "Customer support",
|
|
510
|
+
src: o.supportFrameUrl(n),
|
|
511
|
+
style: {
|
|
512
|
+
width: "100%",
|
|
513
|
+
height: "min(560px, calc(100dvh - 168px))",
|
|
514
|
+
minHeight: 300,
|
|
515
|
+
border: 0,
|
|
516
|
+
display: "block"
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
);
|
|
293
520
|
}
|
|
294
521
|
function Q({
|
|
295
522
|
onSelect: o,
|
|
296
523
|
accent: n,
|
|
297
524
|
p: t
|
|
298
525
|
}) {
|
|
299
|
-
const { feedItems:
|
|
300
|
-
return i.length ? /* @__PURE__ */ e(
|
|
301
|
-
const l = r.userVote === "UP",
|
|
302
|
-
return /* @__PURE__ */
|
|
526
|
+
const { feedItems: g, vote: a } = I(), i = g.filter((r) => r.status !== "CLOSED");
|
|
527
|
+
return i.length ? /* @__PURE__ */ e(T, { children: i.map((r) => {
|
|
528
|
+
const l = r.userVote === "UP", x = r.title ?? r.content;
|
|
529
|
+
return /* @__PURE__ */ d(
|
|
303
530
|
"div",
|
|
304
531
|
{
|
|
305
532
|
onClick: () => o(r.id),
|
|
@@ -314,11 +541,11 @@ function Q({
|
|
|
314
541
|
cursor: "pointer"
|
|
315
542
|
},
|
|
316
543
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
544
|
+
/* @__PURE__ */ d(
|
|
318
545
|
"button",
|
|
319
546
|
{
|
|
320
|
-
onClick: (
|
|
321
|
-
|
|
547
|
+
onClick: (c) => {
|
|
548
|
+
c.stopPropagation(), a(r.id, "UP");
|
|
322
549
|
},
|
|
323
550
|
style: {
|
|
324
551
|
display: "flex",
|
|
@@ -336,67 +563,187 @@ function Q({
|
|
|
336
563
|
},
|
|
337
564
|
children: [
|
|
338
565
|
/* @__PURE__ */ e(D, { color: n }),
|
|
339
|
-
/* @__PURE__ */ e(
|
|
566
|
+
/* @__PURE__ */ e(
|
|
567
|
+
"span",
|
|
568
|
+
{
|
|
569
|
+
style: {
|
|
570
|
+
fontSize: 14,
|
|
571
|
+
fontWeight: 700,
|
|
572
|
+
color: t.text,
|
|
573
|
+
lineHeight: 1.1
|
|
574
|
+
},
|
|
575
|
+
children: r.upvotes
|
|
576
|
+
}
|
|
577
|
+
)
|
|
340
578
|
]
|
|
341
579
|
}
|
|
342
580
|
),
|
|
343
|
-
/* @__PURE__ */
|
|
344
|
-
/* @__PURE__ */ e(
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
581
|
+
/* @__PURE__ */ d("div", { style: { flex: 1, minWidth: 0 }, children: [
|
|
582
|
+
/* @__PURE__ */ e(
|
|
583
|
+
"p",
|
|
584
|
+
{
|
|
585
|
+
style: {
|
|
586
|
+
fontSize: 14,
|
|
587
|
+
fontWeight: 600,
|
|
588
|
+
lineHeight: 1.4,
|
|
589
|
+
color: t.text,
|
|
590
|
+
margin: "0 0 6px",
|
|
591
|
+
overflow: "hidden",
|
|
592
|
+
display: "-webkit-box",
|
|
593
|
+
WebkitLineClamp: 2,
|
|
594
|
+
WebkitBoxOrient: "vertical"
|
|
595
|
+
},
|
|
596
|
+
children: x
|
|
597
|
+
}
|
|
598
|
+
),
|
|
599
|
+
/* @__PURE__ */ d(
|
|
600
|
+
"div",
|
|
601
|
+
{
|
|
602
|
+
style: {
|
|
603
|
+
display: "flex",
|
|
604
|
+
alignItems: "center",
|
|
605
|
+
gap: 6,
|
|
606
|
+
flexWrap: "wrap"
|
|
607
|
+
},
|
|
608
|
+
children: [
|
|
609
|
+
/* @__PURE__ */ e(L, { type: r.type, p: t }),
|
|
610
|
+
r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
|
|
611
|
+
A,
|
|
612
|
+
{
|
|
613
|
+
status: r.status,
|
|
614
|
+
boardStatus: r.boardStatus,
|
|
615
|
+
p: t
|
|
616
|
+
}
|
|
617
|
+
),
|
|
618
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: t.textFaint }, children: P(r.createdAt) })
|
|
619
|
+
]
|
|
620
|
+
}
|
|
621
|
+
)
|
|
350
622
|
] }),
|
|
351
|
-
/* @__PURE__ */ e(
|
|
623
|
+
/* @__PURE__ */ e(
|
|
624
|
+
"span",
|
|
625
|
+
{
|
|
626
|
+
style: {
|
|
627
|
+
color: t.textFaint,
|
|
628
|
+
fontSize: 18,
|
|
629
|
+
alignSelf: "center",
|
|
630
|
+
flexShrink: 0
|
|
631
|
+
},
|
|
632
|
+
children: "›"
|
|
633
|
+
}
|
|
634
|
+
)
|
|
352
635
|
]
|
|
353
636
|
},
|
|
354
637
|
r.id
|
|
355
638
|
);
|
|
356
|
-
}) }) : /* @__PURE__ */
|
|
357
|
-
/* @__PURE__ */ e(
|
|
639
|
+
}) }) : /* @__PURE__ */ d("div", { style: { textAlign: "center", padding: "40px 0" }, children: [
|
|
640
|
+
/* @__PURE__ */ e(
|
|
641
|
+
"div",
|
|
642
|
+
{
|
|
643
|
+
style: {
|
|
644
|
+
color: t.textSoft,
|
|
645
|
+
fontSize: 15,
|
|
646
|
+
fontWeight: 600,
|
|
647
|
+
marginBottom: 4
|
|
648
|
+
},
|
|
649
|
+
children: "No open feedback yet"
|
|
650
|
+
}
|
|
651
|
+
),
|
|
358
652
|
/* @__PURE__ */ e("div", { style: { color: t.textFaint, fontSize: 14 }, children: "Be the first to share one." })
|
|
359
653
|
] });
|
|
360
654
|
}
|
|
361
|
-
function X({
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
655
|
+
function X({
|
|
656
|
+
feedbackId: o,
|
|
657
|
+
accent: n,
|
|
658
|
+
p: t,
|
|
659
|
+
font: g
|
|
660
|
+
}) {
|
|
661
|
+
const { vote: a, getItem: i } = I(), [r, l] = h(null), [x, c] = h(!1);
|
|
662
|
+
k(() => {
|
|
663
|
+
let s = !1;
|
|
365
664
|
return i(o).then((b) => {
|
|
366
|
-
|
|
665
|
+
s || l(b);
|
|
367
666
|
}).catch(() => {
|
|
368
667
|
}), () => {
|
|
369
|
-
|
|
668
|
+
s = !0;
|
|
370
669
|
};
|
|
371
670
|
}, [o, i]);
|
|
372
|
-
async function
|
|
373
|
-
if (!(!r ||
|
|
374
|
-
|
|
671
|
+
async function w() {
|
|
672
|
+
if (!(!r || x)) {
|
|
673
|
+
c(!0);
|
|
375
674
|
try {
|
|
376
|
-
await
|
|
377
|
-
const
|
|
378
|
-
l(
|
|
675
|
+
await a(r.id, "UP");
|
|
676
|
+
const s = await i(o);
|
|
677
|
+
l(s);
|
|
379
678
|
} catch {
|
|
380
679
|
} finally {
|
|
381
|
-
|
|
680
|
+
c(!1);
|
|
382
681
|
}
|
|
383
682
|
}
|
|
384
683
|
}
|
|
385
684
|
if (!r)
|
|
386
|
-
return /* @__PURE__ */ e(
|
|
685
|
+
return /* @__PURE__ */ e(
|
|
686
|
+
"div",
|
|
687
|
+
{
|
|
688
|
+
style: {
|
|
689
|
+
textAlign: "center",
|
|
690
|
+
padding: "40px 0",
|
|
691
|
+
color: t.textFaint,
|
|
692
|
+
fontSize: 14
|
|
693
|
+
},
|
|
694
|
+
children: "Loading…"
|
|
695
|
+
}
|
|
696
|
+
);
|
|
387
697
|
const m = r.title;
|
|
388
|
-
return /* @__PURE__ */
|
|
389
|
-
m && /* @__PURE__ */ e(
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
698
|
+
return /* @__PURE__ */ d("div", { children: [
|
|
699
|
+
m && /* @__PURE__ */ e(
|
|
700
|
+
"div",
|
|
701
|
+
{
|
|
702
|
+
style: {
|
|
703
|
+
fontSize: 20,
|
|
704
|
+
fontWeight: 700,
|
|
705
|
+
color: t.text,
|
|
706
|
+
letterSpacing: "-.02em",
|
|
707
|
+
marginBottom: 10,
|
|
708
|
+
lineHeight: 1.3
|
|
709
|
+
},
|
|
710
|
+
children: m
|
|
711
|
+
}
|
|
712
|
+
),
|
|
713
|
+
/* @__PURE__ */ d(
|
|
714
|
+
"div",
|
|
715
|
+
{
|
|
716
|
+
style: { display: "flex", gap: 6, marginBottom: 14, flexWrap: "wrap" },
|
|
717
|
+
children: [
|
|
718
|
+
/* @__PURE__ */ e(L, { type: r.type, p: t }),
|
|
719
|
+
r.status === "PENDING" ? /* @__PURE__ */ e(M, {}) : /* @__PURE__ */ e(
|
|
720
|
+
A,
|
|
721
|
+
{
|
|
722
|
+
status: r.status,
|
|
723
|
+
boardStatus: r.boardStatus,
|
|
724
|
+
p: t
|
|
725
|
+
}
|
|
726
|
+
)
|
|
727
|
+
]
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
/* @__PURE__ */ e(
|
|
731
|
+
"p",
|
|
732
|
+
{
|
|
733
|
+
style: {
|
|
734
|
+
fontSize: 15,
|
|
735
|
+
lineHeight: 1.6,
|
|
736
|
+
color: t.textSoft,
|
|
737
|
+
marginBottom: 20
|
|
738
|
+
},
|
|
739
|
+
children: r.content
|
|
740
|
+
}
|
|
741
|
+
),
|
|
742
|
+
/* @__PURE__ */ d(
|
|
396
743
|
"button",
|
|
397
744
|
{
|
|
398
|
-
onClick:
|
|
399
|
-
disabled:
|
|
745
|
+
onClick: w,
|
|
746
|
+
disabled: x,
|
|
400
747
|
style: {
|
|
401
748
|
display: "inline-flex",
|
|
402
749
|
alignItems: "center",
|
|
@@ -406,69 +753,167 @@ function X({ feedbackId: o, accent: n, p: t, font: u }) {
|
|
|
406
753
|
borderRadius: 12,
|
|
407
754
|
padding: "10px 16px",
|
|
408
755
|
cursor: "pointer",
|
|
409
|
-
fontFamily:
|
|
756
|
+
fontFamily: g
|
|
410
757
|
},
|
|
411
758
|
children: [
|
|
412
759
|
/* @__PURE__ */ e(D, { color: n, size: 13 }),
|
|
413
760
|
/* @__PURE__ */ e("span", { style: { fontSize: 18, fontWeight: 700, color: t.text }, children: r.upvotes }),
|
|
414
|
-
/* @__PURE__ */ e("span", { style: { fontSize:
|
|
761
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 14, color: t.textFaint }, children: r.userVote === "UP" ? "Upvoted" : "Upvote" })
|
|
415
762
|
]
|
|
416
763
|
}
|
|
417
764
|
),
|
|
418
|
-
r.comments.length > 0 && /* @__PURE__ */
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
765
|
+
r.comments.length > 0 && /* @__PURE__ */ d(
|
|
766
|
+
"div",
|
|
767
|
+
{
|
|
768
|
+
style: {
|
|
769
|
+
marginTop: 28,
|
|
770
|
+
borderTop: `1px solid ${t.border}`,
|
|
771
|
+
paddingTop: 20
|
|
772
|
+
},
|
|
773
|
+
children: [
|
|
774
|
+
/* @__PURE__ */ e(
|
|
775
|
+
"div",
|
|
776
|
+
{
|
|
777
|
+
style: {
|
|
778
|
+
fontSize: 10,
|
|
779
|
+
fontWeight: 700,
|
|
780
|
+
letterSpacing: ".08em",
|
|
781
|
+
color: t.textFaint,
|
|
782
|
+
marginBottom: 12,
|
|
783
|
+
textTransform: "uppercase"
|
|
784
|
+
},
|
|
785
|
+
children: "Comments"
|
|
786
|
+
}
|
|
787
|
+
),
|
|
788
|
+
r.comments.map((s) => /* @__PURE__ */ e(Z, { comment: s, p: t, accent: n }, s.id))
|
|
789
|
+
]
|
|
790
|
+
}
|
|
791
|
+
)
|
|
422
792
|
] });
|
|
423
793
|
}
|
|
424
|
-
function Z({
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
794
|
+
function Z({
|
|
795
|
+
comment: o,
|
|
796
|
+
p: n,
|
|
797
|
+
accent: t
|
|
798
|
+
}) {
|
|
799
|
+
var g;
|
|
800
|
+
return /* @__PURE__ */ d(
|
|
801
|
+
"div",
|
|
802
|
+
{
|
|
803
|
+
style: {
|
|
804
|
+
background: n.bgSoft,
|
|
805
|
+
border: `1px solid ${n.border}`,
|
|
806
|
+
borderRadius: 12,
|
|
807
|
+
padding: 14,
|
|
808
|
+
marginBottom: 10
|
|
809
|
+
},
|
|
810
|
+
children: [
|
|
811
|
+
/* @__PURE__ */ d(
|
|
812
|
+
"div",
|
|
813
|
+
{
|
|
814
|
+
style: {
|
|
815
|
+
display: "flex",
|
|
816
|
+
alignItems: "center",
|
|
817
|
+
gap: 8,
|
|
818
|
+
marginBottom: 8
|
|
819
|
+
},
|
|
820
|
+
children: [
|
|
821
|
+
/* @__PURE__ */ e(
|
|
822
|
+
"span",
|
|
823
|
+
{
|
|
824
|
+
style: {
|
|
825
|
+
background: `${t}20`,
|
|
826
|
+
color: t,
|
|
827
|
+
fontSize: 11,
|
|
828
|
+
fontWeight: 700,
|
|
829
|
+
borderRadius: 20,
|
|
830
|
+
padding: "2px 8px"
|
|
831
|
+
},
|
|
832
|
+
children: ((g = o.authorName) == null ? void 0 : g.trim()) || "UpStep Team"
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
/* @__PURE__ */ e("span", { style: { fontSize: 11, color: n.textFaint }, children: P(o.createdAt) })
|
|
836
|
+
]
|
|
837
|
+
}
|
|
838
|
+
),
|
|
839
|
+
/* @__PURE__ */ e(
|
|
840
|
+
"p",
|
|
841
|
+
{
|
|
842
|
+
style: { fontSize: 16, lineHeight: 1.6, color: n.textSoft, margin: 0 },
|
|
843
|
+
children: o.content
|
|
844
|
+
}
|
|
845
|
+
)
|
|
846
|
+
]
|
|
847
|
+
}
|
|
848
|
+
);
|
|
433
849
|
}
|
|
434
|
-
function ee({
|
|
435
|
-
|
|
436
|
-
|
|
850
|
+
function ee({
|
|
851
|
+
accent: o,
|
|
852
|
+
p: n,
|
|
853
|
+
font: t,
|
|
854
|
+
onDone: g
|
|
855
|
+
}) {
|
|
856
|
+
const { submit: a } = I(), [i, r] = h(""), [l, x] = h(""), [c, w] = h("GENERAL"), [m, s] = h(!1), [b, S] = h(!1), [C, p] = h("");
|
|
857
|
+
async function y() {
|
|
437
858
|
if (!(!i.trim() || m)) {
|
|
438
|
-
|
|
859
|
+
s(!0), p("");
|
|
439
860
|
try {
|
|
440
|
-
await
|
|
861
|
+
await a(i.trim(), l.trim() || i.trim(), c), S(!0), setTimeout(g, 1200);
|
|
441
862
|
} catch {
|
|
442
|
-
|
|
863
|
+
p("Something went wrong. Please try again.");
|
|
443
864
|
} finally {
|
|
444
|
-
|
|
865
|
+
s(!1);
|
|
445
866
|
}
|
|
446
867
|
}
|
|
447
868
|
}
|
|
448
869
|
if (b)
|
|
449
|
-
return /* @__PURE__ */
|
|
450
|
-
/* @__PURE__ */ e(
|
|
870
|
+
return /* @__PURE__ */ d("div", { style: { textAlign: "center", paddingTop: 40 }, children: [
|
|
871
|
+
/* @__PURE__ */ e(
|
|
872
|
+
"div",
|
|
873
|
+
{
|
|
874
|
+
style: {
|
|
875
|
+
fontSize: 18,
|
|
876
|
+
fontWeight: 700,
|
|
877
|
+
color: n.text,
|
|
878
|
+
marginBottom: 6
|
|
879
|
+
},
|
|
880
|
+
children: "Submitted"
|
|
881
|
+
}
|
|
882
|
+
),
|
|
451
883
|
/* @__PURE__ */ e("div", { style: { fontSize: 14, color: n.textFaint }, children: "Feedback received. Thank you." })
|
|
452
884
|
] });
|
|
453
|
-
const
|
|
885
|
+
const v = {
|
|
454
886
|
width: "100%",
|
|
455
887
|
border: `1px solid ${n.border}`,
|
|
456
888
|
borderRadius: 12,
|
|
457
889
|
padding: "10px 12px",
|
|
458
|
-
fontSize:
|
|
459
|
-
lineHeight: 1.
|
|
890
|
+
fontSize: 16,
|
|
891
|
+
lineHeight: 1.6,
|
|
460
892
|
outline: "none",
|
|
461
893
|
background: n.bgSoft,
|
|
462
894
|
color: n.text,
|
|
463
895
|
fontFamily: t,
|
|
464
896
|
boxSizing: "border-box"
|
|
465
897
|
};
|
|
466
|
-
return /* @__PURE__ */
|
|
467
|
-
/* @__PURE__ */ e(
|
|
468
|
-
|
|
898
|
+
return /* @__PURE__ */ d("div", { children: [
|
|
899
|
+
/* @__PURE__ */ e(
|
|
900
|
+
"div",
|
|
901
|
+
{
|
|
902
|
+
style: {
|
|
903
|
+
fontSize: 10,
|
|
904
|
+
fontWeight: 700,
|
|
905
|
+
letterSpacing: ".08em",
|
|
906
|
+
color: n.textFaint,
|
|
907
|
+
marginBottom: 8,
|
|
908
|
+
textTransform: "uppercase"
|
|
909
|
+
},
|
|
910
|
+
children: "Type"
|
|
911
|
+
}
|
|
912
|
+
),
|
|
913
|
+
/* @__PURE__ */ e("div", { style: { display: "flex", gap: 7, marginBottom: 16 }, children: ["BUG", "FEATURE", "GENERAL"].map((u) => /* @__PURE__ */ d(
|
|
469
914
|
"button",
|
|
470
915
|
{
|
|
471
|
-
onClick: () =>
|
|
916
|
+
onClick: () => w(u),
|
|
472
917
|
style: {
|
|
473
918
|
flex: 1,
|
|
474
919
|
display: "flex",
|
|
@@ -477,52 +922,85 @@ function ee({ accent: o, p: n, font: t, onDone: u }) {
|
|
|
477
922
|
gap: 5,
|
|
478
923
|
padding: "8px 10px",
|
|
479
924
|
borderRadius: 9,
|
|
480
|
-
fontSize:
|
|
925
|
+
fontSize: 14,
|
|
481
926
|
fontWeight: 600,
|
|
482
927
|
cursor: "pointer",
|
|
483
|
-
background:
|
|
484
|
-
color:
|
|
485
|
-
border: `1px solid ${
|
|
928
|
+
background: c === u ? o : n.bg,
|
|
929
|
+
color: c === u ? "#fff" : n.textSoft,
|
|
930
|
+
border: `1px solid ${c === u ? o : n.border}`,
|
|
486
931
|
fontFamily: t
|
|
487
932
|
},
|
|
488
933
|
children: [
|
|
489
|
-
|
|
490
|
-
|
|
934
|
+
U[u].icon,
|
|
935
|
+
U[u].label
|
|
491
936
|
]
|
|
492
937
|
},
|
|
493
|
-
|
|
938
|
+
u
|
|
494
939
|
)) }),
|
|
495
|
-
/* @__PURE__ */ e(
|
|
940
|
+
/* @__PURE__ */ e(
|
|
941
|
+
"div",
|
|
942
|
+
{
|
|
943
|
+
style: {
|
|
944
|
+
fontSize: 10,
|
|
945
|
+
fontWeight: 700,
|
|
946
|
+
letterSpacing: ".08em",
|
|
947
|
+
color: n.textFaint,
|
|
948
|
+
marginBottom: 8,
|
|
949
|
+
textTransform: "uppercase"
|
|
950
|
+
},
|
|
951
|
+
children: "Title"
|
|
952
|
+
}
|
|
953
|
+
),
|
|
496
954
|
/* @__PURE__ */ e(
|
|
497
955
|
"input",
|
|
498
956
|
{
|
|
499
957
|
value: i,
|
|
500
|
-
onChange: (
|
|
958
|
+
onChange: (u) => r(u.target.value),
|
|
501
959
|
placeholder: "Short summary of the issue or idea",
|
|
502
960
|
maxLength: 200,
|
|
503
|
-
style: { ...
|
|
961
|
+
style: { ...v, marginBottom: 16, display: "block" }
|
|
962
|
+
}
|
|
963
|
+
),
|
|
964
|
+
/* @__PURE__ */ d(
|
|
965
|
+
"div",
|
|
966
|
+
{
|
|
967
|
+
style: {
|
|
968
|
+
fontSize: 10,
|
|
969
|
+
fontWeight: 700,
|
|
970
|
+
letterSpacing: ".08em",
|
|
971
|
+
color: n.textFaint,
|
|
972
|
+
marginBottom: 8,
|
|
973
|
+
textTransform: "uppercase"
|
|
974
|
+
},
|
|
975
|
+
children: [
|
|
976
|
+
"Description",
|
|
977
|
+
" ",
|
|
978
|
+
/* @__PURE__ */ e(
|
|
979
|
+
"span",
|
|
980
|
+
{
|
|
981
|
+
style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 },
|
|
982
|
+
children: "(optional)"
|
|
983
|
+
}
|
|
984
|
+
)
|
|
985
|
+
]
|
|
504
986
|
}
|
|
505
987
|
),
|
|
506
|
-
/* @__PURE__ */ s("div", { style: { fontSize: 10, fontWeight: 700, letterSpacing: ".08em", color: n.textFaint, marginBottom: 8, textTransform: "uppercase" }, children: [
|
|
507
|
-
"Description ",
|
|
508
|
-
/* @__PURE__ */ e("span", { style: { fontWeight: 400, textTransform: "none", letterSpacing: 0 }, children: "(optional)" })
|
|
509
|
-
] }),
|
|
510
988
|
/* @__PURE__ */ e(
|
|
511
989
|
"textarea",
|
|
512
990
|
{
|
|
513
991
|
value: l,
|
|
514
|
-
onChange: (
|
|
992
|
+
onChange: (u) => x(u.target.value),
|
|
515
993
|
placeholder: "Steps to reproduce, expected behaviour, or more context",
|
|
516
994
|
maxLength: 2e3,
|
|
517
995
|
rows: 4,
|
|
518
|
-
style: { ...
|
|
996
|
+
style: { ...v, resize: "vertical", marginBottom: 16 }
|
|
519
997
|
}
|
|
520
998
|
),
|
|
521
|
-
|
|
999
|
+
C && /* @__PURE__ */ e("p", { style: { fontSize: 14, color: "#d6453d", marginBottom: 12 }, children: C }),
|
|
522
1000
|
/* @__PURE__ */ e(
|
|
523
1001
|
"button",
|
|
524
1002
|
{
|
|
525
|
-
onClick:
|
|
1003
|
+
onClick: y,
|
|
526
1004
|
disabled: m || !i.trim(),
|
|
527
1005
|
style: {
|
|
528
1006
|
width: "100%",
|
|
@@ -542,36 +1020,81 @@ function ee({ accent: o, p: n, font: t, onDone: u }) {
|
|
|
542
1020
|
)
|
|
543
1021
|
] });
|
|
544
1022
|
}
|
|
545
|
-
const
|
|
1023
|
+
const U = {
|
|
546
1024
|
BUG: {
|
|
547
1025
|
label: "Bug",
|
|
548
|
-
icon: /* @__PURE__ */
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
1026
|
+
icon: /* @__PURE__ */ d(
|
|
1027
|
+
"svg",
|
|
1028
|
+
{
|
|
1029
|
+
width: 12,
|
|
1030
|
+
height: 12,
|
|
1031
|
+
viewBox: "0 0 16 16",
|
|
1032
|
+
fill: "none",
|
|
1033
|
+
stroke: "currentColor",
|
|
1034
|
+
strokeWidth: 1.8,
|
|
1035
|
+
strokeLinecap: "round",
|
|
1036
|
+
strokeLinejoin: "round",
|
|
1037
|
+
children: [
|
|
1038
|
+
/* @__PURE__ */ e("ellipse", { cx: "8", cy: "10", rx: "3.5", ry: "4.5" }),
|
|
1039
|
+
/* @__PURE__ */ e("path", { d: "M8 5.5V4M5.5 6.5 3.5 5M10.5 6.5 12.5 5M4.5 10.5 2.5 10M11.5 10.5 13.5 10" })
|
|
1040
|
+
]
|
|
1041
|
+
}
|
|
1042
|
+
)
|
|
552
1043
|
},
|
|
553
1044
|
FEATURE: {
|
|
554
1045
|
label: "Feature",
|
|
555
|
-
icon: /* @__PURE__ */
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
1046
|
+
icon: /* @__PURE__ */ d(
|
|
1047
|
+
"svg",
|
|
1048
|
+
{
|
|
1049
|
+
width: 12,
|
|
1050
|
+
height: 12,
|
|
1051
|
+
viewBox: "0 0 16 16",
|
|
1052
|
+
fill: "none",
|
|
1053
|
+
stroke: "currentColor",
|
|
1054
|
+
strokeWidth: 1.8,
|
|
1055
|
+
strokeLinecap: "round",
|
|
1056
|
+
strokeLinejoin: "round",
|
|
1057
|
+
children: [
|
|
1058
|
+
/* @__PURE__ */ e("path", { d: "M8 2v1.5M8 12.5V14M2 8h1.5M12.5 8H14M4.1 4.1l1 1M10.9 10.9l1 1M11.9 4.1l-1 1M5.1 10.9l-1 1" }),
|
|
1059
|
+
/* @__PURE__ */ e("circle", { cx: "8", cy: "8", r: "2.5" })
|
|
1060
|
+
]
|
|
1061
|
+
}
|
|
1062
|
+
)
|
|
559
1063
|
},
|
|
560
1064
|
GENERAL: {
|
|
561
1065
|
label: "General",
|
|
562
|
-
icon: /* @__PURE__ */ e(
|
|
1066
|
+
icon: /* @__PURE__ */ e(
|
|
1067
|
+
"svg",
|
|
1068
|
+
{
|
|
1069
|
+
width: 12,
|
|
1070
|
+
height: 12,
|
|
1071
|
+
viewBox: "0 0 16 16",
|
|
1072
|
+
fill: "none",
|
|
1073
|
+
stroke: "currentColor",
|
|
1074
|
+
strokeWidth: 1.8,
|
|
1075
|
+
strokeLinecap: "round",
|
|
1076
|
+
strokeLinejoin: "round",
|
|
1077
|
+
children: /* @__PURE__ */ e("path", { d: "M14 9a2 2 0 0 1-2 2H5L2 14V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5z" })
|
|
1078
|
+
}
|
|
1079
|
+
)
|
|
563
1080
|
}
|
|
564
1081
|
}, te = { BUG: "#fdecec", FEATURE: "#e9f0fd" }, ne = { BUG: "#d6453d", FEATURE: "#3b76d6" };
|
|
565
1082
|
function L({ type: o, p: n }) {
|
|
566
|
-
return /* @__PURE__ */ e(
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
1083
|
+
return /* @__PURE__ */ e(
|
|
1084
|
+
"span",
|
|
1085
|
+
{
|
|
1086
|
+
style: {
|
|
1087
|
+
padding: "2px 8px",
|
|
1088
|
+
borderRadius: 9999,
|
|
1089
|
+
fontSize: 10.5,
|
|
1090
|
+
fontWeight: 700,
|
|
1091
|
+
letterSpacing: ".02em",
|
|
1092
|
+
background: te[o] ?? n.bgSoft,
|
|
1093
|
+
color: ne[o] ?? n.textSoft
|
|
1094
|
+
},
|
|
1095
|
+
children: o
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
575
1098
|
}
|
|
576
1099
|
const oe = {
|
|
577
1100
|
OPEN: "#b45309",
|
|
@@ -580,33 +1103,125 @@ const oe = {
|
|
|
580
1103
|
CLOSED: "#6b7280"
|
|
581
1104
|
};
|
|
582
1105
|
function M() {
|
|
583
|
-
return /* @__PURE__ */
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
1106
|
+
return /* @__PURE__ */ d(
|
|
1107
|
+
"span",
|
|
1108
|
+
{
|
|
1109
|
+
style: {
|
|
1110
|
+
display: "inline-flex",
|
|
1111
|
+
alignItems: "center",
|
|
1112
|
+
gap: 4,
|
|
1113
|
+
background: "#fff7ed",
|
|
1114
|
+
border: "1px solid #fed7aa",
|
|
1115
|
+
borderRadius: 6,
|
|
1116
|
+
padding: "1px 6px",
|
|
1117
|
+
fontSize: 10,
|
|
1118
|
+
fontWeight: 700,
|
|
1119
|
+
color: "#ea580c"
|
|
1120
|
+
},
|
|
1121
|
+
children: [
|
|
1122
|
+
/* @__PURE__ */ e(
|
|
1123
|
+
"span",
|
|
1124
|
+
{
|
|
1125
|
+
style: {
|
|
1126
|
+
width: 5,
|
|
1127
|
+
height: 5,
|
|
1128
|
+
borderRadius: "50%",
|
|
1129
|
+
background: "#ea580c",
|
|
1130
|
+
display: "inline-block"
|
|
1131
|
+
}
|
|
1132
|
+
}
|
|
1133
|
+
),
|
|
1134
|
+
"Pending review"
|
|
1135
|
+
]
|
|
1136
|
+
}
|
|
1137
|
+
);
|
|
587
1138
|
}
|
|
588
1139
|
function A({
|
|
589
1140
|
status: o,
|
|
590
1141
|
boardStatus: n,
|
|
591
1142
|
p: t
|
|
592
1143
|
}) {
|
|
593
|
-
const
|
|
594
|
-
return /* @__PURE__ */
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
1144
|
+
const g = (n == null ? void 0 : n.color) ?? oe[o] ?? "#9ca3af";
|
|
1145
|
+
return /* @__PURE__ */ d(
|
|
1146
|
+
"span",
|
|
1147
|
+
{
|
|
1148
|
+
style: {
|
|
1149
|
+
display: "inline-flex",
|
|
1150
|
+
alignItems: "center",
|
|
1151
|
+
gap: 5,
|
|
1152
|
+
background: t.bgSoft,
|
|
1153
|
+
border: `1px solid ${t.border}`,
|
|
1154
|
+
borderRadius: 6,
|
|
1155
|
+
padding: "2px 8px",
|
|
1156
|
+
fontSize: 10,
|
|
1157
|
+
fontWeight: 600,
|
|
1158
|
+
color: t.textSoft
|
|
1159
|
+
},
|
|
1160
|
+
children: [
|
|
1161
|
+
/* @__PURE__ */ e(
|
|
1162
|
+
"span",
|
|
1163
|
+
{
|
|
1164
|
+
style: {
|
|
1165
|
+
width: 6,
|
|
1166
|
+
height: 6,
|
|
1167
|
+
borderRadius: "50%",
|
|
1168
|
+
background: g,
|
|
1169
|
+
display: "inline-block",
|
|
1170
|
+
flexShrink: 0
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
),
|
|
1174
|
+
(n == null ? void 0 : n.name) ?? o.replace("_", " ")
|
|
1175
|
+
]
|
|
1176
|
+
}
|
|
1177
|
+
);
|
|
598
1178
|
}
|
|
599
|
-
function re({
|
|
600
|
-
|
|
1179
|
+
function re({
|
|
1180
|
+
size: o = 16,
|
|
1181
|
+
color: n = "currentColor"
|
|
1182
|
+
}) {
|
|
1183
|
+
return /* @__PURE__ */ e(
|
|
1184
|
+
"svg",
|
|
1185
|
+
{
|
|
1186
|
+
width: o,
|
|
1187
|
+
height: o,
|
|
1188
|
+
viewBox: "0 0 24 24",
|
|
1189
|
+
fill: "none",
|
|
1190
|
+
stroke: n,
|
|
1191
|
+
strokeWidth: 2,
|
|
1192
|
+
strokeLinecap: "round",
|
|
1193
|
+
strokeLinejoin: "round",
|
|
1194
|
+
children: /* @__PURE__ */ e("path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z" })
|
|
1195
|
+
}
|
|
1196
|
+
);
|
|
601
1197
|
}
|
|
602
|
-
function D({
|
|
603
|
-
|
|
1198
|
+
function D({
|
|
1199
|
+
color: o = "currentColor",
|
|
1200
|
+
size: n = 11
|
|
1201
|
+
}) {
|
|
1202
|
+
return /* @__PURE__ */ e(
|
|
1203
|
+
"svg",
|
|
1204
|
+
{
|
|
1205
|
+
width: n,
|
|
1206
|
+
height: n,
|
|
1207
|
+
viewBox: "0 0 16 16",
|
|
1208
|
+
fill: "none",
|
|
1209
|
+
stroke: o,
|
|
1210
|
+
strokeWidth: 2.2,
|
|
1211
|
+
strokeLinecap: "round",
|
|
1212
|
+
strokeLinejoin: "round",
|
|
1213
|
+
children: /* @__PURE__ */ e("path", { d: "M8 13V3M3 8l5-5 5 5" })
|
|
1214
|
+
}
|
|
1215
|
+
);
|
|
604
1216
|
}
|
|
605
1217
|
function P(o) {
|
|
606
|
-
return new Date(o).toLocaleDateString(void 0, {
|
|
1218
|
+
return new Date(o).toLocaleDateString(void 0, {
|
|
1219
|
+
month: "short",
|
|
1220
|
+
day: "numeric"
|
|
1221
|
+
});
|
|
607
1222
|
}
|
|
608
1223
|
export {
|
|
609
1224
|
ae as FeedbackWidget,
|
|
610
1225
|
de as UpstepProvider,
|
|
611
|
-
|
|
1226
|
+
I as useUpstep
|
|
612
1227
|
};
|