antd-mobile 5.41.0-alpha.2 → 5.41.0-alpha.3
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/2x/bundle/antd-mobile.cjs.development.js +164 -128
- package/2x/bundle/antd-mobile.cjs.js +7 -7
- package/2x/bundle/antd-mobile.es.development.js +164 -128
- package/2x/bundle/antd-mobile.es.js +3988 -3969
- package/2x/bundle/antd-mobile.umd.development.js +164 -128
- package/2x/bundle/antd-mobile.umd.js +7 -7
- package/2x/cjs/components/avatar/avatar.d.ts +3 -1
- package/2x/cjs/components/avatar/avatar.js +4 -2
- package/2x/cjs/components/calendar/calendar.js +4 -4
- package/2x/cjs/components/image/image.d.ts +1 -1
- package/2x/cjs/components/image/image.js +5 -5
- package/2x/cjs/components/image-viewer/image-viewer.d.ts +7 -4
- package/2x/cjs/components/image-viewer/index.d.ts +2 -1
- package/2x/cjs/components/image-viewer/methods.js +1 -1
- package/2x/cjs/components/image-viewer/slide.d.ts +3 -2
- package/2x/cjs/components/image-viewer/slide.js +2 -1
- package/2x/cjs/components/image-viewer/slides.d.ts +3 -2
- package/2x/cjs/components/swiper/swiper.d.ts +3 -3
- package/2x/cjs/components/swiper/swiper.js +47 -38
- package/2x/es/components/avatar/avatar.d.ts +3 -1
- package/2x/es/components/avatar/avatar.js +4 -2
- package/2x/es/components/calendar/calendar.js +4 -4
- package/2x/es/components/image/image.d.ts +1 -1
- package/2x/es/components/image/image.js +6 -6
- package/2x/es/components/image-viewer/image-viewer.d.ts +7 -4
- package/2x/es/components/image-viewer/index.d.ts +2 -1
- package/2x/es/components/image-viewer/methods.js +1 -1
- package/2x/es/components/image-viewer/slide.d.ts +3 -2
- package/2x/es/components/image-viewer/slide.js +2 -1
- package/2x/es/components/image-viewer/slides.d.ts +3 -2
- package/2x/es/components/swiper/swiper.d.ts +3 -3
- package/2x/es/components/swiper/swiper.js +28 -19
- package/2x/package.json +1 -1
- package/bundle/antd-mobile.cjs.development.js +164 -128
- package/bundle/antd-mobile.cjs.js +7 -7
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +164 -128
- package/bundle/antd-mobile.es.js +3988 -3969
- package/bundle/antd-mobile.umd.development.js +164 -128
- package/bundle/antd-mobile.umd.js +7 -7
- package/cjs/components/avatar/avatar.d.ts +3 -1
- package/cjs/components/avatar/avatar.js +4 -2
- package/cjs/components/calendar/calendar.js +4 -4
- package/cjs/components/image/image.d.ts +1 -1
- package/cjs/components/image/image.js +5 -5
- package/cjs/components/image-viewer/image-viewer.d.ts +7 -4
- package/cjs/components/image-viewer/index.d.ts +2 -1
- package/cjs/components/image-viewer/methods.js +1 -1
- package/cjs/components/image-viewer/slide.d.ts +3 -2
- package/cjs/components/image-viewer/slide.js +2 -1
- package/cjs/components/image-viewer/slides.d.ts +3 -2
- package/cjs/components/swiper/swiper.d.ts +3 -3
- package/cjs/components/swiper/swiper.js +47 -38
- package/es/components/avatar/avatar.d.ts +3 -1
- package/es/components/avatar/avatar.js +4 -2
- package/es/components/calendar/calendar.js +4 -4
- package/es/components/image/image.d.ts +1 -1
- package/es/components/image/image.js +6 -6
- package/es/components/image-viewer/image-viewer.d.ts +7 -4
- package/es/components/image-viewer/index.d.ts +2 -1
- package/es/components/image-viewer/methods.js +1 -1
- package/es/components/image-viewer/slide.d.ts +3 -2
- package/es/components/image-viewer/slide.js +2 -1
- package/es/components/image-viewer/slides.d.ts +3 -2
- package/es/components/swiper/swiper.d.ts +3 -3
- package/es/components/swiper/swiper.js +28 -19
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
|
@@ -2783,7 +2783,7 @@ function eachProp(obj, fn, ctx2) {
|
|
|
2783
2783
|
}
|
|
2784
2784
|
}
|
|
2785
2785
|
}
|
|
2786
|
-
const toArray$
|
|
2786
|
+
const toArray$5 = (a) => is.und(a) ? [] : is.arr(a) ? a : [a];
|
|
2787
2787
|
function flush(queue, iterator) {
|
|
2788
2788
|
if (queue.size) {
|
|
2789
2789
|
const items = Array.from(queue);
|
|
@@ -3835,7 +3835,7 @@ function _extends$2() {
|
|
|
3835
3835
|
function callProp(value, ...args) {
|
|
3836
3836
|
return is.fun(value) ? value(...args) : value;
|
|
3837
3837
|
}
|
|
3838
|
-
const matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray$
|
|
3838
|
+
const matchProp = (value, key) => value === true || !!(key && value && (is.fun(value) ? value(key) : toArray$5(value).includes(key)));
|
|
3839
3839
|
const resolveProp = (prop, key) => is.obj(prop) ? key && prop[key] : prop;
|
|
3840
3840
|
const getDefaultProp = (props, key) => props.default === true ? props[key] : props.default ? props.default[key] : void 0;
|
|
3841
3841
|
const noopTransform = (value) => value;
|
|
@@ -4383,7 +4383,7 @@ class SpringValue extends FrameValue {
|
|
|
4383
4383
|
} = anim;
|
|
4384
4384
|
const payload = getPayload(anim.to);
|
|
4385
4385
|
if (!payload && hasFluidValue(anim.to)) {
|
|
4386
|
-
toValues = toArray$
|
|
4386
|
+
toValues = toArray$5(getFluidValue(anim.to));
|
|
4387
4387
|
}
|
|
4388
4388
|
anim.values.forEach((node2, i2) => {
|
|
4389
4389
|
if (node2.done)
|
|
@@ -4741,7 +4741,7 @@ class SpringValue extends FrameValue {
|
|
|
4741
4741
|
if (!hasAsyncTo) {
|
|
4742
4742
|
if (started || hasFluidValue(prevTo)) {
|
|
4743
4743
|
anim.values = node.getPayload();
|
|
4744
|
-
anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray$
|
|
4744
|
+
anim.toValues = hasFluidValue(to2) ? null : goalType == AnimatedString ? [1] : toArray$5(goal);
|
|
4745
4745
|
}
|
|
4746
4746
|
if (anim.immediate != immediate) {
|
|
4747
4747
|
anim.immediate = immediate;
|
|
@@ -5017,7 +5017,7 @@ let Controller$1 = class Controller {
|
|
|
5017
5017
|
queue
|
|
5018
5018
|
} = this;
|
|
5019
5019
|
if (props) {
|
|
5020
|
-
queue = toArray$
|
|
5020
|
+
queue = toArray$5(props).map(createUpdate);
|
|
5021
5021
|
} else {
|
|
5022
5022
|
this.queue = [];
|
|
5023
5023
|
}
|
|
@@ -5033,7 +5033,7 @@ let Controller$1 = class Controller {
|
|
|
5033
5033
|
}
|
|
5034
5034
|
if (keys2) {
|
|
5035
5035
|
const springs = this.springs;
|
|
5036
|
-
each(toArray$
|
|
5036
|
+
each(toArray$5(keys2), (key) => springs[key].stop(!!arg));
|
|
5037
5037
|
} else {
|
|
5038
5038
|
stopAsync(this._state, this._lastAsyncId);
|
|
5039
5039
|
this.each((spring) => spring.stop(!!arg));
|
|
@@ -5047,7 +5047,7 @@ let Controller$1 = class Controller {
|
|
|
5047
5047
|
});
|
|
5048
5048
|
} else {
|
|
5049
5049
|
const springs = this.springs;
|
|
5050
|
-
each(toArray$
|
|
5050
|
+
each(toArray$5(keys2), (key) => springs[key].pause());
|
|
5051
5051
|
}
|
|
5052
5052
|
return this;
|
|
5053
5053
|
}
|
|
@@ -5058,7 +5058,7 @@ let Controller$1 = class Controller {
|
|
|
5058
5058
|
});
|
|
5059
5059
|
} else {
|
|
5060
5060
|
const springs = this.springs;
|
|
5061
|
-
each(toArray$
|
|
5061
|
+
each(toArray$5(keys2), (key) => springs[key].resume());
|
|
5062
5062
|
}
|
|
5063
5063
|
return this;
|
|
5064
5064
|
}
|
|
@@ -5214,7 +5214,7 @@ async function flushUpdate(ctrl, props, isLoop) {
|
|
|
5214
5214
|
function getSprings(ctrl, props) {
|
|
5215
5215
|
const springs = _extends$2({}, ctrl.springs);
|
|
5216
5216
|
if (props) {
|
|
5217
|
-
each(toArray$
|
|
5217
|
+
each(toArray$5(props), (props2) => {
|
|
5218
5218
|
if (is.und(props2.keys)) {
|
|
5219
5219
|
props2 = createUpdate(props2);
|
|
5220
5220
|
}
|
|
@@ -5490,7 +5490,7 @@ class Interpolation extends FrameValue {
|
|
|
5490
5490
|
}
|
|
5491
5491
|
}
|
|
5492
5492
|
_get() {
|
|
5493
|
-
const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray$
|
|
5493
|
+
const inputs = is.arr(this.source) ? this.source.map(getFluidValue) : toArray$5(getFluidValue(this.source));
|
|
5494
5494
|
return this.calc(...inputs);
|
|
5495
5495
|
}
|
|
5496
5496
|
_start() {
|
|
@@ -5509,7 +5509,7 @@ class Interpolation extends FrameValue {
|
|
|
5509
5509
|
}
|
|
5510
5510
|
_attach() {
|
|
5511
5511
|
let priority2 = 1;
|
|
5512
|
-
each(toArray$
|
|
5512
|
+
each(toArray$5(this.source), (source) => {
|
|
5513
5513
|
if (hasFluidValue(source)) {
|
|
5514
5514
|
addFluidObserver(source, this);
|
|
5515
5515
|
}
|
|
@@ -5524,7 +5524,7 @@ class Interpolation extends FrameValue {
|
|
|
5524
5524
|
this._start();
|
|
5525
5525
|
}
|
|
5526
5526
|
_detach() {
|
|
5527
|
-
each(toArray$
|
|
5527
|
+
each(toArray$5(this.source), (source) => {
|
|
5528
5528
|
if (hasFluidValue(source)) {
|
|
5529
5529
|
removeFluidObserver(source, this);
|
|
5530
5530
|
}
|
|
@@ -5543,7 +5543,7 @@ class Interpolation extends FrameValue {
|
|
|
5543
5543
|
} else if (event.type == "idle") {
|
|
5544
5544
|
this._active.delete(event.parent);
|
|
5545
5545
|
} else if (event.type == "priority") {
|
|
5546
|
-
this.priority = toArray$
|
|
5546
|
+
this.priority = toArray$5(this.source).reduce((highest, parent) => Math.max(highest, (isFrameValue(parent) ? parent.priority : 0) + 1), 0);
|
|
5547
5547
|
}
|
|
5548
5548
|
}
|
|
5549
5549
|
}
|
|
@@ -5711,7 +5711,7 @@ class AnimatedStyle extends AnimatedObject {
|
|
|
5711
5711
|
if (is.und(value))
|
|
5712
5712
|
return;
|
|
5713
5713
|
const unit = pxTransforms.test(key) ? "px" : degTransforms.test(key) ? "deg" : "";
|
|
5714
|
-
inputs.push(toArray$
|
|
5714
|
+
inputs.push(toArray$5(value));
|
|
5715
5715
|
transforms.push(key === "rotate3d" ? ([x2, y2, z2, deg]) => [`rotate3d(${x2},${y2},${z2},${addUnit(deg, unit)})`, isValueIdentity(deg, 0)] : (input) => [`${key}(${input.map((v) => addUnit(v, unit)).join(",")})`, isValueIdentity(input, key.startsWith("scale") ? 1 : 0)]);
|
|
5716
5716
|
}
|
|
5717
5717
|
});
|
|
@@ -9031,7 +9031,7 @@ var definePropertyExports = defineProperty.exports;
|
|
|
9031
9031
|
})(objectSpread2);
|
|
9032
9032
|
var objectSpread2Exports = objectSpread2.exports;
|
|
9033
9033
|
var _interopRequireWildcard$3 = interopRequireWildcardExports.default;
|
|
9034
|
-
var _interopRequireDefault$
|
|
9034
|
+
var _interopRequireDefault$6 = interopRequireDefaultExports.default;
|
|
9035
9035
|
Object.defineProperty(render$1, "__esModule", {
|
|
9036
9036
|
value: true
|
|
9037
9037
|
});
|
|
@@ -9039,10 +9039,10 @@ render$1._r = _r;
|
|
|
9039
9039
|
render$1._u = _u;
|
|
9040
9040
|
var render_2 = render$1.render = render;
|
|
9041
9041
|
var unmount_1 = render$1.unmount = unmount;
|
|
9042
|
-
var _regeneratorRuntime2 = _interopRequireDefault$
|
|
9043
|
-
var _asyncToGenerator2 = _interopRequireDefault$
|
|
9044
|
-
var _typeof2$3 = _interopRequireDefault$
|
|
9045
|
-
var _objectSpread2$1 = _interopRequireDefault$
|
|
9042
|
+
var _regeneratorRuntime2 = _interopRequireDefault$6(regeneratorRuntimeExports);
|
|
9043
|
+
var _asyncToGenerator2 = _interopRequireDefault$6(asyncToGeneratorExports);
|
|
9044
|
+
var _typeof2$3 = _interopRequireDefault$6(_typeofExports);
|
|
9045
|
+
var _objectSpread2$1 = _interopRequireDefault$6(objectSpread2Exports);
|
|
9046
9046
|
var ReactDOM = _interopRequireWildcard$3(ReactDOM__default);
|
|
9047
9047
|
var fullClone = (0, _objectSpread2$1.default)({}, ReactDOM);
|
|
9048
9048
|
var version = fullClone.version, reactRender = fullClone.render, unmountComponentAtNode = fullClone.unmountComponentAtNode;
|
|
@@ -9310,44 +9310,6 @@ const AutoCenter = (props) => withNativeProps(props, React__default.createElemen
|
|
|
9310
9310
|
}, React__default.createElement("div", {
|
|
9311
9311
|
className: `${classPrefix$1m}-content`
|
|
9312
9312
|
}, props.children)));
|
|
9313
|
-
const Fallback = memo(() => React__default.createElement("svg", {
|
|
9314
|
-
className: "adm-avatar-fallback",
|
|
9315
|
-
width: "88px",
|
|
9316
|
-
height: "88px",
|
|
9317
|
-
viewBox: "0 0 88 88",
|
|
9318
|
-
version: "1.1"
|
|
9319
|
-
}, React__default.createElement("title", null, "编组 3"), React__default.createElement("defs", null, React__default.createElement("polygon", {
|
|
9320
|
-
id: "path-1",
|
|
9321
|
-
points: "0 0 88 0 88 88 0 88"
|
|
9322
|
-
})), React__default.createElement("g", {
|
|
9323
|
-
id: "页面-1",
|
|
9324
|
-
stroke: "none",
|
|
9325
|
-
strokeWidth: "1",
|
|
9326
|
-
fill: "none",
|
|
9327
|
-
fillRule: "evenodd"
|
|
9328
|
-
}, React__default.createElement("g", {
|
|
9329
|
-
id: "语雀",
|
|
9330
|
-
transform: "translate(-495.000000, -71.000000)"
|
|
9331
|
-
}, React__default.createElement("g", {
|
|
9332
|
-
id: "编组-3",
|
|
9333
|
-
transform: "translate(495.000000, 71.000000)"
|
|
9334
|
-
}, React__default.createElement("mask", {
|
|
9335
|
-
id: "mask-2",
|
|
9336
|
-
fill: "white"
|
|
9337
|
-
}, React__default.createElement("use", {
|
|
9338
|
-
xlinkHref: "#path-1"
|
|
9339
|
-
})), React__default.createElement("use", {
|
|
9340
|
-
id: "Mask",
|
|
9341
|
-
fill: "#EEEEEE",
|
|
9342
|
-
fillRule: "nonzero",
|
|
9343
|
-
xlinkHref: "#path-1"
|
|
9344
|
-
}), React__default.createElement("path", {
|
|
9345
|
-
d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
|
|
9346
|
-
id: "形状",
|
|
9347
|
-
fill: "#CCCCCC",
|
|
9348
|
-
fillRule: "nonzero",
|
|
9349
|
-
mask: "url(#mask-2)"
|
|
9350
|
-
}))))));
|
|
9351
9313
|
var stagedComponents = {};
|
|
9352
9314
|
var __importDefault = commonjsGlobal && commonjsGlobal.__importDefault || function(mod) {
|
|
9353
9315
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -9376,35 +9338,35 @@ staged_1 = stagedComponents.staged = staged;
|
|
|
9376
9338
|
function toCSSLength(val) {
|
|
9377
9339
|
return typeof val === "number" ? `${val}px` : val;
|
|
9378
9340
|
}
|
|
9379
|
-
const LazyDetector = (props) => {
|
|
9380
|
-
const ref2 = useRef(null);
|
|
9381
|
-
const [inViewport] = useInViewport(ref2);
|
|
9382
|
-
useEffect(() => {
|
|
9383
|
-
if (inViewport) {
|
|
9384
|
-
props.onActive();
|
|
9385
|
-
}
|
|
9386
|
-
}, [inViewport]);
|
|
9387
|
-
return React__default.createElement("div", {
|
|
9388
|
-
ref: ref2
|
|
9389
|
-
});
|
|
9390
|
-
};
|
|
9391
9341
|
const useIsomorphicUpdateLayoutEffect = createUpdateEffect(useIsomorphicLayoutEffect$3);
|
|
9392
|
-
const
|
|
9342
|
+
const BrokenImageIcon = () => React__default.createElement("svg", {
|
|
9393
9343
|
viewBox: "0 0 48 48",
|
|
9394
9344
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9395
9345
|
}, React__default.createElement("path", {
|
|
9396
|
-
d: "
|
|
9346
|
+
d: "M19.233 6.233 17.42 9.08l-10.817.001a.665.665 0 0 0-.647.562l-.007.096V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.415 2.415 0 0 1 1.807.625l.126.127 4.182 4.525 2.267-3.292 5.461 7.841-4.065 7.375H6.604c-1.86 0-3.382-1.47-3.482-3.317l-.005-.192V9.744c0-1.872 1.461-3.405 3.296-3.505l.19-.005h12.63Zm22.163 0c1.86 0 3.382 1.472 3.482 3.314l.005.192v29.14a3.507 3.507 0 0 1-3.3 3.505l-.191.006H27.789l3.63-6.587.06-.119a1.87 1.87 0 0 0-.163-1.853l-6.928-9.949 3.047-4.422a2.374 2.374 0 0 1 1.96-1.01 2.4 2.4 0 0 1 1.86.87l.106.14L42.05 34.89V9.74a.664.664 0 0 0-.654-.658H21.855l1.812-2.848h17.73Zm-28.305 5.611c.794 0 1.52.298 2.07.788l-.843 1.325-.067.114a1.87 1.87 0 0 0 .11 1.959l.848 1.217c-.556.515-1.3.83-2.118.83a3.122 3.122 0 0 1-3.117-3.116 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
9397
9347
|
fill: "#DBDBDB",
|
|
9398
9348
|
fillRule: "nonzero"
|
|
9399
9349
|
}));
|
|
9400
|
-
const
|
|
9350
|
+
const ImageIcon = () => React__default.createElement("svg", {
|
|
9401
9351
|
viewBox: "0 0 48 48",
|
|
9402
9352
|
xmlns: "http://www.w3.org/2000/svg"
|
|
9403
9353
|
}, React__default.createElement("path", {
|
|
9404
|
-
d: "
|
|
9354
|
+
d: "M41.396 6.234c1.923 0 3.487 1.574 3.487 3.505v29.14c0 1.937-1.568 3.51-3.491 3.51H6.604c-1.923 0-3.487-1.573-3.487-3.51V9.745c0-1.936 1.564-3.51 3.487-3.51Zm0 2.847H6.604c-.355 0-.654.3-.654.658V34.9l5.989-8.707a2.373 2.373 0 0 1 1.801-1.005 2.405 2.405 0 0 1 1.933.752l4.182 4.525 7.58-11.005a2.374 2.374 0 0 1 1.96-1.01c.79 0 1.532.38 1.966 1.01L42.05 34.89V9.74a.664.664 0 0 0-.654-.658Zm-28.305 2.763a3.119 3.119 0 0 1 3.117 3.117 3.119 3.119 0 0 1-3.117 3.117 3.122 3.122 0 0 1-3.117-3.117 3.119 3.119 0 0 1 3.117-3.117Z",
|
|
9405
9355
|
fill: "#DBDBDB",
|
|
9406
9356
|
fillRule: "nonzero"
|
|
9407
9357
|
}));
|
|
9358
|
+
const LazyDetector = (props) => {
|
|
9359
|
+
const ref2 = useRef(null);
|
|
9360
|
+
const [inViewport] = useInViewport(ref2);
|
|
9361
|
+
useEffect(() => {
|
|
9362
|
+
if (inViewport) {
|
|
9363
|
+
props.onActive();
|
|
9364
|
+
}
|
|
9365
|
+
}, [inViewport]);
|
|
9366
|
+
return React__default.createElement("div", {
|
|
9367
|
+
ref: ref2
|
|
9368
|
+
});
|
|
9369
|
+
};
|
|
9408
9370
|
const classPrefix$1l = `adm-image`;
|
|
9409
9371
|
const defaultProps$11 = {
|
|
9410
9372
|
fit: "fill",
|
|
@@ -9439,7 +9401,7 @@ const Image$1 = staged_1((p) => {
|
|
|
9439
9401
|
}
|
|
9440
9402
|
}, []);
|
|
9441
9403
|
function renderInner() {
|
|
9442
|
-
if (failed) {
|
|
9404
|
+
if (failed || src === void 0 && !srcSet) {
|
|
9443
9405
|
return React__default.createElement(React__default.Fragment, null, props.fallback);
|
|
9444
9406
|
}
|
|
9445
9407
|
const img = React__default.createElement("img", {
|
|
@@ -9494,16 +9456,56 @@ const Image$1 = staged_1((p) => {
|
|
|
9494
9456
|
}
|
|
9495
9457
|
}), renderInner()));
|
|
9496
9458
|
});
|
|
9459
|
+
const Fallback = memo(() => React__default.createElement("svg", {
|
|
9460
|
+
className: "adm-avatar-fallback",
|
|
9461
|
+
width: "88px",
|
|
9462
|
+
height: "88px",
|
|
9463
|
+
viewBox: "0 0 88 88",
|
|
9464
|
+
version: "1.1"
|
|
9465
|
+
}, React__default.createElement("title", null, "编组 3"), React__default.createElement("defs", null, React__default.createElement("polygon", {
|
|
9466
|
+
id: "path-1",
|
|
9467
|
+
points: "0 0 88 0 88 88 0 88"
|
|
9468
|
+
})), React__default.createElement("g", {
|
|
9469
|
+
id: "页面-1",
|
|
9470
|
+
stroke: "none",
|
|
9471
|
+
strokeWidth: "1",
|
|
9472
|
+
fill: "none",
|
|
9473
|
+
fillRule: "evenodd"
|
|
9474
|
+
}, React__default.createElement("g", {
|
|
9475
|
+
id: "语雀",
|
|
9476
|
+
transform: "translate(-495.000000, -71.000000)"
|
|
9477
|
+
}, React__default.createElement("g", {
|
|
9478
|
+
id: "编组-3",
|
|
9479
|
+
transform: "translate(495.000000, 71.000000)"
|
|
9480
|
+
}, React__default.createElement("mask", {
|
|
9481
|
+
id: "mask-2",
|
|
9482
|
+
fill: "white"
|
|
9483
|
+
}, React__default.createElement("use", {
|
|
9484
|
+
xlinkHref: "#path-1"
|
|
9485
|
+
})), React__default.createElement("use", {
|
|
9486
|
+
id: "Mask",
|
|
9487
|
+
fill: "#EEEEEE",
|
|
9488
|
+
fillRule: "nonzero",
|
|
9489
|
+
xlinkHref: "#path-1"
|
|
9490
|
+
}), React__default.createElement("path", {
|
|
9491
|
+
d: "M44.5707528,16 L43.4292117,16 L42.9575197,16.0086403 L42.9575195,16.0086403 C36.5215787,16.2615464 31.4341803,21.5678078 31.4344832,28.0273864 L31.4344832,34.7776551 L31.4495601,35.3716788 L31.4495593,35.3716628 C31.599687,38.5368723 32.9422041,41.5269327 35.2058513,43.7376716 L38.2147759,46.6775505 L38.4086219,46.8913989 C38.7747759,47.3385365 38.9750835,47.9001589 38.9750835,48.4833848 L38.9750835,48.8938006 L38.9556989,49.1897326 L38.9556989,49.1897325 C38.8577746,49.9812662 38.3754713,50.67284 37.667703,51.036605 L18.7375269,60.7440265 L18.4101421,60.9276334 L18.4101423,60.9276333 C16.9141658,61.8418636 16.0009389,63.4714674 16,65.2283758 L16,66.070809 L16.0129231,66.3948217 C16.1766149,68.4123376 17.860922,70 19.91569,70 L68.0843101,70 L68.08431,70 C70.2460467,70 71.9988087,68.243122 72,66.0751224 L72,65.2326893 C72,63.3382982 70.9446194,61.6037466 69.2624598,60.7440295 L50.3322837,51.036608 L50.3322835,51.0366079 C49.5291218,50.6249082 49.0240448,49.7962466 49.024903,48.8916436 L49.024903,48.4812278 C49.024903,47.8029608 49.3005955,47.1527756 49.7852106,46.6775603 L52.7941352,43.7376813 L52.7941354,43.7376811 C55.204308,41.3832325 56.5636029,38.151975 56.5633606,34.7776456 L56.5633606,28.0273769 L56.5633606,28.0273774 C56.5633606,21.3848531 51.1940878,16 44.5707524,16 L44.5707528,16 Z",
|
|
9492
|
+
id: "形状",
|
|
9493
|
+
fill: "#CCCCCC",
|
|
9494
|
+
fillRule: "nonzero",
|
|
9495
|
+
mask: "url(#mask-2)"
|
|
9496
|
+
}))))));
|
|
9497
9497
|
const classPrefix$1k = "adm-avatar";
|
|
9498
9498
|
const defaultProps$10 = {
|
|
9499
9499
|
fallback: React__default.createElement(Fallback, null),
|
|
9500
9500
|
fit: "cover"
|
|
9501
9501
|
};
|
|
9502
9502
|
const Avatar = (p) => {
|
|
9503
|
+
var _a;
|
|
9503
9504
|
const props = mergeProps(defaultProps$10, p);
|
|
9505
|
+
const mergedSrc = ((_a = props.src) === null || _a === void 0 ? void 0 : _a.trim()) || void 0;
|
|
9504
9506
|
return withNativeProps(props, React__default.createElement(Image$1, {
|
|
9505
9507
|
className: classPrefix$1k,
|
|
9506
|
-
src:
|
|
9508
|
+
src: mergedSrc,
|
|
9507
9509
|
fallback: props.fallback,
|
|
9508
9510
|
placeholder: props.fallback,
|
|
9509
9511
|
alt: props.alt,
|
|
@@ -9875,12 +9877,12 @@ const Calendar = forwardRef((p, ref2) => {
|
|
|
9875
9877
|
};
|
|
9876
9878
|
const header = React__default.createElement("div", {
|
|
9877
9879
|
className: `${classPrefix$1g}-header`
|
|
9878
|
-
}, React__default.createElement("a", {
|
|
9880
|
+
}, props.prevYearButton !== null && React__default.createElement("a", {
|
|
9879
9881
|
className: `${classPrefix$1g}-arrow-button ${classPrefix$1g}-arrow-button-year`,
|
|
9880
9882
|
onClick: () => {
|
|
9881
9883
|
handlePageChange("subtract", 1, "year");
|
|
9882
9884
|
}
|
|
9883
|
-
}, props.prevYearButton), React__default.createElement("a", {
|
|
9885
|
+
}, props.prevYearButton), props.prevMonthButton !== null && React__default.createElement("a", {
|
|
9884
9886
|
className: `${classPrefix$1g}-arrow-button ${classPrefix$1g}-arrow-button-month`,
|
|
9885
9887
|
onClick: () => {
|
|
9886
9888
|
handlePageChange("subtract", 1, "month");
|
|
@@ -9890,12 +9892,12 @@ const Calendar = forwardRef((p, ref2) => {
|
|
|
9890
9892
|
}, replaceMessage$1(locale.Calendar.yearAndMonth, {
|
|
9891
9893
|
year: current.year().toString(),
|
|
9892
9894
|
month: (current.month() + 1).toString()
|
|
9893
|
-
})), React__default.createElement("a", {
|
|
9895
|
+
})), props.nextMonthButton !== null && React__default.createElement("a", {
|
|
9894
9896
|
className: classNames(`${classPrefix$1g}-arrow-button`, `${classPrefix$1g}-arrow-button-right`, `${classPrefix$1g}-arrow-button-right-month`),
|
|
9895
9897
|
onClick: () => {
|
|
9896
9898
|
handlePageChange("add", 1, "month");
|
|
9897
9899
|
}
|
|
9898
|
-
}, props.nextMonthButton), React__default.createElement("a", {
|
|
9900
|
+
}, props.nextMonthButton), props.nextYearButton !== null && React__default.createElement("a", {
|
|
9899
9901
|
className: classNames(`${classPrefix$1g}-arrow-button`, `${classPrefix$1g}-arrow-button-right`, `${classPrefix$1g}-arrow-button-right-year`),
|
|
9900
9902
|
onClick: () => {
|
|
9901
9903
|
handlePageChange("add", 1, "year");
|
|
@@ -14418,14 +14420,14 @@ function canUseDom() {
|
|
|
14418
14420
|
return !!(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
14419
14421
|
}
|
|
14420
14422
|
var default_1$1;
|
|
14421
|
-
var _interopRequireDefault$
|
|
14423
|
+
var _interopRequireDefault$5 = interopRequireDefaultExports.default;
|
|
14422
14424
|
var _interopRequireWildcard$2 = interopRequireWildcardExports.default;
|
|
14423
14425
|
Object.defineProperty(useLayoutEffect$1, "__esModule", {
|
|
14424
14426
|
value: true
|
|
14425
14427
|
});
|
|
14426
14428
|
useLayoutEffect$1.useLayoutUpdateEffect = default_1$1 = useLayoutEffect$1.default = void 0;
|
|
14427
14429
|
var React$2 = _interopRequireWildcard$2(React__default);
|
|
14428
|
-
var _canUseDom = _interopRequireDefault$
|
|
14430
|
+
var _canUseDom = _interopRequireDefault$5(canUseDom$1);
|
|
14429
14431
|
var useInternalLayoutEffect = (0, _canUseDom.default)() ? React$2.useLayoutEffect : React$2.useEffect;
|
|
14430
14432
|
var useLayoutEffect = function useLayoutEffect22(callback, deps) {
|
|
14431
14433
|
var firstMountRef = React$2.useRef(true);
|
|
@@ -15643,7 +15645,7 @@ function _createSuper(Derived) {
|
|
|
15643
15645
|
return _possibleConstructorReturn(this, result);
|
|
15644
15646
|
};
|
|
15645
15647
|
}
|
|
15646
|
-
function toArray$
|
|
15648
|
+
function toArray$4(children) {
|
|
15647
15649
|
var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
15648
15650
|
var ret = [];
|
|
15649
15651
|
React__default.Children.forEach(children, function(child) {
|
|
@@ -15651,9 +15653,9 @@ function toArray$2(children) {
|
|
|
15651
15653
|
return;
|
|
15652
15654
|
}
|
|
15653
15655
|
if (Array.isArray(child)) {
|
|
15654
|
-
ret = ret.concat(toArray$
|
|
15656
|
+
ret = ret.concat(toArray$4(child));
|
|
15655
15657
|
} else if (isFragment$2(child) && child.props) {
|
|
15656
|
-
ret = ret.concat(toArray$
|
|
15658
|
+
ret = ret.concat(toArray$4(child.props.children, option));
|
|
15657
15659
|
} else {
|
|
15658
15660
|
ret.push(child);
|
|
15659
15661
|
}
|
|
@@ -15741,7 +15743,7 @@ var Context$2 = /* @__PURE__ */ React$3.createContext({
|
|
|
15741
15743
|
}
|
|
15742
15744
|
});
|
|
15743
15745
|
var ListContext = /* @__PURE__ */ React$3.createContext(null);
|
|
15744
|
-
function toArray$
|
|
15746
|
+
function toArray$3(value) {
|
|
15745
15747
|
if (value === void 0 || value === null) {
|
|
15746
15748
|
return [];
|
|
15747
15749
|
}
|
|
@@ -17452,7 +17454,7 @@ function _finishOnFirstFailed() {
|
|
|
17452
17454
|
return _finishOnFirstFailed.apply(this, arguments);
|
|
17453
17455
|
}
|
|
17454
17456
|
function getNamePath(path) {
|
|
17455
|
-
return toArray$
|
|
17457
|
+
return toArray$3(path);
|
|
17456
17458
|
}
|
|
17457
17459
|
function cloneByNamePathList(store, namePathList) {
|
|
17458
17460
|
var newStore = {};
|
|
@@ -17694,7 +17696,7 @@ var Field = /* @__PURE__ */ function(_React$Component) {
|
|
|
17694
17696
|
if (!validateTrigger) {
|
|
17695
17697
|
return true;
|
|
17696
17698
|
}
|
|
17697
|
-
var triggerList = toArray$
|
|
17699
|
+
var triggerList = toArray$3(validateTrigger);
|
|
17698
17700
|
return triggerList.includes(triggerName);
|
|
17699
17701
|
});
|
|
17700
17702
|
}
|
|
@@ -17786,7 +17788,7 @@ var Field = /* @__PURE__ */ function(_React$Component) {
|
|
|
17786
17788
|
isFunction: true
|
|
17787
17789
|
});
|
|
17788
17790
|
}
|
|
17789
|
-
var childList = toArray$
|
|
17791
|
+
var childList = toArray$4(children);
|
|
17790
17792
|
if (childList.length !== 1 || !/* @__PURE__ */ React$3.isValidElement(childList[0])) {
|
|
17791
17793
|
return {
|
|
17792
17794
|
child: childList,
|
|
@@ -17841,7 +17843,7 @@ var Field = /* @__PURE__ */ function(_React$Component) {
|
|
|
17841
17843
|
originTriggerFunc.apply(void 0, args);
|
|
17842
17844
|
}
|
|
17843
17845
|
};
|
|
17844
|
-
var validateTriggerList = toArray$
|
|
17846
|
+
var validateTriggerList = toArray$3(mergedValidateTrigger || []);
|
|
17845
17847
|
validateTriggerList.forEach(function(triggerName) {
|
|
17846
17848
|
var originTrigger = control[triggerName];
|
|
17847
17849
|
control[triggerName] = function() {
|
|
@@ -19316,12 +19318,12 @@ const Form2 = forwardRef((p, ref2) => {
|
|
|
19316
19318
|
});
|
|
19317
19319
|
var FieldContext = {};
|
|
19318
19320
|
var _interopRequireWildcard$1 = interopRequireWildcardExports.default;
|
|
19319
|
-
var _interopRequireDefault$
|
|
19321
|
+
var _interopRequireDefault$4 = interopRequireDefaultExports.default;
|
|
19320
19322
|
Object.defineProperty(FieldContext, "__esModule", {
|
|
19321
19323
|
value: true
|
|
19322
19324
|
});
|
|
19323
19325
|
var default_1 = FieldContext.default = FieldContext.HOOK_MARK = void 0;
|
|
19324
|
-
var _warning = _interopRequireDefault$
|
|
19326
|
+
var _warning = _interopRequireDefault$4(warning$3);
|
|
19325
19327
|
var React$1 = _interopRequireWildcard$1(React__default);
|
|
19326
19328
|
var HOOK_MARK = "RC_FORM_INTERNAL_HOOKS";
|
|
19327
19329
|
FieldContext.HOOK_MARK = HOOK_MARK;
|
|
@@ -19362,8 +19364,8 @@ var Context$1 = /* @__PURE__ */ React$1.createContext({
|
|
|
19362
19364
|
};
|
|
19363
19365
|
}
|
|
19364
19366
|
});
|
|
19365
|
-
var _default$
|
|
19366
|
-
default_1 = FieldContext.default = _default$
|
|
19367
|
+
var _default$2 = Context$1;
|
|
19368
|
+
default_1 = FieldContext.default = _default$2;
|
|
19367
19369
|
function undefinedFallback(...items) {
|
|
19368
19370
|
let i2;
|
|
19369
19371
|
for (i2 = 0; i2 < items.length; i2++) {
|
|
@@ -20789,16 +20791,16 @@ function normalizePlacement(placement) {
|
|
|
20789
20791
|
return (_a = record[placement]) !== null && _a !== void 0 ? _a : placement;
|
|
20790
20792
|
}
|
|
20791
20793
|
var findDOMNode$2 = {};
|
|
20792
|
-
var _interopRequireDefault$
|
|
20794
|
+
var _interopRequireDefault$3 = interopRequireDefaultExports.default;
|
|
20793
20795
|
Object.defineProperty(findDOMNode$2, "__esModule", {
|
|
20794
20796
|
value: true
|
|
20795
20797
|
});
|
|
20796
|
-
var _default = findDOMNode$2.default = findDOMNode$1;
|
|
20798
|
+
var _default$1 = findDOMNode$2.default = findDOMNode$1;
|
|
20797
20799
|
var getDOM_1 = findDOMNode$2.getDOM = getDOM$1;
|
|
20798
20800
|
findDOMNode$2.isDOM = isDOM$1;
|
|
20799
|
-
var _typeof2$2 = _interopRequireDefault$
|
|
20800
|
-
var _react$
|
|
20801
|
-
var _reactDom = _interopRequireDefault$
|
|
20801
|
+
var _typeof2$2 = _interopRequireDefault$3(_typeofExports);
|
|
20802
|
+
var _react$2 = _interopRequireDefault$3(React__default);
|
|
20803
|
+
var _reactDom = _interopRequireDefault$3(ReactDOM__default);
|
|
20802
20804
|
function isDOM$1(node) {
|
|
20803
20805
|
return node instanceof HTMLElement || node instanceof SVGElement;
|
|
20804
20806
|
}
|
|
@@ -20816,7 +20818,7 @@ function findDOMNode$1(node) {
|
|
|
20816
20818
|
if (domNode) {
|
|
20817
20819
|
return domNode;
|
|
20818
20820
|
}
|
|
20819
|
-
if (node instanceof _react$
|
|
20821
|
+
if (node instanceof _react$2.default.Component) {
|
|
20820
20822
|
var _ReactDOM$findDOMNode;
|
|
20821
20823
|
return (_ReactDOM$findDOMNode = _reactDom.default.findDOMNode) === null || _ReactDOM$findDOMNode === void 0 ? void 0 : _ReactDOM$findDOMNode.call(_reactDom.default, node);
|
|
20822
20824
|
}
|
|
@@ -20839,12 +20841,12 @@ function useMemo(getValue2, condition, shouldUpdate) {
|
|
|
20839
20841
|
return cacheRef.current.value;
|
|
20840
20842
|
}
|
|
20841
20843
|
var isFragment$1 = {};
|
|
20842
|
-
var _interopRequireDefault$
|
|
20844
|
+
var _interopRequireDefault$2 = interopRequireDefaultExports.default;
|
|
20843
20845
|
Object.defineProperty(isFragment$1, "__esModule", {
|
|
20844
20846
|
value: true
|
|
20845
20847
|
});
|
|
20846
20848
|
isFragment$1.default = isFragment;
|
|
20847
|
-
var _typeof2$1 = _interopRequireDefault$
|
|
20849
|
+
var _typeof2$1 = _interopRequireDefault$2(_typeofExports);
|
|
20848
20850
|
var REACT_ELEMENT_TYPE_18 = Symbol.for("react.element");
|
|
20849
20851
|
var REACT_ELEMENT_TYPE_19 = Symbol.for("react.transitional.element");
|
|
20850
20852
|
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
@@ -20859,17 +20861,17 @@ function isFragment(object4) {
|
|
|
20859
20861
|
var composeRef_1;
|
|
20860
20862
|
var getNodeRef_1;
|
|
20861
20863
|
var supportRef_1;
|
|
20862
|
-
var _interopRequireDefault = interopRequireDefaultExports.default;
|
|
20864
|
+
var _interopRequireDefault$1 = interopRequireDefaultExports.default;
|
|
20863
20865
|
Object.defineProperty(ref, "__esModule", {
|
|
20864
20866
|
value: true
|
|
20865
20867
|
});
|
|
20866
20868
|
ref.useComposeRef = supportRef_1 = ref.supportRef = ref.supportNodeRef = getNodeRef_1 = ref.getNodeRef = ref.fillRef = composeRef_1 = ref.composeRef = void 0;
|
|
20867
|
-
var _typeof2 = _interopRequireDefault(_typeofExports);
|
|
20868
|
-
var _react = React__default;
|
|
20869
|
+
var _typeof2 = _interopRequireDefault$1(_typeofExports);
|
|
20870
|
+
var _react$1 = React__default;
|
|
20869
20871
|
var _reactIs = reactIsExports;
|
|
20870
|
-
var _useMemo = _interopRequireDefault(useMemo$1);
|
|
20871
|
-
var _isFragment = _interopRequireDefault(isFragment$1);
|
|
20872
|
-
var ReactMajorVersion = Number(_react.version.split(".")[0]);
|
|
20872
|
+
var _useMemo = _interopRequireDefault$1(useMemo$1);
|
|
20873
|
+
var _isFragment$1 = _interopRequireDefault$1(isFragment$1);
|
|
20874
|
+
var ReactMajorVersion = Number(_react$1.version.split(".")[0]);
|
|
20873
20875
|
var fillRef2 = ref.fillRef = function fillRef3(ref2, node) {
|
|
20874
20876
|
if (typeof ref2 === "function") {
|
|
20875
20877
|
ref2(node);
|
|
@@ -20921,7 +20923,7 @@ var supportRef2 = supportRef_1 = ref.supportRef = function supportRef3(nodeOrCom
|
|
|
20921
20923
|
return true;
|
|
20922
20924
|
};
|
|
20923
20925
|
function isReactElement(node) {
|
|
20924
|
-
return /* @__PURE__ */ (0, _react.isValidElement)(node) && !(0, _isFragment.default)(node);
|
|
20926
|
+
return /* @__PURE__ */ (0, _react$1.isValidElement)(node) && !(0, _isFragment$1.default)(node);
|
|
20925
20927
|
}
|
|
20926
20928
|
ref.supportNodeRef = function supportNodeRef(node) {
|
|
20927
20929
|
return isReactElement(node) && supportRef2(node);
|
|
@@ -20942,7 +20944,7 @@ class LegacyWrapper extends React$3.Component {
|
|
|
20942
20944
|
this.componentDidUpdate();
|
|
20943
20945
|
}
|
|
20944
20946
|
componentDidUpdate() {
|
|
20945
|
-
const node = _default(this);
|
|
20947
|
+
const node = _default$1(this);
|
|
20946
20948
|
if (node instanceof Element) {
|
|
20947
20949
|
this.element = node;
|
|
20948
20950
|
} else {
|
|
@@ -21167,7 +21169,7 @@ const PopoverMenu = forwardRef((props, ref2) => {
|
|
|
21167
21169
|
const Popover = attachPropertiesToComponent(Popover$1, {
|
|
21168
21170
|
Menu: PopoverMenu
|
|
21169
21171
|
});
|
|
21170
|
-
function toArray(candidate) {
|
|
21172
|
+
function toArray$2(candidate) {
|
|
21171
21173
|
if (candidate === void 0 || candidate === false)
|
|
21172
21174
|
return [];
|
|
21173
21175
|
return Array.isArray(candidate) ? candidate : [candidate];
|
|
@@ -21408,7 +21410,7 @@ const FormItem = (props) => {
|
|
|
21408
21410
|
}), (control, meta, context) => {
|
|
21409
21411
|
let childNode = null;
|
|
21410
21412
|
const isRequired = required4 !== void 0 ? required4 : rules2 && rules2.some((rule) => !!(rule && typeof rule === "object" && rule.required));
|
|
21411
|
-
const nameList = toArray(name).length && meta ? meta.name : [];
|
|
21413
|
+
const nameList = toArray$2(name).length && meta ? meta.name : [];
|
|
21412
21414
|
const fieldId = (nameList.length > 0 && formName ? [formName, ...nameList] : nameList).join("_");
|
|
21413
21415
|
if (shouldUpdate && dependencies) {
|
|
21414
21416
|
devWarning("Form.Item", "`shouldUpdate` and `dependencies` shouldn't be used together.");
|
|
@@ -21448,7 +21450,7 @@ const FormItem = (props) => {
|
|
|
21448
21450
|
if (!childProps.id) {
|
|
21449
21451
|
childProps.id = fieldId;
|
|
21450
21452
|
}
|
|
21451
|
-
const triggers = /* @__PURE__ */ new Set([...toArray(trigger), ...toArray(mergedValidateTrigger)]);
|
|
21453
|
+
const triggers = /* @__PURE__ */ new Set([...toArray$2(trigger), ...toArray$2(mergedValidateTrigger)]);
|
|
21452
21454
|
triggers.forEach((eventName) => {
|
|
21453
21455
|
childProps[eventName] = (...args) => {
|
|
21454
21456
|
var _a, _b, _c;
|
|
@@ -21770,7 +21772,8 @@ const Slide = (props) => {
|
|
|
21770
21772
|
}
|
|
21771
21773
|
});
|
|
21772
21774
|
const customRendering = typeof imageRender === "function" && imageRender(props.image, {
|
|
21773
|
-
|
|
21775
|
+
ref: imgRef,
|
|
21776
|
+
index: index2 !== null && index2 !== void 0 ? index2 : 0
|
|
21774
21777
|
});
|
|
21775
21778
|
return React__default.createElement("div", {
|
|
21776
21779
|
className: `${classPrefix$K}-slide`
|
|
@@ -26370,12 +26373,31 @@ const colorRecord$1 = {
|
|
|
26370
26373
|
warning: "var(--adm-color-warning)",
|
|
26371
26374
|
danger: "var(--adm-color-danger)"
|
|
26372
26375
|
};
|
|
26373
|
-
|
|
26374
|
-
|
|
26375
|
-
|
|
26376
|
-
|
|
26377
|
-
|
|
26378
|
-
|
|
26376
|
+
var toArray$1 = {};
|
|
26377
|
+
var _interopRequireDefault = interopRequireDefaultExports.default;
|
|
26378
|
+
Object.defineProperty(toArray$1, "__esModule", {
|
|
26379
|
+
value: true
|
|
26380
|
+
});
|
|
26381
|
+
var _default = toArray$1.default = toArray;
|
|
26382
|
+
var _isFragment = _interopRequireDefault(isFragment$1);
|
|
26383
|
+
var _react = _interopRequireDefault(React__default);
|
|
26384
|
+
function toArray(children) {
|
|
26385
|
+
var option = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
26386
|
+
var ret = [];
|
|
26387
|
+
_react.default.Children.forEach(children, function(child) {
|
|
26388
|
+
if ((child === void 0 || child === null) && !option.keepEmpty) {
|
|
26389
|
+
return;
|
|
26390
|
+
}
|
|
26391
|
+
if (Array.isArray(child)) {
|
|
26392
|
+
ret = ret.concat(toArray(child));
|
|
26393
|
+
} else if ((0, _isFragment.default)(child) && child.props) {
|
|
26394
|
+
ret = ret.concat(toArray(child.props.children, option));
|
|
26395
|
+
} else {
|
|
26396
|
+
ret.push(child);
|
|
26397
|
+
}
|
|
26398
|
+
});
|
|
26399
|
+
return ret;
|
|
26400
|
+
}
|
|
26379
26401
|
function useRefState(initialState) {
|
|
26380
26402
|
const [state, setState] = useState(initialState);
|
|
26381
26403
|
const ref2 = useRef(state);
|
|
@@ -26403,6 +26425,12 @@ function mergeFuncProps(p1, p2) {
|
|
|
26403
26425
|
});
|
|
26404
26426
|
return res;
|
|
26405
26427
|
}
|
|
26428
|
+
const SwiperItem = (props) => {
|
|
26429
|
+
return withNativeProps(props, React__default.createElement("div", {
|
|
26430
|
+
className: "adm-swiper-item",
|
|
26431
|
+
onClick: props.onClick
|
|
26432
|
+
}, props.children));
|
|
26433
|
+
};
|
|
26406
26434
|
const classPrefix$a = `adm-swiper`;
|
|
26407
26435
|
const eventToPropRecord = {
|
|
26408
26436
|
"mousedown": "onMouseDown",
|
|
@@ -26447,15 +26475,16 @@ const Swiper = forwardRef(staged_1((p, ref2) => {
|
|
|
26447
26475
|
if (typeof children === "function") {
|
|
26448
26476
|
renderChildren2 = children;
|
|
26449
26477
|
} else {
|
|
26450
|
-
|
|
26478
|
+
const childrenArray = _default(children);
|
|
26479
|
+
validChildren2 = childrenArray.filter((child) => {
|
|
26451
26480
|
if (!React__default.isValidElement(child))
|
|
26452
26481
|
return null;
|
|
26453
26482
|
if (child.type !== SwiperItem) {
|
|
26454
26483
|
devWarning("Swiper", "The children of `Swiper` must be `Swiper.Item` components.");
|
|
26455
|
-
return
|
|
26484
|
+
return false;
|
|
26456
26485
|
}
|
|
26457
26486
|
count2++;
|
|
26458
|
-
return
|
|
26487
|
+
return true;
|
|
26459
26488
|
});
|
|
26460
26489
|
}
|
|
26461
26490
|
return {
|
|
@@ -26636,7 +26665,7 @@ const Swiper = forwardRef(staged_1((p, ref2) => {
|
|
|
26636
26665
|
window.clearTimeout(timeoutRef.current);
|
|
26637
26666
|
};
|
|
26638
26667
|
}, [autoplay, autoplayInterval, dragging, mergedTotal]);
|
|
26639
|
-
function renderItem(index2, child) {
|
|
26668
|
+
function renderItem(index2, child, key) {
|
|
26640
26669
|
let itemStyle = {};
|
|
26641
26670
|
if (loop2) {
|
|
26642
26671
|
itemStyle = {
|
|
@@ -26655,10 +26684,10 @@ const Swiper = forwardRef(staged_1((p, ref2) => {
|
|
|
26655
26684
|
[`${classPrefix$a}-slide-active`]: current === index2
|
|
26656
26685
|
}),
|
|
26657
26686
|
style: itemStyle,
|
|
26658
|
-
key: index2
|
|
26687
|
+
key: key !== null && key !== void 0 ? key : index2
|
|
26659
26688
|
}, child);
|
|
26660
26689
|
}
|
|
26661
|
-
|
|
26690
|
+
const renderStableItems = () => {
|
|
26662
26691
|
if (renderChildren && total) {
|
|
26663
26692
|
const offsetCount = 2;
|
|
26664
26693
|
const startIndex = Math.max(current - offsetCount, 0);
|
|
@@ -26674,9 +26703,16 @@ const Swiper = forwardRef(staged_1((p, ref2) => {
|
|
|
26674
26703
|
}
|
|
26675
26704
|
}), items);
|
|
26676
26705
|
}
|
|
26677
|
-
|
|
26678
|
-
return
|
|
26679
|
-
|
|
26706
|
+
if (validChildren) {
|
|
26707
|
+
return validChildren.map((child, index2) => {
|
|
26708
|
+
var _a;
|
|
26709
|
+
return renderItem(index2, child, (_a = child === null || child === void 0 ? void 0 : child.key) !== null && _a !== void 0 ? _a : index2);
|
|
26710
|
+
});
|
|
26711
|
+
}
|
|
26712
|
+
return null;
|
|
26713
|
+
};
|
|
26714
|
+
function renderItems() {
|
|
26715
|
+
return renderStableItems();
|
|
26680
26716
|
}
|
|
26681
26717
|
function renderTrackInner() {
|
|
26682
26718
|
if (loop2) {
|