@qualtrics/ui-react 2.42.0 → 2.44.0
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/CHANGELOG.md +33 -0
- package/dist/__shared/cjs/{index-2f9f9a05.js → index-b20c6dcb.js} +282 -180
- package/dist/__shared/cjs/{index-ec90a05b.js → index-c4cfd8bd.js} +19 -3
- package/dist/components/Accordion/Accordion2.js +3 -3
- package/dist/components/Accordion/AccordionPanel.js +24 -3
- package/dist/components/Banner/Banner.css.ts.vanilla.js +2 -2
- package/dist/components/Button/Button.js +3 -3
- package/dist/components/ButtonGroup/ButtonGroup2.js +3 -3
- package/dist/components/Checkbox/Checkbox2.js +3 -3
- package/dist/components/ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/Combobox/Combobox2.js +3 -3
- package/dist/components/ConfigPane/ConfigPane2.js +3 -3
- package/dist/components/Divider/Divider2.js +3 -3
- package/dist/components/Dropdown/Dropdown.js +6 -2
- package/dist/components/Dropdown/Dropdown2.js +3 -3
- package/dist/components/Dropdown/DropdownOption.js +6 -9
- package/dist/components/Dropdown/DropdownSearch.js +31 -7
- package/dist/components/FilePicker/FilePicker2.js +3 -3
- package/dist/components/FormField/Caption.js +3 -3
- package/dist/components/FormField/FormField2.js +3 -3
- package/dist/components/FullScreenTakeover/FullScreenTakeover2.js +3 -3
- package/dist/components/Icon/IconTypes.js +4 -0
- package/dist/components/IconButton/IconButton2.js +3 -3
- package/dist/components/InlineInput/InlineInput2.js +3 -3
- package/dist/components/Input/Input.js +41 -15
- package/dist/components/Input/Input2.js +3 -3
- package/dist/components/InputGroup/InputGroup2.js +3 -3
- package/dist/components/Label/Label2.js +3 -3
- package/dist/components/Link/Link2.js +3 -3
- package/dist/components/LoadingSpinner/LoadingSpinner2.js +3 -3
- package/dist/components/LogicEditor/LogicEditor2.js +3 -3
- package/dist/components/Modal/Modal2.js +3 -3
- package/dist/components/NewMenu/NewMenu.js +3 -3
- package/dist/components/NewMenu/parts/ArrowNav/ArrowNav.js +1 -1
- package/dist/components/NewMenu/parts/MenuItem.js +1 -1
- package/dist/components/NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/PageLayout/PageLayout.js +3 -3
- package/dist/components/Pagination/Pagination2.js +3 -3
- package/dist/components/Pagination/PaginationPageInput.js +5 -6
- package/dist/components/Popover/Popover2.js +3 -3
- package/dist/components/QuickSearch/QuickSearch2.js +3 -3
- package/dist/components/Radio/Radio2.js +3 -3
- package/dist/components/SearchInput/SearchInput2.js +3 -3
- package/dist/components/SidebarNav/SidebarNav2.js +3 -3
- package/dist/components/Slider/Slider2.js +3 -3
- package/dist/components/Switch/Switch2.js +3 -3
- package/dist/components/Table/Table2.js +3 -3
- package/dist/components/Tabs/Tabs2.js +3 -3
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/Tooltip2.js +3 -3
- package/dist/components/deprecated_ColorPicker/ColorPicker2.js +3 -3
- package/dist/components/deprecated_NumberStepper/NumberStepper2.js +3 -3
- package/dist/components/deprecated_Tabs/Tabs2.js +3 -3
- package/dist/components/deprecated_Toolbar/Toolbar2.js +3 -3
- package/dist/hooks/useOverlay/useOverlay2.js +3 -3
- package/dist/hooks/useScreenReaderAnnouncement/useScreenReaderAnnouncement2.js +3 -3
- package/dist/icons/Icon.js +3 -3
- package/dist/icons/components/DashboardSpotCheckIcon.js +6 -0
- package/dist/icons/components/EditTableViewIcon.js +6 -0
- package/dist/icons/components/PictureInAPictureIcon.js +6 -0
- package/dist/icons/components/WorkflowIcon.js +6 -0
- package/dist/icons/index.d.ts +8 -0
- package/dist/icons/index.es.js +4 -0
- package/dist/icons/index.js +5 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.es.js +1 -1
- package/dist/index.js +3 -3
- package/dist/next/AdvancedTable/AdvancedTable.js +38 -12
- package/dist/next/AdvancedTable/AdvancedTable2.js +3 -3
- package/dist/next/Chat/ChatInput.css.js +4 -1
- package/dist/next/Chat/ChatInput.css.ts.vanilla.js +3 -3
- package/dist/next/Chat/ChatInput.js +44 -7
- package/dist/next/CollapsibleSearchInput/CollapsibleSearchInput2.js +3 -3
- package/dist/next/Combobox/Combobox2.js +3 -3
- package/dist/next/Drawer/Drawer2.js +3 -3
- package/dist/next/FilterAnchor/FilterAnchor2.js +3 -3
- package/dist/next/Form/FormFields/InputField.js +3 -3
- package/dist/next/Input/Input.js +32 -4
- package/dist/next/Input/Input2.js +3 -3
- package/dist/next/Menu/Menu2.js +3 -3
- package/dist/next/Menu/MenuItem.js +1 -0
- package/dist/next/Menu/SubMenu.js +1 -0
- package/dist/next/PhoneNumberInput/PhoneNumberInput2.js +3 -3
- package/dist/next/Select/Select2.js +3 -3
- package/dist/next/SplitButton/SplitButton2.js +3 -3
- package/dist/next/TimePicker/TimePicker2.js +3 -3
- package/dist/next/ToggleButton/styles.js +3 -3
- package/dist/next/Tooltip/Tooltip.js +10 -0
- package/dist/next/Tooltip/index.js +1 -0
- package/dist/next/index.d.ts +67 -1
- package/dist/next/index.es.js +2 -0
- package/dist/next/index.js +131 -58
- package/dist/translations-en.js +2 -0
- package/dist/utils/Flyout/Flyout2.js +3 -3
- package/icons/package.json +1 -1
- package/next/package.json +2 -2
- package/package.json +7 -4
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import createIconComponent from '../createIconComponent.js';
|
|
2
|
+
|
|
3
|
+
/* THIS FILE IS AUTO-GENERATED */
|
|
4
|
+
var EditTableViewIcon = /*#__PURE__*/createIconComponent('EditTableView', '<path fill-rule="evenodd" clip-rule="evenodd" d="M3 4.75C3 4.33579 3.33579 4 3.75 4H7.75C8.16421 4 8.5 4.33579 8.5 4.75V18.75C8.5 19.1642 8.16421 19.5 7.75 19.5H3.75C3.33579 19.5 3 19.1642 3 18.75V4.75ZM4.5 5.5V18H7V5.5H4.5Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M7 4.75C7 4.33579 7.33579 4 7.75 4H9.25C9.66421 4 10 4.33579 10 4.75C10 5.16421 9.66421 5.5 9.25 5.5H8.5V18H9.25C9.66421 18 10 18.3358 10 18.75C10 19.1642 9.66421 19.5 9.25 19.5H7.75C7.33579 19.5 7 19.1642 7 18.75V4.75Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M11 2.75C11 2.33579 11.3358 2 11.75 2H17.75C18.1642 2 18.5 2.33579 18.5 2.75V5C18.5 5.41421 18.1642 5.75 17.75 5.75C17.3358 5.75 17 5.41421 17 5V3.5H12.5V20H17V18.5C17 18.0858 17.3358 17.75 17.75 17.75C18.1642 17.75 18.5 18.0858 18.5 18.5V20.75C18.5 21.1642 18.1642 21.5 17.75 21.5H11.75C11.3358 21.5 11 21.1642 11 20.75V2.75Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M15.4514 11.7503C15.4775 11.7885 15.5081 11.8312 15.5432 11.8779C15.7103 12.0996 15.9608 12.3837 16.2792 12.6623C16.9252 13.2275 17.7839 13.7136 18.75 13.7136C19.7161 13.7136 20.5748 13.2275 21.2208 12.6623C21.5392 12.3837 21.7897 12.0996 21.9568 11.8779C21.9919 11.8312 22.0225 11.7885 22.0486 11.7503C22.0225 11.7122 21.9919 11.6695 21.9568 11.6228C21.7897 11.4011 21.5392 11.117 21.2208 10.8384C20.5748 10.2732 19.7161 9.78711 18.75 9.78711C17.7839 9.78711 16.9252 10.2732 16.2792 10.8384C15.9608 11.117 15.7103 11.4011 15.5432 11.6228C15.5081 11.6695 15.4775 11.7122 15.4514 11.7503ZM15.4561 9.89763C16.2219 9.22753 17.3632 8.53711 18.75 8.53711C20.1368 8.53711 21.2781 9.22753 22.0439 9.89763C22.4314 10.2366 22.7397 10.5849 22.955 10.8705C23.0622 11.0128 23.1515 11.1463 23.2173 11.2615C23.2497 11.3183 23.2816 11.3795 23.3074 11.4409L23.3079 11.4421C23.3238 11.4801 23.375 11.6023 23.375 11.7503C23.375 11.8984 23.3238 12.0206 23.3079 12.0585L23.3074 12.0597C23.2816 12.1212 23.2497 12.1824 23.2173 12.2392C23.1515 12.3544 23.0622 12.4879 22.955 12.6302C22.7397 12.9158 22.4314 13.264 22.0439 13.6031C21.2781 14.2732 20.1368 14.9636 18.75 14.9636C17.3632 14.9636 16.2219 14.2732 15.4561 13.6031C15.0686 13.264 14.7603 12.9158 14.545 12.6302C14.4378 12.4879 14.3485 12.3544 14.2827 12.2392C14.2503 12.1824 14.2184 12.1212 14.1926 12.0597L14.1921 12.0585C14.1762 12.0206 14.125 11.8984 14.125 11.7503C14.125 11.6023 14.1762 11.4801 14.1921 11.4421L14.1926 11.4409C14.2184 11.3795 14.2503 11.3183 14.2827 11.2615C14.3485 11.1463 14.4378 11.0128 14.545 10.8705C14.7603 10.5849 15.0686 10.2366 15.4561 9.89763Z"/><path d="M20.1619 11.7497C20.1619 12.5294 19.5298 13.1614 18.7501 13.1614C17.9704 13.1614 17.3384 12.5294 17.3384 11.7497C17.3384 10.97 17.9704 10.3379 18.7501 10.3379C19.5298 10.3379 20.1619 10.97 20.1619 11.7497Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M18.7501 11.9114C18.8395 11.9114 18.9119 11.839 18.9119 11.7497C18.9119 11.6603 18.8395 11.5879 18.7501 11.5879C18.6608 11.5879 18.5884 11.6603 18.5884 11.7497C18.5884 11.839 18.6608 11.9114 18.7501 11.9114ZM18.7501 13.1614C19.5298 13.1614 20.1619 12.5294 20.1619 11.7497C20.1619 10.97 19.5298 10.3379 18.7501 10.3379C17.9704 10.3379 17.3384 10.97 17.3384 11.7497C17.3384 12.5294 17.9704 13.1614 18.7501 13.1614Z"/>');
|
|
5
|
+
|
|
6
|
+
export { EditTableViewIcon as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import createIconComponent from '../createIconComponent.js';
|
|
2
|
+
|
|
3
|
+
/* THIS FILE IS AUTO-GENERATED */
|
|
4
|
+
var PictureInAPictureIcon = /*#__PURE__*/createIconComponent('PictureInAPicture', '<path fill-rule="evenodd" clip-rule="evenodd" d="M4 3.25C3.0335 3.25 2.25 4.0335 2.25 5V19C2.25 19.9665 3.0335 20.75 4 20.75H8.625C9.03921 20.75 9.375 20.4142 9.375 20C9.375 19.5858 9.03921 19.25 8.625 19.25H4C3.86193 19.25 3.75 19.1381 3.75 19V5C3.75 4.86193 3.86193 4.75 4 4.75H20C20.1381 4.75 20.25 4.86193 20.25 5V9C20.25 9.41421 20.5858 9.75 21 9.75C21.4142 9.75 21.75 9.41421 21.75 9V5C21.75 4.0335 20.9665 3.25 20 3.25H4ZM12.5 19.5V13.5H20.5V19.5H12.5ZM11 13C11 12.4477 11.4477 12 12 12H21C21.5523 12 22 12.4477 22 13V20C22 20.5523 21.5523 21 21 21H12C11.4477 21 11 20.5523 11 20V13ZM5.46967 6.46967C5.76256 6.17678 6.23744 6.17678 6.53033 6.46967L9.22747 9.16681V7C9.22747 6.58579 9.56326 6.25 9.97747 6.25C10.3917 6.25 10.7275 6.58579 10.7275 7V10.9775C10.7275 11.08 10.7069 11.1777 10.6697 11.2667C10.6345 11.351 10.5833 11.4302 10.5159 11.4995C10.5106 11.5051 10.5051 11.5106 10.4995 11.5159C10.4302 11.5833 10.351 11.6345 10.2667 11.6697C10.1777 11.7069 10.08 11.7275 9.97747 11.7275H6C5.58579 11.7275 5.25 11.3917 5.25 10.9775C5.25 10.5633 5.58579 10.2275 6 10.2275H8.16682L5.46967 7.53033C5.17678 7.23744 5.17678 6.76256 5.46967 6.46967Z"/>');
|
|
5
|
+
|
|
6
|
+
export { PictureInAPictureIcon as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import createIconComponent from '../createIconComponent.js';
|
|
2
|
+
|
|
3
|
+
/* THIS FILE IS AUTO-GENERATED */
|
|
4
|
+
var WorkflowIcon = /*#__PURE__*/createIconComponent('Workflow', '<path fill-rule="evenodd" clip-rule="evenodd" d="M2 4C2 3.44772 2.44772 3 3 3H13C13.5523 3 14 3.44772 14 4V11C14 11.5523 13.5523 12 13 12H8.75V17.25H19.1893L17.4697 15.5303C17.1768 15.2374 17.1768 14.7626 17.4697 14.4697C17.7626 14.1768 18.2374 14.1768 18.5303 14.4697L21.5303 17.4697C21.8232 17.7626 21.8232 18.2374 21.5303 18.5303L18.5303 21.5303C18.2374 21.8232 17.7626 21.8232 17.4697 21.5303C17.1768 21.2374 17.1768 20.7626 17.4697 20.4697L19.1893 18.75H8C7.58579 18.75 7.25 18.4142 7.25 18V12H3C2.44772 12 2 11.5523 2 11V4ZM3.5 10.5V4.5H12.5V10.5H3.5Z"/>');
|
|
5
|
+
|
|
6
|
+
export { WorkflowIcon as default };
|
package/dist/icons/index.d.ts
CHANGED
|
@@ -260,6 +260,8 @@ export declare const CxLogoIcon: ForwardRefExoticComponent<NamedIconsProps & Ref
|
|
|
260
260
|
|
|
261
261
|
export declare const DashboardIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
262
262
|
|
|
263
|
+
export declare const DashboardSpotCheckIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
264
|
+
|
|
263
265
|
export declare const DataAnalysisIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
264
266
|
|
|
265
267
|
export declare const DatabaseIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
@@ -316,6 +318,8 @@ export declare const DropListSelectorIcon: ForwardRefExoticComponent<NamedIconsP
|
|
|
316
318
|
|
|
317
319
|
export declare const EditorGenericIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
318
320
|
|
|
321
|
+
export declare const EditTableViewIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
322
|
+
|
|
319
323
|
export declare const EffortEasyIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
320
324
|
|
|
321
325
|
export declare const EffortHardIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
@@ -681,6 +685,8 @@ export declare const PhoneIcon: ForwardRefExoticComponent<NamedIconsProps & RefA
|
|
|
681
685
|
|
|
682
686
|
export declare const PickGroupRankIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
683
687
|
|
|
688
|
+
export declare const PictureInAPictureIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
689
|
+
|
|
684
690
|
export declare const PieChartIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
685
691
|
|
|
686
692
|
export declare const PinIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
@@ -1059,6 +1065,8 @@ export declare const WidgetsIcon: ForwardRefExoticComponent<NamedIconsProps & Re
|
|
|
1059
1065
|
|
|
1060
1066
|
export declare const WifiIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
1061
1067
|
|
|
1068
|
+
export declare const WorkflowIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
1069
|
+
|
|
1062
1070
|
export declare const WorkflowsIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
|
1063
1071
|
|
|
1064
1072
|
export declare const WorkingFromHomeIcon: ForwardRefExoticComponent<NamedIconsProps & RefAttributes<SVGSVGElement>>;
|
package/dist/icons/index.es.js
CHANGED
|
@@ -126,6 +126,7 @@ export { default as CustomerLeftIcon } from './components/CustomerLeftIcon.js';
|
|
|
126
126
|
export { default as CustomerRightIcon } from './components/CustomerRightIcon.js';
|
|
127
127
|
export { default as CxLogoIcon } from './components/CxLogoIcon.js';
|
|
128
128
|
export { default as DashboardIcon } from './components/DashboardIcon.js';
|
|
129
|
+
export { default as DashboardSpotCheckIcon } from './components/DashboardSpotCheckIcon.js';
|
|
129
130
|
export { default as DataAnalysisIcon } from './components/DataAnalysisIcon.js';
|
|
130
131
|
export { default as DataSourceIcon } from './components/DataSourceIcon.js';
|
|
131
132
|
export { default as DatabaseIcon } from './components/DatabaseIcon.js';
|
|
@@ -155,6 +156,7 @@ export { default as DropIcon } from './components/DropIcon.js';
|
|
|
155
156
|
export { default as DropListSelectorIcon } from './components/DropListSelectorIcon.js';
|
|
156
157
|
export { default as EXCOVIDReturnToWorkIcon } from './components/EXCOVIDReturnToWorkIcon.js';
|
|
157
158
|
export { default as EXCOVIDSolutionIcon } from './components/EXCOVIDSolutionIcon.js';
|
|
159
|
+
export { default as EditTableViewIcon } from './components/EditTableViewIcon.js';
|
|
158
160
|
export { default as EditorGenericIcon } from './components/EditorGenericIcon.js';
|
|
159
161
|
export { default as EffortIcon } from './components/EffortIcon.js';
|
|
160
162
|
export { default as EffortEasyIcon } from './components/EffortEasyIcon.js';
|
|
@@ -329,6 +331,7 @@ export { default as PencilIcon } from './components/PencilIcon.js';
|
|
|
329
331
|
export { default as PercentageIcon } from './components/PercentageIcon.js';
|
|
330
332
|
export { default as PhoneIcon } from './components/PhoneIcon.js';
|
|
331
333
|
export { default as PickGroupRankIcon } from './components/PickGroupRankIcon.js';
|
|
334
|
+
export { default as PictureInAPictureIcon } from './components/PictureInAPictureIcon.js';
|
|
332
335
|
export { default as PieChartIcon } from './components/PieChartIcon.js';
|
|
333
336
|
export { default as PinIcon } from './components/PinIcon.js';
|
|
334
337
|
export { default as PinToIcon } from './components/PinToIcon.js';
|
|
@@ -518,6 +521,7 @@ export { default as WebhookIcon } from './components/WebhookIcon.js';
|
|
|
518
521
|
export { default as WhatsAppIcon } from './components/WhatsAppIcon.js';
|
|
519
522
|
export { default as WidgetsIcon } from './components/WidgetsIcon.js';
|
|
520
523
|
export { default as WifiIcon } from './components/WifiIcon.js';
|
|
524
|
+
export { default as WorkflowIcon } from './components/WorkflowIcon.js';
|
|
521
525
|
export { default as WorkflowsIcon } from './components/WorkflowsIcon.js';
|
|
522
526
|
export { default as WorkingFromHomeIcon } from './components/WorkingFromHomeIcon.js';
|
|
523
527
|
export { default as ZoomInIcon } from './components/ZoomInIcon.js';
|
package/dist/icons/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var icons_index = require('../__shared/cjs/index-
|
|
5
|
+
var icons_index = require('../__shared/cjs/index-c4cfd8bd.js');
|
|
6
6
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
7
7
|
require('react');
|
|
8
8
|
require('classnames');
|
|
@@ -137,6 +137,7 @@ exports.CustomerLeftIcon = icons_index.CustomerLeftIcon;
|
|
|
137
137
|
exports.CustomerRightIcon = icons_index.CustomerRightIcon;
|
|
138
138
|
exports.CxLogoIcon = icons_index.CxLogoIcon;
|
|
139
139
|
exports.DashboardIcon = icons_index.DashboardIcon;
|
|
140
|
+
exports.DashboardSpotCheckIcon = icons_index.DashboardSpotCheckIcon;
|
|
140
141
|
exports.DataAnalysisIcon = icons_index.DataAnalysisIcon;
|
|
141
142
|
exports.DataSourceIcon = icons_index.DataSourceIcon;
|
|
142
143
|
exports.DatabaseIcon = icons_index.DatabaseIcon;
|
|
@@ -166,6 +167,7 @@ exports.DropIcon = icons_index.DropIcon;
|
|
|
166
167
|
exports.DropListSelectorIcon = icons_index.DropListSelectorIcon;
|
|
167
168
|
exports.EXCOVIDReturnToWorkIcon = icons_index.EXCOVIDReturnToWorkIcon;
|
|
168
169
|
exports.EXCOVIDSolutionIcon = icons_index.EXCOVIDSolutionIcon;
|
|
170
|
+
exports.EditTableViewIcon = icons_index.EditTableViewIcon;
|
|
169
171
|
exports.EditorGenericIcon = icons_index.EditorGenericIcon;
|
|
170
172
|
exports.EffortEasyIcon = icons_index.EffortEasyIcon;
|
|
171
173
|
exports.EffortHardIcon = icons_index.EffortHardIcon;
|
|
@@ -340,6 +342,7 @@ exports.PencilIcon = icons_index.PencilIcon;
|
|
|
340
342
|
exports.PercentageIcon = icons_index.PercentageIcon;
|
|
341
343
|
exports.PhoneIcon = icons_index.PhoneIcon;
|
|
342
344
|
exports.PickGroupRankIcon = icons_index.PickGroupRankIcon;
|
|
345
|
+
exports.PictureInAPictureIcon = icons_index.PictureInAPictureIcon;
|
|
343
346
|
exports.PieChartIcon = icons_index.PieChartIcon;
|
|
344
347
|
exports.PinIcon = icons_index.PinIcon;
|
|
345
348
|
exports.PinToIcon = icons_index.PinToIcon;
|
|
@@ -529,6 +532,7 @@ exports.WebhookIcon = icons_index.WebhookIcon;
|
|
|
529
532
|
exports.WhatsAppIcon = icons_index.WhatsAppIcon;
|
|
530
533
|
exports.WidgetsIcon = icons_index.WidgetsIcon;
|
|
531
534
|
exports.WifiIcon = icons_index.WifiIcon;
|
|
535
|
+
exports.WorkflowIcon = icons_index.WorkflowIcon;
|
|
532
536
|
exports.WorkflowsIcon = icons_index.WorkflowsIcon;
|
|
533
537
|
exports.WorkingFromHomeIcon = icons_index.WorkingFromHomeIcon;
|
|
534
538
|
exports.ZoomInIcon = icons_index.ZoomInIcon;
|
package/dist/index.d.ts
CHANGED
|
@@ -509,6 +509,8 @@ declare const _default: {
|
|
|
509
509
|
"chat.loaderLabel": string;
|
|
510
510
|
"chat.cancelButtonLabel": string;
|
|
511
511
|
"chat.accessibleMessageLabel": string;
|
|
512
|
+
"chat.maxCharacterLimit": string;
|
|
513
|
+
"chat.inputHelperText": string;
|
|
512
514
|
"filePicker.single": string;
|
|
513
515
|
"filePicker.multiple": string;
|
|
514
516
|
"logicEditor.all": string;
|
|
@@ -1461,6 +1463,7 @@ export declare const IconTypes: {
|
|
|
1461
1463
|
readonly CustomerRight: "CustomerRight";
|
|
1462
1464
|
readonly CxLogo: "CxLogo";
|
|
1463
1465
|
readonly Dashboard: "Dashboard";
|
|
1466
|
+
readonly DashboardSpotCheck: "DashboardSpotCheck";
|
|
1464
1467
|
readonly DataAnalysis: "DataAnalysis";
|
|
1465
1468
|
readonly DataSource: "DataSource";
|
|
1466
1469
|
readonly Database: "Database";
|
|
@@ -1490,6 +1493,7 @@ export declare const IconTypes: {
|
|
|
1490
1493
|
readonly DropListSelector: "DropListSelector";
|
|
1491
1494
|
readonly EXCOVIDReturnToWork: "EXCOVIDReturnToWork";
|
|
1492
1495
|
readonly EXCOVIDSolution: "EXCOVIDSolution";
|
|
1496
|
+
readonly EditTableView: "EditTableView";
|
|
1493
1497
|
readonly EditorGeneric: "EditorGeneric";
|
|
1494
1498
|
readonly Effort: "Effort";
|
|
1495
1499
|
readonly EffortEasy: "EffortEasy";
|
|
@@ -1664,6 +1668,7 @@ export declare const IconTypes: {
|
|
|
1664
1668
|
readonly Percentage: "Percentage";
|
|
1665
1669
|
readonly Phone: "Phone";
|
|
1666
1670
|
readonly PickGroupRank: "PickGroupRank";
|
|
1671
|
+
readonly PictureInAPicture: "PictureInAPicture";
|
|
1667
1672
|
readonly PieChart: "PieChart";
|
|
1668
1673
|
readonly Pin: "Pin";
|
|
1669
1674
|
readonly PinTo: "PinTo";
|
|
@@ -1853,6 +1858,7 @@ export declare const IconTypes: {
|
|
|
1853
1858
|
readonly WhatsApp: "WhatsApp";
|
|
1854
1859
|
readonly Widgets: "Widgets";
|
|
1855
1860
|
readonly Wifi: "Wifi";
|
|
1861
|
+
readonly Workflow: "Workflow";
|
|
1856
1862
|
readonly Workflows: "Workflows";
|
|
1857
1863
|
readonly WorkingFromHome: "WorkingFromHome";
|
|
1858
1864
|
readonly ZoomIn: "ZoomIn";
|
|
@@ -1980,6 +1986,10 @@ export declare interface InputProps extends Omit<React_2.AllHTMLAttributes<HTMLT
|
|
|
1980
1986
|
* @defaultValue 'text'
|
|
1981
1987
|
*/
|
|
1982
1988
|
type?: 'text' | 'password' | 'number' | 'email' | 'tel' | 'url';
|
|
1989
|
+
/** Makes the input ignore non-numeric input.
|
|
1990
|
+
* @defaultValue true
|
|
1991
|
+
*/
|
|
1992
|
+
allowDecimalNumbers?: boolean;
|
|
1983
1993
|
/** The value for the input. */
|
|
1984
1994
|
value?: string | number;
|
|
1985
1995
|
/** Appended to internal classes on the `input` or `textarea` element. */
|
|
@@ -3244,7 +3254,7 @@ export declare interface TooltipProps extends Omit<React_2.AllHTMLAttributes<HTM
|
|
|
3244
3254
|
*/
|
|
3245
3255
|
isArrowRemoved?: boolean;
|
|
3246
3256
|
/** Themes the tooltip to a light color.
|
|
3247
|
-
* @defaultValue
|
|
3257
|
+
* @defaultValue true
|
|
3248
3258
|
*/
|
|
3249
3259
|
lightTheme?: boolean;
|
|
3250
3260
|
/** The z-index of the tooltip content.
|
package/dist/index.es.js
CHANGED
|
@@ -102,6 +102,6 @@ export { default as deprecated_ToolbarPanel } from './components/deprecated_Tool
|
|
|
102
102
|
|
|
103
103
|
/* eslint-disable camelcase */
|
|
104
104
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
105
|
-
const version = '2.
|
|
105
|
+
const version = '2.44.0';
|
|
106
106
|
|
|
107
107
|
export { version };
|
package/dist/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./__shared/cjs/index-
|
|
5
|
+
var index = require('./__shared/cjs/index-b20c6dcb.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
-
require('./__shared/cjs/index-
|
|
8
|
+
require('./__shared/cjs/index-c4cfd8bd.js');
|
|
9
9
|
require('@babel/runtime-corejs3/helpers/extends');
|
|
10
10
|
require('react-popper');
|
|
11
11
|
require('@popperjs/core');
|
|
@@ -21,7 +21,7 @@ require('throttle-debounce');
|
|
|
21
21
|
|
|
22
22
|
/* eslint-disable camelcase */
|
|
23
23
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
24
|
-
const version = '2.
|
|
24
|
+
const version = '2.44.0';
|
|
25
25
|
|
|
26
26
|
exports.Accordion = index.Accordion;
|
|
27
27
|
exports.AccordionHeader = index.AccordionHeader;
|
|
@@ -288,20 +288,21 @@ const AdvancedTable = _ref => {
|
|
|
288
288
|
} = _ref3;
|
|
289
289
|
return hasChildRows;
|
|
290
290
|
}), [rows]);
|
|
291
|
-
const updateExpandedRowIds = (index,
|
|
291
|
+
const updateExpandedRowIds = (index, isExpanded) => {
|
|
292
292
|
if (!rows || !rows[index]) {
|
|
293
293
|
return;
|
|
294
294
|
}
|
|
295
295
|
const {
|
|
296
|
-
|
|
297
|
-
|
|
296
|
+
rowPropReference,
|
|
297
|
+
id,
|
|
298
|
+
depth
|
|
298
299
|
} = rows[index];
|
|
299
|
-
|
|
300
|
-
rowPropReference
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
onRowsChange === null || onRowsChange === void 0 || onRowsChange(
|
|
300
|
+
const updatedRow = {
|
|
301
|
+
...rowPropReference,
|
|
302
|
+
isExpanded
|
|
303
|
+
};
|
|
304
|
+
const newRows = getExternalRowsWithUpdatedRow(rowsProp, id, depth, updatedRow);
|
|
305
|
+
onRowsChange === null || onRowsChange === void 0 || onRowsChange(newRows);
|
|
305
306
|
};
|
|
306
307
|
const getLastToggledRowIndex = () => {
|
|
307
308
|
const index = rows === null || rows === void 0 ? void 0 : rows.findIndex(_ref4 => {
|
|
@@ -549,7 +550,7 @@ const AdvancedTable = _ref => {
|
|
|
549
550
|
onClick: e => {
|
|
550
551
|
e.stopPropagation(); // prevent onRowSelect
|
|
551
552
|
e.preventDefault();
|
|
552
|
-
updateExpandedRowIds(rowIndex);
|
|
553
|
+
updateExpandedRowIds(rowIndex, !isExpanded);
|
|
553
554
|
}
|
|
554
555
|
});
|
|
555
556
|
const getExpandableRowsSpacer = function (width, inHeader) {
|
|
@@ -577,8 +578,14 @@ const AdvancedTable = _ref => {
|
|
|
577
578
|
return {
|
|
578
579
|
value,
|
|
579
580
|
setValue: newValue => {
|
|
580
|
-
const
|
|
581
|
-
|
|
581
|
+
const updatedRow = {
|
|
582
|
+
...rowPropReference,
|
|
583
|
+
data: {
|
|
584
|
+
...rowPropReference.data,
|
|
585
|
+
[columnId]: newValue
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
const newRows = getExternalRowsWithUpdatedRow(rowsProp, rowId, depth, updatedRow);
|
|
582
589
|
onRowsChange === null || onRowsChange === void 0 || onRowsChange(newRows);
|
|
583
590
|
},
|
|
584
591
|
renderCellContent,
|
|
@@ -938,5 +945,24 @@ function mapExternalRowToInternalRows(row, depthSize, depthIndex, parentId) {
|
|
|
938
945
|
}
|
|
939
946
|
return mappedRows;
|
|
940
947
|
}
|
|
948
|
+
function getExternalRowsWithUpdatedRow(extRows, rowId, depth, updatedRow) {
|
|
949
|
+
if (depth === 0) {
|
|
950
|
+
return extRows.map(row => {
|
|
951
|
+
if (row.id === rowId) {
|
|
952
|
+
return updatedRow;
|
|
953
|
+
}
|
|
954
|
+
return row;
|
|
955
|
+
});
|
|
956
|
+
}
|
|
957
|
+
return extRows.map(row => {
|
|
958
|
+
if (row.childRows) {
|
|
959
|
+
return {
|
|
960
|
+
...row,
|
|
961
|
+
childRows: getExternalRowsWithUpdatedRow(row.childRows, rowId, depth - 1, updatedRow)
|
|
962
|
+
};
|
|
963
|
+
}
|
|
964
|
+
return row;
|
|
965
|
+
});
|
|
966
|
+
}
|
|
941
967
|
|
|
942
968
|
export { AdvancedTable };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"advancedTable":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._-SdI-{overflow:auto;position:relative;max-width:100%;max-height:100%}._-SdI-,._oqbvt{background-color:#fff}._oqbvt{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._-xlRd{margin-bottom:4px}._qz7Ib{position:-webkit-sticky;position:sticky;top:0;z-index:100}._T-L0c{display:flex}._T-L0c:focus{outline:none}._T-L0c.focus-visible ._LQNsN:after,._T-L0c:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._T-L0c.focus-visible ._LQNsN:last-of-type:after,._T-L0c:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._T-L0c.focus-visible ._LQNsN:first-of-type:after,._T-L0c:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._T-L0c.focus-visible ._LQNsN._5Lgw-:after,._T-L0c:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:1px}._Gr6L5{padding-right:3px}._0gHkN{max-width:100%;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._BvCaf{display:flex}._BvCaf._EVVF1 ._2hL8U,._BvCaf._EVVF1 ._LQNsN{cursor:pointer}._BvCaf._IAS7x ._2hL8U,._BvCaf._IAS7x ._LQNsN{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._BvCaf._IAS7x ._2hL8U._5Lgw-,._BvCaf._IAS7x ._LQNsN._5Lgw-{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._BvCaf._IAS7x ._2hL8U._5Lgw- ._2hL8U,._BvCaf._IAS7x ._2hL8U._5Lgw- ._vKwTU,._BvCaf._IAS7x ._2hL8U._5Lgw- ._w4IwF,._BvCaf._IAS7x ._LQNsN._5Lgw- ._2hL8U,._BvCaf._IAS7x ._LQNsN._5Lgw- ._vKwTU,._BvCaf._IAS7x ._LQNsN._5Lgw- ._w4IwF{background-color:rgba(11,110,208,.08)}._BvCaf._EVVF1:hover:not(._IAS7x) ._2hL8U,._BvCaf._EVVF1:hover:not(._IAS7x) ._LQNsN{background-color:#f9f9f9}._BvCaf._EVVF1:active:not(._IAS7x):not(._BvCaf._EVVF1:active:not(._IAS7x):has(._vKwTU:active)) ._2hL8U,._BvCaf._EVVF1:active:not(._IAS7x):not(._BvCaf._EVVF1:active:not(._IAS7x):has(._vKwTU:active)) ._LQNsN{background-color:#f3f3f3}._BvCaf:focus{outline:none}._BvCaf.focus-visible ._LQNsN:after,._BvCaf:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf.focus-visible ._LQNsN:last-of-type:after,._BvCaf:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf.focus-visible ._LQNsN:first-of-type:after,._BvCaf:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:0}._BvCaf:last-of-type:focus{outline:none}._BvCaf:last-of-type.focus-visible ._LQNsN:after,._BvCaf:last-of-type:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf:last-of-type.focus-visible ._LQNsN:last-of-type:after,._BvCaf:last-of-type:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf:last-of-type.focus-visible ._LQNsN:first-of-type:after,._BvCaf:last-of-type:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf:last-of-type.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:last-of-type:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:1px}._BvCaf:last-of-type ._w4IwF:focus{outline:none}._BvCaf:last-of-type ._w4IwF._IzjWl.focus-visible:after,._BvCaf:last-of-type ._w4IwF._IzjWl:focus-visible:after,._BvCaf:last-of-type ._w4IwF.focus-visible:after,._BvCaf:last-of-type ._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._BvCaf:first-of-type:focus{outline:none}._BvCaf:first-of-type.focus-visible ._LQNsN:after,._BvCaf:first-of-type:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf:first-of-type.focus-visible ._LQNsN:last-of-type:after,._BvCaf:first-of-type:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf:first-of-type.focus-visible ._LQNsN:first-of-type:after,._BvCaf:first-of-type:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf:first-of-type.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:first-of-type:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:0}._BvCaf:first-of-type ._w4IwF:focus{outline:none}._BvCaf:first-of-type ._w4IwF._IzjWl.focus-visible:after,._BvCaf:first-of-type ._w4IwF._IzjWl:focus-visible:after,._BvCaf:first-of-type ._w4IwF.focus-visible:after,._BvCaf:first-of-type ._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-fPZQ{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._-fPZQ._RagwC{flex-grow:1}._-fPZQ._0-QTf{cursor:pointer}._-fPZQ._0-QTf:hover:not(._4tGxr){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-fPZQ._0-QTf:active:not(._4tGxr){background-color:#f3f3f3}._-fPZQ._pBAMP:not(._4tGxr){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-fPZQ._4tGxr{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-fPZQ ._8qalT{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-fPZQ ._8qalT._-aPrl{left:-1px}._-fPZQ ._8qalT._GGvYp{right:0}._-fPZQ ._X7aE3{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-fPZQ ._X7aE3._-aPrl{left:-2px}._-fPZQ ._X7aE3._GGvYp{right:-1px}._-fPZQ:first-of-type ._-aPrl._8qalT{left:0;width:2px;border-left:1px solid #fff}._-fPZQ:first-of-type ._-aPrl._X7aE3{left:0}._-fPZQ:last-of-type ._GGvYp._8qalT{right:0;width:2px;border-right:1px solid #fff}._-fPZQ:last-of-type ._GGvYp._X7aE3{right:0}._-fPZQ ._-P--l{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-fPZQ ._-P--l ._Tu4ZE{position:absolute;width:2px;right:2px;top:0;bottom:0}._-fPZQ ._-P--l ._Tu4ZE._GrWae{background-color:#0a6ed1}._-fPZQ ._-P--l:hover ._Tu4ZE:not(._GrWae){background-color:#d9d9d9}._-fPZQ ._eEgvO{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 46px 13px 12px}._-fPZQ ._eEgvO._ny7tO{flex-direction:row-reverse;justify-content:flex-start}._-fPZQ ._eEgvO._ny7tO ._aS4X5{margin:1px 7px 1px 1px}._-fPZQ ._eEgvO ._ILMfS{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-fPZQ ._eEgvO ._aS4X5{margin:1px 1px 1px 7px;flex-shrink:0}._-fPZQ ._R5wcn{position:absolute;right:4px;top:calc(50% - 18px);flex-shrink:0}._-fPZQ ._Lvi-R{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-fPZQ:focus{outline:none}._-fPZQ._IzjWl.focus-visible:after,._-fPZQ._IzjWl:focus-visible:after,._-fPZQ.focus-visible:after,._-fPZQ:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._m2bcC{margin-right:6px}._5Lgw-{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._5Lgw-[focus-within]{z-index:30}._5Lgw-:focus-within{z-index:30}._w4IwF{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._w4IwF ._wAg1f{width:100%;padding:12px 12px 11px;overflow:hidden}._w4IwF._4tGxr{background-color:#efefef;border-bottom-color:#dfdfe1}._w4IwF._RagwC{flex-grow:1}._w4IwF:focus{outline:none}._w4IwF._IzjWl.focus-visible:after,._w4IwF._IzjWl:focus-visible:after,._w4IwF.focus-visible:after,._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2hL8U{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0;position:relative}._2hL8U._j69-H{border-bottom-color:#d9d9d9;background-color:#fff}._vKwTU{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._vKwTU._j69-H{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._vKwTU:focus input~span,._vKwTU:hover input~span{border-color:#0b6ed0}._0llEY{justify-content:flex-start}._Vvq7M{justify-content:center;text-align:center}._ny7tO{justify-content:flex-end;text-align:right}._ne-5-{display:none}._G-HJG{opacity:0;height:0;width:0;overflow:hidden}._6glhc,._G-HJG{position:absolute}._6glhc{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._IqoZi{max-width:250px;min-width:150px!important}";
|
|
4
|
+
var styles = {"advancedTable":"_-SdI-","advancedTablePaginationContainer":"_oqbvt","advancedTablePagination":"_-xlRd","advancedTableColumnHeadersRowGroup":"_qz7Ib","advancedTableColumnHeaders":"_T-L0c","advancedTableRowChild":"_LQNsN","pinnedContainer":"_5Lgw-","advancedTableRowGroup":"_Gr6L5","advancedTableRowRestrictedWidth":"_0gHkN","advancedTableRow":"_BvCaf","hasRowAction":"_EVVF1","advancedTableExpandRowSpacer":"_2hL8U","isSelected":"_IAS7x","advancedTableCheckbox":"_vKwTU","advancedTableCell":"_w4IwF","showFocusRing":"_IzjWl","advancedTableColumnHeader":"_-fPZQ","fillRemainingSpace":"_RagwC","isSortable":"_0-QTf","isDragging":"_4tGxr","isSorted":"_pBAMP","dropTargetLine":"_8qalT","dropTargetLeft":"_-aPrl","dropTargetRight":"_GGvYp","dropTargetMarker":"_X7aE3","resizeHandle":"_-P--l","resizeLine":"_Tu4ZE","isResizing":"_GrWae","advancedTableColumnHeaderLabel":"_eEgvO","rightAligned":"_ny7tO","sortIcon":"_aS4X5","advancedTableColumnHeaderLabelText":"_ILMfS","advancedTableColumnHeaderMenu":"_R5wcn","advancedTableColumnHeaderMenuHiddenAnchor":"_Lvi-R","advancedTableColumnHeaderMenuItemIcon":"_m2bcC","advancedTableCellContainer":"_wAg1f","header":"_j69-H","leftAligned":"_0llEY","centerAligned":"_Vvq7M","hiddenDescription":"_ne-5-","hiddenLiveRegion":"_G-HJG","dragPreview":"_6glhc","rowActionMenuPane":"_IqoZi"};
|
|
5
|
+
var stylesheet="._-SdI-{overflow:auto;position:relative;max-width:100%;max-height:100%}._-SdI-,._oqbvt{background-color:#fff}._oqbvt{height:70px;z-index:100;display:flex;align-items:flex-end;justify-content:center;position:-webkit-sticky;position:sticky;left:0}._-xlRd{margin-bottom:4px}._qz7Ib{position:-webkit-sticky;position:sticky;top:0;z-index:100}._T-L0c{display:flex}._T-L0c:focus{outline:none}._T-L0c.focus-visible ._LQNsN:after,._T-L0c:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:0;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._T-L0c.focus-visible ._LQNsN:last-of-type:after,._T-L0c:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._T-L0c.focus-visible ._LQNsN:first-of-type:after,._T-L0c:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._T-L0c.focus-visible ._LQNsN._5Lgw-:after,._T-L0c:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:1px}._Gr6L5{padding-right:3px}._0gHkN{max-width:100%;width:-webkit-fit-content;width:-moz-fit-content;width:fit-content}._BvCaf{display:flex}._BvCaf._EVVF1 ._2hL8U,._BvCaf._EVVF1 ._LQNsN{cursor:pointer}._BvCaf._IAS7x ._2hL8U,._BvCaf._IAS7x ._LQNsN{background-color:rgba(11,110,208,.08);font-weight:500;box-shadow:inset 0 -1px 0 0 #0b6ed0}._BvCaf._IAS7x ._2hL8U._5Lgw-,._BvCaf._IAS7x ._LQNsN._5Lgw-{background-color:#fff;box-shadow:inset 0 -2px 0 0 #0b6ed0}._BvCaf._IAS7x ._2hL8U._5Lgw- ._2hL8U,._BvCaf._IAS7x ._2hL8U._5Lgw- ._vKwTU,._BvCaf._IAS7x ._2hL8U._5Lgw- ._w4IwF,._BvCaf._IAS7x ._LQNsN._5Lgw- ._2hL8U,._BvCaf._IAS7x ._LQNsN._5Lgw- ._vKwTU,._BvCaf._IAS7x ._LQNsN._5Lgw- ._w4IwF{background-color:rgba(11,110,208,.08)}._BvCaf._EVVF1:hover:not(._IAS7x) ._2hL8U,._BvCaf._EVVF1:hover:not(._IAS7x) ._LQNsN{background-color:#f9f9f9}._BvCaf._EVVF1:active:not(._IAS7x):not(._BvCaf._EVVF1:active:not(._IAS7x):has(._vKwTU:active)) ._2hL8U,._BvCaf._EVVF1:active:not(._IAS7x):not(._BvCaf._EVVF1:active:not(._IAS7x):has(._vKwTU:active)) ._LQNsN{background-color:#f3f3f3}._BvCaf:focus{outline:none}._BvCaf.focus-visible ._LQNsN:after,._BvCaf:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf.focus-visible ._LQNsN:last-of-type:after,._BvCaf:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf.focus-visible ._LQNsN:first-of-type:after,._BvCaf:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:0}._BvCaf:last-of-type:focus{outline:none}._BvCaf:last-of-type.focus-visible ._LQNsN:after,._BvCaf:last-of-type:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:-2px;bottom:0;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf:last-of-type.focus-visible ._LQNsN:last-of-type:after,._BvCaf:last-of-type:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf:last-of-type.focus-visible ._LQNsN:first-of-type:after,._BvCaf:last-of-type:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf:last-of-type.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:last-of-type:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:1px}._BvCaf:last-of-type ._w4IwF:focus{outline:none}._BvCaf:last-of-type ._w4IwF._IzjWl.focus-visible:after,._BvCaf:last-of-type ._w4IwF._IzjWl:focus-visible:after,._BvCaf:last-of-type ._w4IwF.focus-visible:after,._BvCaf:last-of-type ._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._BvCaf:first-of-type:focus{outline:none}._BvCaf:first-of-type.focus-visible ._LQNsN:after,._BvCaf:first-of-type:focus-visible ._LQNsN:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-bottom:2px solid #0a3f88;border-top:2px solid #0a3f88;z-index:50}._BvCaf:first-of-type.focus-visible ._LQNsN:last-of-type:after,._BvCaf:first-of-type:focus-visible ._LQNsN:last-of-type:after{border-top-right-radius:2px;border-bottom-right-radius:2px;border-right:2px solid #0a3f88}._BvCaf:first-of-type.focus-visible ._LQNsN:first-of-type:after,._BvCaf:first-of-type:focus-visible ._LQNsN:first-of-type:after{border-top-left-radius:2px;border-bottom-left-radius:2px;border-left:2px solid #0a3f88}._BvCaf:first-of-type.focus-visible ._LQNsN._5Lgw-:after,._BvCaf:first-of-type:focus-visible ._LQNsN._5Lgw-:after{right:-3px;bottom:0}._BvCaf:first-of-type ._w4IwF:focus{outline:none}._BvCaf:first-of-type ._w4IwF._IzjWl.focus-visible:after,._BvCaf:first-of-type ._w4IwF._IzjWl:focus-visible:after,._BvCaf:first-of-type ._w4IwF.focus-visible:after,._BvCaf:first-of-type ._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._-fPZQ{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #d9d9d9;flex-shrink:0;font-size:12px;line-height:16px;font-weight:700;color:#6a6d70;background-color:#fff;position:relative}._-fPZQ._RagwC{flex-grow:1}._-fPZQ._0-QTf{cursor:pointer}._-fPZQ._0-QTf:hover:not(._4tGxr){background-color:#f9f9f9;border-bottom-color:#6a6d70}._-fPZQ._0-QTf:active:not(._4tGxr){background-color:#f3f3f3}._-fPZQ._pBAMP:not(._4tGxr){color:#32363a;fill:#32363a;border-bottom-color:#8a8f94}._-fPZQ._4tGxr{cursor:move;background-color:#efefef;border-bottom-color:#ccc;border-top-left-radius:4px;border-top-right-radius:4px}._-fPZQ ._8qalT{background-color:#d9d9d9;position:absolute;width:1px;top:0;pointer-events:none}._-fPZQ ._8qalT._-aPrl{left:-1px}._-fPZQ ._8qalT._GGvYp{right:0}._-fPZQ ._X7aE3{background-color:#0a6ed1;position:absolute;width:3px;top:4px;bottom:4px;border-radius:4px;pointer-events:none}._-fPZQ ._X7aE3._-aPrl{left:-2px}._-fPZQ ._X7aE3._GGvYp{right:-1px}._-fPZQ:first-of-type ._-aPrl._8qalT{left:0;width:2px;border-left:1px solid #fff}._-fPZQ:first-of-type ._-aPrl._X7aE3{left:0}._-fPZQ:last-of-type ._GGvYp._8qalT{right:0;width:2px;border-right:1px solid #fff}._-fPZQ:last-of-type ._GGvYp._X7aE3{right:0}._-fPZQ ._-P--l{position:absolute;width:6px;right:-3px;top:0;cursor:ew-resize;z-index:50}._-fPZQ ._-P--l ._Tu4ZE{position:absolute;width:2px;right:2px;top:0;bottom:0}._-fPZQ ._-P--l ._Tu4ZE._GrWae{background-color:#0a6ed1}._-fPZQ ._-P--l:hover ._Tu4ZE:not(._GrWae){background-color:#d9d9d9}._-fPZQ ._eEgvO{display:flex;flex-grow:1;align-items:center;min-width:0;padding:14px 46px 13px 12px}._-fPZQ ._eEgvO._ny7tO{flex-direction:row-reverse;justify-content:flex-start}._-fPZQ ._eEgvO._ny7tO ._aS4X5{margin:1px 7px 1px 1px}._-fPZQ ._eEgvO ._ILMfS{text-overflow:ellipsis;overflow:hidden;-webkit-hyphens:auto;hyphens:auto;pointer-events:none;overflow-wrap:break-word;display:-webkit-box;-webkit-box-orient:vertical}._-fPZQ ._eEgvO ._aS4X5{margin:1px 1px 1px 7px;flex-shrink:0}._-fPZQ ._R5wcn{position:absolute;right:4px;top:calc(50% - 18px);flex-shrink:0}._-fPZQ ._Lvi-R{pointer-events:none;position:absolute;top:0;left:0;bottom:0;right:0}._-fPZQ:focus{outline:none}._-fPZQ._IzjWl.focus-visible:after,._-fPZQ._IzjWl:focus-visible:after,._-fPZQ.focus-visible:after,._-fPZQ:focus-visible:after{content:\"\";display:block;position:absolute;top:0;bottom:-1px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._m2bcC{margin-right:6px}._5Lgw-{display:flex;border-right:3px solid #e5e5e5;position:-webkit-sticky;position:sticky;left:0;background-color:#fff;z-index:20}._5Lgw-[focus-within]{z-index:30}._5Lgw-:focus-within{z-index:30}._w4IwF{display:flex;align-items:center;min-height:44px;width:200px;min-width:80px;border-bottom:1px solid #eee;flex-shrink:0;font-size:14px;line-height:20px;overflow-wrap:break-word;color:#32363a;position:relative}._w4IwF ._wAg1f{width:100%;padding:12px 12px 11px;overflow:hidden}._w4IwF._4tGxr{background-color:#efefef;border-bottom-color:#dfdfe1}._w4IwF._RagwC{flex-grow:1}._w4IwF:focus{outline:none}._w4IwF._IzjWl.focus-visible:after,._w4IwF._IzjWl:focus-visible:after,._w4IwF.focus-visible:after,._w4IwF:focus-visible:after{content:\"\";display:block;position:absolute;top:-2px;bottom:-2px;left:0;right:0;border-radius:2px;border:2px solid #0a3f88;z-index:10}._2hL8U{display:flex!important;min-height:44px!important;align-items:center;justify-content:right;border-bottom:1px solid #eee;flex-shrink:0;position:relative}._2hL8U._j69-H{border-bottom-color:#d9d9d9;background-color:#fff}._vKwTU{display:flex;align-items:center;justify-content:center;min-height:44px;width:40px;border-bottom:1px solid #eee;padding:12px 12px 11px;flex-shrink:0;cursor:pointer}._vKwTU._j69-H{border-bottom-color:#d9d9d9;padding:14px 12px 13px}._vKwTU:focus input~span,._vKwTU:hover input~span{border-color:#0b6ed0}._0llEY{justify-content:flex-start}._Vvq7M{justify-content:center;text-align:center}._ny7tO{justify-content:flex-end;text-align:right}._ne-5-{display:none}._G-HJG{opacity:0;height:0;width:0;overflow:hidden}._6glhc,._G-HJG{position:absolute}._6glhc{cursor:move;background-color:rgba(11,110,208,.08);border-radius:4px;z-index:1000;pointer-events:none}._IqoZi{max-width:250px;min-width:150px!important}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import './ChatInput.css.ts.vanilla.js';
|
|
2
2
|
|
|
3
|
+
var characterCountMessage = 'ChatInput_characterCountMessage__1k9xlz95';
|
|
4
|
+
var inputHelpInformationCounter = 'ChatInput_inputHelpInformationCounter__1k9xlz97';
|
|
5
|
+
var inputHelpInformationMessage = 'ChatInput_inputHelpInformationMessage__1k9xlz96';
|
|
3
6
|
var sendButton = 'ChatInput_sendButton__1k9xlz94';
|
|
4
7
|
var sizer = 'ChatInput_sizer__1k9xlz92';
|
|
5
8
|
var textArea = 'ChatInput_textArea__1k9xlz93';
|
|
6
9
|
var textAreaAndButtonContainer = 'ChatInput_textAreaAndButtonContainer__1k9xlz91';
|
|
7
10
|
var wrapper = 'ChatInput_wrapper__1k9xlz90';
|
|
8
11
|
|
|
9
|
-
export { sendButton, sizer, textArea, textAreaAndButtonContainer, wrapper };
|
|
12
|
+
export { characterCountMessage, inputHelpInformationCounter, inputHelpInformationMessage, sendButton, sizer, textArea, textAreaAndButtonContainer, wrapper };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".ChatInput_wrapper__1k9xlz90{flex:0 0;padding:20px 12px}.ChatInput_textAreaAndButtonContainer__1k9xlz91{position:relative;width:100%}.ChatInput_sizer__1k9xlz92{width:100%;max-height:187px;min-height:44px;padding:13px 58px 13px 14px!important;border:1px solid transparent;line-height:18px;font-size:14px;overflow-wrap:break-word;visibility:hidden}.ChatInput_textArea__1k9xlz93{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:8px!important;border:1px solid #085caf;resize:none;padding:13px 58px 13px 14px!important;line-height:18px!important}.ChatInput_textArea__1k9xlz93:disabled{border-color:#898989}.ChatInput_sendButton__1k9xlz94{position:absolute;right:5px;bottom:5px;fill:#fff!important;background-color:#0b6ed0!important}.ChatInput_sendButton__1k9xlz94[aria-disabled=true]{opacity:.4}.ChatInput_sendButton__1k9xlz94:hover:not([aria-disabled=true]){background-color:#085caf}";
|
|
4
|
-
var ChatInput_css_ts_vanilla = {"ChatInput_wrapper__1k9xlz90":"ChatInput_wrapper__1k9xlz90","ChatInput_textAreaAndButtonContainer__1k9xlz91":"ChatInput_textAreaAndButtonContainer__1k9xlz91","ChatInput_sizer__1k9xlz92":"ChatInput_sizer__1k9xlz92","ChatInput_textArea__1k9xlz93":"ChatInput_textArea__1k9xlz93","ChatInput_sendButton__1k9xlz94":"ChatInput_sendButton__1k9xlz94"};
|
|
5
|
-
var stylesheet=".ChatInput_wrapper__1k9xlz90{flex:0 0;padding:20px 12px}.ChatInput_textAreaAndButtonContainer__1k9xlz91{position:relative;width:100%}.ChatInput_sizer__1k9xlz92{width:100%;max-height:187px;min-height:44px;padding:13px 58px 13px 14px!important;border:1px solid transparent;line-height:18px;font-size:14px;overflow-wrap:break-word;visibility:hidden}.ChatInput_textArea__1k9xlz93{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:8px!important;border:1px solid #085caf;resize:none;padding:13px 58px 13px 14px!important;line-height:18px!important}.ChatInput_textArea__1k9xlz93:disabled{border-color:#898989}.ChatInput_sendButton__1k9xlz94{position:absolute;right:5px;bottom:5px;fill:#fff!important;background-color:#0b6ed0!important}.ChatInput_sendButton__1k9xlz94[aria-disabled=true]{opacity:.4}.ChatInput_sendButton__1k9xlz94:hover:not([aria-disabled=true]){background-color:#085caf}";
|
|
3
|
+
var css_248z = ".ChatInput_wrapper__1k9xlz90{flex:0 0;padding:20px 12px}.ChatInput_textAreaAndButtonContainer__1k9xlz91{position:relative;width:100%}.ChatInput_sizer__1k9xlz92{width:100%;max-height:187px;min-height:44px;padding:13px 58px 13px 14px!important;border:1px solid transparent;line-height:18px;font-size:14px;overflow-wrap:break-word;visibility:hidden}.ChatInput_textArea__1k9xlz93{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:8px!important;border:1px solid #085caf;resize:none;padding:13px 58px 13px 14px!important;line-height:18px!important}.ChatInput_textArea__1k9xlz93:disabled{border-color:#898989}.ChatInput_sendButton__1k9xlz94{position:absolute;right:5px;bottom:5px;fill:#fff!important;background-color:#0b6ed0!important}.ChatInput_sendButton__1k9xlz94[aria-disabled=true]{opacity:.4}.ChatInput_sendButton__1k9xlz94:hover:not([aria-disabled=true]){background-color:#085caf}.ChatInput_characterCountMessage__1k9xlz95{margin-top:6px}.ChatInput_characterCountMessage__1k9xlz95:first-child{margin-bottom:6px}.ChatInput_inputHelpInformationMessage__1k9xlz96{flex:1}.ChatInput_inputHelpInformationCounter__1k9xlz97{flex-shrink:0;margin-left:12px}";
|
|
4
|
+
var ChatInput_css_ts_vanilla = {"ChatInput_wrapper__1k9xlz90":"ChatInput_wrapper__1k9xlz90","ChatInput_textAreaAndButtonContainer__1k9xlz91":"ChatInput_textAreaAndButtonContainer__1k9xlz91","ChatInput_sizer__1k9xlz92":"ChatInput_sizer__1k9xlz92","ChatInput_textArea__1k9xlz93":"ChatInput_textArea__1k9xlz93","ChatInput_sendButton__1k9xlz94":"ChatInput_sendButton__1k9xlz94","ChatInput_characterCountMessage__1k9xlz95":"ChatInput_characterCountMessage__1k9xlz95","ChatInput_inputHelpInformationMessage__1k9xlz96":"ChatInput_inputHelpInformationMessage__1k9xlz96","ChatInput_inputHelpInformationCounter__1k9xlz97":"ChatInput_inputHelpInformationCounter__1k9xlz97"};
|
|
5
|
+
var stylesheet=".ChatInput_wrapper__1k9xlz90{flex:0 0;padding:20px 12px}.ChatInput_textAreaAndButtonContainer__1k9xlz91{position:relative;width:100%}.ChatInput_sizer__1k9xlz92{width:100%;max-height:187px;min-height:44px;padding:13px 58px 13px 14px!important;border:1px solid transparent;line-height:18px;font-size:14px;overflow-wrap:break-word;visibility:hidden}.ChatInput_textArea__1k9xlz93{position:absolute;top:0;right:0;bottom:0;left:0;border-radius:8px!important;border:1px solid #085caf;resize:none;padding:13px 58px 13px 14px!important;line-height:18px!important}.ChatInput_textArea__1k9xlz93:disabled{border-color:#898989}.ChatInput_sendButton__1k9xlz94{position:absolute;right:5px;bottom:5px;fill:#fff!important;background-color:#0b6ed0!important}.ChatInput_sendButton__1k9xlz94[aria-disabled=true]{opacity:.4}.ChatInput_sendButton__1k9xlz94:hover:not([aria-disabled=true]){background-color:#085caf}.ChatInput_characterCountMessage__1k9xlz95{margin-top:6px}.ChatInput_characterCountMessage__1k9xlz95:first-child{margin-bottom:6px}.ChatInput_inputHelpInformationMessage__1k9xlz96{flex:1}.ChatInput_inputHelpInformationCounter__1k9xlz97{flex-shrink:0;margin-left:12px}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { ChatInput_css_ts_vanilla as default, stylesheet };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import React__default, { forwardRef } from 'react';
|
|
1
|
+
import React__default, { forwardRef, useState, useMemo } from 'react';
|
|
2
2
|
import '../../components/index.js';
|
|
3
3
|
import '../../icons/index.es.js';
|
|
4
|
-
import { wrapper, textAreaAndButtonContainer, sizer, textArea, sendButton } from './ChatInput.css.js';
|
|
4
|
+
import { wrapper, textAreaAndButtonContainer, sizer, textArea, sendButton, characterCountMessage, inputHelpInformationMessage, inputHelpInformationCounter } from './ChatInput.css.js';
|
|
5
5
|
import { useChatContext } from './ChatContext.js';
|
|
6
6
|
import ChatMessageText from './ChatMessageText.js';
|
|
7
7
|
import '../../hooks/index.js';
|
|
@@ -9,11 +9,14 @@ import '../../utils/index.js';
|
|
|
9
9
|
import useTranslation from '../../utils/Translation/useTranslation.js';
|
|
10
10
|
import useControllableState from '../../hooks/useControllableState/useControllableState.js';
|
|
11
11
|
import useEventCallback from '../../hooks/useEventCallback/useEventCallback.js';
|
|
12
|
+
import useId from '../../hooks/useId/useId.js';
|
|
12
13
|
import Input from '../../components/Input/Input.js';
|
|
13
14
|
import mergeRefs from '../../utils/mergeRefs/mergeRefs.js';
|
|
14
15
|
import Tooltip from '../../components/Tooltip/Tooltip.js';
|
|
15
16
|
import IconButton from '../../components/IconButton/IconButton.js';
|
|
16
17
|
import SendIcon from '../../icons/components/SendIcon.js';
|
|
18
|
+
import ErrorText from '../../components/FormField/ErrorText.js';
|
|
19
|
+
import HelperText from '../../components/FormField/HelperText.js';
|
|
17
20
|
|
|
18
21
|
const ChatInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
19
22
|
let {
|
|
@@ -22,22 +25,35 @@ const ChatInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
22
25
|
value: externalValue,
|
|
23
26
|
onChange: externalOnChange,
|
|
24
27
|
'data-testid': dataTestId,
|
|
25
|
-
placeholderText
|
|
28
|
+
placeholderText,
|
|
29
|
+
characterLimit: externalCharacterLimit,
|
|
30
|
+
helperText
|
|
26
31
|
} = _ref;
|
|
32
|
+
const [isMaxCharactersExceeded, setIsMaxCharactersExceeded] = useState(false);
|
|
27
33
|
const {
|
|
28
34
|
translate
|
|
29
35
|
} = useTranslation();
|
|
30
36
|
const [value, setValue] = useControllableState('', externalOnChange, externalValue);
|
|
37
|
+
const characterLimit = useMemo(() => {
|
|
38
|
+
if (externalCharacterLimit && externalCharacterLimit > 0) {
|
|
39
|
+
return externalCharacterLimit;
|
|
40
|
+
}
|
|
41
|
+
return undefined;
|
|
42
|
+
}, [externalCharacterLimit]);
|
|
31
43
|
const handleChange = useEventCallback(e => {
|
|
44
|
+
if (characterLimit) {
|
|
45
|
+
setIsMaxCharactersExceeded(characterLimit < e.target.value.length);
|
|
46
|
+
}
|
|
32
47
|
const newValue = e.target.value;
|
|
33
48
|
setValue(newValue);
|
|
34
49
|
});
|
|
50
|
+
const helperIds = useId();
|
|
35
51
|
const {
|
|
36
52
|
isLoading,
|
|
37
53
|
chatInputRef
|
|
38
54
|
} = useChatContext();
|
|
39
55
|
const sendMessageAndClearInput = () => {
|
|
40
|
-
if (!value || isDisabled || isLoading) return;
|
|
56
|
+
if (!value || isDisabled || isLoading || isMaxCharactersExceeded) return;
|
|
41
57
|
onMessageSend === null || onMessageSend === void 0 || onMessageSend(value);
|
|
42
58
|
setValue('');
|
|
43
59
|
};
|
|
@@ -65,8 +81,10 @@ const ChatInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
65
81
|
value: value,
|
|
66
82
|
onChange: handleChange,
|
|
67
83
|
"aria-label": inputLabel,
|
|
84
|
+
"aria-describedby": characterLimit && isMaxCharactersExceeded ? "".concat(helperIds, "-error-text") : "".concat(helperIds, "-helper-text"),
|
|
68
85
|
placeholder: inputLabel,
|
|
69
|
-
"data-testid": dataTestId ? "".concat(dataTestId, "-input") : undefined
|
|
86
|
+
"data-testid": dataTestId ? "".concat(dataTestId, "-input") : undefined,
|
|
87
|
+
invalid: isMaxCharactersExceeded
|
|
70
88
|
}), /*#__PURE__*/React__default.createElement(Tooltip, {
|
|
71
89
|
content: translate('chat.sendMessageButtonLabel'),
|
|
72
90
|
delayMs: 500,
|
|
@@ -75,9 +93,28 @@ const ChatInput = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
75
93
|
}, /*#__PURE__*/React__default.createElement(IconButton, {
|
|
76
94
|
className: sendButton,
|
|
77
95
|
onClick: sendMessageAndClearInput,
|
|
78
|
-
disabled: isDisabled || isLoading,
|
|
96
|
+
disabled: isDisabled || isLoading || isMaxCharactersExceeded,
|
|
79
97
|
"data-testid": dataTestId ? "".concat(dataTestId, "-button") : undefined
|
|
80
|
-
}, /*#__PURE__*/React__default.createElement(SendIcon, null))))
|
|
98
|
+
}, /*#__PURE__*/React__default.createElement(SendIcon, null)))), /*#__PURE__*/React__default.createElement("div", {
|
|
99
|
+
className: characterCountMessage
|
|
100
|
+
}, isMaxCharactersExceeded && /*#__PURE__*/React__default.createElement(ErrorText, {
|
|
101
|
+
id: "".concat(helperIds, "-error-text"),
|
|
102
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-input-error-text")
|
|
103
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
104
|
+
className: inputHelpInformationMessage
|
|
105
|
+
}, translate('chat.maxCharacterLimit')), /*#__PURE__*/React__default.createElement("span", {
|
|
106
|
+
className: inputHelpInformationCounter
|
|
107
|
+
}, value.length, " / ", characterLimit)), characterLimit && /*#__PURE__*/React__default.createElement(HelperText, {
|
|
108
|
+
id: "".concat(helperIds, "-helper-text"),
|
|
109
|
+
"data-testid": dataTestId && "".concat(dataTestId, "-input-helper-text")
|
|
110
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
111
|
+
className: inputHelpInformationMessage
|
|
112
|
+
}, helperText !== null && helperText !== void 0 ? helperText : translate('chat.inputHelperText', {
|
|
113
|
+
max: characterLimit.toString()
|
|
114
|
+
})), !isMaxCharactersExceeded && /*#__PURE__*/React__default.createElement("span", {
|
|
115
|
+
"data-testid": "".concat(dataTestId, "-input-character-counter"),
|
|
116
|
+
className: inputHelpInformationCounter
|
|
117
|
+
}, value.length, " / ", characterLimit))));
|
|
81
118
|
});
|
|
82
119
|
|
|
83
120
|
export { ChatInput as default };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import styleInject from './../../__node_modules/style-inject/dist/style-inject.es.js';
|
|
2
2
|
|
|
3
|
-
var css_248z = ".
|
|
4
|
-
var styles = {"collapsibleSearchInput":"
|
|
5
|
-
var stylesheet=".
|
|
3
|
+
var css_248z = "._-MrBg{display:inline-block;width:36px;transition:width .25s ease-out}._5j9o-{width:100%}._TbTuT>input{padding-right:0!important}._PAAzv>svg{fill:#515559}";
|
|
4
|
+
var styles = {"collapsibleSearchInput":"_-MrBg","searchInput":"_5j9o-","searchInputCollapsed":"_TbTuT","iconButton":"_PAAzv"};
|
|
5
|
+
var stylesheet="._-MrBg{display:inline-block;width:36px;transition:width .25s ease-out}._5j9o-{width:100%}._TbTuT>input{padding-right:0!important}._PAAzv>svg{fill:#515559}";
|
|
6
6
|
if(typeof process !== 'object' || !process.hasOwnProperty('env') || process.env.NODE_ENV !== 'test'){styleInject(css_248z);}
|
|
7
7
|
|
|
8
8
|
export { styles as default, stylesheet };
|