@paypay/mini-app-js-sdk 1.24.0 → 1.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mini-app-js-sdk.browser.js +1 -1
- package/dist/mini-app-js-sdk.es.js +87 -74
- package/dist/mini-app-js-sdk.min.css +1 -1
- package/dist/model/makePayment.d.ts +9 -4
- package/dist/package/desktop-header/index.d.ts +3 -3
- package/dist/package/input/index.d.ts +3 -0
- package/dist/package/overlay/index.d.ts +4 -3
- package/dist/package/payment-method/Bank.vue.d.ts +1 -1
- package/dist/package/payment-method/CreditCard.vue.d.ts +1 -1
- package/dist/package/payment-method/SbidBank.vue.d.ts +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/utils/api.d.ts +2 -2
- package/dist/utils/create/bem.d.ts +1 -1
- package/dist/utils/create/index.d.ts +1 -1
- package/dist/utils/fetch.d.ts +1 -1
- package/dist/utils/helper.d.ts +6 -3
- package/dist/utils/popstateHandler.d.ts +2 -1
- package/dist/views/make-payment/Sheets/Charge/index.vue.d.ts +18 -10
- package/dist/views/make-payment/hooks/app-hooks.d.ts +9 -5
- package/package.json +1 -1
|
@@ -65,7 +65,7 @@ function normalizeNativeResponseData(data2) {
|
|
|
65
65
|
}
|
|
66
66
|
class JsBridge {
|
|
67
67
|
constructor(global2) {
|
|
68
|
-
this.version = "1.
|
|
68
|
+
this.version = "1.25.0";
|
|
69
69
|
this.messageHandlers = new Map();
|
|
70
70
|
this.responseCallbacks = new Map();
|
|
71
71
|
this.global = global2;
|
|
@@ -1335,8 +1335,8 @@ function formatNumber$3(value2, options) {
|
|
|
1335
1335
|
const numberWithCommas = (x = 0) => {
|
|
1336
1336
|
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
|
1337
1337
|
};
|
|
1338
|
-
function formatCurrency(val2, n
|
|
1339
|
-
const re =
|
|
1338
|
+
function formatCurrency(val2, n) {
|
|
1339
|
+
const re = `\\d(?=(\\d{3})+${n > 0 ? "\\." : "$"})`;
|
|
1340
1340
|
return val2 == null ? void 0 : val2.toFixed(Math.max(0, ~~n)).replace(new RegExp(re, "g"), "$&,");
|
|
1341
1341
|
}
|
|
1342
1342
|
function trigger$2(target, type) {
|
|
@@ -1517,7 +1517,7 @@ const opaUrl = () => {
|
|
|
1517
1517
|
const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
1518
1518
|
let headers = new Headers(__spreadValues({
|
|
1519
1519
|
"Content-Type": "application/json",
|
|
1520
|
-
"Client-Version": "1.
|
|
1520
|
+
"Client-Version": "1.25.0",
|
|
1521
1521
|
"Client-OS-Type": getRuntime()
|
|
1522
1522
|
}, customHeaders));
|
|
1523
1523
|
if (urlEndpoint === "web-api/app/v2/payment/methods" || urlEndpoint === "web-api/app/v2/payment/consult" || urlEndpoint === "web-api/app/v1/payment/cashbackDetail" || urlEndpoint === "web-api/app/v1/confirmAgeForCashback" || urlEndpoint === "web-api/app/v1/internal/request" || urlEndpoint === "web-api/app/v1/addressbyzip" || urlEndpoint === "/web-api/app/platform/v1/balance") {
|
|
@@ -1539,9 +1539,10 @@ const createHeaderMiniAppApi = (urlEndpoint, customHeaders) => {
|
|
|
1539
1539
|
function addParams(params) {
|
|
1540
1540
|
let paramString = "";
|
|
1541
1541
|
for (const key in params) {
|
|
1542
|
-
|
|
1542
|
+
const data2 = params[key];
|
|
1543
|
+
if (data2) {
|
|
1543
1544
|
paramString += paramString !== "" ? "&" : "?";
|
|
1544
|
-
paramString += `${key}=${encodeURIComponent(
|
|
1545
|
+
paramString += `${key}=${encodeURIComponent(data2)}`;
|
|
1545
1546
|
}
|
|
1546
1547
|
}
|
|
1547
1548
|
return paramString;
|
|
@@ -7779,6 +7780,7 @@ const Input = defineComponent({
|
|
|
7779
7780
|
validateMessage: ""
|
|
7780
7781
|
});
|
|
7781
7782
|
const updateValue = (_value, trigger2 = "onChange") => {
|
|
7783
|
+
var _a;
|
|
7782
7784
|
let value2 = isDef(_value) ? String(_value) : "";
|
|
7783
7785
|
const {
|
|
7784
7786
|
maxlength
|
|
@@ -7806,7 +7808,7 @@ const Input = defineComponent({
|
|
|
7806
7808
|
if (props.formatter && trigger2 === props.formatTrigger) {
|
|
7807
7809
|
value2 = props.formatter(value2);
|
|
7808
7810
|
}
|
|
7809
|
-
if (inputRef.value && value2 !== inputRef.value.value) {
|
|
7811
|
+
if ((inputRef == null ? void 0 : inputRef.value) && value2 !== ((_a = inputRef == null ? void 0 : inputRef.value) == null ? void 0 : _a.value)) {
|
|
7810
7812
|
inputRef.value.value = value2;
|
|
7811
7813
|
}
|
|
7812
7814
|
if (value2 !== props.modelValue) {
|
|
@@ -7814,16 +7816,17 @@ const Input = defineComponent({
|
|
|
7814
7816
|
}
|
|
7815
7817
|
};
|
|
7816
7818
|
const onInput = (event) => {
|
|
7817
|
-
const
|
|
7818
|
-
|
|
7819
|
-
|
|
7819
|
+
const target = event.target;
|
|
7820
|
+
const cursorPosition = target.selectionStart;
|
|
7821
|
+
if (!target.composing) {
|
|
7822
|
+
updateValue(target.value);
|
|
7820
7823
|
emit("input", event);
|
|
7821
7824
|
}
|
|
7822
7825
|
if (props.type === "zipCode") {
|
|
7823
|
-
if (
|
|
7824
|
-
|
|
7826
|
+
if (target.value.length >= 5 && cursorPosition === 4 && event.inputType === "insertText") {
|
|
7827
|
+
target.selectionStart = target.selectionEnd = cursorPosition + 1;
|
|
7825
7828
|
} else {
|
|
7826
|
-
|
|
7829
|
+
target.selectionEnd = cursorPosition;
|
|
7827
7830
|
}
|
|
7828
7831
|
}
|
|
7829
7832
|
};
|
|
@@ -7839,9 +7842,7 @@ const Input = defineComponent({
|
|
|
7839
7842
|
event.target.composing = true;
|
|
7840
7843
|
};
|
|
7841
7844
|
const onCompositionEnd2 = (event) => {
|
|
7842
|
-
const
|
|
7843
|
-
target
|
|
7844
|
-
} = event;
|
|
7845
|
+
const target = event.target;
|
|
7845
7846
|
if (target.composing) {
|
|
7846
7847
|
target.composing = false;
|
|
7847
7848
|
trigger$2(target, "input");
|
|
@@ -7854,19 +7855,21 @@ const Input = defineComponent({
|
|
|
7854
7855
|
}
|
|
7855
7856
|
};
|
|
7856
7857
|
const runValidator = (value2, rule) => new Promise((resolve2) => {
|
|
7857
|
-
|
|
7858
|
-
|
|
7859
|
-
|
|
7860
|
-
|
|
7861
|
-
|
|
7862
|
-
|
|
7858
|
+
void (async () => {
|
|
7859
|
+
var _a;
|
|
7860
|
+
const returnVal = (_a = rule == null ? void 0 : rule.validator) == null ? void 0 : _a.call(rule, value2, rule);
|
|
7861
|
+
if (isPromise$1(returnVal)) {
|
|
7862
|
+
return await returnVal.then(resolve2);
|
|
7863
|
+
}
|
|
7864
|
+
resolve2(returnVal);
|
|
7865
|
+
})();
|
|
7863
7866
|
});
|
|
7864
7867
|
const validate2 = (rules = props.rules) => new Promise((resolve2) => {
|
|
7865
7868
|
if (!rules) {
|
|
7866
7869
|
resolve2(null);
|
|
7867
7870
|
}
|
|
7868
7871
|
resetValidation();
|
|
7869
|
-
runRules(rules).then(() => {
|
|
7872
|
+
void runRules(rules).then(() => {
|
|
7870
7873
|
if (state.validateFailed) {
|
|
7871
7874
|
emit("validate", false);
|
|
7872
7875
|
resolve2({
|
|
@@ -7888,7 +7891,7 @@ const Input = defineComponent({
|
|
|
7888
7891
|
}
|
|
7889
7892
|
return defaultTrigger;
|
|
7890
7893
|
});
|
|
7891
|
-
validate2(rules);
|
|
7894
|
+
void validate2(rules);
|
|
7892
7895
|
}
|
|
7893
7896
|
};
|
|
7894
7897
|
const runRules = (rules) => rules.reduce((promise, rule) => promise.then(() => {
|
|
@@ -20006,7 +20009,7 @@ const img$b = getImages();
|
|
|
20006
20009
|
const DesktopHeader = defineComponent({
|
|
20007
20010
|
props: {
|
|
20008
20011
|
class: {
|
|
20009
|
-
type:
|
|
20012
|
+
type: String,
|
|
20010
20013
|
required: false,
|
|
20011
20014
|
default: ""
|
|
20012
20015
|
},
|
|
@@ -20017,9 +20020,10 @@ const DesktopHeader = defineComponent({
|
|
|
20017
20020
|
}
|
|
20018
20021
|
},
|
|
20019
20022
|
setup(props) {
|
|
20020
|
-
const
|
|
20021
|
-
const
|
|
20022
|
-
const
|
|
20023
|
+
const appDtls = getAppDetail$1();
|
|
20024
|
+
const appDetail = appDtls ? JSON.parse(appDtls) : void 0;
|
|
20025
|
+
const storeImage2 = (appDetail == null ? void 0 : appDetail.appLogo) || img$b.merchant;
|
|
20026
|
+
const storeName2 = appDetail == null ? void 0 : appDetail.appName;
|
|
20023
20027
|
return () => createVNode("div", {
|
|
20024
20028
|
"class": `${styles$1.header} ${props.class}`
|
|
20025
20029
|
}, [createVNode("div", {
|
|
@@ -23964,13 +23968,15 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23964
23968
|
const cssModules$o = {};
|
|
23965
23969
|
cssModules$o["$style"] = style0$n;
|
|
23966
23970
|
var Contents = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$C], ["__cssModules", cssModules$o]]);
|
|
23967
|
-
const deleteSheet = "
|
|
23968
|
-
const title$3 = "
|
|
23969
|
-
const buttonContainer$2 = "
|
|
23971
|
+
const deleteSheet = "_deleteSheet_vu1nb_1";
|
|
23972
|
+
const title$3 = "_title_vu1nb_5";
|
|
23973
|
+
const buttonContainer$2 = "_buttonContainer_vu1nb_11";
|
|
23974
|
+
const deleteContainer = "_deleteContainer_vu1nb_14";
|
|
23970
23975
|
var style0$m = {
|
|
23971
23976
|
deleteSheet,
|
|
23972
23977
|
title: title$3,
|
|
23973
|
-
buttonContainer: buttonContainer$2
|
|
23978
|
+
buttonContainer: buttonContainer$2,
|
|
23979
|
+
deleteContainer
|
|
23974
23980
|
};
|
|
23975
23981
|
const _sfc_main$B = defineComponent({
|
|
23976
23982
|
name: "DeleteHalfSheet",
|
|
@@ -24006,49 +24012,53 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
24006
24012
|
const _component_Button = resolveComponent("Button");
|
|
24007
24013
|
const _component_ActionSheet = resolveComponent("ActionSheet");
|
|
24008
24014
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
24009
|
-
|
|
24010
|
-
|
|
24011
|
-
|
|
24012
|
-
|
|
24013
|
-
|
|
24014
|
-
|
|
24015
|
-
|
|
24016
|
-
|
|
24017
|
-
|
|
24018
|
-
createBaseVNode("img", {
|
|
24019
|
-
src: _ctx.img.iconError
|
|
24020
|
-
}, null, 8, _hoisted_1$p),
|
|
24021
|
-
createBaseVNode("p", {
|
|
24022
|
-
class: normalizeClass(_ctx.style.title)
|
|
24023
|
-
}, toDisplayString(_ctx.lg.userAddress.deleteTitle), 3),
|
|
24015
|
+
createBaseVNode("div", {
|
|
24016
|
+
class: normalizeClass(_ctx.style.deleteContainer)
|
|
24017
|
+
}, [
|
|
24018
|
+
createVNode(_component_ActionSheet, {
|
|
24019
|
+
show: _ctx.open,
|
|
24020
|
+
type: "alert",
|
|
24021
|
+
onClose: _ctx.close
|
|
24022
|
+
}, {
|
|
24023
|
+
default: withCtx(() => [
|
|
24024
24024
|
createBaseVNode("div", {
|
|
24025
|
-
class: normalizeClass(_ctx.style.
|
|
24025
|
+
class: normalizeClass(_ctx.style.deleteSheet)
|
|
24026
24026
|
}, [
|
|
24027
|
-
|
|
24028
|
-
|
|
24029
|
-
|
|
24030
|
-
|
|
24031
|
-
|
|
24032
|
-
|
|
24033
|
-
|
|
24034
|
-
|
|
24035
|
-
|
|
24036
|
-
|
|
24037
|
-
|
|
24038
|
-
|
|
24039
|
-
|
|
24040
|
-
|
|
24041
|
-
|
|
24042
|
-
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
-
|
|
24046
|
-
|
|
24027
|
+
createBaseVNode("img", {
|
|
24028
|
+
src: _ctx.img.iconError
|
|
24029
|
+
}, null, 8, _hoisted_1$p),
|
|
24030
|
+
createBaseVNode("p", {
|
|
24031
|
+
class: normalizeClass(_ctx.style.title)
|
|
24032
|
+
}, toDisplayString(_ctx.lg.userAddress.deleteTitle), 3),
|
|
24033
|
+
createBaseVNode("div", {
|
|
24034
|
+
class: normalizeClass(_ctx.style.buttonContainer)
|
|
24035
|
+
}, [
|
|
24036
|
+
createVNode(_component_Button, {
|
|
24037
|
+
type: "danger",
|
|
24038
|
+
block: "",
|
|
24039
|
+
onClick: _ctx.del
|
|
24040
|
+
}, {
|
|
24041
|
+
default: withCtx(() => [
|
|
24042
|
+
createTextVNode(toDisplayString(_ctx.lg.userAddress.delete), 1)
|
|
24043
|
+
]),
|
|
24044
|
+
_: 1
|
|
24045
|
+
}, 8, ["onClick"]),
|
|
24046
|
+
createVNode(_component_Button, {
|
|
24047
|
+
type: "link",
|
|
24048
|
+
block: "",
|
|
24049
|
+
onClick: _ctx.close
|
|
24050
|
+
}, {
|
|
24051
|
+
default: withCtx(() => [
|
|
24052
|
+
createTextVNode(toDisplayString(_ctx.lg.userAddress.close), 1)
|
|
24053
|
+
]),
|
|
24054
|
+
_: 1
|
|
24055
|
+
}, 8, ["onClick"])
|
|
24056
|
+
], 2)
|
|
24047
24057
|
], 2)
|
|
24048
|
-
],
|
|
24049
|
-
|
|
24050
|
-
|
|
24051
|
-
|
|
24058
|
+
]),
|
|
24059
|
+
_: 1
|
|
24060
|
+
}, 8, ["show", "onClose"])
|
|
24061
|
+
], 2)
|
|
24052
24062
|
]);
|
|
24053
24063
|
}
|
|
24054
24064
|
const cssModules$n = {};
|
|
@@ -29469,7 +29479,10 @@ const popStateHandler = (callback, inputParams) => {
|
|
|
29469
29479
|
}
|
|
29470
29480
|
};
|
|
29471
29481
|
const implicitComplete = (inputParams2) => {
|
|
29472
|
-
|
|
29482
|
+
if (Object.prototype.hasOwnProperty.call(inputParams2, "merchantPaymentId")) {
|
|
29483
|
+
return true;
|
|
29484
|
+
} else
|
|
29485
|
+
return false;
|
|
29473
29486
|
};
|
|
29474
29487
|
return {
|
|
29475
29488
|
mounted() {
|
|
@@ -31995,7 +32008,7 @@ function debug(params) {
|
|
|
31995
32008
|
function execute$5(params) {
|
|
31996
32009
|
var _a;
|
|
31997
32010
|
(_a = params == null ? void 0 : params.success) == null ? void 0 : _a.call(params, {
|
|
31998
|
-
v: "1.
|
|
32011
|
+
v: "1.25.0"
|
|
31999
32012
|
});
|
|
32000
32013
|
}
|
|
32001
32014
|
function useCallBack(props, ctx) {
|