@rebilly/instruments 14.5.0 → 14.6.0
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/CHANGELOG.md +2 -2
- package/dist/index.js +9 -16
- package/dist/index.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## [14.
|
|
1
|
+
## [14.6.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v14.5.0...instruments/core-v14.6.0) (2025-08-08)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Features
|
|
5
5
|
|
|
6
|
-
* **
|
|
6
|
+
* **instruments:** support apple pay in third party browsers ([#13940](https://github.com/Rebilly/rebilly/issues/13940)) ([6a43401](https://github.com/Rebilly/rebilly/commit/6a43401884b4843db89c94b62635bfb5b025571f))
|
package/dist/index.js
CHANGED
|
@@ -5097,7 +5097,7 @@ function C$1({ options: e2 }) {
|
|
|
5097
5097
|
}
|
|
5098
5098
|
function o2() {
|
|
5099
5099
|
const i = {
|
|
5100
|
-
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@
|
|
5100
|
+
"REB-API-CONSUMER": `${["Rebilly", e2.appName, "js-sdk"].filter((g) => g).join("/")}@6a43401`
|
|
5101
5101
|
};
|
|
5102
5102
|
return e2.apiKey && (i["REB-APIKEY"] = e2.apiKey), i;
|
|
5103
5103
|
}
|
|
@@ -11710,15 +11710,6 @@ function getPaymentMethods() {
|
|
|
11710
11710
|
result.methods.push(method);
|
|
11711
11711
|
}
|
|
11712
11712
|
});
|
|
11713
|
-
if (!window.ApplePaySession) {
|
|
11714
|
-
result.expressMethods = result.expressMethods.filter(
|
|
11715
|
-
(method) => {
|
|
11716
|
-
var _a2;
|
|
11717
|
-
return ((_a2 = method == null ? void 0 : method.feature) == null ? void 0 : _a2.name) !== "Apple Pay";
|
|
11718
|
-
}
|
|
11719
|
-
);
|
|
11720
|
-
state.loader.stopLoading({ id: "applePay-express" });
|
|
11721
|
-
}
|
|
11722
11713
|
return result;
|
|
11723
11714
|
}
|
|
11724
11715
|
class ProductModel extends BaseModel {
|
|
@@ -18428,10 +18419,14 @@ function mountExpressMethod({ state: state2, id }) {
|
|
|
18428
18419
|
const {
|
|
18429
18420
|
applePayDisplayOptions: { buttonHeight }
|
|
18430
18421
|
} = state2.options.digitalWallet.applePay;
|
|
18431
|
-
|
|
18432
|
-
|
|
18433
|
-
|
|
18434
|
-
|
|
18422
|
+
const buttonStyles = {
|
|
18423
|
+
margin: "0px",
|
|
18424
|
+
width: "100%",
|
|
18425
|
+
"--apple-pay-button-height": buttonHeight
|
|
18426
|
+
};
|
|
18427
|
+
Object.entries(buttonStyles).forEach(([property, value]) => {
|
|
18428
|
+
applePayButton.style.setProperty(property, value);
|
|
18429
|
+
});
|
|
18435
18430
|
}
|
|
18436
18431
|
return function mountButton() {
|
|
18437
18432
|
if (!container.children.length) {
|
|
@@ -18505,7 +18500,6 @@ const getMethodData = (method) => {
|
|
|
18505
18500
|
).replace("-", "");
|
|
18506
18501
|
return { METHOD_ID, METHOD_TYPE };
|
|
18507
18502
|
};
|
|
18508
|
-
const browserIsSafari = () => window.ApplePaySession;
|
|
18509
18503
|
async function mountExpressMethods({ methods, container }) {
|
|
18510
18504
|
const methodIds = methods.map((expressMethod) => {
|
|
18511
18505
|
const { METHOD_ID } = getMethodData(expressMethod);
|
|
@@ -18539,7 +18533,6 @@ async function mountExpressMethods({ methods, container }) {
|
|
|
18539
18533
|
const mountingMethods = [];
|
|
18540
18534
|
methods.map((method) => {
|
|
18541
18535
|
const { METHOD_ID: id } = getMethodData(method);
|
|
18542
|
-
if (id === "apple-pay" && !browserIsSafari()) return;
|
|
18543
18536
|
container.innerHTML += `
|
|
18544
18537
|
<div class="rebilly-instruments-${id}-method" style="height: ${generateExpressMethodHeight(
|
|
18545
18538
|
method
|