@rebilly/instruments 3.12.0-beta.0 → 3.12.1-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rebilly/instruments",
3
- "version": "3.12.0-beta.0",
3
+ "version": "3.12.1-beta.0",
4
4
  "author": "Rebilly",
5
5
  "main": "dist/index.js",
6
6
  "unpkg": "dist/index.min.js",
@@ -73,14 +73,10 @@ export default ({
73
73
 
74
74
  validateOptions(options);
75
75
 
76
- const productionUrl = options.apiMode === 'sandbox'
77
- ? 'https://forms-sandbox.secure-payments.app'
78
- : 'https://forms.secure-payments.app';
79
-
80
76
  const _computed = {
81
77
  paymentMethodsUrl: options._dev
82
78
  ? options._dev.paymentMethodsUrl || 'https://forms.local.rebilly.dev:3000'
83
- : productionUrl
79
+ : 'https://forms.secure-payments.app'
84
80
  };
85
81
 
86
82
  const combinedOptions = merge({...defaults}, {
@@ -155,7 +155,6 @@ export function MountMethods({
155
155
  const details = document.querySelectorAll('.rebilly-instruments-accordion');
156
156
  // Add the onclick listeners.
157
157
  details.forEach((targetDetail) => {
158
- targetDetail.open = true;
159
158
  targetDetail.querySelector('summary').addEventListener('click', () => {
160
159
  // Close all the accordion that are not targetDetail.
161
160
  details.forEach((detail) => {
@@ -164,14 +163,8 @@ export function MountMethods({
164
163
  });
165
164
  });
166
165
 
167
- // HOTFIX:
168
- // All details must be open to connect to Postmate than closed
169
- setTimeout(() => {
170
- details.forEach((detail) => {
171
- detail.removeAttribute('open');
172
- });
173
- details[0].open = true;
174
- }, 100);
166
+ // Open the first accordion by default
167
+ details[0].open = true;
175
168
  }
176
169
 
177
170
  state.translate.translateItems();