@lokalise/harmony 1.27.2 → 1.27.3-exp-fixTeamsTypes.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony100.cjs +7 -6
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +6 -5
- package/dist/harmony100.mjs.map +1 -1
- package/dist/harmony101.cjs +18 -40
- package/dist/harmony101.cjs.map +1 -1
- package/dist/harmony101.mjs +18 -40
- package/dist/harmony101.mjs.map +1 -1
- package/dist/harmony102.cjs +13 -59
- package/dist/harmony102.cjs.map +1 -1
- package/dist/harmony102.mjs +13 -59
- package/dist/harmony102.mjs.map +1 -1
- package/dist/harmony103.cjs +16 -7
- package/dist/harmony103.cjs.map +1 -1
- package/dist/harmony103.mjs +16 -7
- package/dist/harmony103.mjs.map +1 -1
- package/dist/harmony104.cjs +99 -6
- package/dist/harmony104.cjs.map +1 -1
- package/dist/harmony104.mjs +81 -5
- package/dist/harmony104.mjs.map +1 -1
- package/dist/harmony105.cjs +63 -6
- package/dist/harmony105.cjs.map +1 -1
- package/dist/harmony105.mjs +62 -5
- package/dist/harmony105.mjs.map +1 -1
- package/dist/harmony106.cjs +89 -6
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +88 -5
- package/dist/harmony106.mjs.map +1 -1
- package/dist/harmony107.cjs +19 -63
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +18 -62
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +6 -89
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +5 -88
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +5 -18
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +5 -18
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +7 -96
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +7 -96
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +57 -13
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +57 -13
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +60 -14
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +60 -14
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +19 -37
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +18 -36
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +87 -19
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +87 -19
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +13 -7
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +13 -7
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +14 -57
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +14 -57
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +33 -57
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +33 -57
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +29 -19
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +28 -18
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +1 -1
- package/dist/harmony119.mjs +1 -1
- package/dist/harmony120.cjs +1 -1
- package/dist/harmony120.mjs +1 -1
- package/dist/harmony121.cjs +2 -2
- package/dist/harmony121.mjs +2 -2
- package/dist/harmony122.cjs +46 -11
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +46 -11
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +13 -17
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +12 -16
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +10 -20
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +10 -20
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +14 -10
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +14 -10
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +20 -5
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +20 -5
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +11 -11
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +11 -11
- package/dist/harmony127.mjs.map +1 -1
- package/dist/harmony128.cjs +5 -31
- package/dist/harmony128.cjs.map +1 -1
- package/dist/harmony128.mjs +5 -31
- package/dist/harmony128.mjs.map +1 -1
- package/dist/harmony129.cjs +11 -13
- package/dist/harmony129.cjs.map +1 -1
- package/dist/harmony129.mjs +11 -13
- package/dist/harmony129.mjs.map +1 -1
- package/dist/harmony130.cjs +31 -45
- package/dist/harmony130.cjs.map +1 -1
- package/dist/harmony130.mjs +31 -45
- package/dist/harmony130.mjs.map +1 -1
- package/dist/harmony131.cjs +15 -13
- package/dist/harmony131.cjs.map +1 -1
- package/dist/harmony131.mjs +14 -12
- package/dist/harmony131.mjs.map +1 -1
- package/dist/harmony15.cjs +1 -1
- package/dist/harmony15.mjs +1 -1
- package/dist/harmony22.cjs +1 -1
- package/dist/harmony22.mjs +1 -1
- package/dist/harmony23.cjs +1 -1
- package/dist/harmony23.mjs +1 -1
- package/dist/harmony30.cjs +1 -1
- package/dist/harmony30.mjs +1 -1
- package/dist/harmony59.cjs +20 -2
- package/dist/harmony59.cjs.map +1 -1
- package/dist/harmony59.mjs +20 -2
- package/dist/harmony59.mjs.map +1 -1
- package/dist/harmony64.cjs +1 -1
- package/dist/harmony64.mjs +1 -1
- package/dist/harmony66.cjs +1 -1
- package/dist/harmony66.mjs +1 -1
- package/dist/harmony67.cjs +1 -1
- package/dist/harmony67.mjs +1 -1
- package/dist/harmony68.cjs +1 -1
- package/dist/harmony68.mjs +1 -1
- package/dist/harmony69.cjs +2 -2
- package/dist/harmony69.mjs +2 -2
- package/dist/harmony70.cjs +2 -2
- package/dist/harmony70.mjs +2 -2
- package/dist/harmony71.cjs +2 -2
- package/dist/harmony71.mjs +2 -2
- package/dist/harmony72.cjs +2 -2
- package/dist/harmony72.mjs +2 -2
- package/dist/harmony73.cjs +3 -3
- package/dist/harmony73.mjs +3 -3
- package/dist/harmony74.cjs +6 -6
- package/dist/harmony74.mjs +6 -6
- package/dist/harmony77.cjs +2 -2
- package/dist/harmony77.mjs +2 -2
- package/dist/harmony79.cjs +7 -12
- package/dist/harmony79.cjs.map +1 -1
- package/dist/harmony79.mjs +6 -11
- package/dist/harmony79.mjs.map +1 -1
- package/dist/harmony80.cjs +8 -20
- package/dist/harmony80.cjs.map +1 -1
- package/dist/harmony80.mjs +8 -20
- package/dist/harmony80.mjs.map +1 -1
- package/dist/harmony81.cjs +6 -3
- package/dist/harmony81.cjs.map +1 -1
- package/dist/harmony81.mjs +6 -3
- package/dist/harmony81.mjs.map +1 -1
- package/dist/harmony82.cjs +57 -9
- package/dist/harmony82.cjs.map +1 -1
- package/dist/harmony82.mjs +56 -8
- package/dist/harmony82.mjs.map +1 -1
- package/dist/harmony83.cjs +32 -9
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +31 -8
- package/dist/harmony83.mjs.map +1 -1
- package/dist/harmony84.cjs +5 -57
- package/dist/harmony84.cjs.map +1 -1
- package/dist/harmony84.mjs +5 -57
- package/dist/harmony84.mjs.map +1 -1
- package/dist/harmony85.cjs +9 -32
- package/dist/harmony85.cjs.map +1 -1
- package/dist/harmony85.mjs +8 -31
- package/dist/harmony85.mjs.map +1 -1
- package/dist/harmony86.cjs +25 -6
- package/dist/harmony86.cjs.map +1 -1
- package/dist/harmony86.mjs +24 -5
- package/dist/harmony86.mjs.map +1 -1
- package/dist/harmony87.cjs +3 -6
- package/dist/harmony87.cjs.map +1 -1
- package/dist/harmony87.mjs +3 -6
- package/dist/harmony87.mjs.map +1 -1
- package/dist/harmony88.cjs +21 -24
- package/dist/harmony88.cjs.map +1 -1
- package/dist/harmony88.mjs +20 -23
- package/dist/harmony88.mjs.map +1 -1
- package/dist/harmony89.cjs +9 -3
- package/dist/harmony89.cjs.map +1 -1
- package/dist/harmony89.mjs +9 -3
- package/dist/harmony89.mjs.map +1 -1
- package/dist/harmony90.cjs +9 -19
- package/dist/harmony90.cjs.map +1 -1
- package/dist/harmony90.mjs +11 -21
- package/dist/harmony90.mjs.map +1 -1
- package/dist/harmony91.cjs +20 -11
- package/dist/harmony91.cjs.map +1 -1
- package/dist/harmony91.mjs +20 -11
- package/dist/harmony91.mjs.map +1 -1
- package/dist/harmony92.cjs +22 -19
- package/dist/harmony92.cjs.map +1 -1
- package/dist/harmony92.mjs +21 -18
- package/dist/harmony92.mjs.map +1 -1
- package/dist/harmony93.cjs +4 -13
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +4 -13
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +129 -13
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +129 -13
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +12 -99
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +11 -81
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +6 -22
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +5 -21
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +39 -4
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +39 -4
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +55 -127
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +55 -127
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +7 -12
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +6 -11
- package/dist/harmony99.mjs.map +1 -1
- package/dist/types/src/features/publicApi/hooks/useListTeamsQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/hooks/useRetrieveTeamQuery.d.ts +2 -2
- package/dist/types/src/features/publicApi/team.d.ts +22 -22
- package/dist/types/src/features/publicApi/types/teamTypes.d.ts +34 -26
- package/package.json +1 -1
package/dist/harmony117.cjs
CHANGED
@@ -1,63 +1,39 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
const resolveStatus = (language) => {
|
21
|
-
const progress = language.progress ?? 0;
|
22
|
-
if (language.status === types.SidebarTaskLanguageStatuses.Created && progress > 0) {
|
23
|
-
return types.SidebarTaskLanguageStatuses.InProgress;
|
24
|
-
}
|
25
|
-
return language.status;
|
26
|
-
};
|
27
|
-
const tagColor = {
|
28
|
-
[types.SidebarTaskTypeOptions.translation]: "#0891B2",
|
29
|
-
[types.SidebarTaskTypeOptions.review]: "#16922D",
|
30
|
-
[types.SidebarTaskTypeOptions.lqa_by_ai]: "#8B5CF6",
|
31
|
-
[types.SidebarTaskTypeOptions.automatic_translation]: "#60A5FA"
|
32
|
-
};
|
33
|
-
const getTaskLanguages = (langs) => {
|
34
|
-
const statusSortOrder = [
|
35
|
-
types.SidebarTaskLanguageStatuses.InProgress,
|
36
|
-
types.SidebarTaskLanguageStatuses.Created,
|
37
|
-
types.SidebarTaskLanguageStatuses.Completed
|
38
|
-
];
|
39
|
-
return langs.filter((language) => language.status !== "queued").map((lang) => ({ ...lang, status: resolveStatus(lang) })).sort((a, b) => {
|
40
|
-
if (a.status === types.SidebarTaskLanguageStatuses.InProgress && a.progress === 100) {
|
41
|
-
return -1;
|
3
|
+
const _baseTrim = require("./harmony120.cjs");
|
4
|
+
const isObject = require("./harmony115.cjs");
|
5
|
+
const isSymbol = require("./harmony121.cjs");
|
6
|
+
var toNumber_1;
|
7
|
+
var hasRequiredToNumber;
|
8
|
+
function requireToNumber() {
|
9
|
+
if (hasRequiredToNumber) return toNumber_1;
|
10
|
+
hasRequiredToNumber = 1;
|
11
|
+
var baseTrim = _baseTrim.__require(), isObject$1 = isObject.__require(), isSymbol$1 = isSymbol.__require();
|
12
|
+
var NAN = 0 / 0;
|
13
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
14
|
+
var reIsBinary = /^0b[01]+$/i;
|
15
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
16
|
+
var freeParseInt = parseInt;
|
17
|
+
function toNumber(value) {
|
18
|
+
if (typeof value == "number") {
|
19
|
+
return value;
|
42
20
|
}
|
43
|
-
if (
|
44
|
-
return
|
21
|
+
if (isSymbol$1(value)) {
|
22
|
+
return NAN;
|
45
23
|
}
|
46
|
-
if (
|
47
|
-
|
24
|
+
if (isObject$1(value)) {
|
25
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
26
|
+
value = isObject$1(other) ? other + "" : other;
|
48
27
|
}
|
49
|
-
|
50
|
-
|
51
|
-
}
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
exports.
|
60
|
-
exports.isLanguageProgressCompleted = isLanguageProgressCompleted;
|
61
|
-
exports.resolveStatus = resolveStatus;
|
62
|
-
exports.tagColor = tagColor;
|
28
|
+
if (typeof value != "string") {
|
29
|
+
return value === 0 ? value : +value;
|
30
|
+
}
|
31
|
+
value = baseTrim(value);
|
32
|
+
var isBinary = reIsBinary.test(value);
|
33
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
34
|
+
}
|
35
|
+
toNumber_1 = toNumber;
|
36
|
+
return toNumber_1;
|
37
|
+
}
|
38
|
+
exports.__require = requireToNumber;
|
63
39
|
//# sourceMappingURL=harmony117.cjs.map
|
package/dist/harmony117.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony117.cjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony117.cjs","sources":["../node_modules/lodash/toNumber.js"],"sourcesContent":["var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n"],"names":["require$$0","isObject","require$$1","isSymbol","require$$2"],"mappings":";;;;;;;;;;AAAA,MAAI,WAAWA,UAAAA,UAAsB,GACjCC,aAAWC,SAAAA,UAAqB,GAChCC,aAAWC,SAAAA,UAAqB;AAGpC,MAAI,MAAM,IAAI;AAGd,MAAI,aAAa;AAGjB,MAAI,aAAa;AAGjB,MAAI,YAAY;AAGhB,MAAI,eAAe;AAyBnB,WAAS,SAAS,OAAO;AACvB,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO;AAAA,IACX;AACE,QAAID,WAAS,KAAK,GAAG;AACnB,aAAO;AAAA,IACX;AACE,QAAIF,WAAS,KAAK,GAAG;AACnB,UAAI,QAAQ,OAAO,MAAM,WAAW,aAAa,MAAM,QAAO,IAAK;AACnE,cAAQA,WAAS,KAAK,IAAK,QAAQ,KAAM;AAAA,IAC7C;AACE,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO,UAAU,IAAI,QAAQ,CAAC;AAAA,IAClC;AACE,YAAQ,SAAS,KAAK;AACtB,QAAI,WAAW,WAAW,KAAK,KAAK;AACpC,WAAQ,YAAY,UAAU,KAAK,KAAK,IACpC,aAAa,MAAM,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,IAC5C,WAAW,KAAK,KAAK,IAAI,MAAM,CAAC;AAAA,EACvC;AAEA,eAAiB;;;;","x_google_ignoreList":[0]}
|
package/dist/harmony117.mjs
CHANGED
@@ -1,63 +1,39 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
const resolveStatus = (language) => {
|
19
|
-
const progress = language.progress ?? 0;
|
20
|
-
if (language.status === SidebarTaskLanguageStatuses.Created && progress > 0) {
|
21
|
-
return SidebarTaskLanguageStatuses.InProgress;
|
22
|
-
}
|
23
|
-
return language.status;
|
24
|
-
};
|
25
|
-
const tagColor = {
|
26
|
-
[SidebarTaskTypeOptions.translation]: "#0891B2",
|
27
|
-
[SidebarTaskTypeOptions.review]: "#16922D",
|
28
|
-
[SidebarTaskTypeOptions.lqa_by_ai]: "#8B5CF6",
|
29
|
-
[SidebarTaskTypeOptions.automatic_translation]: "#60A5FA"
|
30
|
-
};
|
31
|
-
const getTaskLanguages = (langs) => {
|
32
|
-
const statusSortOrder = [
|
33
|
-
SidebarTaskLanguageStatuses.InProgress,
|
34
|
-
SidebarTaskLanguageStatuses.Created,
|
35
|
-
SidebarTaskLanguageStatuses.Completed
|
36
|
-
];
|
37
|
-
return langs.filter((language) => language.status !== "queued").map((lang) => ({ ...lang, status: resolveStatus(lang) })).sort((a, b) => {
|
38
|
-
if (a.status === SidebarTaskLanguageStatuses.InProgress && a.progress === 100) {
|
39
|
-
return -1;
|
1
|
+
import { __require as require_baseTrim } from "./harmony120.mjs";
|
2
|
+
import { __require as requireIsObject } from "./harmony115.mjs";
|
3
|
+
import { __require as requireIsSymbol } from "./harmony121.mjs";
|
4
|
+
var toNumber_1;
|
5
|
+
var hasRequiredToNumber;
|
6
|
+
function requireToNumber() {
|
7
|
+
if (hasRequiredToNumber) return toNumber_1;
|
8
|
+
hasRequiredToNumber = 1;
|
9
|
+
var baseTrim = require_baseTrim(), isObject = requireIsObject(), isSymbol = requireIsSymbol();
|
10
|
+
var NAN = 0 / 0;
|
11
|
+
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
12
|
+
var reIsBinary = /^0b[01]+$/i;
|
13
|
+
var reIsOctal = /^0o[0-7]+$/i;
|
14
|
+
var freeParseInt = parseInt;
|
15
|
+
function toNumber(value) {
|
16
|
+
if (typeof value == "number") {
|
17
|
+
return value;
|
40
18
|
}
|
41
|
-
if (
|
42
|
-
return
|
19
|
+
if (isSymbol(value)) {
|
20
|
+
return NAN;
|
43
21
|
}
|
44
|
-
if (
|
45
|
-
|
22
|
+
if (isObject(value)) {
|
23
|
+
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
24
|
+
value = isObject(other) ? other + "" : other;
|
46
25
|
}
|
47
|
-
|
48
|
-
|
49
|
-
}
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
26
|
+
if (typeof value != "string") {
|
27
|
+
return value === 0 ? value : +value;
|
28
|
+
}
|
29
|
+
value = baseTrim(value);
|
30
|
+
var isBinary = reIsBinary.test(value);
|
31
|
+
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
32
|
+
}
|
33
|
+
toNumber_1 = toNumber;
|
34
|
+
return toNumber_1;
|
35
|
+
}
|
56
36
|
export {
|
57
|
-
|
58
|
-
getTaskLanguages,
|
59
|
-
isLanguageProgressCompleted,
|
60
|
-
resolveStatus,
|
61
|
-
tagColor
|
37
|
+
requireToNumber as __require
|
62
38
|
};
|
63
39
|
//# sourceMappingURL=harmony117.mjs.map
|
package/dist/harmony117.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony117.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony117.mjs","sources":["../node_modules/lodash/toNumber.js"],"sourcesContent":["var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n"],"names":["require$$0","require$$1","require$$2"],"mappings":";;;;;;;;AAAA,MAAI,WAAWA,iBAAsB,GACjC,WAAWC,gBAAqB,GAChC,WAAWC,gBAAqB;AAGpC,MAAI,MAAM,IAAI;AAGd,MAAI,aAAa;AAGjB,MAAI,aAAa;AAGjB,MAAI,YAAY;AAGhB,MAAI,eAAe;AAyBnB,WAAS,SAAS,OAAO;AACvB,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO;AAAA,IACX;AACE,QAAI,SAAS,KAAK,GAAG;AACnB,aAAO;AAAA,IACX;AACE,QAAI,SAAS,KAAK,GAAG;AACnB,UAAI,QAAQ,OAAO,MAAM,WAAW,aAAa,MAAM,QAAO,IAAK;AACnE,cAAQ,SAAS,KAAK,IAAK,QAAQ,KAAM;AAAA,IAC7C;AACE,QAAI,OAAO,SAAS,UAAU;AAC5B,aAAO,UAAU,IAAI,QAAQ,CAAC;AAAA,IAClC;AACE,YAAQ,SAAS,KAAK;AACtB,QAAI,WAAW,WAAW,KAAK,KAAK;AACpC,WAAQ,YAAY,UAAU,KAAK,KAAK,IACpC,aAAa,MAAM,MAAM,CAAC,GAAG,WAAW,IAAI,CAAC,IAC5C,WAAW,KAAK,KAAK,IAAI,MAAM,CAAC;AAAA,EACvC;AAEA,eAAiB;;;","x_google_ignoreList":[0]}
|
package/dist/harmony118.cjs
CHANGED
@@ -1,21 +1,31 @@
|
|
1
1
|
"use strict";
|
2
|
-
Object.
|
3
|
-
const
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
+
const debounce = require("./harmony114.cjs");
|
4
|
+
const isObject = require("./harmony115.cjs");
|
5
|
+
var throttle_1;
|
6
|
+
var hasRequiredThrottle;
|
7
|
+
function requireThrottle() {
|
8
|
+
if (hasRequiredThrottle) return throttle_1;
|
9
|
+
hasRequiredThrottle = 1;
|
10
|
+
var debounce$1 = debounce.__require(), isObject$1 = isObject.__require();
|
11
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
12
|
+
function throttle(func, wait, options) {
|
13
|
+
var leading = true, trailing = true;
|
14
|
+
if (typeof func != "function") {
|
15
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
16
|
+
}
|
17
|
+
if (isObject$1(options)) {
|
18
|
+
leading = "leading" in options ? !!options.leading : leading;
|
19
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
20
|
+
}
|
21
|
+
return debounce$1(func, wait, {
|
22
|
+
"leading": leading,
|
23
|
+
"maxWait": wait,
|
24
|
+
"trailing": trailing
|
25
|
+
});
|
26
|
+
}
|
27
|
+
throttle_1 = throttle;
|
28
|
+
return throttle_1;
|
29
|
+
}
|
30
|
+
exports.__require = requireThrottle;
|
21
31
|
//# sourceMappingURL=harmony118.cjs.map
|
package/dist/harmony118.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony118.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony118.cjs","sources":["../node_modules/lodash/throttle.js"],"sourcesContent":["var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n"],"names":["debounce","require$$0","isObject","require$$1"],"mappings":";;;;;;;;;AAAA,MAAIA,aAAWC,SAAAA,UAAqB,GAChCC,aAAWC,SAAAA,UAAqB;AAGpC,MAAI,kBAAkB;AA8CtB,WAAS,SAAS,MAAM,MAAM,SAAS;AACrC,QAAI,UAAU,MACV,WAAW;AAEf,QAAI,OAAO,QAAQ,YAAY;AAC7B,YAAM,IAAI,UAAU,eAAe;AAAA,IACvC;AACE,QAAID,WAAS,OAAO,GAAG;AACrB,gBAAU,aAAa,UAAU,CAAC,CAAC,QAAQ,UAAU;AACrD,iBAAW,cAAc,UAAU,CAAC,CAAC,QAAQ,WAAW;AAAA,IAC5D;AACE,WAAOF,WAAS,MAAM,MAAM;AAAA,MAC1B,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY;AAAA,IAChB,CAAG;AAAA,EACH;AAEA,eAAiB;;;;","x_google_ignoreList":[0]}
|
package/dist/harmony118.mjs
CHANGED
@@ -1,21 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
import { __require as requireDebounce } from "./harmony114.mjs";
|
2
|
+
import { __require as requireIsObject } from "./harmony115.mjs";
|
3
|
+
var throttle_1;
|
4
|
+
var hasRequiredThrottle;
|
5
|
+
function requireThrottle() {
|
6
|
+
if (hasRequiredThrottle) return throttle_1;
|
7
|
+
hasRequiredThrottle = 1;
|
8
|
+
var debounce = requireDebounce(), isObject = requireIsObject();
|
9
|
+
var FUNC_ERROR_TEXT = "Expected a function";
|
10
|
+
function throttle(func, wait, options) {
|
11
|
+
var leading = true, trailing = true;
|
12
|
+
if (typeof func != "function") {
|
13
|
+
throw new TypeError(FUNC_ERROR_TEXT);
|
14
|
+
}
|
15
|
+
if (isObject(options)) {
|
16
|
+
leading = "leading" in options ? !!options.leading : leading;
|
17
|
+
trailing = "trailing" in options ? !!options.trailing : trailing;
|
18
|
+
}
|
19
|
+
return debounce(func, wait, {
|
20
|
+
"leading": leading,
|
21
|
+
"maxWait": wait,
|
22
|
+
"trailing": trailing
|
23
|
+
});
|
24
|
+
}
|
25
|
+
throttle_1 = throttle;
|
26
|
+
return throttle_1;
|
27
|
+
}
|
13
28
|
export {
|
14
|
-
|
15
|
-
languagesTable,
|
16
|
-
metadata,
|
17
|
-
taskContainer,
|
18
|
-
taskDescription,
|
19
|
-
taskTitle
|
29
|
+
requireThrottle as __require
|
20
30
|
};
|
21
31
|
//# sourceMappingURL=harmony118.mjs.map
|
package/dist/harmony118.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony118.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony118.mjs","sources":["../node_modules/lodash/throttle.js"],"sourcesContent":["var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\n"],"names":["require$$0","require$$1"],"mappings":";;;;;;;AAAA,MAAI,WAAWA,gBAAqB,GAChC,WAAWC,gBAAqB;AAGpC,MAAI,kBAAkB;AA8CtB,WAAS,SAAS,MAAM,MAAM,SAAS;AACrC,QAAI,UAAU,MACV,WAAW;AAEf,QAAI,OAAO,QAAQ,YAAY;AAC7B,YAAM,IAAI,UAAU,eAAe;AAAA,IACvC;AACE,QAAI,SAAS,OAAO,GAAG;AACrB,gBAAU,aAAa,UAAU,CAAC,CAAC,QAAQ,UAAU;AACrD,iBAAW,cAAc,UAAU,CAAC,CAAC,QAAQ,WAAW;AAAA,IAC5D;AACE,WAAO,SAAS,MAAM,MAAM;AAAA,MAC1B,WAAW;AAAA,MACX,WAAW;AAAA,MACX,YAAY;AAAA,IAChB,CAAG;AAAA,EACH;AAEA,eAAiB;;;","x_google_ignoreList":[0]}
|
package/dist/harmony119.cjs
CHANGED
package/dist/harmony119.mjs
CHANGED
package/dist/harmony120.cjs
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const _trimmedEndIndex = require("./
|
3
|
+
const _trimmedEndIndex = require("./harmony125.cjs");
|
4
4
|
var _baseTrim;
|
5
5
|
var hasRequired_baseTrim;
|
6
6
|
function require_baseTrim() {
|
package/dist/harmony120.mjs
CHANGED
package/dist/harmony121.cjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const _baseGetTag = require("./
|
4
|
-
const isObjectLike = require("./
|
3
|
+
const _baseGetTag = require("./harmony126.cjs");
|
4
|
+
const isObjectLike = require("./harmony127.cjs");
|
5
5
|
var isSymbol_1;
|
6
6
|
var hasRequiredIsSymbol;
|
7
7
|
function requireIsSymbol() {
|
package/dist/harmony121.mjs
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { __require as require_baseGetTag } from "./
|
2
|
-
import { __require as requireIsObjectLike } from "./
|
1
|
+
import { __require as require_baseGetTag } from "./harmony126.mjs";
|
2
|
+
import { __require as requireIsObjectLike } from "./harmony127.mjs";
|
3
3
|
var isSymbol_1;
|
4
4
|
var hasRequiredIsSymbol;
|
5
5
|
function requireIsSymbol() {
|
package/dist/harmony122.cjs
CHANGED
@@ -1,14 +1,49 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
4
|
+
const louis = require("@lokalise/louis");
|
5
|
+
const React = require("react");
|
6
|
+
const TasksContext = require("./harmony96.cjs");
|
7
|
+
const TaskLanguageCompleted = ({ task, language }) => {
|
8
|
+
const [loading, setLoading] = React.useState(false);
|
9
|
+
const [isMarkAsDonePromptShown, setIsMarkAsDonePromptShown] = React.useState(false);
|
10
|
+
const { onLanguageCompleteConfirm, fetchTasks } = TasksContext.useTasks();
|
11
|
+
const closePrompt = () => {
|
12
|
+
setIsMarkAsDonePromptShown(false);
|
13
|
+
};
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
15
|
+
isMarkAsDonePromptShown && /* @__PURE__ */ jsxRuntime.jsx(
|
16
|
+
louis.ConfirmModal,
|
17
|
+
{
|
18
|
+
opened: true,
|
19
|
+
loading,
|
20
|
+
title: `Are you finished with ${language.name}?`,
|
21
|
+
confirmText: "Mark as done",
|
22
|
+
closeText: "Cancel",
|
23
|
+
onClose: closePrompt,
|
24
|
+
onConfirm: async () => {
|
25
|
+
setLoading(true);
|
26
|
+
await onLanguageCompleteConfirm({ task, language, closePrompt });
|
27
|
+
fetchTasks();
|
28
|
+
},
|
29
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(louis.Alert, { status: "info", children: [
|
30
|
+
"Make sure you are finished and ",
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx("strong", { children: "mark it as done" }),
|
32
|
+
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
33
|
+
] })
|
34
|
+
}
|
35
|
+
),
|
36
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
37
|
+
louis.Link,
|
38
|
+
{
|
39
|
+
disabled: loading,
|
40
|
+
onClick: () => {
|
41
|
+
setIsMarkAsDonePromptShown(true);
|
42
|
+
},
|
43
|
+
children: "Mark as done"
|
44
|
+
}
|
45
|
+
)
|
46
|
+
] });
|
47
|
+
};
|
48
|
+
exports.TaskLanguageCompleted = TaskLanguageCompleted;
|
14
49
|
//# sourceMappingURL=harmony122.cjs.map
|
package/dist/harmony122.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony122.cjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony122.cjs","sources":["../src/components/Sidebar/Widgets/Tasks/TaskLanguageCompleted/TaskLanguageCompleted.tsx"],"sourcesContent":["import { Alert, ConfirmModal, Link } from '@lokalise/louis'\nimport { useState } from 'react'\nimport { useTasks } from '../TasksContext'\nimport type { SidebarTask, SidebarTaskLanguage } from '../types'\n\ntype TaskLanguageCompletedProps = {\n\ttask: SidebarTask\n\tlanguage: SidebarTaskLanguage\n}\n\nexport const TaskLanguageCompleted = ({ task, language }: TaskLanguageCompletedProps) => {\n\tconst [loading, setLoading] = useState(false)\n\n\tconst [isMarkAsDonePromptShown, setIsMarkAsDonePromptShown] = useState(false)\n\n\tconst { onLanguageCompleteConfirm, fetchTasks } = useTasks()\n\n\tconst closePrompt = () => {\n\t\tsetIsMarkAsDonePromptShown(false)\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{isMarkAsDonePromptShown && (\n\t\t\t\t<ConfirmModal\n\t\t\t\t\topened\n\t\t\t\t\tloading={loading}\n\t\t\t\t\ttitle={`Are you finished with ${language.name}?`}\n\t\t\t\t\tconfirmText=\"Mark as done\"\n\t\t\t\t\tcloseText=\"Cancel\"\n\t\t\t\t\tonClose={closePrompt}\n\t\t\t\t\tonConfirm={async () => {\n\t\t\t\t\t\tsetLoading(true)\n\t\t\t\t\t\tawait onLanguageCompleteConfirm({ task, language, closePrompt })\n\t\t\t\t\t\tfetchTasks()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Alert status=\"info\">\n\t\t\t\t\t\tMake sure you are finished and <strong>mark it as done</strong> to notify your team\n\t\t\t\t\t\tadmin. This action cannot be undone, and the language might no longer be available for\n\t\t\t\t\t\tyou to edit.\n\t\t\t\t\t</Alert>\n\t\t\t\t</ConfirmModal>\n\t\t\t)}\n\t\t\t<Link\n\t\t\t\tdisabled={loading}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tsetIsMarkAsDonePromptShown(true)\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tMark as done\n\t\t\t</Link>\n\t\t</>\n\t)\n}\n"],"names":["useState","useTasks","jsxs","Fragment","jsx","ConfirmModal","Alert","Link"],"mappings":";;;;;;AAUO,MAAM,wBAAwB,CAAC,EAAE,MAAM,eAA2C;AACxF,QAAM,CAAC,SAAS,UAAU,IAAIA,MAAAA,SAAS,KAAK;AAE5C,QAAM,CAAC,yBAAyB,0BAA0B,IAAIA,MAAAA,SAAS,KAAK;AAE5E,QAAM,EAAE,2BAA2B,WAAW,IAAIC,sBAAS;AAE3D,QAAM,cAAc,MAAM;AACzB,+BAA2B,KAAK;AAAA,EACjC;AAEA,SAEGC,2BAAA,KAAAC,qBAAA,EAAA,UAAA;AAAA,IACA,2BAAAC,2BAAA;AAAA,MAACC,MAAA;AAAA,MAAA;AAAA,QACA,QAAM;AAAA,QACN;AAAA,QACA,OAAO,yBAAyB,SAAS,IAAI;AAAA,QAC7C,aAAY;AAAA,QACZ,WAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW,YAAY;AACtB,qBAAW,IAAI;AACf,gBAAM,0BAA0B,EAAE,MAAM,UAAU,aAAa;AACpD,qBAAA;AAAA,QACZ;AAAA,QAEA,UAAAH,2BAAA,KAACI,MAAM,OAAA,EAAA,QAAO,QAAO,UAAA;AAAA,UAAA;AAAA,UACWF,2BAAAA,IAAC,YAAO,UAAe,kBAAA,CAAA;AAAA,UAAS;AAAA,QAAA,EAGhE,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAEDA,2BAAA;AAAA,MAACG,MAAA;AAAA,MAAA;AAAA,QACA,UAAU;AAAA,QACV,SAAS,MAAM;AACd,qCAA2B,IAAI;AAAA,QAChC;AAAA,QACA,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED,GACD;AAEF;;"}
|
package/dist/harmony122.mjs
CHANGED
@@ -1,14 +1,49 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
2
|
+
import { ConfirmModal, Alert, Link } from "@lokalise/louis";
|
3
|
+
import { useState } from "react";
|
4
|
+
import { useTasks } from "./harmony96.mjs";
|
5
|
+
const TaskLanguageCompleted = ({ task, language }) => {
|
6
|
+
const [loading, setLoading] = useState(false);
|
7
|
+
const [isMarkAsDonePromptShown, setIsMarkAsDonePromptShown] = useState(false);
|
8
|
+
const { onLanguageCompleteConfirm, fetchTasks } = useTasks();
|
9
|
+
const closePrompt = () => {
|
10
|
+
setIsMarkAsDonePromptShown(false);
|
11
|
+
};
|
12
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
13
|
+
isMarkAsDonePromptShown && /* @__PURE__ */ jsx(
|
14
|
+
ConfirmModal,
|
15
|
+
{
|
16
|
+
opened: true,
|
17
|
+
loading,
|
18
|
+
title: `Are you finished with ${language.name}?`,
|
19
|
+
confirmText: "Mark as done",
|
20
|
+
closeText: "Cancel",
|
21
|
+
onClose: closePrompt,
|
22
|
+
onConfirm: async () => {
|
23
|
+
setLoading(true);
|
24
|
+
await onLanguageCompleteConfirm({ task, language, closePrompt });
|
25
|
+
fetchTasks();
|
26
|
+
},
|
27
|
+
children: /* @__PURE__ */ jsxs(Alert, { status: "info", children: [
|
28
|
+
"Make sure you are finished and ",
|
29
|
+
/* @__PURE__ */ jsx("strong", { children: "mark it as done" }),
|
30
|
+
" to notify your team admin. This action cannot be undone, and the language might no longer be available for you to edit."
|
31
|
+
] })
|
32
|
+
}
|
33
|
+
),
|
34
|
+
/* @__PURE__ */ jsx(
|
35
|
+
Link,
|
36
|
+
{
|
37
|
+
disabled: loading,
|
38
|
+
onClick: () => {
|
39
|
+
setIsMarkAsDonePromptShown(true);
|
40
|
+
},
|
41
|
+
children: "Mark as done"
|
42
|
+
}
|
43
|
+
)
|
44
|
+
] });
|
45
|
+
};
|
11
46
|
export {
|
12
|
-
|
47
|
+
TaskLanguageCompleted
|
13
48
|
};
|
14
49
|
//# sourceMappingURL=harmony122.mjs.map
|
package/dist/harmony122.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony122.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony122.mjs","sources":["../src/components/Sidebar/Widgets/Tasks/TaskLanguageCompleted/TaskLanguageCompleted.tsx"],"sourcesContent":["import { Alert, ConfirmModal, Link } from '@lokalise/louis'\nimport { useState } from 'react'\nimport { useTasks } from '../TasksContext'\nimport type { SidebarTask, SidebarTaskLanguage } from '../types'\n\ntype TaskLanguageCompletedProps = {\n\ttask: SidebarTask\n\tlanguage: SidebarTaskLanguage\n}\n\nexport const TaskLanguageCompleted = ({ task, language }: TaskLanguageCompletedProps) => {\n\tconst [loading, setLoading] = useState(false)\n\n\tconst [isMarkAsDonePromptShown, setIsMarkAsDonePromptShown] = useState(false)\n\n\tconst { onLanguageCompleteConfirm, fetchTasks } = useTasks()\n\n\tconst closePrompt = () => {\n\t\tsetIsMarkAsDonePromptShown(false)\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t{isMarkAsDonePromptShown && (\n\t\t\t\t<ConfirmModal\n\t\t\t\t\topened\n\t\t\t\t\tloading={loading}\n\t\t\t\t\ttitle={`Are you finished with ${language.name}?`}\n\t\t\t\t\tconfirmText=\"Mark as done\"\n\t\t\t\t\tcloseText=\"Cancel\"\n\t\t\t\t\tonClose={closePrompt}\n\t\t\t\t\tonConfirm={async () => {\n\t\t\t\t\t\tsetLoading(true)\n\t\t\t\t\t\tawait onLanguageCompleteConfirm({ task, language, closePrompt })\n\t\t\t\t\t\tfetchTasks()\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<Alert status=\"info\">\n\t\t\t\t\t\tMake sure you are finished and <strong>mark it as done</strong> to notify your team\n\t\t\t\t\t\tadmin. This action cannot be undone, and the language might no longer be available for\n\t\t\t\t\t\tyou to edit.\n\t\t\t\t\t</Alert>\n\t\t\t\t</ConfirmModal>\n\t\t\t)}\n\t\t\t<Link\n\t\t\t\tdisabled={loading}\n\t\t\t\tonClick={() => {\n\t\t\t\t\tsetIsMarkAsDonePromptShown(true)\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\tMark as done\n\t\t\t</Link>\n\t\t</>\n\t)\n}\n"],"names":[],"mappings":";;;;AAUO,MAAM,wBAAwB,CAAC,EAAE,MAAM,eAA2C;AACxF,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAE5C,QAAM,CAAC,yBAAyB,0BAA0B,IAAI,SAAS,KAAK;AAE5E,QAAM,EAAE,2BAA2B,WAAW,IAAI,SAAS;AAE3D,QAAM,cAAc,MAAM;AACzB,+BAA2B,KAAK;AAAA,EACjC;AAEA,SAEG,qBAAA,UAAA,EAAA,UAAA;AAAA,IACA,2BAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,QAAM;AAAA,QACN;AAAA,QACA,OAAO,yBAAyB,SAAS,IAAI;AAAA,QAC7C,aAAY;AAAA,QACZ,WAAU;AAAA,QACV,SAAS;AAAA,QACT,WAAW,YAAY;AACtB,qBAAW,IAAI;AACf,gBAAM,0BAA0B,EAAE,MAAM,UAAU,aAAa;AACpD,qBAAA;AAAA,QACZ;AAAA,QAEA,UAAA,qBAAC,OAAM,EAAA,QAAO,QAAO,UAAA;AAAA,UAAA;AAAA,UACW,oBAAC,YAAO,UAAe,kBAAA,CAAA;AAAA,UAAS;AAAA,QAAA,EAGhE,CAAA;AAAA,MAAA;AAAA,IACD;AAAA,IAED;AAAA,MAAC;AAAA,MAAA;AAAA,QACA,UAAU;AAAA,QACV,SAAS,MAAM;AACd,qCAA2B,IAAI;AAAA,QAChC;AAAA,QACA,UAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAED,GACD;AAEF;"}
|