@seamly/web-ui 20.2.0-alpha.3 → 20.2.0-alpha.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.
@@ -15761,7 +15761,7 @@ function useStoreContext() {
15761
15761
  function useStoreDispatch() {
15762
15762
  return useStoreContext().dispatch;
15763
15763
  }
15764
- function useSelector(selector, deps = []) {
15764
+ function hooks_useSelector(selector, deps = []) {
15765
15765
  const store = useStoreContext(); // we need a force-update because we're manually updating a ref instead of a useState
15766
15766
 
15767
15767
  const [, forceUpdate] = hooks_module_p(x => x + 1, 0); // we're keeping the value to compare against
@@ -15819,7 +15819,7 @@ const useSelectorWithProps = function useSelectorWithProps(selector, props, inpu
15819
15819
  ) {
15820
15820
  // eslint-disable-next-line react-hooks/exhaustive-deps
15821
15821
  const wrappedMapper = hooks_module_A(state => selector(state, props), inputs);
15822
- return useSelector(wrappedMapper, inputs);
15822
+ return hooks_useSelector(wrappedMapper, inputs);
15823
15823
  };
15824
15824
  ;// CONCATENATED MODULE: ./src/javascripts/domains/redux/index.js
15825
15825
 
@@ -15831,13 +15831,13 @@ const useSelectorWithProps = function useSelectorWithProps(selector, props, inpu
15831
15831
 
15832
15832
 
15833
15833
  function useConfig() {
15834
- return useSelector(selectConfig);
15834
+ return hooks_useSelector(selectConfig);
15835
15835
  }
15836
15836
  function useParticipants() {
15837
15837
  const {
15838
15838
  agentParticipant,
15839
15839
  userParticipant
15840
- } = useSelector(selectConfig);
15840
+ } = useSelector(Selectors.selectConfig);
15841
15841
  return {
15842
15842
  agent: agentParticipant,
15843
15843
  user: userParticipant
@@ -15846,7 +15846,7 @@ function useParticipants() {
15846
15846
  function useStartChatIcon() {
15847
15847
  const {
15848
15848
  startChatIcon
15849
- } = useSelector(selectConfig);
15849
+ } = hooks_useSelector(selectConfig);
15850
15850
  return startChatIcon;
15851
15851
  }
15852
15852
  ;// CONCATENATED MODULE: ./src/javascripts/config.js
@@ -17065,7 +17065,7 @@ function seamly_state_hooks_objectSpread(target) { for (var i = 1; i < arguments
17065
17065
 
17066
17066
 
17067
17067
  const seamly_state_hooks_selectState = state => state.state;
17068
- const useSeamlyStateContext = () => useSelector(seamly_state_hooks_selectState);
17068
+ const useSeamlyStateContext = () => hooks_useSelector(seamly_state_hooks_selectState);
17069
17069
  const selectEventsWithSuggestion = createSelector(seamly_state_hooks_selectState, selectConfig, selectUserHasResponded, ({
17070
17070
  events,
17071
17071
  serviceData
@@ -17115,7 +17115,7 @@ const selectEvents = createSelector(selectEventsWithSuggestion, selectConfig, (e
17115
17115
 
17116
17116
  return mappedEvents;
17117
17117
  });
17118
- const useEvents = () => useSelector(selectEvents, []);
17118
+ const useEvents = () => hooks_useSelector(selectEvents, []);
17119
17119
  const useSeamlyIsLoading = () => useSeamlyStateContext().isLoading;
17120
17120
  const useSeamlyHeaderData = () => useSeamlyStateContext().headerTitles;
17121
17121
  const useSeamlyUnreadCount = () => useSeamlyStateContext().unreadEvents;
@@ -17129,7 +17129,7 @@ const selectLastMessageEventId = createSelector(selectEvents, events => {
17129
17129
 
17130
17130
  return (_filteredEvents = filteredEvents[filteredEvents.length - 1]) === null || _filteredEvents === void 0 ? void 0 : _filteredEvents.payload.id;
17131
17131
  });
17132
- const useLastMessageEventId = () => useSelector(selectLastMessageEventId);
17132
+ const useLastMessageEventId = () => hooks_useSelector(selectLastMessageEventId);
17133
17133
  const useSeamlyIsHistoryLoaded = () => useSeamlyStateContext().historyLoaded;
17134
17134
  const useSeamlyCurrentAgent = () => {
17135
17135
  const {
@@ -18300,9 +18300,9 @@ const formatter = new MessageFormatter('en-GB', {
18300
18300
  select: selectTypeHandler
18301
18301
  });
18302
18302
  function useI18n() {
18303
- const translations = useSelector(selectTranslations);
18304
- const locale = useSelector(selectLocale);
18305
- const initialLocale = useSelector(selectInitialLocale);
18303
+ const translations = hooks_useSelector(selectTranslations);
18304
+ const locale = hooks_useSelector(selectLocale);
18305
+ const initialLocale = hooks_useSelector(selectInitialLocale);
18306
18306
  const t = hooks_module_A((key, values = {}) => {
18307
18307
  const translation = translations[key];
18308
18308
 
@@ -18742,7 +18742,7 @@ function useInterrupt() {
18742
18742
  const {
18743
18743
  t
18744
18744
  } = useI18n();
18745
- const error = useSelector(selectError);
18745
+ const error = hooks_useSelector(selectError);
18746
18746
  const hasInterrupt = Boolean(error);
18747
18747
  const meta = hooks_module_d(() => {
18748
18748
  if (!error) return {};
@@ -18890,7 +18890,7 @@ const handleError = (state, {
18890
18890
 
18891
18891
 
18892
18892
  function useUserHasResponded() {
18893
- return useSelector(selectUserHasResponded);
18893
+ return hooks_useSelector(selectUserHasResponded);
18894
18894
  }
18895
18895
  ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/hooks.js
18896
18896
 
@@ -18900,7 +18900,7 @@ function useUserHasResponded() {
18900
18900
 
18901
18901
  const useVisibility = () => {
18902
18902
  const dispatch = useStoreDispatch();
18903
- const visible = useSelector(selectVisibility);
18903
+ const visible = hooks_useSelector(selectVisibility);
18904
18904
  const isVisible = visible ? visible !== visibilityStates.hidden : false;
18905
18905
  const isOpen = visible === visibilityStates.open;
18906
18906
  const isMinimized = visible === visibilityStates.minimized;
@@ -19843,7 +19843,7 @@ function useTranslations() {
19843
19843
  isActive,
19844
19844
  isAvailable,
19845
19845
  currentLocale
19846
- } = useSelector(getState, []);
19846
+ } = hooks_useSelector(getState, []);
19847
19847
  return {
19848
19848
  languages,
19849
19849
  isActive,
@@ -19894,7 +19894,7 @@ function useTranslatedEventData({
19894
19894
  }];
19895
19895
  }
19896
19896
  function useTranslationsContainer() {
19897
- const id = useSelector(getState, []).containerId;
19897
+ const id = hooks_useSelector(getState, []).containerId;
19898
19898
  const focusContainer = useElementFocusingById(id);
19899
19899
  return {
19900
19900
  id,
@@ -27552,13 +27552,9 @@ const Translation = _ref => {
27552
27552
 
27553
27553
 
27554
27554
 
27555
-
27556
27555
  const Participant = ({
27557
27556
  event
27558
27557
  }) => {
27559
- const {
27560
- agent
27561
- } = useParticipants();
27562
27558
  const {
27563
27559
  participant
27564
27560
  } = event.payload;
@@ -27571,11 +27567,10 @@ const Participant = ({
27571
27567
  return null;
27572
27568
  }
27573
27569
 
27574
- const avatar = participant.avatar || (agent === null || agent === void 0 ? void 0 : agent.avatar);
27575
27570
  return jsxRuntime_module_e(EventDivider, {
27576
- graphicSrc: avatar,
27577
- graphicType: avatar ? 'avatar' : undefined,
27578
- iconName: !avatar ? 'balloon' : undefined,
27571
+ graphicSrc: participant.avatar,
27572
+ graphicType: participant.avatar ? 'avatar' : undefined,
27573
+ iconName: !participant.avatar ? 'balloon' : undefined,
27579
27574
  childrenHTML: intro,
27580
27575
  dividerType: "participant"
27581
27576
  });
@@ -33687,7 +33682,7 @@ class API {
33687
33682
  return {
33688
33683
  clientName: "@seamly/web-ui",
33689
33684
  clientVariant: this.layoutMode,
33690
- clientVersion: "20.2.0-alpha.3",
33685
+ clientVersion: "20.2.0-alpha.4",
33691
33686
  currentUrl: window.location.toString(),
33692
33687
  screenResolution: `${window.screen.width}x${window.screen.height}`,
33693
33688
  timezone: getTimeZone(),