@seamly/web-ui 19.1.3 → 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.
@@ -20916,7 +20916,7 @@ function slide_defineProperty(obj, key, value) { if (key in obj) { Object.define
20916
20916
  function CarouselMessageSlide({
20917
20917
  item: slide,
20918
20918
  items,
20919
- currentIndex,
20919
+ index,
20920
20920
  isActive
20921
20921
  }) {
20922
20922
  const {
@@ -20927,7 +20927,7 @@ function CarouselMessageSlide({
20927
20927
  role: "group",
20928
20928
  "aria-roledescription": "slide",
20929
20929
  "aria-label": t('carousel.slide.label', {
20930
- index: currentIndex + 1,
20930
+ index: index + 1,
20931
20931
  total: items.length
20932
20932
  }),
20933
20933
  children: (0,jsx_runtime_namespaceObject.jsx)(card_component, slide_objectSpread(slide_objectSpread({}, slide), {}, {
@@ -20951,6 +20951,12 @@ const defaultGetItemKey = (item, idx, prefix) => `${prefix}${idx}`;
20951
20951
 
20952
20952
  const defaultGetItemLabel = item => item.label;
20953
20953
 
20954
+ const preventScroll = ({
20955
+ target
20956
+ }) => {
20957
+ target.scrollLeft = 0;
20958
+ };
20959
+
20954
20960
  function CarouselComponent({
20955
20961
  currentIndex: originalIndex,
20956
20962
  onChange,
@@ -20987,6 +20993,7 @@ function CarouselComponent({
20987
20993
  "aria-roledescription": "carousel",
20988
20994
  children: [(0,jsx_runtime_namespaceObject.jsx)("div", {
20989
20995
  className: css_className('carousel__slides-wrapper'),
20996
+ onScroll: preventScroll,
20990
20997
  children: (0,jsx_runtime_namespaceObject.jsx)("div", {
20991
20998
  id: carouselItemsId,
20992
20999
  className: css_className('carousel__slides'),
@@ -21006,6 +21013,7 @@ function CarouselComponent({
21006
21013
  item: item,
21007
21014
  items: items,
21008
21015
  currentIndex: currentIndex,
21016
+ index: idx,
21009
21017
  isActive: isActive
21010
21018
  })
21011
21019
  }, getItemKey(item, idx, 'item-'));
@@ -21038,6 +21046,7 @@ function CarouselComponent({
21038
21046
 
21039
21047
 
21040
21048
 
21049
+
21041
21050
  const getItemKey = (item, idx, prefix = '') => `${prefix}${item.title}:${idx}`;
21042
21051
 
21043
21052
  const getItemLabel = item => item.title;
@@ -21045,7 +21054,8 @@ const getItemLabel = item => item.title;
21045
21054
  const CarouselMessage = ({
21046
21055
  event
21047
21056
  }) => {
21048
- const slides = event.payload.body.cards;
21057
+ const [body] = useTranslatedEventData(event);
21058
+ const slides = body.cards;
21049
21059
  return (0,jsx_runtime_namespaceObject.jsx)(message_container, {
21050
21060
  event: event,
21051
21061
  modifiers: 'type-carousel',
@@ -24544,11 +24554,12 @@ var Socket = class {
24544
24554
  }
24545
24555
 
24546
24556
  onConnClose(event) {
24557
+ let closeCode = event && event.code;
24547
24558
  if (this.hasLogger()) this.log("transport", "close", event);
24548
24559
  this.triggerChanError();
24549
24560
  clearTimeout(this.heartbeatTimer);
24550
24561
 
24551
- if (!this.closeWasClean) {
24562
+ if (!this.closeWasClean && closeCode !== 1e3) {
24552
24563
  this.reconnectTimer.scheduleTimeout();
24553
24564
  }
24554
24565
 
@@ -25860,8 +25871,11 @@ class ExternalApi {
25860
25871
  return this.appConfig(userConfig);
25861
25872
  }
25862
25873
 
25874
+ const defaults = external_api_objectSpread(external_api_objectSpread({}, this.appConfig.defaults), userConfig.defaults);
25875
+
25863
25876
  return external_api_objectSpread(external_api_objectSpread(external_api_objectSpread({}, this.appConfig), userConfig), {}, {
25864
- api: external_api_objectSpread(external_api_objectSpread({}, this.appConfig.api), userConfig.api)
25877
+ api: external_api_objectSpread(external_api_objectSpread({}, this.appConfig.api), userConfig.api),
25878
+ defaults: Object.keys(defaults).length ? defaults : undefined
25865
25879
  });
25866
25880
  }
25867
25881