@stripe/connect-js 3.3.6 → 3.3.7
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/dist/connect.esm.js +6 -2
- package/dist/connect.js +6 -2
- package/dist/pure.esm.js +6 -2
- package/dist/pure.js +6 -2
- package/dist/types/config.d.ts +1 -0
- package/package.json +1 -1
- package/src/shared.ts +6 -0
- package/types/config.ts +2 -1
package/dist/connect.esm.js
CHANGED
|
@@ -13,7 +13,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
13
13
|
setCollectionOptions: _collectionOptions => {}
|
|
14
14
|
},
|
|
15
15
|
"notification-banner": {
|
|
16
|
-
setCollectionOptions: _collectionOptions => {}
|
|
16
|
+
setCollectionOptions: _collectionOptions => {},
|
|
17
|
+
setOnNotificationsChange: _listener => {}
|
|
17
18
|
},
|
|
18
19
|
"payment-details": {
|
|
19
20
|
setPayment: _payment => {},
|
|
@@ -126,6 +127,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
126
127
|
document.body.removeChild(element);
|
|
127
128
|
element.style.display = oldDisplay;
|
|
128
129
|
}
|
|
130
|
+
if (!element || !element.setConnector) {
|
|
131
|
+
throw new Error(`Element ${tagName} was not transformed into a custom element. Are you using a documented component? See https://docs.stripe.com/connect/supported-embedded-components for a list of supported components`);
|
|
132
|
+
}
|
|
129
133
|
element.setConnector(instance.connect);
|
|
130
134
|
});
|
|
131
135
|
return element;
|
|
@@ -157,7 +161,7 @@ const createWrapper = stripeConnect => {
|
|
|
157
161
|
sdk: true,
|
|
158
162
|
sdkOptions: {
|
|
159
163
|
// This will be replaced by the npm package version when bundling
|
|
160
|
-
sdkVersion: "3.3.
|
|
164
|
+
sdkVersion: "3.3.7"
|
|
161
165
|
}
|
|
162
166
|
})
|
|
163
167
|
}));
|
package/dist/connect.js
CHANGED
|
@@ -17,7 +17,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
17
17
|
setCollectionOptions: _collectionOptions => {}
|
|
18
18
|
},
|
|
19
19
|
"notification-banner": {
|
|
20
|
-
setCollectionOptions: _collectionOptions => {}
|
|
20
|
+
setCollectionOptions: _collectionOptions => {},
|
|
21
|
+
setOnNotificationsChange: _listener => {}
|
|
21
22
|
},
|
|
22
23
|
"payment-details": {
|
|
23
24
|
setPayment: _payment => {},
|
|
@@ -130,6 +131,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
130
131
|
document.body.removeChild(element);
|
|
131
132
|
element.style.display = oldDisplay;
|
|
132
133
|
}
|
|
134
|
+
if (!element || !element.setConnector) {
|
|
135
|
+
throw new Error(`Element ${tagName} was not transformed into a custom element. Are you using a documented component? See https://docs.stripe.com/connect/supported-embedded-components for a list of supported components`);
|
|
136
|
+
}
|
|
133
137
|
element.setConnector(instance.connect);
|
|
134
138
|
});
|
|
135
139
|
return element;
|
|
@@ -161,7 +165,7 @@ const createWrapper = stripeConnect => {
|
|
|
161
165
|
sdk: true,
|
|
162
166
|
sdkOptions: {
|
|
163
167
|
// This will be replaced by the npm package version when bundling
|
|
164
|
-
sdkVersion: "3.3.
|
|
168
|
+
sdkVersion: "3.3.7"
|
|
165
169
|
}
|
|
166
170
|
})
|
|
167
171
|
}));
|
package/dist/pure.esm.js
CHANGED
|
@@ -13,7 +13,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
13
13
|
setCollectionOptions: _collectionOptions => {}
|
|
14
14
|
},
|
|
15
15
|
"notification-banner": {
|
|
16
|
-
setCollectionOptions: _collectionOptions => {}
|
|
16
|
+
setCollectionOptions: _collectionOptions => {},
|
|
17
|
+
setOnNotificationsChange: _listener => {}
|
|
17
18
|
},
|
|
18
19
|
"payment-details": {
|
|
19
20
|
setPayment: _payment => {},
|
|
@@ -126,6 +127,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
126
127
|
document.body.removeChild(element);
|
|
127
128
|
element.style.display = oldDisplay;
|
|
128
129
|
}
|
|
130
|
+
if (!element || !element.setConnector) {
|
|
131
|
+
throw new Error(`Element ${tagName} was not transformed into a custom element. Are you using a documented component? See https://docs.stripe.com/connect/supported-embedded-components for a list of supported components`);
|
|
132
|
+
}
|
|
129
133
|
element.setConnector(instance.connect);
|
|
130
134
|
});
|
|
131
135
|
return element;
|
|
@@ -157,7 +161,7 @@ const createWrapper = stripeConnect => {
|
|
|
157
161
|
sdk: true,
|
|
158
162
|
sdkOptions: {
|
|
159
163
|
// This will be replaced by the npm package version when bundling
|
|
160
|
-
sdkVersion: "3.3.
|
|
164
|
+
sdkVersion: "3.3.7"
|
|
161
165
|
}
|
|
162
166
|
})
|
|
163
167
|
}));
|
package/dist/pure.js
CHANGED
|
@@ -17,7 +17,8 @@ const ConnectElementCustomMethodConfig = {
|
|
|
17
17
|
setCollectionOptions: _collectionOptions => {}
|
|
18
18
|
},
|
|
19
19
|
"notification-banner": {
|
|
20
|
-
setCollectionOptions: _collectionOptions => {}
|
|
20
|
+
setCollectionOptions: _collectionOptions => {},
|
|
21
|
+
setOnNotificationsChange: _listener => {}
|
|
21
22
|
},
|
|
22
23
|
"payment-details": {
|
|
23
24
|
setPayment: _payment => {},
|
|
@@ -130,6 +131,9 @@ const initStripeConnect = (stripePromise, initParams) => {
|
|
|
130
131
|
document.body.removeChild(element);
|
|
131
132
|
element.style.display = oldDisplay;
|
|
132
133
|
}
|
|
134
|
+
if (!element || !element.setConnector) {
|
|
135
|
+
throw new Error(`Element ${tagName} was not transformed into a custom element. Are you using a documented component? See https://docs.stripe.com/connect/supported-embedded-components for a list of supported components`);
|
|
136
|
+
}
|
|
133
137
|
element.setConnector(instance.connect);
|
|
134
138
|
});
|
|
135
139
|
return element;
|
|
@@ -161,7 +165,7 @@ const createWrapper = stripeConnect => {
|
|
|
161
165
|
sdk: true,
|
|
162
166
|
sdkOptions: {
|
|
163
167
|
// This will be replaced by the npm package version when bundling
|
|
164
|
-
sdkVersion: "3.3.
|
|
168
|
+
sdkVersion: "3.3.7"
|
|
165
169
|
}
|
|
166
170
|
})
|
|
167
171
|
}));
|
package/dist/types/config.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export declare const ConnectElementCustomMethodConfig: {
|
|
|
16
16
|
};
|
|
17
17
|
"notification-banner": {
|
|
18
18
|
setCollectionOptions: (_collectionOptions: CollectionOptions | undefined) => void;
|
|
19
|
+
setOnNotificationsChange: (_listener: (() => void) | undefined) => void;
|
|
19
20
|
};
|
|
20
21
|
"payment-details": {
|
|
21
22
|
setPayment: (_payment: string | undefined) => void;
|
package/package.json
CHANGED
package/src/shared.ts
CHANGED
|
@@ -178,6 +178,12 @@ export const initStripeConnect = (
|
|
|
178
178
|
element.style.display = oldDisplay;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
if (!element || !(element as any).setConnector) {
|
|
182
|
+
throw new Error(
|
|
183
|
+
`Element ${tagName} was not transformed into a custom element. Are you using a documented component? See https://docs.stripe.com/connect/supported-embedded-components for a list of supported components`
|
|
184
|
+
);
|
|
185
|
+
}
|
|
186
|
+
|
|
181
187
|
(element as any).setConnector((instance as any).connect);
|
|
182
188
|
});
|
|
183
189
|
|
package/types/config.ts
CHANGED
|
@@ -31,7 +31,8 @@ export const ConnectElementCustomMethodConfig = {
|
|
|
31
31
|
"notification-banner": {
|
|
32
32
|
setCollectionOptions: (
|
|
33
33
|
_collectionOptions: CollectionOptions | undefined
|
|
34
|
-
): void => {}
|
|
34
|
+
): void => {},
|
|
35
|
+
setOnNotificationsChange: (_listener: (() => void) | undefined): void => {}
|
|
35
36
|
},
|
|
36
37
|
"payment-details": {
|
|
37
38
|
setPayment: (_payment: string | undefined): void => {},
|