formly-js / angular-formly

JavaScript powered forms for AngularJS
http://docs.angular-formly.com
MIT License
2.23k stars 405 forks source link

feat(formlyConfigProvider): Expose field types map from formlyConfigProvider #669

Closed pcardune closed 8 years ago

pcardune commented 8 years ago

What

Adding a getTypes() method to formlyConfigProvider that returns the map of type to config.

Why

For a plugin I am writing that renders an inspector showing the current configuration for formly, I need access to the types that have been registered with formly.

How

This change exposes the map of type name to type configuration object via a new method on formlyConfigProvider called getTypes().

For issue #663

Checklist:

codecov-io commented 8 years ago

Current coverage is 95.87%

Merging #669 into master will increase coverage by +0.01% as of 2619e33

@@            master    #669   diff @@
======================================
  Files           16      16       
  Stmts         1161    1163     +2
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit           1113    1115     +2
  Partial          0       0       
  Missed          48      48       

Review entire Coverage Diff as of 2619e33


Uncovered Suggestions

  1. +0.34% via ...alidationMessages.js#25...28
  2. +0.26% via src/test.utils.js#38...40
  3. +0.26% via ...s/formlyUsability.js#18...20
  4. See 7 more...

Powered by Codecov. Updated on successful CI builds.

kentcdodds commented 8 years ago

This looks just fine :+1:

kentcdodds commented 8 years ago

I'd still like someone else who actually uses the library still to review and merge this though.

kwypchlo commented 8 years ago

LGTM if you have use case for it

kwypchlo commented 8 years ago

@pcardune could you provide some short docs on your feature here? http://docs.angular-formly.com/docs/formlyconfig (use suggest edit button in top right corner).

Are you still maintaining these docs @kentcdodds? I should write some docs to the stuffed I pushed too I guess...

kentcdodds commented 8 years ago

I am, but would love to give some other people access.