@microsoft/omnichannel-chat-components 1.1.19 → 1.2.0-main.5ebd4eb

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/README.md +140 -1
  2. package/lib/cjs/common/Constants.js +8 -11
  3. package/lib/cjs/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +10 -3
  4. package/lib/cjs/components/callingcontainer/subcomponents/Timer/Timer.js +10 -1
  5. package/lib/cjs/components/chatbutton/ChatButton.blankAnnouncements.a11y.spec.js +158 -0
  6. package/lib/cjs/components/chatbutton/ChatButton.browseMode.a11y.spec.js +227 -0
  7. package/lib/cjs/components/chatbutton/ChatButton.browseMode.unfixed.a11y.spec.js +112 -0
  8. package/lib/cjs/components/chatbutton/ChatButton.js +52 -16
  9. package/lib/cjs/components/common/subcomponents/CloseButton.js +1 -3
  10. package/lib/cjs/components/confirmationpane/ConfirmationPane.js +10 -8
  11. package/lib/cjs/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +1 -0
  12. package/lib/cjs/components/footer/subcomponents/AudioNotificationButton.js +11 -4
  13. package/lib/cjs/components/footer/subcomponents/DownloadTranscriptButton.js +1 -3
  14. package/lib/cjs/components/footer/subcomponents/EmailTranscriptButton.js +1 -3
  15. package/lib/cjs/components/header/Header.js +16 -4
  16. package/lib/cjs/components/header/common/defaultStyles/defaultHeaderStyleProps.js +23 -0
  17. package/lib/cjs/components/header/subcomponents/MinimizeButton.js +1 -3
  18. package/lib/cjs/components/inputvalidationpane/InputValidationPane.js +34 -14
  19. package/lib/cjs/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +1 -0
  20. package/lib/cjs/components/notificationpane/subcomponents/CloseChatButton.js +1 -3
  21. package/lib/cjs/components/notificationpane/subcomponents/DismissButton.js +1 -3
  22. package/lib/cjs/components/prechatsurveypane/PreChatSurveyPane.js +94 -17
  23. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultichoiceInputStyles.js +1 -0
  24. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +1 -0
  25. package/lib/cjs/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +1 -0
  26. package/lib/cjs/package.json +1 -0
  27. package/lib/cjs/services/EventQueue.js +4 -7
  28. package/lib/esm/common/Constants.js +1 -1
  29. package/lib/esm/components/callingcontainer/subcomponents/CurrentCall/CurrentCall.js +10 -3
  30. package/lib/esm/components/callingcontainer/subcomponents/Timer/Timer.js +10 -1
  31. package/lib/esm/components/chatbutton/ChatButton.blankAnnouncements.a11y.spec.js +155 -0
  32. package/lib/esm/components/chatbutton/ChatButton.browseMode.a11y.spec.js +224 -0
  33. package/lib/esm/components/chatbutton/ChatButton.browseMode.unfixed.a11y.spec.js +108 -0
  34. package/lib/esm/components/chatbutton/ChatButton.js +53 -16
  35. package/lib/esm/components/common/subcomponents/CloseButton.js +1 -3
  36. package/lib/esm/components/confirmationpane/ConfirmationPane.js +10 -8
  37. package/lib/esm/components/confirmationpane/common/defaultProps/defaultConfirmationPaneControlProps.js +1 -0
  38. package/lib/esm/components/footer/subcomponents/AudioNotificationButton.js +11 -4
  39. package/lib/esm/components/footer/subcomponents/DownloadTranscriptButton.js +1 -3
  40. package/lib/esm/components/footer/subcomponents/EmailTranscriptButton.js +1 -3
  41. package/lib/esm/components/header/Header.js +16 -4
  42. package/lib/esm/components/header/common/defaultStyles/defaultHeaderStyleProps.js +23 -0
  43. package/lib/esm/components/header/subcomponents/MinimizeButton.js +1 -3
  44. package/lib/esm/components/inputvalidationpane/InputValidationPane.js +34 -14
  45. package/lib/esm/components/inputvalidationpane/common/default/defaultProps/defaultInputValidationPaneControlProps.js +1 -0
  46. package/lib/esm/components/notificationpane/subcomponents/CloseChatButton.js +1 -3
  47. package/lib/esm/components/notificationpane/subcomponents/DismissButton.js +1 -3
  48. package/lib/esm/components/prechatsurveypane/PreChatSurveyPane.js +94 -16
  49. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultichoiceInputStyles.js +1 -0
  50. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneMultilineTextInputStyles.js +1 -0
  51. package/lib/esm/components/prechatsurveypane/common/defaultProps/defaultStyles/defaultPreChatSurveyPaneTextInputStyles.js +1 -0
  52. package/lib/types/common/Constants.d.ts +2 -0
  53. package/lib/types/components/chatbutton/ChatButton.blankAnnouncements.a11y.spec.d.ts +1 -0
  54. package/lib/types/components/chatbutton/ChatButton.browseMode.a11y.spec.d.ts +1 -0
  55. package/lib/types/components/chatbutton/ChatButton.browseMode.unfixed.a11y.spec.d.ts +1 -0
  56. package/lib/types/components/confirmationpane/interfaces/IConfirmationPaneControlProps.d.ts +1 -0
  57. package/lib/types/components/header/interfaces/IHeaderStyleProps.d.ts +12 -0
  58. package/lib/types/components/inputvalidationpane/interfaces/IInputValidationPaneControlProps.d.ts +1 -0
  59. package/package.json +41 -32
@@ -17,7 +17,7 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
17
17
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
18
18
  (0, _react2.initializeIcons)();
19
19
  function Header(props) {
20
- var _props$controlProps, _defaultHeaderProps$c, _defaultHeaderProps$s, _props$styleProps, _defaultHeaderProps$c2, _props$controlProps2, _defaultHeaderProps$c3, _props$controlProps3, _defaultHeaderProps$c4, _props$controlProps4, _defaultHeaderProps$c5, _props$controlProps5, _defaultHeaderProps$s2, _props$styleProps2, _defaultHeaderProps$s3, _props$styleProps3, _defaultHeaderProps$s4, _props$styleProps4, _defaultHeaderProps$s5, _props$styleProps5, _defaultHeaderProps$s6, _props$styleProps6, _defaultHeaderProps$s7, _props$styleProps7, _defaultHeaderProps$s8, _props$styleProps8, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$controlProps9, _props$componentOverr2, _props$controlProps0, _props$controlProps1, _props$controlProps10, _props$componentOverr3, _props$controlProps11, _props$controlProps12, _props$componentOverr4, _props$controlProps13;
20
+ var _props$controlProps, _defaultHeaderProps$c, _defaultHeaderProps$s, _props$styleProps, _defaultHeaderProps$c2, _props$controlProps2, _defaultHeaderProps$c3, _props$controlProps3, _defaultHeaderProps$c4, _props$controlProps4, _defaultHeaderProps$c5, _props$controlProps5, _defaultHeaderProps$s2, _props$styleProps2, _defaultHeaderProps$s3, _props$styleProps3, _defaultHeaderProps$s4, _props$styleProps4, _defaultHeaderProps$s5, _props$styleProps5, _defaultHeaderProps$s6, _props$styleProps6, _defaultHeaderProps$s7, _props$styleProps7, _defaultHeaderProps$s8, _props$styleProps8, _defaultHeaderProps$s9, _props$styleProps9, _defaultHeaderProps$s0, _props$styleProps0, _defaultHeaderProps$s1, _props$styleProps1, _props$controlProps6, _props$controlProps7, _props$controlProps8, _props$componentOverr, _props$controlProps9, _props$componentOverr2, _props$controlProps0, _props$controlProps1, _props$controlProps10, _props$componentOverr3, _props$controlProps11, _props$controlProps12, _props$componentOverr4, _props$controlProps13;
21
21
  const headerId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? ((_defaultHeaderProps$c = _defaultHeaderProps.defaultHeaderProps.controlProps) === null || _defaultHeaderProps$c === void 0 ? void 0 : _defaultHeaderProps$c.id);
22
22
  const stackStyles = {
23
23
  root: Object.assign({}, (_defaultHeaderProps$s = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s === void 0 ? void 0 : _defaultHeaderProps$s.generalStyleProps, (_props$styleProps = props.styleProps) === null || _props$styleProps === void 0 ? void 0 : _props$styleProps.generalStyleProps)
@@ -39,6 +39,9 @@ function Header(props) {
39
39
  const minimizeButtonStyles = Object.assign({}, (_defaultHeaderProps$s6 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s6 === void 0 ? void 0 : _defaultHeaderProps$s6.minimizeButtonStyleProps, (_props$styleProps6 = props.styleProps) === null || _props$styleProps6 === void 0 ? void 0 : _props$styleProps6.minimizeButtonStyleProps);
40
40
  const minimizeButtonHoverStyles = Object.assign({}, (_defaultHeaderProps$s7 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s7 === void 0 ? void 0 : _defaultHeaderProps$s7.minimizeButtonHoverStyleProps, (_props$styleProps7 = props.styleProps) === null || _props$styleProps7 === void 0 ? void 0 : _props$styleProps7.minimizeButtonHoverStyleProps);
41
41
  const headerItemFocusStyles = Object.assign({}, (_defaultHeaderProps$s8 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s8 === void 0 ? void 0 : _defaultHeaderProps$s8.headerItemFocusStyleProps, (_props$styleProps8 = props.styleProps) === null || _props$styleProps8 === void 0 ? void 0 : _props$styleProps8.headerItemFocusStyleProps);
42
+ const headerLeftGroupStyles = Object.assign({}, (_defaultHeaderProps$s9 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s9 === void 0 ? void 0 : _defaultHeaderProps$s9.headerLeftGroupStyleProps, (_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.headerLeftGroupStyleProps);
43
+ const headerLeftGroupInnerContainerStyles = Object.assign({}, (_defaultHeaderProps$s0 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s0 === void 0 ? void 0 : _defaultHeaderProps$s0.headerLeftGroupInnerContainerStyleProps, (_props$styleProps0 = props.styleProps) === null || _props$styleProps0 === void 0 ? void 0 : _props$styleProps0.headerLeftGroupInnerContainerStyleProps);
44
+ const titleContainerStyles = Object.assign({}, (_defaultHeaderProps$s1 = _defaultHeaderProps.defaultHeaderProps.styleProps) === null || _defaultHeaderProps$s1 === void 0 ? void 0 : _defaultHeaderProps$s1.titleContainerStyleProps, (_props$styleProps1 = props.styleProps) === null || _props$styleProps1 === void 0 ? void 0 : _props$styleProps1.titleContainerStyleProps);
42
45
  return /*#__PURE__*/React.createElement(_react2.Stack, {
43
46
  as: "article",
44
47
  id: headerId,
@@ -50,19 +53,28 @@ function Header(props) {
50
53
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
51
54
  horizontal: true,
52
55
  id: _Constants.Ids.HeaderLeftGroupId,
53
- verticalAlign: "center"
56
+ verticalAlign: "center",
57
+ styles: {
58
+ root: headerLeftGroupStyles
59
+ }
54
60
  }, /*#__PURE__*/React.createElement(_react2.Stack, {
55
61
  horizontal: true,
56
- verticalAlign: "center"
62
+ verticalAlign: "center",
63
+ styles: {
64
+ root: headerLeftGroupInnerContainerStyles
65
+ }
57
66
  }, (0, _utils.processCustomComponents)((_props$controlProps7 = props.controlProps) === null || _props$controlProps7 === void 0 || (_props$controlProps7 = _props$controlProps7.leftGroup) === null || _props$controlProps7 === void 0 ? void 0 : _props$controlProps7.children), !((_props$controlProps8 = props.controlProps) !== null && _props$controlProps8 !== void 0 && _props$controlProps8.hideIcon) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr = props.componentOverrides) === null || _props$componentOverr === void 0 ? void 0 : _props$componentOverr.headerIcon) || /*#__PURE__*/React.createElement(_react2.Image, {
58
67
  id: chatIconProps.id,
59
68
  src: chatIconProps.src,
60
69
  alt: chatIconProps.alt,
61
70
  tabIndex: -1,
62
71
  styles: iconImageStyles
63
- })), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement("h1", null, /*#__PURE__*/React.createElement(_react2.Label, {
72
+ })), !((_props$controlProps9 = props.controlProps) !== null && _props$controlProps9 !== void 0 && _props$controlProps9.hideTitle) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr2 = props.componentOverrides) === null || _props$componentOverr2 === void 0 ? void 0 : _props$componentOverr2.headerTitle) || /*#__PURE__*/React.createElement("h1", {
73
+ style: titleContainerStyles
74
+ }, /*#__PURE__*/React.createElement(_react2.Label, {
64
75
  id: titleProps.id,
65
76
  tabIndex: -1,
77
+ title: titleProps === null || titleProps === void 0 ? void 0 : titleProps.text,
66
78
  styles: titleStyles
67
79
  }, titleProps === null || titleProps === void 0 ? void 0 : titleProps.text))))), /*#__PURE__*/React.createElement(_react2.Stack, {
68
80
  horizontal: true,
@@ -43,5 +43,28 @@ const defaultHeaderStyleProps = exports.defaultHeaderStyleProps = {
43
43
  },
44
44
  headerItemFocusStyleProps: {
45
45
  border: "2px dotted #000"
46
+ },
47
+ headerLeftGroupStyleProps: {
48
+ flex: 1,
49
+ minWidth: 0,
50
+ overflow: "hidden"
51
+ },
52
+ headerLeftGroupInnerContainerStyleProps: {
53
+ minWidth: 0,
54
+ overflow: "hidden",
55
+ flex: 1,
56
+ maxWidth: "100%"
57
+ },
58
+ titleContainerStyleProps: {
59
+ margin: 0,
60
+ minWidth: 0,
61
+ overflow: "hidden",
62
+ flex: 1,
63
+ maxWidth: "100%",
64
+ display: "-webkit-box",
65
+ WebkitLineClamp: 2,
66
+ WebkitBoxOrient: "vertical",
67
+ textOverflow: "ellipsis",
68
+ wordBreak: "break-word"
46
69
  }
47
70
  };
@@ -9,9 +9,7 @@ var _Constants = require("../../../common/Constants");
9
9
  var _CommandButton = _interopRequireDefault(require("../../common/commandbutton/CommandButton"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  function MinimizeButton(props) {
12
- const {
13
- type
14
- } = props;
12
+ const type = props.type;
15
13
  const customEvent = {
16
14
  elementType: _Constants.ElementType.HeaderMinimizeButton,
17
15
  elementId: props === null || props === void 0 ? void 0 : props.id,
@@ -24,13 +24,31 @@ var _defaultInputValidationPaneSubtitleStyles = require("./common/default/defaul
24
24
  var _defaultInputValidationPaneTitleStyles = require("./common/default/defaultStyles/defaultInputValidationPaneTitleStyles");
25
25
  var _utils = require("../../common/utils");
26
26
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
27
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
28
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
29
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
30
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
31
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
32
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
27
33
  function InputValidationPane(props) {
28
- var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps12, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps0, _props$styleProps1, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$styleProps13, _props$styleProps14, _props$controlProps13, _props$styleProps15, _props$controlProps14, _props$controlProps15, _props$styleProps16, _props$controlProps16, _props$componentOverr, _props$styleProps17, _props$controlProps17, _props$controlProps18, _props$componentOverr2, _props$styleProps18, _props$controlProps19, _props$controlProps20, _props$componentOverr3, _props$styleProps19, _props$controlProps21, _props$controlProps22, _props$controlProps23, _props$componentOverr4, _props$styleProps20, _props$controlProps24, _props$controlProps25, _props$styleProps21, _props$controlProps26, _props$componentOverr5, _props$styleProps22, _props$controlProps27, _props$controlProps28, _props$controlProps29, _props$controlProps30, _props$componentOverr6, _props$styleProps23, _props$controlProps31, _props$controlProps32, _props$controlProps33;
34
+ var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$controlProps12, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps0, _props$styleProps1, _props$styleProps10, _props$styleProps11, _props$styleProps12, _props$styleProps13, _props$styleProps14, _props$controlProps13, _props$styleProps15, _props$controlProps14, _props$controlProps15, _props$styleProps16, _props$controlProps16, _props$componentOverr, _props$styleProps17, _props$controlProps17, _props$controlProps18, _props$componentOverr2, _props$styleProps18, _props$controlProps19, _props$controlProps20, _props$componentOverr3, _props$styleProps19, _props$controlProps21, _props$controlProps22, _props$controlProps23, _props$componentOverr4, _props$styleProps20, _props$controlProps24, _props$controlProps25, _props$styleProps21, _props$controlProps26, _props$controlProps27, _props$componentOverr5, _props$styleProps22, _props$controlProps28, _props$controlProps29, _props$controlProps30, _props$controlProps31, _props$componentOverr6, _props$styleProps23, _props$controlProps32, _props$controlProps33, _props$controlProps34;
29
35
  const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.id;
30
- const [inputValue, setInputValue] = (0, _react2.useState)("");
31
- const [isInitialRendering, setIsInitialRendering] = (0, _react2.useState)(true);
32
- const [isInvalidInput, setIsInvalidInput] = (0, _react2.useState)(false);
33
- const [isSendButtonEnabled, setIsSendButtonEnabled] = (0, _react2.useState)(false);
36
+ const _useState = (0, _react2.useState)(""),
37
+ _useState2 = _slicedToArray(_useState, 2),
38
+ inputValue = _useState2[0],
39
+ setInputValue = _useState2[1];
40
+ const _useState3 = (0, _react2.useState)(true),
41
+ _useState4 = _slicedToArray(_useState3, 2),
42
+ isInitialRendering = _useState4[0],
43
+ setIsInitialRendering = _useState4[1];
44
+ const _useState5 = (0, _react2.useState)(false),
45
+ _useState6 = _slicedToArray(_useState5, 2),
46
+ isInvalidInput = _useState6[0],
47
+ setIsInvalidInput = _useState6[1];
48
+ const _useState7 = (0, _react2.useState)(false),
49
+ _useState8 = _slicedToArray(_useState7, 2),
50
+ isSendButtonEnabled = _useState8[0],
51
+ setIsSendButtonEnabled = _useState8[1];
34
52
  const isValidInput = (0, _react2.useCallback)(() => {
35
53
  var _props$controlProps2, _props$controlProps3;
36
54
  if (!((_props$controlProps2 = props.controlProps) !== null && _props$controlProps2 !== void 0 && _props$controlProps2.checkInput)) {
@@ -220,26 +238,28 @@ function InputValidationPane(props) {
220
238
  className: (_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 || (_props$styleProps21 = _props$styleProps21.classNames) === null || _props$styleProps21 === void 0 ? void 0 : _props$styleProps21.buttonGroupClassName,
221
239
  styles: buttonGroupStyles,
222
240
  tabIndex: -1,
223
- id: elementId + "-buttongroup"
224
- }, !((_props$controlProps26 = props.controlProps) !== null && _props$controlProps26 !== void 0 && _props$controlProps26.hideSendButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.sendButton) || /*#__PURE__*/_react2.default.createElement(_Button.PrimaryButton, {
241
+ id: elementId + "-buttongroup",
242
+ role: "group",
243
+ "aria-label": ((_props$controlProps26 = props.controlProps) === null || _props$controlProps26 === void 0 ? void 0 : _props$controlProps26.buttonGroupAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.buttonGroupAriaLabel
244
+ }, !((_props$controlProps27 = props.controlProps) !== null && _props$controlProps27 !== void 0 && _props$controlProps27.hideSendButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr5 = props.componentOverrides) === null || _props$componentOverr5 === void 0 ? void 0 : _props$componentOverr5.sendButton) || /*#__PURE__*/_react2.default.createElement(_Button.PrimaryButton, {
225
245
  className: (_props$styleProps22 = props.styleProps) === null || _props$styleProps22 === void 0 || (_props$styleProps22 = _props$styleProps22.classNames) === null || _props$styleProps22 === void 0 ? void 0 : _props$styleProps22.sendButtonClassName,
226
246
  styles: sendButtonStyles,
227
- title: ((_props$controlProps27 = props.controlProps) === null || _props$controlProps27 === void 0 ? void 0 : _props$controlProps27.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
247
+ title: ((_props$controlProps28 = props.controlProps) === null || _props$controlProps28 === void 0 ? void 0 : _props$controlProps28.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
228
248
  tabIndex: 0,
229
249
  disabled: !isSendButtonEnabled,
230
- text: ((_props$controlProps28 = props.controlProps) === null || _props$controlProps28 === void 0 ? void 0 : _props$controlProps28.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
250
+ text: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonText,
231
251
  onClick: handleSendClick,
232
252
  id: elementId + "-sendbutton",
233
- ariaLabel: ((_props$controlProps29 = props.controlProps) === null || _props$controlProps29 === void 0 ? void 0 : _props$controlProps29.sendButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonAriaLabel
234
- })), !((_props$controlProps30 = props.controlProps) !== null && _props$controlProps30 !== void 0 && _props$controlProps30.hideCancelButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.cancelButton) || /*#__PURE__*/_react2.default.createElement(_Button.DefaultButton, {
253
+ ariaLabel: ((_props$controlProps30 = props.controlProps) === null || _props$controlProps30 === void 0 ? void 0 : _props$controlProps30.sendButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.sendButtonAriaLabel
254
+ })), !((_props$controlProps31 = props.controlProps) !== null && _props$controlProps31 !== void 0 && _props$controlProps31.hideCancelButton) && ((0, _decodeComponentString.decodeComponentString)((_props$componentOverr6 = props.componentOverrides) === null || _props$componentOverr6 === void 0 ? void 0 : _props$componentOverr6.cancelButton) || /*#__PURE__*/_react2.default.createElement(_Button.DefaultButton, {
235
255
  className: (_props$styleProps23 = props.styleProps) === null || _props$styleProps23 === void 0 || (_props$styleProps23 = _props$styleProps23.classNames) === null || _props$styleProps23 === void 0 ? void 0 : _props$styleProps23.cancelButtonClassName,
236
256
  styles: cancelButtonStyles,
237
- title: ((_props$controlProps31 = props.controlProps) === null || _props$controlProps31 === void 0 ? void 0 : _props$controlProps31.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
257
+ title: ((_props$controlProps32 = props.controlProps) === null || _props$controlProps32 === void 0 ? void 0 : _props$controlProps32.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
238
258
  tabIndex: 0,
239
- text: ((_props$controlProps32 = props.controlProps) === null || _props$controlProps32 === void 0 ? void 0 : _props$controlProps32.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
259
+ text: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonText) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonText,
240
260
  onClick: handleCancelClick,
241
261
  id: elementId + "-cancelbutton",
242
- ariaLabel: ((_props$controlProps33 = props.controlProps) === null || _props$controlProps33 === void 0 ? void 0 : _props$controlProps33.cancelButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonAriaLabel
262
+ ariaLabel: ((_props$controlProps34 = props.controlProps) === null || _props$controlProps34 === void 0 ? void 0 : _props$controlProps34.cancelButtonAriaLabel) || _defaultInputValidationPaneControlProps.defaultInputValidationPaneControlProps.cancelButtonAriaLabel
243
263
  })))));
244
264
  }
245
265
  var _default = exports.default = InputValidationPane;
@@ -22,6 +22,7 @@ const defaultInputValidationPaneControlProps = exports.defaultInputValidationPan
22
22
  inputWithErrorMessageBorderColor: "rgb(164, 38, 44)",
23
23
  invalidInputErrorMessageText: _Constants.Texts.InvalidInputErrorMessageText,
24
24
  isButtonGroupHorizontal: true,
25
+ buttonGroupAriaLabel: _Constants.AriaLabels.InputValidationPaneButtonGroup,
25
26
  hideSendButton: false,
26
27
  enableSendButton: false,
27
28
  sendButtonText: _Constants.Texts.SaveButtonText,
@@ -9,9 +9,7 @@ var _Constants = require("../../../common/Constants");
9
9
  var _CommandButton = _interopRequireDefault(require("../../common/commandbutton/CommandButton"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  function CloseChatButton(props) {
12
- const {
13
- type
14
- } = props;
12
+ const type = props.type;
15
13
  const customEvent = {
16
14
  elementType: _Constants.ElementType.NotificationCloseChatButton,
17
15
  elementId: props === null || props === void 0 ? void 0 : props.id,
@@ -9,9 +9,7 @@ var _Constants = require("../../../common/Constants");
9
9
  var _CommandButton = _interopRequireDefault(require("../../common/commandbutton/CommandButton"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  function DismissButton(props) {
12
- const {
13
- type
14
- } = props;
12
+ const type = props.type;
15
13
  const customEvent = {
16
14
  elementType: _Constants.ElementType.NotificationDismissButton,
17
15
  elementId: props === null || props === void 0 ? void 0 : props.id,
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var AdaptiveCards = _interopRequireWildcard(require("adaptivecards"));
7
+ var AdaptiveCards = _interopRequireWildcard(require("adaptivecards/dist/adaptivecards.js"));
8
8
  var _Constants = require("../../common/Constants");
9
9
  var _react = require("@fluentui/react");
10
10
  var _react2 = _interopRequireWildcard(require("react"));
@@ -15,9 +15,58 @@ var _defaultPreChatSurveyPaneControlProps = require("./common/defaultProps/defau
15
15
  var _defaultPreChatSurveyPaneGeneralStyles = require("./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneGeneralStyles");
16
16
  var _defaultPreChatSurveyPaneStyles = require("./common/defaultProps/defaultStyles/defaultPreChatSurveyPaneStyles");
17
17
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
+ // Detect iOS (iPhone/iPad/iPod) including iPadOS 13+ which reports as Mac with touch support.
19
+ // Used to scope iOS-only Safari workarounds; must not match other platforms.
20
+ const isIOSDevice = () => {
21
+ if (typeof navigator === "undefined") {
22
+ return false;
23
+ }
24
+ const ua = navigator.userAgent || "";
25
+ if (/iPad|iPhone|iPod/.test(ua)) {
26
+ return true;
27
+ }
28
+ return ua.includes("Mac") && typeof document !== "undefined" && "ontouchend" in document;
29
+ };
30
+
31
+ // iOS-only: AdaptiveCards' ChoiceSetInput value getter treats `selectedIndex > 0` as "user selected"
32
+ // and returns undefined for index 0 (assuming it is always the injected placeholder).
33
+ // On iOS we remove the placeholder to avoid a blank picker row, which shifts the first real
34
+ // option to index 0 — so the original getter wrongly reports undefined and required-field
35
+ // validation fails. Patch the prototype once to accept index >= 0.
36
+ let iosChoiceSetValuePatched = false;
37
+ const patchIOSChoiceSetValueGetter = () => {
38
+ if (iosChoiceSetValuePatched) {
39
+ return;
40
+ }
41
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
42
+ const ChoiceSetInput = AdaptiveCards.ChoiceSetInput;
43
+ if (!ChoiceSetInput || !ChoiceSetInput.prototype) {
44
+ return;
45
+ }
46
+ const descriptor = Object.getOwnPropertyDescriptor(ChoiceSetInput.prototype, "value");
47
+ if (!descriptor || !descriptor.get) {
48
+ return;
49
+ }
50
+ Object.defineProperty(ChoiceSetInput.prototype, "value", {
51
+ configurable: true,
52
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
53
+ get: function () {
54
+ var _descriptor$get;
55
+ if (!this.isMultiSelect && this._selectElement) {
56
+ return this._selectElement.selectedIndex >= 0 ? this._selectElement.value : undefined;
57
+ }
58
+ return (_descriptor$get = descriptor.get) === null || _descriptor$get === void 0 ? void 0 : _descriptor$get.call(this);
59
+ }
60
+ });
61
+ iosChoiceSetValuePatched = true;
62
+ };
18
63
  function PreChatSurveyPane(props) {
19
- var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _props$styleProps0, _defaultPreChatSurvey, _props$styleProps1, _defaultPreChatSurvey2, _props$styleProps10, _props$styleProps11, _defaultPreChatSurvey3, _props$styleProps12, _defaultPreChatSurvey4, _props$styleProps13, _props$styleProps14, _defaultPreChatSurvey5, _props$styleProps15, _defaultPreChatSurvey6, _props$styleProps16, _defaultPreChatSurvey7, _props$styleProps17, _defaultPreChatSurvey8, _props$styleProps18, _defaultPreChatSurvey9, _props$styleProps19, _defaultPreChatSurvey0, _props$styleProps20, _defaultPreChatSurvey1, _props$styleProps21, _defaultPreChatSurvey10, _props$controlProps6, _props$controlProps7, _props$controlProps8;
64
+ var _props$controlProps, _props$styleProps, _props$styleProps2, _props$styleProps3, _props$styleProps4, _props$styleProps5, _props$styleProps6, _props$styleProps7, _props$styleProps8, _props$styleProps9, _defaultPreChatSurvey, _props$styleProps0, _defaultPreChatSurvey2, _props$styleProps1, _defaultPreChatSurvey3, _props$styleProps10, _defaultPreChatSurvey4, _props$styleProps11, _defaultPreChatSurvey5, _props$styleProps12, _defaultPreChatSurvey6, _props$styleProps13, _defaultPreChatSurvey7, _props$styleProps14, _defaultPreChatSurvey8, _props$styleProps15, _defaultPreChatSurvey9, _props$styleProps16, _defaultPreChatSurvey0, _props$styleProps17, _defaultPreChatSurvey1, _props$styleProps18, _defaultPreChatSurvey10, _props$styleProps19, _defaultPreChatSurvey11, _props$styleProps20, _defaultPreChatSurvey12, _props$styleProps21, _defaultPreChatSurvey13, _props$controlProps6, _props$controlProps7, _props$controlProps8;
20
65
  const elementId = ((_props$controlProps = props.controlProps) === null || _props$controlProps === void 0 ? void 0 : _props$controlProps.id) ?? _defaultPreChatSurveyPaneControlProps.defaultPreChatSurveyPaneControlProps.id;
66
+ const isIOS = isIOSDevice();
67
+ if (isIOS) {
68
+ patchIOSChoiceSetValueGetter();
69
+ }
21
70
  let adpativeCardPayload;
22
71
  let adaptiveCardHostConfig;
23
72
  const containerStyles = {
@@ -71,6 +120,31 @@ function PreChatSurveyPane(props) {
71
120
  // Render the card
72
121
  const renderedCard = adaptiveCard.render();
73
122
  (0, _utils.addNoreferrerNoopenerTag)(renderedCard);
123
+
124
+ // Fix iOS Safari blank space in <select> dropdowns. iOS-only; other platforms render correctly.
125
+ // The placeholder option that AdaptiveCards injects renders as a blank row in the iOS
126
+ // native picker (CSS display/hidden are ignored on <option>). Removing it from the DOM
127
+ // is the only reliable workaround. After removal, we select the first remaining option
128
+ // and notify AdaptiveCards so required-field validation reads the visible value.
129
+ const applyIOSPrechatFix = container => {
130
+ const selectElements = container.querySelectorAll("select.ac-choiceSetInput-compact");
131
+ selectElements.forEach(select => {
132
+ const firstOption = select.options[0];
133
+ if (firstOption && firstOption.disabled && firstOption.hidden && firstOption.value === "") {
134
+ firstOption.remove();
135
+ if (select.options.length > 0) {
136
+ select.selectedIndex = 0;
137
+ select.value = select.options[0].value;
138
+ select.dispatchEvent(new Event("input", {
139
+ bubbles: true
140
+ }));
141
+ select.dispatchEvent(new Event("change", {
142
+ bubbles: true
143
+ }));
144
+ }
145
+ }
146
+ });
147
+ };
74
148
  return /*#__PURE__*/_react2.default.createElement(_react2.default.Fragment, null, /*#__PURE__*/_react2.default.createElement("style", null, `
75
149
  .ac-textBlock {
76
150
  font-size: ${(_props$styleProps3 = props.styleProps) === null || _props$styleProps3 === void 0 || (_props$styleProps3 = _props$styleProps3.customTextStyleProps) === null || _props$styleProps3 === void 0 ? void 0 : _props$styleProps3.fontSize} !important;
@@ -88,39 +162,39 @@ function PreChatSurveyPane(props) {
88
162
  margin-bottom: 6px;
89
163
  }
90
164
  .ac-input.ac-textInput {
91
- font-size: ${(_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 || (_props$styleProps9 = _props$styleProps9.customTextInputStyleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.fontSize};
92
- font-family: ${((_props$styleProps0 = props.styleProps) === null || _props$styleProps0 === void 0 || (_props$styleProps0 = _props$styleProps0.customTextInputStyleProps) === null || _props$styleProps0 === void 0 ? void 0 : _props$styleProps0.fontFamily) ?? ((_defaultPreChatSurvey = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.fontFamily)};
93
- height: ${((_props$styleProps1 = props.styleProps) === null || _props$styleProps1 === void 0 || (_props$styleProps1 = _props$styleProps1.customTextInputStyleProps) === null || _props$styleProps1 === void 0 ? void 0 : _props$styleProps1.height) ?? ((_defaultPreChatSurvey2 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.height)};
165
+ font-size: ${((_props$styleProps9 = props.styleProps) === null || _props$styleProps9 === void 0 || (_props$styleProps9 = _props$styleProps9.customTextInputStyleProps) === null || _props$styleProps9 === void 0 ? void 0 : _props$styleProps9.fontSize) ?? ((_defaultPreChatSurvey = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey === void 0 ? void 0 : _defaultPreChatSurvey.fontSize)};
166
+ font-family: ${((_props$styleProps0 = props.styleProps) === null || _props$styleProps0 === void 0 || (_props$styleProps0 = _props$styleProps0.customTextInputStyleProps) === null || _props$styleProps0 === void 0 ? void 0 : _props$styleProps0.fontFamily) ?? ((_defaultPreChatSurvey2 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey2 === void 0 ? void 0 : _defaultPreChatSurvey2.fontFamily)};
167
+ height: ${((_props$styleProps1 = props.styleProps) === null || _props$styleProps1 === void 0 || (_props$styleProps1 = _props$styleProps1.customTextInputStyleProps) === null || _props$styleProps1 === void 0 ? void 0 : _props$styleProps1.height) ?? ((_defaultPreChatSurvey3 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customTextInputStyleProps) === null || _defaultPreChatSurvey3 === void 0 ? void 0 : _defaultPreChatSurvey3.height)};
94
168
  padding: 8px;
95
169
  }
96
170
  .ac-input.ac-textInput.ac-multiline {
97
- font-size: ${(_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 || (_props$styleProps10 = _props$styleProps10.customMultilineTextInputStyleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.fontSize};
98
- font-family: ${((_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 || (_props$styleProps11 = _props$styleProps11.customMultilineTextInputStyleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.fontFamily) ?? ((_defaultPreChatSurvey3 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey3 === void 0 ? void 0 : _defaultPreChatSurvey3.fontFamily)};
99
- height: ${((_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 || (_props$styleProps12 = _props$styleProps12.customMultilineTextInputStyleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.height) ?? ((_defaultPreChatSurvey4 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.height)};
171
+ font-size: ${((_props$styleProps10 = props.styleProps) === null || _props$styleProps10 === void 0 || (_props$styleProps10 = _props$styleProps10.customMultilineTextInputStyleProps) === null || _props$styleProps10 === void 0 ? void 0 : _props$styleProps10.fontSize) ?? ((_defaultPreChatSurvey4 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey4 === void 0 ? void 0 : _defaultPreChatSurvey4.fontSize)};
172
+ font-family: ${((_props$styleProps11 = props.styleProps) === null || _props$styleProps11 === void 0 || (_props$styleProps11 = _props$styleProps11.customMultilineTextInputStyleProps) === null || _props$styleProps11 === void 0 ? void 0 : _props$styleProps11.fontFamily) ?? ((_defaultPreChatSurvey5 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontFamily)};
173
+ height: ${((_props$styleProps12 = props.styleProps) === null || _props$styleProps12 === void 0 || (_props$styleProps12 = _props$styleProps12.customMultilineTextInputStyleProps) === null || _props$styleProps12 === void 0 ? void 0 : _props$styleProps12.height) ?? ((_defaultPreChatSurvey6 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultilineTextInputStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.height)};
100
174
  resize: none;
101
175
  }
102
176
  .ac-input.ac-multichoiceInput {
103
- font-size: ${(_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 || (_props$styleProps13 = _props$styleProps13.customMultichoiceInputStyleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.fontSize};
104
- font-family: ${((_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 || (_props$styleProps14 = _props$styleProps14.customMultichoiceInputStyleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.fontFamily) ?? ((_defaultPreChatSurvey5 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultichoiceInputStyleProps) === null || _defaultPreChatSurvey5 === void 0 ? void 0 : _defaultPreChatSurvey5.fontFamily)};
177
+ font-size: ${((_props$styleProps13 = props.styleProps) === null || _props$styleProps13 === void 0 || (_props$styleProps13 = _props$styleProps13.customMultichoiceInputStyleProps) === null || _props$styleProps13 === void 0 ? void 0 : _props$styleProps13.fontSize) ?? ((_defaultPreChatSurvey7 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultichoiceInputStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.fontSize)};
178
+ font-family: ${((_props$styleProps14 = props.styleProps) === null || _props$styleProps14 === void 0 || (_props$styleProps14 = _props$styleProps14.customMultichoiceInputStyleProps) === null || _props$styleProps14 === void 0 ? void 0 : _props$styleProps14.fontFamily) ?? ((_defaultPreChatSurvey8 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customMultichoiceInputStyleProps) === null || _defaultPreChatSurvey8 === void 0 ? void 0 : _defaultPreChatSurvey8.fontFamily)};
105
179
  padding: 3px;
106
180
  padding-top: 7px;
107
181
  padding-bottom: 7px;
108
182
  }
109
183
  .ac-input.ac-toggleInput {
110
- align-items: ${((_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 || (_props$styleProps15 = _props$styleProps15.customToggleInputStyleProps) === null || _props$styleProps15 === void 0 ? void 0 : _props$styleProps15.alignItems) ?? ((_defaultPreChatSurvey6 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customToggleInputStyleProps) === null || _defaultPreChatSurvey6 === void 0 ? void 0 : _defaultPreChatSurvey6.alignItems)} !important;
184
+ align-items: ${((_props$styleProps15 = props.styleProps) === null || _props$styleProps15 === void 0 || (_props$styleProps15 = _props$styleProps15.customToggleInputStyleProps) === null || _props$styleProps15 === void 0 ? void 0 : _props$styleProps15.alignItems) ?? ((_defaultPreChatSurvey9 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customToggleInputStyleProps) === null || _defaultPreChatSurvey9 === void 0 ? void 0 : _defaultPreChatSurvey9.alignItems)} !important;
111
185
  }
112
186
  .ac-pushButton {
113
187
  border: 1px solid #00000000;
114
188
  margin: 2px;
115
- height: ${((_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 || (_props$styleProps16 = _props$styleProps16.customButtonStyleProps) === null || _props$styleProps16 === void 0 ? void 0 : _props$styleProps16.height) ?? ((_defaultPreChatSurvey7 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey7 === void 0 ? void 0 : _defaultPreChatSurvey7.height)};
116
- width: ${((_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 || (_props$styleProps17 = _props$styleProps17.customButtonStyleProps) === null || _props$styleProps17 === void 0 ? void 0 : _props$styleProps17.width) ?? ((_defaultPreChatSurvey8 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey8 === void 0 ? void 0 : _defaultPreChatSurvey8.width)};
189
+ height: ${((_props$styleProps16 = props.styleProps) === null || _props$styleProps16 === void 0 || (_props$styleProps16 = _props$styleProps16.customButtonStyleProps) === null || _props$styleProps16 === void 0 ? void 0 : _props$styleProps16.height) ?? ((_defaultPreChatSurvey0 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey0 === void 0 ? void 0 : _defaultPreChatSurvey0.height)};
190
+ width: ${((_props$styleProps17 = props.styleProps) === null || _props$styleProps17 === void 0 || (_props$styleProps17 = _props$styleProps17.customButtonStyleProps) === null || _props$styleProps17 === void 0 ? void 0 : _props$styleProps17.width) ?? ((_defaultPreChatSurvey1 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey1 === void 0 ? void 0 : _defaultPreChatSurvey1.width)};
117
191
  border-radius: 5px;
118
192
  cursor: pointer;
119
193
  font-weight: bold;
120
- font-size: ${((_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 || (_props$styleProps18 = _props$styleProps18.customButtonStyleProps) === null || _props$styleProps18 === void 0 ? void 0 : _props$styleProps18.fontSize) ?? ((_defaultPreChatSurvey9 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey9 === void 0 ? void 0 : _defaultPreChatSurvey9.fontSize)};
121
- font-family: ${((_props$styleProps19 = props.styleProps) === null || _props$styleProps19 === void 0 || (_props$styleProps19 = _props$styleProps19.customButtonStyleProps) === null || _props$styleProps19 === void 0 ? void 0 : _props$styleProps19.fontFamily) ?? ((_defaultPreChatSurvey0 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey0 === void 0 ? void 0 : _defaultPreChatSurvey0.fontFamily)};
122
- color: ${((_props$styleProps20 = props.styleProps) === null || _props$styleProps20 === void 0 || (_props$styleProps20 = _props$styleProps20.customButtonStyleProps) === null || _props$styleProps20 === void 0 ? void 0 : _props$styleProps20.color) ?? ((_defaultPreChatSurvey1 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey1 === void 0 ? void 0 : _defaultPreChatSurvey1.color)};
123
- background-color: ${((_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 || (_props$styleProps21 = _props$styleProps21.customButtonStyleProps) === null || _props$styleProps21 === void 0 ? void 0 : _props$styleProps21.backgroundColor) ?? ((_defaultPreChatSurvey10 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey10 === void 0 ? void 0 : _defaultPreChatSurvey10.backgroundColor)};
194
+ font-size: ${((_props$styleProps18 = props.styleProps) === null || _props$styleProps18 === void 0 || (_props$styleProps18 = _props$styleProps18.customButtonStyleProps) === null || _props$styleProps18 === void 0 ? void 0 : _props$styleProps18.fontSize) ?? ((_defaultPreChatSurvey10 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey10 === void 0 ? void 0 : _defaultPreChatSurvey10.fontSize)};
195
+ font-family: ${((_props$styleProps19 = props.styleProps) === null || _props$styleProps19 === void 0 || (_props$styleProps19 = _props$styleProps19.customButtonStyleProps) === null || _props$styleProps19 === void 0 ? void 0 : _props$styleProps19.fontFamily) ?? ((_defaultPreChatSurvey11 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey11 === void 0 ? void 0 : _defaultPreChatSurvey11.fontFamily)};
196
+ color: ${((_props$styleProps20 = props.styleProps) === null || _props$styleProps20 === void 0 || (_props$styleProps20 = _props$styleProps20.customButtonStyleProps) === null || _props$styleProps20 === void 0 ? void 0 : _props$styleProps20.color) ?? ((_defaultPreChatSurvey12 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey12 === void 0 ? void 0 : _defaultPreChatSurvey12.color)};
197
+ background-color: ${((_props$styleProps21 = props.styleProps) === null || _props$styleProps21 === void 0 || (_props$styleProps21 = _props$styleProps21.customButtonStyleProps) === null || _props$styleProps21 === void 0 ? void 0 : _props$styleProps21.backgroundColor) ?? ((_defaultPreChatSurvey13 = _defaultPreChatSurveyPaneStyles.defaultPreChatSurveyPaneStyles.customButtonStyleProps) === null || _defaultPreChatSurvey13 === void 0 ? void 0 : _defaultPreChatSurvey13.backgroundColor)};
124
198
  }`), !((_props$controlProps6 = props.controlProps) !== null && _props$controlProps6 !== void 0 && _props$controlProps6.hidePreChatSurveyPane) && /*#__PURE__*/_react2.default.createElement(_react.Stack, {
125
199
  id: elementId,
126
200
  tabIndex: -1,
@@ -135,6 +209,9 @@ function PreChatSurveyPane(props) {
135
209
  // Returns React element
136
210
  renderedCard && n && n.appendChild(renderedCard);
137
211
  n && n.childElementCount > 1 && n.lastChild && n.removeChild(n.lastChild); // Removes duplicates fix
212
+ if (isIOS && n) {
213
+ applyIOSPrechatFix(n);
214
+ }
138
215
  }
139
216
  }))));
140
217
  }
@@ -5,5 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultPreChatSurveyPaneMultichoiceInputStyles = void 0;
7
7
  const defaultPreChatSurveyPaneMultichoiceInputStyles = exports.defaultPreChatSurveyPaneMultichoiceInputStyles = {
8
+ fontSize: "16px",
8
9
  fontFamily: "Segoe UI, Helvetica Neue, sans-serif"
9
10
  };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultPreChatSurveyPaneMultilineTextInputStyles = void 0;
7
7
  const defaultPreChatSurveyPaneMultilineTextInputStyles = exports.defaultPreChatSurveyPaneMultilineTextInputStyles = {
8
+ fontSize: "16px",
8
9
  height: "52px",
9
10
  fontFamily: "Segoe UI, Helvetica Neue, sans-serif"
10
11
  };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.defaultPreChatSurveyPaneTextInputStyles = void 0;
7
7
  const defaultPreChatSurveyPaneTextInputStyles = exports.defaultPreChatSurveyPaneTextInputStyles = {
8
+ fontSize: "16px",
8
9
  height: "20px",
9
10
  fontFamily: "Segoe UI, Helvetica Neue, sans-serif"
10
11
  };
@@ -0,0 +1 @@
1
+ {"type":"commonjs"}
@@ -4,15 +4,12 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
8
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
9
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
10
7
  class EventQueue {
11
8
  constructor(newMessage) {
12
- _defineProperty(this, "queueing", false);
13
- _defineProperty(this, "channelEventQueue", void 0);
14
- _defineProperty(this, "queueingId", void 0);
15
- _defineProperty(this, "newMessage", void 0);
9
+ this.queueing = false;
10
+ this.channelEventQueue = void 0;
11
+ this.queueingId = void 0;
12
+ this.newMessage = void 0;
16
13
  this.channelEventQueue = new Map();
17
14
  this.newMessage = newMessage;
18
15
  }
@@ -44,6 +44,6 @@ export let ElementType = /*#__PURE__*/function (ElementType) {
44
44
  export const Ids = (_Class3 = class Ids {}, _defineProperty(_Class3, "DefaultCallingContainerId", "lcw-calling-container"), _defineProperty(_Class3, "DefaultCurrentCallId", "lcw-current-call-container"), _defineProperty(_Class3, "CurrentCallActionGroupId", "lcw-current-call-action-icons"), _defineProperty(_Class3, "CurrentCallFooterId", "lcw-current-call-footer"), _defineProperty(_Class3, "RemoteVideoTileId", "lcw-remote-video"), _defineProperty(_Class3, "SelfVideoTileId", "lcw-self-video"), _defineProperty(_Class3, "VideoTileGroupId", "lcw-current-call-body"), _defineProperty(_Class3, "EndCallButtonId", "lcw-call-reject-button"), _defineProperty(_Class3, "MicButtonId", "lcw-toggle-audio"), _defineProperty(_Class3, "VideoButtonId", "lcw-toggle-video"), _defineProperty(_Class3, "CallTimerId", "lcw-current-call-timer"), _defineProperty(_Class3, "CurrentCallLeftGroupId", "lcw-current-call-left-group"), _defineProperty(_Class3, "CurrentCallMiddleGroupId", "lcw-current-call-middle-group"), _defineProperty(_Class3, "CurrentCallRightGroupId", "lcw-current-call-right-group"), _defineProperty(_Class3, "DefaultIncomingCallId", "lcw-incoming-call"), _defineProperty(_Class3, "DeclineCallButtonId", "lcw-call-reject-button"), _defineProperty(_Class3, "AudioCallButtonId", "lcw-call-accept-button"), _defineProperty(_Class3, "VideoCallButtonId", "lcw-video-call-accept-button"), _defineProperty(_Class3, "IncomingCallTitleId", "lcw-incoming-call-message"), _defineProperty(_Class3, "DefaultIncomingCallPopupId", "lcw-incoming-call-popup"), _defineProperty(_Class3, "IncomingCallLeftGroupId", "lcw-incoming-call-left-group"), _defineProperty(_Class3, "IncomingCallMiddleGroupId", "lcw-incoming-call-middle-group"), _defineProperty(_Class3, "IncomingCallRightGroupId", "lcw-incoming-call-right-group"), _defineProperty(_Class3, "DefaultChatButtonId", "lcw-components-chat-button"), _defineProperty(_Class3, "DefaultConfirmationPaneId", "lcw-components-confirmation-pane"), _defineProperty(_Class3, "CustomFooterId", "lcw-footer"), _defineProperty(_Class3, "DownloadTranscriptButtonId", "lcw-footer-download-transcript-button"), _defineProperty(_Class3, "EmailTranscriptButtonId", "lcw-footer-email-transcript-button"), _defineProperty(_Class3, "AudioNotificationButtonId", "lcw-footer-audio-notification-button"), _defineProperty(_Class3, "DefaultFooterId", "lcw-components-footer"), _defineProperty(_Class3, "FooterLeftGroupId", "lcw-footer-left-group"), _defineProperty(_Class3, "FooterMiddleGroupId", "lcw-footer-middle-group"), _defineProperty(_Class3, "FooterRightGroupId", "lcw-footer-right-group"), _defineProperty(_Class3, "DefaultHeaderId", "lcw-header"), _defineProperty(_Class3, "MinimizeButtonId", "lcw-header-minimize-button"), _defineProperty(_Class3, "CloseButtonId", "lcw-header-close-button"), _defineProperty(_Class3, "HeaderIconId", "lcw-header-icon"), _defineProperty(_Class3, "HeaderTitleId", "lcw-header-title"), _defineProperty(_Class3, "HeaderLeftGroupId", "lcw-header-left-group"), _defineProperty(_Class3, "HeaderMiddleGroupId", "lcw-header-middle-group"), _defineProperty(_Class3, "HeaderRightGroupId", "lcw-header-right-group"), _defineProperty(_Class3, "DefaultInputValidationPaneId", "lcw-email-transcript-dialog-container"), _defineProperty(_Class3, "DefaultInputValidationPaneInputId", "lcw-email-transcript-dialog-text-field"), _defineProperty(_Class3, "DefaultLoadingPaneId", "lcw-loading-pane"), _defineProperty(_Class3, "DefaultNotificationPaneId", "lcw-notification-pane"), _defineProperty(_Class3, "DefaultOOOHPaneId", "lcw-out-of-office-hours-pane"), _defineProperty(_Class3, "DefaultPostChatSurveyPaneId", "lcw-postchat-survey-pane"), _defineProperty(_Class3, "DefaultPreChatSurveyPaneId", "lcw-prechat-survey-pane-default"), _defineProperty(_Class3, "DefaultProactiveChatPaneId", "lcw-proactive-chat"), _defineProperty(_Class3, "DefaultReconnectChatPaneId", "lcw-reconnect-chat-pane"), _Class3);
45
45
  export const ButtonTypes = (_Class4 = class ButtonTypes {}, _defineProperty(_Class4, "Icon", "icon"), _defineProperty(_Class4, "Text", "text"), _Class4);
46
46
  export const IconNames = (_Class5 = class IconNames {}, _defineProperty(_Class5, "DeclineCall", "DeclineCall"), _defineProperty(_Class5, "Microphone", "Microphone"), _defineProperty(_Class5, "MicOff2", "MicOff2"), _defineProperty(_Class5, "Video", "Video"), _defineProperty(_Class5, "VideoOff", "VideoOff"), _defineProperty(_Class5, "IncomingCall", "IncomingCall"), _defineProperty(_Class5, "ChromeClose", "ChromeClose"), _defineProperty(_Class5, "Download", "Download"), _defineProperty(_Class5, "Mail", "Mail"), _defineProperty(_Class5, "Volume3", "Volume3"), _defineProperty(_Class5, "Volume0", "Volume0"), _defineProperty(_Class5, "ChromeMinimize", "ChromeMinimize"), _Class5);
47
- export const AriaLabels = (_Class6 = class AriaLabels {}, _defineProperty(_Class6, "EndCall", "End Call"), _defineProperty(_Class6, "MicMute", "Mute"), _defineProperty(_Class6, "MicUnmute", "Unmute"), _defineProperty(_Class6, "VideoTurnCameraOn", "Turn camera on"), _defineProperty(_Class6, "VideoTurnCameraOff", "Turn camera off"), _defineProperty(_Class6, "IncomingCallArea", "Incoming call area"), _defineProperty(_Class6, "RejectCall", "Reject call"), _defineProperty(_Class6, "AcceptVoiceCall", "Accept voice call"), _defineProperty(_Class6, "AcceptVideoCall", "Accept video Call"), _defineProperty(_Class6, "DeclineCall", "Decline Call"), _defineProperty(_Class6, "AudioCall", "Audio Call"), _defineProperty(_Class6, "VideoCall", "Video Call"), _defineProperty(_Class6, "LetsChatWeAreOnline", "Let's chat we are online"), _defineProperty(_Class6, "UnreadMessageString", "you have new messages"), _defineProperty(_Class6, "Close", "Close"), _defineProperty(_Class6, "ConfirmationPaneConfirm", "Close Chat"), _defineProperty(_Class6, "ConfirmationPaneCancel", "Cancel. Return to Chat"), _defineProperty(_Class6, "DownloadChatTranscript", "Download chat transcript"), _defineProperty(_Class6, "EmailTranscript", "Email Transcript"), _defineProperty(_Class6, "TurnSoundOff", "Turn sound off"), _defineProperty(_Class6, "TurnSoundOn", "Turn sound on"), _defineProperty(_Class6, "Minimize", "Minimize"), _defineProperty(_Class6, "EmailChatTranscriptPane", "Email Chat Transcript Pane"), _defineProperty(_Class6, "InputValidationPaneInput", "Please provide e-mail address to send transcript. The transcript will be sent after the chat ends. Email address text area"), _defineProperty(_Class6, "Save", "Save"), _defineProperty(_Class6, "Cancel", "Cancel"), _defineProperty(_Class6, "ProactiveChatPane", "Proactive Chat Pane"), _defineProperty(_Class6, "ChatNow", "Chat Now"), _defineProperty(_Class6, "ReconnectChatPane", "Reconnect Chat Pane"), _defineProperty(_Class6, "ReconnectChatPaneIcon", "Reconnect Chat Pane Icon"), _defineProperty(_Class6, "ContinueConversation", "Continue conversation"), _defineProperty(_Class6, "StartNewConversation", "Start new conversation"), _Class6);
47
+ export const AriaLabels = (_Class6 = class AriaLabels {}, _defineProperty(_Class6, "EndCall", "End Call"), _defineProperty(_Class6, "MicMute", "Mute"), _defineProperty(_Class6, "MicUnmute", "Unmute"), _defineProperty(_Class6, "VideoTurnCameraOn", "Turn camera on"), _defineProperty(_Class6, "VideoTurnCameraOff", "Turn camera off"), _defineProperty(_Class6, "IncomingCallArea", "Incoming call area"), _defineProperty(_Class6, "RejectCall", "Reject call"), _defineProperty(_Class6, "AcceptVoiceCall", "Accept voice call"), _defineProperty(_Class6, "AcceptVideoCall", "Accept video Call"), _defineProperty(_Class6, "DeclineCall", "Decline Call"), _defineProperty(_Class6, "AudioCall", "Audio Call"), _defineProperty(_Class6, "VideoCall", "Video Call"), _defineProperty(_Class6, "LetsChatWeAreOnline", "Let's chat we are online"), _defineProperty(_Class6, "UnreadMessageString", "you have new messages"), _defineProperty(_Class6, "Close", "Close"), _defineProperty(_Class6, "ConfirmationPaneConfirm", "Close Chat"), _defineProperty(_Class6, "ConfirmationPaneCancel", "Cancel. Return to Chat"), _defineProperty(_Class6, "DownloadChatTranscript", "Download chat transcript"), _defineProperty(_Class6, "EmailTranscript", "Email Transcript"), _defineProperty(_Class6, "TurnSoundOff", "Turn sound off"), _defineProperty(_Class6, "TurnSoundOn", "Turn sound on"), _defineProperty(_Class6, "Minimize", "Minimize"), _defineProperty(_Class6, "EmailChatTranscriptPane", "Email Chat Transcript Pane"), _defineProperty(_Class6, "InputValidationPaneInput", "Please provide e-mail address to send transcript. The transcript will be sent after the chat ends. Email address text area"), _defineProperty(_Class6, "Save", "Save"), _defineProperty(_Class6, "Cancel", "Cancel"), _defineProperty(_Class6, "ProactiveChatPane", "Proactive Chat Pane"), _defineProperty(_Class6, "ChatNow", "Chat Now"), _defineProperty(_Class6, "ReconnectChatPane", "Reconnect Chat Pane"), _defineProperty(_Class6, "ReconnectChatPaneIcon", "Reconnect Chat Pane Icon"), _defineProperty(_Class6, "ContinueConversation", "Continue conversation"), _defineProperty(_Class6, "StartNewConversation", "Start new conversation"), _defineProperty(_Class6, "InputValidationPaneButtonGroup", "Actions"), _defineProperty(_Class6, "ConfirmationPaneButtonGroup", "Actions"), _Class6);
48
48
  export const EventNames = (_Class7 = class EventNames {}, _defineProperty(_Class7, "OnClick", "OnClick"), _defineProperty(_Class7, "OnEscapeKeyDown", "OnEscapeKeyDown"), _defineProperty(_Class7, "IncomingCallEnded", "IncomingCallEnded"), _Class7);
49
49
  export const Texts = (_Class8 = class Texts {}, _defineProperty(_Class8, "IncomingCallTitle", "Incoming Call"), _defineProperty(_Class8, "ChatButtonTitle", "Let's Chat!"), _defineProperty(_Class8, "ChatButtonSubtitle", "We're online."), _defineProperty(_Class8, "ChatButtonUnreadMessageString", "new messages"), _defineProperty(_Class8, "ChatButtonLargeUnreadMessageString", "99+"), _defineProperty(_Class8, "CloseButtonText", "Close"), _defineProperty(_Class8, "ConfirmationPaneTitle", "Close chat"), _defineProperty(_Class8, "ConfirmationPaneSubtitle", "Do you really want to close this chat?"), _defineProperty(_Class8, "ConfirmButtonText", "Close"), _defineProperty(_Class8, "EmailPlaceHolderText", "johnsmith@outlook.com"), _defineProperty(_Class8, "CancelButtonText", "Cancel"), _defineProperty(_Class8, "DownloadChatTranscriptText", "Download chat transcript"), _defineProperty(_Class8, "EmailTranscriptText", "Email Transcript"), _defineProperty(_Class8, "HeaderIcon", "Chat Icon"), _defineProperty(_Class8, "HeaderTitle", "Let's Chat"), _defineProperty(_Class8, "MinimizeText", "Minimize"), _defineProperty(_Class8, "InputValidationPaneTitleText", "Please provide e-mail address to send transcript."), _defineProperty(_Class8, "InputValidationPaneSubtitleText", "The transcript will be sent after the chat ends."), _defineProperty(_Class8, "InvalidInputErrorMessageText", "Enter a valid email address."), _defineProperty(_Class8, "SendButtonText", "Send"), _defineProperty(_Class8, "SaveButtonText", "Save"), _defineProperty(_Class8, "LoadingPaneTitleText", "Welcome to"), _defineProperty(_Class8, "LoadingPaneSubtitleText", "live chat support ..."), _defineProperty(_Class8, "LoadingPaneSpinnerText", "Loading ..."), _defineProperty(_Class8, "OOOHPaneTitleText", "Thanks for contacting us. You have reached us outside of our operating hours. An agent will respond when we open."), _defineProperty(_Class8, "PostChatSurveyPaneTitleText", "Post chat survey pane"), _defineProperty(_Class8, "ProactiveChatPaneTitleText", "Welcome to"), _defineProperty(_Class8, "ProactiveChatPaneSubtitleText", "Live chat support!"), _defineProperty(_Class8, "ProactiveChatPaneBodyTitleText", "Hi! Have any questions? I am here to help."), _defineProperty(_Class8, "ProactiveChatPaneStartButtonText", "Chat Now"), _defineProperty(_Class8, "ReconnectChatPaneTitleText", "Previous session detected"), _defineProperty(_Class8, "ReconnectChatPaneSubtitleText", "We have detected a previous chat session. Would you like to continue with your previous session?"), _defineProperty(_Class8, "ReconnectChatPaneContinueChatButtonText", "Continue conversation"), _defineProperty(_Class8, "ReconnectChatPaneStartNewChatButtonText", "Start new conversation"), _Class8);
@@ -1,4 +1,10 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
5
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
2
8
  import * as React from "react";
3
9
  import { IconButton, Stack } from "@fluentui/react";
4
10
  import { BroadcastService } from "../../../../services/BroadcastService";
@@ -95,9 +101,10 @@ function CurrentCall(props) {
95
101
  }
96
102
  }
97
103
  };
98
- const [micState, {
99
- toggle: setMicState
100
- }] = useBoolean(false);
104
+ const _useBoolean = useBoolean(false),
105
+ _useBoolean2 = _slicedToArray(_useBoolean, 2),
106
+ micState = _useBoolean2[0],
107
+ setMicState = _useBoolean2[1].toggle;
101
108
  const endCallButtonProps = Object.assign({}, (_defaultCurrentCallPr31 = defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr31 === void 0 ? void 0 : _defaultCurrentCallPr31.endCallButtonProps, (_props$controlProps35 = props.controlProps) === null || _props$controlProps35 === void 0 ? void 0 : _props$controlProps35.endCallButtonProps);
102
109
  const callTimerProps = Object.assign({}, (_defaultCurrentCallPr32 = defaultCurrentCallProps.controlProps) === null || _defaultCurrentCallPr32 === void 0 ? void 0 : _defaultCurrentCallPr32.callTimerProps, (_props$controlProps36 = props.controlProps) === null || _props$controlProps36 === void 0 ? void 0 : _props$controlProps36.callTimerProps);
103
110
  const endCallButtonStyles = Object.assign({}, (_defaultCurrentCallPr33 = defaultCurrentCallProps.styleProps) === null || _defaultCurrentCallPr33 === void 0 ? void 0 : _defaultCurrentCallPr33.endCallButtonStyleProps, (_props$styleProps2 = props.styleProps) === null || _props$styleProps2 === void 0 ? void 0 : _props$styleProps2.endCallButtonStyleProps);
@@ -1,8 +1,17 @@
1
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
2
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
4
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
5
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
6
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
1
7
  import { Label } from "@fluentui/react";
2
8
  import React, { useEffect, useState } from "react";
3
9
  import { getHours, getMinutes, getSeconds } from "../../../../common/utils";
4
10
  function Timer(props) {
5
- const [time, setTime] = useState(0);
11
+ const _useState = useState(0),
12
+ _useState2 = _slicedToArray(_useState, 2),
13
+ time = _useState2[0],
14
+ setTime = _useState2[1];
6
15
  const running = true;
7
16
  const timerStyles = {
8
17
  root: props.timerStyles