@performant-software/semantic-components 1.0.4-beta.6 → 1.0.4-beta.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/semantic-components",
3
- "version": "1.0.4-beta.6",
3
+ "version": "1.0.4-beta.7",
4
4
  "description": "A package of shared components based on the Semantic UI Framework.",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -12,7 +12,7 @@
12
12
  "build": "webpack --mode production && flow-copy-source -v src types"
13
13
  },
14
14
  "dependencies": {
15
- "@performant-software/shared-components": "^1.0.4-beta.6",
15
+ "@performant-software/shared-components": "^1.0.4-beta.7",
16
16
  "@react-google-maps/api": "^2.8.1",
17
17
  "axios": "^0.26.1",
18
18
  "citeproc": "^2.4.62",
@@ -96,7 +96,9 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
96
96
  * Sets the <code>hasUploadErrors</code> value to <code>true</code> if at least one file uploaded with
97
97
  * an error status.
98
98
  */
99
- const hasUploaderErrors = useMemo(() => _.find(_.values(statuses), (status) => status === Status.error), [statuses]);
99
+ const hasUploadErrors = useMemo(() => (
100
+ !!_.find(_.values(statuses), (status) => status === Status.error)
101
+ ), [statuses]);
100
102
 
101
103
  /**
102
104
  * Calls the <code>onAddFile</code> prop for each item in the passed collection of files and adds them
@@ -375,7 +377,7 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
375
377
  </Message.List>
376
378
  </Message>
377
379
  )}
378
- { hasUploaderErrors && (
380
+ { hasUploadErrors && (
379
381
  <Message
380
382
  content={i18n.t('FileUploadModal.errors.upload.content')}
381
383
  header={i18n.t('FileUploadModal.errors.upload.header')}
@@ -404,7 +406,7 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
404
406
  >
405
407
  { props.strategy === Strategy.single && (
406
408
  <FileUploadStatus
407
- status={item.status}
409
+ status={statuses[index]}
408
410
  />
409
411
  )}
410
412
  </UploadItem>
@@ -96,7 +96,9 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
96
96
  * Sets the <code>hasUploadErrors</code> value to <code>true</code> if at least one file uploaded with
97
97
  * an error status.
98
98
  */
99
- const hasUploaderErrors = useMemo(() => _.find(_.values(statuses), (status) => status === Status.error), [statuses]);
99
+ const hasUploadErrors = useMemo(() => (
100
+ !!_.find(_.values(statuses), (status) => status === Status.error)
101
+ ), [statuses]);
100
102
 
101
103
  /**
102
104
  * Calls the <code>onAddFile</code> prop for each item in the passed collection of files and adds them
@@ -375,7 +377,7 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
375
377
  </Message.List>
376
378
  </Message>
377
379
  )}
378
- { hasUploaderErrors && (
380
+ { hasUploadErrors && (
379
381
  <Message
380
382
  content={i18n.t('FileUploadModal.errors.upload.content')}
381
383
  header={i18n.t('FileUploadModal.errors.upload.header')}
@@ -404,7 +406,7 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
404
406
  >
405
407
  { props.strategy === Strategy.single && (
406
408
  <FileUploadStatus
407
- status={item.status}
409
+ status={statuses[index]}
408
410
  />
409
411
  )}
410
412
  </UploadItem>