2018-08-28 05:03:55 +00:00
|
|
|
export default {
|
|
|
|
key: 'tutorial',
|
|
|
|
initial: 'idle',
|
|
|
|
on: {
|
|
|
|
DISMISS: 'dismissed',
|
|
|
|
DONE: 'complete',
|
|
|
|
PAUSE: 'paused',
|
|
|
|
},
|
|
|
|
states: {
|
|
|
|
init: {
|
|
|
|
key: 'init',
|
|
|
|
initial: 'idle',
|
|
|
|
on: { INITDONE: 'active.select' },
|
|
|
|
onEntry: [
|
|
|
|
'showTutorialAlways',
|
|
|
|
{ type: 'render', level: 'tutorial', component: 'wizard/tutorial-idle' },
|
|
|
|
{ type: 'render', level: 'feature', component: null },
|
|
|
|
],
|
2018-10-18 19:19:50 +00:00
|
|
|
onExit: ['showTutorialWhenAuthenticated', 'clearFeatureData'],
|
2018-08-28 05:03:55 +00:00
|
|
|
states: {
|
|
|
|
idle: {
|
|
|
|
on: {
|
|
|
|
START: 'active.setup',
|
|
|
|
SAVE: 'active.save',
|
|
|
|
UNSEAL: 'active.unseal',
|
|
|
|
LOGIN: 'active.login',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
active: {
|
|
|
|
onEntry: { type: 'render', level: 'tutorial', component: 'wizard/tutorial-active' },
|
|
|
|
states: {
|
|
|
|
setup: {
|
|
|
|
on: { TOSAVE: 'save' },
|
|
|
|
onEntry: { type: 'render', level: 'feature', component: 'wizard/init-setup' },
|
|
|
|
},
|
|
|
|
save: {
|
2018-09-28 14:36:18 +00:00
|
|
|
on: {
|
|
|
|
TOUNSEAL: 'unseal',
|
|
|
|
TOLOGIN: 'login',
|
|
|
|
},
|
2018-08-28 05:03:55 +00:00
|
|
|
onEntry: { type: 'render', level: 'feature', component: 'wizard/init-save-keys' },
|
|
|
|
},
|
|
|
|
unseal: {
|
|
|
|
on: { TOLOGIN: 'login' },
|
|
|
|
onEntry: { type: 'render', level: 'feature', component: 'wizard/init-unseal' },
|
|
|
|
},
|
|
|
|
login: {
|
|
|
|
onEntry: { type: 'render', level: 'feature', component: 'wizard/init-login' },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
active: {
|
|
|
|
key: 'feature',
|
|
|
|
initial: 'select',
|
|
|
|
onEntry: { type: 'render', level: 'tutorial', component: 'wizard/tutorial-active' },
|
|
|
|
states: {
|
|
|
|
select: {
|
|
|
|
on: {
|
|
|
|
CONTINUE: 'feature',
|
|
|
|
},
|
|
|
|
onEntry: { type: 'render', level: 'feature', component: 'wizard/features-selection' },
|
|
|
|
},
|
|
|
|
feature: {},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
idle: {
|
|
|
|
on: {
|
|
|
|
INIT: 'init.idle',
|
|
|
|
AUTH: 'active.select',
|
|
|
|
CONTINUE: 'active',
|
|
|
|
},
|
|
|
|
onEntry: [
|
|
|
|
{ type: 'render', level: 'feature', component: null },
|
|
|
|
{ type: 'render', level: 'step', component: null },
|
|
|
|
{ type: 'render', level: 'detail', component: null },
|
|
|
|
{ type: 'render', level: 'tutorial', component: 'wizard/tutorial-idle' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
dismissed: {
|
|
|
|
onEntry: [
|
|
|
|
{ type: 'render', level: 'tutorial', component: null },
|
|
|
|
{ type: 'render', level: 'feature', component: null },
|
|
|
|
{ type: 'render', level: 'step', component: null },
|
|
|
|
{ type: 'render', level: 'detail', component: null },
|
|
|
|
'handleDismissed',
|
|
|
|
],
|
|
|
|
},
|
|
|
|
paused: {
|
|
|
|
on: {
|
|
|
|
CONTINUE: 'active.feature',
|
|
|
|
},
|
|
|
|
onEntry: [
|
|
|
|
{ type: 'render', level: 'feature', component: null },
|
|
|
|
{ type: 'render', level: 'step', component: null },
|
|
|
|
{ type: 'render', level: 'detail', component: null },
|
|
|
|
{ type: 'render', level: 'tutorial', component: 'wizard/tutorial-paused' },
|
|
|
|
'handlePaused',
|
|
|
|
],
|
|
|
|
onExit: ['handleResume'],
|
|
|
|
},
|
|
|
|
complete: {
|
|
|
|
onEntry: [
|
|
|
|
{ type: 'render', level: 'feature', component: null },
|
|
|
|
{ type: 'render', level: 'step', component: null },
|
|
|
|
{ type: 'render', level: 'detail', component: null },
|
|
|
|
{ type: 'render', level: 'tutorial', component: 'wizard/tutorial-complete' },
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|
};
|