@cocreate/text 1.12.17 → 1.12.21

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,31 @@
1
+ ## [1.12.21](https://github.com/CoCreate-app/CoCreate-text/compare/v1.12.20...v1.12.21) (2021-11-20)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * updated script tags and link tags ([41f079d](https://github.com/CoCreate-app/CoCreate-text/commit/41f079df5ff8262f032c665a38c9e7682f54385b))
7
+
8
+ ## [1.12.20](https://github.com/CoCreate-app/CoCreate-text/compare/v1.12.19...v1.12.20) (2021-11-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update dependencies ([733fdd6](https://github.com/CoCreate-app/CoCreate-text/commit/733fdd6591ed570b829b85fe319f32ae779e85f8))
14
+
15
+ ## [1.12.19](https://github.com/CoCreate-app/CoCreate-text/compare/v1.12.18...v1.12.19) (2021-11-18)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * update dependencies ([1ff9e1c](https://github.com/CoCreate-app/CoCreate-text/commit/1ff9e1c5fe2e28393015c59c1c71a8e5fe445da0))
21
+
22
+ ## [1.12.18](https://github.com/CoCreate-app/CoCreate-text/compare/v1.12.17...v1.12.18) (2021-11-17)
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * return if input.type == number... number does not support range text ([6b8a00f](https://github.com/CoCreate-app/CoCreate-text/commit/6b8a00fd1bca5bf9082b3a1c6e25440e79ace5e8))
28
+
1
29
  ## [1.12.17](https://github.com/CoCreate-app/CoCreate-text/compare/v1.12.16...v1.12.17) (2021-11-16)
2
30
 
3
31
 
package/docs/index.html CHANGED
@@ -9,22 +9,8 @@
9
9
  <meta name="description" content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
10
10
  <meta name="keywords" content="helper classes, utility classes, css framework, css library, inline style classes" />
11
11
  <meta name="robots" content="index,follow" />
12
-
13
- <!-- CoCreate CSS -->
14
- <link rel="stylesheet" href="https://cdn.cocreate.app/latest/CoCreate.min.css" type="text/css" />
15
-
16
- <!-- Font Awesome -->
17
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" crossorigin="anonymous" />
18
-
19
- <!-- Codemirror -->
20
- <link rel="stylesheet" href="https://server.cocreate.app/CoCreate-plugins/CoCreate-codemirror/src/CoCreate-codemirror.css" type="text/css" />
21
- <link rel=stylesheet href="https://codemirror.net/lib/codemirror.css" async defer>
22
-
23
- <!-- Highlight.js-->
24
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/styles/default.min.css">
25
-
26
- <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.10/highlight.min.js"></script>
27
- <script>hljs.initHighlightingOnLoad();</script>
12
+ <meta property="og:image" content="https://cdn.cocreate.app/docs/boilerplate.png">
13
+ <link rel="stylesheet" href="/docs/index.css" collection="files" document_id="60888216117c640e7596303f" name="src" type="text/css" save="true"/>
28
14
  </head>
29
15
 
30
16
  <body>
@@ -127,19 +113,8 @@
127
113
 
128
114
  </div>
129
115
  </div>
130
- <script>
131
- var config = {
132
- apiKey: 'c2b08663-06e3-440c-ef6f-13978b42883a',
133
- securityKey: 'f26baf68-e3a9-45fc-effe-502e47116265',
134
- organization_Id: '5de0387b12e200ea63204d6c'
135
- }
136
- </script>
137
-
138
- <!--CoCreateJS-->
139
- <script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
140
-
141
- <!-- CoCreate CodeMiirror -->
142
- <script type="text/javascript" src="https://server.cocreate.app/CoCreate-plugins/CoCreate-codemirror/dist/CoCreate-codemirror.js" async></script>
143
116
 
117
+ <script src="/apikey.js"></script>
118
+ <script src="https://cdn.cocreate.app/latest/CoCreate.min.js" ></script>
144
119
  </body>
145
120
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/text",
3
- "version": "1.12.17",
3
+ "version": "1.12.21",
4
4
  "description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "text",
@@ -61,13 +61,13 @@
61
61
  "webpack-log": "^3.0.1"
62
62
  },
63
63
  "dependencies": {
64
- "@cocreate/action": "^1.3.12",
65
- "@cocreate/crdt": "^1.8.14",
66
- "@cocreate/crud-client": "^1.4.25",
67
- "@cocreate/cursors": "^1.10.7",
68
- "@cocreate/docs": "^1.2.50",
69
- "@cocreate/hosting": "^1.2.45",
70
- "@cocreate/observer": "^1.3.42",
71
- "@cocreate/selection": "^1.2.6"
64
+ "@cocreate/action": "^1.3.15",
65
+ "@cocreate/crdt": "^1.8.17",
66
+ "@cocreate/crud-client": "^1.4.29",
67
+ "@cocreate/cursors": "^1.10.9",
68
+ "@cocreate/docs": "^1.2.53",
69
+ "@cocreate/hosting": "^1.2.48",
70
+ "@cocreate/observer": "^1.3.45",
71
+ "@cocreate/selection": "^1.2.9"
72
72
  }
73
73
  }
package/src/index.js CHANGED
@@ -26,7 +26,7 @@ function initElements (elements) {
26
26
  function initElement (element) {
27
27
  const { collection, document_id, name, isRealtime, isCrdt, isCrud, isSave, isRead } = crud.getAttr(element);
28
28
  if(document_id == "pending") return;
29
- if(isCrdt == "false" || isRealtime == "false") return;
29
+ if(isCrdt == "false" || isRealtime == "false" || element.type == 'number') return;
30
30
  if(!crud.checkAttrValue(collection) && !crud.checkAttrValue(document_id)) return;
31
31
  if(element.tagName === "INPUT" && ["text", "email", "tel", "url"].includes(element.type) || element.tagName === "TEXTAREA" || element.hasAttribute('contenteditable')) {
32
32
  if(!collection || !document_id || !name) return;
@@ -250,7 +250,7 @@ async function updateElement ({element, collection, document_id, name, value, st
250
250
  }
251
251
 
252
252
  function _updateElementText (element, value, start, end) {
253
- if (element.tagName == 'HTML') return;
253
+ if (element.tagName == 'HTML' || element.type == 'number') return;
254
254
  let prev_start = element.selectionStart;
255
255
  let prev_end = element.selectionEnd;
256
256
  let activeElement = element.ownerDocument.activeElement;