@lokalise/harmony 1.17.0 → 1.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony.cjs +1 -1
- package/dist/harmony.mjs +475 -463
- package/dist/types/src/features/publicApi/contributors.d.ts +45 -3
- package/dist/types/src/features/publicApi/languages.d.ts +45 -3
- package/dist/types/src/features/publicApi/projects.d.ts +180 -12
- package/dist/types/src/features/publicApi/teamUsers.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/contributorTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/sharedTypes.d.ts +125 -11
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +45 -3
- package/dist/types/src/features/publicApi/types/userTokenTypes.d.ts +32 -2
- package/dist/types/src/features/publicApi/userToken.d.ts +32 -2
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
var
|
2
|
-
var Zt = (e, t, n) => t in e ?
|
1
|
+
var Vt = Object.defineProperty;
|
2
|
+
var Zt = (e, t, n) => t in e ? Vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
3
|
var ee = (e, t, n) => Zt(e, typeof t != "symbol" ? t + "" : t, n);
|
4
4
|
import { jsx as s, jsxs as h, Fragment as Ue } from "react/jsx-runtime";
|
5
5
|
import * as F from "react";
|
6
|
-
import { useRef as
|
7
|
-
import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as nn, UserIcon as
|
6
|
+
import { useRef as Et, useState as R, useCallback as We, useEffect as G, useContext as wt, createContext as Ct, cloneElement as en, Fragment as kt, forwardRef as tn } from "react";
|
7
|
+
import { Tooltip as H, Link as L, Menu as ae, MenuList as se, CaretUpIcon as nn, UserIcon as It, MenuItem as K, MenuDivider as Pt, ConfirmModal as rn, Alert as on, Tag as Ne, Button as je, Loading as an, Popover as sn, JobIcon as cn } from "@lokalise/louis";
|
8
8
|
import { format as At, parseISO as ln, isThisSecond as dn } from "date-fns";
|
9
9
|
import { toZonedTime as un } from "date-fns-tz";
|
10
|
-
import { z as
|
10
|
+
import { z as r } from "zod";
|
11
11
|
import { buildPayloadRoute as qe } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
12
12
|
import { sendByPayloadRoute as W, sendByGetRoute as J } from "@lokalise/frontend-http-client";
|
13
13
|
import { useQuery as B, useMutation as Rt } from "@tanstack/react-query";
|
@@ -17,7 +17,7 @@ const xe = {
|
|
17
17
|
InProgress: "in_progress",
|
18
18
|
Created: "created",
|
19
19
|
Queued: "queued"
|
20
|
-
},
|
20
|
+
}, I = {
|
21
21
|
...xe,
|
22
22
|
NotStarted: "not_started"
|
23
23
|
}, te = {
|
@@ -47,31 +47,31 @@ function mn() {
|
|
47
47
|
var e = typeof ne == "object" && ne && ne.Object === Object && ne;
|
48
48
|
return _e = e, _e;
|
49
49
|
}
|
50
|
-
var ge,
|
50
|
+
var ge, Xe;
|
51
51
|
function jt() {
|
52
|
-
if (
|
53
|
-
|
52
|
+
if (Xe) return ge;
|
53
|
+
Xe = 1;
|
54
54
|
var e = mn(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
55
55
|
return ge = n, ge;
|
56
56
|
}
|
57
|
-
var he,
|
57
|
+
var he, Ye;
|
58
58
|
function fn() {
|
59
|
-
if (
|
60
|
-
|
59
|
+
if (Ye) return he;
|
60
|
+
Ye = 1;
|
61
61
|
var e = jt(), t = function() {
|
62
62
|
return e.Date.now();
|
63
63
|
};
|
64
64
|
return he = t, he;
|
65
65
|
}
|
66
|
-
var pe,
|
66
|
+
var pe, Ve;
|
67
67
|
function _n() {
|
68
|
-
if (
|
69
|
-
|
68
|
+
if (Ve) return pe;
|
69
|
+
Ve = 1;
|
70
70
|
var e = /\s/;
|
71
71
|
function t(n) {
|
72
|
-
for (var
|
72
|
+
for (var o = n.length; o-- && e.test(n.charAt(o)); )
|
73
73
|
;
|
74
|
-
return
|
74
|
+
return o;
|
75
75
|
}
|
76
76
|
return pe = t, pe;
|
77
77
|
}
|
@@ -80,8 +80,8 @@ function gn() {
|
|
80
80
|
if (Ze) return be;
|
81
81
|
Ze = 1;
|
82
82
|
var e = _n(), t = /^\s+/;
|
83
|
-
function n(
|
84
|
-
return
|
83
|
+
function n(o) {
|
84
|
+
return o && o.slice(0, e(o) + 1).replace(t, "");
|
85
85
|
}
|
86
86
|
return be = n, be;
|
87
87
|
}
|
@@ -96,7 +96,7 @@ var Te, tt;
|
|
96
96
|
function hn() {
|
97
97
|
if (tt) return Te;
|
98
98
|
tt = 1;
|
99
|
-
var e = xt(), t = Object.prototype, n = t.hasOwnProperty,
|
99
|
+
var e = xt(), t = Object.prototype, n = t.hasOwnProperty, o = t.toString, a = e ? e.toStringTag : void 0;
|
100
100
|
function i(c) {
|
101
101
|
var d = n.call(c, a), u = c[a];
|
102
102
|
try {
|
@@ -104,7 +104,7 @@ function hn() {
|
|
104
104
|
var l = !0;
|
105
105
|
} catch {
|
106
106
|
}
|
107
|
-
var m =
|
107
|
+
var m = o.call(c);
|
108
108
|
return l && (d ? c[a] = u : delete c[a]), m;
|
109
109
|
}
|
110
110
|
return Te = i, Te;
|
@@ -114,8 +114,8 @@ function pn() {
|
|
114
114
|
if (nt) return ye;
|
115
115
|
nt = 1;
|
116
116
|
var e = Object.prototype, t = e.toString;
|
117
|
-
function n(
|
118
|
-
return t.call(
|
117
|
+
function n(o) {
|
118
|
+
return t.call(o);
|
119
119
|
}
|
120
120
|
return ye = n, ye;
|
121
121
|
}
|
@@ -123,41 +123,41 @@ var Se, rt;
|
|
123
123
|
function bn() {
|
124
124
|
if (rt) return Se;
|
125
125
|
rt = 1;
|
126
|
-
var e = xt(), t = hn(), n = pn(),
|
126
|
+
var e = xt(), t = hn(), n = pn(), o = "[object Null]", a = "[object Undefined]", i = e ? e.toStringTag : void 0;
|
127
127
|
function c(d) {
|
128
|
-
return d == null ? d === void 0 ? a :
|
128
|
+
return d == null ? d === void 0 ? a : o : i && i in Object(d) ? t(d) : n(d);
|
129
129
|
}
|
130
130
|
return Se = c, Se;
|
131
131
|
}
|
132
|
-
var
|
132
|
+
var Ee, ot;
|
133
133
|
function vn() {
|
134
|
-
if (ot) return
|
134
|
+
if (ot) return Ee;
|
135
135
|
ot = 1;
|
136
136
|
function e(t) {
|
137
137
|
return t != null && typeof t == "object";
|
138
138
|
}
|
139
|
-
return
|
139
|
+
return Ee = e, Ee;
|
140
140
|
}
|
141
|
-
var
|
141
|
+
var we, at;
|
142
142
|
function Tn() {
|
143
|
-
if (at) return
|
143
|
+
if (at) return we;
|
144
144
|
at = 1;
|
145
145
|
var e = bn(), t = vn(), n = "[object Symbol]";
|
146
|
-
function
|
146
|
+
function o(a) {
|
147
147
|
return typeof a == "symbol" || t(a) && e(a) == n;
|
148
148
|
}
|
149
|
-
return
|
149
|
+
return we = o, we;
|
150
150
|
}
|
151
151
|
var Ce, st;
|
152
152
|
function yn() {
|
153
153
|
if (st) return Ce;
|
154
154
|
st = 1;
|
155
|
-
var e = gn(), t = He(), n = Tn(),
|
155
|
+
var e = gn(), t = He(), n = Tn(), o = NaN, a = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, c = /^0o[0-7]+$/i, d = parseInt;
|
156
156
|
function u(l) {
|
157
157
|
if (typeof l == "number")
|
158
158
|
return l;
|
159
159
|
if (n(l))
|
160
|
-
return
|
160
|
+
return o;
|
161
161
|
if (t(l)) {
|
162
162
|
var m = typeof l.valueOf == "function" ? l.valueOf() : l;
|
163
163
|
l = t(m) ? m + "" : m;
|
@@ -166,7 +166,7 @@ function yn() {
|
|
166
166
|
return l === 0 ? l : +l;
|
167
167
|
l = e(l);
|
168
168
|
var _ = i.test(l);
|
169
|
-
return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ?
|
169
|
+
return _ || c.test(l) ? d(l.slice(2), _ ? 2 : 8) : a.test(l) ? o : +l;
|
170
170
|
}
|
171
171
|
return Ce = u, Ce;
|
172
172
|
}
|
@@ -174,64 +174,64 @@ var ke, it;
|
|
174
174
|
function Ot() {
|
175
175
|
if (it) return ke;
|
176
176
|
it = 1;
|
177
|
-
var e = He(), t = fn(), n = yn(),
|
177
|
+
var e = He(), t = fn(), n = yn(), o = "Expected a function", a = Math.max, i = Math.min;
|
178
178
|
function c(d, u, l) {
|
179
|
-
var m, _, T, y, f,
|
179
|
+
var m, _, T, y, f, E, b = 0, g = !1, p = !1, v = !0;
|
180
180
|
if (typeof d != "function")
|
181
|
-
throw new TypeError(
|
181
|
+
throw new TypeError(o);
|
182
182
|
u = n(u) || 0, e(l) && (g = !!l.leading, p = "maxWait" in l, T = p ? a(n(l.maxWait) || 0, u) : T, v = "trailing" in l ? !!l.trailing : v);
|
183
183
|
function C(S) {
|
184
184
|
var j = m, D = _;
|
185
185
|
return m = _ = void 0, b = S, y = d.apply(D, j), y;
|
186
186
|
}
|
187
|
-
function
|
187
|
+
function w(S) {
|
188
188
|
return b = S, f = setTimeout(Z, u), g ? C(S) : y;
|
189
189
|
}
|
190
|
-
function
|
191
|
-
var j = S -
|
190
|
+
function V(S) {
|
191
|
+
var j = S - E, D = S - b, Ke = u - j;
|
192
192
|
return p ? i(Ke, T - D) : Ke;
|
193
193
|
}
|
194
194
|
function ze(S) {
|
195
|
-
var j = S -
|
196
|
-
return
|
195
|
+
var j = S - E, D = S - b;
|
196
|
+
return E === void 0 || j >= u || j < 0 || p && D >= T;
|
197
197
|
}
|
198
198
|
function Z() {
|
199
199
|
var S = t();
|
200
200
|
if (ze(S))
|
201
201
|
return Ge(S);
|
202
|
-
f = setTimeout(Z,
|
202
|
+
f = setTimeout(Z, V(S));
|
203
203
|
}
|
204
204
|
function Ge(S) {
|
205
205
|
return f = void 0, v && m ? C(S) : (m = _ = void 0, y);
|
206
206
|
}
|
207
|
-
function
|
208
|
-
f !== void 0 && clearTimeout(f), b = 0, m =
|
207
|
+
function Xt() {
|
208
|
+
f !== void 0 && clearTimeout(f), b = 0, m = E = _ = f = void 0;
|
209
209
|
}
|
210
|
-
function
|
210
|
+
function Yt() {
|
211
211
|
return f === void 0 ? y : Ge(t());
|
212
212
|
}
|
213
213
|
function me() {
|
214
214
|
var S = t(), j = ze(S);
|
215
|
-
if (m = arguments, _ = this,
|
215
|
+
if (m = arguments, _ = this, E = S, j) {
|
216
216
|
if (f === void 0)
|
217
|
-
return E
|
217
|
+
return w(E);
|
218
218
|
if (p)
|
219
|
-
return clearTimeout(f), f = setTimeout(Z, u), C(
|
219
|
+
return clearTimeout(f), f = setTimeout(Z, u), C(E);
|
220
220
|
}
|
221
221
|
return f === void 0 && (f = setTimeout(Z, u)), y;
|
222
222
|
}
|
223
|
-
return me.cancel =
|
223
|
+
return me.cancel = Xt, me.flush = Yt, me;
|
224
224
|
}
|
225
225
|
return ke = c, ke;
|
226
226
|
}
|
227
227
|
var Sn = Ot();
|
228
|
-
const
|
229
|
-
var
|
230
|
-
function
|
231
|
-
if (ct) return
|
228
|
+
const En = /* @__PURE__ */ Nt(Sn);
|
229
|
+
var Ie, ct;
|
230
|
+
function wn() {
|
231
|
+
if (ct) return Ie;
|
232
232
|
ct = 1;
|
233
233
|
var e = Ot(), t = He(), n = "Expected a function";
|
234
|
-
function
|
234
|
+
function o(a, i, c) {
|
235
235
|
var d = !0, u = !0;
|
236
236
|
if (typeof a != "function")
|
237
237
|
throw new TypeError(n);
|
@@ -241,27 +241,27 @@ function En() {
|
|
241
241
|
trailing: u
|
242
242
|
});
|
243
243
|
}
|
244
|
-
return
|
244
|
+
return Ie = o, Ie;
|
245
245
|
}
|
246
|
-
var Cn =
|
247
|
-
const kn = /* @__PURE__ */ Nt(Cn),
|
246
|
+
var Cn = wn();
|
247
|
+
const kn = /* @__PURE__ */ Nt(Cn), In = (e, t, n, o) => {
|
248
248
|
switch (t) {
|
249
249
|
case "debounce":
|
250
|
-
return
|
250
|
+
return En(e, n, o);
|
251
251
|
case "throttle":
|
252
|
-
return kn(e, n,
|
252
|
+
return kn(e, n, o);
|
253
253
|
default:
|
254
254
|
return e;
|
255
255
|
}
|
256
|
-
},
|
256
|
+
}, Pn = (
|
257
257
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
258
258
|
(e) => {
|
259
259
|
const t = F.useRef(e);
|
260
260
|
return F.useEffect(() => {
|
261
261
|
t.current = e;
|
262
262
|
}), F.useMemo(() => (...n) => {
|
263
|
-
var
|
264
|
-
return (
|
263
|
+
var o;
|
264
|
+
return (o = t.current) === null || o === void 0 ? void 0 : o.call(t, ...n);
|
265
265
|
}, []);
|
266
266
|
}
|
267
267
|
), An = (
|
@@ -291,31 +291,31 @@ const kn = /* @__PURE__ */ Nt(Cn), Pn = (e, t, n, r) => {
|
|
291
291
|
width: e.contentRect.width,
|
292
292
|
height: e.contentRect.height
|
293
293
|
};
|
294
|
-
function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions:
|
295
|
-
const l =
|
294
|
+
function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: o, handleWidth: a = !0, handleHeight: i = !0, targetRef: c, observerOptions: d, onResize: u } = {}) {
|
295
|
+
const l = Et(e), m = Pn(u), [_, T] = R({
|
296
296
|
width: void 0,
|
297
297
|
height: void 0
|
298
|
-
}), { refProxy: y, refElement: f } = An(c), { box:
|
298
|
+
}), { refProxy: y, refElement: f } = An(c), { box: E } = d || {}, b = We((p) => {
|
299
299
|
if (!a && !i)
|
300
300
|
return;
|
301
301
|
if (l.current) {
|
302
302
|
l.current = !1;
|
303
303
|
return;
|
304
304
|
}
|
305
|
-
const v = (C,
|
305
|
+
const v = (C, w) => a && C.width !== w.width || i && C.height !== w.height;
|
306
306
|
p.forEach((C) => {
|
307
|
-
const
|
308
|
-
T((
|
309
|
-
width:
|
310
|
-
height:
|
307
|
+
const w = Rn(C, E);
|
308
|
+
T((V) => v(V, w) ? (m == null || m({
|
309
|
+
width: w.width,
|
310
|
+
height: w.height,
|
311
311
|
entry: C
|
312
|
-
}),
|
312
|
+
}), w) : V);
|
313
313
|
});
|
314
|
-
}, [a, i, l,
|
314
|
+
}, [a, i, l, E]), g = We(In(b, t, n, o), [
|
315
315
|
b,
|
316
316
|
t,
|
317
317
|
n,
|
318
|
-
|
318
|
+
o
|
319
319
|
]);
|
320
320
|
return G(() => {
|
321
321
|
let p;
|
@@ -324,23 +324,23 @@ function Nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
324
324
|
height: null,
|
325
325
|
entry: null
|
326
326
|
}), T({ width: void 0, height: void 0 })), () => {
|
327
|
-
var v, C,
|
328
|
-
(v = p == null ? void 0 : p.disconnect) === null || v === void 0 || v.call(p), (
|
327
|
+
var v, C, w;
|
328
|
+
(v = p == null ? void 0 : p.disconnect) === null || v === void 0 || v.call(p), (w = (C = g).cancel) === null || w === void 0 || w.call(C);
|
329
329
|
};
|
330
330
|
}, [g, f]), Object.assign({ ref: y }, _);
|
331
331
|
}
|
332
332
|
function Lt(e) {
|
333
|
-
var t, n,
|
334
|
-
if (typeof e == "string" || typeof e == "number")
|
333
|
+
var t, n, o = "";
|
334
|
+
if (typeof e == "string" || typeof e == "number") o += e;
|
335
335
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
336
336
|
var a = e.length;
|
337
|
-
for (t = 0; t < a; t++) e[t] && (n = Lt(e[t])) && (
|
338
|
-
} else for (n in e) e[n] && (
|
339
|
-
return
|
337
|
+
for (t = 0; t < a; t++) e[t] && (n = Lt(e[t])) && (o && (o += " "), o += n);
|
338
|
+
} else for (n in e) e[n] && (o && (o += " "), o += n);
|
339
|
+
return o;
|
340
340
|
}
|
341
341
|
function N() {
|
342
|
-
for (var e, t, n = 0,
|
343
|
-
return
|
342
|
+
for (var e, t, n = 0, o = "", a = arguments.length; n < a; n++) (e = arguments[n]) && (t = Lt(e)) && (o && (o += " "), o += t);
|
343
|
+
return o;
|
344
344
|
}
|
345
345
|
const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "_navigationTab_1cubo_8", Ln = "_headerContent_1cubo_34", Mn = "_staticEnabled_1cubo_50", q = {
|
346
346
|
headerContainer: jn,
|
@@ -349,7 +349,7 @@ const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "
|
|
349
349
|
headerContent: Ln,
|
350
350
|
staticEnabled: Mn
|
351
351
|
}, Un = 77, re = ({ sticky: e, children: t }) => {
|
352
|
-
const { ref: n, height:
|
352
|
+
const { ref: n, height: o } = Nn({
|
353
353
|
refreshMode: "debounce",
|
354
354
|
refreshRate: 0
|
355
355
|
}), [a, i] = R(!1), c = () => a ? !e : !0;
|
@@ -359,7 +359,7 @@ const jn = "_headerContainer_1cubo_1", xn = "_navigationTabList_1cubo_8", On = "
|
|
359
359
|
};
|
360
360
|
return window.addEventListener("scroll", u), () => window.removeEventListener("scroll", u);
|
361
361
|
}, []);
|
362
|
-
const d = `${
|
362
|
+
const d = `${o || Un}px`;
|
363
363
|
return /* @__PURE__ */ s("div", { style: { minHeight: d }, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ h(
|
364
364
|
"div",
|
365
365
|
{
|
@@ -381,7 +381,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
381
381
|
sidebarContainer: qn
|
382
382
|
}, Bn = "_logoLink_1baxb_1", Dn = {
|
383
383
|
logoLink: Bn
|
384
|
-
}, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt:
|
384
|
+
}, $n = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: o = "Lokalise" }) => /* @__PURE__ */ s("a", { className: Dn.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ s("img", { src: e, alt: o }) }), Fn = "_link_18vhx_1", zn = "_active_18vhx_18", lt = {
|
385
385
|
link: Fn,
|
386
386
|
active: zn
|
387
387
|
}, Gn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ s(H, { placement: "right", tooltip: e, children: /* @__PURE__ */ s(
|
@@ -411,14 +411,14 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
411
411
|
) }),
|
412
412
|
children: /* @__PURE__ */ s(se, { placement: "right-start", children: e })
|
413
413
|
}
|
414
|
-
), Qn = "_iconContainer_nz34m_1",
|
414
|
+
), Qn = "_iconContainer_nz34m_1", Xn = {
|
415
415
|
iconContainer: Qn
|
416
416
|
}, Mt = ({ className: e = "" }) => /* @__PURE__ */ s(
|
417
417
|
"div",
|
418
418
|
{
|
419
419
|
"aria-label": "Upgrade Icon",
|
420
420
|
className: N(
|
421
|
-
|
421
|
+
Xn.iconContainer,
|
422
422
|
"flex-row",
|
423
423
|
"items-center",
|
424
424
|
"justify-center",
|
@@ -426,18 +426,18 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
426
426
|
),
|
427
427
|
children: /* @__PURE__ */ s(nn, {})
|
428
428
|
}
|
429
|
-
),
|
430
|
-
menuContainer:
|
431
|
-
profileButton:
|
429
|
+
), Yn = "_menuContainer_ywskt_5", Vn = "_profileButton_ywskt_15", Zn = "_profileImage_ywskt_28", er = "_profileImageHighlight_ywskt_36", tr = "_profileImageUpgradeIcon_ywskt_40", nr = "_userIconWrapper_ywskt_46", x = {
|
430
|
+
menuContainer: Yn,
|
431
|
+
profileButton: Vn,
|
432
432
|
profileImage: Zn,
|
433
433
|
profileImageHighlight: er,
|
434
434
|
profileImageUpgradeIcon: tr,
|
435
435
|
userIconWrapper: nr
|
436
|
-
}, Ut = Ct({}),
|
436
|
+
}, Ut = Ct({}), X = () => wt(Ut), rr = ({ children: e }) => {
|
437
437
|
const {
|
438
438
|
currentTeam: t,
|
439
439
|
otherTeams: n,
|
440
|
-
showUpgradeCta:
|
440
|
+
showUpgradeCta: o,
|
441
441
|
showBillingButton: a,
|
442
442
|
allowTeamCreation: i,
|
443
443
|
isProviderAlpha: c,
|
@@ -445,7 +445,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
445
445
|
isEndOfTrialActive: u,
|
446
446
|
isTeamSuspended: l,
|
447
447
|
isFullyAuthenticated: m
|
448
|
-
} =
|
448
|
+
} = X();
|
449
449
|
return /* @__PURE__ */ s(
|
450
450
|
ae,
|
451
451
|
{
|
@@ -455,7 +455,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
455
455
|
{
|
456
456
|
src: t.logoUrl,
|
457
457
|
className: N(x.profileImage, {
|
458
|
-
[x.profileImageHighlight]:
|
458
|
+
[x.profileImageHighlight]: o
|
459
459
|
}),
|
460
460
|
alt: "Team Logo"
|
461
461
|
}
|
@@ -463,12 +463,12 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
463
463
|
"div",
|
464
464
|
{
|
465
465
|
className: N(x.userIconWrapper, "flex-row", "align-center", "items-center", {
|
466
|
-
[x.profileImageHighlight]:
|
466
|
+
[x.profileImageHighlight]: o
|
467
467
|
}),
|
468
|
-
children: /* @__PURE__ */ s(
|
468
|
+
children: /* @__PURE__ */ s(It, { size: "25px" })
|
469
469
|
}
|
470
470
|
),
|
471
|
-
|
471
|
+
o && /* @__PURE__ */ s(Mt, { className: x.profileImageUpgradeIcon })
|
472
472
|
] }),
|
473
473
|
children: /* @__PURE__ */ s(se, { placement: "right-end", className: x.menuContainer, children: e({
|
474
474
|
allowTeamCreation: i,
|
@@ -482,18 +482,18 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
482
482
|
}) })
|
483
483
|
}
|
484
484
|
);
|
485
|
-
}, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or,
|
486
|
-
const
|
487
|
-
if (
|
485
|
+
}, qt = 0, or = 9999, ar = [150, 151, 250, 251], sr = [152, 153, 252, 253], ir = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], cr = [156, 159, 160, 256, 259, 260], Ht = 9998, Be = (e) => e === qt, Bt = (e) => e === or, Ra = (e) => ar.includes(e), Na = (e) => sr.includes(e), ja = (e) => ir.includes(e), xa = (e) => cr.includes(e), Oa = (e) => e > qt && e < Ht, La = (e) => e === Ht, lr = /\n/, ut = (e, t, n) => e.split(t).flatMap((o, a) => a !== 0 ? [en(n, { key: Math.random().toString(32).slice(0, 10) }), o] : o), dr = (e, t, n) => typeof e == "string" ? ut(e, t, n) : e.flatMap((o) => typeof o == "string" ? ut(o, t, n) : o), ur = (e) => dr(e, lr, /* @__PURE__ */ s("br", {})), mr = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, fr = (e) => e.match(mr) ?? [], mt = (e, t, n) => {
|
486
|
+
const o = e.split(t);
|
487
|
+
if (o.length === 1)
|
488
488
|
return e;
|
489
489
|
const a = [];
|
490
|
-
return
|
490
|
+
return o[0] !== "" && a.push(o[0]), o.shift(), o[o.length - 1] === "" && o.pop(), a.push(
|
491
491
|
/* @__PURE__ */ s("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
492
|
-
), a.push(
|
492
|
+
), a.push(o.join(t)), a.filter((i) => i !== "");
|
493
493
|
}, ft = (e) => {
|
494
494
|
const t = fr(e);
|
495
|
-
return t != null && t.length ? t.reduce((n,
|
496
|
-
}, _r = (e) => typeof e == "string" ? ft(e) : e.flatMap((t) => typeof t == "string" ? ft(t) : t, e), gr = (e, t = "PP") => At(e, t),
|
495
|
+
return t != null && t.length ? t.reduce((n, o, a) => typeof n == "string" ? mt(n, o, a) : n.flatMap((i) => typeof i == "string" ? mt(i, o, a) : i), e) : e;
|
496
|
+
}, _r = (e) => typeof e == "string" ? ft(e) : e.flatMap((t) => typeof t == "string" ? ft(t) : t, e), gr = (e, t = "PP") => At(e, t), Ma = (e, t, n = "PP") => At(un(e, t), n), De = (e) => {
|
497
497
|
G(e, []);
|
498
498
|
}, _t = {
|
499
499
|
biller: "biller",
|
@@ -502,7 +502,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
502
502
|
_t.biller,
|
503
503
|
_t.owner
|
504
504
|
], hr = ({ children: e, config: t }) => {
|
505
|
-
const { teams: n, currentTeamId:
|
505
|
+
const { teams: n, currentTeamId: o, planId: a, isEndOfTrialActive: i, isFullyAuthenticated: c, userTeamRole: d } = t, u = n.find((g) => g.id === o), l = n.filter((g) => g.id !== o), m = gt.includes(d), _ = gt.includes(d), T = Be(a) || Bt(a), b = {
|
506
506
|
...t,
|
507
507
|
currentTeam: u,
|
508
508
|
otherTeams: l,
|
@@ -521,9 +521,9 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
521
521
|
href: e,
|
522
522
|
onClick: t,
|
523
523
|
userEmail: n,
|
524
|
-
hideBottomDivider:
|
524
|
+
hideBottomDivider: o
|
525
525
|
}) => {
|
526
|
-
const { isEndOfTrialActive: a, isTeamSuspended: i } =
|
526
|
+
const { isEndOfTrialActive: a, isTeamSuspended: i } = X();
|
527
527
|
return a || i ? null : /* @__PURE__ */ h(Ue, { children: [
|
528
528
|
/* @__PURE__ */ s(
|
529
529
|
K,
|
@@ -538,17 +538,17 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
538
538
|
] })
|
539
539
|
}
|
540
540
|
),
|
541
|
-
!
|
541
|
+
!o && /* @__PURE__ */ s(Pt, {})
|
542
542
|
] });
|
543
|
-
}, yr = "_wrapper_15d85_1", Sr = "_profileImage_15d85_14",
|
543
|
+
}, yr = "_wrapper_15d85_1", Sr = "_profileImage_15d85_14", Er = "_teamName_15d85_22", wr = "_planLabel_15d85_29", Cr = "_membership_15d85_38", kr = "_defaultProfileImage_15d85_44", M = {
|
544
544
|
wrapper: yr,
|
545
545
|
profileImage: Sr,
|
546
|
-
teamName:
|
547
|
-
planLabel:
|
546
|
+
teamName: Er,
|
547
|
+
planLabel: wr,
|
548
548
|
membership: Cr,
|
549
549
|
defaultProfileImage: kr
|
550
550
|
}, Dt = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
551
|
-
const { currentTeam:
|
551
|
+
const { currentTeam: o, planId: a } = X(), i = e || o;
|
552
552
|
if (!i)
|
553
553
|
return null;
|
554
554
|
const c = Be(a) ? "Free" : Bt(a) ? "Trial" : void 0;
|
@@ -558,7 +558,7 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
558
558
|
className: `flex-row gap-2 flex-nowrap items-center ${M.wrapper}`,
|
559
559
|
...t && { onClick: () => t(i) },
|
560
560
|
children: [
|
561
|
-
i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(
|
561
|
+
i.logoUrl ? /* @__PURE__ */ s("img", { className: M.profileImage, src: i.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ s("span", { className: `flex-row justify-center items-center ${M.defaultProfileImage}`, children: /* @__PURE__ */ s(It, { size: "25px" }) }),
|
562
562
|
/* @__PURE__ */ h("div", { className: "flex-col items-start", children: [
|
563
563
|
/* @__PURE__ */ h("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
564
564
|
/* @__PURE__ */ s("span", { title: i.name, className: M.teamName, children: i.name }),
|
@@ -569,23 +569,23 @@ const qn = "_sidebarContainer_bmdti_1", Hn = {
|
|
569
569
|
]
|
570
570
|
}
|
571
571
|
);
|
572
|
-
},
|
573
|
-
teamsContainer:
|
572
|
+
}, Ir = "_teamsContainer_1t68g_1", Pr = {
|
573
|
+
teamsContainer: Ir
|
574
574
|
}, Ar = ({ onSwitchTeam: e }) => {
|
575
|
-
const { otherTeams: t } =
|
576
|
-
return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${
|
577
|
-
}, Rr = "_container_1u995_1", Nr = "_planCta_1u995_15", jr = "_upgradeIconWrapper_1u995_19",
|
575
|
+
const { otherTeams: t } = X();
|
576
|
+
return t.length === 0 ? null : /* @__PURE__ */ s("div", { className: `flex-col items-stretch ${Pr.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ s(Dt, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
|
577
|
+
}, Rr = "_container_1u995_1", Nr = "_planCta_1u995_15", jr = "_upgradeIconWrapper_1u995_19", Pe = {
|
578
578
|
container: Rr,
|
579
579
|
planCta: Nr,
|
580
580
|
upgradeIconWrapper: jr
|
581
581
|
}, xr = ({ upgradeOptionHref: e }) => {
|
582
|
-
const { planId: t, trialDaysLeft: n, showUpgradeCta:
|
583
|
-
if (!
|
582
|
+
const { planId: t, trialDaysLeft: n, showUpgradeCta: o } = X();
|
583
|
+
if (!o)
|
584
584
|
return null;
|
585
585
|
const c = Be(t) ? "Your team is currently on the Free plan" : `Free trial ends in ${n} ${n === 1 ? "day" : "days"}`;
|
586
|
-
return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${
|
587
|
-
/* @__PURE__ */ s("span", { className:
|
588
|
-
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${
|
586
|
+
return /* @__PURE__ */ h(K, { href: e, className: `flex-col gap-1 items-start ${Pe.container}`, children: [
|
587
|
+
/* @__PURE__ */ s("span", { className: Pe.planCta, children: c }),
|
588
|
+
/* @__PURE__ */ h("div", { className: `flex-row items-center gap-1 ${Pe.upgradeIconWrapper}`, children: [
|
589
589
|
/* @__PURE__ */ s(Mt, {}),
|
590
590
|
/* @__PURE__ */ s("span", { children: "See upgrade options" })
|
591
591
|
] })
|
@@ -627,15 +627,15 @@ function bt(e) {
|
|
627
627
|
const {
|
628
628
|
x: t,
|
629
629
|
y: n,
|
630
|
-
width:
|
630
|
+
width: o,
|
631
631
|
height: a
|
632
632
|
} = e;
|
633
633
|
return {
|
634
|
-
width:
|
634
|
+
width: o,
|
635
635
|
height: a,
|
636
636
|
top: n,
|
637
637
|
left: t,
|
638
|
-
right: t +
|
638
|
+
right: t + o,
|
639
639
|
bottom: n + a,
|
640
640
|
x: t,
|
641
641
|
y: n
|
@@ -645,7 +645,7 @@ async function Br(e, t) {
|
|
645
645
|
var n;
|
646
646
|
t === void 0 && (t = {});
|
647
647
|
const {
|
648
|
-
x:
|
648
|
+
x: o,
|
649
649
|
y: a,
|
650
650
|
platform: i,
|
651
651
|
rects: c,
|
@@ -663,7 +663,7 @@ async function Br(e, t) {
|
|
663
663
|
rootBoundary: m,
|
664
664
|
strategy: u
|
665
665
|
})), p = _ === "floating" ? {
|
666
|
-
x:
|
666
|
+
x: o,
|
667
667
|
y: a,
|
668
668
|
width: c.floating.width,
|
669
669
|
height: c.floating.height
|
@@ -673,17 +673,17 @@ async function Br(e, t) {
|
|
673
673
|
} : {
|
674
674
|
x: 1,
|
675
675
|
y: 1
|
676
|
-
},
|
676
|
+
}, w = bt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
677
677
|
elements: d,
|
678
678
|
rect: p,
|
679
679
|
offsetParent: v,
|
680
680
|
strategy: u
|
681
681
|
}) : p);
|
682
682
|
return {
|
683
|
-
top: (g.top -
|
684
|
-
bottom: (
|
685
|
-
left: (g.left -
|
686
|
-
right: (
|
683
|
+
top: (g.top - w.top + f.top) / C.y,
|
684
|
+
bottom: (w.bottom - g.bottom + f.bottom) / C.y,
|
685
|
+
left: (g.left - w.left + f.left) / C.x,
|
686
|
+
right: (w.right - g.right + f.right) / C.x
|
687
687
|
};
|
688
688
|
}
|
689
689
|
const Dr = function(e) {
|
@@ -693,7 +693,7 @@ const Dr = function(e) {
|
|
693
693
|
async fn(t) {
|
694
694
|
const {
|
695
695
|
x: n,
|
696
|
-
y:
|
696
|
+
y: o,
|
697
697
|
placement: a
|
698
698
|
} = t, {
|
699
699
|
mainAxis: i = !0,
|
@@ -713,7 +713,7 @@ const Dr = function(e) {
|
|
713
713
|
...u
|
714
714
|
} = $t(e, t), l = {
|
715
715
|
x: n,
|
716
|
-
y:
|
716
|
+
y: o
|
717
717
|
}, m = await Br(t, u), _ = Ur(Ft(a)), T = Mr(_);
|
718
718
|
let y = l[T], f = l[_];
|
719
719
|
if (i) {
|
@@ -724,16 +724,16 @@ const Dr = function(e) {
|
|
724
724
|
const b = _ === "y" ? "top" : "left", g = _ === "y" ? "bottom" : "right", p = f + m[b], v = f - m[g];
|
725
725
|
f = pt(p, f, v);
|
726
726
|
}
|
727
|
-
const
|
727
|
+
const E = d.fn({
|
728
728
|
...t,
|
729
729
|
[T]: y,
|
730
730
|
[_]: f
|
731
731
|
});
|
732
732
|
return {
|
733
|
-
...
|
733
|
+
...E,
|
734
734
|
data: {
|
735
|
-
x:
|
736
|
-
y:
|
735
|
+
x: E.x - n,
|
736
|
+
y: E.y - o,
|
737
737
|
enabled: {
|
738
738
|
[T]: i,
|
739
739
|
[_]: c
|
@@ -746,27 +746,27 @@ const Dr = function(e) {
|
|
746
746
|
navItem: $r,
|
747
747
|
activeNavItem: Fr,
|
748
748
|
badge: zr
|
749
|
-
}, zt = Ct({}),
|
750
|
-
const t = e.lastIndexOf("."), n = e.slice(0, t),
|
751
|
-
return { name: n, extension:
|
749
|
+
}, zt = Ct({}), Y = () => wt(zt), Gr = (e) => {
|
750
|
+
const t = e.lastIndexOf("."), n = e.slice(0, t), o = e.slice(t + 1);
|
751
|
+
return { name: n, extension: o };
|
752
752
|
}, Kr = (e, t) => {
|
753
753
|
switch (e) {
|
754
|
-
case
|
754
|
+
case I.Completed:
|
755
755
|
return t < 100 ? "Closed" : "Completed";
|
756
|
-
case
|
756
|
+
case I.Created:
|
757
757
|
return t > 0 ? "In progress" : "Not started";
|
758
|
-
case
|
758
|
+
case I.InProgress:
|
759
759
|
return "In progress";
|
760
|
-
case
|
760
|
+
case I.Queued:
|
761
761
|
return "Queued";
|
762
|
-
case
|
762
|
+
case I.NotStarted:
|
763
763
|
return "Not started";
|
764
764
|
default:
|
765
765
|
return "-";
|
766
766
|
}
|
767
767
|
}, Wr = (e) => {
|
768
768
|
const t = e.progress ?? 0;
|
769
|
-
return e.status ===
|
769
|
+
return e.status === I.Created && t > 0 ? I.InProgress : e.status;
|
770
770
|
}, Jr = {
|
771
771
|
[te.translation]: "#0891B2",
|
772
772
|
[te.review]: "#16922D",
|
@@ -774,13 +774,13 @@ const Dr = function(e) {
|
|
774
774
|
[te.automatic_translation]: "#60A5FA"
|
775
775
|
}, Qr = (e) => {
|
776
776
|
const t = [
|
777
|
-
|
778
|
-
|
779
|
-
|
777
|
+
I.InProgress,
|
778
|
+
I.Created,
|
779
|
+
I.Completed
|
780
780
|
];
|
781
|
-
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n,
|
782
|
-
}, vt = (e) => e in [xe.InProgress, xe.Created],
|
783
|
-
const [n,
|
781
|
+
return e.filter((n) => n.status !== "queued").map((n) => ({ ...n, status: Wr(n) })).sort((n, o) => n.status === I.InProgress && n.progress === 100 ? -1 : o.status === I.InProgress && o.progress === 100 ? 1 : n.status === o.status ? n.name < o.name ? 1 : -1 : t.indexOf(n.status) - t.indexOf(o.status));
|
782
|
+
}, vt = (e) => e in [xe.InProgress, xe.Created], Xr = (e, t) => vt(e.status) && vt(t.status) && (t.progress ?? 0) >= 100, Yr = ({ task: e, language: t }) => {
|
783
|
+
const [n, o] = R(!1), [a, i] = R(!1), { onLanguageCompleteConfirm: c, fetchTasks: d } = Y(), u = () => {
|
784
784
|
i(!1);
|
785
785
|
};
|
786
786
|
return /* @__PURE__ */ h(Ue, { children: [
|
@@ -794,7 +794,7 @@ const Dr = function(e) {
|
|
794
794
|
closeText: "Cancel",
|
795
795
|
onClose: u,
|
796
796
|
onConfirm: async () => {
|
797
|
-
|
797
|
+
o(!0), await c({ task: e, language: t, closePrompt: u }), d();
|
798
798
|
},
|
799
799
|
children: /* @__PURE__ */ h(on, { status: "info", children: [
|
800
800
|
"Make sure you are finished and ",
|
@@ -814,12 +814,12 @@ const Dr = function(e) {
|
|
814
814
|
}
|
815
815
|
)
|
816
816
|
] });
|
817
|
-
},
|
818
|
-
langRowCompleted:
|
817
|
+
}, Vr = "_langRowCompleted_vpgdi_1", Zr = "_langCellSecondary_vpgdi_15", eo = "_langStatus_vpgdi_20", Re = {
|
818
|
+
langRowCompleted: Vr,
|
819
819
|
langCellSecondary: Zr,
|
820
820
|
langStatus: eo
|
821
821
|
}, to = ({ language: e, task: t }) => {
|
822
|
-
const { getProjectUrl: n, langNameOnClick:
|
822
|
+
const { getProjectUrl: n, langNameOnClick: o, langProgressOnClick: a } = Y(), i = e.progress ?? 0, c = e.status === I.Completed, d = Xr(t, e);
|
823
823
|
return /* @__PURE__ */ h(
|
824
824
|
"tr",
|
825
825
|
{
|
@@ -832,7 +832,7 @@ const Dr = function(e) {
|
|
832
832
|
{
|
833
833
|
href: n({ task: t, language: e }),
|
834
834
|
onClick: () => {
|
835
|
-
|
835
|
+
o == null || o({ task: t, language: e });
|
836
836
|
},
|
837
837
|
children: e.name
|
838
838
|
}
|
@@ -851,7 +851,7 @@ const Dr = function(e) {
|
|
851
851
|
i,
|
852
852
|
"%"
|
853
853
|
] }),
|
854
|
-
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(
|
854
|
+
/* @__PURE__ */ s("td", { children: d ? /* @__PURE__ */ s(Yr, { task: t, language: e }) : /* @__PURE__ */ s(
|
855
855
|
"span",
|
856
856
|
{
|
857
857
|
className: `${Re.langStatus} flex-row items-center justify-start`,
|
@@ -869,7 +869,7 @@ const Dr = function(e) {
|
|
869
869
|
languagesTable: ao,
|
870
870
|
metadata: so
|
871
871
|
}, io = ({ task: e }) => {
|
872
|
-
const { tasks: t, getProjectUrl: n, taskTitleOnClick:
|
872
|
+
const { tasks: t, getProjectUrl: n, taskTitleOnClick: o } = Y(), a = Qr(e.langs), i = (c) => {
|
873
873
|
c !== void 0 && window.open(
|
874
874
|
`/style-guide/${e.team_id}/download/${c.id}/link`,
|
875
875
|
"_blank",
|
@@ -913,7 +913,7 @@ const Dr = function(e) {
|
|
913
913
|
{
|
914
914
|
href: n({ task: e, view: "multi" }),
|
915
915
|
onClick: () => {
|
916
|
-
|
916
|
+
o == null || o({ task: e });
|
917
917
|
},
|
918
918
|
children: e.title
|
919
919
|
}
|
@@ -953,9 +953,9 @@ const Dr = function(e) {
|
|
953
953
|
noTasksText: mo,
|
954
954
|
tasksContainer: fo
|
955
955
|
}, _o = () => {
|
956
|
-
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks:
|
957
|
-
return De(() => (
|
958
|
-
document.removeEventListener(k.TaskCompleted,
|
956
|
+
const { tasks: e, onTasksWidgetOpen: t, loadingTasks: n, fetchTasks: o } = Y();
|
957
|
+
return De(() => (o(), t == null || t({ tasks: e }), document.addEventListener(k.TaskCompleted, o), document.addEventListener(k.TaskClosed, o), document.addEventListener(k.Refresh, o), () => {
|
958
|
+
document.removeEventListener(k.TaskCompleted, o), document.removeEventListener(k.TaskClosed, o), document.removeEventListener(k.Refresh, o);
|
959
959
|
})), n ? /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-loading-popover", className: $.loadingContainer, children: /* @__PURE__ */ s(an, {}) }) : e.length === 0 ? /* @__PURE__ */ h("div", { "data-testid": "sidebar-no-tasks-popover", className: $.noTasksContainer, children: [
|
960
960
|
/* @__PURE__ */ s("h3", { className: $.noTasksHeading, children: "No tasks" }),
|
961
961
|
/* @__PURE__ */ h("div", { className: $.noTasksText, children: [
|
@@ -965,19 +965,19 @@ const Dr = function(e) {
|
|
965
965
|
] })
|
966
966
|
] }) : /* @__PURE__ */ s("div", { "data-testid": "sidebar-tasks-popover", className: $.tasksContainer, children: e.map((a) => /* @__PURE__ */ s(io, { task: a }, a.id)) });
|
967
967
|
}, go = ({ children: e, config: t }) => {
|
968
|
-
const [n,
|
968
|
+
const [n, o] = R([]), [a, i] = R(!0), [c, d] = R(0), {
|
969
969
|
getProjectUrl: u,
|
970
970
|
onLanguageCompleteConfirm: l,
|
971
971
|
onTasksWidgetOpen: m,
|
972
972
|
langNameOnClick: _,
|
973
973
|
langProgressOnClick: T,
|
974
974
|
taskTitleOnClick: y
|
975
|
-
} = t, { getTasks: f, getTasksCount:
|
975
|
+
} = t, { getTasks: f, getTasksCount: E } = t, b = async () => {
|
976
976
|
i(!0);
|
977
977
|
const v = await f();
|
978
|
-
|
978
|
+
o(v), i(!1);
|
979
979
|
}, g = async () => {
|
980
|
-
const v = await
|
980
|
+
const v = await E();
|
981
981
|
d(v);
|
982
982
|
};
|
983
983
|
De(() => (g(), document.addEventListener(k.TaskCompleted, g), document.addEventListener(k.TaskClosed, g), document.addEventListener(k.Refresh, g), () => {
|
@@ -997,16 +997,16 @@ const Dr = function(e) {
|
|
997
997
|
};
|
998
998
|
return /* @__PURE__ */ s(zt.Provider, { value: p, children: e });
|
999
999
|
}, ho = (e) => function(n) {
|
1000
|
-
const { config:
|
1001
|
-
return /* @__PURE__ */ s(go, { config:
|
1000
|
+
const { config: o, ...a } = n;
|
1001
|
+
return /* @__PURE__ */ s(go, { config: o, children: /* @__PURE__ */ s(e, { ...a }) });
|
1002
1002
|
}, po = ho(() => {
|
1003
|
-
const [e, t] = R(!1), { tasksCount: n } =
|
1003
|
+
const [e, t] = R(!1), { tasksCount: n } = Y();
|
1004
1004
|
return De(() => {
|
1005
|
-
const
|
1005
|
+
const o = () => {
|
1006
1006
|
t(!0);
|
1007
1007
|
};
|
1008
|
-
return document.addEventListener(k.ShowDialog,
|
1009
|
-
document.removeEventListener(k.ShowDialog,
|
1008
|
+
return document.addEventListener(k.ShowDialog, o), () => {
|
1009
|
+
document.removeEventListener(k.ShowDialog, o);
|
1010
1010
|
};
|
1011
1011
|
}), /* @__PURE__ */ s(H, { tooltip: "Tasks", placement: "right", children: /* @__PURE__ */ s(
|
1012
1012
|
sn,
|
@@ -1025,14 +1025,14 @@ const Dr = function(e) {
|
|
1025
1025
|
}
|
1026
1026
|
})
|
1027
1027
|
],
|
1028
|
-
children: (
|
1028
|
+
children: (o) => /* @__PURE__ */ h(
|
1029
1029
|
je,
|
1030
1030
|
{
|
1031
1031
|
type: "button",
|
1032
1032
|
"data-testid": "sidebar-tasks-widget-button",
|
1033
1033
|
"aria-label": "Tasks",
|
1034
1034
|
className: N(Ae.navItem, {
|
1035
|
-
[Ae.activeNavItem]:
|
1035
|
+
[Ae.activeNavItem]: o
|
1036
1036
|
}),
|
1037
1037
|
children: [
|
1038
1038
|
/* @__PURE__ */ s(cn, { size: "25px" }),
|
@@ -1042,35 +1042,35 @@ const Dr = function(e) {
|
|
1042
1042
|
)
|
1043
1043
|
}
|
1044
1044
|
) });
|
1045
|
-
}),
|
1046
|
-
|
1045
|
+
}), P = ({ children: e, ...t }) => /* @__PURE__ */ s("nav", { ...t, className: Hn.sidebarContainer, children: e }), bo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1046
|
+
P.Top = bo;
|
1047
1047
|
const vo = ({ children: e }) => /* @__PURE__ */ s("div", { children: e });
|
1048
|
-
|
1049
|
-
|
1050
|
-
|
1051
|
-
|
1052
|
-
|
1053
|
-
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1048
|
+
P.Bottom = vo;
|
1049
|
+
P.Avatar = $n;
|
1050
|
+
P.IconLink = Gn;
|
1051
|
+
P.Menu = Jn;
|
1052
|
+
P.ProfileMenu = pr;
|
1053
|
+
P.TeamSwitch = Ar;
|
1054
|
+
P.TeamMenuItem = Dt;
|
1055
|
+
P.UpgradeMenuItem = xr;
|
1056
|
+
P.ProfileSettingsMenuItem = Tr;
|
1057
|
+
P.Tasks = po;
|
1058
1058
|
const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
|
1059
1059
|
breadcrumbsItem: To,
|
1060
1060
|
breadcrumbs: yo
|
1061
|
-
},
|
1061
|
+
}, Ua = ({ items: e }) => /* @__PURE__ */ s("nav", { "aria-label": "breadcrumb", className: Tt.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1062
1062
|
/* @__PURE__ */ s(L, { className: Tt.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
1063
1063
|
n < e.length - 1 && /* @__PURE__ */ s("span", { children: " — " })
|
1064
1064
|
] }, `${t.link}-${t.name}`)) }), So = ({ items: e }) => /* @__PURE__ */ s(Ue, { children: e.map((t, n) => /* @__PURE__ */ h(kt, { children: [
|
1065
|
-
!!n && t.some((
|
1066
|
-
t.filter(({ visible:
|
1067
|
-
] }, t[0].label)) }),
|
1068
|
-
badge:
|
1069
|
-
tag:
|
1065
|
+
!!n && t.some((o) => o.visible) && /* @__PURE__ */ s(Pt, {}),
|
1066
|
+
t.filter(({ visible: o }) => o).map(({ link: o, label: a, onClick: i }) => /* @__PURE__ */ s(K, { href: o || "#", "aria-label": a, onClick: i, children: a }, a))
|
1067
|
+
] }, t[0].label)) }), Eo = "_badge_1pc1v_1", wo = "_tag_1pc1v_15", Co = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", ko = "_disabled_1pc1v_57", Io = "_projectNavigationItem_1pc1v_61", Po = "_projectNavigationItemDisabled_1pc1v_67", O = {
|
1068
|
+
badge: Eo,
|
1069
|
+
tag: wo,
|
1070
1070
|
withNavLinkStyle: Co,
|
1071
1071
|
disabled: ko,
|
1072
|
-
projectNavigationItem:
|
1073
|
-
projectNavigationItemDisabled:
|
1072
|
+
projectNavigationItem: Io,
|
1073
|
+
projectNavigationItemDisabled: Po
|
1074
1074
|
}, yt = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ h("div", { className: "flex gap-1", children: [
|
1075
1075
|
/* @__PURE__ */ h("div", { children: [
|
1076
1076
|
/* @__PURE__ */ s("span", { children: e }),
|
@@ -1078,7 +1078,7 @@ const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
|
|
1078
1078
|
] }),
|
1079
1079
|
!!n && /* @__PURE__ */ s(Ne, { className: O.tag, children: n })
|
1080
1080
|
] }), Oe = tn(
|
1081
|
-
({ label: e, href: t = "", disabled: n = !1, badge:
|
1081
|
+
({ label: e, href: t = "", disabled: n = !1, badge: o, onClick: a, novel: i }, c) => /* @__PURE__ */ s(H, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ s(
|
1082
1082
|
"div",
|
1083
1083
|
{
|
1084
1084
|
className: n ? O.projectNavigationItemDisabled : O.projectNavigationItem,
|
@@ -1092,21 +1092,21 @@ const To = "_breadcrumbsItem_1hm6a_1", yo = "_breadcrumbs_1hm6a_1", Tt = {
|
|
1092
1092
|
}),
|
1093
1093
|
disabled: n,
|
1094
1094
|
onClick: a,
|
1095
|
-
children: /* @__PURE__ */ s(yt, { label: e, badge:
|
1095
|
+
children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i })
|
1096
1096
|
}
|
1097
|
-
) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(yt, { label: e, badge:
|
1097
|
+
) : /* @__PURE__ */ s("a", { href: t, className: O.withNavLinkStyle, children: /* @__PURE__ */ s(yt, { label: e, badge: o, novel: i }) })
|
1098
1098
|
}
|
1099
1099
|
) })
|
1100
1100
|
);
|
1101
1101
|
Oe.displayName = "NavigationTabsItem";
|
1102
|
-
const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Ro = (e) => e.visible && (!e.dropdown || Ao(e.dropdown)),
|
1103
|
-
var
|
1102
|
+
const Ao = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, Ro = (e) => e.visible && (!e.dropdown || Ao(e.dropdown)), qa = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ s("nav", { "aria-label": "Project", children: /* @__PURE__ */ s("ul", { className: q.navigationTabList, "aria-orientation": "horizontal", children: e.filter(Ro).map((n) => {
|
1103
|
+
var o, a, i;
|
1104
1104
|
return n.dropdown ? /* @__PURE__ */ s(
|
1105
1105
|
"li",
|
1106
1106
|
{
|
1107
1107
|
className: q.navigationTab,
|
1108
1108
|
"data-testid": n.key,
|
1109
|
-
"aria-selected": (
|
1109
|
+
"aria-selected": (o = n.isActive) == null ? void 0 : o.call(n, t),
|
1110
1110
|
children: /* @__PURE__ */ s(
|
1111
1111
|
ae,
|
1112
1112
|
{
|
@@ -1274,7 +1274,7 @@ class A {
|
|
1274
1274
|
* console.log(headers) // { 'Content-Type': 'application/json' }
|
1275
1275
|
*/
|
1276
1276
|
async resolve() {
|
1277
|
-
const t = this.factories.map((
|
1277
|
+
const t = this.factories.map((o) => o()), n = await Promise.all(t);
|
1278
1278
|
return Object.assign({}, ...n);
|
1279
1279
|
}
|
1280
1280
|
}
|
@@ -1288,28 +1288,28 @@ class No {
|
|
1288
1288
|
apply(t) {
|
1289
1289
|
return t.from(async () => {
|
1290
1290
|
const n = this.middleware(A.create());
|
1291
|
-
return n instanceof Promise ? n.then((
|
1291
|
+
return n instanceof Promise ? n.then((o) => o.resolve()) : n.resolve();
|
1292
1292
|
});
|
1293
1293
|
}
|
1294
1294
|
}
|
1295
|
-
const Kt =
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
]), jo =
|
1301
|
-
userId:
|
1302
|
-
userUuid:
|
1303
|
-
teamId:
|
1295
|
+
const Kt = r.union([
|
1296
|
+
r.literal("owner"),
|
1297
|
+
r.literal("admin"),
|
1298
|
+
r.literal("biller"),
|
1299
|
+
r.literal("member")
|
1300
|
+
]), jo = r.object({
|
1301
|
+
userId: r.number(),
|
1302
|
+
userUuid: r.string(),
|
1303
|
+
teamId: r.number(),
|
1304
1304
|
userTeamRole: Kt,
|
1305
|
-
userEmail:
|
1306
|
-
userName:
|
1307
|
-
userCurrentTeamId:
|
1308
|
-
planId:
|
1309
|
-
planName:
|
1310
|
-
isProviderAlpha:
|
1311
|
-
isFullyAuthenticated:
|
1312
|
-
exp:
|
1305
|
+
userEmail: r.string().email(),
|
1306
|
+
userName: r.string(),
|
1307
|
+
userCurrentTeamId: r.number(),
|
1308
|
+
planId: r.number(),
|
1309
|
+
planName: r.string(),
|
1310
|
+
isProviderAlpha: r.boolean(),
|
1311
|
+
isFullyAuthenticated: r.boolean(),
|
1312
|
+
exp: r.number()
|
1313
1313
|
});
|
1314
1314
|
function ie(e) {
|
1315
1315
|
try {
|
@@ -1326,14 +1326,14 @@ class Le extends Error {
|
|
1326
1326
|
ee(this, "status", 401);
|
1327
1327
|
}
|
1328
1328
|
}
|
1329
|
-
function
|
1329
|
+
function Ha(e) {
|
1330
1330
|
return Gt(async (t) => {
|
1331
1331
|
var i, c;
|
1332
1332
|
const n = e.getCurrentToken() ?? await ((i = e.generateNewToken) == null ? void 0 : i.call(e));
|
1333
1333
|
if (!n)
|
1334
1334
|
throw new Le();
|
1335
|
-
const { exp:
|
1336
|
-
if (!dn(new Date(
|
1335
|
+
const { exp: o } = ie(n.accessToken) ?? { exp: 0 };
|
1336
|
+
if (!dn(new Date(o)))
|
1337
1337
|
return t.add("Authorization", `Bearer ${n.accessToken}`);
|
1338
1338
|
const a = await e.refreshToken(n);
|
1339
1339
|
if (!a)
|
@@ -1341,7 +1341,7 @@ function qa(e) {
|
|
1341
1341
|
return (c = e.onNewTokenIssued) == null || c.call(e, a), t.add("Authorization", `Bearer ${a.accessToken}`);
|
1342
1342
|
});
|
1343
1343
|
}
|
1344
|
-
const
|
1344
|
+
const Ba = Gt(
|
1345
1345
|
(e) => e.and({ "x-lokalise-plugin": "true" })
|
1346
1346
|
);
|
1347
1347
|
function Wt() {
|
@@ -1352,10 +1352,10 @@ function xo() {
|
|
1352
1352
|
return Me(document.cookie, "csrf_token") ?? null;
|
1353
1353
|
}
|
1354
1354
|
function Me(e, t) {
|
1355
|
-
var n,
|
1356
|
-
return (
|
1355
|
+
var n, o;
|
1356
|
+
return (o = (n = e.split(";").find((a) => a.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : o.substring(t.length + 1);
|
1357
1357
|
}
|
1358
|
-
function
|
1358
|
+
function Da() {
|
1359
1359
|
const e = Wt();
|
1360
1360
|
if (!e)
|
1361
1361
|
return;
|
@@ -1363,53 +1363,65 @@ function Ba() {
|
|
1363
1363
|
if (t)
|
1364
1364
|
return { ...e, payload: t };
|
1365
1365
|
}
|
1366
|
-
const Jt =
|
1367
|
-
Authorization:
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1366
|
+
const Jt = r.union([
|
1367
|
+
r.object({ Authorization: r.string() }),
|
1368
|
+
r.object({ authorization: r.string() }),
|
1369
|
+
r.object({ AUTHORIZATION: r.string() })
|
1370
|
+
]), Oo = r.union([
|
1371
|
+
r.object({ "X-API-Token": r.string() }),
|
1372
|
+
r.object({ "X-Api-Token": r.string() }),
|
1373
|
+
r.object({ "x-api-token": r.string() }),
|
1374
|
+
r.object({ "X-API-TOKEN": r.string() })
|
1375
|
+
]), Lo = r.union([
|
1371
1376
|
Jt,
|
1372
1377
|
Oo
|
1373
|
-
]), Mo =
|
1374
|
-
"X-Lokalise-Plugin":
|
1375
|
-
|
1376
|
-
|
1377
|
-
|
1378
|
-
|
1378
|
+
]), Mo = r.union([
|
1379
|
+
r.object({ "X-Lokalise-Plugin": r.string() }),
|
1380
|
+
r.object({ "x-lokalise-plugin": r.string() }),
|
1381
|
+
r.object({ "X-LOKALISE-PLUGIN": r.string() })
|
1382
|
+
]), ce = Lo.and(Mo), Uo = r.object({
|
1383
|
+
accessToken: r.string(),
|
1384
|
+
refreshToken: r.string()
|
1385
|
+
}), qo = r.union([
|
1386
|
+
r.object({ "X-Csrf-Token": r.string() }),
|
1387
|
+
r.object({ "X-CSRF-Token": r.string() }),
|
1388
|
+
r.object({ "x-csrf-token": r.string() }),
|
1389
|
+
r.object({ "X-CSRF-TOKEN": r.string() })
|
1390
|
+
]), Ho = r.union([
|
1379
1391
|
Jt,
|
1380
|
-
|
1392
|
+
qo
|
1381
1393
|
]), $e = qe({
|
1382
1394
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
1383
1395
|
method: "post",
|
1384
|
-
requestPathParamsSchema:
|
1396
|
+
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
1385
1397
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
1386
|
-
requestHeaderSchema:
|
1387
|
-
requestBodySchema:
|
1398
|
+
requestHeaderSchema: Ho,
|
1399
|
+
requestBodySchema: r.undefined(),
|
1388
1400
|
isEmptyResponseExpected: !0,
|
1389
1401
|
successResponseBodySchema: Uo
|
1390
1402
|
});
|
1391
|
-
function
|
1403
|
+
function $a(e, t, n) {
|
1392
1404
|
return async () => {
|
1393
|
-
const
|
1394
|
-
if (!
|
1405
|
+
const o = t();
|
1406
|
+
if (!o)
|
1395
1407
|
throw new Le();
|
1396
1408
|
return W(e, $e, {
|
1397
1409
|
pathParams: { teamId: Number(await n()) },
|
1398
|
-
headers: await A.create().add("x-csrf-token",
|
1410
|
+
headers: await A.create().add("x-csrf-token", o).resolve()
|
1399
1411
|
});
|
1400
1412
|
};
|
1401
1413
|
}
|
1402
|
-
function
|
1414
|
+
function Fa(e, t) {
|
1403
1415
|
return async ({ refreshToken: n }) => W(e, $e, {
|
1404
1416
|
pathParams: { teamId: Number(await t()) },
|
1405
1417
|
headers: await A.create().add("Authorization", `Bearer ${n}`).resolve()
|
1406
1418
|
});
|
1407
1419
|
}
|
1408
|
-
const
|
1420
|
+
const Bo = {
|
1409
1421
|
teamKey: (e) => ["getUserToken", e]
|
1410
|
-
},
|
1422
|
+
}, Do = (e, t, n) => B({
|
1411
1423
|
...n,
|
1412
|
-
queryFn: async ({ queryKey: [
|
1424
|
+
queryFn: async ({ queryKey: [o, a] }) => W(e, $e, {
|
1413
1425
|
headers: await t.resolve(),
|
1414
1426
|
pathParams: { teamId: a }
|
1415
1427
|
})
|
@@ -1422,11 +1434,11 @@ const Ho = {
|
|
1422
1434
|
};
|
1423
1435
|
ee(oe, "eventName", "new-jwt-issued");
|
1424
1436
|
let z = oe;
|
1425
|
-
function
|
1426
|
-
const
|
1427
|
-
queryKey:
|
1428
|
-
enabled:
|
1429
|
-
}), i =
|
1437
|
+
function za(e, t, n) {
|
1438
|
+
const o = xo(), a = Do(e, t.add("x-csrf-token", o ?? ""), {
|
1439
|
+
queryKey: Bo.teamKey(n),
|
1440
|
+
enabled: o !== void 0
|
1441
|
+
}), i = Et();
|
1430
1442
|
return G(() => {
|
1431
1443
|
a.data && a.data.accessToken !== i.current && (window.dispatchEvent(new z(a.data)), i.current = a.data.accessToken);
|
1432
1444
|
}, [a.data]), a;
|
@@ -1436,245 +1448,245 @@ function Qt() {
|
|
1436
1448
|
return G(() => {
|
1437
1449
|
const n = (a) => {
|
1438
1450
|
t(a.detail.payload);
|
1439
|
-
},
|
1440
|
-
return t(
|
1451
|
+
}, o = Wt();
|
1452
|
+
return t(o ? ie(o.accessToken) : void 0), window.addEventListener(z.eventName, n), () => {
|
1441
1453
|
window.removeEventListener(z.eventName, n);
|
1442
1454
|
};
|
1443
1455
|
}, []), e;
|
1444
1456
|
}
|
1445
|
-
const
|
1446
|
-
user_id:
|
1447
|
-
email:
|
1448
|
-
fullname:
|
1449
|
-
created_at:
|
1450
|
-
created_at_timestamp:
|
1457
|
+
const $o = ce, Fo = r.object({
|
1458
|
+
user_id: r.number(),
|
1459
|
+
email: r.string().email(),
|
1460
|
+
fullname: r.string(),
|
1461
|
+
created_at: r.string(),
|
1462
|
+
created_at_timestamp: r.number(),
|
1451
1463
|
role: Kt
|
1452
|
-
}),
|
1453
|
-
team_id:
|
1454
|
-
team_user:
|
1455
|
-
}),
|
1464
|
+
}), zo = r.object({
|
1465
|
+
team_id: r.number(),
|
1466
|
+
team_user: Fo
|
1467
|
+
}), Go = Q({
|
1456
1468
|
description: "Get the details of a team user",
|
1457
|
-
requestHeaderSchema:
|
1458
|
-
requestPathParamsSchema:
|
1469
|
+
requestHeaderSchema: $o,
|
1470
|
+
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
1459
1471
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
1460
|
-
successResponseBodySchema:
|
1461
|
-
}),
|
1472
|
+
successResponseBodySchema: zo
|
1473
|
+
}), Ko = {
|
1462
1474
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
1463
|
-
},
|
1475
|
+
}, Wo = (e, t, n) => B({
|
1464
1476
|
...n,
|
1465
|
-
queryFn: async ({ queryKey: [
|
1477
|
+
queryFn: async ({ queryKey: [o, a, i] }) => J(e, Go, {
|
1466
1478
|
headers: await t.resolve(),
|
1467
1479
|
pathParams: { teamId: a, userId: i }
|
1468
1480
|
})
|
1469
1481
|
});
|
1470
|
-
function
|
1482
|
+
function Ga(e, t) {
|
1471
1483
|
const n = Qt();
|
1472
|
-
return
|
1473
|
-
queryKey:
|
1484
|
+
return Wo(e, t, {
|
1485
|
+
queryKey: Ko.teamUserKey((n == null ? void 0 : n.teamId) ?? 0, (n == null ? void 0 : n.userId) ?? 0),
|
1474
1486
|
enabled: (n == null ? void 0 : n.userId) !== void 0 && n.teamId !== void 0
|
1475
1487
|
});
|
1476
1488
|
}
|
1477
|
-
const
|
1478
|
-
lang_id:
|
1479
|
-
lang_iso:
|
1480
|
-
lang_name:
|
1481
|
-
is_writable:
|
1482
|
-
}),
|
1483
|
-
user_id:
|
1484
|
-
email:
|
1485
|
-
fullname:
|
1486
|
-
created_at:
|
1487
|
-
created_at_timestamp:
|
1488
|
-
admin_rights:
|
1489
|
-
languages:
|
1490
|
-
is_admin:
|
1491
|
-
is_reviewer:
|
1492
|
-
}),
|
1493
|
-
project_id:
|
1494
|
-
contributors:
|
1489
|
+
const Jo = r.object({
|
1490
|
+
lang_id: r.number(),
|
1491
|
+
lang_iso: r.string(),
|
1492
|
+
lang_name: r.string(),
|
1493
|
+
is_writable: r.union([r.literal(0), r.literal(1)])
|
1494
|
+
}), Qo = r.object({
|
1495
|
+
user_id: r.number(),
|
1496
|
+
email: r.string().email(),
|
1497
|
+
fullname: r.string(),
|
1498
|
+
created_at: r.string(),
|
1499
|
+
created_at_timestamp: r.number(),
|
1500
|
+
admin_rights: r.array(r.string()),
|
1501
|
+
languages: r.array(Jo),
|
1502
|
+
is_admin: r.boolean(),
|
1503
|
+
is_reviewer: r.boolean()
|
1504
|
+
}), Xo = r.object({
|
1505
|
+
project_id: r.string(),
|
1506
|
+
contributors: r.array(Qo)
|
1495
1507
|
}), Yo = Q({
|
1496
1508
|
description: "Get the details of a project contributor",
|
1497
1509
|
requestHeaderSchema: ce,
|
1498
|
-
requestPathParamsSchema:
|
1510
|
+
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
1499
1511
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
1500
|
-
successResponseBodySchema:
|
1512
|
+
successResponseBodySchema: Xo
|
1501
1513
|
}), Vo = {
|
1502
1514
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
1503
|
-
},
|
1515
|
+
}, Zo = (e, t, n) => B({
|
1504
1516
|
...n,
|
1505
|
-
queryFn: async ({ queryKey: [
|
1517
|
+
queryFn: async ({ queryKey: [o, a, i] }) => J(e, Yo, {
|
1506
1518
|
pathParams: { projectId: a, contributorId: i },
|
1507
1519
|
headers: await t.resolve()
|
1508
1520
|
})
|
1509
1521
|
});
|
1510
|
-
function
|
1511
|
-
const
|
1512
|
-
return
|
1513
|
-
queryKey: Vo.projectUserKey(n, (
|
1514
|
-
enabled:
|
1522
|
+
function Ka(e, t, n) {
|
1523
|
+
const o = Qt();
|
1524
|
+
return Zo(e, t, {
|
1525
|
+
queryKey: Vo.projectUserKey(n, (o == null ? void 0 : o.userId) ?? 0),
|
1526
|
+
enabled: o !== void 0
|
1515
1527
|
});
|
1516
1528
|
}
|
1517
|
-
const
|
1518
|
-
lang_iso:
|
1519
|
-
custom_iso:
|
1520
|
-
}),
|
1521
|
-
language_id:
|
1522
|
-
language_iso:
|
1523
|
-
progress:
|
1524
|
-
words_to_do:
|
1525
|
-
}),
|
1526
|
-
projectId:
|
1527
|
-
}),
|
1528
|
-
lang_id:
|
1529
|
-
lang_iso:
|
1530
|
-
lang_name:
|
1531
|
-
is_rtl:
|
1532
|
-
plural_forms:
|
1533
|
-
}),
|
1534
|
-
project_id:
|
1535
|
-
project_uuid:
|
1536
|
-
languages:
|
1537
|
-
}),
|
1529
|
+
const ea = r.object({
|
1530
|
+
lang_iso: r.string(),
|
1531
|
+
custom_iso: r.string().optional()
|
1532
|
+
}), ta = r.object({
|
1533
|
+
language_id: r.number(),
|
1534
|
+
language_iso: r.string(),
|
1535
|
+
progress: r.number(),
|
1536
|
+
words_to_do: r.number()
|
1537
|
+
}), na = r.object({
|
1538
|
+
projectId: r.string()
|
1539
|
+
}), ra = r.object({
|
1540
|
+
lang_id: r.number(),
|
1541
|
+
lang_iso: r.string(),
|
1542
|
+
lang_name: r.string(),
|
1543
|
+
is_rtl: r.boolean(),
|
1544
|
+
plural_forms: r.array(r.string().optional())
|
1545
|
+
}), oa = r.object({
|
1546
|
+
project_id: r.string(),
|
1547
|
+
project_uuid: r.string().uuid(),
|
1548
|
+
languages: r.array(ra)
|
1549
|
+
}), aa = Q({
|
1538
1550
|
description: "List of project languages",
|
1539
1551
|
requestHeaderSchema: ce,
|
1540
|
-
requestPathParamsSchema:
|
1552
|
+
requestPathParamsSchema: na,
|
1541
1553
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1542
|
-
successResponseBodySchema:
|
1543
|
-
}), le = ce, Fe =
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
]),
|
1548
|
-
per_platform_key_names:
|
1549
|
-
reviewing:
|
1550
|
-
auto_toggle_unverified:
|
1551
|
-
offline_translation:
|
1552
|
-
key_editing:
|
1553
|
-
inline_machine_translations:
|
1554
|
-
custom_translation_statuses:
|
1555
|
-
custom_translation_statuses_allow_multiple:
|
1556
|
-
segmentation:
|
1557
|
-
contributor_preview_download_enabled:
|
1558
|
-
}),
|
1559
|
-
not_reviewed:
|
1560
|
-
unverified:
|
1561
|
-
spelling_grammar:
|
1562
|
-
inconsistent_placeholders:
|
1563
|
-
inconsistent_html:
|
1564
|
-
different_number_of_urls:
|
1565
|
-
different_urls:
|
1566
|
-
leading_whitespace:
|
1567
|
-
trailing_whitespace:
|
1568
|
-
different_number_of_email_address:
|
1569
|
-
different_email_address:
|
1570
|
-
different_brackets:
|
1571
|
-
different_numbers:
|
1572
|
-
double_space:
|
1573
|
-
special_placeholder:
|
1574
|
-
unbalanced_brackets:
|
1575
|
-
}),
|
1576
|
-
progress_total:
|
1577
|
-
keys_total:
|
1578
|
-
team:
|
1579
|
-
base_words:
|
1580
|
-
qa_issues_total:
|
1581
|
-
qa_issues:
|
1582
|
-
languages:
|
1583
|
-
}), de =
|
1584
|
-
project_id:
|
1585
|
-
uuid:
|
1554
|
+
successResponseBodySchema: oa
|
1555
|
+
}), le = ce, Fe = r.union([
|
1556
|
+
r.literal("localization_files"),
|
1557
|
+
r.literal("paged_documents"),
|
1558
|
+
r.literal("marketing")
|
1559
|
+
]), sa = r.object({
|
1560
|
+
per_platform_key_names: r.boolean(),
|
1561
|
+
reviewing: r.boolean(),
|
1562
|
+
auto_toggle_unverified: r.boolean(),
|
1563
|
+
offline_translation: r.boolean(),
|
1564
|
+
key_editing: r.boolean(),
|
1565
|
+
inline_machine_translations: r.boolean(),
|
1566
|
+
custom_translation_statuses: r.boolean(),
|
1567
|
+
custom_translation_statuses_allow_multiple: r.boolean(),
|
1568
|
+
segmentation: r.boolean(),
|
1569
|
+
contributor_preview_download_enabled: r.boolean()
|
1570
|
+
}), ia = r.object({
|
1571
|
+
not_reviewed: r.number(),
|
1572
|
+
unverified: r.number(),
|
1573
|
+
spelling_grammar: r.number(),
|
1574
|
+
inconsistent_placeholders: r.number(),
|
1575
|
+
inconsistent_html: r.number(),
|
1576
|
+
different_number_of_urls: r.number(),
|
1577
|
+
different_urls: r.number(),
|
1578
|
+
leading_whitespace: r.number(),
|
1579
|
+
trailing_whitespace: r.number(),
|
1580
|
+
different_number_of_email_address: r.number(),
|
1581
|
+
different_email_address: r.number(),
|
1582
|
+
different_brackets: r.number(),
|
1583
|
+
different_numbers: r.number(),
|
1584
|
+
double_space: r.number(),
|
1585
|
+
special_placeholder: r.number(),
|
1586
|
+
unbalanced_brackets: r.number()
|
1587
|
+
}), ca = r.object({
|
1588
|
+
progress_total: r.number(),
|
1589
|
+
keys_total: r.number(),
|
1590
|
+
team: r.number(),
|
1591
|
+
base_words: r.number(),
|
1592
|
+
qa_issues_total: r.number(),
|
1593
|
+
qa_issues: ia,
|
1594
|
+
languages: r.array(ta)
|
1595
|
+
}), de = r.object({
|
1596
|
+
project_id: r.string(),
|
1597
|
+
uuid: r.string().uuid(),
|
1586
1598
|
project_type: Fe,
|
1587
|
-
name:
|
1588
|
-
description:
|
1589
|
-
created_at:
|
1590
|
-
created_at_timestamp:
|
1591
|
-
created_by:
|
1592
|
-
created_by_email:
|
1593
|
-
team_id:
|
1594
|
-
base_language_id:
|
1595
|
-
base_language_iso:
|
1596
|
-
settings:
|
1597
|
-
statistics:
|
1598
|
-
}),
|
1599
|
-
name:
|
1600
|
-
team_id:
|
1601
|
-
base_lang_iso:
|
1602
|
-
languages:
|
1599
|
+
name: r.string(),
|
1600
|
+
description: r.string(),
|
1601
|
+
created_at: r.string(),
|
1602
|
+
created_at_timestamp: r.number(),
|
1603
|
+
created_by: r.number(),
|
1604
|
+
created_by_email: r.string(),
|
1605
|
+
team_id: r.number(),
|
1606
|
+
base_language_id: r.number(),
|
1607
|
+
base_language_iso: r.string(),
|
1608
|
+
settings: sa.optional(),
|
1609
|
+
statistics: ca.optional()
|
1610
|
+
}), la = r.object({
|
1611
|
+
name: r.string(),
|
1612
|
+
team_id: r.string(),
|
1613
|
+
base_lang_iso: r.string(),
|
1614
|
+
languages: r.array(ea),
|
1603
1615
|
project_type: Fe,
|
1604
|
-
is_segmentation_enabled:
|
1605
|
-
}), St =
|
1616
|
+
is_segmentation_enabled: r.boolean()
|
1617
|
+
}), St = r.union([r.literal(0), r.literal(1)]), da = r.object({
|
1606
1618
|
filter_type: Fe.optional(),
|
1607
|
-
filter_team_id:
|
1608
|
-
filter_names:
|
1619
|
+
filter_team_id: r.number().optional(),
|
1620
|
+
filter_names: r.string().optional(),
|
1609
1621
|
include_statistics: St.optional(),
|
1610
1622
|
include_settings: St.optional(),
|
1611
|
-
limit:
|
1612
|
-
page:
|
1613
|
-
}),
|
1614
|
-
projects:
|
1615
|
-
}),
|
1616
|
-
project_id:
|
1617
|
-
}),
|
1618
|
-
project_id:
|
1619
|
-
}),
|
1620
|
-
name:
|
1621
|
-
description:
|
1622
|
-
}), ue = () => "/projects",
|
1623
|
+
limit: r.number().optional(),
|
1624
|
+
page: r.number().optional()
|
1625
|
+
}), ua = r.object({
|
1626
|
+
projects: r.array(de)
|
1627
|
+
}), ma = r.object({
|
1628
|
+
project_id: r.string()
|
1629
|
+
}), fa = r.object({
|
1630
|
+
project_id: r.string()
|
1631
|
+
}), _a = r.object({
|
1632
|
+
name: r.string().min(1),
|
1633
|
+
description: r.string().optional()
|
1634
|
+
}), ue = () => "/projects", ga = qe({
|
1623
1635
|
description: "Create a new project",
|
1624
1636
|
requestHeaderSchema: le,
|
1625
1637
|
method: "post",
|
1626
1638
|
pathResolver: ue,
|
1627
|
-
requestBodySchema:
|
1639
|
+
requestBodySchema: la,
|
1628
1640
|
successResponseBodySchema: de
|
1629
|
-
}),
|
1641
|
+
}), ha = Q({
|
1630
1642
|
description: "List all projects",
|
1631
1643
|
requestHeaderSchema: le,
|
1632
1644
|
pathResolver: ue,
|
1633
|
-
requestQuerySchema:
|
1634
|
-
successResponseBodySchema:
|
1635
|
-
}),
|
1645
|
+
requestQuerySchema: da,
|
1646
|
+
successResponseBodySchema: ua
|
1647
|
+
}), pa = Q({
|
1636
1648
|
description: "Retrieve a project",
|
1637
1649
|
requestHeaderSchema: le,
|
1638
|
-
requestPathParamsSchema:
|
1650
|
+
requestPathParamsSchema: ma,
|
1639
1651
|
pathResolver: ({ project_id: e }) => `${ue()}/${e}`,
|
1640
1652
|
successResponseBodySchema: de
|
1641
|
-
}),
|
1653
|
+
}), ba = qe({
|
1642
1654
|
description: "Update a project",
|
1643
1655
|
requestHeaderSchema: le,
|
1644
1656
|
method: "put",
|
1645
|
-
requestPathParamsSchema:
|
1657
|
+
requestPathParamsSchema: fa,
|
1646
1658
|
pathResolver: ({ project_id: e }) => `${ue()}/${e}`,
|
1647
|
-
requestBodySchema:
|
1659
|
+
requestBodySchema: _a,
|
1648
1660
|
successResponseBodySchema: de
|
1649
1661
|
});
|
1650
|
-
function
|
1662
|
+
function Wa(e, t, n = {}) {
|
1651
1663
|
return Rt({
|
1652
1664
|
...n,
|
1653
|
-
mutationFn: async (
|
1665
|
+
mutationFn: async (o) => W(e, ga, {
|
1654
1666
|
headers: await t.resolve(),
|
1655
|
-
body:
|
1667
|
+
body: o
|
1656
1668
|
})
|
1657
1669
|
});
|
1658
1670
|
}
|
1659
|
-
const
|
1671
|
+
const Ja = {
|
1660
1672
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1661
1673
|
};
|
1662
|
-
function
|
1674
|
+
function Qa(e, t, n) {
|
1663
1675
|
return B({
|
1664
1676
|
...n,
|
1665
|
-
queryFn: async ({ queryKey: [
|
1677
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, aa, {
|
1666
1678
|
headers: await t.resolve(),
|
1667
1679
|
pathParams: { projectId: a }
|
1668
1680
|
})
|
1669
1681
|
});
|
1670
1682
|
}
|
1671
|
-
const
|
1683
|
+
const Xa = {
|
1672
1684
|
paramsKey: (e) => ["listProjects", e]
|
1673
1685
|
};
|
1674
1686
|
function Ya(e, t, n) {
|
1675
1687
|
return B({
|
1676
1688
|
...n,
|
1677
|
-
queryFn: async ({ queryKey: [
|
1689
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, ha, {
|
1678
1690
|
headers: await t.resolve(),
|
1679
1691
|
queryParams: a
|
1680
1692
|
})
|
@@ -1683,19 +1695,19 @@ function Ya(e, t, n) {
|
|
1683
1695
|
const Va = {
|
1684
1696
|
projectIdKey: (e) => ["retrieveProject", e]
|
1685
1697
|
};
|
1686
|
-
function
|
1698
|
+
function Za(e, t, n) {
|
1687
1699
|
return B({
|
1688
1700
|
...n,
|
1689
|
-
queryFn: async ({ queryKey: [
|
1701
|
+
queryFn: async ({ queryKey: [o, a] }) => J(e, pa, {
|
1690
1702
|
headers: await t.resolve(),
|
1691
1703
|
pathParams: { project_id: a }
|
1692
1704
|
})
|
1693
1705
|
});
|
1694
1706
|
}
|
1695
|
-
function
|
1707
|
+
function es(e, t, n, o = {}) {
|
1696
1708
|
return Rt({
|
1697
|
-
...
|
1698
|
-
mutationFn: async (a) => W(e,
|
1709
|
+
...o,
|
1710
|
+
mutationFn: async (a) => W(e, ba, {
|
1699
1711
|
headers: await t.resolve(),
|
1700
1712
|
body: a,
|
1701
1713
|
pathParams: n
|
@@ -1703,67 +1715,67 @@ function Za(e, t, n, r = {}) {
|
|
1703
1715
|
});
|
1704
1716
|
}
|
1705
1717
|
export {
|
1706
|
-
|
1718
|
+
Ua as Breadcrumbs,
|
1707
1719
|
Ht as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1708
1720
|
cr as ENTERPRISE_PLAN_IDS,
|
1709
1721
|
sr as ESSENTIAL_PLAN_IDS,
|
1710
1722
|
qt as FREE_PLAN_ID,
|
1711
1723
|
A as HeaderBuilder,
|
1712
|
-
|
1724
|
+
Ha as JwtAuthHeaderBuilderMiddleware,
|
1713
1725
|
re as NavigationPanel,
|
1714
|
-
|
1726
|
+
qa as NavigationTabs,
|
1715
1727
|
ir as PRO_PLAN_IDS,
|
1716
|
-
|
1728
|
+
Ba as PublicApiHeaderBuilderMiddleware,
|
1717
1729
|
ar as START_PLAN_IDS,
|
1718
|
-
|
1719
|
-
|
1730
|
+
P as Sidebar,
|
1731
|
+
I as SidebarTaskLanguageStatuses,
|
1720
1732
|
xe as SidebarTaskStatuses,
|
1721
1733
|
te as SidebarTaskTypeOptions,
|
1722
1734
|
or as TRIAL_PLAN_ID,
|
1723
1735
|
ur as convertNewLineToBreakTag,
|
1724
1736
|
Gt as createHeaderBuilderMiddleware,
|
1725
|
-
|
1737
|
+
ga as createProject,
|
1726
1738
|
gr as formatDate,
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1739
|
+
Ma as formatDateTz,
|
1740
|
+
$a as generateTokenFromClassicSession,
|
1741
|
+
Da as getAuthenticatedSessionDetailFromRequest,
|
1730
1742
|
xo as getCsrfTokenFromCookie,
|
1731
1743
|
Wt as getJwtTokenFromCookie,
|
1732
|
-
|
1733
|
-
|
1744
|
+
Go as getTeamUser,
|
1745
|
+
Ko as getTeamUsersQueryKey,
|
1734
1746
|
$e as getUserToken,
|
1735
|
-
|
1736
|
-
|
1737
|
-
|
1738
|
-
|
1747
|
+
Bo as getUserTokenKey,
|
1748
|
+
La as isEnterpriseOpenSourcePlan,
|
1749
|
+
xa as isEnterprisePlan,
|
1750
|
+
Na as isEssentialPlan,
|
1739
1751
|
Be as isFreePlan,
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1752
|
+
Oa as isPaidPlan,
|
1753
|
+
ja as isProPlan,
|
1754
|
+
Ra as isStartPlan,
|
1743
1755
|
Bt as isTrialPlan,
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1756
|
+
aa as listProjectLanguages,
|
1757
|
+
Ja as listProjectLanguagesKey,
|
1758
|
+
ha as listProjects,
|
1759
|
+
Xa as listProjectsKey,
|
1748
1760
|
_r as makeUrlClickable,
|
1749
1761
|
ie as parseJwtTokenPayload,
|
1750
|
-
|
1762
|
+
Fa as refreshExpiredToken,
|
1751
1763
|
Yo as retrieveContributor,
|
1752
1764
|
Vo as retrieveContributorKeys,
|
1753
|
-
|
1765
|
+
pa as retrieveProject,
|
1754
1766
|
Va as retrieveProjectQueryKey,
|
1755
|
-
|
1756
|
-
|
1767
|
+
ba as updateProject,
|
1768
|
+
Ka as useAuthenticatedProjectContributor,
|
1757
1769
|
Qt as useAuthenticatedSessionPayload,
|
1758
|
-
|
1759
|
-
|
1770
|
+
Ga as useAuthenticatedUser,
|
1771
|
+
Wa as useCreateProjectMutation,
|
1760
1772
|
De as useEffectOnce,
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1773
|
+
za as useGetPromotedClassicSessionJwtQuery,
|
1774
|
+
Wo as useGetTeamUsersQuery,
|
1775
|
+
Do as useGetUserTokenQuery,
|
1776
|
+
Qa as useListProjectLanguagesQuery,
|
1765
1777
|
Ya as useListProjectsQuery,
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1778
|
+
Zo as useRetrieveContributorQuery,
|
1779
|
+
Za as useRetrieveProjectQuery,
|
1780
|
+
es as useUpdateProjectMutation
|
1769
1781
|
};
|