@dmptool/types 1.2.4 → 1.2.5
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.
|
@@ -183,6 +183,17 @@ const ResearchOutputLicenseColumnSchema = exports.TableColumn.extend({
|
|
|
183
183
|
labelTranslationKey: zod_1.z.string().default('researchOutput.license.heading')
|
|
184
184
|
}).default({})
|
|
185
185
|
});
|
|
186
|
+
const ResearchOutputCustomColumnSchema = exports.TableColumn.extend({
|
|
187
|
+
heading: zod_1.z.string().default('Custom Column'),
|
|
188
|
+
enabled: zod_1.z.boolean().default(false),
|
|
189
|
+
content: textQuestions_1.TextQuestionSchema.extend({
|
|
190
|
+
attributes: zod_1.z.object({
|
|
191
|
+
help: zod_1.z.string().default('Explanation of what we expect the user to enter.'),
|
|
192
|
+
maxLength: zod_1.z.number().default(255),
|
|
193
|
+
defaultValue: zod_1.z.string().optional(),
|
|
194
|
+
}).default({})
|
|
195
|
+
}).default({ type: 'text' })
|
|
196
|
+
});
|
|
186
197
|
const defaultTitleColumn = ResearchOutputTitleColumnSchema.parse({
|
|
187
198
|
required: true,
|
|
188
199
|
content: { type: 'text' }
|
|
@@ -199,6 +210,7 @@ const defaultByteSizeColumn = ResearchOutputByteSizeColumnSchema.parse({});
|
|
|
199
210
|
const defaultRepositoryColumn = ResearchOutputRepositoryColumnSchema.parse({});
|
|
200
211
|
const defaultMetadataStandardColumn = ResearchOutputMetadataStandardColumnSchema.parse({});
|
|
201
212
|
const defaultLicenseColumn = ResearchOutputLicenseColumnSchema.parse({});
|
|
213
|
+
const defaultCustomColumn = ResearchOutputCustomColumnSchema.parse({});
|
|
202
214
|
exports.ResearchOutputTableQuestionSchema = exports.TableQuestionSchema.merge(zod_1.z.object({
|
|
203
215
|
type: zod_1.z.literal('researchOutputTable'),
|
|
204
216
|
columns: zod_1.z.array(exports.TableColumn).default([
|
|
@@ -211,6 +223,7 @@ exports.ResearchOutputTableQuestionSchema = exports.TableQuestionSchema.merge(zo
|
|
|
211
223
|
defaultByteSizeColumn,
|
|
212
224
|
defaultRepositoryColumn,
|
|
213
225
|
defaultMetadataStandardColumn,
|
|
214
|
-
defaultLicenseColumn
|
|
226
|
+
defaultLicenseColumn,
|
|
227
|
+
defaultCustomColumn
|
|
215
228
|
]),
|
|
216
229
|
}));
|
|
@@ -1663,6 +1663,24 @@
|
|
|
1663
1663
|
"help": "Select license(s) you would prefer users to apply to the research output",
|
|
1664
1664
|
"labelTranslationKey": "researchOutput.license.heading"
|
|
1665
1665
|
}
|
|
1666
|
+
},
|
|
1667
|
+
{
|
|
1668
|
+
"heading": "Custom Column",
|
|
1669
|
+
"required": false,
|
|
1670
|
+
"enabled": false,
|
|
1671
|
+
"content": {
|
|
1672
|
+
"type": "text",
|
|
1673
|
+
"attributes": {
|
|
1674
|
+
"help": "Explanation of what we expect the user to enter.",
|
|
1675
|
+
"maxLength": 255
|
|
1676
|
+
},
|
|
1677
|
+
"meta": {
|
|
1678
|
+
"schemaVersion": "1.0"
|
|
1679
|
+
}
|
|
1680
|
+
},
|
|
1681
|
+
"meta": {
|
|
1682
|
+
"schemaVersion": "1.0"
|
|
1683
|
+
}
|
|
1666
1684
|
}
|
|
1667
1685
|
]
|
|
1668
1686
|
}
|