c6dd21f4dd
This commit uses all our new ways of doing things to Lock Sessions and their interactions with KV and Nodes. This is mostly around are new under-the-hood things, but also I took the opportunity to upgrade some of the CSS to reuse some of our CSS utils that have been made over the past few months (%csv-list and %horizontal-kv-list). Also added (and worked on existing) documentation for Lock Session related components.
56 lines
784 B
JavaScript
56 lines
784 B
JavaScript
export default {
|
|
id: 'data-loader',
|
|
initial: 'load',
|
|
on: {
|
|
OPEN: {
|
|
target: 'load',
|
|
},
|
|
ERROR: {
|
|
target: 'disconnected',
|
|
},
|
|
LOAD: [
|
|
{
|
|
target: 'idle',
|
|
cond: 'loaded',
|
|
},
|
|
{
|
|
target: 'loading',
|
|
},
|
|
],
|
|
INVALIDATE: [
|
|
{
|
|
target: 'invalidating',
|
|
},
|
|
],
|
|
},
|
|
states: {
|
|
load: {},
|
|
invalidating: {},
|
|
loading: {
|
|
on: {
|
|
SUCCESS: {
|
|
target: 'idle',
|
|
},
|
|
ERROR: {
|
|
target: 'error',
|
|
},
|
|
},
|
|
},
|
|
idle: {},
|
|
error: {
|
|
on: {
|
|
RETRY: {
|
|
target: 'load',
|
|
},
|
|
},
|
|
},
|
|
disconnected: {
|
|
on: {
|
|
RETRY: {
|
|
target: 'load',
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|