Skip to content

Commit

Permalink
feat: Update package.json and replace "@cocreate/form" with "@cocreat…
Browse files Browse the repository at this point in the history
…e/elements".

Replace the import of "Form" with "Elements". Also update the function call from Form.getData() to Elements.getFormData(). Lastly, change the function calls from Form.setObjectId() to Elements.setTypeValue().
  • Loading branch information
frankpagan committed Aug 8, 2023
1 parent 912011b commit ec00092
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@cocreate/actions": "^1.8.32",
"@cocreate/crud-client": "^1.21.24",
"@cocreate/element-prototype": "^1.8.30",
"@cocreate/form": "^1.14.30",
"@cocreate/elements": "^1.17.33",
"@cocreate/local-storage": "^1.7.21",
"@cocreate/render": "^1.24.32"
}
Expand Down
6 changes: 3 additions & 3 deletions src/client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*globals CustomEvent, btoa*/
import Crud from '@cocreate/crud-client';
import Action from '@cocreate/actions';
import Form from '@cocreate/form';
import Elements from '@cocreate/elements';
import Render from '@cocreate/render';
import '@cocreate/element-prototype';
import './index.css';
Expand Down Expand Up @@ -32,7 +32,7 @@ const CoCreateUser = {
}
}

let data = Form.getData(formEl, array)
let data = Elements.getFormData(formEl, array)
data.method = 'create.object'
data['array'] = array
data.organization_id = organization_id;
Expand All @@ -41,7 +41,7 @@ const CoCreateUser = {
data.object[0]._id = Crud.ObjectId();

let user = await Crud.send(data)
Form.setObjectId(formEl, user)
Elements.setTypeValue(formEl, user)

// const socket = Crud.socket.getSockets()
// if (!socket[0] || !socket[0].connected || window && !window.navigator.onLine) {
Expand Down

0 comments on commit ec00092

Please sign in to comment.