@defra/forms-model 3.0.440 → 3.0.441
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/module/components/file-types.js +48 -0
- package/dist/module/components/file-types.js.map +1 -0
- package/dist/module/components/index.js +1 -0
- package/dist/module/components/index.js.map +1 -1
- package/dist/types/components/file-types.d.ts +16 -0
- package/dist/types/components/file-types.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/file-types.ts +36 -0
- package/src/components/index.ts +5 -1
@@ -0,0 +1,48 @@
|
|
1
|
+
export const allDocumentTypes = [{
|
2
|
+
value: 'pdf',
|
3
|
+
text: 'PDF',
|
4
|
+
mimeType: 'application/pdf'
|
5
|
+
}, {
|
6
|
+
value: 'doc',
|
7
|
+
text: 'DOC',
|
8
|
+
mimeType: 'application/msword'
|
9
|
+
}, {
|
10
|
+
value: 'docx',
|
11
|
+
text: 'DOCX',
|
12
|
+
mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
13
|
+
}, {
|
14
|
+
value: 'odt',
|
15
|
+
text: 'ODT',
|
16
|
+
mimeType: 'application/vnd.oasis.opendocument.text'
|
17
|
+
}, {
|
18
|
+
value: 'txt',
|
19
|
+
text: 'TXT',
|
20
|
+
mimeType: 'text/plain'
|
21
|
+
}];
|
22
|
+
export const allImageTypes = [{
|
23
|
+
value: 'jpg',
|
24
|
+
text: 'JPG',
|
25
|
+
mimeType: 'image/jpeg'
|
26
|
+
}, {
|
27
|
+
value: 'png',
|
28
|
+
text: 'PNG',
|
29
|
+
mimeType: 'image/png'
|
30
|
+
}];
|
31
|
+
export const allTabularDataTypes = [{
|
32
|
+
value: 'xls',
|
33
|
+
text: 'XLS',
|
34
|
+
mimeType: 'application/vnd.ms-excel'
|
35
|
+
}, {
|
36
|
+
value: 'xlsx',
|
37
|
+
text: 'XLSX',
|
38
|
+
mimeType: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
39
|
+
}, {
|
40
|
+
value: 'csv',
|
41
|
+
text: 'CSV',
|
42
|
+
mimeType: 'text/csv'
|
43
|
+
}, {
|
44
|
+
value: 'ods',
|
45
|
+
text: 'ODS',
|
46
|
+
mimeType: 'application/vnd.oasis.opendocument.spreadsheet'
|
47
|
+
}];
|
48
|
+
//# sourceMappingURL=file-types.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file-types.js","names":["allDocumentTypes","value","text","mimeType","allImageTypes","allTabularDataTypes"],"sources":["../../../src/components/file-types.ts"],"sourcesContent":["export const allDocumentTypes = [\n { value: 'pdf', text: 'PDF', mimeType: 'application/pdf' },\n { value: 'doc', text: 'DOC', mimeType: 'application/msword' },\n {\n value: 'docx',\n text: 'DOCX',\n mimeType:\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'\n },\n {\n value: 'odt',\n text: 'ODT',\n mimeType: 'application/vnd.oasis.opendocument.text'\n },\n { value: 'txt', text: 'TXT', mimeType: 'text/plain' }\n]\n\nexport const allImageTypes = [\n { value: 'jpg', text: 'JPG', mimeType: 'image/jpeg' },\n { value: 'png', text: 'PNG', mimeType: 'image/png' }\n]\nexport const allTabularDataTypes = [\n { value: 'xls', text: 'XLS', mimeType: 'application/vnd.ms-excel' },\n {\n value: 'xlsx',\n text: 'XLSX',\n mimeType:\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'\n },\n { value: 'csv', text: 'CSV', mimeType: 'text/csv' },\n {\n value: 'ods',\n text: 'ODS',\n mimeType: 'application/vnd.oasis.opendocument.spreadsheet'\n }\n]\n"],"mappings":"AAAA,OAAO,MAAMA,gBAAgB,GAAG,CAC9B;EAAEC,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAkB,CAAC,EAC1D;EAAEF,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAqB,CAAC,EAC7D;EACEF,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,MAAM;EACZC,QAAQ,EACN;AACJ,CAAC,EACD;EACEF,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,KAAK;EACXC,QAAQ,EAAE;AACZ,CAAC,EACD;EAAEF,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAa,CAAC,CACtD;AAED,OAAO,MAAMC,aAAa,GAAG,CAC3B;EAAEH,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAa,CAAC,EACrD;EAAEF,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAY,CAAC,CACrD;AACD,OAAO,MAAME,mBAAmB,GAAG,CACjC;EAAEJ,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAA2B,CAAC,EACnE;EACEF,KAAK,EAAE,MAAM;EACbC,IAAI,EAAE,MAAM;EACZC,QAAQ,EACN;AACJ,CAAC,EACD;EAAEF,KAAK,EAAE,KAAK;EAAEC,IAAI,EAAE,KAAK;EAAEC,QAAQ,EAAE;AAAW,CAAC,EACnD;EACEF,KAAK,EAAE,KAAK;EACZC,IAAI,EAAE,KAAK;EACXC,QAAQ,EAAE;AACZ,CAAC,CACF","ignoreList":[]}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { ComponentTypes } from "./component-types.js";
|
2
2
|
export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalType, isContentType, isFormType, isListType } from "./helpers.js";
|
3
|
+
export { allDocumentTypes, allImageTypes, allTabularDataTypes } from "./file-types.js";
|
3
4
|
export { ComponentType } from "./enums.js";
|
4
5
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalType","isContentType","isFormType","isListType","ComponentType"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\n\nexport { ComponentType } from '~/src/components/enums.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentTypes","getComponentDefaults","hasConditionSupport","hasContent","hasContentField","hasFormField","hasHint","hasInputField","hasListField","hasSelectionFields","hasTitle","isConditionalType","isContentType","isFormType","isListType","allDocumentTypes","allImageTypes","allTabularDataTypes","ComponentType"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContent,\n hasContentField,\n hasFormField,\n hasHint,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle,\n isConditionalType,\n isContentType,\n isFormType,\n isListType\n} from '~/src/components/helpers.js'\nexport {\n allDocumentTypes,\n allImageTypes,\n allTabularDataTypes\n} from '~/src/components/file-types.js'\nexport { ComponentType } from '~/src/components/enums.js'\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,UAAU,EACVC,eAAe,EACfC,YAAY,EACZC,OAAO,EACPC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ,EACRC,iBAAiB,EACjBC,aAAa,EACbC,UAAU,EACVC,UAAU;AAEZ,SACEC,gBAAgB,EAChBC,aAAa,EACbC,mBAAmB;AAErB,SAASC,aAAa","ignoreList":[]}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export declare const allDocumentTypes: {
|
2
|
+
value: string;
|
3
|
+
text: string;
|
4
|
+
mimeType: string;
|
5
|
+
}[];
|
6
|
+
export declare const allImageTypes: {
|
7
|
+
value: string;
|
8
|
+
text: string;
|
9
|
+
mimeType: string;
|
10
|
+
}[];
|
11
|
+
export declare const allTabularDataTypes: {
|
12
|
+
value: string;
|
13
|
+
text: string;
|
14
|
+
mimeType: string;
|
15
|
+
}[];
|
16
|
+
//# sourceMappingURL=file-types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"file-types.d.ts","sourceRoot":"","sources":["../../../src/components/file-types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;GAe5B,CAAA;AAED,eAAO,MAAM,aAAa;;;;GAGzB,CAAA;AACD,eAAO,MAAM,mBAAmB;;;;GAc/B,CAAA"}
|
@@ -1,4 +1,5 @@
|
|
1
1
|
export { ComponentTypes } from '../components/component-types.js';
|
2
2
|
export { getComponentDefaults, hasConditionSupport, hasContent, hasContentField, hasFormField, hasHint, hasInputField, hasListField, hasSelectionFields, hasTitle, isConditionalType, isContentType, isFormType, isListType } from '../components/helpers.js';
|
3
|
+
export { allDocumentTypes, allImageTypes, allTabularDataTypes } from '../components/file-types.js';
|
3
4
|
export { ComponentType } from '../components/enums.js';
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AACpE,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,UAAU,EACV,eAAe,EACf,YAAY,EACZ,OAAO,EACP,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,UAAU,EACV,UAAU,EACX,MAAM,6BAA6B,CAAA;AACpC,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,mBAAmB,EACpB,MAAM,gCAAgC,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA"}
|
package/package.json
CHANGED
@@ -0,0 +1,36 @@
|
|
1
|
+
export const allDocumentTypes = [
|
2
|
+
{ value: 'pdf', text: 'PDF', mimeType: 'application/pdf' },
|
3
|
+
{ value: 'doc', text: 'DOC', mimeType: 'application/msword' },
|
4
|
+
{
|
5
|
+
value: 'docx',
|
6
|
+
text: 'DOCX',
|
7
|
+
mimeType:
|
8
|
+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
|
9
|
+
},
|
10
|
+
{
|
11
|
+
value: 'odt',
|
12
|
+
text: 'ODT',
|
13
|
+
mimeType: 'application/vnd.oasis.opendocument.text'
|
14
|
+
},
|
15
|
+
{ value: 'txt', text: 'TXT', mimeType: 'text/plain' }
|
16
|
+
]
|
17
|
+
|
18
|
+
export const allImageTypes = [
|
19
|
+
{ value: 'jpg', text: 'JPG', mimeType: 'image/jpeg' },
|
20
|
+
{ value: 'png', text: 'PNG', mimeType: 'image/png' }
|
21
|
+
]
|
22
|
+
export const allTabularDataTypes = [
|
23
|
+
{ value: 'xls', text: 'XLS', mimeType: 'application/vnd.ms-excel' },
|
24
|
+
{
|
25
|
+
value: 'xlsx',
|
26
|
+
text: 'XLSX',
|
27
|
+
mimeType:
|
28
|
+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
29
|
+
},
|
30
|
+
{ value: 'csv', text: 'CSV', mimeType: 'text/csv' },
|
31
|
+
{
|
32
|
+
value: 'ods',
|
33
|
+
text: 'ODS',
|
34
|
+
mimeType: 'application/vnd.oasis.opendocument.spreadsheet'
|
35
|
+
}
|
36
|
+
]
|
package/src/components/index.ts
CHANGED
@@ -15,5 +15,9 @@ export {
|
|
15
15
|
isFormType,
|
16
16
|
isListType
|
17
17
|
} from '~/src/components/helpers.js'
|
18
|
-
|
18
|
+
export {
|
19
|
+
allDocumentTypes,
|
20
|
+
allImageTypes,
|
21
|
+
allTabularDataTypes
|
22
|
+
} from '~/src/components/file-types.js'
|
19
23
|
export { ComponentType } from '~/src/components/enums.js'
|