@cocreate/elements 1.26.4 → 1.27.0

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,15 @@
1
+ # [1.27.0](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.26.4...v1.27.0) (2023-11-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * use action.form ([e1dbf09](https://github.com/CoCreate-app/CoCreate-elements/commit/e1dbf0972d52733225ba9caccd2a72f045e25dec))
7
+
8
+
9
+ ### Features
10
+
11
+ * update dependecies for th latest features and bug fixes ([69f772b](https://github.com/CoCreate-app/CoCreate-elements/commit/69f772bec35ea1a2803e98eb983cb5261eff8673))
12
+
1
13
  ## [1.26.4](https://github.com/CoCreate-app/CoCreate-elements/compare/v1.26.3...v1.26.4) (2023-11-18)
2
14
 
3
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/elements",
3
- "version": "1.26.4",
3
+ "version": "1.27.0",
4
4
  "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
5
  "keywords": [
6
6
  "elements",
@@ -58,12 +58,12 @@
58
58
  "webpack-log": "^3.0.1"
59
59
  },
60
60
  "dependencies": {
61
- "@cocreate/actions": "^1.12.3",
62
- "@cocreate/crud-client": "^1.28.14",
63
- "@cocreate/element-prototype": "^1.13.0",
64
- "@cocreate/filter": "^1.23.8",
65
- "@cocreate/observer": "^1.11.9",
66
- "@cocreate/render": "^1.30.1",
67
- "@cocreate/utils": "^1.27.1"
61
+ "@cocreate/actions": "^1.12.4",
62
+ "@cocreate/crud-client": "^1.29.0",
63
+ "@cocreate/element-prototype": "^1.13.2",
64
+ "@cocreate/filter": "^1.25.0",
65
+ "@cocreate/observer": "^1.12.0",
66
+ "@cocreate/render": "^1.32.0",
67
+ "@cocreate/utils": "^1.27.4"
68
68
  }
69
69
  }
package/src/form.js CHANGED
@@ -81,8 +81,7 @@ function disableAutoFill(element) {
81
81
  /**
82
82
  * @param btn
83
83
  */
84
- function reset(btn) {
85
- const form = btn.closest("form");
84
+ function reset(form) {
86
85
  let formElements = new Map();
87
86
  for (let element of form) {
88
87
  formElements.set(element, '')
@@ -132,7 +131,8 @@ Action.init({
132
131
  name: "reset",
133
132
  endEvent: "reset",
134
133
  callback: (action) => {
135
- reset(action.element);
134
+ if (action.form)
135
+ send(action.form);
136
136
  }
137
137
  });
138
138
 
package/src/index.js CHANGED
@@ -1096,8 +1096,8 @@ Actions.init([
1096
1096
  name: "save",
1097
1097
  endEvent: "saved",
1098
1098
  callback: (action) => {
1099
- const form = action.element.closest("form");
1100
- save(form);
1099
+ if (action.form)
1100
+ save(action.form);
1101
1101
  }
1102
1102
  },
1103
1103
  {