|
|
|
@ -1942,16 +1942,16 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<div expr24="expr24" class="field-error"></div>',
|
|
|
|
|
'<div expr28="expr28" class="field-error"></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.errors.length > 0,
|
|
|
|
|
redundantAttribute: 'expr24',
|
|
|
|
|
selector: '[expr24]',
|
|
|
|
|
redundantAttribute: 'expr28',
|
|
|
|
|
selector: '[expr28]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<ul><li expr25="expr25"></li></ul>',
|
|
|
|
|
'<ul><li expr29="expr29"></li></ul>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -1978,8 +1978,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr25',
|
|
|
|
|
selector: '[expr25]',
|
|
|
|
|
redundantAttribute: 'expr29',
|
|
|
|
|
selector: '[expr29]',
|
|
|
|
|
itemName: 'error',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.errors
|
|
|
|
@ -2006,39 +2006,30 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/* harmony import */ var _riotjs_observable__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @riotjs/observable */ "../../node_modules/@riotjs/observable/dist/observable.js");
|
|
|
|
|
/* harmony import */ var _riotjs_observable__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_riotjs_observable__WEBPACK_IMPORTED_MODULE_0__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
|
|
|
css: null,
|
|
|
|
|
|
|
|
|
|
exports: {
|
|
|
|
|
state: {
|
|
|
|
|
isOpen: false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onMounted()
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleClose()
|
|
|
|
|
{
|
|
|
|
|
_riotjs_observable__WEBPACK_IMPORTED_MODULE_0___default()(this.root)
|
|
|
|
|
|
|
|
|
|
this.root.on('open', () => {
|
|
|
|
|
this.state.isOpen = true
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
this.props.close()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
getClasses()
|
|
|
|
|
getCssClasses()
|
|
|
|
|
{
|
|
|
|
|
let classes = [
|
|
|
|
|
const classes = [
|
|
|
|
|
'sidebar'
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (this.state.isOpen === true) {
|
|
|
|
|
if (this.props.open === true) {
|
|
|
|
|
classes.push('sidebar--open')
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2052,7 +2043,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<div expr0="expr0"><div class="sidebar__inner"><div class="bar"><div class="bar__main"><slot expr1="expr1" name="title"></slot></div><div class="bar__end"><button expr2="expr2" class="button button--transparent" type="button"><svg class="icon fill-text-contrast" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg></button></div></div><div class="sidebar__body"><slot expr3="expr3" name="form"></slot></div><div class="sidebar__footer"><button class="button m-bottom-0" type="submit" form="app-users-form">\n Save\n <svg class="icon fill-success p-left-3" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-check"/></svg></button><button class="button m-bottom-0" type="submit" form="app-users-form" close>\n Save and Close\n <svg class="icon fill-success p-left-3" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-arrow-right"/></svg></button></div></div></div>',
|
|
|
|
|
'<div expr0="expr0"><div class="sidebar__inner"><div class="bar"><div class="bar__main"><slot expr1="expr1" name="title"></slot></div><div class="bar__end"><button expr2="expr2" class="button button--transparent" type="button"><svg class="icon fill-text-contrast" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg></button></div></div><div class="sidebar__body"><slot expr3="expr3" name="form"></slot></div><div class="sidebar__footer"><button expr4="expr4" class="button m-bottom-0" type="submit">\n Save\n <svg class="icon fill-success p-left-3" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-check"/></svg></button><button expr5="expr5" class="button m-bottom-0" type="submit" close>\n Save and Close\n <svg class="icon fill-success p-left-3" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-arrow-right"/></svg></button></div></div></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr0',
|
|
|
|
@ -2062,7 +2053,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'class',
|
|
|
|
|
evaluate: _scope => _scope.getClasses()
|
|
|
|
|
evaluate: _scope => _scope.getCssClasses()
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
@ -2087,18 +2078,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.SLOT,
|
|
|
|
|
attributes: [],
|
|
|
|
|
name: 'form',
|
|
|
|
|
redundantAttribute: 'expr3',
|
|
|
|
|
selector: '[expr3]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr4',
|
|
|
|
|
selector: '[expr4]',
|
|
|
|
|
|
|
|
|
|
attributes: [
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'data',
|
|
|
|
|
evaluate: _scope => _scope.state.data
|
|
|
|
|
name: 'form',
|
|
|
|
|
evaluate: _scope => _scope.props.formId
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr5',
|
|
|
|
|
selector: '[expr5]',
|
|
|
|
|
|
|
|
|
|
name: 'form',
|
|
|
|
|
redundantAttribute: 'expr3',
|
|
|
|
|
selector: '[expr3]'
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'form',
|
|
|
|
|
evaluate: _scope => _scope.props.formId
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
@ -2119,10 +2126,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js");
|
|
|
|
|
/* harmony import */ var _tiny_components_validator_src_formValidator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @tiny-components/validator/src/formValidator.js */ "../../node_modules/@tiny-components/validator/src/formValidator.js");
|
|
|
|
|
/* harmony import */ var _tiny_components_validator_src_fieldError_riot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @tiny-components/validator/src/fieldError.riot */ "../../node_modules/@tiny-components/validator/src/fieldError.riot");
|
|
|
|
|
/* harmony import */ var _stores_taskForm_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../stores/taskForm.js */ "./js/stores/taskForm.js");
|
|
|
|
|
/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js");
|
|
|
|
|
/* harmony import */ var _stores_taskForm_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../stores/taskForm.js */ "./js/stores/taskForm.js");
|
|
|
|
|
/* harmony import */ var _mixins_sidebar_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../mixins/sidebar.js */ "./js/mixins/sidebar.js");
|
|
|
|
|
/* harmony import */ var _tiny_components_validator_src_fieldError_riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @tiny-components/validator/src/fieldError.riot */ "../../node_modules/@tiny-components/validator/src/fieldError.riot");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -2130,69 +2139,65 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_3__.register('field-error', _tiny_components_validator_src_fieldError_riot__WEBPACK_IMPORTED_MODULE_1__["default"])
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.register('field-error', _tiny_components_validator_src_fieldError_riot__WEBPACK_IMPORTED_MODULE_3__["default"])
|
|
|
|
|
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
|
|
|
css: null,
|
|
|
|
|
|
|
|
|
|
exports: {
|
|
|
|
|
state: {
|
|
|
|
|
requestHandlers: [],
|
|
|
|
|
validator: undefined,
|
|
|
|
|
current: {
|
|
|
|
|
exports: () => {
|
|
|
|
|
return {
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
isOpen: false
|
|
|
|
|
},
|
|
|
|
|
..._mixins_sidebar_js__WEBPACK_IMPORTED_MODULE_2__["default"],
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
onMounted()
|
|
|
|
|
{
|
|
|
|
|
// creating formValidator
|
|
|
|
|
this.state.validator = new _tiny_components_validator_src_formValidator_js__WEBPACK_IMPORTED_MODULE_0__["default"](this.$('.form'), {
|
|
|
|
|
'name': {
|
|
|
|
|
'presence': true
|
|
|
|
|
},
|
|
|
|
|
'url': {
|
|
|
|
|
'presence': true
|
|
|
|
|
},
|
|
|
|
|
'requestHandler': {
|
|
|
|
|
'presence': true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
state: {
|
|
|
|
|
requestHandlers: [],
|
|
|
|
|
validator: undefined,
|
|
|
|
|
current: {
|
|
|
|
|
|
|
|
|
|
// adding on success
|
|
|
|
|
this.state.validator.onSuccess((event, data) => {
|
|
|
|
|
this.handleSuccess(event, data)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
_stores_taskForm_js__WEBPACK_IMPORTED_MODULE_2__["default"].on('toggle-form', () => {
|
|
|
|
|
if (this.state.isOpen) {
|
|
|
|
|
this.state.isOpen = false
|
|
|
|
|
} else {
|
|
|
|
|
this.state.isOpen = true
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
onMounted()
|
|
|
|
|
{
|
|
|
|
|
// creating formValidator
|
|
|
|
|
this.state.validator = new _tiny_components_validator_src_formValidator_js__WEBPACK_IMPORTED_MODULE_0__["default"](this.$('.form'), {
|
|
|
|
|
'name': {
|
|
|
|
|
'presence': true
|
|
|
|
|
},
|
|
|
|
|
'url': {
|
|
|
|
|
'presence': true
|
|
|
|
|
},
|
|
|
|
|
'requestHandler': {
|
|
|
|
|
'presence': true
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
// adding on success
|
|
|
|
|
this.state.validator.onSuccess((event, data) => {
|
|
|
|
|
this.handleSuccess(event, data)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.update()
|
|
|
|
|
},
|
|
|
|
|
_stores_taskForm_js__WEBPACK_IMPORTED_MODULE_1__["default"].on('open', (data) => {
|
|
|
|
|
this.state.isOpen = true
|
|
|
|
|
this.update()
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param {object} event
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleSubmit(event)
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleSuccess(event, data)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
template: (
|
|
|
|
|
template,
|
|
|
|
@ -2200,7 +2205,7 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<app-sidebar expr15="expr15"></app-sidebar>',
|
|
|
|
|
'<app-sidebar expr18="expr18" form-id="app-task-form"></app-sidebar>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
@ -2210,14 +2215,14 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
slots: [
|
|
|
|
|
{
|
|
|
|
|
id: 'title',
|
|
|
|
|
html: '<span slot="title"><virtual expr16="expr16"></virtual><virtual expr17="expr17"></virtual></span>',
|
|
|
|
|
html: '<span slot="title"><virtual expr19="expr19"></virtual><virtual expr20="expr20"></virtual></span>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.current.name,
|
|
|
|
|
redundantAttribute: 'expr16',
|
|
|
|
|
selector: '[expr16]',
|
|
|
|
|
redundantAttribute: 'expr19',
|
|
|
|
|
selector: '[expr19]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
null,
|
|
|
|
@ -2260,8 +2265,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => !_scope.state.current.name,
|
|
|
|
|
redundantAttribute: 'expr17',
|
|
|
|
|
selector: '[expr17]',
|
|
|
|
|
redundantAttribute: 'expr20',
|
|
|
|
|
selector: '[expr20]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
null,
|
|
|
|
@ -2288,12 +2293,12 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'form',
|
|
|
|
|
html: '<form expr18="expr18" class="form" slot="form"><div class="field-group"><label class="field-label">\n name\n <input class="field-text" name="name" type="text"/><field-error expr19="expr19" name="name"></field-error></label></div><div class="field-group"><label class="field-label">\n url\n <input class="field-text" name="url" type="text"/><field-error expr20="expr20" name="url"></field-error></label></div><div class="field-group"><label class="field-label">\n requestHandler\n <select class="field-choice" name="requesthandler"><option></option><option expr21="expr21"></option></select><field-error expr22="expr22" name="requesthandler"></field-error></label></div></form>',
|
|
|
|
|
html: '<form expr21="expr21" id="app-task-form" class="form" slot="form"><div class="field-group"><label class="field-label">\n name\n <input class="field-text" name="name" type="text"/><field-error expr22="expr22" name="name"></field-error></label></div><div class="field-group"><label class="field-label">\n url\n <input class="field-text" name="url" type="text"/><field-error expr23="expr23" name="url"></field-error></label></div><div class="field-group"><label class="field-label">\n requestHandler\n <select class="field-choice" name="requestHandler"><option></option><option expr24="expr24"></option></select><field-error expr25="expr25" name="requestHandler"></field-error></label></div><div class="field-group"><label class="field-label">\n action\n <select class="field-choice" name="action"><option></option><option expr26="expr26"></option></select><field-error expr27="expr27" name="action"></field-error></label></div></form>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr18',
|
|
|
|
|
selector: '[expr18]',
|
|
|
|
|
redundantAttribute: 'expr21',
|
|
|
|
|
selector: '[expr21]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2309,8 +2314,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr19',
|
|
|
|
|
selector: '[expr19]'
|
|
|
|
|
redundantAttribute: 'expr22',
|
|
|
|
|
selector: '[expr22]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
@ -2318,8 +2323,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr20',
|
|
|
|
|
selector: '[expr20]'
|
|
|
|
|
redundantAttribute: 'expr23',
|
|
|
|
|
selector: '[expr23]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -2331,8 +2336,8 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
[]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr21',
|
|
|
|
|
selector: '[expr21]',
|
|
|
|
|
redundantAttribute: 'expr24',
|
|
|
|
|
selector: '[expr24]',
|
|
|
|
|
itemName: 'handler',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.requestHandlers
|
|
|
|
@ -2343,16 +2348,53 @@ riot__WEBPACK_IMPORTED_MODULE_3__.mount('field-error')
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr22',
|
|
|
|
|
selector: '[expr22]'
|
|
|
|
|
redundantAttribute: 'expr25',
|
|
|
|
|
selector: '[expr25]'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
|
getKey: null,
|
|
|
|
|
condition: null,
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
null,
|
|
|
|
|
[]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr26',
|
|
|
|
|
selector: '[expr26]',
|
|
|
|
|
itemName: 'handler',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.actions
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.TAG,
|
|
|
|
|
getComponent: getComponent,
|
|
|
|
|
evaluate: _scope => 'field-error',
|
|
|
|
|
slots: [],
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr27',
|
|
|
|
|
selector: '[expr27]'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
attributes: [],
|
|
|
|
|
redundantAttribute: 'expr15',
|
|
|
|
|
selector: '[expr15]'
|
|
|
|
|
attributes: [
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'open',
|
|
|
|
|
evaluate: _scope => _scope.state.isOpen
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.ATTRIBUTE,
|
|
|
|
|
name: 'close',
|
|
|
|
|
evaluate: _scope => () => { _scope.handleClose() }
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr18',
|
|
|
|
|
selector: '[expr18]'
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
@ -2381,12 +2423,19 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
|
|
|
|
exports: {
|
|
|
|
|
state: {
|
|
|
|
|
form: undefined
|
|
|
|
|
text: 'new'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
onMounted()
|
|
|
|
|
{
|
|
|
|
|
this.state.form = document.querySelector('#task-form').firstChild
|
|
|
|
|
// if props for text is set
|
|
|
|
|
if (this.props.text) {
|
|
|
|
|
this.state.text = this.props.text
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -2394,9 +2443,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
* @param {[type]} event
|
|
|
|
|
* @return {[type]}
|
|
|
|
|
*/
|
|
|
|
|
handleNew(event)
|
|
|
|
|
handleOpen(event, data = undefined)
|
|
|
|
|
{
|
|
|
|
|
document.querySelector('#task-form').firstChild.trigger('open')
|
|
|
|
|
_stores_taskForm_js__WEBPACK_IMPORTED_MODULE_0__["default"].open(data)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
@ -2406,24 +2455,34 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<button expr23="expr23" class="button m-bottom-0 m-top-5"><svg class="icon fill-text-contrast" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg>\n New\n </button>',
|
|
|
|
|
'<button expr6="expr6" class="button m-bottom-0 m-top-5"><svg class="icon fill-text-contrast" aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-close"/></svg> </button>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr23',
|
|
|
|
|
selector: '[expr23]',
|
|
|
|
|
redundantAttribute: 'expr6',
|
|
|
|
|
selector: '[expr6]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.TEXT,
|
|
|
|
|
childNodeIndex: 1,
|
|
|
|
|
|
|
|
|
|
evaluate: _scope => [
|
|
|
|
|
_scope.state.text
|
|
|
|
|
].join(
|
|
|
|
|
''
|
|
|
|
|
)
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
type: expressionTypes.EVENT,
|
|
|
|
|
name: 'onclick',
|
|
|
|
|
evaluate: _scope => (event) => { _scope.handleNew(event) }
|
|
|
|
|
evaluate: _scope => (event) => { _scope.handleOpen(event) }
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
name: 'app-action-new'
|
|
|
|
|
name: 'app-task-button'
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
@ -2492,7 +2551,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
bindingTypes,
|
|
|
|
|
getComponent
|
|
|
|
|
) => template(
|
|
|
|
|
'<div class="tasks"><table class="table table--stripped"><thead><tr><th class="table__th">\n name\n </th><th class="table__th">\n url\n </th><th class="table__th">\n requestHandler\n </th><th class="table__th">\n actions\n </th><th class="table__th">\n cron\n </th><th class="table__th"></th><tr></tr><tbody><tr expr4="expr4"></tr><tr expr14="expr14"></tr></tbody></tr></thead></table></div>',
|
|
|
|
|
'<div class="tasks"><table class="table table--stripped"><thead><tr><th class="table__th">\n name\n </th><th class="table__th">\n url\n </th><th class="table__th">\n requestHandler\n </th><th class="table__th">\n actions\n </th><th class="table__th">\n cron\n </th><th class="table__th"></th><tr></tr><tbody><tr expr7="expr7"></tr><tr expr17="expr17"></tr></tbody></tr></thead></table></div>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.EACH,
|
|
|
|
@ -2500,11 +2559,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
condition: _scope => _scope.state.tasks.length > 0,
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<td expr5="expr5" class="table__td"> </td><td expr6="expr6" class="table__td"> </td><td expr7="expr7" class="table__td"> </td><td class="table__td"><virtual expr8="expr8"></virtual></td><td expr11="expr11" class="table__td"> </td><td class="table__td"><button expr12="expr12" class="button">\n Edit\n </button><button expr13="expr13" class="button">\n Delete\n </button></td>',
|
|
|
|
|
'<td expr8="expr8" class="table__td"> </td><td expr9="expr9" class="table__td"> </td><td expr10="expr10" class="table__td"> </td><td class="table__td"><virtual expr11="expr11"></virtual></td><td expr14="expr14" class="table__td"> </td><td class="table__td"><button expr15="expr15" class="button">\n Edit\n </button><button expr16="expr16" class="button">\n Delete\n </button></td>',
|
|
|
|
|
[
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr5',
|
|
|
|
|
selector: '[expr5]',
|
|
|
|
|
redundantAttribute: 'expr8',
|
|
|
|
|
selector: '[expr8]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2520,8 +2579,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr6',
|
|
|
|
|
selector: '[expr6]',
|
|
|
|
|
redundantAttribute: 'expr9',
|
|
|
|
|
selector: '[expr9]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2537,8 +2596,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr7',
|
|
|
|
|
selector: '[expr7]',
|
|
|
|
|
redundantAttribute: 'expr10',
|
|
|
|
|
selector: '[expr10]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2569,12 +2628,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
slots: [
|
|
|
|
|
{
|
|
|
|
|
id: 'default',
|
|
|
|
|
html: '<span expr9="expr9"> </span><span expr10="expr10"></span>',
|
|
|
|
|
html: '<span expr12="expr12"> </span><span expr13="expr13"></span>',
|
|
|
|
|
|
|
|
|
|
bindings: [
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr9',
|
|
|
|
|
selector: '[expr9]',
|
|
|
|
|
redundantAttribute: 'expr12',
|
|
|
|
|
selector: '[expr12]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2592,8 +2651,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.actions.options,
|
|
|
|
|
redundantAttribute: 'expr10',
|
|
|
|
|
selector: '[expr10]',
|
|
|
|
|
redundantAttribute: 'expr13',
|
|
|
|
|
selector: '[expr13]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
' ',
|
|
|
|
@ -2624,15 +2683,15 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr8',
|
|
|
|
|
selector: '[expr8]',
|
|
|
|
|
redundantAttribute: 'expr11',
|
|
|
|
|
selector: '[expr11]',
|
|
|
|
|
itemName: 'action',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.task.actions
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr11',
|
|
|
|
|
selector: '[expr11]',
|
|
|
|
|
redundantAttribute: 'expr14',
|
|
|
|
|
selector: '[expr14]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2648,8 +2707,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr12',
|
|
|
|
|
selector: '[expr12]',
|
|
|
|
|
redundantAttribute: 'expr15',
|
|
|
|
|
selector: '[expr15]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2660,8 +2719,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
redundantAttribute: 'expr13',
|
|
|
|
|
selector: '[expr13]',
|
|
|
|
|
redundantAttribute: 'expr16',
|
|
|
|
|
selector: '[expr16]',
|
|
|
|
|
|
|
|
|
|
expressions: [
|
|
|
|
|
{
|
|
|
|
@ -2674,8 +2733,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
]
|
|
|
|
|
),
|
|
|
|
|
|
|
|
|
|
redundantAttribute: 'expr4',
|
|
|
|
|
selector: '[expr4]',
|
|
|
|
|
redundantAttribute: 'expr7',
|
|
|
|
|
selector: '[expr7]',
|
|
|
|
|
itemName: 'task',
|
|
|
|
|
indexName: null,
|
|
|
|
|
evaluate: _scope => _scope.state.tasks
|
|
|
|
@ -2683,8 +2742,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
{
|
|
|
|
|
type: bindingTypes.IF,
|
|
|
|
|
evaluate: _scope => _scope.state.tasks.length === 0,
|
|
|
|
|
redundantAttribute: 'expr14',
|
|
|
|
|
selector: '[expr14]',
|
|
|
|
|
redundantAttribute: 'expr17',
|
|
|
|
|
selector: '[expr17]',
|
|
|
|
|
|
|
|
|
|
template: template(
|
|
|
|
|
'<td class="table__td center" colspan="6">\n Nothing found\n </td>',
|
|
|
|
@ -2707,36 +2766,59 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
|
|
|
|
|
"use strict";
|
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony import */ var riot__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js");
|
|
|
|
|
/* harmony import */ var _components_sidebar_riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./components/sidebar.riot */ "./js/components/sidebar.riot");
|
|
|
|
|
/* harmony import */ var _components_tasks_riot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/tasks.riot */ "./js/components/tasks.riot");
|
|
|
|
|
/* harmony import */ var _components_task_new_riot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./components/task-new.riot */ "./js/components/task-new.riot");
|
|
|
|
|
/* harmony import */ var _components_task_form_riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/task-form.riot */ "./js/components/task-form.riot");
|
|
|
|
|
__webpack_require__(/*! ./bootstrap.js */ "./js/bootstrap.js");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// register components
|
|
|
|
|
|
|
|
|
|
riot.register('app-sidebar', _components_sidebar_riot__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
|
|
|
|
riot.register('app-tasks', _components_tasks_riot__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
|
|
|
riot.register('app-task-new', _components_task_new_riot__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
|
|
|
|
riot.register('app-task-form', _components_task_form_riot__WEBPACK_IMPORTED_MODULE_3__["default"]); // mount components
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.register('app-sidebar', _components_sidebar_riot__WEBPACK_IMPORTED_MODULE_0__["default"]);
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.register('app-tasks', _components_tasks_riot__WEBPACK_IMPORTED_MODULE_1__["default"]);
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.register('app-task-button', _components_task_new_riot__WEBPACK_IMPORTED_MODULE_2__["default"]);
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.register('app-task-form', _components_task_form_riot__WEBPACK_IMPORTED_MODULE_3__["default"]); // mount components
|
|
|
|
|
|
|
|
|
|
riot.mount('app-sidebar');
|
|
|
|
|
riot.mount('app-tasks');
|
|
|
|
|
riot.mount('app-task-new');
|
|
|
|
|
riot.mount('app-task-form');
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.mount('app-sidebar');
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.mount('app-tasks');
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.mount('app-task-button');
|
|
|
|
|
riot__WEBPACK_IMPORTED_MODULE_4__.mount('app-task-form');
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
|
/***/ "./js/bootstrap.js":
|
|
|
|
|
/*!*************************!*\
|
|
|
|
|
!*** ./js/bootstrap.js ***!
|
|
|
|
|
\*************************/
|
|
|
|
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
|
/***/ "./js/mixins/sidebar.js":
|
|
|
|
|
/*!******************************!*\
|
|
|
|
|
!*** ./js/mixins/sidebar.js ***!
|
|
|
|
|
\******************************/
|
|
|
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
|
|
|
|
|
|
window.riot = __webpack_require__(/*! riot */ "./node_modules/riot/riot.esm.js");
|
|
|
|
|
"use strict";
|
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
|
|
|
/* harmony export */ });
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
|
|
|
state: {
|
|
|
|
|
isOpen: false
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
handleClose: function handleClose() {
|
|
|
|
|
this.state.isOpen = false;
|
|
|
|
|
this.update();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
|
|
|
|
|
@ -2768,17 +2850,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
|
|
* @param {object} data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
toggle: function toggle(data) {
|
|
|
|
|
this.trigger('toggle-form');
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
*
|
|
|
|
|
* @param {object} data
|
|
|
|
|
*
|
|
|
|
|
*/
|
|
|
|
|
edit: function edit(data) {
|
|
|
|
|
this.trigger('edit-form', data);
|
|
|
|
|
open: function open(data) {
|
|
|
|
|
this.trigger('open', data);
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|