Update @probo/cookie-banner public exports and bump to 0.1.0
Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@probo/cookie-banner",
|
||||
"version": "0.0.4",
|
||||
"version": "0.1.0",
|
||||
"description": "Probo cookie consent banner SDK",
|
||||
"type": "module",
|
||||
"main": "dist/cookie-banner.mjs",
|
||||
|
||||
@@ -28,4 +28,4 @@ export { ProboCookie, ProboCookieList } from "./cookie-list";
|
||||
export { ProboPreferencePanel, ProboSaveButton } from "./preference-panel";
|
||||
export { ProboSettingsButton } from "./settings-button";
|
||||
export { ProboSettingsLink } from "./settings-link";
|
||||
export { registerComponents } from "./register";
|
||||
export { registerHeadlessComponents } from "./register";
|
||||
|
||||
@@ -44,7 +44,7 @@ const elements: [string, CustomElementConstructor][] = [
|
||||
["probo-settings-link", ProboSettingsLink],
|
||||
];
|
||||
|
||||
export function registerComponents(): void {
|
||||
export function registerHeadlessComponents(): void {
|
||||
for (const [name, ctor] of elements) {
|
||||
if (!customElements.get(name)) {
|
||||
customElements.define(name, ctor);
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
export { registerComponents } from "../components";
|
||||
export { registerHeadlessComponents } from "../components";
|
||||
|
||||
@@ -12,4 +12,4 @@
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
export { ProboThemedBanner, registerThemedBanner } from "./themed-banner";
|
||||
export { registerCookieBanner } from "./themed-banner";
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import { registerThemedBanner } from "./index";
|
||||
import { registerCookieBanner } from "./index";
|
||||
|
||||
registerThemedBanner();
|
||||
registerCookieBanner();
|
||||
|
||||
const script = document.currentScript as HTMLScriptElement | null;
|
||||
|
||||
|
||||
@@ -14,9 +14,7 @@
|
||||
|
||||
import { ProboThemedBanner } from "./themed-banner";
|
||||
|
||||
export { ProboThemedBanner };
|
||||
|
||||
export function registerThemedBanner(): void {
|
||||
export function registerCookieBanner(): void {
|
||||
if (!customElements.get("probo-cookie-banner")) {
|
||||
customElements.define("probo-cookie-banner", ProboThemedBanner);
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
// OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
// PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
import { registerComponents } from "../components";
|
||||
import { registerHeadlessComponents } from "../components";
|
||||
import type { ProboCookieBannerRoot } from "../components/cookie-banner-root";
|
||||
import type { BannerConfig } from "../client";
|
||||
import { getGpcLabel, interpolate } from "../i18n";
|
||||
@@ -32,7 +32,7 @@ export class ProboThemedBanner extends HTMLElement {
|
||||
}
|
||||
|
||||
connectedCallback(): void {
|
||||
registerComponents();
|
||||
registerHeadlessComponents();
|
||||
|
||||
const bannerId = this.getAttribute("banner-id");
|
||||
const baseUrl = this.getAttribute("base-url");
|
||||
|
||||
Reference in New Issue
Block a user