|
|
@ -53,38 +53,38 @@ store.subscribe(s => { |
|
|
components = s.components; |
|
|
components = s.components; |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
// const save = () => { |
|
|
const save = () => { |
|
|
|
|
|
|
|
|
// ignoreStore = true; |
|
|
ignoreStore = true; |
|
|
// if(!validate()) { |
|
|
if(!validate()) { |
|
|
// ignoreStore = false; |
|
|
ignoreStore = false; |
|
|
// return; |
|
|
return; |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// component.name = originalName || name; |
|
|
component.name = originalName || name; |
|
|
// component.description = description; |
|
|
component.description = description; |
|
|
// component.tags = pipe(tagsString, [ |
|
|
component.tags = pipe(tagsString, [ |
|
|
// split(","), |
|
|
split(","), |
|
|
// map(s => s.trim()) |
|
|
map(s => s.trim()) |
|
|
// ]); |
|
|
]); |
|
|
|
|
|
|
|
|
// store.saveScreen(component); |
|
|
store.saveScreen(component); |
|
|
|
|
|
|
|
|
// ignoreStore = false; |
|
|
ignoreStore = false; |
|
|
// // now do the rename |
|
|
// now do the rename |
|
|
// if(name !== originalName) { |
|
|
if(name !== originalName) { |
|
|
// store.renameScreen(originalName, name); |
|
|
store.renameScreen(originalName, name); |
|
|
// } |
|
|
} |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// const deleteComponent = () => { |
|
|
const deleteComponent = () => { |
|
|
// showDialog(); |
|
|
showDialog(); |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
// const confirmDeleteComponent = () => { |
|
|
const confirmDeleteComponent = () => { |
|
|
// store.deleteScreen(component.name); |
|
|
store.deleteScreen(component.name); |
|
|
// hideDialog(); |
|
|
hideDialog(); |
|
|
// } |
|
|
} |
|
|
|
|
|
|
|
|
const onPropsValidate = result => { |
|
|
const onPropsValidate = result => { |
|
|
propsValidationErrors = result; |
|
|
propsValidationErrors = result; |
|
|
@ -100,6 +100,7 @@ const updateComponent = doChange => { |
|
|
const onPropsChanged = newProps => { |
|
|
const onPropsChanged = newProps => { |
|
|
updateComponent(newComponent => |
|
|
updateComponent(newComponent => |
|
|
assign(newComponent.props, newProps)); |
|
|
assign(newComponent.props, newProps)); |
|
|
|
|
|
save(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|