@veeqo/ui 12.4.0-beta-9 → 12.5.0
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/dist/components/SelectDropdown/SelectDropdown.cjs +27 -19
- package/dist/components/SelectDropdown/SelectDropdown.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.d.ts +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.js +27 -19
- package/dist/components/SelectDropdown/SelectDropdown.js.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js +2 -2
- package/dist/components/SelectDropdown/SelectDropdown.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs +37 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.js +31 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.js.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js +7 -0
- package/dist/components/SelectDropdown/components/GridItem/GridItem.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs +4 -4
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.d.ts +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js +4 -4
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.js +2 -2
- package/dist/components/SelectDropdown/components/ItemContent/ItemContent.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/ItemContent/types.d.ts +2 -0
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js +2 -2
- package/dist/components/SelectDropdown/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.cjs +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.js +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.js.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.cjs +2 -2
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js +2 -2
- package/dist/components/SelectDropdown/components/ListItemSection/ListItemSection.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs +18 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.d.ts +3 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js +12 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/GridList.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs +19 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.d.ts +3 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js +13 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/ListBox.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs +9 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.cjs.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js +7 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/OptionsContainer.module.scss.js.map +1 -0
- package/dist/components/SelectDropdown/components/OptionsContainers/types.d.ts +25 -0
- package/dist/components/SelectDropdown/components/SelectDropdownState.cjs +11 -3
- package/dist/components/SelectDropdown/components/SelectDropdownState.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/SelectDropdownState.js +11 -3
- package/dist/components/SelectDropdown/components/SelectDropdownState.js.map +1 -1
- package/dist/components/SelectDropdown/components/SelectedOption.cjs +2 -2
- package/dist/components/SelectDropdown/components/SelectedOption.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/SelectedOption.js +2 -2
- package/dist/components/SelectDropdown/components/SelectedOption.js.map +1 -1
- package/dist/components/SelectDropdown/components/item.module.scss.cjs +3 -3
- package/dist/components/SelectDropdown/components/item.module.scss.cjs.map +1 -1
- package/dist/components/SelectDropdown/components/item.module.scss.js +3 -3
- package/dist/components/SelectDropdown/components/item.module.scss.js.map +1 -1
- package/dist/components/SelectDropdown/types.d.ts +4 -1
- package/dist/components/UploadFile/UploadFile.cjs +82 -71
- package/dist/components/UploadFile/UploadFile.cjs.map +1 -1
- package/dist/components/UploadFile/UploadFile.js +85 -74
- package/dist/components/UploadFile/UploadFile.js.map +1 -1
- package/dist/components/UploadFile/UploadGraphic.cjs +14 -0
- package/dist/components/UploadFile/UploadGraphic.cjs.map +1 -0
- package/dist/components/UploadFile/UploadGraphic.d.ts +2 -0
- package/dist/components/UploadFile/UploadGraphic.js +8 -0
- package/dist/components/UploadFile/UploadGraphic.js.map +1 -0
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs +6 -6
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.cjs.map +1 -1
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js +6 -6
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.js.map +1 -1
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs +31 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.cjs.map +1 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.d.ts +7 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js +25 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.js.map +1 -0
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.cjs +5 -52
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.cjs.map +1 -1
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.d.ts +3 -7
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js +5 -52
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.js.map +1 -1
- package/dist/components/UploadFile/components/UploadedFile/styled.cjs +20 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.cjs.map +1 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.d.ts +2 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.js +13 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.js.map +1 -0
- package/dist/components/UploadFile/constants.cjs +8 -64
- package/dist/components/UploadFile/constants.cjs.map +1 -1
- package/dist/components/UploadFile/constants.d.ts +5 -52
- package/dist/components/UploadFile/constants.js +9 -63
- package/dist/components/UploadFile/constants.js.map +1 -1
- package/dist/components/UploadFile/mocks/files.d.ts +0 -2
- package/dist/components/UploadFile/mocks/utils.d.ts +2 -1
- package/dist/components/UploadFile/styled.cjs +1 -16
- package/dist/components/UploadFile/styled.cjs.map +1 -1
- package/dist/components/UploadFile/styled.d.ts +1 -4
- package/dist/components/UploadFile/styled.js +1 -16
- package/dist/components/UploadFile/styled.js.map +1 -1
- package/dist/components/UploadFile/types.d.ts +1 -14
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.cjs +11 -14
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.cjs.map +1 -1
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.d.ts +7 -10
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.js +11 -14
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.js.map +1 -1
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.cjs +30 -16
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.cjs.map +1 -1
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.js +30 -16
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.js.map +1 -1
- package/dist/components/UploadFile/utils/index.d.ts +1 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.cjs +18 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.cjs.map +1 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.d.ts +13 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.js +16 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.js.map +1 -0
- package/dist/components/ViewsContainer/ViewsContainer.cjs +37 -10
- package/dist/components/ViewsContainer/ViewsContainer.cjs.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.js +37 -10
- package/dist/components/ViewsContainer/ViewsContainer.js.map +1 -1
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.cjs +9 -0
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.cjs.map +1 -0
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.js +7 -0
- package/dist/components/ViewsContainer/ViewsContainer.module.scss.js.map +1 -0
- package/dist/components/ViewsContainer/hooks/useSetScrollPosition.cjs +73 -45
- package/dist/components/ViewsContainer/hooks/useSetScrollPosition.cjs.map +1 -1
- package/dist/components/ViewsContainer/hooks/useSetScrollPosition.d.ts +9 -1
- package/dist/components/ViewsContainer/hooks/useSetScrollPosition.js +74 -46
- package/dist/components/ViewsContainer/hooks/useSetScrollPosition.js.map +1 -1
- package/dist/components/ViewsContainer/types.d.ts +18 -0
- package/dist/utils/forms/form.module.scss.cjs +2 -2
- package/dist/utils/forms/form.module.scss.cjs.map +1 -1
- package/dist/utils/forms/form.module.scss.js +2 -2
- package/dist/utils/forms/form.module.scss.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/UploadFile/components/DropCopy/DropCopy.cjs +0 -28
- package/dist/components/UploadFile/components/DropCopy/DropCopy.cjs.map +0 -1
- package/dist/components/UploadFile/components/DropCopy/DropCopy.d.ts +0 -2
- package/dist/components/UploadFile/components/DropCopy/DropCopy.js +0 -22
- package/dist/components/UploadFile/components/DropCopy/DropCopy.js.map +0 -1
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.cjs +0 -9
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.cjs.map +0 -1
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.js +0 -7
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.module.scss.js.map +0 -1
- package/dist/components/UploadFile/hooks/useFileErrorMessages/index.d.ts +0 -1
- package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.cjs +0 -39
- package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.cjs.map +0 -1
- package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.d.ts +0 -13
- package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.js +0 -37
- package/dist/components/UploadFile/hooks/useFileErrorMessages/useFileErrorMessages.js.map +0 -1
- package/dist/components/UploadFile/hooks/usePreviewImage/index.d.ts +0 -1
- package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.cjs +0 -36
- package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.cjs.map +0 -1
- package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.d.ts +0 -8
- package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.js +0 -34
- package/dist/components/UploadFile/hooks/usePreviewImage/usePreviewImage.js.map +0 -1
- package/dist/components/UploadFile/hooks/useUploadFile/index.d.ts +0 -1
- package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.cjs +0 -65
- package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.cjs.map +0 -1
- package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.d.ts +0 -9
- package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.js +0 -63
- package/dist/components/UploadFile/hooks/useUploadFile/useUploadFile.js.map +0 -1
- package/dist/components/UploadFile/hooks/useValidateInput/index.d.ts +0 -1
- package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.cjs +0 -85
- package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.cjs.map +0 -1
- package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.d.ts +0 -13
- package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.js +0 -83
- package/dist/components/UploadFile/hooks/useValidateInput/useValidateInput.js.map +0 -1
- package/dist/components/UploadFile/mocks/mockUseUploadFile.d.ts +0 -14
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileExtension.d.ts +0 -1
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.cjs +0 -17
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.cjs.map +0 -1
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.d.ts +0 -1
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.js +0 -15
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/convertFileTypeToAcceptedFileType.js.map +0 -1
- package/dist/components/UploadFile/utils/convertFileTypeToAcceptedFileExtension/index.d.ts +0 -1
- package/dist/components/UploadFile/utils/isImageType/index.d.ts +0 -1
- package/dist/components/UploadFile/utils/isImageType/isImageType.cjs +0 -14
- package/dist/components/UploadFile/utils/isImageType/isImageType.cjs.map +0 -1
- package/dist/components/UploadFile/utils/isImageType/isImageType.d.ts +0 -1
- package/dist/components/UploadFile/utils/isImageType/isImageType.js +0 -12
- package/dist/components/UploadFile/utils/isImageType/isImageType.js.map +0 -1
- package/dist/components/ViewsContainer/styled.cjs +0 -37
- package/dist/components/ViewsContainer/styled.cjs.map +0 -1
- package/dist/components/ViewsContainer/styled.d.ts +0 -34
- package/dist/components/ViewsContainer/styled.js +0 -23
- package/dist/components/ViewsContainer/styled.js.map +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var constants = require('../../constants.cjs');
|
|
4
|
+
|
|
3
5
|
/**
|
|
4
6
|
* Constructs a user-friendly string of accepted types valid for the UploadFile component based on the
|
|
5
7
|
* fileTypes list passed as parameter.
|
|
@@ -19,22 +21,34 @@
|
|
|
19
21
|
* the returned string
|
|
20
22
|
*/
|
|
21
23
|
const getValidTypesString = ({ fileTypes, baseString }) => {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
24
|
+
let base = baseString == null ? 'Valid types: ' : baseString;
|
|
25
|
+
fileTypes.forEach((fileType, index, list) => {
|
|
26
|
+
const iterable = list.length > 1;
|
|
27
|
+
const isLast = index === list.length - 1 && iterable;
|
|
28
|
+
const isPenultimate = index === list.length - 2 && iterable;
|
|
29
|
+
if (isLast)
|
|
30
|
+
base += ' and ';
|
|
31
|
+
switch (fileType) {
|
|
32
|
+
case constants.AcceptedFileTypes.CSV:
|
|
33
|
+
base += 'CSV';
|
|
34
|
+
break;
|
|
35
|
+
case constants.AcceptedFileTypes.GIF:
|
|
36
|
+
base += 'GIF';
|
|
37
|
+
break;
|
|
38
|
+
case constants.AcceptedFileTypes.JPEG:
|
|
39
|
+
base += 'JPEG';
|
|
40
|
+
break;
|
|
41
|
+
case constants.AcceptedFileTypes.JPG:
|
|
42
|
+
base += 'JPG';
|
|
43
|
+
break;
|
|
44
|
+
case constants.AcceptedFileTypes.PNG:
|
|
45
|
+
base += 'PNG';
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
if (!isPenultimate && !isLast && list.length > 2)
|
|
49
|
+
base += ', ';
|
|
50
|
+
});
|
|
51
|
+
return base;
|
|
38
52
|
};
|
|
39
53
|
|
|
40
54
|
exports.getValidTypesString = getValidTypesString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getValidTypesString.cjs","sources":["../../../../../src/components/UploadFile/utils/getValidTypesString/getValidTypesString.ts"],"sourcesContent":["import { AcceptedFileTypes } from '../../constants';\n\ntype GetValidTypesStringProps = {\n fileTypes: Array<AcceptedFileTypes>;\n baseString?: string;\n};\n\n/**\n * Constructs a user-friendly string of accepted types valid for the UploadFile component based on the\n * fileTypes list passed as parameter.\n *\n * E.g.\n *\n * const validTypesCopy = getValidTypesString({\n * fileTypes: [\n * AcceptedFileTypes.CSV,\n * ]\n * });\n *\n * Where @constant validTypesCopy would equal \"Valid types: CSV\"\n *\n * @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes\n * @param baseString - An optional string to override the default value of 'Valid types: ' prefixed to\n * the returned string\n */\nexport const getValidTypesString = ({ fileTypes, baseString }: GetValidTypesStringProps) => {\n
|
|
1
|
+
{"version":3,"file":"getValidTypesString.cjs","sources":["../../../../../src/components/UploadFile/utils/getValidTypesString/getValidTypesString.ts"],"sourcesContent":["import { AcceptedFileTypes } from '../../constants';\n\ntype GetValidTypesStringProps = {\n fileTypes: Array<AcceptedFileTypes>;\n baseString?: string;\n};\n\n/**\n * Constructs a user-friendly string of accepted types valid for the UploadFile component based on the\n * fileTypes list passed as parameter.\n *\n * E.g.\n *\n * const validTypesCopy = getValidTypesString({\n * fileTypes: [\n * AcceptedFileTypes.CSV,\n * ]\n * });\n *\n * Where @constant validTypesCopy would equal \"Valid types: CSV\"\n *\n * @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes\n * @param baseString - An optional string to override the default value of 'Valid types: ' prefixed to\n * the returned string\n */\nexport const getValidTypesString = ({ fileTypes, baseString }: GetValidTypesStringProps) => {\n let base = baseString == null ? 'Valid types: ' : baseString;\n fileTypes.forEach((fileType, index, list) => {\n const iterable = list.length > 1;\n const isLast = index === list.length - 1 && iterable;\n const isPenultimate = index === list.length - 2 && iterable;\n\n if (isLast) base += ' and ';\n\n switch (fileType) {\n case AcceptedFileTypes.CSV:\n base += 'CSV';\n break;\n case AcceptedFileTypes.GIF:\n base += 'GIF';\n break;\n case AcceptedFileTypes.JPEG:\n base += 'JPEG';\n break;\n case AcceptedFileTypes.JPG:\n base += 'JPG';\n break;\n case AcceptedFileTypes.PNG:\n base += 'PNG';\n break;\n default:\n break;\n }\n\n if (!isPenultimate && !isLast && list.length > 2) base += ', ';\n });\n return base;\n};\n"],"names":["AcceptedFileTypes"],"mappings":";;;;AAOA;;;;;;;;;;;;;;;;;AAiBG;AACU,MAAA,mBAAmB,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAA4B,KAAI;AACzF,IAAA,IAAI,IAAI,GAAG,UAAU,IAAI,IAAI,GAAG,eAAe,GAAG,UAAU;IAC5D,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,KAAI;AAC1C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ;QACpD,MAAM,aAAa,GAAG,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ;AAE3D,QAAA,IAAI,MAAM;YAAE,IAAI,IAAI,OAAO;AAE3B,QAAA,QAAQ,QAAQ;YACd,KAAKA,2BAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAKA,2BAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAKA,2BAAiB,CAAC,IAAI;gBACzB,IAAI,IAAI,MAAM;gBACd;YACF,KAAKA,2BAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAKA,2BAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;AAGH;QAED,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,IAAI,IAAI;AAChE,KAAC,CAAC;AACF,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AcceptedFileTypes } from '../../constants.js';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Constructs a user-friendly string of accepted types valid for the UploadFile component based on the
|
|
3
5
|
* fileTypes list passed as parameter.
|
|
@@ -17,22 +19,34 @@
|
|
|
17
19
|
* the returned string
|
|
18
20
|
*/
|
|
19
21
|
const getValidTypesString = ({ fileTypes, baseString }) => {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
let base = baseString == null ? 'Valid types: ' : baseString;
|
|
23
|
+
fileTypes.forEach((fileType, index, list) => {
|
|
24
|
+
const iterable = list.length > 1;
|
|
25
|
+
const isLast = index === list.length - 1 && iterable;
|
|
26
|
+
const isPenultimate = index === list.length - 2 && iterable;
|
|
27
|
+
if (isLast)
|
|
28
|
+
base += ' and ';
|
|
29
|
+
switch (fileType) {
|
|
30
|
+
case AcceptedFileTypes.CSV:
|
|
31
|
+
base += 'CSV';
|
|
32
|
+
break;
|
|
33
|
+
case AcceptedFileTypes.GIF:
|
|
34
|
+
base += 'GIF';
|
|
35
|
+
break;
|
|
36
|
+
case AcceptedFileTypes.JPEG:
|
|
37
|
+
base += 'JPEG';
|
|
38
|
+
break;
|
|
39
|
+
case AcceptedFileTypes.JPG:
|
|
40
|
+
base += 'JPG';
|
|
41
|
+
break;
|
|
42
|
+
case AcceptedFileTypes.PNG:
|
|
43
|
+
base += 'PNG';
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
if (!isPenultimate && !isLast && list.length > 2)
|
|
47
|
+
base += ', ';
|
|
48
|
+
});
|
|
49
|
+
return base;
|
|
36
50
|
};
|
|
37
51
|
|
|
38
52
|
export { getValidTypesString };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getValidTypesString.js","sources":["../../../../../src/components/UploadFile/utils/getValidTypesString/getValidTypesString.ts"],"sourcesContent":["import { AcceptedFileTypes } from '../../constants';\n\ntype GetValidTypesStringProps = {\n fileTypes: Array<AcceptedFileTypes>;\n baseString?: string;\n};\n\n/**\n * Constructs a user-friendly string of accepted types valid for the UploadFile component based on the\n * fileTypes list passed as parameter.\n *\n * E.g.\n *\n * const validTypesCopy = getValidTypesString({\n * fileTypes: [\n * AcceptedFileTypes.CSV,\n * ]\n * });\n *\n * Where @constant validTypesCopy would equal \"Valid types: CSV\"\n *\n * @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes\n * @param baseString - An optional string to override the default value of 'Valid types: ' prefixed to\n * the returned string\n */\nexport const getValidTypesString = ({ fileTypes, baseString }: GetValidTypesStringProps) => {\n
|
|
1
|
+
{"version":3,"file":"getValidTypesString.js","sources":["../../../../../src/components/UploadFile/utils/getValidTypesString/getValidTypesString.ts"],"sourcesContent":["import { AcceptedFileTypes } from '../../constants';\n\ntype GetValidTypesStringProps = {\n fileTypes: Array<AcceptedFileTypes>;\n baseString?: string;\n};\n\n/**\n * Constructs a user-friendly string of accepted types valid for the UploadFile component based on the\n * fileTypes list passed as parameter.\n *\n * E.g.\n *\n * const validTypesCopy = getValidTypesString({\n * fileTypes: [\n * AcceptedFileTypes.CSV,\n * ]\n * });\n *\n * Where @constant validTypesCopy would equal \"Valid types: CSV\"\n *\n * @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes\n * @param baseString - An optional string to override the default value of 'Valid types: ' prefixed to\n * the returned string\n */\nexport const getValidTypesString = ({ fileTypes, baseString }: GetValidTypesStringProps) => {\n let base = baseString == null ? 'Valid types: ' : baseString;\n fileTypes.forEach((fileType, index, list) => {\n const iterable = list.length > 1;\n const isLast = index === list.length - 1 && iterable;\n const isPenultimate = index === list.length - 2 && iterable;\n\n if (isLast) base += ' and ';\n\n switch (fileType) {\n case AcceptedFileTypes.CSV:\n base += 'CSV';\n break;\n case AcceptedFileTypes.GIF:\n base += 'GIF';\n break;\n case AcceptedFileTypes.JPEG:\n base += 'JPEG';\n break;\n case AcceptedFileTypes.JPG:\n base += 'JPG';\n break;\n case AcceptedFileTypes.PNG:\n base += 'PNG';\n break;\n default:\n break;\n }\n\n if (!isPenultimate && !isLast && list.length > 2) base += ', ';\n });\n return base;\n};\n"],"names":[],"mappings":";;AAOA;;;;;;;;;;;;;;;;;AAiBG;AACU,MAAA,mBAAmB,GAAG,CAAC,EAAE,SAAS,EAAE,UAAU,EAA4B,KAAI;AACzF,IAAA,IAAI,IAAI,GAAG,UAAU,IAAI,IAAI,GAAG,eAAe,GAAG,UAAU;IAC5D,SAAS,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,KAAI;AAC1C,QAAA,MAAM,QAAQ,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ;QACpD,MAAM,aAAa,GAAG,KAAK,KAAK,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,QAAQ;AAE3D,QAAA,IAAI,MAAM;YAAE,IAAI,IAAI,OAAO;AAE3B,QAAA,QAAQ,QAAQ;YACd,KAAK,iBAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAK,iBAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAK,iBAAiB,CAAC,IAAI;gBACzB,IAAI,IAAI,MAAM;gBACd;YACF,KAAK,iBAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;YACF,KAAK,iBAAiB,CAAC,GAAG;gBACxB,IAAI,IAAI,KAAK;gBACb;AAGH;QAED,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC;YAAE,IAAI,IAAI,IAAI;AAChE,KAAC,CAAC;AACF,IAAA,OAAO,IAAI;AACb;;;;"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { getValidTypesString } from './getValidTypesString/getValidTypesString';
|
|
2
2
|
export { getFileSizeString } from './getFileSizeString/getFileSizeString';
|
|
3
3
|
export { getTypePropForInputEl } from './getTypePropForInputEl/getTypePropForInputEl';
|
|
4
|
+
export { setInputElFile } from './setInputElFile/setInputElFile';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Updates the value of the files attribute held within an input elment. Used during DnD operations where
|
|
5
|
+
* the input element's files need to kept in sync and updated.
|
|
6
|
+
*
|
|
7
|
+
* @param fileList - A list of files, typically extracted from the "files" attribute of an input element
|
|
8
|
+
* @param elementId - The ID of the input element
|
|
9
|
+
*/
|
|
10
|
+
const setInputElFile = ({ fileList, elementId }) => {
|
|
11
|
+
const inputEl = document.getElementById(elementId);
|
|
12
|
+
if (fileList.length) {
|
|
13
|
+
inputEl.files = fileList;
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
exports.setInputElFile = setInputElFile;
|
|
18
|
+
//# sourceMappingURL=setInputElFile.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setInputElFile.cjs","sources":["../../../../../src/components/UploadFile/utils/setInputElFile/setInputElFile.ts"],"sourcesContent":["type SetInputElFileProps = {\n fileList: FileList;\n elementId: string;\n};\n\n/**\n * Updates the value of the files attribute held within an input elment. Used during DnD operations where\n * the input element's files need to kept in sync and updated.\n *\n * @param fileList - A list of files, typically extracted from the \"files\" attribute of an input element\n * @param elementId - The ID of the input element\n */\nexport const setInputElFile = ({ fileList, elementId }: SetInputElFileProps) => {\n const inputEl = document.getElementById(elementId) as HTMLInputElement;\n if (fileList.length) {\n inputEl.files = fileList;\n }\n};\n"],"names":[],"mappings":";;AAKA;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAuB,KAAI;IAC7E,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAqB;IACtE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACnB,QAAA,OAAO,CAAC,KAAK,GAAG,QAAQ;AACzB;AACH;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type SetInputElFileProps = {
|
|
2
|
+
fileList: FileList;
|
|
3
|
+
elementId: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Updates the value of the files attribute held within an input elment. Used during DnD operations where
|
|
7
|
+
* the input element's files need to kept in sync and updated.
|
|
8
|
+
*
|
|
9
|
+
* @param fileList - A list of files, typically extracted from the "files" attribute of an input element
|
|
10
|
+
* @param elementId - The ID of the input element
|
|
11
|
+
*/
|
|
12
|
+
export declare const setInputElFile: ({ fileList, elementId }: SetInputElFileProps) => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Updates the value of the files attribute held within an input elment. Used during DnD operations where
|
|
3
|
+
* the input element's files need to kept in sync and updated.
|
|
4
|
+
*
|
|
5
|
+
* @param fileList - A list of files, typically extracted from the "files" attribute of an input element
|
|
6
|
+
* @param elementId - The ID of the input element
|
|
7
|
+
*/
|
|
8
|
+
const setInputElFile = ({ fileList, elementId }) => {
|
|
9
|
+
const inputEl = document.getElementById(elementId);
|
|
10
|
+
if (fileList.length) {
|
|
11
|
+
inputEl.files = fileList;
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { setInputElFile };
|
|
16
|
+
//# sourceMappingURL=setInputElFile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setInputElFile.js","sources":["../../../../../src/components/UploadFile/utils/setInputElFile/setInputElFile.ts"],"sourcesContent":["type SetInputElFileProps = {\n fileList: FileList;\n elementId: string;\n};\n\n/**\n * Updates the value of the files attribute held within an input elment. Used during DnD operations where\n * the input element's files need to kept in sync and updated.\n *\n * @param fileList - A list of files, typically extracted from the \"files\" attribute of an input element\n * @param elementId - The ID of the input element\n */\nexport const setInputElFile = ({ fileList, elementId }: SetInputElFileProps) => {\n const inputEl = document.getElementById(elementId) as HTMLInputElement;\n if (fileList.length) {\n inputEl.files = fileList;\n }\n};\n"],"names":[],"mappings":"AAKA;;;;;;AAMG;AACU,MAAA,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAuB,KAAI;IAC7E,MAAM,OAAO,GAAG,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAqB;IACtE,IAAI,QAAQ,CAAC,MAAM,EAAE;AACnB,QAAA,OAAO,CAAC,KAAK,GAAG,QAAQ;AACzB;AACH;;;;"}
|
|
@@ -1,23 +1,50 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
|
-
var
|
|
4
|
+
var index = require('../../theme/index.cjs');
|
|
5
5
|
var useSetScrollPosition = require('./hooks/useSetScrollPosition.cjs');
|
|
6
|
+
var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
|
|
7
|
+
var Button = require('../Button/Button.cjs');
|
|
8
|
+
var Skeleton = require('../Skeleton/Skeleton.cjs');
|
|
9
|
+
var LeftArrowIcon = require('../../icons/design-system/components/LeftArrowIcon.cjs');
|
|
10
|
+
var RightArrowIcon = require('../../icons/design-system/components/RightArrowIcon.cjs');
|
|
11
|
+
var ThreeDotsIcon = require('../../icons/custom/components/ThreeDotsIcon.cjs');
|
|
12
|
+
var buildClassnames = require('../../utils/buildClassnames.cjs');
|
|
13
|
+
require('uid/secure');
|
|
14
|
+
var ViewsContainer_module = require('./ViewsContainer.module.scss.cjs');
|
|
15
|
+
var form_module = require('../../utils/forms/form.module.scss.cjs');
|
|
6
16
|
|
|
7
17
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
8
18
|
|
|
9
19
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
20
|
|
|
11
|
-
const ViewsContainer = React__default.default.forwardRef(({ children, onClickMenu, ariaMenuControls, ariaMenuExpanded }, menuRef) => {
|
|
21
|
+
const ViewsContainer = React__default.default.forwardRef(({ children, className, style, onClickMenu, ariaMenuControls, ariaMenuExpanded, hasMoreViews, onFetchMoreViews, isLoadingMoreViews, compact = false, appearance = 'primary', menuButtonSlot, }, menuRef) => {
|
|
12
22
|
const viewsRef = React.useRef(null);
|
|
13
|
-
const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } = useSetScrollPosition.useSetScrollPosition(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } = useSetScrollPosition.useSetScrollPosition({
|
|
24
|
+
containerRef: viewsRef,
|
|
25
|
+
children,
|
|
26
|
+
hasMoreViews,
|
|
27
|
+
onFetchMoreViews,
|
|
28
|
+
isLoadingMoreViews,
|
|
29
|
+
});
|
|
30
|
+
const showCustomMenuButton = !onClickMenu && !!menuButtonSlot;
|
|
31
|
+
return (React__default.default.createElement(FlexRow.FlexRow, { className: buildClassnames.buildClassnames([ViewsContainer_module[`appearance-${appearance}`], className]), justifyContent: "between", flexWrap: "nowrap", style: style },
|
|
32
|
+
React__default.default.createElement(FlexRow.FlexRow, { className: buildClassnames.buildClassnames([ViewsContainer_module.viewsWrapper, compact && ViewsContainer_module.compact]), ref: viewsRef, id: "views", role: "tablist", gap: "sm", flexWrap: "nowrap" },
|
|
33
|
+
children,
|
|
34
|
+
isLoadingMoreViews && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
35
|
+
React__default.default.createElement(Skeleton.Skeleton, { width: "80px", height: "40px" }),
|
|
36
|
+
React__default.default.createElement(Skeleton.Skeleton, { width: "80px", height: "40px" }),
|
|
37
|
+
React__default.default.createElement(Skeleton.Skeleton, { width: "80px", height: "40px" })))),
|
|
38
|
+
React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", className: buildClassnames.buildClassnames([
|
|
39
|
+
ViewsContainer_module.buttonGroup,
|
|
40
|
+
showCustomMenuButton && ViewsContainer_module.customMenuButton,
|
|
41
|
+
]) },
|
|
42
|
+
React__default.default.createElement("div", { className: form_module.inputGroup },
|
|
43
|
+
(!leftDisabled || !rightDisabled) && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
44
|
+
React__default.default.createElement(Button.Button, { id: "left-arrow", className: ViewsContainer_module.scrollButton, iconSlot: React__default.default.createElement(LeftArrowIcon.ReactComponent, { color: index.theme.colors.neutral.ink.base }), disabled: leftDisabled, onClick: toPrevScrollPosition, variant: "flat", "aria-label": "move views to the left" }),
|
|
45
|
+
React__default.default.createElement(Button.Button, { id: "right-arrow", className: ViewsContainer_module.scrollButton, iconSlot: React__default.default.createElement(RightArrowIcon.ReactComponent, { color: index.theme.colors.neutral.ink.base }), disabled: rightDisabled, onClick: toNextScrollPosition, variant: "flat", "aria-label": "move views to the right" }))),
|
|
46
|
+
!menuButtonSlot && !!onClickMenu && (React__default.default.createElement(Button.Button, { className: ViewsContainer_module.menuButton, iconSlot: React__default.default.createElement(ThreeDotsIcon.ThreeDotsIcon, { color: index.theme.colors.neutral.ink.base }), variant: "flat", onClick: onClickMenu, "aria-label": "open menu", "aria-controls": ariaMenuControls, "aria-expanded": ariaMenuExpanded, "aria-haspopup": ariaMenuControls ? 'dialog' : undefined, ref: menuRef }))),
|
|
47
|
+
menuButtonSlot)));
|
|
21
48
|
});
|
|
22
49
|
|
|
23
50
|
exports.ViewsContainer = ViewsContainer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewsContainer.cjs","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"ViewsContainer.cjs","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref, Fragment } from 'react';\n\nimport { theme } from 'Theme';\nimport { ViewContainerProps } from './types';\nimport { useSetScrollPosition } from './hooks/useSetScrollPosition';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { Button } from '../Button';\nimport { Skeleton } from '../Skeleton';\nimport { LeftArrowIcon, RightArrowIcon, ThreeDotsIcon } from '../../icons';\nimport { buildClassnames } from '../../utils';\n\nimport styles from './ViewsContainer.module.scss';\nimport formStyles from '../../utils/forms/form.module.scss';\n\nexport const ViewsContainer = React.forwardRef<HTMLButtonElement, ViewContainerProps>(\n (\n {\n children,\n className,\n style,\n onClickMenu,\n ariaMenuControls,\n ariaMenuExpanded,\n hasMoreViews,\n onFetchMoreViews,\n isLoadingMoreViews,\n compact = false,\n appearance = 'primary',\n menuButtonSlot,\n }: ViewContainerProps,\n menuRef: Ref<HTMLButtonElement>,\n ) => {\n const viewsRef = useRef<HTMLDivElement>(null) as MutableRefObject<HTMLDivElement>;\n const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } =\n useSetScrollPosition({\n containerRef: viewsRef,\n children,\n hasMoreViews,\n onFetchMoreViews,\n isLoadingMoreViews,\n });\n\n const showCustomMenuButton = !onClickMenu && !!menuButtonSlot;\n\n return (\n <FlexRow\n className={buildClassnames([styles[`appearance-${appearance}`], className])}\n justifyContent=\"between\"\n flexWrap=\"nowrap\"\n style={style}\n >\n <FlexRow\n className={buildClassnames([styles.viewsWrapper, compact && styles.compact])}\n ref={viewsRef}\n id=\"views\"\n role=\"tablist\"\n gap=\"sm\"\n flexWrap=\"nowrap\"\n >\n {children}\n {isLoadingMoreViews && (\n <>\n <Skeleton width=\"80px\" height=\"40px\" />\n <Skeleton width=\"80px\" height=\"40px\" />\n <Skeleton width=\"80px\" height=\"40px\" />\n </>\n )}\n </FlexRow>\n\n <FlexRow\n flexWrap=\"nowrap\"\n className={buildClassnames([\n styles.buttonGroup,\n showCustomMenuButton && styles.customMenuButton,\n ])}\n >\n <div className={formStyles.inputGroup}>\n {(!leftDisabled || !rightDisabled) && (\n <>\n <Button\n id=\"left-arrow\"\n className={styles.scrollButton}\n iconSlot={<LeftArrowIcon color={theme.colors.neutral.ink.base} />}\n disabled={leftDisabled}\n onClick={toPrevScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the left\"\n />\n <Button\n id=\"right-arrow\"\n className={styles.scrollButton}\n iconSlot={<RightArrowIcon color={theme.colors.neutral.ink.base} />}\n disabled={rightDisabled}\n onClick={toNextScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the right\"\n />\n </>\n )}\n {!menuButtonSlot && !!onClickMenu && (\n <Button\n className={styles.menuButton}\n iconSlot={<ThreeDotsIcon color={theme.colors.neutral.ink.base} />}\n variant=\"flat\"\n onClick={onClickMenu}\n aria-label=\"open menu\"\n aria-controls={ariaMenuControls}\n aria-expanded={ariaMenuExpanded}\n aria-haspopup={ariaMenuControls ? 'dialog' : undefined}\n ref={menuRef}\n />\n )}\n </div>\n {menuButtonSlot}\n </FlexRow>\n </FlexRow>\n );\n },\n);\n"],"names":["React","useRef","useSetScrollPosition","FlexRow","buildClassnames","styles","Skeleton","formStyles","Button","LeftArrowIcon","theme","RightArrowIcon","ThreeDotsIcon"],"mappings":"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"}
|
|
@@ -1,17 +1,44 @@
|
|
|
1
1
|
import React__default, { useRef } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { theme } from '../../theme/index.js';
|
|
3
3
|
import { useSetScrollPosition } from './hooks/useSetScrollPosition.js';
|
|
4
|
+
import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
|
|
5
|
+
import { Button } from '../Button/Button.js';
|
|
6
|
+
import { Skeleton } from '../Skeleton/Skeleton.js';
|
|
7
|
+
import { ReactComponent as LeftArrowIcon } from '../../icons/design-system/components/LeftArrowIcon.js';
|
|
8
|
+
import { ReactComponent as RightArrowIcon } from '../../icons/design-system/components/RightArrowIcon.js';
|
|
9
|
+
import { ThreeDotsIcon } from '../../icons/custom/components/ThreeDotsIcon.js';
|
|
10
|
+
import { buildClassnames } from '../../utils/buildClassnames.js';
|
|
11
|
+
import 'uid/secure';
|
|
12
|
+
import styles from './ViewsContainer.module.scss.js';
|
|
13
|
+
import formStyles from '../../utils/forms/form.module.scss.js';
|
|
4
14
|
|
|
5
|
-
const ViewsContainer = React__default.forwardRef(({ children, onClickMenu, ariaMenuControls, ariaMenuExpanded }, menuRef) => {
|
|
15
|
+
const ViewsContainer = React__default.forwardRef(({ children, className, style, onClickMenu, ariaMenuControls, ariaMenuExpanded, hasMoreViews, onFetchMoreViews, isLoadingMoreViews, compact = false, appearance = 'primary', menuButtonSlot, }, menuRef) => {
|
|
6
16
|
const viewsRef = useRef(null);
|
|
7
|
-
const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } = useSetScrollPosition(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } = useSetScrollPosition({
|
|
18
|
+
containerRef: viewsRef,
|
|
19
|
+
children,
|
|
20
|
+
hasMoreViews,
|
|
21
|
+
onFetchMoreViews,
|
|
22
|
+
isLoadingMoreViews,
|
|
23
|
+
});
|
|
24
|
+
const showCustomMenuButton = !onClickMenu && !!menuButtonSlot;
|
|
25
|
+
return (React__default.createElement(FlexRow, { className: buildClassnames([styles[`appearance-${appearance}`], className]), justifyContent: "between", flexWrap: "nowrap", style: style },
|
|
26
|
+
React__default.createElement(FlexRow, { className: buildClassnames([styles.viewsWrapper, compact && styles.compact]), ref: viewsRef, id: "views", role: "tablist", gap: "sm", flexWrap: "nowrap" },
|
|
27
|
+
children,
|
|
28
|
+
isLoadingMoreViews && (React__default.createElement(React__default.Fragment, null,
|
|
29
|
+
React__default.createElement(Skeleton, { width: "80px", height: "40px" }),
|
|
30
|
+
React__default.createElement(Skeleton, { width: "80px", height: "40px" }),
|
|
31
|
+
React__default.createElement(Skeleton, { width: "80px", height: "40px" })))),
|
|
32
|
+
React__default.createElement(FlexRow, { flexWrap: "nowrap", className: buildClassnames([
|
|
33
|
+
styles.buttonGroup,
|
|
34
|
+
showCustomMenuButton && styles.customMenuButton,
|
|
35
|
+
]) },
|
|
36
|
+
React__default.createElement("div", { className: formStyles.inputGroup },
|
|
37
|
+
(!leftDisabled || !rightDisabled) && (React__default.createElement(React__default.Fragment, null,
|
|
38
|
+
React__default.createElement(Button, { id: "left-arrow", className: styles.scrollButton, iconSlot: React__default.createElement(LeftArrowIcon, { color: theme.colors.neutral.ink.base }), disabled: leftDisabled, onClick: toPrevScrollPosition, variant: "flat", "aria-label": "move views to the left" }),
|
|
39
|
+
React__default.createElement(Button, { id: "right-arrow", className: styles.scrollButton, iconSlot: React__default.createElement(RightArrowIcon, { color: theme.colors.neutral.ink.base }), disabled: rightDisabled, onClick: toNextScrollPosition, variant: "flat", "aria-label": "move views to the right" }))),
|
|
40
|
+
!menuButtonSlot && !!onClickMenu && (React__default.createElement(Button, { className: styles.menuButton, iconSlot: React__default.createElement(ThreeDotsIcon, { color: theme.colors.neutral.ink.base }), variant: "flat", onClick: onClickMenu, "aria-label": "open menu", "aria-controls": ariaMenuControls, "aria-expanded": ariaMenuExpanded, "aria-haspopup": ariaMenuControls ? 'dialog' : undefined, ref: menuRef }))),
|
|
41
|
+
menuButtonSlot)));
|
|
15
42
|
});
|
|
16
43
|
|
|
17
44
|
export { ViewsContainer };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ViewsContainer.js","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"ViewsContainer.js","sources":["../../../src/components/ViewsContainer/ViewsContainer.tsx"],"sourcesContent":["import React, { useRef, MutableRefObject, Ref, Fragment } from 'react';\n\nimport { theme } from 'Theme';\nimport { ViewContainerProps } from './types';\nimport { useSetScrollPosition } from './hooks/useSetScrollPosition';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { Button } from '../Button';\nimport { Skeleton } from '../Skeleton';\nimport { LeftArrowIcon, RightArrowIcon, ThreeDotsIcon } from '../../icons';\nimport { buildClassnames } from '../../utils';\n\nimport styles from './ViewsContainer.module.scss';\nimport formStyles from '../../utils/forms/form.module.scss';\n\nexport const ViewsContainer = React.forwardRef<HTMLButtonElement, ViewContainerProps>(\n (\n {\n children,\n className,\n style,\n onClickMenu,\n ariaMenuControls,\n ariaMenuExpanded,\n hasMoreViews,\n onFetchMoreViews,\n isLoadingMoreViews,\n compact = false,\n appearance = 'primary',\n menuButtonSlot,\n }: ViewContainerProps,\n menuRef: Ref<HTMLButtonElement>,\n ) => {\n const viewsRef = useRef<HTMLDivElement>(null) as MutableRefObject<HTMLDivElement>;\n const { rightDisabled, leftDisabled, toNextScrollPosition, toPrevScrollPosition } =\n useSetScrollPosition({\n containerRef: viewsRef,\n children,\n hasMoreViews,\n onFetchMoreViews,\n isLoadingMoreViews,\n });\n\n const showCustomMenuButton = !onClickMenu && !!menuButtonSlot;\n\n return (\n <FlexRow\n className={buildClassnames([styles[`appearance-${appearance}`], className])}\n justifyContent=\"between\"\n flexWrap=\"nowrap\"\n style={style}\n >\n <FlexRow\n className={buildClassnames([styles.viewsWrapper, compact && styles.compact])}\n ref={viewsRef}\n id=\"views\"\n role=\"tablist\"\n gap=\"sm\"\n flexWrap=\"nowrap\"\n >\n {children}\n {isLoadingMoreViews && (\n <>\n <Skeleton width=\"80px\" height=\"40px\" />\n <Skeleton width=\"80px\" height=\"40px\" />\n <Skeleton width=\"80px\" height=\"40px\" />\n </>\n )}\n </FlexRow>\n\n <FlexRow\n flexWrap=\"nowrap\"\n className={buildClassnames([\n styles.buttonGroup,\n showCustomMenuButton && styles.customMenuButton,\n ])}\n >\n <div className={formStyles.inputGroup}>\n {(!leftDisabled || !rightDisabled) && (\n <>\n <Button\n id=\"left-arrow\"\n className={styles.scrollButton}\n iconSlot={<LeftArrowIcon color={theme.colors.neutral.ink.base} />}\n disabled={leftDisabled}\n onClick={toPrevScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the left\"\n />\n <Button\n id=\"right-arrow\"\n className={styles.scrollButton}\n iconSlot={<RightArrowIcon color={theme.colors.neutral.ink.base} />}\n disabled={rightDisabled}\n onClick={toNextScrollPosition}\n variant=\"flat\"\n aria-label=\"move views to the right\"\n />\n </>\n )}\n {!menuButtonSlot && !!onClickMenu && (\n <Button\n className={styles.menuButton}\n iconSlot={<ThreeDotsIcon color={theme.colors.neutral.ink.base} />}\n variant=\"flat\"\n onClick={onClickMenu}\n aria-label=\"open menu\"\n aria-controls={ariaMenuControls}\n aria-expanded={ariaMenuExpanded}\n aria-haspopup={ariaMenuControls ? 'dialog' : undefined}\n ref={menuRef}\n />\n )}\n </div>\n {menuButtonSlot}\n </FlexRow>\n </FlexRow>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;;;;;;;;;AAca,MAAA,cAAc,GAAGA,cAAK,CAAC,UAAU,CAC5C,CACE,EACE,QAAQ,EACR,SAAS,EACT,KAAK,EACL,WAAW,EACX,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,kBAAkB,EAClB,OAAO,GAAG,KAAK,EACf,UAAU,GAAG,SAAS,EACtB,cAAc,GACK,EACrB,OAA+B,KAC7B;AACF,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAqC;IACjF,MAAM,EAAE,aAAa,EAAE,YAAY,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,GAC/E,oBAAoB,CAAC;AACnB,QAAA,YAAY,EAAE,QAAQ;QACtB,QAAQ;QACR,YAAY;QACZ,gBAAgB;QAChB,kBAAkB;AACnB,KAAA,CAAC;IAEJ,MAAM,oBAAoB,GAAG,CAAC,WAAW,IAAI,CAAC,CAAC,cAAc;AAE7D,IAAA,QACEA,cAAA,CAAA,aAAA,CAAC,OAAO,EAAA,EACN,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,CAAA,WAAA,EAAc,UAAU,CAAE,CAAA,CAAC,EAAE,SAAS,CAAC,CAAC,EAC3E,cAAc,EAAC,SAAS,EACxB,QAAQ,EAAC,QAAQ,EACjB,KAAK,EAAE,KAAK,EAAA;AAEZ,QAAAA,cAAA,CAAA,aAAA,CAAC,OAAO,EACN,EAAA,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC,EAC5E,GAAG,EAAE,QAAQ,EACb,EAAE,EAAC,OAAO,EACV,IAAI,EAAC,SAAS,EACd,GAAG,EAAC,IAAI,EACR,QAAQ,EAAC,QAAQ,EAAA;YAEhB,QAAQ;AACR,YAAA,kBAAkB,KACjBA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA;gBACEA,cAAC,CAAA,aAAA,CAAA,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAG,CAAA;gBACvCA,cAAC,CAAA,aAAA,CAAA,QAAQ,IAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAG,CAAA;AACvC,gBAAAA,cAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAA,CAAG,CACtC,CACJ,CACO;QAEVA,cAAC,CAAA,aAAA,CAAA,OAAO,IACN,QAAQ,EAAC,QAAQ,EACjB,SAAS,EAAE,eAAe,CAAC;AACzB,gBAAA,MAAM,CAAC,WAAW;gBAClB,oBAAoB,IAAI,MAAM,CAAC,gBAAgB;aAChD,CAAC,EAAA;AAEF,YAAAA,cAAA,CAAA,aAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAE,UAAU,CAAC,UAAU,EAAA;AAClC,gBAAA,CAAC,CAAC,YAAY,IAAI,CAAC,aAAa,MAC/BA,cAAA,CAAA,aAAA,CAAAA,cAAA,CAAA,QAAA,EAAA,IAAA;AACE,oBAAAA,cAAA,CAAA,aAAA,CAAC,MAAM,EACL,EAAA,EAAE,EAAC,YAAY,EACf,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,QAAQ,EAAEA,cAAA,CAAA,aAAA,CAAC,aAAa,EAAC,EAAA,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAI,CAAA,EACjE,QAAQ,EAAE,YAAY,EACtB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAC,MAAM,EAAA,YAAA,EACH,wBAAwB,EACnC,CAAA;oBACFA,cAAC,CAAA,aAAA,CAAA,MAAM,IACL,EAAE,EAAC,aAAa,EAChB,SAAS,EAAE,MAAM,CAAC,YAAY,EAC9B,QAAQ,EAAEA,cAAC,CAAA,aAAA,CAAA,cAAc,IAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAI,EAClE,QAAQ,EAAE,aAAa,EACvB,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAC,MAAM,EACH,YAAA,EAAA,yBAAyB,EACpC,CAAA,CACD,CACJ;AACA,gBAAA,CAAC,cAAc,IAAI,CAAC,CAAC,WAAW,KAC/BA,cAAA,CAAA,aAAA,CAAC,MAAM,EAAA,EACL,SAAS,EAAE,MAAM,CAAC,UAAU,EAC5B,QAAQ,EAAEA,cAAC,CAAA,aAAA,CAAA,aAAa,EAAC,EAAA,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAA,CAAI,EACjE,OAAO,EAAC,MAAM,EACd,OAAO,EAAE,WAAW,EACT,YAAA,EAAA,WAAW,EACP,eAAA,EAAA,gBAAgB,mBAChB,gBAAgB,EAAA,eAAA,EAChB,gBAAgB,GAAG,QAAQ,GAAG,SAAS,EACtD,GAAG,EAAE,OAAO,EAAA,CACZ,CACH,CACG;YACL,cAAc,CACP,CACF;AAEd,CAAC;;;;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
|
|
4
|
+
|
|
5
|
+
___$insertStyle("._viewsWrapper_lffdu_1 {\n overflow-x: scroll;\n -ms-overflow-style: none; /* for Internet Explorer, Edge */\n scrollbar-width: none; /* for Firefox */\n height: inherit;\n padding: var(--sizes-sm) 6px var(--sizes-sm) var(--sizes-3);\n margin-left: 0;\n}\n._viewsWrapper_lffdu_1 ::-webkit-scrollbar {\n display: none; /* for Chrome, Safari, and Opera */\n}\n._viewsWrapper_lffdu_1._compact_lffdu_12 {\n padding: var(--sizes-xs);\n}\n\n._appearance-primary_lffdu_16 {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._menuButton_lffdu_20 {\n background-color: white !important;\n}\n._menuButton_lffdu_20:hover {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._scrollButton_lffdu_27 {\n background-color: white !important;\n}\n._scrollButton_lffdu_27:disabled {\n background-color: white !important;\n}\n._scrollButton_lffdu_27:disabled svg {\n color: var(--colors-neutral-ink-lightest);\n}\n._scrollButton_lffdu_27:hover {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._buttonGroup_lffdu_40 {\n padding-right: var(--sizes-sm);\n}");
|
|
6
|
+
var styles = {"viewsWrapper":"_viewsWrapper_lffdu_1","compact":"_compact_lffdu_12","appearance-primary":"_appearance-primary_lffdu_16","menuButton":"_menuButton_lffdu_20","scrollButton":"_scrollButton_lffdu_27","buttonGroup":"_buttonGroup_lffdu_40"};
|
|
7
|
+
|
|
8
|
+
module.exports = styles;
|
|
9
|
+
//# sourceMappingURL=ViewsContainer.module.scss.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewsContainer.module.scss.cjs","sources":["../../../src/components/ViewsContainer/ViewsContainer.module.scss"],"sourcesContent":[".viewsWrapper {\n overflow-x: scroll;\n -ms-overflow-style: none; /* for Internet Explorer, Edge */\n scrollbar-width: none; /* for Firefox */\n\n ::-webkit-scrollbar {\n display: none; /* for Chrome, Safari, and Opera */\n }\n\n height: inherit;\n padding: var(--sizes-sm) 6px var(--sizes-sm) var(--sizes-3);\n margin-left: 0;\n\n &.compact {\n padding: var(--sizes-xs);\n }\n}\n\n.appearance-primary {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n// using important to override styled-component styles on button\n.menuButton {\n background-color: white !important;\n\n &:hover {\n background-color: var(--colors-neutral-grey-lightest);\n }\n}\n\n// using important to override styled-component styles on button\n.scrollButton {\n background-color: white !important;\n\n &:disabled {\n background-color: white !important;\n & svg {\n color: var(--colors-neutral-ink-lightest);\n }\n }\n\n &:hover {\n background-color: var(--colors-neutral-grey-lightest);\n }\n}\n\n.buttonGroup {\n padding-right: var(--sizes-sm);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,wkCAAA;AACA,aAAA,CAAA,cAAA,CAAA,uBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,8BAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,cAAA,CAAA,wBAAA,CAAA,aAAA,CAAA,uBAAA;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import insertStyle from '../../_virtual/____insertStyle.js';
|
|
2
|
+
|
|
3
|
+
insertStyle("._viewsWrapper_lffdu_1 {\n overflow-x: scroll;\n -ms-overflow-style: none; /* for Internet Explorer, Edge */\n scrollbar-width: none; /* for Firefox */\n height: inherit;\n padding: var(--sizes-sm) 6px var(--sizes-sm) var(--sizes-3);\n margin-left: 0;\n}\n._viewsWrapper_lffdu_1 ::-webkit-scrollbar {\n display: none; /* for Chrome, Safari, and Opera */\n}\n._viewsWrapper_lffdu_1._compact_lffdu_12 {\n padding: var(--sizes-xs);\n}\n\n._appearance-primary_lffdu_16 {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._menuButton_lffdu_20 {\n background-color: white !important;\n}\n._menuButton_lffdu_20:hover {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._scrollButton_lffdu_27 {\n background-color: white !important;\n}\n._scrollButton_lffdu_27:disabled {\n background-color: white !important;\n}\n._scrollButton_lffdu_27:disabled svg {\n color: var(--colors-neutral-ink-lightest);\n}\n._scrollButton_lffdu_27:hover {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n._buttonGroup_lffdu_40 {\n padding-right: var(--sizes-sm);\n}");
|
|
4
|
+
var styles = {"viewsWrapper":"_viewsWrapper_lffdu_1","compact":"_compact_lffdu_12","appearance-primary":"_appearance-primary_lffdu_16","menuButton":"_menuButton_lffdu_20","scrollButton":"_scrollButton_lffdu_27","buttonGroup":"_buttonGroup_lffdu_40"};
|
|
5
|
+
|
|
6
|
+
export { styles as default };
|
|
7
|
+
//# sourceMappingURL=ViewsContainer.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ViewsContainer.module.scss.js","sources":["../../../src/components/ViewsContainer/ViewsContainer.module.scss"],"sourcesContent":[".viewsWrapper {\n overflow-x: scroll;\n -ms-overflow-style: none; /* for Internet Explorer, Edge */\n scrollbar-width: none; /* for Firefox */\n\n ::-webkit-scrollbar {\n display: none; /* for Chrome, Safari, and Opera */\n }\n\n height: inherit;\n padding: var(--sizes-sm) 6px var(--sizes-sm) var(--sizes-3);\n margin-left: 0;\n\n &.compact {\n padding: var(--sizes-xs);\n }\n}\n\n.appearance-primary {\n background-color: var(--colors-neutral-grey-lightest);\n}\n\n// using important to override styled-component styles on button\n.menuButton {\n background-color: white !important;\n\n &:hover {\n background-color: var(--colors-neutral-grey-lightest);\n }\n}\n\n// using important to override styled-component styles on button\n.scrollButton {\n background-color: white !important;\n\n &:disabled {\n background-color: white !important;\n & svg {\n color: var(--colors-neutral-ink-lightest);\n }\n }\n\n &:hover {\n background-color: var(--colors-neutral-grey-lightest);\n }\n}\n\n.buttonGroup {\n padding-right: var(--sizes-sm);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,wkCAAA;AACA,aAAA,CAAA,cAAA,CAAA,uBAAA,CAAA,SAAA,CAAA,mBAAA,CAAA,oBAAA,CAAA,8BAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,cAAA,CAAA,wBAAA,CAAA,aAAA,CAAA,uBAAA;;;;"}
|