@defra/forms-model 3.0.234 → 3.0.236
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/component-types.js +1 -19
- package/dist/module/components/component-types.js.map +1 -1
- package/dist/module/components/enums.js +0 -6
- package/dist/module/components/enums.js.map +1 -1
- package/dist/module/components/helpers.js +1 -1
- package/dist/module/components/helpers.js.map +1 -1
- package/dist/module/components/index.js +1 -1
- package/dist/module/components/index.js.map +1 -1
- package/dist/module/components/types.js.map +1 -1
- package/dist/types/components/component-types.d.ts +1 -4
- package/dist/types/components/component-types.d.ts.map +1 -1
- package/dist/types/components/enums.d.ts +0 -5
- package/dist/types/components/enums.d.ts.map +1 -1
- package/dist/types/components/helpers.d.ts +1 -3
- package/dist/types/components/helpers.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +1 -1
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/types.d.ts +1 -1
- package/dist/types/components/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/components/component-types.ts +2 -22
- package/src/components/enums.ts +0 -6
- package/src/components/helpers.ts +1 -0
- package/src/components/index.ts +1 -1
- package/src/components/types.ts +1 -0
@@ -1,4 +1,4 @@
|
|
1
|
-
import {
|
1
|
+
import { ComponentType } from "./enums.js";
|
2
2
|
/**
|
3
3
|
* Defaults for creating new components
|
4
4
|
*/
|
@@ -6,7 +6,6 @@ export const ComponentTypes = [{
|
|
6
6
|
name: 'TextField',
|
7
7
|
title: 'Text field',
|
8
8
|
type: ComponentType.TextField,
|
9
|
-
subType: ComponentSubType.Field,
|
10
9
|
hint: '',
|
11
10
|
options: {},
|
12
11
|
schema: {}
|
@@ -14,7 +13,6 @@ export const ComponentTypes = [{
|
|
14
13
|
name: 'MultilineTextField',
|
15
14
|
title: 'Multiline text field',
|
16
15
|
type: ComponentType.MultilineTextField,
|
17
|
-
subType: ComponentSubType.Field,
|
18
16
|
hint: '',
|
19
17
|
options: {},
|
20
18
|
schema: {}
|
@@ -22,7 +20,6 @@ export const ComponentTypes = [{
|
|
22
20
|
name: 'YesNoField',
|
23
21
|
title: 'Yes/No field',
|
24
22
|
type: ComponentType.YesNoField,
|
25
|
-
subType: ComponentSubType.Field,
|
26
23
|
hint: '',
|
27
24
|
options: {},
|
28
25
|
schema: {}
|
@@ -30,7 +27,6 @@ export const ComponentTypes = [{
|
|
30
27
|
name: 'TimeField',
|
31
28
|
title: 'Time field',
|
32
29
|
type: ComponentType.TimeField,
|
33
|
-
subType: ComponentSubType.Field,
|
34
30
|
hint: '',
|
35
31
|
options: {},
|
36
32
|
schema: {}
|
@@ -38,7 +34,6 @@ export const ComponentTypes = [{
|
|
38
34
|
name: 'DatePartsField',
|
39
35
|
title: 'Date field',
|
40
36
|
type: ComponentType.DatePartsField,
|
41
|
-
subType: ComponentSubType.Field,
|
42
37
|
hint: '',
|
43
38
|
options: {},
|
44
39
|
schema: {}
|
@@ -46,7 +41,6 @@ export const ComponentTypes = [{
|
|
46
41
|
name: 'MonthYearField',
|
47
42
|
title: 'Month & year field',
|
48
43
|
type: ComponentType.MonthYearField,
|
49
|
-
subType: ComponentSubType.Field,
|
50
44
|
hint: '',
|
51
45
|
options: {},
|
52
46
|
schema: {}
|
@@ -54,7 +48,6 @@ export const ComponentTypes = [{
|
|
54
48
|
name: 'SelectField',
|
55
49
|
title: 'Select field',
|
56
50
|
type: ComponentType.SelectField,
|
57
|
-
subType: ComponentSubType.ListField,
|
58
51
|
options: {},
|
59
52
|
schema: {},
|
60
53
|
list: ''
|
@@ -62,7 +55,6 @@ export const ComponentTypes = [{
|
|
62
55
|
name: 'AutocompleteField',
|
63
56
|
title: 'Autocomplete field',
|
64
57
|
type: ComponentType.AutocompleteField,
|
65
|
-
subType: ComponentSubType.ListField,
|
66
58
|
options: {},
|
67
59
|
schema: {},
|
68
60
|
list: ''
|
@@ -70,7 +62,6 @@ export const ComponentTypes = [{
|
|
70
62
|
name: 'RadiosField',
|
71
63
|
title: 'Radios field',
|
72
64
|
type: ComponentType.RadiosField,
|
73
|
-
subType: ComponentSubType.ListField,
|
74
65
|
options: {},
|
75
66
|
schema: {},
|
76
67
|
list: ''
|
@@ -78,7 +69,6 @@ export const ComponentTypes = [{
|
|
78
69
|
name: 'CheckboxesField',
|
79
70
|
title: 'Checkboxes field',
|
80
71
|
type: ComponentType.CheckboxesField,
|
81
|
-
subType: ComponentSubType.ListField,
|
82
72
|
options: {},
|
83
73
|
schema: {},
|
84
74
|
list: ''
|
@@ -86,7 +76,6 @@ export const ComponentTypes = [{
|
|
86
76
|
name: 'NumberField',
|
87
77
|
title: 'Number field',
|
88
78
|
type: ComponentType.NumberField,
|
89
|
-
subType: ComponentSubType.Field,
|
90
79
|
hint: '',
|
91
80
|
options: {},
|
92
81
|
schema: {}
|
@@ -94,7 +83,6 @@ export const ComponentTypes = [{
|
|
94
83
|
name: 'UkAddressField',
|
95
84
|
title: 'UK address field',
|
96
85
|
type: ComponentType.UkAddressField,
|
97
|
-
subType: ComponentSubType.Field,
|
98
86
|
hint: '',
|
99
87
|
options: {},
|
100
88
|
schema: {}
|
@@ -102,7 +90,6 @@ export const ComponentTypes = [{
|
|
102
90
|
name: 'TelephoneNumberField',
|
103
91
|
title: 'Telephone number field',
|
104
92
|
type: ComponentType.TelephoneNumberField,
|
105
|
-
subType: ComponentSubType.Field,
|
106
93
|
hint: '',
|
107
94
|
options: {},
|
108
95
|
schema: {}
|
@@ -110,7 +97,6 @@ export const ComponentTypes = [{
|
|
110
97
|
name: 'EmailAddressField',
|
111
98
|
title: 'Email address field',
|
112
99
|
type: ComponentType.EmailAddressField,
|
113
|
-
subType: ComponentSubType.Field,
|
114
100
|
hint: 'For example, ‘name@example.com’',
|
115
101
|
options: {},
|
116
102
|
schema: {}
|
@@ -118,7 +104,6 @@ export const ComponentTypes = [{
|
|
118
104
|
name: 'Html',
|
119
105
|
title: 'Html',
|
120
106
|
type: ComponentType.Html,
|
121
|
-
subType: ComponentSubType.Content,
|
122
107
|
content: '',
|
123
108
|
options: {},
|
124
109
|
schema: {}
|
@@ -126,7 +111,6 @@ export const ComponentTypes = [{
|
|
126
111
|
name: 'InsetText',
|
127
112
|
title: 'Inset text',
|
128
113
|
type: ComponentType.InsetText,
|
129
|
-
subType: ComponentSubType.Content,
|
130
114
|
content: '',
|
131
115
|
options: {},
|
132
116
|
schema: {}
|
@@ -134,7 +118,6 @@ export const ComponentTypes = [{
|
|
134
118
|
name: 'Details',
|
135
119
|
title: 'Details',
|
136
120
|
type: ComponentType.Details,
|
137
|
-
subType: ComponentSubType.Content,
|
138
121
|
content: '',
|
139
122
|
options: {},
|
140
123
|
schema: {}
|
@@ -142,7 +125,6 @@ export const ComponentTypes = [{
|
|
142
125
|
name: 'List',
|
143
126
|
title: 'List',
|
144
127
|
type: ComponentType.List,
|
145
|
-
subType: ComponentSubType.Content,
|
146
128
|
options: {},
|
147
129
|
schema: {},
|
148
130
|
list: ''
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component-types.js","names":["
|
1
|
+
{"version":3,"file":"component-types.js","names":["ComponentType","ComponentTypes","name","title","type","TextField","hint","options","schema","MultilineTextField","YesNoField","TimeField","DatePartsField","MonthYearField","SelectField","list","AutocompleteField","RadiosField","CheckboxesField","NumberField","UkAddressField","TelephoneNumberField","EmailAddressField","Html","content","InsetText","Details","List"],"sources":["../../../src/components/component-types.ts"],"sourcesContent":["import { ComponentType } from '~/src/components/enums.js'\nimport { type ComponentDef } from '~/src/components/types.js'\n\n/**\n * Defaults for creating new components\n */\nexport const ComponentTypes: ComponentDef[] = [\n {\n name: 'TextField',\n title: 'Text field',\n type: ComponentType.TextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MultilineTextField',\n title: 'Multiline text field',\n type: ComponentType.MultilineTextField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'YesNoField',\n title: 'Yes/No field',\n type: ComponentType.YesNoField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TimeField',\n title: 'Time field',\n type: ComponentType.TimeField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'DatePartsField',\n title: 'Date field',\n type: ComponentType.DatePartsField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'MonthYearField',\n title: 'Month & year field',\n type: ComponentType.MonthYearField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'SelectField',\n title: 'Select field',\n type: ComponentType.SelectField,\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'AutocompleteField',\n title: 'Autocomplete field',\n type: ComponentType.AutocompleteField,\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'RadiosField',\n title: 'Radios field',\n type: ComponentType.RadiosField,\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'CheckboxesField',\n title: 'Checkboxes field',\n type: ComponentType.CheckboxesField,\n options: {},\n schema: {},\n list: ''\n },\n {\n name: 'NumberField',\n title: 'Number field',\n type: ComponentType.NumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'UkAddressField',\n title: 'UK address field',\n type: ComponentType.UkAddressField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'TelephoneNumberField',\n title: 'Telephone number field',\n type: ComponentType.TelephoneNumberField,\n hint: '',\n options: {},\n schema: {}\n },\n {\n name: 'EmailAddressField',\n title: 'Email address field',\n type: ComponentType.EmailAddressField,\n hint: 'For example, ‘name@example.com’',\n options: {},\n schema: {}\n },\n {\n name: 'Html',\n title: 'Html',\n type: ComponentType.Html,\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'InsetText',\n title: 'Inset text',\n type: ComponentType.InsetText,\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'Details',\n title: 'Details',\n type: ComponentType.Details,\n content: '',\n options: {},\n schema: {}\n },\n {\n name: 'List',\n title: 'List',\n type: ComponentType.List,\n options: {},\n schema: {},\n list: ''\n }\n]\n"],"mappings":"AAAA,SAASA,aAAa;AAGtB;AACA;AACA;AACA,OAAO,MAAMC,cAA8B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,EACD;EACEN,IAAI,EAAE,mBAAmB;EACzBC,KAAK,EAAE,qBAAqB;EAC5BC,IAAI,EAAEJ,aAAa,CAACsB,iBAAiB;EACrChB,IAAI,EAAE,iCAAiC;EACvCC,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEJ,aAAa,CAACuB,IAAI;EACxBC,OAAO,EAAE,EAAE;EACXjB,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,YAAY;EACnBC,IAAI,EAAEJ,aAAa,CAACyB,SAAS;EAC7BD,OAAO,EAAE,EAAE;EACXjB,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,IAAI,EAAEJ,aAAa,CAAC0B,OAAO;EAC3BF,OAAO,EAAE,EAAE;EACXjB,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC;AACX,CAAC,EACD;EACEN,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,MAAM;EACbC,IAAI,EAAEJ,aAAa,CAAC2B,IAAI;EACxBpB,OAAO,EAAE,CAAC,CAAC;EACXC,MAAM,EAAE,CAAC,CAAC;EACVO,IAAI,EAAE;AACR,CAAC,CACF","ignoreList":[]}
|
@@ -19,10 +19,4 @@ export let ComponentType = /*#__PURE__*/function (ComponentType) {
|
|
19
19
|
ComponentType["List"] = "List";
|
20
20
|
return ComponentType;
|
21
21
|
}({});
|
22
|
-
export let ComponentSubType = /*#__PURE__*/function (ComponentSubType) {
|
23
|
-
ComponentSubType["Content"] = "content";
|
24
|
-
ComponentSubType["Field"] = "field";
|
25
|
-
ComponentSubType["ListField"] = "listField";
|
26
|
-
return ComponentSubType;
|
27
|
-
}({});
|
28
22
|
//# sourceMappingURL=enums.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.js","names":["ComponentType"
|
1
|
+
{"version":3,"file":"enums.js","names":["ComponentType"],"sources":["../../../src/components/enums.ts"],"sourcesContent":["export enum ComponentType {\n TextField = 'TextField',\n MultilineTextField = 'MultilineTextField',\n YesNoField = 'YesNoField',\n TimeField = 'TimeField',\n DatePartsField = 'DatePartsField',\n MonthYearField = 'MonthYearField',\n SelectField = 'SelectField',\n AutocompleteField = 'AutocompleteField',\n RadiosField = 'RadiosField',\n CheckboxesField = 'CheckboxesField',\n NumberField = 'NumberField',\n UkAddressField = 'UkAddressField',\n TelephoneNumberField = 'TelephoneNumberField',\n EmailAddressField = 'EmailAddressField',\n Html = 'Html',\n InsetText = 'InsetText',\n Details = 'Details',\n List = 'List'\n}\n"],"mappings":"AAAA,WAAYA,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA","ignoreList":[]}
|
@@ -43,7 +43,7 @@ export function hasEditor(component) {
|
|
43
43
|
* Filter known components with input fields
|
44
44
|
*/
|
45
45
|
export function hasInputField(component) {
|
46
|
-
const allowedTypes = [ComponentType.TextField, ComponentType.EmailAddressField, ComponentType.NumberField, ComponentType.MultilineTextField, ComponentType.TelephoneNumberField, ComponentType.YesNoField, ComponentType.MonthYearField, ComponentType.TimeField, ComponentType.UkAddressField];
|
46
|
+
const allowedTypes = [ComponentType.TextField, ComponentType.EmailAddressField, ComponentType.NumberField, ComponentType.MultilineTextField, ComponentType.TelephoneNumberField, ComponentType.YesNoField, ComponentType.MonthYearField, ComponentType.TimeField, ComponentType.DatePartsField, ComponentType.UkAddressField];
|
47
47
|
return !!component?.type && allowedTypes.includes(component.type);
|
48
48
|
}
|
49
49
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","names":["ComponentTypes","ComponentType","getComponentDefaults","component","type","find","hasConditionSupport","isConditionalType","allowedTypes","RadiosField","CheckboxesField","DatePartsField","EmailAddressField","MultilineTextField","NumberField","TextField","TimeField","YesNoField","includes","hasContentField","Details","Html","InsetText","hasEditor","TelephoneNumberField","AutocompleteField","SelectField","List","hasInputField","MonthYearField","UkAddressField","hasListField","hasSelectionFields","hasTitle","deniedTypes"],"sources":["../../../src/components/helpers.ts"],"sourcesContent":["import { ComponentTypes } from '~/src/components/component-types.js'\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type InputFieldsComponentsDef,\n type ComponentDef,\n type ConditionalComponentsDef,\n type ConditionalComponentType,\n type ContentComponentsDef,\n type HtmlComponent,\n type InsetTextComponent,\n type ListComponentsDef,\n type SelectionComponentsDef,\n type EditorComponentsDef\n} from '~/src/components/types.js'\n\n/**\n * Return component defaults by type\n */\nexport function getComponentDefaults(component?: Partial<ComponentDef>) {\n if (!component?.type) {\n return\n }\n\n return ComponentTypes.find(({ type }) => type === component.type)\n}\n\n/**\n * Filter known components with support for conditions\n */\nexport function hasConditionSupport(\n component?: Partial<ComponentDef>\n): component is ConditionalComponentsDef {\n return isConditionalType(component?.type)\n}\n\nexport function isConditionalType(\n type?: ComponentType\n): type is ConditionalComponentType {\n const allowedTypes = [\n ComponentType.RadiosField,\n ComponentType.CheckboxesField,\n ComponentType.DatePartsField,\n ComponentType.EmailAddressField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.TextField,\n ComponentType.TimeField,\n ComponentType.YesNoField\n ]\n\n return !!type && allowedTypes.includes(type)\n}\n\n/**\n * Filter known components with content fields\n */\nexport function hasContentField(\n component?: Partial<ComponentDef>\n): component is ContentComponentsDef {\n const allowedTypes = [\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with text editor or list select\n */\nexport function hasEditor(\n component?: Partial<ComponentDef>\n): component is EditorComponentsDef {\n const allowedTypes = [\n ComponentType.TextField,\n ComponentType.EmailAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField,\n ComponentType.RadiosField,\n ComponentType.CheckboxesField,\n ComponentType.List,\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.DatePartsField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with input fields\n */\nexport function hasInputField(\n component?: Partial<ComponentDef>\n): component is InputFieldsComponentsDef {\n const allowedTypes = [\n ComponentType.TextField,\n ComponentType.EmailAddressField,\n ComponentType.NumberField,\n ComponentType.MultilineTextField,\n ComponentType.TelephoneNumberField,\n ComponentType.YesNoField,\n ComponentType.MonthYearField,\n ComponentType.TimeField,\n ComponentType.UkAddressField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with lists\n */\nexport function hasListField(\n component?: Partial<ComponentDef>\n): component is ListComponentsDef {\n const allowedTypes = [\n ComponentType.AutocompleteField,\n ComponentType.List,\n ComponentType.RadiosField,\n ComponentType.SelectField,\n ComponentType.CheckboxesField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with selection fields\n */\nexport function hasSelectionFields(\n component?: Partial<ComponentDef>\n): component is SelectionComponentsDef {\n const allowedTypes = [\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.SelectField,\n ComponentType.YesNoField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with titles\n */\nexport function hasTitle(\n component?: Partial<ComponentDef>\n): component is Exclude<ComponentDef, InsetTextComponent | HtmlComponent> {\n const deniedTypes = [ComponentType.InsetText, ComponentType.Html]\n return !!component?.type && !deniedTypes.includes(component.type)\n}\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SAASC,aAAa;AActB;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACC,SAAiC,EAAE;EACtE,IAAI,CAACA,SAAS,EAAEC,IAAI,EAAE;IACpB;EACF;EAEA,OAAOJ,cAAc,CAACK,IAAI,CAAC,CAAC;IAAED;EAAK,CAAC,KAAKA,IAAI,KAAKD,SAAS,CAACC,IAAI,CAAC;AACnE;;AAEA;AACA;AACA;AACA,OAAO,SAASE,mBAAmBA,CACjCH,SAAiC,EACM;EACvC,OAAOI,iBAAiB,CAACJ,SAAS,EAAEC,IAAI,CAAC;AAC3C;AAEA,OAAO,SAASG,iBAAiBA,CAC/BH,IAAoB,EACc;EAClC,MAAMI,YAAY,GAAG,CACnBP,aAAa,CAACQ,WAAW,EACzBR,aAAa,CAACS,eAAe,EAC7BT,aAAa,CAACU,cAAc,EAC5BV,aAAa,CAACW,iBAAiB,EAC/BX,aAAa,CAACY,kBAAkB,EAChCZ,aAAa,CAACa,WAAW,EACzBb,aAAa,CAACc,SAAS,EACvBd,aAAa,CAACe,SAAS,EACvBf,aAAa,CAACgB,UAAU,CACzB;EAED,OAAO,CAAC,CAACb,IAAI,IAAII,YAAY,CAACU,QAAQ,CAACd,IAAI,CAAC;AAC9C;;AAEA;AACA;AACA;AACA,OAAO,SAASe,eAAeA,CAC7BhB,SAAiC,EACE;EACnC,MAAMK,YAAY,GAAG,CACnBP,aAAa,CAACmB,OAAO,EACrBnB,aAAa,CAACoB,IAAI,EAClBpB,aAAa,CAACqB,SAAS,CACxB;EAED,OAAO,CAAC,CAACnB,SAAS,EAAEC,IAAI,IAAII,YAAY,CAACU,QAAQ,CAACf,SAAS,CAACC,IAAI,CAAC;AACnE;;AAEA;AACA;AACA;AACA,OAAO,SAASmB,SAASA,CACvBp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AAO,CAAC,CAACP,SAAS,EAAEC,IAAI,IAAII,YAAY,CAACU,QAAQ,CAACf,SAAS,CAACC,IAAI,CAAC;AACnE;;AAEA;AACA;AACA;AACA,OAAO,SAAS4B,kBAAkBA,CAChC7B,SAAiC,EACI;EACrC,MAAMK,YAAY,GAAG,CACnBP,aAAa,CAACS,eAAe,EAC7BT,aAAa,CAACQ,WAAW,EACzBR,aAAa,CAACyB,WAAW,EACzBzB,aAAa,CAACgB,UAAU,CACzB;EAED,OAAO,CAAC,CAACd,SAAS,EAAEC,IAAI,IAAII,YAAY,CAACU,QAAQ,CAACf,SAAS,CAACC,IAAI,CAAC;AACnE;;AAEA;AACA;AACA;AACA,OAAO,SAAS6B,QAAQA,CACtB9B,SAAiC,EACuC;EACxE,MAAM+B,WAAW,GAAG,CAACjC,aAAa,CAACqB,SAAS,EAAErB,aAAa,CAACoB,IAAI,CAAC;EACjE,OAAO,CAAC,CAAClB,SAAS,EAAEC,IAAI,IAAI,CAAC8B,WAAW,CAAChB,QAAQ,CAACf,SAAS,CAACC,IAAI,CAAC;AACnE","ignoreList":[]}
|
1
|
+
{"version":3,"file":"helpers.js","names":["ComponentTypes","ComponentType","getComponentDefaults","component","type","find","hasConditionSupport","isConditionalType","allowedTypes","RadiosField","CheckboxesField","DatePartsField","EmailAddressField","MultilineTextField","NumberField","TextField","TimeField","YesNoField","includes","hasContentField","Details","Html","InsetText","hasEditor","TelephoneNumberField","AutocompleteField","SelectField","List","hasInputField","MonthYearField","UkAddressField","hasListField","hasSelectionFields","hasTitle","deniedTypes"],"sources":["../../../src/components/helpers.ts"],"sourcesContent":["import { ComponentTypes } from '~/src/components/component-types.js'\nimport { ComponentType } from '~/src/components/enums.js'\nimport {\n type InputFieldsComponentsDef,\n type ComponentDef,\n type ConditionalComponentsDef,\n type ConditionalComponentType,\n type ContentComponentsDef,\n type HtmlComponent,\n type InsetTextComponent,\n type ListComponentsDef,\n type SelectionComponentsDef,\n type EditorComponentsDef\n} from '~/src/components/types.js'\n\n/**\n * Return component defaults by type\n */\nexport function getComponentDefaults(component?: Partial<ComponentDef>) {\n if (!component?.type) {\n return\n }\n\n return ComponentTypes.find(({ type }) => type === component.type)\n}\n\n/**\n * Filter known components with support for conditions\n */\nexport function hasConditionSupport(\n component?: Partial<ComponentDef>\n): component is ConditionalComponentsDef {\n return isConditionalType(component?.type)\n}\n\nexport function isConditionalType(\n type?: ComponentType\n): type is ConditionalComponentType {\n const allowedTypes = [\n ComponentType.RadiosField,\n ComponentType.CheckboxesField,\n ComponentType.DatePartsField,\n ComponentType.EmailAddressField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.TextField,\n ComponentType.TimeField,\n ComponentType.YesNoField\n ]\n\n return !!type && allowedTypes.includes(type)\n}\n\n/**\n * Filter known components with content fields\n */\nexport function hasContentField(\n component?: Partial<ComponentDef>\n): component is ContentComponentsDef {\n const allowedTypes = [\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with text editor or list select\n */\nexport function hasEditor(\n component?: Partial<ComponentDef>\n): component is EditorComponentsDef {\n const allowedTypes = [\n ComponentType.TextField,\n ComponentType.EmailAddressField,\n ComponentType.TelephoneNumberField,\n ComponentType.MultilineTextField,\n ComponentType.NumberField,\n ComponentType.AutocompleteField,\n ComponentType.SelectField,\n ComponentType.RadiosField,\n ComponentType.CheckboxesField,\n ComponentType.List,\n ComponentType.Details,\n ComponentType.Html,\n ComponentType.InsetText,\n ComponentType.DatePartsField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with input fields\n */\nexport function hasInputField(\n component?: Partial<ComponentDef>\n): component is InputFieldsComponentsDef {\n const allowedTypes = [\n ComponentType.TextField,\n ComponentType.EmailAddressField,\n ComponentType.NumberField,\n ComponentType.MultilineTextField,\n ComponentType.TelephoneNumberField,\n ComponentType.YesNoField,\n ComponentType.MonthYearField,\n ComponentType.TimeField,\n ComponentType.DatePartsField,\n ComponentType.UkAddressField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with lists\n */\nexport function hasListField(\n component?: Partial<ComponentDef>\n): component is ListComponentsDef {\n const allowedTypes = [\n ComponentType.AutocompleteField,\n ComponentType.List,\n ComponentType.RadiosField,\n ComponentType.SelectField,\n ComponentType.CheckboxesField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with selection fields\n */\nexport function hasSelectionFields(\n component?: Partial<ComponentDef>\n): component is SelectionComponentsDef {\n const allowedTypes = [\n ComponentType.CheckboxesField,\n ComponentType.RadiosField,\n ComponentType.SelectField,\n ComponentType.YesNoField\n ]\n\n return !!component?.type && allowedTypes.includes(component.type)\n}\n\n/**\n * Filter known components with titles\n */\nexport function hasTitle(\n component?: Partial<ComponentDef>\n): component is Exclude<ComponentDef, InsetTextComponent | HtmlComponent> {\n const deniedTypes = [ComponentType.InsetText, ComponentType.Html]\n return !!component?.type && !deniedTypes.includes(component.type)\n}\n"],"mappings":"AAAA,SAASA,cAAc;AACvB,SAASC,aAAa;AActB;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAACC,SAAiC,EAAE;EACtE,IAAI,CAACA,SAAS,EAAEC,IAAI,EAAE;IACpB;EACF;EAEA,OAAOJ,cAAc,CAACK,IAAI,CAAC,CAAC;IAAED;EAAK,CAAC,KAAKA,IAAI,KAAKD,SAAS,CAACC,IAAI,CAAC;AACnE;;AAEA;AACA;AACA;AACA,OAAO,SAASE,mBAAmBA,CACjCH,SAAiC,EACM;EACvC,OAAOI,iBAAiB,CAACJ,SAAS,EAAEC,IAAI,CAAC;AAC3C;AAEA,OAAO,SAASG,iBAAiBA,CAC/BH,IAAoB,EACc;EAClC,MAAMI,YAAY,GAAG,CACnBP,aAAa,CAACQ,WAAW,EACzBR,aAAa,CAACS,eAAe,EAC7BT,aAAa,CAACU,cAAc,EAC5BV,aAAa,CA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AACC,IAAI,CAAC;AACnE","ignoreList":[]}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
export { ComponentTypes } from "./component-types.js";
|
2
2
|
export { getComponentDefaults, hasConditionSupport, hasContentField, hasEditor, hasInputField, hasListField, hasSelectionFields, hasTitle } from "./helpers.js";
|
3
|
-
export { ComponentType
|
3
|
+
export { ComponentType } from "./enums.js";
|
4
4
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","names":["ComponentTypes","getComponentDefaults","hasConditionSupport","hasContentField","hasEditor","hasInputField","hasListField","hasSelectionFields","hasTitle","ComponentType"
|
1
|
+
{"version":3,"file":"index.js","names":["ComponentTypes","getComponentDefaults","hasConditionSupport","hasContentField","hasEditor","hasInputField","hasListField","hasSelectionFields","hasTitle","ComponentType"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export { ComponentTypes } from '~/src/components/component-types.js'\nexport {\n getComponentDefaults,\n hasConditionSupport,\n hasContentField,\n hasEditor,\n hasInputField,\n hasListField,\n hasSelectionFields,\n hasTitle\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,eAAe,EACfC,SAAS,EACTC,aAAa,EACbC,YAAY,EACZC,kBAAkB,EAClBC,QAAQ;AAGV,SAASC,aAAa","ignoreList":[]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\n\nexport type ConditionalComponentType =\n | ComponentType.RadiosField\n | ComponentType.CheckboxesField\n | ComponentType.DatePartsField\n | ComponentType.EmailAddressField\n | ComponentType.MultilineTextField\n | ComponentType.NumberField\n | ComponentType.TextField\n | ComponentType.TimeField\n | ComponentType.YesNoField\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\ninterface TextFieldBase {\n type:\n | ComponentType.EmailAddressField\n | ComponentType.MultilineTextField\n | ComponentType.NumberField\n | ComponentType.TelephoneNumberField\n | ComponentType.TextField\n | ComponentType.UkAddressField\n | ComponentType.YesNoField\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n allow?: string\n autocomplete?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n error?: unknown\n }\n}\n\ninterface NumberFieldBase {\n type: ComponentType\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n prefix?: string\n suffix?: string\n }\n schema: {\n min?: number\n max?: number\n precision?: number\n }\n}\n\ninterface ListFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.List\n | ComponentType.RadiosField\n | ComponentType.SelectField\n name: string\n title: string\n options: {\n type?: string\n required?: boolean\n optionalText?: boolean\n classes?: string\n bold?: boolean\n }\n list: string\n schema: object\n}\n\ninterface ContentFieldBase {\n type: ComponentType.Details | ComponentType.Html | ComponentType.InsetText\n name: string\n title: string\n content: string\n options: {\n condition?: string\n }\n schema: object\n}\n\ninterface DateFieldBase {\n type:\n | ComponentType.DatePartsField\n | ComponentType.MonthYearField\n | ComponentType.TimeField\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n maxDaysInFuture?: number\n maxDaysInPast?: number\n }\n schema: object\n}\n\n// Text Fields\nexport interface TextFieldComponent extends TextFieldBase {\n type: ComponentType.TextField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends TextFieldBase {\n type: ComponentType.EmailAddressField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends NumberFieldBase {\n type: ComponentType.NumberField\n options: NumberFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends TextFieldBase {\n type: ComponentType.TelephoneNumberField\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface YesNoFieldComponent extends TextFieldBase {\n type: ComponentType.YesNoField\n options: TextFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends TextFieldBase {\n type: ComponentType.MultilineTextField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n }\n}\n\nexport interface UkAddressFieldComponent extends TextFieldBase {\n type: ComponentType.UkAddressField\n options: TextFieldBase['options'] & {\n hideTitle?: boolean\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface TimeFieldComponent extends DateFieldBase {\n type: ComponentType.TimeField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n}\n\n// List Fields\nexport interface ListComponent extends ListFieldBase {\n type: ComponentType.List\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & { autocomplete?: string }\n}\n\nexport type ComponentDef =\n | InsetTextComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | DatePartsFieldFieldComponent\n | MonthYearFieldComponent\n | DetailsComponent\n | EmailAddressFieldComponent\n | HtmlComponent\n | ListComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | TelephoneNumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | YesNoFieldComponent\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | YesNoFieldComponent\n | MonthYearFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n\n// Components with editors\nexport type EditorComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | TelephoneNumberFieldComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | AutocompleteFieldComponent\n | SelectFieldComponent\n | RadiosFieldComponent\n | CheckboxesFieldComponent\n | ListComponent\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n | DatePartsFieldFieldComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | ListComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have custom condition operators\nexport type ConditionalComponentsDef =\n | CheckboxesFieldComponent\n | DatePartsFieldFieldComponent\n | EmailAddressFieldComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | YesNoFieldComponent\n"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../src/components/types.ts"],"sourcesContent":["import { type ComponentType } from '~/src/components/enums.js'\n\nexport type ConditionalComponentType =\n | ComponentType.RadiosField\n | ComponentType.CheckboxesField\n | ComponentType.DatePartsField\n | ComponentType.EmailAddressField\n | ComponentType.MultilineTextField\n | ComponentType.NumberField\n | ComponentType.TextField\n | ComponentType.TimeField\n | ComponentType.YesNoField\n\n/**\n * Types for Components JSON structure which are expected by engine and turned into actual form input/content/lists\n */\ninterface TextFieldBase {\n type:\n | ComponentType.EmailAddressField\n | ComponentType.MultilineTextField\n | ComponentType.NumberField\n | ComponentType.TelephoneNumberField\n | ComponentType.TextField\n | ComponentType.UkAddressField\n | ComponentType.YesNoField\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n allow?: string\n autocomplete?: string\n }\n schema: {\n max?: number\n min?: number\n length?: number\n regex?: string\n error?: unknown\n }\n}\n\ninterface NumberFieldBase {\n type: ComponentType\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n classes?: string\n prefix?: string\n suffix?: string\n }\n schema: {\n min?: number\n max?: number\n precision?: number\n }\n}\n\ninterface ListFieldBase {\n type:\n | ComponentType.AutocompleteField\n | ComponentType.CheckboxesField\n | ComponentType.List\n | ComponentType.RadiosField\n | ComponentType.SelectField\n name: string\n title: string\n options: {\n type?: string\n required?: boolean\n optionalText?: boolean\n classes?: string\n bold?: boolean\n }\n list: string\n schema: object\n}\n\ninterface ContentFieldBase {\n type: ComponentType.Details | ComponentType.Html | ComponentType.InsetText\n name: string\n title: string\n content: string\n options: {\n condition?: string\n }\n schema: object\n}\n\ninterface DateFieldBase {\n type:\n | ComponentType.DatePartsField\n | ComponentType.MonthYearField\n | ComponentType.TimeField\n name: string\n title: string\n hint?: string\n options: {\n required?: boolean\n optionalText?: boolean\n maxDaysInFuture?: number\n maxDaysInPast?: number\n }\n schema: object\n}\n\n// Text Fields\nexport interface TextFieldComponent extends TextFieldBase {\n type: ComponentType.TextField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface EmailAddressFieldComponent extends TextFieldBase {\n type: ComponentType.EmailAddressField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface NumberFieldComponent extends NumberFieldBase {\n type: ComponentType.NumberField\n options: NumberFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n }\n}\n\nexport interface TelephoneNumberFieldComponent extends TextFieldBase {\n type: ComponentType.TelephoneNumberField\n options: TextFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface YesNoFieldComponent extends TextFieldBase {\n type: ComponentType.YesNoField\n options: TextFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MultilineTextFieldComponent extends TextFieldBase {\n type: ComponentType.MultilineTextField\n options: TextFieldBase['options'] & {\n condition?: string\n customValidationMessage?: string\n rows?: number\n maxWords?: number\n }\n schema: {\n max?: number\n min?: number\n }\n}\n\nexport interface UkAddressFieldComponent extends TextFieldBase {\n type: ComponentType.UkAddressField\n options: TextFieldBase['options'] & {\n hideTitle?: boolean\n }\n}\n\n// Date Fields\nexport interface DatePartsFieldFieldComponent extends DateFieldBase {\n type: ComponentType.DatePartsField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface MonthYearFieldComponent extends DateFieldBase {\n type: ComponentType.MonthYearField\n options: DateFieldBase['options'] & {\n customValidationMessage?: string\n }\n}\n\nexport interface TimeFieldComponent extends DateFieldBase {\n type: ComponentType.TimeField\n options: DateFieldBase['options'] & {\n condition?: string\n }\n}\n\n// Content Fields\nexport interface DetailsComponent extends ContentFieldBase {\n type: ComponentType.Details\n}\n\nexport interface HtmlComponent extends ContentFieldBase {\n type: ComponentType.Html\n}\n\nexport interface InsetTextComponent extends ContentFieldBase {\n type: ComponentType.InsetText\n}\n\n// List Fields\nexport interface ListComponent extends ListFieldBase {\n type: ComponentType.List\n}\n\nexport interface AutocompleteFieldComponent extends ListFieldBase {\n type: ComponentType.AutocompleteField\n}\n\nexport interface CheckboxesFieldComponent extends ListFieldBase {\n type: ComponentType.CheckboxesField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface RadiosFieldComponent extends ListFieldBase {\n type: ComponentType.RadiosField\n options: ListFieldBase['options'] & {\n condition?: string\n }\n}\n\nexport interface SelectFieldComponent extends ListFieldBase {\n type: ComponentType.SelectField\n options: ListFieldBase['options'] & { autocomplete?: string }\n}\n\nexport type ComponentDef =\n | InsetTextComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | DatePartsFieldFieldComponent\n | MonthYearFieldComponent\n | DetailsComponent\n | EmailAddressFieldComponent\n | HtmlComponent\n | ListComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | TelephoneNumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | UkAddressFieldComponent\n | YesNoFieldComponent\n\n// Components that render inputs\nexport type InputFieldsComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | NumberFieldComponent\n | MultilineTextFieldComponent\n | TelephoneNumberFieldComponent\n | YesNoFieldComponent\n | MonthYearFieldComponent\n | TimeFieldComponent\n | DatePartsFieldFieldComponent\n | UkAddressFieldComponent\n\n// Components that render content\nexport type ContentComponentsDef =\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n\n// Components with editors\nexport type EditorComponentsDef =\n | TextFieldComponent\n | EmailAddressFieldComponent\n | TelephoneNumberFieldComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | AutocompleteFieldComponent\n | SelectFieldComponent\n | RadiosFieldComponent\n | CheckboxesFieldComponent\n | ListComponent\n | DetailsComponent\n | HtmlComponent\n | InsetTextComponent\n | DatePartsFieldFieldComponent\n\n// Components that render lists\nexport type ListComponentsDef =\n | ListComponent\n | AutocompleteFieldComponent\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n\n// Components that have selection fields\nexport type SelectionComponentsDef =\n | CheckboxesFieldComponent\n | RadiosFieldComponent\n | SelectFieldComponent\n | YesNoFieldComponent\n\n// Components that have custom condition operators\nexport type ConditionalComponentsDef =\n | CheckboxesFieldComponent\n | DatePartsFieldFieldComponent\n | EmailAddressFieldComponent\n | MultilineTextFieldComponent\n | NumberFieldComponent\n | TextFieldComponent\n | TimeFieldComponent\n | YesNoFieldComponent\n"],"mappings":"","ignoreList":[]}
|
@@ -1,9 +1,6 @@
|
|
1
|
-
import { ComponentSubType } from '../components/enums.js';
|
2
1
|
import { type ComponentDef } from '../components/types.js';
|
3
2
|
/**
|
4
3
|
* Defaults for creating new components
|
5
4
|
*/
|
6
|
-
export declare const ComponentTypes:
|
7
|
-
subType?: ComponentSubType;
|
8
|
-
})[];
|
5
|
+
export declare const ComponentTypes: ComponentDef[];
|
9
6
|
//# sourceMappingURL=component-types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"component-types.d.ts","sourceRoot":"","sources":["../../../src/components/component-types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,YAAY,EAiJxC,CAAA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd
|
1
|
+
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../../src/components/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,SAAS,cAAc;IACvB,kBAAkB,uBAAuB;IACzC,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,cAAc,mBAAmB;IACjC,cAAc,mBAAmB;IACjC,WAAW,gBAAgB;IAC3B,iBAAiB,sBAAsB;IACvC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,WAAW,gBAAgB;IAC3B,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,IAAI,SAAS;IACb,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd"}
|
@@ -3,9 +3,7 @@ import { type InputFieldsComponentsDef, type ComponentDef, type ConditionalCompo
|
|
3
3
|
/**
|
4
4
|
* Return component defaults by type
|
5
5
|
*/
|
6
|
-
export declare function getComponentDefaults(component?: Partial<ComponentDef>):
|
7
|
-
subType?: import("../components/enums.js").ComponentSubType;
|
8
|
-
}) | undefined;
|
6
|
+
export declare function getComponentDefaults(component?: Partial<ComponentDef>): ComponentDef | undefined;
|
9
7
|
/**
|
10
8
|
* Filter known components with support for conditions
|
11
9
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/components/helpers.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AACzD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,YAAY,EACjB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,KAAK,i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YAAY,CAAC,GAChC,SAAS,IAAI,iBAAiB,CAUhC;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,sBAAsB,CASrC;AAED;;GAEG;AACH,wBAAgB,QAAQ,CACtB,SAAS,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,GAChC,SAAS,IAAI,OAAO,CAAC,YAAY,EAAE,kBAAkB,GAAG,aAAa,CAAC,CAGxE"}
|
@@ -1,4 +1,4 @@
|
|
1
1
|
export { ComponentTypes } from '../components/component-types.js';
|
2
2
|
export { getComponentDefaults, hasConditionSupport, hasContentField, hasEditor, hasInputField, hasListField, hasSelectionFields, hasTitle } from '../components/helpers.js';
|
3
|
-
export { ComponentType
|
3
|
+
export { ComponentType } from '../components/enums.js';
|
4
4
|
//# 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,eAAe,EACf,SAAS,EACT,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACT,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,aAAa,EAAE,
|
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,eAAe,EACf,SAAS,EACT,aAAa,EACb,YAAY,EACZ,kBAAkB,EAClB,QAAQ,EACT,MAAM,6BAA6B,CAAA;AAEpC,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA"}
|
@@ -182,7 +182,7 @@ export interface SelectFieldComponent extends ListFieldBase {
|
|
182
182
|
};
|
183
183
|
}
|
184
184
|
export type ComponentDef = InsetTextComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | DatePartsFieldFieldComponent | MonthYearFieldComponent | DetailsComponent | EmailAddressFieldComponent | HtmlComponent | ListComponent | MultilineTextFieldComponent | NumberFieldComponent | RadiosFieldComponent | SelectFieldComponent | TelephoneNumberFieldComponent | TextFieldComponent | TimeFieldComponent | UkAddressFieldComponent | YesNoFieldComponent;
|
185
|
-
export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldComponent | NumberFieldComponent | MultilineTextFieldComponent | TelephoneNumberFieldComponent | YesNoFieldComponent | MonthYearFieldComponent | TimeFieldComponent | UkAddressFieldComponent;
|
185
|
+
export type InputFieldsComponentsDef = TextFieldComponent | EmailAddressFieldComponent | NumberFieldComponent | MultilineTextFieldComponent | TelephoneNumberFieldComponent | YesNoFieldComponent | MonthYearFieldComponent | TimeFieldComponent | DatePartsFieldFieldComponent | UkAddressFieldComponent;
|
186
186
|
export type ContentComponentsDef = DetailsComponent | HtmlComponent | InsetTextComponent;
|
187
187
|
export type EditorComponentsDef = TextFieldComponent | EmailAddressFieldComponent | TelephoneNumberFieldComponent | MultilineTextFieldComponent | NumberFieldComponent | AutocompleteFieldComponent | SelectFieldComponent | RadiosFieldComponent | CheckboxesFieldComponent | ListComponent | DetailsComponent | HtmlComponent | InsetTextComponent | DatePartsFieldFieldComponent;
|
188
188
|
export type ListComponentsDef = ListComponent | AutocompleteFieldComponent | CheckboxesFieldComponent | RadiosFieldComponent | SelectFieldComponent;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAE9D,MAAM,MAAM,wBAAwB,GAChC,aAAa,CAAC,WAAW,GACzB,aAAa,CAAC,eAAe,GAC7B,aAAa,CAAC,cAAc,GAC5B,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ACxB,aAAa,GACb,gBAAgB,GAChB,aAAa,GACb,kBAAkB,GAClB,4BAA4B,CAAA;AAGhC,MAAM,MAAM,iBAAiB,GACzB,aAAa,GACb,0BAA0B,GAC1B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,CAAA;AAGxB,MAAM,MAAM,sBAAsB,GAC9B,wBAAwB,GACxB,oBAAoB,GACpB,oBAAoB,GACpB,mBAAmB,CAAA;AAGvB,MAAM,MAAM,wBAAwB,GAChC,wBAAwB,GACxB,4BAA4B,GAC5B,0BAA0B,GAC1B,2BAA2B,GAC3B,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,mBAAmB,CAAA"}
|
package/package.json
CHANGED
@@ -1,17 +1,14 @@
|
|
1
|
-
import {
|
1
|
+
import { ComponentType } from '~/src/components/enums.js'
|
2
2
|
import { type ComponentDef } from '~/src/components/types.js'
|
3
3
|
|
4
4
|
/**
|
5
5
|
* Defaults for creating new components
|
6
6
|
*/
|
7
|
-
export const ComponentTypes:
|
8
|
-
subType?: ComponentSubType
|
9
|
-
})[] = [
|
7
|
+
export const ComponentTypes: ComponentDef[] = [
|
10
8
|
{
|
11
9
|
name: 'TextField',
|
12
10
|
title: 'Text field',
|
13
11
|
type: ComponentType.TextField,
|
14
|
-
subType: ComponentSubType.Field,
|
15
12
|
hint: '',
|
16
13
|
options: {},
|
17
14
|
schema: {}
|
@@ -20,7 +17,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
20
17
|
name: 'MultilineTextField',
|
21
18
|
title: 'Multiline text field',
|
22
19
|
type: ComponentType.MultilineTextField,
|
23
|
-
subType: ComponentSubType.Field,
|
24
20
|
hint: '',
|
25
21
|
options: {},
|
26
22
|
schema: {}
|
@@ -29,7 +25,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
29
25
|
name: 'YesNoField',
|
30
26
|
title: 'Yes/No field',
|
31
27
|
type: ComponentType.YesNoField,
|
32
|
-
subType: ComponentSubType.Field,
|
33
28
|
hint: '',
|
34
29
|
options: {},
|
35
30
|
schema: {}
|
@@ -38,7 +33,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
38
33
|
name: 'TimeField',
|
39
34
|
title: 'Time field',
|
40
35
|
type: ComponentType.TimeField,
|
41
|
-
subType: ComponentSubType.Field,
|
42
36
|
hint: '',
|
43
37
|
options: {},
|
44
38
|
schema: {}
|
@@ -47,7 +41,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
47
41
|
name: 'DatePartsField',
|
48
42
|
title: 'Date field',
|
49
43
|
type: ComponentType.DatePartsField,
|
50
|
-
subType: ComponentSubType.Field,
|
51
44
|
hint: '',
|
52
45
|
options: {},
|
53
46
|
schema: {}
|
@@ -56,7 +49,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
56
49
|
name: 'MonthYearField',
|
57
50
|
title: 'Month & year field',
|
58
51
|
type: ComponentType.MonthYearField,
|
59
|
-
subType: ComponentSubType.Field,
|
60
52
|
hint: '',
|
61
53
|
options: {},
|
62
54
|
schema: {}
|
@@ -65,7 +57,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
65
57
|
name: 'SelectField',
|
66
58
|
title: 'Select field',
|
67
59
|
type: ComponentType.SelectField,
|
68
|
-
subType: ComponentSubType.ListField,
|
69
60
|
options: {},
|
70
61
|
schema: {},
|
71
62
|
list: ''
|
@@ -74,7 +65,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
74
65
|
name: 'AutocompleteField',
|
75
66
|
title: 'Autocomplete field',
|
76
67
|
type: ComponentType.AutocompleteField,
|
77
|
-
subType: ComponentSubType.ListField,
|
78
68
|
options: {},
|
79
69
|
schema: {},
|
80
70
|
list: ''
|
@@ -83,7 +73,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
83
73
|
name: 'RadiosField',
|
84
74
|
title: 'Radios field',
|
85
75
|
type: ComponentType.RadiosField,
|
86
|
-
subType: ComponentSubType.ListField,
|
87
76
|
options: {},
|
88
77
|
schema: {},
|
89
78
|
list: ''
|
@@ -92,7 +81,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
92
81
|
name: 'CheckboxesField',
|
93
82
|
title: 'Checkboxes field',
|
94
83
|
type: ComponentType.CheckboxesField,
|
95
|
-
subType: ComponentSubType.ListField,
|
96
84
|
options: {},
|
97
85
|
schema: {},
|
98
86
|
list: ''
|
@@ -101,7 +89,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
101
89
|
name: 'NumberField',
|
102
90
|
title: 'Number field',
|
103
91
|
type: ComponentType.NumberField,
|
104
|
-
subType: ComponentSubType.Field,
|
105
92
|
hint: '',
|
106
93
|
options: {},
|
107
94
|
schema: {}
|
@@ -110,7 +97,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
110
97
|
name: 'UkAddressField',
|
111
98
|
title: 'UK address field',
|
112
99
|
type: ComponentType.UkAddressField,
|
113
|
-
subType: ComponentSubType.Field,
|
114
100
|
hint: '',
|
115
101
|
options: {},
|
116
102
|
schema: {}
|
@@ -119,7 +105,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
119
105
|
name: 'TelephoneNumberField',
|
120
106
|
title: 'Telephone number field',
|
121
107
|
type: ComponentType.TelephoneNumberField,
|
122
|
-
subType: ComponentSubType.Field,
|
123
108
|
hint: '',
|
124
109
|
options: {},
|
125
110
|
schema: {}
|
@@ -128,7 +113,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
128
113
|
name: 'EmailAddressField',
|
129
114
|
title: 'Email address field',
|
130
115
|
type: ComponentType.EmailAddressField,
|
131
|
-
subType: ComponentSubType.Field,
|
132
116
|
hint: 'For example, ‘name@example.com’',
|
133
117
|
options: {},
|
134
118
|
schema: {}
|
@@ -137,7 +121,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
137
121
|
name: 'Html',
|
138
122
|
title: 'Html',
|
139
123
|
type: ComponentType.Html,
|
140
|
-
subType: ComponentSubType.Content,
|
141
124
|
content: '',
|
142
125
|
options: {},
|
143
126
|
schema: {}
|
@@ -146,7 +129,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
146
129
|
name: 'InsetText',
|
147
130
|
title: 'Inset text',
|
148
131
|
type: ComponentType.InsetText,
|
149
|
-
subType: ComponentSubType.Content,
|
150
132
|
content: '',
|
151
133
|
options: {},
|
152
134
|
schema: {}
|
@@ -155,7 +137,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
155
137
|
name: 'Details',
|
156
138
|
title: 'Details',
|
157
139
|
type: ComponentType.Details,
|
158
|
-
subType: ComponentSubType.Content,
|
159
140
|
content: '',
|
160
141
|
options: {},
|
161
142
|
schema: {}
|
@@ -164,7 +145,6 @@ export const ComponentTypes: (ComponentDef & {
|
|
164
145
|
name: 'List',
|
165
146
|
title: 'List',
|
166
147
|
type: ComponentType.List,
|
167
|
-
subType: ComponentSubType.Content,
|
168
148
|
options: {},
|
169
149
|
schema: {},
|
170
150
|
list: ''
|
package/src/components/enums.ts
CHANGED
package/src/components/index.ts
CHANGED
package/src/components/types.ts
CHANGED