@tolgee/core 4.6.0-rc.b9eec4f.0 → 4.6.0
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/tolgee.cjs.js +15 -12
- package/dist/tolgee.cjs.js.map +1 -1
- package/dist/tolgee.cjs.min.js +1 -1
- package/dist/tolgee.cjs.min.js.map +1 -1
- package/dist/tolgee.esm.js +1 -1
- package/dist/tolgee.esm.js.map +1 -1
- package/dist/tolgee.umd.js +15 -12
- package/dist/tolgee.umd.js.map +1 -1
- package/dist/tolgee.umd.min.js +1 -1
- package/dist/tolgee.umd.min.js.map +1 -1
- package/lib/Constants/Global.d.ts +0 -0
- package/lib/Constants/ModifierKey.d.ts +0 -0
- package/lib/Errors/ApiHttpError.d.ts +0 -0
- package/lib/Observer.d.ts +0 -0
- package/lib/Properties.d.ts +0 -0
- package/lib/Tolgee.d.ts +1 -2
- package/lib/TolgeeConfig.d.ts +1 -0
- package/lib/helpers/NodeHelper.d.ts +0 -0
- package/lib/helpers/TextHelper.d.ts +0 -0
- package/lib/helpers/commonTypes.d.ts +0 -0
- package/lib/helpers/encoderPolyfill.d.ts +0 -0
- package/lib/helpers/secret.d.ts +0 -0
- package/lib/helpers/sleep.d.ts +0 -0
- package/lib/highlighter/HighlightFunctionsInitializer.d.ts +0 -0
- package/lib/highlighter/MouseEventHandler.d.ts +0 -0
- package/lib/highlighter/TranslationHighlighter.d.ts +0 -0
- package/lib/index.d.ts +0 -0
- package/lib/modules/IcuFormatter.d.ts +0 -0
- package/lib/modules/index.d.ts +0 -0
- package/lib/services/ApiHttpService.d.ts +0 -0
- package/lib/services/CoreService.d.ts +0 -0
- package/lib/services/DependencyService.d.ts +0 -0
- package/lib/services/ElementRegistrar.d.ts +0 -0
- package/lib/services/EventEmitter.d.ts +0 -0
- package/lib/services/EventService.d.ts +0 -0
- package/lib/services/ModuleService.d.ts +0 -0
- package/lib/services/ScreenshotService.d.ts +0 -0
- package/lib/services/Subscription.d.ts +0 -0
- package/lib/services/TextService.d.ts +0 -0
- package/lib/services/TranslationService.d.ts +0 -0
- package/lib/toolsManager/Messages.d.ts +0 -0
- package/lib/toolsManager/PluginManager.d.ts +0 -0
- package/lib/types/DTOs.d.ts +0 -0
- package/lib/types/apiSchema.generated.d.ts +0 -0
- package/lib/types.d.ts +0 -0
- package/lib/wrappers/AbstractWrapper.d.ts +0 -0
- package/lib/wrappers/NodeHandler.d.ts +0 -0
- package/lib/wrappers/WrappedHandler.d.ts +0 -0
- package/lib/wrappers/invisible/AttributeHandler.d.ts +0 -0
- package/lib/wrappers/invisible/Coder.d.ts +0 -0
- package/lib/wrappers/invisible/ContentHandler.d.ts +0 -0
- package/lib/wrappers/invisible/CoreHandler.d.ts +0 -0
- package/lib/wrappers/invisible/InvisibleWrapper.d.ts +0 -0
- package/lib/wrappers/invisible/ValueMemory.d.ts +0 -0
- package/lib/wrappers/text/AttributeHandler.d.ts +0 -0
- package/lib/wrappers/text/Coder.d.ts +0 -0
- package/lib/wrappers/text/ContentHandler.d.ts +0 -0
- package/lib/wrappers/text/CoreHandler.d.ts +0 -0
- package/lib/wrappers/text/TextWrapper.d.ts +0 -0
- package/package.json +2 -2
package/dist/tolgee.cjs.js
CHANGED
|
@@ -530,9 +530,9 @@ var TranslationService = /** @class */ (function () {
|
|
|
530
530
|
return [4 /*yield*/, this.fetchPromises[lang]];
|
|
531
531
|
case 1:
|
|
532
532
|
_a.sent();
|
|
533
|
-
this.eventService.LANGUAGE_LOADED.emit(lang);
|
|
534
533
|
_a.label = 2;
|
|
535
534
|
case 2:
|
|
535
|
+
this.eventService.LANGUAGE_LOADED.emit(lang);
|
|
536
536
|
this.fetchPromises[lang] = undefined;
|
|
537
537
|
return [2 /*return*/, this.translationsCache.get(lang)];
|
|
538
538
|
}
|
|
@@ -1686,6 +1686,7 @@ var TolgeeConfig = /** @class */ (function () {
|
|
|
1686
1686
|
this.passToParent = ['option', 'optgroup'];
|
|
1687
1687
|
this.restrictedElements = ['script', 'style'];
|
|
1688
1688
|
this.highlightColor = 'rgb(255, 0, 0)';
|
|
1689
|
+
this.highlightWidth = 5;
|
|
1689
1690
|
this.wrapperMode = 'text';
|
|
1690
1691
|
/**
|
|
1691
1692
|
* When true, fallback language will be preloaded on Tolgee.run
|
|
@@ -1786,7 +1787,7 @@ var PluginManager = /** @class */ (function () {
|
|
|
1786
1787
|
this.handshake = function () {
|
|
1787
1788
|
var sharedConfiguration = __assign(__assign({}, _this.properties), { config: __assign(__assign({}, _this.properties.config), {
|
|
1788
1789
|
//remove properties, which cannot be sent by window.postMessage
|
|
1789
|
-
staticData: undefined, targetElement: undefined, _targetElement: undefined, ui: undefined }), uiPresent: Boolean(_this.properties.config.ui), uiVersion: "4.6.0
|
|
1790
|
+
staticData: undefined, targetElement: undefined, _targetElement: undefined, ui: undefined }), uiPresent: Boolean(_this.properties.config.ui), uiVersion: "4.6.0" });
|
|
1790
1791
|
var timer = null;
|
|
1791
1792
|
var ping = function () {
|
|
1792
1793
|
_this.messages.send('TOLGEE_READY', sharedConfiguration);
|
|
@@ -1886,14 +1887,15 @@ var Messages = /** @class */ (function () {
|
|
|
1886
1887
|
return Messages;
|
|
1887
1888
|
}());
|
|
1888
1889
|
|
|
1889
|
-
var BORDER_WIDTH = 5;
|
|
1890
1890
|
var HIGHLIGHTER_BASE_STYLE = {
|
|
1891
1891
|
pointerEvents: 'none',
|
|
1892
1892
|
position: 'fixed',
|
|
1893
|
-
boxSizing: '
|
|
1893
|
+
boxSizing: 'content-box',
|
|
1894
1894
|
zIndex: String(Number.MAX_SAFE_INTEGER),
|
|
1895
1895
|
contain: 'layout',
|
|
1896
1896
|
display: 'block',
|
|
1897
|
+
borderStyle: 'solid',
|
|
1898
|
+
borderRadius: '4px',
|
|
1897
1899
|
};
|
|
1898
1900
|
var HighlightFunctionsInitializer = /** @class */ (function () {
|
|
1899
1901
|
function HighlightFunctionsInitializer(properties) {
|
|
@@ -1906,6 +1908,8 @@ var HighlightFunctionsInitializer = /** @class */ (function () {
|
|
|
1906
1908
|
HighlightFunctionsInitializer.prototype.initHighlightFunction = function (element) {
|
|
1907
1909
|
var _this = this;
|
|
1908
1910
|
element._tolgee.highlight = function () {
|
|
1911
|
+
var highlightColor = _this.properties.config.highlightColor;
|
|
1912
|
+
var highlightWidth = _this.properties.config.highlightWidth;
|
|
1909
1913
|
if (!element.isConnected) {
|
|
1910
1914
|
return;
|
|
1911
1915
|
}
|
|
@@ -1917,16 +1921,16 @@ var HighlightFunctionsInitializer = /** @class */ (function () {
|
|
|
1917
1921
|
var _b = __read(_a, 2), key = _b[0], value = _b[1];
|
|
1918
1922
|
highlightEl.style[key] = value;
|
|
1919
1923
|
});
|
|
1920
|
-
highlightEl.style.
|
|
1924
|
+
highlightEl.style.borderColor = highlightColor;
|
|
1921
1925
|
element._tolgee.highlightEl = highlightEl;
|
|
1922
1926
|
document.body.appendChild(highlightEl);
|
|
1923
1927
|
}
|
|
1924
1928
|
var shape = element.getBoundingClientRect();
|
|
1925
|
-
highlightEl.style.
|
|
1926
|
-
highlightEl.style.
|
|
1927
|
-
highlightEl.style.
|
|
1928
|
-
highlightEl.style.
|
|
1929
|
-
highlightEl.style.
|
|
1929
|
+
highlightEl.style.borderWidth = highlightWidth + 'px';
|
|
1930
|
+
highlightEl.style.top = shape.top - highlightWidth + 'px';
|
|
1931
|
+
highlightEl.style.left = shape.left - highlightWidth + 'px';
|
|
1932
|
+
highlightEl.style.width = shape.width + 'px';
|
|
1933
|
+
highlightEl.style.height = shape.height + 'px';
|
|
1930
1934
|
};
|
|
1931
1935
|
};
|
|
1932
1936
|
HighlightFunctionsInitializer.prototype.initUnhighlightFunction = function (element) {
|
|
@@ -3058,8 +3062,7 @@ var Tolgee = /** @class */ (function () {
|
|
|
3058
3062
|
});
|
|
3059
3063
|
Object.defineProperty(Tolgee.prototype, "onLangLoaded", {
|
|
3060
3064
|
/**
|
|
3061
|
-
* Is emitted when language
|
|
3062
|
-
* It is not emitted when language is changed and translations were loaded before.
|
|
3065
|
+
* Is emitted when language is changed and loaded (including initial load)
|
|
3063
3066
|
*/
|
|
3064
3067
|
get: function () {
|
|
3065
3068
|
return this.dependencyService.eventService.LANGUAGE_LOADED;
|