@zohodesk/dot 1.0.0-temp-232 → 1.0.0-temp-230.4
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 +14 -2
- package/es/ActionButton/__tests__/ActionButton.spec.js +5 -4
- package/es/AttachmentViewer/AttachmentImage.js +3 -1
- package/es/AttachmentViewer/AttachmentViewer.js +340 -265
- 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 +7 -6
- package/es/AudioPlayer/utils/utils.js +5 -2
- package/es/DotProvider/hooks/useDotProvider.js +15 -14
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +16 -21
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +4 -3
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +5 -4
- package/es/DotProvider/utils/errorValidation.js +6 -5
- package/es/DotProvider/utils/getAssetsImportPromises.js +5 -4
- package/es/Drawer/Drawer.js +8 -6
- package/es/FreezeLayer/css/cssJSLogic.js +5 -4
- package/es/Hooks/Dragger/useDragger.js +6 -5
- package/es/Hooks/Dragger/utils/DraggerUtil.js +8 -7
- package/es/Hooks/useFreezeLayer.js +5 -4
- package/es/Link/Link.js +4 -3
- package/es/Link/props/propTypes.js +1 -0
- package/es/Onboarding/CarouselDots/CarouselDots.js +32 -29
- package/es/Onboarding/Onboarding.js +24 -23
- package/es/Onboarding/hooks/useOnboarding.js +5 -4
- package/es/Onboarding/hooks/useOnboardingSlider.js +6 -5
- package/es/deprecated/SelectDropdown/SelectDropdown.js +47 -43
- package/es/dropdown/ToggleDropDown/ToggleDropDown.js +225 -214
- package/es/errorstate/Inconvenience/Inconvenience.js +36 -32
- package/es/errorstate/NoRequestFound/NoRequestFound.js +36 -32
- package/es/errorstate/PermissionPlay/PermissionPlay.js +35 -31
- package/es/errorstate/RequestUrlNotFound/RequestUrlNotFound.js +36 -32
- package/es/errorstate/UnableToProcess/UnableToProcess.js +36 -32
- package/es/errorstate/UnauthorizedLogin/UnauthorizedLogin.js +36 -32
- package/es/errorstate/WillBack/WillBack.js +34 -30
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +85 -81
- package/es/list/status/StatusDropdown/StatusDropdown.js +113 -109
- package/es/list/status/StatusDropdown/__tests__/StatusDropdown.spec.js +4 -3
- package/es/lookup/header/Search/Search.js +5 -4
- package/es/lookup/header/Search/__tests__/Search.spec.js +4 -3
- package/es/lookup/header/ViewDropDown/ViewDropDown.js +75 -67
- package/es/utils/General.js +7 -2
- package/es/utils/editorUtils.js +5 -1
- package/es/version2/lookup/AlertHeader/AlertHeader.js +3 -5
- package/es/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +0 -24
- package/es/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +0 -34
- package/es/version2/lookup/AlertHeader/css/cssJSLogic.js +5 -4
- package/es/version2/lookup/AlertHeader/props/propTypes.js +1 -2
- package/es/version2/notification/DesktopNotification/DesktopNotification.js +63 -59
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.js +44 -40
- package/lib/AttachmentViewer/AttachmentImage.js +3 -1
- package/lib/AttachmentViewer/AttachmentViewer.js +164 -97
- 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/hooks/useDownloadAssetsAndSetAttr.js +3 -9
- package/lib/Link/Link.js +4 -3
- package/lib/Link/props/propTypes.js +1 -0
- package/lib/version2/lookup/AlertHeader/AlertHeader.js +2 -5
- package/lib/version2/lookup/AlertHeader/__tests__/AlertHeader.spec.js +0 -26
- package/lib/version2/lookup/AlertHeader/__tests__/__snapshots__/AlertHeader.spec.js.snap +0 -34
- package/lib/version2/lookup/AlertHeader/props/propTypes.js +1 -2
- package/package.json +5 -5
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.AttachmentViewer_defaultProps = exports.AttachmentImage_defaultProps = void 0;
|
|
7
|
+
|
|
8
|
+
var _General = require("../../utils/General");
|
|
9
|
+
|
|
7
10
|
var AttachmentImage_defaultProps = {
|
|
8
11
|
dataId: 'AttachmentImage',
|
|
9
12
|
customClass: {
|
|
@@ -18,7 +21,8 @@ var AttachmentViewer_defaultProps = {
|
|
|
18
21
|
maintainZoom: false,
|
|
19
22
|
isActive: false,
|
|
20
23
|
dataId: 'AttachmentViewer',
|
|
21
|
-
i18nKeys:
|
|
22
|
-
customProps:
|
|
24
|
+
i18nKeys: _General.DUMMY_OBJECT,
|
|
25
|
+
customProps: _General.DUMMY_OBJECT,
|
|
26
|
+
hasCount: true
|
|
23
27
|
};
|
|
24
28
|
exports.AttachmentViewer_defaultProps = AttachmentViewer_defaultProps;
|
|
@@ -13,6 +13,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
13
13
|
|
|
14
14
|
var AttachmentImage_propTypes = {
|
|
15
15
|
alt: _propTypes["default"].string,
|
|
16
|
+
imageRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].shape({
|
|
17
|
+
current: _propTypes["default"].any
|
|
18
|
+
})]),
|
|
16
19
|
customClass: _propTypes["default"].shape({
|
|
17
20
|
customImageClass: _propTypes["default"].string,
|
|
18
21
|
customChildrenClass: _propTypes["default"].string
|
|
@@ -41,7 +44,7 @@ var AttachmentViewer_propTypes = {
|
|
|
41
44
|
showText: _propTypes["default"].string,
|
|
42
45
|
previewUnsupportedText: _propTypes["default"].string
|
|
43
46
|
}),
|
|
44
|
-
needDownload: _propTypes["default"].
|
|
47
|
+
needDownload: _propTypes["default"].bool,
|
|
45
48
|
previewObj: _propTypes["default"].object,
|
|
46
49
|
responsiveId: _propTypes["default"].string,
|
|
47
50
|
maintainZoom: _propTypes["default"].bool,
|
|
@@ -54,8 +57,12 @@ var AttachmentViewer_propTypes = {
|
|
|
54
57
|
document: _propTypes["default"].arrayOf(_propTypes["default"].string)
|
|
55
58
|
}),
|
|
56
59
|
renderUnSupportedElement: _propTypes["default"].func,
|
|
60
|
+
renderCustomImagePreviewElement: _propTypes["default"].func,
|
|
57
61
|
customProps: _propTypes["default"].shape({
|
|
58
62
|
avatarProps: _propTypes["default"].exact(_propTypes2.propTypes)
|
|
59
|
-
})
|
|
63
|
+
}),
|
|
64
|
+
hasCount: _propTypes["default"].bool,
|
|
65
|
+
renderCustomIcons: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node]),
|
|
66
|
+
onSelectedAttachmentChange: _propTypes["default"].func
|
|
60
67
|
};
|
|
61
68
|
exports.AttachmentViewer_propTypes = AttachmentViewer_propTypes;
|
|
@@ -106,10 +106,7 @@ function useDownloadAssetsAndSetAttr(_ref) {
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
function setZoomSizeAttribute() {
|
|
109
|
-
|
|
110
|
-
var varLower = String(zoomUnitVariable).toLowerCase();
|
|
111
|
-
|
|
112
|
-
if (!needZoom || zoomLower === 'none' || zoomLower === 'unset' || varLower === 'none' || varLower === 'unset') {
|
|
109
|
+
if (!needZoom) {
|
|
113
110
|
return;
|
|
114
111
|
}
|
|
115
112
|
|
|
@@ -125,10 +122,7 @@ function useDownloadAssetsAndSetAttr(_ref) {
|
|
|
125
122
|
}
|
|
126
123
|
|
|
127
124
|
function setFontSizeAttribute() {
|
|
128
|
-
|
|
129
|
-
var varLower = String(fontUnitVariable).toLowerCase();
|
|
130
|
-
|
|
131
|
-
if (!needFont || fontLower === 'none' || fontLower === 'unset' || varLower === 'none' || varLower === 'unset') {
|
|
125
|
+
if (!needFont) {
|
|
132
126
|
return;
|
|
133
127
|
}
|
|
134
128
|
|
|
@@ -148,7 +142,7 @@ function useDownloadAssetsAndSetAttr(_ref) {
|
|
|
148
142
|
}, [themeAppearanceAttr, themeColorAttr, themeAppearance, themeColor, getProviderElement, needTheme]);
|
|
149
143
|
(0, _react.useLayoutEffect)(function () {
|
|
150
144
|
setZoomSizeAttribute();
|
|
151
|
-
}, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom
|
|
145
|
+
}, [zoomUnitVariable, modifiedZoomUnitWithSuffix, zoomSizePromise, getProviderElement, needZoom]);
|
|
152
146
|
(0, _react.useLayoutEffect)(function () {
|
|
153
147
|
setFontSizeAttribute();
|
|
154
148
|
}, [fontUnitVariable, baseFontUnit, fontSizePromise, getProviderElement, needFont]);
|
package/lib/Link/Link.js
CHANGED
|
@@ -110,7 +110,8 @@ var Link = /*#__PURE__*/function (_React$Component) {
|
|
|
110
110
|
rel = _this$props2.rel,
|
|
111
111
|
dataId = _this$props2.dataId,
|
|
112
112
|
customProps = _this$props2.customProps,
|
|
113
|
-
ariaLabel = _this$props2.ariaLabel
|
|
113
|
+
ariaLabel = _this$props2.ariaLabel,
|
|
114
|
+
downloadName = _this$props2.downloadName;
|
|
114
115
|
var _this$context$options = this.context.options,
|
|
115
116
|
isLink = _this$context$options.isLink,
|
|
116
117
|
constructURL = _this$context$options.constructURL;
|
|
@@ -118,10 +119,10 @@ var Link = /*#__PURE__*/function (_React$Component) {
|
|
|
118
119
|
var option = {};
|
|
119
120
|
|
|
120
121
|
if (download) {
|
|
121
|
-
option.download = true;
|
|
122
|
+
option.download = downloadName || true;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
var ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
125
|
+
var ignoreKeys = ['children', 'href', 'target', 'urlData', 'urlName', 'className', 'title', 'download', 'downloadName', 'rel', 'dataId', 'hasReload', 'customProps', 'option', 'ariaLabel'];
|
|
125
126
|
var others = Object.keys(this.props).filter(function (key) {
|
|
126
127
|
return ignoreKeys.indexOf(key) == -1;
|
|
127
128
|
}).reduce(function (res, key) {
|
|
@@ -23,6 +23,7 @@ var propTypes = {
|
|
|
23
23
|
customProps: _propTypes["default"].object,
|
|
24
24
|
onClick: _propTypes["default"].func,
|
|
25
25
|
download: _propTypes["default"].bool,
|
|
26
|
+
downloadName: _propTypes["default"].string,
|
|
26
27
|
ariaLabel: _propTypes["default"].string,
|
|
27
28
|
key: _propTypes["default"].string
|
|
28
29
|
};
|
|
@@ -15,8 +15,6 @@ var _AlertClose = _interopRequireDefault(require("../../AlertClose/AlertClose"))
|
|
|
15
15
|
|
|
16
16
|
var _AlertIcons = _interopRequireDefault(require("../../alertIcons/AlertIcons"));
|
|
17
17
|
|
|
18
|
-
var _renderNode = _interopRequireDefault(require("@zohodesk/utils/es/renderNode"));
|
|
19
|
-
|
|
20
18
|
var _AlertHeaderNewModule = _interopRequireDefault(require("./css/AlertHeaderNew.module.css"));
|
|
21
19
|
|
|
22
20
|
var _cssJSLogic2 = _interopRequireDefault(require("./css/cssJSLogic"));
|
|
@@ -50,8 +48,7 @@ function AlertHeader(props) {
|
|
|
50
48
|
type = props.type,
|
|
51
49
|
htmlId = props.htmlId,
|
|
52
50
|
customStyle = props.customStyle,
|
|
53
|
-
dragBoundaryLimit = props.dragBoundaryLimit
|
|
54
|
-
renderAlertIcon = props.renderAlertIcon;
|
|
51
|
+
dragBoundaryLimit = props.dragBoundaryLimit;
|
|
55
52
|
var finalStyle = (0, _utils.mergeStyle)(_AlertHeaderNewModule["default"], customStyle);
|
|
56
53
|
|
|
57
54
|
var _cssJSLogic = (0, _cssJSLogic2["default"])({
|
|
@@ -78,7 +75,7 @@ function AlertHeader(props) {
|
|
|
78
75
|
eleRef: dragRef
|
|
79
76
|
}, needIcon && /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
77
|
className: finalStyle.iconContainer
|
|
81
|
-
},
|
|
78
|
+
}, /*#__PURE__*/_react["default"].createElement(_AlertIcons["default"], {
|
|
82
79
|
type: type
|
|
83
80
|
})), (title || children) && /*#__PURE__*/_react["default"].createElement(_Layout.Box, {
|
|
84
81
|
flexible: true
|
|
@@ -15,30 +15,4 @@ describe('AlertHeader', function () {
|
|
|
15
15
|
|
|
16
16
|
expect(asFragment()).toMatchSnapshot();
|
|
17
17
|
});
|
|
18
|
-
test('renders custom renderAlertIcon when needIcon is true', function () {
|
|
19
|
-
var customIcon = /*#__PURE__*/_react["default"].createElement("span", {
|
|
20
|
-
"data-test-id": "custom-icon"
|
|
21
|
-
}, "icon");
|
|
22
|
-
|
|
23
|
-
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AlertHeader["default"], {
|
|
24
|
-
needIcon: true,
|
|
25
|
-
renderAlertIcon: customIcon
|
|
26
|
-
})),
|
|
27
|
-
asFragment = _render2.asFragment;
|
|
28
|
-
|
|
29
|
-
expect(asFragment()).toMatchSnapshot();
|
|
30
|
-
});
|
|
31
|
-
test('does not render custom renderAlertIcon when needIcon is false', function () {
|
|
32
|
-
var customIcon = /*#__PURE__*/_react["default"].createElement("span", {
|
|
33
|
-
"data-test-id": "custom-icon"
|
|
34
|
-
}, "icon");
|
|
35
|
-
|
|
36
|
-
var _render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_AlertHeader["default"], {
|
|
37
|
-
needIcon: false,
|
|
38
|
-
renderAlertIcon: customIcon
|
|
39
|
-
})),
|
|
40
|
-
asFragment = _render3.asFragment;
|
|
41
|
-
|
|
42
|
-
expect(asFragment()).toMatchSnapshot();
|
|
43
|
-
});
|
|
44
18
|
});
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`AlertHeader does not render custom renderAlertIcon when needIcon is false 1`] = `
|
|
4
|
-
<DocumentFragment>
|
|
5
|
-
<div
|
|
6
|
-
class="container danger flex rowdir wrap vCenter"
|
|
7
|
-
data-drag-hook="true"
|
|
8
|
-
data-id="containerComponent"
|
|
9
|
-
data-selector-id="container"
|
|
10
|
-
data-test-id="containerComponent"
|
|
11
|
-
/>
|
|
12
|
-
</DocumentFragment>
|
|
13
|
-
`;
|
|
14
|
-
|
|
15
3
|
exports[`AlertHeader rendering the defult props 1`] = `
|
|
16
4
|
<DocumentFragment>
|
|
17
5
|
<div
|
|
@@ -98,25 +86,3 @@ exports[`AlertHeader rendering the defult props 1`] = `
|
|
|
98
86
|
</div>
|
|
99
87
|
</DocumentFragment>
|
|
100
88
|
`;
|
|
101
|
-
|
|
102
|
-
exports[`AlertHeader renders custom renderAlertIcon when needIcon is true 1`] = `
|
|
103
|
-
<DocumentFragment>
|
|
104
|
-
<div
|
|
105
|
-
class="container danger flex rowdir wrap vCenter"
|
|
106
|
-
data-drag-hook="true"
|
|
107
|
-
data-id="containerComponent"
|
|
108
|
-
data-selector-id="container"
|
|
109
|
-
data-test-id="containerComponent"
|
|
110
|
-
>
|
|
111
|
-
<div
|
|
112
|
-
class="iconContainer"
|
|
113
|
-
>
|
|
114
|
-
<span
|
|
115
|
-
data-test-id="custom-icon"
|
|
116
|
-
>
|
|
117
|
-
icon
|
|
118
|
-
</span>
|
|
119
|
-
</div>
|
|
120
|
-
</div>
|
|
121
|
-
</DocumentFragment>
|
|
122
|
-
`;
|
|
@@ -25,7 +25,6 @@ var _default = {
|
|
|
25
25
|
left: _propTypes["default"].number,
|
|
26
26
|
right: _propTypes["default"].number,
|
|
27
27
|
bottom: _propTypes["default"].number
|
|
28
|
-
})
|
|
29
|
-
renderAlertIcon: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].node])
|
|
28
|
+
})
|
|
30
29
|
};
|
|
31
30
|
exports["default"] = _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/dot",
|
|
3
|
-
"version": "1.0.0-temp-
|
|
3
|
+
"version": "1.0.0-temp-230.4",
|
|
4
4
|
"main": "lib/index",
|
|
5
5
|
"module": "es/index.js",
|
|
6
6
|
"private": false,
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"snap-update": "npm run test-clean && npm run test -- -u",
|
|
35
35
|
"sstest": "react-cli sstest",
|
|
36
36
|
"common_package_build": "cd ../common && npm run build && cd ../dot",
|
|
37
|
-
"prepublishOnly": "node ../prePublish.js && npm run
|
|
37
|
+
"prepublishOnly": "node ../prePublish.js && npm run css:review && npm run review:props",
|
|
38
38
|
"postpublish": "node ../postPublish.js",
|
|
39
39
|
"test-clean": "react-cli clean ./coverage && react-cli clean ./unittest react-cli clean ./es && react-cli clean ./lib && react-cli clean ./package-lock.json && react-cli clean ./result.json",
|
|
40
40
|
"download": "npm run downloadOnly && cd ../ && npm run download",
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"@zohodesk-private/node-plugins": "1.1.14",
|
|
71
71
|
"@zohodesk-private/react-prop-validator": "1.2.3",
|
|
72
72
|
"@zohodesk/a11y": "2.3.9",
|
|
73
|
-
"@zohodesk/client_build_tool": "0.0.
|
|
74
|
-
"@zohodesk/components": "1.
|
|
73
|
+
"@zohodesk/client_build_tool": "0.0.20",
|
|
74
|
+
"@zohodesk/components": "1.6.13",
|
|
75
75
|
"@zohodesk/dotkit": "1.0.9",
|
|
76
76
|
"@zohodesk/hooks": "2.0.8",
|
|
77
77
|
"@zohodesk/icons": "1.3.3",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"peerDependencies": {
|
|
90
90
|
"velocity-react": "1.4.3",
|
|
91
91
|
"@zohodesk/variables": "1.3.1",
|
|
92
|
-
"@zohodesk/components": "1.
|
|
92
|
+
"@zohodesk/components": "1.6.13",
|
|
93
93
|
"@zohodesk/icons": "1.3.3",
|
|
94
94
|
"@zohodesk/svg": "1.3.5",
|
|
95
95
|
"@zohodesk/virtualizer": "1.0.13",
|