2021-02-19 16:42:16 +00:00
|
|
|
export default function(visitable, attribute, present, submitable, deletable, cancelable) {
|
2019-08-02 11:51:08 +00:00
|
|
|
return {
|
|
|
|
visit: visitable(['/:dc/kv/:kv/edit', '/:dc/kv/create'], function(str) {
|
|
|
|
// this will encode the parts of the key path but means you can no longer
|
|
|
|
// visit with path parts containing slashes
|
|
|
|
return str
|
|
|
|
.split('/')
|
|
|
|
.map(encodeURIComponent)
|
|
|
|
.join('/');
|
|
|
|
}),
|
2020-05-11 15:37:11 +00:00
|
|
|
...submitable({}, 'main'),
|
2019-08-02 11:51:08 +00:00
|
|
|
...cancelable(),
|
|
|
|
...deletable(),
|
2022-01-04 16:08:06 +00:00
|
|
|
kv: {
|
|
|
|
Key: attribute('data-test-kv-key', '[data-test-kv-key]')
|
|
|
|
},
|
2019-08-02 11:51:08 +00:00
|
|
|
session: {
|
2021-02-19 16:42:16 +00:00
|
|
|
warning: present('[data-test-session-warning]'),
|
2019-08-02 11:51:08 +00:00
|
|
|
ID: attribute('data-test-session', '[data-test-session]'),
|
|
|
|
...deletable({}, '[data-test-session]'),
|
|
|
|
},
|
|
|
|
};
|
2018-07-04 14:06:20 +00:00
|
|
|
}
|