@lokalise/harmony 1.17.0-exp-jwtheaderfactorysharedauth.1 → 1.17.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/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +578 -567
- package/dist/types/src/features/auth/core/headers/createHeaderBuilderMiddleware.d.ts +32 -0
- package/dist/types/src/features/auth/core/headers/createHeaderBuilderMiddleware.test.d.ts +1 -0
- package/dist/types/src/features/auth/core/headers/headerBuilder.d.ts +6 -34
- package/dist/types/src/features/auth/core/middleware/jwtAuthHeaderBuilderMiddleware.d.ts +1 -1
- package/dist/types/src/features/auth/core/middleware/publicApiHeaderBuilderMiddleware.d.ts +2 -2
- package/dist/types/src/features/auth/node.d.ts +2 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +45 -3
- package/dist/types/src/features/publicApi/languages.d.ts +45 -3
- package/dist/types/src/features/publicApi/projects.d.ts +180 -12
- package/dist/types/src/features/publicApi/teamUsers.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/sharedTypes.d.ts +125 -11
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +32 -2
- package/dist/types/src/features/publicApi/userToken.d.ts +32 -2
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var ee = (e, t, n) =>
|
4
|
-
import { jsx as
|
1
|
+
var Vt = Object.defineProperty;
|
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 ee = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { jsx as s, jsxs as h, Fragment as Ue } from "react/jsx-runtime";
|
5
5
|
import * as F from "react";
|
6
|
-
import { useRef as Et, useState as
|
7
|
-
import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as
|
8
|
-
import { format as At, parseISO as dn } from "date-fns";
|
6
|
+
import { useRef as Et, useState as R, useCallback as We, useEffect as G, useContext as wt, createContext as Ct, cloneElement as en, Fragment as kt, forwardRef as tn } from "react";
|
7
|
+
import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as nn, UserIcon as It, MenuItem as K, MenuDivider as Pt, ConfirmModal as rn, Alert as on, Tag as Ne, Button as je, Loading as an, Popover as sn, JobIcon as cn } from "@lokalise/louis";
|
8
|
+
import { format as At, parseISO as ln, isThisSecond as dn } from "date-fns";
|
9
9
|
import { toZonedTime as un } from "date-fns-tz";
|
10
|
-
import { z as
|
10
|
+
import { z as r } from "zod";
|
11
11
|
import { buildPayloadRoute as qe } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
12
12
|
import { sendByPayloadRoute as W, sendByGetRoute as J } from "@lokalise/frontend-http-client";
|
13
|
-
import { useQuery as B, useMutation as
|
13
|
+
import { useQuery as B, useMutation as Rt } from "@tanstack/react-query";
|
14
14
|
import { buildGetRoute as Q } from "@lokalise/universal-ts-utils/node";
|
15
15
|
const xe = {
|
16
16
|
Completed: "completed",
|
17
17
|
InProgress: "in_progress",
|
18
18
|
Created: "created",
|
19
19
|
Queued: "queued"
|
20
|
-
},
|
20
|
+
}, I = {
|
21
21
|
...xe,
|
22
22
|
NotStarted: "not_started"
|
23
23
|
}, te = {
|
@@ -27,7 +27,7 @@ const xe = {
|
|
27
27
|
automatic_translation: "automatic_translation"
|
28
28
|
};
|
29
29
|
var ne = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
30
|
-
function
|
30
|
+
function Nt(e) {
|
31
31
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
32
32
|
}
|
33
33
|
var fe, Je;
|
@@ -47,31 +47,31 @@ function mn() {
|
|
47
47
|
var e = typeof ne == "object" && ne && ne.Object === Object && ne;
|
48
48
|
return _e = e, _e;
|
49
49
|
}
|
50
|
-
var ge,
|
50
|
+
var ge, Xe;
|
51
51
|
function jt() {
|
52
|
-
if (
|
53
|
-
|
52
|
+
if (Xe) return ge;
|
53
|
+
Xe = 1;
|
54
54
|
var e = mn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
55
|
return ge = n, ge;
|
56
56
|
}
|
57
|
-
var he,
|
57
|
+
var he, Ye;
|
58
58
|
function fn() {
|
59
|
-
if (
|
60
|
-
|
59
|
+
if (Ye) return he;
|
60
|
+
Ye = 1;
|
61
61
|
var e = jt(), t = function() {
|
62
62
|
return e.Date.now();
|
63
63
|
};
|
64
64
|
return he = t, he;
|
65
65
|
}
|
66
|
-
var pe,
|
66
|
+
var pe, Ve;
|
67
67
|
function _n() {
|
68
|
-
if (
|
69
|
-
|
68
|
+
if (Ve) return pe;
|
69
|
+
Ve = 1;
|
70
70
|
var e = /\s/;
|
71
71
|
function t(n) {
|
72
|
-
for (var
|
72
|
+
for (var o = n.length; o-- && e.test(n.charAt(o)); )
|
73
73
|
;
|
74
|
-
return
|
74
|
+
return o;
|
75
75
|
}
|
76
76
|
return pe = t, pe;
|
77
77
|
}
|
@@ -80,8 +80,8 @@ function gn() {
|
|
80
80
|
if (Ze) return be;
|
81
81
|
Ze = 1;
|
82
82
|
var e = _n(), t = /^\s+/;
|
83
|
-
function n(
|
84
|
-
return
|
83
|
+
function n(o) {
|
84
|
+
return o && o.slice(0, e(o) + 1).replace(t, "");
|
85
85
|
}
|
86
86
|
return be = n, be;
|
87
87
|
}
|
@@ -96,16 +96,16 @@ var Te, tt;
|
|
96
96
|
function hn() {
|
97
97
|
if (tt) return Te;
|
98
98
|
tt = 1;
|
99
|
-
var e = xt(), t = Object.prototype, n = t.hasOwnProperty,
|
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
|
-
var
|
101
|
+
var d = n.call(c, a), u = c[a];
|
102
102
|
try {
|
103
|
-
c[
|
104
|
-
var
|
103
|
+
c[a] = void 0;
|
104
|
+
var l = !0;
|
105
105
|
} catch {
|
106
106
|
}
|
107
|
-
var m =
|
108
|
-
return
|
107
|
+
var m = o.call(c);
|
108
|
+
return l && (d ? c[a] = u : delete c[a]), m;
|
109
109
|
}
|
110
110
|
return Te = i, Te;
|
111
111
|
}
|
@@ -114,8 +114,8 @@ function pn() {
|
|
114
114
|
if (nt) return ye;
|
115
115
|
nt = 1;
|
116
116
|
var e = Object.prototype, t = e.toString;
|
117
|
-
function n(
|
118
|
-
return t.call(
|
117
|
+
function n(o) {
|
118
|
+
return t.call(o);
|
119
119
|
}
|
120
120
|
return ye = n, ye;
|
121
121
|
}
|
@@ -123,9 +123,9 @@ var Se, rt;
|
|
123
123
|
function bn() {
|
124
124
|
if (rt) return Se;
|
125
125
|
rt = 1;
|
126
|
-
var e = xt(), t = hn(), n = pn(),
|
127
|
-
function c(
|
128
|
-
return
|
126
|
+
var e = xt(), t = hn(), n = pn(), 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);
|
129
129
|
}
|
130
130
|
return Se = c, Se;
|
131
131
|
}
|
@@ -143,30 +143,30 @@ function Tn() {
|
|
143
143
|
if (at) return we;
|
144
144
|
at = 1;
|
145
145
|
var e = bn(), t = vn(), n = "[object Symbol]";
|
146
|
-
function
|
147
|
-
return typeof
|
146
|
+
function o(a) {
|
147
|
+
return typeof a == "symbol" || t(a) && e(a) == n;
|
148
148
|
}
|
149
|
-
return we =
|
149
|
+
return we = o, we;
|
150
150
|
}
|
151
151
|
var Ce, st;
|
152
152
|
function yn() {
|
153
153
|
if (st) return Ce;
|
154
154
|
st = 1;
|
155
|
-
var e = gn(), t = He(), n = Tn(),
|
156
|
-
function u(
|
157
|
-
if (typeof
|
158
|
-
return
|
159
|
-
if (n(
|
160
|
-
return
|
161
|
-
if (t(
|
162
|
-
var m = typeof
|
163
|
-
|
155
|
+
var e = gn(), t = He(), n = Tn(), o = NaN, a = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
|
156
|
+
function u(l) {
|
157
|
+
if (typeof l == "number")
|
158
|
+
return l;
|
159
|
+
if (n(l))
|
160
|
+
return o;
|
161
|
+
if (t(l)) {
|
162
|
+
var m = typeof l.valueOf == "function" ? l.valueOf() : l;
|
163
|
+
l = t(m) ? m + "" : m;
|
164
164
|
}
|
165
|
-
if (typeof
|
166
|
-
return
|
167
|
-
|
168
|
-
var _ = i.test(
|
169
|
-
return _ || c.test(
|
165
|
+
if (typeof l != "string")
|
166
|
+
return l === 0 ? l : +l;
|
167
|
+
l = e(l);
|
168
|
+
var _ = i.test(l);
|
169
|
+
return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ? o : +l;
|
170
170
|
}
|
171
171
|
return Ce = u, Ce;
|
172
172
|
}
|
@@ -174,20 +174,20 @@ var ke, it;
|
|
174
174
|
function Ot() {
|
175
175
|
if (it) return ke;
|
176
176
|
it = 1;
|
177
|
-
var e = He(), t = fn(), n = yn(),
|
178
|
-
function c(
|
177
|
+
var e = He(), t = fn(), n = yn(), o = "Expected a function", a = Math.max, i = Math.min;
|
178
|
+
function c(d, u, l) {
|
179
179
|
var m, _, T, y, f, E, b = 0, g = !1, p = !1, v = !0;
|
180
|
-
if (typeof
|
181
|
-
throw new TypeError(
|
182
|
-
u = n(u) || 0, e(
|
180
|
+
if (typeof d != "function")
|
181
|
+
throw new TypeError(o);
|
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
184
|
var j = m, D = _;
|
185
|
-
return m = _ = void 0, b = S, y =
|
185
|
+
return m = _ = void 0, b = S, y = d.apply(D, j), y;
|
186
186
|
}
|
187
187
|
function w(S) {
|
188
188
|
return b = S, f = setTimeout(Z, u), g ? C(S) : y;
|
189
189
|
}
|
190
|
-
function
|
190
|
+
function V(S) {
|
191
191
|
var j = S - E, D = S - b, Ke = u - j;
|
192
192
|
return p ? i(Ke, T - D) : Ke;
|
193
193
|
}
|
@@ -199,15 +199,15 @@ function Ot() {
|
|
199
199
|
var S = t();
|
200
200
|
if (ze(S))
|
201
201
|
return Ge(S);
|
202
|
-
f = setTimeout(Z,
|
202
|
+
f = setTimeout(Z, V(S));
|
203
203
|
}
|
204
204
|
function Ge(S) {
|
205
205
|
return f = void 0, v && m ? C(S) : (m = _ = void 0, y);
|
206
206
|
}
|
207
|
-
function
|
207
|
+
function Xt() {
|
208
208
|
f !== void 0 && clearTimeout(f), b = 0, m = E = _ = f = void 0;
|
209
209
|
}
|
210
|
-
function
|
210
|
+
function Yt() {
|
211
211
|
return f === void 0 ? y : Ge(t());
|
212
212
|
}
|
213
213
|
function me() {
|
@@ -220,48 +220,48 @@ function Ot() {
|
|
220
220
|
}
|
221
221
|
return f === void 0 && (f = setTimeout(Z, u)), y;
|
222
222
|
}
|
223
|
-
return me.cancel =
|
223
|
+
return me.cancel = Xt, me.flush = Yt, me;
|
224
224
|
}
|
225
225
|
return ke = c, ke;
|
226
226
|
}
|
227
227
|
var Sn = Ot();
|
228
|
-
const En = /* @__PURE__ */
|
229
|
-
var
|
228
|
+
const En = /* @__PURE__ */ Nt(Sn);
|
229
|
+
var Ie, ct;
|
230
230
|
function wn() {
|
231
|
-
if (ct) return
|
231
|
+
if (ct) return Ie;
|
232
232
|
ct = 1;
|
233
233
|
var e = Ot(), t = He(), n = "Expected a function";
|
234
|
-
function
|
235
|
-
var
|
236
|
-
if (typeof
|
234
|
+
function o(a, i, c) {
|
235
|
+
var d = !0, u = !0;
|
236
|
+
if (typeof a != "function")
|
237
237
|
throw new TypeError(n);
|
238
|
-
return t(c) && (
|
239
|
-
leading:
|
238
|
+
return t(c) && (d = "leading" in c ? !!c.leading : d, u = "trailing" in c ? !!c.trailing : u), e(a, i, {
|
239
|
+
leading: d,
|
240
240
|
maxWait: i,
|
241
241
|
trailing: u
|
242
242
|
});
|
243
243
|
}
|
244
|
-
return
|
244
|
+
return Ie = o, Ie;
|
245
245
|
}
|
246
246
|
var Cn = wn();
|
247
|
-
const kn = /* @__PURE__ */
|
247
|
+
const kn = /* @__PURE__ */ Nt(Cn), In = (e, t, n, o) => {
|
248
248
|
switch (t) {
|
249
249
|
case "debounce":
|
250
|
-
return En(e, n,
|
250
|
+
return En(e, n, o);
|
251
251
|
case "throttle":
|
252
|
-
return kn(e, n,
|
252
|
+
return kn(e, n, o);
|
253
253
|
default:
|
254
254
|
return e;
|
255
255
|
}
|
256
|
-
},
|
256
|
+
}, Pn = (
|
257
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
258
258
|
(e) => {
|
259
259
|
const t = F.useRef(e);
|
260
260
|
return F.useEffect(() => {
|
261
261
|
t.current = e;
|
262
262
|
}), F.useMemo(() => (...n) => {
|
263
|
-
var
|
264
|
-
return (
|
263
|
+
var o;
|
264
|
+
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
265
265
|
}, []);
|
266
266
|
}
|
267
267
|
), An = (
|
@@ -270,18 +270,18 @@ const kn = /* @__PURE__ */ Rt(Cn), Pn = (e, t, n, r) => {
|
|
270
270
|
const [t, n] = F.useState((e == null ? void 0 : e.current) || null);
|
271
271
|
return e && setTimeout(() => {
|
272
272
|
e.current !== t && n(e.current);
|
273
|
-
}, 0), { refProxy: F.useMemo(() => new Proxy((
|
274
|
-
|
273
|
+
}, 0), { refProxy: F.useMemo(() => new Proxy((a) => {
|
274
|
+
a !== t && n(a);
|
275
275
|
}, {
|
276
|
-
get(
|
277
|
-
return i === "current" ? t :
|
276
|
+
get(a, i) {
|
277
|
+
return i === "current" ? t : a[i];
|
278
278
|
},
|
279
|
-
set(
|
280
|
-
return i === "current" ? n(c) :
|
279
|
+
set(a, i, c) {
|
280
|
+
return i === "current" ? n(c) : a[i] = c, !0;
|
281
281
|
}
|
282
282
|
}), [t]), refElement: t, setRefElement: n };
|
283
283
|
}
|
284
|
-
),
|
284
|
+
), Rn = (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,35 +291,35 @@ const kn = /* @__PURE__ */ Rt(Cn), Pn = (e, t, n, r) => {
|
|
291
291
|
width: e.contentRect.width,
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
|
-
function
|
295
|
-
const
|
294
|
+
function Nn({ 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 = Et(e), m = Pn(u), [_, T] = R({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: f } = An(c), { box: E } =
|
299
|
-
if (!
|
298
|
+
}), { refProxy: y, refElement: f } = An(c), { box: E } = d || {}, b = We((p) => {
|
299
|
+
if (!a && !i)
|
300
300
|
return;
|
301
|
-
if (
|
302
|
-
|
301
|
+
if (l.current) {
|
302
|
+
l.current = !1;
|
303
303
|
return;
|
304
304
|
}
|
305
|
-
const v = (C, w) =>
|
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 = Rn(C, E);
|
308
|
+
T((V) => v(V, w) ? (m == null || m({
|
309
309
|
width: w.width,
|
310
310
|
height: w.height,
|
311
311
|
entry: C
|
312
|
-
}), w) :
|
312
|
+
}), w) : V);
|
313
313
|
});
|
314
|
-
}, [
|
314
|
+
}, [a, i, l, E]), g = We(In(b, t, n, o), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
318
|
-
|
318
|
+
o
|
319
319
|
]);
|
320
320
|
return G(() => {
|
321
321
|
let p;
|
322
|
-
return f ? (p = new window.ResizeObserver(g), p.observe(f,
|
322
|
+
return f ? (p = new window.ResizeObserver(g), p.observe(f, d)) : (_.width || _.height) && (m == null || m({
|
323
323
|
width: null,
|
324
324
|
height: null,
|
325
325
|
entry: null
|
@@ -330,17 +330,17 @@ function Rn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
330
330
|
}, [g, f]), Object.assign({ ref: y }, _);
|
331
331
|
}
|
332
332
|
function Lt(e) {
|
333
|
-
var t, n,
|
334
|
-
if (typeof e == "string" || typeof e == "number")
|
333
|
+
var t, n, o = "";
|
334
|
+
if (typeof e == "string" || typeof e == "number") o += e;
|
335
335
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
336
|
-
var
|
337
|
-
for (t = 0; t <
|
338
|
-
} else for (n in e) e[n] && (
|
339
|
-
return
|
336
|
+
var a = e.length;
|
337
|
+
for (t = 0; t < a; t++) e[t] && (n = Lt(e[t])) && (o && (o += " "), o += n);
|
338
|
+
} else for (n in e) e[n] && (o && (o += " "), o += n);
|
339
|
+
return o;
|
340
340
|
}
|
341
|
-
function
|
342
|
-
for (var e, t, n = 0,
|
343
|
-
return
|
341
|
+
function N() {
|
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
|
+
return o;
|
344
344
|
}
|
345
345
|
const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "_navigationTab_1cubo_8", Ln = "_headerContent_1cubo_34", Mn = "_staticEnabled_1cubo_50", q = {
|
346
346
|
headerContainer: jn,
|
@@ -349,150 +349,150 @@ const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "
|
|
349
349
|
headerContent: Ln,
|
350
350
|
staticEnabled: Mn
|
351
351
|
}, Un = 77, re = ({ sticky: e, children: t }) => {
|
352
|
-
const { ref: n, height:
|
352
|
+
const { ref: n, height: o } = Nn({
|
353
353
|
refreshMode: "debounce",
|
354
354
|
refreshRate: 0
|
355
|
-
}), [
|
355
|
+
}), [a, i] = R(!1), c = () => a ? !e : !0;
|
356
356
|
G(() => {
|
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
|
363
|
-
return /* @__PURE__ */
|
362
|
+
const d = `${o || Un}px`;
|
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:
|
367
|
+
className: N(q.headerContent, {
|
368
368
|
[q.staticEnabled]: c()
|
369
369
|
}),
|
370
370
|
children: [
|
371
|
-
/* @__PURE__ */
|
372
|
-
/* @__PURE__ */
|
371
|
+
/* @__PURE__ */ s(re.Header, {}),
|
372
|
+
/* @__PURE__ */ s(re.Tabs, {}),
|
373
373
|
t
|
374
374
|
]
|
375
375
|
}
|
376
376
|
) }) });
|
377
377
|
};
|
378
|
-
re.Header = ({ children: e }) => /* @__PURE__ */
|
379
|
-
re.Tabs = ({ children: e }) => /* @__PURE__ */
|
378
|
+
re.Header = ({ children: e }) => /* @__PURE__ */ s("div", { className: q.headerContainer, children: e });
|
379
|
+
re.Tabs = ({ children: e }) => /* @__PURE__ */ s("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
380
380
|
const qn = "_sidebarContainer_bmdti_1", Hn = {
|
381
381
|
sidebarContainer: qn
|
382
382
|
}, Bn = "_logoLink_1baxb_1", Dn = {
|
383
383
|
logoLink: Bn
|
384
|
-
}, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt:
|
384
|
+
}, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: o = "Lokalise" }) => /* @__PURE__ */ s("a", { className: Dn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: o }) }), Fn = "_link_18vhx_1", zn = "_active_18vhx_18", lt = {
|
385
385
|
link: Fn,
|
386
386
|
active: zn
|
387
|
-
}, Gn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */
|
387
|
+
}, Gn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(H, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
388
388
|
L,
|
389
389
|
{
|
390
|
-
className:
|
390
|
+
className: N(lt.link, {
|
391
391
|
[lt.active]: window.location.pathname.startsWith(t)
|
392
392
|
}),
|
393
393
|
href: t,
|
394
|
-
children: /* @__PURE__ */
|
394
|
+
children: /* @__PURE__ */ s(n, { size: "25px" })
|
395
395
|
}
|
396
396
|
) }), Kn = "_dropdownButton_13l5r_1", Wn = "_dropdownButtonActive_13l5r_18", dt = {
|
397
397
|
dropdownButton: Kn,
|
398
398
|
dropdownButtonActive: Wn
|
399
|
-
}, Jn = ({ children: e, icon: t }) => /* @__PURE__ */
|
399
|
+
}, Jn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
|
400
400
|
ae,
|
401
401
|
{
|
402
|
-
menuButton: ({ opened: n }) => /* @__PURE__ */
|
402
|
+
menuButton: ({ opened: n }) => /* @__PURE__ */ s(H, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ s(
|
403
403
|
"button",
|
404
404
|
{
|
405
405
|
type: "button",
|
406
|
-
className:
|
406
|
+
className: N(dt.dropdownButton, {
|
407
407
|
[dt.dropdownButtonActive]: n
|
408
408
|
}),
|
409
|
-
children: /* @__PURE__ */
|
409
|
+
children: /* @__PURE__ */ s(t, { size: "25px" })
|
410
410
|
}
|
411
411
|
) }),
|
412
|
-
children: /* @__PURE__ */
|
412
|
+
children: /* @__PURE__ */ s(se, { placement: "right-start", children: e })
|
413
413
|
}
|
414
|
-
), Qn = "_iconContainer_nz34m_1",
|
414
|
+
), Qn = "_iconContainer_nz34m_1", Xn = {
|
415
415
|
iconContainer: Qn
|
416
|
-
}, Mt = ({ className: e = "" }) => /* @__PURE__ */
|
416
|
+
}, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
|
417
417
|
"div",
|
418
418
|
{
|
419
419
|
"aria-label": "Upgrade Icon",
|
420
|
-
className:
|
421
|
-
|
420
|
+
className: N(
|
421
|
+
Xn.iconContainer,
|
422
422
|
"flex-row",
|
423
423
|
"items-center",
|
424
424
|
"justify-center",
|
425
425
|
e
|
426
426
|
),
|
427
|
-
children: /* @__PURE__ */
|
427
|
+
children: /* @__PURE__ */ s(nn, {})
|
428
428
|
}
|
429
|
-
),
|
430
|
-
menuContainer:
|
431
|
-
profileButton:
|
429
|
+
), Yn = "_menuContainer_ywskt_5", Vn = "_profileButton_ywskt_15", Zn = "_profileImage_ywskt_28", er = "_profileImageHighlight_ywskt_36", tr = "_profileImageUpgradeIcon_ywskt_40", nr = "_userIconWrapper_ywskt_46", x = {
|
430
|
+
menuContainer: Yn,
|
431
|
+
profileButton: Vn,
|
432
432
|
profileImage: Zn,
|
433
433
|
profileImageHighlight: er,
|
434
434
|
profileImageUpgradeIcon: tr,
|
435
435
|
userIconWrapper: nr
|
436
|
-
}, Ut = Ct({}),
|
436
|
+
}, Ut = Ct({}), X = () => wt(Ut), rr = ({ children: e }) => {
|
437
437
|
const {
|
438
438
|
currentTeam: t,
|
439
439
|
otherTeams: n,
|
440
|
-
showUpgradeCta:
|
441
|
-
showBillingButton:
|
440
|
+
showUpgradeCta: o,
|
441
|
+
showBillingButton: a,
|
442
442
|
allowTeamCreation: i,
|
443
443
|
isProviderAlpha: c,
|
444
|
-
canAccessTeamSettings:
|
444
|
+
canAccessTeamSettings: d,
|
445
445
|
isEndOfTrialActive: u,
|
446
|
-
isTeamSuspended:
|
446
|
+
isTeamSuspended: l,
|
447
447
|
isFullyAuthenticated: m
|
448
|
-
} =
|
449
|
-
return /* @__PURE__ */
|
448
|
+
} = X();
|
449
|
+
return /* @__PURE__ */ s(
|
450
450
|
ae,
|
451
451
|
{
|
452
452
|
menuButton: () => /* @__PURE__ */ h("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
453
|
-
t != null && t.logoUrl ? /* @__PURE__ */
|
453
|
+
t != null && t.logoUrl ? /* @__PURE__ */ s(
|
454
454
|
"img",
|
455
455
|
{
|
456
456
|
src: t.logoUrl,
|
457
|
-
className:
|
458
|
-
[x.profileImageHighlight]:
|
457
|
+
className: N(x.profileImage, {
|
458
|
+
[x.profileImageHighlight]: o
|
459
459
|
}),
|
460
460
|
alt: "Team Logo"
|
461
461
|
}
|
462
|
-
) : /* @__PURE__ */
|
462
|
+
) : /* @__PURE__ */ s(
|
463
463
|
"div",
|
464
464
|
{
|
465
|
-
className:
|
466
|
-
[x.profileImageHighlight]:
|
465
|
+
className: N(x.userIconWrapper, "flex-row", "align-center", "items-center", {
|
466
|
+
[x.profileImageHighlight]: o
|
467
467
|
}),
|
468
|
-
children: /* @__PURE__ */
|
468
|
+
children: /* @__PURE__ */ s(It, { size: "25px" })
|
469
469
|
}
|
470
470
|
),
|
471
|
-
|
471
|
+
o && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
|
472
472
|
] }),
|
473
|
-
children: /* @__PURE__ */
|
473
|
+
children: /* @__PURE__ */ s(se, { placement: "right-end", className: x.menuContainer, children: e({
|
474
474
|
allowTeamCreation: i,
|
475
475
|
otherTeams: n,
|
476
|
-
canAccessTeamSettings:
|
476
|
+
canAccessTeamSettings: d,
|
477
477
|
isEndOfTrialActive: u,
|
478
|
-
isTeamSuspended:
|
479
|
-
showBillingButton:
|
478
|
+
isTeamSuspended: l,
|
479
|
+
showBillingButton: a,
|
480
480
|
isProviderAlpha: c,
|
481
481
|
isFullyAuthenticated: m
|
482
482
|
}) })
|
483
483
|
}
|
484
484
|
);
|
485
|
-
}, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or,
|
486
|
-
const
|
487
|
-
if (
|
485
|
+
}, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or, Ra = (e) => ar.includes(e), Na = (e) => sr.includes(e), ja = (e) => ir.includes(e), xa = (e) => cr.includes(e), Oa = (e) => e > qt && e < Ht, La = (e) => e === Ht, lr = /\n/, ut = (e, t, n) => e.split(t).flatMap((o, a) => a !== 0 ? [en(n, { key: Math.random().toString(32).slice(0, 10) }), o] : o), dr = (e, t, n) => typeof e == "string" ? ut(e, t, n) : e.flatMap((o) => typeof o == "string" ? ut(o, t, n) : o), ur = (e) => dr(e, lr, /* @__PURE__ */ s("br", {})), mr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, fr = (e) => e.match(mr) ?? [], mt = (e, t, n) => {
|
486
|
+
const o = e.split(t);
|
487
|
+
if (o.length === 1)
|
488
488
|
return e;
|
489
|
-
const
|
490
|
-
return
|
491
|
-
/* @__PURE__ */
|
492
|
-
),
|
489
|
+
const a = [];
|
490
|
+
return o[0] !== "" && a.push(o[0]), o.shift(), o[o.length - 1] === "" && o.pop(), a.push(
|
491
|
+
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
492
|
+
), a.push(o.join(t)), a.filter((i) => i !== "");
|
493
493
|
}, ft = (e) => {
|
494
494
|
const t = fr(e);
|
495
|
-
return t != null && t.length ? t.reduce((n,
|
495
|
+
return t != null && t.length ? t.reduce((n, o, a) => typeof n == "string" ? mt(n, o, a) : n.flatMap((i) => typeof i == "string" ? mt(i, o, a) : i), e) : e;
|
496
496
|
}, _r = (e) => typeof e == "string" ? ft(e) : e.flatMap((t) => typeof t == "string" ? ft(t) : t, e), gr = (e, t = "PP") => At(e, t), Ma = (e, t, n = "PP") => At(un(e, t), n), De = (e) => {
|
497
497
|
G(e, []);
|
498
498
|
}, _t = {
|
@@ -502,10 +502,10 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
502
502
|
_t.biller,
|
503
503
|
_t.owner
|
504
504
|
], hr = ({ children: e, config: t }) => {
|
505
|
-
const { teams: n, currentTeamId:
|
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 = gt.includes(d), _ = gt.includes(d), T = Be(a) || Bt(a), b = {
|
506
506
|
...t,
|
507
507
|
currentTeam: u,
|
508
|
-
otherTeams:
|
508
|
+
otherTeams: l,
|
509
509
|
canChangeBilling: m,
|
510
510
|
canAccessTeamSettings: _,
|
511
511
|
isOnFreeOrTrialPlan: T,
|
@@ -513,19 +513,19 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
513
513
|
showBillingButton: c && _ && m,
|
514
514
|
allowTeamCreation: c && !i
|
515
515
|
};
|
516
|
-
return /* @__PURE__ */
|
517
|
-
}, pr = ({ config: e, children: t }) => /* @__PURE__ */
|
516
|
+
return /* @__PURE__ */ s(Ut.Provider, { value: b, children: e });
|
517
|
+
}, pr = ({ config: e, children: t }) => /* @__PURE__ */ s(hr, { config: e, children: /* @__PURE__ */ s(rr, { children: t }) }), br = "_container_q5pot_1", vr = "_profileEmail_q5pot_5", ht = {
|
518
518
|
container: br,
|
519
519
|
profileEmail: vr
|
520
520
|
}, Tr = ({
|
521
521
|
href: e,
|
522
522
|
onClick: t,
|
523
523
|
userEmail: n,
|
524
|
-
hideBottomDivider:
|
524
|
+
hideBottomDivider: o
|
525
525
|
}) => {
|
526
|
-
const { isEndOfTrialActive:
|
527
|
-
return
|
528
|
-
/* @__PURE__ */
|
526
|
+
const { isEndOfTrialActive: a, isTeamSuspended: i } = X();
|
527
|
+
return a || i ? null : /* @__PURE__ */ h(Ue, { children: [
|
528
|
+
/* @__PURE__ */ s(
|
529
529
|
K,
|
530
530
|
{
|
531
531
|
href: e,
|
@@ -533,12 +533,12 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
533
533
|
t == null || t();
|
534
534
|
},
|
535
535
|
children: /* @__PURE__ */ h("div", { className: `flex-col ${ht.container}`, children: [
|
536
|
-
/* @__PURE__ */
|
537
|
-
/* @__PURE__ */
|
536
|
+
/* @__PURE__ */ s("span", { children: "Profile Settings" }),
|
537
|
+
/* @__PURE__ */ s("span", { className: ht.profileEmail, children: n })
|
538
538
|
] })
|
539
539
|
}
|
540
540
|
),
|
541
|
-
!
|
541
|
+
!o && /* @__PURE__ */ s(Pt, {})
|
542
542
|
] });
|
543
543
|
}, yr = "_wrapper_15d85_1", Sr = "_profileImage_15d85_14", Er = "_teamName_15d85_22", wr = "_planLabel_15d85_29", Cr = "_membership_15d85_38", kr = "_defaultProfileImage_15d85_44", M = {
|
544
544
|
wrapper: yr,
|
@@ -548,46 +548,46 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
548
548
|
membership: Cr,
|
549
549
|
defaultProfileImage: kr
|
550
550
|
}, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
551
|
-
const { currentTeam:
|
551
|
+
const { currentTeam: o, planId: a } = X(), i = e || o;
|
552
552
|
if (!i)
|
553
553
|
return null;
|
554
|
-
const c = Be(
|
554
|
+
const c = Be(a) ? "Free" : Bt(a) ? "Trial" : void 0;
|
555
555
|
return /* @__PURE__ */ h(
|
556
556
|
t ? K : "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__ */
|
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(It, { 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
|
-
/* @__PURE__ */
|
565
|
-
c && !n && /* @__PURE__ */
|
564
|
+
/* @__PURE__ */ s("span", { title: i.name, className: M.teamName, children: i.name }),
|
565
|
+
c && !n && /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.planLabel}`, children: c })
|
566
566
|
] }),
|
567
|
-
/* @__PURE__ */
|
567
|
+
/* @__PURE__ */ s("span", { className: M.membership, children: i.role })
|
568
568
|
] })
|
569
569
|
]
|
570
570
|
}
|
571
571
|
);
|
572
|
-
},
|
573
|
-
teamsContainer:
|
572
|
+
}, Ir = "_teamsContainer_1t68g_1", Pr = {
|
573
|
+
teamsContainer: Ir
|
574
574
|
}, Ar = ({ onSwitchTeam: e }) => {
|
575
|
-
const { otherTeams: t } =
|
576
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
577
|
-
},
|
578
|
-
container:
|
579
|
-
planCta:
|
575
|
+
const { otherTeams: t } = X();
|
576
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${Pr.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
|
577
|
+
}, Rr = "_container_1u995_1", Nr = "_planCta_1u995_15", jr = "_upgradeIconWrapper_1u995_19", Pe = {
|
578
|
+
container: Rr,
|
579
|
+
planCta: Nr,
|
580
580
|
upgradeIconWrapper: jr
|
581
581
|
}, xr = ({ upgradeOptionHref: e }) => {
|
582
|
-
const { planId: t, trialDaysLeft: n, showUpgradeCta:
|
583
|
-
if (!
|
582
|
+
const { planId: t, trialDaysLeft: n, showUpgradeCta: o } = X();
|
583
|
+
if (!o)
|
584
584
|
return null;
|
585
585
|
const c = Be(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
586
|
-
return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${
|
587
|
-
/* @__PURE__ */
|
588
|
-
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${
|
589
|
-
/* @__PURE__ */
|
590
|
-
/* @__PURE__ */
|
586
|
+
return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${Pe.container}`, children: [
|
587
|
+
/* @__PURE__ */ s("span", { className: Pe.planCta, children: c }),
|
588
|
+
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Pe.upgradeIconWrapper}`, children: [
|
589
|
+
/* @__PURE__ */ s(Mt, {}),
|
590
|
+
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
591
591
|
] })
|
592
592
|
] });
|
593
593
|
}, Or = Math.min, Lr = Math.max;
|
@@ -627,16 +627,16 @@ function bt(e) {
|
|
627
627
|
const {
|
628
628
|
x: t,
|
629
629
|
y: n,
|
630
|
-
width:
|
631
|
-
height:
|
630
|
+
width: o,
|
631
|
+
height: a
|
632
632
|
} = e;
|
633
633
|
return {
|
634
|
-
width:
|
635
|
-
height:
|
634
|
+
width: o,
|
635
|
+
height: a,
|
636
636
|
top: n,
|
637
637
|
left: t,
|
638
|
-
right: t +
|
639
|
-
bottom: n +
|
638
|
+
right: t + o,
|
639
|
+
bottom: n + a,
|
640
640
|
x: t,
|
641
641
|
y: n
|
642
642
|
};
|
@@ -645,36 +645,36 @@ async function Br(e, t) {
|
|
645
645
|
var n;
|
646
646
|
t === void 0 && (t = {});
|
647
647
|
const {
|
648
|
-
x:
|
649
|
-
y:
|
648
|
+
x: o,
|
649
|
+
y: a,
|
650
650
|
platform: i,
|
651
651
|
rects: c,
|
652
|
-
elements:
|
652
|
+
elements: d,
|
653
653
|
strategy: u
|
654
654
|
} = e, {
|
655
|
-
boundary:
|
655
|
+
boundary: l = "clippingAncestors",
|
656
656
|
rootBoundary: m = "viewport",
|
657
657
|
elementContext: _ = "floating",
|
658
658
|
altBoundary: T = !1,
|
659
659
|
padding: y = 0
|
660
|
-
} = $t(t, e), f = Hr(y), b =
|
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(
|
662
|
-
boundary:
|
660
|
+
} = $t(t, e), f = Hr(y), b = d[T ? _ === "floating" ? "reference" : "floating" : _], g = bt(await i.getClippingRect({
|
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
|
+
boundary: l,
|
663
663
|
rootBoundary: m,
|
664
664
|
strategy: u
|
665
665
|
})), p = _ === "floating" ? {
|
666
|
-
x:
|
667
|
-
y:
|
666
|
+
x: o,
|
667
|
+
y: a,
|
668
668
|
width: c.floating.width,
|
669
669
|
height: c.floating.height
|
670
|
-
} : c.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(
|
670
|
+
} : c.reference, v = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(d.floating)), C = await (i.isElement == null ? void 0 : i.isElement(v)) ? await (i.getScale == null ? void 0 : i.getScale(v)) || {
|
671
671
|
x: 1,
|
672
672
|
y: 1
|
673
673
|
} : {
|
674
674
|
x: 1,
|
675
675
|
y: 1
|
676
676
|
}, w = bt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
677
|
-
elements:
|
677
|
+
elements: d,
|
678
678
|
rect: p,
|
679
679
|
offsetParent: v,
|
680
680
|
strategy: u
|
@@ -693,12 +693,12 @@ const Dr = function(e) {
|
|
693
693
|
async fn(t) {
|
694
694
|
const {
|
695
695
|
x: n,
|
696
|
-
y:
|
697
|
-
placement:
|
696
|
+
y: o,
|
697
|
+
placement: a
|
698
698
|
} = t, {
|
699
699
|
mainAxis: i = !0,
|
700
700
|
crossAxis: c = !1,
|
701
|
-
limiter:
|
701
|
+
limiter: d = {
|
702
702
|
fn: (b) => {
|
703
703
|
let {
|
704
704
|
x: g,
|
@@ -711,11 +711,11 @@ const Dr = function(e) {
|
|
711
711
|
}
|
712
712
|
},
|
713
713
|
...u
|
714
|
-
} = $t(e, t),
|
714
|
+
} = $t(e, t), l = {
|
715
715
|
x: n,
|
716
|
-
y:
|
717
|
-
}, m = await Br(t, u), _ = Ur(Ft(
|
718
|
-
let y =
|
716
|
+
y: o
|
717
|
+
}, m = await Br(t, u), _ = Ur(Ft(a)), T = Mr(_);
|
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
721
|
y = pt(p, y, v);
|
@@ -724,7 +724,7 @@ const Dr = function(e) {
|
|
724
724
|
const b = _ === "y" ? "top" : "left", g = _ === "y" ? "bottom" : "right", p = f + m[b], v = f - m[g];
|
725
725
|
f = pt(p, f, v);
|
726
726
|
}
|
727
|
-
const E =
|
727
|
+
const E = d.fn({
|
728
728
|
...t,
|
729
729
|
[T]: y,
|
730
730
|
[_]: f
|
@@ -733,7 +733,7 @@ const Dr = function(e) {
|
|
733
733
|
...E,
|
734
734
|
data: {
|
735
735
|
x: E.x - n,
|
736
|
-
y: E.y -
|
736
|
+
y: E.y - o,
|
737
737
|
enabled: {
|
738
738
|
[T]: i,
|
739
739
|
[_]: c
|
@@ -746,27 +746,27 @@ const Dr = function(e) {
|
|
746
746
|
navItem: $r,
|
747
747
|
activeNavItem: Fr,
|
748
748
|
badge: zr
|
749
|
-
}, zt = Ct({}),
|
750
|
-
const t = e.lastIndexOf("."), n = e.slice(0, t),
|
751
|
-
return { name: n, extension:
|
749
|
+
}, zt = Ct({}), Y = () => wt(zt), Gr = (e) => {
|
750
|
+
const t = e.lastIndexOf("."), n = e.slice(0, t), o = e.slice(t + 1);
|
751
|
+
return { name: n, extension: o };
|
752
752
|
}, Kr = (e, t) => {
|
753
753
|
switch (e) {
|
754
|
-
case
|
754
|
+
case I.Completed:
|
755
755
|
return t < 100 ? "Closed" : "Completed";
|
756
|
-
case
|
756
|
+
case I.Created:
|
757
757
|
return t > 0 ? "In progress" : "Not started";
|
758
|
-
case
|
758
|
+
case I.InProgress:
|
759
759
|
return "In progress";
|
760
|
-
case
|
760
|
+
case I.Queued:
|
761
761
|
return "Queued";
|
762
|
-
case
|
762
|
+
case I.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 ===
|
769
|
+
return e.status === I.Created && t > 0 ? I.InProgress : e.status;
|
770
770
|
}, Jr = {
|
771
771
|
[te.translation]: "#0891B2",
|
772
772
|
[te.review]: "#16922D",
|
@@ -774,18 +774,18 @@ const Dr = function(e) {
|
|
774
774
|
[te.automatic_translation]: "#60A5FA"
|
775
775
|
}, Qr = (e) => {
|
776
776
|
const t = [
|
777
|
-
|
778
|
-
|
779
|
-
|
777
|
+
I.InProgress,
|
778
|
+
I.Created,
|
779
|
+
I.Completed
|
780
780
|
];
|
781
|
-
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n,
|
782
|
-
}, vt = (e) => e in [xe.InProgress, xe.Created],
|
783
|
-
const [n,
|
781
|
+
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, o) => n.status === I.InProgress && n.progress === 100 ? -1 : o.status === I.InProgress && o.progress === 100 ? 1 : n.status === o.status ? n.name < o.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(o.status));
|
782
|
+
}, vt = (e) => e in [xe.InProgress, xe.Created], Xr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Yr = ({ task: e, language: t }) => {
|
783
|
+
const [n, o] = R(!1), [a, i] = R(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = Y(), u = () => {
|
784
784
|
i(!1);
|
785
785
|
};
|
786
786
|
return /* @__PURE__ */ h(Ue, { children: [
|
787
|
-
|
788
|
-
|
787
|
+
a && /* @__PURE__ */ s(
|
788
|
+
rn,
|
789
789
|
{
|
790
790
|
opened: !0,
|
791
791
|
loading: n,
|
@@ -794,16 +794,16 @@ const Dr = function(e) {
|
|
794
794
|
closeText: "Cancel",
|
795
795
|
onClose: u,
|
796
796
|
onConfirm: async () => {
|
797
|
-
|
797
|
+
o(!0), await c({ task: e, language: t, closePrompt: u }), d();
|
798
798
|
},
|
799
|
-
children: /* @__PURE__ */ h(
|
799
|
+
children: /* @__PURE__ */ h(on, { status: "info", children: [
|
800
800
|
"Make sure you are finished and ",
|
801
|
-
/* @__PURE__ */
|
801
|
+
/* @__PURE__ */ s("strong", { children: "mark it as done" }),
|
802
802
|
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
803
803
|
] })
|
804
804
|
}
|
805
805
|
),
|
806
|
-
/* @__PURE__ */
|
806
|
+
/* @__PURE__ */ s(
|
807
807
|
L,
|
808
808
|
{
|
809
809
|
disabled: n,
|
@@ -814,35 +814,35 @@ const Dr = function(e) {
|
|
814
814
|
}
|
815
815
|
)
|
816
816
|
] });
|
817
|
-
},
|
818
|
-
langRowCompleted:
|
817
|
+
}, Vr = "_langRowCompleted_vpgdi_1", Zr = "_langCellSecondary_vpgdi_15", eo = "_langStatus_vpgdi_20", Re = {
|
818
|
+
langRowCompleted: Vr,
|
819
819
|
langCellSecondary: Zr,
|
820
820
|
langStatus: eo
|
821
821
|
}, to = ({ language: e, task: t }) => {
|
822
|
-
const { getProjectUrl: n, langNameOnClick:
|
822
|
+
const { getProjectUrl: n, langNameOnClick: o, langProgressOnClick: a } = Y(), i = e.progress ?? 0, c = e.status === I.Completed, d = Xr(t, e);
|
823
823
|
return /* @__PURE__ */ h(
|
824
824
|
"tr",
|
825
825
|
{
|
826
|
-
className:
|
827
|
-
[
|
826
|
+
className: N({
|
827
|
+
[Re.langRowCompleted]: d
|
828
828
|
}),
|
829
829
|
children: [
|
830
|
-
/* @__PURE__ */
|
830
|
+
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(H, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
831
831
|
L,
|
832
832
|
{
|
833
833
|
href: n({ task: t, language: e }),
|
834
834
|
onClick: () => {
|
835
|
-
|
835
|
+
o == null || o({ task: t, language: e });
|
836
836
|
},
|
837
837
|
children: e.name
|
838
838
|
}
|
839
839
|
) }) }),
|
840
|
-
/* @__PURE__ */
|
840
|
+
/* @__PURE__ */ s("td", { className: Re.langCellSecondary, children: d || c ? "0" : /* @__PURE__ */ s(H, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
841
841
|
L,
|
842
842
|
{
|
843
843
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
844
844
|
onClick: () => {
|
845
|
-
|
845
|
+
a == null || a({ task: t, language: e });
|
846
846
|
},
|
847
847
|
children: e.base_words_total - e.base_words_done
|
848
848
|
}
|
@@ -851,10 +851,10 @@ const Dr = function(e) {
|
|
851
851
|
i,
|
852
852
|
"%"
|
853
853
|
] }),
|
854
|
-
/* @__PURE__ */
|
854
|
+
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(Yr, { task: t, language: e }) : /* @__PURE__ */ s(
|
855
855
|
"span",
|
856
856
|
{
|
857
|
-
className: `${
|
857
|
+
className: `${Re.langStatus} flex-row items-center justify-start`,
|
858
858
|
"data-status": e.status,
|
859
859
|
children: Kr(e.status, i)
|
860
860
|
}
|
@@ -869,7 +869,7 @@ const Dr = function(e) {
|
|
869
869
|
languagesTable: ao,
|
870
870
|
metadata: so
|
871
871
|
}, io = ({ task: e }) => {
|
872
|
-
const { tasks: t, getProjectUrl: n, taskTitleOnClick:
|
872
|
+
const { tasks: t, getProjectUrl: n, taskTitleOnClick: o } = Y(), a = Qr(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,13 +879,13 @@ 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__ */
|
883
|
-
e.due_date && /* @__PURE__ */ h(
|
882
|
+
/* @__PURE__ */ s(Ne, { color: Jr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
883
|
+
e.due_date && /* @__PURE__ */ h(Ne, { color: "#EAB308", children: [
|
884
884
|
"DUE ",
|
885
|
-
gr(
|
885
|
+
gr(ln(e.due_date), "yyyy-MM-dd")
|
886
886
|
] })
|
887
887
|
] }),
|
888
|
-
e.style_guides.length > 0 && /* @__PURE__ */
|
888
|
+
e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
|
889
889
|
je,
|
890
890
|
{
|
891
891
|
size: "sm",
|
@@ -893,11 +893,11 @@ const Dr = function(e) {
|
|
893
893
|
onClick: () => i(e.style_guides[0]),
|
894
894
|
children: "Download style guide"
|
895
895
|
}
|
896
|
-
) : /* @__PURE__ */
|
896
|
+
) : /* @__PURE__ */ s(
|
897
897
|
ae,
|
898
898
|
{
|
899
|
-
menuButton: /* @__PURE__ */
|
900
|
-
children: /* @__PURE__ */
|
899
|
+
menuButton: /* @__PURE__ */ s(je, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
900
|
+
children: /* @__PURE__ */ s(se, { children: e.style_guides.map((c) => /* @__PURE__ */ s(
|
901
901
|
K,
|
902
902
|
{
|
903
903
|
onClick: () => i(c),
|
@@ -908,36 +908,36 @@ const Dr = function(e) {
|
|
908
908
|
}
|
909
909
|
) })
|
910
910
|
] }),
|
911
|
-
/* @__PURE__ */
|
911
|
+
/* @__PURE__ */ s("h4", { className: U.taskTitle, children: /* @__PURE__ */ s(
|
912
912
|
L,
|
913
913
|
{
|
914
914
|
href: n({ task: e, view: "multi" }),
|
915
915
|
onClick: () => {
|
916
|
-
|
916
|
+
o == null || o({ task: e });
|
917
917
|
},
|
918
918
|
children: e.title
|
919
919
|
}
|
920
920
|
) }),
|
921
|
-
e.description && /* @__PURE__ */
|
921
|
+
e.description && /* @__PURE__ */ s("div", { className: U.taskDescription, children: ur(_r(e.description)) }),
|
922
922
|
/* @__PURE__ */ h("table", { className: U.languagesTable, children: [
|
923
|
-
/* @__PURE__ */
|
924
|
-
/* @__PURE__ */
|
925
|
-
/* @__PURE__ */
|
926
|
-
/* @__PURE__ */
|
927
|
-
/* @__PURE__ */
|
923
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ h("tr", { children: [
|
924
|
+
/* @__PURE__ */ s("th", { children: "Languages" }),
|
925
|
+
/* @__PURE__ */ s("th", { children: "Words to do" }),
|
926
|
+
/* @__PURE__ */ s("th", { children: "Progress" }),
|
927
|
+
/* @__PURE__ */ s("th", { children: "Status" })
|
928
928
|
] }) }),
|
929
|
-
/* @__PURE__ */
|
929
|
+
/* @__PURE__ */ s("tbody", { children: a.map((c) => /* @__PURE__ */ s(to, { language: c, task: e }, c.lang_id)) })
|
930
930
|
] }),
|
931
931
|
/* @__PURE__ */ h("div", { className: U.metadata, children: [
|
932
932
|
/* @__PURE__ */ h("span", { children: [
|
933
933
|
"Source: ",
|
934
934
|
e.source_lang_name
|
935
935
|
] }),
|
936
|
-
/* @__PURE__ */
|
936
|
+
/* @__PURE__ */ s("span", { children: e.created_by_fullname }),
|
937
937
|
/* @__PURE__ */ h("span", { children: [
|
938
938
|
"In ",
|
939
939
|
e.project_name,
|
940
|
-
e.master_branching_enabled === "1" && /* @__PURE__ */
|
940
|
+
e.master_branching_enabled === "1" && /* @__PURE__ */ s("div", { className: U.tag, children: e.branch_name ? e.branch_name : "master" })
|
941
941
|
] })
|
942
942
|
] })
|
943
943
|
] }) : null;
|
@@ -953,21 +953,21 @@ const Dr = function(e) {
|
|
953
953
|
noTasksText: mo,
|
954
954
|
tasksContainer: fo
|
955
955
|
}, _o = () => {
|
956
|
-
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks:
|
957
|
-
return De(() => (
|
958
|
-
document.removeEventListener(k.TaskCompleted,
|
959
|
-
})), n ? /* @__PURE__ */
|
960
|
-
/* @__PURE__ */
|
956
|
+
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: o } = Y();
|
957
|
+
return De(() => (o(), t == null || t({ tasks: e }), document.addEventListener(k.TaskCompleted, o), document.addEventListener(k.TaskClosed, o), document.addEventListener(k.Refresh, o), () => {
|
958
|
+
document.removeEventListener(k.TaskCompleted, o), document.removeEventListener(k.TaskClosed, o), document.removeEventListener(k.Refresh, o);
|
959
|
+
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: $.loadingContainer, children: /* @__PURE__ */ s(an, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: $.noTasksContainer, children: [
|
960
|
+
/* @__PURE__ */ s("h3", { className: $.noTasksHeading, children: "No tasks" }),
|
961
961
|
/* @__PURE__ */ h("div", { className: $.noTasksText, children: [
|
962
962
|
"Your incoming tasks will appear here.",
|
963
|
-
/* @__PURE__ */
|
964
|
-
/* @__PURE__ */
|
963
|
+
/* @__PURE__ */ s("br", {}),
|
964
|
+
/* @__PURE__ */ s(L, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
965
965
|
] })
|
966
|
-
] }) : /* @__PURE__ */
|
966
|
+
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: $.tasksContainer, children: e.map((a) => /* @__PURE__ */ s(io, { task: a }, a.id)) });
|
967
967
|
}, go = ({ children: e, config: t }) => {
|
968
|
-
const [n,
|
968
|
+
const [n, o] = R([]), [a, i] = R(!0), [c, d] = R(0), {
|
969
969
|
getProjectUrl: u,
|
970
|
-
onLanguageCompleteConfirm:
|
970
|
+
onLanguageCompleteConfirm: l,
|
971
971
|
onTasksWidgetOpen: m,
|
972
972
|
langNameOnClick: _,
|
973
973
|
langProgressOnClick: T,
|
@@ -975,10 +975,10 @@ const Dr = function(e) {
|
|
975
975
|
} = t, { getTasks: f, getTasksCount: E } = t, b = async () => {
|
976
976
|
i(!0);
|
977
977
|
const v = await f();
|
978
|
-
|
978
|
+
o(v), i(!1);
|
979
979
|
}, g = async () => {
|
980
980
|
const v = await E();
|
981
|
-
|
981
|
+
d(v);
|
982
982
|
};
|
983
983
|
De(() => (g(), document.addEventListener(k.TaskCompleted, g), document.addEventListener(k.TaskClosed, g), document.addEventListener(k.Refresh, g), () => {
|
984
984
|
document.removeEventListener(k.TaskCompleted, g), document.removeEventListener(k.TaskClosed, g), document.removeEventListener(k.Refresh, g);
|
@@ -987,31 +987,31 @@ const Dr = function(e) {
|
|
987
987
|
fetchTasks: b,
|
988
988
|
tasks: n,
|
989
989
|
tasksCount: c,
|
990
|
-
loadingTasks:
|
990
|
+
loadingTasks: a,
|
991
991
|
getProjectUrl: u,
|
992
|
-
onLanguageCompleteConfirm:
|
992
|
+
onLanguageCompleteConfirm: l,
|
993
993
|
onTasksWidgetOpen: m,
|
994
994
|
langNameOnClick: _,
|
995
995
|
langProgressOnClick: T,
|
996
996
|
taskTitleOnClick: y
|
997
997
|
};
|
998
|
-
return /* @__PURE__ */
|
998
|
+
return /* @__PURE__ */ s(zt.Provider, { value: p, children: e });
|
999
999
|
}, ho = (e) => function(n) {
|
1000
|
-
const { config:
|
1001
|
-
return /* @__PURE__ */
|
1000
|
+
const { config: o, ...a } = n;
|
1001
|
+
return /* @__PURE__ */ s(go, { config: o, children: /* @__PURE__ */ s(e, { ...a }) });
|
1002
1002
|
}, po = ho(() => {
|
1003
|
-
const [e, t] =
|
1003
|
+
const [e, t] = R(!1), { tasksCount: n } = Y();
|
1004
1004
|
return De(() => {
|
1005
|
-
const
|
1005
|
+
const o = () => {
|
1006
1006
|
t(!0);
|
1007
1007
|
};
|
1008
|
-
return document.addEventListener(k.ShowDialog,
|
1009
|
-
document.removeEventListener(k.ShowDialog,
|
1008
|
+
return document.addEventListener(k.ShowDialog, o), () => {
|
1009
|
+
document.removeEventListener(k.ShowDialog, o);
|
1010
1010
|
};
|
1011
|
-
}), /* @__PURE__ */
|
1012
|
-
|
1011
|
+
}), /* @__PURE__ */ s(H, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
|
1012
|
+
sn,
|
1013
1013
|
{
|
1014
|
-
content: /* @__PURE__ */
|
1014
|
+
content: /* @__PURE__ */ s(_o, {}),
|
1015
1015
|
placement: "right",
|
1016
1016
|
open: e,
|
1017
1017
|
onOpenChange: t,
|
@@ -1025,104 +1025,104 @@ const Dr = function(e) {
|
|
1025
1025
|
}
|
1026
1026
|
})
|
1027
1027
|
],
|
1028
|
-
children: (
|
1028
|
+
children: (o) => /* @__PURE__ */ h(
|
1029
1029
|
je,
|
1030
1030
|
{
|
1031
1031
|
type: "button",
|
1032
1032
|
"data-testid": "sidebar-tasks-widget-button",
|
1033
1033
|
"aria-label": "Tasks",
|
1034
|
-
className:
|
1035
|
-
[Ae.activeNavItem]:
|
1034
|
+
className: N(Ae.navItem, {
|
1035
|
+
[Ae.activeNavItem]: o
|
1036
1036
|
}),
|
1037
1037
|
children: [
|
1038
|
-
/* @__PURE__ */
|
1039
|
-
n > 0 && /* @__PURE__ */
|
1038
|
+
/* @__PURE__ */ s(cn, { size: "25px" }),
|
1039
|
+
n > 0 && /* @__PURE__ */ s("div", { className: Ae.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 vo = ({ children: e }) => /* @__PURE__ */
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1045
|
+
}), P = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Hn.sidebarContainer, children: e }), bo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1046
|
+
P.Top = bo;
|
1047
|
+
const vo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1048
|
+
P.Bottom = vo;
|
1049
|
+
P.Avatar = $n;
|
1050
|
+
P.IconLink = Gn;
|
1051
|
+
P.Menu = Jn;
|
1052
|
+
P.ProfileMenu = pr;
|
1053
|
+
P.TeamSwitch = Ar;
|
1054
|
+
P.TeamMenuItem = Dt;
|
1055
|
+
P.UpgradeMenuItem = xr;
|
1056
|
+
P.ProfileSettingsMenuItem = Tr;
|
1057
|
+
P.Tasks = po;
|
1058
1058
|
const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
|
1059
1059
|
breadcrumbsItem: To,
|
1060
1060
|
breadcrumbs: yo
|
1061
|
-
}, Ua = ({ items: e }) => /* @__PURE__ */
|
1062
|
-
/* @__PURE__ */
|
1063
|
-
n < e.length - 1 && /* @__PURE__ */
|
1064
|
-
] }, `${t.link}-${t.name}`)) }), So = ({ items: e }) => /* @__PURE__ */
|
1065
|
-
!!n && t.some((
|
1066
|
-
t.filter(({ visible:
|
1067
|
-
] }, t[0].label)) }), Eo = "_badge_1pc1v_1", wo = "_tag_1pc1v_15", Co = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57",
|
1061
|
+
}, Ua = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: Tt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1062
|
+
/* @__PURE__ */ s(L, { className: Tt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1063
|
+
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1064
|
+
] }, `${t.link}-${t.name}`)) }), So = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1065
|
+
!!n && t.some((o) => o.visible) && /* @__PURE__ */ s(Pt, {}),
|
1066
|
+
t.filter(({ visible: o }) => o).map(({ link: o, label: a, onClick: i }) => /* @__PURE__ */ s(K, { href: o || "#", "aria-label": a, onClick: i, children: a }, a))
|
1067
|
+
] }, t[0].label)) }), Eo = "_badge_1pc1v_1", wo = "_tag_1pc1v_15", Co = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57", Io = "_projectNavigationItem_1pc1v_61", Po = "_projectNavigationItemDisabled_1pc1v_67", O = {
|
1068
1068
|
badge: Eo,
|
1069
1069
|
tag: wo,
|
1070
1070
|
withNavLinkStyle: Co,
|
1071
1071
|
disabled: ko,
|
1072
|
-
projectNavigationItem:
|
1073
|
-
projectNavigationItemDisabled:
|
1072
|
+
projectNavigationItem: Io,
|
1073
|
+
projectNavigationItemDisabled: Po
|
1074
1074
|
}, yt = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
|
1075
1075
|
/* @__PURE__ */ h("div", { children: [
|
1076
|
-
/* @__PURE__ */
|
1077
|
-
!!t && /* @__PURE__ */
|
1076
|
+
/* @__PURE__ */ s("span", { children: e }),
|
1077
|
+
!!t && /* @__PURE__ */ s("div", { className: O.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1078
1078
|
] }),
|
1079
|
-
!!n && /* @__PURE__ */
|
1080
|
-
] }), Oe =
|
1081
|
-
({ label: e, href: t = "", disabled: n = !1, badge:
|
1079
|
+
!!n && /* @__PURE__ */ s(Ne, { className: O.tag, children: n })
|
1080
|
+
] }), Oe = tn(
|
1081
|
+
({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(H, { 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,
|
1085
|
-
children:
|
1085
|
+
children: a || n || !t ? /* @__PURE__ */ s(
|
1086
1086
|
"button",
|
1087
1087
|
{
|
1088
1088
|
type: "button",
|
1089
1089
|
ref: c,
|
1090
|
-
className:
|
1090
|
+
className: N(O.withNavLinkStyle, {
|
1091
1091
|
[O.disabled]: n
|
1092
1092
|
}),
|
1093
1093
|
disabled: n,
|
1094
|
-
onClick:
|
1095
|
-
children: /* @__PURE__ */
|
1094
|
+
onClick: a,
|
1095
|
+
children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i })
|
1096
1096
|
}
|
1097
|
-
) : /* @__PURE__ */
|
1097
|
+
) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i }) })
|
1098
1098
|
}
|
1099
1099
|
) })
|
1100
1100
|
);
|
1101
1101
|
Oe.displayName = "NavigationTabsItem";
|
1102
|
-
const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1,
|
1103
|
-
var
|
1104
|
-
return n.dropdown ? /* @__PURE__ */
|
1102
|
+
const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Ro = (e) => e.visible && (!e.dropdown || Ao(e.dropdown)), qa = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ro).map((n) => {
|
1103
|
+
var o, a, i;
|
1104
|
+
return n.dropdown ? /* @__PURE__ */ s(
|
1105
1105
|
"li",
|
1106
1106
|
{
|
1107
1107
|
className: q.navigationTab,
|
1108
1108
|
"data-testid": n.key,
|
1109
|
-
"aria-selected": (
|
1110
|
-
children: /* @__PURE__ */
|
1109
|
+
"aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
|
1110
|
+
children: /* @__PURE__ */ s(
|
1111
1111
|
ae,
|
1112
1112
|
{
|
1113
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */
|
1114
|
-
children: /* @__PURE__ */
|
1113
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ s(Oe, { label: n.label, disabled: n.disabled, active: c }),
|
1114
|
+
children: /* @__PURE__ */ s(se, { children: /* @__PURE__ */ s(So, { items: n.dropdown }) })
|
1115
1115
|
}
|
1116
1116
|
)
|
1117
1117
|
},
|
1118
1118
|
n.key
|
1119
|
-
) : /* @__PURE__ */
|
1119
|
+
) : /* @__PURE__ */ s(
|
1120
1120
|
"li",
|
1121
1121
|
{
|
1122
1122
|
className: q.navigationTab,
|
1123
1123
|
"data-testid": n.key,
|
1124
|
-
"aria-selected": (
|
1125
|
-
children: /* @__PURE__ */
|
1124
|
+
"aria-selected": (a = n.isActive) == null ? void 0 : a.call(n, t),
|
1125
|
+
children: /* @__PURE__ */ s(
|
1126
1126
|
Oe,
|
1127
1127
|
{
|
1128
1128
|
label: n.label,
|
@@ -1274,42 +1274,42 @@ class A {
|
|
1274
1274
|
* console.log(headers) // { 'Content-Type': 'application/json' }
|
1275
1275
|
*/
|
1276
1276
|
async resolve() {
|
1277
|
-
const t = this.factories.map((
|
1277
|
+
const t = this.factories.map((o) => o()), n = await Promise.all(t);
|
1278
1278
|
return Object.assign({}, ...n);
|
1279
1279
|
}
|
1280
1280
|
}
|
1281
|
-
|
1281
|
+
function Gt(e) {
|
1282
|
+
return new No(e);
|
1283
|
+
}
|
1284
|
+
class No {
|
1282
1285
|
constructor(t) {
|
1283
1286
|
this.middleware = t;
|
1284
1287
|
}
|
1285
1288
|
apply(t) {
|
1286
1289
|
return t.from(async () => {
|
1287
1290
|
const n = this.middleware(A.create());
|
1288
|
-
return n instanceof Promise ? n.then((
|
1291
|
+
return n instanceof Promise ? n.then((o) => o.resolve()) : n.resolve();
|
1289
1292
|
});
|
1290
1293
|
}
|
1291
1294
|
}
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
userId: o.number(),
|
1302
|
-
userUuid: o.string(),
|
1303
|
-
teamId: o.number(),
|
1295
|
+
const Kt = r.union([
|
1296
|
+
r.literal("owner"),
|
1297
|
+
r.literal("admin"),
|
1298
|
+
r.literal("biller"),
|
1299
|
+
r.literal("member")
|
1300
|
+
]), jo = r.object({
|
1301
|
+
userId: r.number(),
|
1302
|
+
userUuid: r.string(),
|
1303
|
+
teamId: r.number(),
|
1304
1304
|
userTeamRole: Kt,
|
1305
|
-
userEmail:
|
1306
|
-
userName:
|
1307
|
-
userCurrentTeamId:
|
1308
|
-
planId:
|
1309
|
-
planName:
|
1310
|
-
isProviderAlpha:
|
1311
|
-
isFullyAuthenticated:
|
1312
|
-
exp:
|
1305
|
+
userEmail: r.string().email(),
|
1306
|
+
userName: r.string(),
|
1307
|
+
userCurrentTeamId: r.number(),
|
1308
|
+
planId: r.number(),
|
1309
|
+
planName: r.string(),
|
1310
|
+
isProviderAlpha: r.boolean(),
|
1311
|
+
isFullyAuthenticated: r.boolean(),
|
1312
|
+
exp: r.number()
|
1313
1313
|
});
|
1314
1314
|
function ie(e) {
|
1315
1315
|
try {
|
@@ -1326,77 +1326,88 @@ class Le extends Error {
|
|
1326
1326
|
ee(this, "status", 401);
|
1327
1327
|
}
|
1328
1328
|
}
|
1329
|
-
const Wt = 1e3, xo = 60 * Wt;
|
1330
1329
|
function Ha(e) {
|
1331
1330
|
return Gt(async (t) => {
|
1332
|
-
var
|
1333
|
-
const n = e.getCurrentToken() ?? await ((
|
1331
|
+
var i, c;
|
1332
|
+
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
1334
1333
|
if (!n)
|
1335
1334
|
throw new Le();
|
1336
|
-
const { exp:
|
1337
|
-
if (!(
|
1335
|
+
const { exp: o } = ie(n.accessToken) ?? { exp: 0 };
|
1336
|
+
if (!dn(new Date(o)))
|
1338
1337
|
return t.add("Authorization", `Bearer ${n.accessToken}`);
|
1339
|
-
const
|
1340
|
-
if (!
|
1338
|
+
const a = await e.refreshToken(n);
|
1339
|
+
if (!a)
|
1341
1340
|
throw new Le();
|
1342
|
-
return (
|
1341
|
+
return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("Authorization", `Bearer ${a.accessToken}`);
|
1343
1342
|
});
|
1344
1343
|
}
|
1345
1344
|
const Ba = Gt(
|
1346
1345
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1347
1346
|
);
|
1348
|
-
function
|
1347
|
+
function Wt() {
|
1349
1348
|
const e = Me(document.cookie, "accessToken"), t = Me(document.cookie, "refreshToken");
|
1350
1349
|
return !e || !t ? null : { accessToken: e, refreshToken: t };
|
1351
1350
|
}
|
1352
|
-
function
|
1351
|
+
function xo() {
|
1353
1352
|
return Me(document.cookie, "csrf_token") ?? null;
|
1354
1353
|
}
|
1355
1354
|
function Me(e, t) {
|
1356
|
-
var n,
|
1357
|
-
return (
|
1355
|
+
var n, o;
|
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);
|
1358
1357
|
}
|
1359
1358
|
function Da() {
|
1360
|
-
const e =
|
1359
|
+
const e = Wt();
|
1361
1360
|
if (!e)
|
1362
1361
|
return;
|
1363
1362
|
const t = ie(e.accessToken);
|
1364
1363
|
if (t)
|
1365
1364
|
return { ...e, payload: t };
|
1366
1365
|
}
|
1367
|
-
const
|
1368
|
-
Authorization:
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
"X-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1366
|
+
const Jt = r.union([
|
1367
|
+
r.object({ Authorization: r.string() }),
|
1368
|
+
r.object({ authorization: r.string() }),
|
1369
|
+
r.object({ AUTHORIZATION: r.string() })
|
1370
|
+
]), Oo = r.union([
|
1371
|
+
r.object({ "X-API-Token": r.string() }),
|
1372
|
+
r.object({ "X-Api-Token": r.string() }),
|
1373
|
+
r.object({ "x-api-token": r.string() }),
|
1374
|
+
r.object({ "X-API-TOKEN": r.string() })
|
1375
|
+
]), Lo = r.union([
|
1376
|
+
Jt,
|
1377
|
+
Oo
|
1378
|
+
]), Mo = r.union([
|
1379
|
+
r.object({ "X-Lokalise-Plugin": r.string() }),
|
1380
|
+
r.object({ "x-lokalise-plugin": r.string() }),
|
1381
|
+
r.object({ "X-LOKALISE-PLUGIN": r.string() })
|
1382
|
+
]), ce = Lo.and(Mo), Uo = r.object({
|
1383
|
+
accessToken: r.string(),
|
1384
|
+
refreshToken: r.string()
|
1385
|
+
}), qo = r.union([
|
1386
|
+
r.object({ "X-Csrf-Token": r.string() }),
|
1387
|
+
r.object({ "X-CSRF-Token": r.string() }),
|
1388
|
+
r.object({ "x-csrf-token": r.string() }),
|
1389
|
+
r.object({ "X-CSRF-TOKEN": r.string() })
|
1390
|
+
]), Ho = r.union([
|
1391
|
+
Jt,
|
1392
|
+
qo
|
1382
1393
|
]), $e = qe({
|
1383
1394
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1384
1395
|
method: "post",
|
1385
|
-
requestPathParamsSchema:
|
1396
|
+
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
1386
1397
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1387
1398
|
requestHeaderSchema: Ho,
|
1388
|
-
requestBodySchema:
|
1399
|
+
requestBodySchema: r.undefined(),
|
1389
1400
|
isEmptyResponseExpected: !0,
|
1390
|
-
successResponseBodySchema:
|
1401
|
+
successResponseBodySchema: Uo
|
1391
1402
|
});
|
1392
1403
|
function $a(e, t, n) {
|
1393
1404
|
return async () => {
|
1394
|
-
const
|
1395
|
-
if (!
|
1405
|
+
const o = t();
|
1406
|
+
if (!o)
|
1396
1407
|
throw new Le();
|
1397
1408
|
return W(e, $e, {
|
1398
1409
|
pathParams: { teamId: Number(await n()) },
|
1399
|
-
headers: await A.create().add("x-csrf-token",
|
1410
|
+
headers: await A.create().add("x-csrf-token", o).resolve()
|
1400
1411
|
});
|
1401
1412
|
};
|
1402
1413
|
}
|
@@ -1410,9 +1421,9 @@ const Bo = {
|
|
1410
1421
|
teamKey: (e) => ["getUserToken", e]
|
1411
1422
|
}, Do = (e, t, n) => B({
|
1412
1423
|
...n,
|
1413
|
-
queryFn: async ({ queryKey: [
|
1424
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, $e, {
|
1414
1425
|
headers: await t.resolve(),
|
1415
|
-
pathParams: { teamId:
|
1426
|
+
pathParams: { teamId: a }
|
1416
1427
|
})
|
1417
1428
|
}), oe = class oe extends CustomEvent {
|
1418
1429
|
constructor(t) {
|
@@ -1424,202 +1435,202 @@ const Bo = {
|
|
1424
1435
|
ee(oe, "eventName", "new-jwt-issued");
|
1425
1436
|
let z = oe;
|
1426
1437
|
function za(e, t, n) {
|
1427
|
-
const
|
1438
|
+
const o = xo(), a = Do(e, t.add("x-csrf-token", o ?? ""), {
|
1428
1439
|
queryKey: Bo.teamKey(n),
|
1429
|
-
enabled:
|
1440
|
+
enabled: o !== void 0
|
1430
1441
|
}), i = Et();
|
1431
1442
|
return G(() => {
|
1432
|
-
|
1433
|
-
}, [
|
1443
|
+
a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new z(a.data)), i.current = a.data.accessToken);
|
1444
|
+
}, [a.data]), a;
|
1434
1445
|
}
|
1435
|
-
function
|
1436
|
-
const [e, t] =
|
1446
|
+
function Qt() {
|
1447
|
+
const [e, t] = R();
|
1437
1448
|
return G(() => {
|
1438
|
-
const n = (
|
1439
|
-
t(
|
1440
|
-
},
|
1441
|
-
return t(
|
1449
|
+
const n = (a) => {
|
1450
|
+
t(a.detail.payload);
|
1451
|
+
}, o = Wt();
|
1452
|
+
return t(o ? ie(o.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
|
1442
1453
|
window.removeEventListener(z.eventName, n);
|
1443
1454
|
};
|
1444
1455
|
}, []), e;
|
1445
1456
|
}
|
1446
|
-
const $o = ce, Fo =
|
1447
|
-
user_id:
|
1448
|
-
email:
|
1449
|
-
fullname:
|
1450
|
-
created_at:
|
1451
|
-
created_at_timestamp:
|
1457
|
+
const $o = ce, Fo = r.object({
|
1458
|
+
user_id: r.number(),
|
1459
|
+
email: r.string().email(),
|
1460
|
+
fullname: r.string(),
|
1461
|
+
created_at: r.string(),
|
1462
|
+
created_at_timestamp: r.number(),
|
1452
1463
|
role: Kt
|
1453
|
-
}), zo =
|
1454
|
-
team_id:
|
1464
|
+
}), zo = r.object({
|
1465
|
+
team_id: r.number(),
|
1455
1466
|
team_user: Fo
|
1456
1467
|
}), Go = Q({
|
1457
1468
|
description: "Get the details of a team user",
|
1458
1469
|
requestHeaderSchema: $o,
|
1459
|
-
requestPathParamsSchema:
|
1470
|
+
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
1460
1471
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1461
1472
|
successResponseBodySchema: zo
|
1462
1473
|
}), Ko = {
|
1463
1474
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1464
1475
|
}, Wo = (e, t, n) => B({
|
1465
1476
|
...n,
|
1466
|
-
queryFn: async ({ queryKey: [
|
1477
|
+
queryFn: async ({ queryKey: [o, a, i] }) => J(e, Go, {
|
1467
1478
|
headers: await t.resolve(),
|
1468
|
-
pathParams: { teamId:
|
1479
|
+
pathParams: { teamId: a, userId: i }
|
1469
1480
|
})
|
1470
1481
|
});
|
1471
1482
|
function Ga(e, t) {
|
1472
|
-
const n =
|
1483
|
+
const n = Qt();
|
1473
1484
|
return Wo(e, t, {
|
1474
1485
|
queryKey: Ko.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1475
1486
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1476
1487
|
});
|
1477
1488
|
}
|
1478
|
-
const Jo =
|
1479
|
-
lang_id:
|
1480
|
-
lang_iso:
|
1481
|
-
lang_name:
|
1482
|
-
is_writable:
|
1483
|
-
}), Qo =
|
1484
|
-
user_id:
|
1485
|
-
email:
|
1486
|
-
fullname:
|
1487
|
-
created_at:
|
1488
|
-
created_at_timestamp:
|
1489
|
-
admin_rights:
|
1490
|
-
languages:
|
1491
|
-
is_admin:
|
1492
|
-
is_reviewer:
|
1493
|
-
}),
|
1494
|
-
project_id:
|
1495
|
-
contributors:
|
1496
|
-
}),
|
1489
|
+
const Jo = r.object({
|
1490
|
+
lang_id: r.number(),
|
1491
|
+
lang_iso: r.string(),
|
1492
|
+
lang_name: r.string(),
|
1493
|
+
is_writable: r.union([r.literal(0), r.literal(1)])
|
1494
|
+
}), Qo = r.object({
|
1495
|
+
user_id: r.number(),
|
1496
|
+
email: r.string().email(),
|
1497
|
+
fullname: r.string(),
|
1498
|
+
created_at: r.string(),
|
1499
|
+
created_at_timestamp: r.number(),
|
1500
|
+
admin_rights: r.array(r.string()),
|
1501
|
+
languages: r.array(Jo),
|
1502
|
+
is_admin: r.boolean(),
|
1503
|
+
is_reviewer: r.boolean()
|
1504
|
+
}), Xo = r.object({
|
1505
|
+
project_id: r.string(),
|
1506
|
+
contributors: r.array(Qo)
|
1507
|
+
}), Yo = Q({
|
1497
1508
|
description: "Get the details of a project contributor",
|
1498
1509
|
requestHeaderSchema: ce,
|
1499
|
-
requestPathParamsSchema:
|
1510
|
+
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
1500
1511
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
1501
|
-
successResponseBodySchema:
|
1502
|
-
}),
|
1512
|
+
successResponseBodySchema: Xo
|
1513
|
+
}), Vo = {
|
1503
1514
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
1504
1515
|
}, Zo = (e, t, n) => B({
|
1505
1516
|
...n,
|
1506
|
-
queryFn: async ({ queryKey: [
|
1507
|
-
pathParams: { projectId:
|
1517
|
+
queryFn: async ({ queryKey: [o, a, i] }) => J(e, Yo, {
|
1518
|
+
pathParams: { projectId: a, contributorId: i },
|
1508
1519
|
headers: await t.resolve()
|
1509
1520
|
})
|
1510
1521
|
});
|
1511
1522
|
function Ka(e, t, n) {
|
1512
|
-
const
|
1523
|
+
const o = Qt();
|
1513
1524
|
return Zo(e, t, {
|
1514
|
-
queryKey:
|
1515
|
-
enabled:
|
1525
|
+
queryKey: Vo.projectUserKey(n, (o == null ? void 0 : o.userId) ?? 0),
|
1526
|
+
enabled: o !== void 0
|
1516
1527
|
});
|
1517
1528
|
}
|
1518
|
-
const ea =
|
1519
|
-
lang_iso:
|
1520
|
-
custom_iso:
|
1521
|
-
}), ta =
|
1522
|
-
language_id:
|
1523
|
-
language_iso:
|
1524
|
-
progress:
|
1525
|
-
words_to_do:
|
1526
|
-
}), na =
|
1527
|
-
projectId:
|
1528
|
-
}), ra =
|
1529
|
-
lang_id:
|
1530
|
-
lang_iso:
|
1531
|
-
lang_name:
|
1532
|
-
is_rtl:
|
1533
|
-
plural_forms:
|
1534
|
-
}), oa =
|
1535
|
-
project_id:
|
1536
|
-
project_uuid:
|
1537
|
-
languages:
|
1529
|
+
const ea = r.object({
|
1530
|
+
lang_iso: r.string(),
|
1531
|
+
custom_iso: r.string().optional()
|
1532
|
+
}), ta = r.object({
|
1533
|
+
language_id: r.number(),
|
1534
|
+
language_iso: r.string(),
|
1535
|
+
progress: r.number(),
|
1536
|
+
words_to_do: r.number()
|
1537
|
+
}), na = r.object({
|
1538
|
+
projectId: r.string()
|
1539
|
+
}), ra = r.object({
|
1540
|
+
lang_id: r.number(),
|
1541
|
+
lang_iso: r.string(),
|
1542
|
+
lang_name: r.string(),
|
1543
|
+
is_rtl: r.boolean(),
|
1544
|
+
plural_forms: r.array(r.string().optional())
|
1545
|
+
}), oa = r.object({
|
1546
|
+
project_id: r.string(),
|
1547
|
+
project_uuid: r.string().uuid(),
|
1548
|
+
languages: r.array(ra)
|
1538
1549
|
}), aa = Q({
|
1539
1550
|
description: "List of project languages",
|
1540
1551
|
requestHeaderSchema: ce,
|
1541
1552
|
requestPathParamsSchema: na,
|
1542
1553
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1543
1554
|
successResponseBodySchema: oa
|
1544
|
-
}), le = ce, Fe =
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
]), sa =
|
1549
|
-
per_platform_key_names:
|
1550
|
-
reviewing:
|
1551
|
-
auto_toggle_unverified:
|
1552
|
-
offline_translation:
|
1553
|
-
key_editing:
|
1554
|
-
inline_machine_translations:
|
1555
|
-
custom_translation_statuses:
|
1556
|
-
custom_translation_statuses_allow_multiple:
|
1557
|
-
segmentation:
|
1558
|
-
contributor_preview_download_enabled:
|
1559
|
-
}), ia =
|
1560
|
-
not_reviewed:
|
1561
|
-
unverified:
|
1562
|
-
spelling_grammar:
|
1563
|
-
inconsistent_placeholders:
|
1564
|
-
inconsistent_html:
|
1565
|
-
different_number_of_urls:
|
1566
|
-
different_urls:
|
1567
|
-
leading_whitespace:
|
1568
|
-
trailing_whitespace:
|
1569
|
-
different_number_of_email_address:
|
1570
|
-
different_email_address:
|
1571
|
-
different_brackets:
|
1572
|
-
different_numbers:
|
1573
|
-
double_space:
|
1574
|
-
special_placeholder:
|
1575
|
-
unbalanced_brackets:
|
1576
|
-
}), ca =
|
1577
|
-
progress_total:
|
1578
|
-
keys_total:
|
1579
|
-
team:
|
1580
|
-
base_words:
|
1581
|
-
qa_issues_total:
|
1555
|
+
}), le = ce, Fe = r.union([
|
1556
|
+
r.literal("localization_files"),
|
1557
|
+
r.literal("paged_documents"),
|
1558
|
+
r.literal("marketing")
|
1559
|
+
]), sa = r.object({
|
1560
|
+
per_platform_key_names: r.boolean(),
|
1561
|
+
reviewing: r.boolean(),
|
1562
|
+
auto_toggle_unverified: r.boolean(),
|
1563
|
+
offline_translation: r.boolean(),
|
1564
|
+
key_editing: r.boolean(),
|
1565
|
+
inline_machine_translations: r.boolean(),
|
1566
|
+
custom_translation_statuses: r.boolean(),
|
1567
|
+
custom_translation_statuses_allow_multiple: r.boolean(),
|
1568
|
+
segmentation: r.boolean(),
|
1569
|
+
contributor_preview_download_enabled: r.boolean()
|
1570
|
+
}), ia = r.object({
|
1571
|
+
not_reviewed: r.number(),
|
1572
|
+
unverified: r.number(),
|
1573
|
+
spelling_grammar: r.number(),
|
1574
|
+
inconsistent_placeholders: r.number(),
|
1575
|
+
inconsistent_html: r.number(),
|
1576
|
+
different_number_of_urls: r.number(),
|
1577
|
+
different_urls: r.number(),
|
1578
|
+
leading_whitespace: r.number(),
|
1579
|
+
trailing_whitespace: r.number(),
|
1580
|
+
different_number_of_email_address: r.number(),
|
1581
|
+
different_email_address: r.number(),
|
1582
|
+
different_brackets: r.number(),
|
1583
|
+
different_numbers: r.number(),
|
1584
|
+
double_space: r.number(),
|
1585
|
+
special_placeholder: r.number(),
|
1586
|
+
unbalanced_brackets: r.number()
|
1587
|
+
}), ca = r.object({
|
1588
|
+
progress_total: r.number(),
|
1589
|
+
keys_total: r.number(),
|
1590
|
+
team: r.number(),
|
1591
|
+
base_words: r.number(),
|
1592
|
+
qa_issues_total: r.number(),
|
1582
1593
|
qa_issues: ia,
|
1583
|
-
languages:
|
1584
|
-
}), de =
|
1585
|
-
project_id:
|
1586
|
-
uuid:
|
1594
|
+
languages: r.array(ta)
|
1595
|
+
}), de = r.object({
|
1596
|
+
project_id: r.string(),
|
1597
|
+
uuid: r.string().uuid(),
|
1587
1598
|
project_type: Fe,
|
1588
|
-
name:
|
1589
|
-
description:
|
1590
|
-
created_at:
|
1591
|
-
created_at_timestamp:
|
1592
|
-
created_by:
|
1593
|
-
created_by_email:
|
1594
|
-
team_id:
|
1595
|
-
base_language_id:
|
1596
|
-
base_language_iso:
|
1599
|
+
name: r.string(),
|
1600
|
+
description: r.string(),
|
1601
|
+
created_at: r.string(),
|
1602
|
+
created_at_timestamp: r.number(),
|
1603
|
+
created_by: r.number(),
|
1604
|
+
created_by_email: r.string(),
|
1605
|
+
team_id: r.number(),
|
1606
|
+
base_language_id: r.number(),
|
1607
|
+
base_language_iso: r.string(),
|
1597
1608
|
settings: sa.optional(),
|
1598
1609
|
statistics: ca.optional()
|
1599
|
-
}), la =
|
1600
|
-
name:
|
1601
|
-
team_id:
|
1602
|
-
base_lang_iso:
|
1603
|
-
languages:
|
1610
|
+
}), la = r.object({
|
1611
|
+
name: r.string(),
|
1612
|
+
team_id: r.string(),
|
1613
|
+
base_lang_iso: r.string(),
|
1614
|
+
languages: r.array(ea),
|
1604
1615
|
project_type: Fe,
|
1605
|
-
is_segmentation_enabled:
|
1606
|
-
}), St =
|
1616
|
+
is_segmentation_enabled: r.boolean()
|
1617
|
+
}), St = r.union([r.literal(0), r.literal(1)]), da = r.object({
|
1607
1618
|
filter_type: Fe.optional(),
|
1608
|
-
filter_team_id:
|
1609
|
-
filter_names:
|
1619
|
+
filter_team_id: r.number().optional(),
|
1620
|
+
filter_names: r.string().optional(),
|
1610
1621
|
include_statistics: St.optional(),
|
1611
1622
|
include_settings: St.optional(),
|
1612
|
-
limit:
|
1613
|
-
page:
|
1614
|
-
}), ua =
|
1615
|
-
projects:
|
1616
|
-
}), ma =
|
1617
|
-
project_id:
|
1618
|
-
}), fa =
|
1619
|
-
project_id:
|
1620
|
-
}), _a =
|
1621
|
-
name:
|
1622
|
-
description:
|
1623
|
+
limit: r.number().optional(),
|
1624
|
+
page: r.number().optional()
|
1625
|
+
}), ua = r.object({
|
1626
|
+
projects: r.array(de)
|
1627
|
+
}), ma = r.object({
|
1628
|
+
project_id: r.string()
|
1629
|
+
}), fa = r.object({
|
1630
|
+
project_id: r.string()
|
1631
|
+
}), _a = r.object({
|
1632
|
+
name: r.string().min(1),
|
1633
|
+
description: r.string().optional()
|
1623
1634
|
}), ue = () => "/projects", ga = qe({
|
1624
1635
|
description: "Create a new project",
|
1625
1636
|
requestHeaderSchema: le,
|
@@ -1649,11 +1660,11 @@ const ea = o.object({
|
|
1649
1660
|
successResponseBodySchema: de
|
1650
1661
|
});
|
1651
1662
|
function Wa(e, t, n = {}) {
|
1652
|
-
return
|
1663
|
+
return Rt({
|
1653
1664
|
...n,
|
1654
|
-
mutationFn: async (
|
1665
|
+
mutationFn: async (o) => W(e, ga, {
|
1655
1666
|
headers: await t.resolve(),
|
1656
|
-
body:
|
1667
|
+
body: o
|
1657
1668
|
})
|
1658
1669
|
});
|
1659
1670
|
}
|
@@ -1663,42 +1674,42 @@ const Ja = {
|
|
1663
1674
|
function Qa(e, t, n) {
|
1664
1675
|
return B({
|
1665
1676
|
...n,
|
1666
|
-
queryFn: async ({ queryKey: [
|
1677
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, aa, {
|
1667
1678
|
headers: await t.resolve(),
|
1668
|
-
pathParams: { projectId:
|
1679
|
+
pathParams: { projectId: a }
|
1669
1680
|
})
|
1670
1681
|
});
|
1671
1682
|
}
|
1672
|
-
const
|
1683
|
+
const Xa = {
|
1673
1684
|
paramsKey: (e) => ["listProjects", e]
|
1674
1685
|
};
|
1675
|
-
function
|
1686
|
+
function Ya(e, t, n) {
|
1676
1687
|
return B({
|
1677
1688
|
...n,
|
1678
|
-
queryFn: async ({ queryKey: [
|
1689
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, ha, {
|
1679
1690
|
headers: await t.resolve(),
|
1680
|
-
queryParams:
|
1691
|
+
queryParams: a
|
1681
1692
|
})
|
1682
1693
|
});
|
1683
1694
|
}
|
1684
|
-
const
|
1695
|
+
const Va = {
|
1685
1696
|
projectIdKey: (e) => ["retrieveProject", e]
|
1686
1697
|
};
|
1687
1698
|
function Za(e, t, n) {
|
1688
1699
|
return B({
|
1689
1700
|
...n,
|
1690
|
-
queryFn: async ({ queryKey: [
|
1701
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, pa, {
|
1691
1702
|
headers: await t.resolve(),
|
1692
|
-
pathParams: { project_id:
|
1703
|
+
pathParams: { project_id: a }
|
1693
1704
|
})
|
1694
1705
|
});
|
1695
1706
|
}
|
1696
|
-
function es(e, t, n,
|
1697
|
-
return
|
1698
|
-
...
|
1699
|
-
mutationFn: async (
|
1707
|
+
function es(e, t, n, o = {}) {
|
1708
|
+
return Rt({
|
1709
|
+
...o,
|
1710
|
+
mutationFn: async (a) => W(e, ba, {
|
1700
1711
|
headers: await t.resolve(),
|
1701
|
-
body:
|
1712
|
+
body: a,
|
1702
1713
|
pathParams: n
|
1703
1714
|
})
|
1704
1715
|
});
|
@@ -1716,8 +1727,8 @@ export {
|
|
1716
1727
|
ir as PRO_PLAN_IDS,
|
1717
1728
|
Ba as PublicApiHeaderBuilderMiddleware,
|
1718
1729
|
ar as START_PLAN_IDS,
|
1719
|
-
|
1720
|
-
|
1730
|
+
P as Sidebar,
|
1731
|
+
I as SidebarTaskLanguageStatuses,
|
1721
1732
|
xe as SidebarTaskStatuses,
|
1722
1733
|
te as SidebarTaskTypeOptions,
|
1723
1734
|
or as TRIAL_PLAN_ID,
|
@@ -1728,34 +1739,34 @@ export {
|
|
1728
1739
|
Ma as formatDateTz,
|
1729
1740
|
$a as generateTokenFromClassicSession,
|
1730
1741
|
Da as getAuthenticatedSessionDetailFromRequest,
|
1731
|
-
|
1732
|
-
|
1742
|
+
xo as getCsrfTokenFromCookie,
|
1743
|
+
Wt as getJwtTokenFromCookie,
|
1733
1744
|
Go as getTeamUser,
|
1734
1745
|
Ko as getTeamUsersQueryKey,
|
1735
1746
|
$e as getUserToken,
|
1736
1747
|
Bo as getUserTokenKey,
|
1737
1748
|
La as isEnterpriseOpenSourcePlan,
|
1738
1749
|
xa as isEnterprisePlan,
|
1739
|
-
|
1750
|
+
Na as isEssentialPlan,
|
1740
1751
|
Be as isFreePlan,
|
1741
1752
|
Oa as isPaidPlan,
|
1742
1753
|
ja as isProPlan,
|
1743
|
-
|
1754
|
+
Ra as isStartPlan,
|
1744
1755
|
Bt as isTrialPlan,
|
1745
1756
|
aa as listProjectLanguages,
|
1746
1757
|
Ja as listProjectLanguagesKey,
|
1747
1758
|
ha as listProjects,
|
1748
|
-
|
1759
|
+
Xa as listProjectsKey,
|
1749
1760
|
_r as makeUrlClickable,
|
1750
1761
|
ie as parseJwtTokenPayload,
|
1751
1762
|
Fa as refreshExpiredToken,
|
1752
|
-
|
1753
|
-
|
1763
|
+
Yo as retrieveContributor,
|
1764
|
+
Vo as retrieveContributorKeys,
|
1754
1765
|
pa as retrieveProject,
|
1755
|
-
|
1766
|
+
Va as retrieveProjectQueryKey,
|
1756
1767
|
ba as updateProject,
|
1757
1768
|
Ka as useAuthenticatedProjectContributor,
|
1758
|
-
|
1769
|
+
Qt as useAuthenticatedSessionPayload,
|
1759
1770
|
Ga as useAuthenticatedUser,
|
1760
1771
|
Wa as useCreateProjectMutation,
|
1761
1772
|
De as useEffectOnce,
|
@@ -1763,7 +1774,7 @@ export {
|
|
1763
1774
|
Wo as useGetTeamUsersQuery,
|
1764
1775
|
Do as useGetUserTokenQuery,
|
1765
1776
|
Qa as useListProjectLanguagesQuery,
|
1766
|
-
|
1777
|
+
Ya as useListProjectsQuery,
|
1767
1778
|
Zo as useRetrieveContributorQuery,
|
1768
1779
|
Za as useRetrieveProjectQuery,
|
1769
1780
|
es as useUpdateProjectMutation
|