@cocreate/local-storage 1.16.1 → 1.16.2
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 +10 -0
- package/docs/index.html +329 -337
- package/package.json +6 -10
- package/src/index.js +1 -1
- package/webpack.config.js +65 -90
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## [1.16.2](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.16.1...v1.16.2) (2025-04-30)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* added css-loader ([0fb8f99](https://github.com/CoCreate-app/CoCreate-local-storage/commit/0fb8f99e6b4c21e28ddf0ff2e266c4577c009978))
|
|
7
|
+
* update query attributes ([b732761](https://github.com/CoCreate-app/CoCreate-local-storage/commit/b732761ebec15371981907278c9eb90eb08cb92e))
|
|
8
|
+
* updated cocreate modules versions ([2e25029](https://github.com/CoCreate-app/CoCreate-local-storage/commit/2e2502903ccbf7efc816d3387a453829a133e96e))
|
|
9
|
+
* webpack.config and devdependencies ([3297510](https://github.com/CoCreate-app/CoCreate-local-storage/commit/3297510fe52eccb7850c7a94f7c4428315d62eb1))
|
|
10
|
+
|
|
1
11
|
## [1.16.1](https://github.com/CoCreate-app/CoCreate-local-storage/compare/v1.16.0...v1.16.1) (2025-04-11)
|
|
2
12
|
|
|
3
13
|
|
package/docs/index.html
CHANGED
|
@@ -1,349 +1,341 @@
|
|
|
1
1
|
<!DOCTYPE html>
|
|
2
2
|
<html lang="en">
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<meta
|
|
24
|
-
property="og:image"
|
|
25
|
-
content="https://cdn.cocreate.app/docs/local-storage.png"
|
|
26
|
-
/>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
+
<title>CoCreate-local-storage Documentation | CoCreateJS</title>
|
|
8
|
+
<link
|
|
9
|
+
rel="icon"
|
|
10
|
+
type="image/png"
|
|
11
|
+
sizes="32x32"
|
|
12
|
+
href="https://cocreate.app/images/favicon.ico" />
|
|
13
|
+
<meta
|
|
14
|
+
name="description"
|
|
15
|
+
content="Simple component to save and fetch data for inputs, textarea, selects from localstorage. easilly configuable with attributes and/or JavaScript API." />
|
|
16
|
+
<meta
|
|
17
|
+
name="keywords"
|
|
18
|
+
content="helper classes, utility classes, css framework, css library, inline style classes" />
|
|
19
|
+
<meta name="robots" content="index,follow" />
|
|
20
|
+
<meta
|
|
21
|
+
property="og:image"
|
|
22
|
+
content="https://cdn.cocreate.app/docs/local-storage.png" />
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
<!-- CoCreate CSS CDN-->
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</head>
|
|
26
|
+
<link
|
|
27
|
+
rel="stylesheet"
|
|
28
|
+
href="https://ws.cocreate.app/docs.css"
|
|
29
|
+
array="apples"
|
|
30
|
+
object="6069ff5042ef8ff5175a5c8d"
|
|
31
|
+
key="css"
|
|
32
|
+
type="text/css" />
|
|
33
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
|
34
|
+
</head>
|
|
40
35
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
</div>
|
|
154
|
-
<pre><code class="language-bash">npm i @cocreate/local-storage</code></pre>
|
|
155
|
-
<p class="padding:10px_0px line-height:1.5">
|
|
156
|
-
Or you can use cdn link:
|
|
157
|
-
</p>
|
|
158
|
-
<pre><code class="language-html"><script>https://cdn.cocreate.app/local-storage/latest/CoCreate-local-storage.min.js</script></code></pre>
|
|
36
|
+
<body>
|
|
37
|
+
<!-- Navbar -->
|
|
38
|
+
<nav
|
|
39
|
+
class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
|
|
40
|
+
content_id="content"
|
|
41
|
+
scroll="sticky-nav,"
|
|
42
|
+
scroll-up="5"
|
|
43
|
+
scroll-down="5"
|
|
44
|
+
path="../"
|
|
45
|
+
src="../components/navbar.html"></nav>
|
|
46
|
+
<sidenav
|
|
47
|
+
id="menuL"
|
|
48
|
+
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
|
49
|
+
resizable
|
|
50
|
+
resize-query="[content_id='content']"
|
|
51
|
+
resize-property="margin-left"
|
|
52
|
+
resize-value="width">
|
|
53
|
+
<menu
|
|
54
|
+
array="files"
|
|
55
|
+
object="603717b07de7fb350ae9fec8"
|
|
56
|
+
key="src"></menu>
|
|
57
|
+
<div resize="right"></div>
|
|
58
|
+
</sidenav>
|
|
59
|
+
<main
|
|
60
|
+
class="padding-top:15px padding:15px@lg@xl"
|
|
61
|
+
content_id="content"
|
|
62
|
+
id="cocreate-local-storage">
|
|
63
|
+
<div
|
|
64
|
+
class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
|
|
65
|
+
<div class="display:flex align-items:center">
|
|
66
|
+
<h2>CoCreate-local-storage</h2>
|
|
67
|
+
</div>
|
|
68
|
+
<div
|
|
69
|
+
class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
|
|
70
|
+
<div
|
|
71
|
+
class="display:flex align-items:center transition:0.3s padding-left:10px"
|
|
72
|
+
share-network="true"
|
|
73
|
+
share-text="Simple component to save and fetch data for inputs, textarea, selects from localstorage. easilly configuable with attributes and/or JavaScript API."
|
|
74
|
+
share-title="CoCreate-local-storage"
|
|
75
|
+
share-height="600"
|
|
76
|
+
share-width="700"
|
|
77
|
+
share-media="https://cdn.cocreate.app/docs/local-storage.png"
|
|
78
|
+
hover="display:block!important"
|
|
79
|
+
hover-query=".social-networks">
|
|
80
|
+
<div class="display:none social-networks">
|
|
81
|
+
<a
|
|
82
|
+
class="margin-right:15px"
|
|
83
|
+
share-network="twitter"
|
|
84
|
+
title="Share on twitter"
|
|
85
|
+
><i src="/assets/svg/twitter.svg"></i
|
|
86
|
+
></a>
|
|
87
|
+
<a
|
|
88
|
+
class="margin-right:15px"
|
|
89
|
+
share-network="facebook"
|
|
90
|
+
title="Share on Facebook"
|
|
91
|
+
><i src="/assets/svg/facebook.svg"></i
|
|
92
|
+
></a>
|
|
93
|
+
<a
|
|
94
|
+
class="margin-right:15px"
|
|
95
|
+
share-network="instagram"
|
|
96
|
+
title="Share on instagram"
|
|
97
|
+
><i src="/assets/svg/instagram.svg"></i
|
|
98
|
+
></a>
|
|
99
|
+
</div>
|
|
100
|
+
<a
|
|
101
|
+
class="margin-right:15px"
|
|
102
|
+
share-network="share"
|
|
103
|
+
title="Share on share"
|
|
104
|
+
><i src="/assets/svg/share-alt.svg"></i
|
|
105
|
+
></a>
|
|
106
|
+
</div>
|
|
107
|
+
<a
|
|
108
|
+
href="https://github.com/CoCreate-app/CoCreate-local-storage"
|
|
109
|
+
target="_blank"
|
|
110
|
+
class="margin-right:15px"
|
|
111
|
+
><i src="/assets/svg/github.svg"></i
|
|
112
|
+
></a>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
<h1
|
|
116
|
+
class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
|
|
117
|
+
A Simple component similar to CoCreate-input &
|
|
118
|
+
CoCreate-fetch which Save and fetch data for inputs, textarea,
|
|
119
|
+
selects from localstorage. Easily configured using HTML5
|
|
120
|
+
attributes and/or JavaScript API
|
|
121
|
+
</h1>
|
|
122
|
+
<div id="local-storage-section" class="display:flex flex-wrap:wrap">
|
|
123
|
+
<div
|
|
124
|
+
class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
|
|
125
|
+
<div
|
|
126
|
+
id="local-storage-install"
|
|
127
|
+
class="border-bottom:1px_solid_lightgrey"
|
|
128
|
+
scroll
|
|
129
|
+
scroll-intersect="color:dodgerblue"
|
|
130
|
+
scroll-query="#local-storage-install-section">
|
|
131
|
+
<span
|
|
132
|
+
class="display:flex align-items:center width:fit-content"
|
|
133
|
+
hover="display:block!important"
|
|
134
|
+
hover-query="[href='#local-storage-install']">
|
|
135
|
+
<h2 class="padding:5px_0px">Install</h2>
|
|
136
|
+
<a
|
|
137
|
+
class="margin-left:10px display:none"
|
|
138
|
+
href="#local-storage-install"
|
|
139
|
+
><i src="/assets/svg/link.svg"></i
|
|
140
|
+
></a>
|
|
141
|
+
</span>
|
|
142
|
+
</div>
|
|
143
|
+
<pre><code class="language-bash">npm i @cocreate/local-storage</code></pre>
|
|
144
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
145
|
+
Or you can use cdn link:
|
|
146
|
+
</p>
|
|
147
|
+
<pre><code class="language-html"><script>https://cdn.cocreate.app/local-storage/latest/CoCreate-local-storage.min.js</script></code></pre>
|
|
159
148
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
This is local-storage usage
|
|
183
|
-
</p>
|
|
149
|
+
<div
|
|
150
|
+
id="local-storage-usage"
|
|
151
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
152
|
+
scroll
|
|
153
|
+
scroll-intersect="color:dodgerblue"
|
|
154
|
+
scroll-query="#local-storage-usage-section">
|
|
155
|
+
<span
|
|
156
|
+
class="display:flex align-items:center width:fit-content"
|
|
157
|
+
hover="display:block!important"
|
|
158
|
+
hover-query="[href='#local-storage-usage']">
|
|
159
|
+
<h2 class="padding:5px_0px">Usage</h2>
|
|
160
|
+
<a
|
|
161
|
+
class="margin-left:10px display:none"
|
|
162
|
+
href="#local-storage-usage"
|
|
163
|
+
><i src="/assets/svg/link.svg"></i
|
|
164
|
+
></a>
|
|
165
|
+
</span>
|
|
166
|
+
</div>
|
|
167
|
+
<div class="">
|
|
168
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
169
|
+
This is local-storage usage
|
|
170
|
+
</p>
|
|
184
171
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
172
|
+
<div class="flex-grow:1 min-width:300px width:100%">
|
|
173
|
+
<pre><code class="language-html"><div></div></code></pre>
|
|
174
|
+
</div>
|
|
175
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
176
|
+
This is local-storage usage
|
|
177
|
+
</p>
|
|
178
|
+
<p class="padding:10px_0px line-height:1.5">
|
|
179
|
+
This is local-storage usage
|
|
180
|
+
</p>
|
|
181
|
+
</div>
|
|
182
|
+
<div
|
|
183
|
+
id="local-storage-attributes"
|
|
184
|
+
class="margin-top:80px border-bottom:1px_solid_lightgrey"
|
|
185
|
+
scroll
|
|
186
|
+
scroll-intersect="color:dodgerblue"
|
|
187
|
+
scroll-query="#local-storage-attributes-section">
|
|
188
|
+
<span
|
|
189
|
+
class="display:flex align-items:center width:fit-content"
|
|
190
|
+
hover="display:block!important"
|
|
191
|
+
hover-query="[href='#local-storage-attributes']">
|
|
192
|
+
<h2 class="padding:5px_0px">Attributes</h2>
|
|
193
|
+
<a
|
|
194
|
+
class="margin-left:10px display:none"
|
|
195
|
+
href="#local-storage-attributes"
|
|
196
|
+
><i src="/assets/svg/link.svg"></i
|
|
197
|
+
></a>
|
|
198
|
+
</span>
|
|
199
|
+
</div>
|
|
200
|
+
<ul class="list-style-type:none">
|
|
201
|
+
<li
|
|
202
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
203
|
+
<h4>
|
|
204
|
+
<span>local-storage</span>
|
|
205
|
+
<span class="cocreate-badge success"
|
|
206
|
+
>string</span
|
|
207
|
+
>
|
|
208
|
+
<span class="cocreate-badge warning"
|
|
209
|
+
>optional</span
|
|
210
|
+
>
|
|
211
|
+
</h4>
|
|
212
|
+
<p>local-storage-attribute</p>
|
|
213
|
+
</li>
|
|
214
|
+
<li
|
|
215
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
|
216
|
+
<h4>
|
|
217
|
+
<span>local-storage</span>
|
|
218
|
+
<span class="cocreate-badge success"
|
|
219
|
+
>string</span
|
|
220
|
+
>
|
|
221
|
+
<span class="cocreate-badge warning"
|
|
222
|
+
>optional</span
|
|
223
|
+
>
|
|
224
|
+
</h4>
|
|
225
|
+
<p>local-storage-attribute</p>
|
|
226
|
+
</li>
|
|
227
|
+
</ul>
|
|
228
|
+
</div>
|
|
234
229
|
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
></textarea>
|
|
280
|
-
<div resize="bottom" class="background:lightgrey"></div>
|
|
281
|
-
</div>
|
|
230
|
+
<div
|
|
231
|
+
class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
|
|
232
|
+
<!-- SandBox -->
|
|
233
|
+
<div
|
|
234
|
+
id="local-storage-demo"
|
|
235
|
+
class="border-bottom:1px_solid_lightgrey"
|
|
236
|
+
scroll
|
|
237
|
+
scroll-intersect="color:dodgerblue"
|
|
238
|
+
scroll-query="#local-storage-demo-section">
|
|
239
|
+
<span
|
|
240
|
+
class="display:flex align-items:center width:fit-content"
|
|
241
|
+
hover="display:block!important"
|
|
242
|
+
hover-query="[href='#local-storage-demo']">
|
|
243
|
+
<h2 class="padding:5px_0px">Demo</h2>
|
|
244
|
+
<a
|
|
245
|
+
class="margin-left:10px display:none"
|
|
246
|
+
href="#local-storage-demo"
|
|
247
|
+
><i src="/assets/svg/link.svg"></i
|
|
248
|
+
></a>
|
|
249
|
+
</span>
|
|
250
|
+
</div>
|
|
251
|
+
<div
|
|
252
|
+
class="position:sticky top:0 padding:15px_0px height:100vh">
|
|
253
|
+
<!-- SandBox -->
|
|
254
|
+
<div
|
|
255
|
+
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
|
256
|
+
id="playground">
|
|
257
|
+
<div
|
|
258
|
+
id="demo-code"
|
|
259
|
+
resizable
|
|
260
|
+
class="position:relative height:50%">
|
|
261
|
+
<textarea
|
|
262
|
+
type="code"
|
|
263
|
+
lang="html"
|
|
264
|
+
array="demos"
|
|
265
|
+
object=""
|
|
266
|
+
key="demo"
|
|
267
|
+
save="false"
|
|
268
|
+
id="demo"
|
|
269
|
+
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
|
270
|
+
<div
|
|
271
|
+
resize="bottom"
|
|
272
|
+
class="background:lightgrey"></div>
|
|
273
|
+
</div>
|
|
282
274
|
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
</div>
|
|
275
|
+
<div
|
|
276
|
+
id="demo-preview"
|
|
277
|
+
class="position:relative overflow:auto background-color:white">
|
|
278
|
+
<div class="demopreview padding:20px"></div>
|
|
279
|
+
</div>
|
|
289
280
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
281
|
+
<div
|
|
282
|
+
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
|
283
|
+
<a
|
|
284
|
+
class="margin-right:10px"
|
|
285
|
+
id="eye"
|
|
286
|
+
show="#eye-slash"
|
|
287
|
+
hide="#eye, #demo-preview"
|
|
288
|
+
toggle="code-height"
|
|
289
|
+
toggle-query="#demo-code"
|
|
290
|
+
><i
|
|
291
|
+
class="height:18px"
|
|
292
|
+
src="/assets/svg/eye.svg"></i
|
|
293
|
+
></a>
|
|
294
|
+
<a
|
|
295
|
+
class="margin-right:10px"
|
|
296
|
+
hidden
|
|
297
|
+
id="eye-slash"
|
|
298
|
+
show="#eye, #demo-preview"
|
|
299
|
+
hide="#eye-slash"
|
|
300
|
+
toggle="code-height"
|
|
301
|
+
toggle-query="#demo-code"
|
|
302
|
+
><i src="/assets/svg/eye-slash.svg"></i
|
|
303
|
+
></a>
|
|
304
|
+
<a
|
|
305
|
+
class="margin-right:10px"
|
|
306
|
+
id="code"
|
|
307
|
+
show="#code-slash"
|
|
308
|
+
hide="#code, #demo-code"
|
|
309
|
+
><i src="/assets/svg/code.svg"></i
|
|
310
|
+
></a>
|
|
311
|
+
<a
|
|
312
|
+
class="margin-right:10px"
|
|
313
|
+
hidden
|
|
314
|
+
id="code-slash"
|
|
315
|
+
show="#code, #demo-code"
|
|
316
|
+
hide="#code-slash"
|
|
317
|
+
><i
|
|
318
|
+
class="height:18px"
|
|
319
|
+
src="/assets/svg/code.svg"></i
|
|
320
|
+
></a>
|
|
321
|
+
<a
|
|
322
|
+
class="margin-right:5px"
|
|
323
|
+
fullscreen
|
|
324
|
+
fullscreen-query="#playground"></a>
|
|
325
|
+
</div>
|
|
326
|
+
</div>
|
|
327
|
+
<!-- End SandBox -->
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
</div>
|
|
331
|
+
<button
|
|
332
|
+
href="https://github.com/CoCreate-app/CoCreate-local-storage/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
|
|
333
|
+
target="_blank"
|
|
334
|
+
class="display:flex justify-content:center align-items:center position:fixed bottom:15px right:15px height:50px width:50px border-radius:50% box-shadow:0px_2px_10px_0px_rgba(0,_0,_0,_0.4)">
|
|
335
|
+
<i src="../assets/svg/pencil-alt.svg"></i>
|
|
336
|
+
</button>
|
|
337
|
+
</main>
|
|
346
338
|
|
|
347
|
-
|
|
348
|
-
|
|
339
|
+
<script src="https://CoCreate.app/dist/CoCreate.js"></script>
|
|
340
|
+
</body>
|
|
349
341
|
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cocreate/local-storage",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
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",
|
|
@@ -45,20 +45,16 @@
|
|
|
45
45
|
},
|
|
46
46
|
"main": "./src/index.js",
|
|
47
47
|
"devDependencies": {
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"clean-webpack-plugin": "^3.0.0",
|
|
52
|
-
"file-loader": "^6.2.0",
|
|
48
|
+
"css-loader": "^5.1.3",
|
|
49
|
+
"esbuild": "^0.25.2",
|
|
50
|
+
"esbuild-loader": "^4.3.0",
|
|
53
51
|
"mini-css-extract-plugin": "^1.5.0",
|
|
54
|
-
"style-loader": "^3.3.1",
|
|
55
|
-
"terser-webpack-plugin": "^5.1.1",
|
|
56
52
|
"webpack": "^5.24.4",
|
|
57
53
|
"webpack-cli": "^4.5.0",
|
|
58
54
|
"webpack-log": "^3.0.1"
|
|
59
55
|
},
|
|
60
56
|
"dependencies": {
|
|
61
|
-
"@cocreate/actions": "^1.
|
|
62
|
-
"@cocreate/observer": "^1.
|
|
57
|
+
"@cocreate/actions": "^1.21.0",
|
|
58
|
+
"@cocreate/observer": "^1.18.0"
|
|
63
59
|
}
|
|
64
60
|
}
|
package/src/index.js
CHANGED
|
@@ -17,7 +17,7 @@ const CoCreateLocalStorage = {
|
|
|
17
17
|
`[localstorage-get="${e.key}"]`
|
|
18
18
|
);
|
|
19
19
|
for (let element of elements) {
|
|
20
|
-
// TODO: return if localstorage-
|
|
20
|
+
// TODO: return if localstorage-query, etc...
|
|
21
21
|
// - Decide how best to handle, considering localstorage is also handled by event.
|
|
22
22
|
if (
|
|
23
23
|
element.hasAttribute("localstorage-attribute") ||
|
package/webpack.config.js
CHANGED
|
@@ -1,90 +1,65 @@
|
|
|
1
|
-
const path = require("path")
|
|
2
|
-
const
|
|
3
|
-
const
|
|
4
|
-
const {
|
|
5
|
-
|
|
6
|
-
module.exports = (env, argv) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
parallel: true,
|
|
67
|
-
// sourceMap: true, // Must be set to true if using source-maps in production
|
|
68
|
-
terserOptions: {
|
|
69
|
-
// https://github.com/webpack-contrib/terser-webpack-plugin#terseroptions
|
|
70
|
-
// extractComments: 'all',
|
|
71
|
-
compress: {
|
|
72
|
-
drop_console: true,
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
}),
|
|
76
|
-
],
|
|
77
|
-
splitChunks: {
|
|
78
|
-
chunks: "all",
|
|
79
|
-
minSize: 200,
|
|
80
|
-
// maxSize: 99999,
|
|
81
|
-
//minChunks: 1,
|
|
82
|
-
|
|
83
|
-
cacheGroups: {
|
|
84
|
-
defaultVendors: false,
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
}
|
|
89
|
-
return config
|
|
90
|
-
}
|
|
1
|
+
const path = require("path");
|
|
2
|
+
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
3
|
+
const { EsbuildPlugin } = require("esbuild-loader");
|
|
4
|
+
const { FileUploader } = require("@cocreate/webpack");
|
|
5
|
+
|
|
6
|
+
module.exports = async (env, argv) => {
|
|
7
|
+
const isProduction = argv && argv.mode === "production";
|
|
8
|
+
const config = {
|
|
9
|
+
entry: {
|
|
10
|
+
"CoCreate-local-storage": "./src/index.js"
|
|
11
|
+
},
|
|
12
|
+
output: {
|
|
13
|
+
path: path.resolve(__dirname, "dist"),
|
|
14
|
+
filename: isProduction ? "[name].min.js" : "[name].js",
|
|
15
|
+
libraryExport: "default",
|
|
16
|
+
library: ["CoCreate", "localStorage"],
|
|
17
|
+
clean: true
|
|
18
|
+
},
|
|
19
|
+
plugins: [
|
|
20
|
+
new MiniCssExtractPlugin({
|
|
21
|
+
filename: isProduction ? "[name].min.css" : "[name].css"
|
|
22
|
+
}),
|
|
23
|
+
new FileUploader(env, argv)
|
|
24
|
+
],
|
|
25
|
+
mode: isProduction ? "production" : "development",
|
|
26
|
+
devtool: isProduction ? "source-map" : "eval-source-map",
|
|
27
|
+
module: {
|
|
28
|
+
rules: [
|
|
29
|
+
{
|
|
30
|
+
test: /.js$/,
|
|
31
|
+
exclude: /node_modules/,
|
|
32
|
+
use: {
|
|
33
|
+
loader: "esbuild-loader",
|
|
34
|
+
options: {
|
|
35
|
+
loader: "js",
|
|
36
|
+
target: "es2017"
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
test: /.css$/i,
|
|
42
|
+
use: [MiniCssExtractPlugin.loader, "css-loader"]
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
optimization: {
|
|
47
|
+
minimize: isProduction,
|
|
48
|
+
minimizer: [
|
|
49
|
+
new EsbuildPlugin({
|
|
50
|
+
target: "es2017",
|
|
51
|
+
css: true
|
|
52
|
+
})
|
|
53
|
+
],
|
|
54
|
+
splitChunks: {
|
|
55
|
+
cacheGroups: {
|
|
56
|
+
defaultVendors: false
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
performance: {
|
|
61
|
+
hints: isProduction ? "warning" : false
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
return config;
|
|
65
|
+
};
|