@hellotext/hellotext 2.0.7 → 2.0.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/dist/hellotext.js +1 -1
- package/lib/models/session.cjs +2 -7
- package/lib/models/session.js +2 -7
- package/package.json +2 -2
- package/src/models/session.js +3 -7
package/lib/models/session.cjs
CHANGED
|
@@ -34,13 +34,8 @@ let Session = /*#__PURE__*/function () {
|
|
|
34
34
|
key: "initialize",
|
|
35
35
|
value: function initialize() {
|
|
36
36
|
_classPrivateFieldLooseBase(this, _query)[_query] = new _query2.Query();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
} else if (_classPrivateFieldLooseBase(this, _query)[_query].session) {
|
|
40
|
-
this.session = _classPrivateFieldLooseBase(this, _query)[_query].session;
|
|
41
|
-
} else if (_cookies.Cookies.get('hello_session')) {
|
|
42
|
-
this.session = _cookies.Cookies.get('hello_session');
|
|
43
|
-
} else if (_core.Configuration.autoGenerateSession) {
|
|
37
|
+
this.session = _core.Configuration.session || _classPrivateFieldLooseBase(this, _query)[_query].session || _cookies.Cookies.get('hello_session');
|
|
38
|
+
if (!this.session && _core.Configuration.autoGenerateSession) {
|
|
44
39
|
this.session = crypto.randomUUID();
|
|
45
40
|
}
|
|
46
41
|
}
|
package/lib/models/session.js
CHANGED
|
@@ -28,13 +28,8 @@ var Session = /*#__PURE__*/function () {
|
|
|
28
28
|
key: "initialize",
|
|
29
29
|
value: function initialize() {
|
|
30
30
|
_classPrivateFieldLooseBase(this, _query)[_query] = new Query();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} else if (_classPrivateFieldLooseBase(this, _query)[_query].session) {
|
|
34
|
-
this.session = _classPrivateFieldLooseBase(this, _query)[_query].session;
|
|
35
|
-
} else if (Cookies.get('hello_session')) {
|
|
36
|
-
this.session = Cookies.get('hello_session');
|
|
37
|
-
} else if (Configuration.autoGenerateSession) {
|
|
31
|
+
this.session = Configuration.session || _classPrivateFieldLooseBase(this, _query)[_query].session || Cookies.get('hello_session');
|
|
32
|
+
if (!this.session && Configuration.autoGenerateSession) {
|
|
38
33
|
this.session = crypto.randomUUID();
|
|
39
34
|
}
|
|
40
35
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hellotext/hellotext",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
4
4
|
"description": "Hellotext JavaScript Client",
|
|
5
5
|
"source": "src/index.js",
|
|
6
6
|
"main": "lib/index.cjs",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"url": "https://github.com/hellotext/hellotext.js/issues"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
|
-
"@floating-ui/dom": "^1.
|
|
94
|
+
"@floating-ui/dom": "^1.7.3",
|
|
95
95
|
"@hotwired/stimulus": "^3.0.0",
|
|
96
96
|
"emoji-mart": "^5.6.0"
|
|
97
97
|
},
|
package/src/models/session.js
CHANGED
|
@@ -18,13 +18,9 @@ class Session {
|
|
|
18
18
|
static initialize() {
|
|
19
19
|
this.#query = new Query()
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
this.session = this.#query.session
|
|
25
|
-
} else if (Cookies.get('hello_session')) {
|
|
26
|
-
this.session = Cookies.get('hello_session')
|
|
27
|
-
} else if (Configuration.autoGenerateSession) {
|
|
21
|
+
this.session = Configuration.session || this.#query.session || Cookies.get('hello_session')
|
|
22
|
+
|
|
23
|
+
if (!this.session && Configuration.autoGenerateSession) {
|
|
28
24
|
this.session = crypto.randomUUID()
|
|
29
25
|
}
|
|
30
26
|
}
|