@lokalise/harmony 2.0.4 → 2.0.6
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 +3 -3
- package/dist/harmony102.cjs +1 -1
- package/dist/harmony102.mjs +1 -1
- package/dist/harmony103.cjs +7 -7
- package/dist/harmony103.mjs +7 -7
- package/dist/harmony105.cjs +2 -2
- package/dist/harmony105.mjs +2 -2
- package/dist/harmony106.cjs +2 -165
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +3 -166
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +16 -42
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +16 -42
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +75 -13
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +75 -13
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +10 -10
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +10 -10
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +35 -13
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +34 -12
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +9 -3
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +9 -3
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +41 -12
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +43 -14
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +9 -76
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +8 -75
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +10 -10
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +10 -10
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +13 -35
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +12 -34
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +10 -8
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +11 -9
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +21 -47
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +20 -46
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +166 -9
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +165 -8
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +44 -11
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +44 -11
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +14 -21
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +13 -20
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +98 -6
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +82 -7
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony122.cjs +6 -16
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +7 -17
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +16 -7
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +16 -7
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +3 -3
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +3 -3
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +7 -14
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +7 -14
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +15 -20
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +15 -20
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +20 -87
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +20 -87
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony128.cjs +10 -31
- package/dist/harmony128.cjs.map +1 -1
- package/dist/harmony128.mjs +9 -30
- package/dist/harmony128.mjs.map +1 -1
- package/dist/harmony129.cjs +11 -98
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +11 -81
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +15 -9
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +14 -8
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +13 -6
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +15 -8
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony132.cjs +7 -12
- package/dist/harmony132.cjs.map +1 -1
- package/dist/harmony132.mjs +9 -14
- package/dist/harmony132.mjs.map +1 -1
- package/dist/harmony133.cjs +20 -13
- package/dist/harmony133.cjs.map +1 -1
- package/dist/harmony133.mjs +22 -15
- package/dist/harmony133.mjs.map +1 -1
- package/dist/harmony134.cjs +9 -7
- package/dist/harmony134.cjs.map +1 -1
- package/dist/harmony134.mjs +11 -9
- package/dist/harmony134.mjs.map +1 -1
- package/dist/harmony135.cjs +30 -18
- package/dist/harmony135.cjs.map +1 -1
- package/dist/harmony135.mjs +32 -20
- package/dist/harmony135.mjs.map +1 -1
- package/dist/harmony136.cjs +6 -6
- package/dist/harmony136.cjs.map +1 -1
- package/dist/harmony136.mjs +6 -6
- package/dist/harmony136.mjs.map +1 -1
- package/dist/harmony137.cjs +13 -29
- package/dist/harmony137.cjs.map +1 -1
- package/dist/harmony137.mjs +14 -30
- package/dist/harmony137.mjs.map +1 -1
- package/dist/harmony138.cjs +31 -7
- package/dist/harmony138.cjs.map +1 -1
- package/dist/harmony138.mjs +32 -8
- package/dist/harmony138.mjs.map +1 -1
- package/dist/harmony139.cjs +21 -22
- package/dist/harmony139.cjs.map +1 -1
- package/dist/harmony139.mjs +20 -21
- package/dist/harmony139.mjs.map +1 -1
- package/dist/harmony140.cjs +15 -30
- package/dist/harmony140.cjs.map +1 -1
- package/dist/harmony140.mjs +17 -32
- package/dist/harmony140.mjs.map +1 -1
- package/dist/harmony141.cjs +3 -18
- package/dist/harmony141.cjs.map +1 -1
- package/dist/harmony141.mjs +3 -18
- package/dist/harmony141.mjs.map +1 -1
- package/dist/harmony142.cjs +15 -21
- package/dist/harmony142.cjs.map +1 -1
- package/dist/harmony142.mjs +14 -20
- package/dist/harmony142.mjs.map +1 -1
- package/dist/harmony143.cjs +87 -6
- package/dist/harmony143.cjs.map +1 -1
- package/dist/harmony143.mjs +86 -5
- package/dist/harmony143.mjs.map +1 -1
- package/dist/harmony144.cjs +31 -16
- package/dist/harmony144.cjs.map +1 -1
- package/dist/harmony144.mjs +30 -15
- package/dist/harmony144.mjs.map +1 -1
- package/dist/harmony145.cjs +6 -4
- package/dist/harmony145.cjs.map +1 -1
- package/dist/harmony145.mjs +5 -3
- package/dist/harmony145.mjs.map +1 -1
- package/dist/harmony146.cjs +6 -4
- package/dist/harmony146.cjs.map +1 -1
- package/dist/harmony146.mjs +5 -3
- package/dist/harmony146.mjs.map +1 -1
- package/dist/harmony147.cjs +3 -3
- package/dist/harmony147.cjs.map +1 -1
- package/dist/harmony147.mjs +3 -3
- package/dist/harmony147.mjs.map +1 -1
- package/dist/harmony148.cjs +3 -14
- package/dist/harmony148.cjs.map +1 -1
- package/dist/harmony148.mjs +3 -14
- package/dist/harmony148.mjs.map +1 -1
- package/dist/harmony149.cjs +3 -14
- package/dist/harmony149.cjs.map +1 -1
- package/dist/harmony149.mjs +3 -14
- package/dist/harmony149.mjs.map +1 -1
- package/dist/harmony150.cjs +14 -3
- package/dist/harmony150.cjs.map +1 -1
- package/dist/harmony150.mjs +14 -3
- package/dist/harmony150.mjs.map +1 -1
- package/dist/harmony151.cjs +15 -6
- package/dist/harmony151.cjs.map +1 -1
- package/dist/harmony151.mjs +14 -5
- package/dist/harmony151.mjs.map +1 -1
- package/dist/harmony152.cjs +4 -6
- package/dist/harmony152.cjs.map +1 -1
- package/dist/harmony152.mjs +3 -5
- package/dist/harmony152.mjs.map +1 -1
- package/dist/harmony153.cjs +96 -10
- package/dist/harmony153.cjs.map +1 -1
- package/dist/harmony153.mjs +96 -10
- package/dist/harmony153.mjs.map +1 -1
- package/dist/harmony154.cjs +14 -10
- package/dist/harmony154.cjs.map +1 -1
- package/dist/harmony154.mjs +13 -9
- package/dist/harmony154.mjs.map +1 -1
- package/dist/harmony155.cjs +15 -7
- package/dist/harmony155.cjs.map +1 -1
- package/dist/harmony155.mjs +14 -6
- package/dist/harmony155.mjs.map +1 -1
- package/dist/harmony156.cjs +37 -10
- package/dist/harmony156.cjs.map +1 -1
- package/dist/harmony156.mjs +36 -9
- package/dist/harmony156.mjs.map +1 -1
- package/dist/harmony157.cjs +29 -25
- package/dist/harmony157.cjs.map +1 -1
- package/dist/harmony157.mjs +28 -24
- package/dist/harmony157.mjs.map +1 -1
- package/dist/harmony158.cjs +6 -3
- package/dist/harmony158.cjs.map +1 -1
- package/dist/harmony158.mjs +6 -3
- package/dist/harmony158.mjs.map +1 -1
- package/dist/harmony159.cjs +3 -9
- package/dist/harmony159.cjs.map +1 -1
- package/dist/harmony159.mjs +3 -9
- package/dist/harmony159.mjs.map +1 -1
- package/dist/harmony160.cjs +6 -3
- package/dist/harmony160.cjs.map +1 -1
- package/dist/harmony160.mjs +6 -3
- package/dist/harmony160.mjs.map +1 -1
- package/dist/harmony161.cjs +24 -32
- package/dist/harmony161.cjs.map +1 -1
- package/dist/harmony161.mjs +23 -31
- package/dist/harmony161.mjs.map +1 -1
- package/dist/harmony162.cjs +7 -97
- package/dist/harmony162.cjs.map +1 -1
- package/dist/harmony162.mjs +6 -96
- package/dist/harmony162.mjs.map +1 -1
- package/dist/harmony163.cjs +13 -14
- package/dist/harmony163.cjs.map +1 -1
- package/dist/harmony163.mjs +12 -13
- package/dist/harmony163.mjs.map +1 -1
- package/dist/harmony164.cjs +7 -15
- package/dist/harmony164.cjs.map +1 -1
- package/dist/harmony164.mjs +6 -14
- package/dist/harmony164.mjs.map +1 -1
- package/dist/harmony165.cjs +10 -36
- package/dist/harmony165.cjs.map +1 -1
- package/dist/harmony165.mjs +10 -36
- package/dist/harmony165.mjs.map +1 -1
- package/dist/harmony166.cjs +31 -27
- package/dist/harmony166.cjs.map +1 -1
- package/dist/harmony166.mjs +31 -27
- package/dist/harmony166.mjs.map +1 -1
- package/dist/harmony167.cjs +1 -1
- package/dist/harmony167.mjs +1 -1
- package/dist/harmony168.cjs +1 -1
- package/dist/harmony168.mjs +1 -1
- package/dist/harmony169.cjs +2 -2
- package/dist/harmony169.mjs +2 -2
- package/dist/harmony17.cjs +1 -1
- package/dist/harmony17.mjs +1 -1
- package/dist/harmony170.cjs +11 -4
- package/dist/harmony170.cjs.map +1 -1
- package/dist/harmony170.mjs +11 -4
- package/dist/harmony170.mjs.map +1 -1
- package/dist/harmony171.cjs +15 -10
- package/dist/harmony171.cjs.map +1 -1
- package/dist/harmony171.mjs +15 -10
- package/dist/harmony171.mjs.map +1 -1
- package/dist/harmony172.cjs +18 -13
- package/dist/harmony172.cjs.map +1 -1
- package/dist/harmony172.mjs +18 -13
- package/dist/harmony172.mjs.map +1 -1
- package/dist/harmony173.cjs +10 -19
- package/dist/harmony173.cjs.map +1 -1
- package/dist/harmony173.mjs +10 -19
- package/dist/harmony173.mjs.map +1 -1
- package/dist/harmony174.cjs +4 -12
- package/dist/harmony174.cjs.map +1 -1
- package/dist/harmony174.mjs +4 -12
- package/dist/harmony174.mjs.map +1 -1
- package/dist/harmony20.cjs +1 -1
- package/dist/harmony20.mjs +1 -1
- package/dist/harmony28.cjs +1 -1
- package/dist/harmony28.mjs +1 -1
- package/dist/harmony29.cjs +1 -1
- package/dist/harmony29.mjs +1 -1
- package/dist/harmony32.cjs +1 -1
- package/dist/harmony32.mjs +1 -1
- package/dist/harmony33.cjs +1 -1
- package/dist/harmony33.mjs +1 -1
- package/dist/harmony34.cjs +1 -1
- package/dist/harmony34.mjs +1 -1
- package/dist/harmony39.cjs +1 -1
- package/dist/harmony39.mjs +1 -1
- package/dist/harmony40.cjs +1 -1
- package/dist/harmony40.mjs +1 -1
- package/dist/harmony41.cjs +1 -1
- package/dist/harmony41.mjs +1 -1
- package/dist/harmony42.cjs +2 -2
- package/dist/harmony42.mjs +2 -2
- package/dist/harmony43.cjs +2 -2
- package/dist/harmony43.mjs +2 -2
- package/dist/harmony44.cjs +1 -1
- package/dist/harmony44.mjs +1 -1
- package/dist/harmony45.cjs +2 -0
- package/dist/harmony45.cjs.map +1 -1
- package/dist/harmony45.mjs +2 -0
- package/dist/harmony45.mjs.map +1 -1
- package/dist/harmony81.cjs +5 -20
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +5 -20
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +5 -1
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +5 -1
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony88.cjs +2 -1
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +3 -2
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony94.cjs +1 -1
- package/dist/harmony94.mjs +1 -1
- package/dist/harmony96.cjs +2 -2
- package/dist/harmony96.mjs +2 -2
- package/dist/harmony98.cjs +2 -2
- package/dist/harmony98.mjs +2 -2
- package/dist/types/src/features/permissions/types.d.ts +5 -1
- package/dist/types/src/features/publicApi/permissionTemplates.d.ts +5 -5
- package/dist/types/src/features/publicApi/projects.d.ts +15 -15
- package/dist/types/src/features/publicApi/teamUsers.d.ts +5 -5
- package/dist/types/src/features/publicApi/types/permissionTemplateTypes.d.ts +9 -10
- package/dist/types/src/features/publicApi/types/permissionTypes.d.ts +4 -4
- package/dist/types/src/features/publicApi/types/projectTypes.d.ts +24 -24
- package/dist/types/src/features/publicApi/types/teamUserTypes.d.ts +8 -8
- package/package.json +1 -1
package/dist/harmony128.cjs
CHANGED
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
path: ({ projectId }) => `/project/${projectId}/dashboard`
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
key: "contributors",
|
|
16
|
-
labelKey: "Contributors",
|
|
17
|
-
path: ({ projectId }) => `/project/${projectId}/contributors`
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
key: "orders",
|
|
21
|
-
labelKey: "Human proofreading",
|
|
22
|
-
path: ({ projectId }) => `/project/${projectId}/orders`,
|
|
23
|
-
shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
key: "billing",
|
|
27
|
-
labelKey: "Billing",
|
|
28
|
-
path: ({ projectId }) => `/project/${projectId}/billing`,
|
|
29
|
-
shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
|
|
30
|
-
}
|
|
31
|
-
];
|
|
32
|
-
exports.navigationItems = navigationItems;
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const link = "_link_18vhx_1";
|
|
4
|
+
const active = "_active_18vhx_18";
|
|
5
|
+
const styles = {
|
|
6
|
+
link,
|
|
7
|
+
active
|
|
8
|
+
};
|
|
9
|
+
exports.active = active;
|
|
10
|
+
exports.default = styles;
|
|
11
|
+
exports.link = link;
|
|
33
12
|
//# sourceMappingURL=harmony128.cjs.map
|
package/dist/harmony128.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony128.cjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony128.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/dist/harmony128.mjs
CHANGED
|
@@ -1,33 +1,12 @@
|
|
|
1
|
-
const
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
{
|
|
8
|
-
key: "dashboard",
|
|
9
|
-
labelKey: "Download",
|
|
10
|
-
path: ({ projectId }) => `/project/${projectId}/dashboard`
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
key: "contributors",
|
|
14
|
-
labelKey: "Contributors",
|
|
15
|
-
path: ({ projectId }) => `/project/${projectId}/contributors`
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
key: "orders",
|
|
19
|
-
labelKey: "Human proofreading",
|
|
20
|
-
path: ({ projectId }) => `/project/${projectId}/orders`,
|
|
21
|
-
shouldShow: ({ flags }) => flags.ap_feature_hraas === "on"
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
key: "billing",
|
|
25
|
-
labelKey: "Billing",
|
|
26
|
-
path: ({ projectId }) => `/project/${projectId}/billing`,
|
|
27
|
-
shouldShow: ({ flags }) => flags.ap_feature_billing === "on"
|
|
28
|
-
}
|
|
29
|
-
];
|
|
1
|
+
const link = "_link_18vhx_1";
|
|
2
|
+
const active = "_active_18vhx_18";
|
|
3
|
+
const styles = {
|
|
4
|
+
link,
|
|
5
|
+
active
|
|
6
|
+
};
|
|
30
7
|
export {
|
|
31
|
-
|
|
8
|
+
active,
|
|
9
|
+
styles as default,
|
|
10
|
+
link
|
|
32
11
|
};
|
|
33
12
|
//# sourceMappingURL=harmony128.mjs.map
|
package/dist/harmony128.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony128.mjs","sources":[
|
|
1
|
+
{"version":3,"file":"harmony128.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
package/dist/harmony129.cjs
CHANGED
|
@@ -1,102 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: () => e[k]
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
n.default = e;
|
|
20
|
-
return Object.freeze(n);
|
|
21
|
-
}
|
|
22
|
-
const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
|
|
23
|
-
const patchResizeCallback = (resizeCallback, refreshMode, refreshRate, refreshOptions) => {
|
|
24
|
-
switch (refreshMode) {
|
|
25
|
-
case "debounce":
|
|
26
|
-
return debounce.default(resizeCallback, refreshRate, refreshOptions);
|
|
27
|
-
case "throttle":
|
|
28
|
-
return throttle.default(resizeCallback, refreshRate, refreshOptions);
|
|
29
|
-
default:
|
|
30
|
-
return resizeCallback;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
const useCallbackRef = (
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
35
|
-
(callback) => {
|
|
36
|
-
const callbackRef = React__namespace.useRef(callback);
|
|
37
|
-
React__namespace.useEffect(() => {
|
|
38
|
-
callbackRef.current = callback;
|
|
39
|
-
});
|
|
40
|
-
return React__namespace.useMemo(() => (...args) => {
|
|
41
|
-
var _a;
|
|
42
|
-
return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
|
|
43
|
-
}, []);
|
|
44
|
-
}
|
|
45
|
-
);
|
|
46
|
-
const useRefProxy = (
|
|
47
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
(targetRef) => {
|
|
49
|
-
const [refElement, setRefElement] = React__namespace.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
|
|
50
|
-
if (targetRef) {
|
|
51
|
-
setTimeout(() => {
|
|
52
|
-
if (targetRef.current !== refElement) {
|
|
53
|
-
setRefElement(targetRef.current);
|
|
54
|
-
}
|
|
55
|
-
}, 0);
|
|
56
|
-
}
|
|
57
|
-
const refProxy = React__namespace.useMemo(() => new Proxy((node) => {
|
|
58
|
-
if (node !== refElement) {
|
|
59
|
-
setRefElement(node);
|
|
60
|
-
}
|
|
61
|
-
}, {
|
|
62
|
-
get(target, prop) {
|
|
63
|
-
if (prop === "current") {
|
|
64
|
-
return refElement;
|
|
65
|
-
}
|
|
66
|
-
return target[prop];
|
|
67
|
-
},
|
|
68
|
-
set(target, prop, value) {
|
|
69
|
-
if (prop === "current") {
|
|
70
|
-
setRefElement(value);
|
|
71
|
-
} else {
|
|
72
|
-
target[prop] = value;
|
|
73
|
-
}
|
|
74
|
-
return true;
|
|
75
|
-
}
|
|
76
|
-
}), [refElement]);
|
|
77
|
-
return { refProxy, refElement, setRefElement };
|
|
78
|
-
}
|
|
79
|
-
);
|
|
80
|
-
const getDimensions = (entry, box) => {
|
|
81
|
-
if (box === "border-box") {
|
|
82
|
-
return {
|
|
83
|
-
width: entry.borderBoxSize[0].inlineSize,
|
|
84
|
-
height: entry.borderBoxSize[0].blockSize
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
if (box === "content-box") {
|
|
88
|
-
return {
|
|
89
|
-
width: entry.contentBoxSize[0].inlineSize,
|
|
90
|
-
height: entry.contentBoxSize[0].blockSize
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return {
|
|
94
|
-
width: entry.contentRect.width,
|
|
95
|
-
height: entry.contentRect.height
|
|
96
|
-
};
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const useSidebar = require("./harmony109.cjs");
|
|
5
|
+
const louis = require("@lokalise/louis");
|
|
6
|
+
const permissions = require("./harmony110.cjs");
|
|
7
|
+
const BillingMenuItem = () => {
|
|
8
|
+
const { jwt } = useSidebar.useSidebar();
|
|
9
|
+
if (!permissions.canChangeBilling(jwt)) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { href: "/team#billing", children: "Billing" });
|
|
97
13
|
};
|
|
98
|
-
exports.
|
|
99
|
-
exports.patchResizeCallback = patchResizeCallback;
|
|
100
|
-
exports.useCallbackRef = useCallbackRef;
|
|
101
|
-
exports.useRefProxy = useRefProxy;
|
|
14
|
+
exports.BillingMenuItem = BillingMenuItem;
|
|
102
15
|
//# sourceMappingURL=harmony129.cjs.map
|
package/dist/harmony129.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.cjs","sources":["../
|
|
1
|
+
{"version":3,"file":"harmony129.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":["useSidebar","canChangeBilling","jsx","MenuItem"],"mappings":";;;;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQC,2BAAAA,IAAAC,MAAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;;"}
|
package/dist/harmony129.mjs
CHANGED
|
@@ -1,85 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return resizeCallback;
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
const useCallbackRef = (
|
|
15
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
|
-
(callback) => {
|
|
17
|
-
const callbackRef = React.useRef(callback);
|
|
18
|
-
React.useEffect(() => {
|
|
19
|
-
callbackRef.current = callback;
|
|
20
|
-
});
|
|
21
|
-
return React.useMemo(() => (...args) => {
|
|
22
|
-
var _a;
|
|
23
|
-
return (_a = callbackRef.current) === null || _a === void 0 ? void 0 : _a.call(callbackRef, ...args);
|
|
24
|
-
}, []);
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
const useRefProxy = (
|
|
28
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
29
|
-
(targetRef) => {
|
|
30
|
-
const [refElement, setRefElement] = React.useState((targetRef === null || targetRef === void 0 ? void 0 : targetRef.current) || null);
|
|
31
|
-
if (targetRef) {
|
|
32
|
-
setTimeout(() => {
|
|
33
|
-
if (targetRef.current !== refElement) {
|
|
34
|
-
setRefElement(targetRef.current);
|
|
35
|
-
}
|
|
36
|
-
}, 0);
|
|
37
|
-
}
|
|
38
|
-
const refProxy = React.useMemo(() => new Proxy((node) => {
|
|
39
|
-
if (node !== refElement) {
|
|
40
|
-
setRefElement(node);
|
|
41
|
-
}
|
|
42
|
-
}, {
|
|
43
|
-
get(target, prop) {
|
|
44
|
-
if (prop === "current") {
|
|
45
|
-
return refElement;
|
|
46
|
-
}
|
|
47
|
-
return target[prop];
|
|
48
|
-
},
|
|
49
|
-
set(target, prop, value) {
|
|
50
|
-
if (prop === "current") {
|
|
51
|
-
setRefElement(value);
|
|
52
|
-
} else {
|
|
53
|
-
target[prop] = value;
|
|
54
|
-
}
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
}), [refElement]);
|
|
58
|
-
return { refProxy, refElement, setRefElement };
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
const getDimensions = (entry, box) => {
|
|
62
|
-
if (box === "border-box") {
|
|
63
|
-
return {
|
|
64
|
-
width: entry.borderBoxSize[0].inlineSize,
|
|
65
|
-
height: entry.borderBoxSize[0].blockSize
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
if (box === "content-box") {
|
|
69
|
-
return {
|
|
70
|
-
width: entry.contentBoxSize[0].inlineSize,
|
|
71
|
-
height: entry.contentBoxSize[0].blockSize
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
width: entry.contentRect.width,
|
|
76
|
-
height: entry.contentRect.height
|
|
77
|
-
};
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSidebar } from "./harmony109.mjs";
|
|
3
|
+
import { MenuItem } from "@lokalise/louis";
|
|
4
|
+
import { canChangeBilling } from "./harmony110.mjs";
|
|
5
|
+
const BillingMenuItem = () => {
|
|
6
|
+
const { jwt } = useSidebar();
|
|
7
|
+
if (!canChangeBilling(jwt)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsx(MenuItem, { href: "/team#billing", children: "Billing" });
|
|
78
11
|
};
|
|
79
12
|
export {
|
|
80
|
-
|
|
81
|
-
patchResizeCallback,
|
|
82
|
-
useCallbackRef,
|
|
83
|
-
useRefProxy
|
|
13
|
+
BillingMenuItem
|
|
84
14
|
};
|
|
85
15
|
//# sourceMappingURL=harmony129.mjs.map
|
package/dist/harmony129.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony129.mjs","sources":["../
|
|
1
|
+
{"version":3,"file":"harmony129.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/BillingMenuItem/BillingMenuItem.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuItem } from '@lokalise/louis'\nimport { canChangeBilling } from '@utils/user/permissions'\n\n/**\n * A menu item component for navigating to the billing section.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <BillingMenuItem />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const BillingMenuItem = () => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canChangeBilling(jwt)) {\n\t\treturn null\n\t}\n\n\treturn <MenuItem href=\"/team#billing\">Billing</MenuItem>\n}\n"],"names":[],"mappings":";;;;AAiBO,MAAM,kBAAkB,MAAM;AAC9B,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,iBAAiB,GAAG,GAAG;AACpB,WAAA;AAAA,EAAA;AAGR,SAAQ,oBAAA,UAAA,EAAS,MAAK,iBAAgB,UAAO,WAAA;AAC9C;"}
|
package/dist/harmony130.cjs
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
const useSidebar = require("./harmony109.cjs");
|
|
5
|
+
const louis = require("@lokalise/louis");
|
|
6
|
+
const permissions = require("./harmony110.cjs");
|
|
7
|
+
const CreateNewTeam = ({ onCreateTeam }) => {
|
|
8
|
+
const { jwt } = useSidebar.useSidebar();
|
|
9
|
+
if (!permissions.canCreateTeam(jwt)) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
15
|
+
] });
|
|
8
16
|
};
|
|
9
|
-
exports.
|
|
10
|
-
exports.default = styles;
|
|
11
|
-
exports.link = link;
|
|
17
|
+
exports.CreateNewTeam = CreateNewTeam;
|
|
12
18
|
//# sourceMappingURL=harmony130.cjs.map
|
package/dist/harmony130.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony130.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harmony130.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","MenuDivider"],"mappings":";;;;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAACC,2BAAA,IAAAC,MAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,mCAC/CC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
|
package/dist/harmony130.mjs
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSidebar } from "./harmony109.mjs";
|
|
3
|
+
import { MenuItem, MenuDivider } from "@lokalise/louis";
|
|
4
|
+
import { canCreateTeam } from "./harmony110.mjs";
|
|
5
|
+
const CreateNewTeam = ({ onCreateTeam }) => {
|
|
6
|
+
const { jwt } = useSidebar();
|
|
7
|
+
if (!canCreateTeam(jwt)) {
|
|
8
|
+
return null;
|
|
9
|
+
}
|
|
10
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
12
|
+
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
13
|
+
] });
|
|
6
14
|
};
|
|
7
15
|
export {
|
|
8
|
-
|
|
9
|
-
styles as default,
|
|
10
|
-
link
|
|
16
|
+
CreateNewTeam
|
|
11
17
|
};
|
|
12
18
|
//# sourceMappingURL=harmony130.mjs.map
|
package/dist/harmony130.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony130.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"harmony130.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeam/CreateNewTeam.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\n\ntype CreateNewTeamProps = {\n\tonCreateTeam: () => void\n}\n\n/**\n * A menu item component for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeam onCreateTeam={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeam = ({ onCreateTeam }: CreateNewTeamProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onCreateTeam}>Create new team</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AAqBO,MAAM,gBAAgB,CAAC,EAAE,mBAAuC;AAChE,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAC,oBAAA,UAAA,EAAS,SAAS,cAAc,UAAe,mBAAA;AAAA,wBAC/C,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
|
package/dist/harmony131.cjs
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const useSidebar = require("./
|
|
4
|
+
const useSidebar = require("./harmony109.cjs");
|
|
5
5
|
const louis = require("@lokalise/louis");
|
|
6
|
-
const permissions = require("./
|
|
7
|
-
const
|
|
6
|
+
const permissions = require("./harmony110.cjs");
|
|
7
|
+
const CreateNewTeamPlaceholder_module = require("./harmony158.cjs");
|
|
8
|
+
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
8
9
|
const { jwt } = useSidebar.useSidebar();
|
|
9
|
-
if (!permissions.
|
|
10
|
+
if (!permissions.canCreateTeam(jwt)) {
|
|
10
11
|
return null;
|
|
11
12
|
}
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
15
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.mainLabel, children: "Create new team" }),
|
|
16
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: CreateNewTeamPlaceholder_module.default.subLabel, children: "Switch to Expert to create a new team" })
|
|
17
|
+
] }) }),
|
|
18
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
19
|
+
] });
|
|
13
20
|
};
|
|
14
|
-
exports.
|
|
21
|
+
exports.CreateNewTeamPlaceholder = CreateNewTeamPlaceholder;
|
|
15
22
|
//# sourceMappingURL=harmony131.cjs.map
|
package/dist/harmony131.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony131.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":["useSidebar","canCreateTeam","jsxs","Fragment","jsx","MenuItem","styles","MenuDivider"],"mappings":";;;;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAIA,sBAAW;AAEvB,MAAA,CAACC,YAAAA,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEEC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IAAAC,2BAAAA,IAACC,kBAAS,SAAkB,eAAY,uCACvC,UAACH,2BAAAA,KAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAAE,2BAAA,IAAC,QAAK,EAAA,WAAWE,gCAAO,QAAA,WAAW,UAAe,mBAAA;AAAA,MACjDF,2BAAA,IAAA,QAAA,EAAK,WAAWE,gCAAA,QAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,mCACCC,MAAY,aAAA,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;;"}
|
package/dist/harmony131.mjs
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useSidebar } from "./
|
|
3
|
-
import { MenuItem } from "@lokalise/louis";
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useSidebar } from "./harmony109.mjs";
|
|
3
|
+
import { MenuItem, MenuDivider } from "@lokalise/louis";
|
|
4
|
+
import { canCreateTeam } from "./harmony110.mjs";
|
|
5
|
+
import styles from "./harmony158.mjs";
|
|
6
|
+
const CreateNewTeamPlaceholder = ({ onClick }) => {
|
|
6
7
|
const { jwt } = useSidebar();
|
|
7
|
-
if (!
|
|
8
|
+
if (!canCreateTeam(jwt)) {
|
|
8
9
|
return null;
|
|
9
10
|
}
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
12
|
+
/* @__PURE__ */ jsx(MenuItem, { onClick, "data-testid": "sidebar-create-new-team-placeholder", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
13
|
+
/* @__PURE__ */ jsx("span", { className: styles.mainLabel, children: "Create new team" }),
|
|
14
|
+
/* @__PURE__ */ jsx("span", { className: styles.subLabel, children: "Switch to Expert to create a new team" })
|
|
15
|
+
] }) }),
|
|
16
|
+
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
17
|
+
] });
|
|
11
18
|
};
|
|
12
19
|
export {
|
|
13
|
-
|
|
20
|
+
CreateNewTeamPlaceholder
|
|
14
21
|
};
|
|
15
22
|
//# sourceMappingURL=harmony131.mjs.map
|
package/dist/harmony131.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony131.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/CreateNewTeamPlaceholder/CreateNewTeamPlaceholder.tsx"],"sourcesContent":["import { useSidebar } from '@components/Sidebar/hooks/useSidebar'\nimport { MenuDivider, MenuItem } from '@lokalise/louis'\nimport { canCreateTeam } from '@utils/user/permissions'\nimport styles from './CreateNewTeamPlaceholder.module.css'\n\ntype CreateNewTeamPlaceholderProps = {\n\tonClick: () => void\n}\n\n/**\n * A placeholder menu item for creating a new team.\n * Checks the user's permissions using the Sidebar context and renders\n * nothing if the user does not have access.\n *\n * @example\n * ```\n * <CreateNewTeamPlaceholder onClick={handleCreateTeam} />\n * ```\n *\n * @note This component must be used within a Sidebar Context.\n */\n\nexport const CreateNewTeamPlaceholder = ({ onClick }: CreateNewTeamPlaceholderProps) => {\n\tconst { jwt } = useSidebar()\n\n\tif (!canCreateTeam(jwt)) {\n\t\treturn null\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<MenuItem onClick={onClick} data-testid=\"sidebar-create-new-team-placeholder\">\n\t\t\t\t<div className=\"flex flex-col\">\n\t\t\t\t\t<span className={styles.mainLabel}>Create new team</span>\n\t\t\t\t\t<span className={styles.subLabel}>Switch to Expert to create a new team</span>\n\t\t\t\t</div>\n\t\t\t</MenuItem>\n\t\t\t<MenuDivider />\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;;AAsBO,MAAM,2BAA2B,CAAC,EAAE,cAA6C;AACjF,QAAA,EAAE,IAAI,IAAI,WAAW;AAEvB,MAAA,CAAC,cAAc,GAAG,GAAG;AACjB,WAAA;AAAA,EAAA;AAGR,SAEE,qBAAA,UAAA,EAAA,UAAA;AAAA,IAAA,oBAAC,YAAS,SAAkB,eAAY,uCACvC,UAAC,qBAAA,OAAA,EAAI,WAAU,iBACd,UAAA;AAAA,MAAA,oBAAC,QAAK,EAAA,WAAW,OAAO,WAAW,UAAe,mBAAA;AAAA,MACjD,oBAAA,QAAA,EAAK,WAAW,OAAO,UAAU,UAAqC,wCAAA,CAAA;AAAA,IAAA,EAAA,CACxE,EACD,CAAA;AAAA,wBACC,aAAY,CAAA,CAAA;AAAA,EAAA,GACd;AAEF;"}
|
package/dist/harmony132.cjs
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
-
const useSidebar = require("./harmony114.cjs");
|
|
5
4
|
const louis = require("@lokalise/louis");
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
13
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
14
|
-
/* @__PURE__ */ jsxRuntime.jsx(louis.MenuDivider, {})
|
|
15
|
-
] });
|
|
5
|
+
const DarkModeToggle_module = require("./harmony159.cjs");
|
|
6
|
+
const DarkModeToggle = ({ onToggle, isDarkMode }) => {
|
|
7
|
+
return /* @__PURE__ */ jsxRuntime.jsx(louis.MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex-row justify-between gap-1 ${DarkModeToggle_module.default.switchContainer}`, children: [
|
|
8
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Dark mode" }),
|
|
9
|
+
/* @__PURE__ */ jsxRuntime.jsx(louis.Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
|
|
10
|
+
] }) });
|
|
16
11
|
};
|
|
17
|
-
exports.
|
|
12
|
+
exports.DarkModeToggle = DarkModeToggle;
|
|
18
13
|
//# sourceMappingURL=harmony132.cjs.map
|
package/dist/harmony132.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony132.cjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":["jsx","MenuItem","jsxs","styles","Switch"],"mappings":";;;;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAAA,2BAAAA,IAACC,MAAAA,UAAS,EAAA,SAAS,UAClB,UAAAC,2BAAA,KAAC,SAAI,WAAW,kCAAkCC,sBAAO,QAAA,eAAe,IACvE,UAAA;AAAA,IAAAH,2BAAAA,IAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACdA,2BAAA,IAAAI,MAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;;"}
|
package/dist/harmony132.mjs
CHANGED
|
@@ -1,18 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11
|
-
/* @__PURE__ */ jsx(MenuItem, { onClick: onCreateTeam, children: "Create new team" }),
|
|
12
|
-
/* @__PURE__ */ jsx(MenuDivider, {})
|
|
13
|
-
] });
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { MenuItem, Switch } from "@lokalise/louis";
|
|
3
|
+
import styles from "./harmony159.mjs";
|
|
4
|
+
const DarkModeToggle = ({ onToggle, isDarkMode }) => {
|
|
5
|
+
return /* @__PURE__ */ jsx(MenuItem, { onClick: onToggle, children: /* @__PURE__ */ jsxs("div", { className: `flex-row justify-between gap-1 ${styles.switchContainer}`, children: [
|
|
6
|
+
/* @__PURE__ */ jsx("span", { children: "Dark mode" }),
|
|
7
|
+
/* @__PURE__ */ jsx(Switch, { defaultChecked: isDarkMode, "aria-label": "Toggle dark mode" })
|
|
8
|
+
] }) });
|
|
14
9
|
};
|
|
15
10
|
export {
|
|
16
|
-
|
|
11
|
+
DarkModeToggle
|
|
17
12
|
};
|
|
18
13
|
//# sourceMappingURL=harmony132.mjs.map
|
package/dist/harmony132.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/
|
|
1
|
+
{"version":3,"file":"harmony132.mjs","sources":["../src/components/Sidebar/Widgets/ProfileMenu/DarkModeToggle/DarkModeToggle.tsx"],"sourcesContent":["import { MenuItem, Switch } from '@lokalise/louis'\nimport styles from './DarkModeToggle.module.css'\n\ntype DarkModeToggleProps = {\n\tonToggle: () => void\n\tisDarkMode: boolean\n}\n\n/**\n * A menu item component for toggling dark mode.\n * Displays a switch and label, and calls the provided onToggle handler when clicked.\n *\n * @example\n * ```\n * <DarkModeToggle\n * isDarkMode={isDarkMode}\n * onToggle={handleToggleDarkMode}\n * />\n * ```\n */\n\nexport const DarkModeToggle = ({ onToggle, isDarkMode }: DarkModeToggleProps) => {\n\treturn (\n\t\t<MenuItem onClick={onToggle}>\n\t\t\t<div className={`flex-row justify-between gap-1 ${styles.switchContainer}`}>\n\t\t\t\t<span>Dark mode</span>\n\t\t\t\t<Switch defaultChecked={isDarkMode} aria-label=\"Toggle dark mode\" />\n\t\t\t</div>\n\t\t</MenuItem>\n\t)\n}\n"],"names":[],"mappings":";;;AAqBO,MAAM,iBAAiB,CAAC,EAAE,UAAU,iBAAsC;AAE/E,SAAA,oBAAC,UAAS,EAAA,SAAS,UAClB,UAAA,qBAAC,SAAI,WAAW,kCAAkC,OAAO,eAAe,IACvE,UAAA;AAAA,IAAA,oBAAC,UAAK,UAAS,YAAA,CAAA;AAAA,IACd,oBAAA,QAAA,EAAO,gBAAgB,YAAY,cAAW,mBAAmB,CAAA;AAAA,EAAA,EAAA,CACnE,EACD,CAAA;AAEF;"}
|