diff --git a/jshintrc-tests b/jshintrc-tests index 12a5a991f..034cd3d89 100644 --- a/jshintrc-tests +++ b/jshintrc-tests @@ -1,4 +1,5 @@ { + "asi": true, "browser": true, "devel": true, "eqeqeq": true, @@ -38,6 +39,6 @@ "globals": { "esversion": 6 } - + } diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index de5e397ab..f016af4f9 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -1147,7 +1147,7 @@ } }, "anythingslider": { - "version": "git+https://github.com/fulv/AnythingSlider.git#cc9eae2d66d34e26fa7e49f09d2e852a53dadc99", + "version": "git+https://github.com/fulv/AnythingSlider.git#141a86757d06299cc047c77bb57a17609a9e9bc0", "from": "git+https://github.com/fulv/AnythingSlider.git", "requires": { "jquery": ">=1.4.2" @@ -1305,12 +1305,6 @@ "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=" }, - "ast-types": { - "version": "0.9.6", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.9.6.tgz", - "integrity": "sha1-ECyenpAF0+fjgpvwxPok7oYu6bk=", - "dev": true - }, "astral-regex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", @@ -1508,12 +1502,6 @@ } } }, - "base62": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/base62/-/base62-1.2.8.tgz", - "integrity": "sha512-V6YHUbjLxN1ymqNLb1DPHoU1CpfdL7d2YTIp5W3U4hhoG4hhxNmsFDs66M9EXxBiSEke5Bt5dwdfMwwZF70iLA==", - "dev": true - }, "base64-arraybuffer": { "version": "0.1.5", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", @@ -1607,9 +1595,9 @@ "integrity": "sha512-DYWGk01lDcxeS/K9IHPGWfT8PsJmbXRtRd2Sx72Tnb8pcYZQFF1oSDb8hJtS1vhp212q1Rzi5dUf9+nq0o9UIg==" }, "binaryextensions": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.1.tgz", - "integrity": "sha512-XBaoWE9RW8pPdPQNibZsW2zh8TW6gcarXp1FZPwT8Uop8ScSNldJEWf2k9l3HeTqdrEwsOsFcq74RiJECW34yA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/binaryextensions/-/binaryextensions-2.1.2.tgz", + "integrity": "sha512-xVNN69YGDghOqCCtA6FI7avYrr02mTJjOgB0/f1VPD3pJC8QEvjTKWc4epDx8AqxxA75NI0QpVM2gPJXUbE4Tg==", "dev": true }, "bl": { @@ -1941,7 +1929,8 @@ "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=" + "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", + "dev": true }, "builtin-status-codes": { "version": "3.0.0", @@ -2243,8 +2232,8 @@ "integrity": "sha512-z8H8/diyk76B7q5wg+Ud0+CqzcAF3mBBI/bA5ne5zrRUUIvNkJY//D3BqyH571KuAC4Nr7Rw7CjWX4r0y9DvNg==", "optional": true, "requires": { - "nan": "^2.9.2", - "node-pre-gyp": "^0.10.0" + "nan": "2.11.0", + "node-pre-gyp": "0.10.0" }, "dependencies": { "abbrev": { @@ -2735,13 +2724,13 @@ "integrity": "sha512-LzHF64s5chPQQS0IYBn9IN5h3i98c12bo4NCO7e0sGM2llXQ3p2FGC5sdENN4cTW48O915Sh+x+EXx7XW96xYQ==", "optional": true, "requires": { - "chownr": "^1.1.1", - "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", - "mkdirp": "^0.5.0", - "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "chownr": "1.1.1", + "fs-minipass": "1.2.5", + "minipass": "2.3.5", + "minizlib": "1.2.1", + "mkdirp": "0.5.1", + "safe-buffer": "5.1.2", + "yallist": "3.0.3" } }, "yallist": { @@ -2874,6 +2863,7 @@ "version": "3.2.0", "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, "requires": { "string-width": "^1.0.1", "strip-ansi": "^3.0.1", @@ -2918,9 +2908,9 @@ "dev": true }, "cloneable-readable": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.2.tgz", - "integrity": "sha512-Bq6+4t+lbM8vhTs/Bef5c5AdEMtapp/iFb6+s4/Hh9MVTt8OLKH7ZOOZSCT+Ys7hsHvqv0GuMPJ1lnQJVHvxpg==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", "dev": true, "requires": { "inherits": "^2.0.1", @@ -2986,38 +2976,6 @@ "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=" }, - "commoner": { - "version": "0.10.8", - "resolved": "https://registry.npmjs.org/commoner/-/commoner-0.10.8.tgz", - "integrity": "sha1-NPw2cs0kOT6LtH5wyqApOBH08sU=", - "dev": true, - "requires": { - "commander": "^2.5.0", - "detective": "^4.3.1", - "glob": "^5.0.15", - "graceful-fs": "^4.1.2", - "iconv-lite": "^0.4.5", - "mkdirp": "^0.5.0", - "private": "^0.1.6", - "q": "^1.1.2", - "recast": "^0.11.17" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, "component-bind": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/component-bind/-/component-bind-1.0.0.tgz", @@ -3338,6 +3296,72 @@ "integrity": "sha1-ojD2T1aDEOFJgAmUB5DsmVRbyn4=", "dev": true }, + "css-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-3.0.0.tgz", + "integrity": "sha512-WR6KZuCkFbnMhRrGPlkwAA7SSCtwqPwpyXJAPhotYkYsc0mKU9n/fu5wufy4jl2WhBw9Ia8gUQMIp/1w98DuPw==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "cssesc": "^3.0.0", + "icss-utils": "^4.1.1", + "loader-utils": "^1.2.3", + "normalize-path": "^3.0.0", + "postcss": "^7.0.17", + "postcss-modules-extract-imports": "^2.0.0", + "postcss-modules-local-by-default": "^3.0.2", + "postcss-modules-scope": "^2.1.0", + "postcss-modules-values": "^3.0.0", + "postcss-value-parser": "^4.0.0", + "schema-utils": "^1.0.0" + }, + "dependencies": { + "big.js": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", + "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", + "dev": true + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "json5": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", + "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^2.0.0", + "json5": "^1.0.1" + } + }, + "minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", + "dev": true + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + } + } + }, "css-select": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz", @@ -3356,6 +3380,12 @@ "integrity": "sha512-wan8dMWQ0GUeF7DGEPVjhHemVW/vy6xUYmFzRY8RYqgA0JtXC9rJmbScBjqSu6dg9q0lwPQy6ZAmJVr3PPTvqQ==", "dev": true }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, "currently-unhandled": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", @@ -3384,9 +3414,9 @@ "dev": true }, "dargs": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.0.0.tgz", - "integrity": "sha512-6lJauzNaI7MiM8EHQWmGj+s3rP5/i1nYs8GAvKrLAx/9dpc9xS/4seFb1ioR39A+kcfu4v3jnEa/EE5qWYnitQ==", + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-6.1.0.tgz", + "integrity": "sha512-5dVBvpBLBnPwSsYXqfybFyehMmC/EenKEcf23AhCTgTf48JFBbmJKqoZBsERDnjL0FyiVTYWdFsRfTLHxLyKdQ==", "dev": true }, "dashdash": { @@ -3560,12 +3590,6 @@ } } }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, "del": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/del/-/del-4.1.1.tgz", @@ -3675,16 +3699,6 @@ "integrity": "sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==", "dev": true }, - "detective": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.7.1.tgz", - "integrity": "sha512-H6PmeeUcZloWtdt4DAkFyzFL94arpHr3NOwwmVILFiy+9Qd4JTxxXrzfyGk/lmct2qVGBwTSwSXagqu2BxmWig==", - "dev": true, - "requires": { - "acorn": "^5.2.1", - "defined": "^1.0.0" - } - }, "di": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/di/-/di-0.0.1.tgz", @@ -3908,7 +3922,7 @@ "dependencies": { "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true } @@ -3932,10 +3946,22 @@ "dev": true }, "editions": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/editions/-/editions-1.3.4.tgz", - "integrity": "sha512-gzao+mxnYDzIysXKMQi/+M1mjy/rjestjg6OPoYTtI+3Izp23oiGZitsl9lPDPiTGXbcSIk1iJWhliSaglxnUg==", - "dev": true + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/editions/-/editions-2.1.3.tgz", + "integrity": "sha512-xDZyVm0A4nLgMNWVVLJvcwMjI80ShiH/27RyLiCnW1L273TcJIA25C4pwJ33AWV01OX6UriP35Xu+lH4S7HWQw==", + "dev": true, + "requires": { + "errlop": "^1.1.1", + "semver": "^5.6.0" + }, + "dependencies": { + "semver": { + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", + "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==", + "dev": true + } + } }, "ee-first": { "version": "1.1.1", @@ -3944,9 +3970,9 @@ "dev": true }, "ejs": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.1.tgz", - "integrity": "sha512-0xy4A/twfrRCnkhfk8ErDi5DqdAsAqeGxht4xkCUrsvhhbQNs7E+4jV0CN7+NKIY0aHE72+XvqtBIXzD31ZbXQ==", + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/ejs/-/ejs-2.6.2.tgz", + "integrity": "sha512-PcW2a0tyTuPHz3tWyYqtK6r1fZ3gp+3Sop8Ph+ZYN81Ob5rwmbHEzaqs10N3BEsaGTkh/ooniXK+WwszGlc2+Q==", "dev": true }, "electron-to-chromium": { @@ -4124,14 +4150,13 @@ "integrity": "sha1-QWgTO0K7BcOKNbGuQ5fIKYqzaeA=", "dev": true }, - "envify": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/envify/-/envify-3.4.1.tgz", - "integrity": "sha1-1xIjKejfFoi6dxsSUBkXyc5cvOg=", + "errlop": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/errlop/-/errlop-1.1.1.tgz", + "integrity": "sha512-WX7QjiPHhsny7/PQvrhS5VMizXXKoKCS3udaBp8gjlARdbn+XmK300eKBAAN0hGyRaTCtRpOaxK+xFVPUJ3zkw==", "dev": true, "requires": { - "jstransform": "^11.0.3", - "through": "~2.3.4" + "editions": "^2.1.2" } }, "errno": { @@ -4157,6 +4182,7 @@ "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, "requires": { "is-arrayish": "^0.2.1" } @@ -5215,9 +5241,9 @@ } }, "google-code-prettify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/google-code-prettify/-/google-code-prettify-1.0.4.tgz", - "integrity": "sha1-JPvMEwovHehucRgOszDXziEf2s8=" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/google-code-prettify/-/google-code-prettify-1.0.5.tgz", + "integrity": "sha1-n0d/Ik2/piNy5e+AOn4VdBBAAIQ=" }, "got": { "version": "7.1.0", @@ -5491,7 +5517,8 @@ "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", - "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==" + "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", + "dev": true }, "hpack.js": { "version": "2.1.6", @@ -5739,6 +5766,15 @@ "safer-buffer": ">= 2.1.2 < 3" } }, + "icss-utils": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-4.1.1.tgz", + "integrity": "sha512-4aFq7wvWyMHKgxsH8QQtGpvbASCf+eM3wPRLI6R+MgAnTCZ6STYsRvttLvRWK0Nfif5piF394St3HeJDaljGPA==", + "dev": true, + "requires": { + "postcss": "^7.0.14" + } + }, "ieee754": { "version": "1.1.12", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.12.tgz", @@ -5871,6 +5907,12 @@ "integrity": "sha1-Sl/W0nzDMvN+VBmlBNu4NxBckok=", "dev": true }, + "indexes-of": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/indexes-of/-/indexes-of-1.0.1.tgz", + "integrity": "sha1-8w9xbI4r00bHtn0985FVZqfAVgc=", + "dev": true + }, "indexof": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", @@ -5991,7 +6033,7 @@ }, "external-editor": { "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", "dev": true, "requires": { @@ -6002,7 +6044,7 @@ }, "inquirer": { "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", + "resolved": "http://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", "dev": true, "requires": { @@ -6146,7 +6188,8 @@ "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=" + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true }, "is-binary-path": { "version": "1.0.1", @@ -6165,6 +6208,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", + "dev": true, "requires": { "builtin-modules": "^1.0.0" } @@ -6566,14 +6610,14 @@ } }, "istextorbinary": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.2.1.tgz", - "integrity": "sha512-TS+hoFl8Z5FAFMK38nhBkdLt44CclNRgDHWeMgsV8ko3nDlr/9UI2Sf839sW7enijf8oKsZYXRvM8g0it9Zmcw==", + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/istextorbinary/-/istextorbinary-2.5.1.tgz", + "integrity": "sha512-pv/JNPWnfpwGjPx7JrtWTwsWsxkrK3fNzcEVnt92YKEIErps4Fsk49+qzCe9iQF2hjqK8Naqf8P9kzoeCuQI1g==", "dev": true, "requires": { - "binaryextensions": "2", - "editions": "^1.3.3", - "textextensions": "2" + "binaryextensions": "^2.1.2", + "editions": "^2.1.3", + "textextensions": "^2.4.0" } }, "isurl": { @@ -6587,27 +6631,19 @@ } }, "jasmine": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.2.0.tgz", - "integrity": "sha512-qv6TZ32r+slrQz8fbx2EhGbD9zlJo3NwPrpLK1nE8inILtZO9Fap52pyHk7mNTh4tG50a+1+tOiWVT3jO5I0Sg==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jasmine/-/jasmine-3.4.0.tgz", + "integrity": "sha512-sR9b4n+fnBFDEd7VS2el2DeHgKcPiMVn44rtKFumq9q7P/t8WrxsVIZPob4UDdgcDNCwyDqwxCt4k9TDRmjPoQ==", "dev": true, "requires": { - "glob": "^7.0.6", - "jasmine-core": "~3.2.0" - }, - "dependencies": { - "jasmine-core": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.2.1.tgz", - "integrity": "sha512-pa9tbBWgU0EE4SWgc85T4sa886ufuQdsgruQANhECYjwqgV4z7Vw/499aCaP8ZH79JDS4vhm8doDG9HO4+e4sA==", - "dev": true - } + "glob": "^7.1.3", + "jasmine-core": "~3.4.0" } }, "jasmine-core": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.3.0.tgz", - "integrity": "sha512-3/xSmG/d35hf80BEN66Y6g9Ca5l/Isdeg/j6zvbTYlTzeKinzmaTM4p9am5kYqOmE05D7s1t8FGjzdSnbUbceA==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/jasmine-core/-/jasmine-core-3.4.0.tgz", + "integrity": "sha512-HU/YxV4i6GcmiH4duATwAbJQMlE0MsDIR5XmSVxURxKHn3aGAdbY1/ZJFmVRbKtnLwIxxMJD7gYaPsypcbYimg==", "dev": true }, "jasmine-webpack-plugin": { @@ -6970,42 +7006,6 @@ "verror": "1.10.0" } }, - "jstransform": { - "version": "11.0.3", - "resolved": "https://registry.npmjs.org/jstransform/-/jstransform-11.0.3.tgz", - "integrity": "sha1-CaeJk+CuTU70SH9hVakfYZDLQiM=", - "dev": true, - "requires": { - "base62": "^1.1.0", - "commoner": "^0.10.1", - "esprima-fb": "^15001.1.0-dev-harmony-fb", - "object-assign": "^2.0.0", - "source-map": "^0.4.2" - }, - "dependencies": { - "esprima-fb": { - "version": "15001.1.0-dev-harmony-fb", - "resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-15001.1.0-dev-harmony-fb.tgz", - "integrity": "sha1-MKlHMDxrjV6VW+4rmbHSMyBqaQE=", - "dev": true - }, - "object-assign": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-2.1.1.tgz", - "integrity": "sha1-Q8NuXVaf+OSBbE76i+AtJpZ8GKo=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true, - "requires": { - "amdefine": ">=0.0.4" - } - } - } - }, "karma": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/karma/-/karma-4.1.0.tgz", @@ -7136,9 +7136,9 @@ } }, "karma-jasmine-html-reporter": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.3.1.tgz", - "integrity": "sha512-J8pUc58QeRhpHQ+sXBRZ016ZW9ZOjU4vjYA6Jah69WvBaqR7tGvXUzy7w/DoULbNrD8+hnZCpvdeEtqXtirY2g==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.4.2.tgz", + "integrity": "sha512-7g0gPj8+9JepCNJR9WjDyQ2RkZ375jpdurYQyAYv8PorUCadepl8vrD6LmMqOGcM17cnrynBawQYZHaumgDjBw==", "dev": true }, "karma-mocha-reporter": { @@ -7258,7 +7258,7 @@ "dependencies": { "got": { "version": "6.7.1", - "resolved": "https://registry.npmjs.org/got/-/got-6.7.1.tgz", + "resolved": "http://registry.npmjs.org/got/-/got-6.7.1.tgz", "integrity": "sha1-JAzQV4WpoY5WHcG0S0HHY+8ejbA=", "dev": true, "requires": { @@ -8490,6 +8490,7 @@ "version": "2.4.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.4.0.tgz", "integrity": "sha512-9jjUFbTPfEy3R/ad/2oNbKtW9Hgovl5O1FvFWKkKblNXoN/Oou6+9+KKohPK13Yc3/TyunyWhJp6gvRNR/PPAw==", + "dev": true, "requires": { "hosted-git-info": "^2.1.4", "is-builtin-module": "^1.0.0", @@ -8946,7 +8947,7 @@ }, "p-cancelable": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "resolved": "http://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true }, @@ -9034,6 +9035,7 @@ "version": "2.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, "requires": { "error-ex": "^1.2.0" } @@ -9318,11 +9320,124 @@ "find-up": "^2.1.0" } }, + "popper.js": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/popper.js/-/popper.js-1.15.0.tgz", + "integrity": "sha1-VWC5m7rXZH6fqkdca4BWYh9aT/I=" + }, "posix-character-classes": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, + "postcss": { + "version": "7.0.17", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.17.tgz", + "integrity": "sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ==", + "dev": true, + "requires": { + "chalk": "^2.4.2", + "source-map": "^0.6.1", + "supports-color": "^6.1.0" + }, + "dependencies": { + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.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 + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "postcss-modules-extract-imports": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-2.0.0.tgz", + "integrity": "sha512-LaYLDNS4SG8Q5WAWqIJgdHPJrDDr/Lv775rMBFUbgjTz6j34lUznACHcdRWroPvXANP2Vj7yNK57vp9eFqzLWQ==", + "dev": true, + "requires": { + "postcss": "^7.0.5" + } + }, + "postcss-modules-local-by-default": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-3.0.2.tgz", + "integrity": "sha512-jM/V8eqM4oJ/22j0gx4jrp63GSvDH6v86OqyTHHUvk4/k1vceipZsaymiZ5PvocqZOl5SFHiFJqjs3la0wnfIQ==", + "dev": true, + "requires": { + "icss-utils": "^4.1.1", + "postcss": "^7.0.16", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.0.0" + } + }, + "postcss-modules-scope": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-2.1.0.tgz", + "integrity": "sha512-91Rjps0JnmtUB0cujlc8KIKCsJXWjzuxGeT/+Q2i2HXKZ7nBUeF9YQTZZTNvHVoNYj1AthsjnGLtqDUE0Op79A==", + "dev": true, + "requires": { + "postcss": "^7.0.6", + "postcss-selector-parser": "^6.0.0" + } + }, + "postcss-modules-values": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-3.0.0.tgz", + "integrity": "sha512-1//E5jCBrZ9DmRX+zCtmQtRSV6PV42Ix7Bzj9GbwJceduuf7IqP8MgeTXuRDHOWj2m0VzZD5+roFWDuU8RQjcg==", + "dev": true, + "requires": { + "icss-utils": "^4.0.0", + "postcss": "^7.0.6" + } + }, + "postcss-selector-parser": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.2.tgz", + "integrity": "sha512-36P2QR59jDTOAiIkqEprfJDsoNrvwFei3eCqKd1Y0tUsBimsq39BLp7RD+JWny3WgB1zGhJX8XVePwm9k4wdBg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "indexes-of": "^1.0.1", + "uniq": "^1.0.1" + } + }, + "postcss-value-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.0.0.tgz", + "integrity": "sha512-ESPktioptiSUchCKgggAkzdmkgzKfmp0EU8jXH+5kbIUB+unr0Y4CY9SRMvibuvYUBjNh1ACLbxqYNpdTQOteQ==", + "dev": true + }, "postinstall-build": { "version": "5.0.3", "resolved": "https://registry.npmjs.org/postinstall-build/-/postinstall-build-5.0.3.tgz", @@ -9347,9 +9462,9 @@ "dev": true }, "pretty-bytes": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.1.0.tgz", - "integrity": "sha512-wa5+qGVg9Yt7PB6rYm3kXlKzgzgivYTLRandezh43jjRqgyDyP+9YxfJpJiLs9yKD1WeU8/OvtToWpW7255FtA==", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-5.2.0.tgz", + "integrity": "sha512-ujANBhiUsl9AhREUDUEY1GPOharMGm8x8juS7qOHybcLi7XsKfrYQ88hSly1l2i0klXHTDYrlL8ihMCG55Dc3w==", "dev": true }, "pretty-error": { @@ -9549,12 +9664,6 @@ } } }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, "qjobs": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/qjobs/-/qjobs-1.2.0.tgz", @@ -9663,7 +9772,7 @@ "dependencies": { "minimist": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true } @@ -9675,7 +9784,6 @@ "integrity": "sha1-kRCmSXxJ1EuhwO3TF67CnC4NkdE=", "dev": true, "requires": { - "envify": "^3.0.0", "fbjs": "^0.6.1" } }, @@ -9686,13 +9794,21 @@ "dev": true }, "read-chunk": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-2.1.0.tgz", - "integrity": "sha1-agTAkoAF7Z1C4aasVgDhnLx/9lU=", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/read-chunk/-/read-chunk-3.2.0.tgz", + "integrity": "sha512-CEjy9LCzhmD7nUpJ1oVOE6s/hBkejlcJEgLQHVnQznOSilOPb+kpKktlLfFDK3/WP43+F80xkUTM2VOkYoSYvQ==", "dev": true, "requires": { - "pify": "^3.0.0", - "safe-buffer": "^5.1.1" + "pify": "^4.0.1", + "with-open-file": "^0.1.6" + }, + "dependencies": { + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } } }, "read-pkg": { @@ -9761,26 +9877,6 @@ "readable-stream": "^2.0.2" } }, - "recast": { - "version": "0.11.23", - "resolved": "https://registry.npmjs.org/recast/-/recast-0.11.23.tgz", - "integrity": "sha1-RR/TAEqx5N+bTktmN2sqIZEkYtM=", - "dev": true, - "requires": { - "ast-types": "0.9.6", - "esprima": "~3.1.0", - "private": "~0.1.5", - "source-map": "~0.5.0" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true - } - } - }, "rechoir": { "version": "0.6.2", "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", @@ -10416,6 +10512,16 @@ "dev": true, "requires": { "is-plain-object": "^2.0.4" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "requires": { + "is-extendable": "^0.1.0" + } + } } }, "setimmediate": { @@ -10454,9 +10560,9 @@ "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, "shelljs": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.2.tgz", - "integrity": "sha512-pRXeNrCA2Wd9itwhvLp5LZQvPJ0wU6bcjaTMywHHGX5XWhVN2nzSu7WV0q+oUY7mGK3mgSkDDzP3MgjqdyIgbQ==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.3.tgz", + "integrity": "sha512-fc0BKlAWiLpwZljmOvAOTE/gXawtCoNrP5oaY7KIaQbbyHeQVg01pSEuEGvGh3HEdBU4baCD7wQBwADmM/7f7A==", "dev": true, "requires": { "glob": "^7.0.0", @@ -10465,11 +10571,11 @@ } }, "showdown": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.7.2.tgz", - "integrity": "sha1-v5nanzrwD60dc0IeES/cNS4SSd4=", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.0.tgz", + "integrity": "sha512-x7xDCRIaOlicbC57nMhGfKamu+ghwsdVkHMttyn+DelwzuHOx4OHCVL/UW/2QOLH7BxfCcCCVVUix3boKXJKXQ==", "requires": { - "yargs": "^8.0.1" + "yargs": "^10.0.3" }, "dependencies": { "ansi-regex": { @@ -10482,22 +10588,21 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=" }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, "is-fullwidth-code-point": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=" }, - "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "strip-bom": "^3.0.0" - } - }, "os-locale": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-2.1.0.tgz", @@ -10508,38 +10613,6 @@ "mem": "^1.1.0" } }, - "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", - "requires": { - "pify": "^2.0.0" - } - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=" - }, - "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", - "requires": { - "load-json-file": "^2.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" - } - }, - "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", - "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" - } - }, "string-width": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", @@ -10557,61 +10630,40 @@ "ansi-regex": "^3.0.0" } }, - "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" - }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, "yargs": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-8.0.2.tgz", - "integrity": "sha1-YpmpBVsc78lp/355wdkY3Osiw2A=", + "version": "10.1.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-10.1.2.tgz", + "integrity": "sha512-ivSoxqBGYOqQVruxD35+EyCFDYNEFL/Uo6FcOnz+9xZdZzK0Zzw4r4KhbrME1Oo2gOggwJod2MnsdamSG7H9ig==", "requires": { - "camelcase": "^4.1.0", - "cliui": "^3.2.0", + "cliui": "^4.0.0", "decamelize": "^1.1.1", + "find-up": "^2.1.0", "get-caller-file": "^1.0.1", "os-locale": "^2.0.0", - "read-pkg-up": "^2.0.0", "require-directory": "^2.1.1", "require-main-filename": "^1.0.1", "set-blocking": "^2.0.0", "string-width": "^2.0.0", "which-module": "^2.0.0", "y18n": "^3.2.1", - "yargs-parser": "^7.0.0" + "yargs-parser": "^8.1.0" } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-8.1.0.tgz", + "integrity": "sha512-yP+6QqN8BmrgW2ggLtTbdrOyBNSI7zBa4IykmiV5R1wl1JWNxQvWhMfMdmzIYtKU7oP3OOInY/tl2ov3BDjnJQ==", "requires": { "camelcase": "^4.1.0" } } } }, - "showdown-github": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/showdown-github/-/showdown-github-1.0.0.tgz", - "integrity": "sha1-h2AUrKwtKOaQpYEZNe+5CVI+DQc=", - "requires": { - "showdown": "1.0.x" - }, - "dependencies": { - "showdown": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/showdown/-/showdown-1.0.2.tgz", - "integrity": "sha1-vEK7vAEAkRK7FOMMyEW7QP3oJUQ=" - } - } - }, "showdown-prettify": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/showdown-prettify/-/showdown-prettify-1.3.0.tgz", @@ -10976,6 +11028,7 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.1.tgz", "integrity": "sha512-hxSPZbRZvSDuOvADntOElzJpenIR7wXJkuoUcUtS0erbgt2fgeaoPIYretfKpslMhfFDY4k0MZ2F5CUzhBsSvQ==", + "dev": true, "requires": { "spdx-expression-parse": "^3.0.0", "spdx-license-ids": "^3.0.0" @@ -10984,12 +11037,14 @@ "spdx-exceptions": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.1.0.tgz", - "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==" + "integrity": "sha512-4K1NsmrlCU1JJgUrtgEeTVyfx8VaYea9J9LvARxhbHtVtohPs/gFGG5yy49beySjlIMhhXZ4QqujIZEfS4l6Cg==", + "dev": true }, "spdx-expression-parse": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.0.tgz", "integrity": "sha512-Yg6D3XpRD4kkOmTpdgbUiEJFKghJH03fiC1OPll5h/0sO6neh2jqRDVHOQ4o/LMea0tgCkbMgea5ip/e+MkWyg==", + "dev": true, "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" @@ -10998,7 +11053,8 @@ "spdx-license-ids": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", - "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==", + "dev": true }, "spdy": { "version": "4.0.0", @@ -11347,6 +11403,16 @@ "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", "dev": true }, + "style-loader": { + "version": "0.23.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", + "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0", + "schema-utils": "^1.0.0" + } + }, "sudo-block": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/sudo-block/-/sudo-block-1.2.0.tgz", @@ -11366,7 +11432,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -11436,7 +11502,7 @@ }, "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { @@ -11458,7 +11524,7 @@ }, "external-editor": { "version": "1.1.1", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", + "resolved": "http://registry.npmjs.org/external-editor/-/external-editor-1.1.1.tgz", "integrity": "sha1-Etew24UPf/fnCBuvQAVwAGDEYAs=", "dev": true, "requires": { @@ -11513,7 +11579,7 @@ }, "onetime": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, @@ -11724,9 +11790,9 @@ "dev": true }, "textextensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.2.0.tgz", - "integrity": "sha512-j5EMxnryTvKxwH2Cq+Pb43tsf6sdEgw6Pdwxk83mPaq0ToeFJt6WE4J3s5BqY7vmjlLgkgXvhtXUxo80FyBhCA==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/textextensions/-/textextensions-2.4.0.tgz", + "integrity": "sha512-qftQXnX1DzpSV8EddtHIT0eDDEiBF8ywhFYR2lI9xrGtxqKN+CvLXhACeCIGbCpQfxxERbrkZEFb8cZcDKbVZA==", "dev": true }, "throttleit": { @@ -11772,6 +11838,14 @@ "setimmediate": "^1.0.4" } }, + "tippy.js": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-4.3.4.tgz", + "integrity": "sha1-mpH9XOjEAfGBt62qaywn89EF87o=", + "requires": { + "popper.js": "^1.14.7" + } + }, "title-case": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/title-case/-/title-case-1.1.2.tgz", @@ -12191,9 +12265,26 @@ "requires": { "isobject": "^3.0.1" } + }, + "set-value": { + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-0.4.3.tgz", + "integrity": "sha1-fbCPnT0i3H945Trzw79GZuzfzPE=", + "dev": true, + "requires": { + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.1", + "to-object-path": "^0.3.0" + } } } }, + "uniq": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", + "integrity": "sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8=", + "dev": true + }, "unique-filename": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/unique-filename/-/unique-filename-1.1.1.tgz", @@ -12460,6 +12551,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, "requires": { "spdx-correct": "^3.0.0", "spdx-expression-parse": "^3.0.0" @@ -14299,6 +14391,31 @@ "integrity": "sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0=", "dev": true }, + "with-open-file": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/with-open-file/-/with-open-file-0.1.6.tgz", + "integrity": "sha512-SQS05JekbtwQSgCYlBsZn/+m2gpn4zWsqpCYIrCHva0+ojXcnmUEPsBN6Ipoz3vmY/81k5PvYEWSxER2g4BTqA==", + "dev": true, + "requires": { + "p-finally": "^1.0.0", + "p-try": "^2.1.0", + "pify": "^4.0.1" + }, + "dependencies": { + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true + } + } + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -14550,9 +14667,9 @@ } }, "yeoman-generator": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-3.1.1.tgz", - "integrity": "sha512-ur4+vzXQEkyJNV+uBf9wLIo8gcuwRJkPyYU8CbKoXjfaVDMF0hYjO242UKK9eVx5uL2IvZAG/tLS/g7QaFdn/A==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/yeoman-generator/-/yeoman-generator-3.2.0.tgz", + "integrity": "sha512-iR/qb2je3GdXtSfxgvOXxUW0Cp8+C6LaZaNlK2BAICzFNzwHtM10t/QBwz5Ea9nk6xVDQNj4Q889TjCXGuIv8w==", "dev": true, "requires": { "async": "^2.6.0", @@ -14561,7 +14678,7 @@ "cross-spawn": "^6.0.5", "dargs": "^6.0.0", "dateformat": "^3.0.3", - "debug": "^3.1.0", + "debug": "^4.1.0", "detect-conflict": "^1.0.0", "error": "^7.0.2", "find-up": "^3.0.0", @@ -14572,13 +14689,13 @@ "mem-fs-editor": "^5.0.0", "minimist": "^1.2.0", "pretty-bytes": "^5.1.0", - "read-chunk": "^2.1.0", + "read-chunk": "^3.0.0", "read-pkg-up": "^4.0.0", "rimraf": "^2.6.2", "run-async": "^2.0.0", "shelljs": "^0.8.0", "text-table": "^0.2.0", - "through2": "^2.0.0", + "through2": "^3.0.0", "yeoman-environment": "^2.0.5" }, "dependencies": { @@ -14596,9 +14713,9 @@ } }, "debug": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.5.tgz", - "integrity": "sha512-D61LaDQPQkxJ5AUM2mbSJRbPkNs/TmdmOeLAi1hgDkpDfIfetSrjmWhccwtuResSwMbACjx/xXQofvM9CE/aeg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", "dev": true, "requires": { "ms": "^2.1.1" @@ -14637,20 +14754,20 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, "p-limit": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.0.0.tgz", - "integrity": "sha512-fl5s52lI5ahKCernzzIyAP0QAZbGIovtVHGwpcu1Jr/EpzLVDI2myISHwGqK7m8uQFugVWSrbxH7XnhGtvEc+A==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.0.tgz", + "integrity": "sha512-pZbTJpoUsCzV48Mc9Nh51VbwO0X9cuPFE8gYwx9BTCt9SF8/b7Zljd2fVgOxhIF/HDTKgpVzs+GPhyKfjLLFRQ==", "dev": true, "requires": { "p-try": "^2.0.0" @@ -14666,9 +14783,9 @@ } }, "p-try": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.0.0.tgz", - "integrity": "sha512-hMp0onDKIajHfIkdRk3P4CdCmErkYAxxDtP3Wx/4nZ3aGlau2VKh3mZpcuFkH27WQkL/3WBCPOktzA9ZOAnMQQ==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, "parse-json": { @@ -14716,6 +14833,15 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", "dev": true + }, + "through2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", + "integrity": "sha512-M96dvTalPT3YbYLaKaCuwu+j06D/8Jfib0o/PxbVt6Amhv3dUAtW6rTV1jPgJSBG83I/e04Y6xkVdVhSRhi0ww==", + "dev": true, + "requires": { + "readable-stream": "2 || 3" + } } } }, @@ -14828,7 +14954,7 @@ }, "p-cancelable": { "version": "0.4.1", - "resolved": "https://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", + "resolved": "http://registry.npmjs.org/p-cancelable/-/p-cancelable-0.4.1.tgz", "integrity": "sha512-HNa1A8LvB1kie7cERyy21VNeHb2CWJJYqyyC2o3klWFfMGlFmWv2Z7sFgZH8ZiaYL95ydToKTFVXgMV/Os0bBQ==", "dev": true }, @@ -14947,7 +15073,7 @@ "dependencies": { "chalk": { "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", + "resolved": "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", "dev": true, "requires": { diff --git a/package.json b/package.json index 189bd9593..7d4ca802d 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "es6-promise-promise": "1.0.0", "ev-emitter": "1.1.0", "fullcalendar": "2.9.1", - "google-code-prettify": "1.0.4", + "google-code-prettify": "1.0.5", "imagesloaded": "4.1.4", "intersection-observer": "^0.5.1", "jquery": "3.4.1", @@ -47,24 +47,26 @@ "parsleyjs": "2.7.2", "photoswipe": "4.1.3", "pikaday": "^1.8.0", + "popper.js": "^1.15.0", "prefixfree": "1.0.0", "promise-polyfill": "^8.1.0", "screenfull": "^5.0.0", "select2": "3.5.1", - "showdown": "1.7.2", - "showdown-github": "1.0.0", + "showdown": "1.9.0", "showdown-prettify": "1.3.0", "slick-carousel": "1.8.1", "slides": "https://github.com/Patternslib/slides.git", "spectrum-colorpicker": "1.8.0", "stickyfilljs": "https://github.com/syslabcom/stickyfill.git", "text-loader": "0.0.1", + "tippy.js": "^4.3.4", "underscore": "1.9.1", "validate.js": "0.11.1" }, "devDependencies": { "ajv": "^6.6.1", "babel-plugin-syntax-dynamic-import": "6.18.0", + "css-loader": "^3.0.0", "duplicate-package-checker-webpack-plugin": "^3.0.0", "exports-loader": "^0.7.0", "expose-loader": "^0.7.5", @@ -72,8 +74,8 @@ "generator-patternslib": "github:Patternslib/generator-patternslib#d8d06e0", "html-webpack-plugin": "^3.2.0", "imports-loader": "^0.8.0", - "jasmine": "^3.2.0", - "jasmine-core": "^3.3.0", + "jasmine": "^3.4.0", + "jasmine-core": "^3.4.0", "jasmine-webpack-plugin": "^0.1.1", "jshint": "^2.10.2", "karma": "^4.1.0", @@ -84,7 +86,7 @@ "karma-firefox-launcher": "^1.1.0", "karma-ie-launcher": "^1.0.0", "karma-jasmine": "^2.0.1", - "karma-jasmine-html-reporter": "^1.2.0", + "karma-jasmine-html-reporter": "^1.4.2", "karma-mocha-reporter": "^2.2.5", "karma-opera-launcher": "^1.0.0", "karma-phantomjs-launcher": "^1.0.4", @@ -102,6 +104,7 @@ "script-loader": "^0.7.2", "set-value": "^3.0.1", "tar": "^4.4.10", + "style-loader": "^0.23.1", "uglifyjs-webpack-plugin": "^2.0.1", "union-value": "^2.0.1", "webpack": "^4.27.1", diff --git a/src/pat/tooltip-ng/.editorconfig b/src/pat/tooltip-ng/.editorconfig new file mode 100644 index 000000000..8a80734f0 --- /dev/null +++ b/src/pat/tooltip-ng/.editorconfig @@ -0,0 +1,21 @@ +# EditorConfig helps developers define and maintain consistent +# coding styles between different editors and IDEs +# editorconfig.org + +root = true + + +[*] + +# Change these settings to your own preference +indent_style = space +indent_size = 4 + +# We recommend you to keep these unchanged +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/src/pat/tooltip-ng/.gitignore b/src/pat/tooltip-ng/.gitignore new file mode 100644 index 000000000..7272832a4 --- /dev/null +++ b/src/pat/tooltip-ng/.gitignore @@ -0,0 +1,4 @@ +node_modules +stamp-npm +*~ +.*.sw? diff --git a/src/pat/tooltip-ng/.jshintrc b/src/pat/tooltip-ng/.jshintrc new file mode 100644 index 000000000..0754692ae --- /dev/null +++ b/src/pat/tooltip-ng/.jshintrc @@ -0,0 +1,24 @@ +{ + "asi": true, + "browser": true, + "devel": true, + "esversion": 6, + "eqeqeq": true, + "indent": 4, + "jquery": false, + "smarttabs": true, + "trailing": true, + "undef": true, + "unused": true, + "white": false, + "quotmark": "single", + "predef": [ + "Markdown", + "Modernizr", + "define", + "module", + "require", + "requirejs", + "tinyMCE" + ] +} diff --git a/src/pat/tooltip-ng/.yo-rc.json b/src/pat/tooltip-ng/.yo-rc.json new file mode 100644 index 000000000..11a8333bf --- /dev/null +++ b/src/pat/tooltip-ng/.yo-rc.json @@ -0,0 +1,5 @@ +{ + "generator-patternslib": { + "appPath": "./" + } +} \ No newline at end of file diff --git a/src/pat/tooltip-ng/Makefile b/src/pat/tooltip-ng/Makefile new file mode 100644 index 000000000..323794ccf --- /dev/null +++ b/src/pat/tooltip-ng/Makefile @@ -0,0 +1,19 @@ +all:: designerhappy + +######################################################################## +## Install dependencies + +stamp-npm: package.json + npm install + touch stamp-npm + +clean:: + rm -f stamp-npm + rm -rf node_modules + +make serve:: +# TODO + +designerhappy:: stamp-npm + printf "\n\n Designer, you can be happy now.\n Go to http://localhost:4001/ to see a demo \n\n\n\n" +# TODO diff --git a/src/pat/tooltip-ng/documentation.md b/src/pat/tooltip-ng/documentation.md new file mode 100644 index 000000000..635cac897 --- /dev/null +++ b/src/pat/tooltip-ng/documentation.md @@ -0,0 +1,167 @@ +## Description + +This pattern allows you to easily add tooltips with a variety of behaviours to your website. + +## Documentation + +Tooltips are intended to display contextual information and function about the trigger element. + +### Markup structure + + + +### Display + +Tooltips are shown when clicking on the triggering element. + +The trigger can be changed to require the mouse to hover over the triggering element, +and to be hidden when the mouse leaves the triggering element +by adding a `hover` option. + + More information + +### Positioning + +Tooltips will be positioned close to the element that triggered them, +with an arrow tip pointing to the centre of the triggering item. The +placement of the tip on the tooltip determines the positioning of the +tooltip. For example if the tip is placed at the right side of the +tooltip, it naturally follows that the tooltip itself will be placed to +the left of the triggering element. + +The position of the tip within the tooltip can be specified with a +*position* property which specifies the preferred positions. This is +formatted as `[,preference]*`. The possible preferences are: + +- `tl`: tip placed at the leftmost corner of the top side of the tooltip +- `tm`: tip placed at the middle of the top side of the tooltip +- `tr`: tip placed at the rightmost corner of the top side of the tooltip +- `rt`: tip placed at the top corner of the right side of the tooltip +- `rm`: tip placed at the middle of the right side of the tooltip +- `rb`: tip placed at the bottom corner of the right side of the tooltip +- `bl`: tip placed at the leftmost corner of the bottom side of the tooltip +- `bm`: tip placed at the middle of the bottom side of the tooltip +- `br`: tip placed at the rightmost corner of the bottom side of the tooltip +- `lt`: tip placed at the top corner of the left side of the tooltip +- `lm`: tip placed at the middle of the left side of the tooltip +- `lb`: tip placed at the bottom corner of the left side of the tooltip + +An example: + + + … + + +This specifies that the preferred position of the tip is at the top left +side of the tooltip (placing the tooltip itself on the right side of the +link). Notice that the position is the first defined property so you can use +shorthand syntax directly. If the tooltip does not fit at that position +then the left-middle position is tried, and then the right-top or if all +previous options failed the middle of the right side is tried. If the tooltip +does not fit at any of the preferred positions, then it will be +positioned at the location that has the most space, even if this is not +one of the preferred positions. + +It is possible to force a specific tooltip position by adding the +`force` flag. + + + … + + +### Sticky tooltips + +By default, the tooltip disappears when the cursor is moved off the element or +the triggering element is clicked. If this is not desired behaviour, there is +the option to change the closing behaviour to `sticky` or to `close-button`. + +With `sticky`, the tooltip will remain until the user clicks outside of the +tooltip, or on mobile, if the user clicks on the close button. + +With the `close-button` option, the tooltip will only be closed if the close +button is clicked. + +For example, setting closing to `sticky`: + + + … + + +### AJAX tooltips + +The tooltip content can be loaded via an AJAX request by providing an ajax +option: + + + … + + +This will load the contents of the `#myTip` element of +balloon-contents.html and display it in a tooltip. + +### Generated markup + +The first time the tooltip is shown the tip itself will be wrapped in a +new tooltip container. This container will be positioned correctly. + +Source markup: + + + +will be transformed into: + + + … +
+
+ +

+ Please enter the full URL for the website. +

+
+ +
+ +for tooltips which fetch their content with an AJAX call the tooltip may +be temporarily shown with a progress indicator: + + + … +
+
+ + + +
+ +### Options reference + +The tooltip can be configured through a `data-pat-tooltip` attribute. +The available options are: + +| Property | Default value | Values | Description | Type | +| ----- | --------| -------- | ------- | ----------- | +| `position-list`| `auto` | `tl` `tm` `tr` `rt` `rm` `rb` `br` `bm` `bl` `lb` `lm` `lt` | The priority in which the pattern will try to position the tooltip. With the tooltip is positioned where the most space is on the screen. The two letters indicate the position of the triangle as opposed to the tooltip body. Adding `force` will force the tooltip position, even if it would end up out of view. | Multiple value | +| `position-policy` | `auto` | `auto` `force` | Policy used to place a tooltip: either always use a listed position, or allow other positions if no space is available for the listed positions. | Mutually exclusive | +| `trigger` | `click` | `click` `hover` | Sets which user action should make the tooltip appear. | Mutually exclusive | +| `source` | `title` | `ajax` `content` `title` | Select where the contents of the tooltip is taken from: AJAX loading of the link target, the contents of element or its title attribute. | Mutually exclusive | +| `delay` | `0` | *time* | `The delay for the tooltip to appear, expressed in milliseconds | Time | +| `mark-inactive` | `true` | `true` `false` | Should we add inactive class to the tooltip trigger? | Bool | +| `closing` | `auto` | `auto` `sticky` `close-button` | Auto means that the tooltip will disappear when the user clicks out of the tooltip, or — in case of hover triggered tooltips — hovers away from the trigger element. `close-button` will add a close button to the tooltip which must be used to close the tooltip. | Mutually exclusive | +| `class` | *none* | *class value* | Assigns a class to the tooltip. For instance to give a specific tooltip a different colour | | +| `ajax-data-type`| `html` | `html` `markdown` | Data type of content to be loaded when AJAX is used as source. | Mutually exclusive | +| `target` | `body` | *selector* | Selects where the tooltip container is appended in the DOM | | diff --git a/src/pat/tooltip-ng/index.html b/src/pat/tooltip-ng/index.html new file mode 100644 index 000000000..3fb078343 --- /dev/null +++ b/src/pat/tooltip-ng/index.html @@ -0,0 +1,108 @@ + + + + + pat-tooltip-ng demo + + + + +
+

pat-tooltip-ng demo

+

Defaults

+

+ Click here to see a minimally configured tooltip. + By default tooltips are triggered by clicking and they will show the contents + of the title attribute of the element being clicked. +

+

Configurations

+

Tooltips can be configured.

+

class

+

+ class: wasabi. A tooltip with CSS class wasabi is displayed when the element is clicked. +

+

delay

+

+ delay: 1000. A tooltip is displayed with a delay of 1000 ms when hovering the mouse over the element. +

+

mark-inactive

+

+ mark-inactive: false. The default for mark-inactive is true and it toggles the class of the trigger element between active and inactive every time the tooltip is shown or hidden. This example disables this behavior. All the other examples have it enabled (as per default). A tooltip is displayed when clicking the element. +

+

trigger

+

+ trigger: click (default). A tooltip is displayed when the element is clicked. +

+

+ trigger: hover. A tooltip is displayed when hovering the mouse pointer over the element. +

+

source

+

+ source: title (default). Click here to see the title attribute in the tooltip. +

+

+ source: content and href="#". Click the following link to show the same content in the link inside the tooltip. +

+

+ source: content and href="#tooltip-source". Click the following link to show the content of the element matching the given selector inside the tooltip. +

+

+ source: ajax. Mouse over the following link to show the content of pattern-test-response.html#myTip loaded by ajax inside the tooltip. +

+

+ source: ajax. Click the following link to show the content of pattern-test-response.html#myTip loaded by ajax inside the tooltip. +

+

+ source: auto and href="#tooltip-source". Click the following link to show the content of the element matching the given selector inside the tooltip. +

+

ajax-data-type

+

+ ajax-data-type: markdown. Applies when injecting content via ajax. The default is html, but this example shows a tooltip with content in markdown on click. +

target

+

+ target: body (default). When clicking this link the tooltip will be appended to the document.body. +

+

+ target: parent. When clicking this link the tooltip will be appended to its parent container. +

+

+ target: #tooltip-container. When clicking this link the tooltip will be appended to an element matching the given selector. +

+

position-list and position-policy

+

+ position-list: tr Try this +

+

+ position-list: bl Try this +

+

+ position-list: lt Try this +

+

+ position-list: rb Try this +

+

+ position-list: tm You can configure tooltips to set their preferred positions as well when they will appear. + This tooltip is configured to preferably appear in the top middle, but won't appear there if there isn't enough space. +

+

+ position-list: rt; position-policy: force You can configure tooltips to set their preferred positions as well when they will appear. + This tooltip is configured to always appear in the right top, and doesn't care if there isn't enough space. +

+

+ position-list: tl Only one position preference given to compare with previous one when scrolling.
+ Try this tooltip and then scroll the page up and down. +

+

+ position-list: tl, rt The tooltip will flip its position according to your preferences when scrolling. + Try this tooltip and then scroll the page up and down. +

+ +
+ +
+
+ + diff --git a/src/pat/tooltip-ng/package.json b/src/pat/tooltip-ng/package.json new file mode 100644 index 000000000..0886bc350 --- /dev/null +++ b/src/pat/tooltip-ng/package.json @@ -0,0 +1,13 @@ +{ + "name": "pat-tooltip-ng", + "version": "0.0.1", + "keywords": [ + "patternslib", + "pattern" + ], + "dependencies": {}, + "license": "BSD", + "devDependencies": { + "requirejs": "" + } +} diff --git a/src/pat/tooltip-ng/pattern-test-response.html b/src/pat/tooltip-ng/pattern-test-response.html new file mode 100644 index 000000000..193b6d32a --- /dev/null +++ b/src/pat/tooltip-ng/pattern-test-response.html @@ -0,0 +1,502 @@ + + + + + Insert title here + + + +
Thank you!!
+ +
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed sed urna augue. Nulla facilisi. Aliquam erat volutpat. Cras pharetra ante vel metus pulvinar vestibulum. Praesent mollis dapibus nisl, id condimentum quam lacinia ut. Fusce luctus felis ac mi lacinia porttitor. Vivamus sed nunc turpis. Phasellus quis dui sed mauris sollicitudin consequat at ut nisi. Mauris egestas enim ac nisi ultrices facilisis. Praesent at metus risus, vitae congue nulla. Integer dapibus orci eu tellus consectetur eu posuere nibh tincidunt. Proin lacinia, arcu quis ultrices porttitor, nisi libero convallis velit, sit amet vehicula nisi neque a justo. Suspendisse vitae sem quis diam pulvinar fermentum a vel augue. Vestibulum id sagittis dolor. + + Proin gravida volutpat velit, sit amet pulvinar metus varius porttitor. Nulla dictum vulputate diam, nec placerat enim tempus at. Sed sodales sollicitudin nibh, a cursus leo pretium a. Morbi nisl magna, interdum ut interdum ut, volutpat nec enim. Integer enim nisl, consequat et elementum at, lobortis sit amet lectus. Aliquam egestas nisl condimentum diam hendrerit non congue augue facilisis. Suspendisse potenti. + + Sed ultricies luctus molestie. Donec facilisis adipiscing molestie. Suspendisse in nunc sed felis bibendum pulvinar. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris quis purus odio, non elementum elit. Nullam sed nisl sapien. Vestibulum rhoncus, risus ac suscipit eleifend, urna quam accumsan turpis, eget ullamcorper nunc risus ut dolor. Curabitur eget quam erat. Aenean in dolor id ipsum lobortis feugiat. Morbi porta fringilla venenatis. Pellentesque vitae est neque, hendrerit eleifend erat. Donec fermentum augue id arcu pretium eleifend. Lorem ipsum dolor sit amet, consectetur adipiscing elit. +
+ +
+ This should appear on the modal window + +

+ You can do selfHealing and + close the panel at the same time. +

+

you can also close it. +

+ +
+ Content for tab 1 +
+ +
+ Content for tab 2 +
+ + +

+ More… +

+ + +

+ More… +

+ + +

+

+ +
+ +

We hope you will enjoy watching these channels. If you feel there's anything missing, we've got thousands more channels in stock that you can subscribe too.

+
    +
  • + +

    Barack Obama

    + Barack Hussein Obama II (born August 4, 1961) is the 44th and current President of the United States, having taken office in 2009. He is the first African American to hold the office. Obama previously served as a United States senator from Illinois, from January 2005 until he resigned followinghis election to the presidency in November 2008.
+																																														 A native of Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School, where he was the president of the Harvard Law Review. He was acommunity organizer in Chicago before earning his law degree. He worked as a civil rights attorney in Chicago and taught constitutional law at the University of Chicago Law School from 1992 to 2004. +
    +

    Barack Hussein Obama II (born August 4, 1961) is the 44th and current President of the United States, having taken office in 2009. He is the first African American to hold the office. Obama previously served as a United States senator from Illinois, from January 2005 until he resigned followinghis election to the presidency in November 2008. + A native of Honolulu, Hawaii, Obama is a graduate of Columbia University and Harvard Law School, where he was the president of the Harvard Law Review. He was acommunity organizer in Chicago before earning his law degree. He worked as a civil rights attorney in Chicago and taught constitutional law at the University of Chicago Law School from 1992 to 2004.

    +
  • +
  • + +

    Bob Marley & The Wailers

    + +
    +

    +
  • +
  • + +

    Coldplay

    + Coldplay are an English alternative rock band formed in 1996 by lead vocalist Chris Martin and lead guitarist Jonny Buckland at University College London. After forming Pectoralz, Guy Berryman joined the group as a bassist and they changed their name to Starfish. Will Champion joined as a drummer, backing vocalist, and multi-instrumentalist, completing the lineup. Manager Phil Harvey is often considered an unofficial fifth member. The band renamed themselves "Coldplay" in 1998, before recording and releasing three EPs; Safety in 1998, Brothers & Sisters as a single in 1999 and The Blue Room in the same year. The latter was their first release on a major label, after signing to Parlophone. +
    +

    Coldplay are an English alternative rock band formed in 1996 by lead vocalist Chris Martin and lead guitarist Jonny Buckland at University College London. After forming Pectoralz, Guy Berryman joined the group as a bassist and they changed their name to Starfish. Will Champion joined as a drummer, backing vocalist, and multi-instrumentalist, completing the lineup. Manager Phil Harvey is often considered an unofficial fifth member. The band renamed themselves "Coldplay" in 1998, before recording and releasing three EPs; Safety in 1998, Brothers & Sisters as a single in 1999 and The Blue Room in the same year. The latter was their first release on a major label, after signing to Parlophone.

    +
  • +
  • + +

    Cruising With Radio

    + Hello everyone... Let me tell you a little about myself. I am known on many Cruise related message boards as Radio... it's an easy name to remember. There are lots of GREAT Cruise Boards on the internet, like Cruise Critic, Cruise Mates, and CrownCast.
+																																			 I don't have a broadcast or Radio job, but more on that later. +
    +

    Hello everyone... Let me tell you a little about myself. I am known on many Cruise related message boards as Radio... it's an easy name to remember. There are lots of GREAT Cruise Boards on the internet, like Cruise Critic, Cruise Mates, and CrownCast. + I don't have a broadcast or Radio job, but more on that later.

    +
  • +
  • + +

    Eminem

    + Marshall Bruce Mathers III (born October 17, 1972), better known by his stage name Eminem or his alter ego Slim Shady, is an American rapper, record producer, and actor. Eminem quickly gained popularity in 1999 with his major-label debut album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in United States history. It brought Eminem increased popularity, including his own record label, Shady Records, and brought his group project, D12, to mainstream recognition. As well as being a member of D12, Eminem is also one half of the hip-hop duo Bad Meets Evil (the other member being Royce da 5'9"). +
    +

    Marshall Bruce Mathers III (born October 17, 1972), better known by his stage name Eminem or his alter ego Slim Shady, is an American rapper, record producer, and actor. Eminem quickly gained popularity in 1999 with his major-label debut album, The Slim Shady LP, which won a Grammy Award for Best Rap Album. The following album, The Marshall Mathers LP, became the fastest-selling solo album in United States history. It brought Eminem increased popularity, including his own record label, Shady Records, and brought his group project, D12, to mainstream recognition. As well as being a member of D12, Eminem is also one half of the hip-hop duo Bad Meets Evil (the other member being Royce da 5'9"). +

    +
  • +
  • + +

    Facebook

    + Facebook is a social networking service and website launched in February 2004, operated and privately owned by Facebook, Inc. As of January 2011, Facebook has more than 600 million active users. Users may create a personal profile, add other users as friends, and exchange messages, including automatic notifications when they update their profile. Additionally, users may join common interest user groups, organized by workplace, school or college, or other characteristics. The name of the service stems from the colloquial name for the book given to students at the start of the academic year by university administrations in the United States to help students get to know each other better. Facebook allows anyone who declares themselves to be at least 13 years old to become a registered user of the website. +
    +

    Facebook is a social networking service and website launched in February 2004, operated and privately owned by Facebook, Inc. As of January 2011, Facebook has more than 600 million active users. Users may create a personal profile, add other users as friends, and exchange messages, including automatic notifications when they update their profile. Additionally, users may join common interest user groups, organized by workplace, school or college, or other characteristics. The name of the service stems from the colloquial name for the book given to students at the start of the academic year by university administrations in the United States to help students get to know each other better. Facebook allows anyone who declares themselves to be at least 13 years old to become a registered user of the website.

    +
  • +
  • + +

    Green Day

    + Green Day is an American punk rock band formed in 1987. The band consists of lead vocalist and guitarist Billie Joe Armstrong, bassist and backing vocalist Mike Dirnt, and drummer Tre Cool. Cool replaced former drummer John Kiffmeyer in 1990, prior to the recording of the band's second studio album, Kerplunk, and has been a member of the band since. +
    +

    Green Day is an American punk rock band formed in 1987. The band consists of lead vocalist and guitarist Billie Joe Armstrong, bassist and backing vocalist Mike Dirnt, and drummer Tre Cool. Cool replaced former drummer John Kiffmeyer in 1990, prior to the recording of the band's second studio album, Kerplunk, and has been a member of the band since.

    +
  • +
  • + +

    Guns N Roses

    + Guns N' Roses (sometimes abbreviated as G N' R or GnR) is an American hard rock band. The band formed in Hollywood, Los Angeles, California, in 1985. Led by frontman and co-founder Axl Rose, the band has released six studio albums, three EPs, and one live album while going through numerous line-up changes and controversies since its formation. Rose is the only consistent and original member of Guns N' Roses. +
    +

    Guns N' Roses (sometimes abbreviated as G N' R or GnR) is an American hard rock band. The band formed in Hollywood, Los Angeles, California, in 1985. Led by frontman and co-founder Axl Rose, the band has released six studio albums, three EPs, and one live album while going through numerous line-up changes and controversies since its formation. Rose is the only consistent and original member of Guns N' Roses.

    +
  • +
  • + +

    Nirvana

    + +
    +

    +
  • +
  • + +

    Pearl Jam

    + Pearl Jam is an American rock band that formed in Seattle, Washington in 1990. The band's original line-up consisted of Eddie Vedder (lead vocals), Jeff Ament (bass), Stone Gossard (rhythm guitar), Mike McCready (lead guitar), and Dave Krusen (drums). The band's current drummer is Matt Cameron, formerly of Soundgarden, who has been with the band since 1998. +
    +

    Pearl Jam is an American rock band that formed in Seattle, Washington in 1990. The band's original line-up consisted of Eddie Vedder (lead vocals), Jeff Ament (bass), Stone Gossard (rhythm guitar), Mike McCready (lead guitar), and Dave Krusen (drums). The band's current drummer is Matt Cameron, formerly of Soundgarden, who has been with the band since 1998.

    +
  • +
  • + +

    Phoenix Suns

    + The Phoenix Suns are a professional basketball team based in Phoenix, Arizona. They are members of the Pacific Division of the Western Conference in the National Basketball Association (NBA) and the only team in their division not to be based in California. Their home arena since 1992 has been the US Airways Center, which was formerly known as America West Arena, in downtown Phoenix. The Arena is often referred to as the "Purple Palace" due to its purple seats. +
    +

    The Phoenix Suns are a professional basketball team based in Phoenix, Arizona. They are members of the Pacific Division of the Western Conference in the National Basketball Association (NBA) and the only team in their division not to be based in California. Their home arena since 1992 has been the US Airways Center, which was formerly known as America West Arena, in downtown Phoenix. The Arena is often referred to as the "Purple Palace" due to its purple seats.

    +
  • +
  • + +

    Red Hot Chili Peppers

    + Red Hot Chili Peppers (sometimes referred to as RHCP) is an American rock band. They formed in Los Angeles, California, in 1983.
+																																						The band's current line-up consists of Anthony Kiedis (vocals), Michael "Flea" Balzary (bass), Chad Smith (drums) and Josh Klinghoffer (guitar). The group's musical style has fused traditional funk with elements of other genres, including punk and psychedelic rock. +
    +

    Red Hot Chili Peppers (sometimes referred to as RHCP) is an American rock band. They formed in Los Angeles, California, in 1983. + The band's current line-up consists of Anthony Kiedis (vocals), Michael "Flea" Balzary (bass), Chad Smith (drums) and Josh Klinghoffer (guitar). The group's musical style has fused traditional funk with elements of other genres, including punk and psychedelic rock.

    +
  • +
  • + +

    Rovio Mobile

    + +
    +

    +
  • +
  • + +

    Shakira

    + Shakira Isabel Mebarak Ripoll known professionally as Shakira  is a Colombian singer, songwriter, musician, record producer, dancer, and philanthropist who emerged in the music scene of Colombia and Latin America in the early 1990s. Born and raised in Barranquilla, Colombia, Shakira revealed many of her talents in school as a live performer, demonstrating her vocal ability with rock and roll, Latin andMiddle Eastern influences with her own original twist on belly dancing. Shakira is a native Spanish speaker and also speaks fluent English and Portuguese as well as some Italian, French and Arabic. +
    +

    Shakira Isabel Mebarak Ripoll known professionally as Shakira is a Colombian singer, songwriter, musician, record producer, dancer, and philanthropist who emerged in the music scene of Colombia and Latin America in the early 1990s. Born and raised in Barranquilla, Colombia, Shakira revealed many of her talents in school as a live performer, demonstrating her vocal ability with rock and roll, Latin andMiddle Eastern influences with her own original twist on belly dancing. Shakira is a native Spanish speaker and also speaks fluent English and Portuguese as well as some Italian, French and Arabic.

    +
  • +
  • + +

    U2

    + U2 are a rock band which formed in Dublin, Ireland. Formed in 1976, the group consists of Bono (vocals and guitar), The Edge (guitar, keyboards and vocals), Adam Clayton (bass guitar), and Larry Mullen, Jr. (drums and percussion). U2's early sound was indebted to post-punk but eventually grew to incorporate influences from many genres of popular music. Throughout the group's musical pursuits, they have maintained a recognisable sound built on melodic instrumentals, highlighted by The Edge's textural guitar playing and Bono's expressive vocals. Their lyrics, often embellished with spiritual imagery, focus on personal themes and sociopolitical concerns. +
    +

    U2 are a rock band which formed in Dublin, Ireland. Formed in 1976, the group consists of Bono (vocals and guitar), The Edge (guitar, keyboards and vocals), Adam Clayton (bass guitar), and Larry Mullen, Jr. (drums and percussion). U2's early sound was indebted to post-punk but eventually grew to incorporate influences from many genres of popular music. Throughout the group's musical pursuits, they have maintained a recognisable sound built on melodic instrumentals, highlighted by The Edge's textural guitar playing and Bono's expressive vocals. Their lyrics, often embellished with spiritual imagery, focus on personal themes and sociopolitical concerns.

    +
  • +
  • + +

    YouTube

    + Founded in February 2005, YouTube allows billions of people to discover, watch and share originally-created videos. YouTube provides a forum for people to connect, inform, and inspire others across the globe and acts as a distribution platform for original content creators and advertisers large and small. See our company timeline for more information on our company history. +
    +

    Founded in February 2005, YouTube allows billions of people to discover, watch and share originally-created videos. YouTube provides a forum for people to connect, inform, and inspire others across the globe and acts as a distribution platform for original content creators and advertisers large and small. See our company timeline for more information on our company history.

    +
  • +
+ +
+
+ + +

Some more channels you may like …

+
    +
  • + +

    Diggnation

    Diggnation is Revision3's flagship video podcast produced weekly. It is hosted by Kevin Rose and Alex Albrecht, who had previously hosted TechTV's The Screen Savers together. +
    +

    Diggnation is Revision3's flagship video podcast produced weekly. It is hosted by Kevin Rose and Alex Albrecht, who had previously hosted TechTV's The Screen Savers together.

    +
    + +
    +
  • +
  • + +

    Days of our Lives

    Relationships grow and die in the town of Salem. +
    +

    Relationships grow and die in the town of Salem.

    +
    + +
    +
  • +
  • + +

    Sports Babes

    +
    +

    +
    + +
    +
  • +
  • + +

    Leona Lewis

    Leona Louise Lewis (born 3 April 1985) is a British singer-songwriter. Lewis was a contestant in third series of the British television series The X Factor, which she won.
+																																																Lewis is a multi-platinum selling artist and three time Grammy Award nominee. Her most successful single, "Bleeding Love", reached number one in over thirty countries around the world. She was proclaimed 'Top New Artist' by Billboard magazine in 2008. Lewis has released two albums to date, Spirit and Echo, in 2007 and 2009 respectively. Spirit became the fastest-selling debut album and the biggest seller of 2007 in both the United Kingdom and Ireland, and made Lewis the first British solo artist to top the Billboard 200 with a debut album. It has sold over 6.5 million copies worldwide. +
    +

    Leona Louise Lewis (born 3 April 1985) is a British singer-songwriter. Lewis was a contestant in third series of the British television series The X Factor, which she won. + Lewis is a multi-platinum selling artist and three time Grammy Award nominee. Her most successful single, "Bleeding Love", reached number one in over thirty countries around the world. She was proclaimed 'Top New Artist' by Billboard magazine in 2008. Lewis has released two albums to date, Spirit and Echo, in 2007 and 2009 respectively. Spirit became the fastest-selling debut album and the biggest seller of 2007 in both the United Kingdom and Ireland, and made Lewis the first British solo artist to top the Billboard 200 with a debut album. It has sold over 6.5 million copies worldwide.

    +
    + +
    +
  • +
  • + +

    Soulja Boy

    DeAndre Cortez Way (born July 28, 1990), better known by his stage name Soulja Boy Tell 'Em, or simply Soulja Boy, is an American rapper and record producer. +
    +

    DeAndre Cortez Way (born July 28, 1990), better known by his stage name Soulja Boy Tell 'Em, or simply Soulja Boy, is an American rapper and record producer.

    +
    + +
    +
  • +
  • + +

    PBS

    +
    +

    +
    + +
    +
  • +
  • + +

    Dolce&Gabbana

    Dolce&Gabbana specializes in luxury items influenced more by designers and is more formal and 'timeless', responding to long-term trends rather than seasonal changes. It also sells sunglasses and corrective eyewear, purses, and watches. +
    +

    Dolce&Gabbana specializes in luxury items influenced more by designers and is more formal and 'timeless', responding to long-term trends rather than seasonal changes. It also sells sunglasses and corrective eyewear, purses, and watches.

    +
    + +
    +
  • +
  • + +

    Cosmic Journeys

    How did the universe begin? Where will it end? Are there other worlds like Earth? A groundbreaking new series combs the rubble of exploding stars and the collision of worlds in search of answers to our most searching questions about the cosmos. Original productions from SPACERIP TV in collaboration with SPACE.COM. +
    +

    How did the universe begin? Where will it end? Are there other worlds like Earth? A groundbreaking new series combs the rubble of exploding stars and the collision of worlds in search of answers to our most searching questions about the cosmos. Original productions from SPACERIP TV in collaboration with SPACE.COM.

    +
    + +
    +
  • +
  • + +

    Sun Valley Resort

    +
    +

    +
    + +
    +
  • +
  • + +

    USA Today

    +
    +

    +
    + +
    +
  • +
  • + +

    ESPN

    ESPN, Inc., The Worldwide Leader in Sports, is the leading multinational, multimedia sports entertainment company featuring the broadest portfolio of multimedia sports assets with over 50 business entities. +
    +

    ESPN, Inc., The Worldwide Leader in Sports, is the leading multinational, multimedia sports entertainment company featuring the broadest portfolio of multimedia sports assets with over 50 business entities.

    +
    + +
    +
  • +
  • + +

    Diggnation

    Diggnation is Revision3's flagship video podcast produced weekly. It is hosted by Kevin Rose and Alex Albrecht, who had previously hosted TechTV's The Screen Savers together. +
    +

    Diggnation is Revision3's flagship video podcast produced weekly. It is hosted by Kevin Rose and Alex Albrecht, who had previously hosted TechTV's The Screen Savers together.

    +
    + +
    +
  • +
+ +
+ +
+ + + +

Subscribe to the channels you like from this selection out of our vast channel catalogue or search for more channels above.

+
    +
  • + +

    Roy Orbison

    Roy Kelton Orbison (April 23, 1936 – December 6, 1988) was an American singer-songwriter, well known for his distinctive, powerful voice, complex compositions, and dark emotional ballads. Orbison grew up in Texas and began singing in a rockabilly/country & western band in high school until he was signed by Sun Records in Memphis. His greatest success came with Monument Records in the early to mid 1960s when 22 of his songs placed on the Billboard Top Forty, including "Only the Lonely", "Crying", "In Dreams", and "Oh, Pretty Woman". His career stagnated through the 1970s, but several covers of his songs and the use of one in a film by David Lynch revived his career in the 1980s. In 1988, he joined the supergroup Traveling Wilburys with George Harrison, Bob Dylan, Tom Petty, and Jeff Lynne and also released a new solo album. He died of a heart attack in December that year, at the zenith of his resurgence. His life was marred by tragedy, including the death of his first wife and two of his children in separate accidents. +
    +

    Roy Kelton Orbison (April 23, 1936 – December 6, 1988) was an American singer-songwriter, well known for his distinctive, powerful voice, complex compositions, and dark emotional ballads. Orbison grew up in Texas and began singing in a rockabilly/country & western band in high school until he was signed by Sun Records in Memphis. His greatest success came with Monument Records in the early to mid 1960s when 22 of his songs placed on the Billboard Top Forty, including "Only the Lonely", "Crying", "In Dreams", and "Oh, Pretty Woman". His career stagnated through the 1970s, but several covers of his songs and the use of one in a film by David Lynch revived his career in the 1980s. In 1988, he joined the supergroup Traveling Wilburys with George Harrison, Bob Dylan, Tom Petty, and Jeff Lynne and also released a new solo album. He died of a heart attack in December that year, at the zenith of his resurgence. His life was marred by tragedy, including the death of his first wife and two of his children in separate accidents.

    +
    + +
    +
  • +
  • + +

    E!

    E! Online is the premiere destination for up-to-the-minute entertainment news and celebrity inside information presented in a fun, irreverent tone. E! Online delivers breaking news, fashion, movie reviews, photos, video and live-event coverage to over 6 million unique U.S. users per month, per ComScore. +
    +

    E! Online is the premiere destination for up-to-the-minute entertainment news and celebrity inside information presented in a fun, irreverent tone. E! Online delivers breaking news, fashion, movie reviews, photos, video and live-event coverage to over 6 million unique U.S. users per month, per ComScore. +

    +
    + +
    +
  • +
  • + +

    JCPenney

    Discover the style you want, the quality you expect and the price you love at jcpenney. new look. new day. who knew! +
    +

    Discover the style you want, the quality you expect and the price you love at jcpenney. new look. new day. who knew!

    +
    + +
    +
  • +
  • + +

    Livestrong

    Livestrong provides support to guide people through the cancer experience, bring them together to fight cancer—and work for a world in which our fight is no longer necessary. +
    +

    Livestrong provides support to guide people through the cancer experience, bring them together to fight cancer—and work for a world in which our fight is no longer necessary.

    +
    + +
    +
  • +
  • + +

    Comedy Time

    +
    +

    +
    + +
    +
  • +
  • + +

    Jennifer Lopez

    Jennifer Lynn Lopez (born July 24, 1969), often nicknamed J.Lo, is an American actress, singer, record producer, dancer, television personality, fashion designer and television producer. Lopez began her career as a dancer on the television comedy program In Living Color. Subsequently venturing into acting, she gained recognition in the 1995 action-thriller Money Train. +
    +

    Jennifer Lynn Lopez (born July 24, 1969), often nicknamed J.Lo, is an American actress, singer, record producer, dancer, television personality, fashion designer and television producer. Lopez began her career as a dancer on the television comedy program In Living Color. Subsequently venturing into acting, she gained recognition in the 1995 action-thriller Money Train.

    +
    + +
    +
  • +
  • + +

    Sports Illustrated

    Sports Illustrated is a North American sports magazine owned by media conglomerate Time Warner. It has over 3.5 million subscribers and is read by 23 million adults each week, including over 18 million men. It was the first magazine with circulation over one million to win the National Magazine Award for General Excellence twice. Its swimsuit issue, which has been published since 1964, is now an annual publishing event that generates its own television shows, videos and calendars. +
    +

    Sports Illustrated is a North American sports magazine owned by media conglomerate Time Warner. It has over 3.5 million subscribers and is read by 23 million adults each week, including over 18 million men. It was the first magazine with circulation over one million to win the National Magazine Award for General Excellence twice. Its swimsuit issue, which has been published since 1964, is now an annual publishing event that generates its own television shows, videos and calendars.

    +
    + +
    +
  • +
  • + +

    Paul McCartney

    Sir James Paul McCartney, MBE (born 18 June 1942) is an English musician, singer-songwriter and composer. Formerly of The Beatles (1960–1970) and Wings (1971–1981), McCartney is the most commercially successful songwriter in the history of popular music, according to Guinness World Records. +
    +

    Sir James Paul McCartney, MBE (born 18 June 1942) is an English musician, singer-songwriter and composer. Formerly of The Beatles (1960–1970) and Wings (1971–1981), McCartney is the most commercially successful songwriter in the history of popular music, according to Guinness World Records.

    +
    + +
    +
  • +
  • + +

    Modern Family

    Today's American families come in all shapes and sizes. The cookie cutter mold of man + wife + 2.5 kids is a thing of the past, as it becomes quickly apparent in the bird's eye view of ABC's new half-hour comedy, "Modern Family," which takes an honest and often hilarious look at the composition and complexity of modern family life. +
    +

    Today's American families come in all shapes and sizes. The cookie cutter mold of man + wife + 2.5 kids is a thing of the past, as it becomes quickly apparent in the bird's eye view of ABC's new half-hour comedy, "Modern Family," which takes an honest and often hilarious look at the composition and complexity of modern family life.

    +
    + +
    +
  • +
  • + +

    Old Spice

    Old Spice has 71 years of experience helping guys improve their mansmells with deodorant, bodywash, antiperspirant and fragrances. +
    +

    Old Spice has 71 years of experience helping guys improve their mansmells with deodorant, bodywash, antiperspirant and fragrances.

    +
    + +
    +
  • +
  • + +

    The GigaOm Show

    +
    +

    +
    + +
    +
  • +
  • + +

    Indy Mogul

    +
    +

    +
    + +
    +
  • +
+ +
+ +
+ +
+ + + + + +
+

Channel 1

+

I'm a description for channel 1

+
+ +
+

Channel 2

+

I'm a description for channel 2

+
+ + +
+

Channel 3

+

I'm a description for channel 3

+
+ +
+

Hello form pattern-test-response.html!

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

+
+ + + diff --git a/src/pat/tooltip-ng/tests.js b/src/pat/tooltip-ng/tests.js new file mode 100644 index 000000000..9f91c8e13 --- /dev/null +++ b/src/pat/tooltip-ng/tests.js @@ -0,0 +1,896 @@ +define(['pat-tooltip-ng', 'pat-logger'], (pattern, logger) => { + const _OAC = '_onAjaxCallback', + _OS = '_onShow', + _OSN = '_onShown', + _OT = '_onTrigger', + _OAB = '_onAjaxBypass', + _OACS = '_onAjaxContentSet', + _OH = '_onHidden', + _PD = 'preventDefault', + ANYOPTS = jasmine.any(Object), // jshint ignore:line + LOREM = `Lorem.`, + LONGLOREM = `Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.` // jshint ignore:line + + var log = logger.getLogger('pat-tooltip-ng.tests'), + start, + utils = { + createTooltip(c) { + var cfg = c || {} + return $('', { + 'id': cfg.id || 'tooltip', + 'href': cfg.href || '#anchor', + 'title': cfg.title || 'tooltip title attribute', + 'data-pat-tooltip-ng': '' || cfg.data, + 'class': 'pat-tooltip-ng' + }).text(cfg.content + ).appendTo($('div#lab')) + }, + + removeTooltip() { + var $el = $('a#tooltip') + $el.trigger('destroy.pat-tooltip-ng') + $el.remove() + }, + + createTooltipSource() { + return $(`') + .appendTo($('div#lab')) + }, + + dispatchEvent($target, event_name) { + $target[0].dispatchEvent(new Event(event_name)) + }, + + click($target) { + utils.dispatchEvent($target, 'click') + }, + + mouseenter($target) { + utils.dispatchEvent($target, 'mouseenter') + }, + + mouseleave($target) { + utils.dispatchEvent($target, 'mouseleave') + }, + + delayed(name, timeout) { + return (...args) => { + setTimeout(() => { + pattern[name].and.callThrough() + pattern[name].apply(null, args) + pattern[name].and.callFake(utils.delayed(name, timeout)) + }, timeout) + } + }, + + stopwatch(name, timer) { + return (...args) => { + timer[name] = Date.now() + pattern[name].and.callThrough() + pattern[name].apply(null, args) + pattern[name].and.callFake(utils.stopwatch(name, timer)) + } + }, + + log(msg) { + log.debug( String(Date.now() - start) + ' ' + msg) + } + }; + + log.setLevel(20) + + describe('pat-tooltip-ng', () => { + + beforeEach(() => { + $('
', {id: 'lab'}).appendTo(document.body) + start = Date.now() + }) + + afterAll(() => { + }) + + describe('A tooltip', () => { + afterEach(() => { + utils.removeTooltip() + $('#lab').remove() + }) + + describe(`if the 'class' parameter exists`, () => { + it('will assign a class to the tooltip container', (done) => { + var $el = utils.createTooltip({ + data: 'source: title; trigger: hover; class: wasabi', + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.mouseenter($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + var expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.hasClass('wasabi')).toBeTruthy() + done() + }, 400) + }) + + it('and only to the corresponding container', (done) => { + var $el1 = utils.createTooltip({ + data: 'source: title; trigger: click; class: wasabi', + title: 'tooltip1' + }), + $el2 = utils.createTooltip({ + data: 'source: title; trigger: click', + title: 'tooltip2' + }), + title1 = $el1.attr('title'), + title2 = $el2.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el1) + pattern.init($el2) + utils.click($el2) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + var expected = $container.find('.tippy-content').text() + expect(expected).toBe(title2) + expect($container.hasClass('wasabi')).toBeFalsy() + utils.click($el1) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + var expected = $container.find('.tippy-content').text() + expect(expected).toBe(title1) + expect($container.hasClass('wasabi')).toBeTruthy() + utils.click($el2) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + var expected = $container.find('.tippy-content').text() + expect(expected).toBe(title2) + expect($container.hasClass('wasabi')).toBeFalsy() + done() + }, 400) + }, 400) + }, 400) + }) + }) + + describe(`if the 'delay' parameter exists`, () => { + it('will wait accordingly before showing the tooltip', (done) => { + const $el = utils.createTooltip({ + data: 'delay: 1000; trigger: hover', + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + timer = {} + + spyOn(pattern, _OT).and.callFake( + utils.stopwatch(_OT, timer) + ) + spyOn(pattern, _OS).and.callFake( + utils.stopwatch(_OS, timer) + ) + pattern.init($el) + utils.mouseenter($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + const duration = timer[_OS] - timer[_OT] + expect(duration/1000).toBeCloseTo(1,1) + done() + }, 1500) + }) + }) + + describe(`if the 'position-list' parameter exists`, () => { + it(`'lt' will place the tooltip as 'right-start'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: lt', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('right-start') + done() + }, 500) + }) + it(`'lb' will place the tooltip as 'right-end'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: lb', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('right-end') + done() + }, 500) + }) + it(`'lm' will place the tooltip as 'right'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: lm', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('right') + done() + }, 500) + }) + it(`'bl' will place the tooltip as 'top-start'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: bl', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('top-start') + done() + }, 500) + }) + it(`'br' will place the tooltip as 'top-end'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: br', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('top-end') + done() + }, 500) + }) + it(`'bm' will place the tooltip as 'top'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: bm', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('top') + done() + }, 500) + }) + + describe(`and 'position-policy' is 'force'`, () => { + it(`'tl;force' will place the tooltip as 'bottom-start'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: tl; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('bottom-start') + done() + }, 500) + }) + + it(`'tr;force' will place the tooltip as 'bottom-end'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: tr; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('bottom-end') + done() + }, 500) + }) + + it(`'tm;force' will place the tooltip as 'bottom'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: tm; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('bottom') + done() + }, 500) + }) + + it(`'rt;force' will place the tooltip as 'left-start'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: rt; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('left-start') + done() + }, 500) + }) + + it(`'rb;force' will place the tooltip as 'left-end'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: rb; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('left-end') + done() + }, 500) + }) + + it(`'rm;force' will place the tooltip as 'left'`, (done) => { + const $el = utils.createTooltip({ + data: 'position-list: rm; position-policy: force', + title: LOREM, + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($container.attr('x-placement')).toBe('left') + done() + }, 500) + }) + }) + }) + + describe(`the 'mark-inactive' paramater`, () => { + it('when true, toggles the active/inactive class on the trigger', (done) => { + const $el = utils.createTooltip({ + data: 'mark-inactive: true', + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_hidden = spyOn(pattern, _OH).and.callThrough() + + pattern.init($el) + expect($el.hasClass('inactive')).toBeTruthy() + expect($el.hasClass('active')).toBeFalsy() + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($el.hasClass('active')).toBeTruthy() + expect($el.hasClass('inactive')).toBeFalsy() + utils.click($el) + setTimeout(() => { + expect(spy_hidden).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(0) + expect($el.hasClass('active')).toBeFalsy() + expect($el.hasClass('inactive')).toBeTruthy() + done() + }, 500) + }, 500) + }) + it('when false, the trigger does not get the active/inactive class', (done) => { + const $el = utils.createTooltip({ + data: 'mark-inactive: false', + }), + title = $el.attr('title'), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_hidden = spyOn(pattern, _OH).and.callThrough() + + pattern.init($el) + expect($el.hasClass('inactive')).toBeFalsy() + expect($el.hasClass('active')).toBeFalsy() + utils.click($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(1) + const expected = $container.find('.tippy-content').text() + expect(expected).toBe(title) + expect($el.hasClass('active')).toBeFalsy() + expect($el.hasClass('inactive')).toBeFalsy() + utils.click($el) + setTimeout(() => { + expect(spy_hidden).toHaveBeenCalled() + const $container = $('.tippy-tooltip') + expect($container.length).toEqual(0) + expect($el.hasClass('active')).toBeFalsy() + expect($el.hasClass('inactive')).toBeFalsy() + done() + }, 500) + }, 500) + }) + }) + + describe(`if the 'trigger' parameter is 'hover'`, () => { + describe(`if the 'source' parameter is 'title'`, () => { + + it(`will show the contents of the 'title' attribute`, (done) => { + utils.createTooltip({ + data: 'source: title; trigger: hover' + }) + var $el = $('a#tooltip') + var title = $el.attr('title') + var spy = spyOn(pattern, _OSN).and.callThrough() + pattern.init($el) + // The 'title' attr gets removed, otherwise the browser's + // tooltip will appear + expect($el.attr('title')).toBeFalsy() + + utils.mouseenter($el) + setTimeout(() => { + expect(spy).toHaveBeenCalled() + var $container = $('.tippy-popper') + expect($container.length).toEqual(1) + expect($container.find('.tippy-content').text()).toBe(title) + utils.mouseleave($el) + done() + }, 400) + }) + + it('will hide the tooltip on mouseleave', (done) => { + utils.createTooltip({ + data: 'source: title; trigger: hover' + }) + var $el = $('a#tooltip') + var spy = spyOn(pattern, '_onHidden').and.callThrough() + pattern.init($el) + + utils.mouseenter($el) + setTimeout(() => { + expect(spy).not.toHaveBeenCalled() + utils.mouseleave($el) + }, 100) + + setTimeout(() => { + expect(spy).toHaveBeenCalled() + expect($('.tippy-popper').length).toEqual(0) + done() + }, 250) + }) + }) + + describe(`if the 'source' parameter is 'content'`, () => { + describe('if the href attribute is hashtag', () => { + it('will show the content of the link', (done) => { + var content = 'Local content', + $el = utils.createTooltip({ + data: 'source: content; trigger: hover', + href: '#', + content: content + }), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + pattern.init($el) + utils.mouseenter($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper') + expect($container.text()).toBe(content) + done() + }, 400) + }) + }) + describe('if the href attribute is #tooltip-source', () => { + it('will clone a DOM element from the page', (done) => { + var $el = utils.createTooltip({ + data: 'source: content; trigger: hover', + href: '#tooltip-source' + }), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + utils.createTooltipSource() + pattern.init($el) + utils.mouseenter($el) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper') + expect($container.find('strong').text()).toBe('Local content') + done() + }, 400) + }) + }) + }) + }) + describe(`if the 'target' parameter is 'body'`, () => { + it('will append the .tippy-popper to the document.body', (done) => { + var $el = utils.createTooltip({ + data: 'target: body', + href: '#', + }) + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect($('.tippy-popper', 'body').length).toEqual(1) + done() + }, 200) + }) + }) + describe(`if the 'target' parameter is 'parent'`, () => { + it(`will append the .tippy-popper to the reference element's parent node`, (done) => { + var $el = utils.createTooltip({ + data: 'target: parent', + href: '#', + }) + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect($('.tippy-popper', '#lab').length).toEqual(1) + done() + }, 200) + }) + }) + describe(`if the 'target' parameter is a selector`, () => { + it('will append the .tippy-popper to the selected element', (done) => { + var $el = utils.createTooltip({ + data: 'target: #child3', + href: '#', + }) + $('
', {id: 'child3'}) + .appendTo($('
', {id: 'child2'})) + .appendTo($('
', {id: 'child1'})) + .appendTo(document.body) + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect($('.tippy-popper', '#child3').length).toEqual(1) + done() + }, 200) + }) + }) + + describe(`if the "source" parameter is "auto"`, () => { + describe(`if the "href" points to a document fragment`, () => { + it(`will revert to "content"`, (done) => { + var $el = utils.createTooltip({ + data: 'source: auto', + href: '#tooltip-source' + }), + spy = spyOn(pattern, '_setSource').and.callThrough() + + utils.createTooltipSource() + pattern.init($el) + setTimeout(() => { + expect(spy).toHaveBeenCalledWith(ANYOPTS, 'content') + done() + }, 0) + }) + }) + + describe(`if the "href" points to an external URL`, () => { + it(`will revert to "ajax"`, (done) => { + var $el = utils.createTooltip({ + data: 'source: auto', + href: '/tests/content.html#content' + }), + spy = spyOn(pattern, '_setSource').and.callThrough() + utils.createTooltipSource() + + pattern.init($el) + setTimeout(() => { + expect(spy).toHaveBeenCalledWith(ANYOPTS, 'ajax') + done() + }, 0) + }) + }) + }) + }) + + describe(`if the 'source' parameter is 'ajax'`, () => { + afterEach((done) => { + utils.log('afterEach begins!') + setTimeout(() => { + utils.log('afterEach timeout is over!') + utils.removeTooltip() + $('#lab').remove() + done() + }, 600) + }) + + it('the default click action is prevented', done => { + var $el = utils.createTooltip({ + data: 'source: ajax', + href: 'tests/content.html#content' + }), + click = new Event('click'), + spy_prevented = spyOn(click, _PD).and.callThrough(), + spy_shown = spyOn(pattern, _OAC).and.callThrough() + + pattern.init($el) + $el[0].dispatchEvent(click) + $el[0].dispatchEvent(click) + $el[0].dispatchEvent(click) + setTimeout(() => { + expect(spy_shown).toHaveBeenCalledBefore(spy_prevented) + done() + }, 500) + }) + + it('will fetch its contents via ajax', (done) => { + var $el = utils.createTooltip({ + data: 'source: ajax', + href: 'tests/content.html#content' + }), + spy_ajax = spyOn(pattern, _OAC).and.callThrough(), + spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_ajax).toHaveBeenCalled() + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toBe( + 'External content fetched via an HTTP request.') + done() + }, 500) + }) + + it('will handle markdown content', (done) => { + var $el = utils.createTooltip({ + data: 'source: ajax; ajax-data-type: markdown', + href: 'tests/content.md#Display' + }), + spy_ajax = spyOn(pattern, _OAC).and.callThrough() + // Not sure why _OSN is not called in this test + // spy_shown = spyOn(pattern, _OSN).and.callThrough() + + pattern.init($el) + utils.click($el) + setTimeout(() => { + expect(spy_ajax).toHaveBeenCalled() + // expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toContain( + 'Tooltips are shown') + expect($container.text()).not.toContain( + 'contextual') + done() + }, 500) + }) + + describe('will not fetch again until tooltip is hidden', () => { + it('with click', done => { + var $el = utils.createTooltip({ + data: 'source: ajax; trigger: click', + href: 'tests/content.html#content' + }), + spy_ajax = spyOn(pattern, _OAC).and.callThrough(), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_byps = spyOn(pattern, _OAB).and.callThrough() + + utils.log('pattern init') + pattern.init($el) + utils.click($el) + setTimeout(() => { + utils.log('click again') + utils.click($el) + setTimeout(() => { + utils.log('third click') + utils.click($el) + }, 20) + }, 10) + setTimeout(() => { + expect(spy_ajax).toHaveBeenCalledBefore(spy_byps) + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toBe( + 'External content fetched via an HTTP request.') + done() + }, 600) + }) + + it('with hover', done => { + var $el = utils.createTooltip({ + data: 'source: ajax; trigger: hover', + href: 'tests/content.html#content' + }), + spy_ajax = spyOn(pattern, _OAC).and.callThrough(), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_byps = spyOn(pattern, _OAB).and.callThrough() + + utils.log('pattern init') + pattern.init($el) + utils.mouseenter($el) + setTimeout(() => { + utils.log('leaving') + utils.mouseleave($el) + setTimeout(() => { + utils.log('entering') + utils.mouseenter($el) + }, 20) + }, 10) + setTimeout(() => { + expect(spy_ajax).toHaveBeenCalledBefore(spy_byps) + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toBe( + 'External content fetched via an HTTP request.') + done() + }, 600) + }) + }) + + describe('will not fetch again until ajax is answered', () => { + it('with click', done => { + + + var $el = utils.createTooltip({ + data: 'source: ajax; trigger: click', + href: 'tests/content.html#content' + }), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_byps = spyOn(pattern, _OAB).and.callThrough(), + spy_cset = spyOn(pattern, _OACS).and.callThrough() + + spyOn(pattern, _OAC).and.callFake( + utils.delayed(_OAC, 500) + ) + utils.log('pattern init') + pattern.init($el) + utils.click($el) + expect(spy_cset).not.toHaveBeenCalled() + setTimeout(() => { + utils.log('click again') + utils.click($el) + setTimeout(() => { + utils.log('third click') + utils.click($el) + }, 20) + }, 10) + // second click + setTimeout(() => { + expect(spy_byps).toHaveBeenCalledBefore(spy_cset) + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toBe( + 'External content fetched via an HTTP request.') + done() + }, 600) + }) + + it('with hover', done => { + var $el = utils.createTooltip({ + data: 'source: ajax; trigger: hover', + href: 'tests/content.html#content' + }), + spy_shown = spyOn(pattern, _OSN).and.callThrough(), + spy_byps = spyOn(pattern, _OAB).and.callThrough(), + spy_cset = spyOn(pattern, _OACS).and.callThrough() + + spyOn(pattern, _OAC).and.callFake( + utils.delayed(_OAC, 500) + ) + utils.log('pattern init') + pattern.init($el) + utils.mouseenter($el) + expect(spy_cset).not.toHaveBeenCalled() + setTimeout(() => { + utils.log('leaving') + utils.mouseleave($el) + setTimeout(() => { + utils.log('entering') + utils.mouseenter($el) + }, 20) + }, 10) + setTimeout(() => { + expect(spy_byps).toHaveBeenCalledBefore(spy_cset) + expect(spy_shown).toHaveBeenCalled() + var $container = $('.tippy-popper .tippy-content') + expect($container.text()).toBe( + 'External content fetched via an HTTP request.') + done() + }, 600) + }) + }) + }) + + }) +}) +// jshint indent: 4, browser: true, jquery: true, quotmark: single +/*global describe, it, beforeEach, afterEach, spyOn, afterAll, expect */ diff --git a/src/pat/tooltip-ng/tooltip-ng.js b/src/pat/tooltip-ng/tooltip-ng.js new file mode 100644 index 000000000..2cee62279 --- /dev/null +++ b/src/pat/tooltip-ng/tooltip-ng.js @@ -0,0 +1,454 @@ +(function (root, factory) { + // We use AMD (Asynchronous Module Definition) or browser globals to create + // this module. + if (typeof define === 'function' && define.amd) { + define([ + 'jquery', + 'pat-base', + 'pat-registry', + 'pat-utils', + 'pat-parser', + 'pat-markdown', + 'pat-logger', + 'tippy.js', + 'tippy-theme.css', + ], function() { + return factory.apply(this, arguments) + }) + } else { + // If require.js is not available, you'll need to make sure that these + // global variables are available. +// factory($, patterns.Base, patterns, patterns.Parser, patterns.logger, tippy, tippytheme) + factory($, patterns.Base, patterns, patterns.utils, patterns.Parser, patterns.markdown, patterns.logger, tippy) + } +//}(this, function($, Base, registry, Parser, logger, tippy, tippytheme) { +}(this, function($, Base, registry, utils, Parser, Markdown, logger, tippy) { + 'use strict' + + let start = 0 + const log = logger.getLogger('pat-tooltip-ng'), + timelog = msg => { log.debug(`${Date.now() - start} ${msg}`) } + + log.setLevel(20) + timelog('Initializing pat-tooltip-ng') + + /* For logging, you can call log.debug, log.info, log.warn, log.error and log.fatal. + * + * For more information on how to use the logger and how to view log messages, please read: + * https://github.com/Patternslib/logging + */ + + let parser = new Parser('tooltip-ng') + /* If you'd like your pattern to be configurable via the + * data-pat-tooltip-ng attribute, then you need to + * specify the available arguments here, by calling parser.addArgument. + * + * The addArgument method takes the following parameters: + * - name: The required name of the pattern property which you want to make + * configurable. + * - default_value: An optional default string value of the property if the user + * doesn't provide one. + * - choices: An optional set (Array) of values that the property might take. + * If specified, values outside of this set will not be accepted. + * - multiple: An optional boolean value which specifies wether the + * property can be multivalued or not. + * + * For example: + * parser.addArgument('color', 'blue', ['red', 'green', 'blue'], false) + */ + const all_positions = ['tl', 'tm', 'tr', + 'rt', 'rm', 'rb', + 'br', 'bm', 'bl', + 'lb', 'lm', 'lt'] + parser.addArgument('position-list', [], all_positions, true) + parser.addArgument('position-policy', 'auto', ['auto', 'force']) + parser.addArgument('trigger', 'click', ['click', 'hover']) + parser.addArgument('source', 'title', ['auto', 'ajax', 'content', 'content-html', 'title']) + parser.addArgument('ajax-data-type', 'html', ['html', 'markdown']) + parser.addArgument('delay') + parser.addArgument('mark-inactive', true) + parser.addArgument('class') + parser.addArgument('target', 'body') + + + //return Base.extend({ + let tooltip = { + /* The name is used to store the pattern in a registry and needs to be + * unique. + */ + name: 'tooltip-ng', + /* The trigger specifies the selector (CSS or jQuery) which Patternslib + * will scan for in order to identifiy and initialize this pattern. + */ + trigger: '.pat-tooltip-ng', + + jquery_plugin: true, + + tippy: tippy.default, + + init($el, opts, debuglevel=20) { + log.setLevel(debuglevel) + + return $el.each(function() { + this.defaults = { + 'allowHTML': true, + 'animation': 'fade', + 'arrow': true, + //'delay': [0, 1800], + //'duration': [325, 275], + 'flipOnUpdate': true, + 'ignoreAttributes': true, + 'interactive': false, + 'onHidden': tooltip._onHidden, + 'onHide': tooltip._onHide, + 'onMount': tooltip._onMount, + 'onShow': tooltip._onShow, + 'onShown': tooltip._onShown, + 'onTrigger': tooltip._onTrigger, + 'theme': 'light-border', + 'trigger': 'click' + } + + start = Date.now() + const tippy = tooltip.tippy, + $trigger = $(this) + + tippy.setDefaults(this.defaults) + this.options = parser.parse($trigger, opts) + + /* this.options will now contain the configured pattern properties + * you've registered with the parser.addArgument method. + * + * If the user provided any values via the data-pat-tooltip-ng + * attribute, those values will already be set. + */ + + $trigger.data('patterns.tooltip-ng', tooltip._mutateOptions(this.options)) + .on('destroy.pat-tooltip-ng', tooltip._onDestroy) + + this.options = tooltip.parseOptionsForTippy(this.options, $trigger) + tippy($trigger[0], this.options) + tooltip.setupShowEvents($trigger) + }) + }, + + parseOptionsForTippy(opts, $trigger) { + const notImplemented = (name) => { log.error(`${name} not implemented`) }, + + placement = (pos) => { + const primary = (pos) => ({ + t: 'bottom', + r: 'left', + b: 'top', + l: 'right', + }[pos]) + + const secondary = (pos) => ({ + l: '-start', + r: '-end', + m: '', + t: '-start', + b: '-end', + }[pos]) + + return `${primary(pos[0])}${secondary(pos[1])}` + }, + + flipBehavior = (pos) => placement(`${pos[0]}m`), + + parsers = { + position() { + if (opts.hasOwnProperty('position')) { + const prefs = opts.position.list + if (prefs.length > 0) { + const pos = prefs[0] + opts.placement = placement(pos) + + if (prefs.length > 1) { + opts.flipBehavior = prefs.map(flipBehavior) + opts.flip = true + opts.flipOnUpdate = true + } + } + if (opts.position.policy === 'force') { + opts.flip = false + opts.flipOnUpdate = false + } + delete opts.position + } + }, + + height: notImplemented, + + trigger() { + if (opts.trigger === 'hover') { + opts.trigger = 'mouseenter focus' + } + }, + + closing: notImplemented, + + source() { + if (opts.hasOwnProperty('source')) { + if (opts.source==='title') { + opts.content = $trigger.attr('title') + } + if (opts.source === 'auto') { + const href = $trigger.attr('href') + if (typeof(href) !== 'string') { + log.error(`href must be specified if 'source' is set to 'auto'`) + return + } + if (href.indexOf('#') === 0) { + tooltip._setSource(opts, 'content') + } else { + tooltip._setSource(opts, 'ajax') + } + } + if (opts.source==='content') { + const href = $trigger.attr('href'), + is_string = typeof(href) === 'string', + has_hash = href.indexOf('#') !== -1, + has_more = href.length > 1 + let $content + + if (is_string && has_hash && has_more) { + $content = $('#'+href.split('#')[1]).children().clone() + } else { + $content = $trigger.children().clone() + if (!$content.length) { + $content = $('

').text($trigger.text()) + } + } + opts.content = $content[0] + registry.scan($content[0]) + } + if (opts.source==='ajax') { + const $p = $('')[0] + + opts.content = $p + opts.onShow = tooltip._onAjax($trigger) + opts.onHidden = instance => { + timelog('ONAJAXHIDDEN') + instance.setContent($p) + instance.state.ajax.canFetch = true + } + } + delete opts.source + } + }, + + ajaxDataType() { + delete opts.ajaxDataType + }, + + delay() { + if (opts.hasOwnProperty('delay')) { + opts.delay = [utils.parseTime(opts.delay), 0] + } + }, + + markInactive() { + if (opts.markInactive) { + $trigger.addClass('inactive') + } + delete opts.markInactive + }, + + 'class': () => { + if (opts.hasOwnProperty('class')) { + const klass = opts.class, + handler = tooltip._addClassHandler(klass) + + $trigger.on('pat-tippy-mount', handler) + delete opts.class + } + }, + + target() { + if (opts.hasOwnProperty('target')) { + if (opts.target === 'parent') { + opts.appendTo = 'parent' + } else if (opts.target !== 'body') { + opts.appendTo = $(opts.target)[0] + } + delete opts.target + } + } + } + + for (let arg in opts) { + switch (arg) { + case 'ajax-data-type': + arg = 'ajaxDataType' + break + case 'mark-inactive': + arg = 'markInactive' + break + } + log.debug(arg) + parsers[arg](arg) + } + + if ($trigger.attr('title')) { + $trigger.removeAttr('title') + } + return opts + }, + + setupShowEvents($trigger) { + $trigger.on('click.pat-tooltip-ng', tooltip.blockDefault) + }, + + removeShowEvents($trigger) {// jshint ignore:line + }, + + setupHideEvents($trigger) { + $trigger.on('click.pat-tooltip-ng', tooltip.blockdefault) + }, + + removeHideEvents($trigger) {// jshint ignore:line + }, + + blockDefault(event) { + if (event.preventDefault) { + event.preventDefault() + } + }, + + _mutateOptions(opts) { + // shallow copy + return Object.assign({}, opts) + }, + + _addClassHandler(klass) { + return (event, tooltip) => { $(tooltip).addClass(klass) } + }, + + _setSource(opts, source) { + opts.source = source + }, + + _onDestroy(event) { + timelog('ONDESTROY') + const $trigger = event.target + $trigger._tippy.destroy() + }, + + _onClick(instance, event) { + timelog('ONCLICK') + if (event.type === 'click') { + timelog(`it's click`) + event.stopPropagation() + event.preventDefault() + } + }, + + _onTrigger(instance, event) {// jshint ignore:line + timelog('ONTRIGGER') + }, + + _onMount(instance) { + timelog('ONMOUNT') + $(instance.reference).trigger('pat-tippy-mount', instance.popperChildren.tooltip) + }, + + _onShow(instance) {// jshint ignore:line + timelog('ONSHOW') + }, + + _onShown(instance) { + timelog('ONSHOWN') + const $trigger = $(instance.reference) + const options = $trigger.data('patterns.tooltip-ng') + tooltip.removeShowEvents($trigger) + tooltip.setupHideEvents($trigger) + if (options.markInactive) { + $trigger.removeClass('inactive').addClass('active') + } + }, + + _onHide(instance) { + timelog('ONHIDE') + const $trigger = $(instance.reference) + tooltip.removeHideEvents($trigger) + tooltip.setupShowEvents($trigger) + }, + + _onHidden(instance) { // jshint ignore:line + timelog('ONHIDDEN') + const $trigger = $(instance.reference) + const options = $trigger.data('patterns.tooltip-ng') + if (options.markInactive) { + $trigger.removeClass('active').addClass('inactive') + } + }, + + _onAjax($trigger) { + timelog('OnAJAX') + const source = $trigger.attr('href').split('#') + return instance => { + timelog('in ajax content function') + timelog(`instance.state.ajax ${JSON.stringify(instance.state.ajax)}`) + if (instance.state.ajax === undefined) { + instance.state.ajax = { + isFetching : false, + canFetch : true + } + } + + if (instance.state.ajax.isFetching || !instance.state.ajax.canFetch) { + return tooltip._onAjaxBypass() + } + + instance.state.ajax = { + isFetching: true, + canFetch: false + } + tooltip._onAjaxCallback(instance, source) + } + }, + + _onAjaxCallback(instance, src) { + timelog('AJAXCALLBACK') + const $trigger = $(instance.reference), + options = $trigger.data('patterns.tooltip-ng'), + handler = tooltip._ajaxDataTypeHandlers[options.ajaxDataType] + fetch(src[0]).then(response => { + return response.text().then(text => { + instance.setContent(handler(text, src)) + }).finally(() => { + tooltip._onAjaxContentSet(instance) + }) + }) + }, + + _onAjaxBypass() { + timelog('AJAX BYPASSED') + return undefined + }, + + _onAjaxContentSet(instance) { + timelog('AJAXCONTENTSET') + instance.state.ajax.isFetching = false + }, + + _ajaxDataTypeHandlers: { + html(text, src) { + const $tmp = $('

').append($.parseHTML(text)) + return $tmp.find(`#${src[1]}`)[0] + }, + + markdown(text, src) { + const [url, source] = src, + cfg = { url, source: `#${source}` }, + pat = Markdown.init($('
')) + return pat.renderForInjection(cfg, text)[0] + } + } + } + + registry.register(tooltip) + return tooltip +})) +/*global $, patterns, tippy */ diff --git a/src/pat/tooltip/documentation.md b/src/pat/tooltip/documentation.md index beee77870..635cac897 100644 --- a/src/pat/tooltip/documentation.md +++ b/src/pat/tooltip/documentation.md @@ -15,14 +15,14 @@ Tooltips are intended to display contextual information and function about the t ### Display -Tooltips are shown when the mouse hovers over the triggering element, -and are hidden when the mouse leaves the triggering element. +Tooltips are shown when clicking on the triggering element. -The trigger can be changed to require a click on the triggering element -by adding a `click` option. +The trigger can be changed to require the mouse to hover over the triggering element, +and to be hidden when the mouse leaves the triggering element +by adding a `hover` option. More information + class="pat-tooltip" data-pat-tooltip="hover">More information ### Positioning @@ -38,16 +38,16 @@ The position of the tip within the tooltip can be specified with a formatted as `[,preference]*`. The possible preferences are: - `tl`: tip placed at the leftmost corner of the top side of the tooltip -- `tm`: tip placed at the middle of the top side tooltip +- `tm`: tip placed at the middle of the top side of the tooltip - `tr`: tip placed at the rightmost corner of the top side of the tooltip - `rt`: tip placed at the top corner of the right side of the tooltip -- `rm`: tip placed at the middle of the right side tooltip +- `rm`: tip placed at the middle of the right side of the tooltip - `rb`: tip placed at the bottom corner of the right side of the tooltip - `bl`: tip placed at the leftmost corner of the bottom side of the tooltip -- `bm`: tip placed at the middle of the bottom side tooltip +- `bm`: tip placed at the middle of the bottom side of the tooltip - `br`: tip placed at the rightmost corner of the bottom side of the tooltip - `lt`: tip placed at the top corner of the left side of the tooltip -- `lm`: tip placed at the middle of the left side tooltip +- `lm`: tip placed at the middle of the left side of the tooltip - `lb`: tip placed at the bottom corner of the left side of the tooltip An example: @@ -60,7 +60,7 @@ This specifies that the preferred position of the tip is at the top left side of the tooltip (placing the tooltip itself on the right side of the link). Notice that the position is the first defined property so you can use shorthand syntax directly. If the tooltip does not fit at that position -then the left-middle position is tried, and then the the right-top or if all +then the left-middle position is tried, and then the right-top or if all previous options failed the middle of the right side is tried. If the tooltip does not fit at any of the preferred positions, then it will be positioned at the location that has the most space, even if this is not @@ -94,7 +94,7 @@ For example, setting closing to `sticky`: ### AJAX tooltips -The tooltip content can be loaded via an AJAX request by proving an ajax +The tooltip content can be loaded via an AJAX request by providing an ajax option: @@ -137,7 +137,7 @@ for tooltips which fetch their content with an AJAX call the tooltip may be temporarily shown with a progress indicator: More information + More information
- Demo page - - + Demo page + +
@@ -32,7 +32,7 @@

How tooltips are closed

Ajax loading

- This tooltip's content is loaded by Ajax on hover and this one's loaded by Ajax too, but on click. + This tooltip's content is loaded by Ajax on hover and this one's loaded by Ajax too, but on click.

Images

diff --git a/src/pat/tooltip/tooltip.js b/src/pat/tooltip/tooltip.js index 736a8c70a..2fde96b12 100644 --- a/src/pat/tooltip/tooltip.js +++ b/src/pat/tooltip/tooltip.js @@ -365,7 +365,7 @@ define([ // Help function to determine the best position for a tooltip. Takes // the positioning status (as generated by positionStatus) as input - // and returns a two-character position indiciator. + // and returns a two-character position indicator. findBestPosition: function(status) { var space = status.space, cls = ""; diff --git a/src/patterns.js b/src/patterns.js index a3138770f..901689942 100644 --- a/src/patterns.js +++ b/src/patterns.js @@ -65,6 +65,7 @@ define([ "pat-tabs", "pat-toggle", "pat-tooltip", + "pat-tooltip-ng", "pat-url", "pat-validation", "pat-zoom" diff --git a/style/common.css b/style/common.css index 40bb857f9..b6a5018e2 100644 --- a/style/common.css +++ b/style/common.css @@ -13,17 +13,25 @@ }*/ body { - width: auto; + /*width: auto;*/ position: relative; /*background-image: url(texture-light-grain.png);*/ font: 14px/2em "Lucida Grande", Lucida, Verdana, sans-serif; color: #525151; + /*margin: 0;*/ + /*max-width: 910px; + margin-left: auto; + margin-right: auto;*/ margin: 0; + padding: 70px 20px; + text-rendering: optimizeLegibility; +} + +.container { max-width: 910px; margin-left: auto; margin-right: auto; - padding: 70px 20px; - text-rendering: optimizeLegibility; + padding: 0 20px; } #test { diff --git a/tests/content.md b/tests/content.md new file mode 100644 index 000000000..b76fbb21e --- /dev/null +++ b/tests/content.md @@ -0,0 +1,23 @@ +## Description + +This pattern allows you to easily add tooltips with a variety of behaviours to your website. + +## Documentation + +Tooltips are intended to display contextual information and function about the trigger element. + +### Markup structure + + + +### Display + +Tooltips are shown when clicking on the triggering element. + +The trigger can be changed to require the mouse to hover over the triggering element, +and to be hidden when the mouse leaves the triggering element +by adding a `hover` option. + diff --git a/webpack/base.config.js b/webpack/base.config.js index 21133ce18..13ecd96ec 100644 --- a/webpack/base.config.js +++ b/webpack/base.config.js @@ -36,7 +36,7 @@ module.exports = { module: { rules: [ { - test: /(bumper|patterns|calendar|display-time|equaliser|focus|masonry|push_kit|scroll)\.js$/, + test: /(bumper|patterns|calendar|display-time|equaliser|focus|masonry|push_kit|scroll|tooltip-ng)\.js$/, loader: 'babel-loader', query: { presets: [["@babel/env", { @@ -97,10 +97,14 @@ module.exports = { } ] }, - { + { loader: "webpack-modernizr-loader", test: /\.modernizrrc\.js$/ - } + }, + { + test: /\.css$/, + use: [{ loader: 'style-loader' }, { loader: 'css-loader' }], + }, ] }, resolve: { @@ -128,6 +132,8 @@ module.exports = { "slick-carousel": path.resolve(__dirname, "../node_modules/slick-carousel/slick/slick.js"), "stickyfilljs": path.resolve(__dirname, "../node_modules/stickyfilljs/dist/stickyfill.js"), "text": path.resolve(__dirname, "../node_modules/requirejs-text/text.js"), + "tippy": path.resolve(__dirname, "../node_modules/tippy.js/umd/index.all.js"), + "tippy-theme.css": path.resolve(__dirname, "../node_modules/tippy.js/themes/light-border.css"), "validate": path.resolve(__dirname, "../node_modules/validate.js/validate.js"), "moment-locale-bg": path.resolve(__dirname, "../node_modules/moment/locale/bg"), "moment-locale-hr": path.resolve(__dirname, "../node_modules/moment/locale/hr"), @@ -230,6 +236,7 @@ module.exports = { "pat-tabs": path.resolve(__dirname, "../src/pat/tabs/tabs.js"), "pat-toggle": path.resolve(__dirname, "../src/pat/toggle/toggle.js"), "pat-tooltip": path.resolve(__dirname, "../src/pat/tooltip/tooltip.js"), + "pat-tooltip-ng": path.resolve(__dirname, "../src/pat/tooltip-ng/tooltip-ng.js"), "pat-validation": path.resolve(__dirname, "../src/pat/validation/validation.js"), "pat-zoom": path.resolve(__dirname, "../src/pat/zoom/zoom.js") } diff --git a/webpack/karma.config.js b/webpack/karma.config.js index 28e014268..a251882d3 100644 --- a/webpack/karma.config.js +++ b/webpack/karma.config.js @@ -29,10 +29,16 @@ module.exports = function(config) { pattern: 'src/pat/date-picker/date-picker.css', served: true, included: false + }, + { + pattern: 'tests/*', + served: true, + included: false } ], proxies: { - '/src/pat/date-picker': '/base/src/pat/date-picker' + '/src/pat/date-picker': '/base/src/pat/date-picker', + '/tests': '/base/tests', }, @@ -143,6 +149,7 @@ module.exports = function(config) { customLaunchers: { 'MyCustomLauncher': { base: 'ChromeHeadless', + flags: ['--no-sandbox'], debug: true, options: { viewportSize: {