diff --git a/package-lock.json b/package-lock.json index d4fdfd83a..b0a2b9a18 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,18 +13,18 @@ } }, "@babel/core": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.1.0.tgz", - "integrity": "sha512-9EWmD0cQAbcXSc+31RIoYgEHx3KQ2CCSMDBhnXrShWvo45TMw+3/55KVxlhkG53kw9tl87DqINgHDgFVhZJV/Q==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.1.2.tgz", + "integrity": "sha512-IFeSSnjXdhDaoysIlev//UzHZbdEmm7D0EIH2qtse9xK7mXEZQpYjs2P00XlP1qYsYvid79p+Zgg6tz1mp6iVw==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@babel/generator": "^7.0.0", - "@babel/helpers": "^7.1.0", - "@babel/parser": "^7.1.0", - "@babel/template": "^7.1.0", + "@babel/generator": "^7.1.2", + "@babel/helpers": "^7.1.2", + "@babel/parser": "^7.1.2", + "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0", + "@babel/types": "^7.1.2", "convert-source-map": "^1.1.0", "debug": "^3.1.0", "json5": "^0.5.0", @@ -34,6 +34,47 @@ "source-map": "^0.5.0" }, "dependencies": { + "@babel/generator": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.1.3.tgz", + "integrity": "sha512-ZoCZGcfIJFJuZBqxcY9OjC1KW2lWK64qrX1o4UYL3yshVhwKFYgzpWZ0vvtGMNJdTlvkw0W+HR1VnYN8q3QPFQ==", + "dev": true, + "requires": { + "@babel/types": "^7.1.3", + "jsesc": "^2.5.1", + "lodash": "^4.17.10", + "source-map": "^0.5.0", + "trim-right": "^1.0.1" + } + }, + "@babel/parser": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", + "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "dev": true + }, + "@babel/template": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", + "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.1.2", + "@babel/types": "^7.1.2" + } + }, + "@babel/types": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", + "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, "lodash": { "version": "4.17.11", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", @@ -290,14 +331,50 @@ } }, "@babel/helpers": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.1.0.tgz", - "integrity": "sha512-V1jXUTNdTpBn37wqqN73U+eBpzlLHmxA4aDaghJBggmzly/FpIJMHXse9lgdzQQT4gs5jZ5NmYxOL8G3ROc29g==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.1.2.tgz", + "integrity": "sha512-Myc3pUE8eswD73aWcartxB16K6CGmHDv9KxOmD2CeOs/FaEAQodr3VYGmlvOmog60vNQ2w8QbatuahepZwrHiA==", "dev": true, "requires": { - "@babel/template": "^7.1.0", + "@babel/template": "^7.1.2", "@babel/traverse": "^7.1.0", - "@babel/types": "^7.0.0" + "@babel/types": "^7.1.2" + }, + "dependencies": { + "@babel/parser": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.1.3.tgz", + "integrity": "sha512-gqmspPZOMW3MIRb9HlrnbZHXI1/KHTOroBwN1NcLL6pWxzqzEKGvRTq0W/PxS45OtQGbaFikSQpkS5zbnsQm2w==", + "dev": true + }, + "@babel/template": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.1.2.tgz", + "integrity": "sha512-SY1MmplssORfFiLDcOETrW7fCLl+PavlwMh92rrGcikQaRq4iWPVH0MpwPpY3etVMx6RnDjXtr6VZYr/IbP/Ag==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "@babel/parser": "^7.1.2", + "@babel/types": "^7.1.2" + } + }, + "@babel/types": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz", + "integrity": "sha512-RpPOVfK+yatXyn8n4PB1NW6k9qjinrXrRR8ugBN8fD6hCy5RXI6PSbVqpOJBO9oSaY7Nom4ohj35feb0UR9hSA==", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "lodash": "^4.17.10", + "to-fast-properties": "^2.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + } } }, "@babel/highlight": { @@ -1389,17 +1466,17 @@ "dev": true }, "autoprefixer": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.1.5.tgz", - "integrity": "sha512-kk4Zb6RUc58ld7gdosERHMF3DzIYJc2fp5sX46qEsGXQQy5bXsu8qyLjoxuY1NuQ/cJuCYnx99BfjwnRggrYIw==", + "version": "9.2.1", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.2.1.tgz", + "integrity": "sha512-qlK4GnZk8OXLK+8kBn9ttfzu2PkhRe8kVYoWcc9HsrZEMWiBkQuRYdXyJg9cIIKxfMzhh6UbvlJ1CsstMIzxwA==", "dev": true, "requires": { - "browserslist": "^4.1.0", - "caniuse-lite": "^1.0.30000884", + "browserslist": "^4.2.1", + "caniuse-lite": "^1.0.30000892", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", - "postcss": "^7.0.2", - "postcss-value-parser": "^3.2.3" + "postcss": "^7.0.5", + "postcss-value-parser": "^3.3.1" }, "dependencies": { "ansi-styles": { @@ -1411,11 +1488,16 @@ "color-convert": "^1.9.0" } }, - "caniuse-lite": { - "version": "1.0.30000884", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000884.tgz", - "integrity": "sha512-ibROerckpTH6U5zReSjbaitlH4gl5V4NWNCBzRNCa3GEDmzzkfStk+2k5mO4ZDM6pwtdjbZ3hjvsYhPGVLWgNw==", - "dev": true + "browserslist": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.2.1.tgz", + "integrity": "sha512-1oO0c7Zhejwd+LXihS89WqtKionSbz298rJZKJgfrHIZhrV8AC15gw553VcB0lcEugja7IhWD7iAlrsamfYVPA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30000890", + "electron-to-chromium": "^1.3.79", + "node-releases": "^1.0.0-alpha.14" + } }, "chalk": { "version": "2.4.1", @@ -1428,17 +1510,38 @@ "supports-color": "^5.3.0" } }, + "electron-to-chromium": { + "version": "1.3.79", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.79.tgz", + "integrity": "sha512-LQdY3j4PxuUl6xfxiFruTSlCniTrTrzAd8/HfsLEMi0PUpaQ0Iy+Pr4N4VllDYjs0Hyu2lkTbvzqlG+PX9NsNw==", + "dev": true + }, + "node-releases": { + "version": "1.0.0-alpha.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.0.0-alpha.14.tgz", + "integrity": "sha512-G8nnF9cP9QPP/jUmYWw/uUUhumHmkm+X/EarCugYFjYm2uXRMFeOD6CVT3RLdoyCvDUNy51nirGfUItKWs/S1g==", + "dev": true, + "requires": { + "semver": "^5.3.0" + } + }, "postcss": { - "version": "7.0.2", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.2.tgz", - "integrity": "sha512-fmaUY5370keLUTx+CnwRxtGiuFTcNBLQBqr1oE3WZ/euIYmGAo0OAgOhVJ3ByDnVmOR3PK+0V9VebzfjRIUcqw==", + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-7.0.5.tgz", + "integrity": "sha512-HBNpviAUFCKvEh7NZhw1e8MBPivRszIiUnhrJ+sBFVSYSqubrzwX3KG51mYgcRHX8j/cAgZJedONZcm5jTBdgQ==", "dev": true, "requires": { "chalk": "^2.4.1", "source-map": "^0.6.1", - "supports-color": "^5.4.0" + "supports-color": "^5.5.0" } }, + "postcss-value-parser": { + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-3.3.1.tgz", + "integrity": "sha512-pISE66AbVkp4fDQ7VHBwRNXzAAKJjw4Vw7nWI/+Q3vuly7SNfgYXvm6i5IgFylHGK5sP/xHAbB7N49OS4gWNyQ==", + "dev": true + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1487,9 +1590,9 @@ } }, "babel-loader": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.2.tgz", - "integrity": "sha512-Law0PGtRV1JL8Y9Wpzc0d6EE0GD7LzXWCfaeWwboUMcBWNG6gvaWTK1/+BK7a4X5EmeJiGEuDDFxUsOa8RSWCw==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/babel-loader/-/babel-loader-8.0.4.tgz", + "integrity": "sha512-fhBhNkUToJcW9nV46v8w87AJOwAJDz84c1CL57n3Stj73FANM/b9TbCUK4YhdOwEyZ+OxhYpdeZDNzSI29Firw==", "dev": true, "requires": { "find-cache-dir": "^1.0.0", @@ -1498,15 +1601,6 @@ "util.promisify": "^1.0.0" } }, - "babel-runtime": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-runtime/-/babel-runtime-6.26.0.tgz", - "integrity": "sha1-llxwWGaOgrVde/4E/yM3vItWR/4=", - "requires": { - "core-js": "^2.4.0", - "regenerator-runtime": "^0.11.0" - } - }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", @@ -1583,7 +1677,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "optional": true, "requires": { "tweetnacl": "^0.14.3" } @@ -1818,11 +1911,18 @@ } }, "buefy": { - "version": "0.6.7", - "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.6.7.tgz", - "integrity": "sha512-/d8srEpXAXWQjquHNP3ic9AVzwj8ar+jHfc7YjbspHT1AVeY3CDmzY2R1Am8ICnhioKAjRUfIie2/I9DiytXMQ==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/buefy/-/buefy-0.7.0.tgz", + "integrity": "sha512-1SA7x6GimoJPYGJurNj7LfWdBl86zEd8g+ff6sm8yMkkDcn9P8UbAOIW7QRY3yR4V7Gde8ml7OZvvmgNQMGKbg==", "requires": { "bulma": "0.7.1" + }, + "dependencies": { + "bulma": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.1.tgz", + "integrity": "sha512-wRSO2LXB+qI9Pyz2id+uZr4quz5aftSN7Ay1ysr1+krzVp3utD+Ci4CeKuZdrYGc800t65b7heXBL6qw2Wo/lQ==" + } } }, "buffer": { @@ -1866,9 +1966,9 @@ "dev": true }, "bulma": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.1.tgz", - "integrity": "sha512-wRSO2LXB+qI9Pyz2id+uZr4quz5aftSN7Ay1ysr1+krzVp3utD+Ci4CeKuZdrYGc800t65b7heXBL6qw2Wo/lQ==" + "version": "0.7.2", + "resolved": "https://registry.npmjs.org/bulma/-/bulma-0.7.2.tgz", + "integrity": "sha512-6JHEu8U/1xsyOst/El5ImLcZIiE2JFXgvrz8GGWbnDLwTNRPJzdAM0aoUM1Ns0avALcVb6KZz9NhzmU53dGDcQ==" }, "bytes": { "version": "3.0.0", @@ -1956,7 +2056,7 @@ }, "camelcase-keys": { "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", + "resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", "integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=", "requires": { "camelcase": "^2.0.0", @@ -1970,6 +2070,12 @@ } } }, + "caniuse-lite": { + "version": "1.0.30000892", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30000892.tgz", + "integrity": "sha512-X9rxMaWZNbJB5qjkDqPtNv/yfViTeUL6ILk0QJNxLV3OhKC5Acn5vxsuUvllR6B48mog8lmS+whwHq/QIYSL9w==", + "dev": true + }, "caseless": { "version": "0.12.0", "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", @@ -2141,9 +2247,9 @@ "dev": true }, "combined-stream": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", - "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", "requires": { "delayed-stream": "~1.0.0" } @@ -2320,11 +2426,6 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", "dev": true }, - "core-js": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.5.1.tgz", - "integrity": "sha1-rmh03GaTd4m4B1T/VCjfZoGcpQs=" - }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", @@ -2831,7 +2932,6 @@ "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "optional": true, "requires": { "jsbn": "~0.1.0", "safer-buffer": "^2.1.0" @@ -2850,9 +2950,9 @@ "dev": true }, "element-theme-chalk": { - "version": "2.4.7", - "resolved": "https://registry.npmjs.org/element-theme-chalk/-/element-theme-chalk-2.4.7.tgz", - "integrity": "sha512-uxAvOnAAGMiCIoKlO6yR/WEibTB+bb21VJGeN4ag8mEO1KbB528Rj+1R7A50YEdZcxU9NCHNd0HeBdy/os+35A==", + "version": "2.4.8", + "resolved": "https://registry.npmjs.org/element-theme-chalk/-/element-theme-chalk-2.4.8.tgz", + "integrity": "sha512-AIu7RC+JG/rYOpdVWiI3ZKN9GuKBKu+Mr1DrfYWoPJ4LD9rxpqveyFocT+DY9bJsedY/LWxluD1tid7JdnUchQ==", "dev": true }, "elliptic": { @@ -2933,14 +3033,14 @@ } }, "es-to-primitive": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.1.1.tgz", - "integrity": "sha1-RTVSSKiJeQNLZ5Lhm7gfK3l13Q0=", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.0.tgz", + "integrity": "sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg==", "dev": true, "requires": { - "is-callable": "^1.1.1", + "is-callable": "^1.1.4", "is-date-object": "^1.0.1", - "is-symbol": "^1.0.1" + "is-symbol": "^1.0.2" } }, "escape-html": { @@ -2955,16 +3055,16 @@ "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" }, "eslint": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.6.0.tgz", - "integrity": "sha512-/eVYs9VVVboX286mBK7bbKnO1yamUy2UCRjiY6MryhQL2PaaXCExsCQ2aO83OeYRhU2eCU/FMFP+tVMoOrzNrA==", + "version": "5.7.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.7.0.tgz", + "integrity": "sha512-zYCeFQahsxffGl87U2aJ7DPyH8CbWgxBC213Y8+TCanhUTf2gEvfq3EKpHmEcozTLyPmGe9LZdMAwC/CpJBM5A==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.5.3", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", - "debug": "^3.1.0", + "debug": "^4.0.1", "doctrine": "^2.1.0", "eslint-scope": "^4.0.0", "eslint-utils": "^1.3.1", @@ -2991,19 +3091,19 @@ "path-is-inside": "^1.0.2", "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^2.0.0", + "regexpp": "^2.0.1", "require-uncached": "^1.0.3", "semver": "^5.5.1", "strip-ansi": "^4.0.0", "strip-json-comments": "^2.0.1", - "table": "^4.0.3", + "table": "^5.0.2", "text-table": "^0.2.0" }, "dependencies": { "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -3038,17 +3138,13 @@ "supports-color": "^5.3.0" } }, - "cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "debug": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.0.tgz", + "integrity": "sha512-heNPJUJIqC+xB6ayLAMHaIrmN9HKa7aQO8MGqKpvCA+uJYVcvR6l5kgdrhRuwPFHU7P5/A1w0BjByPHwpfTDKg==", "dev": true, "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" + "ms": "^2.1.1" } }, "fast-deep-equal": { @@ -3063,6 +3159,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "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==", + "dev": true + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -3070,9 +3172,9 @@ "dev": true }, "semver": { - "version": "5.5.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.1.tgz", - "integrity": "sha512-PqpAxfrEhlSUWge8dwIp4tZnQ25DIOthpiaHNIthsjEFQD6EvqUKUDM7L8O2rShkFccYo1VjJR0coWfNkCubRw==", + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", "dev": true }, "strip-ansi": { @@ -3706,12 +3808,12 @@ "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" }, "form-data": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", - "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", "requires": { "asynckit": "^0.4.0", - "combined-stream": "1.0.6", + "combined-stream": "^1.0.6", "mime-types": "^2.1.12" } }, @@ -4439,9 +4541,9 @@ }, "dependencies": { "lodash": { - "version": "4.17.10", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", - "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" } } }, @@ -4450,11 +4552,6 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.11.tgz", "integrity": "sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg=" }, - "hammerjs": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", - "integrity": "sha1-BO93hiz/K7edMPdpIJWTAiK/YPE=" - }, "handle-thing": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-1.2.5.tgz", @@ -4467,11 +4564,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.0.tgz", + "integrity": "sha512-+qnmNjI4OfH2ipQ9VQOw23bBd/ibtfbVdK2fYbY4acTDqKTW/YDp9McimZdDbG8iV9fZizUqQMD5xvriB146TA==", "requires": { - "ajv": "^5.1.0", + "ajv": "^5.3.0", "har-schema": "^2.0.0" } }, @@ -4498,6 +4595,12 @@ "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", "dev": true }, + "has-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz", + "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", + "dev": true + }, "has-unicode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", @@ -4579,9 +4682,9 @@ } }, "hosted-git-info": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", - "integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==" + "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==" }, "hpack.js": { "version": "2.1.6", @@ -5017,7 +5120,7 @@ }, "is-builtin-module": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", + "resolved": "http://registry.npmjs.org/is-builtin-module/-/is-builtin-module-1.0.0.tgz", "integrity": "sha1-VAVy0096wxGfj3bDDLwbHgN6/74=", "requires": { "builtin-modules": "^1.0.0" @@ -5204,10 +5307,13 @@ "dev": true }, "is-symbol": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.1.tgz", - "integrity": "sha1-PMWfAAJRlLarLjjbrmaJJWtmBXI=", - "dev": true + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.2.tgz", + "integrity": "sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw==", + "dev": true, + "requires": { + "has-symbols": "^1.0.0" + } }, "is-typedarray": { "version": "1.0.0", @@ -5253,9 +5359,9 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "js-base64": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.8.tgz", - "integrity": "sha512-hm2nYpDrwoO/OzBhdcqs/XGT6XjSuSSCVEpia+Kl2J6x4CYt5hISlVL/AYU1khoDXv0AQVgxtdJySb9gjAn56Q==" + "version": "2.4.9", + "resolved": "https://registry.npmjs.org/js-base64/-/js-base64-2.4.9.tgz", + "integrity": "sha512-xcinL3AuDJk7VSzsHgb9DvvIXayBbadtMZ4HFPx8rUszbW1MuNMlwYVC4zzCZ6e1sqZpnNS5ZFYOhXqA39T7LQ==" }, "js-levenshtein": { "version": "1.1.3", @@ -5281,8 +5387,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "jsesc": { "version": "2.5.1", @@ -5372,7 +5477,7 @@ }, "load-json-file": { "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "resolved": "http://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "requires": { "graceful-fs": "^4.1.2", @@ -5631,7 +5736,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=" } } @@ -5932,7 +6037,7 @@ "dependencies": { "semver": { "version": "5.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", + "resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz", "integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=" } } @@ -5978,9 +6083,9 @@ } }, "node-sass": { - "version": "4.9.3", - "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.3.tgz", - "integrity": "sha512-XzXyGjO+84wxyH7fV6IwBOTrEBe2f0a6SBze9QWWYR/cL74AcQUks2AsqcCZenl/Fp/JVbuEaLpgrLtocwBUww==", + "version": "4.9.4", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.9.4.tgz", + "integrity": "sha512-MXyurANsUoE4/6KmfMkwGcBzAnJQ5xJBGW7Ei6ea8KnUKuzHr/SguVBIi3uaUAHtZCPUYkvlJ3Ef5T5VAwVpaA==", "requires": { "async-foreach": "^0.1.3", "chalk": "^1.1.1", @@ -5997,7 +6102,7 @@ "nan": "^2.10.0", "node-gyp": "^3.8.0", "npmlog": "^4.0.0", - "request": "2.87.0", + "request": "^2.88.0", "sass-graph": "^2.2.4", "stdout-stream": "^1.4.0", "true-case-path": "^1.0.2" @@ -6080,9 +6185,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" }, "object-assign": { "version": "4.1.1", @@ -6243,7 +6348,7 @@ }, "os-locale": { "version": "1.4.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "resolved": "http://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", "requires": { "lcid": "^1.0.0" @@ -6769,9 +6874,9 @@ "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=" }, "progress": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.0.tgz", - "integrity": "sha1-ihvjZr+Pwj2yvSPxDG/pILQ4nR8=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.1.tgz", + "integrity": "sha512-OE+a6vzqazc+K6LxJrX5UPyKFvGnL5CYmq2jFGNIBWHpc4QyE49/YOumcrpQFJpfejmvRtbJzgO1zPmMCqlbBg==", "dev": true }, "promise-inflight": { @@ -6810,6 +6915,11 @@ "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" }, + "psl": { + "version": "1.1.29", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.29.tgz", + "integrity": "sha512-AeUmQ0oLN02flVHXWh9sSJF7mcdFq0ppid/JkErufc3hGIV/AMa8Fo9VgDo/cT2jFdOWoFvHp90qqBH54W+gjQ==" + }, "public-encrypt": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", @@ -7051,11 +7161,6 @@ } } }, - "regenerator-runtime": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.11.0.tgz", - "integrity": "sha512-/aA0kLeRb5N9K0d4fw7ooEbI+xDe+DKD499EQqygGqeS8N3xto15p09uY2xj7ixP81sNPXvRLnAQIqdVStgb1A==" - }, "regenerator-transform": { "version": "0.13.3", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.13.3.tgz", @@ -7076,9 +7181,9 @@ } }, "regexpp": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.0.tgz", - "integrity": "sha512-g2FAVtR8Uh8GO1Nv5wpxW7VFVwHcCEr4wyA8/MHiRkO8uHoR5ntAA8Uq3P1vvMTX/BeQiRVSpDGLd+Wn5HNOTA==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, "regexpu-core": { @@ -7174,30 +7279,55 @@ } }, "request": { - "version": "2.87.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.87.0.tgz", - "integrity": "sha512-fcogkm7Az5bsS6Sl0sibkbhcKsnyon/jV1kF3ajGmF0c8HrttdKTPRT9hieOaQHA5HEq6r8OyWOo/o781C1tNw==", + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "requires": { "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", + "aws4": "^1.8.0", "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "tough-cookie": "~2.3.3", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "uuid": "^3.3.2" + }, + "dependencies": { + "mime-db": { + "version": "1.36.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.36.0.tgz", + "integrity": "sha512-L+xvyD9MkoYMXb1jAmzI/lWYAxAMCPvIBSWur0PZ5nOf5euahRLVqH//FKW9mWp2lkqUgYiXPgkzfMUFi4zVDw==" + }, + "mime-types": { + "version": "2.1.20", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.20.tgz", + "integrity": "sha512-HrkrPaP9vGuWbLK1B1FfgAkbqNjIuy4eHlIYnFi7kamZyLLrGlo2mpcx0bBmNpKqBtYtAfGbodDddIgddSJC2A==", + "requires": { + "mime-db": "~1.36.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + } } }, "require-directory": { @@ -7323,9 +7453,9 @@ } }, "rxjs": { - "version": "6.3.2", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.2.tgz", - "integrity": "sha512-hV7criqbR0pe7EeL3O66UYVg92IR0XsA97+9y+BWTePK9SKmEI5Qd3Zj6uPnGkNzXsBywBQWTvujPl+1Kn9Zjw==", + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.3.3.tgz", + "integrity": "sha512-JTWmoY9tWCs7zvIk/CvRjhjGaOd+OVBM987mxFo+OW66cGpdKjZcpmc74ES1sB//7Kl/PAe8+wEakuhG4pcgOw==", "dev": true, "requires": { "tslib": "^1.9.0" @@ -7880,22 +8010,32 @@ "dev": true }, "spdx-correct": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", - "integrity": "sha1-SzBz2TP/UfORLwOsVRlJikFQ20A=", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.0.2.tgz", + "integrity": "sha512-q9hedtzyXHr5S0A1vEPoK/7l8NpfkFYTq6iCY+Pno2ZbdZR6WexZFtqeVGkGxW3TEJMN914Z55EnAGMmenlIQQ==", "requires": { - "spdx-license-ids": "^1.0.2" + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" } }, + "spdx-exceptions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.2.0.tgz", + "integrity": "sha512-2XQACfElKi9SlVb1CYadKDXvoajPgBVPn/gOQLrTvHdElaVhr7ZEbqJaRnJLVNeaI4cMEAgVCeBMKF6MWRDCRA==" + }, "spdx-expression-parse": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz", - "integrity": "sha1-m98vIOH0DtRH++JzJmGR/O1RYmw=" + "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==", + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } }, "spdx-license-ids": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz", - "integrity": "sha1-yd96NCRZSt5r0RkA1ZZpbcBrrFc=" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.1.tgz", + "integrity": "sha512-TfOfPcYGBB5sDuPn3deByxPhmfegAhpDYKSOXZQN81Oyrrif8ZCodOLzK3AesELnCx03kikhyDwh0pfvvQvF8w==" }, "spdy": { "version": "3.4.7", @@ -7964,9 +8104,9 @@ "dev": true }, "sshpk": { - "version": "1.14.2", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.14.2.tgz", - "integrity": "sha1-xvxhZIo9nE52T9P8306hBeSSupg=", + "version": "1.15.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.15.1.tgz", + "integrity": "sha512-mSdgNUaidk+dRU5MhYtN9zebdzF2iG0cNPWy8HG+W8y+fT1JnSkh0fzzpjOa0L7P8i1Rscz38t0h4gPcKz43xA==", "requires": { "asn1": "~0.2.3", "assert-plus": "^1.0.0", @@ -8021,9 +8161,9 @@ "dev": true }, "stdout-stream": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.0.tgz", - "integrity": "sha1-osfIWH5U2UJ+qe2zrD8s1SLfN4s=", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/stdout-stream/-/stdout-stream-1.4.1.tgz", + "integrity": "sha512-j4emi03KXqJWcIeF8eIXkjMFN1Cmb8gUlDYGeBALLPo5qdyTfA9bOtl8m33lRoC+vFMkP3gl0WsDr6+gzxbbTA==", "requires": { "readable-stream": "^2.0.1" } @@ -8154,13 +8294,65 @@ "dev": true }, "style-loader": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.0.tgz", - "integrity": "sha512-uCcN7XWHkqwGVt7skpInW6IGO1tG6ReyFQ1Cseh0VcN6VdcFQi62aG/2F3Y9ueA8x4IVlfaSUxpmQXQD9QrEuQ==", + "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": "^0.4.5" + "schema-utils": "^1.0.0" + }, + "dependencies": { + "ajv": { + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", + "dev": true, + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "schema-utils": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", + "integrity": "sha512-i27Mic4KovM/lnGsy8whRCHhc7VicJajAjTrYg11K9zfZXnYIt4k5F+kZkwjnrhKzLic/HLU4j11mjsz2G/75g==", + "dev": true, + "requires": { + "ajv": "^6.1.0", + "ajv-errors": "^1.0.0", + "ajv-keywords": "^3.1.0" + } + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + } } }, "supports-color": { @@ -8183,23 +8375,21 @@ "integrity": "sha1-fZGSIB7X+Lv2FZisc2YNj/zDtXg=" }, "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/table/-/table-5.1.0.tgz", + "integrity": "sha512-e542in22ZLhD/fOIuXs/8yDZ9W61ltF8daM88rkRNtgTIct+vI2fTnAyu/Db2TCfEcI8i7mjZz6meLq0nW7TYg==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", + "ajv": "^6.5.3", + "lodash": "^4.17.10", "slice-ansi": "1.0.0", "string-width": "^2.1.1" }, "dependencies": { "ajv": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.3.tgz", - "integrity": "sha512-LqZ9wY+fx3UMiiPd741yB2pj3hhil+hQc8taf4o2QGRFpWgZ2V5C8HA165DY9sS3fJwsk7uT7ZlFEyC3Ig3lLg==", + "version": "6.5.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.5.4.tgz", + "integrity": "sha512-4Wyjt8+t6YszqaXnLDfMmG/8AlO5Zbcsy3ATHncCzjW/NoPzAId8AK6749Ybjmdt+kUY1gP60fCu46oDxPv/mg==", "dev": true, "requires": { "fast-deep-equal": "^2.0.1", @@ -8214,26 +8404,6 @@ "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", "dev": true }, - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "chalk": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", - "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", @@ -8252,6 +8422,12 @@ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==", + "dev": true + }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", @@ -8277,15 +8453,6 @@ "ansi-regex": "^3.0.0" } }, - "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" - } - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", @@ -8321,7 +8488,7 @@ }, "through": { "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "resolved": "http://registry.npmjs.org/through/-/through-2.3.8.tgz", "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", "dev": true }, @@ -8414,10 +8581,11 @@ } }, "tough-cookie": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.4.tgz", - "integrity": "sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" } }, @@ -8433,25 +8601,11 @@ "dev": true }, "true-case-path": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.2.tgz", - "integrity": "sha1-fskRMJJHZsf1c74wIMNPj9/QDWI=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/true-case-path/-/true-case-path-1.0.3.tgz", + "integrity": "sha512-m6s2OdQe5wgpFMC+pAJ+q9djG82O2jcHPOI6RNg1yy9rCYR+WD6Nbpl32fDpfC56nirdRy+opFa/Vk7HYhqaew==", "requires": { - "glob": "^6.0.4" - }, - "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } + "glob": "^7.1.2" } }, "tslib": { @@ -8477,8 +8631,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "type-check": { "version": "0.3.2", @@ -8912,7 +9065,8 @@ "uuid": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==" + "integrity": "sha512-jZnMwlb9Iku/O3smGWvZhauCf6cvvpKi4BKRiliS3cxnI+Gz9j5MEpTz2UFuXiKPJocb7gnsLHwiS05ige5BEA==", + "dev": true }, "v-tooltip": { "version": "2.0.0-rc.33", @@ -8931,12 +9085,12 @@ "dev": true }, "validate-npm-package-license": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz", - "integrity": "sha1-KAS6vnEq0zeUWaz74kdGqywwP7w=", + "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==", "requires": { - "spdx-correct": "~1.0.0", - "spdx-expression-parse": "~1.0.0" + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" } }, "vary": { @@ -8979,9 +9133,9 @@ } }, "vue-custom-element": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/vue-custom-element/-/vue-custom-element-3.2.5.tgz", - "integrity": "sha512-hMdfV0V7CCixn5soADKSsxY0riLu61x8TSk8qcR2Oue2rvXtWC7+ZWNhngNb23kC7jdwGoqEgyxyG3s3Dnr76w==", + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/vue-custom-element/-/vue-custom-element-3.2.6.tgz", + "integrity": "sha512-tNWsax/Rq4Sr1QHj0pi4CWaBnAYfva75rlQg2fBKGja35+6AmdcZre/ztoiBWCSlSJ7APsMakG5R0A+GWBAc4Q==", "dev": true }, "vue-eslint-parser": { @@ -9111,15 +9265,6 @@ "resolved": "https://registry.npmjs.org/vue-the-mask/-/vue-the-mask-0.11.1.tgz", "integrity": "sha512-UquSfnSWejD0zAfcD+3jJ1chUAkOAyoxya9Lxh9acCRtrlmGcAIvd0cQYraWqKenbuZJUdum+S174atv2AuEHQ==" }, - "vue2-hammer": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/vue2-hammer/-/vue2-hammer-2.0.1.tgz", - "integrity": "sha512-JDNHFKgc0tPGyreFfzC1cBIAtAb2lXr7b98zqHErgM/OeDlGa9Axv0iUc6UfvZ06ZuG98D2mvkG1G3tBQIzmXg==", - "requires": { - "babel-runtime": "^6.26.0", - "hammerjs": "^2.0.8" - } - }, "vuedraggable": { "version": "2.16.0", "resolved": "https://registry.npmjs.org/vuedraggable/-/vuedraggable-2.16.0.tgz", @@ -9339,9 +9484,9 @@ } }, "webpack-cli": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.1.tgz", - "integrity": "sha512-th5EUyVeGcAAVlFOcJg11fapD/xoLRE4j/eSfrmMAo3olPjvB7lgEPUtCbRP0OGmstvnQBl4VZP+zluXWDiBxg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz", + "integrity": "sha512-Cnqo7CeqeSvC6PTdts+dywNi5CRlIPbLx1AoUPK2T6vC1YAugMG3IOoO9DmEscd+Dghw7uRlnzV1KwOe5IrtgQ==", "dev": true, "requires": { "chalk": "^2.4.1", diff --git a/package.json b/package.json index 296a1df4d..8513b2a0d 100644 --- a/package.json +++ b/package.json @@ -9,11 +9,11 @@ "dependencies": { "@brainhubeu/react-carousel": "^1.10.1", "axios": "^0.18.0", - "buefy": "^0.6.7", - "bulma": "^0.7.1", + "buefy": "^0.7.0", + "bulma": "^0.7.2", "mdi": "^2.2.43", "moment": "^2.22.2", - "node-sass": "^4.9.3", + "node-sass": "^4.9.4", "qs": "^6.5.2", "react": "^16.5.2", "react-dom": "^16.5.2", @@ -24,32 +24,36 @@ "vue-masonry-css": "^1.0.3", "vue-router": "^3.0.1", "vue-the-mask": "^0.11.1", - "vue2-hammer": "^2.0.1", "vuedraggable": "^2.16.0", "vuex": "^3.0.1" }, "devDependencies": { - "@babel/core": "^7.1.0", + "@babel/core": "^7.1.2", "@babel/preset-env": "^7.1.0", +<<<<<<< HEAD "@babel/preset-react": "^7.0.0", "autoprefixer": "^9.1.5", "babel-loader": "^8.0.2", +======= + "autoprefixer": "^9.2.1", + "babel-loader": "^8.0.4", +>>>>>>> develop "cross-env": "^5.2.0", "css-loader": "^1.0.0", - "element-theme-chalk": "^2.4.7", - "eslint": "^5.6.0", + "element-theme-chalk": "^2.4.8", + "eslint": "^5.7.0", "eslint-loader": "^2.1.1", "eslint-plugin-vue": "^4.7.1", "file-loader": "^2.0.0", "postcss-loader": "^3.0.0", "sass-loader": "^7.1.0", - "style-loader": "^0.23.0", + "style-loader": "^0.23.1", "uglifyjs-webpack-plugin": "^2.0.1", - "vue-custom-element": "^3.2.5", + "vue-custom-element": "^3.2.6", "vue-loader": "^15.4.2", "vue-template-compiler": "^2.5.17", "webpack": "^4.20.2", - "webpack-cli": "^3.1.1", + "webpack-cli": "^3.1.2", "webpack-dev-server": "^3.1.9" } } diff --git a/src/admin/components/advanced-search/advanced-search.vue b/src/admin/components/advanced-search/advanced-search.vue index 82c118a25..45037053e 100644 --- a/src/admin/components/advanced-search/advanced-search.vue +++ b/src/admin/components/advanced-search/advanced-search.vue @@ -638,6 +638,9 @@ } } }, + }, + beforeDestroy() { + this.$root.$off('metadatumUpdated'); } } diff --git a/src/admin/components/edition/filter-edition-form.vue b/src/admin/components/edition/filter-edition-form.vue index 3768d2da9..d822b559a 100644 --- a/src/admin/components/edition/filter-edition-form.vue +++ b/src/admin/components/edition/filter-edition-form.vue @@ -297,13 +297,6 @@ export default { diff --git a/src/admin/components/edition/item-edition-form.vue b/src/admin/components/edition/item-edition-form.vue index 9a5ba479a..f5f5b4e74 100644 --- a/src/admin/components/edition/item-edition-form.vue +++ b/src/admin/components/edition/item-edition-form.vue @@ -1,6 +1,7 @@ @@ -500,7 +579,11 @@ export default { itemId: Number, item: {}, collectionId: Number, + sequenceId: Number, + itemPosition: Number, isCreatingNewItem: false, + isOnSequenceEdit: false, + sequenceRightDirection: false, isLoading: false, isMetadataColumnCompressed: false, metadatumCollapses: [], @@ -552,12 +635,51 @@ export default { }, lastUpdated() { return this.getLastUpdated(); + }, + group() { + return this.getGroup(); + }, + itemIdInSequence() { + return this.getItemIdInSequence(); } }, components: { FileItem, DocumentItem }, + watch: { + '$route.params.itemPosition'(newItemPosition, oldItemPosition) { + if (oldItemPosition == undefined) + this.sequenceRightDirection; + else if (oldItemPosition == newItemPosition) + this.sequenceRightDirection = undefined; + + this.itemPosition = Number(newItemPosition); + + // Saves current itemPosition to user prefs + this.$userPrefs.set('sequence_' + this.sequenceId + '_position', this.itemPosition); + + // Clear form variables + this.cleanMetadata(); + eventBus.clearAllErrors(); + this.formErrorMessage = ''; + + this.isLoading = true; + + // Obtains current Item ID from Sequence + this.fetchItemIdInSequence({ collectionId: this.collectionId, sequenceId: this.sequenceId, itemPosition: this.itemPosition }) + .then(() => { + this.itemId = this.itemIdInSequence; + this.loadExistingItem(); + }) + .catch(() => { + this.isLoading = false; + }); + + // Obtains current Sequence Group Info + this.fetchGroup({ collectionId: this.collectionId, groupId: this.sequenceId }); + } + }, methods: { ...mapActions('item', [ 'sendItem', @@ -583,6 +705,14 @@ export default { 'fetchCollectionAllowComments', 'deleteItem', ]), + ...mapActions('bulkedition', [ + 'fetchItemIdInSequence', + 'fetchGroup' + ]), + ...mapGetters('bulkedition', [ + 'getItemIdInSequence', + 'getGroup' + ]), onSubmit(status) { // Puts loading on Item edition this.isLoading = true; @@ -607,10 +737,12 @@ export default { this.isLoading = false; - if (this.form.status != 'trash') - this.$router.push(this.$routerHelper.getItemPath(this.form.collectionId, this.itemId)); - else - this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId)); + if (!this.isOnSequenceEdit) { + if (this.form.status != 'trash') + this.$router.push(this.$routerHelper.getItemPath(this.form.collectionId, this.itemId)); + else + this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId)); + } }) .catch((errors) => { for (let error of errors.errors) { @@ -831,30 +963,13 @@ export default { title: this.$i18n.get('label_warning'), message: this.isOnTrash ? this.$i18n.get('info_warning_item_delete') : this.$i18n.get('info_warning_item_trash'), onConfirm: () => { - this.deleteItem({ itemId: this.itemId, isPermanently: true }) + this.deleteItem({ itemId: this.itemId, isPermanently: true }); this.$router.push(this.$routerHelper.getCollectionPath(this.form.collectionId)) } } }); - } - }, - created(){ - // Obtains collection ID - this.cleanMetadata(); - eventBus.clearAllErrors(); - this.formErrorMessage = ''; - this.collectionId = this.$route.params.collectionId; - this.form.collectionId = this.collectionId; - - if (this.$route.fullPath.split("/").pop() == "new") { - this.isCreatingNewItem = true; - this.createNewItem(); - } else if (this.$route.fullPath.split("/").pop() == "edit") { - this.isLoading = true; - - // Obtains current Item ID from URL - this.itemId = this.$route.params.itemId; - + }, + loadExistingItem() { // Initializes Media Frames now that itemId exists this.initializeMediaFrames(); @@ -887,6 +1002,62 @@ export default { // Fetch current existing attachments this.fetchAttachments(this.itemId); + }, + onNextInSequence() { + this.sequenceRightDirection = true; + this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, this.sequenceId, this.itemPosition + 1)); + }, + onPrevInSequence() { + this.sequenceRightDirection = false; + this.$router.push(this.$routerHelper.getCollectionSequenceEditPath(this.collectionId, this.sequenceId, this.itemPosition - 1)); + } + }, + created(){ + // Obtains collection ID + this.cleanMetadata(); + eventBus.clearAllErrors(); + this.formErrorMessage = ''; + this.collectionId = this.$route.params.collectionId; + this.form.collectionId = this.collectionId; + + // CREATING NEW SINGLE ITEM + if (this.$route.fullPath.split("/").pop() == "new") { + this.isCreatingNewItem = true; + this.createNewItem(); + + // EDITING EXISTING ITEM + } else if (this.$route.fullPath.split("/").pop() == "edit") { + this.isLoading = true; + + // Obtains current Item ID from URL + this.itemId = this.$route.params.itemId; + this.loadExistingItem(); + + // EDITING EXISTING SEQUENCE + } else if (this.$route.params.collectionId != undefined && this.$route.params.sequenceId != undefined){ + this.isLoading = true; + + this.sequenceId = this.$route.params.sequenceId; + let savedItemPosition = (this.$userPrefs.get('sequence_' + this.sequenceId + '_position') != undefined ? Number(this.$userPrefs.get('sequence_' + this.sequenceId + '_position')) : 1); + this.itemPosition = this.$route.params.itemPosition != undefined ? Number(this.$route.params.itemPosition) : savedItemPosition; + + this.isOnSequenceEdit = true; + + // Saves current itemPosition to user prefs + this.$userPrefs.set('sequence_' + this.sequenceId + '_position', this.itemPosition); + + // Obtains current Item ID from Sequence + this.fetchItemIdInSequence({ collectionId: this.collectionId, sequenceId: this.sequenceId, itemPosition: this.itemPosition }) + .then(() => { + this.itemId = this.itemIdInSequence; + this.loadExistingItem(); + }) + .catch(() => { + this.isLoading = false; + }); + + // Obtains current Sequence Group Info + this.fetchGroup({ collectionId: this.collectionId, groupId: this.sequenceId }); } // Obtains collection name @@ -902,13 +1073,6 @@ export default { // Sets feedback variables eventBus.$on('isUpdatingValue', (status) => { this.isUpdatingValues = status; - // if (this.isUpdatingValues) { - // this.$toast.open({ - // duration: 2000, - // message: this.$i18n.get('info_updating_metadata_values'), - // position: 'is-bottom', - // }) - // } }); eventBus.$on('hasErrorsOnForm', (hasErrors) => { if (hasErrors) @@ -918,6 +1082,10 @@ export default { }); this.cleanLastUpdated(); }, + beforeDestroy () { + eventBus.$off('isUpdatingValue'); + eventBus.$off('hasErrorsOnForm'); + }, beforeRouteLeave ( to, from, next ) { if (this.item.status == 'auto-draft') { this.$modal.open({ @@ -1179,6 +1347,9 @@ export default { margin-left: 16px; margin-right: 6px; } + .is-outlined { + border: none; + } } @keyframes blink { @@ -1206,6 +1377,34 @@ export default { margin-top: 0; margin-left: 24px; } + + .sequence-progress { + height: 5px; + background: $turquoise5; + width: 0%; + position: absolute; + top: 0; + left: 0; + transition: width 0.2s; + } + .sequence-progress-background { + height: 5px; + background: $gray3; + width: 100%; + position: absolute; + top: 0; + left: 0; + } + + .sequence-button { + background-color: transparent; + color: $turquoise5; + border: none; + + .icon { + margin-top: 0.3rem; + } + } } diff --git a/src/admin/components/lists/basic-term-item.vue b/src/admin/components/lists/basic-term-item.vue index 3a166ffdf..c53ae4411 100644 --- a/src/admin/components/lists/basic-term-item.vue +++ b/src/admin/components/lists/basic-term-item.vue @@ -101,20 +101,28 @@ export default { }, } }); + }, + eventOnEditTerm() { + this.isEditingTerm = true; + }, + eventOnTermEditionSaved() { + this.isEditingTerm = false; + this.term.opened = false; + }, + eventOnTermEditionCanceled() { + this.isEditingTerm = false; + this.term.opened = false; } }, created() { - this.$termsListBus.$on('editTerm', () => { - this.isEditingTerm = true; - }); - this.$termsListBus.$on('termEditionSaved', () => { - this.isEditingTerm = false; - this.term.opened = false; - }); - this.$termsListBus.$on('termEditionCanceled', () => { - this.isEditingTerm = false; - this.term.opened = false; - }); + this.$termsListBus.$on('editTerm', this.eventOnEditTerm); + this.$termsListBus.$on('termEditionSaved', this.eventOnTermEditionSaved); + this.$termsListBus.$on('termEditionCanceled', this.eventOnTermEditionCanceled); + }, + beforeDestroy() { + this.$termsListBus.$off('editTerm', this.eventOnEditTerm); + this.$termsListBus.$off('termEditionSaved', this.eventOnTermEditionSaved); + this.$termsListBus.$off('termEditionCanceled', this.eventOnTermEditionCanceled); } } diff --git a/src/admin/components/lists/filters-list.vue b/src/admin/components/lists/filters-list.vue index 3f9caed47..f7e099ac3 100644 --- a/src/admin/components/lists/filters-list.vue +++ b/src/admin/components/lists/filters-list.vue @@ -35,7 +35,7 @@
{ this.isUpdatingFiltersOrder = false; }); }, addMetadatumViaButton(metadatumType, metadatumIndex) { - this.availableMetadatumList.splice(metadatumIndex, 1); - let lastIndex = this.activeFilterList.length; - // Updates store with temporary Filter - this.addTemporaryFilter(metadatumType); + if (this.isSelectingFilterType == false) { + this.isSelectingFilterType = true; + this.availableMetadatumList.splice(metadatumIndex, 1); + let lastIndex = this.activeFilterList.length; - this.addNewFilter(metadatumType, lastIndex); + // Updates store with temporary Filter + this.addTemporaryFilter(metadatumType); + + this.addNewFilter(metadatumType, lastIndex); + } + }, addNewFilter(choosenMetadatum, newIndex) { this.choosenMetadatum = choosenMetadatum; @@ -348,7 +357,6 @@ export default { } }, createChoosenFilter() { - this.sendFilter({ collectionId: this.collectionId, metadatumId: this.choosenMetadatum.id, @@ -391,15 +399,17 @@ export default { this.updateFiltersOrder(); }, confirmSelectedFilterType() { + this.isSelectingFilterType = false; this.createChoosenFilter(); }, cancelFilterTypeSelection() { - this.availableMetadatumList.push(this.choosenMetadatum); - this.choosenMetadatum = {}; - this.allowedFilterTypes = []; - this.selectedFilterType = {}; - this.deleteTemporaryFilter(this.newIndex); - this.newIndex = 0; + this.isSelectingFilterType = false; + this.availableMetadatumList.push(this.choosenMetadatum); + this.choosenMetadatum = {}; + this.allowedFilterTypes = []; + this.selectedFilterType = {}; + this.deleteTemporaryFilter(this.newIndex); + this.newIndex = 0; }, editFilter(filter) { // Closing collapse @@ -533,6 +543,13 @@ export default { display: block; transition: top 0.1s ease; cursor: grab; + + form.tainacan-form { + padding: 1.0em 2.0em; + margin-top: 1.0em; + border-top: 1px solid $gray2; + border-bottom: 1px solid $gray2; + } &>.field, form { background-color: white !important; @@ -738,24 +755,26 @@ export default { .sortable-drag { opacity: 1 !important; } - .available-metadatum-item:hover { - background-color: $secondary; - border-color: $secondary; - color: white; - position: relative; - left: -4px; - - &:after { - border-color: transparent $secondary transparent transparent; - } - &:before { - border-color: transparent $secondary transparent transparent; - } - .icon-level-identifier>i { + .available-metadatum-item:not(.disabled-metadatum) { + &:hover{ + background-color: $secondary; + border-color: $secondary; color: white !important; - } - .grip-icon { - fill: white !important; + position: relative; + left: -4px; + + &:after { + border-color: transparent $secondary transparent transparent; + } + &:before { + border-color: transparent $secondary transparent transparent; + } + .icon-level-identifier>i { + color: white !important; + } + .grip-icon { + fill: white !important; + } } } } diff --git a/src/admin/components/lists/items-list.vue b/src/admin/components/lists/items-list.vue index 006788ea9..c67e9469c 100644 --- a/src/admin/components/lists/items-list.vue +++ b/src/admin/components/lists/items-list.vue @@ -42,7 +42,12 @@ - {{ $i18n.get('label_edit_selected_items') }} + {{ $i18n.get('label_bulk_edit_selected_items') }} + + + {{ $i18n.get('label_sequence_edit_selected_items') }} ); }, save({ attributes }) { - return ( -
- = 3 ? 3 : attributes.content1.length} - arrows - slides={attributes.content1}/> -
- ); + // return ( + //
+ // = 3 ? 3 : attributes.content1.length} + // arrows + // slides={attributes.content1}/> + //
+ // ); + + return attributes.content; }, }); \ No newline at end of file diff --git a/src/importer/class-tainacan-csv.php b/src/importer/class-tainacan-csv.php index 7a050c22d..88ee4268f 100644 --- a/src/importer/class-tainacan-csv.php +++ b/src/importer/class-tainacan-csv.php @@ -2,6 +2,7 @@ namespace Tainacan\Importer; use Tainacan; +use Tainacan\Entities; class CSV extends Importer { @@ -140,6 +141,10 @@ class CSV extends Importer { return false; } + if( $this->get_option('item_id_index') ){ + $this->handle_item_id( $values ); + } + foreach ( $collection_definition['mapping'] as $metadatum_id => $header) { $metadatum = new \Tainacan\Entities\Metadatum($metadatum_id); @@ -562,6 +567,9 @@ class CSV extends Importer { } + /** + * @param $status string the item ID + */ private function handle_item_id( $values ){ $item_id_index = $this->set_option('item_id_index'); @@ -570,4 +578,151 @@ class CSV extends Importer { $this->add_transient( 'item_action',$this->get_option('repeated_item') ); } } + + /** + * insert processed item from source to Tainacan + * + * @param array $processed_item Associative array with metadatum source's as index with + * its value or values + * @param integet $collection_index The index in the $this->collections array of the collection the item is beeing inserted into + * + * @return Tainacan\Entities\Item Item inserted + */ + public function insert( $processed_item, $collection_index ) { + + remove_action( 'post_updated', 'wp_save_post_revision' ); + $collections = $this->get_collections(); + $collection_definition = isset($collections[$collection_index]) ? $collections[$collection_index] : false; + if ( !$collection_definition || !is_array($collection_definition) || !isset($collection_definition['id']) || !isset($collection_definition['mapping']) ) { + $this->add_error_log('Collection misconfigured'); + return false; + } + + $collection = \Tainacan\Repositories\Collections::get_instance()->fetch($collection_definition['id']); + + $Tainacan_Metadata = \Tainacan\Repositories\Metadata::get_instance(); + $Tainacan_Item_Metadata = \Tainacan\Repositories\Item_Metadata::get_instance(); + $Tainacan_Items = \Tainacan\Repositories\Items::get_instance(); + + $Tainacan_Items->disable_logs(); + $Tainacan_Metadata->disable_logs(); + $Tainacan_Item_Metadata->disable_logs(); + + $item = new Entities\Item( ( $this->get_transient('item_id') ) ? $this->get_transient('item_id') : 0 ); + $itemMetadataArray = []; + + if( is_array( $processed_item ) ){ + foreach ( $processed_item as $metadatum_source => $values ){ + $tainacan_metadatum_id = array_search( $metadatum_source, $collection_definition['mapping'] ); + $metadatum = $Tainacan_Metadata->fetch( $tainacan_metadatum_id ); + + if( $metadatum instanceof Entities\Metadatum ){ + $singleItemMetadata = new Entities\Item_Metadata_Entity( $item, $metadatum); // *empty item will be replaced by inserted in the next foreach + + if( $metadatum->get_metadata_type() == 'Tainacan\Metadata_Types\Taxonomy' ){ + + $ids = $this->insert_hierarchy( $metadatum, $values ); + $singleItemMetadata->set_value( $ids ); + } else { + $singleItemMetadata->set_value( $values ); + } + + $itemMetadataArray[] = $singleItemMetadata; + } else { + $this->add_error_log('Metadata ' . $metadatum_source . ' not found'); + } + + } + } + + if( !empty( $itemMetadataArray ) && $collection instanceof Entities\Collection ){ + $item->set_collection( $collection ); + + if( $item->validate() ){ + $insertedItem = $Tainacan_Items->insert( $item ); + } else { + $this->add_error_log( 'Error inserting item' ); + $this->add_error_log( $item->get_errors() ); + return false; + } + + foreach ( $itemMetadataArray as $itemMetadata ) { + $itemMetadata->set_item( $insertedItem ); // *I told you + + if( $itemMetadata->validate() ){ + $result = $Tainacan_Item_Metadata->insert( $itemMetadata ); + } else { + $this->add_error_log('Error saving value for ' . $itemMetadata->get_metadatum()->get_name()); + $this->add_error_log($itemMetadata->get_errors()); + continue; + } + + //if( $result ){ + // $values = ( is_array( $itemMetadata->get_value() ) ) ? implode( PHP_EOL, $itemMetadata->get_value() ) : $itemMetadata->get_value(); + // $this->add_log( 'Item ' . $insertedItem->get_id() . + // ' has inserted the values: ' . $values . ' on metadata: ' . $itemMetadata->get_metadatum()->get_name() ); + //} else { + // $this->add_error_log( 'Item ' . $insertedItem->get_id() . ' has an error' ); + //} + } + + $insertedItem->set_status('publish' ); + + if($insertedItem->validate()) { + $insertedItem = $Tainacan_Items->update( $insertedItem ); + + $this->after_inserted_item( $insertedItem, $collection_index ); + } else { + $this->add_error_log( 'Error publishing Item' ); + $this->add_error_log( $insertedItem->get_errors() ); + return false; + } + + return $insertedItem; + + } else { + $this->add_error_log( 'Collection not set'); + return false; + } + + } + + /** + * @param $metadatum the metadata + * @param $values the categories names + * + * @return array empty with no category or array with IDs + */ + private function insert_hierarchy( $metadatum, $values ){ + + $Tainacan_Terms = \Tainacan\Repositories\Terms::get_instance(); + $taxonomy = new Entities\Taxonomy( $metadatum->get_metadata_type_options()['taxonomy_id']); + $exploded_values = explode(">>",$values); + + if( is_array($exploded_values) ){ + $parent = 0; + + foreach ( $exploded_values as $key => $value) { + $value = trim($value); + + $exists = term_exists( $value ,$taxonomy->get_db_identifier(), $parent ); + if( 0 !== $exists && null !== $exists && isset($exists['term_id']) ){ + $exists = new Entities\Term($exists['term_id']); + $parent = $term->get_id(); + } else { + $term = new Entities\Term(); + $term->set_name( $value ); + $term->set_parent( $parent ); + $term->set_taxonomy( $taxonomy->get_db_identifier() ); + $term = $Tainacan_Terms->insert( $term ); + + $parent = $term->get_id(); + } + } + + return $parent !== 0 ? $parent : false; + } else { + return false; + } + } } \ No newline at end of file diff --git a/src/importer/class-tainacan-importer.php b/src/importer/class-tainacan-importer.php index db7b25e68..bd39a9e07 100644 --- a/src/importer/class-tainacan-importer.php +++ b/src/importer/class-tainacan-importer.php @@ -786,7 +786,7 @@ abstract class Importer { $Tainacan_Metadata->disable_logs(); $Tainacan_Item_Metadata->disable_logs(); - $item = new Entities\Item(); + $item = new Entities\Item( ( $this->get_transient('item_id') ) ? $this->get_transient('item_id') : 0 ); $itemMetadataArray = []; if( is_array( $processed_item ) ){ diff --git a/src/importer/class-tainacan-old-tainacan.php b/src/importer/class-tainacan-old-tainacan.php index 2e4305e7c..032b9dcfa 100644 --- a/src/importer/class-tainacan-old-tainacan.php +++ b/src/importer/class-tainacan-old-tainacan.php @@ -117,7 +117,9 @@ class Old_Tainacan extends Importer{ foreach ($this->get_repo_metadata() as $metadata) { if (isset($metadata->slug) && strpos($metadata->slug, 'socialdb_property_fixed') === false) { - $metadatum_id = $this->create_metadata( $metadata ); + $metadatum_id = $this->create_metadata( $metadata ); + } elseif ( strpos($metadata->slug, 'socialdb_property_fixed_tags') !== false ){ + $metadatum_id = $this->create_metadata( $metadata ); } } @@ -150,6 +152,14 @@ class Old_Tainacan extends Importer{ $map[$metadatum_id] = $metadatum_old->id; } + } else if( isset($metadatum_old->slug) && strpos($metadatum_old->slug, 'socialdb_property_fixed_tags') !== false + && isset($metadatum_old->type) && strpos($metadatum_old->type, 'checkbox') !== false + ){ + $metadatum_id = $this->create_metadata( $metadatum_old, $collection_id ); + $this->add_log('Creating tag'); + if( $metadatum_id ){ + $map[$metadatum_id] = $metadatum_old->id; + } } } @@ -383,10 +393,6 @@ class Old_Tainacan extends Importer{ $value = $values; } - if( is_array($value) ){ - $value = array_filter($value); - } - $item_metadata->set_value($value); } else if( $metadatum->type === 'item' ){ // RELATIONSHIPS @@ -711,6 +717,8 @@ class Old_Tainacan extends Importer{ * @return int $metadatum_id */ protected function create_metadata( $node_metadata_old, $collection_id = null){ + $this->add_log('Creating metadata' . $meta->name); + $newMetadatum = new Entities\Metadatum(); $meta = $node_metadata_old; @@ -841,7 +849,7 @@ class Old_Tainacan extends Importer{ $type = "Numeric"; } else if(strcmp($type, 'item') === 0) { $type = "Relationship"; - } else if(strcmp($type, 'tree') === 0 || strcmp($type, 'selectbox')) { + } else if(strcmp($type, 'tree') === 0 || strcmp($type, 'selectbox') || strcmp($type, 'checkbox')) { $type = "Taxonomy"; } else if(strcmp($type, 'compound') === 0) { $type = "Compound"; diff --git a/src/js/axios/axios.js b/src/js/axios/axios.js index 7568594c1..c0a0f0127 100644 --- a/src/js/axios/axios.js +++ b/src/js/axios/axios.js @@ -12,4 +12,7 @@ export const wp = axios.create({ wp.defaults.headers.common['X-WP-Nonce'] = tainacan_plugin.nonce; -export default { tainacan, wp }; \ No newline at end of file +export const CancelToken = axios.CancelToken; +export const isCancel = axios.isCancel; + +export default { tainacan, wp, CancelToken, isCancel }; \ No newline at end of file diff --git a/src/js/event-bus-search.js b/src/js/event-bus-search.js index 08aadbcc0..d15823f8b 100644 --- a/src/js/event-bus-search.js +++ b/src/js/event-bus-search.js @@ -11,10 +11,10 @@ export default { query: {}, collectionId: undefined, taxonomy: undefined, - termId: undefined + termId: undefined, + searchCancel: undefined }, - created(){ - + created() { this.$on('input', data => { this.$store.dispatch('search/setPage', 1); @@ -212,16 +212,16 @@ export default { let error = this.errors.find( errorItem => errorItem.metadatum_id === filter_id ); return ( error ) ? error.errors : false; }, - listener(){ - const components = this.getAllComponents(); - for (let eventElement of components){ - eventElement.addEventListener('input', (event) => { - if( event.detail ) { - this.add_metaquery( event.detail[0] ); - } - }); - } - }, + // listener(){ + // const components = this.getAllComponents(); + // for (let eventElement of components){ + // eventElement.addEventListener('input', (event) => { + // if( event.detail ) { + // this.add_metaquery( event.detail[0] ); + // } + // }); + // } + // }, setPage(page) { this.$store.dispatch('search/setPage', page); this.updateURLQueries(); @@ -304,24 +304,36 @@ export default { // Forces fetch_only to be filled before any search happens if (this.$store.getters['search/getPostQuery']['fetch_only'] == undefined) { this.$emit( 'hasToPrepareMetadataAndFilters', to); - } else { + } else { + + // Cancels previous Request + if (this.searchCancel != undefined) + this.searchCancel.cancel('Item search Canceled.'); + this.$store.dispatch('collection/fetchItems', { 'collectionId': this.collectionId, 'isOnTheme': (this.$route.name == null), 'termId': this.termId, 'taxonomy': this.taxonomy - }) - .then((res) => { - this.$emit( 'isLoadingItems', false); - this.$emit( 'hasFiltered', res.hasFiltered); + }).then((resp) => { + // The actual fetch item request + resp.request.then((res) => { + this.$emit( 'isLoadingItems', false); + this.$emit( 'hasFiltered', res.hasFiltered); - if(res.advancedSearchResults){ - this.$emit('advancedSearchResults', res.advancedSearchResults); - } - }) - .catch(() => { - this.$emit( 'isLoadingItems', false); + if(res.advancedSearchResults){ + this.$emit('advancedSearchResults', res.advancedSearchResults); + } + }) + .catch(() => { + this.$emit( 'isLoadingItems', false); + }); + + // Search Request Token for cancelling + this.searchCancel = resp.source; }); + + } }, diff --git a/src/js/event-bus-web-components.js b/src/js/event-bus-web-components.js index f7562685c..11207947a 100644 --- a/src/js/event-bus-web-components.js +++ b/src/js/event-bus-web-components.js @@ -11,7 +11,7 @@ export const eventBus = new Vue({ if( tainacan_plugin.components ){ this.componentsTag = tainacan_plugin.components; } - this.$on('input', data => this.updateValue(data) ); + this.$on('input', this.updateValue ); }, watch: { errors() { @@ -24,21 +24,21 @@ export const eventBus = new Vue({ this.componentsTag.push( name ); } }, - listener(){ - const components = this.getAllComponents(); - for (let eventElement of components){ - eventElement.addEventListener('input', (event) => { + // listener(){ + // const components = this.getAllComponents(); + // for (let eventElement of components){ + // eventElement.addEventListener('input', (event) => { - if (event.detail && event.detail[0] ){ - this.updateValue({ - item_id: $(eventElement).attr("item_id"), - metadatum_id: $(eventElement).attr("metadatum_id"), - values: event.detail - }) - } - }); - } - }, + // if (event.detail && event.detail[0] ){ + // this.updateValue({ + // item_id: $(eventElement).attr("item_id"), + // metadatum_id: $(eventElement).attr("metadatum_id"), + // values: event.detail + // }) + // } + // }); + // } + // }, updateValue(data){ this.$emit('isUpdatingValue', true); @@ -128,6 +128,9 @@ export const eventBus = new Vue({ } } } + }, + beforeUpdate() { + this.$off('input', this.updateValue ); } }); diff --git a/src/js/store/modules/bulk-edition/actions.js b/src/js/store/modules/bulk-edition/actions.js index 0bd4929e9..f210be364 100644 --- a/src/js/store/modules/bulk-edition/actions.js +++ b/src/js/store/modules/bulk-edition/actions.js @@ -10,6 +10,12 @@ export const createEditGroup = ({commit}, parameters) => { bulkEditParams = { items_ids: object, }; + if (parameters.order != undefined && parameters.order != undefined) + bulkEditParams['options'] = { + order: parameters.order, + orderby: parameters.orderBy + }; + } else if(object.constructor.name === 'Object'){ bulkEditParams = { use_query: object, @@ -25,6 +31,21 @@ export const createEditGroup = ({commit}, parameters) => { }); }; +export const fetchGroup = ({commit}, { collectionId, groupId }) => { + + return new Promise ((resolve, reject) => { + axios.tainacan.get(`/collection/${collectionId}/bulk-edit/${groupId}`) + .then(response => { + commit('setGroup', response.data); + resolve(response.data); + }) + .catch(error => { + console.log(error); + reject(error); + }); + }); +}; + export const setValueInBulk = ({commit}, parameters) => { let groupID = parameters.groupID; let collectionID = parameters.collectionID; @@ -168,4 +189,20 @@ export const deleteItemsInBulk = ({commit}, parameters) => { console.log(error); commit('setActionResult', error.response.data); }); +}; + +// SEQUENCE EDIT SPECIFIC +export const fetchItemIdInSequence = ({commit}, { collectionId, sequenceId, itemPosition }) => { + + return new Promise ((resolve, reject) => { + axios.tainacan.get(`/collection/${collectionId}/bulk-edit/${sequenceId}/sequence/${itemPosition}`) + .then(response => { + commit('setItemIdInSequence', response.data); + resolve(response.data); + }) + .catch(error => { + console.log(error); + reject(error); + }); + }); }; \ No newline at end of file diff --git a/src/js/store/modules/bulk-edition/getters.js b/src/js/store/modules/bulk-edition/getters.js index ca3bb84bc..d7b245096 100644 --- a/src/js/store/modules/bulk-edition/getters.js +++ b/src/js/store/modules/bulk-edition/getters.js @@ -2,6 +2,14 @@ export const getGroupID = state => { return state.group.id; }; +export const getGroup = state => { + return state.group; +}; + export const getActionResult = state => { return state.actionResult; +}; + +export const getItemIdInSequence = state => { + return state.itemIdInSequence; }; \ No newline at end of file diff --git a/src/js/store/modules/bulk-edition/index.js b/src/js/store/modules/bulk-edition/index.js index 41339308c..1f5baddb7 100644 --- a/src/js/store/modules/bulk-edition/index.js +++ b/src/js/store/modules/bulk-edition/index.js @@ -5,6 +5,7 @@ import * as getters from './getters.js' const state = { group: null, actionResult: null, + itemIdInSequence: null }; export default { diff --git a/src/js/store/modules/bulk-edition/mutations.js b/src/js/store/modules/bulk-edition/mutations.js index 6e8060eae..dc1b7f51d 100644 --- a/src/js/store/modules/bulk-edition/mutations.js +++ b/src/js/store/modules/bulk-edition/mutations.js @@ -4,4 +4,8 @@ export const setGroup = (state, group) => { export const setActionResult = (state, actionResult) => { state.actionResult = actionResult; +}; + +export const setItemIdInSequence = (state, itemIdInSequence) => { + state.itemIdInSequence = itemIdInSequence; }; \ No newline at end of file diff --git a/src/js/store/modules/collection/actions.js b/src/js/store/modules/collection/actions.js index f0535047d..d9de66164 100644 --- a/src/js/store/modules/collection/actions.js +++ b/src/js/store/modules/collection/actions.js @@ -1,97 +1,109 @@ import axios from '../../../axios/axios'; import qs from 'qs'; +// THE ITEMS SEARCH export const fetchItems = ({ rootGetters, dispatch, commit }, { collectionId, isOnTheme, termId, taxonomy }) => { commit('cleanItems'); - return new Promise ((resolve, reject) => { - - // Adds queries for filtering - let postQueries = JSON.parse(JSON.stringify(rootGetters['search/getPostQuery'])); + const source = axios.CancelToken.source(); - // Sets a flag to inform components that an empty sate is or not due to filtering - let hasFiltered = false; - let advancedSearchResults = false; + return new Object({ + request: new Promise ((resolve, reject) => { + + // Adds queries for filtering + let postQueries = JSON.parse(JSON.stringify(rootGetters['search/getPostQuery'])); - if ( (postQueries.metaquery != undefined && - (Object.keys(postQueries.metaquery).length > 0 || - postQueries.metaquery.length > 0)) || (postQueries.taxquery != undefined && - (Object.keys(postQueries.taxquery).length > 0 || - postQueries.taxquery.length > 0)) ) { - - hasFiltered = true; + // Sets a flag to inform components that an empty sate is or not due to filtering + let hasFiltered = false; + let advancedSearchResults = false; - if(postQueries.advancedSearch){ - advancedSearchResults = postQueries.advancedSearch; + if ( (postQueries.metaquery != undefined && + (Object.keys(postQueries.metaquery).length > 0 || + postQueries.metaquery.length > 0)) || (postQueries.taxquery != undefined && + (Object.keys(postQueries.taxquery).length > 0 || + postQueries.taxquery.length > 0)) ) { + + hasFiltered = true; + + if(postQueries.advancedSearch){ + advancedSearchResults = postQueries.advancedSearch; + } } - } - - // Sets term query in case it's on a term items page - if (termId != undefined && taxonomy != undefined) { - - if (postQueries.taxquery == undefined) - postQueries.taxquery = []; - - postQueries.taxquery.push({ - taxonomy: taxonomy, - terms:[ termId ], - compare: 'IN' - }); - } - - let query = qs.stringify(postQueries); - - // Guarantees at least empty fetch_only are passed in case none is found - if (qs.stringify(postQueries.fetch_only) == ''){ - dispatch('search/add_fetchonly', {}, { root: true }); - } - - if (qs.stringify(postQueries.fetch_only['meta']) == ''){ - dispatch('search/add_fetchonly_meta', 0, { root: true }); - } - - // Differentiates between repository level and collection level queries - let endpoint = '/collection/'+ collectionId +'/items?'; - - if (collectionId == undefined){ - endpoint = '/items?'; - } - - if (!isOnTheme){ - if (postQueries.view_mode != undefined) - postQueries.view_mode = null; - - endpoint = endpoint + 'context=edit&' - } else { - if (postQueries.admin_view_mode != undefined) - postQueries.admin_view_mode = null; - } - - axios.tainacan.get(endpoint+query) - .then(res => { - let items = res.data; - let viewModeObject = tainacan_plugin.registered_view_modes[postQueries.view_mode]; + // Sets term query in case it's on a term items page + if (termId != undefined && taxonomy != undefined) { - if (isOnTheme && viewModeObject != undefined && viewModeObject.type == 'template') { - commit('setItemsListTemplate', items); - resolve({'itemsListTemplate': items, 'total': res.headers['x-wp-total'], hasFiltered: hasFiltered, advancedSearchResults: advancedSearchResults}); + if (postQueries.taxquery == undefined) + postQueries.taxquery = []; + + postQueries.taxquery.push({ + taxonomy: taxonomy, + terms:[ termId ], + compare: 'IN' + }); + } + + let query = qs.stringify(postQueries); + + // Guarantees at least empty fetch_only are passed in case none is found + if (qs.stringify(postQueries.fetch_only) == ''){ + dispatch('search/add_fetchonly', {}, { root: true }); + } + + if (qs.stringify(postQueries.fetch_only['meta']) == ''){ + dispatch('search/add_fetchonly_meta', 0, { root: true }); + } + + // Differentiates between repository level and collection level queries + let endpoint = '/collection/'+ collectionId +'/items?'; + + if (collectionId == undefined){ + endpoint = '/items?'; + } + + if (!isOnTheme){ + if (postQueries.view_mode != undefined) + postQueries.view_mode = null; + + endpoint = endpoint + 'context=edit&' } else { - commit('setItems', items); - resolve({ - 'items': items, - 'total': res.headers['x-wp-total'], - totalPages: res.headers['x-wp-totalpages'], - hasFiltered: hasFiltered, - advancedSearchResults: advancedSearchResults }); - } - dispatch('search/setTotalItems', res.headers['x-wp-total'], { root: true } ); - dispatch('search/setTotalPages', res.headers['x-wp-totalpages'], { root: true } ); - }) - .catch(error => reject(error)); - - }); - + if (postQueries.admin_view_mode != undefined) + postQueries.admin_view_mode = null; + } + + axios.tainacan.get(endpoint+query, { + cancelToken: source.token + }) + .then(res => { + + let items = res.data; + let viewModeObject = tainacan_plugin.registered_view_modes[postQueries.view_mode]; + + if (isOnTheme && viewModeObject != undefined && viewModeObject.type == 'template') { + commit('setItemsListTemplate', items); + resolve({'itemsListTemplate': items, 'total': res.headers['x-wp-total'], hasFiltered: hasFiltered, advancedSearchResults: advancedSearchResults}); + } else { + commit('setItems', items); + resolve({ + 'items': items, + 'total': res.headers['x-wp-total'], + totalPages: res.headers['x-wp-totalpages'], + hasFiltered: hasFiltered, + advancedSearchResults: advancedSearchResults }); + } + dispatch('search/setTotalItems', res.headers['x-wp-total'], { root: true } ); + dispatch('search/setTotalPages', res.headers['x-wp-totalpages'], { root: true } ); + }) + .catch((thrown) => { + if (axios.isCancel(thrown)) { + console.log('Request canceled: ', thrown.message); + } else { + reject(thrown); + } + }); + }), + source: source + }) }; export const deleteItem = ({ commit }, { itemId, isPermanently }) => { @@ -115,9 +127,13 @@ export const deleteItem = ({ commit }, { itemId, isPermanently }) => { }); }; -export const fetchCollections = ({commit} , { page, collectionsPerPage, status }) => { +export const fetchCollections = ({commit} , { page, collectionsPerPage, status, contextEdit }) => { + return new Promise((resolve, reject) => { - let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage+'&context=edit'; + let endpoint = '/collections?paged='+page+'&perpage='+collectionsPerPage; + + if (contextEdit) + endpoint = endpoint + '&context=edit'; if (status != '' && status != undefined) endpoint = endpoint + '&status=' + status; diff --git a/src/js/store/modules/search/actions.js b/src/js/store/modules/search/actions.js index 656bfe86b..6ff8b0423 100644 --- a/src/js/store/modules/search/actions.js +++ b/src/js/store/modules/search/actions.js @@ -8,6 +8,7 @@ export const set_postquery = ({ commit }, postquery ) => { }; export const set_advanced_query = ({commit}, advancedSearchQuery) => { + commit('removePostQueryAttribute', 'search'); commit('setAdvancedSearchQuery', advancedSearchQuery); }; @@ -74,7 +75,7 @@ export const setStatus= ({ commit }, status ) => { // Sorting queries export const setOrderBy = ({ state, commit }, orderBy ) => { - commit('cleanPostQueryAttribute', { attr: 'orderby' } ); + commit('removePostQueryAttribute', 'orderby'); // Primitive Types: string, date, item, term, compound, float if (orderBy.slug == 'creation_date') { diff --git a/src/js/store/modules/search/mutations.js b/src/js/store/modules/search/mutations.js index bf9208fc5..ed3de27da 100644 --- a/src/js/store/modules/search/mutations.js +++ b/src/js/store/modules/search/mutations.js @@ -4,8 +4,8 @@ export const setPostQueryAttribute = ( state, { attr, value }) => { Vue.set( state.postquery, attr , value ); }; -export const cleanPostQueryAttribute = ( state, { attr }) => { - Vue.set( state.postquery, attr , null ); +export const removePostQueryAttribute = ( state, attr) => { + delete state.postquery[`${attr}`]; }; export const setPostQuery = ( state, postquery ) => { @@ -30,7 +30,7 @@ export const addMetaQuery = ( state, filter ) => { compare: filter.compare, type: filter.type } ); - } else{ + } else { state.postquery.metaquery.push({ key: filter.metadatum_id, value: filter.value, @@ -42,14 +42,16 @@ export const addMetaQuery = ( state, filter ) => { export const addTaxQuery = ( state, filter ) => { state.postquery.taxquery = ( ! state.postquery.taxquery || state.postquery.taxquery.length == undefined ) ? [] : state.postquery.taxquery; + let index = state.postquery.taxquery.findIndex( item => item.taxonomy === filter.taxonomy); + if ( index >= 0 ){ Vue.set( state.postquery.taxquery, index, { taxonomy: filter.taxonomy, terms: filter.terms, compare: filter.compare } ); - }else{ + } else { state.postquery.taxquery.push({ taxonomy: filter.taxonomy, terms: filter.terms, @@ -68,11 +70,13 @@ export const addFetchOnly = ( state, metadatum ) => { }; export const addFetchOnlyMeta = ( state, metadatum ) => { state.postquery.fetch_only = ( ! state.postquery.fetch_only ) ? { '0': 'thumbnail', 'meta': [], '1': 'creation_date', '2': 'author_name' } : state.postquery.fetch_only; - // console.log(state.postquery.fetch_only); + // console.log(state.postquery.fetch_only); //console.log(state.postquery.fetch_only['meta']); state.postquery.fetch_only['meta'] = ( ! state.postquery.fetch_only['meta'] ) ? [] : state.postquery.fetch_only['meta']; + let index = state.postquery.fetch_only['meta'].findIndex( item => item == metadatum); - if ( index >= 0 ){ + + if ( index >= 0 ){ state.postquery.fetch_only['meta'][index] = metadatum; } else { state.postquery.fetch_only['meta'].push(metadatum); @@ -90,6 +94,7 @@ export const removeFetchOnly = ( state, metadatum ) => { export const removeFetchOnlyMeta = ( state, metadatum ) => { if(state.postquery.fetch_only['meta'] != undefined) { let index = state.postquery.fetch_only['meta'].findIndex( item => item == metadatum); + if (index >= 0) { state.postquery.fetch_only['meta'].splice(index, 1); } @@ -98,7 +103,9 @@ export const removeFetchOnlyMeta = ( state, metadatum ) => { export const removeMetaQuery = ( state, filter ) => { state.postquery.metaquery = ( ! state.postquery.metaquery ) ? [] : state.postquery.metaquery; + let index = state.postquery.metaquery.findIndex( item => item.key == filter.metadatum_id); + if (index >= 0) { state.postquery.metaquery.splice(index, 1); } @@ -106,15 +113,12 @@ export const removeMetaQuery = ( state, filter ) => { export const removeTaxQuery = ( state, filter ) => { let index = state.postquery.taxquery.findIndex( item => item.taxonomy == filter.taxonomy); + if (index >= 0) { state.postquery.taxquery.splice(index, 1); } }; -export const removePostQueryAttribute = ( state, attribute) => { - Vue.set( state.postquery, attribute , ''); -}; - export const setTotalItems = ( state, total ) => { state.totalItems = total; }; @@ -125,10 +129,11 @@ export const setTotalPages = ( state, totalPages ) => { export const setSearchQuery = ( state, searchQuery ) => { - if (searchQuery != '') + if (searchQuery != '') { state.postquery.search = searchQuery; - else - state.postquery.search = undefined; + } else { + delete state.postquery.search; + } }; export const setStatus = ( state, status ) => { @@ -145,16 +150,21 @@ export const setAdminViewMode = ( state, adminViewMode ) => { export const addFilterTag = ( state, filterTag ) => { state.filter_tags = ( ! state.filter_tags) ? [] : state.filter_tags; + let index = state.filter_tags.findIndex( tag => tag.filterId == filterTag.filterId); - if ( index >= 0 ) - Vue.set( state.filter_tags, index, filterTag ); - else + + if ( index >= 0 ) { + Vue.set(state.filter_tags, index, filterTag); + } else { state.filter_tags.push(filterTag); + } }; export const removeFilterTag = ( state, filterTag ) => { state.filter_tags = ( ! state.filter_tags ) ? [] : state.filter_tags; + let index = state.filter_tags.findIndex( tag => tag.filterId == filterTag.filterId); + if (index >= 0) { state.filter_tags.splice(index, 1); } @@ -173,5 +183,5 @@ export const cleanTaxQueries = (state) => { }; export const cleanFetchOnly = (state) => { - state.postquery.fetch_only = undefined; + delete state.postquery.fetch_only; }; \ No newline at end of file diff --git a/src/theme-helper/view-mode-masonry.vue b/src/theme-helper/view-mode-masonry.vue index b3beabfd8..cd85be182 100644 --- a/src/theme-helper/view-mode-masonry.vue +++ b/src/theme-helper/view-mode-masonry.vue @@ -14,7 +14,7 @@

{{ $i18n.get('info_no_item_found') }}

- + -
+ @@ -304,6 +305,7 @@ export default { return this.getItem(); }, page() { + this.setMaxAndMinPages(); return this.getPage(); }, totalPages() { @@ -311,13 +313,6 @@ export default { } }, watch: { - page: { - handler() { - this.minPage = this.page < this.minPage ? this.page : this.minPage; - this.maxPage = this.page > this.maxPage ? this.page : this.maxPage; - }, - immediate: true - }, items: { handler () { if (this.items.length > 0) { @@ -396,7 +391,6 @@ export default { this.readjustedSlideIndex = this.slideIndex; this.$refs.mySwiper.swiper.activeIndex = this.slideIndex + 0; - // console.log("Index: " + this.slideIndex, this.$refs.mySwiper.swiper.activeIndex, this.readjustedSlideIndex) } else if (this.slideItems.length > 0) { if (this.$refs.mySwiper.swiper.activeIndex == this.slideItems.length - 1 && this.page < this.totalPages) oldVal == undefined ? this.$eventBusSearch.setPage(this.page + 1) : this.$eventBusSearch.setPage(this.maxPage + 1); @@ -437,6 +431,10 @@ export default { 'getPage', 'getItemsPerPage' ]), + setMaxAndMinPages () { + this.minPage = JSON.parse(JSON.stringify(this.getPage() < this.minPage ? this.getPage() : this.minPage)); + this.maxPage = JSON.parse(JSON.stringify(this.getPage() > this.maxPage ? this.getPage() : this.maxPage)); + }, onHideControls() { if (this.isSwiping == undefined || this.isSwiping == false) this.hideControls = !this.hideControls; @@ -453,7 +451,7 @@ export default { }, 500); }, onSlideChange() { - // console.log(this.slideIndex, this.$refs.mySwiper.swiper.activeIndex, this.readjustedSlideIndex) + if (this.$refs.mySwiper.swiper != undefined) this.slideIndex = this.$refs.mySwiper.swiper.activeIndex; @@ -464,6 +462,10 @@ export default { // this.$refs.mySwiper.swiper.slides[this.slideIndex].click(); this.$refs.mySwiper.swiper.activeIndex = this.slideIndex + 0; this.readjustedSlideIndex = undefined; + + if (this.slideIndex != undefined && this.$refs.mySwiper.swiper.slides[this.slideIndex] != undefined) + this.$refs.mySwiper.swiper.slides[this.slideIndex].click(); + } }); diff --git a/src/theme-helper/view-mode-table.vue b/src/theme-helper/view-mode-table.vue index 1356e1467..630b2c06b 100644 --- a/src/theme-helper/view-mode-table.vue +++ b/src/theme-helper/view-mode-table.vue @@ -100,7 +100,7 @@ column.metadatum !== 'row_actions' && column.metadatum !== 'row_creation' && column.metadatum !== 'row_author'" - v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column) : `` + $i18n.get('label_value_not_informed') + ``"/> + v-html="renderMetadata(item.metadata, column) != '' ? renderMetadata(item.metadata, column, column.metadata_type_object.component) : `` + $i18n.get('label_value_not_informed') + ``"/> 'all_metadatum_values' - ]; - $request = new \WP_REST_Request( 'GET', - $this->namespace . '/collection/' . $collection->get_id() . '/metadata/' . $metadatum->get_id() + $this->namespace . '/collection/' . $collection->get_id() . '/facets/' . $metadatum->get_id() ); - $request->set_query_params($query); //======================= @@ -503,7 +498,7 @@ class TAINACAN_REST_Metadata_Controller extends TAINACAN_UnitApiTestCase { $data1 = $response1->get_data(); $this->assertCount(1, $data1); - $this->assertEquals('12/12/2017', $data1[0]['mvalue']); + $this->assertEquals('12/12/2017', $data1[0]['value']); //======================= @@ -515,7 +510,7 @@ class TAINACAN_REST_Metadata_Controller extends TAINACAN_UnitApiTestCase { $data1 = $response1->get_data(); $this->assertCount(1, $data1); - $this->assertEquals('12/12/2017', $data1[0]['mvalue']); + $this->assertEquals('12/12/2017', $data1[0]['value']); //======================= @@ -528,8 +523,8 @@ class TAINACAN_REST_Metadata_Controller extends TAINACAN_UnitApiTestCase { // Only two without duplicates $this->assertCount(2, $data2); - $this->assertEquals('12/12/2017', $data2[0]['mvalue']); - $this->assertEquals('02/03/2018', $data2[1]['mvalue']); + $this->assertEquals('12/12/2017', $data2[0]['value']); + $this->assertEquals('02/03/2018', $data2[1]['value']); } } diff --git a/tests/test-importer.php b/tests/test-importer.php index f8afe8c27..6eb3d1485 100644 --- a/tests/test-importer.php +++ b/tests/test-importer.php @@ -2,6 +2,7 @@ namespace Tainacan\Tests; use Tainacan\Importer; +use Tainacan\Entities; /** * Class Importer * @@ -261,7 +262,7 @@ class ImporterTests extends TAINACAN_UnitTestCase { // Sample data $data = array( - array('Data 11', 'Data 12', 'Data 13||TESTE', 'Data 14', 'Data 15'), + array('Data 11', 'Data 12', 'Data 13||TESTE', 'Data 14', 'Data 15>>DATA 151'), array('Data 21', 'Data 22', 'this is having @@ -269,7 +270,7 @@ class ImporterTests extends TAINACAN_UnitTestCase { lines', 'Data 24', 'Data 25'), array('Data 31', 'Data 32', utf8_decode( 'Data 33||Rééço' ), 'Data 34', 'Data 35'), array('Data 41', 'Data 42', 'Data 43||limbbo', 'Data 44', 'Data 45'), - array('Data 51', 'Data 52', 'Data 53', 'Data 54', 'Data 55') + array('Data 51', 'Data 52', 'Data 53', 'Data 54', 'Data 55>>DATA551') ); // save each row of the data @@ -328,7 +329,28 @@ class ImporterTests extends TAINACAN_UnitTestCase { 'multiple' => 'no' ), true - ); + ); + + $taxonomy = $this->tainacan_entity_factory->create_entity( + 'taxonomy', + array( + 'name' => 'genero', + ), + true + ); + + $metadata_taxonomy =$this->tainacan_entity_factory->create_entity( + 'metadatum', + array( + 'name' => 'taxonomia', + 'collection_id' => $collection->get_id(), + 'metadata_type_options' => ['taxonomy_id' => $taxonomy->get_id(), 'allow_new_terms' => true ], + 'metadata_type' => 'Tainacan\Metadata_Types\Taxonomy', + 'status' => 'publish' + ), + true + ); + $collection_definition = [ 'id' => $collection->get_id(), @@ -343,7 +365,7 @@ class ImporterTests extends TAINACAN_UnitTestCase { foreach ( $metadata as $index => $metadatum ){ $map[$metadatum->get_id()] = $headers[$index]; } - + $collection_definition['mapping'] = $map; // add the collection @@ -359,7 +381,19 @@ class ImporterTests extends TAINACAN_UnitTestCase { $this->assertEquals(false, $_SESSION['tainacan_importer'][$id]->run(), '5 items and return false because its finished'); $this->assertEquals(false, $_SESSION['tainacan_importer'][$id]->run(), 'if call run again after finish, do nothing'); - $items = $Tainacan_Items->fetch( [], $collection, 'OBJECT' ); + $items = $Tainacan_Items->fetch( ['orderby' => 'date'], $collection, 'OBJECT' ); + + foreach ( $items as $index => $item ) { + $singleItemMetadata = new Entities\Item_Metadata_Entity( $item, $metadata_taxonomy ); + + if( $index === 0 ){ + $term = $singleItemMetadata->get_value(); + + if( in_array( $item->get_title(),['Data 11','Data 51'] ) ) + $this->assertTrue(in_array( $term->get_name(),['DATA 151','DATA551'] )); + } + + } $this->assertEquals( $_SESSION['tainacan_importer'][$id]->get_source_number_of_items(), count( $items ) ); }