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