@seamly/web-ui 19.0.0 → 19.1.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/package.json +1 -1
- package/src/javascripts/api/errors/seamly-base-error.js +10 -0
- package/src/javascripts/api/errors/seamly-configuration-error.js +4 -6
- package/src/javascripts/api/errors/seamly-general-error.js +4 -6
- package/src/javascripts/api/errors/seamly-offline-error.js +4 -6
- package/src/javascripts/api/errors/seamly-session-expired-error.js +4 -6
- package/src/javascripts/api/errors/seamly-unauthorized-error.js +4 -6
- package/src/javascripts/api/errors/seamly-unavailable-error.js +17 -0
- package/src/javascripts/api/index.js +10 -11
- package/src/javascripts/domains/app/actions.js +27 -17
- package/src/javascripts/domains/app/index.js +2 -1
- package/src/javascripts/domains/config/reducer.js +1 -0
- package/src/javascripts/domains/config/selectors.js +1 -1
- package/src/javascripts/domains/errors/index.js +32 -0
- package/src/javascripts/domains/i18n/reducer.js +6 -0
- package/src/javascripts/domains/interrupt/middleware.js +2 -0
- package/src/javascripts/domains/interrupt/reducer.js +10 -9
- package/src/javascripts/domains/store/index.js +6 -1
- package/src/javascripts/domains/store/state-reducer.js +10 -6
- package/src/javascripts/domains/visibility/actions.js +73 -0
- package/src/javascripts/domains/visibility/constants.js +8 -0
- package/src/javascripts/domains/visibility/hooks.js +24 -0
- package/src/javascripts/domains/visibility/index.js +8 -0
- package/src/javascripts/domains/visibility/reducer.js +19 -0
- package/src/javascripts/domains/visibility/selectors.js +9 -0
- package/src/javascripts/domains/visibility/utils.js +42 -0
- package/src/javascripts/index.js +3 -12
- package/src/javascripts/lib/engine/index.js +1 -0
- package/src/javascripts/lib/redux-helpers/index.js +1 -5
- package/src/javascripts/style-guide/components/app.js +1 -1
- package/src/javascripts/style-guide/components/static-core.js +5 -0
- package/src/javascripts/style-guide/states.js +48 -21
- package/src/javascripts/ui/components/conversation/conversation.js +2 -2
- package/src/javascripts/ui/components/conversation/event/hooks/use-text-rendering.js +1 -8
- package/src/javascripts/ui/components/conversation/event/text.js +19 -13
- package/src/javascripts/ui/components/core/seamly-core.js +3 -0
- package/src/javascripts/ui/components/core/seamly-event-subscriber.js +3 -3
- package/src/javascripts/ui/components/core/seamly-initializer.js +2 -6
- package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +2 -3
- package/src/javascripts/ui/components/core/seamly-new-notifications.js +2 -2
- package/src/javascripts/ui/components/core/seamly-read-state.js +2 -2
- package/src/javascripts/ui/components/entry/toggle-button.js +2 -2
- package/src/javascripts/ui/components/layout/agent-info.js +2 -2
- package/src/javascripts/ui/components/layout/app-frame.js +2 -3
- package/src/javascripts/ui/components/layout/chat-frame.js +2 -2
- package/src/javascripts/ui/components/layout/modal-wrapper.js +3 -6
- package/src/javascripts/ui/components/layout/view.js +3 -6
- package/src/javascripts/ui/hooks/seamly-hooks.js +0 -2
- package/src/javascripts/ui/hooks/use-seamly-chat.js +3 -5
- package/src/javascripts/ui/hooks/use-seamly-commands.js +7 -29
- package/src/javascripts/ui/hooks/use-seamly-idle-detach-countdown.js +2 -2
- package/src/javascripts/ui/utils/general-utils.js +0 -9
- package/src/javascripts/ui/utils/seamly-utils.js +0 -66
- package/build/dist/lib/components.js +0 -62
- package/build/dist/lib/components.min.js +0 -1
- package/build/dist/lib/config.js +0 -51
- package/build/dist/lib/config.min.js +0 -1
- package/build/dist/lib/contexts.js +0 -53
- package/build/dist/lib/contexts.min.js +0 -1
- package/build/dist/lib/hooks.js +0 -64
- package/build/dist/lib/hooks.min.js +0 -1
- package/build/dist/lib/index.debug.js +0 -3113
- package/build/dist/lib/index.debug.min.js +0 -2
- package/build/dist/lib/index.debug.min.js.LICENSE.txt +0 -1099
- package/build/dist/lib/index.js +0 -25907
- package/build/dist/lib/index.min.js +0 -2
- package/build/dist/lib/index.min.js.LICENSE.txt +0 -14
- package/build/dist/lib/standalone.js +0 -34806
- package/build/dist/lib/standalone.min.js +0 -2
- package/build/dist/lib/standalone.min.js.LICENSE.txt +0 -9
- package/build/dist/lib/storage.js +0 -275
- package/build/dist/lib/storage.min.js +0 -2
- package/build/dist/lib/storage.min.js.LICENSE.txt +0 -1
- package/build/dist/lib/style-guide.js +0 -8097
- package/build/dist/lib/style-guide.min.js +0 -1
- package/build/dist/lib/styles.css +0 -1
- package/build/dist/lib/styles.js +0 -1
- package/build/dist/lib/utils.js +0 -59
- package/build/dist/lib/utils.min.js +0 -1
- package/src/javascripts/ui/hooks/use-seamly-stored-visibility.js +0 -31
- package/src/javascripts/ui/hooks/use-seamly-visibility.js +0 -98
|
@@ -1,275 +0,0 @@
|
|
|
1
|
-
/******/ (() => { // webpackBootstrap
|
|
2
|
-
/******/ "use strict";
|
|
3
|
-
/******/ // The require scope
|
|
4
|
-
/******/ var __webpack_require__ = {};
|
|
5
|
-
/******/
|
|
6
|
-
/************************************************************************/
|
|
7
|
-
/******/ /* webpack/runtime/define property getters */
|
|
8
|
-
/******/ (() => {
|
|
9
|
-
/******/ // define getter functions for harmony exports
|
|
10
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
11
|
-
/******/ for(var key in definition) {
|
|
12
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
13
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
14
|
-
/******/ }
|
|
15
|
-
/******/ }
|
|
16
|
-
/******/ };
|
|
17
|
-
/******/ })();
|
|
18
|
-
/******/
|
|
19
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
20
|
-
/******/ (() => {
|
|
21
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
22
|
-
/******/ })();
|
|
23
|
-
/******/
|
|
24
|
-
/******/ /* webpack/runtime/make namespace object */
|
|
25
|
-
/******/ (() => {
|
|
26
|
-
/******/ // define __esModule on exports
|
|
27
|
-
/******/ __webpack_require__.r = (exports) => {
|
|
28
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
29
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
30
|
-
/******/ }
|
|
31
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
32
|
-
/******/ };
|
|
33
|
-
/******/ })();
|
|
34
|
-
/******/
|
|
35
|
-
/************************************************************************/
|
|
36
|
-
var __webpack_exports__ = {};
|
|
37
|
-
// ESM COMPAT FLAG
|
|
38
|
-
__webpack_require__.r(__webpack_exports__);
|
|
39
|
-
|
|
40
|
-
// EXPORTS
|
|
41
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
42
|
-
"appStorageProvider": () => (/* reexport */ appStore),
|
|
43
|
-
"cookieStorageProvider": () => (/* reexport */ cookieStore),
|
|
44
|
-
"sessionStorageProvider": () => (/* reexport */ store)
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/app-storage.js
|
|
48
|
-
function appStore() {
|
|
49
|
-
return {
|
|
50
|
-
get: () => {
|
|
51
|
-
// For Android we can retrieve data directly over the bridge
|
|
52
|
-
// iOS and ReactNative will write the data on the window.seamlyBridgeData object on init
|
|
53
|
-
if (window.hasOwnProperty('SeamlyBridge')) {
|
|
54
|
-
try {
|
|
55
|
-
// eslint-disable-next-line no-undef
|
|
56
|
-
return JSON.parse(SeamlyBridge.getData());
|
|
57
|
-
} catch (e) {
|
|
58
|
-
console.error('Unexpected or malformed data retrieved from bridge', e); // Android should always return unchanged JSON data.
|
|
59
|
-
// If something went wrong parsing the response, it's best to start from scratch
|
|
60
|
-
|
|
61
|
-
return {};
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return window.seamlyBridgeData;
|
|
66
|
-
},
|
|
67
|
-
set: newData => {
|
|
68
|
-
// iOS
|
|
69
|
-
if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.seamlyBridge) {
|
|
70
|
-
window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(newData));
|
|
71
|
-
} // Android
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if (window.hasOwnProperty('SeamlyBridge')) {
|
|
75
|
-
// eslint-disable-next-line no-undef
|
|
76
|
-
SeamlyBridge.setData(JSON.stringify(newData));
|
|
77
|
-
} // React Native
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
if (window.ReactNativeWebView) {
|
|
81
|
-
window.ReactNativeWebView.postMessage(JSON.stringify(newData));
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
;// CONCATENATED MODULE: ./node_modules/js-cookie/dist/js.cookie.mjs
|
|
87
|
-
/*! js-cookie v3.0.1 | MIT */
|
|
88
|
-
/* eslint-disable no-var */
|
|
89
|
-
function js_cookie_assign (target) {
|
|
90
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
91
|
-
var source = arguments[i];
|
|
92
|
-
for (var key in source) {
|
|
93
|
-
target[key] = source[key];
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
return target
|
|
97
|
-
}
|
|
98
|
-
/* eslint-enable no-var */
|
|
99
|
-
|
|
100
|
-
/* eslint-disable no-var */
|
|
101
|
-
var defaultConverter = {
|
|
102
|
-
read: function (value) {
|
|
103
|
-
if (value[0] === '"') {
|
|
104
|
-
value = value.slice(1, -1);
|
|
105
|
-
}
|
|
106
|
-
return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent)
|
|
107
|
-
},
|
|
108
|
-
write: function (value) {
|
|
109
|
-
return encodeURIComponent(value).replace(
|
|
110
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
111
|
-
decodeURIComponent
|
|
112
|
-
)
|
|
113
|
-
}
|
|
114
|
-
};
|
|
115
|
-
/* eslint-enable no-var */
|
|
116
|
-
|
|
117
|
-
/* eslint-disable no-var */
|
|
118
|
-
|
|
119
|
-
function init (converter, defaultAttributes) {
|
|
120
|
-
function set (key, value, attributes) {
|
|
121
|
-
if (typeof document === 'undefined') {
|
|
122
|
-
return
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
attributes = js_cookie_assign({}, defaultAttributes, attributes);
|
|
126
|
-
|
|
127
|
-
if (typeof attributes.expires === 'number') {
|
|
128
|
-
attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
|
|
129
|
-
}
|
|
130
|
-
if (attributes.expires) {
|
|
131
|
-
attributes.expires = attributes.expires.toUTCString();
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
key = encodeURIComponent(key)
|
|
135
|
-
.replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent)
|
|
136
|
-
.replace(/[()]/g, escape);
|
|
137
|
-
|
|
138
|
-
var stringifiedAttributes = '';
|
|
139
|
-
for (var attributeName in attributes) {
|
|
140
|
-
if (!attributes[attributeName]) {
|
|
141
|
-
continue
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
stringifiedAttributes += '; ' + attributeName;
|
|
145
|
-
|
|
146
|
-
if (attributes[attributeName] === true) {
|
|
147
|
-
continue
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
// Considers RFC 6265 section 5.2:
|
|
151
|
-
// ...
|
|
152
|
-
// 3. If the remaining unparsed-attributes contains a %x3B (";")
|
|
153
|
-
// character:
|
|
154
|
-
// Consume the characters of the unparsed-attributes up to,
|
|
155
|
-
// not including, the first %x3B (";") character.
|
|
156
|
-
// ...
|
|
157
|
-
stringifiedAttributes += '=' + attributes[attributeName].split(';')[0];
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
return (document.cookie =
|
|
161
|
-
key + '=' + converter.write(value, key) + stringifiedAttributes)
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
function get (key) {
|
|
165
|
-
if (typeof document === 'undefined' || (arguments.length && !key)) {
|
|
166
|
-
return
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
// To prevent the for loop in the first place assign an empty array
|
|
170
|
-
// in case there are no cookies at all.
|
|
171
|
-
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
|
172
|
-
var jar = {};
|
|
173
|
-
for (var i = 0; i < cookies.length; i++) {
|
|
174
|
-
var parts = cookies[i].split('=');
|
|
175
|
-
var value = parts.slice(1).join('=');
|
|
176
|
-
|
|
177
|
-
try {
|
|
178
|
-
var foundKey = decodeURIComponent(parts[0]);
|
|
179
|
-
jar[foundKey] = converter.read(value, foundKey);
|
|
180
|
-
|
|
181
|
-
if (key === foundKey) {
|
|
182
|
-
break
|
|
183
|
-
}
|
|
184
|
-
} catch (e) {}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
return key ? jar[key] : jar
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return Object.create(
|
|
191
|
-
{
|
|
192
|
-
set: set,
|
|
193
|
-
get: get,
|
|
194
|
-
remove: function (key, attributes) {
|
|
195
|
-
set(
|
|
196
|
-
key,
|
|
197
|
-
'',
|
|
198
|
-
js_cookie_assign({}, attributes, {
|
|
199
|
-
expires: -1
|
|
200
|
-
})
|
|
201
|
-
);
|
|
202
|
-
},
|
|
203
|
-
withAttributes: function (attributes) {
|
|
204
|
-
return init(this.converter, js_cookie_assign({}, this.attributes, attributes))
|
|
205
|
-
},
|
|
206
|
-
withConverter: function (converter) {
|
|
207
|
-
return init(js_cookie_assign({}, this.converter, converter), this.attributes)
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
attributes: { value: Object.freeze(defaultAttributes) },
|
|
212
|
-
converter: { value: Object.freeze(converter) }
|
|
213
|
-
}
|
|
214
|
-
)
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
var api = init(defaultConverter, { path: '/' });
|
|
218
|
-
/* eslint-enable no-var */
|
|
219
|
-
|
|
220
|
-
/* harmony default export */ const js_cookie = (api);
|
|
221
|
-
|
|
222
|
-
;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/cookie-storage.js
|
|
223
|
-
|
|
224
|
-
function cookieStore(attributes = {}) {
|
|
225
|
-
return function (key) {
|
|
226
|
-
const KEY = 'cvco.' + key;
|
|
227
|
-
return {
|
|
228
|
-
get() {
|
|
229
|
-
const jsonStr = js_cookie.get(KEY);
|
|
230
|
-
return jsonStr ? JSON.parse(jsonStr) : null;
|
|
231
|
-
},
|
|
232
|
-
|
|
233
|
-
set(value) {
|
|
234
|
-
if (!value) {
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
js_cookie.set(KEY, JSON.stringify(value), attributes);
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
};
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/session-storage.js
|
|
245
|
-
function store(key) {
|
|
246
|
-
const KEY = 'cvco.' + key;
|
|
247
|
-
return {
|
|
248
|
-
get() {
|
|
249
|
-
const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')];
|
|
250
|
-
let val;
|
|
251
|
-
|
|
252
|
-
do {
|
|
253
|
-
val = sessionStorage.getItem(candidates[0]);
|
|
254
|
-
} while (candidates.shift() && !val);
|
|
255
|
-
|
|
256
|
-
return JSON.parse(val);
|
|
257
|
-
},
|
|
258
|
-
|
|
259
|
-
set(value) {
|
|
260
|
-
if (!value) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
sessionStorage.setItem(KEY, JSON.stringify(value));
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
;// CONCATENATED MODULE: ./src/javascripts/package/storage.js
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
module.exports = __webpack_exports__;
|
|
274
|
-
/******/ })()
|
|
275
|
-
;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/*! For license information please see storage.min.js.LICENSE.txt */
|
|
2
|
-
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(){return{get:()=>{if(window.hasOwnProperty("SeamlyBridge"))try{return JSON.parse(SeamlyBridge.getData())}catch(e){return console.error("Unexpected or malformed data retrieved from bridge",e),{}}return window.seamlyBridgeData},set:e=>{window.webkit&&window.webkit.messageHandlers&&window.webkit.messageHandlers.seamlyBridge&&window.webkit.messageHandlers.seamlyBridge.postMessage(JSON.stringify(e)),window.hasOwnProperty("SeamlyBridge")&&SeamlyBridge.setData(JSON.stringify(e)),window.ReactNativeWebView&&window.ReactNativeWebView.postMessage(JSON.stringify(e))}}}function n(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)e[n]=r[n]}return e}e.r(t),e.d(t,{appStorageProvider:()=>r,cookieStorageProvider:()=>i,sessionStorageProvider:()=>s});const o=function e(t,r){function o(e,o,i){if("undefined"!=typeof document){"number"==typeof(i=n({},r,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=e+"="+t.write(o,e)+s}}return Object.create({set:o,get:function(e){if("undefined"!=typeof document&&(!arguments.length||e)){for(var r=document.cookie?document.cookie.split("; "):[],n={},o=0;o<r.length;o++){var i=r[o].split("="),s=i.slice(1).join("=");try{var a=decodeURIComponent(i[0]);if(n[a]=t.read(s,a),e===a)break}catch(e){}}return e?n[e]:n}},remove:function(e,t){o(e,"",n({},t,{expires:-1}))},withAttributes:function(t){return e(this.converter,n({},this.attributes,t))},withConverter:function(t){return e(n({},this.converter,t),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(t)}})}({read:function(e){return'"'===e[0]&&(e=e.slice(1,-1)),e.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(e){return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});function i(e={}){return function(t){const r="cvco."+t;return{get(){const e=o.get(r);return e?JSON.parse(e):null},set(t){t&&o.set(r,JSON.stringify(t),e)}}}}function s(e){const t="cvco."+e;return{get(){const e=[t,t.split(".").slice(0,-1).join(".")];let r;do{r=sessionStorage.getItem(e[0])}while(e.shift()&&!r);return JSON.parse(r)},set(e){e&&sessionStorage.setItem(t,JSON.stringify(e))}}}module.exports=t})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! js-cookie v3.0.1 | MIT */
|