@cocreate/selection 1.4.6 → 1.4.9

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.4.9](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.8...v1.4.9) (2022-05-19)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * update document_id on link index.css ([10ef658](https://github.com/CoCreate-app/CoCreate-selection/commit/10ef6585c3168e8c6cb95a9c8f8edf9b96e4809e))
7
+
8
+ ## [1.4.8](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.7...v1.4.8) (2022-05-06)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * update config organization_Id to organization_id ([e32a5a8](https://github.com/CoCreate-app/CoCreate-selection/commit/e32a5a827463d1051a8867e3b045b969ae01f8a8))
14
+
15
+ ## [1.4.7](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.6...v1.4.7) (2022-03-24)
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * if insert position is beforeend and the previousSibling is a textnode type=textNode ([031eac5](https://github.com/CoCreate-app/CoCreate-selection/commit/031eac52fdada4eb54675e64a07394a92c616b6e))
21
+ * typo if condition ended with ; and type updated to position for afterbegin ([b916009](https://github.com/CoCreate-app/CoCreate-selection/commit/b91600977f60c43071b06dc66e6ef48ab7fcfc34))
22
+
1
23
  ## [1.4.6](https://github.com/CoCreate-app/CoCreate-selection/compare/v1.4.5...v1.4.6) (2022-02-24)
2
24
 
3
25
 
@@ -1,7 +1,7 @@
1
1
  module.exports = {
2
2
  "config": {
3
3
  "apiKey": "2061acef-0451-4545-f754-60cf8160",
4
- "organization_Id": "5ff747727005da1c272740ab",
4
+ "organization_id": "5ff747727005da1c272740ab",
5
5
  "host": "general.cocreate.app"
6
6
  },
7
7
 
package/demo/index.html CHANGED
@@ -15,7 +15,7 @@
15
15
  <script>
16
16
  var config = {
17
17
  apiKey: '',
18
- organization_Id: '',
18
+ organization_id: '',
19
19
  host: ''
20
20
  }
21
21
  </script>
package/docs/index.html CHANGED
@@ -10,7 +10,7 @@
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
12
 
13
- <link rel="stylesheet" href="/docs/index.css" collection="files" document_id="60888216117c640e7596303f" name="src" type="text/css" save="true" />
13
+ <link rel="stylesheet" href="/docs/index.css" collection="files" document_id="62827d7e8082ce05b081430b" name="src" type="text/css" save="true" />
14
14
 
15
15
  </head>
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cocreate/selection",
3
- "version": "1.4.6",
3
+ "version": "1.4.9",
4
4
  "description": "A simple selection component in vanilla javascript. Easily configured using HTML5 data-attributes and/or JavaScript API.",
5
5
  "keywords": [
6
6
  "selection",
package/src/index.js CHANGED
@@ -188,10 +188,13 @@ export function getElementPosition(str, start, end) {
188
188
  element = insert.target;
189
189
  position = insert.position;
190
190
  type = 'insertAdjacent';
191
- if(!position)
191
+ if (!position)
192
192
  type = 'textNode';
193
- if (type == 'textNode' || type == 'afterbegin');
193
+ if (position == 'beforeend' && findEl.previousSibling && findEl.previousSibling.nodeType == 3 )
194
+ type = 'textNode';
195
+ if (type == 'textNode' || position == 'afterbegin')
194
196
  nodeStart = start - angleEnd - 1;
197
+
195
198
  findEl.remove();
196
199
  }
197
200
  }