@dmptool/types 1.2.4 → 1.2.6
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/dist/questions/index.d.ts +1507 -2166
- package/dist/questions/tableQuestions.d.ts +1602 -2261
- package/dist/questions/tableQuestions.js +30 -2
- package/dist/schemas/anyQuestion.schema.json +902 -166
- package/package.json +2 -2
|
@@ -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,9 +210,25 @@ 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({});
|
|
214
|
+
// Add this BEFORE ResearchOutputTableQuestionSchema
|
|
215
|
+
const AnyResearchOutputColumnSchema = zod_1.z.union([
|
|
216
|
+
ResearchOutputTitleColumnSchema,
|
|
217
|
+
ResearchOutputDescriptionColumnSchema,
|
|
218
|
+
ResearchOutputOutputTypeColumnSchema,
|
|
219
|
+
ResearchOutputDataFlagsColumnSchema,
|
|
220
|
+
ResearchOutputAccessLevelColumnSchema,
|
|
221
|
+
ResearchOutputReleaseDateColumnSchema,
|
|
222
|
+
ResearchOutputByteSizeColumnSchema,
|
|
223
|
+
ResearchOutputRepositoryColumnSchema,
|
|
224
|
+
ResearchOutputMetadataStandardColumnSchema,
|
|
225
|
+
ResearchOutputLicenseColumnSchema,
|
|
226
|
+
ResearchOutputCustomColumnSchema,
|
|
227
|
+
]);
|
|
228
|
+
// Update ResearchOutputTableQuestionSchema
|
|
202
229
|
exports.ResearchOutputTableQuestionSchema = exports.TableQuestionSchema.merge(zod_1.z.object({
|
|
203
230
|
type: zod_1.z.literal('researchOutputTable'),
|
|
204
|
-
columns: zod_1.z.array(
|
|
231
|
+
columns: zod_1.z.array(AnyResearchOutputColumnSchema).default([
|
|
205
232
|
defaultTitleColumn,
|
|
206
233
|
defaultDescriptionColumn,
|
|
207
234
|
defaultOutputTypeColumn,
|
|
@@ -211,6 +238,7 @@ exports.ResearchOutputTableQuestionSchema = exports.TableQuestionSchema.merge(zo
|
|
|
211
238
|
defaultByteSizeColumn,
|
|
212
239
|
defaultRepositoryColumn,
|
|
213
240
|
defaultMetadataStandardColumn,
|
|
214
|
-
defaultLicenseColumn
|
|
241
|
+
defaultLicenseColumn,
|
|
242
|
+
defaultCustomColumn
|
|
215
243
|
]),
|
|
216
244
|
}));
|