@lokalise/harmony 1.23.0 → 1.24.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +360 -360
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
var Zt = Object.defineProperty;
|
2
2
|
var en = (e, t, r) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
3
3
|
var re = (e, t, r) => en(e, typeof t != "symbol" ? t + "" : t, r);
|
4
|
-
import { jsx as o, jsxs as
|
4
|
+
import { jsx as o, jsxs as p, Fragment as He } from "react/jsx-runtime";
|
5
5
|
import * as z from "react";
|
6
6
|
import { useRef as Ct, useState as I, useCallback as Qe, useEffect as Q, useContext as Pt, createContext as wt, cloneElement as tn, Fragment as At, forwardRef as nn } from "react";
|
7
7
|
import { Tooltip as D, Link as U, Menu as le, MenuList as ue, CaretUpIcon as rn, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as an, Alert as sn, Tag as Oe, Button as xe, Loading as on, Popover as cn, JobIcon as ln } from "@lokalise/louis";
|
@@ -29,22 +29,22 @@ var se = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
29
29
|
function jt(e) {
|
30
30
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
31
31
|
}
|
32
|
-
var
|
32
|
+
var he, We;
|
33
33
|
function Be() {
|
34
|
-
if (We) return
|
34
|
+
if (We) return he;
|
35
35
|
We = 1;
|
36
36
|
function e(t) {
|
37
37
|
var r = typeof t;
|
38
38
|
return t != null && (r == "object" || r == "function");
|
39
39
|
}
|
40
|
-
return
|
40
|
+
return he = e, he;
|
41
41
|
}
|
42
|
-
var
|
42
|
+
var pe, Ye;
|
43
43
|
function _n() {
|
44
|
-
if (Ye) return
|
44
|
+
if (Ye) return pe;
|
45
45
|
Ye = 1;
|
46
46
|
var e = typeof se == "object" && se && se.Object === Object && se;
|
47
|
-
return
|
47
|
+
return pe = e, pe;
|
48
48
|
}
|
49
49
|
var fe, Xe;
|
50
50
|
function Nt() {
|
@@ -63,7 +63,7 @@ function gn() {
|
|
63
63
|
return be = t, be;
|
64
64
|
}
|
65
65
|
var Te, Ze;
|
66
|
-
function
|
66
|
+
function hn() {
|
67
67
|
if (Ze) return Te;
|
68
68
|
Ze = 1;
|
69
69
|
var e = /\s/;
|
@@ -75,10 +75,10 @@ function pn() {
|
|
75
75
|
return Te = t, Te;
|
76
76
|
}
|
77
77
|
var ve, et;
|
78
|
-
function
|
78
|
+
function pn() {
|
79
79
|
if (et) return ve;
|
80
80
|
et = 1;
|
81
|
-
var e =
|
81
|
+
var e = hn(), t = /^\s+/;
|
82
82
|
function r(a) {
|
83
83
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
84
84
|
}
|
@@ -151,7 +151,7 @@ var Ae, it;
|
|
151
151
|
function yn() {
|
152
152
|
if (it) return Ae;
|
153
153
|
it = 1;
|
154
|
-
var e =
|
154
|
+
var e = pn(), t = Be(), r = Sn(), a = NaN, s = /^[-+]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;
|
@@ -175,16 +175,16 @@ function xt() {
|
|
175
175
|
ct = 1;
|
176
176
|
var e = Be(), t = gn(), r = yn(), a = "Expected a function", s = Math.max, i = Math.min;
|
177
177
|
function c(u, d, l) {
|
178
|
-
var m, g, v, S, _, E, b = 0,
|
178
|
+
var m, g, v, S, _, E, b = 0, h = !1, f = !1, T = !0;
|
179
179
|
if (typeof u != "function")
|
180
180
|
throw new TypeError(a);
|
181
|
-
d = r(d) || 0, e(l) && (
|
181
|
+
d = r(d) || 0, e(l) && (h = !!l.leading, f = "maxWait" in l, v = f ? s(r(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
|
182
182
|
function P(y) {
|
183
183
|
var N = m, F = g;
|
184
184
|
return m = g = void 0, b = y, S = u.apply(F, N), S;
|
185
185
|
}
|
186
186
|
function C(y) {
|
187
|
-
return b = y, _ = setTimeout(ne, d),
|
187
|
+
return b = y, _ = setTimeout(ne, d), h ? P(y) : S;
|
188
188
|
}
|
189
189
|
function te(y) {
|
190
190
|
var N = y - E, F = y - b, Je = d - N;
|
@@ -310,7 +310,7 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refresh
|
|
310
310
|
entry: P
|
311
311
|
}), C) : te);
|
312
312
|
});
|
313
|
-
}, [s, i, l, E]),
|
313
|
+
}, [s, i, l, E]), h = Qe(Rn(b, t, r, a), [
|
314
314
|
b,
|
315
315
|
t,
|
316
316
|
r,
|
@@ -318,15 +318,15 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: r = 1e3, refresh
|
|
318
318
|
]);
|
319
319
|
return Q(() => {
|
320
320
|
let f;
|
321
|
-
return _ ? (f = new window.ResizeObserver(
|
321
|
+
return _ ? (f = new window.ResizeObserver(h), f.observe(_, u)) : (g.width || g.height) && (m == null || m({
|
322
322
|
width: null,
|
323
323
|
height: null,
|
324
324
|
entry: null
|
325
325
|
}), v({ width: void 0, height: void 0 })), () => {
|
326
326
|
var T, P, C;
|
327
|
-
(T = f == null ? void 0 : f.disconnect) === null || T === void 0 || T.call(f), (C = (P =
|
327
|
+
(T = f == null ? void 0 : f.disconnect) === null || T === void 0 || T.call(f), (C = (P = h).cancel) === null || C === void 0 || C.call(P);
|
328
328
|
};
|
329
|
-
}, [
|
329
|
+
}, [h, _]), Object.assign({ ref: S }, g);
|
330
330
|
}
|
331
331
|
function Lt(e) {
|
332
332
|
var t, r, a = "";
|
@@ -359,7 +359,7 @@ const On = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", Ln = "
|
|
359
359
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
360
360
|
}, []);
|
361
361
|
const u = `${a || Hn}px`;
|
362
|
-
return /* @__PURE__ */ o("div", { style: { minHeight: u }, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */
|
362
|
+
return /* @__PURE__ */ o("div", { style: { minHeight: u }, children: /* @__PURE__ */ o("div", { children: /* @__PURE__ */ p(
|
363
363
|
"div",
|
364
364
|
{
|
365
365
|
ref: r,
|
@@ -391,6 +391,7 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
391
391
|
}, zn = ({ label: e, to: t, icon: r }) => /* @__PURE__ */ o(D, { placement: "right", tooltip: e, children: /* @__PURE__ */ o(
|
392
392
|
U,
|
393
393
|
{
|
394
|
+
"aria-label": e,
|
394
395
|
className: j(ut.link, {
|
395
396
|
[ut.active]: window.location.pathname.startsWith(t)
|
396
397
|
}),
|
@@ -453,7 +454,7 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
453
454
|
return /* @__PURE__ */ o(
|
454
455
|
le,
|
455
456
|
{
|
456
|
-
menuButton: () => /* @__PURE__ */
|
457
|
+
menuButton: () => /* @__PURE__ */ p("button", { className: L.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
457
458
|
t != null && t.logoUrl ? /* @__PURE__ */ o(
|
458
459
|
"img",
|
459
460
|
{
|
@@ -486,7 +487,7 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
486
487
|
}) })
|
487
488
|
}
|
488
489
|
);
|
489
|
-
}, Ht = 0, sr = 9999, or = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === sr,
|
490
|
+
}, Ht = 0, sr = 9999, or = [150, 151, 250, 251], ir = [152, 153, 252, 253], cr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], lr = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Ht, Bt = (e) => e === sr, Qs = (e) => or.includes(e), Ws = (e) => ir.includes(e), Ys = (e) => cr.includes(e), Xs = (e) => lr.includes(e), Vs = (e) => e > Ht && e < qt, Zs = (e) => e === qt, ur = /\n/, mt = (e, t, r) => e.split(t).flatMap((a, s) => s !== 0 ? [tn(r, { key: Math.random().toString(32).slice(0, 10) }), a] : a), dr = (e, t, r) => typeof e == "string" ? mt(e, t, r) : e.flatMap((a) => typeof a == "string" ? mt(a, t, r) : a), mr = (e) => dr(e, ur, /* @__PURE__ */ o("br", {})), _r = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, gr = (e) => e.match(_r) ?? [], _t = (e, t, r) => {
|
490
491
|
const a = e.split(t);
|
491
492
|
if (a.length === 1)
|
492
493
|
return e;
|
@@ -497,16 +498,16 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
497
498
|
}, gt = (e) => {
|
498
499
|
const t = gr(e);
|
499
500
|
return t != null && t.length ? t.reduce((r, a, s) => typeof r == "string" ? _t(r, a, s) : r.flatMap((i) => typeof i == "string" ? _t(i, a, s) : i), e) : e;
|
500
|
-
},
|
501
|
+
}, hr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), pr = (e, t = "PP") => It(e, t), eo = (e, t, r = "PP") => It(mn(e, t), r), $e = (e) => {
|
501
502
|
Q(e, []);
|
502
|
-
},
|
503
|
+
}, ht = {
|
503
504
|
biller: "biller",
|
504
505
|
owner: "owner"
|
505
|
-
},
|
506
|
-
|
507
|
-
|
506
|
+
}, pt = [
|
507
|
+
ht.biller,
|
508
|
+
ht.owner
|
508
509
|
], fr = ({ children: e, config: t }) => {
|
509
|
-
const { teams: r, currentTeamId: a, planId: s, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((
|
510
|
+
const { teams: r, currentTeamId: a, planId: s, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = r.find((h) => h.id === a), l = r.filter((h) => h.id !== a), m = pt.includes(u), g = pt.includes(u), v = De(s) || Bt(s), b = {
|
510
511
|
...t,
|
511
512
|
currentTeam: d,
|
512
513
|
otherTeams: l,
|
@@ -528,7 +529,7 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
528
529
|
hideBottomDivider: a
|
529
530
|
}) => {
|
530
531
|
const { isEndOfTrialActive: s, isTeamSuspended: i } = V();
|
531
|
-
return s || i ? null : /* @__PURE__ */
|
532
|
+
return s || i ? null : /* @__PURE__ */ p(He, { children: [
|
532
533
|
/* @__PURE__ */ o(
|
533
534
|
W,
|
534
535
|
{
|
@@ -536,7 +537,7 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
536
537
|
onClick: () => {
|
537
538
|
t == null || t();
|
538
539
|
},
|
539
|
-
children: /* @__PURE__ */
|
540
|
+
children: /* @__PURE__ */ p("div", { className: `flex-col ${ft.container}`, children: [
|
540
541
|
/* @__PURE__ */ o("span", { children: "Profile Settings" }),
|
541
542
|
/* @__PURE__ */ o("span", { className: ft.profileEmail, children: r })
|
542
543
|
] })
|
@@ -544,59 +545,58 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
544
545
|
),
|
545
546
|
!a && /* @__PURE__ */ o(kt, {})
|
546
547
|
] });
|
547
|
-
}, yr = "_wrapper_1in7x_5", Er = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", wr = "_teamName_1in7x_36", Ar = "
|
548
|
+
}, yr = "_wrapper_1in7x_5", Er = "_profileImage_1in7x_11", Cr = "_teamDetails_1in7x_19", Pr = "_planWrapper_1in7x_28", wr = "_teamName_1in7x_36", Ar = "_membership_1in7x_53", Rr = "_defaultProfileImage_1in7x_59", O = {
|
548
549
|
wrapper: yr,
|
549
550
|
profileImage: Er,
|
550
551
|
teamDetails: Cr,
|
551
552
|
planWrapper: Pr,
|
552
553
|
teamName: wr,
|
553
|
-
|
554
|
-
|
555
|
-
defaultProfileImage: kr
|
554
|
+
membership: Ar,
|
555
|
+
defaultProfileImage: Rr
|
556
556
|
}, Dt = ({ team: e, onClick: t, hidePlanLabel: r }) => {
|
557
557
|
const { currentTeam: a, planId: s } = V(), i = e || a;
|
558
558
|
if (!i)
|
559
559
|
return null;
|
560
560
|
const c = De(s) ? "Free" : Bt(s) ? "Trial" : void 0;
|
561
|
-
return /* @__PURE__ */
|
561
|
+
return /* @__PURE__ */ p(
|
562
562
|
t ? W : "div",
|
563
563
|
{
|
564
564
|
className: O.wrapper,
|
565
565
|
...t && { onClick: () => t(i) },
|
566
566
|
children: [
|
567
|
-
i.logoUrl ? /* @__PURE__ */ o("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ o("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ o(Rt, { size: "25px" }) }),
|
568
|
-
/* @__PURE__ */
|
569
|
-
/* @__PURE__ */
|
570
|
-
/* @__PURE__ */ o("span", { className: O.teamName, children: i.name }),
|
571
|
-
c && !r && /* @__PURE__ */ o("span", { className:
|
567
|
+
i.logoUrl ? /* @__PURE__ */ o("img", { className: O.profileImage, src: i.logoUrl, alt: "Team logo" }) : /* @__PURE__ */ o("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ o(Rt, { size: "25px" }) }),
|
568
|
+
/* @__PURE__ */ p("div", { className: O.teamDetails, children: [
|
569
|
+
/* @__PURE__ */ p("div", { className: O.planWrapper, children: [
|
570
|
+
/* @__PURE__ */ o("span", { title: i.name, className: O.teamName, children: i.name }),
|
571
|
+
c && !r && /* @__PURE__ */ o("span", { className: O.teamName, children: c })
|
572
572
|
] }),
|
573
573
|
/* @__PURE__ */ o("span", { className: O.membership, children: i.role })
|
574
574
|
] })
|
575
575
|
]
|
576
576
|
}
|
577
577
|
);
|
578
|
-
},
|
579
|
-
teamsContainer:
|
580
|
-
},
|
578
|
+
}, kr = "_teamsContainer_1ncrr_5", Ir = {
|
579
|
+
teamsContainer: kr
|
580
|
+
}, jr = ({ onSwitchTeam: e }) => {
|
581
581
|
const { otherTeams: t } = V();
|
582
582
|
return t.length === 0 ? null : /* @__PURE__ */ o(
|
583
583
|
"div",
|
584
584
|
{
|
585
585
|
"data-testid": "sidebar-team-switch",
|
586
|
-
className: `flex-col items-stretch ${
|
586
|
+
className: `flex-col items-stretch ${Ir.teamsContainer}`,
|
587
587
|
children: t.map((r) => /* @__PURE__ */ o(Dt, { team: r, onClick: e, hidePlanLabel: !0 }, r.id))
|
588
588
|
}
|
589
589
|
);
|
590
|
-
},
|
591
|
-
container:
|
592
|
-
planCta:
|
593
|
-
upgradeIconWrapper:
|
594
|
-
},
|
590
|
+
}, Nr = "_container_1u995_1", Or = "_planCta_1u995_15", xr = "_upgradeIconWrapper_1u995_19", Ie = {
|
591
|
+
container: Nr,
|
592
|
+
planCta: Or,
|
593
|
+
upgradeIconWrapper: xr
|
594
|
+
}, Lr = ({ upgradeOptionHref: e }) => {
|
595
595
|
const { planId: t, trialDaysLeft: r, showUpgradeCta: a } = V();
|
596
596
|
if (!a)
|
597
597
|
return null;
|
598
598
|
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${r} ${r === 1 ? "day" : "days"}`;
|
599
|
-
return /* @__PURE__ */
|
599
|
+
return /* @__PURE__ */ p(
|
600
600
|
W,
|
601
601
|
{
|
602
602
|
"data-testid": "sidebar-upgrade-menu-item",
|
@@ -604,16 +604,16 @@ const qn = "_sidebarContainer_bmdti_1", Bn = {
|
|
604
604
|
className: `flex-col gap-1 items-start ${Ie.container}`,
|
605
605
|
children: [
|
606
606
|
/* @__PURE__ */ o("span", { className: Ie.planCta, children: c }),
|
607
|
-
/* @__PURE__ */
|
607
|
+
/* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${Ie.upgradeIconWrapper}`, children: [
|
608
608
|
/* @__PURE__ */ o(Mt, {}),
|
609
609
|
/* @__PURE__ */ o("span", { children: "See upgrade options" })
|
610
610
|
] })
|
611
611
|
]
|
612
612
|
}
|
613
613
|
);
|
614
|
-
},
|
614
|
+
}, Mr = Math.min, Ur = Math.max;
|
615
615
|
function bt(e, t, r) {
|
616
|
-
return
|
616
|
+
return Ur(e, Mr(t, r));
|
617
617
|
}
|
618
618
|
function $t(e, t) {
|
619
619
|
return typeof e == "function" ? e(t) : e;
|
@@ -621,13 +621,13 @@ function $t(e, t) {
|
|
621
621
|
function Gt(e) {
|
622
622
|
return e.split("-")[0];
|
623
623
|
}
|
624
|
-
function
|
624
|
+
function Hr(e) {
|
625
625
|
return e === "x" ? "y" : "x";
|
626
626
|
}
|
627
|
-
function
|
627
|
+
function qr(e) {
|
628
628
|
return ["top", "bottom"].includes(Gt(e)) ? "y" : "x";
|
629
629
|
}
|
630
|
-
function
|
630
|
+
function Br(e) {
|
631
631
|
return {
|
632
632
|
top: 0,
|
633
633
|
right: 0,
|
@@ -636,8 +636,8 @@ function Dr(e) {
|
|
636
636
|
...e
|
637
637
|
};
|
638
638
|
}
|
639
|
-
function
|
640
|
-
return typeof e != "number" ?
|
639
|
+
function Dr(e) {
|
640
|
+
return typeof e != "number" ? Br(e) : {
|
641
641
|
top: e,
|
642
642
|
right: e,
|
643
643
|
bottom: e,
|
@@ -662,7 +662,7 @@ function Tt(e) {
|
|
662
662
|
y: r
|
663
663
|
};
|
664
664
|
}
|
665
|
-
async function
|
665
|
+
async function $r(e, t) {
|
666
666
|
var r;
|
667
667
|
t === void 0 && (t = {});
|
668
668
|
const {
|
@@ -678,7 +678,7 @@ async function Gr(e, t) {
|
|
678
678
|
elementContext: g = "floating",
|
679
679
|
altBoundary: v = !1,
|
680
680
|
padding: S = 0
|
681
|
-
} = $t(t, e), _ =
|
681
|
+
} = $t(t, e), _ = Dr(S), b = u[v ? g === "floating" ? "reference" : "floating" : g], h = Tt(await i.getClippingRect({
|
682
682
|
element: (r = await (i.isElement == null ? void 0 : i.isElement(b))) == null || r ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
|
683
683
|
boundary: l,
|
684
684
|
rootBoundary: m,
|
@@ -701,13 +701,13 @@ async function Gr(e, t) {
|
|
701
701
|
strategy: d
|
702
702
|
}) : f);
|
703
703
|
return {
|
704
|
-
top: (
|
705
|
-
bottom: (C.bottom -
|
706
|
-
left: (
|
707
|
-
right: (C.right -
|
704
|
+
top: (h.top - C.top + _.top) / P.y,
|
705
|
+
bottom: (C.bottom - h.bottom + _.bottom) / P.y,
|
706
|
+
left: (h.left - C.left + _.left) / P.x,
|
707
|
+
right: (C.right - h.right + _.right) / P.x
|
708
708
|
};
|
709
709
|
}
|
710
|
-
const
|
710
|
+
const Gr = function(e) {
|
711
711
|
return e === void 0 && (e = {}), {
|
712
712
|
name: "shift",
|
713
713
|
options: e,
|
@@ -722,11 +722,11 @@ const Fr = function(e) {
|
|
722
722
|
limiter: u = {
|
723
723
|
fn: (b) => {
|
724
724
|
let {
|
725
|
-
x:
|
725
|
+
x: h,
|
726
726
|
y: f
|
727
727
|
} = b;
|
728
728
|
return {
|
729
|
-
x:
|
729
|
+
x: h,
|
730
730
|
y: f
|
731
731
|
};
|
732
732
|
}
|
@@ -735,14 +735,14 @@ const Fr = function(e) {
|
|
735
735
|
} = $t(e, t), l = {
|
736
736
|
x: r,
|
737
737
|
y: a
|
738
|
-
}, m = await
|
738
|
+
}, m = await $r(t, d), g = qr(Gt(s)), v = Hr(g);
|
739
739
|
let S = l[v], _ = l[g];
|
740
740
|
if (i) {
|
741
|
-
const b = v === "y" ? "top" : "left",
|
741
|
+
const b = v === "y" ? "top" : "left", h = v === "y" ? "bottom" : "right", f = S + m[b], T = S - m[h];
|
742
742
|
S = bt(f, S, T);
|
743
743
|
}
|
744
744
|
if (c) {
|
745
|
-
const b = g === "y" ? "top" : "left",
|
745
|
+
const b = g === "y" ? "top" : "left", h = g === "y" ? "bottom" : "right", f = _ + m[b], T = _ - m[h];
|
746
746
|
_ = bt(f, _, T);
|
747
747
|
}
|
748
748
|
const E = u.fn({
|
@@ -763,14 +763,14 @@ const Fr = function(e) {
|
|
763
763
|
};
|
764
764
|
}
|
765
765
|
};
|
766
|
-
},
|
767
|
-
navItem:
|
768
|
-
activeNavItem:
|
769
|
-
badge:
|
770
|
-
}, Ft = wt({}), Z = () => Pt(Ft),
|
766
|
+
}, Fr = "_navItem_1dudv_1", Kr = "_activeNavItem_1dudv_18", zr = "_badge_1dudv_23", je = {
|
767
|
+
navItem: Fr,
|
768
|
+
activeNavItem: Kr,
|
769
|
+
badge: zr
|
770
|
+
}, Ft = wt({}), Z = () => Pt(Ft), Jr = (e) => {
|
771
771
|
const t = e.lastIndexOf("."), r = e.slice(0, t), a = e.slice(t + 1);
|
772
772
|
return { name: r, extension: a };
|
773
|
-
},
|
773
|
+
}, Qr = (e, t) => {
|
774
774
|
switch (e) {
|
775
775
|
case A.Completed:
|
776
776
|
return t < 100 ? "Closed" : "Completed";
|
@@ -785,26 +785,26 @@ const Fr = function(e) {
|
|
785
785
|
default:
|
786
786
|
return "-";
|
787
787
|
}
|
788
|
-
},
|
788
|
+
}, Wr = (e) => {
|
789
789
|
const t = e.progress ?? 0;
|
790
790
|
return e.status === A.Created && t > 0 ? A.InProgress : e.status;
|
791
|
-
},
|
791
|
+
}, Yr = {
|
792
792
|
[ae.translation]: "#0891B2",
|
793
793
|
[ae.review]: "#16922D",
|
794
794
|
[ae.lqa_by_ai]: "#8B5CF6",
|
795
795
|
[ae.automatic_translation]: "#60A5FA"
|
796
|
-
},
|
796
|
+
}, Xr = (e) => {
|
797
797
|
const t = [
|
798
798
|
A.InProgress,
|
799
799
|
A.Created,
|
800
800
|
A.Completed
|
801
801
|
];
|
802
|
-
return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status:
|
803
|
-
}, vt = (e) => [Le.InProgress, Le.Created].includes(e),
|
802
|
+
return e.filter((r) => r.status !== "queued").map((r) => ({ ...r, status: Wr(r) })).sort((r, a) => r.status === A.InProgress && r.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : r.status === a.status ? r.name < a.name ? 1 : -1 : t.indexOf(r.status) - t.indexOf(a.status));
|
803
|
+
}, vt = (e) => [Le.InProgress, Le.Created].includes(e), Vr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Zr = ({ task: e, language: t }) => {
|
804
804
|
const [r, a] = I(!1), [s, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = Z(), d = () => {
|
805
805
|
i(!1);
|
806
806
|
};
|
807
|
-
return /* @__PURE__ */
|
807
|
+
return /* @__PURE__ */ p(He, { children: [
|
808
808
|
s && /* @__PURE__ */ o(
|
809
809
|
an,
|
810
810
|
{
|
@@ -817,7 +817,7 @@ const Fr = function(e) {
|
|
817
817
|
onConfirm: async () => {
|
818
818
|
a(!0), await c({ task: e, language: t, closePrompt: d }), u();
|
819
819
|
},
|
820
|
-
children: /* @__PURE__ */
|
820
|
+
children: /* @__PURE__ */ p(sn, { status: "info", children: [
|
821
821
|
"Make sure you are finished and ",
|
822
822
|
/* @__PURE__ */ o("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."
|
@@ -835,13 +835,13 @@ const Fr = function(e) {
|
|
835
835
|
}
|
836
836
|
)
|
837
837
|
] });
|
838
|
-
},
|
839
|
-
langRowCompleted:
|
840
|
-
langCellSecondary:
|
841
|
-
langStatus:
|
842
|
-
},
|
843
|
-
const { getProjectUrl: r, langNameOnClick: a, langProgressOnClick: s } = Z(), i = e.progress ?? 0, c = e.status === A.Completed, u =
|
844
|
-
return /* @__PURE__ */
|
838
|
+
}, ea = "_langRowCompleted_vpgdi_1", ta = "_langCellSecondary_vpgdi_15", na = "_langStatus_vpgdi_20", Ne = {
|
839
|
+
langRowCompleted: ea,
|
840
|
+
langCellSecondary: ta,
|
841
|
+
langStatus: na
|
842
|
+
}, ra = ({ language: e, task: t }) => {
|
843
|
+
const { getProjectUrl: r, langNameOnClick: a, langProgressOnClick: s } = Z(), i = e.progress ?? 0, c = e.status === A.Completed, u = Vr(t, e);
|
844
|
+
return /* @__PURE__ */ p(
|
845
845
|
"tr",
|
846
846
|
{
|
847
847
|
className: j({
|
@@ -868,42 +868,42 @@ const Fr = function(e) {
|
|
868
868
|
children: e.base_words_total - e.base_words_done
|
869
869
|
}
|
870
870
|
) }) }),
|
871
|
-
/* @__PURE__ */
|
871
|
+
/* @__PURE__ */ p("td", { children: [
|
872
872
|
i,
|
873
873
|
"%"
|
874
874
|
] }),
|
875
|
-
/* @__PURE__ */ o("td", { children: u ? /* @__PURE__ */ o(
|
875
|
+
/* @__PURE__ */ o("td", { children: u ? /* @__PURE__ */ o(Zr, { task: t, language: e }) : /* @__PURE__ */ o(
|
876
876
|
"span",
|
877
877
|
{
|
878
878
|
className: `${Ne.langStatus} flex-row items-center justify-start`,
|
879
879
|
"data-status": e.status,
|
880
|
-
children:
|
880
|
+
children: Qr(e.status, i)
|
881
881
|
}
|
882
882
|
) })
|
883
883
|
]
|
884
884
|
}
|
885
885
|
);
|
886
|
-
},
|
887
|
-
taskContainer:
|
888
|
-
taskTitle:
|
889
|
-
taskDescription:
|
890
|
-
languagesTable:
|
891
|
-
metadata:
|
892
|
-
},
|
893
|
-
const { getProjectUrl: t, taskTitleOnClick: r } = Z(), a =
|
886
|
+
}, aa = "_taskContainer_mt2or_1", sa = "_taskTitle_mt2or_21", oa = "_taskDescription_mt2or_28", ia = "_languagesTable_mt2or_35", ca = "_metadata_mt2or_87", q = {
|
887
|
+
taskContainer: aa,
|
888
|
+
taskTitle: sa,
|
889
|
+
taskDescription: oa,
|
890
|
+
languagesTable: ia,
|
891
|
+
metadata: ca
|
892
|
+
}, la = ({ task: e }) => {
|
893
|
+
const { getProjectUrl: t, taskTitleOnClick: r } = Z(), a = Xr(e.langs), s = (i) => {
|
894
894
|
window.open(
|
895
895
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
896
896
|
"_blank",
|
897
897
|
"noopener,noreferrer"
|
898
898
|
);
|
899
899
|
};
|
900
|
-
return /* @__PURE__ */
|
901
|
-
/* @__PURE__ */
|
902
|
-
/* @__PURE__ */
|
903
|
-
/* @__PURE__ */ o(Oe, { color:
|
904
|
-
e.due_date && /* @__PURE__ */
|
900
|
+
return /* @__PURE__ */ p("div", { className: q.taskContainer, children: [
|
901
|
+
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-center", children: [
|
902
|
+
/* @__PURE__ */ p("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
903
|
+
/* @__PURE__ */ o(Oe, { color: Yr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
904
|
+
e.due_date && /* @__PURE__ */ p(Oe, { color: "#EAB308", children: [
|
905
905
|
"DUE ",
|
906
|
-
|
906
|
+
pr(un(e.due_date), "yyyy-MM-dd")
|
907
907
|
] })
|
908
908
|
] }),
|
909
909
|
e.style_guides.length > 0 && /* @__PURE__ */ o("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ o(
|
@@ -922,7 +922,7 @@ const Fr = function(e) {
|
|
922
922
|
W,
|
923
923
|
{
|
924
924
|
onClick: () => s(i),
|
925
|
-
children:
|
925
|
+
children: Jr(i.name).name
|
926
926
|
},
|
927
927
|
i.id
|
928
928
|
)) })
|
@@ -939,23 +939,23 @@ const Fr = function(e) {
|
|
939
939
|
children: e.title
|
940
940
|
}
|
941
941
|
) }),
|
942
|
-
e.description && /* @__PURE__ */ o("div", { className: q.taskDescription, children: mr(
|
943
|
-
/* @__PURE__ */
|
944
|
-
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */
|
942
|
+
e.description && /* @__PURE__ */ o("div", { className: q.taskDescription, children: mr(hr(e.description)) }),
|
943
|
+
/* @__PURE__ */ p("table", { className: q.languagesTable, children: [
|
944
|
+
/* @__PURE__ */ o("thead", { children: /* @__PURE__ */ p("tr", { children: [
|
945
945
|
/* @__PURE__ */ o("th", { children: "Languages" }),
|
946
946
|
/* @__PURE__ */ o("th", { children: "Words to do" }),
|
947
947
|
/* @__PURE__ */ o("th", { children: "Progress" }),
|
948
948
|
/* @__PURE__ */ o("th", { children: "Status" })
|
949
949
|
] }) }),
|
950
|
-
/* @__PURE__ */ o("tbody", { children: a.map((i) => /* @__PURE__ */ o(
|
950
|
+
/* @__PURE__ */ o("tbody", { children: a.map((i) => /* @__PURE__ */ o(ra, { language: i, task: e }, i.lang_id)) })
|
951
951
|
] }),
|
952
|
-
/* @__PURE__ */
|
953
|
-
/* @__PURE__ */
|
952
|
+
/* @__PURE__ */ p("div", { "data-testid": "sidebar-task-overview-metadata", className: q.metadata, children: [
|
953
|
+
/* @__PURE__ */ p("span", { children: [
|
954
954
|
"Source: ",
|
955
955
|
e.source_lang_name
|
956
956
|
] }),
|
957
957
|
/* @__PURE__ */ o("span", { children: e.created_by_fullname }),
|
958
|
-
/* @__PURE__ */
|
958
|
+
/* @__PURE__ */ p("span", { children: [
|
959
959
|
"In ",
|
960
960
|
e.project_name,
|
961
961
|
e.master_branching_enabled === "1" && /* @__PURE__ */ o("div", { className: q.tag, children: e.branch_name ? e.branch_name : "master" })
|
@@ -967,12 +967,12 @@ const Fr = function(e) {
|
|
967
967
|
TaskClosed: "task_closed",
|
968
968
|
Refresh: "refresh",
|
969
969
|
ShowDialog: "show_dialog"
|
970
|
-
},
|
971
|
-
loadingContainer:
|
972
|
-
noTasksContainer:
|
973
|
-
noTasksHeading:
|
974
|
-
noTasksText:
|
975
|
-
tasksContainer:
|
970
|
+
}, ua = "_loadingContainer_19d6m_1", da = "_noTasksContainer_19d6m_7", ma = "_noTasksHeading_19d6m_14", _a = "_noTasksText_19d6m_18", ga = "_tasksContainer_19d6m_23", K = {
|
971
|
+
loadingContainer: ua,
|
972
|
+
noTasksContainer: da,
|
973
|
+
noTasksHeading: ma,
|
974
|
+
noTasksText: _a,
|
975
|
+
tasksContainer: ga
|
976
976
|
}, ha = () => {
|
977
977
|
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: r, fetchTasks: a } = Z();
|
978
978
|
return $e(() => ((async () => {
|
@@ -980,15 +980,15 @@ const Fr = function(e) {
|
|
980
980
|
t == null || t({ tasks: i });
|
981
981
|
})(), document.addEventListener(w.TaskCompleted, a), document.addEventListener(w.TaskClosed, a), document.addEventListener(w.Refresh, a), () => {
|
982
982
|
document.removeEventListener(w.TaskCompleted, a), document.removeEventListener(w.TaskClosed, a), document.removeEventListener(w.Refresh, a);
|
983
|
-
})), r ? /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-loading-popover", className: K.loadingContainer, children: /* @__PURE__ */ o(on, {}) }) : e.length === 0 ? /* @__PURE__ */
|
983
|
+
})), r ? /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-loading-popover", className: K.loadingContainer, children: /* @__PURE__ */ o(on, {}) }) : e.length === 0 ? /* @__PURE__ */ p("div", { "data-testid": "sidebar-no-tasks-popover", className: K.noTasksContainer, children: [
|
984
984
|
/* @__PURE__ */ o("h3", { className: K.noTasksHeading, children: "No tasks" }),
|
985
|
-
/* @__PURE__ */
|
985
|
+
/* @__PURE__ */ p("div", { className: K.noTasksText, children: [
|
986
986
|
"Your incoming tasks will appear here.",
|
987
987
|
/* @__PURE__ */ o("br", {}),
|
988
988
|
/* @__PURE__ */ o(U, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
989
989
|
] })
|
990
|
-
] }) : /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-popover", className: K.tasksContainer, children: e.map((s) => /* @__PURE__ */ o(
|
991
|
-
},
|
990
|
+
] }) : /* @__PURE__ */ o("div", { "data-testid": "sidebar-tasks-popover", className: K.tasksContainer, children: e.map((s) => /* @__PURE__ */ o(la, { task: s }, s.id)) });
|
991
|
+
}, pa = ({ children: e, config: t }) => {
|
992
992
|
const [r, a] = I([]), [s, i] = I(!0), [c, u] = I(0), {
|
993
993
|
getProjectUrl: d,
|
994
994
|
onLanguageCompleteConfirm: l,
|
@@ -1000,12 +1000,12 @@ const Fr = function(e) {
|
|
1000
1000
|
i(!0);
|
1001
1001
|
const T = await _();
|
1002
1002
|
return a(T), i(!1), T;
|
1003
|
-
},
|
1003
|
+
}, h = async () => {
|
1004
1004
|
const T = await E();
|
1005
1005
|
u(T);
|
1006
1006
|
};
|
1007
|
-
$e(() => (
|
1008
|
-
document.removeEventListener(w.TaskCompleted,
|
1007
|
+
$e(() => (h(), document.addEventListener(w.TaskCompleted, h), document.addEventListener(w.TaskClosed, h), document.addEventListener(w.Refresh, h), () => {
|
1008
|
+
document.removeEventListener(w.TaskCompleted, h), document.removeEventListener(w.TaskClosed, h), document.removeEventListener(w.Refresh, h);
|
1009
1009
|
}));
|
1010
1010
|
const f = {
|
1011
1011
|
fetchTasks: b,
|
@@ -1020,10 +1020,10 @@ const Fr = function(e) {
|
|
1020
1020
|
taskTitleOnClick: S
|
1021
1021
|
};
|
1022
1022
|
return /* @__PURE__ */ o(Ft.Provider, { value: f, children: e });
|
1023
|
-
},
|
1023
|
+
}, fa = (e) => function(r) {
|
1024
1024
|
const { config: a, ...s } = r;
|
1025
|
-
return /* @__PURE__ */ o(
|
1026
|
-
},
|
1025
|
+
return /* @__PURE__ */ o(pa, { config: a, children: /* @__PURE__ */ o(e, { ...s }) });
|
1026
|
+
}, ba = fa(() => {
|
1027
1027
|
const [e, t] = I(!1), { tasksCount: r } = Z();
|
1028
1028
|
return $e(() => {
|
1029
1029
|
const a = () => {
|
@@ -1040,7 +1040,7 @@ const Fr = function(e) {
|
|
1040
1040
|
open: e,
|
1041
1041
|
onOpenChange: t,
|
1042
1042
|
middlewares: [
|
1043
|
-
|
1043
|
+
Gr({
|
1044
1044
|
// Adding some spacing to the top and bottom so the popover
|
1045
1045
|
// doesn't extend to the edges of the screen.
|
1046
1046
|
padding: {
|
@@ -1049,7 +1049,7 @@ const Fr = function(e) {
|
|
1049
1049
|
}
|
1050
1050
|
})
|
1051
1051
|
],
|
1052
|
-
children: (a) => /* @__PURE__ */
|
1052
|
+
children: (a) => /* @__PURE__ */ p(
|
1053
1053
|
xe,
|
1054
1054
|
{
|
1055
1055
|
type: "button",
|
@@ -1066,37 +1066,37 @@ const Fr = function(e) {
|
|
1066
1066
|
)
|
1067
1067
|
}
|
1068
1068
|
) });
|
1069
|
-
}), R = ({ children: e, ...t }) => /* @__PURE__ */ o("nav", { ...t, className: Bn.sidebarContainer, children: e }),
|
1070
|
-
R.Top =
|
1071
|
-
const
|
1072
|
-
R.Bottom =
|
1069
|
+
}), R = ({ children: e, ...t }) => /* @__PURE__ */ o("nav", { ...t, className: Bn.sidebarContainer, children: e }), Ta = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
|
1070
|
+
R.Top = Ta;
|
1071
|
+
const va = ({ children: e }) => /* @__PURE__ */ o("div", { children: e });
|
1072
|
+
R.Bottom = va;
|
1073
1073
|
R.Avatar = Gn;
|
1074
1074
|
R.IconLink = zn;
|
1075
1075
|
R.Menu = Wn;
|
1076
1076
|
R.ProfileMenu = br;
|
1077
|
-
R.TeamSwitch =
|
1077
|
+
R.TeamSwitch = jr;
|
1078
1078
|
R.TeamMenuItem = Dt;
|
1079
|
-
R.UpgradeMenuItem =
|
1079
|
+
R.UpgradeMenuItem = Lr;
|
1080
1080
|
R.ProfileSettingsMenuItem = Sr;
|
1081
|
-
R.Tasks =
|
1082
|
-
const
|
1083
|
-
breadcrumbsItem:
|
1084
|
-
breadcrumbs:
|
1085
|
-
},
|
1081
|
+
R.Tasks = ba;
|
1082
|
+
const Sa = "_breadcrumbsItem_1hm6a_1", ya = "_breadcrumbs_1hm6a_1", St = {
|
1083
|
+
breadcrumbsItem: Sa,
|
1084
|
+
breadcrumbs: ya
|
1085
|
+
}, to = ({ items: e }) => /* @__PURE__ */ o("nav", { "aria-label": "breadcrumb", className: St.breadcrumbs, children: e.map((t, r) => /* @__PURE__ */ p(At, { children: [
|
1086
1086
|
/* @__PURE__ */ o(U, { className: St.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1087
1087
|
r < e.length - 1 && /* @__PURE__ */ o("span", { children: " — " })
|
1088
|
-
] }, `${t.link}-${t.name}`)) }),
|
1088
|
+
] }, `${t.link}-${t.name}`)) }), Ea = ({ items: e }) => /* @__PURE__ */ o(He, { children: e.map((t, r) => /* @__PURE__ */ p(At, { children: [
|
1089
1089
|
!!r && t.some((a) => a.visible) && /* @__PURE__ */ o(kt, {}),
|
1090
1090
|
t.filter(({ visible: a }) => a).map(({ link: a, label: s, onClick: i }) => /* @__PURE__ */ o(W, { href: a || "#", "aria-label": s, onClick: i, children: s }, s))
|
1091
|
-
] }, t[0].label)) }),
|
1092
|
-
badge:
|
1093
|
-
tag:
|
1094
|
-
withNavLinkStyle:
|
1095
|
-
disabled:
|
1096
|
-
projectNavigationItem:
|
1097
|
-
projectNavigationItemDisabled:
|
1098
|
-
}, yt = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */
|
1099
|
-
/* @__PURE__ */
|
1091
|
+
] }, t[0].label)) }), Ca = "_badge_1pc1v_1", Pa = "_tag_1pc1v_15", wa = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", Aa = "_disabled_1pc1v_57", Ra = "_projectNavigationItem_1pc1v_61", ka = "_projectNavigationItemDisabled_1pc1v_67", M = {
|
1092
|
+
badge: Ca,
|
1093
|
+
tag: Pa,
|
1094
|
+
withNavLinkStyle: wa,
|
1095
|
+
disabled: Aa,
|
1096
|
+
projectNavigationItem: Ra,
|
1097
|
+
projectNavigationItemDisabled: ka
|
1098
|
+
}, yt = ({ label: e, badge: t, novel: r }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
|
1099
|
+
/* @__PURE__ */ p("div", { children: [
|
1100
1100
|
/* @__PURE__ */ o("span", { children: e }),
|
1101
1101
|
!!t && /* @__PURE__ */ o("div", { className: M.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1102
1102
|
] }),
|
@@ -1123,7 +1123,7 @@ const ya = "_breadcrumbsItem_1hm6a_1", Ea = "_breadcrumbs_1hm6a_1", St = {
|
|
1123
1123
|
) })
|
1124
1124
|
);
|
1125
1125
|
Me.displayName = "NavigationTabsItem";
|
1126
|
-
const
|
1126
|
+
const Ia = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible))) ?? !1, ja = (e) => e.visible && (!e.dropdown || Ia(e.dropdown)), no = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ o("nav", { "aria-label": "Project", children: /* @__PURE__ */ o("ul", { className: B.navigationTabList, "aria-orientation": "horizontal", children: e.filter(ja).map((r) => {
|
1127
1127
|
var a, s, i;
|
1128
1128
|
return r.dropdown ? /* @__PURE__ */ o(
|
1129
1129
|
"li",
|
@@ -1135,7 +1135,7 @@ const ja = (e) => (e == null ? void 0 : e.some((t) => t.some((r) => r.visible)))
|
|
1135
1135
|
le,
|
1136
1136
|
{
|
1137
1137
|
menuButton: ({ opened: c }) => /* @__PURE__ */ o(Me, { label: r.label, disabled: r.disabled, active: c }),
|
1138
|
-
children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(
|
1138
|
+
children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(Ea, { items: r.dropdown }) })
|
1139
1139
|
}
|
1140
1140
|
)
|
1141
1141
|
},
|
@@ -1303,9 +1303,9 @@ class k {
|
|
1303
1303
|
}
|
1304
1304
|
}
|
1305
1305
|
function Kt(e) {
|
1306
|
-
return new
|
1306
|
+
return new Na(e);
|
1307
1307
|
}
|
1308
|
-
class
|
1308
|
+
class Na {
|
1309
1309
|
constructor(t) {
|
1310
1310
|
this.middleware = t;
|
1311
1311
|
}
|
@@ -1321,7 +1321,7 @@ const zt = n.union([
|
|
1321
1321
|
n.literal("admin"),
|
1322
1322
|
n.literal("biller"),
|
1323
1323
|
n.literal("member")
|
1324
|
-
]),
|
1324
|
+
]), Oa = n.object({
|
1325
1325
|
userId: n.number(),
|
1326
1326
|
userUuid: n.string().uuid(),
|
1327
1327
|
teamId: n.number(),
|
@@ -1339,7 +1339,7 @@ const zt = n.union([
|
|
1339
1339
|
function ee(e) {
|
1340
1340
|
try {
|
1341
1341
|
const t = e.split(".")[1], r = atob(t);
|
1342
|
-
return
|
1342
|
+
return Oa.parse(JSON.parse(r));
|
1343
1343
|
} catch {
|
1344
1344
|
return;
|
1345
1345
|
}
|
@@ -1351,7 +1351,7 @@ class ie extends Error {
|
|
1351
1351
|
re(this, "status", 401);
|
1352
1352
|
}
|
1353
1353
|
}
|
1354
|
-
function
|
1354
|
+
function ro(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));
|
@@ -1366,21 +1366,21 @@ function ao(e) {
|
|
1366
1366
|
return (c = e.onNewTokenIssued) == null || c.call(e, s), t.add("authorization", `Bearer ${s.accessToken}`);
|
1367
1367
|
});
|
1368
1368
|
}
|
1369
|
-
const
|
1369
|
+
const ao = Kt(
|
1370
1370
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1371
1371
|
);
|
1372
1372
|
function Jt() {
|
1373
1373
|
const e = Ue(document.cookie, "accessToken"), t = Ue(document.cookie, "refreshToken");
|
1374
1374
|
return !e || !t ? null : { accessToken: e, refreshToken: t };
|
1375
1375
|
}
|
1376
|
-
function
|
1376
|
+
function xa() {
|
1377
1377
|
return Ue(document.cookie, "csrf_token") ?? null;
|
1378
1378
|
}
|
1379
1379
|
function Ue(e, t) {
|
1380
1380
|
var r, a;
|
1381
1381
|
return (a = (r = e.split(";").find((s) => s.trim().startsWith(`${t}=`))) == null ? void 0 : r.trim()) == null ? void 0 : a.substring(t.length + 1);
|
1382
1382
|
}
|
1383
|
-
function
|
1383
|
+
function so() {
|
1384
1384
|
const e = Jt();
|
1385
1385
|
if (!e)
|
1386
1386
|
return;
|
@@ -1391,40 +1391,40 @@ function oo() {
|
|
1391
1391
|
const Qt = n.union([
|
1392
1392
|
n.object({ authorization: n.string() }),
|
1393
1393
|
n.object({ AUTHORIZATION: n.string() })
|
1394
|
-
]),
|
1394
|
+
]), La = n.union([
|
1395
1395
|
n.object({ "X-API-Token": n.string() }),
|
1396
1396
|
n.object({ "X-Api-Token": n.string() }),
|
1397
1397
|
n.object({ "x-api-token": n.string() }),
|
1398
1398
|
n.object({ "X-API-TOKEN": n.string() })
|
1399
|
-
]),
|
1399
|
+
]), Ma = n.union([
|
1400
1400
|
Qt,
|
1401
|
-
|
1402
|
-
]),
|
1401
|
+
La
|
1402
|
+
]), Ua = n.union([
|
1403
1403
|
n.object({ "X-Lokalise-Plugin": n.string() }),
|
1404
1404
|
n.object({ "x-lokalise-plugin": n.string() }),
|
1405
1405
|
n.object({ "X-LOKALISE-PLUGIN": n.string() })
|
1406
|
-
]), x =
|
1406
|
+
]), x = Ma.and(Ua), Ha = n.object({
|
1407
1407
|
accessToken: n.string(),
|
1408
1408
|
refreshToken: n.string()
|
1409
|
-
}),
|
1409
|
+
}), qa = n.union([
|
1410
1410
|
n.object({ "X-Csrf-Token": n.string() }),
|
1411
1411
|
n.object({ "X-CSRF-Token": n.string() }),
|
1412
1412
|
n.object({ "x-csrf-token": n.string() }),
|
1413
1413
|
n.object({ "X-CSRF-TOKEN": n.string() })
|
1414
|
-
]),
|
1414
|
+
]), Ba = n.union([
|
1415
1415
|
Qt,
|
1416
|
-
|
1416
|
+
qa
|
1417
1417
|
]), Ge = Y({
|
1418
1418
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1419
1419
|
method: "post",
|
1420
1420
|
requestPathParamsSchema: n.object({ teamId: n.number() }),
|
1421
1421
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1422
|
-
requestHeaderSchema:
|
1422
|
+
requestHeaderSchema: Ba,
|
1423
1423
|
requestBodySchema: n.undefined(),
|
1424
1424
|
isEmptyResponseExpected: !0,
|
1425
|
-
successResponseBodySchema:
|
1425
|
+
successResponseBodySchema: Ha
|
1426
1426
|
});
|
1427
|
-
function
|
1427
|
+
function oo(e, t, r) {
|
1428
1428
|
return async () => {
|
1429
1429
|
const a = t();
|
1430
1430
|
if (!a)
|
@@ -1435,7 +1435,7 @@ function io(e, t, r) {
|
|
1435
1435
|
});
|
1436
1436
|
};
|
1437
1437
|
}
|
1438
|
-
function
|
1438
|
+
function io(e) {
|
1439
1439
|
return async ({ accessToken: t, refreshToken: r }) => {
|
1440
1440
|
const a = ee(t);
|
1441
1441
|
if (!a)
|
@@ -1446,9 +1446,9 @@ function co(e) {
|
|
1446
1446
|
});
|
1447
1447
|
};
|
1448
1448
|
}
|
1449
|
-
const
|
1449
|
+
const Da = {
|
1450
1450
|
teamKey: (e) => ["getUserToken", e]
|
1451
|
-
},
|
1451
|
+
}, $a = (e, t, r) => H({
|
1452
1452
|
...r,
|
1453
1453
|
queryFn: async ({ queryKey: [a, s] }) => $(e, Ge, {
|
1454
1454
|
headers: await t.resolve(),
|
@@ -1463,9 +1463,9 @@ const $a = {
|
|
1463
1463
|
};
|
1464
1464
|
re(ce, "eventName", "new-jwt-issued");
|
1465
1465
|
let J = ce;
|
1466
|
-
function
|
1467
|
-
const a =
|
1468
|
-
queryKey:
|
1466
|
+
function co(e, t, r) {
|
1467
|
+
const a = xa(), s = $a(e, t.add("x-csrf-token", a ?? ""), {
|
1468
|
+
queryKey: Da.teamKey(r),
|
1469
1469
|
enabled: a !== void 0
|
1470
1470
|
}), i = Ct();
|
1471
1471
|
return Q(() => {
|
@@ -1483,102 +1483,102 @@ function Wt() {
|
|
1483
1483
|
};
|
1484
1484
|
}, []), e;
|
1485
1485
|
}
|
1486
|
-
const
|
1486
|
+
const Ga = x, Fa = n.object({
|
1487
1487
|
user_id: n.number(),
|
1488
1488
|
email: n.string().email(),
|
1489
1489
|
fullname: n.string(),
|
1490
1490
|
created_at: n.string(),
|
1491
1491
|
created_at_timestamp: n.number(),
|
1492
1492
|
role: zt
|
1493
|
-
}),
|
1493
|
+
}), Ka = n.object({
|
1494
1494
|
teamId: n.number(),
|
1495
1495
|
userId: n.number()
|
1496
|
-
}),
|
1496
|
+
}), za = n.object({
|
1497
1497
|
team_id: n.number(),
|
1498
|
-
team_user:
|
1499
|
-
}),
|
1498
|
+
team_user: Fa
|
1499
|
+
}), Ja = X({
|
1500
1500
|
description: "Get the details of a team user",
|
1501
|
-
requestHeaderSchema:
|
1502
|
-
requestPathParamsSchema:
|
1501
|
+
requestHeaderSchema: Ga,
|
1502
|
+
requestPathParamsSchema: Ka,
|
1503
1503
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1504
|
-
successResponseBodySchema:
|
1505
|
-
}),
|
1504
|
+
successResponseBodySchema: za
|
1505
|
+
}), Qa = {
|
1506
1506
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1507
|
-
},
|
1507
|
+
}, Wa = (e, t, r) => H({
|
1508
1508
|
...r,
|
1509
|
-
queryFn: async ({ queryKey: [a, s, i] }) => G(e,
|
1509
|
+
queryFn: async ({ queryKey: [a, s, i] }) => G(e, Ja, {
|
1510
1510
|
headers: await t.resolve(),
|
1511
1511
|
pathParams: { teamId: s, userId: i }
|
1512
1512
|
})
|
1513
1513
|
});
|
1514
|
-
function
|
1514
|
+
function lo(e, t) {
|
1515
1515
|
const r = Wt();
|
1516
|
-
return
|
1517
|
-
queryKey:
|
1516
|
+
return Wa(e, t, {
|
1517
|
+
queryKey: Qa.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 uo = x, Ya = n.object({
|
1522
1522
|
lang_id: n.number(),
|
1523
1523
|
lang_iso: n.string(),
|
1524
1524
|
lang_name: n.string(),
|
1525
1525
|
is_writable: n.union([n.literal(0), n.literal(1)])
|
1526
|
-
}),
|
1526
|
+
}), Xa = n.object({
|
1527
1527
|
user_id: n.number(),
|
1528
1528
|
email: n.string().email(),
|
1529
1529
|
fullname: n.string(),
|
1530
1530
|
created_at: n.string(),
|
1531
1531
|
created_at_timestamp: n.number(),
|
1532
1532
|
admin_rights: n.array(n.string()),
|
1533
|
-
languages: n.array(
|
1533
|
+
languages: n.array(Ya),
|
1534
1534
|
is_admin: n.boolean(),
|
1535
1535
|
is_reviewer: n.boolean()
|
1536
|
-
}),
|
1536
|
+
}), Va = n.union([
|
1537
1537
|
n.object({ uuid: n.string().uuid() }),
|
1538
1538
|
n.object({ id: n.string() })
|
1539
|
-
]),
|
1539
|
+
]), Za = n.union([
|
1540
1540
|
n.object({ authenticatedUser: n.literal(!0) }),
|
1541
1541
|
n.object({ uuid: n.string().uuid() }),
|
1542
1542
|
n.object({ id: n.number() })
|
1543
|
-
]),
|
1544
|
-
project:
|
1545
|
-
contributor:
|
1546
|
-
}),
|
1543
|
+
]), es = n.object({
|
1544
|
+
project: Va,
|
1545
|
+
contributor: Za
|
1546
|
+
}), ts = n.object({
|
1547
1547
|
project_id: n.string(),
|
1548
|
-
contributor:
|
1549
|
-
}),
|
1548
|
+
contributor: Xa
|
1549
|
+
}), ns = (e) => "authenticatedUser" in e ? "me" : "uuid" in e ? e.uuid : `${e.id}`, rs = (e) => "uuid" in e ? e.uuid : e.id, as = X({
|
1550
1550
|
description: "Get the details of a project contributor",
|
1551
1551
|
requestHeaderSchema: x,
|
1552
|
-
requestPathParamsSchema:
|
1553
|
-
pathResolver: ({ project: e, contributor: t }) => `/projects/${
|
1554
|
-
successResponseBodySchema:
|
1555
|
-
}),
|
1552
|
+
requestPathParamsSchema: es,
|
1553
|
+
pathResolver: ({ project: e, contributor: t }) => `/projects/${rs(e)}/contributors/${ns(t)}`,
|
1554
|
+
successResponseBodySchema: ts
|
1555
|
+
}), ss = {
|
1556
1556
|
projectUserKey: (e) => ["RetrieveContributor", e]
|
1557
|
-
},
|
1557
|
+
}, os = (e, t, r) => H({
|
1558
1558
|
...r,
|
1559
|
-
queryFn: async ({ queryKey: [a, s] }) => G(e,
|
1559
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, as, {
|
1560
1560
|
pathParams: s,
|
1561
1561
|
headers: await t.resolve()
|
1562
1562
|
})
|
1563
1563
|
});
|
1564
|
-
function
|
1564
|
+
function mo(e, t, r) {
|
1565
1565
|
const a = Wt(), s = a != null && a.userId ? { id: a.userId } : { authenticatedUser: !0 };
|
1566
|
-
return
|
1567
|
-
queryKey:
|
1566
|
+
return os(e, t, {
|
1567
|
+
queryKey: ss.projectUserKey({ project: { id: r }, contributor: s }),
|
1568
1568
|
enabled: a !== void 0
|
1569
1569
|
});
|
1570
1570
|
}
|
1571
|
-
const
|
1571
|
+
const is = n.object({
|
1572
1572
|
lang_iso: n.string(),
|
1573
1573
|
custom_iso: n.string().optional()
|
1574
|
-
}),
|
1574
|
+
}), cs = n.object({
|
1575
1575
|
language_id: n.number(),
|
1576
1576
|
language_iso: n.string(),
|
1577
1577
|
progress: n.number(),
|
1578
1578
|
words_to_do: n.number(),
|
1579
1579
|
project_language_id: n.number(),
|
1580
1580
|
project_language_uuid: n.string().uuid()
|
1581
|
-
}),
|
1581
|
+
}), ls = n.object({
|
1582
1582
|
projectId: n.string()
|
1583
1583
|
}), Yt = n.object({
|
1584
1584
|
lang_id: n.number(),
|
@@ -1588,13 +1588,13 @@ const cs = n.object({
|
|
1588
1588
|
plural_forms: n.array(n.string().optional()),
|
1589
1589
|
project_language_id: n.string(),
|
1590
1590
|
project_language_uuid: n.string().uuid()
|
1591
|
-
}),
|
1591
|
+
}), us = n.object({
|
1592
1592
|
project_id: n.string(),
|
1593
1593
|
project_uuid: n.string().uuid(),
|
1594
1594
|
languages: n.array(Yt)
|
1595
|
-
}),
|
1595
|
+
}), ds = n.object({
|
1596
1596
|
projectId: n.string()
|
1597
|
-
}),
|
1597
|
+
}), ms = n.object({
|
1598
1598
|
languages: n.array(
|
1599
1599
|
n.object({
|
1600
1600
|
lang_iso: n.string(),
|
@@ -1603,7 +1603,7 @@ const cs = n.object({
|
|
1603
1603
|
custom_plural_forms: n.array(n.string()).optional()
|
1604
1604
|
})
|
1605
1605
|
)
|
1606
|
-
}),
|
1606
|
+
}), _s = n.object({
|
1607
1607
|
project_id: n.string(),
|
1608
1608
|
project_uuid: n.string().uuid(),
|
1609
1609
|
languages: n.array(Yt),
|
@@ -1614,7 +1614,7 @@ const cs = n.object({
|
|
1614
1614
|
lang_iso: n.string()
|
1615
1615
|
})
|
1616
1616
|
).optional()
|
1617
|
-
}),
|
1617
|
+
}), gs = n.object({
|
1618
1618
|
projectId: n.string()
|
1619
1619
|
}), hs = n.object({
|
1620
1620
|
langs: n.array(
|
@@ -1623,35 +1623,35 @@ const cs = n.object({
|
|
1623
1623
|
base_lang: n.boolean()
|
1624
1624
|
})
|
1625
1625
|
)
|
1626
|
-
}),
|
1626
|
+
}), ps = n.object({
|
1627
1627
|
result: n.boolean()
|
1628
|
-
}),
|
1628
|
+
}), fs = X({
|
1629
1629
|
description: "List of project languages",
|
1630
1630
|
requestHeaderSchema: x,
|
1631
|
-
requestPathParamsSchema:
|
1631
|
+
requestPathParamsSchema: ls,
|
1632
1632
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1633
|
-
successResponseBodySchema:
|
1634
|
-
}),
|
1633
|
+
successResponseBodySchema: us
|
1634
|
+
}), _o = Y({
|
1635
1635
|
description: "Add languages to existing project",
|
1636
1636
|
requestHeaderSchema: x,
|
1637
1637
|
method: "post",
|
1638
|
-
requestPathParamsSchema:
|
1638
|
+
requestPathParamsSchema: ds,
|
1639
1639
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1640
|
-
requestBodySchema:
|
1641
|
-
successResponseBodySchema:
|
1642
|
-
}),
|
1640
|
+
requestBodySchema: ms,
|
1641
|
+
successResponseBodySchema: _s
|
1642
|
+
}), bs = Y({
|
1643
1643
|
description: "Bulk update project languages",
|
1644
1644
|
requestHeaderSchema: x,
|
1645
1645
|
method: "put",
|
1646
|
-
requestPathParamsSchema:
|
1646
|
+
requestPathParamsSchema: gs,
|
1647
1647
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1648
1648
|
requestBodySchema: hs,
|
1649
|
-
successResponseBodySchema:
|
1649
|
+
successResponseBodySchema: ps
|
1650
1650
|
}), de = x, Fe = n.union([
|
1651
1651
|
n.literal("localization_files"),
|
1652
1652
|
n.literal("paged_documents"),
|
1653
1653
|
n.literal("marketing")
|
1654
|
-
]),
|
1654
|
+
]), Ts = n.object({
|
1655
1655
|
per_platform_key_names: n.boolean(),
|
1656
1656
|
reviewing: n.boolean(),
|
1657
1657
|
auto_toggle_unverified: n.boolean(),
|
@@ -1662,7 +1662,7 @@ const cs = n.object({
|
|
1662
1662
|
custom_translation_statuses_allow_multiple: n.boolean(),
|
1663
1663
|
segmentation: n.boolean(),
|
1664
1664
|
contributor_preview_download_enabled: n.boolean()
|
1665
|
-
}),
|
1665
|
+
}), vs = n.object({
|
1666
1666
|
not_reviewed: n.number(),
|
1667
1667
|
unverified: n.number(),
|
1668
1668
|
spelling_grammar: n.number(),
|
@@ -1679,14 +1679,14 @@ const cs = n.object({
|
|
1679
1679
|
double_space: n.number(),
|
1680
1680
|
special_placeholder: n.number(),
|
1681
1681
|
unbalanced_brackets: n.number()
|
1682
|
-
}),
|
1682
|
+
}), Ss = n.object({
|
1683
1683
|
progress_total: n.number(),
|
1684
1684
|
keys_total: n.number(),
|
1685
1685
|
team: n.number(),
|
1686
1686
|
base_words: n.number(),
|
1687
1687
|
qa_issues_total: n.number(),
|
1688
|
-
qa_issues:
|
1689
|
-
languages: n.array(
|
1688
|
+
qa_issues: vs,
|
1689
|
+
languages: n.array(cs)
|
1690
1690
|
}), me = n.object({
|
1691
1691
|
project_id: n.string(),
|
1692
1692
|
uuid: n.string().uuid(),
|
@@ -1703,16 +1703,16 @@ const cs = n.object({
|
|
1703
1703
|
base_language_iso: n.string(),
|
1704
1704
|
base_project_language_id: n.number(),
|
1705
1705
|
base_project_language_uuid: n.string().uuid(),
|
1706
|
-
settings:
|
1707
|
-
statistics:
|
1708
|
-
}),
|
1706
|
+
settings: Ts.optional(),
|
1707
|
+
statistics: Ss.optional()
|
1708
|
+
}), ys = n.object({
|
1709
1709
|
name: n.string(),
|
1710
1710
|
team_id: n.string(),
|
1711
1711
|
base_lang_iso: n.string(),
|
1712
|
-
languages: n.array(
|
1712
|
+
languages: n.array(is),
|
1713
1713
|
project_type: Fe,
|
1714
1714
|
is_segmentation_enabled: n.boolean()
|
1715
|
-
}), Et = n.union([n.literal(0), n.literal(1)]),
|
1715
|
+
}), Et = n.union([n.literal(0), n.literal(1)]), Es = n.object({
|
1716
1716
|
filter_type: Fe.optional(),
|
1717
1717
|
filter_team_id: n.number().optional(),
|
1718
1718
|
filter_names: n.string().optional(),
|
@@ -1720,59 +1720,59 @@ const cs = n.object({
|
|
1720
1720
|
include_settings: Et.optional(),
|
1721
1721
|
limit: n.number().optional(),
|
1722
1722
|
page: n.number().optional()
|
1723
|
-
}),
|
1723
|
+
}), Cs = n.object({
|
1724
1724
|
projects: n.array(me)
|
1725
|
+
}), Ps = n.object({
|
1726
|
+
project_id: n.string()
|
1725
1727
|
}), ws = n.object({
|
1726
1728
|
project_id: n.string()
|
1727
1729
|
}), As = n.object({
|
1728
|
-
project_id: n.string()
|
1729
|
-
}), Rs = n.object({
|
1730
1730
|
name: n.string().min(1),
|
1731
1731
|
description: n.string().optional()
|
1732
|
-
}), _e = () => "/projects",
|
1732
|
+
}), _e = () => "/projects", Rs = Y({
|
1733
1733
|
description: "Create a new project",
|
1734
1734
|
requestHeaderSchema: de,
|
1735
1735
|
method: "post",
|
1736
1736
|
pathResolver: _e,
|
1737
|
-
requestBodySchema:
|
1737
|
+
requestBodySchema: ys,
|
1738
1738
|
successResponseBodySchema: me
|
1739
|
-
}),
|
1739
|
+
}), ks = X({
|
1740
1740
|
description: "List all projects",
|
1741
1741
|
requestHeaderSchema: de,
|
1742
1742
|
pathResolver: _e,
|
1743
|
-
requestQuerySchema:
|
1744
|
-
successResponseBodySchema:
|
1745
|
-
}),
|
1743
|
+
requestQuerySchema: Es,
|
1744
|
+
successResponseBodySchema: Cs
|
1745
|
+
}), Is = X({
|
1746
1746
|
description: "Retrieve a project",
|
1747
1747
|
requestHeaderSchema: de,
|
1748
|
-
requestPathParamsSchema:
|
1748
|
+
requestPathParamsSchema: Ps,
|
1749
1749
|
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1750
1750
|
successResponseBodySchema: me
|
1751
|
-
}),
|
1751
|
+
}), js = Y({
|
1752
1752
|
description: "Update a project",
|
1753
1753
|
requestHeaderSchema: de,
|
1754
1754
|
method: "put",
|
1755
|
-
requestPathParamsSchema:
|
1755
|
+
requestPathParamsSchema: ws,
|
1756
1756
|
pathResolver: ({ project_id: e }) => `${_e()}/${e}`,
|
1757
|
-
requestBodySchema:
|
1757
|
+
requestBodySchema: As,
|
1758
1758
|
successResponseBodySchema: me
|
1759
|
-
}),
|
1759
|
+
}), Ns = n.object({
|
1760
1760
|
projectId: n.string(),
|
1761
1761
|
translationId: n.number()
|
1762
|
-
}),
|
1762
|
+
}), Os = n.enum(["critical", "major", "minor"]), xs = n.object({
|
1763
1763
|
category: n.string(),
|
1764
1764
|
comment: n.string(),
|
1765
|
-
severity:
|
1766
|
-
}),
|
1765
|
+
severity: Os
|
1766
|
+
}), Ls = n.object({
|
1767
1767
|
score: n.number(),
|
1768
1768
|
hasMajorIssue: n.boolean(),
|
1769
1769
|
hasCriticalIssue: n.boolean(),
|
1770
|
-
issues: n.array(
|
1770
|
+
issues: n.array(xs)
|
1771
1771
|
});
|
1772
|
-
function
|
1772
|
+
function go(e, t, r = {}) {
|
1773
1773
|
return qe({
|
1774
1774
|
...r,
|
1775
|
-
mutationFn: async (a) => $(e,
|
1775
|
+
mutationFn: async (a) => $(e, Rs, {
|
1776
1776
|
headers: await t.resolve(),
|
1777
1777
|
body: a
|
1778
1778
|
})
|
@@ -1781,60 +1781,60 @@ function po(e, t, r = {}) {
|
|
1781
1781
|
const ho = {
|
1782
1782
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1783
1783
|
};
|
1784
|
-
function
|
1784
|
+
function po(e, t, r) {
|
1785
1785
|
return H({
|
1786
1786
|
...r,
|
1787
|
-
queryFn: async ({ queryKey: [a, s] }) => G(e,
|
1787
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, fs, {
|
1788
1788
|
headers: await t.resolve(),
|
1789
1789
|
pathParams: { projectId: s }
|
1790
1790
|
})
|
1791
1791
|
});
|
1792
1792
|
}
|
1793
|
-
const
|
1793
|
+
const fo = {
|
1794
1794
|
paramsKey: (e) => ["listProjects", e]
|
1795
1795
|
};
|
1796
|
-
function
|
1796
|
+
function bo(e, t, r) {
|
1797
1797
|
return H({
|
1798
1798
|
...r,
|
1799
|
-
queryFn: async ({ queryKey: [a, s] }) => G(e,
|
1799
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, ks, {
|
1800
1800
|
headers: await t.resolve(),
|
1801
1801
|
queryParams: s
|
1802
1802
|
})
|
1803
1803
|
});
|
1804
1804
|
}
|
1805
|
-
const
|
1805
|
+
const To = {
|
1806
1806
|
projectIdKey: (e) => ["retrieveProject", e]
|
1807
1807
|
};
|
1808
|
-
function
|
1808
|
+
function vo(e, t, r) {
|
1809
1809
|
return H({
|
1810
1810
|
...r,
|
1811
|
-
queryFn: async ({ queryKey: [a, s] }) => G(e,
|
1811
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, Is, {
|
1812
1812
|
headers: await t.resolve(),
|
1813
1813
|
pathParams: { project_id: s }
|
1814
1814
|
})
|
1815
1815
|
});
|
1816
1816
|
}
|
1817
|
-
function
|
1817
|
+
function So(e, t, r, a = {}) {
|
1818
1818
|
return qe({
|
1819
1819
|
...a,
|
1820
|
-
mutationFn: async (s) => $(e,
|
1820
|
+
mutationFn: async (s) => $(e, js, {
|
1821
1821
|
headers: await t.resolve(),
|
1822
1822
|
body: s,
|
1823
1823
|
pathParams: r
|
1824
1824
|
})
|
1825
1825
|
});
|
1826
1826
|
}
|
1827
|
-
function
|
1827
|
+
function yo(e, t, r, a = {}) {
|
1828
1828
|
return qe({
|
1829
1829
|
...a,
|
1830
|
-
mutationFn: async (s) => $(e,
|
1830
|
+
mutationFn: async (s) => $(e, bs, {
|
1831
1831
|
pathParams: t,
|
1832
1832
|
headers: await r.resolve(),
|
1833
1833
|
body: s
|
1834
1834
|
})
|
1835
1835
|
});
|
1836
1836
|
}
|
1837
|
-
function
|
1837
|
+
function Ms(e) {
|
1838
1838
|
return {
|
1839
1839
|
isEmptyResponseExpected: e.isEmptyResponseExpected ?? !1,
|
1840
1840
|
isNonJSONResponseExpected: e.isNonJSONResponseExpected ?? !1,
|
@@ -1849,131 +1849,131 @@ function Us(e) {
|
|
1849
1849
|
metadata: e.metadata
|
1850
1850
|
};
|
1851
1851
|
}
|
1852
|
-
const
|
1852
|
+
const Us = Ms({
|
1853
1853
|
description: "Generate translation quality score",
|
1854
1854
|
requestHeaderSchema: x,
|
1855
|
-
requestPathParamsSchema:
|
1855
|
+
requestPathParamsSchema: Ns,
|
1856
1856
|
pathResolver: ({ projectId: e, translationId: t }) => `/projects/${e}/translations/${t}/scoring-guidance`,
|
1857
|
-
successResponseBodySchema:
|
1858
|
-
}),
|
1857
|
+
successResponseBodySchema: Ls
|
1858
|
+
}), Eo = {
|
1859
1859
|
paramsKey: (e) => ["getScore", e]
|
1860
1860
|
};
|
1861
|
-
function
|
1861
|
+
function Co(e, t, r) {
|
1862
1862
|
return H({
|
1863
1863
|
...r,
|
1864
|
-
queryFn: async ({ queryKey: [a, s] }) => G(e,
|
1864
|
+
queryFn: async ({ queryKey: [a, s] }) => G(e, Us, {
|
1865
1865
|
headers: await t.resolve(),
|
1866
1866
|
pathParams: s
|
1867
1867
|
})
|
1868
1868
|
});
|
1869
1869
|
}
|
1870
1870
|
export {
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1871
|
+
ds as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1872
|
+
ms as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1873
|
+
_s as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1874
|
+
gs as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1875
1875
|
hs as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1876
|
-
|
1877
|
-
|
1878
|
-
|
1879
|
-
|
1880
|
-
|
1881
|
-
|
1876
|
+
ps as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1877
|
+
to as Breadcrumbs,
|
1878
|
+
uo as CONTRIBUTOR_API_BASE_HEADER_SCHEMA,
|
1879
|
+
Ya as CONTRIBUTOR_LANGUAGE_SCHEMA,
|
1880
|
+
Xa as CONTRIBUTOR_SCHEMA,
|
1881
|
+
ys as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1882
1882
|
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1883
1883
|
lr as ENTERPRISE_PLAN_IDS,
|
1884
1884
|
ir as ESSENTIAL_PLAN_IDS,
|
1885
1885
|
Ht as FREE_PLAN_ID,
|
1886
|
-
|
1887
|
-
|
1886
|
+
Ns as GET_SCORE_REQUEST_QUERY_SCHEMA,
|
1887
|
+
Ls as GET_SCORE_RESPONSE_SCHEMA,
|
1888
1888
|
k as HeaderBuilder,
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
|
1889
|
+
xs as ISSUE_SCHEMA,
|
1890
|
+
Ha as JWT_TOKEN_SCHEMA,
|
1891
|
+
ro as JwtAuthHeaderBuilderMiddleware,
|
1892
|
+
is as LANGUAGE_ISO_SCHEMA,
|
1893
1893
|
Yt as LANGUAGE_SCHEMA,
|
1894
|
-
|
1895
|
-
|
1896
|
-
|
1897
|
-
|
1898
|
-
|
1894
|
+
cs as LANGUAGE_STATISTICS_SCHEMA,
|
1895
|
+
Es as LIST_PROJECTS_REQUEST_QUERY_SCHEMA,
|
1896
|
+
Cs as LIST_PROJECTS_SUCCESS_RESPONSE_BODY,
|
1897
|
+
ls as LIST_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1898
|
+
us as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1899
1899
|
oe as NavigationPanel,
|
1900
|
-
|
1900
|
+
no as NavigationTabs,
|
1901
1901
|
de as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1902
|
-
|
1902
|
+
vs as PROJECT_QA_ISSUES_SCHEMA,
|
1903
1903
|
me as PROJECT_SCHEMA,
|
1904
|
-
|
1905
|
-
|
1904
|
+
Ts as PROJECT_SETTINGS_SCHEMA,
|
1905
|
+
Ss as PROJECT_STATISTICS_SCHEMA,
|
1906
1906
|
Fe as PROJECT_TYPE_SCHEMA,
|
1907
1907
|
cr as PRO_PLAN_IDS,
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1908
|
+
ao as PublicApiHeaderBuilderMiddleware,
|
1909
|
+
es as RETRIEVE_CONTRIBUTOR_PATH_PARAMS_SCHEMA,
|
1910
|
+
ts as RETRIEVE_CONTRIBUTOR_RESPONSE_SCHEMA,
|
1911
|
+
Ps as RETRIEVE_PROJECT_PATH_PARAM_SCHEMA,
|
1912
|
+
Os as SEVERITY_ENUM,
|
1913
1913
|
or as START_PLAN_IDS,
|
1914
1914
|
R as Sidebar,
|
1915
1915
|
A as SidebarTaskLanguageStatuses,
|
1916
1916
|
Le as SidebarTaskStatuses,
|
1917
1917
|
ae as SidebarTaskTypeOptions,
|
1918
1918
|
zt as TEAM_ROLE_SCHEMA,
|
1919
|
-
|
1920
|
-
|
1921
|
-
|
1922
|
-
|
1919
|
+
Ga as TEAM_USER_API_BASE_HEADERS_SCHEMA,
|
1920
|
+
Ka as TEAM_USER_PATH_PARAMS_SCHEMA,
|
1921
|
+
za as TEAM_USER_RESPONSE_SCHEMA,
|
1922
|
+
Fa as TEAM_USER_SCHEMA,
|
1923
1923
|
sr as TRIAL_PLAN_ID,
|
1924
|
-
|
1925
|
-
|
1926
|
-
|
1924
|
+
ws as UPDATE_PROJECT_PATH_PARAMS_SCHEMA,
|
1925
|
+
As as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1926
|
+
Ba as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1927
1927
|
ie as UnauthorizedError,
|
1928
|
-
|
1929
|
-
|
1928
|
+
_o as addLanguagesToProject,
|
1929
|
+
bs as bulkUpdateProjectLanguages,
|
1930
1930
|
mr as convertNewLineToBreakTag,
|
1931
1931
|
Kt as createHeaderBuilderMiddleware,
|
1932
|
-
|
1933
|
-
|
1934
|
-
|
1935
|
-
|
1936
|
-
|
1937
|
-
|
1932
|
+
Rs as createProject,
|
1933
|
+
pr as formatDate,
|
1934
|
+
eo as formatDateTz,
|
1935
|
+
oo as generateTokenFromClassicSession,
|
1936
|
+
so as getAuthenticatedSessionDetailFromRequest,
|
1937
|
+
xa as getCsrfTokenFromCookie,
|
1938
1938
|
Jt as getJwtTokenFromCookie,
|
1939
|
-
|
1940
|
-
|
1941
|
-
|
1939
|
+
Eo as getScoreKey,
|
1940
|
+
Ja as getTeamUser,
|
1941
|
+
Qa as getTeamUsersQueryKey,
|
1942
1942
|
Ge as getUserToken,
|
1943
|
-
|
1944
|
-
|
1945
|
-
|
1946
|
-
|
1943
|
+
Da as getUserTokenKey,
|
1944
|
+
Zs as isEnterpriseOpenSourcePlan,
|
1945
|
+
Xs as isEnterprisePlan,
|
1946
|
+
Ws as isEssentialPlan,
|
1947
1947
|
De as isFreePlan,
|
1948
|
-
|
1949
|
-
|
1950
|
-
|
1948
|
+
Vs as isPaidPlan,
|
1949
|
+
Ys as isProPlan,
|
1950
|
+
Qs as isStartPlan,
|
1951
1951
|
Bt as isTrialPlan,
|
1952
|
-
|
1952
|
+
fs as listProjectLanguages,
|
1953
1953
|
ho as listProjectLanguagesKey,
|
1954
|
-
|
1955
|
-
|
1956
|
-
|
1954
|
+
ks as listProjects,
|
1955
|
+
fo as listProjectsKey,
|
1956
|
+
hr as makeUrlClickable,
|
1957
1957
|
ee as parseJwtTokenPayload,
|
1958
|
-
|
1959
|
-
|
1960
|
-
|
1961
|
-
|
1962
|
-
|
1963
|
-
|
1964
|
-
|
1958
|
+
io as refreshExpiredToken,
|
1959
|
+
as as retrieveContributor,
|
1960
|
+
ss as retrieveContributorKeys,
|
1961
|
+
Is as retrieveProject,
|
1962
|
+
To as retrieveProjectQueryKey,
|
1963
|
+
js as updateProject,
|
1964
|
+
mo as useAuthenticatedProjectContributor,
|
1965
1965
|
Wt as useAuthenticatedSessionPayload,
|
1966
|
-
|
1967
|
-
|
1968
|
-
|
1966
|
+
lo as useAuthenticatedUser,
|
1967
|
+
yo as useBulkUpdateProjectLanguagesMutation,
|
1968
|
+
go as useCreateProjectMutation,
|
1969
1969
|
$e as useEffectOnce,
|
1970
|
-
|
1971
|
-
|
1972
|
-
|
1973
|
-
|
1974
|
-
|
1975
|
-
|
1976
|
-
|
1977
|
-
|
1978
|
-
|
1970
|
+
co as useGetPromotedClassicSessionJwtQuery,
|
1971
|
+
Co as useGetScoreQuery,
|
1972
|
+
Wa as useGetTeamUsersQuery,
|
1973
|
+
$a as useGetUserTokenQuery,
|
1974
|
+
po as useListProjectLanguagesQuery,
|
1975
|
+
bo as useListProjectsQuery,
|
1976
|
+
os as useRetrieveContributorQuery,
|
1977
|
+
vo as useRetrieveProjectQuery,
|
1978
|
+
So as useUpdateProjectMutation
|
1979
1979
|
};
|