ngx-cookie-service 19.0.0 → 19.1.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.
|
@@ -1,13 +1,12 @@
|
|
|
1
|
+
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
3
|
import { PLATFORM_ID, Injectable, Inject } from '@angular/core';
|
|
3
|
-
import { isPlatformBrowser, DOCUMENT } from '@angular/common';
|
|
4
4
|
|
|
5
5
|
// This service is based on the `ng2-cookies` package which sadly is not a service and does
|
|
6
6
|
// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.
|
|
7
7
|
// Package: https://github.com/BCJTI/ng2-cookies
|
|
8
8
|
class CookieService {
|
|
9
|
-
constructor(document,
|
|
10
|
-
// Get the `PLATFORM_ID` so we can check if we're in a browser.
|
|
9
|
+
constructor(document, // Get the `PLATFORM_ID` so we can check if we're in a browser.
|
|
11
10
|
platformId) {
|
|
12
11
|
this.document = document;
|
|
13
12
|
this.platformId = platformId;
|
|
@@ -27,11 +26,11 @@ class CookieService {
|
|
|
27
26
|
return new RegExp('(?:^' + escapedName + '|;\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');
|
|
28
27
|
}
|
|
29
28
|
/**
|
|
30
|
-
* Gets the
|
|
29
|
+
* Gets the decoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
31
30
|
*
|
|
32
31
|
* @param encodedURIComponent A value representing an encoded URI component.
|
|
33
32
|
*
|
|
34
|
-
* @returns The
|
|
33
|
+
* @returns The decoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
35
34
|
*
|
|
36
35
|
* @author: Stepan Suvorov
|
|
37
36
|
* @since: 1.0.0
|
|
@@ -72,11 +71,11 @@ class CookieService {
|
|
|
72
71
|
* @since: 1.0.0
|
|
73
72
|
*/
|
|
74
73
|
get(name) {
|
|
75
|
-
if (this.
|
|
74
|
+
if (this.check(name)) {
|
|
76
75
|
name = encodeURIComponent(name);
|
|
77
76
|
const regExp = CookieService.getCookieRegExp(name);
|
|
78
77
|
const result = regExp.exec(this.document.cookie);
|
|
79
|
-
return result[1] ? CookieService.safeDecodeURIComponent(result[1]) : '';
|
|
78
|
+
return result && result[1] ? CookieService.safeDecodeURIComponent(result[1]) : '';
|
|
80
79
|
}
|
|
81
80
|
else {
|
|
82
81
|
return '';
|
|
@@ -155,7 +154,7 @@ class CookieService {
|
|
|
155
154
|
this.document.cookie = cookieString;
|
|
156
155
|
}
|
|
157
156
|
/**
|
|
158
|
-
* Delete cookie by name
|
|
157
|
+
* Delete cookie by name at given path and domain. If not path is not specified, cookie at '/' path will be deleted.
|
|
159
158
|
*
|
|
160
159
|
* @param name Cookie name
|
|
161
160
|
* @param path Cookie path
|
|
@@ -174,7 +173,7 @@ class CookieService {
|
|
|
174
173
|
this.set(name, '', { expires: expiresDate, path, domain, secure, sameSite });
|
|
175
174
|
}
|
|
176
175
|
/**
|
|
177
|
-
* Delete all cookies
|
|
176
|
+
* Delete all cookies at given path and domain. If not path is not specified, all cookies at '/' path will be deleted.
|
|
178
177
|
*
|
|
179
178
|
* @param path Cookie path
|
|
180
179
|
* @param domain Cookie domain
|
|
@@ -195,10 +194,10 @@ class CookieService {
|
|
|
195
194
|
}
|
|
196
195
|
}
|
|
197
196
|
}
|
|
198
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
|
199
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.
|
|
197
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CookieService, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
198
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CookieService, providedIn: 'root' }); }
|
|
200
199
|
}
|
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: CookieService, decorators: [{
|
|
202
201
|
type: Injectable,
|
|
203
202
|
args: [{
|
|
204
203
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-cookie-service.mjs","sources":["../../../projects/ngx-cookie-service/src/lib/cookie.service.ts","../../../projects/ngx-cookie-service/src/public-api.ts","../../../projects/ngx-cookie-service/src/ngx-cookie-service.ts"],"sourcesContent":["// This service is based on the `ng2-cookies` package which sadly is not a service and does\n// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.\n// Package: https://github.com/BCJTI/ng2-cookies\n\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\n\nexport type SameSite = 'Lax' | 'None' | 'Strict';\n\nexport interface CookieOptions {\n expires?: number | Date;\n path?: string;\n domain?: string;\n secure?: boolean;\n sameSite?: SameSite;\n partitioned?: boolean;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CookieService {\n private readonly documentIsAccessible: boolean;\n\n constructor(\n @Inject(DOCUMENT) private document: Document,\n // Get the `PLATFORM_ID` so we can check if we're in a browser.\n @Inject(PLATFORM_ID) private platformId\n ) {\n this.documentIsAccessible = isPlatformBrowser(this.platformId);\n }\n\n /**\n * Get cookie Regular Expression\n *\n * @param name Cookie name\n * @returns property RegExp\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n private static getCookieRegExp(name: string): RegExp {\n const escapedName: string = name.replace(/([\\[\\]{}()|=;+?,.*^$])/gi, '\\\\$1');\n\n return new RegExp('(?:^' + escapedName + '|;\\\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');\n }\n\n /**\n * Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).\n *\n * @param encodedURIComponent A value representing an encoded URI component.\n *\n * @returns The unencoded version of an encoded component of a Uniform Resource Identifier (URI).\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n private static safeDecodeURIComponent(encodedURIComponent: string): string {\n try {\n return decodeURIComponent(encodedURIComponent);\n } catch {\n // probably it is not uri encoded. return as is\n return encodedURIComponent;\n }\n }\n\n /**\n * Return `true` if {@link Document} is accessible, otherwise return `false`\n *\n * @param name Cookie name\n * @returns boolean - whether cookie with specified name exists\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n check(name: string): boolean {\n if (!this.documentIsAccessible) {\n return false;\n }\n name = encodeURIComponent(name);\n const regExp: RegExp = CookieService.getCookieRegExp(name);\n return regExp.test(this.document.cookie);\n }\n\n /**\n * Get cookies by name\n *\n * @param name Cookie name\n * @returns property value\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n get(name: string): string {\n if (this.documentIsAccessible && this.check(name)) {\n name = encodeURIComponent(name);\n\n const regExp: RegExp = CookieService.getCookieRegExp(name);\n const result: RegExpExecArray = regExp.exec(this.document.cookie);\n\n return result[1] ? CookieService.safeDecodeURIComponent(result[1]) : '';\n } else {\n return '';\n }\n }\n\n /**\n * Get all cookies in JSON format\n *\n * @returns all the cookies in json\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n getAll(): { [key: string]: string } {\n if (!this.documentIsAccessible) {\n return {};\n }\n\n const cookies: { [key: string]: string } = {};\n const document: any = this.document;\n\n if (document.cookie && document.cookie !== '') {\n document.cookie.split(';').forEach((currentCookie) => {\n const [cookieName, cookieValue] = currentCookie.split('=');\n cookies[CookieService.safeDecodeURIComponent(cookieName.replace(/^ /, ''))] = CookieService.safeDecodeURIComponent(cookieValue);\n });\n }\n\n return cookies;\n }\n\n /**\n * Set cookie based on provided information\n *\n * @param name Cookie name\n * @param value Cookie value\n * @param expires Number of days until the cookies expires or an actual `Date`\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Secure flag\n * @param partitioned Partitioned flag\n * @param sameSite OWASP same site token `Lax`, `None`, or `Strict`. Defaults to `Lax`\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n set(\n name: string,\n value: string,\n expires?: CookieOptions['expires'],\n path?: CookieOptions['path'],\n domain?: CookieOptions['domain'],\n secure?: CookieOptions['secure'],\n sameSite?: SameSite,\n partitioned?: CookieOptions['partitioned']\n ): void;\n\n /**\n * Set cookie based on provided information\n *\n * Cookie's parameters:\n * <pre>\n * expires Number of days until the cookies expires or an actual `Date`\n * path Cookie path\n * domain Cookie domain\n * secure flag\n * sameSite OWASP same site token `Lax`, `None`, or `Strict`. Defaults to `Lax`\n * </pre>\n *\n * @param name Cookie name\n * @param value Cookie value\n * @param options Body with cookie's params\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n set(name: string, value: string, options?: CookieOptions): void;\n\n set(\n name: string,\n value: string,\n expiresOrOptions?: CookieOptions['expires'] | CookieOptions,\n path?: CookieOptions['path'],\n domain?: CookieOptions['domain'],\n secure?: CookieOptions['secure'],\n sameSite?: SameSite,\n partitioned?: CookieOptions['partitioned']\n ): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n if (typeof expiresOrOptions === 'number' || expiresOrOptions instanceof Date || path || domain || secure || sameSite) {\n const optionsBody = {\n expires: expiresOrOptions as CookieOptions['expires'],\n path,\n domain,\n secure,\n sameSite: sameSite ? sameSite : 'Lax',\n partitioned,\n };\n\n this.set(name, value, optionsBody);\n return;\n }\n\n let cookieString: string = encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';\n\n const options = expiresOrOptions ? expiresOrOptions : {};\n\n if (options.expires) {\n if (typeof options.expires === 'number') {\n const dateExpires: Date = new Date(new Date().getTime() + options.expires * 1000 * 60 * 60 * 24);\n\n cookieString += 'expires=' + dateExpires.toUTCString() + ';';\n } else {\n cookieString += 'expires=' + options.expires.toUTCString() + ';';\n }\n }\n\n if (options.path) {\n cookieString += 'path=' + options.path + ';';\n }\n\n if (options.domain) {\n cookieString += 'domain=' + options.domain + ';';\n }\n\n if (options.secure === false && options.sameSite === 'None') {\n options.secure = true;\n console.warn(\n `[ngx-cookie-service] Cookie ${name} was forced with secure flag because sameSite=None.` +\n `More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`\n );\n }\n if (options.secure) {\n cookieString += 'secure;';\n }\n\n if (!options.sameSite) {\n options.sameSite = 'Lax';\n }\n\n cookieString += 'sameSite=' + options.sameSite + ';';\n\n if (options.partitioned) {\n cookieString += 'Partitioned;';\n }\n\n this.document.cookie = cookieString;\n }\n\n /**\n * Delete cookie by name\n *\n * @param name Cookie name\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Cookie secure flag\n * @param sameSite Cookie sameSite flag - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n delete(name: string, path?: CookieOptions['path'], domain?: CookieOptions['domain'], secure?: CookieOptions['secure'], sameSite: SameSite = 'Lax'): void {\n if (!this.documentIsAccessible) {\n return;\n }\n const expiresDate = new Date('Thu, 01 Jan 1970 00:00:01 GMT');\n this.set(name, '', { expires: expiresDate, path, domain, secure, sameSite });\n }\n\n /**\n * Delete all cookies\n *\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Is the Cookie secure\n * @param sameSite Is the cookie same site\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n deleteAll(path?: CookieOptions['path'], domain?: CookieOptions['domain'], secure?: CookieOptions['secure'], sameSite: SameSite = 'Lax'): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n const cookies: any = this.getAll();\n\n for (const cookieName in cookies) {\n if (cookies.hasOwnProperty(cookieName)) {\n this.delete(cookieName, path, domain, secure, sameSite);\n }\n }\n }\n}\n","/*\n * Public API Surface of ngx-cookie-service\n */\n\nexport * from './lib/cookie.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],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D,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAId,QAAQ,EAAA,EAAA,EAAA,KAAA,EAER,WAAW,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AANV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAKI,MAAM;2BAAC,QAAQ;;0BAEf,MAAM;2BAAC,WAAW;;;AC3BvB;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-cookie-service.mjs","sources":["../../../projects/ngx-cookie-service/src/lib/cookie.service.ts","../../../projects/ngx-cookie-service/src/public-api.ts","../../../projects/ngx-cookie-service/src/ngx-cookie-service.ts"],"sourcesContent":["// This service is based on the `ng2-cookies` package which sadly is not a service and does\n// not use `DOCUMENT` injection and therefore doesn't work well with AoT production builds.\n// Package: https://github.com/BCJTI/ng2-cookies\n\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Inject, Injectable, PLATFORM_ID } from '@angular/core';\n\nexport type SameSite = 'Lax' | 'None' | 'Strict';\n\nexport interface CookieOptions {\n expires?: number | Date;\n path?: string;\n domain?: string;\n secure?: boolean;\n sameSite?: SameSite;\n partitioned?: boolean;\n}\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CookieService {\n private readonly documentIsAccessible: boolean;\n\n constructor(\n @Inject(DOCUMENT) private document: Document, // Get the `PLATFORM_ID` so we can check if we're in a browser.\n @Inject(PLATFORM_ID) private platformId: object\n ) {\n this.documentIsAccessible = isPlatformBrowser(this.platformId);\n }\n\n /**\n * Get cookie Regular Expression\n *\n * @param name Cookie name\n * @returns property RegExp\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n private static getCookieRegExp(name: string): RegExp {\n const escapedName: string = name.replace(/([\\[\\]{}()|=;+?,.*^$])/gi, '\\\\$1');\n\n return new RegExp('(?:^' + escapedName + '|;\\\\s*' + escapedName + ')=(.*?)(?:;|$)', 'g');\n }\n\n /**\n * Gets the decoded version of an encoded component of a Uniform Resource Identifier (URI).\n *\n * @param encodedURIComponent A value representing an encoded URI component.\n *\n * @returns The decoded version of an encoded component of a Uniform Resource Identifier (URI).\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n private static safeDecodeURIComponent(encodedURIComponent: string): string {\n try {\n return decodeURIComponent(encodedURIComponent);\n } catch {\n // probably it is not uri encoded. return as is\n return encodedURIComponent;\n }\n }\n\n /**\n * Return `true` if {@link Document} is accessible, otherwise return `false`\n *\n * @param name Cookie name\n * @returns boolean - whether cookie with specified name exists\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n check(name: string): boolean {\n if (!this.documentIsAccessible) {\n return false;\n }\n name = encodeURIComponent(name);\n const regExp = CookieService.getCookieRegExp(name);\n return regExp.test(this.document.cookie);\n }\n\n /**\n * Get cookies by name\n *\n * @param name Cookie name\n * @returns property value\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n get(name: string): string {\n if (this.check(name)) {\n name = encodeURIComponent(name);\n const regExp: RegExp = CookieService.getCookieRegExp(name);\n const result = regExp.exec(this.document.cookie);\n return result && result[1] ? CookieService.safeDecodeURIComponent(result[1]) : '';\n } else {\n return '';\n }\n }\n\n /**\n * Get all cookies in JSON format\n *\n * @returns all the cookies in json\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n getAll(): { [key: string]: string } {\n if (!this.documentIsAccessible) {\n return {};\n }\n\n const cookies: { [key: string]: string } = {};\n const document: any = this.document;\n\n if (document.cookie && document.cookie !== '') {\n document.cookie.split(';').forEach((currentCookie: string) => {\n const [cookieName, cookieValue] = currentCookie.split('=');\n cookies[CookieService.safeDecodeURIComponent(cookieName.replace(/^ /, ''))] = CookieService.safeDecodeURIComponent(cookieValue);\n });\n }\n\n return cookies;\n }\n\n /**\n * Set cookie based on provided information\n *\n * @param name Cookie name\n * @param value Cookie value\n * @param expires Number of days until the cookies expires or an actual `Date`\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Secure flag\n * @param partitioned Partitioned flag\n * @param sameSite OWASP same site token `Lax`, `None`, or `Strict`. Defaults to `Lax`\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n set(\n name: string,\n value: string,\n expires?: CookieOptions['expires'],\n path?: CookieOptions['path'],\n domain?: CookieOptions['domain'],\n secure?: CookieOptions['secure'],\n sameSite?: SameSite,\n partitioned?: CookieOptions['partitioned']\n ): void;\n\n /**\n * Set cookie based on provided information\n *\n * Cookie's parameters:\n * <pre>\n * expires Number of days until the cookies expires or an actual `Date`\n * path Cookie path\n * domain Cookie domain\n * secure flag\n * sameSite OWASP same site token `Lax`, `None`, or `Strict`. Defaults to `Lax`\n * </pre>\n *\n * @param name Cookie name\n * @param value Cookie value\n * @param options Body with cookie's params\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n set(name: string, value: string, options?: CookieOptions): void;\n\n set(\n name: string,\n value: string,\n expiresOrOptions?: CookieOptions['expires'] | CookieOptions,\n path?: CookieOptions['path'],\n domain?: CookieOptions['domain'],\n secure?: CookieOptions['secure'],\n sameSite?: SameSite,\n partitioned?: CookieOptions['partitioned']\n ): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n if (typeof expiresOrOptions === 'number' || expiresOrOptions instanceof Date || path || domain || secure || sameSite) {\n const optionsBody = {\n expires: expiresOrOptions as CookieOptions['expires'],\n path,\n domain,\n secure,\n sameSite: sameSite ? sameSite : 'Lax',\n partitioned,\n };\n\n this.set(name, value, optionsBody);\n return;\n }\n\n let cookieString: string = encodeURIComponent(name) + '=' + encodeURIComponent(value) + ';';\n\n const options = expiresOrOptions ? expiresOrOptions : {};\n\n if (options.expires) {\n if (typeof options.expires === 'number') {\n const dateExpires: Date = new Date(new Date().getTime() + options.expires * 1000 * 60 * 60 * 24);\n\n cookieString += 'expires=' + dateExpires.toUTCString() + ';';\n } else {\n cookieString += 'expires=' + options.expires.toUTCString() + ';';\n }\n }\n\n if (options.path) {\n cookieString += 'path=' + options.path + ';';\n }\n\n if (options.domain) {\n cookieString += 'domain=' + options.domain + ';';\n }\n\n if (options.secure === false && options.sameSite === 'None') {\n options.secure = true;\n console.warn(\n `[ngx-cookie-service] Cookie ${name} was forced with secure flag because sameSite=None.` +\n `More details : https://github.com/stevermeister/ngx-cookie-service/issues/86#issuecomment-597720130`\n );\n }\n if (options.secure) {\n cookieString += 'secure;';\n }\n\n if (!options.sameSite) {\n options.sameSite = 'Lax';\n }\n\n cookieString += 'sameSite=' + options.sameSite + ';';\n\n if (options.partitioned) {\n cookieString += 'Partitioned;';\n }\n\n this.document.cookie = cookieString;\n }\n\n /**\n * Delete cookie by name at given path and domain. If not path is not specified, cookie at '/' path will be deleted.\n *\n * @param name Cookie name\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Cookie secure flag\n * @param sameSite Cookie sameSite flag - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n delete(name: string, path?: CookieOptions['path'], domain?: CookieOptions['domain'], secure?: CookieOptions['secure'], sameSite: SameSite = 'Lax'): void {\n if (!this.documentIsAccessible) {\n return;\n }\n const expiresDate = new Date('Thu, 01 Jan 1970 00:00:01 GMT');\n this.set(name, '', { expires: expiresDate, path, domain, secure, sameSite });\n }\n\n /**\n * Delete all cookies at given path and domain. If not path is not specified, all cookies at '/' path will be deleted.\n *\n * @param path Cookie path\n * @param domain Cookie domain\n * @param secure Is the Cookie secure\n * @param sameSite Is the cookie same site\n *\n * @author: Stepan Suvorov\n * @since: 1.0.0\n */\n deleteAll(path?: CookieOptions['path'], domain?: CookieOptions['domain'], secure?: CookieOptions['secure'], sameSite: SameSite = 'Lax'): void {\n if (!this.documentIsAccessible) {\n return;\n }\n\n const cookies: any = this.getAll();\n\n for (const cookieName in cookies) {\n if (cookies.hasOwnProperty(cookieName)) {\n this.delete(cookieName, path, domain, secure, sameSite);\n }\n }\n }\n}\n","/*\n * Public API Surface of ngx-cookie-service\n */\n\nexport * from './lib/cookie.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAAA;AACA;AACA;MAmBa,aAAa,CAAA;IAGxB,WAC4B,CAAA,QAAkB;IACf,UAAkB,EAAA;QADrB,IAAQ,CAAA,QAAA,GAAR,QAAQ;QACL,IAAU,CAAA,UAAA,GAAV,UAAU;QAEvC,IAAI,CAAC,oBAAoB,GAAG,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC;;AAGhE;;;;;;;;AAQG;IACK,OAAO,eAAe,CAAC,IAAY,EAAA;QACzC,MAAM,WAAW,GAAW,IAAI,CAAC,OAAO,CAAC,0BAA0B,EAAE,MAAM,CAAC;AAE5E,QAAA,OAAO,IAAI,MAAM,CAAC,MAAM,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,gBAAgB,EAAE,GAAG,CAAC;;AAG1F;;;;;;;;;AASG;IACK,OAAO,sBAAsB,CAAC,mBAA2B,EAAA;AAC/D,QAAA,IAAI;AACF,YAAA,OAAO,kBAAkB,CAAC,mBAAmB,CAAC;;AAC9C,QAAA,MAAM;;AAEN,YAAA,OAAO,mBAAmB;;;AAI9B;;;;;;;;AAQG;AACH,IAAA,KAAK,CAAC,IAAY,EAAA;AAChB,QAAA,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;AAC9B,YAAA,OAAO,KAAK;;AAEd,QAAA,IAAI,GAAG,kBAAkB,CAAC,IAAI,CAAC;QAC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E,MAAgC,EAAE,WAAqB,KAAK,EAAA;AACpI,QAAA,IAAI,CAAC,IAAI,CAAC,oBAAoB,EAAE;YAC9B;;AAGF,QAAA,MAAM,OAAO,GAAQ,IAAI,CAAC,MAAM,EAAE;AAElC,QAAA,KAAK,MAAM,UAAU,IAAI,OAAO,EAAE;AAChC,YAAA,IAAI,OAAO,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE;AACtC,gBAAA,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC;;;;8GA7QlD,aAAa,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAId,QAAQ,EAAA,EAAA,EAAA,KAAA,EACR,WAAW,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AALV,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA,CAAA;;2FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;0BAKI,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,WAAW;;;AC1BvB;;AAEG;;ACFH;;AAEG;;;;"}
|
package/lib/cookie.service.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export declare class CookieService {
|
|
|
12
12
|
private document;
|
|
13
13
|
private platformId;
|
|
14
14
|
private readonly documentIsAccessible;
|
|
15
|
-
constructor(document: Document,
|
|
15
|
+
constructor(document: Document, // Get the `PLATFORM_ID` so we can check if we're in a browser.
|
|
16
|
+
platformId: object);
|
|
16
17
|
/**
|
|
17
18
|
* Get cookie Regular Expression
|
|
18
19
|
*
|
|
@@ -24,11 +25,11 @@ export declare class CookieService {
|
|
|
24
25
|
*/
|
|
25
26
|
private static getCookieRegExp;
|
|
26
27
|
/**
|
|
27
|
-
* Gets the
|
|
28
|
+
* Gets the decoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
28
29
|
*
|
|
29
30
|
* @param encodedURIComponent A value representing an encoded URI component.
|
|
30
31
|
*
|
|
31
|
-
* @returns The
|
|
32
|
+
* @returns The decoded version of an encoded component of a Uniform Resource Identifier (URI).
|
|
32
33
|
*
|
|
33
34
|
* @author: Stepan Suvorov
|
|
34
35
|
* @since: 1.0.0
|
|
@@ -102,7 +103,7 @@ export declare class CookieService {
|
|
|
102
103
|
*/
|
|
103
104
|
set(name: string, value: string, options?: CookieOptions): void;
|
|
104
105
|
/**
|
|
105
|
-
* Delete cookie by name
|
|
106
|
+
* Delete cookie by name at given path and domain. If not path is not specified, cookie at '/' path will be deleted.
|
|
106
107
|
*
|
|
107
108
|
* @param name Cookie name
|
|
108
109
|
* @param path Cookie path
|
|
@@ -115,7 +116,7 @@ export declare class CookieService {
|
|
|
115
116
|
*/
|
|
116
117
|
delete(name: string, path?: CookieOptions['path'], domain?: CookieOptions['domain'], secure?: CookieOptions['secure'], sameSite?: SameSite): void;
|
|
117
118
|
/**
|
|
118
|
-
* Delete all cookies
|
|
119
|
+
* Delete all cookies at given path and domain. If not path is not specified, all cookies at '/' path will be deleted.
|
|
119
120
|
*
|
|
120
121
|
* @param path Cookie path
|
|
121
122
|
* @param domain Cookie domain
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie.service.d.ts","sourceRoot":"","sources":["../../../projects/ngx-cookie-service/src/lib/cookie.service.ts"],"names":[],"mappings":";AAOA,MAAM,MAAM,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,CAAC,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