@fluid-topics/ft-reader-context 2.0.12 → 2.0.13

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.
@@ -3,6 +3,7 @@ import { CanceledPromiseError, ClusteringHelper, Debouncer, waitFor, waitUntil }
3
3
  import { createReaderStore } from "./redux";
4
4
  import { FtOfficialReaderService } from "./utils/FtOfficialReaderService";
5
5
  import { ftAppInfoStore, FtAnalyticsEventsService, } from "@fluid-topics/ft-app-context";
6
+ import { FtAnalyticsTranslationOrigin, } from "@fluid-topics/public-api";
6
7
  export class FtReaderStateManager {
7
8
  static build(id, serviceProvider) {
8
9
  return new FtReaderStateManager(createReaderStore(id.trim() || "context"), serviceProvider !== null && serviceProvider !== void 0 ? serviceProvider : FtOfficialReaderService.build);
@@ -300,7 +301,7 @@ export class FtReaderStateManager {
300
301
  }
301
302
  try {
302
303
  const document = this.analyticsEventsService.convertMapToAnalyticsDocument(map);
303
- this.analyticsEventsService.sendDocumentAiTranslateEvent({
304
+ this.analyticsEventsService.sendDocumentOnDemandTranslateEvent({
304
305
  name: "DOCUMENT__ON_DEMAND_TRANSLATE",
305
306
  offline: false,
306
307
  appName: apiIntegrationIdentifier,
@@ -309,6 +310,7 @@ export class FtReaderStateManager {
309
310
  destinationLanguage: this.parseLanguageToAnalyticsFormat(destinationLanguage.code),
310
311
  profileId,
311
312
  document,
313
+ translationOrigin: FtAnalyticsTranslationOrigin.AI,
312
314
  });
313
315
  }
314
316
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-reader-context",
3
- "version": "2.0.12",
3
+ "version": "2.0.13",
4
4
  "description": "Context block for integrated reader components",
5
5
  "keywords": [
6
6
  "Lit"
@@ -19,13 +19,13 @@
19
19
  "url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
20
20
  },
21
21
  "dependencies": {
22
- "@fluid-topics/ft-app-context": "2.0.12",
23
- "@fluid-topics/ft-wc-utils": "2.0.12",
22
+ "@fluid-topics/ft-app-context": "2.0.13",
23
+ "@fluid-topics/ft-wc-utils": "2.0.13",
24
24
  "@reduxjs/toolkit": "^1.6.2",
25
25
  "lit": "3.1.0"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluid-topics/public-api": "1.0.117"
28
+ "@fluid-topics/public-api": "1.0.118"
29
29
  },
30
- "gitHead": "4811b3ed72672d41022c271d4a0d1db15b458aca"
30
+ "gitHead": "8fff94f7df8ec1feca0f92b763d01d9745f6b975"
31
31
  }