@zohodesk/dot 1.0.0-temp-200.1 → 1.0.0-temp-187.3
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/propValidation_report.html +1 -1
- package/README.md +0 -4
- package/es/Attachment/Attachment.js +1 -2
- package/es/Attachment/Attachment.module.css +3 -7
- package/es/AttachmentViewer/Attachment.js +1 -60
- package/es/AttachmentViewer/AttachmentViewer.js +14 -148
- package/es/AttachmentViewer/AttachmentViewer.module.css +4 -124
- package/es/common/dot_common.module.css +2 -37
- package/es/form/fields/TagsMultiSelect/TagsMultiSelect.js +4 -2
- package/es/list/DepartmentDropDown/DepartmentDropDown.js +7 -2
- package/es/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/es/list/DepartmentDropDown/props/propTypes.js +2 -1
- package/es/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/es/lookup/header/Search/LookupSearch.module.css +27 -33
- package/es/lookup/header/Search/Search.js +40 -58
- package/es/lookup/header/Search/__tests__/Search.spec.js +1 -67
- package/es/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +3 -316
- package/es/lookup/header/Search/props/defaultProps.js +1 -3
- package/es/lookup/header/Search/props/propTypes.js +1 -6
- package/lib/Attachment/Attachment.js +1 -3
- package/lib/Attachment/Attachment.module.css +3 -7
- package/lib/AttachmentViewer/Attachment.js +1 -88
- package/lib/AttachmentViewer/AttachmentViewer.js +15 -148
- package/lib/AttachmentViewer/AttachmentViewer.module.css +4 -124
- package/lib/common/dot_common.module.css +2 -37
- package/lib/form/fields/TagsMultiSelect/TagsMultiSelect.js +5 -3
- package/lib/list/DepartmentDropDown/DepartmentDropDown.js +8 -3
- package/lib/list/DepartmentDropDown/props/defaultProps.js +2 -1
- package/lib/list/DepartmentDropDown/props/propTypes.js +1 -1
- package/lib/list/status/StatusListItem/StatusListItem.module.css +35 -5
- package/lib/lookup/header/Search/LookupSearch.module.css +27 -33
- package/lib/lookup/header/Search/Search.js +66 -76
- package/lib/lookup/header/Search/__tests__/Search.spec.js +0 -65
- package/lib/lookup/header/Search/__tests__/__snapshots__/Search.spec.js.snap +3 -316
- package/lib/lookup/header/Search/props/defaultProps.js +1 -3
- package/lib/lookup/header/Search/props/propTypes.js +1 -6
- package/package.json +4 -4
- package/result.json +1 -1
- package/unittest/index.html +1 -1
- /package/images/{audio_thumbnail_old.png → audio_thumbnail.png} +0 -0
|
@@ -1,196 +1,13 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`Search rendering the customized style search 1`] = `
|
|
4
|
-
<DocumentFragment>
|
|
5
|
-
<div
|
|
6
|
-
class="wrapper searchWrapperClass borderType
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
flex rowdir vCenter"
|
|
10
|
-
data-id="containerComponent"
|
|
11
|
-
data-selector-id="container"
|
|
12
|
-
data-test-id="containerComponent"
|
|
13
|
-
>
|
|
14
|
-
<div
|
|
15
|
-
class="grow basis shrinkOff"
|
|
16
|
-
data-id="boxComponent"
|
|
17
|
-
data-selector-id="box"
|
|
18
|
-
data-test-id="boxComponent"
|
|
19
|
-
>
|
|
20
|
-
<div
|
|
21
|
-
class="container effect flex rowdir"
|
|
22
|
-
data-id="containerComponent"
|
|
23
|
-
data-selector-id="textBoxIcon"
|
|
24
|
-
data-test-id="containerComponent"
|
|
25
|
-
>
|
|
26
|
-
<div
|
|
27
|
-
class="grow basis shrinkOff"
|
|
28
|
-
data-id="boxComponent"
|
|
29
|
-
data-selector-id="box"
|
|
30
|
-
data-test-id="boxComponent"
|
|
31
|
-
>
|
|
32
|
-
<input
|
|
33
|
-
class=" container small default effect borderColor_default "
|
|
34
|
-
data-a11y-autofocus="true"
|
|
35
|
-
data-id="textBoxIcon"
|
|
36
|
-
data-selector-id="textBoxIcon"
|
|
37
|
-
data-test-id="textBoxIcon"
|
|
38
|
-
maxlength="250"
|
|
39
|
-
type="text"
|
|
40
|
-
value=""
|
|
41
|
-
/>
|
|
42
|
-
</div>
|
|
43
|
-
<div
|
|
44
|
-
class="iconContainer shrinkOff"
|
|
45
|
-
data-id="boxComponent"
|
|
46
|
-
data-selector-id="box"
|
|
47
|
-
data-test-id="boxComponent"
|
|
48
|
-
>
|
|
49
|
-
<div
|
|
50
|
-
class="flex cover rowdir"
|
|
51
|
-
data-id="containerComponent"
|
|
52
|
-
data-selector-id="container"
|
|
53
|
-
data-test-id="containerComponent"
|
|
54
|
-
/>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</DocumentFragment>
|
|
60
|
-
`;
|
|
61
|
-
|
|
62
3
|
exports[`Search rendering the defult props 1`] = `
|
|
63
4
|
<DocumentFragment>
|
|
64
5
|
<div
|
|
65
|
-
class="
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
flex rowdir vCenter"
|
|
69
|
-
data-id="containerComponent"
|
|
70
|
-
data-selector-id="container"
|
|
71
|
-
data-test-id="containerComponent"
|
|
72
|
-
>
|
|
73
|
-
<div
|
|
74
|
-
class="grow basis shrinkOff"
|
|
75
|
-
data-id="boxComponent"
|
|
76
|
-
data-selector-id="box"
|
|
77
|
-
data-test-id="boxComponent"
|
|
78
|
-
>
|
|
79
|
-
<div
|
|
80
|
-
class="container effect flex rowdir"
|
|
81
|
-
data-id="containerComponent"
|
|
82
|
-
data-selector-id="textBoxIcon"
|
|
83
|
-
data-test-id="containerComponent"
|
|
84
|
-
>
|
|
85
|
-
<div
|
|
86
|
-
class="grow basis shrinkOff"
|
|
87
|
-
data-id="boxComponent"
|
|
88
|
-
data-selector-id="box"
|
|
89
|
-
data-test-id="boxComponent"
|
|
90
|
-
>
|
|
91
|
-
<input
|
|
92
|
-
class=" container small default effect borderColor_default "
|
|
93
|
-
data-a11y-autofocus="true"
|
|
94
|
-
data-id="textBoxIcon"
|
|
95
|
-
data-selector-id="textBoxIcon"
|
|
96
|
-
data-test-id="textBoxIcon"
|
|
97
|
-
maxlength="250"
|
|
98
|
-
type="text"
|
|
99
|
-
value=""
|
|
100
|
-
/>
|
|
101
|
-
</div>
|
|
102
|
-
<div
|
|
103
|
-
class="iconContainer shrinkOff"
|
|
104
|
-
data-id="boxComponent"
|
|
105
|
-
data-selector-id="box"
|
|
106
|
-
data-test-id="boxComponent"
|
|
107
|
-
>
|
|
108
|
-
<div
|
|
109
|
-
class="flex cover rowdir"
|
|
110
|
-
data-id="containerComponent"
|
|
111
|
-
data-selector-id="container"
|
|
112
|
-
data-test-id="containerComponent"
|
|
113
|
-
/>
|
|
114
|
-
</div>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</DocumentFragment>
|
|
119
|
-
`;
|
|
120
|
-
|
|
121
|
-
exports[`Search rendering the prop hasSeparator is false 1`] = `
|
|
122
|
-
<DocumentFragment>
|
|
123
|
-
<div
|
|
124
|
-
class="wrapper borderType
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
flex rowdir vCenter"
|
|
128
|
-
data-id="containerComponent"
|
|
129
|
-
data-selector-id="container"
|
|
130
|
-
data-test-id="containerComponent"
|
|
131
|
-
>
|
|
132
|
-
<div
|
|
133
|
-
class="grow basis shrinkOff"
|
|
134
|
-
data-id="boxComponent"
|
|
135
|
-
data-selector-id="box"
|
|
136
|
-
data-test-id="boxComponent"
|
|
137
|
-
>
|
|
138
|
-
<div
|
|
139
|
-
class="container effect flex rowdir"
|
|
140
|
-
data-id="containerComponent"
|
|
141
|
-
data-selector-id="textBoxIcon"
|
|
142
|
-
data-test-id="containerComponent"
|
|
143
|
-
>
|
|
144
|
-
<div
|
|
145
|
-
class="grow basis shrinkOff"
|
|
146
|
-
data-id="boxComponent"
|
|
147
|
-
data-selector-id="box"
|
|
148
|
-
data-test-id="boxComponent"
|
|
149
|
-
>
|
|
150
|
-
<input
|
|
151
|
-
class=" container small default effect borderColor_default "
|
|
152
|
-
data-a11y-autofocus="true"
|
|
153
|
-
data-id="textBoxIcon"
|
|
154
|
-
data-selector-id="textBoxIcon"
|
|
155
|
-
data-test-id="textBoxIcon"
|
|
156
|
-
maxlength="250"
|
|
157
|
-
type="text"
|
|
158
|
-
value=""
|
|
159
|
-
/>
|
|
160
|
-
</div>
|
|
161
|
-
<div
|
|
162
|
-
class="iconContainer shrinkOff"
|
|
163
|
-
data-id="boxComponent"
|
|
164
|
-
data-selector-id="box"
|
|
165
|
-
data-test-id="boxComponent"
|
|
166
|
-
>
|
|
167
|
-
<div
|
|
168
|
-
class="flex cover rowdir"
|
|
169
|
-
data-id="containerComponent"
|
|
170
|
-
data-selector-id="container"
|
|
171
|
-
data-test-id="containerComponent"
|
|
172
|
-
/>
|
|
173
|
-
</div>
|
|
174
|
-
</div>
|
|
175
|
-
</div>
|
|
176
|
-
</div>
|
|
177
|
-
</DocumentFragment>
|
|
178
|
-
`;
|
|
179
|
-
|
|
180
|
-
exports[`Search rendering the prop hasSeparator is true 1`] = `
|
|
181
|
-
<DocumentFragment>
|
|
182
|
-
<div
|
|
183
|
-
class="wrapper borderType
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
flex rowdir vCenter"
|
|
6
|
+
class="searchStyle flex rowdir vCenter"
|
|
187
7
|
data-id="containerComponent"
|
|
188
8
|
data-selector-id="container"
|
|
189
9
|
data-test-id="containerComponent"
|
|
190
10
|
>
|
|
191
|
-
<div
|
|
192
|
-
class="separator"
|
|
193
|
-
/>
|
|
194
11
|
<div
|
|
195
12
|
class="grow basis shrinkOff"
|
|
196
13
|
data-id="boxComponent"
|
|
@@ -233,139 +50,9 @@ exports[`Search rendering the prop hasSeparator is true 1`] = `
|
|
|
233
50
|
data-test-id="containerComponent"
|
|
234
51
|
/>
|
|
235
52
|
</div>
|
|
236
|
-
</div>
|
|
237
|
-
</div>
|
|
238
|
-
</div>
|
|
239
|
-
</DocumentFragment>
|
|
240
|
-
`;
|
|
241
|
-
|
|
242
|
-
exports[`Search rendering the renderChildren props via function 1`] = `
|
|
243
|
-
<DocumentFragment>
|
|
244
|
-
<div
|
|
245
|
-
class="wrapper"
|
|
246
|
-
data-selector-id="toggleDropdown"
|
|
247
|
-
>
|
|
248
|
-
<div
|
|
249
|
-
class="flex rowdir vCenter"
|
|
250
|
-
data-id="containerComponent"
|
|
251
|
-
data-selector-id="container"
|
|
252
|
-
data-test-id="containerComponent"
|
|
253
|
-
>
|
|
254
|
-
<div
|
|
255
|
-
class="wrapper borderType
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
flex rowdir vCenter"
|
|
259
|
-
data-id="containerComponent"
|
|
260
|
-
data-selector-id="container"
|
|
261
|
-
data-test-id="containerComponent"
|
|
262
|
-
>
|
|
263
|
-
<div>
|
|
264
|
-
All Fields
|
|
265
|
-
</div>
|
|
266
53
|
<div
|
|
267
|
-
class="
|
|
268
|
-
|
|
269
|
-
data-selector-id="box"
|
|
270
|
-
data-test-id="boxComponent"
|
|
271
|
-
>
|
|
272
|
-
<div
|
|
273
|
-
class="container effect flex rowdir"
|
|
274
|
-
data-id="containerComponent"
|
|
275
|
-
data-selector-id="textBoxIcon"
|
|
276
|
-
data-test-id="containerComponent"
|
|
277
|
-
>
|
|
278
|
-
<div
|
|
279
|
-
class="grow basis shrinkOff"
|
|
280
|
-
data-id="boxComponent"
|
|
281
|
-
data-selector-id="box"
|
|
282
|
-
data-test-id="boxComponent"
|
|
283
|
-
>
|
|
284
|
-
<input
|
|
285
|
-
class=" container small default effect borderColor_default "
|
|
286
|
-
data-a11y-autofocus="true"
|
|
287
|
-
data-id="textBoxIcon"
|
|
288
|
-
data-selector-id="textBoxIcon"
|
|
289
|
-
data-test-id="textBoxIcon"
|
|
290
|
-
maxlength="250"
|
|
291
|
-
type="text"
|
|
292
|
-
value=""
|
|
293
|
-
/>
|
|
294
|
-
</div>
|
|
295
|
-
<div
|
|
296
|
-
class="iconContainer shrinkOff"
|
|
297
|
-
data-id="boxComponent"
|
|
298
|
-
data-selector-id="box"
|
|
299
|
-
data-test-id="boxComponent"
|
|
300
|
-
>
|
|
301
|
-
<div
|
|
302
|
-
class="flex cover rowdir"
|
|
303
|
-
data-id="containerComponent"
|
|
304
|
-
data-selector-id="container"
|
|
305
|
-
data-test-id="containerComponent"
|
|
306
|
-
/>
|
|
307
|
-
</div>
|
|
308
|
-
</div>
|
|
309
|
-
</div>
|
|
310
|
-
</div>
|
|
311
|
-
</div>
|
|
312
|
-
</div>
|
|
313
|
-
</DocumentFragment>
|
|
314
|
-
`;
|
|
315
|
-
|
|
316
|
-
exports[`Search rendering the search active 1`] = `
|
|
317
|
-
<DocumentFragment>
|
|
318
|
-
<div
|
|
319
|
-
class="wrapper borderType
|
|
320
|
-
active
|
|
321
|
-
focusWidth
|
|
322
|
-
flex rowdir vCenter"
|
|
323
|
-
data-id="containerComponent"
|
|
324
|
-
data-selector-id="container"
|
|
325
|
-
data-test-id="containerComponent"
|
|
326
|
-
>
|
|
327
|
-
<div
|
|
328
|
-
class="grow basis shrinkOff"
|
|
329
|
-
data-id="boxComponent"
|
|
330
|
-
data-selector-id="box"
|
|
331
|
-
data-test-id="boxComponent"
|
|
332
|
-
>
|
|
333
|
-
<div
|
|
334
|
-
class="container effect effectFocused flex rowdir"
|
|
335
|
-
data-id="containerComponent"
|
|
336
|
-
data-selector-id="textBoxIcon"
|
|
337
|
-
data-test-id="containerComponent"
|
|
338
|
-
>
|
|
339
|
-
<div
|
|
340
|
-
class="grow basis shrinkOff"
|
|
341
|
-
data-id="boxComponent"
|
|
342
|
-
data-selector-id="box"
|
|
343
|
-
data-test-id="boxComponent"
|
|
344
|
-
>
|
|
345
|
-
<input
|
|
346
|
-
class=" container small default effect borderColor_default "
|
|
347
|
-
data-a11y-autofocus="true"
|
|
348
|
-
data-id="textBoxIcon"
|
|
349
|
-
data-selector-id="textBoxIcon"
|
|
350
|
-
data-test-id="textBoxIcon"
|
|
351
|
-
maxlength="250"
|
|
352
|
-
type="text"
|
|
353
|
-
value=""
|
|
354
|
-
/>
|
|
355
|
-
</div>
|
|
356
|
-
<div
|
|
357
|
-
class="iconContainer shrinkOff"
|
|
358
|
-
data-id="boxComponent"
|
|
359
|
-
data-selector-id="box"
|
|
360
|
-
data-test-id="boxComponent"
|
|
361
|
-
>
|
|
362
|
-
<div
|
|
363
|
-
class="flex cover rowdir"
|
|
364
|
-
data-id="containerComponent"
|
|
365
|
-
data-selector-id="container"
|
|
366
|
-
data-test-id="containerComponent"
|
|
367
|
-
/>
|
|
368
|
-
</div>
|
|
54
|
+
class="line borderColor_default "
|
|
55
|
+
/>
|
|
369
56
|
</div>
|
|
370
57
|
</div>
|
|
371
58
|
</div>
|
|
@@ -6,7 +6,6 @@ export const Search_propTypes = {
|
|
|
6
6
|
onSelect: PropTypes.func,
|
|
7
7
|
options: PropTypes.array,
|
|
8
8
|
selectedId: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
9
|
-
renderChildren: PropTypes.func,
|
|
10
9
|
value: PropTypes.string
|
|
11
10
|
};
|
|
12
11
|
export const SearchUI_propTypes = {
|
|
@@ -25,9 +24,5 @@ export const SearchUI_propTypes = {
|
|
|
25
24
|
options: PropTypes.array,
|
|
26
25
|
placeHolder: PropTypes.string,
|
|
27
26
|
searchStr: PropTypes.string,
|
|
28
|
-
title: PropTypes.string
|
|
29
|
-
isActive: PropTypes.bool,
|
|
30
|
-
hasSeparator: PropTypes.bool,
|
|
31
|
-
renderChildren: PropTypes.func,
|
|
32
|
-
customStyle: PropTypes.object
|
|
27
|
+
title: PropTypes.string
|
|
33
28
|
};
|
|
@@ -70,9 +70,7 @@ var Attachment = /*#__PURE__*/function (_React$Component) {
|
|
|
70
70
|
fileInfo = _this$props.fileInfo,
|
|
71
71
|
i18nKeys = _this$props.i18nKeys,
|
|
72
72
|
dataSelectorId = _this$props.dataSelectorId,
|
|
73
|
-
isDisabled = _this$props.isDisabled
|
|
74
|
-
_this$props$iconPalet = _this$props.iconPalette,
|
|
75
|
-
iconPalette = _this$props$iconPalet === void 0 ? "white" : _this$props$iconPalet;
|
|
73
|
+
isDisabled = _this$props.isDisabled;
|
|
76
74
|
var _i18nKeys$downloadTit = i18nKeys.downloadTitle,
|
|
77
75
|
downloadTitle = _i18nKeys$downloadTit === void 0 ? 'Download' : _i18nKeys$downloadTit;
|
|
78
76
|
return /*#__PURE__*/_react["default"].createElement(_Layout.Container, {
|
|
@@ -14,15 +14,15 @@
|
|
|
14
14
|
height: 100% ;
|
|
15
15
|
width: 100% ;
|
|
16
16
|
position: absolute;
|
|
17
|
-
top:
|
|
17
|
+
top:0
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
[dir=ltr] .disableLayer {
|
|
21
|
-
left:
|
|
21
|
+
left:0
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
[dir=rtl] .disableLayer {
|
|
25
|
-
right:
|
|
25
|
+
right:0
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.attachmentHover {
|
|
@@ -66,10 +66,6 @@
|
|
|
66
66
|
height: var(--zd_size40) ;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
.attachleft {
|
|
70
|
-
padding: var(--zd_size3) ;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
69
|
[dir=ltr] .attachleft {
|
|
74
70
|
border-right: 1px solid var(--zdt_attachment_default_border);
|
|
75
71
|
}
|
|
@@ -3,89 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.designFileTypes = designFileTypes;
|
|
7
|
-
exports.docsFileTypes = docsFileTypes;
|
|
8
6
|
exports.getExtensionFromFileName = getExtensionFromFileName;
|
|
9
7
|
exports.isAudioFile = isAudioFile;
|
|
10
8
|
exports.isBrowserSupportedFile = isBrowserSupportedFile;
|
|
11
|
-
exports.isDocsFile = isDocsFile;
|
|
12
|
-
exports.isEmailFile = isEmailFile;
|
|
13
|
-
exports.isImageFile = isImageFile;
|
|
14
|
-
exports.isPdfFile = isPdfFile;
|
|
15
|
-
exports.isSheetFile = isSheetFile;
|
|
16
|
-
exports.isShowFile = isShowFile;
|
|
17
|
-
exports.isVideoFile = isVideoFile;
|
|
18
|
-
exports.openInNewTabWithNoopener = openInNewTabWithNoopener;
|
|
19
|
-
exports.openNewTab = openNewTab;
|
|
20
|
-
exports.sheetFileTypes = sheetFileTypes;
|
|
21
|
-
exports.showFileTypes = showFileTypes;
|
|
22
|
-
exports.zipFileType = zipFileType;
|
|
23
9
|
var UNASSIGNED = 'Unassigned';
|
|
24
10
|
var BROWSER_SUPPORTED_FILES = ['pdf', 'text', 'txt', 'css', 'jpg', 'jpeg', 'gif', 'png', 'bmp', 'ico', 'sh', 'mp3', 'wav', 'ogg'];
|
|
25
11
|
|
|
26
12
|
function isAudioFile(fileName) {
|
|
27
13
|
var extension = getExtensionFromFileName(fileName);
|
|
28
|
-
return /mp3|wav|ogg
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
function isVideoFile(fileName) {
|
|
32
|
-
var extension = getExtensionFromFileName(fileName);
|
|
33
|
-
return /mp4|webm|ogg/i.test(extension);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function isPdfFile(fileName) {
|
|
37
|
-
var extension = getExtensionFromFileName(fileName);
|
|
38
|
-
return /pdf/i.test(extension);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
function isDocsFile(fileName) {
|
|
42
|
-
var extension = getExtensionFromFileName(fileName);
|
|
43
|
-
return /docx|doc|docm|rtf|odt|dot|dotm|dotx|pages/i.test(extension);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function isSheetFile(fileName) {
|
|
47
|
-
var extension = getExtensionFromFileName(fileName);
|
|
48
|
-
return /xlsx|numbers/i.test(extension);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
function isShowFile(fileName) {
|
|
52
|
-
var extension = getExtensionFromFileName(fileName);
|
|
53
|
-
return /pptx|ppt|pps|ppsx|key/i.test(extension);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
function isEmailFile(fileName) {
|
|
57
|
-
var extension = getExtensionFromFileName(fileName);
|
|
58
|
-
return /eml|msg/i.test(extension);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
function isImageFile(fileName) {
|
|
62
|
-
var extension = getExtensionFromFileName(fileName);
|
|
63
|
-
return /jpeg|jpg|png|gif|bmp|tiff|tif|ico/i.test(extension);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
function docsFileTypes(fileName) {
|
|
67
|
-
var extension = getExtensionFromFileName(fileName);
|
|
68
|
-
return /docx|doc|docm|rtf|odt|dot|dotm|dotx|sxw|odt|ott|txt|pages/i.test(extension);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
function sheetFileTypes(fileName) {
|
|
72
|
-
var extension = getExtensionFromFileName(fileName);
|
|
73
|
-
return /xls|xlsx|sxc|ods|csv|tsv|ots|xlsm|xlsb|xlt|xltx|xltm|numbers/i.test(extension);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
function showFileTypes(fileName) {
|
|
77
|
-
var extension = getExtensionFromFileName(fileName);
|
|
78
|
-
return /pptx|ppt|pps|ppsx|odp|sxi|key|pot|potx/i.test(extension);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function designFileTypes(fileName) {
|
|
82
|
-
var extension = getExtensionFromFileName(fileName);
|
|
83
|
-
return /sketch|xd|psd|ai|fig|svg/i.test(extension);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function zipFileType(fileName) {
|
|
87
|
-
var extension = getExtensionFromFileName(fileName);
|
|
88
|
-
return /zip/i.test(extension);
|
|
14
|
+
return /mp3|wav|ogg/i.test(extension);
|
|
89
15
|
}
|
|
90
16
|
|
|
91
17
|
function getExtensionFromFileName(fileName) {
|
|
@@ -99,17 +25,4 @@ function getExtensionFromFileName(fileName) {
|
|
|
99
25
|
function isBrowserSupportedFile(fileName) {
|
|
100
26
|
var extension = getExtensionFromFileName(fileName);
|
|
101
27
|
return BROWSER_SUPPORTED_FILES.indexOf(extension) !== -1;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function openInNewTabWithNoopener(url) {
|
|
105
|
-
var targetnName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '_blank';
|
|
106
|
-
var aTag = document.createElement('a');
|
|
107
|
-
aTag.rel = 'noopener noreferrer';
|
|
108
|
-
aTag.target = targetnName;
|
|
109
|
-
aTag.href = url;
|
|
110
|
-
aTag.click();
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function openNewTab(href) {
|
|
114
|
-
openInNewTabWithNoopener(href);
|
|
115
28
|
}
|