@cocreate/calculate 1.14.6 → 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,25 @@
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
+
15
+ ## [1.14.7](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.6...v1.14.7) (2024-06-12)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * bump cocreate dependencies ([d7b59b6](https://github.com/CoCreate-app/CoCreate-calculate/commit/d7b59b6046e02a1772964634b4425fd2a1ae260f))
21
+ * svg icon class ([08f7126](https://github.com/CoCreate-app/CoCreate-calculate/commit/08f7126c16e9a09ea909eef469ed79dfc29d1380))
22
+
1
23
  ## [1.14.6](https://github.com/CoCreate-app/CoCreate-calculate/compare/v1.14.5...v1.14.6) (2024-04-29)
2
24
 
3
25
 
package/docs/index.html CHANGED
@@ -1,373 +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
85
- class="height:20px fill:#505050"
86
- src="/assets/svg/twitter.svg"></i
87
- ></a>
88
- <a
89
- class="margin-right:15px"
90
- share-network="facebook"
91
- title="Share on Facebook"
92
- ><i
93
- class="height:20px fill:#505050"
94
- src="/assets/svg/facebook.svg"></i
95
- ></a>
96
- <a
97
- class="margin-right:15px"
98
- share-network="instagram"
99
- title="Share on instagram"
100
- ><i
101
- class="height:20px fill:#505050"
102
- src="/assets/svg/instagram.svg"></i
103
- ></a>
104
- </div>
105
- <a
106
- class="margin-right:15px"
107
- share-network="share"
108
- title="Share on share"
109
- ><i
110
- class="height:20px fill:#505050"
111
- src="/assets/svg/share-alt.svg"></i
112
- ></a>
113
- </div>
114
- <a
115
- class="margin-right:15px"
116
- share-network="share"
117
- title="Share on share"
118
- ><i
119
- class="height:20px fill:#505050"
120
- src="/assets/svg/share-alt.svg"></i
121
- ></a>
122
- </div>
123
- <a
124
- href="https://github.com/CoCreate-app/CoCreate-calculate"
125
- target="_blank"
126
- class="margin-right:15px"
127
- ><i
128
- class="height:20px fill:#505050"
129
- src="/assets/svg/github.svg"></i
130
- ></a>
131
- </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>
132
120
 
133
- <h1
134
- class="max-width:500px margin:20px_10px line-height:1.5 font-size:16px font-weight:100">
135
- A handy vanilla JavaScript calculator, concatenate multiple
136
- elements containing integers &amp; execute calculate. Can be
137
- used for creating invoices,making payments &amp; any kind of
138
- complex calculate. Easily configured using HTML5 attributes
139
- and/or JavaScript API.
140
- </h1>
141
- <div id="calculate-section" class="display:flex flex-wrap:wrap">
142
- <div
143
- class="flex-grow:1 width:400px width:300px@xs padding:0px_10px margin-top:60px">
144
- <div
145
- id="calculate-install"
146
- class="border-bottom:1px_solid_lightgrey"
147
- scroll
148
- scroll-intersect="color:dodgerblue"
149
- scroll-selector="#calculate-install-section">
150
- <span
151
- class="display:flex align-items:center width:fit-content"
152
- hover="display:block!important"
153
- hover-selector="[href='#calculate-install']">
154
- <h2 class="padding:5px_0px">Install</h2>
155
- <a
156
- class="margin-left:10px display:none"
157
- href="#calculate-install"
158
- ><i
159
- class="height:20px fill:#505050"
160
- src="/assets/svg/link.svg"></i
161
- ></a>
162
- </span>
163
- </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>
164
150
 
165
- <pre><code class="language-bash">npm i @cocreate/calculate</code></pre>
166
- <p class="padding:10px_0px line-height:1.5">
167
- Or you can use cdn link:
168
- </p>
169
- <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>
170
156
 
171
- <div
172
- id="calculate-usage"
173
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
174
- scroll
175
- scroll-intersect="color:dodgerblue"
176
- scroll-selector="#calculate-usage-section">
177
- <span
178
- class="display:flex align-items:center width:fit-content"
179
- hover="display:block!important"
180
- hover-selector="[href='#calculate-usage']">
181
- <h2 class="padding:5px_0px">Usage</h2>
182
- <a
183
- class="margin-left:10px display:none"
184
- href="#calculate-usage"
185
- ><i
186
- class="height:20px fill:#505050"
187
- src="/assets/svg/link.svg"></i
188
- ></a>
189
- </span>
190
- </div>
191
- <div class="">
192
- <p class="padding:10px_0px line-height:1.5">
193
- This is calculate usage
194
- </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>
195
179
 
196
- <div class="flex-grow:1 min-width:300px width:100%">
197
- <pre><code class="language-html">&lt;div&gt;&lt;/div&gt;</code></pre>
198
- </div>
199
- <p class="padding:10px_0px line-height:1.5">
200
- This is calculate usage
201
- </p>
202
- <p class="padding:10px_0px line-height:1.5">
203
- This is calculate usage
204
- </p>
205
- </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>
206
190
 
207
- <div
208
- id="calculate-attributes"
209
- class="margin-top:80px border-bottom:1px_solid_lightgrey"
210
- scroll
211
- scroll-intersect="color:dodgerblue"
212
- scroll-selector="#calculate-attributes-section">
213
- <span
214
- class="display:flex align-items:center width:fit-content"
215
- hover="display:block!important"
216
- hover-selector="[href='#calculate-attributes']">
217
- <h2 class="padding:5px_0px">Attributes</h2>
218
- <a
219
- class="margin-left:10px display:none"
220
- href="#calculate-attributes"
221
- ><i
222
- class="height:20px fill:#505050"
223
- src="/assets/svg/link.svg"></i
224
- ></a>
225
- </span>
226
- </div>
227
- <ul class="list-style-type:none">
228
- <li
229
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
230
- <h4>
231
- <span>calculates</span>
232
- <span class="cocreate-badge success"
233
- >string</span
234
- >
235
- <span class="cocreate-badge warning"
236
- >optional</span
237
- >
238
- </h4>
239
- <p>calculate-attribute</p>
240
- </li>
241
- <li
242
- class="padding:15px_0px border-bottom:1px_solid_lightgrey">
243
- <h4>
244
- <span>calculates</span>
245
- <span class="cocreate-badge success"
246
- >string</span
247
- >
248
- <span class="cocreate-badge warning"
249
- >optional</span
250
- >
251
- </h4>
252
- <p>calculate-attribute</p>
253
- </li>
254
- </ul>
255
- </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>
256
238
 
257
- <div
258
- class="flex-grow:1 width:300px padding:0px_10px margin-top:60px border-bottom:1px_solid_lightgrey">
259
- <!-- SandBox -->
260
- <div
261
- id="calculate-demo"
262
- class="border-bottom:1px_solid_lightgrey"
263
- scroll
264
- scroll-intersect="color:dodgerblue"
265
- scroll-selector="#calculate-demo-section">
266
- <span
267
- class="display:flex align-items:center width:fit-content"
268
- hover="display:block!important"
269
- hover-selector="[href='#calculate-demo']">
270
- <h2 class="padding:5px_0px">Demo</h2>
271
- <a
272
- class="margin-left:10px display:none"
273
- href="#calculate-demo"
274
- ><i
275
- class="height:20px fill:#505050"
276
- src="/assets/svg/link.svg"></i
277
- ></a>
278
- </span>
279
- </div>
280
- <div
281
- class="position:sticky top:0 padding:15px_0px height:100vh">
282
- <!-- SandBox -->
283
- <div
284
- class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
285
- id="playground">
286
- <div
287
- id="demo-code"
288
- resizable
289
- class="position:relative height:50%">
290
- <textarea
291
- type="code"
292
- lang="html"
293
- array="demos"
294
- object=""
295
- key="demo"
296
- save="false"
297
- id="demo"
298
- class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
299
- <div
300
- resize="bottom"
301
- class="background:lightgrey"></div>
302
- </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>
303
283
 
304
- <div
305
- id="demo-preview"
306
- class="position:relative overflow:auto background-color:white">
307
- <div class="demopreview padding:20px"></div>
308
- </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>
309
289
 
310
- <div
311
- class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
312
- <a
313
- class="margin-right:10px"
314
- id="eye"
315
- show="#eye-slash"
316
- hide="#eye, #demo-preview"
317
- toggle="code-height"
318
- toggle-selector="#demo-code"
319
- ><i
320
- class="height:18px fill:#505050"
321
- src="/assets/svg/eye.svg"></i
322
- ></a>
323
- <a
324
- class="margin-right:10px"
325
- hidden
326
- id="eye-slash"
327
- show="#eye, #demo-preview"
328
- hide="#eye-slash"
329
- toggle="code-height"
330
- toggle-selector="#demo-code"
331
- ><i
332
- class="height:20px fill:#505050"
333
- src="/assets/svg/eye-slash.svg"></i
334
- ></a>
335
- <a
336
- class="margin-right:10px"
337
- id="code"
338
- show="#code-slash"
339
- hide="#code, #demo-code"
340
- ><i
341
- class="height:20px fill:#505050"
342
- src="/assets/svg/code.svg"></i
343
- ></a>
344
- <a
345
- class="margin-right:10px"
346
- hidden
347
- id="code-slash"
348
- show="#code, #demo-code"
349
- hide="#code-slash"
350
- ><i
351
- class="display:flex height:18px fill:#505050"
352
- src="/assets/svg/code.svg"></i
353
- ></a>
354
- <a
355
- class="margin-right:5px"
356
- fullscreen
357
- fullscreen-selector="#playground"></a>
358
- </div>
359
- </div>
360
- <!-- End SandBox -->
361
- </div>
362
- </div>
363
- </div>
364
- <button
365
- href="https://github.com/CoCreate-app/CoCreate-calculate/tree/master/docs/index.html?message=docs%3A%20describe%20your%20change..."
366
- target="_blank"
367
- 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)">
368
- <i class="height:20px" src="../assets/svg/pencil-alt.svg"></i>
369
- </button>
370
- </main>
371
- <script src="https://CoCreate.app/dist/CoCreate.js"></script>
372
- </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>
373
349
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/calculate",
3
- "version": "1.14.6",
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",
@@ -59,8 +59,8 @@
59
59
  "webpack-log": "^3.0.1"
60
60
  },
61
61
  "dependencies": {
62
- "@cocreate/element-prototype": "^1.22.2",
63
- "@cocreate/observer": "^1.16.0",
64
- "@cocreate/utils": "^1.33.6"
62
+ "@cocreate/element-prototype": "^1.23.0",
63
+ "@cocreate/observer": "^1.16.1",
64
+ "@cocreate/utils": "^1.33.7"
65
65
  }
66
66
  }
@@ -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
  }