@lokalise/harmony 1.25.0 → 1.26.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 +369 -365
- package/dist/types/src/features/auth/frontend/hooks/useAuthenticatedProjectContributor.d.ts +1 -1
- package/dist/types/src/features/publicApi/contributors.d.ts +28 -16
- package/dist/types/src/features/publicApi/hooks/useListContributorsQuery.d.ts +3 -1
- package/dist/types/src/features/publicApi/hooks/useListPermissionTemplates.d.ts +29 -0
- package/dist/types/src/features/publicApi/hooks/useRetrieveContributorQuery.d.ts +1 -1
- package/dist/types/src/features/publicApi/permissionTemplates.d.ts +112 -0
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +34 -24
- package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +86 -0
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
var rn = Object.defineProperty;
|
2
2
|
var sn = (e, t, r) => t in e ? rn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
3
|
var re = (e, t, r) => sn(e, typeof t != "symbol" ? t + "" : t, r);
|
4
|
-
import { jsx as
|
4
|
+
import { jsx as a, jsxs as p, Fragment as He } from "react/jsx-runtime";
|
5
5
|
import * as J from "react";
|
6
|
-
import { useRef as Ct, useState as k, useCallback as Qe, useEffect as W, useContext as Pt, createContext as At, cloneElement as
|
6
|
+
import { useRef as Ct, useState as k, useCallback as Qe, useEffect as W, useContext as Pt, createContext as At, cloneElement as on, Fragment as Rt, forwardRef as an } from "react";
|
7
7
|
import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as cn, UserIcon as wt, MenuItem as Y, MenuDivider as It, ConfirmModal as ln, Alert as un, Tag as Oe, Button as xe, Loading as dn, Popover as mn, JobIcon as _n } from "@lokalise/louis";
|
8
8
|
import { format as kt, parseISO as gn, isThisSecond as hn } from "date-fns";
|
9
9
|
import { toZonedTime as pn } from "date-fns-tz";
|
@@ -25,7 +25,7 @@ const Le = {
|
|
25
25
|
lqa_by_ai: "lqa_by_ai",
|
26
26
|
automatic_translation: "automatic_translation"
|
27
27
|
};
|
28
|
-
var
|
28
|
+
var oe = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
29
29
|
function jt(e) {
|
30
30
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
31
31
|
}
|
@@ -43,7 +43,7 @@ var pe, Ye;
|
|
43
43
|
function fn() {
|
44
44
|
if (Ye) return pe;
|
45
45
|
Ye = 1;
|
46
|
-
var e = typeof
|
46
|
+
var e = typeof oe == "object" && oe && oe.Object === Object && oe;
|
47
47
|
return pe = e, pe;
|
48
48
|
}
|
49
49
|
var fe, Xe;
|
@@ -95,16 +95,16 @@ var Ee, nt;
|
|
95
95
|
function Sn() {
|
96
96
|
if (nt) return Ee;
|
97
97
|
nt = 1;
|
98
|
-
var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, s = t.toString,
|
98
|
+
var e = Ot(), t = Object.prototype, r = t.hasOwnProperty, s = t.toString, o = e ? e.toStringTag : void 0;
|
99
99
|
function i(c) {
|
100
|
-
var u = r.call(c,
|
100
|
+
var u = r.call(c, o), d = c[o];
|
101
101
|
try {
|
102
|
-
c[
|
102
|
+
c[o] = void 0;
|
103
103
|
var l = !0;
|
104
104
|
} catch {
|
105
105
|
}
|
106
106
|
var m = s.call(c);
|
107
|
-
return l && (u ? c[
|
107
|
+
return l && (u ? c[o] = d : delete c[o]), m;
|
108
108
|
}
|
109
109
|
return Ee = i, Ee;
|
110
110
|
}
|
@@ -122,28 +122,28 @@ var Ce, st;
|
|
122
122
|
function yn() {
|
123
123
|
if (st) return Ce;
|
124
124
|
st = 1;
|
125
|
-
var e = Ot(), t = Sn(), r = En(), s = "[object Null]",
|
125
|
+
var e = Ot(), t = Sn(), r = En(), s = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
126
126
|
function c(u) {
|
127
|
-
return u == null ? u === void 0 ?
|
127
|
+
return u == null ? u === void 0 ? o : s : i && i in Object(u) ? t(u) : r(u);
|
128
128
|
}
|
129
129
|
return Ce = c, Ce;
|
130
130
|
}
|
131
|
-
var Pe,
|
131
|
+
var Pe, ot;
|
132
132
|
function Cn() {
|
133
|
-
if (
|
134
|
-
|
133
|
+
if (ot) return Pe;
|
134
|
+
ot = 1;
|
135
135
|
function e(t) {
|
136
136
|
return t != null && typeof t == "object";
|
137
137
|
}
|
138
138
|
return Pe = e, Pe;
|
139
139
|
}
|
140
|
-
var Ae,
|
140
|
+
var Ae, at;
|
141
141
|
function Pn() {
|
142
|
-
if (
|
143
|
-
|
142
|
+
if (at) return Ae;
|
143
|
+
at = 1;
|
144
144
|
var e = yn(), t = Cn(), r = "[object Symbol]";
|
145
|
-
function s(
|
146
|
-
return typeof
|
145
|
+
function s(o) {
|
146
|
+
return typeof o == "symbol" || t(o) && e(o) == r;
|
147
147
|
}
|
148
148
|
return Ae = s, Ae;
|
149
149
|
}
|
@@ -151,7 +151,7 @@ var Re, it;
|
|
151
151
|
function An() {
|
152
152
|
if (it) return Re;
|
153
153
|
it = 1;
|
154
|
-
var e = vn(), t = qe(), r = Pn(), s = NaN,
|
154
|
+
var e = vn(), t = qe(), r = Pn(), s = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
155
155
|
function d(l) {
|
156
156
|
if (typeof l == "number")
|
157
157
|
return l;
|
@@ -165,7 +165,7 @@ function An() {
|
|
165
165
|
return l === 0 ? l : +l;
|
166
166
|
l = e(l);
|
167
167
|
var g = i.test(l);
|
168
|
-
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) :
|
168
|
+
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? s : +l;
|
169
169
|
}
|
170
170
|
return Re = d, Re;
|
171
171
|
}
|
@@ -173,12 +173,12 @@ var we, ct;
|
|
173
173
|
function xt() {
|
174
174
|
if (ct) return we;
|
175
175
|
ct = 1;
|
176
|
-
var e = qe(), t = bn(), r = An(), s = "Expected a function",
|
176
|
+
var e = qe(), t = bn(), r = An(), s = "Expected a function", o = Math.max, i = Math.min;
|
177
177
|
function c(u, d, l) {
|
178
178
|
var m, g, v, S, _, y, b = 0, h = !1, f = !1, T = !0;
|
179
179
|
if (typeof u != "function")
|
180
180
|
throw new TypeError(s);
|
181
|
-
d = r(d) || 0, e(l) && (h = !!l.leading, f = "maxWait" in l, v = f ?
|
181
|
+
d = r(d) || 0, e(l) && (h = !!l.leading, f = "maxWait" in l, v = f ? o(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
|
182
182
|
function P(E) {
|
183
183
|
var O = m, K = g;
|
184
184
|
return m = g = void 0, b = E, S = u.apply(K, O), S;
|
@@ -230,11 +230,11 @@ function In() {
|
|
230
230
|
if (lt) return Ie;
|
231
231
|
lt = 1;
|
232
232
|
var e = xt(), t = qe(), r = "Expected a function";
|
233
|
-
function s(
|
233
|
+
function s(o, i, c) {
|
234
234
|
var u = !0, d = !0;
|
235
|
-
if (typeof
|
235
|
+
if (typeof o != "function")
|
236
236
|
throw new TypeError(r);
|
237
|
-
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(
|
237
|
+
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, i, {
|
238
238
|
leading: u,
|
239
239
|
maxWait: i,
|
240
240
|
trailing: d
|
@@ -269,14 +269,14 @@ const jn = /* @__PURE__ */ jt(kn), Nn = (e, t, r, s) => {
|
|
269
269
|
const [t, r] = J.useState((e == null ? void 0 : e.current) || null);
|
270
270
|
return e && setTimeout(() => {
|
271
271
|
e.current !== t && r(e.current);
|
272
|
-
}, 0), { refProxy: J.useMemo(() => new Proxy((
|
273
|
-
|
272
|
+
}, 0), { refProxy: J.useMemo(() => new Proxy((o) => {
|
273
|
+
o !== t && r(o);
|
274
274
|
}, {
|
275
|
-
get(
|
276
|
-
return i === "current" ? t :
|
275
|
+
get(o, i) {
|
276
|
+
return i === "current" ? t : o[i];
|
277
277
|
},
|
278
|
-
set(
|
279
|
-
return i === "current" ? r(c) :
|
278
|
+
set(o, i, c) {
|
279
|
+
return i === "current" ? r(c) : o[i] = c, !0;
|
280
280
|
}
|
281
281
|
}), [t]), refElement: t, setRefElement: r };
|
282
282
|
}
|
@@ -290,18 +290,18 @@ const jn = /* @__PURE__ */ jt(kn), Nn = (e, t, r, s) => {
|
|
290
290
|
width: e.contentRect.width,
|
291
291
|
height: e.contentRect.height
|
292
292
|
};
|
293
|
-
function Mn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refreshOptions: s, handleWidth:
|
293
|
+
function Mn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refreshOptions: s, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
294
294
|
const l = Ct(e), m = On(d), [g, v] = k({
|
295
295
|
width: void 0,
|
296
296
|
height: void 0
|
297
297
|
}), { refProxy: S, refElement: _ } = xn(c), { box: y } = u || {}, b = Qe((f) => {
|
298
|
-
if (!
|
298
|
+
if (!o && !i)
|
299
299
|
return;
|
300
300
|
if (l.current) {
|
301
301
|
l.current = !1;
|
302
302
|
return;
|
303
303
|
}
|
304
|
-
const T = (P, C) =>
|
304
|
+
const T = (P, C) => o && P.width !== C.width || i && P.height !== C.height;
|
305
305
|
f.forEach((P) => {
|
306
306
|
const C = Ln(P, y);
|
307
307
|
v((te) => T(te, C) ? (m == null || m({
|
@@ -310,7 +310,7 @@ function Mn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refresh
|
|
310
310
|
entry: P
|
311
311
|
}), C) : te);
|
312
312
|
});
|
313
|
-
}, [
|
313
|
+
}, [o, i, l, y]), h = Qe(Nn(b, t, r, s), [
|
314
314
|
b,
|
315
315
|
t,
|
316
316
|
r,
|
@@ -332,13 +332,13 @@ function Lt(e) {
|
|
332
332
|
var t, r, s = "";
|
333
333
|
if (typeof e == "string" || typeof e == "number") s += e;
|
334
334
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
335
|
-
var
|
336
|
-
for (t = 0; t <
|
335
|
+
var o = e.length;
|
336
|
+
for (t = 0; t < o; t++) e[t] && (r = Lt(e[t])) && (s && (s += " "), s += r);
|
337
337
|
} else for (r in e) e[r] && (s && (s += " "), s += r);
|
338
338
|
return s;
|
339
339
|
}
|
340
340
|
function j() {
|
341
|
-
for (var e, t, r = 0, s = "",
|
341
|
+
for (var e, t, r = 0, s = "", o = arguments.length; r < o; r++) (e = arguments[r]) && (t = Lt(e)) && (s && (s += " "), s += t);
|
342
342
|
return s;
|
343
343
|
}
|
344
344
|
const Un = "_headerContainer_1cubo_1", Hn = "_navigationTabList_1cubo_8", Bn = "_navigationTab_1cubo_8", qn = "_headerContent_1cubo_34", Dn = "_staticEnabled_1cubo_50", q = {
|
@@ -347,11 +347,11 @@ const Un = "_headerContainer_1cubo_1", Hn = "_navigationTabList_1cubo_8", Bn = "
|
|
347
347
|
navigationTab: Bn,
|
348
348
|
headerContent: qn,
|
349
349
|
staticEnabled: Dn
|
350
|
-
}, $n = 77,
|
350
|
+
}, $n = 77, ae = ({ sticky: e, children: t }) => {
|
351
351
|
const { ref: r, height: s } = Mn({
|
352
352
|
refreshMode: "debounce",
|
353
353
|
refreshRate: 0
|
354
|
-
}), [
|
354
|
+
}), [o, i] = k(!1), c = () => o ? !e : !0;
|
355
355
|
W(() => {
|
356
356
|
const d = () => {
|
357
357
|
i(window.scrollY > 0);
|
@@ -359,7 +359,7 @@ const Un = "_headerContainer_1cubo_1", Hn = "_navigationTabList_1cubo_8", Bn = "
|
|
359
359
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
360
360
|
}, []);
|
361
361
|
const u = `${s || $n}px`;
|
362
|
-
return /* @__PURE__ */
|
362
|
+
return /* @__PURE__ */ a("div", { style: { minHeight: u }, children: /* @__PURE__ */ a("div", { children: /* @__PURE__ */ p(
|
363
363
|
"div",
|
364
364
|
{
|
365
365
|
ref: r,
|
@@ -367,15 +367,15 @@ const Un = "_headerContainer_1cubo_1", Hn = "_navigationTabList_1cubo_8", Bn = "
|
|
367
367
|
[q.staticEnabled]: c()
|
368
368
|
}),
|
369
369
|
children: [
|
370
|
-
/* @__PURE__ */
|
371
|
-
/* @__PURE__ */
|
370
|
+
/* @__PURE__ */ a(ae.Header, {}),
|
371
|
+
/* @__PURE__ */ a(ae.Tabs, {}),
|
372
372
|
t
|
373
373
|
]
|
374
374
|
}
|
375
375
|
) }) });
|
376
376
|
};
|
377
|
-
|
378
|
-
|
377
|
+
ae.Header = ({ children: e }) => /* @__PURE__ */ a("div", { className: q.headerContainer, children: e });
|
378
|
+
ae.Tabs = ({ children: e }) => /* @__PURE__ */ a("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
379
379
|
const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
380
380
|
sidebarContainer: Gn
|
381
381
|
}, Kn = "_logoLink_1baxb_1", zn = {
|
@@ -385,10 +385,10 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
385
385
|
href: t = "/",
|
386
386
|
ariaLabel: r = "Lokalise App Home",
|
387
387
|
alt: s = "Lokalise Logo"
|
388
|
-
}) => /* @__PURE__ */
|
388
|
+
}) => /* @__PURE__ */ a("a", { className: zn.logoLink, href: t, "aria-label": r, children: /* @__PURE__ */ a("img", { src: e, alt: s }) }), Qn = "_link_18vhx_1", Wn = "_active_18vhx_18", ut = {
|
389
389
|
link: Qn,
|
390
390
|
active: Wn
|
391
|
-
}, Yn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */
|
391
|
+
}, Yn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */ a(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ a(
|
392
392
|
U,
|
393
393
|
{
|
394
394
|
"aria-label": e,
|
@@ -396,29 +396,29 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
396
396
|
[ut.active]: window.location.pathname.startsWith(t)
|
397
397
|
}),
|
398
398
|
href: t,
|
399
|
-
children: /* @__PURE__ */
|
399
|
+
children: /* @__PURE__ */ a(r, { size: "25px" })
|
400
400
|
}
|
401
401
|
) }), Xn = "_dropdownButton_13l5r_1", Vn = "_dropdownButtonActive_13l5r_18", dt = {
|
402
402
|
dropdownButton: Xn,
|
403
403
|
dropdownButtonActive: Vn
|
404
|
-
}, Zn = ({ children: e, icon: t }) => /* @__PURE__ */
|
404
|
+
}, Zn = ({ children: e, icon: t }) => /* @__PURE__ */ a(
|
405
405
|
le,
|
406
406
|
{
|
407
|
-
menuButton: ({ opened: r }) => /* @__PURE__ */
|
407
|
+
menuButton: ({ opened: r }) => /* @__PURE__ */ a(D, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ a(
|
408
408
|
"button",
|
409
409
|
{
|
410
410
|
type: "button",
|
411
411
|
className: j(dt.dropdownButton, {
|
412
412
|
[dt.dropdownButtonActive]: r
|
413
413
|
}),
|
414
|
-
children: /* @__PURE__ */
|
414
|
+
children: /* @__PURE__ */ a(t, { size: "25px" })
|
415
415
|
}
|
416
416
|
) }),
|
417
|
-
children: /* @__PURE__ */
|
417
|
+
children: /* @__PURE__ */ a(ue, { placement: "right-start", children: e })
|
418
418
|
}
|
419
419
|
), er = "_iconContainer_nz34m_1", tr = {
|
420
420
|
iconContainer: er
|
421
|
-
}, Mt = ({ className: e = "" }) => /* @__PURE__ */
|
421
|
+
}, Mt = ({ className: e = "" }) => /* @__PURE__ */ a(
|
422
422
|
"div",
|
423
423
|
{
|
424
424
|
"aria-label": "Upgrade Icon",
|
@@ -429,21 +429,21 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
429
429
|
"justify-center",
|
430
430
|
e
|
431
431
|
),
|
432
|
-
children: /* @__PURE__ */
|
432
|
+
children: /* @__PURE__ */ a(cn, {})
|
433
433
|
}
|
434
|
-
), nr = "_menuContainer_1phdw_10", rr = "_profileButton_1phdw_20", sr = "_profileImage_1phdw_33",
|
434
|
+
), nr = "_menuContainer_1phdw_10", rr = "_profileButton_1phdw_20", sr = "_profileImage_1phdw_33", or = "_profileImageHighlight_1phdw_41", ar = "_profileImageUpgradeIcon_1phdw_45", ir = "_userIconWrapper_1phdw_51", L = {
|
435
435
|
menuContainer: nr,
|
436
436
|
profileButton: rr,
|
437
437
|
profileImage: sr,
|
438
|
-
profileImageHighlight:
|
439
|
-
profileImageUpgradeIcon:
|
438
|
+
profileImageHighlight: or,
|
439
|
+
profileImageUpgradeIcon: ar,
|
440
440
|
userIconWrapper: ir
|
441
441
|
}, Ut = At({}), V = () => Pt(Ut), cr = ({ children: e }) => {
|
442
442
|
const {
|
443
443
|
currentTeam: t,
|
444
444
|
otherTeams: r,
|
445
445
|
showUpgradeCta: s,
|
446
|
-
showBillingButton:
|
446
|
+
showBillingButton: o,
|
447
447
|
allowTeamCreation: i,
|
448
448
|
isProviderAlpha: c,
|
449
449
|
canAccessTeamSettings: u,
|
@@ -451,11 +451,11 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
451
451
|
isTeamSuspended: l,
|
452
452
|
isFullyAuthenticated: m
|
453
453
|
} = V();
|
454
|
-
return /* @__PURE__ */
|
454
|
+
return /* @__PURE__ */ a(
|
455
455
|
le,
|
456
456
|
{
|
457
457
|
menuButton: () => /* @__PURE__ */ p("button", { className: L.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
458
|
-
t != null && t.logoUrl ? /* @__PURE__ */
|
458
|
+
t != null && t.logoUrl ? /* @__PURE__ */ a(
|
459
459
|
"img",
|
460
460
|
{
|
461
461
|
src: t.logoUrl,
|
@@ -464,41 +464,41 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
464
464
|
}),
|
465
465
|
alt: "Team Logo"
|
466
466
|
}
|
467
|
-
) : /* @__PURE__ */
|
467
|
+
) : /* @__PURE__ */ a(
|
468
468
|
"div",
|
469
469
|
{
|
470
470
|
className: j(L.userIconWrapper, "flex-row", "align-center", "items-center", {
|
471
471
|
[L.profileImageHighlight]: s
|
472
472
|
}),
|
473
|
-
children: /* @__PURE__ */
|
473
|
+
children: /* @__PURE__ */ a(wt, { size: "25px" })
|
474
474
|
}
|
475
475
|
),
|
476
|
-
s && /* @__PURE__ */
|
476
|
+
s && /* @__PURE__ */ a(Mt, { className: L.profileImageUpgradeIcon })
|
477
477
|
] }),
|
478
|
-
children: /* @__PURE__ */
|
478
|
+
children: /* @__PURE__ */ a(ue, { placement: "right-end", className: L.menuContainer, children: e({
|
479
479
|
allowTeamCreation: i,
|
480
480
|
otherTeams: r,
|
481
481
|
canAccessTeamSettings: u,
|
482
482
|
isEndOfTrialActive: d,
|
483
483
|
isTeamSuspended: l,
|
484
|
-
showBillingButton:
|
484
|
+
showBillingButton: o,
|
485
485
|
isProviderAlpha: c,
|
486
486
|
isFullyAuthenticated: m
|
487
487
|
}) })
|
488
488
|
}
|
489
489
|
);
|
490
|
-
}, Ht = 0, lr = 9999, ur = [150, 151, 250, 251], dr = [152, 153, 252, 253], mr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], _r = [156, 159, 160, 256, 259, 260], Bt = 9998, De = (e) => e === Ht, qt = (e) => e === lr,
|
490
|
+
}, Ht = 0, lr = 9999, ur = [150, 151, 250, 251], dr = [152, 153, 252, 253], mr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], _r = [156, 159, 160, 256, 259, 260], Bt = 9998, De = (e) => e === Ht, qt = (e) => e === lr, ea = (e) => ur.includes(e), ta = (e) => dr.includes(e), na = (e) => mr.includes(e), ra = (e) => _r.includes(e), sa = (e) => e > Ht && e < Bt, oa = (e) => e === Bt, gr = /\n/, mt = (e, t, r) => e.split(t).flatMap((s, o) => o !== 0 ? [on(r, { key: Math.random().toString(32).slice(0, 10) }), s] : s), hr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((s) => typeof s == "string" ? mt(s, t, r) : s), pr = (e) => hr(e, gr, /* @__PURE__ */ a("br", {})), fr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, br = (e) => e.match(fr) ?? [], _t = (e, t, r) => {
|
491
491
|
const s = e.split(t);
|
492
492
|
if (s.length === 1)
|
493
493
|
return e;
|
494
|
-
const
|
495
|
-
return s[0] !== "" &&
|
496
|
-
/* @__PURE__ */
|
497
|
-
),
|
494
|
+
const o = [];
|
495
|
+
return s[0] !== "" && o.push(s[0]), s.shift(), s[s.length - 1] === "" && s.pop(), o.push(
|
496
|
+
/* @__PURE__ */ a("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + r)
|
497
|
+
), o.push(s.join(t)), o.filter((i) => i !== "");
|
498
498
|
}, gt = (e) => {
|
499
499
|
const t = br(e);
|
500
|
-
return t != null && t.length ? t.reduce((r, s,
|
501
|
-
}, Tr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), vr = (e, t = "PP") => kt(e, t),
|
500
|
+
return t != null && t.length ? t.reduce((r, s, o) => typeof r == "string" ? _t(r, s, o) : r.flatMap((i) => typeof i == "string" ? _t(i, s, o) : i), e) : e;
|
501
|
+
}, Tr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), vr = (e, t = "PP") => kt(e, t), aa = (e, t, r = "PP") => kt(pn(e, t), r), $e = (e) => {
|
502
502
|
W(e, []);
|
503
503
|
}, ht = {
|
504
504
|
biller: "biller",
|
@@ -507,7 +507,7 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
507
507
|
ht.biller,
|
508
508
|
ht.owner
|
509
509
|
], Sr = ({ children: e, config: t }) => {
|
510
|
-
const { teams: r, currentTeamId: s, planId:
|
510
|
+
const { teams: r, currentTeamId: s, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((h) => h.id === s), l = r.filter((h) => h.id !== s), m = pt.includes(u), g = pt.includes(u), v = De(o) || qt(o), b = {
|
511
511
|
...t,
|
512
512
|
currentTeam: d,
|
513
513
|
otherTeams: l,
|
@@ -518,8 +518,8 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
518
518
|
showBillingButton: c && g && m,
|
519
519
|
allowTeamCreation: c && !i
|
520
520
|
};
|
521
|
-
return /* @__PURE__ */
|
522
|
-
}, Er = ({ config: e, children: t }) => /* @__PURE__ */
|
521
|
+
return /* @__PURE__ */ a(Ut.Provider, { value: b, children: e });
|
522
|
+
}, Er = ({ config: e, children: t }) => /* @__PURE__ */ a(Sr, { config: e, children: /* @__PURE__ */ a(cr, { children: t }) }), yr = "_container_q5pot_1", Cr = "_profileEmail_q5pot_5", ft = {
|
523
523
|
container: yr,
|
524
524
|
profileEmail: Cr
|
525
525
|
}, Pr = ({
|
@@ -528,9 +528,9 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
528
528
|
userEmail: r,
|
529
529
|
hideBottomDivider: s
|
530
530
|
}) => {
|
531
|
-
const { isEndOfTrialActive:
|
532
|
-
return
|
533
|
-
/* @__PURE__ */
|
531
|
+
const { isEndOfTrialActive: o, isTeamSuspended: i } = V();
|
532
|
+
return o || i ? null : /* @__PURE__ */ p(He, { children: [
|
533
|
+
/* @__PURE__ */ a(
|
534
534
|
Y,
|
535
535
|
{
|
536
536
|
href: e,
|
@@ -538,12 +538,12 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
538
538
|
t == null || t();
|
539
539
|
},
|
540
540
|
children: /* @__PURE__ */ p("div", { className: `flex-col ${ft.container}`, children: [
|
541
|
-
/* @__PURE__ */
|
542
|
-
/* @__PURE__ */
|
541
|
+
/* @__PURE__ */ a("span", { children: "Profile Settings" }),
|
542
|
+
/* @__PURE__ */ a("span", { className: ft.profileEmail, children: r })
|
543
543
|
] })
|
544
544
|
}
|
545
545
|
),
|
546
|
-
!s && /* @__PURE__ */
|
546
|
+
!s && /* @__PURE__ */ a(It, {})
|
547
547
|
] });
|
548
548
|
}, Ar = "_wrapper_1in7x_5", Rr = "_profileImage_1in7x_11", wr = "_teamDetails_1in7x_19", Ir = "_planWrapper_1in7x_28", kr = "_teamName_1in7x_36", jr = "_membership_1in7x_53", Nr = "_defaultProfileImage_1in7x_59", x = {
|
549
549
|
wrapper: Ar,
|
@@ -554,23 +554,23 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
554
554
|
membership: jr,
|
555
555
|
defaultProfileImage: Nr
|
556
556
|
}, Dt = ({ team: e, onClick: t, hidePlanLabel: r }) => {
|
557
|
-
const { currentTeam: s, planId:
|
557
|
+
const { currentTeam: s, planId: o } = V(), i = e || s;
|
558
558
|
if (!i)
|
559
559
|
return null;
|
560
|
-
const c = De(
|
560
|
+
const c = De(o) ? "Free" : qt(o) ? "Trial" : void 0;
|
561
561
|
return /* @__PURE__ */ p(
|
562
562
|
t ? Y : "div",
|
563
563
|
{
|
564
564
|
className: x.wrapper,
|
565
565
|
...t && { onClick: () => t(i) },
|
566
566
|
children: [
|
567
|
-
i.logoUrl ? /* @__PURE__ */
|
567
|
+
i.logoUrl ? /* @__PURE__ */ a("img", { className: x.profileImage, src: i.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ a("span", { className: `${x.defaultProfileImage}`, children: /* @__PURE__ */ a(wt, { size: "25px" }) }),
|
568
568
|
/* @__PURE__ */ p("div", { className: x.teamDetails, children: [
|
569
569
|
/* @__PURE__ */ p("div", { className: x.planWrapper, children: [
|
570
|
-
/* @__PURE__ */
|
571
|
-
c && !r && /* @__PURE__ */
|
570
|
+
/* @__PURE__ */ a("span", { title: i.name, className: x.teamName, children: i.name }),
|
571
|
+
c && !r && /* @__PURE__ */ a("span", { className: x.teamName, children: c })
|
572
572
|
] }),
|
573
|
-
/* @__PURE__ */
|
573
|
+
/* @__PURE__ */ a("span", { className: x.membership, children: i.role })
|
574
574
|
] })
|
575
575
|
]
|
576
576
|
}
|
@@ -579,12 +579,12 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
579
579
|
teamsContainer: Or
|
580
580
|
}, Lr = ({ onSwitchTeam: e }) => {
|
581
581
|
const { otherTeams: t } = V();
|
582
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
582
|
+
return t.length === 0 ? null : /* @__PURE__ */ a(
|
583
583
|
"div",
|
584
584
|
{
|
585
585
|
"data-testid": "sidebar-team-switch",
|
586
586
|
className: `flex-col items-stretch ${xr.teamsContainer}`,
|
587
|
-
children: t.map((r) => /* @__PURE__ */
|
587
|
+
children: t.map((r) => /* @__PURE__ */ a(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
|
588
588
|
}
|
589
589
|
);
|
590
590
|
}, Mr = "_container_1u995_1", Ur = "_planCta_1u995_15", Hr = "_upgradeIconWrapper_1u995_19", ke = {
|
@@ -603,10 +603,10 @@ const Gn = "_sidebarContainer_bmdti_1", Fn = {
|
|
603
603
|
href: e,
|
604
604
|
className: `flex-col gap-1 items-start ${ke.container}`,
|
605
605
|
children: [
|
606
|
-
/* @__PURE__ */
|
606
|
+
/* @__PURE__ */ a("span", { className: ke.planCta, children: c }),
|
607
607
|
/* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${ke.upgradeIconWrapper}`, children: [
|
608
|
-
/* @__PURE__ */
|
609
|
-
/* @__PURE__ */
|
608
|
+
/* @__PURE__ */ a(Mt, {}),
|
609
|
+
/* @__PURE__ */ a("span", { children: "See upgrade options" })
|
610
610
|
] })
|
611
611
|
]
|
612
612
|
}
|
@@ -649,15 +649,15 @@ function Tt(e) {
|
|
649
649
|
x: t,
|
650
650
|
y: r,
|
651
651
|
width: s,
|
652
|
-
height:
|
652
|
+
height: o
|
653
653
|
} = e;
|
654
654
|
return {
|
655
655
|
width: s,
|
656
|
-
height:
|
656
|
+
height: o,
|
657
657
|
top: r,
|
658
658
|
left: t,
|
659
659
|
right: t + s,
|
660
|
-
bottom: r +
|
660
|
+
bottom: r + o,
|
661
661
|
x: t,
|
662
662
|
y: r
|
663
663
|
};
|
@@ -667,7 +667,7 @@ async function zr(e, t) {
|
|
667
667
|
t === void 0 && (t = {});
|
668
668
|
const {
|
669
669
|
x: s,
|
670
|
-
y:
|
670
|
+
y: o,
|
671
671
|
platform: i,
|
672
672
|
rects: c,
|
673
673
|
elements: u,
|
@@ -685,7 +685,7 @@ async function zr(e, t) {
|
|
685
685
|
strategy: d
|
686
686
|
})), f = g === "floating" ? {
|
687
687
|
x: s,
|
688
|
-
y:
|
688
|
+
y: o,
|
689
689
|
width: c.floating.width,
|
690
690
|
height: c.floating.height
|
691
691
|
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), P = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
|
@@ -715,7 +715,7 @@ const Jr = function(e) {
|
|
715
715
|
const {
|
716
716
|
x: r,
|
717
717
|
y: s,
|
718
|
-
placement:
|
718
|
+
placement: o
|
719
719
|
} = t, {
|
720
720
|
mainAxis: i = !0,
|
721
721
|
crossAxis: c = !1,
|
@@ -735,7 +735,7 @@ const Jr = function(e) {
|
|
735
735
|
} = $t(e, t), l = {
|
736
736
|
x: r,
|
737
737
|
y: s
|
738
|
-
}, m = await zr(t, d), g = Gr(Gt(
|
738
|
+
}, m = await zr(t, d), g = Gr(Gt(o)), v = $r(g);
|
739
739
|
let S = l[v], _ = l[g];
|
740
740
|
if (i) {
|
741
741
|
const b = v === "y" ? "top" : "left", h = v === "y" ? "bottom" : "right", f = S + m[b], T = S - m[h];
|
@@ -801,11 +801,11 @@ const Jr = function(e) {
|
|
801
801
|
];
|
802
802
|
return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Zr(r) })).sort((r, s) => r.status === R.InProgress && r.progress === 100 ? -1 : s.status === R.InProgress && s.progress === 100 ? 1 : r.status === s.status ? r.name < s.name ? 1 : -1 : t.indexOf(r.status) - t.indexOf(s.status));
|
803
803
|
}, vt = (e) => [Le.InProgress, Le.Created].includes(e), ns = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, rs = ({ task: e, language: t }) => {
|
804
|
-
const [r, s] = k(!1), [
|
804
|
+
const [r, s] = k(!1), [o, i] = k(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
|
805
805
|
i(!1);
|
806
806
|
};
|
807
807
|
return /* @__PURE__ */ p(He, { children: [
|
808
|
-
|
808
|
+
o && /* @__PURE__ */ a(
|
809
809
|
ln,
|
810
810
|
{
|
811
811
|
opened: !0,
|
@@ -819,12 +819,12 @@ const Jr = function(e) {
|
|
819
819
|
},
|
820
820
|
children: /* @__PURE__ */ p(un, { status: "info", children: [
|
821
821
|
"Make sure you are finished and ",
|
822
|
-
/* @__PURE__ */
|
822
|
+
/* @__PURE__ */ a("strong", { children: "mark it as done" }),
|
823
823
|
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
824
824
|
] })
|
825
825
|
}
|
826
826
|
),
|
827
|
-
/* @__PURE__ */
|
827
|
+
/* @__PURE__ */ a(
|
828
828
|
U,
|
829
829
|
{
|
830
830
|
disabled: r,
|
@@ -835,12 +835,12 @@ const Jr = function(e) {
|
|
835
835
|
}
|
836
836
|
)
|
837
837
|
] });
|
838
|
-
}, ss = "_langRowCompleted_vpgdi_1",
|
838
|
+
}, ss = "_langRowCompleted_vpgdi_1", os = "_langCellSecondary_vpgdi_15", as = "_langStatus_vpgdi_20", Ne = {
|
839
839
|
langRowCompleted: ss,
|
840
|
-
langCellSecondary:
|
841
|
-
langStatus:
|
840
|
+
langCellSecondary: os,
|
841
|
+
langStatus: as
|
842
842
|
}, is = ({ language: e, task: t }) => {
|
843
|
-
const { getProjectUrl: r, langNameOnClick: s, langProgressOnClick:
|
843
|
+
const { getProjectUrl: r, langNameOnClick: s, langProgressOnClick: o } = Z(), i = e.progress ?? 0, c = e.status === R.Completed, u = ns(t, e);
|
844
844
|
return /* @__PURE__ */ p(
|
845
845
|
"tr",
|
846
846
|
{
|
@@ -848,7 +848,7 @@ const Jr = function(e) {
|
|
848
848
|
[Ne.langRowCompleted]: u
|
849
849
|
}),
|
850
850
|
children: [
|
851
|
-
/* @__PURE__ */
|
851
|
+
/* @__PURE__ */ a("td", { children: /* @__PURE__ */ a(D, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ a(
|
852
852
|
U,
|
853
853
|
{
|
854
854
|
href: r({ task: t, language: e }),
|
@@ -858,12 +858,12 @@ const Jr = function(e) {
|
|
858
858
|
children: e.name
|
859
859
|
}
|
860
860
|
) }) }),
|
861
|
-
/* @__PURE__ */
|
861
|
+
/* @__PURE__ */ a("td", { className: Ne.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ a(D, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ a(
|
862
862
|
U,
|
863
863
|
{
|
864
864
|
href: r({ task: t, language: e, taskUncompleted: !0 }),
|
865
865
|
onClick: () => {
|
866
|
-
|
866
|
+
o == null || o({ task: t, language: e });
|
867
867
|
},
|
868
868
|
children: e.base_words_total - e.base_words_done
|
869
869
|
}
|
@@ -872,7 +872,7 @@ const Jr = function(e) {
|
|
872
872
|
i,
|
873
873
|
"%"
|
874
874
|
] }),
|
875
|
-
/* @__PURE__ */
|
875
|
+
/* @__PURE__ */ a("td", { children: u ? /* @__PURE__ */ a(rs, { task: t, language: e }) : /* @__PURE__ */ a(
|
876
876
|
"span",
|
877
877
|
{
|
878
878
|
className: `${Ne.langStatus} flex-row items-center justify-start`,
|
@@ -890,7 +890,7 @@ const Jr = function(e) {
|
|
890
890
|
languagesTable: ds,
|
891
891
|
metadata: ms
|
892
892
|
}, _s = ({ task: e }) => {
|
893
|
-
const { getProjectUrl: t, taskTitleOnClick: r } = Z(), s = ts(e.langs),
|
893
|
+
const { getProjectUrl: t, taskTitleOnClick: r } = Z(), s = ts(e.langs), o = (i) => {
|
894
894
|
window.open(
|
895
895
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
896
896
|
"_blank",
|
@@ -900,28 +900,28 @@ const Jr = function(e) {
|
|
900
900
|
return /* @__PURE__ */ p("div", { className: B.taskContainer, children: [
|
901
901
|
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-center", children: [
|
902
902
|
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
903
|
-
/* @__PURE__ */
|
903
|
+
/* @__PURE__ */ a(Oe, { color: es[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
904
904
|
e.due_date && /* @__PURE__ */ p(Oe, { color: "#EAB308", children: [
|
905
905
|
"DUE ",
|
906
906
|
vr(gn(e.due_date), "yyyy-MM-dd")
|
907
907
|
] })
|
908
908
|
] }),
|
909
|
-
e.style_guides.length > 0 && /* @__PURE__ */
|
909
|
+
e.style_guides.length > 0 && /* @__PURE__ */ a("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ a(
|
910
910
|
xe,
|
911
911
|
{
|
912
912
|
size: "sm",
|
913
913
|
variant: "secondary",
|
914
|
-
onClick: () =>
|
914
|
+
onClick: () => o(e.style_guides[0]),
|
915
915
|
children: "Download style guide"
|
916
916
|
}
|
917
|
-
) : /* @__PURE__ */
|
917
|
+
) : /* @__PURE__ */ a(
|
918
918
|
le,
|
919
919
|
{
|
920
|
-
menuButton: /* @__PURE__ */
|
921
|
-
children: /* @__PURE__ */
|
920
|
+
menuButton: /* @__PURE__ */ a(xe, { variant: "secondary", size: "sm", children: "Download style guide" }),
|
921
|
+
children: /* @__PURE__ */ a(ue, { children: e.style_guides.map((i) => /* @__PURE__ */ a(
|
922
922
|
Y,
|
923
923
|
{
|
924
|
-
onClick: () =>
|
924
|
+
onClick: () => o(i),
|
925
925
|
children: Xr(i.name).name
|
926
926
|
},
|
927
927
|
i.id
|
@@ -929,7 +929,7 @@ const Jr = function(e) {
|
|
929
929
|
}
|
930
930
|
) })
|
931
931
|
] }),
|
932
|
-
/* @__PURE__ */
|
932
|
+
/* @__PURE__ */ a("h4", { className: B.taskTitle, children: /* @__PURE__ */ a(
|
933
933
|
U,
|
934
934
|
{
|
935
935
|
href: t({ task: e, view: "multi" }),
|
@@ -939,26 +939,26 @@ const Jr = function(e) {
|
|
939
939
|
children: e.title
|
940
940
|
}
|
941
941
|
) }),
|
942
|
-
e.description && /* @__PURE__ */
|
942
|
+
e.description && /* @__PURE__ */ a("div", { className: B.taskDescription, children: pr(Tr(e.description)) }),
|
943
943
|
/* @__PURE__ */ p("table", { className: B.languagesTable, children: [
|
944
|
-
/* @__PURE__ */
|
945
|
-
/* @__PURE__ */
|
946
|
-
/* @__PURE__ */
|
947
|
-
/* @__PURE__ */
|
948
|
-
/* @__PURE__ */
|
944
|
+
/* @__PURE__ */ a("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
945
|
+
/* @__PURE__ */ a("th", { children: "Languages" }),
|
946
|
+
/* @__PURE__ */ a("th", { children: "Words to do" }),
|
947
|
+
/* @__PURE__ */ a("th", { children: "Progress" }),
|
948
|
+
/* @__PURE__ */ a("th", { children: "Status" })
|
949
949
|
] }) }),
|
950
|
-
/* @__PURE__ */
|
950
|
+
/* @__PURE__ */ a("tbody", { children: s.map((i) => /* @__PURE__ */ a(is, { language: i, task: e }, i.lang_id)) })
|
951
951
|
] }),
|
952
952
|
/* @__PURE__ */ p("div", { "data-testid": "sidebar-task-overview-metadata", className: B.metadata, children: [
|
953
953
|
/* @__PURE__ */ p("span", { children: [
|
954
954
|
"Source: ",
|
955
955
|
e.source_lang_name
|
956
956
|
] }),
|
957
|
-
/* @__PURE__ */
|
957
|
+
/* @__PURE__ */ a("span", { children: e.created_by_fullname }),
|
958
958
|
/* @__PURE__ */ p("span", { children: [
|
959
959
|
"In ",
|
960
960
|
e.project_name,
|
961
|
-
e.master_branching_enabled === "1" && /* @__PURE__ */
|
961
|
+
e.master_branching_enabled === "1" && /* @__PURE__ */ a("div", { className: B.tag, children: e.branch_name ? e.branch_name : "master" })
|
962
962
|
] })
|
963
963
|
] })
|
964
964
|
] });
|
@@ -980,16 +980,16 @@ const Jr = function(e) {
|
|
980
980
|
t == null || t({ tasks: i });
|
981
981
|
})(), document.addEventListener(A.TaskCompleted, s), document.addEventListener(A.TaskClosed, s), document.addEventListener(A.Refresh, s), () => {
|
982
982
|
document.removeEventListener(A.TaskCompleted, s), document.removeEventListener(A.TaskClosed, s), document.removeEventListener(A.Refresh, s);
|
983
|
-
})), r ? /* @__PURE__ */
|
984
|
-
/* @__PURE__ */
|
983
|
+
})), r ? /* @__PURE__ */ a("div", { "data-testid": "sidebar-tasks-loading-popover", className: z.loadingContainer, children: /* @__PURE__ */ a(dn, {}) }) : e.length === 0 ? /* @__PURE__ */ p("div", { "data-testid": "sidebar-no-tasks-popover", className: z.noTasksContainer, children: [
|
984
|
+
/* @__PURE__ */ a("h3", { className: z.noTasksHeading, children: "No tasks" }),
|
985
985
|
/* @__PURE__ */ p("div", { className: z.noTasksText, children: [
|
986
986
|
"Your incoming tasks will appear here.",
|
987
|
-
/* @__PURE__ */
|
988
|
-
/* @__PURE__ */
|
987
|
+
/* @__PURE__ */ a("br", {}),
|
988
|
+
/* @__PURE__ */ a(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
989
989
|
] })
|
990
|
-
] }) : /* @__PURE__ */
|
990
|
+
] }) : /* @__PURE__ */ a("div", { "data-testid": "sidebar-tasks-popover", className: z.tasksContainer, children: e.map((o) => /* @__PURE__ */ a(_s, { task: o }, o.id)) });
|
991
991
|
}, vs = ({ children: e, config: t }) => {
|
992
|
-
const [r, s] = k([]), [
|
992
|
+
const [r, s] = k([]), [o, i] = k(!0), [c, u] = k(0), {
|
993
993
|
getProjectUrl: d,
|
994
994
|
onLanguageCompleteConfirm: l,
|
995
995
|
onTasksWidgetOpen: m,
|
@@ -1011,7 +1011,7 @@ const Jr = function(e) {
|
|
1011
1011
|
fetchTasks: b,
|
1012
1012
|
tasks: r,
|
1013
1013
|
tasksCount: c,
|
1014
|
-
loadingTasks:
|
1014
|
+
loadingTasks: o,
|
1015
1015
|
getProjectUrl: d,
|
1016
1016
|
onLanguageCompleteConfirm: l,
|
1017
1017
|
onTasksWidgetOpen: m,
|
@@ -1019,10 +1019,10 @@ const Jr = function(e) {
|
|
1019
1019
|
langProgressOnClick: v,
|
1020
1020
|
taskTitleOnClick: S
|
1021
1021
|
};
|
1022
|
-
return /* @__PURE__ */
|
1022
|
+
return /* @__PURE__ */ a(Ft.Provider, { value: f, children: e });
|
1023
1023
|
}, Ss = (e) => function(r) {
|
1024
|
-
const { config: s, ...
|
1025
|
-
return /* @__PURE__ */
|
1024
|
+
const { config: s, ...o } = r;
|
1025
|
+
return /* @__PURE__ */ a(vs, { config: s, children: /* @__PURE__ */ a(e, { ...o }) });
|
1026
1026
|
}, Es = Ss(() => {
|
1027
1027
|
const [e, t] = k(!1), { tasksCount: r } = Z();
|
1028
1028
|
return $e(() => {
|
@@ -1032,10 +1032,10 @@ const Jr = function(e) {
|
|
1032
1032
|
return document.addEventListener(A.ShowDialog, s), () => {
|
1033
1033
|
document.removeEventListener(A.ShowDialog, s);
|
1034
1034
|
};
|
1035
|
-
}), /* @__PURE__ */
|
1035
|
+
}), /* @__PURE__ */ a(D, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ a(
|
1036
1036
|
mn,
|
1037
1037
|
{
|
1038
|
-
content: /* @__PURE__ */
|
1038
|
+
content: /* @__PURE__ */ a(Ts, {}),
|
1039
1039
|
placement: "right",
|
1040
1040
|
open: e,
|
1041
1041
|
onOpenChange: t,
|
@@ -1059,16 +1059,16 @@ const Jr = function(e) {
|
|
1059
1059
|
[je.activeNavItem]: s
|
1060
1060
|
}),
|
1061
1061
|
children: [
|
1062
|
-
/* @__PURE__ */
|
1063
|
-
r > 0 && /* @__PURE__ */
|
1062
|
+
/* @__PURE__ */ a(_n, { size: "25px" }),
|
1063
|
+
r > 0 && /* @__PURE__ */ a("div", { className: je.badge, "aria-label": `${r} items requiring attention`, children: r > 9 ? "9+" : r })
|
1064
1064
|
]
|
1065
1065
|
}
|
1066
1066
|
)
|
1067
1067
|
}
|
1068
1068
|
) });
|
1069
|
-
}), w = ({ children: e, ...t }) => /* @__PURE__ */
|
1069
|
+
}), w = ({ children: e, ...t }) => /* @__PURE__ */ a("nav", { ...t, className: Fn.sidebarContainer, children: e }), ys = ({ children: e }) => /* @__PURE__ */ a("div", { children: e });
|
1070
1070
|
w.Top = ys;
|
1071
|
-
const Cs = ({ children: e }) => /* @__PURE__ */
|
1071
|
+
const Cs = ({ children: e }) => /* @__PURE__ */ a("div", { children: e });
|
1072
1072
|
w.Bottom = Cs;
|
1073
1073
|
w.Avatar = Jn;
|
1074
1074
|
w.IconLink = Yn;
|
@@ -1082,12 +1082,12 @@ w.Tasks = Es;
|
|
1082
1082
|
const Ps = "_breadcrumbsItem_1hm6a_1", As = "_breadcrumbs_1hm6a_1", St = {
|
1083
1083
|
breadcrumbsItem: Ps,
|
1084
1084
|
breadcrumbs: As
|
1085
|
-
},
|
1086
|
-
/* @__PURE__ */
|
1087
|
-
r < e.length - 1 && /* @__PURE__ */
|
1088
|
-
] }, `${t.link}-${t.name}`)) }), Rs = ({ items: e }) => /* @__PURE__ */
|
1089
|
-
!!r && t.some((s) => s.visible) && /* @__PURE__ */
|
1090
|
-
t.filter(({ visible: s }) => s).map(({ link: s, label:
|
1085
|
+
}, ia = ({ items: e }) => /* @__PURE__ */ a("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ p(Rt, { children: [
|
1086
|
+
/* @__PURE__ */ a(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1087
|
+
r < e.length - 1 && /* @__PURE__ */ a("span", { children: " — " })
|
1088
|
+
] }, `${t.link}-${t.name}`)) }), Rs = ({ items: e }) => /* @__PURE__ */ a(He, { children: e.map((t, r) => /* @__PURE__ */ p(Rt, { children: [
|
1089
|
+
!!r && t.some((s) => s.visible) && /* @__PURE__ */ a(It, {}),
|
1090
|
+
t.filter(({ visible: s }) => s).map(({ link: s, label: o, onClick: i }) => /* @__PURE__ */ a(Y, { href: s || "#", "aria-label": o, onClick: i, children: o }, o))
|
1091
1091
|
] }, t[0].label)) }), ws = "_badge_1pc1v_1", Is = "_tag_1pc1v_15", ks = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", js = "_disabled_1pc1v_57", Ns = "_projectNavigationItem_1pc1v_61", Os = "_projectNavigationItemDisabled_1pc1v_67", M = {
|
1092
1092
|
badge: ws,
|
1093
1093
|
tag: Is,
|
@@ -1097,16 +1097,16 @@ const Ps = "_breadcrumbsItem_1hm6a_1", As = "_breadcrumbs_1hm6a_1", St = {
|
|
1097
1097
|
projectNavigationItemDisabled: Os
|
1098
1098
|
}, Et = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
|
1099
1099
|
/* @__PURE__ */ p("div", { children: [
|
1100
|
-
/* @__PURE__ */
|
1101
|
-
!!t && /* @__PURE__ */
|
1100
|
+
/* @__PURE__ */ a("span", { children: e }),
|
1101
|
+
!!t && /* @__PURE__ */ a("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1102
1102
|
] }),
|
1103
|
-
!!r && /* @__PURE__ */
|
1104
|
-
] }), Me =
|
1105
|
-
({ label: e, href: t = "", disabled: r = !1, badge: s, onClick:
|
1103
|
+
!!r && /* @__PURE__ */ a(Oe, { className: M.tag, children: r })
|
1104
|
+
] }), Me = an(
|
1105
|
+
({ label: e, href: t = "", disabled: r = !1, badge: s, onClick: o, novel: i }, c) => /* @__PURE__ */ a(D, { tooltip: "You do not have access to this function", show: r, children: /* @__PURE__ */ a(
|
1106
1106
|
"div",
|
1107
1107
|
{
|
1108
1108
|
className: r ? M.projectNavigationItemDisabled : M.projectNavigationItem,
|
1109
|
-
children:
|
1109
|
+
children: o || r || !t ? /* @__PURE__ */ a(
|
1110
1110
|
"button",
|
1111
1111
|
{
|
1112
1112
|
type: "button",
|
@@ -1115,38 +1115,38 @@ const Ps = "_breadcrumbsItem_1hm6a_1", As = "_breadcrumbs_1hm6a_1", St = {
|
|
1115
1115
|
[M.disabled]: r
|
1116
1116
|
}),
|
1117
1117
|
disabled: r,
|
1118
|
-
onClick:
|
1119
|
-
children: /* @__PURE__ */
|
1118
|
+
onClick: o,
|
1119
|
+
children: /* @__PURE__ */ a(Et, { label: e, badge: s, novel: i })
|
1120
1120
|
}
|
1121
|
-
) : /* @__PURE__ */
|
1121
|
+
) : /* @__PURE__ */ a("a", { href: t, className: M.withNavLinkStyle, children: /* @__PURE__ */ a(Et, { label: e, badge: s, novel: i }) })
|
1122
1122
|
}
|
1123
1123
|
) })
|
1124
1124
|
);
|
1125
1125
|
Me.displayName = "NavigationTabsItem";
|
1126
|
-
const xs = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, Ls = (e) => e.visible && (!e.dropdown || xs(e.dropdown)),
|
1127
|
-
var s,
|
1128
|
-
return r.dropdown ? /* @__PURE__ */
|
1126
|
+
const xs = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, Ls = (e) => e.visible && (!e.dropdown || xs(e.dropdown)), ca = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ a("nav", { "aria-label": "Project", children: /* @__PURE__ */ a("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ls).map((r) => {
|
1127
|
+
var s, o, i;
|
1128
|
+
return r.dropdown ? /* @__PURE__ */ a(
|
1129
1129
|
"li",
|
1130
1130
|
{
|
1131
1131
|
className: q.navigationTab,
|
1132
1132
|
"data-testid": r.key,
|
1133
1133
|
"aria-selected": (s = r.isActive) == null ? void 0 : s.call(r, t),
|
1134
|
-
children: /* @__PURE__ */
|
1134
|
+
children: /* @__PURE__ */ a(
|
1135
1135
|
le,
|
1136
1136
|
{
|
1137
|
-
menuButton: ({ opened: c }) => /* @__PURE__ */
|
1138
|
-
children: /* @__PURE__ */
|
1137
|
+
menuButton: ({ opened: c }) => /* @__PURE__ */ a(Me, { label: r.label, disabled: r.disabled, active: c }),
|
1138
|
+
children: /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a(Rs, { items: r.dropdown }) })
|
1139
1139
|
}
|
1140
1140
|
)
|
1141
1141
|
},
|
1142
1142
|
r.key
|
1143
|
-
) : /* @__PURE__ */
|
1143
|
+
) : /* @__PURE__ */ a(
|
1144
1144
|
"li",
|
1145
1145
|
{
|
1146
1146
|
className: q.navigationTab,
|
1147
1147
|
"data-testid": r.key,
|
1148
|
-
"aria-selected": (
|
1149
|
-
children: /* @__PURE__ */
|
1148
|
+
"aria-selected": (o = r.isActive) == null ? void 0 : o.call(r, t),
|
1149
|
+
children: /* @__PURE__ */ a(
|
1150
1150
|
Me,
|
1151
1151
|
{
|
1152
1152
|
label: r.label,
|
@@ -1351,7 +1351,7 @@ class ie extends Error {
|
|
1351
1351
|
re(this, "status", 401);
|
1352
1352
|
}
|
1353
1353
|
}
|
1354
|
-
function
|
1354
|
+
function la(e) {
|
1355
1355
|
return Kt(async (t) => {
|
1356
1356
|
var i, c;
|
1357
1357
|
const r = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
@@ -1360,13 +1360,13 @@ function co(e) {
|
|
1360
1360
|
const { exp: s } = ee(r.accessToken) ?? { exp: 0 };
|
1361
1361
|
if (!hn(new Date(s)))
|
1362
1362
|
return t.add("authorization", `Bearer ${r.accessToken}`);
|
1363
|
-
const
|
1364
|
-
if (!
|
1363
|
+
const o = await e.refreshToken(r);
|
1364
|
+
if (!o)
|
1365
1365
|
throw new ie();
|
1366
|
-
return (c = e.onNewTokenIssued) == null || c.call(e,
|
1366
|
+
return (c = e.onNewTokenIssued) == null || c.call(e, o), t.add("authorization", `Bearer ${o.accessToken}`);
|
1367
1367
|
});
|
1368
1368
|
}
|
1369
|
-
const
|
1369
|
+
const ua = Kt(
|
1370
1370
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1371
1371
|
);
|
1372
1372
|
function Jt() {
|
@@ -1378,9 +1378,9 @@ function Hs() {
|
|
1378
1378
|
}
|
1379
1379
|
function Ue(e, t) {
|
1380
1380
|
var r, s;
|
1381
|
-
return (s = (r = e.split(";").find((
|
1381
|
+
return (s = (r = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : s.substring(t.length + 1);
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function da() {
|
1384
1384
|
const e = Jt();
|
1385
1385
|
if (!e)
|
1386
1386
|
return;
|
@@ -1424,7 +1424,7 @@ const Qt = n.union([
|
|
1424
1424
|
isEmptyResponseExpected: !0,
|
1425
1425
|
successResponseBodySchema: $s
|
1426
1426
|
});
|
1427
|
-
function
|
1427
|
+
function ma(e, t, r) {
|
1428
1428
|
return async () => {
|
1429
1429
|
const s = t();
|
1430
1430
|
if (!s)
|
@@ -1435,7 +1435,7 @@ function mo(e, t, r) {
|
|
1435
1435
|
});
|
1436
1436
|
};
|
1437
1437
|
}
|
1438
|
-
function
|
1438
|
+
function _a(e) {
|
1439
1439
|
return async ({ accessToken: t, refreshToken: r }) => {
|
1440
1440
|
const s = ee(t);
|
1441
1441
|
if (!s)
|
@@ -1450,9 +1450,9 @@ const Ks = {
|
|
1450
1450
|
teamKey: (e) => ["getUserToken", e]
|
1451
1451
|
}, zs = (e, t, r) => H({
|
1452
1452
|
...r,
|
1453
|
-
queryFn: async ({ queryKey: [s,
|
1453
|
+
queryFn: async ({ queryKey: [s, o] }) => G(e, Ge, {
|
1454
1454
|
headers: await t.resolve(),
|
1455
|
-
pathParams: { teamId:
|
1455
|
+
pathParams: { teamId: o }
|
1456
1456
|
})
|
1457
1457
|
}), ce = class ce extends CustomEvent {
|
1458
1458
|
constructor(t) {
|
@@ -1463,20 +1463,20 @@ const Ks = {
|
|
1463
1463
|
};
|
1464
1464
|
re(ce, "eventName", "new-jwt-issued");
|
1465
1465
|
let Q = ce;
|
1466
|
-
function
|
1467
|
-
const s = Hs(),
|
1466
|
+
function ga(e, t, r) {
|
1467
|
+
const s = Hs(), o = zs(e, t.add("x-csrf-token", s ?? ""), {
|
1468
1468
|
queryKey: Ks.teamKey(r),
|
1469
1469
|
enabled: s !== void 0
|
1470
1470
|
}), i = Ct();
|
1471
1471
|
return W(() => {
|
1472
|
-
|
1473
|
-
}, [
|
1472
|
+
o.data && o.data.accessToken !== i.current && (window.dispatchEvent(new Q(o.data)), i.current = o.data.accessToken);
|
1473
|
+
}, [o.data]), o;
|
1474
1474
|
}
|
1475
1475
|
function Wt() {
|
1476
1476
|
const [e, t] = k();
|
1477
1477
|
return W(() => {
|
1478
|
-
const r = (
|
1479
|
-
t(
|
1478
|
+
const r = (o) => {
|
1479
|
+
t(o.detail.payload);
|
1480
1480
|
}, s = Jt();
|
1481
1481
|
return t(s ? ee(s.accessToken) : void 0), window.addEventListener(Q.eventName, r), () => {
|
1482
1482
|
window.removeEventListener(Q.eventName, r);
|
@@ -1506,23 +1506,28 @@ const Js = N, Qs = n.object({
|
|
1506
1506
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1507
1507
|
}, Zs = (e, t, r) => H({
|
1508
1508
|
...r,
|
1509
|
-
queryFn: async ({ queryKey: [s,
|
1509
|
+
queryFn: async ({ queryKey: [s, o, i] }) => F(e, Xs, {
|
1510
1510
|
headers: await t.resolve(),
|
1511
|
-
pathParams: { teamId:
|
1511
|
+
pathParams: { teamId: o, userId: i }
|
1512
1512
|
})
|
1513
1513
|
});
|
1514
|
-
function
|
1514
|
+
function ha(e, t) {
|
1515
1515
|
const r = Wt();
|
1516
1516
|
return Zs(e, t, {
|
1517
1517
|
queryKey: Vs.teamUserKey((r == null ? void 0 : r.teamId) ?? 0, (r == null ? void 0 : r.userId) ?? 0),
|
1518
1518
|
enabled: (r == null ? void 0 : r.userId) !== void 0 && r.teamId !== void 0
|
1519
1519
|
});
|
1520
1520
|
}
|
1521
|
-
const
|
1521
|
+
const pa = N, eo = n.object({
|
1522
1522
|
lang_id: n.number(),
|
1523
1523
|
lang_iso: n.string(),
|
1524
1524
|
lang_name: n.string(),
|
1525
|
-
is_writable: n.union([
|
1525
|
+
is_writable: n.union([
|
1526
|
+
n.literal(0),
|
1527
|
+
n.literal(1),
|
1528
|
+
n.boolean()
|
1529
|
+
// (╥﹏╥) this is a workaround for the API returning boolean instead of 0/1, as the API spec says
|
1530
|
+
])
|
1526
1531
|
}), Yt = n.object({
|
1527
1532
|
user_id: n.number(),
|
1528
1533
|
email: n.string().email(),
|
@@ -1530,64 +1535,63 @@ const po = N, ea = n.object({
|
|
1530
1535
|
created_at: n.string(),
|
1531
1536
|
created_at_timestamp: n.number(),
|
1532
1537
|
admin_rights: n.array(n.string()),
|
1533
|
-
languages: n.array(
|
1538
|
+
languages: n.array(eo),
|
1534
1539
|
is_admin: n.boolean(),
|
1535
1540
|
is_reviewer: n.boolean()
|
1536
|
-
}),
|
1541
|
+
}), to = n.object({ id: n.string() }), no = n.object({ id: n.number() }), Xt = n.object({ uuid: n.string().uuid() }), Vt = n.union([Xt, to]), ro = n.union([
|
1537
1542
|
n.object({ authenticatedUser: n.literal(!0) }),
|
1538
|
-
|
1539
|
-
|
1540
|
-
]),
|
1541
|
-
|
1542
|
-
|
1543
|
-
}), aa = n.object({
|
1543
|
+
Xt,
|
1544
|
+
no
|
1545
|
+
]), so = n.object({
|
1546
|
+
project: Vt
|
1547
|
+
}), oo = n.object({
|
1544
1548
|
project_id: n.string(),
|
1545
1549
|
contributors: n.array(Yt)
|
1546
|
-
}),
|
1547
|
-
project:
|
1548
|
-
contributor:
|
1549
|
-
}),
|
1550
|
+
}), ao = n.object({
|
1551
|
+
project: Vt,
|
1552
|
+
contributor: ro
|
1553
|
+
}), io = n.object({
|
1550
1554
|
project_id: n.string(),
|
1551
1555
|
contributor: Yt
|
1552
|
-
}),
|
1556
|
+
}), co = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, Zt = (e) => "uuid" in e ? e.uuid : e.id, fa = $({
|
1553
1557
|
description: "List all contributors for a project",
|
1554
1558
|
requestHeaderSchema: N,
|
1555
|
-
requestPathParamsSchema:
|
1559
|
+
requestPathParamsSchema: so,
|
1556
1560
|
pathResolver: ({ project: e }) => `/projects/${Zt(e)}/contributors`,
|
1557
|
-
successResponseBodySchema:
|
1558
|
-
}),
|
1561
|
+
successResponseBodySchema: oo
|
1562
|
+
}), lo = $({
|
1559
1563
|
description: "Get the details of a project contributor",
|
1560
1564
|
requestHeaderSchema: N,
|
1561
|
-
requestPathParamsSchema:
|
1562
|
-
pathResolver: ({ project: e, contributor: t }) => `/projects/${Zt(e)}/contributors/${
|
1563
|
-
successResponseBodySchema:
|
1564
|
-
}),
|
1565
|
+
requestPathParamsSchema: ao,
|
1566
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${Zt(e)}/contributors/${co(t)}`,
|
1567
|
+
successResponseBodySchema: io
|
1568
|
+
}), uo = {
|
1565
1569
|
projectUserKey: (e) => ["RetrieveContributor", e]
|
1566
|
-
},
|
1570
|
+
}, mo = (e, t, r) => H({
|
1567
1571
|
...r,
|
1568
|
-
queryFn: async ({ queryKey: [s,
|
1569
|
-
pathParams:
|
1572
|
+
queryFn: async ({ queryKey: [s, o] }) => F(e, lo, {
|
1573
|
+
pathParams: o,
|
1570
1574
|
headers: await t.resolve()
|
1571
1575
|
})
|
1572
1576
|
});
|
1573
|
-
function
|
1574
|
-
const s = Wt(),
|
1575
|
-
return
|
1576
|
-
queryKey:
|
1577
|
+
function ba(e, t, r) {
|
1578
|
+
const s = Wt(), o = s != null && s.userId ? { id: s.userId } : { authenticatedUser: !0 };
|
1579
|
+
return mo(e, t, {
|
1580
|
+
queryKey: uo.projectUserKey({ project: { id: r }, contributor: o }),
|
1577
1581
|
enabled: s !== void 0
|
1578
1582
|
});
|
1579
1583
|
}
|
1580
|
-
const
|
1584
|
+
const _o = n.object({
|
1581
1585
|
lang_iso: n.string(),
|
1582
1586
|
custom_iso: n.string().optional()
|
1583
|
-
}),
|
1587
|
+
}), go = n.object({
|
1584
1588
|
language_id: n.number(),
|
1585
1589
|
language_iso: n.string(),
|
1586
1590
|
progress: n.number(),
|
1587
1591
|
words_to_do: n.number(),
|
1588
1592
|
project_language_id: n.number(),
|
1589
1593
|
project_language_uuid: n.string().uuid()
|
1590
|
-
}),
|
1594
|
+
}), ho = n.object({
|
1591
1595
|
projectId: n.string()
|
1592
1596
|
}), en = n.object({
|
1593
1597
|
lang_id: n.number(),
|
@@ -1597,13 +1601,13 @@ const ma = n.object({
|
|
1597
1601
|
plural_forms: n.array(n.string().optional()),
|
1598
1602
|
project_language_id: n.string(),
|
1599
1603
|
project_language_uuid: n.string().uuid()
|
1600
|
-
}),
|
1604
|
+
}), po = n.object({
|
1601
1605
|
project_id: n.string(),
|
1602
1606
|
project_uuid: n.string().uuid(),
|
1603
1607
|
languages: n.array(en)
|
1604
|
-
}),
|
1608
|
+
}), fo = n.object({
|
1605
1609
|
projectId: n.string()
|
1606
|
-
}),
|
1610
|
+
}), bo = n.object({
|
1607
1611
|
languages: n.array(
|
1608
1612
|
n.object({
|
1609
1613
|
lang_iso: n.string(),
|
@@ -1612,7 +1616,7 @@ const ma = n.object({
|
|
1612
1616
|
custom_plural_forms: n.array(n.string()).optional()
|
1613
1617
|
})
|
1614
1618
|
)
|
1615
|
-
}),
|
1619
|
+
}), To = n.object({
|
1616
1620
|
project_id: n.string(),
|
1617
1621
|
project_uuid: n.string().uuid(),
|
1618
1622
|
languages: n.array(en),
|
@@ -1623,44 +1627,44 @@ const ma = n.object({
|
|
1623
1627
|
lang_iso: n.string()
|
1624
1628
|
})
|
1625
1629
|
).optional()
|
1626
|
-
}),
|
1630
|
+
}), vo = n.object({
|
1627
1631
|
projectId: n.string()
|
1628
|
-
}),
|
1632
|
+
}), So = n.object({
|
1629
1633
|
langs: n.array(
|
1630
1634
|
n.object({
|
1631
1635
|
lang_iso: n.string(),
|
1632
1636
|
base_lang: n.boolean()
|
1633
1637
|
})
|
1634
1638
|
)
|
1635
|
-
}),
|
1639
|
+
}), Eo = n.object({
|
1636
1640
|
result: n.boolean()
|
1637
|
-
}),
|
1641
|
+
}), yo = $({
|
1638
1642
|
description: "List of project languages",
|
1639
1643
|
requestHeaderSchema: N,
|
1640
|
-
requestPathParamsSchema:
|
1644
|
+
requestPathParamsSchema: ho,
|
1641
1645
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1642
|
-
successResponseBodySchema:
|
1643
|
-
}),
|
1646
|
+
successResponseBodySchema: po
|
1647
|
+
}), Ta = X({
|
1644
1648
|
description: "Add languages to existing project",
|
1645
1649
|
requestHeaderSchema: N,
|
1646
1650
|
method: "post",
|
1647
|
-
requestPathParamsSchema:
|
1651
|
+
requestPathParamsSchema: fo,
|
1648
1652
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1649
|
-
requestBodySchema:
|
1650
|
-
successResponseBodySchema:
|
1651
|
-
}),
|
1653
|
+
requestBodySchema: bo,
|
1654
|
+
successResponseBodySchema: To
|
1655
|
+
}), Co = X({
|
1652
1656
|
description: "Bulk update project languages",
|
1653
1657
|
requestHeaderSchema: N,
|
1654
1658
|
method: "put",
|
1655
|
-
requestPathParamsSchema:
|
1659
|
+
requestPathParamsSchema: vo,
|
1656
1660
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1657
|
-
requestBodySchema:
|
1658
|
-
successResponseBodySchema:
|
1661
|
+
requestBodySchema: So,
|
1662
|
+
successResponseBodySchema: Eo
|
1659
1663
|
}), de = N, Fe = n.union([
|
1660
1664
|
n.literal("localization_files"),
|
1661
1665
|
n.literal("paged_documents"),
|
1662
1666
|
n.literal("marketing")
|
1663
|
-
]),
|
1667
|
+
]), Po = n.object({
|
1664
1668
|
per_platform_key_names: n.boolean(),
|
1665
1669
|
reviewing: n.boolean(),
|
1666
1670
|
auto_toggle_unverified: n.boolean(),
|
@@ -1671,7 +1675,7 @@ const ma = n.object({
|
|
1671
1675
|
custom_translation_statuses_allow_multiple: n.boolean(),
|
1672
1676
|
segmentation: n.boolean(),
|
1673
1677
|
contributor_preview_download_enabled: n.boolean()
|
1674
|
-
}),
|
1678
|
+
}), Ao = n.object({
|
1675
1679
|
not_reviewed: n.number(),
|
1676
1680
|
unverified: n.number(),
|
1677
1681
|
spelling_grammar: n.number(),
|
@@ -1688,14 +1692,14 @@ const ma = n.object({
|
|
1688
1692
|
double_space: n.number(),
|
1689
1693
|
special_placeholder: n.number(),
|
1690
1694
|
unbalanced_brackets: n.number()
|
1691
|
-
}),
|
1695
|
+
}), Ro = n.object({
|
1692
1696
|
progress_total: n.number(),
|
1693
1697
|
keys_total: n.number(),
|
1694
1698
|
team: n.number(),
|
1695
1699
|
base_words: n.number(),
|
1696
1700
|
qa_issues_total: n.number(),
|
1697
|
-
qa_issues:
|
1698
|
-
languages: n.array(
|
1701
|
+
qa_issues: Ao,
|
1702
|
+
languages: n.array(go)
|
1699
1703
|
}), me = n.object({
|
1700
1704
|
project_id: n.string(),
|
1701
1705
|
uuid: n.string().uuid(),
|
@@ -1712,16 +1716,16 @@ const ma = n.object({
|
|
1712
1716
|
base_language_iso: n.string(),
|
1713
1717
|
base_project_language_id: n.number(),
|
1714
1718
|
base_project_language_uuid: n.string().uuid(),
|
1715
|
-
settings:
|
1716
|
-
statistics:
|
1717
|
-
}),
|
1719
|
+
settings: Po.optional(),
|
1720
|
+
statistics: Ro.optional()
|
1721
|
+
}), wo = n.object({
|
1718
1722
|
name: n.string(),
|
1719
1723
|
team_id: n.string(),
|
1720
1724
|
base_lang_iso: n.string(),
|
1721
|
-
languages: n.array(
|
1725
|
+
languages: n.array(_o),
|
1722
1726
|
project_type: Fe,
|
1723
1727
|
is_segmentation_enabled: n.boolean()
|
1724
|
-
}), yt = n.union([n.literal(0), n.literal(1)]),
|
1728
|
+
}), yt = n.union([n.literal(0), n.literal(1)]), Io = n.object({
|
1725
1729
|
filter_type: Fe.optional(),
|
1726
1730
|
filter_team_id: n.number().optional(),
|
1727
1731
|
filter_names: n.string().optional(),
|
@@ -1729,121 +1733,121 @@ const ma = n.object({
|
|
1729
1733
|
include_settings: yt.optional(),
|
1730
1734
|
limit: n.number().optional(),
|
1731
1735
|
page: n.number().optional()
|
1732
|
-
}),
|
1736
|
+
}), ko = n.object({
|
1733
1737
|
projects: n.array(me)
|
1734
|
-
}),
|
1738
|
+
}), jo = n.object({
|
1735
1739
|
project_id: n.string()
|
1736
|
-
}),
|
1740
|
+
}), No = n.object({
|
1737
1741
|
project_id: n.string()
|
1738
|
-
}),
|
1742
|
+
}), Oo = n.object({
|
1739
1743
|
name: n.string().min(1),
|
1740
1744
|
description: n.string().optional()
|
1741
|
-
}), _e = () => "/projects",
|
1745
|
+
}), _e = () => "/projects", xo = X({
|
1742
1746
|
description: "Create a new project",
|
1743
1747
|
requestHeaderSchema: de,
|
1744
1748
|
method: "post",
|
1745
1749
|
pathResolver: _e,
|
1746
|
-
requestBodySchema:
|
1750
|
+
requestBodySchema: wo,
|
1747
1751
|
successResponseBodySchema: me
|
1748
|
-
}),
|
1752
|
+
}), Lo = $({
|
1749
1753
|
description: "List all projects",
|
1750
1754
|
requestHeaderSchema: de,
|
1751
1755
|
pathResolver: _e,
|
1752
|
-
requestQuerySchema:
|
1753
|
-
successResponseBodySchema:
|
1754
|
-
}),
|
1756
|
+
requestQuerySchema: Io,
|
1757
|
+
successResponseBodySchema: ko
|
1758
|
+
}), Mo = $({
|
1755
1759
|
description: "Retrieve a project",
|
1756
1760
|
requestHeaderSchema: de,
|
1757
|
-
requestPathParamsSchema:
|
1761
|
+
requestPathParamsSchema: jo,
|
1758
1762
|
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1759
1763
|
successResponseBodySchema: me
|
1760
|
-
}),
|
1764
|
+
}), Uo = X({
|
1761
1765
|
description: "Update a project",
|
1762
1766
|
requestHeaderSchema: de,
|
1763
1767
|
method: "put",
|
1764
|
-
requestPathParamsSchema:
|
1768
|
+
requestPathParamsSchema: No,
|
1765
1769
|
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1766
|
-
requestBodySchema:
|
1770
|
+
requestBodySchema: Oo,
|
1767
1771
|
successResponseBodySchema: me
|
1768
|
-
}),
|
1772
|
+
}), Ho = n.object({
|
1769
1773
|
projectId: n.string(),
|
1770
1774
|
translationId: n.number()
|
1771
|
-
}),
|
1775
|
+
}), Bo = n.enum(["critical", "major", "minor", "neutral"]), qo = n.object({
|
1772
1776
|
category: n.string(),
|
1773
1777
|
comment: n.string(),
|
1774
|
-
severity:
|
1775
|
-
}),
|
1778
|
+
severity: Bo
|
1779
|
+
}), Do = n.object({
|
1776
1780
|
score: n.number(),
|
1777
1781
|
hasMajorIssue: n.boolean(),
|
1778
1782
|
hasCriticalIssue: n.boolean(),
|
1779
|
-
issues: n.array(
|
1783
|
+
issues: n.array(qo)
|
1780
1784
|
});
|
1781
|
-
function
|
1785
|
+
function va(e, t, r = {}) {
|
1782
1786
|
return Be({
|
1783
1787
|
...r,
|
1784
|
-
mutationFn: async (s) => G(e,
|
1788
|
+
mutationFn: async (s) => G(e, xo, {
|
1785
1789
|
headers: await t.resolve(),
|
1786
1790
|
body: s
|
1787
1791
|
})
|
1788
1792
|
});
|
1789
1793
|
}
|
1790
|
-
const
|
1794
|
+
const Sa = {
|
1791
1795
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1792
1796
|
};
|
1793
|
-
function
|
1797
|
+
function Ea(e, t, r) {
|
1794
1798
|
return H({
|
1795
1799
|
...r,
|
1796
|
-
queryFn: async ({ queryKey: [s,
|
1800
|
+
queryFn: async ({ queryKey: [s, o] }) => F(e, yo, {
|
1797
1801
|
headers: await t.resolve(),
|
1798
|
-
pathParams: { projectId:
|
1802
|
+
pathParams: { projectId: o }
|
1799
1803
|
})
|
1800
1804
|
});
|
1801
1805
|
}
|
1802
|
-
const
|
1806
|
+
const ya = {
|
1803
1807
|
paramsKey: (e) => ["listProjects", e]
|
1804
1808
|
};
|
1805
|
-
function
|
1809
|
+
function Ca(e, t, r) {
|
1806
1810
|
return H({
|
1807
1811
|
...r,
|
1808
|
-
queryFn: async ({ queryKey: [s,
|
1812
|
+
queryFn: async ({ queryKey: [s, o] }) => F(e, Lo, {
|
1809
1813
|
headers: await t.resolve(),
|
1810
|
-
queryParams:
|
1814
|
+
queryParams: o
|
1811
1815
|
})
|
1812
1816
|
});
|
1813
1817
|
}
|
1814
|
-
const
|
1818
|
+
const Pa = {
|
1815
1819
|
projectIdKey: (e) => ["retrieveProject", e]
|
1816
1820
|
};
|
1817
|
-
function
|
1821
|
+
function Aa(e, t, r) {
|
1818
1822
|
return H({
|
1819
1823
|
...r,
|
1820
|
-
queryFn: async ({ queryKey: [s,
|
1824
|
+
queryFn: async ({ queryKey: [s, o] }) => F(e, Mo, {
|
1821
1825
|
headers: await t.resolve(),
|
1822
|
-
pathParams: { project_id:
|
1826
|
+
pathParams: { project_id: o }
|
1823
1827
|
})
|
1824
1828
|
});
|
1825
1829
|
}
|
1826
|
-
function
|
1830
|
+
function Ra(e, t, r, s = {}) {
|
1827
1831
|
return Be({
|
1828
1832
|
...s,
|
1829
|
-
mutationFn: async (
|
1833
|
+
mutationFn: async (o) => G(e, Uo, {
|
1830
1834
|
headers: await t.resolve(),
|
1831
|
-
body:
|
1835
|
+
body: o,
|
1832
1836
|
pathParams: r
|
1833
1837
|
})
|
1834
1838
|
});
|
1835
1839
|
}
|
1836
|
-
function
|
1840
|
+
function wa(e, t, r, s = {}) {
|
1837
1841
|
return Be({
|
1838
1842
|
...s,
|
1839
|
-
mutationFn: async (
|
1843
|
+
mutationFn: async (o) => G(e, Co, {
|
1840
1844
|
pathParams: t,
|
1841
1845
|
headers: await r.resolve(),
|
1842
|
-
body:
|
1846
|
+
body: o
|
1843
1847
|
})
|
1844
1848
|
});
|
1845
1849
|
}
|
1846
|
-
function
|
1850
|
+
function $o(e) {
|
1847
1851
|
return {
|
1848
1852
|
isEmptyResponseExpected: e.isEmptyResponseExpected ?? !1,
|
1849
1853
|
isNonJSONResponseExpected: e.isNonJSONResponseExpected ?? !1,
|
@@ -1858,69 +1862,69 @@ function Da(e) {
|
|
1858
1862
|
metadata: e.metadata
|
1859
1863
|
};
|
1860
1864
|
}
|
1861
|
-
const
|
1865
|
+
const Go = $o({
|
1862
1866
|
description: "Generate translation quality score",
|
1863
1867
|
requestHeaderSchema: N,
|
1864
|
-
requestPathParamsSchema:
|
1868
|
+
requestPathParamsSchema: Ho,
|
1865
1869
|
pathResolver: ({ projectId: e, translationId: t }) => `/projects/${e}/translations/${t}/scoring-guidance`,
|
1866
|
-
successResponseBodySchema:
|
1867
|
-
}),
|
1870
|
+
successResponseBodySchema: Do
|
1871
|
+
}), Ia = {
|
1868
1872
|
paramsKey: (e) => ["getScore", e]
|
1869
1873
|
};
|
1870
|
-
function
|
1874
|
+
function ka(e, t, r) {
|
1871
1875
|
return H({
|
1872
1876
|
...r,
|
1873
|
-
queryFn: async ({ queryKey: [s,
|
1877
|
+
queryFn: async ({ queryKey: [s, o] }) => F(e, Go, {
|
1874
1878
|
headers: await t.resolve(),
|
1875
|
-
pathParams:
|
1879
|
+
pathParams: o
|
1876
1880
|
})
|
1877
1881
|
});
|
1878
1882
|
}
|
1879
1883
|
export {
|
1880
|
-
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1888
|
-
|
1884
|
+
fo as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1885
|
+
bo as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1886
|
+
To as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1887
|
+
vo as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1888
|
+
So as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1889
|
+
Eo as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1890
|
+
ia as Breadcrumbs,
|
1891
|
+
pa as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1892
|
+
eo as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1889
1893
|
Yt as CONTRIBUTOR_SCHEMA,
|
1890
|
-
|
1894
|
+
wo as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1891
1895
|
Bt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1892
1896
|
_r as ENTERPRISE_PLAN_IDS,
|
1893
1897
|
dr as ESSENTIAL_PLAN_IDS,
|
1894
1898
|
Ht as FREE_PLAN_ID,
|
1895
|
-
|
1896
|
-
|
1899
|
+
Ho as GET_SCORE_REQUEST_QUERY_SCHEMA,
|
1900
|
+
Do as GET_SCORE_RESPONSE_SCHEMA,
|
1897
1901
|
I as HeaderBuilder,
|
1898
|
-
|
1902
|
+
qo as ISSUE_SCHEMA,
|
1899
1903
|
$s as JWT_TOKEN_SCHEMA,
|
1900
|
-
|
1901
|
-
|
1904
|
+
la as JwtAuthHeaderBuilderMiddleware,
|
1905
|
+
_o as LANGUAGE_ISO_SCHEMA,
|
1902
1906
|
en as LANGUAGE_SCHEMA,
|
1903
|
-
|
1904
|
-
|
1905
|
-
|
1906
|
-
|
1907
|
-
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1907
|
+
go as LANGUAGE_STATISTICS_SCHEMA,
|
1908
|
+
so as LIST_CONTRIBUTORS_PATH_PARAMS_SCHEMA,
|
1909
|
+
oo as LIST_CONTRIBUTORS_RESPONSE_SCHEMA,
|
1910
|
+
Io as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1911
|
+
ko as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1912
|
+
ho as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1913
|
+
po as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1914
|
+
ae as NavigationPanel,
|
1915
|
+
ca as NavigationTabs,
|
1912
1916
|
de as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1913
|
-
|
1917
|
+
Ao as PROJECT_QA_ISSUES_SCHEMA,
|
1914
1918
|
me as PROJECT_SCHEMA,
|
1915
|
-
|
1916
|
-
|
1919
|
+
Po as PROJECT_SETTINGS_SCHEMA,
|
1920
|
+
Ro as PROJECT_STATISTICS_SCHEMA,
|
1917
1921
|
Fe as PROJECT_TYPE_SCHEMA,
|
1918
1922
|
mr as PRO_PLAN_IDS,
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1923
|
-
|
1923
|
+
ua as PublicApiHeaderBuilderMiddleware,
|
1924
|
+
ao as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1925
|
+
io as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1926
|
+
jo as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1927
|
+
Bo as SEVERITY_ENUM,
|
1924
1928
|
ur as START_PLAN_IDS,
|
1925
1929
|
w as Sidebar,
|
1926
1930
|
R as SidebarTaskLanguageStatuses,
|
@@ -1932,60 +1936,60 @@ export {
|
|
1932
1936
|
Ys as TEAM_USER_RESPONSE_SCHEMA,
|
1933
1937
|
Qs as TEAM_USER_SCHEMA,
|
1934
1938
|
lr as TRIAL_PLAN_ID,
|
1935
|
-
|
1936
|
-
|
1939
|
+
No as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1940
|
+
Oo as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1937
1941
|
Fs as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1938
1942
|
ie as UnauthorizedError,
|
1939
|
-
|
1940
|
-
|
1943
|
+
Ta as addLanguagesToProject,
|
1944
|
+
Co as bulkUpdateProjectLanguages,
|
1941
1945
|
pr as convertNewLineToBreakTag,
|
1942
1946
|
Kt as createHeaderBuilderMiddleware,
|
1943
|
-
|
1947
|
+
xo as createProject,
|
1944
1948
|
vr as formatDate,
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1949
|
+
aa as formatDateTz,
|
1950
|
+
ma as generateTokenFromClassicSession,
|
1951
|
+
da as getAuthenticatedSessionDetailFromRequest,
|
1948
1952
|
Hs as getCsrfTokenFromCookie,
|
1949
1953
|
Jt as getJwtTokenFromCookie,
|
1950
|
-
|
1954
|
+
Ia as getScoreKey,
|
1951
1955
|
Xs as getTeamUser,
|
1952
1956
|
Vs as getTeamUsersQueryKey,
|
1953
1957
|
Ge as getUserToken,
|
1954
1958
|
Ks as getUserTokenKey,
|
1955
|
-
|
1956
|
-
|
1957
|
-
|
1959
|
+
oa as isEnterpriseOpenSourcePlan,
|
1960
|
+
ra as isEnterprisePlan,
|
1961
|
+
ta as isEssentialPlan,
|
1958
1962
|
De as isFreePlan,
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1963
|
+
sa as isPaidPlan,
|
1964
|
+
na as isProPlan,
|
1965
|
+
ea as isStartPlan,
|
1962
1966
|
qt as isTrialPlan,
|
1963
|
-
|
1964
|
-
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1967
|
+
fa as listContributors,
|
1968
|
+
yo as listProjectLanguages,
|
1969
|
+
Sa as listProjectLanguagesKey,
|
1970
|
+
Lo as listProjects,
|
1971
|
+
ya as listProjectsKey,
|
1968
1972
|
Tr as makeUrlClickable,
|
1969
1973
|
ee as parseJwtTokenPayload,
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1974
|
+
_a as refreshExpiredToken,
|
1975
|
+
lo as retrieveContributor,
|
1976
|
+
uo as retrieveContributorKeys,
|
1977
|
+
Mo as retrieveProject,
|
1978
|
+
Pa as retrieveProjectQueryKey,
|
1979
|
+
Uo as updateProject,
|
1980
|
+
ba as useAuthenticatedProjectContributor,
|
1977
1981
|
Wt as useAuthenticatedSessionPayload,
|
1978
|
-
|
1979
|
-
|
1980
|
-
|
1982
|
+
ha as useAuthenticatedUser,
|
1983
|
+
wa as useBulkUpdateProjectLanguagesMutation,
|
1984
|
+
va as useCreateProjectMutation,
|
1981
1985
|
$e as useEffectOnce,
|
1982
|
-
|
1983
|
-
|
1986
|
+
ga as useGetPromotedClassicSessionJwtQuery,
|
1987
|
+
ka as useGetScoreQuery,
|
1984
1988
|
Zs as useGetTeamUsersQuery,
|
1985
1989
|
zs as useGetUserTokenQuery,
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1990
|
+
Ea as useListProjectLanguagesQuery,
|
1991
|
+
Ca as useListProjectsQuery,
|
1992
|
+
mo as useRetrieveContributorQuery,
|
1993
|
+
Aa as useRetrieveProjectQuery,
|
1994
|
+
Ra as useUpdateProjectMutation
|
1991
1995
|
};
|