@performant-software/semantic-components 1.0.10-beta.1 → 1.0.10-beta.2

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.10-beta.1",
3
+ "version": "1.0.10-beta.2",
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.10-beta.1",
15
+ "@performant-software/shared-components": "^1.0.10-beta.2",
16
16
  "@react-google-maps/api": "^2.8.1",
17
17
  "axios": "^0.26.1",
18
18
  "i18next": "^19.4.4",
@@ -28,6 +28,11 @@ type Props = {
28
28
  */
29
29
  closeOnComplete?: boolean,
30
30
 
31
+ /**
32
+ * Component to render at top of modal.
33
+ */
34
+ headerComponent?: ComponentType<any>,
35
+
31
36
  /**
32
37
  * Component to render within the modal.
33
38
  */
@@ -343,6 +348,13 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
343
348
  );
344
349
  }, [statuses, props.strategy]);
345
350
 
351
+ /**
352
+ * Memoization and case correction for the <code>headerComponent</code> prop.
353
+ *
354
+ * @type {React$AbstractComponent<*, *>}
355
+ */
356
+ const HeaderComponent = useMemo(() => props.headerComponent, [props.headerComponent]);
357
+
346
358
  /**
347
359
  * Memoization and case correction for the <code>itemComponent</code> prop.
348
360
  *
@@ -404,6 +416,13 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
404
416
  <FileUpload
405
417
  onFilesAdded={onAddFiles}
406
418
  />
419
+ { HeaderComponent && (
420
+ <HeaderComponent
421
+ items={items}
422
+ onSetItems={setItems}
423
+ uploading={uploading}
424
+ />
425
+ )}
407
426
  <Item.Group
408
427
  as={Form}
409
428
  divided
@@ -28,6 +28,11 @@ type Props = {
28
28
  */
29
29
  closeOnComplete?: boolean,
30
30
 
31
+ /**
32
+ * Component to render at top of modal.
33
+ */
34
+ headerComponent?: ComponentType<any>,
35
+
31
36
  /**
32
37
  * Component to render within the modal.
33
38
  */
@@ -343,6 +348,13 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
343
348
  );
344
349
  }, [statuses, props.strategy]);
345
350
 
351
+ /**
352
+ * Memoization and case correction for the <code>headerComponent</code> prop.
353
+ *
354
+ * @type {React$AbstractComponent<*, *>}
355
+ */
356
+ const HeaderComponent = useMemo(() => props.headerComponent, [props.headerComponent]);
357
+
346
358
  /**
347
359
  * Memoization and case correction for the <code>itemComponent</code> prop.
348
360
  *
@@ -404,6 +416,13 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
404
416
  <FileUpload
405
417
  onFilesAdded={onAddFiles}
406
418
  />
419
+ { HeaderComponent && (
420
+ <HeaderComponent
421
+ items={items}
422
+ onSetItems={setItems}
423
+ uploading={uploading}
424
+ />
425
+ )}
407
426
  <Item.Group
408
427
  as={Form}
409
428
  divided