|
| 1 | +import { defineMessages } from 'react-intl'; |
| 2 | + |
| 3 | +export default (configContext) => { |
| 4 | + const { |
| 5 | + CompoundInput, |
| 6 | + AutocompleteInput, |
| 7 | + TextInput, |
| 8 | + OptionPickerInput, |
| 9 | + } = configContext.inputComponents; |
| 10 | + |
| 11 | + const { |
| 12 | + configKey: config, |
| 13 | + } = configContext.configHelpers; |
| 14 | + |
| 15 | + |
| 16 | + return { |
| 17 | + params: { |
| 18 | + [config]: { |
| 19 | + view: { |
| 20 | + type: CompoundInput, |
| 21 | + }, |
| 22 | + }, |
| 23 | + // core |
| 24 | + numberOfObjects: { |
| 25 | + [config]: { |
| 26 | + messages: defineMessages({ |
| 27 | + name: { |
| 28 | + id: 'field.BulkObjectEditBatchJob.numberOfObjects.name', |
| 29 | + defaultMessage: 'Number of objects', |
| 30 | + }, |
| 31 | + }), |
| 32 | + view: { |
| 33 | + type: TextInput, |
| 34 | + }, |
| 35 | + }, |
| 36 | + }, |
| 37 | + // core |
| 38 | + numberValue: { |
| 39 | + [config]: { |
| 40 | + messages: defineMessages({ |
| 41 | + name: { |
| 42 | + id: 'field.BulkObjectEditBatchJob.numberValue.name', |
| 43 | + defaultMessage: 'Other number', |
| 44 | + }, |
| 45 | + }), |
| 46 | + view: { |
| 47 | + type: TextInput, |
| 48 | + }, |
| 49 | + }, |
| 50 | + }, |
| 51 | + numberType: { |
| 52 | + [config]: { |
| 53 | + messages: defineMessages({ |
| 54 | + name: { |
| 55 | + id: 'field.BulkObjectEditBatchJob.numberType.name', |
| 56 | + defaultMessage: 'Other number type', |
| 57 | + }, |
| 58 | + }), |
| 59 | + view: { |
| 60 | + type: OptionPickerInput, |
| 61 | + props: { |
| 62 | + source: 'numberTypes', |
| 63 | + }, |
| 64 | + }, |
| 65 | + }, |
| 66 | + }, |
| 67 | + // core |
| 68 | + objectStatus: { |
| 69 | + [config]: { |
| 70 | + messages: defineMessages({ |
| 71 | + name: { |
| 72 | + id: 'field.BulkObjectEditBatchJob.objectStatus.name', |
| 73 | + defaultMessage: 'Object status', |
| 74 | + }, |
| 75 | + }), |
| 76 | + view: { |
| 77 | + type: OptionPickerInput, |
| 78 | + props: { |
| 79 | + source: 'objectStatuses', |
| 80 | + }, |
| 81 | + }, |
| 82 | + }, |
| 83 | + }, |
| 84 | + // core |
| 85 | + material: { |
| 86 | + [config]: { |
| 87 | + messages: defineMessages({ |
| 88 | + name: { |
| 89 | + id: 'field.BulkObjectEditBatchJob.material.name', |
| 90 | + defaultMessage: 'Material', |
| 91 | + }, |
| 92 | + }), |
| 93 | + view: { |
| 94 | + type: TextInput, |
| 95 | + }, |
| 96 | + }, |
| 97 | + }, |
| 98 | + // core |
| 99 | + briefDescription: { |
| 100 | + [config]: { |
| 101 | + messages: defineMessages({ |
| 102 | + name: { |
| 103 | + id: 'field.BulkObjectEditBatchJob.briefDescription.name', |
| 104 | + defaultMessage: 'Brief description', |
| 105 | + }, |
| 106 | + }), |
| 107 | + view: { |
| 108 | + type: TextInput, |
| 109 | + props: { |
| 110 | + multiline: true, |
| 111 | + }, |
| 112 | + }, |
| 113 | + }, |
| 114 | + }, |
| 115 | + // core |
| 116 | + objectName: { |
| 117 | + [config]: { |
| 118 | + messages: defineMessages({ |
| 119 | + name: { |
| 120 | + id: 'field.BulkObjectEditBatchJob.objectName.name', |
| 121 | + defaultMessage: 'Object name', |
| 122 | + }, |
| 123 | + }), |
| 124 | + view: { |
| 125 | + type: TextInput, |
| 126 | + }, |
| 127 | + }, |
| 128 | + }, |
| 129 | + // core |
| 130 | + responsibleDepartment: { |
| 131 | + [config]: { |
| 132 | + messages: defineMessages({ |
| 133 | + name: { |
| 134 | + id: 'field.BulkObjectEditBatchJob.responsibleDepartment.name', |
| 135 | + defaultMessage: 'Responsible department', |
| 136 | + }, |
| 137 | + }), |
| 138 | + view: { |
| 139 | + type: OptionPickerInput, |
| 140 | + props: { |
| 141 | + source: 'departments', |
| 142 | + }, |
| 143 | + }, |
| 144 | + }, |
| 145 | + }, |
| 146 | + // core |
| 147 | + fieldCollectionPlace: { |
| 148 | + [config]: { |
| 149 | + messages: defineMessages({ |
| 150 | + name: { |
| 151 | + id: 'field.BulkObjectEditBatchJob.fieldCollectionPlace.name', |
| 152 | + defaultMessage: 'Field collection place', |
| 153 | + }, |
| 154 | + }), |
| 155 | + view: { |
| 156 | + type: AutocompleteInput, |
| 157 | + props: { |
| 158 | + source: 'place/local,place/shared,place/tgn', |
| 159 | + }, |
| 160 | + }, |
| 161 | + }, |
| 162 | + }, |
| 163 | + // core |
| 164 | + fieldCollector: { |
| 165 | + [config]: { |
| 166 | + messages: defineMessages({ |
| 167 | + name: { |
| 168 | + id: 'field.BulkObjectEditBatchJob.fieldCollector.name', |
| 169 | + defaultMessage: 'Field collector', |
| 170 | + }, |
| 171 | + }), |
| 172 | + view: { |
| 173 | + type: AutocompleteInput, |
| 174 | + props: { |
| 175 | + source: 'person/local,person/shared,organization/local,organization/shared', |
| 176 | + }, |
| 177 | + }, |
| 178 | + }, |
| 179 | + }, |
| 180 | + // core |
| 181 | + objectProductionPlace: { |
| 182 | + [config]: { |
| 183 | + messages: defineMessages({ |
| 184 | + name: { |
| 185 | + id: 'field.BulkObjectEditBatchJob.objectProductionPlace.name', |
| 186 | + defaultMessage: 'Production Place', |
| 187 | + }, |
| 188 | + }), |
| 189 | + view: { |
| 190 | + type: TextInput, |
| 191 | + }, |
| 192 | + }, |
| 193 | + }, |
| 194 | + // core |
| 195 | + objectProductionPerson: { |
| 196 | + [config]: { |
| 197 | + messages: defineMessages({ |
| 198 | + name: { |
| 199 | + id: 'field.BulkObjectEditBatchJob.objectProductionPerson.name', |
| 200 | + defaultMessage: 'Production Person', |
| 201 | + }, |
| 202 | + }), |
| 203 | + view: { |
| 204 | + type: AutocompleteInput, |
| 205 | + props: { |
| 206 | + source: 'person/local,person/shared', |
| 207 | + }, |
| 208 | + }, |
| 209 | + }, |
| 210 | + }, |
| 211 | + contentPlace: { |
| 212 | + [config]: { |
| 213 | + messages: defineMessages({ |
| 214 | + name: { |
| 215 | + id: 'field.BulkObjectEditBatchJob.contentPlace.name', |
| 216 | + defaultMessage: 'Content place', |
| 217 | + }, |
| 218 | + }), |
| 219 | + view: { |
| 220 | + type: TextInput, |
| 221 | + }, |
| 222 | + }, |
| 223 | + }, |
| 224 | + // core |
| 225 | + assocPeople: { |
| 226 | + [config]: { |
| 227 | + messages: defineMessages({ |
| 228 | + name: { |
| 229 | + id: 'field.BulkObjectEditBatchJob.assocPeople.name', |
| 230 | + defaultMessage: 'Associated people', |
| 231 | + }, |
| 232 | + }), |
| 233 | + view: { |
| 234 | + type: TextInput, |
| 235 | + }, |
| 236 | + }, |
| 237 | + }, |
| 238 | + // naturalhistory |
| 239 | + taxon: { |
| 240 | + [config]: { |
| 241 | + messages: defineMessages({ |
| 242 | + name: { |
| 243 | + id: 'field.BulkObjectEditBatchJob.taxon.name', |
| 244 | + defaultMessage: 'Taxon', |
| 245 | + }, |
| 246 | + }), |
| 247 | + view: { |
| 248 | + type: AutocompleteInput, |
| 249 | + props: { |
| 250 | + source: 'taxon/local', |
| 251 | + }, |
| 252 | + }, |
| 253 | + }, |
| 254 | + }, |
| 255 | + }, |
| 256 | + }; |
| 257 | +}; |
0 commit comments