@lokalise/harmony 1.12.0 → 1.12.2
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 +328 -328
- package/dist/types/src/features/publicApi/hooks/useListProjectsQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/projects.d.ts +6 -6
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +6 -6
- package/package.json +1 -1
package/dist/harmony.mjs
CHANGED
@@ -1,25 +1,25 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { jsx as i, jsxs as p, Fragment as
|
1
|
+
var Ct = Object.defineProperty;
|
2
|
+
var Nt = (e, t, n) => t in e ? Ct(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
3
|
+
var Ne = (e, t, n) => Nt(e, typeof t != "symbol" ? t + "" : t, n);
|
4
|
+
import { jsx as i, jsxs as p, Fragment as at } from "react/jsx-runtime";
|
5
5
|
import * as M from "react";
|
6
|
-
import { useRef as
|
7
|
-
import { Tooltip as he, Link as
|
8
|
-
import { format as
|
9
|
-
import { toZonedTime as
|
6
|
+
import { useRef as ot, useState as ge, useCallback as Re, useEffect as U, useContext as Rt, createContext as kt, cloneElement as At, Fragment as it, forwardRef as Lt } from "react";
|
7
|
+
import { Tooltip as he, Link as st, Menu as pe, MenuList as ve, CaretUpIcon as Ot, UserIcon as ct, MenuItem as W, MenuDivider as lt, Tag as qt } from "@lokalise/louis";
|
8
|
+
import { format as ut } from "date-fns";
|
9
|
+
import { toZonedTime as Mt } from "date-fns-tz";
|
10
10
|
import { z as r } from "zod";
|
11
11
|
import { sendByPayloadRoute as Q, sendByGetRoute as x } from "@lokalise/frontend-http-client";
|
12
|
-
import { buildPayloadRoute as
|
13
|
-
import { useQuery as O, useMutation as
|
12
|
+
import { buildPayloadRoute as dt } from "@lokalise/universal-ts-utils/api-contracts/apiContracts";
|
13
|
+
import { useQuery as O, useMutation as Ut } from "@tanstack/react-query";
|
14
14
|
import { buildGetRoute as B } from "@lokalise/universal-ts-utils/node";
|
15
15
|
var D = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
16
|
-
function
|
16
|
+
function mt(e) {
|
17
17
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
18
18
|
}
|
19
|
-
var Z,
|
19
|
+
var Z, ke;
|
20
20
|
function Te() {
|
21
|
-
if (
|
22
|
-
|
21
|
+
if (ke) return Z;
|
22
|
+
ke = 1;
|
23
23
|
function e(t) {
|
24
24
|
var n = typeof t;
|
25
25
|
return t != null && (n == "object" || n == "function");
|
@@ -27,30 +27,30 @@ function Te() {
|
|
27
27
|
return Z = e, Z;
|
28
28
|
}
|
29
29
|
var X, Ae;
|
30
|
-
function
|
30
|
+
function xt() {
|
31
31
|
if (Ae) return X;
|
32
32
|
Ae = 1;
|
33
33
|
var e = typeof D == "object" && D && D.Object === Object && D;
|
34
34
|
return X = e, X;
|
35
35
|
}
|
36
36
|
var ee, Le;
|
37
|
-
function
|
37
|
+
function ft() {
|
38
38
|
if (Le) return ee;
|
39
39
|
Le = 1;
|
40
|
-
var e =
|
40
|
+
var e = xt(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
41
41
|
return ee = n, ee;
|
42
42
|
}
|
43
43
|
var te, Oe;
|
44
|
-
function
|
44
|
+
function Bt() {
|
45
45
|
if (Oe) return te;
|
46
46
|
Oe = 1;
|
47
|
-
var e =
|
47
|
+
var e = ft(), t = function() {
|
48
48
|
return e.Date.now();
|
49
49
|
};
|
50
50
|
return te = t, te;
|
51
51
|
}
|
52
52
|
var ne, qe;
|
53
|
-
function
|
53
|
+
function Ht() {
|
54
54
|
if (qe) return ne;
|
55
55
|
qe = 1;
|
56
56
|
var e = /\s/;
|
@@ -62,27 +62,27 @@ function Bt() {
|
|
62
62
|
return ne = t, ne;
|
63
63
|
}
|
64
64
|
var re, Me;
|
65
|
-
function
|
65
|
+
function $t() {
|
66
66
|
if (Me) return re;
|
67
67
|
Me = 1;
|
68
|
-
var e =
|
68
|
+
var e = Ht(), t = /^\s+/;
|
69
69
|
function n(a) {
|
70
70
|
return a && a.slice(0, e(a) + 1).replace(t, "");
|
71
71
|
}
|
72
72
|
return re = n, re;
|
73
73
|
}
|
74
74
|
var ae, Ue;
|
75
|
-
function
|
75
|
+
function _t() {
|
76
76
|
if (Ue) return ae;
|
77
77
|
Ue = 1;
|
78
|
-
var e =
|
78
|
+
var e = ft(), t = e.Symbol;
|
79
79
|
return ae = t, ae;
|
80
80
|
}
|
81
81
|
var oe, xe;
|
82
|
-
function
|
82
|
+
function Gt() {
|
83
83
|
if (xe) return oe;
|
84
84
|
xe = 1;
|
85
|
-
var e =
|
85
|
+
var e = _t(), t = Object.prototype, n = t.hasOwnProperty, a = t.toString, o = e ? e.toStringTag : void 0;
|
86
86
|
function s(c) {
|
87
87
|
var u = n.call(c, o), d = c[o];
|
88
88
|
try {
|
@@ -96,7 +96,7 @@ function $t() {
|
|
96
96
|
return oe = s, oe;
|
97
97
|
}
|
98
98
|
var ie, Be;
|
99
|
-
function
|
99
|
+
function Dt() {
|
100
100
|
if (Be) return ie;
|
101
101
|
Be = 1;
|
102
102
|
var e = Object.prototype, t = e.toString;
|
@@ -106,17 +106,17 @@ function Gt() {
|
|
106
106
|
return ie = n, ie;
|
107
107
|
}
|
108
108
|
var se, He;
|
109
|
-
function
|
109
|
+
function Ft() {
|
110
110
|
if (He) return se;
|
111
111
|
He = 1;
|
112
|
-
var e =
|
112
|
+
var e = _t(), t = Gt(), n = Dt(), a = "[object Null]", o = "[object Undefined]", s = e ? e.toStringTag : void 0;
|
113
113
|
function c(u) {
|
114
114
|
return u == null ? u === void 0 ? o : a : s && s in Object(u) ? t(u) : n(u);
|
115
115
|
}
|
116
116
|
return se = c, se;
|
117
117
|
}
|
118
118
|
var ce, $e;
|
119
|
-
function
|
119
|
+
function zt() {
|
120
120
|
if ($e) return ce;
|
121
121
|
$e = 1;
|
122
122
|
function e(t) {
|
@@ -125,20 +125,20 @@ function Ft() {
|
|
125
125
|
return ce = e, ce;
|
126
126
|
}
|
127
127
|
var le, Ge;
|
128
|
-
function
|
128
|
+
function Kt() {
|
129
129
|
if (Ge) return le;
|
130
130
|
Ge = 1;
|
131
|
-
var e =
|
131
|
+
var e = Ft(), t = zt(), n = "[object Symbol]";
|
132
132
|
function a(o) {
|
133
133
|
return typeof o == "symbol" || t(o) && e(o) == n;
|
134
134
|
}
|
135
135
|
return le = a, le;
|
136
136
|
}
|
137
137
|
var ue, De;
|
138
|
-
function
|
138
|
+
function Jt() {
|
139
139
|
if (De) return ue;
|
140
140
|
De = 1;
|
141
|
-
var e =
|
141
|
+
var e = $t(), t = Te(), n = Kt(), a = NaN, o = /^[-+]0x[0-9a-f]+$/i, s = /^0b[01]+$/i, c = /^0o[0-7]+$/i, u = parseInt;
|
142
142
|
function d(l) {
|
143
143
|
if (typeof l == "number")
|
144
144
|
return l;
|
@@ -157,28 +157,28 @@ function Kt() {
|
|
157
157
|
return ue = d, ue;
|
158
158
|
}
|
159
159
|
var de, Fe;
|
160
|
-
function
|
160
|
+
function bt() {
|
161
161
|
if (Fe) return de;
|
162
162
|
Fe = 1;
|
163
|
-
var e = Te(), t =
|
163
|
+
var e = Te(), t = Bt(), n = Jt(), a = "Expected a function", o = Math.max, s = Math.min;
|
164
164
|
function c(u, d, l) {
|
165
|
-
var m, b, y, I, _, T,
|
165
|
+
var m, b, y, I, _, T, S = 0, w = !1, g = !1, j = !0;
|
166
166
|
if (typeof u != "function")
|
167
167
|
throw new TypeError(a);
|
168
|
-
d = n(d) || 0, e(l) && (
|
168
|
+
d = n(d) || 0, e(l) && (w = !!l.leading, g = "maxWait" in l, y = g ? o(n(l.maxWait) || 0, d) : y, j = "trailing" in l ? !!l.trailing : j);
|
169
169
|
function v(f) {
|
170
170
|
var P = m, q = b;
|
171
|
-
return m = b = void 0,
|
171
|
+
return m = b = void 0, S = f, I = u.apply(q, P), I;
|
172
172
|
}
|
173
173
|
function h(f) {
|
174
|
-
return
|
174
|
+
return S = f, _ = setTimeout(G, d), w ? v(f) : I;
|
175
175
|
}
|
176
176
|
function $(f) {
|
177
|
-
var P = f - T, q = f -
|
177
|
+
var P = f - T, q = f - S, Ce = d - P;
|
178
178
|
return g ? s(Ce, y - q) : Ce;
|
179
179
|
}
|
180
180
|
function je(f) {
|
181
|
-
var P = f - T, q = f -
|
181
|
+
var P = f - T, q = f - S;
|
182
182
|
return T === void 0 || P >= d || P < 0 || g && q >= y;
|
183
183
|
}
|
184
184
|
function G() {
|
@@ -190,10 +190,10 @@ function _t() {
|
|
190
190
|
function Pe(f) {
|
191
191
|
return _ = void 0, j && m ? v(f) : (m = b = void 0, I);
|
192
192
|
}
|
193
|
-
function It() {
|
194
|
-
_ !== void 0 && clearTimeout(_), w = 0, m = T = b = _ = void 0;
|
195
|
-
}
|
196
193
|
function jt() {
|
194
|
+
_ !== void 0 && clearTimeout(_), S = 0, m = T = b = _ = void 0;
|
195
|
+
}
|
196
|
+
function Pt() {
|
197
197
|
return _ === void 0 ? I : Pe(t());
|
198
198
|
}
|
199
199
|
function V() {
|
@@ -206,17 +206,17 @@ function _t() {
|
|
206
206
|
}
|
207
207
|
return _ === void 0 && (_ = setTimeout(G, d)), I;
|
208
208
|
}
|
209
|
-
return V.cancel =
|
209
|
+
return V.cancel = jt, V.flush = Pt, V;
|
210
210
|
}
|
211
211
|
return de = c, de;
|
212
212
|
}
|
213
|
-
var
|
214
|
-
const
|
213
|
+
var Wt = bt();
|
214
|
+
const Qt = /* @__PURE__ */ mt(Wt);
|
215
215
|
var me, ze;
|
216
|
-
function
|
216
|
+
function Yt() {
|
217
217
|
if (ze) return me;
|
218
218
|
ze = 1;
|
219
|
-
var e =
|
219
|
+
var e = bt(), t = Te(), n = "Expected a function";
|
220
220
|
function a(o, s, c) {
|
221
221
|
var u = !0, d = !0;
|
222
222
|
if (typeof o != "function")
|
@@ -229,17 +229,17 @@ function Qt() {
|
|
229
229
|
}
|
230
230
|
return me = a, me;
|
231
231
|
}
|
232
|
-
var
|
233
|
-
const
|
232
|
+
var Vt = Yt();
|
233
|
+
const Zt = /* @__PURE__ */ mt(Vt), Xt = (e, t, n, a) => {
|
234
234
|
switch (t) {
|
235
235
|
case "debounce":
|
236
|
-
return
|
236
|
+
return Qt(e, n, a);
|
237
237
|
case "throttle":
|
238
|
-
return
|
238
|
+
return Zt(e, n, a);
|
239
239
|
default:
|
240
240
|
return e;
|
241
241
|
}
|
242
|
-
},
|
242
|
+
}, en = (
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
244
244
|
(e) => {
|
245
245
|
const t = M.useRef(e);
|
@@ -250,7 +250,7 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
|
|
250
250
|
return (a = t.current) === null || a === void 0 ? void 0 : a.call(t, ...n);
|
251
251
|
}, []);
|
252
252
|
}
|
253
|
-
),
|
253
|
+
), tn = (
|
254
254
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
255
255
|
(e) => {
|
256
256
|
const [t, n] = M.useState((e == null ? void 0 : e.current) || null);
|
@@ -267,7 +267,7 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
|
|
267
267
|
}
|
268
268
|
}), [t]), refElement: t, setRefElement: n };
|
269
269
|
}
|
270
|
-
),
|
270
|
+
), nn = (e, t) => t === "border-box" ? {
|
271
271
|
width: e.borderBoxSize[0].inlineSize,
|
272
272
|
height: e.borderBoxSize[0].blockSize
|
273
273
|
} : t === "content-box" ? {
|
@@ -277,11 +277,11 @@ const Vt = /* @__PURE__ */ dt(Yt), Zt = (e, t, n, a) => {
|
|
277
277
|
width: e.contentRect.width,
|
278
278
|
height: e.contentRect.height
|
279
279
|
};
|
280
|
-
function
|
281
|
-
const l =
|
280
|
+
function rn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refreshOptions: a, handleWidth: o = !0, handleHeight: s = !0, targetRef: c, observerOptions: u, onResize: d } = {}) {
|
281
|
+
const l = ot(e), m = en(d), [b, y] = ge({
|
282
282
|
width: void 0,
|
283
283
|
height: void 0
|
284
|
-
}), { refProxy: I, refElement: _ } =
|
284
|
+
}), { refProxy: I, refElement: _ } = tn(c), { box: T } = u || {}, S = Re((g) => {
|
285
285
|
if (!o && !s)
|
286
286
|
return;
|
287
287
|
if (l.current) {
|
@@ -290,52 +290,52 @@ function nn({ skipOnMount: e = !1, refreshMode: t, refreshRate: n = 1e3, refresh
|
|
290
290
|
}
|
291
291
|
const j = (v, h) => o && v.width !== h.width || s && v.height !== h.height;
|
292
292
|
g.forEach((v) => {
|
293
|
-
const h =
|
293
|
+
const h = nn(v, T);
|
294
294
|
y(($) => j($, h) ? (m == null || m({
|
295
295
|
width: h.width,
|
296
296
|
height: h.height,
|
297
297
|
entry: v
|
298
298
|
}), h) : $);
|
299
299
|
});
|
300
|
-
}, [o, s, l, T]),
|
301
|
-
|
300
|
+
}, [o, s, l, T]), w = Re(Xt(S, t, n, a), [
|
301
|
+
S,
|
302
302
|
t,
|
303
303
|
n,
|
304
304
|
a
|
305
305
|
]);
|
306
306
|
return U(() => {
|
307
307
|
let g;
|
308
|
-
return _ ? (g = new window.ResizeObserver(
|
308
|
+
return _ ? (g = new window.ResizeObserver(w), g.observe(_, u)) : (b.width || b.height) && (m == null || m({
|
309
309
|
width: null,
|
310
310
|
height: null,
|
311
311
|
entry: null
|
312
312
|
}), y({ width: void 0, height: void 0 })), () => {
|
313
313
|
var j, v, h;
|
314
|
-
(j = g == null ? void 0 : g.disconnect) === null || j === void 0 || j.call(g), (h = (v =
|
314
|
+
(j = g == null ? void 0 : g.disconnect) === null || j === void 0 || j.call(g), (h = (v = w).cancel) === null || h === void 0 || h.call(v);
|
315
315
|
};
|
316
|
-
}, [
|
316
|
+
}, [w, _]), Object.assign({ ref: I }, b);
|
317
317
|
}
|
318
|
-
function
|
318
|
+
function gt(e) {
|
319
319
|
var t, n, a = "";
|
320
320
|
if (typeof e == "string" || typeof e == "number") a += e;
|
321
321
|
else if (typeof e == "object") if (Array.isArray(e)) {
|
322
322
|
var o = e.length;
|
323
|
-
for (t = 0; t < o; t++) e[t] && (n =
|
323
|
+
for (t = 0; t < o; t++) e[t] && (n = gt(e[t])) && (a && (a += " "), a += n);
|
324
324
|
} else for (n in e) e[n] && (a && (a += " "), a += n);
|
325
325
|
return a;
|
326
326
|
}
|
327
|
-
function
|
328
|
-
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t =
|
327
|
+
function R() {
|
328
|
+
for (var e, t, n = 0, a = "", o = arguments.length; n < o; n++) (e = arguments[n]) && (t = gt(e)) && (a && (a += " "), a += t);
|
329
329
|
return a;
|
330
330
|
}
|
331
|
-
const
|
332
|
-
headerContainer:
|
333
|
-
navigationTabList:
|
334
|
-
navigationTab:
|
335
|
-
headerContent:
|
336
|
-
staticEnabled:
|
337
|
-
},
|
338
|
-
const { ref: n, height: a } =
|
331
|
+
const an = "_headerContainer_1cubo_1", on = "_navigationTabList_1cubo_8", sn = "_navigationTab_1cubo_8", cn = "_headerContent_1cubo_34", ln = "_staticEnabled_1cubo_50", A = {
|
332
|
+
headerContainer: an,
|
333
|
+
navigationTabList: on,
|
334
|
+
navigationTab: sn,
|
335
|
+
headerContent: cn,
|
336
|
+
staticEnabled: ln
|
337
|
+
}, un = 77, z = ({ sticky: e, children: t }) => {
|
338
|
+
const { ref: n, height: a } = rn({
|
339
339
|
refreshMode: "debounce",
|
340
340
|
refreshRate: 0
|
341
341
|
}), [o, s] = ge(!1), c = () => o ? !e : !0;
|
@@ -345,12 +345,12 @@ const rn = "_headerContainer_1cubo_1", an = "_navigationTabList_1cubo_8", on = "
|
|
345
345
|
};
|
346
346
|
return window.addEventListener("scroll", d), () => window.removeEventListener("scroll", d);
|
347
347
|
}, []);
|
348
|
-
const u = `${a ||
|
348
|
+
const u = `${a || un}px`;
|
349
349
|
return /* @__PURE__ */ i("div", { style: { minHeight: u }, children: /* @__PURE__ */ i("div", { children: /* @__PURE__ */ p(
|
350
350
|
"div",
|
351
351
|
{
|
352
352
|
ref: n,
|
353
|
-
className:
|
353
|
+
className: R(A.headerContent, {
|
354
354
|
[A.staticEnabled]: c()
|
355
355
|
}),
|
356
356
|
children: [
|
@@ -363,33 +363,33 @@ const rn = "_headerContainer_1cubo_1", an = "_navigationTabList_1cubo_8", on = "
|
|
363
363
|
};
|
364
364
|
z.Header = ({ children: e }) => /* @__PURE__ */ i("div", { className: A.headerContainer, children: e });
|
365
365
|
z.Tabs = ({ children: e }) => /* @__PURE__ */ i("div", { className: "flex justify-between gap-2 nowrap", children: e });
|
366
|
-
const
|
367
|
-
sidebarContainer:
|
368
|
-
},
|
369
|
-
logoLink:
|
370
|
-
},
|
371
|
-
link:
|
372
|
-
active:
|
373
|
-
},
|
374
|
-
|
366
|
+
const dn = "_sidebarContainer_bmdti_1", mn = {
|
367
|
+
sidebarContainer: dn
|
368
|
+
}, fn = "_logoLink_1baxb_1", _n = {
|
369
|
+
logoLink: fn
|
370
|
+
}, bn = ({ src: e, href: t = "/", ariaLabel: n = "Home", alt: a = "Lokalise" }) => /* @__PURE__ */ i("a", { className: _n.logoLink, href: t, "aria-label": n, children: /* @__PURE__ */ i("img", { src: e, alt: a }) }), gn = "_link_1weq1_1", hn = "_active_1weq1_18", Ke = {
|
371
|
+
link: gn,
|
372
|
+
active: hn
|
373
|
+
}, pn = ({ label: e, to: t, icon: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: e, children: /* @__PURE__ */ i(
|
374
|
+
st,
|
375
375
|
{
|
376
|
-
className:
|
376
|
+
className: R(Ke.link, {
|
377
377
|
[Ke.active]: window.location.pathname.startsWith(t)
|
378
378
|
}),
|
379
379
|
href: t,
|
380
380
|
children: /* @__PURE__ */ i(n, { size: "25px" })
|
381
381
|
}
|
382
|
-
) }),
|
383
|
-
dropdownButton:
|
384
|
-
dropdownButtonActive:
|
385
|
-
},
|
382
|
+
) }), vn = "_dropdownButton_hwh0c_1", Tn = "_dropdownButtonActive_hwh0c_18", Je = {
|
383
|
+
dropdownButton: vn,
|
384
|
+
dropdownButtonActive: Tn
|
385
|
+
}, yn = ({ children: e, icon: t }) => /* @__PURE__ */ i(
|
386
386
|
pe,
|
387
387
|
{
|
388
388
|
menuButton: ({ opened: n }) => /* @__PURE__ */ i(he, { placement: "right", tooltip: "Help", children: /* @__PURE__ */ i(
|
389
389
|
"button",
|
390
390
|
{
|
391
391
|
type: "button",
|
392
|
-
className:
|
392
|
+
className: R(Je.dropdownButton, {
|
393
393
|
[Je.dropdownButtonActive]: n
|
394
394
|
}),
|
395
395
|
children: /* @__PURE__ */ i(t, { size: "25px" })
|
@@ -397,29 +397,29 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
397
397
|
) }),
|
398
398
|
children: /* @__PURE__ */ i(ve, { placement: "right-start", children: e })
|
399
399
|
}
|
400
|
-
),
|
401
|
-
iconContainer:
|
402
|
-
},
|
400
|
+
), Sn = "_iconContainer_nz34m_1", wn = {
|
401
|
+
iconContainer: Sn
|
402
|
+
}, ht = ({ className: e = "" }) => /* @__PURE__ */ i(
|
403
403
|
"div",
|
404
404
|
{
|
405
405
|
"aria-label": "Upgrade Icon",
|
406
|
-
className:
|
406
|
+
className: R(
|
407
407
|
wn.iconContainer,
|
408
408
|
"flex-row",
|
409
409
|
"items-center",
|
410
410
|
"justify-center",
|
411
411
|
e
|
412
412
|
),
|
413
|
-
children: /* @__PURE__ */ i(
|
413
|
+
children: /* @__PURE__ */ i(Ot, {})
|
414
414
|
}
|
415
|
-
),
|
416
|
-
menuContainer:
|
417
|
-
profileButton:
|
418
|
-
profileImage:
|
419
|
-
profileImageHighlight:
|
420
|
-
profileImageUpgradeIcon:
|
421
|
-
userIconWrapper:
|
422
|
-
},
|
415
|
+
), En = "_menuContainer_wbu3u_5", In = "_profileButton_wbu3u_16", jn = "_profileImage_wbu3u_29", Pn = "_profileImageHighlight_wbu3u_37", Cn = "_profileImageUpgradeIcon_wbu3u_41", Nn = "_userIconWrapper_wbu3u_47", C = {
|
416
|
+
menuContainer: En,
|
417
|
+
profileButton: In,
|
418
|
+
profileImage: jn,
|
419
|
+
profileImageHighlight: Pn,
|
420
|
+
profileImageUpgradeIcon: Cn,
|
421
|
+
userIconWrapper: Nn
|
422
|
+
}, pt = kt({}), H = () => Rt(pt), Rn = ({ children: e }) => {
|
423
423
|
const {
|
424
424
|
currentTeam: t,
|
425
425
|
otherTeams: n,
|
@@ -440,7 +440,7 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
440
440
|
"img",
|
441
441
|
{
|
442
442
|
src: t.logoUrl,
|
443
|
-
className:
|
443
|
+
className: R(C.profileImage, {
|
444
444
|
[C.profileImageHighlight]: a
|
445
445
|
}),
|
446
446
|
alt: "Team Logo"
|
@@ -448,13 +448,13 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
448
448
|
) : /* @__PURE__ */ i(
|
449
449
|
"div",
|
450
450
|
{
|
451
|
-
className:
|
451
|
+
className: R(C.userIconWrapper, "flex-row", "align-center", "items-center", {
|
452
452
|
[C.profileImageHighlight]: a
|
453
453
|
}),
|
454
|
-
children: /* @__PURE__ */ i(
|
454
|
+
children: /* @__PURE__ */ i(ct, { size: "25px" })
|
455
455
|
}
|
456
456
|
),
|
457
|
-
a && /* @__PURE__ */ i(
|
457
|
+
a && /* @__PURE__ */ i(ht, { className: C.profileImageUpgradeIcon })
|
458
458
|
] }),
|
459
459
|
children: /* @__PURE__ */ i(ve, { placement: "right-end", className: C.menuContainer, children: e({
|
460
460
|
allowTeamCreation: s,
|
@@ -468,7 +468,7 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
468
468
|
}) })
|
469
469
|
}
|
470
470
|
);
|
471
|
-
},
|
471
|
+
}, vt = 0, kn = 9999, An = [150, 151, 250, 251], Ln = [152, 153, 252, 253], On = [154, 155, 157, 158, 254, 255, 258, 354, 355, 358], qn = [156, 159, 160, 256, 259, 260], Tt = 9998, ye = (e) => e === vt, yt = (e) => e === kn, la = (e) => An.includes(e), ua = (e) => Ln.includes(e), da = (e) => On.includes(e), ma = (e) => qn.includes(e), fa = (e) => e > vt && e < Tt, _a = (e) => e === Tt, Mn = /\n/, We = (e, t, n) => e.split(t).flatMap((a, o) => o !== 0 ? [At(n, { key: Math.random().toString(32).slice(0, 10) }), a] : a), Un = (e, t, n) => typeof e == "string" ? We(e, t, n) : e.flatMap((a) => typeof a == "string" ? We(a, t, n) : a), ba = (e) => Un(e, Mn, /* @__PURE__ */ i("br", {})), xn = /(\b(https?|):\/\/[-a-zA-Zа-яА-Я0-9+&@#/%?=~_|!:,.;]*[-a-zA-Zа-яА-Я0-9+&@#/%=~_|])/gi, Bn = (e) => e.match(xn) ?? [], Qe = (e, t, n) => {
|
472
472
|
const a = e.split(t);
|
473
473
|
if (a.length === 1)
|
474
474
|
return e;
|
@@ -477,9 +477,9 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
477
477
|
/* @__PURE__ */ i("a", { href: t, target: "_blank", rel: "noreferrer noopener", children: t }, t + n)
|
478
478
|
), o.push(a.join(t)), o.filter((s) => s !== "");
|
479
479
|
}, Ye = (e) => {
|
480
|
-
const t =
|
480
|
+
const t = Bn(e);
|
481
481
|
return t != null && t.length ? t.reduce((n, a, o) => typeof n == "string" ? Qe(n, a, o) : n.flatMap((s) => typeof s == "string" ? Qe(s, a, o) : s), e) : e;
|
482
|
-
},
|
482
|
+
}, ga = (e) => typeof e == "string" ? Ye(e) : e.flatMap((t) => typeof t == "string" ? Ye(t) : t, e), ha = (e, t = "PP") => ut(e, t), pa = (e, t, n = "PP") => ut(Mt(e, t), n), va = (e) => {
|
483
483
|
U(e, []);
|
484
484
|
}, Ve = {
|
485
485
|
biller: "biller",
|
@@ -487,8 +487,8 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
487
487
|
}, Ze = [
|
488
488
|
Ve.biller,
|
489
489
|
Ve.owner
|
490
|
-
],
|
491
|
-
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: s, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((
|
490
|
+
], Hn = ({ children: e, config: t }) => {
|
491
|
+
const { teams: n, currentTeamId: a, planId: o, isEndOfTrialActive: s, isFullyAuthenticated: c, userTeamRole: u } = t, d = n.find((w) => w.id === a), l = n.filter((w) => w.id !== a), m = Ze.includes(u), b = Ze.includes(u), y = ye(o) || yt(o), S = {
|
492
492
|
...t,
|
493
493
|
currentTeam: d,
|
494
494
|
otherTeams: l,
|
@@ -499,18 +499,18 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
499
499
|
showBillingButton: c && b && m,
|
500
500
|
allowTeamCreation: c && !s
|
501
501
|
};
|
502
|
-
return /* @__PURE__ */ i(
|
503
|
-
},
|
504
|
-
container:
|
505
|
-
profileEmail:
|
506
|
-
},
|
502
|
+
return /* @__PURE__ */ i(pt.Provider, { value: S, children: e });
|
503
|
+
}, $n = ({ config: e, children: t }) => /* @__PURE__ */ i(Hn, { config: e, children: /* @__PURE__ */ i(Rn, { children: t }) }), Gn = "_container_q5pot_1", Dn = "_profileEmail_q5pot_5", Xe = {
|
504
|
+
container: Gn,
|
505
|
+
profileEmail: Dn
|
506
|
+
}, Fn = ({
|
507
507
|
href: e,
|
508
508
|
onClick: t,
|
509
509
|
userEmail: n,
|
510
510
|
hideBottomDivider: a
|
511
511
|
}) => {
|
512
512
|
const { isEndOfTrialActive: o, isTeamSuspended: s } = H();
|
513
|
-
return o || s ? null : /* @__PURE__ */ p(
|
513
|
+
return o || s ? null : /* @__PURE__ */ p(at, { children: [
|
514
514
|
/* @__PURE__ */ i(
|
515
515
|
W,
|
516
516
|
{
|
@@ -524,47 +524,47 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
524
524
|
] })
|
525
525
|
}
|
526
526
|
),
|
527
|
-
!a && /* @__PURE__ */ i(
|
527
|
+
!a && /* @__PURE__ */ i(lt, {})
|
528
528
|
] });
|
529
|
-
},
|
530
|
-
wrapper:
|
531
|
-
profileImage:
|
532
|
-
teamName:
|
533
|
-
planLabel:
|
534
|
-
membership:
|
535
|
-
defaultProfileImage:
|
536
|
-
},
|
529
|
+
}, zn = "_wrapper_15d85_1", Kn = "_profileImage_15d85_14", Jn = "_teamName_15d85_22", Wn = "_planLabel_15d85_29", Qn = "_membership_15d85_38", Yn = "_defaultProfileImage_15d85_44", k = {
|
530
|
+
wrapper: zn,
|
531
|
+
profileImage: Kn,
|
532
|
+
teamName: Jn,
|
533
|
+
planLabel: Wn,
|
534
|
+
membership: Qn,
|
535
|
+
defaultProfileImage: Yn
|
536
|
+
}, St = ({ team: e, onClick: t, hidePlanLabel: n }) => {
|
537
537
|
const { currentTeam: a, planId: o } = H(), s = e || a;
|
538
538
|
if (!s)
|
539
539
|
return null;
|
540
|
-
const c = ye(o) ? "Free" :
|
540
|
+
const c = ye(o) ? "Free" : yt(o) ? "Trial" : void 0;
|
541
541
|
return /* @__PURE__ */ p(
|
542
542
|
t ? W : "div",
|
543
543
|
{
|
544
|
-
className: `flex-row gap-2 flex-nowrap items-center ${
|
544
|
+
className: `flex-row gap-2 flex-nowrap items-center ${k.wrapper}`,
|
545
545
|
...t && { onClick: () => t(s) },
|
546
546
|
children: [
|
547
|
-
s.logoUrl ? /* @__PURE__ */ i("img", { className:
|
547
|
+
s.logoUrl ? /* @__PURE__ */ i("img", { className: k.profileImage, src: s.logoUrl, alt: "Team Logo" }) : /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${k.defaultProfileImage}`, children: /* @__PURE__ */ i(ct, { size: "25px" }) }),
|
548
548
|
/* @__PURE__ */ p("div", { className: "flex-col items-start", children: [
|
549
549
|
/* @__PURE__ */ p("div", { className: "flex-row items-center flex-nowrap gap-2", children: [
|
550
|
-
/* @__PURE__ */ i("span", { title: s.name, className:
|
551
|
-
c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${
|
550
|
+
/* @__PURE__ */ i("span", { title: s.name, className: k.teamName, children: s.name }),
|
551
|
+
c && !n && /* @__PURE__ */ i("span", { className: `flex-row justify-center items-center ${k.planLabel}`, children: c })
|
552
552
|
] }),
|
553
|
-
/* @__PURE__ */ i("span", { className:
|
553
|
+
/* @__PURE__ */ i("span", { className: k.membership, children: s.role })
|
554
554
|
] })
|
555
555
|
]
|
556
556
|
}
|
557
557
|
);
|
558
|
-
},
|
559
|
-
teamsContainer:
|
560
|
-
},
|
558
|
+
}, Vn = "_teamsContainer_1t68g_1", Zn = {
|
559
|
+
teamsContainer: Vn
|
560
|
+
}, Xn = ({ onSwitchTeam: e }) => {
|
561
561
|
const { otherTeams: t } = H();
|
562
|
-
return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${
|
563
|
-
},
|
564
|
-
container:
|
565
|
-
planCta:
|
566
|
-
upgradeIconWrapper:
|
567
|
-
},
|
562
|
+
return t.length === 0 ? null : /* @__PURE__ */ i("div", { className: `flex-col items-stretch ${Zn.teamsContainer}`, children: t.map((n) => /* @__PURE__ */ i(St, { team: n, onClick: e, hidePlanLabel: !0 }, n.id)) });
|
563
|
+
}, er = "_container_1u995_1", tr = "_planCta_1u995_15", nr = "_upgradeIconWrapper_1u995_19", fe = {
|
564
|
+
container: er,
|
565
|
+
planCta: tr,
|
566
|
+
upgradeIconWrapper: nr
|
567
|
+
}, rr = ({ upgradeOptionHref: e }) => {
|
568
568
|
const { planId: t, trialDaysLeft: n, showUpgradeCta: a } = H();
|
569
569
|
if (!a)
|
570
570
|
return null;
|
@@ -572,67 +572,67 @@ const un = "_sidebarContainer_bmdti_1", dn = {
|
|
572
572
|
return /* @__PURE__ */ p(W, { href: e, className: `flex-col gap-1 items-start ${fe.container}`, children: [
|
573
573
|
/* @__PURE__ */ i("span", { className: fe.planCta, children: c }),
|
574
574
|
/* @__PURE__ */ p("div", { className: `flex-row items-center gap-1 ${fe.upgradeIconWrapper}`, children: [
|
575
|
-
/* @__PURE__ */ i(
|
575
|
+
/* @__PURE__ */ i(ht, {}),
|
576
576
|
/* @__PURE__ */ i("span", { children: "See upgrade options" })
|
577
577
|
] })
|
578
578
|
] });
|
579
|
-
}, E = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className:
|
580
|
-
E.Top =
|
581
|
-
const
|
582
|
-
E.Bottom =
|
583
|
-
E.Avatar =
|
584
|
-
E.IconLink =
|
585
|
-
E.Menu =
|
586
|
-
E.ProfileMenu =
|
587
|
-
E.TeamSwitch =
|
588
|
-
E.TeamMenuItem =
|
589
|
-
E.UpgradeMenuItem =
|
590
|
-
E.ProfileSettingsMenuItem =
|
591
|
-
const
|
592
|
-
breadcrumbsItem:
|
593
|
-
breadcrumbs:
|
594
|
-
},
|
595
|
-
/* @__PURE__ */ i(
|
579
|
+
}, E = ({ children: e, ...t }) => /* @__PURE__ */ i("nav", { ...t, className: mn.sidebarContainer, children: e }), ar = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
580
|
+
E.Top = ar;
|
581
|
+
const or = ({ children: e }) => /* @__PURE__ */ i("div", { children: e });
|
582
|
+
E.Bottom = or;
|
583
|
+
E.Avatar = bn;
|
584
|
+
E.IconLink = pn;
|
585
|
+
E.Menu = yn;
|
586
|
+
E.ProfileMenu = $n;
|
587
|
+
E.TeamSwitch = Xn;
|
588
|
+
E.TeamMenuItem = St;
|
589
|
+
E.UpgradeMenuItem = rr;
|
590
|
+
E.ProfileSettingsMenuItem = Fn;
|
591
|
+
const ir = "_breadcrumbsItem_1hm6a_1", sr = "_breadcrumbs_1hm6a_1", et = {
|
592
|
+
breadcrumbsItem: ir,
|
593
|
+
breadcrumbs: sr
|
594
|
+
}, Ta = ({ items: e }) => /* @__PURE__ */ i("nav", { "aria-label": "breadcrumb", className: et.breadcrumbs, children: e.map((t, n) => /* @__PURE__ */ p(it, { children: [
|
595
|
+
/* @__PURE__ */ i(st, { className: et.breadcrumbsItem, href: t.link, rel: "noreferrer", children: t.name }),
|
596
596
|
n < e.length - 1 && /* @__PURE__ */ i("span", { children: " — " })
|
597
|
-
] }, `${t.link}-${t.name}`)) }),
|
598
|
-
!!n && t.some((a) => a.visible) && /* @__PURE__ */ i(
|
597
|
+
] }, `${t.link}-${t.name}`)) }), cr = ({ items: e }) => /* @__PURE__ */ i(at, { children: e.map((t, n) => /* @__PURE__ */ p(it, { children: [
|
598
|
+
!!n && t.some((a) => a.visible) && /* @__PURE__ */ i(lt, {}),
|
599
599
|
t.filter(({ visible: a }) => a).map(({ link: a, label: o, onClick: s }) => /* @__PURE__ */ i(W, { href: a || "#", "aria-label": o, onClick: s, children: o }, o))
|
600
|
-
] }, t[0].label)) }),
|
601
|
-
badge:
|
602
|
-
tag:
|
603
|
-
withNavLinkStyle:
|
604
|
-
disabled:
|
605
|
-
projectNavigationItem:
|
606
|
-
projectNavigationItemDisabled:
|
600
|
+
] }, t[0].label)) }), lr = "_badge_1pc1v_1", ur = "_tag_1pc1v_15", dr = "_withNavLinkStyle_1pc1v_42 _withLinkStyle_1pc1v_21", mr = "_disabled_1pc1v_57", fr = "_projectNavigationItem_1pc1v_61", _r = "_projectNavigationItemDisabled_1pc1v_67", N = {
|
601
|
+
badge: lr,
|
602
|
+
tag: ur,
|
603
|
+
withNavLinkStyle: dr,
|
604
|
+
disabled: mr,
|
605
|
+
projectNavigationItem: fr,
|
606
|
+
projectNavigationItemDisabled: _r
|
607
607
|
}, tt = ({ label: e, badge: t, novel: n }) => /* @__PURE__ */ p("div", { className: "flex gap-1", children: [
|
608
608
|
/* @__PURE__ */ p("div", { children: [
|
609
609
|
/* @__PURE__ */ i("span", { children: e }),
|
610
|
-
!!t && /* @__PURE__ */ i("div", { className:
|
610
|
+
!!t && /* @__PURE__ */ i("div", { className: N.badge, "aria-label": `${t} items requiring attention`, children: t > 9 ? "9+" : t })
|
611
611
|
] }),
|
612
|
-
!!n && /* @__PURE__ */ i(
|
613
|
-
] }), _e =
|
612
|
+
!!n && /* @__PURE__ */ i(qt, { className: N.tag, children: n })
|
613
|
+
] }), _e = Lt(
|
614
614
|
({ label: e, href: t = "", disabled: n = !1, badge: a, onClick: o, novel: s }, c) => /* @__PURE__ */ i(he, { tooltip: "You do not have access to this function", show: n, children: /* @__PURE__ */ i(
|
615
615
|
"div",
|
616
616
|
{
|
617
|
-
className: n ?
|
617
|
+
className: n ? N.projectNavigationItemDisabled : N.projectNavigationItem,
|
618
618
|
children: o || n || !t ? /* @__PURE__ */ i(
|
619
619
|
"button",
|
620
620
|
{
|
621
621
|
type: "button",
|
622
622
|
ref: c,
|
623
|
-
className: N
|
624
|
-
[
|
623
|
+
className: R(N.withNavLinkStyle, {
|
624
|
+
[N.disabled]: n
|
625
625
|
}),
|
626
626
|
disabled: n,
|
627
627
|
onClick: o,
|
628
628
|
children: /* @__PURE__ */ i(tt, { label: e, badge: a, novel: s })
|
629
629
|
}
|
630
|
-
) : /* @__PURE__ */ i("a", { href: t, className:
|
630
|
+
) : /* @__PURE__ */ i("a", { href: t, className: N.withNavLinkStyle, children: /* @__PURE__ */ i(tt, { label: e, badge: a, novel: s }) })
|
631
631
|
}
|
632
632
|
) })
|
633
633
|
);
|
634
634
|
_e.displayName = "NavigationTabsItem";
|
635
|
-
const
|
635
|
+
const br = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible))) ?? !1, gr = (e) => e.visible && (!e.dropdown || br(e.dropdown)), ya = ({ navigation: e, activeItem: t }) => /* @__PURE__ */ i("nav", { "aria-label": "Project", children: /* @__PURE__ */ i("ul", { className: A.navigationTabList, "aria-orientation": "horizontal", children: e.filter(gr).map((n) => {
|
636
636
|
var a, o, s;
|
637
637
|
return n.dropdown ? /* @__PURE__ */ i(
|
638
638
|
"li",
|
@@ -644,7 +644,7 @@ const _r = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
644
644
|
pe,
|
645
645
|
{
|
646
646
|
menuButton: ({ opened: c }) => /* @__PURE__ */ i(_e, { label: n.label, disabled: n.disabled, active: c }),
|
647
|
-
children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(
|
647
|
+
children: /* @__PURE__ */ i(ve, { children: /* @__PURE__ */ i(cr, { items: n.dropdown }) })
|
648
648
|
}
|
649
649
|
)
|
650
650
|
},
|
@@ -670,26 +670,26 @@ const _r = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
670
670
|
},
|
671
671
|
n.key
|
672
672
|
);
|
673
|
-
}) }) }),
|
673
|
+
}) }) }), hr = r.object({
|
674
674
|
accessToken: r.string(),
|
675
675
|
refreshToken: r.string()
|
676
|
-
}),
|
676
|
+
}), pr = r.union([
|
677
677
|
r.object({ Authorization: r.string().startsWith("Bearer ") }),
|
678
678
|
r.object({ "x-csrf-token": r.string() })
|
679
|
-
]),
|
679
|
+
]), Se = dt({
|
680
680
|
description: "Takes a teamId and returns a JWT token access and refresh token for the user",
|
681
681
|
method: "post",
|
682
682
|
requestPathParamsSchema: r.object({ teamId: r.number() }),
|
683
683
|
pathResolver: (e) => `/team/${e.teamId}/actions/get-user-token`,
|
684
|
-
requestHeaderSchema:
|
684
|
+
requestHeaderSchema: pr,
|
685
685
|
requestBodySchema: r.undefined(),
|
686
|
-
successResponseBodySchema:
|
687
|
-
}),
|
686
|
+
successResponseBodySchema: hr
|
687
|
+
}), vr = {
|
688
688
|
teamKeyCsrf: (e, t) => ["getUserToken", "x-csrf-token", t, e],
|
689
689
|
teamKeyJwt: (e, t) => ["getUserToken", "Authorization", `Bearer ${t}`, e]
|
690
|
-
},
|
690
|
+
}, Tr = (e, t) => O({
|
691
691
|
...t,
|
692
|
-
queryFn: ({ queryKey: [n, a, o, s] }) => Q(e,
|
692
|
+
queryFn: ({ queryKey: [n, a, o, s] }) => Q(e, Se, {
|
693
693
|
pathParams: { teamId: s },
|
694
694
|
headers: a === "x-csrf-token" ? { "x-csrf-token": o } : { Authorization: o }
|
695
695
|
})
|
@@ -698,7 +698,7 @@ const _r = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
698
698
|
r.literal("admin"),
|
699
699
|
r.literal("biller"),
|
700
700
|
r.literal("member")
|
701
|
-
]),
|
701
|
+
]), yr = r.object({
|
702
702
|
userId: r.number(),
|
703
703
|
userUuid: r.string(),
|
704
704
|
teamId: r.number(),
|
@@ -715,7 +715,7 @@ const _r = (e) => (e == null ? void 0 : e.some((t) => t.some((n) => n.visible)))
|
|
715
715
|
function Y(e) {
|
716
716
|
try {
|
717
717
|
const t = e.split(".")[1], n = atob(t);
|
718
|
-
return
|
718
|
+
return yr.parse(JSON.parse(n));
|
719
719
|
} catch {
|
720
720
|
return;
|
721
721
|
}
|
@@ -727,41 +727,41 @@ const J = class J extends CustomEvent {
|
|
727
727
|
});
|
728
728
|
}
|
729
729
|
};
|
730
|
-
|
730
|
+
Ne(J, "eventName", "new-jwt-issued");
|
731
731
|
let L = J;
|
732
|
-
function
|
732
|
+
function we() {
|
733
733
|
const e = be(document.cookie, "accessToken"), t = be(document.cookie, "refreshToken");
|
734
734
|
if (!(!e || !t))
|
735
735
|
return { accessToken: e, refreshToken: t };
|
736
736
|
}
|
737
|
-
function
|
737
|
+
function Et() {
|
738
738
|
return be(document.cookie, "csrf_token");
|
739
739
|
}
|
740
740
|
function be(e, t) {
|
741
741
|
var n, a;
|
742
742
|
return (a = (n = e.split(";").find((o) => o.trim().startsWith(`${t}=`))) == null ? void 0 : n.trim()) == null ? void 0 : a.substring(t.length + 1);
|
743
743
|
}
|
744
|
-
function
|
745
|
-
const n =
|
746
|
-
queryKey:
|
744
|
+
function Sa(e, t) {
|
745
|
+
const n = Et(), a = Tr(e, {
|
746
|
+
queryKey: vr.teamKeyCsrf(t, n ?? ""),
|
747
747
|
enabled: n !== void 0
|
748
|
-
}), o =
|
748
|
+
}), o = ot();
|
749
749
|
return U(() => {
|
750
750
|
a.data && a.data.accessToken !== o.current && (window.dispatchEvent(new L(a.data)), o.current = a.data.accessToken);
|
751
751
|
}, [a.data]), a;
|
752
752
|
}
|
753
|
-
function
|
753
|
+
function It() {
|
754
754
|
const [e, t] = ge();
|
755
755
|
return U(() => {
|
756
756
|
const n = (o) => {
|
757
757
|
t(o.detail.payload);
|
758
|
-
}, a =
|
758
|
+
}, a = we();
|
759
759
|
return t(a && Y(a.accessToken)), window.addEventListener(L.eventName, n), () => {
|
760
760
|
window.removeEventListener(L.eventName, n);
|
761
761
|
};
|
762
762
|
}, []), e;
|
763
763
|
}
|
764
|
-
const
|
764
|
+
const Sr = r.object({
|
765
765
|
user_id: r.number(),
|
766
766
|
email: r.string().email(),
|
767
767
|
fullname: r.string(),
|
@@ -770,72 +770,72 @@ const yr = r.object({
|
|
770
770
|
role: wt
|
771
771
|
}), wr = r.object({
|
772
772
|
team_id: r.number(),
|
773
|
-
team_user:
|
774
|
-
}),
|
773
|
+
team_user: Sr
|
774
|
+
}), Er = B({
|
775
775
|
description: "Get the details of a team user",
|
776
776
|
requestPathParamsSchema: r.object({ teamId: r.number(), userId: r.number() }),
|
777
777
|
pathResolver: ({ teamId: e, userId: t }) => `/teams/${e}/users/${t}`,
|
778
778
|
successResponseBodySchema: wr
|
779
|
-
}),
|
779
|
+
}), Ir = {
|
780
780
|
teamUserKey: (e, t) => ["GetTeamUsers", e, t]
|
781
|
-
},
|
781
|
+
}, jr = (e, t) => O({
|
782
782
|
...t,
|
783
|
-
queryFn: ({ queryKey: [n, a, o] }) => x(e,
|
783
|
+
queryFn: ({ queryKey: [n, a, o] }) => x(e, Er, { pathParams: { teamId: a, userId: o } })
|
784
784
|
});
|
785
785
|
function wa(e) {
|
786
|
-
const t =
|
787
|
-
return
|
788
|
-
queryKey:
|
786
|
+
const t = It();
|
787
|
+
return jr(e, {
|
788
|
+
queryKey: Ir.teamUserKey((t == null ? void 0 : t.teamId) ?? 0, (t == null ? void 0 : t.userId) ?? 0),
|
789
789
|
enabled: (t == null ? void 0 : t.userId) !== void 0 && t.teamId !== void 0
|
790
790
|
});
|
791
791
|
}
|
792
|
-
const
|
792
|
+
const Pr = r.object({
|
793
793
|
lang_id: r.number(),
|
794
794
|
lang_iso: r.string(),
|
795
795
|
lang_name: r.string(),
|
796
796
|
is_writable: r.union([r.literal(0), r.literal(1)])
|
797
|
-
}),
|
797
|
+
}), Cr = r.object({
|
798
798
|
user_id: r.number(),
|
799
799
|
email: r.string().email(),
|
800
800
|
fullname: r.string(),
|
801
801
|
created_at: r.string(),
|
802
802
|
created_at_timestamp: r.number(),
|
803
803
|
admin_rights: r.array(r.string()),
|
804
|
-
languages: r.array(
|
804
|
+
languages: r.array(Pr),
|
805
805
|
is_admin: r.boolean(),
|
806
806
|
is_reviewer: r.boolean()
|
807
|
-
}),
|
807
|
+
}), Nr = r.object({
|
808
808
|
project_id: r.string(),
|
809
|
-
contributors: r.array(
|
810
|
-
}),
|
809
|
+
contributors: r.array(Cr)
|
810
|
+
}), Rr = B({
|
811
811
|
description: "Get the details of a project contributor",
|
812
812
|
requestPathParamsSchema: r.object({ projectId: r.string(), contributorId: r.number() }),
|
813
813
|
pathResolver: ({ projectId: e, contributorId: t }) => `/projects/${e}/contributors/${t}`,
|
814
|
-
successResponseBodySchema:
|
815
|
-
}),
|
814
|
+
successResponseBodySchema: Nr
|
815
|
+
}), kr = {
|
816
816
|
projectUserKey: (e, t) => ["RetrieveContributor", e, t]
|
817
|
-
},
|
817
|
+
}, Ar = (e, t) => O({
|
818
818
|
...t,
|
819
|
-
queryFn: ({ queryKey: [n, a, o] }) => x(e,
|
819
|
+
queryFn: ({ queryKey: [n, a, o] }) => x(e, Rr, {
|
820
820
|
pathParams: { projectId: a, contributorId: o }
|
821
821
|
})
|
822
822
|
});
|
823
|
-
function
|
824
|
-
const n =
|
825
|
-
return
|
826
|
-
queryKey:
|
823
|
+
function Ea(e, t) {
|
824
|
+
const n = It();
|
825
|
+
return Ar(e, {
|
826
|
+
queryKey: kr.projectUserKey(t, (n == null ? void 0 : n.userId) ?? 0),
|
827
827
|
enabled: n !== void 0
|
828
828
|
});
|
829
829
|
}
|
830
|
-
function
|
831
|
-
const e =
|
830
|
+
function Ia() {
|
831
|
+
const e = we();
|
832
832
|
if (!e)
|
833
833
|
return;
|
834
834
|
const t = Y(e.accessToken);
|
835
835
|
if (t)
|
836
836
|
return { ...e, payload: t };
|
837
837
|
}
|
838
|
-
function
|
838
|
+
function ja() {
|
839
839
|
return (e) => (t, n) => e(t, {
|
840
840
|
...n,
|
841
841
|
headers: {
|
@@ -848,7 +848,7 @@ function Ia() {
|
|
848
848
|
function F(e) {
|
849
849
|
return { Authorization: `Bearer ${e}` };
|
850
850
|
}
|
851
|
-
function
|
851
|
+
function Lr(e, t) {
|
852
852
|
return (n) => async (a, o) => {
|
853
853
|
var u;
|
854
854
|
const s = await t.getCachedJwtToken();
|
@@ -862,7 +862,7 @@ function Ar(e, t) {
|
|
862
862
|
const d = Y(s.accessToken);
|
863
863
|
if (!d)
|
864
864
|
return c;
|
865
|
-
const l = await Q(e,
|
865
|
+
const l = await Q(e, Se, {
|
866
866
|
pathParams: { teamId: d.teamId },
|
867
867
|
headers: F(s.refreshToken)
|
868
868
|
});
|
@@ -874,14 +874,14 @@ function Ar(e, t) {
|
|
874
874
|
return c;
|
875
875
|
};
|
876
876
|
}
|
877
|
-
const
|
877
|
+
const Or = {
|
878
878
|
wretch: {
|
879
879
|
lokaliseAuth(e) {
|
880
|
-
return this.middlewares([
|
880
|
+
return this.middlewares([Lr(this, e)]);
|
881
881
|
}
|
882
882
|
}
|
883
883
|
};
|
884
|
-
function
|
884
|
+
function qr(e, t) {
|
885
885
|
return (n) => async (a, o) => {
|
886
886
|
var d;
|
887
887
|
if (await t.getCachedJwtToken() !== void 0)
|
@@ -889,7 +889,7 @@ function Or(e, t) {
|
|
889
889
|
const c = await t.getCsrfToken();
|
890
890
|
if (c === void 0)
|
891
891
|
return n(a, o);
|
892
|
-
const u = await Q(e,
|
892
|
+
const u = await Q(e, Se, {
|
893
893
|
pathParams: { teamId: await t.getTeamId() },
|
894
894
|
headers: { "x-csrf-token": c }
|
895
895
|
});
|
@@ -899,52 +899,52 @@ function Or(e, t) {
|
|
899
899
|
});
|
900
900
|
};
|
901
901
|
}
|
902
|
-
const
|
902
|
+
const Pa = {
|
903
903
|
wretch: {
|
904
904
|
lokaliseAuth(e = {}) {
|
905
|
-
return this.addon(
|
905
|
+
return this.addon(Or).lokaliseAuth(nt(e));
|
906
906
|
},
|
907
907
|
promoteClassicSession(e) {
|
908
908
|
const t = nt(e);
|
909
|
-
return this.middlewares([
|
909
|
+
return this.middlewares([qr(this, t)]);
|
910
910
|
}
|
911
911
|
}
|
912
912
|
};
|
913
913
|
function nt(e) {
|
914
914
|
return {
|
915
915
|
...e,
|
916
|
-
getCachedJwtToken: e.getCachedJwtToken ?? (async () =>
|
917
|
-
getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : async () =>
|
916
|
+
getCachedJwtToken: e.getCachedJwtToken ?? (async () => we()),
|
917
|
+
getCsrfToken: "getCsrfToken" in e ? e.getCsrfToken : async () => Et(),
|
918
918
|
onNewJwtTokenIssued: (t) => {
|
919
919
|
var n;
|
920
920
|
return window.dispatchEvent(new L(t)), ((n = e.onNewJwtTokenIssued) == null ? void 0 : n.call(e, t)) ?? Promise.resolve();
|
921
921
|
}
|
922
922
|
};
|
923
923
|
}
|
924
|
-
const
|
924
|
+
const Mr = r.object({
|
925
925
|
lang_iso: r.string(),
|
926
926
|
custom_iso: r.string().optional()
|
927
|
-
}),
|
927
|
+
}), Ur = r.object({
|
928
928
|
language_id: r.number(),
|
929
929
|
language_iso: r.string(),
|
930
930
|
progress: r.number(),
|
931
931
|
words_to_do: r.number()
|
932
|
-
}), Ur = r.object({
|
933
|
-
projectId: r.string()
|
934
932
|
}), xr = r.object({
|
933
|
+
projectId: r.string()
|
934
|
+
}), Br = r.object({
|
935
935
|
lang_id: r.number(),
|
936
936
|
lang_iso: r.string(),
|
937
937
|
lang_name: r.string(),
|
938
938
|
is_rtl: r.boolean(),
|
939
939
|
plural_forms: r.array(r.string().optional())
|
940
|
-
}),
|
940
|
+
}), Hr = r.object({
|
941
941
|
projectId: r.string(),
|
942
|
-
languages: r.array(
|
942
|
+
languages: r.array(Br)
|
943
943
|
}), Ee = r.union([
|
944
944
|
r.literal("localization_files"),
|
945
945
|
r.literal("paged_documents"),
|
946
946
|
r.literal("marketing")
|
947
|
-
]),
|
947
|
+
]), $r = r.object({
|
948
948
|
per_platform_key_names: r.boolean(),
|
949
949
|
reviewing: r.boolean(),
|
950
950
|
auto_toggle_unverified: r.boolean(),
|
@@ -955,7 +955,7 @@ const qr = r.object({
|
|
955
955
|
custom_translation_statuses_allow_multiple: r.boolean(),
|
956
956
|
segmentation: r.boolean(),
|
957
957
|
contributor_preview_download_enabled: r.boolean()
|
958
|
-
}),
|
958
|
+
}), Gr = r.object({
|
959
959
|
not_reviewed: r.number(),
|
960
960
|
unverified: r.number(),
|
961
961
|
spelling_grammar: r.number(),
|
@@ -972,14 +972,14 @@ const qr = r.object({
|
|
972
972
|
double_space: r.number(),
|
973
973
|
special_placeholder: r.number(),
|
974
974
|
unbalanced_brackets: r.number()
|
975
|
-
}),
|
975
|
+
}), Dr = r.object({
|
976
976
|
progress_total: r.number(),
|
977
977
|
keys_total: r.number(),
|
978
978
|
team: r.number(),
|
979
979
|
base_words: r.number(),
|
980
980
|
qa_issues_total: r.number(),
|
981
|
-
qa_issues:
|
982
|
-
languages: r.array(
|
981
|
+
qa_issues: Gr,
|
982
|
+
languages: r.array(Ur)
|
983
983
|
}), K = r.object({
|
984
984
|
project_id: r.string(),
|
985
985
|
uuid: r.string().uuid(),
|
@@ -993,143 +993,143 @@ const qr = r.object({
|
|
993
993
|
team_id: r.number(),
|
994
994
|
base_language_id: r.number(),
|
995
995
|
base_language_iso: r.string(),
|
996
|
-
settings:
|
997
|
-
statistics:
|
998
|
-
}),
|
996
|
+
settings: $r,
|
997
|
+
statistics: Dr
|
998
|
+
}), Fr = r.object({
|
999
999
|
name: r.string(),
|
1000
1000
|
team_id: r.string(),
|
1001
1001
|
base_lang_iso: r.string(),
|
1002
|
-
languages: r.array(
|
1002
|
+
languages: r.array(Mr),
|
1003
1003
|
project_type: Ee,
|
1004
1004
|
is_segmentation_enabled: r.boolean()
|
1005
|
-
}),
|
1005
|
+
}), rt = r.union([r.literal(0), r.literal(1)]), zr = r.object({
|
1006
1006
|
project_type: Ee.optional(),
|
1007
1007
|
filter_team_id: r.number().optional(),
|
1008
1008
|
filter_names: r.string().optional(),
|
1009
|
-
include_statistics:
|
1010
|
-
include_settings:
|
1009
|
+
include_statistics: rt.optional(),
|
1010
|
+
include_settings: rt.optional(),
|
1011
1011
|
limit: r.number().optional(),
|
1012
1012
|
page: r.number().optional()
|
1013
|
-
}),
|
1013
|
+
}), Kr = r.array(
|
1014
1014
|
K.omit({ statistics: !0, settings: !0 }).and(
|
1015
1015
|
K.pick({ settings: !0, statistics: !0 }).partial()
|
1016
1016
|
)
|
1017
|
-
),
|
1017
|
+
), Jr = r.object({
|
1018
1018
|
project_id: r.string()
|
1019
|
-
}), Ie = () => "/projects",
|
1019
|
+
}), Ie = () => "/projects", Wr = dt({
|
1020
1020
|
description: "Create a new project",
|
1021
1021
|
method: "post",
|
1022
1022
|
pathResolver: Ie,
|
1023
|
-
requestBodySchema:
|
1023
|
+
requestBodySchema: Fr,
|
1024
1024
|
successResponseBodySchema: K
|
1025
|
-
}),
|
1025
|
+
}), Qr = B({
|
1026
1026
|
description: "List all projects",
|
1027
1027
|
pathResolver: Ie,
|
1028
|
-
requestQuerySchema:
|
1029
|
-
successResponseBodySchema:
|
1030
|
-
}),
|
1028
|
+
requestQuerySchema: zr,
|
1029
|
+
successResponseBodySchema: Kr
|
1030
|
+
}), Yr = B({
|
1031
1031
|
description: "Retrieve a project",
|
1032
1032
|
pathResolver: Ie,
|
1033
|
-
requestQuerySchema:
|
1033
|
+
requestQuerySchema: Jr,
|
1034
1034
|
successResponseBodySchema: K
|
1035
1035
|
});
|
1036
|
-
function
|
1037
|
-
return
|
1036
|
+
function Ca(e, t = {}) {
|
1037
|
+
return Ut({
|
1038
1038
|
...t,
|
1039
|
-
mutationFn: (n) => Q(e,
|
1039
|
+
mutationFn: (n) => Q(e, Wr, {
|
1040
1040
|
body: n
|
1041
1041
|
})
|
1042
1042
|
});
|
1043
1043
|
}
|
1044
|
-
const
|
1044
|
+
const Vr = B({
|
1045
1045
|
description: "List of project languages",
|
1046
|
-
requestPathParamsSchema:
|
1046
|
+
requestPathParamsSchema: xr,
|
1047
1047
|
pathResolver: ({ projectId: e }) => `/projects/${e}/languages`,
|
1048
|
-
successResponseBodySchema:
|
1049
|
-
}),
|
1048
|
+
successResponseBodySchema: Hr
|
1049
|
+
}), Na = {
|
1050
1050
|
projectIdKey: (e) => ["listProjectLanguages", e]
|
1051
1051
|
};
|
1052
|
-
function
|
1052
|
+
function Ra(e, t) {
|
1053
1053
|
return O({
|
1054
1054
|
...t,
|
1055
|
-
queryFn: ({ queryKey: [n, a] }) => x(e,
|
1055
|
+
queryFn: ({ queryKey: [n, a] }) => x(e, Vr, {
|
1056
1056
|
pathParams: { projectId: a }
|
1057
1057
|
})
|
1058
1058
|
});
|
1059
1059
|
}
|
1060
|
-
const
|
1060
|
+
const ka = {
|
1061
1061
|
paramsKey: (e) => ["listProjects", e]
|
1062
1062
|
};
|
1063
|
-
function
|
1063
|
+
function Aa(e, t) {
|
1064
1064
|
return O({
|
1065
1065
|
...t,
|
1066
|
-
queryFn: ({ queryKey: [n, a] }) => x(e,
|
1066
|
+
queryFn: ({ queryKey: [n, a] }) => x(e, Qr, {
|
1067
1067
|
queryParams: a
|
1068
1068
|
})
|
1069
1069
|
});
|
1070
1070
|
}
|
1071
|
-
const
|
1071
|
+
const La = {
|
1072
1072
|
projectIdKey: (e) => ["retrieveProject", e]
|
1073
1073
|
};
|
1074
|
-
function
|
1074
|
+
function Oa(e, t) {
|
1075
1075
|
return O({
|
1076
1076
|
...t,
|
1077
|
-
queryFn: ({ queryKey: [n, a] }) => x(e,
|
1077
|
+
queryFn: ({ queryKey: [n, a] }) => x(e, Yr, {
|
1078
1078
|
queryParams: { project_id: a }
|
1079
1079
|
})
|
1080
1080
|
});
|
1081
1081
|
}
|
1082
1082
|
export {
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
|
1087
|
-
|
1088
|
-
|
1089
|
-
|
1083
|
+
Ta as Breadcrumbs,
|
1084
|
+
Tt as ENTERPRISE_OPENSOURCE_PLAN_ID,
|
1085
|
+
qn as ENTERPRISE_PLAN_IDS,
|
1086
|
+
Ln as ESSENTIAL_PLAN_IDS,
|
1087
|
+
vt as FREE_PLAN_ID,
|
1088
|
+
Or as LokaliseAuthAddon,
|
1089
|
+
Pa as LokaliseAuthBrowserAddon,
|
1090
1090
|
z as NavigationPanel,
|
1091
|
-
|
1092
|
-
|
1093
|
-
|
1091
|
+
ya as NavigationTabs,
|
1092
|
+
On as PRO_PLAN_IDS,
|
1093
|
+
An as START_PLAN_IDS,
|
1094
1094
|
E as Sidebar,
|
1095
|
-
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
|
1106
|
-
|
1107
|
-
|
1095
|
+
kn as TRIAL_PLAN_ID,
|
1096
|
+
ba as convertNewLineToBreakTag,
|
1097
|
+
Wr as createProject,
|
1098
|
+
ha as formatDate,
|
1099
|
+
pa as formatDateTz,
|
1100
|
+
Ia as getAuthenticatedSessionDetailFromRequest,
|
1101
|
+
Er as getTeamUser,
|
1102
|
+
Ir as getTeamUsersQueryKey,
|
1103
|
+
Se as getUserToken,
|
1104
|
+
vr as getUserTokenKey,
|
1105
|
+
_a as isEnterpriseOpenSourcePlan,
|
1106
|
+
ma as isEnterprisePlan,
|
1107
|
+
ua as isEssentialPlan,
|
1108
1108
|
ye as isFreePlan,
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1109
|
+
fa as isPaidPlan,
|
1110
|
+
da as isProPlan,
|
1111
|
+
la as isStartPlan,
|
1112
|
+
yt as isTrialPlan,
|
1113
|
+
Na as listProjectLanguagesKey,
|
1114
|
+
Qr as listProjects,
|
1115
|
+
ka as listProjectsKey,
|
1116
|
+
ga as makeUrlClickable,
|
1117
1117
|
Y as parseJwtTokenPayload,
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1118
|
+
ja as publicApiHeadersMiddleware,
|
1119
|
+
Rr as retrieveContributor,
|
1120
|
+
kr as retrieveContributorKeys,
|
1121
|
+
Yr as retrieveProject,
|
1122
|
+
La as retrieveProjectQueryKey,
|
1123
|
+
Ea as useAuthenticatedProjectContributor,
|
1124
|
+
It as useAuthenticatedSessionPayload,
|
1125
1125
|
wa as useAuthenticatedUser,
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1126
|
+
Ca as useCreateProjectMutation,
|
1127
|
+
va as useEffectOnce,
|
1128
|
+
Sa as useGetPromotedClassicSessionJwtQuery,
|
1129
|
+
jr as useGetTeamUsersQuery,
|
1130
|
+
Tr as useGetUserTokenQuery,
|
1131
|
+
Ra as useListProjectLanguagesQuery,
|
1132
|
+
Aa as useListProjectsQuery,
|
1133
|
+
Ar as useRetrieveContributorQuery,
|
1134
|
+
Oa as useRetrieveProjectQuery
|
1135
1135
|
};
|