Skip to content

[PASO 2.15] Add CookiesModule (EXTENDED #20) — core@0.16.0#39

Merged
mfg1986 merged 6 commits into
developfrom
feature/PASO-2.15_cookies-module
May 26, 2026
Merged

[PASO 2.15] Add CookiesModule (EXTENDED #20) — core@0.16.0#39
mfg1986 merged 6 commits into
developfrom
feature/PASO-2.15_cookies-module

Conversation

@mfg1986
Copy link
Copy Markdown
Contributor

@mfg1986 mfg1986 commented May 26, 2026

Summary

  • Add CookiesModule (EXTENDED [PASO 2.5] Add tenant-theming module to framework-core #20) with GDPR cookie consent management
  • provideCookies(options?) factory with configurable consent, categories, and cookie attributes
  • CookieService — typed CRUD (get, set, delete, getAll) with consent enforcement
  • CookieConsentService — signal-based reactive consent management (acceptAll, rejectAll, updatePreferences, isCategoryAllowed)
  • FfCookieConsentDirective — structural directive *ffCookieConsent="'category'" for conditional rendering
  • Version bump 0.15.0 → 0.16.0

STEPs

STEP Description
STEP-2.15-001 Types, interfaces and config token (cookie.types.ts)
STEP-2.15-002 CookieConsentService + 24 tests
STEP-2.15-003 CookieService + 34 tests
STEP-2.15-004 FfCookieConsentDirective + 7 tests
STEP-2.15-005 provideCookies() + barrel exports + build
STEP-2.15-006 Version bump + CHANGELOG

Test plan

  • CI passes (build + 897 tests, 64 suites)
  • Logs clean (no warnings beyond .npmrc NODE_AUTH_TOKEN)
  • New exports accessible: provideCookies, CookieService, CookieConsentService, FfCookieConsentDirective, COOKIE_CONFIG

mfg1986 added 6 commits May 26, 2026 20:51
Define public contracts for EXTENDED module #20 (cookies):
- CookieCategory type (essential/analytics/preferences + extensible)
- CookieOptions interface (per-cookie set options with GDPR category)
- ConsentPreferences interface (category consent map, essential always true)
- CookieModuleOptions interface (provideCookies input)
- CookieConfig interface (resolved config with defaults)
- COOKIE_CONFIG InjectionToken
Implement signal-based consent service with 6 public methods:
- consentGiven() / preferences() as reactive Signal reads
- acceptAll() / rejectAll() / updatePreferences() for mutations
- isCategoryAllowed() returns computed Signal per category

Persists preferences in dedicated cookie (ff_cookie_consent) via
direct document.cookie access (no CookieService dependency — D4).
24 tests covering all methods, persistence and edge cases.
…ment

Implement CookieService with get/set/delete/getAll methods wrapping
document.cookie. Optionally injects CookieConsentService to enforce
GDPR consent before writing non-essential cookies. 34 tests covering
basic operations, consent enforcement, and consent-disabled mode.
Implement *ffCookieConsent structural directive that conditionally
renders content based on GDPR cookie consent for a given category.
Reactive to consent changes via Angular signals and effect(). First
standalone structural directive in the framework. 7 tests covering
initial render, reactive updates, category switching, and essential.
… re-export

Create provideCookies(options?) provider factory with conditional
CookieConsentService registration. Add cookies/index.ts barrel
exporting 10 public symbols. Re-export from src/index.ts.
- Version bump 0.15.0 → 0.16.0 in package.json
- Add CHANGELOG entry for 0.16.0 documenting CookiesModule (EXTENDED #20)
- Update compare links for [Unreleased] and [0.16.0]
@mfg1986 mfg1986 changed the title feat(core): add CookiesModule (EXTENDED #20) — core@0.16.0 [PASO 2.15] Add CookiesModule (EXTENDED #20) — core@0.16.0 May 26, 2026
@mfg1986 mfg1986 merged commit 4ee2a34 into develop May 26, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant