Browse Source

added print tool to cards

bach 3 years ago
parent
commit
72667f075a
34 changed files with 1747 additions and 135 deletions
  1. 11 0
      build/webpack.config.base.js
  2. 3 0
      composer.json
  3. 773 1
      composer.lock
  4. 32 115
      config/sync/core.entity_view_display.node.materiau.default.yml
  5. 128 0
      config/sync/core.entity_view_display.node.materiau.printable.yml
  6. 7 2
      config/sync/core.entity_view_display.taxonomy_term.company.default.yml
  7. 127 0
      config/sync/core.entity_view_display.taxonomy_term.company.home.yml
  8. 64 0
      config/sync/core.entity_view_display.taxonomy_term.company.print.yml
  9. 15 0
      config/sync/core.entity_view_mode.node.printable.yml
  10. 10 0
      config/sync/core.entity_view_mode.taxonomy_term.print.yml
  11. 3 0
      config/sync/core.extension.yml
  12. 1 0
      config/sync/language.types.yml
  13. 62 0
      config/sync/printable.settings.yml
  14. 1 0
      config/sync/user.role.adherent.yml
  15. 1 0
      config/sync/user.role.admin.yml
  16. 1 0
      config/sync/user.role.admin_showroom.yml
  17. 1 0
      config/sync/user.role.student.yml
  18. 1 0
      config/sync/user.role.translator.yml
  19. 6 0
      package-lock.json
  20. 1 0
      package.json
  21. 69 0
      web/themes/custom/materiotheme/assets/dist/main.css
  22. 14 0
      web/themes/custom/materiotheme/assets/dist/main.js
  23. 0 17
      web/themes/custom/materiotheme/assets/dist/main.js.LICENSE.txt
  24. 69 0
      web/themes/custom/materiotheme/assets/dist/print.css
  25. 1 0
      web/themes/custom/materiotheme/assets/scripts/main.js
  26. 87 0
      web/themes/custom/materiotheme/assets/styles/print.scss
  27. 69 0
      web/themes/custom/materiotheme/logo.svg
  28. 7 0
      web/themes/custom/materiotheme/materiotheme.theme
  29. 93 0
      web/themes/custom/materiotheme/templates/printable/node--printable.html.twig
  30. 26 0
      web/themes/custom/materiotheme/templates/printable/printable-footer.html.twig
  31. 11 0
      web/themes/custom/materiotheme/templates/printable/printable-header.html.twig
  32. 43 0
      web/themes/custom/materiotheme/templates/printable/printable.html.twig
  33. 5 0
      web/themes/custom/materiotheme/vuejs/components/Content/Card.vue
  34. 5 0
      web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue

+ 11 - 0
build/webpack.config.base.js

@@ -2,6 +2,7 @@
 const MiniCssExtractPlugin = require("mini-css-extract-plugin");
 const { VueLoaderPlugin } = require('vue-loader')
 const ESLintPlugin = require('eslint-webpack-plugin');
+const ExtraneousFileCleanupPlugin = require('webpack-extraneous-file-cleanup-plugin');
 
 const utils = require('./utils')
 
@@ -21,6 +22,7 @@ module.exports = {
   },
   entry: {
     'main': utils.resolve(themePath + '/assets/scripts/main.js'),
+    'print': utils.resolve(themePath + '/assets/styles/print.scss')
   },
   output: {
     path: utils.resolve(themePath + '/assets/dist/'),
@@ -100,6 +102,10 @@ module.exports = {
       //     }
       //   }
       // }
+      // {
+      //   test: /\.css$/,
+      //   use: [MiniCssExtractPlugin.loader, 'css-loader'],
+      // },
     ]
   },
 
@@ -114,6 +120,11 @@ module.exports = {
       // cache: false,
       // ignore: true,
       // useEslintrc: false,
+    }),
+    new ExtraneousFileCleanupPlugin({
+      extensions: ['.js'],
+      paths: [utils.resolve(themePath + '/assets/dist/')],
+      minBytes: 4096
     })
   ]
 }

+ 3 - 0
composer.json

@@ -62,6 +62,7 @@
         "drupal/payment": "^2.1",
         "drupal/payment_commerce": "2.x-dev@dev",
         "drupal/permissions_filter": "^1.1",
+        "drupal/printable": "^2.0",
         "drupal/recurring_period": "^1.0",
         "drupal/restui": "^1.16",
         "drupal/search_api_autocomplete": "^1.2",
@@ -82,8 +83,10 @@
         "drupal/views_ef_fieldset": "^1.5",
         "drush/drush": "^9",
         "kint-php/kint": "^3.3",
+        "smalot/pdfparser": "*",
         "symfony/event-dispatcher": "4.3.4 as 3.4.99",
         "vlucas/phpdotenv": "^2.4",
+        "wa72/htmlpagedom": "1.3.*",
         "webflo/drupal-finder": "^1.0.0",
         "webmozart/path-util": "^2.3",
         "wikimedia/composer-merge-plugin": "^1.4",

+ 773 - 1
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": "a4d92f8abd2407b530d697757bf9b3d3",
+    "content-hash": "bc72351b33614ff45b0bb12bc75ea28c",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -2459,6 +2459,74 @@
             "abandoned": "roave/better-reflection",
             "time": "2020-10-27T21:46:55+00:00"
         },
+        {
+            "name": "dompdf/dompdf",
+            "version": "v0.8.6",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/dompdf/dompdf.git",
+                "reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/dompdf/dompdf/zipball/db91d81866c69a42dad1d2926f61515a1e3f42c5",
+                "reference": "db91d81866c69a42dad1d2926f61515a1e3f42c5",
+                "shasum": ""
+            },
+            "require": {
+                "ext-dom": "*",
+                "ext-mbstring": "*",
+                "phenx/php-font-lib": "^0.5.2",
+                "phenx/php-svg-lib": "^0.3.3",
+                "php": "^7.1"
+            },
+            "require-dev": {
+                "mockery/mockery": "^1.3",
+                "phpunit/phpunit": "^7.5",
+                "squizlabs/php_codesniffer": "^3.5"
+            },
+            "suggest": {
+                "ext-gd": "Needed to process images",
+                "ext-gmagick": "Improves image processing performance",
+                "ext-imagick": "Improves image processing performance",
+                "ext-zlib": "Needed for pdf stream compression"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-develop": "0.7-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Dompdf\\": "src/"
+                },
+                "classmap": [
+                    "lib/"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-2.1"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Ménager",
+                    "email": "fabien.menager@gmail.com"
+                },
+                {
+                    "name": "Brian Sweeney",
+                    "email": "eclecticgeek@gmail.com"
+                },
+                {
+                    "name": "Gabriel Bull",
+                    "email": "me@gabrielbull.com"
+                }
+            ],
+            "description": "DOMPDF is a CSS 2.1 compliant HTML to PDF converter",
+            "homepage": "https://github.com/dompdf/dompdf",
+            "time": "2020-08-30T22:54:22+00:00"
+        },
         {
             "name": "drupal/address",
             "version": "1.9.0",
@@ -9961,6 +10029,62 @@
             },
             "time": "2017-10-04T09:40:53+00:00"
         },
+        {
+            "name": "drupal/pdf_api",
+            "version": "2.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/pdf_api.git",
+                "reference": "2.0.0"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/pdf_api-2.0.0.zip",
+                "reference": "2.0.0",
+                "shasum": "4343c3b1fd361acec318881fcc9639cdf73905e5"
+            },
+            "require": {
+                "dompdf/dompdf": "^0.8",
+                "drupal/core": "^8 || ^9",
+                "mikehaertl/phpwkhtmltopdf": "^2.3",
+                "mpdf/mpdf": "^7.0",
+                "tecnickcom/tcpdf": "^6.2"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "2.0.0",
+                    "datestamp": "1605107931",
+                    "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": "NigelCunningham",
+                    "homepage": "https://www.drupal.org/user/250105"
+                },
+                {
+                    "name": "Sutharsan",
+                    "homepage": "https://www.drupal.org/user/73854"
+                },
+                {
+                    "name": "jcnventura",
+                    "homepage": "https://www.drupal.org/user/122464"
+                }
+            ],
+            "description": "Provides an API for generating PDFs.",
+            "homepage": "https://www.drupal.org/project/pdf_api",
+            "support": {
+                "source": "https://git.drupalcode.org/project/pdf_api"
+            }
+        },
         {
             "name": "drupal/permissions_filter",
             "version": "1.1.0",
@@ -10116,6 +10240,61 @@
                 "source": "https://git.drupalcode.org/project/plugin"
             }
         },
+        {
+            "name": "drupal/printable",
+            "version": "2.0.1",
+            "source": {
+                "type": "git",
+                "url": "https://git.drupalcode.org/project/printable.git",
+                "reference": "2.0.1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://ftp.drupal.org/files/projects/printable-2.0.1.zip",
+                "reference": "2.0.1",
+                "shasum": "f58843a7ccb9c9c65b605bbc5a2e20552cc0f721"
+            },
+            "require": {
+                "drupal/core": "^8 || ^9",
+                "drupal/pdf_api": "*",
+                "smalot/pdfparser": "*",
+                "wa72/htmlpagedom": "1.3.*"
+            },
+            "require-dev": {
+                "drupal/pdf_api": "*"
+            },
+            "type": "drupal-module",
+            "extra": {
+                "drupal": {
+                    "version": "2.0.1",
+                    "datestamp": "1604748597",
+                    "security-coverage": {
+                        "status": "covered",
+                        "message": "Covered by Drupal's security advisory policy"
+                    }
+                }
+            },
+            "notification-url": "https://packages.drupal.org/8/downloads",
+            "license": [
+                "GPL-2.0+"
+            ],
+            "authors": [
+                {
+                    "name": "Nigel Cunningham",
+                    "homepage": "https://www.drupal.org/user/250105",
+                    "email": "nigel@nigelcunningham.com.au"
+                },
+                {
+                    "name": "jcnventura",
+                    "homepage": "https://www.drupal.org/user/122464"
+                }
+            ],
+            "description": "Generates printer friendly version of nodes",
+            "homepage": "https://www.drupal.org/project/printable",
+            "support": {
+                "source": "https://git.drupalcode.org/project/printable"
+            }
+        },
         {
             "name": "drupal/profile",
             "version": "1.2.0",
@@ -13832,6 +14011,256 @@
             ],
             "time": "2020-10-01T13:52:52+00:00"
         },
+        {
+            "name": "mikehaertl/php-shellcommand",
+            "version": "1.6.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mikehaertl/php-shellcommand.git",
+                "reference": "fe86ec847877b83bf61a96719e7f2e3b3e516a6b"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mikehaertl/php-shellcommand/zipball/fe86ec847877b83bf61a96719e7f2e3b3e516a6b",
+                "reference": "fe86ec847877b83bf61a96719e7f2e3b3e516a6b",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">= 5.3.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": ">4.0 <=9.4"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "mikehaertl\\shellcommand\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Härtl",
+                    "email": "haertl.mike@gmail.com"
+                }
+            ],
+            "description": "An object oriented interface to shell commands",
+            "keywords": [
+                "shell"
+            ],
+            "time": "2020-11-23T17:31:15+00:00"
+        },
+        {
+            "name": "mikehaertl/php-tmpfile",
+            "version": "1.1.7",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mikehaertl/php-tmpfile.git",
+                "reference": "f162f70b472c3c1bad2b66c5a7922000a8065638"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mikehaertl/php-tmpfile/zipball/f162f70b472c3c1bad2b66c5a7922000a8065638",
+                "reference": "f162f70b472c3c1bad2b66c5a7922000a8065638",
+                "shasum": ""
+            },
+            "require-dev": {
+                "phpunit/phpunit": ">4.0 <8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "mikehaertl\\tmp\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Härtl",
+                    "email": "haertl.mike@gmail.com"
+                }
+            ],
+            "description": "A convenience class for temporary files",
+            "keywords": [
+                "files"
+            ],
+            "time": "2020-11-20T16:10:10+00:00"
+        },
+        {
+            "name": "mikehaertl/phpwkhtmltopdf",
+            "version": "2.4.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mikehaertl/phpwkhtmltopdf.git",
+                "reference": "0e97c2e1eec918fbcd13f5b4b6c9fa476f99e9db"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mikehaertl/phpwkhtmltopdf/zipball/0e97c2e1eec918fbcd13f5b4b6c9fa476f99e9db",
+                "reference": "0e97c2e1eec918fbcd13f5b4b6c9fa476f99e9db",
+                "shasum": ""
+            },
+            "require": {
+                "mikehaertl/php-shellcommand": "^1.5.0",
+                "mikehaertl/php-tmpfile": "^1.1.0",
+                "php": ">=5.0.0"
+            },
+            "require-dev": {
+                "phpunit/phpunit": ">4.0 <8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "mikehaertl\\wkhtmlto\\": "src"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Michael Haertl",
+                    "email": "haertl.mike@gmail.com"
+                }
+            ],
+            "description": "A slim PHP wrapper around wkhtmltopdf with an easy to use and clean OOP interface",
+            "homepage": "http://mikehaertl.github.com/phpwkhtmltopdf/",
+            "keywords": [
+                "pdf",
+                "wkhtmltoimage",
+                "wkhtmltopdf"
+            ],
+            "time": "2020-01-07T07:47:15+00:00"
+        },
+        {
+            "name": "mpdf/mpdf",
+            "version": "v7.1.9",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/mpdf/mpdf.git",
+                "reference": "a0fc1215d2306aa3b4ba6e97bd6ebe4bab6a88fb"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/mpdf/mpdf/zipball/a0fc1215d2306aa3b4ba6e97bd6ebe4bab6a88fb",
+                "reference": "a0fc1215d2306aa3b4ba6e97bd6ebe4bab6a88fb",
+                "shasum": ""
+            },
+            "require": {
+                "ext-gd": "*",
+                "ext-mbstring": "*",
+                "myclabs/deep-copy": "^1.7",
+                "paragonie/random_compat": "^1.4|^2.0|9.99.99",
+                "php": "^5.6 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0",
+                "psr/log": "^1.0",
+                "setasign/fpdi": "1.6.*"
+            },
+            "require-dev": {
+                "mockery/mockery": "^0.9.5",
+                "phpunit/phpunit": "^5.0",
+                "squizlabs/php_codesniffer": "^2.7.0",
+                "tracy/tracy": "^2.4"
+            },
+            "suggest": {
+                "ext-bcmath": "Needed for generation of some types of barcodes",
+                "ext-xml": "Needed mainly for SVG manipulation",
+                "ext-zlib": "Needed for compression of embedded resources, such as fonts"
+            },
+            "type": "library",
+            "extra": {
+                "branch-alias": {
+                    "dev-development": "7.x-dev"
+                }
+            },
+            "autoload": {
+                "psr-4": {
+                    "Mpdf\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-2.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "Matěj Humpál",
+                    "role": "Developer, maintainer"
+                },
+                {
+                    "name": "Ian Back",
+                    "role": "Developer (retired)"
+                }
+            ],
+            "description": "PHP library generating PDF files from UTF-8 encoded HTML",
+            "homepage": "https://mpdf.github.io",
+            "keywords": [
+                "pdf",
+                "php",
+                "utf-8"
+            ],
+            "time": "2019-02-06T13:32:19+00:00"
+        },
+        {
+            "name": "myclabs/deep-copy",
+            "version": "1.10.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/myclabs/DeepCopy.git",
+                "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/776f831124e9c62e1a2c601ecc52e776d8bb7220",
+                "reference": "776f831124e9c62e1a2c601ecc52e776d8bb7220",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7.1 || ^8.0"
+            },
+            "replace": {
+                "myclabs/deep-copy": "self.version"
+            },
+            "require-dev": {
+                "doctrine/collections": "^1.0",
+                "doctrine/common": "^2.6",
+                "phpunit/phpunit": "^7.1"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "DeepCopy\\": "src/DeepCopy/"
+                },
+                "files": [
+                    "src/DeepCopy/deep_copy.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "description": "Create deep copies (clones) of your objects",
+            "keywords": [
+                "clone",
+                "copy",
+                "duplicate",
+                "object",
+                "object graph"
+            ],
+            "funding": [
+                {
+                    "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy",
+                    "type": "tidelift"
+                }
+            ],
+            "time": "2020-11-13T09:40:50+00:00"
+        },
         {
             "name": "myclabs/php-enum",
             "version": "1.7.6",
@@ -14003,6 +14432,51 @@
             ],
             "time": "2020-06-13T15:59:10+00:00"
         },
+        {
+            "name": "paragonie/random_compat",
+            "version": "v9.99.99",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/paragonie/random_compat.git",
+                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/paragonie/random_compat/zipball/84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+                "reference": "84b4dfb120c6f9b4ff7b3685f9b8f1aa365a0c95",
+                "shasum": ""
+            },
+            "require": {
+                "php": "^7"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "4.*|5.*",
+                "vimeo/psalm": "^1"
+            },
+            "suggest": {
+                "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes."
+            },
+            "type": "library",
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Paragon Initiative Enterprises",
+                    "email": "security@paragonie.com",
+                    "homepage": "https://paragonie.com"
+                }
+            ],
+            "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7",
+            "keywords": [
+                "csprng",
+                "polyfill",
+                "pseudorandom",
+                "random"
+            ],
+            "time": "2018-07-02T15:55:56+00:00"
+        },
         {
             "name": "pear/archive_tar",
             "version": "1.4.11",
@@ -14252,6 +14726,46 @@
             "homepage": "https://github.com/PhenX/php-font-lib",
             "time": "2020-03-08T15:31:32+00:00"
         },
+        {
+            "name": "phenx/php-svg-lib",
+            "version": "v0.3.3",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/PhenX/php-svg-lib.git",
+                "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/PhenX/php-svg-lib/zipball/5fa61b65e612ce1ae15f69b3d223cb14ecc60e32",
+                "reference": "5fa61b65e612ce1ae15f69b3d223cb14ecc60e32",
+                "shasum": ""
+            },
+            "require": {
+                "sabberworm/php-css-parser": "^8.3"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^5.5|^6.5"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Svg\\": "src/Svg"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0"
+            ],
+            "authors": [
+                {
+                    "name": "Fabien Ménager",
+                    "email": "fabien.menager@gmail.com"
+                }
+            ],
+            "description": "A library to read, parse and export to PDF SVG files.",
+            "homepage": "https://github.com/PhenX/php-svg-lib",
+            "time": "2019-09-11T20:02:13+00:00"
+        },
         {
             "name": "php-http/client-common",
             "version": "2.3.0",
@@ -15217,6 +15731,150 @@
             "description": "A polyfill for getallheaders.",
             "time": "2019-03-08T08:55:37+00:00"
         },
+        {
+            "name": "sabberworm/php-css-parser",
+            "version": "8.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/sabberworm/PHP-CSS-Parser.git",
+                "reference": "d217848e1396ef962fb1997cf3e2421acba7f796"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/sabberworm/PHP-CSS-Parser/zipball/d217848e1396ef962fb1997cf3e2421acba7f796",
+                "reference": "d217848e1396ef962fb1997cf3e2421acba7f796",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.2"
+            },
+            "require-dev": {
+                "codacy/coverage": "^1.4",
+                "phpunit/phpunit": "~4.8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "Sabberworm\\CSS": "lib/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Raphael Schweikert"
+                }
+            ],
+            "description": "Parser for CSS Files written in PHP",
+            "homepage": "http://www.sabberworm.com/blog/2010/6/10/php-css-parser",
+            "keywords": [
+                "css",
+                "parser",
+                "stylesheet"
+            ],
+            "time": "2020-06-01T09:10:00+00:00"
+        },
+        {
+            "name": "setasign/fpdi",
+            "version": "1.6.2",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/Setasign/FPDI.git",
+                "reference": "a6ad58897a6d97cc2d2cd2adaeda343b25a368ea"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/Setasign/FPDI/zipball/a6ad58897a6d97cc2d2cd2adaeda343b25a368ea",
+                "reference": "a6ad58897a6d97cc2d2cd2adaeda343b25a368ea",
+                "shasum": ""
+            },
+            "suggest": {
+                "setasign/fpdf": "FPDI will extend this class but as it is also possible to use \"tecnickcom/tcpdf\" as an alternative there's no fixed dependency configured.",
+                "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.",
+                "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF."
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "filters/",
+                    "fpdi.php",
+                    "fpdf_tpl.php",
+                    "fpdi_pdf_parser.php",
+                    "pdf_context.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Jan Slabon",
+                    "email": "jan.slabon@setasign.com",
+                    "homepage": "https://www.setasign.com"
+                }
+            ],
+            "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.",
+            "homepage": "https://www.setasign.com/fpdi",
+            "keywords": [
+                "fpdf",
+                "fpdi",
+                "pdf"
+            ],
+            "time": "2017-05-11T14:25:49+00:00"
+        },
+        {
+            "name": "smalot/pdfparser",
+            "version": "v0.18.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/smalot/pdfparser.git",
+                "reference": "b47f26425e32a814dc1ee55e3ce669b9e73b8458"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/smalot/pdfparser/zipball/b47f26425e32a814dc1ee55e3ce669b9e73b8458",
+                "reference": "b47f26425e32a814dc1ee55e3ce669b9e73b8458",
+                "shasum": ""
+            },
+            "require": {
+                "ext-zlib": "*",
+                "php": ">=5.6",
+                "symfony/polyfill-mbstring": "^1.18"
+            },
+            "require-dev": {
+                "friendsofphp/php-cs-fixer": "^2.16",
+                "symfony/phpunit-bridge": "^5.2"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-0": {
+                    "Smalot\\PdfParser\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0"
+            ],
+            "authors": [
+                {
+                    "name": "Sebastien MALOT",
+                    "email": "sebastien@malot.fr"
+                }
+            ],
+            "description": "Pdf parser library. Can read and extract information from pdf file.",
+            "homepage": "https://www.pdfparser.org",
+            "keywords": [
+                "extract",
+                "parse",
+                "parser",
+                "pdf",
+                "text"
+            ],
+            "time": "2021-01-05T08:52:07+00:00"
+        },
         {
             "name": "solarium/solarium",
             "version": "6.0.3",
@@ -17840,6 +18498,68 @@
             ],
             "time": "2020-10-24T10:57:07+00:00"
         },
+        {
+            "name": "tecnickcom/tcpdf",
+            "version": "6.3.5",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/tecnickcom/TCPDF.git",
+                "reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/19a535eaa7fb1c1cac499109deeb1a7a201b4549",
+                "reference": "19a535eaa7fb1c1cac499109deeb1a7a201b4549",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.0"
+            },
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "config",
+                    "include",
+                    "tcpdf.php",
+                    "tcpdf_parser.php",
+                    "tcpdf_import.php",
+                    "tcpdf_barcodes_1d.php",
+                    "tcpdf_barcodes_2d.php",
+                    "include/tcpdf_colors.php",
+                    "include/tcpdf_filters.php",
+                    "include/tcpdf_font_data.php",
+                    "include/tcpdf_fonts.php",
+                    "include/tcpdf_images.php",
+                    "include/tcpdf_static.php",
+                    "include/barcodes/datamatrix.php",
+                    "include/barcodes/pdf417.php",
+                    "include/barcodes/qrcode.php"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "LGPL-3.0-only"
+            ],
+            "authors": [
+                {
+                    "name": "Nicola Asuni",
+                    "email": "info@tecnick.com",
+                    "role": "lead"
+                }
+            ],
+            "description": "TCPDF is a PHP class for generating PDF documents and barcodes.",
+            "homepage": "http://www.tcpdf.org/",
+            "keywords": [
+                "PDFD32000-2008",
+                "TCPDF",
+                "barcodes",
+                "datamatrix",
+                "pdf",
+                "pdf417",
+                "qrcode"
+            ],
+            "time": "2020-02-14T14:20:12+00:00"
+        },
         {
             "name": "twig/twig",
             "version": "v1.44.1",
@@ -18037,6 +18757,58 @@
             ],
             "time": "2020-07-14T17:54:18+00:00"
         },
+        {
+            "name": "wa72/htmlpagedom",
+            "version": "v1.3.1",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/wasinger/htmlpagedom.git",
+                "reference": "509520415f7f0cb1d3a4a0d3fd1b8eb4bab527a1"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/wasinger/htmlpagedom/zipball/509520415f7f0cb1d3a4a0d3fd1b8eb4bab527a1",
+                "reference": "509520415f7f0cb1d3a4a0d3fd1b8eb4bab527a1",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.4.0",
+                "symfony/css-selector": ">=2.3",
+                "symfony/dom-crawler": "^2.3 <2.8 | ^2.8.3 | ^3.0.1 | ^4"
+            },
+            "require-dev": {
+                "phpunit/phpunit": "^4|^5|^6|^7",
+                "wa72/html-pretty-min": "~0.1"
+            },
+            "suggest": {
+                "wa72/html-pretty-min": "Minify or indent HTML documents"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "Wa72\\HtmlPageDom\\": "src/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "MIT"
+            ],
+            "authors": [
+                {
+                    "name": "Christoph Singer",
+                    "email": "singer@webagentur72.de",
+                    "homepage": "http://www.webagentur72.de"
+                }
+            ],
+            "description": "PHP implementation of the jQuery DOM manipulation API for HTML documents",
+            "homepage": "http://github.com/wasinger/htmlpagedom",
+            "keywords": [
+                "crawler",
+                "dom",
+                "html"
+            ],
+            "time": "2018-03-08T21:15:06+00:00"
+        },
         {
             "name": "webflo/drupal-finder",
             "version": "1.2.2",

+ 32 - 115
config/sync/core.entity_view_display.node.materiau.default.yml

@@ -28,7 +28,6 @@ dependencies:
     - file
     - image
     - materio_samples
-    - options
     - text
     - user
     - video_embed_field
@@ -40,102 +39,62 @@ content:
   body:
     label: hidden
     type: text_default
-    weight: 101
+    weight: 3
     settings: {  }
     third_party_settings: {  }
     region: content
   field_attachments:
-    weight: 109
-    label: above
+    weight: 9
+    label: hidden
     settings:
       use_description_as_link_text: true
     third_party_settings: {  }
     type: file_default
     region: content
   field_distributor:
-    weight: 108
+    weight: 6
     label: above
     settings:
       link: true
     third_party_settings: {  }
     type: entity_reference_label
     region: content
-  field_famille:
-    weight: 113
-    label: above
-    settings: {  }
-    third_party_settings: {  }
-    type: list_default
-    region: content
-  field_index:
-    weight: 114
-    label: above
-    settings:
-      cache_unit: -1
-      cache_duration: 1
-      thousand_separator: ''
-      prefix_suffix: true
-    third_party_settings: {  }
-    type: computed_integer
-    region: content
   field_linked_articles:
-    weight: 120
+    weight: 11
     label: above
     settings:
-      link: true
+      link: false
     third_party_settings: {  }
     type: entity_reference_label
     region: content
   field_linked_materials:
-    weight: 110
+    weight: 10
     label: above
     settings:
       link: true
     third_party_settings: {  }
     type: entity_reference_label
     region: content
-  field_localisation_old:
-    weight: 119
-    label: above
-    settings:
-      link_to_entity: false
-    third_party_settings: {  }
-    type: string
-    region: content
   field_manufacturer:
-    weight: 107
+    weight: 5
     label: above
     settings:
-      link: true
+      link: false
     third_party_settings: {  }
     type: entity_reference_label
     region: content
   field_materiau_images:
-    weight: 105
-    label: above
+    weight: 7
+    label: hidden
     settings:
       image_style: ''
       image_link: ''
     third_party_settings: {  }
     type: image
     region: content
-  field_memo:
-    weight: 112
-    label: above
-    settings: {  }
-    third_party_settings: {  }
-    type: basic_string
-    region: content
-  field_migration:
-    weight: 117
-    label: above
-    settings: {  }
-    third_party_settings: {  }
-    type: list_default
-    region: content
   field_reference:
-    weight: 115
-    label: above
+    weight: 2
+    label: hidden
     settings:
       sanitized: true
       cache_unit: -1
@@ -144,39 +103,15 @@ content:
     type: computed_string
     region: content
   field_samples:
-    weight: 118
+    weight: 4
     label: above
     settings: {  }
     third_party_settings: {  }
     type: materio_samples_default_formatter
     region: content
-  field_short_description:
-    weight: 102
-    label: above
-    settings:
-      link_to_entity: false
-    third_party_settings: {  }
-    type: string
-    region: content
-  field_tags:
-    weight: 104
-    label: above
-    settings:
-      link: true
-    third_party_settings: {  }
-    type: entity_reference_label
-    region: content
-  field_thesaurus:
-    weight: 103
-    label: above
-    settings:
-      link: true
-    third_party_settings: {  }
-    type: entity_reference_label
-    region: content
   field_video:
-    weight: 106
-    label: above
+    weight: 8
+    label: hidden
     settings:
       responsive: true
       width: 854
@@ -185,51 +120,33 @@ content:
     third_party_settings: {  }
     type: video_embed_field_video
     region: content
-  field_workflow:
-    weight: 116
-    label: above
-    settings: {  }
-    third_party_settings: {  }
-    type: list_default
-    region: content
-  flag_admintest:
-    weight: 10
-    region: content
-    settings: {  }
-    third_party_settings: {  }
-  flag_dossier:
-    weight: 10
-    region: content
-    settings: {  }
-    third_party_settings: {  }
-  flag_flag_list_template_1:
-    weight: 10
-    region: content
-    settings: {  }
-    third_party_settings: {  }
-  flag_projet_1:
-    weight: 10
-    region: content
-    settings: {  }
-    third_party_settings: {  }
-  flag_projet_2:
-    weight: 10
-    region: content
-    settings: {  }
-    third_party_settings: {  }
   links:
-    weight: 100
+    weight: 0
     region: content
     settings: {  }
     third_party_settings: {  }
   title:
     label: hidden
     type: string
-    weight: -5
+    weight: 1
     region: content
     settings:
       link_to_entity: false
     third_party_settings: {  }
 hidden:
+  field_famille: true
+  field_index: true
+  field_localisation_old: true
+  field_memo: true
+  field_migration: true
+  field_short_description: true
+  field_tags: true
+  field_thesaurus: true
+  field_workflow: true
+  flag_admintest: true
+  flag_dossier: true
+  flag_flag_list_template_1: true
+  flag_projet_1: true
+  flag_projet_2: true
   langcode: true
   search_api_excerpt: true

+ 128 - 0
config/sync/core.entity_view_display.node.materiau.printable.yml

@@ -0,0 +1,128 @@
+uuid: 0dfb2919-502f-40a7-b73a-bfa4b0d15da5
+langcode: en
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.node.printable
+    - field.field.node.materiau.body
+    - field.field.node.materiau.field_attachments
+    - field.field.node.materiau.field_distributor
+    - field.field.node.materiau.field_famille
+    - field.field.node.materiau.field_index
+    - field.field.node.materiau.field_linked_articles
+    - field.field.node.materiau.field_linked_materials
+    - field.field.node.materiau.field_localisation_old
+    - field.field.node.materiau.field_manufacturer
+    - field.field.node.materiau.field_materiau_images
+    - field.field.node.materiau.field_memo
+    - field.field.node.materiau.field_migration
+    - field.field.node.materiau.field_reference
+    - field.field.node.materiau.field_samples
+    - field.field.node.materiau.field_short_description
+    - field.field.node.materiau.field_tags
+    - field.field.node.materiau.field_thesaurus
+    - field.field.node.materiau.field_video
+    - field.field.node.materiau.field_workflow
+    - image.style.card_full
+    - node.type.materiau
+  module:
+    - computed_field
+    - image_delta_formatter
+    - materio_samples
+    - text
+    - user
+id: node.materiau.printable
+targetEntityType: node
+bundle: materiau
+mode: printable
+content:
+  body:
+    label: hidden
+    type: text_default
+    weight: 3
+    settings: {  }
+    third_party_settings: {  }
+    region: content
+  field_distributor:
+    weight: 6
+    label: above
+    settings:
+      view_mode: print
+      link: false
+    third_party_settings: {  }
+    type: entity_reference_entity_view
+    region: content
+  field_manufacturer:
+    weight: 5
+    label: above
+    settings:
+      view_mode: print
+      link: false
+    third_party_settings: {  }
+    type: entity_reference_entity_view
+    region: content
+  field_materiau_images:
+    weight: 7
+    label: hidden
+    settings:
+      deltas: '0,1,2'
+      image_style: card_full
+      image_link: ''
+      deltas_reversed: 0
+    third_party_settings: {  }
+    type: image_delta_formatter
+    region: content
+  field_reference:
+    weight: 2
+    label: hidden
+    settings:
+      sanitized: true
+      cache_unit: -1
+      cache_duration: 1
+    third_party_settings: {  }
+    type: computed_string
+    region: content
+  field_samples:
+    weight: 4
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: materio_samples_default_formatter
+    region: content
+  field_short_description:
+    type: string
+    weight: 1
+    region: content
+    label: hidden
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+  title:
+    label: hidden
+    type: string
+    weight: 0
+    region: content
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+hidden:
+  field_attachments: true
+  field_famille: true
+  field_index: true
+  field_linked_articles: true
+  field_linked_materials: true
+  field_localisation_old: true
+  field_memo: true
+  field_migration: true
+  field_tags: true
+  field_thesaurus: true
+  field_video: true
+  field_workflow: true
+  flag_admintest: true
+  flag_dossier: true
+  flag_flag_list_template_1: true
+  flag_projet_1: true
+  flag_projet_2: true
+  langcode: true
+  links: true
+  search_api_excerpt: true

+ 7 - 2
config/sync/core.entity_view_display.taxonomy_term.company.default.yml

@@ -20,6 +20,7 @@ dependencies:
     - file
     - link
     - options
+    - telephone_formatter
     - text
 id: taxonomy_term.company.default
 targetEntityType: taxonomy_term
@@ -94,9 +95,12 @@ content:
   field_public_phone:
     weight: 7
     label: above
-    settings: {  }
+    settings:
+      format: 1
+      link: true
+      default_country: null
     third_party_settings: {  }
-    type: basic_string
+    type: telephone_formatter
     region: content
   field_website:
     weight: 4
@@ -119,3 +123,4 @@ content:
     region: content
 hidden:
   langcode: true
+  search_api_excerpt: true

+ 127 - 0
config/sync/core.entity_view_display.taxonomy_term.company.home.yml

@@ -0,0 +1,127 @@
+uuid: 43150dfe-3269-46db-9e71-280ca821ee33
+langcode: en
+status: false
+dependencies:
+  config:
+    - core.entity_view_mode.taxonomy_term.home
+    - field.field.taxonomy_term.company.field_attachments
+    - field.field.taxonomy_term.company.field_departement
+    - field.field.taxonomy_term.company.field_infos_from_company
+    - field.field.taxonomy_term.company.field_memo
+    - field.field.taxonomy_term.company.field_migration
+    - field.field.taxonomy_term.company.field_note
+    - field.field.taxonomy_term.company.field_public_address
+    - field.field.taxonomy_term.company.field_public_email
+    - field.field.taxonomy_term.company.field_public_phone
+    - field.field.taxonomy_term.company.field_website
+    - field.field.taxonomy_term.company.field_workflow
+    - taxonomy.vocabulary.company
+  module:
+    - address
+    - file
+    - link
+    - options
+    - telephone_formatter
+    - text
+id: taxonomy_term.company.home
+targetEntityType: taxonomy_term
+bundle: company
+mode: home
+content:
+  description:
+    label: hidden
+    type: text_default
+    weight: 0
+    region: content
+    settings: {  }
+    third_party_settings: {  }
+  field_attachments:
+    weight: 10
+    label: above
+    settings:
+      use_description_as_link_text: true
+    third_party_settings: {  }
+    type: file_default
+    region: content
+  field_departement:
+    weight: 1
+    label: above
+    settings:
+      link_to_entity: false
+    third_party_settings: {  }
+    type: string
+    region: content
+  field_infos_from_company:
+    weight: 5
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: text_default
+    region: content
+  field_memo:
+    weight: 9
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: basic_string
+    region: content
+  field_migration:
+    weight: 12
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: list_default
+    region: content
+  field_note:
+    weight: 8
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: list_default
+    region: content
+  field_public_address:
+    weight: 6
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: address_default
+    region: content
+  field_public_email:
+    weight: 2
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: basic_string
+    region: content
+  field_public_phone:
+    weight: 7
+    label: above
+    settings:
+      format: 1
+      link: true
+      default_country: null
+    third_party_settings: {  }
+    type: telephone_formatter
+    region: content
+  field_website:
+    weight: 4
+    label: above
+    settings:
+      trim_length: 80
+      url_only: false
+      url_plain: false
+      rel: ''
+      target: ''
+    third_party_settings: {  }
+    type: link
+    region: content
+  field_workflow:
+    weight: 11
+    label: above
+    settings: {  }
+    third_party_settings: {  }
+    type: list_default
+    region: content
+hidden:
+  langcode: true
+  search_api_excerpt: true

+ 64 - 0
config/sync/core.entity_view_display.taxonomy_term.company.print.yml

@@ -0,0 +1,64 @@
+uuid: 6fd6e8b6-e5a2-49cf-bfc2-73d15b5c1dda
+langcode: en
+status: true
+dependencies:
+  config:
+    - core.entity_view_mode.taxonomy_term.print
+    - field.field.taxonomy_term.company.field_attachments
+    - field.field.taxonomy_term.company.field_departement
+    - field.field.taxonomy_term.company.field_infos_from_company
+    - field.field.taxonomy_term.company.field_memo
+    - field.field.taxonomy_term.company.field_migration
+    - field.field.taxonomy_term.company.field_note
+    - field.field.taxonomy_term.company.field_public_address
+    - field.field.taxonomy_term.company.field_public_email
+    - field.field.taxonomy_term.company.field_public_phone
+    - field.field.taxonomy_term.company.field_website
+    - field.field.taxonomy_term.company.field_workflow
+    - taxonomy.vocabulary.company
+  module:
+    - address
+    - link
+id: taxonomy_term.company.print
+targetEntityType: taxonomy_term
+bundle: company
+mode: print
+content:
+  field_public_address:
+    weight: 2
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+    type: address_default
+    region: content
+  field_public_email:
+    weight: 1
+    label: hidden
+    settings: {  }
+    third_party_settings: {  }
+    type: basic_string
+    region: content
+  field_website:
+    weight: 0
+    label: hidden
+    settings:
+      trim_length: 80
+      url_only: false
+      url_plain: false
+      rel: ''
+      target: ''
+    third_party_settings: {  }
+    type: link
+    region: content
+hidden:
+  description: true
+  field_attachments: true
+  field_departement: true
+  field_infos_from_company: true
+  field_memo: true
+  field_migration: true
+  field_note: true
+  field_public_phone: true
+  field_workflow: true
+  langcode: true
+  search_api_excerpt: true

+ 15 - 0
config/sync/core.entity_view_mode.node.printable.yml

@@ -0,0 +1,15 @@
+uuid: ae37be16-89f7-4722-98f5-110f924bfe41
+langcode: en
+status: false
+dependencies:
+  enforced:
+    module:
+      - printable
+  module:
+    - node
+_core:
+  default_config_hash: ixCuR5U6Q6-4dIvMWUP6wWwkolzJaDQWuQrer5YJjT4
+id: node.printable
+label: printable
+targetEntityType: node
+cache: true

+ 10 - 0
config/sync/core.entity_view_mode.taxonomy_term.print.yml

@@ -0,0 +1,10 @@
+uuid: dc2bdf0e-4c3c-4968-9286-ece8496e7564
+langcode: fr
+status: true
+dependencies:
+  module:
+    - taxonomy
+id: taxonomy_term.print
+label: print
+targetEntityType: taxonomy_term
+cache: true

+ 3 - 0
config/sync/core.extension.yml

@@ -140,9 +140,12 @@ module:
   path_alias: 0
   path_alias_xt: 0
   pathologic: 0
+  pdf_api: 0
   permissions_filter: 0
   persistent_login: 0
   plugin: 0
+  printable: 0
+  printable_pdf: 0
   profile: 0
   recurring_period: 0
   redirect: 0

+ 1 - 0
config/sync/language.types.yml

@@ -23,6 +23,7 @@ negotiation:
       language-url-fallback: 1
   language_interface:
     enabled:
+      language-graphql-operation: -999
       language-url: -20
       language-browser: -18
       language-selected: -17

+ 62 - 0
config/sync/printable.settings.yml

@@ -0,0 +1,62 @@
+printable_entities:
+  node: node
+  user: user
+  block: '0'
+  commerce_license: '0'
+  commerce_log: '0'
+  commerce_order: '0'
+  commerce_order_item: '0'
+  commerce_payment: '0'
+  commerce_payment_method: '0'
+  commerce_pricelist_item: '0'
+  commerce_pricelist: '0'
+  commerce_product_variation: '0'
+  commerce_product: '0'
+  commerce_product_attribute_value: '0'
+  commerce_promotion: '0'
+  commerce_promotion_coupon: '0'
+  commerce_subscription: '0'
+  commerce_store: '0'
+  config_split: '0'
+  consumer: '0'
+  contact_message: '0'
+  file: '0'
+  flagging: '0'
+  flagging_collection_type: '0'
+  flag_for_list: '0'
+  flag_list_item: '0'
+  flagging_collection: '0'
+  path_alias: '0'
+  profile: '0'
+  redirect: '0'
+  search_api_task: '0'
+  simplenews_subscriber: '0'
+  taxonomy_term: '0'
+  workflow_transition: '0'
+  workflow_scheduled_transition: '0'
+  menu_link_content: '0'
+open_target_blank: true
+css_include: themes/custom/materiotheme/assets/dist/print.css
+extract_links: '0'
+save_pdf: false
+pdf_tool: TCPDF
+paper_size: A4
+page_orientation: portrait
+path_to_binary: ''
+pdf_location: '[site:name]-[current-page:title]'
+send_to_printer: false
+close_window: false
+list_attribute: false
+printable_print_link_locations:
+  node: '0'
+  comment: '0'
+  user: '0'
+printable_pdf_link_locations:
+  node: '0'
+  comment: '0'
+  user: '0'
+print_pdf_use_xvfb_run: false
+path_to_xvfb_run: ''
+_core:
+  default_config_hash: '--64pTFtZ_ATDgWZMzTVtdhWcYJcq7fvQT9fZn3UCOU'
+ignore_warnings: 1

+ 1 - 0
config/sync/user.role.adherent.yml

@@ -21,4 +21,5 @@ permissions:
   - 'view own commerce_license'
   - 'view own flag lists'
   - 'view own member profile'
+  - 'view printer friendly versions'
   - 'view recurring commerce_order'

+ 1 - 0
config/sync/user.role.admin.yml

@@ -168,6 +168,7 @@ permissions:
   - 'view own flag lists'
   - 'view own profile'
   - 'view page revisions'
+  - 'view printer friendly versions'
   - 'view simplenews_issue revisions'
   - 'view static revisions'
   - 'view the administration theme'

+ 1 - 0
config/sync/user.role.admin_showroom.yml

@@ -14,3 +14,4 @@ permissions:
   - 'unflag dossier other items'
   - 'use jsonrpc services'
   - 'view own flag lists'
+  - 'view printer friendly versions'

+ 1 - 0
config/sync/user.role.student.yml

@@ -17,3 +17,4 @@ permissions:
   - 'use jsonrpc services'
   - 'view own flag lists'
   - 'view own member profile'
+  - 'view printer friendly versions'

+ 1 - 0
config/sync/user.role.translator.yml

@@ -13,3 +13,4 @@ permissions:
   - 'flag dossier other items'
   - 'unflag dossier other items'
   - 'view own flag lists'
+  - 'view printer friendly versions'

+ 6 - 0
package-lock.json

@@ -12267,6 +12267,12 @@
         }
       }
     },
+    "webpack-extraneous-file-cleanup-plugin": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/webpack-extraneous-file-cleanup-plugin/-/webpack-extraneous-file-cleanup-plugin-2.0.0.tgz",
+      "integrity": "sha1-+tVj2Om+G8Xjow8afyk/4x/Cc1U=",
+      "dev": true
+    },
     "webpack-merge": {
       "version": "5.4.0",
       "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.4.0.tgz",

+ 1 - 0
package.json

@@ -77,6 +77,7 @@
     "vuex-extensions": "^1.1.5",
     "webpack": "^5.6.0",
     "webpack-cli": "^4.2.0",
+    "webpack-extraneous-file-cleanup-plugin": "^2.0.0",
     "webpack-merge": "^5.4.0"
   }
 }

File diff suppressed because it is too large
+ 69 - 0
web/themes/custom/materiotheme/assets/dist/main.css


File diff suppressed because it is too large
+ 14 - 0
web/themes/custom/materiotheme/assets/dist/main.js


+ 0 - 17
web/themes/custom/materiotheme/assets/dist/main.js.LICENSE.txt

@@ -1,17 +0,0 @@
-/*!
- * Vue.js v2.6.12
- * (c) 2014-2020 Evan You
- * Released under the MIT License.
- */
-
-/*!
- * vue-infinite-loading v2.4.5
- * (c) 2016-2020 PeachScript
- * MIT License
- */
-
-/*!
- * vuex v3.6.0
- * (c) 2020 Evan You
- * @license MIT
- */

+ 69 - 0
web/themes/custom/materiotheme/assets/dist/print.css

@@ -0,0 +1,69 @@
+body {
+  font-size: 16px;
+  font-family: "Ubuntu",Arial,"MS Trebuchet",sans-serif;
+  font-weight: 500;
+  font-style: normal;
+  line-height: 1.3; }
+
+body {
+  margin: 0;
+  padding: 0; }
+
+#printable-root-page {
+  box-sizing: border-box;
+  width: 21cm;
+  padding: 1cm .5cm 2cm; }
+  #printable-root-page > header {
+    display: flex;
+    flex-flow: nowrap;
+    align-items: baseline; }
+    #printable-root-page > header h1 {
+      margin: 0;
+      font-weight: 600; }
+  #printable-root-page > article {
+    padding-top: 1em; }
+    #printable-root-page > article > h2 {
+      font-weight: 600;
+      margin: 0; }
+    #printable-root-page > article .field--name-field-reference {
+      margin: 0 0 1em 0; }
+    #printable-root-page > article .field--name-body,
+    #printable-root-page > article .field--name-field-samples {
+      display: inline-block;
+      vertical-align: top; }
+    #printable-root-page > article .field--name-body {
+      width: 75%; }
+      #printable-root-page > article .field--name-body p {
+        margin: 0; }
+    #printable-root-page > article .field__label {
+      font-size: 0.756em;
+      font-weight: 700; }
+    #printable-root-page > article .field--name-field-samples {
+      width: 23%;
+      text-align: right; }
+      #printable-root-page > article .field--name-field-samples .field__item {
+        font-size: 0.756em; }
+    #printable-root-page > article .field--name-field-manufacturer,
+    #printable-root-page > article .field--name-field-distributor {
+      margin-top: 1em;
+      display: inline-block;
+      width: 49%; }
+      #printable-root-page > article .field--name-field-manufacturer .taxonomy-term > h2,
+      #printable-root-page > article .field--name-field-distributor .taxonomy-term > h2 {
+        margin: 0;
+        font-weight: 600;
+        font-size: 1em; }
+      #printable-root-page > article .field--name-field-manufacturer .taxonomy-term p,
+      #printable-root-page > article .field--name-field-distributor .taxonomy-term p {
+        margin: 0; }
+    #printable-root-page > article .field--name-field-materiau-images {
+      margin-top: 1em;
+      display: flex;
+      flex-flow: row wrap;
+      justify-content: space-between; }
+      #printable-root-page > article .field--name-field-materiau-images .field__item {
+        flex: 0 0 33%; }
+        #printable-root-page > article .field--name-field-materiau-images .field__item img {
+          width: 100%;
+          height: auto; }
+

+ 1 - 0
web/themes/custom/materiotheme/assets/scripts/main.js

@@ -44,6 +44,7 @@ import { mapState } from 'vuex'
 // require('theme/assets/styles/main.scss');
 import 'vue-cool-lightbox/dist/vue-cool-lightbox.min.css'
 import 'theme/assets/styles/main.scss'
+import 'theme/assets/styles/print.scss'
 
 import VueSimpleAccordion from 'vue-simple-accordion';
 import 'vue-simple-accordion/dist/vue-simple-accordion.css';

+ 87 - 0
web/themes/custom/materiotheme/assets/styles/print.scss

@@ -0,0 +1,87 @@
+@import './base/fonts';
+
+body{
+  margin:0;
+  padding: 0;
+}
+
+#printable-root-page{
+  // outline: 1px solid blue;
+  box-sizing: border-box;
+  width: 21cm;
+  padding: 1cm .5cm 2cm;
+
+  >header{
+    display: flex;
+    flex-flow: nowrap;
+    align-items: baseline;
+    h1{
+      margin:0;
+      font-weight: 600;
+    }
+  }
+
+  >article{
+    padding-top: 1em;
+    >h2{
+      font-weight: 600;
+      margin:0;
+      // display: inline-block;
+    }
+    // .field--name-field-short-description{}
+    .field--name-field-reference{
+      // display: inline-block;
+      margin:0 0 1em 0;
+    }
+    .field--name-body,
+    .field--name-field-samples{
+      display: inline-block;
+      vertical-align: top;
+    }
+    .field--name-body{
+      width: 75%;
+      p{
+        margin:0;
+      }
+    }
+    .field__label{
+      font-size: 0.756em;
+      font-weight: 700;
+    }
+    .field--name-field-samples{
+      width:23%;
+      text-align: right;
+      .field__item{
+        font-size: 0.756em;
+      }
+    }
+
+    .field--name-field-manufacturer,
+    .field--name-field-distributor{
+      margin-top: 1em;
+      display: inline-block;
+      width:49%;
+      .taxonomy-term{
+        >h2{
+          margin:0;
+          font-weight: 600;
+          font-size: 1em;
+        }
+        p{ margin:0;}
+      }
+    }
+    .field--name-field-materiau-images{
+      margin-top: 1em;
+      display: flex;
+      flex-flow: row wrap;
+      justify-content: space-between;
+      .field__item{
+        flex:0 0 33%;
+        img{
+          width: 100%;
+          height:auto;
+        }
+      }
+    }
+  }
+}

File diff suppressed because it is too large
+ 69 - 0
web/themes/custom/materiotheme/logo.svg


+ 7 - 0
web/themes/custom/materiotheme/materiotheme.theme

@@ -194,3 +194,10 @@ function materiotheme_preprocess_commerce_product(array &$variables) {
 // function materiotheme_theme_suggestions_commerce_product_variation_later(&$suggestions, &$vars) {
 //   $test = 'test';
 // }
+
+
+function materiotheme_preprocess_printable(array &$variables) {
+  $site_config = \Drupal::config('system.site');
+  $variables['site_name'] = $site_config->get('name');
+  $variables['slogan'] = $site_config->get('slogan');
+}

+ 93 - 0
web/themes/custom/materiotheme/templates/printable/node--printable.html.twig

@@ -0,0 +1,93 @@
+{#
+/**
+ * @file
+ * Theme override to display a node.
+ *
+ * Available variables:
+ * - node: The node entity with limited access to object properties and methods.
+ *   Only method names starting with "get", "has", or "is" and a few common
+ *   methods such as "id", "label", and "bundle" are available. For example:
+ *   - node.getCreatedTime() will return the node creation timestamp.
+ *   - node.hasField('field_example') returns TRUE if the node bundle includes
+ *     field_example. (This does not indicate the presence of a value in this
+ *     field.)
+ *   - node.isPublished() will return whether the node is published or not.
+ *   Calling other methods, such as node.delete(), will result in an exception.
+ *   See \Drupal\node\Entity\Node for a full list of public properties and
+ *   methods for the node object.
+ * - label: (optional) The title of the node.
+ * - content: All node items. Use {{ content }} to print them all,
+ *   or print a subset such as {{ content.field_example }}. Use
+ *   {{ content|without('field_example') }} to temporarily suppress the printing
+ *   of a given child element.
+ * - author_picture: The node author user entity, rendered using the "compact"
+ *   view mode.
+ * - metadata: Metadata for this node.
+ * - date: (optional) Themed creation date field.
+ * - author_name: (optional) Themed author name field.
+ * - url: Direct URL of the current node.
+ * - display_submitted: Whether submission information should be displayed.
+ * - attributes: HTML attributes for the containing element.
+ *   The attributes.class element may contain one or more of the following
+ *   classes:
+ *   - node: The current template type (also known as a "theming hook").
+ *   - node--type-[type]: The current node type. For example, if the node is an
+ *     "Article" it would result in "node--type-article". Note that the machine
+ *     name will often be in a short form of the human readable label.
+ *   - node--view-mode-[view_mode]: The View Mode of the node; for example, a
+ *     teaser would result in: "node--view-mode-teaser", and
+ *     full: "node--view-mode-full".
+ *   The following are controlled through the node publishing options.
+ *   - node--promoted: Appears on nodes promoted to the front page.
+ *   - node--sticky: Appears on nodes ordered above other non-sticky nodes in
+ *     teaser listings.
+ *   - node--unpublished: Appears on unpublished nodes visible only to site
+ *     admins.
+ * - title_attributes: Same as attributes, except applied to the main title
+ *   tag that appears in the template.
+ * - content_attributes: Same as attributes, except applied to the main
+ *   content tag that appears in the template.
+ * - author_attributes: Same as attributes, except applied to the author of
+ *   the node tag that appears in the template.
+ * - title_prefix: Additional output populated by modules, intended to be
+ *   displayed in front of the main title tag that appears in the template.
+ * - title_suffix: Additional output populated by modules, intended to be
+ *   displayed after the main title tag that appears in the template.
+ * - view_mode: View mode; for example, "teaser" or "full".
+ * - teaser: Flag for the teaser state. Will be true if view_mode is 'teaser'.
+ * - page: Flag for the full page state. Will be true if view_mode is 'full'.
+ * - readmore: Flag for more state. Will be true if the teaser content of the
+ *   node cannot hold the main body content.
+ * - logged_in: Flag for authenticated user status. Will be true when the
+ *   current user is a logged-in member.
+ * - is_admin: Flag for admin user status. Will be true when the current user
+ *   is an administrator.
+ *
+ * @see template_preprocess_node()
+ *
+ * @todo Remove the id attribute (or make it a class), because if that gets
+ *   rendered twice on a page this is invalid CSS for example: two lists
+ *   in different view modes.
+ */
+#}
+{%
+  set classes = [
+    'node',
+    'node--type-' ~ node.bundle|clean_class,
+    node.isPromoted() ? 'node--promoted',
+    node.isSticky() ? 'node--sticky',
+    not node.isPublished() ? 'node--unpublished',
+    view_mode ? 'node--view-mode-' ~ view_mode|clean_class,
+  ]
+%}
+{{ attach_library('classy/node') }}
+<article{{ attributes.addClass(classes) }}>
+  <h2>
+    {{ label }}
+  </h2>
+
+  <!-- <div{{ content_attributes.addClass('node__content') }}> -->
+  {{ content }}
+  <!-- </div> -->
+
+</article>

+ 26 - 0
web/themes/custom/materiotheme/templates/printable/printable-footer.html.twig

@@ -0,0 +1,26 @@
+{#
+/**
+ * @file
+ * Default theme implementation for printer friendly version of entities.
+ *
+ * Available variables:
+ * - footer_links: Contains all the links present in the page.
+ * - source_url: Contains the source url of page.
+ *
+ * @see template_preprocess_printable_footer()
+ *
+ * @ingroup themeable
+ */
+#}
+<hr/>
+<strong>Source URL:</strong> <i>{{ source_url }}</i>
+{% if footer_links %}
+  <br/>
+  <br/>
+  <strong> List of links present in page </strong>
+  <ul>
+   {% for link in footer_links %}
+    <li>{{ link }}</li>
+   {% endfor %}
+  </ul>
+{% endif %}

+ 11 - 0
web/themes/custom/materiotheme/templates/printable/printable-header.html.twig

@@ -0,0 +1,11 @@
+{#
+/**
+ * @file
+ * Default theme implementation for printer friendly version of entities.
+ *
+ * Available variables:
+ * - logo_url: URL to logo used in the theme.
+ *
+ * @ingroup themeable
+ */
+#}

+ 43 - 0
web/themes/custom/materiotheme/templates/printable/printable.html.twig

@@ -0,0 +1,43 @@
+{#
+/**
+ * @file
+ * Default theme implementation for printer friendly version of entities.
+ *
+ * Available variables:
+ * - title: Top level node title.
+ * - base_url: URL to the home page.
+ *
+ * @see template_preprocess_printable()
+ *
+ * @ingroup themeable
+ */
+#}
+<!DOCTYPE html>
+<html{{ html_attributes }}>
+  <head>
+    <title>{{ title }}</title>
+    <style>
+    .node_view ul li{
+    display:none;
+    }
+    </style>
+    <link type="text/css" rel="stylesheet" href="{{ base_url }}/css/drupal-printable.css" />
+      {% if include_css %}
+        <link type="text/css" rel="stylesheet" href="/{{ include_css }}" />
+      {% endif %}
+      {% if close_script %}
+        <script type="text/javascript" src="{{ close_script }}"></script>
+      {% else %}
+        <script type="text/javascript" src="{{ send_script }}"></script>
+      {% endif %}
+  </head>
+  <body>
+    <div id="printable-root-page">
+      <header>
+        <h1>{{ site_name }}</h1>
+        <aside>{{ slogan }}</aside>
+      </header>
+      {{ content }}
+    </div>
+  </body>
+</html>

+ 5 - 0
web/themes/custom/materiotheme/vuejs/components/Content/Card.vue

@@ -41,6 +41,11 @@
           </ul>
         </div>
       </section>
+      <section class="tool print">
+        <a :href="item.path+'/printable/print'" target="_blank">
+          <span class="btn mdi mdi-printer"/>
+        </a>
+      </section>
     </nav>
     <section class="images" v-switcher>
       <figure

+ 5 - 0
web/themes/custom/materiotheme/vuejs/components/Content/ModalCard.vue

@@ -50,6 +50,11 @@
             </ul>
           </div>
         </section>
+        <section class="tool print">
+          <a :href="material.path+'/printable/print'" target="_blank">
+            <span class="btn mdi mdi-printer"/>
+          </a>
+        </section>
         <!-- <section class="tool industriels"  v-if="material.manufacturer || material.distributor">
           <span class="btn mdi mdi-factory"/>
           <div class="tool-content">

Some files were not shown because too many files changed in this diff