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

feat(types): adapt types from DefinitelyTyped #77

Merged
merged 44 commits into from
Sep 7, 2019
Merged

feat(types): adapt types from DefinitelyTyped #77

merged 44 commits into from
Sep 7, 2019

Conversation

Thomaash
Copy link
Member

@Thomaash Thomaash commented Sep 5, 2019

Reexported from their packages:

  • DataSet
  • DataView
  • Hammer
  • Queue
  • keycharm
  • moment
  • util

Adapted from DefinitelyTyped, may be incomplete:

  • Graph2d
  • Timeline

Missing:

  • DOMutil
  • default (not a problem, simply use named imports instead)
  • timeline

Closes #76.

Andy Hanson and others added 30 commits March 24, 2017 14:27
* Updating template function defintion

As mentioned [here](seveves/angular-vis#32) there is a problem with the definition of the template functions. We really should allow any as a return value because you can return a string, Handlebars, mustache or even react templates. As you can see [here](http://visjs.org/docs/timeline/#Templates) the template function always has three parameters. I made them optional because you don't have to use them at all.

* Using fat arrow syntax

I think this is the right way to do it.

* Fix lint error
added missing DataGroup.nestedGroups according this example: http://visjs.org/examples/timeline/groups/nestedGroups.html
Timeline implements rolling mode with an object configuration instead boolean type.
Update @types/vis index.d.ts - rollingMode option from boolean to object.
* add types for custom ordering functions

* fix trailing whitespace

* include dependency on moment  (2.13 being the first version to include types)
add type for moment constructor for use in timeline and graph2d options
…to the Node (#20603)

* separated node color into it's own interface and added it to the node
definition too.

* tslint fixes
…on vis.js v4.21

Highlights:
@Timeline
- Documentation added for all methods as per documented in http://visjs.org/docs/timeline/
- Add 3 new definition methods for Timeline in v4.21.0: toggleRollingMode, zoomIn, zoomOut
- Add new type EasingFunction to support the intellisense to be able to choose the type of easing function used in animation

@TimelineEventPropertiesResult
- Add documentations for methods as defined in http://visjs.org/docs/timeline/#getEventProperties

Miscellaneous:
- Rename TimelineFitOptions to TimelineAnimationOptions since the class is intended to tamper with the animation styles.
- Rename TimelineFitAnimationType to TimelineAnimationType as per reason mention on last point and added documentation.
Fix(VIS) Updated property to the correct type
network.setOptions({edges: {arrows: {to: true}}}); should be accepted since it works properly in vis, but previous @types/vis will fail type-checking.
* Add support of subgroupStack on DataGroup

* Update index.d.ts

* Update index.d.ts

Added new SubGroupStackOptions dynamic structure and updated type of DataGroup.subgroupStack to SubGroupStackOptions | boolean

* Update index.d.ts

codestyling

* Update index.d.ts

codestyling colon
Node and Edge interfaces should inherit from NodeOptions and EdgeOptions. These Options are meant to be global, so properties such as "id", "from" and "to" should exist only on Node and Edge interfaces. Plus, in this way it's possible to use all properties defined on parent interface.
currently missing from official docs.
awaiting merge almende/vis#4091
martin-helmich and others added 14 commits January 28, 2019 15:39
Note that this *trivially* updates project urls by adding the NPM url to
the end, even when the urls are almost identical or the DT one is
outdated. I'll clean up the urls in a later commit.

This PR is unfinished! Please do not merge it yet.
* Improveme @types/vis

Two improvements:

* Correct optional types on options.node.shapeProperties
* Add types for options.node.margin

* Fix lint
Those properties have default values in vis library so they don't need to be required.
* @types/vis Adding Types to Edges.Arrows

Adding Edges.Arrows.To/Middle/From Type

* Correcting contributor link
… (#35683)

* Added widthConstraint for nodeOptions

* Updated definitions

* Added tests

* Fixed lint issues

* Applied warnings from lint
…ested to DataGroup as described in vis.js documentation (#35965)

* Add support of subgroupStack on DataGroup

* Update index.d.ts

* Update index.d.ts

Added new SubGroupStackOptions dynamic structure and updated type of DataGroup.subgroupStack to SubGroupStackOptions | boolean

* Update index.d.ts

codestyling

* Update index.d.ts

codestyling colon

* Fix DataGroup mappings for nestedGroups, added visible and showNested to DataGroup as described in vis.js documentation

* DataGroup test

* fix redundant line break
* [@types/vis] add getBaseEdges definition

* [@types/vis] fix trailing spaces
- Remove unrelated types.
- Replace DataSet and DataView by vis-data package.
- Reexport vis-util types.
Copy link
Member

@mojoaxel mojoaxel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 👍

@yotamberk yotamberk merged commit be8474f into visjs:master Sep 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@Types for TypeScript vis-timeline