From 74847949992fe408cd72674f4d1f9d688d8aebb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Glawaty?= Date: Tue, 12 Dec 2023 07:56:20 +0100 Subject: [PATCH] Embed banners improvements - improved embed banners handling - responsive breakpoints from external banners can be now manager by JS client after invoking the method `ExternalBanner.delegateResponsiveBehaviour()` --- demo/index.html | 6 +- src/banner/banner-manager.mjs | 71 ++++++----- src/banner/banner.mjs | 6 + src/banner/external/external-banner.mjs | 72 +++++++++--- src/banner/managed/banner-data.mjs | 100 ++-------------- src/banner/managed/managed-banner.mjs | 99 +++++++++++++--- src/banner/responsive/content.mjs | 17 +++ src/banner/responsive/contents.mjs | 111 ++++++++++++++++++ src/banner/responsive/dimensions-provider.mjs | 17 +++ src/client/embed/client.mjs | 29 ++++- src/client/standard/client.mjs | 98 ++++++++-------- src/frame/banner-frame-messenger.mjs | 32 +++++ src/frame/frame-messenger.mjs | 15 ++- .../banner-interaction-watcher.mjs | 14 +-- .../intersection-observer-factory.mjs | 4 +- src/request/embed-url-factory.mjs | 15 ++- src/request/request.mjs | 22 ++-- src/utils/dom-helpers.mjs | 23 ++++ 18 files changed, 512 insertions(+), 239 deletions(-) create mode 100644 src/banner/responsive/content.mjs create mode 100644 src/banner/responsive/contents.mjs create mode 100644 src/banner/responsive/dimensions-provider.mjs create mode 100644 src/utils/dom-helpers.mjs diff --git a/demo/index.html b/demo/index.html index be98979..6a5b290 100644 --- a/demo/index.html +++ b/demo/index.html @@ -18,7 +18,7 @@