@lokalise/harmony 1.20.3 → 1.21.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/harmony.cjs +1 -1
- package/dist/harmony.mjs +375 -368
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +1 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +70 -10
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +16 -3
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +1 -1
- package/dist/types/src/features/publicApi/projects.d.ts +10 -10
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +93 -8
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +6 -6
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
var en = Object.defineProperty;
|
2
2
|
var tn = (e, t, n) => t in e ? en(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var ne = (e, t, n) => tn(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
-
import { jsx as s, jsxs as
|
4
|
+
import { jsx as s, jsxs as p, Fragment as Ue } from "react/jsx-runtime";
|
5
5
|
import * as K from "react";
|
6
6
|
import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as Pt, cloneElement as nn, Fragment as At, forwardRef as rn } from "react";
|
7
|
-
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as
|
7
|
+
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as on, Alert as sn, Tag as Ne, Button as Oe, Loading as cn, Popover as ln, JobIcon as dn } from "@lokalise/louis";
|
8
8
|
import { format as It, parseISO as un, isThisSecond as mn } from "date-fns";
|
9
9
|
import { toZonedTime as _n } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
11
|
import { buildPayloadRoute as He } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
12
12
|
import { sendByPayloadRoute as D, sendByGetRoute as Q } from "@lokalise/frontend-http-client";
|
13
13
|
import { useQuery as $, useMutation as Be } from "@tanstack/react-query";
|
14
|
-
import { buildGetRoute as Y, buildPayloadRoute as
|
14
|
+
import { buildGetRoute as Y, buildPayloadRoute as jt } from "@lokalise/universal-ts-utils/node";
|
15
15
|
const xe = {
|
16
16
|
Completed: "completed",
|
17
17
|
InProgress: "in_progress",
|
@@ -27,7 +27,7 @@ const xe = {
|
|
27
27
|
automatic_translation: "automatic_translation"
|
28
28
|
};
|
29
29
|
var ae = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
30
|
-
function
|
30
|
+
function Nt(e) {
|
31
31
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
32
32
|
}
|
33
33
|
var ge, Qe;
|
@@ -40,22 +40,22 @@ function qe() {
|
|
40
40
|
}
|
41
41
|
return ge = e, ge;
|
42
42
|
}
|
43
|
-
var
|
43
|
+
var fe, Ye;
|
44
44
|
function gn() {
|
45
|
-
if (Ye) return
|
45
|
+
if (Ye) return fe;
|
46
46
|
Ye = 1;
|
47
47
|
var e = typeof ae == "object" && ae && ae.Object === Object && ae;
|
48
|
-
return
|
48
|
+
return fe = e, fe;
|
49
49
|
}
|
50
|
-
var
|
50
|
+
var pe, Xe;
|
51
51
|
function Ot() {
|
52
|
-
if (Xe) return
|
52
|
+
if (Xe) return pe;
|
53
53
|
Xe = 1;
|
54
54
|
var e = gn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
|
-
return
|
55
|
+
return pe = n, pe;
|
56
56
|
}
|
57
57
|
var he, Ve;
|
58
|
-
function
|
58
|
+
function fn() {
|
59
59
|
if (Ve) return he;
|
60
60
|
Ve = 1;
|
61
61
|
var e = Ot(), t = function() {
|
@@ -64,7 +64,7 @@ function pn() {
|
|
64
64
|
return he = t, he;
|
65
65
|
}
|
66
66
|
var be, Ze;
|
67
|
-
function
|
67
|
+
function pn() {
|
68
68
|
if (Ze) return be;
|
69
69
|
Ze = 1;
|
70
70
|
var e = /\s/;
|
@@ -75,22 +75,22 @@ function fn() {
|
|
75
75
|
}
|
76
76
|
return be = t, be;
|
77
77
|
}
|
78
|
-
var
|
78
|
+
var Te, et;
|
79
79
|
function hn() {
|
80
|
-
if (et) return
|
80
|
+
if (et) return Te;
|
81
81
|
et = 1;
|
82
|
-
var e =
|
82
|
+
var e = pn(), t = /^\s+/;
|
83
83
|
function n(a) {
|
84
84
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
85
85
|
}
|
86
|
-
return
|
86
|
+
return Te = n, Te;
|
87
87
|
}
|
88
|
-
var
|
88
|
+
var ve, tt;
|
89
89
|
function xt() {
|
90
|
-
if (tt) return
|
90
|
+
if (tt) return ve;
|
91
91
|
tt = 1;
|
92
92
|
var e = Ot(), t = e.Symbol;
|
93
|
-
return
|
93
|
+
return ve = t, ve;
|
94
94
|
}
|
95
95
|
var ye, nt;
|
96
96
|
function bn() {
|
@@ -109,25 +109,25 @@ function bn() {
|
|
109
109
|
}
|
110
110
|
return ye = i, ye;
|
111
111
|
}
|
112
|
-
var
|
113
|
-
function
|
114
|
-
if (rt) return
|
112
|
+
var Ee, rt;
|
113
|
+
function Tn() {
|
114
|
+
if (rt) return Ee;
|
115
115
|
rt = 1;
|
116
116
|
var e = Object.prototype, t = e.toString;
|
117
117
|
function n(a) {
|
118
118
|
return t.call(a);
|
119
119
|
}
|
120
|
-
return
|
120
|
+
return Ee = n, Ee;
|
121
121
|
}
|
122
|
-
var
|
123
|
-
function
|
124
|
-
if (at) return
|
122
|
+
var Se, at;
|
123
|
+
function vn() {
|
124
|
+
if (at) return Se;
|
125
125
|
at = 1;
|
126
|
-
var e = xt(), t = bn(), n =
|
126
|
+
var e = xt(), t = bn(), n = Tn(), a = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
127
|
function c(d) {
|
128
128
|
return d == null ? d === void 0 ? o : a : i && i in Object(d) ? t(d) : n(d);
|
129
129
|
}
|
130
|
-
return
|
130
|
+
return Se = c, Se;
|
131
131
|
}
|
132
132
|
var Ce, ot;
|
133
133
|
function yn() {
|
@@ -139,20 +139,20 @@ function yn() {
|
|
139
139
|
return Ce = e, Ce;
|
140
140
|
}
|
141
141
|
var we, st;
|
142
|
-
function
|
142
|
+
function En() {
|
143
143
|
if (st) return we;
|
144
144
|
st = 1;
|
145
|
-
var e =
|
145
|
+
var e = vn(), t = yn(), n = "[object Symbol]";
|
146
146
|
function a(o) {
|
147
147
|
return typeof o == "symbol" || t(o) && e(o) == n;
|
148
148
|
}
|
149
149
|
return we = a, we;
|
150
150
|
}
|
151
151
|
var Pe, it;
|
152
|
-
function
|
152
|
+
function Sn() {
|
153
153
|
if (it) return Pe;
|
154
154
|
it = 1;
|
155
|
-
var e = hn(), t = qe(), n =
|
155
|
+
var e = hn(), t = qe(), n = En(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
|
156
156
|
function u(l) {
|
157
157
|
if (typeof l == "number")
|
158
158
|
return l;
|
@@ -174,49 +174,49 @@ var Ae, ct;
|
|
174
174
|
function Lt() {
|
175
175
|
if (ct) return Ae;
|
176
176
|
ct = 1;
|
177
|
-
var e = qe(), t =
|
177
|
+
var e = qe(), t = fn(), n = Sn(), a = "Expected a function", o = Math.max, i = Math.min;
|
178
178
|
function c(d, u, l) {
|
179
|
-
var m, g,
|
179
|
+
var m, g, v, y, _, S, b = 0, f = !1, h = !1, T = !0;
|
180
180
|
if (typeof d != "function")
|
181
181
|
throw new TypeError(a);
|
182
|
-
u = n(u) || 0, e(l) && (
|
183
|
-
function w(
|
184
|
-
var
|
185
|
-
return m = g = void 0, b =
|
182
|
+
u = n(u) || 0, e(l) && (f = !!l.leading, h = "maxWait" in l, v = h ? o(n(l.maxWait) || 0, u) : v, T = "trailing" in l ? !!l.trailing : T);
|
183
|
+
function w(E) {
|
184
|
+
var N = m, G = g;
|
185
|
+
return m = g = void 0, b = E, y = d.apply(G, N), y;
|
186
186
|
}
|
187
|
-
function C(
|
188
|
-
return b =
|
187
|
+
function C(E) {
|
188
|
+
return b = E, _ = setTimeout(te, u), f ? w(E) : y;
|
189
189
|
}
|
190
|
-
function ee(
|
191
|
-
var
|
192
|
-
return h ? i(Je,
|
190
|
+
function ee(E) {
|
191
|
+
var N = E - S, G = E - b, Je = u - N;
|
192
|
+
return h ? i(Je, v - G) : Je;
|
193
193
|
}
|
194
|
-
function Ke(
|
195
|
-
var
|
196
|
-
return
|
194
|
+
function Ke(E) {
|
195
|
+
var N = E - S, G = E - b;
|
196
|
+
return S === void 0 || N >= u || N < 0 || h && G >= v;
|
197
197
|
}
|
198
198
|
function te() {
|
199
|
-
var
|
200
|
-
if (Ke(
|
201
|
-
return ze(
|
202
|
-
_ = setTimeout(te, ee(
|
199
|
+
var E = t();
|
200
|
+
if (Ke(E))
|
201
|
+
return ze(E);
|
202
|
+
_ = setTimeout(te, ee(E));
|
203
203
|
}
|
204
|
-
function ze(
|
205
|
-
return _ = void 0,
|
204
|
+
function ze(E) {
|
205
|
+
return _ = void 0, T && m ? w(E) : (m = g = void 0, y);
|
206
206
|
}
|
207
207
|
function Vt() {
|
208
|
-
_ !== void 0 && clearTimeout(_), b = 0, m =
|
208
|
+
_ !== void 0 && clearTimeout(_), b = 0, m = S = g = _ = void 0;
|
209
209
|
}
|
210
210
|
function Zt() {
|
211
211
|
return _ === void 0 ? y : ze(t());
|
212
212
|
}
|
213
213
|
function _e() {
|
214
|
-
var
|
215
|
-
if (m = arguments, g = this,
|
214
|
+
var E = t(), N = Ke(E);
|
215
|
+
if (m = arguments, g = this, S = E, N) {
|
216
216
|
if (_ === void 0)
|
217
|
-
return C(
|
217
|
+
return C(S);
|
218
218
|
if (h)
|
219
|
-
return clearTimeout(_), _ = setTimeout(te, u), w(
|
219
|
+
return clearTimeout(_), _ = setTimeout(te, u), w(S);
|
220
220
|
}
|
221
221
|
return _ === void 0 && (_ = setTimeout(te, u)), y;
|
222
222
|
}
|
@@ -225,10 +225,10 @@ function Lt() {
|
|
225
225
|
return Ae = c, Ae;
|
226
226
|
}
|
227
227
|
var Cn = Lt();
|
228
|
-
const wn = /* @__PURE__ */
|
229
|
-
var
|
228
|
+
const wn = /* @__PURE__ */ Nt(Cn);
|
229
|
+
var Re, lt;
|
230
230
|
function Pn() {
|
231
|
-
if (lt) return
|
231
|
+
if (lt) return Re;
|
232
232
|
lt = 1;
|
233
233
|
var e = Lt(), t = qe(), n = "Expected a function";
|
234
234
|
function a(o, i, c) {
|
@@ -241,15 +241,15 @@ function Pn() {
|
|
241
241
|
trailing: u
|
242
242
|
});
|
243
243
|
}
|
244
|
-
return
|
244
|
+
return Re = a, Re;
|
245
245
|
}
|
246
246
|
var An = Pn();
|
247
|
-
const
|
247
|
+
const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
248
248
|
switch (t) {
|
249
249
|
case "debounce":
|
250
250
|
return wn(e, n, a);
|
251
251
|
case "throttle":
|
252
|
-
return
|
252
|
+
return Rn(e, n, a);
|
253
253
|
default:
|
254
254
|
return e;
|
255
255
|
}
|
@@ -264,7 +264,7 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
264
264
|
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
|
265
265
|
}, []);
|
266
266
|
}
|
267
|
-
),
|
267
|
+
), jn = (
|
268
268
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
269
|
(e) => {
|
270
270
|
const [t, n] = K.useState((e == null ? void 0 : e.current) || null);
|
@@ -281,7 +281,7 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
281
281
|
}
|
282
282
|
}), [t]), refElement: t, setRefElement: n };
|
283
283
|
}
|
284
|
-
),
|
284
|
+
), Nn = (e, t) => t === "border-box" ? {
|
285
285
|
width: e.borderBoxSize[0].inlineSize,
|
286
286
|
height: e.borderBoxSize[0].blockSize
|
287
287
|
} : t === "content-box" ? {
|
@@ -292,26 +292,26 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
294
|
function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: d, onResize: u } = {}) {
|
295
|
-
const l = Ct(e), m = In(u), [g,
|
295
|
+
const l = Ct(e), m = In(u), [g, v] = I({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: _ } =
|
298
|
+
}), { refProxy: y, refElement: _ } = jn(c), { box: S } = d || {}, b = We((h) => {
|
299
299
|
if (!o && !i)
|
300
300
|
return;
|
301
301
|
if (l.current) {
|
302
302
|
l.current = !1;
|
303
303
|
return;
|
304
304
|
}
|
305
|
-
const
|
305
|
+
const T = (w, C) => o && w.width !== C.width || i && w.height !== C.height;
|
306
306
|
h.forEach((w) => {
|
307
|
-
const C =
|
308
|
-
|
307
|
+
const C = Nn(w, S);
|
308
|
+
v((ee) => T(ee, C) ? (m == null || m({
|
309
309
|
width: C.width,
|
310
310
|
height: C.height,
|
311
311
|
entry: w
|
312
312
|
}), C) : ee);
|
313
313
|
});
|
314
|
-
}, [o, i, l,
|
314
|
+
}, [o, i, l, S]), f = We(kn(b, t, n, a), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
@@ -319,15 +319,15 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
319
319
|
]);
|
320
320
|
return J(() => {
|
321
321
|
let h;
|
322
|
-
return _ ? (h = new window.ResizeObserver(
|
322
|
+
return _ ? (h = new window.ResizeObserver(f), h.observe(_, d)) : (g.width || g.height) && (m == null || m({
|
323
323
|
width: null,
|
324
324
|
height: null,
|
325
325
|
entry: null
|
326
|
-
}),
|
327
|
-
var
|
328
|
-
(
|
326
|
+
}), v({ width: void 0, height: void 0 })), () => {
|
327
|
+
var T, w, C;
|
328
|
+
(T = h == null ? void 0 : h.disconnect) === null || T === void 0 || T.call(h), (C = (w = f).cancel) === null || C === void 0 || C.call(w);
|
329
329
|
};
|
330
|
-
}, [
|
330
|
+
}, [f, _]), Object.assign({ ref: y }, g);
|
331
331
|
}
|
332
332
|
function Mt(e) {
|
333
333
|
var t, n, a = "";
|
@@ -338,7 +338,7 @@ function Mt(e) {
|
|
338
338
|
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
339
339
|
return a;
|
340
340
|
}
|
341
|
-
function
|
341
|
+
function j() {
|
342
342
|
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Mt(e)) && (a && (a += " "), a += t);
|
343
343
|
return a;
|
344
344
|
}
|
@@ -360,11 +360,11 @@ const xn = "_headerContainer_1cubo_1", Ln = "_navigationTabList_1cubo_8", Mn = "
|
|
360
360
|
return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
|
361
361
|
}, []);
|
362
362
|
const d = `${a || Bn}px`;
|
363
|
-
return /* @__PURE__ */ s("div", { style: { minHeight: d }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */
|
363
|
+
return /* @__PURE__ */ s("div", { style: { minHeight: d }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ p(
|
364
364
|
"div",
|
365
365
|
{
|
366
366
|
ref: n,
|
367
|
-
className:
|
367
|
+
className: j(B.headerContent, {
|
368
368
|
[B.staticEnabled]: c()
|
369
369
|
}),
|
370
370
|
children: [
|
@@ -392,7 +392,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
392
392
|
}, Jn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
393
393
|
M,
|
394
394
|
{
|
395
|
-
className:
|
395
|
+
className: j(dt.link, {
|
396
396
|
[dt.active]: window.location.pathname.startsWith(t)
|
397
397
|
}),
|
398
398
|
href: t,
|
@@ -408,7 +408,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
408
408
|
"button",
|
409
409
|
{
|
410
410
|
type: "button",
|
411
|
-
className:
|
411
|
+
className: j(ut.dropdownButton, {
|
412
412
|
[ut.dropdownButtonActive]: n
|
413
413
|
}),
|
414
414
|
children: /* @__PURE__ */ s(t, { size: "25px" })
|
@@ -422,7 +422,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
422
422
|
"div",
|
423
423
|
{
|
424
424
|
"aria-label": "Upgrade Icon",
|
425
|
-
className:
|
425
|
+
className: j(
|
426
426
|
Vn.iconContainer,
|
427
427
|
"flex-row",
|
428
428
|
"items-center",
|
@@ -454,12 +454,12 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
454
454
|
return /* @__PURE__ */ s(
|
455
455
|
ce,
|
456
456
|
{
|
457
|
-
menuButton: () => /* @__PURE__ */
|
457
|
+
menuButton: () => /* @__PURE__ */ p("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
458
458
|
t != null && t.logoUrl ? /* @__PURE__ */ s(
|
459
459
|
"img",
|
460
460
|
{
|
461
461
|
src: t.logoUrl,
|
462
|
-
className:
|
462
|
+
className: j(x.profileImage, {
|
463
463
|
[x.profileImageHighlight]: a
|
464
464
|
}),
|
465
465
|
alt: "Team Logo"
|
@@ -467,10 +467,10 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
467
467
|
) : /* @__PURE__ */ s(
|
468
468
|
"div",
|
469
469
|
{
|
470
|
-
className:
|
470
|
+
className: j(x.userIconWrapper, "flex-row", "align-center", "items-center", {
|
471
471
|
[x.profileImageHighlight]: a
|
472
472
|
}),
|
473
|
-
children: /* @__PURE__ */ s(
|
473
|
+
children: /* @__PURE__ */ s(Rt, { size: "25px" })
|
474
474
|
}
|
475
475
|
),
|
476
476
|
a && /* @__PURE__ */ s(Ut, { className: x.profileImageUpgradeIcon })
|
@@ -487,7 +487,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
487
487
|
}) })
|
488
488
|
}
|
489
489
|
);
|
490
|
-
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], dr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Bt, Dt = (e) => e === sr,
|
490
|
+
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], dr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Bt, Dt = (e) => e === sr, zo = (e) => ir.includes(e), Jo = (e) => cr.includes(e), Wo = (e) => lr.includes(e), Qo = (e) => dr.includes(e), Yo = (e) => e > Bt && e < qt, Xo = (e) => e === qt, ur = /\n/, mt = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [nn(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), mr = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((a) => typeof a == "string" ? mt(a, t, n) : a), _r = (e) => mr(e, ur, /* @__PURE__ */ s("br", {})), gr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, fr = (e) => e.match(gr) ?? [], _t = (e, t, n) => {
|
491
491
|
const a = e.split(t);
|
492
492
|
if (a.length === 1)
|
493
493
|
return e;
|
@@ -496,40 +496,40 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
496
496
|
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
497
497
|
), o.push(a.join(t)), o.filter((i) => i !== "");
|
498
498
|
}, gt = (e) => {
|
499
|
-
const t =
|
499
|
+
const t = fr(e);
|
500
500
|
return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? _t(n, a, o) : n.flatMap((i) => typeof i == "string" ? _t(i, a, o) : i), e) : e;
|
501
|
-
},
|
501
|
+
}, pr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t), Vo = (e, t, n = "PP") => It(_n(e, t), n), $e = (e) => {
|
502
502
|
J(e, []);
|
503
|
-
},
|
503
|
+
}, ft = {
|
504
504
|
biller: "biller",
|
505
505
|
owner: "owner"
|
506
|
-
},
|
507
|
-
|
508
|
-
|
506
|
+
}, pt = [
|
507
|
+
ft.biller,
|
508
|
+
ft.owner
|
509
509
|
], br = ({ children: e, config: t }) => {
|
510
|
-
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((
|
510
|
+
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((f) => f.id === a), l = n.filter((f) => f.id !== a), m = pt.includes(d), g = pt.includes(d), v = De(o) || Dt(o), b = {
|
511
511
|
...t,
|
512
512
|
currentTeam: u,
|
513
513
|
otherTeams: l,
|
514
514
|
canChangeBilling: m,
|
515
515
|
canAccessTeamSettings: g,
|
516
|
-
isOnFreeOrTrialPlan:
|
517
|
-
showUpgradeCta: c &&
|
516
|
+
isOnFreeOrTrialPlan: v,
|
517
|
+
showUpgradeCta: c && v && m,
|
518
518
|
showBillingButton: c && g && m,
|
519
519
|
allowTeamCreation: c && !i
|
520
520
|
};
|
521
521
|
return /* @__PURE__ */ s(Ht.Provider, { value: b, children: e });
|
522
|
-
},
|
523
|
-
container:
|
522
|
+
}, Tr = ({ config: e, children: t }) => /* @__PURE__ */ s(br, { config: e, children: /* @__PURE__ */ s(or, { children: t }) }), vr = "_container_q5pot_1", yr = "_profileEmail_q5pot_5", ht = {
|
523
|
+
container: vr,
|
524
524
|
profileEmail: yr
|
525
|
-
},
|
525
|
+
}, Er = ({
|
526
526
|
href: e,
|
527
527
|
onClick: t,
|
528
528
|
userEmail: n,
|
529
529
|
hideBottomDivider: a
|
530
530
|
}) => {
|
531
531
|
const { isEndOfTrialActive: o, isTeamSuspended: i } = X();
|
532
|
-
return o || i ? null : /* @__PURE__ */
|
532
|
+
return o || i ? null : /* @__PURE__ */ p(Ue, { children: [
|
533
533
|
/* @__PURE__ */ s(
|
534
534
|
W,
|
535
535
|
{
|
@@ -537,37 +537,37 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
537
537
|
onClick: () => {
|
538
538
|
t == null || t();
|
539
539
|
},
|
540
|
-
children: /* @__PURE__ */
|
540
|
+
children: /* @__PURE__ */ p("div", { className: `flex-col ${ht.container}`, children: [
|
541
541
|
/* @__PURE__ */ s("span", { children: "Profile Settings" }),
|
542
542
|
/* @__PURE__ */ s("span", { className: ht.profileEmail, children: n })
|
543
543
|
] })
|
544
544
|
}
|
545
545
|
),
|
546
|
-
!a && /* @__PURE__ */ s(
|
546
|
+
!a && /* @__PURE__ */ s(kt, {})
|
547
547
|
] });
|
548
|
-
},
|
549
|
-
wrapper:
|
548
|
+
}, Sr = "_wrapper_1in7x_5", Cr = "_profileImage_1in7x_11", wr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", Ar = "_teamName_1in7x_36", Rr = "_planLabel_1in7x_45", kr = "_membership_1in7x_53", Ir = "_defaultProfileImage_1in7x_59", O = {
|
549
|
+
wrapper: Sr,
|
550
550
|
profileImage: Cr,
|
551
551
|
teamDetails: wr,
|
552
552
|
planWrapper: Pr,
|
553
553
|
teamName: Ar,
|
554
|
-
planLabel:
|
555
|
-
membership:
|
554
|
+
planLabel: Rr,
|
555
|
+
membership: kr,
|
556
556
|
defaultProfileImage: Ir
|
557
557
|
}, $t = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
558
558
|
const { currentTeam: a, planId: o } = X(), i = e || a;
|
559
559
|
if (!i)
|
560
560
|
return null;
|
561
561
|
const c = De(o) ? "Free" : Dt(o) ? "Trial" : void 0;
|
562
|
-
return /* @__PURE__ */
|
562
|
+
return /* @__PURE__ */ p(
|
563
563
|
t ? W : "div",
|
564
564
|
{
|
565
565
|
className: O.wrapper,
|
566
566
|
...t && { onClick: () => t(i) },
|
567
567
|
children: [
|
568
|
-
i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(
|
569
|
-
/* @__PURE__ */
|
570
|
-
/* @__PURE__ */
|
568
|
+
i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(Rt, { size: "25px" }) }),
|
569
|
+
/* @__PURE__ */ p("div", { className: O.teamDetails, children: [
|
570
|
+
/* @__PURE__ */ p("div", { className: O.planWrapper, children: [
|
571
571
|
/* @__PURE__ */ s("span", { className: O.teamName, children: i.name }),
|
572
572
|
c && !n && /* @__PURE__ */ s("span", { className: `${O.planLabel}`, children: c })
|
573
573
|
] }),
|
@@ -576,19 +576,19 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
576
576
|
]
|
577
577
|
}
|
578
578
|
);
|
579
|
-
},
|
580
|
-
teamsContainer:
|
579
|
+
}, jr = "_teamsContainer_1ncrr_5", Nr = {
|
580
|
+
teamsContainer: jr
|
581
581
|
}, Or = ({ onSwitchTeam: e }) => {
|
582
582
|
const { otherTeams: t } = X();
|
583
583
|
return t.length === 0 ? null : /* @__PURE__ */ s(
|
584
584
|
"div",
|
585
585
|
{
|
586
586
|
"data-testid": "sidebar-team-switch",
|
587
|
-
className: `flex-col items-stretch ${
|
587
|
+
className: `flex-col items-stretch ${Nr.teamsContainer}`,
|
588
588
|
children: t.map((n) => /* @__PURE__ */ s($t, { team: n, onClick: e, hidePlanLabel: !0 }, n.id))
|
589
589
|
}
|
590
590
|
);
|
591
|
-
}, xr = "_container_1u995_1", Lr = "_planCta_1u995_15", Mr = "_upgradeIconWrapper_1u995_19",
|
591
|
+
}, xr = "_container_1u995_1", Lr = "_planCta_1u995_15", Mr = "_upgradeIconWrapper_1u995_19", ke = {
|
592
592
|
container: xr,
|
593
593
|
planCta: Lr,
|
594
594
|
upgradeIconWrapper: Mr
|
@@ -597,15 +597,15 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
597
597
|
if (!a)
|
598
598
|
return null;
|
599
599
|
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
600
|
-
return /* @__PURE__ */
|
600
|
+
return /* @__PURE__ */ p(
|
601
601
|
W,
|
602
602
|
{
|
603
603
|
"data-testid": "sidebar-upgrade-menu-item",
|
604
604
|
href: e,
|
605
|
-
className: `flex-col gap-1 items-start ${
|
605
|
+
className: `flex-col gap-1 items-start ${ke.container}`,
|
606
606
|
children: [
|
607
|
-
/* @__PURE__ */ s("span", { className:
|
608
|
-
/* @__PURE__ */
|
607
|
+
/* @__PURE__ */ s("span", { className: ke.planCta, children: c }),
|
608
|
+
/* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${ke.upgradeIconWrapper}`, children: [
|
609
609
|
/* @__PURE__ */ s(Ut, {}),
|
610
610
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
611
611
|
] })
|
@@ -645,7 +645,7 @@ function Gr(e) {
|
|
645
645
|
left: e
|
646
646
|
};
|
647
647
|
}
|
648
|
-
function
|
648
|
+
function Tt(e) {
|
649
649
|
const {
|
650
650
|
x: t,
|
651
651
|
y: n,
|
@@ -677,9 +677,9 @@ async function Fr(e, t) {
|
|
677
677
|
boundary: l = "clippingAncestors",
|
678
678
|
rootBoundary: m = "viewport",
|
679
679
|
elementContext: g = "floating",
|
680
|
-
altBoundary:
|
680
|
+
altBoundary: v = !1,
|
681
681
|
padding: y = 0
|
682
|
-
} = Gt(t, e), _ = Gr(y), b = d[
|
682
|
+
} = Gt(t, e), _ = Gr(y), b = d[v ? g === "floating" ? "reference" : "floating" : g], f = Tt(await i.getClippingRect({
|
683
683
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(d.floating)),
|
684
684
|
boundary: l,
|
685
685
|
rootBoundary: m,
|
@@ -689,23 +689,23 @@ async function Fr(e, t) {
|
|
689
689
|
y: o,
|
690
690
|
width: c.floating.width,
|
691
691
|
height: c.floating.height
|
692
|
-
} : c.reference,
|
692
|
+
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d.floating)), w = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
|
693
693
|
x: 1,
|
694
694
|
y: 1
|
695
695
|
} : {
|
696
696
|
x: 1,
|
697
697
|
y: 1
|
698
|
-
}, C =
|
698
|
+
}, C = Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
699
699
|
elements: d,
|
700
700
|
rect: h,
|
701
|
-
offsetParent:
|
701
|
+
offsetParent: T,
|
702
702
|
strategy: u
|
703
703
|
}) : h);
|
704
704
|
return {
|
705
|
-
top: (
|
706
|
-
bottom: (C.bottom -
|
707
|
-
left: (
|
708
|
-
right: (C.right -
|
705
|
+
top: (f.top - C.top + _.top) / w.y,
|
706
|
+
bottom: (C.bottom - f.bottom + _.bottom) / w.y,
|
707
|
+
left: (f.left - C.left + _.left) / w.x,
|
708
|
+
right: (C.right - f.right + _.right) / w.x
|
709
709
|
};
|
710
710
|
}
|
711
711
|
const Kr = function(e) {
|
@@ -723,11 +723,11 @@ const Kr = function(e) {
|
|
723
723
|
limiter: d = {
|
724
724
|
fn: (b) => {
|
725
725
|
let {
|
726
|
-
x:
|
726
|
+
x: f,
|
727
727
|
y: h
|
728
728
|
} = b;
|
729
729
|
return {
|
730
|
-
x:
|
730
|
+
x: f,
|
731
731
|
y: h
|
732
732
|
};
|
733
733
|
}
|
@@ -736,28 +736,28 @@ const Kr = function(e) {
|
|
736
736
|
} = Gt(e, t), l = {
|
737
737
|
x: n,
|
738
738
|
y: a
|
739
|
-
}, m = await Fr(t, u), g = Dr(Ft(o)),
|
740
|
-
let y = l[
|
739
|
+
}, m = await Fr(t, u), g = Dr(Ft(o)), v = qr(g);
|
740
|
+
let y = l[v], _ = l[g];
|
741
741
|
if (i) {
|
742
|
-
const b =
|
743
|
-
y = bt(h, y,
|
742
|
+
const b = v === "y" ? "top" : "left", f = v === "y" ? "bottom" : "right", h = y + m[b], T = y - m[f];
|
743
|
+
y = bt(h, y, T);
|
744
744
|
}
|
745
745
|
if (c) {
|
746
|
-
const b = g === "y" ? "top" : "left",
|
747
|
-
_ = bt(h, _,
|
746
|
+
const b = g === "y" ? "top" : "left", f = g === "y" ? "bottom" : "right", h = _ + m[b], T = _ - m[f];
|
747
|
+
_ = bt(h, _, T);
|
748
748
|
}
|
749
|
-
const
|
749
|
+
const S = d.fn({
|
750
750
|
...t,
|
751
|
-
[
|
751
|
+
[v]: y,
|
752
752
|
[g]: _
|
753
753
|
});
|
754
754
|
return {
|
755
|
-
...
|
755
|
+
...S,
|
756
756
|
data: {
|
757
|
-
x:
|
758
|
-
y:
|
757
|
+
x: S.x - n,
|
758
|
+
y: S.y - a,
|
759
759
|
enabled: {
|
760
|
-
[
|
760
|
+
[v]: i,
|
761
761
|
[g]: c
|
762
762
|
}
|
763
763
|
}
|
@@ -801,11 +801,11 @@ const Kr = function(e) {
|
|
801
801
|
A.Completed
|
802
802
|
];
|
803
803
|
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Xr(n) })).sort((n, a) => n.status === A.InProgress && n.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : n.status === a.status ? n.name < a.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(a.status));
|
804
|
-
},
|
804
|
+
}, vt = (e) => [xe.InProgress, xe.Created].includes(e), ea = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, ta = ({ task: e, language: t }) => {
|
805
805
|
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = V(), u = () => {
|
806
806
|
i(!1);
|
807
807
|
};
|
808
|
-
return /* @__PURE__ */
|
808
|
+
return /* @__PURE__ */ p(Ue, { children: [
|
809
809
|
o && /* @__PURE__ */ s(
|
810
810
|
on,
|
811
811
|
{
|
@@ -818,7 +818,7 @@ const Kr = function(e) {
|
|
818
818
|
onConfirm: async () => {
|
819
819
|
a(!0), await c({ task: e, language: t, closePrompt: u }), d();
|
820
820
|
},
|
821
|
-
children: /* @__PURE__ */
|
821
|
+
children: /* @__PURE__ */ p(sn, { status: "info", children: [
|
822
822
|
"Make sure you are finished and ",
|
823
823
|
/* @__PURE__ */ s("strong", { children: "mark it as done" }),
|
824
824
|
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
@@ -836,17 +836,17 @@ const Kr = function(e) {
|
|
836
836
|
}
|
837
837
|
)
|
838
838
|
] });
|
839
|
-
}, na = "_langRowCompleted_vpgdi_1", ra = "_langCellSecondary_vpgdi_15", aa = "_langStatus_vpgdi_20",
|
839
|
+
}, na = "_langRowCompleted_vpgdi_1", ra = "_langCellSecondary_vpgdi_15", aa = "_langStatus_vpgdi_20", je = {
|
840
840
|
langRowCompleted: na,
|
841
841
|
langCellSecondary: ra,
|
842
842
|
langStatus: aa
|
843
843
|
}, oa = ({ language: e, task: t }) => {
|
844
844
|
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = V(), i = e.progress ?? 0, c = e.status === A.Completed, d = ea(t, e);
|
845
|
-
return /* @__PURE__ */
|
845
|
+
return /* @__PURE__ */ p(
|
846
846
|
"tr",
|
847
847
|
{
|
848
|
-
className:
|
849
|
-
[
|
848
|
+
className: j({
|
849
|
+
[je.langRowCompleted]: d
|
850
850
|
}),
|
851
851
|
children: [
|
852
852
|
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
@@ -859,7 +859,7 @@ const Kr = function(e) {
|
|
859
859
|
children: e.name
|
860
860
|
}
|
861
861
|
) }) }),
|
862
|
-
/* @__PURE__ */ s("td", { className:
|
862
|
+
/* @__PURE__ */ s("td", { className: je.langCellSecondary, children: d || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
863
863
|
M,
|
864
864
|
{
|
865
865
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
@@ -869,14 +869,14 @@ const Kr = function(e) {
|
|
869
869
|
children: e.base_words_total - e.base_words_done
|
870
870
|
}
|
871
871
|
) }) }),
|
872
|
-
/* @__PURE__ */
|
872
|
+
/* @__PURE__ */ p("td", { children: [
|
873
873
|
i,
|
874
874
|
"%"
|
875
875
|
] }),
|
876
876
|
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(ta, { task: t, language: e }) : /* @__PURE__ */ s(
|
877
877
|
"span",
|
878
878
|
{
|
879
|
-
className: `${
|
879
|
+
className: `${je.langStatus} flex-row items-center justify-start`,
|
880
880
|
"data-status": e.status,
|
881
881
|
children: Yr(e.status, i)
|
882
882
|
}
|
@@ -898,11 +898,11 @@ const Kr = function(e) {
|
|
898
898
|
"noopener,noreferrer"
|
899
899
|
);
|
900
900
|
};
|
901
|
-
return /* @__PURE__ */
|
902
|
-
/* @__PURE__ */
|
903
|
-
/* @__PURE__ */
|
904
|
-
/* @__PURE__ */ s(
|
905
|
-
e.due_date && /* @__PURE__ */
|
901
|
+
return /* @__PURE__ */ p("div", { className: H.taskContainer, children: [
|
902
|
+
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-center", children: [
|
903
|
+
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
904
|
+
/* @__PURE__ */ s(Ne, { color: Vr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
905
|
+
e.due_date && /* @__PURE__ */ p(Ne, { color: "#EAB308", children: [
|
906
906
|
"DUE ",
|
907
907
|
hr(un(e.due_date), "yyyy-MM-dd")
|
908
908
|
] })
|
@@ -940,9 +940,9 @@ const Kr = function(e) {
|
|
940
940
|
children: e.title
|
941
941
|
}
|
942
942
|
) }),
|
943
|
-
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: _r(
|
944
|
-
/* @__PURE__ */
|
945
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */
|
943
|
+
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: _r(pr(e.description)) }),
|
944
|
+
/* @__PURE__ */ p("table", { className: H.languagesTable, children: [
|
945
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
946
946
|
/* @__PURE__ */ s("th", { children: "Languages" }),
|
947
947
|
/* @__PURE__ */ s("th", { children: "Words to do" }),
|
948
948
|
/* @__PURE__ */ s("th", { children: "Progress" }),
|
@@ -950,13 +950,13 @@ const Kr = function(e) {
|
|
950
950
|
] }) }),
|
951
951
|
/* @__PURE__ */ s("tbody", { children: a.map((i) => /* @__PURE__ */ s(oa, { language: i, task: e }, i.lang_id)) })
|
952
952
|
] }),
|
953
|
-
/* @__PURE__ */
|
954
|
-
/* @__PURE__ */
|
953
|
+
/* @__PURE__ */ p("div", { "data-testid": "sidebar-task-overview-metadata", className: H.metadata, children: [
|
954
|
+
/* @__PURE__ */ p("span", { children: [
|
955
955
|
"Source: ",
|
956
956
|
e.source_lang_name
|
957
957
|
] }),
|
958
958
|
/* @__PURE__ */ s("span", { children: e.created_by_fullname }),
|
959
|
-
/* @__PURE__ */
|
959
|
+
/* @__PURE__ */ p("span", { children: [
|
960
960
|
"In ",
|
961
961
|
e.project_name,
|
962
962
|
e.master_branching_enabled === "1" && /* @__PURE__ */ s("div", { className: H.tag, children: e.branch_name ? e.branch_name : "master" })
|
@@ -968,12 +968,12 @@ const Kr = function(e) {
|
|
968
968
|
TaskClosed: "task_closed",
|
969
969
|
Refresh: "refresh",
|
970
970
|
ShowDialog: "show_dialog"
|
971
|
-
}, ma = "_loadingContainer_19d6m_1", _a = "_noTasksContainer_19d6m_7", ga = "_noTasksHeading_19d6m_14",
|
971
|
+
}, ma = "_loadingContainer_19d6m_1", _a = "_noTasksContainer_19d6m_7", ga = "_noTasksHeading_19d6m_14", fa = "_noTasksText_19d6m_18", pa = "_tasksContainer_19d6m_23", F = {
|
972
972
|
loadingContainer: ma,
|
973
973
|
noTasksContainer: _a,
|
974
974
|
noTasksHeading: ga,
|
975
|
-
noTasksText:
|
976
|
-
tasksContainer:
|
975
|
+
noTasksText: fa,
|
976
|
+
tasksContainer: pa
|
977
977
|
}, ha = () => {
|
978
978
|
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: a } = V();
|
979
979
|
return $e(() => ((async () => {
|
@@ -981,9 +981,9 @@ const Kr = function(e) {
|
|
981
981
|
t == null || t({ tasks: i });
|
982
982
|
})(), document.addEventListener(P.TaskCompleted, a), document.addEventListener(P.TaskClosed, a), document.addEventListener(P.Refresh, a), () => {
|
983
983
|
document.removeEventListener(P.TaskCompleted, a), document.removeEventListener(P.TaskClosed, a), document.removeEventListener(P.Refresh, a);
|
984
|
-
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(cn, {}) }) : e.length === 0 ? /* @__PURE__ */
|
984
|
+
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(cn, {}) }) : e.length === 0 ? /* @__PURE__ */ p("div", { "data-testid": "sidebar-no-tasks-popover", className: F.noTasksContainer, children: [
|
985
985
|
/* @__PURE__ */ s("h3", { className: F.noTasksHeading, children: "No tasks" }),
|
986
|
-
/* @__PURE__ */
|
986
|
+
/* @__PURE__ */ p("div", { className: F.noTasksText, children: [
|
987
987
|
"Your incoming tasks will appear here.",
|
988
988
|
/* @__PURE__ */ s("br", {}),
|
989
989
|
/* @__PURE__ */ s(M, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
@@ -995,18 +995,18 @@ const Kr = function(e) {
|
|
995
995
|
onLanguageCompleteConfirm: l,
|
996
996
|
onTasksWidgetOpen: m,
|
997
997
|
langNameOnClick: g,
|
998
|
-
langProgressOnClick:
|
998
|
+
langProgressOnClick: v,
|
999
999
|
taskTitleOnClick: y
|
1000
|
-
} = t, { getTasks: _, getTasksCount:
|
1000
|
+
} = t, { getTasks: _, getTasksCount: S } = t, b = async () => {
|
1001
1001
|
i(!0);
|
1002
|
-
const
|
1003
|
-
return a(
|
1004
|
-
},
|
1005
|
-
const
|
1006
|
-
d(
|
1002
|
+
const T = await _();
|
1003
|
+
return a(T), i(!1), T;
|
1004
|
+
}, f = async () => {
|
1005
|
+
const T = await S();
|
1006
|
+
d(T);
|
1007
1007
|
};
|
1008
|
-
$e(() => (
|
1009
|
-
document.removeEventListener(P.TaskCompleted,
|
1008
|
+
$e(() => (f(), document.addEventListener(P.TaskCompleted, f), document.addEventListener(P.TaskClosed, f), document.addEventListener(P.Refresh, f), () => {
|
1009
|
+
document.removeEventListener(P.TaskCompleted, f), document.removeEventListener(P.TaskClosed, f), document.removeEventListener(P.Refresh, f);
|
1010
1010
|
}));
|
1011
1011
|
const h = {
|
1012
1012
|
fetchTasks: b,
|
@@ -1017,14 +1017,14 @@ const Kr = function(e) {
|
|
1017
1017
|
onLanguageCompleteConfirm: l,
|
1018
1018
|
onTasksWidgetOpen: m,
|
1019
1019
|
langNameOnClick: g,
|
1020
|
-
langProgressOnClick:
|
1020
|
+
langProgressOnClick: v,
|
1021
1021
|
taskTitleOnClick: y
|
1022
1022
|
};
|
1023
1023
|
return /* @__PURE__ */ s(Kt.Provider, { value: h, children: e });
|
1024
|
-
},
|
1024
|
+
}, Ta = (e) => function(n) {
|
1025
1025
|
const { config: a, ...o } = n;
|
1026
1026
|
return /* @__PURE__ */ s(ba, { config: a, children: /* @__PURE__ */ s(e, { ...o }) });
|
1027
|
-
},
|
1027
|
+
}, va = Ta(() => {
|
1028
1028
|
const [e, t] = I(!1), { tasksCount: n } = V();
|
1029
1029
|
return $e(() => {
|
1030
1030
|
const a = () => {
|
@@ -1050,13 +1050,13 @@ const Kr = function(e) {
|
|
1050
1050
|
}
|
1051
1051
|
})
|
1052
1052
|
],
|
1053
|
-
children: (a) => /* @__PURE__ */
|
1053
|
+
children: (a) => /* @__PURE__ */ p(
|
1054
1054
|
Oe,
|
1055
1055
|
{
|
1056
1056
|
type: "button",
|
1057
1057
|
"data-testid": "sidebar-tasks-widget-button",
|
1058
1058
|
"aria-label": "Tasks",
|
1059
|
-
className:
|
1059
|
+
className: j(Ie.navItem, {
|
1060
1060
|
[Ie.activeNavItem]: a
|
1061
1061
|
}),
|
1062
1062
|
children: [
|
@@ -1067,41 +1067,41 @@ const Kr = function(e) {
|
|
1067
1067
|
)
|
1068
1068
|
}
|
1069
1069
|
) });
|
1070
|
-
}),
|
1071
|
-
|
1072
|
-
const
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
const
|
1084
|
-
breadcrumbsItem:
|
1070
|
+
}), R = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Dn.sidebarContainer, children: e }), ya = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1071
|
+
R.Top = ya;
|
1072
|
+
const Ea = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1073
|
+
R.Bottom = Ea;
|
1074
|
+
R.Avatar = Fn;
|
1075
|
+
R.IconLink = Jn;
|
1076
|
+
R.Menu = Yn;
|
1077
|
+
R.ProfileMenu = Tr;
|
1078
|
+
R.TeamSwitch = Or;
|
1079
|
+
R.TeamMenuItem = $t;
|
1080
|
+
R.UpgradeMenuItem = Ur;
|
1081
|
+
R.ProfileSettingsMenuItem = Er;
|
1082
|
+
R.Tasks = va;
|
1083
|
+
const Sa = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
1084
|
+
breadcrumbsItem: Sa,
|
1085
1085
|
breadcrumbs: Ca
|
1086
|
-
},
|
1086
|
+
}, Zo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(At, { children: [
|
1087
1087
|
/* @__PURE__ */ s(M, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1088
1088
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1089
|
-
] }, `${t.link}-${t.name}`)) }), wa = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */
|
1090
|
-
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(
|
1089
|
+
] }, `${t.link}-${t.name}`)) }), wa = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ p(At, { children: [
|
1090
|
+
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(kt, {}),
|
1091
1091
|
t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: i }) => /* @__PURE__ */ s(W, { href: a || "#", "aria-label": o, onClick: i, children: o }, o))
|
1092
|
-
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15",
|
1092
|
+
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15", Ra = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ka = "_disabled_1pc1v_57", Ia = "_projectNavigationItem_1pc1v_61", ja = "_projectNavigationItemDisabled_1pc1v_67", L = {
|
1093
1093
|
badge: Pa,
|
1094
1094
|
tag: Aa,
|
1095
|
-
withNavLinkStyle:
|
1096
|
-
disabled:
|
1095
|
+
withNavLinkStyle: Ra,
|
1096
|
+
disabled: ka,
|
1097
1097
|
projectNavigationItem: Ia,
|
1098
|
-
projectNavigationItemDisabled:
|
1099
|
-
},
|
1100
|
-
/* @__PURE__ */
|
1098
|
+
projectNavigationItemDisabled: ja
|
1099
|
+
}, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
|
1100
|
+
/* @__PURE__ */ p("div", { children: [
|
1101
1101
|
/* @__PURE__ */ s("span", { children: e }),
|
1102
1102
|
!!t && /* @__PURE__ */ s("div", { className: L.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1103
1103
|
] }),
|
1104
|
-
!!n && /* @__PURE__ */ s(
|
1104
|
+
!!n && /* @__PURE__ */ s(Ne, { className: L.tag, children: n })
|
1105
1105
|
] }), Le = rn(
|
1106
1106
|
({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: i }, c) => /* @__PURE__ */ s(q, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
|
1107
1107
|
"div",
|
@@ -1112,19 +1112,19 @@ const Ea = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
|
1112
1112
|
{
|
1113
1113
|
type: "button",
|
1114
1114
|
ref: c,
|
1115
|
-
className:
|
1115
|
+
className: j(L.withNavLinkStyle, {
|
1116
1116
|
[L.disabled]: n
|
1117
1117
|
}),
|
1118
1118
|
disabled: n,
|
1119
1119
|
onClick: o,
|
1120
|
-
children: /* @__PURE__ */ s(
|
1120
|
+
children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i })
|
1121
1121
|
}
|
1122
|
-
) : /* @__PURE__ */ s("a", { href: t, className: L.withNavLinkStyle, children: /* @__PURE__ */ s(
|
1122
|
+
) : /* @__PURE__ */ s("a", { href: t, className: L.withNavLinkStyle, children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i }) })
|
1123
1123
|
}
|
1124
1124
|
) })
|
1125
1125
|
);
|
1126
1126
|
Le.displayName = "NavigationTabsItem";
|
1127
|
-
const
|
1127
|
+
const Na = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Oa = (e) => e.visible && (!e.dropdown || Na(e.dropdown)), es = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Oa).map((n) => {
|
1128
1128
|
var a, o, i;
|
1129
1129
|
return n.dropdown ? /* @__PURE__ */ s(
|
1130
1130
|
"li",
|
@@ -1163,7 +1163,7 @@ const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1163
1163
|
n.key
|
1164
1164
|
);
|
1165
1165
|
}) }) });
|
1166
|
-
class
|
1166
|
+
class k {
|
1167
1167
|
/**
|
1168
1168
|
* This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
|
1169
1169
|
* that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
|
@@ -1175,7 +1175,7 @@ class R {
|
|
1175
1175
|
this.factories = t;
|
1176
1176
|
}
|
1177
1177
|
static create(t = {}) {
|
1178
|
-
return new
|
1178
|
+
return new k([() => t]);
|
1179
1179
|
}
|
1180
1180
|
/**
|
1181
1181
|
* Adds a single header to the builder by providing a key and a value.
|
@@ -1195,7 +1195,7 @@ class R {
|
|
1195
1195
|
* @param value - The value of the header
|
1196
1196
|
*/
|
1197
1197
|
add(t, n) {
|
1198
|
-
return new
|
1198
|
+
return new k([...this.factories, () => ({ [t]: n })]);
|
1199
1199
|
}
|
1200
1200
|
/**
|
1201
1201
|
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
@@ -1219,7 +1219,7 @@ class R {
|
|
1219
1219
|
* @param extension - An object with the headers to add
|
1220
1220
|
*/
|
1221
1221
|
and(t) {
|
1222
|
-
return new
|
1222
|
+
return new k([...this.factories, () => t]);
|
1223
1223
|
}
|
1224
1224
|
/**
|
1225
1225
|
* Adds a factory function that returns a promise of headers to the builder.
|
@@ -1240,7 +1240,7 @@ class R {
|
|
1240
1240
|
* @param factory - A function that returns a promise of headers
|
1241
1241
|
*/
|
1242
1242
|
from(t) {
|
1243
|
-
return new
|
1243
|
+
return new k([...this.factories, t]);
|
1244
1244
|
}
|
1245
1245
|
/**
|
1246
1246
|
* Takes a middleware function that receives the current builder and returns a new, modified, builder.
|
@@ -1285,7 +1285,7 @@ class R {
|
|
1285
1285
|
* @param builder - The builder to merge with
|
1286
1286
|
*/
|
1287
1287
|
merge(t) {
|
1288
|
-
return new
|
1288
|
+
return new k([...this.factories, ...t.factories]);
|
1289
1289
|
}
|
1290
1290
|
/**
|
1291
1291
|
* Resolves the headers by waiting for all the promises to resolve and merging them together.
|
@@ -1312,7 +1312,7 @@ class xa {
|
|
1312
1312
|
}
|
1313
1313
|
apply(t) {
|
1314
1314
|
return t.from(async () => {
|
1315
|
-
const n = this.middleware(
|
1315
|
+
const n = this.middleware(k.create());
|
1316
1316
|
return n instanceof Promise ? n.then((a) => a.resolve()) : n.resolve();
|
1317
1317
|
});
|
1318
1318
|
}
|
@@ -1352,7 +1352,7 @@ class se extends Error {
|
|
1352
1352
|
ne(this, "status", 401);
|
1353
1353
|
}
|
1354
1354
|
}
|
1355
|
-
function
|
1355
|
+
function ts(e) {
|
1356
1356
|
return zt(async (t) => {
|
1357
1357
|
var i, c;
|
1358
1358
|
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
@@ -1367,7 +1367,7 @@ function Xo(e) {
|
|
1367
1367
|
return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
|
1368
1368
|
});
|
1369
1369
|
}
|
1370
|
-
const
|
1370
|
+
const ns = zt(
|
1371
1371
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1372
1372
|
);
|
1373
1373
|
function Wt() {
|
@@ -1381,7 +1381,7 @@ function Me(e, t) {
|
|
1381
1381
|
var n, a;
|
1382
1382
|
return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
|
1383
1383
|
}
|
1384
|
-
function
|
1384
|
+
function rs() {
|
1385
1385
|
const e = Wt();
|
1386
1386
|
if (!e)
|
1387
1387
|
return;
|
@@ -1425,25 +1425,25 @@ const Qt = r.union([
|
|
1425
1425
|
isEmptyResponseExpected: !0,
|
1426
1426
|
successResponseBodySchema: qa
|
1427
1427
|
});
|
1428
|
-
function
|
1428
|
+
function as(e, t, n) {
|
1429
1429
|
return async () => {
|
1430
1430
|
const a = t();
|
1431
1431
|
if (!a)
|
1432
1432
|
throw new se();
|
1433
1433
|
return D(e, Ge, {
|
1434
1434
|
pathParams: { teamId: Number(await n()) },
|
1435
|
-
headers: await
|
1435
|
+
headers: await k.create().add("x-csrf-token", a).resolve()
|
1436
1436
|
});
|
1437
1437
|
};
|
1438
1438
|
}
|
1439
|
-
function
|
1439
|
+
function os(e) {
|
1440
1440
|
return async ({ accessToken: t, refreshToken: n }) => {
|
1441
1441
|
const a = Z(t);
|
1442
1442
|
if (!a)
|
1443
1443
|
throw new se();
|
1444
1444
|
return D(e, Ge, {
|
1445
1445
|
pathParams: { teamId: a.teamId },
|
1446
|
-
headers: await
|
1446
|
+
headers: await k.create().add("authorization", `Bearer ${n}`).resolve()
|
1447
1447
|
});
|
1448
1448
|
};
|
1449
1449
|
}
|
@@ -1464,7 +1464,7 @@ const Ga = {
|
|
1464
1464
|
};
|
1465
1465
|
ne(ie, "eventName", "new-jwt-issued");
|
1466
1466
|
let z = ie;
|
1467
|
-
function
|
1467
|
+
function ss(e, t, n) {
|
1468
1468
|
const a = Ma(), o = Fa(e, t.add("x-csrf-token", a ?? ""), {
|
1469
1469
|
queryKey: Ga.teamKey(n),
|
1470
1470
|
enabled: a !== void 0
|
@@ -1512,14 +1512,14 @@ const Ka = U, za = r.object({
|
|
1512
1512
|
pathParams: { teamId: o, userId: i }
|
1513
1513
|
})
|
1514
1514
|
});
|
1515
|
-
function
|
1515
|
+
function is(e, t) {
|
1516
1516
|
const n = Yt();
|
1517
1517
|
return Xa(e, t, {
|
1518
1518
|
queryKey: Ya.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1519
1519
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1520
1520
|
});
|
1521
1521
|
}
|
1522
|
-
const
|
1522
|
+
const cs = U, Va = r.object({
|
1523
1523
|
lang_id: r.number(),
|
1524
1524
|
lang_iso: r.string(),
|
1525
1525
|
lang_name: r.string(),
|
@@ -1534,43 +1534,50 @@ const as = U, Va = r.object({
|
|
1534
1534
|
languages: r.array(Va),
|
1535
1535
|
is_admin: r.boolean(),
|
1536
1536
|
is_reviewer: r.boolean()
|
1537
|
-
}), eo = r.
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1537
|
+
}), eo = r.union([
|
1538
|
+
r.object({ uuid: r.string().uuid() }),
|
1539
|
+
r.object({ id: r.string() })
|
1540
|
+
]), to = r.union([
|
1541
|
+
r.object({ authenticatedUser: r.literal(!0) }),
|
1542
|
+
r.object({ uuid: r.string().uuid() }),
|
1543
|
+
r.object({ id: r.number() })
|
1544
|
+
]), no = r.object({
|
1545
|
+
project: eo,
|
1546
|
+
contributor: to
|
1547
|
+
}), ro = r.object({
|
1541
1548
|
project_id: r.string(),
|
1542
1549
|
contributor: Za
|
1543
|
-
}),
|
1550
|
+
}), ao = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, oo = (e) => "uuid" in e ? e.uuid : e.id, so = Y({
|
1544
1551
|
description: "Get the details of a project contributor",
|
1545
1552
|
requestHeaderSchema: U,
|
1546
|
-
requestPathParamsSchema:
|
1547
|
-
pathResolver: ({
|
1548
|
-
successResponseBodySchema:
|
1549
|
-
}),
|
1550
|
-
projectUserKey: (e
|
1551
|
-
},
|
1553
|
+
requestPathParamsSchema: no,
|
1554
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${oo(e)}/contributors/${ao(t)}`,
|
1555
|
+
successResponseBodySchema: ro
|
1556
|
+
}), io = {
|
1557
|
+
projectUserKey: (e) => ["RetrieveContributor", e]
|
1558
|
+
}, co = (e, t, n) => $({
|
1552
1559
|
...n,
|
1553
|
-
queryFn: async ({ queryKey: [a, o
|
1554
|
-
pathParams:
|
1560
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, so, {
|
1561
|
+
pathParams: o,
|
1555
1562
|
headers: await t.resolve()
|
1556
1563
|
})
|
1557
1564
|
});
|
1558
|
-
function
|
1559
|
-
const a = Yt();
|
1560
|
-
return
|
1561
|
-
queryKey:
|
1565
|
+
function ls(e, t, n) {
|
1566
|
+
const a = Yt(), o = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
|
1567
|
+
return co(e, t, {
|
1568
|
+
queryKey: io.projectUserKey({ project: { id: n }, contributor: o }),
|
1562
1569
|
enabled: a !== void 0
|
1563
1570
|
});
|
1564
1571
|
}
|
1565
|
-
const
|
1572
|
+
const lo = r.object({
|
1566
1573
|
lang_iso: r.string(),
|
1567
1574
|
custom_iso: r.string().optional()
|
1568
|
-
}),
|
1575
|
+
}), uo = r.object({
|
1569
1576
|
language_id: r.number(),
|
1570
1577
|
language_iso: r.string(),
|
1571
1578
|
progress: r.number(),
|
1572
1579
|
words_to_do: r.number()
|
1573
|
-
}),
|
1580
|
+
}), mo = r.object({
|
1574
1581
|
projectId: r.string()
|
1575
1582
|
}), Xt = r.object({
|
1576
1583
|
lang_id: r.number(),
|
@@ -1578,13 +1585,13 @@ const oo = r.object({
|
|
1578
1585
|
lang_name: r.string(),
|
1579
1586
|
is_rtl: r.boolean(),
|
1580
1587
|
plural_forms: r.array(r.string().optional())
|
1581
|
-
}),
|
1588
|
+
}), _o = r.object({
|
1582
1589
|
project_id: r.string(),
|
1583
1590
|
project_uuid: r.string().uuid(),
|
1584
1591
|
languages: r.array(Xt)
|
1585
|
-
}),
|
1592
|
+
}), go = r.object({
|
1586
1593
|
projectId: r.string()
|
1587
|
-
}),
|
1594
|
+
}), fo = r.object({
|
1588
1595
|
languages: r.array(
|
1589
1596
|
r.object({
|
1590
1597
|
lang_iso: r.string(),
|
@@ -1593,7 +1600,7 @@ const oo = r.object({
|
|
1593
1600
|
custom_plural_forms: r.array(r.string()).optional()
|
1594
1601
|
})
|
1595
1602
|
)
|
1596
|
-
}),
|
1603
|
+
}), po = r.object({
|
1597
1604
|
project_id: r.string(),
|
1598
1605
|
project_uuid: r.string().uuid(),
|
1599
1606
|
languages: r.array(Xt),
|
@@ -1604,44 +1611,44 @@ const oo = r.object({
|
|
1604
1611
|
lang_iso: r.string()
|
1605
1612
|
})
|
1606
1613
|
).optional()
|
1607
|
-
}),
|
1614
|
+
}), ho = r.object({
|
1608
1615
|
projectId: r.string()
|
1609
|
-
}),
|
1616
|
+
}), bo = r.object({
|
1610
1617
|
langs: r.array(
|
1611
1618
|
r.object({
|
1612
1619
|
lang_iso: r.string(),
|
1613
1620
|
base_lang: r.boolean()
|
1614
1621
|
})
|
1615
1622
|
)
|
1616
|
-
}),
|
1623
|
+
}), To = r.object({
|
1617
1624
|
result: r.boolean()
|
1618
|
-
}),
|
1625
|
+
}), vo = Y({
|
1619
1626
|
description: "List of project languages",
|
1620
1627
|
requestHeaderSchema: U,
|
1621
|
-
requestPathParamsSchema:
|
1628
|
+
requestPathParamsSchema: mo,
|
1622
1629
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1623
|
-
successResponseBodySchema:
|
1624
|
-
}),
|
1630
|
+
successResponseBodySchema: _o
|
1631
|
+
}), ds = jt({
|
1625
1632
|
description: "Add languages to existing project",
|
1626
1633
|
requestHeaderSchema: U,
|
1627
1634
|
method: "post",
|
1628
|
-
requestPathParamsSchema:
|
1635
|
+
requestPathParamsSchema: go,
|
1629
1636
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1630
|
-
requestBodySchema:
|
1631
|
-
successResponseBodySchema:
|
1632
|
-
}),
|
1637
|
+
requestBodySchema: fo,
|
1638
|
+
successResponseBodySchema: po
|
1639
|
+
}), yo = jt({
|
1633
1640
|
description: "Bulk update project languages",
|
1634
1641
|
requestHeaderSchema: U,
|
1635
1642
|
method: "put",
|
1636
|
-
requestPathParamsSchema:
|
1643
|
+
requestPathParamsSchema: ho,
|
1637
1644
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1638
|
-
requestBodySchema:
|
1639
|
-
successResponseBodySchema:
|
1645
|
+
requestBodySchema: bo,
|
1646
|
+
successResponseBodySchema: To
|
1640
1647
|
}), de = U, Fe = r.union([
|
1641
1648
|
r.literal("localization_files"),
|
1642
1649
|
r.literal("paged_documents"),
|
1643
1650
|
r.literal("marketing")
|
1644
|
-
]),
|
1651
|
+
]), Eo = r.object({
|
1645
1652
|
per_platform_key_names: r.boolean(),
|
1646
1653
|
reviewing: r.boolean(),
|
1647
1654
|
auto_toggle_unverified: r.boolean(),
|
@@ -1652,7 +1659,7 @@ const oo = r.object({
|
|
1652
1659
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
1653
1660
|
segmentation: r.boolean(),
|
1654
1661
|
contributor_preview_download_enabled: r.boolean()
|
1655
|
-
}),
|
1662
|
+
}), So = r.object({
|
1656
1663
|
not_reviewed: r.number(),
|
1657
1664
|
unverified: r.number(),
|
1658
1665
|
spelling_grammar: r.number(),
|
@@ -1669,14 +1676,14 @@ const oo = r.object({
|
|
1669
1676
|
double_space: r.number(),
|
1670
1677
|
special_placeholder: r.number(),
|
1671
1678
|
unbalanced_brackets: r.number()
|
1672
|
-
}),
|
1679
|
+
}), Co = r.object({
|
1673
1680
|
progress_total: r.number(),
|
1674
1681
|
keys_total: r.number(),
|
1675
1682
|
team: r.number(),
|
1676
1683
|
base_words: r.number(),
|
1677
1684
|
qa_issues_total: r.number(),
|
1678
|
-
qa_issues:
|
1679
|
-
languages: r.array(
|
1685
|
+
qa_issues: So,
|
1686
|
+
languages: r.array(uo)
|
1680
1687
|
}), ue = r.object({
|
1681
1688
|
project_id: r.string(),
|
1682
1689
|
uuid: r.string().uuid(),
|
@@ -1690,119 +1697,119 @@ const oo = r.object({
|
|
1690
1697
|
team_id: r.number(),
|
1691
1698
|
base_language_id: r.number(),
|
1692
1699
|
base_language_iso: r.string(),
|
1693
|
-
settings:
|
1694
|
-
statistics:
|
1695
|
-
}),
|
1700
|
+
settings: Eo.optional(),
|
1701
|
+
statistics: Co.optional()
|
1702
|
+
}), wo = r.object({
|
1696
1703
|
name: r.string(),
|
1697
1704
|
team_id: r.string(),
|
1698
1705
|
base_lang_iso: r.string(),
|
1699
|
-
languages: r.array(
|
1706
|
+
languages: r.array(lo),
|
1700
1707
|
project_type: Fe,
|
1701
1708
|
is_segmentation_enabled: r.boolean()
|
1702
|
-
}),
|
1709
|
+
}), St = r.union([r.literal(0), r.literal(1)]), Po = r.object({
|
1703
1710
|
filter_type: Fe.optional(),
|
1704
1711
|
filter_team_id: r.number().optional(),
|
1705
1712
|
filter_names: r.string().optional(),
|
1706
|
-
include_statistics:
|
1707
|
-
include_settings:
|
1713
|
+
include_statistics: St.optional(),
|
1714
|
+
include_settings: St.optional(),
|
1708
1715
|
limit: r.number().optional(),
|
1709
1716
|
page: r.number().optional()
|
1710
|
-
}),
|
1717
|
+
}), Ao = r.object({
|
1711
1718
|
projects: r.array(ue)
|
1712
|
-
}),
|
1719
|
+
}), Ro = r.object({
|
1713
1720
|
project_id: r.string()
|
1714
|
-
}),
|
1721
|
+
}), ko = r.object({
|
1715
1722
|
project_id: r.string()
|
1716
|
-
}),
|
1723
|
+
}), Io = r.object({
|
1717
1724
|
name: r.string().min(1),
|
1718
1725
|
description: r.string().optional()
|
1719
|
-
}), me = () => "/projects",
|
1726
|
+
}), me = () => "/projects", jo = He({
|
1720
1727
|
description: "Create a new project",
|
1721
1728
|
requestHeaderSchema: de,
|
1722
1729
|
method: "post",
|
1723
1730
|
pathResolver: me,
|
1724
|
-
requestBodySchema:
|
1731
|
+
requestBodySchema: wo,
|
1725
1732
|
successResponseBodySchema: ue
|
1726
|
-
}),
|
1733
|
+
}), No = Y({
|
1727
1734
|
description: "List all projects",
|
1728
1735
|
requestHeaderSchema: de,
|
1729
1736
|
pathResolver: me,
|
1730
|
-
requestQuerySchema:
|
1731
|
-
successResponseBodySchema:
|
1732
|
-
}),
|
1737
|
+
requestQuerySchema: Po,
|
1738
|
+
successResponseBodySchema: Ao
|
1739
|
+
}), Oo = Y({
|
1733
1740
|
description: "Retrieve a project",
|
1734
1741
|
requestHeaderSchema: de,
|
1735
|
-
requestPathParamsSchema:
|
1742
|
+
requestPathParamsSchema: Ro,
|
1736
1743
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1737
1744
|
successResponseBodySchema: ue
|
1738
|
-
}),
|
1745
|
+
}), xo = He({
|
1739
1746
|
description: "Update a project",
|
1740
1747
|
requestHeaderSchema: de,
|
1741
1748
|
method: "put",
|
1742
|
-
requestPathParamsSchema:
|
1749
|
+
requestPathParamsSchema: ko,
|
1743
1750
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1744
|
-
requestBodySchema:
|
1751
|
+
requestBodySchema: Io,
|
1745
1752
|
successResponseBodySchema: ue
|
1746
1753
|
});
|
1747
|
-
function
|
1754
|
+
function us(e, t, n = {}) {
|
1748
1755
|
return Be({
|
1749
1756
|
...n,
|
1750
|
-
mutationFn: async (a) => D(e,
|
1757
|
+
mutationFn: async (a) => D(e, jo, {
|
1751
1758
|
headers: await t.resolve(),
|
1752
1759
|
body: a
|
1753
1760
|
})
|
1754
1761
|
});
|
1755
1762
|
}
|
1756
|
-
const
|
1763
|
+
const ms = {
|
1757
1764
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1758
1765
|
};
|
1759
|
-
function
|
1766
|
+
function _s(e, t, n) {
|
1760
1767
|
return $({
|
1761
1768
|
...n,
|
1762
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1769
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, vo, {
|
1763
1770
|
headers: await t.resolve(),
|
1764
1771
|
pathParams: { projectId: o }
|
1765
1772
|
})
|
1766
1773
|
});
|
1767
1774
|
}
|
1768
|
-
const
|
1775
|
+
const gs = {
|
1769
1776
|
paramsKey: (e) => ["listProjects", e]
|
1770
1777
|
};
|
1771
|
-
function
|
1778
|
+
function fs(e, t, n) {
|
1772
1779
|
return $({
|
1773
1780
|
...n,
|
1774
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1781
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, No, {
|
1775
1782
|
headers: await t.resolve(),
|
1776
1783
|
queryParams: o
|
1777
1784
|
})
|
1778
1785
|
});
|
1779
1786
|
}
|
1780
|
-
const
|
1787
|
+
const ps = {
|
1781
1788
|
projectIdKey: (e) => ["retrieveProject", e]
|
1782
1789
|
};
|
1783
|
-
function
|
1790
|
+
function hs(e, t, n) {
|
1784
1791
|
return $({
|
1785
1792
|
...n,
|
1786
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1793
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, Oo, {
|
1787
1794
|
headers: await t.resolve(),
|
1788
1795
|
pathParams: { project_id: o }
|
1789
1796
|
})
|
1790
1797
|
});
|
1791
1798
|
}
|
1792
|
-
function
|
1799
|
+
function bs(e, t, n, a = {}) {
|
1793
1800
|
return Be({
|
1794
1801
|
...a,
|
1795
|
-
mutationFn: async (o) => D(e,
|
1802
|
+
mutationFn: async (o) => D(e, xo, {
|
1796
1803
|
headers: await t.resolve(),
|
1797
1804
|
body: o,
|
1798
1805
|
pathParams: n
|
1799
1806
|
})
|
1800
1807
|
});
|
1801
1808
|
}
|
1802
|
-
function
|
1809
|
+
function Ts(e, t, n, a = {}) {
|
1803
1810
|
return Be({
|
1804
1811
|
...a,
|
1805
|
-
mutationFn: async (o) => D(e,
|
1812
|
+
mutationFn: async (o) => D(e, yo, {
|
1806
1813
|
pathParams: t,
|
1807
1814
|
headers: await n.resolve(),
|
1808
1815
|
body: o
|
@@ -1810,46 +1817,46 @@ function ps(e, t, n, a = {}) {
|
|
1810
1817
|
});
|
1811
1818
|
}
|
1812
1819
|
export {
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1820
|
+
go as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1821
|
+
fo as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1822
|
+
po as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1823
|
+
ho as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1824
|
+
bo as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1825
|
+
To as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1826
|
+
Zo as Breadcrumbs,
|
1827
|
+
cs as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1821
1828
|
Va as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1822
1829
|
Za as CONTRIBUTOR_SCHEMA,
|
1823
|
-
|
1830
|
+
wo as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1824
1831
|
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1825
1832
|
dr as ENTERPRISE_PLAN_IDS,
|
1826
1833
|
cr as ESSENTIAL_PLAN_IDS,
|
1827
1834
|
Bt as FREE_PLAN_ID,
|
1828
|
-
|
1835
|
+
k as HeaderBuilder,
|
1829
1836
|
qa as JWT_TOKEN_SCHEMA,
|
1830
|
-
|
1831
|
-
|
1837
|
+
ts as JwtAuthHeaderBuilderMiddleware,
|
1838
|
+
lo as LANGUAGE_ISO_SCHEMA,
|
1832
1839
|
Xt as LANGUAGE_SCHEMA,
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1840
|
+
uo as LANGUAGE_STATISTICS_SCHEMA,
|
1841
|
+
Po as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1842
|
+
Ao as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1843
|
+
mo as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1844
|
+
_o as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1838
1845
|
oe as NavigationPanel,
|
1839
|
-
|
1846
|
+
es as NavigationTabs,
|
1840
1847
|
de as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1841
|
-
|
1848
|
+
So as PROJECT_QA_ISSUES_SCHEMA,
|
1842
1849
|
ue as PROJECT_SCHEMA,
|
1843
|
-
|
1844
|
-
|
1850
|
+
Eo as PROJECT_SETTINGS_SCHEMA,
|
1851
|
+
Co as PROJECT_STATISTICS_SCHEMA,
|
1845
1852
|
Fe as PROJECT_TYPE_SCHEMA,
|
1846
1853
|
lr as PRO_PLAN_IDS,
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1854
|
+
ns as PublicApiHeaderBuilderMiddleware,
|
1855
|
+
no as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1856
|
+
ro as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1857
|
+
Ro as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1851
1858
|
ir as START_PLAN_IDS,
|
1852
|
-
|
1859
|
+
R as Sidebar,
|
1853
1860
|
A as SidebarTaskLanguageStatuses,
|
1854
1861
|
xe as SidebarTaskStatuses,
|
1855
1862
|
re as SidebarTaskTypeOptions,
|
@@ -1859,57 +1866,57 @@ export {
|
|
1859
1866
|
Wa as TEAM_USER_RESPONSE_SCHEMA,
|
1860
1867
|
za as TEAM_USER_SCHEMA,
|
1861
1868
|
sr as TRIAL_PLAN_ID,
|
1862
|
-
|
1863
|
-
|
1869
|
+
ko as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1870
|
+
Io as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1864
1871
|
$a as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1865
1872
|
se as UnauthorizedError,
|
1866
|
-
|
1867
|
-
|
1873
|
+
ds as addLanguagesToProject,
|
1874
|
+
yo as bulkUpdateProjectLanguages,
|
1868
1875
|
_r as convertNewLineToBreakTag,
|
1869
1876
|
zt as createHeaderBuilderMiddleware,
|
1870
|
-
|
1877
|
+
jo as createProject,
|
1871
1878
|
hr as formatDate,
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1879
|
+
Vo as formatDateTz,
|
1880
|
+
as as generateTokenFromClassicSession,
|
1881
|
+
rs as getAuthenticatedSessionDetailFromRequest,
|
1875
1882
|
Ma as getCsrfTokenFromCookie,
|
1876
1883
|
Wt as getJwtTokenFromCookie,
|
1877
1884
|
Qa as getTeamUser,
|
1878
1885
|
Ya as getTeamUsersQueryKey,
|
1879
1886
|
Ge as getUserToken,
|
1880
1887
|
Ga as getUserTokenKey,
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1888
|
+
Xo as isEnterpriseOpenSourcePlan,
|
1889
|
+
Qo as isEnterprisePlan,
|
1890
|
+
Jo as isEssentialPlan,
|
1884
1891
|
De as isFreePlan,
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1892
|
+
Yo as isPaidPlan,
|
1893
|
+
Wo as isProPlan,
|
1894
|
+
zo as isStartPlan,
|
1888
1895
|
Dt as isTrialPlan,
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1893
|
-
|
1896
|
+
vo as listProjectLanguages,
|
1897
|
+
ms as listProjectLanguagesKey,
|
1898
|
+
No as listProjects,
|
1899
|
+
gs as listProjectsKey,
|
1900
|
+
pr as makeUrlClickable,
|
1894
1901
|
Z as parseJwtTokenPayload,
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
+
os as refreshExpiredToken,
|
1903
|
+
so as retrieveContributor,
|
1904
|
+
io as retrieveContributorKeys,
|
1905
|
+
Oo as retrieveProject,
|
1906
|
+
ps as retrieveProjectQueryKey,
|
1907
|
+
xo as updateProject,
|
1908
|
+
ls as useAuthenticatedProjectContributor,
|
1902
1909
|
Yt as useAuthenticatedSessionPayload,
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1910
|
+
is as useAuthenticatedUser,
|
1911
|
+
Ts as useBulkUpdateProjectLanguagesMutation,
|
1912
|
+
us as useCreateProjectMutation,
|
1906
1913
|
$e as useEffectOnce,
|
1907
|
-
|
1914
|
+
ss as useGetPromotedClassicSessionJwtQuery,
|
1908
1915
|
Xa as useGetTeamUsersQuery,
|
1909
1916
|
Fa as useGetUserTokenQuery,
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1917
|
+
_s as useListProjectLanguagesQuery,
|
1918
|
+
fs as useListProjectsQuery,
|
1919
|
+
co as useRetrieveContributorQuery,
|
1920
|
+
hs as useRetrieveProjectQuery,
|
1921
|
+
bs as useUpdateProjectMutation
|
1915
1922
|
};
|