@lokalise/harmony 1.22.1 → 1.23.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 +1075 -1025
- package/dist/types/src/features/publicApi/contributors.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useGetScoreQuery.d.ts +21 -0
- package/dist/types/src/features/publicApi/languages.d.ts +3 -3
- package/dist/types/src/features/publicApi/node.d.ts +2 -0
- package/dist/types/src/features/publicApi/projects.d.ts +4 -4
- package/dist/types/src/features/publicApi/score.d.ts +102 -0
- package/dist/types/src/features/publicApi/teamUsers.d.ts +1 -1
- package/dist/types/src/features/publicApi/types/scoreTypes.d.ts +65 -0
- package/dist/types/src/features/publicApi/userToken.d.ts +1 -1
- package/package.json +7 -8
package/dist/harmony.mjs
CHANGED
@@ -1,162 +1,161 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { jsx as
|
5
|
-
import * as
|
6
|
-
import { useRef as Ct, useState as I, useCallback as
|
7
|
-
import { Tooltip as
|
8
|
-
import { format as It, parseISO as
|
9
|
-
import { toZonedTime as
|
10
|
-
import { z as
|
11
|
-
import { buildPayloadRoute as
|
12
|
-
import { sendByPayloadRoute as
|
13
|
-
import { useQuery as
|
14
|
-
|
15
|
-
const xe = {
|
1
|
+
var Zt = Object.defineProperty;
|
2
|
+
var en = (e, t, r) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
|
+
var re = (e, t, r) => en(e, typeof t != "symbol" ? t + "" : t, r);
|
4
|
+
import { jsx as o, jsxs as h, Fragment as He } from "react/jsx-runtime";
|
5
|
+
import * as z from "react";
|
6
|
+
import { useRef as Ct, useState as I, useCallback as Qe, useEffect as Q, useContext as Pt, createContext as wt, cloneElement as tn, Fragment as At, forwardRef as nn } from "react";
|
7
|
+
import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as sn, Tag as Oe, Button as xe, Loading as on, 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
|
+
import { z as n } from "zod";
|
11
|
+
import { buildPayloadRoute as Y, buildGetRoute as X } from "@lokalise/api-contracts";
|
12
|
+
import { sendByPayloadRoute as $, sendByGetRoute as G } from "@lokalise/frontend-http-client";
|
13
|
+
import { useQuery as H, useMutation as qe } from "@tanstack/react-query";
|
14
|
+
const Le = {
|
16
15
|
Completed: "completed",
|
17
16
|
InProgress: "in_progress",
|
18
17
|
Created: "created",
|
19
18
|
Queued: "queued"
|
20
19
|
}, A = {
|
21
|
-
...
|
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 se = 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
|
34
|
-
function
|
35
|
-
if (
|
36
|
-
|
32
|
+
var pe, We;
|
33
|
+
function Be() {
|
34
|
+
if (We) return pe;
|
35
|
+
We = 1;
|
37
36
|
function e(t) {
|
38
|
-
var
|
39
|
-
return t != null && (
|
37
|
+
var r = typeof t;
|
38
|
+
return t != null && (r == "object" || r == "function");
|
40
39
|
}
|
41
|
-
return
|
40
|
+
return pe = e, pe;
|
42
41
|
}
|
43
|
-
var
|
44
|
-
function
|
45
|
-
if (Ye) return
|
42
|
+
var he, Ye;
|
43
|
+
function _n() {
|
44
|
+
if (Ye) return he;
|
46
45
|
Ye = 1;
|
47
|
-
var e = typeof
|
48
|
-
return
|
46
|
+
var e = typeof se == "object" && se && se.Object === Object && se;
|
47
|
+
return he = e, he;
|
49
48
|
}
|
50
49
|
var fe, Xe;
|
51
|
-
function
|
50
|
+
function Nt() {
|
52
51
|
if (Xe) return fe;
|
53
52
|
Xe = 1;
|
54
|
-
var e =
|
55
|
-
return fe =
|
53
|
+
var e = _n(), t = typeof self == "object" && self && self.Object === Object && self, r = e || t || Function("return this")();
|
54
|
+
return fe = r, fe;
|
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
|
-
function t(
|
72
|
-
for (var a =
|
70
|
+
function t(r) {
|
71
|
+
for (var a = r.length; a-- && e.test(r.charAt(a)); )
|
73
72
|
;
|
74
73
|
return a;
|
75
74
|
}
|
76
|
-
return
|
75
|
+
return Te = t, Te;
|
77
76
|
}
|
78
|
-
var
|
77
|
+
var ve, et;
|
79
78
|
function hn() {
|
80
|
-
if (et) return
|
79
|
+
if (et) return ve;
|
81
80
|
et = 1;
|
82
|
-
var e =
|
83
|
-
function
|
81
|
+
var e = pn(), t = /^\s+/;
|
82
|
+
function r(a) {
|
84
83
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
85
84
|
}
|
86
|
-
return
|
85
|
+
return ve = r, ve;
|
87
86
|
}
|
88
|
-
var
|
89
|
-
function
|
90
|
-
if (tt) return
|
87
|
+
var Se, tt;
|
88
|
+
function Ot() {
|
89
|
+
if (tt) return Se;
|
91
90
|
tt = 1;
|
92
|
-
var e =
|
93
|
-
return
|
91
|
+
var e = Nt(), t = e.Symbol;
|
92
|
+
return Se = t, Se;
|
94
93
|
}
|
95
94
|
var ye, nt;
|
96
|
-
function
|
95
|
+
function fn() {
|
97
96
|
if (nt) return ye;
|
98
97
|
nt = 1;
|
99
|
-
var e =
|
98
|
+
var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, a = t.toString, s = e ? e.toStringTag : void 0;
|
100
99
|
function i(c) {
|
101
|
-
var u =
|
100
|
+
var u = r.call(c, s), d = c[s];
|
102
101
|
try {
|
103
|
-
c[
|
102
|
+
c[s] = void 0;
|
104
103
|
var l = !0;
|
105
104
|
} catch {
|
106
105
|
}
|
107
106
|
var m = a.call(c);
|
108
|
-
return l && (u ? c[
|
107
|
+
return l && (u ? c[s] = d : delete c[s]), m;
|
109
108
|
}
|
110
109
|
return ye = i, ye;
|
111
110
|
}
|
112
111
|
var Ee, rt;
|
113
|
-
function
|
112
|
+
function bn() {
|
114
113
|
if (rt) return Ee;
|
115
114
|
rt = 1;
|
116
115
|
var e = Object.prototype, t = e.toString;
|
117
|
-
function
|
116
|
+
function r(a) {
|
118
117
|
return t.call(a);
|
119
118
|
}
|
120
|
-
return Ee =
|
119
|
+
return Ee = r, Ee;
|
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 = fn(), r = bn(), a = "[object Null]", s = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
126
|
function c(u) {
|
128
|
-
return u == null ? u === void 0 ?
|
127
|
+
return u == null ? u === void 0 ? s : a : i && i in Object(u) ? t(u) : r(u);
|
129
128
|
}
|
130
|
-
return
|
129
|
+
return Ce = c, Ce;
|
131
130
|
}
|
132
|
-
var
|
133
|
-
function
|
134
|
-
if (
|
135
|
-
|
131
|
+
var Pe, st;
|
132
|
+
function vn() {
|
133
|
+
if (st) return Pe;
|
134
|
+
st = 1;
|
136
135
|
function e(t) {
|
137
136
|
return t != null && typeof t == "object";
|
138
137
|
}
|
139
|
-
return
|
138
|
+
return Pe = e, Pe;
|
140
139
|
}
|
141
|
-
var we,
|
142
|
-
function
|
143
|
-
if (
|
144
|
-
|
145
|
-
var e =
|
146
|
-
function a(
|
147
|
-
return typeof
|
140
|
+
var we, ot;
|
141
|
+
function Sn() {
|
142
|
+
if (ot) return we;
|
143
|
+
ot = 1;
|
144
|
+
var e = Tn(), t = vn(), r = "[object Symbol]";
|
145
|
+
function a(s) {
|
146
|
+
return typeof s == "symbol" || t(s) && e(s) == r;
|
148
147
|
}
|
149
148
|
return we = a, we;
|
150
149
|
}
|
151
|
-
var
|
152
|
-
function
|
153
|
-
if (it) return
|
150
|
+
var Ae, it;
|
151
|
+
function yn() {
|
152
|
+
if (it) return Ae;
|
154
153
|
it = 1;
|
155
|
-
var e = hn(), t =
|
154
|
+
var e = hn(), t = Be(), r = Sn(), a = NaN, s = /^[-+]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;
|
159
|
-
if (
|
158
|
+
if (r(l))
|
160
159
|
return a;
|
161
160
|
if (t(l)) {
|
162
161
|
var m = typeof l.valueOf == "function" ? l.valueOf() : l;
|
@@ -166,122 +165,122 @@ function Sn() {
|
|
166
165
|
return l === 0 ? l : +l;
|
167
166
|
l = e(l);
|
168
167
|
var g = i.test(l);
|
169
|
-
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) :
|
168
|
+
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : s.test(l) ? a : +l;
|
170
169
|
}
|
171
|
-
return
|
170
|
+
return Ae = d, Ae;
|
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 =
|
176
|
+
var e = Be(), t = gn(), r = yn(), a = "Expected a function", s = Math.max, i = Math.min;
|
178
177
|
function c(u, d, l) {
|
179
|
-
var m, g, v,
|
178
|
+
var m, g, v, S, _, E, b = 0, p = !1, f = !1, T = !0;
|
180
179
|
if (typeof u != "function")
|
181
180
|
throw new TypeError(a);
|
182
|
-
d =
|
183
|
-
function
|
184
|
-
var N = m,
|
185
|
-
return m = g = void 0, b =
|
181
|
+
d = r(d) || 0, e(l) && (p = !!l.leading, f = "maxWait" in l, v = f ? s(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
|
182
|
+
function P(y) {
|
183
|
+
var N = m, F = g;
|
184
|
+
return m = g = void 0, b = y, S = u.apply(F, N), S;
|
186
185
|
}
|
187
|
-
function C(
|
188
|
-
return b =
|
186
|
+
function C(y) {
|
187
|
+
return b = y, _ = setTimeout(ne, d), p ? P(y) : S;
|
189
188
|
}
|
190
|
-
function
|
191
|
-
var N =
|
192
|
-
return
|
189
|
+
function te(y) {
|
190
|
+
var N = y - E, F = y - b, Je = d - N;
|
191
|
+
return f ? i(Je, v - F) : Je;
|
193
192
|
}
|
194
|
-
function Ke(
|
195
|
-
var N =
|
196
|
-
return
|
193
|
+
function Ke(y) {
|
194
|
+
var N = y - E, F = y - b;
|
195
|
+
return E === void 0 || N >= d || N < 0 || f && F >= v;
|
197
196
|
}
|
198
|
-
function
|
199
|
-
var
|
200
|
-
if (Ke(
|
201
|
-
return ze(
|
202
|
-
_ = setTimeout(
|
197
|
+
function ne() {
|
198
|
+
var y = t();
|
199
|
+
if (Ke(y))
|
200
|
+
return ze(y);
|
201
|
+
_ = setTimeout(ne, te(y));
|
203
202
|
}
|
204
|
-
function ze(
|
205
|
-
return _ = void 0, T && m ?
|
203
|
+
function ze(y) {
|
204
|
+
return _ = void 0, T && m ? P(y) : (m = g = void 0, S);
|
206
205
|
}
|
207
|
-
function
|
208
|
-
_ !== void 0 && clearTimeout(_), b = 0, m =
|
206
|
+
function Xt() {
|
207
|
+
_ !== void 0 && clearTimeout(_), b = 0, m = E = g = _ = void 0;
|
209
208
|
}
|
210
|
-
function
|
211
|
-
return _ === void 0 ?
|
209
|
+
function Vt() {
|
210
|
+
return _ === void 0 ? S : ze(t());
|
212
211
|
}
|
213
|
-
function
|
214
|
-
var
|
215
|
-
if (m = arguments, g = this,
|
212
|
+
function ge() {
|
213
|
+
var y = t(), N = Ke(y);
|
214
|
+
if (m = arguments, g = this, E = y, N) {
|
216
215
|
if (_ === void 0)
|
217
|
-
return C(
|
218
|
-
if (
|
219
|
-
return clearTimeout(_), _ = setTimeout(
|
216
|
+
return C(E);
|
217
|
+
if (f)
|
218
|
+
return clearTimeout(_), _ = setTimeout(ne, d), P(E);
|
220
219
|
}
|
221
|
-
return _ === void 0 && (_ = setTimeout(
|
220
|
+
return _ === void 0 && (_ = setTimeout(ne, d)), S;
|
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
|
226
|
+
var En = xt();
|
227
|
+
const Cn = /* @__PURE__ */ jt(En);
|
228
|
+
var ke, lt;
|
230
229
|
function Pn() {
|
231
|
-
if (lt) return
|
230
|
+
if (lt) return ke;
|
232
231
|
lt = 1;
|
233
|
-
var e =
|
234
|
-
function a(
|
232
|
+
var e = xt(), t = Be(), r = "Expected a function";
|
233
|
+
function a(s, i, c) {
|
235
234
|
var u = !0, d = !0;
|
236
|
-
if (typeof
|
237
|
-
throw new TypeError(
|
238
|
-
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(
|
235
|
+
if (typeof s != "function")
|
236
|
+
throw new TypeError(r);
|
237
|
+
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(s, i, {
|
239
238
|
leading: u,
|
240
239
|
maxWait: i,
|
241
240
|
trailing: d
|
242
241
|
});
|
243
242
|
}
|
244
|
-
return
|
243
|
+
return ke = a, ke;
|
245
244
|
}
|
246
|
-
var
|
247
|
-
const
|
245
|
+
var wn = Pn();
|
246
|
+
const An = /* @__PURE__ */ jt(wn), Rn = (e, t, r, a) => {
|
248
247
|
switch (t) {
|
249
248
|
case "debounce":
|
250
|
-
return
|
249
|
+
return Cn(e, r, a);
|
251
250
|
case "throttle":
|
252
|
-
return
|
251
|
+
return An(e, r, 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
|
-
const t =
|
260
|
-
return
|
258
|
+
const t = z.useRef(e);
|
259
|
+
return z.useEffect(() => {
|
261
260
|
t.current = e;
|
262
|
-
}),
|
261
|
+
}), z.useMemo(() => (...r) => {
|
263
262
|
var a;
|
264
|
-
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...
|
263
|
+
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...r);
|
265
264
|
}, []);
|
266
265
|
}
|
267
|
-
),
|
266
|
+
), In = (
|
268
267
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
268
|
(e) => {
|
270
|
-
const [t,
|
269
|
+
const [t, r] = z.useState((e == null ? void 0 : e.current) || null);
|
271
270
|
return e && setTimeout(() => {
|
272
|
-
e.current !== t &&
|
273
|
-
}, 0), { refProxy:
|
274
|
-
|
271
|
+
e.current !== t && r(e.current);
|
272
|
+
}, 0), { refProxy: z.useMemo(() => new Proxy((s) => {
|
273
|
+
s !== t && r(s);
|
275
274
|
}, {
|
276
|
-
get(
|
277
|
-
return i === "current" ? t :
|
275
|
+
get(s, i) {
|
276
|
+
return i === "current" ? t : s[i];
|
278
277
|
},
|
279
|
-
set(
|
280
|
-
return i === "current" ?
|
278
|
+
set(s, i, c) {
|
279
|
+
return i === "current" ? r(c) : s[i] = c, !0;
|
281
280
|
}
|
282
|
-
}), [t]), refElement: t, setRefElement:
|
281
|
+
}), [t]), refElement: t, setRefElement: r };
|
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,223 +290,223 @@ 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: r = 1e3, refreshOptions: a, handleWidth: s = !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:
|
299
|
-
if (!
|
297
|
+
}), { refProxy: S, refElement: _ } = In(c), { box: E } = u || {}, b = Qe((f) => {
|
298
|
+
if (!s && !i)
|
300
299
|
return;
|
301
300
|
if (l.current) {
|
302
301
|
l.current = !1;
|
303
302
|
return;
|
304
303
|
}
|
305
|
-
const T = (
|
306
|
-
|
307
|
-
const C =
|
308
|
-
v((
|
304
|
+
const T = (P, C) => s && P.width !== C.width || i && P.height !== C.height;
|
305
|
+
f.forEach((P) => {
|
306
|
+
const C = jn(P, E);
|
307
|
+
v((te) => T(te, C) ? (m == null || m({
|
309
308
|
width: C.width,
|
310
309
|
height: C.height,
|
311
|
-
entry:
|
312
|
-
}), C) :
|
310
|
+
entry: P
|
311
|
+
}), C) : te);
|
313
312
|
});
|
314
|
-
}, [
|
313
|
+
}, [s, i, l, E]), p = Qe(Rn(b, t, r, a), [
|
315
314
|
b,
|
316
315
|
t,
|
317
|
-
|
316
|
+
r,
|
318
317
|
a
|
319
318
|
]);
|
320
|
-
return
|
321
|
-
let
|
322
|
-
return _ ? (
|
319
|
+
return Q(() => {
|
320
|
+
let f;
|
321
|
+
return _ ? (f = new window.ResizeObserver(p), f.observe(_, u)) : (g.width || g.height) && (m == null || m({
|
323
322
|
width: null,
|
324
323
|
height: null,
|
325
324
|
entry: null
|
326
325
|
}), v({ width: void 0, height: void 0 })), () => {
|
327
|
-
var T,
|
328
|
-
(T =
|
326
|
+
var T, P, C;
|
327
|
+
(T = f == null ? void 0 : f.disconnect) === null || T === void 0 || T.call(f), (C = (P = p).cancel) === null || C === void 0 || C.call(P);
|
329
328
|
};
|
330
|
-
}, [p, _]), Object.assign({ ref:
|
329
|
+
}, [p, _]), Object.assign({ ref: S }, g);
|
331
330
|
}
|
332
|
-
function
|
333
|
-
var t,
|
331
|
+
function Lt(e) {
|
332
|
+
var t, r, a = "";
|
334
333
|
if (typeof e == "string" || typeof e == "number") a += e;
|
335
334
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
336
|
-
var
|
337
|
-
for (t = 0; t <
|
338
|
-
} else for (
|
335
|
+
var s = e.length;
|
336
|
+
for (t = 0; t < s; t++) e[t] && (r = Lt(e[t])) && (a && (a += " "), a += r);
|
337
|
+
} else for (r in e) e[r] && (a && (a += " "), a += r);
|
339
338
|
return a;
|
340
339
|
}
|
341
340
|
function j() {
|
342
|
-
for (var e, t,
|
341
|
+
for (var e, t, r = 0, a = "", s = arguments.length; r < s; r++) (e = arguments[r]) && (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:
|
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, oe = ({ sticky: e, children: t }) => {
|
351
|
+
const { ref: r, height: a } = Nn({
|
353
352
|
refreshMode: "debounce",
|
354
353
|
refreshRate: 0
|
355
|
-
}), [
|
356
|
-
|
354
|
+
}), [s, i] = I(!1), c = () => s ? !e : !0;
|
355
|
+
Q(() => {
|
357
356
|
const d = () => {
|
358
357
|
i(window.scrollY > 0);
|
359
358
|
};
|
360
359
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
361
360
|
}, []);
|
362
|
-
const u = `${a ||
|
363
|
-
return /* @__PURE__ */
|
361
|
+
const u = `${a || Hn}px`;
|
362
|
+
return /* @__PURE__ */ o("div", { style: { minHeight: u }, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ h(
|
364
363
|
"div",
|
365
364
|
{
|
366
|
-
ref:
|
365
|
+
ref: r,
|
367
366
|
className: j(B.headerContent, {
|
368
367
|
[B.staticEnabled]: c()
|
369
368
|
}),
|
370
369
|
children: [
|
371
|
-
/* @__PURE__ */
|
372
|
-
/* @__PURE__ */
|
370
|
+
/* @__PURE__ */ o(oe.Header, {}),
|
371
|
+
/* @__PURE__ */ o(oe.Tabs, {}),
|
373
372
|
t
|
374
373
|
]
|
375
374
|
}
|
376
375
|
) }) });
|
377
376
|
};
|
378
|
-
oe.Header = ({ children: e }) => /* @__PURE__ */
|
379
|
-
oe.Tabs = ({ children: e }) => /* @__PURE__ */
|
380
|
-
const qn = "_sidebarContainer_bmdti_1",
|
377
|
+
oe.Header = ({ children: e }) => /* @__PURE__ */ o("div", { className: B.headerContainer, children: e });
|
378
|
+
oe.Tabs = ({ children: e }) => /* @__PURE__ */ o("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
379
|
+
const qn = "_sidebarContainer_bmdti_1", Bn = {
|
381
380
|
sidebarContainer: qn
|
382
|
-
},
|
383
|
-
logoLink:
|
384
|
-
},
|
381
|
+
}, Dn = "_logoLink_1baxb_1", $n = {
|
382
|
+
logoLink: Dn
|
383
|
+
}, Gn = ({
|
385
384
|
src: e,
|
386
385
|
href: t = "/",
|
387
|
-
ariaLabel:
|
386
|
+
ariaLabel: r = "Lokalise App Home",
|
388
387
|
alt: a = "Lokalise Logo"
|
389
|
-
}) => /* @__PURE__ */
|
390
|
-
link:
|
391
|
-
active:
|
392
|
-
},
|
393
|
-
|
388
|
+
}) => /* @__PURE__ */ o("a", { className: $n.logoLink, href: t, "aria-label": r, children: /* @__PURE__ */ o("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: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ o(
|
392
|
+
U,
|
394
393
|
{
|
395
394
|
className: j(ut.link, {
|
396
395
|
[ut.active]: window.location.pathname.startsWith(t)
|
397
396
|
}),
|
398
397
|
href: t,
|
399
|
-
children: /* @__PURE__ */
|
398
|
+
children: /* @__PURE__ */ o(r, { size: "25px" })
|
400
399
|
}
|
401
|
-
) }),
|
402
|
-
dropdownButton:
|
400
|
+
) }), Jn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18", dt = {
|
401
|
+
dropdownButton: Jn,
|
403
402
|
dropdownButtonActive: Qn
|
404
|
-
},
|
405
|
-
|
403
|
+
}, Wn = ({ children: e, icon: t }) => /* @__PURE__ */ o(
|
404
|
+
le,
|
406
405
|
{
|
407
|
-
menuButton: ({ opened:
|
406
|
+
menuButton: ({ opened: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ o(
|
408
407
|
"button",
|
409
408
|
{
|
410
409
|
type: "button",
|
411
410
|
className: j(dt.dropdownButton, {
|
412
|
-
[dt.dropdownButtonActive]:
|
411
|
+
[dt.dropdownButtonActive]: r
|
413
412
|
}),
|
414
|
-
children: /* @__PURE__ */
|
413
|
+
children: /* @__PURE__ */ o(t, { size: "25px" })
|
415
414
|
}
|
416
415
|
) }),
|
417
|
-
children: /* @__PURE__ */
|
416
|
+
children: /* @__PURE__ */ o(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__ */ o(
|
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__ */
|
431
|
+
children: /* @__PURE__ */ o(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", L = {
|
434
|
+
menuContainer: Vn,
|
435
|
+
profileButton: Zn,
|
436
|
+
profileImage: er,
|
437
|
+
profileImageHighlight: tr,
|
438
|
+
profileImageUpgradeIcon: nr,
|
439
|
+
userIconWrapper: rr
|
440
|
+
}, Ut = wt({}), V = () => Pt(Ut), ar = ({ children: e }) => {
|
442
441
|
const {
|
443
442
|
currentTeam: t,
|
444
|
-
otherTeams:
|
443
|
+
otherTeams: r,
|
445
444
|
showUpgradeCta: a,
|
446
|
-
showBillingButton:
|
445
|
+
showBillingButton: s,
|
447
446
|
allowTeamCreation: i,
|
448
447
|
isProviderAlpha: c,
|
449
448
|
canAccessTeamSettings: u,
|
450
449
|
isEndOfTrialActive: d,
|
451
450
|
isTeamSuspended: l,
|
452
451
|
isFullyAuthenticated: m
|
453
|
-
} =
|
454
|
-
return /* @__PURE__ */
|
455
|
-
|
452
|
+
} = V();
|
453
|
+
return /* @__PURE__ */ o(
|
454
|
+
le,
|
456
455
|
{
|
457
|
-
menuButton: () => /* @__PURE__ */
|
458
|
-
t != null && t.logoUrl ? /* @__PURE__ */
|
456
|
+
menuButton: () => /* @__PURE__ */ h("button", { className: L.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
457
|
+
t != null && t.logoUrl ? /* @__PURE__ */ o(
|
459
458
|
"img",
|
460
459
|
{
|
461
460
|
src: t.logoUrl,
|
462
|
-
className: j(
|
463
|
-
[
|
461
|
+
className: j(L.profileImage, {
|
462
|
+
[L.profileImageHighlight]: a
|
464
463
|
}),
|
465
464
|
alt: "Team Logo"
|
466
465
|
}
|
467
|
-
) : /* @__PURE__ */
|
466
|
+
) : /* @__PURE__ */ o(
|
468
467
|
"div",
|
469
468
|
{
|
470
|
-
className: j(
|
471
|
-
[
|
469
|
+
className: j(L.userIconWrapper, "flex-row", "align-center", "items-center", {
|
470
|
+
[L.profileImageHighlight]: a
|
472
471
|
}),
|
473
|
-
children: /* @__PURE__ */
|
472
|
+
children: /* @__PURE__ */ o(Rt, { size: "25px" })
|
474
473
|
}
|
475
474
|
),
|
476
|
-
a && /* @__PURE__ */
|
475
|
+
a && /* @__PURE__ */ o(Mt, { className: L.profileImageUpgradeIcon })
|
477
476
|
] }),
|
478
|
-
children: /* @__PURE__ */
|
477
|
+
children: /* @__PURE__ */ o(ue, { placement: "right-end", className: L.menuContainer, children: e({
|
479
478
|
allowTeamCreation: i,
|
480
|
-
otherTeams:
|
479
|
+
otherTeams: r,
|
481
480
|
canAccessTeamSettings: u,
|
482
481
|
isEndOfTrialActive: d,
|
483
482
|
isTeamSuspended: l,
|
484
|
-
showBillingButton:
|
483
|
+
showBillingButton: s,
|
485
484
|
isProviderAlpha: c,
|
486
485
|
isFullyAuthenticated: m
|
487
486
|
}) })
|
488
487
|
}
|
489
488
|
);
|
490
|
-
},
|
489
|
+
}, Ht = 0, sr = 9999, or = [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], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === sr, Ws = (e) => or.includes(e), Ys = (e) => ir.includes(e), Xs = (e) => cr.includes(e), Vs = (e) => lr.includes(e), Zs = (e) => e > Ht && e < qt, eo = (e) => e === qt, ur = /\n/, mt = (e, t, r) => e.split(t).flatMap((a, s) => s !== 0 ? [tn(r, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((a) => typeof a == "string" ? mt(a, t, r) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ o("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, r) => {
|
491
490
|
const a = e.split(t);
|
492
491
|
if (a.length === 1)
|
493
492
|
return e;
|
494
|
-
const
|
495
|
-
return a[0] !== "" &&
|
496
|
-
/* @__PURE__ */
|
497
|
-
),
|
493
|
+
const s = [];
|
494
|
+
return a[0] !== "" && s.push(a[0]), a.shift(), a[a.length - 1] === "" && a.pop(), s.push(
|
495
|
+
/* @__PURE__ */ o("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + r)
|
496
|
+
), s.push(a.join(t)), s.filter((i) => i !== "");
|
498
497
|
}, gt = (e) => {
|
499
|
-
const t =
|
500
|
-
return t != null && t.length ? t.reduce((
|
501
|
-
},
|
502
|
-
|
498
|
+
const t = gr(e);
|
499
|
+
return t != null && t.length ? t.reduce((r, a, s) => typeof r == "string" ? _t(r, a, s) : r.flatMap((i) => typeof i == "string" ? _t(i, a, s) : i), e) : e;
|
500
|
+
}, pr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t), to = (e, t, r = "PP") => It(mn(e, t), r), $e = (e) => {
|
501
|
+
Q(e, []);
|
503
502
|
}, pt = {
|
504
503
|
biller: "biller",
|
505
504
|
owner: "owner"
|
506
|
-
},
|
505
|
+
}, ht = [
|
507
506
|
pt.biller,
|
508
507
|
pt.owner
|
509
|
-
],
|
510
|
-
const { teams:
|
508
|
+
], fr = ({ children: e, config: t }) => {
|
509
|
+
const { teams: r, currentTeamId: a, planId: s, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((p) => p.id === a), l = r.filter((p) => p.id !== a), m = ht.includes(u), g = ht.includes(u), v = De(s) || Bt(s), b = {
|
511
510
|
...t,
|
512
511
|
currentTeam: d,
|
513
512
|
otherTeams: l,
|
@@ -518,117 +517,117 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
518
517
|
showBillingButton: c && g && m,
|
519
518
|
allowTeamCreation: c && !i
|
520
519
|
};
|
521
|
-
return /* @__PURE__ */
|
522
|
-
},
|
523
|
-
container:
|
524
|
-
profileEmail:
|
525
|
-
},
|
520
|
+
return /* @__PURE__ */ o(Ut.Provider, { value: b, children: e });
|
521
|
+
}, br = ({ config: e, children: t }) => /* @__PURE__ */ o(fr, { config: e, children: /* @__PURE__ */ o(ar, { children: t }) }), Tr = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ft = {
|
522
|
+
container: Tr,
|
523
|
+
profileEmail: vr
|
524
|
+
}, Sr = ({
|
526
525
|
href: e,
|
527
526
|
onClick: t,
|
528
|
-
userEmail:
|
527
|
+
userEmail: r,
|
529
528
|
hideBottomDivider: a
|
530
529
|
}) => {
|
531
|
-
const { isEndOfTrialActive:
|
532
|
-
return
|
533
|
-
/* @__PURE__ */
|
530
|
+
const { isEndOfTrialActive: s, isTeamSuspended: i } = V();
|
531
|
+
return s || i ? null : /* @__PURE__ */ h(He, { children: [
|
532
|
+
/* @__PURE__ */ o(
|
534
533
|
W,
|
535
534
|
{
|
536
535
|
href: e,
|
537
536
|
onClick: () => {
|
538
537
|
t == null || t();
|
539
538
|
},
|
540
|
-
children: /* @__PURE__ */
|
541
|
-
/* @__PURE__ */
|
542
|
-
/* @__PURE__ */
|
539
|
+
children: /* @__PURE__ */ h("div", { className: `flex-col ${ft.container}`, children: [
|
540
|
+
/* @__PURE__ */ o("span", { children: "Profile Settings" }),
|
541
|
+
/* @__PURE__ */ o("span", { className: ft.profileEmail, children: r })
|
543
542
|
] })
|
544
543
|
}
|
545
544
|
),
|
546
|
-
!a && /* @__PURE__ */
|
545
|
+
!a && /* @__PURE__ */ o(kt, {})
|
547
546
|
] });
|
548
|
-
},
|
549
|
-
wrapper:
|
550
|
-
profileImage:
|
551
|
-
teamDetails:
|
547
|
+
}, yr = "_wrapper_1in7x_5", Er = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", wr = "_teamName_1in7x_36", Ar = "_planLabel_1in7x_45", Rr = "_membership_1in7x_53", kr = "_defaultProfileImage_1in7x_59", O = {
|
548
|
+
wrapper: yr,
|
549
|
+
profileImage: Er,
|
550
|
+
teamDetails: Cr,
|
552
551
|
planWrapper: Pr,
|
553
|
-
teamName:
|
554
|
-
planLabel:
|
555
|
-
membership:
|
556
|
-
defaultProfileImage:
|
557
|
-
},
|
558
|
-
const { currentTeam: a, planId:
|
552
|
+
teamName: wr,
|
553
|
+
planLabel: Ar,
|
554
|
+
membership: Rr,
|
555
|
+
defaultProfileImage: kr
|
556
|
+
}, Dt = ({ team: e, onClick: t, hidePlanLabel: r }) => {
|
557
|
+
const { currentTeam: a, planId: s } = V(), i = e || a;
|
559
558
|
if (!i)
|
560
559
|
return null;
|
561
|
-
const c = De(
|
562
|
-
return /* @__PURE__ */
|
560
|
+
const c = De(s) ? "Free" : Bt(s) ? "Trial" : void 0;
|
561
|
+
return /* @__PURE__ */ h(
|
563
562
|
t ? W : "div",
|
564
563
|
{
|
565
564
|
className: O.wrapper,
|
566
565
|
...t && { onClick: () => t(i) },
|
567
566
|
children: [
|
568
|
-
i.logoUrl ? /* @__PURE__ */
|
569
|
-
/* @__PURE__ */
|
570
|
-
/* @__PURE__ */
|
571
|
-
/* @__PURE__ */
|
572
|
-
c && !
|
567
|
+
i.logoUrl ? /* @__PURE__ */ o("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ o("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ o(Rt, { size: "25px" }) }),
|
568
|
+
/* @__PURE__ */ h("div", { className: O.teamDetails, children: [
|
569
|
+
/* @__PURE__ */ h("div", { className: O.planWrapper, children: [
|
570
|
+
/* @__PURE__ */ o("span", { className: O.teamName, children: i.name }),
|
571
|
+
c && !r && /* @__PURE__ */ o("span", { className: `${O.planLabel}`, children: c })
|
573
572
|
] }),
|
574
|
-
/* @__PURE__ */
|
573
|
+
/* @__PURE__ */ o("span", { className: O.membership, children: i.role })
|
575
574
|
] })
|
576
575
|
]
|
577
576
|
}
|
578
577
|
);
|
579
|
-
},
|
580
|
-
teamsContainer:
|
581
|
-
},
|
582
|
-
const { otherTeams: t } =
|
583
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
578
|
+
}, Ir = "_teamsContainer_1ncrr_5", jr = {
|
579
|
+
teamsContainer: Ir
|
580
|
+
}, Nr = ({ onSwitchTeam: e }) => {
|
581
|
+
const { otherTeams: t } = V();
|
582
|
+
return t.length === 0 ? null : /* @__PURE__ */ o(
|
584
583
|
"div",
|
585
584
|
{
|
586
585
|
"data-testid": "sidebar-team-switch",
|
587
|
-
className: `flex-col items-stretch ${
|
588
|
-
children: t.map((
|
586
|
+
className: `flex-col items-stretch ${jr.teamsContainer}`,
|
587
|
+
children: t.map((r) => /* @__PURE__ */ o(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
|
589
588
|
}
|
590
589
|
);
|
591
|
-
},
|
592
|
-
container:
|
593
|
-
planCta:
|
594
|
-
upgradeIconWrapper:
|
595
|
-
},
|
596
|
-
const { planId: t, trialDaysLeft:
|
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: r, showUpgradeCta: a } = V();
|
597
596
|
if (!a)
|
598
597
|
return null;
|
599
|
-
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${
|
600
|
-
return /* @__PURE__ */
|
598
|
+
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${r} ${r === 1 ? "day" : "days"}`;
|
599
|
+
return /* @__PURE__ */ h(
|
601
600
|
W,
|
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__ */
|
608
|
-
/* @__PURE__ */
|
609
|
-
/* @__PURE__ */
|
610
|
-
/* @__PURE__ */
|
606
|
+
/* @__PURE__ */ o("span", { className: Ie.planCta, children: c }),
|
607
|
+
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
|
608
|
+
/* @__PURE__ */ o(Mt, {}),
|
609
|
+
/* @__PURE__ */ o("span", { children: "See upgrade options" })
|
611
610
|
] })
|
612
611
|
]
|
613
612
|
}
|
614
613
|
);
|
615
|
-
},
|
616
|
-
function bt(e, t,
|
617
|
-
return
|
614
|
+
}, Ur = Math.min, Hr = Math.max;
|
615
|
+
function bt(e, t, r) {
|
616
|
+
return Hr(e, Ur(t, r));
|
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
624
|
function qr(e) {
|
626
625
|
return e === "x" ? "y" : "x";
|
627
626
|
}
|
628
|
-
function
|
629
|
-
return ["top", "bottom"].includes(
|
627
|
+
function Br(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,
|
@@ -648,27 +647,27 @@ function Gr(e) {
|
|
648
647
|
function Tt(e) {
|
649
648
|
const {
|
650
649
|
x: t,
|
651
|
-
y:
|
650
|
+
y: r,
|
652
651
|
width: a,
|
653
|
-
height:
|
652
|
+
height: s
|
654
653
|
} = e;
|
655
654
|
return {
|
656
655
|
width: a,
|
657
|
-
height:
|
658
|
-
top:
|
656
|
+
height: s,
|
657
|
+
top: r,
|
659
658
|
left: t,
|
660
659
|
right: t + a,
|
661
|
-
bottom:
|
660
|
+
bottom: r + s,
|
662
661
|
x: t,
|
663
|
-
y:
|
662
|
+
y: r
|
664
663
|
};
|
665
664
|
}
|
666
|
-
async function
|
667
|
-
var
|
665
|
+
async function Gr(e, t) {
|
666
|
+
var r;
|
668
667
|
t === void 0 && (t = {});
|
669
668
|
const {
|
670
669
|
x: a,
|
671
|
-
y:
|
670
|
+
y: s,
|
672
671
|
platform: i,
|
673
672
|
rects: c,
|
674
673
|
elements: u,
|
@@ -678,18 +677,18 @@ async function Fr(e, t) {
|
|
678
677
|
rootBoundary: m = "viewport",
|
679
678
|
elementContext: g = "floating",
|
680
679
|
altBoundary: v = !1,
|
681
|
-
padding:
|
682
|
-
} =
|
683
|
-
element: (
|
680
|
+
padding: S = 0
|
681
|
+
} = $t(t, e), _ = $r(S), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
|
682
|
+
element: (r = await (i.isElement == null ? void 0 : i.isElement(b))) == null || r ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
|
684
683
|
boundary: l,
|
685
684
|
rootBoundary: m,
|
686
685
|
strategy: d
|
687
|
-
})),
|
686
|
+
})), f = g === "floating" ? {
|
688
687
|
x: a,
|
689
|
-
y:
|
688
|
+
y: s,
|
690
689
|
width: c.floating.width,
|
691
690
|
height: c.floating.height
|
692
|
-
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)),
|
691
|
+
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), P = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
|
693
692
|
x: 1,
|
694
693
|
y: 1
|
695
694
|
} : {
|
@@ -697,26 +696,26 @@ async function Fr(e, t) {
|
|
697
696
|
y: 1
|
698
697
|
}, C = Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
699
698
|
elements: u,
|
700
|
-
rect:
|
699
|
+
rect: f,
|
701
700
|
offsetParent: T,
|
702
701
|
strategy: d
|
703
|
-
}) :
|
702
|
+
}) : f);
|
704
703
|
return {
|
705
|
-
top: (p.top - C.top + _.top) /
|
706
|
-
bottom: (C.bottom - p.bottom + _.bottom) /
|
707
|
-
left: (p.left - C.left + _.left) /
|
708
|
-
right: (C.right - p.right + _.right) /
|
704
|
+
top: (p.top - C.top + _.top) / P.y,
|
705
|
+
bottom: (C.bottom - p.bottom + _.bottom) / P.y,
|
706
|
+
left: (p.left - C.left + _.left) / P.x,
|
707
|
+
right: (C.right - p.right + _.right) / P.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,
|
715
714
|
async fn(t) {
|
716
715
|
const {
|
717
|
-
x:
|
716
|
+
x: r,
|
718
717
|
y: a,
|
719
|
-
placement:
|
718
|
+
placement: s
|
720
719
|
} = t, {
|
721
720
|
mainAxis: i = !0,
|
722
721
|
crossAxis: c = !1,
|
@@ -724,38 +723,38 @@ const Kr = function(e) {
|
|
724
723
|
fn: (b) => {
|
725
724
|
let {
|
726
725
|
x: p,
|
727
|
-
y:
|
726
|
+
y: f
|
728
727
|
} = b;
|
729
728
|
return {
|
730
729
|
x: p,
|
731
|
-
y:
|
730
|
+
y: f
|
732
731
|
};
|
733
732
|
}
|
734
733
|
},
|
735
734
|
...d
|
736
|
-
} =
|
737
|
-
x:
|
735
|
+
} = $t(e, t), l = {
|
736
|
+
x: r,
|
738
737
|
y: a
|
739
|
-
}, m = await
|
740
|
-
let
|
738
|
+
}, m = await Gr(t, d), g = Br(Gt(s)), v = qr(g);
|
739
|
+
let S = l[v], _ = l[g];
|
741
740
|
if (i) {
|
742
|
-
const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right",
|
743
|
-
|
741
|
+
const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", f = S + m[b], T = S - m[p];
|
742
|
+
S = bt(f, S, T);
|
744
743
|
}
|
745
744
|
if (c) {
|
746
|
-
const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right",
|
747
|
-
_ = bt(
|
745
|
+
const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", f = _ + m[b], T = _ - m[p];
|
746
|
+
_ = bt(f, _, T);
|
748
747
|
}
|
749
|
-
const
|
748
|
+
const E = u.fn({
|
750
749
|
...t,
|
751
|
-
[v]:
|
750
|
+
[v]: S,
|
752
751
|
[g]: _
|
753
752
|
});
|
754
753
|
return {
|
755
|
-
...
|
754
|
+
...E,
|
756
755
|
data: {
|
757
|
-
x:
|
758
|
-
y:
|
756
|
+
x: E.x - r,
|
757
|
+
y: E.y - a,
|
759
758
|
enabled: {
|
760
759
|
[v]: i,
|
761
760
|
[g]: c
|
@@ -764,14 +763,14 @@ const Kr = function(e) {
|
|
764
763
|
};
|
765
764
|
}
|
766
765
|
};
|
767
|
-
},
|
768
|
-
navItem:
|
769
|
-
activeNavItem:
|
770
|
-
badge:
|
771
|
-
},
|
772
|
-
const t = e.lastIndexOf("."),
|
773
|
-
return { name:
|
774
|
-
},
|
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 = wt({}), Z = () => Pt(Ft), Qr = (e) => {
|
771
|
+
const t = e.lastIndexOf("."), r = e.slice(0, t), a = e.slice(t + 1);
|
772
|
+
return { name: r, extension: a };
|
773
|
+
}, Wr = (e, t) => {
|
775
774
|
switch (e) {
|
776
775
|
case A.Completed:
|
777
776
|
return t < 100 ? "Closed" : "Completed";
|
@@ -786,31 +785,31 @@ const Kr = function(e) {
|
|
786
785
|
default:
|
787
786
|
return "-";
|
788
787
|
}
|
789
|
-
},
|
788
|
+
}, Yr = (e) => {
|
790
789
|
const t = e.progress ?? 0;
|
791
790
|
return e.status === A.Created && t > 0 ? A.InProgress : e.status;
|
792
|
-
},
|
793
|
-
[
|
794
|
-
[
|
795
|
-
[
|
796
|
-
[
|
797
|
-
},
|
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
798
|
A.InProgress,
|
800
799
|
A.Created,
|
801
800
|
A.Completed
|
802
801
|
];
|
803
|
-
return e.filter((
|
804
|
-
}, vt = (e) => [
|
805
|
-
const [
|
802
|
+
return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Yr(r) })).sort((r, a) => r.status === A.InProgress && r.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : r.status === a.status ? r.name < a.name ? 1 : -1 : t.indexOf(r.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 [r, a] = I(!1), [s, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
|
806
805
|
i(!1);
|
807
806
|
};
|
808
|
-
return /* @__PURE__ */
|
809
|
-
|
810
|
-
|
807
|
+
return /* @__PURE__ */ h(He, { children: [
|
808
|
+
s && /* @__PURE__ */ o(
|
809
|
+
an,
|
811
810
|
{
|
812
811
|
opened: !0,
|
813
|
-
loading:
|
812
|
+
loading: r,
|
814
813
|
title: `Are you finished with ${t.name}?`,
|
815
814
|
confirmText: "Mark as done",
|
816
815
|
closeText: "Cancel",
|
@@ -818,17 +817,17 @@ 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__ */
|
820
|
+
children: /* @__PURE__ */ h(sn, { status: "info", children: [
|
822
821
|
"Make sure you are finished and ",
|
823
|
-
/* @__PURE__ */
|
822
|
+
/* @__PURE__ */ o("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."
|
825
824
|
] })
|
826
825
|
}
|
827
826
|
),
|
828
|
-
/* @__PURE__ */
|
829
|
-
|
827
|
+
/* @__PURE__ */ o(
|
828
|
+
U,
|
830
829
|
{
|
831
|
-
disabled:
|
830
|
+
disabled: r,
|
832
831
|
onClick: () => {
|
833
832
|
i(!0);
|
834
833
|
},
|
@@ -836,93 +835,93 @@ const Kr = function(e) {
|
|
836
835
|
}
|
837
836
|
)
|
838
837
|
] });
|
839
|
-
},
|
840
|
-
langRowCompleted:
|
841
|
-
langCellSecondary:
|
842
|
-
langStatus:
|
843
|
-
},
|
844
|
-
const { getProjectUrl:
|
845
|
-
return /* @__PURE__ */
|
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: r, langNameOnClick: a, langProgressOnClick: s } = Z(), i = e.progress ?? 0, c = e.status === A.Completed, u = Zr(t, e);
|
844
|
+
return /* @__PURE__ */ h(
|
846
845
|
"tr",
|
847
846
|
{
|
848
847
|
className: j({
|
849
|
-
[
|
848
|
+
[Ne.langRowCompleted]: u
|
850
849
|
}),
|
851
850
|
children: [
|
852
|
-
/* @__PURE__ */
|
853
|
-
|
851
|
+
/* @__PURE__ */ o("td", { children: /* @__PURE__ */ o(D, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ o(
|
852
|
+
U,
|
854
853
|
{
|
855
|
-
href:
|
854
|
+
href: r({ task: t, language: e }),
|
856
855
|
onClick: () => {
|
857
856
|
a == null || a({ task: t, language: e });
|
858
857
|
},
|
859
858
|
children: e.name
|
860
859
|
}
|
861
860
|
) }) }),
|
862
|
-
/* @__PURE__ */
|
863
|
-
|
861
|
+
/* @__PURE__ */ o("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ o(D, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ o(
|
862
|
+
U,
|
864
863
|
{
|
865
|
-
href:
|
864
|
+
href: r({ task: t, language: e, taskUncompleted: !0 }),
|
866
865
|
onClick: () => {
|
867
|
-
|
866
|
+
s == null || s({ task: t, language: e });
|
868
867
|
},
|
869
868
|
children: e.base_words_total - e.base_words_done
|
870
869
|
}
|
871
870
|
) }) }),
|
872
|
-
/* @__PURE__ */
|
871
|
+
/* @__PURE__ */ h("td", { children: [
|
873
872
|
i,
|
874
873
|
"%"
|
875
874
|
] }),
|
876
|
-
/* @__PURE__ */
|
875
|
+
/* @__PURE__ */ o("td", { children: u ? /* @__PURE__ */ o(ea, { task: t, language: e }) : /* @__PURE__ */ o(
|
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: Wr(e.status, i)
|
882
881
|
}
|
883
882
|
) })
|
884
883
|
]
|
885
884
|
}
|
886
885
|
);
|
887
|
-
}, sa = "_taskContainer_mt2or_1",
|
886
|
+
}, sa = "_taskContainer_mt2or_1", oa = "_taskTitle_mt2or_21", ia = "_taskDescription_mt2or_28", ca = "_languagesTable_mt2or_35", la = "_metadata_mt2or_87", q = {
|
888
887
|
taskContainer: sa,
|
889
|
-
taskTitle:
|
890
|
-
taskDescription:
|
891
|
-
languagesTable:
|
892
|
-
metadata:
|
893
|
-
},
|
894
|
-
const { getProjectUrl: t, taskTitleOnClick:
|
888
|
+
taskTitle: oa,
|
889
|
+
taskDescription: ia,
|
890
|
+
languagesTable: ca,
|
891
|
+
metadata: la
|
892
|
+
}, ua = ({ task: e }) => {
|
893
|
+
const { getProjectUrl: t, taskTitleOnClick: r } = Z(), a = Vr(e.langs), s = (i) => {
|
895
894
|
window.open(
|
896
895
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
897
896
|
"_blank",
|
898
897
|
"noopener,noreferrer"
|
899
898
|
);
|
900
899
|
};
|
901
|
-
return /* @__PURE__ */
|
902
|
-
/* @__PURE__ */
|
903
|
-
/* @__PURE__ */
|
904
|
-
/* @__PURE__ */
|
905
|
-
e.due_date && /* @__PURE__ */
|
900
|
+
return /* @__PURE__ */ h("div", { className: q.taskContainer, children: [
|
901
|
+
/* @__PURE__ */ h("div", { className: "flex-row gap-1 items-center", children: [
|
902
|
+
/* @__PURE__ */ h("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
903
|
+
/* @__PURE__ */ o(Oe, { color: Xr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
904
|
+
e.due_date && /* @__PURE__ */ h(Oe, { color: "#EAB308", children: [
|
906
905
|
"DUE ",
|
907
|
-
hr(
|
906
|
+
hr(un(e.due_date), "yyyy-MM-dd")
|
908
907
|
] })
|
909
908
|
] }),
|
910
|
-
e.style_guides.length > 0 && /* @__PURE__ */
|
911
|
-
|
909
|
+
e.style_guides.length > 0 && /* @__PURE__ */ o("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ o(
|
910
|
+
xe,
|
912
911
|
{
|
913
912
|
size: "sm",
|
914
913
|
variant: "secondary",
|
915
|
-
onClick: () =>
|
914
|
+
onClick: () => s(e.style_guides[0]),
|
916
915
|
children: "Download style guide"
|
917
916
|
}
|
918
|
-
) : /* @__PURE__ */
|
919
|
-
|
917
|
+
) : /* @__PURE__ */ o(
|
918
|
+
le,
|
920
919
|
{
|
921
|
-
menuButton: /* @__PURE__ */
|
922
|
-
children: /* @__PURE__ */
|
920
|
+
menuButton: /* @__PURE__ */ o(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
921
|
+
children: /* @__PURE__ */ o(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ o(
|
923
922
|
W,
|
924
923
|
{
|
925
|
-
onClick: () =>
|
924
|
+
onClick: () => s(i),
|
926
925
|
children: Qr(i.name).name
|
927
926
|
},
|
928
927
|
i.id
|
@@ -930,118 +929,118 @@ const Kr = function(e) {
|
|
930
929
|
}
|
931
930
|
) })
|
932
931
|
] }),
|
933
|
-
/* @__PURE__ */
|
934
|
-
|
932
|
+
/* @__PURE__ */ o("h4", { className: q.taskTitle, children: /* @__PURE__ */ o(
|
933
|
+
U,
|
935
934
|
{
|
936
935
|
href: t({ task: e, view: "multi" }),
|
937
936
|
onClick: () => {
|
938
|
-
|
937
|
+
r == null || r({ task: e });
|
939
938
|
},
|
940
939
|
children: e.title
|
941
940
|
}
|
942
941
|
) }),
|
943
|
-
e.description && /* @__PURE__ */
|
944
|
-
/* @__PURE__ */
|
945
|
-
/* @__PURE__ */
|
946
|
-
/* @__PURE__ */
|
947
|
-
/* @__PURE__ */
|
948
|
-
/* @__PURE__ */
|
949
|
-
/* @__PURE__ */
|
942
|
+
e.description && /* @__PURE__ */ o("div", { className: q.taskDescription, children: mr(pr(e.description)) }),
|
943
|
+
/* @__PURE__ */ h("table", { className: q.languagesTable, children: [
|
944
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
945
|
+
/* @__PURE__ */ o("th", { children: "Languages" }),
|
946
|
+
/* @__PURE__ */ o("th", { children: "Words to do" }),
|
947
|
+
/* @__PURE__ */ o("th", { children: "Progress" }),
|
948
|
+
/* @__PURE__ */ o("th", { children: "Status" })
|
950
949
|
] }) }),
|
951
|
-
/* @__PURE__ */
|
950
|
+
/* @__PURE__ */ o("tbody", { children: a.map((i) => /* @__PURE__ */ o(aa, { language: i, task: e }, i.lang_id)) })
|
952
951
|
] }),
|
953
|
-
/* @__PURE__ */
|
954
|
-
/* @__PURE__ */
|
952
|
+
/* @__PURE__ */ h("div", { "data-testid": "sidebar-task-overview-metadata", className: q.metadata, children: [
|
953
|
+
/* @__PURE__ */ h("span", { children: [
|
955
954
|
"Source: ",
|
956
955
|
e.source_lang_name
|
957
956
|
] }),
|
958
|
-
/* @__PURE__ */
|
959
|
-
/* @__PURE__ */
|
957
|
+
/* @__PURE__ */ o("span", { children: e.created_by_fullname }),
|
958
|
+
/* @__PURE__ */ h("span", { children: [
|
960
959
|
"In ",
|
961
960
|
e.project_name,
|
962
|
-
e.master_branching_enabled === "1" && /* @__PURE__ */
|
961
|
+
e.master_branching_enabled === "1" && /* @__PURE__ */ o("div", { className: q.tag, children: e.branch_name ? e.branch_name : "master" })
|
963
962
|
] })
|
964
963
|
] })
|
965
964
|
] });
|
966
|
-
},
|
965
|
+
}, w = {
|
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:
|
970
|
+
}, da = "_loadingContainer_19d6m_1", ma = "_noTasksContainer_19d6m_7", _a = "_noTasksHeading_19d6m_14", ga = "_noTasksText_19d6m_18", pa = "_tasksContainer_19d6m_23", K = {
|
971
|
+
loadingContainer: da,
|
972
|
+
noTasksContainer: ma,
|
973
|
+
noTasksHeading: _a,
|
974
|
+
noTasksText: ga,
|
975
|
+
tasksContainer: pa
|
977
976
|
}, ha = () => {
|
978
|
-
const { tasks: e, onTasksWidgetOpen: t, loadingTasks:
|
977
|
+
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: r, 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
|
-
})),
|
985
|
-
/* @__PURE__ */
|
986
|
-
/* @__PURE__ */
|
981
|
+
})(), document.addEventListener(w.TaskCompleted, a), document.addEventListener(w.TaskClosed, a), document.addEventListener(w.Refresh, a), () => {
|
982
|
+
document.removeEventListener(w.TaskCompleted, a), document.removeEventListener(w.TaskClosed, a), document.removeEventListener(w.Refresh, a);
|
983
|
+
})), r ? /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-loading-popover", className: K.loadingContainer, children: /* @__PURE__ */ o(on, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: K.noTasksContainer, children: [
|
984
|
+
/* @__PURE__ */ o("h3", { className: K.noTasksHeading, children: "No tasks" }),
|
985
|
+
/* @__PURE__ */ h("div", { className: K.noTasksText, children: [
|
987
986
|
"Your incoming tasks will appear here.",
|
988
|
-
/* @__PURE__ */
|
989
|
-
/* @__PURE__ */
|
987
|
+
/* @__PURE__ */ o("br", {}),
|
988
|
+
/* @__PURE__ */ o(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
990
989
|
] })
|
991
|
-
] }) : /* @__PURE__ */
|
992
|
-
},
|
993
|
-
const [
|
990
|
+
] }) : /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-popover", className: K.tasksContainer, children: e.map((s) => /* @__PURE__ */ o(ua, { task: s }, s.id)) });
|
991
|
+
}, fa = ({ children: e, config: t }) => {
|
992
|
+
const [r, a] = I([]), [s, i] = I(!0), [c, u] = I(0), {
|
994
993
|
getProjectUrl: d,
|
995
994
|
onLanguageCompleteConfirm: l,
|
996
995
|
onTasksWidgetOpen: m,
|
997
996
|
langNameOnClick: g,
|
998
997
|
langProgressOnClick: v,
|
999
|
-
taskTitleOnClick:
|
1000
|
-
} = t, { getTasks: _, getTasksCount:
|
998
|
+
taskTitleOnClick: S
|
999
|
+
} = t, { getTasks: _, getTasksCount: E } = t, b = async () => {
|
1001
1000
|
i(!0);
|
1002
1001
|
const T = await _();
|
1003
1002
|
return a(T), i(!1), T;
|
1004
1003
|
}, p = async () => {
|
1005
|
-
const T = await
|
1004
|
+
const T = await E();
|
1006
1005
|
u(T);
|
1007
1006
|
};
|
1008
|
-
$e(() => (p(), document.addEventListener(
|
1009
|
-
document.removeEventListener(
|
1007
|
+
$e(() => (p(), document.addEventListener(w.TaskCompleted, p), document.addEventListener(w.TaskClosed, p), document.addEventListener(w.Refresh, p), () => {
|
1008
|
+
document.removeEventListener(w.TaskCompleted, p), document.removeEventListener(w.TaskClosed, p), document.removeEventListener(w.Refresh, p);
|
1010
1009
|
}));
|
1011
|
-
const
|
1010
|
+
const f = {
|
1012
1011
|
fetchTasks: b,
|
1013
|
-
tasks:
|
1012
|
+
tasks: r,
|
1014
1013
|
tasksCount: c,
|
1015
|
-
loadingTasks:
|
1014
|
+
loadingTasks: s,
|
1016
1015
|
getProjectUrl: d,
|
1017
1016
|
onLanguageCompleteConfirm: l,
|
1018
1017
|
onTasksWidgetOpen: m,
|
1019
1018
|
langNameOnClick: g,
|
1020
1019
|
langProgressOnClick: v,
|
1021
|
-
taskTitleOnClick:
|
1020
|
+
taskTitleOnClick: S
|
1022
1021
|
};
|
1023
|
-
return /* @__PURE__ */
|
1024
|
-
},
|
1025
|
-
const { config: a, ...
|
1026
|
-
return /* @__PURE__ */
|
1027
|
-
},
|
1028
|
-
const [e, t] = I(!1), { tasksCount:
|
1022
|
+
return /* @__PURE__ */ o(Ft.Provider, { value: f, children: e });
|
1023
|
+
}, ba = (e) => function(r) {
|
1024
|
+
const { config: a, ...s } = r;
|
1025
|
+
return /* @__PURE__ */ o(fa, { config: a, children: /* @__PURE__ */ o(e, { ...s }) });
|
1026
|
+
}, Ta = ba(() => {
|
1027
|
+
const [e, t] = I(!1), { tasksCount: r } = 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(w.ShowDialog, a), () => {
|
1033
|
+
document.removeEventListener(w.ShowDialog, a);
|
1035
1034
|
};
|
1036
|
-
}), /* @__PURE__ */
|
1037
|
-
|
1035
|
+
}), /* @__PURE__ */ o(D, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ o(
|
1036
|
+
cn,
|
1038
1037
|
{
|
1039
|
-
content: /* @__PURE__ */
|
1038
|
+
content: /* @__PURE__ */ o(ha, {}),
|
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: {
|
@@ -1050,117 +1049,117 @@ const Kr = function(e) {
|
|
1050
1049
|
}
|
1051
1050
|
})
|
1052
1051
|
],
|
1053
|
-
children: (a) => /* @__PURE__ */
|
1054
|
-
|
1052
|
+
children: (a) => /* @__PURE__ */ h(
|
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__ */
|
1064
|
-
|
1062
|
+
/* @__PURE__ */ o(ln, { size: "25px" }),
|
1063
|
+
r > 0 && /* @__PURE__ */ o("div", { className: je.badge, "aria-label": `${r} items requiring attention`, children: r > 9 ? "9+" : r })
|
1065
1064
|
]
|
1066
1065
|
}
|
1067
1066
|
)
|
1068
1067
|
}
|
1069
1068
|
) });
|
1070
|
-
}), R = ({ children: e, ...t }) => /* @__PURE__ */
|
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
|
-
},
|
1087
|
-
/* @__PURE__ */
|
1088
|
-
|
1089
|
-
] }, `${t.link}-${t.name}`)) }),
|
1090
|
-
!!
|
1091
|
-
t.filter(({ visible: a }) => a).map(({ link: a, label:
|
1092
|
-
] }, t[0].label)) }), Pa = "_badge_1pc1v_1",
|
1069
|
+
}), R = ({ children: e, ...t }) => /* @__PURE__ */ o("nav", { ...t, className: Bn.sidebarContainer, children: e }), va = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
|
1070
|
+
R.Top = va;
|
1071
|
+
const Sa = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
|
1072
|
+
R.Bottom = Sa;
|
1073
|
+
R.Avatar = Gn;
|
1074
|
+
R.IconLink = zn;
|
1075
|
+
R.Menu = Wn;
|
1076
|
+
R.ProfileMenu = br;
|
1077
|
+
R.TeamSwitch = Nr;
|
1078
|
+
R.TeamMenuItem = Dt;
|
1079
|
+
R.UpgradeMenuItem = Mr;
|
1080
|
+
R.ProfileSettingsMenuItem = Sr;
|
1081
|
+
R.Tasks = Ta;
|
1082
|
+
const ya = "_breadcrumbsItem_1hm6a_1", Ea = "_breadcrumbs_1hm6a_1", St = {
|
1083
|
+
breadcrumbsItem: ya,
|
1084
|
+
breadcrumbs: Ea
|
1085
|
+
}, no = ({ items: e }) => /* @__PURE__ */ o("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ h(At, { children: [
|
1086
|
+
/* @__PURE__ */ o(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1087
|
+
r < e.length - 1 && /* @__PURE__ */ o("span", { children: " — " })
|
1088
|
+
] }, `${t.link}-${t.name}`)) }), Ca = ({ items: e }) => /* @__PURE__ */ o(He, { children: e.map((t, r) => /* @__PURE__ */ h(At, { children: [
|
1089
|
+
!!r && t.some((a) => a.visible) && /* @__PURE__ */ o(kt, {}),
|
1090
|
+
t.filter(({ visible: a }) => a).map(({ link: a, label: s, onClick: i }) => /* @__PURE__ */ o(W, { href: a || "#", "aria-label": s, onClick: i, children: s }, s))
|
1091
|
+
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", wa = "_tag_1pc1v_15", Aa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Ra = "_disabled_1pc1v_57", ka = "_projectNavigationItem_1pc1v_61", Ia = "_projectNavigationItemDisabled_1pc1v_67", M = {
|
1093
1092
|
badge: Pa,
|
1094
|
-
tag:
|
1095
|
-
withNavLinkStyle:
|
1096
|
-
disabled:
|
1097
|
-
projectNavigationItem:
|
1098
|
-
projectNavigationItemDisabled:
|
1099
|
-
},
|
1100
|
-
/* @__PURE__ */
|
1101
|
-
/* @__PURE__ */
|
1102
|
-
!!t && /* @__PURE__ */
|
1093
|
+
tag: wa,
|
1094
|
+
withNavLinkStyle: Aa,
|
1095
|
+
disabled: Ra,
|
1096
|
+
projectNavigationItem: ka,
|
1097
|
+
projectNavigationItemDisabled: Ia
|
1098
|
+
}, yt = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
|
1099
|
+
/* @__PURE__ */ h("div", { children: [
|
1100
|
+
/* @__PURE__ */ o("span", { children: e }),
|
1101
|
+
!!t && /* @__PURE__ */ o("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1103
1102
|
] }),
|
1104
|
-
!!
|
1105
|
-
] }),
|
1106
|
-
({ label: e, href: t = "", disabled:
|
1103
|
+
!!r && /* @__PURE__ */ o(Oe, { className: M.tag, children: r })
|
1104
|
+
] }), Me = nn(
|
1105
|
+
({ label: e, href: t = "", disabled: r = !1, badge: a, onClick: s, novel: i }, c) => /* @__PURE__ */ o(D, { tooltip: "You do not have access to this function", show: r, children: /* @__PURE__ */ o(
|
1107
1106
|
"div",
|
1108
1107
|
{
|
1109
|
-
className:
|
1110
|
-
children:
|
1108
|
+
className: r ? M.projectNavigationItemDisabled : M.projectNavigationItem,
|
1109
|
+
children: s || r || !t ? /* @__PURE__ */ o(
|
1111
1110
|
"button",
|
1112
1111
|
{
|
1113
1112
|
type: "button",
|
1114
1113
|
ref: c,
|
1115
|
-
className: j(
|
1116
|
-
[
|
1114
|
+
className: j(M.withNavLinkStyle, {
|
1115
|
+
[M.disabled]: r
|
1117
1116
|
}),
|
1118
|
-
disabled:
|
1119
|
-
onClick:
|
1120
|
-
children: /* @__PURE__ */
|
1117
|
+
disabled: r,
|
1118
|
+
onClick: s,
|
1119
|
+
children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i })
|
1121
1120
|
}
|
1122
|
-
) : /* @__PURE__ */
|
1121
|
+
) : /* @__PURE__ */ o("a", { href: t, className: M.withNavLinkStyle, children: /* @__PURE__ */ o(yt, { label: e, badge: a, novel: i }) })
|
1123
1122
|
}
|
1124
1123
|
) })
|
1125
1124
|
);
|
1126
|
-
|
1127
|
-
const
|
1128
|
-
var a,
|
1129
|
-
return
|
1125
|
+
Me.displayName = "NavigationTabsItem";
|
1126
|
+
const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, Na = (e) => e.visible && (!e.dropdown || ja(e.dropdown)), ro = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ o("nav", { "aria-label": "Project", children: /* @__PURE__ */ o("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Na).map((r) => {
|
1127
|
+
var a, s, i;
|
1128
|
+
return r.dropdown ? /* @__PURE__ */ o(
|
1130
1129
|
"li",
|
1131
1130
|
{
|
1132
1131
|
className: B.navigationTab,
|
1133
|
-
"data-testid":
|
1134
|
-
"aria-selected": (a =
|
1135
|
-
children: /* @__PURE__ */
|
1136
|
-
|
1132
|
+
"data-testid": r.key,
|
1133
|
+
"aria-selected": (a = r.isActive) == null ? void 0 : a.call(r, t),
|
1134
|
+
children: /* @__PURE__ */ o(
|
1135
|
+
le,
|
1137
1136
|
{
|
1138
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */
|
1139
|
-
children: /* @__PURE__ */
|
1137
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ o(Me, { label: r.label, disabled: r.disabled, active: c }),
|
1138
|
+
children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(Ca, { items: r.dropdown }) })
|
1140
1139
|
}
|
1141
1140
|
)
|
1142
1141
|
},
|
1143
|
-
|
1144
|
-
) : /* @__PURE__ */
|
1142
|
+
r.key
|
1143
|
+
) : /* @__PURE__ */ o(
|
1145
1144
|
"li",
|
1146
1145
|
{
|
1147
1146
|
className: B.navigationTab,
|
1148
|
-
"data-testid":
|
1149
|
-
"aria-selected": (
|
1150
|
-
children: /* @__PURE__ */
|
1151
|
-
|
1147
|
+
"data-testid": r.key,
|
1148
|
+
"aria-selected": (s = r.isActive) == null ? void 0 : s.call(r, t),
|
1149
|
+
children: /* @__PURE__ */ o(
|
1150
|
+
Me,
|
1152
1151
|
{
|
1153
|
-
label:
|
1154
|
-
href:
|
1155
|
-
onClick:
|
1156
|
-
disabled:
|
1157
|
-
badge:
|
1158
|
-
novel:
|
1159
|
-
active: (i =
|
1152
|
+
label: r.label,
|
1153
|
+
href: r.link,
|
1154
|
+
onClick: r.onClick,
|
1155
|
+
disabled: r.disabled,
|
1156
|
+
badge: r.badge,
|
1157
|
+
novel: r.novel,
|
1158
|
+
active: (i = r.isActive) == null ? void 0 : i.call(r, t)
|
1160
1159
|
}
|
1161
1160
|
)
|
1162
1161
|
},
|
1163
|
-
|
1162
|
+
r.key
|
1164
1163
|
);
|
1165
1164
|
}) }) });
|
1166
1165
|
class k {
|
@@ -1194,8 +1193,8 @@ class k {
|
|
1194
1193
|
* @param key - The key of the header
|
1195
1194
|
* @param value - The value of the header
|
1196
1195
|
*/
|
1197
|
-
add(t,
|
1198
|
-
return new k([...this.factories, () => ({ [t]:
|
1196
|
+
add(t, r) {
|
1197
|
+
return new k([...this.factories, () => ({ [t]: r })]);
|
1199
1198
|
}
|
1200
1199
|
/**
|
1201
1200
|
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
@@ -1299,631 +1298,682 @@ class k {
|
|
1299
1298
|
* console.log(headers) // { 'Content-Type': 'application/json' }
|
1300
1299
|
*/
|
1301
1300
|
async resolve() {
|
1302
|
-
const t = this.factories.map((a) => a()),
|
1303
|
-
return Object.assign({}, ...
|
1301
|
+
const t = this.factories.map((a) => a()), r = await Promise.all(t);
|
1302
|
+
return Object.assign({}, ...r);
|
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
|
}
|
1313
1312
|
apply(t) {
|
1314
1313
|
return t.from(async () => {
|
1315
|
-
const
|
1316
|
-
return
|
1314
|
+
const r = this.middleware(k.create());
|
1315
|
+
return r instanceof Promise ? r.then((a) => a.resolve()) : r.resolve();
|
1317
1316
|
});
|
1318
1317
|
}
|
1319
1318
|
}
|
1320
|
-
const
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
]),
|
1326
|
-
userId:
|
1327
|
-
userUuid:
|
1328
|
-
teamId:
|
1329
|
-
teamUuid:
|
1330
|
-
userTeamRole:
|
1331
|
-
userEmail:
|
1332
|
-
userName:
|
1333
|
-
userCurrentTeamId:
|
1334
|
-
planId:
|
1335
|
-
planName:
|
1336
|
-
isProviderAlpha:
|
1337
|
-
isFullyAuthenticated:
|
1338
|
-
exp:
|
1319
|
+
const zt = n.union([
|
1320
|
+
n.literal("owner"),
|
1321
|
+
n.literal("admin"),
|
1322
|
+
n.literal("biller"),
|
1323
|
+
n.literal("member")
|
1324
|
+
]), xa = n.object({
|
1325
|
+
userId: n.number(),
|
1326
|
+
userUuid: n.string().uuid(),
|
1327
|
+
teamId: n.number(),
|
1328
|
+
teamUuid: n.string().uuid(),
|
1329
|
+
userTeamRole: zt,
|
1330
|
+
userEmail: n.string().email(),
|
1331
|
+
userName: n.string(),
|
1332
|
+
userCurrentTeamId: n.number(),
|
1333
|
+
planId: n.number(),
|
1334
|
+
planName: n.string(),
|
1335
|
+
isProviderAlpha: n.boolean(),
|
1336
|
+
isFullyAuthenticated: n.boolean(),
|
1337
|
+
exp: n.number()
|
1339
1338
|
});
|
1340
|
-
function
|
1339
|
+
function ee(e) {
|
1341
1340
|
try {
|
1342
|
-
const t = e.split(".")[1],
|
1343
|
-
return
|
1341
|
+
const t = e.split(".")[1], r = atob(t);
|
1342
|
+
return xa.parse(JSON.parse(r));
|
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 ao(e) {
|
1355
|
+
return Kt(async (t) => {
|
1357
1356
|
var i, c;
|
1358
|
-
const
|
1359
|
-
if (!
|
1360
|
-
throw new
|
1361
|
-
const { exp: a } =
|
1362
|
-
if (!
|
1363
|
-
return t.add("authorization", `Bearer ${
|
1364
|
-
const
|
1365
|
-
if (!
|
1366
|
-
throw new
|
1367
|
-
return (c = e.onNewTokenIssued) == null || c.call(e,
|
1357
|
+
const r = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
1358
|
+
if (!r)
|
1359
|
+
throw new ie();
|
1360
|
+
const { exp: a } = ee(r.accessToken) ?? { exp: 0 };
|
1361
|
+
if (!dn(new Date(a)))
|
1362
|
+
return t.add("authorization", `Bearer ${r.accessToken}`);
|
1363
|
+
const s = await e.refreshToken(r);
|
1364
|
+
if (!s)
|
1365
|
+
throw new ie();
|
1366
|
+
return (c = e.onNewTokenIssued) == null || c.call(e, s), t.add("authorization", `Bearer ${s.accessToken}`);
|
1368
1367
|
});
|
1369
1368
|
}
|
1370
|
-
const
|
1369
|
+
const so = 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
|
1381
|
-
var
|
1382
|
-
return (a = (
|
1379
|
+
function Ue(e, t) {
|
1380
|
+
var r, a;
|
1381
|
+
return (a = (r = e.split(";").find((s) => s.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : a.substring(t.length + 1);
|
1383
1382
|
}
|
1384
|
-
function
|
1385
|
-
const e =
|
1383
|
+
function oo() {
|
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 Qt =
|
1393
|
-
|
1394
|
-
|
1395
|
-
]),
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
]),
|
1391
|
+
const Qt = n.union([
|
1392
|
+
n.object({ authorization: n.string() }),
|
1393
|
+
n.object({ AUTHORIZATION: n.string() })
|
1394
|
+
]), Ma = n.union([
|
1395
|
+
n.object({ "X-API-Token": n.string() }),
|
1396
|
+
n.object({ "X-Api-Token": n.string() }),
|
1397
|
+
n.object({ "x-api-token": n.string() }),
|
1398
|
+
n.object({ "X-API-TOKEN": n.string() })
|
1399
|
+
]), Ua = n.union([
|
1401
1400
|
Qt,
|
1402
|
-
|
1403
|
-
]),
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
]),
|
1408
|
-
accessToken:
|
1409
|
-
refreshToken:
|
1410
|
-
}),
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
]),
|
1401
|
+
Ma
|
1402
|
+
]), Ha = n.union([
|
1403
|
+
n.object({ "X-Lokalise-Plugin": n.string() }),
|
1404
|
+
n.object({ "x-lokalise-plugin": n.string() }),
|
1405
|
+
n.object({ "X-LOKALISE-PLUGIN": n.string() })
|
1406
|
+
]), x = Ua.and(Ha), qa = n.object({
|
1407
|
+
accessToken: n.string(),
|
1408
|
+
refreshToken: n.string()
|
1409
|
+
}), Ba = n.union([
|
1410
|
+
n.object({ "X-Csrf-Token": n.string() }),
|
1411
|
+
n.object({ "X-CSRF-Token": n.string() }),
|
1412
|
+
n.object({ "x-csrf-token": n.string() }),
|
1413
|
+
n.object({ "X-CSRF-TOKEN": n.string() })
|
1414
|
+
]), Da = n.union([
|
1416
1415
|
Qt,
|
1417
|
-
|
1418
|
-
]), Ge =
|
1416
|
+
Ba
|
1417
|
+
]), Ge = Y({
|
1419
1418
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1420
1419
|
method: "post",
|
1421
|
-
requestPathParamsSchema:
|
1420
|
+
requestPathParamsSchema: n.object({ teamId: n.number() }),
|
1422
1421
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1423
|
-
requestHeaderSchema:
|
1424
|
-
requestBodySchema:
|
1422
|
+
requestHeaderSchema: Da,
|
1423
|
+
requestBodySchema: n.undefined(),
|
1425
1424
|
isEmptyResponseExpected: !0,
|
1426
1425
|
successResponseBodySchema: qa
|
1427
1426
|
});
|
1428
|
-
function
|
1427
|
+
function io(e, t, r) {
|
1429
1428
|
return async () => {
|
1430
1429
|
const a = t();
|
1431
1430
|
if (!a)
|
1432
|
-
throw new
|
1433
|
-
return
|
1434
|
-
pathParams: { teamId: Number(await
|
1431
|
+
throw new ie();
|
1432
|
+
return $(e, Ge, {
|
1433
|
+
pathParams: { teamId: Number(await r()) },
|
1435
1434
|
headers: await k.create().add("x-csrf-token", a).resolve()
|
1436
1435
|
});
|
1437
1436
|
};
|
1438
1437
|
}
|
1439
|
-
function
|
1440
|
-
return async ({ accessToken: t, refreshToken:
|
1441
|
-
const a =
|
1438
|
+
function co(e) {
|
1439
|
+
return async ({ accessToken: t, refreshToken: r }) => {
|
1440
|
+
const a = ee(t);
|
1442
1441
|
if (!a)
|
1443
|
-
throw new
|
1444
|
-
return
|
1442
|
+
throw new ie();
|
1443
|
+
return $(e, Ge, {
|
1445
1444
|
pathParams: { teamId: a.teamId },
|
1446
|
-
headers: await k.create().add("authorization", `Bearer ${
|
1445
|
+
headers: await k.create().add("authorization", `Bearer ${r}`).resolve()
|
1447
1446
|
});
|
1448
1447
|
};
|
1449
1448
|
}
|
1450
|
-
const
|
1449
|
+
const $a = {
|
1451
1450
|
teamKey: (e) => ["getUserToken", e]
|
1452
|
-
},
|
1453
|
-
...
|
1454
|
-
queryFn: async ({ queryKey: [a,
|
1451
|
+
}, Ga = (e, t, r) => H({
|
1452
|
+
...r,
|
1453
|
+
queryFn: async ({ queryKey: [a, s] }) => $(e, Ge, {
|
1455
1454
|
headers: await t.resolve(),
|
1456
|
-
pathParams: { teamId:
|
1455
|
+
pathParams: { teamId: s }
|
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
|
1467
|
-
function
|
1468
|
-
const a =
|
1469
|
-
queryKey:
|
1464
|
+
re(ce, "eventName", "new-jwt-issued");
|
1465
|
+
let J = ce;
|
1466
|
+
function lo(e, t, r) {
|
1467
|
+
const a = La(), s = Ga(e, t.add("x-csrf-token", a ?? ""), {
|
1468
|
+
queryKey: $a.teamKey(r),
|
1470
1469
|
enabled: a !== void 0
|
1471
1470
|
}), i = Ct();
|
1472
|
-
return
|
1473
|
-
|
1474
|
-
}, [
|
1471
|
+
return Q(() => {
|
1472
|
+
s.data && s.data.accessToken !== i.current && (window.dispatchEvent(new J(s.data)), i.current = s.data.accessToken);
|
1473
|
+
}, [s.data]), s;
|
1475
1474
|
}
|
1476
|
-
function
|
1475
|
+
function Wt() {
|
1477
1476
|
const [e, t] = I();
|
1478
|
-
return
|
1479
|
-
const
|
1480
|
-
t(
|
1481
|
-
}, a =
|
1482
|
-
return t(a ?
|
1483
|
-
window.removeEventListener(
|
1477
|
+
return Q(() => {
|
1478
|
+
const r = (s) => {
|
1479
|
+
t(s.detail.payload);
|
1480
|
+
}, a = Jt();
|
1481
|
+
return t(a ? ee(a.accessToken) : void 0), window.addEventListener(J.eventName, r), () => {
|
1482
|
+
window.removeEventListener(J.eventName, r);
|
1484
1483
|
};
|
1485
1484
|
}, []), e;
|
1486
1485
|
}
|
1487
|
-
const
|
1488
|
-
user_id:
|
1489
|
-
email:
|
1490
|
-
fullname:
|
1491
|
-
created_at:
|
1492
|
-
created_at_timestamp:
|
1493
|
-
role:
|
1494
|
-
}),
|
1495
|
-
teamId:
|
1496
|
-
userId:
|
1497
|
-
}),
|
1498
|
-
team_id:
|
1499
|
-
team_user:
|
1500
|
-
}), Qa =
|
1486
|
+
const Fa = x, Ka = n.object({
|
1487
|
+
user_id: n.number(),
|
1488
|
+
email: n.string().email(),
|
1489
|
+
fullname: n.string(),
|
1490
|
+
created_at: n.string(),
|
1491
|
+
created_at_timestamp: n.number(),
|
1492
|
+
role: zt
|
1493
|
+
}), za = n.object({
|
1494
|
+
teamId: n.number(),
|
1495
|
+
userId: n.number()
|
1496
|
+
}), Ja = n.object({
|
1497
|
+
team_id: n.number(),
|
1498
|
+
team_user: Ka
|
1499
|
+
}), Qa = X({
|
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
|
+
}), Wa = {
|
1507
1506
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1508
|
-
},
|
1509
|
-
...
|
1510
|
-
queryFn: async ({ queryKey: [a,
|
1507
|
+
}, Ya = (e, t, r) => H({
|
1508
|
+
...r,
|
1509
|
+
queryFn: async ({ queryKey: [a, s, i] }) => G(e, Qa, {
|
1511
1510
|
headers: await t.resolve(),
|
1512
|
-
pathParams: { teamId:
|
1511
|
+
pathParams: { teamId: s, userId: i }
|
1513
1512
|
})
|
1514
1513
|
});
|
1515
|
-
function
|
1516
|
-
const
|
1517
|
-
return
|
1518
|
-
queryKey:
|
1519
|
-
enabled: (
|
1514
|
+
function uo(e, t) {
|
1515
|
+
const r = Wt();
|
1516
|
+
return Ya(e, t, {
|
1517
|
+
queryKey: Wa.teamUserKey((r == null ? void 0 : r.teamId) ?? 0, (r == null ? void 0 : r.userId) ?? 0),
|
1518
|
+
enabled: (r == null ? void 0 : r.userId) !== void 0 && r.teamId !== void 0
|
1520
1519
|
});
|
1521
1520
|
}
|
1522
|
-
const
|
1523
|
-
lang_id:
|
1524
|
-
lang_iso:
|
1525
|
-
lang_name:
|
1526
|
-
is_writable:
|
1527
|
-
}),
|
1528
|
-
user_id:
|
1529
|
-
email:
|
1530
|
-
fullname:
|
1531
|
-
created_at:
|
1532
|
-
created_at_timestamp:
|
1533
|
-
admin_rights:
|
1534
|
-
languages:
|
1535
|
-
is_admin:
|
1536
|
-
is_reviewer:
|
1537
|
-
}),
|
1538
|
-
|
1539
|
-
|
1540
|
-
]),
|
1541
|
-
|
1542
|
-
|
1543
|
-
|
1544
|
-
]),
|
1545
|
-
project:
|
1546
|
-
contributor:
|
1547
|
-
}),
|
1548
|
-
project_id:
|
1549
|
-
contributor:
|
1550
|
-
}),
|
1521
|
+
const mo = x, Xa = n.object({
|
1522
|
+
lang_id: n.number(),
|
1523
|
+
lang_iso: n.string(),
|
1524
|
+
lang_name: n.string(),
|
1525
|
+
is_writable: n.union([n.literal(0), n.literal(1)])
|
1526
|
+
}), Va = n.object({
|
1527
|
+
user_id: n.number(),
|
1528
|
+
email: n.string().email(),
|
1529
|
+
fullname: n.string(),
|
1530
|
+
created_at: n.string(),
|
1531
|
+
created_at_timestamp: n.number(),
|
1532
|
+
admin_rights: n.array(n.string()),
|
1533
|
+
languages: n.array(Xa),
|
1534
|
+
is_admin: n.boolean(),
|
1535
|
+
is_reviewer: n.boolean()
|
1536
|
+
}), Za = n.union([
|
1537
|
+
n.object({ uuid: n.string().uuid() }),
|
1538
|
+
n.object({ id: n.string() })
|
1539
|
+
]), es = n.union([
|
1540
|
+
n.object({ authenticatedUser: n.literal(!0) }),
|
1541
|
+
n.object({ uuid: n.string().uuid() }),
|
1542
|
+
n.object({ id: n.number() })
|
1543
|
+
]), ts = n.object({
|
1544
|
+
project: Za,
|
1545
|
+
contributor: es
|
1546
|
+
}), ns = n.object({
|
1547
|
+
project_id: n.string(),
|
1548
|
+
contributor: Va
|
1549
|
+
}), rs = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, as = (e) => "uuid" in e ? e.uuid : e.id, ss = X({
|
1551
1550
|
description: "Get the details of a project contributor",
|
1552
|
-
requestHeaderSchema:
|
1553
|
-
requestPathParamsSchema:
|
1554
|
-
pathResolver: ({ project: e, contributor: t }) => `/projects/${
|
1555
|
-
successResponseBodySchema:
|
1556
|
-
}),
|
1551
|
+
requestHeaderSchema: x,
|
1552
|
+
requestPathParamsSchema: ts,
|
1553
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${as(e)}/contributors/${rs(t)}`,
|
1554
|
+
successResponseBodySchema: ns
|
1555
|
+
}), os = {
|
1557
1556
|
projectUserKey: (e) => ["RetrieveContributor", e]
|
1558
|
-
},
|
1559
|
-
...
|
1560
|
-
queryFn: async ({ queryKey: [a,
|
1561
|
-
pathParams:
|
1557
|
+
}, is = (e, t, r) => H({
|
1558
|
+
...r,
|
1559
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, ss, {
|
1560
|
+
pathParams: s,
|
1562
1561
|
headers: await t.resolve()
|
1563
1562
|
})
|
1564
1563
|
});
|
1565
|
-
function
|
1566
|
-
const a =
|
1567
|
-
return
|
1568
|
-
queryKey:
|
1564
|
+
function _o(e, t, r) {
|
1565
|
+
const a = Wt(), s = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
|
1566
|
+
return is(e, t, {
|
1567
|
+
queryKey: os.projectUserKey({ project: { id: r }, contributor: s }),
|
1569
1568
|
enabled: a !== void 0
|
1570
1569
|
});
|
1571
1570
|
}
|
1572
|
-
const
|
1573
|
-
lang_iso:
|
1574
|
-
custom_iso:
|
1575
|
-
}),
|
1576
|
-
language_id:
|
1577
|
-
language_iso:
|
1578
|
-
progress:
|
1579
|
-
words_to_do:
|
1580
|
-
project_language_id:
|
1581
|
-
project_language_uuid:
|
1582
|
-
}),
|
1583
|
-
projectId:
|
1584
|
-
}),
|
1585
|
-
lang_id:
|
1586
|
-
lang_iso:
|
1587
|
-
lang_name:
|
1588
|
-
is_rtl:
|
1589
|
-
plural_forms:
|
1590
|
-
project_language_id:
|
1591
|
-
project_language_uuid:
|
1592
|
-
}),
|
1593
|
-
project_id:
|
1594
|
-
project_uuid:
|
1595
|
-
languages:
|
1596
|
-
}),
|
1597
|
-
projectId:
|
1598
|
-
}),
|
1599
|
-
languages:
|
1600
|
-
|
1601
|
-
lang_iso:
|
1602
|
-
custom_iso:
|
1603
|
-
custom_name:
|
1604
|
-
custom_plural_forms:
|
1571
|
+
const cs = n.object({
|
1572
|
+
lang_iso: n.string(),
|
1573
|
+
custom_iso: n.string().optional()
|
1574
|
+
}), ls = n.object({
|
1575
|
+
language_id: n.number(),
|
1576
|
+
language_iso: n.string(),
|
1577
|
+
progress: n.number(),
|
1578
|
+
words_to_do: n.number(),
|
1579
|
+
project_language_id: n.number(),
|
1580
|
+
project_language_uuid: n.string().uuid()
|
1581
|
+
}), us = n.object({
|
1582
|
+
projectId: n.string()
|
1583
|
+
}), Yt = n.object({
|
1584
|
+
lang_id: n.number(),
|
1585
|
+
lang_iso: n.string(),
|
1586
|
+
lang_name: n.string(),
|
1587
|
+
is_rtl: n.boolean(),
|
1588
|
+
plural_forms: n.array(n.string().optional()),
|
1589
|
+
project_language_id: n.string(),
|
1590
|
+
project_language_uuid: n.string().uuid()
|
1591
|
+
}), ds = n.object({
|
1592
|
+
project_id: n.string(),
|
1593
|
+
project_uuid: n.string().uuid(),
|
1594
|
+
languages: n.array(Yt)
|
1595
|
+
}), ms = n.object({
|
1596
|
+
projectId: n.string()
|
1597
|
+
}), _s = n.object({
|
1598
|
+
languages: n.array(
|
1599
|
+
n.object({
|
1600
|
+
lang_iso: n.string(),
|
1601
|
+
custom_iso: n.string().optional(),
|
1602
|
+
custom_name: n.string().optional(),
|
1603
|
+
custom_plural_forms: n.array(n.string()).optional()
|
1605
1604
|
})
|
1606
1605
|
)
|
1607
|
-
}),
|
1608
|
-
project_id:
|
1609
|
-
project_uuid:
|
1610
|
-
languages:
|
1611
|
-
errors:
|
1612
|
-
|
1613
|
-
message:
|
1614
|
-
code:
|
1615
|
-
lang_iso:
|
1606
|
+
}), gs = n.object({
|
1607
|
+
project_id: n.string(),
|
1608
|
+
project_uuid: n.string().uuid(),
|
1609
|
+
languages: n.array(Yt),
|
1610
|
+
errors: n.array(
|
1611
|
+
n.object({
|
1612
|
+
message: n.string(),
|
1613
|
+
code: n.number(),
|
1614
|
+
lang_iso: n.string()
|
1616
1615
|
})
|
1617
1616
|
).optional()
|
1618
|
-
}),
|
1619
|
-
projectId:
|
1620
|
-
}),
|
1621
|
-
langs:
|
1622
|
-
|
1623
|
-
lang_iso:
|
1624
|
-
base_lang:
|
1617
|
+
}), ps = n.object({
|
1618
|
+
projectId: n.string()
|
1619
|
+
}), hs = n.object({
|
1620
|
+
langs: n.array(
|
1621
|
+
n.object({
|
1622
|
+
lang_iso: n.string(),
|
1623
|
+
base_lang: n.boolean()
|
1625
1624
|
})
|
1626
1625
|
)
|
1627
|
-
}),
|
1628
|
-
result:
|
1629
|
-
}),
|
1626
|
+
}), fs = n.object({
|
1627
|
+
result: n.boolean()
|
1628
|
+
}), bs = X({
|
1630
1629
|
description: "List of project languages",
|
1631
|
-
requestHeaderSchema:
|
1632
|
-
requestPathParamsSchema:
|
1630
|
+
requestHeaderSchema: x,
|
1631
|
+
requestPathParamsSchema: us,
|
1633
1632
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1634
|
-
successResponseBodySchema:
|
1635
|
-
}),
|
1633
|
+
successResponseBodySchema: ds
|
1634
|
+
}), go = Y({
|
1636
1635
|
description: "Add languages to existing project",
|
1637
|
-
requestHeaderSchema:
|
1636
|
+
requestHeaderSchema: x,
|
1638
1637
|
method: "post",
|
1639
|
-
requestPathParamsSchema:
|
1638
|
+
requestPathParamsSchema: ms,
|
1640
1639
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1641
|
-
requestBodySchema:
|
1642
|
-
successResponseBodySchema:
|
1643
|
-
}),
|
1640
|
+
requestBodySchema: _s,
|
1641
|
+
successResponseBodySchema: gs
|
1642
|
+
}), Ts = Y({
|
1644
1643
|
description: "Bulk update project languages",
|
1645
|
-
requestHeaderSchema:
|
1644
|
+
requestHeaderSchema: x,
|
1646
1645
|
method: "put",
|
1647
|
-
requestPathParamsSchema:
|
1646
|
+
requestPathParamsSchema: ps,
|
1648
1647
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1649
|
-
requestBodySchema:
|
1650
|
-
successResponseBodySchema:
|
1651
|
-
}),
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
]),
|
1656
|
-
per_platform_key_names:
|
1657
|
-
reviewing:
|
1658
|
-
auto_toggle_unverified:
|
1659
|
-
offline_translation:
|
1660
|
-
key_editing:
|
1661
|
-
inline_machine_translations:
|
1662
|
-
custom_translation_statuses:
|
1663
|
-
custom_translation_statuses_allow_multiple:
|
1664
|
-
segmentation:
|
1665
|
-
contributor_preview_download_enabled:
|
1666
|
-
}),
|
1667
|
-
not_reviewed:
|
1668
|
-
unverified:
|
1669
|
-
spelling_grammar:
|
1670
|
-
inconsistent_placeholders:
|
1671
|
-
inconsistent_html:
|
1672
|
-
different_number_of_urls:
|
1673
|
-
different_urls:
|
1674
|
-
leading_whitespace:
|
1675
|
-
trailing_whitespace:
|
1676
|
-
different_number_of_email_address:
|
1677
|
-
different_email_address:
|
1678
|
-
different_brackets:
|
1679
|
-
different_numbers:
|
1680
|
-
double_space:
|
1681
|
-
special_placeholder:
|
1682
|
-
unbalanced_brackets:
|
1683
|
-
}),
|
1684
|
-
progress_total:
|
1685
|
-
keys_total:
|
1686
|
-
team:
|
1687
|
-
base_words:
|
1688
|
-
qa_issues_total:
|
1689
|
-
qa_issues:
|
1690
|
-
languages:
|
1691
|
-
}),
|
1692
|
-
project_id:
|
1693
|
-
uuid:
|
1648
|
+
requestBodySchema: hs,
|
1649
|
+
successResponseBodySchema: fs
|
1650
|
+
}), de = x, Fe = n.union([
|
1651
|
+
n.literal("localization_files"),
|
1652
|
+
n.literal("paged_documents"),
|
1653
|
+
n.literal("marketing")
|
1654
|
+
]), vs = n.object({
|
1655
|
+
per_platform_key_names: n.boolean(),
|
1656
|
+
reviewing: n.boolean(),
|
1657
|
+
auto_toggle_unverified: n.boolean(),
|
1658
|
+
offline_translation: n.boolean(),
|
1659
|
+
key_editing: n.boolean(),
|
1660
|
+
inline_machine_translations: n.boolean(),
|
1661
|
+
custom_translation_statuses: n.boolean(),
|
1662
|
+
custom_translation_statuses_allow_multiple: n.boolean(),
|
1663
|
+
segmentation: n.boolean(),
|
1664
|
+
contributor_preview_download_enabled: n.boolean()
|
1665
|
+
}), Ss = n.object({
|
1666
|
+
not_reviewed: n.number(),
|
1667
|
+
unverified: n.number(),
|
1668
|
+
spelling_grammar: n.number(),
|
1669
|
+
inconsistent_placeholders: n.number(),
|
1670
|
+
inconsistent_html: n.number(),
|
1671
|
+
different_number_of_urls: n.number(),
|
1672
|
+
different_urls: n.number(),
|
1673
|
+
leading_whitespace: n.number(),
|
1674
|
+
trailing_whitespace: n.number(),
|
1675
|
+
different_number_of_email_address: n.number(),
|
1676
|
+
different_email_address: n.number(),
|
1677
|
+
different_brackets: n.number(),
|
1678
|
+
different_numbers: n.number(),
|
1679
|
+
double_space: n.number(),
|
1680
|
+
special_placeholder: n.number(),
|
1681
|
+
unbalanced_brackets: n.number()
|
1682
|
+
}), ys = n.object({
|
1683
|
+
progress_total: n.number(),
|
1684
|
+
keys_total: n.number(),
|
1685
|
+
team: n.number(),
|
1686
|
+
base_words: n.number(),
|
1687
|
+
qa_issues_total: n.number(),
|
1688
|
+
qa_issues: Ss,
|
1689
|
+
languages: n.array(ls)
|
1690
|
+
}), me = n.object({
|
1691
|
+
project_id: n.string(),
|
1692
|
+
uuid: n.string().uuid(),
|
1694
1693
|
project_type: Fe,
|
1695
|
-
name:
|
1696
|
-
description:
|
1697
|
-
created_at:
|
1698
|
-
created_at_timestamp:
|
1699
|
-
created_by:
|
1700
|
-
created_by_email:
|
1701
|
-
team_id:
|
1702
|
-
team_uuid:
|
1703
|
-
base_language_id:
|
1704
|
-
base_language_iso:
|
1705
|
-
base_project_language_id:
|
1706
|
-
base_project_language_uuid:
|
1707
|
-
settings:
|
1708
|
-
statistics:
|
1709
|
-
}),
|
1710
|
-
name:
|
1711
|
-
team_id:
|
1712
|
-
base_lang_iso:
|
1713
|
-
languages:
|
1694
|
+
name: n.string(),
|
1695
|
+
description: n.string(),
|
1696
|
+
created_at: n.string(),
|
1697
|
+
created_at_timestamp: n.number(),
|
1698
|
+
created_by: n.number(),
|
1699
|
+
created_by_email: n.string(),
|
1700
|
+
team_id: n.number(),
|
1701
|
+
team_uuid: n.string().uuid(),
|
1702
|
+
base_language_id: n.number(),
|
1703
|
+
base_language_iso: n.string(),
|
1704
|
+
base_project_language_id: n.number(),
|
1705
|
+
base_project_language_uuid: n.string().uuid(),
|
1706
|
+
settings: vs.optional(),
|
1707
|
+
statistics: ys.optional()
|
1708
|
+
}), Es = n.object({
|
1709
|
+
name: n.string(),
|
1710
|
+
team_id: n.string(),
|
1711
|
+
base_lang_iso: n.string(),
|
1712
|
+
languages: n.array(cs),
|
1714
1713
|
project_type: Fe,
|
1715
|
-
is_segmentation_enabled:
|
1716
|
-
}),
|
1714
|
+
is_segmentation_enabled: n.boolean()
|
1715
|
+
}), Et = n.union([n.literal(0), n.literal(1)]), Cs = n.object({
|
1717
1716
|
filter_type: Fe.optional(),
|
1718
|
-
filter_team_id:
|
1719
|
-
filter_names:
|
1720
|
-
include_statistics:
|
1721
|
-
include_settings:
|
1722
|
-
limit:
|
1723
|
-
page:
|
1724
|
-
}),
|
1725
|
-
projects:
|
1726
|
-
}),
|
1727
|
-
project_id:
|
1728
|
-
}),
|
1729
|
-
project_id:
|
1730
|
-
}),
|
1731
|
-
name:
|
1732
|
-
description:
|
1733
|
-
}),
|
1717
|
+
filter_team_id: n.number().optional(),
|
1718
|
+
filter_names: n.string().optional(),
|
1719
|
+
include_statistics: Et.optional(),
|
1720
|
+
include_settings: Et.optional(),
|
1721
|
+
limit: n.number().optional(),
|
1722
|
+
page: n.number().optional()
|
1723
|
+
}), Ps = n.object({
|
1724
|
+
projects: n.array(me)
|
1725
|
+
}), ws = n.object({
|
1726
|
+
project_id: n.string()
|
1727
|
+
}), As = n.object({
|
1728
|
+
project_id: n.string()
|
1729
|
+
}), Rs = n.object({
|
1730
|
+
name: n.string().min(1),
|
1731
|
+
description: n.string().optional()
|
1732
|
+
}), _e = () => "/projects", ks = Y({
|
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: Es,
|
1738
|
+
successResponseBodySchema: me
|
1739
|
+
}), Is = X({
|
1741
1740
|
description: "List all projects",
|
1742
|
-
requestHeaderSchema:
|
1743
|
-
pathResolver:
|
1744
|
-
requestQuerySchema:
|
1745
|
-
successResponseBodySchema:
|
1746
|
-
}),
|
1741
|
+
requestHeaderSchema: de,
|
1742
|
+
pathResolver: _e,
|
1743
|
+
requestQuerySchema: Cs,
|
1744
|
+
successResponseBodySchema: Ps
|
1745
|
+
}), js = X({
|
1747
1746
|
description: "Retrieve a project",
|
1748
|
-
requestHeaderSchema:
|
1749
|
-
requestPathParamsSchema:
|
1750
|
-
pathResolver: ({ project_id: e }) => `${
|
1751
|
-
successResponseBodySchema:
|
1752
|
-
}),
|
1747
|
+
requestHeaderSchema: de,
|
1748
|
+
requestPathParamsSchema: ws,
|
1749
|
+
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1750
|
+
successResponseBodySchema: me
|
1751
|
+
}), Ns = Y({
|
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: As,
|
1756
|
+
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1757
|
+
requestBodySchema: Rs,
|
1758
|
+
successResponseBodySchema: me
|
1759
|
+
}), Os = n.object({
|
1760
|
+
projectId: n.string(),
|
1761
|
+
translationId: n.number()
|
1762
|
+
}), xs = n.enum(["critical", "major", "minor"]), Ls = n.object({
|
1763
|
+
category: n.string(),
|
1764
|
+
comment: n.string(),
|
1765
|
+
severity: xs
|
1766
|
+
}), Ms = n.object({
|
1767
|
+
score: n.number(),
|
1768
|
+
hasMajorIssue: n.boolean(),
|
1769
|
+
hasCriticalIssue: n.boolean(),
|
1770
|
+
issues: n.array(Ls)
|
1760
1771
|
});
|
1761
|
-
function
|
1762
|
-
return
|
1763
|
-
...
|
1764
|
-
mutationFn: async (a) =>
|
1772
|
+
function po(e, t, r = {}) {
|
1773
|
+
return qe({
|
1774
|
+
...r,
|
1775
|
+
mutationFn: async (a) => $(e, ks, {
|
1765
1776
|
headers: await t.resolve(),
|
1766
1777
|
body: a
|
1767
1778
|
})
|
1768
1779
|
});
|
1769
1780
|
}
|
1770
|
-
const
|
1781
|
+
const ho = {
|
1771
1782
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1772
1783
|
};
|
1773
|
-
function
|
1774
|
-
return
|
1775
|
-
...
|
1776
|
-
queryFn: async ({ queryKey: [a,
|
1784
|
+
function fo(e, t, r) {
|
1785
|
+
return H({
|
1786
|
+
...r,
|
1787
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, bs, {
|
1777
1788
|
headers: await t.resolve(),
|
1778
|
-
pathParams: { projectId:
|
1789
|
+
pathParams: { projectId: s }
|
1779
1790
|
})
|
1780
1791
|
});
|
1781
1792
|
}
|
1782
|
-
const
|
1793
|
+
const bo = {
|
1783
1794
|
paramsKey: (e) => ["listProjects", e]
|
1784
1795
|
};
|
1785
|
-
function
|
1786
|
-
return
|
1787
|
-
...
|
1788
|
-
queryFn: async ({ queryKey: [a,
|
1796
|
+
function To(e, t, r) {
|
1797
|
+
return H({
|
1798
|
+
...r,
|
1799
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, Is, {
|
1789
1800
|
headers: await t.resolve(),
|
1790
|
-
queryParams:
|
1801
|
+
queryParams: s
|
1791
1802
|
})
|
1792
1803
|
});
|
1793
1804
|
}
|
1794
|
-
const
|
1805
|
+
const vo = {
|
1795
1806
|
projectIdKey: (e) => ["retrieveProject", e]
|
1796
1807
|
};
|
1797
|
-
function
|
1798
|
-
return
|
1799
|
-
...
|
1800
|
-
queryFn: async ({ queryKey: [a,
|
1808
|
+
function So(e, t, r) {
|
1809
|
+
return H({
|
1810
|
+
...r,
|
1811
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, js, {
|
1801
1812
|
headers: await t.resolve(),
|
1802
|
-
pathParams: { project_id:
|
1813
|
+
pathParams: { project_id: s }
|
1803
1814
|
})
|
1804
1815
|
});
|
1805
1816
|
}
|
1806
|
-
function
|
1807
|
-
return
|
1817
|
+
function yo(e, t, r, a = {}) {
|
1818
|
+
return qe({
|
1808
1819
|
...a,
|
1809
|
-
mutationFn: async (
|
1820
|
+
mutationFn: async (s) => $(e, Ns, {
|
1810
1821
|
headers: await t.resolve(),
|
1811
|
-
body:
|
1812
|
-
pathParams:
|
1822
|
+
body: s,
|
1823
|
+
pathParams: r
|
1813
1824
|
})
|
1814
1825
|
});
|
1815
1826
|
}
|
1816
|
-
function
|
1817
|
-
return
|
1827
|
+
function Eo(e, t, r, a = {}) {
|
1828
|
+
return qe({
|
1818
1829
|
...a,
|
1819
|
-
mutationFn: async (
|
1830
|
+
mutationFn: async (s) => $(e, Ts, {
|
1820
1831
|
pathParams: t,
|
1821
|
-
headers: await
|
1822
|
-
body:
|
1832
|
+
headers: await r.resolve(),
|
1833
|
+
body: s
|
1834
|
+
})
|
1835
|
+
});
|
1836
|
+
}
|
1837
|
+
function Us(e) {
|
1838
|
+
return {
|
1839
|
+
isEmptyResponseExpected: e.isEmptyResponseExpected ?? !1,
|
1840
|
+
isNonJSONResponseExpected: e.isNonJSONResponseExpected ?? !1,
|
1841
|
+
method: "get",
|
1842
|
+
pathResolver: e.pathResolver,
|
1843
|
+
requestHeaderSchema: e.requestHeaderSchema,
|
1844
|
+
requestPathParamsSchema: e.requestPathParamsSchema,
|
1845
|
+
requestQuerySchema: e.requestQuerySchema,
|
1846
|
+
successResponseBodySchema: e.successResponseBodySchema,
|
1847
|
+
description: e.description,
|
1848
|
+
responseSchemasByStatusCode: e.responseSchemasByStatusCode,
|
1849
|
+
metadata: e.metadata
|
1850
|
+
};
|
1851
|
+
}
|
1852
|
+
const Hs = Us({
|
1853
|
+
description: "Generate translation quality score",
|
1854
|
+
requestHeaderSchema: x,
|
1855
|
+
requestPathParamsSchema: Os,
|
1856
|
+
pathResolver: ({ projectId: e, translationId: t }) => `/projects/${e}/translations/${t}/scoring-guidance`,
|
1857
|
+
successResponseBodySchema: Ms
|
1858
|
+
}), Co = {
|
1859
|
+
paramsKey: (e) => ["getScore", e]
|
1860
|
+
};
|
1861
|
+
function Po(e, t, r) {
|
1862
|
+
return H({
|
1863
|
+
...r,
|
1864
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, Hs, {
|
1865
|
+
headers: await t.resolve(),
|
1866
|
+
pathParams: s
|
1823
1867
|
})
|
1824
1868
|
});
|
1825
1869
|
}
|
1826
1870
|
export {
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1871
|
+
ms as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1872
|
+
_s as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1873
|
+
gs as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1874
|
+
ps as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1875
|
+
hs as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1876
|
+
fs as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1877
|
+
no as Breadcrumbs,
|
1878
|
+
mo as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1879
|
+
Xa as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1880
|
+
Va as CONTRIBUTOR_SCHEMA,
|
1881
|
+
Es as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1838
1882
|
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1883
|
+
lr as ENTERPRISE_PLAN_IDS,
|
1884
|
+
ir as ESSENTIAL_PLAN_IDS,
|
1885
|
+
Ht as FREE_PLAN_ID,
|
1886
|
+
Os as GET_SCORE_REQUEST_QUERY_SCHEMA,
|
1887
|
+
Ms as GET_SCORE_RESPONSE_SCHEMA,
|
1842
1888
|
k as HeaderBuilder,
|
1889
|
+
Ls as ISSUE_SCHEMA,
|
1843
1890
|
qa as JWT_TOKEN_SCHEMA,
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1891
|
+
ao as JwtAuthHeaderBuilderMiddleware,
|
1892
|
+
cs as LANGUAGE_ISO_SCHEMA,
|
1893
|
+
Yt as LANGUAGE_SCHEMA,
|
1894
|
+
ls as LANGUAGE_STATISTICS_SCHEMA,
|
1895
|
+
Cs as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1896
|
+
Ps as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1897
|
+
us as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1898
|
+
ds as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1852
1899
|
oe as NavigationPanel,
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1900
|
+
ro as NavigationTabs,
|
1901
|
+
de as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1902
|
+
Ss as PROJECT_QA_ISSUES_SCHEMA,
|
1903
|
+
me as PROJECT_SCHEMA,
|
1904
|
+
vs as PROJECT_SETTINGS_SCHEMA,
|
1905
|
+
ys as PROJECT_STATISTICS_SCHEMA,
|
1859
1906
|
Fe as PROJECT_TYPE_SCHEMA,
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1907
|
+
cr as PRO_PLAN_IDS,
|
1908
|
+
so as PublicApiHeaderBuilderMiddleware,
|
1909
|
+
ts as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1910
|
+
ns as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1911
|
+
ws as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1912
|
+
xs as SEVERITY_ENUM,
|
1913
|
+
or as START_PLAN_IDS,
|
1866
1914
|
R as Sidebar,
|
1867
1915
|
A as SidebarTaskLanguageStatuses,
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1916
|
+
Le as SidebarTaskStatuses,
|
1917
|
+
ae as SidebarTaskTypeOptions,
|
1918
|
+
zt as TEAM_ROLE_SCHEMA,
|
1919
|
+
Fa as TEAM_USER_API_BASE_HEADERS_SCHEMA,
|
1920
|
+
za as TEAM_USER_PATH_PARAMS_SCHEMA,
|
1921
|
+
Ja as TEAM_USER_RESPONSE_SCHEMA,
|
1922
|
+
Ka as TEAM_USER_SCHEMA,
|
1875
1923
|
sr as TRIAL_PLAN_ID,
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1924
|
+
As as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1925
|
+
Rs as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1926
|
+
Da as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1927
|
+
ie as UnauthorizedError,
|
1928
|
+
go as addLanguagesToProject,
|
1929
|
+
Ts as bulkUpdateProjectLanguages,
|
1930
|
+
mr as convertNewLineToBreakTag,
|
1931
|
+
Kt as createHeaderBuilderMiddleware,
|
1932
|
+
ks as createProject,
|
1885
1933
|
hr as formatDate,
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1934
|
+
to as formatDateTz,
|
1935
|
+
io as generateTokenFromClassicSession,
|
1936
|
+
oo as getAuthenticatedSessionDetailFromRequest,
|
1937
|
+
La as getCsrfTokenFromCookie,
|
1938
|
+
Jt as getJwtTokenFromCookie,
|
1939
|
+
Co as getScoreKey,
|
1891
1940
|
Qa as getTeamUser,
|
1892
|
-
|
1941
|
+
Wa as getTeamUsersQueryKey,
|
1893
1942
|
Ge as getUserToken,
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1943
|
+
$a as getUserTokenKey,
|
1944
|
+
eo as isEnterpriseOpenSourcePlan,
|
1945
|
+
Vs as isEnterprisePlan,
|
1946
|
+
Ys as isEssentialPlan,
|
1898
1947
|
De as isFreePlan,
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1902
|
-
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1915
|
-
|
1916
|
-
|
1917
|
-
|
1918
|
-
|
1919
|
-
|
1948
|
+
Zs as isPaidPlan,
|
1949
|
+
Xs as isProPlan,
|
1950
|
+
Ws as isStartPlan,
|
1951
|
+
Bt as isTrialPlan,
|
1952
|
+
bs as listProjectLanguages,
|
1953
|
+
ho as listProjectLanguagesKey,
|
1954
|
+
Is as listProjects,
|
1955
|
+
bo as listProjectsKey,
|
1956
|
+
pr as makeUrlClickable,
|
1957
|
+
ee as parseJwtTokenPayload,
|
1958
|
+
co as refreshExpiredToken,
|
1959
|
+
ss as retrieveContributor,
|
1960
|
+
os as retrieveContributorKeys,
|
1961
|
+
js as retrieveProject,
|
1962
|
+
vo as retrieveProjectQueryKey,
|
1963
|
+
Ns as updateProject,
|
1964
|
+
_o as useAuthenticatedProjectContributor,
|
1965
|
+
Wt as useAuthenticatedSessionPayload,
|
1966
|
+
uo as useAuthenticatedUser,
|
1967
|
+
Eo as useBulkUpdateProjectLanguagesMutation,
|
1968
|
+
po as useCreateProjectMutation,
|
1920
1969
|
$e as useEffectOnce,
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1927
|
-
|
1928
|
-
|
1970
|
+
lo as useGetPromotedClassicSessionJwtQuery,
|
1971
|
+
Po as useGetScoreQuery,
|
1972
|
+
Ya as useGetTeamUsersQuery,
|
1973
|
+
Ga as useGetUserTokenQuery,
|
1974
|
+
fo as useListProjectLanguagesQuery,
|
1975
|
+
To as useListProjectsQuery,
|
1976
|
+
is as useRetrieveContributorQuery,
|
1977
|
+
So as useRetrieveProjectQuery,
|
1978
|
+
yo as useUpdateProjectMutation
|
1929
1979
|
};
|