@licklist/design 0.78.7-stage.10 → 0.78.7-stage.11
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAIlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAOzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":"AAWA,OAAO,EAEL,sBAAsB,EACvB,MAAM,kDAAkD,CAAA;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0EAA0E,CAAA;AAIlH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAA;AAOzD,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAA;IACd,eAAe,EAAE,OAAO,CAAA;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAA;IAClC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAA;IAClB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAA;IAC/C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,uBAAuB,CAAC,EAAE,uBAAuB,CAAA;CAClD;AAED,eAAO,MAAM,eAAe,8JAUzB,oBAAoB,4CAmNtB,CAAA"}
|
|
@@ -302,11 +302,10 @@ var RyftPaymentForm = function(param) {
|
|
|
302
302
|
return _ref.apply(this, arguments);
|
|
303
303
|
};
|
|
304
304
|
}();
|
|
305
|
-
console.log((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length,
|
|
305
|
+
console.log((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length, 'formRef.current?.childNodes?.length ');
|
|
306
306
|
useEffect(function() {
|
|
307
|
-
var _formRef_current_childNodes, _formRef_current, _accountId_data;
|
|
308
|
-
if (!((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length) ||
|
|
309
|
-
!((_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id)) {
|
|
307
|
+
var _formRef_current_childNodes, _formRef_current, _formRef_current_childNodes1, _formRef_current1, _accountId_data;
|
|
308
|
+
if (!((_formRef_current = formRef.current) === null || _formRef_current === void 0 ? void 0 : (_formRef_current_childNodes = _formRef_current.childNodes) === null || _formRef_current_childNodes === void 0 ? void 0 : _formRef_current_childNodes.length) || ((_formRef_current1 = formRef.current) === null || _formRef_current1 === void 0 ? void 0 : (_formRef_current_childNodes1 = _formRef_current1.childNodes) === null || _formRef_current_childNodes1 === void 0 ? void 0 : _formRef_current_childNodes1.length) < 3 || !((_accountId_data = accountId.data) === null || _accountId_data === void 0 ? void 0 : _accountId_data.account_id)) {
|
|
310
309
|
return;
|
|
311
310
|
}
|
|
312
311
|
injectComponentsInRyftForm({
|
|
@@ -319,7 +318,32 @@ var RyftPaymentForm = function(param) {
|
|
|
319
318
|
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
320
319
|
[
|
|
321
320
|
(_formRef_current1 = formRef.current) === null || _formRef_current1 === void 0 ? void 0 : (_formRef_current_childNodes1 = _formRef_current1.childNodes) === null || _formRef_current_childNodes1 === void 0 ? void 0 : _formRef_current_childNodes1.length,
|
|
322
|
-
showApplePayButton
|
|
321
|
+
showApplePayButton
|
|
322
|
+
]);
|
|
323
|
+
useEffect(function() {
|
|
324
|
+
var formBox = document.getElementById('form-disable-box');
|
|
325
|
+
var cardContainer = document.getElementById('ryft-pay-iframe');
|
|
326
|
+
var googleButton = document.getElementById('gpay-button-online-api-id');
|
|
327
|
+
if (cardContainer) {
|
|
328
|
+
var _Boolean;
|
|
329
|
+
cardContainer.style.opacity = !payButtonDisabled ? '0.6' : '1';
|
|
330
|
+
cardContainer.ariaDisabled = (_Boolean = Boolean(!payButtonDisabled)) === null || _Boolean === void 0 ? void 0 : _Boolean.toString();
|
|
331
|
+
}
|
|
332
|
+
var appleButton = document.getElementById('ryft-pay-apple-pay-button');
|
|
333
|
+
if (googleButton) {
|
|
334
|
+
googleButton.disabled = !payButtonDisabled;
|
|
335
|
+
googleButton.style.opacity = !payButtonDisabled ? '1' : '0.6';
|
|
336
|
+
}
|
|
337
|
+
if (appleButton) {
|
|
338
|
+
appleButton.disabled = !payButtonDisabled;
|
|
339
|
+
appleButton.style.opacity = payButtonDisabled ? '1' : '0.6';
|
|
340
|
+
}
|
|
341
|
+
if (formBox) {
|
|
342
|
+
formBox.style.display = payButtonDisabled ? 'block' : 'none';
|
|
343
|
+
}
|
|
344
|
+
var applePayButton = document.createElement('button');
|
|
345
|
+
applePayButton.style.opacity = payButtonDisabled ? '1' : '0.6';
|
|
346
|
+
}, [
|
|
323
347
|
payButtonDisabled
|
|
324
348
|
]);
|
|
325
349
|
useEffect(function() {
|
package/package.json
CHANGED
|
@@ -134,12 +134,15 @@ export const RyftPaymentForm = ({
|
|
|
134
134
|
setIsBtnDisabled(false)
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
console.log(
|
|
137
|
+
console.log(
|
|
138
|
+
formRef.current?.childNodes?.length,
|
|
139
|
+
'formRef.current?.childNodes?.length ',
|
|
140
|
+
)
|
|
138
141
|
useEffect(
|
|
139
142
|
() => {
|
|
140
143
|
if (
|
|
141
144
|
!formRef.current?.childNodes?.length ||
|
|
142
|
-
|
|
145
|
+
formRef.current?.childNodes?.length < 3 ||
|
|
143
146
|
!accountId.data?.account_id
|
|
144
147
|
) {
|
|
145
148
|
return
|
|
@@ -154,13 +157,40 @@ export const RyftPaymentForm = ({
|
|
|
154
157
|
})
|
|
155
158
|
},
|
|
156
159
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
157
|
-
[
|
|
158
|
-
formRef.current?.childNodes?.length,
|
|
159
|
-
showApplePayButton,
|
|
160
|
-
payButtonDisabled,
|
|
161
|
-
],
|
|
160
|
+
[formRef.current?.childNodes?.length, showApplePayButton],
|
|
162
161
|
)
|
|
163
162
|
|
|
163
|
+
useEffect(() => {
|
|
164
|
+
const formBox = document.getElementById('form-disable-box')
|
|
165
|
+
const cardContainer = document.getElementById('ryft-pay-iframe')
|
|
166
|
+
|
|
167
|
+
const googleButton = document.getElementById(
|
|
168
|
+
'gpay-button-online-api-id',
|
|
169
|
+
) as HTMLButtonElement
|
|
170
|
+
|
|
171
|
+
if (cardContainer) {
|
|
172
|
+
cardContainer.style.opacity = !payButtonDisabled ? '0.6' : '1'
|
|
173
|
+
cardContainer.ariaDisabled = Boolean(!payButtonDisabled)?.toString()
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const appleButton = document.getElementById(
|
|
177
|
+
'ryft-pay-apple-pay-button',
|
|
178
|
+
) as HTMLButtonElement
|
|
179
|
+
if (googleButton) {
|
|
180
|
+
googleButton.disabled = !payButtonDisabled
|
|
181
|
+
googleButton.style.opacity = !payButtonDisabled ? '1' : '0.6'
|
|
182
|
+
}
|
|
183
|
+
if (appleButton) {
|
|
184
|
+
appleButton.disabled = !payButtonDisabled
|
|
185
|
+
appleButton.style.opacity = payButtonDisabled ? '1' : '0.6'
|
|
186
|
+
}
|
|
187
|
+
if (formBox) {
|
|
188
|
+
formBox.style.display = payButtonDisabled ? 'block' : 'none'
|
|
189
|
+
}
|
|
190
|
+
const applePayButton = document.createElement('button')
|
|
191
|
+
applePayButton.style.opacity = payButtonDisabled ? '1' : '0.6'
|
|
192
|
+
}, [payButtonDisabled])
|
|
193
|
+
|
|
164
194
|
useEffect(() => {
|
|
165
195
|
if (!accountId.data?.account_id || accountId.isError) return
|
|
166
196
|
initRyft(
|