Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UE: Removing fieldType from all component definitions #176

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions component-definition.json
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@
"resourceType": "core/fd/components/form/button/v1/button",
"template": {
"jcr:title": "Button",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand All @@ -219,7 +218,6 @@
"resourceType": "core/fd/components/form/checkbox/v1/checkbox",
"template": {
"jcr:title": "Checkbox",
"fieldType": "checkbox",
"enabled": true,
"visible": true,
"checkedValue": "on"
Expand All @@ -237,7 +235,6 @@
"resourceType": "core/fd/components/form/checkboxgroup/v1/checkboxgroup",
"template": {
"jcr:title": "Checkbox Group",
"fieldType": "checkbox-group",
"enum": [
"0",
"1"
Expand All @@ -262,7 +259,6 @@
"resourceType": "core/fd/components/form/datepicker/v1/datepicker",
"template": {
"jcr:title": "Date Input",
"fieldType": "date-input",
"enabled": true,
"visible": true
}
Expand All @@ -279,7 +275,6 @@
"resourceType": "core/fd/components/form/dropdown/v1/dropdown",
"template": {
"jcr:title": "Drop Down List",
"fieldType": "drop-down",
"enabled": true,
"visible": true
}
Expand All @@ -296,7 +291,6 @@
"resourceType": "core/fd/components/form/emailinput/v1/emailinput",
"template": {
"jcr:title": "Email Input",
"fieldType": "email",
"enabled": true,
"visible": true
}
Expand All @@ -313,7 +307,6 @@
"resourceType": "core/fd/components/form/fileinput/v2/fileinput",
"template": {
"jcr:title": "File Attachment",
"fieldType": "file-input",
"accept": [
"audio/*",
"video/*",
Expand All @@ -339,7 +332,6 @@
"resourceType": "core/fd/components/form/fragment/v1/fragment",
"template": {
"jcr:title": "Fragment",
"fieldType": "panel",
"enabled": true,
"visible": true
}
Expand All @@ -356,7 +348,6 @@
"resourceType": "core/fd/components/form/image/v1/image",
"template": {
"jcr:title": "Image",
"fieldType": "image",
"visible": true
}
}
Expand All @@ -372,7 +363,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Modal",
"fieldType": "panel",
"fd:viewType": "modal",
"enabled": true,
"visible": false
Expand All @@ -390,7 +380,6 @@
"resourceType": "core/fd/components/form/numberinput/v1/numberinput",
"template": {
"jcr:title": "Number Input",
"fieldType": "number-input",
"enabled": true,
"visible": true
}
Expand All @@ -407,7 +396,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Panel",
"fieldType": "panel",
"enabled": true,
"visible": true
}
Expand All @@ -424,7 +412,6 @@
"resourceType": "core/fd/components/form/radiobutton/v1/radiobutton",
"template": {
"jcr:title": "Radio Group",
"fieldType": "radio-group",
"enum": [
"0",
"1"
Expand All @@ -450,7 +437,6 @@
"template": {
"jcr:title": "Reset",
"buttonType": "reset",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand All @@ -468,7 +454,6 @@
"template": {
"jcr:title": "Submit",
"buttonType": "submit",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand All @@ -485,7 +470,6 @@
"resourceType": "core/fd/components/form/telephoneinput/v1/telephoneinput",
"template": {
"jcr:title": "Telephone Input",
"fieldType": "text-input",
"enabled": true,
"visible": true
}
Expand All @@ -502,7 +486,6 @@
"resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions",
"template": {
"jcr:title": "Terms and conditions",
"fieldType": "panel",
"fd:viewType": "tnc",
"enabled": true,
"visible": true,
Expand All @@ -525,7 +508,6 @@
"Privacy policy."
],
"sling:resourceType": "core/fd/components/form/checkboxgroup/v1/checkboxgroup",
"fieldType": "checkbox-group",
"fd:rules": {
"jcr:primaryType": "nt:unstructured",
"validationStatus": "valid"
Expand All @@ -541,7 +523,6 @@
"name": "approvalcheckbox",
"jcr:title": "I agree to the terms & conditions.",
"sling:resourceType": "core/fd/components/form/checkbox/v1/checkbox",
"fieldType": "checkbox",
"required": true,
"enabled": true,
"visible": true
Expand All @@ -560,7 +541,6 @@
"resourceType": "core/fd/components/form/text/v1/text",
"template": {
"jcr:title": "Text",
"fieldType": "plain-text",
"visible": true,
"textIsRich": true
}
Expand All @@ -577,7 +557,6 @@
"resourceType": "core/fd/components/form/textinput/v1/textinput",
"template": {
"jcr:title": "Text Input",
"fieldType": "text-input",
"enabled": true,
"visible": true
}
Expand All @@ -594,7 +573,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Wizard",
"fieldType": "panel",
"fd:viewType": "wizard",
"enabled": true,
"visible": true
Expand Down
1 change: 0 additions & 1 deletion models/form/_button.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/button/v1/button",
"template": {
"jcr:title": "Button",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_checkbox-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/checkboxgroup/v1/checkboxgroup",
"template": {
"jcr:title": "Checkbox Group",
"fieldType": "checkbox-group",
"enum": [
"0",
"1"
Expand Down
1 change: 0 additions & 1 deletion models/form/_checkbox.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/checkbox/v1/checkbox",
"template": {
"jcr:title": "Checkbox",
"fieldType": "checkbox",
"enabled": true,
"visible": true,
"checkedValue": "on"
Expand Down
1 change: 0 additions & 1 deletion models/form/_date-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/datepicker/v1/datepicker",
"template": {
"jcr:title": "Date Input",
"fieldType": "date-input",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_drop-down.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/dropdown/v1/dropdown",
"template": {
"jcr:title": "Drop Down List",
"fieldType": "drop-down",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_email.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/emailinput/v1/emailinput",
"template": {
"jcr:title": "Email Input",
"fieldType": "email",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_file-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/fileinput/v2/fileinput",
"template": {
"jcr:title": "File Attachment",
"fieldType": "file-input",
"accept": [
"audio/*",
"video/*",
Expand Down
1 change: 0 additions & 1 deletion models/form/_fragment.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/fragment/v1/fragment",
"template": {
"jcr:title": "Fragment",
"fieldType": "panel",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_image.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/image/v1/image",
"template": {
"jcr:title": "Image",
"fieldType": "image",
"visible": true
}
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_modal.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Modal",
"fieldType": "panel",
"fd:viewType": "modal",
"enabled": true,
"visible": false
Expand Down
1 change: 0 additions & 1 deletion models/form/_number-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/numberinput/v1/numberinput",
"template": {
"jcr:title": "Number Input",
"fieldType": "number-input",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_panel.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Panel",
"fieldType": "panel",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_radio-group.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/radiobutton/v1/radiobutton",
"template": {
"jcr:title": "Radio Group",
"fieldType": "radio-group",
"enum": [
"0",
"1"
Expand Down
1 change: 0 additions & 1 deletion models/form/_reset-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"template": {
"jcr:title": "Reset",
"buttonType": "reset",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_submit-button.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"template": {
"jcr:title": "Submit",
"buttonType": "submit",
"fieldType": "button",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_telephone-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/telephoneinput/v1/telephoneinput",
"template": {
"jcr:title": "Telephone Input",
"fieldType": "text-input",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_text-input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/textinput/v1/textinput",
"template": {
"jcr:title": "Text Input",
"fieldType": "text-input",
"enabled": true,
"visible": true
}
Expand Down
1 change: 0 additions & 1 deletion models/form/_text.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/text/v1/text",
"template": {
"jcr:title": "Text",
"fieldType": "plain-text",
"visible": true,
"textIsRich": true
}
Expand Down
3 changes: 0 additions & 3 deletions models/form/_tnc.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/termsandconditions/v1/termsandconditions",
"template": {
"jcr:title": "Terms and conditions",
"fieldType": "panel",
"fd:viewType": "tnc",
"enabled": true,
"visible": true,
Expand All @@ -30,7 +29,6 @@
"Privacy policy."
],
"sling:resourceType": "core/fd/components/form/checkboxgroup/v1/checkboxgroup",
"fieldType": "checkbox-group",
"fd:rules": {
"jcr:primaryType": "nt:unstructured",
"validationStatus": "valid"
Expand All @@ -46,7 +44,6 @@
"name": "approvalcheckbox",
"jcr:title": "I agree to the terms & conditions.",
"sling:resourceType": "core/fd/components/form/checkbox/v1/checkbox",
"fieldType": "checkbox",
"required": true,
"enabled": true,
"visible": true
Expand Down
1 change: 0 additions & 1 deletion models/form/_wizard.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"resourceType": "core/fd/components/form/panelcontainer/v1/panelcontainer",
"template": {
"jcr:title": "Wizard",
"fieldType": "panel",
"fd:viewType": "wizard",
"enabled": true,
"visible": true
Expand Down
2 changes: 1 addition & 1 deletion test/unit/form.authoring.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ describe('Universal Editor Authoring Test Cases', () => {
} else if (cmpId === 'form-fragment') {
cmpIdfromFieldType = 'form-fragment';
}
if (!idsArray.includes(cmpIdfromFieldType)) {
if (cmpIdfromFieldType && !idsArray.includes(cmpIdfromFieldType)) {
throw new Error(`component model not found for component ${component.id}`);
}
});
Expand Down
Loading