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
|
@@ -43,6 +43,66 @@
|
|
|
43
43
|
}
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
+
// node_modules/classnames/index.js
|
|
47
|
+
var require_classnames = __commonJS({
|
|
48
|
+
"node_modules/classnames/index.js"(exports, module) {
|
|
49
|
+
(function() {
|
|
50
|
+
"use strict";
|
|
51
|
+
var hasOwn = {}.hasOwnProperty;
|
|
52
|
+
function classNames() {
|
|
53
|
+
var classes = "";
|
|
54
|
+
for (var i = 0; i < arguments.length; i++) {
|
|
55
|
+
var arg = arguments[i];
|
|
56
|
+
if (arg) {
|
|
57
|
+
classes = appendClass(classes, parseValue(arg));
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return classes;
|
|
61
|
+
}
|
|
62
|
+
function parseValue(arg) {
|
|
63
|
+
if (typeof arg === "string" || typeof arg === "number") {
|
|
64
|
+
return arg;
|
|
65
|
+
}
|
|
66
|
+
if (typeof arg !== "object") {
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
if (Array.isArray(arg)) {
|
|
70
|
+
return classNames.apply(null, arg);
|
|
71
|
+
}
|
|
72
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
73
|
+
return arg.toString();
|
|
74
|
+
}
|
|
75
|
+
var classes = "";
|
|
76
|
+
for (var key in arg) {
|
|
77
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
78
|
+
classes = appendClass(classes, key);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return classes;
|
|
82
|
+
}
|
|
83
|
+
function appendClass(value, newClass) {
|
|
84
|
+
if (!newClass) {
|
|
85
|
+
return value;
|
|
86
|
+
}
|
|
87
|
+
if (value) {
|
|
88
|
+
return value + " " + newClass;
|
|
89
|
+
}
|
|
90
|
+
return value + newClass;
|
|
91
|
+
}
|
|
92
|
+
if (typeof module !== "undefined" && module.exports) {
|
|
93
|
+
classNames.default = classNames;
|
|
94
|
+
module.exports = classNames;
|
|
95
|
+
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
96
|
+
define("classnames", [], function() {
|
|
97
|
+
return classNames;
|
|
98
|
+
});
|
|
99
|
+
} else {
|
|
100
|
+
window.classNames = classNames;
|
|
101
|
+
}
|
|
102
|
+
})();
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
|
|
46
106
|
// node_modules/core-js-pure/internals/global.js
|
|
47
107
|
var require_global = __commonJS({
|
|
48
108
|
"node_modules/core-js-pure/internals/global.js"(exports, module) {
|
|
@@ -1206,66 +1266,6 @@
|
|
|
1206
1266
|
}
|
|
1207
1267
|
});
|
|
1208
1268
|
|
|
1209
|
-
// node_modules/classnames/index.js
|
|
1210
|
-
var require_classnames = __commonJS({
|
|
1211
|
-
"node_modules/classnames/index.js"(exports, module) {
|
|
1212
|
-
(function() {
|
|
1213
|
-
"use strict";
|
|
1214
|
-
var hasOwn = {}.hasOwnProperty;
|
|
1215
|
-
function classNames() {
|
|
1216
|
-
var classes = "";
|
|
1217
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
1218
|
-
var arg = arguments[i];
|
|
1219
|
-
if (arg) {
|
|
1220
|
-
classes = appendClass(classes, parseValue(arg));
|
|
1221
|
-
}
|
|
1222
|
-
}
|
|
1223
|
-
return classes;
|
|
1224
|
-
}
|
|
1225
|
-
function parseValue(arg) {
|
|
1226
|
-
if (typeof arg === "string" || typeof arg === "number") {
|
|
1227
|
-
return arg;
|
|
1228
|
-
}
|
|
1229
|
-
if (typeof arg !== "object") {
|
|
1230
|
-
return "";
|
|
1231
|
-
}
|
|
1232
|
-
if (Array.isArray(arg)) {
|
|
1233
|
-
return classNames.apply(null, arg);
|
|
1234
|
-
}
|
|
1235
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes("[native code]")) {
|
|
1236
|
-
return arg.toString();
|
|
1237
|
-
}
|
|
1238
|
-
var classes = "";
|
|
1239
|
-
for (var key in arg) {
|
|
1240
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
1241
|
-
classes = appendClass(classes, key);
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
return classes;
|
|
1245
|
-
}
|
|
1246
|
-
function appendClass(value, newClass) {
|
|
1247
|
-
if (!newClass) {
|
|
1248
|
-
return value;
|
|
1249
|
-
}
|
|
1250
|
-
if (value) {
|
|
1251
|
-
return value + " " + newClass;
|
|
1252
|
-
}
|
|
1253
|
-
return value + newClass;
|
|
1254
|
-
}
|
|
1255
|
-
if (typeof module !== "undefined" && module.exports) {
|
|
1256
|
-
classNames.default = classNames;
|
|
1257
|
-
module.exports = classNames;
|
|
1258
|
-
} else if (typeof define === "function" && typeof define.amd === "object" && define.amd) {
|
|
1259
|
-
define("classnames", [], function() {
|
|
1260
|
-
return classNames;
|
|
1261
|
-
});
|
|
1262
|
-
} else {
|
|
1263
|
-
window.classNames = classNames;
|
|
1264
|
-
}
|
|
1265
|
-
})();
|
|
1266
|
-
}
|
|
1267
|
-
});
|
|
1268
|
-
|
|
1269
1269
|
// node_modules/inject-meta-tag/lib/esmodules/injectMetaTag.js
|
|
1270
1270
|
function injectMeta(name, content) {
|
|
1271
1271
|
try {
|
|
@@ -1282,8 +1282,8 @@
|
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
1284
|
// src/private/FluentThemeProvider.tsx
|
|
1285
|
-
var
|
|
1286
|
-
var
|
|
1285
|
+
var import_botframework_webchat_component10 = __toESM(require_botframework_webchat_component());
|
|
1286
|
+
var import_react28 = __toESM(require_react());
|
|
1287
1287
|
|
|
1288
1288
|
// src/components/telephoneKeypad/Provider.tsx
|
|
1289
1289
|
var import_react2 = __toESM(require_react());
|
|
@@ -1315,10 +1315,11 @@
|
|
|
1315
1315
|
var Provider_default = Provider;
|
|
1316
1316
|
|
|
1317
1317
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
1318
|
-
var
|
|
1318
|
+
var import_react9 = __toESM(require_react());
|
|
1319
1319
|
|
|
1320
1320
|
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1321
|
-
var
|
|
1321
|
+
var import_react8 = __toESM(require_react());
|
|
1322
|
+
var import_classnames = __toESM(require_classnames());
|
|
1322
1323
|
|
|
1323
1324
|
// node_modules/use-ref-from/lib/esmodules/useRefFrom.js
|
|
1324
1325
|
var import_create = __toESM(require_create3());
|
|
@@ -1338,6 +1339,9 @@
|
|
|
1338
1339
|
return readOnlyRef;
|
|
1339
1340
|
}
|
|
1340
1341
|
|
|
1342
|
+
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1343
|
+
var import_botframework_webchat_component = __toESM(require_botframework_webchat_component());
|
|
1344
|
+
|
|
1341
1345
|
// src/components/telephoneKeypad/private/Button.tsx
|
|
1342
1346
|
var import_react5 = __toESM(require_react());
|
|
1343
1347
|
|
|
@@ -1350,7 +1354,7 @@
|
|
|
1350
1354
|
};
|
|
1351
1355
|
|
|
1352
1356
|
// src/styles/injectStyle.ts
|
|
1353
|
-
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";
|
|
1357
|
+
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";
|
|
1354
1358
|
function injectStyles() {
|
|
1355
1359
|
if (globalThis.document) {
|
|
1356
1360
|
const style = document.createElement("style");
|
|
@@ -1433,39 +1437,63 @@
|
|
|
1433
1437
|
// src/components/telephoneKeypad/private/TelephoneKeypad.module.css
|
|
1434
1438
|
var TelephoneKeypad_default = {
|
|
1435
1439
|
"telephone-keypad": "TelephoneKeypad_telephone-keypad",
|
|
1436
|
-
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box"
|
|
1440
|
+
"telephone-keypad__box": "TelephoneKeypad_telephone-keypad__box",
|
|
1441
|
+
"telephone-keypad__info-message": "TelephoneKeypad_telephone-keypad__info-message",
|
|
1442
|
+
"telephone-keypad__info-message-link": "TelephoneKeypad_telephone-keypad__info-message-link"
|
|
1437
1443
|
};
|
|
1438
1444
|
|
|
1445
|
+
// src/icons/InfoSmallIcon.tsx
|
|
1446
|
+
var import_react7 = __toESM(require_react());
|
|
1447
|
+
var InfoSmallIcon_default = (0, import_react7.memo)((props) => /* @__PURE__ */ import_react7.default.createElement(
|
|
1448
|
+
"svg",
|
|
1449
|
+
{
|
|
1450
|
+
"aria-hidden": "true",
|
|
1451
|
+
className: props.className,
|
|
1452
|
+
height: "1em",
|
|
1453
|
+
viewBox: "0 0 16 16",
|
|
1454
|
+
width: "1em",
|
|
1455
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1456
|
+
},
|
|
1457
|
+
/* @__PURE__ */ import_react7.default.createElement(
|
|
1458
|
+
"path",
|
|
1459
|
+
{
|
|
1460
|
+
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",
|
|
1461
|
+
fill: "currentColor"
|
|
1462
|
+
}
|
|
1463
|
+
)
|
|
1464
|
+
));
|
|
1465
|
+
|
|
1439
1466
|
// src/components/telephoneKeypad/private/TelephoneKeypad.tsx
|
|
1440
|
-
var
|
|
1467
|
+
var { LocalizedString } = import_botframework_webchat_component.Components;
|
|
1468
|
+
var Orientation = (0, import_react8.memo)(
|
|
1441
1469
|
({ children, isHorizontal }) => {
|
|
1442
1470
|
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
1443
1471
|
return isHorizontal ? (
|
|
1444
1472
|
// <HorizontalDialPadController>{children}</HorizontalDialPadController>
|
|
1445
1473
|
false
|
|
1446
|
-
) : /* @__PURE__ */
|
|
1474
|
+
) : /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["telephone-keypad__box"] }, children);
|
|
1447
1475
|
}
|
|
1448
1476
|
);
|
|
1449
1477
|
Orientation.displayName = "TelephoneKeypad:Orientation";
|
|
1450
|
-
var TelephoneKeypad = (0,
|
|
1478
|
+
var TelephoneKeypad = (0, import_react8.memo)(({ autoFocus, className, onButtonClick, isHorizontal }) => {
|
|
1451
1479
|
const autoFocusRef = useRefFrom(autoFocus);
|
|
1452
1480
|
const classNames = useStyles_default(TelephoneKeypad_default);
|
|
1453
|
-
const firstButtonRef = (0,
|
|
1481
|
+
const firstButtonRef = (0, import_react8.useRef)(null);
|
|
1454
1482
|
const onButtonClickRef = useRefFrom(onButtonClick);
|
|
1455
1483
|
const [, setShown] = useShown();
|
|
1456
|
-
const handleButton1Click = (0,
|
|
1457
|
-
const handleButton2Click = (0,
|
|
1458
|
-
const handleButton3Click = (0,
|
|
1459
|
-
const handleButton4Click = (0,
|
|
1460
|
-
const handleButton5Click = (0,
|
|
1461
|
-
const handleButton6Click = (0,
|
|
1462
|
-
const handleButton7Click = (0,
|
|
1463
|
-
const handleButton8Click = (0,
|
|
1464
|
-
const handleButton9Click = (0,
|
|
1465
|
-
const handleButton0Click = (0,
|
|
1466
|
-
const handleButtonStarClick = (0,
|
|
1467
|
-
const handleButtonPoundClick = (0,
|
|
1468
|
-
const handleKeyDown = (0,
|
|
1484
|
+
const handleButton1Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("1"), [onButtonClickRef]);
|
|
1485
|
+
const handleButton2Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("2"), [onButtonClickRef]);
|
|
1486
|
+
const handleButton3Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("3"), [onButtonClickRef]);
|
|
1487
|
+
const handleButton4Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("4"), [onButtonClickRef]);
|
|
1488
|
+
const handleButton5Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("5"), [onButtonClickRef]);
|
|
1489
|
+
const handleButton6Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("6"), [onButtonClickRef]);
|
|
1490
|
+
const handleButton7Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("7"), [onButtonClickRef]);
|
|
1491
|
+
const handleButton8Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("8"), [onButtonClickRef]);
|
|
1492
|
+
const handleButton9Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("9"), [onButtonClickRef]);
|
|
1493
|
+
const handleButton0Click = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("0"), [onButtonClickRef]);
|
|
1494
|
+
const handleButtonStarClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("star"), [onButtonClickRef]);
|
|
1495
|
+
const handleButtonPoundClick = (0, import_react8.useCallback)(() => onButtonClickRef.current?.("pound"), [onButtonClickRef]);
|
|
1496
|
+
const handleKeyDown = (0, import_react8.useCallback)(
|
|
1469
1497
|
(event) => {
|
|
1470
1498
|
if (event.key === "Escape") {
|
|
1471
1499
|
setShown(false);
|
|
@@ -1473,10 +1501,10 @@
|
|
|
1473
1501
|
},
|
|
1474
1502
|
[setShown]
|
|
1475
1503
|
);
|
|
1476
|
-
(0,
|
|
1504
|
+
(0, import_react8.useEffect)(() => {
|
|
1477
1505
|
autoFocusRef.current && firstButtonRef.current?.focus();
|
|
1478
1506
|
}, [autoFocusRef, firstButtonRef]);
|
|
1479
|
-
return /* @__PURE__ */
|
|
1507
|
+
return /* @__PURE__ */ import_react8.default.createElement("div", { className: (0, import_classnames.default)(classNames["telephone-keypad"], className), onKeyDown: handleKeyDown }, /* @__PURE__ */ import_react8.default.createElement(Orientation, { isHorizontal }, /* @__PURE__ */ import_react8.default.createElement(
|
|
1480
1508
|
Button_default2,
|
|
1481
1509
|
{
|
|
1482
1510
|
button: "1",
|
|
@@ -1484,7 +1512,7 @@
|
|
|
1484
1512
|
onClick: handleButton1Click,
|
|
1485
1513
|
ref: firstButtonRef
|
|
1486
1514
|
}
|
|
1487
|
-
), /* @__PURE__ */
|
|
1515
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1488
1516
|
Button_default2,
|
|
1489
1517
|
{
|
|
1490
1518
|
button: "2",
|
|
@@ -1492,7 +1520,7 @@
|
|
|
1492
1520
|
onClick: handleButton2Click,
|
|
1493
1521
|
ruby: "ABC"
|
|
1494
1522
|
}
|
|
1495
|
-
), /* @__PURE__ */
|
|
1523
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1496
1524
|
Button_default2,
|
|
1497
1525
|
{
|
|
1498
1526
|
button: "3",
|
|
@@ -1500,7 +1528,7 @@
|
|
|
1500
1528
|
onClick: handleButton3Click,
|
|
1501
1529
|
ruby: "DEF"
|
|
1502
1530
|
}
|
|
1503
|
-
), /* @__PURE__ */
|
|
1531
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1504
1532
|
Button_default2,
|
|
1505
1533
|
{
|
|
1506
1534
|
button: "4",
|
|
@@ -1508,7 +1536,7 @@
|
|
|
1508
1536
|
onClick: handleButton4Click,
|
|
1509
1537
|
ruby: "GHI"
|
|
1510
1538
|
}
|
|
1511
|
-
), /* @__PURE__ */
|
|
1539
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1512
1540
|
Button_default2,
|
|
1513
1541
|
{
|
|
1514
1542
|
button: "5",
|
|
@@ -1516,7 +1544,7 @@
|
|
|
1516
1544
|
onClick: handleButton5Click,
|
|
1517
1545
|
ruby: "JKL"
|
|
1518
1546
|
}
|
|
1519
|
-
), /* @__PURE__ */
|
|
1547
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1520
1548
|
Button_default2,
|
|
1521
1549
|
{
|
|
1522
1550
|
button: "6",
|
|
@@ -1524,7 +1552,7 @@
|
|
|
1524
1552
|
onClick: handleButton6Click,
|
|
1525
1553
|
ruby: "MNO"
|
|
1526
1554
|
}
|
|
1527
|
-
), /* @__PURE__ */
|
|
1555
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1528
1556
|
Button_default2,
|
|
1529
1557
|
{
|
|
1530
1558
|
button: "7",
|
|
@@ -1532,7 +1560,7 @@
|
|
|
1532
1560
|
onClick: handleButton7Click,
|
|
1533
1561
|
ruby: "PQRS"
|
|
1534
1562
|
}
|
|
1535
|
-
), /* @__PURE__ */
|
|
1563
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1536
1564
|
Button_default2,
|
|
1537
1565
|
{
|
|
1538
1566
|
button: "8",
|
|
@@ -1540,7 +1568,7 @@
|
|
|
1540
1568
|
onClick: handleButton8Click,
|
|
1541
1569
|
ruby: "TUV"
|
|
1542
1570
|
}
|
|
1543
|
-
), /* @__PURE__ */
|
|
1571
|
+
), /* @__PURE__ */ import_react8.default.createElement(
|
|
1544
1572
|
Button_default2,
|
|
1545
1573
|
{
|
|
1546
1574
|
button: "9",
|
|
@@ -1548,26 +1576,32 @@
|
|
|
1548
1576
|
onClick: handleButton9Click,
|
|
1549
1577
|
ruby: "WXYZ"
|
|
1550
1578
|
}
|
|
1551
|
-
), /* @__PURE__ */
|
|
1579
|
+
), /* @__PURE__ */ import_react8.default.createElement(Button_default2, { button: "star", "data-testid": testIds_default.sendBoxTelephoneKeypadButtonStar, onClick: handleButtonStarClick }), /* @__PURE__ */ import_react8.default.createElement(Button_default2, { button: "0", "data-testid": testIds_default.sendBoxTelephoneKeypadButton0, onClick: handleButton0Click, ruby: "+" }), /* @__PURE__ */ import_react8.default.createElement(
|
|
1552
1580
|
Button_default2,
|
|
1553
1581
|
{
|
|
1554
1582
|
button: "pound",
|
|
1555
1583
|
"data-testid": testIds_default.sendBoxTelephoneKeypadButtonPound,
|
|
1556
1584
|
onClick: handleButtonPoundClick
|
|
1557
1585
|
}
|
|
1586
|
+
)), /* @__PURE__ */ import_react8.default.createElement("div", { className: classNames["telephone-keypad__info-message"] }, /* @__PURE__ */ import_react8.default.createElement(InfoSmallIcon_default, null), /* @__PURE__ */ import_react8.default.createElement(
|
|
1587
|
+
LocalizedString,
|
|
1588
|
+
{
|
|
1589
|
+
linkClassName: classNames["telephone-keypad__info-message-link"],
|
|
1590
|
+
stringIds: "TELEPHONE_KEYPAD_INPUT_MESSAGE"
|
|
1591
|
+
}
|
|
1558
1592
|
)));
|
|
1559
1593
|
});
|
|
1560
1594
|
TelephoneKeypad.displayName = "TelephoneKeypad";
|
|
1561
1595
|
var TelephoneKeypad_default2 = TelephoneKeypad;
|
|
1562
1596
|
|
|
1563
1597
|
// src/components/telephoneKeypad/Surrogate.tsx
|
|
1564
|
-
var TelephoneKeypadSurrogate = (0,
|
|
1598
|
+
var TelephoneKeypadSurrogate = (0, import_react9.memo)((props) => useShown()[0] ? /* @__PURE__ */ import_react9.default.createElement(TelephoneKeypad_default2, { ...props }) : false);
|
|
1565
1599
|
TelephoneKeypadSurrogate.displayName = "TelephoneKeypad.Surrogate";
|
|
1566
1600
|
var Surrogate_default = TelephoneKeypadSurrogate;
|
|
1567
1601
|
|
|
1568
1602
|
// src/components/Theme.tsx
|
|
1569
|
-
var
|
|
1570
|
-
var
|
|
1603
|
+
var import_react10 = __toESM(require_react());
|
|
1604
|
+
var import_classnames2 = __toESM(require_classnames());
|
|
1571
1605
|
|
|
1572
1606
|
// src/components/Theme.module.css
|
|
1573
1607
|
var Theme_default = {
|
|
@@ -1578,29 +1612,28 @@
|
|
|
1578
1612
|
var rootClassName = "webchat-fluent";
|
|
1579
1613
|
function WebchatTheme(props) {
|
|
1580
1614
|
const classNames = useStyles_default(Theme_default);
|
|
1581
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ import_react10.default.createElement("div", { className: (0, import_classnames2.default)(rootClassName, classNames["theme"]) }, props.children);
|
|
1582
1616
|
}
|
|
1583
1617
|
|
|
1584
1618
|
// src/components/sendbox/index.tsx
|
|
1585
|
-
var
|
|
1586
|
-
var
|
|
1587
|
-
var
|
|
1619
|
+
var import_botframework_webchat_component9 = __toESM(require_botframework_webchat_component());
|
|
1620
|
+
var import_classnames9 = __toESM(require_classnames());
|
|
1621
|
+
var import_react27 = __toESM(require_react());
|
|
1588
1622
|
|
|
1589
1623
|
// src/icons/SendIcon.tsx
|
|
1590
|
-
var
|
|
1624
|
+
var import_react11 = __toESM(require_react());
|
|
1591
1625
|
function SendIcon(props) {
|
|
1592
|
-
return /* @__PURE__ */
|
|
1626
|
+
return /* @__PURE__ */ import_react11.default.createElement(
|
|
1593
1627
|
"svg",
|
|
1594
1628
|
{
|
|
1595
1629
|
"aria-hidden": "true",
|
|
1596
1630
|
className: props.className,
|
|
1597
|
-
fill: "currentColor",
|
|
1598
1631
|
height: "1em",
|
|
1599
1632
|
viewBox: "0 0 20 20",
|
|
1600
1633
|
width: "1em",
|
|
1601
1634
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1602
1635
|
},
|
|
1603
|
-
/* @__PURE__ */
|
|
1636
|
+
/* @__PURE__ */ import_react11.default.createElement(
|
|
1604
1637
|
"path",
|
|
1605
1638
|
{
|
|
1606
1639
|
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",
|
|
@@ -1611,25 +1644,24 @@
|
|
|
1611
1644
|
}
|
|
1612
1645
|
|
|
1613
1646
|
// src/components/dropZone/index.tsx
|
|
1614
|
-
var
|
|
1615
|
-
var
|
|
1616
|
-
var
|
|
1647
|
+
var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
|
|
1648
|
+
var import_classnames3 = __toESM(require_classnames());
|
|
1649
|
+
var import_react13 = __toESM(require_react());
|
|
1617
1650
|
|
|
1618
1651
|
// src/icons/AddDocumentIcon.tsx
|
|
1619
|
-
var
|
|
1652
|
+
var import_react12 = __toESM(require_react());
|
|
1620
1653
|
function AddDocumentIcon(props) {
|
|
1621
|
-
return /* @__PURE__ */
|
|
1654
|
+
return /* @__PURE__ */ import_react12.default.createElement(
|
|
1622
1655
|
"svg",
|
|
1623
1656
|
{
|
|
1624
1657
|
"aria-hidden": "true",
|
|
1625
1658
|
className: props.className,
|
|
1626
|
-
fill: "currentColor",
|
|
1627
1659
|
height: "1em",
|
|
1628
1660
|
viewBox: "0 0 20 20",
|
|
1629
1661
|
width: "1em",
|
|
1630
1662
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1631
1663
|
},
|
|
1632
|
-
/* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ import_react12.default.createElement(
|
|
1633
1665
|
"path",
|
|
1634
1666
|
{
|
|
1635
1667
|
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",
|
|
@@ -1647,7 +1679,7 @@
|
|
|
1647
1679
|
};
|
|
1648
1680
|
|
|
1649
1681
|
// src/components/dropZone/index.tsx
|
|
1650
|
-
var { useLocalizer } =
|
|
1682
|
+
var { useLocalizer } = import_botframework_webchat_component2.hooks;
|
|
1651
1683
|
var handleDragOver = (event) => {
|
|
1652
1684
|
event.preventDefault();
|
|
1653
1685
|
};
|
|
@@ -1663,12 +1695,12 @@
|
|
|
1663
1695
|
return false;
|
|
1664
1696
|
}
|
|
1665
1697
|
var DropZone = (props) => {
|
|
1666
|
-
const [dropZoneState, setDropZoneState] = (0,
|
|
1698
|
+
const [dropZoneState, setDropZoneState] = (0, import_react13.useState)(false);
|
|
1667
1699
|
const classNames = useStyles_default(dropZone_default);
|
|
1668
|
-
const dropZoneRef = (0,
|
|
1700
|
+
const dropZoneRef = (0, import_react13.useRef)(null);
|
|
1669
1701
|
const localize = useLocalizer();
|
|
1670
1702
|
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
1671
|
-
(0,
|
|
1703
|
+
(0, import_react13.useEffect)(() => {
|
|
1672
1704
|
let entranceCounter = 0;
|
|
1673
1705
|
const handleDragEnter = (event) => {
|
|
1674
1706
|
entranceCounter++;
|
|
@@ -1686,7 +1718,7 @@
|
|
|
1686
1718
|
document.removeEventListener("dragleave", handleDragLeave);
|
|
1687
1719
|
};
|
|
1688
1720
|
}, [setDropZoneState]);
|
|
1689
|
-
const handleDrop = (0,
|
|
1721
|
+
const handleDrop = (0, import_react13.useCallback)(
|
|
1690
1722
|
(event) => {
|
|
1691
1723
|
event.preventDefault();
|
|
1692
1724
|
setDropZoneState(false);
|
|
@@ -1697,10 +1729,10 @@
|
|
|
1697
1729
|
},
|
|
1698
1730
|
[onFilesAddedRef, setDropZoneState]
|
|
1699
1731
|
);
|
|
1700
|
-
return dropZoneState ? /* @__PURE__ */
|
|
1732
|
+
return dropZoneState ? /* @__PURE__ */ import_react13.default.createElement(
|
|
1701
1733
|
"div",
|
|
1702
1734
|
{
|
|
1703
|
-
className: (0,
|
|
1735
|
+
className: (0, import_classnames3.default)(classNames["sendbox__attachment-drop-zone"], {
|
|
1704
1736
|
[classNames["sendbox__attachment-drop-zone--droppable"]]: dropZoneState === "droppable"
|
|
1705
1737
|
}),
|
|
1706
1738
|
"data-testid": testIds_default.sendBoxDropZone,
|
|
@@ -1708,26 +1740,26 @@
|
|
|
1708
1740
|
onDrop: handleDrop,
|
|
1709
1741
|
ref: dropZoneRef
|
|
1710
1742
|
},
|
|
1711
|
-
/* @__PURE__ */
|
|
1743
|
+
/* @__PURE__ */ import_react13.default.createElement(AddDocumentIcon, { className: classNames["sendbox__attachment-drop-zone-icon"] }),
|
|
1712
1744
|
localize("TEXT_INPUT_DROP_ZONE")
|
|
1713
1745
|
) : null;
|
|
1714
1746
|
};
|
|
1715
1747
|
DropZone.displayName = "DropZone";
|
|
1716
|
-
var dropZone_default2 = (0,
|
|
1748
|
+
var dropZone_default2 = (0, import_react13.memo)(DropZone);
|
|
1717
1749
|
|
|
1718
1750
|
// src/components/DropZone.tsx
|
|
1719
1751
|
var DropZone_default = dropZone_default2;
|
|
1720
1752
|
|
|
1721
1753
|
// src/components/suggestedActions/index.tsx
|
|
1754
|
+
var import_botframework_webchat_component4 = __toESM(require_botframework_webchat_component());
|
|
1755
|
+
var import_classnames5 = __toESM(require_classnames());
|
|
1756
|
+
var import_react16 = __toESM(require_react());
|
|
1757
|
+
|
|
1758
|
+
// src/components/suggestedActions/SuggestedAction.tsx
|
|
1722
1759
|
var import_botframework_webchat_component3 = __toESM(require_botframework_webchat_component());
|
|
1723
1760
|
var import_classnames4 = __toESM(require_classnames());
|
|
1724
1761
|
var import_react15 = __toESM(require_react());
|
|
1725
1762
|
|
|
1726
|
-
// src/components/suggestedActions/SuggestedAction.tsx
|
|
1727
|
-
var import_botframework_webchat_component2 = __toESM(require_botframework_webchat_component());
|
|
1728
|
-
var import_classnames3 = __toESM(require_classnames());
|
|
1729
|
-
var import_react14 = __toESM(require_react());
|
|
1730
|
-
|
|
1731
1763
|
// src/components/suggestedActions/SuggestedAction.module.css
|
|
1732
1764
|
var SuggestedAction_default = {
|
|
1733
1765
|
"suggested-action": "SuggestedAction_suggested-action",
|
|
@@ -1735,13 +1767,13 @@
|
|
|
1735
1767
|
};
|
|
1736
1768
|
|
|
1737
1769
|
// src/components/suggestedActions/AccessibleButton.tsx
|
|
1738
|
-
var
|
|
1770
|
+
var import_react14 = __toESM(require_react());
|
|
1739
1771
|
var preventDefaultHandler = (event) => event.preventDefault();
|
|
1740
|
-
var AccessibleButton = (0,
|
|
1772
|
+
var AccessibleButton = (0, import_react14.forwardRef)(
|
|
1741
1773
|
({ "aria-hidden": ariaHidden, children, disabled, onClick, tabIndex, ...props }, forwardedRef) => {
|
|
1742
|
-
const targetRef = (0,
|
|
1774
|
+
const targetRef = (0, import_react14.useRef)(null);
|
|
1743
1775
|
const ref = forwardedRef || targetRef;
|
|
1744
|
-
return /* @__PURE__ */
|
|
1776
|
+
return /* @__PURE__ */ import_react14.default.createElement(
|
|
1745
1777
|
"button",
|
|
1746
1778
|
{
|
|
1747
1779
|
"aria-disabled": disabled ? "true" : "false",
|
|
@@ -1760,10 +1792,10 @@
|
|
|
1760
1792
|
);
|
|
1761
1793
|
}
|
|
1762
1794
|
);
|
|
1763
|
-
var AccessibleButton_default = (0,
|
|
1795
|
+
var AccessibleButton_default = (0, import_react14.memo)(AccessibleButton);
|
|
1764
1796
|
|
|
1765
1797
|
// src/components/suggestedActions/SuggestedAction.tsx
|
|
1766
|
-
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } =
|
|
1798
|
+
var { useDisabled, useFocus, usePerformCardAction, useScrollToEnd, useStyleSet, useSuggestedActions } = import_botframework_webchat_component3.hooks;
|
|
1767
1799
|
function SuggestedAction({
|
|
1768
1800
|
buttonText,
|
|
1769
1801
|
className,
|
|
@@ -1778,11 +1810,11 @@
|
|
|
1778
1810
|
const [{ suggestedAction: suggestedActionStyleSet }] = useStyleSet();
|
|
1779
1811
|
const [disabled] = useDisabled();
|
|
1780
1812
|
const focus = useFocus();
|
|
1781
|
-
const focusRef = (0,
|
|
1813
|
+
const focusRef = (0, import_react15.useRef)(null);
|
|
1782
1814
|
const performCardAction = usePerformCardAction();
|
|
1783
1815
|
const classNames = useStyles_default(SuggestedAction_default);
|
|
1784
1816
|
const scrollToEnd = useScrollToEnd();
|
|
1785
|
-
const handleClick = (0,
|
|
1817
|
+
const handleClick = (0, import_react15.useCallback)(
|
|
1786
1818
|
({ target }) => {
|
|
1787
1819
|
(async function() {
|
|
1788
1820
|
await focus("sendBoxWithoutKeyboard");
|
|
@@ -1793,20 +1825,20 @@
|
|
|
1793
1825
|
},
|
|
1794
1826
|
[displayText, focus, performCardAction, scrollToEnd, setSuggestedActions, text, type, value]
|
|
1795
1827
|
);
|
|
1796
|
-
return /* @__PURE__ */
|
|
1828
|
+
return /* @__PURE__ */ import_react15.default.createElement(
|
|
1797
1829
|
AccessibleButton_default,
|
|
1798
1830
|
{
|
|
1799
|
-
className: (0,
|
|
1831
|
+
className: (0, import_classnames4.default)(classNames["suggested-action"], suggestedActionStyleSet + "", (className || "") + ""),
|
|
1800
1832
|
disabled,
|
|
1801
1833
|
onClick: handleClick,
|
|
1802
1834
|
ref: focusRef,
|
|
1803
1835
|
type: "button"
|
|
1804
1836
|
},
|
|
1805
|
-
image && /* @__PURE__ */
|
|
1806
|
-
/* @__PURE__ */
|
|
1837
|
+
image && /* @__PURE__ */ import_react15.default.createElement("img", { alt: imageAlt, className: classNames["suggested-action__image"], src: image }),
|
|
1838
|
+
/* @__PURE__ */ import_react15.default.createElement("span", null, buttonText)
|
|
1807
1839
|
);
|
|
1808
1840
|
}
|
|
1809
|
-
var SuggestedAction_default2 = (0,
|
|
1841
|
+
var SuggestedAction_default2 = (0, import_react15.memo)(SuggestedAction);
|
|
1810
1842
|
|
|
1811
1843
|
// src/components/suggestedActions/private/computeSuggestedActionText.ts
|
|
1812
1844
|
function computeSuggestedActionText(cardAction) {
|
|
@@ -1830,18 +1862,18 @@
|
|
|
1830
1862
|
};
|
|
1831
1863
|
|
|
1832
1864
|
// src/components/suggestedActions/index.tsx
|
|
1833
|
-
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } =
|
|
1865
|
+
var { useLocalizer: useLocalizer2, useStyleOptions, useStyleSet: useStyleSet2, useSuggestedActions: useSuggestedActions2 } = import_botframework_webchat_component4.hooks;
|
|
1834
1866
|
function SuggestedActionStackedOrFlowContainer(props) {
|
|
1835
1867
|
const [{ suggestedActionLayout }] = useStyleOptions();
|
|
1836
1868
|
const [{ suggestedActions: suggestedActionsStyleSet }] = useStyleSet2();
|
|
1837
1869
|
const classNames = useStyles_default(suggestedActions_default);
|
|
1838
|
-
return /* @__PURE__ */
|
|
1870
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
1839
1871
|
"div",
|
|
1840
1872
|
{
|
|
1841
1873
|
"aria-label": props["aria-label"],
|
|
1842
1874
|
"aria-live": "polite",
|
|
1843
1875
|
"aria-orientation": "vertical",
|
|
1844
|
-
className: (0,
|
|
1876
|
+
className: (0, import_classnames5.default)(
|
|
1845
1877
|
classNames["suggested-actions"],
|
|
1846
1878
|
suggestedActionsStyleSet + "",
|
|
1847
1879
|
{
|
|
@@ -1852,7 +1884,7 @@
|
|
|
1852
1884
|
),
|
|
1853
1885
|
role: "toolbar"
|
|
1854
1886
|
},
|
|
1855
|
-
!!props.children && !!
|
|
1887
|
+
!!props.children && !!import_react16.default.Children.count(props.children) && props.children
|
|
1856
1888
|
);
|
|
1857
1889
|
}
|
|
1858
1890
|
function SuggestedActions() {
|
|
@@ -1864,7 +1896,7 @@
|
|
|
1864
1896
|
if (!suggestedActions?.length) {
|
|
1865
1897
|
return null;
|
|
1866
1898
|
}
|
|
1867
|
-
return /* @__PURE__ */
|
|
1899
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
1868
1900
|
SuggestedAction_default2,
|
|
1869
1901
|
{
|
|
1870
1902
|
buttonText: computeSuggestedActionText(cardAction),
|
|
@@ -1879,7 +1911,7 @@
|
|
|
1879
1911
|
}
|
|
1880
1912
|
);
|
|
1881
1913
|
});
|
|
1882
|
-
return /* @__PURE__ */
|
|
1914
|
+
return /* @__PURE__ */ import_react16.default.createElement(
|
|
1883
1915
|
SuggestedActionStackedOrFlowContainer,
|
|
1884
1916
|
{
|
|
1885
1917
|
"aria-label": localize("SUGGESTED_ACTIONS_LABEL_ALT"),
|
|
@@ -1888,30 +1920,29 @@
|
|
|
1888
1920
|
children
|
|
1889
1921
|
);
|
|
1890
1922
|
}
|
|
1891
|
-
var suggestedActions_default2 = (0,
|
|
1923
|
+
var suggestedActions_default2 = (0, import_react16.memo)(SuggestedActions);
|
|
1892
1924
|
|
|
1893
1925
|
// src/components/SuggestedActions.tsx
|
|
1894
1926
|
var SuggestedActions_default = suggestedActions_default2;
|
|
1895
1927
|
|
|
1896
1928
|
// src/components/sendbox/AddAttachmentButton.tsx
|
|
1897
|
-
var
|
|
1898
|
-
var
|
|
1929
|
+
var import_botframework_webchat_component5 = __toESM(require_botframework_webchat_component());
|
|
1930
|
+
var import_react19 = __toESM(require_react());
|
|
1899
1931
|
|
|
1900
1932
|
// src/icons/AttachmentIcon.tsx
|
|
1901
|
-
var
|
|
1933
|
+
var import_react17 = __toESM(require_react());
|
|
1902
1934
|
function AttachmentIcon(props) {
|
|
1903
|
-
return /* @__PURE__ */
|
|
1935
|
+
return /* @__PURE__ */ import_react17.default.createElement(
|
|
1904
1936
|
"svg",
|
|
1905
1937
|
{
|
|
1906
1938
|
"aria-hidden": "true",
|
|
1907
1939
|
className: props.className,
|
|
1908
|
-
fill: "currentColor",
|
|
1909
1940
|
height: "1em",
|
|
1910
1941
|
viewBox: "0 0 20 20",
|
|
1911
1942
|
width: "1em",
|
|
1912
1943
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1913
1944
|
},
|
|
1914
|
-
/* @__PURE__ */
|
|
1945
|
+
/* @__PURE__ */ import_react17.default.createElement(
|
|
1915
1946
|
"path",
|
|
1916
1947
|
{
|
|
1917
1948
|
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",
|
|
@@ -1922,26 +1953,29 @@
|
|
|
1922
1953
|
}
|
|
1923
1954
|
|
|
1924
1955
|
// src/components/sendbox/Toolbar.tsx
|
|
1925
|
-
var
|
|
1926
|
-
var
|
|
1956
|
+
var import_classnames6 = __toESM(require_classnames());
|
|
1957
|
+
var import_react18 = __toESM(require_react());
|
|
1927
1958
|
|
|
1928
1959
|
// src/components/sendbox/Toolbar.module.css
|
|
1929
1960
|
var Toolbar_default = {
|
|
1930
1961
|
sendbox__toolbar: "Toolbar_sendbox__toolbar",
|
|
1931
1962
|
"sendbox__toolbar-button": "Toolbar_sendbox__toolbar-button",
|
|
1963
|
+
"sendbox__toolbar-button--selected": "Toolbar_sendbox__toolbar-button--selected",
|
|
1932
1964
|
"sendbox__toolbar-separator": "Toolbar_sendbox__toolbar-separator"
|
|
1933
1965
|
};
|
|
1934
1966
|
|
|
1935
1967
|
// src/components/sendbox/Toolbar.tsx
|
|
1936
1968
|
var preventDefaultHandler2 = (event) => event.preventDefault();
|
|
1937
|
-
var ToolbarButton = (0,
|
|
1969
|
+
var ToolbarButton = (0, import_react18.memo)(
|
|
1938
1970
|
(props) => {
|
|
1939
1971
|
const classNames = useStyles_default(Toolbar_default);
|
|
1940
|
-
return /* @__PURE__ */
|
|
1972
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
1941
1973
|
"button",
|
|
1942
1974
|
{
|
|
1943
1975
|
"aria-label": props["aria-label"],
|
|
1944
|
-
className: (0,
|
|
1976
|
+
className: (0, import_classnames6.default)(classNames["sendbox__toolbar-button"], props.className, {
|
|
1977
|
+
[classNames["sendbox__toolbar-button--selected"]]: props.selected
|
|
1978
|
+
}),
|
|
1945
1979
|
"data-testid": props["data-testid"],
|
|
1946
1980
|
onClick: props.disabled ? preventDefaultHandler2 : props.onClick,
|
|
1947
1981
|
type: props.type === "submit" ? "submit" : "button",
|
|
@@ -1955,19 +1989,19 @@
|
|
|
1955
1989
|
}
|
|
1956
1990
|
);
|
|
1957
1991
|
ToolbarButton.displayName = "ToolbarButton";
|
|
1958
|
-
var Toolbar = (0,
|
|
1992
|
+
var Toolbar = (0, import_react18.memo)((props) => {
|
|
1959
1993
|
const classNames = useStyles_default(Toolbar_default);
|
|
1960
|
-
return /* @__PURE__ */
|
|
1994
|
+
return /* @__PURE__ */ import_react18.default.createElement("div", { className: (0, import_classnames6.default)(classNames["sendbox__toolbar"], props.className) }, props.children);
|
|
1961
1995
|
});
|
|
1962
1996
|
Toolbar.displayName = "Toolbar";
|
|
1963
|
-
var ToolbarSeparator = (0,
|
|
1997
|
+
var ToolbarSeparator = (0, import_react18.memo)(
|
|
1964
1998
|
(props) => {
|
|
1965
1999
|
const classNames = useStyles_default(Toolbar_default);
|
|
1966
|
-
return /* @__PURE__ */
|
|
2000
|
+
return /* @__PURE__ */ import_react18.default.createElement(
|
|
1967
2001
|
"div",
|
|
1968
2002
|
{
|
|
1969
2003
|
"aria-orientation": "vertical",
|
|
1970
|
-
className: (0,
|
|
2004
|
+
className: (0, import_classnames6.default)(classNames["sendbox__toolbar-separator"], props.className),
|
|
1971
2005
|
role: "separator"
|
|
1972
2006
|
}
|
|
1973
2007
|
);
|
|
@@ -1982,15 +2016,15 @@
|
|
|
1982
2016
|
};
|
|
1983
2017
|
|
|
1984
2018
|
// src/components/sendbox/AddAttachmentButton.tsx
|
|
1985
|
-
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } =
|
|
2019
|
+
var { useLocalizer: useLocalizer3, useStyleOptions: useStyleOptions2 } = import_botframework_webchat_component5.hooks;
|
|
1986
2020
|
function AddAttachmentButton(props) {
|
|
1987
|
-
const inputRef = (0,
|
|
2021
|
+
const inputRef = (0, import_react19.useRef)(null);
|
|
1988
2022
|
const classNames = useStyles_default(AddAttachmentButton_default);
|
|
1989
2023
|
const localize = useLocalizer3();
|
|
1990
2024
|
const [{ uploadAccept, uploadMultiple }] = useStyleOptions2();
|
|
1991
2025
|
const onFilesAddedRef = useRefFrom(props.onFilesAdded);
|
|
1992
|
-
const handleClick = (0,
|
|
1993
|
-
const handleFileChange = (0,
|
|
2026
|
+
const handleClick = (0, import_react19.useCallback)(() => inputRef.current?.click(), [inputRef]);
|
|
2027
|
+
const handleFileChange = (0, import_react19.useCallback)(
|
|
1994
2028
|
({ target: { files } }) => {
|
|
1995
2029
|
if (files) {
|
|
1996
2030
|
onFilesAddedRef.current?.([...files]);
|
|
@@ -2001,7 +2035,7 @@
|
|
|
2001
2035
|
},
|
|
2002
2036
|
[inputRef, onFilesAddedRef]
|
|
2003
2037
|
);
|
|
2004
|
-
return /* @__PURE__ */
|
|
2038
|
+
return /* @__PURE__ */ import_react19.default.createElement("div", { className: classNames["sendbox__add-attachment"] }, /* @__PURE__ */ import_react19.default.createElement(
|
|
2005
2039
|
"input",
|
|
2006
2040
|
{
|
|
2007
2041
|
accept: uploadAccept,
|
|
@@ -2016,21 +2050,22 @@
|
|
|
2016
2050
|
tabIndex: -1,
|
|
2017
2051
|
type: "file"
|
|
2018
2052
|
}
|
|
2019
|
-
), /* @__PURE__ */
|
|
2053
|
+
), /* @__PURE__ */ import_react19.default.createElement(
|
|
2020
2054
|
ToolbarButton,
|
|
2021
2055
|
{
|
|
2022
2056
|
"aria-label": localize("TEXT_INPUT_UPLOAD_BUTTON_ALT"),
|
|
2023
2057
|
"data-testid": testIds_default.sendBoxUploadButton,
|
|
2024
2058
|
onClick: handleClick
|
|
2025
2059
|
},
|
|
2026
|
-
/* @__PURE__ */
|
|
2060
|
+
/* @__PURE__ */ import_react19.default.createElement(AttachmentIcon, null)
|
|
2027
2061
|
));
|
|
2028
2062
|
}
|
|
2029
|
-
var AddAttachmentButton_default2 = (0,
|
|
2063
|
+
var AddAttachmentButton_default2 = (0, import_react19.memo)(AddAttachmentButton);
|
|
2030
2064
|
|
|
2031
2065
|
// src/components/sendbox/Attachments.tsx
|
|
2032
|
-
var
|
|
2033
|
-
var
|
|
2066
|
+
var import_botframework_webchat_component6 = __toESM(require_botframework_webchat_component());
|
|
2067
|
+
var import_react20 = __toESM(require_react());
|
|
2068
|
+
var import_classnames7 = __toESM(require_classnames());
|
|
2034
2069
|
|
|
2035
2070
|
// src/components/sendbox/Attachments.module.css
|
|
2036
2071
|
var Attachments_default = {
|
|
@@ -2038,7 +2073,7 @@
|
|
|
2038
2073
|
};
|
|
2039
2074
|
|
|
2040
2075
|
// src/components/sendbox/Attachments.tsx
|
|
2041
|
-
var { useLocalizer: useLocalizer4 } =
|
|
2076
|
+
var { useLocalizer: useLocalizer4 } = import_botframework_webchat_component6.hooks;
|
|
2042
2077
|
var attachmentsPluralStringIds = {
|
|
2043
2078
|
one: "TEXT_INPUT_ATTACHMENTS_ONE",
|
|
2044
2079
|
two: "TEXT_INPUT_ATTACHMENTS_TWO",
|
|
@@ -2047,16 +2082,17 @@
|
|
|
2047
2082
|
other: "TEXT_INPUT_ATTACHMENTS_OTHER"
|
|
2048
2083
|
};
|
|
2049
2084
|
function Attachments({
|
|
2050
|
-
attachments
|
|
2085
|
+
attachments,
|
|
2086
|
+
className
|
|
2051
2087
|
}) {
|
|
2052
2088
|
const classNames = useStyles_default(Attachments_default);
|
|
2053
2089
|
const localizeWithPlural = useLocalizer4({ plural: true });
|
|
2054
|
-
return attachments.length ? /* @__PURE__ */
|
|
2090
|
+
return attachments.length ? /* @__PURE__ */ import_react20.default.createElement("div", { className: (0, import_classnames7.default)(classNames["sendbox__attachment"], className) }, localizeWithPlural(attachmentsPluralStringIds, attachments.length)) : null;
|
|
2055
2091
|
}
|
|
2056
|
-
var Attachments_default2 = (0,
|
|
2092
|
+
var Attachments_default2 = (0, import_react20.memo)(Attachments);
|
|
2057
2093
|
|
|
2058
2094
|
// src/components/sendbox/ErrorMessage.tsx
|
|
2059
|
-
var
|
|
2095
|
+
var import_react21 = __toESM(require_react());
|
|
2060
2096
|
|
|
2061
2097
|
// src/components/sendbox/ErrorMessage.module.css
|
|
2062
2098
|
var ErrorMessage_default = {
|
|
@@ -2068,30 +2104,29 @@
|
|
|
2068
2104
|
const classNames = useStyles_default(ErrorMessage_default);
|
|
2069
2105
|
return (
|
|
2070
2106
|
// eslint-disable-next-line react/forbid-dom-props
|
|
2071
|
-
/* @__PURE__ */
|
|
2107
|
+
/* @__PURE__ */ import_react21.default.createElement("span", { className: classNames["sendbox__error-message"], id: props.id, role: "alert" }, props.error)
|
|
2072
2108
|
);
|
|
2073
2109
|
}
|
|
2074
|
-
var ErrorMessage_default2 = (0,
|
|
2110
|
+
var ErrorMessage_default2 = (0, import_react21.memo)(ErrorMessage);
|
|
2075
2111
|
|
|
2076
2112
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
2077
|
-
var
|
|
2078
|
-
var
|
|
2113
|
+
var import_react23 = __toESM(require_react());
|
|
2114
|
+
var import_botframework_webchat_component7 = __toESM(require_botframework_webchat_component());
|
|
2079
2115
|
|
|
2080
2116
|
// src/icons/TelephoneKeypad.tsx
|
|
2081
|
-
var
|
|
2117
|
+
var import_react22 = __toESM(require_react());
|
|
2082
2118
|
function TelephoneKeypadIcon(props) {
|
|
2083
|
-
return /* @__PURE__ */
|
|
2119
|
+
return /* @__PURE__ */ import_react22.default.createElement(
|
|
2084
2120
|
"svg",
|
|
2085
2121
|
{
|
|
2086
2122
|
"aria-hidden": "true",
|
|
2087
2123
|
className: props.className,
|
|
2088
|
-
fill: "currentColor",
|
|
2089
2124
|
height: "1em",
|
|
2090
2125
|
viewBox: "0 0 20 20",
|
|
2091
2126
|
width: "1em",
|
|
2092
2127
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2093
2128
|
},
|
|
2094
|
-
/* @__PURE__ */
|
|
2129
|
+
/* @__PURE__ */ import_react22.default.createElement(
|
|
2095
2130
|
"path",
|
|
2096
2131
|
{
|
|
2097
2132
|
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",
|
|
@@ -2102,27 +2137,28 @@
|
|
|
2102
2137
|
}
|
|
2103
2138
|
|
|
2104
2139
|
// src/components/sendbox/TelephoneKeypadToolbarButton.tsx
|
|
2105
|
-
var { useLocalizer: useLocalizer5 } =
|
|
2106
|
-
var TelephoneKeypadToolbarButton = (0,
|
|
2107
|
-
const [, setTelephoneKeypadShown] = useShown();
|
|
2140
|
+
var { useLocalizer: useLocalizer5 } = import_botframework_webchat_component7.hooks;
|
|
2141
|
+
var TelephoneKeypadToolbarButton = (0, import_react23.memo)(() => {
|
|
2142
|
+
const [telephoneKeypadShown, setTelephoneKeypadShown] = useShown();
|
|
2108
2143
|
const localize = useLocalizer5();
|
|
2109
|
-
const handleClick = (0,
|
|
2110
|
-
return /* @__PURE__ */
|
|
2144
|
+
const handleClick = (0, import_react23.useCallback)(() => setTelephoneKeypadShown((shown) => !shown), [setTelephoneKeypadShown]);
|
|
2145
|
+
return /* @__PURE__ */ import_react23.default.createElement(
|
|
2111
2146
|
ToolbarButton,
|
|
2112
2147
|
{
|
|
2113
2148
|
"aria-label": localize("TEXT_INPUT_TELEPHONE_KEYPAD_BUTTON_ALT"),
|
|
2114
2149
|
"data-testid": testIds_default.sendBoxTelephoneKeypadToolbarButton,
|
|
2115
|
-
onClick: handleClick
|
|
2150
|
+
onClick: handleClick,
|
|
2151
|
+
selected: telephoneKeypadShown
|
|
2116
2152
|
},
|
|
2117
|
-
/* @__PURE__ */
|
|
2153
|
+
/* @__PURE__ */ import_react23.default.createElement(TelephoneKeypadIcon, null)
|
|
2118
2154
|
);
|
|
2119
2155
|
});
|
|
2120
2156
|
TelephoneKeypadToolbarButton.displayName = "SendBox.TelephoneKeypadToolbarButton";
|
|
2121
2157
|
var TelephoneKeypadToolbarButton_default = TelephoneKeypadToolbarButton;
|
|
2122
2158
|
|
|
2123
2159
|
// src/components/sendbox/TextArea.tsx
|
|
2124
|
-
var
|
|
2125
|
-
var
|
|
2160
|
+
var import_classnames8 = __toESM(require_classnames());
|
|
2161
|
+
var import_react24 = __toESM(require_react());
|
|
2126
2162
|
|
|
2127
2163
|
// src/components/sendbox/TextArea.module.css
|
|
2128
2164
|
var TextArea_default = {
|
|
@@ -2135,9 +2171,9 @@
|
|
|
2135
2171
|
};
|
|
2136
2172
|
|
|
2137
2173
|
// src/components/sendbox/TextArea.tsx
|
|
2138
|
-
var TextArea = (0,
|
|
2174
|
+
var TextArea = (0, import_react24.forwardRef)((props, ref) => {
|
|
2139
2175
|
const classNames = useStyles_default(TextArea_default);
|
|
2140
|
-
const handleKeyDown = (0,
|
|
2176
|
+
const handleKeyDown = (0, import_react24.useCallback)((event) => {
|
|
2141
2177
|
if (!event.shiftKey && event.key === "Enter") {
|
|
2142
2178
|
event.preventDefault();
|
|
2143
2179
|
if ("form" in event.target && event.target.form instanceof HTMLFormElement) {
|
|
@@ -2145,10 +2181,10 @@
|
|
|
2145
2181
|
}
|
|
2146
2182
|
}
|
|
2147
2183
|
}, []);
|
|
2148
|
-
return /* @__PURE__ */
|
|
2184
|
+
return /* @__PURE__ */ import_react24.default.createElement(
|
|
2149
2185
|
"div",
|
|
2150
2186
|
{
|
|
2151
|
-
className: (0,
|
|
2187
|
+
className: (0, import_classnames8.default)(
|
|
2152
2188
|
classNames["sendbox__text-area"],
|
|
2153
2189
|
{
|
|
2154
2190
|
[classNames["sendbox__text-area--hidden"]]: props.hidden
|
|
@@ -2157,10 +2193,10 @@
|
|
|
2157
2193
|
),
|
|
2158
2194
|
role: props.hidden ? "hidden" : void 0
|
|
2159
2195
|
},
|
|
2160
|
-
/* @__PURE__ */
|
|
2196
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
2161
2197
|
"div",
|
|
2162
2198
|
{
|
|
2163
|
-
className: (0,
|
|
2199
|
+
className: (0, import_classnames8.default)(
|
|
2164
2200
|
classNames["sendbox__text-area-doppelganger"],
|
|
2165
2201
|
classNames["sendbox__text-area-shared"],
|
|
2166
2202
|
classNames["sendbox__text-area-input--scroll"]
|
|
@@ -2169,11 +2205,11 @@
|
|
|
2169
2205
|
props.value || props.placeholder,
|
|
2170
2206
|
" "
|
|
2171
2207
|
),
|
|
2172
|
-
/* @__PURE__ */
|
|
2208
|
+
/* @__PURE__ */ import_react24.default.createElement(
|
|
2173
2209
|
"textarea",
|
|
2174
2210
|
{
|
|
2175
2211
|
"aria-label": props["aria-label"],
|
|
2176
|
-
className: (0,
|
|
2212
|
+
className: (0, import_classnames8.default)(
|
|
2177
2213
|
classNames["sendbox__text-area-input"],
|
|
2178
2214
|
classNames["sendbox__text-area-shared"],
|
|
2179
2215
|
classNames["sendbox__text-area-input--scroll"]
|
|
@@ -2194,9 +2230,9 @@
|
|
|
2194
2230
|
var TextArea_default2 = TextArea;
|
|
2195
2231
|
|
|
2196
2232
|
// src/components/sendbox/private/useSubmitError.ts
|
|
2197
|
-
var
|
|
2198
|
-
var
|
|
2199
|
-
var { useConnectivityStatus, useLocalizer: useLocalizer6 } =
|
|
2233
|
+
var import_botframework_webchat_component8 = __toESM(require_botframework_webchat_component());
|
|
2234
|
+
var import_react25 = __toESM(require_react());
|
|
2235
|
+
var { useConnectivityStatus, useLocalizer: useLocalizer6 } = import_botframework_webchat_component8.hooks;
|
|
2200
2236
|
var useSubmitError = ({
|
|
2201
2237
|
attachments,
|
|
2202
2238
|
message
|
|
@@ -2206,13 +2242,13 @@
|
|
|
2206
2242
|
const submitErrorRef = useRefFrom(
|
|
2207
2243
|
connectivityStatus !== "connected" && connectivityStatus !== "reconnected" ? "offline" : !message && !attachments.length ? "empty" : void 0
|
|
2208
2244
|
);
|
|
2209
|
-
const errorMessageStringMap = (0,
|
|
2245
|
+
const errorMessageStringMap = (0, import_react25.useMemo)(
|
|
2210
2246
|
() => Object.freeze(
|
|
2211
2247
|
(/* @__PURE__ */ new Map()).set("empty", localize("SEND_BOX_IS_EMPTY_TOOLTIP_ALT")).set("offline", localize("CONNECTIVITY_STATUS_ALT_FATAL"))
|
|
2212
2248
|
),
|
|
2213
2249
|
[localize]
|
|
2214
2250
|
);
|
|
2215
|
-
return (0,
|
|
2251
|
+
return (0, import_react25.useMemo)(
|
|
2216
2252
|
() => Object.freeze([submitErrorRef, submitErrorRef.current && errorMessageStringMap.get(submitErrorRef.current)]),
|
|
2217
2253
|
[errorMessageStringMap, submitErrorRef]
|
|
2218
2254
|
);
|
|
@@ -2220,9 +2256,9 @@
|
|
|
2220
2256
|
var useSubmitError_default = useSubmitError;
|
|
2221
2257
|
|
|
2222
2258
|
// src/components/sendbox/private/useUniqueId.ts
|
|
2223
|
-
var
|
|
2259
|
+
var import_react26 = __toESM(require_react());
|
|
2224
2260
|
function useUniqueId(prefix) {
|
|
2225
|
-
const id = (0,
|
|
2261
|
+
const id = (0, import_react26.useMemo)(() => Math.random().toString(36).substr(2, 5), []);
|
|
2226
2262
|
prefix = prefix ? `${prefix}--` : "";
|
|
2227
2263
|
return `${prefix}${id}`;
|
|
2228
2264
|
}
|
|
@@ -2231,6 +2267,10 @@
|
|
|
2231
2267
|
var sendbox_default = {
|
|
2232
2268
|
sendbox: "sendbox_sendbox",
|
|
2233
2269
|
sendbox__sendbox: "sendbox_sendbox__sendbox",
|
|
2270
|
+
"sendbox__attachment--in-grid": "sendbox_sendbox__attachment--in-grid",
|
|
2271
|
+
"sendbox__text-area--in-grid": "sendbox_sendbox__text-area--in-grid",
|
|
2272
|
+
"sendbox__sendbox-controls--in-grid": "sendbox_sendbox__sendbox-controls--in-grid",
|
|
2273
|
+
"sendbox__telephone-keypad--in-grid": "sendbox_sendbox__telephone-keypad--in-grid",
|
|
2234
2274
|
"sendbox__sendbox-text": "sendbox_sendbox__sendbox-text",
|
|
2235
2275
|
"sendbox__sendbox-controls": "sendbox_sendbox__sendbox-controls",
|
|
2236
2276
|
"sendbox__text-counter": "sendbox_sendbox__text-counter",
|
|
@@ -2238,10 +2278,10 @@
|
|
|
2238
2278
|
};
|
|
2239
2279
|
|
|
2240
2280
|
// src/components/sendbox/index.tsx
|
|
2241
|
-
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } =
|
|
2281
|
+
var { useStyleOptions: useStyleOptions3, useMakeThumbnail, useLocalizer: useLocalizer7, useSendBoxAttachments, useSendMessage } = import_botframework_webchat_component9.hooks;
|
|
2242
2282
|
function SendBox(props) {
|
|
2243
|
-
const inputRef = (0,
|
|
2244
|
-
const [message, setMessage] = (0,
|
|
2283
|
+
const inputRef = (0, import_react27.useRef)(null);
|
|
2284
|
+
const [message, setMessage] = (0, import_react27.useState)("");
|
|
2245
2285
|
const [attachments, setAttachments] = useSendBoxAttachments();
|
|
2246
2286
|
const [{ hideTelephoneKeypadButton, hideUploadButton, maxMessageLength }] = useStyleOptions3();
|
|
2247
2287
|
const isMessageLengthExceeded = !!maxMessageLength && message.length > maxMessageLength;
|
|
@@ -2254,7 +2294,7 @@
|
|
|
2254
2294
|
const [telephoneKeypadShown] = useShown();
|
|
2255
2295
|
const attachmentsRef = useRefFrom(attachments);
|
|
2256
2296
|
const messageRef = useRefFrom(message);
|
|
2257
|
-
const handleSendBoxClick = (0,
|
|
2297
|
+
const handleSendBoxClick = (0, import_react27.useCallback)(
|
|
2258
2298
|
(event) => {
|
|
2259
2299
|
if ("tabIndex" in event.target && typeof event.target.tabIndex === "number" && event.target.tabIndex >= 0) {
|
|
2260
2300
|
return;
|
|
@@ -2263,11 +2303,11 @@
|
|
|
2263
2303
|
},
|
|
2264
2304
|
[inputRef]
|
|
2265
2305
|
);
|
|
2266
|
-
const handleMessageChange = (0,
|
|
2306
|
+
const handleMessageChange = (0, import_react27.useCallback)(
|
|
2267
2307
|
(event) => setMessage(event.currentTarget.value),
|
|
2268
2308
|
[setMessage]
|
|
2269
2309
|
);
|
|
2270
|
-
const handleAddFiles = (0,
|
|
2310
|
+
const handleAddFiles = (0, import_react27.useCallback)(
|
|
2271
2311
|
async (inputFiles) => {
|
|
2272
2312
|
const newAttachments = Object.freeze(
|
|
2273
2313
|
await Promise.all(
|
|
@@ -2285,7 +2325,7 @@
|
|
|
2285
2325
|
},
|
|
2286
2326
|
[makeThumbnail, setAttachments]
|
|
2287
2327
|
);
|
|
2288
|
-
const handleFormSubmit = (0,
|
|
2328
|
+
const handleFormSubmit = (0, import_react27.useCallback)(
|
|
2289
2329
|
(event) => {
|
|
2290
2330
|
event.preventDefault();
|
|
2291
2331
|
if (errorRef.current !== "empty" && !isMessageLengthExceeded) {
|
|
@@ -2297,7 +2337,7 @@
|
|
|
2297
2337
|
},
|
|
2298
2338
|
[attachmentsRef, messageRef, sendMessage, setAttachments, setMessage, isMessageLengthExceeded, errorRef, inputRef]
|
|
2299
2339
|
);
|
|
2300
|
-
const handleTelephoneKeypadButtonClick = (0,
|
|
2340
|
+
const handleTelephoneKeypadButtonClick = (0, import_react27.useCallback)(
|
|
2301
2341
|
// TODO: We need more official way of sending DTMF.
|
|
2302
2342
|
(dtmf) => sendMessage(`/DTMF ${dtmf}`),
|
|
2303
2343
|
[sendMessage]
|
|
@@ -2309,18 +2349,11 @@
|
|
|
2309
2349
|
"aria-errormessage": errorMessageId
|
|
2310
2350
|
}
|
|
2311
2351
|
};
|
|
2312
|
-
return /* @__PURE__ */
|
|
2313
|
-
Surrogate_default,
|
|
2314
|
-
{
|
|
2315
|
-
autoFocus: true,
|
|
2316
|
-
isHorizontal: false,
|
|
2317
|
-
onButtonClick: handleTelephoneKeypadButtonClick
|
|
2318
|
-
}
|
|
2319
|
-
), /* @__PURE__ */ import_react26.default.createElement(
|
|
2352
|
+
return /* @__PURE__ */ import_react27.default.createElement("form", { ...aria, className: (0, import_classnames9.default)(classNames["sendbox"], props.className), onSubmit: handleFormSubmit }, /* @__PURE__ */ import_react27.default.createElement(SuggestedActions_default, null), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox"]), onClickCapture: handleSendBoxClick }, /* @__PURE__ */ import_react27.default.createElement(
|
|
2320
2353
|
TextArea_default2,
|
|
2321
2354
|
{
|
|
2322
2355
|
"aria-label": isMessageLengthExceeded ? localize("TEXT_INPUT_LENGTH_EXCEEDED_ALT") : localize("TEXT_INPUT_ALT"),
|
|
2323
|
-
className: classNames["sendbox__sendbox-text"],
|
|
2356
|
+
className: (0, import_classnames9.default)(classNames["sendbox__sendbox-text"], classNames["sendbox__text-area--in-grid"]),
|
|
2324
2357
|
"data-testid": testIds_default.sendBoxTextBox,
|
|
2325
2358
|
hidden: telephoneKeypadShown,
|
|
2326
2359
|
onInput: handleMessageChange,
|
|
@@ -2328,38 +2361,46 @@
|
|
|
2328
2361
|
ref: inputRef,
|
|
2329
2362
|
value: message
|
|
2330
2363
|
}
|
|
2331
|
-
), /* @__PURE__ */
|
|
2364
|
+
), /* @__PURE__ */ import_react27.default.createElement(
|
|
2365
|
+
Surrogate_default,
|
|
2366
|
+
{
|
|
2367
|
+
autoFocus: true,
|
|
2368
|
+
className: classNames["sendbox__telephone-keypad--in-grid"],
|
|
2369
|
+
isHorizontal: false,
|
|
2370
|
+
onButtonClick: handleTelephoneKeypadButtonClick
|
|
2371
|
+
}
|
|
2372
|
+
), /* @__PURE__ */ import_react27.default.createElement(Attachments_default2, { attachments, className: classNames["sendbox__attachment--in-grid"] }), /* @__PURE__ */ import_react27.default.createElement("div", { className: (0, import_classnames9.default)(classNames["sendbox__sendbox-controls"], classNames["sendbox__sendbox-controls--in-grid"]) }, !telephoneKeypadShown && maxMessageLength && /* @__PURE__ */ import_react27.default.createElement(
|
|
2332
2373
|
"div",
|
|
2333
2374
|
{
|
|
2334
|
-
className: (0,
|
|
2375
|
+
className: (0, import_classnames9.default)(classNames["sendbox__text-counter"], {
|
|
2335
2376
|
[classNames["sendbox__text-counter--error"]]: isMessageLengthExceeded
|
|
2336
2377
|
})
|
|
2337
2378
|
},
|
|
2338
2379
|
`${message.length}/${maxMessageLength}`
|
|
2339
|
-
), /* @__PURE__ */
|
|
2380
|
+
), /* @__PURE__ */ import_react27.default.createElement(Toolbar, null, !hideTelephoneKeypadButton && /* @__PURE__ */ import_react27.default.createElement(TelephoneKeypadToolbarButton_default, null), !hideUploadButton && /* @__PURE__ */ import_react27.default.createElement(AddAttachmentButton_default2, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ToolbarSeparator, null), /* @__PURE__ */ import_react27.default.createElement(
|
|
2340
2381
|
ToolbarButton,
|
|
2341
2382
|
{
|
|
2342
2383
|
"aria-label": localize("TEXT_INPUT_SEND_BUTTON_ALT"),
|
|
2343
2384
|
"data-testid": testIds_default.sendBoxSendButton,
|
|
2344
|
-
disabled: isMessageLengthExceeded,
|
|
2385
|
+
disabled: isMessageLengthExceeded || telephoneKeypadShown,
|
|
2345
2386
|
type: "submit"
|
|
2346
2387
|
},
|
|
2347
|
-
/* @__PURE__ */
|
|
2348
|
-
))), /* @__PURE__ */
|
|
2388
|
+
/* @__PURE__ */ import_react27.default.createElement(SendIcon, null)
|
|
2389
|
+
))), /* @__PURE__ */ import_react27.default.createElement(DropZone_default, { onFilesAdded: handleAddFiles }), /* @__PURE__ */ import_react27.default.createElement(ErrorMessage_default2, { error: errorMessage, id: errorMessageId })));
|
|
2349
2390
|
}
|
|
2350
|
-
var sendbox_default2 = (0,
|
|
2391
|
+
var sendbox_default2 = (0, import_react27.memo)(SendBox);
|
|
2351
2392
|
|
|
2352
2393
|
// src/components/SendBox.tsx
|
|
2353
2394
|
var SendBox_default = sendbox_default2;
|
|
2354
2395
|
|
|
2355
2396
|
// src/private/FluentThemeProvider.tsx
|
|
2356
|
-
var { ThemeProvider } =
|
|
2397
|
+
var { ThemeProvider } = import_botframework_webchat_component10.Components;
|
|
2357
2398
|
var sendBoxMiddleware = [() => () => () => SendBox_default];
|
|
2358
|
-
var FluentThemeProvider = ({ children }) => /* @__PURE__ */
|
|
2359
|
-
var FluentThemeProvider_default = (0,
|
|
2399
|
+
var FluentThemeProvider = ({ children }) => /* @__PURE__ */ import_react28.default.createElement(WebchatTheme, null, /* @__PURE__ */ import_react28.default.createElement(Provider_default, null, /* @__PURE__ */ import_react28.default.createElement(ThemeProvider, { sendBoxMiddleware }, children)));
|
|
2400
|
+
var FluentThemeProvider_default = (0, import_react28.memo)(FluentThemeProvider);
|
|
2360
2401
|
|
|
2361
2402
|
// src/index.ts
|
|
2362
|
-
injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.
|
|
2403
|
+
injectMeta("botframework-webchat-fluent-theme:version", "4.17.0-main.20240419.2240f2a");
|
|
2363
2404
|
injectStyles();
|
|
2364
2405
|
|
|
2365
2406
|
// src/bundle.ts
|