From 33313ac1fc47b446bee912e3eaad3a339587592a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Machulda?= Date: Mon, 30 Oct 2023 11:34:48 +0100 Subject: [PATCH] Feat: Extend types to allow cookie tables settings --- src/languages/cs.ts | 3 +-- src/languages/de.ts | 3 +-- src/languages/en.ts | 3 +-- src/languages/hu.ts | 3 +-- src/languages/pl.ts | 3 +-- src/languages/ru.ts | 3 +-- src/languages/sk.ts | 3 +-- src/languages/uk.ts | 3 +-- src/types/vanilla-cookieconsent.ts | 9 +++++++++ 9 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/languages/cs.ts b/src/languages/cs.ts index a70cdde4..8e2ffca4 100644 --- a/src/languages/cs.ts +++ b/src/languages/cs.ts @@ -6,9 +6,8 @@ import { pluralize, legalizeAlmaCareer, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'a', diff --git a/src/languages/de.ts b/src/languages/de.ts index 3d8042a6..d751a04a 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -5,9 +5,8 @@ import { isSettingsButtonNotShown, legalizeAlmaCareer, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'und', diff --git a/src/languages/en.ts b/src/languages/en.ts index 2ed81c51..499b752f 100644 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -5,9 +5,8 @@ import { isSettingsButtonNotShown, legalizeAlmaCareer, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'and', diff --git a/src/languages/hu.ts b/src/languages/hu.ts index 53b239c3..7764ac8d 100644 --- a/src/languages/hu.ts +++ b/src/languages/hu.ts @@ -5,9 +5,8 @@ import { isSettingsButtonNotShown, legalizeAlmaCareer, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'és', diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 518fceda..7db5d427 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -6,9 +6,8 @@ import { legalizeAlmaCareer, pluralize, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'i', diff --git a/src/languages/ru.ts b/src/languages/ru.ts index 2f4a41bc..773c5767 100644 --- a/src/languages/ru.ts +++ b/src/languages/ru.ts @@ -6,9 +6,8 @@ import { legalizeAlmaCareer, pluralize, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'и', diff --git a/src/languages/sk.ts b/src/languages/sk.ts index face02c5..1599177f 100644 --- a/src/languages/sk.ts +++ b/src/languages/sk.ts @@ -6,9 +6,8 @@ import { legalizeAlmaCareer, pluralize, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'a', diff --git a/src/languages/uk.ts b/src/languages/uk.ts index 3986f60f..5dee7b68 100644 --- a/src/languages/uk.ts +++ b/src/languages/uk.ts @@ -6,9 +6,8 @@ import { legalizeAlmaCareer, pluralize, } from '../utils'; -import { ExtraMessages, Values } from '../types'; +import { ExtraMessages, Values, VanillaCookieConsent } from '../types'; import { CookieConsentCategory, SecondaryButtonMode } from '../constants'; -import { VanillaCookieConsent } from '../types/vanilla-cookieconsent'; const extra = { and: 'i', diff --git a/src/types/vanilla-cookieconsent.ts b/src/types/vanilla-cookieconsent.ts index d8eddcbe..f3eee600 100644 --- a/src/types/vanilla-cookieconsent.ts +++ b/src/types/vanilla-cookieconsent.ts @@ -59,10 +59,18 @@ export namespace VanillaCookieConsent { readonly?: boolean; } + interface CookieTableItem { + domain?: string; + path?: string; + is_regex?: boolean; + [key: string]: string | boolean | undefined; + } + interface ModalBlock { title?: string; description?: string; toggle?: ModalBlockToggle; + cookie_table?: CookieTableItem[]; } interface ConsentModal { @@ -77,6 +85,7 @@ export namespace VanillaCookieConsent { accept_all_btn?: string; reject_all_btn?: string; save_settings_btn?: string; + cookie_table_headers?: Record[]; blocks?: ModalBlock[]; }