@adobe/alloy 2.22.0-beta.1 → 2.22.0-beta.3
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/libEs5/components/Identity/injectAddQueryStringIdentityToPayload.js +2 -1
- package/libEs5/components/Personalization/handlers/createProcessPropositions.js +1 -1
- package/libEs5/components/Personalization/in-app-message-actions/utils.js +2 -1
- package/libEs5/constants/libraryVersion.js +1 -1
- package/libEs5/utils/decodeUriComponentSafely.js +22 -0
- package/libEs6/components/Identity/injectAddQueryStringIdentityToPayload.js +2 -1
- package/libEs6/components/Personalization/handlers/createProcessPropositions.js +1 -1
- package/libEs6/components/Personalization/in-app-message-actions/utils.js +2 -1
- package/libEs6/constants/libraryVersion.js +1 -1
- package/libEs6/utils/decodeUriComponentSafely.js +19 -0
- package/package.json +2 -2
|
@@ -4,6 +4,7 @@ exports.default = void 0;
|
|
|
4
4
|
var _index = require("../../utils/index.js");
|
|
5
5
|
var _queryStringIdentityParam = require("../../constants/queryStringIdentityParam.js");
|
|
6
6
|
var _ecidNamespace = require("../../constants/ecidNamespace.js");
|
|
7
|
+
var _decodeUriComponentSafely = require("../../utils/decodeUriComponentSafely.js");
|
|
7
8
|
/*
|
|
8
9
|
Copyright 2023 Adobe. All rights reserved.
|
|
9
10
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -46,7 +47,7 @@ var _default = ({
|
|
|
46
47
|
// We are using MCMID and MCORGID to be compatible with Visitor.
|
|
47
48
|
const ts = parseInt(properties.TS, 10);
|
|
48
49
|
const mcmid = properties.MCMID;
|
|
49
|
-
const mcorgid =
|
|
50
|
+
const mcorgid = (0, _decodeUriComponentSafely.default)(properties.MCORGID);
|
|
50
51
|
if (
|
|
51
52
|
// When TS is not specified or not a number, the following inequality returns false.
|
|
52
53
|
// All inequalities with NaN variables are false.
|
|
@@ -182,7 +182,7 @@ var _default = ({
|
|
|
182
182
|
detail: {
|
|
183
183
|
...propsByScope
|
|
184
184
|
},
|
|
185
|
-
message: "Scopes: " + propsByScope + " successfully executed.",
|
|
185
|
+
message: "Scopes: " + JSON.stringify(propsByScope) + " successfully executed.",
|
|
186
186
|
logLevel: "info"
|
|
187
187
|
});
|
|
188
188
|
return renderedPropositions;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
exports.removeElementById = exports.parseAnchor = void 0;
|
|
4
4
|
var _index = require("../../../utils/index.js");
|
|
5
5
|
var _index2 = require("../../../utils/dom/index.js");
|
|
6
|
+
var _decodeUriComponentSafely = require("../../../utils/decodeUriComponentSafely.js");
|
|
6
7
|
/*
|
|
7
8
|
Copyright 2023 Adobe. All rights reserved.
|
|
8
9
|
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
@@ -42,7 +43,7 @@ const parseAnchor = anchor => {
|
|
|
42
43
|
if ((0, _index.isNonEmptyArray)(hrefParts)) {
|
|
43
44
|
const queryParams = _index.queryString.parse(hrefParts[1]);
|
|
44
45
|
interaction = queryParams.interaction || "";
|
|
45
|
-
link =
|
|
46
|
+
link = (0, _decodeUriComponentSafely.default)(queryParams.link || "");
|
|
46
47
|
}
|
|
47
48
|
return {
|
|
48
49
|
action,
|
|
@@ -14,4 +14,4 @@ governing permissions and limitations under the License.
|
|
|
14
14
|
*/
|
|
15
15
|
// The __VERSION__ keyword will be replace at alloy build time with the package.json version.
|
|
16
16
|
// see babel-plugin-version
|
|
17
|
-
var _default = exports.default = "2.22.0-beta.
|
|
17
|
+
var _default = exports.default = "2.22.0-beta.3";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
/*
|
|
5
|
+
Copyright 2024 Adobe. All rights reserved.
|
|
6
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
8
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
11
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
12
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
13
|
+
governing permissions and limitations under the License.
|
|
14
|
+
*/
|
|
15
|
+
var _default = v => {
|
|
16
|
+
try {
|
|
17
|
+
return decodeURIComponent(v);
|
|
18
|
+
} catch {
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.default = _default;
|
|
@@ -15,6 +15,7 @@ governing permissions and limitations under the License.
|
|
|
15
15
|
import { queryString } from "../../utils/index.js";
|
|
16
16
|
import queryStringIdentityParam from "../../constants/queryStringIdentityParam.js";
|
|
17
17
|
import ecidNamespace from "../../constants/ecidNamespace.js";
|
|
18
|
+
import decodeUriComponentSafely from "../../utils/decodeUriComponentSafely.js";
|
|
18
19
|
const LINK_TTL_SECONDS = 300; // 5 minute link time to live
|
|
19
20
|
|
|
20
21
|
export default (({
|
|
@@ -44,7 +45,7 @@ export default (({
|
|
|
44
45
|
// We are using MCMID and MCORGID to be compatible with Visitor.
|
|
45
46
|
const ts = parseInt(properties.TS, 10);
|
|
46
47
|
const mcmid = properties.MCMID;
|
|
47
|
-
const mcorgid =
|
|
48
|
+
const mcorgid = decodeUriComponentSafely(properties.MCORGID);
|
|
48
49
|
if (
|
|
49
50
|
// When TS is not specified or not a number, the following inequality returns false.
|
|
50
51
|
// All inequalities with NaN variables are false.
|
|
@@ -180,7 +180,7 @@ export default (({
|
|
|
180
180
|
detail: {
|
|
181
181
|
...propsByScope
|
|
182
182
|
},
|
|
183
|
-
message: `Scopes: ${propsByScope} successfully executed.`,
|
|
183
|
+
message: `Scopes: ${JSON.stringify(propsByScope)} successfully executed.`,
|
|
184
184
|
logLevel: "info"
|
|
185
185
|
});
|
|
186
186
|
return renderedPropositions;
|
|
@@ -11,6 +11,7 @@ governing permissions and limitations under the License.
|
|
|
11
11
|
*/
|
|
12
12
|
import { isNonEmptyArray, queryString } from "../../../utils/index.js";
|
|
13
13
|
import { removeNode, selectNodes } from "../../../utils/dom/index.js";
|
|
14
|
+
import decodeUriComponentSafely from "../../../utils/decodeUriComponentSafely.js";
|
|
14
15
|
export const removeElementById = id => {
|
|
15
16
|
const element = selectNodes(`#${id}`, document);
|
|
16
17
|
if (element && element.length > 0) {
|
|
@@ -37,7 +38,7 @@ export const parseAnchor = anchor => {
|
|
|
37
38
|
if (isNonEmptyArray(hrefParts)) {
|
|
38
39
|
const queryParams = queryString.parse(hrefParts[1]);
|
|
39
40
|
interaction = queryParams.interaction || "";
|
|
40
|
-
link =
|
|
41
|
+
link = decodeUriComponentSafely(queryParams.link || "");
|
|
41
42
|
}
|
|
42
43
|
return {
|
|
43
44
|
action,
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2024 Adobe. All rights reserved.
|
|
3
|
+
This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
|
|
7
|
+
Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export default (v => {
|
|
14
|
+
try {
|
|
15
|
+
return decodeURIComponent(v);
|
|
16
|
+
} catch {
|
|
17
|
+
return "";
|
|
18
|
+
}
|
|
19
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/alloy",
|
|
3
|
-
"version": "2.22.0-beta.
|
|
3
|
+
"version": "2.22.0-beta.3",
|
|
4
4
|
"description": "Adobe Experience Platform Web SDK",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "libEs5/index.js",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"uuid": "^10.0.0"
|
|
96
96
|
},
|
|
97
97
|
"devDependencies": {
|
|
98
|
-
"@adobe/alloy": "^2.22.0-beta.
|
|
98
|
+
"@adobe/alloy": "^2.22.0-beta.2",
|
|
99
99
|
"@babel/cli": "^7.24.8",
|
|
100
100
|
"@babel/plugin-transform-runtime": "^7.24.7",
|
|
101
101
|
"@eslint/js": "^9.9.0",
|