@atlasng/labs 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @atlasng/labs
2
+
3
+ Work in progress components.
@@ -0,0 +1,26 @@
1
+ @use 'internal/sass-utils';
2
+ @use 'internal/token-utils';
3
+
4
+ $config: (
5
+ namespace: 'ang-cookie-modal',
6
+ tokens: (
7
+ container-color: token-utils.sys-token(surface-bright),
8
+ container-elevation-shadow: 0px 12px 32px 24px sass-utils.color-with-opacity(token-utils.sys-token(tertiary), 24%),
9
+ container-shape: token-utils.sys-token(corner-small),
10
+ divider-color: token-utils.sys-token(outline-variant),
11
+ border-color: token-utils.sys-token(outline-variant),
12
+ border-radius: token-utils.sys-token(corner-medium),
13
+ title-color: token-utils.sys-token(on-surface),
14
+ title-font: token-utils.sys-token(title-small-font),
15
+ title-line-height: token-utils.sys-token(title-small-line-height),
16
+ title-size: token-utils.sys-token(title-small-size),
17
+ title-tracking: token-utils.sys-token(title-small-tracking),
18
+ title-weight: token-utils.sys-token(title-small-weight),
19
+ description-color: token-utils.sys-token(on-surface-variant),
20
+ description-font: token-utils.sys-token(body-medium-font),
21
+ description-line-height: token-utils.sys-token(body-medium-line-height),
22
+ description-size: token-utils.sys-token(body-medium-size),
23
+ description-tracking: token-utils.sys-token(body-medium-tracking),
24
+ description-weight: token-utils.sys-token(body-medium-weight),
25
+ ),
26
+ );
@@ -0,0 +1,266 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, inject, ChangeDetectionStrategy, Component, model, computed, signal, ViewEncapsulation } from '@angular/core';
3
+ import * as i1 from '@angular/material/button';
4
+ import { MatButtonModule } from '@angular/material/button';
5
+ import * as i2$1 from '@angular/material/dialog';
6
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
7
+ import * as i2 from '@angular/material/divider';
8
+ import { MatDividerModule, MatDivider } from '@angular/material/divider';
9
+ import * as i3 from '@angular/material/icon';
10
+ import { MatIconModule } from '@angular/material/icon';
11
+ import * as i4$1 from '@angular/material/tabs';
12
+ import { MatTabsModule } from '@angular/material/tabs';
13
+ import { EventScope, TrackClick, provideEventScope } from '@atlasng/analytics';
14
+ import { AnalyticsEventCategory, ALLOW_ALL_ANALYTICS_EVENT_CATEGORY_PERMISSIONS, ALLOW_NECESSARY_ANALYTICS_EVENT_CATEGORY_PERMISSIONS } from '@atlasng/analytics/events';
15
+ import * as i1$1 from '@angular/cdk/accordion';
16
+ import { CdkAccordionItem, CdkAccordionModule } from '@angular/cdk/accordion';
17
+ import * as i4 from '@angular/material/slide-toggle';
18
+ import { MatSlideToggleModule } from '@angular/material/slide-toggle';
19
+ import { IdGenerator, AnyLink } from '@atlasng/common';
20
+ import { TextLink } from '@atlasng/design-system/text-link';
21
+
22
+ /**
23
+ * Renders a list of cookie providers with links to their privacy details.
24
+ */
25
+ class ProviderList {
26
+ /**
27
+ * Providers displayed in the list.
28
+ */
29
+ providers = input([], ...(ngDevMode ? [{ debugName: "providers" }] : /* istanbul ignore next */ []));
30
+ /**
31
+ * Generates unique IDs for list item accessibility attributes.
32
+ */
33
+ idGenerator = inject(IdGenerator);
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ProviderList, deps: [], target: i0.ɵɵFactoryTarget.Component });
35
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: ProviderList, isStandalone: true, selector: "ang-providers-list", inputs: { providers: { classPropertyName: "providers", publicName: "providers", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.ang-provider-list--empty": "providers().length === 0" }, classAttribute: "ang-provider-list" }, ngImport: i0, template: "@for (provider of providers(); track $index) {\n @let id = idGenerator.getId('ang-providers-list');\n\n <div class=\"ang-provider-list--card\" [angEventScope]=\"provider.label.toLowerCase()\">\n <span class=\"ang-provider-list--label\" [attr.id]=\"id\">{{ provider.label }}</span>\n <a\n class=\"ang-provider-list--link\"\n angTextLink\n target=\"_blank\"\n [angAnyLink]=\"provider.href\"\n [attr.aria-labelledby]=\"id\"\n >\n <span>Learn more about this provider</span>\n <mat-icon fontIcon=\"open_in_new\" />\n </a>\n </div>\n} @empty {\n <div class=\"ang-provider-list--card\">\n <p class=\"ang-provider-list--empty-text\">We do not use cookies or technology of this type</p>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;gap:16px}:host .ang-provider-list--card{padding:12px 16px;border:1px solid var(--ang-ang-cookie-modal-border-color, var(--mat-sys-outline-variant));border-radius:var(--ang-ang-cookie-modal-border-radius, var(--mat-sys-corner-medium))}:host .ang-provider-list--label{margin:0 0 4px;color:var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));font-family:var(--ang-ang-cookie-modal-title-font, var(--mat-sys-title-small-font));font-size:var(--ang-ang-cookie-modal-title-size, var(--mat-sys-title-small-size));font-weight:var(--ang-ang-cookie-modal-title-weight, var(--mat-sys-title-small-weight));line-height:var(--ang-ang-cookie-modal-title-line-height, var(--mat-sys-title-small-line-height));letter-spacing:var(--ang-ang-cookie-modal-title-tracking, var(--mat-sys-title-small-tracking))}:host .ang-provider-list--link,:host .ang-provider-list--empty-text{margin:0;color:var(--ang-ang-cookie-modal-description-color, var(--mat-sys-on-surface-variant));font-family:var(--ang-ang-cookie-modal-description-font, var(--mat-sys-body-medium-font));font-size:var(--ang-ang-cookie-modal-description-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-ang-cookie-modal-description-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-ang-cookie-modal-description-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-ang-cookie-modal-description-tracking, var(--mat-sys-body-medium-tracking))}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: AnyLink, selector: "[angAnyLink]", inputs: ["angAnyLink", "target", "rel", "download", "queryParams", "queryParamsHandling", "fragment", "preserveFragment", "skipLocationChange", "relativeTo", "browserUrl", "replaceUrl", "state", "info"], exportAs: ["angAnyLink"] }, { kind: "component", type: TextLink, selector: "a[angTextLink]" }, { kind: "directive", type: EventScope, selector: "[angEventScope]", inputs: ["angEventScope"], exportAs: ["angEventScope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
36
+ }
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ProviderList, decorators: [{
38
+ type: Component,
39
+ args: [{ selector: 'ang-providers-list', imports: [MatIconModule, AnyLink, TextLink, EventScope], changeDetection: ChangeDetectionStrategy.OnPush, host: {
40
+ class: 'ang-provider-list',
41
+ '[class.ang-provider-list--empty]': 'providers().length === 0',
42
+ }, template: "@for (provider of providers(); track $index) {\n @let id = idGenerator.getId('ang-providers-list');\n\n <div class=\"ang-provider-list--card\" [angEventScope]=\"provider.label.toLowerCase()\">\n <span class=\"ang-provider-list--label\" [attr.id]=\"id\">{{ provider.label }}</span>\n <a\n class=\"ang-provider-list--link\"\n angTextLink\n target=\"_blank\"\n [angAnyLink]=\"provider.href\"\n [attr.aria-labelledby]=\"id\"\n >\n <span>Learn more about this provider</span>\n <mat-icon fontIcon=\"open_in_new\" />\n </a>\n </div>\n} @empty {\n <div class=\"ang-provider-list--card\">\n <p class=\"ang-provider-list--empty-text\">We do not use cookies or technology of this type</p>\n </div>\n}\n", styles: [":host{display:flex;flex-direction:column;gap:16px}:host .ang-provider-list--card{padding:12px 16px;border:1px solid var(--ang-ang-cookie-modal-border-color, var(--mat-sys-outline-variant));border-radius:var(--ang-ang-cookie-modal-border-radius, var(--mat-sys-corner-medium))}:host .ang-provider-list--label{margin:0 0 4px;color:var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));font-family:var(--ang-ang-cookie-modal-title-font, var(--mat-sys-title-small-font));font-size:var(--ang-ang-cookie-modal-title-size, var(--mat-sys-title-small-size));font-weight:var(--ang-ang-cookie-modal-title-weight, var(--mat-sys-title-small-weight));line-height:var(--ang-ang-cookie-modal-title-line-height, var(--mat-sys-title-small-line-height));letter-spacing:var(--ang-ang-cookie-modal-title-tracking, var(--mat-sys-title-small-tracking))}:host .ang-provider-list--link,:host .ang-provider-list--empty-text{margin:0;color:var(--ang-ang-cookie-modal-description-color, var(--mat-sys-on-surface-variant));font-family:var(--ang-ang-cookie-modal-description-font, var(--mat-sys-body-medium-font));font-size:var(--ang-ang-cookie-modal-description-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-ang-cookie-modal-description-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-ang-cookie-modal-description-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-ang-cookie-modal-description-tracking, var(--mat-sys-body-medium-tracking))}\n"] }]
43
+ }], propDecorators: { providers: [{ type: i0.Input, args: [{ isSignal: true, alias: "providers", required: false }] }] } });
44
+
45
+ /**
46
+ * Renders a single cookie permission accordion item with toggle and provider links.
47
+ */
48
+ class CookiePermissionItem {
49
+ /**
50
+ * Display metadata for this cookie category.
51
+ */
52
+ info = input.required(...(ngDevMode ? [{ debugName: "info" }] : /* istanbul ignore next */ []));
53
+ /**
54
+ * Two-way model for the category enabled state.
55
+ */
56
+ enabled = model.required(...(ngDevMode ? [{ debugName: "enabled" }] : /* istanbul ignore next */ []));
57
+ /**
58
+ * Providers associated with the category.
59
+ */
60
+ providers = input([], ...(ngDevMode ? [{ debugName: "providers" }] : /* istanbul ignore next */ []));
61
+ /**
62
+ * Unique id for the header toggle control.
63
+ */
64
+ toggleId = inject(IdGenerator).getId('ang-cookie-permission-item--header-toggle');
65
+ /**
66
+ * Unique id for the expandable body region.
67
+ */
68
+ bodyId = inject(IdGenerator).getId('ang-cookie-permission-item--body');
69
+ /**
70
+ * Accessible label for the current toggle action.
71
+ */
72
+ stateLabel = computed(() => {
73
+ return `${this.enabled() ? 'Disallow' : 'Allow'} ${this.info().title.toLowerCase()} cookies`;
74
+ }, ...(ngDevMode ? [{ debugName: "stateLabel" }] : /* istanbul ignore next */ []));
75
+ /**
76
+ * Indicates whether the accordion section is expanded.
77
+ */
78
+ get expanded() {
79
+ return this.accordionItem.expanded;
80
+ }
81
+ /**
82
+ * Host accordion item directive controlling expand/collapse behavior.
83
+ */
84
+ accordionItem = inject(CdkAccordionItem);
85
+ /**
86
+ * Opens this accordion item.
87
+ */
88
+ open() {
89
+ this.accordionItem.open();
90
+ }
91
+ /**
92
+ * Closes this accordion item.
93
+ */
94
+ close() {
95
+ this.accordionItem.close();
96
+ }
97
+ /**
98
+ * Toggles this accordion item between open and closed.
99
+ */
100
+ toggle() {
101
+ this.accordionItem.toggle();
102
+ }
103
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookiePermissionItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
104
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.7", type: CookiePermissionItem, isStandalone: true, selector: "ang-cookie-permission-item", inputs: { info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: true, transformFunction: null }, enabled: { classPropertyName: "enabled", publicName: "enabled", isSignal: true, isRequired: true, transformFunction: null }, providers: { classPropertyName: "providers", publicName: "providers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enabled: "enabledChange" }, host: { properties: { "class.ang-cookie-permission-item--expanded": "expanded" }, classAttribute: "ang-cookie-permission-item" }, hostDirectives: [{ directive: i1$1.CdkAccordionItem, inputs: ["expanded", "expanded"], outputs: ["opened", "opened", "closed", "closed", "expandedChange", "expandedChange"] }], ngImport: i0, template: "<div class=\"ang-cookie-permission-item--header\">\n <button\n matButton\n class=\"ang-cookie-permission-item--toggle\"\n angEventScope=\"toggle\"\n angTrackClick\n [attr.id]=\"toggleId\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"toggle()\"\n >\n <mat-icon class=\"ang-cookie-permission-item--toggle-icon\" [fontIcon]=\"expanded ? 'remove' : 'add'\" />\n <span class=\"ang-cookie-permission-item--title\">{{ info().title }}</span>\n </button>\n\n <mat-slide-toggle\n class=\"ang-cookie-permission-item--state\"\n angEventScope=\"state-toggle\"\n [aria-label]=\"stateLabel()\"\n [checked]=\"enabled()\"\n [disabled]=\"info().required ?? false\"\n (change)=\"enabled.set($event.checked)\"\n />\n</div>\n\n<p class=\"ang-cookie-permission-item--description\">{{ info().description }}</p>\n\n<div\n class=\"ang-cookie-permission-item--body\"\n [class.ang-cookie-permission-item--body-expanded]=\"expanded\"\n [attr.inert]=\"expanded ? null : ''\"\n>\n <div\n class=\"ang-cookie-permission-item--body-content\"\n angEventScope=\"providers\"\n role=\"region\"\n [attr.id]=\"bodyId\"\n [attr.aria-labelledby]=\"toggleId\"\n >\n <ang-providers-list [providers]=\"providers()\" />\n </div>\n</div>\n", styles: [":host{display:block}:host .ang-cookie-permission-item--header{display:flex;align-items:center;justify-content:space-between;height:48px;margin:0}:host .ang-cookie-permission-item--toggle{--mat-button-text-container-height: 48px;--mat-button-text-icon-spacing: 20px;--mat-button-text-label-text-color: var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));--mat-button-text-state-layer-color: var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));--mat-button-text-ripple-color: color-mix(in srgb, var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface)) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent);--mat-button-text-label-text-font: var(--ang-ang-cookie-modal-title-font, var(--mat-sys-title-small-font));--mat-button-text-label-text-size: var(--ang-ang-cookie-modal-title-size, var(--mat-sys-title-small-size));--mat-button-text-label-text-weight: var(--ang-ang-cookie-modal-title-weight, var(--mat-sys-title-small-weight));--mat-button-text-label-text-tracking: var(--ang-ang-cookie-modal-title-tracking, var(--mat-sys-title-small-tracking))}:host .ang-cookie-permission-item--toggle-icon{font-size:1.5rem;width:1.5rem;height:1.5rem}:host .ang-cookie-permission-item--description{margin:8px 0 16px;color:var(--ang-ang-cookie-modal-description-color, var(--mat-sys-on-surface-variant));font-family:var(--ang-ang-cookie-modal-description-font, var(--mat-sys-body-medium-font));font-size:var(--ang-ang-cookie-modal-description-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-ang-cookie-modal-description-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-ang-cookie-modal-description-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-ang-cookie-modal-description-tracking, var(--mat-sys-body-medium-tracking))}:host .ang-cookie-permission-item--body{display:grid;grid-template-rows:0fr;grid-template-columns:100%;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);overflow:hidden}:host .ang-cookie-permission-item--body-content{display:flex;flex-direction:column;min-height:0;visibility:hidden;transition:visibility .19s linear}:host .ang-cookie-permission-item--body-expanded{grid-template-rows:1fr}:host .ang-cookie-permission-item--body-expanded .ang-cookie-permission-item--body-content{visibility:visible}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSlideToggleModule }, { kind: "component", type: i4.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["name", "id", "labelPosition", "aria-label", "aria-labelledby", "aria-describedby", "required", "color", "disabled", "disableRipple", "tabIndex", "checked", "hideIcon", "disabledInteractive"], outputs: ["change", "toggleChange"], exportAs: ["matSlideToggle"] }, { kind: "component", type: ProviderList, selector: "ang-providers-list", inputs: ["providers"] }, { kind: "directive", type: EventScope, selector: "[angEventScope]", inputs: ["angEventScope"], exportAs: ["angEventScope"] }, { kind: "directive", type: TrackClick, selector: "[angTrackClick]", inputs: ["angTrackClick", "angTrackClickOptions", "angTrackClickOn", "angTrackClickDisabled"], exportAs: ["angTrackClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
105
+ }
106
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookiePermissionItem, decorators: [{
107
+ type: Component,
108
+ args: [{ selector: 'ang-cookie-permission-item', imports: [MatButtonModule, MatIconModule, MatSlideToggleModule, ProviderList, EventScope, TrackClick], changeDetection: ChangeDetectionStrategy.OnPush, host: {
109
+ class: 'ang-cookie-permission-item',
110
+ '[class.ang-cookie-permission-item--expanded]': 'expanded',
111
+ }, hostDirectives: [
112
+ {
113
+ directive: CdkAccordionItem,
114
+ inputs: ['expanded'],
115
+ outputs: ['opened', 'closed', 'expandedChange'],
116
+ },
117
+ ], template: "<div class=\"ang-cookie-permission-item--header\">\n <button\n matButton\n class=\"ang-cookie-permission-item--toggle\"\n angEventScope=\"toggle\"\n angTrackClick\n [attr.id]=\"toggleId\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"toggle()\"\n >\n <mat-icon class=\"ang-cookie-permission-item--toggle-icon\" [fontIcon]=\"expanded ? 'remove' : 'add'\" />\n <span class=\"ang-cookie-permission-item--title\">{{ info().title }}</span>\n </button>\n\n <mat-slide-toggle\n class=\"ang-cookie-permission-item--state\"\n angEventScope=\"state-toggle\"\n [aria-label]=\"stateLabel()\"\n [checked]=\"enabled()\"\n [disabled]=\"info().required ?? false\"\n (change)=\"enabled.set($event.checked)\"\n />\n</div>\n\n<p class=\"ang-cookie-permission-item--description\">{{ info().description }}</p>\n\n<div\n class=\"ang-cookie-permission-item--body\"\n [class.ang-cookie-permission-item--body-expanded]=\"expanded\"\n [attr.inert]=\"expanded ? null : ''\"\n>\n <div\n class=\"ang-cookie-permission-item--body-content\"\n angEventScope=\"providers\"\n role=\"region\"\n [attr.id]=\"bodyId\"\n [attr.aria-labelledby]=\"toggleId\"\n >\n <ang-providers-list [providers]=\"providers()\" />\n </div>\n</div>\n", styles: [":host{display:block}:host .ang-cookie-permission-item--header{display:flex;align-items:center;justify-content:space-between;height:48px;margin:0}:host .ang-cookie-permission-item--toggle{--mat-button-text-container-height: 48px;--mat-button-text-icon-spacing: 20px;--mat-button-text-label-text-color: var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));--mat-button-text-state-layer-color: var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface));--mat-button-text-ripple-color: color-mix(in srgb, var(--ang-ang-cookie-modal-title-color, var(--mat-sys-on-surface)) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent);--mat-button-text-label-text-font: var(--ang-ang-cookie-modal-title-font, var(--mat-sys-title-small-font));--mat-button-text-label-text-size: var(--ang-ang-cookie-modal-title-size, var(--mat-sys-title-small-size));--mat-button-text-label-text-weight: var(--ang-ang-cookie-modal-title-weight, var(--mat-sys-title-small-weight));--mat-button-text-label-text-tracking: var(--ang-ang-cookie-modal-title-tracking, var(--mat-sys-title-small-tracking))}:host .ang-cookie-permission-item--toggle-icon{font-size:1.5rem;width:1.5rem;height:1.5rem}:host .ang-cookie-permission-item--description{margin:8px 0 16px;color:var(--ang-ang-cookie-modal-description-color, var(--mat-sys-on-surface-variant));font-family:var(--ang-ang-cookie-modal-description-font, var(--mat-sys-body-medium-font));font-size:var(--ang-ang-cookie-modal-description-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-ang-cookie-modal-description-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-ang-cookie-modal-description-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-ang-cookie-modal-description-tracking, var(--mat-sys-body-medium-tracking))}:host .ang-cookie-permission-item--body{display:grid;grid-template-rows:0fr;grid-template-columns:100%;transition:grid-template-rows 225ms cubic-bezier(.4,0,.2,1);overflow:hidden}:host .ang-cookie-permission-item--body-content{display:flex;flex-direction:column;min-height:0;visibility:hidden;transition:visibility .19s linear}:host .ang-cookie-permission-item--body-expanded{grid-template-rows:1fr}:host .ang-cookie-permission-item--body-expanded .ang-cookie-permission-item--body-content{visibility:visible}\n"] }]
118
+ }], propDecorators: { info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: true }] }], enabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "enabled", required: true }] }, { type: i0.Output, args: ["enabledChange"] }], providers: [{ type: i0.Input, args: [{ isSignal: true, alias: "providers", required: false }] }] } });
119
+
120
+ /**
121
+ * Default cookie category descriptions shown in the permissions tab.
122
+ */
123
+ const DEFAULT_INFO = [
124
+ {
125
+ category: AnalyticsEventCategory.Necessary,
126
+ title: 'Necessary',
127
+ description: `Necessary cookies and similar technologies make websites
128
+ usable by enabling basic functions like page navigation.
129
+ The website cannot function properly without this feature.`,
130
+ required: true,
131
+ },
132
+ {
133
+ category: AnalyticsEventCategory.Preferences,
134
+ title: 'Preferences',
135
+ description: `Preference cookies remember your choices, like your preferred language or display settings.
136
+ They help the site behave in a way that matches your preferences.`,
137
+ },
138
+ {
139
+ category: AnalyticsEventCategory.Statistics,
140
+ title: 'Statistics',
141
+ description: `We use statistics cookies and similar technologies to collect aggregated,
142
+ anonymous data that help us understand traffic patterns, popular pages, and overall performance.
143
+ This information supports continuous improvements to our website.`,
144
+ },
145
+ {
146
+ category: AnalyticsEventCategory.Marketing,
147
+ title: 'Marketing',
148
+ description: `These cookies are used by third-party services, such as YouTube, to enable embedded video playback.
149
+ If these cookies are disabled, embedded videos will not play on this site.`,
150
+ },
151
+ ];
152
+ /**
153
+ * Displays the cookie permission categories and updates selected permission state.
154
+ */
155
+ class CookiePermissions {
156
+ /**
157
+ * Mutable cookie permission state shared with the parent modal.
158
+ */
159
+ permissions = model.required(...(ngDevMode ? [{ debugName: "permissions" }] : /* istanbul ignore next */ []));
160
+ /**
161
+ * Category metadata rendered as accordion items.
162
+ */
163
+ info = input(DEFAULT_INFO, ...(ngDevMode ? [{ debugName: "info" }] : /* istanbul ignore next */ []));
164
+ /**
165
+ * Providers grouped by cookie category.
166
+ */
167
+ providers = input({}, ...(ngDevMode ? [{ debugName: "providers" }] : /* istanbul ignore next */ []));
168
+ /**
169
+ * Updates a single cookie category permission in the current state.
170
+ *
171
+ * @param category The cookie category to update.
172
+ * @param value The new enabled state for the category.
173
+ */
174
+ updatePermissions(category, value) {
175
+ this.permissions.update((currentPermissions) => ({
176
+ ...currentPermissions,
177
+ [category]: value,
178
+ }));
179
+ }
180
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookiePermissions, deps: [], target: i0.ɵɵFactoryTarget.Component });
181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CookiePermissions, isStandalone: true, selector: "ang-cookie-permissions", inputs: { permissions: { classPropertyName: "permissions", publicName: "permissions", isSignal: true, isRequired: true, transformFunction: null }, info: { classPropertyName: "info", publicName: "info", isSignal: true, isRequired: false, transformFunction: null }, providers: { classPropertyName: "providers", publicName: "providers", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { permissions: "permissionsChange" }, host: { classAttribute: "ang-cookie-permissions" }, ngImport: i0, template: "<cdk-accordion class=\"ang-cookie-permissions--list\">\n @for (item of info(); track item.category) {\n <ang-cookie-permission-item\n [angEventScope]=\"item.category.toLowerCase()\"\n [info]=\"item\"\n [enabled]=\"permissions()[item.category]\"\n [providers]=\"providers()[item.category] ?? []\"\n (enabledChange)=\"updatePermissions(item.category, $event)\"\n />\n\n @if (!$last) {\n <mat-divider class=\"ang-cookie-permissions--divider\" />\n }\n }\n</cdk-accordion>\n", styles: [":host{display:block}:host .ang-cookie-permissions--list{display:flex;flex-direction:column;gap:16px}:host .ang-cookie-permissions--divider{--mat-divider-color: var(--ang-ang-cookie-modal-divider-color, var(--mat-sys-outline-variant))}\n"], dependencies: [{ kind: "ngmodule", type: CdkAccordionModule }, { kind: "directive", type: i1$1.CdkAccordion, selector: "cdk-accordion, [cdkAccordion]", inputs: ["multi"], exportAs: ["cdkAccordion"] }, { kind: "ngmodule", type: MatDividerModule }, { kind: "component", type: i2.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: CookiePermissionItem, selector: "ang-cookie-permission-item", inputs: ["info", "enabled", "providers"], outputs: ["enabledChange"] }, { kind: "directive", type: EventScope, selector: "[angEventScope]", inputs: ["angEventScope"], exportAs: ["angEventScope"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
182
+ }
183
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookiePermissions, decorators: [{
184
+ type: Component,
185
+ args: [{ selector: 'ang-cookie-permissions', imports: [CdkAccordionModule, MatDividerModule, CookiePermissionItem, EventScope], changeDetection: ChangeDetectionStrategy.OnPush, host: {
186
+ class: 'ang-cookie-permissions',
187
+ }, template: "<cdk-accordion class=\"ang-cookie-permissions--list\">\n @for (item of info(); track item.category) {\n <ang-cookie-permission-item\n [angEventScope]=\"item.category.toLowerCase()\"\n [info]=\"item\"\n [enabled]=\"permissions()[item.category]\"\n [providers]=\"providers()[item.category] ?? []\"\n (enabledChange)=\"updatePermissions(item.category, $event)\"\n />\n\n @if (!$last) {\n <mat-divider class=\"ang-cookie-permissions--divider\" />\n }\n }\n</cdk-accordion>\n", styles: [":host{display:block}:host .ang-cookie-permissions--list{display:flex;flex-direction:column;gap:16px}:host .ang-cookie-permissions--divider{--mat-divider-color: var(--ang-ang-cookie-modal-divider-color, var(--mat-sys-outline-variant))}\n"] }]
188
+ }], propDecorators: { permissions: [{ type: i0.Input, args: [{ isSignal: true, alias: "permissions", required: true }] }, { type: i0.Output, args: ["permissionsChange"] }], info: [{ type: i0.Input, args: [{ isSignal: true, alias: "info", required: false }] }], providers: [{ type: i0.Input, args: [{ isSignal: true, alias: "providers", required: false }] }] } });
189
+
190
+ /**
191
+ * Dialog component used to review and update cookie permissions.
192
+ */
193
+ class CookieModal {
194
+ /**
195
+ * Reference to the hosting material dialog.
196
+ */
197
+ dialogRef = inject(MatDialogRef);
198
+ /**
199
+ * Data passed to the dialog when it is opened.
200
+ */
201
+ data = inject(MAT_DIALOG_DATA);
202
+ /**
203
+ * Active tab index shown in the modal.
204
+ */
205
+ activeTab = signal(this.data.activeTab ?? 0, ...(ngDevMode ? [{ debugName: "activeTab" }] : /* istanbul ignore next */ []));
206
+ /**
207
+ * Mutable permission state edited in the modal.
208
+ */
209
+ permissions = signal(this.data.permissions, ...(ngDevMode ? [{ debugName: "permissions" }] : /* istanbul ignore next */ []));
210
+ /**
211
+ * Optional logo source rendered in the header.
212
+ */
213
+ logoSrc = this.data.logoSrc;
214
+ /**
215
+ * Accessible label for the optional logo.
216
+ */
217
+ logoLabel = this.data.logoLabel;
218
+ /**
219
+ * Providers grouped by category for the permissions view.
220
+ */
221
+ providers = this.data.providers ?? {};
222
+ /**
223
+ * Predefined permission state that enables every category.
224
+ */
225
+ allowAllPermissions = ALLOW_ALL_ANALYTICS_EVENT_CATEGORY_PERMISSIONS;
226
+ /**
227
+ * Predefined permission state that enables only required categories.
228
+ */
229
+ allowNecessaryPermissions = ALLOW_NECESSARY_ANALYTICS_EVENT_CATEGORY_PERMISSIONS;
230
+ /**
231
+ * Indicates whether the modal backdrop close action is disabled.
232
+ */
233
+ get disableClose() {
234
+ return this.dialogRef.disableClose ?? false;
235
+ }
236
+ /**
237
+ * Adds a custom panel class for cookie modal-specific dialog styling.
238
+ */
239
+ constructor() {
240
+ this.dialogRef.addPanelClass('ang-cookie-modal--panel');
241
+ }
242
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookieModal, deps: [], target: i0.ɵɵFactoryTarget.Component });
243
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: CookieModal, isStandalone: true, selector: "ang-cookie-modal", host: { classAttribute: "ang-cookie-modal" }, providers: [provideEventScope('cookie-modal')], ngImport: i0, template: "<div matDialogTitle class=\"ang-cookie-modal--header\" angEventScope=\"header\">\n <div class=\"ang-cookie-modal--logo\">\n @if (logoSrc) {\n <img [attr.src]=\"logoSrc\" [attr.alt]=\"logoLabel ?? 'Logo'\" />\n }\n </div>\n\n @if (!disableClose) {\n <button matIconButton matDialogClose angEventScope=\"close\" angTrackClick aria-label=\"Close cookie consent modal\">\n <mat-icon fontIcon=\"close\" />\n </button>\n }\n</div>\n\n<mat-divider />\n\n<mat-tab-group matDialogContent class=\"ang-cookie-modal--tabs\" angEventScope=\"tabs\" [(selectedIndex)]=\"activeTab\">\n <mat-tab label=\"Consent\" angEventScope=\"consent-tab\">\n <div class=\"ang-cookie-modal--content\">\n <p>This website uses cookies and similar technologies.</p>\n <p>\n We use anonymized statistics data insights to improve our website. Marketing cookies are needed to watch videos\n on this website.\n </p>\n </div>\n </mat-tab>\n\n <mat-tab label=\"Details\" angEventScope=\"details-tab\">\n <ang-cookie-permissions class=\"ang-cookie-modal--content\" [providers]=\"providers\" [(permissions)]=\"permissions\" />\n </mat-tab>\n</mat-tab-group>\n\n<mat-divider />\n\n<div matDialogActions class=\"ang-cookie-modal--actions\" angEventScope=\"actions\" align=\"center\">\n <button\n matButton=\"filled\"\n angEventScope=\"allow-necessary\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowNecessaryPermissions\"\n >\n Allow necessary only\n </button>\n\n @if (activeTab() === 0) {\n <button\n matButton=\"outlined\"\n angEventScope=\"customize\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n (click)=\"activeTab.set(1)\"\n >\n Customize\n </button>\n } @else {\n <button\n matButton=\"filled\"\n angEventScope=\"allow-selection\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"permissions()\"\n >\n Allow Selection\n </button>\n }\n\n <button\n matButton=\"filled\"\n angEventScope=\"allow-all\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowAllPermissions\"\n >\n Allow all\n </button>\n</div>\n", styles: [".ang-cookie-modal--panel{--mat-dialog-actions-padding: 16px 20px;--mat-dialog-container-color: var(--ang-ang-cookie-modal-container-color, var(--mat-sys-surface-bright));--mat-dialog-container-elevation-shadow: var(--ang-ang-cookie-modal-container-elevation-shadow, 0px 12px 32px 24px color-mix(in srgb, var(--mat-sys-tertiary) 24%, transparent));--mat-dialog-container-shape: var(--ang-ang-cookie-modal-container-shape, var(--mat-sys-corner-small));--mat-dialog-container-max-width: 748px;--mat-dialog-container-min-width: 320px;--mat-dialog-headline-padding: 16px 20px;--mat-dialog-with-actions-content-padding: 0}.ang-cookie-modal{display:flex;flex-direction:column;max-height:100vh}.ang-cookie-modal .ang-cookie-modal--header{display:flex;justify-content:space-between}.ang-cookie-modal .ang-cookie-modal--logo{height:40px}.ang-cookie-modal .ang-cookie-modal--tabs{--mat-tab-divider-color: var(--ang-ang-cookie-modal-divider-color, var(--mat-sys-outline-variant))}.ang-cookie-modal .ang-cookie-modal--content{margin:16px 24px}.ang-cookie-modal .ang-cookie-modal--actions{gap:12px}.ang-cookie-modal .ang-cookie-modal--actions-action{flex:1 1 200px;margin-left:0!important}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i2$1.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2$1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatTabsModule }, { kind: "component", type: i4$1.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass", "id"], exportAs: ["matTab"] }, { kind: "component", type: i4$1.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "mat-align-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: CookiePermissions, selector: "ang-cookie-permissions", inputs: ["permissions", "info", "providers"], outputs: ["permissionsChange"] }, { kind: "directive", type: EventScope, selector: "[angEventScope]", inputs: ["angEventScope"], exportAs: ["angEventScope"] }, { kind: "directive", type: TrackClick, selector: "[angTrackClick]", inputs: ["angTrackClick", "angTrackClickOptions", "angTrackClickOn", "angTrackClickDisabled"], exportAs: ["angTrackClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
244
+ }
245
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CookieModal, decorators: [{
246
+ type: Component,
247
+ args: [{ selector: 'ang-cookie-modal', imports: [
248
+ MatButtonModule,
249
+ MatDialogModule,
250
+ MatDivider,
251
+ MatIconModule,
252
+ MatTabsModule,
253
+ CookiePermissions,
254
+ EventScope,
255
+ TrackClick,
256
+ ], providers: [provideEventScope('cookie-modal')], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
257
+ class: 'ang-cookie-modal',
258
+ }, template: "<div matDialogTitle class=\"ang-cookie-modal--header\" angEventScope=\"header\">\n <div class=\"ang-cookie-modal--logo\">\n @if (logoSrc) {\n <img [attr.src]=\"logoSrc\" [attr.alt]=\"logoLabel ?? 'Logo'\" />\n }\n </div>\n\n @if (!disableClose) {\n <button matIconButton matDialogClose angEventScope=\"close\" angTrackClick aria-label=\"Close cookie consent modal\">\n <mat-icon fontIcon=\"close\" />\n </button>\n }\n</div>\n\n<mat-divider />\n\n<mat-tab-group matDialogContent class=\"ang-cookie-modal--tabs\" angEventScope=\"tabs\" [(selectedIndex)]=\"activeTab\">\n <mat-tab label=\"Consent\" angEventScope=\"consent-tab\">\n <div class=\"ang-cookie-modal--content\">\n <p>This website uses cookies and similar technologies.</p>\n <p>\n We use anonymized statistics data insights to improve our website. Marketing cookies are needed to watch videos\n on this website.\n </p>\n </div>\n </mat-tab>\n\n <mat-tab label=\"Details\" angEventScope=\"details-tab\">\n <ang-cookie-permissions class=\"ang-cookie-modal--content\" [providers]=\"providers\" [(permissions)]=\"permissions\" />\n </mat-tab>\n</mat-tab-group>\n\n<mat-divider />\n\n<div matDialogActions class=\"ang-cookie-modal--actions\" angEventScope=\"actions\" align=\"center\">\n <button\n matButton=\"filled\"\n angEventScope=\"allow-necessary\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowNecessaryPermissions\"\n >\n Allow necessary only\n </button>\n\n @if (activeTab() === 0) {\n <button\n matButton=\"outlined\"\n angEventScope=\"customize\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n (click)=\"activeTab.set(1)\"\n >\n Customize\n </button>\n } @else {\n <button\n matButton=\"filled\"\n angEventScope=\"allow-selection\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"permissions()\"\n >\n Allow Selection\n </button>\n }\n\n <button\n matButton=\"filled\"\n angEventScope=\"allow-all\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowAllPermissions\"\n >\n Allow all\n </button>\n</div>\n", styles: [".ang-cookie-modal--panel{--mat-dialog-actions-padding: 16px 20px;--mat-dialog-container-color: var(--ang-ang-cookie-modal-container-color, var(--mat-sys-surface-bright));--mat-dialog-container-elevation-shadow: var(--ang-ang-cookie-modal-container-elevation-shadow, 0px 12px 32px 24px color-mix(in srgb, var(--mat-sys-tertiary) 24%, transparent));--mat-dialog-container-shape: var(--ang-ang-cookie-modal-container-shape, var(--mat-sys-corner-small));--mat-dialog-container-max-width: 748px;--mat-dialog-container-min-width: 320px;--mat-dialog-headline-padding: 16px 20px;--mat-dialog-with-actions-content-padding: 0}.ang-cookie-modal{display:flex;flex-direction:column;max-height:100vh}.ang-cookie-modal .ang-cookie-modal--header{display:flex;justify-content:space-between}.ang-cookie-modal .ang-cookie-modal--logo{height:40px}.ang-cookie-modal .ang-cookie-modal--tabs{--mat-tab-divider-color: var(--ang-ang-cookie-modal-divider-color, var(--mat-sys-outline-variant))}.ang-cookie-modal .ang-cookie-modal--content{margin:16px 24px}.ang-cookie-modal .ang-cookie-modal--actions{gap:12px}.ang-cookie-modal .ang-cookie-modal--actions-action{flex:1 1 200px;margin-left:0!important}\n"] }]
259
+ }], ctorParameters: () => [] });
260
+
261
+ /**
262
+ * Generated bundle index. Do not edit.
263
+ */
264
+
265
+ export { CookieModal };
266
+ //# sourceMappingURL=atlasng-labs-cookie-modal.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlasng-labs-cookie-modal.mjs","sources":["../../../../libs/labs/cookie-modal/src/lib/provider-list/provider-list.ts","../../../../libs/labs/cookie-modal/src/lib/provider-list/provider-list.html","../../../../libs/labs/cookie-modal/src/lib/cookie-permission-item/cookie-permission-item.ts","../../../../libs/labs/cookie-modal/src/lib/cookie-permission-item/cookie-permission-item.html","../../../../libs/labs/cookie-modal/src/lib/cookie-permissions/cookie-permissions.ts","../../../../libs/labs/cookie-modal/src/lib/cookie-permissions/cookie-permissions.html","../../../../libs/labs/cookie-modal/src/lib/cookie-modal.ts","../../../../libs/labs/cookie-modal/src/lib/cookie-modal.html","../../../../libs/labs/cookie-modal/src/atlasng-labs-cookie-modal.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject, input } from '@angular/core';\nimport { MatIconModule } from '@angular/material/icon';\nimport { EventScope } from '@atlasng/analytics';\nimport { AnalyticsEventCategory } from '@atlasng/analytics/events';\nimport { AnyLink, IdGenerator } from '@atlasng/common';\nimport { TextLink } from '@atlasng/design-system/text-link';\n\n/**\n * Represents a single provider link shown in the cookie permissions list.\n */\nexport interface CookiePermissionProvider {\n /**\n * Human-readable provider label.\n */\n label: string;\n\n /**\n * Absolute or relative URL for the provider's privacy information.\n */\n href: string;\n}\n\n/**\n * Groups cookie permission providers by analytics event category.\n */\nexport type CookiePermissionProvidersByCategory = Partial<Record<AnalyticsEventCategory, CookiePermissionProvider[]>>;\n\n/**\n * Renders a list of cookie providers with links to their privacy details.\n */\n@Component({\n selector: 'ang-providers-list',\n imports: [MatIconModule, AnyLink, TextLink, EventScope],\n templateUrl: './provider-list.html',\n styleUrl: './provider-list.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ang-provider-list',\n '[class.ang-provider-list--empty]': 'providers().length === 0',\n },\n})\nexport class ProviderList {\n /**\n * Providers displayed in the list.\n */\n readonly providers = input<CookiePermissionProvider[]>([]);\n\n /**\n * Generates unique IDs for list item accessibility attributes.\n */\n protected readonly idGenerator = inject(IdGenerator);\n}\n","@for (provider of providers(); track $index) {\n @let id = idGenerator.getId('ang-providers-list');\n\n <div class=\"ang-provider-list--card\" [angEventScope]=\"provider.label.toLowerCase()\">\n <span class=\"ang-provider-list--label\" [attr.id]=\"id\">{{ provider.label }}</span>\n <a\n class=\"ang-provider-list--link\"\n angTextLink\n target=\"_blank\"\n [angAnyLink]=\"provider.href\"\n [attr.aria-labelledby]=\"id\"\n >\n <span>Learn more about this provider</span>\n <mat-icon fontIcon=\"open_in_new\" />\n </a>\n </div>\n} @empty {\n <div class=\"ang-provider-list--card\">\n <p class=\"ang-provider-list--empty-text\">We do not use cookies or technology of this type</p>\n </div>\n}\n","import { CdkAccordionItem } from '@angular/cdk/accordion';\nimport { ChangeDetectionStrategy, Component, computed, inject, input, model } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { EventScope, TrackClick } from '@atlasng/analytics';\nimport { AnalyticsEventCategory } from '@atlasng/analytics/events';\nimport { IdGenerator } from '@atlasng/common';\nimport { CookiePermissionProvider, ProviderList } from '../provider-list/provider-list';\n\n/**\n * UI metadata for a single cookie permission category.\n */\nexport interface CookiePermissionInfo {\n /**\n * Category key used to update analytics permissions.\n */\n readonly category: AnalyticsEventCategory;\n\n /**\n * Visible category title.\n */\n readonly title: string;\n\n /**\n * Category description shown in the accordion panel.\n */\n readonly description: string;\n\n /**\n * Marks the category as always enabled.\n */\n readonly required?: boolean;\n}\n\n/**\n * Renders a single cookie permission accordion item with toggle and provider links.\n */\n@Component({\n selector: 'ang-cookie-permission-item',\n imports: [MatButtonModule, MatIconModule, MatSlideToggleModule, ProviderList, EventScope, TrackClick],\n templateUrl: './cookie-permission-item.html',\n styleUrl: './cookie-permission-item.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ang-cookie-permission-item',\n '[class.ang-cookie-permission-item--expanded]': 'expanded',\n },\n hostDirectives: [\n {\n directive: CdkAccordionItem,\n inputs: ['expanded'],\n outputs: ['opened', 'closed', 'expandedChange'],\n },\n ],\n})\nexport class CookiePermissionItem {\n /**\n * Display metadata for this cookie category.\n */\n readonly info = input.required<CookiePermissionInfo>();\n\n /**\n * Two-way model for the category enabled state.\n */\n readonly enabled = model.required<boolean>();\n\n /**\n * Providers associated with the category.\n */\n readonly providers = input<CookiePermissionProvider[]>([]);\n\n /**\n * Unique id for the header toggle control.\n */\n protected readonly toggleId = inject(IdGenerator).getId('ang-cookie-permission-item--header-toggle');\n\n /**\n * Unique id for the expandable body region.\n */\n protected readonly bodyId = inject(IdGenerator).getId('ang-cookie-permission-item--body');\n\n /**\n * Accessible label for the current toggle action.\n */\n protected readonly stateLabel = computed(() => {\n return `${this.enabled() ? 'Disallow' : 'Allow'} ${this.info().title.toLowerCase()} cookies`;\n });\n\n /**\n * Indicates whether the accordion section is expanded.\n */\n protected get expanded(): boolean {\n return this.accordionItem.expanded;\n }\n\n /**\n * Host accordion item directive controlling expand/collapse behavior.\n */\n private readonly accordionItem = inject(CdkAccordionItem);\n\n /**\n * Opens this accordion item.\n */\n open(): void {\n this.accordionItem.open();\n }\n\n /**\n * Closes this accordion item.\n */\n close(): void {\n this.accordionItem.close();\n }\n\n /**\n * Toggles this accordion item between open and closed.\n */\n toggle(): void {\n this.accordionItem.toggle();\n }\n}\n","<div class=\"ang-cookie-permission-item--header\">\n <button\n matButton\n class=\"ang-cookie-permission-item--toggle\"\n angEventScope=\"toggle\"\n angTrackClick\n [attr.id]=\"toggleId\"\n [attr.aria-expanded]=\"expanded\"\n [attr.aria-controls]=\"bodyId\"\n (click)=\"toggle()\"\n >\n <mat-icon class=\"ang-cookie-permission-item--toggle-icon\" [fontIcon]=\"expanded ? 'remove' : 'add'\" />\n <span class=\"ang-cookie-permission-item--title\">{{ info().title }}</span>\n </button>\n\n <mat-slide-toggle\n class=\"ang-cookie-permission-item--state\"\n angEventScope=\"state-toggle\"\n [aria-label]=\"stateLabel()\"\n [checked]=\"enabled()\"\n [disabled]=\"info().required ?? false\"\n (change)=\"enabled.set($event.checked)\"\n />\n</div>\n\n<p class=\"ang-cookie-permission-item--description\">{{ info().description }}</p>\n\n<div\n class=\"ang-cookie-permission-item--body\"\n [class.ang-cookie-permission-item--body-expanded]=\"expanded\"\n [attr.inert]=\"expanded ? null : ''\"\n>\n <div\n class=\"ang-cookie-permission-item--body-content\"\n angEventScope=\"providers\"\n role=\"region\"\n [attr.id]=\"bodyId\"\n [attr.aria-labelledby]=\"toggleId\"\n >\n <ang-providers-list [providers]=\"providers()\" />\n </div>\n</div>\n","import { CdkAccordionModule } from '@angular/cdk/accordion';\nimport { ChangeDetectionStrategy, Component, input, model } from '@angular/core';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { EventScope } from '@atlasng/analytics';\nimport { AnalyticsEventCategory, AnalyticsEventCategoryPermissions } from '@atlasng/analytics/events';\nimport { CookiePermissionInfo, CookiePermissionItem } from '../cookie-permission-item/cookie-permission-item';\nimport { CookiePermissionProvidersByCategory } from '../provider-list/provider-list';\n\n/**\n * Default cookie category descriptions shown in the permissions tab.\n */\nconst DEFAULT_INFO: CookiePermissionInfo[] = [\n {\n category: AnalyticsEventCategory.Necessary,\n title: 'Necessary',\n description: `Necessary cookies and similar technologies make websites\n usable by enabling basic functions like page navigation.\n The website cannot function properly without this feature.`,\n required: true,\n },\n {\n category: AnalyticsEventCategory.Preferences,\n title: 'Preferences',\n description: `Preference cookies remember your choices, like your preferred language or display settings.\n They help the site behave in a way that matches your preferences.`,\n },\n {\n category: AnalyticsEventCategory.Statistics,\n title: 'Statistics',\n description: `We use statistics cookies and similar technologies to collect aggregated,\n anonymous data that help us understand traffic patterns, popular pages, and overall performance.\n This information supports continuous improvements to our website.`,\n },\n {\n category: AnalyticsEventCategory.Marketing,\n title: 'Marketing',\n description: `These cookies are used by third-party services, such as YouTube, to enable embedded video playback.\n If these cookies are disabled, embedded videos will not play on this site.`,\n },\n];\n\n/**\n * Displays the cookie permission categories and updates selected permission state.\n */\n@Component({\n selector: 'ang-cookie-permissions',\n imports: [CdkAccordionModule, MatDividerModule, CookiePermissionItem, EventScope],\n templateUrl: './cookie-permissions.html',\n styleUrl: './cookie-permissions.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'ang-cookie-permissions',\n },\n})\nexport class CookiePermissions {\n /**\n * Mutable cookie permission state shared with the parent modal.\n */\n readonly permissions = model.required<AnalyticsEventCategoryPermissions>();\n\n /**\n * Category metadata rendered as accordion items.\n */\n readonly info = input(DEFAULT_INFO);\n\n /**\n * Providers grouped by cookie category.\n */\n readonly providers = input<CookiePermissionProvidersByCategory>({});\n\n /**\n * Updates a single cookie category permission in the current state.\n *\n * @param category The cookie category to update.\n * @param value The new enabled state for the category.\n */\n protected updatePermissions(category: AnalyticsEventCategory, value: boolean): void {\n this.permissions.update((currentPermissions) => ({\n ...currentPermissions,\n [category]: value,\n }));\n }\n}\n","<cdk-accordion class=\"ang-cookie-permissions--list\">\n @for (item of info(); track item.category) {\n <ang-cookie-permission-item\n [angEventScope]=\"item.category.toLowerCase()\"\n [info]=\"item\"\n [enabled]=\"permissions()[item.category]\"\n [providers]=\"providers()[item.category] ?? []\"\n (enabledChange)=\"updatePermissions(item.category, $event)\"\n />\n\n @if (!$last) {\n <mat-divider class=\"ang-cookie-permissions--divider\" />\n }\n }\n</cdk-accordion>\n","import { ChangeDetectionStrategy, Component, inject, signal, ViewEncapsulation } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\nimport { MatDivider } from '@angular/material/divider';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { EventScope, provideEventScope, TrackClick } from '@atlasng/analytics';\nimport {\n ALLOW_ALL_ANALYTICS_EVENT_CATEGORY_PERMISSIONS,\n ALLOW_NECESSARY_ANALYTICS_EVENT_CATEGORY_PERMISSIONS,\n AnalyticsEventCategoryPermissions,\n} from '@atlasng/analytics/events';\nimport { CookiePermissions } from './cookie-permissions/cookie-permissions';\nimport { CookiePermissionProvidersByCategory } from './provider-list/provider-list';\n\n/**\n * Input data required to initialize the cookie modal dialog.\n */\nexport interface CookieModalData {\n /**\n * Tab index that should be active when the modal opens.\n */\n activeTab?: number;\n\n /**\n * Initial analytics permissions.\n */\n permissions: AnalyticsEventCategoryPermissions;\n\n /**\n * Optional logo image source.\n */\n logoSrc?: string;\n\n /**\n * Accessible label for the optional logo.\n */\n logoLabel?: string;\n\n /**\n * Optional providers grouped by category for display in the details tab.\n */\n providers?: CookiePermissionProvidersByCategory;\n}\n\n/**\n * Result returned when the cookie modal closes.\n */\nexport type CookieModalResult = AnalyticsEventCategoryPermissions | undefined;\n\n/**\n * Dialog component used to review and update cookie permissions.\n */\n@Component({\n selector: 'ang-cookie-modal',\n imports: [\n MatButtonModule,\n MatDialogModule,\n MatDivider,\n MatIconModule,\n MatTabsModule,\n CookiePermissions,\n EventScope,\n TrackClick,\n ],\n templateUrl: './cookie-modal.html',\n styleUrl: './cookie-modal.scss',\n providers: [provideEventScope('cookie-modal')],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n class: 'ang-cookie-modal',\n },\n})\nexport class CookieModal {\n /**\n * Reference to the hosting material dialog.\n */\n private readonly dialogRef = inject(MatDialogRef);\n\n /**\n * Data passed to the dialog when it is opened.\n */\n private readonly data = inject<CookieModalData>(MAT_DIALOG_DATA);\n\n /**\n * Active tab index shown in the modal.\n */\n protected readonly activeTab = signal(this.data.activeTab ?? 0);\n\n /**\n * Mutable permission state edited in the modal.\n */\n protected readonly permissions = signal(this.data.permissions);\n\n /**\n * Optional logo source rendered in the header.\n */\n protected readonly logoSrc = this.data.logoSrc;\n\n /**\n * Accessible label for the optional logo.\n */\n protected readonly logoLabel = this.data.logoLabel;\n\n /**\n * Providers grouped by category for the permissions view.\n */\n protected readonly providers = this.data.providers ?? {};\n\n /**\n * Predefined permission state that enables every category.\n */\n protected readonly allowAllPermissions = ALLOW_ALL_ANALYTICS_EVENT_CATEGORY_PERMISSIONS;\n\n /**\n * Predefined permission state that enables only required categories.\n */\n protected readonly allowNecessaryPermissions = ALLOW_NECESSARY_ANALYTICS_EVENT_CATEGORY_PERMISSIONS;\n\n /**\n * Indicates whether the modal backdrop close action is disabled.\n */\n protected get disableClose(): boolean {\n return this.dialogRef.disableClose ?? false;\n }\n\n /**\n * Adds a custom panel class for cookie modal-specific dialog styling.\n */\n constructor() {\n this.dialogRef.addPanelClass('ang-cookie-modal--panel');\n }\n}\n","<div matDialogTitle class=\"ang-cookie-modal--header\" angEventScope=\"header\">\n <div class=\"ang-cookie-modal--logo\">\n @if (logoSrc) {\n <img [attr.src]=\"logoSrc\" [attr.alt]=\"logoLabel ?? 'Logo'\" />\n }\n </div>\n\n @if (!disableClose) {\n <button matIconButton matDialogClose angEventScope=\"close\" angTrackClick aria-label=\"Close cookie consent modal\">\n <mat-icon fontIcon=\"close\" />\n </button>\n }\n</div>\n\n<mat-divider />\n\n<mat-tab-group matDialogContent class=\"ang-cookie-modal--tabs\" angEventScope=\"tabs\" [(selectedIndex)]=\"activeTab\">\n <mat-tab label=\"Consent\" angEventScope=\"consent-tab\">\n <div class=\"ang-cookie-modal--content\">\n <p>This website uses cookies and similar technologies.</p>\n <p>\n We use anonymized statistics data insights to improve our website. Marketing cookies are needed to watch videos\n on this website.\n </p>\n </div>\n </mat-tab>\n\n <mat-tab label=\"Details\" angEventScope=\"details-tab\">\n <ang-cookie-permissions class=\"ang-cookie-modal--content\" [providers]=\"providers\" [(permissions)]=\"permissions\" />\n </mat-tab>\n</mat-tab-group>\n\n<mat-divider />\n\n<div matDialogActions class=\"ang-cookie-modal--actions\" angEventScope=\"actions\" align=\"center\">\n <button\n matButton=\"filled\"\n angEventScope=\"allow-necessary\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowNecessaryPermissions\"\n >\n Allow necessary only\n </button>\n\n @if (activeTab() === 0) {\n <button\n matButton=\"outlined\"\n angEventScope=\"customize\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n (click)=\"activeTab.set(1)\"\n >\n Customize\n </button>\n } @else {\n <button\n matButton=\"filled\"\n angEventScope=\"allow-selection\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"permissions()\"\n >\n Allow Selection\n </button>\n }\n\n <button\n matButton=\"filled\"\n angEventScope=\"allow-all\"\n angTrackClick\n class=\"ang-cookie-modal--actions-action\"\n [matDialogClose]=\"allowAllPermissions\"\n >\n Allow all\n </button>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;;;;;;;;;;;;;;AA2BA;;AAEG;MAYU,YAAY,CAAA;AACvB;;AAEG;AACM,IAAA,SAAS,GAAG,KAAK,CAA6B,EAAE,gFAAC;AAE1D;;AAEG;AACgB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;uGATzC,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,gCAAA,EAAA,0BAAA,EAAA,EAAA,cAAA,EAAA,mBAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECzCzB,6uBAqBA,EAAA,MAAA,EAAA,CAAA,+8CAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,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from '@angular/core';
3
+ import { YouTubePlayer } from '@angular/youtube-player';
4
+
5
+ class YoutubePlayer {
6
+ /** The ID of the YouTube video to play*/
7
+ videoId = input.required(...(ngDevMode ? [{ debugName: "videoId" }] : /* istanbul ignore next */ []));
8
+ /** Label for the video used in accessibility text */
9
+ label = input.required(...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
10
+ /** Whether marketing cookies are enabled */
11
+ hasCookiesEnabled = input(false, ...(ngDevMode ? [{ debugName: "hasCookiesEnabled" }] : /* istanbul ignore next */ []));
12
+ /** Emits when the user enables cookies */
13
+ enableCookies = output();
14
+ /** ViewChild reference to the YouTube player for programmatic control */
15
+ player = viewChild('player', ...(ngDevMode ? [{ debugName: "player" }] : /* istanbul ignore next */ []));
16
+ /** Computed thumbnail URL */
17
+ thumbnailUrl = computed(() => `https://img.youtube.com/vi/${this.videoId()}/sddefault.jpg`, ...(ngDevMode ? [{ debugName: "thumbnailUrl" }] : /* istanbul ignore next */ []));
18
+ /** YouTube video URL */
19
+ videoUrl = computed(() => `https://www.youtube.com/watch?v=${this.videoId()}`, ...(ngDevMode ? [{ debugName: "videoUrl" }] : /* istanbul ignore next */ []));
20
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: YoutubePlayer, deps: [], target: i0.ɵɵFactoryTarget.Component });
21
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.7", type: YoutubePlayer, isStandalone: true, selector: "ang-youtube-player", inputs: { videoId: { classPropertyName: "videoId", publicName: "videoId", isSignal: true, isRequired: true, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: true, transformFunction: null }, hasCookiesEnabled: { classPropertyName: "hasCookiesEnabled", publicName: "hasCookiesEnabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { enableCookies: "enableCookies" }, viewQueries: [{ propertyName: "player", first: true, predicate: ["player"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (hasCookiesEnabled()) {\n <youtube-player [videoId]=\"videoId()\" [playerVars]=\"{ rel: 0, showinfo: 0 }\" [disableCookies]=\"true\" #player />\n} @else {\n <div class=\"youtube-thumbnail-container\">\n <a target=\"_blank\" rel=\"noopener noreferrer\" [attr.href]=\"videoUrl()\">\n <img class=\"thumbnail-image\" [attr.src]=\"thumbnailUrl()\" [attr.alt]=\"`YouTube video thumbnail for ${label()}`\" />\n </a>\n <div class=\"enable-cookies-message\">\n <button class=\"enable-cookies-button\" (click)=\"enableCookies.emit()\">Enable cookies</button>\n to watch videos\n </div>\n </div>\n}\n", styles: [":host{display:block;position:relative}:host youtube-player{display:block}:host ::ng-deep youtube-player youtube-player-placeholder,:host ::ng-deep youtube-player iframe{width:100%!important;aspect-ratio:16/9!important;height:unset!important}:host .thumbnail-image{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block}:host .enable-cookies-message,:host .enable-cookies-button{font-family:var(--ang-youtube-player-enable-cookies-font-family, var(--mat-sys-body-medium-font));font-size:var(--ang-youtube-player-enable-cookies-font-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-youtube-player-enable-cookies-font-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-youtube-player-enable-cookies-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-youtube-player-enable-cookies-tracking, var(--mat-sys-body-medium-tracking));color:var(--ang-youtube-player-enable-cookies-color, var(--mat-sys-on-surface-variant))}:host .enable-cookies-message{margin-top:.5rem}:host .enable-cookies-button{font-weight:600;background:none;border:none;padding:0;cursor:pointer;text-decoration:underline}\n"], dependencies: [{ kind: "component", type: YouTubePlayer, selector: "youtube-player", inputs: ["videoId", "height", "width", "startSeconds", "endSeconds", "suggestedQuality", "playerVars", "disableCookies", "loadApi", "disablePlaceholder", "showBeforeIframeApiLoads", "placeholderButtonLabel", "placeholderImageQuality"], outputs: ["ready", "stateChange", "error", "apiChange", "playbackQualityChange", "playbackRateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: YoutubePlayer, decorators: [{
24
+ type: Component,
25
+ args: [{ selector: 'ang-youtube-player', imports: [YouTubePlayer], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (hasCookiesEnabled()) {\n <youtube-player [videoId]=\"videoId()\" [playerVars]=\"{ rel: 0, showinfo: 0 }\" [disableCookies]=\"true\" #player />\n} @else {\n <div class=\"youtube-thumbnail-container\">\n <a target=\"_blank\" rel=\"noopener noreferrer\" [attr.href]=\"videoUrl()\">\n <img class=\"thumbnail-image\" [attr.src]=\"thumbnailUrl()\" [attr.alt]=\"`YouTube video thumbnail for ${label()}`\" />\n </a>\n <div class=\"enable-cookies-message\">\n <button class=\"enable-cookies-button\" (click)=\"enableCookies.emit()\">Enable cookies</button>\n to watch videos\n </div>\n </div>\n}\n", styles: [":host{display:block;position:relative}:host youtube-player{display:block}:host ::ng-deep youtube-player youtube-player-placeholder,:host ::ng-deep youtube-player iframe{width:100%!important;aspect-ratio:16/9!important;height:unset!important}:host .thumbnail-image{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block}:host .enable-cookies-message,:host .enable-cookies-button{font-family:var(--ang-youtube-player-enable-cookies-font-family, var(--mat-sys-body-medium-font));font-size:var(--ang-youtube-player-enable-cookies-font-size, var(--mat-sys-body-medium-size));font-weight:var(--ang-youtube-player-enable-cookies-font-weight, var(--mat-sys-body-medium-weight));line-height:var(--ang-youtube-player-enable-cookies-line-height, var(--mat-sys-body-medium-line-height));letter-spacing:var(--ang-youtube-player-enable-cookies-tracking, var(--mat-sys-body-medium-tracking));color:var(--ang-youtube-player-enable-cookies-color, var(--mat-sys-on-surface-variant))}:host .enable-cookies-message{margin-top:.5rem}:host .enable-cookies-button{font-weight:600;background:none;border:none;padding:0;cursor:pointer;text-decoration:underline}\n"] }]
26
+ }], propDecorators: { videoId: [{ type: i0.Input, args: [{ isSignal: true, alias: "videoId", required: true }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: true }] }], hasCookiesEnabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasCookiesEnabled", required: false }] }], enableCookies: [{ type: i0.Output, args: ["enableCookies"] }], player: [{ type: i0.ViewChild, args: ['player', { isSignal: true }] }] } });
27
+
28
+ /**
29
+ * Generated bundle index. Do not edit.
30
+ */
31
+
32
+ export { YoutubePlayer };
33
+ //# sourceMappingURL=atlasng-labs-youtube-player.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlasng-labs-youtube-player.mjs","sources":["../../../../libs/labs/youtube-player/src/lib/youtube-player.ts","../../../../libs/labs/youtube-player/src/lib/youtube-player.html","../../../../libs/labs/youtube-player/src/atlasng-labs-youtube-player.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output, viewChild } from '@angular/core';\nimport { YouTubePlayer as Youtube } from '@angular/youtube-player';\n\n@Component({\n selector: 'ang-youtube-player',\n imports: [Youtube],\n templateUrl: './youtube-player.html',\n styleUrl: './youtube-player.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class YoutubePlayer {\n /** The ID of the YouTube video to play*/\n readonly videoId = input.required<string>();\n\n /** Label for the video used in accessibility text */\n readonly label = input.required<string>();\n\n /** Whether marketing cookies are enabled */\n readonly hasCookiesEnabled = input(false);\n\n /** Emits when the user enables cookies */\n readonly enableCookies = output();\n\n /** ViewChild reference to the YouTube player for programmatic control */\n readonly player = viewChild<Youtube>('player');\n\n /** Computed thumbnail URL */\n protected readonly thumbnailUrl = computed(() => `https://img.youtube.com/vi/${this.videoId()}/sddefault.jpg`);\n\n /** YouTube video URL */\n protected readonly videoUrl = computed(() => `https://www.youtube.com/watch?v=${this.videoId()}`);\n}\n","@if (hasCookiesEnabled()) {\n <youtube-player [videoId]=\"videoId()\" [playerVars]=\"{ rel: 0, showinfo: 0 }\" [disableCookies]=\"true\" #player />\n} @else {\n <div class=\"youtube-thumbnail-container\">\n <a target=\"_blank\" rel=\"noopener noreferrer\" [attr.href]=\"videoUrl()\">\n <img class=\"thumbnail-image\" [attr.src]=\"thumbnailUrl()\" [attr.alt]=\"`YouTube video thumbnail for ${label()}`\" />\n </a>\n <div class=\"enable-cookies-message\">\n <button class=\"enable-cookies-button\" (click)=\"enableCookies.emit()\">Enable cookies</button>\n to watch videos\n </div>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Youtube"],"mappings":";;;;MAUa,aAAa,CAAA;;AAEf,IAAA,OAAO,GAAG,KAAK,CAAC,QAAQ,6EAAU;;AAGlC,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAU;;AAGhC,IAAA,iBAAiB,GAAG,KAAK,CAAC,KAAK,wFAAC;;IAGhC,aAAa,GAAG,MAAM,EAAE;;AAGxB,IAAA,MAAM,GAAG,SAAS,CAAU,QAAQ,6EAAC;;AAG3B,IAAA,YAAY,GAAG,QAAQ,CAAC,MAAM,CAAA,2BAAA,EAA8B,IAAI,CAAC,OAAO,EAAE,CAAA,cAAA,CAAgB,mFAAC;;AAG3F,IAAA,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAA,gCAAA,EAAmC,IAAI,CAAC,OAAO,EAAE,CAAA,CAAE,+EAAC;uGApBtF,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAb,aAAa,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,EAAA,OAAA,EAAA,EAAA,iBAAA,EAAA,SAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,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gBV,QAAQ,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExB/C;;AAEG;;;;"}
@@ -0,0 +1,6 @@
1
+ var index = {};
2
+
3
+ /**
4
+ * Generated bundle index. Do not edit.
5
+ */
6
+ //# sourceMappingURL=atlasng-labs.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atlasng-labs.mjs","sources":["../../../../libs/labs/src/index.ts","../../../../libs/labs/src/atlasng-labs.ts"],"sourcesContent":["export default {};\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":"AAAA,YAAe,EAAE;;ACAjB;;AAEG"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@atlasng/labs",
3
+ "version": "0.0.2",
4
+ "sideEffects": false,
5
+ "exports": {
6
+ ".": {
7
+ "sass": "./sass/_index.scss",
8
+ "types": "./types/atlasng-labs.d.ts",
9
+ "default": "./fesm2022/atlasng-labs.mjs"
10
+ },
11
+ "./package.json": {
12
+ "default": "./package.json"
13
+ },
14
+ "./cookie-modal": {
15
+ "types": "./types/atlasng-labs-cookie-modal.d.ts",
16
+ "default": "./fesm2022/atlasng-labs-cookie-modal.mjs"
17
+ },
18
+ "./youtube-player": {
19
+ "types": "./types/atlasng-labs-youtube-player.d.ts",
20
+ "default": "./fesm2022/atlasng-labs-youtube-player.mjs"
21
+ }
22
+ },
23
+ "peerDependencies": {
24
+ "@angular/cdk": "^21.2.6",
25
+ "@angular/core": "^21.2.6",
26
+ "@angular/material": "^21.2.6",
27
+ "@angular/youtube-player": "^21.2.6",
28
+ "@atlasng/analytics": "0.0.2",
29
+ "@atlasng/common": "0.0.2",
30
+ "@atlasng/design-system": "0.0.2"
31
+ },
32
+ "module": "fesm2022/atlasng-labs.mjs",
33
+ "typings": "types/atlasng-labs.d.ts",
34
+ "type": "module",
35
+ "dependencies": {
36
+ "tslib": "^2.3.0"
37
+ }
38
+ }
@@ -0,0 +1,2 @@
1
+ @forward '../../cookie-modal/src/lib/tokens' as cookie-modal-* show cookie-modal-overrides;
2
+ @forward '../../youtube-player/src/lib/tokens' as youtube-player-* show youtube-player-overrides;
@@ -0,0 +1,150 @@
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+ @use 'sass:meta';
4
+
5
+ $_breakpoint-min: 0px;
6
+ $_breakpoint-max: 1000000px;
7
+ $_breakpoint-keywords: ('boundary');
8
+ $_breakpoint-boundary-modes: ('open', 'open-start', 'open-end', 'closed');
9
+
10
+ $breakpoints: (
11
+ x-small: (
12
+ $_breakpoint-min,
13
+ 599.98px,
14
+ ),
15
+ small: (
16
+ 600px,
17
+ 959.98px,
18
+ ),
19
+ medium: (
20
+ 960px,
21
+ 1279.98px,
22
+ ),
23
+ large: (
24
+ 1280px,
25
+ 1919.98px,
26
+ ),
27
+ x-large: (
28
+ 1920px,
29
+ $_breakpoint-max,
30
+ ),
31
+ );
32
+
33
+ // Create a media query for the given breakpoint(s) and boundary mode (default: 'closed').
34
+ @mixin breakpoint($breakpoint, $args...) {
35
+ $keywords: meta.keywords($args);
36
+ $invalid-keywords: map.remove($keywords, $_breakpoint-keywords...);
37
+ $breakpoint-keys: list.join(($breakpoint), $args);
38
+ $boundary-mode: map.get($keywords, 'boundary') or 'closed';
39
+
40
+ @if list.length($invalid-keywords) != 0 {
41
+ @error 'Invalid keyword arguments: #{map.keys($invalid-keywords)}.';
42
+ }
43
+
44
+ @if not list.index($_breakpoint-boundary-modes, $boundary-mode) {
45
+ @error 'Invalid boundary mode: #{$boundary-mode}. Valid boundary modes are: #{$_breakpoint-boundary-modes}.';
46
+ }
47
+
48
+ @each $key in $breakpoint-keys {
49
+ @if not map.has-key($breakpoints, $key) {
50
+ @error 'Invalid breakpoint: #{$key}. Valid breakpoints are: #{map.keys($breakpoints)}.';
51
+ }
52
+ }
53
+
54
+ $ranges: _select-ranges($breakpoint-keys);
55
+ $ranges: _merge-adjacent-ranges($ranges);
56
+ $ranges: _trim-boundaries($ranges, $boundary-mode);
57
+ $queries: ();
58
+ @each $range in $ranges {
59
+ $queries: list.append($queries, _range-to-query($range), $separator: comma);
60
+ }
61
+
62
+ @if list.length($queries) != 0 {
63
+ @media #{$queries} {
64
+ @content;
65
+ }
66
+ } @else {
67
+ @warn 'Breakpoints cover the entire range of possible widths. This is likely a mistake, please check the specified breakpoints and boundary mode.';
68
+ @content;
69
+ }
70
+ }
71
+
72
+ @function _select-ranges($keys) {
73
+ $ranges: ();
74
+ @each $key, $range in $breakpoints {
75
+ @if list.index($keys, $key) {
76
+ $ranges: list.append($ranges, $range);
77
+ }
78
+ }
79
+
80
+ @return $ranges;
81
+ }
82
+
83
+ @function _merge-adjacent-ranges($ranges, $tolerance: 1px) {
84
+ $merged: ();
85
+ $current: null;
86
+ @each $range in $ranges {
87
+ @if $current == null {
88
+ $current: $range;
89
+ } @else {
90
+ $currentMax: list.nth($current, 2);
91
+ $min: list.nth($range, 1);
92
+ $max: list.nth($range, 2);
93
+ $diff: $min - $currentMax;
94
+
95
+ @if $diff <= $tolerance {
96
+ $current: list.set-nth($current, 2, $max);
97
+ } @else {
98
+ $merged: list.append($merged, $current);
99
+ $current: $range;
100
+ }
101
+ }
102
+ }
103
+
104
+ @if $current != null {
105
+ $merged: list.append($merged, $current);
106
+ }
107
+
108
+ @return $merged;
109
+ }
110
+
111
+ @function _trim-boundaries($ranges, $boundary-mode) {
112
+ $length: list.length($ranges);
113
+ $first: list.nth($ranges, 1);
114
+ $last: list.nth($ranges, $length);
115
+
116
+ @if list.index(('open', 'open-start'), $boundary-mode) or list.nth($first, 1) == $_breakpoint-min {
117
+ $first: list.set-nth($first, 1, null);
118
+ }
119
+
120
+ @if list.index(('open', 'open-end'), $boundary-mode) or list.nth($last, 2) == $_breakpoint-max {
121
+ $last: list.set-nth($last, 2, null);
122
+ }
123
+
124
+ @if $length == 1 {
125
+ $min: list.nth($first, 1);
126
+ $max: list.nth($last, 2);
127
+ @if $min == null and $max == null {
128
+ @return ();
129
+ }
130
+
131
+ @return list.append((), ($min, $max));
132
+ }
133
+
134
+ $ranges: list.set-nth($ranges, 1, $first);
135
+ $ranges: list.set-nth($ranges, $length, $last);
136
+ @return $ranges;
137
+ }
138
+
139
+ @function _range-to-query($range) {
140
+ $min: list.nth($range, 1);
141
+ $max: list.nth($range, 2);
142
+
143
+ @if $min == null {
144
+ @return '(max-width: #{$max})';
145
+ } @else if $max == null {
146
+ @return '(min-width: #{$min})';
147
+ } @else {
148
+ @return '(min-width: #{$min}) and (max-width: #{$max})';
149
+ }
150
+ }
@@ -0,0 +1,45 @@
1
+ @use 'sass:meta';
2
+ @use 'sass:string';
3
+
4
+ // Apply style to current selector if exists, otherwise apply to root (html)
5
+ @mixin current-selector-or-root($root: html) {
6
+ @if & {
7
+ @content;
8
+ } @else {
9
+ #{$root} {
10
+ @content;
11
+ }
12
+ }
13
+ }
14
+
15
+ // Checks if a value is a CSS variable name, e.g. --mat-sys-primary
16
+ @function is-css-var-name($value) {
17
+ @return meta.type-of($value) == string and string.index($value, '--') == 1;
18
+ }
19
+
20
+ // Creates a CSS variable with an optional fallback,
21
+ // e.g. create-var(--mat-sys-primary, #fff) => var(--mat-sys-primary, #fff)
22
+ @function create-var($name, $fallback: null) {
23
+ @if ($fallback) {
24
+ @return var($name, $fallback);
25
+ } @else {
26
+ @return var($name);
27
+ }
28
+ }
29
+
30
+ // Creates a color with opacity,
31
+ // e.g. color-with-opacity(--mat-sys-primary, 50%) => color-mix(in srgb, var(--mat-sys-primary) 50%, transparent)
32
+ @function color-with-opacity($color, $opacity) {
33
+ @if (is-css-var-name($color)) {
34
+ $color: var($color);
35
+ }
36
+
37
+ @if (is-css-var-name($opacity)) {
38
+ $opacity: 'calc(var(#{$opacity}) * 100%)';
39
+ } @else if (meta.type-of($opacity) == number and $opacity < 1) {
40
+ @warn 'Opacity value #{$opacity} is less than 1. Prefer using a percentage (e.g. "50%").';
41
+ $opacity: '#{$opacity * 100}%';
42
+ }
43
+
44
+ @return color-mix(in srgb, #{$color} #{$opacity}, transparent);
45
+ }
@@ -0,0 +1,59 @@
1
+ @use 'sass:map';
2
+ @use 'sass:meta';
3
+ @use './sass-utils';
4
+
5
+ // Returns an angular material system token as a CSS variable name, e.g. sys-token(primary) => --mat-sys-primary
6
+ @function sys-token($token) {
7
+ // TODO: Validate token exists in angular material tokens
8
+ @return --mat-sys-#{$token};
9
+ }
10
+
11
+ // Returns an angular material system token as a CSS variable,
12
+ // e.g. sys-slot(primary) => var(--mat-sys-primary)
13
+ @function sys-slot($token, $fallback: null) {
14
+ @return sass-utils.create-var(sys-token($token), $fallback);
15
+ }
16
+
17
+ // Returns a CSS variable name for a given token and namespace,
18
+ // e.g. token(primary, button) => --atlasng-button-primary
19
+ @function token($token, $namespace-or-config) {
20
+ $namespace: $namespace-or-config;
21
+ @if meta.type-of($namespace-or-config) == 'map' {
22
+ $namespace: map.get($namespace-or-config, namespace);
23
+ }
24
+
25
+ @return --ang-#{$namespace}-#{$token};
26
+ }
27
+
28
+ // Returns a CSS variable for a given token and namespace,
29
+ // e.g. slot(primary, button) => var(--atlasng-button-primary, var(--mat-sys-primary))
30
+ @function slot($token, $tokens-config, $fallback: null) {
31
+ $tokens: map.get($tokens-config, tokens);
32
+ @if not map.has-key($tokens, $token) {
33
+ @error "Token '#{$token}' does not exist. Configured tokens are: #{map.keys($tokens)}";
34
+ }
35
+
36
+ $sys-fallback: map.get($tokens, $token);
37
+ @if (sass-utils.is-css-var-name($sys-fallback)) {
38
+ $sys-fallback: sass-utils.create-var($sys-fallback, $fallback);
39
+ }
40
+
41
+ @return sass-utils.create-var(token($token, $tokens-config), $sys-fallback);
42
+ }
43
+
44
+ // Mixin to apply a map of token overrides as CSS variables to the current selector.
45
+ @mixin apply-overrides($overrides, $tokens-config) {
46
+ $tokens: map.get($tokens-config, tokens);
47
+
48
+ @include sass-utils.current-selector-or-root() {
49
+ @each $token, $value in $overrides {
50
+ @if not map.has-key($tokens, $token) {
51
+ @error "Token '#{$token}' does not exist. Configured tokens are: #{map.keys($tokens)}";
52
+ }
53
+
54
+ @if $value != null {
55
+ #{token($token, $tokens-config)}: #{$value};
56
+ }
57
+ }
58
+ }
59
+ }
@@ -0,0 +1,106 @@
1
+ import * as _atlasng_labs_cookie_modal from '@atlasng/labs/cookie-modal';
2
+ import * as _atlasng_analytics_events from '@atlasng/analytics/events';
3
+ import { AnalyticsEventCategory, AnalyticsEventCategoryPermissions } from '@atlasng/analytics/events';
4
+ import * as i0 from '@angular/core';
5
+
6
+ /**
7
+ * Represents a single provider link shown in the cookie permissions list.
8
+ */
9
+ interface CookiePermissionProvider {
10
+ /**
11
+ * Human-readable provider label.
12
+ */
13
+ label: string;
14
+ /**
15
+ * Absolute or relative URL for the provider's privacy information.
16
+ */
17
+ href: string;
18
+ }
19
+ /**
20
+ * Groups cookie permission providers by analytics event category.
21
+ */
22
+ type CookiePermissionProvidersByCategory = Partial<Record<AnalyticsEventCategory, CookiePermissionProvider[]>>;
23
+
24
+ /**
25
+ * Input data required to initialize the cookie modal dialog.
26
+ */
27
+ interface CookieModalData {
28
+ /**
29
+ * Tab index that should be active when the modal opens.
30
+ */
31
+ activeTab?: number;
32
+ /**
33
+ * Initial analytics permissions.
34
+ */
35
+ permissions: AnalyticsEventCategoryPermissions;
36
+ /**
37
+ * Optional logo image source.
38
+ */
39
+ logoSrc?: string;
40
+ /**
41
+ * Accessible label for the optional logo.
42
+ */
43
+ logoLabel?: string;
44
+ /**
45
+ * Optional providers grouped by category for display in the details tab.
46
+ */
47
+ providers?: CookiePermissionProvidersByCategory;
48
+ }
49
+ /**
50
+ * Result returned when the cookie modal closes.
51
+ */
52
+ type CookieModalResult = AnalyticsEventCategoryPermissions | undefined;
53
+ /**
54
+ * Dialog component used to review and update cookie permissions.
55
+ */
56
+ declare class CookieModal {
57
+ /**
58
+ * Reference to the hosting material dialog.
59
+ */
60
+ private readonly dialogRef;
61
+ /**
62
+ * Data passed to the dialog when it is opened.
63
+ */
64
+ private readonly data;
65
+ /**
66
+ * Active tab index shown in the modal.
67
+ */
68
+ protected readonly activeTab: i0.WritableSignal<number>;
69
+ /**
70
+ * Mutable permission state edited in the modal.
71
+ */
72
+ protected readonly permissions: i0.WritableSignal<AnalyticsEventCategoryPermissions>;
73
+ /**
74
+ * Optional logo source rendered in the header.
75
+ */
76
+ protected readonly logoSrc: string | undefined;
77
+ /**
78
+ * Accessible label for the optional logo.
79
+ */
80
+ protected readonly logoLabel: string | undefined;
81
+ /**
82
+ * Providers grouped by category for the permissions view.
83
+ */
84
+ protected readonly providers: Partial<Record<_atlasng_analytics_events.AnalyticsEventCategory, _atlasng_labs_cookie_modal.CookiePermissionProvider[]>>;
85
+ /**
86
+ * Predefined permission state that enables every category.
87
+ */
88
+ protected readonly allowAllPermissions: AnalyticsEventCategoryPermissions;
89
+ /**
90
+ * Predefined permission state that enables only required categories.
91
+ */
92
+ protected readonly allowNecessaryPermissions: AnalyticsEventCategoryPermissions;
93
+ /**
94
+ * Indicates whether the modal backdrop close action is disabled.
95
+ */
96
+ protected get disableClose(): boolean;
97
+ /**
98
+ * Adds a custom panel class for cookie modal-specific dialog styling.
99
+ */
100
+ constructor();
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<CookieModal, never>;
102
+ static ɵcmp: i0.ɵɵComponentDeclaration<CookieModal, "ang-cookie-modal", never, {}, {}, never, never, true, never>;
103
+ }
104
+
105
+ export { CookieModal };
106
+ export type { CookieModalData, CookieModalResult, CookiePermissionProvider, CookiePermissionProvidersByCategory };
@@ -0,0 +1,23 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { YouTubePlayer } from '@angular/youtube-player';
3
+
4
+ declare class YoutubePlayer {
5
+ /** The ID of the YouTube video to play*/
6
+ readonly videoId: _angular_core.InputSignal<string>;
7
+ /** Label for the video used in accessibility text */
8
+ readonly label: _angular_core.InputSignal<string>;
9
+ /** Whether marketing cookies are enabled */
10
+ readonly hasCookiesEnabled: _angular_core.InputSignal<boolean>;
11
+ /** Emits when the user enables cookies */
12
+ readonly enableCookies: _angular_core.OutputEmitterRef<void>;
13
+ /** ViewChild reference to the YouTube player for programmatic control */
14
+ readonly player: _angular_core.Signal<YouTubePlayer | undefined>;
15
+ /** Computed thumbnail URL */
16
+ protected readonly thumbnailUrl: _angular_core.Signal<string>;
17
+ /** YouTube video URL */
18
+ protected readonly videoUrl: _angular_core.Signal<string>;
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<YoutubePlayer, never>;
20
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<YoutubePlayer, "ang-youtube-player", never, { "videoId": { "alias": "videoId"; "required": true; "isSignal": true; }; "label": { "alias": "label"; "required": true; "isSignal": true; }; "hasCookiesEnabled": { "alias": "hasCookiesEnabled"; "required": false; "isSignal": true; }; }, { "enableCookies": "enableCookies"; }, never, never, true, never>;
21
+ }
22
+
23
+ export { YoutubePlayer };
@@ -0,0 +1,2 @@
1
+
2
+ export { };
@@ -0,0 +1,17 @@
1
+ @use 'internal/token-utils';
2
+
3
+ $config: (
4
+ namespace: 'youtube-player',
5
+ tokens: (
6
+ enable-cookies-color: token-utils.sys-token(on-surface-variant),
7
+ enable-cookies-font-family: token-utils.sys-token(body-medium-font),
8
+ enable-cookies-font-size: token-utils.sys-token(body-medium-size),
9
+ enable-cookies-font-weight: token-utils.sys-token(body-medium-weight),
10
+ enable-cookies-line-height: token-utils.sys-token(body-medium-line-height),
11
+ enable-cookies-tracking: token-utils.sys-token(body-medium-tracking),
12
+ ),
13
+ );
14
+
15
+ @mixin overrides($overrides) {
16
+ @include token-utils.apply-overrides($overrides, $config);
17
+ }