@cocreate/elements
Advanced tools
Comparing version 1.24.1 to 1.24.2
{ | ||
"name": "@cocreate/elements", | ||
"version": "1.24.1", | ||
"version": "1.24.2", | ||
"description": "Fetch content into any html element by using html5 attributes to query data stored in CoCreate headless CMS. If data is changed it will instantly reflect in html tags as changes are broadcasted in realtime", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -20,4 +20,2 @@ import Observer from '@cocreate/observer'; | ||
disableAutoFill(element); | ||
// element.setData = () => { } | ||
// element.getData = () => getFormData(element) | ||
} | ||
@@ -24,0 +22,0 @@ } |
@@ -31,3 +31,3 @@ /******************************************************************************** | ||
import filter from '@cocreate/filter'; | ||
import render from '@cocreate/render'; | ||
import { render, renderedNodes } from '@cocreate/render'; | ||
import '@cocreate/element-prototype'; | ||
@@ -558,4 +558,7 @@ import './fetchSrc'; | ||
Data[Data.type] = { ...Data[Data.type], ...value } | ||
else | ||
else { | ||
Data[Data.type][Data.key] = value | ||
if (!Data[Data.type]._id) | ||
Data.method = 'create.' + Data.type | ||
} | ||
} else { | ||
@@ -669,3 +672,3 @@ Data[Data.type] = { [Data[Data.type]]: value } | ||
let Data = [] | ||
for (let i = 0; i < data.length; i++) { | ||
@@ -711,4 +714,7 @@ if (data[i].type === 'object' && !data[i].method) { | ||
data[i] = await CRUD.send(data[i]); | ||
Data.push(data[i]) | ||
if (data[i] && (data[i].method.startsWith('create') || data[i].type !== 'object' && data[i].method.startsWith('update'))) { | ||
@@ -723,2 +729,3 @@ setTypeValue(element, data[i]) | ||
return Data | ||
} | ||
@@ -879,3 +886,3 @@ | ||
let renderedNode = render.renderedNodes.get(mutation.target) | ||
let renderedNode = renderedNodes.get(mutation.target) | ||
if (!renderedNode) return | ||
@@ -985,6 +992,5 @@ | ||
let keyPath, clonesMap, clones, index | ||
let renderedNode = CoCreate.render.renderedNodes.get(element) | ||
let renderedNode = renderedNodes.get(element) | ||
if (renderedNode) { | ||
@@ -991,0 +997,0 @@ keyPath = renderedNode.keyPath |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193148
1247