@alipay/ams-checkout
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -1,16 +0,2 @@ | ||
export declare const requestHost: { | ||
[key: string]: string; | ||
}; | ||
export declare const clientId = "5J5Y8X4E2Y25GR00690"; | ||
export declare const tntInstId = "ALIPW3SG"; | ||
export declare const appId = "ANTOM_PAYMENT_WEB"; | ||
export declare const sofaId: any; | ||
export declare const closeImg = "https://file.page.alipay.net/resource/2023/3/21/3235f64c-84a6-4e33-9567-4cedf0960229.svg"; | ||
export declare const hostSignMap: (hostSign: string | undefined, env: string) => string; | ||
export declare const lightSandboxMap: (operationType: string | undefined, env: string) => { | ||
appId: string; | ||
sofaId: any; | ||
baseURL: string; | ||
'Operation-Type': string; | ||
}; | ||
export declare const marmptMap: Record<string, string>; | ||
export declare const sdkVersion: string; |
@@ -8,64 +8,11 @@ /** | ||
*/ | ||
import packageJSON from "../../package.json"; | ||
import { queryParse } from "../util"; | ||
var _queryParse = queryParse(), | ||
_light_sandbox = _queryParse._light_sandbox, | ||
groupId = _queryParse.groupId, | ||
host = _queryParse.requestHost; | ||
export var requestHost = { | ||
local: 'http://imgs-1164.gz00b.dev.alipay.net/mgw.htm', | ||
dev: host || 'http://imgs-1164.gz00b.dev.alipay.net/mgw.htm', | ||
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm', | ||
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm', | ||
prod: 'https://imgs-sea-global.alipay.com/mgw.htm', | ||
sandbox: 'https://imgs-sea-global.alipay.com/mgw.htm' | ||
import json from "../../package.json"; | ||
export var marmptMap = { | ||
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app', | ||
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app', | ||
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
prod: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app' | ||
}; | ||
export var clientId = '5J5Y8X4E2Y25GR00690'; | ||
export var tntInstId = 'ALIPW3SG'; | ||
export var appId = 'ANTOM_PAYMENT_WEB'; | ||
export var sofaId = groupId || 'GROUP_20230523202227'; // 2.0 | ||
export var closeImg = 'https://file.page.alipay.net/resource/2023/3/21/3235f64c-84a6-4e33-9567-4cedf0960229.svg'; | ||
export var hostSignMap = function hostSignMap(hostSign, env) { | ||
var map = { | ||
SG: 'https://imgs-sea-global.alipay.com/mgw.htm', | ||
US: 'https://imgs-na-global.alipay.com/mgw.htm', | ||
DE: 'https://imgs-de-global.alipay.com/mgw.htm' | ||
}; | ||
var preMap = { | ||
SG: 'https://imgs-sea-pre.alipay.com/mgw.htm', | ||
US: 'https://imgs-pre.alipay.com/mgw.htm', | ||
DE: 'https://imgs-de-pre.alipay.com/mgw.htm' | ||
}; | ||
if (env === 'prod' || env === 'sandbox' || env === 'light_sandbox') { | ||
return map[hostSign || 'SG']; | ||
} else if (env === 'pre') { | ||
return preMap[hostSign || 'SG']; | ||
} else return ''; | ||
}; | ||
export var lightSandboxMap = function lightSandboxMap() { | ||
var operationType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; | ||
var env = arguments.length > 1 ? arguments[1] : undefined; | ||
var map = { | ||
pre: 'https://imgs-sea-pre.alipay.com/mgw.htm', | ||
sit: host || 'http://imgs-9.sggz00a.test.alipay.net/mgw.htm', | ||
dev: host || 'http://imgs-13.sggz00b.stable.alipay.net/mgw.htm' | ||
}; | ||
var typeMap = { | ||
'com.ipay.iexpcashier.sdkAction.query': 'com.ipay.iopensandbox.sdk.paymentSession.query' | ||
}; | ||
var appId = 'SDK_MOCK_SANDBOX'; | ||
var sofaId = groupId || 'GROUP_20230315210531'; | ||
if (typeMap[operationType] && env === 'light_sandbox' || _light_sandbox === 'true') return { | ||
appId: appId, | ||
sofaId: sofaId, | ||
baseURL: map[env], | ||
'Operation-Type': typeMap[operationType] | ||
};else return { | ||
appId: '', | ||
sofaId: '', | ||
baseURL: '', | ||
'Operation-Type': '' | ||
}; | ||
}; | ||
export var sdkVersion = packageJSON.version; | ||
export var sdkVersion = json.version; |
@@ -135,2 +135,3 @@ /** | ||
}; | ||
export declare const closeImg = "https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg"; | ||
export declare const LOADINGIMG = "data:image/png;base64,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"; |
@@ -135,2 +135,3 @@ /** | ||
}; | ||
export var closeImg = 'https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg'; | ||
export var LOADINGIMG = 'data:image/png;base64,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'; |
@@ -8,3 +8,3 @@ /** | ||
*/ | ||
import { componentNameEnum, IcreateComponent, optionsParams } from '../../types'; | ||
import { IcreateComponent, optionsParams } from '../../types'; | ||
export declare const mixinComponentConstructor: (options: optionsParams, context: any) => void; | ||
@@ -15,5 +15,5 @@ /** | ||
*/ | ||
export declare const createComponent: (componentNameOrParams: string | componentNameEnum | IcreateComponent, params?: IcreateComponent) => Promise<void>; | ||
export declare const createComponent: (params: IcreateComponent) => Promise<void>; | ||
export interface IcreateComponentFunc { | ||
(componentName: string | componentNameEnum, params: IcreateComponent): Promise<any>; | ||
(params: IcreateComponent): Promise<void>; | ||
} |
@@ -1,3 +0,1 @@ | ||
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } | ||
@@ -9,4 +7,2 @@ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } | ||
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } | ||
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } | ||
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; } | ||
/** | ||
@@ -22,19 +18,13 @@ * Copyright (c) 2022 International Business Group, Ant Group. All rights reserved. | ||
import ComponentApp from "../../plugin/component"; | ||
import { componentNameEnum, mode, networkMode, paymentMethodCategoryTypeEnum, productSceneEnum } from "../../types"; | ||
import { componentSignEnum, mode, networkMode, productSceneEnum } from "../../types"; | ||
import { isPC } from "../../util"; | ||
import { createIframeNode } from "../../util/createIframeNode"; | ||
var getComponentSign = function getComponentSign(params) { | ||
var _ref = params || {}, | ||
_ref$paymentSessionCo = _ref.paymentSessionConfig, | ||
_ref$paymentSessionCo2 = _ref$paymentSessionCo === void 0 ? {} : _ref$paymentSessionCo, | ||
_ref$paymentSessionCo3 = _ref$paymentSessionCo2.productScene, | ||
productScene = _ref$paymentSessionCo3 === void 0 ? '' : _ref$paymentSessionCo3, | ||
_ref$paymentSessionCo4 = _ref$paymentSessionCo2.paymentMethodCategoryType, | ||
paymentMethodCategoryType = _ref$paymentSessionCo4 === void 0 ? '' : _ref$paymentSessionCo4; | ||
if (productScene === productSceneEnum.EASY_PAY) return componentNameEnum.easyPay; | ||
if (productScene === productSceneEnum.CASHIER_PAYMENT && paymentMethodCategoryType === paymentMethodCategoryTypeEnum.CARD) return componentNameEnum.card; | ||
if (productScene === productSceneEnum.AUTO_DEBIT) { | ||
return componentNameEnum.autoDebit; | ||
} | ||
return ''; | ||
var _params$paymentSessio = params.paymentSessionConfig, | ||
_params$paymentSessio2 = _params$paymentSessio === void 0 ? {} : _params$paymentSessio, | ||
_params$paymentSessio3 = _params$paymentSessio2.productScene, | ||
productScene = _params$paymentSessio3 === void 0 ? '' : _params$paymentSessio3, | ||
_params$paymentSessio4 = _params$paymentSessio2.paymentMethodCategoryType, | ||
paymentMethodCategoryType = _params$paymentSessio4 === void 0 ? '' : _params$paymentSessio4; | ||
return productScene && paymentMethodCategoryType ? "".concat(productScene, "_").concat(paymentMethodCategoryType) : componentSignEnum.NONE; | ||
}; | ||
@@ -50,3 +40,3 @@ var parsePaymentSessionData = function parsePaymentSessionData(paymentSessionData) { | ||
// pc easy-pay&2.0 走 1.0 的支付逻辑 | ||
// pc easy-pay execute 1.0 Process | ||
var resetEasyPaySceneVersion = function resetEasyPaySceneVersion(parseData) { | ||
@@ -60,2 +50,10 @@ if (isPC() && parseData !== null && parseData !== void 0 && parseData.paymentSessionConfig) { | ||
}; | ||
var handlePaymentSessionData = function handlePaymentSessionData(originPaymentSessionData) { | ||
var _parsePaymentSessionD = parsePaymentSessionData(originPaymentSessionData), | ||
_parsePaymentSessionD2 = _slicedToArray(_parsePaymentSessionD, 2), | ||
parseData = _parsePaymentSessionD2[0], | ||
paymentSessionData = _parsePaymentSessionD2[1]; | ||
resetEasyPaySceneVersion(parseData); | ||
return [parseData, paymentSessionData]; | ||
}; | ||
export var mixinComponentConstructor = function mixinComponentConstructor(options, context) { | ||
@@ -73,72 +71,35 @@ // Instantiate the plug-in and set render | ||
*/ | ||
export var createComponent = /*#__PURE__*/function () { | ||
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(componentNameOrParams, params) { | ||
var _this = this; | ||
var _params; | ||
return _regeneratorRuntime().wrap(function _callee$(_context) { | ||
while (1) switch (_context.prev = _context.next) { | ||
case 0: | ||
this.options.mode = mode.component; | ||
this.options.networkMode = this.options.networkMode || networkMode.session; | ||
if (!(typeof componentNameOrParams === 'string' && params)) { | ||
_context.next = 8; | ||
break; | ||
} | ||
_params = params; | ||
if (componentNameOrParams in componentNameEnum) { | ||
_context.next = 6; | ||
break; | ||
} | ||
return _context.abrupt("return", Promise.reject(ERRORMESSAGE.CREATECOMPONENT_ERROR)); | ||
case 6: | ||
_context.next = 9; | ||
break; | ||
case 8: | ||
_params = componentNameOrParams; | ||
case 9: | ||
if (!(_params && !_params.paymentSessionData)) { | ||
_context.next = 11; | ||
break; | ||
} | ||
return _context.abrupt("return", Promise.reject(ERRORMESSAGE.CREATECOMPONENT_ERROR)); | ||
case 11: | ||
if (!(this.options.networkMode === networkMode.proxy)) { | ||
_context.next = 16; | ||
break; | ||
} | ||
console.warn(ERRORMESSAGE.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage); | ||
return _context.abrupt("return", Promise.reject(ERRORMESSAGE.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT)); | ||
case 16: | ||
return _context.abrupt("return", new Promise(function (resolve, reject) { | ||
var _parsePaymentSessionD = parsePaymentSessionData(_params.paymentSessionData), | ||
_parsePaymentSessionD2 = _slicedToArray(_parsePaymentSessionD, 2), | ||
parseData = _parsePaymentSessionD2[0], | ||
paymentSessionData = _parsePaymentSessionD2[1]; | ||
resetEasyPaySceneVersion(parseData); | ||
var componentName = typeof componentNameOrParams === 'string' ? componentNameOrParams : getComponentSign(parseData); | ||
if (componentName === '') { | ||
// eslint-disable-next-line prefer-promise-reject-errors | ||
reject("".concat(ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.errorCode, "\uFF1AAbnormal response data, interface failure, or unsupported payment method")); | ||
return; | ||
} | ||
_params.paymentSessionData = paymentSessionData; | ||
_params.paymentSessionMetaData = parseData; | ||
try { | ||
var componentApp = _this._getPlugin(COMPONENTPLUGINID); | ||
componentApp.appendIframeNodes(componentName, _params).then(function () { | ||
resolve(); | ||
}); | ||
} catch (error) { | ||
reject(error); | ||
} | ||
})); | ||
case 17: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
}, _callee, this); | ||
})); | ||
return function createComponent(_x, _x2) { | ||
return _ref2.apply(this, arguments); | ||
}; | ||
}(); | ||
export var createComponent = function createComponent(params) { | ||
var _this = this; | ||
this.options.mode = mode.component; | ||
this.options.networkMode = this.options.networkMode || networkMode.session; | ||
var _params = params; | ||
if (_params && !_params.paymentSessionData) { | ||
return Promise.reject(ERRORMESSAGE.CREATECOMPONENT_ERROR); | ||
} | ||
if (this.options.networkMode === networkMode.proxy) { | ||
console.warn(ERRORMESSAGE.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT.errorMessage); | ||
return Promise.reject(ERRORMESSAGE.INIT_PARAMETER_ERROR.NET_MODE_NOT_SUPPORT); | ||
} | ||
return new Promise(function (resolve, reject) { | ||
var _handlePaymentSession = handlePaymentSessionData(_params.paymentSessionData), | ||
_handlePaymentSession2 = _slicedToArray(_handlePaymentSession, 2), | ||
parseData = _handlePaymentSession2[0], | ||
paymentSessionData = _handlePaymentSession2[1]; | ||
var componentSign = getComponentSign(parseData); | ||
if (componentSign === componentSignEnum.NONE) { | ||
// eslint-disable-next-line prefer-promise-reject-errors | ||
return reject("".concat(ERRORMESSAGE.CREATEPAYMENT_PARAMETER_ERROR.errorCode, "\uFF1AAbnormal response data, interface failure, or unsupported payment method")); | ||
} | ||
_params.paymentSessionData = paymentSessionData; | ||
_params.paymentSessionMetaData = parseData; | ||
try { | ||
var componentApp = _this._getPlugin(COMPONENTPLUGINID); | ||
componentApp.appendIframeNodes(componentSign, _params).then(function () { | ||
resolve(); | ||
}); | ||
} catch (error) { | ||
reject(error); | ||
} | ||
}); | ||
}; |
@@ -1,2 +0,2 @@ | ||
import type { AMSCheckoutOptions, callOnError, callOnSizeChanged, checkoutState, optionsParams } from '../../types/index'; | ||
import type { AMSCheckoutOptions, callOnError, callOnLog, callOnSizeChanged, checkoutState, optionsParams } from '../../types/index'; | ||
import { EventCenter } from '../../util/index'; | ||
@@ -55,14 +55,6 @@ export default class AMSSDK { | ||
/** | ||
* @description Create an event handler, called when the checkout view is available for interaction. | ||
* mode: dropin | ||
*/ | ||
/** | ||
* @description Create an event handler, called after the user selects the payment method | ||
* mode: dropin | ||
*/ | ||
/** | ||
* @description Create an event handler | ||
*/ | ||
onSizeChanged(event: callOnSizeChanged): void; | ||
onLog(event: callOnSizeChanged): void; | ||
onLog(event: callOnLog): void; | ||
} |
@@ -126,6 +126,2 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
} | ||
if (options !== null && options !== void 0 && options.onReady) { | ||
if (getType(options.onReady) !== 'function') throw new Error(ERRORMESSAGE.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage); | ||
this._overrideSubscription(EVENT.ready.name, options.onReady, EVENT.ready.uniqueKey); | ||
} | ||
if (options !== null && options !== void 0 && options.onSizeChanged) { | ||
@@ -244,20 +240,2 @@ if (getType(options.onSizeChanged) !== 'function') throw new Error(ERRORMESSAGE.INIT_PARAMETER_ERROR.EVENT_ERROR.errorMessage); | ||
/** | ||
* @description Create an event handler, called when the checkout view is available for interaction. | ||
* mode: dropin | ||
*/ | ||
// onReady(event: () => void) { | ||
// this._overrideSubscription(EVENT.ready.name, event, EVENT.ready.uniqueKey); | ||
// } | ||
/** | ||
* @description Create an event handler, called after the user selects the payment method | ||
* mode: dropin | ||
*/ | ||
// onPaymentMethodSelected(event: callonPaymentMethodSelected) { | ||
// this._overrideSubscription( | ||
// EVENT.paymentMethodSelected.name, | ||
// event, | ||
// EVENT.paymentMethodSelected.uniqueKey, | ||
// ); | ||
// } | ||
/** | ||
* @description Create an event handler | ||
@@ -264,0 +242,0 @@ */ |
@@ -1,7 +0,7 @@ | ||
import { Ianalytics } from '../../types'; | ||
export declare const getAppPath: (environment: string | undefined, appVersion: string, componentName: string, productSceneVersion: string, extendInfo: string) => any; | ||
import { componentSignEnum, Ianalytics } from '../../types'; | ||
export declare const getAppPath: (environment: string | undefined, appVersion: string, componentSign: componentSignEnum, productSceneVersion: string, extendInfo: string) => any; | ||
export declare const getAppDomain: (domainParams: { | ||
environment: string; | ||
appVersion: string; | ||
componentName: string; | ||
componentSign: componentSignEnum; | ||
productSceneVersion: string; | ||
@@ -11,4 +11,3 @@ extendInfo: string; | ||
export declare const getIframeUrl: (iframeParams: { | ||
componentName: string; | ||
appearance: Record<string, string>; | ||
componentSign: componentSignEnum; | ||
analytics?: Ianalytics; | ||
@@ -15,0 +14,0 @@ productSceneVersion: string; |
@@ -12,10 +12,28 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
*/ | ||
import { sdkVersion } from "../../config/index"; | ||
import { componentNameEnum } from "../../types"; | ||
import { marmptMap, sdkVersion } from "../../config/index"; | ||
import { componentSignEnum } from "../../types"; | ||
import { getViewPort, queryParse, serialize } from "../../util/index"; | ||
var getAppVersion = function getAppVersion(_extendInfo) { | ||
try { | ||
var info = JSON.parse(_extendInfo); | ||
return info.versionMap.web[sdkVersion].targetWebVerison; | ||
} catch (error) { | ||
return ''; | ||
} | ||
}; | ||
var getFinalProductSceneVersion = function getFinalProductSceneVersion(componentSign, productSceneVersion) { | ||
var _signSupportMap; | ||
var signSupportMap = (_signSupportMap = {}, _defineProperty(_signSupportMap, componentSignEnum.NONE, ['']), _defineProperty(_signSupportMap, componentSignEnum.AUTO_DEBIT_WALLET, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.CASHIER_PAYMENT_BANK, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.CASHIER_PAYMENT_CARD, ['1.0']), _defineProperty(_signSupportMap, componentSignEnum.EASY_PAY_WALLET, ['1.0', '2.0']), _signSupportMap); | ||
var supportProductSceneVersion = signSupportMap[componentSign]; | ||
// 从左到右,从旧到新 | ||
var isSupport = supportProductSceneVersion.find(function (it) { | ||
return it === productSceneVersion; | ||
}); | ||
var finalProductSceneVersion = supportProductSceneVersion[supportProductSceneVersion.length - 1]; | ||
return isSupport ? productSceneVersion : finalProductSceneVersion; | ||
}; | ||
export var getAppPath = function getAppPath() { | ||
var _componentMap; | ||
var environment = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'prod'; | ||
var appVersion = arguments.length > 1 ? arguments[1] : undefined; | ||
var componentName = arguments.length > 2 ? arguments[2] : undefined; | ||
var componentSign = arguments.length > 2 ? arguments[2] : undefined; | ||
var productSceneVersion = arguments.length > 3 ? arguments[3] : undefined; | ||
@@ -25,39 +43,5 @@ var extendInfo = arguments.length > 4 ? arguments[4] : undefined; | ||
urlTestHost = _ref.host; | ||
var host = ''; | ||
var getAppVersion = function getAppVersion(_extendInfo) { | ||
try { | ||
var info = JSON.parse(_extendInfo); | ||
return info.versionMap.web[sdkVersion].targetWebVerison || appVersion; | ||
} catch (error) { | ||
return appVersion; | ||
} | ||
}; | ||
var marmptMap = { | ||
dev: 'http://page.alipay.net/page/antom-web-checkout/src/component-app', | ||
sit: 'http://page.test.alipay.net/page/antom-web-checkout/src/component-app', | ||
pre: 'https://pre.ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
light_sandbox: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app', | ||
prod: 'https://ac.alipay.com/page/antom-web-checkout/src/component-app' | ||
}; | ||
var finalAppVersion = getAppVersion(extendInfo); | ||
var getFinalProductSceneVersion = function getFinalProductSceneVersion(supportProductSceneVersion) { | ||
// 从左到右,从旧到新 | ||
var isSupport = supportProductSceneVersion.find(function (it) { | ||
return it === productSceneVersion; | ||
}); | ||
var finalProductSceneVersion = supportProductSceneVersion[supportProductSceneVersion.length - 1]; | ||
if (isSupport) finalProductSceneVersion = productSceneVersion; | ||
return finalProductSceneVersion; | ||
}; | ||
var componentMap = (_componentMap = {}, _defineProperty(_componentMap, componentNameEnum.card, function () { | ||
host = "".concat(marmptMap[environment], "/").concat(componentNameEnum.card, "/index.").concat(finalAppVersion, ".html"); | ||
}), _defineProperty(_componentMap, componentNameEnum.easyPay, function () { | ||
var finalProductSceneVersion = getFinalProductSceneVersion(['1.0', '2.0']); | ||
host = "".concat(marmptMap[environment], "/").concat(componentNameEnum.easyPay, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html"); | ||
}), _defineProperty(_componentMap, componentNameEnum.autoDebit, function () { | ||
var finalProductSceneVersion = getFinalProductSceneVersion(['1.0']); | ||
host = "".concat(marmptMap[environment], "/").concat(componentNameEnum.autoDebit, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html"); | ||
}), _componentMap); | ||
if (componentMap[componentName]) componentMap[componentName](); | ||
var finalAppVersion = getAppVersion(extendInfo) || appVersion; | ||
var finalProductSceneVersion = getFinalProductSceneVersion(componentSign, productSceneVersion); | ||
// only for test while testurl?host=https://xxxxx.test.html | ||
@@ -67,3 +51,3 @@ if (urlTestHost && !['sandbox', 'light_sandbox', 'prod'].includes(environment)) { | ||
} | ||
return host; | ||
return "".concat(marmptMap[environment], "/").concat(componentSign, "/").concat(finalProductSceneVersion, "/index.").concat(finalAppVersion, ".html"); | ||
}; | ||
@@ -73,12 +57,11 @@ export var getAppDomain = function getAppDomain(domainParams) { | ||
appVersion = domainParams.appVersion, | ||
componentName = domainParams.componentName, | ||
componentSign = domainParams.componentSign, | ||
productSceneVersion = domainParams.productSceneVersion, | ||
extendInfo = domainParams.extendInfo; | ||
var reg = /^https?:\/\/([^/<>\s]+\.?)*/; | ||
var macth = reg.exec(getAppPath(environment, appVersion, componentName, productSceneVersion, extendInfo)); | ||
var macth = reg.exec(getAppPath(environment, appVersion, componentSign, productSceneVersion, extendInfo)); | ||
return macth && macth[0] || ''; | ||
}; | ||
export var getIframeUrl = function getIframeUrl(iframeParams) { | ||
var componentName = iframeParams.componentName, | ||
appearance = iframeParams.appearance, | ||
var componentSign = iframeParams.componentSign, | ||
_iframeParams$analyti = iframeParams.analytics, | ||
@@ -94,3 +77,3 @@ analytics = _iframeParams$analyti === void 0 ? { | ||
instanceId = iframeParams.instanceId; | ||
var path = getAppPath(environment, appVersion, componentName, productSceneVersion, extendInfo || ''); | ||
var path = getAppPath(environment, appVersion, componentSign, productSceneVersion, extendInfo || ''); | ||
var initialScale = 1; | ||
@@ -106,3 +89,3 @@ var scale = getViewPort('initial-scale') || initialScale; | ||
LOCAL_MOCK = _queryParse.LOCAL_MOCK; | ||
var urlParams = Object.assign({ | ||
var urlParams = Object.assign({}, { | ||
locale: locale, | ||
@@ -119,3 +102,3 @@ scale: scale, | ||
LOCAL_MOCK: LOCAL_MOCK | ||
}, appearance); | ||
}); | ||
var locationSearch = serialize(urlParams); | ||
@@ -122,0 +105,0 @@ return "".concat(path, "?").concat(locationSearch); |
@@ -9,3 +9,3 @@ /** | ||
var componentCss = ".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translateX(-50%) translateY(-50%) scale(1);\n opacity: 1\n }\n\n 80% {\n opacity: 0\n }\n \n 100% {\n opacity: 0;\n transform: translateX(-50%) translateY(-50%) scale(0.4);\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translateX(-50%) translateY(-50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** \u52A0\u8F7D\u52A8\u753B **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 600;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 600;\n text-align: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n}\n\n"; | ||
var componentCss = ".ams-component-container-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n}\n.ams-component-container-mobile-animation{\n animation: ams-component-container-slide-in 0.3s ease-in-out;\n}\n\n.ams-component-section-desktop {\n font-size: 0;\n}\n\n.ams-component-container-hidden-mobile {\n width: 100%;\n height: 1px;\n position: fixed;\n bottom: -1px;\n left: 0;\n z-index: 1001;\n background-color: transparent;\n border-radius: 12px 12px 0 0;\n animation: ams-component-container-slide-out 0.26s ease-in forwards;\n overflow: hidden;\n}\n\n.ams-component-section-mobile {\n border-radius: 12px 12px 0 0;\n overflow: hidden;\n font-size: 0;\n}\n\n.ams-component-container-desktop {\n display: block;\n width: 672px;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n transform-origin: 50% 50%;\n}\n.ams-component-container-desktop-animation{\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n@keyframes ams-component-container-zoom-out {\n 0% {\n transform: translate(-50%, -50%) scale(1);\n -webkit-transform: translate(-50%, -50%) scale(1);\n opacity: 1\n }\n \n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.4);\n -webkit-transform: translate(-50%, -50%) scale(0.4);\n }\n}\n\n@keyframes ams-component-container-zoom-in {\n 0% {\n transform: translateX(-50%) translateY(-50%) scale(0.4);\n opacity: 0\n }\n\n 80% {\n opacity: 1\n }\n\n 100% {\n opacity: 1;\n transform: translateX(-50%) translateY(-50%) scale(1);\n }\n}\n\n.ams-component-container-hidden-desktop {\n display: block;\n position: fixed;\n top: 50%;\n left: 50%;\n z-index: 1001;\n border-radius: 8px;\n overflow: hidden;\n animation-fill-mode: forwards;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n transform-origin: 50% 50%;\n}\n\n.ams-component-loading {\n width: 0.8em;\n height:0.8em;\n background: rgba(0, 0, 0, 0.5);\n border-radius: 8px;\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n z-index: 1001;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n}\n\n.ams-component-loading .line {\n width: 40px;\n height: 40px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.ams-component-loading .line div {\n position: absolute;\n left: 17.67px;\n top: 0;\n width: 5.33px;\n height: 40px;\n}\n\n.ams-component-loading .line div:before,\n.ams-component-loading .line div:after {\n content: '';\n display: block;\n height: 13.33px;\n background: #fcfcfc;\n border-radius: 5.3px;\n}\n.ams-component-loading .line div:after {\n margin-top: 13.33px;\n}\n\n.ams-component-loading .line div:nth-child(2) {\n -webkit-transform: rotate(45deg);\n}\n\n.ams-component-loading .line div:nth-child(3) {\n -webkit-transform: rotate(90deg);\n}\n\n.ams-component-loading .line div:nth-child(4) {\n -webkit-transform: rotate(135deg);\n}\n\n/** \u52A0\u8F7D\u52A8\u753B **/\n@-webkit-keyframes load {\n 0% {\n opacity: 0;\n }\n\n 100% {\n opacity: 1;\n }\n\n}\n\n.ams-component-loading .line div:nth-child(1):before {\n -webkit-animation: load 1s linear 0s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):before {\n -webkit-animation: load 1s linear 0.125s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):before {\n -webkit-animation: load 1s linear 0.25s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):before {\n -webkit-animation: load 1s linear 0.375s infinite;\n}\n\n.ams-component-loading .line div:nth-child(1):after {\n -webkit-animation: load 1s linear 0.5s infinite;\n}\n\n.ams-component-loading .line div:nth-child(2):after {\n -webkit-animation: load 1s linear 0.675s infinite;\n}\n\n.ams-component-loading .line div:nth-child(3):after {\n -webkit-animation: load 1s linear 0.75s infinite;\n}\n\n.ams-component-loading .line div:nth-child(4):after {\n -webkit-animation: load 1s linear 0.875s infinite;\n}\n\n.ams-component-loading-logo {\n width: 0.44em;\n height: 0.44em;\n -webkit-transform:rotate(360deg);\n transform:rotate(360deg);\n -webkit-transition:-webkit-transform 1s linear;\n transition:transform 1s linear;\n animation: ams-component-loading-logo 1s linear infinite;\n}\n\n.asm-component-close-block-desktop {\n position: absolute;\n width: 40px;\n height: 40px;\n right: 0;\n top: 0;\n cursor: pointer;\n}\n.asm-component-close-btn-desktop {\n width: 11px;\n height: 11px;\n object-fit: fill;\n position: absolute;\n right: 18.7px;\n top: 26.7px;\n}\n.asm-component-close-block-hidden {\n width: 0px !important;\n height: 0px !important;\n visibility: hidden;\n}\n.asm-component-close-block-mobile {\n position: absolute;\n width: 0.4em;\n height: 0.4em;\n right: 0;\n top: 0;\n cursor: pointer;\n z-index: 1009;\n}\n\n.asm-component-close-btn-mobile {\n width: 0.11em;\n height: 0.11em;\n object-fit: fill;\n position: absolute;\n right: 0.147em;\n top: 0.167em;\n}\n\n\n.ams-component-container-opacity{\n opacity: 1;\n}\n\n.ams-component-container-opacity:after{\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n display: block;\n content: \"\";\n z-index: 1010;\n background-color: rgba(0, 0, 0, 0.35);\n}\n\n#ams-component-retention {\n position: fixed;\n left: 50%;\n top: 50%;\n transform: translate(-50%, -50%);\n transform-origin: 50%;\n height: auto;\n display: none;\n z-index: 1009;\n}\n\n.ams-component-retention-show {\n display: flex !important;\n animation: ams-component-container-zoom-in 0.3s ease-in-out;\n animation-fill-mode: forwards\n}\n\n.ams-component-retention-hidden {\n display: flex !important;\n animation: ams-component-container-zoom-out 0.3s ease-in-out;\n -webkit-animation: ams-component-container-zoom-out 0.3s ease-in-out;\n animation-fill-mode: forwards;\n -webkit-animation-fill-mode: forwards;\n}\n\n.ams-component-retention-mobile {\n width: 294px;\n border-radius: 12px;\n padding: 24px 0;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n.ams-component-retention-desktop {\n width: 544px;\n border-radius: 12px;\n padding: 32px;\n background-color: #fff;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n box-sizing: border-box;\n}\n\n@media screen and (max-width: 300px) {\n .ams-component-retention-mobile {\n transform: translate(-50%, -50%) scale(0.8);\n }\n}\n\n.ams-component-retention-title-mobile {\n width: 100%;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-title-desktop {\n text-align: left;\n width: 100%;\n font-style: normal;\n font-weight: 600;\n font-size: 16px;\n line-height: 24px;\n color: #2A3A52;\n}\n\n.ams-component-retention-sub-title-mobile {\n width: 100%;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 8px;\n text-align: center;\n padding: 0 16px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-sub-title-desktop {\n text-align: left;\n font-style: normal;\n font-weight: 400;\n font-size: 14px;\n line-height: 20px;\n color: #7C8CA3;\n margin-top: 10px;\n}\n\n.ams-component-retention-btn-block-mobile {\n width: 100%;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n margin-top: 24px;\n padding: 0 24px;\n box-sizing: border-box;\n}\n\n.ams-component-retention-btn-block-desktop {\n width: 100%;\n margin-top: 24px;\n}\n\n#ams-component-retention-remain {\n background: #0079FF;\n border-radius: 100px;\n font-style: normal;\n font-weight: 600;\n text-align: center;\n box-sizing: border-box;\n color: #FFFFFF;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-remain-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n padding: 0 6px;\n}\n\n.ams-component-retention-remain-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n display: inline-block;\n padding: 0 24px;\n float: right;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n\n#ams-component-retention-leave {\n border-radius: 100px;\n border: 1px solid #0079FF;\n font-style: normal;\n font-weight: 600;\n text-align: center;\n box-sizing: border-box;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.ams-component-retention-leave-mobile {\n width: 100%;\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n margin-top: 12px;\n padding: 0 6px;\n}\n\n.ams-component-retention-leave-desktop {\n height: 44px;\n font-size: 16px;\n line-height: 44px;\n color: #1677FF;\n display: inline-block;\n padding: 0 24px;\n float: right;\n margin-right: 16px;\n cursor: pointer;\n padding: 0 8px;\n max-width: 225px;\n}\n\n"; | ||
export function componentAddCSS() { | ||
@@ -12,0 +12,0 @@ var style = document.createElement('style'); |
import type AMSCheckout from '../../core/instance'; | ||
import type { IappendIframeNodesParams, IcreateComponent } from '../../types'; | ||
import { componentNameEnum } from '../../types'; | ||
import { CashierSdkActionQueryResult, componentSignEnum } from '../../types'; | ||
export default class ComponentApp { | ||
@@ -15,3 +15,3 @@ app: any; | ||
private _renderParams; | ||
private _componentName; | ||
private _componentSign; | ||
private _performanceData; | ||
@@ -36,3 +36,3 @@ private _isInitComponent; | ||
*/ | ||
appendIframeNodes(componentName: componentNameEnum, renderParams: IappendIframeNodesParams): Promise<void | [void, any]>; | ||
appendIframeNodes(componentSign: componentSignEnum, renderParams: IappendIframeNodesParams): Promise<void | [void, CashierSdkActionQueryResult | null]>; | ||
/** | ||
@@ -39,0 +39,0 @@ * @description Interface request |
@@ -20,5 +20,5 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); } | ||
/* eslint-disable no-console */ | ||
import { COMPONENTPLUGINID, ERRORMESSAGE, EVENT } from "../../constant"; | ||
import { closeImg, COMPONENTPLUGINID, ERRORMESSAGE, EVENT } from "../../constant"; | ||
import { queryPaymentInfo } from "../../service"; | ||
import { componentNameEnum, messageName, Target } from "../../types"; | ||
import { componentSignEnum, messageName, productSceneEnum, Target } from "../../types"; | ||
import { getDesignFontSize, getType, isJsonString, isPC } from "../../util"; | ||
@@ -62,7 +62,7 @@ import { isLocalMock } from "../../util/mock"; | ||
_defineProperty(this, "_renderParams", null); | ||
_defineProperty(this, "_componentName", ''); | ||
_defineProperty(this, "_componentSign", componentSignEnum.NONE); | ||
_defineProperty(this, "_performanceData", []); | ||
_defineProperty(this, "_isInitComponent", void 0); | ||
_defineProperty(this, "_clickEventName", void 0); | ||
this._appVersion = '1.3.1'; | ||
this._appVersion = '1.4.0'; | ||
this._isInitComponent = false; | ||
@@ -117,3 +117,3 @@ this._selector = '#ams-component-section'; | ||
key: "appendIframeNodes", | ||
value: function appendIframeNodes(componentName, renderParams) { | ||
value: function appendIframeNodes(componentSign, renderParams) { | ||
var _renderParams$appeara, | ||
@@ -124,3 +124,3 @@ _this = this; | ||
this._renderParams = renderParams; | ||
this._componentName = componentName; | ||
this._componentSign = componentSign; | ||
this._performanceData.push({ | ||
@@ -165,8 +165,13 @@ key: 'sdk_create_component', | ||
}; | ||
if (componentNameEnum.card === _this2._componentName) { | ||
/** | ||
* @description card | ||
*/ | ||
if (componentSignEnum.CASHIER_PAYMENT_CARD === _this2._componentSign) { | ||
params.paymentMethodType = 'CARD'; | ||
} | ||
if (componentNameEnum.easyPay === _this2._componentName) { | ||
/** | ||
* @description easyPay | ||
*/ | ||
if (componentSignEnum.EASY_PAY_WALLET === _this2._componentSign) { | ||
var _this2$_renderParams4; | ||
// if EASY_PAY 2.0 , no need to query payment request | ||
var _ref = params.paymentSessionConfig || {}, | ||
@@ -182,7 +187,7 @@ _ref$productSceneVers = _ref.productSceneVersion, | ||
autoDebitWithToken = _ref2$action2$autoDeb === void 0 ? false : _ref2$action2$autoDeb; | ||
if (productScene === 'EASY_PAY' && productSceneVersion === '2.0' && !autoDebitWithToken) { | ||
// make queryResult no data we setAppStateData in antom-web-checkout app, | ||
// eslint-disable-next-line no-promise-executor-return | ||
if (productScene === productSceneEnum.EASY_PAY && productSceneVersion === '2.0' && !autoDebitWithToken) { | ||
// if EASY_PAY 2.0 , no need to query payment request | ||
return resolve({ | ||
message: 'sdk no need to make query request' | ||
message: 'sdk no need to make query request', | ||
success: true | ||
}); | ||
@@ -193,13 +198,15 @@ } | ||
* @author tianqiang | ||
* @description 代扣逻辑处理 | ||
* @description autoDebit | ||
*/ | ||
if (componentNameEnum.autoDebit === _this2._componentName) { | ||
if (componentSignEnum.AUTO_DEBIT_WALLET === _this2._componentSign) { | ||
var _this2$_renderParams5, _this2$_renderParams6, _action$web, _action$wap; | ||
var action = ((_this2$_renderParams5 = _this2._renderParams) === null || _this2$_renderParams5 === void 0 ? void 0 : (_this2$_renderParams6 = _this2$_renderParams5.paymentSessionMetaData) === null || _this2$_renderParams6 === void 0 ? void 0 : _this2$_renderParams6.action) || {}; | ||
var signType = (isPC() ? action === null || action === void 0 ? void 0 : (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 ? void 0 : (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType) || ''; | ||
var signType = isPC() ? action === null || action === void 0 ? void 0 : (_action$web = action.web) === null || _action$web === void 0 ? void 0 : _action$web.signType : action === null || action === void 0 ? void 0 : (_action$wap = action.wap) === null || _action$wap === void 0 ? void 0 : _action$wap.signType; | ||
if (signType === 'SMS') { | ||
return resolve({ | ||
message: 'sdk no need to make query request' | ||
message: 'sdk no need to make query request', | ||
success: true | ||
}); | ||
} else if (!signType || signType !== 'REDIRECT') { | ||
} | ||
if (!signType || signType !== 'REDIRECT') { | ||
return resolve({ | ||
@@ -214,3 +221,4 @@ success: false | ||
return resolve({ | ||
message: 'sdk no need to make query request' | ||
message: 'sdk no need to make query request', | ||
success: true | ||
}); | ||
@@ -274,3 +282,3 @@ } | ||
appVersion: this._appVersion, | ||
componentName: this._componentName, | ||
componentSign: this._componentSign, | ||
productSceneVersion: productSceneVersion, | ||
@@ -281,4 +289,3 @@ extendInfo: extendInfo | ||
this.app.src = getIframeUrl({ | ||
componentName: this._componentName, | ||
appearance: (renderParams === null || renderParams === void 0 ? void 0 : renderParams.appearance) || {}, | ||
componentSign: this._componentSign, | ||
analytics: this.AMSSDK.options.analytics, | ||
@@ -341,5 +348,5 @@ productSceneVersion: productSceneVersion, | ||
value: function _addEventListener() { | ||
this._removeEventListener(); | ||
window["".concat(listenerPrefix, "_").concat(this.AMSSDK._instanceId)] = this.listener.bind(this); | ||
window["".concat(listenerPrefix, "_").concat(this.AMSSDK._instanceId, "_resize")] = this.resizeListener.bind(this); | ||
this._removeEventListener(); | ||
window.addEventListener('message', window["".concat(listenerPrefix, "_").concat(this.AMSSDK._instanceId)]); | ||
@@ -782,3 +789,3 @@ window.addEventListener('resize', window["".concat(listenerPrefix, "_").concat(this.AMSSDK._instanceId, "_resize")]); | ||
// close btn | ||
var closeBtnHTML = "<img class='asm-component-close-btn-".concat(this.platform, "' src=\"https://cdn.marmot-cloud.com/storage/2023/5/18/1692a487-99b5-4314-9d6f-e9814bc1ca41.svg\"/>"); | ||
var closeBtnHTML = "<img class='asm-component-close-btn-".concat(this.platform, "' src=\"").concat(closeImg, "\"/>"); | ||
var closeBlock = document.createElement('div'); | ||
@@ -785,0 +792,0 @@ closeBlock.classList.add("asm-component-close-block-".concat(this.platform), 'asm-component-close-block-hidden'); |
@@ -15,2 +15,2 @@ /** | ||
*/ | ||
export declare function request(requestData: Record<string, any> | undefined, options: RequestConfig): Promise<any>; | ||
export declare function request<T>(requestData: Record<string, any> | undefined, options: RequestConfig): Promise<T>; |
@@ -18,3 +18,4 @@ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, catch: function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; } | ||
import { appId, hostSignMap, lightSandboxMap, requestHost, sdkVersion, sofaId, tntInstId } from "../config"; | ||
import { sdkVersion } from "../config/index"; | ||
import { appId, hostSignMap, lightSandboxMap, requestHost, sofaId, tntInstId } from "../config/request"; | ||
import { ERROR } from "../types"; | ||
@@ -80,3 +81,3 @@ import { get } from "../util/get"; | ||
}, | ||
locale: window._amsSdkLanguage || 'en_US', | ||
locale: options.locale || 'en_US', | ||
deviceLanguage: navigator.language, | ||
@@ -134,7 +135,7 @@ screenWidth: screen.width, | ||
errorCode = (_error === null || _error === void 0 ? void 0 : _error.errorCode) || timeoutCode; | ||
return _context.abrupt("return", { | ||
return _context.abrupt("return", Promise.reject({ | ||
success: false, | ||
errorCode: errorCode, | ||
errorMessage: '' | ||
}); | ||
})); | ||
case 28: | ||
@@ -141,0 +142,0 @@ case "end": |
@@ -1,2 +0,2 @@ | ||
import { CashierSdkActionQueryRequest, RequestConfig } from '../types'; | ||
export declare function queryPaymentInfo(params?: CashierSdkActionQueryRequest, options?: RequestConfig): Promise<any>; | ||
import { CashierSdkActionQueryRequest, CashierSdkActionQueryResult, RequestConfig } from '../types'; | ||
export declare function queryPaymentInfo(params?: CashierSdkActionQueryRequest, options?: RequestConfig): Promise<CashierSdkActionQueryResult>; |
@@ -14,3 +14,2 @@ /** | ||
locale?: string; | ||
onReady?: any; | ||
onError?: callOnError; | ||
@@ -37,6 +36,8 @@ onSizeChanged?: callOnSizeChanged; | ||
} | ||
export declare enum componentNameEnum { | ||
'card' = "card", | ||
'easyPay' = "easyPay", | ||
'autoDebit' = "autoDebit" | ||
export declare enum componentSignEnum { | ||
'EASY_PAY_WALLET' = "EASY_PAY_WALLET", | ||
'CASHIER_PAYMENT_CARD' = "CASHIER_PAYMENT_CARD", | ||
'CASHIER_PAYMENT_BANK' = "CASHIER_PAYMENT_BANK", | ||
'AUTO_DEBIT_WALLET' = "AUTO_DEBIT_WALLET", | ||
'NONE' = "NONE" | ||
} | ||
@@ -50,3 +51,4 @@ export declare enum productSceneEnum { | ||
'CARD' = "CARD", | ||
'WALLET' = "WALLET" | ||
'WALLET' = "WALLET", | ||
'BANK' = "BANK" | ||
} | ||
@@ -126,3 +128,6 @@ export interface IcreateComponent { | ||
}) => void; | ||
export type callOnLog = (msg: string) => void; | ||
export type callOnLog = (state: { | ||
code: string; | ||
message: string; | ||
}) => void; | ||
export declare enum messageName { | ||
@@ -189,2 +194,19 @@ SDK_TO_APP = "SDK_TO_APP", | ||
} | ||
export interface CashierSdkActionQueryResult { | ||
supportedLanguages?: any[]; | ||
amountConfirmRequired?: boolean; | ||
orderAmount?: Record<string, string>; | ||
paymentMethodView?: Record<string, string>; | ||
autoDebitWithToken?: boolean; | ||
success: boolean; | ||
errorCode?: string; | ||
errorMessage?: string; | ||
message?: string; | ||
errorStatus?: string; | ||
redirectUrl?: string; | ||
normalUrl?: string; | ||
applinkUrl?: string; | ||
schemeUrl?: string; | ||
authUrl?: string; | ||
} | ||
declare global { | ||
@@ -191,0 +213,0 @@ interface Window { |
@@ -13,7 +13,9 @@ /** | ||
export var componentNameEnum = /*#__PURE__*/function (componentNameEnum) { | ||
componentNameEnum["card"] = "card"; | ||
componentNameEnum["easyPay"] = "easyPay"; | ||
componentNameEnum["autoDebit"] = "autoDebit"; | ||
return componentNameEnum; | ||
export var componentSignEnum = /*#__PURE__*/function (componentSignEnum) { | ||
componentSignEnum["EASY_PAY_WALLET"] = "EASY_PAY_WALLET"; | ||
componentSignEnum["CASHIER_PAYMENT_CARD"] = "CASHIER_PAYMENT_CARD"; | ||
componentSignEnum["CASHIER_PAYMENT_BANK"] = "CASHIER_PAYMENT_BANK"; | ||
componentSignEnum["AUTO_DEBIT_WALLET"] = "AUTO_DEBIT_WALLET"; | ||
componentSignEnum["NONE"] = "NONE"; | ||
return componentSignEnum; | ||
}({}); | ||
@@ -29,2 +31,3 @@ export var productSceneEnum = /*#__PURE__*/function (productSceneEnum) { | ||
paymentMethodCategoryTypeEnum["WALLET"] = "WALLET"; | ||
paymentMethodCategoryTypeEnum["BANK"] = "BANK"; | ||
return paymentMethodCategoryTypeEnum; | ||
@@ -31,0 +34,0 @@ }({}); |
@@ -1,1 +0,1 @@ | ||
{"name":"@alipay/ams-checkout","version":"1.3.2","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}} | ||
{"name":"@alipay/ams-checkout","version":"1.4.0","description":"","author":"","main":"esm/index.js","module":"esm/index.js","typings":"esm/index.d.ts","files":["dist","esm","LEGAL.md","LICENSE","README.md"],"scripts":{"build":"father build","ci":"npm run lint","cov":"jest --coverage","format":"prettier --write --no-error-on-unmatched-pattern \"**/*.{js,jsx,ts,tsx,md,json,css,less}\"","lint":"eslint ./src","test":"jest"},"dependencies":{"axios":"^1.3.4","uuid":"^9.0.0"},"devDependencies":{"@babel/core":"^7.20.7","@babel/preset-env":"^7.20.2","@testing-library/jest-dom":"^5.1.1","@testing-library/react":"^9.5.0","@types/jest":"^29.2.4","@types/uuid":"^9.0.0","@typescript-eslint/parser":"^5.60.0","babel-jest":"^29.3.1","babel-loader":"^9.1.0","babel-plugin-import":"^1.13.0","eslint":"^8.36.0","father":"^4.2.3","jest":"^29.5.0","jest-environment-jsdom":"^29.3.1","prettier":"^2.8.4","prettier-plugin-organize-imports":"^3.2.3","prettier-plugin-packagejson":"^2.4.5","ts-jest":"^29.0.3","ts-node":"^10.9.1","typescript":"^4.9.5"},"engines":{},"publishConfig":{"access":"public"}} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
62
0
419241
5231