From a4e689c27a52b63f37d4076c77f7d65202cc7f54 Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Tue, 1 Dec 2020 23:02:35 +0100 Subject: [PATCH] activated lightbox on cards, started to dev modal-card --- composer.json | 1 + composer.lock | 126 +++++++++++++++++- config/sync/core.extension.yml | 2 + ...ile_mdm_font.file_metadata_plugin.font.yml | 9 ++ config/sync/image.style.hd.yml | 29 ++++ config/sync/image_effects.settings.yml | 17 +++ ...jsonapi_resource_config.node--materiau.yml | 1 + package-lock.json | 15 +++ package.json | 1 + web/.gitignore | 3 +- .../custom/materiotheme/assets/dist/main.css | 21 ++- .../custom/materiotheme/assets/dist/main.js | 110 +++++++++++++-- .../materiotheme/assets/scripts/main.js | 3 + .../assets/styles/base/_variables.scss | 3 + .../materiotheme/assets/styles/main.scss | 27 ++++ .../vuejs/components/Content/Card.vue | 37 ++++- .../vuejs/components/Content/MiniCard.vue | 2 +- .../vuejs/components/Content/ModalCard.vue | 116 ++++++++++++++++ .../vuejs/components/Pages/Article.vue | 6 +- .../vuejs/components/cardMixins.js | 8 +- .../custom/materiotheme/vuejs/store/index.js | 7 +- .../vuejs/store/modules/search.js | 2 +- .../materiotheme/vuejs/store/modules/user.js | 4 +- 23 files changed, 526 insertions(+), 24 deletions(-) create mode 100644 config/sync/file_mdm_font.file_metadata_plugin.font.yml create mode 100644 config/sync/image.style.hd.yml create mode 100644 config/sync/image_effects.settings.yml create mode 100644 web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue diff --git a/composer.json b/composer.json index 3acf959..b577cee 100644 --- a/composer.json +++ b/composer.json @@ -42,6 +42,7 @@ "drupal/flag_lists": "^4.0@beta", "drupal/genpass": "^1.x-dev", "drupal/image_delta_formatter": "^1.x-dev", + "drupal/image_effects": "3.x-dev@dev", "drupal/jsonapi_extras": "^3.7", "drupal/jsonrpc": "^1.x-dev", "drupal/login_history": "^1.x-dev", diff --git a/composer.lock b/composer.lock index faa73ac..e9d9cc2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "72666d13bf47ed93fa6c3d45a9e17370", + "content-hash": "a39c2661f765eebdcbdb7b7732b68200", "packages": [ { "name": "alchemy/zippy", @@ -6819,6 +6819,74 @@ "source": "https://git.drupalcode.org/project/file_mdm" } }, + { + "name": "drupal/file_mdm_exif", + "version": "2.1.0", + "require": { + "drupal/core": "^8.8 || ^9", + "drupal/file_mdm": "*" + }, + "type": "metapackage", + "extra": { + "drupal": { + "version": "8.x-2.1", + "datestamp": "1586801064", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "mondrake", + "homepage": "https://www.drupal.org/user/1307444" + } + ], + "description": "Provides a file metadata plugin for EXIF image information.", + "homepage": "https://www.drupal.org/project/file_mdm", + "support": { + "source": "https://git.drupalcode.org/project/file_mdm" + } + }, + { + "name": "drupal/file_mdm_font", + "version": "2.1.0", + "require": { + "drupal/core": "^8.8 || ^9", + "drupal/file_mdm": "*" + }, + "type": "metapackage", + "extra": { + "drupal": { + "version": "8.x-2.1", + "datestamp": "1586801064", + "security-coverage": { + "status": "covered", + "message": "Covered by Drupal's security advisory policy" + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "mondrake", + "homepage": "https://www.drupal.org/user/1307444" + } + ], + "description": "Provides a file metadata plugin for TTF/OTF/WOFF font information.", + "homepage": "https://www.drupal.org/project/file_mdm", + "support": { + "source": "https://git.drupalcode.org/project/file_mdm" + } + }, { "name": "drupal/filefield_sources", "version": "dev-1.x", @@ -7257,6 +7325,61 @@ }, "time": "2020-07-18T12:01:59+00:00" }, + { + "name": "drupal/image_effects", + "version": "dev-3.x", + "source": { + "type": "git", + "url": "https://git.drupalcode.org/project/image_effects.git", + "reference": "2dd85aa60ee79bcf530bf21070dacaf554601dcc" + }, + "require": { + "drupal/core": "^8.9 || ^9", + "drupal/file_mdm_exif": "^2", + "drupal/file_mdm_font": "^2", + "php": ">=7.1" + }, + "conflict": { + "drupal/imagemagick": "<3" + }, + "require-dev": { + "drupal/imagemagick": "^3" + }, + "type": "drupal-module", + "extra": { + "branch-alias": { + "dev-3.x": "3.x-dev" + }, + "drupal": { + "version": "8.x-3.0+9-dev", + "datestamp": "1606320751", + "security-coverage": { + "status": "not-covered", + "message": "Dev releases are not covered by Drupal security advisories." + } + } + }, + "notification-url": "https://packages.drupal.org/8/downloads", + "license": [ + "GPL-2.0-or-later" + ], + "authors": [ + { + "name": "mondrake", + "homepage": "https://www.drupal.org/user/1307444" + }, + { + "name": "slashrsm", + "homepage": "https://www.drupal.org/user/744628" + } + ], + "description": "Provides effects and operations for the Image API.", + "homepage": "https://www.drupal.org/project/image_effects", + "support": { + "source": "https://git.drupalcode.org/project/image_effects" + }, + "time": "2020-11-27T15:22:12+00:00" + }, { "name": "drupal/imagemagick", "version": "3.1.0", @@ -17408,6 +17531,7 @@ "drupal/flag_lists": 10, "drupal/genpass": 20, "drupal/image_delta_formatter": 20, + "drupal/image_effects": 20, "drupal/jsonrpc": 20, "drupal/login_history": 20, "drupal/mailgun": 20, diff --git a/config/sync/core.extension.yml b/config/sync/core.extension.yml index 93e1719..58c334f 100644 --- a/config/sync/core.extension.yml +++ b/config/sync/core.extension.yml @@ -76,6 +76,7 @@ module: file: 0 file_mdm: 0 file_mdm_exif: 0 + file_mdm_font: 0 filter: 0 filter_perms: 0 flag: 0 @@ -85,6 +86,7 @@ module: honeypot: 0 image: 0 image_delta_formatter: 0 + image_effects: 0 imagemagick: 0 inline_entity_form: 0 interval: 0 diff --git a/config/sync/file_mdm_font.file_metadata_plugin.font.yml b/config/sync/file_mdm_font.file_metadata_plugin.font.yml new file mode 100644 index 0000000..bc92769 --- /dev/null +++ b/config/sync/file_mdm_font.file_metadata_plugin.font.yml @@ -0,0 +1,9 @@ +configuration: + cache: + override: false + settings: + enabled: true + expiration: 172800 + disallowed_paths: { } +_core: + default_config_hash: o53U_2I-21Es-9iqxeUMDRcRxN0spL1OiHuAVQhh2oI diff --git a/config/sync/image.style.hd.yml b/config/sync/image.style.hd.yml new file mode 100644 index 0000000..bb42f77 --- /dev/null +++ b/config/sync/image.style.hd.yml @@ -0,0 +1,29 @@ +uuid: 8722930b-22a2-4f06-afb0-593c9969c185 +langcode: en +status: true +dependencies: + module: + - image_effects +name: hd +label: 'hd (1920x1080)' +effects: + 94be638b-57fe-4848-8ac3-95036ece001c: + uuid: 94be638b-57fe-4848-8ac3-95036ece001c + id: image_scale + weight: 1 + data: + width: 1920 + height: 1200 + upscale: false + 07af5abf-4bb7-4e96-ba86-9fe6e92ab548: + uuid: 07af5abf-4bb7-4e96-ba86-9fe6e92ab548 + id: image_effects_watermark + weight: 2 + data: + watermark_image: sites/default/files/watermarks/materio-watermark-hd.png + watermark_width: 90% + watermark_height: '' + placement: center-center + x_offset: '' + y_offset: '' + opacity: 10 diff --git a/config/sync/image_effects.settings.yml b/config/sync/image_effects.settings.yml new file mode 100644 index 0000000..dd9b004 --- /dev/null +++ b/config/sync/image_effects.settings.yml @@ -0,0 +1,17 @@ +color_selector: + plugin_id: farbtastic + plugin_settings: + html_color: { } + farbtastic: { } +image_selector: + plugin_id: dropdown + plugin_settings: + basic: { } + dropdown: + path: sites/default/files/watermarks +font_selector: + plugin_id: basic + plugin_settings: + basic: { } +_core: + default_config_hash: eaXmaPSud65p-XhTwMIL9vKETD9zR3qNOMMa5EUuoNw diff --git a/config/sync/jsonapi_extras.jsonapi_resource_config.node--materiau.yml b/config/sync/jsonapi_extras.jsonapi_resource_config.node--materiau.yml index 5738939..6d4c718 100644 --- a/config/sync/jsonapi_extras.jsonapi_resource_config.node--materiau.yml +++ b/config/sync/jsonapi_extras.jsonapi_resource_config.node--materiau.yml @@ -214,6 +214,7 @@ resourceFields: - card_full - card_medium - card_medium_half + - hd disabled: false field_memo: disabled: true diff --git a/package-lock.json b/package-lock.json index 7aed693..265b220 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9944,6 +9944,12 @@ "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", "dev": true }, + "resize-observer-polyfill": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz", + "integrity": "sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==", + "dev": true + }, "resolve": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.0.tgz", @@ -11747,6 +11753,15 @@ "vue-template-es2015-compiler": "^1.6.0" } }, + "vue-js-modal": { + "version": "2.0.0-rc.6", + "resolved": "https://registry.npmjs.org/vue-js-modal/-/vue-js-modal-2.0.0-rc.6.tgz", + "integrity": "sha512-bJOm7Yhrl0ur/QyXjoC3gMMmE7UxiVEcS2rl8v9iPXIe9QLvjiCSZElSOvvyps8LNuG1X0rPifZGxI/CWKCFaw==", + "dev": true, + "requires": { + "resize-observer-polyfill": "^1.5.1" + } + }, "vue-loader": { "version": "15.9.5", "resolved": "https://registry.npmjs.org/vue-loader/-/vue-loader-15.9.5.tgz", diff --git a/package.json b/package.json index f80bf39..38e91d7 100644 --- a/package.json +++ b/package.json @@ -62,6 +62,7 @@ "url-loader": "^4.1.1", "vue-eslint-parser": "^7.1.1", "vue-jest": "^3.0.7", + "vue-js-modal": "^2.0.0-rc.6", "vue-loader": "^15.9.5", "vue-server-renderer": "^2.6.12", "vue-style-loader": "^4.1.2", diff --git a/web/.gitignore b/web/.gitignore index 405e224..f2a143d 100644 --- a/web/.gitignore +++ b/web/.gitignore @@ -1,3 +1,4 @@ /INSTALL.txt /README.txt -/example.gitignore \ No newline at end of file +/example.gitignore +/.eslintrc.json diff --git a/web/themes/custom/materiotheme/assets/dist/main.css b/web/themes/custom/materiotheme/assets/dist/main.css index c1d8c9e..94c8e36 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.css +++ b/web/themes/custom/materiotheme/assets/dist/main.css @@ -1744,17 +1744,36 @@ article.card { width: 100%; height: 100%; } article.card section.images figure { + cursor: pointer; margin: 0; position: absolute; top: 0; - left: 0; } + left: 0; + transition: opacity 0.2s ease-in-out; } article.card section.images figure:first-of-type { z-index: 5; } + article.card section.images figure.show { + opacity: 1; + z-index: 6; } + article.card section.images figure.hide { + opacity: 0; } article.card section.images figure img.blank { position: absolute; top: 0; left: 0; z-index: 20; } + article.card.search-card > header { + cursor: pointer; } + article.card.modal-card { + display: flex; + flex-flow: row-reverse nowrap; + width: 850px; + height: 610px; } + article.card.modal-card > .col { + flex-basis: 50%; } + article.card.modal-card section.col-right header { + position: relative; + bottom: auto; } #main-content > article.article div.cols { display: grid; diff --git a/web/themes/custom/materiotheme/assets/dist/main.js b/web/themes/custom/materiotheme/assets/dist/main.js index 0d2aa2e..e620857 100644 --- a/web/themes/custom/materiotheme/assets/dist/main.js +++ b/web/themes/custom/materiotheme/assets/dist/main.js @@ -437,6 +437,18 @@ eval("/*!\n * vue-infinite-loading v2.4.5\n * (c) 2016-2020 PeachScript\n * MIT /***/ }), +/***/ "./node_modules/vue-js-modal/dist/index.js": +/*!*************************************************!*\ + !*** ./node_modules/vue-js-modal/dist/index.js ***! + \*************************************************/ +/*! unknown exports (runtime-defined) */ +/*! runtime requirements: module */ +/***/ ((module) => { + +eval("!function (t, e) {\n true ? module.exports = e() : 0;\n}(window, function () {\n return i = {}, o.m = n = [function (t, e, n) {\n var i = n(7);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"d763679c\", i, !1, {});\n }, function (t, e, n) {\n var i = n(10);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"6b9cc0e0\", i, !1, {});\n }, function (t, e, n) {\n var i = n(12);\n \"string\" == typeof i && (i = [[t.i, i, \"\"]]), i.locals && (t.exports = i.locals);\n (0, n(4).default)(\"663c004e\", i, !1, {});\n }, function (t, e) {\n t.exports = function (n) {\n var a = [];\n return a.toString = function () {\n return this.map(function (t) {\n var e = function (t, e) {\n var n = t[1] || \"\",\n i = t[3];\n if (!i) return n;\n\n if (e && \"function\" == typeof btoa) {\n var o = function (t) {\n return \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(t)))) + \" */\";\n }(i),\n r = i.sources.map(function (t) {\n return \"/*# sourceURL=\" + i.sourceRoot + t + \" */\";\n });\n\n return [n].concat(r).concat([o]).join(\"\\n\");\n }\n\n return [n].join(\"\\n\");\n }(t, n);\n\n return t[2] ? \"@media \" + t[2] + \"{\" + e + \"}\" : e;\n }).join(\"\");\n }, a.i = function (t, e) {\n \"string\" == typeof t && (t = [[null, t, \"\"]]);\n\n for (var n = {}, i = 0; i < this.length; i++) {\n var o = this[i][0];\n \"number\" == typeof o && (n[o] = !0);\n }\n\n for (i = 0; i < t.length; i++) {\n var r = t[i];\n \"number\" == typeof r[0] && n[r[0]] || (e && !r[2] ? r[2] = e : e && (r[2] = \"(\" + r[2] + \") and (\" + e + \")\"), a.push(r));\n }\n }, a;\n };\n }, function (t, e, n) {\n \"use strict\";\n\n function l(t, e) {\n for (var n = [], i = {}, o = 0; o < e.length; o++) {\n var r = e[o],\n a = r[0],\n s = {\n id: t + \":\" + o,\n css: r[1],\n media: r[2],\n sourceMap: r[3]\n };\n i[a] ? i[a].parts.push(s) : n.push(i[a] = {\n id: a,\n parts: [s]\n });\n }\n\n return n;\n }\n\n n.r(e), n.d(e, \"default\", function () {\n return p;\n });\n var i = \"undefined\" != typeof document;\n if (\"undefined\" != typeof DEBUG && DEBUG && !i) throw new Error(\"vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.\");\n\n var u = {},\n o = i && (document.head || document.getElementsByTagName(\"head\")[0]),\n r = null,\n a = 0,\n c = !1,\n s = function () {},\n d = null,\n h = \"data-vue-ssr-id\",\n f = \"undefined\" != typeof navigator && /msie [6-9]\\b/.test(navigator.userAgent.toLowerCase());\n\n function p(a, t, e, n) {\n c = e, d = n || {};\n var s = l(a, t);\n return v(s), function (t) {\n for (var e = [], n = 0; n < s.length; n++) {\n var i = s[n];\n (o = u[i.id]).refs--, e.push(o);\n }\n\n t ? v(s = l(a, t)) : s = [];\n\n for (n = 0; n < e.length; n++) {\n var o;\n\n if (0 === (o = e[n]).refs) {\n for (var r = 0; r < o.parts.length; r++) o.parts[r]();\n\n delete u[o.id];\n }\n }\n };\n }\n\n function v(t) {\n for (var e = 0; e < t.length; e++) {\n var n = t[e],\n i = u[n.id];\n\n if (i) {\n i.refs++;\n\n for (var o = 0; o < i.parts.length; o++) i.parts[o](n.parts[o]);\n\n for (; o < n.parts.length; o++) i.parts.push(b(n.parts[o]));\n\n i.parts.length > n.parts.length && (i.parts.length = n.parts.length);\n } else {\n var r = [];\n\n for (o = 0; o < n.parts.length; o++) r.push(b(n.parts[o]));\n\n u[n.id] = {\n id: n.id,\n refs: 1,\n parts: r\n };\n }\n }\n }\n\n function m() {\n var t = document.createElement(\"style\");\n return t.type = \"text/css\", o.appendChild(t), t;\n }\n\n function b(e) {\n var n,\n i,\n t = document.querySelector(\"style[\" + h + '~=\"' + e.id + '\"]');\n\n if (t) {\n if (c) return s;\n t.parentNode.removeChild(t);\n }\n\n if (f) {\n var o = a++;\n t = r = r || m(), n = w.bind(null, t, o, !1), i = w.bind(null, t, o, !0);\n } else t = m(), n = function (t, e) {\n var n = e.css,\n i = e.media,\n o = e.sourceMap;\n i && t.setAttribute(\"media\", i);\n d.ssrId && t.setAttribute(h, e.id);\n o && (n += \"\\n/*# sourceURL=\" + o.sources[0] + \" */\", n += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(o)))) + \" */\");\n if (t.styleSheet) t.styleSheet.cssText = n;else {\n for (; t.firstChild;) t.removeChild(t.firstChild);\n\n t.appendChild(document.createTextNode(n));\n }\n }.bind(null, t), i = function () {\n t.parentNode.removeChild(t);\n };\n\n return n(e), function (t) {\n if (t) {\n if (t.css === e.css && t.media === e.media && t.sourceMap === e.sourceMap) return;\n n(e = t);\n } else i();\n };\n }\n\n var y,\n g = (y = [], function (t, e) {\n return y[t] = e, y.filter(Boolean).join(\"\\n\");\n });\n\n function w(t, e, n, i) {\n var o = n ? \"\" : i.css;\n if (t.styleSheet) t.styleSheet.cssText = g(e, o);else {\n var r = document.createTextNode(o),\n a = t.childNodes;\n a[e] && t.removeChild(a[e]), a.length ? t.insertBefore(r, a[e]) : t.appendChild(r);\n }\n }\n }, function (t, M, e) {\n \"use strict\";\n\n (function (t) {\n var i = function () {\n if (\"undefined\" != typeof Map) return Map;\n\n function i(t, n) {\n var i = -1;\n return t.some(function (t, e) {\n return t[0] === n && (i = e, !0);\n }), i;\n }\n\n return Object.defineProperty(t.prototype, \"size\", {\n get: function () {\n return this.__entries__.length;\n },\n enumerable: !0,\n configurable: !0\n }), t.prototype.get = function (t) {\n var e = i(this.__entries__, t),\n n = this.__entries__[e];\n return n && n[1];\n }, t.prototype.set = function (t, e) {\n var n = i(this.__entries__, t);\n ~n ? this.__entries__[n][1] = e : this.__entries__.push([t, e]);\n }, t.prototype.delete = function (t) {\n var e = this.__entries__,\n n = i(e, t);\n ~n && e.splice(n, 1);\n }, t.prototype.has = function (t) {\n return !!~i(this.__entries__, t);\n }, t.prototype.clear = function () {\n this.__entries__.splice(0);\n }, t.prototype.forEach = function (t, e) {\n void 0 === e && (e = null);\n\n for (var n = 0, i = this.__entries__; n < i.length; n++) {\n var o = i[n];\n t.call(e, o[1], o[0]);\n }\n }, t;\n\n function t() {\n this.__entries__ = [];\n }\n }(),\n n = \"undefined\" != typeof window && \"undefined\" != typeof document && window.document === document,\n e = void 0 !== t && t.Math === Math ? t : \"undefined\" != typeof self && self.Math === Math ? self : \"undefined\" != typeof window && window.Math === Math ? window : Function(\"return this\")(),\n l = \"function\" == typeof requestAnimationFrame ? requestAnimationFrame.bind(e) : function (t) {\n return setTimeout(function () {\n return t(Date.now());\n }, 1e3 / 60);\n },\n u = 2;\n\n var o = [\"top\", \"right\", \"bottom\", \"left\", \"width\", \"height\", \"size\", \"weight\"],\n r = \"undefined\" != typeof MutationObserver,\n a = (s.prototype.addObserver = function (t) {\n ~this.observers_.indexOf(t) || this.observers_.push(t), this.connected_ || this.connect_();\n }, s.prototype.removeObserver = function (t) {\n var e = this.observers_,\n n = e.indexOf(t);\n ~n && e.splice(n, 1), !e.length && this.connected_ && this.disconnect_();\n }, s.prototype.refresh = function () {\n this.updateObservers_() && this.refresh();\n }, s.prototype.updateObservers_ = function () {\n var t = this.observers_.filter(function (t) {\n return t.gatherActive(), t.hasActive();\n });\n return t.forEach(function (t) {\n return t.broadcastActive();\n }), 0 < t.length;\n }, s.prototype.connect_ = function () {\n n && !this.connected_ && (document.addEventListener(\"transitionend\", this.onTransitionEnd_), window.addEventListener(\"resize\", this.refresh), r ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {\n attributes: !0,\n childList: !0,\n characterData: !0,\n subtree: !0\n })) : (document.addEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);\n }, s.prototype.disconnect_ = function () {\n n && this.connected_ && (document.removeEventListener(\"transitionend\", this.onTransitionEnd_), window.removeEventListener(\"resize\", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener(\"DOMSubtreeModified\", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);\n }, s.prototype.onTransitionEnd_ = function (t) {\n var e = t.propertyName,\n n = void 0 === e ? \"\" : e;\n o.some(function (t) {\n return !!~n.indexOf(t);\n }) && this.refresh();\n }, s.getInstance = function () {\n return this.instance_ || (this.instance_ = new s()), this.instance_;\n }, s.instance_ = null, s);\n\n function s() {\n function t() {\n r && (r = !1, i()), a && n();\n }\n\n function e() {\n l(t);\n }\n\n function n() {\n var t = Date.now();\n\n if (r) {\n if (t - s < u) return;\n a = !0;\n } else a = !(r = !0), setTimeout(e, o);\n\n s = t;\n }\n\n var i, o, r, a, s;\n this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = (i = this.refresh.bind(this), a = r = !(o = 20), s = 0, n);\n }\n\n var c = function (t, e) {\n for (var n = 0, i = Object.keys(e); n < i.length; n++) {\n var o = i[n];\n Object.defineProperty(t, o, {\n value: e[o],\n enumerable: !1,\n writable: !1,\n configurable: !0\n });\n }\n\n return t;\n },\n h = function (t) {\n return t && t.ownerDocument && t.ownerDocument.defaultView || e;\n },\n f = y(0, 0, 0, 0);\n\n function p(t) {\n return parseFloat(t) || 0;\n }\n\n function v(n) {\n for (var t = [], e = 1; e < arguments.length; e++) t[e - 1] = arguments[e];\n\n return t.reduce(function (t, e) {\n return t + p(n[\"border-\" + e + \"-width\"]);\n }, 0);\n }\n\n function d(t) {\n var e = t.clientWidth,\n n = t.clientHeight;\n if (!e && !n) return f;\n\n var i,\n o = h(t).getComputedStyle(t),\n r = function (t) {\n for (var e = {}, n = 0, i = [\"top\", \"right\", \"bottom\", \"left\"]; n < i.length; n++) {\n var o = i[n],\n r = t[\"padding-\" + o];\n e[o] = p(r);\n }\n\n return e;\n }(o),\n a = r.left + r.right,\n s = r.top + r.bottom,\n l = p(o.width),\n u = p(o.height);\n\n if (\"border-box\" === o.boxSizing && (Math.round(l + a) !== e && (l -= v(o, \"left\", \"right\") + a), Math.round(u + s) !== n && (u -= v(o, \"top\", \"bottom\") + s)), (i = t) !== h(i).document.documentElement) {\n var c = Math.round(l + a) - e,\n d = Math.round(u + s) - n;\n 1 !== Math.abs(c) && (l -= c), 1 !== Math.abs(d) && (u -= d);\n }\n\n return y(r.left, r.top, l, u);\n }\n\n var m = \"undefined\" != typeof SVGGraphicsElement ? function (t) {\n return t instanceof h(t).SVGGraphicsElement;\n } : function (t) {\n return t instanceof h(t).SVGElement && \"function\" == typeof t.getBBox;\n };\n\n function b(t) {\n return n ? m(t) ? y(0, 0, (e = t.getBBox()).width, e.height) : d(t) : f;\n var e;\n }\n\n function y(t, e, n, i) {\n return {\n x: t,\n y: e,\n width: n,\n height: i\n };\n }\n\n var g = (w.prototype.isActive = function () {\n var t = b(this.target);\n return (this.contentRect_ = t).width !== this.broadcastWidth || t.height !== this.broadcastHeight;\n }, w.prototype.broadcastRect = function () {\n var t = this.contentRect_;\n return this.broadcastWidth = t.width, this.broadcastHeight = t.height, t;\n }, w);\n\n function w(t) {\n this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = y(0, 0, 0, 0), this.target = t;\n }\n\n var _ = function (t, e) {\n var n,\n i,\n o,\n r,\n a,\n s,\n l,\n u = (i = (n = e).x, o = n.y, r = n.width, a = n.height, s = \"undefined\" != typeof DOMRectReadOnly ? DOMRectReadOnly : Object, l = Object.create(s.prototype), c(l, {\n x: i,\n y: o,\n width: r,\n height: a,\n top: o,\n right: i + r,\n bottom: a + o,\n left: i\n }), l);\n c(this, {\n target: t,\n contentRect: u\n });\n },\n E = (x.prototype.observe = function (t) {\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n\n if (\"undefined\" != typeof Element && Element instanceof Object) {\n if (!(t instanceof h(t).Element)) throw new TypeError('parameter 1 is not of type \"Element\".');\n var e = this.observations_;\n e.has(t) || (e.set(t, new g(t)), this.controller_.addObserver(this), this.controller_.refresh());\n }\n }, x.prototype.unobserve = function (t) {\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n\n if (\"undefined\" != typeof Element && Element instanceof Object) {\n if (!(t instanceof h(t).Element)) throw new TypeError('parameter 1 is not of type \"Element\".');\n var e = this.observations_;\n e.has(t) && (e.delete(t), e.size || this.controller_.removeObserver(this));\n }\n }, x.prototype.disconnect = function () {\n this.clearActive(), this.observations_.clear(), this.controller_.removeObserver(this);\n }, x.prototype.gatherActive = function () {\n var e = this;\n this.clearActive(), this.observations_.forEach(function (t) {\n t.isActive() && e.activeObservations_.push(t);\n });\n }, x.prototype.broadcastActive = function () {\n if (this.hasActive()) {\n var t = this.callbackCtx_,\n e = this.activeObservations_.map(function (t) {\n return new _(t.target, t.broadcastRect());\n });\n this.callback_.call(t, e, t), this.clearActive();\n }\n }, x.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n }, x.prototype.hasActive = function () {\n return 0 < this.activeObservations_.length;\n }, x);\n\n function x(t, e, n) {\n if (this.activeObservations_ = [], this.observations_ = new i(), \"function\" != typeof t) throw new TypeError(\"The callback provided as parameter 1 is not a function.\");\n this.callback_ = t, this.controller_ = e, this.callbackCtx_ = n;\n }\n\n var T = new (\"undefined\" != typeof WeakMap ? WeakMap : i)(),\n O = function t(e) {\n if (!(this instanceof t)) throw new TypeError(\"Cannot call a class as a function.\");\n if (!arguments.length) throw new TypeError(\"1 argument required, but only 0 present.\");\n var n = a.getInstance(),\n i = new E(e, n, this);\n T.set(this, i);\n };\n\n [\"observe\", \"unobserve\", \"disconnect\"].forEach(function (e) {\n O.prototype[e] = function () {\n var t;\n return (t = T.get(this))[e].apply(t, arguments);\n };\n });\n var S = void 0 !== e.ResizeObserver ? e.ResizeObserver : O;\n M.a = S;\n }).call(this, e(8));\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(0);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vue-modal-resizer {\\n display: block;\\n overflow: hidden;\\n position: absolute;\\n width: 12px;\\n height: 12px;\\n right: 0;\\n bottom: 0;\\n z-index: 9999999;\\n background: transparent;\\n cursor: se-resize;\\n}\\n.vue-modal-resizer::after {\\n display: block;\\n position: absolute;\\n content: '';\\n background: transparent;\\n left: 0;\\n top: 0;\\n width: 0;\\n height: 0;\\n border-bottom: 10px solid #ddd;\\n border-left: 10px solid transparent;\\n}\\n.vue-modal-resizer.clicked::after {\\n border-bottom: 10px solid #369be9;\\n}\\n\", \"\"]);\n }, function (t, e) {\n var n;\n\n n = function () {\n return this;\n }();\n\n try {\n n = n || new Function(\"return this\")();\n } catch (t) {\n \"object\" == typeof window && (n = window);\n }\n\n t.exports = n;\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(1);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vm--block-scroll {\\n overflow: hidden;\\n width: 100vw;\\n}\\n.vm--container {\\n position: fixed;\\n box-sizing: border-box;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 100vh;\\n z-index: 999;\\n}\\n.vm--overlay {\\n position: fixed;\\n box-sizing: border-box;\\n left: 0;\\n top: 0;\\n width: 100%;\\n height: 100vh;\\n background: rgba(0, 0, 0, 0.2);\\n /* z-index: 999; */\\n opacity: 1;\\n}\\n.vm--container.scrollable {\\n height: 100%;\\n min-height: 100vh;\\n overflow-y: auto;\\n -webkit-overflow-scrolling: touch;\\n}\\n.vm--modal {\\n position: relative;\\n overflow: hidden;\\n box-sizing: border-box;\\n\\n background-color: white;\\n border-radius: 3px;\\n box-shadow: 0 20px 60px -2px rgba(27, 33, 58, 0.4);\\n}\\n.vm--container.scrollable .vm--modal {\\n margin-bottom: 2px;\\n}\\n.vm--top-right-slot {\\n display: block;\\n position: absolute;\\n right: 0;\\n top: 0;\\n}\\n.vm-transition--overlay-enter-active,\\n.vm-transition--overlay-leave-active {\\n transition: all 50ms;\\n}\\n.vm-transition--overlay-enter,\\n.vm-transition--overlay-leave-active {\\n opacity: 0;\\n}\\n.vm-transition--modal-enter-active,\\n.vm-transition--modal-leave-active {\\n transition: all 400ms;\\n}\\n.vm-transition--modal-enter,\\n.vm-transition--modal-leave-active {\\n opacity: 0;\\n transform: translateY(-20px);\\n}\\n.vm-transition--default-enter-active,\\n.vm-transition--default-leave-active {\\n transition: all 2ms;\\n}\\n.vm-transition--default-enter,\\n.vm-transition--default-leave-active {\\n opacity: 0;\\n}\\n\", \"\"]);\n }, function (t, e, n) {\n \"use strict\";\n\n var i = n(2);\n n.n(i).a;\n }, function (t, e, n) {\n (t.exports = n(3)(!1)).push([t.i, \"\\n.vue-dialog {\\n font-size: 14px;\\n}\\n.vue-dialog div {\\n box-sizing: border-box;\\n}\\n.vue-dialog-content {\\n flex: 1 0 auto;\\n width: 100%;\\n padding: 14px;\\n}\\n.vue-dialog-content-title {\\n font-weight: 600;\\n padding-bottom: 14px;\\n}\\n.vue-dialog-buttons {\\n display: flex;\\n flex: 0 1 auto;\\n width: 100%;\\n border-top: 1px solid #eee;\\n}\\n.vue-dialog-buttons-none {\\n width: 100%;\\n padding-bottom: 14px;\\n}\\n.vue-dialog-button {\\n font-size: inherit;\\n background: transparent;\\n padding: 0;\\n margin: 0;\\n border: 0;\\n cursor: pointer;\\n box-sizing: border-box;\\n line-height: 40px;\\n height: 40px;\\n color: inherit;\\n font: inherit;\\n outline: none;\\n}\\n.vue-dialog-button:hover {\\n background: #f9f9f9;\\n}\\n.vue-dialog-button:active {\\n background: #f3f3f3;\\n}\\n.vue-dialog-button:not(:first-of-type) {\\n border-left: 1px solid #eee;\\n}\\n\", \"\"]);\n }, function (t, e, n) {\n \"use strict\";\n\n n.r(e), n.d(e, \"Modal\", function () {\n return W;\n }), n.d(e, \"Dialog\", function () {\n return U;\n }), n.d(e, \"version\", function () {\n return J;\n });\n\n function i() {\n var e = this,\n t = e.$createElement,\n n = e._self._c || t;\n return e.visible ? n(\"div\", {\n class: e.containerClass\n }, [n(\"transition\", {\n attrs: {\n name: e.guaranteedOverlayTransition\n },\n on: {\n \"before-enter\": e.beforeOverlayTransitionEnter,\n \"after-enter\": e.afterOverlayTransitionEnter,\n \"before-leave\": e.beforeOverlayTransitionLeave,\n \"after-leave\": e.afterOverlayTransitionLeave\n }\n }, [e.visibility.overlay ? n(\"div\", {\n staticClass: \"vm--overlay\",\n attrs: {\n \"data-modal\": e.name,\n \"aria-expanded\": e.visibility.overlay.toString()\n },\n on: {\n click: function (t) {\n return t.target !== t.currentTarget ? null : (t.stopPropagation(), e.onOverlayClick(t));\n }\n }\n }, [n(\"div\", {\n staticClass: \"vm--top-right-slot\"\n }, [e._t(\"top-right\")], 2)]) : e._e()]), e._v(\" \"), n(\"transition\", {\n attrs: {\n name: e.guaranteedModalTransition\n },\n on: {\n \"before-enter\": e.beforeModalTransitionEnter,\n \"after-enter\": e.afterModalTransitionEnter,\n \"before-leave\": e.beforeModalTransitionLeave,\n \"after-leave\": e.afterModalTransitionLeave\n }\n }, [e.visibility.modal ? n(\"div\", {\n ref: \"modal\",\n class: e.modalClass,\n style: e.modalStyle,\n attrs: {\n \"aria-expanded\": e.visibility.modal.toString(),\n role: \"dialog\",\n \"aria-modal\": \"true\"\n }\n }, [e._t(\"default\"), e._v(\" \"), e.resizable && !e.isAutoHeight ? n(\"resizer\", {\n attrs: {\n \"min-width\": e.minWidth,\n \"min-height\": e.minHeight,\n \"max-width\": e.maxWidth,\n \"max-height\": e.maxHeight\n },\n on: {\n resize: e.onModalResize\n }\n }) : e._e()], 2) : e._e()])], 1) : e._e();\n }\n\n function o() {\n var t = this.$createElement;\n return (this._self._c || t)(\"div\", {\n class: this.className\n });\n }\n\n o._withStripped = i._withStripped = !0;\n\n function h(t, e, n) {\n return n < t ? t : e < n ? e : n;\n }\n\n function r(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n function a(t, e) {\n return function (t) {\n if (Array.isArray(t)) return t;\n }(t) || function (t, e) {\n var n = [],\n i = !0,\n o = !1,\n r = void 0;\n\n try {\n for (var a, s = t[Symbol.iterator](); !(i = (a = s.next()).done) && (n.push(a.value), !e || n.length !== e); i = !0);\n } catch (t) {\n o = !0, r = t;\n } finally {\n try {\n i || null == s.return || s.return();\n } finally {\n if (o) throw r;\n }\n }\n\n return n;\n }(t, e) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n function s() {\n var t = window.innerWidth,\n e = document.documentElement.clientWidth;\n return t && e ? Math.min(t, e) : e || t;\n }\n\n function l(t) {\n return t.split(\";\").map(function (t) {\n return t.trim();\n }).filter(Boolean).map(function (t) {\n return t.split(\":\");\n }).reduce(function (t, e) {\n var n = a(e, 2);\n return function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n r(e, t, n[t]);\n });\n }\n\n return e;\n }({}, t, r({}, n[0], n[1]));\n }, {});\n }\n\n function f(t) {\n return t.touches && 0 < t.touches.length ? t.touches[0] : t;\n }\n\n var p = [\"INPUT\", \"TEXTAREA\", \"SELECT\"],\n c = function (t) {\n var e = 0 < arguments.length && void 0 !== t ? t : 0;\n return function () {\n return (e++).toString();\n };\n }(),\n u = {\n name: \"VueJsModalResizer\",\n props: {\n minHeight: {\n type: Number,\n default: 0\n },\n minWidth: {\n type: Number,\n default: 0\n },\n maxWidth: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n maxHeight: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n }\n },\n data: function () {\n return {\n clicked: !1,\n size: {}\n };\n },\n mounted: function () {\n this.$el.addEventListener(\"mousedown\", this.start, !1);\n },\n computed: {\n className: function () {\n return [\"vue-modal-resizer\", {\n clicked: this.clicked\n }];\n }\n },\n methods: {\n start: function (t) {\n this.clicked = !0, window.addEventListener(\"mousemove\", this.mousemove, !1), window.addEventListener(\"mouseup\", this.stop, !1), t.stopPropagation(), t.preventDefault();\n },\n stop: function () {\n this.clicked = !1, window.removeEventListener(\"mousemove\", this.mousemove, !1), window.removeEventListener(\"mouseup\", this.stop, !1), this.$emit(\"resize-stop\", {\n element: this.$el.parentElement,\n size: this.size\n });\n },\n mousemove: function (t) {\n this.resize(t);\n },\n resize: function (t) {\n var e = this.$el.parentElement;\n\n if (e) {\n var n = t.clientX - e.offsetLeft,\n i = t.clientY - e.offsetTop,\n o = Math.min(s(), this.maxWidth),\n r = Math.min(window.innerHeight, this.maxHeight);\n n = h(this.minWidth, o, n), i = h(this.minHeight, r, i), this.size = {\n width: n,\n height: i\n }, e.style.width = n + \"px\", e.style.height = i + \"px\", this.$emit(\"resize\", {\n element: e,\n size: this.size\n });\n }\n }\n }\n };\n\n n(6);\n\n function d(t, e, n, i, o, r, a, s) {\n var l,\n u = \"function\" == typeof t ? t.options : t;\n if (e && (u.render = e, u.staticRenderFns = n, u._compiled = !0), i && (u.functional = !0), r && (u._scopeId = \"data-v-\" + r), a ? (l = function (t) {\n (t = t || this.$vnode && this.$vnode.ssrContext || this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) || \"undefined\" == typeof __VUE_SSR_CONTEXT__ || (t = __VUE_SSR_CONTEXT__), o && o.call(this, t), t && t._registeredComponents && t._registeredComponents.add(a);\n }, u._ssrRegister = l) : o && (l = s ? function () {\n o.call(this, this.$root.$options.shadowRoot);\n } : o), l) if (u.functional) {\n u._injectStyles = l;\n var c = u.render;\n\n u.render = function (t, e) {\n return l.call(e), c(t, e);\n };\n } else {\n var d = u.beforeCreate;\n u.beforeCreate = d ? [].concat(d, l) : [l];\n }\n return {\n exports: t,\n options: u\n };\n }\n\n var v = d(u, o, [], !1, null, null, null);\n v.options.__file = \"src/components/Resizer.vue\";\n var m = v.exports;\n\n function b(t) {\n return (b = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (t) {\n return typeof t;\n } : function (t) {\n return t && \"function\" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : typeof t;\n })(t);\n }\n\n function y(t) {\n switch (b(t)) {\n case \"number\":\n return {\n type: \"px\",\n value: t\n };\n\n case \"string\":\n return function (e) {\n if (\"auto\" === e) return {\n type: e,\n value: 0\n };\n\n var t = _.find(function (t) {\n return t.regexp.test(e);\n });\n\n return t ? {\n type: t.name,\n value: parseFloat(e)\n } : {\n type: \"\",\n value: e\n };\n }(t);\n\n default:\n return {\n type: \"\",\n value: t\n };\n }\n }\n\n function g(t) {\n if (\"string\" != typeof t) return 0 <= t;\n var e = y(t);\n return (\"%\" === e.type || \"px\" === e.type) && 0 < e.value;\n }\n\n var w = \"[-+]?[0-9]*.?[0-9]+\",\n _ = [{\n name: \"px\",\n regexp: new RegExp(\"^\".concat(w, \"px$\"))\n }, {\n name: \"%\",\n regexp: new RegExp(\"^\".concat(w, \"%$\"))\n }, {\n name: \"px\",\n regexp: new RegExp(\"^\".concat(w, \"$\"))\n }],\n E = n(5),\n x = \"undefined\" != typeof window && window.ResizeObserver ? ResizeObserver : E.a;\n\n function T(t, e) {\n for (var n = 0; n < e.length; n++) {\n var i = e[n];\n i.enumerable = i.enumerable || !1, i.configurable = !0, \"value\" in i && (i.writable = !0), Object.defineProperty(t, i.key, i);\n }\n }\n\n function O(t) {\n return function (t) {\n if (Array.isArray(t)) {\n for (var e = 0, n = new Array(t.length); e < t.length; e++) n[e] = t[e];\n\n return n;\n }\n }(t) || function (t) {\n if (Symbol.iterator in Object(t) || \"[object Arguments]\" === Object.prototype.toString.call(t)) return Array.from(t);\n }(t) || function () {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n }();\n }\n\n function S(t) {\n return e = 'button:not([disabled]), select:not([disabled]), a[href]:not([disabled]), area[href]:not([disabled]), [contentEditable=\"\"]:not([disabled]), [contentEditable=\"true\"]:not([disabled]), [contentEditable=\"TRUE\"]:not([disabled]), textarea:not([disabled]), iframe:not([disabled]), input:not([disabled]), summary:not([disabled]), [tabindex]:not([tabindex=\"-1\"])', O(t.querySelectorAll(e) || []);\n var e;\n }\n\n function M(t) {\n return t == document.activeElement;\n }\n\n var k = function () {\n function t() {\n !function (t, e) {\n if (!(t instanceof e)) throw new TypeError(\"Cannot call a class as a function\");\n }(this, t), this.root = null, this.elements = [], this.onKeyDown = this.onKeyDown.bind(this), this.enable = this.enable.bind(this), this.disable = this.disable.bind(this), this.firstElement = this.firstElement.bind(this), this.lastElement = this.lastElement.bind(this);\n }\n\n var e, n, i;\n return e = t, (n = [{\n key: \"lastElement\",\n value: function () {\n return this.elements[this.elements.length - 1] || null;\n }\n }, {\n key: \"firstElement\",\n value: function () {\n return this.elements[0] || null;\n }\n }, {\n key: \"onKeyDown\",\n value: function (t) {\n var e;\n if (\"Tab\" === (e = t).key || 9 === e.keyCode) return t.shiftKey && M(this.firstElement()) ? (this.lastElement().focus(), void t.preventDefault()) : !document.activeElement || M(this.lastElement()) ? (this.firstElement().focus(), void t.preventDefault()) : void 0;\n }\n }, {\n key: \"enabled\",\n value: function () {\n return !!this.root;\n }\n }, {\n key: \"enable\",\n value: function (t) {\n if (t) {\n this.root = t, this.elements = S(this.root);\n var e = this.firstElement();\n e && e.focus(), this.root.addEventListener(\"keydown\", this.onKeyDown);\n }\n }\n }, {\n key: \"disable\",\n value: function () {\n this.root.removeEventListener(\"keydown\", this.onKeyDown), this.root = null;\n }\n }]) && T(e.prototype, n), i && T(e, i), t;\n }();\n\n function L(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n function z(t, e) {\n return function (t) {\n if (Array.isArray(t)) return t;\n }(t) || function (t, e) {\n var n = [],\n i = !0,\n o = !1,\n r = void 0;\n\n try {\n for (var a, s = t[Symbol.iterator](); !(i = (a = s.next()).done) && (n.push(a.value), !e || n.length !== e); i = !0);\n } catch (t) {\n o = !0, r = t;\n } finally {\n try {\n i || null == s.return || s.return();\n } finally {\n if (o) throw r;\n }\n }\n\n return n;\n }(t, e) || function () {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n }();\n }\n\n var $ = \"vm-transition--default\",\n A = \"enter\",\n C = \"entering\",\n j = \"leave\",\n R = \"leavng\",\n H = {\n name: \"VueJsModal\",\n props: {\n name: {\n required: !0,\n type: String\n },\n resizable: {\n type: Boolean,\n default: !1\n },\n adaptive: {\n type: Boolean,\n default: !1\n },\n draggable: {\n type: [Boolean, String],\n default: !1\n },\n scrollable: {\n type: Boolean,\n default: !1\n },\n focusTrap: {\n type: Boolean,\n default: !1\n },\n reset: {\n type: Boolean,\n default: !1\n },\n overlayTransition: {\n type: String,\n default: \"vm-transition--overlay\"\n },\n transition: {\n type: String,\n default: \"vm-transition--modal\"\n },\n clickToClose: {\n type: Boolean,\n default: !0\n },\n classes: {\n type: [String, Array],\n default: function () {\n return [];\n }\n },\n styles: {\n type: [String, Array, Object]\n },\n minWidth: {\n type: Number,\n default: 0,\n validator: function (t) {\n return 0 <= t;\n }\n },\n minHeight: {\n type: Number,\n default: 0,\n validator: function (t) {\n return 0 <= t;\n }\n },\n maxWidth: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n maxHeight: {\n type: Number,\n default: Number.MAX_SAFE_INTEGER\n },\n width: {\n type: [Number, String],\n default: 600,\n validator: g\n },\n height: {\n type: [Number, String],\n default: 300,\n validator: function (t) {\n return \"auto\" === t || g(t);\n }\n },\n shiftX: {\n type: Number,\n default: .5,\n validator: function (t) {\n return 0 <= t && t <= 1;\n }\n },\n shiftY: {\n type: Number,\n default: .5,\n validator: function (t) {\n return 0 <= t && t <= 1;\n }\n }\n },\n components: {\n Resizer: m\n },\n data: function () {\n return {\n visible: !1,\n visibility: {\n modal: !1,\n overlay: !1\n },\n overlayTransitionState: null,\n modalTransitionState: null,\n shiftLeft: 0,\n shiftTop: 0,\n modal: {\n width: 0,\n widthType: \"px\",\n height: 0,\n heightType: \"px\",\n renderedHeight: 0\n },\n viewportHeight: 0,\n viewportWidth: 0\n };\n },\n created: function () {\n this.setInitialSize();\n },\n beforeMount: function () {\n this.$modal.subscription.$on(\"toggle\", this.onToggle), window.addEventListener(\"resize\", this.onWindowResize), window.addEventListener(\"orientationchange\", this.onWindowResize), this.onWindowResize(), this.scrollable && !this.isAutoHeight && console.warn('Modal \"'.concat(this.name, '\" has scrollable flag set to true ') + 'but height is not \"auto\" ('.concat(this.height, \")\")), this.clickToClose && window.addEventListener(\"keyup\", this.onEscapeKeyUp);\n },\n mounted: function () {\n var n = this;\n this.resizeObserver = new x(function (t) {\n if (0 < t.length) {\n var e = z(t, 1)[0];\n n.modal.renderedHeight = e.contentRect.height;\n }\n }), this.$focusTrap = new k();\n },\n beforeDestroy: function () {\n this.$modal.subscription.$off(\"toggle\", this.onToggle), window.removeEventListener(\"resize\", this.onWindowResize), window.removeEventListener(\"orientationchange\", this.onWindowResize), this.clickToClose && window.removeEventListener(\"keyup\", this.onEscapeKeyUp), document.body.classList.remove(\"vm--block-scroll\");\n },\n computed: {\n guaranteedOverlayTransition: function () {\n return this.overlayTransition || $;\n },\n guaranteedModalTransition: function () {\n return this.transition || $;\n },\n isAutoHeight: function () {\n return \"auto\" === this.modal.heightType;\n },\n position: function () {\n var t = this.viewportHeight,\n e = this.viewportWidth,\n n = this.shiftLeft,\n i = this.shiftTop,\n o = this.shiftX,\n r = this.shiftY,\n a = this.trueModalWidth,\n s = this.trueModalHeight,\n l = e - a,\n u = Math.max(t - s, 0),\n c = i + r * u;\n return {\n left: parseInt(h(0, l, n + o * l)),\n top: !s && this.isAutoHeight ? void 0 : parseInt(h(0, u, c))\n };\n },\n trueModalWidth: function () {\n var t = this.viewportWidth,\n e = this.modal,\n n = this.adaptive,\n i = this.minWidth,\n o = this.maxWidth,\n r = \"%\" === e.widthType ? t / 100 * e.width : e.width;\n\n if (n) {\n var a = Math.max(i, Math.min(t, o));\n return h(i, a, r);\n }\n\n return r;\n },\n trueModalHeight: function () {\n var t = this.viewportHeight,\n e = this.modal,\n n = this.isAutoHeight,\n i = this.adaptive,\n o = this.minHeight,\n r = this.maxHeight,\n a = \"%\" === e.heightType ? t / 100 * e.height : e.height;\n if (n) return this.modal.renderedHeight;\n\n if (i) {\n var s = Math.max(o, Math.min(t, r));\n return h(o, s, a);\n }\n\n return a;\n },\n autoHeight: function () {\n return this.adaptive && this.modal.renderedHeight >= this.viewportHeight ? Math.max(this.minHeight, this.viewportHeight) + \"px\" : \"auto\";\n },\n containerClass: function () {\n return [\"vm--container\", this.scrollable && this.isAutoHeight && \"scrollable\"];\n },\n modalClass: function () {\n return [\"vm--modal\", this.classes];\n },\n stylesProp: function () {\n return \"string\" == typeof this.styles ? l(this.styles) : this.styles;\n },\n modalStyle: function () {\n return [this.stylesProp, {\n top: this.position.top + \"px\",\n left: this.position.left + \"px\",\n width: this.trueModalWidth + \"px\",\n height: this.isAutoHeight ? this.autoHeight : this.trueModalHeight + \"px\"\n }];\n },\n isComponentReadyToBeDestroyed: function () {\n return this.overlayTransitionState === j && this.modalTransitionState === j;\n }\n },\n watch: {\n isComponentReadyToBeDestroyed: function (t) {\n t && (this.visible = !1);\n }\n },\n methods: {\n startTransitionEnter: function () {\n this.visibility.overlay = !0, this.visibility.modal = !0;\n },\n startTransitionLeave: function () {\n this.visibility.overlay = !1, this.visibility.modal = !1;\n },\n beforeOverlayTransitionEnter: function () {\n this.overlayTransitionState = C;\n },\n afterOverlayTransitionEnter: function () {\n this.overlayTransitionState = A;\n },\n beforeOverlayTransitionLeave: function () {\n this.overlayTransitionState = R;\n },\n afterOverlayTransitionLeave: function () {\n this.overlayTransitionState = j;\n },\n beforeModalTransitionEnter: function () {\n var t = this;\n this.modalTransitionState = C, this.$nextTick(function () {\n t.resizeObserver.observe(t.$refs.modal);\n });\n },\n afterModalTransitionEnter: function () {\n this.modalTransitionState = A, this.draggable && this.addDraggableListeners(), this.focusTrap && this.$focusTrap.enable(this.$refs.modal);\n var t = this.createModalEvent({\n state: \"opened\"\n });\n this.$emit(\"opened\", t);\n },\n beforeModalTransitionLeave: function () {\n this.modalTransitionState = R, this.resizeObserver.unobserve(this.$refs.modal), this.$focusTrap.enabled() && this.$focusTrap.disable();\n },\n afterModalTransitionLeave: function () {\n this.modalTransitionState = j;\n var t = this.createModalEvent({\n state: \"closed\"\n });\n this.$emit(\"closed\", t);\n },\n onToggle: function (t, e, n) {\n if (this.name === t) {\n var i = void 0 === e ? !this.visible : e;\n this.toggle(i, n);\n }\n },\n setInitialSize: function () {\n var t = y(this.width),\n e = y(this.height);\n this.modal.width = t.value, this.modal.widthType = t.type, this.modal.height = e.value, this.modal.heightType = e.type;\n },\n onEscapeKeyUp: function (t) {\n 27 === t.which && this.visible && this.$modal.hide(this.name);\n },\n onWindowResize: function () {\n this.viewportWidth = s(), this.viewportHeight = window.innerHeight, this.ensureShiftInWindowBounds();\n },\n createModalEvent: function (t) {\n var e = 0 < arguments.length && void 0 !== t ? t : {};\n return function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n L(e, t, n[t]);\n });\n }\n\n return e;\n }({\n name: this.name,\n ref: this.$refs.modal || null\n }, e);\n },\n onModalResize: function (t) {\n this.modal.widthType = \"px\", this.modal.width = t.size.width, this.modal.heightType = \"px\", this.modal.height = t.size.height;\n var e = this.modal.size;\n this.$emit(\"resize\", this.createModalEvent({\n size: e\n }));\n },\n open: function (t) {\n var e = this;\n this.reset && (this.setInitialSize(), this.shiftLeft = 0, this.shiftTop = 0), this.scrollable && document.body.classList.add(\"vm--block-scroll\");\n var n = !1,\n i = this.createModalEvent({\n cancel: function () {\n n = !0;\n },\n state: \"before-open\",\n params: t\n });\n this.$emit(\"before-open\", i), n ? this.scrollable && document.body.classList.remove(\"vm--block-scroll\") : (\"undefined\" != typeof document && document.activeElement && \"BODY\" !== document.activeElement.tagName && document.activeElement.blur && document.activeElement.blur(), this.visible = !0, this.$nextTick(function () {\n e.startTransitionEnter();\n }));\n },\n close: function (t) {\n this.scrollable && document.body.classList.remove(\"vm--block-scroll\");\n var e = !1,\n n = this.createModalEvent({\n cancel: function () {\n e = !0;\n },\n state: \"before-close\",\n params: t\n });\n this.$emit(\"before-close\", n), e || this.startTransitionLeave();\n },\n toggle: function (t, e) {\n this.visible !== t && (t ? this.open(e) : this.close(e));\n },\n getDraggableElement: function () {\n return !0 === this.draggable ? this.$refs.modal : \"string\" == typeof this.draggable ? this.$refs.modal.querySelector(this.draggable) : null;\n },\n onOverlayClick: function () {\n this.clickToClose && this.toggle(!1);\n },\n addDraggableListeners: function () {\n var a = this,\n t = this.getDraggableElement();\n\n if (t) {\n var s = 0,\n l = 0,\n u = 0,\n c = 0,\n e = function (t) {\n var e = t.target;\n\n if (!(n = e) || -1 === p.indexOf(n.nodeName)) {\n var n,\n i = f(t),\n o = i.clientX,\n r = i.clientY;\n document.addEventListener(\"mousemove\", d), document.addEventListener(\"touchmove\", d), document.addEventListener(\"mouseup\", h), document.addEventListener(\"touchend\", h), s = o, l = r, u = a.shiftLeft, c = a.shiftTop;\n }\n },\n d = function (t) {\n var e = f(t),\n n = e.clientX,\n i = e.clientY;\n a.shiftLeft = u + n - s, a.shiftTop = c + i - l, t.preventDefault();\n },\n h = function t(e) {\n a.ensureShiftInWindowBounds(), document.removeEventListener(\"mousemove\", d), document.removeEventListener(\"touchmove\", d), document.removeEventListener(\"mouseup\", t), document.removeEventListener(\"touchend\", t), e.preventDefault();\n };\n\n t.addEventListener(\"mousedown\", e), t.addEventListener(\"touchstart\", e);\n }\n },\n ensureShiftInWindowBounds: function () {\n var t = this.viewportHeight,\n e = this.viewportWidth,\n n = this.shiftLeft,\n i = this.shiftTop,\n o = this.shiftX,\n r = this.shiftY,\n a = this.trueModalWidth,\n s = this.trueModalHeight,\n l = e - a,\n u = Math.max(t - s, 0),\n c = n + o * l,\n d = i + r * u;\n this.shiftLeft -= c - h(0, l, c), this.shiftTop -= d - h(0, u, d);\n }\n }\n },\n N = (n(9), d(H, i, [], !1, null, null, null));\n N.options.__file = \"src/components/Modal.vue\";\n\n function D() {\n var n = this,\n t = n.$createElement,\n i = n._self._c || t;\n return i(n.$modal.context.componentName, {\n tag: \"component\",\n attrs: {\n name: \"dialog\",\n height: \"auto\",\n classes: [\"vue-dialog\", this.params.class],\n width: n.width,\n \"shift-y\": .3,\n adaptive: !0,\n \"focus-trap\": !0,\n clickToClose: n.clickToClose,\n transition: n.transition\n },\n on: {\n \"before-open\": n.beforeOpened,\n \"before-close\": n.beforeClosed,\n opened: function (t) {\n return n.$emit(\"opened\", t);\n },\n closed: function (t) {\n return n.$emit(\"closed\", t);\n }\n }\n }, [i(\"div\", {\n staticClass: \"vue-dialog-content\"\n }, [n.params.title ? i(\"div\", {\n staticClass: \"vue-dialog-content-title\",\n domProps: {\n innerHTML: n._s(n.params.title || \"\")\n }\n }) : n._e(), n._v(\" \"), n.params.component ? i(n.params.component, n._b({\n tag: \"component\"\n }, \"component\", n.params.props, !1)) : i(\"div\", {\n domProps: {\n innerHTML: n._s(n.params.text || \"\")\n }\n })], 1), n._v(\" \"), n.buttons ? i(\"div\", {\n staticClass: \"vue-dialog-buttons\"\n }, n._l(n.buttons, function (t, e) {\n return i(\"button\", {\n key: e,\n class: t.class || \"vue-dialog-button\",\n style: n.buttonStyle,\n attrs: {\n type: \"button\",\n tabindex: \"0\"\n },\n domProps: {\n innerHTML: n._s(t.title)\n },\n on: {\n click: function (t) {\n return t.stopPropagation(), n.click(e, t);\n }\n }\n }, [n._v(n._s(t.title))]);\n }), 0) : i(\"div\", {\n staticClass: \"vue-dialog-buttons-none\"\n })]);\n }\n\n var W = N.exports;\n D._withStripped = !0;\n var P = {\n name: \"VueJsDialog\",\n props: {\n width: {\n type: [Number, String],\n default: 400\n },\n clickToClose: {\n type: Boolean,\n default: !0\n },\n transition: {\n type: String\n }\n },\n data: function () {\n return {\n params: {}\n };\n },\n computed: {\n buttons: function () {\n return this.params.buttons || [];\n },\n buttonStyle: function () {\n return {\n flex: \"1 1 \".concat(100 / this.buttons.length, \"%\")\n };\n }\n },\n methods: {\n beforeOpened: function (t) {\n this.params = t.params || {}, this.$emit(\"before-opened\", t);\n },\n beforeClosed: function (t) {\n this.params = {}, this.$emit(\"before-closed\", t);\n },\n click: function (t, e, n) {\n var i = 2 < arguments.length && void 0 !== n ? n : \"click\",\n o = this.buttons[t],\n r = null == o ? void 0 : o.handler;\n \"function\" == typeof r && r(t, e, {\n source: i\n });\n }\n }\n },\n B = (n(11), d(P, D, [], !1, null, null, null));\n B.options.__file = \"src/components/Dialog.vue\";\n\n function I() {\n var n = this,\n t = n.$createElement,\n i = n._self._c || t;\n return i(\"div\", {\n attrs: {\n id: \"modals-container\"\n }\n }, n._l(n.modals, function (e) {\n return i(\"modal\", n._g(n._b({\n key: e.id,\n on: {\n closed: function (t) {\n return n.remove(e.id);\n }\n }\n }, \"modal\", e.modalAttrs, !1), e.modalListeners), [i(e.component, n._g(n._b({\n tag: \"component\",\n on: {\n close: function (t) {\n return n.$modal.hide(e.modalAttrs.name, t);\n }\n }\n }, \"component\", e.componentAttrs, !1), n.$listeners))], 1);\n }), 1);\n }\n\n var U = B.exports;\n\n function X(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n I._withStripped = !0;\n var F = d({\n data: function () {\n return {\n modals: []\n };\n },\n created: function () {\n this.$root.__modalContainer = this;\n },\n mounted: function () {\n var t = this;\n this.$modal.subscription.$on(\"hide-all\", function () {\n t.modals = [];\n });\n },\n methods: {\n add: function (t, e, n, i) {\n var o = this,\n r = 1 < arguments.length && void 0 !== e ? e : {},\n a = 2 < arguments.length && void 0 !== n ? n : {},\n s = 3 < arguments.length && void 0 !== i ? i : {},\n l = c(),\n u = a.name || \"dynamic_modal_\" + l;\n this.modals.push({\n id: l,\n modalAttrs: function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n X(e, t, n[t]);\n });\n }\n\n return e;\n }({}, a, {\n name: u\n }),\n modalListeners: s,\n component: t,\n componentAttrs: r\n }), this.$nextTick(function () {\n o.$modal.show(u);\n });\n },\n remove: function (e) {\n var t = this.modals.findIndex(function (t) {\n return t.id === e;\n });\n -1 !== t && this.modals.splice(t, 1);\n }\n }\n }, I, [], !1, null, null, null);\n F.options.__file = \"src/components/ModalsContainer.vue\";\n var G = F.exports;\n\n function V(t) {\n return (V = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (t) {\n return typeof t;\n } : function (t) {\n return t && \"function\" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? \"symbol\" : typeof t;\n })(t);\n }\n\n function q(t, e, n) {\n return e in t ? Object.defineProperty(t, e, {\n value: n,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : t[e] = n, t;\n }\n\n var K = function (i, t) {\n function o(t, e, n, i) {\n var o,\n r = 2 < arguments.length && void 0 !== n ? n : {},\n a = 3 < arguments.length ? i : void 0,\n s = null === (o = c.root) || void 0 === o ? void 0 : o.__modalContainer,\n l = u.dynamicDefaults || {};\n null != s && s.add(t, e, function (e) {\n for (var t = 1; t < arguments.length; t++) {\n var n = null != arguments[t] ? arguments[t] : {},\n i = Object.keys(n);\n \"function\" == typeof Object.getOwnPropertySymbols && (i = i.concat(Object.getOwnPropertySymbols(n).filter(function (t) {\n return Object.getOwnPropertyDescriptor(n, t).enumerable;\n }))), i.forEach(function (t) {\n q(e, t, n[t]);\n });\n }\n\n return e;\n }({}, l, r), a);\n }\n\n var u = 1 < arguments.length && void 0 !== t ? t : {},\n r = new i(),\n c = {\n root: null,\n componentName: u.componentName || \"Modal\"\n };\n return {\n context: c,\n subscription: r,\n show: function () {\n for (var t = arguments.length, e = new Array(t), n = 0; n < t; n++) e[n] = arguments[n];\n\n var i = e[0];\n\n switch (V(i)) {\n case \"string\":\n (function (t, e) {\n r.$emit(\"toggle\", t, !0, e);\n }).apply(void 0, e);\n break;\n\n case \"object\":\n case \"function\":\n o.apply(void 0, e);\n break;\n\n default:\n console.warn(\"[vue-js-modal] $modal() received an unsupported argument as a first argument.\", i);\n }\n },\n hide: function (t, e) {\n r.$emit(\"toggle\", t, !1, e);\n },\n hideAll: function () {\n r.$emit(\"hide-all\");\n },\n toggle: function (t, e) {\n r.$emit(\"toggle\", t, void 0, e);\n },\n setDynamicModalContainer: function (t) {\n c.root = t;\n var e,\n n = (e = document.createElement(\"div\"), document.body.appendChild(e), e);\n new i({\n parent: t,\n render: function (t) {\n return t(G);\n }\n }).$mount(n);\n }\n };\n },\n Y = {\n install: function (e, t) {\n var n = 1 < arguments.length && void 0 !== t ? t : {};\n\n if (!e.prototype.$modal) {\n var i = new K(e, n);\n Object.defineProperty(e.prototype, \"$modal\", {\n get: function () {\n if (this instanceof e) {\n var t = this.$root;\n i.context.root || i.setDynamicModalContainer(t);\n }\n\n return i;\n }\n }), e.component(i.context.componentName, W), n.dialog && e.component(\"VDialog\", U);\n }\n }\n },\n J = \"__VERSION__\";\n\n e.default = Y;\n }], o.c = i, o.d = function (t, e, n) {\n o.o(t, e) || Object.defineProperty(t, e, {\n enumerable: !0,\n get: n\n });\n }, o.r = function (t) {\n \"undefined\" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(t, Symbol.toStringTag, {\n value: \"Module\"\n }), Object.defineProperty(t, \"__esModule\", {\n value: !0\n });\n }, o.t = function (e, t) {\n if (1 & t && (e = o(e)), 8 & t) return e;\n if (4 & t && \"object\" == typeof e && e && e.__esModule) return e;\n var n = Object.create(null);\n if (o.r(n), Object.defineProperty(n, \"default\", {\n enumerable: !0,\n value: e\n }), 2 & t && \"string\" != typeof e) for (var i in e) o.d(n, i, function (t) {\n return e[t];\n }.bind(null, i));\n return n;\n }, o.n = function (t) {\n var e = t && t.__esModule ? function () {\n return t.default;\n } : function () {\n return t;\n };\n return o.d(e, \"a\", e), e;\n }, o.o = function (t, e) {\n return Object.prototype.hasOwnProperty.call(t, e);\n }, o.p = \"/dist/\", o(o.s = 13);\n\n function o(t) {\n if (i[t]) return i[t].exports;\n var e = i[t] = {\n i: t,\n l: !1,\n exports: {}\n };\n return n[t].call(e.exports, e, e.exports, o), e.l = !0, e.exports;\n }\n\n var n, i;\n});\n\n//# sourceURL=webpack://materio.com/./node_modules/vue-js-modal/dist/index.js?"); + +/***/ }), + /***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=script&lang=js&": /*!***********************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Block/LoginBlock.vue?vue&type=script&lang=js& ***! @@ -513,7 +525,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nvar _cardMixins = _interopRequireDefault(__webpack_require__(/*! vuejs/components/cardMixins */ \"./web/themes/custom/materiotheme/vuejs/components/cardMixins.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Card\",\n props: ['item'],\n mixins: [_cardMixins.default],\n data: function data() {\n return {\n blanksrc: \"\".concat(drupalSettings.path.themePath, \"/assets/img/blank.gif\"),\n loadingFlag: false\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n flagcolls: function flagcolls(state) {\n return state.User.flagcolls;\n }\n })),\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n flagUnflag: 'User/flagUnflag'\n })), {}, {\n flagIsActive: function flagIsActive(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return this.flagcolls[collid].items_uuids.indexOf(this.item.uuid) !== -1;\n },\n flagIsLoading: function flagIsLoading(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return collid === this.loadingFlag;\n },\n onFlagActionCard: function onFlagActionCard(e) {\n var _this = this;\n\n console.log(\"Card onFlagActionCard\", e);\n\n if (!this.loadingFlag) {\n var collid = e.target.getAttribute('collid');\n var isActive = this.flagIsActive(collid);\n var action = isActive ? 'unflag' : 'flag'; // console.log('collid', collid);\n // console.log(\"this.item\", this.item);\n\n this.loadingFlag = collid;\n this.flagUnflag({\n action: action,\n uuid: this.item.uuid,\n collid: collid\n }).then(function (data) {\n console.log(\"onFlagActionCard then\", data);\n _this.loadingFlag = false;\n });\n }\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nvar _cardMixins = _interopRequireDefault(__webpack_require__(/*! vuejs/components/cardMixins */ \"./web/themes/custom/materiotheme/vuejs/components/cardMixins.js\"));\n\nvar _ModalCard = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/ModalCard */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Card\",\n props: ['item'],\n mixins: [_cardMixins.default],\n components: {\n ModalCard: _ModalCard.default\n },\n data: function data() {\n return {\n blanksrc: \"\".concat(drupalSettings.path.themePath, \"/assets/img/blank.gif\"),\n loadingFlag: false,\n lightbox_index: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n flagcolls: function flagcolls(state) {\n return state.User.flagcolls;\n }\n })),\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n flagUnflag: 'User/flagUnflag'\n })), {}, {\n flagIsActive: function flagIsActive(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return this.flagcolls[collid].items_uuids.indexOf(this.item.uuid) !== -1;\n },\n flagIsLoading: function flagIsLoading(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return collid === this.loadingFlag;\n },\n onFlagActionCard: function onFlagActionCard(e) {\n var _this = this;\n\n console.log(\"Card onFlagActionCard\", e);\n\n if (!this.loadingFlag) {\n var collid = e.target.getAttribute('collid');\n var isActive = this.flagIsActive(collid);\n var action = isActive ? 'unflag' : 'flag'; // console.log('collid', collid);\n // console.log(\"this.item\", this.item);\n\n this.loadingFlag = collid;\n this.flagUnflag({\n action: action,\n uuid: this.item.uuid,\n collid: collid\n }).then(function (data) {\n console.log(\"onFlagActionCard then\", data);\n _this.loadingFlag = false;\n });\n }\n },\n openModalCard: function openModalCard(e) {\n this.$modal.show(_ModalCard.default, {\n item: this.item\n }, {\n draggable: true,\n width: '850px',\n height: '610px'\n });\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -565,6 +577,22 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ }), +/***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js&": +/*!************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js& ***! + \************************************************************************************************************************************************************************************************************/ +/*! flagged exports */ +/*! export __esModule [provided] [no usage info] [missing usage info prevents renaming] */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_exports__, __webpack_require__ */ +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +"use strict"; +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nvar _cardMixins = _interopRequireDefault(__webpack_require__(/*! vuejs/components/cardMixins */ \"./web/themes/custom/materiotheme/vuejs/components/cardMixins.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"ModalCard\",\n props: ['item'],\n mixins: [_cardMixins.default],\n data: function data() {\n return {\n blanksrc: \"\".concat(drupalSettings.path.themePath, \"/assets/img/blank.gif\"),\n loadingFlag: false,\n lightbox_index: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n flagcolls: function flagcolls(state) {\n return state.User.flagcolls;\n }\n })),\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n flagUnflag: 'User/flagUnflag'\n })), {}, {\n flagIsActive: function flagIsActive(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return this.flagcolls[collid].items_uuids.indexOf(this.item.uuid) !== -1;\n },\n flagIsLoading: function flagIsLoading(collid) {\n // console.log(this.item.uuid);\n // console.log(this.flagcolls[collid].items_uuids);\n return collid === this.loadingFlag;\n },\n onFlagActionCard: function onFlagActionCard(e) {\n var _this = this;\n\n console.log(\"Card onFlagActionCard\", e);\n\n if (!this.loadingFlag) {\n var collid = e.target.getAttribute('collid');\n var isActive = this.flagIsActive(collid);\n var action = isActive ? 'unflag' : 'flag'; // console.log('collid', collid);\n // console.log(\"this.item\", this.item);\n\n this.loadingFlag = collid;\n this.flagUnflag({\n action: action,\n uuid: this.item.uuid,\n collid: collid\n }).then(function (data) {\n console.log(\"onFlagActionCard then\", data);\n _this.loadingFlag = false;\n });\n }\n }\n })\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); + +/***/ }), + /***/ "./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=script&lang=js&": /*!**********************************************************************************************************************************************************************************************************!*\ !*** ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=script&lang=js& ***! @@ -689,7 +717,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _wrapRegExp(re, groups) { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _RegExp = _wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = _RegExp.call(this, re, flags); _groups.set(_this, groups || _groups.get(re)); return _this; } _inherits(BabelRegExp, _RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === \"string\") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\\$<([^>]+)>/g, function (_, name) { return \"$\" + groups[name]; })); } else if (typeof substitution === \"function\") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = []; args.push.apply(args, arguments); if (_typeof(args[args.length - 1]) !== \"object\") { args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Article\",\n router: _route.default,\n store: _store.default,\n props: ['item'],\n data: function data() {\n return {\n index: -1,\n prevnext: {},\n uuid: null,\n content: null,\n loading: true,\n lightbox_index: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n this.getArticle();\n },\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n getItemIndex: 'Blabla/getItemIndex',\n getPrevNextItems: 'Blabla/getPrevNextItems'\n })), {}, {\n getArticle: function getArticle() {\n var _this = this;\n\n console.log(this.$route); // get the article uuid\n\n if (this.$route.query.uuid) {\n // we come from internal link with vuejs\n // directly record uuid\n this.uuid = this.$route.query.uuid;\n } else if (drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article') {\n // we landed in an internal page\n // get the uuid from drupalDeclouped, provided by materio_decoupled.module\n this.uuid = drupalDecoupled.entity_uuid;\n }\n\n if (this.uuid) {\n this.loadArticle(); // get the prev next items\n\n if (!this.items.length) {\n // if items list not yet loaded preload them\n this.getItems().then(function () {\n // then get the index\n _this.getIndex();\n });\n } else {\n // or directly get the index\n this.getIndex();\n }\n } else {\n // if for any reason we dont have the uuid\n // redirect to home\n this.$route.replace('home');\n }\n },\n getIndex: function getIndex() {\n var _this2 = this;\n\n console.log(\"Article getIndex\");\n this.getItemIndex(this.uuid).then(function (index) {\n _this2.index = index; // console.log('article index', index, this);\n\n _this2.getPrevNextItems(index).then(function (pn) {\n _this2.prevnext = pn;\n });\n });\n },\n loadArticle: function loadArticle() {\n var _this3 = this;\n\n console.log('loadArticle', this.uuid);\n this.loading = true;\n var params = {\n include: 'field_linked_materials.images,field_showroom,field_tags,field_thesaurus,field_visuel,uid'\n };\n\n var q = _querystringEs.default.stringify(params);\n\n _jsonAxios.JSONAPI.get(\"node/article/\".concat(this.uuid, \"?\").concat(q)).then(function (_ref) {\n var data = _ref.data;\n console.log('loadArticle data', data);\n\n _this3.parseData(data);\n }).catch(function (error) {\n console.warn('Issue with loadArticle', error);\n Promise.reject(error);\n });\n },\n parseData: function parseData(data) {\n var _this4 = this;\n\n var attrs = data.data.attributes;\n var relations = data.data.relationships;\n console.log('relations', relations);\n var inc = data.included;\n console.log('included', inc);\n this.content = {\n title: attrs.title,\n body: attrs.body.value\n }; // build lightbox array\n // will be filled by videos and field_visuel\n\n this.content.lightbox_items = []; // parse embeded videos pushing it in lightbox\n\n for (var key in attrs.field_video) {\n var videolink = attrs.field_video[key]; // console.log('videolink', videolink);\n\n var provider_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/(www\\.)?(youtube|vimeo)\\.com\\/.+/, {\n provider: 2\n });\n\n var match = provider_regex.exec(videolink); // console.log('provider', match.groups.provider);\n\n var video_id = null;\n var video_thumb = null;\n\n switch (match.groups.provider) {\n case 'vimeo':\n var vimeo_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/vimeo\\.com\\/([0-9]+)/, {\n id: 1\n });\n\n video_id = vimeo_regex.exec(videolink).groups.id || null; // TODO: get the vimeo thumb https://coderwall.com/p/fdrdmg/get-a-thumbnail-from-a-vimeo-video\n\n video_thumb = \"http://blogpeda.ac-poitiers.fr/ent-lyc/files/2015/06/Vimeo_icon_block.png\";\n break;\n\n case 'youtube':\n var youtube_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/(www\\.)?youtube\\.com\\/watch\\?v=(.+)/, {\n id: 2\n });\n\n video_id = youtube_regex.exec(videolink).groups.id || null;\n video_thumb = \"http://img.youtube.com/vi/\" + video_id + \"/0.jpg\";\n break;\n } // console.log('video_id', video_id);\n\n\n this.content.lightbox_items.push({\n src: videolink,\n title: \"\",\n description: \"\",\n thumb: video_thumb\n }); // this.content.videos.push({\n // provider: match.groups.provider,\n // id: video_id,\n // href: videolink\n // });\n } // parse all relationships\n\n\n var _loop = function _loop(_key) {\n // skip loop if the property is from prototype\n if (!relations.hasOwnProperty(_key)) return \"continue\";\n var relation_obj = relations[_key];\n console.log(\"relation\", _key, relation_obj); // console.log('typeof relation_obj.data', typeof relation_obj.data);\n\n if (!relation_obj.data) return \"continue\"; // showroom is unique field so no array in data\n // we parse it here\n\n switch (_key) {\n case 'field_showroom':\n var included = inc.find(function (i) {\n return i.id == relation_obj.data.id;\n }); // console.log('included',included);\n\n _this4.content[_key] = included.attributes;\n break;\n } // skip relation_obj if data is not array\n\n\n if (!Array.isArray(relation_obj.data)) return \"continue\"; // create empty field array\n\n _this4.content[_key] = []; // parse relationship values using included\n\n var field = {}; // loop through all relation items\n\n relation_obj.data.forEach(function (e) {\n // get the included values for each item using id\n var included = inc.find(function (i) {\n return i.id == e.id;\n }); // if we not found an included item skip the item\n\n if (typeof included != 'undefined') {\n // fill the item values\n switch (_key) {\n case 'field_visuel':\n // build the field object (not used for now)\n field = e.meta;\n field.id = e.id;\n field.src = included.attributes.uri.url;\n field.thumb = included.links.article_card_medium.href;\n break;\n\n case 'field_linked_materials':\n field = included.attributes;\n field.id = field.uuid = included.id; // get the linked material included images\n\n field.images = [];\n included.relationships.images.data.forEach(function (img) {\n // console.log('href', img.meta.imageDerivatives.links.card_medium.href);\n if (img.meta.imageDerivatives) {\n field.images.push({\n title: img.meta.title,\n url: img.meta.imageDerivatives.links.card_medium.href\n });\n }\n });\n break;\n\n case 'field_thesaurus':\n case 'field_tags':\n field = included.attributes;\n field.id = included.id;\n break;\n\n default:\n }\n\n _this4.content[_key].push(field);\n }\n });\n };\n\n for (var _key in relations) {\n var _ret = _loop(_key);\n\n if (_ret === \"continue\") continue;\n } // extract first visuel as accroche\n\n\n this.content.image_accroche = this.content.field_visuel.shift(); // fill the lightbox\n\n var _iterator = _createForOfIteratorHelper(this.content.field_visuel),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var visuel = _step.value;\n this.content.lightbox_items.push(visuel);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n console.log('this.content.lightbox_items', this.content.lightbox_items); // update main page title\n\n this.$store.commit('Common/setPagetitle', this.content.title);\n this.loading = false;\n console.log('article.content', this.content);\n },\n onNext: function onNext() {\n // console.log('clicked on next', this.prevnext.next);\n var alias = this.prevnext.next.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.next.uuid\n }\n });\n },\n onPrev: function onPrev() {\n // console.log('clicked on prev', this.prevnext.next);\n var alias = this.prevnext.prev.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.prev.uuid\n }\n });\n },\n setLightboxIndex: function setLightboxIndex(index) {\n this.lightbox_index = index;\n }\n }),\n components: {\n Card: _Card.default\n },\n watch: {\n '$route': function $route(to, from) {\n console.log('route change');\n this.getArticle();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _Card = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/Card */ \"./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _wrapRegExp(re, groups) { _wrapRegExp = function _wrapRegExp(re, groups) { return new BabelRegExp(re, undefined, groups); }; var _RegExp = _wrapNativeSuper(RegExp); var _super = RegExp.prototype; var _groups = new WeakMap(); function BabelRegExp(re, flags, groups) { var _this = _RegExp.call(this, re, flags); _groups.set(_this, groups || _groups.get(re)); return _this; } _inherits(BabelRegExp, _RegExp); BabelRegExp.prototype.exec = function (str) { var result = _super.exec.call(this, str); if (result) result.groups = buildGroups(result, this); return result; }; BabelRegExp.prototype[Symbol.replace] = function (str, substitution) { if (typeof substitution === \"string\") { var groups = _groups.get(this); return _super[Symbol.replace].call(this, str, substitution.replace(/\\$<([^>]+)>/g, function (_, name) { return \"$\" + groups[name]; })); } else if (typeof substitution === \"function\") { var _this = this; return _super[Symbol.replace].call(this, str, function () { var args = []; args.push.apply(args, arguments); if (_typeof(args[args.length - 1]) !== \"object\") { args.push(buildGroups(args, _this)); } return substitution.apply(this, args); }); } else { return _super[Symbol.replace].call(this, str, substitution); } }; function buildGroups(result, re) { var g = _groups.get(re); return Object.keys(g).reduce(function (groups, name) { groups[name] = result[g[name]]; return groups; }, Object.create(null)); } return _wrapRegExp.apply(this, arguments); }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nvar _default = {\n name: \"Article\",\n router: _route.default,\n store: _store.default,\n props: ['item'],\n data: function data() {\n return {\n index: -1,\n prevnext: {},\n uuid: null,\n content: null,\n loading: true,\n lightbox_index: null\n };\n },\n computed: _objectSpread({}, (0, _vuex.mapState)({\n items: function items(state) {\n return state.Blabla.items;\n }\n })),\n created: function created() {\n this.getArticle();\n },\n methods: _objectSpread(_objectSpread({}, (0, _vuex.mapActions)({\n getItems: 'Blabla/getItems',\n getItemIndex: 'Blabla/getItemIndex',\n getPrevNextItems: 'Blabla/getPrevNextItems'\n })), {}, {\n getArticle: function getArticle() {\n var _this = this;\n\n console.log(this.$route); // get the article uuid\n\n if (this.$route.query.uuid) {\n // we come from internal link with vuejs\n // directly record uuid\n this.uuid = this.$route.query.uuid;\n } else if (drupalDecoupled.entity_type == 'node' && drupalDecoupled.entity_bundle == 'article') {\n // we landed in an internal page\n // get the uuid from drupalDeclouped, provided by materio_decoupled.module\n this.uuid = drupalDecoupled.entity_uuid;\n }\n\n if (this.uuid) {\n this.loadArticle(); // get the prev next items\n\n if (!this.items.length) {\n // if items list not yet loaded preload them\n this.getItems().then(function () {\n // then get the index\n _this.getIndex();\n });\n } else {\n // or directly get the index\n this.getIndex();\n }\n } else {\n // if for any reason we dont have the uuid\n // redirect to home\n this.$route.replace('home');\n }\n },\n getIndex: function getIndex() {\n var _this2 = this;\n\n console.log(\"Article getIndex\");\n this.getItemIndex(this.uuid).then(function (index) {\n _this2.index = index; // console.log('article index', index, this);\n\n _this2.getPrevNextItems(index).then(function (pn) {\n _this2.prevnext = pn;\n });\n });\n },\n loadArticle: function loadArticle() {\n var _this3 = this;\n\n console.log('loadArticle', this.uuid);\n this.loading = true;\n var params = {\n include: 'field_linked_materials.images,field_showroom,field_tags,field_thesaurus,field_visuel,uid'\n };\n\n var q = _querystringEs.default.stringify(params);\n\n _jsonAxios.JSONAPI.get(\"node/article/\".concat(this.uuid, \"?\").concat(q)).then(function (_ref) {\n var data = _ref.data;\n console.log('loadArticle data', data);\n\n _this3.parseData(data);\n }).catch(function (error) {\n console.warn('Issue with loadArticle', error);\n Promise.reject(error);\n });\n },\n parseData: function parseData(data) {\n var _this4 = this;\n\n var attrs = data.data.attributes;\n var relations = data.data.relationships;\n console.log('relations', relations);\n var inc = data.included;\n console.log('included', inc);\n this.content = {\n title: attrs.title,\n body: attrs.body.value\n }; // build lightbox array\n // will be filled by videos and field_visuel\n\n this.content.lightbox_items = []; // parse embeded videos pushing it in lightbox\n\n for (var key in attrs.field_video) {\n var videolink = attrs.field_video[key]; // console.log('videolink', videolink);\n\n var provider_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/(www\\.)?(youtube|vimeo)\\.com\\/.+/, {\n provider: 2\n });\n\n var match = provider_regex.exec(videolink); // console.log('provider', match.groups.provider);\n\n var video_id = null;\n var video_thumb = null;\n\n switch (match.groups.provider) {\n case 'vimeo':\n var vimeo_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/vimeo\\.com\\/([0-9]+)/, {\n id: 1\n });\n\n video_id = vimeo_regex.exec(videolink).groups.id || null; // TODO: get the vimeo thumb https://coderwall.com/p/fdrdmg/get-a-thumbnail-from-a-vimeo-video\n\n video_thumb = \"http://blogpeda.ac-poitiers.fr/ent-lyc/files/2015/06/Vimeo_icon_block.png\";\n break;\n\n case 'youtube':\n var youtube_regex = /*#__PURE__*/_wrapRegExp(/https:\\/\\/(www\\.)?youtube\\.com\\/watch\\?v=(.+)/, {\n id: 2\n });\n\n video_id = youtube_regex.exec(videolink).groups.id || null;\n video_thumb = \"http://img.youtube.com/vi/\" + video_id + \"/0.jpg\";\n break;\n } // console.log('video_id', video_id);\n\n\n this.content.lightbox_items.push({\n src: videolink,\n title: \"\",\n description: \"\",\n thumb: video_thumb\n }); // this.content.videos.push({\n // provider: match.groups.provider,\n // id: video_id,\n // href: videolink\n // });\n } // parse all relationships\n\n\n var _loop = function _loop(_key) {\n // skip loop if the property is from prototype\n if (!relations.hasOwnProperty(_key)) return \"continue\";\n var relation_obj = relations[_key];\n console.log(\"relation\", _key, relation_obj); // console.log('typeof relation_obj.data', typeof relation_obj.data);\n\n if (!relation_obj.data) return \"continue\"; // showroom is unique field so no array in data\n // we parse it here\n\n switch (_key) {\n case 'field_showroom':\n var included = inc.find(function (i) {\n return i.id == relation_obj.data.id;\n }); // console.log('included',included);\n\n _this4.content[_key] = included.attributes;\n break;\n } // skip relation_obj if data is not array\n\n\n if (!Array.isArray(relation_obj.data)) return \"continue\"; // create empty field array\n\n _this4.content[_key] = []; // parse relationship values using included\n\n var field = {}; // loop through all relation items\n\n relation_obj.data.forEach(function (e) {\n // get the included values for each item using id\n var included = inc.find(function (i) {\n return i.id == e.id;\n }); // if we not found an included item skip the item\n\n if (typeof included != 'undefined') {\n // fill the item values\n switch (_key) {\n case 'field_visuel':\n // build the field object (not used for now)\n field = e.meta;\n field.id = e.id;\n field.src = included.attributes.uri.url;\n field.thumb = included.links.article_card_medium.href;\n break;\n\n case 'field_linked_materials':\n field = included.attributes;\n field.id = field.uuid = included.id; // get the linked material included images\n\n field.images = [];\n included.relationships.images.data.forEach(function (img) {\n // console.log('href', img.meta.imageDerivatives.links.card_medium.href);\n if (img.meta.imageDerivatives) {\n field.images.push({\n title: img.meta.title,\n src: img.meta.imageDerivatives.links.hd.href,\n img_styles: {\n card_medium: img.meta.imageDerivatives.links.card_medium.href,\n card_full: img.meta.imageDerivatives.links.card_full.href\n }\n });\n }\n });\n break;\n\n case 'field_thesaurus':\n case 'field_tags':\n field = included.attributes;\n field.id = included.id;\n break;\n\n default:\n }\n\n _this4.content[_key].push(field);\n }\n });\n };\n\n for (var _key in relations) {\n var _ret = _loop(_key);\n\n if (_ret === \"continue\") continue;\n } // extract first visuel as accroche\n\n\n this.content.image_accroche = this.content.field_visuel.shift(); // fill the lightbox\n\n var _iterator = _createForOfIteratorHelper(this.content.field_visuel),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var visuel = _step.value;\n this.content.lightbox_items.push(visuel);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n console.log('this.content.lightbox_items', this.content.lightbox_items); // update main page title\n\n this.$store.commit('Common/setPagetitle', this.content.title);\n this.loading = false;\n console.log('article.content', this.content);\n },\n onNext: function onNext() {\n // console.log('clicked on next', this.prevnext.next);\n var alias = this.prevnext.next.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.next.uuid\n }\n });\n },\n onPrev: function onPrev() {\n // console.log('clicked on prev', this.prevnext.next);\n var alias = this.prevnext.prev.view_node.replace(/^.?\\/blabla\\//g, '');\n this.$router.push({\n name: \"article\",\n params: {\n alias: alias\n },\n query: {\n uuid: this.prevnext.prev.uuid\n }\n });\n },\n setLightboxIndex: function setLightboxIndex(index) {\n this.lightbox_index = index;\n }\n }),\n components: {\n Card: _Card.default\n },\n watch: {\n '$route': function $route(to, from) {\n console.log('route change');\n this.getArticle();\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue?./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -954,7 +982,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports) => { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n// https://forum.vuejs.org/t/how-to-use-helper-functions-for-imported-modules-in-vuejs-vue-template/6266/5\nvar _default = {\n directives: {\n lazy: {\n bind: function bind(img, binding) {\n // console.log('lazy bind', img, binding);\n if (binding.value === 0) {\n img.setAttribute('src', img.getAttribute('data-src'));\n img.removeAttribute('data-src');\n img.classList.remove('lazy');\n }\n }\n },\n switcher: {\n inserted: function inserted(el, binding) {\n // switch images on mousemove\n el.addEventListener('mousemove', function (event) {\n var figs = this.querySelectorAll('figure'); // console.log('mousemove', this, event, figs.length);\n // let len = figs.length\n // let w = this.clientWidth;\n // let g = w / len;\n // let delta = Math.floor(event.layerX / g)\n\n var delta = Math.floor(event.layerX / (this.clientWidth / figs.length)); // console.log('delta', delta);\n\n figs.forEach(function (fig, index) {\n // console.log(index);\n if (index == delta) {\n fig.style.display = \"block\";\n } else {\n fig.style.display = \"none\";\n }\n });\n });\n }\n }\n },\n mounted: function mounted() {\n // lazy load images on mouseover\n this.$el.addEventListener('mouseover', function (event) {\n var imgs = this.querySelectorAll('.images figure img.lazy'); // console.log('mouseover', this, imgs);\n\n imgs.forEach(function (img) {\n // console.log('forEach img',img);\n img.setAttribute('src', img.getAttribute('data-src'));\n img.removeAttribute('data-src');\n img.classList.remove('lazy');\n });\n }, {\n once: true\n });\n },\n methods: {// deg2rad (deg) {\n // return deg * (Math.PI / 180)\n // },\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/cardMixins.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n// https://forum.vuejs.org/t/how-to-use-helper-functions-for-imported-modules-in-vuejs-vue-template/6266/5\nvar _default = {\n directives: {\n lazy: {\n bind: function bind(img, binding) {\n // console.log('lazy bind', img, binding);\n if (binding.value === 0) {\n img.setAttribute('src', img.getAttribute('data-src'));\n img.removeAttribute('data-src');\n img.classList.remove('lazy');\n }\n }\n },\n switcher: {\n inserted: function inserted(el, binding) {\n // switch images on mousemove\n el.addEventListener('mousemove', function (event) {\n var figs = this.querySelectorAll('figure'); // console.log('mousemove', this, event, figs.length);\n // let len = figs.length\n // let w = this.clientWidth;\n // let g = w / len;\n // let delta = Math.floor(event.layerX / g)\n\n var delta = Math.floor(event.layerX / (this.clientWidth / figs.length)); // console.log('delta', delta);\n\n figs.forEach(function (fig, index) {\n // console.log(index);\n if (index == delta) {\n // fig.style.display = \"block\"\n fig.classList.remove(\"hide\");\n fig.classList.add(\"show\");\n } else {\n // fig.style.display = \"none\"\n fig.classList.remove(\"show\");\n fig.classList.add(\"hide\");\n }\n });\n });\n }\n }\n },\n mounted: function mounted() {\n // lazy load images on mouseover\n this.$el.addEventListener('mouseover', function (event) {\n var imgs = this.querySelectorAll('.images figure img.lazy'); // console.log('mouseover', this, imgs);\n\n imgs.forEach(function (img) {\n // console.log('forEach img',img);\n img.setAttribute('src', img.getAttribute('data-src'));\n img.removeAttribute('data-src');\n img.classList.remove('lazy');\n });\n }, {\n once: true\n });\n },\n methods: {// deg2rad (deg) {\n // return deg * (Math.PI / 180)\n // },\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/cardMixins.js?"); /***/ }), @@ -986,7 +1014,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\"));\n\nvar _vuexExtensions = __webpack_require__(/*! vuex-extensions */ \"./node_modules/vuex-extensions/lib/index.js\");\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _common = _interopRequireDefault(__webpack_require__(/*! ./modules/common */ \"./web/themes/custom/materiotheme/vuejs/store/modules/common.js\"));\n\nvar _user = _interopRequireDefault(__webpack_require__(/*! ./modules/user */ \"./web/themes/custom/materiotheme/vuejs/store/modules/user.js\"));\n\nvar _search = _interopRequireDefault(__webpack_require__(/*! ./modules/search */ \"./web/themes/custom/materiotheme/vuejs/store/modules/search.js\"));\n\nvar _blabla = _interopRequireDefault(__webpack_require__(/*! ./modules/blabla */ \"./web/themes/custom/materiotheme/vuejs/store/modules/blabla.js\"));\n\nvar _showrooms = _interopRequireDefault(__webpack_require__(/*! ./modules/showrooms */ \"./web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js\"));\n\nvar _pages = _interopRequireDefault(__webpack_require__(/*! ./modules/pages */ \"./web/themes/custom/materiotheme/vuejs/store/modules/pages.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart\n_vue.default.use(_vuex.default); // export default new Vuex.Store({\n\n\nvar _default = (0, _vuexExtensions.createStore)(_vuex.default.Store, {\n modules: {\n Common: _common.default,\n User: _user.default,\n Search: _search.default,\n Blabla: _blabla.default,\n Showrooms: _showrooms.default,\n Pages: _pages.default\n },\n // https://github.com/huybuidac/vuex-extensions\n mixins: {\n actions: {\n loadMaterials: function loadMaterials(_ref, _ref2) {\n var dispatch = _ref.dispatch;\n var uuids = _ref2.uuids,\n imgStyle = _ref2.imgStyle,\n callBack = _ref2.callBack,\n callBackArgs = _ref2.callBackArgs;\n var params = {\n // include: 'images', // no needs to include thanks to consumers_image_styles module\n // include: 'drupal_internal__nid',\n 'filter[uuids-groupe][group][conjunction]': 'OR'\n };\n\n for (var i = 0; i < uuids.length; i++) {\n var uuid = uuids[i];\n params[\"filter[\".concat(uuid, \"][condition][path]\")] = 'id';\n params[\"filter[\".concat(uuid, \"][condition][value]\")] = uuid;\n params[\"filter[\".concat(uuid, \"][condition][operator]\")] = '=';\n params[\"filter[\".concat(uuid, \"][condition][memberOf]\")] = 'uuids-groupe';\n } // console.log('search JSONAPI params', params);\n\n\n var q = _querystringEs.default.stringify(params);\n\n return _jsonAxios.JSONAPI.get('node/materiau?' + q).then(function (_ref3) {\n var data = _ref3.data;\n console.log('mixin getMaterials data', data);\n dispatch('parseMaterials', {\n data: data.data,\n uuids: uuids,\n imgStyle: imgStyle,\n callBack: callBack,\n callBackArgs: callBackArgs\n }); // commit('setItems', data.items)\n }).catch(function (error) {\n console.warn('Issue with getItems', error);\n Promise.reject(error);\n });\n },\n parseMaterials: function parseMaterials(_ref4, _ref5) {\n var dispatch = _ref4.dispatch;\n var data = _ref5.data,\n uuids = _ref5.uuids,\n imgStyle = _ref5.imgStyle,\n callBack = _ref5.callBack,\n callBackArgs = _ref5.callBackArgs;\n // data comes from jsonapi query\n // uuids comes from original query (solr, FlagCollection, etc)\n // so we loop from uuids to conserve the original order\n console.log('mixin parseMaterials', data, uuids, callBack, callBackArgs);\n var items = []; // for (var i = 0; i < data.length; i++) {\n\n var _loop = function _loop(i) {\n var uuid = uuids[i]; // https://stackoverflow.com/questions/11258077/how-to-find-index-of-an-object-by-key-and-value-in-an-javascript-array\n\n var item_index = data.findIndex(function (p) {\n return p.id === uuid;\n }); // console.log('item_index', item_index);\n\n if (item_index === -1) return \"continue\";\n var item_src = data[item_index];\n var attrs = item_src.attributes;\n var relations = item_src.relationships; // get field values\n\n var item = {\n uuid: uuid,\n title: attrs.title,\n field_short_description: attrs.field_short_description,\n body: attrs.body,\n field_reference: attrs.field_reference\n }; // get images included values\n\n var img_src = relations.images.data; // console.log('img_src', img_src);\n // this is a temporary deactivation of images\n // img_src = [];\n\n item.images = [];\n\n for (var j = 0; j < img_src.length; j++) {\n if (img_src[j].meta.imageDerivatives) {\n item.images.push({\n title: img_src[j].meta.title,\n // meta.imageDerivatives.style.href link is provided by drupal consumers_image_styles module\n // BUG: missing all image derivative but first\n url: img_src[j].meta.imageDerivatives.links[imgStyle].href\n });\n } else {\n console.warn('missing image derivative ' + j + '/' + img_src.length + ' for ' + attrs.title);\n }\n }\n\n items.push(item);\n };\n\n for (var i = 0; i < uuids.length; i++) {\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n\n console.log('items', items);\n dispatch(callBack, {\n items: items,\n callBackArgs: callBackArgs\n });\n }\n }\n }\n});\n\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/index.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vuex = _interopRequireDefault(__webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\"));\n\nvar _vuexExtensions = __webpack_require__(/*! vuex-extensions */ \"./node_modules/vuex-extensions/lib/index.js\");\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nvar _common = _interopRequireDefault(__webpack_require__(/*! ./modules/common */ \"./web/themes/custom/materiotheme/vuejs/store/modules/common.js\"));\n\nvar _user = _interopRequireDefault(__webpack_require__(/*! ./modules/user */ \"./web/themes/custom/materiotheme/vuejs/store/modules/user.js\"));\n\nvar _search = _interopRequireDefault(__webpack_require__(/*! ./modules/search */ \"./web/themes/custom/materiotheme/vuejs/store/modules/search.js\"));\n\nvar _blabla = _interopRequireDefault(__webpack_require__(/*! ./modules/blabla */ \"./web/themes/custom/materiotheme/vuejs/store/modules/blabla.js\"));\n\nvar _showrooms = _interopRequireDefault(__webpack_require__(/*! ./modules/showrooms */ \"./web/themes/custom/materiotheme/vuejs/store/modules/showrooms.js\"));\n\nvar _pages = _interopRequireDefault(__webpack_require__(/*! ./modules/pages */ \"./web/themes/custom/materiotheme/vuejs/store/modules/pages.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// https://github.com/vuejs/vuex/tree/dev/examples/shopping-cart\n_vue.default.use(_vuex.default); // export default new Vuex.Store({\n\n\nvar _default = (0, _vuexExtensions.createStore)(_vuex.default.Store, {\n modules: {\n Common: _common.default,\n User: _user.default,\n Search: _search.default,\n Blabla: _blabla.default,\n Showrooms: _showrooms.default,\n Pages: _pages.default\n },\n // https://github.com/huybuidac/vuex-extensions\n mixins: {\n actions: {\n loadMaterials: function loadMaterials(_ref, _ref2) {\n var dispatch = _ref.dispatch;\n var uuids = _ref2.uuids,\n imgStyle = _ref2.imgStyle,\n callBack = _ref2.callBack,\n callBackArgs = _ref2.callBackArgs;\n var params = {\n // include: 'images', // no needs to include thanks to consumers_image_styles module\n // include: 'drupal_internal__nid',\n 'filter[uuids-groupe][group][conjunction]': 'OR'\n };\n\n for (var i = 0; i < uuids.length; i++) {\n var uuid = uuids[i];\n params[\"filter[\".concat(uuid, \"][condition][path]\")] = 'id';\n params[\"filter[\".concat(uuid, \"][condition][value]\")] = uuid;\n params[\"filter[\".concat(uuid, \"][condition][operator]\")] = '=';\n params[\"filter[\".concat(uuid, \"][condition][memberOf]\")] = 'uuids-groupe';\n } // console.log('search JSONAPI params', params);\n\n\n var q = _querystringEs.default.stringify(params);\n\n return _jsonAxios.JSONAPI.get('node/materiau?' + q).then(function (_ref3) {\n var data = _ref3.data;\n console.log('mixin getMaterials data', data);\n dispatch('parseMaterials', {\n data: data.data,\n uuids: uuids,\n imgStyle: imgStyle,\n callBack: callBack,\n callBackArgs: callBackArgs\n }); // commit('setItems', data.items)\n }).catch(function (error) {\n console.warn('Issue with getItems', error);\n Promise.reject(error);\n });\n },\n parseMaterials: function parseMaterials(_ref4, _ref5) {\n var dispatch = _ref4.dispatch;\n var data = _ref5.data,\n uuids = _ref5.uuids,\n imgStyle = _ref5.imgStyle,\n callBack = _ref5.callBack,\n callBackArgs = _ref5.callBackArgs;\n // data comes from jsonapi query\n // uuids comes from original query (solr, FlagCollection, etc)\n // so we loop from uuids to conserve the original order\n console.log('mixin parseMaterials', data, uuids, callBack, callBackArgs);\n var items = []; // for (var i = 0; i < data.length; i++) {\n\n var _loop = function _loop(i) {\n var uuid = uuids[i]; // https://stackoverflow.com/questions/11258077/how-to-find-index-of-an-object-by-key-and-value-in-an-javascript-array\n\n var item_index = data.findIndex(function (p) {\n return p.id === uuid;\n }); // console.log('item_index', item_index);\n\n if (item_index === -1) return \"continue\";\n var item_src = data[item_index];\n var attrs = item_src.attributes;\n var relations = item_src.relationships; // get field values\n\n var item = {\n uuid: uuid,\n title: attrs.title,\n field_short_description: attrs.field_short_description,\n body: attrs.body,\n field_reference: attrs.field_reference\n }; // get images included values\n\n var img_src = relations.images.data; // console.log('img_src', img_src);\n // this is a temporary deactivation of images\n // img_src = [];\n\n item.images = [];\n\n for (var j = 0; j < img_src.length; j++) {\n if (img_src[j].meta.imageDerivatives) {\n var img_styles = {};\n\n for (k = 0; k < imgStyle.length; k++) {\n img_styles[imgStyle[k]] = img_src[j].meta.imageDerivatives.links[imgStyle[k]].href;\n }\n\n item.images.push({\n title: img_src[j].meta.title,\n src: img_src[j].meta.imageDerivatives.links.hd.href,\n // meta.imageDerivatives.style.href link is provided by drupal consumers_image_styles module\n // BUG: missing all image derivative but first\n img_styles: img_styles\n });\n } else {\n console.warn('missing image derivative ' + j + '/' + img_src.length + ' for ' + attrs.title);\n }\n }\n\n items.push(item);\n };\n\n for (var i = 0; i < uuids.length; i++) {\n var k;\n\n var _ret = _loop(i);\n\n if (_ret === \"continue\") continue;\n }\n\n console.log('items', items);\n dispatch(callBack, {\n items: items,\n callBackArgs: callBackArgs\n });\n }\n }\n }\n});\n\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/index.js?"); /***/ }), @@ -1050,7 +1078,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n namespaced: true,\n // initial state\n state: {\n keys: '',\n term: '',\n uuids: [],\n items: [],\n offset: 0,\n limit: 15,\n infos: null,\n count: 0,\n noresults: false,\n // infinteState will come from vue-infinite-loading plugin\n // implemented in vuejs/components/Content/Base.vue\n infiniteLoadingState: null\n },\n // getters\n getters: {},\n // mutations\n mutations: {\n setUuids: function setUuids(state, uuids) {\n state.uuids = state.uuids.concat(uuids);\n },\n resetUuids: function resetUuids(state) {\n state.uuids = [];\n },\n setMaterials: function setMaterials(state, items) {\n state.items = state.items.concat(items);\n },\n resetItems: function resetItems(state) {\n state.items = [];\n },\n setKeys: function setKeys(state, keys) {\n state.keys = keys;\n },\n setTerm: function setTerm(state, term) {\n state.term = term;\n },\n setInfos: function setInfos(state, infos) {\n state.infos = infos;\n },\n setCount: function setCount(state, count) {\n state.count = count;\n },\n resetCount: function resetCount(state, count) {\n state.count = false;\n },\n setNoresults: function setNoresults(state) {\n state.noresults = true;\n },\n resetNoresults: function resetNoresults(state) {\n state.noresults = false;\n },\n resetOffset: function resetOffset(state) {\n state.offset = 0;\n },\n incrementOffset: function incrementOffset(state) {\n state.offset += state.limit;\n },\n setInfiniteState: function setInfiniteState(state, infiniteLoadingstate) {\n state.infiniteLoadingState = infiniteLoadingstate;\n }\n },\n // actions\n actions: {\n newSearch: function newSearch(_ref) {\n var dispatch = _ref.dispatch,\n commit = _ref.commit,\n state = _ref.state;\n console.log('Search newSearch');\n commit('resetUuids');\n commit('resetItems');\n commit('resetCount');\n commit('resetNoresults');\n commit('resetOffset');\n this.commit('Common/setPagetitle', state.keys);\n dispatch('getResults');\n },\n nextPage: function nextPage(_ref2, $infiniteLoadingstate) {\n var dispatch = _ref2.dispatch,\n commit = _ref2.commit,\n state = _ref2.state;\n console.log('Search nextPage', $infiniteLoadingstate);\n commit('incrementOffset');\n commit('setInfiniteState', $infiniteLoadingstate);\n dispatch('getResults');\n },\n getResults: function getResults(_ref3) {\n var dispatch = _ref3.dispatch,\n commit = _ref3.commit,\n state = _ref3.state;\n var params = {\n keys: state.keys,\n term: state.term,\n offset: state.offset,\n limit: state.limit\n }; // console.log('Search getResults params', params);\n\n var q = _querystringEs.default.stringify(params);\n\n return _maAxios.MA.get('/materio_sapi/getresults?' + q).then(function (_ref4) {\n var data = _ref4.data;\n console.log('search MA getresults data', data); // commit('setItems', data.items)\n\n commit('setInfos', data.infos);\n commit('setCount', data.count);\n\n if (data.count) {\n commit('setUuids', data.uuids); // loadMaterials is on mixins\n // https://github.com/huybuidac/vuex-extensions\n\n dispatch('loadMaterials', {\n uuids: data.uuids,\n imgStyle: 'card_medium',\n callBack: 'loadMaterialsCallBack'\n });\n } else {\n commit('setNoresults');\n }\n }).catch(function (error) {\n console.warn('Issue with getResults', error);\n Promise.reject(error);\n });\n },\n loadMaterialsCallBack: function loadMaterialsCallBack(_ref5, _ref6) {\n var commit = _ref5.commit,\n state = _ref5.state;\n var items = _ref6.items,\n callBackArgs = _ref6.callBackArgs;\n console.log('search loadMaterialsCallBack', items);\n commit('setMaterials', items);\n\n if (state.infiniteLoadingState) {\n if (state.offset + state.limit > state.count) {\n console.log('Search infinite completed'); // tell to vue-infinite-loading plugin that there si no new page\n\n state.infiniteLoadingState.complete();\n } else {\n console.log('Search infinite loaded'); // tell to vue-infinite-loading plugin that newpage is loaded\n\n state.infiniteLoadingState.loaded();\n }\n }\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/modules/search.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _jsonAxios = __webpack_require__(/*! vuejs/api/json-axios */ \"./web/themes/custom/materiotheme/vuejs/api/json-axios.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nvar _default = {\n namespaced: true,\n // initial state\n state: {\n keys: '',\n term: '',\n uuids: [],\n items: [],\n offset: 0,\n limit: 15,\n infos: null,\n count: 0,\n noresults: false,\n // infinteState will come from vue-infinite-loading plugin\n // implemented in vuejs/components/Content/Base.vue\n infiniteLoadingState: null\n },\n // getters\n getters: {},\n // mutations\n mutations: {\n setUuids: function setUuids(state, uuids) {\n state.uuids = state.uuids.concat(uuids);\n },\n resetUuids: function resetUuids(state) {\n state.uuids = [];\n },\n setMaterials: function setMaterials(state, items) {\n state.items = state.items.concat(items);\n },\n resetItems: function resetItems(state) {\n state.items = [];\n },\n setKeys: function setKeys(state, keys) {\n state.keys = keys;\n },\n setTerm: function setTerm(state, term) {\n state.term = term;\n },\n setInfos: function setInfos(state, infos) {\n state.infos = infos;\n },\n setCount: function setCount(state, count) {\n state.count = count;\n },\n resetCount: function resetCount(state, count) {\n state.count = false;\n },\n setNoresults: function setNoresults(state) {\n state.noresults = true;\n },\n resetNoresults: function resetNoresults(state) {\n state.noresults = false;\n },\n resetOffset: function resetOffset(state) {\n state.offset = 0;\n },\n incrementOffset: function incrementOffset(state) {\n state.offset += state.limit;\n },\n setInfiniteState: function setInfiniteState(state, infiniteLoadingstate) {\n state.infiniteLoadingState = infiniteLoadingstate;\n }\n },\n // actions\n actions: {\n newSearch: function newSearch(_ref) {\n var dispatch = _ref.dispatch,\n commit = _ref.commit,\n state = _ref.state;\n console.log('Search newSearch');\n commit('resetUuids');\n commit('resetItems');\n commit('resetCount');\n commit('resetNoresults');\n commit('resetOffset');\n this.commit('Common/setPagetitle', state.keys);\n dispatch('getResults');\n },\n nextPage: function nextPage(_ref2, $infiniteLoadingstate) {\n var dispatch = _ref2.dispatch,\n commit = _ref2.commit,\n state = _ref2.state;\n console.log('Search nextPage', $infiniteLoadingstate);\n commit('incrementOffset');\n commit('setInfiniteState', $infiniteLoadingstate);\n dispatch('getResults');\n },\n getResults: function getResults(_ref3) {\n var dispatch = _ref3.dispatch,\n commit = _ref3.commit,\n state = _ref3.state;\n var params = {\n keys: state.keys,\n term: state.term,\n offset: state.offset,\n limit: state.limit\n }; // console.log('Search getResults params', params);\n\n var q = _querystringEs.default.stringify(params);\n\n return _maAxios.MA.get('/materio_sapi/getresults?' + q).then(function (_ref4) {\n var data = _ref4.data;\n console.log('search MA getresults data', data); // commit('setItems', data.items)\n\n commit('setInfos', data.infos);\n commit('setCount', data.count);\n\n if (data.count) {\n commit('setUuids', data.uuids); // loadMaterials is on mixins\n // https://github.com/huybuidac/vuex-extensions\n\n dispatch('loadMaterials', {\n uuids: data.uuids,\n imgStyle: ['card_medium', 'card_full'],\n callBack: 'loadMaterialsCallBack'\n });\n } else {\n commit('setNoresults');\n }\n }).catch(function (error) {\n console.warn('Issue with getResults', error);\n Promise.reject(error);\n });\n },\n loadMaterialsCallBack: function loadMaterialsCallBack(_ref5, _ref6) {\n var commit = _ref5.commit,\n state = _ref5.state;\n var items = _ref6.items,\n callBackArgs = _ref6.callBackArgs;\n console.log('search loadMaterialsCallBack', items);\n commit('setMaterials', items);\n\n if (state.infiniteLoadingState) {\n if (state.offset + state.limit > state.count) {\n console.log('Search infinite completed'); // tell to vue-infinite-loading plugin that there si no new page\n\n state.infiniteLoadingState.complete();\n } else {\n console.log('Search infinite loaded'); // tell to vue-infinite-loading plugin that newpage is loaded\n\n state.infiniteLoadingState.loaded();\n }\n }\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/modules/search.js?"); /***/ }), @@ -1082,7 +1110,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n})); /***/ ((__unused_webpack_module, exports, __webpack_require__) => { "use strict"; -eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import { JSONAPI } from 'vuejs/api/json-axios'\nvar _default = {\n namespaced: true,\n // initial state\n state: {\n uid: null,\n // username: '',\n mail: '',\n csrf_token: null,\n logout_token: null,\n isloggedin: false,\n isAdmin: false,\n isAdherent: false,\n canSearch: false,\n roles: [],\n flagcolls: false,\n flagcollsLoadedItems: {},\n openedCollid: null\n },\n // getters\n getters: {},\n // mutations\n mutations: {\n SetCsrftoken: function SetCsrftoken(state, token) {\n console.log('SetCsrftoken', token);\n state.csrf_token = token;\n },\n setToken: function setToken(state, data) {\n state.uid = data.current_user.uid; // state.username = data.username;\n\n state.mail = data.current_user.mail;\n state.csrf_token = data.csrf_token;\n state.isloggedin = true;\n state.logout_token = data.logout_token;\n },\n setUid: function setUid(state, uid) {\n state.uid = uid;\n state.isloggedin = true;\n },\n setUser: function setUser(state, data) {\n state.mail = data.mail[0].value;\n state.uuid = data.uuid[0].value;\n },\n setRoles: function setRoles(state, roles) {\n console.log('User setRoles', roles);\n state.roles = [];\n\n for (var i = 0; i < roles.length; i++) {\n state.roles.push(roles[i].target_id);\n } // check if admin\n\n\n if (state.roles.indexOf('admin') !== -1 || state.roles.indexOf('root') !== -1) {\n // console.log('is admin');\n state.isAdmin = true;\n } // check if has access to search\n\n\n if (state.roles.indexOf('adherent') !== -1) {\n // console.log('is admin');\n state.canSearch = true;\n state.isAdherent = true;\n }\n },\n setLoggedOut: function setLoggedOut(state) {\n console.log('setLoggedOut state', state);\n state.uid = null;\n state.mail = '';\n state.csrf_token = null;\n state.isloggedin = false;\n state.logout_token = null;\n\n if (state.isAdmin) {\n // TODO: what if on a page where login is needed (as commerce checkout and cart)\n window.location.reload(true);\n }\n\n state.asAdmin = false;\n state.canSearch = false;\n },\n setFlagColls: function setFlagColls(state, flagcolls) {\n console.log('User pre setFlagColls', state.flagcolls);\n state.flagcolls = flagcolls; // console.log('User post setFlagColls', state.flagcolls)\n },\n openFlagColl: function openFlagColl(state, collid) {\n state.openedCollid = collid;\n },\n closeFlagColl: function closeFlagColl(state) {\n state.openedCollid = null;\n },\n setLoadedCollItems: function setLoadedCollItems(state, data) {\n console.log('setLoadedCollItems', data); // if no data, we are just calling the mutation to trigger the component update\n\n if (data) {\n state.flagcollsLoadedItems[data.collid] = data.items;\n }\n }\n },\n // actions\n actions: {\n userRegister: function userRegister(_ref, credentials) {\n var dispatch = _ref.dispatch,\n commit = _ref.commit,\n state = _ref.state;\n return new Promise(function (resolve) {\n _restAxios.REST.get('/session/token').then(function (_ref2) {\n var token = _ref2.token;\n commit('SetCsrftoken', token);\n\n _restAxios.REST.post('/user/register?_format=json', credentials, {\n 'X-CSRF-Token': state.csrftoken\n }).then(function (_ref3) {\n var data = _ref3.data;\n console.log('user REST registered', data);\n dispatch('userLogin', credentials).then(function () {\n resolve();\n });\n }).catch(function (error) {\n console.warn('Issue with register', error);\n Promise.reject(error);\n });\n });\n });\n },\n userLogin: function userLogin(_ref4, credentials) {\n var dispatch = _ref4.dispatch,\n state = _ref4.state;\n return new Promise(function (resolve, reject) {\n dispatch('getToken', credentials).then(function () {\n dispatch('getUser').then(function (userdata) {\n console.log('User Loggedin');\n\n if (state.isAdmin) {\n window.location.reload(true);\n }\n\n resolve();\n });\n });\n });\n },\n getToken: function getToken(_ref5, credentials) {\n var dispatch = _ref5.dispatch,\n commit = _ref5.commit,\n state = _ref5.state;\n return _restAxios.REST.post('/user/login?_format=json', credentials).then(function (_ref6) {\n var data = _ref6.data;\n console.log('user REST getToken data', data);\n commit('setToken', data);\n }).catch(function (error) {\n console.warn('Issue with getToken', error);\n Promise.reject(error);\n });\n },\n getUser: function getUser(_ref7) {\n var dispatch = _ref7.dispatch,\n commit = _ref7.commit,\n state = _ref7.state;\n return new Promise(function (resolve, reject) {\n _restAxios.REST.get('/session/token').then(function (_ref8) {\n var data = _ref8.data;\n console.log('csrftoken', data);\n commit('SetCsrftoken', data);\n console.log('state.csrf_token', state.csrf_token);\n var params = {\n token: state.csrf_token\n };\n\n _restAxios.REST.get(\"/user/\".concat(state.uid, \"?_format=json\"), params).then(function (_ref9) {\n var data = _ref9.data;\n console.log('user REST getUser data', data);\n console.log('roles', data.roles);\n commit('setUser', data);\n\n if (data.roles) {\n commit('setRoles', data.roles);\n }\n\n dispatch('getUserFlagColls');\n resolve();\n }).catch(function (error) {\n console.warn('Issue with getUser', error);\n Promise.reject(error);\n });\n });\n });\n },\n getUserFlagColls: function getUserFlagColls(_ref10) {\n var dispatch = _ref10.dispatch,\n commit = _ref10.commit,\n state = _ref10.state;\n // flags\n // REST.get('/flagging_collection/1?_format=json')\n // .then(( data ) => {\n // console.log('TEST FLAG REST data', data)\n // })\n // .catch(error => {\n // console.warn('Issue USER TEST FLAG REST', error)\n // Promise.reject(error)\n // })\n return _maAxios.MA.get('materio_flag/user_flagging_collections').then(function (_ref11) {\n var data = _ref11.data;\n console.log('user MA getFlags data', data);\n commit('setFlagColls', data);\n }).catch(function (error) {\n console.warn('Issue USER MA getFlags', error);\n Promise.reject(error);\n });\n },\n // https://drupal.stackexchange.com/questions/248539/cant-get-flagging-api-to-accept-post-request\n createFlagColl: function createFlagColl(_ref12, new_collection_name) {\n var dispatch = _ref12.dispatch,\n commit = _ref12.commit,\n state = _ref12.state;\n console.log('user createFlagColl', new_collection_name);\n return new Promise(function (resolve, reject) {\n var params = {\n name: new_collection_name\n };\n\n _maAxios.MA.post('materio_flag/create_user_flagging_collection', params).then(function (_ref13) {\n var data = _ref13.data;\n console.log('user MA createFlagColl data', data);\n\n if (data.status) {\n dispatch('getUserFlagColls').then(function () {\n resolve();\n });\n }\n }).catch(function (error) {\n console.warn('Issue USER MA createFlag', error);\n reject(error);\n });\n });\n },\n deleteFlagColl: function deleteFlagColl(_ref14, flagcollid) {\n var dispatch = _ref14.dispatch,\n commit = _ref14.commit,\n state = _ref14.state;\n console.log('user deleteFlagColl', flagcollid);\n return new Promise(function (resolve, reject) {\n var params = {\n flagcollid: flagcollid\n };\n\n _maAxios.MA.post('materio_flag/delete_user_flagging_collection', params).then(function (_ref15) {\n var data = _ref15.data;\n console.log('user MA deleteFlagColl data', data);\n dispatch('getUserFlagColls').then(function () {\n resolve();\n });\n }).catch(function (error) {\n console.warn('Issue USER MA createFlag', error);\n reject(error);\n });\n });\n },\n flagUnflag: function flagUnflag(_ref16, _ref17) {\n var dispatch = _ref16.dispatch,\n commit = _ref16.commit,\n state = _ref16.state;\n var action = _ref17.action,\n uuid = _ref17.uuid,\n collid = _ref17.collid;\n console.log('user flagUnflag', action, uuid, collid);\n return new Promise(function (resolve, reject) {\n var params = {\n flagid: state.flagcolls[collid].flag_id,\n uuid: uuid,\n flagcollid: collid\n };\n return _maAxios.MA.post(\"materio_flag/\".concat(action), params).then(function (_ref18) {\n var data = _ref18.data;\n console.log('user MA flag', data); // reload the fulllist of flagcolleciton\n\n dispatch('getUserFlagColls').then(function () {\n if (state.flagcolls[collid].items_uuids.length) {\n dispatch('loadMaterials', {\n uuids: state.flagcolls[collid].items_uuids,\n imgStyle: 'card_medium_half',\n callBack: 'loadMaterialsCallBack',\n callBackArgs: {\n collid: collid\n }\n }).then(function () {\n resolve();\n });\n } else {\n commit('setLoadedCollItems', {\n collid: collid,\n items: []\n });\n resolve();\n }\n });\n }).catch(function (error) {\n console.warn('Issue USER MA flagUnflag', error);\n });\n });\n },\n openFlagColl: function openFlagColl(_ref19, collid) {\n var commit = _ref19.commit,\n dispatch = _ref19.dispatch,\n state = _ref19.state;\n console.log('user openFlagColl', collid);\n commit('openFlagColl', collid);\n\n if (state.flagcolls[collid].items_uuids.length) {\n if (typeof state.flagcollsLoadedItems[collid] === 'undefined') {\n console.log('loading flagcoll items'); // if no loadedItems, load them\n // loadMaterials is on mixins\n // https://github.com/huybuidac/vuex-extensions\n\n dispatch('loadMaterials', {\n uuids: state.flagcolls[collid].items_uuids,\n imgStyle: 'card_medium_half',\n callBack: 'loadMaterialsCallBack',\n callBackArgs: {\n collid: collid\n }\n });\n } else {\n // call the mutation without data to only trigger the FlagCollection component update\n console.log('committing setLoadedCollItems without args');\n commit('setLoadedCollItems');\n }\n } else {\n commit('setLoadedCollItems', {\n collid: collid,\n items: []\n });\n }\n },\n loadMaterialsCallBack: function loadMaterialsCallBack(_ref20, _ref21) {\n var commit = _ref20.commit;\n var items = _ref21.items,\n callBackArgs = _ref21.callBackArgs;\n console.log('user loadMaterialsCallBack', items, callBackArgs);\n commit('setLoadedCollItems', {\n collid: callBackArgs.collid,\n items: items\n });\n },\n closeFlagColl: function closeFlagColl(_ref22) {\n var commit = _ref22.commit,\n dispatch = _ref22.dispatch;\n console.log('user closeFlagColl');\n commit('closeFlagColl');\n },\n userLogout: function userLogout(_ref23) {\n var commit = _ref23.commit,\n state = _ref23.state;\n\n var credentials = _querystringEs.default.stringify({\n token: state.csrf_token\n });\n\n _restAxios.REST.post('/user/logout', credentials).then(function (resp) {\n console.log('userLogout resp', resp);\n commit('setLoggedOut');\n }).catch(function (error) {\n console.warn('Issue with logout', error);\n Promise.reject(error);\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/modules/user.js?"); +eval("\n\nObject.defineProperty(exports, \"__esModule\", ({\n value: true\n}));\nexports.default = void 0;\n\nvar _restAxios = __webpack_require__(/*! vuejs/api/rest-axios */ \"./web/themes/custom/materiotheme/vuejs/api/rest-axios.js\");\n\nvar _maAxios = __webpack_require__(/*! vuejs/api/ma-axios */ \"./web/themes/custom/materiotheme/vuejs/api/ma-axios.js\");\n\nvar _querystringEs = _interopRequireDefault(__webpack_require__(/*! querystring-es3 */ \"./node_modules/querystring-es3/index.js\"));\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n// import { JSONAPI } from 'vuejs/api/json-axios'\nvar _default = {\n namespaced: true,\n // initial state\n state: {\n uid: null,\n // username: '',\n mail: '',\n csrf_token: null,\n logout_token: null,\n isloggedin: false,\n isAdmin: false,\n isAdherent: false,\n canSearch: false,\n roles: [],\n flagcolls: false,\n flagcollsLoadedItems: {},\n openedCollid: null\n },\n // getters\n getters: {},\n // mutations\n mutations: {\n SetCsrftoken: function SetCsrftoken(state, token) {\n console.log('SetCsrftoken', token);\n state.csrf_token = token;\n },\n setToken: function setToken(state, data) {\n state.uid = data.current_user.uid; // state.username = data.username;\n\n state.mail = data.current_user.mail;\n state.csrf_token = data.csrf_token;\n state.isloggedin = true;\n state.logout_token = data.logout_token;\n },\n setUid: function setUid(state, uid) {\n state.uid = uid;\n state.isloggedin = true;\n },\n setUser: function setUser(state, data) {\n state.mail = data.mail[0].value;\n state.uuid = data.uuid[0].value;\n },\n setRoles: function setRoles(state, roles) {\n console.log('User setRoles', roles);\n state.roles = [];\n\n for (var i = 0; i < roles.length; i++) {\n state.roles.push(roles[i].target_id);\n } // check if admin\n\n\n if (state.roles.indexOf('admin') !== -1 || state.roles.indexOf('root') !== -1) {\n // console.log('is admin');\n state.isAdmin = true;\n } // check if has access to search\n\n\n if (state.roles.indexOf('adherent') !== -1) {\n // console.log('is admin');\n state.canSearch = true;\n state.isAdherent = true;\n }\n },\n setLoggedOut: function setLoggedOut(state) {\n console.log('setLoggedOut state', state);\n state.uid = null;\n state.mail = '';\n state.csrf_token = null;\n state.isloggedin = false;\n state.logout_token = null;\n\n if (state.isAdmin) {\n // TODO: what if on a page where login is needed (as commerce checkout and cart)\n window.location.reload(true);\n }\n\n state.asAdmin = false;\n state.canSearch = false;\n },\n setFlagColls: function setFlagColls(state, flagcolls) {\n console.log('User pre setFlagColls', state.flagcolls);\n state.flagcolls = flagcolls; // console.log('User post setFlagColls', state.flagcolls)\n },\n openFlagColl: function openFlagColl(state, collid) {\n state.openedCollid = collid;\n },\n closeFlagColl: function closeFlagColl(state) {\n state.openedCollid = null;\n },\n setLoadedCollItems: function setLoadedCollItems(state, data) {\n console.log('setLoadedCollItems', data); // if no data, we are just calling the mutation to trigger the component update\n\n if (data) {\n state.flagcollsLoadedItems[data.collid] = data.items;\n }\n }\n },\n // actions\n actions: {\n userRegister: function userRegister(_ref, credentials) {\n var dispatch = _ref.dispatch,\n commit = _ref.commit,\n state = _ref.state;\n return new Promise(function (resolve) {\n _restAxios.REST.get('/session/token').then(function (_ref2) {\n var token = _ref2.token;\n commit('SetCsrftoken', token);\n\n _restAxios.REST.post('/user/register?_format=json', credentials, {\n 'X-CSRF-Token': state.csrftoken\n }).then(function (_ref3) {\n var data = _ref3.data;\n console.log('user REST registered', data);\n dispatch('userLogin', credentials).then(function () {\n resolve();\n });\n }).catch(function (error) {\n console.warn('Issue with register', error);\n Promise.reject(error);\n });\n });\n });\n },\n userLogin: function userLogin(_ref4, credentials) {\n var dispatch = _ref4.dispatch,\n state = _ref4.state;\n return new Promise(function (resolve, reject) {\n dispatch('getToken', credentials).then(function () {\n dispatch('getUser').then(function (userdata) {\n console.log('User Loggedin');\n\n if (state.isAdmin) {\n window.location.reload(true);\n }\n\n resolve();\n });\n });\n });\n },\n getToken: function getToken(_ref5, credentials) {\n var dispatch = _ref5.dispatch,\n commit = _ref5.commit,\n state = _ref5.state;\n return _restAxios.REST.post('/user/login?_format=json', credentials).then(function (_ref6) {\n var data = _ref6.data;\n console.log('user REST getToken data', data);\n commit('setToken', data);\n }).catch(function (error) {\n console.warn('Issue with getToken', error);\n Promise.reject(error);\n });\n },\n getUser: function getUser(_ref7) {\n var dispatch = _ref7.dispatch,\n commit = _ref7.commit,\n state = _ref7.state;\n return new Promise(function (resolve, reject) {\n _restAxios.REST.get('/session/token').then(function (_ref8) {\n var data = _ref8.data;\n console.log('csrftoken', data);\n commit('SetCsrftoken', data);\n console.log('state.csrf_token', state.csrf_token);\n var params = {\n token: state.csrf_token\n };\n\n _restAxios.REST.get(\"/user/\".concat(state.uid, \"?_format=json\"), params).then(function (_ref9) {\n var data = _ref9.data;\n console.log('user REST getUser data', data);\n console.log('roles', data.roles);\n commit('setUser', data);\n\n if (data.roles) {\n commit('setRoles', data.roles);\n }\n\n dispatch('getUserFlagColls');\n resolve();\n }).catch(function (error) {\n console.warn('Issue with getUser', error);\n Promise.reject(error);\n });\n });\n });\n },\n getUserFlagColls: function getUserFlagColls(_ref10) {\n var dispatch = _ref10.dispatch,\n commit = _ref10.commit,\n state = _ref10.state;\n // flags\n // REST.get('/flagging_collection/1?_format=json')\n // .then(( data ) => {\n // console.log('TEST FLAG REST data', data)\n // })\n // .catch(error => {\n // console.warn('Issue USER TEST FLAG REST', error)\n // Promise.reject(error)\n // })\n return _maAxios.MA.get('materio_flag/user_flagging_collections').then(function (_ref11) {\n var data = _ref11.data;\n console.log('user MA getFlags data', data);\n commit('setFlagColls', data);\n }).catch(function (error) {\n console.warn('Issue USER MA getFlags', error);\n Promise.reject(error);\n });\n },\n // https://drupal.stackexchange.com/questions/248539/cant-get-flagging-api-to-accept-post-request\n createFlagColl: function createFlagColl(_ref12, new_collection_name) {\n var dispatch = _ref12.dispatch,\n commit = _ref12.commit,\n state = _ref12.state;\n console.log('user createFlagColl', new_collection_name);\n return new Promise(function (resolve, reject) {\n var params = {\n name: new_collection_name\n };\n\n _maAxios.MA.post('materio_flag/create_user_flagging_collection', params).then(function (_ref13) {\n var data = _ref13.data;\n console.log('user MA createFlagColl data', data);\n\n if (data.status) {\n dispatch('getUserFlagColls').then(function () {\n resolve();\n });\n }\n }).catch(function (error) {\n console.warn('Issue USER MA createFlag', error);\n reject(error);\n });\n });\n },\n deleteFlagColl: function deleteFlagColl(_ref14, flagcollid) {\n var dispatch = _ref14.dispatch,\n commit = _ref14.commit,\n state = _ref14.state;\n console.log('user deleteFlagColl', flagcollid);\n return new Promise(function (resolve, reject) {\n var params = {\n flagcollid: flagcollid\n };\n\n _maAxios.MA.post('materio_flag/delete_user_flagging_collection', params).then(function (_ref15) {\n var data = _ref15.data;\n console.log('user MA deleteFlagColl data', data);\n dispatch('getUserFlagColls').then(function () {\n resolve();\n });\n }).catch(function (error) {\n console.warn('Issue USER MA createFlag', error);\n reject(error);\n });\n });\n },\n flagUnflag: function flagUnflag(_ref16, _ref17) {\n var dispatch = _ref16.dispatch,\n commit = _ref16.commit,\n state = _ref16.state;\n var action = _ref17.action,\n uuid = _ref17.uuid,\n collid = _ref17.collid;\n console.log('user flagUnflag', action, uuid, collid);\n return new Promise(function (resolve, reject) {\n var params = {\n flagid: state.flagcolls[collid].flag_id,\n uuid: uuid,\n flagcollid: collid\n };\n return _maAxios.MA.post(\"materio_flag/\".concat(action), params).then(function (_ref18) {\n var data = _ref18.data;\n console.log('user MA flag', data); // reload the fulllist of flagcolleciton\n\n dispatch('getUserFlagColls').then(function () {\n if (state.flagcolls[collid].items_uuids.length) {\n dispatch('loadMaterials', {\n uuids: state.flagcolls[collid].items_uuids,\n imgStyle: ['card_medium_half'],\n callBack: 'loadMaterialsCallBack',\n callBackArgs: {\n collid: collid\n }\n }).then(function () {\n resolve();\n });\n } else {\n commit('setLoadedCollItems', {\n collid: collid,\n items: []\n });\n resolve();\n }\n });\n }).catch(function (error) {\n console.warn('Issue USER MA flagUnflag', error);\n });\n });\n },\n openFlagColl: function openFlagColl(_ref19, collid) {\n var commit = _ref19.commit,\n dispatch = _ref19.dispatch,\n state = _ref19.state;\n console.log('user openFlagColl', collid);\n commit('openFlagColl', collid);\n\n if (state.flagcolls[collid].items_uuids.length) {\n if (typeof state.flagcollsLoadedItems[collid] === 'undefined') {\n console.log('loading flagcoll items'); // if no loadedItems, load them\n // loadMaterials is on mixins\n // https://github.com/huybuidac/vuex-extensions\n\n dispatch('loadMaterials', {\n uuids: state.flagcolls[collid].items_uuids,\n imgStyle: ['card_medium_half'],\n callBack: 'loadMaterialsCallBack',\n callBackArgs: {\n collid: collid\n }\n });\n } else {\n // call the mutation without data to only trigger the FlagCollection component update\n console.log('committing setLoadedCollItems without args');\n commit('setLoadedCollItems');\n }\n } else {\n commit('setLoadedCollItems', {\n collid: collid,\n items: []\n });\n }\n },\n loadMaterialsCallBack: function loadMaterialsCallBack(_ref20, _ref21) {\n var commit = _ref20.commit;\n var items = _ref21.items,\n callBackArgs = _ref21.callBackArgs;\n console.log('user loadMaterialsCallBack', items, callBackArgs);\n commit('setLoadedCollItems', {\n collid: callBackArgs.collid,\n items: items\n });\n },\n closeFlagColl: function closeFlagColl(_ref22) {\n var commit = _ref22.commit,\n dispatch = _ref22.dispatch;\n console.log('user closeFlagColl');\n commit('closeFlagColl');\n },\n userLogout: function userLogout(_ref23) {\n var commit = _ref23.commit,\n state = _ref23.state;\n\n var credentials = _querystringEs.default.stringify({\n token: state.csrf_token\n });\n\n _restAxios.REST.post('/user/logout', credentials).then(function (resp) {\n console.log('userLogout resp', resp);\n commit('setLoggedOut');\n }).catch(function (error) {\n console.warn('Issue with logout', error);\n Promise.reject(error);\n });\n }\n }\n};\nexports.default = _default;\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/store/modules/user.js?"); /***/ }), @@ -1326,6 +1354,22 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue": +/*!*******************************************************************************!*\ + !*** ./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue ***! + \*******************************************************************************/ +/*! namespace exports */ +/*! export __esModule [provided] [no usage info] [missing usage info prevents renaming] -> ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js& .__esModule */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_exports__, __webpack_require__.d, __webpack_require__.r, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"__esModule\": () => /* reexport safe */ _ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__.__esModule,\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__\n/* harmony export */ });\n/* harmony import */ var _ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true&\");\n/* harmony import */ var _ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ModalCard.vue?vue&type=script&lang=js& */ \"./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js&\");\n/* harmony import */ var _node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js */ \"./node_modules/vue-loader/lib/runtime/componentNormalizer.js\");\n\n\n\n\n\n/* normalize component */\n;\nvar component = (0,_node_modules_vue_loader_lib_runtime_componentNormalizer_js__WEBPACK_IMPORTED_MODULE_2__.default)(\n _ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_1__.default,\n _ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__.render,\n _ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns,\n false,\n null,\n \"62d62e96\",\n null\n \n)\n\n/* hot reload */\nif (false) { var api; }\ncomponent.options.__file = \"web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue\"\n/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (component.exports);\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?"); + +/***/ }), + /***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue": /*!*****************************************************************************!*\ !*** ./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue ***! @@ -1710,6 +1754,22 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js&": +/*!********************************************************************************************************!*\ + !*** ./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js& ***! + \********************************************************************************************************/ +/*! namespace exports */ +/*! export __esModule [provided] [no usage info] [missing usage info prevents renaming] -> ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js& .__esModule */ +/*! export default [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_exports__, __webpack_require__.d, __webpack_require__.r, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": () => __WEBPACK_DEFAULT_EXPORT__,\n/* harmony export */ \"__esModule\": () => /* reexport safe */ _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__.__esModule\n/* harmony export */ });\n/* harmony import */ var _node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/babel-loader/lib/index.js!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalCard.vue?vue&type=script&lang=js& */ \"./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=script&lang=js&\");\n /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_babel_loader_lib_index_js_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_script_lang_js___WEBPACK_IMPORTED_MODULE_0__.default); \n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?"); + +/***/ }), + /***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=script&lang=js&": /*!******************************************************************************************************!*\ !*** ./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=script&lang=js& ***! @@ -2162,6 +2222,22 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ }), +/***/ "./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true&": +/*!**************************************************************************************************************************!*\ + !*** ./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& ***! + \**************************************************************************************************************************/ +/*! namespace exports */ +/*! export render [provided] [no usage info] [missing usage info prevents renaming] -> ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& .render */ +/*! export staticRenderFns [provided] [no usage info] [missing usage info prevents renaming] -> ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& .staticRenderFns */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__, __webpack_exports__, __webpack_require__.d, __webpack_require__.r, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__.render,\n/* harmony export */ \"staticRenderFns\": () => /* reexport safe */ _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__.staticRenderFns\n/* harmony export */ });\n/* harmony import */ var _node_modules_vue_loader_lib_loaders_templateLoader_js_vue_loader_options_node_modules_vue_loader_lib_index_js_vue_loader_options_ModalCard_vue_vue_type_template_id_62d62e96_scoped_true___WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! -!../../../../../../../node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& */ \"./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true&\");\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?"); + +/***/ }), + /***/ "./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=template&id=0f9e2147&scoped=true&": /*!************************************************************************************************************************!*\ !*** ./web/themes/custom/materiotheme/vuejs/components/Content/Product.vue?vue&type=template&id=0f9e2147&scoped=true& ***! @@ -2414,7 +2490,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"article\", { staticClass: \"card search-card\" }, [\n _c(\"header\", [\n _c(\"h1\", [_vm._v(_vm._s(_vm.item.title))]),\n _vm._v(\" \"),\n _c(\"h4\", [_vm._v(_vm._s(_vm.item.field_short_description))]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"ref\" }, [\n _vm._v(_vm._s(_vm.item.field_reference))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"nav\", { staticClass: \"tools\" }, [\n _c(\"section\", { staticClass: \"tool flags\" }, [\n _c(\"span\", { staticClass: \"btn mdi mdi-folder-outline\" }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"tool-content\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.flagcolls, function(coll) {\n return _vm.flagcolls\n ? _c(\"li\", { key: coll.id }, [\n _c(\n \"span\",\n {\n staticClass: \"flag mdi\",\n class: [\n _vm.flagIsLoading(coll.id)\n ? \"mdi-loading mdi-spin\"\n : _vm.flagIsActive(coll.id)\n ? \"mdi-close-circle isActive\"\n : \"mdi-plus\"\n ],\n attrs: { collid: coll.id },\n on: {\n click: function($event) {\n $event.preventDefault()\n return _vm.onFlagActionCard($event)\n }\n }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(coll.name) +\n \"\\n \"\n )\n ]\n )\n ])\n : _vm._e()\n }),\n 0\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"section\",\n {\n directives: [{ name: \"switcher\", rawName: \"v-switcher\" }],\n staticClass: \"images\"\n },\n _vm._l(_vm.item.images, function(img, index) {\n return _c(\"figure\", { key: img.url }, [\n _c(\"img\", {\n directives: [\n {\n name: \"lazy\",\n rawName: \"v-lazy\",\n value: index,\n expression: \"index\"\n }\n ],\n staticClass: \"lazy\",\n attrs: { \"data-src\": img.url, title: img.title }\n }),\n _vm._v(\" \"),\n _c(\"img\", { staticClass: \"blank\", attrs: { src: _vm.blanksrc } })\n ])\n }),\n 0\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"card search-card\" },\n [\n _c(\"header\", { on: { click: _vm.openModalCard } }, [\n _c(\"h1\", [_vm._v(_vm._s(_vm.item.title))]),\n _vm._v(\" \"),\n _c(\"h4\", [_vm._v(_vm._s(_vm.item.field_short_description))]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"ref\" }, [\n _vm._v(_vm._s(_vm.item.field_reference))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"nav\", { staticClass: \"tools\" }, [\n _c(\"section\", { staticClass: \"tool flags\" }, [\n _c(\"span\", { staticClass: \"btn mdi mdi-folder-outline\" }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"tool-content\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.flagcolls, function(coll) {\n return _vm.flagcolls\n ? _c(\"li\", { key: coll.id }, [\n _c(\n \"span\",\n {\n staticClass: \"flag mdi\",\n class: [\n _vm.flagIsLoading(coll.id)\n ? \"mdi-loading mdi-spin\"\n : _vm.flagIsActive(coll.id)\n ? \"mdi-close-circle isActive\"\n : \"mdi-plus\"\n ],\n attrs: { collid: coll.id },\n on: {\n click: function($event) {\n $event.preventDefault()\n return _vm.onFlagActionCard($event)\n }\n }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(coll.name) +\n \"\\n \"\n )\n ]\n )\n ])\n : _vm._e()\n }),\n 0\n )\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"section\",\n {\n directives: [{ name: \"switcher\", rawName: \"v-switcher\" }],\n staticClass: \"images\"\n },\n _vm._l(_vm.item.images, function(img, index) {\n return _c(\"figure\", { key: img.url }, [\n _c(\"img\", {\n directives: [\n {\n name: \"lazy\",\n rawName: \"v-lazy\",\n value: index,\n expression: \"index\"\n }\n ],\n staticClass: \"lazy\",\n attrs: {\n \"data-src\": img.img_styles.card_medium,\n title: img.title\n }\n }),\n _vm._v(\" \"),\n _c(\"img\", {\n staticClass: \"blank\",\n attrs: { src: _vm.blanksrc },\n on: {\n click: function($event) {\n _vm.lightbox_index = index\n }\n }\n })\n ])\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"CoolLightBox\", {\n attrs: {\n items: _vm.item.images,\n index: _vm.lightbox_index,\n srcName: \"src\",\n loop: \"true\"\n },\n on: {\n close: function($event) {\n _vm.lightbox_index = null\n }\n }\n })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/Card.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -2462,7 +2538,23 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; -eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"article\", { staticClass: \"card minicard\" }, [\n _c(\"header\", [\n _c(\"h1\", [_vm._v(_vm._s(_vm.item.title))]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"ref\" }, [\n _vm._v(_vm._s(_vm.item.field_reference))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"nav\", { staticClass: \"tools\" }, [\n _c(\"section\", { staticClass: \"tool flags\" }, [\n _c(\"span\", {\n staticClass: \"mdi unflag\",\n class: [\n _vm.itemIsLoading() ? \"mdi-loading mdi-spin\" : \"mdi-folder-remove\"\n ],\n on: {\n click: function($event) {\n $event.preventDefault()\n return _vm.onUnFlagCard($event)\n }\n }\n })\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"section\",\n {\n directives: [{ name: \"switcher\", rawName: \"v-switcher\" }],\n staticClass: \"images\"\n },\n _vm._l(_vm.item.images, function(img, index) {\n return _c(\"figure\", { key: img.url }, [\n _c(\"img\", {\n directives: [\n {\n name: \"lazy\",\n rawName: \"v-lazy\",\n value: index,\n expression: \"index\"\n }\n ],\n staticClass: \"lazy\",\n attrs: { \"data-src\": img.url, title: img.title }\n }),\n _vm._v(\" \"),\n _c(\"img\", { staticClass: \"blank\", attrs: { src: _vm.blanksrc } })\n ])\n }),\n 0\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/MiniCard.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\"article\", { staticClass: \"card minicard\" }, [\n _c(\"header\", [\n _c(\"h1\", [_vm._v(_vm._s(_vm.item.title))]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"ref\" }, [\n _vm._v(_vm._s(_vm.item.field_reference))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"nav\", { staticClass: \"tools\" }, [\n _c(\"section\", { staticClass: \"tool flags\" }, [\n _c(\"span\", {\n staticClass: \"mdi unflag\",\n class: [\n _vm.itemIsLoading() ? \"mdi-loading mdi-spin\" : \"mdi-folder-remove\"\n ],\n on: {\n click: function($event) {\n $event.preventDefault()\n return _vm.onUnFlagCard($event)\n }\n }\n })\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"section\",\n {\n directives: [{ name: \"switcher\", rawName: \"v-switcher\" }],\n staticClass: \"images\"\n },\n _vm._l(_vm.item.images, function(img, index) {\n return _c(\"figure\", { key: img.url }, [\n _c(\"img\", {\n directives: [\n {\n name: \"lazy\",\n rawName: \"v-lazy\",\n value: index,\n expression: \"index\"\n }\n ],\n staticClass: \"lazy\",\n attrs: {\n \"data-src\": img.img_styles.card_medium_half,\n title: img.title\n }\n }),\n _vm._v(\" \"),\n _c(\"img\", { staticClass: \"blank\", attrs: { src: _vm.blanksrc } })\n ])\n }),\n 0\n )\n ])\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/MiniCard.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); + +/***/ }), + +/***/ "./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true&": +/*!*****************************************************************************************************************************************************************************************************************************************************************!*\ + !*** ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options!./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?vue&type=template&id=62d62e96&scoped=true& ***! + \*****************************************************************************************************************************************************************************************************************************************************************/ +/*! namespace exports */ +/*! export render [provided] [no usage info] [missing usage info prevents renaming] */ +/*! export staticRenderFns [provided] [no usage info] [missing usage info prevents renaming] */ +/*! other exports [not provided] [no usage info] */ +/*! runtime requirements: __webpack_require__.r, __webpack_exports__, __webpack_require__.d, __webpack_require__.* */ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"render\": () => /* binding */ render,\n/* harmony export */ \"staticRenderFns\": () => /* binding */ staticRenderFns\n/* harmony export */ });\nvar render = function() {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n return _c(\n \"article\",\n { staticClass: \"card modal-card\" },\n [\n _c(\"section\", { staticClass: \"col col-right\" }, [\n _c(\"header\", [\n _c(\"h1\", [_vm._v(_vm._s(_vm.item.title))]),\n _vm._v(\" \"),\n _c(\"h4\", [_vm._v(_vm._s(_vm.item.field_short_description))]),\n _vm._v(\" \"),\n _c(\"span\", { staticClass: \"ref\" }, [\n _vm._v(_vm._s(_vm.item.field_reference))\n ])\n ]),\n _vm._v(\" \"),\n _c(\"nav\", { staticClass: \"tools\" }, [\n _c(\"section\", { staticClass: \"tool flags\" }, [\n _c(\"span\", { staticClass: \"btn mdi mdi-folder-outline\" }),\n _vm._v(\" \"),\n _c(\"div\", { staticClass: \"tool-content\" }, [\n _c(\n \"ul\",\n _vm._l(_vm.flagcolls, function(coll) {\n return _vm.flagcolls\n ? _c(\"li\", { key: coll.id }, [\n _c(\n \"span\",\n {\n staticClass: \"flag mdi\",\n class: [\n _vm.flagIsLoading(coll.id)\n ? \"mdi-loading mdi-spin\"\n : _vm.flagIsActive(coll.id)\n ? \"mdi-close-circle isActive\"\n : \"mdi-plus\"\n ],\n attrs: { collid: coll.id },\n on: {\n click: function($event) {\n $event.preventDefault()\n return _vm.onFlagActionCard($event)\n }\n }\n },\n [\n _vm._v(\n \"\\n \" +\n _vm._s(coll.name) +\n \"\\n \"\n )\n ]\n )\n ])\n : _vm._e()\n }),\n 0\n )\n ])\n ])\n ])\n ]),\n _vm._v(\" \"),\n _c(\n \"section\",\n {\n directives: [{ name: \"switcher\", rawName: \"v-switcher\" }],\n staticClass: \"col col-left images\"\n },\n _vm._l(_vm.item.images, function(img, index) {\n return _c(\"figure\", { key: img.url }, [\n _c(\"img\", {\n directives: [\n {\n name: \"lazy\",\n rawName: \"v-lazy\",\n value: index,\n expression: \"index\"\n }\n ],\n staticClass: \"lazy\",\n attrs: { \"data-src\": img.img_styles.card_full, title: img.title }\n }),\n _vm._v(\" \"),\n _c(\"img\", {\n staticClass: \"blank\",\n attrs: { src: _vm.blanksrc },\n on: {\n click: function($event) {\n _vm.lightbox_index = index\n }\n }\n })\n ])\n }),\n 0\n ),\n _vm._v(\" \"),\n _c(\"CoolLightBox\", {\n attrs: {\n items: _vm.item.images,\n index: _vm.lightbox_index,\n srcName: \"src\",\n loop: \"true\"\n },\n on: {\n close: function($event) {\n _vm.lightbox_index = null\n }\n }\n })\n ],\n 1\n )\n}\nvar staticRenderFns = []\nrender._withStripped = true\n\n\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue?./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib/index.js??vue-loader-options"); /***/ }), @@ -2747,7 +2839,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac \***************************************************************/ /*! unknown exports (runtime-defined) */ /*! runtime requirements: __webpack_require__ */ -eval("\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vueInfiniteLoading = _interopRequireDefault(__webpack_require__(/*! vue-infinite-loading */ \"./node_modules/vue-infinite-loading/dist/vue-infinite-loading.js\"));\n\nvar _vueCoolLightbox = _interopRequireDefault(__webpack_require__(/*! vue-cool-lightbox */ \"./node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.esm.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _UserBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/UserBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/UserBlock.vue\"));\n\nvar _MainContent = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/MainContent */ \"./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue\"));\n\nvar _SearchBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/SearchBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/SearchBlock.vue\"));\n\nvar _LeftContent = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/LeftContent */ \"./web/themes/custom/materiotheme/vuejs/components/Content/LeftContent.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\n__webpack_require__(/*! vue-cool-lightbox/dist/vue-cool-lightbox.min.css */ \"./node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.min.css\");\n\n__webpack_require__(/*! theme/assets/styles/main.scss */ \"./web/themes/custom/materiotheme/assets/styles/main.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n_vue.default.use(_vueInfiniteLoading.default, {\n props: {\n spinner: 'spiral' // slots.noMore: ''\n\n } // system: {\n // throttleLimit: 50,\n // /* other settings need to configure */\n // }\n\n}); // import vueVimeoPlayer from 'vue-vimeo-player'\n// Vue.use(vueVimeoPlayer)\n// import VueYouTubeEmbed from 'vue-youtube-embed'\n// Vue.use(VueYouTubeEmbed)\n\n\n_vue.default.use(_vueCoolLightbox.default);\n\n(function (Drupal, drupalSettings, drupalDecoupled) {\n var MaterioTheme = function MaterioTheme() {\n var _v_sitebranding_block, _v_user_block, _v_header_menu, _v_pagetitle_block, _v_search_block, _v_main_content, _v_left_content;\n\n var _is_front = drupalSettings.path.isFront;\n console.log('drupalSettings', drupalSettings); // ___ _ _\n // |_ _|_ _ (_) |_\n // | || ' \\| | _|\n // |___|_||_|_|\\__|\n\n function init() {\n console.log('MaterioTheme init()');\n initVues();\n }\n\n function checkNoVuePages() {\n // return drupalDecoupled.sys_path != '/cart'\n // && drupalDecoupled.sys_path.indexOf('checkout') != 1;\n if (drupalDecoupled.route_name.indexOf('commerce') == -1 && drupalDecoupled.route_name.indexOf('flagging_collection') == -1 && drupalDecoupled.route_name.indexOf('user') == -1) {\n return false;\n } else {\n return true;\n }\n }\n\n function initVues() {\n // only launch views if we are not in commerce pages\n if (!checkNoVuePages()) {\n initVRouter();\n initVSiteBrandingBlock();\n initVPagetitleBlock();\n initVHeaderMenu();\n initVMainContent();\n initVSearchBlock();\n initVLeftContent();\n }\n\n initVUserBlock();\n }\n\n function initVRouter() {\n // we need this to update the title and body classes while using history nav\n _route.default.beforeEach(function (to, from, next) {\n var _document$querySelect, _document$querySelect2;\n\n // console.log('router beforeEach to ', to);\n // commit new title to store\n var title = null;\n\n switch (to.name) {\n case 'home':\n title = null;\n break;\n\n case 'article':\n title = false;\n break;\n\n default:\n title = to.name;\n }\n\n if (title !== false) {\n _store.default.commit('Common/setPagetitle', title);\n } // remove all path related body classes\n\n\n var body_classes = document.querySelector('body').classList;\n var classes_to_rm = [];\n\n for (var i = 0; i < body_classes.length; i++) {\n if (body_classes[i].startsWith('path-')) {\n classes_to_rm.push(body_classes[i]);\n }\n }\n\n (_document$querySelect = document.querySelector('body').classList).remove.apply(_document$querySelect, classes_to_rm); // add new path classes to body\n\n\n var classes = [];\n\n if (to.path == '/') {\n classes.push('path-home');\n } else {\n var path_parts = to.path.replace(/^\\//, '').split('/'); // TODO: remove language relative prefix from path classes (fr, en, etc)\n\n for (var i = 0; i < path_parts.length; i++) {\n if (i == 0) {\n var c = 'path-' + path_parts[i];\n } else if (path_parts[i] !== '') {\n var c = classes[i - 1] + '-' + path_parts[i];\n }\n\n classes.push(c);\n }\n }\n\n (_document$querySelect2 = document.querySelector('body').classList).add.apply(_document$querySelect2, classes); // trigger router\n\n\n next();\n });\n }\n\n function initVSiteBrandingBlock() {\n _v_sitebranding_block = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: '#block-sitebranding',\n methods: {\n onclick: function onclick(event) {\n // console.log(\"Clicked on logo event\", event);\n var href = event.target.getAttribute('href'); // console.log(\"Clicked on logo href\", href);\n\n this.$router.push(href); // replaced by router.beforeEach\n // this.$store.commit('Common/setPagetitle', null)\n }\n }\n });\n }\n\n function initVPagetitleBlock() {\n var $blk = document.querySelector('#block-pagetitle');\n var $h2 = $blk.querySelector('h2'); // get the loaded pagetitle\n\n var title = $h2.innerText; // if not front recorde the loaded pagetitle in store\n\n if (!_is_front) {\n _store.default.commit('Common/setPagetitle', title);\n } // replace in template the pagetitle by vue binding\n\n\n $h2.innerText = '{{ pagetitle }}'; // create the vue\n\n _v_pagetitle_block = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: $blk,\n computed: _objectSpread({}, (0, _vuex.mapState)({\n pagetitle: function pagetitle(state) {\n return state.Common.pagetitle;\n }\n }))\n });\n }\n\n function initVUserBlock() {\n var mount_point = drupalSettings.user.uid !== 0 ? 'block-userblock' : 'block-userlogin';\n var props = {\n title: '',\n loginblock: ''\n };\n var $block;\n\n switch (mount_point) {\n case 'block-userlogin':\n $block = document.getElementById(mount_point);\n console.log('initVUserBlock login form html', $block);\n props.loginblock = $block.outerHTML.trim();\n break;\n\n case 'block-userblock':\n default:\n break;\n }\n\n _v_user_block = new _vue.default({\n store: _store.default,\n // computed: {\n // ...mapState({\n // isloggedin: state => state.User.isloggedin\n // })\n // },\n created: function created() {\n // if already loggedin, call store.user to get the user infos\n if (drupalSettings.user.uid !== 0) {\n this.$store.commit('User/setUid', drupalSettings.user.uid);\n this.$store.dispatch('User/getUser');\n }\n },\n render: function render(h) {\n return h(_UserBlock.default, {\n props: props\n });\n }\n }).$mount('#' + mount_point); // console.log('initVUserBlock', _v_user_block);\n }\n\n function initVHeaderMenu() {\n // console.log('initVHeaderMenu');\n // adding vuejs attributes has it wont work on twig template (see menu--header.html.twig)\n // not working : String contains an invalid character\n // document.querySelectorAll(`#block-header a`).forEach(link => {\n // console.log(link);\n // link.setAttribute('@click.prevent', 'onclick')\n // });\n _v_header_menu = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: '#block-header',\n methods: {\n onclick: function onclick(event) {\n // console.log(\"Clicked on header menu link\", event);\n var href = event.target.getAttribute('href'); // let title = event.target.innerText;\n // console.log(\"Clicked on header menu link : href\", href);\n\n this.$router.push(href); // replaced by router.beforeEach\n // this.$store.commit('Common/setPagetitle', title)\n }\n }\n });\n }\n\n function initVMainContent() {\n var id = 'main-content';\n var $main_content = document.querySelector('#' + id); // console.log('main-content', $main_content);\n\n var main_html = $main_content.innerHTML;\n _v_main_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_MainContent.default, {\n props: {\n id: id,\n html: main_html,\n isfront: drupalSettings.path.isFront\n }\n });\n }\n }).$mount('#' + id);\n }\n\n function initVSearchBlock() {\n // console.log('initVSearchBlock');\n var id = 'block-materiosapisearchblock';\n var $search_block = document.getElementById(id);\n var formhtml = null;\n\n if ($search_block) {\n // get the search form html to pass it as template to the vue\n // we gain display speed vs async downloaded data\n formhtml = $search_block.innerHTML;\n } else {\n // else create the empty block to fill it later with async data\n $search_block = document.createElement('div');\n $search_block.setAttribute('id', id); // TODO: get region by REST\n\n var $region = document.getElementById('header-bottom');\n $region.appendChild($search_block);\n } // in any case create the vue\n\n\n _v_search_block = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_SearchBlock.default, {\n props: {\n blockid: id,\n formhtml: formhtml\n }\n });\n }\n }).$mount('#' + id);\n }\n\n function initVLeftContent() {\n var id = 'content-left';\n var $leftContent = document.getElementById(id); // in any case create the vue\n\n _v_left_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_LeftContent.default, {\n props: {\n id: id\n }\n });\n }\n }).$mount('#' + id);\n }\n\n init();\n }; // end MaterioTheme()\n\n\n var materiotheme = new MaterioTheme();\n})(Drupal, drupalSettings, drupalDecoupled);\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/assets/scripts/main.js?"); +eval("\n\nvar _vue = _interopRequireDefault(__webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\"));\n\nvar _vueInfiniteLoading = _interopRequireDefault(__webpack_require__(/*! vue-infinite-loading */ \"./node_modules/vue-infinite-loading/dist/vue-infinite-loading.js\"));\n\nvar _vueCoolLightbox = _interopRequireDefault(__webpack_require__(/*! vue-cool-lightbox */ \"./node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.esm.js\"));\n\nvar _vueJsModal = _interopRequireDefault(__webpack_require__(/*! vue-js-modal */ \"./node_modules/vue-js-modal/dist/index.js\"));\n\nvar _store = _interopRequireDefault(__webpack_require__(/*! vuejs/store */ \"./web/themes/custom/materiotheme/vuejs/store/index.js\"));\n\nvar _route = _interopRequireDefault(__webpack_require__(/*! vuejs/route */ \"./web/themes/custom/materiotheme/vuejs/route/index.js\"));\n\nvar _UserBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/UserBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/UserBlock.vue\"));\n\nvar _MainContent = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/MainContent */ \"./web/themes/custom/materiotheme/vuejs/components/Content/MainContent.vue\"));\n\nvar _SearchBlock = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Block/SearchBlock */ \"./web/themes/custom/materiotheme/vuejs/components/Block/SearchBlock.vue\"));\n\nvar _LeftContent = _interopRequireDefault(__webpack_require__(/*! vuejs/components/Content/LeftContent */ \"./web/themes/custom/materiotheme/vuejs/components/Content/LeftContent.vue\"));\n\nvar _vuex = __webpack_require__(/*! vuex */ \"./node_modules/vuex/dist/vuex.common.js\");\n\n__webpack_require__(/*! vue-cool-lightbox/dist/vue-cool-lightbox.min.css */ \"./node_modules/vue-cool-lightbox/dist/vue-cool-lightbox.min.css\");\n\n__webpack_require__(/*! theme/assets/styles/main.scss */ \"./web/themes/custom/materiotheme/assets/styles/main.scss\");\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n_vue.default.use(_vueInfiniteLoading.default, {\n props: {\n spinner: 'spiral' // slots.noMore: ''\n\n } // system: {\n // throttleLimit: 50,\n // /* other settings need to configure */\n // }\n\n}); // import vueVimeoPlayer from 'vue-vimeo-player'\n// Vue.use(vueVimeoPlayer)\n// import VueYouTubeEmbed from 'vue-youtube-embed'\n// Vue.use(VueYouTubeEmbed)\n\n\n_vue.default.use(_vueCoolLightbox.default);\n\n_vue.default.use(_vueJsModal.default);\n\n(function (Drupal, drupalSettings, drupalDecoupled) {\n var MaterioTheme = function MaterioTheme() {\n var _v_sitebranding_block, _v_user_block, _v_header_menu, _v_pagetitle_block, _v_search_block, _v_main_content, _v_left_content;\n\n var _is_front = drupalSettings.path.isFront;\n console.log('drupalSettings', drupalSettings); // ___ _ _\n // |_ _|_ _ (_) |_\n // | || ' \\| | _|\n // |___|_||_|_|\\__|\n\n function init() {\n console.log('MaterioTheme init()');\n initVues();\n }\n\n function checkNoVuePages() {\n // return drupalDecoupled.sys_path != '/cart'\n // && drupalDecoupled.sys_path.indexOf('checkout') != 1;\n if (drupalDecoupled.route_name.indexOf('commerce') == -1 && drupalDecoupled.route_name.indexOf('flagging_collection') == -1 && drupalDecoupled.route_name.indexOf('user') == -1) {\n return false;\n } else {\n return true;\n }\n }\n\n function initVues() {\n // only launch views if we are not in commerce pages\n if (!checkNoVuePages()) {\n initVRouter();\n initVSiteBrandingBlock();\n initVPagetitleBlock();\n initVHeaderMenu();\n initVMainContent();\n initVSearchBlock();\n initVLeftContent();\n }\n\n initVUserBlock();\n }\n\n function initVRouter() {\n // we need this to update the title and body classes while using history nav\n _route.default.beforeEach(function (to, from, next) {\n var _document$querySelect, _document$querySelect2;\n\n // console.log('router beforeEach to ', to);\n // commit new title to store\n var title = null;\n\n switch (to.name) {\n case 'home':\n title = null;\n break;\n\n case 'article':\n title = false;\n break;\n\n default:\n title = to.name;\n }\n\n if (title !== false) {\n _store.default.commit('Common/setPagetitle', title);\n } // remove all path related body classes\n\n\n var body_classes = document.querySelector('body').classList;\n var classes_to_rm = [];\n\n for (var i = 0; i < body_classes.length; i++) {\n if (body_classes[i].startsWith('path-')) {\n classes_to_rm.push(body_classes[i]);\n }\n }\n\n (_document$querySelect = document.querySelector('body').classList).remove.apply(_document$querySelect, classes_to_rm); // add new path classes to body\n\n\n var classes = [];\n\n if (to.path == '/') {\n classes.push('path-home');\n } else {\n var path_parts = to.path.replace(/^\\//, '').split('/'); // TODO: remove language relative prefix from path classes (fr, en, etc)\n\n for (var i = 0; i < path_parts.length; i++) {\n if (i == 0) {\n var c = 'path-' + path_parts[i];\n } else if (path_parts[i] !== '') {\n var c = classes[i - 1] + '-' + path_parts[i];\n }\n\n classes.push(c);\n }\n }\n\n (_document$querySelect2 = document.querySelector('body').classList).add.apply(_document$querySelect2, classes); // trigger router\n\n\n next();\n });\n }\n\n function initVSiteBrandingBlock() {\n _v_sitebranding_block = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: '#block-sitebranding',\n methods: {\n onclick: function onclick(event) {\n // console.log(\"Clicked on logo event\", event);\n var href = event.target.getAttribute('href'); // console.log(\"Clicked on logo href\", href);\n\n this.$router.push(href); // replaced by router.beforeEach\n // this.$store.commit('Common/setPagetitle', null)\n }\n }\n });\n }\n\n function initVPagetitleBlock() {\n var $blk = document.querySelector('#block-pagetitle');\n var $h2 = $blk.querySelector('h2'); // get the loaded pagetitle\n\n var title = $h2.innerText; // if not front recorde the loaded pagetitle in store\n\n if (!_is_front) {\n _store.default.commit('Common/setPagetitle', title);\n } // replace in template the pagetitle by vue binding\n\n\n $h2.innerText = '{{ pagetitle }}'; // create the vue\n\n _v_pagetitle_block = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: $blk,\n computed: _objectSpread({}, (0, _vuex.mapState)({\n pagetitle: function pagetitle(state) {\n return state.Common.pagetitle;\n }\n }))\n });\n }\n\n function initVUserBlock() {\n var mount_point = drupalSettings.user.uid !== 0 ? 'block-userblock' : 'block-userlogin';\n var props = {\n title: '',\n loginblock: ''\n };\n var $block;\n\n switch (mount_point) {\n case 'block-userlogin':\n $block = document.getElementById(mount_point);\n console.log('initVUserBlock login form html', $block);\n props.loginblock = $block.outerHTML.trim();\n break;\n\n case 'block-userblock':\n default:\n break;\n }\n\n _v_user_block = new _vue.default({\n store: _store.default,\n // computed: {\n // ...mapState({\n // isloggedin: state => state.User.isloggedin\n // })\n // },\n created: function created() {\n // if already loggedin, call store.user to get the user infos\n if (drupalSettings.user.uid !== 0) {\n this.$store.commit('User/setUid', drupalSettings.user.uid);\n this.$store.dispatch('User/getUser');\n }\n },\n render: function render(h) {\n return h(_UserBlock.default, {\n props: props\n });\n }\n }).$mount('#' + mount_point); // console.log('initVUserBlock', _v_user_block);\n }\n\n function initVHeaderMenu() {\n // console.log('initVHeaderMenu');\n // adding vuejs attributes has it wont work on twig template (see menu--header.html.twig)\n // not working : String contains an invalid character\n // document.querySelectorAll(`#block-header a`).forEach(link => {\n // console.log(link);\n // link.setAttribute('@click.prevent', 'onclick')\n // });\n _v_header_menu = new _vue.default({\n store: _store.default,\n router: _route.default,\n el: '#block-header',\n methods: {\n onclick: function onclick(event) {\n // console.log(\"Clicked on header menu link\", event);\n var href = event.target.getAttribute('href'); // let title = event.target.innerText;\n // console.log(\"Clicked on header menu link : href\", href);\n\n this.$router.push(href); // replaced by router.beforeEach\n // this.$store.commit('Common/setPagetitle', title)\n }\n }\n });\n }\n\n function initVMainContent() {\n var id = 'main-content';\n var $main_content = document.querySelector('#' + id); // console.log('main-content', $main_content);\n\n var main_html = $main_content.innerHTML;\n _v_main_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_MainContent.default, {\n props: {\n id: id,\n html: main_html,\n isfront: drupalSettings.path.isFront\n }\n });\n }\n }).$mount('#' + id);\n }\n\n function initVSearchBlock() {\n // console.log('initVSearchBlock');\n var id = 'block-materiosapisearchblock';\n var $search_block = document.getElementById(id);\n var formhtml = null;\n\n if ($search_block) {\n // get the search form html to pass it as template to the vue\n // we gain display speed vs async downloaded data\n formhtml = $search_block.innerHTML;\n } else {\n // else create the empty block to fill it later with async data\n $search_block = document.createElement('div');\n $search_block.setAttribute('id', id); // TODO: get region by REST\n\n var $region = document.getElementById('header-bottom');\n $region.appendChild($search_block);\n } // in any case create the vue\n\n\n _v_search_block = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_SearchBlock.default, {\n props: {\n blockid: id,\n formhtml: formhtml\n }\n });\n }\n }).$mount('#' + id);\n }\n\n function initVLeftContent() {\n var id = 'content-left';\n var $leftContent = document.getElementById(id); // in any case create the vue\n\n _v_left_content = new _vue.default({\n store: _store.default,\n render: function render(h) {\n return h(_LeftContent.default, {\n props: {\n id: id\n }\n });\n }\n }).$mount('#' + id);\n }\n\n init();\n }; // end MaterioTheme()\n\n\n var materiotheme = new MaterioTheme();\n})(Drupal, drupalSettings, drupalDecoupled);\n\n//# sourceURL=webpack://materio.com/./web/themes/custom/materiotheme/assets/scripts/main.js?"); })(); /******/ })() diff --git a/web/themes/custom/materiotheme/assets/scripts/main.js b/web/themes/custom/materiotheme/assets/scripts/main.js index 0f7447a..394dc16 100644 --- a/web/themes/custom/materiotheme/assets/scripts/main.js +++ b/web/themes/custom/materiotheme/assets/scripts/main.js @@ -20,6 +20,9 @@ Vue.use(InfiniteLoading, { import CoolLightBox from 'vue-cool-lightbox' Vue.use(CoolLightBox) +import VModal from 'vue-js-modal' +Vue.use(VModal) + import store from 'vuejs/store' import router from 'vuejs/route' diff --git a/web/themes/custom/materiotheme/assets/styles/base/_variables.scss b/web/themes/custom/materiotheme/assets/styles/base/_variables.scss index 809d7ab..65f5ca3 100644 --- a/web/themes/custom/materiotheme/assets/styles/base/_variables.scss +++ b/web/themes/custom/materiotheme/assets/styles/base/_variables.scss @@ -12,3 +12,6 @@ $card_height: 295px; $minicard_width: 170px; $minicard_height: 100px; + +$modalcard_width: 850px; +$modalcard_height: 610px; diff --git a/web/themes/custom/materiotheme/assets/styles/main.scss b/web/themes/custom/materiotheme/assets/styles/main.scss index e3c9a1e..024cf1a 100644 --- a/web/themes/custom/materiotheme/assets/styles/main.scss +++ b/web/themes/custom/materiotheme/assets/styles/main.scss @@ -829,6 +829,7 @@ article.card{ position: relative; &, *{width: 100%; height:100%;} figure{ + cursor: pointer; margin:0; position: absolute; top:0; left:0; @@ -836,6 +837,10 @@ article.card{ &:first-of-type{ z-index:5 } + transition: opacity 0.2s ease-in-out; + &.show{opacity: 1; z-index:6;} + &.hide{opacity: 0;} + img{ // width: 100%; height:100%; &.blank{ @@ -846,6 +851,28 @@ article.card{ } } } + // overwritnig card for card-medium (aka search-card) + &.search-card{ + >header{ + cursor: pointer; + } + } + // overwriting card for modal-card + &.modal-card{ + display: flex; + flex-flow: row-reverse nowrap; + width: $modalcard_width; + height: $modalcard_height; + >.col{ + flex-basis: 50%; + } + section.col-right{ + header{ + position: relative; + bottom: auto; + } + } + } } diff --git a/web/themes/custom/materiotheme/vuejs/components/Content/Card.vue b/web/themes/custom/materiotheme/vuejs/components/Content/Card.vue index 83c3de0..f371bdc 100644 --- a/web/themes/custom/materiotheme/vuejs/components/Content/Card.vue +++ b/web/themes/custom/materiotheme/vuejs/components/Content/Card.vue @@ -1,6 +1,8 @@ + + diff --git a/web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue b/web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue index 213af4b..a2c1626 100644 --- a/web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue +++ b/web/themes/custom/materiotheme/vuejs/components/Pages/Article.vue @@ -312,7 +312,11 @@ export default { if(img.meta.imageDerivatives){ field.images.push({ title:img.meta.title, - url:img.meta.imageDerivatives.links.card_medium.href + src: img.meta.imageDerivatives.links.hd.href, + img_styles: { + card_medium: img.meta.imageDerivatives.links.card_medium.href, + card_full: img.meta.imageDerivatives.links.card_full.href + } }) } }) diff --git a/web/themes/custom/materiotheme/vuejs/components/cardMixins.js b/web/themes/custom/materiotheme/vuejs/components/cardMixins.js index 8818d46..79dcf5e 100644 --- a/web/themes/custom/materiotheme/vuejs/components/cardMixins.js +++ b/web/themes/custom/materiotheme/vuejs/components/cardMixins.js @@ -26,9 +26,13 @@ export default { figs.forEach((fig, index) => { // console.log(index); if(index == delta){ - fig.style.display = "block" + // fig.style.display = "block" + fig.classList.remove("hide") + fig.classList.add("show") }else{ - fig.style.display = "none" + // fig.style.display = "none" + fig.classList.remove("show") + fig.classList.add("hide") } }) }) diff --git a/web/themes/custom/materiotheme/vuejs/store/index.js b/web/themes/custom/materiotheme/vuejs/store/index.js index a9c5763..486f433 100644 --- a/web/themes/custom/materiotheme/vuejs/store/index.js +++ b/web/themes/custom/materiotheme/vuejs/store/index.js @@ -90,11 +90,16 @@ export default createStore(Vuex.Store, { item.images = [] for (let j = 0; j < img_src.length; j++) { if (img_src[j].meta.imageDerivatives) { + let img_styles = {} + for (var k = 0; k < imgStyle.length; k++) { + img_styles[imgStyle[k]] = img_src[j].meta.imageDerivatives.links.[imgStyle[k]].href + } item.images.push({ title: img_src[j].meta.title, + src: img_src[j].meta.imageDerivatives.links.hd.href, // meta.imageDerivatives.style.href link is provided by drupal consumers_image_styles module // BUG: missing all image derivative but first - url: img_src[j].meta.imageDerivatives.links.[imgStyle].href + img_styles: img_styles }) } else { console.warn('missing image derivative ' + j + '/' + img_src.length + ' for ' + attrs.title) diff --git a/web/themes/custom/materiotheme/vuejs/store/modules/search.js b/web/themes/custom/materiotheme/vuejs/store/modules/search.js index ff236ba..6ffaf16 100644 --- a/web/themes/custom/materiotheme/vuejs/store/modules/search.js +++ b/web/themes/custom/materiotheme/vuejs/store/modules/search.js @@ -110,7 +110,7 @@ export default { // https://github.com/huybuidac/vuex-extensions dispatch('loadMaterials', { uuids: data.uuids, - imgStyle: 'card_medium', + imgStyle: ['card_medium', 'card_full'], callBack: 'loadMaterialsCallBack' }) }else{ diff --git a/web/themes/custom/materiotheme/vuejs/store/modules/user.js b/web/themes/custom/materiotheme/vuejs/store/modules/user.js index 4bb008a..0097896 100644 --- a/web/themes/custom/materiotheme/vuejs/store/modules/user.js +++ b/web/themes/custom/materiotheme/vuejs/store/modules/user.js @@ -254,7 +254,7 @@ export default { if (state.flagcolls[collid].items_uuids.length) { dispatch('loadMaterials', { uuids: state.flagcolls[collid].items_uuids, - imgStyle: 'card_medium_half', + imgStyle: ['card_medium_half'], callBack: 'loadMaterialsCallBack', callBackArgs: { collid: collid } }).then( () => { @@ -282,7 +282,7 @@ export default { // https://github.com/huybuidac/vuex-extensions dispatch('loadMaterials', { uuids: state.flagcolls[collid].items_uuids, - imgStyle: 'card_medium_half', + imgStyle: ['card_medium_half'], callBack: 'loadMaterialsCallBack', callBackArgs: { collid: collid } })