@lokalise/harmony 1.22.1 → 1.22.2
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 +594 -595
- package/dist/types/src/features/publicApi/contributors.d.ts +1 -1
- package/dist/types/src/features/publicApi/languages.d.ts +3 -3
- package/dist/types/src/features/publicApi/projects.d.ts +4 -4
- package/dist/types/src/features/publicApi/teamUsers.d.ts +1 -1
- package/dist/types/src/features/publicApi/userToken.d.ts +1 -1
- package/package.json +7 -8
package/dist/harmony.mjs
CHANGED
@@ -1,71 +1,70 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { jsx as s, jsxs as f, Fragment as
|
1
|
+
var Zt = Object.defineProperty;
|
2
|
+
var en = (e, t, n) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var re = (e, t, n) => en(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { jsx as s, jsxs as f, Fragment as He } from "react/jsx-runtime";
|
5
5
|
import * as K from "react";
|
6
|
-
import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as
|
7
|
-
import { Tooltip as q, Link as M, Menu as
|
8
|
-
import { format as It, parseISO as
|
9
|
-
import { toZonedTime as
|
6
|
+
import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as At, cloneElement as tn, Fragment as Pt, forwardRef as nn } from "react";
|
7
|
+
import { Tooltip as q, Link as M, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as on, Tag as Oe, Button as xe, Loading as sn, Popover as cn, JobIcon as ln } from "@lokalise/louis";
|
8
|
+
import { format as It, parseISO as un, isThisSecond as dn } from "date-fns";
|
9
|
+
import { toZonedTime as mn } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
|
-
import { buildPayloadRoute as
|
12
|
-
import { sendByPayloadRoute as D, sendByGetRoute as
|
11
|
+
import { buildPayloadRoute as Q, buildGetRoute as Y } from "@lokalise/api-contracts";
|
12
|
+
import { sendByPayloadRoute as D, sendByGetRoute as X } from "@lokalise/frontend-http-client";
|
13
13
|
import { useQuery as $, useMutation as Be } from "@tanstack/react-query";
|
14
|
-
|
15
|
-
const xe = {
|
14
|
+
const Le = {
|
16
15
|
Completed: "completed",
|
17
16
|
InProgress: "in_progress",
|
18
17
|
Created: "created",
|
19
18
|
Queued: "queued"
|
20
|
-
},
|
21
|
-
...
|
19
|
+
}, P = {
|
20
|
+
...Le,
|
22
21
|
NotStarted: "not_started"
|
23
|
-
},
|
22
|
+
}, ae = {
|
24
23
|
translation: "translation",
|
25
24
|
review: "review",
|
26
25
|
lqa_by_ai: "lqa_by_ai",
|
27
26
|
automatic_translation: "automatic_translation"
|
28
27
|
};
|
29
|
-
var
|
30
|
-
function
|
28
|
+
var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
29
|
+
function jt(e) {
|
31
30
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
32
31
|
}
|
33
|
-
var
|
32
|
+
var pe, Qe;
|
34
33
|
function qe() {
|
35
|
-
if (Qe) return
|
34
|
+
if (Qe) return pe;
|
36
35
|
Qe = 1;
|
37
36
|
function e(t) {
|
38
37
|
var n = typeof t;
|
39
38
|
return t != null && (n == "object" || n == "function");
|
40
39
|
}
|
41
|
-
return
|
40
|
+
return pe = e, pe;
|
42
41
|
}
|
43
|
-
var
|
44
|
-
function
|
45
|
-
if (Ye) return
|
42
|
+
var fe, Ye;
|
43
|
+
function _n() {
|
44
|
+
if (Ye) return fe;
|
46
45
|
Ye = 1;
|
47
|
-
var e = typeof
|
48
|
-
return
|
46
|
+
var e = typeof oe == "object" && oe && oe.Object === Object && oe;
|
47
|
+
return fe = e, fe;
|
49
48
|
}
|
50
|
-
var
|
51
|
-
function
|
52
|
-
if (Xe) return
|
49
|
+
var he, Xe;
|
50
|
+
function Nt() {
|
51
|
+
if (Xe) return he;
|
53
52
|
Xe = 1;
|
54
|
-
var e =
|
55
|
-
return
|
53
|
+
var e = _n(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
54
|
+
return he = n, he;
|
56
55
|
}
|
57
|
-
var
|
58
|
-
function
|
59
|
-
if (Ve) return
|
56
|
+
var be, Ve;
|
57
|
+
function gn() {
|
58
|
+
if (Ve) return be;
|
60
59
|
Ve = 1;
|
61
|
-
var e =
|
60
|
+
var e = Nt(), t = function() {
|
62
61
|
return e.Date.now();
|
63
62
|
};
|
64
|
-
return
|
63
|
+
return be = t, be;
|
65
64
|
}
|
66
|
-
var
|
67
|
-
function
|
68
|
-
if (Ze) return
|
65
|
+
var Te, Ze;
|
66
|
+
function pn() {
|
67
|
+
if (Ze) return Te;
|
69
68
|
Ze = 1;
|
70
69
|
var e = /\s/;
|
71
70
|
function t(n) {
|
@@ -73,30 +72,30 @@ function fn() {
|
|
73
72
|
;
|
74
73
|
return a;
|
75
74
|
}
|
76
|
-
return
|
75
|
+
return Te = t, Te;
|
77
76
|
}
|
78
|
-
var
|
79
|
-
function
|
80
|
-
if (et) return
|
77
|
+
var ve, et;
|
78
|
+
function fn() {
|
79
|
+
if (et) return ve;
|
81
80
|
et = 1;
|
82
|
-
var e =
|
81
|
+
var e = pn(), t = /^\s+/;
|
83
82
|
function n(a) {
|
84
83
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
85
84
|
}
|
86
|
-
return
|
85
|
+
return ve = n, ve;
|
87
86
|
}
|
88
|
-
var
|
89
|
-
function
|
90
|
-
if (tt) return
|
87
|
+
var ye, tt;
|
88
|
+
function Ot() {
|
89
|
+
if (tt) return ye;
|
91
90
|
tt = 1;
|
92
|
-
var e =
|
93
|
-
return
|
91
|
+
var e = Nt(), t = e.Symbol;
|
92
|
+
return ye = t, ye;
|
94
93
|
}
|
95
|
-
var
|
96
|
-
function
|
97
|
-
if (nt) return
|
94
|
+
var Ee, nt;
|
95
|
+
function hn() {
|
96
|
+
if (nt) return Ee;
|
98
97
|
nt = 1;
|
99
|
-
var e =
|
98
|
+
var e = Ot(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
|
100
99
|
function i(c) {
|
101
100
|
var u = n.call(c, o), d = c[o];
|
102
101
|
try {
|
@@ -107,52 +106,52 @@ function bn() {
|
|
107
106
|
var m = a.call(c);
|
108
107
|
return l && (u ? c[o] = d : delete c[o]), m;
|
109
108
|
}
|
110
|
-
return
|
109
|
+
return Ee = i, Ee;
|
111
110
|
}
|
112
|
-
var
|
113
|
-
function
|
114
|
-
if (rt) return
|
111
|
+
var Se, rt;
|
112
|
+
function bn() {
|
113
|
+
if (rt) return Se;
|
115
114
|
rt = 1;
|
116
115
|
var e = Object.prototype, t = e.toString;
|
117
116
|
function n(a) {
|
118
117
|
return t.call(a);
|
119
118
|
}
|
120
|
-
return
|
119
|
+
return Se = n, Se;
|
121
120
|
}
|
122
|
-
var
|
123
|
-
function
|
124
|
-
if (at) return
|
121
|
+
var Ce, at;
|
122
|
+
function Tn() {
|
123
|
+
if (at) return Ce;
|
125
124
|
at = 1;
|
126
|
-
var e =
|
125
|
+
var e = Ot(), t = hn(), n = bn(), a = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
126
|
function c(u) {
|
128
127
|
return u == null ? u === void 0 ? o : a : i && i in Object(u) ? t(u) : n(u);
|
129
128
|
}
|
130
|
-
return
|
129
|
+
return Ce = c, Ce;
|
131
130
|
}
|
132
|
-
var
|
133
|
-
function
|
134
|
-
if (ot) return
|
131
|
+
var we, ot;
|
132
|
+
function vn() {
|
133
|
+
if (ot) return we;
|
135
134
|
ot = 1;
|
136
135
|
function e(t) {
|
137
136
|
return t != null && typeof t == "object";
|
138
137
|
}
|
139
|
-
return
|
138
|
+
return we = e, we;
|
140
139
|
}
|
141
|
-
var
|
142
|
-
function
|
143
|
-
if (st) return
|
140
|
+
var Ae, st;
|
141
|
+
function yn() {
|
142
|
+
if (st) return Ae;
|
144
143
|
st = 1;
|
145
|
-
var e =
|
144
|
+
var e = Tn(), t = vn(), n = "[object Symbol]";
|
146
145
|
function a(o) {
|
147
146
|
return typeof o == "symbol" || t(o) && e(o) == n;
|
148
147
|
}
|
149
|
-
return
|
148
|
+
return Ae = a, Ae;
|
150
149
|
}
|
151
150
|
var Pe, it;
|
152
|
-
function
|
151
|
+
function En() {
|
153
152
|
if (it) return Pe;
|
154
153
|
it = 1;
|
155
|
-
var e =
|
154
|
+
var e = fn(), t = qe(), n = yn(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
156
155
|
function d(l) {
|
157
156
|
if (typeof l == "number")
|
158
157
|
return l;
|
@@ -170,11 +169,11 @@ function Sn() {
|
|
170
169
|
}
|
171
170
|
return Pe = d, Pe;
|
172
171
|
}
|
173
|
-
var
|
174
|
-
function
|
175
|
-
if (ct) return
|
172
|
+
var Re, ct;
|
173
|
+
function xt() {
|
174
|
+
if (ct) return Re;
|
176
175
|
ct = 1;
|
177
|
-
var e = qe(), t =
|
176
|
+
var e = qe(), t = gn(), n = En(), a = "Expected a function", o = Math.max, i = Math.min;
|
178
177
|
function c(u, d, l) {
|
179
178
|
var m, g, v, y, _, S, b = 0, p = !1, h = !1, T = !0;
|
180
179
|
if (typeof u != "function")
|
@@ -185,9 +184,9 @@ function Lt() {
|
|
185
184
|
return m = g = void 0, b = E, y = u.apply(G, N), y;
|
186
185
|
}
|
187
186
|
function C(E) {
|
188
|
-
return b = E, _ = setTimeout(
|
187
|
+
return b = E, _ = setTimeout(ne, d), p ? w(E) : y;
|
189
188
|
}
|
190
|
-
function
|
189
|
+
function te(E) {
|
191
190
|
var N = E - S, G = E - b, Je = d - N;
|
192
191
|
return h ? i(Je, v - G) : Je;
|
193
192
|
}
|
@@ -195,42 +194,42 @@ function Lt() {
|
|
195
194
|
var N = E - S, G = E - b;
|
196
195
|
return S === void 0 || N >= d || N < 0 || h && G >= v;
|
197
196
|
}
|
198
|
-
function
|
197
|
+
function ne() {
|
199
198
|
var E = t();
|
200
199
|
if (Ke(E))
|
201
200
|
return ze(E);
|
202
|
-
_ = setTimeout(
|
201
|
+
_ = setTimeout(ne, te(E));
|
203
202
|
}
|
204
203
|
function ze(E) {
|
205
204
|
return _ = void 0, T && m ? w(E) : (m = g = void 0, y);
|
206
205
|
}
|
207
|
-
function
|
206
|
+
function Xt() {
|
208
207
|
_ !== void 0 && clearTimeout(_), b = 0, m = S = g = _ = void 0;
|
209
208
|
}
|
210
|
-
function
|
209
|
+
function Vt() {
|
211
210
|
return _ === void 0 ? y : ze(t());
|
212
211
|
}
|
213
|
-
function
|
212
|
+
function ge() {
|
214
213
|
var E = t(), N = Ke(E);
|
215
214
|
if (m = arguments, g = this, S = E, N) {
|
216
215
|
if (_ === void 0)
|
217
216
|
return C(S);
|
218
217
|
if (h)
|
219
|
-
return clearTimeout(_), _ = setTimeout(
|
218
|
+
return clearTimeout(_), _ = setTimeout(ne, d), w(S);
|
220
219
|
}
|
221
|
-
return _ === void 0 && (_ = setTimeout(
|
220
|
+
return _ === void 0 && (_ = setTimeout(ne, d)), y;
|
222
221
|
}
|
223
|
-
return
|
222
|
+
return ge.cancel = Xt, ge.flush = Vt, ge;
|
224
223
|
}
|
225
|
-
return
|
224
|
+
return Re = c, Re;
|
226
225
|
}
|
227
|
-
var
|
228
|
-
const
|
229
|
-
var
|
230
|
-
function
|
231
|
-
if (lt) return
|
226
|
+
var Sn = xt();
|
227
|
+
const Cn = /* @__PURE__ */ jt(Sn);
|
228
|
+
var ke, lt;
|
229
|
+
function wn() {
|
230
|
+
if (lt) return ke;
|
232
231
|
lt = 1;
|
233
|
-
var e =
|
232
|
+
var e = xt(), t = qe(), n = "Expected a function";
|
234
233
|
function a(o, i, c) {
|
235
234
|
var u = !0, d = !0;
|
236
235
|
if (typeof o != "function")
|
@@ -241,19 +240,19 @@ function Pn() {
|
|
241
240
|
trailing: d
|
242
241
|
});
|
243
242
|
}
|
244
|
-
return
|
243
|
+
return ke = a, ke;
|
245
244
|
}
|
246
|
-
var An =
|
247
|
-
const
|
245
|
+
var An = wn();
|
246
|
+
const Pn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
248
247
|
switch (t) {
|
249
248
|
case "debounce":
|
250
|
-
return
|
249
|
+
return Cn(e, n, a);
|
251
250
|
case "throttle":
|
252
|
-
return
|
251
|
+
return Pn(e, n, a);
|
253
252
|
default:
|
254
253
|
return e;
|
255
254
|
}
|
256
|
-
},
|
255
|
+
}, kn = (
|
257
256
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
258
257
|
(e) => {
|
259
258
|
const t = K.useRef(e);
|
@@ -264,7 +263,7 @@ const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
|
264
263
|
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
|
265
264
|
}, []);
|
266
265
|
}
|
267
|
-
),
|
266
|
+
), In = (
|
268
267
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
268
|
(e) => {
|
270
269
|
const [t, n] = K.useState((e == null ? void 0 : e.current) || null);
|
@@ -281,7 +280,7 @@ const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
|
281
280
|
}
|
282
281
|
}), [t]), refElement: t, setRefElement: n };
|
283
282
|
}
|
284
|
-
),
|
283
|
+
), jn = (e, t) => t === "border-box" ? {
|
285
284
|
width: e.borderBoxSize[0].inlineSize,
|
286
285
|
height: e.borderBoxSize[0].blockSize
|
287
286
|
} : t === "content-box" ? {
|
@@ -291,11 +290,11 @@ const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
|
291
290
|
width: e.contentRect.width,
|
292
291
|
height: e.contentRect.height
|
293
292
|
};
|
294
|
-
function
|
295
|
-
const l = Ct(e), m =
|
293
|
+
function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
294
|
+
const l = Ct(e), m = kn(d), [g, v] = I({
|
296
295
|
width: void 0,
|
297
296
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: _ } =
|
297
|
+
}), { refProxy: y, refElement: _ } = In(c), { box: S } = u || {}, b = We((h) => {
|
299
298
|
if (!o && !i)
|
300
299
|
return;
|
301
300
|
if (l.current) {
|
@@ -304,14 +303,14 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
304
303
|
}
|
305
304
|
const T = (w, C) => o && w.width !== C.width || i && w.height !== C.height;
|
306
305
|
h.forEach((w) => {
|
307
|
-
const C =
|
308
|
-
v((
|
306
|
+
const C = jn(w, S);
|
307
|
+
v((te) => T(te, C) ? (m == null || m({
|
309
308
|
width: C.width,
|
310
309
|
height: C.height,
|
311
310
|
entry: w
|
312
|
-
}), C) :
|
311
|
+
}), C) : te);
|
313
312
|
});
|
314
|
-
}, [o, i, l, S]), p = We(
|
313
|
+
}, [o, i, l, S]), p = We(Rn(b, t, n, a), [
|
315
314
|
b,
|
316
315
|
t,
|
317
316
|
n,
|
@@ -329,27 +328,27 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
329
328
|
};
|
330
329
|
}, [p, _]), Object.assign({ ref: y }, g);
|
331
330
|
}
|
332
|
-
function
|
331
|
+
function Lt(e) {
|
333
332
|
var t, n, a = "";
|
334
333
|
if (typeof e == "string" || typeof e == "number") a += e;
|
335
334
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
336
335
|
var o = e.length;
|
337
|
-
for (t = 0; t < o; t++) e[t] && (n =
|
336
|
+
for (t = 0; t < o; t++) e[t] && (n = Lt(e[t])) && (a && (a += " "), a += n);
|
338
337
|
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
339
338
|
return a;
|
340
339
|
}
|
341
340
|
function j() {
|
342
|
-
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t =
|
341
|
+
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Lt(e)) && (a && (a += " "), a += t);
|
343
342
|
return a;
|
344
343
|
}
|
345
|
-
const
|
346
|
-
headerContainer:
|
347
|
-
navigationTabList:
|
348
|
-
navigationTab:
|
349
|
-
headerContent:
|
350
|
-
staticEnabled:
|
351
|
-
},
|
352
|
-
const { ref: n, height: a } =
|
344
|
+
const On = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", Ln = "_navigationTab_1cubo_8", Mn = "_headerContent_1cubo_34", Un = "_staticEnabled_1cubo_50", B = {
|
345
|
+
headerContainer: On,
|
346
|
+
navigationTabList: xn,
|
347
|
+
navigationTab: Ln,
|
348
|
+
headerContent: Mn,
|
349
|
+
staticEnabled: Un
|
350
|
+
}, Hn = 77, se = ({ sticky: e, children: t }) => {
|
351
|
+
const { ref: n, height: a } = Nn({
|
353
352
|
refreshMode: "debounce",
|
354
353
|
refreshRate: 0
|
355
354
|
}), [o, i] = I(!1), c = () => o ? !e : !0;
|
@@ -359,7 +358,7 @@ const xn = "_headerContainer_1cubo_1", Ln = "_navigationTabList_1cubo_8", Mn = "
|
|
359
358
|
};
|
360
359
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
361
360
|
}, []);
|
362
|
-
const u = `${a ||
|
361
|
+
const u = `${a || Hn}px`;
|
363
362
|
return /* @__PURE__ */ s("div", { style: { minHeight: u }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(
|
364
363
|
"div",
|
365
364
|
{
|
@@ -368,28 +367,28 @@ const xn = "_headerContainer_1cubo_1", Ln = "_navigationTabList_1cubo_8", Mn = "
|
|
368
367
|
[B.staticEnabled]: c()
|
369
368
|
}),
|
370
369
|
children: [
|
371
|
-
/* @__PURE__ */ s(
|
372
|
-
/* @__PURE__ */ s(
|
370
|
+
/* @__PURE__ */ s(se.Header, {}),
|
371
|
+
/* @__PURE__ */ s(se.Tabs, {}),
|
373
372
|
t
|
374
373
|
]
|
375
374
|
}
|
376
375
|
) }) });
|
377
376
|
};
|
378
|
-
|
379
|
-
|
380
|
-
const
|
381
|
-
sidebarContainer:
|
382
|
-
},
|
383
|
-
logoLink:
|
384
|
-
},
|
377
|
+
se.Header = ({ children: e }) => /* @__PURE__ */ s("div", { className: B.headerContainer, children: e });
|
378
|
+
se.Tabs = ({ children: e }) => /* @__PURE__ */ s("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
379
|
+
const Bn = "_sidebarContainer_bmdti_1", qn = {
|
380
|
+
sidebarContainer: Bn
|
381
|
+
}, Dn = "_logoLink_1baxb_1", $n = {
|
382
|
+
logoLink: Dn
|
383
|
+
}, Gn = ({
|
385
384
|
src: e,
|
386
385
|
href: t = "/",
|
387
386
|
ariaLabel: n = "Lokalise App Home",
|
388
387
|
alt: a = "Lokalise Logo"
|
389
|
-
}) => /* @__PURE__ */ s("a", { className:
|
390
|
-
link:
|
391
|
-
active:
|
392
|
-
},
|
388
|
+
}) => /* @__PURE__ */ s("a", { className: $n.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Fn = "_link_18vhx_1", Kn = "_active_18vhx_18", ut = {
|
389
|
+
link: Fn,
|
390
|
+
active: Kn
|
391
|
+
}, zn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
393
392
|
M,
|
394
393
|
{
|
395
394
|
className: j(ut.link, {
|
@@ -398,11 +397,11 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
398
397
|
href: t,
|
399
398
|
children: /* @__PURE__ */ s(n, { size: "25px" })
|
400
399
|
}
|
401
|
-
) }),
|
402
|
-
dropdownButton:
|
403
|
-
dropdownButtonActive:
|
404
|
-
},
|
405
|
-
|
400
|
+
) }), Jn = "_dropdownButton_13l5r_1", Wn = "_dropdownButtonActive_13l5r_18", dt = {
|
401
|
+
dropdownButton: Jn,
|
402
|
+
dropdownButtonActive: Wn
|
403
|
+
}, Qn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
|
404
|
+
le,
|
406
405
|
{
|
407
406
|
menuButton: ({ opened: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ s(
|
408
407
|
"button",
|
@@ -414,31 +413,31 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
414
413
|
children: /* @__PURE__ */ s(t, { size: "25px" })
|
415
414
|
}
|
416
415
|
) }),
|
417
|
-
children: /* @__PURE__ */ s(
|
416
|
+
children: /* @__PURE__ */ s(ue, { placement: "right-start", children: e })
|
418
417
|
}
|
419
|
-
),
|
420
|
-
iconContainer:
|
421
|
-
},
|
418
|
+
), Yn = "_iconContainer_nz34m_1", Xn = {
|
419
|
+
iconContainer: Yn
|
420
|
+
}, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
|
422
421
|
"div",
|
423
422
|
{
|
424
423
|
"aria-label": "Upgrade Icon",
|
425
424
|
className: j(
|
426
|
-
|
425
|
+
Xn.iconContainer,
|
427
426
|
"flex-row",
|
428
427
|
"items-center",
|
429
428
|
"justify-center",
|
430
429
|
e
|
431
430
|
),
|
432
|
-
children: /* @__PURE__ */ s(
|
431
|
+
children: /* @__PURE__ */ s(rn, {})
|
433
432
|
}
|
434
|
-
),
|
435
|
-
menuContainer:
|
436
|
-
profileButton:
|
437
|
-
profileImage:
|
438
|
-
profileImageHighlight:
|
439
|
-
profileImageUpgradeIcon:
|
440
|
-
userIconWrapper:
|
441
|
-
},
|
433
|
+
), Vn = "_menuContainer_1phdw_10", Zn = "_profileButton_1phdw_20", er = "_profileImage_1phdw_33", tr = "_profileImageHighlight_1phdw_41", nr = "_profileImageUpgradeIcon_1phdw_45", rr = "_userIconWrapper_1phdw_51", x = {
|
434
|
+
menuContainer: Vn,
|
435
|
+
profileButton: Zn,
|
436
|
+
profileImage: er,
|
437
|
+
profileImageHighlight: tr,
|
438
|
+
profileImageUpgradeIcon: nr,
|
439
|
+
userIconWrapper: rr
|
440
|
+
}, Ut = At({}), V = () => wt(Ut), ar = ({ children: e }) => {
|
442
441
|
const {
|
443
442
|
currentTeam: t,
|
444
443
|
otherTeams: n,
|
@@ -450,9 +449,9 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
450
449
|
isEndOfTrialActive: d,
|
451
450
|
isTeamSuspended: l,
|
452
451
|
isFullyAuthenticated: m
|
453
|
-
} =
|
452
|
+
} = V();
|
454
453
|
return /* @__PURE__ */ s(
|
455
|
-
|
454
|
+
le,
|
456
455
|
{
|
457
456
|
menuButton: () => /* @__PURE__ */ f("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
458
457
|
t != null && t.logoUrl ? /* @__PURE__ */ s(
|
@@ -473,9 +472,9 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
473
472
|
children: /* @__PURE__ */ s(Rt, { size: "25px" })
|
474
473
|
}
|
475
474
|
),
|
476
|
-
a && /* @__PURE__ */ s(
|
475
|
+
a && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
|
477
476
|
] }),
|
478
|
-
children: /* @__PURE__ */ s(
|
477
|
+
children: /* @__PURE__ */ s(ue, { placement: "right-end", className: x.menuContainer, children: e({
|
479
478
|
allowTeamCreation: i,
|
480
479
|
otherTeams: n,
|
481
480
|
canAccessTeamSettings: u,
|
@@ -487,7 +486,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
487
486
|
}) })
|
488
487
|
}
|
489
488
|
);
|
490
|
-
},
|
489
|
+
}, Ht = 0, or = 9999, sr = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], Bt = 9998, De = (e) => e === Ht, qt = (e) => e === or, Fo = (e) => sr.includes(e), Ko = (e) => ir.includes(e), zo = (e) => cr.includes(e), Jo = (e) => lr.includes(e), Wo = (e) => e > Ht && e < Bt, Qo = (e) => e === Bt, ur = /\n/, mt = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [tn(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((a) => typeof a == "string" ? mt(a, t, n) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ s("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, n) => {
|
491
490
|
const a = e.split(t);
|
492
491
|
if (a.length === 1)
|
493
492
|
return e;
|
@@ -496,9 +495,9 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
496
495
|
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
497
496
|
), o.push(a.join(t)), o.filter((i) => i !== "");
|
498
497
|
}, gt = (e) => {
|
499
|
-
const t =
|
498
|
+
const t = gr(e);
|
500
499
|
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
|
-
},
|
500
|
+
}, pr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), fr = (e, t = "PP") => It(e, t), Yo = (e, t, n = "PP") => It(mn(e, t), n), $e = (e) => {
|
502
501
|
J(e, []);
|
503
502
|
}, pt = {
|
504
503
|
biller: "biller",
|
@@ -506,8 +505,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
506
505
|
}, ft = [
|
507
506
|
pt.biller,
|
508
507
|
pt.owner
|
509
|
-
],
|
510
|
-
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((p) => p.id === a), l = n.filter((p) => p.id !== a), m = ft.includes(u), g = ft.includes(u), v = De(o) ||
|
508
|
+
], hr = ({ children: e, config: t }) => {
|
509
|
+
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((p) => p.id === a), l = n.filter((p) => p.id !== a), m = ft.includes(u), g = ft.includes(u), v = De(o) || qt(o), b = {
|
511
510
|
...t,
|
512
511
|
currentTeam: d,
|
513
512
|
otherTeams: l,
|
@@ -518,18 +517,18 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
518
517
|
showBillingButton: c && g && m,
|
519
518
|
allowTeamCreation: c && !i
|
520
519
|
};
|
521
|
-
return /* @__PURE__ */ s(
|
522
|
-
},
|
523
|
-
container:
|
524
|
-
profileEmail:
|
525
|
-
},
|
520
|
+
return /* @__PURE__ */ s(Ut.Provider, { value: b, children: e });
|
521
|
+
}, br = ({ config: e, children: t }) => /* @__PURE__ */ s(hr, { config: e, children: /* @__PURE__ */ s(ar, { children: t }) }), Tr = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ht = {
|
522
|
+
container: Tr,
|
523
|
+
profileEmail: vr
|
524
|
+
}, yr = ({
|
526
525
|
href: e,
|
527
526
|
onClick: t,
|
528
527
|
userEmail: n,
|
529
528
|
hideBottomDivider: a
|
530
529
|
}) => {
|
531
|
-
const { isEndOfTrialActive: o, isTeamSuspended: i } =
|
532
|
-
return o || i ? null : /* @__PURE__ */ f(
|
530
|
+
const { isEndOfTrialActive: o, isTeamSuspended: i } = V();
|
531
|
+
return o || i ? null : /* @__PURE__ */ f(He, { children: [
|
533
532
|
/* @__PURE__ */ s(
|
534
533
|
W,
|
535
534
|
{
|
@@ -545,20 +544,20 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
545
544
|
),
|
546
545
|
!a && /* @__PURE__ */ s(kt, {})
|
547
546
|
] });
|
548
|
-
},
|
549
|
-
wrapper:
|
550
|
-
profileImage:
|
551
|
-
teamDetails:
|
552
|
-
planWrapper:
|
547
|
+
}, Er = "_wrapper_1in7x_5", Sr = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", wr = "_planWrapper_1in7x_28", Ar = "_teamName_1in7x_36", Pr = "_planLabel_1in7x_45", Rr = "_membership_1in7x_53", kr = "_defaultProfileImage_1in7x_59", O = {
|
548
|
+
wrapper: Er,
|
549
|
+
profileImage: Sr,
|
550
|
+
teamDetails: Cr,
|
551
|
+
planWrapper: wr,
|
553
552
|
teamName: Ar,
|
554
|
-
planLabel:
|
555
|
-
membership:
|
556
|
-
defaultProfileImage:
|
557
|
-
},
|
558
|
-
const { currentTeam: a, planId: o } =
|
553
|
+
planLabel: Pr,
|
554
|
+
membership: Rr,
|
555
|
+
defaultProfileImage: kr
|
556
|
+
}, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
557
|
+
const { currentTeam: a, planId: o } = V(), i = e || a;
|
559
558
|
if (!i)
|
560
559
|
return null;
|
561
|
-
const c = De(o) ? "Free" :
|
560
|
+
const c = De(o) ? "Free" : qt(o) ? "Trial" : void 0;
|
562
561
|
return /* @__PURE__ */ f(
|
563
562
|
t ? W : "div",
|
564
563
|
{
|
@@ -576,24 +575,24 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
576
575
|
]
|
577
576
|
}
|
578
577
|
);
|
579
|
-
},
|
580
|
-
teamsContainer:
|
581
|
-
},
|
582
|
-
const { otherTeams: t } =
|
578
|
+
}, Ir = "_teamsContainer_1ncrr_5", jr = {
|
579
|
+
teamsContainer: Ir
|
580
|
+
}, Nr = ({ onSwitchTeam: e }) => {
|
581
|
+
const { otherTeams: t } = V();
|
583
582
|
return t.length === 0 ? null : /* @__PURE__ */ s(
|
584
583
|
"div",
|
585
584
|
{
|
586
585
|
"data-testid": "sidebar-team-switch",
|
587
|
-
className: `flex-col items-stretch ${
|
588
|
-
children: t.map((n) => /* @__PURE__ */ s(
|
586
|
+
className: `flex-col items-stretch ${jr.teamsContainer}`,
|
587
|
+
children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id))
|
589
588
|
}
|
590
589
|
);
|
591
|
-
},
|
592
|
-
container:
|
593
|
-
planCta:
|
594
|
-
upgradeIconWrapper:
|
595
|
-
},
|
596
|
-
const { planId: t, trialDaysLeft: n, showUpgradeCta: a } =
|
590
|
+
}, Or = "_container_1u995_1", xr = "_planCta_1u995_15", Lr = "_upgradeIconWrapper_1u995_19", Ie = {
|
591
|
+
container: Or,
|
592
|
+
planCta: xr,
|
593
|
+
upgradeIconWrapper: Lr
|
594
|
+
}, Mr = ({ upgradeOptionHref: e }) => {
|
595
|
+
const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = V();
|
597
596
|
if (!a)
|
598
597
|
return null;
|
599
598
|
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
@@ -602,33 +601,33 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
602
601
|
{
|
603
602
|
"data-testid": "sidebar-upgrade-menu-item",
|
604
603
|
href: e,
|
605
|
-
className: `flex-col gap-1 items-start ${
|
604
|
+
className: `flex-col gap-1 items-start ${Ie.container}`,
|
606
605
|
children: [
|
607
|
-
/* @__PURE__ */ s("span", { className:
|
608
|
-
/* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${
|
609
|
-
/* @__PURE__ */ s(
|
606
|
+
/* @__PURE__ */ s("span", { className: Ie.planCta, children: c }),
|
607
|
+
/* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
|
608
|
+
/* @__PURE__ */ s(Mt, {}),
|
610
609
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
611
610
|
] })
|
612
611
|
]
|
613
612
|
}
|
614
613
|
);
|
615
|
-
},
|
614
|
+
}, Ur = Math.min, Hr = Math.max;
|
616
615
|
function bt(e, t, n) {
|
617
|
-
return
|
616
|
+
return Hr(e, Ur(t, n));
|
618
617
|
}
|
619
|
-
function
|
618
|
+
function $t(e, t) {
|
620
619
|
return typeof e == "function" ? e(t) : e;
|
621
620
|
}
|
622
|
-
function
|
621
|
+
function Gt(e) {
|
623
622
|
return e.split("-")[0];
|
624
623
|
}
|
625
|
-
function
|
624
|
+
function Br(e) {
|
626
625
|
return e === "x" ? "y" : "x";
|
627
626
|
}
|
628
|
-
function
|
629
|
-
return ["top", "bottom"].includes(
|
627
|
+
function qr(e) {
|
628
|
+
return ["top", "bottom"].includes(Gt(e)) ? "y" : "x";
|
630
629
|
}
|
631
|
-
function
|
630
|
+
function Dr(e) {
|
632
631
|
return {
|
633
632
|
top: 0,
|
634
633
|
right: 0,
|
@@ -637,8 +636,8 @@ function $r(e) {
|
|
637
636
|
...e
|
638
637
|
};
|
639
638
|
}
|
640
|
-
function
|
641
|
-
return typeof e != "number" ?
|
639
|
+
function $r(e) {
|
640
|
+
return typeof e != "number" ? Dr(e) : {
|
642
641
|
top: e,
|
643
642
|
right: e,
|
644
643
|
bottom: e,
|
@@ -663,7 +662,7 @@ function Tt(e) {
|
|
663
662
|
y: n
|
664
663
|
};
|
665
664
|
}
|
666
|
-
async function
|
665
|
+
async function Gr(e, t) {
|
667
666
|
var n;
|
668
667
|
t === void 0 && (t = {});
|
669
668
|
const {
|
@@ -679,7 +678,7 @@ async function Fr(e, t) {
|
|
679
678
|
elementContext: g = "floating",
|
680
679
|
altBoundary: v = !1,
|
681
680
|
padding: y = 0
|
682
|
-
} =
|
681
|
+
} = $t(t, e), _ = $r(y), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
|
683
682
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
|
684
683
|
boundary: l,
|
685
684
|
rootBoundary: m,
|
@@ -708,7 +707,7 @@ async function Fr(e, t) {
|
|
708
707
|
right: (C.right - p.right + _.right) / w.x
|
709
708
|
};
|
710
709
|
}
|
711
|
-
const
|
710
|
+
const Fr = function(e) {
|
712
711
|
return e === void 0 && (e = {}), {
|
713
712
|
name: "shift",
|
714
713
|
options: e,
|
@@ -733,10 +732,10 @@ const Kr = function(e) {
|
|
733
732
|
}
|
734
733
|
},
|
735
734
|
...d
|
736
|
-
} =
|
735
|
+
} = $t(e, t), l = {
|
737
736
|
x: n,
|
738
737
|
y: a
|
739
|
-
}, m = await
|
738
|
+
}, m = await Gr(t, d), g = qr(Gt(o)), v = Br(g);
|
740
739
|
let y = l[v], _ = l[g];
|
741
740
|
if (i) {
|
742
741
|
const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", h = y + m[b], T = y - m[p];
|
@@ -764,50 +763,50 @@ const Kr = function(e) {
|
|
764
763
|
};
|
765
764
|
}
|
766
765
|
};
|
767
|
-
},
|
768
|
-
navItem:
|
769
|
-
activeNavItem:
|
770
|
-
badge:
|
771
|
-
},
|
766
|
+
}, Kr = "_navItem_1dudv_1", zr = "_activeNavItem_1dudv_18", Jr = "_badge_1dudv_23", je = {
|
767
|
+
navItem: Kr,
|
768
|
+
activeNavItem: zr,
|
769
|
+
badge: Jr
|
770
|
+
}, Ft = At({}), Z = () => wt(Ft), Wr = (e) => {
|
772
771
|
const t = e.lastIndexOf("."), n = e.slice(0, t), a = e.slice(t + 1);
|
773
772
|
return { name: n, extension: a };
|
774
|
-
},
|
773
|
+
}, Qr = (e, t) => {
|
775
774
|
switch (e) {
|
776
|
-
case
|
775
|
+
case P.Completed:
|
777
776
|
return t < 100 ? "Closed" : "Completed";
|
778
|
-
case
|
777
|
+
case P.Created:
|
779
778
|
return t > 0 ? "In progress" : "Not started";
|
780
|
-
case
|
779
|
+
case P.InProgress:
|
781
780
|
return "In progress";
|
782
|
-
case
|
781
|
+
case P.Queued:
|
783
782
|
return "Queued";
|
784
|
-
case
|
783
|
+
case P.NotStarted:
|
785
784
|
return "Not started";
|
786
785
|
default:
|
787
786
|
return "-";
|
788
787
|
}
|
789
|
-
},
|
788
|
+
}, Yr = (e) => {
|
790
789
|
const t = e.progress ?? 0;
|
791
|
-
return e.status ===
|
792
|
-
},
|
793
|
-
[
|
794
|
-
[
|
795
|
-
[
|
796
|
-
[
|
797
|
-
},
|
790
|
+
return e.status === P.Created && t > 0 ? P.InProgress : e.status;
|
791
|
+
}, Xr = {
|
792
|
+
[ae.translation]: "#0891B2",
|
793
|
+
[ae.review]: "#16922D",
|
794
|
+
[ae.lqa_by_ai]: "#8B5CF6",
|
795
|
+
[ae.automatic_translation]: "#60A5FA"
|
796
|
+
}, Vr = (e) => {
|
798
797
|
const t = [
|
799
|
-
|
800
|
-
|
801
|
-
|
798
|
+
P.InProgress,
|
799
|
+
P.Created,
|
800
|
+
P.Completed
|
802
801
|
];
|
803
|
-
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status:
|
804
|
-
}, vt = (e) => [
|
805
|
-
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } =
|
802
|
+
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Yr(n) })).sort((n, a) => n.status === P.InProgress && n.progress === 100 ? -1 : a.status === P.InProgress && a.progress === 100 ? 1 : n.status === a.status ? n.name < a.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(a.status));
|
803
|
+
}, vt = (e) => [Le.InProgress, Le.Created].includes(e), Zr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, ea = ({ task: e, language: t }) => {
|
804
|
+
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
|
806
805
|
i(!1);
|
807
806
|
};
|
808
|
-
return /* @__PURE__ */ f(
|
807
|
+
return /* @__PURE__ */ f(He, { children: [
|
809
808
|
o && /* @__PURE__ */ s(
|
810
|
-
|
809
|
+
an,
|
811
810
|
{
|
812
811
|
opened: !0,
|
813
812
|
loading: n,
|
@@ -818,7 +817,7 @@ const Kr = function(e) {
|
|
818
817
|
onConfirm: async () => {
|
819
818
|
a(!0), await c({ task: e, language: t, closePrompt: d }), u();
|
820
819
|
},
|
821
|
-
children: /* @__PURE__ */ f(
|
820
|
+
children: /* @__PURE__ */ f(on, { status: "info", children: [
|
822
821
|
"Make sure you are finished and ",
|
823
822
|
/* @__PURE__ */ s("strong", { children: "mark it as done" }),
|
824
823
|
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
@@ -836,17 +835,17 @@ const Kr = function(e) {
|
|
836
835
|
}
|
837
836
|
)
|
838
837
|
] });
|
839
|
-
},
|
840
|
-
langRowCompleted:
|
841
|
-
langCellSecondary:
|
842
|
-
langStatus:
|
843
|
-
},
|
844
|
-
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } =
|
838
|
+
}, ta = "_langRowCompleted_vpgdi_1", na = "_langCellSecondary_vpgdi_15", ra = "_langStatus_vpgdi_20", Ne = {
|
839
|
+
langRowCompleted: ta,
|
840
|
+
langCellSecondary: na,
|
841
|
+
langStatus: ra
|
842
|
+
}, aa = ({ language: e, task: t }) => {
|
843
|
+
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = Z(), i = e.progress ?? 0, c = e.status === P.Completed, u = Zr(t, e);
|
845
844
|
return /* @__PURE__ */ f(
|
846
845
|
"tr",
|
847
846
|
{
|
848
847
|
className: j({
|
849
|
-
[
|
848
|
+
[Ne.langRowCompleted]: u
|
850
849
|
}),
|
851
850
|
children: [
|
852
851
|
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
@@ -859,7 +858,7 @@ const Kr = function(e) {
|
|
859
858
|
children: e.name
|
860
859
|
}
|
861
860
|
) }) }),
|
862
|
-
/* @__PURE__ */ s("td", { className:
|
861
|
+
/* @__PURE__ */ s("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
863
862
|
M,
|
864
863
|
{
|
865
864
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
@@ -873,25 +872,25 @@ const Kr = function(e) {
|
|
873
872
|
i,
|
874
873
|
"%"
|
875
874
|
] }),
|
876
|
-
/* @__PURE__ */ s("td", { children: u ? /* @__PURE__ */ s(
|
875
|
+
/* @__PURE__ */ s("td", { children: u ? /* @__PURE__ */ s(ea, { task: t, language: e }) : /* @__PURE__ */ s(
|
877
876
|
"span",
|
878
877
|
{
|
879
|
-
className: `${
|
878
|
+
className: `${Ne.langStatus} flex-row items-center justify-start`,
|
880
879
|
"data-status": e.status,
|
881
|
-
children:
|
880
|
+
children: Qr(e.status, i)
|
882
881
|
}
|
883
882
|
) })
|
884
883
|
]
|
885
884
|
}
|
886
885
|
);
|
887
|
-
},
|
888
|
-
taskContainer:
|
889
|
-
taskTitle:
|
890
|
-
taskDescription:
|
891
|
-
languagesTable:
|
892
|
-
metadata:
|
893
|
-
},
|
894
|
-
const { getProjectUrl: t, taskTitleOnClick: n } =
|
886
|
+
}, oa = "_taskContainer_mt2or_1", sa = "_taskTitle_mt2or_21", ia = "_taskDescription_mt2or_28", ca = "_languagesTable_mt2or_35", la = "_metadata_mt2or_87", H = {
|
887
|
+
taskContainer: oa,
|
888
|
+
taskTitle: sa,
|
889
|
+
taskDescription: ia,
|
890
|
+
languagesTable: ca,
|
891
|
+
metadata: la
|
892
|
+
}, ua = ({ task: e }) => {
|
893
|
+
const { getProjectUrl: t, taskTitleOnClick: n } = Z(), a = Vr(e.langs), o = (i) => {
|
895
894
|
window.open(
|
896
895
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
897
896
|
"_blank",
|
@@ -901,14 +900,14 @@ const Kr = function(e) {
|
|
901
900
|
return /* @__PURE__ */ f("div", { className: H.taskContainer, children: [
|
902
901
|
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-center", children: [
|
903
902
|
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
904
|
-
/* @__PURE__ */ s(
|
905
|
-
e.due_date && /* @__PURE__ */ f(
|
903
|
+
/* @__PURE__ */ s(Oe, { color: Xr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
904
|
+
e.due_date && /* @__PURE__ */ f(Oe, { color: "#EAB308", children: [
|
906
905
|
"DUE ",
|
907
|
-
|
906
|
+
fr(un(e.due_date), "yyyy-MM-dd")
|
908
907
|
] })
|
909
908
|
] }),
|
910
909
|
e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
|
911
|
-
|
910
|
+
xe,
|
912
911
|
{
|
913
912
|
size: "sm",
|
914
913
|
variant: "secondary",
|
@@ -916,14 +915,14 @@ const Kr = function(e) {
|
|
916
915
|
children: "Download style guide"
|
917
916
|
}
|
918
917
|
) : /* @__PURE__ */ s(
|
919
|
-
|
918
|
+
le,
|
920
919
|
{
|
921
|
-
menuButton: /* @__PURE__ */ s(
|
922
|
-
children: /* @__PURE__ */ s(
|
920
|
+
menuButton: /* @__PURE__ */ s(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
921
|
+
children: /* @__PURE__ */ s(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ s(
|
923
922
|
W,
|
924
923
|
{
|
925
924
|
onClick: () => o(i),
|
926
|
-
children:
|
925
|
+
children: Wr(i.name).name
|
927
926
|
},
|
928
927
|
i.id
|
929
928
|
)) })
|
@@ -940,7 +939,7 @@ const Kr = function(e) {
|
|
940
939
|
children: e.title
|
941
940
|
}
|
942
941
|
) }),
|
943
|
-
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children:
|
942
|
+
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: mr(pr(e.description)) }),
|
944
943
|
/* @__PURE__ */ f("table", { className: H.languagesTable, children: [
|
945
944
|
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ f("tr", { children: [
|
946
945
|
/* @__PURE__ */ s("th", { children: "Languages" }),
|
@@ -948,7 +947,7 @@ const Kr = function(e) {
|
|
948
947
|
/* @__PURE__ */ s("th", { children: "Progress" }),
|
949
948
|
/* @__PURE__ */ s("th", { children: "Status" })
|
950
949
|
] }) }),
|
951
|
-
/* @__PURE__ */ s("tbody", { children: a.map((i) => /* @__PURE__ */ s(
|
950
|
+
/* @__PURE__ */ s("tbody", { children: a.map((i) => /* @__PURE__ */ s(aa, { language: i, task: e }, i.lang_id)) })
|
952
951
|
] }),
|
953
952
|
/* @__PURE__ */ f("div", { "data-testid": "sidebar-task-overview-metadata", className: H.metadata, children: [
|
954
953
|
/* @__PURE__ */ f("span", { children: [
|
@@ -963,33 +962,33 @@ const Kr = function(e) {
|
|
963
962
|
] })
|
964
963
|
] })
|
965
964
|
] });
|
966
|
-
},
|
965
|
+
}, A = {
|
967
966
|
TaskCompleted: "task_completed",
|
968
967
|
TaskClosed: "task_closed",
|
969
968
|
Refresh: "refresh",
|
970
969
|
ShowDialog: "show_dialog"
|
971
|
-
},
|
972
|
-
loadingContainer:
|
973
|
-
noTasksContainer:
|
974
|
-
noTasksHeading:
|
975
|
-
noTasksText:
|
976
|
-
tasksContainer:
|
977
|
-
},
|
978
|
-
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: a } =
|
970
|
+
}, da = "_loadingContainer_19d6m_1", ma = "_noTasksContainer_19d6m_7", _a = "_noTasksHeading_19d6m_14", ga = "_noTasksText_19d6m_18", pa = "_tasksContainer_19d6m_23", F = {
|
971
|
+
loadingContainer: da,
|
972
|
+
noTasksContainer: ma,
|
973
|
+
noTasksHeading: _a,
|
974
|
+
noTasksText: ga,
|
975
|
+
tasksContainer: pa
|
976
|
+
}, fa = () => {
|
977
|
+
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: a } = Z();
|
979
978
|
return $e(() => ((async () => {
|
980
979
|
const i = await a();
|
981
980
|
t == null || t({ tasks: i });
|
982
|
-
})(), document.addEventListener(
|
983
|
-
document.removeEventListener(
|
984
|
-
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(
|
981
|
+
})(), document.addEventListener(A.TaskCompleted, a), document.addEventListener(A.TaskClosed, a), document.addEventListener(A.Refresh, a), () => {
|
982
|
+
document.removeEventListener(A.TaskCompleted, a), document.removeEventListener(A.TaskClosed, a), document.removeEventListener(A.Refresh, a);
|
983
|
+
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(sn, {}) }) : e.length === 0 ? /* @__PURE__ */ f("div", { "data-testid": "sidebar-no-tasks-popover", className: F.noTasksContainer, children: [
|
985
984
|
/* @__PURE__ */ s("h3", { className: F.noTasksHeading, children: "No tasks" }),
|
986
985
|
/* @__PURE__ */ f("div", { className: F.noTasksText, children: [
|
987
986
|
"Your incoming tasks will appear here.",
|
988
987
|
/* @__PURE__ */ s("br", {}),
|
989
988
|
/* @__PURE__ */ s(M, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
990
989
|
] })
|
991
|
-
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(
|
992
|
-
},
|
990
|
+
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(ua, { task: o }, o.id)) });
|
991
|
+
}, ha = ({ children: e, config: t }) => {
|
993
992
|
const [n, a] = I([]), [o, i] = I(!0), [c, u] = I(0), {
|
994
993
|
getProjectUrl: d,
|
995
994
|
onLanguageCompleteConfirm: l,
|
@@ -1005,8 +1004,8 @@ const Kr = function(e) {
|
|
1005
1004
|
const T = await S();
|
1006
1005
|
u(T);
|
1007
1006
|
};
|
1008
|
-
$e(() => (p(), document.addEventListener(
|
1009
|
-
document.removeEventListener(
|
1007
|
+
$e(() => (p(), document.addEventListener(A.TaskCompleted, p), document.addEventListener(A.TaskClosed, p), document.addEventListener(A.Refresh, p), () => {
|
1008
|
+
document.removeEventListener(A.TaskCompleted, p), document.removeEventListener(A.TaskClosed, p), document.removeEventListener(A.Refresh, p);
|
1010
1009
|
}));
|
1011
1010
|
const h = {
|
1012
1011
|
fetchTasks: b,
|
@@ -1020,28 +1019,28 @@ const Kr = function(e) {
|
|
1020
1019
|
langProgressOnClick: v,
|
1021
1020
|
taskTitleOnClick: y
|
1022
1021
|
};
|
1023
|
-
return /* @__PURE__ */ s(
|
1024
|
-
},
|
1022
|
+
return /* @__PURE__ */ s(Ft.Provider, { value: h, children: e });
|
1023
|
+
}, ba = (e) => function(n) {
|
1025
1024
|
const { config: a, ...o } = n;
|
1026
|
-
return /* @__PURE__ */ s(
|
1027
|
-
},
|
1028
|
-
const [e, t] = I(!1), { tasksCount: n } =
|
1025
|
+
return /* @__PURE__ */ s(ha, { config: a, children: /* @__PURE__ */ s(e, { ...o }) });
|
1026
|
+
}, Ta = ba(() => {
|
1027
|
+
const [e, t] = I(!1), { tasksCount: n } = Z();
|
1029
1028
|
return $e(() => {
|
1030
1029
|
const a = () => {
|
1031
1030
|
t(!0);
|
1032
1031
|
};
|
1033
|
-
return document.addEventListener(
|
1034
|
-
document.removeEventListener(
|
1032
|
+
return document.addEventListener(A.ShowDialog, a), () => {
|
1033
|
+
document.removeEventListener(A.ShowDialog, a);
|
1035
1034
|
};
|
1036
1035
|
}), /* @__PURE__ */ s(q, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
|
1037
|
-
|
1036
|
+
cn,
|
1038
1037
|
{
|
1039
|
-
content: /* @__PURE__ */ s(
|
1038
|
+
content: /* @__PURE__ */ s(fa, {}),
|
1040
1039
|
placement: "right",
|
1041
1040
|
open: e,
|
1042
1041
|
onOpenChange: t,
|
1043
1042
|
middlewares: [
|
1044
|
-
|
1043
|
+
Fr({
|
1045
1044
|
// Adding some spacing to the top and bottom so the popover
|
1046
1045
|
// doesn't extend to the edges of the screen.
|
1047
1046
|
padding: {
|
@@ -1051,58 +1050,58 @@ const Kr = function(e) {
|
|
1051
1050
|
})
|
1052
1051
|
],
|
1053
1052
|
children: (a) => /* @__PURE__ */ f(
|
1054
|
-
|
1053
|
+
xe,
|
1055
1054
|
{
|
1056
1055
|
type: "button",
|
1057
1056
|
"data-testid": "sidebar-tasks-widget-button",
|
1058
1057
|
"aria-label": "Tasks",
|
1059
|
-
className: j(
|
1060
|
-
[
|
1058
|
+
className: j(je.navItem, {
|
1059
|
+
[je.activeNavItem]: a
|
1061
1060
|
}),
|
1062
1061
|
children: [
|
1063
|
-
/* @__PURE__ */ s(
|
1064
|
-
n > 0 && /* @__PURE__ */ s("div", { className:
|
1062
|
+
/* @__PURE__ */ s(ln, { size: "25px" }),
|
1063
|
+
n > 0 && /* @__PURE__ */ s("div", { className: je.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
1065
1064
|
]
|
1066
1065
|
}
|
1067
1066
|
)
|
1068
1067
|
}
|
1069
1068
|
) });
|
1070
|
-
}), R = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className:
|
1071
|
-
R.Top =
|
1072
|
-
const
|
1073
|
-
R.Bottom =
|
1074
|
-
R.Avatar =
|
1075
|
-
R.IconLink =
|
1076
|
-
R.Menu =
|
1077
|
-
R.ProfileMenu =
|
1078
|
-
R.TeamSwitch =
|
1079
|
-
R.TeamMenuItem =
|
1080
|
-
R.UpgradeMenuItem =
|
1081
|
-
R.ProfileSettingsMenuItem =
|
1082
|
-
R.Tasks =
|
1083
|
-
const
|
1084
|
-
breadcrumbsItem:
|
1085
|
-
breadcrumbs:
|
1086
|
-
},
|
1069
|
+
}), R = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: qn.sidebarContainer, children: e }), va = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1070
|
+
R.Top = va;
|
1071
|
+
const ya = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1072
|
+
R.Bottom = ya;
|
1073
|
+
R.Avatar = Gn;
|
1074
|
+
R.IconLink = zn;
|
1075
|
+
R.Menu = Qn;
|
1076
|
+
R.ProfileMenu = br;
|
1077
|
+
R.TeamSwitch = Nr;
|
1078
|
+
R.TeamMenuItem = Dt;
|
1079
|
+
R.UpgradeMenuItem = Mr;
|
1080
|
+
R.ProfileSettingsMenuItem = yr;
|
1081
|
+
R.Tasks = Ta;
|
1082
|
+
const Ea = "_breadcrumbsItem_1hm6a_1", Sa = "_breadcrumbs_1hm6a_1", yt = {
|
1083
|
+
breadcrumbsItem: Ea,
|
1084
|
+
breadcrumbs: Sa
|
1085
|
+
}, Xo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ f(Pt, { children: [
|
1087
1086
|
/* @__PURE__ */ s(M, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1088
1087
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1089
|
-
] }, `${t.link}-${t.name}`)) }),
|
1088
|
+
] }, `${t.link}-${t.name}`)) }), Ca = ({ items: e }) => /* @__PURE__ */ s(He, { children: e.map((t, n) => /* @__PURE__ */ f(Pt, { children: [
|
1090
1089
|
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(kt, {}),
|
1091
1090
|
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)) }),
|
1093
|
-
badge:
|
1091
|
+
] }, t[0].label)) }), wa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15", Pa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Ra = "_disabled_1pc1v_57", ka = "_projectNavigationItem_1pc1v_61", Ia = "_projectNavigationItemDisabled_1pc1v_67", L = {
|
1092
|
+
badge: wa,
|
1094
1093
|
tag: Aa,
|
1095
|
-
withNavLinkStyle:
|
1096
|
-
disabled:
|
1097
|
-
projectNavigationItem:
|
1098
|
-
projectNavigationItemDisabled:
|
1094
|
+
withNavLinkStyle: Pa,
|
1095
|
+
disabled: Ra,
|
1096
|
+
projectNavigationItem: ka,
|
1097
|
+
projectNavigationItemDisabled: Ia
|
1099
1098
|
}, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ f("div", { className: "flex gap-1", children: [
|
1100
1099
|
/* @__PURE__ */ f("div", { children: [
|
1101
1100
|
/* @__PURE__ */ s("span", { children: e }),
|
1102
1101
|
!!t && /* @__PURE__ */ s("div", { className: L.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1103
1102
|
] }),
|
1104
|
-
!!n && /* @__PURE__ */ s(
|
1105
|
-
] }),
|
1103
|
+
!!n && /* @__PURE__ */ s(Oe, { className: L.tag, children: n })
|
1104
|
+
] }), Me = nn(
|
1106
1105
|
({ 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
1106
|
"div",
|
1108
1107
|
{
|
@@ -1123,8 +1122,8 @@ const Sa = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
|
1123
1122
|
}
|
1124
1123
|
) })
|
1125
1124
|
);
|
1126
|
-
|
1127
|
-
const
|
1125
|
+
Me.displayName = "NavigationTabsItem";
|
1126
|
+
const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Na = (e) => e.visible && (!e.dropdown || ja(e.dropdown)), Vo = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Na).map((n) => {
|
1128
1127
|
var a, o, i;
|
1129
1128
|
return n.dropdown ? /* @__PURE__ */ s(
|
1130
1129
|
"li",
|
@@ -1133,10 +1132,10 @@ const Na = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1133
1132
|
"data-testid": n.key,
|
1134
1133
|
"aria-selected": (a = n.isActive) == null ? void 0 : a.call(n, t),
|
1135
1134
|
children: /* @__PURE__ */ s(
|
1136
|
-
|
1135
|
+
le,
|
1137
1136
|
{
|
1138
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */ s(
|
1139
|
-
children: /* @__PURE__ */ s(
|
1137
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ s(Me, { label: n.label, disabled: n.disabled, active: c }),
|
1138
|
+
children: /* @__PURE__ */ s(ue, { children: /* @__PURE__ */ s(Ca, { items: n.dropdown }) })
|
1140
1139
|
}
|
1141
1140
|
)
|
1142
1141
|
},
|
@@ -1148,7 +1147,7 @@ const Na = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1148
1147
|
"data-testid": n.key,
|
1149
1148
|
"aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
|
1150
1149
|
children: /* @__PURE__ */ s(
|
1151
|
-
|
1150
|
+
Me,
|
1152
1151
|
{
|
1153
1152
|
label: n.label,
|
1154
1153
|
href: n.link,
|
@@ -1303,10 +1302,10 @@ class k {
|
|
1303
1302
|
return Object.assign({}, ...n);
|
1304
1303
|
}
|
1305
1304
|
}
|
1306
|
-
function
|
1307
|
-
return new
|
1305
|
+
function Kt(e) {
|
1306
|
+
return new Oa(e);
|
1308
1307
|
}
|
1309
|
-
class
|
1308
|
+
class Oa {
|
1310
1309
|
constructor(t) {
|
1311
1310
|
this.middleware = t;
|
1312
1311
|
}
|
@@ -1317,17 +1316,17 @@ class xa {
|
|
1317
1316
|
});
|
1318
1317
|
}
|
1319
1318
|
}
|
1320
|
-
const
|
1319
|
+
const zt = r.union([
|
1321
1320
|
r.literal("owner"),
|
1322
1321
|
r.literal("admin"),
|
1323
1322
|
r.literal("biller"),
|
1324
1323
|
r.literal("member")
|
1325
|
-
]),
|
1324
|
+
]), xa = r.object({
|
1326
1325
|
userId: r.number(),
|
1327
1326
|
userUuid: r.string().uuid(),
|
1328
1327
|
teamId: r.number(),
|
1329
1328
|
teamUuid: r.string().uuid(),
|
1330
|
-
userTeamRole:
|
1329
|
+
userTeamRole: zt,
|
1331
1330
|
userEmail: r.string().email(),
|
1332
1331
|
userName: r.string(),
|
1333
1332
|
userCurrentTeamId: r.number(),
|
@@ -1337,251 +1336,251 @@ const Jt = r.union([
|
|
1337
1336
|
isFullyAuthenticated: r.boolean(),
|
1338
1337
|
exp: r.number()
|
1339
1338
|
});
|
1340
|
-
function
|
1339
|
+
function ee(e) {
|
1341
1340
|
try {
|
1342
1341
|
const t = e.split(".")[1], n = atob(t);
|
1343
|
-
return
|
1342
|
+
return xa.parse(JSON.parse(n));
|
1344
1343
|
} catch {
|
1345
1344
|
return;
|
1346
1345
|
}
|
1347
1346
|
}
|
1348
|
-
class
|
1347
|
+
class ie extends Error {
|
1349
1348
|
constructor() {
|
1350
1349
|
super(...arguments);
|
1351
|
-
|
1352
|
-
|
1350
|
+
re(this, "name", "UnauthorizedError");
|
1351
|
+
re(this, "status", 401);
|
1353
1352
|
}
|
1354
1353
|
}
|
1355
|
-
function
|
1356
|
-
return
|
1354
|
+
function Zo(e) {
|
1355
|
+
return Kt(async (t) => {
|
1357
1356
|
var i, c;
|
1358
1357
|
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
1359
1358
|
if (!n)
|
1360
|
-
throw new
|
1361
|
-
const { exp: a } =
|
1362
|
-
if (!
|
1359
|
+
throw new ie();
|
1360
|
+
const { exp: a } = ee(n.accessToken) ?? { exp: 0 };
|
1361
|
+
if (!dn(new Date(a)))
|
1363
1362
|
return t.add("authorization", `Bearer ${n.accessToken}`);
|
1364
1363
|
const o = await e.refreshToken(n);
|
1365
1364
|
if (!o)
|
1366
|
-
throw new
|
1365
|
+
throw new ie();
|
1367
1366
|
return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
|
1368
1367
|
});
|
1369
1368
|
}
|
1370
|
-
const
|
1369
|
+
const es = Kt(
|
1371
1370
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1372
1371
|
);
|
1373
|
-
function
|
1374
|
-
const e =
|
1372
|
+
function Jt() {
|
1373
|
+
const e = Ue(document.cookie, "accessToken"), t = Ue(document.cookie, "refreshToken");
|
1375
1374
|
return !e || !t ? null : { accessToken: e, refreshToken: t };
|
1376
1375
|
}
|
1377
|
-
function
|
1378
|
-
return
|
1376
|
+
function La() {
|
1377
|
+
return Ue(document.cookie, "csrf_token") ?? null;
|
1379
1378
|
}
|
1380
|
-
function
|
1379
|
+
function Ue(e, t) {
|
1381
1380
|
var n, a;
|
1382
1381
|
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
1382
|
}
|
1384
|
-
function
|
1385
|
-
const e =
|
1383
|
+
function ts() {
|
1384
|
+
const e = Jt();
|
1386
1385
|
if (!e)
|
1387
1386
|
return;
|
1388
|
-
const t =
|
1387
|
+
const t = ee(e.accessToken);
|
1389
1388
|
if (t)
|
1390
1389
|
return { ...e, payload: t };
|
1391
1390
|
}
|
1392
|
-
const
|
1391
|
+
const Wt = r.union([
|
1393
1392
|
r.object({ authorization: r.string() }),
|
1394
1393
|
r.object({ AUTHORIZATION: r.string() })
|
1395
|
-
]),
|
1394
|
+
]), Ma = r.union([
|
1396
1395
|
r.object({ "X-API-Token": r.string() }),
|
1397
1396
|
r.object({ "X-Api-Token": r.string() }),
|
1398
1397
|
r.object({ "x-api-token": r.string() }),
|
1399
1398
|
r.object({ "X-API-TOKEN": r.string() })
|
1399
|
+
]), Ua = r.union([
|
1400
|
+
Wt,
|
1401
|
+
Ma
|
1400
1402
|
]), Ha = r.union([
|
1401
|
-
Qt,
|
1402
|
-
Ua
|
1403
|
-
]), Ba = r.union([
|
1404
1403
|
r.object({ "X-Lokalise-Plugin": r.string() }),
|
1405
1404
|
r.object({ "x-lokalise-plugin": r.string() }),
|
1406
1405
|
r.object({ "X-LOKALISE-PLUGIN": r.string() })
|
1407
|
-
]), U =
|
1406
|
+
]), U = Ua.and(Ha), Ba = r.object({
|
1408
1407
|
accessToken: r.string(),
|
1409
1408
|
refreshToken: r.string()
|
1410
|
-
}),
|
1409
|
+
}), qa = r.union([
|
1411
1410
|
r.object({ "X-Csrf-Token": r.string() }),
|
1412
1411
|
r.object({ "X-CSRF-Token": r.string() }),
|
1413
1412
|
r.object({ "x-csrf-token": r.string() }),
|
1414
1413
|
r.object({ "X-CSRF-TOKEN": r.string() })
|
1415
|
-
]),
|
1416
|
-
|
1417
|
-
|
1418
|
-
]), Ge =
|
1414
|
+
]), Da = r.union([
|
1415
|
+
Wt,
|
1416
|
+
qa
|
1417
|
+
]), Ge = Q({
|
1419
1418
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1420
1419
|
method: "post",
|
1421
1420
|
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
1422
1421
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1423
|
-
requestHeaderSchema:
|
1422
|
+
requestHeaderSchema: Da,
|
1424
1423
|
requestBodySchema: r.undefined(),
|
1425
1424
|
isEmptyResponseExpected: !0,
|
1426
|
-
successResponseBodySchema:
|
1425
|
+
successResponseBodySchema: Ba
|
1427
1426
|
});
|
1428
|
-
function
|
1427
|
+
function ns(e, t, n) {
|
1429
1428
|
return async () => {
|
1430
1429
|
const a = t();
|
1431
1430
|
if (!a)
|
1432
|
-
throw new
|
1431
|
+
throw new ie();
|
1433
1432
|
return D(e, Ge, {
|
1434
1433
|
pathParams: { teamId: Number(await n()) },
|
1435
1434
|
headers: await k.create().add("x-csrf-token", a).resolve()
|
1436
1435
|
});
|
1437
1436
|
};
|
1438
1437
|
}
|
1439
|
-
function
|
1438
|
+
function rs(e) {
|
1440
1439
|
return async ({ accessToken: t, refreshToken: n }) => {
|
1441
|
-
const a =
|
1440
|
+
const a = ee(t);
|
1442
1441
|
if (!a)
|
1443
|
-
throw new
|
1442
|
+
throw new ie();
|
1444
1443
|
return D(e, Ge, {
|
1445
1444
|
pathParams: { teamId: a.teamId },
|
1446
1445
|
headers: await k.create().add("authorization", `Bearer ${n}`).resolve()
|
1447
1446
|
});
|
1448
1447
|
};
|
1449
1448
|
}
|
1450
|
-
const
|
1449
|
+
const $a = {
|
1451
1450
|
teamKey: (e) => ["getUserToken", e]
|
1452
|
-
},
|
1451
|
+
}, Ga = (e, t, n) => $({
|
1453
1452
|
...n,
|
1454
1453
|
queryFn: async ({ queryKey: [a, o] }) => D(e, Ge, {
|
1455
1454
|
headers: await t.resolve(),
|
1456
1455
|
pathParams: { teamId: o }
|
1457
1456
|
})
|
1458
|
-
}),
|
1457
|
+
}), ce = class ce extends CustomEvent {
|
1459
1458
|
constructor(t) {
|
1460
|
-
super(
|
1461
|
-
detail: { token: t, payload:
|
1459
|
+
super(ce.eventName, {
|
1460
|
+
detail: { token: t, payload: ee(t.accessToken) }
|
1462
1461
|
});
|
1463
1462
|
}
|
1464
1463
|
};
|
1465
|
-
|
1466
|
-
let z =
|
1467
|
-
function
|
1468
|
-
const a =
|
1469
|
-
queryKey:
|
1464
|
+
re(ce, "eventName", "new-jwt-issued");
|
1465
|
+
let z = ce;
|
1466
|
+
function as(e, t, n) {
|
1467
|
+
const a = La(), o = Ga(e, t.add("x-csrf-token", a ?? ""), {
|
1468
|
+
queryKey: $a.teamKey(n),
|
1470
1469
|
enabled: a !== void 0
|
1471
1470
|
}), i = Ct();
|
1472
1471
|
return J(() => {
|
1473
1472
|
o.data && o.data.accessToken !== i.current && (window.dispatchEvent(new z(o.data)), i.current = o.data.accessToken);
|
1474
1473
|
}, [o.data]), o;
|
1475
1474
|
}
|
1476
|
-
function
|
1475
|
+
function Qt() {
|
1477
1476
|
const [e, t] = I();
|
1478
1477
|
return J(() => {
|
1479
1478
|
const n = (o) => {
|
1480
1479
|
t(o.detail.payload);
|
1481
|
-
}, a =
|
1482
|
-
return t(a ?
|
1480
|
+
}, a = Jt();
|
1481
|
+
return t(a ? ee(a.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
|
1483
1482
|
window.removeEventListener(z.eventName, n);
|
1484
1483
|
};
|
1485
1484
|
}, []), e;
|
1486
1485
|
}
|
1487
|
-
const
|
1486
|
+
const Fa = U, Ka = r.object({
|
1488
1487
|
user_id: r.number(),
|
1489
1488
|
email: r.string().email(),
|
1490
1489
|
fullname: r.string(),
|
1491
1490
|
created_at: r.string(),
|
1492
1491
|
created_at_timestamp: r.number(),
|
1493
|
-
role:
|
1494
|
-
}),
|
1492
|
+
role: zt
|
1493
|
+
}), za = r.object({
|
1495
1494
|
teamId: r.number(),
|
1496
1495
|
userId: r.number()
|
1497
|
-
}),
|
1496
|
+
}), Ja = r.object({
|
1498
1497
|
team_id: r.number(),
|
1499
|
-
team_user:
|
1500
|
-
}),
|
1498
|
+
team_user: Ka
|
1499
|
+
}), Wa = Y({
|
1501
1500
|
description: "Get the details of a team user",
|
1502
|
-
requestHeaderSchema:
|
1503
|
-
requestPathParamsSchema:
|
1501
|
+
requestHeaderSchema: Fa,
|
1502
|
+
requestPathParamsSchema: za,
|
1504
1503
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1505
|
-
successResponseBodySchema:
|
1506
|
-
}),
|
1504
|
+
successResponseBodySchema: Ja
|
1505
|
+
}), Qa = {
|
1507
1506
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1508
|
-
},
|
1507
|
+
}, Ya = (e, t, n) => $({
|
1509
1508
|
...n,
|
1510
|
-
queryFn: async ({ queryKey: [a, o, i] }) =>
|
1509
|
+
queryFn: async ({ queryKey: [a, o, i] }) => X(e, Wa, {
|
1511
1510
|
headers: await t.resolve(),
|
1512
1511
|
pathParams: { teamId: o, userId: i }
|
1513
1512
|
})
|
1514
1513
|
});
|
1515
|
-
function
|
1516
|
-
const n =
|
1517
|
-
return
|
1518
|
-
queryKey:
|
1514
|
+
function os(e, t) {
|
1515
|
+
const n = Qt();
|
1516
|
+
return Ya(e, t, {
|
1517
|
+
queryKey: Qa.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1519
1518
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1520
1519
|
});
|
1521
1520
|
}
|
1522
|
-
const
|
1521
|
+
const ss = U, Xa = r.object({
|
1523
1522
|
lang_id: r.number(),
|
1524
1523
|
lang_iso: r.string(),
|
1525
1524
|
lang_name: r.string(),
|
1526
1525
|
is_writable: r.union([r.literal(0), r.literal(1)])
|
1527
|
-
}),
|
1526
|
+
}), Va = r.object({
|
1528
1527
|
user_id: r.number(),
|
1529
1528
|
email: r.string().email(),
|
1530
1529
|
fullname: r.string(),
|
1531
1530
|
created_at: r.string(),
|
1532
1531
|
created_at_timestamp: r.number(),
|
1533
1532
|
admin_rights: r.array(r.string()),
|
1534
|
-
languages: r.array(
|
1533
|
+
languages: r.array(Xa),
|
1535
1534
|
is_admin: r.boolean(),
|
1536
1535
|
is_reviewer: r.boolean()
|
1537
|
-
}),
|
1536
|
+
}), Za = r.union([
|
1538
1537
|
r.object({ uuid: r.string().uuid() }),
|
1539
1538
|
r.object({ id: r.string() })
|
1540
|
-
]),
|
1539
|
+
]), eo = r.union([
|
1541
1540
|
r.object({ authenticatedUser: r.literal(!0) }),
|
1542
1541
|
r.object({ uuid: r.string().uuid() }),
|
1543
1542
|
r.object({ id: r.number() })
|
1544
|
-
]),
|
1545
|
-
project:
|
1546
|
-
contributor:
|
1547
|
-
}),
|
1543
|
+
]), to = r.object({
|
1544
|
+
project: Za,
|
1545
|
+
contributor: eo
|
1546
|
+
}), no = r.object({
|
1548
1547
|
project_id: r.string(),
|
1549
|
-
contributor:
|
1550
|
-
}),
|
1548
|
+
contributor: Va
|
1549
|
+
}), ro = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, ao = (e) => "uuid" in e ? e.uuid : e.id, oo = Y({
|
1551
1550
|
description: "Get the details of a project contributor",
|
1552
1551
|
requestHeaderSchema: U,
|
1553
|
-
requestPathParamsSchema:
|
1554
|
-
pathResolver: ({ project: e, contributor: t }) => `/projects/${
|
1555
|
-
successResponseBodySchema:
|
1556
|
-
}),
|
1552
|
+
requestPathParamsSchema: to,
|
1553
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${ao(e)}/contributors/${ro(t)}`,
|
1554
|
+
successResponseBodySchema: no
|
1555
|
+
}), so = {
|
1557
1556
|
projectUserKey: (e) => ["RetrieveContributor", e]
|
1558
|
-
},
|
1557
|
+
}, io = (e, t, n) => $({
|
1559
1558
|
...n,
|
1560
|
-
queryFn: async ({ queryKey: [a, o] }) =>
|
1559
|
+
queryFn: async ({ queryKey: [a, o] }) => X(e, oo, {
|
1561
1560
|
pathParams: o,
|
1562
1561
|
headers: await t.resolve()
|
1563
1562
|
})
|
1564
1563
|
});
|
1565
|
-
function
|
1566
|
-
const a =
|
1567
|
-
return
|
1568
|
-
queryKey:
|
1564
|
+
function is(e, t, n) {
|
1565
|
+
const a = Qt(), o = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
|
1566
|
+
return io(e, t, {
|
1567
|
+
queryKey: so.projectUserKey({ project: { id: n }, contributor: o }),
|
1569
1568
|
enabled: a !== void 0
|
1570
1569
|
});
|
1571
1570
|
}
|
1572
|
-
const
|
1571
|
+
const co = r.object({
|
1573
1572
|
lang_iso: r.string(),
|
1574
1573
|
custom_iso: r.string().optional()
|
1575
|
-
}),
|
1574
|
+
}), lo = r.object({
|
1576
1575
|
language_id: r.number(),
|
1577
1576
|
language_iso: r.string(),
|
1578
1577
|
progress: r.number(),
|
1579
1578
|
words_to_do: r.number(),
|
1580
1579
|
project_language_id: r.number(),
|
1581
1580
|
project_language_uuid: r.string().uuid()
|
1582
|
-
}),
|
1581
|
+
}), uo = r.object({
|
1583
1582
|
projectId: r.string()
|
1584
|
-
}),
|
1583
|
+
}), Yt = r.object({
|
1585
1584
|
lang_id: r.number(),
|
1586
1585
|
lang_iso: r.string(),
|
1587
1586
|
lang_name: r.string(),
|
@@ -1589,13 +1588,13 @@ const lo = r.object({
|
|
1589
1588
|
plural_forms: r.array(r.string().optional()),
|
1590
1589
|
project_language_id: r.string(),
|
1591
1590
|
project_language_uuid: r.string().uuid()
|
1592
|
-
}),
|
1591
|
+
}), mo = r.object({
|
1593
1592
|
project_id: r.string(),
|
1594
1593
|
project_uuid: r.string().uuid(),
|
1595
|
-
languages: r.array(
|
1596
|
-
}),
|
1594
|
+
languages: r.array(Yt)
|
1595
|
+
}), _o = r.object({
|
1597
1596
|
projectId: r.string()
|
1598
|
-
}),
|
1597
|
+
}), go = r.object({
|
1599
1598
|
languages: r.array(
|
1600
1599
|
r.object({
|
1601
1600
|
lang_iso: r.string(),
|
@@ -1604,10 +1603,10 @@ const lo = r.object({
|
|
1604
1603
|
custom_plural_forms: r.array(r.string()).optional()
|
1605
1604
|
})
|
1606
1605
|
)
|
1607
|
-
}),
|
1606
|
+
}), po = r.object({
|
1608
1607
|
project_id: r.string(),
|
1609
1608
|
project_uuid: r.string().uuid(),
|
1610
|
-
languages: r.array(
|
1609
|
+
languages: r.array(Yt),
|
1611
1610
|
errors: r.array(
|
1612
1611
|
r.object({
|
1613
1612
|
message: r.string(),
|
@@ -1615,44 +1614,44 @@ const lo = r.object({
|
|
1615
1614
|
lang_iso: r.string()
|
1616
1615
|
})
|
1617
1616
|
).optional()
|
1618
|
-
}),
|
1617
|
+
}), fo = r.object({
|
1619
1618
|
projectId: r.string()
|
1620
|
-
}),
|
1619
|
+
}), ho = r.object({
|
1621
1620
|
langs: r.array(
|
1622
1621
|
r.object({
|
1623
1622
|
lang_iso: r.string(),
|
1624
1623
|
base_lang: r.boolean()
|
1625
1624
|
})
|
1626
1625
|
)
|
1627
|
-
}),
|
1626
|
+
}), bo = r.object({
|
1628
1627
|
result: r.boolean()
|
1629
|
-
}),
|
1628
|
+
}), To = Y({
|
1630
1629
|
description: "List of project languages",
|
1631
1630
|
requestHeaderSchema: U,
|
1632
|
-
requestPathParamsSchema:
|
1631
|
+
requestPathParamsSchema: uo,
|
1633
1632
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1634
|
-
successResponseBodySchema:
|
1635
|
-
}),
|
1633
|
+
successResponseBodySchema: mo
|
1634
|
+
}), cs = Q({
|
1636
1635
|
description: "Add languages to existing project",
|
1637
1636
|
requestHeaderSchema: U,
|
1638
1637
|
method: "post",
|
1639
|
-
requestPathParamsSchema:
|
1638
|
+
requestPathParamsSchema: _o,
|
1640
1639
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1641
|
-
requestBodySchema:
|
1642
|
-
successResponseBodySchema:
|
1643
|
-
}),
|
1640
|
+
requestBodySchema: go,
|
1641
|
+
successResponseBodySchema: po
|
1642
|
+
}), vo = Q({
|
1644
1643
|
description: "Bulk update project languages",
|
1645
1644
|
requestHeaderSchema: U,
|
1646
1645
|
method: "put",
|
1647
|
-
requestPathParamsSchema:
|
1646
|
+
requestPathParamsSchema: fo,
|
1648
1647
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1649
|
-
requestBodySchema:
|
1650
|
-
successResponseBodySchema:
|
1651
|
-
}),
|
1648
|
+
requestBodySchema: ho,
|
1649
|
+
successResponseBodySchema: bo
|
1650
|
+
}), de = U, Fe = r.union([
|
1652
1651
|
r.literal("localization_files"),
|
1653
1652
|
r.literal("paged_documents"),
|
1654
1653
|
r.literal("marketing")
|
1655
|
-
]),
|
1654
|
+
]), yo = r.object({
|
1656
1655
|
per_platform_key_names: r.boolean(),
|
1657
1656
|
reviewing: r.boolean(),
|
1658
1657
|
auto_toggle_unverified: r.boolean(),
|
@@ -1663,7 +1662,7 @@ const lo = r.object({
|
|
1663
1662
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
1664
1663
|
segmentation: r.boolean(),
|
1665
1664
|
contributor_preview_download_enabled: r.boolean()
|
1666
|
-
}),
|
1665
|
+
}), Eo = r.object({
|
1667
1666
|
not_reviewed: r.number(),
|
1668
1667
|
unverified: r.number(),
|
1669
1668
|
spelling_grammar: r.number(),
|
@@ -1680,15 +1679,15 @@ const lo = r.object({
|
|
1680
1679
|
double_space: r.number(),
|
1681
1680
|
special_placeholder: r.number(),
|
1682
1681
|
unbalanced_brackets: r.number()
|
1683
|
-
}),
|
1682
|
+
}), So = r.object({
|
1684
1683
|
progress_total: r.number(),
|
1685
1684
|
keys_total: r.number(),
|
1686
1685
|
team: r.number(),
|
1687
1686
|
base_words: r.number(),
|
1688
1687
|
qa_issues_total: r.number(),
|
1689
|
-
qa_issues:
|
1690
|
-
languages: r.array(
|
1691
|
-
}),
|
1688
|
+
qa_issues: Eo,
|
1689
|
+
languages: r.array(lo)
|
1690
|
+
}), me = r.object({
|
1692
1691
|
project_id: r.string(),
|
1693
1692
|
uuid: r.string().uuid(),
|
1694
1693
|
project_type: Fe,
|
@@ -1704,16 +1703,16 @@ const lo = r.object({
|
|
1704
1703
|
base_language_iso: r.string(),
|
1705
1704
|
base_project_language_id: r.number(),
|
1706
1705
|
base_project_language_uuid: r.string().uuid(),
|
1707
|
-
settings:
|
1708
|
-
statistics:
|
1709
|
-
}),
|
1706
|
+
settings: yo.optional(),
|
1707
|
+
statistics: So.optional()
|
1708
|
+
}), Co = r.object({
|
1710
1709
|
name: r.string(),
|
1711
1710
|
team_id: r.string(),
|
1712
1711
|
base_lang_iso: r.string(),
|
1713
|
-
languages: r.array(
|
1712
|
+
languages: r.array(co),
|
1714
1713
|
project_type: Fe,
|
1715
1714
|
is_segmentation_enabled: r.boolean()
|
1716
|
-
}), St = r.union([r.literal(0), r.literal(1)]),
|
1715
|
+
}), St = r.union([r.literal(0), r.literal(1)]), wo = r.object({
|
1717
1716
|
filter_type: Fe.optional(),
|
1718
1717
|
filter_team_id: r.number().optional(),
|
1719
1718
|
filter_names: r.string().optional(),
|
@@ -1722,101 +1721,101 @@ const lo = r.object({
|
|
1722
1721
|
limit: r.number().optional(),
|
1723
1722
|
page: r.number().optional()
|
1724
1723
|
}), Ao = r.object({
|
1725
|
-
projects: r.array(
|
1724
|
+
projects: r.array(me)
|
1725
|
+
}), Po = r.object({
|
1726
|
+
project_id: r.string()
|
1726
1727
|
}), Ro = r.object({
|
1727
1728
|
project_id: r.string()
|
1728
1729
|
}), ko = r.object({
|
1729
|
-
project_id: r.string()
|
1730
|
-
}), Io = r.object({
|
1731
1730
|
name: r.string().min(1),
|
1732
1731
|
description: r.string().optional()
|
1733
|
-
}),
|
1732
|
+
}), _e = () => "/projects", Io = Q({
|
1734
1733
|
description: "Create a new project",
|
1735
|
-
requestHeaderSchema:
|
1734
|
+
requestHeaderSchema: de,
|
1736
1735
|
method: "post",
|
1737
|
-
pathResolver:
|
1738
|
-
requestBodySchema:
|
1739
|
-
successResponseBodySchema:
|
1740
|
-
}),
|
1736
|
+
pathResolver: _e,
|
1737
|
+
requestBodySchema: Co,
|
1738
|
+
successResponseBodySchema: me
|
1739
|
+
}), jo = Y({
|
1741
1740
|
description: "List all projects",
|
1742
|
-
requestHeaderSchema:
|
1743
|
-
pathResolver:
|
1744
|
-
requestQuerySchema:
|
1741
|
+
requestHeaderSchema: de,
|
1742
|
+
pathResolver: _e,
|
1743
|
+
requestQuerySchema: wo,
|
1745
1744
|
successResponseBodySchema: Ao
|
1746
|
-
}),
|
1745
|
+
}), No = Y({
|
1747
1746
|
description: "Retrieve a project",
|
1748
|
-
requestHeaderSchema:
|
1749
|
-
requestPathParamsSchema:
|
1750
|
-
pathResolver: ({ project_id: e }) => `${
|
1751
|
-
successResponseBodySchema:
|
1752
|
-
}),
|
1747
|
+
requestHeaderSchema: de,
|
1748
|
+
requestPathParamsSchema: Po,
|
1749
|
+
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1750
|
+
successResponseBodySchema: me
|
1751
|
+
}), Oo = Q({
|
1753
1752
|
description: "Update a project",
|
1754
|
-
requestHeaderSchema:
|
1753
|
+
requestHeaderSchema: de,
|
1755
1754
|
method: "put",
|
1756
|
-
requestPathParamsSchema:
|
1757
|
-
pathResolver: ({ project_id: e }) => `${
|
1758
|
-
requestBodySchema:
|
1759
|
-
successResponseBodySchema:
|
1755
|
+
requestPathParamsSchema: Ro,
|
1756
|
+
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1757
|
+
requestBodySchema: ko,
|
1758
|
+
successResponseBodySchema: me
|
1760
1759
|
});
|
1761
|
-
function
|
1760
|
+
function ls(e, t, n = {}) {
|
1762
1761
|
return Be({
|
1763
1762
|
...n,
|
1764
|
-
mutationFn: async (a) => D(e,
|
1763
|
+
mutationFn: async (a) => D(e, Io, {
|
1765
1764
|
headers: await t.resolve(),
|
1766
1765
|
body: a
|
1767
1766
|
})
|
1768
1767
|
});
|
1769
1768
|
}
|
1770
|
-
const
|
1769
|
+
const us = {
|
1771
1770
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1772
1771
|
};
|
1773
|
-
function
|
1772
|
+
function ds(e, t, n) {
|
1774
1773
|
return $({
|
1775
1774
|
...n,
|
1776
|
-
queryFn: async ({ queryKey: [a, o] }) =>
|
1775
|
+
queryFn: async ({ queryKey: [a, o] }) => X(e, To, {
|
1777
1776
|
headers: await t.resolve(),
|
1778
1777
|
pathParams: { projectId: o }
|
1779
1778
|
})
|
1780
1779
|
});
|
1781
1780
|
}
|
1782
|
-
const
|
1781
|
+
const ms = {
|
1783
1782
|
paramsKey: (e) => ["listProjects", e]
|
1784
1783
|
};
|
1785
|
-
function
|
1784
|
+
function _s(e, t, n) {
|
1786
1785
|
return $({
|
1787
1786
|
...n,
|
1788
|
-
queryFn: async ({ queryKey: [a, o] }) =>
|
1787
|
+
queryFn: async ({ queryKey: [a, o] }) => X(e, jo, {
|
1789
1788
|
headers: await t.resolve(),
|
1790
1789
|
queryParams: o
|
1791
1790
|
})
|
1792
1791
|
});
|
1793
1792
|
}
|
1794
|
-
const
|
1793
|
+
const gs = {
|
1795
1794
|
projectIdKey: (e) => ["retrieveProject", e]
|
1796
1795
|
};
|
1797
|
-
function
|
1796
|
+
function ps(e, t, n) {
|
1798
1797
|
return $({
|
1799
1798
|
...n,
|
1800
|
-
queryFn: async ({ queryKey: [a, o] }) =>
|
1799
|
+
queryFn: async ({ queryKey: [a, o] }) => X(e, No, {
|
1801
1800
|
headers: await t.resolve(),
|
1802
1801
|
pathParams: { project_id: o }
|
1803
1802
|
})
|
1804
1803
|
});
|
1805
1804
|
}
|
1806
|
-
function
|
1805
|
+
function fs(e, t, n, a = {}) {
|
1807
1806
|
return Be({
|
1808
1807
|
...a,
|
1809
|
-
mutationFn: async (o) => D(e,
|
1808
|
+
mutationFn: async (o) => D(e, Oo, {
|
1810
1809
|
headers: await t.resolve(),
|
1811
1810
|
body: o,
|
1812
1811
|
pathParams: n
|
1813
1812
|
})
|
1814
1813
|
});
|
1815
1814
|
}
|
1816
|
-
function
|
1815
|
+
function hs(e, t, n, a = {}) {
|
1817
1816
|
return Be({
|
1818
1817
|
...a,
|
1819
|
-
mutationFn: async (o) => D(e,
|
1818
|
+
mutationFn: async (o) => D(e, vo, {
|
1820
1819
|
pathParams: t,
|
1821
1820
|
headers: await n.resolve(),
|
1822
1821
|
body: o
|
@@ -1824,106 +1823,106 @@ function Ts(e, t, n, a = {}) {
|
|
1824
1823
|
});
|
1825
1824
|
}
|
1826
1825
|
export {
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1826
|
+
_o as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1827
|
+
go as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1828
|
+
po as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1829
|
+
fo as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1830
|
+
ho as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1831
|
+
bo as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1832
|
+
Xo as Breadcrumbs,
|
1833
|
+
ss as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1834
|
+
Xa as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1835
|
+
Va as CONTRIBUTOR_SCHEMA,
|
1836
|
+
Co as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1837
|
+
Bt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1838
|
+
lr as ENTERPRISE_PLAN_IDS,
|
1839
|
+
ir as ESSENTIAL_PLAN_IDS,
|
1840
|
+
Ht as FREE_PLAN_ID,
|
1842
1841
|
k as HeaderBuilder,
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1842
|
+
Ba as JWT_TOKEN_SCHEMA,
|
1843
|
+
Zo as JwtAuthHeaderBuilderMiddleware,
|
1844
|
+
co as LANGUAGE_ISO_SCHEMA,
|
1845
|
+
Yt as LANGUAGE_SCHEMA,
|
1846
|
+
lo as LANGUAGE_STATISTICS_SCHEMA,
|
1847
|
+
wo as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1849
1848
|
Ao as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1850
|
-
|
1851
|
-
|
1852
|
-
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1849
|
+
uo as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1850
|
+
mo as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1851
|
+
se as NavigationPanel,
|
1852
|
+
Vo as NavigationTabs,
|
1853
|
+
de as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1854
|
+
Eo as PROJECT_QA_ISSUES_SCHEMA,
|
1855
|
+
me as PROJECT_SCHEMA,
|
1856
|
+
yo as PROJECT_SETTINGS_SCHEMA,
|
1857
|
+
So as PROJECT_STATISTICS_SCHEMA,
|
1859
1858
|
Fe as PROJECT_TYPE_SCHEMA,
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1859
|
+
cr as PRO_PLAN_IDS,
|
1860
|
+
es as PublicApiHeaderBuilderMiddleware,
|
1861
|
+
to as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1862
|
+
no as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1863
|
+
Po as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1864
|
+
sr as START_PLAN_IDS,
|
1866
1865
|
R as Sidebar,
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1866
|
+
P as SidebarTaskLanguageStatuses,
|
1867
|
+
Le as SidebarTaskStatuses,
|
1868
|
+
ae as SidebarTaskTypeOptions,
|
1869
|
+
zt as TEAM_ROLE_SCHEMA,
|
1870
|
+
Fa as TEAM_USER_API_BASE_HEADERS_SCHEMA,
|
1871
|
+
za as TEAM_USER_PATH_PARAMS_SCHEMA,
|
1872
|
+
Ja as TEAM_USER_RESPONSE_SCHEMA,
|
1873
|
+
Ka as TEAM_USER_SCHEMA,
|
1874
|
+
or as TRIAL_PLAN_ID,
|
1875
|
+
Ro as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1876
|
+
ko as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1877
|
+
Da as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1878
|
+
ie as UnauthorizedError,
|
1879
|
+
cs as addLanguagesToProject,
|
1880
|
+
vo as bulkUpdateProjectLanguages,
|
1881
|
+
mr as convertNewLineToBreakTag,
|
1882
|
+
Kt as createHeaderBuilderMiddleware,
|
1883
|
+
Io as createProject,
|
1884
|
+
fr as formatDate,
|
1885
|
+
Yo as formatDateTz,
|
1886
|
+
ns as generateTokenFromClassicSession,
|
1887
|
+
ts as getAuthenticatedSessionDetailFromRequest,
|
1888
|
+
La as getCsrfTokenFromCookie,
|
1889
|
+
Jt as getJwtTokenFromCookie,
|
1890
|
+
Wa as getTeamUser,
|
1891
|
+
Qa as getTeamUsersQueryKey,
|
1893
1892
|
Ge as getUserToken,
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1893
|
+
$a as getUserTokenKey,
|
1894
|
+
Qo as isEnterpriseOpenSourcePlan,
|
1895
|
+
Jo as isEnterprisePlan,
|
1896
|
+
Ko as isEssentialPlan,
|
1898
1897
|
De as isFreePlan,
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1898
|
+
Wo as isPaidPlan,
|
1899
|
+
zo as isProPlan,
|
1900
|
+
Fo as isStartPlan,
|
1901
|
+
qt as isTrialPlan,
|
1902
|
+
To as listProjectLanguages,
|
1903
|
+
us as listProjectLanguagesKey,
|
1904
|
+
jo as listProjects,
|
1905
|
+
ms as listProjectsKey,
|
1906
|
+
pr as makeUrlClickable,
|
1907
|
+
ee as parseJwtTokenPayload,
|
1908
|
+
rs as refreshExpiredToken,
|
1909
|
+
oo as retrieveContributor,
|
1910
|
+
so as retrieveContributorKeys,
|
1911
|
+
No as retrieveProject,
|
1912
|
+
gs as retrieveProjectQueryKey,
|
1913
|
+
Oo as updateProject,
|
1914
|
+
is as useAuthenticatedProjectContributor,
|
1915
|
+
Qt as useAuthenticatedSessionPayload,
|
1916
|
+
os as useAuthenticatedUser,
|
1917
|
+
hs as useBulkUpdateProjectLanguagesMutation,
|
1918
|
+
ls as useCreateProjectMutation,
|
1920
1919
|
$e as useEffectOnce,
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1920
|
+
as as useGetPromotedClassicSessionJwtQuery,
|
1921
|
+
Ya as useGetTeamUsersQuery,
|
1922
|
+
Ga as useGetUserTokenQuery,
|
1923
|
+
ds as useListProjectLanguagesQuery,
|
1924
|
+
_s as useListProjectsQuery,
|
1925
|
+
io as useRetrieveContributorQuery,
|
1926
|
+
ps as useRetrieveProjectQuery,
|
1927
|
+
fs as useUpdateProjectMutation
|
1929
1928
|
};
|