@go1/go1-embedding-react-sdk 0.0.78 → 0.1.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/README.md CHANGED
@@ -159,6 +159,13 @@ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon
159
159
  searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
160
  }
161
161
 
162
+ export type FeatureAttributesRecommendations = Omit<FeatureAttributesGo1LearnSearch, 'searchProvider'> & {
163
+ providers?: string[]; // If the embedding recommendations feature includes a search providers, the app will initialize with the pre-filled search provider
164
+ skills?: string[]; // If the embedding recommendations feature includes a search skills, the app will initialize with the pre-filled search skills
165
+ topics?: string[]; // If the embedding recommendations feature includes a search topics, the app will initialize with the pre-filled search topics
166
+ sort?: string; // If the embedding recommendations feature includes a search sort, the app will initialize with the pre-filled search sort
167
+ }
168
+
162
169
  export type FeatureAttributes =
163
170
  | FeatureAttributesAIChat
164
171
  | FeatureAttributesPreview
@@ -166,7 +173,8 @@ export type FeatureAttributes =
166
173
  | FeatureAttributesLibrary
167
174
  | FeatureAttributesSearch
168
175
  | FeatureAttributesMyPlaylists
169
- | FeatureAttributesMyLearning;;
176
+ | FeatureAttributesMyLearning
177
+ | FeatureAttributesRecommendations;
170
178
 
171
179
  export interface AdditionalUserInfo {
172
180
  jobTitle: string;
@@ -0,0 +1,7 @@
1
+ # @go1/go1-embedding-react-sdk
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - New featureAttributes for Select Welcome Modal and Recommendation
package/dist/README.md CHANGED
@@ -159,6 +159,13 @@ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon
159
159
  searchProvider?: string; // If the embedding search feature includes a search provider, the app will initialize with the pre-filled search provider.
160
160
  }
161
161
 
162
+ export type FeatureAttributesRecommendations = Omit<FeatureAttributesGo1LearnSearch, 'searchProvider'> & {
163
+ providers?: string[]; // If the embedding recommendations feature includes a search providers, the app will initialize with the pre-filled search provider
164
+ skills?: string[]; // If the embedding recommendations feature includes a search skills, the app will initialize with the pre-filled search skills
165
+ topics?: string[]; // If the embedding recommendations feature includes a search topics, the app will initialize with the pre-filled search topics
166
+ sort?: string; // If the embedding recommendations feature includes a search sort, the app will initialize with the pre-filled search sort
167
+ }
168
+
162
169
  export type FeatureAttributes =
163
170
  | FeatureAttributesAIChat
164
171
  | FeatureAttributesPreview
@@ -166,7 +173,8 @@ export type FeatureAttributes =
166
173
  | FeatureAttributesLibrary
167
174
  | FeatureAttributesSearch
168
175
  | FeatureAttributesMyPlaylists
169
- | FeatureAttributesMyLearning;;
176
+ | FeatureAttributesMyLearning
177
+ | FeatureAttributesRecommendations;
170
178
 
171
179
  export interface AdditionalUserInfo {
172
180
  jobTitle: string;
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isValidFeature = exports.isValidOTT = exports.addOneTimeToken = exports.addPortalURL = void 0;
3
+ exports.addPortalURL = addPortalURL;
4
+ exports.addOneTimeToken = addOneTimeToken;
5
+ exports.isValidOTT = isValidOTT;
6
+ exports.isValidFeature = isValidFeature;
4
7
  const types_1 = require("./types");
5
8
  function addPortalURL(url, portalURL, env = 'production') {
6
9
  let validPortalURL = /^(?=.{1,255}$)([a-zA-Z0-9-]+\.)+mygo1\.com$/;
@@ -14,7 +17,6 @@ function addPortalURL(url, portalURL, env = 'production') {
14
17
  throw new Error(`Invalid formatting for portalURL ${portalURL}, env ${env}`);
15
18
  }
16
19
  }
17
- exports.addPortalURL = addPortalURL;
18
20
  function addOneTimeToken(url, oneTimeToken) {
19
21
  if (isValidOTT(oneTimeToken)) {
20
22
  url.searchParams.append('one_time_token', oneTimeToken);
@@ -23,13 +25,10 @@ function addOneTimeToken(url, oneTimeToken) {
23
25
  throw new Error('Invalid formatting for oneTimeToken');
24
26
  }
25
27
  }
26
- exports.addOneTimeToken = addOneTimeToken;
27
28
  function isValidOTT(oneTimeToken) {
28
29
  const validOTT = /^[A-Za-z0-9]+$/;
29
30
  return validOTT.test(oneTimeToken);
30
31
  }
31
- exports.isValidOTT = isValidOTT;
32
32
  function isValidFeature(feature) {
33
33
  return types_1.features.includes(feature);
34
34
  }
35
- exports.isValidFeature = isValidFeature;
@@ -25,6 +25,7 @@ export type ExternalExperience = 'manager' | 'learner' | 'role-aware';
25
25
  export interface FeatureAttributeCommon {
26
26
  shouldSuppressPreview?: boolean;
27
27
  shouldSuppressOpeningPlayer?: boolean;
28
+ shouldShowSelectWelcomeModal?: boolean;
28
29
  experience?: ExternalExperience;
29
30
  contentScope?: 'subscription' | 'library';
30
31
  }
@@ -82,7 +83,13 @@ export interface FeatureAttributesGo1LearnSearch extends FeatureAttributeCommon
82
83
  searchTerm?: string;
83
84
  searchProvider?: string;
84
85
  }
85
- export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists | FeatureAttributesMyLearning | FeatureAttributesBulkUpload | FeatureAttributesContentStatus | FeatureAttributesGo1LearnSearch;
86
+ export type FeatureAttributesRecommendations = Omit<FeatureAttributesGo1LearnSearch, 'searchProvider'> & {
87
+ providers?: string[];
88
+ skills?: string[];
89
+ topics?: string[];
90
+ sort?: string;
91
+ };
92
+ export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists | FeatureAttributesMyLearning | FeatureAttributesBulkUpload | FeatureAttributesContentStatus | FeatureAttributesGo1LearnSearch | FeatureAttributesRecommendations;
86
93
  export interface AdditionalUserInfo {
87
94
  jobTitle: string;
88
95
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useGo1ContentView = void 0;
3
+ exports.useGo1ContentView = useGo1ContentView;
4
4
  const React = require("react");
5
5
  const react_1 = require("react");
6
6
  const constants_1 = require("../../common/constants");
@@ -78,7 +78,6 @@ function useGo1ContentView(props) {
78
78
  }, [iframeRef, iframeURL, iframeID]);
79
79
  return { sendMessageToGo1, ContentView };
80
80
  }
81
- exports.useGo1ContentView = useGo1ContentView;
82
81
  function Go1ContentView(iframeRef, iframeURL, iframeID, userProps) {
83
82
  return (React.createElement("iframe", { id: iframeID, ref: iframeRef, src: iframeURL.toString(), style: { border: 0, width: '100%', height: '100%' }, ...userProps }));
84
83
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go1/go1-embedding-react-sdk",
3
- "version": "0.0.78",
3
+ "version": "0.1.0",
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": [