Methods
(async, static) addHelpTile(tileParams) → {Promise.<boolean>}
adds a help tile to the carousel
Parameters:
Name | Type | Description |
---|---|---|
tileParams |
Array.<Help4.API.HelpTileParams> |
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(async, static) addLinkTile(tileParams) → {Promise.<boolean>}
adds a link tile to the carousel
Parameters:
Name | Type | Description |
---|---|---|
tileParams |
Array.<Help4.API.LinkTileParams> |
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(static) close() → {boolean}
will close the SAP Companion
Returns:
- API command executed successfully
- Type
- boolean
(static) enableWhatsNew(enable) → {boolean}
activate the whatsnew mode if available
Parameters:
Name | Type | Description |
---|---|---|
enable |
boolean | enable whats new mode |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) getConditions() → (nullable) {Array.<Object>}
delivers list of set conditions
Returns:
- Type
- Array.<Object>
(static) getContext(keyopt, nullable) → {Help4.typedef.SystemConfiguration|null|*}
delivers the SAP Companion configuration
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
key |
string |
<optional> <nullable> |
null | a key to access a certain detail |
Returns:
- configuration object or value for key
- Type
- Help4.typedef.SystemConfiguration | null | *
(static) getFeatureProfileUACP() → (nullable) {string}
gets the value for profile parameter in UACP
Returns:
- the feature profile name
- Type
- string
(static) getProjects() → (nullable) {Help4.API.TypeProjectList}
delivers a list of all available projects for the current screen
Returns:
(static) migrateSpacesIds() → {boolean}
XRAY-5098, will add support for Fiori Spaces data-help-id migration
Returns:
- Type
- boolean
(static) open(paramsopt) → {boolean}
will open the SAP Companion
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Help4.API.OpenParams |
<optional> |
Returns:
- API command executed successfully
- Type
- boolean
(static) openLearningApp(external)
will open the learning app
Parameters:
Name | Type | Description |
---|---|---|
external |
boolean | open the panel learning tab or the external learning app |
(async, static) openLightbox(data) → {Promise.<boolean>}
shows lightbox; not for remote mode due to promise return
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Object |
Properties
|
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(static) openWA(openopt, paramsopt) → {boolean}
will open/close the SAP Companion based on a parameter
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
open |
boolean | 'toggle' |
<optional> |
true | |
params |
Help4.API.OpenParams |
<optional> |
{} |
Returns:
- API command executed successfully
- Type
- boolean
(static) overrideConfig(params) → {boolean}
sets new configuration for CMP.
{product, version, system} parameters are supported, all are optional and minimum one is required.
refresh help content accordingly and defaults to help playback mode.
editing possible with new configuration, but doesn't support cross app tour editing.
new configuration is applied for the current screen and on navigation to another screen, new configuration will be lost and CMP fallbacks to the original configuration.
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
params |
Object |
Properties
|
Returns:
- API command executed successfully
- Type
- boolean
(static) registerCommand(command, callback) → {boolean}
registers command from target application; invoke callbacks on click of help4api link
Parameters:
Name | Type | Description |
---|---|---|
command |
string | |
callback |
function |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) removeCondition(condition) → {boolean}
removes a condition key
Parameters:
Name | Type | Description |
---|---|---|
condition |
string |
Returns:
- API command executed successfully, undefined if controller is not ready and CMP needs to wait
- Type
- boolean
(static) runCommand(command)
invoke the callback on click of help4api links
callback will be registered by target application via Help4.API.registerCommand
Parameters:
Name | Type | Description |
---|---|---|
command |
string |
(static) selectHelpTile(tileId) → {boolean}
selects a help tile within the current help project
will open the appropriate bubble and highlight the tile within carousel
Parameters:
Name | Type | Description |
---|---|---|
tileId |
string | tile ID |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) selectTourStep(sid) → {Promise.<boolean>}
selects a tour step with a current tour project
Parameters:
Name | Type | Description |
---|---|---|
sid |
number | string | step number or step ID |
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(static) setAppName(screenId) → {boolean}
set the current screen id / app name; alias for setScreen
Parameters:
Name | Type | Description |
---|---|---|
screenId |
string | appName or screenId |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) setCondition(condition, value) → {boolean}
passes a condition; these conditions will be used in evaluating availability of tours/helps/tour steps
Parameters:
Name | Type | Description |
---|---|---|
condition |
string | condition name |
value |
string |
Returns:
- API command executed successfully, undefined if controller is not ready and CMP needs to wait
- Type
- boolean
(async, static) setConditions(conditions) → {boolean}
passes set of conditions (as an object)
Parameters:
Name | Type | Description |
---|---|---|
conditions |
Array.<Object> | [{ |
Returns:
- API command executed successfully, undefined if controller is not ready and CMP needs to wait
- Type
- boolean
(static) setFeatureProfileUACP(profile) → {boolean}
sets the value for profile parameter in UACP
Parameters:
Name | Type | Description |
---|---|---|
profile |
string | the feature profile name |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) setLanguage(language) → {Promise.<boolean>}
sets SAP Companion language
Parameters:
Name | Type | Description |
---|---|---|
language |
string |
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(static) setPlaceholder(key, valueopt)
sets the key and value for placeholders
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
key |
string | Object | string or {"key1": "value1", "key2": "value", ...} | |
value |
string |
<optional> |
(static) setScreen(screenId) → {boolean}
set the current screen id / app name; alias for Help4.API.setAppName
Parameters:
Name | Type | Description |
---|---|---|
screenId |
string | appName or screenId |
Returns:
- API command executed successfully
- Type
- boolean
(static) setSubScreen(subscreenId) → {boolean}
sets or unsets a subscreen id
Parameters:
Name | Type | Description |
---|---|---|
subscreenId |
string | null | subscreen ID, null for removing |
Returns:
- API command executed successfully
- Type
- boolean
(static) setTheme(theme) → {boolean}
will change the current theme
Parameters:
Name | Type | Description |
---|---|---|
theme |
string | e.g. default, hcb, light |
Returns:
- API command executed successfully
- Type
- boolean
(static) showHelpBubble(param) → {boolean}
shows the help bubble for a specific tile within the current help project
will not update the carousel
if in remote mode, shows help bubble; API version 2.0
Parameters:
Name | Type | Description |
---|---|---|
param |
string | tile ID |
Returns:
- API command executed successfully
- Type
- boolean
(static) startProject(pidOrAlias, publishedopt) → {boolean}
starts a specific project: help, whatsnew or tour projects are possible
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pidOrAlias |
string | project ID or alias | ||
published |
boolean | 'all' |
<optional> |
false | show only published, only not-published or all |
Returns:
- API command executed successfully
- Type
- boolean
(static) toggle(paramsopt) → {boolean}
will open/close the SAP Companion based on its current status
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Help4.API.OpenParams |
<optional> |
CMP4 only |
Returns:
- API command executed successfully
- Type
- boolean
(static) toggleWA(paramsopt) → {boolean}
will open/close the SAP Companion based on its current status
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
Help4.API.OpenParams |
<optional> |
CMP4 only |
Returns:
- API command executed successfully
- Type
- boolean
(async, static) tourNextStep() → {Promise.<boolean>}
selects the next tour step with a current tour project
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(async, static) tourPrevStep() → {Promise.<boolean>}
selects the previous tour step with a current tour project
Returns:
- API command executed successfully
- Type
- Promise.<boolean>
(static) waitCompanionReady() → {Promise.<void>}
will wait until SAP Companion is ready and returns boolean
Returns:
- will only return if SAP Companion is ready
- Type
- Promise.<void>
Type Definitions
HelpTileParams
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
summaryText |
string | ||
content |
string | ||
title |
string | ||
id |
string |
<optional> |
|
bubbleAnimationType |
Help4.typedef.BubbleAnimationType |
<optional> |
|
bubbleOffset |
Help4.control2.PositionLeftTop |
<optional> |
|
bubbleOrientation |
Help4.typedef.BubbleOrientation |
<optional> |
|
bubbleSize |
string |
<optional> |
|
hotspotAnchor |
string |
<optional> |
|
hotspotAnimationType |
string |
<optional> |
|
hotspotCentered |
boolean |
<optional> |
|
hotspotIconPos |
Help4.typedef.HotspotIconPosition |
<optional> |
|
hotspotIconType |
Help4.typedef.HotspotIconType |
<optional> |
|
hotspotManualOffset |
Help4.control2.PositionLeftTop |
<optional> |
|
hotspotSize |
string |
<optional> |
|
hotspotStyle |
string |
<optional> |
|
hotspotRectDelta |
Help4.control2.SizeWidthHeight |
<optional> |
|
hotspotTrianglePos |
string |
<optional> |
|
alignWithText |
boolean |
<optional> |
|
showTitleBar |
boolean |
<optional> |
|
tileIcon |
Help4.typedef.TileIcons |
<optional> |
LinkTileParams
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
sizing |
Help4.control2.Lightbox.Sizing | ||
size |
Help4.control2.SizeWH |
<optional> |
size is required if sizing is explicit or explicitFull |
contentUrl |
string |
<optional> |
content or contentUrl is required |
content |
string |
<optional> |
content or contentUrl is required |
title |
string | ||
summaryText |
string |
<optional> |
|
id |
string |
<optional> |
OpenParams
Type:
- Object
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
position |
Help4.control2.PositionXY | Help4.control2.PositionLeftTop |
<optional> |
||
showCarousel |
boolean |
<optional> |
false |
RemoteControlParams
Type:
- Object
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
type |
string | ||
data |
Object |
<optional> |
|
params |
Object |
<optional> |
|
visible |
boolean |
<optional> |
TypeProjectInfo
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
standard |
Array.<Object> | standard content |
whatsnew |
Array.<Object> | what's new content |
TypeProjectList
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
published |
Help4.API.TypeProjectInfo | the published data |
head |
Help4.API.TypeProjectInfo | the non-published data |