@cocreate/calculate 1.14.7 → 1.15.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [1.15.0](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.7...v1.15.0) (2024-11-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * observer taget has been renamed to selector ([b781427](https://github.com/CoCreate-app/CoCreate-calculate/commit/b7814279f23ab622e624dae0426b6233be6360a8))
7
+ * pretier.config.js and file formating ([c42f51b](https://github.com/CoCreate-app/CoCreate-calculate/commit/c42f51b2b1427b9fe71ef7ae0dfd01154051e51f))
8
+
9
+
10
+ ### Features
11
+
12
+ * add prettier.config.js and format files ([c7c6c3e](https://github.com/CoCreate-app/CoCreate-calculate/commit/c7c6c3e2e02d253759f59b0dd5ecaac8df2e8c75))
13
+ * add prettier.config.js and format files ([d20732a](https://github.com/CoCreate-app/CoCreate-calculate/commit/d20732a680def53c99609f31c8f0c5264ca188ab))
14
+
1
15
  ## [1.14.7](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.6...v1.14.7) (2024-06-12)
2
16
 
3
17
 
package/docs/index.html CHANGED
@@ -1,349 +1,349 @@
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-calculate 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 handy JavaScript calculator,concatenate multiple inputs containing integers &amp; execute calculate.Can be used for invoices,payments &amp; any complex calculate" />
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/calculate.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-calculate 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 handy JavaScript calculator,concatenate multiple inputs containing integers &amp; execute calculate.Can be used for invoices,payments &amp; any complex calculate" />
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/calculate.png" />
23
23
 
24
- <link
25
- rel="stylesheet"
26
- href="../index.css"
27
- array="files"
28
- object="60888216117c640e7596303f"
29
- key="src"
30
- type="text/css"
31
- save="true" />
32
- <link rel="manifest" href="/manifest.webmanifest" />
33
- </head>
24
+ <link
25
+ rel="stylesheet"
26
+ href="../index.css"
27
+ array="files"
28
+ object="60888216117c640e7596303f"
29
+ key="src"
30
+ type="text/css"
31
+ save="true" />
32
+ <link rel="manifest" href="/manifest.webmanifest" />
33
+ </head>
34
34
 
35
- <body>
36
- <!-- Navbar -->
37
- <nav
38
- class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
39
- content_id="content"
40
- scroll="sticky-nav,"
41
- scroll-up="5"
42
- scroll-down="5"
43
- path="../"
44
- src="../components/navbar.html"></nav>
45
- <sidenav
46
- id="menuL"
47
- class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
48
- resizable
49
- resize-selector="[content_id='content']"
50
- resize-property="margin-left"
51
- resize-value="width">
52
- <menu
53
- array="files"
54
- object="603717b07de7fb350ae9fec8"
55
- key="src"></menu>
56
- <div resize="right"></div>
57
- </sidenav>
58
- <main
59
- class="padding-top:15px padding:15px@lg@xl"
60
- content_id="content"
61
- id="cocreate-calculate">
62
- <div
63
- class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
64
- <div class="display:flex align-items:center">
65
- <h2>CoCreate-calculate</h2>
66
- </div>
67
- <div
68
- class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
69
- <div
70
- class="display:flex align-items:center transition:0.3s padding-left:10px"
71
- share-network="true"
72
- share-text="Enter decription here"
73
- share-title="testing im a title"
74
- share-height="600"
75
- share-width="700"
76
- share-media="https://cdn.cocreate.app/docs/calculate.png"
77
- hover="display:block!important"
78
- hover-selector=".social-networks">
79
- <div class="display:none social-networks">
80
- <a
81
- class="margin-right:15px"
82
- share-network="twitter"
83
- title="Share on twitter"
84
- ><i src="/assets/svg/twitter.svg"></i
85
- ></a>
86
- <a
87
- class="margin-right:15px"
88
- share-network="facebook"
89
- title="Share on Facebook"
90
- ><i src="/assets/svg/facebook.svg"></i
91
- ></a>
92
- <a
93
- class="margin-right:15px"
94
- share-network="instagram"
95
- title="Share on instagram"
96
- ><i src="/assets/svg/instagram.svg"></i
97
- ></a>
98
- </div>
99
- <a
100
- class="margin-right:15px"
101
- share-network="share"
102
- title="Share on share"
103
- ><i src="/assets/svg/share-alt.svg"></i
104
- ></a>
105
- </div>
106
- <a
107
- class="margin-right:15px"
108
- share-network="share"
109
- title="Share on share"
110
- ><i src="/assets/svg/share-alt.svg"></i
111
- ></a>
112
- </div>
113
- <a
114
- href="https://github.com/CoCreate-app/CoCreate-calculate"
115
- target="_blank"
116
- class="margin-right:15px"
117
- ><i src="/assets/svg/github.svg"></i
118
- ></a>
119
- </div>
35
+ <body>
36
+ <!-- Navbar -->
37
+ <nav
38
+ class="width:100% display:flex align-items:center background:transparent padding-top:10px padding-bottom:10px"
39
+ content_id="content"
40
+ scroll="sticky-nav,"
41
+ scroll-up="5"
42
+ scroll-down="5"
43
+ path="../"
44
+ src="../components/navbar.html"></nav>
45
+ <sidenav
46
+ id="menuL"
47
+ class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
48
+ resizable
49
+ resize-selector="[content_id='content']"
50
+ resize-property="margin-left"
51
+ resize-value="width">
52
+ <menu
53
+ array="files"
54
+ object="603717b07de7fb350ae9fec8"
55
+ key="src"></menu>
56
+ <div resize="right"></div>
57
+ </sidenav>
58
+ <main
59
+ class="padding-top:15px padding:15px@lg@xl"
60
+ content_id="content"
61
+ id="cocreate-calculate">
62
+ <div
63
+ class="display:flex flex-wrap:wrap justify-content:space-between position:relative margin:10px">
64
+ <div class="display:flex align-items:center">
65
+ <h2>CoCreate-calculate</h2>
66
+ </div>
67
+ <div
68
+ class="display:flex align-items:center font-size:20px position:absolute right:0 padding:5px background:white">
69
+ <div
70
+ class="display:flex align-items:center transition:0.3s padding-left:10px"
71
+ share-network="true"
72
+ share-text="Enter decription here"
73
+ share-title="testing im a title"
74
+ share-height="600"
75
+ share-width="700"
76
+ share-media="https://cdn.cocreate.app/docs/calculate.png"
77
+ hover="display:block!important"
78
+ hover-selector=".social-networks">
79
+ <div class="display:none social-networks">
80
+ <a
81
+ class="margin-right:15px"
82
+ share-network="twitter"
83
+ title="Share on twitter"
84
+ ><i src="/assets/svg/twitter.svg"></i
85
+ ></a>
86
+ <a
87
+ class="margin-right:15px"
88
+ share-network="facebook"
89
+ title="Share on Facebook"
90
+ ><i src="/assets/svg/facebook.svg"></i
91
+ ></a>
92
+ <a
93
+ class="margin-right:15px"
94
+ share-network="instagram"
95
+ title="Share on instagram"
96
+ ><i src="/assets/svg/instagram.svg"></i
97
+ ></a>
98
+ </div>
99
+ <a
100
+ class="margin-right:15px"
101
+ share-network="share"
102
+ title="Share on share"
103
+ ><i src="/assets/svg/share-alt.svg"></i
104
+ ></a>
105
+ </div>
106
+ <a
107
+ class="margin-right:15px"
108
+ share-network="share"
109
+ title="Share on share"
110
+ ><i src="/assets/svg/share-alt.svg"></i
111
+ ></a>
112
+ </div>
113
+ <a
114
+ href="https://github.com/CoCreate-app/CoCreate-calculate"
115
+ target="_blank"
116
+ class="margin-right:15px"
117
+ ><i src="/assets/svg/github.svg"></i
118
+ ></a>
119
+ </div>
120
120
 
121
- <h1
122
- class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
123
- A handy vanilla JavaScript calculator, concatenate multiple
124
- elements containing integers &amp; execute calculate. Can be
125
- used for creating invoices,making payments &amp; any kind of
126
- complex calculate. Easily configured using HTML5 attributes
127
- and/or JavaScript API.
128
- </h1>
129
- <div id="calculate-section" class="display:flex flex-wrap:wrap">
130
- <div
131
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
132
- <div
133
- id="calculate-install"
134
- class="border-bottom:1px_solid_lightgrey"
135
- scroll
136
- scroll-intersect="color:dodgerblue"
137
- scroll-selector="#calculate-install-section">
138
- <span
139
- class="display:flex align-items:center width:fit-content"
140
- hover="display:block!important"
141
- hover-selector="[href='#calculate-install']">
142
- <h2 class="padding:5px_0px">Install</h2>
143
- <a
144
- class="margin-left:10px display:none"
145
- href="#calculate-install"
146
- ><i src="/assets/svg/link.svg"></i
147
- ></a>
148
- </span>
149
- </div>
121
+ <h1
122
+ class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
123
+ A handy vanilla JavaScript calculator, concatenate multiple
124
+ elements containing integers &amp; execute calculate. Can be
125
+ used for creating invoices,making payments &amp; any kind of
126
+ complex calculate. Easily configured using HTML5 attributes
127
+ and/or JavaScript API.
128
+ </h1>
129
+ <div id="calculate-section" class="display:flex flex-wrap:wrap">
130
+ <div
131
+ class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
132
+ <div
133
+ id="calculate-install"
134
+ class="border-bottom:1px_solid_lightgrey"
135
+ scroll
136
+ scroll-intersect="color:dodgerblue"
137
+ scroll-selector="#calculate-install-section">
138
+ <span
139
+ class="display:flex align-items:center width:fit-content"
140
+ hover="display:block!important"
141
+ hover-selector="[href='#calculate-install']">
142
+ <h2 class="padding:5px_0px">Install</h2>
143
+ <a
144
+ class="margin-left:10px display:none"
145
+ href="#calculate-install"
146
+ ><i src="/assets/svg/link.svg"></i
147
+ ></a>
148
+ </span>
149
+ </div>
150
150
 
151
- <pre><code class="language-bash">npm i @cocreate/calculate</code></pre>
152
- <p class="padding:10px_0px line-height:1.5">
153
- Or you can use cdn link:
154
- </p>
155
- <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/calculate/latest/CoCreate-calculate.min.js&lt;/script&gt;</code></pre>
151
+ <pre><code class="language-bash">npm i @cocreate/calculate</code></pre>
152
+ <p class="padding:10px_0px line-height:1.5">
153
+ Or you can use cdn link:
154
+ </p>
155
+ <pre><code class="language-html">&lt;script&gt;https://cdn.cocreate.app/calculate/latest/CoCreate-calculate.min.js&lt;/script&gt;</code></pre>
156
156
 
157
- <div
158
- id="calculate-usage"
159
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
160
- scroll
161
- scroll-intersect="color:dodgerblue"
162
- scroll-selector="#calculate-usage-section">
163
- <span
164
- class="display:flex align-items:center width:fit-content"
165
- hover="display:block!important"
166
- hover-selector="[href='#calculate-usage']">
167
- <h2 class="padding:5px_0px">Usage</h2>
168
- <a
169
- class="margin-left:10px display:none"
170
- href="#calculate-usage"
171
- ><i src="/assets/svg/link.svg"></i
172
- ></a>
173
- </span>
174
- </div>
175
- <div class="">
176
- <p class="padding:10px_0px line-height:1.5">
177
- This is calculate usage
178
- </p>
157
+ <div
158
+ id="calculate-usage"
159
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
160
+ scroll
161
+ scroll-intersect="color:dodgerblue"
162
+ scroll-selector="#calculate-usage-section">
163
+ <span
164
+ class="display:flex align-items:center width:fit-content"
165
+ hover="display:block!important"
166
+ hover-selector="[href='#calculate-usage']">
167
+ <h2 class="padding:5px_0px">Usage</h2>
168
+ <a
169
+ class="margin-left:10px display:none"
170
+ href="#calculate-usage"
171
+ ><i src="/assets/svg/link.svg"></i
172
+ ></a>
173
+ </span>
174
+ </div>
175
+ <div class="">
176
+ <p class="padding:10px_0px line-height:1.5">
177
+ This is calculate usage
178
+ </p>
179
179
 
180
- <div class="flex-grow:1 min-width:300px width:100%">
181
- <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
182
- </div>
183
- <p class="padding:10px_0px line-height:1.5">
184
- This is calculate usage
185
- </p>
186
- <p class="padding:10px_0px line-height:1.5">
187
- This is calculate usage
188
- </p>
189
- </div>
180
+ <div class="flex-grow:1 min-width:300px width:100%">
181
+ <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
182
+ </div>
183
+ <p class="padding:10px_0px line-height:1.5">
184
+ This is calculate usage
185
+ </p>
186
+ <p class="padding:10px_0px line-height:1.5">
187
+ This is calculate usage
188
+ </p>
189
+ </div>
190
190
 
191
- <div
192
- id="calculate-attributes"
193
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
194
- scroll
195
- scroll-intersect="color:dodgerblue"
196
- scroll-selector="#calculate-attributes-section">
197
- <span
198
- class="display:flex align-items:center width:fit-content"
199
- hover="display:block!important"
200
- hover-selector="[href='#calculate-attributes']">
201
- <h2 class="padding:5px_0px">Attributes</h2>
202
- <a
203
- class="margin-left:10px display:none"
204
- href="#calculate-attributes"
205
- ><i src="/assets/svg/link.svg"></i
206
- ></a>
207
- </span>
208
- </div>
209
- <ul class="list-style-type:none">
210
- <li
211
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
212
- <h4>
213
- <span>calculates</span>
214
- <span class="cocreate-badge success"
215
- >string</span
216
- >
217
- <span class="cocreate-badge warning"
218
- >optional</span
219
- >
220
- </h4>
221
- <p>calculate-attribute</p>
222
- </li>
223
- <li
224
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
225
- <h4>
226
- <span>calculates</span>
227
- <span class="cocreate-badge success"
228
- >string</span
229
- >
230
- <span class="cocreate-badge warning"
231
- >optional</span
232
- >
233
- </h4>
234
- <p>calculate-attribute</p>
235
- </li>
236
- </ul>
237
- </div>
191
+ <div
192
+ id="calculate-attributes"
193
+ class="margin-top:80px border-bottom:1px_solid_lightgrey"
194
+ scroll
195
+ scroll-intersect="color:dodgerblue"
196
+ scroll-selector="#calculate-attributes-section">
197
+ <span
198
+ class="display:flex align-items:center width:fit-content"
199
+ hover="display:block!important"
200
+ hover-selector="[href='#calculate-attributes']">
201
+ <h2 class="padding:5px_0px">Attributes</h2>
202
+ <a
203
+ class="margin-left:10px display:none"
204
+ href="#calculate-attributes"
205
+ ><i src="/assets/svg/link.svg"></i
206
+ ></a>
207
+ </span>
208
+ </div>
209
+ <ul class="list-style-type:none">
210
+ <li
211
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
212
+ <h4>
213
+ <span>calculates</span>
214
+ <span class="cocreate-badge success"
215
+ >string</span
216
+ >
217
+ <span class="cocreate-badge warning"
218
+ >optional</span
219
+ >
220
+ </h4>
221
+ <p>calculate-attribute</p>
222
+ </li>
223
+ <li
224
+ class="padding:15px_0px border-bottom:1px_solid_lightgrey">
225
+ <h4>
226
+ <span>calculates</span>
227
+ <span class="cocreate-badge success"
228
+ >string</span
229
+ >
230
+ <span class="cocreate-badge warning"
231
+ >optional</span
232
+ >
233
+ </h4>
234
+ <p>calculate-attribute</p>
235
+ </li>
236
+ </ul>
237
+ </div>
238
238
 
239
- <div
240
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
241
- <!-- SandBox -->
242
- <div
243
- id="calculate-demo"
244
- class="border-bottom:1px_solid_lightgrey"
245
- scroll
246
- scroll-intersect="color:dodgerblue"
247
- scroll-selector="#calculate-demo-section">
248
- <span
249
- class="display:flex align-items:center width:fit-content"
250
- hover="display:block!important"
251
- hover-selector="[href='#calculate-demo']">
252
- <h2 class="padding:5px_0px">Demo</h2>
253
- <a
254
- class="margin-left:10px display:none"
255
- href="#calculate-demo"
256
- ><i src="/assets/svg/link.svg"></i
257
- ></a>
258
- </span>
259
- </div>
260
- <div
261
- class="position:sticky top:0 padding:15px_0px height:100vh">
262
- <!-- SandBox -->
263
- <div
264
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
265
- id="playground">
266
- <div
267
- id="demo-code"
268
- resizable
269
- class="position:relative height:50%">
270
- <textarea
271
- type="code"
272
- lang="html"
273
- array="demos"
274
- object=""
275
- key="demo"
276
- save="false"
277
- id="demo"
278
- class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
279
- <div
280
- resize="bottom"
281
- class="background:lightgrey"></div>
282
- </div>
239
+ <div
240
+ class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
241
+ <!-- SandBox -->
242
+ <div
243
+ id="calculate-demo"
244
+ class="border-bottom:1px_solid_lightgrey"
245
+ scroll
246
+ scroll-intersect="color:dodgerblue"
247
+ scroll-selector="#calculate-demo-section">
248
+ <span
249
+ class="display:flex align-items:center width:fit-content"
250
+ hover="display:block!important"
251
+ hover-selector="[href='#calculate-demo']">
252
+ <h2 class="padding:5px_0px">Demo</h2>
253
+ <a
254
+ class="margin-left:10px display:none"
255
+ href="#calculate-demo"
256
+ ><i src="/assets/svg/link.svg"></i
257
+ ></a>
258
+ </span>
259
+ </div>
260
+ <div
261
+ class="position:sticky top:0 padding:15px_0px height:100vh">
262
+ <!-- SandBox -->
263
+ <div
264
+ class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
265
+ id="playground">
266
+ <div
267
+ id="demo-code"
268
+ resizable
269
+ class="position:relative height:50%">
270
+ <textarea
271
+ type="code"
272
+ lang="html"
273
+ array="demos"
274
+ object=""
275
+ key="demo"
276
+ save="false"
277
+ id="demo"
278
+ class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
279
+ <div
280
+ resize="bottom"
281
+ class="background:lightgrey"></div>
282
+ </div>
283
283
 
284
- <div
285
- id="demo-preview"
286
- class="position:relative overflow:auto background-color:white">
287
- <div class="demopreview padding:20px"></div>
288
- </div>
284
+ <div
285
+ id="demo-preview"
286
+ class="position:relative overflow:auto background-color:white">
287
+ <div class="demopreview padding:20px"></div>
288
+ </div>
289
289
 
290
- <div
291
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
292
- <a
293
- class="margin-right:10px"
294
- id="eye"
295
- show="#eye-slash"
296
- hide="#eye, #demo-preview"
297
- toggle="code-height"
298
- toggle-selector="#demo-code"
299
- ><i
300
- class="height:18px"
301
- src="/assets/svg/eye.svg"></i
302
- ></a>
303
- <a
304
- class="margin-right:10px"
305
- hidden
306
- id="eye-slash"
307
- show="#eye, #demo-preview"
308
- hide="#eye-slash"
309
- toggle="code-height"
310
- toggle-selector="#demo-code"
311
- ><i src="/assets/svg/eye-slash.svg"></i
312
- ></a>
313
- <a
314
- class="margin-right:10px"
315
- id="code"
316
- show="#code-slash"
317
- hide="#code, #demo-code"
318
- ><i src="/assets/svg/code.svg"></i
319
- ></a>
320
- <a
321
- class="margin-right:10px"
322
- hidden
323
- id="code-slash"
324
- show="#code, #demo-code"
325
- hide="#code-slash"
326
- ><i
327
- class="height:18px"
328
- src="/assets/svg/code.svg"></i
329
- ></a>
330
- <a
331
- class="margin-right:5px"
332
- fullscreen
333
- fullscreen-selector="#playground"></a>
334
- </div>
335
- </div>
336
- <!-- End SandBox -->
337
- </div>
338
- </div>
339
- </div>
340
- <button
341
- href="https://github.com/CoCreate-app/CoCreate-calculate/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
342
- target="_blank"
343
- 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)">
344
- <i class="height:20px" src="../assets/svg/pencil-alt.svg"></i>
345
- </button>
346
- </main>
347
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
348
- </body>
290
+ <div
291
+ class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
292
+ <a
293
+ class="margin-right:10px"
294
+ id="eye"
295
+ show="#eye-slash"
296
+ hide="#eye, #demo-preview"
297
+ toggle="code-height"
298
+ toggle-selector="#demo-code"
299
+ ><i
300
+ class="height:18px"
301
+ src="/assets/svg/eye.svg"></i
302
+ ></a>
303
+ <a
304
+ class="margin-right:10px"
305
+ hidden
306
+ id="eye-slash"
307
+ show="#eye, #demo-preview"
308
+ hide="#eye-slash"
309
+ toggle="code-height"
310
+ toggle-selector="#demo-code"
311
+ ><i src="/assets/svg/eye-slash.svg"></i
312
+ ></a>
313
+ <a
314
+ class="margin-right:10px"
315
+ id="code"
316
+ show="#code-slash"
317
+ hide="#code, #demo-code"
318
+ ><i src="/assets/svg/code.svg"></i
319
+ ></a>
320
+ <a
321
+ class="margin-right:10px"
322
+ hidden
323
+ id="code-slash"
324
+ show="#code, #demo-code"
325
+ hide="#code-slash"
326
+ ><i
327
+ class="height:18px"
328
+ src="/assets/svg/code.svg"></i
329
+ ></a>
330
+ <a
331
+ class="margin-right:5px"
332
+ fullscreen
333
+ fullscreen-selector="#playground"></a>
334
+ </div>
335
+ </div>
336
+ <!-- End SandBox -->
337
+ </div>
338
+ </div>
339
+ </div>
340
+ <button
341
+ href="https://github.com/CoCreate-app/CoCreate-calculate/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
342
+ target="_blank"
343
+ 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)">
344
+ <i src="../assets/svg/pencil-alt.svg"></i>
345
+ </button>
346
+ </main>
347
+ <script src="https://CoCreate.app/dist/CoCreate.js"></script>
348
+ </body>
349
349
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/calculate",
3
- "version": "1.14.7",
3
+ "version": "1.15.0",
4
4
  "description": "A handy vanilla JavaScript calculator, concatenate multiple elements containing integers & execute calculates. Can be used for creating invoices,making payments & any kind of complex calculate. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "calculate",
@@ -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/index.js CHANGED
@@ -33,7 +33,7 @@ function initElement(element) {
33
33
  observer.init({
34
34
  name: 'calculateSelectorInit',
35
35
  observe: ['addedNodes'],
36
- target: selectors[i],
36
+ selector: selectors[i],
37
37
  callback(mutation) {
38
38
  initEvent(element, mutation.target);
39
39
  setCalcationResult(element);
@@ -157,7 +157,7 @@ observer.init({
157
157
  observer.init({
158
158
  name: 'CoCreateCalculateInit',
159
159
  observe: ['addedNodes'],
160
- target: '[calculate]',
160
+ selector: '[calculate]',
161
161
  callback(mutation) {
162
162
  initElement(mutation.target);
163
163
  }