@rebilly/instruments 8.10.0 → 8.10.1

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,5 @@
1
+ ## [8.10.1](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.10.0...instruments/core-v8.10.1) (2023-12-13)
2
+
1
3
  ## [8.10.0](https://github.com/Rebilly/rebilly/compare/instruments/core-v8.9.0...instruments/core-v8.10.0) (2023-12-13)
2
4
 
3
5
 
package/dist/index.js CHANGED
@@ -648,7 +648,7 @@ function isRef(r2) {
648
648
  return !!(r2 && r2.__v_isRef === true);
649
649
  }
650
650
  function isDOMElement(element) {
651
- return element instanceof Element || element instanceof Document;
651
+ return element instanceof Element || element instanceof HTMLDocument;
652
652
  }
653
653
  const summaryLoaderHTML = `
654
654
  <div class="rebilly-instruments-summary-loader-total rebilly-instruments-loader-display-flex rebilly-instruments-loader-align-center rebilly-instruments-loader-justify-space-between">
@@ -15259,10 +15259,10 @@ function processPropertyAsDOMElement({
15259
15259
  if (typeof prop === "undefined") {
15260
15260
  throw new Error('processPropertyDOMElement: Missing argument "prop"');
15261
15261
  }
15262
- if (isDOMElement(prop)) {
15263
- DOMElement = prop;
15264
- } else if (typeof prop === "string" && hasValidCSSSelector(prop)) {
15262
+ if (hasValidCSSSelector(prop)) {
15265
15263
  DOMElement = document.querySelector(prop);
15264
+ } else if (isDOMElement(prop)) {
15265
+ DOMElement = prop;
15266
15266
  } else {
15267
15267
  throw new Error(
15268
15268
  `Please provide a valid CSS class, id or DOM element for "${propName}" property`
@@ -23091,38 +23091,12 @@ const schema = {
23091
23091
  addons: optional(planItemsSchema),
23092
23092
  bumpOffer: optional(planItemsSchema),
23093
23093
  form: optional({
23094
- default: ".rebilly-instruments",
23095
- type: ["string", "object"],
23096
- oneOf: [
23097
- {
23098
- type: "string"
23099
- },
23100
- {
23101
- type: "object",
23102
- properties: {
23103
- id: {
23104
- type: "string"
23105
- }
23106
- }
23107
- }
23108
- ]
23094
+ type: "string",
23095
+ default: ".rebilly-instruments"
23109
23096
  }),
23110
23097
  summary: optional({
23111
- default: ".rebilly-instruments-summary",
23112
- type: ["string", "object"],
23113
- oneOf: [
23114
- {
23115
- type: "string"
23116
- },
23117
- {
23118
- type: "object",
23119
- properties: {
23120
- id: {
23121
- type: "string"
23122
- }
23123
- }
23124
- }
23125
- ]
23098
+ type: "string",
23099
+ default: ".rebilly-instruments-summary"
23126
23100
  }),
23127
23101
  apiMode: {
23128
23102
  type: "string",
@@ -23202,11 +23176,7 @@ const ajv = new AJV({
23202
23176
  });
23203
23177
  const validate = ajv.compile(schema);
23204
23178
  function sanitize2(data) {
23205
- return Object.assign(JSON.parse(JSON.stringify(data)), {
23206
- // HTMLElement is turned into objects by JSON.stringify
23207
- form: data.form,
23208
- summary: data.summary
23209
- });
23179
+ return JSON.parse(JSON.stringify(data));
23210
23180
  }
23211
23181
  function validateOptions(data) {
23212
23182
  const sanitizedData = sanitize2(data);
@@ -23289,7 +23259,7 @@ function handleComputedProperty(options) {
23289
23259
  var _a;
23290
23260
  return Object.assign({}, options, {
23291
23261
  _computed: {
23292
- version: "8.9.0",
23262
+ version: "8.10.0",
23293
23263
  paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
23294
23264
  }
23295
23265
  });
@@ -26478,7 +26448,7 @@ class RebillyInstrumentsInstance {
26478
26448
  await show({ componentName, payload });
26479
26449
  }
26480
26450
  get version() {
26481
- return `RebillyInstruments Ver.${"8.9.0"}`;
26451
+ return `RebillyInstruments Ver.${"8.10.0"}`;
26482
26452
  }
26483
26453
  on(eventName, callback) {
26484
26454
  on({ eventName, callback });