diff --git a/README.md b/README.md index 9e0c675..d2f0b29 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,19 @@ Render a simple interactive slider using SVG. ![d3-simple-slider](https://user-images.githubusercontent.com/981531/32612807-1b4bc7d0-c561-11e7-95cf-1af7c10788d2.gif) -[Examples](https://d3-simple-slider.netlify.com) +Examples: -[Bl.ocks.org examples](https://bl.ocks.org/johnwalley/e1d256b81e51da68f7feb632a53c3518) +- [Storybook](https://d3-simple-slider.netlify.com) +- [Bl.ocks.org](https://bl.ocks.org/johnwalley/e1d256b81e51da68f7feb632a53c3518) Inspired by The New York Times [Is It Better to Rent or Buy?](https://www.nytimes.com/interactive/2014/upshot/buy-rent-calculator.html) +## Motivation + +Include an interactive slider in an svg element. For example, use a slider in place of an axis in a chart. + +Can also be used by itself as a generic slider. However, there are many existing html-based components which may be better suited to your needs. Of course you might just love using d3! + ## Installing If you use NPM, `npm install d3-simple-slider`. Otherwise, download the [latest release](https://github.com/johnwalley/d3-simple-slider/releases/latest). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: @@ -64,35 +71,35 @@ The orientation of a slider is fixed; to change the orientation, remove the old All sliders may take a [scale](https://github.com/d3/d3-scale) as an argument. If _scale_ is specified, the slider will use the scale to render the slider. This must be either [scaleLinear](https://github.com/d3/d3-scale#scaleLinear) or [scaleTime](https://github.com/d3/d3-scale#scaleTime). The domain will be used to calculate minimum and maximum values. The range will be used to calculate the width or height of the slider. This means you do not need to set these if passing a scale. -# d3.sliderHorizontal([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L442 'Source') +# d3.sliderHorizontal([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L639 'Source') Constructs a new horizontal slider generator. _Note that this is equivalent to [`sliderBottom`](#sliderBottom)._ -# d3.sliderVertical([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L447 'Source') +# d3.sliderVertical([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L643 'Source') Constructs a new vertical slider generator. _Note that this is equivalent to [`sliderLeft`](#sliderLeft)._ -# d3.sliderTop([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L442 'Source') +# d3.sliderTop([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L647 'Source') Constructs a new horizontal slider generator. Ticks on top. -# d3.sliderRight([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L447 'Source') +# d3.sliderRight([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L651 'Source') Constructs a new vertical slider generator. Ticks to the right; -# d3.sliderBottom([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L442 'Source') +# d3.sliderBottom([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L655 'Source') Constructs a new horizontal slider generator. Ticks on the bottom. -# d3.sliderLeft([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L447 'Source') +# d3.sliderLeft([scale]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L659 'Source') Constructs a new vertical slider generator. Ticks to the left; -# slider(context) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L38 'Source') +# slider(context) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L93 'Source') Render the slider to the given _context_, which may be either a [selection](https://github.com/d3/d3-selection) of SVG containers (either SVG or G elements) or a corresponding [transition](https://github.com/d3/d3-transition). -# slider.ticks(count) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L370 'Source') +# slider.ticks(count) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L519 'Source') To generate twenty ticks: @@ -100,7 +107,7 @@ To generate twenty ticks: slider.ticks(20); ``` -# slider.tickFormat([format]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L358 'Source') +# slider.tickFormat([format]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L522 'Source') If _format_ is specified, sets the tick format function and returns the slider. If _format_ is not specified, returns the current format function, which defaults to null. A null format indicates that the slider's default formatter should be used. @@ -110,7 +117,7 @@ See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://gi slider.tickFormat(d3.format(',.0f')); ``` -# slider.displayFormat([format]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L364 'Source') +# slider.displayFormat([format]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L528 'Source') If _format_ is specified, sets the function used to format the highlighted value and returns the slider. If _format_ is not specified, returns the current format function, which defaults to null. A null format indicates that the tickFormat should be used. If tickFormat is null then the slider's default formatter should be used. @@ -120,39 +127,63 @@ See [d3-format](https://github.com/d3/d3-format) and [d3-time-format](https://gi slider.displayFormat(d3.format(',.0f')); ``` -# slider.value([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L376 'Source') +# slider.value([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L541 'Source') If _value_ is specified, sets the value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current value. -# slider.silentValue([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L387 'Source') +If _value_ is an array of length two then the values represent a range. + +# slider.silentValue([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L560 'Source') If _value_ is specified, sets the value of the slider to the specified value and returns the slider _without_ invoking any listeners. If _value_ is not specified, returns the current value. -# slider.displayValue([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L429 'Source') +If _value_ is an array of length two then the values represent a range. + +# slider.displayValue([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L619 'Source') If _value_ is specified, sets the whether the highlighted value of the slider should be shown and returns the slider. If _value_ is not specified, returns the current value, which defaults to true. -# slider.handle([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L423 'Source') +# slider.handle([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L613 'Source') If _value_ is specified, sets the [SVG path definition](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d) used to render the slider handle and returns the slider. If _value_ is not specified, returns the current value, which defaults to 'M-5.5,-5.5v10l6,5.5l6,-5.5v-10z'. -# slider.width([size]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L346 'Source') +# slider.width([size]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L510 'Source') If _size_ is specified, sets the width of the slider to the specified value and returns the slider. If _size_ is not specified, returns the current width, which defaults to 100. This property only affects horizontal sliders and is ignored otherwise. -# slider.height([size]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L352 'Source') +# slider.height([size]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L516 'Source') If _size_ is specified, sets the height of the slider to the specified value and returns the slider. If _size_ is not specified, returns the current height, which defaults to 100. This property only affects vertical sliders and is ignored otherwise. -# slider.min([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L328 'Source') +# slider.min([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L492 'Source') If _value_ is specified, sets the minimum value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current minimum value, which defaults to 0. -# slider.max([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L334 'Source') +# slider.max([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L498 'Source') If _value_ is specified, sets the maximum value of the slider to the specified value and returns the slider. If _value_ is not specified, returns the current maximum value, which defaults to 10. -# slider.on(typenames, [listener]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L435 'Source') +# slider.domain([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L504 'Source') + +If _value_ is specified, an array which sets the minimum and maximum values of the slider and returns the slider. If _value_ is not specified, returns the current maximum value, which defaults to [0, 10]. + +# slider.fill([color]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L625 'Source') + +If _color_ is specified, sets the color of the slider track-fill and returns the slider. If _color_ is not specified, returns the current value, which defaults to null. + +# slider.step([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L595 'Source') + +If _value_ is specified, sets the increment which the slider will move in and returns the slider. If _value_ is not specified, returns the current value, which defaults to null. + +# slider.marks([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L607 'Source') + +If _value_ is specified, sets the values to which the slider will snap to and returns the slider. If _value_ is not specified, returns the current value, which defaults to null. + +# slider.default([value]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L579 'Source') + +If _value_ is specified, sets the initial value of the slider and returns the slider. If _value_ is not specified, returns the current value, which defaults to null. + +# slider.on(typenames, [listener]) [<>](https://github.com/johnwalley/d3-simple-slider/blob/master/src/slider.js#L631 'Source') If _listener_ is specified, sets the event _listener_ for the specified _typenames_ and returns the slider. If an event listener was already registered for the same type and name, the existing listener is removed before the new listener is added. If _listener_ is null, removes the current event listeners for the specified _typenames_, if any. If _listener_ is not specified, returns the first currently-assigned listener matching the specified _typenames_, if any. When a specified event is dispatched, each _listener_ will be invoked with the same context and arguments as [_selection_.on](https://github.com/d3/d3-selection#selection_on) listeners: the current datum `d` and index `i`, with the `this` context as the current DOM element. diff --git a/example/index.html b/example/index.html index 2a761c8..ca774a6 100644 --- a/example/index.html +++ b/example/index.html @@ -1,306 +1,455 @@ - - - d3-simple-slider - - - - - - - - - -
-

Basic example

-
-

-
-
- Reset -

Step example

-
-

-
-
- Reset -

Time example

-
-

-
-
- Reset -

Dense values example

-
-

-
-
- Reset -

Transition example

-
-

-
-
- Reset -

Vertical example

-
-

-
-
- Reset -

Top example

-
-

-
-
- Reset -

Right example

-
-

-
-
- Reset -
- - - + + + + +
+

Basic functionality

+

Simple

+
+

+
+
+

Step

+
+

+
+
+

Time

+
+

+
+
+

Fill

+
+

+
+
+

Range

+
+

+
+
+

Vertical

+
+

+
+
+

Extended functionality

+

Alternative handle

+
+

+
+
+

Transition

+
+

+
+
+

Examples

+

New York Times

+
+

+
+
+

Color picker

+
+

+
+
+
+ + - + .attr('transform', `translate(30,${60 * i})`) + .call(slider); + }); + diff --git a/package-lock.json b/package-lock.json index 8e58f88..a2dc760 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "d3-simple-slider", - "version": "1.3.2", + "version": "1.4.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -33,29 +33,6 @@ "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" - }, - "dependencies": { - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/generator": { @@ -69,14 +46,6 @@ "lodash": "^4.17.10", "source-map": "^0.5.0", "trim-right": "^1.0.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - } } }, "@babel/helper-annotate-as-pure": { @@ -110,16 +79,16 @@ } }, "@babel/helper-create-class-features-plugin": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.2.tgz", - "integrity": "sha512-Q4qZE5wS3NWpOS6UV9yhIS/NmSyf2keF0E0IwDvx8WxTheVopVIY6BSQ/0vz72OTTruz0cOA2yIUh6Kdg3qprA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.2.3.tgz", + "integrity": "sha512-xO/3Gn+2C7/eOUeb0VRnSP1+yvWHNxlpAot1eMhtoKDCN7POsyQP5excuT5UsV5daHxMWBeIIOeI5cmB8vMRgQ==", "dev": true, "requires": { "@babel/helper-function-name": "^7.1.0", "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", "@babel/helper-plugin-utils": "^7.0.0", - "@babel/helper-replace-supers": "^7.1.0" + "@babel/helper-replace-supers": "^7.2.3" } }, "@babel/helper-define-map": { @@ -242,14 +211,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.1.0.tgz", - "integrity": "sha512-BvcDWYZRWVuDeXTYZWxekQNO5D4kO55aArwZOTFXw6rlLQA8ZaDicJR1sO47h+HrnCiDFiww0fSPV0d713KBGQ==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.2.3.tgz", + "integrity": "sha512-GyieIznGUfPXPWu0yLS6U55Mz67AZD9cUk0BfirOWlPrXlBcan9Gz+vHGz+cPfuoweZSnPzPIm67VtQM0OWZbA==", "dev": true, "requires": { "@babel/helper-member-expression-to-functions": "^7.0.0", "@babel/helper-optimise-call-expression": "^7.0.0", - "@babel/traverse": "^7.1.0", + "@babel/traverse": "^7.2.3", "@babel/types": "^7.0.0" } }, @@ -307,9 +276,9 @@ } }, "@babel/parser": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.2.tgz", - "integrity": "sha512-UNTmQ5cSLDeBGBl+s7JeowkqIHgmFAGBnLDdIzFmUNSuS5JF0XBcN59jsh/vJO/YjfsBqMxhMjoFGmNExmf0FA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.2.3.tgz", + "integrity": "sha512-0LyEcVlfCoFmci8mXx8A5oIkpkOgyo8dRHtxBnK9RRBwxO2+JZPNsqtVEZQ7mJFPxnXF9lfmU24mHOPI0qnlkA==", "dev": true }, "@babel/plugin-proposal-async-generator-functions": { @@ -324,12 +293,12 @@ } }, "@babel/plugin-proposal-class-properties": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.1.tgz", - "integrity": "sha512-/4FKFChkQ2Jgb8lBDsvFX496YTi7UWTetVgS8oJUpX1e/DlaoeEK57At27ug8Hu2zI2g8bzkJ+8k9qrHZRPGPA==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.2.3.tgz", + "integrity": "sha512-FVuQngLoN2iDrpW7LmhPZ2sO4DJxf35FOcwidwB9Ru9tMvI5URthnkVHuG14IStV+TzkMTyLMoOUlSTtrdVwqw==", "dev": true, "requires": { - "@babel/helper-create-class-features-plugin": "^7.2.1", + "@babel/helper-create-class-features-plugin": "^7.2.3", "@babel/helper-plugin-utils": "^7.0.0" } }, @@ -680,9 +649,9 @@ } }, "@babel/preset-env": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.0.tgz", - "integrity": "sha512-haGR38j5vOGVeBatrQPr3l0xHbs14505DcM57cbJy48kgMFvvHHoYEhHuRV+7vi559yyAUAVbTWzbK/B/pzJng==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.2.3.tgz", + "integrity": "sha512-AuHzW7a9rbv5WXmvGaPX7wADxFkZIqKlbBh1dmZUQp4iwiPpkE/Qnrji6SC4UQCQzvWY/cpHET29eUhXS9cLPw==", "dev": true, "requires": { "@babel/helper-module-imports": "^7.0.0", @@ -749,16 +718,16 @@ } }, "@babel/traverse": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.2.tgz", - "integrity": "sha512-E5Bn9FSwHpSkUhthw/XEuvFZxIgrqb9M8cX8j5EUQtrUG5DQUy6bFyl7G7iQ1D1Czudor+xkmp81JbLVVM0Sjg==", + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.2.3.tgz", + "integrity": "sha512-Z31oUD/fJvEWVR0lNZtfgvVt512ForCTNKYcJBGbPb1QZfve4WGH8Wsy7+Mev33/45fhP/hwQtvgusNdcCMgSw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "@babel/generator": "^7.2.2", "@babel/helper-function-name": "^7.1.0", "@babel/helper-split-export-declaration": "^7.0.0", - "@babel/parser": "^7.2.2", + "@babel/parser": "^7.2.3", "@babel/types": "^7.2.2", "debug": "^4.1.0", "globals": "^11.1.0", @@ -920,44 +889,44 @@ "dev": true }, "@storybook/addons": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-4.1.1.tgz", - "integrity": "sha512-Q6d754uRHBEf2aUCyAgIfL4JF0RZ6Yf/FcZYXKG1MsKVLonbRVSGjsm+R4wsndjvnZF3Ts37WhpZ/1fGP78Zzg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/addons/-/addons-4.1.3.tgz", + "integrity": "sha512-6orT1pp0NCfqEABV8iVPkcIn/hIKHd5bA9JC0pQYz50LDIOPsohf1L5dvPwaJzaPVqLNexHUXOxxCRqyxhF21w==", "dev": true, "requires": { - "@storybook/channels": "4.1.1", - "@storybook/components": "4.1.1", + "@storybook/channels": "4.1.3", + "@storybook/components": "4.1.3", "global": "^4.3.2", "util-deprecate": "^1.0.2" } }, "@storybook/channel-postmessage": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-4.1.1.tgz", - "integrity": "sha512-wCw0ZH4UHq+noC6LQz/9FvjIak0f2jMvrj8c+RchERR1IbpXqMPQ6MQbdRTnG/HPbGu2+DMB+XikK8k7ZSSVpg==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/channel-postmessage/-/channel-postmessage-4.1.3.tgz", + "integrity": "sha512-8srwq67Hc6IuY8GrJPYaPhPjPLKts5bYyy7hLZ464t/bOvvG21jItz5f262S1Tibh9t43fygYFbl4lb9qyumSg==", "dev": true, "requires": { - "@storybook/channels": "4.1.1", + "@storybook/channels": "4.1.3", "global": "^4.3.2", "json-stringify-safe": "^5.0.1" } }, "@storybook/channels": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-4.1.1.tgz", - "integrity": "sha512-ILOi+y9wtqOP7cYcVNBCx8vYTXsObz6O9jFKxQKL55lbnlUqyRVTEf4qlA1ilkZqPBM7PwtZs+zX31hgJfWYog==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/channels/-/channels-4.1.3.tgz", + "integrity": "sha512-SaxHlNbNO2yXwg7GI4k6TGWhYK+WdXEDLfDp9w2BigZQel5SCDZsuOCYtE3yG6ajrdBq4ehkhnLPE0wQcupp7A==", "dev": true }, "@storybook/client-logger": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-4.1.1.tgz", - "integrity": "sha512-NrxQGqrNL2vQjDhkvcMIhDte/FNkAziBdeY1tt5WB9fOZMHxruPamp/lag3XW7G1AiHLk3R4M07kLqBExXZZGQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/client-logger/-/client-logger-4.1.3.tgz", + "integrity": "sha512-J7QDBsP7qMBjuyXR8MTrcEk+KiYgriztg1ycTopltCiiroi8yCeIaNIUQZ3rbEsKpHdDVT/oDj1g5WDafQ03Qg==", "dev": true }, "@storybook/components": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/components/-/components-4.1.1.tgz", - "integrity": "sha512-dJE1vKg8NOiWt/FpQ60ym7xn+WcVkoiUeXG8vXPFxOqcI00yZizHtwJexWT6ltX8u7i2ODF6IU9dyUI3L2nOyQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/components/-/components-4.1.3.tgz", + "integrity": "sha512-Ik1j04pAw/i9wsxIQLSkbR1B5l7B23kMtzGtcVPRp1seunypxqNdX7o0sxg+xPFWNL7YDsrwP0FIP0HgUuriLQ==", "dev": true, "requires": { "@emotion/core": "^0.13.1", @@ -973,9 +942,9 @@ } }, "@storybook/core": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/core/-/core-4.1.1.tgz", - "integrity": "sha512-rTAliMTFzWuNxcDBxK776A8ko2Z2FuSY4WHTQG3+aCYzRJdML7Td6u1HK11GpiMmjXi7duePIvrm+4Ljlpm/kQ==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/core/-/core-4.1.3.tgz", + "integrity": "sha512-boyc+/fmNd/HReEkec8UVqAqiMUXBbTu64xG2yytNJQ+Z9jzlGBMMJQWC6Ad5iAwgSco3BbbRT7XRkhhC35ibA==", "dev": true, "requires": { "@babel/plugin-proposal-class-properties": "^7.2.0", @@ -983,12 +952,12 @@ "@emotion/core": "^0.13.1", "@emotion/provider": "^0.11.2", "@emotion/styled": "^0.10.6", - "@storybook/addons": "4.1.1", - "@storybook/channel-postmessage": "4.1.1", - "@storybook/client-logger": "4.1.1", - "@storybook/core-events": "4.1.1", - "@storybook/node-logger": "4.1.1", - "@storybook/ui": "4.1.1", + "@storybook/addons": "4.1.3", + "@storybook/channel-postmessage": "4.1.3", + "@storybook/client-logger": "4.1.3", + "@storybook/core-events": "4.1.3", + "@storybook/node-logger": "4.1.3", + "@storybook/ui": "4.1.3", "airbnb-js-shims": "^1 || ^2", "autoprefixer": "^9.3.1", "babel-plugin-macros": "^2.4.2", @@ -1041,53 +1010,21 @@ "webpack": "^4.23.1", "webpack-dev-middleware": "^3.4.0", "webpack-hot-middleware": "^2.24.3" - }, - "dependencies": { - "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", - "dev": true - }, - "json5": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", - "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", - "dev": true, - "requires": { - "minimist": "^1.2.0" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } } }, "@storybook/core-events": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-4.1.1.tgz", - "integrity": "sha512-XEEjzXjteTtRy6A/jzZkQmldFFmYsoFM2lz0KTTXdFtUvW4rcjqhR9GuicALqRh0c25T9QtGKf0BLCsK4WAtSw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/core-events/-/core-events-4.1.3.tgz", + "integrity": "sha512-mMHclba/+TCPdz+UXX0TYXN3SVe17p5n9OuZ6h0hZPdUPaqwN5xsi+UmYH6jGutHEzwkiVzw4cs5QvkcxuUzng==", "dev": true }, "@storybook/html": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/html/-/html-4.1.1.tgz", - "integrity": "sha512-IS9yyll57Qsnrp2sPQFhP0Pqn0c85xg35yBu/eXtR8H3mHoLFH2oLYcUDxtdcy9/Pq2Zr4NitjJ7spbta0/sQw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/html/-/html-4.1.3.tgz", + "integrity": "sha512-Avpsmdbl0WMeO8QeuW4jFTyHXsT9lFr/18/GWAsWzD1S5pVLp26UrPOzLr+U7uulhMxIuqbh1mutN4se7H58pQ==", "dev": true, "requires": { - "@storybook/core": "4.1.1", + "@storybook/core": "4.1.3", "common-tags": "^1.8.0", "core-js": "^2.5.7", "global": "^4.3.2", @@ -1109,9 +1046,9 @@ } }, "@storybook/node-logger": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-4.1.1.tgz", - "integrity": "sha512-jXccUlqgp6OK1O5Gr66qfefq984MipY8LKDE75y7UO+AQdNR5bwIy69XXr1mp9H5C2dpIS8cBaSoFuZouuTHnw==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/node-logger/-/node-logger-4.1.3.tgz", + "integrity": "sha512-UMyic114zKOwusubRajH42moR9ad0dJo56oRw5yk31UjMIn930AHfAAHxjfbm8FfUrz24rud2/gfC1UQjSqq5g==", "dev": true, "requires": { "chalk": "^2.4.1", @@ -1166,16 +1103,16 @@ } }, "@storybook/ui": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-4.1.1.tgz", - "integrity": "sha512-qcYhTm2VHOg3jkR1hTo0j7cfx8Ks7YvdhJ73aszVEUwDJKG7tZWHs1ymn0waOk+NBzFltoo9kloSTpULRql+0g==", + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/@storybook/ui/-/ui-4.1.3.tgz", + "integrity": "sha512-0tjir7iMhjVjMSyYPZ2f/EAEBE62rkmVp/aWGzkMDuRvrxFUQ7Z73C8fRdpYoNcvqlXFf3oh88q7zHd7SKNCdA==", "dev": true, "requires": { "@emotion/core": "^0.13.1", "@emotion/provider": "^0.11.2", "@emotion/styled": "^0.10.6", - "@storybook/components": "4.1.1", - "@storybook/core-events": "4.1.1", + "@storybook/components": "4.1.3", + "@storybook/core-events": "4.1.3", "@storybook/mantra-core": "^1.7.2", "@storybook/podda": "^1.2.3", "@storybook/react-komposer": "^2.0.5", @@ -1200,9 +1137,9 @@ "dev": true }, "@types/node": { - "version": "10.12.15", - "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.15.tgz", - "integrity": "sha512-9kROxduaN98QghwwHmxXO2Xz3MaWf+I1sLVAA6KJDF5xix+IyXVhds0MAfdNwtcpSrzhaTsNB0/jnL86fgUhqA==", + "version": "10.12.18", + "resolved": "https://registry.npmjs.org/@types/node/-/node-10.12.18.tgz", + "integrity": "sha512-fh+pAqt4xRzPfqA6eh3Z2y6fyZavRIumvjhaCL753+TVkGKGhpPeyrJG2JftD0T9q4GF00KjefsQ+PQNDdWQaQ==", "dev": true }, "@webassemblyjs/ast": { @@ -1480,9 +1417,9 @@ } }, "ajv": { - "version": "6.6.1", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.1.tgz", - "integrity": "sha512-ZoJjft5B+EJBjUyu9C9Hc0OZyPZSSlOF+plzouTrg6UlA8f+e/n8NIgBFG/9tppJtpPWfthHakK7juJdNDODww==", + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.6.2.tgz", + "integrity": "sha512-FBHEW6Jf5TB9MGBgUUA9XHkTbjXYfAUjY43ACMfmdMRHniyoMHjHjzD50OK8LGDWQwp4rWEsIq5kEqq7rvIM1g==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -1504,18 +1441,18 @@ "dev": true }, "ansi-align": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz", - "integrity": "sha1-w2rsy6VjuJzrVW82kPCx2eNUf38=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz", + "integrity": "sha512-ZpClVKqXN3RGBmKibdfWzqCY4lnjEuoNzU5T0oEFpfd/z5qJHVarukridD4juLO2FXMiwUQxr9WqQtaYa8XRYw==", "dev": true, "requires": { - "string-width": "^2.0.0" + "string-width": "^3.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", "dev": true }, "is-fullwidth-code-point": { @@ -1525,22 +1462,23 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.0.0.tgz", + "integrity": "sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.0.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.0.0" } } } @@ -1827,13 +1765,13 @@ "dev": true }, "autoprefixer": { - "version": "9.4.2", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.2.tgz", - "integrity": "sha512-tYQYJvZvqlJCzF+BLC//uAcdT/Yy4ik9bwZRXr/EehUJ/bjjpTthsWTy8dpowdoIE1sLCDf1ch4Eb2cOSzZC9w==", + "version": "9.4.3", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.4.3.tgz", + "integrity": "sha512-/XSnzDepRkAU//xLcXA/lUWxpsBuw0WiriAHOqnxkuCtzLhaz+fL4it4gp20BQ8n5SyLzK/FOc7A0+u/rti2FQ==", "dev": true, "requires": { - "browserslist": "^4.3.5", - "caniuse-lite": "^1.0.30000914", + "browserslist": "^4.3.6", + "caniuse-lite": "^1.0.30000921", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", "postcss": "^7.0.6", @@ -1890,7 +1828,7 @@ }, "supports-color": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", + "resolved": "http://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", "dev": true } @@ -2016,24 +1954,13 @@ } }, "babel-plugin-macros": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.4.2.tgz", - "integrity": "sha512-NBVpEWN4OQ/bHnu1fyDaAaTPAjnhXCEPqr1RwqxrU7b6tZ2hypp+zX4hlNfmVGfClD5c3Sl6Hfj5TJNF5VG5aA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/babel-plugin-macros/-/babel-plugin-macros-2.4.3.tgz", + "integrity": "sha512-M8cE1Rx0zgfKYBWAS+T6ZVCLGuTKdBI5Rn3fu9q6iVdH0UjaXdmF501/VEYn7kLHCgguhGNk5JBzOn64e2xDEA==", "dev": true, "requires": { "cosmiconfig": "^5.0.5", "resolve": "^1.8.1" - }, - "dependencies": { - "resolve": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.8.1.tgz", - "integrity": "sha512-AicPrAC7Qu1JxPCZ9ZgCZlY35QgFnNqc+0LtbRNxnVw4TXvjQ72wnuL9JQcEBgXkI9JM8MsT9kaQoHcpCRJOYA==", - "dev": true, - "requires": { - "path-parse": "^1.0.5" - } - } } }, "babel-plugin-minify-builtins": { @@ -2406,24 +2333,24 @@ "dev": true }, "boxen": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-2.0.0.tgz", - "integrity": "sha512-9DK9PQqcOpsvlKOK3f3lVK+vQsqH4JDGMX73FCWcHRxQQtop1U8urn4owrt5rnc2NgZAJ6wWjTDBc7Fhv+vz/w==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-2.1.0.tgz", + "integrity": "sha512-luq3RQOt2U5sUX+fiu+qnT+wWnHDcATLpEe63jvge6GUZO99AKbVRfp97d2jgLvq1iQa0ORzaAm4lGVG52ZSlw==", "dev": true, "requires": { - "ansi-align": "^2.0.0", + "ansi-align": "^3.0.0", "camelcase": "^5.0.0", "chalk": "^2.4.1", "cli-boxes": "^1.0.0", - "string-width": "^2.1.1", + "string-width": "^3.0.0", "term-size": "^1.2.0", "widest-line": "^2.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.0.0.tgz", + "integrity": "sha512-iB5Dda8t/UqpPI/IjsejXu5jOGDrzn41wJyljwPH65VCIbk6+1BzFIMJGFwTNrYXT1CrD+B4l19U7awiQ8rk7w==", "dev": true }, "is-fullwidth-code-point": { @@ -2433,22 +2360,23 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.0.0.tgz", + "integrity": "sha512-rr8CUxBbvOZDUvc5lNIJ+OC1nPVpz+Siw9VBtUjB9b6jZehZLFt0JMCZzShFHIsI8cbhm0EsNIfWJMFV3cu3Ew==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.0.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.0.0.tgz", + "integrity": "sha512-Uu7gQyZI7J7gn5qLn1Np3G9vcYGTVqB+lFTytnDJv83dd8T22aGH451P3jueT2/QemInJDfxHB5Tde5OzgG1Ow==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.0.0" } } } @@ -2628,25 +2556,42 @@ "dev": true }, "cacache": { - "version": "11.3.1", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.1.tgz", - "integrity": "sha512-2PEw4cRRDu+iQvBTTuttQifacYjLPhET+SYO/gEFMy8uhi+jlJREDAjSF5FWSdV/Aw5h18caHA7vMTw2c+wDzA==", + "version": "11.3.2", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", + "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", "dev": true, "requires": { - "bluebird": "^3.5.1", - "chownr": "^1.0.1", - "figgy-pudding": "^3.1.0", - "glob": "^7.1.2", - "graceful-fs": "^4.1.11", - "lru-cache": "^4.1.3", + "bluebird": "^3.5.3", + "chownr": "^1.1.1", + "figgy-pudding": "^3.5.1", + "glob": "^7.1.3", + "graceful-fs": "^4.1.15", + "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", "rimraf": "^2.6.2", - "ssri": "^6.0.0", - "unique-filename": "^1.1.0", + "ssri": "^6.0.1", + "unique-filename": "^1.1.1", "y18n": "^4.0.0" + }, + "dependencies": { + "lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "requires": { + "yallist": "^3.0.2" + } + }, + "yallist": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", + "dev": true + } } }, "cache-base": { @@ -2713,9 +2658,9 @@ "dev": true }, "caniuse-lite": { - "version": "1.0.30000921", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000921.tgz", - "integrity": "sha512-Bu09ciy0lMWLgpYC77I0YGuI8eFRBPPzaSOYJK1jTI64txCphYCqnWbxJYjHABYVt/TYX/p3jNjLBR87u1Bfpw==", + "version": "1.0.30000923", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000923.tgz", + "integrity": "sha512-j5ur7eeluOFjjPUkydtXP4KFAsmH3XaQNch5tvWSO+dLHYt5PE+VgJZLWtbVOodfWij6m6zas28T4gB/cLYq1w==", "dev": true }, "case-sensitive-paths-webpack-plugin": { @@ -2864,6 +2809,14 @@ "dev": true, "requires": { "source-map": "~0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "cli-boxes": { @@ -2985,9 +2938,9 @@ } }, "commander": { - "version": "2.17.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", - "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", + "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", "dev": true }, "common-tags": { @@ -3016,7 +2969,7 @@ }, "concat-stream": { "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "resolved": "http://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", "dev": true, "requires": { @@ -3049,7 +3002,7 @@ }, "content-disposition": { "version": "0.5.2", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "resolved": "http://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=", "dev": true }, @@ -3101,9 +3054,9 @@ "dev": true }, "core-js": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.0.tgz", - "integrity": "sha512-kLRC6ncVpuEW/1kwrOXYX6KQASCVtrh1gQr/UiaVgFlf9WE5Vp+lNe5+h3LuMr5PAucWnnEXwH0nQHRH/gpGtw==", + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.1.tgz", + "integrity": "sha512-L72mmmEayPJBejKIWe2pYtGis5r0tQ5NaJekdhyXgeMQTpJoBsH0NL4ElY2LfSoV15xeQWKQ+XTTOZdyero5Xg==", "dev": true }, "core-util-is": { @@ -3232,6 +3185,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -3326,14 +3285,14 @@ "dev": true }, "d3-array": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.0.0.tgz", - "integrity": "sha512-Biw2t88UArwTQT1YPaG/hx2ftEjl/zP3VWb4wlgG6cs6kANTiSG7VLsIU6jH4c5BrHlZN9auDT218/lySs04zQ==" + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/d3-array/-/d3-array-2.0.2.tgz", + "integrity": "sha512-dbjbKhMdnTW6ToWsopRs4/+ZPOsqQE1QeeoUEvzIqhdkT29zzAUcUh8HMb92tTITVlbW/G0UBz4ryBqC2RTUIA==" }, "d3-axis": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.8.tgz", - "integrity": "sha1-MacFoLU15ldZ3hQXOjGTMTfxjvo=" + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/d3-axis/-/d3-axis-1.0.12.tgz", + "integrity": "sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==" }, "d3-collection": { "version": "1.0.7", @@ -3346,23 +3305,23 @@ "integrity": "sha512-x37qq3ChOTLd26hnps36lexMRhNXEtVxZ4B25rL0DVdDsGQIJGB18S7y9XDwlDD6MD/ZBzITCf4JjGMM10TZkw==" }, "d3-dispatch": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.0.tgz", - "integrity": "sha1-fzbCFkmhDyoyRR3MqHmKBUFkSb4=" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/d3-dispatch/-/d3-dispatch-1.0.5.tgz", + "integrity": "sha512-vwKx+lAqB1UuCeklr6Jh1bvC4SZgbSqbkGBLClItFBIYH4vqDJCA7qfoy14lXmJdnBOdxndAMxjCbImJYW7e6g==" }, "d3-drag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.0.0.tgz", - "integrity": "sha1-NPDLYmV1T5TdH8NCpXRu22Deumw=", + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.3.tgz", + "integrity": "sha512-8S3HWCAg+ilzjJsNtWW1Mutl74Nmzhb9yU6igspilaJzeZVFktmY6oO9xOh5TDk+BM2KrNFjttZNoJJmDnkjkg==", "requires": { "d3-dispatch": "1", "d3-selection": "1" } }, "d3-ease": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.0.tgz", - "integrity": "sha1-AZgbM/MMpug7XgO3hnNF8EV9eaU=" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/d3-ease/-/d3-ease-1.0.5.tgz", + "integrity": "sha512-Ct1O//ly5y5lFM9YTdu+ygq7LleSgSE4oj7vUt9tPLHUi8VCV7QoizGpdWRWAwCO9LdYzIrQDg97+hGVdsSGPQ==" }, "d3-format": { "version": "1.3.2", @@ -3384,9 +3343,9 @@ "dev": true }, "d3-scale": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.0.0.tgz", - "integrity": "sha512-Sa2Ny6CoJT7x6dozxPnvUQT61epGWsgppFvnNl8eJEzfJBG0iDBBTJAtz2JKem7Mb+NevnaZiDiIDHsuWkv6vg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.1.2.tgz", + "integrity": "sha512-bESpd64ylaKzCDzvULcmHKZTlzA/6DGSVwx7QSDj/EnX9cpSevsdiwdHFYI9ouo9tNBbV3v5xztHS2uFeOzh8Q==", "requires": { "d3-array": "^1.2.0", "d3-collection": "1", @@ -3404,9 +3363,9 @@ } }, "d3-selection": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.0.0.tgz", - "integrity": "sha1-MHpYLzGf4VeesKYOZt2rdGYIXBI=" + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-1.3.2.tgz", + "integrity": "sha512-OoXdv1nZ7h2aKMVg3kaUFbLLK5jXUFAMLD/Tu5JA96mjf8f2a9ZUESGY+C36t8R1WFeWk/e55hy54Ml2I62CRQ==" }, "d3-shape": { "version": "1.2.2", @@ -3430,6 +3389,24 @@ "d3-time": "1" } }, + "d3-timer": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/d3-timer/-/d3-timer-1.0.9.tgz", + "integrity": "sha512-rT34J5HnQUHhcLvhSB9GjCkN0Ddd5Y8nCwDBG2u6wQEeYxT/Lf51fTFFkldeib/sE/J0clIe0pnCfs6g/lRbyg==" + }, + "d3-transition": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.1.3.tgz", + "integrity": "sha512-tEvo3qOXL6pZ1EzcXxFcPNxC/Ygivu5NoBY6mbzidATAeML86da+JfVIUzon3dNM6UX6zjDx+xbYDmMVtTSjuA==", + "requires": { + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" + } + }, "dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -3774,9 +3751,9 @@ "dev": true }, "electron-to-chromium": { - "version": "1.3.92", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.92.tgz", - "integrity": "sha512-En051LMzMl3/asMWGZEtU808HOoVWIpmmZx1Ep8N+TT9e7z/X8RcLeBU2kLSNLGQ+5SuKELzMx+MVuTBXk6Q9w==", + "version": "1.3.96", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.96.tgz", + "integrity": "sha512-ZUXBUyGLeoJxp4Nt6G/GjBRLnyz8IKQGexZ2ndWaoegThgMGFO1tdDYID5gBV32/1S83osjJHyfzvanE/8HY4Q==", "dev": true }, "elliptic": { @@ -3794,6 +3771,12 @@ "minimalistic-crypto-utils": "^1.0.0" } }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, "emojis-list": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", @@ -3935,6 +3918,13 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "optional": true } } }, @@ -4733,24 +4723,28 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-u13KOCu5TwXhUZQ3PRb9O6HKEQ0=", "dev": true, "optional": true, "requires": { @@ -4760,12 +4754,14 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": false, + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "requires": { "balanced-match": "^1.0.0", @@ -4774,34 +4770,40 @@ }, "chownr": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4qdQQqlVGQi+vSW4Uj1fl2nXkYE=", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "2.6.9", - "bundled": true, + "resolved": false, + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", "dev": true, "optional": true, "requires": { @@ -4810,25 +4812,29 @@ }, "deep-extend": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-N8vBdOa+DF7zkRrDCsaOXoCs/E2fJfx9B9MrKnnSiHNh4ws7eSys6YQE4KvT1cecKmOASYQBhbKjeuDD9lT81w==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -4837,13 +4843,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": false, + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -4859,7 +4867,8 @@ }, "glob": { "version": "7.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", "dev": true, "optional": true, "requires": { @@ -4873,13 +4882,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.21", - "bundled": true, + "resolved": false, + "integrity": "sha512-En5V9za5mBt2oUA03WGD3TwDv0MKAruqsuxstbMUZaj9W9k/m1CV/9py3l0L5kw9Bln8fdHQmzHSYtvpvTLpKw==", "dev": true, "optional": true, "requires": { @@ -4888,7 +4899,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -4897,7 +4909,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": false, + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -4907,18 +4920,21 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "requires": { "number-is-nan": "^1.0.0" @@ -4926,13 +4942,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "requires": { "brace-expansion": "^1.1.7" @@ -4940,12 +4958,14 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": false, + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true }, "minipass": { "version": "2.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-hzXIWWet/BzWhYs2b+u7dRHlruXhwdgvlTMDKC6Cb1U7ps6Ac6yQlR39xsbjWJE377YTCtKwIXIpJ5oP+j5y8g==", "dev": true, "requires": { "safe-buffer": "^5.1.1", @@ -4954,7 +4974,8 @@ }, "minizlib": { "version": "1.1.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4T6Ur/GctZ27nHfpt9THOdRZNgyJ9FZchYO1ceg5S8Q3DNLCKYy44nCZzgCJgcvx2UM8czmqak5BCxJMrq37lA==", "dev": true, "optional": true, "requires": { @@ -4963,7 +4984,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" @@ -4971,13 +4993,15 @@ }, "ms": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true, "optional": true }, "needle": { "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-eFagy6c+TYayorXw/qtAdSvaUpEbBsDwDyxYFgLZ0lTojfH7K+OdBqAF7TAFwDokJaGpubpSGG0wO3iC0XPi8w==", "dev": true, "optional": true, "requires": { @@ -4988,7 +5012,8 @@ }, "node-pre-gyp": { "version": "0.10.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-G7kEonQLRbcA/mOoFoxvlMrw6Q6dPf92+t/l0DFSMuSlDoWaI9JWIyPwK0jyE1bph//CUEL65/Fz1m2vJbmjQQ==", "dev": true, "optional": true, "requires": { @@ -5006,7 +5031,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -5016,13 +5042,15 @@ }, "npm-bundled": { "version": "1.0.3", - "bundled": true, + "resolved": false, + "integrity": "sha512-ByQ3oJ/5ETLyglU2+8dBObvhfWXX8dtPZDMePCahptliFX2iIuhyEszyFk401PZUNQH20vvdW5MLjJxkwU80Ow==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.1.10", - "bundled": true, + "resolved": false, + "integrity": "sha512-AQC0Dyhzn4EiYEfIUjCdMl0JJ61I2ER9ukf/sLxJUcZHfo+VyEfz2rMJgLZSS1v30OxPQe1cN0LZA1xbcaVfWA==", "dev": true, "optional": true, "requires": { @@ -5032,7 +5060,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -5044,18 +5073,21 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "requires": { "wrappy": "1" @@ -5063,19 +5095,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": false, + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -5085,19 +5120,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.7", - "bundled": true, + "resolved": false, + "integrity": "sha512-LdLD8xD4zzLsAT5xyushXDNscEjB7+2ulnl8+r1pnESlYtlJtVSoCMBGr30eDRJ3+2Gq89jK9P9e4tCEH1+ywA==", "dev": true, "optional": true, "requires": { @@ -5109,7 +5147,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -5117,7 +5156,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": false, + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -5132,7 +5172,8 @@ }, "rimraf": { "version": "2.6.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-lreewLK/BlghmxtfH36YYVg1i8IAce4TI7oao75I1g245+6BctqTVQiBP3YUJ9C6DQOXJmkYR9X9fCLtCOJc5w==", "dev": true, "optional": true, "requires": { @@ -5141,42 +5182,49 @@ }, "safe-buffer": { "version": "5.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-kKvNJn6Mm93gAczWVJg7wH+wGYWNrDHdWvpUmHyEsgCtIwwo3bqPtV4tR5tuPaUhTOo/kvhVwd8XwwOllGYkbg==", "dev": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": false, + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.5.0", - "bundled": true, + "resolved": false, + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "requires": { "code-point-at": "^1.0.0", @@ -5186,7 +5234,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -5195,7 +5244,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "requires": { "ansi-regex": "^2.0.0" @@ -5203,13 +5253,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": false, + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.1", - "bundled": true, + "resolved": false, + "integrity": "sha512-O+v1r9yN4tOsvl90p5HAP4AEqbYhx4036AGMm075fH9F8Qwi3oJ+v4u50FkT/KkvywNGtwkk0zRI+8eYm1X/xg==", "dev": true, "optional": true, "requires": { @@ -5224,13 +5276,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-ijDLlyQ7s6x1JgCLur53osjm/UXUYD9+0PbYKrBsYisYXzCxN+HC3mYDNy/dWdmf3AwqwU3CXwDCvsNgGK1S0w==", "dev": true, "optional": true, "requires": { @@ -5239,12 +5293,14 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true }, "yallist": { "version": "3.0.2", - "bundled": true, + "resolved": false, + "integrity": "sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k=", "dev": true } } @@ -5616,6 +5672,14 @@ "param-case": "2.1.x", "relateurl": "0.2.x", "uglify-js": "3.4.x" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + } } }, "html-webpack-plugin": { @@ -5811,6 +5875,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -6400,10 +6470,13 @@ "dev": true }, "json5": { - "version": "0.5.1", - "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", - "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", - "dev": true + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz", + "integrity": "sha512-8Mh9h6xViijj36g7Dxi+Y4S6hNGV96vcJZr/SrlHh1LR/pEn/8j/+qIBbs44YKl69Lrfctp4QD+AdWLTMqEZAQ==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } }, "jsonfile": { "version": "2.4.0", @@ -6499,6 +6572,14 @@ "big.js": "^3.1.3", "emojis-list": "^2.0.0", "json5": "^0.5.0" + }, + "dependencies": { + "json5": { + "version": "0.5.1", + "resolved": "http://registry.npmjs.org/json5/-/json5-0.5.1.tgz", + "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=", + "dev": true + } } }, "locate-path": { @@ -6557,9 +6638,9 @@ "dev": true }, "lru-cache": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", - "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz", + "integrity": "sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==", "dev": true, "requires": { "pseudomap": "^1.0.2", @@ -6573,14 +6654,6 @@ "dev": true, "requires": { "pify": "^3.0.0" - }, - "dependencies": { - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - } } }, "map-cache": { @@ -6732,9 +6805,9 @@ } }, "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "version": "1.2.0", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "mississippi": { @@ -6778,11 +6851,19 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + } } }, "move-concurrently": { @@ -6800,9 +6881,9 @@ } }, "mri": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.1.tgz", - "integrity": "sha1-haom09ru7t+A3FmEr5XMXKXK2fE=", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/mri/-/mri-1.1.3.tgz", + "integrity": "sha512-UXsBnQVYo3F5t0itj2IYA69UOHvUPDCUamVgpGD6816fZsu4alrw6dWckVrgzTtoEppT5SO6Xl17hz0ER7UspA==", "dev": true }, "ms": { @@ -6818,9 +6899,9 @@ "dev": true }, "nan": { - "version": "2.11.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.11.1.tgz", - "integrity": "sha512-iji6k87OSXa0CcrLl9z+ZiYSuR2o+c0bGuNmXdrhTQTakxytAFsC56SArGYoiHlJlFoHSnvmhpceZJaXkVuOtA==", + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==", "dev": true, "optional": true }, @@ -6928,9 +7009,9 @@ } }, "node-releases": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.1.tgz", - "integrity": "sha512-2UXrBr6gvaebo5TNF84C66qyJJ6r0kxBObgZIDX3D3/mt1ADKiHux3NJPWisq0wxvJJdkjECH+9IIKYViKj71Q==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.2.tgz", + "integrity": "sha512-j1gEV/zX821yxdWp/1vBMN0pSUjuH9oGUdLCb4PfUko6ZW7KdRs3Z+QGGwDUhYtSpQvdVVyLd2V0YvLsmdg5jQ==", "dev": true, "requires": { "semver": "^5.3.0" @@ -7336,7 +7417,7 @@ }, "path-is-absolute": { "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "resolved": "http://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, @@ -7489,14 +7570,22 @@ "dev": true }, "postcss": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.6.tgz", - "integrity": "sha512-Nq/rNjnHFcKgCDDZYO0lNsl6YWe6U7tTy+ESN+PnLxebL8uBtYX59HZqvrj7YLK5UCyll2hqDsJOo3ndzEW8Ug==", + "version": "7.0.7", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.7.tgz", + "integrity": "sha512-HThWSJEPkupqew2fnuQMEI2YcTj/8gMV3n80cMdJsKxfIh5tHf7nM5JigNX6LxVMqo6zkgQNAI88hyFvBk41Pg==", "dev": true, "requires": { "chalk": "^2.4.1", "source-map": "^0.6.1", "supports-color": "^5.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "postcss-flexbugs-fixes": { @@ -7563,6 +7652,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -7586,6 +7681,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -7609,6 +7710,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -7632,6 +7739,12 @@ "source-map": "^0.6.1", "supports-color": "^5.4.0" } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true } } }, @@ -7682,17 +7795,6 @@ "mri": "^1.1.0" }, "dependencies": { - "cross-spawn": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", - "integrity": "sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk=", - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - }, "execa": { "version": "0.8.0", "resolved": "https://registry.npmjs.org/execa/-/execa-0.8.0.tgz", @@ -7717,12 +7819,6 @@ "locate-path": "^2.0.0" } }, - "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", - "dev": true - }, "locate-path": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", @@ -7991,15 +8087,15 @@ "dev": true }, "react": { - "version": "16.6.3", - "resolved": "https://registry.npmjs.org/react/-/react-16.6.3.tgz", - "integrity": "sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw==", + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/react/-/react-16.7.0.tgz", + "integrity": "sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.11.2" + "scheduler": "^0.12.0" } }, "react-dev-utils": { @@ -8138,15 +8234,15 @@ } }, "react-dom": { - "version": "16.6.3", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.6.3.tgz", - "integrity": "sha512-8ugJWRCWLGXy+7PmNh8WJz3g1TaTUt1XyoIcFN+x0Zbkoz+KKdUyx1AQLYJdbFXjuF41Nmjn5+j//rxvhFjgSQ==", + "version": "16.7.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-16.7.0.tgz", + "integrity": "sha512-D0Ufv1ExCAmF38P2Uh1lwpminZFRXEINJe53zRAbm4KPwSyd6DY/uDoS0Blj9jvPpn1+wivKpZYc8aAAN/nAkg==", "dev": true, "requires": { "loose-envify": "^1.1.0", "object-assign": "^4.1.1", "prop-types": "^15.6.2", - "scheduler": "^0.11.2" + "scheduler": "^0.12.0" } }, "react-error-overlay": { @@ -8185,9 +8281,9 @@ "dev": true }, "react-modal": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.7.1.tgz", - "integrity": "sha512-eSgotXkqOCXi0b27AwLCoJ8yqLepKnbZdMp/zfUmZPnMNoe39pDT0mbAPq9rp+TToqM5GUTv8C36Cuja+ThbhA==", + "version": "3.8.1", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-3.8.1.tgz", + "integrity": "sha512-aLKeZM9pgXpIKVwopRHMuvqKWiBajkqisDA8UzocdCF6S4fyKVfLWmZR5G1Q0ODBxxxxf2XIwiCP8G/11GJAuw==", "dev": true, "requires": { "exenv": "^1.2.0", @@ -8229,9 +8325,9 @@ } }, "react-transition-group": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.1.tgz", - "integrity": "sha512-8x/CxUL9SjYFmUdzsBPTgtKeCxt7QArjNSte0wwiLtF/Ix/o1nWNJooNy5o9XbHIKS31pz7J5VF2l41TwlvbHQ==", + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.5.2.tgz", + "integrity": "sha512-vwHP++S+f6KL7rg8V1mfs62+MBKtbMeZDR8KiNmD7v98Gs3UPGsDZDahPJH2PVprFW5YHJfh6cbNim3zPndaSQ==", "dev": true, "requires": { "dom-helpers": "^3.3.1", @@ -8309,12 +8405,6 @@ "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, @@ -8599,12 +8689,12 @@ "dev": true }, "resolve": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", - "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.9.0.tgz", + "integrity": "sha512-TZNye00tI67lwYvzxCxHGjwTNlUV70io54/Ed4j6PscB8xVfuBJpRenI/o6dVk0cY0PYTY27AgCoGGxRnYuItQ==", "dev": true, "requires": { - "path-parse": "^1.0.5" + "path-parse": "^1.0.6" } }, "resolve-dir": { @@ -8674,9 +8764,9 @@ } }, "rollup": { - "version": "0.68.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.0.tgz", - "integrity": "sha512-UbmntCf8QBlOqJnwsNWQCI0oonHOgs9y1OLoO8BHf2r8gCyRLp3JzLHXARJpsNDAS08Qm3LDjzyWma5sqnCxDQ==", + "version": "0.68.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.68.1.tgz", + "integrity": "sha512-8DNKos2p/B7gDoxI42kyIHHX8d+Zt+bwhjUgXnTqnSP+CSPkRNNIQyHIcTqeGdYWR70qG6c1DaRcrjWAiG6Akg==", "dev": true, "requires": { "@types/estree": "0.0.39", @@ -8747,9 +8837,9 @@ } }, "scheduler": { - "version": "0.11.3", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.11.3.tgz", - "integrity": "sha512-i9X9VRRVZDd3xZw10NY5Z2cVMbdYg6gqFecfj79USv1CFN+YrJ3gIPRKf1qlY+Sxly4djoKdfx1T+m9dnRB8kQ==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.12.0.tgz", + "integrity": "sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw==", "dev": true, "requires": { "loose-envify": "^1.1.0", @@ -9030,12 +9120,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true - }, - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true } } }, @@ -9148,9 +9232,9 @@ "dev": true }, "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", "dev": true }, "source-map-resolve": { @@ -9174,6 +9258,14 @@ "requires": { "buffer-from": "^1.0.0", "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "source-map-url": { @@ -9218,9 +9310,9 @@ } }, "spdx-license-ids": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.2.tgz", - "integrity": "sha512-qky9CVt0lVIECkEsYbNILVnPvycuEBkXoMFLRWsREkomQLevYhtRKC+R91a5TOAQ3bCMjikRwhyaRqj1VYatYg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.3.tgz", + "integrity": "sha512-uBIcIl3Ih6Phe3XHK1NqboJLdGfwr1UN3k6wSD1dZpmPsIkb8AGNbZYJ1fOBk834+Gxy8rpfDxrS6XLEMZMY2g==", "dev": true }, "split-string": { @@ -9239,9 +9331,9 @@ "dev": true }, "sshpk": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.2.tgz", - "integrity": "sha512-Ra/OXQtuh0/enyl4ETZAfTaeksa6BXks5ZcjpSUNrjBr0DvrJKX+1fsKDPpT9TBXgHAFsa4510aNVgI8g/+SzA==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.0.tgz", + "integrity": "sha512-Zhev35/y7hRMcID/upReIvRse+I9SVhyVre/KTJSJQWMz3C3+G+HpO7m1wK/yckEtujKZ7dS4hkVxAnmHaIGVQ==", "dev": true, "requires": { "asn1": "~0.2.3", @@ -9413,7 +9505,7 @@ }, "strip-eof": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", "dev": true }, @@ -9567,11 +9659,14 @@ "through": "~2.3.8" }, "dependencies": { - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true + "resolve": { + "version": "1.7.1", + "resolved": "http://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", + "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", + "dev": true, + "requires": { + "path-parse": "^1.0.5" + } } } }, @@ -9585,20 +9680,34 @@ } }, "terser": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/terser/-/terser-3.11.0.tgz", - "integrity": "sha512-5iLMdhEPIq3zFWskpmbzmKwMQixKmTYwY3Ox9pjtSklBLnHiuQ0GKJLhL1HSYtyffHM3/lDIFBnb82m9D7ewwQ==", + "version": "3.13.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-3.13.1.tgz", + "integrity": "sha512-ogyZye4DFqOtMzT92Y3Nxxw8OvXmL39HOALro4fc+EUYFFF9G/kk0znkvwMz6PPYgBtdKAodh3FPR70eugdaQA==", "dev": true, "requires": { "commander": "~2.17.1", "source-map": "~0.6.1", "source-map-support": "~0.5.6" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "terser-webpack-plugin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz", - "integrity": "sha512-61lV0DSxMAZ8AyZG7/A4a3UPlrbOBo8NIQ4tJzLPAdGOQ+yoNC7l5ijEow27lBAL2humer01KLS6bGIMYQxKoA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-1.2.0.tgz", + "integrity": "sha512-QW7RACLS89RalHtLDb0s8+Iqcs/IAEw1rnVrV+mS7Gx1kgPG8o1g33JhAGDgc/CQ84hLsTW5WrAMdVysh692yg==", "dev": true, "requires": { "cacache": "^11.0.2", @@ -9609,6 +9718,14 @@ "terser": "^3.8.1", "webpack-sources": "^1.1.0", "worker-farm": "^1.5.2" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "text-table": { @@ -9619,7 +9736,7 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -9796,6 +9913,20 @@ "requires": { "commander": "~2.17.1", "source-map": "~0.6.1" + }, + "dependencies": { + "commander": { + "version": "2.17.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz", + "integrity": "sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "unicode-canonical-property-names-ecmascript": { @@ -10155,9 +10286,9 @@ "dev": true }, "webpack": { - "version": "4.27.1", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.27.1.tgz", - "integrity": "sha512-WArHiLvHrlfyRM8i7f+2SFbr/XbQ0bXqTkPF8JpHOzub5482Y3wx7rEO8stuLGOKOgZJcqcisLhD7LrM/+fVMw==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-4.28.2.tgz", + "integrity": "sha512-PK3uVg3/NuNVOjPfYleFI6JF7khO7c2kIlksH7mivQm+QDcwiqV1x6+q89dDeOioh5FNxJHr3LKbDu3oSAhl9g==", "dev": true, "requires": { "@webassemblyjs/ast": "1.7.11", @@ -10248,6 +10379,14 @@ "requires": { "source-list-map": "^2.0.0", "source-map": "~0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "websocket-driver": { diff --git a/package.json b/package.json index 2e75334..7764e03 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "d3-simple-slider", - "version": "1.3.3", + "version": "1.4.0", "description": "Renders an SVG slider", "keywords": [ "d3", @@ -22,7 +22,7 @@ "url": "https://github.com/johnwalley/d3-simple-slider.git" }, "scripts": { - "pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-array:d3,d3-axis:d3,d3-dispatch:d3,d3-drag:d3,d3-ease:d3,d3-scale:d3,d3-selection:d3 -n d3 -o build/d3-simple-slider.js --extend -- index.js", + "pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-array:d3,d3-axis:d3,d3-dispatch:d3,d3-drag:d3,d3-ease:d3,d3-scale:d3,d3-selection:d3,d3-transition:d3 -n d3 -o build/d3-simple-slider.js --extend -- index.js", "test": "tape 'test/**/*-test.js' && eslint index.js src", "prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-simple-slider.js -c -m -o build/d3-simple-slider.min.js", "postpublish": "git push && git push --tags && zip -j build/d3-simple-slider.zip -- LICENSE README.md build/d3-simple-slider.js build/d3-simple-slider.min.js", @@ -60,6 +60,7 @@ "d3-drag": "^1.0.0", "d3-ease": "^1.0.0", "d3-scale": "^2.0.0", - "d3-selection": "^1.0.0" + "d3-selection": "^1.0.0", + "d3-transition": "^1.0.0" } } diff --git a/src/slider.js b/src/slider.js index 7735b14..52c04ba 100644 --- a/src/slider.js +++ b/src/slider.js @@ -5,6 +5,7 @@ import { drag } from 'd3-drag'; import { easeQuadOut } from 'd3-ease'; import { scaleLinear, scaleTime } from 'd3-scale'; import { event, select } from 'd3-selection'; +import 'd3-transition'; var UPDATE_DURATION = 200; var SLIDER_END_PADDING = 8; @@ -25,8 +26,8 @@ function translateY(y) { function slider(orientation, scale) { scale = typeof scale !== 'undefined' ? scale : null; - var value = 0; - var defaultValue = 0; + var value = [0]; + var defaultValue = [0]; var domain = [0, 10]; var width = 100; var height = 100; @@ -44,6 +45,7 @@ function slider(orientation, scale) { var selection = null; var identityClamped = null; + var handleIndex = null; var k = orientation === top || orientation === left ? -1 : 1; var x = orientation === left || orientation === right ? 'y' : 'x'; @@ -76,12 +78,27 @@ function slider(orientation, scale) { var fillSelection = null; var textSelection = null; + if (scale) { + domain = [min(scale.domain()), max(scale.domain())]; + + if (orientation === top || orientation === bottom) { + width = max(scale.range()) - min(scale.range()); + } else { + height = max(scale.range()) - min(scale.range()); + } + + scale = scale.clamp(true); + } + function slider(context) { selection = context.selection ? context.selection() : context; if (scale) { - domain = [min(scale.domain()), max(scale.domain())]; - scale = scale.clamp(true); + scale = scale.range([ + min(scale.range()), + min(scale.range()) + + (orientation === top || orientation === bottom ? width : height), + ]); } else { scale = domain[0] instanceof Date ? scaleTime() : scaleLinear(); @@ -100,10 +117,12 @@ function slider(orientation, scale) { .clamp(true); // Ensure value is valid - value = scaleLinear() - .range(domain) - .domain(domain) - .clamp(true)(value); + value = value.map(function(d) { + return scaleLinear() + .range(domain) + .domain(domain) + .clamp(true)(d); + }); tickFormat = tickFormat || scale.tickFormat(); displayFormat = displayFormat || tickFormat || scale.tickFormat(); @@ -155,7 +174,12 @@ function slider(orientation, scale) { sliderEnter .append('line') .attr('class', 'track-fill') - .attr(x + '1', scale.range()[0] - SLIDER_END_PADDING) + .attr( + x + '1', + value.length === 1 + ? scale.range()[0] - SLIDER_END_PADDING + : scale(value[0]) + ) .attr('stroke', fill) .attr('stroke-width', 4) .attr('stroke-linecap', 'round'); @@ -170,10 +194,15 @@ function slider(orientation, scale) { .attr('stroke-linecap', 'round') .merge(slider.select('.track-overlay')); - var handleEnter = sliderEnter + handleSelection = sliderEnter.selectAll('.parameter-value').data(value); + + var handleEnter = handleSelection + .enter() .append('g') .attr('class', 'parameter-value') - .attr('transform', transformAlong(scale(value))) + .attr('transform', function(d) { + return transformAlong(scale(d)); + }) .attr('font-family', 'sans-serif') .attr( 'text-anchor', @@ -191,7 +220,7 @@ function slider(orientation, scale) { .attr('fill', 'white') .attr('stroke', '#777'); - if (displayValue) { + if (displayValue && value.length === 1) { handleEnter .append('text') .attr('font-size', 10) // TODO: Remove coupling to font-size in d3-axis @@ -204,7 +233,7 @@ function slider(orientation, scale) { ? '.71em' : '.32em' ) - .text(tickFormat(value)); + .text(tickFormat(value[0])); } context @@ -216,7 +245,9 @@ function slider(orientation, scale) { .attr(x + '2', scale.range()[1] + SLIDER_END_PADDING); if (fill) { - context.select('.track-fill').attr(x + '2', scale(value)); + context + .select('.track-fill') + .attr(x + '2', value.length === 1 ? scale(value[0]) : scale(value[1])); } context @@ -257,9 +288,9 @@ function slider(orientation, scale) { context.selectAll('.axis line').attr('stroke', '#aaa'); - context - .select('.parameter-value') - .attr('transform', transformAlong(scale(value))); + context.selectAll('.parameter-value').attr('transform', function(d) { + return transformAlong(scale(d)); + }); fadeTickText(); @@ -270,10 +301,22 @@ function slider(orientation, scale) { orientation === bottom || orientation === top ? event.x : event.y ); - var newValue = alignedValue(scale.invert(pos)); + handleIndex = scan( + value.map(function(d) { + return Math.abs(d - alignedValue(scale.invert(pos))); + }) + ); + + var newValue = value.map(function(d, i) { + return i === handleIndex ? alignedValue(scale.invert(pos)) : d; + }); updateHandle(newValue); - listeners.call('start', slider, newValue); + listeners.call( + 'start', + slider, + newValue.length === 1 ? newValue[0] : newValue + ); updateValue(newValue, true); } @@ -281,36 +324,62 @@ function slider(orientation, scale) { var pos = identityClamped( orientation === bottom || orientation === top ? event.x : event.y ); - var newValue = alignedValue(scale.invert(pos)); + + var adjustedValue = alignedValue(scale.invert(pos)); + + var newValue = value.map(function(d, i) { + if (value.length === 2) { + return i === handleIndex + ? handleIndex === 0 + ? Math.min(adjustedValue, alignedValue(value[1])) + : Math.max(adjustedValue, alignedValue(value[0])) + : d; + } else { + return i === handleIndex ? adjustedValue : d; + } + }); updateHandle(newValue); - listeners.call('drag', slider, newValue); + listeners.call( + 'drag', + slider, + newValue.length === 1 ? newValue[0] : newValue + ); updateValue(newValue, true); } function dragended() { select(this).classed('active', false); + var pos = identityClamped( orientation === bottom || orientation === top ? event.x : event.y ); - var newValue = alignedValue(scale.invert(pos)); + + var newValue = value.map(function(d, i) { + return i === handleIndex ? alignedValue(scale.invert(pos)) : d; + }); updateHandle(newValue); - listeners.call('end', slider, newValue); + listeners.call( + 'end', + slider, + newValue.length === 1 ? newValue[0] : newValue + ); updateValue(newValue, true); + + handleIndex = null; } textSelection = selection.select('.parameter-value text'); - handleSelection = selection.select('.parameter-value'); fillSelection = selection.select('.track-fill'); } function fadeTickText() { - if (displayValue) { + if (displayValue && value.length === 1) { var distances = []; selection.selectAll('.axis .tick').each(function(d) { - distances.push(Math.abs(d - value)); + distances.push(Math.abs(d - value[0])); }); var index = scan(distances); @@ -351,7 +420,11 @@ function slider(orientation, scale) { value = newValue; if (notifyListener) { - listeners.call('onchange', slider, newValue); + listeners.call( + 'onchange', + slider, + newValue.length === 1 ? newValue[0] : newValue + ); } fadeTickText(); @@ -362,29 +435,57 @@ function slider(orientation, scale) { animate = typeof animate !== 'undefined' ? animate : false; if (animate) { - handleSelection + selection + .selectAll('.parameter-value') + .data(newValue) .transition() .ease(easeQuadOut) .duration(UPDATE_DURATION) - .attr('transform', transformAlong(scale(newValue))); + .attr('transform', function(d) { + return transformAlong(scale(d)); + }); if (fill) { fillSelection .transition() .ease(easeQuadOut) .duration(UPDATE_DURATION) - .attr(x + '1', scale(newValue)); + .attr( + x + '1', + value.length === 1 + ? scale.range()[0] - SLIDER_END_PADDING + : scale(newValue[0]) + ) + .attr( + x + '2', + value.length === 1 ? scale(newValue[0]) : scale(newValue[1]) + ); } } else { - handleSelection.attr('transform', transformAlong(scale(newValue))); + selection + .selectAll('.parameter-value') + .data(newValue) + .attr('transform', function(d) { + return transformAlong(scale(d)); + }); if (fill) { - fillSelection.attr(x + '2', scale(newValue)); + fillSelection + .attr( + x + '1', + value.length === 1 + ? scale.range()[0] - SLIDER_END_PADDING + : scale(newValue[0]) + ) + .attr( + x + '2', + value.length === 1 ? scale(newValue[0]) : scale(newValue[1]) + ); } } if (displayValue) { - textSelection.text(displayFormat(newValue)); + textSelection.text(displayFormat(newValue[0])); } } @@ -432,14 +533,23 @@ function slider(orientation, scale) { slider.ticks = function(_) { if (!arguments.length) return ticks; + ticks = _; return slider; }; slider.value = function(_) { - if (!arguments.length) return value; - var pos = identityClamped(scale(_)); - var newValue = alignedValue(scale.invert(pos)); + if (!arguments.length) { + if (value.length === 1) { + return value[0]; + } + + return value; + } + + var toArray = Array.isArray(_) ? _ : [_]; + var pos = toArray.map(scale).map(identityClamped); + var newValue = pos.map(scale.invert).map(alignedValue); updateHandle(newValue, true); updateValue(newValue, true); @@ -448,9 +558,17 @@ function slider(orientation, scale) { }; slider.silentValue = function(_) { - if (!arguments.length) return value; - var pos = identityClamped(scale(_)); - var newValue = alignedValue(scale.invert(pos)); + if (!arguments.length) { + if (value.length === 1) { + return value[0]; + } + + return value; + } + + var toArray = Array.isArray(_) ? _ : [_]; + var pos = toArray.map(scale).map(identityClamped); + var newValue = pos.map(scale.invert).map(alignedValue); updateHandle(newValue, false); updateValue(newValue, false); @@ -459,9 +577,18 @@ function slider(orientation, scale) { }; slider.default = function(_) { - if (!arguments.length) return defaultValue; - defaultValue = _; - value = _; + if (!arguments.length) { + if (defaultValue.length === 1) { + return defaultValue[0]; + } + + return defaultValue; + } + + var toArray = Array.isArray(_) ? _ : [_]; + + defaultValue = toArray; + value = toArray; return slider; }; diff --git a/stories/index.stories.js b/stories/index.stories.js index 2973367..1459a1b 100644 --- a/stories/index.stories.js +++ b/stories/index.stories.js @@ -1,6 +1,6 @@ -import { document, console } from 'global'; +import { document } from 'global'; import { storiesOf } from '@storybook/html'; -import { select } from 'd3-selection'; +import { event, select } from 'd3-selection'; import { format } from 'd3-format'; import { timeFormat } from 'd3-time-format'; import { min, max, range } from 'd3-array'; @@ -9,93 +9,57 @@ import { axisRight } from 'd3-axis'; import { symbol, symbolCircle, symbolSquare } from 'd3-shape'; import { sliderBottom, sliderLeft } from '../src/slider'; -storiesOf('Examples', module) - .add('showcase', () => { +storiesOf('Basic functionality', module) + .add('Simple', () => { const div = document.createElement('div'); - const width = 565; - const height = 120; - const margin = { top: 20, right: 50, bottom: 50, left: 40 }; + const data = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; - const data = range(1, 41).map(d => ({ - year: d, - value: 10000 * Math.exp(-(d - 1) / 40), - })); + const slider = sliderBottom() + .min(min(data)) + .max(max(data)) + .width(300) + .tickFormat(format('.2%')) + .ticks(5) + .default(0.015); - const svg = select(div) + const g = select(div) .append('svg') - .attr('width', width) - .attr('height', height); - - const padding = 0.1; - - const xBand = scaleBand() - .domain(data.map(d => d.year)) - .range([margin.left, width - margin.right]) - .padding(padding); + .attr('width', 500) + .attr('height', 100) + .append('g') + .attr('transform', 'translate(30,30)'); - const xLinear = scaleLinear() - .domain([min(data, d => d.year), max(data, d => d.year)]) - .range([ - margin.left + xBand.bandwidth() / 2 + xBand.step() * padding - 0.5, - width - - margin.right - - xBand.bandwidth() / 2 - - xBand.step() * padding - - 0.5, - ]); + g.call(slider); - const y = scaleLinear() - .domain([0, max(data, d => d.value)]) - .nice() - .range([height - margin.bottom, margin.top]); + return div; + }) + .add('Step', () => { + const div = document.createElement('div'); - const yAxis = g => - g - .attr('transform', `translate(${width - margin.right},0)`) - .call( - axisRight(y) - .tickValues([1e4]) - .tickFormat(format('($.2s')) - ) - .call(g => g.select('.domain').remove()); + const data = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; - const slider = g => - g.attr('transform', `translate(0,${height - margin.bottom})`).call( - sliderBottom(xLinear) - .step(1) - .ticks(4) - .default(9) - .on('onchange', value => draw(value)) - ); + const slider = sliderBottom() + .min(min(data)) + .max(max(data)) + .width(300) + .step(0.005) + .tickFormat(format('.2%')) + .ticks(5) + .default(0.015); - const bars = svg + const g = select(div) + .append('svg') + .attr('width', 500) + .attr('height', 100) .append('g') - .selectAll('rect') - .data(data); - - const barsEnter = bars - .enter() - .append('rect') - .attr('x', d => xBand(d.year)) - .attr('y', d => y(d.value)) - .attr('height', d => y(0) - y(d.value)) - .attr('width', xBand.bandwidth()); - - svg.append('g').call(yAxis); - svg.append('g').call(slider); - - const draw = selected => { - barsEnter - .merge(bars) - .attr('fill', d => (d.year === selected ? '#bad80a' : '#e0e0e0')); - }; + .attr('transform', 'translate(30,30)'); - draw(9); + g.call(slider); return div; }) - .add('time', () => { + .add('Time', () => { const div = document.createElement('div'); const data = range(0, 10).map(function(d) { @@ -109,7 +73,7 @@ storiesOf('Examples', module) .width(300) .tickFormat(timeFormat('%Y')) .tickValues(data) - .default(0.015); + .default(new Date(1998, 10, 3)); const g = select(div) .append('svg') @@ -122,20 +86,18 @@ storiesOf('Examples', module) return div; }) - .add('fill', () => { + .add('Fill', () => { const div = document.createElement('div'); - const data = range(0, 10).map(function(d) { - return new Date(1995 + d, 10, 3); - }); + const data = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; const slider = sliderBottom() .min(min(data)) .max(max(data)) - .step(1000 * 60 * 60 * 24 * 365) .width(300) - .tickFormat(timeFormat('%Y')) - .tickValues(data) + .displayValue(false) + .tickFormat(format('.2%')) + .ticks(5) .default(0.015) .fill('#2196f3'); @@ -148,11 +110,78 @@ storiesOf('Examples', module) g.call(slider); + return div; + }) + .add('Range', () => { + const div = document.createElement('div'); + + const data = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; + const defaultValue = [0.015, 0.02]; + + const p = select(div) + .append('p') + .attr('id', 'value') + .text(defaultValue.map(format('.2%')).join('-')); + + const slider = sliderBottom() + .min(min(data)) + .max(max(data)) + .width(300) + .tickFormat(format('.2%')) + .ticks(5) + .default(defaultValue) + .fill('skyblue') + .displayValue(true) + .on('onchange', val => { + p.text(val.map(format('.2%')).join('-')); + }); + + const g = select(div) + .append('svg') + .attr('width', 500) + .attr('height', 100) + .append('g') + .attr('transform', 'translate(30,30)'); + + g.call(slider); + + const button = select(div) + .append('button') + .text('Reset') + .on('click', () => { + slider.value(defaultValue); + event.preventDefault(); + }); + + return div; + }) + .add('Vertical', () => { + const div = document.createElement('div'); + + const data1 = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; + + const slider = sliderLeft() + .min(min(data1)) + .max(max(data1)) + .height(300) + .tickFormat(format('.2%')) + .ticks(5) + .default(0.015); + + const g = select(div) + .append('svg') + .attr('width', 100) + .attr('height', 400) + .append('g') + .attr('transform', 'translate(60,30)'); + + g.call(slider); + return div; }); -storiesOf('Alternative handles', module) - .add('circle', () => { +storiesOf('Extended functionality', module) + .add('Alternative handle', () => { const div = document.createElement('div'); const data1 = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; @@ -181,23 +210,19 @@ storiesOf('Alternative handles', module) return div; }) - .add('square', () => { + .add('Transition', () => { const div = document.createElement('div'); - const data1 = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; + const data = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; const slider = sliderBottom() - .min(min(data1)) - .max(max(data1)) + .min(min(data)) + .max(max(data)) .width(300) .tickFormat(format('.2%')) .ticks(5) .default(0.015) - .handle( - symbol() - .type(symbolSquare) - .size(200)() - ); + .fill('#2196f3'); const g = select(div) .append('svg') @@ -208,55 +233,154 @@ storiesOf('Alternative handles', module) g.call(slider); + setInterval(() => { + slider.width(Math.random() * 100 + 200); + g.transition() + .duration(200) + .call(slider); + }, 1000); + return div; }); -storiesOf('Orientation/sliderBottom', module).add('simple', () => { - const div = document.createElement('div'); +storiesOf('Examples', module) + .add('New York Times', () => { + const div = document.createElement('div'); - const data1 = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; + const width = 565; + const height = 120; + const margin = { top: 20, right: 50, bottom: 50, left: 40 }; - const slider = sliderBottom() - .min(min(data1)) - .max(max(data1)) - .width(300) - .tickFormat(format('.2%')) - .ticks(5) - .default(0.015); + const data = range(1, 41).map(d => ({ + year: d, + value: 10000 * Math.exp(-(d - 1) / 40), + })); - const g = select(div) - .append('svg') - .attr('width', 500) - .attr('height', 100) - .append('g') - .attr('transform', 'translate(30,30)'); + const svg = select(div) + .append('svg') + .attr('width', width) + .attr('height', height); - g.call(slider); + const padding = 0.1; - return div; -}); + const xBand = scaleBand() + .domain(data.map(d => d.year)) + .range([margin.left, width - margin.right]) + .padding(padding); -storiesOf('Orientation/sliderLeft', module).add('simple', () => { - const div = document.createElement('div'); + const xLinear = scaleLinear() + .domain([min(data, d => d.year), max(data, d => d.year)]) + .range([ + margin.left + xBand.bandwidth() / 2 + xBand.step() * padding - 0.5, + width - + margin.right - + xBand.bandwidth() / 2 - + xBand.step() * padding - + 0.5, + ]); - const data1 = [0, 0.005, 0.01, 0.015, 0.02, 0.025]; + const y = scaleLinear() + .domain([0, max(data, d => d.value)]) + .nice() + .range([height - margin.bottom, margin.top]); + + const yAxis = g => + g + .attr('transform', `translate(${width - margin.right},0)`) + .call( + axisRight(y) + .tickValues([1e4]) + .tickFormat(format('($.2s')) + ) + .call(g => g.select('.domain').remove()); + + const slider = g => + g.attr('transform', `translate(0,${height - margin.bottom})`).call( + sliderBottom(xLinear) + .step(1) + .ticks(4) + .default(9) + .on('onchange', value => draw(value)) + ); + + const bars = svg + .append('g') + .selectAll('rect') + .data(data); + + const barsEnter = bars + .enter() + .append('rect') + .attr('x', d => xBand(d.year)) + .attr('y', d => y(d.value)) + .attr('height', d => y(0) - y(d.value)) + .attr('width', xBand.bandwidth()); - const slider = sliderLeft() - .min(min(data1)) - .max(max(data1)) - .height(300) - .tickFormat(format('.2%')) - .ticks(5) - .default(0.015); + svg.append('g').call(yAxis); + svg.append('g').call(slider); - const g = select(div) - .append('svg') - .attr('width', 100) - .attr('height', 500) - .append('g') - .attr('transform', 'translate(60,30)'); + const draw = selected => { + barsEnter + .merge(bars) + .attr('fill', d => (d.year === selected ? '#bad80a' : '#e0e0e0')); + }; - g.call(slider); + draw(9); - return div; -}); + return div; + }) + .add('Color picker', () => { + const num2hex = rgb => { + return rgb + .map(color => { + let str = color.toString(16); + + if (str.length === 1) { + str = '0' + str; + } + + return str; + }) + .join(''); + }; + + let rgb = [100, 0, 0]; + const colors = ['red', 'green', 'blue']; + + const div = document.createElement('div'); + + const g = select(div) + .append('svg') + .attr('width', 600) + .attr('height', 400) + .append('g') + .attr('transform', 'translate(30,30)'); + + const box = g + .append('rect') + .attr('width', 100) + .attr('height', 100) + .attr('transform', 'translate(400,0)') + .attr('fill', `#${num2hex(rgb)}`); + + rgb.forEach((color, i) => { + const slider = sliderBottom() + .min(0) + .max(255) + .step(1) + .width(300) + .default(rgb[i]) + .displayValue(false) + .fill(colors[i]) + .on('onchange', num => { + rgb[i] = num; + box.attr('fill', `#${num2hex(rgb)}`); + }); + + g.append('g') + .attr('transform', `translate(30,${60 * i})`) + .call(slider); + }); + + return div; + });