@rebilly/instruments 8.15.0 → 8.17.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,3 +1,17 @@
1
+ ## [8.17.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.16.0...instruments/core-v8.17.0) (2024-01-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * **instruments:** use new framepay asset name and global in instruments code ([#2626](https://github.com/Rebilly/rebilly/issues/2626)) ([4ea0331](https://github.com/Rebilly/rebilly/commit/4ea0331a515424b025bc0ddc3fc9404d11826297))
7
+
8
+ ## [8.16.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.15.0...instruments/core-v8.16.0) (2023-12-27)
9
+
10
+
11
+ ### Features
12
+
13
+ * **api-metadata:** Update resources based on latest api definitions ([#2691](https://github.com/Rebilly/rebilly/issues/2691)) ([f10428d](https://github.com/Rebilly/rebilly/commit/f10428dac9a1e5eae4ec667461eaaabdc29f3182))
14
+
1
15
  ## [8.15.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.14.0...instruments/core-v8.15.0) (2023-12-22)
2
16
 
3
17
 
package/dist/index.js CHANGED
@@ -14660,7 +14660,7 @@ async function fetchData({
14660
14660
  return new DataInstance({});
14661
14661
  }
14662
14662
  function mountExpressMethod({ state: state2, id: id2 }) {
14663
- const { Rebilly } = window;
14663
+ const { Framepay } = window;
14664
14664
  const container = state2.form.querySelector(
14665
14665
  `.rebilly-instruments-${id2}-method`
14666
14666
  );
@@ -14678,7 +14678,7 @@ function mountExpressMethod({ state: state2, id: id2 }) {
14678
14678
  }
14679
14679
  function mountButton() {
14680
14680
  if (!container.children.length) {
14681
- const rebillyMountFunction = {
14681
+ const mountFunction = {
14682
14682
  "google-pay": "googlePay",
14683
14683
  "pay-pal-billing-agreement": "paypal",
14684
14684
  "apple-pay": "applePay"
@@ -14686,8 +14686,8 @@ function mountExpressMethod({ state: state2, id: id2 }) {
14686
14686
  const element = state2.form.querySelector(
14687
14687
  `.rebilly-instruments-${id2}-method`
14688
14688
  );
14689
- if (rebillyMountFunction[id2]) {
14690
- Rebilly[rebillyMountFunction[id2]].mount(element);
14689
+ if (mountFunction[id2]) {
14690
+ Framepay[mountFunction[id2]].mount(element);
14691
14691
  if (id2 === "apple-pay") {
14692
14692
  updateApplePayStyling();
14693
14693
  }
@@ -14696,10 +14696,10 @@ function mountExpressMethod({ state: state2, id: id2 }) {
14696
14696
  }
14697
14697
  }
14698
14698
  }
14699
- Rebilly == null ? void 0 : Rebilly.on("ready", () => {
14699
+ Framepay == null ? void 0 : Framepay.on("ready", () => {
14700
14700
  mountButton();
14701
14701
  });
14702
- Rebilly == null ? void 0 : Rebilly.on("error", (error2) => {
14702
+ Framepay == null ? void 0 : Framepay.on("error", (error2) => {
14703
14703
  console.error(error2);
14704
14704
  });
14705
14705
  }
@@ -14760,9 +14760,9 @@ async function mountExpressMethods({ methods, container }) {
14760
14760
  const { METHOD_ID } = getMethodData(expressMethod);
14761
14761
  return METHOD_ID;
14762
14762
  });
14763
- const { Rebilly } = window;
14764
- if (!(Rebilly == null ? void 0 : Rebilly.initialized)) {
14765
- await (Rebilly == null ? void 0 : Rebilly.initialize(
14763
+ const { Framepay } = window;
14764
+ if (!(Framepay == null ? void 0 : Framepay.initialized)) {
14765
+ await (Framepay == null ? void 0 : Framepay.initialize(
14766
14766
  generateFramepayConfig({
14767
14767
  methodIds
14768
14768
  })
@@ -14800,7 +14800,7 @@ async function mountExpressMethods({ methods, container }) {
14800
14800
  });
14801
14801
  });
14802
14802
  const redirectUrl = state.options.apiMode === "sandbox" ? "https://forms-sandbox.secure-payments.app/approval-url?close=true" : "https://forms.secure-payments.app/approval-url?close=true";
14803
- Rebilly == null ? void 0 : Rebilly.on("token-ready", (token) => {
14803
+ Framepay == null ? void 0 : Framepay.on("token-ready", (token) => {
14804
14804
  var _a, _b, _c;
14805
14805
  const instrumentReadyPayload = {
14806
14806
  websiteId: state.options.websiteId,
@@ -23296,7 +23296,7 @@ function handleComputedProperty(options) {
23296
23296
  var _a;
23297
23297
  return Object.assign({}, options, {
23298
23298
  _computed: {
23299
- version: "8.14.0",
23299
+ version: "8.16.0",
23300
23300
  paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
23301
23301
  }
23302
23302
  });
@@ -23382,8 +23382,8 @@ const setupOptions = ({
23382
23382
  async function setupFramepay() {
23383
23383
  const { _dev } = state.options || {};
23384
23384
  const urls = {
23385
- script: (_dev == null ? void 0 : _dev.framePayScriptLink) || "https://framepay.rebilly.com/rebilly.js",
23386
- style: (_dev == null ? void 0 : _dev.framePayStyleLink) || "https://framepay.rebilly.com/rebilly.css"
23385
+ script: (_dev == null ? void 0 : _dev.framePayScriptLink) || "https://framepay.rebilly.com/framepay.js",
23386
+ style: (_dev == null ? void 0 : _dev.framePayStyleLink) || "https://framepay.rebilly.com/framepay.css"
23387
23387
  };
23388
23388
  return new Promise((resolve2) => {
23389
23389
  const framepayStyle = document.createElement("link");
@@ -26500,7 +26500,7 @@ class RebillyInstrumentsInstance {
26500
26500
  await show({ componentName, payload });
26501
26501
  }
26502
26502
  get version() {
26503
- return `RebillyInstruments Ver.${"8.14.0"}`;
26503
+ return `RebillyInstruments Ver.${"8.16.0"}`;
26504
26504
  }
26505
26505
  on(eventName, callback) {
26506
26506
  on({ eventName, callback });