@lokalise/harmony 1.17.2 → 1.18.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 +600 -564
- package/dist/types/src/features/auth/frontend/services/refreshExpiredToken.d.ts +1 -1
- package/dist/types/src/features/publicApi/hooks/useBulkUpdateProjectLanguagesMutation.d.ts +21 -0
- package/dist/types/src/features/publicApi/languages.d.ts +96 -0
- package/dist/types/src/features/publicApi/node.d.ts +3 -2
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +39 -0
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,101 +1,101 @@
|
|
1
1
|
var Vt = Object.defineProperty;
|
2
2
|
var Zt = (e, t, n) => t in e ? Vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
-
var
|
3
|
+
var ne = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n);
|
4
4
|
import { jsx as s, jsxs as h, Fragment as Ue } from "react/jsx-runtime";
|
5
|
-
import * as
|
6
|
-
import { useRef as
|
7
|
-
import { Tooltip as
|
8
|
-
import { format as
|
5
|
+
import * as G from "react";
|
6
|
+
import { useRef as wt, useState as R, useCallback as We, useEffect as K, useContext as Ct, createContext as Pt, cloneElement as en, Fragment as kt, forwardRef as tn } from "react";
|
7
|
+
import { Tooltip as q, Link as L, Menu as ce, MenuList as le, CaretUpIcon as nn, UserIcon as At, MenuItem as J, MenuDivider as It, ConfirmModal as rn, Alert as on, Tag as je, Button as xe, Loading as an, Popover as sn, JobIcon as cn } from "@lokalise/louis";
|
8
|
+
import { format as Rt, parseISO as ln, isThisSecond as dn } from "date-fns";
|
9
9
|
import { toZonedTime as un } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
|
-
import { buildPayloadRoute as
|
12
|
-
import { sendByPayloadRoute as
|
13
|
-
import { useQuery as
|
14
|
-
import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
|
15
|
-
const
|
11
|
+
import { buildPayloadRoute as He } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
12
|
+
import { sendByPayloadRoute as B, sendByGetRoute as W } from "@lokalise/frontend-http-client";
|
13
|
+
import { useQuery as D, useMutation as qe } from "@tanstack/react-query";
|
14
|
+
import { buildGetRoute as Q, buildPayloadRoute as mn } from "@lokalise/universal-ts-utils/node";
|
15
|
+
const Oe = {
|
16
16
|
Completed: "completed",
|
17
17
|
InProgress: "in_progress",
|
18
18
|
Created: "created",
|
19
19
|
Queued: "queued"
|
20
|
-
},
|
21
|
-
...
|
20
|
+
}, k = {
|
21
|
+
...Oe,
|
22
22
|
NotStarted: "not_started"
|
23
|
-
},
|
23
|
+
}, re = {
|
24
24
|
translation: "translation",
|
25
25
|
review: "review",
|
26
26
|
lqa_by_ai: "lqa_by_ai",
|
27
27
|
automatic_translation: "automatic_translation"
|
28
28
|
};
|
29
|
-
var
|
29
|
+
var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
30
30
|
function Nt(e) {
|
31
31
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
32
32
|
}
|
33
|
-
var
|
34
|
-
function
|
35
|
-
if (
|
36
|
-
|
33
|
+
var _e, Qe;
|
34
|
+
function Be() {
|
35
|
+
if (Qe) return _e;
|
36
|
+
Qe = 1;
|
37
37
|
function e(t) {
|
38
38
|
var n = typeof t;
|
39
39
|
return t != null && (n == "object" || n == "function");
|
40
40
|
}
|
41
|
-
return fe = e, fe;
|
42
|
-
}
|
43
|
-
var _e, Qe;
|
44
|
-
function mn() {
|
45
|
-
if (Qe) return _e;
|
46
|
-
Qe = 1;
|
47
|
-
var e = typeof ne == "object" && ne && ne.Object === Object && ne;
|
48
41
|
return _e = e, _e;
|
49
42
|
}
|
50
43
|
var ge, Xe;
|
51
|
-
function
|
44
|
+
function fn() {
|
52
45
|
if (Xe) return ge;
|
53
46
|
Xe = 1;
|
54
|
-
var e =
|
55
|
-
return ge =
|
47
|
+
var e = typeof oe == "object" && oe && oe.Object === Object && oe;
|
48
|
+
return ge = e, ge;
|
56
49
|
}
|
57
50
|
var he, Ye;
|
58
|
-
function
|
51
|
+
function jt() {
|
59
52
|
if (Ye) return he;
|
60
53
|
Ye = 1;
|
61
|
-
var e =
|
62
|
-
|
63
|
-
};
|
64
|
-
return he = t, he;
|
54
|
+
var e = fn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
|
+
return he = n, he;
|
65
56
|
}
|
66
57
|
var pe, Ve;
|
67
58
|
function _n() {
|
68
59
|
if (Ve) return pe;
|
69
60
|
Ve = 1;
|
70
|
-
var e =
|
71
|
-
|
72
|
-
|
73
|
-
;
|
74
|
-
return o;
|
75
|
-
}
|
61
|
+
var e = jt(), t = function() {
|
62
|
+
return e.Date.now();
|
63
|
+
};
|
76
64
|
return pe = t, pe;
|
77
65
|
}
|
78
66
|
var be, Ze;
|
79
67
|
function gn() {
|
80
68
|
if (Ze) return be;
|
81
69
|
Ze = 1;
|
82
|
-
var e =
|
83
|
-
function n
|
84
|
-
|
70
|
+
var e = /\s/;
|
71
|
+
function t(n) {
|
72
|
+
for (var o = n.length; o-- && e.test(n.charAt(o)); )
|
73
|
+
;
|
74
|
+
return o;
|
85
75
|
}
|
86
|
-
return be =
|
76
|
+
return be = t, be;
|
87
77
|
}
|
88
78
|
var ve, et;
|
89
|
-
function
|
79
|
+
function hn() {
|
90
80
|
if (et) return ve;
|
91
81
|
et = 1;
|
92
|
-
var e =
|
93
|
-
|
82
|
+
var e = gn(), t = /^\s+/;
|
83
|
+
function n(o) {
|
84
|
+
return o && o.slice(0, e(o) + 1).replace(t, "");
|
85
|
+
}
|
86
|
+
return ve = n, ve;
|
94
87
|
}
|
95
88
|
var Te, tt;
|
96
|
-
function
|
89
|
+
function xt() {
|
97
90
|
if (tt) return Te;
|
98
91
|
tt = 1;
|
92
|
+
var e = jt(), t = e.Symbol;
|
93
|
+
return Te = t, Te;
|
94
|
+
}
|
95
|
+
var ye, nt;
|
96
|
+
function pn() {
|
97
|
+
if (nt) return ye;
|
98
|
+
nt = 1;
|
99
99
|
var e = xt(), t = Object.prototype, n = t.hasOwnProperty, o = t.toString, a = e ? e.toStringTag : void 0;
|
100
100
|
function i(c) {
|
101
101
|
var d = n.call(c, a), u = c[a];
|
@@ -107,52 +107,52 @@ function hn() {
|
|
107
107
|
var m = o.call(c);
|
108
108
|
return l && (d ? c[a] = u : delete c[a]), m;
|
109
109
|
}
|
110
|
-
return
|
111
|
-
}
|
112
|
-
var ye, nt;
|
113
|
-
function pn() {
|
114
|
-
if (nt) return ye;
|
115
|
-
nt = 1;
|
116
|
-
var e = Object.prototype, t = e.toString;
|
117
|
-
function n(o) {
|
118
|
-
return t.call(o);
|
119
|
-
}
|
120
|
-
return ye = n, ye;
|
110
|
+
return ye = i, ye;
|
121
111
|
}
|
122
112
|
var Se, rt;
|
123
113
|
function bn() {
|
124
114
|
if (rt) return Se;
|
125
115
|
rt = 1;
|
126
|
-
var e =
|
127
|
-
function
|
128
|
-
return
|
116
|
+
var e = Object.prototype, t = e.toString;
|
117
|
+
function n(o) {
|
118
|
+
return t.call(o);
|
129
119
|
}
|
130
|
-
return Se =
|
120
|
+
return Se = n, Se;
|
131
121
|
}
|
132
122
|
var Ee, ot;
|
133
123
|
function vn() {
|
134
124
|
if (ot) return Ee;
|
135
125
|
ot = 1;
|
136
|
-
|
137
|
-
|
126
|
+
var e = xt(), t = pn(), n = bn(), o = "[object Null]", a = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
|
+
function c(d) {
|
128
|
+
return d == null ? d === void 0 ? a : o : i && i in Object(d) ? t(d) : n(d);
|
138
129
|
}
|
139
|
-
return Ee =
|
130
|
+
return Ee = c, Ee;
|
140
131
|
}
|
141
132
|
var we, at;
|
142
133
|
function Tn() {
|
143
134
|
if (at) return we;
|
144
135
|
at = 1;
|
145
|
-
|
146
|
-
|
147
|
-
return typeof a == "symbol" || t(a) && e(a) == n;
|
136
|
+
function e(t) {
|
137
|
+
return t != null && typeof t == "object";
|
148
138
|
}
|
149
|
-
return we =
|
139
|
+
return we = e, we;
|
150
140
|
}
|
151
141
|
var Ce, st;
|
152
142
|
function yn() {
|
153
143
|
if (st) return Ce;
|
154
144
|
st = 1;
|
155
|
-
var e =
|
145
|
+
var e = vn(), t = Tn(), n = "[object Symbol]";
|
146
|
+
function o(a) {
|
147
|
+
return typeof a == "symbol" || t(a) && e(a) == n;
|
148
|
+
}
|
149
|
+
return Ce = o, Ce;
|
150
|
+
}
|
151
|
+
var Pe, it;
|
152
|
+
function Sn() {
|
153
|
+
if (it) return Pe;
|
154
|
+
it = 1;
|
155
|
+
var e = hn(), t = Be(), n = yn(), o = NaN, a = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
|
156
156
|
function u(l) {
|
157
157
|
if (typeof l == "number")
|
158
158
|
return l;
|
@@ -168,69 +168,69 @@ function yn() {
|
|
168
168
|
var _ = i.test(l);
|
169
169
|
return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ? o : +l;
|
170
170
|
}
|
171
|
-
return
|
171
|
+
return Pe = u, Pe;
|
172
172
|
}
|
173
|
-
var ke,
|
173
|
+
var ke, ct;
|
174
174
|
function Ot() {
|
175
|
-
if (
|
176
|
-
|
177
|
-
var e =
|
175
|
+
if (ct) return ke;
|
176
|
+
ct = 1;
|
177
|
+
var e = Be(), t = _n(), n = Sn(), o = "Expected a function", a = Math.max, i = Math.min;
|
178
178
|
function c(d, u, l) {
|
179
179
|
var m, _, T, y, f, E, b = 0, g = !1, p = !1, v = !0;
|
180
180
|
if (typeof d != "function")
|
181
181
|
throw new TypeError(o);
|
182
182
|
u = n(u) || 0, e(l) && (g = !!l.leading, p = "maxWait" in l, T = p ? a(n(l.maxWait) || 0, u) : T, v = "trailing" in l ? !!l.trailing : v);
|
183
183
|
function C(S) {
|
184
|
-
var j = m,
|
185
|
-
return m = _ = void 0, b = S, y = d.apply(
|
184
|
+
var j = m, $ = _;
|
185
|
+
return m = _ = void 0, b = S, y = d.apply($, j), y;
|
186
186
|
}
|
187
187
|
function w(S) {
|
188
|
-
return b = S, f = setTimeout(
|
188
|
+
return b = S, f = setTimeout(te, u), g ? C(S) : y;
|
189
189
|
}
|
190
|
-
function
|
191
|
-
var j = S - E,
|
192
|
-
return p ? i(
|
190
|
+
function ee(S) {
|
191
|
+
var j = S - E, $ = S - b, Je = u - j;
|
192
|
+
return p ? i(Je, T - $) : Je;
|
193
193
|
}
|
194
194
|
function ze(S) {
|
195
|
-
var j = S - E,
|
196
|
-
return E === void 0 || j >= u || j < 0 || p &&
|
195
|
+
var j = S - E, $ = S - b;
|
196
|
+
return E === void 0 || j >= u || j < 0 || p && $ >= T;
|
197
197
|
}
|
198
|
-
function
|
198
|
+
function te() {
|
199
199
|
var S = t();
|
200
200
|
if (ze(S))
|
201
|
-
return
|
202
|
-
f = setTimeout(
|
201
|
+
return Ke(S);
|
202
|
+
f = setTimeout(te, ee(S));
|
203
203
|
}
|
204
|
-
function
|
204
|
+
function Ke(S) {
|
205
205
|
return f = void 0, v && m ? C(S) : (m = _ = void 0, y);
|
206
206
|
}
|
207
207
|
function Xt() {
|
208
208
|
f !== void 0 && clearTimeout(f), b = 0, m = E = _ = f = void 0;
|
209
209
|
}
|
210
210
|
function Yt() {
|
211
|
-
return f === void 0 ? y :
|
211
|
+
return f === void 0 ? y : Ke(t());
|
212
212
|
}
|
213
|
-
function
|
213
|
+
function fe() {
|
214
214
|
var S = t(), j = ze(S);
|
215
215
|
if (m = arguments, _ = this, E = S, j) {
|
216
216
|
if (f === void 0)
|
217
217
|
return w(E);
|
218
218
|
if (p)
|
219
|
-
return clearTimeout(f), f = setTimeout(
|
219
|
+
return clearTimeout(f), f = setTimeout(te, u), C(E);
|
220
220
|
}
|
221
|
-
return f === void 0 && (f = setTimeout(
|
221
|
+
return f === void 0 && (f = setTimeout(te, u)), y;
|
222
222
|
}
|
223
|
-
return
|
223
|
+
return fe.cancel = Xt, fe.flush = Yt, fe;
|
224
224
|
}
|
225
225
|
return ke = c, ke;
|
226
226
|
}
|
227
|
-
var
|
228
|
-
const
|
229
|
-
var
|
230
|
-
function
|
231
|
-
if (
|
232
|
-
|
233
|
-
var e = Ot(), t =
|
227
|
+
var En = Ot();
|
228
|
+
const wn = /* @__PURE__ */ Nt(En);
|
229
|
+
var Ae, lt;
|
230
|
+
function Cn() {
|
231
|
+
if (lt) return Ae;
|
232
|
+
lt = 1;
|
233
|
+
var e = Ot(), t = Be(), n = "Expected a function";
|
234
234
|
function o(a, i, c) {
|
235
235
|
var d = !0, u = !0;
|
236
236
|
if (typeof a != "function")
|
@@ -241,36 +241,36 @@ function wn() {
|
|
241
241
|
trailing: u
|
242
242
|
});
|
243
243
|
}
|
244
|
-
return
|
244
|
+
return Ae = o, Ae;
|
245
245
|
}
|
246
|
-
var
|
247
|
-
const kn = /* @__PURE__ */ Nt(
|
246
|
+
var Pn = Cn();
|
247
|
+
const kn = /* @__PURE__ */ Nt(Pn), An = (e, t, n, o) => {
|
248
248
|
switch (t) {
|
249
249
|
case "debounce":
|
250
|
-
return
|
250
|
+
return wn(e, n, o);
|
251
251
|
case "throttle":
|
252
252
|
return kn(e, n, o);
|
253
253
|
default:
|
254
254
|
return e;
|
255
255
|
}
|
256
|
-
},
|
256
|
+
}, In = (
|
257
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
258
258
|
(e) => {
|
259
|
-
const t =
|
260
|
-
return
|
259
|
+
const t = G.useRef(e);
|
260
|
+
return G.useEffect(() => {
|
261
261
|
t.current = e;
|
262
|
-
}),
|
262
|
+
}), G.useMemo(() => (...n) => {
|
263
263
|
var o;
|
264
264
|
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
265
265
|
}, []);
|
266
266
|
}
|
267
|
-
),
|
267
|
+
), Rn = (
|
268
268
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
269
|
(e) => {
|
270
|
-
const [t, n] =
|
270
|
+
const [t, n] = G.useState((e == null ? void 0 : e.current) || null);
|
271
271
|
return e && setTimeout(() => {
|
272
272
|
e.current !== t && n(e.current);
|
273
|
-
}, 0), { refProxy:
|
273
|
+
}, 0), { refProxy: G.useMemo(() => new Proxy((a) => {
|
274
274
|
a !== t && n(a);
|
275
275
|
}, {
|
276
276
|
get(a, i) {
|
@@ -281,7 +281,7 @@ const kn = /* @__PURE__ */ Nt(Cn), In = (e, t, n, o) => {
|
|
281
281
|
}
|
282
282
|
}), [t]), refElement: t, setRefElement: n };
|
283
283
|
}
|
284
|
-
),
|
284
|
+
), Nn = (e, t) => t === "border-box" ? {
|
285
285
|
width: e.borderBoxSize[0].inlineSize,
|
286
286
|
height: e.borderBoxSize[0].blockSize
|
287
287
|
} : t === "content-box" ? {
|
@@ -291,11 +291,11 @@ const kn = /* @__PURE__ */ Nt(Cn), In = (e, t, n, o) => {
|
|
291
291
|
width: e.contentRect.width,
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
|
-
function
|
295
|
-
const l =
|
294
|
+
function jn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: o, handleWidth: a = !0, handleHeight: i = !0, targetRef: c, observerOptions: d, onResize: u } = {}) {
|
295
|
+
const l = wt(e), m = In(u), [_, T] = R({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: f } =
|
298
|
+
}), { refProxy: y, refElement: f } = Rn(c), { box: E } = d || {}, b = We((p) => {
|
299
299
|
if (!a && !i)
|
300
300
|
return;
|
301
301
|
if (l.current) {
|
@@ -304,20 +304,20 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
304
304
|
}
|
305
305
|
const v = (C, w) => a && C.width !== w.width || i && C.height !== w.height;
|
306
306
|
p.forEach((C) => {
|
307
|
-
const w =
|
308
|
-
T((
|
307
|
+
const w = Nn(C, E);
|
308
|
+
T((ee) => v(ee, w) ? (m == null || m({
|
309
309
|
width: w.width,
|
310
310
|
height: w.height,
|
311
311
|
entry: C
|
312
|
-
}), w) :
|
312
|
+
}), w) : ee);
|
313
313
|
});
|
314
|
-
}, [a, i, l, E]), g = We(
|
314
|
+
}, [a, i, l, E]), g = We(An(b, t, n, o), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
318
318
|
o
|
319
319
|
]);
|
320
|
-
return
|
320
|
+
return K(() => {
|
321
321
|
let p;
|
322
322
|
return f ? (p = new window.ResizeObserver(g), p.observe(f, d)) : (_.width || _.height) && (m == null || m({
|
323
323
|
width: null,
|
@@ -342,83 +342,83 @@ function N() {
|
|
342
342
|
for (var e, t, n = 0, o = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = Lt(e)) && (o && (o += " "), o += t);
|
343
343
|
return o;
|
344
344
|
}
|
345
|
-
const
|
346
|
-
headerContainer:
|
347
|
-
navigationTabList:
|
348
|
-
navigationTab:
|
349
|
-
headerContent:
|
350
|
-
staticEnabled:
|
351
|
-
},
|
352
|
-
const { ref: n, height: o } =
|
345
|
+
const xn = "_headerContainer_1cubo_1", On = "_navigationTabList_1cubo_8", Ln = "_navigationTab_1cubo_8", Mn = "_headerContent_1cubo_34", Un = "_staticEnabled_1cubo_50", H = {
|
346
|
+
headerContainer: xn,
|
347
|
+
navigationTabList: On,
|
348
|
+
navigationTab: Ln,
|
349
|
+
headerContent: Mn,
|
350
|
+
staticEnabled: Un
|
351
|
+
}, Hn = 77, ae = ({ sticky: e, children: t }) => {
|
352
|
+
const { ref: n, height: o } = jn({
|
353
353
|
refreshMode: "debounce",
|
354
354
|
refreshRate: 0
|
355
355
|
}), [a, i] = R(!1), c = () => a ? !e : !0;
|
356
|
-
|
356
|
+
K(() => {
|
357
357
|
const u = () => {
|
358
358
|
i(window.scrollY > 0);
|
359
359
|
};
|
360
360
|
return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
|
361
361
|
}, []);
|
362
|
-
const d = `${o ||
|
362
|
+
const d = `${o || Hn}px`;
|
363
363
|
return /* @__PURE__ */ s("div", { style: { minHeight: d }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ h(
|
364
364
|
"div",
|
365
365
|
{
|
366
366
|
ref: n,
|
367
|
-
className: N(
|
368
|
-
[
|
367
|
+
className: N(H.headerContent, {
|
368
|
+
[H.staticEnabled]: c()
|
369
369
|
}),
|
370
370
|
children: [
|
371
|
-
/* @__PURE__ */ s(
|
372
|
-
/* @__PURE__ */ s(
|
371
|
+
/* @__PURE__ */ s(ae.Header, {}),
|
372
|
+
/* @__PURE__ */ s(ae.Tabs, {}),
|
373
373
|
t
|
374
374
|
]
|
375
375
|
}
|
376
376
|
) }) });
|
377
377
|
};
|
378
|
-
|
379
|
-
|
380
|
-
const qn = "_sidebarContainer_bmdti_1",
|
378
|
+
ae.Header = ({ children: e }) => /* @__PURE__ */ s("div", { className: H.headerContainer, children: e });
|
379
|
+
ae.Tabs = ({ children: e }) => /* @__PURE__ */ s("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
380
|
+
const qn = "_sidebarContainer_bmdti_1", Bn = {
|
381
381
|
sidebarContainer: qn
|
382
|
-
},
|
383
|
-
logoLink:
|
384
|
-
},
|
385
|
-
link:
|
382
|
+
}, Dn = "_logoLink_1baxb_1", $n = {
|
383
|
+
logoLink: Dn
|
384
|
+
}, Fn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: o = "Lokalise" }) => /* @__PURE__ */ s("a", { className: $n.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: o }) }), Gn = "_link_18vhx_1", zn = "_active_18vhx_18", dt = {
|
385
|
+
link: Gn,
|
386
386
|
active: zn
|
387
|
-
},
|
387
|
+
}, Kn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
388
388
|
L,
|
389
389
|
{
|
390
|
-
className: N(
|
391
|
-
[
|
390
|
+
className: N(dt.link, {
|
391
|
+
[dt.active]: window.location.pathname.startsWith(t)
|
392
392
|
}),
|
393
393
|
href: t,
|
394
394
|
children: /* @__PURE__ */ s(n, { size: "25px" })
|
395
395
|
}
|
396
|
-
) }),
|
397
|
-
dropdownButton:
|
396
|
+
) }), Jn = "_dropdownButton_13l5r_1", Wn = "_dropdownButtonActive_13l5r_18", ut = {
|
397
|
+
dropdownButton: Jn,
|
398
398
|
dropdownButtonActive: Wn
|
399
|
-
},
|
400
|
-
|
399
|
+
}, Qn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
|
400
|
+
ce,
|
401
401
|
{
|
402
|
-
menuButton: ({ opened: n }) => /* @__PURE__ */ s(
|
402
|
+
menuButton: ({ opened: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ s(
|
403
403
|
"button",
|
404
404
|
{
|
405
405
|
type: "button",
|
406
|
-
className: N(
|
407
|
-
[
|
406
|
+
className: N(ut.dropdownButton, {
|
407
|
+
[ut.dropdownButtonActive]: n
|
408
408
|
}),
|
409
409
|
children: /* @__PURE__ */ s(t, { size: "25px" })
|
410
410
|
}
|
411
411
|
) }),
|
412
|
-
children: /* @__PURE__ */ s(
|
412
|
+
children: /* @__PURE__ */ s(le, { placement: "right-start", children: e })
|
413
413
|
}
|
414
|
-
),
|
415
|
-
iconContainer:
|
414
|
+
), Xn = "_iconContainer_nz34m_1", Yn = {
|
415
|
+
iconContainer: Xn
|
416
416
|
}, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
|
417
417
|
"div",
|
418
418
|
{
|
419
419
|
"aria-label": "Upgrade Icon",
|
420
420
|
className: N(
|
421
|
-
|
421
|
+
Yn.iconContainer,
|
422
422
|
"flex-row",
|
423
423
|
"items-center",
|
424
424
|
"justify-center",
|
@@ -426,14 +426,14 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
426
426
|
),
|
427
427
|
children: /* @__PURE__ */ s(nn, {})
|
428
428
|
}
|
429
|
-
),
|
430
|
-
menuContainer:
|
431
|
-
profileButton:
|
432
|
-
profileImage:
|
433
|
-
profileImageHighlight:
|
434
|
-
profileImageUpgradeIcon:
|
435
|
-
userIconWrapper:
|
436
|
-
}, Ut =
|
429
|
+
), Vn = "_menuContainer_ywskt_5", Zn = "_profileButton_ywskt_15", er = "_profileImage_ywskt_28", tr = "_profileImageHighlight_ywskt_36", nr = "_profileImageUpgradeIcon_ywskt_40", rr = "_userIconWrapper_ywskt_46", x = {
|
430
|
+
menuContainer: Vn,
|
431
|
+
profileButton: Zn,
|
432
|
+
profileImage: er,
|
433
|
+
profileImageHighlight: tr,
|
434
|
+
profileImageUpgradeIcon: nr,
|
435
|
+
userIconWrapper: rr
|
436
|
+
}, Ut = Pt({}), X = () => Ct(Ut), or = ({ children: e }) => {
|
437
437
|
const {
|
438
438
|
currentTeam: t,
|
439
439
|
otherTeams: n,
|
@@ -447,7 +447,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
447
447
|
isFullyAuthenticated: m
|
448
448
|
} = X();
|
449
449
|
return /* @__PURE__ */ s(
|
450
|
-
|
450
|
+
ce,
|
451
451
|
{
|
452
452
|
menuButton: () => /* @__PURE__ */ h("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
453
453
|
t != null && t.logoUrl ? /* @__PURE__ */ s(
|
@@ -465,12 +465,12 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
465
465
|
className: N(x.userIconWrapper, "flex-row", "align-center", "items-center", {
|
466
466
|
[x.profileImageHighlight]: o
|
467
467
|
}),
|
468
|
-
children: /* @__PURE__ */ s(
|
468
|
+
children: /* @__PURE__ */ s(At, { size: "25px" })
|
469
469
|
}
|
470
470
|
),
|
471
471
|
o && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
|
472
472
|
] }),
|
473
|
-
children: /* @__PURE__ */ s(
|
473
|
+
children: /* @__PURE__ */ s(le, { placement: "right-end", className: x.menuContainer, children: e({
|
474
474
|
allowTeamCreation: i,
|
475
475
|
otherTeams: n,
|
476
476
|
canAccessTeamSettings: d,
|
@@ -482,7 +482,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
482
482
|
}) })
|
483
483
|
}
|
484
484
|
);
|
485
|
-
},
|
485
|
+
}, Ht = 0, ar = 9999, sr = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === ar, La = (e) => sr.includes(e), Ma = (e) => ir.includes(e), Ua = (e) => cr.includes(e), Ha = (e) => lr.includes(e), qa = (e) => e > Ht && e < qt, Ba = (e) => e === qt, dr = /\n/, mt = (e, t, n) => e.split(t).flatMap((o, a) => a !== 0 ? [en(n, { key: Math.random().toString(32).slice(0, 10) }), o] : o), ur = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((o) => typeof o == "string" ? mt(o, t, n) : o), mr = (e) => ur(e, dr, /* @__PURE__ */ s("br", {})), fr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, _r = (e) => e.match(fr) ?? [], ft = (e, t, n) => {
|
486
486
|
const o = e.split(t);
|
487
487
|
if (o.length === 1)
|
488
488
|
return e;
|
@@ -490,19 +490,19 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
490
490
|
return o[0] !== "" && a.push(o[0]), o.shift(), o[o.length - 1] === "" && o.pop(), a.push(
|
491
491
|
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
492
492
|
), a.push(o.join(t)), a.filter((i) => i !== "");
|
493
|
-
},
|
494
|
-
const t =
|
495
|
-
return t != null && t.length ? t.reduce((n, o, a) => typeof n == "string" ?
|
496
|
-
},
|
497
|
-
|
498
|
-
},
|
493
|
+
}, _t = (e) => {
|
494
|
+
const t = _r(e);
|
495
|
+
return t != null && t.length ? t.reduce((n, o, a) => typeof n == "string" ? ft(n, o, a) : n.flatMap((i) => typeof i == "string" ? ft(i, o, a) : i), e) : e;
|
496
|
+
}, gr = (e) => typeof e == "string" ? _t(e) : e.flatMap((t) => typeof t == "string" ? _t(t) : t, e), hr = (e, t = "PP") => Rt(e, t), Da = (e, t, n = "PP") => Rt(un(e, t), n), $e = (e) => {
|
497
|
+
K(e, []);
|
498
|
+
}, gt = {
|
499
499
|
biller: "biller",
|
500
500
|
owner: "owner"
|
501
|
-
},
|
502
|
-
|
503
|
-
|
504
|
-
],
|
505
|
-
const { teams: n, currentTeamId: o, planId: a, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((g) => g.id === o), l = n.filter((g) => g.id !== o), m =
|
501
|
+
}, ht = [
|
502
|
+
gt.biller,
|
503
|
+
gt.owner
|
504
|
+
], pr = ({ children: e, config: t }) => {
|
505
|
+
const { teams: n, currentTeamId: o, planId: a, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((g) => g.id === o), l = n.filter((g) => g.id !== o), m = ht.includes(d), _ = ht.includes(d), T = De(a) || Bt(a), b = {
|
506
506
|
...t,
|
507
507
|
currentTeam: u,
|
508
508
|
otherTeams: l,
|
@@ -514,10 +514,10 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
514
514
|
allowTeamCreation: c && !i
|
515
515
|
};
|
516
516
|
return /* @__PURE__ */ s(Ut.Provider, { value: b, children: e });
|
517
|
-
},
|
518
|
-
container:
|
519
|
-
profileEmail:
|
520
|
-
},
|
517
|
+
}, br = ({ config: e, children: t }) => /* @__PURE__ */ s(pr, { config: e, children: /* @__PURE__ */ s(or, { children: t }) }), vr = "_container_q5pot_1", Tr = "_profileEmail_q5pot_5", pt = {
|
518
|
+
container: vr,
|
519
|
+
profileEmail: Tr
|
520
|
+
}, yr = ({
|
521
521
|
href: e,
|
522
522
|
onClick: t,
|
523
523
|
userEmail: n,
|
@@ -526,39 +526,39 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
526
526
|
const { isEndOfTrialActive: a, isTeamSuspended: i } = X();
|
527
527
|
return a || i ? null : /* @__PURE__ */ h(Ue, { children: [
|
528
528
|
/* @__PURE__ */ s(
|
529
|
-
|
529
|
+
J,
|
530
530
|
{
|
531
531
|
href: e,
|
532
532
|
onClick: () => {
|
533
533
|
t == null || t();
|
534
534
|
},
|
535
|
-
children: /* @__PURE__ */ h("div", { className: `flex-col ${
|
535
|
+
children: /* @__PURE__ */ h("div", { className: `flex-col ${pt.container}`, children: [
|
536
536
|
/* @__PURE__ */ s("span", { children: "Profile Settings" }),
|
537
|
-
/* @__PURE__ */ s("span", { className:
|
537
|
+
/* @__PURE__ */ s("span", { className: pt.profileEmail, children: n })
|
538
538
|
] })
|
539
539
|
}
|
540
540
|
),
|
541
|
-
!o && /* @__PURE__ */ s(
|
541
|
+
!o && /* @__PURE__ */ s(It, {})
|
542
542
|
] });
|
543
|
-
},
|
544
|
-
wrapper:
|
545
|
-
profileImage:
|
546
|
-
teamName:
|
547
|
-
planLabel:
|
548
|
-
membership:
|
543
|
+
}, Sr = "_wrapper_15d85_1", Er = "_profileImage_15d85_14", wr = "_teamName_15d85_22", Cr = "_planLabel_15d85_29", Pr = "_membership_15d85_38", kr = "_defaultProfileImage_15d85_44", M = {
|
544
|
+
wrapper: Sr,
|
545
|
+
profileImage: Er,
|
546
|
+
teamName: wr,
|
547
|
+
planLabel: Cr,
|
548
|
+
membership: Pr,
|
549
549
|
defaultProfileImage: kr
|
550
550
|
}, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
551
551
|
const { currentTeam: o, planId: a } = X(), i = e || o;
|
552
552
|
if (!i)
|
553
553
|
return null;
|
554
|
-
const c =
|
554
|
+
const c = De(a) ? "Free" : Bt(a) ? "Trial" : void 0;
|
555
555
|
return /* @__PURE__ */ h(
|
556
|
-
t ?
|
556
|
+
t ? J : "div",
|
557
557
|
{
|
558
558
|
className: `flex-row gap-2 flex-nowrap items-center ${M.wrapper}`,
|
559
559
|
...t && { onClick: () => t(i) },
|
560
560
|
children: [
|
561
|
-
i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(
|
561
|
+
i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(At, { size: "25px" }) }),
|
562
562
|
/* @__PURE__ */ h("div", { className: "flex-col items-start", children: [
|
563
563
|
/* @__PURE__ */ h("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
564
564
|
/* @__PURE__ */ s("span", { title: i.name, className: M.teamName, children: i.name }),
|
@@ -569,30 +569,30 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
569
569
|
]
|
570
570
|
}
|
571
571
|
);
|
572
|
-
},
|
573
|
-
teamsContainer:
|
574
|
-
},
|
572
|
+
}, Ar = "_teamsContainer_1t68g_1", Ir = {
|
573
|
+
teamsContainer: Ar
|
574
|
+
}, Rr = ({ onSwitchTeam: e }) => {
|
575
575
|
const { otherTeams: t } = X();
|
576
|
-
return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${
|
577
|
-
},
|
578
|
-
container:
|
579
|
-
planCta:
|
580
|
-
upgradeIconWrapper:
|
581
|
-
},
|
576
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${Ir.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
|
577
|
+
}, Nr = "_container_1u995_1", jr = "_planCta_1u995_15", xr = "_upgradeIconWrapper_1u995_19", Ie = {
|
578
|
+
container: Nr,
|
579
|
+
planCta: jr,
|
580
|
+
upgradeIconWrapper: xr
|
581
|
+
}, Or = ({ upgradeOptionHref: e }) => {
|
582
582
|
const { planId: t, trialDaysLeft: n, showUpgradeCta: o } = X();
|
583
583
|
if (!o)
|
584
584
|
return null;
|
585
|
-
const c =
|
586
|
-
return /* @__PURE__ */ h(
|
587
|
-
/* @__PURE__ */ s("span", { className:
|
588
|
-
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${
|
585
|
+
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
586
|
+
return /* @__PURE__ */ h(J, { href: e, className: `flex-col gap-1 items-start ${Ie.container}`, children: [
|
587
|
+
/* @__PURE__ */ s("span", { className: Ie.planCta, children: c }),
|
588
|
+
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
|
589
589
|
/* @__PURE__ */ s(Mt, {}),
|
590
590
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
591
591
|
] })
|
592
592
|
] });
|
593
|
-
},
|
594
|
-
function
|
595
|
-
return
|
593
|
+
}, Lr = Math.min, Mr = Math.max;
|
594
|
+
function bt(e, t, n) {
|
595
|
+
return Mr(e, Lr(t, n));
|
596
596
|
}
|
597
597
|
function $t(e, t) {
|
598
598
|
return typeof e == "function" ? e(t) : e;
|
@@ -600,10 +600,10 @@ function $t(e, t) {
|
|
600
600
|
function Ft(e) {
|
601
601
|
return e.split("-")[0];
|
602
602
|
}
|
603
|
-
function
|
603
|
+
function Ur(e) {
|
604
604
|
return e === "x" ? "y" : "x";
|
605
605
|
}
|
606
|
-
function
|
606
|
+
function Hr(e) {
|
607
607
|
return ["top", "bottom"].includes(Ft(e)) ? "y" : "x";
|
608
608
|
}
|
609
609
|
function qr(e) {
|
@@ -615,7 +615,7 @@ function qr(e) {
|
|
615
615
|
...e
|
616
616
|
};
|
617
617
|
}
|
618
|
-
function
|
618
|
+
function Br(e) {
|
619
619
|
return typeof e != "number" ? qr(e) : {
|
620
620
|
top: e,
|
621
621
|
right: e,
|
@@ -623,7 +623,7 @@ function Hr(e) {
|
|
623
623
|
left: e
|
624
624
|
};
|
625
625
|
}
|
626
|
-
function
|
626
|
+
function vt(e) {
|
627
627
|
const {
|
628
628
|
x: t,
|
629
629
|
y: n,
|
@@ -641,7 +641,7 @@ function bt(e) {
|
|
641
641
|
y: n
|
642
642
|
};
|
643
643
|
}
|
644
|
-
async function
|
644
|
+
async function Dr(e, t) {
|
645
645
|
var n;
|
646
646
|
t === void 0 && (t = {});
|
647
647
|
const {
|
@@ -657,7 +657,7 @@ async function Br(e, t) {
|
|
657
657
|
elementContext: _ = "floating",
|
658
658
|
altBoundary: T = !1,
|
659
659
|
padding: y = 0
|
660
|
-
} = $t(t, e), f =
|
660
|
+
} = $t(t, e), f = Br(y), b = d[T ? _ === "floating" ? "reference" : "floating" : _], g = vt(await i.getClippingRect({
|
661
661
|
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(d.floating)),
|
662
662
|
boundary: l,
|
663
663
|
rootBoundary: m,
|
@@ -673,7 +673,7 @@ async function Br(e, t) {
|
|
673
673
|
} : {
|
674
674
|
x: 1,
|
675
675
|
y: 1
|
676
|
-
}, w =
|
676
|
+
}, w = vt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
677
677
|
elements: d,
|
678
678
|
rect: p,
|
679
679
|
offsetParent: v,
|
@@ -686,7 +686,7 @@ async function Br(e, t) {
|
|
686
686
|
right: (w.right - g.right + f.right) / C.x
|
687
687
|
};
|
688
688
|
}
|
689
|
-
const
|
689
|
+
const $r = function(e) {
|
690
690
|
return e === void 0 && (e = {}), {
|
691
691
|
name: "shift",
|
692
692
|
options: e,
|
@@ -714,15 +714,15 @@ const Dr = function(e) {
|
|
714
714
|
} = $t(e, t), l = {
|
715
715
|
x: n,
|
716
716
|
y: o
|
717
|
-
}, m = await
|
717
|
+
}, m = await Dr(t, u), _ = Hr(Ft(a)), T = Ur(_);
|
718
718
|
let y = l[T], f = l[_];
|
719
719
|
if (i) {
|
720
720
|
const b = T === "y" ? "top" : "left", g = T === "y" ? "bottom" : "right", p = y + m[b], v = y - m[g];
|
721
|
-
y =
|
721
|
+
y = bt(p, y, v);
|
722
722
|
}
|
723
723
|
if (c) {
|
724
724
|
const b = _ === "y" ? "top" : "left", g = _ === "y" ? "bottom" : "right", p = f + m[b], v = f - m[g];
|
725
|
-
f =
|
725
|
+
f = bt(p, f, v);
|
726
726
|
}
|
727
727
|
const E = d.fn({
|
728
728
|
...t,
|
@@ -742,44 +742,44 @@ const Dr = function(e) {
|
|
742
742
|
};
|
743
743
|
}
|
744
744
|
};
|
745
|
-
},
|
746
|
-
navItem:
|
747
|
-
activeNavItem:
|
745
|
+
}, Fr = "_navItem_1dudv_1", Gr = "_activeNavItem_1dudv_18", zr = "_badge_1dudv_23", Re = {
|
746
|
+
navItem: Fr,
|
747
|
+
activeNavItem: Gr,
|
748
748
|
badge: zr
|
749
|
-
},
|
749
|
+
}, Gt = Pt({}), Y = () => Ct(Gt), Kr = (e) => {
|
750
750
|
const t = e.lastIndexOf("."), n = e.slice(0, t), o = e.slice(t + 1);
|
751
751
|
return { name: n, extension: o };
|
752
|
-
},
|
752
|
+
}, Jr = (e, t) => {
|
753
753
|
switch (e) {
|
754
|
-
case
|
754
|
+
case k.Completed:
|
755
755
|
return t < 100 ? "Closed" : "Completed";
|
756
|
-
case
|
756
|
+
case k.Created:
|
757
757
|
return t > 0 ? "In progress" : "Not started";
|
758
|
-
case
|
758
|
+
case k.InProgress:
|
759
759
|
return "In progress";
|
760
|
-
case
|
760
|
+
case k.Queued:
|
761
761
|
return "Queued";
|
762
|
-
case
|
762
|
+
case k.NotStarted:
|
763
763
|
return "Not started";
|
764
764
|
default:
|
765
765
|
return "-";
|
766
766
|
}
|
767
767
|
}, Wr = (e) => {
|
768
768
|
const t = e.progress ?? 0;
|
769
|
-
return e.status ===
|
770
|
-
},
|
771
|
-
[
|
772
|
-
[
|
773
|
-
[
|
774
|
-
[
|
775
|
-
},
|
769
|
+
return e.status === k.Created && t > 0 ? k.InProgress : e.status;
|
770
|
+
}, Qr = {
|
771
|
+
[re.translation]: "#0891B2",
|
772
|
+
[re.review]: "#16922D",
|
773
|
+
[re.lqa_by_ai]: "#8B5CF6",
|
774
|
+
[re.automatic_translation]: "#60A5FA"
|
775
|
+
}, Xr = (e) => {
|
776
776
|
const t = [
|
777
|
-
|
778
|
-
|
779
|
-
|
777
|
+
k.InProgress,
|
778
|
+
k.Created,
|
779
|
+
k.Completed
|
780
780
|
];
|
781
|
-
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, o) => n.status ===
|
782
|
-
},
|
781
|
+
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, o) => n.status === k.InProgress && n.progress === 100 ? -1 : o.status === k.InProgress && o.progress === 100 ? 1 : n.status === o.status ? n.name < o.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(o.status));
|
782
|
+
}, Tt = (e) => e in [Oe.InProgress, Oe.Created], Yr = (e, t) => Tt(e.status) && Tt(t.status) && (t.progress ?? 0) >= 100, Vr = ({ task: e, language: t }) => {
|
783
783
|
const [n, o] = R(!1), [a, i] = R(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = Y(), u = () => {
|
784
784
|
i(!1);
|
785
785
|
};
|
@@ -814,20 +814,20 @@ const Dr = function(e) {
|
|
814
814
|
}
|
815
815
|
)
|
816
816
|
] });
|
817
|
-
},
|
818
|
-
langRowCompleted:
|
819
|
-
langCellSecondary:
|
820
|
-
langStatus:
|
821
|
-
},
|
822
|
-
const { getProjectUrl: n, langNameOnClick: o, langProgressOnClick: a } = Y(), i = e.progress ?? 0, c = e.status ===
|
817
|
+
}, Zr = "_langRowCompleted_vpgdi_1", eo = "_langCellSecondary_vpgdi_15", to = "_langStatus_vpgdi_20", Ne = {
|
818
|
+
langRowCompleted: Zr,
|
819
|
+
langCellSecondary: eo,
|
820
|
+
langStatus: to
|
821
|
+
}, no = ({ language: e, task: t }) => {
|
822
|
+
const { getProjectUrl: n, langNameOnClick: o, langProgressOnClick: a } = Y(), i = e.progress ?? 0, c = e.status === k.Completed, d = Yr(t, e);
|
823
823
|
return /* @__PURE__ */ h(
|
824
824
|
"tr",
|
825
825
|
{
|
826
826
|
className: N({
|
827
|
-
[
|
827
|
+
[Ne.langRowCompleted]: d
|
828
828
|
}),
|
829
829
|
children: [
|
830
|
-
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(
|
830
|
+
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
831
831
|
L,
|
832
832
|
{
|
833
833
|
href: n({ task: t, language: e }),
|
@@ -837,7 +837,7 @@ const Dr = function(e) {
|
|
837
837
|
children: e.name
|
838
838
|
}
|
839
839
|
) }) }),
|
840
|
-
/* @__PURE__ */ s("td", { className:
|
840
|
+
/* @__PURE__ */ s("td", { className: Ne.langCellSecondary, children: d || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
841
841
|
L,
|
842
842
|
{
|
843
843
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
@@ -851,25 +851,25 @@ const Dr = function(e) {
|
|
851
851
|
i,
|
852
852
|
"%"
|
853
853
|
] }),
|
854
|
-
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(
|
854
|
+
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(Vr, { task: t, language: e }) : /* @__PURE__ */ s(
|
855
855
|
"span",
|
856
856
|
{
|
857
|
-
className: `${
|
857
|
+
className: `${Ne.langStatus} flex-row items-center justify-start`,
|
858
858
|
"data-status": e.status,
|
859
|
-
children:
|
859
|
+
children: Jr(e.status, i)
|
860
860
|
}
|
861
861
|
) })
|
862
862
|
]
|
863
863
|
}
|
864
864
|
);
|
865
|
-
},
|
866
|
-
taskContainer:
|
867
|
-
taskTitle:
|
868
|
-
taskDescription:
|
869
|
-
languagesTable:
|
870
|
-
metadata:
|
871
|
-
},
|
872
|
-
const { tasks: t, getProjectUrl: n, taskTitleOnClick: o } = Y(), a =
|
865
|
+
}, ro = "_taskContainer_mt2or_1", oo = "_taskTitle_mt2or_21", ao = "_taskDescription_mt2or_28", so = "_languagesTable_mt2or_35", io = "_metadata_mt2or_87", U = {
|
866
|
+
taskContainer: ro,
|
867
|
+
taskTitle: oo,
|
868
|
+
taskDescription: ao,
|
869
|
+
languagesTable: so,
|
870
|
+
metadata: io
|
871
|
+
}, co = ({ task: e }) => {
|
872
|
+
const { tasks: t, getProjectUrl: n, taskTitleOnClick: o } = Y(), a = Xr(e.langs), i = (c) => {
|
873
873
|
c !== void 0 && window.open(
|
874
874
|
`/style-guide/${e.team_id}/download/${c.id}/link`,
|
875
875
|
"_blank",
|
@@ -879,14 +879,14 @@ const Dr = function(e) {
|
|
879
879
|
return t ? /* @__PURE__ */ h("div", { className: U.taskContainer, children: [
|
880
880
|
/* @__PURE__ */ h("div", { className: "flex-row gap-1 items-center", children: [
|
881
881
|
/* @__PURE__ */ h("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
882
|
-
/* @__PURE__ */ s(
|
883
|
-
e.due_date && /* @__PURE__ */ h(
|
882
|
+
/* @__PURE__ */ s(je, { color: Qr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
883
|
+
e.due_date && /* @__PURE__ */ h(je, { color: "#EAB308", children: [
|
884
884
|
"DUE ",
|
885
|
-
|
885
|
+
hr(ln(e.due_date), "yyyy-MM-dd")
|
886
886
|
] })
|
887
887
|
] }),
|
888
888
|
e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
|
889
|
-
|
889
|
+
xe,
|
890
890
|
{
|
891
891
|
size: "sm",
|
892
892
|
variant: "secondary",
|
@@ -894,14 +894,14 @@ const Dr = function(e) {
|
|
894
894
|
children: "Download style guide"
|
895
895
|
}
|
896
896
|
) : /* @__PURE__ */ s(
|
897
|
-
|
897
|
+
ce,
|
898
898
|
{
|
899
|
-
menuButton: /* @__PURE__ */ s(
|
900
|
-
children: /* @__PURE__ */ s(
|
901
|
-
|
899
|
+
menuButton: /* @__PURE__ */ s(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
900
|
+
children: /* @__PURE__ */ s(le, { children: e.style_guides.map((c) => /* @__PURE__ */ s(
|
901
|
+
J,
|
902
902
|
{
|
903
903
|
onClick: () => i(c),
|
904
|
-
children:
|
904
|
+
children: Kr(c.name).name
|
905
905
|
},
|
906
906
|
c.id
|
907
907
|
)) })
|
@@ -918,7 +918,7 @@ const Dr = function(e) {
|
|
918
918
|
children: e.title
|
919
919
|
}
|
920
920
|
) }),
|
921
|
-
e.description && /* @__PURE__ */ s("div", { className: U.taskDescription, children:
|
921
|
+
e.description && /* @__PURE__ */ s("div", { className: U.taskDescription, children: mr(gr(e.description)) }),
|
922
922
|
/* @__PURE__ */ h("table", { className: U.languagesTable, children: [
|
923
923
|
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
924
924
|
/* @__PURE__ */ s("th", { children: "Languages" }),
|
@@ -926,7 +926,7 @@ const Dr = function(e) {
|
|
926
926
|
/* @__PURE__ */ s("th", { children: "Progress" }),
|
927
927
|
/* @__PURE__ */ s("th", { children: "Status" })
|
928
928
|
] }) }),
|
929
|
-
/* @__PURE__ */ s("tbody", { children: a.map((c) => /* @__PURE__ */ s(
|
929
|
+
/* @__PURE__ */ s("tbody", { children: a.map((c) => /* @__PURE__ */ s(no, { language: c, task: e }, c.lang_id)) })
|
930
930
|
] }),
|
931
931
|
/* @__PURE__ */ h("div", { className: U.metadata, children: [
|
932
932
|
/* @__PURE__ */ h("span", { children: [
|
@@ -941,30 +941,30 @@ const Dr = function(e) {
|
|
941
941
|
] })
|
942
942
|
] })
|
943
943
|
] }) : null;
|
944
|
-
},
|
944
|
+
}, P = {
|
945
945
|
TaskCompleted: "task_completed",
|
946
946
|
TaskClosed: "task_closed",
|
947
947
|
Refresh: "refresh",
|
948
948
|
ShowDialog: "show_dialog"
|
949
|
-
},
|
950
|
-
loadingContainer:
|
951
|
-
noTasksContainer:
|
952
|
-
noTasksHeading:
|
953
|
-
noTasksText:
|
954
|
-
tasksContainer:
|
955
|
-
},
|
949
|
+
}, lo = "_loadingContainer_19d6m_1", uo = "_noTasksContainer_19d6m_7", mo = "_noTasksHeading_19d6m_14", fo = "_noTasksText_19d6m_18", _o = "_tasksContainer_19d6m_23", F = {
|
950
|
+
loadingContainer: lo,
|
951
|
+
noTasksContainer: uo,
|
952
|
+
noTasksHeading: mo,
|
953
|
+
noTasksText: fo,
|
954
|
+
tasksContainer: _o
|
955
|
+
}, go = () => {
|
956
956
|
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: o } = Y();
|
957
|
-
return
|
958
|
-
document.removeEventListener(
|
959
|
-
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className:
|
960
|
-
/* @__PURE__ */ s("h3", { className:
|
961
|
-
/* @__PURE__ */ h("div", { className:
|
957
|
+
return $e(() => (o(), t == null || t({ tasks: e }), document.addEventListener(P.TaskCompleted, o), document.addEventListener(P.TaskClosed, o), document.addEventListener(P.Refresh, o), () => {
|
958
|
+
document.removeEventListener(P.TaskCompleted, o), document.removeEventListener(P.TaskClosed, o), document.removeEventListener(P.Refresh, o);
|
959
|
+
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(an, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: F.noTasksContainer, children: [
|
960
|
+
/* @__PURE__ */ s("h3", { className: F.noTasksHeading, children: "No tasks" }),
|
961
|
+
/* @__PURE__ */ h("div", { className: F.noTasksText, children: [
|
962
962
|
"Your incoming tasks will appear here.",
|
963
963
|
/* @__PURE__ */ s("br", {}),
|
964
964
|
/* @__PURE__ */ s(L, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
965
965
|
] })
|
966
|
-
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className:
|
967
|
-
},
|
966
|
+
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((a) => /* @__PURE__ */ s(co, { task: a }, a.id)) });
|
967
|
+
}, ho = ({ children: e, config: t }) => {
|
968
968
|
const [n, o] = R([]), [a, i] = R(!0), [c, d] = R(0), {
|
969
969
|
getProjectUrl: u,
|
970
970
|
onLanguageCompleteConfirm: l,
|
@@ -980,8 +980,8 @@ const Dr = function(e) {
|
|
980
980
|
const v = await E();
|
981
981
|
d(v);
|
982
982
|
};
|
983
|
-
|
984
|
-
document.removeEventListener(
|
983
|
+
$e(() => (g(), document.addEventListener(P.TaskCompleted, g), document.addEventListener(P.TaskClosed, g), document.addEventListener(P.Refresh, g), () => {
|
984
|
+
document.removeEventListener(P.TaskCompleted, g), document.removeEventListener(P.TaskClosed, g), document.removeEventListener(P.Refresh, g);
|
985
985
|
}));
|
986
986
|
const p = {
|
987
987
|
fetchTasks: b,
|
@@ -995,28 +995,28 @@ const Dr = function(e) {
|
|
995
995
|
langProgressOnClick: T,
|
996
996
|
taskTitleOnClick: y
|
997
997
|
};
|
998
|
-
return /* @__PURE__ */ s(
|
999
|
-
},
|
998
|
+
return /* @__PURE__ */ s(Gt.Provider, { value: p, children: e });
|
999
|
+
}, po = (e) => function(n) {
|
1000
1000
|
const { config: o, ...a } = n;
|
1001
|
-
return /* @__PURE__ */ s(
|
1002
|
-
},
|
1001
|
+
return /* @__PURE__ */ s(ho, { config: o, children: /* @__PURE__ */ s(e, { ...a }) });
|
1002
|
+
}, bo = po(() => {
|
1003
1003
|
const [e, t] = R(!1), { tasksCount: n } = Y();
|
1004
|
-
return
|
1004
|
+
return $e(() => {
|
1005
1005
|
const o = () => {
|
1006
1006
|
t(!0);
|
1007
1007
|
};
|
1008
|
-
return document.addEventListener(
|
1009
|
-
document.removeEventListener(
|
1008
|
+
return document.addEventListener(P.ShowDialog, o), () => {
|
1009
|
+
document.removeEventListener(P.ShowDialog, o);
|
1010
1010
|
};
|
1011
|
-
}), /* @__PURE__ */ s(
|
1011
|
+
}), /* @__PURE__ */ s(q, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
|
1012
1012
|
sn,
|
1013
1013
|
{
|
1014
|
-
content: /* @__PURE__ */ s(
|
1014
|
+
content: /* @__PURE__ */ s(go, {}),
|
1015
1015
|
placement: "right",
|
1016
1016
|
open: e,
|
1017
1017
|
onOpenChange: t,
|
1018
1018
|
middlewares: [
|
1019
|
-
|
1019
|
+
$r({
|
1020
1020
|
// Adding some spacing to the top and bottom so the popover
|
1021
1021
|
// doesn't extend to the edges of the screen.
|
1022
1022
|
padding: {
|
@@ -1026,59 +1026,59 @@ const Dr = function(e) {
|
|
1026
1026
|
})
|
1027
1027
|
],
|
1028
1028
|
children: (o) => /* @__PURE__ */ h(
|
1029
|
-
|
1029
|
+
xe,
|
1030
1030
|
{
|
1031
1031
|
type: "button",
|
1032
1032
|
"data-testid": "sidebar-tasks-widget-button",
|
1033
1033
|
"aria-label": "Tasks",
|
1034
|
-
className: N(
|
1035
|
-
[
|
1034
|
+
className: N(Re.navItem, {
|
1035
|
+
[Re.activeNavItem]: o
|
1036
1036
|
}),
|
1037
1037
|
children: [
|
1038
1038
|
/* @__PURE__ */ s(cn, { size: "25px" }),
|
1039
|
-
n > 0 && /* @__PURE__ */ s("div", { className:
|
1039
|
+
n > 0 && /* @__PURE__ */ s("div", { className: Re.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
1040
1040
|
]
|
1041
1041
|
}
|
1042
1042
|
)
|
1043
1043
|
}
|
1044
1044
|
) });
|
1045
|
-
}),
|
1046
|
-
|
1047
|
-
const
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
const
|
1059
|
-
breadcrumbsItem:
|
1060
|
-
breadcrumbs:
|
1061
|
-
},
|
1062
|
-
/* @__PURE__ */ s(L, { className:
|
1045
|
+
}), A = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Bn.sidebarContainer, children: e }), vo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1046
|
+
A.Top = vo;
|
1047
|
+
const To = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1048
|
+
A.Bottom = To;
|
1049
|
+
A.Avatar = Fn;
|
1050
|
+
A.IconLink = Kn;
|
1051
|
+
A.Menu = Qn;
|
1052
|
+
A.ProfileMenu = br;
|
1053
|
+
A.TeamSwitch = Rr;
|
1054
|
+
A.TeamMenuItem = Dt;
|
1055
|
+
A.UpgradeMenuItem = Or;
|
1056
|
+
A.ProfileSettingsMenuItem = yr;
|
1057
|
+
A.Tasks = bo;
|
1058
|
+
const yo = "_breadcrumbsItem_1hm6a_1", So = "_breadcrumbs_1hm6a_1", yt = {
|
1059
|
+
breadcrumbsItem: yo,
|
1060
|
+
breadcrumbs: So
|
1061
|
+
}, $a = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1062
|
+
/* @__PURE__ */ s(L, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1063
1063
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1064
|
-
] }, `${t.link}-${t.name}`)) }),
|
1065
|
-
!!n && t.some((o) => o.visible) && /* @__PURE__ */ s(
|
1066
|
-
t.filter(({ visible: o }) => o).map(({ link: o, label: a, onClick: i }) => /* @__PURE__ */ s(
|
1067
|
-
] }, t[0].label)) }),
|
1068
|
-
badge:
|
1069
|
-
tag:
|
1070
|
-
withNavLinkStyle:
|
1064
|
+
] }, `${t.link}-${t.name}`)) }), Eo = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1065
|
+
!!n && t.some((o) => o.visible) && /* @__PURE__ */ s(It, {}),
|
1066
|
+
t.filter(({ visible: o }) => o).map(({ link: o, label: a, onClick: i }) => /* @__PURE__ */ s(J, { href: o || "#", "aria-label": a, onClick: i, children: a }, a))
|
1067
|
+
] }, t[0].label)) }), wo = "_badge_1pc1v_1", Co = "_tag_1pc1v_15", Po = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57", Ao = "_projectNavigationItem_1pc1v_61", Io = "_projectNavigationItemDisabled_1pc1v_67", O = {
|
1068
|
+
badge: wo,
|
1069
|
+
tag: Co,
|
1070
|
+
withNavLinkStyle: Po,
|
1071
1071
|
disabled: ko,
|
1072
|
-
projectNavigationItem:
|
1073
|
-
projectNavigationItemDisabled:
|
1074
|
-
},
|
1072
|
+
projectNavigationItem: Ao,
|
1073
|
+
projectNavigationItemDisabled: Io
|
1074
|
+
}, St = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
|
1075
1075
|
/* @__PURE__ */ h("div", { children: [
|
1076
1076
|
/* @__PURE__ */ s("span", { children: e }),
|
1077
1077
|
!!t && /* @__PURE__ */ s("div", { className: O.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1078
1078
|
] }),
|
1079
|
-
!!n && /* @__PURE__ */ s(
|
1080
|
-
] }),
|
1081
|
-
({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(
|
1079
|
+
!!n && /* @__PURE__ */ s(je, { className: O.tag, children: n })
|
1080
|
+
] }), Le = tn(
|
1081
|
+
({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(q, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
|
1082
1082
|
"div",
|
1083
1083
|
{
|
1084
1084
|
className: n ? O.projectNavigationItemDisabled : O.projectNavigationItem,
|
@@ -1092,26 +1092,26 @@ const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
|
|
1092
1092
|
}),
|
1093
1093
|
disabled: n,
|
1094
1094
|
onClick: a,
|
1095
|
-
children: /* @__PURE__ */ s(
|
1095
|
+
children: /* @__PURE__ */ s(St, { label: e, badge: o, novel: i })
|
1096
1096
|
}
|
1097
|
-
) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(
|
1097
|
+
) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(St, { label: e, badge: o, novel: i }) })
|
1098
1098
|
}
|
1099
1099
|
) })
|
1100
1100
|
);
|
1101
|
-
|
1102
|
-
const
|
1101
|
+
Le.displayName = "NavigationTabsItem";
|
1102
|
+
const Ro = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, No = (e) => e.visible && (!e.dropdown || Ro(e.dropdown)), Fa = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: H.navigationTabList, "aria-orientation": "horizontal", children: e.filter(No).map((n) => {
|
1103
1103
|
var o, a, i;
|
1104
1104
|
return n.dropdown ? /* @__PURE__ */ s(
|
1105
1105
|
"li",
|
1106
1106
|
{
|
1107
|
-
className:
|
1107
|
+
className: H.navigationTab,
|
1108
1108
|
"data-testid": n.key,
|
1109
1109
|
"aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
|
1110
1110
|
children: /* @__PURE__ */ s(
|
1111
|
-
|
1111
|
+
ce,
|
1112
1112
|
{
|
1113
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */ s(
|
1114
|
-
children: /* @__PURE__ */ s(
|
1113
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ s(Le, { label: n.label, disabled: n.disabled, active: c }),
|
1114
|
+
children: /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Eo, { items: n.dropdown }) })
|
1115
1115
|
}
|
1116
1116
|
)
|
1117
1117
|
},
|
@@ -1119,11 +1119,11 @@ const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1119
1119
|
) : /* @__PURE__ */ s(
|
1120
1120
|
"li",
|
1121
1121
|
{
|
1122
|
-
className:
|
1122
|
+
className: H.navigationTab,
|
1123
1123
|
"data-testid": n.key,
|
1124
1124
|
"aria-selected": (a = n.isActive) == null ? void 0 : a.call(n, t),
|
1125
1125
|
children: /* @__PURE__ */ s(
|
1126
|
-
|
1126
|
+
Le,
|
1127
1127
|
{
|
1128
1128
|
label: n.label,
|
1129
1129
|
href: n.link,
|
@@ -1138,7 +1138,7 @@ const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1138
1138
|
n.key
|
1139
1139
|
);
|
1140
1140
|
}) }) });
|
1141
|
-
class
|
1141
|
+
class I {
|
1142
1142
|
/**
|
1143
1143
|
* This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
|
1144
1144
|
* that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
|
@@ -1150,7 +1150,7 @@ class A {
|
|
1150
1150
|
this.factories = t;
|
1151
1151
|
}
|
1152
1152
|
static create(t = {}) {
|
1153
|
-
return new
|
1153
|
+
return new I([() => t]);
|
1154
1154
|
}
|
1155
1155
|
/**
|
1156
1156
|
* Adds a single header to the builder by providing a key and a value.
|
@@ -1170,7 +1170,7 @@ class A {
|
|
1170
1170
|
* @param value - The value of the header
|
1171
1171
|
*/
|
1172
1172
|
add(t, n) {
|
1173
|
-
return new
|
1173
|
+
return new I([...this.factories, () => ({ [t]: n })]);
|
1174
1174
|
}
|
1175
1175
|
/**
|
1176
1176
|
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
@@ -1194,7 +1194,7 @@ class A {
|
|
1194
1194
|
* @param extension - An object with the headers to add
|
1195
1195
|
*/
|
1196
1196
|
and(t) {
|
1197
|
-
return new
|
1197
|
+
return new I([...this.factories, () => t]);
|
1198
1198
|
}
|
1199
1199
|
/**
|
1200
1200
|
* Adds a factory function that returns a promise of headers to the builder.
|
@@ -1215,7 +1215,7 @@ class A {
|
|
1215
1215
|
* @param factory - A function that returns a promise of headers
|
1216
1216
|
*/
|
1217
1217
|
from(t) {
|
1218
|
-
return new
|
1218
|
+
return new I([...this.factories, t]);
|
1219
1219
|
}
|
1220
1220
|
/**
|
1221
1221
|
* Takes a middleware function that receives the current builder and returns a new, modified, builder.
|
@@ -1260,7 +1260,7 @@ class A {
|
|
1260
1260
|
* @param builder - The builder to merge with
|
1261
1261
|
*/
|
1262
1262
|
merge(t) {
|
1263
|
-
return new
|
1263
|
+
return new I([...this.factories, ...t.factories]);
|
1264
1264
|
}
|
1265
1265
|
/**
|
1266
1266
|
* Resolves the headers by waiting for all the promises to resolve and merging them together.
|
@@ -1278,16 +1278,16 @@ class A {
|
|
1278
1278
|
return Object.assign({}, ...n);
|
1279
1279
|
}
|
1280
1280
|
}
|
1281
|
-
function
|
1282
|
-
return new
|
1281
|
+
function zt(e) {
|
1282
|
+
return new jo(e);
|
1283
1283
|
}
|
1284
|
-
class
|
1284
|
+
class jo {
|
1285
1285
|
constructor(t) {
|
1286
1286
|
this.middleware = t;
|
1287
1287
|
}
|
1288
1288
|
apply(t) {
|
1289
1289
|
return t.from(async () => {
|
1290
|
-
const n = this.middleware(
|
1290
|
+
const n = this.middleware(I.create());
|
1291
1291
|
return n instanceof Promise ? n.then((o) => o.resolve()) : n.resolve();
|
1292
1292
|
});
|
1293
1293
|
}
|
@@ -1297,7 +1297,7 @@ const Kt = r.union([
|
|
1297
1297
|
r.literal("admin"),
|
1298
1298
|
r.literal("biller"),
|
1299
1299
|
r.literal("member")
|
1300
|
-
]),
|
1300
|
+
]), xo = r.object({
|
1301
1301
|
userId: r.number(),
|
1302
1302
|
userUuid: r.string(),
|
1303
1303
|
teamId: r.number(),
|
@@ -1311,75 +1311,75 @@ const Kt = r.union([
|
|
1311
1311
|
isFullyAuthenticated: r.boolean(),
|
1312
1312
|
exp: r.number()
|
1313
1313
|
});
|
1314
|
-
function
|
1314
|
+
function V(e) {
|
1315
1315
|
try {
|
1316
1316
|
const t = e.split(".")[1], n = atob(t);
|
1317
|
-
return
|
1317
|
+
return xo.parse(JSON.parse(n));
|
1318
1318
|
} catch {
|
1319
1319
|
return;
|
1320
1320
|
}
|
1321
1321
|
}
|
1322
|
-
class
|
1322
|
+
class se extends Error {
|
1323
1323
|
constructor() {
|
1324
1324
|
super(...arguments);
|
1325
|
-
|
1326
|
-
|
1325
|
+
ne(this, "name", "UnauthorizedError");
|
1326
|
+
ne(this, "status", 401);
|
1327
1327
|
}
|
1328
1328
|
}
|
1329
|
-
function
|
1330
|
-
return
|
1329
|
+
function Ga(e) {
|
1330
|
+
return zt(async (t) => {
|
1331
1331
|
var i, c;
|
1332
1332
|
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
1333
1333
|
if (!n)
|
1334
|
-
throw new
|
1335
|
-
const { exp: o } =
|
1334
|
+
throw new se();
|
1335
|
+
const { exp: o } = V(n.accessToken) ?? { exp: 0 };
|
1336
1336
|
if (!dn(new Date(o)))
|
1337
1337
|
return t.add("Authorization", `Bearer ${n.accessToken}`);
|
1338
1338
|
const a = await e.refreshToken(n);
|
1339
1339
|
if (!a)
|
1340
|
-
throw new
|
1340
|
+
throw new se();
|
1341
1341
|
return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("Authorization", `Bearer ${a.accessToken}`);
|
1342
1342
|
});
|
1343
1343
|
}
|
1344
|
-
const
|
1344
|
+
const za = zt(
|
1345
1345
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1346
1346
|
);
|
1347
|
-
function
|
1347
|
+
function Jt() {
|
1348
1348
|
const e = Me(document.cookie, "accessToken"), t = Me(document.cookie, "refreshToken");
|
1349
1349
|
return !e || !t ? null : { accessToken: e, refreshToken: t };
|
1350
1350
|
}
|
1351
|
-
function
|
1351
|
+
function Oo() {
|
1352
1352
|
return Me(document.cookie, "csrf_token") ?? null;
|
1353
1353
|
}
|
1354
1354
|
function Me(e, t) {
|
1355
1355
|
var n, o;
|
1356
1356
|
return (o = (n = e.split(";").find((a) => a.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : o.substring(t.length + 1);
|
1357
1357
|
}
|
1358
|
-
function
|
1359
|
-
const e =
|
1358
|
+
function Ka() {
|
1359
|
+
const e = Jt();
|
1360
1360
|
if (!e)
|
1361
1361
|
return;
|
1362
|
-
const t =
|
1362
|
+
const t = V(e.accessToken);
|
1363
1363
|
if (t)
|
1364
1364
|
return { ...e, payload: t };
|
1365
1365
|
}
|
1366
|
-
const
|
1366
|
+
const Wt = r.union([
|
1367
1367
|
r.object({ Authorization: r.string() }),
|
1368
1368
|
r.object({ authorization: r.string() }),
|
1369
1369
|
r.object({ AUTHORIZATION: r.string() })
|
1370
|
-
]),
|
1370
|
+
]), Lo = r.union([
|
1371
1371
|
r.object({ "X-API-Token": r.string() }),
|
1372
1372
|
r.object({ "X-Api-Token": r.string() }),
|
1373
1373
|
r.object({ "x-api-token": r.string() }),
|
1374
1374
|
r.object({ "X-API-TOKEN": r.string() })
|
1375
|
-
]), Lo = r.union([
|
1376
|
-
Jt,
|
1377
|
-
Oo
|
1378
1375
|
]), Mo = r.union([
|
1376
|
+
Wt,
|
1377
|
+
Lo
|
1378
|
+
]), Uo = r.union([
|
1379
1379
|
r.object({ "X-Lokalise-Plugin": r.string() }),
|
1380
1380
|
r.object({ "x-lokalise-plugin": r.string() }),
|
1381
1381
|
r.object({ "X-LOKALISE-PLUGIN": r.string() })
|
1382
|
-
]),
|
1382
|
+
]), Z = Mo.and(Uo), Ho = r.object({
|
1383
1383
|
accessToken: r.string(),
|
1384
1384
|
refreshToken: r.string()
|
1385
1385
|
}), qo = r.union([
|
@@ -1387,74 +1387,79 @@ const Jt = r.union([
|
|
1387
1387
|
r.object({ "X-CSRF-Token": r.string() }),
|
1388
1388
|
r.object({ "x-csrf-token": r.string() }),
|
1389
1389
|
r.object({ "X-CSRF-TOKEN": r.string() })
|
1390
|
-
]),
|
1391
|
-
|
1390
|
+
]), Bo = r.union([
|
1391
|
+
Wt,
|
1392
1392
|
qo
|
1393
|
-
]),
|
1393
|
+
]), Fe = He({
|
1394
1394
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1395
1395
|
method: "post",
|
1396
1396
|
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
1397
1397
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1398
|
-
requestHeaderSchema:
|
1398
|
+
requestHeaderSchema: Bo,
|
1399
1399
|
requestBodySchema: r.undefined(),
|
1400
1400
|
isEmptyResponseExpected: !0,
|
1401
|
-
successResponseBodySchema:
|
1401
|
+
successResponseBodySchema: Ho
|
1402
1402
|
});
|
1403
|
-
function
|
1403
|
+
function Ja(e, t, n) {
|
1404
1404
|
return async () => {
|
1405
1405
|
const o = t();
|
1406
1406
|
if (!o)
|
1407
|
-
throw new
|
1408
|
-
return
|
1407
|
+
throw new se();
|
1408
|
+
return B(e, Fe, {
|
1409
1409
|
pathParams: { teamId: Number(await n()) },
|
1410
|
-
headers: await
|
1410
|
+
headers: await I.create().add("x-csrf-token", o).resolve()
|
1411
1411
|
});
|
1412
1412
|
};
|
1413
1413
|
}
|
1414
|
-
function
|
1415
|
-
return async ({ refreshToken: n }) =>
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1414
|
+
function Wa(e) {
|
1415
|
+
return async ({ accessToken: t, refreshToken: n }) => {
|
1416
|
+
const o = V(t);
|
1417
|
+
if (!o)
|
1418
|
+
throw new se();
|
1419
|
+
return B(e, Fe, {
|
1420
|
+
pathParams: { teamId: o.teamId },
|
1421
|
+
headers: await I.create().add("Authorization", `Bearer ${n}`).resolve()
|
1422
|
+
});
|
1423
|
+
};
|
1419
1424
|
}
|
1420
|
-
const
|
1425
|
+
const Do = {
|
1421
1426
|
teamKey: (e) => ["getUserToken", e]
|
1422
|
-
},
|
1427
|
+
}, $o = (e, t, n) => D({
|
1423
1428
|
...n,
|
1424
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1429
|
+
queryFn: async ({ queryKey: [o, a] }) => B(e, Fe, {
|
1425
1430
|
headers: await t.resolve(),
|
1426
1431
|
pathParams: { teamId: a }
|
1427
1432
|
})
|
1428
|
-
}),
|
1433
|
+
}), ie = class ie extends CustomEvent {
|
1429
1434
|
constructor(t) {
|
1430
|
-
super(
|
1431
|
-
detail: { token: t, payload:
|
1435
|
+
super(ie.eventName, {
|
1436
|
+
detail: { token: t, payload: V(t.accessToken) }
|
1432
1437
|
});
|
1433
1438
|
}
|
1434
1439
|
};
|
1435
|
-
|
1436
|
-
let z =
|
1437
|
-
function
|
1438
|
-
const o =
|
1439
|
-
queryKey:
|
1440
|
+
ne(ie, "eventName", "new-jwt-issued");
|
1441
|
+
let z = ie;
|
1442
|
+
function Qa(e, t, n) {
|
1443
|
+
const o = Oo(), a = $o(e, t.add("x-csrf-token", o ?? ""), {
|
1444
|
+
queryKey: Do.teamKey(n),
|
1440
1445
|
enabled: o !== void 0
|
1441
|
-
}), i =
|
1442
|
-
return
|
1446
|
+
}), i = wt();
|
1447
|
+
return K(() => {
|
1443
1448
|
a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new z(a.data)), i.current = a.data.accessToken);
|
1444
1449
|
}, [a.data]), a;
|
1445
1450
|
}
|
1446
1451
|
function Qt() {
|
1447
1452
|
const [e, t] = R();
|
1448
|
-
return
|
1453
|
+
return K(() => {
|
1449
1454
|
const n = (a) => {
|
1450
1455
|
t(a.detail.payload);
|
1451
|
-
}, o =
|
1452
|
-
return t(o ?
|
1456
|
+
}, o = Jt();
|
1457
|
+
return t(o ? V(o.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
|
1453
1458
|
window.removeEventListener(z.eventName, n);
|
1454
1459
|
};
|
1455
1460
|
}, []), e;
|
1456
1461
|
}
|
1457
|
-
const
|
1462
|
+
const Fo = Z, Go = r.object({
|
1458
1463
|
user_id: r.number(),
|
1459
1464
|
email: r.string().email(),
|
1460
1465
|
fullname: r.string(),
|
@@ -1463,100 +1468,119 @@ const $o = ce, Fo = r.object({
|
|
1463
1468
|
role: Kt
|
1464
1469
|
}), zo = r.object({
|
1465
1470
|
team_id: r.number(),
|
1466
|
-
team_user:
|
1467
|
-
}),
|
1471
|
+
team_user: Go
|
1472
|
+
}), Ko = Q({
|
1468
1473
|
description: "Get the details of a team user",
|
1469
|
-
requestHeaderSchema:
|
1474
|
+
requestHeaderSchema: Fo,
|
1470
1475
|
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
1471
1476
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1472
1477
|
successResponseBodySchema: zo
|
1473
|
-
}),
|
1478
|
+
}), Jo = {
|
1474
1479
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1475
|
-
}, Wo = (e, t, n) =>
|
1480
|
+
}, Wo = (e, t, n) => D({
|
1476
1481
|
...n,
|
1477
|
-
queryFn: async ({ queryKey: [o, a, i] }) =>
|
1482
|
+
queryFn: async ({ queryKey: [o, a, i] }) => W(e, Ko, {
|
1478
1483
|
headers: await t.resolve(),
|
1479
1484
|
pathParams: { teamId: a, userId: i }
|
1480
1485
|
})
|
1481
1486
|
});
|
1482
|
-
function
|
1487
|
+
function Xa(e, t) {
|
1483
1488
|
const n = Qt();
|
1484
1489
|
return Wo(e, t, {
|
1485
|
-
queryKey:
|
1490
|
+
queryKey: Jo.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1486
1491
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1487
1492
|
});
|
1488
1493
|
}
|
1489
|
-
const
|
1494
|
+
const Qo = r.object({
|
1490
1495
|
lang_id: r.number(),
|
1491
1496
|
lang_iso: r.string(),
|
1492
1497
|
lang_name: r.string(),
|
1493
1498
|
is_writable: r.union([r.literal(0), r.literal(1)])
|
1494
|
-
}),
|
1499
|
+
}), Xo = r.object({
|
1495
1500
|
user_id: r.number(),
|
1496
1501
|
email: r.string().email(),
|
1497
1502
|
fullname: r.string(),
|
1498
1503
|
created_at: r.string(),
|
1499
1504
|
created_at_timestamp: r.number(),
|
1500
1505
|
admin_rights: r.array(r.string()),
|
1501
|
-
languages: r.array(
|
1506
|
+
languages: r.array(Qo),
|
1502
1507
|
is_admin: r.boolean(),
|
1503
1508
|
is_reviewer: r.boolean()
|
1504
|
-
}),
|
1509
|
+
}), Yo = r.object({
|
1505
1510
|
project_id: r.string(),
|
1506
|
-
contributors: r.array(
|
1507
|
-
}),
|
1511
|
+
contributors: r.array(Xo)
|
1512
|
+
}), Vo = Q({
|
1508
1513
|
description: "Get the details of a project contributor",
|
1509
|
-
requestHeaderSchema:
|
1514
|
+
requestHeaderSchema: Z,
|
1510
1515
|
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
1511
1516
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
1512
|
-
successResponseBodySchema:
|
1513
|
-
}),
|
1517
|
+
successResponseBodySchema: Yo
|
1518
|
+
}), Zo = {
|
1514
1519
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
1515
|
-
},
|
1520
|
+
}, ea = (e, t, n) => D({
|
1516
1521
|
...n,
|
1517
|
-
queryFn: async ({ queryKey: [o, a, i] }) =>
|
1522
|
+
queryFn: async ({ queryKey: [o, a, i] }) => W(e, Vo, {
|
1518
1523
|
pathParams: { projectId: a, contributorId: i },
|
1519
1524
|
headers: await t.resolve()
|
1520
1525
|
})
|
1521
1526
|
});
|
1522
|
-
function
|
1527
|
+
function Ya(e, t, n) {
|
1523
1528
|
const o = Qt();
|
1524
|
-
return
|
1525
|
-
queryKey:
|
1529
|
+
return ea(e, t, {
|
1530
|
+
queryKey: Zo.projectUserKey(n, (o == null ? void 0 : o.userId) ?? 0),
|
1526
1531
|
enabled: o !== void 0
|
1527
1532
|
});
|
1528
1533
|
}
|
1529
|
-
const
|
1534
|
+
const ta = r.object({
|
1530
1535
|
lang_iso: r.string(),
|
1531
1536
|
custom_iso: r.string().optional()
|
1532
|
-
}),
|
1537
|
+
}), na = r.object({
|
1533
1538
|
language_id: r.number(),
|
1534
1539
|
language_iso: r.string(),
|
1535
1540
|
progress: r.number(),
|
1536
1541
|
words_to_do: r.number()
|
1537
|
-
}), na = r.object({
|
1538
|
-
projectId: r.string()
|
1539
1542
|
}), ra = r.object({
|
1543
|
+
projectId: r.string()
|
1544
|
+
}), oa = r.object({
|
1540
1545
|
lang_id: r.number(),
|
1541
1546
|
lang_iso: r.string(),
|
1542
1547
|
lang_name: r.string(),
|
1543
1548
|
is_rtl: r.boolean(),
|
1544
1549
|
plural_forms: r.array(r.string().optional())
|
1545
|
-
}),
|
1550
|
+
}), aa = r.object({
|
1546
1551
|
project_id: r.string(),
|
1547
1552
|
project_uuid: r.string().uuid(),
|
1548
|
-
languages: r.array(
|
1549
|
-
}),
|
1553
|
+
languages: r.array(oa)
|
1554
|
+
}), sa = r.object({
|
1555
|
+
projectId: r.string()
|
1556
|
+
}), ia = r.object({
|
1557
|
+
langs: r.array(
|
1558
|
+
r.object({
|
1559
|
+
lang_iso: r.string(),
|
1560
|
+
base_lang: r.boolean()
|
1561
|
+
})
|
1562
|
+
)
|
1563
|
+
}), ca = r.object({
|
1564
|
+
success: r.boolean()
|
1565
|
+
}), la = Q({
|
1550
1566
|
description: "List of project languages",
|
1551
|
-
requestHeaderSchema:
|
1552
|
-
requestPathParamsSchema:
|
1567
|
+
requestHeaderSchema: Z,
|
1568
|
+
requestPathParamsSchema: ra,
|
1553
1569
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1554
|
-
successResponseBodySchema:
|
1555
|
-
}),
|
1570
|
+
successResponseBodySchema: aa
|
1571
|
+
}), da = mn({
|
1572
|
+
description: "Bulk update project languages",
|
1573
|
+
requestHeaderSchema: Z,
|
1574
|
+
method: "put",
|
1575
|
+
requestPathParamsSchema: sa,
|
1576
|
+
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1577
|
+
requestBodySchema: ia,
|
1578
|
+
successResponseBodySchema: ca
|
1579
|
+
}), de = Z, Ge = r.union([
|
1556
1580
|
r.literal("localization_files"),
|
1557
1581
|
r.literal("paged_documents"),
|
1558
1582
|
r.literal("marketing")
|
1559
|
-
]),
|
1583
|
+
]), ua = r.object({
|
1560
1584
|
per_platform_key_names: r.boolean(),
|
1561
1585
|
reviewing: r.boolean(),
|
1562
1586
|
auto_toggle_unverified: r.boolean(),
|
@@ -1567,7 +1591,7 @@ const ea = r.object({
|
|
1567
1591
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
1568
1592
|
segmentation: r.boolean(),
|
1569
1593
|
contributor_preview_download_enabled: r.boolean()
|
1570
|
-
}),
|
1594
|
+
}), ma = r.object({
|
1571
1595
|
not_reviewed: r.number(),
|
1572
1596
|
unverified: r.number(),
|
1573
1597
|
spelling_grammar: r.number(),
|
@@ -1584,18 +1608,18 @@ const ea = r.object({
|
|
1584
1608
|
double_space: r.number(),
|
1585
1609
|
special_placeholder: r.number(),
|
1586
1610
|
unbalanced_brackets: r.number()
|
1587
|
-
}),
|
1611
|
+
}), fa = r.object({
|
1588
1612
|
progress_total: r.number(),
|
1589
1613
|
keys_total: r.number(),
|
1590
1614
|
team: r.number(),
|
1591
1615
|
base_words: r.number(),
|
1592
1616
|
qa_issues_total: r.number(),
|
1593
|
-
qa_issues:
|
1594
|
-
languages: r.array(
|
1595
|
-
}),
|
1617
|
+
qa_issues: ma,
|
1618
|
+
languages: r.array(na)
|
1619
|
+
}), ue = r.object({
|
1596
1620
|
project_id: r.string(),
|
1597
1621
|
uuid: r.string().uuid(),
|
1598
|
-
project_type:
|
1622
|
+
project_type: Ge,
|
1599
1623
|
name: r.string(),
|
1600
1624
|
description: r.string(),
|
1601
1625
|
created_at: r.string(),
|
@@ -1605,178 +1629,190 @@ const ea = r.object({
|
|
1605
1629
|
team_id: r.number(),
|
1606
1630
|
base_language_id: r.number(),
|
1607
1631
|
base_language_iso: r.string(),
|
1608
|
-
settings:
|
1609
|
-
statistics:
|
1610
|
-
}),
|
1632
|
+
settings: ua.optional(),
|
1633
|
+
statistics: fa.optional()
|
1634
|
+
}), _a = r.object({
|
1611
1635
|
name: r.string(),
|
1612
1636
|
team_id: r.string(),
|
1613
1637
|
base_lang_iso: r.string(),
|
1614
|
-
languages: r.array(
|
1615
|
-
project_type:
|
1638
|
+
languages: r.array(ta),
|
1639
|
+
project_type: Ge,
|
1616
1640
|
is_segmentation_enabled: r.boolean()
|
1617
|
-
}),
|
1618
|
-
filter_type:
|
1641
|
+
}), Et = r.union([r.literal(0), r.literal(1)]), ga = r.object({
|
1642
|
+
filter_type: Ge.optional(),
|
1619
1643
|
filter_team_id: r.number().optional(),
|
1620
1644
|
filter_names: r.string().optional(),
|
1621
|
-
include_statistics:
|
1622
|
-
include_settings:
|
1645
|
+
include_statistics: Et.optional(),
|
1646
|
+
include_settings: Et.optional(),
|
1623
1647
|
limit: r.number().optional(),
|
1624
1648
|
page: r.number().optional()
|
1625
|
-
}),
|
1626
|
-
projects: r.array(
|
1627
|
-
}),
|
1649
|
+
}), ha = r.object({
|
1650
|
+
projects: r.array(ue)
|
1651
|
+
}), pa = r.object({
|
1628
1652
|
project_id: r.string()
|
1629
|
-
}),
|
1653
|
+
}), ba = r.object({
|
1630
1654
|
project_id: r.string()
|
1631
|
-
}),
|
1655
|
+
}), va = r.object({
|
1632
1656
|
name: r.string().min(1),
|
1633
1657
|
description: r.string().optional()
|
1634
|
-
}),
|
1658
|
+
}), me = () => "/projects", Ta = He({
|
1635
1659
|
description: "Create a new project",
|
1636
|
-
requestHeaderSchema:
|
1660
|
+
requestHeaderSchema: de,
|
1637
1661
|
method: "post",
|
1638
|
-
pathResolver:
|
1639
|
-
requestBodySchema:
|
1640
|
-
successResponseBodySchema:
|
1641
|
-
}),
|
1662
|
+
pathResolver: me,
|
1663
|
+
requestBodySchema: _a,
|
1664
|
+
successResponseBodySchema: ue
|
1665
|
+
}), ya = Q({
|
1642
1666
|
description: "List all projects",
|
1643
|
-
requestHeaderSchema:
|
1644
|
-
pathResolver:
|
1645
|
-
requestQuerySchema:
|
1646
|
-
successResponseBodySchema:
|
1647
|
-
}),
|
1667
|
+
requestHeaderSchema: de,
|
1668
|
+
pathResolver: me,
|
1669
|
+
requestQuerySchema: ga,
|
1670
|
+
successResponseBodySchema: ha
|
1671
|
+
}), Sa = Q({
|
1648
1672
|
description: "Retrieve a project",
|
1649
|
-
requestHeaderSchema:
|
1650
|
-
requestPathParamsSchema:
|
1651
|
-
pathResolver: ({ project_id: e }) => `${
|
1652
|
-
successResponseBodySchema:
|
1653
|
-
}),
|
1673
|
+
requestHeaderSchema: de,
|
1674
|
+
requestPathParamsSchema: pa,
|
1675
|
+
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1676
|
+
successResponseBodySchema: ue
|
1677
|
+
}), Ea = He({
|
1654
1678
|
description: "Update a project",
|
1655
|
-
requestHeaderSchema:
|
1679
|
+
requestHeaderSchema: de,
|
1656
1680
|
method: "put",
|
1657
|
-
requestPathParamsSchema:
|
1658
|
-
pathResolver: ({ project_id: e }) => `${
|
1659
|
-
requestBodySchema:
|
1660
|
-
successResponseBodySchema:
|
1681
|
+
requestPathParamsSchema: ba,
|
1682
|
+
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1683
|
+
requestBodySchema: va,
|
1684
|
+
successResponseBodySchema: ue
|
1661
1685
|
});
|
1662
|
-
function
|
1663
|
-
return
|
1686
|
+
function Va(e, t, n = {}) {
|
1687
|
+
return qe({
|
1664
1688
|
...n,
|
1665
|
-
mutationFn: async (o) =>
|
1689
|
+
mutationFn: async (o) => B(e, Ta, {
|
1666
1690
|
headers: await t.resolve(),
|
1667
1691
|
body: o
|
1668
1692
|
})
|
1669
1693
|
});
|
1670
1694
|
}
|
1671
|
-
const
|
1695
|
+
const Za = {
|
1672
1696
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1673
1697
|
};
|
1674
|
-
function
|
1675
|
-
return
|
1698
|
+
function es(e, t, n) {
|
1699
|
+
return D({
|
1676
1700
|
...n,
|
1677
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1701
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, la, {
|
1678
1702
|
headers: await t.resolve(),
|
1679
1703
|
pathParams: { projectId: a }
|
1680
1704
|
})
|
1681
1705
|
});
|
1682
1706
|
}
|
1683
|
-
const
|
1707
|
+
const ts = {
|
1684
1708
|
paramsKey: (e) => ["listProjects", e]
|
1685
1709
|
};
|
1686
|
-
function
|
1687
|
-
return
|
1710
|
+
function ns(e, t, n) {
|
1711
|
+
return D({
|
1688
1712
|
...n,
|
1689
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1713
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, ya, {
|
1690
1714
|
headers: await t.resolve(),
|
1691
1715
|
queryParams: a
|
1692
1716
|
})
|
1693
1717
|
});
|
1694
1718
|
}
|
1695
|
-
const
|
1719
|
+
const rs = {
|
1696
1720
|
projectIdKey: (e) => ["retrieveProject", e]
|
1697
1721
|
};
|
1698
|
-
function
|
1699
|
-
return
|
1722
|
+
function os(e, t, n) {
|
1723
|
+
return D({
|
1700
1724
|
...n,
|
1701
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1725
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, Sa, {
|
1702
1726
|
headers: await t.resolve(),
|
1703
1727
|
pathParams: { project_id: a }
|
1704
1728
|
})
|
1705
1729
|
});
|
1706
1730
|
}
|
1707
|
-
function
|
1708
|
-
return
|
1731
|
+
function as(e, t, n, o = {}) {
|
1732
|
+
return qe({
|
1709
1733
|
...o,
|
1710
|
-
mutationFn: async (a) =>
|
1734
|
+
mutationFn: async (a) => B(e, Ea, {
|
1711
1735
|
headers: await t.resolve(),
|
1712
1736
|
body: a,
|
1713
1737
|
pathParams: n
|
1714
1738
|
})
|
1715
1739
|
});
|
1716
1740
|
}
|
1741
|
+
function ss(e, t, n, o = {}) {
|
1742
|
+
return qe({
|
1743
|
+
...o,
|
1744
|
+
mutationFn: async (a) => B(e, da, {
|
1745
|
+
pathParams: t,
|
1746
|
+
headers: await n.resolve(),
|
1747
|
+
body: a
|
1748
|
+
})
|
1749
|
+
});
|
1750
|
+
}
|
1717
1751
|
export {
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
Ko as
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1752
|
+
$a as Breadcrumbs,
|
1753
|
+
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1754
|
+
lr as ENTERPRISE_PLAN_IDS,
|
1755
|
+
ir as ESSENTIAL_PLAN_IDS,
|
1756
|
+
Ht as FREE_PLAN_ID,
|
1757
|
+
I as HeaderBuilder,
|
1758
|
+
Ga as JwtAuthHeaderBuilderMiddleware,
|
1759
|
+
ae as NavigationPanel,
|
1760
|
+
Fa as NavigationTabs,
|
1761
|
+
cr as PRO_PLAN_IDS,
|
1762
|
+
za as PublicApiHeaderBuilderMiddleware,
|
1763
|
+
sr as START_PLAN_IDS,
|
1764
|
+
A as Sidebar,
|
1765
|
+
k as SidebarTaskLanguageStatuses,
|
1766
|
+
Oe as SidebarTaskStatuses,
|
1767
|
+
re as SidebarTaskTypeOptions,
|
1768
|
+
ar as TRIAL_PLAN_ID,
|
1769
|
+
se as UnauthorizedError,
|
1770
|
+
da as bulkUpdateProjectLanguages,
|
1771
|
+
mr as convertNewLineToBreakTag,
|
1772
|
+
zt as createHeaderBuilderMiddleware,
|
1773
|
+
Ta as createProject,
|
1774
|
+
hr as formatDate,
|
1775
|
+
Da as formatDateTz,
|
1776
|
+
Ja as generateTokenFromClassicSession,
|
1777
|
+
Ka as getAuthenticatedSessionDetailFromRequest,
|
1778
|
+
Oo as getCsrfTokenFromCookie,
|
1779
|
+
Jt as getJwtTokenFromCookie,
|
1780
|
+
Ko as getTeamUser,
|
1781
|
+
Jo as getTeamUsersQueryKey,
|
1782
|
+
Fe as getUserToken,
|
1783
|
+
Do as getUserTokenKey,
|
1784
|
+
Ba as isEnterpriseOpenSourcePlan,
|
1785
|
+
Ha as isEnterprisePlan,
|
1786
|
+
Ma as isEssentialPlan,
|
1787
|
+
De as isFreePlan,
|
1788
|
+
qa as isPaidPlan,
|
1789
|
+
Ua as isProPlan,
|
1790
|
+
La as isStartPlan,
|
1756
1791
|
Bt as isTrialPlan,
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1792
|
+
la as listProjectLanguages,
|
1793
|
+
Za as listProjectLanguagesKey,
|
1794
|
+
ya as listProjects,
|
1795
|
+
ts as listProjectsKey,
|
1796
|
+
gr as makeUrlClickable,
|
1797
|
+
V as parseJwtTokenPayload,
|
1798
|
+
Wa as refreshExpiredToken,
|
1799
|
+
Vo as retrieveContributor,
|
1800
|
+
Zo as retrieveContributorKeys,
|
1801
|
+
Sa as retrieveProject,
|
1802
|
+
rs as retrieveProjectQueryKey,
|
1803
|
+
Ea as updateProject,
|
1804
|
+
Ya as useAuthenticatedProjectContributor,
|
1770
1805
|
Qt as useAuthenticatedSessionPayload,
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1806
|
+
Xa as useAuthenticatedUser,
|
1807
|
+
ss as useBulkUpdateProjectLanguagesMutation,
|
1808
|
+
Va as useCreateProjectMutation,
|
1809
|
+
$e as useEffectOnce,
|
1810
|
+
Qa as useGetPromotedClassicSessionJwtQuery,
|
1775
1811
|
Wo as useGetTeamUsersQuery,
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1812
|
+
$o as useGetUserTokenQuery,
|
1813
|
+
es as useListProjectLanguagesQuery,
|
1814
|
+
ns as useListProjectsQuery,
|
1815
|
+
ea as useRetrieveContributorQuery,
|
1816
|
+
os as useRetrieveProjectQuery,
|
1817
|
+
as as useUpdateProjectMutation
|
1782
1818
|
};
|