@zohodesk/dot 1.2.3 → 1.3.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/.cli/PropLessFiles.html +1 -1
- package/.cli/PropValidationExcludeFilesArray.js +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/README.md +13 -0
- 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/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/index.html +1 -1
- package/es/Drawer/Drawer.js +13 -12
- package/es/lookup/Lookup/Lookup.js +10 -10
- package/es/v1/ActionButton/ActionButton.js +11 -8
- package/es/v1/AlphabeticList/AlphabeticList.js +2 -2
- package/es/v1/Attachment/Attachment.js +1 -1
- package/es/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/es/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/es/v1/Drawer/Drawer.js +16 -16
- 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/ImportantNotes/ImportantNotes.js +1 -1
- package/es/v1/Loader/Loader.js +1 -1
- package/es/v1/MessageBanner/MessageBanner.js +1 -1
- package/es/v1/NewStar/NewStar.js +1 -1
- package/es/v1/Separator/Separator.js +1 -1
- package/es/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/es/v1/ToastMessage/ToastMessage.js +4 -4
- package/es/v1/Upload/Upload.js +1 -1
- 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 +128 -154
- package/es/v1/form/fields/DateField/DateField.js +131 -162
- 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 +128 -156
- package/es/v1/form/fields/RadioField/RadioField.js +2 -2
- package/es/v1/form/fields/SelectField/SelectField.js +3 -3
- 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 +1 -1
- package/es/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
- 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 +5 -5
- package/es/v1/lookup/Lookup/Lookup.js +14 -13
- package/es/v1/lookup/Section/Section.js +1 -1
- 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/lib/Drawer/Drawer.js +18 -17
- package/lib/lookup/Lookup/Lookup.js +15 -15
- package/lib/v1/ActionButton/ActionButton.js +11 -9
- package/lib/v1/AlphabeticList/AlphabeticList.js +2 -4
- package/lib/v1/Attachment/Attachment.js +1 -1
- package/lib/v1/AttachmentViewer/AttachmentViewer.js +4 -4
- package/lib/v1/ChannelIcon/ChannelIcon.js +1 -1
- package/lib/v1/Drawer/Drawer.js +21 -21
- 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/ImportantNotes/ImportantNotes.js +1 -1
- package/lib/v1/Loader/Loader.js +1 -1
- package/lib/v1/MessageBanner/MessageBanner.js +1 -1
- package/lib/v1/NewStar/NewStar.js +1 -1
- package/lib/v1/Separator/Separator.js +1 -1
- package/lib/v1/TagWithIcon/TagWithIcon.js +1 -1
- package/lib/v1/ToastMessage/ToastMessage.js +4 -4
- package/lib/v1/Upload/Upload.js +1 -1
- 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 +107 -159
- package/lib/v1/form/fields/CurrencyField/CurrencyField.js +152 -193
- package/lib/v1/form/fields/DateField/DateField.js +140 -206
- package/lib/v1/form/fields/FieldContainer/FieldContainer.js +60 -91
- package/lib/v1/form/fields/MultiSelectField/MultiSelectField.js +168 -228
- package/lib/v1/form/fields/PhoneField/PhoneField.js +150 -193
- package/lib/v1/form/fields/RadioField/RadioField.js +2 -2
- package/lib/v1/form/fields/SelectField/SelectField.js +3 -3
- 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 +1 -1
- package/lib/v1/layout/SubtabLayout/SubtabLayout.js +2 -2
- 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 +5 -5
- package/lib/v1/lookup/Lookup/Lookup.js +20 -18
- package/lib/v1/lookup/Section/Section.js +1 -1
- 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/package.json +11 -11
- package/result.json +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
|
@@ -13,13 +13,13 @@ var _defaultProps = require("../../../../form/fields/CurrencyField/props/default
|
|
|
13
13
|
|
|
14
14
|
var _propTypes = require("../../../../form/fields/CurrencyField/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 _TextBox = _interopRequireDefault(require("@zohodesk/components/
|
|
18
|
+
var _TextBox = _interopRequireDefault(require("@zohodesk/components/es/v1/TextBox/TextBox"));
|
|
19
19
|
|
|
20
20
|
var _ValidationMessage = _interopRequireDefault(require("../ValidationMessage/ValidationMessage"));
|
|
21
21
|
|
|
22
|
-
var _IdProvider = require("@zohodesk/components/
|
|
22
|
+
var _IdProvider = require("@zohodesk/components/es/v1/Provider/IdProvider");
|
|
23
23
|
|
|
24
24
|
var _FieldContainer = _interopRequireDefault(require("../FieldContainer/FieldContainer"));
|
|
25
25
|
|
|
@@ -33,202 +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
|
-
|
|
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 CurrencyField(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
|
+
validationPalette = props.validationPalette,
|
|
57
|
+
maxLength = props.maxLength,
|
|
58
|
+
isReadOnly = props.isReadOnly,
|
|
59
|
+
value = props.value,
|
|
60
|
+
errorType = props.errorType,
|
|
61
|
+
isDisabled = props.isDisabled,
|
|
62
|
+
title = props.title,
|
|
63
|
+
dataId = props.dataId,
|
|
64
|
+
validationRuleMessage = props.validationRuleMessage,
|
|
65
|
+
validationRulePalette = props.validationRulePalette,
|
|
66
|
+
onKeyDown = props.onKeyDown,
|
|
67
|
+
placeHolder = props.placeHolder,
|
|
68
|
+
infoText = props.infoText,
|
|
69
|
+
borderColor = props.borderColor,
|
|
70
|
+
fieldSize = props.fieldSize,
|
|
71
|
+
labelPalette = props.labelPalette,
|
|
72
|
+
labelCustomClass = props.labelCustomClass,
|
|
73
|
+
htmlId = props.htmlId,
|
|
74
|
+
dataSelectorId = props.dataSelectorId,
|
|
75
|
+
lockedInfoText = props.lockedInfoText,
|
|
76
|
+
isLocked = props.isLocked,
|
|
77
|
+
needReadOnlyStyle = props.needReadOnlyStyle,
|
|
78
|
+
isClickable = props.isClickable,
|
|
79
|
+
userCurrencyType = props.userCurrencyType,
|
|
80
|
+
customProps = props.customProps,
|
|
81
|
+
formatCurrency = props.formatCurrency,
|
|
82
|
+
renderLabelProps = props.renderLabelProps,
|
|
83
|
+
onBlur = props.onBlur,
|
|
84
|
+
onFocus = props.onFocus,
|
|
85
|
+
getRef = props.getRef,
|
|
86
|
+
onChange = props.onChange;
|
|
87
|
+
var _customProps$LabelPro = customProps.LabelProps,
|
|
88
|
+
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
89
|
+
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
90
|
+
TextBoxProps = _customProps$TextBoxP === void 0 ? {} : _customProps$TextBoxP,
|
|
91
|
+
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
92
|
+
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
93
|
+
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
94
|
+
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
95
|
+
var getNextId = (0, _IdProvider.useUniqueId)();
|
|
96
|
+
|
|
97
|
+
var _useState = (0, _react.useState)(false),
|
|
98
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
99
|
+
isActive = _useState2[0],
|
|
100
|
+
setActive = _useState2[1];
|
|
101
|
+
|
|
102
|
+
var textBox = (0, _react.useRef)(null);
|
|
103
|
+
var formatValue = value;
|
|
104
|
+
|
|
105
|
+
if (!isActive) {
|
|
106
|
+
formatValue = formatCurrency(value, userCurrencyType);
|
|
107
|
+
} else {
|
|
108
|
+
formatValue = value;
|
|
109
|
+
}
|
|
51
110
|
|
|
52
|
-
|
|
111
|
+
var uniqueId = htmlId ? htmlId : getNextId();
|
|
53
112
|
|
|
54
|
-
function
|
|
113
|
+
function handleChange(value) {
|
|
114
|
+
onChange && onChange(id, value);
|
|
115
|
+
}
|
|
55
116
|
|
|
56
|
-
|
|
57
|
-
|
|
117
|
+
function handleGetRef(el) {
|
|
118
|
+
textBox.current = el;
|
|
119
|
+
getRef && getRef(el, id);
|
|
120
|
+
}
|
|
58
121
|
|
|
59
|
-
|
|
122
|
+
function handleonFocus() {
|
|
123
|
+
setActive(true);
|
|
124
|
+
onFocus && onFocus();
|
|
125
|
+
}
|
|
60
126
|
|
|
61
|
-
function
|
|
62
|
-
|
|
127
|
+
function handleonBlur() {
|
|
128
|
+
setActive(false);
|
|
129
|
+
onBlur && onBlur();
|
|
130
|
+
}
|
|
63
131
|
|
|
64
|
-
|
|
132
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
133
|
+
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
134
|
+
"data-title": isDisabled ? title : null,
|
|
135
|
+
"data-selector-id": dataSelectorId
|
|
136
|
+
}, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
|
|
137
|
+
infoText: infoText,
|
|
138
|
+
isLocked: isLocked,
|
|
139
|
+
lockedInfoText: lockedInfoText,
|
|
140
|
+
renderProps: renderLabelProps
|
|
141
|
+
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
142
|
+
text: labelName,
|
|
143
|
+
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
144
|
+
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
145
|
+
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
146
|
+
htmlFor: uniqueId,
|
|
147
|
+
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
148
|
+
}, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
|
+
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
|
|
150
|
+
}, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], _extends({
|
|
151
|
+
htmlId: uniqueId,
|
|
152
|
+
id: id,
|
|
153
|
+
type: textBoxType,
|
|
154
|
+
variant: textBoxVariant,
|
|
155
|
+
size: fieldSize === 'medium' ? textBoxSize : 'xsmall',
|
|
156
|
+
maxLength: maxLength,
|
|
157
|
+
isReadOnly: isReadOnly,
|
|
158
|
+
inputRef: handleGetRef,
|
|
159
|
+
value: formatValue,
|
|
160
|
+
onChange: handleChange,
|
|
161
|
+
dataId: dataId,
|
|
162
|
+
onBlur: handleonBlur,
|
|
163
|
+
onFocus: handleonFocus,
|
|
164
|
+
onKeyDown: onKeyDown,
|
|
165
|
+
placeHolder: placeHolder,
|
|
166
|
+
borderColor: borderColor,
|
|
167
|
+
isDisabled: isDisabled,
|
|
168
|
+
needEffect: isReadOnly || isDisabled ? false : true,
|
|
169
|
+
isClickable: isClickable,
|
|
170
|
+
needReadOnlyStyle: needReadOnlyStyle
|
|
171
|
+
}, TextBoxProps)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
172
|
+
text: validationMessage,
|
|
173
|
+
palette: validationPalette,
|
|
174
|
+
type: errorType,
|
|
175
|
+
dataId: "".concat(dataId, "_ValidationMessage"),
|
|
176
|
+
htmlFor: uniqueId
|
|
177
|
+
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
178
|
+
text: validationRuleMessage,
|
|
179
|
+
palette: validationRulePalette,
|
|
180
|
+
type: errorType,
|
|
181
|
+
htmlFor: uniqueId,
|
|
182
|
+
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
183
|
+
}, ValidationMessageProps2))));
|
|
184
|
+
} // const MomoizedCurrencyField = memo(CurrencyField);
|
|
185
|
+
// export default MomoizedCurrencyField;
|
|
186
|
+
// MomoizedCurrencyField.propTypes = propTypes;
|
|
187
|
+
// MomoizedCurrencyField.defaultProps = defaultProps;
|
|
65
188
|
|
|
66
|
-
_this = _super.call(this, props);
|
|
67
|
-
_this.state = {
|
|
68
|
-
isActive: false
|
|
69
|
-
};
|
|
70
|
-
_this.handleChange = _this.handleChange.bind(_assertThisInitialized(_this));
|
|
71
|
-
_this.handleGetRef = _this.handleGetRef.bind(_assertThisInitialized(_this));
|
|
72
|
-
_this.getNextId = (0, _IdProvider.getUniqueId)(_assertThisInitialized(_this));
|
|
73
|
-
_this.onFocus = _this.onFocus.bind(_assertThisInitialized(_this));
|
|
74
|
-
_this.onBlur = _this.onBlur.bind(_assertThisInitialized(_this));
|
|
75
|
-
return _this;
|
|
76
|
-
}
|
|
77
189
|
|
|
78
|
-
_createClass(CurrencyField, [{
|
|
79
|
-
key: "handleChange",
|
|
80
|
-
value: function handleChange(value) {
|
|
81
|
-
var _this$props = this.props,
|
|
82
|
-
id = _this$props.id,
|
|
83
|
-
onChange = _this$props.onChange;
|
|
84
|
-
onChange && onChange(id, value);
|
|
85
|
-
}
|
|
86
|
-
}, {
|
|
87
|
-
key: "handleGetRef",
|
|
88
|
-
value: function handleGetRef(el) {
|
|
89
|
-
var _this$props2 = this.props,
|
|
90
|
-
getRef = _this$props2.getRef,
|
|
91
|
-
id = _this$props2.id;
|
|
92
|
-
this.textBox = el;
|
|
93
|
-
getRef && getRef(el, id);
|
|
94
|
-
}
|
|
95
|
-
}, {
|
|
96
|
-
key: "onFocus",
|
|
97
|
-
value: function onFocus() {
|
|
98
|
-
var onFocus = this.props.onFocus;
|
|
99
|
-
this.setState({
|
|
100
|
-
isActive: true
|
|
101
|
-
});
|
|
102
|
-
onFocus && onFocus();
|
|
103
|
-
}
|
|
104
|
-
}, {
|
|
105
|
-
key: "onBlur",
|
|
106
|
-
value: function onBlur() {
|
|
107
|
-
var onBlur = this.props.onBlur;
|
|
108
|
-
this.setState({
|
|
109
|
-
isActive: false
|
|
110
|
-
});
|
|
111
|
-
onBlur && onBlur();
|
|
112
|
-
}
|
|
113
|
-
}, {
|
|
114
|
-
key: "render",
|
|
115
|
-
value: function render() {
|
|
116
|
-
var _this$props3 = this.props,
|
|
117
|
-
labelName = _this$props3.labelName,
|
|
118
|
-
id = _this$props3.id,
|
|
119
|
-
textBoxSize = _this$props3.textBoxSize,
|
|
120
|
-
textBoxVariant = _this$props3.textBoxVariant,
|
|
121
|
-
textBoxType = _this$props3.textBoxType,
|
|
122
|
-
isMandatory = _this$props3.isMandatory,
|
|
123
|
-
validationMessage = _this$props3.validationMessage,
|
|
124
|
-
validationPalette = _this$props3.validationPalette,
|
|
125
|
-
maxLength = _this$props3.maxLength,
|
|
126
|
-
isReadOnly = _this$props3.isReadOnly,
|
|
127
|
-
value = _this$props3.value,
|
|
128
|
-
errorType = _this$props3.errorType,
|
|
129
|
-
isDisabled = _this$props3.isDisabled,
|
|
130
|
-
title = _this$props3.title,
|
|
131
|
-
dataId = _this$props3.dataId,
|
|
132
|
-
validationRuleMessage = _this$props3.validationRuleMessage,
|
|
133
|
-
validationRulePalette = _this$props3.validationRulePalette,
|
|
134
|
-
onKeyDown = _this$props3.onKeyDown,
|
|
135
|
-
placeHolder = _this$props3.placeHolder,
|
|
136
|
-
infoText = _this$props3.infoText,
|
|
137
|
-
borderColor = _this$props3.borderColor,
|
|
138
|
-
fieldSize = _this$props3.fieldSize,
|
|
139
|
-
labelPalette = _this$props3.labelPalette,
|
|
140
|
-
labelCustomClass = _this$props3.labelCustomClass,
|
|
141
|
-
htmlId = _this$props3.htmlId,
|
|
142
|
-
dataSelectorId = _this$props3.dataSelectorId,
|
|
143
|
-
lockedInfoText = _this$props3.lockedInfoText,
|
|
144
|
-
isLocked = _this$props3.isLocked,
|
|
145
|
-
needReadOnlyStyle = _this$props3.needReadOnlyStyle,
|
|
146
|
-
isClickable = _this$props3.isClickable,
|
|
147
|
-
userCurrencyType = _this$props3.userCurrencyType,
|
|
148
|
-
customProps = _this$props3.customProps,
|
|
149
|
-
formatCurrency = _this$props3.formatCurrency,
|
|
150
|
-
renderLabelProps = _this$props3.renderLabelProps;
|
|
151
|
-
var _customProps$LabelPro = customProps.LabelProps,
|
|
152
|
-
LabelProps = _customProps$LabelPro === void 0 ? {} : _customProps$LabelPro,
|
|
153
|
-
_customProps$TextBoxP = customProps.TextBoxProps,
|
|
154
|
-
TextBoxProps = _customProps$TextBoxP === void 0 ? {} : _customProps$TextBoxP,
|
|
155
|
-
_customProps$Validati = customProps.ValidationMessageProps1,
|
|
156
|
-
ValidationMessageProps1 = _customProps$Validati === void 0 ? {} : _customProps$Validati,
|
|
157
|
-
_customProps$Validati2 = customProps.ValidationMessageProps2,
|
|
158
|
-
ValidationMessageProps2 = _customProps$Validati2 === void 0 ? {} : _customProps$Validati2;
|
|
159
|
-
var isActive = this.state.isActive;
|
|
160
|
-
var formatValue = value;
|
|
161
|
-
|
|
162
|
-
if (!isActive) {
|
|
163
|
-
formatValue = formatCurrency(value, userCurrencyType);
|
|
164
|
-
} else {
|
|
165
|
-
formatValue = value;
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
var uniqueId = htmlId ? htmlId : this.getNextId();
|
|
169
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
170
|
-
className: "".concat(_FieldsModule["default"].container, " ").concat(isDisabled ? _FieldsModule["default"].disabled : isReadOnly ? _FieldsModule["default"].readonly : ''),
|
|
171
|
-
"data-title": isDisabled ? title : null,
|
|
172
|
-
"data-selector-id": dataSelectorId
|
|
173
|
-
}, labelName && /*#__PURE__*/_react["default"].createElement(_FieldContainer["default"], {
|
|
174
|
-
infoText: infoText,
|
|
175
|
-
isLocked: isLocked,
|
|
176
|
-
lockedInfoText: lockedInfoText,
|
|
177
|
-
renderProps: renderLabelProps
|
|
178
|
-
}, /*#__PURE__*/_react["default"].createElement(_Label["default"], _extends({
|
|
179
|
-
text: labelName,
|
|
180
|
-
size: fieldSize === 'small' ? 'small' : 'medium',
|
|
181
|
-
palette: isMandatory ? 'mandatory' : isDisabled ? 'primary' : labelPalette,
|
|
182
|
-
customClass: "".concat(_FieldsModule["default"].fieldLabel, " ").concat(labelCustomClass, " ").concat(isMandatory ? _FieldsModule["default"].labelMandatory : ''),
|
|
183
|
-
htmlFor: uniqueId,
|
|
184
|
-
dataId: isDisabled ? "".concat(dataId, "_label_disabled") : isMandatory ? "".concat(dataId, "_label_mandatory") : "".concat(dataId, "_label")
|
|
185
|
-
}, LabelProps))), /*#__PURE__*/_react["default"].createElement("div", {
|
|
186
|
-
className: "".concat(_FieldsModule["default"].fieldContainer, " ").concat(labelName ? _FieldsModule["default"]["fieldMargin_".concat(fieldSize)] : '')
|
|
187
|
-
}, /*#__PURE__*/_react["default"].createElement(_TextBox["default"], _extends({
|
|
188
|
-
htmlId: uniqueId,
|
|
189
|
-
id: id,
|
|
190
|
-
type: textBoxType,
|
|
191
|
-
variant: textBoxVariant,
|
|
192
|
-
size: fieldSize === 'medium' ? textBoxSize : 'xsmall',
|
|
193
|
-
maxLength: maxLength,
|
|
194
|
-
isReadOnly: isReadOnly,
|
|
195
|
-
inputRef: this.handleGetRef,
|
|
196
|
-
value: formatValue,
|
|
197
|
-
onChange: this.handleChange,
|
|
198
|
-
dataId: dataId,
|
|
199
|
-
onBlur: this.onBlur,
|
|
200
|
-
onFocus: this.onFocus,
|
|
201
|
-
onKeyDown: onKeyDown,
|
|
202
|
-
placeHolder: placeHolder,
|
|
203
|
-
borderColor: borderColor,
|
|
204
|
-
isDisabled: isDisabled,
|
|
205
|
-
needEffect: isReadOnly || isDisabled ? false : true,
|
|
206
|
-
isClickable: isClickable,
|
|
207
|
-
needReadOnlyStyle: needReadOnlyStyle
|
|
208
|
-
}, TextBoxProps)), validationMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
209
|
-
text: validationMessage,
|
|
210
|
-
palette: validationPalette,
|
|
211
|
-
type: errorType,
|
|
212
|
-
dataId: "".concat(dataId, "_ValidationMessage"),
|
|
213
|
-
htmlFor: uniqueId
|
|
214
|
-
}, ValidationMessageProps1)), validationRuleMessage && /*#__PURE__*/_react["default"].createElement(_ValidationMessage["default"], _extends({
|
|
215
|
-
text: validationRuleMessage,
|
|
216
|
-
palette: validationRulePalette,
|
|
217
|
-
type: errorType,
|
|
218
|
-
htmlFor: uniqueId,
|
|
219
|
-
dataId: "".concat(dataId, "_ValidationRuleMessage")
|
|
220
|
-
}, ValidationMessageProps2))));
|
|
221
|
-
}
|
|
222
|
-
}]);
|
|
223
|
-
|
|
224
|
-
return CurrencyField;
|
|
225
|
-
}(_react.PureComponent);
|
|
226
|
-
|
|
227
|
-
exports["default"] = CurrencyField;
|
|
228
190
|
CurrencyField.propTypes = _propTypes.propTypes;
|
|
229
|
-
CurrencyField.defaultProps = _defaultProps.defaultProps;
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
// folderName: 'General'
|
|
233
|
-
// };
|
|
234
|
-
// }
|
|
191
|
+
CurrencyField.defaultProps = _defaultProps.defaultProps;
|
|
192
|
+
var _default = CurrencyField;
|
|
193
|
+
exports["default"] = _default;
|