@lokalise/harmony 1.17.3 → 1.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +567 -537
- package/dist/types/src/features/auth/core/headers/createHeaderBuilderMiddleware.d.ts +3 -3
- package/dist/types/src/features/auth/core/headers/headerBuilder.d.ts +13 -13
- package/dist/types/src/features/auth/core/middleware/jwtAuthHeaderBuilderMiddleware.d.ts +1 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +0 -6
- package/dist/types/src/features/publicApi/hooks/useBulkUpdateProjectLanguagesMutation.d.ts +21 -0
- package/dist/types/src/features/publicApi/languages.d.ts +87 -3
- package/dist/types/src/features/publicApi/node.d.ts +3 -2
- package/dist/types/src/features/publicApi/projects.d.ts +0 -24
- package/dist/types/src/features/publicApi/teamUsers.d.ts +0 -6
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +0 -6
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +39 -0
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +0 -6
- package/dist/types/src/features/publicApi/types/sharedTypes.d.ts +0 -18
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +0 -6
- package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +0 -6
- package/dist/types/src/features/publicApi/userToken.d.ts +0 -6
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,72 +1,72 @@
|
|
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 z, 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 It, MenuItem as J, MenuDivider as At, 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";
|
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
15
|
const Oe = {
|
16
16
|
Completed: "completed",
|
17
17
|
InProgress: "in_progress",
|
18
18
|
Created: "created",
|
19
19
|
Queued: "queued"
|
20
|
-
},
|
20
|
+
}, k = {
|
21
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 _e,
|
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
41
|
return _e = e, _e;
|
42
42
|
}
|
43
|
-
var ge,
|
44
|
-
function
|
45
|
-
if (
|
46
|
-
|
47
|
-
var e = typeof
|
43
|
+
var ge, Xe;
|
44
|
+
function fn() {
|
45
|
+
if (Xe) return ge;
|
46
|
+
Xe = 1;
|
47
|
+
var e = typeof oe == "object" && oe && oe.Object === Object && oe;
|
48
48
|
return ge = e, ge;
|
49
49
|
}
|
50
|
-
var he,
|
50
|
+
var he, Ye;
|
51
51
|
function jt() {
|
52
|
-
if (
|
53
|
-
|
54
|
-
var e =
|
52
|
+
if (Ye) return he;
|
53
|
+
Ye = 1;
|
54
|
+
var e = fn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
55
|
return he = n, he;
|
56
56
|
}
|
57
|
-
var pe,
|
58
|
-
function
|
59
|
-
if (
|
60
|
-
|
57
|
+
var pe, Ve;
|
58
|
+
function _n() {
|
59
|
+
if (Ve) return pe;
|
60
|
+
Ve = 1;
|
61
61
|
var e = jt(), t = function() {
|
62
62
|
return e.Date.now();
|
63
63
|
};
|
64
64
|
return pe = t, pe;
|
65
65
|
}
|
66
|
-
var be,
|
67
|
-
function
|
68
|
-
if (
|
69
|
-
|
66
|
+
var be, Ze;
|
67
|
+
function gn() {
|
68
|
+
if (Ze) return be;
|
69
|
+
Ze = 1;
|
70
70
|
var e = /\s/;
|
71
71
|
function t(n) {
|
72
72
|
for (var o = n.length; o-- && e.test(n.charAt(o)); )
|
@@ -75,27 +75,27 @@ function _n() {
|
|
75
75
|
}
|
76
76
|
return be = t, be;
|
77
77
|
}
|
78
|
-
var ve,
|
79
|
-
function
|
80
|
-
if (
|
81
|
-
|
82
|
-
var e =
|
78
|
+
var ve, et;
|
79
|
+
function hn() {
|
80
|
+
if (et) return ve;
|
81
|
+
et = 1;
|
82
|
+
var e = gn(), t = /^\s+/;
|
83
83
|
function n(o) {
|
84
84
|
return o && o.slice(0, e(o) + 1).replace(t, "");
|
85
85
|
}
|
86
86
|
return ve = n, ve;
|
87
87
|
}
|
88
|
-
var Te,
|
88
|
+
var Te, tt;
|
89
89
|
function xt() {
|
90
|
-
if (
|
91
|
-
|
90
|
+
if (tt) return Te;
|
91
|
+
tt = 1;
|
92
92
|
var e = jt(), t = e.Symbol;
|
93
93
|
return Te = t, Te;
|
94
94
|
}
|
95
|
-
var ye,
|
96
|
-
function
|
97
|
-
if (
|
98
|
-
|
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];
|
@@ -109,50 +109,50 @@ function hn() {
|
|
109
109
|
}
|
110
110
|
return ye = i, ye;
|
111
111
|
}
|
112
|
-
var Se,
|
113
|
-
function
|
114
|
-
if (
|
115
|
-
|
112
|
+
var Se, rt;
|
113
|
+
function bn() {
|
114
|
+
if (rt) return Se;
|
115
|
+
rt = 1;
|
116
116
|
var e = Object.prototype, t = e.toString;
|
117
117
|
function n(o) {
|
118
118
|
return t.call(o);
|
119
119
|
}
|
120
120
|
return Se = n, Se;
|
121
121
|
}
|
122
|
-
var Ee,
|
123
|
-
function
|
124
|
-
if (
|
125
|
-
|
126
|
-
var e = xt(), t =
|
122
|
+
var Ee, ot;
|
123
|
+
function vn() {
|
124
|
+
if (ot) return Ee;
|
125
|
+
ot = 1;
|
126
|
+
var e = xt(), t = pn(), n = bn(), o = "[object Null]", a = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
127
|
function c(d) {
|
128
128
|
return d == null ? d === void 0 ? a : o : i && i in Object(d) ? t(d) : n(d);
|
129
129
|
}
|
130
130
|
return Ee = c, Ee;
|
131
131
|
}
|
132
|
-
var we,
|
133
|
-
function
|
134
|
-
if (
|
135
|
-
|
132
|
+
var we, at;
|
133
|
+
function Tn() {
|
134
|
+
if (at) return we;
|
135
|
+
at = 1;
|
136
136
|
function e(t) {
|
137
137
|
return t != null && typeof t == "object";
|
138
138
|
}
|
139
139
|
return we = e, we;
|
140
140
|
}
|
141
|
-
var Ce,
|
142
|
-
function
|
143
|
-
if (
|
144
|
-
|
145
|
-
var e =
|
141
|
+
var Ce, st;
|
142
|
+
function yn() {
|
143
|
+
if (st) return Ce;
|
144
|
+
st = 1;
|
145
|
+
var e = vn(), t = Tn(), n = "[object Symbol]";
|
146
146
|
function o(a) {
|
147
147
|
return typeof a == "symbol" || t(a) && e(a) == n;
|
148
148
|
}
|
149
149
|
return Ce = o, Ce;
|
150
150
|
}
|
151
|
-
var
|
152
|
-
function
|
153
|
-
if (
|
154
|
-
|
155
|
-
var e =
|
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
|
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
|
-
function
|
195
|
-
var j = S - E,
|
196
|
-
return E === void 0 || j >= u || j < 0 || p &&
|
194
|
+
function Ke(S) {
|
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
|
-
if (
|
201
|
-
return
|
202
|
-
f = setTimeout(
|
200
|
+
if (Ke(S))
|
201
|
+
return ze(S);
|
202
|
+
f = setTimeout(te, ee(S));
|
203
203
|
}
|
204
|
-
function
|
204
|
+
function ze(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 : ze(t());
|
212
212
|
}
|
213
213
|
function fe() {
|
214
|
-
var S = t(), j =
|
214
|
+
var S = t(), j = Ke(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
223
|
return fe.cancel = Xt, fe.flush = Yt, fe;
|
224
224
|
}
|
225
|
-
return
|
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 Ie, lt;
|
230
|
+
function Cn() {
|
231
|
+
if (lt) return Ie;
|
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 Ie = o, Ie;
|
245
245
|
}
|
246
|
-
var
|
247
|
-
const kn = /* @__PURE__ */ Nt(
|
246
|
+
var Pn = Cn();
|
247
|
+
const kn = /* @__PURE__ */ Nt(Pn), In = (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
|
+
}, An = (
|
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 = An(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,12 +304,12 @@ 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
314
|
}, [a, i, l, E]), g = We(In(b, t, n, o), [
|
315
315
|
b,
|
@@ -317,7 +317,7 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
317
317
|
n,
|
318
318
|
o
|
319
319
|
]);
|
320
|
-
return
|
320
|
+
return z(() => {
|
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
|
+
z(() => {
|
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:
|
386
|
-
active:
|
387
|
-
},
|
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", Kn = "_active_18vhx_18", dt = {
|
385
|
+
link: Gn,
|
386
|
+
active: Kn
|
387
|
+
}, zn = ({ 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(
|
@@ -470,7 +470,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
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
|
+
z(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,34 +526,34 @@ 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(At, {})
|
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) },
|
@@ -569,30 +569,30 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
569
569
|
]
|
570
570
|
}
|
571
571
|
);
|
572
|
-
}, Ir = "_teamsContainer_1t68g_1",
|
572
|
+
}, Ir = "_teamsContainer_1t68g_1", Ar = {
|
573
573
|
teamsContainer: Ir
|
574
|
-
},
|
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 ${Ar.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", Ae = {
|
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(
|
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 ${Ae.container}`, children: [
|
587
587
|
/* @__PURE__ */ s("span", { className: Ae.planCta, children: c }),
|
588
588
|
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Ae.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:
|
748
|
-
badge:
|
749
|
-
},
|
745
|
+
}, Fr = "_navItem_1dudv_1", Gr = "_activeNavItem_1dudv_18", Kr = "_badge_1dudv_23", Re = {
|
746
|
+
navItem: Fr,
|
747
|
+
activeNavItem: Gr,
|
748
|
+
badge: Kr
|
749
|
+
}, Gt = Pt({}), Y = () => Ct(Gt), zr = (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,12 +814,12 @@ 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
|
{
|
@@ -827,7 +827,7 @@ const Dr = function(e) {
|
|
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: Ne.langCellSecondary, children: d || c ? "0" : /* @__PURE__ */ s(
|
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
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,10 +879,10 @@ 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(je, { color:
|
882
|
+
/* @__PURE__ */ s(je, { color: Qr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
883
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(
|
@@ -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
899
|
menuButton: /* @__PURE__ */ s(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
900
|
-
children: /* @__PURE__ */ s(
|
901
|
-
|
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: zr(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: {
|
@@ -1042,43 +1042,43 @@ const Dr = function(e) {
|
|
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
|
+
}), I = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Bn.sidebarContainer, children: e }), vo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1046
|
+
I.Top = vo;
|
1047
|
+
const To = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1048
|
+
I.Bottom = To;
|
1049
|
+
I.Avatar = Fn;
|
1050
|
+
I.IconLink = zn;
|
1051
|
+
I.Menu = Qn;
|
1052
|
+
I.ProfileMenu = br;
|
1053
|
+
I.TeamSwitch = Rr;
|
1054
|
+
I.TeamMenuItem = Dt;
|
1055
|
+
I.UpgradeMenuItem = Or;
|
1056
|
+
I.ProfileSettingsMenuItem = yr;
|
1057
|
+
I.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(At, {}),
|
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", Io = "_projectNavigationItem_1pc1v_61", Ao = "_projectNavigationItemDisabled_1pc1v_67", O = {
|
1068
|
+
badge: wo,
|
1069
|
+
tag: Co,
|
1070
|
+
withNavLinkStyle: Po,
|
1071
1071
|
disabled: ko,
|
1072
1072
|
projectNavigationItem: Io,
|
1073
|
-
projectNavigationItemDisabled:
|
1074
|
-
},
|
1073
|
+
projectNavigationItemDisabled: Ao
|
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
1079
|
!!n && /* @__PURE__ */ s(je, { className: O.tag, children: n })
|
1080
1080
|
] }), Le = tn(
|
1081
|
-
({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(
|
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
1101
|
Le.displayName = "NavigationTabsItem";
|
1102
|
-
const
|
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
1113
|
menuButton: ({ opened: c }) => /* @__PURE__ */ s(Le, { label: n.label, disabled: n.disabled, active: c }),
|
1114
|
-
children: /* @__PURE__ */ s(
|
1114
|
+
children: /* @__PURE__ */ s(le, { children: /* @__PURE__ */ s(Eo, { items: n.dropdown }) })
|
1115
1115
|
}
|
1116
1116
|
)
|
1117
1117
|
},
|
@@ -1119,7 +1119,7 @@ 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(
|
@@ -1159,11 +1159,11 @@ class A {
|
|
1159
1159
|
* ```typescript
|
1160
1160
|
* const builder = HeaderBuilder.create()
|
1161
1161
|
* .add('Content-Type', 'application/json')
|
1162
|
-
* .add('
|
1162
|
+
* .add('authorization', 'Bearer token')
|
1163
1163
|
*
|
1164
1164
|
* const headers = await builder.resolve()
|
1165
1165
|
* console.log(headers)
|
1166
|
-
* // { 'Content-Type': 'application/json', '
|
1166
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
1167
1167
|
* ```
|
1168
1168
|
*
|
1169
1169
|
* @param key - The key of the header
|
@@ -1178,14 +1178,14 @@ class A {
|
|
1178
1178
|
* @example
|
1179
1179
|
* ```typescript
|
1180
1180
|
* const builder = HeaderBuilder.create()
|
1181
|
-
* .and({ 'Content-Type': 'application/json', '
|
1181
|
+
* .and({ 'Content-Type': 'application/json', 'authorization': 'Bearer token' })
|
1182
1182
|
* .and(Promise.resolve({ 'X-Custom-Header': 'custom', 'X-Another-Header': 'another' }))
|
1183
1183
|
*
|
1184
1184
|
* const headers = await builder.resolve()
|
1185
1185
|
* console.log(headers)
|
1186
1186
|
* // Prints: {
|
1187
1187
|
* // 'Content-Type': 'application/json',
|
1188
|
-
* // '
|
1188
|
+
* // 'authorization': 'Bearer token',
|
1189
1189
|
* // 'X-Custom-Header': 'custom',
|
1190
1190
|
* // 'X-Another-Header': 'another'
|
1191
1191
|
* // }
|
@@ -1205,11 +1205,11 @@ class A {
|
|
1205
1205
|
* const builder = HeaderBuilder.create()
|
1206
1206
|
* .from(async () => {
|
1207
1207
|
* const token = await fetchToken()
|
1208
|
-
* return { '
|
1208
|
+
* return { 'authorization': `Bearer ${token}` }
|
1209
1209
|
* })
|
1210
1210
|
*
|
1211
1211
|
* const headers = await builder.resolve()
|
1212
|
-
* console.log(headers) // { '
|
1212
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
1213
1213
|
* ```
|
1214
1214
|
*
|
1215
1215
|
* @param factory - A function that returns a promise of headers
|
@@ -1224,14 +1224,14 @@ class A {
|
|
1224
1224
|
* ```typescript
|
1225
1225
|
* const authMiddleware = createHeaderBuilderMiddleware(async (builder) => {
|
1226
1226
|
* const token = await fetchToken()
|
1227
|
-
* return builder.add('
|
1227
|
+
* return builder.add('authorization', `Bearer ${token}`)
|
1228
1228
|
* })
|
1229
1229
|
*
|
1230
1230
|
* const builder = HeaderBuilder.create()
|
1231
1231
|
* .with(authMiddleware)
|
1232
1232
|
*
|
1233
|
-
* const headers = await builder.resolve() // Type of headers is { '
|
1234
|
-
* console.log(headers) // { '
|
1233
|
+
* const headers = await builder.resolve() // Type of headers is { 'authorization': string }
|
1234
|
+
* console.log(headers) // { 'authorization': 'Bearer <token>' }
|
1235
1235
|
* ```
|
1236
1236
|
*
|
1237
1237
|
* @param middleware
|
@@ -1248,13 +1248,13 @@ class A {
|
|
1248
1248
|
* .add('Content-Type', 'application/json')
|
1249
1249
|
*
|
1250
1250
|
* const builderB = HeaderBuilder.create()
|
1251
|
-
* .add('
|
1251
|
+
* .add('authorization', 'Bearer token')
|
1252
1252
|
*
|
1253
1253
|
* const mergedBuilder = builderA.merge(builderB)
|
1254
1254
|
*
|
1255
1255
|
* const headers = await mergedBuilder.resolve()
|
1256
1256
|
* console.log(headers)
|
1257
|
-
* // { 'Content-Type': 'application/json', '
|
1257
|
+
* // { 'Content-Type': 'application/json', 'authorization': 'Bearer token' }
|
1258
1258
|
* ```
|
1259
1259
|
*
|
1260
1260
|
* @param builder - The builder to merge with
|
@@ -1278,10 +1278,10 @@ class A {
|
|
1278
1278
|
return Object.assign({}, ...n);
|
1279
1279
|
}
|
1280
1280
|
}
|
1281
|
-
function
|
1282
|
-
return new
|
1281
|
+
function Kt(e) {
|
1282
|
+
return new jo(e);
|
1283
1283
|
}
|
1284
|
-
class
|
1284
|
+
class jo {
|
1285
1285
|
constructor(t) {
|
1286
1286
|
this.middleware = t;
|
1287
1287
|
}
|
@@ -1292,16 +1292,16 @@ class No {
|
|
1292
1292
|
});
|
1293
1293
|
}
|
1294
1294
|
}
|
1295
|
-
const
|
1295
|
+
const zt = r.union([
|
1296
1296
|
r.literal("owner"),
|
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(),
|
1304
|
-
userTeamRole:
|
1304
|
+
userTeamRole: zt,
|
1305
1305
|
userEmail: r.string().email(),
|
1306
1306
|
userName: r.string(),
|
1307
1307
|
userCurrentTeamId: r.number(),
|
@@ -1314,72 +1314,71 @@ const Kt = r.union([
|
|
1314
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 Kt(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
|
1334
|
+
throw new se();
|
1335
1335
|
const { exp: o } = V(n.accessToken) ?? { exp: 0 };
|
1336
1336
|
if (!dn(new Date(o)))
|
1337
|
-
return t.add("
|
1337
|
+
return t.add("authorization", `Bearer ${n.accessToken}`);
|
1338
1338
|
const a = await e.refreshToken(n);
|
1339
1339
|
if (!a)
|
1340
|
-
throw new
|
1341
|
-
return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("
|
1340
|
+
throw new se();
|
1341
|
+
return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("authorization", `Bearer ${a.accessToken}`);
|
1342
1342
|
});
|
1343
1343
|
}
|
1344
|
-
const
|
1344
|
+
const Ka = Kt(
|
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 za() {
|
1359
|
+
const e = Jt();
|
1360
1360
|
if (!e)
|
1361
1361
|
return;
|
1362
1362
|
const t = V(e.accessToken);
|
1363
1363
|
if (t)
|
1364
1364
|
return { ...e, payload: t };
|
1365
1365
|
}
|
1366
|
-
const
|
1367
|
-
r.object({ Authorization: r.string() }),
|
1366
|
+
const Wt = r.union([
|
1368
1367
|
r.object({ authorization: r.string() }),
|
1369
1368
|
r.object({ AUTHORIZATION: r.string() })
|
1370
|
-
]),
|
1369
|
+
]), Lo = r.union([
|
1371
1370
|
r.object({ "X-API-Token": r.string() }),
|
1372
1371
|
r.object({ "X-Api-Token": r.string() }),
|
1373
1372
|
r.object({ "x-api-token": r.string() }),
|
1374
1373
|
r.object({ "X-API-TOKEN": r.string() })
|
1375
|
-
]), Lo = r.union([
|
1376
|
-
Jt,
|
1377
|
-
Oo
|
1378
1374
|
]), Mo = r.union([
|
1375
|
+
Wt,
|
1376
|
+
Lo
|
1377
|
+
]), Uo = r.union([
|
1379
1378
|
r.object({ "X-Lokalise-Plugin": r.string() }),
|
1380
1379
|
r.object({ "x-lokalise-plugin": r.string() }),
|
1381
1380
|
r.object({ "X-LOKALISE-PLUGIN": r.string() })
|
1382
|
-
]),
|
1381
|
+
]), Z = Mo.and(Uo), Ho = r.object({
|
1383
1382
|
accessToken: r.string(),
|
1384
1383
|
refreshToken: r.string()
|
1385
1384
|
}), qo = r.union([
|
@@ -1387,181 +1386,200 @@ const Jt = r.union([
|
|
1387
1386
|
r.object({ "X-CSRF-Token": r.string() }),
|
1388
1387
|
r.object({ "x-csrf-token": r.string() }),
|
1389
1388
|
r.object({ "X-CSRF-TOKEN": r.string() })
|
1390
|
-
]),
|
1391
|
-
|
1389
|
+
]), Bo = r.union([
|
1390
|
+
Wt,
|
1392
1391
|
qo
|
1393
|
-
]),
|
1392
|
+
]), Fe = He({
|
1394
1393
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1395
1394
|
method: "post",
|
1396
1395
|
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
1397
1396
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1398
|
-
requestHeaderSchema:
|
1397
|
+
requestHeaderSchema: Bo,
|
1399
1398
|
requestBodySchema: r.undefined(),
|
1400
1399
|
isEmptyResponseExpected: !0,
|
1401
|
-
successResponseBodySchema:
|
1400
|
+
successResponseBodySchema: Ho
|
1402
1401
|
});
|
1403
|
-
function
|
1402
|
+
function Ja(e, t, n) {
|
1404
1403
|
return async () => {
|
1405
1404
|
const o = t();
|
1406
1405
|
if (!o)
|
1407
|
-
throw new
|
1408
|
-
return
|
1406
|
+
throw new se();
|
1407
|
+
return B(e, Fe, {
|
1409
1408
|
pathParams: { teamId: Number(await n()) },
|
1410
1409
|
headers: await A.create().add("x-csrf-token", o).resolve()
|
1411
1410
|
});
|
1412
1411
|
};
|
1413
1412
|
}
|
1414
|
-
function
|
1413
|
+
function Wa(e) {
|
1415
1414
|
return async ({ accessToken: t, refreshToken: n }) => {
|
1416
1415
|
const o = V(t);
|
1417
1416
|
if (!o)
|
1418
|
-
throw new
|
1419
|
-
return
|
1417
|
+
throw new se();
|
1418
|
+
return B(e, Fe, {
|
1420
1419
|
pathParams: { teamId: o.teamId },
|
1421
|
-
headers: await A.create().add("
|
1420
|
+
headers: await A.create().add("authorization", `Bearer ${n}`).resolve()
|
1422
1421
|
});
|
1423
1422
|
};
|
1424
1423
|
}
|
1425
|
-
const
|
1424
|
+
const Do = {
|
1426
1425
|
teamKey: (e) => ["getUserToken", e]
|
1427
|
-
},
|
1426
|
+
}, $o = (e, t, n) => D({
|
1428
1427
|
...n,
|
1429
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1428
|
+
queryFn: async ({ queryKey: [o, a] }) => B(e, Fe, {
|
1430
1429
|
headers: await t.resolve(),
|
1431
1430
|
pathParams: { teamId: a }
|
1432
1431
|
})
|
1433
|
-
}),
|
1432
|
+
}), ie = class ie extends CustomEvent {
|
1434
1433
|
constructor(t) {
|
1435
|
-
super(
|
1434
|
+
super(ie.eventName, {
|
1436
1435
|
detail: { token: t, payload: V(t.accessToken) }
|
1437
1436
|
});
|
1438
1437
|
}
|
1439
1438
|
};
|
1440
|
-
|
1441
|
-
let
|
1442
|
-
function
|
1443
|
-
const o =
|
1444
|
-
queryKey:
|
1439
|
+
ne(ie, "eventName", "new-jwt-issued");
|
1440
|
+
let K = ie;
|
1441
|
+
function Qa(e, t, n) {
|
1442
|
+
const o = Oo(), a = $o(e, t.add("x-csrf-token", o ?? ""), {
|
1443
|
+
queryKey: Do.teamKey(n),
|
1445
1444
|
enabled: o !== void 0
|
1446
|
-
}), i =
|
1447
|
-
return
|
1448
|
-
a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new
|
1445
|
+
}), i = wt();
|
1446
|
+
return z(() => {
|
1447
|
+
a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new K(a.data)), i.current = a.data.accessToken);
|
1449
1448
|
}, [a.data]), a;
|
1450
1449
|
}
|
1451
1450
|
function Qt() {
|
1452
1451
|
const [e, t] = R();
|
1453
|
-
return
|
1452
|
+
return z(() => {
|
1454
1453
|
const n = (a) => {
|
1455
1454
|
t(a.detail.payload);
|
1456
|
-
}, o =
|
1457
|
-
return t(o ? V(o.accessToken) : void 0), window.addEventListener(
|
1458
|
-
window.removeEventListener(
|
1455
|
+
}, o = Jt();
|
1456
|
+
return t(o ? V(o.accessToken) : void 0), window.addEventListener(K.eventName, n), () => {
|
1457
|
+
window.removeEventListener(K.eventName, n);
|
1459
1458
|
};
|
1460
1459
|
}, []), e;
|
1461
1460
|
}
|
1462
|
-
const
|
1461
|
+
const Fo = Z, Go = r.object({
|
1463
1462
|
user_id: r.number(),
|
1464
1463
|
email: r.string().email(),
|
1465
1464
|
fullname: r.string(),
|
1466
1465
|
created_at: r.string(),
|
1467
1466
|
created_at_timestamp: r.number(),
|
1468
|
-
role:
|
1469
|
-
}),
|
1467
|
+
role: zt
|
1468
|
+
}), Ko = r.object({
|
1470
1469
|
team_id: r.number(),
|
1471
|
-
team_user:
|
1472
|
-
}),
|
1470
|
+
team_user: Go
|
1471
|
+
}), zo = Q({
|
1473
1472
|
description: "Get the details of a team user",
|
1474
|
-
requestHeaderSchema:
|
1473
|
+
requestHeaderSchema: Fo,
|
1475
1474
|
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
1476
1475
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1477
|
-
successResponseBodySchema:
|
1478
|
-
}),
|
1476
|
+
successResponseBodySchema: Ko
|
1477
|
+
}), Jo = {
|
1479
1478
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1480
|
-
}, Wo = (e, t, n) =>
|
1479
|
+
}, Wo = (e, t, n) => D({
|
1481
1480
|
...n,
|
1482
|
-
queryFn: async ({ queryKey: [o, a, i] }) =>
|
1481
|
+
queryFn: async ({ queryKey: [o, a, i] }) => W(e, zo, {
|
1483
1482
|
headers: await t.resolve(),
|
1484
1483
|
pathParams: { teamId: a, userId: i }
|
1485
1484
|
})
|
1486
1485
|
});
|
1487
|
-
function
|
1486
|
+
function Xa(e, t) {
|
1488
1487
|
const n = Qt();
|
1489
1488
|
return Wo(e, t, {
|
1490
|
-
queryKey:
|
1489
|
+
queryKey: Jo.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1491
1490
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1492
1491
|
});
|
1493
1492
|
}
|
1494
|
-
const
|
1493
|
+
const Qo = r.object({
|
1495
1494
|
lang_id: r.number(),
|
1496
1495
|
lang_iso: r.string(),
|
1497
1496
|
lang_name: r.string(),
|
1498
1497
|
is_writable: r.union([r.literal(0), r.literal(1)])
|
1499
|
-
}),
|
1498
|
+
}), Xo = r.object({
|
1500
1499
|
user_id: r.number(),
|
1501
1500
|
email: r.string().email(),
|
1502
1501
|
fullname: r.string(),
|
1503
1502
|
created_at: r.string(),
|
1504
1503
|
created_at_timestamp: r.number(),
|
1505
1504
|
admin_rights: r.array(r.string()),
|
1506
|
-
languages: r.array(
|
1505
|
+
languages: r.array(Qo),
|
1507
1506
|
is_admin: r.boolean(),
|
1508
1507
|
is_reviewer: r.boolean()
|
1509
|
-
}),
|
1508
|
+
}), Yo = r.object({
|
1510
1509
|
project_id: r.string(),
|
1511
|
-
contributors: r.array(
|
1512
|
-
}),
|
1510
|
+
contributors: r.array(Xo)
|
1511
|
+
}), Vo = Q({
|
1513
1512
|
description: "Get the details of a project contributor",
|
1514
|
-
requestHeaderSchema:
|
1513
|
+
requestHeaderSchema: Z,
|
1515
1514
|
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
1516
1515
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
1517
|
-
successResponseBodySchema:
|
1518
|
-
}),
|
1516
|
+
successResponseBodySchema: Yo
|
1517
|
+
}), Zo = {
|
1519
1518
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
1520
|
-
},
|
1519
|
+
}, ea = (e, t, n) => D({
|
1521
1520
|
...n,
|
1522
|
-
queryFn: async ({ queryKey: [o, a, i] }) =>
|
1521
|
+
queryFn: async ({ queryKey: [o, a, i] }) => W(e, Vo, {
|
1523
1522
|
pathParams: { projectId: a, contributorId: i },
|
1524
1523
|
headers: await t.resolve()
|
1525
1524
|
})
|
1526
1525
|
});
|
1527
|
-
function
|
1526
|
+
function Ya(e, t, n) {
|
1528
1527
|
const o = Qt();
|
1529
|
-
return
|
1530
|
-
queryKey:
|
1528
|
+
return ea(e, t, {
|
1529
|
+
queryKey: Zo.projectUserKey(n, (o == null ? void 0 : o.userId) ?? 0),
|
1531
1530
|
enabled: o !== void 0
|
1532
1531
|
});
|
1533
1532
|
}
|
1534
|
-
const
|
1533
|
+
const ta = r.object({
|
1535
1534
|
lang_iso: r.string(),
|
1536
1535
|
custom_iso: r.string().optional()
|
1537
|
-
}),
|
1536
|
+
}), na = r.object({
|
1538
1537
|
language_id: r.number(),
|
1539
1538
|
language_iso: r.string(),
|
1540
1539
|
progress: r.number(),
|
1541
1540
|
words_to_do: r.number()
|
1542
|
-
}), na = r.object({
|
1543
|
-
projectId: r.string()
|
1544
1541
|
}), ra = r.object({
|
1542
|
+
projectId: r.string()
|
1543
|
+
}), oa = r.object({
|
1545
1544
|
lang_id: r.number(),
|
1546
1545
|
lang_iso: r.string(),
|
1547
1546
|
lang_name: r.string(),
|
1548
1547
|
is_rtl: r.boolean(),
|
1549
1548
|
plural_forms: r.array(r.string().optional())
|
1550
|
-
}),
|
1549
|
+
}), aa = r.object({
|
1551
1550
|
project_id: r.string(),
|
1552
1551
|
project_uuid: r.string().uuid(),
|
1553
|
-
languages: r.array(
|
1554
|
-
}),
|
1552
|
+
languages: r.array(oa)
|
1553
|
+
}), sa = r.object({
|
1554
|
+
projectId: r.string()
|
1555
|
+
}), ia = r.object({
|
1556
|
+
langs: r.array(
|
1557
|
+
r.object({
|
1558
|
+
lang_iso: r.string(),
|
1559
|
+
base_lang: r.boolean()
|
1560
|
+
})
|
1561
|
+
)
|
1562
|
+
}), ca = r.object({
|
1563
|
+
success: r.boolean()
|
1564
|
+
}), la = Q({
|
1555
1565
|
description: "List of project languages",
|
1556
|
-
requestHeaderSchema:
|
1557
|
-
requestPathParamsSchema:
|
1566
|
+
requestHeaderSchema: Z,
|
1567
|
+
requestPathParamsSchema: ra,
|
1558
1568
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1559
|
-
successResponseBodySchema:
|
1560
|
-
}),
|
1569
|
+
successResponseBodySchema: aa
|
1570
|
+
}), da = mn({
|
1571
|
+
description: "Bulk update project languages",
|
1572
|
+
requestHeaderSchema: Z,
|
1573
|
+
method: "put",
|
1574
|
+
requestPathParamsSchema: sa,
|
1575
|
+
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1576
|
+
requestBodySchema: ia,
|
1577
|
+
successResponseBodySchema: ca
|
1578
|
+
}), de = Z, Ge = r.union([
|
1561
1579
|
r.literal("localization_files"),
|
1562
1580
|
r.literal("paged_documents"),
|
1563
1581
|
r.literal("marketing")
|
1564
|
-
]),
|
1582
|
+
]), ua = r.object({
|
1565
1583
|
per_platform_key_names: r.boolean(),
|
1566
1584
|
reviewing: r.boolean(),
|
1567
1585
|
auto_toggle_unverified: r.boolean(),
|
@@ -1572,7 +1590,7 @@ const ea = r.object({
|
|
1572
1590
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
1573
1591
|
segmentation: r.boolean(),
|
1574
1592
|
contributor_preview_download_enabled: r.boolean()
|
1575
|
-
}),
|
1593
|
+
}), ma = r.object({
|
1576
1594
|
not_reviewed: r.number(),
|
1577
1595
|
unverified: r.number(),
|
1578
1596
|
spelling_grammar: r.number(),
|
@@ -1589,18 +1607,18 @@ const ea = r.object({
|
|
1589
1607
|
double_space: r.number(),
|
1590
1608
|
special_placeholder: r.number(),
|
1591
1609
|
unbalanced_brackets: r.number()
|
1592
|
-
}),
|
1610
|
+
}), fa = r.object({
|
1593
1611
|
progress_total: r.number(),
|
1594
1612
|
keys_total: r.number(),
|
1595
1613
|
team: r.number(),
|
1596
1614
|
base_words: r.number(),
|
1597
1615
|
qa_issues_total: r.number(),
|
1598
|
-
qa_issues:
|
1599
|
-
languages: r.array(
|
1616
|
+
qa_issues: ma,
|
1617
|
+
languages: r.array(na)
|
1600
1618
|
}), ue = r.object({
|
1601
1619
|
project_id: r.string(),
|
1602
1620
|
uuid: r.string().uuid(),
|
1603
|
-
project_type:
|
1621
|
+
project_type: Ge,
|
1604
1622
|
name: r.string(),
|
1605
1623
|
description: r.string(),
|
1606
1624
|
created_at: r.string(),
|
@@ -1610,178 +1628,190 @@ const ea = r.object({
|
|
1610
1628
|
team_id: r.number(),
|
1611
1629
|
base_language_id: r.number(),
|
1612
1630
|
base_language_iso: r.string(),
|
1613
|
-
settings:
|
1614
|
-
statistics:
|
1615
|
-
}),
|
1631
|
+
settings: ua.optional(),
|
1632
|
+
statistics: fa.optional()
|
1633
|
+
}), _a = r.object({
|
1616
1634
|
name: r.string(),
|
1617
1635
|
team_id: r.string(),
|
1618
1636
|
base_lang_iso: r.string(),
|
1619
|
-
languages: r.array(
|
1620
|
-
project_type:
|
1637
|
+
languages: r.array(ta),
|
1638
|
+
project_type: Ge,
|
1621
1639
|
is_segmentation_enabled: r.boolean()
|
1622
|
-
}),
|
1623
|
-
filter_type:
|
1640
|
+
}), Et = r.union([r.literal(0), r.literal(1)]), ga = r.object({
|
1641
|
+
filter_type: Ge.optional(),
|
1624
1642
|
filter_team_id: r.number().optional(),
|
1625
1643
|
filter_names: r.string().optional(),
|
1626
|
-
include_statistics:
|
1627
|
-
include_settings:
|
1644
|
+
include_statistics: Et.optional(),
|
1645
|
+
include_settings: Et.optional(),
|
1628
1646
|
limit: r.number().optional(),
|
1629
1647
|
page: r.number().optional()
|
1630
|
-
}),
|
1648
|
+
}), ha = r.object({
|
1631
1649
|
projects: r.array(ue)
|
1632
|
-
}),
|
1650
|
+
}), pa = r.object({
|
1633
1651
|
project_id: r.string()
|
1634
|
-
}),
|
1652
|
+
}), ba = r.object({
|
1635
1653
|
project_id: r.string()
|
1636
|
-
}),
|
1654
|
+
}), va = r.object({
|
1637
1655
|
name: r.string().min(1),
|
1638
1656
|
description: r.string().optional()
|
1639
|
-
}), me = () => "/projects",
|
1657
|
+
}), me = () => "/projects", Ta = He({
|
1640
1658
|
description: "Create a new project",
|
1641
1659
|
requestHeaderSchema: de,
|
1642
1660
|
method: "post",
|
1643
1661
|
pathResolver: me,
|
1644
|
-
requestBodySchema:
|
1662
|
+
requestBodySchema: _a,
|
1645
1663
|
successResponseBodySchema: ue
|
1646
|
-
}),
|
1664
|
+
}), ya = Q({
|
1647
1665
|
description: "List all projects",
|
1648
1666
|
requestHeaderSchema: de,
|
1649
1667
|
pathResolver: me,
|
1650
|
-
requestQuerySchema:
|
1651
|
-
successResponseBodySchema:
|
1652
|
-
}),
|
1668
|
+
requestQuerySchema: ga,
|
1669
|
+
successResponseBodySchema: ha
|
1670
|
+
}), Sa = Q({
|
1653
1671
|
description: "Retrieve a project",
|
1654
1672
|
requestHeaderSchema: de,
|
1655
|
-
requestPathParamsSchema:
|
1673
|
+
requestPathParamsSchema: pa,
|
1656
1674
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1657
1675
|
successResponseBodySchema: ue
|
1658
|
-
}),
|
1676
|
+
}), Ea = He({
|
1659
1677
|
description: "Update a project",
|
1660
1678
|
requestHeaderSchema: de,
|
1661
1679
|
method: "put",
|
1662
|
-
requestPathParamsSchema:
|
1680
|
+
requestPathParamsSchema: ba,
|
1663
1681
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1664
|
-
requestBodySchema:
|
1682
|
+
requestBodySchema: va,
|
1665
1683
|
successResponseBodySchema: ue
|
1666
1684
|
});
|
1667
|
-
function
|
1668
|
-
return
|
1685
|
+
function Va(e, t, n = {}) {
|
1686
|
+
return qe({
|
1669
1687
|
...n,
|
1670
|
-
mutationFn: async (o) =>
|
1688
|
+
mutationFn: async (o) => B(e, Ta, {
|
1671
1689
|
headers: await t.resolve(),
|
1672
1690
|
body: o
|
1673
1691
|
})
|
1674
1692
|
});
|
1675
1693
|
}
|
1676
|
-
const
|
1694
|
+
const Za = {
|
1677
1695
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1678
1696
|
};
|
1679
|
-
function
|
1680
|
-
return
|
1697
|
+
function es(e, t, n) {
|
1698
|
+
return D({
|
1681
1699
|
...n,
|
1682
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1700
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, la, {
|
1683
1701
|
headers: await t.resolve(),
|
1684
1702
|
pathParams: { projectId: a }
|
1685
1703
|
})
|
1686
1704
|
});
|
1687
1705
|
}
|
1688
|
-
const
|
1706
|
+
const ts = {
|
1689
1707
|
paramsKey: (e) => ["listProjects", e]
|
1690
1708
|
};
|
1691
|
-
function
|
1692
|
-
return
|
1709
|
+
function ns(e, t, n) {
|
1710
|
+
return D({
|
1693
1711
|
...n,
|
1694
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1712
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, ya, {
|
1695
1713
|
headers: await t.resolve(),
|
1696
1714
|
queryParams: a
|
1697
1715
|
})
|
1698
1716
|
});
|
1699
1717
|
}
|
1700
|
-
const
|
1718
|
+
const rs = {
|
1701
1719
|
projectIdKey: (e) => ["retrieveProject", e]
|
1702
1720
|
};
|
1703
|
-
function
|
1704
|
-
return
|
1721
|
+
function os(e, t, n) {
|
1722
|
+
return D({
|
1705
1723
|
...n,
|
1706
|
-
queryFn: async ({ queryKey: [o, a] }) =>
|
1724
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, Sa, {
|
1707
1725
|
headers: await t.resolve(),
|
1708
1726
|
pathParams: { project_id: a }
|
1709
1727
|
})
|
1710
1728
|
});
|
1711
1729
|
}
|
1712
|
-
function
|
1713
|
-
return
|
1730
|
+
function as(e, t, n, o = {}) {
|
1731
|
+
return qe({
|
1714
1732
|
...o,
|
1715
|
-
mutationFn: async (a) =>
|
1733
|
+
mutationFn: async (a) => B(e, Ea, {
|
1716
1734
|
headers: await t.resolve(),
|
1717
1735
|
body: a,
|
1718
1736
|
pathParams: n
|
1719
1737
|
})
|
1720
1738
|
});
|
1721
1739
|
}
|
1740
|
+
function ss(e, t, n, o = {}) {
|
1741
|
+
return qe({
|
1742
|
+
...o,
|
1743
|
+
mutationFn: async (a) => B(e, da, {
|
1744
|
+
pathParams: t,
|
1745
|
+
headers: await n.resolve(),
|
1746
|
+
body: a
|
1747
|
+
})
|
1748
|
+
});
|
1749
|
+
}
|
1722
1750
|
export {
|
1723
|
-
|
1724
|
-
|
1725
|
-
|
1726
|
-
|
1727
|
-
|
1751
|
+
$a as Breadcrumbs,
|
1752
|
+
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1753
|
+
lr as ENTERPRISE_PLAN_IDS,
|
1754
|
+
ir as ESSENTIAL_PLAN_IDS,
|
1755
|
+
Ht as FREE_PLAN_ID,
|
1728
1756
|
A as HeaderBuilder,
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
|
1757
|
+
Ga as JwtAuthHeaderBuilderMiddleware,
|
1758
|
+
ae as NavigationPanel,
|
1759
|
+
Fa as NavigationTabs,
|
1760
|
+
cr as PRO_PLAN_IDS,
|
1761
|
+
Ka as PublicApiHeaderBuilderMiddleware,
|
1762
|
+
sr as START_PLAN_IDS,
|
1763
|
+
I as Sidebar,
|
1764
|
+
k as SidebarTaskLanguageStatuses,
|
1737
1765
|
Oe as SidebarTaskStatuses,
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1766
|
+
re as SidebarTaskTypeOptions,
|
1767
|
+
ar as TRIAL_PLAN_ID,
|
1768
|
+
se as UnauthorizedError,
|
1769
|
+
da as bulkUpdateProjectLanguages,
|
1770
|
+
mr as convertNewLineToBreakTag,
|
1771
|
+
Kt as createHeaderBuilderMiddleware,
|
1772
|
+
Ta as createProject,
|
1773
|
+
hr as formatDate,
|
1774
|
+
Da as formatDateTz,
|
1775
|
+
Ja as generateTokenFromClassicSession,
|
1776
|
+
za as getAuthenticatedSessionDetailFromRequest,
|
1777
|
+
Oo as getCsrfTokenFromCookie,
|
1778
|
+
Jt as getJwtTokenFromCookie,
|
1779
|
+
zo as getTeamUser,
|
1780
|
+
Jo as getTeamUsersQueryKey,
|
1781
|
+
Fe as getUserToken,
|
1782
|
+
Do as getUserTokenKey,
|
1783
|
+
Ba as isEnterpriseOpenSourcePlan,
|
1784
|
+
Ha as isEnterprisePlan,
|
1785
|
+
Ma as isEssentialPlan,
|
1786
|
+
De as isFreePlan,
|
1787
|
+
qa as isPaidPlan,
|
1788
|
+
Ua as isProPlan,
|
1789
|
+
La as isStartPlan,
|
1761
1790
|
Bt as isTrialPlan,
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1791
|
+
la as listProjectLanguages,
|
1792
|
+
Za as listProjectLanguagesKey,
|
1793
|
+
ya as listProjects,
|
1794
|
+
ts as listProjectsKey,
|
1795
|
+
gr as makeUrlClickable,
|
1767
1796
|
V as parseJwtTokenPayload,
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1797
|
+
Wa as refreshExpiredToken,
|
1798
|
+
Vo as retrieveContributor,
|
1799
|
+
Zo as retrieveContributorKeys,
|
1800
|
+
Sa as retrieveProject,
|
1801
|
+
rs as retrieveProjectQueryKey,
|
1802
|
+
Ea as updateProject,
|
1803
|
+
Ya as useAuthenticatedProjectContributor,
|
1775
1804
|
Qt as useAuthenticatedSessionPayload,
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1805
|
+
Xa as useAuthenticatedUser,
|
1806
|
+
ss as useBulkUpdateProjectLanguagesMutation,
|
1807
|
+
Va as useCreateProjectMutation,
|
1808
|
+
$e as useEffectOnce,
|
1809
|
+
Qa as useGetPromotedClassicSessionJwtQuery,
|
1780
1810
|
Wo as useGetTeamUsersQuery,
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1811
|
+
$o as useGetUserTokenQuery,
|
1812
|
+
es as useListProjectLanguagesQuery,
|
1813
|
+
ns as useListProjectsQuery,
|
1814
|
+
ea as useRetrieveContributorQuery,
|
1815
|
+
os as useRetrieveProjectQuery,
|
1816
|
+
as as useUpdateProjectMutation
|
1787
1817
|
};
|