@kano/kbc-prompt
Injectable video into mini apps
Last updated 6 days ago by onishiweb .
ISC · Original npm · Tarball · package.json
$ cnpm install @kano/kbc-prompt 
SYNC missed versions from official npm registry.

kbc-prompt

A prompt manager, currently used for onboarding and prompting sharing in boilerplate apps.

Usage

Add component to a higher level of the app, preferably the ViewManager. However, should also be below the DialogManager. You can optionally add the userProfile and appName.

<PromptManager userProfile={userClient.userProfile} prompt={prompt} appName="Kano Code" />

Similar to dialogs, prompt's are provided as props and are triggered to show immediately after they have been set on the PromptManager.

Prompt Format

{
    name: 'prompt-description'                           // the name is used as the key when saving to localStorage
    onClose?: 'store'                                    // currently there is only one option onClose and that is to store the fact the prompt has shown in localStorage
    prompts: [{                                          // An array of prompts to be shown in order when skip or target is clicked
        id: 'open-share',
        targetId: targetId ? targetId : 'nav__share',    // This is the id of HTMLElement where you would like to show the prompt, an eventListener will be added to this to trigger the next prompt
        topText: 'Awesome work! Try',                    
        subText?: 'sharing your creation',
        skipText?: 'next',                               // default is 'skip'
    }]
}

Special Case

User On-Boarding

User On-Boarding is handled by the prompt manager, however you can choose to hide the onboarding with hideOnBoarding.

Tracking

By Component

Component (location) Function Event / Error Name Extra Info
KbcPrompt action prompt_target_clicked module: prompt-manager, action click, data: { name: currentPrompt.name, id: currentPrompt.prompts[index].id }
KbcPrompt action prompt_closed module: prompt-manager, action click, data: { name: currentPrompt.name, id: currentPrompt.prompts[index].id }
KbcPrompt action prompt_skipped module: prompt-manager, action click, data: { name: currentPrompt.name, id: currentPrompt.prompts[index].id }

Current Tags

  • 1.7.5                                ...           latest (6 days ago)

67 Versions

  • 1.7.5                                ...           6 days ago
  • 1.7.4-alpha.0                                ...           7 days ago
  • 1.7.3                                ...           12 days ago
  • 1.7.2                                ...           12 days ago
  • 1.7.1                                ...           13 days ago
  • 1.7.0                                ...           14 days ago
  • 1.6.2                                ...           15 days ago
  • 1.6.1                                ...           15 days ago
  • 1.6.0                                ...           15 days ago
  • 1.5.9                                ...           18 days ago
  • 1.5.8                                ...           19 days ago
  • 1.5.6                                ...           19 days ago
  • 1.5.5                                ...           a month ago
  • 1.5.4                                ...           a month ago
  • 1.5.3                                ...           a month ago
  • 1.5.2                                ...           a month ago
  • 1.5.1                                ...           a month ago
  • 1.5.0                                ...           a month ago
  • 1.4.3                                ...           a month ago
  • 1.4.2                                ...           a month ago
  • 1.4.1                                ...           2 months ago
  • 1.4.0                                ...           2 months ago
  • 1.3.2                                ...           2 months ago
  • 1.3.1                                ...           2 months ago
  • 1.3.0                                ...           2 months ago
  • 1.2.4                                ...           2 months ago
  • 1.2.3                                ...           2 months ago
  • 1.2.2                                ...           2 months ago
  • 1.2.1                                ...           2 months ago
  • 1.2.0                                ...           2 months ago
  • 1.1.16                                ...           2 months ago
  • 1.1.15                                ...           2 months ago
  • 1.1.14                                ...           2 months ago
  • 1.1.13                                ...           2 months ago
  • 1.1.12                                ...           2 months ago
  • 1.1.11                                ...           2 months ago
  • 1.1.10                                ...           2 months ago
  • 1.1.9                                ...           2 months ago
  • 1.1.8                                ...           3 months ago
  • 1.1.7                                ...           3 months ago
  • 1.1.6                                ...           3 months ago
  • 1.1.5                                ...           3 months ago
  • 1.1.4                                ...           3 months ago
  • 1.1.3                                ...           3 months ago
  • 1.1.2                                ...           3 months ago
  • 1.1.1                                ...           3 months ago
  • 1.1.0                                ...           3 months ago
  • 1.0.4                                ...           3 months ago
  • 1.0.3                                ...           3 months ago
  • 1.0.2                                ...           3 months ago
  • 1.0.1                                ...           3 months ago
  • 1.0.0                                ...           3 months ago
  • 4.26.12-alpha.0                                ...           3 months ago
  • 4.26.11-alpha.0                                ...           3 months ago
  • 4.26.10-alpha.0                                ...           3 months ago
  • 4.26.9-alpha.0                                ...           3 months ago
  • 4.26.8-alpha.0                                ...           3 months ago
  • 4.26.3-alpha.0                                ...           4 months ago
  • 4.26.2-alpha.0                                ...           4 months ago
  • 4.26.1-alpha.0                                ...           4 months ago
  • 4.26.0-alpha.0                                ...           4 months ago
  • 4.25.4-alpha.0                                ...           4 months ago
  • 4.25.2-alpha.0                                ...           4 months ago
  • 4.25.0-alpha.1                                ...           4 months ago
  • 4.25.0-alpha.0                                ...           4 months ago
  • 4.23.1-alpha.0                                ...           4 months ago
  • 4.23.0-alpha.0                                ...           4 months ago
Downloads
Today 0
This Week 0
This Month 157
Last Day 0
Last Week 20
Last Month 233
Dependencies (7)
Dev Dependencies (1)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |