@seamly/web-ui 19.1.1 → 19.1.4
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/build/dist/lib/index.debug.js +8 -8
- package/build/dist/lib/index.debug.min.js +1 -1
- package/build/dist/lib/index.js +40 -12
- package/build/dist/lib/index.min.js +1 -1
- package/build/dist/lib/standalone.js +43 -15
- package/build/dist/lib/standalone.min.js +1 -1
- package/build/dist/lib/style-guide.js +38 -2
- package/build/dist/lib/style-guide.min.js +1 -1
- package/package.json +1 -1
- package/src/javascripts/api/errors/seamly-base-error.js +7 -0
- package/src/javascripts/api/producer.js +5 -1
- package/src/javascripts/domains/errors/index.js +5 -4
- package/src/javascripts/lib/external-api/index.js +5 -0
- package/src/javascripts/style-guide/components/static-core.js +9 -1
- package/src/javascripts/ui/components/conversation/event/carousel-component/index.js +8 -1
- package/src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js +2 -3
- package/src/javascripts/ui/components/conversation/event/carousel-message/index.js +3 -1
|
@@ -18083,9 +18083,6 @@ var is_array_default = /*#__PURE__*/__webpack_require__.n(is_array);
|
|
|
18083
18083
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/bind.js
|
|
18084
18084
|
var bind = __webpack_require__(4103);
|
|
18085
18085
|
var bind_default = /*#__PURE__*/__webpack_require__.n(bind);
|
|
18086
|
-
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js
|
|
18087
|
-
var object_keys = __webpack_require__(6902);
|
|
18088
|
-
var keys_default = /*#__PURE__*/__webpack_require__.n(object_keys);
|
|
18089
18086
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols.js
|
|
18090
18087
|
var get_own_property_symbols = __webpack_require__(4310);
|
|
18091
18088
|
var get_own_property_symbols_default = /*#__PURE__*/__webpack_require__.n(get_own_property_symbols);
|
|
@@ -18134,6 +18131,9 @@ var values_default = /*#__PURE__*/__webpack_require__.n(values);
|
|
|
18134
18131
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/instance/some.js
|
|
18135
18132
|
var some = __webpack_require__(7149);
|
|
18136
18133
|
var some_default = /*#__PURE__*/__webpack_require__.n(some);
|
|
18134
|
+
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js-stable/object/keys.js
|
|
18135
|
+
var object_keys = __webpack_require__(6902);
|
|
18136
|
+
var keys_default = /*#__PURE__*/__webpack_require__.n(object_keys);
|
|
18137
18137
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/object/get-own-property-symbols.js
|
|
18138
18138
|
var object_get_own_property_symbols = __webpack_require__(3263);
|
|
18139
18139
|
// EXTERNAL MODULE: ./node_modules/@babel/runtime-corejs3/core-js/instance/index-of.js
|
|
@@ -22884,6 +22884,15 @@ class SeamlyBaseError extends Error {
|
|
|
22884
22884
|
}
|
|
22885
22885
|
|
|
22886
22886
|
this.originalError = originalError;
|
|
22887
|
+
|
|
22888
|
+
if (originalError !== null && originalError !== void 0 && originalError.payload) {
|
|
22889
|
+
this.originalEvent = originalError;
|
|
22890
|
+
this.originalError = originalError.payload.error;
|
|
22891
|
+
}
|
|
22892
|
+
|
|
22893
|
+
if (originalError !== null && originalError !== void 0 && originalError.error) {
|
|
22894
|
+
this.originalError = originalError.error;
|
|
22895
|
+
}
|
|
22887
22896
|
}
|
|
22888
22897
|
|
|
22889
22898
|
}
|
|
@@ -29611,7 +29620,7 @@ function slide_objectSpread(target) { for (var i = 1; i < arguments.length; i++)
|
|
|
29611
29620
|
function CarouselMessageSlide({
|
|
29612
29621
|
item: slide,
|
|
29613
29622
|
items,
|
|
29614
|
-
|
|
29623
|
+
index,
|
|
29615
29624
|
isActive
|
|
29616
29625
|
}) {
|
|
29617
29626
|
const {
|
|
@@ -29622,7 +29631,7 @@ function CarouselMessageSlide({
|
|
|
29622
29631
|
role: "group",
|
|
29623
29632
|
"aria-roledescription": "slide",
|
|
29624
29633
|
"aria-label": t('carousel.slide.label', {
|
|
29625
|
-
index:
|
|
29634
|
+
index: index + 1,
|
|
29626
29635
|
total: items.length
|
|
29627
29636
|
}),
|
|
29628
29637
|
children: jsxRuntime_module_e(card_component, slide_objectSpread(slide_objectSpread({}, slide), {}, {
|
|
@@ -29648,6 +29657,12 @@ const defaultGetItemKey = (item, idx, prefix) => `${prefix}${idx}`;
|
|
|
29648
29657
|
|
|
29649
29658
|
const defaultGetItemLabel = item => item.label;
|
|
29650
29659
|
|
|
29660
|
+
const preventScroll = ({
|
|
29661
|
+
target
|
|
29662
|
+
}) => {
|
|
29663
|
+
target.scrollLeft = 0;
|
|
29664
|
+
};
|
|
29665
|
+
|
|
29651
29666
|
function CarouselComponent({
|
|
29652
29667
|
currentIndex: originalIndex,
|
|
29653
29668
|
onChange,
|
|
@@ -29686,6 +29701,7 @@ function CarouselComponent({
|
|
|
29686
29701
|
"aria-roledescription": "carousel",
|
|
29687
29702
|
children: [jsxRuntime_module_e("div", {
|
|
29688
29703
|
className: css_className('carousel__slides-wrapper'),
|
|
29704
|
+
onScroll: preventScroll,
|
|
29689
29705
|
children: jsxRuntime_module_e("div", {
|
|
29690
29706
|
id: carouselItemsId,
|
|
29691
29707
|
className: css_className('carousel__slides'),
|
|
@@ -29705,6 +29721,7 @@ function CarouselComponent({
|
|
|
29705
29721
|
item: item,
|
|
29706
29722
|
items: items,
|
|
29707
29723
|
currentIndex: currentIndex,
|
|
29724
|
+
index: idx,
|
|
29708
29725
|
isActive: isActive
|
|
29709
29726
|
})
|
|
29710
29727
|
}, getItemKey(item, idx, 'item-'));
|
|
@@ -29737,6 +29754,7 @@ function CarouselComponent({
|
|
|
29737
29754
|
|
|
29738
29755
|
|
|
29739
29756
|
|
|
29757
|
+
|
|
29740
29758
|
const getItemKey = (item, idx, prefix = '') => `${prefix}${item.title}:${idx}`;
|
|
29741
29759
|
|
|
29742
29760
|
const getItemLabel = item => item.title;
|
|
@@ -29744,7 +29762,8 @@ const getItemLabel = item => item.title;
|
|
|
29744
29762
|
const CarouselMessage = ({
|
|
29745
29763
|
event
|
|
29746
29764
|
}) => {
|
|
29747
|
-
const
|
|
29765
|
+
const [body] = useTranslatedEventData(event);
|
|
29766
|
+
const slides = body.cards;
|
|
29748
29767
|
return jsxRuntime_module_e(message_container, {
|
|
29749
29768
|
event: event,
|
|
29750
29769
|
modifiers: 'type-carousel',
|
|
@@ -31981,30 +32000,33 @@ function errors_createMiddleware({
|
|
|
31981
32000
|
return ({
|
|
31982
32001
|
getState
|
|
31983
32002
|
}) => {
|
|
31984
|
-
const handleError =
|
|
32003
|
+
const handleError = action => {
|
|
31985
32004
|
const {
|
|
31986
32005
|
errorCallback,
|
|
31987
32006
|
namespace,
|
|
31988
32007
|
api,
|
|
31989
32008
|
layoutMode
|
|
31990
32009
|
} = selectConfig(getState());
|
|
31991
|
-
errorCallback === null || errorCallback === void 0 ? void 0 : errorCallback(error, {
|
|
32010
|
+
errorCallback === null || errorCallback === void 0 ? void 0 : errorCallback(action.error, {
|
|
31992
32011
|
namespace,
|
|
31993
32012
|
api,
|
|
31994
32013
|
layoutMode,
|
|
31995
|
-
conversationUrl: seamlyApi.getConversationUrl()
|
|
32014
|
+
conversationUrl: seamlyApi.getConversationUrl(),
|
|
32015
|
+
action: action.type ? action : undefined
|
|
31996
32016
|
});
|
|
31997
32017
|
};
|
|
31998
32018
|
|
|
31999
32019
|
return next => action => {
|
|
32000
32020
|
try {
|
|
32001
32021
|
if (action.error) {
|
|
32002
|
-
handleError(action
|
|
32022
|
+
handleError(action);
|
|
32003
32023
|
}
|
|
32004
32024
|
|
|
32005
32025
|
return next(action);
|
|
32006
32026
|
} catch (error) {
|
|
32007
|
-
handleError(
|
|
32027
|
+
handleError({
|
|
32028
|
+
error
|
|
32029
|
+
});
|
|
32008
32030
|
throw error;
|
|
32009
32031
|
}
|
|
32010
32032
|
};
|
|
@@ -33384,11 +33406,12 @@ var Socket = class {
|
|
|
33384
33406
|
onConnClose(event) {
|
|
33385
33407
|
var _context26;
|
|
33386
33408
|
|
|
33409
|
+
let closeCode = event && event.code;
|
|
33387
33410
|
if (this.hasLogger()) this.log("transport", "close", event);
|
|
33388
33411
|
this.triggerChanError();
|
|
33389
33412
|
clearTimeout(this.heartbeatTimer);
|
|
33390
33413
|
|
|
33391
|
-
if (!this.closeWasClean) {
|
|
33414
|
+
if (!this.closeWasClean && closeCode !== 1e3) {
|
|
33392
33415
|
this.reconnectTimer.scheduleTimeout();
|
|
33393
33416
|
}
|
|
33394
33417
|
|
|
@@ -33659,7 +33682,8 @@ class ConversationProducer {
|
|
|
33659
33682
|
this.emit({
|
|
33660
33683
|
type: 'error',
|
|
33661
33684
|
payload: {
|
|
33662
|
-
type: 'seamly_offline'
|
|
33685
|
+
type: 'seamly_offline',
|
|
33686
|
+
error: err
|
|
33663
33687
|
}
|
|
33664
33688
|
});
|
|
33665
33689
|
});
|
|
@@ -33731,7 +33755,8 @@ class ConversationProducer {
|
|
|
33731
33755
|
this.emit({
|
|
33732
33756
|
type: 'error',
|
|
33733
33757
|
payload: {
|
|
33734
|
-
type: 'join_channel_erred'
|
|
33758
|
+
type: 'join_channel_erred',
|
|
33759
|
+
error: err
|
|
33735
33760
|
}
|
|
33736
33761
|
});
|
|
33737
33762
|
this.emit({
|
|
@@ -34810,8 +34835,11 @@ class ExternalApi {
|
|
|
34810
34835
|
return this.appConfig(userConfig);
|
|
34811
34836
|
}
|
|
34812
34837
|
|
|
34838
|
+
const defaults = external_api_objectSpread(external_api_objectSpread({}, this.appConfig.defaults), userConfig.defaults);
|
|
34839
|
+
|
|
34813
34840
|
return external_api_objectSpread(external_api_objectSpread(external_api_objectSpread({}, this.appConfig), userConfig), {}, {
|
|
34814
|
-
api: external_api_objectSpread(external_api_objectSpread({}, this.appConfig.api), userConfig.api)
|
|
34841
|
+
api: external_api_objectSpread(external_api_objectSpread({}, this.appConfig.api), userConfig.api),
|
|
34842
|
+
defaults: keys_default()(defaults).length ? defaults : undefined
|
|
34815
34843
|
});
|
|
34816
34844
|
}
|
|
34817
34845
|
|