@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 CHANGED
@@ -1,6 +1,6 @@
1
- ## [14.5.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v14.4.1...instruments/core-v14.5.0) (2025-08-04)
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
- * **api-metadata, rebilly-js-sdk:** Update resources based on latest api definitions ([#14032](https://github.com/Rebilly/rebilly/issues/14032)) ([99c4a34](https://github.com/Rebilly/rebilly/commit/99c4a34a2089c3b0218bff4b4b3ed1d3285448ed))
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("/")}@99c4a34`
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
- applePayButton.style.margin = "0px";
18432
- applePayButton.style.width = "100%";
18433
- applePayButton.style.height = buttonHeight;
18434
- applePayButton.style.cursor = "pointer";
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