@tolgee/core 4.3.0 → 4.6.0-rc.03177a3.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.
Files changed (60) hide show
  1. package/dist/tolgee.cjs.js +154 -121
  2. package/dist/tolgee.cjs.js.map +1 -1
  3. package/dist/tolgee.cjs.min.js +1 -1
  4. package/dist/tolgee.cjs.min.js.map +1 -1
  5. package/dist/tolgee.esm.js +1 -1
  6. package/dist/tolgee.esm.js.map +1 -1
  7. package/dist/tolgee.umd.js +154 -121
  8. package/dist/tolgee.umd.js.map +1 -1
  9. package/dist/tolgee.umd.min.js +1 -1
  10. package/dist/tolgee.umd.min.js.map +1 -1
  11. package/lib/Constants/Global.d.ts +0 -0
  12. package/lib/Constants/ModifierKey.d.ts +0 -0
  13. package/lib/Errors/ApiHttpError.d.ts +0 -0
  14. package/lib/Observer.d.ts +0 -0
  15. package/lib/Properties.d.ts +3 -1
  16. package/lib/Tolgee.d.ts +0 -0
  17. package/lib/TolgeeConfig.d.ts +7 -1
  18. package/lib/helpers/NodeHelper.d.ts +0 -0
  19. package/lib/helpers/TextHelper.d.ts +0 -0
  20. package/lib/helpers/commonTypes.d.ts +0 -0
  21. package/lib/helpers/encoderPolyfill.d.ts +0 -0
  22. package/lib/helpers/secret.d.ts +0 -0
  23. package/lib/helpers/sleep.d.ts +0 -0
  24. package/lib/highlighter/HighlightFunctionsInitializer.d.ts +1 -0
  25. package/lib/highlighter/MouseEventHandler.d.ts +17 -13
  26. package/lib/highlighter/TranslationHighlighter.d.ts +1 -1
  27. package/lib/index.d.ts +0 -0
  28. package/lib/modules/IcuFormatter.d.ts +0 -0
  29. package/lib/modules/index.d.ts +0 -0
  30. package/lib/services/ApiHttpService.d.ts +0 -0
  31. package/lib/services/CoreService.d.ts +2 -2
  32. package/lib/services/DependencyService.d.ts +0 -0
  33. package/lib/services/ElementRegistrar.d.ts +0 -0
  34. package/lib/services/EventEmitter.d.ts +0 -0
  35. package/lib/services/EventService.d.ts +0 -0
  36. package/lib/services/ModuleService.d.ts +0 -0
  37. package/lib/services/ScreenshotService.d.ts +0 -0
  38. package/lib/services/Subscription.d.ts +0 -0
  39. package/lib/services/TextService.d.ts +0 -0
  40. package/lib/services/TranslationService.d.ts +1 -0
  41. package/lib/toolsManager/Messages.d.ts +0 -0
  42. package/lib/toolsManager/PluginManager.d.ts +0 -0
  43. package/lib/types/DTOs.d.ts +0 -0
  44. package/lib/types/apiSchema.generated.d.ts +2129 -969
  45. package/lib/types.d.ts +1 -3
  46. package/lib/wrappers/AbstractWrapper.d.ts +0 -0
  47. package/lib/wrappers/NodeHandler.d.ts +0 -0
  48. package/lib/wrappers/WrappedHandler.d.ts +0 -0
  49. package/lib/wrappers/invisible/AttributeHandler.d.ts +0 -0
  50. package/lib/wrappers/invisible/Coder.d.ts +0 -0
  51. package/lib/wrappers/invisible/ContentHandler.d.ts +0 -0
  52. package/lib/wrappers/invisible/CoreHandler.d.ts +0 -0
  53. package/lib/wrappers/invisible/InvisibleWrapper.d.ts +0 -0
  54. package/lib/wrappers/invisible/ValueMemory.d.ts +0 -0
  55. package/lib/wrappers/text/AttributeHandler.d.ts +0 -0
  56. package/lib/wrappers/text/Coder.d.ts +0 -0
  57. package/lib/wrappers/text/ContentHandler.d.ts +0 -0
  58. package/lib/wrappers/text/CoreHandler.d.ts +0 -0
  59. package/lib/wrappers/text/TextWrapper.d.ts +0 -0
  60. package/package.json +7 -7
File without changes
File without changes
File without changes
package/lib/Observer.d.ts CHANGED
File without changes
@@ -1,9 +1,11 @@
1
1
  import { TolgeeConfig } from './TolgeeConfig';
2
- import { Scope } from './types';
2
+ import { Mode, Scope } from './types';
3
3
  export declare class Properties {
4
4
  config: TolgeeConfig;
5
5
  scopes?: Scope[];
6
6
  projectId?: number;
7
+ permittedLanguageIds?: number[];
8
+ mode?: Mode;
7
9
  _currentLanguage?: string;
8
10
  get currentLanguage(): string;
9
11
  set currentLanguage(language: string);
package/lib/Tolgee.d.ts CHANGED
File without changes
@@ -1,11 +1,17 @@
1
- import { Mode, TreeTranslationsData } from './types';
1
+ /// <reference types="node" />
2
+ import { TreeTranslationsData } from './types';
2
3
  import { ModifierKey } from './Constants/ModifierKey';
4
+ import { Mode } from 'fs';
3
5
  declare type UiConstructor = new (...args: any[]) => any;
4
6
  interface UiLibInterface {
5
7
  UI: UiConstructor;
6
8
  }
7
9
  declare type UiType = UiConstructor | UiLibInterface | Promise<UiConstructor> | Promise<UiLibInterface>;
8
10
  export declare class TolgeeConfig {
11
+ /**
12
+ * @deprecated This option won't have any effect,
13
+ * because mode is now automatically detected when apiKey + apiUrl are set
14
+ */
9
15
  mode?: Mode;
10
16
  apiUrl?: string;
11
17
  apiKey?: string;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -4,6 +4,7 @@ export declare class HighlightFunctionsInitializer {
4
4
  private properties;
5
5
  constructor(properties: Properties);
6
6
  initFunctions(element: ElementWithMeta): void;
7
+ borderElement: HTMLDivElement | null;
7
8
  private initHighlightFunction;
8
9
  private initUnhighlightFunction;
9
10
  }
@@ -1,23 +1,27 @@
1
- import { ElementWithMeta } from '../types';
2
- import { Properties } from '../Properties';
1
+ import { DependencyService } from '../services/DependencyService';
3
2
  export declare class MouseEventHandler {
4
- private properties;
3
+ private dependencies;
5
4
  private keysDown;
6
- private mouseOn;
7
5
  private highlighted;
8
6
  private mouseOnChanged;
9
7
  private keysChanged;
10
- constructor(properties: Properties);
8
+ private cursorPosition;
9
+ constructor(dependencies: DependencyService);
11
10
  run(): void;
12
- handle(element: ElementWithMeta & ElementCSSInlineStyle, onclick: (clickEvent: MouseEvent) => void): void;
13
- private initEventListeners;
14
- private readonly onConditionsChanged;
11
+ stop(): void;
15
12
  private readonly highlight;
16
13
  private readonly unhighlight;
17
- private readonly onMouseOut;
18
- private readonly onMouseOver;
19
- private getMouseOn;
20
- private initKeyListener;
21
- private filterMouseOn;
14
+ private updateHighlight;
15
+ private updateCursorPosition;
16
+ private blockEvents;
17
+ private onMouseMove;
18
+ private onBlur;
19
+ private onKeyDown;
20
+ private onKeyUp;
21
+ private onScroll;
22
+ private onClick;
23
+ private initEventListeners;
24
+ private removeEventListeners;
25
+ private getClosestTolgeeElement;
22
26
  private areKeysDown;
23
27
  }
@@ -10,5 +10,5 @@ export declare class TranslationHighlighter {
10
10
  listen(element: ElementWithMeta & ElementCSSInlineStyle): void;
11
11
  private getRenderer;
12
12
  private getKeyAndDefault;
13
- private translationEdit;
13
+ translationEdit: (e: MouseEvent, element: ElementWithMeta) => Promise<void>;
14
14
  }
package/lib/index.d.ts CHANGED
File without changes
File without changes
File without changes
File without changes
@@ -3,7 +3,7 @@ import { ApiHttpService } from './ApiHttpService';
3
3
  import { Scope } from '../types';
4
4
  import { LanguageModel } from '../types/DTOs';
5
5
  import { components } from '../types/apiSchema.generated';
6
- export declare type ApiKeyModel = components['schemas']['ApiKeyModel'];
6
+ export declare type ApiKeyWithLanguagesModel = components['schemas']['ApiKeyWithLanguagesModel'];
7
7
  export declare class CoreService {
8
8
  private properties;
9
9
  private apiHttpService;
@@ -11,7 +11,7 @@ export declare class CoreService {
11
11
  constructor(properties: Properties, apiHttpService: ApiHttpService);
12
12
  getLanguages(): Promise<Set<string>>;
13
13
  getLanguagesFull(): Promise<LanguageModel[]>;
14
- getApiKeyDetails(): Promise<ApiKeyModel>;
14
+ getApiKeyDetails(): Promise<ApiKeyWithLanguagesModel>;
15
15
  isAuthorizedTo(scope: Scope): boolean;
16
16
  checkScope(scope: Scope): void;
17
17
  loadApiKeyDetails(): Promise<void>;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -59,6 +59,7 @@ export declare class TranslationService {
59
59
  text?: string;
60
60
  state: "UNTRANSLATED" | "MACHINE_TRANSLATED" | "TRANSLATED" | "REVIEWED" | "NEEDS_REVIEW";
61
61
  commentCount: number;
62
+ unresolvedCommentCount: number;
62
63
  };
63
64
  };
64
65
  }, string[]]>;
File without changes
File without changes
File without changes