@synerise/ds-file-uploader 1.0.14 → 1.0.16

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.
Files changed (43) hide show
  1. package/CHANGELOG.md +457 -1586
  2. package/README.md +9 -9
  3. package/dist/AvatarUploader/AvatarUploader.d.ts +1 -1
  4. package/dist/AvatarUploader/AvatarUploader.d.ts.map +1 -1
  5. package/dist/AvatarUploader/AvatarUploader.js +3 -5
  6. package/dist/AvatarUploader/AvatarUploader.styles.d.ts.map +1 -1
  7. package/dist/AvatarUploader/AvatarUploader.styles.js +1 -1
  8. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.d.ts +2 -2
  9. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.d.ts.map +1 -1
  10. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.js +1 -1
  11. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.styles.d.ts.map +1 -1
  12. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.styles.js +1 -1
  13. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.types.d.ts +2 -2
  14. package/dist/AvatarUploader/FileViewAvatar/FileViewAvatar.types.d.ts.map +1 -1
  15. package/dist/FileUploader.d.ts +1 -1
  16. package/dist/FileUploader.d.ts.map +1 -1
  17. package/dist/FileUploader.js +6 -11
  18. package/dist/FileUploader.styles.d.ts +4 -4
  19. package/dist/FileUploader.styles.d.ts.map +1 -1
  20. package/dist/FileUploader.styles.js +1 -1
  21. package/dist/FileUploader.types.d.ts +2 -2
  22. package/dist/FileUploader.types.d.ts.map +1 -1
  23. package/dist/FileView/FileView.d.ts +2 -2
  24. package/dist/FileView/FileView.d.ts.map +1 -1
  25. package/dist/FileView/FileView.js +5 -5
  26. package/dist/FileView/FileView.styles.d.ts.map +1 -1
  27. package/dist/FileView/FileView.styles.js +1 -1
  28. package/dist/FileView/FileView.types.d.ts +3 -3
  29. package/dist/FileView/FileView.types.d.ts.map +1 -1
  30. package/dist/ItemUploader/ItemUploader.d.ts +1 -1
  31. package/dist/ItemUploader/ItemUploader.d.ts.map +1 -1
  32. package/dist/ItemUploader/ItemUploader.js +2 -5
  33. package/dist/ItemUploader/ItemUploader.styles.d.ts.map +1 -1
  34. package/dist/ItemUploader/ItemUploader.styles.js +1 -1
  35. package/dist/ItemUploader/UploaderButton/FileViewItem.d.ts +2 -2
  36. package/dist/ItemUploader/UploaderButton/FileViewItem.d.ts.map +1 -1
  37. package/dist/ItemUploader/UploaderButton/FileViewItem.js +1 -1
  38. package/dist/ItemUploader/UploaderButton/FileViewItem.styles.d.ts.map +1 -1
  39. package/dist/ItemUploader/UploaderButton/FileViewItem.styles.js +1 -1
  40. package/dist/index.d.ts +2 -2
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +1 -1
  43. package/package.json +10 -10
package/README.md CHANGED
@@ -58,19 +58,19 @@ import FileUploader from '@synerise/ds-file-uploader'
58
58
 
59
59
  ## ExtendedFile
60
60
 
61
- | Property | Description | Type | Default |
62
- | -------- | ------------------------------------------ | ---------------- | ------- |
63
- | file | actual file | FileWithContent | - |
64
- | disabled | whether or not the file should be disabled | boolean | - |
65
- | error | file error text | string | - |
66
- | progress | upload progress | number | - |
67
- | success | upload success | boolean | - |
61
+ | Property | Description | Type | Default |
62
+ | -------- | ------------------------------------------ | --------------- | ------- |
63
+ | file | actual file | FileWithContent | - |
64
+ | disabled | whether or not the file should be disabled | boolean | - |
65
+ | error | file error text | string | - |
66
+ | progress | upload progress | number | - |
67
+ | success | upload success | boolean | - |
68
68
 
69
69
  ## FileWithContent (extends [File](https://developer.mozilla.org/pl/docs/Web/API/File))
70
70
 
71
71
  | Property | Description | Type | Default |
72
- | -------- | ------------------------------------------ | ------- | ------- |
73
- | content | Plain text of txt files, for other file types contains null | string, null, ArrayBuffer | null |
72
+ | -------- | ----------------------------------------------------------- | ------------------------- | ------- |
73
+ | content | Plain text of txt files, for other file types contains null | string, null, ArrayBuffer | null |
74
74
 
75
75
  ## FileUploaderTexts
76
76
 
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FileUploaderProps } from '../FileUploader.types';
2
+ import { type FileUploaderProps } from '../FileUploader.types';
3
3
  declare const AvatarUploader: ({ className, onUpload, disabled, accept, error, label, onRemove, description, tooltip, filesAmount, mode, removable, files, texts, }: FileUploaderProps) => React.JSX.Element;
4
4
  export default AvatarUploader;
5
5
  //# sourceMappingURL=AvatarUploader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarUploader.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAY1B,OAAO,EAAE,iBAAiB,EAAe,MAAM,uBAAuB,CAAC;AAcvE,QAAA,MAAM,cAAc,yIAejB,iBAAiB,sBAmHnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"AvatarUploader.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAgB/B,QAAA,MAAM,cAAc,yIAejB,iBAAiB,sBAoInB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,15 +1,14 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import { useDropzone } from 'react-dropzone';
4
- import Tooltip from '@synerise/ds-tooltip';
5
- import Icon, { InfoFillS, Add3M, FileTypePictureL } from '@synerise/ds-icon';
6
4
  import Button from '@synerise/ds-button';
7
5
  import { useTheme } from '@synerise/ds-core';
8
- import FileViewAvatar from './FileViewAvatar/FileViewAvatar';
6
+ import Icon, { Add3M, FileTypePictureL, InfoFillS } from '@synerise/ds-icon';
7
+ import Tooltip from '@synerise/ds-tooltip';
9
8
  import * as S from './AvatarUploader.styles';
9
+ import FileViewAvatar from './FileViewAvatar/FileViewAvatar';
10
10
  function readAsText(file) {
11
11
  return new Promise(function (resolve) {
12
- // eslint-disable-next-line no-undef
13
12
  var reader = new FileReader();
14
13
  file.type !== 'text/plain' && resolve(null);
15
14
  reader.onerror = function () {
@@ -78,7 +77,6 @@ var AvatarUploader = function AvatarUploader(_ref) {
78
77
  getInputProps = _useDropzone.getInputProps,
79
78
  isDragActive = _useDropzone.isDragActive;
80
79
  if (filesAmount && filesAmount < 1) {
81
- // eslint-disable-next-line no-param-reassign
82
80
  filesAmount = 1;
83
81
  throw new Error('Invalid value of property "filesAmount" ');
84
82
  }
@@ -1 +1 @@
1
- {"version":3,"file":"AvatarUploader.styles.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,SAAS,oEAGrB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAG7B,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAsGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAOjB,CAAC"}
1
+ {"version":3,"file":"AvatarUploader.styles.d.ts","sourceRoot":"","sources":["../../src/AvatarUploader/AvatarUploader.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,SAAS,oEAGrB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAG7B,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAuGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAOjB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
- import Typography, { Label as TypographyLabel } from '@synerise/ds-typography';
3
2
  import { IconContainer } from '@synerise/ds-icon';
3
+ import Typography, { Label as TypographyLabel } from '@synerise/ds-typography';
4
4
  import { hexToRgba } from '@synerise/ds-utils';
5
5
  export var Container = styled.div.withConfig({
6
6
  displayName: "AvatarUploaderstyles__Container",
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FileViewAvatarProps } from './FileViewAvatar.types';
3
- declare const FileViewAvatar: ({ data, texts, onRemove, removable, description }: FileViewAvatarProps) => React.JSX.Element;
2
+ import { type FileViewAvatarProps } from './FileViewAvatar.types';
3
+ declare const FileViewAvatar: ({ data, texts, onRemove, removable, description, }: FileViewAvatarProps) => React.JSX.Element;
4
4
  export default FileViewAvatar;
5
5
  //# sourceMappingURL=FileViewAvatar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewAvatar.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAMxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAW7D,QAAA,MAAM,cAAc,sDAAuD,mBAAmB,sBAoF7F,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"FileViewAvatar.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAYxC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAiBlE,QAAA,MAAM,cAAc,uDAMjB,mBAAmB,sBA2GrB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,8 +1,8 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useState } from 'react';
3
3
  import { FormattedMessage } from 'react-intl';
4
+ import Icon, { Close3M, FileM, FileTypeImageM, RepeatM } from '@synerise/ds-icon';
4
5
  import Tooltip from '@synerise/ds-tooltip';
5
- import Icon, { RepeatM, FileTypeImageM, Close3M, FileM } from '@synerise/ds-icon';
6
6
  import * as S from './FileViewAvatar.styles';
7
7
  var previewableMimeTypes = ['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'text/csv'];
8
8
  var mapperOfIcons = {
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewAvatar.styles.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,oEAIxB,CAAC;AACF,eAAO,MAAM,UAAU,oEAOtB,CAAC;AACF,eAAO,MAAM,UAAU,oEAEtB,CAAC;AACF,eAAO,MAAM,gBAAgB,uCAQ5B,CAAC;AACF,eAAO,MAAM,WAAW;;;SAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,oEAE/B,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAAe,CAAC;AAE9C,eAAO,MAAM,IAAI,oEAIhB,CAAC;AACF,eAAO,MAAM,mBAAmB;;SAG/B,CAAC;AAEF,eAAO,MAAM,IAAI,sEAShB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AACF,eAAO,MAAM,aAAa;;SAiBzB,CAAC;AACF,eAAO,MAAM,eAAe;YAAwB,MAAM;;;SAuBzD,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;SAsFpB,CAAC"}
1
+ {"version":3,"file":"FileViewAvatar.styles.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,oEAIxB,CAAC;AACF,eAAO,MAAM,UAAU,oEAOtB,CAAC;AACF,eAAO,MAAM,UAAU,oEAEtB,CAAC;AACF,eAAO,MAAM,gBAAgB,uCAQ5B,CAAC;AACF,eAAO,MAAM,WAAW;;;SAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,mBAAmB,oEAE/B,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAAe,CAAC;AAE9C,eAAO,MAAM,IAAI,oEAIhB,CAAC;AACF,eAAO,MAAM,mBAAmB;;SAG/B,CAAC;AAEF,eAAO,MAAM,IAAI,sEAShB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AACF,eAAO,MAAM,aAAa;;SAiBzB,CAAC;AACF,eAAO,MAAM,eAAe;YAClB,MAAM;;;SA0Bf,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;SA2FpB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import styled, { keyframes } from 'styled-components';
2
- import { Description, Label } from '@synerise/ds-typography';
3
2
  import { IconContainer } from '@synerise/ds-icon';
4
3
  import { Loader } from '@synerise/ds-loader/dist/Loader.styles';
4
+ import { Description, Label } from '@synerise/ds-typography';
5
5
  export var PreviewImage = styled.div.withConfig({
6
6
  displayName: "FileViewAvatarstyles__PreviewImage",
7
7
  componentId: "sc-1jbyu2z-0"
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { ExtendedFile } from '../../FileUploader.types';
1
+ import { type ReactNode } from 'react';
2
+ import { type ExtendedFile } from '../../FileUploader.types';
3
3
  export interface FileViewAvatarTexts {
4
4
  removeTooltip?: ReactNode;
5
5
  retryTooltip?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewAvatar.types.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB"}
1
+ {"version":3,"file":"FileViewAvatar.types.d.ts","sourceRoot":"","sources":["../../../src/AvatarUploader/FileViewAvatar/FileViewAvatar.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,SAAS,CAAC;CAC/B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FileUploaderProps } from './FileUploader.types';
2
+ import { type FileUploaderProps } from './FileUploader.types';
3
3
  declare const FileUploader: ({ className, onUpload, disabled, accept, error, label, onRemove, description, tooltip, filesAmount, mode, removable, files, retry, texts, }: FileUploaderProps) => React.JSX.Element;
4
4
  export default FileUploader;
5
5
  //# sourceMappingURL=FileUploader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../src/FileUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,EAAe,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAgBtE,QAAA,MAAM,YAAY,gJAgBf,iBAAiB,sBAmInB,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"FileUploader.d.ts","sourceRoot":"","sources":["../src/FileUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AASrD,OAAO,EAAoB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAehF,QAAA,MAAM,YAAY,gJAgBf,iBAAiB,sBAqKnB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,15 +1,14 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useState, useCallback } from 'react';
3
- import { FormattedMessage } from 'react-intl';
2
+ import React, { useCallback, useState } from 'react';
4
3
  import { useDropzone } from 'react-dropzone';
5
- import Icon, { AddM, InfoFillS, FileUploadL } from '@synerise/ds-icon';
6
- import Tooltip from '@synerise/ds-tooltip';
4
+ import { FormattedMessage } from 'react-intl';
7
5
  import { useTheme } from '@synerise/ds-core';
8
- import FileView from './FileView/FileView';
6
+ import Icon, { AddM, FileUploadL, InfoFillS } from '@synerise/ds-icon';
7
+ import Tooltip from '@synerise/ds-tooltip';
9
8
  import * as S from './FileUploader.styles';
9
+ import FileView from './FileView/FileView';
10
10
  function readAsText(file) {
11
11
  return new Promise(function (resolve) {
12
- // eslint-disable-next-line no-undef
13
12
  var reader = new FileReader();
14
13
  file.type !== 'text/plain' && resolve(null);
15
14
  reader.onerror = function () {
@@ -93,7 +92,6 @@ var FileUploader = function FileUploader(_ref) {
93
92
  getInputProps = _useDropzone.getInputProps,
94
93
  isDragActive = _useDropzone.isDragActive;
95
94
  if (filesAmount && filesAmount < 1) {
96
- // eslint-disable-next-line no-param-reassign
97
95
  filesAmount = 1;
98
96
  throw new Error('Invalid value of property "filesAmount" ');
99
97
  }
@@ -142,9 +140,7 @@ var FileUploader = function FileUploader(_ref) {
142
140
  component: /*#__PURE__*/React.createElement(AddM, null),
143
141
  size: 24
144
142
  }), /*#__PURE__*/React.createElement(S.DropAreaLabel, null, finalTexts.buttonLabel))))), files.length > 0 && files.map(function (file, index) {
145
- return /*#__PURE__*/React.createElement(FileView
146
- // eslint-disable-next-line react/no-array-index-key
147
- , {
143
+ return /*#__PURE__*/React.createElement(FileView, {
148
144
  key: index,
149
145
  texts: texts,
150
146
  removable: removable,
@@ -157,7 +153,6 @@ var FileUploader = function FileUploader(_ref) {
157
153
  });
158
154
  }), hasError && errors && errors.map(function (errorText, index) {
159
155
  return /*#__PURE__*/React.createElement(S.ErrorMessage, {
160
- // eslint-disable-next-line react/no-array-index-key
161
156
  key: index
162
157
  }, errorText);
163
158
  }), description && /*#__PURE__*/React.createElement(S.Description, {
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import Button from '@synerise/ds-button';
3
3
  export declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const Description: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
4
+ export declare const Description: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
5
5
  size?: import("@synerise/ds-typography").TextSize | undefined;
6
6
  ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
7
7
  children?: import("react").ReactNode;
@@ -12,14 +12,14 @@ export declare const Description: import("styled-components").StyledComponent<({
12
12
  export declare const DropAreaContainer: import("styled-components").StyledComponent<"div", any, {
13
13
  canUploadMore: boolean;
14
14
  }, never>;
15
- export declare const DropAreaLabel: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
15
+ export declare const DropAreaLabel: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
16
16
  size?: import("@synerise/ds-typography").TextSize | undefined;
17
17
  ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
18
18
  children?: import("react").ReactNode;
19
19
  className?: string | undefined;
20
20
  }) => import("react").JSX.Element, any, {}, never>;
21
21
  export declare const LargeDropAreaLabel: import("styled-components").StyledComponent<"label", any, {}, never>;
22
- export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
22
+ export declare const LargeDropAreaDescription: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
23
23
  size?: import("@synerise/ds-typography").TextSize | undefined;
24
24
  ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
25
25
  children?: import("react").ReactNode;
@@ -33,7 +33,7 @@ export declare const DropAreaButton: import("styled-components").StyledComponent
33
33
  filesLength: number;
34
34
  hidden: boolean;
35
35
  }, never>;
36
- export declare const ErrorMessage: import("styled-components").StyledComponent<({ size, className, children, ellipsis }: {
36
+ export declare const ErrorMessage: import("styled-components").StyledComponent<({ size, className, children, ellipsis, }: {
37
37
  size?: import("@synerise/ds-typography").TextSize | undefined;
38
38
  ellipsis?: import("@synerise/ds-typography/dist/Ellipsis").EllipsisProps | undefined;
39
39
  children?: import("react").ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.styles.d.ts","sourceRoot":"","sources":["../src/FileUploader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAIzC,eAAO,MAAM,SAAS,oEAErB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;kDAKzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;kDAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;YACX,OAAO;SAwGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;kDAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC;AAEF,eAAO,MAAM,YAAY,4EAAmB,CAAC"}
1
+ {"version":3,"file":"FileUploader.styles.d.ts","sourceRoot":"","sources":["../src/FileUploader.styles.ts"],"names":[],"mappings":";AAEA,OAAO,MAAM,MAAM,qBAAqB,CAAC;AAKzC,eAAO,MAAM,SAAS,oEAErB,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;SAMvB,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa;;;;;kDAKzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;kDAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;YACX,OAAO;SAyGhB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;kDAMxB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC;AAEF,eAAO,MAAM,YAAY,4EAAmB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import styled, { css } from 'styled-components';
2
- import { Label as TypographyLabel, Text } from '@synerise/ds-typography';
3
2
  import Button from '@synerise/ds-button';
4
3
  import { IconContainer } from '@synerise/ds-icon';
4
+ import { Text, Label as TypographyLabel } from '@synerise/ds-typography';
5
5
  import { hexToRgba } from '@synerise/ds-utils';
6
6
  export var Container = styled.div.withConfig({
7
7
  displayName: "FileUploaderstyles__Container",
@@ -1,5 +1,5 @@
1
- import { ReactNode } from 'react';
2
- import { FileViewTexts } from './FileView/FileView.types';
1
+ import { type ReactNode } from 'react';
2
+ import { type FileViewTexts } from './FileView/FileView.types';
3
3
  export interface ExtendedFile {
4
4
  file: FileWithContent;
5
5
  error?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"FileUploader.types.d.ts","sourceRoot":"","sources":["../src/FileUploader.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAE1D,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,eAAe,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,eAAgB,SAAQ,IAAI;IAC3C,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;AAEtD,KAAK,iBAAiB,GAAG,aAAa,GAAG;IACvC,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,gBAAg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GAAG;IAChE,IAAI,EAAE,QAAQ,GAAG,OAAO,CAAC;CAC1B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FileViewProps } from './FileView.types';
3
- declare const FileView: ({ data, texts, onRemove, removable, retry, retryButtonProps }: FileViewProps) => React.JSX.Element;
2
+ import { type FileViewProps } from './FileView.types';
3
+ declare const FileView: ({ data, texts, onRemove, removable, retry, retryButtonProps, }: FileViewProps) => React.JSX.Element;
4
4
  export default FileView;
5
5
  //# sourceMappingURL=FileView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileView.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA0BxC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAiCjD,QAAA,MAAM,QAAQ,kEAAmE,aAAa,sBA6H7F,CAAC;AAEF,eAAe,QAAQ,CAAC"}
1
+ {"version":3,"file":"FileView.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AA0BxC,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAmCtD,QAAA,MAAM,QAAQ,mEAOX,aAAa,sBAsKf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -1,12 +1,12 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React, { useState } from 'react';
3
2
  import filesize from 'filesize.js';
4
- import ProgressBar from '@synerise/ds-progress-bar';
5
- import Tooltip from '@synerise/ds-tooltip';
6
- import Icon, { RepeatM, WarningFillM, FileTypeImage, FileTypePdf, FileTypeVideo, FileTypeSvg, Close3M, Check3M, FileM, FileTypeZip, FileTypeTxt, FileTypeHtml, FileTypeMp3, FileTypeXls, FileTypePptx } from '@synerise/ds-icon';
3
+ import React, { useState } from 'react';
4
+ import { FormattedMessage } from 'react-intl';
7
5
  import Button from '@synerise/ds-button';
8
6
  import { theme } from '@synerise/ds-core';
9
- import { FormattedMessage } from 'react-intl';
7
+ import Icon, { Check3M, Close3M, FileM, FileTypeHtml, FileTypeImage, FileTypeMp3, FileTypePdf, FileTypePptx, FileTypeSvg, FileTypeTxt, FileTypeVideo, FileTypeXls, FileTypeZip, RepeatM, WarningFillM } from '@synerise/ds-icon';
8
+ import ProgressBar from '@synerise/ds-progress-bar';
9
+ import Tooltip from '@synerise/ds-tooltip';
10
10
  import * as S from './FileView.styles';
11
11
  var previewableMimeTypes = ['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'text/plain', 'text/html', 'video/quicktime', 'application/pdf', 'application/zip', 'audio/mpeg', 'application/vnd.ms-excel', 'application/vnd.openxmlformats-officedocument.presentationml.presentation', 'text/csv'];
12
12
  var mapperOfIcons = {
@@ -1 +1 @@
1
- {"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAWhB,CAAC;AAEF,eAAO,MAAM,WAAW,uMAIvB,CAAC;AACF,eAAO,MAAM,aAAa,oEAyBzB,CAAC;AACF,eAAO,MAAM,kBAAkB,oEAsB9B,CAAC;AACF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;SA2F7B,CAAC"}
1
+ {"version":3,"file":"FileView.styles.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AAEF,eAAO,MAAM,IAAI;cAA0B,OAAO;SAIjD,CAAC;AAEF,eAAO,MAAM,kBAAkB,qIAQ9B,CAAC;AACF,eAAO,MAAM,UAAU,oEAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAWhB,CAAC;AAEF,eAAO,MAAM,WAAW,uMAIvB,CAAC;AACF,eAAO,MAAM,aAAa,oEAyBzB,CAAC;AACF,eAAO,MAAM,kBAAkB,oEAsB9B,CAAC;AACF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;;;;SA2F7B,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import styled from 'styled-components';
2
- import Typography, { Label } from '@synerise/ds-typography';
3
2
  import { IconContainer } from '@synerise/ds-icon';
4
3
  import Popconfirm from '@synerise/ds-popconfirm';
4
+ import Typography, { Label } from '@synerise/ds-typography';
5
5
  export var PreviewImage = styled.div.withConfig({
6
6
  displayName: "FileViewstyles__PreviewImage",
7
7
  componentId: "sc-wpdc66-0"
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
2
- import { DropzoneRootProps } from 'react-dropzone';
3
- import { ExtendedFile } from '../FileUploader.types';
1
+ import { type ReactNode } from 'react';
2
+ import { type DropzoneRootProps } from 'react-dropzone';
3
+ import { type ExtendedFile } from '../FileUploader.types';
4
4
  export interface FileViewTexts {
5
5
  size?: ReactNode;
6
6
  cancelText?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"FileView.types.d.ts","sourceRoot":"","sources":["../../src/FileView/FileView.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,YAAY,E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;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,SAAS,CAAC;CACxB;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,YAAY,CAAC;IACnB,KAAK,EAAE,aAAa,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC,SAAS,CAAC;IAClC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;CACtC"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ItemUploaderProps } from '../FileUploader.types';
2
+ import { type ItemUploaderProps } from '../FileUploader.types';
3
3
  declare const ItemUploader: React.FC<ItemUploaderProps>;
4
4
  export default ItemUploader;
5
5
  //# sourceMappingURL=ItemUploader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ItemUploader.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,OAAO,EAAE,iBAAiB,EAAe,MAAM,uBAAuB,CAAC;AAcvE,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqH7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ItemUploader.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,OAAO,EAEL,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAe/B,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA6H7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,14 +1,13 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import { useDropzone } from 'react-dropzone';
4
- import Icon, { InfoFillS, Add3M } from '@synerise/ds-icon';
5
- import Tooltip from '@synerise/ds-tooltip';
6
4
  import Button from '@synerise/ds-button';
5
+ import Icon, { Add3M, InfoFillS } from '@synerise/ds-icon';
6
+ import Tooltip from '@synerise/ds-tooltip';
7
7
  import * as S from './ItemUploader.styles';
8
8
  import FileViewItem from './UploaderButton/FileViewItem';
9
9
  function readAsText(file) {
10
10
  return new Promise(function (resolve) {
11
- // eslint-disable-next-line no-undef
12
11
  var reader = new FileReader();
13
12
  file.type !== 'text/plain' && resolve(null);
14
13
  reader.onerror = function () {
@@ -75,7 +74,6 @@ var ItemUploader = function ItemUploader(_ref) {
75
74
  getRootProps = _useDropzone.getRootProps,
76
75
  getInputProps = _useDropzone.getInputProps;
77
76
  if (filesAmount && filesAmount < 1) {
78
- // eslint-disable-next-line no-param-reassign
79
77
  filesAmount = 1;
80
78
  throw new Error('Invalid value of property "filesAmount" ');
81
79
  }
@@ -116,7 +114,6 @@ var ItemUploader = function ItemUploader(_ref) {
116
114
  });
117
115
  }), hasError && errors && errors.map(function (errorText, index) {
118
116
  return /*#__PURE__*/React.createElement(S.ErrorMessage, {
119
- // eslint-disable-next-line react/no-array-index-key
120
117
  key: index
121
118
  }, errorText);
122
119
  }), description && /*#__PURE__*/React.createElement(S.Description, {
@@ -1 +1 @@
1
- {"version":3,"file":"ItemUploader.styles.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.styles.ts"],"names":[],"mappings":";AAIA,eAAO,MAAM,SAAS,oEAErB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAsGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC"}
1
+ {"version":3,"file":"ItemUploader.styles.d.ts","sourceRoot":"","sources":["../../src/ItemUploader/ItemUploader.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,SAAS,oEAErB,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;mBAA+B,OAAO;SAGnE,CAAC;AAEF,eAAO,MAAM,aAAa,uMAGzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,sEAO9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,uMAMpC,CAAC;AAEF,eAAO,MAAM,cAAc;;;UAGnB,MAAM;aACH,OAAO;iBACH,MAAM;SAsGpB,CAAC;AAEF,eAAO,MAAM,YAAY,uMAMxB,CAAC;AACF,eAAO,MAAM,WAAW;;SAMvB,CAAC;AAEF,eAAO,MAAM,KAAK,sEAWjB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import styled, { css } from 'styled-components';
2
- import Typography, { Label as TypographyLabel } from '@synerise/ds-typography';
3
2
  import { IconContainer } from '@synerise/ds-icon';
3
+ import Typography, { Label as TypographyLabel } from '@synerise/ds-typography';
4
4
  export var Container = styled.div.withConfig({
5
5
  displayName: "ItemUploaderstyles__Container",
6
6
  componentId: "sc-a5v1d2-0"
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { FileViewAvatarProps } from '../../AvatarUploader/FileViewAvatar/FileViewAvatar.types';
3
- declare const FileViewItem: ({ data, texts, onRemove, removable }: FileViewAvatarProps) => React.JSX.Element;
2
+ import { type FileViewAvatarProps } from '../../AvatarUploader/FileViewAvatar/FileViewAvatar.types';
3
+ declare const FileViewItem: ({ data, texts, onRemove, removable, }: FileViewAvatarProps) => React.JSX.Element;
4
4
  export default FileViewItem;
5
5
  //# sourceMappingURL=FileViewItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewItem.d.ts","sourceRoot":"","sources":["../../../src/ItemUploader/UploaderButton/FileViewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAOxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAW/F,QAAA,MAAM,YAAY,yCAA0C,mBAAmB,sBA+D9E,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"FileViewItem.d.ts","sourceRoot":"","sources":["../../../src/ItemUploader/UploaderButton/FileViewItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAWxC,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAkBpG,QAAA,MAAM,YAAY,0CAKf,mBAAmB,sBA+ErB,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,8 +1,8 @@
1
1
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React, { useState } from 'react';
3
3
  import { FormattedMessage } from 'react-intl';
4
+ import Icon, { Close3M, FileM, FileTypeTextM, RepeatM } from '@synerise/ds-icon';
4
5
  import Tooltip from '@synerise/ds-tooltip';
5
- import Icon, { RepeatM, FileTypeTextM, Close3M, FileM } from '@synerise/ds-icon';
6
6
  import * as S from './FileViewItem.styles';
7
7
  var previewableMimeTypes = ['image/png', 'image/gif', 'image/jpeg', 'image/svg+xml', 'text/csv'];
8
8
  var mapperOfIcons = {
@@ -1 +1 @@
1
- {"version":3,"file":"FileViewItem.styles.d.ts","sourceRoot":"","sources":["../../../src/ItemUploader/UploaderButton/FileViewItem.styles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AACF,eAAO,MAAM,UAAU,oEAOtB,CAAC;AACF,eAAO,MAAM,UAAU,oEAEtB,CAAC;AACF,eAAO,MAAM,gBAAgB,uCAQ5B,CAAC;AACF,eAAO,MAAM,WAAW;;;SAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,IAAI,oEAIhB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAShB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;SAsFpB,CAAC"}
1
+ {"version":3,"file":"FileViewItem.styles.d.ts","sourceRoot":"","sources":["../../../src/ItemUploader/UploaderButton/FileViewItem.styles.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,oEAKxB,CAAC;AACF,eAAO,MAAM,UAAU,oEAOtB,CAAC;AACF,eAAO,MAAM,UAAU,oEAEtB,CAAC;AACF,eAAO,MAAM,gBAAgB,uCAQ5B,CAAC;AACF,eAAO,MAAM,WAAW;;;SAKvB,CAAC;AAEF,eAAO,MAAM,gBAAgB,oEAU5B,CAAC;AACF,eAAO,MAAM,iBAAiB,oEAE7B,CAAC;AAEF,eAAO,MAAM,IAAI,oEAIhB,CAAC;AAEF,eAAO,MAAM,IAAI,sEAShB,CAAC;AAEF,eAAO,MAAM,mBAAmB;;SA0B/B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;SA2FpB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import styled, { keyframes } from 'styled-components';
2
- import { Label } from '@synerise/ds-typography';
3
2
  import { IconContainer } from '@synerise/ds-icon';
4
3
  import { Loader } from '@synerise/ds-loader/dist/Loader.styles';
4
+ import { Label } from '@synerise/ds-typography';
5
5
  export var PreviewImage = styled.div.withConfig({
6
6
  displayName: "FileViewItemstyles__PreviewImage",
7
7
  componentId: "sc-1rkoxpv-0"
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
+ import * as AvatarUploaderStyles from './AvatarUploader/AvatarUploader.styles';
1
2
  import * as Styles from './FileUploader.styles';
2
3
  import * as FileViewStyles from './FileView/FileView.styles';
3
4
  import * as ItemUploaderStyles from './ItemUploader/ItemUploader.styles';
4
- import * as AvatarUploaderStyles from './AvatarUploader/AvatarUploader.styles';
5
5
  export { default } from './FileUploader';
6
6
  export { default as AvatarUploader } from './AvatarUploader/AvatarUploader';
7
7
  export { default as ItemUploader } from './ItemUploader/ItemUploader';
8
8
  export type { ItemUploaderProps } from './ItemUploader/ItemUploader.types';
9
- export type { FileUploaderProps, ExtendedFile, FileWithContent } from './FileUploader.types';
9
+ export type { FileUploaderProps, ExtendedFile, FileWithContent, } from './FileUploader.types';
10
10
  export declare const FileUploaderStyles: {
11
11
  FileUploader: typeof Styles;
12
12
  FileView: typeof FileViewStyles;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,oCAAoC,CAAC;AACzE,OAAO,KAAK,oBAAoB,MAAM,wCAAwC,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EAAE,iBAAiB,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE7F,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,oBAAoB,MAAM,wCAAwC,CAAC;AAC/E,OAAO,KAAK,MAAM,MAAM,uBAAuB,CAAC;AAChD,OAAO,KAAK,cAAc,MAAM,4BAA4B,CAAC;AAC7D,OAAO,KAAK,kBAAkB,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEtE,YAAY,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,YAAY,EACV,iBAAiB,EACjB,YAAY,EACZ,eAAe,GAChB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,kBAAkB;;;;;CAK9B,CAAC"}
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
+ import * as AvatarUploaderStyles from './AvatarUploader/AvatarUploader.styles';
1
2
  import * as Styles from './FileUploader.styles';
2
3
  import * as FileViewStyles from './FileView/FileView.styles';
3
4
  import * as ItemUploaderStyles from './ItemUploader/ItemUploader.styles';
4
- import * as AvatarUploaderStyles from './AvatarUploader/AvatarUploader.styles';
5
5
  export { default } from './FileUploader';
6
6
  export { default as AvatarUploader } from './AvatarUploader/AvatarUploader';
7
7
  export { default as ItemUploader } from './ItemUploader/ItemUploader';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synerise/ds-file-uploader",
3
- "version": "1.0.14",
3
+ "version": "1.0.16",
4
4
  "description": "FileUploader UI Component for the Synerise Design System",
5
5
  "license": "ISC",
6
6
  "repository": "Synerise/synerise-design",
@@ -34,14 +34,14 @@
34
34
  ],
35
35
  "types": "dist/index.d.ts",
36
36
  "dependencies": {
37
- "@synerise/ds-button": "^1.4.1",
38
- "@synerise/ds-icon": "^1.5.3",
39
- "@synerise/ds-loader": "^1.0.5",
40
- "@synerise/ds-popconfirm": "^1.0.13",
41
- "@synerise/ds-progress-bar": "^1.1.7",
42
- "@synerise/ds-tooltip": "^1.1.11",
43
- "@synerise/ds-typography": "^1.0.12",
44
- "@synerise/ds-utils": "^1.3.0",
37
+ "@synerise/ds-button": "^1.4.3",
38
+ "@synerise/ds-icon": "^1.5.4",
39
+ "@synerise/ds-loader": "^1.0.6",
40
+ "@synerise/ds-popconfirm": "^1.0.15",
41
+ "@synerise/ds-progress-bar": "^1.1.9",
42
+ "@synerise/ds-tooltip": "^1.1.12",
43
+ "@synerise/ds-typography": "^1.0.14",
44
+ "@synerise/ds-utils": "^1.3.1",
45
45
  "filesize.js": "^2.0.0",
46
46
  "react-dropzone": "^10.2.1"
47
47
  },
@@ -51,5 +51,5 @@
51
51
  "react-intl": ">=3.12.0 <= 6.8",
52
52
  "styled-components": "^5.3.3"
53
53
  },
54
- "gitHead": "11fe1d29b2ac23e70c3d5e6ce8ae20201a619a34"
54
+ "gitHead": "8db1900bf3f7b0782c834ff82f628199530cd934"
55
55
  }