@cocreate/events 1.13.5 → 1.13.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [1.13.7](https://github.com/CoCreate-app/CoCreate-events/compare/v1.13.6...v1.13.7) (2023-10-17)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * await getValue() ([2d6cefa](https://github.com/CoCreate-app/CoCreate-events/commit/2d6cefaa39dbc655030938ed01fab04f6af0125f))
7
+
8
+ ## [1.13.6](https://github.com/CoCreate-app/CoCreate-events/compare/v1.13.5...v1.13.6) (2023-10-14)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * bump dependencies ([fceb02f](https://github.com/CoCreate-app/CoCreate-events/commit/fceb02fb6e9a484192814cdd7f721ba4473c41c1))
14
+
1
15
  ## [1.13.5](https://github.com/CoCreate-app/CoCreate-events/compare/v1.13.4...v1.13.5) (2023-10-09)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/events",
3
- "version": "1.13.5",
3
+ "version": "1.13.7",
4
4
  "description": "A simple events component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "events",
@@ -58,9 +58,9 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/actions": "^1.11.5",
62
- "@cocreate/element-prototype": "^1.11.4",
63
- "@cocreate/observer": "^1.11.4",
64
- "@cocreate/utils": "^1.25.2"
61
+ "@cocreate/actions": "^1.11.6",
62
+ "@cocreate/element-prototype": "^1.11.5",
63
+ "@cocreate/observer": "^1.11.5",
64
+ "@cocreate/utils": "^1.25.3"
65
65
  }
66
66
  }
package/src/index.js CHANGED
@@ -213,7 +213,7 @@ const CoCreateEvents = {
213
213
  }
214
214
  },
215
215
 
216
- __updateElements: function (element, prefix, target) {
216
+ __updateElements: async function (element, prefix, target) {
217
217
  const self = this;
218
218
  // TODO: support empty value when prefix-attribute defined, add and remove the attribute
219
219
 
@@ -229,7 +229,7 @@ const CoCreateEvents = {
229
229
  if (values)
230
230
  values = values.split(',');
231
231
  else {
232
- values = element.getValue()
232
+ values = await element.getValue()
233
233
  if (!Array.isArray(values))
234
234
  values = [values]
235
235
  }
@@ -279,7 +279,7 @@ const CoCreateEvents = {
279
279
 
280
280
  },
281
281
 
282
- setValue: function (prefix, element, attrName, values, key, deactivate) {
282
+ setValue: async function (prefix, element, attrName, values, key, deactivate) {
283
283
  let attrValues, oldValue;
284
284
  if (key) {
285
285
  key = `{{${key}}}`;
@@ -310,7 +310,7 @@ const CoCreateEvents = {
310
310
  }
311
311
  } else {
312
312
  if (attrName === 'value') {
313
- oldValue = element.getValue()
313
+ oldValue = await element.getValue()
314
314
  } else if (attrName === 'text') {
315
315
  attrValues = element.getAttribute(attrName).split(' ').map(x => x.trim());
316
316
  oldValue = values.filter(x => attrValues.includes(x))[0] || '';