-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtypes.d.ts
166 lines (140 loc) · 4.22 KB
/
types.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
export interface CookieConsentTranslationsDetailSection {
title: string;
perex: string;
}
export interface CookieConsentTranslationsButton {
label: string;
}
export interface CookieConsentTranslationsTab {
title: string;
}
export interface CookieConsentTranslationsTabAgree extends CookieConsentTranslationsTab {
body: string;
}
export interface CookieConsentTranslationsTabAbout extends CookieConsentTranslationsTab {
body: string;
}
export interface CookieConsentTranslationsTabDetail extends CookieConsentTranslationsTab {
necessary: CookieConsentTranslationsDetailSection;
preferences: CookieConsentTranslationsDetailSection;
statistics: CookieConsentTranslationsDetailSection;
marketing: CookieConsentTranslationsDetailSection;
}
export interface CookieConsentTranslations {
locale: 'cs-CZ' | string;
tabAgree: CookieConsentTranslationsTabAgree;
tabAbout: CookieConsentTranslationsTabAbout;
tabDetail: CookieConsentTranslationsTabDetail;
buttonEdit: CookieConsentTranslationsButton;
buttonAllowAll: CookieConsentTranslationsButton;
buttonRejectAll: CookieConsentTranslationsButton;
buttonConfirm: CookieConsentTranslationsButton;
buttonClose: CookieConsentTranslationsButton;
badge: CookieConsentTranslationsButton;
lastUpdated: string;
}
export interface ConsentRules {
necessary: boolean;
preferences: boolean;
statistics: boolean;
marketing: boolean;
}
export interface ConsentOptions extends ConsentRules {
updated: string;
id: string;
type: ConsentType;
}
export type ConsentOptionsKeys = keyof ConsentOptions;
export type CookieConsentThemeKeys =
| 'base-color'
| 'base-font-size'
| 'base-line'
| 'base-font-family'
| 'base-shadow'
| 'border-radius'
| 'button-border-radius'
| 'color-grey'
| 'color-primary'
| 'color-text-light'
| 'color-text'
| 'color-white'
| 'button-default__bg-color'
| 'button-default__color'
| 'button-default__text-transform'
| 'button-default__border'
| 'button-default__box-shadow'
| 'button-default--hover__bg-color'
| 'button-default--hover__color'
| 'button-default--hover__border'
| 'button-default--hover__box-shadow'
| 'button-primary__bg-color'
| 'button-primary__color'
| 'button-primary__text-transform'
| 'button-primary__border'
| 'button-primary__box-shadow'
| 'button-primary--hover__bg-color'
| 'button-primary--hover__color'
| 'button-primary--hover__border'
| 'button-primary--hover__box-shadow'
| 'badge__bg-color'
| 'badge__color'
| 'badge__border'
| 'badge__border-radius'
| 'badge__box-shadow'
| 'badge__position'
| 'base-link__color'
| 'base-link__text-decoration'
| 'base-link--hover__color'
| 'base-link--hover__text-decoration';
export type CookieConsentTheme = Partial<Record<CookieConsentThemeKeys, string>>;
export interface CookieConsentSettingsTab {
showButtonRejectAll?: boolean;
showButtonAllowAll?: boolean;
}
export interface CookieConsentSettings {
tabAgree: CookieConsentSettingsTab;
tabAbout: CookieConsentSettingsTab;
tabDetails: CookieConsentSettingsTab;
enableDarkMode: boolean;
disableBadge: boolean;
disableCross: boolean;
disableHeader: boolean;
}
export type ConsentType = 'full' | 'advanced' | 'rejected' | '';
export declare class ConsentService {
constructor();
get necessary(): boolean;
set necessary(value: boolean);
get preferences(): boolean;
set preferences(value: boolean);
get statistics(): boolean;
set statistics(value: boolean);
get marketing(): boolean;
set marketing(value: boolean);
get updated(): string;
get id(): string;
get type(): ConsentType;
set type(value: ConsentType);
}
export declare class ConsentBadge extends HTMLElement {
constructor();
hideBadge(): void;
}
export declare class ConsentDialog extends HTMLElement {
constructor();
closeModal(): void;
}
declare global {
interface Window {
CookieConsentTranslations: Partial<CookieConsentTranslations>;
CookieConsentTheme: CookieConsentTheme;
CookieConsentThemeDark: CookieConsentTheme;
CookieConsentSettings: Partial<CookieConsentSettings>;
CookieConsent: ConsentService;
CookieConsentModalOpen: () => void;
}
interface HTMLElementTagNameMap {
'consent-dialog': ConsentDialog;
'consent-badge': ConsentBadge;
}
}