botframework-webchat-fluent-theme 4.17.0-main.20240416.4ff01ae → 4.17.0-main.20240419.2240f2a
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.
- package/dist/botframework-webchat-fluent-theme.development.css.map +1 -1
- package/dist/botframework-webchat-fluent-theme.development.js +278 -237
- package/dist/botframework-webchat-fluent-theme.development.js.map +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.css.map +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.js +1 -1
- package/dist/botframework-webchat-fluent-theme.production.min.js.map +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.js +216 -177
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -121
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/Theme.module.css +11 -6
- package/src/components/sendbox/Attachments.tsx +5 -2
- package/src/components/sendbox/TelephoneKeypadToolbarButton.tsx +2 -1
- package/src/components/sendbox/TextArea.module.css +3 -1
- package/src/components/sendbox/Toolbar.module.css +6 -4
- package/src/components/sendbox/Toolbar.tsx +4 -1
- package/src/components/sendbox/index.module.css +28 -0
- package/src/components/sendbox/index.tsx +11 -10
- package/src/components/suggestedActions/SuggestedAction.module.css +1 -0
- package/src/components/telephoneKeypad/private/TelephoneKeypad.module.css +29 -0
- package/src/components/telephoneKeypad/private/TelephoneKeypad.tsx +15 -2
- package/src/icons/AddDocumentIcon.tsx +0 -1
- package/src/icons/AttachmentIcon.tsx +0 -1
- package/src/icons/InfoSmallIcon.tsx +17 -0
- package/src/icons/SendIcon.tsx +0 -1
- package/src/icons/TelephoneKeypad.tsx +0 -1
package/dist/index.js
CHANGED
|
@@ -37,8 +37,8 @@ module.exports = __toCommonJS(src_exports);
|
|
|
37
37
|
var import_inject_meta_tag = require("inject-meta-tag");
|
|
38
38
|
|
|
39
39
|
// src/private/FluentThemeProvider.tsx
|
|
40
|
-
var
|
|
41
|
-
var
|
|
40
|
+
var import_botframework_webchat_component10 = require("botframework-webchat-component");
|
|
41
|
+
var import_react27 = __toESM(require("react"));
|
|
42
42
|
|
|
43
43
|
// src/components/telephoneKeypad/Provider.tsx
|
|
44
44
|
var import_react2 = __toESM(require("react"));
|
|
@@ -70,11 +70,13 @@ var Provider = (0, import_react2.memo)(({ children }) => {
|
|
|
70
70
|
var Provider_default = Provider;
|
|
71
71
|
|
|
72
72
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
73
|
-
var
|
|
73
|
+
var import_react8 = __toESM(require("react"));
|
|
74
74
|
|
|
75
75
|
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
76
|
-
var
|
|
76
|
+
var import_react7 = __toESM(require("react"));
|
|
77
|
+
var import_classnames = __toESM(require("classnames"));
|
|
77
78
|
var import_use_ref_from2 = require("use-ref-from");
|
|
79
|
+
var import_botframework_webchat_component = require("botframework-webchat-component");
|
|
78
80
|
|
|
79
81
|
// src/components/telephoneKeypad/private/Button.tsx
|
|
80
82
|
var import_react4 = __toESM(require("react"));
|
|
@@ -89,7 +91,7 @@ var Button_default = {
|
|
|
89
91
|
};
|
|
90
92
|
|
|
91
93
|
// src/styles/injectStyle.ts
|
|
92
|
-
var injectedStyles = "/* src/components/telephoneKeypad/private/Button.module.css */\n.webchat-fluent .Button_telephone-keypad__button {\n -webkit-user-select: none;\n align-items: center;\n appearance: none;\n background-color: White;\n border-radius: 100%;\n border: solid 1px var(--webchat-colorNeutralStroke1);\n color: var(--webchat-colorGray200);\n font-weight: var(--webchat-fontWeightSemibold);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: 60px;\n opacity: 0.7;\n padding: 0;\n position: relative;\n touch-action: none;\n user-select: none;\n width: 60px;\n}\n.webchat-fluent .Button_telephone-keypad__button:hover {\n background-color: var(--webchat-colorGray30);\n}\n.webchat-fluent .Button_telephone-keypad__button__ruby {\n color: var(--webchat-colorGray190);\n font-size: 10px;\n}\n.webchat-fluent .Button_telephone-keypad__button__text {\n font-size: 24px;\n margin-top: 8px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button {\n height: 32px;\n justify-content: center;\n margin: 8px 4px;\n width: 32px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__ruby {\n display: none;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__text {\n font-size: 20px;\n margin-top: 0;\n}\n\n/* src/components/telephoneKeypad/private/TelephoneKeypad.module.css */\n.webchat-fluent .TelephoneKeypad_telephone-keypad {\n align-items: center;\n background: var(--webchat-colorNeutralBackground1);\n border: none;\n border-radius: var(--webchat-borderRadiusXLarge);\n display: flex;\n flex-direction: column;\n font-family: var(--webchat-fontFamilyBase);\n justify-content: center;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__box {\n box-sizing: border-box;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n justify-items: center;\n padding: 16px;\n width: 100%;\n}\n\n/* src/components/Theme.module.css */\n.webchat-fluent.Theme_theme {\n display: contents;\n --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);\n --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);\n --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);\n --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);\n --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);\n --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);\n --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);\n --webchat-colorSubtleBackgroundHover: var(--colorSubtleBackgroundHover, #f5f5f5);\n --webchat-colorSubtleBackgroundPressed: var(--colorSubtleBackgroundPressed, #e0e0e0);\n --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);\n --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);\n --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);\n --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);\n --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);\n --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);\n --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);\n --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);\n --webchat-colorCompoundBrandForeground1: var(--colorCompoundBrandForeground1, #077fab);\n --webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);\n --webchat-colorCompoundBrandForeground1Pressed: var(--colorCompoundBrandForeground1Pressed, #01678c);\n --webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);\n --webchat-colorGray30: var(--colorGray30, #edebe9);\n --webchat-colorGray160: var(--colorGray160, #323130);\n --webchat-colorGray190: var(--colorGray190, #201f1e);\n --webchat-colorGray200: var(--colorGray200, #1b1a19);\n --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);\n --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);\n --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);\n --webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108));\n --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);\n --webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);\n}\n\n/* src/components/dropZone/index.module.css */\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone {\n background-color: var(--webchat-colorNeutralBackground4);\n border-radius: inherit;\n cursor: copy;\n display: grid;\n gap: 8px;\n inset: 0;\n place-content: center;\n place-items: center;\n position: absolute;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone--droppable {\n background-color: #e00;\n color: White;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone-icon {\n height: 36px;\n pointer-events: none;\n width: 36px;\n}\n\n/* src/components/suggestedActions/SuggestedAction.module.css */\n.webchat-fluent .SuggestedAction_suggested-action {\n align-items: center;\n background: transparent;\n border-radius: 8px;\n border: 1px solid var(--webchat-colorBrandStroke2);\n cursor: pointer;\n display: flex;\n font-size: 12px;\n gap: 4px;\n padding: 4px 8px 4px;\n text-align: start;\n transition: all .15s ease-out;\n}\n@media (hover: hover) {\n .webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorBrandBackground2Hover);\n color: var(--webchat-colorBrandForeground2Hover);\n }\n}\n.webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorBrandBackground2Pressed);\n color: var(--webchat-colorBrandForeground2Pressed);\n}\n.webchat-fluent .SuggestedAction_suggested-action[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .SuggestedAction_suggested-action__image {\n font-size: 12px;\n height: 1em;\n width: 1em;\n}\n\n/* src/components/suggestedActions/index.module.css */\n.webchat-fluent .suggestedActions_suggested-actions {\n align-items: flex-end;\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.webchat-fluent .suggestedActions_suggested-actions:not(:empty) {\n padding-block-end: 8px;\n padding-inline-start: 4px;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--flow {\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--stacked {\n flex-direction: column;\n}\n\n/* src/components/sendbox/Toolbar.module.css */\n.webchat-fluent .Toolbar_sendbox__toolbar {\n display: flex;\n gap: 4px;\n margin-inline-start: auto;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button {\n align-items: center;\n appearance: none;\n aspect-ratio: 1;\n background: transparent;\n border-radius: var(--webchat-borderRadiusSmall);\n border: none;\n cursor: pointer;\n display: flex;\n justify-content: center;\n padding: 3px;\n width: 32px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button > svg {\n font-size: 20px;\n pointer-events: none;\n}\n@media (hover: hover) {\n .webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorSubtleBackgroundHover);\n color: var(--webchat-colorCompoundBrandForeground1Hover);\n }\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorSubtleBackgroundPressed);\n color: var(--webchat-colorCompoundBrandForeground1Pressed);\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator {\n align-self: center;\n border-inline-end: 1px solid var(--webchat-colorNeutralStroke2);\n height: 28px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator:is(:first-child, :last-child, :only-child) {\n display: none;\n}\n\n/* src/components/sendbox/AddAttachmentButton.module.css */\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment {\n display: grid;\n}\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment-input {\n font-size: 0;\n height: 0;\n opacity: 0;\n width: 0;\n}\n\n/* src/components/sendbox/Attachments.module.css */\n.webchat-fluent .Attachments_sendbox__attachment {\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n cursor: default;\n padding: 6px 8px;\n width: fit-content;\n}\n\n/* src/components/sendbox/ErrorMessage.module.css */\n.webchat-fluent .ErrorMessage_sendbox__error-message {\n color: transparent;\n font-size: 0;\n height: 0;\n left: 0;\n position: absolute;\n top: 0;\n width: 0;\n}\n\n/* src/components/sendbox/TextArea.module.css */\n.webchat-fluent .TextArea_sendbox__text-area {\n display: grid;\n grid-template-areas: \"main\";\n max-height: 200px;\n overflow: hidden;\n}\n.webchat-fluent .TextArea_sendbox__text-area--hidden {\n height: 0;\n visibility: collapse;\n}\n.webchat-fluent .TextArea_sendbox__text-area-shared {\n border: none;\n font: inherit;\n grid-area: main;\n outline: inherit;\n overflow-wrap: anywhere;\n resize: inherit;\n scrollbar-gutter: stable;\n}\n.webchat-fluent .TextArea_sendbox__text-area-doppelganger {\n overflow: hidden;\n visibility: hidden;\n white-space: pre-wrap;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input {\n height: 100%;\n padding: 0;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll {\n scrollbar-color: unset;\n scrollbar-width: unset;\n -moz-scrollbar-color: var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);\n -moz-scrollbar-width: thin;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar {\n width: 8px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-track {\n background-color: var(--webchat-colorNeutralBackground5);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-thumb {\n background-color: var(--webchat-colorNeutralForeground2);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-corner {\n background-color: var(--webchat-colorNeutralBackground5);\n}\n\n/* src/components/sendbox/index.module.css */\n.webchat-fluent .sendbox_sendbox {\n color: var(--webchat-colorNeutralForeground1);\n font-family: var(--webchat-fontFamilyBase);\n padding: 0 10px 10px;\n text-rendering: optimizeLegibility;\n}\n.webchat-fluent .sendbox_sendbox__sendbox {\n background-color: var(--webchat-colorNeutralBackground1);\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n display: grid;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n gap: 6px;\n line-height: 20px;\n padding: 8px;\n position: relative;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within {\n border-color: var(--webchat-colorNeutralStroke1Selected);\n box-shadow: inset 0 -6px 0 -3px var(--webchat-colorCompoundBrandForeground1Hover);\n}\n.webchat-fluent .sendbox_sendbox__sendbox-text {\n background-color: transparent;\n border: none;\n flex: auto;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n line-height: 20px;\n outline: none;\n padding: 4px 4px 0;\n resize: none;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-controls {\n align-items: center;\n display: flex;\n padding-inline-start: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter {\n color: var(--webchat-colorNeutralForeground4);\n cursor: default;\n font-family: var(--webchat-fontFamilyNumeric);\n font-size: 10px;\n line-height: 14px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter--error {\n color: var(--webchat-colorStatusDangerForeground1);\n}\n";
|
|
94
|
+
var injectedStyles = "/* src/components/telephoneKeypad/private/Button.module.css */\n.webchat-fluent .Button_telephone-keypad__button {\n -webkit-user-select: none;\n align-items: center;\n appearance: none;\n background-color: White;\n border-radius: 100%;\n border: solid 1px var(--webchat-colorNeutralStroke1);\n color: var(--webchat-colorGray200);\n font-weight: var(--webchat-fontWeightSemibold);\n cursor: pointer;\n display: flex;\n flex-direction: column;\n height: 60px;\n opacity: 0.7;\n padding: 0;\n position: relative;\n touch-action: none;\n user-select: none;\n width: 60px;\n}\n.webchat-fluent .Button_telephone-keypad__button:hover {\n background-color: var(--webchat-colorGray30);\n}\n.webchat-fluent .Button_telephone-keypad__button__ruby {\n color: var(--webchat-colorGray190);\n font-size: 10px;\n}\n.webchat-fluent .Button_telephone-keypad__button__text {\n font-size: 24px;\n margin-top: 8px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button {\n height: 32px;\n justify-content: center;\n margin: 8px 4px;\n width: 32px;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__ruby {\n display: none;\n}\n.webchat-fluent .Button_telephone-keypad--horizontal .Button_telephone-keypad__button__text {\n font-size: 20px;\n margin-top: 0;\n}\n\n/* src/components/telephoneKeypad/private/TelephoneKeypad.module.css */\n.webchat-fluent .TelephoneKeypad_telephone-keypad {\n align-items: center;\n background: var(--webchat-colorNeutralBackground1);\n border: none;\n border-radius: var(--webchat-borderRadiusXLarge);\n display: flex;\n flex-direction: column;\n font-family: var(--webchat-fontFamilyBase);\n justify-content: center;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__box {\n box-sizing: border-box;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: repeat(4, 1fr);\n justify-items: center;\n padding: 16px;\n width: 100%;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message {\n align-items: center;\n color: var(--webchat-colorNeutralForeground4);\n display: flex;\n font-size: 12px;\n gap: 6px;\n margin-block-end: 6px;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link {\n color: var(--webchat-colorBrandForegroundLink);\n text-decoration-color: transparent;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:target {\n color: var(--webchat-colorBrandForegroundLinkSelected);\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:hover {\n color: var(--webchat-colorBrandForegroundLinkHover);\n text-decoration: underline 1px currentColor;\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:active {\n color: var(--webchat-colorBrandForegroundLinkPressed);\n}\n.webchat-fluent .TelephoneKeypad_telephone-keypad__info-message-link:focus-visible {\n outline: none;\n text-decoration: underline 1px double var(--webchat-colorStrokeFocus2);\n}\n\n/* src/components/Theme.module.css */\n.webchat-fluent.Theme_theme {\n display: contents;\n --webchat-colorNeutralForeground1: var(--colorNeutralForeground1, #242424);\n --webchat-colorNeutralForeground2: var(--colorNeutralForeground2, #424242);\n --webchat-colorNeutralForeground4: var(--colorNeutralForeground4, #707070);\n --webchat-colorNeutralForeground2BrandHover: var(--colorNeutralForeground2BrandHover, #02729c);\n --webchat-colorNeutralForeground2BrandPressed: var(--colorNeutralForeground2BrandPressed, #01678c);\n --webchat-colorNeutralForeground2BrandSelected: var(--colorNeutralForeground2BrandSelected, #067191);\n --webchat-colorNeutralForegroundDisabled: var(--colorNeutralForegroundDisabled, #bdbdbd);\n --webchat-colorNeutralBackground1: var(--colorNeutralBackground1, #ffffff);\n --webchat-colorNeutralBackground4: var(--colorNeutralBackground4, #f0f0f0);\n --webchat-colorNeutralBackground5: var(--colorNeutralBackground5, #ebebeb);\n --webchat-colorNeutralStroke1: var(--colorNeutralStroke1, #d1d1d1);\n --webchat-colorNeutralStroke2: var(--colorNeutralStroke2, #e0e0e0);\n --webchat-colorNeutralStroke1Selected: var(--colorNeutralStroke1Selected, #bdbdbd);\n --webchat-colorStrokeFocus2: var(--colorStrokeFocus2, #000000);\n --webchat-colorBrandStroke2: var(--colorBrandStroke2, #9edcf7);\n --webchat-colorBrandForeground2Hover: var(--colorBrandForeground2Hover, #015a7a);\n --webchat-colorBrandForeground2Pressed: var(--colorBrandForeground2Pressed, #01384d);\n --webchat-colorBrandForegroundLink: var(--colorBrandForegroundLink, #01678c);\n --webchat-colorBrandForegroundLinkHover: var(--colorBrandForegroundLinkHover, #015a7a);\n --webchat-colorBrandForegroundLinkPressed: var(--colorBrandForegroundLinkPressed, #014259);\n --webchat-colorBrandForegroundLinkSelected: var(--colorBrandForegroundLinkSelected, #01678c);\n --webchat-colorBrandBackground2Hover: var(--colorBrandBackground2Hover, #bee7fa);\n --webchat-colorBrandBackground2Pressed: var(--colorBrandBackground2Pressed, #7fd2f5);\n --webchat-colorCompoundBrandForeground1Hover: var(--colorCompoundBrandForeground1Hover, #02729c);\n --webchat-colorStatusDangerForeground1: var(--colorStatusDangerForeground1, #b10e1c);\n --webchat-colorGray30: var(--colorGray30, #edebe9);\n --webchat-colorGray160: var(--colorGray160, #323130);\n --webchat-colorGray190: var(--colorGray190, #201f1e);\n --webchat-colorGray200: var(--colorGray200, #1b1a19);\n --webchat-borderRadiusSmall: var(--borderRadiusSmall, 2px);\n --webchat-borderRadiusLarge: var(--borderRadiusLarge, 6px);\n --webchat-borderRadiusXLarge: var(--borderRadiusXLarge, 8px);\n --webchat-shadow16: var(--shadow16, 0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108));\n --webchat-spacingHorizontalMNudge: var(--spacingHorizontalMNudge, 10px);\n --webchat-fontFamilyBase: var(--fontFamilyBase, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontFamilyNumeric: var(--fontFamilyNumeric, Bahnschrift, \"Segoe UI\", \"Segoe UI Web (West European)\", -apple-system, BlinkMacSystemFont, Roboto, \"Helvetica Neue\", sans-serif);\n --webchat-fontWeightSemibold: var(--fontWeightSemibold, 600);\n}\n\n/* src/components/dropZone/index.module.css */\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone {\n background-color: var(--webchat-colorNeutralBackground4);\n border-radius: inherit;\n cursor: copy;\n display: grid;\n gap: 8px;\n inset: 0;\n place-content: center;\n place-items: center;\n position: absolute;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone--droppable {\n background-color: #e00;\n color: White;\n}\n.webchat-fluent .dropZone_sendbox__attachment-drop-zone-icon {\n height: 36px;\n pointer-events: none;\n width: 36px;\n}\n\n/* src/components/suggestedActions/SuggestedAction.module.css */\n.webchat-fluent .SuggestedAction_suggested-action {\n align-items: center;\n background: transparent;\n border-radius: 8px;\n border: 1px solid var(--webchat-colorBrandStroke2);\n color: currentColor;\n cursor: pointer;\n display: flex;\n font-size: 12px;\n gap: 4px;\n padding: 4px 8px 4px;\n text-align: start;\n transition: all .15s ease-out;\n}\n@media (hover: hover) {\n .webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):hover {\n background-color: var(--webchat-colorBrandBackground2Hover);\n color: var(--webchat-colorBrandForeground2Hover);\n }\n}\n.webchat-fluent .SuggestedAction_suggested-action:not([aria-disabled=true]):active {\n background-color: var(--webchat-colorBrandBackground2Pressed);\n color: var(--webchat-colorBrandForeground2Pressed);\n}\n.webchat-fluent .SuggestedAction_suggested-action[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .SuggestedAction_suggested-action__image {\n font-size: 12px;\n height: 1em;\n width: 1em;\n}\n\n/* src/components/suggestedActions/index.module.css */\n.webchat-fluent .suggestedActions_suggested-actions {\n align-items: flex-end;\n align-self: flex-end;\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.webchat-fluent .suggestedActions_suggested-actions:not(:empty) {\n padding-block-end: 8px;\n padding-inline-start: 4px;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--flow {\n flex-direction: row;\n flex-wrap: wrap;\n justify-content: flex-end;\n}\n.webchat-fluent .suggestedActions_suggested-actions.suggestedActions_suggested-actions--stacked {\n flex-direction: column;\n}\n\n/* src/components/sendbox/Toolbar.module.css */\n.webchat-fluent .Toolbar_sendbox__toolbar {\n display: flex;\n gap: 4px;\n margin-inline-start: auto;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button {\n align-items: center;\n appearance: none;\n aspect-ratio: 1;\n background: transparent;\n border-radius: var(--webchat-borderRadiusSmall);\n border: none;\n color: currentColor;\n cursor: pointer;\n display: flex;\n justify-content: center;\n padding: 3px;\n width: 32px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button > svg {\n font-size: 20px;\n pointer-events: none;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button.Toolbar_sendbox__toolbar-button--selected {\n color: var(--webchat-colorNeutralForeground2BrandSelected);\n}\n@media (hover: hover) {\n .webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):hover {\n color: var(--webchat-colorNeutralForeground2BrandHover);\n }\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button:not([aria-disabled=true]):active {\n color: var(--webchat-colorNeutralForeground2BrandPressed);\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-button[aria-disabled=true] {\n color: var(--webchat-colorNeutralForegroundDisabled);\n cursor: not-allowed;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator {\n align-self: center;\n border-inline-end: 1px solid var(--webchat-colorNeutralStroke2);\n height: 28px;\n}\n.webchat-fluent .Toolbar_sendbox__toolbar-separator:is(:first-child, :last-child, :only-child) {\n display: none;\n}\n\n/* src/components/sendbox/AddAttachmentButton.module.css */\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment {\n display: grid;\n}\n.webchat-fluent .AddAttachmentButton_sendbox__add-attachment-input {\n font-size: 0;\n height: 0;\n opacity: 0;\n width: 0;\n}\n\n/* src/components/sendbox/Attachments.module.css */\n.webchat-fluent .Attachments_sendbox__attachment {\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n cursor: default;\n padding: 6px 8px;\n width: fit-content;\n}\n\n/* src/components/sendbox/ErrorMessage.module.css */\n.webchat-fluent .ErrorMessage_sendbox__error-message {\n color: transparent;\n font-size: 0;\n height: 0;\n left: 0;\n position: absolute;\n top: 0;\n width: 0;\n}\n\n/* src/components/sendbox/TextArea.module.css */\n.webchat-fluent .TextArea_sendbox__text-area {\n display: grid;\n grid-template-areas: \"main\";\n max-height: 200px;\n overflow: hidden;\n}\n.webchat-fluent .TextArea_sendbox__text-area--hidden {\n height: 0;\n visibility: collapse;\n}\n.webchat-fluent .TextArea_sendbox__text-area-shared {\n border: none;\n font: inherit;\n grid-area: main;\n outline: inherit;\n overflow-wrap: anywhere;\n resize: inherit;\n scrollbar-gutter: stable;\n}\n.webchat-fluent .TextArea_sendbox__text-area-doppelganger {\n overflow: hidden;\n visibility: hidden;\n white-space: pre-wrap;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input {\n background-color: inherit;\n color: currentColor;\n height: 100%;\n padding: 0;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll {\n scrollbar-color: unset;\n scrollbar-width: unset;\n -moz-scrollbar-color: var(--webchat-colorNeutralBackground5) var(--webchat-colorNeutralForeground2);\n -moz-scrollbar-width: thin;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar {\n width: 8px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-track {\n background-color: var(--webchat-colorNeutralBackground5);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-thumb {\n background-color: var(--webchat-colorNeutralForeground2);\n border-radius: 16px;\n}\n.webchat-fluent .TextArea_sendbox__text-area-input--scroll::-webkit-scrollbar-corner {\n background-color: var(--webchat-colorNeutralBackground5);\n}\n\n/* src/components/sendbox/index.module.css */\n.webchat-fluent .sendbox_sendbox {\n color: var(--webchat-colorNeutralForeground1);\n font-family: var(--webchat-fontFamilyBase);\n padding: 0 10px 10px;\n text-rendering: optimizeLegibility;\n --webchat-sendbox-attachment-area-active: ;\n}\n.webchat-fluent .sendbox_sendbox__sendbox {\n background-color: var(--webchat-colorNeutralBackground1);\n border-radius: var(--webchat-borderRadiusLarge);\n border: 1px solid var(--webchat-colorNeutralStroke1);\n display: grid;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n gap: 6px;\n grid-template: [telephone-keypad-start] \"text-area\" [telephone-keypad-end] var(--webchat-sendbox-attachment-area-active) \"controls\" / [telephone-keypad] 1fr;\n line-height: 20px;\n padding: 8px;\n position: relative;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:has(.sendbox_sendbox__attachment--in-grid) {\n --webchat-sendbox-attachment-area-active: \"attachment\" ;\n}\n.webchat-fluent .sendbox_sendbox__sendbox:focus-within {\n border-color: var(--webchat-colorNeutralStroke1Selected);\n box-shadow: inset 0 -6px 0 -3px var(--webchat-colorCompoundBrandForeground1Hover);\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__text-area--in-grid {\n grid-area: text-area;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__attachment--in-grid {\n grid-area: attachment;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__sendbox-controls--in-grid {\n grid-area: controls;\n}\n.webchat-fluent .sendbox_sendbox__sendbox > .sendbox_sendbox__telephone-keypad--in-grid {\n grid-area: telephone-keypad;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-text {\n background-color: transparent;\n border: none;\n flex: auto;\n font-family: var(--webchat-fontFamilyBase);\n font-size: 14px;\n line-height: 20px;\n outline: none;\n padding: 4px 4px 0;\n resize: none;\n}\n.webchat-fluent .sendbox_sendbox__sendbox-controls {\n align-items: center;\n display: flex;\n padding-inline-start: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter {\n color: var(--webchat-colorNeutralForeground4);\n cursor: default;\n font-family: var(--webchat-fontFamilyNumeric);\n font-size: 10px;\n line-height: 14px;\n margin-inline-end: 4px;\n}\n.webchat-fluent .sendbox_sendbox__text-counter--error {\n color: var(--webchat-colorStatusDangerForeground1);\n}\n";
|
|
93
95
|
function injectStyles() {
|
|
94
96
|
if (globalThis.document) {
|
|
95
97
|
const style = document.createElement("style");
|
|
@@ -172,39 +174,63 @@ function useShown() {
|
|
|
172
174
|
// src/components/telephoneKeypad/private/TelephoneKeypad.module.css
|
|
173
175
|
var TelephoneKeypad_default = {
|
|
174
176
|
"telephone-keypad": "TelephoneKeypad_telephone-keypad",
|
|
175
|
-
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box"
|
|
177
|
+
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box",
|
|
178
|
+
"telephone-keypad__info-message": "TelephoneKeypad_telephone-keypad__info-message",
|
|
179
|
+
"telephone-keypad__info-message-link": "TelephoneKeypad_telephone-keypad__info-message-link"
|
|
176
180
|
};
|
|
177
181
|
|
|
182
|
+
// src/icons/InfoSmallIcon.tsx
|
|
183
|
+
var import_react6 = __toESM(require("react"));
|
|
184
|
+
var InfoSmallIcon_default = (0, import_react6.memo)((props) => /* @__PURE__ */ import_react6.default.createElement(
|
|
185
|
+
"svg",
|
|
186
|
+
{
|
|
187
|
+
"aria-hidden": "true",
|
|
188
|
+
className: props.className,
|
|
189
|
+
height: "1em",
|
|
190
|
+
viewBox: "0 0 16 16",
|
|
191
|
+
width: "1em",
|
|
192
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
193
|
+
},
|
|
194
|
+
/* @__PURE__ */ import_react6.default.createElement(
|
|
195
|
+
"path",
|
|
196
|
+
{
|
|
197
|
+
d: "M8.5 7.5a.5.5 0 1 0-1 0v3a.5.5 0 0 0 1 0v-3Zm.25-2a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0ZM8 1a7 7 0 1 0 0 14A7 7 0 0 0 8 1ZM2 8a6 6 0 1 1 12 0A6 6 0 0 1 2 8Z",
|
|
198
|
+
fill: "currentColor"
|
|
199
|
+
}
|
|
200
|
+
)
|
|
201
|
+
));
|
|
202
|
+
|
|
178
203
|
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
179
|
-
var
|
|
204
|
+
var { LocalizedString } = import_botframework_webchat_component.Components;
|
|
205
|
+
var Orientation = (0, import_react7.memo)(
|
|
180
206
|
({ children, isHorizontal }) => {
|
|
181
207
|
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
182
208
|
return isHorizontal ? (
|
|
183
209
|
// <HorizontalDialPadController>{children}</HorizontalDialPadController>
|
|
184
210
|
false
|
|
185
|
-
) : /* @__PURE__ */
|
|
211
|
+
) : /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad__box"] }, children);
|
|
186
212
|
}
|
|
187
213
|
);
|
|
188
214
|
Orientation.displayName = "TelephoneKeypad:Orientation";
|
|
189
|
-
var TelephoneKeypad = (0,
|
|
215
|
+
var TelephoneKeypad = (0, import_react7.memo)(({ autoFocus, className, onButtonClick, isHorizontal }) => {
|
|
190
216
|
const autoFocusRef = (0, import_use_ref_from2.useRefFrom)(autoFocus);
|
|
191
217
|
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
192
|
-
const firstButtonRef = (0,
|
|
218
|
+
const firstButtonRef = (0, import_react7.useRef)(null);
|
|
193
219
|
const onButtonClickRef = (0, import_use_ref_from2.useRefFrom)(onButtonClick);
|
|
194
220
|
const [, setShown] = useShown();
|
|
195
|
-
const handleButton1Click = (0,
|
|
196
|
-
const handleButton2Click = (0,
|
|
197
|
-
const handleButton3Click = (0,
|
|
198
|
-
const handleButton4Click = (0,
|
|
199
|
-
const handleButton5Click = (0,
|
|
200
|
-
const handleButton6Click = (0,
|
|
201
|
-
const handleButton7Click = (0,
|
|
202
|
-
const handleButton8Click = (0,
|
|
203
|
-
const handleButton9Click = (0,
|
|
204
|
-
const handleButton0Click = (0,
|
|
205
|
-
const handleButtonStarClick = (0,
|
|
206
|
-
const handleButtonPoundClick = (0,
|
|
207
|
-
const handleKeyDown = (0,
|
|
221
|
+
const handleButton1Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
|
|
222
|
+
const handleButton2Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
|
|
223
|
+
const handleButton3Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
|
|
224
|
+
const handleButton4Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
|
|
225
|
+
const handleButton5Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
|
|
226
|
+
const handleButton6Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
|
|
227
|
+
const handleButton7Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
|
|
228
|
+
const handleButton8Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
|
|
229
|
+
const handleButton9Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
|
|
230
|
+
const handleButton0Click = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
|
|
231
|
+
const handleButtonStarClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
|
|
232
|
+
const handleButtonPoundClick = (0, import_react7.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
|
|
233
|
+
const handleKeyDown = (0, import_react7.useCallback)(
|
|
208
234
|
(event) => {
|
|
209
235
|
if (event.key === "Escape") {
|
|
210
236
|
setShown(false);
|
|
@@ -212,10 +238,10 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
212
238
|
},
|
|
213
239
|
[setShown]
|
|
214
240
|
);
|
|
215
|
-
(0,
|
|
241
|
+
(0, import_react7.useEffect)(() => {
|
|
216
242
|
autoFocusRef.current && firstButtonRef.current?.focus();
|
|
217
243
|
}, [autoFocusRef, firstButtonRef]);
|
|
218
|
-
return /* @__PURE__ */
|
|
244
|
+
return /* @__PURE__ */ import_react7.default.createElement("div", { className: (0, import_classnames.default)(classNames["telephone-keypad"], className), onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react7.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react7.default.createElement(
|
|
219
245
|
Button_default2,
|
|
220
246
|
{
|
|
221
247
|
button: "1",
|
|
@@ -223,7 +249,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
223
249
|
onClick: handleButton1Click,
|
|
224
250
|
ref: firstButtonRef
|
|
225
251
|
}
|
|
226
|
-
), /* @__PURE__ */
|
|
252
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
227
253
|
Button_default2,
|
|
228
254
|
{
|
|
229
255
|
button: "2",
|
|
@@ -231,7 +257,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
231
257
|
onClick: handleButton2Click,
|
|
232
258
|
ruby: "ABC"
|
|
233
259
|
}
|
|
234
|
-
), /* @__PURE__ */
|
|
260
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
235
261
|
Button_default2,
|
|
236
262
|
{
|
|
237
263
|
button: "3",
|
|
@@ -239,7 +265,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
239
265
|
onClick: handleButton3Click,
|
|
240
266
|
ruby: "DEF"
|
|
241
267
|
}
|
|
242
|
-
), /* @__PURE__ */
|
|
268
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
243
269
|
Button_default2,
|
|
244
270
|
{
|
|
245
271
|
button: "4",
|
|
@@ -247,7 +273,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
247
273
|
onClick: handleButton4Click,
|
|
248
274
|
ruby: "GHI"
|
|
249
275
|
}
|
|
250
|
-
), /* @__PURE__ */
|
|
276
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
251
277
|
Button_default2,
|
|
252
278
|
{
|
|
253
279
|
button: "5",
|
|
@@ -255,7 +281,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
255
281
|
onClick: handleButton5Click,
|
|
256
282
|
ruby: "JKL"
|
|
257
283
|
}
|
|
258
|
-
), /* @__PURE__ */
|
|
284
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
259
285
|
Button_default2,
|
|
260
286
|
{
|
|
261
287
|
button: "6",
|
|
@@ -263,7 +289,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
263
289
|
onClick: handleButton6Click,
|
|
264
290
|
ruby: "MNO"
|
|
265
291
|
}
|
|
266
|
-
), /* @__PURE__ */
|
|
292
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
267
293
|
Button_default2,
|
|
268
294
|
{
|
|
269
295
|
button: "7",
|
|
@@ -271,7 +297,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
271
297
|
onClick: handleButton7Click,
|
|
272
298
|
ruby: "PQRS"
|
|
273
299
|
}
|
|
274
|
-
), /* @__PURE__ */
|
|
300
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
275
301
|
Button_default2,
|
|
276
302
|
{
|
|
277
303
|
button: "8",
|
|
@@ -279,7 +305,7 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
279
305
|
onClick: handleButton8Click,
|
|
280
306
|
ruby: "TUV"
|
|
281
307
|
}
|
|
282
|
-
), /* @__PURE__ */
|
|
308
|
+
), /* @__PURE__ */ import_react7.default.createElement(
|
|
283
309
|
Button_default2,
|
|
284
310
|
{
|
|
285
311
|
button: "9",
|
|
@@ -287,26 +313,32 @@ var TelephoneKeypad = (0, import_react6.memo)(({ autoFocus, onButtonClick, isHor
|
|
|
287
313
|
onClick: handleButton9Click,
|
|
288
314
|
ruby: "WXYZ"
|
|
289
315
|
}
|
|
290
|
-
), /* @__PURE__ */
|
|
316
|
+
), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react7.default.createElement(Button_default2, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react7.default.createElement(
|
|
291
317
|
Button_default2,
|
|
292
318
|
{
|
|
293
319
|
button: "pound",
|
|
294
320
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
|
|
295
321
|
onClick: handleButtonPoundClick
|
|
296
322
|
}
|
|
323
|
+
)), /* @__PURE__ */ import_react7.default.createElement("div", { className: classNames["telephone-keypad__info-message"] }, /* @__PURE__ */ import_react7.default.createElement(InfoSmallIcon_default, null), /* @__PURE__ */ import_react7.default.createElement(
|
|
324
|
+
LocalizedString,
|
|
325
|
+
{
|
|
326
|
+
linkClassName: classNames["telephone-keypad__info-message-link"],
|
|
327
|
+
stringIds: "TELEPHONE_KEYPAD_INPUT_MESSAGE"
|
|
328
|
+
}
|
|
297
329
|
)));
|
|
298
330
|
});
|
|
299
331
|
TelephoneKeypad.displayName = "TelephoneKeypad";
|
|
300
332
|
var TelephoneKeypad_default2 = TelephoneKeypad;
|
|
301
333
|
|
|
302
334
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
303
|
-
var TelephoneKeypadSurrogate = (0,
|
|
335
|
+
var TelephoneKeypadSurrogate = (0, import_react8.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react8.default.createElement(TelephoneKeypad_default2, { ...props }) : false);
|
|
304
336
|
TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
|
|
305
337
|
var Surrogate_default = TelephoneKeypadSurrogate;
|
|
306
338
|
|
|
307
339
|
// src/components/Theme.tsx
|
|
308
|
-
var
|
|
309
|
-
var
|
|
340
|
+
var import_react9 = __toESM(require("react"));
|
|
341
|
+
var import_classnames2 = __toESM(require("classnames"));
|
|
310
342
|
|
|
311
343
|
// src/components/Theme.module.css
|
|
312
344
|
var Theme_default = {
|
|
@@ -317,30 +349,29 @@ var Theme_default = {
|
|
|
317
349
|
var rootClassName = "webchat-fluent";
|
|
318
350
|
function WebchatTheme(props) {
|
|
319
351
|
const classNames = useStyles_default(Theme_default);
|
|
320
|
-
return /* @__PURE__ */
|
|
352
|
+
return /* @__PURE__ */ import_react9.default.createElement("div", { className: (0, import_classnames2.default)(rootClassName, classNames["theme"]) }, props.children);
|
|
321
353
|
}
|
|
322
354
|
|
|
323
355
|
// src/components/sendbox/index.tsx
|
|
324
|
-
var
|
|
325
|
-
var
|
|
326
|
-
var
|
|
356
|
+
var import_botframework_webchat_component9 = require("botframework-webchat-component");
|
|
357
|
+
var import_classnames9 = __toESM(require("classnames"));
|
|
358
|
+
var import_react26 = __toESM(require("react"));
|
|
327
359
|
var import_use_ref_from6 = require("use-ref-from");
|
|
328
360
|
|
|
329
361
|
// src/icons/SendIcon.tsx
|
|
330
|
-
var
|
|
362
|
+
var import_react10 = __toESM(require("react"));
|
|
331
363
|
function SendIcon(props) {
|
|
332
|
-
return /* @__PURE__ */
|
|
364
|
+
return /* @__PURE__ */ import_react10.default.createElement(
|
|
333
365
|
"svg",
|
|
334
366
|
{
|
|
335
367
|
"aria-hidden": "true",
|
|
336
368
|
className: props.className,
|
|
337
|
-
fill: "currentColor",
|
|
338
369
|
height: "1em",
|
|
339
370
|
viewBox: "0 0 20 20",
|
|
340
371
|
width: "1em",
|
|
341
372
|
xmlns: "http://www.w3.org/2000/svg"
|
|
342
373
|
},
|
|
343
|
-
/* @__PURE__ */
|
|
374
|
+
/* @__PURE__ */ import_react10.default.createElement(
|
|
344
375
|
"path",
|
|
345
376
|
{
|
|
346
377
|
d: "M2.18 2.11a.5.5 0 0 1 .54-.06l15 7.5a.5.5 0 0 1 0 .9l-15 7.5a.5.5 0 0 1-.7-.58L3.98 10 2.02 2.63a.5.5 0 0 1 .16-.52Zm2.7 8.39-1.61 6.06L16.38 10 3.27 3.44 4.88 9.5h6.62a.5.5 0 1 1 0 1H4.88Z",
|
|
@@ -351,26 +382,25 @@ function SendIcon(props) {
|
|
|
351
382
|
}
|
|
352
383
|
|
|
353
384
|
// src/components/dropZone/index.tsx
|
|
354
|
-
var
|
|
355
|
-
var
|
|
356
|
-
var
|
|
385
|
+
var import_botframework_webchat_component2 = require("botframework-webchat-component");
|
|
386
|
+
var import_classnames3 = __toESM(require("classnames"));
|
|
387
|
+
var import_react12 = __toESM(require("react"));
|
|
357
388
|
var import_use_ref_from3 = require("use-ref-from");
|
|
358
389
|
|
|
359
390
|
// src/icons/AddDocumentIcon.tsx
|
|
360
|
-
var
|
|
391
|
+
var import_react11 = __toESM(require("react"));
|
|
361
392
|
function AddDocumentIcon(props) {
|
|
362
|
-
return /* @__PURE__ */
|
|
393
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
363
394
|
"svg",
|
|
364
395
|
{
|
|
365
396
|
"aria-hidden": "true",
|
|
366
397
|
className: props.className,
|
|
367
|
-
fill: "currentColor",
|
|
368
398
|
height: "1em",
|
|
369
399
|
viewBox: "0 0 20 20",
|
|
370
400
|
width: "1em",
|
|
371
401
|
xmlns: "http://www.w3.org/2000/svg"
|
|
372
402
|
},
|
|
373
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
374
404
|
"path",
|
|
375
405
|
{
|
|
376
406
|
d: "M6 2a2 2 0 0 0-2 2v5.2c.32-.08.66-.15 1-.18V4a1 1 0 0 1 1-1h4v3.5c0 .83.67 1.5 1.5 1.5H15v8a1 1 0 0 1-1 1h-3.6c-.18.36-.4.7-.66 1H14a2 2 0 0 0 2-2V7.41c0-.4-.16-.78-.44-1.06l-3.91-3.91A1.5 1.5 0 0 0 10.59 2H6Zm8.8 5h-3.3a.5.5 0 0 1-.5-.5V3.2L14.8 7ZM10 14.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Zm-4-2a.5.5 0 0 0-1 0V14H3.5a.5.5 0 0 0 0 1H5v1.5a.5.5 0 0 0 1 0V15h1.5a.5.5 0 0 0 0-1H6v-1.5Z",
|
|
@@ -388,7 +418,7 @@ var dropZone_default = {
|
|
|
388
418
|
};
|
|
389
419
|
|
|
390
420
|
// src/components/dropZone/index.tsx
|
|
391
|
-
var { useLocalizer } =
|
|
421
|
+
var { useLocalizer } = import_botframework_webchat_component2.hooks;
|
|
392
422
|
var handleDragOver = (event) => {
|
|
393
423
|
event.preventDefault();
|
|
394
424
|
};
|
|
@@ -404,12 +434,12 @@ function isDescendantOf(target, ancestor) {
|
|
|
404
434
|
return false;
|
|
405
435
|
}
|
|
406
436
|
var DropZone = (props) => {
|
|
407
|
-
const [dropZoneState, setDropZoneState] = (0,
|
|
437
|
+
const [dropZoneState, setDropZoneState] = (0, import_react12.useState)(false);
|
|
408
438
|
const classNames = useStyles_default(dropZone_default);
|
|
409
|
-
const dropZoneRef = (0,
|
|
439
|
+
const dropZoneRef = (0, import_react12.useRef)(null);
|
|
410
440
|
const localize = useLocalizer();
|
|
411
441
|
const onFilesAddedRef = (0, import_use_ref_from3.useRefFrom)(props.onFilesAdded);
|
|
412
|
-
(0,
|
|
442
|
+
(0, import_react12.useEffect)(() => {
|
|
413
443
|
let entranceCounter = 0;
|
|
414
444
|
const handleDragEnter = (event) => {
|
|
415
445
|
entranceCounter++;
|
|
@@ -427,7 +457,7 @@ var DropZone = (props) => {
|
|
|
427
457
|
document.removeEventListener("dragleave", handleDragLeave);
|
|
428
458
|
};
|
|
429
459
|
}, [setDropZoneState]);
|
|
430
|
-
const handleDrop = (0,
|
|
460
|
+
const handleDrop = (0, import_react12.useCallback)(
|
|
431
461
|
(event) => {
|
|
432
462
|
event.preventDefault();
|
|
433
463
|
setDropZoneState(false);
|
|
@@ -438,10 +468,10 @@ var DropZone = (props) => {
|
|
|
438
468
|
},
|
|
439
469
|
[onFilesAddedRef, setDropZoneState]
|
|
440
470
|
);
|
|
441
|
-
return dropZoneState ? /* @__PURE__ */
|
|
471
|
+
return dropZoneState ? /* @__PURE__ */ import_react12.default.createElement(
|
|
442
472
|
"div",
|
|
443
473
|
{
|
|
444
|
-
className: (0,
|
|
474
|
+
className: (0, import_classnames3.default)(classNames["sendbox__attachment-drop-zone"], {
|
|
445
475
|
[classNames["sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
|
|
446
476
|
}),
|
|
447
477
|
"data-testid": testIds_default.sendBoxDropZone,
|
|
@@ -449,26 +479,26 @@ var DropZone = (props) => {
|
|
|
449
479
|
onDrop: handleDrop,
|
|
450
480
|
ref: dropZoneRef
|
|
451
481
|
},
|
|
452
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ import_react12.default.createElement(AddDocumentIcon, { className: classNames["sendbox__attachment-drop-zone-icon"] }),
|
|
453
483
|
localize("TEXT_INPUT_DROP_ZONE")
|
|
454
484
|
) : null;
|
|
455
485
|
};
|
|
456
486
|
DropZone.displayName = "DropZone";
|
|
457
|
-
var dropZone_default2 = (0,
|
|
487
|
+
var dropZone_default2 = (0, import_react12.memo)(DropZone);
|
|
458
488
|
|
|
459
489
|
// src/components/DropZone.tsx
|
|
460
490
|
var DropZone_default = dropZone_default2;
|
|
461
491
|
|
|
462
492
|
// src/components/suggestedActions/index.tsx
|
|
493
|
+
var import_botframework_webchat_component4 = require("botframework-webchat-component");
|
|
494
|
+
var import_classnames5 = __toESM(require("classnames"));
|
|
495
|
+
var import_react15 = __toESM(require("react"));
|
|
496
|
+
|
|
497
|
+
// src/components/suggestedActions/SuggestedAction.tsx
|
|
463
498
|
var import_botframework_webchat_component3 = require("botframework-webchat-component");
|
|
464
499
|
var import_classnames4 = __toESM(require("classnames"));
|
|
465
500
|
var import_react14 = __toESM(require("react"));
|
|
466
501
|
|
|
467
|
-
// src/components/suggestedActions/SuggestedAction.tsx
|
|
468
|
-
var import_botframework_webchat_component2 = require("botframework-webchat-component");
|
|
469
|
-
var import_classnames3 = __toESM(require("classnames"));
|
|
470
|
-
var import_react13 = __toESM(require("react"));
|
|
471
|
-
|
|
472
502
|
// src/components/suggestedActions/SuggestedAction.module.css
|
|
473
503
|
var SuggestedAction_default = {
|
|
474
504
|
"suggested-action": "SuggestedAction_suggested-action",
|
|
@@ -476,13 +506,13 @@ var SuggestedAction_default = {
|
|
|
476
506
|
};
|
|
477
507
|
|
|
478
508
|
// src/components/suggestedActions/AccessibleButton.tsx
|
|
479
|
-
var
|
|
509
|
+
var import_react13 = __toESM(require("react"));
|
|
480
510
|
var preventDefaultHandler = (event) => event.preventDefault();
|
|
481
|
-
var AccessibleButton = (0,
|
|
511
|
+
var AccessibleButton = (0, import_react13.forwardRef)(
|
|
482
512
|
({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
|
|
483
|
-
const targetRef = (0,
|
|
513
|
+
const targetRef = (0, import_react13.useRef)(null);
|
|
484
514
|
const ref = forwardedRef || targetRef;
|
|
485
|
-
return /* @__PURE__ */
|
|
515
|
+
return /* @__PURE__ */ import_react13.default.createElement(
|
|
486
516
|
"button",
|
|
487
517
|
{
|
|
488
518
|
"aria-disabled": disabled ? "true" : "false",
|
|
@@ -501,10 +531,10 @@ var AccessibleButton = (0, import_react12.forwardRef)(
|
|
|
501
531
|
);
|
|
502
532
|
}
|
|
503
533
|
);
|
|
504
|
-
var AccessibleButton_default = (0,
|
|
534
|
+
var AccessibleButton_default = (0, import_react13.memo)(AccessibleButton);
|
|
505
535
|
|
|
506
536
|
// src/components/suggestedActions/SuggestedAction.tsx
|
|
507
|
-
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } =
|
|
537
|
+
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } = import_botframework_webchat_component3.hooks;
|
|
508
538
|
function SuggestedAction({
|
|
509
539
|
buttonText,
|
|
510
540
|
className,
|
|
@@ -519,11 +549,11 @@ function SuggestedAction({
|
|
|
519
549
|
const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
|
|
520
550
|
const [disabled] = useDisabled();
|
|
521
551
|
const focus = useFocus();
|
|
522
|
-
const focusRef = (0,
|
|
552
|
+
const focusRef = (0, import_react14.useRef)(null);
|
|
523
553
|
const performCardAction = usePerformCardAction();
|
|
524
554
|
const classNames = useStyles_default(SuggestedAction_default);
|
|
525
555
|
const scrollToEnd = useScrollToEnd();
|
|
526
|
-
const handleClick = (0,
|
|
556
|
+
const handleClick = (0, import_react14.useCallback)(
|
|
527
557
|
({ target }) => {
|
|
528
558
|
(async function() {
|
|
529
559
|
await focus("sendBoxWithoutKeyboard");
|
|
@@ -534,20 +564,20 @@ function SuggestedAction({
|
|
|
534
564
|
},
|
|
535
565
|
[displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
|
|
536
566
|
);
|
|
537
|
-
return /* @__PURE__ */
|
|
567
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
538
568
|
AccessibleButton_default,
|
|
539
569
|
{
|
|
540
|
-
className: (0,
|
|
570
|
+
className: (0, import_classnames4.default)(classNames["suggested-action"], suggestedActionStyleSet + "", (className || "") + ""),
|
|
541
571
|
disabled,
|
|
542
572
|
onClick: handleClick,
|
|
543
573
|
ref: focusRef,
|
|
544
574
|
type: "button"
|
|
545
575
|
},
|
|
546
|
-
image && /* @__PURE__ */
|
|
547
|
-
/* @__PURE__ */
|
|
576
|
+
image && /* @__PURE__ */ import_react14.default.createElement("img", { alt: imageAlt, className: classNames["suggested-action__image"], src: image }),
|
|
577
|
+
/* @__PURE__ */ import_react14.default.createElement("span", null, buttonText)
|
|
548
578
|
);
|
|
549
579
|
}
|
|
550
|
-
var SuggestedAction_default2 = (0,
|
|
580
|
+
var SuggestedAction_default2 = (0, import_react14.memo)(SuggestedAction);
|
|
551
581
|
|
|
552
582
|
// src/components/suggestedActions/private/computeSuggestedActionText.ts
|
|
553
583
|
function computeSuggestedActionText(cardAction) {
|
|
@@ -571,18 +601,18 @@ var suggestedActions_default = {
|
|
|
571
601
|
};
|
|
572
602
|
|
|
573
603
|
// src/components/suggestedActions/index.tsx
|
|
574
|
-
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } =
|
|
604
|
+
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component4.hooks;
|
|
575
605
|
function SuggestedActionStackedOrFlowContainer(props) {
|
|
576
606
|
const [{ suggestedActionLayout }] = useStyleOptions();
|
|
577
607
|
const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
|
|
578
608
|
const classNames = useStyles_default(suggestedActions_default);
|
|
579
|
-
return /* @__PURE__ */
|
|
609
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
580
610
|
"div",
|
|
581
611
|
{
|
|
582
612
|
"aria-label": props["aria-label"],
|
|
583
613
|
"aria-live": "polite",
|
|
584
614
|
"aria-orientation": "vertical",
|
|
585
|
-
className: (0,
|
|
615
|
+
className: (0, import_classnames5.default)(
|
|
586
616
|
classNames["suggested-actions"],
|
|
587
617
|
suggestedActionsStyleSet + "",
|
|
588
618
|
{
|
|
@@ -593,7 +623,7 @@ function SuggestedActionStackedOrFlowContainer(props) {
|
|
|
593
623
|
),
|
|
594
624
|
role: "toolbar"
|
|
595
625
|
},
|
|
596
|
-
!!props.children && !!
|
|
626
|
+
!!props.children && !!import_react15.default.Children.count(props.children) && props.children
|
|
597
627
|
);
|
|
598
628
|
}
|
|
599
629
|
function SuggestedActions() {
|
|
@@ -605,7 +635,7 @@ function SuggestedActions() {
|
|
|
605
635
|
if (!suggestedActions?.length) {
|
|
606
636
|
return null;
|
|
607
637
|
}
|
|
608
|
-
return /* @__PURE__ */
|
|
638
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
609
639
|
SuggestedAction_default2,
|
|
610
640
|
{
|
|
611
641
|
buttonText: computeSuggestedActionText(cardAction),
|
|
@@ -620,7 +650,7 @@ function SuggestedActions() {
|
|
|
620
650
|
}
|
|
621
651
|
);
|
|
622
652
|
});
|
|
623
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
624
654
|
SuggestedActionStackedOrFlowContainer,
|
|
625
655
|
{
|
|
626
656
|
"aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
|
|
@@ -629,31 +659,30 @@ function SuggestedActions() {
|
|
|
629
659
|
children
|
|
630
660
|
);
|
|
631
661
|
}
|
|
632
|
-
var suggestedActions_default2 = (0,
|
|
662
|
+
var suggestedActions_default2 = (0, import_react15.memo)(SuggestedActions);
|
|
633
663
|
|
|
634
664
|
// src/components/SuggestedActions.tsx
|
|
635
665
|
var SuggestedActions_default = suggestedActions_default2;
|
|
636
666
|
|
|
637
667
|
// src/components/sendbox/AddAttachmentButton.tsx
|
|
638
|
-
var
|
|
639
|
-
var
|
|
668
|
+
var import_botframework_webchat_component5 = require("botframework-webchat-component");
|
|
669
|
+
var import_react18 = __toESM(require("react"));
|
|
640
670
|
var import_use_ref_from4 = require("use-ref-from");
|
|
641
671
|
|
|
642
672
|
// src/icons/AttachmentIcon.tsx
|
|
643
|
-
var
|
|
673
|
+
var import_react16 = __toESM(require("react"));
|
|
644
674
|
function AttachmentIcon(props) {
|
|
645
|
-
return /* @__PURE__ */
|
|
675
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
646
676
|
"svg",
|
|
647
677
|
{
|
|
648
678
|
"aria-hidden": "true",
|
|
649
679
|
className: props.className,
|
|
650
|
-
fill: "currentColor",
|
|
651
680
|
height: "1em",
|
|
652
681
|
viewBox: "0 0 20 20",
|
|
653
682
|
width: "1em",
|
|
654
683
|
xmlns: "http://www.w3.org/2000/svg"
|
|
655
684
|
},
|
|
656
|
-
/* @__PURE__ */
|
|
685
|
+
/* @__PURE__ */ import_react16.default.createElement(
|
|
657
686
|
"path",
|
|
658
687
|
{
|
|
659
688
|
d: "m4.83 10.48 5.65-5.65a3 3 0 0 1 4.25 4.24L8 15.8a1.5 1.5 0 0 1-2.12-2.12l6-6.01a.5.5 0 1 0-.7-.71l-6 6.01a2.5 2.5 0 0 0 3.53 3.54l6.71-6.72a4 4 0 1 0-5.65-5.66L4.12 9.78a.5.5 0 0 0 .7.7Z",
|
|
@@ -664,26 +693,29 @@ function AttachmentIcon(props) {
|
|
|
664
693
|
}
|
|
665
694
|
|
|
666
695
|
// src/components/sendbox/Toolbar.tsx
|
|
667
|
-
var
|
|
668
|
-
var
|
|
696
|
+
var import_classnames6 = __toESM(require("classnames"));
|
|
697
|
+
var import_react17 = __toESM(require("react"));
|
|
669
698
|
|
|
670
699
|
// src/components/sendbox/Toolbar.module.css
|
|
671
700
|
var Toolbar_default = {
|
|
672
701
|
sendbox__toolbar: "Toolbar_sendbox__toolbar",
|
|
673
702
|
"sendbox__toolbar-button": "Toolbar_sendbox__toolbar-button",
|
|
703
|
+
"sendbox__toolbar-button--selected": "Toolbar_sendbox__toolbar-button--selected",
|
|
674
704
|
"sendbox__toolbar-separator": "Toolbar_sendbox__toolbar-separator"
|
|
675
705
|
};
|
|
676
706
|
|
|
677
707
|
// src/components/sendbox/Toolbar.tsx
|
|
678
708
|
var preventDefaultHandler2 = (event) => event.preventDefault();
|
|
679
|
-
var ToolbarButton = (0,
|
|
709
|
+
var ToolbarButton = (0, import_react17.memo)(
|
|
680
710
|
(props) => {
|
|
681
711
|
const classNames = useStyles_default(Toolbar_default);
|
|
682
|
-
return /* @__PURE__ */
|
|
712
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
683
713
|
"button",
|
|
684
714
|
{
|
|
685
715
|
"aria-label": props["aria-label"],
|
|
686
|
-
className: (0,
|
|
716
|
+
className: (0, import_classnames6.default)(classNames["sendbox__toolbar-button"], props.className, {
|
|
717
|
+
[classNames["sendbox__toolbar-button--selected"]]: props.selected
|
|
718
|
+
}),
|
|
687
719
|
"data-testid": props["data-testid"],
|
|
688
720
|
onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
|
|
689
721
|
type: props.type === "submit" ? "submit" : "button",
|
|
@@ -697,19 +729,19 @@ var ToolbarButton = (0, import_react16.memo)(
|
|
|
697
729
|
}
|
|
698
730
|
);
|
|
699
731
|
ToolbarButton.displayName = "ToolbarButton";
|
|
700
|
-
var Toolbar = (0,
|
|
732
|
+
var Toolbar = (0, import_react17.memo)((props) => {
|
|
701
733
|
const classNames = useStyles_default(Toolbar_default);
|
|
702
|
-
return /* @__PURE__ */
|
|
734
|
+
return /* @__PURE__ */ import_react17.default.createElement("div", { className: (0, import_classnames6.default)(classNames["sendbox__toolbar"], props.className) }, props.children);
|
|
703
735
|
});
|
|
704
736
|
Toolbar.displayName = "Toolbar";
|
|
705
|
-
var ToolbarSeparator = (0,
|
|
737
|
+
var ToolbarSeparator = (0, import_react17.memo)(
|
|
706
738
|
(props) => {
|
|
707
739
|
const classNames = useStyles_default(Toolbar_default);
|
|
708
|
-
return /* @__PURE__ */
|
|
740
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
709
741
|
"div",
|
|
710
742
|
{
|
|
711
743
|
"aria-orientation": "vertical",
|
|
712
|
-
className: (0,
|
|
744
|
+
className: (0, import_classnames6.default)(classNames["sendbox__toolbar-separator"], props.className),
|
|
713
745
|
role: "separator"
|
|
714
746
|
}
|
|
715
747
|
);
|
|
@@ -724,15 +756,15 @@ var AddAttachmentButton_default = {
|
|
|
724
756
|
};
|
|
725
757
|
|
|
726
758
|
// src/components/sendbox/AddAttachmentButton.tsx
|
|
727
|
-
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } =
|
|
759
|
+
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } = import_botframework_webchat_component5.hooks;
|
|
728
760
|
function AddAttachmentButton(props) {
|
|
729
|
-
const inputRef = (0,
|
|
761
|
+
const inputRef = (0, import_react18.useRef)(null);
|
|
730
762
|
const classNames = useStyles_default(AddAttachmentButton_default);
|
|
731
763
|
const localize = useLocalizer3();
|
|
732
764
|
const [{ uploadAccept, uploadMultiple }] = useStyleOptions2();
|
|
733
765
|
const onFilesAddedRef = (0, import_use_ref_from4.useRefFrom)(props.onFilesAdded);
|
|
734
|
-
const handleClick = (0,
|
|
735
|
-
const handleFileChange = (0,
|
|
766
|
+
const handleClick = (0, import_react18.useCallback)(() => inputRef.current?.click(), [inputRef]);
|
|
767
|
+
const handleFileChange = (0, import_react18.useCallback)(
|
|
736
768
|
({ target: { files } }) => {
|
|
737
769
|
if (files) {
|
|
738
770
|
onFilesAddedRef.current?.([...files]);
|
|
@@ -743,7 +775,7 @@ function AddAttachmentButton(props) {
|
|
|
743
775
|
},
|
|
744
776
|
[inputRef, onFilesAddedRef]
|
|
745
777
|
);
|
|
746
|
-
return /* @__PURE__ */
|
|
778
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: classNames["sendbox__add-attachment"] }, /* @__PURE__ */ import_react18.default.createElement(
|
|
747
779
|
"input",
|
|
748
780
|
{
|
|
749
781
|
accept: uploadAccept,
|
|
@@ -758,21 +790,22 @@ function AddAttachmentButton(props) {
|
|
|
758
790
|
tabIndex: -1,
|
|
759
791
|
type: "file"
|
|
760
792
|
}
|
|
761
|
-
), /* @__PURE__ */
|
|
793
|
+
), /* @__PURE__ */ import_react18.default.createElement(
|
|
762
794
|
ToolbarButton,
|
|
763
795
|
{
|
|
764
796
|
"aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
|
|
765
797
|
"data-testid": testIds_default.sendBoxUploadButton,
|
|
766
798
|
onClick: handleClick
|
|
767
799
|
},
|
|
768
|
-
/* @__PURE__ */
|
|
800
|
+
/* @__PURE__ */ import_react18.default.createElement(AttachmentIcon, null)
|
|
769
801
|
));
|
|
770
802
|
}
|
|
771
|
-
var AddAttachmentButton_default2 = (0,
|
|
803
|
+
var AddAttachmentButton_default2 = (0, import_react18.memo)(AddAttachmentButton);
|
|
772
804
|
|
|
773
805
|
// src/components/sendbox/Attachments.tsx
|
|
774
|
-
var
|
|
775
|
-
var
|
|
806
|
+
var import_botframework_webchat_component6 = require("botframework-webchat-component");
|
|
807
|
+
var import_react19 = __toESM(require("react"));
|
|
808
|
+
var import_classnames7 = __toESM(require("classnames"));
|
|
776
809
|
|
|
777
810
|
// src/components/sendbox/Attachments.module.css
|
|
778
811
|
var Attachments_default = {
|
|
@@ -780,7 +813,7 @@ var Attachments_default = {
|
|
|
780
813
|
};
|
|
781
814
|
|
|
782
815
|
// src/components/sendbox/Attachments.tsx
|
|
783
|
-
var { useLocalizer: useLocalizer4 } =
|
|
816
|
+
var { useLocalizer: useLocalizer4 } = import_botframework_webchat_component6.hooks;
|
|
784
817
|
var attachmentsPluralStringIds = {
|
|
785
818
|
one: "TEXT_INPUT_ATTACHMENTS_ONE",
|
|
786
819
|
two: "TEXT_INPUT_ATTACHMENTS_TWO",
|
|
@@ -789,16 +822,17 @@ var attachmentsPluralStringIds = {
|
|
|
789
822
|
other: "TEXT_INPUT_ATTACHMENTS_OTHER"
|
|
790
823
|
};
|
|
791
824
|
function Attachments({
|
|
792
|
-
attachments
|
|
825
|
+
attachments,
|
|
826
|
+
className
|
|
793
827
|
}) {
|
|
794
828
|
const classNames = useStyles_default(Attachments_default);
|
|
795
829
|
const localizeWithPlural = useLocalizer4({ plural: true });
|
|
796
|
-
return attachments.length ? /* @__PURE__ */
|
|
830
|
+
return attachments.length ? /* @__PURE__ */ import_react19.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__attachment"], className) }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
|
|
797
831
|
}
|
|
798
|
-
var Attachments_default2 = (0,
|
|
832
|
+
var Attachments_default2 = (0, import_react19.memo)(Attachments);
|
|
799
833
|
|
|
800
834
|
// src/components/sendbox/ErrorMessage.tsx
|
|
801
|
-
var
|
|
835
|
+
var import_react20 = __toESM(require("react"));
|
|
802
836
|
|
|
803
837
|
// src/components/sendbox/ErrorMessage.module.css
|
|
804
838
|
var ErrorMessage_default = {
|
|
@@ -810,30 +844,29 @@ function ErrorMessage(props) {
|
|
|
810
844
|
const classNames = useStyles_default(ErrorMessage_default);
|
|
811
845
|
return (
|
|
812
846
|
// eslint-disable-next-line react/forbid-dom-props
|
|
813
|
-
/* @__PURE__ */
|
|
847
|
+
/* @__PURE__ */ import_react20.default.createElement("span", { className: classNames["sendbox__error-message"], id: props.id, role: "alert" }, props.error)
|
|
814
848
|
);
|
|
815
849
|
}
|
|
816
|
-
var ErrorMessage_default2 = (0,
|
|
850
|
+
var ErrorMessage_default2 = (0, import_react20.memo)(ErrorMessage);
|
|
817
851
|
|
|
818
852
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
819
|
-
var
|
|
820
|
-
var
|
|
853
|
+
var import_react22 = __toESM(require("react"));
|
|
854
|
+
var import_botframework_webchat_component7 = require("botframework-webchat-component");
|
|
821
855
|
|
|
822
856
|
// src/icons/TelephoneKeypad.tsx
|
|
823
|
-
var
|
|
857
|
+
var import_react21 = __toESM(require("react"));
|
|
824
858
|
function TelephoneKeypadIcon(props) {
|
|
825
|
-
return /* @__PURE__ */
|
|
859
|
+
return /* @__PURE__ */ import_react21.default.createElement(
|
|
826
860
|
"svg",
|
|
827
861
|
{
|
|
828
862
|
"aria-hidden": "true",
|
|
829
863
|
className: props.className,
|
|
830
|
-
fill: "currentColor",
|
|
831
864
|
height: "1em",
|
|
832
865
|
viewBox: "0 0 20 20",
|
|
833
866
|
width: "1em",
|
|
834
867
|
xmlns: "http://www.w3.org/2000/svg"
|
|
835
868
|
},
|
|
836
|
-
/* @__PURE__ */
|
|
869
|
+
/* @__PURE__ */ import_react21.default.createElement(
|
|
837
870
|
"path",
|
|
838
871
|
{
|
|
839
872
|
d: "M6 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Zm0 4a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM7.25 12a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM10 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM11.25 16a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 5.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5ZM15.25 8a1.25 1.25 0 1 1-2.5 0 1.25 1.25 0 0 1 2.5 0ZM14 13.25a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5Z",
|
|
@@ -844,27 +877,28 @@ function TelephoneKeypadIcon(props) {
|
|
|
844
877
|
}
|
|
845
878
|
|
|
846
879
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
847
|
-
var { useLocalizer: useLocalizer5 } =
|
|
848
|
-
var TelephoneKeypadToolbarButton = (0,
|
|
849
|
-
const [, setTelephoneKeypadShown] = useShown();
|
|
880
|
+
var { useLocalizer: useLocalizer5 } = import_botframework_webchat_component7.hooks;
|
|
881
|
+
var TelephoneKeypadToolbarButton = (0, import_react22.memo)(() => {
|
|
882
|
+
const [telephoneKeypadShown, setTelephoneKeypadShown] = useShown();
|
|
850
883
|
const localize = useLocalizer5();
|
|
851
|
-
const handleClick = (0,
|
|
852
|
-
return /* @__PURE__ */
|
|
884
|
+
const handleClick = (0, import_react22.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
|
|
885
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
853
886
|
ToolbarButton,
|
|
854
887
|
{
|
|
855
888
|
"aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
|
|
856
889
|
"data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
|
|
857
|
-
onClick: handleClick
|
|
890
|
+
onClick: handleClick,
|
|
891
|
+
selected: telephoneKeypadShown
|
|
858
892
|
},
|
|
859
|
-
/* @__PURE__ */
|
|
893
|
+
/* @__PURE__ */ import_react22.default.createElement(TelephoneKeypadIcon, null)
|
|
860
894
|
);
|
|
861
895
|
});
|
|
862
896
|
TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
|
|
863
897
|
var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
|
|
864
898
|
|
|
865
899
|
// src/components/sendbox/TextArea.tsx
|
|
866
|
-
var
|
|
867
|
-
var
|
|
900
|
+
var import_classnames8 = __toESM(require("classnames"));
|
|
901
|
+
var import_react23 = __toESM(require("react"));
|
|
868
902
|
|
|
869
903
|
// src/components/sendbox/TextArea.module.css
|
|
870
904
|
var TextArea_default = {
|
|
@@ -877,9 +911,9 @@ var TextArea_default = {
|
|
|
877
911
|
};
|
|
878
912
|
|
|
879
913
|
// src/components/sendbox/TextArea.tsx
|
|
880
|
-
var TextArea = (0,
|
|
914
|
+
var TextArea = (0, import_react23.forwardRef)((props, ref) => {
|
|
881
915
|
const classNames = useStyles_default(TextArea_default);
|
|
882
|
-
const handleKeyDown = (0,
|
|
916
|
+
const handleKeyDown = (0, import_react23.useCallback)((event) => {
|
|
883
917
|
if (!event.shiftKey && event.key === "Enter") {
|
|
884
918
|
event.preventDefault();
|
|
885
919
|
if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
|
|
@@ -887,10 +921,10 @@ var TextArea = (0, import_react22.forwardRef)((props, ref) => {
|
|
|
887
921
|
}
|
|
888
922
|
}
|
|
889
923
|
}, []);
|
|
890
|
-
return /* @__PURE__ */
|
|
924
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
891
925
|
"div",
|
|
892
926
|
{
|
|
893
|
-
className: (0,
|
|
927
|
+
className: (0, import_classnames8.default)(
|
|
894
928
|
classNames["sendbox__text-area"],
|
|
895
929
|
{
|
|
896
930
|
[classNames["sendbox__text-area--hidden"]]: props.hidden
|
|
@@ -899,10 +933,10 @@ var TextArea = (0, import_react22.forwardRef)((props, ref) => {
|
|
|
899
933
|
),
|
|
900
934
|
role: props.hidden ? "hidden" : void 0
|
|
901
935
|
},
|
|
902
|
-
/* @__PURE__ */
|
|
936
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
903
937
|
"div",
|
|
904
938
|
{
|
|
905
|
-
className: (0,
|
|
939
|
+
className: (0, import_classnames8.default)(
|
|
906
940
|
classNames["sendbox__text-area-doppelganger"],
|
|
907
941
|
classNames["sendbox__text-area-shared"],
|
|
908
942
|
classNames["sendbox__text-area-input--scroll"]
|
|
@@ -911,11 +945,11 @@ var TextArea = (0, import_react22.forwardRef)((props, ref) => {
|
|
|
911
945
|
props.value || props.placeholder,
|
|
912
946
|
" "
|
|
913
947
|
),
|
|
914
|
-
/* @__PURE__ */
|
|
948
|
+
/* @__PURE__ */ import_react23.default.createElement(
|
|
915
949
|
"textarea",
|
|
916
950
|
{
|
|
917
951
|
"aria-label": props["aria-label"],
|
|
918
|
-
className: (0,
|
|
952
|
+
className: (0, import_classnames8.default)(
|
|
919
953
|
classNames["sendbox__text-area-input"],
|
|
920
954
|
classNames["sendbox__text-area-shared"],
|
|
921
955
|
classNames["sendbox__text-area-input--scroll"]
|
|
@@ -936,10 +970,10 @@ TextArea.displayName = "TextArea";
|
|
|
936
970
|
var TextArea_default2 = TextArea;
|
|
937
971
|
|
|
938
972
|
// src/components/sendbox/private/useSubmitError.ts
|
|
939
|
-
var
|
|
940
|
-
var
|
|
973
|
+
var import_botframework_webchat_component8 = require("botframework-webchat-component");
|
|
974
|
+
var import_react24 = require("react");
|
|
941
975
|
var import_use_ref_from5 = require("use-ref-from");
|
|
942
|
-
var { useConnectivityStatus, useLocalizer: useLocalizer6 } =
|
|
976
|
+
var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component8.hooks;
|
|
943
977
|
var useSubmitError = ({
|
|
944
978
|
attachments,
|
|
945
979
|
message
|
|
@@ -949,13 +983,13 @@ var useSubmitError = ({
|
|
|
949
983
|
const submitErrorRef = (0, import_use_ref_from5.useRefFrom)(
|
|
950
984
|
connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
|
|
951
985
|
);
|
|
952
|
-
const errorMessageStringMap = (0,
|
|
986
|
+
const errorMessageStringMap = (0, import_react24.useMemo)(
|
|
953
987
|
() => Object.freeze(
|
|
954
988
|
(/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
|
|
955
989
|
),
|
|
956
990
|
[localize]
|
|
957
991
|
);
|
|
958
|
-
return (0,
|
|
992
|
+
return (0, import_react24.useMemo)(
|
|
959
993
|
() => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
|
|
960
994
|
[errorMessageStringMap, submitErrorRef]
|
|
961
995
|
);
|
|
@@ -963,9 +997,9 @@ var useSubmitError = ({
|
|
|
963
997
|
var useSubmitError_default = useSubmitError;
|
|
964
998
|
|
|
965
999
|
// src/components/sendbox/private/useUniqueId.ts
|
|
966
|
-
var
|
|
1000
|
+
var import_react25 = require("react");
|
|
967
1001
|
function useUniqueId(prefix) {
|
|
968
|
-
const id = (0,
|
|
1002
|
+
const id = (0, import_react25.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
|
|
969
1003
|
prefix = prefix ? `${prefix}--` : "";
|
|
970
1004
|
return `${prefix}${id}`;
|
|
971
1005
|
}
|
|
@@ -974,6 +1008,10 @@ function useUniqueId(prefix) {
|
|
|
974
1008
|
var sendbox_default = {
|
|
975
1009
|
sendbox: "sendbox_sendbox",
|
|
976
1010
|
sendbox__sendbox: "sendbox_sendbox__sendbox",
|
|
1011
|
+
"sendbox__attachment--in-grid": "sendbox_sendbox__attachment--in-grid",
|
|
1012
|
+
"sendbox__text-area--in-grid": "sendbox_sendbox__text-area--in-grid",
|
|
1013
|
+
"sendbox__sendbox-controls--in-grid": "sendbox_sendbox__sendbox-controls--in-grid",
|
|
1014
|
+
"sendbox__telephone-keypad--in-grid": "sendbox_sendbox__telephone-keypad--in-grid",
|
|
977
1015
|
"sendbox__sendbox-text": "sendbox_sendbox__sendbox-text",
|
|
978
1016
|
"sendbox__sendbox-controls": "sendbox_sendbox__sendbox-controls",
|
|
979
1017
|
"sendbox__text-counter": "sendbox_sendbox__text-counter",
|
|
@@ -981,10 +1019,10 @@ var sendbox_default = {
|
|
|
981
1019
|
};
|
|
982
1020
|
|
|
983
1021
|
// src/components/sendbox/index.tsx
|
|
984
|
-
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } =
|
|
1022
|
+
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component9.hooks;
|
|
985
1023
|
function SendBox(props) {
|
|
986
|
-
const inputRef = (0,
|
|
987
|
-
const [message, setMessage] = (0,
|
|
1024
|
+
const inputRef = (0, import_react26.useRef)(null);
|
|
1025
|
+
const [message, setMessage] = (0, import_react26.useState)("");
|
|
988
1026
|
const [attachments, setAttachments] = useSendBoxAttachments();
|
|
989
1027
|
const [{ hideTelephoneKeypadButton, hideUploadButton, maxMessageLength }] = useStyleOptions3();
|
|
990
1028
|
const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
|
|
@@ -997,7 +1035,7 @@ function SendBox(props) {
|
|
|
997
1035
|
const [telephoneKeypadShown] = useShown();
|
|
998
1036
|
const attachmentsRef = (0, import_use_ref_from6.useRefFrom)(attachments);
|
|
999
1037
|
const messageRef = (0, import_use_ref_from6.useRefFrom)(message);
|
|
1000
|
-
const handleSendBoxClick = (0,
|
|
1038
|
+
const handleSendBoxClick = (0, import_react26.useCallback)(
|
|
1001
1039
|
(event) => {
|
|
1002
1040
|
if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
|
|
1003
1041
|
return;
|
|
@@ -1006,11 +1044,11 @@ function SendBox(props) {
|
|
|
1006
1044
|
},
|
|
1007
1045
|
[inputRef]
|
|
1008
1046
|
);
|
|
1009
|
-
const handleMessageChange = (0,
|
|
1047
|
+
const handleMessageChange = (0, import_react26.useCallback)(
|
|
1010
1048
|
(event) => setMessage(event.currentTarget.value),
|
|
1011
1049
|
[setMessage]
|
|
1012
1050
|
);
|
|
1013
|
-
const handleAddFiles = (0,
|
|
1051
|
+
const handleAddFiles = (0, import_react26.useCallback)(
|
|
1014
1052
|
async (inputFiles) => {
|
|
1015
1053
|
const newAttachments = Object.freeze(
|
|
1016
1054
|
await Promise.all(
|
|
@@ -1028,7 +1066,7 @@ function SendBox(props) {
|
|
|
1028
1066
|
},
|
|
1029
1067
|
[makeThumbnail, setAttachments]
|
|
1030
1068
|
);
|
|
1031
|
-
const handleFormSubmit = (0,
|
|
1069
|
+
const handleFormSubmit = (0, import_react26.useCallback)(
|
|
1032
1070
|
(event) => {
|
|
1033
1071
|
event.preventDefault();
|
|
1034
1072
|
if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
|
|
@@ -1040,7 +1078,7 @@ function SendBox(props) {
|
|
|
1040
1078
|
},
|
|
1041
1079
|
[attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
|
|
1042
1080
|
);
|
|
1043
|
-
const handleTelephoneKeypadButtonClick = (0,
|
|
1081
|
+
const handleTelephoneKeypadButtonClick = (0, import_react26.useCallback)(
|
|
1044
1082
|
// TODO: We need more official way of sending DTMF.
|
|
1045
1083
|
(dtmf) => sendMessage(`/DTMF ${dtmf}`),
|
|
1046
1084
|
[sendMessage]
|
|
@@ -1052,18 +1090,11 @@ function SendBox(props) {
|
|
|
1052
1090
|
"aria-errormessage": errorMessageId
|
|
1053
1091
|
}
|
|
1054
1092
|
};
|
|
1055
|
-
return /* @__PURE__ */
|
|
1056
|
-
Surrogate_default,
|
|
1057
|
-
{
|
|
1058
|
-
autoFocus: true,
|
|
1059
|
-
isHorizontal: false,
|
|
1060
|
-
onButtonClick: handleTelephoneKeypadButtonClick
|
|
1061
|
-
}
|
|
1062
|
-
), /* @__PURE__ */ import_react25.default.createElement(
|
|
1093
|
+
return /* @__PURE__ */ import_react26.default.createElement("form", { ...aria, className: (0, import_classnames9.default)(classNames["sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react26.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react26.default.createElement(
|
|
1063
1094
|
TextArea_default2,
|
|
1064
1095
|
{
|
|
1065
1096
|
"aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
|
|
1066
|
-
className: classNames["sendbox__sendbox-text"],
|
|
1097
|
+
className: (0, import_classnames9.default)(classNames["sendbox__sendbox-text"], classNames["sendbox__text-area--in-grid"]),
|
|
1067
1098
|
"data-testid": testIds_default.sendBoxTextBox,
|
|
1068
1099
|
hidden: telephoneKeypadShown,
|
|
1069
1100
|
onInput: handleMessageChange,
|
|
@@ -1071,38 +1102,46 @@ function SendBox(props) {
|
|
|
1071
1102
|
ref: inputRef,
|
|
1072
1103
|
value: message
|
|
1073
1104
|
}
|
|
1074
|
-
), /* @__PURE__ */
|
|
1105
|
+
), /* @__PURE__ */ import_react26.default.createElement(
|
|
1106
|
+
Surrogate_default,
|
|
1107
|
+
{
|
|
1108
|
+
autoFocus: true,
|
|
1109
|
+
className: classNames["sendbox__telephone-keypad--in-grid"],
|
|
1110
|
+
isHorizontal: false,
|
|
1111
|
+
onButtonClick: handleTelephoneKeypadButtonClick
|
|
1112
|
+
}
|
|
1113
|
+
), /* @__PURE__ */ import_react26.default.createElement(Attachments_default2, { attachments, className: classNames["sendbox__attachment--in-grid"] }), /* @__PURE__ */ import_react26.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox-controls"], classNames["sendbox__sendbox-controls--in-grid"]) }, !telephoneKeypadShown && maxMessageLength && /* @__PURE__ */ import_react26.default.createElement(
|
|
1075
1114
|
"div",
|
|
1076
1115
|
{
|
|
1077
|
-
className: (0,
|
|
1116
|
+
className: (0, import_classnames9.default)(classNames["sendbox__text-counter"], {
|
|
1078
1117
|
[classNames["sendbox__text-counter--error"]]: isMessageLengthExceeded
|
|
1079
1118
|
})
|
|
1080
1119
|
},
|
|
1081
1120
|
`${message.length}/${maxMessageLength}`
|
|
1082
|
-
), /* @__PURE__ */
|
|
1121
|
+
), /* @__PURE__ */ import_react26.default.createElement(Toolbar, null, !hideTelephoneKeypadButton && /* @__PURE__ */ import_react26.default.createElement(TelephoneKeypadToolbarButton_default, null), !hideUploadButton && /* @__PURE__ */ import_react26.default.createElement(AddAttachmentButton_default2, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react26.default.createElement(
|
|
1083
1122
|
ToolbarButton,
|
|
1084
1123
|
{
|
|
1085
1124
|
"aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
|
|
1086
1125
|
"data-testid": testIds_default.sendBoxSendButton,
|
|
1087
|
-
disabled: isMessageLengthExceeded,
|
|
1126
|
+
disabled: isMessageLengthExceeded || telephoneKeypadShown,
|
|
1088
1127
|
type: "submit"
|
|
1089
1128
|
},
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
))), /* @__PURE__ */
|
|
1129
|
+
/* @__PURE__ */ import_react26.default.createElement(SendIcon, null)
|
|
1130
|
+
))), /* @__PURE__ */ import_react26.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react26.default.createElement(ErrorMessage_default2, { error: errorMessage, id: errorMessageId })));
|
|
1092
1131
|
}
|
|
1093
|
-
var sendbox_default2 = (0,
|
|
1132
|
+
var sendbox_default2 = (0, import_react26.memo)(SendBox);
|
|
1094
1133
|
|
|
1095
1134
|
// src/components/SendBox.tsx
|
|
1096
1135
|
var SendBox_default = sendbox_default2;
|
|
1097
1136
|
|
|
1098
1137
|
// src/private/FluentThemeProvider.tsx
|
|
1099
|
-
var { ThemeProvider } =
|
|
1138
|
+
var { ThemeProvider } = import_botframework_webchat_component10.Components;
|
|
1100
1139
|
var sendBoxMiddleware = [() => () => () => SendBox_default];
|
|
1101
|
-
var FluentThemeProvider = ({ children }) => /* @__PURE__ */
|
|
1102
|
-
var FluentThemeProvider_default = (0,
|
|
1140
|
+
var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react27.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react27.default.createElement(Provider_default, null, /* @__PURE__ */ import_react27.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
|
|
1141
|
+
var FluentThemeProvider_default = (0, import_react27.memo)(FluentThemeProvider);
|
|
1103
1142
|
|
|
1104
1143
|
// src/index.ts
|
|
1105
|
-
(0, import_inject_meta_tag.injectMetaTag)("botframework-webchat-fluent-theme:version", "4.17.0-main.
|
|
1144
|
+
(0, import_inject_meta_tag.injectMetaTag)("botframework-webchat-fluent-theme:version", "4.17.0-main.20240419.2240f2a");
|
|
1106
1145
|
injectStyles();
|
|
1107
1146
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1108
1147
|
0 && (module.exports = {
|