@fecp/mobile 1.0.26 → 1.0.27
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/es/mobile.css +1 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/index.mjs +38 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/adapters.mjs +60 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/fetch.mjs +174 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/xhr.mjs +138 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/axios.mjs +50 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CancelToken.mjs +99 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CanceledError.mjs +12 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/isCancel.mjs +6 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/Axios.mjs +181 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosError.mjs +76 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosHeaders.mjs +223 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/InterceptorManager.mjs +65 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/buildFullPath.mjs +12 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/dispatchRequest.mjs +52 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/mergeConfig.mjs +83 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/settle.mjs +18 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/transformData.mjs +17 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/index.mjs +116 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/transitional.mjs +8 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/env/data.mjs +4 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.mjs +34 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/HttpStatusCode.mjs +71 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/bind.mjs +8 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/buildURL.mjs +34 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/combineURLs.mjs +6 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/composeSignals.mjs +39 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/cookies.mjs +36 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/formDataToJSON.mjs +54 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAbsoluteURL.mjs +6 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAxiosError.mjs +7 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isURLSameOrigin.mjs +11 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/null.mjs +4 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseHeaders.mjs +47 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseProtocol.mjs +7 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/progressEventReducer.mjs +41 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/resolveConfig.mjs +42 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/speedometer.mjs +36 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/spread.mjs +8 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/throttle.mjs +35 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toFormData.mjs +114 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toURLEncodedForm.mjs +17 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/trackStream.mjs +80 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/validator.mjs +67 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/Blob.mjs +4 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/FormData.mjs +4 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/URLSearchParams.mjs +5 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/index.mjs +15 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/common/utils.mjs +15 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/index.mjs +9 -0
- package/es/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/utils.mjs +364 -0
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-tab-status.mjs +4 -2
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/List.mjs +145 -0
- package/es/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/index.mjs +8 -0
- package/es/packages/mobile/index.mjs +2 -0
- package/es/packages/mobile/src/axios/config.mjs +105 -0
- package/es/packages/mobile/src/axios/index.mjs +11 -0
- package/es/packages/mobile/src/components/all.mjs +2 -0
- package/es/packages/mobile/src/components/dataDisplay/list/List.vue.mjs +100 -0
- package/es/packages/mobile/src/components/dataDisplay/list/index.mjs +7 -0
- package/es/packages/mobile/src/utils/dataSourceUtil.mjs +71 -0
- package/lib/mobile.css +1 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/index.js +38 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/adapters.js +60 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/fetch.js +174 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/adapters/xhr.js +138 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/axios.js +50 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CancelToken.js +99 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/CanceledError.js +12 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/cancel/isCancel.js +6 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/Axios.js +181 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosError.js +76 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/AxiosHeaders.js +223 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/InterceptorManager.js +65 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/buildFullPath.js +12 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/dispatchRequest.js +52 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/mergeConfig.js +83 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/settle.js +18 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/core/transformData.js +17 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/index.js +116 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/defaults/transitional.js +8 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/env/data.js +4 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +34 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/HttpStatusCode.js +71 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/bind.js +8 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/buildURL.js +34 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/combineURLs.js +6 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/composeSignals.js +39 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/cookies.js +36 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/formDataToJSON.js +54 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAbsoluteURL.js +6 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isAxiosError.js +7 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/isURLSameOrigin.js +11 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/null.js +4 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseHeaders.js +47 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/parseProtocol.js +7 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/progressEventReducer.js +41 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/resolveConfig.js +42 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/speedometer.js +36 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/spread.js +8 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/throttle.js +35 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toFormData.js +114 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/toURLEncodedForm.js +17 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/trackStream.js +80 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/helpers/validator.js +67 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/Blob.js +4 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/FormData.js +4 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +5 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/browser/index.js +15 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/common/utils.js +15 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/platform/index.js +9 -0
- package/lib/node_modules/.pnpm/axios@1.8.4/node_modules/axios/lib/utils.js +364 -0
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/composables/use-tab-status.js +3 -1
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/List.js +145 -0
- package/lib/node_modules/.pnpm/vant@4.9.17_vue@3.5.13_typescript@5.7.3_/node_modules/vant/es/list/index.js +7 -0
- package/lib/packages/mobile/index.js +92 -90
- package/lib/packages/mobile/src/axios/config.js +105 -0
- package/lib/packages/mobile/src/axios/index.js +11 -0
- package/lib/packages/mobile/src/components/all.js +92 -90
- package/lib/packages/mobile/src/components/dataDisplay/list/List.vue.js +100 -0
- package/lib/packages/mobile/src/components/dataDisplay/list/index.js +7 -0
- package/lib/packages/mobile/src/utils/dataSourceUtil.js +71 -0
- package/package.json +1 -1
|
@@ -0,0 +1,364 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const bind = require("./helpers/bind.js");
|
|
4
|
+
const { toString } = Object.prototype;
|
|
5
|
+
const { getPrototypeOf } = Object;
|
|
6
|
+
const kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
7
|
+
const str = toString.call(thing);
|
|
8
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null));
|
|
10
|
+
const kindOfTest = (type) => {
|
|
11
|
+
type = type.toLowerCase();
|
|
12
|
+
return (thing) => kindOf(thing) === type;
|
|
13
|
+
};
|
|
14
|
+
const typeOfTest = (type) => (thing) => typeof thing === type;
|
|
15
|
+
const { isArray } = Array;
|
|
16
|
+
const isUndefined = typeOfTest("undefined");
|
|
17
|
+
function isBuffer(val) {
|
|
18
|
+
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor) && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);
|
|
19
|
+
}
|
|
20
|
+
const isArrayBuffer = kindOfTest("ArrayBuffer");
|
|
21
|
+
function isArrayBufferView(val) {
|
|
22
|
+
let result;
|
|
23
|
+
if (typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView) {
|
|
24
|
+
result = ArrayBuffer.isView(val);
|
|
25
|
+
} else {
|
|
26
|
+
result = val && val.buffer && isArrayBuffer(val.buffer);
|
|
27
|
+
}
|
|
28
|
+
return result;
|
|
29
|
+
}
|
|
30
|
+
const isString = typeOfTest("string");
|
|
31
|
+
const isFunction = typeOfTest("function");
|
|
32
|
+
const isNumber = typeOfTest("number");
|
|
33
|
+
const isObject = (thing) => thing !== null && typeof thing === "object";
|
|
34
|
+
const isBoolean = (thing) => thing === true || thing === false;
|
|
35
|
+
const isPlainObject = (val) => {
|
|
36
|
+
if (kindOf(val) !== "object") {
|
|
37
|
+
return false;
|
|
38
|
+
}
|
|
39
|
+
const prototype = getPrototypeOf(val);
|
|
40
|
+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
|
41
|
+
};
|
|
42
|
+
const isDate = kindOfTest("Date");
|
|
43
|
+
const isFile = kindOfTest("File");
|
|
44
|
+
const isBlob = kindOfTest("Blob");
|
|
45
|
+
const isFileList = kindOfTest("FileList");
|
|
46
|
+
const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
47
|
+
const isFormData = (thing) => {
|
|
48
|
+
let kind;
|
|
49
|
+
return thing && (typeof FormData === "function" && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === "formdata" || // detect form-data instance
|
|
50
|
+
kind === "object" && isFunction(thing.toString) && thing.toString() === "[object FormData]"));
|
|
51
|
+
};
|
|
52
|
+
const isURLSearchParams = kindOfTest("URLSearchParams");
|
|
53
|
+
const [isReadableStream, isRequest, isResponse, isHeaders] = ["ReadableStream", "Request", "Response", "Headers"].map(kindOfTest);
|
|
54
|
+
const trim = (str) => str.trim ? str.trim() : str.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
55
|
+
function forEach(obj, fn, { allOwnKeys = false } = {}) {
|
|
56
|
+
if (obj === null || typeof obj === "undefined") {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
let i;
|
|
60
|
+
let l;
|
|
61
|
+
if (typeof obj !== "object") {
|
|
62
|
+
obj = [obj];
|
|
63
|
+
}
|
|
64
|
+
if (isArray(obj)) {
|
|
65
|
+
for (i = 0, l = obj.length; i < l; i++) {
|
|
66
|
+
fn.call(null, obj[i], i, obj);
|
|
67
|
+
}
|
|
68
|
+
} else {
|
|
69
|
+
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
|
70
|
+
const len = keys.length;
|
|
71
|
+
let key;
|
|
72
|
+
for (i = 0; i < len; i++) {
|
|
73
|
+
key = keys[i];
|
|
74
|
+
fn.call(null, obj[key], key, obj);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function findKey(obj, key) {
|
|
79
|
+
key = key.toLowerCase();
|
|
80
|
+
const keys = Object.keys(obj);
|
|
81
|
+
let i = keys.length;
|
|
82
|
+
let _key;
|
|
83
|
+
while (i-- > 0) {
|
|
84
|
+
_key = keys[i];
|
|
85
|
+
if (key === _key.toLowerCase()) {
|
|
86
|
+
return _key;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
return null;
|
|
90
|
+
}
|
|
91
|
+
const _global = (() => {
|
|
92
|
+
if (typeof globalThis !== "undefined") return globalThis;
|
|
93
|
+
return typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : global;
|
|
94
|
+
})();
|
|
95
|
+
const isContextDefined = (context) => !isUndefined(context) && context !== _global;
|
|
96
|
+
function merge() {
|
|
97
|
+
const { caseless } = isContextDefined(this) && this || {};
|
|
98
|
+
const result = {};
|
|
99
|
+
const assignValue = (val, key) => {
|
|
100
|
+
const targetKey = caseless && findKey(result, key) || key;
|
|
101
|
+
if (isPlainObject(result[targetKey]) && isPlainObject(val)) {
|
|
102
|
+
result[targetKey] = merge(result[targetKey], val);
|
|
103
|
+
} else if (isPlainObject(val)) {
|
|
104
|
+
result[targetKey] = merge({}, val);
|
|
105
|
+
} else if (isArray(val)) {
|
|
106
|
+
result[targetKey] = val.slice();
|
|
107
|
+
} else {
|
|
108
|
+
result[targetKey] = val;
|
|
109
|
+
}
|
|
110
|
+
};
|
|
111
|
+
for (let i = 0, l = arguments.length; i < l; i++) {
|
|
112
|
+
arguments[i] && forEach(arguments[i], assignValue);
|
|
113
|
+
}
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
const extend = (a, b, thisArg, { allOwnKeys } = {}) => {
|
|
117
|
+
forEach(b, (val, key) => {
|
|
118
|
+
if (thisArg && isFunction(val)) {
|
|
119
|
+
a[key] = bind.default(val, thisArg);
|
|
120
|
+
} else {
|
|
121
|
+
a[key] = val;
|
|
122
|
+
}
|
|
123
|
+
}, { allOwnKeys });
|
|
124
|
+
return a;
|
|
125
|
+
};
|
|
126
|
+
const stripBOM = (content) => {
|
|
127
|
+
if (content.charCodeAt(0) === 65279) {
|
|
128
|
+
content = content.slice(1);
|
|
129
|
+
}
|
|
130
|
+
return content;
|
|
131
|
+
};
|
|
132
|
+
const inherits = (constructor, superConstructor, props, descriptors) => {
|
|
133
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
134
|
+
constructor.prototype.constructor = constructor;
|
|
135
|
+
Object.defineProperty(constructor, "super", {
|
|
136
|
+
value: superConstructor.prototype
|
|
137
|
+
});
|
|
138
|
+
props && Object.assign(constructor.prototype, props);
|
|
139
|
+
};
|
|
140
|
+
const toFlatObject = (sourceObj, destObj, filter, propFilter) => {
|
|
141
|
+
let props;
|
|
142
|
+
let i;
|
|
143
|
+
let prop;
|
|
144
|
+
const merged = {};
|
|
145
|
+
destObj = destObj || {};
|
|
146
|
+
if (sourceObj == null) return destObj;
|
|
147
|
+
do {
|
|
148
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
149
|
+
i = props.length;
|
|
150
|
+
while (i-- > 0) {
|
|
151
|
+
prop = props[i];
|
|
152
|
+
if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {
|
|
153
|
+
destObj[prop] = sourceObj[prop];
|
|
154
|
+
merged[prop] = true;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
sourceObj = filter !== false && getPrototypeOf(sourceObj);
|
|
158
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
159
|
+
return destObj;
|
|
160
|
+
};
|
|
161
|
+
const endsWith = (str, searchString, position) => {
|
|
162
|
+
str = String(str);
|
|
163
|
+
if (position === void 0 || position > str.length) {
|
|
164
|
+
position = str.length;
|
|
165
|
+
}
|
|
166
|
+
position -= searchString.length;
|
|
167
|
+
const lastIndex = str.indexOf(searchString, position);
|
|
168
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
169
|
+
};
|
|
170
|
+
const toArray = (thing) => {
|
|
171
|
+
if (!thing) return null;
|
|
172
|
+
if (isArray(thing)) return thing;
|
|
173
|
+
let i = thing.length;
|
|
174
|
+
if (!isNumber(i)) return null;
|
|
175
|
+
const arr = new Array(i);
|
|
176
|
+
while (i-- > 0) {
|
|
177
|
+
arr[i] = thing[i];
|
|
178
|
+
}
|
|
179
|
+
return arr;
|
|
180
|
+
};
|
|
181
|
+
const isTypedArray = /* @__PURE__ */ ((TypedArray) => {
|
|
182
|
+
return (thing) => {
|
|
183
|
+
return TypedArray && thing instanceof TypedArray;
|
|
184
|
+
};
|
|
185
|
+
})(typeof Uint8Array !== "undefined" && getPrototypeOf(Uint8Array));
|
|
186
|
+
const forEachEntry = (obj, fn) => {
|
|
187
|
+
const generator = obj && obj[Symbol.iterator];
|
|
188
|
+
const iterator = generator.call(obj);
|
|
189
|
+
let result;
|
|
190
|
+
while ((result = iterator.next()) && !result.done) {
|
|
191
|
+
const pair = result.value;
|
|
192
|
+
fn.call(obj, pair[0], pair[1]);
|
|
193
|
+
}
|
|
194
|
+
};
|
|
195
|
+
const matchAll = (regExp, str) => {
|
|
196
|
+
let matches;
|
|
197
|
+
const arr = [];
|
|
198
|
+
while ((matches = regExp.exec(str)) !== null) {
|
|
199
|
+
arr.push(matches);
|
|
200
|
+
}
|
|
201
|
+
return arr;
|
|
202
|
+
};
|
|
203
|
+
const isHTMLForm = kindOfTest("HTMLFormElement");
|
|
204
|
+
const toCamelCase = (str) => {
|
|
205
|
+
return str.toLowerCase().replace(
|
|
206
|
+
/[-_\s]([a-z\d])(\w*)/g,
|
|
207
|
+
function replacer(m, p1, p2) {
|
|
208
|
+
return p1.toUpperCase() + p2;
|
|
209
|
+
}
|
|
210
|
+
);
|
|
211
|
+
};
|
|
212
|
+
const hasOwnProperty = (({ hasOwnProperty: hasOwnProperty2 }) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
213
|
+
const isRegExp = kindOfTest("RegExp");
|
|
214
|
+
const reduceDescriptors = (obj, reducer) => {
|
|
215
|
+
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
216
|
+
const reducedDescriptors = {};
|
|
217
|
+
forEach(descriptors, (descriptor, name) => {
|
|
218
|
+
let ret;
|
|
219
|
+
if ((ret = reducer(descriptor, name, obj)) !== false) {
|
|
220
|
+
reducedDescriptors[name] = ret || descriptor;
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
Object.defineProperties(obj, reducedDescriptors);
|
|
224
|
+
};
|
|
225
|
+
const freezeMethods = (obj) => {
|
|
226
|
+
reduceDescriptors(obj, (descriptor, name) => {
|
|
227
|
+
if (isFunction(obj) && ["arguments", "caller", "callee"].indexOf(name) !== -1) {
|
|
228
|
+
return false;
|
|
229
|
+
}
|
|
230
|
+
const value = obj[name];
|
|
231
|
+
if (!isFunction(value)) return;
|
|
232
|
+
descriptor.enumerable = false;
|
|
233
|
+
if ("writable" in descriptor) {
|
|
234
|
+
descriptor.writable = false;
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
if (!descriptor.set) {
|
|
238
|
+
descriptor.set = () => {
|
|
239
|
+
throw Error("Can not rewrite read-only method '" + name + "'");
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
const toObjectSet = (arrayOrString, delimiter) => {
|
|
245
|
+
const obj = {};
|
|
246
|
+
const define = (arr) => {
|
|
247
|
+
arr.forEach((value) => {
|
|
248
|
+
obj[value] = true;
|
|
249
|
+
});
|
|
250
|
+
};
|
|
251
|
+
isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));
|
|
252
|
+
return obj;
|
|
253
|
+
};
|
|
254
|
+
const noop = () => {
|
|
255
|
+
};
|
|
256
|
+
const toFiniteNumber = (value, defaultValue) => {
|
|
257
|
+
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
|
|
258
|
+
};
|
|
259
|
+
function isSpecCompliantForm(thing) {
|
|
260
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === "FormData" && thing[Symbol.iterator]);
|
|
261
|
+
}
|
|
262
|
+
const toJSONObject = (obj) => {
|
|
263
|
+
const stack = new Array(10);
|
|
264
|
+
const visit = (source, i) => {
|
|
265
|
+
if (isObject(source)) {
|
|
266
|
+
if (stack.indexOf(source) >= 0) {
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
if (!("toJSON" in source)) {
|
|
270
|
+
stack[i] = source;
|
|
271
|
+
const target = isArray(source) ? [] : {};
|
|
272
|
+
forEach(source, (value, key) => {
|
|
273
|
+
const reducedValue = visit(value, i + 1);
|
|
274
|
+
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
275
|
+
});
|
|
276
|
+
stack[i] = void 0;
|
|
277
|
+
return target;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return source;
|
|
281
|
+
};
|
|
282
|
+
return visit(obj, 0);
|
|
283
|
+
};
|
|
284
|
+
const isAsyncFn = kindOfTest("AsyncFunction");
|
|
285
|
+
const isThenable = (thing) => thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
286
|
+
const _setImmediate = ((setImmediateSupported, postMessageSupported) => {
|
|
287
|
+
if (setImmediateSupported) {
|
|
288
|
+
return setImmediate;
|
|
289
|
+
}
|
|
290
|
+
return postMessageSupported ? ((token, callbacks) => {
|
|
291
|
+
_global.addEventListener("message", ({ source, data }) => {
|
|
292
|
+
if (source === _global && data === token) {
|
|
293
|
+
callbacks.length && callbacks.shift()();
|
|
294
|
+
}
|
|
295
|
+
}, false);
|
|
296
|
+
return (cb) => {
|
|
297
|
+
callbacks.push(cb);
|
|
298
|
+
_global.postMessage(token, "*");
|
|
299
|
+
};
|
|
300
|
+
})(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);
|
|
301
|
+
})(
|
|
302
|
+
typeof setImmediate === "function",
|
|
303
|
+
isFunction(_global.postMessage)
|
|
304
|
+
);
|
|
305
|
+
const asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
306
|
+
const utils = {
|
|
307
|
+
isArray,
|
|
308
|
+
isArrayBuffer,
|
|
309
|
+
isBuffer,
|
|
310
|
+
isFormData,
|
|
311
|
+
isArrayBufferView,
|
|
312
|
+
isString,
|
|
313
|
+
isNumber,
|
|
314
|
+
isBoolean,
|
|
315
|
+
isObject,
|
|
316
|
+
isPlainObject,
|
|
317
|
+
isReadableStream,
|
|
318
|
+
isRequest,
|
|
319
|
+
isResponse,
|
|
320
|
+
isHeaders,
|
|
321
|
+
isUndefined,
|
|
322
|
+
isDate,
|
|
323
|
+
isFile,
|
|
324
|
+
isBlob,
|
|
325
|
+
isRegExp,
|
|
326
|
+
isFunction,
|
|
327
|
+
isStream,
|
|
328
|
+
isURLSearchParams,
|
|
329
|
+
isTypedArray,
|
|
330
|
+
isFileList,
|
|
331
|
+
forEach,
|
|
332
|
+
merge,
|
|
333
|
+
extend,
|
|
334
|
+
trim,
|
|
335
|
+
stripBOM,
|
|
336
|
+
inherits,
|
|
337
|
+
toFlatObject,
|
|
338
|
+
kindOf,
|
|
339
|
+
kindOfTest,
|
|
340
|
+
endsWith,
|
|
341
|
+
toArray,
|
|
342
|
+
forEachEntry,
|
|
343
|
+
matchAll,
|
|
344
|
+
isHTMLForm,
|
|
345
|
+
hasOwnProperty,
|
|
346
|
+
hasOwnProp: hasOwnProperty,
|
|
347
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
348
|
+
reduceDescriptors,
|
|
349
|
+
freezeMethods,
|
|
350
|
+
toObjectSet,
|
|
351
|
+
toCamelCase,
|
|
352
|
+
noop,
|
|
353
|
+
toFiniteNumber,
|
|
354
|
+
findKey,
|
|
355
|
+
global: _global,
|
|
356
|
+
isContextDefined,
|
|
357
|
+
isSpecCompliantForm,
|
|
358
|
+
toJSONObject,
|
|
359
|
+
isAsyncFn,
|
|
360
|
+
isThenable,
|
|
361
|
+
setImmediate: _setImmediate,
|
|
362
|
+
asap
|
|
363
|
+
};
|
|
364
|
+
exports.default = utils;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
require("vue");
|
|
3
|
+
const vue = require("vue");
|
|
4
4
|
const TAB_STATUS_KEY = Symbol();
|
|
5
|
+
const useTabStatus = () => vue.inject(TAB_STATUS_KEY, null);
|
|
5
6
|
exports.TAB_STATUS_KEY = TAB_STATUS_KEY;
|
|
7
|
+
exports.useTabStatus = useTabStatus;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index_esm = require("../../../../../@vant_use@1.6.0_vue@3.5.13_typescript@5.7.3_/node_modules/@vant/use/dist/index.esm.js");
|
|
5
|
+
const useExpose = require("../composables/use-expose.js");
|
|
6
|
+
const useTabStatus = require("../composables/use-tab-status.js");
|
|
7
|
+
const index = require("../loading/index.js");
|
|
8
|
+
const props = require("../utils/props.js");
|
|
9
|
+
const create = require("../utils/create.js");
|
|
10
|
+
const dom = require("../utils/dom.js");
|
|
11
|
+
const [name, bem, t] = create.createNamespace("list");
|
|
12
|
+
const listProps = {
|
|
13
|
+
error: Boolean,
|
|
14
|
+
offset: props.makeNumericProp(300),
|
|
15
|
+
loading: Boolean,
|
|
16
|
+
disabled: Boolean,
|
|
17
|
+
finished: Boolean,
|
|
18
|
+
scroller: Object,
|
|
19
|
+
errorText: String,
|
|
20
|
+
direction: props.makeStringProp("down"),
|
|
21
|
+
loadingText: String,
|
|
22
|
+
finishedText: String,
|
|
23
|
+
immediateCheck: props.truthProp
|
|
24
|
+
};
|
|
25
|
+
var stdin_default = vue.defineComponent({
|
|
26
|
+
name,
|
|
27
|
+
props: listProps,
|
|
28
|
+
emits: ["load", "update:error", "update:loading"],
|
|
29
|
+
setup(props2, {
|
|
30
|
+
emit,
|
|
31
|
+
slots
|
|
32
|
+
}) {
|
|
33
|
+
const loading = vue.ref(props2.loading);
|
|
34
|
+
const root = vue.ref();
|
|
35
|
+
const placeholder = vue.ref();
|
|
36
|
+
const tabStatus = useTabStatus.useTabStatus();
|
|
37
|
+
const scrollParent = index_esm.useScrollParent(root);
|
|
38
|
+
const scroller = vue.computed(() => props2.scroller || scrollParent.value);
|
|
39
|
+
const check = () => {
|
|
40
|
+
vue.nextTick(() => {
|
|
41
|
+
if (loading.value || props2.finished || props2.disabled || props2.error || // skip check when inside an inactive tab
|
|
42
|
+
(tabStatus == null ? void 0 : tabStatus.value) === false) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const {
|
|
46
|
+
direction
|
|
47
|
+
} = props2;
|
|
48
|
+
const offset = +props2.offset;
|
|
49
|
+
const scrollParentRect = index_esm.useRect(scroller);
|
|
50
|
+
if (!scrollParentRect.height || dom.isHidden(root)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
let isReachEdge = false;
|
|
54
|
+
const placeholderRect = index_esm.useRect(placeholder);
|
|
55
|
+
if (direction === "up") {
|
|
56
|
+
isReachEdge = scrollParentRect.top - placeholderRect.top <= offset;
|
|
57
|
+
} else {
|
|
58
|
+
isReachEdge = placeholderRect.bottom - scrollParentRect.bottom <= offset;
|
|
59
|
+
}
|
|
60
|
+
if (isReachEdge) {
|
|
61
|
+
loading.value = true;
|
|
62
|
+
emit("update:loading", true);
|
|
63
|
+
emit("load");
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
const renderFinishedText = () => {
|
|
68
|
+
if (props2.finished) {
|
|
69
|
+
const text = slots.finished ? slots.finished() : props2.finishedText;
|
|
70
|
+
if (text) {
|
|
71
|
+
return vue.createVNode("div", {
|
|
72
|
+
"class": bem("finished-text")
|
|
73
|
+
}, [text]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
const clickErrorText = () => {
|
|
78
|
+
emit("update:error", false);
|
|
79
|
+
check();
|
|
80
|
+
};
|
|
81
|
+
const renderErrorText = () => {
|
|
82
|
+
if (props2.error) {
|
|
83
|
+
const text = slots.error ? slots.error() : props2.errorText;
|
|
84
|
+
if (text) {
|
|
85
|
+
return vue.createVNode("div", {
|
|
86
|
+
"role": "button",
|
|
87
|
+
"class": bem("error-text"),
|
|
88
|
+
"tabindex": 0,
|
|
89
|
+
"onClick": clickErrorText
|
|
90
|
+
}, [text]);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
const renderLoading = () => {
|
|
95
|
+
if (loading.value && !props2.finished && !props2.disabled) {
|
|
96
|
+
return vue.createVNode("div", {
|
|
97
|
+
"class": bem("loading")
|
|
98
|
+
}, [slots.loading ? slots.loading() : vue.createVNode(index.Loading, {
|
|
99
|
+
"class": bem("loading-icon")
|
|
100
|
+
}, {
|
|
101
|
+
default: () => [props2.loadingText || t("loading")]
|
|
102
|
+
})]);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
vue.watch(() => [props2.loading, props2.finished, props2.error], check);
|
|
106
|
+
if (tabStatus) {
|
|
107
|
+
vue.watch(tabStatus, (tabActive) => {
|
|
108
|
+
if (tabActive) {
|
|
109
|
+
check();
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
vue.onUpdated(() => {
|
|
114
|
+
loading.value = props2.loading;
|
|
115
|
+
});
|
|
116
|
+
vue.onMounted(() => {
|
|
117
|
+
if (props2.immediateCheck) {
|
|
118
|
+
check();
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
useExpose.useExpose({
|
|
122
|
+
check
|
|
123
|
+
});
|
|
124
|
+
index_esm.useEventListener("scroll", check, {
|
|
125
|
+
target: scroller,
|
|
126
|
+
passive: true
|
|
127
|
+
});
|
|
128
|
+
return () => {
|
|
129
|
+
var _a;
|
|
130
|
+
const Content = (_a = slots.default) == null ? void 0 : _a.call(slots);
|
|
131
|
+
const Placeholder = vue.createVNode("div", {
|
|
132
|
+
"ref": placeholder,
|
|
133
|
+
"class": bem("placeholder")
|
|
134
|
+
}, null);
|
|
135
|
+
return vue.createVNode("div", {
|
|
136
|
+
"ref": root,
|
|
137
|
+
"role": "feed",
|
|
138
|
+
"class": bem(),
|
|
139
|
+
"aria-busy": loading.value
|
|
140
|
+
}, [props2.direction === "down" ? Content : Placeholder, renderLoading(), renderFinishedText(), renderErrorText(), props2.direction === "up" ? Content : Placeholder]);
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
exports.default = stdin_default;
|
|
145
|
+
exports.listProps = listProps;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const List$1 = require("./List.js");
|
|
4
|
+
const withInstall = require("../utils/with-install.js");
|
|
5
|
+
const List = withInstall.withInstall(List$1.default);
|
|
6
|
+
exports.listProps = List$1.listProps;
|
|
7
|
+
exports.List = List;
|