@lokalise/harmony 1.27.3-exp-fixTeamsTypes.8 → 1.27.3-exp-teamTypes.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harmony100.cjs +7 -5
- package/dist/harmony100.cjs.map +1 -1
- package/dist/harmony100.mjs +7 -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 +6 -5
- package/dist/harmony104.cjs.map +1 -1
- package/dist/harmony104.mjs +6 -5
- package/dist/harmony105.cjs +5 -5
- package/dist/harmony105.mjs +5 -5
- package/dist/harmony106.cjs +5 -6
- package/dist/harmony106.cjs.map +1 -1
- package/dist/harmony106.mjs +5 -6
- package/dist/harmony107.cjs +61 -95
- package/dist/harmony107.cjs.map +1 -1
- package/dist/harmony107.mjs +61 -95
- package/dist/harmony107.mjs.map +1 -1
- package/dist/harmony108.cjs +88 -13
- package/dist/harmony108.cjs.map +1 -1
- package/dist/harmony108.mjs +88 -13
- package/dist/harmony108.mjs.map +1 -1
- package/dist/harmony109.cjs +19 -15
- package/dist/harmony109.cjs.map +1 -1
- package/dist/harmony109.mjs +18 -14
- package/dist/harmony109.mjs.map +1 -1
- package/dist/harmony110.cjs +94 -34
- package/dist/harmony110.cjs.map +1 -1
- package/dist/harmony110.mjs +94 -34
- package/dist/harmony110.mjs.map +1 -1
- package/dist/harmony111.cjs +11 -26
- package/dist/harmony111.cjs.map +1 -1
- package/dist/harmony111.mjs +11 -26
- package/dist/harmony111.mjs.map +1 -1
- package/dist/harmony112.cjs +12 -60
- package/dist/harmony112.cjs.map +1 -1
- package/dist/harmony112.mjs +12 -60
- package/dist/harmony112.mjs.map +1 -1
- package/dist/harmony113.cjs +36 -88
- package/dist/harmony113.cjs.map +1 -1
- package/dist/harmony113.mjs +36 -88
- package/dist/harmony113.mjs.map +1 -1
- package/dist/harmony114.cjs +29 -19
- package/dist/harmony114.cjs.map +1 -1
- package/dist/harmony114.mjs +28 -18
- package/dist/harmony114.mjs.map +1 -1
- package/dist/harmony115.cjs +7 -13
- package/dist/harmony115.cjs.map +1 -1
- package/dist/harmony115.mjs +7 -13
- package/dist/harmony115.mjs.map +1 -1
- package/dist/harmony116.cjs +57 -15
- package/dist/harmony116.cjs.map +1 -1
- package/dist/harmony116.mjs +57 -15
- package/dist/harmony116.mjs.map +1 -1
- package/dist/harmony117.cjs +59 -15
- package/dist/harmony117.cjs.map +1 -1
- package/dist/harmony117.mjs +59 -15
- package/dist/harmony117.mjs.map +1 -1
- package/dist/harmony118.cjs +19 -12
- package/dist/harmony118.cjs.map +1 -1
- package/dist/harmony118.mjs +18 -11
- package/dist/harmony118.mjs.map +1 -1
- package/dist/harmony119.cjs +12 -15
- package/dist/harmony119.cjs.map +1 -1
- package/dist/harmony119.mjs +12 -15
- package/dist/harmony119.mjs.map +1 -1
- package/dist/harmony120.cjs +13 -19
- package/dist/harmony120.cjs.map +1 -1
- package/dist/harmony120.mjs +13 -19
- package/dist/harmony120.mjs.map +1 -1
- package/dist/harmony121.cjs +14 -10
- package/dist/harmony121.cjs.map +1 -1
- package/dist/harmony121.mjs +14 -10
- package/dist/harmony121.mjs.map +1 -1
- package/dist/harmony122.cjs +11 -7
- package/dist/harmony122.cjs.map +1 -1
- package/dist/harmony122.mjs +11 -7
- package/dist/harmony122.mjs.map +1 -1
- package/dist/harmony123.cjs +15 -56
- package/dist/harmony123.cjs.map +1 -1
- package/dist/harmony123.mjs +15 -56
- package/dist/harmony123.mjs.map +1 -1
- package/dist/harmony124.cjs +20 -59
- package/dist/harmony124.cjs.map +1 -1
- package/dist/harmony124.mjs +20 -59
- package/dist/harmony124.mjs.map +1 -1
- package/dist/harmony125.cjs +13 -19
- package/dist/harmony125.cjs.map +1 -1
- package/dist/harmony125.mjs +12 -18
- package/dist/harmony125.mjs.map +1 -1
- package/dist/harmony126.cjs +46 -6
- package/dist/harmony126.cjs.map +1 -1
- package/dist/harmony126.mjs +46 -6
- package/dist/harmony126.mjs.map +1 -1
- package/dist/harmony127.cjs +13 -13
- package/dist/harmony127.cjs.map +1 -1
- package/dist/harmony127.mjs +12 -12
- 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/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.cjs.map +1 -1
- package/dist/harmony71.mjs +2 -2
- package/dist/harmony71.mjs.map +1 -1
- 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 +33 -9
- package/dist/harmony83.cjs.map +1 -1
- package/dist/harmony83.mjs +32 -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 +2 -2
- package/dist/harmony92.mjs +2 -2
- package/dist/harmony93.cjs +22 -17
- package/dist/harmony93.cjs.map +1 -1
- package/dist/harmony93.mjs +21 -16
- package/dist/harmony93.mjs.map +1 -1
- package/dist/harmony94.cjs +6 -18
- package/dist/harmony94.cjs.map +1 -1
- package/dist/harmony94.mjs +6 -18
- package/dist/harmony94.mjs.map +1 -1
- package/dist/harmony95.cjs +130 -12
- package/dist/harmony95.cjs.map +1 -1
- package/dist/harmony95.mjs +130 -12
- package/dist/harmony95.mjs.map +1 -1
- package/dist/harmony96.cjs +9 -18
- package/dist/harmony96.cjs.map +1 -1
- package/dist/harmony96.mjs +9 -18
- package/dist/harmony96.mjs.map +1 -1
- package/dist/harmony97.cjs +5 -5
- package/dist/harmony97.cjs.map +1 -1
- package/dist/harmony97.mjs +5 -5
- package/dist/harmony97.mjs.map +1 -1
- package/dist/harmony98.cjs +37 -129
- package/dist/harmony98.cjs.map +1 -1
- package/dist/harmony98.mjs +37 -129
- package/dist/harmony98.mjs.map +1 -1
- package/dist/harmony99.cjs +60 -12
- package/dist/harmony99.cjs.map +1 -1
- package/dist/harmony99.mjs +59 -11
- package/dist/harmony99.mjs.map +1 -1
- package/package.json +1 -1
package/dist/harmony113.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony113.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony113.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/harmony114.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("./harmony110.cjs");
|
4
|
+
const isObject = require("./harmony111.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=harmony114.cjs.map
|
package/dist/harmony114.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony114.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony114.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/harmony114.mjs
CHANGED
@@ -1,21 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
import { __require as requireDebounce } from "./harmony110.mjs";
|
2
|
+
import { __require as requireIsObject } from "./harmony111.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
|
-
loadingContainer,
|
16
|
-
noTasksContainer,
|
17
|
-
noTasksHeading,
|
18
|
-
noTasksText,
|
19
|
-
tasksContainer
|
29
|
+
requireThrottle as __require
|
20
30
|
};
|
21
31
|
//# sourceMappingURL=harmony114.mjs.map
|
package/dist/harmony114.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony114.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"harmony114.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/harmony115.cjs
CHANGED
@@ -1,16 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
3
|
-
const
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
11
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
12
|
-
_root = root;
|
13
|
-
return _root;
|
14
|
-
}
|
15
|
-
exports.__require = require_root;
|
3
|
+
const splitFileName = (fileName) => {
|
4
|
+
const lastDotIndex = fileName.lastIndexOf(".");
|
5
|
+
const name = fileName.slice(0, lastDotIndex);
|
6
|
+
const extension = fileName.slice(lastDotIndex + 1);
|
7
|
+
return { name, extension };
|
8
|
+
};
|
9
|
+
exports.splitFileName = splitFileName;
|
16
10
|
//# sourceMappingURL=harmony115.cjs.map
|
package/dist/harmony115.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony115.cjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony115.cjs","sources":["../src/components/Sidebar/utils/index.ts"],"sourcesContent":["export const splitFileName = (fileName: string) => {\n\tconst lastDotIndex = fileName.lastIndexOf('.')\n\tconst name = fileName.slice(0, lastDotIndex)\n\tconst extension = fileName.slice(lastDotIndex + 1)\n\n\treturn { name, extension }\n}\n"],"names":[],"mappings":";;AAAa,MAAA,gBAAgB,CAAC,aAAqB;AAC5C,QAAA,eAAe,SAAS,YAAY,GAAG;AAC7C,QAAM,OAAO,SAAS,MAAM,GAAG,YAAY;AAC3C,QAAM,YAAY,SAAS,MAAM,eAAe,CAAC;AAE1C,SAAA,EAAE,MAAM,UAAU;AAC1B;;"}
|
package/dist/harmony115.mjs
CHANGED
@@ -1,16 +1,10 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
var freeGlobal = require_freeGlobal();
|
8
|
-
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
9
|
-
var root = freeGlobal || freeSelf || Function("return this")();
|
10
|
-
_root = root;
|
11
|
-
return _root;
|
12
|
-
}
|
1
|
+
const splitFileName = (fileName) => {
|
2
|
+
const lastDotIndex = fileName.lastIndexOf(".");
|
3
|
+
const name = fileName.slice(0, lastDotIndex);
|
4
|
+
const extension = fileName.slice(lastDotIndex + 1);
|
5
|
+
return { name, extension };
|
6
|
+
};
|
13
7
|
export {
|
14
|
-
|
8
|
+
splitFileName
|
15
9
|
};
|
16
10
|
//# sourceMappingURL=harmony115.mjs.map
|
package/dist/harmony115.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony115.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony115.mjs","sources":["../src/components/Sidebar/utils/index.ts"],"sourcesContent":["export const splitFileName = (fileName: string) => {\n\tconst lastDotIndex = fileName.lastIndexOf('.')\n\tconst name = fileName.slice(0, lastDotIndex)\n\tconst extension = fileName.slice(lastDotIndex + 1)\n\n\treturn { name, extension }\n}\n"],"names":[],"mappings":"AAAa,MAAA,gBAAgB,CAAC,aAAqB;AAC5C,QAAA,eAAe,SAAS,YAAY,GAAG;AAC7C,QAAM,OAAO,SAAS,MAAM,GAAG,YAAY;AAC3C,QAAM,YAAY,SAAS,MAAM,eAAe,CAAC;AAE1C,SAAA,EAAE,MAAM,UAAU;AAC1B;"}
|
package/dist/harmony116.cjs
CHANGED
@@ -1,18 +1,60 @@
|
|
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
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
4
|
+
const louis = require("@lokalise/louis");
|
5
|
+
const content = require("./harmony117.cjs");
|
6
|
+
const types = require("./harmony2.cjs");
|
7
|
+
const clsx = require("./harmony62.cjs");
|
8
|
+
const TaskLanguageCompleted = require("./harmony126.cjs");
|
9
|
+
const TasksContext = require("./harmony97.cjs");
|
10
|
+
const TaskLanguage_module = require("./harmony127.cjs");
|
11
|
+
const TaskLanguage = ({ language, task }) => {
|
12
|
+
const { getProjectUrl, langNameOnClick, langProgressOnClick } = TasksContext.useTasks();
|
13
|
+
const progressValue = language.progress ?? 0;
|
14
|
+
const isLanguageCompleted = language.status === types.SidebarTaskLanguageStatuses.Completed;
|
15
|
+
const languageProgressCompleted = content.isLanguageProgressCompleted(task, language);
|
16
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
17
|
+
"tr",
|
18
|
+
{
|
19
|
+
className: clsx.clsx({
|
20
|
+
[TaskLanguage_module.default.langRowCompleted]: languageProgressCompleted
|
21
|
+
}),
|
22
|
+
children: [
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { children: /* @__PURE__ */ jsxRuntime.jsx(louis.Tooltip, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ jsxRuntime.jsx(
|
24
|
+
louis.Link,
|
25
|
+
{
|
26
|
+
href: getProjectUrl({ task, language }),
|
27
|
+
onClick: () => {
|
28
|
+
langNameOnClick == null ? void 0 : langNameOnClick({ task, language });
|
29
|
+
},
|
30
|
+
children: language.name
|
31
|
+
}
|
32
|
+
) }) }),
|
33
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { className: TaskLanguage_module.default.langCellSecondary, children: languageProgressCompleted || isLanguageCompleted ? "0" : /* @__PURE__ */ jsxRuntime.jsx(louis.Tooltip, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ jsxRuntime.jsx(
|
34
|
+
louis.Link,
|
35
|
+
{
|
36
|
+
href: getProjectUrl({ task, language, taskUncompleted: true }),
|
37
|
+
onClick: () => {
|
38
|
+
langProgressOnClick == null ? void 0 : langProgressOnClick({ task, language });
|
39
|
+
},
|
40
|
+
children: language.base_words_total - language.base_words_done
|
41
|
+
}
|
42
|
+
) }) }),
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsxs("td", { children: [
|
44
|
+
progressValue,
|
45
|
+
"%"
|
46
|
+
] }),
|
47
|
+
/* @__PURE__ */ jsxRuntime.jsx("td", { children: languageProgressCompleted ? /* @__PURE__ */ jsxRuntime.jsx(TaskLanguageCompleted.TaskLanguageCompleted, { task, language }) : /* @__PURE__ */ jsxRuntime.jsx(
|
48
|
+
"span",
|
49
|
+
{
|
50
|
+
className: `${TaskLanguage_module.default.langStatus} flex-row items-center justify-start`,
|
51
|
+
"data-status": language.status,
|
52
|
+
children: content.getStatusText(language.status, progressValue)
|
53
|
+
}
|
54
|
+
) })
|
55
|
+
]
|
56
|
+
}
|
57
|
+
);
|
58
|
+
};
|
59
|
+
exports.TaskLanguage = TaskLanguage;
|
18
60
|
//# sourceMappingURL=harmony116.cjs.map
|
package/dist/harmony116.cjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony116.cjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony116.cjs","sources":["../src/components/Sidebar/Widgets/Tasks/TaskLanguage/TaskLanguage.tsx"],"sourcesContent":["import { Link, Tooltip } from '@lokalise/louis'\nimport { getStatusText, isLanguageProgressCompleted } from '../utils/content'\n\nimport { type SidebarTask, type SidebarTaskLanguage, SidebarTaskLanguageStatuses } from '../types'\n\nimport clsx from 'clsx'\nimport { TaskLanguageCompleted } from '../TaskLanguageCompleted/TaskLanguageCompleted'\nimport { useTasks } from '../TasksContext'\nimport styles from './TaskLanguage.module.css'\n\nexport type TaskLanguageProps = {\n\ttask: SidebarTask\n\tlanguage: SidebarTaskLanguage\n}\n\nexport const TaskLanguage = ({ language, task }: TaskLanguageProps) => {\n\tconst { getProjectUrl, langNameOnClick, langProgressOnClick } = useTasks()\n\n\tconst progressValue = language.progress ?? 0\n\n\tconst isLanguageCompleted = language.status === SidebarTaskLanguageStatuses.Completed\n\n\tconst languageProgressCompleted = isLanguageProgressCompleted(task, language)\n\n\treturn (\n\t\t<tr\n\t\t\tclassName={clsx({\n\t\t\t\t[styles.langRowCompleted]: languageProgressCompleted,\n\t\t\t})}\n\t\t>\n\t\t\t<td>\n\t\t\t\t<Tooltip tooltip=\"Open in bilingual view\">\n\t\t\t\t\t<Link\n\t\t\t\t\t\thref={getProjectUrl({ task, language })}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tlangNameOnClick?.({ task, language })\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{language.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Tooltip>\n\t\t\t</td>\n\t\t\t<td className={styles.langCellSecondary}>\n\t\t\t\t{languageProgressCompleted || isLanguageCompleted ? (\n\t\t\t\t\t'0'\n\t\t\t\t) : (\n\t\t\t\t\t<Tooltip tooltip=\"Open uncompleted items\">\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref={getProjectUrl({ task, language, taskUncompleted: true })}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tlangProgressOnClick?.({ task, language })\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{language.base_words_total - language.base_words_done}\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t</td>\n\t\t\t<td>{progressValue}%</td>\n\t\t\t<td>\n\t\t\t\t{languageProgressCompleted ? (\n\t\t\t\t\t<TaskLanguageCompleted task={task} language={language} />\n\t\t\t\t) : (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={`${styles.langStatus} flex-row items-center justify-start`}\n\t\t\t\t\t\tdata-status={language.status}\n\t\t\t\t\t>\n\t\t\t\t\t\t{getStatusText(language.status, progressValue)}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</td>\n\t\t</tr>\n\t)\n}\n"],"names":["useTasks","SidebarTaskLanguageStatuses","isLanguageProgressCompleted","jsxs","clsx","styles","jsx","Tooltip","Link","TaskLanguageCompleted","getStatusText"],"mappings":";;;;;;;;;;AAeO,MAAM,eAAe,CAAC,EAAE,UAAU,WAA8B;AACtE,QAAM,EAAE,eAAe,iBAAiB,oBAAA,IAAwBA,aAAAA,SAAS;AAEnE,QAAA,gBAAgB,SAAS,YAAY;AAErC,QAAA,sBAAsB,SAAS,WAAWC,MAA4B,4BAAA;AAEtE,QAAA,4BAA4BC,QAAAA,4BAA4B,MAAM,QAAQ;AAG3E,SAAAC,2BAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAWC,KAAAA,KAAK;AAAA,QACf,CAACC,oBAAAA,QAAO,gBAAgB,GAAG;AAAA,MAAA,CAC3B;AAAA,MAED,UAAA;AAAA,QAAAC,+BAAC,MACA,EAAA,UAAAA,2BAAA,IAACC,MAAQ,SAAA,EAAA,SAAQ,0BAChB,UAAAD,2BAAA;AAAA,UAACE,MAAA;AAAA,UAAA;AAAA,YACA,MAAM,cAAc,EAAE,MAAM,UAAU;AAAA,YACtC,SAAS,MAAM;AACI,iEAAA,EAAE,MAAM;YAC3B;AAAA,YAEC,UAAS,SAAA;AAAA,UAAA;AAAA,WAEZ,EACD,CAAA;AAAA,QACAF,2BAAA,IAAC,MAAG,EAAA,WAAWD,oBAAAA,QAAO,mBACpB,UAA6B,6BAAA,sBAC7B,MAEAC,2BAAA,IAACC,MAAQ,SAAA,EAAA,SAAQ,0BAChB,UAAAD,2BAAA;AAAA,UAACE,MAAA;AAAA,UAAA;AAAA,YACA,MAAM,cAAc,EAAE,MAAM,UAAU,iBAAiB,MAAM;AAAA,YAC7D,SAAS,MAAM;AACQ,yEAAA,EAAE,MAAM;YAC/B;AAAA,YAEC,UAAA,SAAS,mBAAmB,SAAS;AAAA,UAAA;AAAA,WAExC,EAEF,CAAA;AAAA,wCACC,MAAI,EAAA,UAAA;AAAA,UAAA;AAAA,UAAc;AAAA,QAAA,GAAC;AAAA,uCACnB,MACC,EAAA,UAAA,2DACCC,sBAAsB,uBAAA,EAAA,MAAY,SAAoB,CAAA,IAEvDH,2BAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAW,GAAGD,4BAAO,UAAU;AAAA,YAC/B,eAAa,SAAS;AAAA,YAErB,UAAAK,QAAA,cAAc,SAAS,QAAQ,aAAa;AAAA,UAAA;AAAA,QAAA,EAGhD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;;"}
|
package/dist/harmony116.mjs
CHANGED
@@ -1,18 +1,60 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
2
|
+
import { Tooltip, Link } from "@lokalise/louis";
|
3
|
+
import { isLanguageProgressCompleted, getStatusText } from "./harmony117.mjs";
|
4
|
+
import { SidebarTaskLanguageStatuses } from "./harmony2.mjs";
|
5
|
+
import { clsx } from "./harmony62.mjs";
|
6
|
+
import { TaskLanguageCompleted } from "./harmony126.mjs";
|
7
|
+
import { useTasks } from "./harmony97.mjs";
|
8
|
+
import styles from "./harmony127.mjs";
|
9
|
+
const TaskLanguage = ({ language, task }) => {
|
10
|
+
const { getProjectUrl, langNameOnClick, langProgressOnClick } = useTasks();
|
11
|
+
const progressValue = language.progress ?? 0;
|
12
|
+
const isLanguageCompleted = language.status === SidebarTaskLanguageStatuses.Completed;
|
13
|
+
const languageProgressCompleted = isLanguageProgressCompleted(task, language);
|
14
|
+
return /* @__PURE__ */ jsxs(
|
15
|
+
"tr",
|
16
|
+
{
|
17
|
+
className: clsx({
|
18
|
+
[styles.langRowCompleted]: languageProgressCompleted
|
19
|
+
}),
|
20
|
+
children: [
|
21
|
+
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Tooltip, { tooltip: "Open in bilingual view", children: /* @__PURE__ */ jsx(
|
22
|
+
Link,
|
23
|
+
{
|
24
|
+
href: getProjectUrl({ task, language }),
|
25
|
+
onClick: () => {
|
26
|
+
langNameOnClick == null ? void 0 : langNameOnClick({ task, language });
|
27
|
+
},
|
28
|
+
children: language.name
|
29
|
+
}
|
30
|
+
) }) }),
|
31
|
+
/* @__PURE__ */ jsx("td", { className: styles.langCellSecondary, children: languageProgressCompleted || isLanguageCompleted ? "0" : /* @__PURE__ */ jsx(Tooltip, { tooltip: "Open uncompleted items", children: /* @__PURE__ */ jsx(
|
32
|
+
Link,
|
33
|
+
{
|
34
|
+
href: getProjectUrl({ task, language, taskUncompleted: true }),
|
35
|
+
onClick: () => {
|
36
|
+
langProgressOnClick == null ? void 0 : langProgressOnClick({ task, language });
|
37
|
+
},
|
38
|
+
children: language.base_words_total - language.base_words_done
|
39
|
+
}
|
40
|
+
) }) }),
|
41
|
+
/* @__PURE__ */ jsxs("td", { children: [
|
42
|
+
progressValue,
|
43
|
+
"%"
|
44
|
+
] }),
|
45
|
+
/* @__PURE__ */ jsx("td", { children: languageProgressCompleted ? /* @__PURE__ */ jsx(TaskLanguageCompleted, { task, language }) : /* @__PURE__ */ jsx(
|
46
|
+
"span",
|
47
|
+
{
|
48
|
+
className: `${styles.langStatus} flex-row items-center justify-start`,
|
49
|
+
"data-status": language.status,
|
50
|
+
children: getStatusText(language.status, progressValue)
|
51
|
+
}
|
52
|
+
) })
|
53
|
+
]
|
54
|
+
}
|
55
|
+
);
|
56
|
+
};
|
15
57
|
export {
|
16
|
-
|
58
|
+
TaskLanguage
|
17
59
|
};
|
18
60
|
//# sourceMappingURL=harmony116.mjs.map
|
package/dist/harmony116.mjs.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"harmony116.mjs","sources":["../
|
1
|
+
{"version":3,"file":"harmony116.mjs","sources":["../src/components/Sidebar/Widgets/Tasks/TaskLanguage/TaskLanguage.tsx"],"sourcesContent":["import { Link, Tooltip } from '@lokalise/louis'\nimport { getStatusText, isLanguageProgressCompleted } from '../utils/content'\n\nimport { type SidebarTask, type SidebarTaskLanguage, SidebarTaskLanguageStatuses } from '../types'\n\nimport clsx from 'clsx'\nimport { TaskLanguageCompleted } from '../TaskLanguageCompleted/TaskLanguageCompleted'\nimport { useTasks } from '../TasksContext'\nimport styles from './TaskLanguage.module.css'\n\nexport type TaskLanguageProps = {\n\ttask: SidebarTask\n\tlanguage: SidebarTaskLanguage\n}\n\nexport const TaskLanguage = ({ language, task }: TaskLanguageProps) => {\n\tconst { getProjectUrl, langNameOnClick, langProgressOnClick } = useTasks()\n\n\tconst progressValue = language.progress ?? 0\n\n\tconst isLanguageCompleted = language.status === SidebarTaskLanguageStatuses.Completed\n\n\tconst languageProgressCompleted = isLanguageProgressCompleted(task, language)\n\n\treturn (\n\t\t<tr\n\t\t\tclassName={clsx({\n\t\t\t\t[styles.langRowCompleted]: languageProgressCompleted,\n\t\t\t})}\n\t\t>\n\t\t\t<td>\n\t\t\t\t<Tooltip tooltip=\"Open in bilingual view\">\n\t\t\t\t\t<Link\n\t\t\t\t\t\thref={getProjectUrl({ task, language })}\n\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\tlangNameOnClick?.({ task, language })\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t{language.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Tooltip>\n\t\t\t</td>\n\t\t\t<td className={styles.langCellSecondary}>\n\t\t\t\t{languageProgressCompleted || isLanguageCompleted ? (\n\t\t\t\t\t'0'\n\t\t\t\t) : (\n\t\t\t\t\t<Tooltip tooltip=\"Open uncompleted items\">\n\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\thref={getProjectUrl({ task, language, taskUncompleted: true })}\n\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\tlangProgressOnClick?.({ task, language })\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{language.base_words_total - language.base_words_done}\n\t\t\t\t\t\t</Link>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t)}\n\t\t\t</td>\n\t\t\t<td>{progressValue}%</td>\n\t\t\t<td>\n\t\t\t\t{languageProgressCompleted ? (\n\t\t\t\t\t<TaskLanguageCompleted task={task} language={language} />\n\t\t\t\t) : (\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={`${styles.langStatus} flex-row items-center justify-start`}\n\t\t\t\t\t\tdata-status={language.status}\n\t\t\t\t\t>\n\t\t\t\t\t\t{getStatusText(language.status, progressValue)}\n\t\t\t\t\t</span>\n\t\t\t\t)}\n\t\t\t</td>\n\t\t</tr>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;;AAeO,MAAM,eAAe,CAAC,EAAE,UAAU,WAA8B;AACtE,QAAM,EAAE,eAAe,iBAAiB,oBAAA,IAAwB,SAAS;AAEnE,QAAA,gBAAgB,SAAS,YAAY;AAErC,QAAA,sBAAsB,SAAS,WAAW,4BAA4B;AAEtE,QAAA,4BAA4B,4BAA4B,MAAM,QAAQ;AAG3E,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,WAAW,KAAK;AAAA,QACf,CAAC,OAAO,gBAAgB,GAAG;AAAA,MAAA,CAC3B;AAAA,MAED,UAAA;AAAA,QAAA,oBAAC,MACA,EAAA,UAAA,oBAAC,SAAQ,EAAA,SAAQ,0BAChB,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,MAAM,cAAc,EAAE,MAAM,UAAU;AAAA,YACtC,SAAS,MAAM;AACI,iEAAA,EAAE,MAAM;YAC3B;AAAA,YAEC,UAAS,SAAA;AAAA,UAAA;AAAA,WAEZ,EACD,CAAA;AAAA,QACA,oBAAC,MAAG,EAAA,WAAW,OAAO,mBACpB,UAA6B,6BAAA,sBAC7B,MAEA,oBAAC,SAAQ,EAAA,SAAQ,0BAChB,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,MAAM,cAAc,EAAE,MAAM,UAAU,iBAAiB,MAAM;AAAA,YAC7D,SAAS,MAAM;AACQ,yEAAA,EAAE,MAAM;YAC/B;AAAA,YAEC,UAAA,SAAS,mBAAmB,SAAS;AAAA,UAAA;AAAA,WAExC,EAEF,CAAA;AAAA,6BACC,MAAI,EAAA,UAAA;AAAA,UAAA;AAAA,UAAc;AAAA,QAAA,GAAC;AAAA,4BACnB,MACC,EAAA,UAAA,gDACC,uBAAsB,EAAA,MAAY,SAAoB,CAAA,IAEvD;AAAA,UAAC;AAAA,UAAA;AAAA,YACA,WAAW,GAAG,OAAO,UAAU;AAAA,YAC/B,eAAa,SAAS;AAAA,YAErB,UAAA,cAAc,SAAS,QAAQ,aAAa;AAAA,UAAA;AAAA,QAAA,EAGhD,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACD;AAEF;"}
|
package/dist/harmony117.cjs
CHANGED
@@ -1,19 +1,63 @@
|
|
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
|
-
|
3
|
+
const types = require("./harmony2.cjs");
|
4
|
+
const getStatusText = (status, progressValue) => {
|
5
|
+
switch (status) {
|
6
|
+
case types.SidebarTaskLanguageStatuses.Completed:
|
7
|
+
return progressValue < 100 ? "Closed" : "Completed";
|
8
|
+
case types.SidebarTaskLanguageStatuses.Created:
|
9
|
+
return progressValue > 0 ? "In progress" : "Not started";
|
10
|
+
case types.SidebarTaskLanguageStatuses.InProgress:
|
11
|
+
return "In progress";
|
12
|
+
case types.SidebarTaskLanguageStatuses.Queued:
|
13
|
+
return "Queued";
|
14
|
+
case types.SidebarTaskLanguageStatuses.NotStarted:
|
15
|
+
return "Not started";
|
16
|
+
default:
|
17
|
+
return "-";
|
14
18
|
}
|
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;
|
42
|
+
}
|
43
|
+
if (b.status === types.SidebarTaskLanguageStatuses.InProgress && b.progress === 100) {
|
44
|
+
return 1;
|
45
|
+
}
|
46
|
+
if (a.status === b.status) {
|
47
|
+
return a.name < b.name ? 1 : -1;
|
48
|
+
}
|
49
|
+
return statusSortOrder.indexOf(a.status) - statusSortOrder.indexOf(b.status);
|
50
|
+
});
|
51
|
+
};
|
52
|
+
const isInProgressOrCreated = (status) => {
|
53
|
+
return [types.SidebarTaskStatuses.InProgress, types.SidebarTaskStatuses.Created].includes(status);
|
54
|
+
};
|
55
|
+
const isLanguageProgressCompleted = (task, language) => {
|
56
|
+
return isInProgressOrCreated(task.status) && isInProgressOrCreated(language.status) && (language.progress ?? 0) >= 100;
|
57
|
+
};
|
58
|
+
exports.getStatusText = getStatusText;
|
59
|
+
exports.getTaskLanguages = getTaskLanguages;
|
60
|
+
exports.isLanguageProgressCompleted = isLanguageProgressCompleted;
|
61
|
+
exports.resolveStatus = resolveStatus;
|
62
|
+
exports.tagColor = tagColor;
|
19
63
|
//# 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":["../src/components/Sidebar/Widgets/Tasks/utils/content.ts"],"sourcesContent":["import {\n\ttype SidebarTask,\n\ttype SidebarTaskLanguage,\n\ttype SidebarTaskLanguageStatus,\n\tSidebarTaskLanguageStatuses,\n\ttype SidebarTaskStatus,\n\tSidebarTaskStatuses,\n\ttype SidebarTaskTypeOption,\n\tSidebarTaskTypeOptions,\n} from '../types'\n\nexport const getStatusText = (status: SidebarTaskLanguageStatus, progressValue: number) => {\n\tswitch (status) {\n\t\tcase SidebarTaskLanguageStatuses.Completed:\n\t\t\treturn progressValue < 100 ? 'Closed' : 'Completed'\n\t\tcase SidebarTaskLanguageStatuses.Created:\n\t\t\t// For some reason project task lang status is not correctly updated to \"in progress\". So instead\n\t\t\t// we need to rely on `created` status and progress value is not 0.\n\t\t\treturn progressValue > 0 ? 'In progress' : 'Not started'\n\t\tcase SidebarTaskLanguageStatuses.InProgress:\n\t\t\treturn 'In progress'\n\t\tcase SidebarTaskLanguageStatuses.Queued:\n\t\t\treturn 'Queued'\n\t\tcase SidebarTaskLanguageStatuses.NotStarted:\n\t\t\treturn 'Not started'\n\t\tdefault:\n\t\t\treturn '-'\n\t}\n}\n\nexport const resolveStatus = (language: SidebarTaskLanguage): SidebarTaskLanguageStatus => {\n\tconst progress = language.progress ?? 0\n\n\tif (language.status === SidebarTaskLanguageStatuses.Created && progress > 0) {\n\t\t// For some reason project task lang status is not correctly updated to \"in progress\". So instead\n\t\t// we need to rely on `created` status and progress value is not 0.\n\t\treturn SidebarTaskLanguageStatuses.InProgress\n\t}\n\n\treturn language.status\n}\n\n/**\n * TODO - these should be taken from louis\n */\nexport const tagColor: Record<SidebarTaskTypeOption, string> = {\n\t[SidebarTaskTypeOptions.translation]: '#0891B2',\n\t[SidebarTaskTypeOptions.review]: '#16922D',\n\t[SidebarTaskTypeOptions.lqa_by_ai]: '#8B5CF6',\n\t[SidebarTaskTypeOptions.automatic_translation]: '#60A5FA',\n}\n\nexport const getTaskLanguages = (langs: SidebarTaskLanguage[]) => {\n\tconst statusSortOrder: SidebarTaskLanguageStatus[] = [\n\t\tSidebarTaskLanguageStatuses.InProgress,\n\t\tSidebarTaskLanguageStatuses.Created,\n\t\tSidebarTaskLanguageStatuses.Completed,\n\t]\n\n\treturn langs\n\t\t.filter((language) => language.status !== 'queued')\n\t\t.map((lang) => ({ ...lang, status: resolveStatus(lang) }))\n\t\t.sort((a, b) => {\n\t\t\tif (a.status === SidebarTaskLanguageStatuses.InProgress && a.progress === 100) {\n\t\t\t\treturn -1\n\t\t\t}\n\n\t\t\tif (b.status === SidebarTaskLanguageStatuses.InProgress && b.progress === 100) {\n\t\t\t\treturn 1\n\t\t\t}\n\n\t\t\tif (a.status === b.status) {\n\t\t\t\t// Order by lang id\n\t\t\t\treturn a.name < b.name ? 1 : -1\n\t\t\t}\n\n\t\t\t// The index of array will serve as sorting order so if we get `in_progress` for \"a\" and `created`\n\t\t\t// for b, they will have `0` and `1` indices. So `0 - 1` will result in `-1` which means\n\t\t\t// \"a\" will be sorted before \"b\".\n\t\t\treturn statusSortOrder.indexOf(a.status) - statusSortOrder.indexOf(b.status)\n\t\t})\n}\n\nconst isInProgressOrCreated = (status: SidebarTaskLanguageStatus | SidebarTaskStatus): boolean => {\n\t// @ts-ignore - complaints about status missing completed and other statuses\n\treturn [SidebarTaskStatuses.InProgress, SidebarTaskStatuses.Created].includes(status)\n}\n\nexport const isLanguageProgressCompleted = (\n\ttask: SidebarTask,\n\tlanguage: SidebarTaskLanguage,\n): boolean => {\n\treturn (\n\t\tisInProgressOrCreated(task.status) &&\n\t\tisInProgressOrCreated(language.status) &&\n\t\t(language.progress ?? 0) >= 100\n\t)\n}\n"],"names":["SidebarTaskLanguageStatuses","SidebarTaskTypeOptions","SidebarTaskStatuses"],"mappings":";;;AAWa,MAAA,gBAAgB,CAAC,QAAmC,kBAA0B;AAC1F,UAAQ,QAAQ;AAAA,IACf,KAAKA,MAA4B,4BAAA;AACzB,aAAA,gBAAgB,MAAM,WAAW;AAAA,IACzC,KAAKA,MAA4B,4BAAA;AAGzB,aAAA,gBAAgB,IAAI,gBAAgB;AAAA,IAC5C,KAAKA,MAA4B,4BAAA;AACzB,aAAA;AAAA,IACR,KAAKA,MAA4B,4BAAA;AACzB,aAAA;AAAA,IACR,KAAKA,MAA4B,4BAAA;AACzB,aAAA;AAAA,IACR;AACQ,aAAA;AAAA,EAAA;AAEV;AAEa,MAAA,gBAAgB,CAAC,aAA6D;AACpF,QAAA,WAAW,SAAS,YAAY;AAEtC,MAAI,SAAS,WAAWA,MAAAA,4BAA4B,WAAW,WAAW,GAAG;AAG5E,WAAOA,MAA4B,4BAAA;AAAA,EAAA;AAGpC,SAAO,SAAS;AACjB;AAKO,MAAM,WAAkD;AAAA,EAC9D,CAACC,MAAAA,uBAAuB,WAAW,GAAG;AAAA,EACtC,CAACA,MAAAA,uBAAuB,MAAM,GAAG;AAAA,EACjC,CAACA,MAAAA,uBAAuB,SAAS,GAAG;AAAA,EACpC,CAACA,MAAAA,uBAAuB,qBAAqB,GAAG;AACjD;AAEa,MAAA,mBAAmB,CAAC,UAAiC;AACjE,QAAM,kBAA+C;AAAA,IACpDD,MAAAA,4BAA4B;AAAA,IAC5BA,MAAAA,4BAA4B;AAAA,IAC5BA,kCAA4B;AAAA,EAC7B;AAEO,SAAA,MACL,OAAO,CAAC,aAAa,SAAS,WAAW,QAAQ,EACjD,IAAI,CAAC,UAAU,EAAE,GAAG,MAAM,QAAQ,cAAc,IAAI,EAAA,EAAI,EACxD,KAAK,CAAC,GAAG,MAAM;AACf,QAAI,EAAE,WAAWA,MAAA,4BAA4B,cAAc,EAAE,aAAa,KAAK;AACvE,aAAA;AAAA,IAAA;AAGR,QAAI,EAAE,WAAWA,MAAA,4BAA4B,cAAc,EAAE,aAAa,KAAK;AACvE,aAAA;AAAA,IAAA;AAGJ,QAAA,EAAE,WAAW,EAAE,QAAQ;AAE1B,aAAO,EAAE,OAAO,EAAE,OAAO,IAAI;AAAA,IAAA;AAMvB,WAAA,gBAAgB,QAAQ,EAAE,MAAM,IAAI,gBAAgB,QAAQ,EAAE,MAAM;AAAA,EAAA,CAC3E;AACH;AAEA,MAAM,wBAAwB,CAAC,WAAmE;AAEjG,SAAO,CAACE,MAAoB,oBAAA,YAAYA,MAAAA,oBAAoB,OAAO,EAAE,SAAS,MAAM;AACrF;AAEa,MAAA,8BAA8B,CAC1C,MACA,aACa;AAEZ,SAAA,sBAAsB,KAAK,MAAM,KACjC,sBAAsB,SAAS,MAAM,MACpC,SAAS,YAAY,MAAM;AAE9B;;;;;;"}
|
package/dist/harmony117.mjs
CHANGED
@@ -1,19 +1,63 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
import { SidebarTaskLanguageStatuses, SidebarTaskTypeOptions, SidebarTaskStatuses } from "./harmony2.mjs";
|
2
|
+
const getStatusText = (status, progressValue) => {
|
3
|
+
switch (status) {
|
4
|
+
case SidebarTaskLanguageStatuses.Completed:
|
5
|
+
return progressValue < 100 ? "Closed" : "Completed";
|
6
|
+
case SidebarTaskLanguageStatuses.Created:
|
7
|
+
return progressValue > 0 ? "In progress" : "Not started";
|
8
|
+
case SidebarTaskLanguageStatuses.InProgress:
|
9
|
+
return "In progress";
|
10
|
+
case SidebarTaskLanguageStatuses.Queued:
|
11
|
+
return "Queued";
|
12
|
+
case SidebarTaskLanguageStatuses.NotStarted:
|
13
|
+
return "Not started";
|
14
|
+
default:
|
15
|
+
return "-";
|
12
16
|
}
|
13
|
-
|
14
|
-
|
15
|
-
|
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;
|
40
|
+
}
|
41
|
+
if (b.status === SidebarTaskLanguageStatuses.InProgress && b.progress === 100) {
|
42
|
+
return 1;
|
43
|
+
}
|
44
|
+
if (a.status === b.status) {
|
45
|
+
return a.name < b.name ? 1 : -1;
|
46
|
+
}
|
47
|
+
return statusSortOrder.indexOf(a.status) - statusSortOrder.indexOf(b.status);
|
48
|
+
});
|
49
|
+
};
|
50
|
+
const isInProgressOrCreated = (status) => {
|
51
|
+
return [SidebarTaskStatuses.InProgress, SidebarTaskStatuses.Created].includes(status);
|
52
|
+
};
|
53
|
+
const isLanguageProgressCompleted = (task, language) => {
|
54
|
+
return isInProgressOrCreated(task.status) && isInProgressOrCreated(language.status) && (language.progress ?? 0) >= 100;
|
55
|
+
};
|
16
56
|
export {
|
17
|
-
|
57
|
+
getStatusText,
|
58
|
+
getTaskLanguages,
|
59
|
+
isLanguageProgressCompleted,
|
60
|
+
resolveStatus,
|
61
|
+
tagColor
|
18
62
|
};
|
19
63
|
//# sourceMappingURL=harmony117.mjs.map
|