@cocreate/notification 1.6.5 → 1.7.1

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,28 @@
1
+ ## [1.7.1](https://github.com/CoCreate-app/CoCreate-notification/compare/v1.7.0...v1.7.1) (2025-05-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * added css-loader ([7c28146](https://github.com/CoCreate-app/CoCreate-notification/commit/7c281462ea4a690219ab0b2f5f49d12bc4f547b6))
7
+ * update [@cocreate](https://github.com/cocreate) dependencies ([e1d91d7](https://github.com/CoCreate-app/CoCreate-notification/commit/e1d91d7334322ee56cdf4429a10b22e01fb20b23))
8
+ * update query attributes ([2d1719f](https://github.com/CoCreate-app/CoCreate-notification/commit/2d1719f9cfabf3ad7159d0d4ffe1f3cf917fb548))
9
+ * updated cocreate modules versions ([5a4e31b](https://github.com/CoCreate-app/CoCreate-notification/commit/5a4e31b28dc543713e7f3839add03521c9bb2b1e))
10
+ * webpack.config and devdependencies ([7855354](https://github.com/CoCreate-app/CoCreate-notification/commit/7855354cbc1dea8b2a2b64ae1f258f90a5a66029))
11
+
12
+ # [1.7.0](https://github.com/CoCreate-app/CoCreate-notification/compare/v1.6.5...v1.7.0) (2024-11-04)
13
+
14
+
15
+ ### Bug Fixes
16
+
17
+ * event condition ([d2a90da](https://github.com/CoCreate-app/CoCreate-notification/commit/d2a90da5d9d3d865467c036b2275bd5ae54b34e8))
18
+ * pretier.config.js and file formating ([d6b5f6f](https://github.com/CoCreate-app/CoCreate-notification/commit/d6b5f6ff70686520a208e67e773378c92e168b36))
19
+
20
+
21
+ ### Features
22
+
23
+ * add prettier.config.js and format files ([941bc61](https://github.com/CoCreate-app/CoCreate-notification/commit/941bc61b941ba421dadee355d5e50365d60a0cf3))
24
+ * add prettier.config.js and format files ([df1b112](https://github.com/CoCreate-app/CoCreate-notification/commit/df1b1128d332b83bd8aab498a1144c6f8039b6f3))
25
+
1
26
  ## [1.6.5](https://github.com/CoCreate-app/CoCreate-notification/compare/v1.6.4...v1.6.5) (2024-06-23)
2
27
 
3
28
 
package/docs/index.html CHANGED
@@ -1,347 +1,347 @@
1
1
  <!DOCTYPE html>
2
2
  <html lang="en">
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-notification 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="A JavaScript component target,update &amp; remove values in element's notification from an input,select or js api.Configurable using class, style or any custom attribute" />
16
- <meta name="robots" content="index,follow" />
17
- <meta
18
- property="og:image"
19
- content="https://cdn.cocreate.app/docs/notification.png" />
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-notification 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="A JavaScript component target,update &amp; remove values in element's notification from an input,select or js api.Configurable using class, style or any custom attribute" />
16
+ <meta name="robots" content="index,follow" />
17
+ <meta
18
+ property="og:image"
19
+ content="https://cdn.cocreate.app/docs/notification.png" />
20
20
 
21
- <link
22
- rel="stylesheet"
23
- href="../index.css"
24
- array="files"
25
- object="60888216117c640e7596303f"
26
- key="src"
27
- type="text/css"
28
- save="true" />
29
- <link rel="manifest" href="/manifest.webmanifest" />
30
- </head>
21
+ <link
22
+ rel="stylesheet"
23
+ href="../index.css"
24
+ array="files"
25
+ object="60888216117c640e7596303f"
26
+ key="src"
27
+ type="text/css"
28
+ save="true" />
29
+ <link rel="manifest" href="/manifest.webmanifest" />
30
+ </head>
31
31
 
32
- <body>
33
- <!-- Navbar -->
34
- <nav
35
- class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
36
- content_id="content"
37
- scroll="sticky-nav,"
38
- scroll-up="5"
39
- scroll-down="5"
40
- path="../"
41
- src="../components/navbar.html"></nav>
42
- <sidenav
43
- id="menuL"
44
- class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
45
- resizable
46
- resize-selector="[content_id='content']"
47
- resize-property="margin-left"
48
- resize-value="width">
49
- <menu
50
- array="files"
51
- object="603717b07de7fb350ae9fec8"
52
- key="src"></menu>
53
- <div resize="right"></div>
54
- </sidenav>
55
- <main
56
- class="padding-top:15px padding:15px@lg@xl"
57
- content_id="content"
58
- id="cocreate-domEditorPanel">
59
- <div
60
- class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
61
- <div class="display:flex align-items:center">
62
- <h2>CoCreate-domEditorPanel</h2>
63
- </div>
64
- <div
65
- class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
66
- <div
67
- class="display:flex align-items:center transition:0.3s padding-left:10px"
68
- share-network="true"
69
- share-text="A JavaScript component target,update &amp; remove values in element's notification from an input,select or js api.Configurable using class,style or any custom attribute"
70
- share-title="CoCreate notification"
71
- share-height="600"
72
- share-width="700"
73
- share-media="https://cdn.cocreate.app/docs/notification.png"
74
- hover="display:block!important"
75
- hover-selector=".social-networks">
76
- <div class="display:none social-networks">
77
- <a
78
- class="margin-right:15px"
79
- share-network="twitter"
80
- title="Share on twitter"
81
- ><i src="/assets/svg/twitter.svg"></i
82
- ></a>
83
- <a
84
- class="margin-right:15px"
85
- share-network="facebook"
86
- title="Share on Facebook"
87
- ><i src="/assets/svg/facebook.svg"></i
88
- ></a>
89
- <a
90
- class="margin-right:15px"
91
- share-network="instagram"
92
- title="Share on instagram"
93
- ><i src="/assets/svg/instagram.svg"></i
94
- ></a>
95
- </div>
96
- <a
97
- class="margin-right:15px"
98
- share-network="share"
99
- title="Share on share"
100
- ><i src="/assets/svg/share-alt.svg"></i
101
- ></a>
102
- </div>
103
- <a
104
- class="margin-right:15px"
105
- share-network="share"
106
- title="Share on share"
107
- ><i src="/assets/svg/share-alt.svg"></i
108
- ></a>
109
- </div>
110
- <a
111
- href="https://github.com/CoCreate-app/CoCreate-domEditorPanel"
112
- target="_blank"
113
- class="margin-right:15px"
114
- ><i src="/assets/svg/github.svg"></i
115
- ></a>
116
- </div>
32
+ <body>
33
+ <!-- Navbar -->
34
+ <nav
35
+ class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
36
+ content_id="content"
37
+ scroll="sticky-nav,"
38
+ scroll-up="5"
39
+ scroll-down="5"
40
+ path="../"
41
+ src="../components/navbar.html"></nav>
42
+ <sidenav
43
+ id="menuL"
44
+ class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
45
+ resizable
46
+ resize-query="[content_id='content']"
47
+ resize-property="margin-left"
48
+ resize-value="width">
49
+ <menu
50
+ array="files"
51
+ object="603717b07de7fb350ae9fec8"
52
+ key="src"></menu>
53
+ <div resize="right"></div>
54
+ </sidenav>
55
+ <main
56
+ class="padding-top:15px padding:15px@lg@xl"
57
+ content_id="content"
58
+ id="cocreate-domEditorPanel">
59
+ <div
60
+ class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
61
+ <div class="display:flex align-items:center">
62
+ <h2>CoCreate-domEditorPanel</h2>
63
+ </div>
64
+ <div
65
+ class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
66
+ <div
67
+ class="display:flex align-items:center transition:0.3s padding-left:10px"
68
+ share-network="true"
69
+ share-text="A JavaScript component target,update &amp; remove values in element's notification from an input,select or js api.Configurable using class,style or any custom attribute"
70
+ share-title="CoCreate notification"
71
+ share-height="600"
72
+ share-width="700"
73
+ share-media="https://cdn.cocreate.app/docs/notification.png"
74
+ hover="display:block!important"
75
+ hover-query=".social-networks">
76
+ <div class="display:none social-networks">
77
+ <a
78
+ class="margin-right:15px"
79
+ share-network="twitter"
80
+ title="Share on twitter"
81
+ ><i src="/assets/svg/twitter.svg"></i
82
+ ></a>
83
+ <a
84
+ class="margin-right:15px"
85
+ share-network="facebook"
86
+ title="Share on Facebook"
87
+ ><i src="/assets/svg/facebook.svg"></i
88
+ ></a>
89
+ <a
90
+ class="margin-right:15px"
91
+ share-network="instagram"
92
+ title="Share on instagram"
93
+ ><i src="/assets/svg/instagram.svg"></i
94
+ ></a>
95
+ </div>
96
+ <a
97
+ class="margin-right:15px"
98
+ share-network="share"
99
+ title="Share on share"
100
+ ><i src="/assets/svg/share-alt.svg"></i
101
+ ></a>
102
+ </div>
103
+ <a
104
+ class="margin-right:15px"
105
+ share-network="share"
106
+ title="Share on share"
107
+ ><i src="/assets/svg/share-alt.svg"></i
108
+ ></a>
109
+ </div>
110
+ <a
111
+ href="https://github.com/CoCreate-app/CoCreate-domEditorPanel"
112
+ target="_blank"
113
+ class="margin-right:15px"
114
+ ><i src="/assets/svg/github.svg"></i
115
+ ></a>
116
+ </div>
117
117
 
118
- <h1
119
- class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
120
- Simple HTML5 &amp; JavaScript component operate add, update
121
- &amp; remove values in element's notification from input, select
122
- or js api. Easy configuration using class, style or any custom
123
- attribute. Highly customizable and styleable.
124
- </h1>
125
- <div
126
- id="domEditorPanel-section"
127
- class="display:flex flex-wrap:wrap">
128
- <div
129
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
130
- <div
131
- id="notification-install"
132
- class="border-bottom:1px_solid_lightgrey"
133
- scroll
134
- scroll-intersect="color:dodgerblue"
135
- scroll-selector="#notification-install-section">
136
- <span
137
- class="display:flex align-items:center width:fit-content"
138
- hover="display:block!important"
139
- hover-selector="[href='#notification-install']">
140
- <h2 class="padding:5px_0px">Install</h2>
141
- <a
142
- class="margin-left:10px display:none"
143
- href="#notification-install"
144
- ><i src="/assets/svg/link.svg"></i
145
- ></a>
146
- </span>
147
- </div>
118
+ <h1
119
+ class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
120
+ Simple HTML5 &amp; JavaScript component operate add, update
121
+ &amp; remove values in element's notification from input, select
122
+ or js api. Easy configuration using class, style or any custom
123
+ attribute. Highly customizable and styleable.
124
+ </h1>
125
+ <div
126
+ id="domEditorPanel-section"
127
+ class="display:flex flex-wrap:wrap">
128
+ <div
129
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
130
+ <div
131
+ id="notification-install"
132
+ class="border-bottom:1px_solid_lightgrey"
133
+ scroll
134
+ scroll-intersect="color:dodgerblue"
135
+ scroll-query="#notification-install-section">
136
+ <span
137
+ class="display:flex align-items:center width:fit-content"
138
+ hover="display:block!important"
139
+ hover-query="[href='#notification-install']">
140
+ <h2 class="padding:5px_0px">Install</h2>
141
+ <a
142
+ class="margin-left:10px display:none"
143
+ href="#notification-install"
144
+ ><i src="/assets/svg/link.svg"></i
145
+ ></a>
146
+ </span>
147
+ </div>
148
148
 
149
- <pre><code class="language-bash">npm i @cocreate/action</code></pre>
150
- <p class="padding:10px_0px line-height:1.5">
151
- Or you can use cdn link:
152
- </p>
153
- <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/notification/latest/CoCreate-notification.min.js&lt;/script&gt;</code></pre>
149
+ <pre><code class="language-bash">npm i @cocreate/action</code></pre>
150
+ <p class="padding:10px_0px line-height:1.5">
151
+ Or you can use cdn link:
152
+ </p>
153
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/notification/latest/CoCreate-notification.min.js&lt;/script&gt;</code></pre>
154
154
 
155
- <div
156
- id="notification-usage"
157
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
158
- scroll
159
- scroll-intersect="color:dodgerblue"
160
- scroll-selector="#notification-usage-section">
161
- <span
162
- class="display:flex align-items:center width:fit-content"
163
- hover="display:block!important"
164
- hover-selector="[href='#notification-usage']">
165
- <h2 class="padding:5px_0px">Usage</h2>
166
- <a
167
- class="margin-left:10px display:none"
168
- href="#notification-usage"
169
- ><i src="/assets/svg/link.svg"></i
170
- ></a>
171
- </span>
172
- </div>
173
- <div class="">
174
- <p class="padding:10px_0px line-height:1.5">
175
- This is domEditorPanel usage
176
- </p>
155
+ <div
156
+ id="notification-usage"
157
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
158
+ scroll
159
+ scroll-intersect="color:dodgerblue"
160
+ scroll-query="#notification-usage-section">
161
+ <span
162
+ class="display:flex align-items:center width:fit-content"
163
+ hover="display:block!important"
164
+ hover-query="[href='#notification-usage']">
165
+ <h2 class="padding:5px_0px">Usage</h2>
166
+ <a
167
+ class="margin-left:10px display:none"
168
+ href="#notification-usage"
169
+ ><i src="/assets/svg/link.svg"></i
170
+ ></a>
171
+ </span>
172
+ </div>
173
+ <div class="">
174
+ <p class="padding:10px_0px line-height:1.5">
175
+ This is domEditorPanel usage
176
+ </p>
177
177
 
178
- <div class="flex-grow:1 min-width:300px width:100%">
179
- <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
180
- </div>
181
- <p class="padding:10px_0px line-height:1.5">
182
- This is domEditorPanel usage
183
- </p>
184
- <p class="padding:10px_0px line-height:1.5">
185
- This is domEditorPanel usage
186
- </p>
187
- </div>
188
- <div
189
- id="notification-notification"
190
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
191
- scroll
192
- scroll-intersect="color:dodgerblue"
193
- scroll-selector="#notification-notification-section">
194
- <span
195
- class="display:flex align-items:center width:fit-content"
196
- hover="display:block!important"
197
- hover-selector="[href='#notification-notification']">
198
- <h2 class="padding:5px_0px">notification</h2>
199
- <a
200
- class="margin-left:10px display:none"
201
- href="#notification-notification"
202
- ><i src="/assets/svg/link.svg"></i
203
- ></a>
204
- </span>
205
- </div>
206
- <ul class="list-style-type:none">
207
- <li
208
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
209
- <h4>
210
- <span>domEditorPanel</span>
211
- <span class="cocreate-badge success"
212
- >string</span
213
- >
214
- <span class="cocreate-badge warning"
215
- >optional</span
216
- >
217
- </h4>
218
- <p>domEditorPanel-attribute</p>
219
- </li>
220
- <li
221
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
222
- <h4>
223
- <span>domEditorPanel</span>
224
- <span class="cocreate-badge success"
225
- >string</span
226
- >
227
- <span class="cocreate-badge warning"
228
- >optional</span
229
- >
230
- </h4>
231
- <p>domEditorPanel-attribute</p>
232
- </li>
233
- </ul>
234
- </div>
178
+ <div class="flex-grow:1 min-width:300px width:100%">
179
+ <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
180
+ </div>
181
+ <p class="padding:10px_0px line-height:1.5">
182
+ This is domEditorPanel usage
183
+ </p>
184
+ <p class="padding:10px_0px line-height:1.5">
185
+ This is domEditorPanel usage
186
+ </p>
187
+ </div>
188
+ <div
189
+ id="notification-notification"
190
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
191
+ scroll
192
+ scroll-intersect="color:dodgerblue"
193
+ scroll-query="#notification-notification-section">
194
+ <span
195
+ class="display:flex align-items:center width:fit-content"
196
+ hover="display:block!important"
197
+ hover-query="[href='#notification-notification']">
198
+ <h2 class="padding:5px_0px">notification</h2>
199
+ <a
200
+ class="margin-left:10px display:none"
201
+ href="#notification-notification"
202
+ ><i src="/assets/svg/link.svg"></i
203
+ ></a>
204
+ </span>
205
+ </div>
206
+ <ul class="list-style-type:none">
207
+ <li
208
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
209
+ <h4>
210
+ <span>domEditorPanel</span>
211
+ <span class="cocreate-badge success"
212
+ >string</span
213
+ >
214
+ <span class="cocreate-badge warning"
215
+ >optional</span
216
+ >
217
+ </h4>
218
+ <p>domEditorPanel-attribute</p>
219
+ </li>
220
+ <li
221
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
222
+ <h4>
223
+ <span>domEditorPanel</span>
224
+ <span class="cocreate-badge success"
225
+ >string</span
226
+ >
227
+ <span class="cocreate-badge warning"
228
+ >optional</span
229
+ >
230
+ </h4>
231
+ <p>domEditorPanel-attribute</p>
232
+ </li>
233
+ </ul>
234
+ </div>
235
235
 
236
- <div
237
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
238
- <!-- SandBox -->
239
- <div
240
- id="notification-demo"
241
- class="border-bottom:1px_solid_lightgrey"
242
- scroll
243
- scroll-intersect="color:dodgerblue"
244
- scroll-selector="#notification-demo-section">
245
- <span
246
- class="display:flex align-items:center width:fit-content"
247
- hover="display:block!important"
248
- hover-selector="[href='#notification-demo']">
249
- <h2 class="padding:5px_0px">Demo</h2>
250
- <a
251
- class="margin-left:10px display:none"
252
- href="#notification-demo"
253
- ><i src="/assets/svg/link.svg"></i
254
- ></a>
255
- </span>
256
- </div>
236
+ <div
237
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
238
+ <!-- SandBox -->
239
+ <div
240
+ id="notification-demo"
241
+ class="border-bottom:1px_solid_lightgrey"
242
+ scroll
243
+ scroll-intersect="color:dodgerblue"
244
+ scroll-query="#notification-demo-section">
245
+ <span
246
+ class="display:flex align-items:center width:fit-content"
247
+ hover="display:block!important"
248
+ hover-query="[href='#notification-demo']">
249
+ <h2 class="padding:5px_0px">Demo</h2>
250
+ <a
251
+ class="margin-left:10px display:none"
252
+ href="#notification-demo"
253
+ ><i src="/assets/svg/link.svg"></i
254
+ ></a>
255
+ </span>
256
+ </div>
257
257
 
258
- <div
259
- class="position:sticky top:0 padding:15px_0px height:100vh">
260
- <!-- SandBox -->
261
- <div
262
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
263
- id="playground">
264
- <div
265
- id="demo-code"
266
- resizable
267
- class="position:relative height:50%">
268
- <textarea
269
- type="code"
270
- lang="html"
271
- array="demos"
272
- object=""
273
- key="demo"
274
- save="false"
275
- id="demo"
276
- class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
277
- <div
278
- resize="bottom"
279
- class="background:lightgrey"></div>
280
- </div>
258
+ <div
259
+ class="position:sticky top:0 padding:15px_0px height:100vh">
260
+ <!-- SandBox -->
261
+ <div
262
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
263
+ id="playground">
264
+ <div
265
+ id="demo-code"
266
+ resizable
267
+ class="position:relative height:50%">
268
+ <textarea
269
+ type="code"
270
+ lang="html"
271
+ array="demos"
272
+ object=""
273
+ key="demo"
274
+ save="false"
275
+ id="demo"
276
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
277
+ <div
278
+ resize="bottom"
279
+ class="background:lightgrey"></div>
280
+ </div>
281
281
 
282
- <div
283
- id="demo-preview"
284
- class="position:relative overflow:auto background-color:white">
285
- <div class="demopreview padding:20px"></div>
286
- </div>
282
+ <div
283
+ id="demo-preview"
284
+ class="position:relative overflow:auto background-color:white">
285
+ <div class="demopreview padding:20px"></div>
286
+ </div>
287
287
 
288
- <div
289
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
290
- <a
291
- class="margin-right:10px"
292
- id="eye"
293
- show="#eye-slash"
294
- hide="#eye, #demo-preview"
295
- toggle="code-height"
296
- toggle-selector="#demo-code"
297
- ><i
298
- class="height:18px"
299
- src="/assets/svg/eye.svg"></i
300
- ></a>
301
- <a
302
- class="margin-right:10px"
303
- hidden
304
- id="eye-slash"
305
- show="#eye, #demo-preview"
306
- hide="#eye-slash"
307
- toggle="code-height"
308
- toggle-selector="#demo-code"
309
- ><i src="/assets/svg/eye-slash.svg"></i
310
- ></a>
311
- <a
312
- class="margin-right:10px"
313
- id="code"
314
- show="#code-slash"
315
- hide="#code, #demo-code"
316
- ><i src="/assets/svg/code.svg"></i
317
- ></a>
318
- <a
319
- class="margin-right:10px"
320
- hidden
321
- id="code-slash"
322
- show="#code, #demo-code"
323
- hide="#code-slash"
324
- ><i
325
- class="height:18px"
326
- src="/assets/svg/code.svg"></i
327
- ></a>
328
- <a
329
- class="margin-right:5px"
330
- fullscreen
331
- fullscreen-selector="#playground"></a>
332
- </div>
333
- </div>
334
- <!-- End SandBox -->
335
- </div>
336
- </div>
337
- </div>
338
- <button
339
- href="https://github.com/CoCreate-app/CoCreate-notification/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
340
- target="_blank"
341
- 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)">
342
- <i class="height:20px" src="../assets/svg/pencil-alt.svg"></i>
343
- </button>
344
- </main>
345
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
346
- </body>
288
+ <div
289
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
290
+ <a
291
+ class="margin-right:10px"
292
+ id="eye"
293
+ show="#eye-slash"
294
+ hide="#eye, #demo-preview"
295
+ toggle="code-height"
296
+ toggle-query="#demo-code"
297
+ ><i
298
+ class="height:18px"
299
+ src="/assets/svg/eye.svg"></i
300
+ ></a>
301
+ <a
302
+ class="margin-right:10px"
303
+ hidden
304
+ id="eye-slash"
305
+ show="#eye, #demo-preview"
306
+ hide="#eye-slash"
307
+ toggle="code-height"
308
+ toggle-query="#demo-code"
309
+ ><i src="/assets/svg/eye-slash.svg"></i
310
+ ></a>
311
+ <a
312
+ class="margin-right:10px"
313
+ id="code"
314
+ show="#code-slash"
315
+ hide="#code, #demo-code"
316
+ ><i src="/assets/svg/code.svg"></i
317
+ ></a>
318
+ <a
319
+ class="margin-right:10px"
320
+ hidden
321
+ id="code-slash"
322
+ show="#code, #demo-code"
323
+ hide="#code-slash"
324
+ ><i
325
+ class="height:18px"
326
+ src="/assets/svg/code.svg"></i
327
+ ></a>
328
+ <a
329
+ class="margin-right:5px"
330
+ fullscreen
331
+ fullscreen-query="#playground"></a>
332
+ </div>
333
+ </div>
334
+ <!-- End SandBox -->
335
+ </div>
336
+ </div>
337
+ </div>
338
+ <button
339
+ href="https://github.com/CoCreate-app/CoCreate-notification/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
340
+ target="_blank"
341
+ 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)">
342
+ <i src="../assets/svg/pencil-alt.svg"></i>
343
+ </button>
344
+ </main>
345
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
346
+ </body>
347
347
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/notification",
3
- "version": "1.6.5",
3
+ "version": "1.7.1",
4
4
  "description": "Simple HTML5 & JavaScript component add, update & remove values in element's notification from input, select or js api. Easily configured using HTML5 notification and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "cocreate",
@@ -43,22 +43,18 @@
43
43
  },
44
44
  "main": "./src/index.js",
45
45
  "devDependencies": {
46
- "@babel/core": "^7.9.6",
47
- "@babel/preset-env": "^7.9.6",
48
- "babel-loader": "^8.1.0",
49
- "clean-webpack-plugin": "^3.0.0",
50
- "file-loader": "^6.2.0",
46
+ "css-loader": "^5.1.3",
47
+ "esbuild": "^0.25.2",
48
+ "esbuild-loader": "^4.3.0",
51
49
  "html-webpack-plugin": "^5.3.1",
52
50
  "mini-css-extract-plugin": "^1.4.0",
53
- "style-loader": "^3.3.1",
54
- "terser-webpack-plugin": "^5.1.1",
55
51
  "webpack": "^5.24.4",
56
52
  "webpack-cli": "^4.5.0",
57
53
  "webpack-log": "^3.0.1"
58
54
  },
59
55
  "dependencies": {
60
- "@cocreate/actions": "^1.18.4",
61
- "@cocreate/socket-client": "^1.39.4",
56
+ "@cocreate/actions": "^1.21.1",
57
+ "@cocreate/socket-client": "^1.40.2",
62
58
  "web-push": "^3.6.6"
63
59
  }
64
60
  }
@@ -0,0 +1,16 @@
1
+ module.exports = {
2
+ tabWidth: 4,
3
+ semi: true,
4
+ trailingComma: "none",
5
+ bracketSameLine: true,
6
+ useTabs: true,
7
+ overrides: [
8
+ {
9
+ files: ["*.json", "*.yml", "*.yaml"],
10
+ options: {
11
+ tabWidth: 2,
12
+ useTabs: false
13
+ },
14
+ }
15
+ ],
16
+ };
package/src/client.js CHANGED
@@ -57,8 +57,9 @@ async function handlePushPermission() {
57
57
  }
58
58
 
59
59
  // Call the function when the user interacts with a relevant UI element (e.g., a button)
60
- document.querySelector('[actions*="notification.subscribe"]').addEventListener('click', handlePushPermission);
61
-
60
+ let element = document.querySelector('[actions*="notification.subscribe"]')
61
+ if (element)
62
+ element.addEventListener('click', handlePushPermission);
62
63
  // actions.init({
63
64
  // name: "notification",
64
65
  // endEvent: "notification",
package/webpack.config.js CHANGED
@@ -1,90 +1,65 @@
1
- const path = require("path")
2
- const TerserPlugin = require("terser-webpack-plugin")
3
- const MiniCssExtractPlugin = require("mini-css-extract-plugin")
4
- const { CleanWebpackPlugin } = require("clean-webpack-plugin")
5
-
6
- module.exports = (env, argv) => {
7
- let isProduction = false
8
- if (argv.mode === 'production')
9
- isProduction = true
10
-
11
- const config = {
12
- entry: {
13
- "CoCreate-notification": "./src/index.js",
14
- },
15
- output: {
16
- path: path.resolve(__dirname, "dist"),
17
- filename: isProduction ? "[name].min.js" : "[name].js",
18
- libraryTarget: "umd",
19
- libraryExport: "default",
20
- library: ["CoCreate", "notification"],
21
- globalObject: "this",
22
- },
23
-
24
- plugins: [
25
- new CleanWebpackPlugin(),
26
- new MiniCssExtractPlugin({
27
- filename: "[name].css",
28
- }),
29
- ],
30
- // Default mode for Webpack is production.
31
- // Depending on mode Webpack will apply different things
32
- // on final bundle. For now we don't need production's JavaScript
33
- // minifying and other thing so let's set mode to development
34
- mode: isProduction ? "production" : "development",
35
- module: {
36
- rules: [
37
- {
38
- test: /.js$/,
39
- exclude: /(node_modules)/,
40
- use: {
41
- loader: "babel-loader",
42
- options: {
43
- plugins: ["@babel/plugin-transform-modules-commonjs"],
44
- },
45
- },
46
- },
47
- {
48
- test: /.css$/i,
49
- use: [
50
- { loader: "style-loader", options: { injectType: "linkTag" } },
51
- "file-loader",
52
- ],
53
- },
54
- ],
55
- },
56
-
57
- // add source map
58
- ...(isProduction ? {} : { devtool: "eval-source-map" }),
59
-
60
- optimization: {
61
- minimize: true,
62
- minimizer: [
63
- new TerserPlugin({
64
- extractComments: true,
65
- // cache: true,
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-notification": "./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", "notification"],
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
+ };