@lokalise/harmony 1.21.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +174 -167
- package/dist/types/src/features/publicApi/hooks/useAddLanguagesToProjectMutation.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useCreateProjectMutation.d.ts +5 -0
- package/dist/types/src/features/publicApi/hooks/useListProjectLanguagesQuery.d.ts +2 -0
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +5 -0
- package/dist/types/src/features/publicApi/hooks/useRetrieveProjectQuery.d.ts +5 -0
- package/dist/types/src/features/publicApi/hooks/useUpdateProjectMutation.d.ts +5 -0
- package/dist/types/src/features/publicApi/languages.d.ts +20 -0
- package/dist/types/src/features/publicApi/projects.d.ts +102 -0
- package/dist/types/src/features/publicApi/types/languageTypes.d.ts +32 -0
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +66 -0
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
var en = Object.defineProperty;
|
2
2
|
var tn = (e, t, n) => t in e ? en(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var ne = (e, t, n) => tn(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
-
import { jsx as s, jsxs as
|
4
|
+
import { jsx as s, jsxs as f, Fragment as Ue } from "react/jsx-runtime";
|
5
5
|
import * as K from "react";
|
6
6
|
import { useRef as Ct, useState as I, useCallback as We, useEffect as J, useContext as wt, createContext as Pt, cloneElement as nn, Fragment as At, forwardRef as rn } from "react";
|
7
|
-
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as on, Alert as sn, Tag as Ne, Button as Oe, Loading as cn, Popover as ln, JobIcon as
|
8
|
-
import { format as It, parseISO as
|
7
|
+
import { Tooltip as q, Link as M, Menu as ce, MenuList as le, CaretUpIcon as an, UserIcon as Rt, MenuItem as W, MenuDivider as kt, ConfirmModal as on, Alert as sn, Tag as Ne, Button as Oe, Loading as cn, Popover as ln, JobIcon as un } from "@lokalise/louis";
|
8
|
+
import { format as It, parseISO as dn, isThisSecond as mn } from "date-fns";
|
9
9
|
import { toZonedTime as _n } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
11
|
import { buildPayloadRoute as He } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
@@ -40,22 +40,22 @@ function qe() {
|
|
40
40
|
}
|
41
41
|
return ge = e, ge;
|
42
42
|
}
|
43
|
-
var
|
43
|
+
var pe, Ye;
|
44
44
|
function gn() {
|
45
|
-
if (Ye) return
|
45
|
+
if (Ye) return pe;
|
46
46
|
Ye = 1;
|
47
47
|
var e = typeof ae == "object" && ae && ae.Object === Object && ae;
|
48
|
-
return
|
48
|
+
return pe = e, pe;
|
49
49
|
}
|
50
|
-
var
|
50
|
+
var fe, Xe;
|
51
51
|
function Ot() {
|
52
|
-
if (Xe) return
|
52
|
+
if (Xe) return fe;
|
53
53
|
Xe = 1;
|
54
54
|
var e = gn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
|
-
return
|
55
|
+
return fe = n, fe;
|
56
56
|
}
|
57
57
|
var he, Ve;
|
58
|
-
function
|
58
|
+
function pn() {
|
59
59
|
if (Ve) return he;
|
60
60
|
Ve = 1;
|
61
61
|
var e = Ot(), t = function() {
|
@@ -64,7 +64,7 @@ function fn() {
|
|
64
64
|
return he = t, he;
|
65
65
|
}
|
66
66
|
var be, Ze;
|
67
|
-
function
|
67
|
+
function fn() {
|
68
68
|
if (Ze) return be;
|
69
69
|
Ze = 1;
|
70
70
|
var e = /\s/;
|
@@ -79,7 +79,7 @@ var Te, et;
|
|
79
79
|
function hn() {
|
80
80
|
if (et) return Te;
|
81
81
|
et = 1;
|
82
|
-
var e =
|
82
|
+
var e = fn(), t = /^\s+/;
|
83
83
|
function n(a) {
|
84
84
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
85
85
|
}
|
@@ -98,14 +98,14 @@ function bn() {
|
|
98
98
|
nt = 1;
|
99
99
|
var e = xt(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
|
100
100
|
function i(c) {
|
101
|
-
var
|
101
|
+
var u = n.call(c, o), d = c[o];
|
102
102
|
try {
|
103
103
|
c[o] = void 0;
|
104
104
|
var l = !0;
|
105
105
|
} catch {
|
106
106
|
}
|
107
107
|
var m = a.call(c);
|
108
|
-
return l && (
|
108
|
+
return l && (u ? c[o] = d : delete c[o]), m;
|
109
109
|
}
|
110
110
|
return ye = i, ye;
|
111
111
|
}
|
@@ -124,8 +124,8 @@ function vn() {
|
|
124
124
|
if (at) return Se;
|
125
125
|
at = 1;
|
126
126
|
var e = xt(), t = bn(), n = Tn(), a = "[object Null]", o = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
|
-
function c(
|
128
|
-
return
|
127
|
+
function c(u) {
|
128
|
+
return u == null ? u === void 0 ? o : a : i && i in Object(u) ? t(u) : n(u);
|
129
129
|
}
|
130
130
|
return Se = c, Se;
|
131
131
|
}
|
@@ -152,8 +152,8 @@ var Pe, it;
|
|
152
152
|
function Sn() {
|
153
153
|
if (it) return Pe;
|
154
154
|
it = 1;
|
155
|
-
var e = hn(), t = qe(), n = En(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i,
|
156
|
-
function
|
155
|
+
var e = hn(), t = qe(), n = En(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
156
|
+
function d(l) {
|
157
157
|
if (typeof l == "number")
|
158
158
|
return l;
|
159
159
|
if (n(l))
|
@@ -166,34 +166,34 @@ function Sn() {
|
|
166
166
|
return l === 0 ? l : +l;
|
167
167
|
l = e(l);
|
168
168
|
var g = i.test(l);
|
169
|
-
return g || c.test(l) ?
|
169
|
+
return g || c.test(l) ? u(l.slice(2), g ? 2 : 8) : o.test(l) ? a : +l;
|
170
170
|
}
|
171
|
-
return Pe =
|
171
|
+
return Pe = d, Pe;
|
172
172
|
}
|
173
173
|
var Ae, ct;
|
174
174
|
function Lt() {
|
175
175
|
if (ct) return Ae;
|
176
176
|
ct = 1;
|
177
|
-
var e = qe(), t =
|
178
|
-
function c(
|
179
|
-
var m, g, v, y, _, S, b = 0,
|
180
|
-
if (typeof
|
177
|
+
var e = qe(), t = pn(), n = Sn(), a = "Expected a function", o = Math.max, i = Math.min;
|
178
|
+
function c(u, d, l) {
|
179
|
+
var m, g, v, y, _, S, b = 0, p = !1, h = !1, T = !0;
|
180
|
+
if (typeof u != "function")
|
181
181
|
throw new TypeError(a);
|
182
|
-
|
182
|
+
d = n(d) || 0, e(l) && (p = !!l.leading, h = "maxWait" in l, v = h ? o(n(l.maxWait) || 0, d) : v, T = "trailing" in l ? !!l.trailing : T);
|
183
183
|
function w(E) {
|
184
184
|
var N = m, G = g;
|
185
|
-
return m = g = void 0, b = E, y =
|
185
|
+
return m = g = void 0, b = E, y = u.apply(G, N), y;
|
186
186
|
}
|
187
187
|
function C(E) {
|
188
|
-
return b = E, _ = setTimeout(te,
|
188
|
+
return b = E, _ = setTimeout(te, d), p ? w(E) : y;
|
189
189
|
}
|
190
190
|
function ee(E) {
|
191
|
-
var N = E - S, G = E - b, Je =
|
191
|
+
var N = E - S, G = E - b, Je = d - N;
|
192
192
|
return h ? i(Je, v - G) : Je;
|
193
193
|
}
|
194
194
|
function Ke(E) {
|
195
195
|
var N = E - S, G = E - b;
|
196
|
-
return S === void 0 || N >=
|
196
|
+
return S === void 0 || N >= d || N < 0 || h && G >= v;
|
197
197
|
}
|
198
198
|
function te() {
|
199
199
|
var E = t();
|
@@ -216,9 +216,9 @@ function Lt() {
|
|
216
216
|
if (_ === void 0)
|
217
217
|
return C(S);
|
218
218
|
if (h)
|
219
|
-
return clearTimeout(_), _ = setTimeout(te,
|
219
|
+
return clearTimeout(_), _ = setTimeout(te, d), w(S);
|
220
220
|
}
|
221
|
-
return _ === void 0 && (_ = setTimeout(te,
|
221
|
+
return _ === void 0 && (_ = setTimeout(te, d)), y;
|
222
222
|
}
|
223
223
|
return _e.cancel = Vt, _e.flush = Zt, _e;
|
224
224
|
}
|
@@ -232,13 +232,13 @@ function Pn() {
|
|
232
232
|
lt = 1;
|
233
233
|
var e = Lt(), t = qe(), n = "Expected a function";
|
234
234
|
function a(o, i, c) {
|
235
|
-
var
|
235
|
+
var u = !0, d = !0;
|
236
236
|
if (typeof o != "function")
|
237
237
|
throw new TypeError(n);
|
238
|
-
return t(c) && (
|
239
|
-
leading:
|
238
|
+
return t(c) && (u = "leading" in c ? !!c.leading : u, d = "trailing" in c ? !!c.trailing : d), e(o, i, {
|
239
|
+
leading: u,
|
240
240
|
maxWait: i,
|
241
|
-
trailing:
|
241
|
+
trailing: d
|
242
242
|
});
|
243
243
|
}
|
244
244
|
return Re = a, Re;
|
@@ -291,11 +291,11 @@ const Rn = /* @__PURE__ */ Nt(An), kn = (e, t, n, a) => {
|
|
291
291
|
width: e.contentRect.width,
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
|
-
function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions:
|
295
|
-
const l = Ct(e), m = In(
|
294
|
+
function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: i = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
295
|
+
const l = Ct(e), m = In(d), [g, v] = I({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: _ } = jn(c), { box: S } =
|
298
|
+
}), { refProxy: y, refElement: _ } = jn(c), { box: S } = u || {}, b = We((h) => {
|
299
299
|
if (!o && !i)
|
300
300
|
return;
|
301
301
|
if (l.current) {
|
@@ -311,7 +311,7 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
311
311
|
entry: w
|
312
312
|
}), C) : ee);
|
313
313
|
});
|
314
|
-
}, [o, i, l, S]),
|
314
|
+
}, [o, i, l, S]), p = We(kn(b, t, n, a), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
@@ -319,15 +319,15 @@ function On({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
319
319
|
]);
|
320
320
|
return J(() => {
|
321
321
|
let h;
|
322
|
-
return _ ? (h = new window.ResizeObserver(
|
322
|
+
return _ ? (h = new window.ResizeObserver(p), h.observe(_, u)) : (g.width || g.height) && (m == null || m({
|
323
323
|
width: null,
|
324
324
|
height: null,
|
325
325
|
entry: null
|
326
326
|
}), v({ width: void 0, height: void 0 })), () => {
|
327
327
|
var T, w, C;
|
328
|
-
(T = h == null ? void 0 : h.disconnect) === null || T === void 0 || T.call(h), (C = (w =
|
328
|
+
(T = h == null ? void 0 : h.disconnect) === null || T === void 0 || T.call(h), (C = (w = p).cancel) === null || C === void 0 || C.call(w);
|
329
329
|
};
|
330
|
-
}, [
|
330
|
+
}, [p, _]), Object.assign({ ref: y }, g);
|
331
331
|
}
|
332
332
|
function Mt(e) {
|
333
333
|
var t, n, a = "";
|
@@ -354,13 +354,13 @@ const xn = "_headerContainer_1cubo_1", Ln = "_navigationTabList_1cubo_8", Mn = "
|
|
354
354
|
refreshRate: 0
|
355
355
|
}), [o, i] = I(!1), c = () => o ? !e : !0;
|
356
356
|
J(() => {
|
357
|
-
const
|
357
|
+
const d = () => {
|
358
358
|
i(window.scrollY > 0);
|
359
359
|
};
|
360
|
-
return window.addEventListener("scroll",
|
360
|
+
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
361
361
|
}, []);
|
362
|
-
const
|
363
|
-
return /* @__PURE__ */ s("div", { style: { minHeight:
|
362
|
+
const u = `${a || Bn}px`;
|
363
|
+
return /* @__PURE__ */ s("div", { style: { minHeight: u }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ f(
|
364
364
|
"div",
|
365
365
|
{
|
366
366
|
ref: n,
|
@@ -386,19 +386,19 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
386
386
|
href: t = "/",
|
387
387
|
ariaLabel: n = "Lokalise App Home",
|
388
388
|
alt: a = "Lokalise Logo"
|
389
|
-
}) => /* @__PURE__ */ s("a", { className: Gn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Kn = "_link_18vhx_1", zn = "_active_18vhx_18",
|
389
|
+
}) => /* @__PURE__ */ s("a", { className: Gn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: a }) }), Kn = "_link_18vhx_1", zn = "_active_18vhx_18", ut = {
|
390
390
|
link: Kn,
|
391
391
|
active: zn
|
392
392
|
}, Jn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(q, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
393
393
|
M,
|
394
394
|
{
|
395
|
-
className: j(
|
396
|
-
[
|
395
|
+
className: j(ut.link, {
|
396
|
+
[ut.active]: window.location.pathname.startsWith(t)
|
397
397
|
}),
|
398
398
|
href: t,
|
399
399
|
children: /* @__PURE__ */ s(n, { size: "25px" })
|
400
400
|
}
|
401
|
-
) }), Wn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18",
|
401
|
+
) }), Wn = "_dropdownButton_13l5r_1", Qn = "_dropdownButtonActive_13l5r_18", dt = {
|
402
402
|
dropdownButton: Wn,
|
403
403
|
dropdownButtonActive: Qn
|
404
404
|
}, Yn = ({ children: e, icon: t }) => /* @__PURE__ */ s(
|
@@ -408,8 +408,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
408
408
|
"button",
|
409
409
|
{
|
410
410
|
type: "button",
|
411
|
-
className: j(
|
412
|
-
[
|
411
|
+
className: j(dt.dropdownButton, {
|
412
|
+
[dt.dropdownButtonActive]: n
|
413
413
|
}),
|
414
414
|
children: /* @__PURE__ */ s(t, { size: "25px" })
|
415
415
|
}
|
@@ -446,15 +446,15 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
446
446
|
showBillingButton: o,
|
447
447
|
allowTeamCreation: i,
|
448
448
|
isProviderAlpha: c,
|
449
|
-
canAccessTeamSettings:
|
450
|
-
isEndOfTrialActive:
|
449
|
+
canAccessTeamSettings: u,
|
450
|
+
isEndOfTrialActive: d,
|
451
451
|
isTeamSuspended: l,
|
452
452
|
isFullyAuthenticated: m
|
453
453
|
} = X();
|
454
454
|
return /* @__PURE__ */ s(
|
455
455
|
ce,
|
456
456
|
{
|
457
|
-
menuButton: () => /* @__PURE__ */
|
457
|
+
menuButton: () => /* @__PURE__ */ f("button", { className: x.profileButton, "aria-label": "Profile menu", type: "button", children: [
|
458
458
|
t != null && t.logoUrl ? /* @__PURE__ */ s(
|
459
459
|
"img",
|
460
460
|
{
|
@@ -478,8 +478,8 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
478
478
|
children: /* @__PURE__ */ s(le, { placement: "right-end", className: x.menuContainer, children: e({
|
479
479
|
allowTeamCreation: i,
|
480
480
|
otherTeams: n,
|
481
|
-
canAccessTeamSettings:
|
482
|
-
isEndOfTrialActive:
|
481
|
+
canAccessTeamSettings: u,
|
482
|
+
isEndOfTrialActive: d,
|
483
483
|
isTeamSuspended: l,
|
484
484
|
showBillingButton: o,
|
485
485
|
isProviderAlpha: c,
|
@@ -487,7 +487,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
487
487
|
}) })
|
488
488
|
}
|
489
489
|
);
|
490
|
-
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358],
|
490
|
+
}, Bt = 0, sr = 9999, ir = [150, 151, 250, 251], cr = [152, 153, 252, 253], lr = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], ur = [156, 159, 160, 256, 259, 260], qt = 9998, De = (e) => e === Bt, Dt = (e) => e === sr, zo = (e) => ir.includes(e), Jo = (e) => cr.includes(e), Wo = (e) => lr.includes(e), Qo = (e) => ur.includes(e), Yo = (e) => e > Bt && e < qt, Xo = (e) => e === qt, dr = /\n/, mt = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [nn(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), mr = (e, t, n) => typeof e == "string" ? mt(e, t, n) : e.flatMap((a) => typeof a == "string" ? mt(a, t, n) : a), _r = (e) => mr(e, dr, /* @__PURE__ */ s("br", {})), gr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, pr = (e) => e.match(gr) ?? [], _t = (e, t, n) => {
|
491
491
|
const a = e.split(t);
|
492
492
|
if (a.length === 1)
|
493
493
|
return e;
|
@@ -496,20 +496,20 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
496
496
|
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
497
497
|
), o.push(a.join(t)), o.filter((i) => i !== "");
|
498
498
|
}, gt = (e) => {
|
499
|
-
const t =
|
499
|
+
const t = pr(e);
|
500
500
|
return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? _t(n, a, o) : n.flatMap((i) => typeof i == "string" ? _t(i, a, o) : i), e) : e;
|
501
|
-
},
|
501
|
+
}, fr = (e) => typeof e == "string" ? gt(e) : e.flatMap((t) => typeof t == "string" ? gt(t) : t, e), hr = (e, t = "PP") => It(e, t), Vo = (e, t, n = "PP") => It(_n(e, t), n), $e = (e) => {
|
502
502
|
J(e, []);
|
503
|
-
},
|
503
|
+
}, pt = {
|
504
504
|
biller: "biller",
|
505
505
|
owner: "owner"
|
506
|
-
},
|
507
|
-
|
508
|
-
|
506
|
+
}, ft = [
|
507
|
+
pt.biller,
|
508
|
+
pt.owner
|
509
509
|
], br = ({ children: e, config: t }) => {
|
510
|
-
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole:
|
510
|
+
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((p) => p.id === a), l = n.filter((p) => p.id !== a), m = ft.includes(u), g = ft.includes(u), v = De(o) || Dt(o), b = {
|
511
511
|
...t,
|
512
|
-
currentTeam:
|
512
|
+
currentTeam: d,
|
513
513
|
otherTeams: l,
|
514
514
|
canChangeBilling: m,
|
515
515
|
canAccessTeamSettings: g,
|
@@ -529,7 +529,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
529
529
|
hideBottomDivider: a
|
530
530
|
}) => {
|
531
531
|
const { isEndOfTrialActive: o, isTeamSuspended: i } = X();
|
532
|
-
return o || i ? null : /* @__PURE__ */
|
532
|
+
return o || i ? null : /* @__PURE__ */ f(Ue, { children: [
|
533
533
|
/* @__PURE__ */ s(
|
534
534
|
W,
|
535
535
|
{
|
@@ -537,7 +537,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
537
537
|
onClick: () => {
|
538
538
|
t == null || t();
|
539
539
|
},
|
540
|
-
children: /* @__PURE__ */
|
540
|
+
children: /* @__PURE__ */ f("div", { className: `flex-col ${ht.container}`, children: [
|
541
541
|
/* @__PURE__ */ s("span", { children: "Profile Settings" }),
|
542
542
|
/* @__PURE__ */ s("span", { className: ht.profileEmail, children: n })
|
543
543
|
] })
|
@@ -559,15 +559,15 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
559
559
|
if (!i)
|
560
560
|
return null;
|
561
561
|
const c = De(o) ? "Free" : Dt(o) ? "Trial" : void 0;
|
562
|
-
return /* @__PURE__ */
|
562
|
+
return /* @__PURE__ */ f(
|
563
563
|
t ? W : "div",
|
564
564
|
{
|
565
565
|
className: O.wrapper,
|
566
566
|
...t && { onClick: () => t(i) },
|
567
567
|
children: [
|
568
568
|
i.logoUrl ? /* @__PURE__ */ s("img", { className: O.profileImage, src: i.logoUrl, alt: "" }) : /* @__PURE__ */ s("span", { className: `${O.defaultProfileImage}`, children: /* @__PURE__ */ s(Rt, { size: "25px" }) }),
|
569
|
-
/* @__PURE__ */
|
570
|
-
/* @__PURE__ */
|
569
|
+
/* @__PURE__ */ f("div", { className: O.teamDetails, children: [
|
570
|
+
/* @__PURE__ */ f("div", { className: O.planWrapper, children: [
|
571
571
|
/* @__PURE__ */ s("span", { className: O.teamName, children: i.name }),
|
572
572
|
c && !n && /* @__PURE__ */ s("span", { className: `${O.planLabel}`, children: c })
|
573
573
|
] }),
|
@@ -597,7 +597,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
597
597
|
if (!a)
|
598
598
|
return null;
|
599
599
|
const c = De(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
600
|
-
return /* @__PURE__ */
|
600
|
+
return /* @__PURE__ */ f(
|
601
601
|
W,
|
602
602
|
{
|
603
603
|
"data-testid": "sidebar-upgrade-menu-item",
|
@@ -605,7 +605,7 @@ const qn = "_sidebarContainer_bmdti_1", Dn = {
|
|
605
605
|
className: `flex-col gap-1 items-start ${ke.container}`,
|
606
606
|
children: [
|
607
607
|
/* @__PURE__ */ s("span", { className: ke.planCta, children: c }),
|
608
|
-
/* @__PURE__ */
|
608
|
+
/* @__PURE__ */ f("div", { className: `flex-row items-center gap-1 ${ke.upgradeIconWrapper}`, children: [
|
609
609
|
/* @__PURE__ */ s(Ut, {}),
|
610
610
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
611
611
|
] })
|
@@ -671,41 +671,41 @@ async function Fr(e, t) {
|
|
671
671
|
y: o,
|
672
672
|
platform: i,
|
673
673
|
rects: c,
|
674
|
-
elements:
|
675
|
-
strategy:
|
674
|
+
elements: u,
|
675
|
+
strategy: d
|
676
676
|
} = e, {
|
677
677
|
boundary: l = "clippingAncestors",
|
678
678
|
rootBoundary: m = "viewport",
|
679
679
|
elementContext: g = "floating",
|
680
680
|
altBoundary: v = !1,
|
681
681
|
padding: y = 0
|
682
|
-
} = Gt(t, e), _ = Gr(y), b =
|
683
|
-
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(
|
682
|
+
} = Gt(t, e), _ = Gr(y), b = u[v ? g === "floating" ? "reference" : "floating" : g], p = Tt(await i.getClippingRect({
|
683
|
+
element: (n = await (i.isElement == null ? void 0 : i.isElement(b))) == null || n ? b : b.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(u.floating)),
|
684
684
|
boundary: l,
|
685
685
|
rootBoundary: m,
|
686
|
-
strategy:
|
686
|
+
strategy: d
|
687
687
|
})), h = g === "floating" ? {
|
688
688
|
x: a,
|
689
689
|
y: o,
|
690
690
|
width: c.floating.width,
|
691
691
|
height: c.floating.height
|
692
|
-
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(
|
692
|
+
} : c.reference, T = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(u.floating)), w = await (i.isElement == null ? void 0 : i.isElement(T)) ? await (i.getScale == null ? void 0 : i.getScale(T)) || {
|
693
693
|
x: 1,
|
694
694
|
y: 1
|
695
695
|
} : {
|
696
696
|
x: 1,
|
697
697
|
y: 1
|
698
698
|
}, C = Tt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
699
|
-
elements:
|
699
|
+
elements: u,
|
700
700
|
rect: h,
|
701
701
|
offsetParent: T,
|
702
|
-
strategy:
|
702
|
+
strategy: d
|
703
703
|
}) : h);
|
704
704
|
return {
|
705
|
-
top: (
|
706
|
-
bottom: (C.bottom -
|
707
|
-
left: (
|
708
|
-
right: (C.right -
|
705
|
+
top: (p.top - C.top + _.top) / w.y,
|
706
|
+
bottom: (C.bottom - p.bottom + _.bottom) / w.y,
|
707
|
+
left: (p.left - C.left + _.left) / w.x,
|
708
|
+
right: (C.right - p.right + _.right) / w.x
|
709
709
|
};
|
710
710
|
}
|
711
711
|
const Kr = function(e) {
|
@@ -720,33 +720,33 @@ const Kr = function(e) {
|
|
720
720
|
} = t, {
|
721
721
|
mainAxis: i = !0,
|
722
722
|
crossAxis: c = !1,
|
723
|
-
limiter:
|
723
|
+
limiter: u = {
|
724
724
|
fn: (b) => {
|
725
725
|
let {
|
726
|
-
x:
|
726
|
+
x: p,
|
727
727
|
y: h
|
728
728
|
} = b;
|
729
729
|
return {
|
730
|
-
x:
|
730
|
+
x: p,
|
731
731
|
y: h
|
732
732
|
};
|
733
733
|
}
|
734
734
|
},
|
735
|
-
...
|
735
|
+
...d
|
736
736
|
} = Gt(e, t), l = {
|
737
737
|
x: n,
|
738
738
|
y: a
|
739
|
-
}, m = await Fr(t,
|
739
|
+
}, m = await Fr(t, d), g = Dr(Ft(o)), v = qr(g);
|
740
740
|
let y = l[v], _ = l[g];
|
741
741
|
if (i) {
|
742
|
-
const b = v === "y" ? "top" : "left",
|
742
|
+
const b = v === "y" ? "top" : "left", p = v === "y" ? "bottom" : "right", h = y + m[b], T = y - m[p];
|
743
743
|
y = bt(h, y, T);
|
744
744
|
}
|
745
745
|
if (c) {
|
746
|
-
const b = g === "y" ? "top" : "left",
|
746
|
+
const b = g === "y" ? "top" : "left", p = g === "y" ? "bottom" : "right", h = _ + m[b], T = _ - m[p];
|
747
747
|
_ = bt(h, _, T);
|
748
748
|
}
|
749
|
-
const S =
|
749
|
+
const S = u.fn({
|
750
750
|
...t,
|
751
751
|
[v]: y,
|
752
752
|
[g]: _
|
@@ -802,10 +802,10 @@ const Kr = function(e) {
|
|
802
802
|
];
|
803
803
|
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Xr(n) })).sort((n, a) => n.status === A.InProgress && n.progress === 100 ? -1 : a.status === A.InProgress && a.progress === 100 ? 1 : n.status === a.status ? n.name < a.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(a.status));
|
804
804
|
}, vt = (e) => [xe.InProgress, xe.Created].includes(e), ea = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, ta = ({ task: e, language: t }) => {
|
805
|
-
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks:
|
805
|
+
const [n, a] = I(!1), [o, i] = I(!1), { onLanguageCompleteConfirm: c, fetchTasks: u } = V(), d = () => {
|
806
806
|
i(!1);
|
807
807
|
};
|
808
|
-
return /* @__PURE__ */
|
808
|
+
return /* @__PURE__ */ f(Ue, { children: [
|
809
809
|
o && /* @__PURE__ */ s(
|
810
810
|
on,
|
811
811
|
{
|
@@ -814,11 +814,11 @@ const Kr = function(e) {
|
|
814
814
|
title: `Are you finished with ${t.name}?`,
|
815
815
|
confirmText: "Mark as done",
|
816
816
|
closeText: "Cancel",
|
817
|
-
onClose:
|
817
|
+
onClose: d,
|
818
818
|
onConfirm: async () => {
|
819
|
-
a(!0), await c({ task: e, language: t, closePrompt:
|
819
|
+
a(!0), await c({ task: e, language: t, closePrompt: d }), u();
|
820
820
|
},
|
821
|
-
children: /* @__PURE__ */
|
821
|
+
children: /* @__PURE__ */ f(sn, { status: "info", children: [
|
822
822
|
"Make sure you are finished and ",
|
823
823
|
/* @__PURE__ */ s("strong", { children: "mark it as done" }),
|
824
824
|
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
@@ -841,12 +841,12 @@ const Kr = function(e) {
|
|
841
841
|
langCellSecondary: ra,
|
842
842
|
langStatus: aa
|
843
843
|
}, oa = ({ language: e, task: t }) => {
|
844
|
-
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = V(), i = e.progress ?? 0, c = e.status === A.Completed,
|
845
|
-
return /* @__PURE__ */
|
844
|
+
const { getProjectUrl: n, langNameOnClick: a, langProgressOnClick: o } = V(), i = e.progress ?? 0, c = e.status === A.Completed, u = ea(t, e);
|
845
|
+
return /* @__PURE__ */ f(
|
846
846
|
"tr",
|
847
847
|
{
|
848
848
|
className: j({
|
849
|
-
[je.langRowCompleted]:
|
849
|
+
[je.langRowCompleted]: u
|
850
850
|
}),
|
851
851
|
children: [
|
852
852
|
/* @__PURE__ */ s("td", { children: /* @__PURE__ */ s(q, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ s(
|
@@ -859,7 +859,7 @@ const Kr = function(e) {
|
|
859
859
|
children: e.name
|
860
860
|
}
|
861
861
|
) }) }),
|
862
|
-
/* @__PURE__ */ s("td", { className: je.langCellSecondary, children:
|
862
|
+
/* @__PURE__ */ s("td", { className: je.langCellSecondary, children: u || c ? "0" : /* @__PURE__ */ s(q, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ s(
|
863
863
|
M,
|
864
864
|
{
|
865
865
|
href: n({ task: t, language: e, taskUncompleted: !0 }),
|
@@ -869,11 +869,11 @@ const Kr = function(e) {
|
|
869
869
|
children: e.base_words_total - e.base_words_done
|
870
870
|
}
|
871
871
|
) }) }),
|
872
|
-
/* @__PURE__ */
|
872
|
+
/* @__PURE__ */ f("td", { children: [
|
873
873
|
i,
|
874
874
|
"%"
|
875
875
|
] }),
|
876
|
-
/* @__PURE__ */ s("td", { children:
|
876
|
+
/* @__PURE__ */ s("td", { children: u ? /* @__PURE__ */ s(ta, { task: t, language: e }) : /* @__PURE__ */ s(
|
877
877
|
"span",
|
878
878
|
{
|
879
879
|
className: `${je.langStatus} flex-row items-center justify-start`,
|
@@ -884,13 +884,13 @@ const Kr = function(e) {
|
|
884
884
|
]
|
885
885
|
}
|
886
886
|
);
|
887
|
-
}, sa = "_taskContainer_mt2or_1", ia = "_taskTitle_mt2or_21", ca = "_taskDescription_mt2or_28", la = "_languagesTable_mt2or_35",
|
887
|
+
}, sa = "_taskContainer_mt2or_1", ia = "_taskTitle_mt2or_21", ca = "_taskDescription_mt2or_28", la = "_languagesTable_mt2or_35", ua = "_metadata_mt2or_87", H = {
|
888
888
|
taskContainer: sa,
|
889
889
|
taskTitle: ia,
|
890
890
|
taskDescription: ca,
|
891
891
|
languagesTable: la,
|
892
|
-
metadata:
|
893
|
-
},
|
892
|
+
metadata: ua
|
893
|
+
}, da = ({ task: e }) => {
|
894
894
|
const { getProjectUrl: t, taskTitleOnClick: n } = V(), a = Zr(e.langs), o = (i) => {
|
895
895
|
window.open(
|
896
896
|
`/style-guide/${e.team_id}/download/${i.id}/link`,
|
@@ -898,13 +898,13 @@ const Kr = function(e) {
|
|
898
898
|
"noopener,noreferrer"
|
899
899
|
);
|
900
900
|
};
|
901
|
-
return /* @__PURE__ */
|
902
|
-
/* @__PURE__ */
|
903
|
-
/* @__PURE__ */
|
901
|
+
return /* @__PURE__ */ f("div", { className: H.taskContainer, children: [
|
902
|
+
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-center", children: [
|
903
|
+
/* @__PURE__ */ f("div", { className: "flex-row gap-1 items-start flex-wrap", children: [
|
904
904
|
/* @__PURE__ */ s(Ne, { color: Vr[e.task_type], variant: "solid", children: e.task_type.toLocaleUpperCase() }),
|
905
|
-
e.due_date && /* @__PURE__ */
|
905
|
+
e.due_date && /* @__PURE__ */ f(Ne, { color: "#EAB308", children: [
|
906
906
|
"DUE ",
|
907
|
-
hr(
|
907
|
+
hr(dn(e.due_date), "yyyy-MM-dd")
|
908
908
|
] })
|
909
909
|
] }),
|
910
910
|
e.style_guides.length > 0 && /* @__PURE__ */ s("div", { className: "flex-row", children: e.style_guides.length === 1 ? /* @__PURE__ */ s(
|
@@ -940,9 +940,9 @@ const Kr = function(e) {
|
|
940
940
|
children: e.title
|
941
941
|
}
|
942
942
|
) }),
|
943
|
-
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: _r(
|
944
|
-
/* @__PURE__ */
|
945
|
-
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */
|
943
|
+
e.description && /* @__PURE__ */ s("div", { className: H.taskDescription, children: _r(fr(e.description)) }),
|
944
|
+
/* @__PURE__ */ f("table", { className: H.languagesTable, children: [
|
945
|
+
/* @__PURE__ */ s("thead", { children: /* @__PURE__ */ f("tr", { children: [
|
946
946
|
/* @__PURE__ */ s("th", { children: "Languages" }),
|
947
947
|
/* @__PURE__ */ s("th", { children: "Words to do" }),
|
948
948
|
/* @__PURE__ */ s("th", { children: "Progress" }),
|
@@ -950,13 +950,13 @@ const Kr = function(e) {
|
|
950
950
|
] }) }),
|
951
951
|
/* @__PURE__ */ s("tbody", { children: a.map((i) => /* @__PURE__ */ s(oa, { language: i, task: e }, i.lang_id)) })
|
952
952
|
] }),
|
953
|
-
/* @__PURE__ */
|
954
|
-
/* @__PURE__ */
|
953
|
+
/* @__PURE__ */ f("div", { "data-testid": "sidebar-task-overview-metadata", className: H.metadata, children: [
|
954
|
+
/* @__PURE__ */ f("span", { children: [
|
955
955
|
"Source: ",
|
956
956
|
e.source_lang_name
|
957
957
|
] }),
|
958
958
|
/* @__PURE__ */ s("span", { children: e.created_by_fullname }),
|
959
|
-
/* @__PURE__ */
|
959
|
+
/* @__PURE__ */ f("span", { children: [
|
960
960
|
"In ",
|
961
961
|
e.project_name,
|
962
962
|
e.master_branching_enabled === "1" && /* @__PURE__ */ s("div", { className: H.tag, children: e.branch_name ? e.branch_name : "master" })
|
@@ -968,12 +968,12 @@ const Kr = function(e) {
|
|
968
968
|
TaskClosed: "task_closed",
|
969
969
|
Refresh: "refresh",
|
970
970
|
ShowDialog: "show_dialog"
|
971
|
-
}, ma = "_loadingContainer_19d6m_1", _a = "_noTasksContainer_19d6m_7", ga = "_noTasksHeading_19d6m_14",
|
971
|
+
}, ma = "_loadingContainer_19d6m_1", _a = "_noTasksContainer_19d6m_7", ga = "_noTasksHeading_19d6m_14", pa = "_noTasksText_19d6m_18", fa = "_tasksContainer_19d6m_23", F = {
|
972
972
|
loadingContainer: ma,
|
973
973
|
noTasksContainer: _a,
|
974
974
|
noTasksHeading: ga,
|
975
|
-
noTasksText:
|
976
|
-
tasksContainer:
|
975
|
+
noTasksText: pa,
|
976
|
+
tasksContainer: fa
|
977
977
|
}, ha = () => {
|
978
978
|
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: a } = V();
|
979
979
|
return $e(() => ((async () => {
|
@@ -981,17 +981,17 @@ const Kr = function(e) {
|
|
981
981
|
t == null || t({ tasks: i });
|
982
982
|
})(), document.addEventListener(P.TaskCompleted, a), document.addEventListener(P.TaskClosed, a), document.addEventListener(P.Refresh, a), () => {
|
983
983
|
document.removeEventListener(P.TaskCompleted, a), document.removeEventListener(P.TaskClosed, a), document.removeEventListener(P.Refresh, a);
|
984
|
-
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(cn, {}) }) : e.length === 0 ? /* @__PURE__ */
|
984
|
+
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: F.loadingContainer, children: /* @__PURE__ */ s(cn, {}) }) : e.length === 0 ? /* @__PURE__ */ f("div", { "data-testid": "sidebar-no-tasks-popover", className: F.noTasksContainer, children: [
|
985
985
|
/* @__PURE__ */ s("h3", { className: F.noTasksHeading, children: "No tasks" }),
|
986
|
-
/* @__PURE__ */
|
986
|
+
/* @__PURE__ */ f("div", { className: F.noTasksText, children: [
|
987
987
|
"Your incoming tasks will appear here.",
|
988
988
|
/* @__PURE__ */ s("br", {}),
|
989
989
|
/* @__PURE__ */ s(M, { href: "https://docs.lokalise.com/translation-workflow/tasks", target: "_new", children: "Learn more" })
|
990
990
|
] })
|
991
|
-
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(
|
991
|
+
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: F.tasksContainer, children: e.map((o) => /* @__PURE__ */ s(da, { task: o }, o.id)) });
|
992
992
|
}, ba = ({ children: e, config: t }) => {
|
993
|
-
const [n, a] = I([]), [o, i] = I(!0), [c,
|
994
|
-
getProjectUrl:
|
993
|
+
const [n, a] = I([]), [o, i] = I(!0), [c, u] = I(0), {
|
994
|
+
getProjectUrl: d,
|
995
995
|
onLanguageCompleteConfirm: l,
|
996
996
|
onTasksWidgetOpen: m,
|
997
997
|
langNameOnClick: g,
|
@@ -1001,19 +1001,19 @@ const Kr = function(e) {
|
|
1001
1001
|
i(!0);
|
1002
1002
|
const T = await _();
|
1003
1003
|
return a(T), i(!1), T;
|
1004
|
-
},
|
1004
|
+
}, p = async () => {
|
1005
1005
|
const T = await S();
|
1006
|
-
|
1006
|
+
u(T);
|
1007
1007
|
};
|
1008
|
-
$e(() => (
|
1009
|
-
document.removeEventListener(P.TaskCompleted,
|
1008
|
+
$e(() => (p(), document.addEventListener(P.TaskCompleted, p), document.addEventListener(P.TaskClosed, p), document.addEventListener(P.Refresh, p), () => {
|
1009
|
+
document.removeEventListener(P.TaskCompleted, p), document.removeEventListener(P.TaskClosed, p), document.removeEventListener(P.Refresh, p);
|
1010
1010
|
}));
|
1011
1011
|
const h = {
|
1012
1012
|
fetchTasks: b,
|
1013
1013
|
tasks: n,
|
1014
1014
|
tasksCount: c,
|
1015
1015
|
loadingTasks: o,
|
1016
|
-
getProjectUrl:
|
1016
|
+
getProjectUrl: d,
|
1017
1017
|
onLanguageCompleteConfirm: l,
|
1018
1018
|
onTasksWidgetOpen: m,
|
1019
1019
|
langNameOnClick: g,
|
@@ -1050,7 +1050,7 @@ const Kr = function(e) {
|
|
1050
1050
|
}
|
1051
1051
|
})
|
1052
1052
|
],
|
1053
|
-
children: (a) => /* @__PURE__ */
|
1053
|
+
children: (a) => /* @__PURE__ */ f(
|
1054
1054
|
Oe,
|
1055
1055
|
{
|
1056
1056
|
type: "button",
|
@@ -1060,7 +1060,7 @@ const Kr = function(e) {
|
|
1060
1060
|
[Ie.activeNavItem]: a
|
1061
1061
|
}),
|
1062
1062
|
children: [
|
1063
|
-
/* @__PURE__ */ s(
|
1063
|
+
/* @__PURE__ */ s(un, { size: "25px" }),
|
1064
1064
|
n > 0 && /* @__PURE__ */ s("div", { className: Ie.badge, "aria-label": `${n} items requiring attention`, children: n > 9 ? "9+" : n })
|
1065
1065
|
]
|
1066
1066
|
}
|
@@ -1083,10 +1083,10 @@ R.Tasks = va;
|
|
1083
1083
|
const Sa = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
1084
1084
|
breadcrumbsItem: Sa,
|
1085
1085
|
breadcrumbs: Ca
|
1086
|
-
}, Zo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */
|
1086
|
+
}, Zo = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: yt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ f(At, { children: [
|
1087
1087
|
/* @__PURE__ */ s(M, { className: yt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1088
1088
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1089
|
-
] }, `${t.link}-${t.name}`)) }), wa = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */
|
1089
|
+
] }, `${t.link}-${t.name}`)) }), wa = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ f(At, { children: [
|
1090
1090
|
!!n && t.some((a) => a.visible) && /* @__PURE__ */ s(kt, {}),
|
1091
1091
|
t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: i }) => /* @__PURE__ */ s(W, { href: a || "#", "aria-label": o, onClick: i, children: o }, o))
|
1092
1092
|
] }, t[0].label)) }), Pa = "_badge_1pc1v_1", Aa = "_tag_1pc1v_15", Ra = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ka = "_disabled_1pc1v_57", Ia = "_projectNavigationItem_1pc1v_61", ja = "_projectNavigationItemDisabled_1pc1v_67", L = {
|
@@ -1096,8 +1096,8 @@ const Sa = "_breadcrumbsItem_1hm6a_1", Ca = "_breadcrumbs_1hm6a_1", yt = {
|
|
1096
1096
|
disabled: ka,
|
1097
1097
|
projectNavigationItem: Ia,
|
1098
1098
|
projectNavigationItemDisabled: ja
|
1099
|
-
}, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */
|
1100
|
-
/* @__PURE__ */
|
1099
|
+
}, Et = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ f("div", { className: "flex gap-1", children: [
|
1100
|
+
/* @__PURE__ */ f("div", { children: [
|
1101
1101
|
/* @__PURE__ */ s("span", { children: e }),
|
1102
1102
|
!!t && /* @__PURE__ */ s("div", { className: L.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
1103
1103
|
] }),
|
@@ -1576,7 +1576,9 @@ const lo = r.object({
|
|
1576
1576
|
language_id: r.number(),
|
1577
1577
|
language_iso: r.string(),
|
1578
1578
|
progress: r.number(),
|
1579
|
-
words_to_do: r.number()
|
1579
|
+
words_to_do: r.number(),
|
1580
|
+
project_language_id: r.number(),
|
1581
|
+
project_language_uuid: r.string().uuid()
|
1580
1582
|
}), mo = r.object({
|
1581
1583
|
projectId: r.string()
|
1582
1584
|
}), Xt = r.object({
|
@@ -1584,14 +1586,16 @@ const lo = r.object({
|
|
1584
1586
|
lang_iso: r.string(),
|
1585
1587
|
lang_name: r.string(),
|
1586
1588
|
is_rtl: r.boolean(),
|
1587
|
-
plural_forms: r.array(r.string().optional())
|
1589
|
+
plural_forms: r.array(r.string().optional()),
|
1590
|
+
project_language_id: r.number(),
|
1591
|
+
project_language_uuid: r.string().uuid()
|
1588
1592
|
}), _o = r.object({
|
1589
1593
|
project_id: r.string(),
|
1590
1594
|
project_uuid: r.string().uuid(),
|
1591
1595
|
languages: r.array(Xt)
|
1592
1596
|
}), go = r.object({
|
1593
1597
|
projectId: r.string()
|
1594
|
-
}),
|
1598
|
+
}), po = r.object({
|
1595
1599
|
languages: r.array(
|
1596
1600
|
r.object({
|
1597
1601
|
lang_iso: r.string(),
|
@@ -1600,7 +1604,7 @@ const lo = r.object({
|
|
1600
1604
|
custom_plural_forms: r.array(r.string()).optional()
|
1601
1605
|
})
|
1602
1606
|
)
|
1603
|
-
}),
|
1607
|
+
}), fo = r.object({
|
1604
1608
|
project_id: r.string(),
|
1605
1609
|
project_uuid: r.string().uuid(),
|
1606
1610
|
languages: r.array(Xt),
|
@@ -1628,14 +1632,14 @@ const lo = r.object({
|
|
1628
1632
|
requestPathParamsSchema: mo,
|
1629
1633
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1630
1634
|
successResponseBodySchema: _o
|
1631
|
-
}),
|
1635
|
+
}), us = jt({
|
1632
1636
|
description: "Add languages to existing project",
|
1633
1637
|
requestHeaderSchema: U,
|
1634
1638
|
method: "post",
|
1635
1639
|
requestPathParamsSchema: go,
|
1636
1640
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1637
|
-
requestBodySchema:
|
1638
|
-
successResponseBodySchema:
|
1641
|
+
requestBodySchema: po,
|
1642
|
+
successResponseBodySchema: fo
|
1639
1643
|
}), yo = jt({
|
1640
1644
|
description: "Bulk update project languages",
|
1641
1645
|
requestHeaderSchema: U,
|
@@ -1644,7 +1648,7 @@ const lo = r.object({
|
|
1644
1648
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages/bulk-update`,
|
1645
1649
|
requestBodySchema: bo,
|
1646
1650
|
successResponseBodySchema: To
|
1647
|
-
}),
|
1651
|
+
}), ue = U, Fe = r.union([
|
1648
1652
|
r.literal("localization_files"),
|
1649
1653
|
r.literal("paged_documents"),
|
1650
1654
|
r.literal("marketing")
|
@@ -1684,7 +1688,7 @@ const lo = r.object({
|
|
1684
1688
|
qa_issues_total: r.number(),
|
1685
1689
|
qa_issues: So,
|
1686
1690
|
languages: r.array(uo)
|
1687
|
-
}),
|
1691
|
+
}), de = r.object({
|
1688
1692
|
project_id: r.string(),
|
1689
1693
|
uuid: r.string().uuid(),
|
1690
1694
|
project_type: Fe,
|
@@ -1695,8 +1699,11 @@ const lo = r.object({
|
|
1695
1699
|
created_by: r.number(),
|
1696
1700
|
created_by_email: r.string(),
|
1697
1701
|
team_id: r.number(),
|
1702
|
+
team_uuid: r.string().uuid(),
|
1698
1703
|
base_language_id: r.number(),
|
1699
1704
|
base_language_iso: r.string(),
|
1705
|
+
base_project_language_id: r.number(),
|
1706
|
+
base_project_language_uuid: r.string().uuid(),
|
1700
1707
|
settings: Eo.optional(),
|
1701
1708
|
statistics: Co.optional()
|
1702
1709
|
}), wo = r.object({
|
@@ -1715,7 +1722,7 @@ const lo = r.object({
|
|
1715
1722
|
limit: r.number().optional(),
|
1716
1723
|
page: r.number().optional()
|
1717
1724
|
}), Ao = r.object({
|
1718
|
-
projects: r.array(
|
1725
|
+
projects: r.array(de)
|
1719
1726
|
}), Ro = r.object({
|
1720
1727
|
project_id: r.string()
|
1721
1728
|
}), ko = r.object({
|
@@ -1725,33 +1732,33 @@ const lo = r.object({
|
|
1725
1732
|
description: r.string().optional()
|
1726
1733
|
}), me = () => "/projects", jo = He({
|
1727
1734
|
description: "Create a new project",
|
1728
|
-
requestHeaderSchema:
|
1735
|
+
requestHeaderSchema: ue,
|
1729
1736
|
method: "post",
|
1730
1737
|
pathResolver: me,
|
1731
1738
|
requestBodySchema: wo,
|
1732
|
-
successResponseBodySchema:
|
1739
|
+
successResponseBodySchema: de
|
1733
1740
|
}), No = Y({
|
1734
1741
|
description: "List all projects",
|
1735
|
-
requestHeaderSchema:
|
1742
|
+
requestHeaderSchema: ue,
|
1736
1743
|
pathResolver: me,
|
1737
1744
|
requestQuerySchema: Po,
|
1738
1745
|
successResponseBodySchema: Ao
|
1739
1746
|
}), Oo = Y({
|
1740
1747
|
description: "Retrieve a project",
|
1741
|
-
requestHeaderSchema:
|
1748
|
+
requestHeaderSchema: ue,
|
1742
1749
|
requestPathParamsSchema: Ro,
|
1743
1750
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1744
|
-
successResponseBodySchema:
|
1751
|
+
successResponseBodySchema: de
|
1745
1752
|
}), xo = He({
|
1746
1753
|
description: "Update a project",
|
1747
|
-
requestHeaderSchema:
|
1754
|
+
requestHeaderSchema: ue,
|
1748
1755
|
method: "put",
|
1749
1756
|
requestPathParamsSchema: ko,
|
1750
1757
|
pathResolver: ({ project_id: e }) => `${me()}/${e}`,
|
1751
1758
|
requestBodySchema: Io,
|
1752
|
-
successResponseBodySchema:
|
1759
|
+
successResponseBodySchema: de
|
1753
1760
|
});
|
1754
|
-
function
|
1761
|
+
function ds(e, t, n = {}) {
|
1755
1762
|
return Be({
|
1756
1763
|
...n,
|
1757
1764
|
mutationFn: async (a) => D(e, jo, {
|
@@ -1775,7 +1782,7 @@ function _s(e, t, n) {
|
|
1775
1782
|
const gs = {
|
1776
1783
|
paramsKey: (e) => ["listProjects", e]
|
1777
1784
|
};
|
1778
|
-
function
|
1785
|
+
function ps(e, t, n) {
|
1779
1786
|
return $({
|
1780
1787
|
...n,
|
1781
1788
|
queryFn: async ({ queryKey: [a, o] }) => Q(e, No, {
|
@@ -1784,7 +1791,7 @@ function fs(e, t, n) {
|
|
1784
1791
|
})
|
1785
1792
|
});
|
1786
1793
|
}
|
1787
|
-
const
|
1794
|
+
const fs = {
|
1788
1795
|
projectIdKey: (e) => ["retrieveProject", e]
|
1789
1796
|
};
|
1790
1797
|
function hs(e, t, n) {
|
@@ -1818,8 +1825,8 @@ function Ts(e, t, n, a = {}) {
|
|
1818
1825
|
}
|
1819
1826
|
export {
|
1820
1827
|
go as ADD_LANGUAGES_TO_PROJECT_PATH_PARAMS_SCHEMA,
|
1821
|
-
|
1822
|
-
|
1828
|
+
po as ADD_LANGUAGES_TO_PROJECT_REQUEST_BODY_SCHEMA,
|
1829
|
+
fo as ADD_LANGUAGES_TO_PROJECT_RESPONSE_SCHEMA,
|
1823
1830
|
ho as BULK_UPDATE_PROJECT_LANGUAGES_PATH_PARAMS_SCHEMA,
|
1824
1831
|
bo as BULK_UPDATE_PROJECT_LANGUAGES_REQUEST_BODY_SCHEMA,
|
1825
1832
|
To as BULK_UPDATE_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
@@ -1829,7 +1836,7 @@ export {
|
|
1829
1836
|
Za as CONTRIBUTOR_SCHEMA,
|
1830
1837
|
wo as CREATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1831
1838
|
qt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1832
|
-
|
1839
|
+
ur as ENTERPRISE_PLAN_IDS,
|
1833
1840
|
cr as ESSENTIAL_PLAN_IDS,
|
1834
1841
|
Bt as FREE_PLAN_ID,
|
1835
1842
|
k as HeaderBuilder,
|
@@ -1844,9 +1851,9 @@ export {
|
|
1844
1851
|
_o as LIST_PROJECT_LANGUAGES_RESPONSE_SCHEMA,
|
1845
1852
|
oe as NavigationPanel,
|
1846
1853
|
es as NavigationTabs,
|
1847
|
-
|
1854
|
+
ue as PROJECT_API_BASE_HEADERS_SCHEMA,
|
1848
1855
|
So as PROJECT_QA_ISSUES_SCHEMA,
|
1849
|
-
|
1856
|
+
de as PROJECT_SCHEMA,
|
1850
1857
|
Eo as PROJECT_SETTINGS_SCHEMA,
|
1851
1858
|
Co as PROJECT_STATISTICS_SCHEMA,
|
1852
1859
|
Fe as PROJECT_TYPE_SCHEMA,
|
@@ -1870,7 +1877,7 @@ export {
|
|
1870
1877
|
Io as UPDATE_PROJECT_REQUEST_BODY_SCHEMA,
|
1871
1878
|
$a as USER_TOKEN_REQUEST_HEADER_SCHEMA,
|
1872
1879
|
se as UnauthorizedError,
|
1873
|
-
|
1880
|
+
us as addLanguagesToProject,
|
1874
1881
|
yo as bulkUpdateProjectLanguages,
|
1875
1882
|
_r as convertNewLineToBreakTag,
|
1876
1883
|
zt as createHeaderBuilderMiddleware,
|
@@ -1897,25 +1904,25 @@ export {
|
|
1897
1904
|
ms as listProjectLanguagesKey,
|
1898
1905
|
No as listProjects,
|
1899
1906
|
gs as listProjectsKey,
|
1900
|
-
|
1907
|
+
fr as makeUrlClickable,
|
1901
1908
|
Z as parseJwtTokenPayload,
|
1902
1909
|
os as refreshExpiredToken,
|
1903
1910
|
so as retrieveContributor,
|
1904
1911
|
io as retrieveContributorKeys,
|
1905
1912
|
Oo as retrieveProject,
|
1906
|
-
|
1913
|
+
fs as retrieveProjectQueryKey,
|
1907
1914
|
xo as updateProject,
|
1908
1915
|
ls as useAuthenticatedProjectContributor,
|
1909
1916
|
Yt as useAuthenticatedSessionPayload,
|
1910
1917
|
is as useAuthenticatedUser,
|
1911
1918
|
Ts as useBulkUpdateProjectLanguagesMutation,
|
1912
|
-
|
1919
|
+
ds as useCreateProjectMutation,
|
1913
1920
|
$e as useEffectOnce,
|
1914
1921
|
ss as useGetPromotedClassicSessionJwtQuery,
|
1915
1922
|
Xa as useGetTeamUsersQuery,
|
1916
1923
|
Fa as useGetUserTokenQuery,
|
1917
1924
|
_s as useListProjectLanguagesQuery,
|
1918
|
-
|
1925
|
+
ps as useListProjectsQuery,
|
1919
1926
|
co as useRetrieveContributorQuery,
|
1920
1927
|
hs as useRetrieveProjectQuery,
|
1921
1928
|
bs as useUpdateProjectMutation
|