-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore: take GenericDataSchema into form renderer and definition mapper #528
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hein-j
force-pushed
the
chore/generic-schema
branch
from
July 19, 2022 20:22
3bb78c7
to
450a829
Compare
Jshhhh
approved these changes
Jul 20, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
hein-j
force-pushed
the
chore/generic-schema
branch
from
July 20, 2022 23:45
450a829
to
8f75236
Compare
SwaySway
approved these changes
Jul 21, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
SwaySway
added a commit
that referenced
this pull request
Sep 19, 2022
* chore: add form-related types (#469) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add form definition mapper (#470) Co-authored-by: Hein Jeong <heinje@amazon.com> * test: update cypress setup (#472) * chore: update cli setup flow and update react peerDep (#473) * feat: adding string format types in lib * feat: add base form to component mapper with updated datastore types * chore: audit fix and peerDep of datastore * chore: update deps in lock files * feat: add base form renderer and amplify form renderer classes * chore: update form definition mapper (#489) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: string formatter util functions * feat: view types and string formatting on view config * fix: optional enum type and nullish handling * chore: map input and sectional form elements (#493) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: adding types for Slot * fix: rename Slot to Amplify.Slot * chore: add util to map datastore schema to generic (#498) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support slot binding (#499) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: skip field generation for read-only fields (#501) * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields Co-authored-by: Scott Young <scoyou@amazon.com> * chore: add validation field types for forms (#502) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: expand return type of overrideItems (#504) * chore: clean up form definition mapper (#508) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add form field validation function and additional validation types (#507) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: rev recommended version of ui-react (#513) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add nested query if data schema is passed down * chore/main merge (#516) * chore(release): update package with security issue * fix: handle auth prop in concat * chore(release): security issues in dependencies Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> * chore: update mocked to use jest.mocked * feat: add react-studio-form-renderer and update test ci (#505) * chore: update primitive test for SliderField * feat: add datastore onSubmitBefore and onSubmitComplete callbacks (#526) * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: Justin Shih <jushih@amazon.com> * chore: take GenericDataSchema into form renderer and definition mapper (#528) Co-authored-by: Hein Jeong <heinje@amazon.com> * Render form utils and add forms to index file (#536) * fix: remove locale dependency on date formatting * feat: add utils file renderer Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Justin Shih <jushih@amazon.com> * chore: add valueMappings to forms (#537) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add onchange handling for form renderer (#542) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: change default value mappings (#543) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add id to StudioForm (#544) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update pagination label in test (#547) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: change props of SwitchField form element (#546) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update view types to use string primitives (#535) * chore: update validation type to match model (#545) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update pagination label in test (#547) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: tidying forms renderer (#549) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update react import & updated factory methods for import collection (#551) * fix: onSubmit for custom forms (#552) * feat: make form labels use sentence case * chore: update render component only (#558) Updates - this will update the import for 'validateField' to come from codegen-ui-react - update view type to StudioView - update validation to be rendered during component rendering * feat: table definition for renderer * chore: adds update datastore action for forms (#559) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: support input types (#557) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update pkg lock (#562) updating the dependency changes noted in the package-lock diff * chore: separate out and export logic to map model field to field config (#566) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add default, unremovable validations for certain form inputs (#564) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: update label to children for cta buttons on forms update form-to-component ctaConfig to use children as opposed to labels to render the button text * chore: only generate breakpoint mapping on breakpoint variants (#569) * fix: fix to narrow view config type * chore: move form-to-component util (#573) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: initial commit for view (table) renderer * chore: pkg lock pointing to new released ver in main * feat: add override types to form elements (#576) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: table renderer * feat: render options for SelectField and RadioGroupField (#577) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update override props snapshot * feat: view renderer with variable statements and base types * chore: make appId and environmentName optional for StudioView (#582) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: codegenning formatter in table jsx * chore: fix form types (#583) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: handle custom json model for tables * fix: conditionally codegenning formatter call * fix: add type casting when doing on change * feat: formatter init * fix: expose amplfyViewRenderer and update settings for passing (#591) predicates * fix: type mismatch fix with model * chore: refine rendering of form sectional elements (#594) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update form sectional element type (#596) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: change form validation (#597) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels (#548) * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#555) * chore: update view types to use string primitives (#535) * chore: update validation type to match model (#545) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: tidying forms renderer (#549) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update react import & updated factory methods for import collection (#551) Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#561) * chore: adds update datastore action for forms (#559) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: support input types (#557) Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#580) * feat: add override types to form elements (#576) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: table renderer * feat: render options for SelectField and RadioGroupField (#577) Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> * chore: change form validation, validate on submit, and init form integ test (#600) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: render cta without overrides & add cta to form integ test model (#603) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: change form cta visible property to excluded (#604) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: entity name validation * chore: add model prop to update form (#601) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: remove @aws-amplify/codegen-ui-react as import source By removing this import generated forms can now use the utils file for validateField use. This shouldn't be an issue for UI as that does not render the import source for the files and we can decide the import value in the UI code. * fix: remove pascal case from themes as the default theme name is "studioTheme" * fix: add optional chaining for cta config and nullish coalese * fix: date format and form onSubmitBefore * fix: fix release yml (#571) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: allow conditional formatting of outputs * feat: add array field component type (#613) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: handle RadioGroupField of Boolean type (#610) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add phone validation, change required validation, and fix regex (#615) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: do not assume related model or field is in datastore schema (#621) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: clean up form auto gen (#618) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: make override keys optional (#622) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: add cta to yup validation * feat: add support for nested json (#623) * fix: fetch table config with nullish operator * chore: use ts versions below 4.5 (#626) * feat: add custom ArrayField component to form renderer (#624) * feat: add custom ArrayField component to form renderer * feat: add support for nested json (#623) * fix: merge conflicts for Array field component render Co-authored-by: Justin Shih <jushih@amazon.com> * fix: handle modelFields for onSubmitBefore (#629) * feat: add event types to form override props (#627) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: handle bad form element positions (#619) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: change util file rendering (#630) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add default values for update form (#631) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: test all configured validations for field (#632) * chore: remove unnecessary grids (#633) * chore: validate onBlur and only conditionally onChange (#635) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add padding properly to forms (#637) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: change form hook names (#636) * fix: add array fields for autogenerated forms (#634) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: update fix onSubmit types for ds and custom (#638) * chore: remove top margin from CTA row (#639) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add onChange override function (#640) * fix: update form useEffect to conditionally change state if record is defined (#641) * fix: add inputType for form hook functions (#642) * chore: refine types and onChange handlers (#643) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add arrayfield component to componentOnly form renderer (#644) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: include minimum breakpoints required (#645) * Chore/merge main (#646) * fix: fix release yml (#571) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: allow conditional formatting of outputs Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Christopher Woolum <woolumc@amazon.com> * fix: add state to controlled components (#649) * fix: onChange overrides to use onchange value and add useEffect initial data for update custom forms (#650) * fix: increase commit max length * fix: forms row layout (#653) * fix: remove ArrayField items state and change onBlur to validate input field value (#654) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: onClear to reset state values and errors (#655) * fix: remove async from onblur (#656) * feat: take design tokens into consideration when rendering * feat: take design tokens into consideration when rendering Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Scott Young <scott1337@hotmail.com> Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Christopher Woolum <woolumc@amazon.com> Co-authored-by: Chris Woolum <christopher.woolum@gmail.com> Co-authored-by: felipechiave <107582550+felipechiave@users.noreply.github.com> Co-authored-by: David Lopez <letsbelopez@gmail.com> Co-authored-by: David Lopez <lopezbnd@amazon.com>
cwoolum
added a commit
that referenced
this pull request
Oct 12, 2022
* chore: add form-related types (#469) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add form definition mapper (#470) Co-authored-by: Hein Jeong <heinje@amazon.com> * test: update cypress setup (#472) * chore: update cli setup flow and update react peerDep (#473) * feat: adding string format types in lib * feat: add base form to component mapper with updated datastore types * chore: audit fix and peerDep of datastore * chore: update deps in lock files * feat: add base form renderer and amplify form renderer classes * chore: update form definition mapper (#489) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: string formatter util functions * feat: view types and string formatting on view config * fix: optional enum type and nullish handling * chore: map input and sectional form elements (#493) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: adding types for Slot * fix: rename Slot to Amplify.Slot * chore: add util to map datastore schema to generic (#498) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support slot binding (#499) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: skip field generation for read-only fields (#501) * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields * chore: skip field generation for read-only fields Co-authored-by: Scott Young <scoyou@amazon.com> * chore: add validation field types for forms (#502) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: expand return type of overrideItems (#504) * chore: clean up form definition mapper (#508) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add form field validation function and additional validation types (#507) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: rev recommended version of ui-react (#513) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add nested query if data schema is passed down * chore/main merge (#516) * chore(release): update package with security issue * fix: handle auth prop in concat * chore(release): security issues in dependencies Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> * chore: update mocked to use jest.mocked * feat: add react-studio-form-renderer and update test ci (#505) * chore: update primitive test for SliderField * feat: add datastore onSubmitBefore and onSubmitComplete callbacks (#526) * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks * feat: add datastore onSubmitBefore and onSubmitComplete callbacks Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: Justin Shih <jushih@amazon.com> * chore: take GenericDataSchema into form renderer and definition mapper (#528) Co-authored-by: Hein Jeong <heinje@amazon.com> * Render form utils and add forms to index file (#536) * fix: remove locale dependency on date formatting * feat: add utils file renderer Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Justin Shih <jushih@amazon.com> * chore: add valueMappings to forms (#537) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add onchange handling for form renderer (#542) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: change default value mappings (#543) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add id to StudioForm (#544) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update pagination label in test (#547) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: change props of SwitchField form element (#546) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update view types to use string primitives (#535) * chore: update validation type to match model (#545) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update pagination label in test (#547) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: tidying forms renderer (#549) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update react import & updated factory methods for import collection (#551) * fix: onSubmit for custom forms (#552) * feat: make form labels use sentence case * chore: update render component only (#558) Updates - this will update the import for 'validateField' to come from codegen-ui-react - update view type to StudioView - update validation to be rendered during component rendering * feat: table definition for renderer * chore: adds update datastore action for forms (#559) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: support input types (#557) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update pkg lock (#562) updating the dependency changes noted in the package-lock diff * chore: separate out and export logic to map model field to field config (#566) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add default, unremovable validations for certain form inputs (#564) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: update label to children for cta buttons on forms update form-to-component ctaConfig to use children as opposed to labels to render the button text * chore: only generate breakpoint mapping on breakpoint variants (#569) * fix: fix to narrow view config type * chore: move form-to-component util (#573) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: initial commit for view (table) renderer * chore: pkg lock pointing to new released ver in main * feat: add override types to form elements (#576) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: table renderer * feat: render options for SelectField and RadioGroupField (#577) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update override props snapshot * feat: view renderer with variable statements and base types * chore: make appId and environmentName optional for StudioView (#582) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: codegenning formatter in table jsx * chore: fix form types (#583) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: handle custom json model for tables * fix: conditionally codegenning formatter call * fix: add type casting when doing on change * feat: formatter init * fix: expose amplfyViewRenderer and update settings for passing (#591) predicates * fix: type mismatch fix with model * chore: refine rendering of form sectional elements (#594) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: update form sectional element type (#596) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: change form validation (#597) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels (#548) * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#555) * chore: update view types to use string primitives (#535) * chore: update validation type to match model (#545) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: tidying forms renderer (#549) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: update react import & updated factory methods for import collection (#551) Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#561) * chore: adds update datastore action for forms (#559) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: support input types (#557) Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * Tagged release/forms and views (#580) * feat: add override types to form elements (#576) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: table renderer * feat: render options for SelectField and RadioGroupField (#577) Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels * feat: support for cta labels Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> * chore: change form validation, validate on submit, and init form integ test (#600) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: render cta without overrides & add cta to form integ test model (#603) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: change form cta visible property to excluded (#604) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: entity name validation * chore: add model prop to update form (#601) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: remove @aws-amplify/codegen-ui-react as import source By removing this import generated forms can now use the utils file for validateField use. This shouldn't be an issue for UI as that does not render the import source for the files and we can decide the import value in the UI code. * fix: remove pascal case from themes as the default theme name is "studioTheme" * fix: add optional chaining for cta config and nullish coalese * fix: date format and form onSubmitBefore * fix: fix release yml (#571) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: allow conditional formatting of outputs * feat: add array field component type (#613) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: handle RadioGroupField of Boolean type (#610) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: add phone validation, change required validation, and fix regex (#615) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: do not assume related model or field is in datastore schema (#621) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: clean up form auto gen (#618) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: make override keys optional (#622) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: add cta to yup validation * feat: add support for nested json (#623) * fix: fetch table config with nullish operator * chore: use ts versions below 4.5 (#626) * feat: add custom ArrayField component to form renderer (#624) * feat: add custom ArrayField component to form renderer * feat: add support for nested json (#623) * fix: merge conflicts for Array field component render Co-authored-by: Justin Shih <jushih@amazon.com> * fix: handle modelFields for onSubmitBefore (#629) * feat: add event types to form override props (#627) Co-authored-by: Justin Shih <jushih@amazon.com> * chore: handle bad form element positions (#619) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: change util file rendering (#630) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add default values for update form (#631) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: test all configured validations for field (#632) * chore: remove unnecessary grids (#633) * chore: validate onBlur and only conditionally onChange (#635) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add padding properly to forms (#637) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: change form hook names (#636) * fix: add array fields for autogenerated forms (#634) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: update fix onSubmit types for ds and custom (#638) * chore: remove top margin from CTA row (#639) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: add onChange override function (#640) * fix: update form useEffect to conditionally change state if record is defined (#641) * fix: add inputType for form hook functions (#642) * chore: refine types and onChange handlers (#643) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add arrayfield component to componentOnly form renderer (#644) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: include minimum breakpoints required (#645) * Chore/merge main (#646) * fix: fix release yml (#571) Co-authored-by: Justin Shih <jushih@amazon.com> * feat: allow conditional formatting of outputs Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: Christopher Woolum <woolumc@amazon.com> * fix: add state to controlled components (#649) * fix: onChange overrides to use onchange value and add useEffect initial data for update custom forms (#650) * fix: increase commit max length * fix: forms row layout (#653) * fix: remove ArrayField items state and change onBlur to validate input field value (#654) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: onClear to reset state values and errors (#655) * fix: remove async from onblur (#656) * feat: take design tokens into consideration when rendering * feat: take design tokens into consideration when rendering * feat: re-do arrays functionality * fix: handle nullable child arrays * fix: fix useTheme in arrays * fix: resolve security vulnerability * feat: add handling for isArray in form field model * Update config.yml * fix: fix ArrayField focus * chore: differentiate reset for datastore update form (#670) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: make onChange synchronous (#671) Co-authored-by: Hein Jeong <heinje@amazon.com> * feat: allow json froms with field names that are malformed variable names (#668) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: timestamp and number fields (#672) * fix: resvered words when creating state variables (#673) use a list of reserved words when checking for valid variable names * fix: default values for form arrays and array values (#676) Co-authored-by: David Lopez <lopezbnd@amazon.com> * fix: reset custom update form to initial data (#674) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: nan is not a function (#678) Co-authored-by: David Lopez <lopezbnd@amazon.com> * chore: add checker for models supported as forms (#677) Co-authored-by: Hein Jeong <heinje@amazon.com> * chore: do not autogen non-model fields * fix: timestamp formatting in defaultValue * fix: remove invalid breakpoints (#661) (#681) ref pr661 merged back into feature branch * chore: identify join tables in generic data schema (#682) Co-authored-by: Hein Jeong <heinje@amazon.com> * fix: add 0 to array items for int float type (#679) Co-authored-by: David Lopez <lopezbnd@amazon.com> * fix: map AWSPhone to TextField * feat: expose function to clearinputs for create forms (#685) * fix: fix value props on ArrayField child * fix: fix order of useeffect for resetting state * fix: allow arraytypes in all formhooks except in onValidate * fix: stringify awsjson * fix: arrayfield items prop fallback to empty array when record is null (#689) Co-authored-by: Justin Shih <jushih@amazon.com> * fix: parse json on save * fix: remove seconds and milliseconds from timestamp conversion (#697) * chore: merge main Co-authored-by: Hein Jeong <73264629+hein-j@users.noreply.github.com> Co-authored-by: Hein Jeong <heinje@amazon.com> Co-authored-by: Josue Ruiz <7465495+SwaySway@users.noreply.github.com> Co-authored-by: Kevin Pranoto <kpranoto@amazon.com> Co-authored-by: Scott Young <scott1337@hotmail.com> Co-authored-by: Scott Young <scoyou@amazon.com> Co-authored-by: Justin Shih <36183898+Jshhhh@users.noreply.github.com> Co-authored-by: Justin Shih <jushih@amazon.com> Co-authored-by: awinberg-aws <100880084+awinberg-aws@users.noreply.github.com> Co-authored-by: Christopher Woolum <woolumc@amazon.com> Co-authored-by: felipechiave <107582550+felipechiave@users.noreply.github.com> Co-authored-by: David Lopez <letsbelopez@gmail.com> Co-authored-by: David Lopez <lopezbnd@amazon.com> Co-authored-by: Albert Winberg <winberga@amazon.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
Accept GenericDataSchema into form renderer and definition mapper. We will need information on all models to handle relationships.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.