@lokalise/harmony 1.20.3 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +393 -379
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +1 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +70 -10
- package/dist/types/src/features/publicApi/hooks/useAddLanguagesToProjectMutation.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useListProjectLanguagesQuery.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +16 -3
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +6 -1
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +6 -1
- package/dist/types/src/features/publicApi/languages.d.ts +20 -0
- package/dist/types/src/features/publicApi/projects.d.ts +112 -10
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +93 -8
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +32 -0
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +72 -6
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -4,14 +4,14 @@ var ne = (e, t, n) => tn(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
4
|
import { jsx as s, jsxs as f, Fragment as Ue } from "react/jsx-runtime";
|
5
5
|
import * as K from "react";
|
6
6
|
import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as Pt, cloneElement as nn, Fragment as At, forwardRef as rn } from "react";
|
7
|
-
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as
|
8
|
-
import { format as It, parseISO as
|
7
|
+
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as on, Alert as sn, Tag as Ne, Button as Oe, Loading as cn, Popover as ln, JobIcon as un } from "@lokalise/louis";
|
8
|
+
import { format as It, parseISO as dn, isThisSecond as mn } from "date-fns";
|
9
9
|
import { toZonedTime as _n } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
11
|
import { buildPayloadRoute as He } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
12
12
|
import { sendByPayloadRoute as D, sendByGetRoute as Q } from "@lokalise/frontend-http-client";
|
13
13
|
import { useQuery as $, useMutation as Be } from "@tanstack/react-query";
|
14
|
-
import { buildGetRoute as Y, buildPayloadRoute as
|
14
|
+
import { buildGetRoute as Y, buildPayloadRoute as jt } from "@lokalise/universal-ts-utils/node";
|
15
15
|
const xe = {
|
16
16
|
Completed: "completed",
|
17
17
|
InProgress: "in_progress",
|
@@ -27,7 +27,7 @@ const xe = {
|
|
27
27
|
automatic_translation: "automatic_translation"
|
28
28
|
};
|
29
29
|
var ae = 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 ge, Qe;
|
@@ -75,22 +75,22 @@ function fn() {
|
|
75
75
|
}
|
76
76
|
return be = t, be;
|
77
77
|
}
|
78
|
-
var
|
78
|
+
var Te, et;
|
79
79
|
function hn() {
|
80
|
-
if (et) return
|
80
|
+
if (et) return Te;
|
81
81
|
et = 1;
|
82
82
|
var e = fn(), t = /^\s+/;
|
83
83
|
function n(a) {
|
84
84
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
85
85
|
}
|
86
|
-
return
|
86
|
+
return Te = n, Te;
|
87
87
|
}
|
88
|
-
var
|
88
|
+
var ve, tt;
|
89
89
|
function xt() {
|
90
|
-
if (tt) return
|
90
|
+
if (tt) return ve;
|
91
91
|
tt = 1;
|
92
92
|
var e = Ot(), t = e.Symbol;
|
93
|
-
return
|
93
|
+
return ve = t, ve;
|
94
94
|
}
|
95
95
|
var ye, nt;
|
96
96
|
function bn() {
|
@@ -98,36 +98,36 @@ function bn() {
|
|
98
98
|
nt = 1;
|
99
99
|
var e = xt(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
|
100
100
|
function i(c) {
|
101
|
-
var
|
101
|
+
var u = n.call(c, o), d = c[o];
|
102
102
|
try {
|
103
103
|
c[o] = void 0;
|
104
104
|
var l = !0;
|
105
105
|
} catch {
|
106
106
|
}
|
107
107
|
var m = a.call(c);
|
108
|
-
return l && (
|
108
|
+
return l && (u ? c[o] = d : delete c[o]), m;
|
109
109
|
}
|
110
110
|
return ye = i, ye;
|
111
111
|
}
|
112
|
-
var
|
113
|
-
function
|
114
|
-
if (rt) return
|
112
|
+
var Ee, rt;
|
113
|
+
function Tn() {
|
114
|
+
if (rt) return Ee;
|
115
115
|
rt = 1;
|
116
116
|
var e = Object.prototype, t = e.toString;
|
117
117
|
function n(a) {
|
118
118
|
return t.call(a);
|
119
119
|
}
|
120
|
-
return
|
120
|
+
return Ee = n, Ee;
|
121
121
|
}
|
122
|
-
var
|
123
|
-
function
|
124
|
-
if (at) return
|
122
|
+
var Se, at;
|
123
|
+
function vn() {
|
124
|
+
if (at) return Se;
|
125
125
|
at = 1;
|
126
|
-
var e = xt(), t = bn(), n =
|
127
|
-
function c(
|
128
|
-
return
|
126
|
+
var e = xt(), t = bn(), n = Tn(), a = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
|
+
function c(u) {
|
128
|
+
return u == null ? u === void 0 ? o : a : i && i in Object(u) ? t(u) : n(u);
|
129
129
|
}
|
130
|
-
return
|
130
|
+
return Se = c, Se;
|
131
131
|
}
|
132
132
|
var Ce, ot;
|
133
133
|
function yn() {
|
@@ -139,21 +139,21 @@ function yn() {
|
|
139
139
|
return Ce = e, Ce;
|
140
140
|
}
|
141
141
|
var we, st;
|
142
|
-
function
|
142
|
+
function En() {
|
143
143
|
if (st) return we;
|
144
144
|
st = 1;
|
145
|
-
var e =
|
145
|
+
var e = vn(), t = yn(), n = "[object Symbol]";
|
146
146
|
function a(o) {
|
147
147
|
return typeof o == "symbol" || t(o) && e(o) == n;
|
148
148
|
}
|
149
149
|
return we = a, we;
|
150
150
|
}
|
151
151
|
var Pe, it;
|
152
|
-
function
|
152
|
+
function Sn() {
|
153
153
|
if (it) return Pe;
|
154
154
|
it = 1;
|
155
|
-
var e = hn(), t = qe(), n =
|
156
|
-
function
|
155
|
+
var e = hn(), t = qe(), n = En(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
156
|
+
function d(l) {
|
157
157
|
if (typeof l == "number")
|
158
158
|
return l;
|
159
159
|
if (n(l))
|
@@ -166,90 +166,90 @@ function En() {
|
|
166
166
|
return l === 0 ? l : +l;
|
167
167
|
l = e(l);
|
168
168
|
var g = i.test(l);
|
169
|
-
return g || c.test(l) ?
|
169
|
+
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? a : +l;
|
170
170
|
}
|
171
|
-
return Pe =
|
171
|
+
return Pe = d, Pe;
|
172
172
|
}
|
173
173
|
var Ae, ct;
|
174
174
|
function Lt() {
|
175
175
|
if (ct) return Ae;
|
176
176
|
ct = 1;
|
177
|
-
var e = qe(), t = pn(), n =
|
178
|
-
function c(
|
179
|
-
var m, g,
|
180
|
-
if (typeof
|
177
|
+
var e = qe(), t = pn(), n = Sn(), a = "Expected a function", o = Math.max, i = Math.min;
|
178
|
+
function c(u, d, l) {
|
179
|
+
var m, g, v, y, _, S, b = 0, p = !1, h = !1, T = !0;
|
180
|
+
if (typeof u != "function")
|
181
181
|
throw new TypeError(a);
|
182
|
-
|
183
|
-
function w(
|
184
|
-
var
|
185
|
-
return m = g = void 0, b =
|
182
|
+
d = n(d) || 0, e(l) && (p = !!l.leading, h = "maxWait" in l, v = h ? o(n(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
|
183
|
+
function w(E) {
|
184
|
+
var N = m, G = g;
|
185
|
+
return m = g = void 0, b = E, y = u.apply(G, N), y;
|
186
186
|
}
|
187
|
-
function C(
|
188
|
-
return b =
|
187
|
+
function C(E) {
|
188
|
+
return b = E, _ = setTimeout(te, d), p ? w(E) : y;
|
189
189
|
}
|
190
|
-
function ee(
|
191
|
-
var
|
192
|
-
return h ? i(Je,
|
190
|
+
function ee(E) {
|
191
|
+
var N = E - S, G = E - b, Je = d - N;
|
192
|
+
return h ? i(Je, v - G) : Je;
|
193
193
|
}
|
194
|
-
function Ke(
|
195
|
-
var
|
196
|
-
return
|
194
|
+
function Ke(E) {
|
195
|
+
var N = E - S, G = E - b;
|
196
|
+
return S === void 0 || N >= d || N < 0 || h && G >= v;
|
197
197
|
}
|
198
198
|
function te() {
|
199
|
-
var
|
200
|
-
if (Ke(
|
201
|
-
return ze(
|
202
|
-
_ = setTimeout(te, ee(
|
199
|
+
var E = t();
|
200
|
+
if (Ke(E))
|
201
|
+
return ze(E);
|
202
|
+
_ = setTimeout(te, ee(E));
|
203
203
|
}
|
204
|
-
function ze(
|
205
|
-
return _ = void 0,
|
204
|
+
function ze(E) {
|
205
|
+
return _ = void 0, T && m ? w(E) : (m = g = void 0, y);
|
206
206
|
}
|
207
207
|
function Vt() {
|
208
|
-
_ !== void 0 && clearTimeout(_), b = 0, m =
|
208
|
+
_ !== void 0 && clearTimeout(_), b = 0, m = S = g = _ = void 0;
|
209
209
|
}
|
210
210
|
function Zt() {
|
211
211
|
return _ === void 0 ? y : ze(t());
|
212
212
|
}
|
213
213
|
function _e() {
|
214
|
-
var
|
215
|
-
if (m = arguments, g = this,
|
214
|
+
var E = t(), N = Ke(E);
|
215
|
+
if (m = arguments, g = this, S = E, N) {
|
216
216
|
if (_ === void 0)
|
217
|
-
return C(
|
217
|
+
return C(S);
|
218
218
|
if (h)
|
219
|
-
return clearTimeout(_), _ = setTimeout(te,
|
219
|
+
return clearTimeout(_), _ = setTimeout(te, d), w(S);
|
220
220
|
}
|
221
|
-
return _ === void 0 && (_ = setTimeout(te,
|
221
|
+
return _ === void 0 && (_ = setTimeout(te, d)), y;
|
222
222
|
}
|
223
223
|
return _e.cancel = Vt, _e.flush = Zt, _e;
|
224
224
|
}
|
225
225
|
return Ae = c, Ae;
|
226
226
|
}
|
227
227
|
var Cn = Lt();
|
228
|
-
const wn = /* @__PURE__ */
|
229
|
-
var
|
228
|
+
const wn = /* @__PURE__ */ Nt(Cn);
|
229
|
+
var Re, lt;
|
230
230
|
function Pn() {
|
231
|
-
if (lt) return
|
231
|
+
if (lt) return Re;
|
232
232
|
lt = 1;
|
233
233
|
var e = Lt(), t = qe(), n = "Expected a function";
|
234
234
|
function a(o, i, c) {
|
235
|
-
var
|
235
|
+
var u = !0, d = !0;
|
236
236
|
if (typeof o != "function")
|
237
237
|
throw new TypeError(n);
|
238
|
-
return t(c) && (
|
239
|
-
leading:
|
238
|
+
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, i, {
|
239
|
+
leading: u,
|
240
240
|
maxWait: i,
|
241
|
-
trailing:
|
241
|
+
trailing: d
|
242
242
|
});
|
243
243
|
}
|
244
|
-
return
|
244
|
+
return Re = a, Re;
|
245
245
|
}
|
246
246
|
var An = Pn();
|
247
|
-
const
|
247
|
+
const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
248
248
|
switch (t) {
|
249
249
|
case "debounce":
|
250
250
|
return wn(e, n, a);
|
251
251
|
case "throttle":
|
252
|
-
return
|
252
|
+
return Rn(e, n, a);
|
253
253
|
default:
|
254
254
|
return e;
|
255
255
|
}
|
@@ -264,7 +264,7 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
264
264
|
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
|
265
265
|
}, []);
|
266
266
|
}
|
267
|
-
),
|
267
|
+
), jn = (
|
268
268
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
269
269
|
(e) => {
|
270
270
|
const [t, n] = K.useState((e == null ? void 0 : e.current) || null);
|
@@ -281,7 +281,7 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
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,27 +291,27 @@ const kn = /* @__PURE__ */ jt(An), Rn = (e, t, n, a) => {
|
|
291
291
|
width: e.contentRect.width,
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
|
-
function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions:
|
295
|
-
const l = Ct(e), m = In(
|
294
|
+
function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
295
|
+
const l = Ct(e), m = In(d), [g, v] = I({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: _ } =
|
298
|
+
}), { refProxy: y, refElement: _ } = jn(c), { box: S } = u || {}, b = We((h) => {
|
299
299
|
if (!o && !i)
|
300
300
|
return;
|
301
301
|
if (l.current) {
|
302
302
|
l.current = !1;
|
303
303
|
return;
|
304
304
|
}
|
305
|
-
const
|
305
|
+
const T = (w, C) => o && w.width !== C.width || i && w.height !== C.height;
|
306
306
|
h.forEach((w) => {
|
307
|
-
const C =
|
308
|
-
|
307
|
+
const C = Nn(w, S);
|
308
|
+
v((ee) => T(ee, C) ? (m == null || m({
|
309
309
|
width: C.width,
|
310
310
|
height: C.height,
|
311
311
|
entry: w
|
312
312
|
}), C) : ee);
|
313
313
|
});
|
314
|
-
}, [o, i, l,
|
314
|
+
}, [o, i, l, S]), p = We(kn(b, t, n, a), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
@@ -319,13 +319,13 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
319
319
|
]);
|
320
320
|
return J(() => {
|
321
321
|
let h;
|
322
|
-
return _ ? (h = new window.ResizeObserver(p), h.observe(_,
|
322
|
+
return _ ? (h = new window.ResizeObserver(p), h.observe(_, u)) : (g.width || g.height) && (m == null || m({
|
323
323
|
width: null,
|
324
324
|
height: null,
|
325
325
|
entry: null
|
326
|
-
}),
|
327
|
-
var
|
328
|
-
(
|
326
|
+
}), v({ width: void 0, height: void 0 })), () => {
|
327
|
+
var T, w, C;
|
328
|
+
(T = h == null ? void 0 : h.disconnect) === null || T === void 0 || T.call(h), (C = (w = p).cancel) === null || C === void 0 || C.call(w);
|
329
329
|
};
|
330
330
|
}, [p, _]), Object.assign({ ref: y }, g);
|
331
331
|
}
|
@@ -338,7 +338,7 @@ function Mt(e) {
|
|
338
338
|
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
339
339
|
return a;
|
340
340
|
}
|
341
|
-
function
|
341
|
+
function j() {
|
342
342
|
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = Mt(e)) && (a && (a += " "), a += t);
|
343
343
|
return a;
|
344
344
|
}
|
@@ -354,17 +354,17 @@ const xn = "_headerContainer_1cubo_1", Ln = "_navigationTabList_1cubo_8", Mn = "
|
|
354
354
|
refreshRate: 0
|
355
355
|
}), [o, i] = I(!1), c = () => o ? !e : !0;
|
356
356
|
J(() => {
|
357
|
-
const
|
357
|
+
const d = () => {
|
358
358
|
i(window.scrollY > 0);
|
359
359
|
};
|
360
|
-
return window.addEventListener("scroll",
|
360
|
+
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
361
361
|
}, []);
|
362
|
-
const
|
363
|
-
return /* @__PURE__ */ s("div", { style: { minHeight:
|
362
|
+
const u = `${a || Bn}px`;
|
363
|
+
return /* @__PURE__ */ s("div", { style: { minHeight: u }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(
|
364
364
|
"div",
|
365
365
|
{
|
366
366
|
ref: n,
|
367
|
-
className:
|
367
|
+
className: j(B.headerContent, {
|
368
368
|
[B.staticEnabled]: c()
|
369
369
|
}),
|
370
370
|
children: [
|
@@ -386,19 +386,19 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
386
386
|
href: t = "/",
|
387
387
|
ariaLabel: n = "Lokalise App Home",
|
388
388
|
alt: a = "Lokalise Logo"
|
389
|
-
}) => /* @__PURE__ */ s("a", { className: Gn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Kn = "_link_18vhx_1", zn = "_active_18vhx_18",
|
389
|
+
}) => /* @__PURE__ */ s("a", { className: Gn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Kn = "_link_18vhx_1", zn = "_active_18vhx_18", ut = {
|
390
390
|
link: Kn,
|
391
391
|
active: zn
|
392
392
|
}, Jn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
393
393
|
M,
|
394
394
|
{
|
395
|
-
className:
|
396
|
-
[
|
395
|
+
className: j(ut.link, {
|
396
|
+
[ut.active]: window.location.pathname.startsWith(t)
|
397
397
|
}),
|
398
398
|
href: t,
|
399
399
|
children: /* @__PURE__ */ s(n, { size: "25px" })
|
400
400
|
}
|
401
|
-
) }), Wn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18",
|
401
|
+
) }), Wn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18", dt = {
|
402
402
|
dropdownButton: Wn,
|
403
403
|
dropdownButtonActive: Qn
|
404
404
|
}, Yn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
|
@@ -408,8 +408,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
408
408
|
"button",
|
409
409
|
{
|
410
410
|
type: "button",
|
411
|
-
className:
|
412
|
-
[
|
411
|
+
className: j(dt.dropdownButton, {
|
412
|
+
[dt.dropdownButtonActive]: n
|
413
413
|
}),
|
414
414
|
children: /* @__PURE__ */ s(t, { size: "25px" })
|
415
415
|
}
|
@@ -422,7 +422,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
422
422
|
"div",
|
423
423
|
{
|
424
424
|
"aria-label": "Upgrade Icon",
|
425
|
-
className:
|
425
|
+
className: j(
|
426
426
|
Vn.iconContainer,
|
427
427
|
"flex-row",
|
428
428
|
"items-center",
|
@@ -446,8 +446,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
446
446
|
showBillingButton: o,
|
447
447
|
allowTeamCreation: i,
|
448
448
|
isProviderAlpha: c,
|
449
|
-
canAccessTeamSettings:
|
450
|
-
isEndOfTrialActive:
|
449
|
+
canAccessTeamSettings: u,
|
450
|
+
isEndOfTrialActive: d,
|
451
451
|
isTeamSuspended: l,
|
452
452
|
isFullyAuthenticated: m
|
453
453
|
} = X();
|
@@ -459,7 +459,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
459
459
|
"img",
|
460
460
|
{
|
461
461
|
src: t.logoUrl,
|
462
|
-
className:
|
462
|
+
className: j(x.profileImage, {
|
463
463
|
[x.profileImageHighlight]: a
|
464
464
|
}),
|
465
465
|
alt: "Team Logo"
|
@@ -467,10 +467,10 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
467
467
|
) : /* @__PURE__ */ s(
|
468
468
|
"div",
|
469
469
|
{
|
470
|
-
className:
|
470
|
+
className: j(x.userIconWrapper, "flex-row", "align-center", "items-center", {
|
471
471
|
[x.profileImageHighlight]: a
|
472
472
|
}),
|
473
|
-
children: /* @__PURE__ */ s(
|
473
|
+
children: /* @__PURE__ */ s(Rt, { size: "25px" })
|
474
474
|
}
|
475
475
|
),
|
476
476
|
a && /* @__PURE__ */ s(Ut, { className: x.profileImageUpgradeIcon })
|
@@ -478,8 +478,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
478
478
|
children: /* @__PURE__ */ s(le, { placement: "right-end", className: x.menuContainer, children: e({
|
479
479
|
allowTeamCreation: i,
|
480
480
|
otherTeams: n,
|
481
|
-
canAccessTeamSettings:
|
482
|
-
isEndOfTrialActive:
|
481
|
+
canAccessTeamSettings: u,
|
482
|
+
isEndOfTrialActive: d,
|
483
483
|
isTeamSuspended: l,
|
484
484
|
showBillingButton: o,
|
485
485
|
isProviderAlpha: c,
|
@@ -487,7 +487,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
487
487
|
}) })
|
488
488
|
}
|
489
489
|
);
|
490
|
-
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358],
|
490
|
+
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], ur = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Bt, Dt = (e) => e === sr, zo = (e) => ir.includes(e), Jo = (e) => cr.includes(e), Wo = (e) => lr.includes(e), Qo = (e) => ur.includes(e), Yo = (e) => e > Bt && e < qt, Xo = (e) => e === qt, dr = /\n/, mt = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [nn(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), mr = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((a) => typeof a == "string" ? mt(a, t, n) : a), _r = (e) => mr(e, dr, /* @__PURE__ */ s("br", {})), gr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, pr = (e) => e.match(gr) ?? [], _t = (e, t, n) => {
|
491
491
|
const a = e.split(t);
|
492
492
|
if (a.length === 1)
|
493
493
|
return e;
|
@@ -498,7 +498,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
498
498
|
}, gt = (e) => {
|
499
499
|
const t = pr(e);
|
500
500
|
return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? _t(n, a, o) : n.flatMap((i) => typeof i == "string" ? _t(i, a, o) : i), e) : e;
|
501
|
-
}, fr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t),
|
501
|
+
}, fr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t), Vo = (e, t, n = "PP") => It(_n(e, t), n), $e = (e) => {
|
502
502
|
J(e, []);
|
503
503
|
}, pt = {
|
504
504
|
biller: "biller",
|
@@ -507,22 +507,22 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
507
507
|
pt.biller,
|
508
508
|
pt.owner
|
509
509
|
], br = ({ children: e, config: t }) => {
|
510
|
-
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole:
|
510
|
+
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((p) => p.id === a), l = n.filter((p) => p.id !== a), m = ft.includes(u), g = ft.includes(u), v = De(o) || Dt(o), b = {
|
511
511
|
...t,
|
512
|
-
currentTeam:
|
512
|
+
currentTeam: d,
|
513
513
|
otherTeams: l,
|
514
514
|
canChangeBilling: m,
|
515
515
|
canAccessTeamSettings: g,
|
516
|
-
isOnFreeOrTrialPlan:
|
517
|
-
showUpgradeCta: c &&
|
516
|
+
isOnFreeOrTrialPlan: v,
|
517
|
+
showUpgradeCta: c && v && m,
|
518
518
|
showBillingButton: c && g && m,
|
519
519
|
allowTeamCreation: c && !i
|
520
520
|
};
|
521
521
|
return /* @__PURE__ */ s(Ht.Provider, { value: b, children: e });
|
522
|
-
},
|
523
|
-
container:
|
522
|
+
}, Tr = ({ config: e, children: t }) => /* @__PURE__ */ s(br, { config: e, children: /* @__PURE__ */ s(or, { children: t }) }), vr = "_container_q5pot_1", yr = "_profileEmail_q5pot_5", ht = {
|
523
|
+
container: vr,
|
524
524
|
profileEmail: yr
|
525
|
-
},
|
525
|
+
}, Er = ({
|
526
526
|
href: e,
|
527
527
|
onClick: t,
|
528
528
|
userEmail: n,
|
@@ -543,16 +543,16 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
543
543
|
] })
|
544
544
|
}
|
545
545
|
),
|
546
|
-
!a && /* @__PURE__ */ s(
|
546
|
+
!a && /* @__PURE__ */ s(kt, {})
|
547
547
|
] });
|
548
|
-
},
|
549
|
-
wrapper:
|
548
|
+
}, Sr = "_wrapper_1in7x_5", Cr = "_profileImage_1in7x_11", wr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", Ar = "_teamName_1in7x_36", Rr = "_planLabel_1in7x_45", kr = "_membership_1in7x_53", Ir = "_defaultProfileImage_1in7x_59", O = {
|
549
|
+
wrapper: Sr,
|
550
550
|
profileImage: Cr,
|
551
551
|
teamDetails: wr,
|
552
552
|
planWrapper: Pr,
|
553
553
|
teamName: Ar,
|
554
|
-
planLabel:
|
555
|
-
membership:
|
554
|
+
planLabel: Rr,
|
555
|
+
membership: kr,
|
556
556
|
defaultProfileImage: Ir
|
557
557
|
}, $t = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
558
558
|
const { currentTeam: a, planId: o } = X(), i = e || a;
|
@@ -565,7 +565,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
565
565
|
className: O.wrapper,
|
566
566
|
...t && { onClick: () => t(i) },
|
567
567
|
children: [
|
568
|
-
i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(
|
568
|
+
i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(Rt, { size: "25px" }) }),
|
569
569
|
/* @__PURE__ */ f("div", { className: O.teamDetails, children: [
|
570
570
|
/* @__PURE__ */ f("div", { className: O.planWrapper, children: [
|
571
571
|
/* @__PURE__ */ s("span", { className: O.teamName, children: i.name }),
|
@@ -576,19 +576,19 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
576
576
|
]
|
577
577
|
}
|
578
578
|
);
|
579
|
-
},
|
580
|
-
teamsContainer:
|
579
|
+
}, jr = "_teamsContainer_1ncrr_5", Nr = {
|
580
|
+
teamsContainer: jr
|
581
581
|
}, Or = ({ onSwitchTeam: e }) => {
|
582
582
|
const { otherTeams: t } = X();
|
583
583
|
return t.length === 0 ? null : /* @__PURE__ */ s(
|
584
584
|
"div",
|
585
585
|
{
|
586
586
|
"data-testid": "sidebar-team-switch",
|
587
|
-
className: `flex-col items-stretch ${
|
587
|
+
className: `flex-col items-stretch ${Nr.teamsContainer}`,
|
588
588
|
children: t.map((n) => /* @__PURE__ */ s($t, { team: n, onClick: e, hidePlanLabel: !0 }, n.id))
|
589
589
|
}
|
590
590
|
);
|
591
|
-
}, xr = "_container_1u995_1", Lr = "_planCta_1u995_15", Mr = "_upgradeIconWrapper_1u995_19",
|
591
|
+
}, xr = "_container_1u995_1", Lr = "_planCta_1u995_15", Mr = "_upgradeIconWrapper_1u995_19", ke = {
|
592
592
|
container: xr,
|
593
593
|
planCta: Lr,
|
594
594
|
upgradeIconWrapper: Mr
|
@@ -602,10 +602,10 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
602
602
|
{
|
603
603
|
"data-testid": "sidebar-upgrade-menu-item",
|
604
604
|
href: e,
|
605
|
-
className: `flex-col gap-1 items-start ${
|
605
|
+
className: `flex-col gap-1 items-start ${ke.container}`,
|
606
606
|
children: [
|
607
|
-
/* @__PURE__ */ s("span", { className:
|
608
|
-
/* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${
|
607
|
+
/* @__PURE__ */ s("span", { className: ke.planCta, children: c }),
|
608
|
+
/* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${ke.upgradeIconWrapper}`, children: [
|
609
609
|
/* @__PURE__ */ s(Ut, {}),
|
610
610
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
611
611
|
] })
|
@@ -645,7 +645,7 @@ function Gr(e) {
|
|
645
645
|
left: e
|
646
646
|
};
|
647
647
|
}
|
648
|
-
function
|
648
|
+
function Tt(e) {
|
649
649
|
const {
|
650
650
|
x: t,
|
651
651
|
y: n,
|
@@ -671,35 +671,35 @@ async function Fr(e, t) {
|
|
671
671
|
y: o,
|
672
672
|
platform: i,
|
673
673
|
rects: c,
|
674
|
-
elements:
|
675
|
-
strategy:
|
674
|
+
elements: u,
|
675
|
+
strategy: d
|
676
676
|
} = e, {
|
677
677
|
boundary: l = "clippingAncestors",
|
678
678
|
rootBoundary: m = "viewport",
|
679
679
|
elementContext: g = "floating",
|
680
|
-
altBoundary:
|
680
|
+
altBoundary: v = !1,
|
681
681
|
padding: y = 0
|
682
|
-
} = Gt(t, e), _ = Gr(y), b =
|
683
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
682
|
+
} = Gt(t, e), _ = Gr(y), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
|
683
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
|
684
684
|
boundary: l,
|
685
685
|
rootBoundary: m,
|
686
|
-
strategy:
|
686
|
+
strategy: d
|
687
687
|
})), h = g === "floating" ? {
|
688
688
|
x: a,
|
689
689
|
y: o,
|
690
690
|
width: c.floating.width,
|
691
691
|
height: c.floating.height
|
692
|
-
} : c.reference,
|
692
|
+
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), w = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
|
693
693
|
x: 1,
|
694
694
|
y: 1
|
695
695
|
} : {
|
696
696
|
x: 1,
|
697
697
|
y: 1
|
698
|
-
}, C =
|
699
|
-
elements:
|
698
|
+
}, C = Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
699
|
+
elements: u,
|
700
700
|
rect: h,
|
701
|
-
offsetParent:
|
702
|
-
strategy:
|
701
|
+
offsetParent: T,
|
702
|
+
strategy: d
|
703
703
|
}) : h);
|
704
704
|
return {
|
705
705
|
top: (p.top - C.top + _.top) / w.y,
|
@@ -720,7 +720,7 @@ const Kr = function(e) {
|
|
720
720
|
} = t, {
|
721
721
|
mainAxis: i = !0,
|
722
722
|
crossAxis: c = !1,
|
723
|
-
limiter:
|
723
|
+
limiter: u = {
|
724
724
|
fn: (b) => {
|
725
725
|
let {
|
726
726
|
x: p,
|
@@ -732,32 +732,32 @@ const Kr = function(e) {
|
|
732
732
|
};
|
733
733
|
}
|
734
734
|
},
|
735
|
-
...
|
735
|
+
...d
|
736
736
|
} = Gt(e, t), l = {
|
737
737
|
x: n,
|
738
738
|
y: a
|
739
|
-
}, m = await Fr(t,
|
740
|
-
let y = l[
|
739
|
+
}, m = await Fr(t, d), g = Dr(Ft(o)), v = qr(g);
|
740
|
+
let y = l[v], _ = l[g];
|
741
741
|
if (i) {
|
742
|
-
const b =
|
743
|
-
y = bt(h, y,
|
742
|
+
const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", h = y + m[b], T = y - m[p];
|
743
|
+
y = bt(h, y, T);
|
744
744
|
}
|
745
745
|
if (c) {
|
746
|
-
const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", h = _ + m[b],
|
747
|
-
_ = bt(h, _,
|
746
|
+
const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", h = _ + m[b], T = _ - m[p];
|
747
|
+
_ = bt(h, _, T);
|
748
748
|
}
|
749
|
-
const
|
749
|
+
const S = u.fn({
|
750
750
|
...t,
|
751
|
-
[
|
751
|
+
[v]: y,
|
752
752
|
[g]: _
|
753
753
|
});
|
754
754
|
return {
|
755
|
-
...
|
755
|
+
...S,
|
756
756
|
data: {
|
757
|
-
x:
|
758
|
-
y:
|
757
|
+
x: S.x - n,
|
758
|
+
y: S.y - a,
|
759
759
|
enabled: {
|
760
|
-
[
|
760
|
+
[v]: i,
|
761
761
|
[g]: c
|
762
762
|
}
|
763
763
|
}
|
@@ -801,8 +801,8 @@ const Kr = function(e) {
|
|
801
801
|
A.Completed
|
802
802
|
];
|
803
803
|
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Xr(n) })).sort((n, a) => n.status === A.InProgress && n.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : n.status === a.status ? n.name < a.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(a.status));
|
804
|
-
},
|
805
|
-
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks:
|
804
|
+
}, vt = (e) => [xe.InProgress, xe.Created].includes(e), ea = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, ta = ({ task: e, language: t }) => {
|
805
|
+
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = V(), d = () => {
|
806
806
|
i(!1);
|
807
807
|
};
|
808
808
|
return /* @__PURE__ */ f(Ue, { children: [
|
@@ -814,9 +814,9 @@ const Kr = function(e) {
|
|
814
814
|
title: `Are you finished with ${t.name}?`,
|
815
815
|
confirmText: "Mark as done",
|
816
816
|
closeText: "Cancel",
|
817
|
-
onClose:
|
817
|
+
onClose: d,
|
818
818
|
onConfirm: async () => {
|
819
|
-
a(!0), await c({ task: e, language: t, closePrompt:
|
819
|
+
a(!0), await c({ task: e, language: t, closePrompt: d }), u();
|
820
820
|
},
|
821
821
|
children: /* @__PURE__ */ f(sn, { status: "info", children: [
|
822
822
|
"Make sure you are finished and ",
|
@@ -836,17 +836,17 @@ const Kr = function(e) {
|
|
836
836
|
}
|
837
837
|
)
|
838
838
|
] });
|
839
|
-
}, na = "_langRowCompleted_vpgdi_1", ra = "_langCellSecondary_vpgdi_15", aa = "_langStatus_vpgdi_20",
|
839
|
+
}, na = "_langRowCompleted_vpgdi_1", ra = "_langCellSecondary_vpgdi_15", aa = "_langStatus_vpgdi_20", je = {
|
840
840
|
langRowCompleted: na,
|
841
841
|
langCellSecondary: ra,
|
842
842
|
langStatus: aa
|
843
843
|
}, oa = ({ language: e, task: t }) => {
|
844
|
-
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = V(), i = e.progress ?? 0, c = e.status === A.Completed,
|
844
|
+
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = V(), i = e.progress ?? 0, c = e.status === A.Completed, u = ea(t, e);
|
845
845
|
return /* @__PURE__ */ f(
|
846
846
|
"tr",
|
847
847
|
{
|
848
|
-
className:
|
849
|
-
[
|
848
|
+
className: j({
|
849
|
+
[je.langRowCompleted]: u
|
850
850
|
}),
|
851
851
|
children: [
|
852
852
|
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
@@ -859,7 +859,7 @@ const Kr = function(e) {
|
|
859
859
|
children: e.name
|
860
860
|
}
|
861
861
|
) }) }),
|
862
|
-
/* @__PURE__ */ s("td", { className:
|
862
|
+
/* @__PURE__ */ s("td", { className: je.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
863
863
|
M,
|
864
864
|
{
|
865
865
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
@@ -873,10 +873,10 @@ const Kr = function(e) {
|
|
873
873
|
i,
|
874
874
|
"%"
|
875
875
|
] }),
|
876
|
-
/* @__PURE__ */ s("td", { children:
|
876
|
+
/* @__PURE__ */ s("td", { children: u ? /* @__PURE__ */ s(ta, { task: t, language: e }) : /* @__PURE__ */ s(
|
877
877
|
"span",
|
878
878
|
{
|
879
|
-
className: `${
|
879
|
+
className: `${je.langStatus} flex-row items-center justify-start`,
|
880
880
|
"data-status": e.status,
|
881
881
|
children: Yr(e.status, i)
|
882
882
|
}
|
@@ -884,13 +884,13 @@ const Kr = function(e) {
|
|
884
884
|
]
|
885
885
|
}
|
886
886
|
);
|
887
|
-
}, sa = "_taskContainer_mt2or_1", ia = "_taskTitle_mt2or_21", ca = "_taskDescription_mt2or_28", la = "_languagesTable_mt2or_35",
|
887
|
+
}, sa = "_taskContainer_mt2or_1", ia = "_taskTitle_mt2or_21", ca = "_taskDescription_mt2or_28", la = "_languagesTable_mt2or_35", ua = "_metadata_mt2or_87", H = {
|
888
888
|
taskContainer: sa,
|
889
889
|
taskTitle: ia,
|
890
890
|
taskDescription: ca,
|
891
891
|
languagesTable: la,
|
892
|
-
metadata:
|
893
|
-
},
|
892
|
+
metadata: ua
|
893
|
+
}, da = ({ task: e }) => {
|
894
894
|
const { getProjectUrl: t, taskTitleOnClick: n } = V(), a = Zr(e.langs), o = (i) => {
|
895
895
|
window.open(
|
896
896
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
@@ -901,10 +901,10 @@ const Kr = function(e) {
|
|
901
901
|
return /* @__PURE__ */ f("div", { className: H.taskContainer, children: [
|
902
902
|
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-center", children: [
|
903
903
|
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
904
|
-
/* @__PURE__ */ s(
|
905
|
-
e.due_date && /* @__PURE__ */ f(
|
904
|
+
/* @__PURE__ */ s(Ne, { color: Vr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
905
|
+
e.due_date && /* @__PURE__ */ f(Ne, { color: "#EAB308", children: [
|
906
906
|
"DUE ",
|
907
|
-
hr(
|
907
|
+
hr(dn(e.due_date), "yyyy-MM-dd")
|
908
908
|
] })
|
909
909
|
] }),
|
910
910
|
e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
|
@@ -988,22 +988,22 @@ const Kr = function(e) {
|
|
988
988
|
/* @__PURE__ */ s("br", {}),
|
989
989
|
/* @__PURE__ */ s(M, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
990
990
|
] })
|
991
|
-
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(
|
991
|
+
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(da, { task: o }, o.id)) });
|
992
992
|
}, ba = ({ children: e, config: t }) => {
|
993
|
-
const [n, a] = I([]), [o, i] = I(!0), [c,
|
994
|
-
getProjectUrl:
|
993
|
+
const [n, a] = I([]), [o, i] = I(!0), [c, u] = I(0), {
|
994
|
+
getProjectUrl: d,
|
995
995
|
onLanguageCompleteConfirm: l,
|
996
996
|
onTasksWidgetOpen: m,
|
997
997
|
langNameOnClick: g,
|
998
|
-
langProgressOnClick:
|
998
|
+
langProgressOnClick: v,
|
999
999
|
taskTitleOnClick: y
|
1000
|
-
} = t, { getTasks: _, getTasksCount:
|
1000
|
+
} = t, { getTasks: _, getTasksCount: S } = t, b = async () => {
|
1001
1001
|
i(!0);
|
1002
|
-
const
|
1003
|
-
return a(
|
1002
|
+
const T = await _();
|
1003
|
+
return a(T), i(!1), T;
|
1004
1004
|
}, p = async () => {
|
1005
|
-
const
|
1006
|
-
|
1005
|
+
const T = await S();
|
1006
|
+
u(T);
|
1007
1007
|
};
|
1008
1008
|
$e(() => (p(), document.addEventListener(P.TaskCompleted, p), document.addEventListener(P.TaskClosed, p), document.addEventListener(P.Refresh, p), () => {
|
1009
1009
|
document.removeEventListener(P.TaskCompleted, p), document.removeEventListener(P.TaskClosed, p), document.removeEventListener(P.Refresh, p);
|
@@ -1013,18 +1013,18 @@ const Kr = function(e) {
|
|
1013
1013
|
tasks: n,
|
1014
1014
|
tasksCount: c,
|
1015
1015
|
loadingTasks: o,
|
1016
|
-
getProjectUrl:
|
1016
|
+
getProjectUrl: d,
|
1017
1017
|
onLanguageCompleteConfirm: l,
|
1018
1018
|
onTasksWidgetOpen: m,
|
1019
1019
|
langNameOnClick: g,
|
1020
|
-
langProgressOnClick:
|
1020
|
+
langProgressOnClick: v,
|
1021
1021
|
taskTitleOnClick: y
|
1022
1022
|
};
|
1023
1023
|
return /* @__PURE__ */ s(Kt.Provider, { value: h, children: e });
|
1024
|
-
},
|
1024
|
+
}, Ta = (e) => function(n) {
|
1025
1025
|
const { config: a, ...o } = n;
|
1026
1026
|
return /* @__PURE__ */ s(ba, { config: a, children: /* @__PURE__ */ s(e, { ...o }) });
|
1027
|
-
},
|
1027
|
+
}, va = Ta(() => {
|
1028
1028
|
const [e, t] = I(!1), { tasksCount: n } = V();
|
1029
1029
|
return $e(() => {
|
1030
1030
|
const a = () => {
|
@@ -1056,52 +1056,52 @@ const Kr = function(e) {
|
|
1056
1056
|
type: "button",
|
1057
1057
|
"data-testid": "sidebar-tasks-widget-button",
|
1058
1058
|
"aria-label": "Tasks",
|
1059
|
-
className:
|
1059
|
+
className: j(Ie.navItem, {
|
1060
1060
|
[Ie.activeNavItem]: a
|
1061
1061
|
}),
|
1062
1062
|
children: [
|
1063
|
-
/* @__PURE__ */ s(
|
1063
|
+
/* @__PURE__ */ s(un, { size: "25px" }),
|
1064
1064
|
n > 0 && /* @__PURE__ */ s("div", { className: Ie.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
1065
1065
|
]
|
1066
1066
|
}
|
1067
1067
|
)
|
1068
1068
|
}
|
1069
1069
|
) });
|
1070
|
-
}),
|
1071
|
-
|
1072
|
-
const
|
1073
|
-
|
1074
|
-
|
1075
|
-
|
1076
|
-
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
|
1081
|
-
|
1082
|
-
|
1083
|
-
const
|
1084
|
-
breadcrumbsItem:
|
1070
|
+
}), R = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Dn.sidebarContainer, children: e }), ya = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1071
|
+
R.Top = ya;
|
1072
|
+
const Ea = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1073
|
+
R.Bottom = Ea;
|
1074
|
+
R.Avatar = Fn;
|
1075
|
+
R.IconLink = Jn;
|
1076
|
+
R.Menu = Yn;
|
1077
|
+
R.ProfileMenu = Tr;
|
1078
|
+
R.TeamSwitch = Or;
|
1079
|
+
R.TeamMenuItem = $t;
|
1080
|
+
R.UpgradeMenuItem = Ur;
|
1081
|
+
R.ProfileSettingsMenuItem = Er;
|
1082
|
+
R.Tasks = va;
|
1083
|
+
const Sa = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
1084
|
+
breadcrumbsItem: Sa,
|
1085
1085
|
breadcrumbs: Ca
|
1086
|
-
},
|
1086
|
+
}, Zo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ f(At, { children: [
|
1087
1087
|
/* @__PURE__ */ s(M, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1088
1088
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1089
1089
|
] }, `${t.link}-${t.name}`)) }), wa = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ f(At, { children: [
|
1090
|
-
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(
|
1090
|
+
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(kt, {}),
|
1091
1091
|
t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: i }) => /* @__PURE__ */ s(W, { href: a || "#", "aria-label": o, onClick: i, children: o }, o))
|
1092
|
-
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15",
|
1092
|
+
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15", Ra = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ka = "_disabled_1pc1v_57", Ia = "_projectNavigationItem_1pc1v_61", ja = "_projectNavigationItemDisabled_1pc1v_67", L = {
|
1093
1093
|
badge: Pa,
|
1094
1094
|
tag: Aa,
|
1095
|
-
withNavLinkStyle:
|
1096
|
-
disabled:
|
1095
|
+
withNavLinkStyle: Ra,
|
1096
|
+
disabled: ka,
|
1097
1097
|
projectNavigationItem: Ia,
|
1098
|
-
projectNavigationItemDisabled:
|
1099
|
-
},
|
1098
|
+
projectNavigationItemDisabled: ja
|
1099
|
+
}, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ f("div", { className: "flex gap-1", children: [
|
1100
1100
|
/* @__PURE__ */ f("div", { children: [
|
1101
1101
|
/* @__PURE__ */ s("span", { children: e }),
|
1102
1102
|
!!t && /* @__PURE__ */ s("div", { className: L.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1103
1103
|
] }),
|
1104
|
-
!!n && /* @__PURE__ */ s(
|
1104
|
+
!!n && /* @__PURE__ */ s(Ne, { className: L.tag, children: n })
|
1105
1105
|
] }), Le = rn(
|
1106
1106
|
({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: i }, c) => /* @__PURE__ */ s(q, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
|
1107
1107
|
"div",
|
@@ -1112,19 +1112,19 @@ const Ea = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
|
1112
1112
|
{
|
1113
1113
|
type: "button",
|
1114
1114
|
ref: c,
|
1115
|
-
className:
|
1115
|
+
className: j(L.withNavLinkStyle, {
|
1116
1116
|
[L.disabled]: n
|
1117
1117
|
}),
|
1118
1118
|
disabled: n,
|
1119
1119
|
onClick: o,
|
1120
|
-
children: /* @__PURE__ */ s(
|
1120
|
+
children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i })
|
1121
1121
|
}
|
1122
|
-
) : /* @__PURE__ */ s("a", { href: t, className: L.withNavLinkStyle, children: /* @__PURE__ */ s(
|
1122
|
+
) : /* @__PURE__ */ s("a", { href: t, className: L.withNavLinkStyle, children: /* @__PURE__ */ s(Et, { label: e, badge: a, novel: i }) })
|
1123
1123
|
}
|
1124
1124
|
) })
|
1125
1125
|
);
|
1126
1126
|
Le.displayName = "NavigationTabsItem";
|
1127
|
-
const
|
1127
|
+
const Na = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Oa = (e) => e.visible && (!e.dropdown || Na(e.dropdown)), es = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Oa).map((n) => {
|
1128
1128
|
var a, o, i;
|
1129
1129
|
return n.dropdown ? /* @__PURE__ */ s(
|
1130
1130
|
"li",
|
@@ -1163,7 +1163,7 @@ const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
1163
1163
|
n.key
|
1164
1164
|
);
|
1165
1165
|
}) }) });
|
1166
|
-
class
|
1166
|
+
class k {
|
1167
1167
|
/**
|
1168
1168
|
* This constructor is private to prevent the creation of a HeaderBuilder, it's an implementation detail
|
1169
1169
|
* that users of this class should not be aware of. The only way to create a HeaderBuilder is through the
|
@@ -1175,7 +1175,7 @@ class R {
|
|
1175
1175
|
this.factories = t;
|
1176
1176
|
}
|
1177
1177
|
static create(t = {}) {
|
1178
|
-
return new
|
1178
|
+
return new k([() => t]);
|
1179
1179
|
}
|
1180
1180
|
/**
|
1181
1181
|
* Adds a single header to the builder by providing a key and a value.
|
@@ -1195,7 +1195,7 @@ class R {
|
|
1195
1195
|
* @param value - The value of the header
|
1196
1196
|
*/
|
1197
1197
|
add(t, n) {
|
1198
|
-
return new
|
1198
|
+
return new k([...this.factories, () => ({ [t]: n })]);
|
1199
1199
|
}
|
1200
1200
|
/**
|
1201
1201
|
* Adds multiple headers to the builder by providing an object or a promise of an object with the headers.
|
@@ -1219,7 +1219,7 @@ class R {
|
|
1219
1219
|
* @param extension - An object with the headers to add
|
1220
1220
|
*/
|
1221
1221
|
and(t) {
|
1222
|
-
return new
|
1222
|
+
return new k([...this.factories, () => t]);
|
1223
1223
|
}
|
1224
1224
|
/**
|
1225
1225
|
* Adds a factory function that returns a promise of headers to the builder.
|
@@ -1240,7 +1240,7 @@ class R {
|
|
1240
1240
|
* @param factory - A function that returns a promise of headers
|
1241
1241
|
*/
|
1242
1242
|
from(t) {
|
1243
|
-
return new
|
1243
|
+
return new k([...this.factories, t]);
|
1244
1244
|
}
|
1245
1245
|
/**
|
1246
1246
|
* Takes a middleware function that receives the current builder and returns a new, modified, builder.
|
@@ -1285,7 +1285,7 @@ class R {
|
|
1285
1285
|
* @param builder - The builder to merge with
|
1286
1286
|
*/
|
1287
1287
|
merge(t) {
|
1288
|
-
return new
|
1288
|
+
return new k([...this.factories, ...t.factories]);
|
1289
1289
|
}
|
1290
1290
|
/**
|
1291
1291
|
* Resolves the headers by waiting for all the promises to resolve and merging them together.
|
@@ -1312,7 +1312,7 @@ class xa {
|
|
1312
1312
|
}
|
1313
1313
|
apply(t) {
|
1314
1314
|
return t.from(async () => {
|
1315
|
-
const n = this.middleware(
|
1315
|
+
const n = this.middleware(k.create());
|
1316
1316
|
return n instanceof Promise ? n.then((a) => a.resolve()) : n.resolve();
|
1317
1317
|
});
|
1318
1318
|
}
|
@@ -1352,7 +1352,7 @@ class se extends Error {
|
|
1352
1352
|
ne(this, "status", 401);
|
1353
1353
|
}
|
1354
1354
|
}
|
1355
|
-
function
|
1355
|
+
function ts(e) {
|
1356
1356
|
return zt(async (t) => {
|
1357
1357
|
var i, c;
|
1358
1358
|
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
@@ -1367,7 +1367,7 @@ function Xo(e) {
|
|
1367
1367
|
return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
|
1368
1368
|
});
|
1369
1369
|
}
|
1370
|
-
const
|
1370
|
+
const ns = zt(
|
1371
1371
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1372
1372
|
);
|
1373
1373
|
function Wt() {
|
@@ -1381,7 +1381,7 @@ function Me(e, t) {
|
|
1381
1381
|
var n, a;
|
1382
1382
|
return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
|
1383
1383
|
}
|
1384
|
-
function
|
1384
|
+
function rs() {
|
1385
1385
|
const e = Wt();
|
1386
1386
|
if (!e)
|
1387
1387
|
return;
|
@@ -1425,25 +1425,25 @@ const Qt = r.union([
|
|
1425
1425
|
isEmptyResponseExpected: !0,
|
1426
1426
|
successResponseBodySchema: qa
|
1427
1427
|
});
|
1428
|
-
function
|
1428
|
+
function as(e, t, n) {
|
1429
1429
|
return async () => {
|
1430
1430
|
const a = t();
|
1431
1431
|
if (!a)
|
1432
1432
|
throw new se();
|
1433
1433
|
return D(e, Ge, {
|
1434
1434
|
pathParams: { teamId: Number(await n()) },
|
1435
|
-
headers: await
|
1435
|
+
headers: await k.create().add("x-csrf-token", a).resolve()
|
1436
1436
|
});
|
1437
1437
|
};
|
1438
1438
|
}
|
1439
|
-
function
|
1439
|
+
function os(e) {
|
1440
1440
|
return async ({ accessToken: t, refreshToken: n }) => {
|
1441
1441
|
const a = Z(t);
|
1442
1442
|
if (!a)
|
1443
1443
|
throw new se();
|
1444
1444
|
return D(e, Ge, {
|
1445
1445
|
pathParams: { teamId: a.teamId },
|
1446
|
-
headers: await
|
1446
|
+
headers: await k.create().add("authorization", `Bearer ${n}`).resolve()
|
1447
1447
|
});
|
1448
1448
|
};
|
1449
1449
|
}
|
@@ -1464,7 +1464,7 @@ const Ga = {
|
|
1464
1464
|
};
|
1465
1465
|
ne(ie, "eventName", "new-jwt-issued");
|
1466
1466
|
let z = ie;
|
1467
|
-
function
|
1467
|
+
function ss(e, t, n) {
|
1468
1468
|
const a = Ma(), o = Fa(e, t.add("x-csrf-token", a ?? ""), {
|
1469
1469
|
queryKey: Ga.teamKey(n),
|
1470
1470
|
enabled: a !== void 0
|
@@ -1512,14 +1512,14 @@ const Ka = U, za = r.object({
|
|
1512
1512
|
pathParams: { teamId: o, userId: i }
|
1513
1513
|
})
|
1514
1514
|
});
|
1515
|
-
function
|
1515
|
+
function is(e, t) {
|
1516
1516
|
const n = Yt();
|
1517
1517
|
return Xa(e, t, {
|
1518
1518
|
queryKey: Ya.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1519
1519
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1520
1520
|
});
|
1521
1521
|
}
|
1522
|
-
const
|
1522
|
+
const cs = U, Va = r.object({
|
1523
1523
|
lang_id: r.number(),
|
1524
1524
|
lang_iso: r.string(),
|
1525
1525
|
lang_name: r.string(),
|
@@ -1534,57 +1534,68 @@ const as = U, Va = r.object({
|
|
1534
1534
|
languages: r.array(Va),
|
1535
1535
|
is_admin: r.boolean(),
|
1536
1536
|
is_reviewer: r.boolean()
|
1537
|
-
}), eo = r.
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1537
|
+
}), eo = r.union([
|
1538
|
+
r.object({ uuid: r.string().uuid() }),
|
1539
|
+
r.object({ id: r.string() })
|
1540
|
+
]), to = r.union([
|
1541
|
+
r.object({ authenticatedUser: r.literal(!0) }),
|
1542
|
+
r.object({ uuid: r.string().uuid() }),
|
1543
|
+
r.object({ id: r.number() })
|
1544
|
+
]), no = r.object({
|
1545
|
+
project: eo,
|
1546
|
+
contributor: to
|
1547
|
+
}), ro = r.object({
|
1541
1548
|
project_id: r.string(),
|
1542
1549
|
contributor: Za
|
1543
|
-
}),
|
1550
|
+
}), ao = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, oo = (e) => "uuid" in e ? e.uuid : e.id, so = Y({
|
1544
1551
|
description: "Get the details of a project contributor",
|
1545
1552
|
requestHeaderSchema: U,
|
1546
|
-
requestPathParamsSchema:
|
1547
|
-
pathResolver: ({
|
1548
|
-
successResponseBodySchema:
|
1549
|
-
}),
|
1550
|
-
projectUserKey: (e
|
1551
|
-
},
|
1553
|
+
requestPathParamsSchema: no,
|
1554
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${oo(e)}/contributors/${ao(t)}`,
|
1555
|
+
successResponseBodySchema: ro
|
1556
|
+
}), io = {
|
1557
|
+
projectUserKey: (e) => ["RetrieveContributor", e]
|
1558
|
+
}, co = (e, t, n) => $({
|
1552
1559
|
...n,
|
1553
|
-
queryFn: async ({ queryKey: [a, o
|
1554
|
-
pathParams:
|
1560
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, so, {
|
1561
|
+
pathParams: o,
|
1555
1562
|
headers: await t.resolve()
|
1556
1563
|
})
|
1557
1564
|
});
|
1558
|
-
function
|
1559
|
-
const a = Yt();
|
1560
|
-
return
|
1561
|
-
queryKey:
|
1565
|
+
function ls(e, t, n) {
|
1566
|
+
const a = Yt(), o = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
|
1567
|
+
return co(e, t, {
|
1568
|
+
queryKey: io.projectUserKey({ project: { id: n }, contributor: o }),
|
1562
1569
|
enabled: a !== void 0
|
1563
1570
|
});
|
1564
1571
|
}
|
1565
|
-
const
|
1572
|
+
const lo = r.object({
|
1566
1573
|
lang_iso: r.string(),
|
1567
1574
|
custom_iso: r.string().optional()
|
1568
|
-
}),
|
1575
|
+
}), uo = r.object({
|
1569
1576
|
language_id: r.number(),
|
1570
1577
|
language_iso: r.string(),
|
1571
1578
|
progress: r.number(),
|
1572
|
-
words_to_do: r.number()
|
1573
|
-
|
1579
|
+
words_to_do: r.number(),
|
1580
|
+
project_language_id: r.number(),
|
1581
|
+
project_language_uuid: r.string().uuid()
|
1582
|
+
}), mo = r.object({
|
1574
1583
|
projectId: r.string()
|
1575
1584
|
}), Xt = r.object({
|
1576
1585
|
lang_id: r.number(),
|
1577
1586
|
lang_iso: r.string(),
|
1578
1587
|
lang_name: r.string(),
|
1579
1588
|
is_rtl: r.boolean(),
|
1580
|
-
plural_forms: r.array(r.string().optional())
|
1581
|
-
|
1589
|
+
plural_forms: r.array(r.string().optional()),
|
1590
|
+
project_language_id: r.number(),
|
1591
|
+
project_language_uuid: r.string().uuid()
|
1592
|
+
}), _o = r.object({
|
1582
1593
|
project_id: r.string(),
|
1583
1594
|
project_uuid: r.string().uuid(),
|
1584
1595
|
languages: r.array(Xt)
|
1585
|
-
}),
|
1596
|
+
}), go = r.object({
|
1586
1597
|
projectId: r.string()
|
1587
|
-
}),
|
1598
|
+
}), po = r.object({
|
1588
1599
|
languages: r.array(
|
1589
1600
|
r.object({
|
1590
1601
|
lang_iso: r.string(),
|
@@ -1593,7 +1604,7 @@ const oo = r.object({
|
|
1593
1604
|
custom_plural_forms: r.array(r.string()).optional()
|
1594
1605
|
})
|
1595
1606
|
)
|
1596
|
-
}),
|
1607
|
+
}), fo = r.object({
|
1597
1608
|
project_id: r.string(),
|
1598
1609
|
project_uuid: r.string().uuid(),
|
1599
1610
|
languages: r.array(Xt),
|
@@ -1604,44 +1615,44 @@ const oo = r.object({
|
|
1604
1615
|
lang_iso: r.string()
|
1605
1616
|
})
|
1606
1617
|
).optional()
|
1607
|
-
}),
|
1618
|
+
}), ho = r.object({
|
1608
1619
|
projectId: r.string()
|
1609
|
-
}),
|
1620
|
+
}), bo = r.object({
|
1610
1621
|
langs: r.array(
|
1611
1622
|
r.object({
|
1612
1623
|
lang_iso: r.string(),
|
1613
1624
|
base_lang: r.boolean()
|
1614
1625
|
})
|
1615
1626
|
)
|
1616
|
-
}),
|
1627
|
+
}), To = r.object({
|
1617
1628
|
result: r.boolean()
|
1618
|
-
}),
|
1629
|
+
}), vo = Y({
|
1619
1630
|
description: "List of project languages",
|
1620
1631
|
requestHeaderSchema: U,
|
1621
|
-
requestPathParamsSchema:
|
1632
|
+
requestPathParamsSchema: mo,
|
1622
1633
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1623
|
-
successResponseBodySchema:
|
1624
|
-
}),
|
1634
|
+
successResponseBodySchema: _o
|
1635
|
+
}), us = jt({
|
1625
1636
|
description: "Add languages to existing project",
|
1626
1637
|
requestHeaderSchema: U,
|
1627
1638
|
method: "post",
|
1628
|
-
requestPathParamsSchema:
|
1639
|
+
requestPathParamsSchema: go,
|
1629
1640
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1630
|
-
requestBodySchema:
|
1631
|
-
successResponseBodySchema:
|
1632
|
-
}),
|
1641
|
+
requestBodySchema: po,
|
1642
|
+
successResponseBodySchema: fo
|
1643
|
+
}), yo = jt({
|
1633
1644
|
description: "Bulk update project languages",
|
1634
1645
|
requestHeaderSchema: U,
|
1635
1646
|
method: "put",
|
1636
|
-
requestPathParamsSchema:
|
1647
|
+
requestPathParamsSchema: ho,
|
1637
1648
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1638
|
-
requestBodySchema:
|
1639
|
-
successResponseBodySchema:
|
1640
|
-
}),
|
1649
|
+
requestBodySchema: bo,
|
1650
|
+
successResponseBodySchema: To
|
1651
|
+
}), ue = U, Fe = r.union([
|
1641
1652
|
r.literal("localization_files"),
|
1642
1653
|
r.literal("paged_documents"),
|
1643
1654
|
r.literal("marketing")
|
1644
|
-
]),
|
1655
|
+
]), Eo = r.object({
|
1645
1656
|
per_platform_key_names: r.boolean(),
|
1646
1657
|
reviewing: r.boolean(),
|
1647
1658
|
auto_toggle_unverified: r.boolean(),
|
@@ -1652,7 +1663,7 @@ const oo = r.object({
|
|
1652
1663
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
1653
1664
|
segmentation: r.boolean(),
|
1654
1665
|
contributor_preview_download_enabled: r.boolean()
|
1655
|
-
}),
|
1666
|
+
}), So = r.object({
|
1656
1667
|
not_reviewed: r.number(),
|
1657
1668
|
unverified: r.number(),
|
1658
1669
|
spelling_grammar: r.number(),
|
@@ -1669,15 +1680,15 @@ const oo = r.object({
|
|
1669
1680
|
double_space: r.number(),
|
1670
1681
|
special_placeholder: r.number(),
|
1671
1682
|
unbalanced_brackets: r.number()
|
1672
|
-
}),
|
1683
|
+
}), Co = r.object({
|
1673
1684
|
progress_total: r.number(),
|
1674
1685
|
keys_total: r.number(),
|
1675
1686
|
team: r.number(),
|
1676
1687
|
base_words: r.number(),
|
1677
1688
|
qa_issues_total: r.number(),
|
1678
|
-
qa_issues:
|
1679
|
-
languages: r.array(
|
1680
|
-
}),
|
1689
|
+
qa_issues: So,
|
1690
|
+
languages: r.array(uo)
|
1691
|
+
}), de = r.object({
|
1681
1692
|
project_id: r.string(),
|
1682
1693
|
uuid: r.string().uuid(),
|
1683
1694
|
project_type: Fe,
|
@@ -1688,121 +1699,124 @@ const oo = r.object({
|
|
1688
1699
|
created_by: r.number(),
|
1689
1700
|
created_by_email: r.string(),
|
1690
1701
|
team_id: r.number(),
|
1702
|
+
team_uuid: r.string().uuid(),
|
1691
1703
|
base_language_id: r.number(),
|
1692
1704
|
base_language_iso: r.string(),
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1705
|
+
base_project_language_id: r.number(),
|
1706
|
+
base_project_language_uuid: r.string().uuid(),
|
1707
|
+
settings: Eo.optional(),
|
1708
|
+
statistics: Co.optional()
|
1709
|
+
}), wo = r.object({
|
1696
1710
|
name: r.string(),
|
1697
1711
|
team_id: r.string(),
|
1698
1712
|
base_lang_iso: r.string(),
|
1699
|
-
languages: r.array(
|
1713
|
+
languages: r.array(lo),
|
1700
1714
|
project_type: Fe,
|
1701
1715
|
is_segmentation_enabled: r.boolean()
|
1702
|
-
}),
|
1716
|
+
}), St = r.union([r.literal(0), r.literal(1)]), Po = r.object({
|
1703
1717
|
filter_type: Fe.optional(),
|
1704
1718
|
filter_team_id: r.number().optional(),
|
1705
1719
|
filter_names: r.string().optional(),
|
1706
|
-
include_statistics:
|
1707
|
-
include_settings:
|
1720
|
+
include_statistics: St.optional(),
|
1721
|
+
include_settings: St.optional(),
|
1708
1722
|
limit: r.number().optional(),
|
1709
1723
|
page: r.number().optional()
|
1710
|
-
}),
|
1711
|
-
projects: r.array(
|
1712
|
-
}),
|
1724
|
+
}), Ao = r.object({
|
1725
|
+
projects: r.array(de)
|
1726
|
+
}), Ro = r.object({
|
1713
1727
|
project_id: r.string()
|
1714
|
-
}),
|
1728
|
+
}), ko = r.object({
|
1715
1729
|
project_id: r.string()
|
1716
|
-
}),
|
1730
|
+
}), Io = r.object({
|
1717
1731
|
name: r.string().min(1),
|
1718
1732
|
description: r.string().optional()
|
1719
|
-
}), me = () => "/projects",
|
1733
|
+
}), me = () => "/projects", jo = He({
|
1720
1734
|
description: "Create a new project",
|
1721
|
-
requestHeaderSchema:
|
1735
|
+
requestHeaderSchema: ue,
|
1722
1736
|
method: "post",
|
1723
1737
|
pathResolver: me,
|
1724
|
-
requestBodySchema:
|
1725
|
-
successResponseBodySchema:
|
1726
|
-
}),
|
1738
|
+
requestBodySchema: wo,
|
1739
|
+
successResponseBodySchema: de
|
1740
|
+
}), No = Y({
|
1727
1741
|
description: "List all projects",
|
1728
|
-
requestHeaderSchema:
|
1742
|
+
requestHeaderSchema: ue,
|
1729
1743
|
pathResolver: me,
|
1730
|
-
requestQuerySchema:
|
1731
|
-
successResponseBodySchema:
|
1732
|
-
}),
|
1744
|
+
requestQuerySchema: Po,
|
1745
|
+
successResponseBodySchema: Ao
|
1746
|
+
}), Oo = Y({
|
1733
1747
|
description: "Retrieve a project",
|
1734
|
-
requestHeaderSchema:
|
1735
|
-
requestPathParamsSchema:
|
1748
|
+
requestHeaderSchema: ue,
|
1749
|
+
requestPathParamsSchema: Ro,
|
1736
1750
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1737
|
-
successResponseBodySchema:
|
1738
|
-
}),
|
1751
|
+
successResponseBodySchema: de
|
1752
|
+
}), xo = He({
|
1739
1753
|
description: "Update a project",
|
1740
|
-
requestHeaderSchema:
|
1754
|
+
requestHeaderSchema: ue,
|
1741
1755
|
method: "put",
|
1742
|
-
requestPathParamsSchema:
|
1756
|
+
requestPathParamsSchema: ko,
|
1743
1757
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1744
|
-
requestBodySchema:
|
1745
|
-
successResponseBodySchema:
|
1758
|
+
requestBodySchema: Io,
|
1759
|
+
successResponseBodySchema: de
|
1746
1760
|
});
|
1747
|
-
function
|
1761
|
+
function ds(e, t, n = {}) {
|
1748
1762
|
return Be({
|
1749
1763
|
...n,
|
1750
|
-
mutationFn: async (a) => D(e,
|
1764
|
+
mutationFn: async (a) => D(e, jo, {
|
1751
1765
|
headers: await t.resolve(),
|
1752
1766
|
body: a
|
1753
1767
|
})
|
1754
1768
|
});
|
1755
1769
|
}
|
1756
|
-
const
|
1770
|
+
const ms = {
|
1757
1771
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1758
1772
|
};
|
1759
|
-
function
|
1773
|
+
function _s(e, t, n) {
|
1760
1774
|
return $({
|
1761
1775
|
...n,
|
1762
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1776
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, vo, {
|
1763
1777
|
headers: await t.resolve(),
|
1764
1778
|
pathParams: { projectId: o }
|
1765
1779
|
})
|
1766
1780
|
});
|
1767
1781
|
}
|
1768
|
-
const
|
1782
|
+
const gs = {
|
1769
1783
|
paramsKey: (e) => ["listProjects", e]
|
1770
1784
|
};
|
1771
|
-
function
|
1785
|
+
function ps(e, t, n) {
|
1772
1786
|
return $({
|
1773
1787
|
...n,
|
1774
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1788
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, No, {
|
1775
1789
|
headers: await t.resolve(),
|
1776
1790
|
queryParams: o
|
1777
1791
|
})
|
1778
1792
|
});
|
1779
1793
|
}
|
1780
|
-
const
|
1794
|
+
const fs = {
|
1781
1795
|
projectIdKey: (e) => ["retrieveProject", e]
|
1782
1796
|
};
|
1783
|
-
function
|
1797
|
+
function hs(e, t, n) {
|
1784
1798
|
return $({
|
1785
1799
|
...n,
|
1786
|
-
queryFn: async ({ queryKey: [a, o] }) => Q(e,
|
1800
|
+
queryFn: async ({ queryKey: [a, o] }) => Q(e, Oo, {
|
1787
1801
|
headers: await t.resolve(),
|
1788
1802
|
pathParams: { project_id: o }
|
1789
1803
|
})
|
1790
1804
|
});
|
1791
1805
|
}
|
1792
|
-
function
|
1806
|
+
function bs(e, t, n, a = {}) {
|
1793
1807
|
return Be({
|
1794
1808
|
...a,
|
1795
|
-
mutationFn: async (o) => D(e,
|
1809
|
+
mutationFn: async (o) => D(e, xo, {
|
1796
1810
|
headers: await t.resolve(),
|
1797
1811
|
body: o,
|
1798
1812
|
pathParams: n
|
1799
1813
|
})
|
1800
1814
|
});
|
1801
1815
|
}
|
1802
|
-
function
|
1816
|
+
function Ts(e, t, n, a = {}) {
|
1803
1817
|
return Be({
|
1804
1818
|
...a,
|
1805
|
-
mutationFn: async (o) => D(e,
|
1819
|
+
mutationFn: async (o) => D(e, yo, {
|
1806
1820
|
pathParams: t,
|
1807
1821
|
headers: await n.resolve(),
|
1808
1822
|
body: o
|
@@ -1810,46 +1824,46 @@ function ps(e, t, n, a = {}) {
|
|
1810
1824
|
});
|
1811
1825
|
}
|
1812
1826
|
export {
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1827
|
+
go as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1828
|
+
po as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1829
|
+
fo as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1830
|
+
ho as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1831
|
+
bo as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1832
|
+
To as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1833
|
+
Zo as Breadcrumbs,
|
1834
|
+
cs as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1821
1835
|
Va as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1822
1836
|
Za as CONTRIBUTOR_SCHEMA,
|
1823
|
-
|
1837
|
+
wo as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1824
1838
|
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1825
|
-
|
1839
|
+
ur as ENTERPRISE_PLAN_IDS,
|
1826
1840
|
cr as ESSENTIAL_PLAN_IDS,
|
1827
1841
|
Bt as FREE_PLAN_ID,
|
1828
|
-
|
1842
|
+
k as HeaderBuilder,
|
1829
1843
|
qa as JWT_TOKEN_SCHEMA,
|
1830
|
-
|
1831
|
-
|
1844
|
+
ts as JwtAuthHeaderBuilderMiddleware,
|
1845
|
+
lo as LANGUAGE_ISO_SCHEMA,
|
1832
1846
|
Xt as LANGUAGE_SCHEMA,
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1847
|
+
uo as LANGUAGE_STATISTICS_SCHEMA,
|
1848
|
+
Po as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1849
|
+
Ao as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1850
|
+
mo as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1851
|
+
_o as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1838
1852
|
oe as NavigationPanel,
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1853
|
+
es as NavigationTabs,
|
1854
|
+
ue as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1855
|
+
So as PROJECT_QA_ISSUES_SCHEMA,
|
1856
|
+
de as PROJECT_SCHEMA,
|
1857
|
+
Eo as PROJECT_SETTINGS_SCHEMA,
|
1858
|
+
Co as PROJECT_STATISTICS_SCHEMA,
|
1845
1859
|
Fe as PROJECT_TYPE_SCHEMA,
|
1846
1860
|
lr as PRO_PLAN_IDS,
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1861
|
+
ns as PublicApiHeaderBuilderMiddleware,
|
1862
|
+
no as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1863
|
+
ro as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1864
|
+
Ro as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1851
1865
|
ir as START_PLAN_IDS,
|
1852
|
-
|
1866
|
+
R as Sidebar,
|
1853
1867
|
A as SidebarTaskLanguageStatuses,
|
1854
1868
|
xe as SidebarTaskStatuses,
|
1855
1869
|
re as SidebarTaskTypeOptions,
|
@@ -1859,57 +1873,57 @@ export {
|
|
1859
1873
|
Wa as TEAM_USER_RESPONSE_SCHEMA,
|
1860
1874
|
za as TEAM_USER_SCHEMA,
|
1861
1875
|
sr as TRIAL_PLAN_ID,
|
1862
|
-
|
1863
|
-
|
1876
|
+
ko as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1877
|
+
Io as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1864
1878
|
$a as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1865
1879
|
se as UnauthorizedError,
|
1866
|
-
|
1867
|
-
|
1880
|
+
us as addLanguagesToProject,
|
1881
|
+
yo as bulkUpdateProjectLanguages,
|
1868
1882
|
_r as convertNewLineToBreakTag,
|
1869
1883
|
zt as createHeaderBuilderMiddleware,
|
1870
|
-
|
1884
|
+
jo as createProject,
|
1871
1885
|
hr as formatDate,
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1886
|
+
Vo as formatDateTz,
|
1887
|
+
as as generateTokenFromClassicSession,
|
1888
|
+
rs as getAuthenticatedSessionDetailFromRequest,
|
1875
1889
|
Ma as getCsrfTokenFromCookie,
|
1876
1890
|
Wt as getJwtTokenFromCookie,
|
1877
1891
|
Qa as getTeamUser,
|
1878
1892
|
Ya as getTeamUsersQueryKey,
|
1879
1893
|
Ge as getUserToken,
|
1880
1894
|
Ga as getUserTokenKey,
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1895
|
+
Xo as isEnterpriseOpenSourcePlan,
|
1896
|
+
Qo as isEnterprisePlan,
|
1897
|
+
Jo as isEssentialPlan,
|
1884
1898
|
De as isFreePlan,
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1899
|
+
Yo as isPaidPlan,
|
1900
|
+
Wo as isProPlan,
|
1901
|
+
zo as isStartPlan,
|
1888
1902
|
Dt as isTrialPlan,
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1903
|
+
vo as listProjectLanguages,
|
1904
|
+
ms as listProjectLanguagesKey,
|
1905
|
+
No as listProjects,
|
1906
|
+
gs as listProjectsKey,
|
1893
1907
|
fr as makeUrlClickable,
|
1894
1908
|
Z as parseJwtTokenPayload,
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1909
|
+
os as refreshExpiredToken,
|
1910
|
+
so as retrieveContributor,
|
1911
|
+
io as retrieveContributorKeys,
|
1912
|
+
Oo as retrieveProject,
|
1913
|
+
fs as retrieveProjectQueryKey,
|
1914
|
+
xo as updateProject,
|
1915
|
+
ls as useAuthenticatedProjectContributor,
|
1902
1916
|
Yt as useAuthenticatedSessionPayload,
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1917
|
+
is as useAuthenticatedUser,
|
1918
|
+
Ts as useBulkUpdateProjectLanguagesMutation,
|
1919
|
+
ds as useCreateProjectMutation,
|
1906
1920
|
$e as useEffectOnce,
|
1907
|
-
|
1921
|
+
ss as useGetPromotedClassicSessionJwtQuery,
|
1908
1922
|
Xa as useGetTeamUsersQuery,
|
1909
1923
|
Fa as useGetUserTokenQuery,
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1914
|
-
|
1924
|
+
_s as useListProjectLanguagesQuery,
|
1925
|
+
ps as useListProjectsQuery,
|
1926
|
+
co as useRetrieveContributorQuery,
|
1927
|
+
hs as useRetrieveProjectQuery,
|
1928
|
+
bs as useUpdateProjectMutation
|
1915
1929
|
};
|