@zohodesk/dot 1.9.11 → 1.9.13
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/README.md +20 -0
- package/es/ActionButton/__tests__/ActionButton.spec.js +4 -5
- package/es/AttachmentViewer/AttachmentImage.js +3 -1
- package/es/AttachmentViewer/AttachmentViewer.js +340 -273
- package/es/AttachmentViewer/AttachmentViewer.module.css +8 -15
- package/es/AttachmentViewer/__tests__/AttachmentViewer.spec.js +104 -100
- package/es/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
- package/es/AttachmentViewer/props/defaultProps.js +4 -2
- package/es/AttachmentViewer/props/propTypes.js +9 -2
- package/es/AttachmentViewer/utils.js +6 -7
- package/es/AudioPlayer/utils/utils.js +2 -5
- package/es/DotProvider/hooks/useDotProvider.js +14 -15
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +12 -13
- package/es/DotProvider/props/defaultProps.js +1 -1
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +3 -4
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +4 -5
- package/es/DotProvider/utils/errorValidation.js +5 -6
- package/es/DotProvider/utils/getAssetsImportPromises.js +4 -5
- package/es/Drawer/Drawer.js +6 -8
- package/es/FreezeLayer/css/cssJSLogic.js +4 -5
- package/es/Hooks/Dragger/useDragger.js +5 -6
- package/es/Hooks/Dragger/utils/DraggerUtil.js +7 -8
- package/es/Hooks/useFreezeLayer.js +4 -5
- package/es/Link/Link.js +4 -3
- package/es/Link/props/propTypes.js +1 -0
- package/es/Onboarding/CarouselDots/CarouselDots.js +29 -32
- package/es/Onboarding/Onboarding.js +23 -24
- package/es/Onboarding/hooks/useOnboarding.js +4 -5
- package/es/Onboarding/hooks/useOnboardingSlider.js +5 -6
- package/es/deprecated/SelectDropdown/SelectDropdown.js +43 -47
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +214 -225
- package/es/errorstate/Inconvenience/Inconvenience.js +32 -36
- package/es/errorstate/NoRequestFound/NoRequestFound.js +32 -36
- package/es/errorstate/PermissionPlay/PermissionPlay.js +31 -35
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +32 -36
- package/es/errorstate/UnableToProcess/UnableToProcess.js +32 -36
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +32 -36
- package/es/errorstate/WillBack/WillBack.js +30 -34
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +81 -85
- package/es/list/status/StatusDropdown/StatusDropdown.js +109 -113
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +3 -4
- package/es/lookup/header/Search/Search.js +4 -5
- package/es/lookup/header/Search/__tests__/Search.spec.js +3 -4
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +67 -75
- package/es/utils/General.js +2 -7
- package/es/utils/editorUtils.js +1 -5
- package/es/version2/lookup/AlertHeader/AlertHeader.js +5 -3
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +24 -0
- package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +34 -0
- package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +4 -5
- package/es/version2/lookup/AlertHeader/props/propTypes.js +2 -1
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +59 -63
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +40 -44
- package/lib/AttachmentViewer/AttachmentImage.js +3 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +158 -82
- package/lib/AttachmentViewer/AttachmentViewer.module.css +8 -15
- package/lib/AttachmentViewer/__tests__/AttachmentViewer.spec.js +100 -100
- package/lib/AttachmentViewer/__tests__/__snapshots__/AttachmentViewer.spec.js.snap +778 -1
- package/lib/AttachmentViewer/props/defaultProps.js +6 -2
- package/lib/AttachmentViewer/props/propTypes.js +9 -2
- package/lib/DotProvider/props/defaultProps.js +2 -2
- package/lib/Link/Link.js +4 -3
- package/lib/Link/props/propTypes.js +1 -0
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +5 -2
- package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +26 -0
- package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +34 -0
- package/lib/version2/lookup/AlertHeader/props/propTypes.js +2 -1
- package/package.json +26 -24
|
@@ -95,10 +95,9 @@ export function DesktopNotificationUI(props) {
|
|
|
95
95
|
let uiVariantOne = title && (info || secondaryInfo);
|
|
96
96
|
let uiVariantTwo = title && !(info || secondaryInfo) && !getSectionContainer;
|
|
97
97
|
|
|
98
|
-
function responsiveFunc(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
} = _ref;
|
|
98
|
+
function responsiveFunc({
|
|
99
|
+
mediaQueryOR
|
|
100
|
+
}) {
|
|
102
101
|
return {
|
|
103
102
|
uptoTablet: mediaQueryOR([{
|
|
104
103
|
maxWidth: 760
|
|
@@ -115,66 +114,63 @@ export function DesktopNotificationUI(props) {
|
|
|
115
114
|
}, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
116
115
|
query: responsiveFunc,
|
|
117
116
|
responsiveId: responsiveId
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
}
|
|
122
|
-
return /*#__PURE__*/React.createElement(Container, _extends({
|
|
123
|
-
className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
|
|
117
|
+
}, ({
|
|
118
|
+
uptoTablet
|
|
119
|
+
}) => /*#__PURE__*/React.createElement(Container, _extends({
|
|
120
|
+
className: `${style.container} ${isAnimate ? animateClass : animateRemoveClass}
|
|
124
121
|
${isShrinkView ? style.globalNotify : ''} ${containerClass} ${uptoTablet ? style.tapWidth : style[`${size}`]}`,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}));
|
|
122
|
+
isCover: false,
|
|
123
|
+
dataId: dataId,
|
|
124
|
+
isInline: uiVariantTwo
|
|
125
|
+
}, ExtraProps), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(DesktopNotificationHeader, {
|
|
126
|
+
type: type,
|
|
127
|
+
title: title,
|
|
128
|
+
variant: titleVariant,
|
|
129
|
+
needIcon: needIcon,
|
|
130
|
+
onClose: onClose,
|
|
131
|
+
closeTitle: closeTitle,
|
|
132
|
+
dataId: `${dataId}_close`,
|
|
133
|
+
needClose: needClose
|
|
134
|
+
})), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Container, {
|
|
135
|
+
alignBox: "column"
|
|
136
|
+
}, uiVariantOne && /*#__PURE__*/React.createElement(Box, {
|
|
137
|
+
flexible: true
|
|
138
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
139
|
+
className: `${style.section} ${style.infoText}`
|
|
140
|
+
}, subTitle && /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: `${style.subTitle} ${info || secondaryInfo ? style.subTitleMargin : ''}`
|
|
142
|
+
}, subTitle), info && /*#__PURE__*/React.createElement("div", null, info), secondaryInfo && /*#__PURE__*/React.createElement("div", {
|
|
143
|
+
className: `${info ? style.secondaryInfo : ''}`
|
|
144
|
+
}, secondaryInfo))), getSectionContainer && /*#__PURE__*/React.createElement(Box, {
|
|
145
|
+
flexible: true
|
|
146
|
+
}, getSectionContainer()), submitText || cancelText ? /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement("div", {
|
|
147
|
+
className: style.footer
|
|
148
|
+
}, isMore ? /*#__PURE__*/React.createElement("div", {
|
|
149
|
+
className: `${style.message}`,
|
|
150
|
+
tagName: "p"
|
|
151
|
+
}, message) : null, /*#__PURE__*/React.createElement(FormAction, {
|
|
152
|
+
size: "small",
|
|
153
|
+
paddingLeftSize: "xmedium"
|
|
154
|
+
}, submitText ? /*#__PURE__*/React.createElement("div", {
|
|
155
|
+
onClick: onClickSubmit,
|
|
156
|
+
"data-id": `${dataId}_submitButton`,
|
|
157
|
+
"data-test-id": `${dataId}_submitButton`
|
|
158
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
159
|
+
align: "vertical",
|
|
160
|
+
alignBox: "row"
|
|
161
|
+
}, getSubmitContainer ? /*#__PURE__*/React.createElement(Box, {
|
|
162
|
+
flexible: true
|
|
163
|
+
}, getSubmitContainer()) : /*#__PURE__*/React.createElement(Box, {
|
|
164
|
+
flexible: true
|
|
165
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
166
|
+
text: submitText,
|
|
167
|
+
palette: submitType ? submitType : buttonPalette
|
|
168
|
+
})))) : null, cancelText ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Button, {
|
|
169
|
+
text: cancelText,
|
|
170
|
+
palette: "secondary",
|
|
171
|
+
dataId: `${dataId}_cancelButton`,
|
|
172
|
+
onClick: onClickCancel
|
|
173
|
+
})) : null))) : null)), getBottomContainer ? /*#__PURE__*/React.createElement(Box, null, getBottomContainer()) : null)));
|
|
178
174
|
}
|
|
179
175
|
DesktopNotificationUI.propTypes = DesktopNotificationUI_propTypes;
|
|
180
176
|
export default function DesktopNotification(props) {
|
|
@@ -25,10 +25,9 @@ export default class DesktopNotificationHeader extends Component {
|
|
|
25
25
|
responsiveId
|
|
26
26
|
} = this.props;
|
|
27
27
|
|
|
28
|
-
function responsiveFunc(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} = _ref;
|
|
28
|
+
function responsiveFunc({
|
|
29
|
+
mediaQueryOR
|
|
30
|
+
}) {
|
|
32
31
|
return {
|
|
33
32
|
uptoTablet: mediaQueryOR([{
|
|
34
33
|
maxWidth: 760
|
|
@@ -45,46 +44,43 @@ export default class DesktopNotificationHeader extends Component {
|
|
|
45
44
|
}, /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
46
45
|
query: responsiveFunc,
|
|
47
46
|
responsiveId: responsiveId
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
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
|
-
type: "light"
|
|
86
|
-
})) : null);
|
|
87
|
-
}));
|
|
47
|
+
}, ({
|
|
48
|
+
uptoTablet
|
|
49
|
+
}) => /*#__PURE__*/React.createElement(React.Fragment, null, needIcon ? /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
className: style.iconContainer
|
|
51
|
+
}, /*#__PURE__*/React.createElement(AlertIcons, {
|
|
52
|
+
type: type
|
|
53
|
+
})) : null, /*#__PURE__*/React.createElement(Box, {
|
|
54
|
+
flexible: true
|
|
55
|
+
}, /*#__PURE__*/React.createElement(Container, {
|
|
56
|
+
alignBox: "row",
|
|
57
|
+
align: "center"
|
|
58
|
+
}, variant === 'primary' ? /*#__PURE__*/React.createElement(Box, {
|
|
59
|
+
shrink: true
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
61
|
+
$i18n_dataTitle: title,
|
|
62
|
+
$ui_className: style.title,
|
|
63
|
+
$ui_tagName: "h1",
|
|
64
|
+
$ui_size: uptoTablet ? '16' : '18',
|
|
65
|
+
$ui_lineHeight: "1.2",
|
|
66
|
+
$ui_weight: "bold",
|
|
67
|
+
$flag_reset: true,
|
|
68
|
+
$ui_wordBreak: "breakWord"
|
|
69
|
+
}, title)) : /*#__PURE__*/React.createElement(Box, {
|
|
70
|
+
className: `${style.infoText}`
|
|
71
|
+
}, /*#__PURE__*/React.createElement(Typography, {
|
|
72
|
+
$i18n_dataTitle: title,
|
|
73
|
+
$ui_className: style.title,
|
|
74
|
+
$ui_size: "14",
|
|
75
|
+
$ui_wordBreak: "breakWord"
|
|
76
|
+
}, title)))), needClose ? /*#__PURE__*/React.createElement(Box, {
|
|
77
|
+
className: style.close
|
|
78
|
+
}, /*#__PURE__*/React.createElement(AlertClose, {
|
|
79
|
+
onClose: onClose,
|
|
80
|
+
dataTitle: closeTitle,
|
|
81
|
+
dataId: dataId,
|
|
82
|
+
type: "light"
|
|
83
|
+
})) : null)));
|
|
88
84
|
}
|
|
89
85
|
|
|
90
86
|
}
|
|
@@ -92,7 +92,8 @@ var AttachmentImage = /*#__PURE__*/function (_Component) {
|
|
|
92
92
|
isCover = _this$props.isCover,
|
|
93
93
|
customClass = _this$props.customClass,
|
|
94
94
|
onLoad = _this$props.onLoad,
|
|
95
|
-
onError = _this$props.onError
|
|
95
|
+
onError = _this$props.onError,
|
|
96
|
+
imageRef = _this$props.imageRef;
|
|
96
97
|
var isImageValid = this.state.isImageValid;
|
|
97
98
|
var _customClass$customIm = customClass.customImageClass,
|
|
98
99
|
customImageClass = _customClass$customIm === void 0 ? '' : _customClass$customIm;
|
|
@@ -104,6 +105,7 @@ var AttachmentImage = /*#__PURE__*/function (_Component) {
|
|
|
104
105
|
className: customImageClass,
|
|
105
106
|
alt: alt,
|
|
106
107
|
isCover: isCover,
|
|
108
|
+
eleRef: imageRef,
|
|
107
109
|
onLoad: onLoad,
|
|
108
110
|
onError: onError
|
|
109
111
|
});
|