@go1/go1-embedding-react-sdk 0.0.74 → 0.0.76

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.
@@ -11,6 +11,7 @@ export interface AdditionalInfoMessage {
11
11
  integrationSystemId?: string;
12
12
  presentingIntegrationSystemId?: string;
13
13
  experience?: FeatureAttributes['experience'];
14
+ disableFSOuterScript?: boolean;
14
15
  }
15
16
  export interface ThemeInformation {
16
17
  accent: string;
@@ -79,6 +80,7 @@ export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {
79
80
  export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
80
81
  searchTerm?: string;
81
82
  searchProvider?: string;
83
+ searchTab?: 'items' | 'playlists';
82
84
  }
83
85
  export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists | FeatureAttributesMyLearning | FeatureAttributesBulkUpload | FeatureAttributesContentStatus | FeatureAttributesGo1LearnSearch;
84
86
  export interface AdditionalUserInfo {
@@ -98,5 +100,7 @@ export interface InitOptions {
98
100
  oneTimeToken?: string;
99
101
  integrationSystemId?: string;
100
102
  presentingIntegrationSystemId?: string;
103
+ previewHost?: string;
104
+ disableFSOuterScript?: boolean;
101
105
  }
102
106
  export {};
@@ -6,10 +6,13 @@ const react_1 = require("react");
6
6
  const constants_1 = require("../../common/constants");
7
7
  const params_1 = require("../../common/params");
8
8
  function useGo1ContentView(props) {
9
- const { feature, featureAttributes, portalURL, oneTimeToken, onGo1MessageReceived, additionalUserInfo, themeInformation, integrationSystemId, presentingIntegrationSystemId, env = 'production', } = props;
9
+ const { feature, featureAttributes, portalURL, oneTimeToken, onGo1MessageReceived, additionalUserInfo, themeInformation, integrationSystemId, presentingIntegrationSystemId, env = 'production', previewHost, disableFSOuterScript, } = props;
10
10
  const iframeRef = (0, react_1.useRef)(null);
11
11
  let url = 'https://embedding.go1.com';
12
- if (env === 'staging') {
12
+ if (previewHost) {
13
+ url = previewHost;
14
+ }
15
+ else if (env === 'staging') {
13
16
  url = 'https://embedding.qa.go1.cloud';
14
17
  }
15
18
  if (!(0, params_1.isValidFeature)(feature)) {
@@ -40,6 +43,7 @@ function useGo1ContentView(props) {
40
43
  integrationSystemId,
41
44
  presentingIntegrationSystemId,
42
45
  feature,
46
+ disableFSOuterScript,
43
47
  };
44
48
  sendMessageToGo1({
45
49
  type: 'set_additional_embedding_data',
@@ -61,6 +65,7 @@ function useGo1ContentView(props) {
61
65
  sendMessageToGo1,
62
66
  onGo1MessageReceived,
63
67
  feature,
68
+ disableFSOuterScript,
64
69
  ]);
65
70
  (0, react_1.useEffect)(() => {
66
71
  window.addEventListener('message', eventListenerInstance);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.0.74",
3
+ "version": "0.0.76",
4
4
  "description": "A React library to embed Go1 content into your website.",
5
5
  "main": "dist/go1-embedding-react-sdk/src/index.js",
6
6
  "files": [