diff --git a/package-lock.json b/package-lock.json index 080c9eb..e809eaf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3892,25 +3892,29 @@ "dependencies": { "abbrev": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", "dev": true, "optional": true }, "ansi-regex": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", "dev": true, "optional": true }, "aproba": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==", "dev": true, "optional": true }, "are-we-there-yet": { "version": "1.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", "dev": true, "optional": true, "requires": { @@ -3920,13 +3924,15 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true, "optional": true }, "brace-expansion": { "version": "1.1.11", - "bundled": true, + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, "optional": true, "requires": { @@ -3936,37 +3942,43 @@ }, "chownr": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz", + "integrity": "sha512-j38EvO5+LHX84jlo6h4UzmOwi0UgW61WRyPtJz4qaadK5eY3BTS5TY/S1Stc3Uk2lIM6TPevAlULiEJwie860g==", "dev": true, "optional": true }, "code-point-at": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", "dev": true, "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true, "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=", "dev": true, "optional": true }, "core-util-is": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", "dev": true, "optional": true }, "debug": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "optional": true, "requires": { @@ -3975,25 +3987,29 @@ }, "deep-extend": { "version": "0.6.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", "dev": true, "optional": true }, "delegates": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", "dev": true, "optional": true }, "detect-libc": { "version": "1.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=", "dev": true, "optional": true }, "fs-minipass": { "version": "1.2.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.5.tgz", + "integrity": "sha512-JhBl0skXjUPCFH7x6x61gQxrKyXsxB5gcgePLZCwfyCGGsTISMoIeObbrvVeP6Xmyaudw4TT43qV2Gz+iyd2oQ==", "dev": true, "optional": true, "requires": { @@ -4002,13 +4018,15 @@ }, "fs.realpath": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true, "optional": true }, "gauge": { "version": "2.7.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", "dev": true, "optional": true, "requires": { @@ -4024,7 +4042,8 @@ }, "glob": { "version": "7.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", "dev": true, "optional": true, "requires": { @@ -4038,13 +4057,15 @@ }, "has-unicode": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=", "dev": true, "optional": true }, "iconv-lite": { "version": "0.4.24", - "bundled": true, + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "optional": true, "requires": { @@ -4053,7 +4074,8 @@ }, "ignore-walk": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", "dev": true, "optional": true, "requires": { @@ -4062,7 +4084,8 @@ }, "inflight": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "dev": true, "optional": true, "requires": { @@ -4072,19 +4095,22 @@ }, "inherits": { "version": "2.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", "dev": true, "optional": true }, "ini": { "version": "1.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", "dev": true, "optional": true }, "is-fullwidth-code-point": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", "dev": true, "optional": true, "requires": { @@ -4093,13 +4119,15 @@ }, "isarray": { "version": "1.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", "dev": true, "optional": true }, "minimatch": { "version": "3.0.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, "optional": true, "requires": { @@ -4108,13 +4136,15 @@ }, "minimist": { "version": "0.0.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true, "optional": true }, "minipass": { "version": "2.3.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.3.5.tgz", + "integrity": "sha512-Gi1W4k059gyRbyVUZQ4mEqLm0YIUiGYfvxhF6SIlk3ui1WVxMTGfGdQ2SInh3PDrRTVvPKgULkpJtT4RH10+VA==", "dev": true, "optional": true, "requires": { @@ -4124,7 +4154,8 @@ }, "minizlib": { "version": "1.2.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.2.1.tgz", + "integrity": "sha512-7+4oTUOWKg7AuL3vloEWekXY2/D20cevzsrNT2kGWm+39J9hGTCBv8VI5Pm5lXZ/o3/mdR4f8rflAPhnQb8mPA==", "dev": true, "optional": true, "requires": { @@ -4133,7 +4164,8 @@ }, "mkdirp": { "version": "0.5.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "optional": true, "requires": { @@ -4142,13 +4174,15 @@ }, "ms": { "version": "2.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", "dev": true, "optional": true }, "needle": { "version": "2.3.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/needle/-/needle-2.3.0.tgz", + "integrity": "sha512-QBZu7aAFR0522EyaXZM0FZ9GLpq6lvQ3uq8gteiDUp7wKdy0lSd2hPlgFwVuW1CBkfEs9PfDQsQzZghLs/psdg==", "dev": true, "optional": true, "requires": { @@ -4159,7 +4193,8 @@ }, "node-pre-gyp": { "version": "0.12.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz", + "integrity": "sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A==", "dev": true, "optional": true, "requires": { @@ -4177,7 +4212,8 @@ }, "nopt": { "version": "4.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz", + "integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "dev": true, "optional": true, "requires": { @@ -4187,13 +4223,15 @@ }, "npm-bundled": { "version": "1.0.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz", + "integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g==", "dev": true, "optional": true }, "npm-packlist": { "version": "1.4.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.1.tgz", + "integrity": "sha512-+TcdO7HJJ8peiiYhvPxsEDhF3PJFGUGRcFsGve3vxvxdcpO2Z4Z7rkosRM0kWj6LfbK/P0gu3dzk5RU1ffvFcw==", "dev": true, "optional": true, "requires": { @@ -4203,7 +4241,8 @@ }, "npmlog": { "version": "4.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", "dev": true, "optional": true, "requires": { @@ -4215,19 +4254,22 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", "dev": true, "optional": true }, "object-assign": { "version": "4.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true, "optional": true }, "once": { "version": "1.4.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, "optional": true, "requires": { @@ -4236,19 +4278,22 @@ }, "os-homedir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", "dev": true, "optional": true }, "os-tmpdir": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", "dev": true, "optional": true }, "osenv": { "version": "0.1.5", - "bundled": true, + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", "dev": true, "optional": true, "requires": { @@ -4258,19 +4303,22 @@ }, "path-is-absolute": { "version": "1.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true, "optional": true }, "process-nextick-args": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==", "dev": true, "optional": true }, "rc": { "version": "1.2.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", "dev": true, "optional": true, "requires": { @@ -4282,7 +4330,8 @@ "dependencies": { "minimist": { "version": "1.2.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true, "optional": true } @@ -4290,7 +4339,8 @@ }, "readable-stream": { "version": "2.3.6", - "bundled": true, + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "dev": true, "optional": true, "requires": { @@ -4305,7 +4355,8 @@ }, "rimraf": { "version": "2.6.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", "dev": true, "optional": true, "requires": { @@ -4314,43 +4365,50 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true, "optional": true }, "safer-buffer": { "version": "2.1.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", "dev": true, "optional": true }, "sax": { "version": "1.2.4", - "bundled": true, + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", "dev": true, "optional": true }, "semver": { "version": "5.7.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", "dev": true, "optional": true }, "set-blocking": { "version": "2.0.0", - "bundled": true, + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", "dev": true, "optional": true }, "signal-exit": { "version": "3.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.2.tgz", + "integrity": "sha1-tf3AjxKH6hF4Yo5BXiUTK3NkbG0=", "dev": true, "optional": true }, "string-width": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", "dev": true, "optional": true, "requires": { @@ -4361,7 +4419,8 @@ }, "string_decoder": { "version": "1.1.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "optional": true, "requires": { @@ -4370,7 +4429,8 @@ }, "strip-ansi": { "version": "3.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", "dev": true, "optional": true, "requires": { @@ -4379,13 +4439,15 @@ }, "strip-json-comments": { "version": "2.0.1", - "bundled": true, + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true, "optional": true }, "tar": { "version": "4.4.8", - "bundled": true, + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.8.tgz", + "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "dev": true, "optional": true, "requires": { @@ -4400,13 +4462,15 @@ }, "util-deprecate": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "dev": true, "optional": true }, "wide-align": { "version": "1.1.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, "optional": true, "requires": { @@ -4415,13 +4479,15 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true, + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true, "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true, + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz", + "integrity": "sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==", "dev": true, "optional": true } diff --git a/projects/ngx-plug-n-play-lib/package.json b/projects/ngx-plug-n-play-lib/package.json index cb9acb2..010abde 100644 --- a/projects/ngx-plug-n-play-lib/package.json +++ b/projects/ngx-plug-n-play-lib/package.json @@ -3,7 +3,8 @@ "version": "1.1.1", "peerDependencies": { "@angular/common": ">7.2.0", - "@angular/core": ">7.2.0" + "@angular/core": ">7.2.0", + "@angular/animations": ">7.2.0" }, "author": { "email": "preston.j.lamb@gmail.com", diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/README.md b/projects/ngx-plug-n-play-lib/src/lib/accordion/README.md new file mode 100644 index 0000000..9c54a3d --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/README.md @@ -0,0 +1,28 @@ +# Accordion Module + +The `AccordionModule` contains one component, the `AccordionComponent`. It uses content projection to provide a trigger to open and close the accordion, and the body of the accordion. The parent component, the one implementing the accordion, thus determines all the styles for the component. + +Here's an example of use: + +```html + + +

Trigger

+
+
+

+ Lorem, ipsum dolor +

+
+
+``` + +When the `.accordion-trigger` is clicked, an Angular animation is triggered to either scroll up or scroll down to show the `.accordion-body`. + +The `AccordionComponent` has one `Input`: + +- `triggerSelector: string` — This is the CSS class selector for the accordion trigger. It defaults to `.accordion-trigger`. If no projected content element has the same class, then a class inside the `AccordionComponent` is used as the trigger, `.accordion-header-container`. + +The component has one `Output`: + +- `isCollapsedUpdated: EventEmitter`: — The `Output` emits true or false, letting the parent component know if the accordion is open or not. That way the parent component can change its display in some way depending on the status. It doesn't need to change the visibility of the `[accordion-body]`, but maybe an icon or something like that. diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion.module.ts b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion.module.ts new file mode 100644 index 0000000..8bc2458 --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion.module.ts @@ -0,0 +1,10 @@ +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { AccordionComponent } from './accordion/accordion.component'; + +@NgModule({ + declarations: [AccordionComponent], + exports: [AccordionComponent], + imports: [CommonModule], +}) +export class AccordionModule {} diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.css b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.css new file mode 100644 index 0000000..6b6cf6d --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.css @@ -0,0 +1,3 @@ +.accordion-body-container { + overflow: hidden; +} diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.html b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.html new file mode 100644 index 0000000..2533e3b --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.html @@ -0,0 +1,6 @@ +
+ +
+
+ +
diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.spec.ts b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.spec.ts new file mode 100644 index 0000000..984633f --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.spec.ts @@ -0,0 +1,68 @@ +import { AccordionComponent } from './accordion.component'; +import { Component, ViewChild } from '@angular/core'; +import { ComponentFixture, TestBed, async, fakeAsync, tick } from '@angular/core/testing'; +import { By } from '@angular/platform-browser'; +import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; + +@Component({ + selector: 'app-test-host', + template: ` + + +

Trigger Accordion

+
+
+

+ Lorem, ipsum dolor sit. +

+
+
+ `, +}) +class TestHostComponent { + @ViewChild(AccordionComponent) accordion: AccordionComponent; +} + +describe('AccordionComponent', () => { + let testHostComponent: TestHostComponent; + let component: AccordionComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + imports: [BrowserAnimationsModule], + declarations: [TestHostComponent, AccordionComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(TestHostComponent); + testHostComponent = fixture.componentInstance; + component = testHostComponent.accordion; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); + + it('should have the .accordion-trigger element as the trigger', () => { + const classList: DOMTokenList = component.trigger.classList; + + expect(classList.contains('accordion-trigger')).toBeTruthy(); + }); + + it('should call the function that will emit the new accordion value', () => { + spyOn(component, 'updateCollapsedStatus'); + component.toggleAccordionVisibility(); + + expect(component.updateCollapsedStatus).toHaveBeenCalled(); + }); + + it('should emit the new accordion value', () => { + spyOn(component.isCollapsedUpdated, 'emit'); + component.updateCollapsedStatus(); + + expect(component.isCollapsedUpdated.emit).toHaveBeenCalled(); + }); +}); diff --git a/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.ts b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.ts new file mode 100644 index 0000000..07be811 --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/accordion/accordion/accordion.component.ts @@ -0,0 +1,48 @@ +import { Component, OnInit, Output, EventEmitter, Input, ElementRef } from '@angular/core'; +import { trigger } from '@angular/animations'; +import { collapseAnimation } from '../../shared/animations/collapse-animation'; +import { fromEvent, Subject } from 'rxjs'; +import { takeUntil } from 'rxjs/operators'; + +@Component({ + selector: 'pnp-accordion', + templateUrl: './accordion.component.html', + styleUrls: ['./accordion.component.css'], + animations: [trigger('collapse', collapseAnimation())], +}) +export class AccordionComponent implements OnInit { + @Output() isCollapsedUpdated: EventEmitter = new EventEmitter(); + @Input() triggerSelector: string = '.accordion-trigger'; + public isCollapsed: boolean = true; + public trigger; + private destroy$: Subject = new Subject(); + + constructor(private _elRef: ElementRef) {} + + ngOnInit() { + this.updateCollapsedStatus(); + this.trigger = this._elRef.nativeElement.querySelector(this.triggerSelector) + ? this._elRef.nativeElement.querySelector(this.triggerSelector) + : this._elRef.nativeElement.querySelector('.accordion-header-container'); + + fromEvent(this.trigger, 'click') + .pipe(takeUntil(this.destroy$)) + .subscribe(() => { + this.toggleAccordionVisibility(); + }); + } + + ngOnDestroy() { + this.destroy$.next(true); + this.destroy$.complete(); + } + + updateCollapsedStatus() { + this.isCollapsedUpdated.emit(this.isCollapsed); + } + + toggleAccordionVisibility() { + this.isCollapsed = !this.isCollapsed; + this.updateCollapsedStatus(); + } +} diff --git a/projects/ngx-plug-n-play-lib/src/lib/shared/animations/collapse-animation.ts b/projects/ngx-plug-n-play-lib/src/lib/shared/animations/collapse-animation.ts new file mode 100644 index 0000000..f56de9f --- /dev/null +++ b/projects/ngx-plug-n-play-lib/src/lib/shared/animations/collapse-animation.ts @@ -0,0 +1,28 @@ +import { state, style, animate, transition } from '@angular/animations'; + +export function collapseAnimation( + slideDownDuration: string = '500ms', + slideUpDuration: string = '500ms', + startingOpacity: string = '1', + endingOpacity: string = '1', +) { + return [ + state( + 'collapsed', + style({ + height: '0', + overflow: 'hidden', + opacity: startingOpacity, + }), + ), + state( + 'open', + style({ + overflow: 'hidden', + opacity: endingOpacity, + }), + ), + transition('collapsed=>open', animate(slideDownDuration)), + transition('open=>collapsed', animate(slideUpDuration)), + ]; +} diff --git a/projects/ngx-plug-n-play-lib/src/public-api.ts b/projects/ngx-plug-n-play-lib/src/public-api.ts index 8d72bf9..d74505f 100644 --- a/projects/ngx-plug-n-play-lib/src/public-api.ts +++ b/projects/ngx-plug-n-play-lib/src/public-api.ts @@ -7,6 +7,7 @@ export * from './lib/typeahead/typeahead.module'; export * from './lib/alert-toaster/alert-toaster.service'; export * from './lib/alert-toaster/alert-toaster.module'; +export * from './lib/accordion/accordion.module'; export * from './lib/dropdown/dropdown.module'; export * from './lib/dropdown/dropdown.util'; export * from './lib/dropdown/dropdown-selected-item.interface'; diff --git a/src/app/accordion-demo/accordion-demo.component.html b/src/app/accordion-demo/accordion-demo.component.html new file mode 100644 index 0000000..9ab1511 --- /dev/null +++ b/src/app/accordion-demo/accordion-demo.component.html @@ -0,0 +1,41 @@ +

Accordion Component Demo

+ + + + +
+

Here is the content of the accordion dropdown.

+
+
+ +

+ The AccordionModule contains one component, the AccordionComponent. It uses content + projection to provide a trigger to open and close the accordion, and the body of the accordion. The parent + component, the one implementing the accordion, thus determines all the styles for the component. +

+ +

+ When the .accordion-trigger is clicked, an Angular animation is triggered to either scroll up or scroll + down to show the .accordion-body. +

+ +

The AccordionComponent has one Input:

+ +
    +
  • + triggerSelector: string — This is the CSS class selector for the accordion trigger. It + defaults to .accordion-trigger. If no projected content element has the same class, then a class + inside the AccordionComponent is used as the trigger, .accordion-header-container. +
  • +
+ +

The component has one Output:

+ +
    +
  • + isCollapsedUpdated: EventEmitter<boolean>: — The Output emits true or + false, letting the parent component know if the accordion is open or not. That way the parent component can + change its display in some way depending on the status. It doesn't need to change the visibility of the + [accordion-body], but maybe an icon or something like that. +
  • +
diff --git a/src/app/accordion-demo/accordion-demo.component.scss b/src/app/accordion-demo/accordion-demo.component.scss new file mode 100644 index 0000000..e69de29 diff --git a/src/app/accordion-demo/accordion-demo.component.spec.ts b/src/app/accordion-demo/accordion-demo.component.spec.ts new file mode 100644 index 0000000..1c2f4fc --- /dev/null +++ b/src/app/accordion-demo/accordion-demo.component.spec.ts @@ -0,0 +1,24 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AccordionDemoComponent } from './accordion-demo.component'; + +describe('AccordionDemoComponent', () => { + let component: AccordionDemoComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [AccordionDemoComponent], + }).compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AccordionDemoComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/accordion-demo/accordion-demo.component.ts b/src/app/accordion-demo/accordion-demo.component.ts new file mode 100644 index 0000000..18da15b --- /dev/null +++ b/src/app/accordion-demo/accordion-demo.component.ts @@ -0,0 +1,12 @@ +import { Component, OnInit } from '@angular/core'; + +@Component({ + selector: 'pnp-accordion-demo', + templateUrl: './accordion-demo.component.html', + styleUrls: ['./accordion-demo.component.scss'], +}) +export class AccordionDemoComponent implements OnInit { + constructor() {} + + ngOnInit() {} +} diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 870a691..cf72bed 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -3,12 +3,14 @@ import { RouterModule, Routes } from '@angular/router'; import { AlertsToasterDemoComponent } from './alerts-toaster-demo/alerts-toaster-demo.component'; import { HomeComponent } from './home/home.component'; import { TypeaheadDemoComponent } from './typeahead-demo/typeahead-demo.component'; +import { AccordionDemoComponent } from './accordion-demo/accordion-demo.component'; import { DropdownDemoComponent } from './dropdown-demo/dropdown-demo.component'; const routes: Routes = [ { path: '', component: HomeComponent }, { path: 'typeahead-demo', component: TypeaheadDemoComponent }, { path: 'alerts-toaster-demo', component: AlertsToasterDemoComponent }, + { path: 'accordion-demo', component: AccordionDemoComponent }, { path: 'dropdown-demo', component: DropdownDemoComponent }, { path: '**', redirectTo: '', pathMatch: 'full' }, ]; diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 89feaa1..44bfe50 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,7 +1,12 @@ import { NgModule } from '@angular/core'; import { FormsModule } from '@angular/forms'; import { BrowserModule } from '@angular/platform-browser'; -import { AlertToasterModule, TypeaheadModule, DropdownModule } from '../../projects/ngx-plug-n-play-lib/src/public-api'; +import { + AlertToasterModule, + TypeaheadModule, + DropdownModule, + AccordionModule, +} from '../../projects/ngx-plug-n-play-lib/src/public-api'; import { AlertsToasterDemoComponent } from './alerts-toaster-demo/alerts-toaster-demo.component'; import { AppRoutingModule } from './app-routing.module'; import { AppComponent } from './app.component'; @@ -9,9 +14,18 @@ import { HomeComponent } from './home/home.component'; import { MainNavComponent } from './main-nav/main-nav.component'; import { TypeaheadDemoComponent } from './typeahead-demo/typeahead-demo.component'; import { DropdownDemoComponent } from './dropdown-demo/dropdown-demo.component'; +import { AccordionDemoComponent } from './accordion-demo/accordion-demo.component'; @NgModule({ - imports: [BrowserModule, FormsModule, AppRoutingModule, TypeaheadModule, AlertToasterModule, DropdownModule], + imports: [ + BrowserModule, + FormsModule, + AppRoutingModule, + TypeaheadModule, + AlertToasterModule, + DropdownModule, + AccordionModule, + ], declarations: [ AppComponent, MainNavComponent, @@ -19,6 +33,7 @@ import { DropdownDemoComponent } from './dropdown-demo/dropdown-demo.component'; TypeaheadDemoComponent, AlertsToasterDemoComponent, DropdownDemoComponent, + AccordionDemoComponent, ], bootstrap: [AppComponent], }) diff --git a/src/app/main-nav/main-nav.component.html b/src/app/main-nav/main-nav.component.html index 3fa7fce..db07786 100644 --- a/src/app/main-nav/main-nav.component.html +++ b/src/app/main-nav/main-nav.component.html @@ -26,6 +26,9 @@ +