@zohodesk/dot 1.2.4 → 1.3.0-temp-158
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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +20 -9
- package/assets/Appearance/dark/themes/blue/blue_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/green/green_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/orange/orange_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/red/red_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/dark/themes/yellow/yellow_DotTheme_DarkTheme.module.css +1 -1
- package/assets/Appearance/light/themes/blue/blue_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/green/green_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/orange/orange_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/red/red_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/light/themes/yellow/yellow_DotTheme_LightTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/blue/blue_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/green/green_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/orange/orange_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/red/red_DotTheme_PureDarkTheme.module.css +1 -1
- package/assets/Appearance/pureDark/themes/yellow/yellow_DotTheme_PureDarkTheme.module.css +1 -1
- package/coverage/ExternalLink/ExternalLink.js.html +1 -1
- package/coverage/ExternalLink/ExternalLink.module.css.html +1 -1
- package/coverage/ExternalLink/index.html +1 -1
- package/coverage/ExternalLink/props/defaultProps.js.html +1 -1
- package/coverage/ExternalLink/props/index.html +1 -1
- package/coverage/ExternalLink/props/propTypes.js.html +1 -1
- package/coverage/IconButton/IconButton.js.html +466 -0
- package/coverage/IconButton/IconButton.module.css.html +151 -0
- package/coverage/IconButton/index.html +131 -0
- package/coverage/IconButton/props/defaultProps.js.html +136 -0
- package/coverage/IconButton/props/index.html +131 -0
- package/coverage/IconButton/props/propTypes.js.html +187 -0
- package/coverage/Image/Image.js.html +1 -1
- package/coverage/Image/Image.module.css.html +1 -1
- package/coverage/Image/index.html +1 -1
- package/coverage/Image/props/defaultProps.js.html +1 -1
- package/coverage/Image/props/index.html +1 -1
- package/coverage/Image/props/propTypes.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/AvatarWithTeam.module.css.html +1 -1
- package/coverage/avatar/AvatarWithTeam/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/defaultProps.js.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/index.html +1 -1
- package/coverage/avatar/AvatarWithTeam/props/propTypes.js.html +1 -1
- package/coverage/coverage-final.json +16 -12
- package/coverage/coverage-summary.json +17 -13
- package/coverage/index.html +40 -10
- package/es/Drawer/Drawer.js +3 -2
- package/es/IconButton/__tests__/IconButton.spec.js +148 -0
- package/es/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/es/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/es/v1/ActionButton/ActionButton.js +11 -8
- package/es/v1/AlphabeticList/AlphabeticList.js +7 -3
- package/es/v1/Attachment/Attachment.js +79 -76
- package/es/v1/AttachmentViewer/AttachmentImage.js +44 -63
- package/es/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/es/v1/Drawer/Drawer.js +6 -6
- package/es/v1/FlipCard/FlipCard.js +4 -4
- package/es/v1/FormAction/FormAction.js +1 -1
- package/es/v1/FreezeLayer/FreezeLayer.js +3 -3
- package/es/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
- package/es/v1/IconButton/IconButton.js +3 -3
- package/es/v1/Image/Image.js +26 -33
- package/es/v1/ImportantNotes/ImportantNotes.js +1 -1
- package/es/v1/Loader/Loader.js +12 -18
- package/es/v1/MessageBanner/MessageBanner.js +1 -1
- package/es/v1/NewStar/NewStar.js +1 -1
- package/es/v1/Separator/Separator.js +41 -48
- package/es/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/es/v1/ToastMessage/ToastMessage.js +4 -4
- package/es/v1/Upload/Upload.js +60 -67
- package/es/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
- package/es/v1/alert/AlertHeader/AlertHeader.js +58 -49
- package/es/v1/alert/AlertLookup/AlertLookup.js +101 -41
- package/es/v1/avatar/AvatarClose/AvatarClose.js +1 -1
- package/es/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/es/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
- package/es/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/es/v1/avatar/AvatarThread/AvatarThread.js +1 -1
- package/es/v1/avatar/AvatarUser/AvatarUser.js +1 -1
- package/es/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
- package/es/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -15
- package/es/v1/errorstate/Inconvenience/Inconvenience.js +53 -80
- package/es/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
- package/es/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
- package/es/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -73
- package/es/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
- package/es/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
- package/es/v1/form/fields/CheckBoxField/CheckBoxField.js +102 -118
- package/es/v1/form/fields/CurrencyField/CurrencyField.js +129 -155
- package/es/v1/form/fields/DateField/DateField.js +132 -163
- package/es/v1/form/fields/FieldContainer/FieldContainer.js +52 -57
- package/es/v1/form/fields/MultiSelectField/MultiSelectField.js +144 -168
- package/es/v1/form/fields/PhoneField/PhoneField.js +129 -157
- package/es/v1/form/fields/RadioField/RadioField.js +91 -99
- package/es/v1/form/fields/SelectField/SelectField.js +141 -156
- package/es/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
- package/es/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +8 -5
- package/es/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/es/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/es/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/es/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
- package/es/v1/form/fields/TextareaField/TextareaField.js +3 -3
- package/es/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/es/v1/layout/SetupDetailLayout/SetupDetailLayout.js +155 -198
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +110 -126
- package/es/v1/list/AvatarFlip/AvatarFlip.js +61 -64
- package/es/v1/list/BluePrintStatus/BluePrintStatus.js +11 -18
- package/es/v1/list/Comment/Comment.js +25 -32
- package/es/v1/list/DepartmentDropDown/DepartmentDropDown.js +57 -72
- package/es/v1/list/Dot/Dot.js +9 -16
- package/es/v1/list/DotNew/DotNew.js +11 -18
- package/es/v1/list/GridStencils/GridStencils.js +21 -24
- package/es/v1/list/Icons/AddNewIcon.js +19 -22
- package/es/v1/list/Icons/CompleteIcon.js +21 -24
- package/es/v1/list/Icons/DeleteIcon.js +22 -25
- package/es/v1/list/Icons/EditIcon.js +22 -25
- package/es/v1/list/Icons/FloatingIcons.js +12 -19
- package/es/v1/list/Icons/ReadUnreadIcon.js +24 -27
- package/es/v1/list/Icons/SmartIcon.js +20 -23
- package/es/v1/list/ListLayout/ListLayout.js +54 -68
- package/es/v1/list/ListStencils/ListStencils.js +28 -31
- package/es/v1/list/SecondaryText/AccountName.js +1 -1
- package/es/v1/list/SecondaryText/ContactName.js +1 -1
- package/es/v1/list/SecondryPanel/SecondryPanel.js +1 -2
- package/es/v1/list/Thread/Thread.js +1 -1
- package/es/v1/list/UserTime/UserTime.js +1 -1
- package/es/v1/list/status/StatusDropdown/StatusDropdown.js +266 -357
- package/es/v1/list/status/StatusListItem/StatusListItem.js +77 -102
- package/es/v1/lookup/EmptyPage/EmptyPage.js +15 -26
- package/es/v1/lookup/Lookup/Lookup.js +4 -3
- package/es/v1/lookup/Section/Section.js +15 -21
- package/es/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/es/v1/lookup/header/Search/Search.js +3 -3
- package/es/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/es/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
- package/es/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
- package/es/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
- package/es/v1/setup/header/Button/Button.js +1 -1
- package/es/v1/setup/header/Link/Link.js +1 -1
- package/es/v1/setup/header/Search/Search.js +1 -1
- package/es/v1/setup/table/Table/Table.js +1 -1
- package/es/v1/setup/table/TableBody/TableBody.js +1 -1
- package/es/v1/setup/table/TableData/TableData.js +1 -1
- package/es/v1/setup/table/TableHead/TableHead.js +1 -1
- package/es/v1/setup/table/TableRow/TableRow.js +1 -1
- package/es/v1/svg/PlusIcon.js +20 -27
- package/es/v1/svg/SnippetIcon.js +22 -29
- package/es/v1/svg/TemplateIcon.js +23 -30
- package/lib/Drawer/Drawer.js +3 -2
- package/lib/IconButton/__tests__/IconButton.spec.js +156 -0
- package/lib/IconButton/__tests__/__snapshots__/IconButton.spec.js.snap +316 -0
- package/lib/form/fields/FieldContainer/props/propTypes.js +1 -1
- package/lib/v1/ActionButton/ActionButton.js +11 -9
- package/lib/v1/AlphabeticList/AlphabeticList.js +8 -6
- package/lib/v1/Attachment/Attachment.js +78 -113
- package/lib/v1/AttachmentViewer/AttachmentImage.js +61 -96
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/lib/v1/Drawer/Drawer.js +6 -6
- package/lib/v1/FlipCard/FlipCard.js +4 -4
- package/lib/v1/FormAction/FormAction.js +1 -1
- package/lib/v1/FreezeLayer/FreezeLayer.js +3 -3
- package/lib/v1/{version2/GlobalNotification → GlobalNotification}/GlobalNotification.js +7 -7
- package/lib/v1/IconButton/IconButton.js +3 -3
- package/lib/v1/Image/Image.js +26 -71
- package/lib/v1/ImportantNotes/ImportantNotes.js +1 -1
- package/lib/v1/Loader/Loader.js +13 -56
- package/lib/v1/MessageBanner/MessageBanner.js +1 -1
- package/lib/v1/NewStar/NewStar.js +1 -1
- package/lib/v1/Separator/Separator.js +45 -86
- package/lib/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/lib/v1/ToastMessage/ToastMessage.js +4 -4
- package/lib/v1/Upload/Upload.js +59 -104
- package/lib/v1/{version2 → alert}/AlertClose/AlertClose.js +1 -1
- package/lib/v1/alert/AlertHeader/AlertHeader.js +68 -50
- package/lib/v1/alert/AlertLookup/AlertLookup.js +109 -42
- package/lib/v1/avatar/AvatarClose/AvatarClose.js +1 -1
- package/lib/v1/avatar/AvatarCollision/AvatarCollision.js +1 -1
- package/lib/v1/avatar/AvatarIcon/AvatarIcon.js +2 -2
- package/lib/v1/avatar/AvatarStatus/AvatarStatus.js +1 -1
- package/lib/v1/avatar/AvatarThread/AvatarThread.js +1 -1
- package/lib/v1/avatar/AvatarUser/AvatarUser.js +1 -1
- package/lib/v1/avatar/AvatarWithTeam/AvatarWithTeam.js +2 -2
- package/lib/v1/dropdown/ToggleDropDown/ToggleDropDown.js +18 -16
- package/lib/v1/errorstate/Inconvenience/Inconvenience.js +53 -115
- package/lib/v1/{version2/errorstate → errorstate}/OopsSomethingMiss/OopsSomethingMiss.js +6 -6
- package/lib/v1/{version2/errorstate → errorstate}/UnableToProcessRequest/UnableToProcessRequest.js +6 -6
- package/lib/v1/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +54 -108
- package/lib/v1/{version2/errorstate → errorstate}/UrlNotFound/UrlNotFound.js +6 -6
- package/lib/v1/{version2/errorstate → errorstate}/WillBeRightBack/WillBeRightBack.js +6 -6
- package/lib/v1/form/fields/CheckBoxField/CheckBoxField.js +108 -160
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +153 -194
- package/lib/v1/form/fields/DateField/DateField.js +141 -207
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +60 -91
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +169 -229
- package/lib/v1/form/fields/PhoneField/PhoneField.js +151 -194
- package/lib/v1/form/fields/RadioField/RadioField.js +93 -139
- package/lib/v1/form/fields/SelectField/SelectField.js +152 -203
- package/lib/v1/form/fields/TagsMultiSelect/TagsMultiSelect.js +8 -8
- package/lib/v1/form/fields/TagsMultiSelectField/TagsMultiSelectField.js +11 -8
- package/lib/v1/form/fields/TextBoxField/TextBoxField.js +3 -3
- package/lib/v1/form/fields/TextEditor/TextEditor.js +1 -1
- package/lib/v1/form/fields/TextEditorField/TextEditorField.js +1 -1
- package/lib/v1/form/fields/TextEditorWrapper/TextEditorWrapper.js +3 -3
- package/lib/v1/form/fields/TextareaField/TextareaField.js +3 -3
- package/lib/v1/form/fields/ValidationMessage/ValidationMessage.js +2 -2
- package/lib/v1/layout/SetupDetailLayout/SetupDetailLayout.js +161 -254
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +109 -208
- package/lib/v1/list/AvatarFlip/AvatarFlip.js +61 -106
- package/lib/v1/list/BluePrintStatus/BluePrintStatus.js +11 -51
- package/lib/v1/list/Comment/Comment.js +24 -69
- package/lib/v1/list/DepartmentDropDown/DepartmentDropDown.js +67 -122
- package/lib/v1/list/Dot/Dot.js +9 -54
- package/lib/v1/list/DotNew/DotNew.js +11 -56
- package/lib/v1/list/GridStencils/GridStencils.js +21 -62
- package/lib/v1/list/Icons/AddNewIcon.js +19 -60
- package/lib/v1/list/Icons/CompleteIcon.js +21 -62
- package/lib/v1/list/Icons/DeleteIcon.js +22 -63
- package/lib/v1/list/Icons/EditIcon.js +22 -63
- package/lib/v1/list/Icons/FloatingIcons.js +17 -62
- package/lib/v1/list/Icons/ReadUnreadIcon.js +24 -65
- package/lib/v1/list/Icons/SmartIcon.js +20 -65
- package/lib/v1/list/ListLayout/ListLayout.js +53 -116
- package/lib/v1/list/ListStencils/ListStencils.js +33 -72
- package/lib/v1/list/SecondaryText/AccountName.js +1 -1
- package/lib/v1/list/SecondaryText/ContactName.js +1 -1
- package/lib/v1/list/SecondryPanel/SecondryPanel.js +3 -5
- package/lib/v1/list/Thread/Thread.js +1 -1
- package/lib/v1/list/UserTime/UserTime.js +1 -1
- package/lib/v1/list/status/StatusDropdown/StatusDropdown.js +367 -472
- package/lib/v1/list/status/StatusListItem/StatusListItem.js +83 -139
- package/lib/v1/lookup/EmptyPage/EmptyPage.js +43 -93
- package/lib/v1/lookup/Lookup/Lookup.js +5 -3
- package/lib/v1/lookup/Section/Section.js +15 -59
- package/lib/v1/lookup/header/ModuleHeader/ModuleHeader.js +1 -1
- package/lib/v1/lookup/header/Search/Search.js +3 -3
- package/lib/v1/lookup/header/TicketHeader/TicketHeader.js +1 -1
- package/lib/v1/lookup/header/ViewDropDown/ViewDropDown.js +10 -9
- package/lib/v1/{version2/notification → notification}/DesktopNotification/DesktopNotification.js +6 -6
- package/lib/v1/{version2/notification → notification}/DesktopNotificationHeader/DesktopNotificationHeader.js +6 -6
- package/lib/v1/setup/header/Button/Button.js +1 -1
- package/lib/v1/setup/header/Link/Link.js +1 -1
- package/lib/v1/setup/header/Search/Search.js +1 -1
- package/lib/v1/setup/table/Table/Table.js +1 -1
- package/lib/v1/setup/table/TableBody/TableBody.js +1 -1
- package/lib/v1/setup/table/TableData/TableData.js +1 -1
- package/lib/v1/setup/table/TableHead/TableHead.js +1 -1
- package/lib/v1/setup/table/TableRow/TableRow.js +1 -1
- package/lib/v1/svg/PlusIcon.js +20 -65
- package/lib/v1/svg/SnippetIcon.js +22 -67
- package/lib/v1/svg/TemplateIcon.js +23 -68
- package/package.json +10 -10
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- package/es/v1/errorstate/LinkText/LinkText.js +0 -29
- package/es/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -84
- package/es/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -83
- package/es/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -84
- package/es/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -86
- package/es/v1/errorstate/WillBack/WillBack.js +0 -75
- package/es/v1/errorstate/index.js +0 -8
- package/es/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -63
- package/es/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -65
- package/es/v1/version2/index.js +0 -12
- package/es/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -79
- package/es/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -164
- package/lib/v1/errorstate/LinkText/LinkText.js +0 -80
- package/lib/v1/errorstate/NoRequestFound/NoRequestFound.js +0 -135
- package/lib/v1/errorstate/PermissionPlay/PermissionPlay.js +0 -134
- package/lib/v1/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +0 -135
- package/lib/v1/errorstate/UnableToProcess/UnableToProcess.js +0 -137
- package/lib/v1/errorstate/WillBack/WillBack.js +0 -125
- package/lib/v1/errorstate/index.js +0 -71
- package/lib/v1/version2/errorstate/Inconvenience/Inconvenience.js +0 -79
- package/lib/v1/version2/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +0 -81
- package/lib/v1/version2/index.js +0 -58
- package/lib/v1/version2/lookup/AlertHeader/AlertHeader.js +0 -104
- package/lib/v1/version2/lookup/AlertLookup/AlertLookup.js +0 -185
- /package/es/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
- /package/es/v1/{version2 → alert}/alertIcons/index.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/AlarmAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/AlertIcons.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/DangerAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/ErrorAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/InfoAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/NotificationAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/SuccessAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/WarningAlertIcon.js +0 -0
- /package/lib/v1/{version2 → alert}/alertIcons/index.js +0 -0
|
@@ -15,7 +15,7 @@ var _propTypes = require("../../../../form/fields/PhoneField/props/propTypes");
|
|
|
15
15
|
|
|
16
16
|
var _icons = require("@zohodesk/icons");
|
|
17
17
|
|
|
18
|
-
var _Layout = require("@zohodesk/components/
|
|
18
|
+
var _Layout = require("@zohodesk/components/es/v1/Layout");
|
|
19
19
|
|
|
20
20
|
var _TextBoxField = _interopRequireDefault(require("../TextBoxField/TextBoxField"));
|
|
21
21
|
|
|
@@ -33,204 +33,161 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
33
33
|
|
|
34
34
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
35
35
|
|
|
36
|
-
function
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
42
|
-
function
|
|
43
|
-
|
|
44
|
-
function
|
|
45
|
-
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
36
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
37
|
+
|
|
38
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
39
|
+
|
|
40
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
41
|
+
|
|
42
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
43
|
+
|
|
44
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
45
|
+
|
|
46
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
47
|
+
|
|
48
|
+
function PhoneField(props) {
|
|
49
|
+
var labelName = props.labelName,
|
|
50
|
+
id = props.id,
|
|
51
|
+
textBoxSize = props.textBoxSize,
|
|
52
|
+
textBoxVariant = props.textBoxVariant,
|
|
53
|
+
textBoxType = props.textBoxType,
|
|
54
|
+
isMandatory = props.isMandatory,
|
|
55
|
+
validationMessage = props.validationMessage,
|
|
56
|
+
maxLength = props.maxLength,
|
|
57
|
+
isReadOnly = props.isReadOnly,
|
|
58
|
+
value = props.value,
|
|
59
|
+
errorType = props.errorType,
|
|
60
|
+
isDisabled = props.isDisabled,
|
|
61
|
+
title = props.title,
|
|
62
|
+
onBlur = props.onBlur,
|
|
63
|
+
dataId = props.dataId,
|
|
64
|
+
dataSelectorId = props.dataSelectorId,
|
|
65
|
+
onKeyDown = props.onKeyDown,
|
|
66
|
+
placeHolder = props.placeHolder,
|
|
67
|
+
infoText = props.infoText,
|
|
68
|
+
isTelephony = props.isTelephony,
|
|
69
|
+
providerName = props.providerName,
|
|
70
|
+
ticketId = props.ticketId,
|
|
71
|
+
contactId = props.contactId,
|
|
72
|
+
borderColor = props.borderColor,
|
|
73
|
+
fieldSize = props.fieldSize,
|
|
74
|
+
labelPalette = props.labelPalette,
|
|
75
|
+
labelCustomClass = props.labelCustomClass,
|
|
76
|
+
i18nKeys = props.i18nKeys,
|
|
77
|
+
onCall = props.onCall,
|
|
78
|
+
ePhiData = props.ePhiData,
|
|
79
|
+
type = props.type,
|
|
80
|
+
onFocus = props.onFocus,
|
|
81
|
+
onChange = props.onChange,
|
|
82
|
+
getRef = props.getRef,
|
|
83
|
+
customProps = props.customProps;
|
|
84
|
+
var _customProps$TextBoxF = customProps.TextBoxFieldProps,
|
|
85
|
+
TextBoxFieldProps = _customProps$TextBoxF === void 0 ? {} : _customProps$TextBoxF,
|
|
86
|
+
_customProps$LinkProp = customProps.LinkProps,
|
|
87
|
+
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp;
|
|
88
|
+
|
|
89
|
+
var _useState = (0, _react.useState)(false),
|
|
90
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
91
|
+
isActive = _useState2[0],
|
|
92
|
+
setActive = _useState2[1];
|
|
93
|
+
|
|
94
|
+
var textBoxElem = (0, _react.useRef)(null);
|
|
95
|
+
var callTitle = i18nKeys.callTitle;
|
|
96
|
+
var callBackparam = {
|
|
97
|
+
contact_id: contactId ? contactId : '',
|
|
98
|
+
request_id: ticketId,
|
|
99
|
+
activity_id: '',
|
|
100
|
+
entity_module: 'Requests'
|
|
101
|
+
};
|
|
102
|
+
var phoneValue = value;
|
|
103
|
+
|
|
104
|
+
if (isActive) {
|
|
105
|
+
phoneValue = value;
|
|
106
|
+
} else {
|
|
107
|
+
phoneValue = (0, _General.formatPhoneUrl)(value);
|
|
108
|
+
}
|
|
55
109
|
|
|
56
|
-
|
|
57
|
-
|
|
110
|
+
function handleChange(id, value) {
|
|
111
|
+
onChange && onChange(id, value);
|
|
112
|
+
}
|
|
58
113
|
|
|
59
|
-
|
|
114
|
+
function handleGetRef(el) {
|
|
115
|
+
textBoxElem.current = el;
|
|
116
|
+
getRef && getRef(el, id);
|
|
117
|
+
}
|
|
60
118
|
|
|
61
|
-
function
|
|
62
|
-
|
|
119
|
+
function focusInput(e) {
|
|
120
|
+
textBoxElem.current.focus();
|
|
121
|
+
}
|
|
63
122
|
|
|
64
|
-
|
|
123
|
+
function handleFocus() {
|
|
124
|
+
setActive(true);
|
|
125
|
+
onFocus && onFocus();
|
|
126
|
+
}
|
|
65
127
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
};
|
|
70
|
-
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
71
|
-
_this.handleGetRef = _this.handleGetRef.bind(_assertThisInitialized(_this));
|
|
72
|
-
_this.focusInput = _this.focusInput.bind(_assertThisInitialized(_this));
|
|
73
|
-
_this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));
|
|
74
|
-
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
75
|
-
return _this;
|
|
128
|
+
function handleBlur() {
|
|
129
|
+
setActive(false);
|
|
130
|
+
onBlur && onBlur();
|
|
76
131
|
}
|
|
77
132
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
isDisabled = _this$props2.isDisabled,
|
|
132
|
-
title = _this$props2.title,
|
|
133
|
-
onBlur = _this$props2.onBlur,
|
|
134
|
-
dataId = _this$props2.dataId,
|
|
135
|
-
dataSelectorId = _this$props2.dataSelectorId,
|
|
136
|
-
onKeyDown = _this$props2.onKeyDown,
|
|
137
|
-
placeHolder = _this$props2.placeHolder,
|
|
138
|
-
infoText = _this$props2.infoText,
|
|
139
|
-
isTelephony = _this$props2.isTelephony,
|
|
140
|
-
providerName = _this$props2.providerName,
|
|
141
|
-
ticketId = _this$props2.ticketId,
|
|
142
|
-
contactId = _this$props2.contactId,
|
|
143
|
-
borderColor = _this$props2.borderColor,
|
|
144
|
-
fieldSize = _this$props2.fieldSize,
|
|
145
|
-
labelPalette = _this$props2.labelPalette,
|
|
146
|
-
labelCustomClass = _this$props2.labelCustomClass,
|
|
147
|
-
i18nKeys = _this$props2.i18nKeys,
|
|
148
|
-
onCall = _this$props2.onCall,
|
|
149
|
-
ePhiData = _this$props2.ePhiData,
|
|
150
|
-
type = _this$props2.type,
|
|
151
|
-
customProps = _this$props2.customProps;
|
|
152
|
-
var _customProps$TextBoxF = customProps.TextBoxFieldProps,
|
|
153
|
-
TextBoxFieldProps = _customProps$TextBoxF === void 0 ? {} : _customProps$TextBoxF,
|
|
154
|
-
_customProps$LinkProp = customProps.LinkProps,
|
|
155
|
-
LinkProps = _customProps$LinkProp === void 0 ? {} : _customProps$LinkProp;
|
|
156
|
-
var isActive = this.state.isActive;
|
|
157
|
-
var callTitle = i18nKeys.callTitle;
|
|
158
|
-
var callBackparam = {
|
|
159
|
-
contact_id: contactId ? contactId : '',
|
|
160
|
-
request_id: ticketId,
|
|
161
|
-
activity_id: '',
|
|
162
|
-
entity_module: 'Requests'
|
|
163
|
-
};
|
|
164
|
-
var phoneValue = value;
|
|
165
|
-
|
|
166
|
-
if (isActive) {
|
|
167
|
-
phoneValue = value;
|
|
168
|
-
} else {
|
|
169
|
-
phoneValue = (0, _General.formatPhoneUrl)(value);
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
173
|
-
alignBox: "row",
|
|
174
|
-
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : ''),
|
|
175
|
-
"data-title": isDisabled ? title : null,
|
|
176
|
-
dataSelectorId: dataSelectorId
|
|
177
|
-
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
178
|
-
flexible: true
|
|
179
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextBoxField["default"], _extends({
|
|
180
|
-
labelName: labelName,
|
|
181
|
-
id: id,
|
|
182
|
-
palette: isMandatory ? 'mandatory' : 'default',
|
|
183
|
-
onClick: this.focusInput,
|
|
184
|
-
infoText: infoText,
|
|
185
|
-
type: textBoxType,
|
|
186
|
-
textBoxVariant: textBoxVariant,
|
|
187
|
-
size: textBoxSize,
|
|
188
|
-
maxLength: maxLength,
|
|
189
|
-
isReadOnly: isReadOnly,
|
|
190
|
-
getRef: this.handleGetRef,
|
|
191
|
-
value: phoneValue,
|
|
192
|
-
onChange: this.handleChange,
|
|
193
|
-
dataId: dataId,
|
|
194
|
-
onBlur: this.onBlur,
|
|
195
|
-
onFocus: this.onFocus,
|
|
196
|
-
onKeyDown: onKeyDown,
|
|
197
|
-
placeHolder: placeHolder,
|
|
198
|
-
validationMessage: validationMessage,
|
|
199
|
-
borderColor: borderColor,
|
|
200
|
-
isDisabled: isDisabled,
|
|
201
|
-
fieldSize: fieldSize,
|
|
202
|
-
isMandatory: isMandatory,
|
|
203
|
-
labelPalette: labelPalette,
|
|
204
|
-
labelCustomClass: labelCustomClass,
|
|
205
|
-
errorType: errorType,
|
|
206
|
-
ePhiData: ePhiData
|
|
207
|
-
}, TextBoxFieldProps))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, isTelephony && value ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
208
|
-
className: _FieldsModule["default"].phoneIcon,
|
|
209
|
-
callfrom: "phone",
|
|
210
|
-
pbxname: providerName,
|
|
211
|
-
phonenum: value,
|
|
212
|
-
module: "RequestDetailsView",
|
|
213
|
-
title: callTitle,
|
|
214
|
-
callBackParam: JSON.stringify(callBackparam),
|
|
215
|
-
callto: 'RequestPhoneNumber',
|
|
216
|
-
href: true,
|
|
217
|
-
onClick: onCall,
|
|
218
|
-
type: type
|
|
219
|
-
}, LinkProps), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
220
|
-
name: "ZD-GN-phone",
|
|
221
|
-
size: "14"
|
|
222
|
-
})) : null));
|
|
223
|
-
}
|
|
224
|
-
}]);
|
|
225
|
-
|
|
226
|
-
return PhoneField;
|
|
227
|
-
}(_react.PureComponent);
|
|
228
|
-
|
|
229
|
-
exports["default"] = PhoneField;
|
|
133
|
+
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
134
|
+
alignBox: "row",
|
|
135
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : ''),
|
|
136
|
+
"data-title": isDisabled ? title : null,
|
|
137
|
+
dataSelectorId: dataSelectorId
|
|
138
|
+
}, /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
139
|
+
flexible: true
|
|
140
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBoxField["default"], _extends({
|
|
141
|
+
labelName: labelName,
|
|
142
|
+
id: id,
|
|
143
|
+
palette: isMandatory ? 'mandatory' : 'default',
|
|
144
|
+
onClick: focusInput,
|
|
145
|
+
infoText: infoText,
|
|
146
|
+
type: textBoxType,
|
|
147
|
+
textBoxVariant: textBoxVariant,
|
|
148
|
+
size: textBoxSize,
|
|
149
|
+
maxLength: maxLength,
|
|
150
|
+
isReadOnly: isReadOnly,
|
|
151
|
+
getRef: handleGetRef,
|
|
152
|
+
value: phoneValue,
|
|
153
|
+
onChange: handleChange,
|
|
154
|
+
dataId: dataId,
|
|
155
|
+
onBlur: handleBlur,
|
|
156
|
+
onFocus: handleFocus,
|
|
157
|
+
onKeyDown: onKeyDown,
|
|
158
|
+
placeHolder: placeHolder,
|
|
159
|
+
validationMessage: validationMessage,
|
|
160
|
+
borderColor: borderColor,
|
|
161
|
+
isDisabled: isDisabled,
|
|
162
|
+
fieldSize: fieldSize,
|
|
163
|
+
isMandatory: isMandatory,
|
|
164
|
+
labelPalette: labelPalette,
|
|
165
|
+
labelCustomClass: labelCustomClass,
|
|
166
|
+
errorType: errorType,
|
|
167
|
+
ePhiData: ePhiData
|
|
168
|
+
}, TextBoxFieldProps))), /*#__PURE__*/_react["default"].createElement(_Layout.Box, null, isTelephony && value ? /*#__PURE__*/_react["default"].createElement(_Link["default"], _extends({
|
|
169
|
+
className: _FieldsModule["default"].phoneIcon,
|
|
170
|
+
callfrom: "phone",
|
|
171
|
+
pbxname: providerName,
|
|
172
|
+
phonenum: value,
|
|
173
|
+
module: "RequestDetailsView",
|
|
174
|
+
title: callTitle,
|
|
175
|
+
callBackParam: JSON.stringify(callBackparam),
|
|
176
|
+
callto: 'RequestPhoneNumber',
|
|
177
|
+
href: true,
|
|
178
|
+
onClick: onCall,
|
|
179
|
+
type: type
|
|
180
|
+
}, LinkProps), /*#__PURE__*/_react["default"].createElement(_icons.Icon, {
|
|
181
|
+
name: "ZD-GN-phone",
|
|
182
|
+
size: "14"
|
|
183
|
+
})) : null));
|
|
184
|
+
}
|
|
185
|
+
|
|
230
186
|
PhoneField.propTypes = _propTypes.propTypes;
|
|
231
|
-
PhoneField.defaultProps = _defaultProps.defaultProps;
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
187
|
+
PhoneField.defaultProps = _defaultProps.defaultProps;
|
|
188
|
+
var MemoizedPhoneField = /*#__PURE__*/(0, _react.memo)(PhoneField);
|
|
189
|
+
MemoizedPhoneField.propTypes = _propTypes.propTypes;
|
|
190
|
+
MemoizedPhoneField.defaultProps = _defaultProps.defaultProps;
|
|
191
|
+
MemoizedPhoneField.displayName = 'PhoneField';
|
|
192
|
+
var _default = MemoizedPhoneField;
|
|
193
|
+
exports["default"] = _default;
|
|
@@ -13,9 +13,9 @@ var _defaultProps = require("../../../../form/fields/RadioField/props/defaultPro
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("../../../../form/fields/RadioField/props/propTypes");
|
|
15
15
|
|
|
16
|
-
var _Label = _interopRequireDefault(require("@zohodesk/components/
|
|
16
|
+
var _Label = _interopRequireDefault(require("@zohodesk/components/es/v1/Label/Label"));
|
|
17
17
|
|
|
18
|
-
var _Radio = _interopRequireDefault(require("@zohodesk/components/
|
|
18
|
+
var _Radio = _interopRequireDefault(require("@zohodesk/components/es/v1/Radio/Radio"));
|
|
19
19
|
|
|
20
20
|
var _ValidationMessage = _interopRequireDefault(require("../ValidationMessage/ValidationMessage"));
|
|
21
21
|
|
|
@@ -29,141 +29,95 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
29
29
|
|
|
30
30
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
size: "medium",
|
|
117
|
-
id: id,
|
|
118
|
-
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default',
|
|
119
|
-
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
120
|
-
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
121
|
-
}, LabelProps)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
122
|
-
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"].fieldMargin_medium : '', " ").concat(_FieldsModule["default"].radioContainer)
|
|
123
|
-
}, options.map(function (option, index) {
|
|
124
|
-
var text = option.text,
|
|
125
|
-
value = option.value;
|
|
126
|
-
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
|
-
key: index,
|
|
128
|
-
className: "".concat(_FieldsModule["default"].radio)
|
|
129
|
-
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], _extends({
|
|
130
|
-
id: index,
|
|
131
|
-
value: value,
|
|
132
|
-
name: id,
|
|
133
|
-
text: text,
|
|
134
|
-
labelPalette: labelPalette,
|
|
135
|
-
labelSize: labelSize,
|
|
136
|
-
active: isActive,
|
|
137
|
-
disabled: isDisabled,
|
|
138
|
-
onChange: _this2.handleChange,
|
|
139
|
-
size: size,
|
|
140
|
-
checked: selectedValue == value,
|
|
141
|
-
dataId: dataId,
|
|
142
|
-
isReadOnly: isReadOnly,
|
|
143
|
-
variant: variant
|
|
144
|
-
}, RadioProps)));
|
|
145
|
-
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
146
|
-
text: validationMessage,
|
|
147
|
-
palette: validationPalette,
|
|
148
|
-
type: errorType,
|
|
149
|
-
dataId: "".concat(dataId, "_ValidationMessage")
|
|
150
|
-
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
151
|
-
text: validationRuleMessage,
|
|
152
|
-
palette: validationRulePalette,
|
|
153
|
-
type: errorType,
|
|
154
|
-
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
155
|
-
}, ValidationMessageProps2)));
|
|
156
|
-
}
|
|
157
|
-
}]);
|
|
158
|
-
|
|
159
|
-
return RadioField;
|
|
160
|
-
}(_react.PureComponent);
|
|
161
|
-
|
|
162
|
-
exports["default"] = RadioField;
|
|
32
|
+
var RadioField = function RadioField(props) {
|
|
33
|
+
var labelName = props.labelName,
|
|
34
|
+
id = props.id,
|
|
35
|
+
isMandatory = props.isMandatory,
|
|
36
|
+
options = props.options,
|
|
37
|
+
validationMessage = props.validationMessage,
|
|
38
|
+
validationPalette = props.validationPalette,
|
|
39
|
+
errorType = props.errorType,
|
|
40
|
+
isDisabled = props.isDisabled,
|
|
41
|
+
title = props.title,
|
|
42
|
+
labelPalette = props.labelPalette,
|
|
43
|
+
labelSize = props.labelSize,
|
|
44
|
+
size = props.size,
|
|
45
|
+
selectedValue = props.selectedValue,
|
|
46
|
+
isActive = props.isActive,
|
|
47
|
+
dataId = props.dataId,
|
|
48
|
+
dataSelectorId = props.dataSelectorId,
|
|
49
|
+
validationRuleMessage = props.validationRuleMessage,
|
|
50
|
+
validationRulePalette = props.validationRulePalette,
|
|
51
|
+
isReadOnly = props.isReadOnly,
|
|
52
|
+
variant = props.variant,
|
|
53
|
+
customProps = props.customProps,
|
|
54
|
+
onChange = props.onChange;
|
|
55
|
+
var _customProps$LabelPro = customProps.LabelProps,
|
|
56
|
+
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
57
|
+
_customProps$RadioPro = customProps.RadioProps,
|
|
58
|
+
RadioProps = _customProps$RadioPro === void 0 ? {} : _customProps$RadioPro,
|
|
59
|
+
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
60
|
+
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
61
|
+
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
62
|
+
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
63
|
+
|
|
64
|
+
var handleChange = function handleChange(value) {
|
|
65
|
+
onChange && onChange(id, value);
|
|
66
|
+
};
|
|
67
|
+
|
|
68
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
69
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
70
|
+
"data-title": isDisabled ? title : null,
|
|
71
|
+
"data-selector-id": dataSelectorId
|
|
72
|
+
}, labelName && /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
73
|
+
text: labelName,
|
|
74
|
+
size: "medium",
|
|
75
|
+
id: id,
|
|
76
|
+
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : 'default',
|
|
77
|
+
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
78
|
+
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
79
|
+
}, LabelProps)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
+
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"].fieldMargin_medium : '', " ").concat(_FieldsModule["default"].radioContainer)
|
|
81
|
+
}, options.map(function (option, index) {
|
|
82
|
+
var text = option.text,
|
|
83
|
+
value = option.value;
|
|
84
|
+
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
85
|
+
key: index,
|
|
86
|
+
className: "".concat(_FieldsModule["default"].radio)
|
|
87
|
+
}, /*#__PURE__*/_react["default"].createElement(_Radio["default"], _extends({
|
|
88
|
+
id: index,
|
|
89
|
+
value: value,
|
|
90
|
+
name: id,
|
|
91
|
+
text: text,
|
|
92
|
+
labelPalette: labelPalette,
|
|
93
|
+
labelSize: labelSize,
|
|
94
|
+
active: isActive,
|
|
95
|
+
disabled: isDisabled,
|
|
96
|
+
onChange: handleChange,
|
|
97
|
+
size: size,
|
|
98
|
+
checked: selectedValue == value,
|
|
99
|
+
dataId: dataId,
|
|
100
|
+
isReadOnly: isReadOnly,
|
|
101
|
+
variant: variant
|
|
102
|
+
}, RadioProps)));
|
|
103
|
+
})), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
104
|
+
text: validationMessage,
|
|
105
|
+
palette: validationPalette,
|
|
106
|
+
type: errorType,
|
|
107
|
+
dataId: "".concat(dataId, "_ValidationMessage")
|
|
108
|
+
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
109
|
+
text: validationRuleMessage,
|
|
110
|
+
palette: validationRulePalette,
|
|
111
|
+
type: errorType,
|
|
112
|
+
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
113
|
+
}, ValidationMessageProps2)));
|
|
114
|
+
};
|
|
115
|
+
|
|
163
116
|
RadioField.propTypes = _propTypes.propTypes;
|
|
164
|
-
RadioField.defaultProps = _defaultProps.defaultProps;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
117
|
+
RadioField.defaultProps = _defaultProps.defaultProps;
|
|
118
|
+
var MemoizedRadioField = /*#__PURE__*/(0, _react.memo)(RadioField);
|
|
119
|
+
MemoizedRadioField.propTypes = _propTypes.propTypes;
|
|
120
|
+
MemoizedRadioField.defaultProps = _defaultProps.defaultProps;
|
|
121
|
+
MemoizedRadioField.displayName = 'RadioField';
|
|
122
|
+
var _default = MemoizedRadioField;
|
|
123
|
+
exports["default"] = _default;
|