@go1/go1-embedding-react-sdk 0.0.73 → 0.0.75

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/README.md CHANGED
@@ -154,6 +154,11 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
154
154
 
155
155
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {}
156
156
 
157
+ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
158
+ searchTerm?: string; // If the embedding search feature includes a search term, the app will initialize with the pre-filled search term.
159
+ searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
+ }
161
+
157
162
  export type FeatureAttributes =
158
163
  | FeatureAttributesAIChat
159
164
  | FeatureAttributesPreview
package/dist/README.md CHANGED
@@ -154,6 +154,11 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
154
154
 
155
155
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {}
156
156
 
157
+ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
158
+ searchTerm?: string; // If the embedding search feature includes a search term, the app will initialize with the pre-filled search term.
159
+ searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
+ }
161
+
157
162
  export type FeatureAttributes =
158
163
  | FeatureAttributesAIChat
159
164
  | FeatureAttributesPreview
@@ -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;
@@ -76,7 +77,11 @@ export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCo
76
77
  export interface FeatureAttributesMyLearning extends FeatureAttributeCommon {
77
78
  selectingTab?: 'saved' | 'in-progress' | 'assigned' | 'completed';
78
79
  }
79
- export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists | FeatureAttributesMyLearning | FeatureAttributesBulkUpload | FeatureAttributesContentStatus;
80
+ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon {
81
+ searchTerm?: string;
82
+ searchProvider?: string;
83
+ }
84
+ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists | FeatureAttributesMyLearning | FeatureAttributesBulkUpload | FeatureAttributesContentStatus | FeatureAttributesGo1LearnSearch;
80
85
  export interface AdditionalUserInfo {
81
86
  jobTitle: string;
82
87
  }
@@ -94,5 +99,7 @@ export interface InitOptions {
94
99
  oneTimeToken?: string;
95
100
  integrationSystemId?: string;
96
101
  presentingIntegrationSystemId?: string;
102
+ previewHost?: string;
103
+ disableFSOuterScript?: boolean;
97
104
  }
98
105
  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.73",
3
+ "version": "0.0.75",
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": [