@seamly/web-ui 20.1.0 → 20.2.0-alpha.1

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.
Files changed (59) hide show
  1. package/build/dist/lib/index.debug.js +41 -41
  2. package/build/dist/lib/index.debug.min.js +1 -1
  3. package/build/dist/lib/index.js +517 -501
  4. package/build/dist/lib/index.min.js +1 -1
  5. package/build/dist/lib/standalone.js +595 -579
  6. package/build/dist/lib/standalone.min.js +1 -1
  7. package/build/dist/lib/style-guide.js +6918 -6912
  8. package/build/dist/lib/style-guide.min.js +1 -1
  9. package/build/dist/lib/styles.css +1 -1
  10. package/package.json +1 -1
  11. package/src/javascripts/api/index.js +12 -5
  12. package/src/javascripts/domains/app/actions.js +6 -2
  13. package/src/javascripts/domains/config/reducer.js +2 -2
  14. package/src/javascripts/domains/forms/reducer.js +1 -1
  15. package/src/javascripts/domains/i18n/reducer.js +1 -1
  16. package/src/javascripts/domains/interrupt/reducer.js +1 -1
  17. package/src/javascripts/domains/translations/components/chat-status.js +1 -4
  18. package/src/javascripts/domains/translations/components/options-dialog/index.js +2 -5
  19. package/src/javascripts/domains/translations/hooks.js +1 -5
  20. package/src/javascripts/domains/translations/middleware.js +2 -5
  21. package/src/javascripts/domains/translations/reducer.js +2 -2
  22. package/src/javascripts/domains/visibility/actions.js +1 -1
  23. package/src/javascripts/style-guide/components/app.js +1 -1
  24. package/src/javascripts/style-guide/components/static-core.js +4 -1
  25. package/src/javascripts/ui/components/conversation/conversation.js +2 -2
  26. package/src/javascripts/ui/components/conversation/event/carousel-component/index.js +1 -1
  27. package/src/javascripts/ui/components/conversation/event/cta.js +1 -1
  28. package/src/javascripts/ui/components/conversation/event/image.js +1 -1
  29. package/src/javascripts/ui/components/conversation/event/text.js +2 -2
  30. package/src/javascripts/ui/components/conversation/loader.js +1 -1
  31. package/src/javascripts/ui/components/conversation/message-container.js +1 -1
  32. package/src/javascripts/ui/components/core/seamly-activity-monitor.js +1 -1
  33. package/src/javascripts/ui/components/core/seamly-core.js +2 -2
  34. package/src/javascripts/ui/components/core/seamly-file-upload.js +1 -1
  35. package/src/javascripts/ui/components/core/seamly-instance-functions-loader.js +1 -1
  36. package/src/javascripts/ui/components/core/seamly-live-region.js +2 -2
  37. package/src/javascripts/ui/components/entry/entry-container.js +2 -2
  38. package/src/javascripts/ui/components/entry/text-entry/hooks.js +4 -1
  39. package/src/javascripts/ui/components/entry/text-entry/text-entry-form.js +1 -1
  40. package/src/javascripts/ui/components/form-controls/select.js +1 -1
  41. package/src/javascripts/ui/components/layout/agent-info.js +1 -1
  42. package/src/javascripts/ui/components/layout/header.js +1 -1
  43. package/src/javascripts/ui/components/options/options-button.js +1 -1
  44. package/src/javascripts/ui/components/options/options.js +1 -1
  45. package/src/javascripts/ui/components/options/transcript/index.js +1 -1
  46. package/src/javascripts/ui/components/warnings/resume-conversation-prompt.js +1 -1
  47. package/src/javascripts/ui/components/widgets/lightbox.js +1 -1
  48. package/src/javascripts/ui/hooks/file-upload-hooks.js +3 -2
  49. package/src/javascripts/ui/hooks/focus-helper-hooks.js +2 -2
  50. package/src/javascripts/ui/hooks/seamly-entry-hooks.js +1 -1
  51. package/src/javascripts/ui/hooks/seamly-option-hooks.js +1 -1
  52. package/src/javascripts/ui/hooks/use-seamly-chat.js +2 -2
  53. package/src/javascripts/ui/hooks/use-seamly-commands.js +7 -7
  54. package/src/javascripts/ui/hooks/use-seamly-idle-detach-countdown.js +4 -4
  55. package/src/javascripts/ui/hooks/use-seamly-resume-conversation-prompt.js +2 -2
  56. package/src/javascripts/ui/hooks/use-single-file-upload.js +1 -1
  57. package/src/stylesheets/5-components/_chat-status.scss +4 -0
  58. package/webpack/config.package.js +7 -0
  59. package/src/.DS_Store +0 -0
@@ -9225,6 +9225,29 @@ const setLocale = i18n_utils_createThunk('setLocale', async (locale, {
9225
9225
  return api.getTranslations(locale);
9226
9226
  });
9227
9227
  });
9228
+ ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/utils.js
9229
+
9230
+ const {
9231
+ createActions: utils_createActions,
9232
+ createReducer: translations_utils_createReducer,
9233
+ selectState: translations_utils_selectState
9234
+ } = createDomain('translations');
9235
+ ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/actions.js
9236
+
9237
+ const [enable, disable] = utils_createActions('translate', {
9238
+ enable: locale => ({
9239
+ locale
9240
+ }),
9241
+ disable: () => ({})
9242
+ });
9243
+ const [enableEvent, disableEvent] = utils_createActions('event', {
9244
+ enable: payloadId => ({
9245
+ payloadId
9246
+ }),
9247
+ disable: payloadId => ({
9248
+ payloadId
9249
+ })
9250
+ });
9228
9251
  ;// CONCATENATED MODULE: ./src/javascripts/domains/app/utils.js
9229
9252
 
9230
9253
  const {
@@ -9238,6 +9261,43 @@ const {
9238
9261
 
9239
9262
  const selectUserHasResponded = createSelector(app_utils_selectState, state => state.userHasResponded);
9240
9263
 
9264
+ ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/utils.js
9265
+
9266
+
9267
+ const {
9268
+ createAction: visibility_utils_createAction,
9269
+ createActions: visibility_utils_createActions,
9270
+ createThunk: visibility_utils_createThunk,
9271
+ createReducer: visibility_utils_createReducer,
9272
+ selectState: visibility_utils_selectState
9273
+ } = createDomain('visibility');
9274
+ const calculateVisibility = ({
9275
+ hasResponded,
9276
+ previousVisibility,
9277
+ requestedVisibility,
9278
+ config
9279
+ }) => {
9280
+ const {
9281
+ defaults,
9282
+ layoutMode,
9283
+ hideOnNoUserResponse
9284
+ } = config;
9285
+ const {
9286
+ visible: defaultVisibility
9287
+ } = defaults || {}; // Requesting open should override the responded check.
9288
+
9289
+ if (layoutMode === 'window' && hideOnNoUserResponse && requestedVisibility !== visibilityStates.open) {
9290
+ return hasResponded ? requestedVisibility || previousVisibility || visibilityStates.open : visibilityStates.hidden;
9291
+ }
9292
+
9293
+ const baseVisibility = visibilityStates.minimized;
9294
+ return requestedVisibility || previousVisibility || defaultVisibility || baseVisibility;
9295
+ };
9296
+ ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/selectors.js
9297
+
9298
+
9299
+ const selectVisibility = createSelector(visibility_utils_selectState, state => state.visibility);
9300
+
9241
9301
  ;// CONCATENATED MODULE: ./src/javascripts/ui/hooks/seamly-state-hooks.js
9242
9302
  function seamly_state_hooks_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
9243
9303
 
@@ -9349,43 +9409,6 @@ const useSeamlyLayoutMode = () => {
9349
9409
  isResolving: !layoutMode
9350
9410
  };
9351
9411
  };
9352
- ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/utils.js
9353
-
9354
-
9355
- const {
9356
- createAction: visibility_utils_createAction,
9357
- createActions: utils_createActions,
9358
- createThunk: visibility_utils_createThunk,
9359
- createReducer: visibility_utils_createReducer,
9360
- selectState: visibility_utils_selectState
9361
- } = createDomain('visibility');
9362
- const calculateVisibility = ({
9363
- hasResponded,
9364
- previousVisibility,
9365
- requestedVisibility,
9366
- config
9367
- }) => {
9368
- const {
9369
- defaults,
9370
- layoutMode,
9371
- hideOnNoUserResponse
9372
- } = config;
9373
- const {
9374
- visible: defaultVisibility
9375
- } = defaults || {}; // Requesting open should override the responded check.
9376
-
9377
- if (layoutMode === 'window' && hideOnNoUserResponse && requestedVisibility !== visibilityStates.open) {
9378
- return hasResponded ? requestedVisibility || previousVisibility || visibilityStates.open : visibilityStates.hidden;
9379
- }
9380
-
9381
- const baseVisibility = visibilityStates.minimized;
9382
- return requestedVisibility || previousVisibility || defaultVisibility || baseVisibility;
9383
- };
9384
- ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/selectors.js
9385
-
9386
-
9387
- const selectVisibility = createSelector(visibility_utils_selectState, state => state.visibility);
9388
-
9389
9412
  ;// CONCATENATED MODULE: ./src/javascripts/domains/visibility/actions.js
9390
9413
  function actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
9391
9414
 
@@ -9550,6 +9573,7 @@ const clear = interrupt_utils_createAction('clear');
9550
9573
 
9551
9574
 
9552
9575
 
9576
+
9553
9577
  const setHasResponded = app_utils_createAction('setHasResponded', hasResponded => ({
9554
9578
  hasResponded
9555
9579
  }));
@@ -9592,7 +9616,7 @@ const app_actions_initialize = app_utils_createThunk('initialize', async (_, {
9592
9616
 
9593
9617
  if (agentParticipant !== null && agentParticipant !== void 0 && agentParticipant.name) {
9594
9618
  dispatch({
9595
- type: seamlyActions.SET_HEADER_TITLE,
9619
+ type: seamlyActions.SET_HEADER_SUB_TITLE,
9596
9620
  title: agentParticipant.name
9597
9621
  });
9598
9622
  }
@@ -9601,6 +9625,8 @@ const app_actions_initialize = app_utils_createThunk('initialize', async (_, {
9601
9625
  }
9602
9626
 
9603
9627
  try {
9628
+ var _config$context2;
9629
+
9604
9630
  if (api.hasConversation()) {
9605
9631
  var _initialState$transla;
9606
9632
 
@@ -9614,6 +9640,9 @@ const app_actions_initialize = app_utils_createThunk('initialize', async (_, {
9614
9640
  if ('userResponded' in initialState) {
9615
9641
  dispatch(setHasResponded(initialState.userResponded));
9616
9642
  }
9643
+ } else if (config !== null && config !== void 0 && (_config$context2 = config.context) !== null && _config$context2 !== void 0 && _config$context2.translationLocale) {
9644
+ locale = config.context.translationLocale;
9645
+ dispatch(enable(locale));
9617
9646
  }
9618
9647
  } catch (e) {
9619
9648
  if (e instanceof SeamlySessionExpiredError) {
@@ -10818,6 +10847,33 @@ const useFileUploads = () => {
10818
10847
  isComplete: currentUploads.every(file => file.complete)
10819
10848
  };
10820
10849
  };
10850
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/hooks/utility-hooks.js
10851
+
10852
+
10853
+ const useForceUpdate = () => {
10854
+ // This is an escape hatch mentioned in the React docs:
10855
+ // https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
10856
+
10857
+ /* eslint-disable-next-line no-unused-vars */
10858
+ const [ignored, forceUpdate] = (0,hooks_namespaceObject.useReducer)(x => x + 1, 0);
10859
+ return (0,hooks_namespaceObject.useCallback)(() => {
10860
+ setTimeout(() => {
10861
+ forceUpdate();
10862
+ });
10863
+ }, []);
10864
+ };
10865
+ const useGeneratedId = () => {
10866
+ const [id] = (0,hooks_namespaceObject.useState)(() => randomId());
10867
+ return id;
10868
+ };
10869
+ const useStableCallback = callback => {
10870
+ const callbackRef = (0,hooks_namespaceObject.useRef)();
10871
+ callbackRef.current = callback;
10872
+ const isFunction = typeof callback === 'function';
10873
+ return (0,hooks_namespaceObject.useMemo)(() => {
10874
+ return isFunction ? (...args) => callbackRef.current(...args) : undefined;
10875
+ }, [isFunction]);
10876
+ };
10821
10877
  ;// CONCATENATED MODULE: ./src/javascripts/domains/interrupt/selectors.js
10822
10878
 
10823
10879
 
@@ -11035,33 +11091,6 @@ const visibility_reducer_initialState = {
11035
11091
 
11036
11092
 
11037
11093
 
11038
- ;// CONCATENATED MODULE: ./src/javascripts/ui/hooks/utility-hooks.js
11039
-
11040
-
11041
- const useForceUpdate = () => {
11042
- // This is an escape hatch mentioned in the React docs:
11043
- // https://reactjs.org/docs/hooks-faq.html#is-there-something-like-forceupdate
11044
-
11045
- /* eslint-disable-next-line no-unused-vars */
11046
- const [ignored, forceUpdate] = (0,hooks_namespaceObject.useReducer)(x => x + 1, 0);
11047
- return (0,hooks_namespaceObject.useCallback)(() => {
11048
- setTimeout(() => {
11049
- forceUpdate();
11050
- });
11051
- }, []);
11052
- };
11053
- const useGeneratedId = () => {
11054
- const [id] = (0,hooks_namespaceObject.useState)(() => randomId());
11055
- return id;
11056
- };
11057
- const useStableCallback = callback => {
11058
- const callbackRef = (0,hooks_namespaceObject.useRef)();
11059
- callbackRef.current = callback;
11060
- const isFunction = typeof callback === 'function';
11061
- return (0,hooks_namespaceObject.useMemo)(() => {
11062
- return isFunction ? (...args) => callbackRef.current(...args) : undefined;
11063
- }, [isFunction]);
11064
- };
11065
11094
  ;// CONCATENATED MODULE: ./src/javascripts/ui/hooks/use-seamly-commands.js
11066
11095
  function use_seamly_commands_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
11067
11096
 
@@ -11849,29 +11878,6 @@ const app_reducer_initialState = {
11849
11878
 
11850
11879
 
11851
11880
 
11852
- ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/utils.js
11853
-
11854
- const {
11855
- createActions: translations_utils_createActions,
11856
- createReducer: translations_utils_createReducer,
11857
- selectState: translations_utils_selectState
11858
- } = createDomain('translations');
11859
- ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/actions.js
11860
-
11861
- const [enable, disable] = translations_utils_createActions('translate', {
11862
- enable: locale => ({
11863
- locale
11864
- }),
11865
- disable: () => ({})
11866
- });
11867
- const [enableEvent, disableEvent] = translations_utils_createActions('event', {
11868
- enable: payloadId => ({
11869
- payloadId
11870
- }),
11871
- disable: payloadId => ({
11872
- payloadId
11873
- })
11874
- });
11875
11881
  ;// CONCATENATED MODULE: ./src/javascripts/domains/redux/utils.js
11876
11882
  const arrayContentEquals = (a, b) => {
11877
11883
  if (a === b) {
@@ -12804,185 +12810,6 @@ function updateFormControl(state, formId, name, controlState) {
12804
12810
 
12805
12811
 
12806
12812
 
12807
- ;// CONCATENATED MODULE: ./src/javascripts/ui/utils/form-utils.js
12808
- function form_utils_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
12809
-
12810
- function form_utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { form_utils_ownKeys(Object(source), true).forEach(function (key) { form_utils_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { form_utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
12811
-
12812
- function form_utils_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
12813
-
12814
- const formActions = {
12815
- REGISTER_FORM: 'REGISTER_FORM',
12816
- DE_REGISTER_FORM: 'DE_REGISTER_FORM',
12817
- REGISTER: 'REGISTER',
12818
- DE_REGISTER: 'DEREGISTER',
12819
- SET_VALUE: 'SET_VALUE',
12820
- SET_VALIDITY: 'SET_VALIDITY',
12821
- SET_STATE: 'SET_STATE',
12822
- SET_SUBMITTED: 'SET_SUBMITTED',
12823
- SET_PERSIST_FORM_DATA: 'SET_PERSIST_FORM_DATA'
12824
- };
12825
- const {
12826
- REGISTER_FORM,
12827
- DE_REGISTER_FORM,
12828
- REGISTER,
12829
- DE_REGISTER,
12830
- SET_VALUE,
12831
- SET_VALIDITY,
12832
- SET_STATE,
12833
- SET_SUBMITTED,
12834
- SET_PERSIST_FORM_DATA
12835
- } = formActions;
12836
- const getValidator = (fn, errorText, compareValue = null) => ({
12837
- fn,
12838
- errorText,
12839
- compareValue
12840
- });
12841
- const formReducer = (state, action) => {
12842
- const {
12843
- formId,
12844
- name,
12845
- controlId,
12846
- value,
12847
- data,
12848
- validity,
12849
- errorText,
12850
- hasSubmitted,
12851
- persistData
12852
- } = action;
12853
-
12854
- const setControls = controls => form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12855
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
12856
- controls: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls), controls)
12857
- })
12858
- });
12859
-
12860
- switch (action.type) {
12861
- case REGISTER_FORM:
12862
- return form_utils_objectSpread({
12863
- [formId]: {
12864
- controls: {},
12865
- validity: true,
12866
- hasSubmitted: false,
12867
- persistData: false
12868
- }
12869
- }, state);
12870
-
12871
- case DE_REGISTER_FORM:
12872
- const removedFormState = form_utils_objectSpread({}, state);
12873
-
12874
- delete removedFormState[formId];
12875
- return removedFormState;
12876
-
12877
- case REGISTER:
12878
- const {
12879
- value: existingValue,
12880
- validity: existingValidity,
12881
- errorText: existingErrorText
12882
- } = state[formId].controls[name] || {};
12883
- return setControls({
12884
- [name]: {
12885
- controlId,
12886
- value: existingValue || value,
12887
- validity: existingValidity !== false,
12888
- errorText: existingErrorText || ''
12889
- }
12890
- });
12891
-
12892
- case DE_REGISTER:
12893
- const relatedForm = state[formId];
12894
-
12895
- if (!relatedForm) {
12896
- return state;
12897
- }
12898
-
12899
- const newControls = form_utils_objectSpread({}, relatedForm.controls);
12900
-
12901
- delete newControls[action.name];
12902
- return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12903
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, relatedForm), {}, {
12904
- controls: newControls
12905
- })
12906
- });
12907
-
12908
- case SET_VALUE:
12909
- return setControls({
12910
- [name]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[name]), {}, {
12911
- value
12912
- })
12913
- });
12914
-
12915
- case SET_VALIDITY:
12916
- const newControlValidities = form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls), {}, {
12917
- [name]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[name]), {}, {
12918
- validity,
12919
- errorText
12920
- })
12921
- });
12922
-
12923
- return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12924
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
12925
- controls: newControlValidities,
12926
- validity: Object.keys(newControlValidities).map(key => newControlValidities[key].validity).every(v => v)
12927
- })
12928
- });
12929
-
12930
- case SET_STATE:
12931
- return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12932
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
12933
- controls: Object.keys(data).reduce((acc, key) => {
12934
- return form_utils_objectSpread(form_utils_objectSpread({}, acc), {}, {
12935
- [key]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[key]), {}, {
12936
- value: data[key],
12937
- validity: true,
12938
- errorText: ''
12939
- })
12940
- });
12941
- }, form_utils_objectSpread({}, state.controls))
12942
- })
12943
- });
12944
-
12945
- case SET_SUBMITTED:
12946
- return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12947
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
12948
- hasSubmitted
12949
- })
12950
- });
12951
-
12952
- case SET_PERSIST_FORM_DATA:
12953
- return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
12954
- [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
12955
- persistData
12956
- })
12957
- });
12958
-
12959
- default:
12960
- return state;
12961
- }
12962
- };
12963
- ;// CONCATENATED MODULE: ./src/javascripts/ui/utils/validations.js
12964
- const validateFileSize = (fileList, maxSize) => {
12965
- let isValid = true;
12966
-
12967
- for (let i = 0; i < fileList.length; i++) {
12968
- if (fileList[i].size > maxSize) {
12969
- isValid = false;
12970
- }
12971
- }
12972
-
12973
- return isValid;
12974
- };
12975
- const fileListObjectIsNotEmpty = fileListObj => !!(fileListObj !== null && fileListObj !== void 0 && fileListObj.length) > 0;
12976
- /* eslint-disable no-control-regex */
12977
-
12978
- const isEmailString = val => {
12979
- const regex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
12980
- const trimmedVal = val && val.trim();
12981
- return !!(trimmedVal && trimmedVal.match(regex));
12982
- };
12983
- /* eslint-enable no-control-regex */
12984
-
12985
- const isNotEmptyString = val => !!val;
12986
12813
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/form-controls/form.js
12987
12814
  const form_excluded = ["className", "disableValidationClasses"];
12988
12815
 
@@ -13240,7 +13067,186 @@ function TranslationsOptionsDialogForm({
13240
13067
  });
13241
13068
  }
13242
13069
 
13243
- /* harmony default export */ const options_dialog_form = (TranslationsOptionsDialogForm);
13070
+ /* harmony default export */ const options_dialog_form = (TranslationsOptionsDialogForm);
13071
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/utils/form-utils.js
13072
+ function form_utils_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
13073
+
13074
+ function form_utils_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { form_utils_ownKeys(Object(source), true).forEach(function (key) { form_utils_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { form_utils_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
13075
+
13076
+ function form_utils_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13077
+
13078
+ const formActions = {
13079
+ REGISTER_FORM: 'REGISTER_FORM',
13080
+ DE_REGISTER_FORM: 'DE_REGISTER_FORM',
13081
+ REGISTER: 'REGISTER',
13082
+ DE_REGISTER: 'DEREGISTER',
13083
+ SET_VALUE: 'SET_VALUE',
13084
+ SET_VALIDITY: 'SET_VALIDITY',
13085
+ SET_STATE: 'SET_STATE',
13086
+ SET_SUBMITTED: 'SET_SUBMITTED',
13087
+ SET_PERSIST_FORM_DATA: 'SET_PERSIST_FORM_DATA'
13088
+ };
13089
+ const {
13090
+ REGISTER_FORM,
13091
+ DE_REGISTER_FORM,
13092
+ REGISTER,
13093
+ DE_REGISTER,
13094
+ SET_VALUE,
13095
+ SET_VALIDITY,
13096
+ SET_STATE,
13097
+ SET_SUBMITTED,
13098
+ SET_PERSIST_FORM_DATA
13099
+ } = formActions;
13100
+ const getValidator = (fn, errorText, compareValue = null) => ({
13101
+ fn,
13102
+ errorText,
13103
+ compareValue
13104
+ });
13105
+ const formReducer = (state, action) => {
13106
+ const {
13107
+ formId,
13108
+ name,
13109
+ controlId,
13110
+ value,
13111
+ data,
13112
+ validity,
13113
+ errorText,
13114
+ hasSubmitted,
13115
+ persistData
13116
+ } = action;
13117
+
13118
+ const setControls = controls => form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13119
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
13120
+ controls: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls), controls)
13121
+ })
13122
+ });
13123
+
13124
+ switch (action.type) {
13125
+ case REGISTER_FORM:
13126
+ return form_utils_objectSpread({
13127
+ [formId]: {
13128
+ controls: {},
13129
+ validity: true,
13130
+ hasSubmitted: false,
13131
+ persistData: false
13132
+ }
13133
+ }, state);
13134
+
13135
+ case DE_REGISTER_FORM:
13136
+ const removedFormState = form_utils_objectSpread({}, state);
13137
+
13138
+ delete removedFormState[formId];
13139
+ return removedFormState;
13140
+
13141
+ case REGISTER:
13142
+ const {
13143
+ value: existingValue,
13144
+ validity: existingValidity,
13145
+ errorText: existingErrorText
13146
+ } = state[formId].controls[name] || {};
13147
+ return setControls({
13148
+ [name]: {
13149
+ controlId,
13150
+ value: existingValue || value,
13151
+ validity: existingValidity !== false,
13152
+ errorText: existingErrorText || ''
13153
+ }
13154
+ });
13155
+
13156
+ case DE_REGISTER:
13157
+ const relatedForm = state[formId];
13158
+
13159
+ if (!relatedForm) {
13160
+ return state;
13161
+ }
13162
+
13163
+ const newControls = form_utils_objectSpread({}, relatedForm.controls);
13164
+
13165
+ delete newControls[action.name];
13166
+ return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13167
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, relatedForm), {}, {
13168
+ controls: newControls
13169
+ })
13170
+ });
13171
+
13172
+ case SET_VALUE:
13173
+ return setControls({
13174
+ [name]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[name]), {}, {
13175
+ value
13176
+ })
13177
+ });
13178
+
13179
+ case SET_VALIDITY:
13180
+ const newControlValidities = form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls), {}, {
13181
+ [name]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[name]), {}, {
13182
+ validity,
13183
+ errorText
13184
+ })
13185
+ });
13186
+
13187
+ return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13188
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
13189
+ controls: newControlValidities,
13190
+ validity: Object.keys(newControlValidities).map(key => newControlValidities[key].validity).every(v => v)
13191
+ })
13192
+ });
13193
+
13194
+ case SET_STATE:
13195
+ return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13196
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
13197
+ controls: Object.keys(data).reduce((acc, key) => {
13198
+ return form_utils_objectSpread(form_utils_objectSpread({}, acc), {}, {
13199
+ [key]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId].controls[key]), {}, {
13200
+ value: data[key],
13201
+ validity: true,
13202
+ errorText: ''
13203
+ })
13204
+ });
13205
+ }, form_utils_objectSpread({}, state.controls))
13206
+ })
13207
+ });
13208
+
13209
+ case SET_SUBMITTED:
13210
+ return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13211
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
13212
+ hasSubmitted
13213
+ })
13214
+ });
13215
+
13216
+ case SET_PERSIST_FORM_DATA:
13217
+ return form_utils_objectSpread(form_utils_objectSpread({}, state), {}, {
13218
+ [formId]: form_utils_objectSpread(form_utils_objectSpread({}, state[formId]), {}, {
13219
+ persistData
13220
+ })
13221
+ });
13222
+
13223
+ default:
13224
+ return state;
13225
+ }
13226
+ };
13227
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/utils/validations.js
13228
+ const validateFileSize = (fileList, maxSize) => {
13229
+ let isValid = true;
13230
+
13231
+ for (let i = 0; i < fileList.length; i++) {
13232
+ if (fileList[i].size > maxSize) {
13233
+ isValid = false;
13234
+ }
13235
+ }
13236
+
13237
+ return isValid;
13238
+ };
13239
+ const fileListObjectIsNotEmpty = fileListObj => !!(fileListObj !== null && fileListObj !== void 0 && fileListObj.length) > 0;
13240
+ /* eslint-disable no-control-regex */
13241
+
13242
+ const isEmailString = val => {
13243
+ const regex = /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
13244
+ const trimmedVal = val && val.trim();
13245
+ return !!(trimmedVal && trimmedVal.match(regex));
13246
+ };
13247
+ /* eslint-enable no-control-regex */
13248
+
13249
+ const isNotEmptyString = val => !!val;
13244
13250
  ;// CONCATENATED MODULE: ./src/javascripts/domains/translations/components/options-dialog/index.js
13245
13251
 
13246
13252
 
@@ -13858,36 +13864,6 @@ const Interrupt = ({
13858
13864
  };
13859
13865
 
13860
13866
  /* harmony default export */ const interrupt = (Interrupt);
13861
- ;// CONCATENATED MODULE: ./src/javascripts/ui/components/layout/privacy-disclaimer.js
13862
-
13863
-
13864
-
13865
-
13866
-
13867
-
13868
- const PrivacyDisclaimer = () => {
13869
- const {
13870
- t
13871
- } = useI18n();
13872
- const {
13873
- showDisclaimer
13874
- } = useConfig();
13875
- return showDisclaimer && (0,jsx_runtime_namespaceObject.jsxs)("div", {
13876
- className: css_className('disclaimer'),
13877
- tabIndex: "0",
13878
- children: [(0,jsx_runtime_namespaceObject.jsx)("h2", {
13879
- className: css_className('disclaimer__title'),
13880
- children: t('disclaimer.title')
13881
- }), (0,jsx_runtime_namespaceObject.jsx)("div", {
13882
- className: css_className('disclaimer__message'),
13883
- dangerouslySetInnerHTML: {
13884
- __html: t('disclaimer.content')
13885
- }
13886
- })]
13887
- });
13888
- };
13889
-
13890
- /* harmony default export */ const privacy_disclaimer = (PrivacyDisclaimer);
13891
13867
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/component-context.js
13892
13868
 
13893
13869
  const ComponentContext = (0,external_preact_namespaceObject.createContext)({});
@@ -19713,6 +19689,94 @@ const Cta = ({
19713
19689
  };
19714
19690
 
19715
19691
  /* harmony default export */ const cta = (Cta);
19692
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/components/pagination.js
19693
+
19694
+
19695
+
19696
+ function CarouselPagination({
19697
+ items,
19698
+ currentIndex,
19699
+ onChange,
19700
+ getItemKey,
19701
+ getItemLabel
19702
+ }) {
19703
+ const itemCount = items.length;
19704
+ const handlePaginate = (0,hooks_namespaceObject.useCallback)(event => {
19705
+ const slideIndex = Number(event.target.dataset.item || '0');
19706
+ const nextIndex = Math.min(itemCount - 1, Math.max(0, slideIndex));
19707
+
19708
+ if (nextIndex !== currentIndex) {
19709
+ onChange(nextIndex);
19710
+ }
19711
+ }, [itemCount, currentIndex, onChange]);
19712
+ return (0,jsx_runtime_namespaceObject.jsx)("div", {
19713
+ className: css_className('carousel-pagination__wrapper'),
19714
+ role: "group",
19715
+ children: (0,jsx_runtime_namespaceObject.jsx)("ul", {
19716
+ className: css_className('carousel-pagination'),
19717
+ children: items.map((item, idx) => {
19718
+ const isActive = currentIndex === idx;
19719
+ return (0,jsx_runtime_namespaceObject.jsx)("li", {
19720
+ className: css_className('carousel-pagination__item', isActive ? 'is-active' : undefined),
19721
+ children: (0,jsx_runtime_namespaceObject.jsx)("button", {
19722
+ className: css_className('carousel-pagination__button'),
19723
+ type: "button",
19724
+ onClick: handlePaginate,
19725
+ "data-item": idx,
19726
+ "aria-disabled": isActive ? 'true' : undefined,
19727
+ "aria-label": getItemLabel(item, idx)
19728
+ })
19729
+ }, getItemKey(item, idx, 'pagination-item-'));
19730
+ })
19731
+ })
19732
+ });
19733
+ }
19734
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js
19735
+
19736
+
19737
+
19738
+
19739
+
19740
+ function CarouselControls({
19741
+ items,
19742
+ currentIndex,
19743
+ onChange,
19744
+ children
19745
+ }) {
19746
+ const {
19747
+ t
19748
+ } = useI18n();
19749
+ const itemCount = items.length;
19750
+
19751
+ const handlePrevious = () => {
19752
+ onChange((currentIndex - 1 + itemCount) % itemCount);
19753
+ };
19754
+
19755
+ const handleNext = () => {
19756
+ onChange((currentIndex + 1) % itemCount);
19757
+ };
19758
+
19759
+ return (0,jsx_runtime_namespaceObject.jsxs)("div", {
19760
+ className: css_className('carousel-controls'),
19761
+ children: [(0,jsx_runtime_namespaceObject.jsx)("button", {
19762
+ className: css_className('button', 'button--previous'),
19763
+ "aria-label": t('carousel.controls.previous'),
19764
+ onClick: handlePrevious,
19765
+ children: (0,jsx_runtime_namespaceObject.jsx)(icon, {
19766
+ name: "arrowLeft",
19767
+ size: "16"
19768
+ })
19769
+ }), children, (0,jsx_runtime_namespaceObject.jsx)("button", {
19770
+ className: css_className('button', 'button--next'),
19771
+ "aria-label": t('carousel.controls.next'),
19772
+ onClick: handleNext,
19773
+ children: (0,jsx_runtime_namespaceObject.jsx)(icon, {
19774
+ name: "arrowRight",
19775
+ size: "16"
19776
+ })
19777
+ })]
19778
+ });
19779
+ }
19716
19780
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/card-component.js
19717
19781
  function card_component_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
19718
19782
 
@@ -19810,142 +19874,54 @@ const CardComponent = ({
19810
19874
  children: title
19811
19875
  }), description && (0,jsx_runtime_namespaceObject.jsx)("div", {
19812
19876
  className: css_className('card__description'),
19813
- dangerouslySetInnerHTML: {
19814
- __html: parse_body(description)
19815
- }
19816
- }), (0,jsx_runtime_namespaceObject.jsx)(CardActionComponent, card_component_objectSpread(card_component_objectSpread({
19817
- tabIndex: isCarouselItem && !hasFocus ? '-1' : undefined // disable to prevent tabbing through cards
19818
- ,
19819
- className: css_className('button', 'button--primary'),
19820
- "aria-describedby": descriptionId
19821
- }, actionProps), {}, {
19822
- children: buttonText
19823
- }))]
19824
- })]
19825
- });
19826
- };
19827
-
19828
- /* harmony default export */ const card_component = (CardComponent);
19829
- ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js
19830
- function slide_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
19831
-
19832
- function slide_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { slide_ownKeys(Object(source), true).forEach(function (key) { slide_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { slide_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19833
-
19834
- function slide_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19835
-
19836
-
19837
-
19838
-
19839
-
19840
- function CarouselMessageSlide({
19841
- item: slide,
19842
- items,
19843
- index,
19844
- isActive
19845
- }) {
19846
- const {
19847
- t
19848
- } = useI18n();
19849
- return (0,jsx_runtime_namespaceObject.jsx)("div", {
19850
- className: css_className('carousel-item', `carousel-item--${slide.type}`),
19851
- role: "group",
19852
- "aria-roledescription": "slide",
19853
- "aria-label": t('carousel.slide.label', {
19854
- index: index + 1,
19855
- total: items.length
19856
- }),
19857
- children: (0,jsx_runtime_namespaceObject.jsx)(card_component, slide_objectSpread(slide_objectSpread({}, slide), {}, {
19858
- isCarouselItem: true,
19859
- hasFocus: isActive
19860
- }))
19861
- });
19862
- }
19863
- ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/components/pagination.js
19864
-
19865
-
19866
-
19867
- function CarouselPagination({
19868
- items,
19869
- currentIndex,
19870
- onChange,
19871
- getItemKey,
19872
- getItemLabel
19873
- }) {
19874
- const itemCount = items.length;
19875
- const handlePaginate = (0,hooks_namespaceObject.useCallback)(event => {
19876
- const slideIndex = Number(event.target.dataset.item || '0');
19877
- const nextIndex = Math.min(itemCount - 1, Math.max(0, slideIndex));
19878
-
19879
- if (nextIndex !== currentIndex) {
19880
- onChange(nextIndex);
19881
- }
19882
- }, [itemCount, currentIndex, onChange]);
19883
- return (0,jsx_runtime_namespaceObject.jsx)("div", {
19884
- className: css_className('carousel-pagination__wrapper'),
19885
- role: "group",
19886
- children: (0,jsx_runtime_namespaceObject.jsx)("ul", {
19887
- className: css_className('carousel-pagination'),
19888
- children: items.map((item, idx) => {
19889
- const isActive = currentIndex === idx;
19890
- return (0,jsx_runtime_namespaceObject.jsx)("li", {
19891
- className: css_className('carousel-pagination__item', isActive ? 'is-active' : undefined),
19892
- children: (0,jsx_runtime_namespaceObject.jsx)("button", {
19893
- className: css_className('carousel-pagination__button'),
19894
- type: "button",
19895
- onClick: handlePaginate,
19896
- "data-item": idx,
19897
- "aria-disabled": isActive ? 'true' : undefined,
19898
- "aria-label": getItemLabel(item, idx)
19899
- })
19900
- }, getItemKey(item, idx, 'pagination-item-'));
19901
- })
19902
- })
19877
+ dangerouslySetInnerHTML: {
19878
+ __html: parse_body(description)
19879
+ }
19880
+ }), (0,jsx_runtime_namespaceObject.jsx)(CardActionComponent, card_component_objectSpread(card_component_objectSpread({
19881
+ tabIndex: isCarouselItem && !hasFocus ? '-1' : undefined // disable to prevent tabbing through cards
19882
+ ,
19883
+ className: css_className('button', 'button--primary'),
19884
+ "aria-describedby": descriptionId
19885
+ }, actionProps), {}, {
19886
+ children: buttonText
19887
+ }))]
19888
+ })]
19903
19889
  });
19904
- }
19905
- ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/components/controls.js
19890
+ };
19891
+
19892
+ /* harmony default export */ const card_component = (CardComponent);
19893
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-message/components/slide.js
19894
+ function slide_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
19895
+
19896
+ function slide_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { slide_ownKeys(Object(source), true).forEach(function (key) { slide_defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { slide_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
19897
+
19898
+ function slide_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
19906
19899
 
19907
19900
 
19908
19901
 
19909
19902
 
19910
19903
 
19911
- function CarouselControls({
19904
+ function CarouselMessageSlide({
19905
+ item: slide,
19912
19906
  items,
19913
- currentIndex,
19914
- onChange,
19915
- children
19907
+ index,
19908
+ isActive
19916
19909
  }) {
19917
19910
  const {
19918
19911
  t
19919
19912
  } = useI18n();
19920
- const itemCount = items.length;
19921
-
19922
- const handlePrevious = () => {
19923
- onChange((currentIndex - 1 + itemCount) % itemCount);
19924
- };
19925
-
19926
- const handleNext = () => {
19927
- onChange((currentIndex + 1) % itemCount);
19928
- };
19929
-
19930
- return (0,jsx_runtime_namespaceObject.jsxs)("div", {
19931
- className: css_className('carousel-controls'),
19932
- children: [(0,jsx_runtime_namespaceObject.jsx)("button", {
19933
- className: css_className('button', 'button--previous'),
19934
- "aria-label": t('carousel.controls.previous'),
19935
- onClick: handlePrevious,
19936
- children: (0,jsx_runtime_namespaceObject.jsx)(icon, {
19937
- name: "arrowLeft",
19938
- size: "16"
19939
- })
19940
- }), children, (0,jsx_runtime_namespaceObject.jsx)("button", {
19941
- className: css_className('button', 'button--next'),
19942
- "aria-label": t('carousel.controls.next'),
19943
- onClick: handleNext,
19944
- children: (0,jsx_runtime_namespaceObject.jsx)(icon, {
19945
- name: "arrowRight",
19946
- size: "16"
19947
- })
19948
- })]
19913
+ return (0,jsx_runtime_namespaceObject.jsx)("div", {
19914
+ className: css_className('carousel-item', `carousel-item--${slide.type}`),
19915
+ role: "group",
19916
+ "aria-roledescription": "slide",
19917
+ "aria-label": t('carousel.slide.label', {
19918
+ index: index + 1,
19919
+ total: items.length
19920
+ }),
19921
+ children: (0,jsx_runtime_namespaceObject.jsx)(card_component, slide_objectSpread(slide_objectSpread({}, slide), {}, {
19922
+ isCarouselItem: true,
19923
+ hasFocus: isActive
19924
+ }))
19949
19925
  });
19950
19926
  }
19951
19927
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/event/carousel-component/index.js
@@ -20289,6 +20265,36 @@ const ComponentFilter = ({
20289
20265
  };
20290
20266
 
20291
20267
  /* harmony default export */ const component_filter = (ComponentFilter);
20268
+ ;// CONCATENATED MODULE: ./src/javascripts/ui/components/layout/privacy-disclaimer.js
20269
+
20270
+
20271
+
20272
+
20273
+
20274
+
20275
+ const PrivacyDisclaimer = () => {
20276
+ const {
20277
+ t
20278
+ } = useI18n();
20279
+ const {
20280
+ showDisclaimer
20281
+ } = useConfig();
20282
+ return showDisclaimer && (0,jsx_runtime_namespaceObject.jsxs)("div", {
20283
+ className: css_className('disclaimer'),
20284
+ tabIndex: "0",
20285
+ children: [(0,jsx_runtime_namespaceObject.jsx)("h2", {
20286
+ className: css_className('disclaimer__title'),
20287
+ children: t('disclaimer.title')
20288
+ }), (0,jsx_runtime_namespaceObject.jsx)("div", {
20289
+ className: css_className('disclaimer__message'),
20290
+ dangerouslySetInnerHTML: {
20291
+ __html: t('disclaimer.content')
20292
+ }
20293
+ })]
20294
+ });
20295
+ };
20296
+
20297
+ /* harmony default export */ const privacy_disclaimer = (PrivacyDisclaimer);
20292
20298
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/conversation/conversation.js
20293
20299
 
20294
20300
 
@@ -22217,53 +22223,6 @@ const View = () => {
22217
22223
  };
22218
22224
 
22219
22225
  /* harmony default export */ const view = (View);
22220
- ;// CONCATENATED MODULE: ./src/javascripts/domains/errors/index.js
22221
-
22222
-
22223
- const {
22224
- createAction: errors_createAction
22225
- } = createDomain('errors');
22226
- const catchError = errors_createAction('catch-error', error => ({
22227
- error
22228
- }));
22229
- function errors_createMiddleware({
22230
- api: seamlyApi
22231
- }) {
22232
- return ({
22233
- getState
22234
- }) => {
22235
- const handleError = action => {
22236
- const {
22237
- errorCallback,
22238
- namespace,
22239
- api,
22240
- layoutMode
22241
- } = selectConfig(getState());
22242
- errorCallback === null || errorCallback === void 0 ? void 0 : errorCallback(action.error, {
22243
- namespace,
22244
- api,
22245
- layoutMode,
22246
- conversationUrl: seamlyApi.getConversationUrl(),
22247
- action: action.type ? action : undefined
22248
- });
22249
- };
22250
-
22251
- return next => action => {
22252
- try {
22253
- if (action.error) {
22254
- handleError(action);
22255
- }
22256
-
22257
- return next(action);
22258
- } catch (error) {
22259
- handleError({
22260
- error
22261
- });
22262
- throw error;
22263
- }
22264
- };
22265
- };
22266
- }
22267
22226
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/core/seamly-instance-functions-loader.js
22268
22227
 
22269
22228
 
@@ -23138,6 +23097,53 @@ const SeamlyFileUpload = ({
23138
23097
  };
23139
23098
 
23140
23099
  /* harmony default export */ const seamly_file_upload = (SeamlyFileUpload);
23100
+ ;// CONCATENATED MODULE: ./src/javascripts/domains/errors/index.js
23101
+
23102
+
23103
+ const {
23104
+ createAction: errors_createAction
23105
+ } = createDomain('errors');
23106
+ const catchError = errors_createAction('catch-error', error => ({
23107
+ error
23108
+ }));
23109
+ function errors_createMiddleware({
23110
+ api: seamlyApi
23111
+ }) {
23112
+ return ({
23113
+ getState
23114
+ }) => {
23115
+ const handleError = action => {
23116
+ const {
23117
+ errorCallback,
23118
+ namespace,
23119
+ api,
23120
+ layoutMode
23121
+ } = selectConfig(getState());
23122
+ errorCallback === null || errorCallback === void 0 ? void 0 : errorCallback(action.error, {
23123
+ namespace,
23124
+ api,
23125
+ layoutMode,
23126
+ conversationUrl: seamlyApi.getConversationUrl(),
23127
+ action: action.type ? action : undefined
23128
+ });
23129
+ };
23130
+
23131
+ return next => action => {
23132
+ try {
23133
+ if (action.error) {
23134
+ handleError(action);
23135
+ }
23136
+
23137
+ return next(action);
23138
+ } catch (error) {
23139
+ handleError({
23140
+ error
23141
+ });
23142
+ throw error;
23143
+ }
23144
+ };
23145
+ };
23146
+ }
23141
23147
  ;// CONCATENATED MODULE: ./src/javascripts/ui/components/core/seamly-core.js
23142
23148
 
23143
23149
 
@@ -23242,34 +23248,6 @@ function objectStore(key, storageProvider) {
23242
23248
 
23243
23249
  };
23244
23250
  }
23245
- ;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/session-storage.js
23246
- function store(key) {
23247
- const KEY = 'cvco.' + key;
23248
- return {
23249
- get() {
23250
- const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')];
23251
- let val;
23252
-
23253
- do {
23254
- val = sessionStorage.getItem(candidates[0]);
23255
- } while (candidates.shift() && !val);
23256
-
23257
- return JSON.parse(val);
23258
- },
23259
-
23260
- set(value) {
23261
- if (!value) {
23262
- return;
23263
- }
23264
-
23265
- sessionStorage.setItem(KEY, JSON.stringify(value));
23266
- }
23267
-
23268
- };
23269
- }
23270
- // EXTERNAL MODULE: ./src/javascripts/lib/debug.js
23271
- var debug = __webpack_require__(905);
23272
- var debug_default = /*#__PURE__*/__webpack_require__.n(debug);
23273
23251
  ;// CONCATENATED MODULE: ./node_modules/phoenix/priv/static/phoenix.esm.js
23274
23252
  // js/phoenix/utils.js
23275
23253
  var closure = value => {
@@ -24664,6 +24642,9 @@ const splitUrlParams = url => {
24664
24642
  };
24665
24643
 
24666
24644
  /* harmony default export */ const split_url_params = (splitUrlParams);
24645
+ // EXTERNAL MODULE: ./src/javascripts/lib/debug.js
24646
+ var debug = __webpack_require__(905);
24647
+ var debug_default = /*#__PURE__*/__webpack_require__.n(debug);
24667
24648
  ;// CONCATENATED MODULE: ./src/javascripts/api/producer.js
24668
24649
  function producer_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
24669
24650
 
@@ -24826,6 +24807,31 @@ class ConversationProducer {
24826
24807
  }
24827
24808
 
24828
24809
  }
24810
+ ;// CONCATENATED MODULE: ./src/javascripts/lib/store/providers/session-storage.js
24811
+ function store(key) {
24812
+ const KEY = 'cvco.' + key;
24813
+ return {
24814
+ get() {
24815
+ const candidates = [KEY, KEY.split('.').slice(0, -1).join('.')];
24816
+ let val;
24817
+
24818
+ do {
24819
+ val = sessionStorage.getItem(candidates[0]);
24820
+ } while (candidates.shift() && !val);
24821
+
24822
+ return JSON.parse(val);
24823
+ },
24824
+
24825
+ set(value) {
24826
+ if (!value) {
24827
+ return;
24828
+ }
24829
+
24830
+ sessionStorage.setItem(KEY, JSON.stringify(value));
24831
+ }
24832
+
24833
+ };
24834
+ }
24829
24835
  ;// CONCATENATED MODULE: ./src/javascripts/api/event-producer.js
24830
24836
  class EventProducer {
24831
24837
  constructor(name) {
@@ -24936,10 +24942,11 @@ class API {
24936
24942
  * @param {boolean} config.sendEnvironment
24937
24943
  * @param {string} layoutMode
24938
24944
  * @param {string} namespace
24939
- * @param {Object} [context={ channelName: undefined, variables: undefined, locale: undefined }]
24945
+ * @param {Object} [context={ channelName: undefined, variables: undefined, locale: undefined, translationLocale: undefined }]
24940
24946
  * @param {string} context.channelName
24941
24947
  * @param {object} context.variables
24942
24948
  * @param {string} context.locale
24949
+ * @param {string} context.translationLocale
24943
24950
  * @memberof API
24944
24951
  */
24945
24952
  constructor({
@@ -25269,6 +25276,7 @@ class API {
25269
25276
  sendContext(context = {}) {
25270
25277
  const {
25271
25278
  locale,
25279
+ translationLocale,
25272
25280
  variables
25273
25281
  } = context;
25274
25282
  const payload = {};
@@ -25281,6 +25289,14 @@ class API {
25281
25289
  payload.locale = locale;
25282
25290
  }
25283
25291
 
25292
+ if (translationLocale) {
25293
+ if (typeof translationLocale !== 'string') {
25294
+ throw new Error('Translation locale must be a string');
25295
+ }
25296
+
25297
+ payload.translationLocale = translationLocale;
25298
+ }
25299
+
25284
25300
  if (variables) {
25285
25301
  if (typeof variables !== 'object') {
25286
25302
  throw new Error('Variables must be an object');
@@ -25303,9 +25319,9 @@ class API {
25303
25319
 
25304
25320
  getEnvironment() {
25305
25321
  return {
25306
- clientName: PACKAGE_NAME,
25322
+ clientName: "@seamly/web-ui",
25307
25323
  clientVariant: this.layoutMode,
25308
- clientVersion: PACKAGE_VERSION,
25324
+ clientVersion: "20.2.0-alpha.1",
25309
25325
  currentUrl: window.location.toString(),
25310
25326
  screenResolution: `${window.screen.width}x${window.screen.height}`,
25311
25327
  timezone: getTimeZone(),