8 Commits
Author SHA1 Message Date
bachir dad722078e user role root fields thesaurus & samples 2026-07-17 14:37:36 +02:00
bachir 754b273eb0 commited packaged-lock after removing sentry from theme 2026-07-17 14:34:22 +02:00
bachir 141d393d70 gitignored opencode.jon 2026-07-17 14:20:25 +02:00
bachir 79b7047ed9 improved flag performances issues without a patch but with hook_module_implements_alter in materio_flag 2026-07-17 14:16:40 +02:00
bachir 1640f3629b fixed materiau samples mélange bug 2026-07-17 12:52:08 +02:00
bachir 76598e3ca0 Rebuild theme dist (searchform fix + Sentry removal)
Compiled bundles for the SearchForm search-results fix and the Sentry/
GlitchTip removal. The SENTRY_RELEASE prelude is now gone from every
chunk as expected.
2026-07-15 21:18:58 +02:00
bachir 513cdd6f9f Remove Sentry/GlitchTip integration
- main.js: drop @sentry/browser + @sentry/vue init.
- webpack.config.prod.js: drop sentryWebpackPlugin (and its dotenv/env
  plumbing that only served Sentry release/source-map upload).
- package.json: remove @sentry/browser, @sentry/vue, @sentry/webpack-plugin.

Note: run 'npm install' to update package-lock before the next build.
2026-07-15 21:16:58 +02:00
bachir 2f5a230370 SearchForm: fix inconsistent/mixed search results
- SearchForm.vue: route Enter key through submit() (native form submit
  interception) so it behaves like the button; fix autocomplete array
  mutation during iteration in the typed watcher.
- Base.vue: parse terms consistently in beforeRouteUpdate; render items
  via displayedItems (drops sparse holes); only mount infinite-loading
  after the first page and reset it per search via :identifier.
- search store: guard against stale async responses (searchId); place
  each page at its offset instead of concatenating in arrival order,
  which mixed pages when a later page resolved first.
2026-07-15 21:11:53 +02:00
53 changed files with 293 additions and 848 deletions
+3
View File
@@ -26,6 +26,9 @@ web/modules/dev/*.tar.gz
# Ignore .env files as they are personal
/.env
# opencode
/opencode.json
# npm
node_modules/
-17
View File
@@ -6,11 +6,6 @@ const baseConfig = require('./webpack.config.base')
const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const TerserPlugin = require("terser-webpack-plugin");
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");
require('dotenv').config();
// console.log(process.env);
module.exports = merge(baseConfig, {
mode: 'production',
@@ -75,18 +70,6 @@ module.exports = merge(baseConfig, {
},
devtool: 'source-map', // Ensure source maps are generated
plugins: [
sentryWebpackPlugin({
org: "figures-libres",
project: "materio.com",
authToken: process.env.SENTRY_AUTH_TOKEN,
url: "https://frontlog.figli.io",
release: {
name: process.env.RELEASE
},
// urlPrefix: '~/', // Adjust based on your deployment setup
// include: './dist', // Adjust based on your output directory
// ignore: ['node_modules', 'build'],
}),
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
+7 -12
View File
@@ -251,7 +251,8 @@
"Integrate Address with Search API https://www.drupal.org/project/address/issues/2812659": "https://www.drupal.org/files/issues/2020-11-02/integrate-address-searchapi-2812659-56.patch"
},
"drupal/mailjet": {
"DrupalmailjetControllerMailjetRegisterController::redirectRegister() does not exist https://www.drupal.org/project/mailjet/issues/3450474": "https://www.drupal.org/files/issues/2024-05-29/mailjet-15615025-5.patch"
"DrupalmailjetControllerMailjetRegisterController::redirectRegister() does not exist https://www.drupal.org/project/mailjet/issues/3450474": "https://www.drupal.org/files/issues/2024-05-29/mailjet-15615025-5.patch",
"MailjetConfigurationAccessCheck blocks access to all pages for users except admin https://www.drupal.org/project/mailjet/issues/3539776": "https://www.drupal.org/files/issues/2025-08-05/0001-fix-mailjetconfigurationaccesscheck-blocking-access.patch"
},
"drupal/pwa": {
"Manifest doesn't have a maskable icon https://www.drupal.org/project/pwa/issues/3165433": "https://www.drupal.org/files/issues/2024-03-10/manifest-doesnt-have-a-maskable-icon-error-3165433-20.patch",
@@ -276,12 +277,6 @@
},
"drupal/term_reference_tree": {
"Term Reference Tree: Re-implement Track List https://www.drupal.org/project/term_reference_tree/issues/3064280": "https://www.drupal.org/files/issues/2024-08-26/term_reference_tree-3064280_bring_back_tracklist-22.patch"
},
"drupal/flag": {
"remove flag hooks to allow site to be accessible again https://www.drupal.org/project/flag/issues/3200806": "./patches/flag-commenthooks.patch"
},
"drupal/mailjet": {
"MailjetConfigurationAccessCheck blocks access to all pages for users except admin https://www.drupal.org/project/mailjet/issues/3539776": "https://www.drupal.org/files/issues/2025-08-05/0001-fix-mailjetconfigurationaccesscheck-blocking-access.patch"
}
},
"archived-patches": {
@@ -292,7 +287,6 @@
"With no blocks, clicking on the Custom Blocks tab crashes site https://www.drupal.org/project/structure_sync/issues/3070414":"https://www.drupal.org/files/issues/2022-03-23/PluginNotFoundException-3070414-3.patch"
},
"drupal/commerce_license": {
"ability to re-purchase a license to extend it https://www.drupal.org/project/commerce_license/issues/2943888": "https://www.drupal.org/files/issues/2022-02-21/reroll-commerce_license-allow-renewal-2943888-141.patch",
"ability to re-purchase a license to extend it https://www.drupal.org/project/commerce_license/issues/2943888": "https://www.drupal.org/files/issues/2022-02-21/reroll-commerce_license-allow-renewal-2943888-141.patch"
},
"drupal/commerce_stripe" : {
@@ -302,18 +296,19 @@
"undefined index name 18 https://www.drupal.org/project/field_group/issues/3064890" : "https://www.drupal.org/files/issues/2020-10-01/field_group-undefined-index-name-3064890-18.patch",
"undefined index name 16 https://www.drupal.org/project/field_group/issues/3064890" : "https://www.drupal.org/files/issues/2020-08-10/field_group-undefined-index-name-3064890-16.patch"
},
"drupal/mailjet": {
"https://www.drupal.org/project/mailjet/issues/3325412":"https://www.drupal.org/files/issues/2022-12-05/mailjet-list_instead_of_listid.patch"
},
"drupal/advancedqueue": {
"Issue with configuration schema advancedqueue.backend.[id] https://www.drupal.org/project/advancedqueue/issues/3469869": "https://git.drupalcode.org/project/advancedqueue/-/commit/a8864851cdfa40c9e38a3f5f64885baf1937375e.patch"
},
"drupal/mailjet": {
"Error: Class MailjetTools/MailjetApi not found in Drupal/mailjet/Form/MailjetApiForm->submitForm() https://www.drupal.org/project/mailjet/issues/3464788":"https://www.drupal.org/files/issues/2024-08-20/mailjetApiForm_use_mailjettools_mailjetapi.patch",
"Error: Class MailjetTools/UsStates not found https://www.drupal.org/project/mailjet/issues/3469059":"https://www.drupal.org/files/issues/2024-08-20/mailjet_settingsform_usstates.patch"
"Error: Class MailjetTools/UsStates not found https://www.drupal.org/project/mailjet/issues/3469059":"https://www.drupal.org/files/issues/2024-08-20/mailjet_settingsform_usstates.patch",
"https://www.drupal.org/project/mailjet/issues/3325412":"https://www.drupal.org/files/issues/2022-12-05/mailjet-list_instead_of_listid.patch"
},
"drupal/user_history": {
"init batch : field_storage_values misses type https://www.drupal.org/project/user_history/issues/3311360": "https://www.drupal.org/files/issues/2022-09-23/user_history__field_storage_values__miss__type.patch"
},
"drupal/flag": {
"remove flag hooks to allow site to be accessible again https://www.drupal.org/project/flag/issues/3200806": "./patches/flag-commenthooks.patch"
}
},
"drupal-scaffold": {
@@ -16,7 +16,7 @@ type: materio_samples_field
settings: { }
module: materio_samples
locked: false
cardinality: 4
cardinality: -1
translatable: true
indexes: { }
persist_with_no_fields: false
+5 -5
View File
@@ -11,8 +11,8 @@ label: Root
weight: 2
is_admin: true
permissions:
- 'create field_thesaurus'
- 'edit field_thesaurus'
- 'edit own field_thesaurus'
- 'view field_thesaurus'
- 'view own field_thesaurus'
- 'create field_samples'
- 'edit field_samples'
- 'edit own field_samples'
- 'view field_samples'
- 'view own field_samples'
-618
View File
@@ -10,8 +10,6 @@
"hasInstallScript": true,
"license": "MIT",
"dependencies": {
"@sentry/browser": "^9.8.0",
"@sentry/vue": "^9.8.0",
"axios": "^0.21.0",
"check-password-strength": "^1.0.15",
"pretty-bytes": "^5.5.0",
@@ -31,7 +29,6 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.12.7",
"@kazupon/vue-i18n-loader": "^0.5.0",
"@sentry/webpack-plugin": "^3.2.2",
"@vue/test-utils": "^1.1.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
@@ -2618,407 +2615,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/@sentry-internal/browser-utils": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-9.8.0.tgz",
"integrity": "sha512-7aQDeU9ogMLKnEBFM/vvgMMgZDkfMhoZCtX8kq65gn33L4X2B8sI5oyUj2QJtXaRSsiUjbdCaquDLqZBCaLQHA==",
"license": "MIT",
"dependencies": {
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/feedback": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-9.8.0.tgz",
"integrity": "sha512-xWiCJkD8ROuy2pnojuRLcLI6sezK399gasA5ZL4MCXdkryqZYs55Ef2Ofj4z0RdUc8gMUb81+LTqwbmbfTqNlQ==",
"license": "MIT",
"dependencies": {
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/replay": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-9.8.0.tgz",
"integrity": "sha512-YJhhNnrsufYVIX9s5lNSFFQrBJjUtn5AxvrcnN0fvLymNg3Y73GOUpFmhTxyELjQneKiOViClxjoWSVAN7sqQA==",
"license": "MIT",
"dependencies": {
"@sentry-internal/browser-utils": "9.8.0",
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry-internal/replay-canvas": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-9.8.0.tgz",
"integrity": "sha512-/6ELOnyCOItvqv2Os29JhE8ydDds3xibMQ+FomsSkClQdC4bbc/L74nm/fdXVpJkMswtjksiTwZo1nYTS3JsIw==",
"license": "MIT",
"dependencies": {
"@sentry-internal/replay": "9.8.0",
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry/babel-plugin-component-annotate": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/@sentry/babel-plugin-component-annotate/-/babel-plugin-component-annotate-3.2.2.tgz",
"integrity": "sha512-D+SKQ266ra/wo87s9+UI/rKQi3qhGPCR8eSCDe0VJudhjHsqyNU+JJ5lnIGCgmZaWFTXgdBP/gdr1Iz1zqGs4Q==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">= 14"
}
},
"node_modules/@sentry/browser": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-9.8.0.tgz",
"integrity": "sha512-iFM4PGLc6qCb0GaHnA5Uy09k25RXVSepAgS574cm1CH7II1wrRjTozKnPKROW89WDMuxoTOL7Tk7qPGCyWmA4g==",
"license": "MIT",
"dependencies": {
"@sentry-internal/browser-utils": "9.8.0",
"@sentry-internal/feedback": "9.8.0",
"@sentry-internal/replay": "9.8.0",
"@sentry-internal/replay-canvas": "9.8.0",
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry/bundler-plugin-core": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/@sentry/bundler-plugin-core/-/bundler-plugin-core-3.2.2.tgz",
"integrity": "sha512-YGrtmqQ2jMixccX2slVG/Lw7pCGJL3DGB3clmY9mO8QBEBIN3/gEANiHJVWwRidpUOS/0b7yVVGAdwZ87oPwTg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@babel/core": "^7.18.5",
"@sentry/babel-plugin-component-annotate": "3.2.2",
"@sentry/cli": "2.42.2",
"dotenv": "^16.3.1",
"find-up": "^5.0.0",
"glob": "^9.3.2",
"magic-string": "0.30.8",
"unplugin": "1.0.1"
},
"engines": {
"node": ">= 14"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dev": true,
"license": "MIT",
"dependencies": {
"balanced-match": "^1.0.0"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/find-up": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz",
"integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==",
"dev": true,
"license": "MIT",
"dependencies": {
"locate-path": "^6.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/glob": {
"version": "9.3.5",
"resolved": "https://registry.npmjs.org/glob/-/glob-9.3.5.tgz",
"integrity": "sha512-e1LleDykUz2Iu+MTYdkSsuWX8lvAjAcs0Xef0lNIu0S2wOAzuTxCJtcd9S3cijlwYF18EsU3rzb8jPVobxDh9Q==",
"dev": true,
"license": "ISC",
"dependencies": {
"fs.realpath": "^1.0.0",
"minimatch": "^8.0.2",
"minipass": "^4.2.4",
"path-scurry": "^1.6.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/locate-path": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz",
"integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-locate": "^5.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/minimatch": {
"version": "8.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.4.tgz",
"integrity": "sha512-W0Wvr9HyFXZRGIDgCicunpQ299OKXs9RgZfaukz4qAW/pJhcpUfupc9c+OObPOFueNy8VSrZgEmDtk6Kh4WzDA==",
"dev": true,
"license": "ISC",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/minipass": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.8.tgz",
"integrity": "sha512-fNzuVyifolSLFL4NzpF+wEF4qrgqaaKX0haXPQEdQ7NKAN+WecoKMHV09YcuL/DHxrUsYQOK3MiuDf7Ip2OXfQ==",
"dev": true,
"license": "ISC",
"engines": {
"node": ">=8"
}
},
"node_modules/@sentry/bundler-plugin-core/node_modules/p-locate": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"p-limit": "^3.0.2"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/@sentry/cli": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.42.2.tgz",
"integrity": "sha512-spb7S/RUumCGyiSTg8DlrCX4bivCNmU/A1hcfkwuciTFGu8l5CDc2I6jJWWZw8/0enDGxuj5XujgXvU5tr4bxg==",
"dev": true,
"hasInstallScript": true,
"license": "BSD-3-Clause",
"dependencies": {
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.7",
"progress": "^2.0.3",
"proxy-from-env": "^1.1.0",
"which": "^2.0.2"
},
"bin": {
"sentry-cli": "bin/sentry-cli"
},
"engines": {
"node": ">= 10"
},
"optionalDependencies": {
"@sentry/cli-darwin": "2.42.2",
"@sentry/cli-linux-arm": "2.42.2",
"@sentry/cli-linux-arm64": "2.42.2",
"@sentry/cli-linux-i686": "2.42.2",
"@sentry/cli-linux-x64": "2.42.2",
"@sentry/cli-win32-i686": "2.42.2",
"@sentry/cli-win32-x64": "2.42.2"
}
},
"node_modules/@sentry/cli-darwin": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.42.2.tgz",
"integrity": "sha512-GtJSuxER7Vrp1IpxdUyRZzcckzMnb4N5KTW7sbTwUiwqARRo+wxS+gczYrS8tdgtmXs5XYhzhs+t4d52ITHMIg==",
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-linux-arm": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.42.2.tgz",
"integrity": "sha512-7udCw+YL9lwq+9eL3WLspvnuG+k5Icg92YE7zsteTzWLwgPVzaxeZD2f8hwhsu+wmL+jNqbpCRmktPteh3i2mg==",
"cpu": [
"arm"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
"freebsd"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-linux-arm64": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.42.2.tgz",
"integrity": "sha512-BOxzI7sgEU5Dhq3o4SblFXdE9zScpz6EXc5Zwr1UDZvzgXZGosUtKVc7d1LmkrHP8Q2o18HcDWtF3WvJRb5Zpw==",
"cpu": [
"arm64"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
"freebsd"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-linux-i686": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.42.2.tgz",
"integrity": "sha512-Sw/dQp5ZPvKnq3/y7wIJyxTUJYPGoTX/YeMbDs8BzDlu9to2LWV3K3r7hE7W1Lpbaw4tSquUHiQjP5QHCOS7aQ==",
"cpu": [
"x86",
"ia32"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
"freebsd"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-linux-x64": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.42.2.tgz",
"integrity": "sha512-mU4zUspAal6TIwlNLBV5oq6yYqiENnCWSxtSQVzWs0Jyq97wtqGNG9U+QrnwjJZ+ta/hvye9fvL2X25D/RxHQw==",
"cpu": [
"x64"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"linux",
"freebsd"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-win32-i686": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.42.2.tgz",
"integrity": "sha512-iHvFHPGqgJMNqXJoQpqttfsv2GI3cGodeTq4aoVLU/BT3+hXzbV0x1VpvvEhncJkDgDicJpFLM8sEPHb3b8abw==",
"cpu": [
"x86",
"ia32"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/cli-win32-x64": {
"version": "2.42.2",
"resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.42.2.tgz",
"integrity": "sha512-vPPGHjYoaGmfrU7xhfFxG7qlTBacroz5NdT+0FmDn6692D8IvpNXl1K+eV3Kag44ipJBBeR8g1HRJyx/F/9ACw==",
"cpu": [
"x64"
],
"dev": true,
"license": "BSD-3-Clause",
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">=10"
}
},
"node_modules/@sentry/core": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-9.8.0.tgz",
"integrity": "sha512-EnN2yLWCbWjooWBPzwlXdZoJG/Bqn3ymbuXX++DUJuBGjSmtixQeTf/hKeVzj4zbib3BbbYsNBasRVjq8Rk5ng==",
"license": "MIT",
"engines": {
"node": ">=18"
}
},
"node_modules/@sentry/vue": {
"version": "9.8.0",
"resolved": "https://registry.npmjs.org/@sentry/vue/-/vue-9.8.0.tgz",
"integrity": "sha512-E+27lL+aU8HjDo3DD3TlgStTIxBZHVqz6jZcL0/tig/JldpFRetO77terRHNfSVlPc0m3aNXuARu7G438f7ZlQ==",
"license": "MIT",
"dependencies": {
"@sentry/browser": "9.8.0",
"@sentry/core": "9.8.0"
},
"engines": {
"node": ">=18"
},
"peerDependencies": {
"pinia": "2.x || 3.x",
"vue": "2.x || 3.x"
},
"peerDependenciesMeta": {
"pinia": {
"optional": true
}
}
},
"node_modules/@sentry/webpack-plugin": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/@sentry/webpack-plugin/-/webpack-plugin-3.2.2.tgz",
"integrity": "sha512-6OkVKNOjKk8P9j7oh6svZ+kEP1i9YIHBC2aGWL2XsgeZTIrMBxJAXtOf+qSrfMAxEtibSroGVOMQc/y3WJTQtg==",
"dev": true,
"license": "MIT",
"dependencies": {
"@sentry/bundler-plugin-core": "3.2.2",
"unplugin": "1.0.1",
"uuid": "^9.0.0"
},
"engines": {
"node": ">= 14"
},
"peerDependencies": {
"webpack": ">=4.40.0"
}
},
"node_modules/@types/babel__core": {
"version": "7.20.5",
"resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",
@@ -3625,19 +3221,6 @@
"node": ">=0.4.0"
}
},
"node_modules/agent-base": {
"version": "6.0.2",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",
"integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"debug": "4"
},
"engines": {
"node": ">= 6.0.0"
}
},
"node_modules/aggregate-error": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",
@@ -4551,19 +4134,6 @@
"node": "*"
}
},
"node_modules/binary-extensions": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz",
"integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
@@ -7875,20 +7445,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/https-proxy-agent": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
"dev": true,
"license": "MIT",
"dependencies": {
"agent-base": "6",
"debug": "4"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/icss-utils": {
"version": "5.1.0",
"resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz",
@@ -8120,19 +7676,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dev": true,
"license": "MIT",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-boolean-object": {
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.2.tgz",
@@ -9171,19 +8714,6 @@
"yallist": "^3.0.2"
}
},
"node_modules/magic-string": {
"version": "0.30.8",
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz",
"integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@jridgewell/sourcemap-codec": "^1.4.15"
},
"engines": {
"node": ">=12"
}
},
"node_modules/make-dir": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
@@ -9634,27 +9164,6 @@
"node": ">= 0.4.6"
}
},
"node_modules/node-fetch": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
"dev": true,
"license": "MIT",
"dependencies": {
"whatwg-url": "^5.0.0"
},
"engines": {
"node": "4.x || >=6.0.0"
},
"peerDependencies": {
"encoding": "^0.1.0"
},
"peerDependenciesMeta": {
"encoding": {
"optional": true
}
}
},
"node_modules/node-int64": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
@@ -10458,13 +9967,6 @@
"dev": true,
"license": "ISC"
},
"node_modules/proxy-from-env": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
"integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
"dev": true,
"license": "MIT"
},
"node_modules/pseudomap": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz",
@@ -12421,13 +11923,6 @@
"node": ">=6"
}
},
"node_modules/tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
"dev": true,
"license": "MIT"
},
"node_modules/tsconfig": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/tsconfig/-/tsconfig-7.0.0.tgz",
@@ -12729,80 +12224,6 @@
"imurmurhash": "^0.1.4"
}
},
"node_modules/unplugin": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/unplugin/-/unplugin-1.0.1.tgz",
"integrity": "sha512-aqrHaVBWW1JVKBHmGo33T5TxeL0qWzfvjWokObHA9bYmN7eNDkwOxmLjhioHl9878qDFMAaT51XNroRyuz7WxA==",
"dev": true,
"license": "MIT",
"dependencies": {
"acorn": "^8.8.1",
"chokidar": "^3.5.3",
"webpack-sources": "^3.2.3",
"webpack-virtual-modules": "^0.5.0"
}
},
"node_modules/unplugin/node_modules/acorn": {
"version": "8.14.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
"integrity": "sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==",
"dev": true,
"license": "MIT",
"bin": {
"acorn": "bin/acorn"
},
"engines": {
"node": ">=0.4.0"
}
},
"node_modules/unplugin/node_modules/chokidar": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz",
"integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==",
"dev": true,
"license": "MIT",
"dependencies": {
"anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
},
"engines": {
"node": ">= 8.10.0"
},
"funding": {
"url": "https://paulmillr.com/funding/"
},
"optionalDependencies": {
"fsevents": "~2.3.2"
}
},
"node_modules/unplugin/node_modules/readdirp": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dev": true,
"license": "MIT",
"dependencies": {
"picomatch": "^2.2.1"
},
"engines": {
"node": ">=8.10.0"
}
},
"node_modules/unplugin/node_modules/webpack-sources": {
"version": "3.2.3",
"resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz",
"integrity": "sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/unset-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
@@ -12981,20 +12402,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/uuid": {
"version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"dev": true,
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/v8-compile-cache": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz",
@@ -13474,13 +12881,6 @@
"node": ">=8.10.0"
}
},
"node_modules/webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
"dev": true,
"license": "BSD-2-Clause"
},
"node_modules/webpack": {
"version": "5.98.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.98.0.tgz",
@@ -13679,13 +13079,6 @@
"source-map": "~0.6.1"
}
},
"node_modules/webpack-virtual-modules": {
"version": "0.5.0",
"resolved": "https://registry.npmjs.org/webpack-virtual-modules/-/webpack-virtual-modules-0.5.0.tgz",
"integrity": "sha512-kyDivFZ7ZM0BVOUteVbDFhlRt7Ah/CSPwJdi8hBpkK7QLumUqdLtVfm/PX/hkcnrvr0i77fO5+TjZ94Pe+C9iw==",
"dev": true,
"license": "MIT"
},
"node_modules/webpack/node_modules/acorn": {
"version": "8.14.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.1.tgz",
@@ -13766,17 +13159,6 @@
"node": ">=10.13.0"
}
},
"node_modules/whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
"dev": true,
"license": "MIT",
"dependencies": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
-3
View File
@@ -19,8 +19,6 @@
"author": "Bachir Soussi Chiadmi",
"license": "MIT",
"dependencies": {
"@sentry/browser": "^9.8.0",
"@sentry/vue": "^9.8.0",
"axios": "^0.21.0",
"check-password-strength": "^1.0.15",
"pretty-bytes": "^5.5.0",
@@ -40,7 +38,6 @@
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/preset-env": "^7.12.7",
"@kazupon/vue-i18n-loader": "^0.5.0",
"@sentry/webpack-plugin": "^3.2.2",
"@vue/test-utils": "^1.1.1",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
@@ -1 +1,43 @@
<?php
/**
* @file
* Contains materio_flag.module.
*/
/**
* Implements hook_module_implements_alter().
*
* flag_lists creates one Flag *config* entity per user list (1700+ on this
* site). Several flag.module hooks call FlagService::getAllFlags() and loop over
* every flag for each entity view and each entity form, running an isFlagged()
* query and an access check per flag. This makes node view and, above all, node
* edit (flag_form_alter) time out.
*
* All these flags are configured with show_in_links / show_as_field /
* show_on_form / show_contextual_link = FALSE and are only consumed through
* materio_flag (controllers/routes) and the decoupled Vue app, so flag's native
* entity integration produces nothing visible here. We therefore remove these
* expensive implementations instead of patching flag.module.
*/
function materio_flag_module_implements_alter(&$implementations, $hook) {
$hooks_to_remove = [
// flag_form_alter(): loops all flags on every content entity form
// (node edit) -> main cause of the 504 gateway timeout.
'form_alter',
// flag_entity_view(): builds a flag field render per flag on entity view.
'entity_view',
// flag_entity_build_defaults_alter(): sets max-age=0 per contextual flag.
'entity_build_defaults_alter',
// flag_entity_view_alter(): adds flag metadata to contextual links.
'entity_view_alter',
// flag_entity_extra_field_info(): declares a pseudo-field per flag.
'entity_extra_field_info',
// flag_entity_operation(): adds flag operation links per flag.
'entity_operation',
];
if (in_array($hook, $hooks_to_remove, TRUE) && isset($implementations['flag'])) {
unset($implementations['flag']);
}
}
@@ -5,7 +5,7 @@ namespace Drupal\materio_samples\Plugin\Field\FieldWidget;
use Drupal\Core\Field\FieldItemListInterface;
use Drupal\Core\Field\WidgetBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\taxonomy\Entity\Term;
use Drupal\user\Entity\User;
use Drupal\workflow\Entity\WorkflowManager;
/**
@@ -23,130 +23,148 @@ use Drupal\workflow\Entity\WorkflowManager;
class SamplesDefaultWidget extends WidgetBase {
/**
* {@inheritdoc}
* Loads the showroom terms in a deterministic order.
*
* A stable secondary sort on tid avoids the non-deterministic ordering of
* terms sharing the same weight.
*
* @return \Drupal\taxonomy\Entity\Term[]
* The showroom terms keyed by term id.
*/
public function form(FieldItemListInterface $items, array &$form, FormStateInterface $form_state, $get_delta = NULL) {
// construct "manually" the list of items
protected function getShowroomTerms() {
$vid = $this->fieldDefinition->getSetting('vid');
$query = \Drupal::entityQuery('taxonomy_term')
->sort('weight', 'DESC')
// ->sort('tid', 'DESC')
->accessCheck()
->condition('vid', $vid);
$tids = $query->execute();
$terms = Term::loadMultiple($tids);
$storage = \Drupal::entityTypeManager()->getStorage('taxonomy_term');
$tids = $storage->getQuery()
->condition('vid', $vid)
->sort('weight', 'DESC')
->sort('tid', 'ASC')
->accessCheck(FALSE)
->execute();
return $storage->loadMultiple($tids);
}
// define the cardinality, this will remove the add_more btn
$this->fieldDefinition->getFieldStorageDefinition()->setCardinality(count($terms));
$locations = [];
foreach ($items as $delta => $item) {
$locations[$item->target_id] = $item->location;
}
$delta = 0;
foreach ($terms as $term) {
// remove masqué
$sid = WorkflowManager::getCurrentStateId($term, 'field_workflow');
if($sid == 'workflow_hidden') continue;
$location = isset($locations[$term->id()]) ? $locations[$term->id()] : '';
$value = array(
'location' => $location,
'target_id'=> $term->id()
);
$items->set($delta, $value);
$delta ++;
}
// then call the normal form
$elements = parent::form($items, $form, $form_state, $get_delta);
// dsm($elements);
// Arrange the form object to remove draggable table stuff
$elements['widget']['#cardinality_multiple'] = FALSE;
for ($i=0; $i <= $delta ; $i++) {
if(isset($elements['widget'][$i]['_weight'])){
$elements['widget'][$i]['_weight']['#type'] = 'hidden';
/**
* Returns the showroom ids owned by the current user (field_showroom).
*
* @return array
* An array keyed by showroom term id.
*/
protected function getOwnedShowroomIds() {
$owned = [];
$user = User::load(\Drupal::currentUser()->id());
if ($user) {
foreach ($user->get('field_showroom')->referencedEntities() as $showroom) {
$owned[$showroom->id()] = TRUE;
}
}
return $owned;
}
/**
* {@inheritdoc}
*
* Renders exactly one row per showroom term. The identity of each value is
* its target_id: we never reindex by delta nor mutate $items, and we do not
* override the storage cardinality.
*/
protected function formMultipleElements(FieldItemListInterface $items, array &$form, FormStateInterface $form_state) {
// Map existing values by showroom id (identity = target_id, not delta).
$locations = [];
foreach ($items as $item) {
if (!$item->isEmpty() && $item->target_id) {
$locations[$item->target_id] = $item->location;
}
}
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
$entity_repository = \Drupal::service('entity.repository');
$can_edit_any = \Drupal::currentUser()->hasPermission('materio_samples_edit_any_sample');
$owned = $this->getOwnedShowroomIds();
$elements = [];
$delta = 0;
foreach ($this->getShowroomTerms() as $term) {
$tid = $term->id();
$is_hidden = WorkflowManager::getCurrentStateId($term, 'field_workflow') === 'workflow_hidden';
$location = $locations[$tid] ?? '';
// Preserve values of workflow-hidden showrooms so a save never drops
// them, but do not display an editable row.
if ($is_hidden) {
if ($location !== '') {
$elements[$delta] = [
'target_id' => ['#type' => 'value', '#value' => $tid],
'location' => ['#type' => 'value', '#value' => $location],
];
$delta++;
}
continue;
}
$term_trans = $entity_repository->getTranslationFromContext($term, $language);
$disabled = !($can_edit_any || isset($owned[$tid]));
$elements[$delta] = [
// target_id is a non-editable value: it always round-trips and cannot
// be tampered with, keeping location <-> showroom paired.
'target_id' => ['#type' => 'value', '#value' => $tid],
'location' => [
'#type' => 'textfield',
'#title' => $term_trans->getName(),
'#default_value' => $location,
'#size' => 10,
'#maxlength' => 15,
'#disabled' => $disabled,
'#attributes' => ['class' => ['container-inline']],
],
];
$delta++;
}
// #cardinality_multiple = FALSE => the field_multiple_value_form theme
// renders each row as-is, with no draggable table, no weight, no
// add-more/remove buttons.
$elements += [
'#theme' => 'field_multiple_value_form',
'#field_name' => $this->fieldDefinition->getName(),
'#cardinality' => $this->fieldDefinition->getFieldStorageDefinition()->getCardinality(),
'#cardinality_multiple' => FALSE,
'#required' => $this->fieldDefinition->isRequired(),
'#title' => $this->fieldDefinition->getLabel(),
'#description' => $this->getFilteredDescription(),
'#max_delta' => $delta > 0 ? $delta - 1 : 0,
];
return $elements;
}
/**
* {@inheritdoc}
*
* Required by WidgetBase but unused: the whole widget is built in
* formMultipleElements().
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
// get default values
$target_id = isset($items[$delta]->target_id) ? $items[$delta]->target_id : 0;
$location = isset($items[$delta]->location) ? $items[$delta]->location : '';
// dsm($target_id);
// return nothing if target_id is null
if(!$target_id) return;
$term = Term::load($target_id);
// translate the term
$term = \Drupal::service('entity.repository')->getTranslationFromContext($term, $language);
// dsm($element);
// $element['#attributes'] = array('class' => array('container-inline'));
// $element['container'] = [
// '#type' => 'container',
// '#field_prefix' => '<div class="container-inline">',
// '#field_suffix' => '</div>',
// ];
$disabled = true;
// get current user
$user = \Drupal\user\Entity\User::load(\Drupal::currentUser()->id());
if($user->hasPermission('materio_samples_edit_any_sample')){
// check perms to edit any
$disabled = false;
}else if($disabled){
// get user showroom if any
$showrooms = $user->get('field_showroom')->referencedEntities();
// enable/disable field reagarding showroom
foreach($showrooms as $showroom){
if($term->id() == $showroom->id()){
$disabled = false;
break;
}
}
}
$element['target_id'] = [
'#type' => 'hidden',
'#default_value' => $target_id,
];
$element['location'] = [
'#title' => $term->getName(),
'#type' => 'textfield',
'#default_value' => $location,
'#size' => 10,
'#maxlength' => 15,
'#attributes' => ['class' => ['container-inline']],
'#disabled' => $disabled,
];
// return ['value' => $element];
return $element;
}
public function validate($element, FormStateInterface $form_state) {
// dsm($element);
}
/**
* {@inheritdoc}
*/
public function massageFormValues(array $values, array $form, FormStateInterface $form_state) {
// foreach ($values as $key => $value) {
// $values[$key]['value']['target_id'] = (int)$values[$key]['value']['target_id'];
// }
// dsm($values);
return $values;
// Keep only the two real properties, correctly paired, and drop helper keys
// (_weight, _original_delta) added by the core value extraction.
$massaged = [];
foreach ($values as $value) {
if (empty($value['target_id'])) {
continue;
}
$massaged[] = [
'target_id' => (int) $value['target_id'],
'location' => $value['location'] ?? '',
];
}
return $massaged;
}
}
-1
View File
@@ -1 +0,0 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},d=(new e.Error).stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="411cee32-1d58-447d-9552-c80b30f77d7f",e._sentryDebugIdIdentifier="sentry-dbid-411cee32-1d58-447d-9552-c80b30f77d7f")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -1,4 +1,4 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="72f3c587-ad9c-4b1a-9607-db9a194a9c9a",e._sentryDebugIdIdentifier="sentry-dbid-72f3c587-ad9c-4b1a-9607-db9a194a9c9a")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[574],{844:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var n=function(){var e=this,t=e._self._c;return!e.article||e.loading?t("div",{staticClass:"loading"},[t("span",[e._v(e._s(e.$t("default.Loading…")))])]):t("article",{staticClass:"article"},[t("nav",{staticClass:"prevnext top"},[t("ul",[t("li",[e.prevnext.prev?t("a",{attrs:{href:e.prevnext.prev.view_node},domProps:{innerHTML:e._s(e.prevnext.prev.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.prev)}}}):e._e()]),e._v(" "),t("li",[e.prevnext.next?t("a",{attrs:{href:e.prevnext.next.view_node},domProps:{innerHTML:e._s(e.prevnext.next.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.next)}}}):e._e()])])]),e._v(" "),t("div",{staticClass:"cols"},[t("div",{staticClass:"col col-left"},[e.image_accroche?t("section",{staticClass:"accroche"},[t("figure",[t("img",{attrs:{src:e.image_accroche.url,alt:e.image_accroche.alt,title:e.image_accroche.title},on:{click:function(t){return e.setLightBox(0)}}})])]):e._e(),e._v(" "),e.article.showroom?t("section",{staticClass:"showroom"},[t("h2",[e._v(e._s(e.article.showroom.name))]),e._v(" "),t("a",{staticClass:"mail",attrs:{href:"mail:"+e.article.showroom.field_public_email}},[e._v("\n "+e._s(e.article.showroom.field_public_email))]),e._v(" "),t("br"),e._v(" "),t("a",{staticClass:"phone",attrs:{href:"tel:"+e.article.showroom.field_public_phone}},[e._v("\n "+e._s(e.article.showroom.field_public_phone))])]):e._e()]),e._v(" "),t("div",{staticClass:"col col-right"},[t("section",{staticClass:"body",domProps:{innerHTML:e._s(e.article.body)}}),e._v(" "),t("div",{staticClass:"gallery-wrapper"},e._l(e.lightbox_items,(function(i,n){return n>0?t("div",{key:n,staticClass:"image",style:{backgroundImage:"url("+i.thumb+")"},on:{click:function(t){return e.setLightBox(n)}}}):e._e()})),0),e._v(" "),t("aside",{staticClass:"linked-materials"},[t("h3",{staticClass:"field__label"},[e._v(e._s(e.$t("materio.Linked Materials")))]),e._v(" "),t("div",{staticClass:"cards-list"},[t("ul",{},e._l(e.article.linked_materials,(function(e){return t("li",{key:e.id},[t("Card",{attrs:{item:e}})],1)})),0)])])])]),e._v(" "),t("nav",{staticClass:"prevnext bottom"},[t("ul",[t("li",[e.prevnext.prev?t("a",{attrs:{href:e.prevnext.prev.view_node},domProps:{innerHTML:e._s(e.prevnext.prev.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.prev)}}}):e._e()]),e._v(" "),t("li",[e.prevnext.next?t("a",{attrs:{href:e.prevnext.next.view_node},domProps:{innerHTML:e._s(e.prevnext.next.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.next)}}}):e._e()])])])])};n._withStripped=!0;var a=i(3611),s=i(6875),l=i(6691),r=i(585),d=i(2087),o=i(3581),c=i.n(o),m=i(4951),u=i(5353);const v={name:"Article",router:a.A,store:s.A,props:["item"],data:()=>({index:-1,prevnext:{},nid:null,path:null,article:{},image_accroche:null,lightbox_items:null,loading:!0,lightbox_index:null}),metaInfo(){return{title:this.article.title}},computed:{...(0,u.aH)({items:e=>e.Blabla.items,coolLightBoxItems:e=>e.Common.coolLightBoxItems,coolLightBoxIndex:e=>e.Common.coolLightBoxIndex})},created(){this.getArticle()},methods:{...(0,u.i0)({getItems:"Blabla/getItems",getItemIndex:"Blabla/getItemIndex",getPrevNextItems:"Blabla/getPrevNextItems",setcoolLightBoxItems:"Common/setcoolLightBoxItems",setcoolLightBoxIndex:"Common/setcoolLightBoxIndex"}),getArticle(){this.$route,this.$route.params.id?this.id=this.$route.params.id:"node"==drupalDecoupled.entity_type&&"article"==drupalDecoupled.entity_bundle&&(this.id=drupalDecoupled.entity_id),this.id?this.loadArticle():this.$router.replace({name:"home"})},getIndex(){this.article.id,this.getItemIndex(this.article.id).then((e=>{this.index=e,this.getPrevNextItems(e).then((e=>{this.prevnext=e}))}))},loadArticle(){this.loading=!0;const e=d.Ay`{
(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[574],{844:(e,t,i)=>{"use strict";i.r(t),i.d(t,{default:()=>g});var n=function(){var e=this,t=e._self._c;return!e.article||e.loading?t("div",{staticClass:"loading"},[t("span",[e._v(e._s(e.$t("default.Loading…")))])]):t("article",{staticClass:"article"},[t("nav",{staticClass:"prevnext top"},[t("ul",[t("li",[e.prevnext.prev?t("a",{attrs:{href:e.prevnext.prev.view_node},domProps:{innerHTML:e._s(e.prevnext.prev.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.prev)}}}):e._e()]),e._v(" "),t("li",[e.prevnext.next?t("a",{attrs:{href:e.prevnext.next.view_node},domProps:{innerHTML:e._s(e.prevnext.next.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.next)}}}):e._e()])])]),e._v(" "),t("div",{staticClass:"cols"},[t("div",{staticClass:"col col-left"},[e.image_accroche?t("section",{staticClass:"accroche"},[t("figure",[t("img",{attrs:{src:e.image_accroche.url,alt:e.image_accroche.alt,title:e.image_accroche.title},on:{click:function(t){return e.setLightBox(0)}}})])]):e._e(),e._v(" "),e.article.showroom?t("section",{staticClass:"showroom"},[t("h2",[e._v(e._s(e.article.showroom.name))]),e._v(" "),t("a",{staticClass:"mail",attrs:{href:"mail:"+e.article.showroom.field_public_email}},[e._v("\n "+e._s(e.article.showroom.field_public_email))]),e._v(" "),t("br"),e._v(" "),t("a",{staticClass:"phone",attrs:{href:"tel:"+e.article.showroom.field_public_phone}},[e._v("\n "+e._s(e.article.showroom.field_public_phone))])]):e._e()]),e._v(" "),t("div",{staticClass:"col col-right"},[t("section",{staticClass:"body",domProps:{innerHTML:e._s(e.article.body)}}),e._v(" "),t("div",{staticClass:"gallery-wrapper"},e._l(e.lightbox_items,(function(i,n){return n>0?t("div",{key:n,staticClass:"image",style:{backgroundImage:"url("+i.thumb+")"},on:{click:function(t){return e.setLightBox(n)}}}):e._e()})),0),e._v(" "),t("aside",{staticClass:"linked-materials"},[t("h3",{staticClass:"field__label"},[e._v(e._s(e.$t("materio.Linked Materials")))]),e._v(" "),t("div",{staticClass:"cards-list"},[t("ul",{},e._l(e.article.linked_materials,(function(e){return t("li",{key:e.id},[t("Card",{attrs:{item:e}})],1)})),0)])])])]),e._v(" "),t("nav",{staticClass:"prevnext bottom"},[t("ul",[t("li",[e.prevnext.prev?t("a",{attrs:{href:e.prevnext.prev.view_node},domProps:{innerHTML:e._s(e.prevnext.prev.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.prev)}}}):e._e()]),e._v(" "),t("li",[e.prevnext.next?t("a",{attrs:{href:e.prevnext.next.view_node},domProps:{innerHTML:e._s(e.prevnext.next.title)},on:{click:function(t){return t.preventDefault(),e.onPrevNext(e.prevnext.next)}}}):e._e()])])])])};n._withStripped=!0;var a=i(3611),s=i(6875),l=i(6691),r=i(585),d=i(2087),o=i(3581),c=i.n(o),m=i(4951),u=i(5353);const v={name:"Article",router:a.A,store:s.A,props:["item"],data:()=>({index:-1,prevnext:{},nid:null,path:null,article:{},image_accroche:null,lightbox_items:null,loading:!0,lightbox_index:null}),metaInfo(){return{title:this.article.title}},computed:{...(0,u.aH)({items:e=>e.Blabla.items,coolLightBoxItems:e=>e.Common.coolLightBoxItems,coolLightBoxIndex:e=>e.Common.coolLightBoxIndex})},created(){this.getArticle()},methods:{...(0,u.i0)({getItems:"Blabla/getItems",getItemIndex:"Blabla/getItemIndex",getPrevNextItems:"Blabla/getPrevNextItems",setcoolLightBoxItems:"Common/setcoolLightBoxItems",setcoolLightBoxIndex:"Common/setcoolLightBoxIndex"}),getArticle(){this.$route,this.$route.params.id?this.id=this.$route.params.id:"node"==drupalDecoupled.entity_type&&"article"==drupalDecoupled.entity_bundle&&(this.id=drupalDecoupled.entity_id),this.id?this.loadArticle():this.$router.replace({name:"home"})},getIndex(){this.article.id,this.getItemIndex(this.article.id).then((e=>{this.index=e,this.getPrevNextItems(e).then((e=>{this.prevnext=e}))}))},loadArticle(){this.loading=!0;const e=d.Ay`{
article(id: ${this.id}, lang: "${drupalDecoupled.lang_code}") {
...ArticleFields
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="e4c6e1ee-2f75-4ffc-a56b-5e573fa774bc",e._sentryDebugIdIdentifier="sentry-dbid-e4c6e1ee-2f75-4ffc-a56b-5e573fa774bc")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[562],{4829:(e,t,i)=>{i.r(t),i.d(t,{default:()=>f});var a=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"blabla"}},[e.items.length?t("div",{staticClass:"cards-list"},[t("ul",e._l(e.items,(function(e){return t("li",{key:e.nid},[t("ArticleCard",{attrs:{item:e}})],1)})),0),e._v(" "),t("infinite-loading",{on:{infinite:e.nextPage}},[t("div",{attrs:{slot:"no-more"},slot:"no-more"},[e._v("No more articles")])])],1):t("div",{staticClass:"loading"},[t("span",[e._v(e._s(e.$t("default.Loading…")))])])])};a._withStripped=!0;var n=function(){var e=this,t=e._self._c;return t("article",{staticClass:"card article"},[t("header",[t("h1",[t("a",{attrs:{href:e.item.view_node},domProps:{innerHTML:e._s(e.item.title)},on:{click:function(t){return t.preventDefault(),e.onclick.apply(null,arguments)}}})]),e._v(" "),t("aside",{domProps:{innerHTML:e._s(e.item.created)}})]),e._v(" "),t("section",{staticClass:"images"},[t("a",{attrs:{href:e.item.view_node},on:{click:function(t){return t.preventDefault(),e.onclick.apply(null,arguments)}}},[t("figure",{domProps:{innerHTML:e._s(e.item.field_visuel)}})])])])};n._withStripped=!0;var l=i(3611);drupalSettings.path.baseUrl,drupalSettings.path.pathPrefix;const s={name:"ArticleCard",router:l.A,props:["item"],data(){return{alias:this.item.view_node.replace(/^.*\/blabla\//g,"")}},methods:{onclick(){this.alias,this.$router.push({name:"article",params:{alias:this.alias,id:this.item.nid}})}}};var r=i(4486);const o=(0,r.A)(s,n,[],!1,null,"fe8f9ebc",null).exports;var d=i(5353);const c={name:"Blabla",computed:{...(0,d.aH)({items:e=>e.Blabla.items})},created(){this.items.length||this.getItems()},methods:{...(0,d.i0)({getItems:"Blabla/getItems",nextPage:"Blabla/nextPage"})},components:{ArticleCard:o}};const f=(0,r.A)(c,a,[],!1,null,"25cf586c",null).exports}}]);
"use strict";(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[562],{4829:(t,e,i)=>{i.r(e),i.d(e,{default:()=>m});var a=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"blabla"}},[t.items.length?e("div",{staticClass:"cards-list"},[e("ul",t._l(t.items,(function(t){return e("li",{key:t.nid},[e("ArticleCard",{attrs:{item:t}})],1)})),0),t._v(" "),e("infinite-loading",{on:{infinite:t.nextPage}},[e("div",{attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more articles")])])],1):e("div",{staticClass:"loading"},[e("span",[t._v(t._s(t.$t("default.Loading…")))])])])};a._withStripped=!0;var s=function(){var t=this,e=t._self._c;return e("article",{staticClass:"card article"},[e("header",[e("h1",[e("a",{attrs:{href:t.item.view_node},domProps:{innerHTML:t._s(t.item.title)},on:{click:function(e){return e.preventDefault(),t.onclick.apply(null,arguments)}}})]),t._v(" "),e("aside",{domProps:{innerHTML:t._s(t.item.created)}})]),t._v(" "),e("section",{staticClass:"images"},[e("a",{attrs:{href:t.item.view_node},on:{click:function(e){return e.preventDefault(),t.onclick.apply(null,arguments)}}},[e("figure",{domProps:{innerHTML:t._s(t.item.field_visuel)}})])])])};s._withStripped=!0;var r=i(3611);drupalSettings.path.baseUrl,drupalSettings.path.pathPrefix;const l={name:"ArticleCard",router:r.A,props:["item"],data(){return{alias:this.item.view_node.replace(/^.*\/blabla\//g,"")}},methods:{onclick(){this.alias,this.$router.push({name:"article",params:{alias:this.alias,id:this.item.nid}})}}};var n=i(4486);const o=(0,n.A)(l,s,[],!1,null,"fe8f9ebc",null).exports;var c=i(5353);const d={name:"Blabla",computed:{...(0,c.aH)({items:t=>t.Blabla.items})},created(){this.items.length||this.getItems()},methods:{...(0,c.i0)({getItems:"Blabla/getItems",nextPage:"Blabla/nextPage"})},components:{ArticleCard:o}};const m=(0,n.A)(d,a,[],!1,null,"25cf586c",null).exports}}]);
//# sourceMappingURL=module-blabla.02d7d2034e7287bc9e40.bundle.js.map
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
try{let t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},e=(new t.Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1f9e0b73-834e-4bdf-85c1-fc09d3859513",t._sentryDebugIdIdentifier="sentry-dbid-1f9e0b73-834e-4bdf-85c1-fc09d3859513")}catch(t){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[634],{2218:(t,e,i)=>{i.r(e),i.d(e,{default:()=>p});var n=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"pricing"}},[t.products.length?t._l(t.products,(function(t){return e("Product",{key:t.uuid,attrs:{product:t}})})):e("div",{staticClass:"loading"},[e("span",[t._v(t._s(t.$t("default.Loading…")))])])],2)};n._withStripped=!0;var s=function(){var t=this,e=t._self._c;return e("article",{staticClass:"product"},[e("header",[e("h1",{domProps:{innerHTML:t._s(t.product.title)}})]),t._v(" "),e("section",{staticClass:"content"},[e("div",{staticClass:"description",domProps:{innerHTML:t._s(t.product.body)}})]),t._v(" "),t.isAdherent?t._e():e("aside",[t._l(t.product.variations,(function(i){return e("div",{key:i.id,staticClass:"variation"},[e("div",{staticClass:"variation-description",domProps:{innerHTML:t._s(i.description)}}),t._v(" "),e("div",{staticClass:"actions"},[e("button",{attrs:{type:"button",name:"addtocart"},on:{click:function(e){return e.stopPropagation(),t.checkaddtocart(e,i.id)}}},[t._v("\n "+t._s(t.$t("default."+t.variation_btn_txt[i.id]))+"\n ")])])])})),t._v(" "),8==t.product.id?e("div",[e("a",{staticClass:"btn",attrs:{href:"/pricing/multijoueur"}},[t._v("\n "+t._s(t.$t("default.Ask for a quote"))+"\n ")])]):t._e()],2)])};s._withStripped=!0;var o=i(3611),d=i(4651);const r={name:"Product",router:o.A,props:["product"],mixins:[d.A],data:()=>({quantity:1,variation_btn_txt:{6:"Yeees!",7:"Yay!",8:"Great!",9:"OKAY!"}}),created(){this.product}};var a=i(4486);const c=(0,a.A)(r,s,[],!1,null,"a02cf0fe",null).exports;var u=i(5353);const l={name:"Pricing",computed:{...(0,u.aH)({products:t=>t.Pages.products})},created(){this.products.length||this.getProducts()},methods:{...(0,u.i0)({getProducts:"Pages/getProducts"})},components:{Product:c}};const p=(0,a.A)(l,n,[],!1,null,"6c4e03c6",null).exports}}]);
"use strict";(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[634],{2218:(t,s,r)=>{r.r(s),r.d(s,{default:()=>l});var i=function(){var t=this,s=t._self._c;return s("div",{attrs:{id:"pricing"}},[t.products.length?t._l(t.products,(function(t){return s("Product",{key:t.uuid,attrs:{product:t}})})):s("div",{staticClass:"loading"},[s("span",[t._v(t._s(t.$t("default.Loading…")))])])],2)};i._withStripped=!0;var a=function(){var t=this,s=t._self._c;return s("article",{staticClass:"product"},[s("header",[s("h1",{domProps:{innerHTML:t._s(t.product.title)}})]),t._v(" "),s("section",{staticClass:"content"},[s("div",{staticClass:"description",domProps:{innerHTML:t._s(t.product.body)}})]),t._v(" "),t.isAdherent?t._e():s("aside",[t._l(t.product.variations,(function(r){return s("div",{key:r.id,staticClass:"variation"},[s("div",{staticClass:"variation-description",domProps:{innerHTML:t._s(r.description)}}),t._v(" "),s("div",{staticClass:"actions"},[s("button",{attrs:{type:"button",name:"addtocart"},on:{click:function(s){return s.stopPropagation(),t.checkaddtocart(s,r.id)}}},[t._v("\n "+t._s(t.$t("default."+t.variation_btn_txt[r.id]))+"\n ")])])])})),t._v(" "),8==t.product.id?s("div",[s("a",{staticClass:"btn",attrs:{href:"/pricing/multijoueur"}},[t._v("\n "+t._s(t.$t("default.Ask for a quote"))+"\n ")])]):t._e()],2)])};a._withStripped=!0;var o=r(3611),e=r(4651);const n={name:"Product",router:o.A,props:["product"],mixins:[e.A],data:()=>({quantity:1,variation_btn_txt:{6:"Yeees!",7:"Yay!",8:"Great!",9:"OKAY!"}}),created(){this.product}};var c=r(4486);const d=(0,c.A)(n,a,[],!1,null,"a02cf0fe",null).exports;var u=r(5353);const p={name:"Pricing",computed:{...(0,u.aH)({products:t=>t.Pages.products})},created(){this.products.length||this.getProducts()},methods:{...(0,u.i0)({getProducts:"Pages/getProducts"})},components:{Product:d}};const l=(0,c.A)(p,i,[],!1,null,"6c4e03c6",null).exports}}]);
//# sourceMappingURL=module-pricing.4bbb30943e8e2ecd7153.bundle.js.map
File diff suppressed because one or more lines are too long
@@ -1,2 +1,2 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6d594553-7cfb-426d-96e1-69a6ed083fe7",e._sentryDebugIdIdentifier="sentry-dbid-6d594553-7cfb-426d-96e1-69a6ed083fe7")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[413],{7556:(e,t,s)=>{s.r(t),s.d(t,{default:()=>h});var o=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"showrooms"}},[e.items.length?e._l(e.items,(function(e){return t("Showroom",{key:e.uuid,attrs:{item:e}})})):t("div",{staticClass:"loading"},[t("span",[e._v(e._s(e.$t("default.Loading…")))])])],2)};o._withStripped=!0;var i=function(){var e=this,t=e._self._c;return t("article",{staticClass:"showroom"},[t("section",{directives:[{name:"switcher",rawName:"v-switcher"}],staticClass:"images"},e._l(e.item.images,(function(s,o){return t("figure",{directives:[{name:"lazy",rawName:"v-lazy",value:o,expression:"index"}],key:s.url,staticClass:"lazy"},[t("img",{attrs:{"data-src":s.style_showroomhome.url},on:{click:function(t){return e.setLightBox(o)}}})])})),0),e._v(" "),t("section",{staticClass:"content"},[t("header",[t("h1",[e._v(e._s(e.item.name))])]),e._v(" "),t("section",{staticClass:"description",domProps:{innerHTML:e._s(e.item.description)}}),e._v(" "),t("address",[e.item.address.organization?t("span",[e._v(e._s(e.item.address.organization)),t("br")]):e._e(),e._v(" "),e.item.address.address_line1?t("span",[e._v(e._s(e.item.address.address_line1)),t("br")]):e._e(),e._v(" "),e.item.address.locality?t("span",[e._v(e._s(e.item.address.locality)),t("br")]):e._e(),e._v(" "),e.item.country.country_name?t("span",[e._v(e._s(e.item.country.country_name))]):e._e()]),e._v(" "),t("div",{staticClass:"phone",domProps:{innerHTML:e._s(e.item.phone)}}),e._v(" "),t("a",{staticClass:"email",attrs:{href:"mailto:"+e.item.email},domProps:{innerHTML:e._s(e.item.email)}}),e._v(" "),t("div",{staticClass:"website"},[t("a",{attrs:{_target:"_blank",href:e.item.website.url}},[e._v(e._s(e.item.website.title))])])])])};i._withStripped=!0;var a=s(5353),n=s(3611),r=s(9811);drupalSettings.path.baseUrl,drupalSettings.path.pathPrefix;const d={name:"Showroom",router:n.A,mixins:[r.A],props:["item"],computed:{...(0,a.aH)({coolLightBoxItems:e=>e.Common.coolLightBoxItems,coolLightBoxIndex:e=>e.Common.coolLightBoxIndex})},methods:{...(0,a.i0)({setcoolLightBoxItems:"Common/setcoolLightBoxItems",setcoolLightBoxIndex:"Common/setcoolLightBoxIndex"}),setLightBox(e){this.setcoolLightBoxItems(this.item.images),this.setcoolLightBoxIndex(e)}}};var l=s(4486);const m=(0,l.A)(d,i,[],!1,null,"582a0cbe",null).exports,c={name:"Showrooms",computed:{...(0,a.aH)({items:e=>e.Showrooms.items})},created(){this.items.length||this.getShowrooms()},methods:{...(0,a.i0)({getShowrooms:"Showrooms/getShowrooms"})},components:{Showroom:m}};const h=(0,l.A)(c,o,[],!1,null,"5891e183",null).exports}}]);
"use strict";(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[413],{7556:(t,e,s)=>{s.r(e),s.d(e,{default:()=>h});var o=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"showrooms"}},[t.items.length?t._l(t.items,(function(t){return e("Showroom",{key:t.uuid,attrs:{item:t}})})):e("div",{staticClass:"loading"},[e("span",[t._v(t._s(t.$t("default.Loading…")))])])],2)};o._withStripped=!0;var i=function(){var t=this,e=t._self._c;return e("article",{staticClass:"showroom"},[e("section",{directives:[{name:"switcher",rawName:"v-switcher"}],staticClass:"images"},t._l(t.item.images,(function(s,o){return e("figure",{directives:[{name:"lazy",rawName:"v-lazy",value:o,expression:"index"}],key:s.url,staticClass:"lazy"},[e("img",{attrs:{"data-src":s.style_showroomhome.url},on:{click:function(e){return t.setLightBox(o)}}})])})),0),t._v(" "),e("section",{staticClass:"content"},[e("header",[e("h1",[t._v(t._s(t.item.name))])]),t._v(" "),e("section",{staticClass:"description",domProps:{innerHTML:t._s(t.item.description)}}),t._v(" "),e("address",[t.item.address.organization?e("span",[t._v(t._s(t.item.address.organization)),e("br")]):t._e(),t._v(" "),t.item.address.address_line1?e("span",[t._v(t._s(t.item.address.address_line1)),e("br")]):t._e(),t._v(" "),t.item.address.locality?e("span",[t._v(t._s(t.item.address.locality)),e("br")]):t._e(),t._v(" "),t.item.country.country_name?e("span",[t._v(t._s(t.item.country.country_name))]):t._e()]),t._v(" "),e("div",{staticClass:"phone",domProps:{innerHTML:t._s(t.item.phone)}}),t._v(" "),e("a",{staticClass:"email",attrs:{href:"mailto:"+t.item.email},domProps:{innerHTML:t._s(t.item.email)}}),t._v(" "),e("div",{staticClass:"website"},[e("a",{attrs:{_target:"_blank",href:t.item.website.url}},[t._v(t._s(t.item.website.title))])])])])};i._withStripped=!0;var a=s(5353),r=s(3611),n=s(9811);drupalSettings.path.baseUrl,drupalSettings.path.pathPrefix;const m={name:"Showroom",router:r.A,mixins:[n.A],props:["item"],computed:{...(0,a.aH)({coolLightBoxItems:t=>t.Common.coolLightBoxItems,coolLightBoxIndex:t=>t.Common.coolLightBoxIndex})},methods:{...(0,a.i0)({setcoolLightBoxItems:"Common/setcoolLightBoxItems",setcoolLightBoxIndex:"Common/setcoolLightBoxIndex"}),setLightBox(t){this.setcoolLightBoxItems(this.item.images),this.setcoolLightBoxIndex(t)}}};var l=s(4486);const c=(0,l.A)(m,i,[],!1,null,"582a0cbe",null).exports,d={name:"Showrooms",computed:{...(0,a.aH)({items:t=>t.Showrooms.items})},created(){this.items.length||this.getShowrooms()},methods:{...(0,a.i0)({getShowrooms:"Showrooms/getShowrooms"})},components:{Showroom:c}};const h=(0,l.A)(d,o,[],!1,null,"5891e183",null).exports}}]);
//# sourceMappingURL=module-showrooms.fb77eff450cf89bb2f43.bundle.js.map
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},i=(new e.Error).stack;i&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[i]="081b997d-32b4-4fae-8d96-4d9796088685",e._sentryDebugIdIdentifier="sentry-dbid-081b997d-32b4-4fae-8d96-4d9796088685")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[273],{3319:(e,i,t)=>{"use strict";t.r(i),t.d(i,{default:()=>u});var a=function(){var e=this,i=e._self._c;return!e.thematique||e.loading?i("div",{staticClass:"loading"},[i("span",[e._v(e._s(e.$t("default.Loading…")))])]):i("article",{staticClass:"thematique"},[i("div",{staticClass:"cols"},[i("div",{staticClass:"col col-left"},[i("section",{staticClass:"body",domProps:{innerHTML:e._s(e.thematique.body)}}),e._v(" "),i("section",{staticClass:"visuel"},[i("img",{attrs:{src:e.image_accroche.style_cardfull_url,alt:""}})])]),e._v(" "),i("div",{staticClass:"col col-right"},[i("aside",{staticClass:"linked-materials"},[i("div",{staticClass:"card-list"},[i("ul",{},e._l(e.thematique.linked_materials,(function(e){return i("li",{key:e.id},[i("Card",{attrs:{item:e}})],1)})),0)])])])])])};a._withStripped=!0;var n=t(6875),s=t(6691),l=t(585),d=t(2087),r=t(9146),o=t.n(r),c=t(4951);const m={name:"Thematique",store:n.A,data:()=>({nid:null,path:null,thematique:{},image_accroche:null,loading:!0}),metaInfo(){return{title:this.thematique.title}},created(){this.getThematique()},methods:{getThematique(){this.$route,this.$route.params.id?this.id=this.$route.params.id:"node"==drupalDecoupled.entity_type&&"thematique"==drupalDecoupled.entity_bundle&&(this.id=drupalDecoupled.entity_id),this.id?this.loadThematique():this.$router.replace({name:"home"})},loadThematique(){this.loading=!0;const e=d.Ay`{
(self.webpackChunkmaterio_com=self.webpackChunkmaterio_com||[]).push([[273],{3319:(e,i,t)=>{"use strict";t.r(i),t.d(i,{default:()=>u});var a=function(){var e=this,i=e._self._c;return!e.thematique||e.loading?i("div",{staticClass:"loading"},[i("span",[e._v(e._s(e.$t("default.Loading…")))])]):i("article",{staticClass:"thematique"},[i("div",{staticClass:"cols"},[i("div",{staticClass:"col col-left"},[i("section",{staticClass:"body",domProps:{innerHTML:e._s(e.thematique.body)}}),e._v(" "),i("section",{staticClass:"visuel"},[i("img",{attrs:{src:e.image_accroche.style_cardfull_url,alt:""}})])]),e._v(" "),i("div",{staticClass:"col col-right"},[i("aside",{staticClass:"linked-materials"},[i("div",{staticClass:"card-list"},[i("ul",{},e._l(e.thematique.linked_materials,(function(e){return i("li",{key:e.id},[i("Card",{attrs:{item:e}})],1)})),0)])])])])])};a._withStripped=!0;var n=t(6875),s=t(6691),l=t(585),d=t(2087),r=t(9146),o=t.n(r),c=t(4951);const m={name:"Thematique",store:n.A,data:()=>({nid:null,path:null,thematique:{},image_accroche:null,loading:!0}),metaInfo(){return{title:this.thematique.title}},created(){this.getThematique()},methods:{getThematique(){this.$route,this.$route.params.id?this.id=this.$route.params.id:"node"==drupalDecoupled.entity_type&&"thematique"==drupalDecoupled.entity_bundle&&(this.id=drupalDecoupled.entity_id),this.id?this.loadThematique():this.$router.replace({name:"home"})},loadThematique(){this.loading=!0;const e=d.Ay`{
thematique(id: ${this.id}, lang: "${drupalDecoupled.lang_code}") {
...ThematiqueFields
}
File diff suppressed because one or more lines are too long
-1
View File
@@ -1 +0,0 @@
try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},d=(new e.Error).stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="acc0d3af-4779-4239-abc5-86f49c4db079",e._sentryDebugIdIdentifier="sentry-dbid-acc0d3af-4779-4239-abc5-86f49c4db079")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"materio-10.3.6"};
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
@@ -62,40 +62,6 @@ import 'theme/assets/styles/print.scss'
import MA from 'vuejs/api/ma-axios'
import * as Sentry from '@sentry/browser'
import * as VueSentry from '@sentry/vue'
Sentry.init({
dsn: 'https://7c0e73518188407d9d1f1b1f1f87d457@frontlog.figli.io/3',
// release: "",
integrations: [
Sentry.browserTracingIntegration()
// Sentry.replayIntegration(),
],
tracesSampleRate: 1.0
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
// tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
// // Capture Replay for 10% of all sessions,
// // plus for 100% of sessions with an error
// // Learn more at
// // https://docs.sentry.io/platforms/javascript/session-replay/configuration/#general-integration-configuration
// replaysSessionSampleRate: 0.1,
// replaysOnErrorSampleRate: 1.0,
})
// setTimeout(() => {
// throw new Error('Sentry Test Error')
// })
VueSentry.init({
Vue,
dsn: 'https://7c0e73518188407d9d1f1b1f1f87d457@frontlog.figli.io/3',
integrations: [
]
// Set `tracePropagationTargets` to control for which URLs trace propagation should be enabled
// tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
})
export let _v_sitebranding_block, _v_user_block, _v_header_menu, _v_language_switcher,
_v_pagetitle_block, _v_search_block,
_v_main_content, _v_left_content,
@@ -135,16 +135,17 @@ export default {
// let tag_list = n
// }
// remove terms from autocomplete if removed from typed
if (typeof n !== 'string') {
return
}
const r = /,\s?$/ // remove last comma space
let tag_list = n.replace(r,'').split(', ')
console.log('watch typed tag_list', tag_list)
console.log('watch typed autocomplete before', this.autocomplete)
this.autocomplete.forEach( (term,index,array) => {
console.log("watch typed autocomplete term", term, index, array)
if (tag_list.indexOf(term.label) < 0) {
this.autocomplete.splice(index,1)
}
});
// Keep only the terms whose label is still present in the typed text.
// Filtering into a new array avoids skipping items when splicing during
// iteration (which left stale terms in autocomplete, corrupting `terms`).
this.autocomplete = this.autocomplete.filter(term => tag_list.indexOf(term.label) >= 0)
console.log('watch typed autocomplete after', this.autocomplete)
},
keys(n, o){
@@ -166,6 +167,20 @@ export default {
mounted(){
// console.log('SearchForm mounted')
Drupal.attachBehaviors(this.$el);
// Route the native form submission (Enter key) through the same submit()
// method as the button (@click.prevent="submit"). Without this, pressing
// Enter either triggers a native POST reload or only fills the jQuery UI
// autocomplete selection, so keys/terms sent to the backend differ from a
// button click and the search results are inconsistent.
// Note: when the autocomplete menu is open, jQuery UI handles Enter itself
// (selects the highlighted suggestion) and prevents this submit event, which
// is the intended behaviour.
this.$el.addEventListener('submit', (e) => {
e.preventDefault()
this.submit()
})
// get the search input
this.$input = this.$el.querySelector('#edit-search')
// // focus on input
@@ -11,13 +11,14 @@
<span>{{ $t('default.Loading…') }}</span>
</div>
<ul v-else>
<li v-for="item in items" v-bind:key="item.id">
<li v-for="item in displayedItems" v-bind:key="item.id">
<Card v-if="item.bundle == 'materiau'" :item="item"/>
<CardThematique v-if="item.bundle == 'thematique'" :item="item"/>
</li>
</ul>
<infinite-loading
v-if="count > limit"
v-if="count > limit && displayedItems.length >= limit"
:identifier="searchId"
@infinite="nextPage"
>
<div slot="no-more">No more results</div>
@@ -48,8 +49,14 @@ export default {
searchinfos: state => state.Search.infos,
count: state => state.Search.count,
noresults: state => state.Search.noresults,
limit: state => state.Search.limit
})
limit: state => state.Search.limit,
searchId: state => state.Search.searchId
}),
// items is a sparse array (pages placed by offset); drop the holes left by
// pages that returned fewer results than the limit before rendering.
displayedItems () {
return this.items.filter(Boolean)
}
},
methods: {
...mapActions({
@@ -98,7 +105,10 @@ export default {
// todo text field of search form is not emptying on clicking on base after a search
// this.$store.commit('Search/setKeys', to.query.keys)
if (to.query.hasOwnProperty('terms')) {
this.$store.commit('Search/setTerms', to.query.terms)
// to.query.terms is a raw JSON string (see SearchForm.submit) and must be
// parsed like in created(), otherwise getResults() double-encodes it and
// the backend silently drops the terms (less relevant results).
this.$store.commit('Search/setTerms', JSON.parse(to.query.terms))
}else{
this.$store.commit('Search/reSetTerms')
}
@@ -25,6 +25,9 @@ export default {
infos: null,
count: 0,
noresults: false,
// Incremented on every new search. Async responses (MA + GraphQL) carrying an
// outdated id are discarded to avoid mixing results from concurrent searches.
searchId: 0,
// infinteState will come from vue-infinite-loading plugin
// implemented in vuejs/components/Content/Base.vue
infiniteLoadingState: null
@@ -35,23 +38,38 @@ export default {
// mutations
mutations: {
setUuids (state, uuids) {
state.uuids = state.uuids.concat(uuids)
setUuids (state, { uuids, offset }) {
// Place the page at its offset position instead of concatenating in
// response-arrival order. With infinite-loading firing several pages
// concurrently, concat mixed pages when a later page resolved first.
if (!uuids) {
return
}
const newUuids = state.uuids.slice()
uuids.forEach((uuid, i) => {
newUuids[offset + i] = uuid
})
state.uuids = newUuids
},
resetUuids (state) {
state.uuids = []
},
setResults (state, items) {
// console.log('setResults, items', items)
if (items) { // avoid bug like items = [null]
state.items = state.items.concat(items)
setResults (state, { items, offset }) {
// Same as setUuids: position each page by its offset so the display order
// always matches the backend relevance order, whatever the network race.
if (!items) { // avoid bug like items = [null]
return
}
// console.log('setResults, state.items', state.items)
const newItems = state.items.slice()
items.forEach((item, i) => {
newItems[offset + i] = item
})
state.items = newItems
},
updateItem (state, item) {
// state.items[data.index] = data.item // this is not triggering vuejs refresh
// find the right index
const index = state.items.findIndex(i => i.id === item.id)
const index = state.items.findIndex(i => i && i.id === item.id)
// update the array
if (index !== -1) {
Vue.set(state.items, index, item)
@@ -107,6 +125,9 @@ export default {
},
setInfiniteState (state, infiniteLoadingstate) {
state.infiniteLoadingState = infiniteLoadingstate
},
incrementSearchId (state) {
state.searchId++
}
},
@@ -120,6 +141,8 @@ export default {
commit('resetNoresults')
commit('resetOffset')
commit('resetInfos')
// Invalidate any in-flight response from a previous search.
commit('incrementSearchId')
if (state.keys || state.terms.length) {
this.commit('Common/setPagetitle', state.keys.join(', '))
} else {
@@ -134,10 +157,15 @@ export default {
dispatch('getResults')
},
getResults ({ dispatch, commit, state }) {
// Capture the search token; a newSearch bumps it and makes this run stale.
const searchId = state.searchId
// Capture the offset of THIS request so the response is placed correctly
// even if a later page (higher offset) resolves before it.
const offset = state.offset
const params = {
keys: state.keys.join(', '),
terms: JSON.stringify(state.terms),
offset: state.offset,
offset: offset,
limit: state.limit
}
console.log('search store getResults, params', params)
@@ -153,11 +181,15 @@ export default {
return MA.get('/materio_sapi/getresults?' + q)
.then(({ data }) => {
console.log('search MA getresults data', data, state.terms)
// Discard the response if another search was started meanwhile.
if (searchId !== state.searchId) {
return
}
// commit('setItems', data.items)
commit('setInfos', data.infos)
commit('setCount', data.count)
if (data.count) {
commit('setUuids', data.uuids)
commit('setUuids', { uuids: data.uuids, offset })
// loadMaterials is on mixins
// https://github.com/huybuidac/vuex-extensions
// dispatch('loadMaterialsGQL', {
@@ -175,7 +207,11 @@ export default {
MGQ.post('', { query: print(ast) })
.then(resp => {
console.log('loadSearchResultsGQL resp', resp)
dispatch('loadSearchResultsCallBack', { items: resp.data.data.searchresults })
// Discard if a newer search was started while GraphQL was in flight.
if (searchId !== state.searchId) {
return
}
dispatch('loadSearchResultsCallBack', { items: resp.data.data.searchresults, offset })
})
.catch(error => {
console.warn('Issue with loadSearchResults', error)
@@ -191,9 +227,9 @@ export default {
Promise.reject(error)
})
},
loadSearchResultsCallBack ({ commit, state }, { items, callBackArgs }) {
loadSearchResultsCallBack ({ commit, state }, { items, offset, callBackArgs }) {
console.log('search loadSearchResultsCallBack', items)
commit('setResults', items)
commit('setResults', { items, offset })
if (state.infiniteLoadingState) {
if (state.offset + state.limit > state.count) {
console.log('Search infinite completed')