@zohodesk/dot 1.9.12 → 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 +14 -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/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/css/cssJSLogic.js +4 -5
- 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/Link/Link.js +4 -3
- package/lib/Link/props/propTypes.js +1 -0
- package/package.json +4 -4
|
@@ -113,10 +113,9 @@ export class StatusDropdown extends React.Component {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
|
|
116
|
-
responsiveFunc(
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
} = _ref;
|
|
116
|
+
responsiveFunc({
|
|
117
|
+
mediaQueryOR
|
|
118
|
+
}) {
|
|
120
119
|
return {
|
|
121
120
|
tabletMode: mediaQueryOR([{
|
|
122
121
|
maxWidth: 700
|
|
@@ -234,118 +233,115 @@ export class StatusDropdown extends React.Component {
|
|
|
234
233
|
}) : null), isPopupOpen && isEditable ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
235
234
|
query: this.responsiveFunc,
|
|
236
235
|
responsiveId: "Helmet"
|
|
237
|
-
},
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
searchValue: searchString,
|
|
270
|
-
isFetchingOptions: isFetchingOptions
|
|
271
|
-
}
|
|
236
|
+
}, ({
|
|
237
|
+
tabletMode
|
|
238
|
+
}) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
239
|
+
boxPosition: position,
|
|
240
|
+
isActive: isPopupReady,
|
|
241
|
+
onClick: removeClose,
|
|
242
|
+
size: boxSize,
|
|
243
|
+
right: right,
|
|
244
|
+
left: left,
|
|
245
|
+
top: top,
|
|
246
|
+
bottom: bottom,
|
|
247
|
+
isArrow: isArrow,
|
|
248
|
+
isAnimate: true,
|
|
249
|
+
getRef: getContainerRef,
|
|
250
|
+
customClass: {
|
|
251
|
+
customDropBoxWrap: style.dropBoxContainer,
|
|
252
|
+
customDropBox: dropBoxClass
|
|
253
|
+
},
|
|
254
|
+
needResponsive: needResponsive,
|
|
255
|
+
isResponsivePadding: true,
|
|
256
|
+
needFocusScope: true,
|
|
257
|
+
onClose: this.handleTogglePopup,
|
|
258
|
+
dataId: `${dataId}_dropbox`,
|
|
259
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
260
|
+
isRestrictScroll: isRestrictScroll,
|
|
261
|
+
positionsOffset: positionsOffset,
|
|
262
|
+
targetOffset: targetOffset,
|
|
263
|
+
customProps: {
|
|
264
|
+
focusScopeProps: {
|
|
265
|
+
loadNextOptions: getNextOptions,
|
|
266
|
+
searchValue: searchString,
|
|
267
|
+
isFetchingOptions: isFetchingOptions
|
|
272
268
|
}
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
269
|
+
}
|
|
270
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, isSearch ? /*#__PURE__*/React.createElement(Box, {
|
|
271
|
+
className: style.search
|
|
272
|
+
}, /*#__PURE__*/React.createElement(TextBoxIcon, {
|
|
273
|
+
placeHolder: placeHolderText,
|
|
274
|
+
onChange: this.handleChange,
|
|
275
|
+
value: searchString,
|
|
276
|
+
onClear: this.onSearchClear,
|
|
277
|
+
size: searchBoxSize,
|
|
278
|
+
customProps: {
|
|
279
|
+
TextBoxProps: {
|
|
280
|
+
'data-a11y-autofocus': true
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
a11y: {
|
|
284
|
+
ariaHaspopup: isSearch ? 'listbox' : 'menu',
|
|
285
|
+
ariaExpanded: isPopupReady,
|
|
286
|
+
role: 'combobox',
|
|
287
|
+
ariaActivedescendant: isPopupReady ? value : '',
|
|
288
|
+
ariaOwns: ariaTitleId
|
|
289
|
+
},
|
|
290
|
+
dataId: `${dataId}_search`
|
|
291
|
+
})) : null, title && options.length != 0 && /*#__PURE__*/React.createElement(Box, {
|
|
292
|
+
className: style.title
|
|
293
|
+
}, /*#__PURE__*/React.createElement(DropDownHeading, {
|
|
294
|
+
htmlId: ariaTitleId,
|
|
295
|
+
text: title,
|
|
296
|
+
a11y: {
|
|
297
|
+
role: 'heading'
|
|
298
|
+
}
|
|
299
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
300
|
+
scroll: "vertical",
|
|
301
|
+
flexible: true,
|
|
302
|
+
shrink: true,
|
|
303
|
+
dataId: `${dataId}_list`,
|
|
304
|
+
preventParentScroll: "vertical",
|
|
305
|
+
className: `${tabletMode ? style.responsivemaxHgt : style.maxHgt}`,
|
|
306
|
+
onScroll: this.handleScroll,
|
|
307
|
+
role: isSearch ? 'listbox' : 'menu',
|
|
308
|
+
tabindex: "-1",
|
|
309
|
+
isScrollAttribute: true
|
|
310
|
+
}, options.length != 0 && isDataLoaded ? /*#__PURE__*/React.createElement(React.Fragment, null, options.map((item, i) => {
|
|
311
|
+
const listItemText = item[keyName];
|
|
312
|
+
const isActive = value === listItemText;
|
|
313
|
+
return /*#__PURE__*/React.createElement(StatusListItem, {
|
|
314
|
+
key: i,
|
|
315
|
+
dataId: `dataid_${i}`,
|
|
316
|
+
value: listItemText,
|
|
317
|
+
id: item[idName],
|
|
318
|
+
active: isActive,
|
|
319
|
+
onClick: this.onSelect.bind(this, item),
|
|
320
|
+
index: i,
|
|
321
|
+
needTick: needTick,
|
|
322
|
+
needBorder: false,
|
|
323
|
+
bulletColor: item[statusColor],
|
|
324
|
+
title: listItemText,
|
|
325
|
+
needMultiLineText: needMultiLineText,
|
|
326
|
+
autoHover: true,
|
|
299
327
|
a11y: {
|
|
300
|
-
role: '
|
|
328
|
+
role: isSearch ? 'option' : 'menuitem',
|
|
329
|
+
ariaSelected: isActive,
|
|
330
|
+
ariaLabel: listItemText
|
|
301
331
|
}
|
|
302
|
-
})
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
const isActive = value === listItemText;
|
|
316
|
-
return /*#__PURE__*/React.createElement(StatusListItem, {
|
|
317
|
-
key: i,
|
|
318
|
-
dataId: `dataid_${i}`,
|
|
319
|
-
value: listItemText,
|
|
320
|
-
id: item[idName],
|
|
321
|
-
active: isActive,
|
|
322
|
-
onClick: this.onSelect.bind(this, item),
|
|
323
|
-
index: i,
|
|
324
|
-
needTick: needTick,
|
|
325
|
-
needBorder: false,
|
|
326
|
-
bulletColor: item[statusColor],
|
|
327
|
-
title: listItemText,
|
|
328
|
-
needMultiLineText: needMultiLineText,
|
|
329
|
-
autoHover: true,
|
|
330
|
-
a11y: {
|
|
331
|
-
role: isSearch ? 'option' : 'menuitem',
|
|
332
|
-
ariaSelected: isActive,
|
|
333
|
-
ariaLabel: listItemText
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
337
|
-
isCover: false,
|
|
338
|
-
align: "both"
|
|
339
|
-
}, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
340
|
-
className: style.svgWrapper,
|
|
341
|
-
title: searchErrorText || 'No results',
|
|
342
|
-
description: searchEmptyHint,
|
|
343
|
-
size: "small",
|
|
344
|
-
getEmptyState: this.emptySearchSVG
|
|
345
|
-
}) : /*#__PURE__*/React.createElement("div", {
|
|
346
|
-
className: style.loader
|
|
347
|
-
}, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null));
|
|
348
|
-
}) : null);
|
|
332
|
+
});
|
|
333
|
+
}), isFetchingOptions && /*#__PURE__*/React.createElement(Container, {
|
|
334
|
+
isCover: false,
|
|
335
|
+
align: "both"
|
|
336
|
+
}, /*#__PURE__*/React.createElement(Loader, null))) : isDataLoaded ? /*#__PURE__*/React.createElement(CommonEmptyState, {
|
|
337
|
+
className: style.svgWrapper,
|
|
338
|
+
title: searchErrorText || 'No results',
|
|
339
|
+
description: searchEmptyHint,
|
|
340
|
+
size: "small",
|
|
341
|
+
getEmptyState: this.emptySearchSVG
|
|
342
|
+
}) : /*#__PURE__*/React.createElement("div", {
|
|
343
|
+
className: style.loader
|
|
344
|
+
}, /*#__PURE__*/React.createElement(Loader, null))), renderFooterElement ? renderFooterElement : null))) : null);
|
|
349
345
|
}
|
|
350
346
|
|
|
351
347
|
} // if (__DOCS__) {
|
|
@@ -8,10 +8,9 @@ describe('StatusDropdown', () => {
|
|
|
8
8
|
} = render( /*#__PURE__*/React.createElement(StatusDropdown, null));
|
|
9
9
|
expect(asFragment()).toMatchSnapshot();
|
|
10
10
|
}), test('rendering target element', () => {
|
|
11
|
-
const renderTargetElement =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
} = _ref;
|
|
11
|
+
const renderTargetElement = ({
|
|
12
|
+
isPopupOpen
|
|
13
|
+
}) => {
|
|
15
14
|
return /*#__PURE__*/React.createElement("div", {
|
|
16
15
|
className: isPopupOpen ? 'popupOpened' : 'popupClosed'
|
|
17
16
|
}, "Target Element");
|
|
@@ -60,11 +60,10 @@ export default class Search extends Component {
|
|
|
60
60
|
getRef && getRef(el);
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
handleRenderChildren(
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} = _ref;
|
|
63
|
+
handleRenderChildren({
|
|
64
|
+
isActive,
|
|
65
|
+
isFocus
|
|
66
|
+
}) {
|
|
68
67
|
const {
|
|
69
68
|
value,
|
|
70
69
|
selectedId,
|
|
@@ -39,10 +39,9 @@ class DropDown extends SelectComponent {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
-
responsiveFunc(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
} = _ref;
|
|
42
|
+
responsiveFunc({
|
|
43
|
+
mediaQueryOR
|
|
44
|
+
}) {
|
|
46
45
|
return {
|
|
47
46
|
tabletMode: mediaQueryOR([{
|
|
48
47
|
maxWidth: 700
|
|
@@ -51,8 +50,6 @@ class DropDown extends SelectComponent {
|
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
render() {
|
|
54
|
-
var _this = this;
|
|
55
|
-
|
|
56
53
|
const {
|
|
57
54
|
needSearch,
|
|
58
55
|
dropBoxSize,
|
|
@@ -106,75 +103,70 @@ class DropDown extends SelectComponent {
|
|
|
106
103
|
}))), isPopupOpen ? /*#__PURE__*/React.createElement(ResponsiveReceiver, {
|
|
107
104
|
query: this.responsiveFunc,
|
|
108
105
|
responsiveId: "Helmet"
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
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
|
-
className: style.emptyState
|
|
174
|
-
}, searchEmptyMessage || emptyMessage) : /*#__PURE__*/React.createElement("div", {
|
|
175
|
-
className: style.emptyState
|
|
176
|
-
}, emptyMessage)))));
|
|
177
|
-
}) : null);
|
|
106
|
+
}, ({
|
|
107
|
+
tabletMode
|
|
108
|
+
}) => /*#__PURE__*/React.createElement(ResponsiveDropBox, {
|
|
109
|
+
isAnimate: true,
|
|
110
|
+
isArrow: false,
|
|
111
|
+
isActive: isPopupReady,
|
|
112
|
+
boxPosition: position || `${defaultDropBoxPosition}Center`,
|
|
113
|
+
getRef: getContainerRef,
|
|
114
|
+
onClick: removeClose,
|
|
115
|
+
animationStyle: animationStyle,
|
|
116
|
+
size: "large",
|
|
117
|
+
alignBox: "row",
|
|
118
|
+
isResponsivePadding: true,
|
|
119
|
+
dataId: `${dataId}_dropbox`,
|
|
120
|
+
isAbsolutePositioningNeeded: isAbsolutePositioningNeeded,
|
|
121
|
+
isRestrictScroll: isRestrictScroll,
|
|
122
|
+
positionsOffset: positionsOffset,
|
|
123
|
+
targetOffset: targetOffset
|
|
124
|
+
}, /*#__PURE__*/React.createElement(Box, {
|
|
125
|
+
flexible: true
|
|
126
|
+
}, /*#__PURE__*/React.createElement(Card, null, needSearch ? /*#__PURE__*/React.createElement(CardHeader, null, /*#__PURE__*/React.createElement(DropDownSearch, {
|
|
127
|
+
value: searchStr,
|
|
128
|
+
onChange: this.handleSearch,
|
|
129
|
+
onKeyDown: this.onSearchKeyDown,
|
|
130
|
+
getRef: this.searchInputRef,
|
|
131
|
+
size: searchBoxSize,
|
|
132
|
+
variant: searchBoxVariant,
|
|
133
|
+
placeHolder: searchBoxPlaceHolder,
|
|
134
|
+
maxLength: maxLength,
|
|
135
|
+
dataId: `${dataId}_search`
|
|
136
|
+
})) : null, /*#__PURE__*/React.createElement(CardContent, {
|
|
137
|
+
shrink: true,
|
|
138
|
+
eleRef: this.suggestionContainerRef,
|
|
139
|
+
customClass: !tabletMode && dropBoxSize ? style[dropBoxSize] : ''
|
|
140
|
+
}, suggestions.length ? /*#__PURE__*/React.createElement("div", {
|
|
141
|
+
className: style.listItemContainer,
|
|
142
|
+
"data-id": `${dataId}_Options`
|
|
143
|
+
}, suggestions.map((option = {}, index) => {
|
|
144
|
+
const {
|
|
145
|
+
id,
|
|
146
|
+
value
|
|
147
|
+
} = option;
|
|
148
|
+
return /*#__PURE__*/React.createElement(ListItem, {
|
|
149
|
+
active: id === selectedId,
|
|
150
|
+
getRef: this.suggestionItemRef,
|
|
151
|
+
highlight: hoverIndex === index ? true : false,
|
|
152
|
+
id: id,
|
|
153
|
+
key: `${id}dropDown`,
|
|
154
|
+
onClick: this.handleChange,
|
|
155
|
+
onMouseEnter: this.handleMouseEnter,
|
|
156
|
+
size: "medium",
|
|
157
|
+
value: value,
|
|
158
|
+
index: index,
|
|
159
|
+
needTick: true,
|
|
160
|
+
needBorder: false
|
|
161
|
+
});
|
|
162
|
+
})) : isFetchingOptions ? /*#__PURE__*/React.createElement(Container, {
|
|
163
|
+
align: "both",
|
|
164
|
+
className: style.loader
|
|
165
|
+
}, /*#__PURE__*/React.createElement(Loader, null)) : searchStr ? /*#__PURE__*/React.createElement("div", {
|
|
166
|
+
className: style.emptyState
|
|
167
|
+
}, searchEmptyMessage || emptyMessage) : /*#__PURE__*/React.createElement("div", {
|
|
168
|
+
className: style.emptyState
|
|
169
|
+
}, emptyMessage)))))) : null);
|
|
178
170
|
}
|
|
179
171
|
|
|
180
172
|
}
|
package/es/utils/General.js
CHANGED
|
@@ -3,9 +3,7 @@ export function stopBubbling(event) {
|
|
|
3
3
|
event.stopPropagation && event.stopPropagation();
|
|
4
4
|
event.nativeEvent && event.nativeEvent.stopImmediatePropagation && event.nativeEvent.stopImmediatePropagation();
|
|
5
5
|
}
|
|
6
|
-
export function getFullName() {
|
|
7
|
-
let firstName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
|
|
8
|
-
let lastName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
|
6
|
+
export function getFullName(firstName = '', lastName = '') {
|
|
9
7
|
let fullName = '';
|
|
10
8
|
|
|
11
9
|
if (firstName !== null && firstName !== '') {
|
|
@@ -18,10 +16,7 @@ export function getFullName() {
|
|
|
18
16
|
|
|
19
17
|
return fullName;
|
|
20
18
|
}
|
|
21
|
-
export function shallowDiff() {
|
|
22
|
-
let a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
23
|
-
let b = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
24
|
-
|
|
19
|
+
export function shallowDiff(a = {}, b = {}) {
|
|
25
20
|
for (let i in a) {
|
|
26
21
|
if (!(i in b)) {
|
|
27
22
|
return true;
|
package/es/utils/editorUtils.js
CHANGED
|
@@ -176,11 +176,7 @@ export function loadResource(url, type, id, callback) {
|
|
|
176
176
|
});
|
|
177
177
|
} // bind
|
|
178
178
|
|
|
179
|
-
export function bind() {
|
|
180
|
-
for (var _len = arguments.length, handlers = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
181
|
-
handlers[_key] = arguments[_key];
|
|
182
|
-
}
|
|
183
|
-
|
|
179
|
+
export function bind(...handlers) {
|
|
184
180
|
handlers.forEach(handler => {
|
|
185
181
|
if (__DEVELOPMENT__) {
|
|
186
182
|
if (!this[handler]) {
|
|
@@ -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) {
|