Skip to content

Commit a288298

Browse files
authored
Merge pull request #300 from performant-software/feature/cdc308_media_upload_error
CDC #308 - Media Upload Error
2 parents d0809b3 + 55cefa4 commit a288298

File tree

10 files changed

+39
-17
lines changed

10 files changed

+39
-17
lines changed

packages/controlled-vocabulary/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/controlled-vocabulary",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of components to allow user to configure dropdown elements. Use with the \"controlled_vocabulary\" gem.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",
@@ -23,8 +23,8 @@
2323
"underscore": "^1.13.2"
2424
},
2525
"peerDependencies": {
26-
"@performant-software/semantic-components": "^2.2.14",
27-
"@performant-software/shared-components": "^2.2.14",
26+
"@performant-software/semantic-components": "^2.2.15",
27+
"@performant-software/shared-components": "^2.2.15",
2828
"react": ">= 16.13.1 < 19.0.0",
2929
"react-dom": ">= 16.13.1 < 19.0.0"
3030
},

packages/core-data/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/core-data",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of components used with the Core Data platform.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",
@@ -40,8 +40,8 @@
4040
"underscore": "^1.13.2"
4141
},
4242
"peerDependencies": {
43-
"@performant-software/geospatial": "^2.2.14",
44-
"@performant-software/shared-components": "^2.2.14",
43+
"@performant-software/geospatial": "^2.2.15",
44+
"@performant-software/shared-components": "^2.2.15",
4545
"@peripleo/maplibre": "^0.5.2",
4646
"@peripleo/peripleo": "^0.5.2",
4747
"react": ">= 16.13.1 < 19.0.0",

packages/geospatial/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/geospatial",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of components for all things map-related.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",

packages/semantic-ui/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/semantic-components",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of shared components based on the Semantic UI Framework.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",
@@ -35,7 +35,7 @@
3535
"zotero-translation-client": "^5.0.1"
3636
},
3737
"peerDependencies": {
38-
"@performant-software/shared-components": "^2.2.14",
38+
"@performant-software/shared-components": "^2.2.15",
3939
"@samvera/clover-iiif": "^2.3.2",
4040
"react": ">= 16.13.1 < 19.0.0",
4141
"react-dnd": "^11.1.3",

packages/semantic-ui/src/components/FileUploadModal.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ const FileUploadModal: ComponentType<any> = (props: Props) => {
448448
</Message.List>
449449
</Message>
450450
)}
451-
{ props.errors && (
451+
{ !_.isEmpty(props.errors) && (
452452
<Message
453453
error
454454
>

packages/shared/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/shared-components",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of shared, framework agnostic, components.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",

packages/storybook/src/semantic-ui/FileUploadModal.stories.js

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const Default = withWrapper((props) => (
5151
/>
5252
));
5353

54-
export const Errors = withWrapper((props) => (
54+
export const InputErrors = withWrapper((props) => (
5555
<FileUploadModal
5656
closeOnComplete={false}
5757
itemComponent={({
@@ -98,6 +98,28 @@ export const Errors = withWrapper((props) => (
9898
/>
9999
));
100100

101+
export const UploadErrors = withWrapper((props) => (
102+
<FileUploadModal
103+
errors={['File too large.']}
104+
itemComponent={({ item }) => (
105+
<Form.Input
106+
label='Name'
107+
value={item.name || ''}
108+
/>
109+
)}
110+
onAddFile={(file) => ({
111+
name: file.name,
112+
content: file,
113+
type: file.type
114+
})}
115+
onClose={props.onClose}
116+
onSave={() => {
117+
action('save')();
118+
return Promise.resolve();
119+
}}
120+
/>
121+
));
122+
101123
export const Images = withWrapper((props) => (
102124
<FileUploadModal
103125
itemComponent={({ item, onTextInputChange }) => (

packages/user-defined-fields/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/user-defined-fields",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of components used for allowing end users to define fields on models. Use with the \"user_defined_fields\" gem.",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",
@@ -23,8 +23,8 @@
2323
"underscore": "^1.13.2"
2424
},
2525
"peerDependencies": {
26-
"@performant-software/semantic-components": "^2.2.14",
27-
"@performant-software/shared-components": "^2.2.14",
26+
"@performant-software/semantic-components": "^2.2.15",
27+
"@performant-software/shared-components": "^2.2.15",
2828
"react": ">= 16.13.1 < 19.0.0",
2929
"react-dom": ">= 16.13.1 < 19.0.0"
3030
},

packages/visualize/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@performant-software/visualize",
3-
"version": "2.2.14",
3+
"version": "2.2.15",
44
"description": "A package of components used for data visualization",
55
"license": "MIT",
66
"main": "./dist/index.cjs.js",

react-components.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@
88
"packages/user-defined-fields",
99
"packages/visualize"
1010
],
11-
"version": "2.2.14"
11+
"version": "2.2.15"
1212
}

0 commit comments

Comments
 (0)