From cacad6e7951e6939c5dabb2310a5c0d603f5eada Mon Sep 17 00:00:00 2001 From: Caroline Moran Date: Tue, 6 Dec 2022 17:08:21 -0400 Subject: [PATCH] =?UTF-8?q?feat(footer):=20add=20slick=20no=20c=C3=B3digo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- checkout/package-lock.json | 15 ++++++++ checkout/package.json | 1 + checkout/src/arquivos/js/checkout.js | 1 + checkout/src/arquivos/js/components/Footer.js | 7 ++++ .../template-checkout/checkout-footer.html | 1 + package-lock.json | 38 +++++++++++++------ package.json | 3 +- 7 files changed, 53 insertions(+), 13 deletions(-) diff --git a/checkout/package-lock.json b/checkout/package-lock.json index e9d2428..f46257d 100644 --- a/checkout/package-lock.json +++ b/checkout/package-lock.json @@ -24,6 +24,7 @@ "jquery": "^3.6.0", "m3-utils": "^0.1.0", "sass": "^1.38.1", + "slick-carousel": "^1.8.1", "terser-webpack-plugin": "^5.1.4" }, "devDependencies": { @@ -8803,6 +8804,14 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, + "node_modules/slick-carousel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", + "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA==", + "peerDependencies": { + "jquery": ">=1.8.0" + } + }, "node_modules/snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -16954,6 +16963,12 @@ } } }, + "slick-carousel": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/slick-carousel/-/slick-carousel-1.8.1.tgz", + "integrity": "sha512-XB9Ftrf2EEKfzoQXt3Nitrt/IPbT+f1fgqBdoxO3W/+JYvtEOW6EgxnWfr9GH6nmULv7Y2tPmEX3koxThVmebA==", + "requires": {} + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", diff --git a/checkout/package.json b/checkout/package.json index 1d9690c..8df3a89 100644 --- a/checkout/package.json +++ b/checkout/package.json @@ -24,6 +24,7 @@ "jquery": "^3.6.0", "m3-utils": "^0.1.0", "sass": "^1.38.1", + "slick-carousel": "^1.8.1", "terser-webpack-plugin": "^5.1.4" }, "devDependencies": { diff --git a/checkout/src/arquivos/js/checkout.js b/checkout/src/arquivos/js/checkout.js index c8d274b..c8162e9 100644 --- a/checkout/src/arquivos/js/checkout.js +++ b/checkout/src/arquivos/js/checkout.js @@ -1,5 +1,6 @@ import CheckoutUI from "./components/CheckoutUI"; import { Container } from "m3-utils"; +import "slick-carousel"; import Header from "./components/Header"; import Footer from "./components/Footer"; diff --git a/checkout/src/arquivos/js/components/Footer.js b/checkout/src/arquivos/js/components/Footer.js index 4b6b817..b8ea24d 100644 --- a/checkout/src/arquivos/js/components/Footer.js +++ b/checkout/src/arquivos/js/components/Footer.js @@ -17,4 +17,11 @@ export default class Footer { interval: 1000, // vai verificar a cada 1 segundo se o elemento existe }); } + async addCarrossel() { + const elemento = await waitElement("#my-element"); + $(elemento).slick({ + slidesToShow: 4, + slidesToScroll: 1, + }); + } } diff --git a/checkout/src/template-checkout/checkout-footer.html b/checkout/src/template-checkout/checkout-footer.html index dbcae72..6246210 100644 --- a/checkout/src/template-checkout/checkout-footer.html +++ b/checkout/src/template-checkout/checkout-footer.html @@ -2,6 +2,7 @@ MODIFICA-LO NÃO CAUSARÁ EFEITO ALGUM, todo html que for modificado no footer, deverá ser feito através de javaScript. -->