@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.
@@ -8098,7 +8098,7 @@ function useStoreContext() {
8098
8098
  function useStoreDispatch() {
8099
8099
  return useStoreContext().dispatch;
8100
8100
  }
8101
- function useSelector(selector, deps = []) {
8101
+ function hooks_useSelector(selector, deps = []) {
8102
8102
  const store = useStoreContext(); // we need a force-update because we're manually updating a ref instead of a useState
8103
8103
 
8104
8104
  const [, forceUpdate] = (0,hooks_namespaceObject.useReducer)(x => x + 1, 0); // we're keeping the value to compare against
@@ -8156,7 +8156,7 @@ const useSelectorWithProps = function useSelectorWithProps(selector, props, inpu
8156
8156
  ) {
8157
8157
  // eslint-disable-next-line react-hooks/exhaustive-deps
8158
8158
  const wrappedMapper = (0,hooks_namespaceObject.useCallback)(state => selector(state, props), inputs);
8159
- return useSelector(wrappedMapper, inputs);
8159
+ return hooks_useSelector(wrappedMapper, inputs);
8160
8160
  };
8161
8161
  ;// CONCATENATED MODULE: ./src/javascripts/domains/redux/index.js
8162
8162
 
@@ -8168,13 +8168,13 @@ const useSelectorWithProps = function useSelectorWithProps(selector, props, inpu
8168
8168
 
8169
8169
 
8170
8170
  function useConfig() {
8171
- return useSelector(selectConfig);
8171
+ return hooks_useSelector(selectConfig);
8172
8172
  }
8173
8173
  function useParticipants() {
8174
8174
  const {
8175
8175
  agentParticipant,
8176
8176
  userParticipant
8177
- } = useSelector(selectConfig);
8177
+ } = useSelector(Selectors.selectConfig);
8178
8178
  return {
8179
8179
  agent: agentParticipant,
8180
8180
  user: userParticipant
@@ -8183,7 +8183,7 @@ function useParticipants() {
8183
8183
  function useStartChatIcon() {
8184
8184
  const {
8185
8185
  startChatIcon
8186
- } = useSelector(selectConfig);
8186
+ } = hooks_useSelector(selectConfig);
8187
8187
  return startChatIcon;
8188
8188
  }
8189
8189
  ;// CONCATENATED MODULE: ./src/javascripts/config.js
@@ -9318,7 +9318,7 @@ function seamly_state_hooks_defineProperty(obj, key, value) { if (key in obj) {
9318
9318
 
9319
9319
 
9320
9320
  const seamly_state_hooks_selectState = state => state.state;
9321
- const useSeamlyStateContext = () => useSelector(seamly_state_hooks_selectState);
9321
+ const useSeamlyStateContext = () => hooks_useSelector(seamly_state_hooks_selectState);
9322
9322
  const selectEventsWithSuggestion = createSelector(seamly_state_hooks_selectState, selectConfig, selectUserHasResponded, ({
9323
9323
  events,
9324
9324
  serviceData
@@ -9366,7 +9366,7 @@ const selectEvents = createSelector(selectEventsWithSuggestion, selectConfig, (e
9366
9366
  });
9367
9367
  return mappedEvents;
9368
9368
  });
9369
- const useEvents = () => useSelector(selectEvents, []);
9369
+ const useEvents = () => hooks_useSelector(selectEvents, []);
9370
9370
  const useSeamlyIsLoading = () => useSeamlyStateContext().isLoading;
9371
9371
  const useSeamlyHeaderData = () => useSeamlyStateContext().headerTitles;
9372
9372
  const useSeamlyUnreadCount = () => useSeamlyStateContext().unreadEvents;
@@ -9379,7 +9379,7 @@ const selectLastMessageEventId = createSelector(selectEvents, events => {
9379
9379
  const filteredEvents = events.filter(event => event.type === 'message');
9380
9380
  return (_filteredEvents = filteredEvents[filteredEvents.length - 1]) === null || _filteredEvents === void 0 ? void 0 : _filteredEvents.payload.id;
9381
9381
  });
9382
- const useLastMessageEventId = () => useSelector(selectLastMessageEventId);
9382
+ const useLastMessageEventId = () => hooks_useSelector(selectLastMessageEventId);
9383
9383
  const useSeamlyIsHistoryLoaded = () => useSeamlyStateContext().historyLoaded;
9384
9384
  const useSeamlyCurrentAgent = () => {
9385
9385
  const {
@@ -10518,9 +10518,9 @@ const formatter = new MessageFormatter('en-GB', {
10518
10518
  select: selectTypeHandler
10519
10519
  });
10520
10520
  function useI18n() {
10521
- const translations = useSelector(selectTranslations);
10522
- const locale = useSelector(selectLocale);
10523
- const initialLocale = useSelector(selectInitialLocale);
10521
+ const translations = hooks_useSelector(selectTranslations);
10522
+ const locale = hooks_useSelector(selectLocale);
10523
+ const initialLocale = hooks_useSelector(selectInitialLocale);
10524
10524
  const t = (0,hooks_namespaceObject.useCallback)((key, values = {}) => {
10525
10525
  const translation = translations[key];
10526
10526
 
@@ -10910,7 +10910,7 @@ function useInterrupt() {
10910
10910
  const {
10911
10911
  t
10912
10912
  } = useI18n();
10913
- const error = useSelector(selectError);
10913
+ const error = hooks_useSelector(selectError);
10914
10914
  const hasInterrupt = Boolean(error);
10915
10915
  const meta = (0,hooks_namespaceObject.useMemo)(() => {
10916
10916
  if (!error) return {};
@@ -11049,7 +11049,7 @@ const handleError = (state, {
11049
11049
 
11050
11050
 
11051
11051
  function useUserHasResponded() {
11052
- return useSelector(selectUserHasResponded);
11052
+ return hooks_useSelector(selectUserHasResponded);
11053
11053
  }
11054
11054
  ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/hooks.js
11055
11055
 
@@ -11059,7 +11059,7 @@ function useUserHasResponded() {
11059
11059
 
11060
11060
  const useVisibility = () => {
11061
11061
  const dispatch = useStoreDispatch();
11062
- const visible = useSelector(selectVisibility);
11062
+ const visible = hooks_useSelector(selectVisibility);
11063
11063
  const isVisible = visible ? visible !== visibilityStates.hidden : false;
11064
11064
  const isOpen = visible === visibilityStates.open;
11065
11065
  const isMinimized = visible === visibilityStates.minimized;
@@ -11947,7 +11947,7 @@ function useTranslations() {
11947
11947
  isActive,
11948
11948
  isAvailable,
11949
11949
  currentLocale
11950
- } = useSelector(getState, []);
11950
+ } = hooks_useSelector(getState, []);
11951
11951
  return {
11952
11952
  languages,
11953
11953
  isActive,
@@ -11998,7 +11998,7 @@ function useTranslatedEventData({
11998
11998
  }];
11999
11999
  }
12000
12000
  function useTranslationsContainer() {
12001
- const id = useSelector(getState, []).containerId;
12001
+ const id = hooks_useSelector(getState, []).containerId;
12002
12002
  const focusContainer = useElementFocusingById(id);
12003
12003
  return {
12004
12004
  id,
@@ -19495,13 +19495,9 @@ const Translation = _ref => {
19495
19495
 
19496
19496
 
19497
19497
 
19498
-
19499
19498
  const Participant = ({
19500
19499
  event
19501
19500
  }) => {
19502
- const {
19503
- agent
19504
- } = useParticipants();
19505
19501
  const {
19506
19502
  participant
19507
19503
  } = event.payload;
@@ -19514,11 +19510,10 @@ const Participant = ({
19514
19510
  return null;
19515
19511
  }
19516
19512
 
19517
- const avatar = participant.avatar || (agent === null || agent === void 0 ? void 0 : agent.avatar);
19518
19513
  return (0,jsx_runtime_namespaceObject.jsx)(EventDivider, {
19519
- graphicSrc: avatar,
19520
- graphicType: avatar ? 'avatar' : undefined,
19521
- iconName: !avatar ? 'balloon' : undefined,
19514
+ graphicSrc: participant.avatar,
19515
+ graphicType: participant.avatar ? 'avatar' : undefined,
19516
+ iconName: !participant.avatar ? 'balloon' : undefined,
19522
19517
  childrenHTML: intro,
19523
19518
  dividerType: "participant"
19524
19519
  });
@@ -25326,7 +25321,7 @@ class API {
25326
25321
  return {
25327
25322
  clientName: "@seamly/web-ui",
25328
25323
  clientVariant: this.layoutMode,
25329
- clientVersion: "20.2.0-alpha.3",
25324
+ clientVersion: "20.2.0-alpha.4",
25330
25325
  currentUrl: window.location.toString(),
25331
25326
  screenResolution: `${window.screen.width}x${window.screen.height}`,
25332
25327
  timezone: getTimeZone(),