@cocreate/state 1.26.2 → 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.
Files changed (2) hide show
  1. package/package.json +8 -10
  2. package/src/index.js +3 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/state",
3
- "version": "1.26.2",
3
+ "version": "1.27.0",
4
4
  "description": "Data attributes which can be used for components in CoCreate framework combined as a group of attributes that dynamically change attributes & fetch custom data.",
5
5
  "keywords": [
6
6
  "state",
@@ -36,15 +36,14 @@
36
36
  },
37
37
  "main": "./src/index.js",
38
38
  "dependencies": {
39
- "@cocreate/actions": "^1.22.1",
40
- "@cocreate/crud-client": "^1.35.0",
41
- "@cocreate/element-prototype": "^1.33.0",
42
- "@cocreate/local-storage": "^1.17.0",
43
- "@cocreate/observer": "^1.20.0",
44
- "@cocreate/uuid": "^1.12.4"
39
+ "@cocreate/actions": "^1.22.3",
40
+ "@cocreate/crud-client": "^1.35.2",
41
+ "@cocreate/element-prototype": "^1.33.2",
42
+ "@cocreate/local-storage": "^1.17.2",
43
+ "@cocreate/observer": "^1.20.2"
45
44
  },
46
45
  "devDependencies": {
47
- "@cocreate/webpack": "^1.6.0"
46
+ "@cocreate/webpack": "^1.6.2"
48
47
  },
49
48
  "allowScripts": {
50
49
  "@cocreate/actions@1.21.4": true,
@@ -61,7 +60,6 @@
61
60
  "@cocreate/render@1.46.1": true,
62
61
  "@cocreate/socket-client@1.40.5": true,
63
62
  "@cocreate/utils@1.42.2": true,
64
- "@cocreate/uuid@1.12.4": true,
65
63
  "@cocreate/webpack@1.4.3": true
66
64
  }
67
- }
65
+ }
package/src/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import "@cocreate/element-prototype";
2
2
  import Observer from "@cocreate/observer";
3
3
  import Action from "@cocreate/actions";
4
- import uid from "@cocreate/uuid";
4
+ import { uuid } from "@cocreate/utils";
5
5
  import storage from "@cocreate/local-storage";
6
6
 
7
7
  const { localStorage, sessionStorage } = storage;
@@ -203,8 +203,8 @@ async function _getAttributeValues(element) {
203
203
  for (let attribute of attributes) {
204
204
  if (attribute.name.startsWith("state.")) {
205
205
  const key = attribute.name.slice(6);
206
- if (attribute.value == "$uid") {
207
- Object.assign(attributeValues, { [key]: uid.generate(6) });
206
+ if (attribute.value == "$uuid") {
207
+ Object.assign(attributeValues, { [key]: uuid(6) });
208
208
  } else if (key === "value" && !attribute.value) {
209
209
  Object.assign(attributeValues, { value: await element.getValue() });
210
210
  } else {