@go1/go1-embedding-react-sdk 0.0.46 → 0.0.48
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 +9 -4
- package/dist/README.md +9 -4
- package/dist/common/types.d.ts +12 -4
- package/dist/common/types.js +1 -0
- package/dist/go1-embedding-react-sdk/src/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,7 +77,8 @@ export type Go1MessageType =
|
|
|
77
77
|
| 'search_filter_toggle'
|
|
78
78
|
| 'pass_ott'
|
|
79
79
|
| 'logout',
|
|
80
|
-
| 'sync_content'
|
|
80
|
+
| 'sync_content'
|
|
81
|
+
| 'inter_feature_navigation';
|
|
81
82
|
|
|
82
83
|
export interface Go1Message {
|
|
83
84
|
type: Go1MessageType;
|
|
@@ -88,7 +89,6 @@ interface FeatureAttributeCommon {
|
|
|
88
89
|
shouldSuppressPreview?: boolean;
|
|
89
90
|
experience?: 'manager' | 'learner';
|
|
90
91
|
shouldShowGo1FeedbackButton?: boolean;
|
|
91
|
-
shouldShowSaveToPlaylistButton?: boolean;
|
|
92
92
|
contentScope?: 'subscription' | 'library';
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -136,13 +136,17 @@ export interface FeatureAttributesRetirement extends FeatureAttributeCommon {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export interface FeatureAttributesSearch extends FeatureAttributeCommon {}
|
|
139
|
+
export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
|
|
140
|
+
playlistId?: number; // If embedding my-playlists feature with playlistId, the app will initialise with the specified playlistId page.
|
|
141
|
+
}
|
|
139
142
|
|
|
140
143
|
export type FeatureAttributes =
|
|
141
144
|
| FeatureAttributesAIChat
|
|
142
145
|
| FeatureAttributesPreview
|
|
143
146
|
| FeatureAttributesWallet
|
|
144
147
|
| FeatureAttributesLibrary
|
|
145
|
-
| FeatureAttributesSearch
|
|
148
|
+
| FeatureAttributesSearch
|
|
149
|
+
| FeatureAttributesMyPlaylists;
|
|
146
150
|
|
|
147
151
|
export interface AdditionalUserInfo {
|
|
148
152
|
jobTitle: string;
|
|
@@ -156,7 +160,8 @@ export type FeatureType =
|
|
|
156
160
|
| 'search'
|
|
157
161
|
| 'wallet'
|
|
158
162
|
| 'content-retirement'
|
|
159
|
-
| 'my-playlists'
|
|
163
|
+
| 'my-playlists'
|
|
164
|
+
| 'activity-feed';
|
|
160
165
|
|
|
161
166
|
export interface InitOptions {
|
|
162
167
|
/** Mandatory identifier for the embedded feature */
|
package/dist/README.md
CHANGED
|
@@ -77,7 +77,8 @@ export type Go1MessageType =
|
|
|
77
77
|
| 'search_filter_toggle'
|
|
78
78
|
| 'pass_ott'
|
|
79
79
|
| 'logout',
|
|
80
|
-
| 'sync_content'
|
|
80
|
+
| 'sync_content'
|
|
81
|
+
| 'inter_feature_navigation';
|
|
81
82
|
|
|
82
83
|
export interface Go1Message {
|
|
83
84
|
type: Go1MessageType;
|
|
@@ -88,7 +89,6 @@ interface FeatureAttributeCommon {
|
|
|
88
89
|
shouldSuppressPreview?: boolean;
|
|
89
90
|
experience?: 'manager' | 'learner';
|
|
90
91
|
shouldShowGo1FeedbackButton?: boolean;
|
|
91
|
-
shouldShowSaveToPlaylistButton?: boolean;
|
|
92
92
|
contentScope?: 'subscription' | 'library';
|
|
93
93
|
}
|
|
94
94
|
|
|
@@ -136,13 +136,17 @@ export interface FeatureAttributesRetirement extends FeatureAttributeCommon {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export interface FeatureAttributesSearch extends FeatureAttributeCommon {}
|
|
139
|
+
export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
|
|
140
|
+
playlistId?: number; // If embedding my-playlists feature with playlistId, the app will initialise with the specified playlistId page.
|
|
141
|
+
}
|
|
139
142
|
|
|
140
143
|
export type FeatureAttributes =
|
|
141
144
|
| FeatureAttributesAIChat
|
|
142
145
|
| FeatureAttributesPreview
|
|
143
146
|
| FeatureAttributesWallet
|
|
144
147
|
| FeatureAttributesLibrary
|
|
145
|
-
| FeatureAttributesSearch
|
|
148
|
+
| FeatureAttributesSearch
|
|
149
|
+
| FeatureAttributesMyPlaylists;
|
|
146
150
|
|
|
147
151
|
export interface AdditionalUserInfo {
|
|
148
152
|
jobTitle: string;
|
|
@@ -156,7 +160,8 @@ export type FeatureType =
|
|
|
156
160
|
| 'search'
|
|
157
161
|
| 'wallet'
|
|
158
162
|
| 'content-retirement'
|
|
159
|
-
| 'my-playlists'
|
|
163
|
+
| 'my-playlists'
|
|
164
|
+
| 'activity-feed';
|
|
160
165
|
|
|
161
166
|
export interface InitOptions {
|
|
162
167
|
/** Mandatory identifier for the embedded feature */
|
package/dist/common/types.d.ts
CHANGED
|
@@ -14,16 +14,16 @@ export interface AdditionalInfoMessage {
|
|
|
14
14
|
export interface ThemeInformation {
|
|
15
15
|
accent: string;
|
|
16
16
|
}
|
|
17
|
-
export type Go1MessageType = 'preview_start_content' | 'preview_close' | 'preview_add_content_success' | 'preview_add_content_failure' | 'preview_remove_content_success' | 'preview_remove_content_failure' | 'parent_show_preview' | 'set_additional_embedding_data' | 'go1_app_initialised' | 'ott_required' | 'search_result_selected' | 'search_filter_toggle' | 'search_redirected' | 'pass_ott' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience';
|
|
17
|
+
export type Go1MessageType = 'preview_start_content' | 'preview_close' | 'preview_add_content_success' | 'preview_add_content_failure' | 'preview_remove_content_success' | 'preview_remove_content_failure' | 'parent_show_preview' | 'set_additional_embedding_data' | 'go1_app_initialised' | 'ott_required' | 'search_result_selected' | 'search_filter_toggle' | 'search_redirected' | 'pass_ott' | 'logout' | 'sync_content' | 'open_save_to_playlist_modal' | 'update_experience' | 'inter_feature_navigation';
|
|
18
18
|
export interface Go1Message {
|
|
19
19
|
type: Go1MessageType;
|
|
20
20
|
payload?: any;
|
|
21
21
|
}
|
|
22
|
+
type go1OnlyEnabledFeatures = Array<'ai-chat' | 'library' | 'my-playlists' | 'search'>;
|
|
22
23
|
export interface FeatureAttributeCommon {
|
|
23
24
|
shouldSuppressPreview?: boolean;
|
|
24
25
|
experience?: 'manager' | 'learner';
|
|
25
26
|
shouldShowGo1FeedbackButton?: boolean;
|
|
26
|
-
shouldShowSaveToPlaylistButton?: boolean;
|
|
27
27
|
featureName?: string;
|
|
28
28
|
contentScope?: 'subscription' | 'library';
|
|
29
29
|
}
|
|
@@ -38,6 +38,8 @@ export interface FeatureAttributesAIChat extends FeatureAttributesPreviewCommon
|
|
|
38
38
|
existingSkills?: string[];
|
|
39
39
|
desiredSkills?: string[];
|
|
40
40
|
desiredRole?: string;
|
|
41
|
+
go1OnlySaveToMyPlaylistsOverride?: boolean;
|
|
42
|
+
go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
|
|
41
43
|
}
|
|
42
44
|
export interface FeatureAttributesPreview extends FeatureAttributesPreviewCommon {
|
|
43
45
|
id: number;
|
|
@@ -53,20 +55,26 @@ export interface FeatureAttributesLearnerSearch extends FeatureAttributeCommon {
|
|
|
53
55
|
export interface FeatureAttributesLibrary extends FeatureAttributesPreviewCommon, FeatureAttributesRetirement {
|
|
54
56
|
libraryEmptyStateDescription?: string;
|
|
55
57
|
shouldShowLibraryTabs?: boolean;
|
|
58
|
+
go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
|
|
56
59
|
}
|
|
57
60
|
export interface FeatureAttributesRetirement extends FeatureAttributesPreviewCommon {
|
|
58
61
|
shouldShowAlternativesSearchButton?: boolean;
|
|
59
62
|
shouldShowNotificationEmailRegisterSwitch?: boolean;
|
|
60
63
|
}
|
|
61
64
|
export interface FeatureAttributesSearch extends FeatureAttributesPreviewCommon {
|
|
65
|
+
go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
|
|
62
66
|
}
|
|
63
67
|
export interface FeatureAttributesContentHub extends FeatureAttributesPreviewCommon {
|
|
64
68
|
}
|
|
65
|
-
export
|
|
69
|
+
export interface FeatureAttributesMyPlaylists extends FeatureAttributesPreviewCommon {
|
|
70
|
+
playlistId?: number;
|
|
71
|
+
go1OnlyEnabledFeatures?: go1OnlyEnabledFeatures;
|
|
72
|
+
}
|
|
73
|
+
export type FeatureAttributes = FeatureAttributesAIChat | FeatureAttributesPreview | FeatureAttributesWallet | FeatureAttributesLibrary | FeatureAttributesSearch | FeatureAttributesMyPlaylists;
|
|
66
74
|
export interface AdditionalUserInfo {
|
|
67
75
|
jobTitle: string;
|
|
68
76
|
}
|
|
69
|
-
export declare const features: readonly ["ai-chat", "content-hub", "preview", "library", "search", "wallet", "content-retirement", "my-playlists"];
|
|
77
|
+
export declare const features: readonly ["ai-chat", "content-hub", "preview", "library", "search", "wallet", "content-retirement", "my-playlists", "activity-feed"];
|
|
70
78
|
export type FeatureType = (typeof features)[number];
|
|
71
79
|
export interface InitOptions {
|
|
72
80
|
feature: FeatureType;
|
package/dist/common/types.js
CHANGED
|
@@ -19,7 +19,7 @@ function useGo1ContentView(props) {
|
|
|
19
19
|
iframeRef.current?.contentWindow?.postMessage(message, url);
|
|
20
20
|
}, [url]);
|
|
21
21
|
let { iframeURL, iframeID } = (0, react_1.useMemo)(() => {
|
|
22
|
-
let iframeURL = new URL(`${url}/${feature
|
|
22
|
+
let iframeURL = new URL(`${url}/${feature}`);
|
|
23
23
|
if (portalURL) {
|
|
24
24
|
(0, params_1.addPortalURL)(iframeURL, portalURL, env);
|
|
25
25
|
}
|