Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const options = JSON.parse(el.getAttribute('data-options'));
const data = JSON.parse(el.getAttribute('data'));
const choices = JSON.parse(el.getAttribute('data-choices'));
el.removeAttribute('data-apos-area-newly-editable');
const component = window.apos.areas.components.editor;
const docId = data._docId;
const dotPath = data._dotPath;
const parts = dotPath.split('.');
const areaName = parts[parts.length - 1];
const parentId = data._parentId;
extantDocIds[docId] = true;
return new Vue({
el: el,
data: {
options: options,
items: data.items,
choices: choices,
docId: docId,
parentId: parentId,
areaName: areaName
},
mounted() {
updateParentIdMap(this, data.items, options);
},
methods: {
changed(items) {
updateParentIdMap(this, items);
save();