@cocreate/local-storage 1.6.5 → 1.6.6

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,14 @@
1
+ ## [1.6.6](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.6.5...v1.6.6) (2023-04-30)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added sessionId rendering ([cedcf58](https://github.com/CoCreate-app/CoCreate-local-storage/commit/cedcf588e2b21f450e2445b15b60676d350e5786))
7
+ * fullscreen target updated to fullscreen fullscreen-target ([51d5524](https://github.com/CoCreate-app/CoCreate-local-storage/commit/51d55240188af7cd5b1614d0fe0f7b3fead999c1))
8
+ * package-lock.json and pnpm-lock.yaml added to .gitignore ([7c0d2dd](https://github.com/CoCreate-app/CoCreate-local-storage/commit/7c0d2dd5cebf1059cabfc692c20bc78afb6ddb2c))
9
+ * removed toogle fullscreen icons. now using css content ([4571be4](https://github.com/CoCreate-app/CoCreate-local-storage/commit/4571be48e6d7034ddaad6101f681dfa4e7df28c1))
10
+ * typo this.get ([72676a7](https://github.com/CoCreate-app/CoCreate-local-storage/commit/72676a73389e20f1e563657a1083431ae01da570))
11
+
1
12
  ## [1.6.5](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.6.4...v1.6.5) (2023-04-24)
2
13
 
3
14
 
package/docs/index.html CHANGED
@@ -115,7 +115,7 @@
115
115
  <a class="margin-right:10px" hidden id="eye-slash" show="#eye, #demo-preview" hide="#eye-slash" toggle="code-height" toggle-target="#demo-code"><i class="fas fa-eye-slash"></i></a>
116
116
  <a class="margin-right:10px" id="code" show="#code-slash" hide="#code, #demo-code"><i class="fa fa-code"></i></a>
117
117
  <a class="margin-right:10px" hidden id="code-slash" show="#code, #demo-code" hide="#code-slash"><i class="fas fa-code"></i></a>
118
- <a class="margin-right:5px" fullscreen target="#playground"><i class="fas fa-expand"></i></a>
118
+ <a class="margin-right:5px" fullscreen fullscreen-target="#playground"></a>
119
119
  </div>
120
120
 
121
121
  </div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/local-storage",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "A Simple component similar to CoCreate-input & CoCreate-fetch which Save and fetch data for inputs, textarea, selects from localstorage. Easily configured using HTML5 attributes and/or JavaScript API",
5
5
  "keywords": [
6
6
  "local-storage",
@@ -60,6 +60,7 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@cocreate/actions": "^1.8.2",
63
- "@cocreate/docs": "^1.7.1"
63
+ "@cocreate/docs": "^1.7.1",
64
+ "@cocreate/observer": "^1.7.1"
64
65
  }
65
66
  }
package/src/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ import observer from '@cocreate/observer';
1
2
  import action from '@cocreate/actions'
2
3
 
3
4
  const CoCreateLocalStorage = {
@@ -24,7 +25,7 @@ const CoCreateLocalStorage = {
24
25
  },
25
26
 
26
27
  initElement: function(element) {
27
- this.get(element)
28
+ this.getItem(element)
28
29
  element.addEventListener('input', (e) => {
29
30
  let isRealtime = element.getAttribute('realtime')
30
31
  if (isRealtime == "false") return;
@@ -113,11 +114,23 @@ const CoCreateLocalStorage = {
113
114
  this.support = false;
114
115
  } catch(e) {
115
116
  this.support = false;
117
+ } finally {
118
+ if (this.support)
119
+ this.init()
116
120
  }
117
121
  }
118
122
  }
119
123
  }
120
124
 
125
+ // observer.init({
126
+ // name: 'CoCreateLocalstorage',
127
+ // observe: ['addedNodes'],
128
+ // target: '[localstorage-key]',
129
+ // callback: function(mutation) {
130
+ // CoCreateLocalStorage._initSessionIds(mutation.target);
131
+ // }
132
+ // });
133
+
121
134
  action.init({
122
135
  name: "localStorage",
123
136
  endEvent: "localStorage",