namirasoft-core 1.3.38 → 1.3.39
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/dist/IStorageCookie.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.IStorageCookie = void 0;
|
|
4
|
+
const EncodingOperation_1 = require("./EncodingOperation");
|
|
4
5
|
const IStorage_1 = require("./IStorage");
|
|
5
6
|
class IStorageCookie extends IStorage_1.IStorage {
|
|
6
7
|
constructor(fixed) {
|
|
@@ -19,13 +20,13 @@ class IStorageCookie extends IStorage_1.IStorage {
|
|
|
19
20
|
}
|
|
20
21
|
get(name, defaultValue) {
|
|
21
22
|
var _a;
|
|
22
|
-
return (_a = this.getAll()[name]) !== null && _a !== void 0 ? _a : defaultValue;
|
|
23
|
+
return (_a = EncodingOperation_1.EncodingOperation.Base64Decode(this.getAll()[name])) !== null && _a !== void 0 ? _a : defaultValue;
|
|
23
24
|
}
|
|
24
25
|
set(name, value) {
|
|
25
26
|
let items = [];
|
|
26
27
|
for (let key of Object.keys(this.fixed))
|
|
27
28
|
items.push(`${key}=${this.fixed[key]}`);
|
|
28
|
-
items.push(`${name}=${value}`);
|
|
29
|
+
items.push(`${name}=${EncodingOperation_1.EncodingOperation.Base64Encode(value)}`);
|
|
29
30
|
document.cookie = items.join(";");
|
|
30
31
|
}
|
|
31
32
|
del(name) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IStorageCookie.js","sourceRoot":"","sources":["../src/IStorageCookie.ts"],"names":[],"mappings":";;;AAAA,yCAAsC;AAEtC,MAAa,cAAe,SAAQ,mBAAQ;IAGxC,YAAY,KAAiC;QAEzC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IACO,MAAM;;QAEV,IAAI,GAAG,GAA+B,EAAE,CAA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AAC;SACvC;QACD,OAAO,GAAG,CAAC;IACf,CAAC;IACQ,GAAG,CAAC,IAAY,EAAE,YAAoB;;QAE3C,OAAO,MAAA,qCAAiB,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,mCAAI,YAAY,CAAC;IAC/E,CAAC;IACQ,GAAG,CAAC,IAAY,EAAE,KAAa;QAEpC,IAAI,KAAK,GAAG,EAAE,CAAC;QACf,KAAK,IAAI,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;YACnC,KAAK,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC5C,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,IAAI,qCAAiB,CAAC,YAAY,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAC/D,QAAQ,CAAC,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACtC,CAAC;IACQ,GAAG,CAAC,IAAY;QAErB,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;IACvB,CAAC;CACJ;AAnCD,wCAmCC"}
|
package/package.json
CHANGED
package/src/IStorageCookie.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { EncodingOperation } from "./EncodingOperation";
|
|
1
2
|
import { IStorage } from "./IStorage";
|
|
2
3
|
|
|
3
4
|
export class IStorageCookie extends IStorage
|
|
@@ -21,14 +22,14 @@ export class IStorageCookie extends IStorage
|
|
|
21
22
|
}
|
|
22
23
|
override get(name: string, defaultValue: string)
|
|
23
24
|
{
|
|
24
|
-
return this.getAll()[name] ?? defaultValue;
|
|
25
|
+
return EncodingOperation.Base64Decode(this.getAll()[name]) ?? defaultValue;
|
|
25
26
|
}
|
|
26
27
|
override set(name: string, value: string)
|
|
27
28
|
{
|
|
28
29
|
let items = [];
|
|
29
30
|
for (let key of Object.keys(this.fixed))
|
|
30
31
|
items.push(`${key}=${this.fixed[key]}`);
|
|
31
|
-
items.push(`${name}=${value}`);
|
|
32
|
+
items.push(`${name}=${EncodingOperation.Base64Encode(value)}`);
|
|
32
33
|
document.cookie = items.join(";");
|
|
33
34
|
}
|
|
34
35
|
override del(name: string)
|