@subiz/widget-v4 4.1.65 → 4.1.67
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/compiled_src/chatbox/TextMessage.js +1 -1
- package/compiled_src/chatbox/Widget.js +5 -4
- package/compiled_src/chatbox/main.js +1 -0
- package/compiled_src/lib.js +8 -1
- package/compiled_src/store/api.js +1 -1
- package/compiled_src/store/store.js +6 -0
- package/dist/132.js +6432 -2567
- package/dist/{278.js → 178.js} +55 -55
- package/dist/18a02a9c54e.132.js +1 -0
- package/dist/18a02a9c54e.178.js +1 -0
- package/dist/18a02a9c54e.213.js +1 -0
- package/dist/18a02a9c54e.335.js +1 -0
- package/dist/18a02a9c54e.362.js +1 -0
- package/dist/18a02a9c54e.441.js +1 -0
- package/dist/18a02a9c54e.605.js +1 -0
- package/dist/18a02a9c54e.678.js +1 -0
- package/dist/18a02a9c54e.782.js +1 -0
- package/dist/18a02a9c54e.app.js +1 -0
- package/dist/{18dd22fb422.index.html → 18a02a9c54e.index.html} +4 -4
- package/dist/{18dd22fb422.library.html → 18a02a9c54e.library.html} +4 -4
- package/dist/18a02a9c54e.library.js +1 -0
- package/dist/{18dd22fb422.preview.html → 18a02a9c54e.preview.html} +1 -1
- package/dist/18a02a9c54e.preview.js +1 -0
- package/dist/18a02a9c54e.screenshoot.js +1 -0
- package/dist/18a02a9c54e.webview.js +1 -0
- package/dist/213.js +2780 -0
- package/dist/{74.js → 335.js} +34 -34
- package/dist/{459.js → 362.js} +7 -7
- package/dist/441.js +2855 -0
- package/dist/{490.js → 605.js} +60 -59
- package/dist/{997.js → 678.js} +6 -6
- package/dist/{27.js → 782.js} +7 -7
- package/dist/HASH +1 -1
- package/dist/malicious-app.js +4 -6
- package/dist/screenshoot.html +1 -1
- package/dist/screenshoot.js +691 -615
- package/package.json +4 -4
- package/src/chatbox/TextMessage.js +1 -1
- package/src/chatbox/Widget.js +5 -8
- package/src/chatbox/main.js +7 -2
- package/src/lib.js +10 -1
- package/src/store/api.js +1 -1
- package/src/store/store.js +5 -0
- package/dist/18dd22fb422.132.js +0 -1
- package/dist/18dd22fb422.27.js +0 -1
- package/dist/18dd22fb422.278.js +0 -1
- package/dist/18dd22fb422.459.js +0 -1
- package/dist/18dd22fb422.490.js +0 -1
- package/dist/18dd22fb422.497.js +0 -1
- package/dist/18dd22fb422.74.js +0 -1
- package/dist/18dd22fb422.997.js +0 -1
- package/dist/18dd22fb422.app.js +0 -1
- package/dist/18dd22fb422.library.js +0 -1
- package/dist/18dd22fb422.preview.js +0 -1
- package/dist/18dd22fb422.screenshoot.js +0 -1
- package/dist/18dd22fb422.webview.js +0 -1
- package/dist/497.js +0 -6685
package/dist/{490.js → 605.js}
RENAMED
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[
|
|
2
|
+
(self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[605],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 9605:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
__webpack_require__.r(__webpack_exports__);
|
|
8
8
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
/* harmony export */ "default": () => (/* binding */ Notif)
|
|
10
10
|
/* harmony export */ });
|
|
11
|
-
/* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
12
|
-
/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
13
|
-
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
11
|
+
/* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4494);
|
|
12
|
+
/* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6400);
|
|
13
|
+
/* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2493);
|
|
14
14
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
-
function _toPropertyKey(
|
|
16
|
-
function _toPrimitive(
|
|
15
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
16
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
17
17
|
|
|
18
18
|
|
|
19
19
|
|
|
20
|
-
let notifCSS = (() => __webpack_require__.e(/* import() */
|
|
21
|
-
class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .
|
|
20
|
+
let notifCSS = (() => __webpack_require__.e(/* import() */ 362).then(__webpack_require__.bind(__webpack_require__, 362)))();
|
|
21
|
+
class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .up {
|
|
22
22
|
constructor(props) {
|
|
23
23
|
super(props);
|
|
24
24
|
_defineProperty(this, "state", {
|
|
@@ -32,19 +32,19 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
32
32
|
title: '',
|
|
33
33
|
last_show: 0
|
|
34
34
|
});
|
|
35
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
35
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(async () => {
|
|
36
36
|
let {
|
|
37
37
|
body: impression
|
|
38
38
|
} = await this.props.store.sendImpression(this.props.plugin.id);
|
|
39
|
-
this.impressionToken = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
40
|
-
let image = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
41
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
39
|
+
this.impressionToken = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(impression, 'impression_token') || '';
|
|
40
|
+
let image = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.background_url');
|
|
41
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(image, () => this.setState({
|
|
42
42
|
imageReady: true
|
|
43
43
|
}));
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
setOver(over) {
|
|
47
|
-
if (!over) this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
47
|
+
if (!over) this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();else this.mouse_leave = 0;
|
|
48
48
|
}
|
|
49
49
|
randomTimestampt() {
|
|
50
50
|
let random = Math.floor(Math.random() * 5);
|
|
@@ -55,12 +55,13 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
55
55
|
return '4 ' + this.props.t('minutes_ago');
|
|
56
56
|
}
|
|
57
57
|
onClick(e) {
|
|
58
|
+
e.stopPropagation();
|
|
58
59
|
if (this.props.plugin._dont_follow) return;
|
|
59
60
|
this.props.store.sendConversion(this.props.plugin.id, null, this.impressionToken);
|
|
60
|
-
let url = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
61
|
+
let url = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.url');
|
|
61
62
|
if (!url) return;
|
|
62
63
|
if (!url.startsWith('http://') && !url.startsWith('https://')) url = '//' + url;
|
|
63
|
-
let new_tab = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
64
|
+
let new_tab = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.new_tab', false);
|
|
64
65
|
if (new_tab) return window.open(url);
|
|
65
66
|
window.location.href = url;
|
|
66
67
|
}
|
|
@@ -97,24 +98,24 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
97
98
|
}
|
|
98
99
|
async waitForT() {
|
|
99
100
|
if (this.props.t) return;
|
|
100
|
-
await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
101
|
+
await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sleep */ .Z.sleep(100);
|
|
101
102
|
return this.waitForT();
|
|
102
103
|
}
|
|
103
104
|
async setClose(close) {
|
|
104
105
|
await this.waitForT();
|
|
105
106
|
if (!this.props.t) return;
|
|
106
107
|
if (!close) {
|
|
107
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
108
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearTimeout */ .Z.clearTimeout(this.lastCloseTimeout);
|
|
108
109
|
this.setState({
|
|
109
110
|
closeAnimation: false
|
|
110
111
|
});
|
|
111
112
|
let timestamp = this.randomTimestampt();
|
|
112
|
-
let profiles = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
113
|
-
let user = profiles[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
113
|
+
let profiles = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.profiles', []);
|
|
114
|
+
let user = profiles[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(profiles))] || {};
|
|
114
115
|
if (user.avatar_url && user.avatar_url.startsWith('http')) {
|
|
115
|
-
await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
116
|
+
await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(user.avatar_url);
|
|
116
117
|
}
|
|
117
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
118
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification.custom_avatar_urls'), url => {
|
|
118
119
|
profiles.push({
|
|
119
120
|
type: 'person',
|
|
120
121
|
fullname: randomName(),
|
|
@@ -125,48 +126,48 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
125
126
|
age: randomAge()
|
|
126
127
|
});
|
|
127
128
|
});
|
|
128
|
-
let i18n_messages = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
129
|
-
let i18n_message = i18n_messages[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
130
|
-
let fallbackmsgs = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
131
|
-
let fallbackmessage = fallbackmsgs[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
132
|
-
let i18n_title = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
129
|
+
let i18n_messages = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_message_quill_deltas', []);
|
|
130
|
+
let i18n_message = i18n_messages[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(i18n_messages))];
|
|
131
|
+
let fallbackmsgs = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.message_quill_deltas', []);
|
|
132
|
+
let fallbackmessage = fallbackmsgs[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(fallbackmsgs))];
|
|
133
|
+
let i18n_title = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_title_quill_delta');
|
|
133
134
|
return this.setState({
|
|
134
135
|
close: false,
|
|
135
|
-
last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
136
|
+
last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now(),
|
|
136
137
|
timestamp: timestamp,
|
|
137
138
|
user: user,
|
|
138
|
-
title: this.props.t.i18n(i18n_title) || _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
139
|
+
title: this.props.t.i18n(i18n_title) || _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.title_quill_delta'),
|
|
139
140
|
message: this.props.t.i18n(i18n_message) || fallbackmessage
|
|
140
141
|
});
|
|
141
142
|
}
|
|
142
143
|
this.setState({
|
|
143
144
|
closeAnimation: true
|
|
144
145
|
});
|
|
145
|
-
this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
146
|
-
this.lastCloseTimeout = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
146
|
+
this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
|
|
147
|
+
this.lastCloseTimeout = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
|
|
147
148
|
close: true,
|
|
148
149
|
closeAnimation: false
|
|
149
150
|
}), 150);
|
|
150
|
-
if (this.props.plugin._dont_close) _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
151
|
+
if (this.props.plugin._dont_close) _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
|
|
151
152
|
closeAnimation: false,
|
|
152
153
|
close: false
|
|
153
154
|
}), 1000);
|
|
154
155
|
}
|
|
155
156
|
async refreshCSS() {
|
|
156
157
|
let plugins = this.props.store.matchPlugin();
|
|
157
|
-
let found = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
158
|
+
let found = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].find */ .Z.find(plugins, plugin => plugin.id === this.props.plugin.id);
|
|
158
159
|
if (!found) return;
|
|
159
160
|
let css = (await notifCSS).default.default.toString();
|
|
160
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
161
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, css);
|
|
161
162
|
this.setClose(this.state.close);
|
|
162
163
|
}
|
|
163
164
|
componentWillUnmount() {
|
|
164
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
165
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
165
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearInterval */ .Z.clearInterval(this.interval);
|
|
166
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
|
|
166
167
|
}
|
|
167
168
|
async componentDidMount() {
|
|
168
169
|
this.setState({
|
|
169
|
-
last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
170
|
+
last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now()
|
|
170
171
|
});
|
|
171
172
|
this.$cssStyleDiv = document.getElementById('subiz-style-for-' + this.props.plugin.id);
|
|
172
173
|
if (!this.$cssStyleDiv) {
|
|
@@ -177,20 +178,20 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
177
178
|
}
|
|
178
179
|
this.props.store.onResetCSS(this, () => this.refreshCSS());
|
|
179
180
|
await this.refreshCSS();
|
|
180
|
-
this.interval = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
181
|
+
this.interval = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setInterval */ .Z.setInterval(() => {
|
|
181
182
|
if (this.props._destroy) return this.componentWillUnmount();
|
|
182
183
|
let mouseleave = this.mouse_leave;
|
|
183
|
-
if (mouseleave === 0) mouseleave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
184
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
184
|
+
if (mouseleave === 0) mouseleave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
|
|
185
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - mouseleave < 1000) return;
|
|
185
186
|
if (!this.state.close && !this.props.plugin._dont_close) {
|
|
186
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
187
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > 8000) return this.setClose(true);
|
|
187
188
|
return;
|
|
188
189
|
}
|
|
189
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
190
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > this.props.plugin.notification.interval_sec) {
|
|
190
191
|
return this.setClose(false);
|
|
191
192
|
}
|
|
192
193
|
}, 1000);
|
|
193
|
-
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
194
|
+
_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => {
|
|
194
195
|
this.setState({
|
|
195
196
|
cssready: true
|
|
196
197
|
});
|
|
@@ -198,21 +199,21 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
198
199
|
}, 50);
|
|
199
200
|
}
|
|
200
201
|
renderTextFromQuillDelta(quilldelta, profile) {
|
|
201
|
-
let qd = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
202
|
+
let qd = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].parseJSON */ .Z.parseJSON(quilldelta);
|
|
202
203
|
if (!qd || !qd.ops) return null;
|
|
203
|
-
let out = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
204
|
+
let out = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(qd.ops, op => {
|
|
204
205
|
let out = null;
|
|
205
206
|
if (!op.insert) return null;
|
|
206
207
|
if (typeof op.insert == 'string') out = op.insert;
|
|
207
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
208
|
-
let key = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
208
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField')) {
|
|
209
|
+
let key = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField.key');
|
|
209
210
|
if (key === 'user.fullname') out = profile.fullname;
|
|
210
211
|
if (key === 'user.email') out = profile.email;
|
|
211
212
|
if (key === 'user.address') out = profile.address;
|
|
212
213
|
if (key === 'user.phone') out = profile.phone;
|
|
213
214
|
}
|
|
214
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
215
|
-
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
215
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.bold')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
|
|
216
|
+
if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.italic')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
|
|
216
217
|
return out;
|
|
217
218
|
}).filter(a => a);
|
|
218
219
|
if (out.length == 1 && (out[0] == '\n' || out[0] == '')) return [];
|
|
@@ -224,11 +225,11 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
224
225
|
if (!this.state.imageReady) return null;
|
|
225
226
|
if (this.state.close) return null;
|
|
226
227
|
if (!this.state.message) return null;
|
|
227
|
-
let notif = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
228
|
+
let notif = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification', {});
|
|
228
229
|
if (!notif) return null;
|
|
229
230
|
let animation = '';
|
|
230
|
-
let pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
231
|
-
if (this.props.mobile) pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
231
|
+
let pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'position', 'bottom-left');
|
|
232
|
+
if (this.props.mobile) pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'mobile_position', pos);
|
|
232
233
|
if (pos === 'top-left' || pos === 'top-right') animation = 'fadeInDown';else if (pos === 'top-center') animation = 'fadeInDownCenter';else if (pos === 'bottom-center') animation = 'fadeInUpCenter';else if (pos === 'bottom-right') {
|
|
233
234
|
animation = 'fadeInUpBig';
|
|
234
235
|
} else {
|
|
@@ -237,7 +238,7 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
237
238
|
}
|
|
238
239
|
let user = this.state.user || {};
|
|
239
240
|
let subtextStyle = notif.subtext_style || {};
|
|
240
|
-
if (subtextStyle.color === undefined) subtextStyle.color = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
241
|
+
if (subtextStyle.color === undefined) subtextStyle.color = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'message_style.color', 'black');
|
|
241
242
|
let st = 'position: fixed !important; z-index: 1000000000 !important';
|
|
242
243
|
if (this.props.plugin._preview) st = 'position: absolute !important;';
|
|
243
244
|
if (this.state.closeAnimation) animation = 'fadeOut';
|
|
@@ -249,11 +250,11 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
249
250
|
});
|
|
250
251
|
let $time = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
251
252
|
class: "notif_time",
|
|
252
|
-
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
253
|
+
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.subtext_style)
|
|
253
254
|
}, this.state.timestamp);
|
|
254
255
|
let $title = this.renderTextFromQuillDelta(this.state.title, user);
|
|
255
256
|
let $message = this.renderTextFromQuillDelta(this.state.message, user);
|
|
256
|
-
if (!_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
257
|
+
if (!_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($title) && !_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($message)) $time = null;
|
|
257
258
|
return (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
258
259
|
class: animation + ' notif' + ' notif__' + pos,
|
|
259
260
|
onClick: e => this.onClick(e),
|
|
@@ -266,18 +267,18 @@ class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .Mw {
|
|
|
266
267
|
alt: "notification background",
|
|
267
268
|
class: "notif_bg",
|
|
268
269
|
src: notif.background_url,
|
|
269
|
-
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
270
|
+
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.background_style)
|
|
270
271
|
}), this.renderCloseButton(), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
271
272
|
class: "notif_avatar",
|
|
272
|
-
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
273
|
+
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.avatar_style)
|
|
273
274
|
}, $avatar), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
274
275
|
class: "notif_body"
|
|
275
276
|
}, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
276
277
|
class: "notif_title",
|
|
277
|
-
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
278
|
+
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.title_style)
|
|
278
279
|
}, $title), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
279
280
|
class: "notif_message",
|
|
280
|
-
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .
|
|
281
|
+
style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.message_style)
|
|
281
282
|
}, $message), $time)));
|
|
282
283
|
}
|
|
283
284
|
}
|
package/dist/{997.js → 678.js}
RENAMED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
(self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[
|
|
2
|
+
(self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[678],{
|
|
3
3
|
|
|
4
|
-
/***/
|
|
4
|
+
/***/ 2678:
|
|
5
5
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
6
6
|
|
|
7
7
|
__webpack_require__.r(__webpack_exports__);
|
|
8
8
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9
9
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
10
10
|
/* harmony export */ });
|
|
11
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__(
|
|
11
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__(3048));
|
|
12
12
|
|
|
13
13
|
/***/ }),
|
|
14
14
|
|
|
15
|
-
/***/
|
|
15
|
+
/***/ 3048:
|
|
16
16
|
/***/ ((module, __webpack_exports__, __webpack_require__) => {
|
|
17
17
|
|
|
18
18
|
__webpack_require__.r(__webpack_exports__);
|
|
19
19
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
20
20
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
21
21
|
/* harmony export */ });
|
|
22
|
-
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
22
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3645);
|
|
23
23
|
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
24
24
|
// Imports
|
|
25
25
|
|
|
@@ -32,7 +32,7 @@ ___CSS_LOADER_EXPORT___.push([module.id, "/*\n#sbz92 * {\n\tall: unset !importan
|
|
|
32
32
|
|
|
33
33
|
/***/ }),
|
|
34
34
|
|
|
35
|
-
/***/
|
|
35
|
+
/***/ 3645:
|
|
36
36
|
/***/ ((module) => {
|
|
37
37
|
|
|
38
38
|
|