@cocreate/api
Advanced tools
Comparing version 1.21.3 to 1.22.0
{ | ||
"name": "@cocreate/api", | ||
"version": "1.21.3", | ||
"version": "1.22.0", | ||
"description": "A simple api helper component in vanilla javascript used by JavaScript developers to create thirdparty api intergrations. CoCreate-api includes the client component and server side for api processing. Thirdparty apis can be accessible using HTML5 attributes and/or JavaScript API. ", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -57,3 +57,3 @@ /*globals CustomEvent, config*/ | ||
observe: ['addedNodes'], | ||
target: `[${name}]`, | ||
selector: `[${name}]`, | ||
callback: function (mutation) { | ||
@@ -143,3 +143,14 @@ inputEvent(mutation.target) | ||
if (key) { | ||
data[key] = await elements[i].getValue() | ||
let value = await elements[i].getValue() | ||
if (key.endsWith('[]')) { | ||
if (!data[key]) | ||
data[key] = []; | ||
if (Array.isArray(value)) | ||
data[key].push(...value); | ||
else | ||
data[key].push(value); | ||
} else | ||
data[key] = await elements[i].getValue() | ||
} | ||
@@ -216,3 +227,3 @@ | ||
observe: ['addedNodes'], | ||
target: '[module], [api]', | ||
selector: '[module], [api]', | ||
callback: function (mutation) { | ||
@@ -219,0 +230,0 @@ let name = mutation.target.getAttribute('api') || mutation.target.getAttribute('module') |
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
191260
19
370