antd-mobile 5.36.0 → 5.37.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/2x/bundle/antd-mobile.cjs.development.js +393 -295
- package/2x/bundle/antd-mobile.cjs.js +7 -7
- package/2x/bundle/antd-mobile.es.development.js +393 -295
- package/2x/bundle/antd-mobile.es.js +5619 -5550
- package/2x/bundle/antd-mobile.umd.development.js +393 -295
- package/2x/bundle/antd-mobile.umd.js +7 -7
- package/2x/bundle/style.css +5 -8
- package/2x/cjs/components/card/card.css +5 -5
- package/2x/cjs/components/card/card.patch.css +21 -0
- package/2x/cjs/components/center-popup/center-popup.js +46 -43
- package/2x/cjs/components/check-list/check-list.js +15 -11
- package/2x/cjs/components/collapse/collapse.d.ts +10 -2
- package/2x/cjs/components/collapse/collapse.js +54 -39
- package/2x/cjs/components/config-provider/config-provider.d.ts +40 -2
- package/2x/cjs/components/dropdown/context.d.ts +2 -0
- package/2x/cjs/components/dropdown/context.js +10 -0
- package/2x/cjs/components/dropdown/dropdown.d.ts +11 -3
- package/2x/cjs/components/dropdown/dropdown.js +23 -16
- package/2x/cjs/components/dropdown/index.d.ts +1 -0
- package/2x/cjs/components/dropdown/item.d.ts +5 -1
- package/2x/cjs/components/dropdown/item.js +22 -8
- package/2x/cjs/components/form/form-item.d.ts +6 -5
- package/2x/cjs/components/form/form-item.js +25 -17
- package/2x/cjs/components/form/form.d.ts +1 -1
- package/2x/cjs/components/form/index.d.ts +1 -1
- package/2x/cjs/components/input/input.d.ts +3 -1
- package/2x/cjs/components/input/input.js +53 -51
- package/2x/cjs/components/list/list-item.d.ts +6 -2
- package/2x/cjs/components/list/list-item.js +16 -6
- package/2x/cjs/components/nav-bar/nav-bar.d.ts +4 -0
- package/2x/cjs/components/nav-bar/nav-bar.js +18 -13
- package/2x/cjs/components/notice-bar/notice-bar.css +0 -3
- package/2x/cjs/components/notice-bar/notice-bar.d.ts +3 -1
- package/2x/cjs/components/notice-bar/notice-bar.js +30 -25
- package/2x/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/2x/cjs/components/number-keyboard/number-keyboard.js +14 -13
- package/2x/cjs/components/popup/popup-base-props.d.ts +3 -2
- package/2x/cjs/components/popup/popup-base-props.js +4 -0
- package/2x/cjs/components/popup/popup.js +5 -5
- package/2x/cjs/components/result/result.js +3 -10
- package/2x/cjs/components/result/use-result-icon.d.ts +3 -0
- package/2x/cjs/components/result/use-result-icon.js +37 -0
- package/2x/cjs/components/result-page/result-page.js +3 -10
- package/2x/cjs/components/search-bar/search-bar.d.ts +10 -2
- package/2x/cjs/components/search-bar/search-bar.js +34 -33
- package/2x/cjs/components/toast/toast.d.ts +2 -2
- package/2x/cjs/components/toast/toast.js +4 -4
- package/2x/cjs/components/virtual-input/virtual-input.d.ts +5 -5
- package/2x/cjs/components/virtual-input/virtual-input.js +26 -24
- package/2x/cjs/locales/ar-SA.js +2 -2
- package/2x/cjs/locales/de-DE.js +3 -3
- package/2x/cjs/locales/es-ES.js +2 -2
- package/2x/cjs/locales/fr-FR.js +1 -1
- package/2x/cjs/locales/in-ID.d.ts +139 -0
- package/2x/cjs/locales/in-ID.js +149 -0
- package/2x/cjs/locales/ja-JP.js +2 -2
- package/2x/cjs/locales/th-TH.js +2 -2
- package/2x/cjs/utils/is-node-with-content.d.ts +3 -0
- package/2x/cjs/utils/is-node-with-content.js +3 -0
- package/2x/cjs/utils/use-mutation-effect.d.ts +1 -0
- package/2x/cjs/utils/use-mutation-effect.js +20 -9
- package/2x/cjs/utils/with-default-props.d.ts +7 -0
- package/2x/cjs/utils/with-default-props.js +21 -5
- package/2x/es/components/card/card.css +5 -5
- package/2x/es/components/card/card.patch.css +21 -0
- package/2x/es/components/center-popup/center-popup.js +45 -42
- package/2x/es/components/check-list/check-list.js +15 -11
- package/2x/es/components/collapse/collapse.d.ts +10 -2
- package/2x/es/components/collapse/collapse.js +53 -38
- package/2x/es/components/config-provider/config-provider.d.ts +40 -2
- package/2x/es/components/dropdown/context.d.ts +2 -0
- package/2x/es/components/dropdown/context.js +2 -0
- package/2x/es/components/dropdown/dropdown.d.ts +11 -3
- package/2x/es/components/dropdown/dropdown.js +24 -17
- package/2x/es/components/dropdown/index.d.ts +1 -0
- package/2x/es/components/dropdown/item.d.ts +5 -1
- package/2x/es/components/dropdown/item.js +22 -8
- package/2x/es/components/form/form-item.d.ts +6 -5
- package/2x/es/components/form/form-item.js +24 -16
- package/2x/es/components/form/form.d.ts +1 -1
- package/2x/es/components/form/index.d.ts +1 -1
- package/2x/es/components/input/input.d.ts +3 -1
- package/2x/es/components/input/input.js +52 -50
- package/2x/es/components/list/list-item.d.ts +6 -2
- package/2x/es/components/list/list-item.js +16 -6
- package/2x/es/components/nav-bar/nav-bar.d.ts +4 -0
- package/2x/es/components/nav-bar/nav-bar.js +18 -13
- package/2x/es/components/notice-bar/notice-bar.css +0 -3
- package/2x/es/components/notice-bar/notice-bar.d.ts +3 -1
- package/2x/es/components/notice-bar/notice-bar.js +29 -24
- package/2x/es/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/2x/es/components/number-keyboard/number-keyboard.js +13 -12
- package/2x/es/components/popup/popup-base-props.d.ts +3 -2
- package/2x/es/components/popup/popup-base-props.js +3 -0
- package/2x/es/components/popup/popup.js +5 -5
- package/2x/es/components/result/result.js +3 -10
- package/2x/es/components/result/use-result-icon.d.ts +3 -0
- package/2x/es/components/result/use-result-icon.js +29 -0
- package/2x/es/components/result-page/result-page.js +3 -10
- package/2x/es/components/search-bar/search-bar.d.ts +10 -2
- package/2x/es/components/search-bar/search-bar.js +33 -32
- package/2x/es/components/toast/toast.d.ts +2 -2
- package/2x/es/components/toast/toast.js +3 -3
- package/2x/es/components/virtual-input/virtual-input.d.ts +5 -5
- package/2x/es/components/virtual-input/virtual-input.js +25 -23
- package/2x/es/locales/ar-SA.js +2 -2
- package/2x/es/locales/de-DE.js +3 -3
- package/2x/es/locales/es-ES.js +2 -2
- package/2x/es/locales/fr-FR.js +1 -1
- package/2x/es/locales/in-ID.d.ts +139 -0
- package/2x/es/locales/in-ID.js +142 -0
- package/2x/es/locales/ja-JP.js +2 -2
- package/2x/es/locales/th-TH.js +2 -2
- package/2x/es/utils/is-node-with-content.d.ts +3 -0
- package/2x/es/utils/is-node-with-content.js +3 -0
- package/2x/es/utils/use-mutation-effect.d.ts +1 -0
- package/2x/es/utils/use-mutation-effect.js +19 -9
- package/2x/es/utils/with-default-props.d.ts +7 -0
- package/2x/es/utils/with-default-props.js +20 -5
- package/2x/package.json +3 -2
- package/bundle/antd-mobile.cjs.development.js +393 -295
- package/bundle/antd-mobile.cjs.js +7 -7
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +393 -295
- package/bundle/antd-mobile.es.js +5619 -5550
- package/bundle/antd-mobile.umd.development.js +393 -295
- package/bundle/antd-mobile.umd.js +7 -7
- package/bundle/style.css +1 -1
- package/cjs/components/card/card.css +5 -5
- package/cjs/components/card/card.patch.css +17 -0
- package/cjs/components/center-popup/center-popup.js +46 -43
- package/cjs/components/check-list/check-list.js +15 -11
- package/cjs/components/collapse/collapse.d.ts +10 -2
- package/cjs/components/collapse/collapse.js +54 -39
- package/cjs/components/config-provider/config-provider.d.ts +40 -2
- package/cjs/components/dropdown/context.d.ts +2 -0
- package/cjs/components/dropdown/context.js +10 -0
- package/cjs/components/dropdown/dropdown.d.ts +11 -3
- package/cjs/components/dropdown/dropdown.js +23 -16
- package/cjs/components/dropdown/index.d.ts +1 -0
- package/cjs/components/dropdown/item.d.ts +5 -1
- package/cjs/components/dropdown/item.js +22 -8
- package/cjs/components/form/form-item.d.ts +6 -5
- package/cjs/components/form/form-item.js +25 -17
- package/cjs/components/form/form.d.ts +1 -1
- package/cjs/components/form/index.d.ts +1 -1
- package/cjs/components/input/input.d.ts +3 -1
- package/cjs/components/input/input.js +53 -51
- package/cjs/components/list/list-item.d.ts +6 -2
- package/cjs/components/list/list-item.js +16 -6
- package/cjs/components/nav-bar/nav-bar.d.ts +4 -0
- package/cjs/components/nav-bar/nav-bar.js +18 -13
- package/cjs/components/notice-bar/notice-bar.css +0 -2
- package/cjs/components/notice-bar/notice-bar.d.ts +3 -1
- package/cjs/components/notice-bar/notice-bar.js +30 -25
- package/cjs/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/cjs/components/number-keyboard/number-keyboard.js +14 -13
- package/cjs/components/popup/popup-base-props.d.ts +3 -2
- package/cjs/components/popup/popup-base-props.js +4 -0
- package/cjs/components/popup/popup.js +5 -5
- package/cjs/components/result/result.js +3 -10
- package/cjs/components/result/use-result-icon.d.ts +3 -0
- package/cjs/components/result/use-result-icon.js +37 -0
- package/cjs/components/result-page/result-page.js +3 -10
- package/cjs/components/search-bar/search-bar.d.ts +10 -2
- package/cjs/components/search-bar/search-bar.js +34 -33
- package/cjs/components/toast/toast.css +1 -1
- package/cjs/components/toast/toast.d.ts +2 -2
- package/cjs/components/toast/toast.js +4 -4
- package/cjs/components/virtual-input/virtual-input.d.ts +5 -5
- package/cjs/components/virtual-input/virtual-input.js +26 -24
- package/cjs/locales/ar-SA.js +2 -2
- package/cjs/locales/de-DE.js +3 -3
- package/cjs/locales/es-ES.js +2 -2
- package/cjs/locales/fr-FR.js +1 -1
- package/cjs/locales/in-ID.d.ts +139 -0
- package/cjs/locales/in-ID.js +149 -0
- package/cjs/locales/ja-JP.js +2 -2
- package/cjs/locales/th-TH.js +2 -2
- package/cjs/utils/is-node-with-content.d.ts +3 -0
- package/cjs/utils/is-node-with-content.js +3 -0
- package/cjs/utils/use-mutation-effect.d.ts +1 -0
- package/cjs/utils/use-mutation-effect.js +20 -9
- package/cjs/utils/with-default-props.d.ts +7 -0
- package/cjs/utils/with-default-props.js +21 -5
- package/es/components/card/card.css +5 -5
- package/es/components/card/card.patch.css +17 -0
- package/es/components/center-popup/center-popup.js +45 -42
- package/es/components/check-list/check-list.js +15 -11
- package/es/components/collapse/collapse.d.ts +10 -2
- package/es/components/collapse/collapse.js +53 -38
- package/es/components/config-provider/config-provider.d.ts +40 -2
- package/es/components/dropdown/context.d.ts +2 -0
- package/es/components/dropdown/context.js +2 -0
- package/es/components/dropdown/dropdown.d.ts +11 -3
- package/es/components/dropdown/dropdown.js +24 -17
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/dropdown/item.d.ts +5 -1
- package/es/components/dropdown/item.js +22 -8
- package/es/components/form/form-item.d.ts +6 -5
- package/es/components/form/form-item.js +24 -16
- package/es/components/form/form.d.ts +1 -1
- package/es/components/form/index.d.ts +1 -1
- package/es/components/input/input.d.ts +3 -1
- package/es/components/input/input.js +52 -50
- package/es/components/list/list-item.d.ts +6 -2
- package/es/components/list/list-item.js +16 -6
- package/es/components/nav-bar/nav-bar.d.ts +4 -0
- package/es/components/nav-bar/nav-bar.js +18 -13
- package/es/components/notice-bar/notice-bar.css +0 -2
- package/es/components/notice-bar/notice-bar.d.ts +3 -1
- package/es/components/notice-bar/notice-bar.js +29 -24
- package/es/components/number-keyboard/number-keyboard.d.ts +1 -1
- package/es/components/number-keyboard/number-keyboard.js +13 -12
- package/es/components/popup/popup-base-props.d.ts +3 -2
- package/es/components/popup/popup-base-props.js +3 -0
- package/es/components/popup/popup.js +5 -5
- package/es/components/result/result.js +3 -10
- package/es/components/result/use-result-icon.d.ts +3 -0
- package/es/components/result/use-result-icon.js +29 -0
- package/es/components/result-page/result-page.js +3 -10
- package/es/components/search-bar/search-bar.d.ts +10 -2
- package/es/components/search-bar/search-bar.js +33 -32
- package/es/components/toast/toast.css +1 -1
- package/es/components/toast/toast.d.ts +2 -2
- package/es/components/toast/toast.js +3 -3
- package/es/components/virtual-input/virtual-input.d.ts +5 -5
- package/es/components/virtual-input/virtual-input.js +25 -23
- package/es/locales/ar-SA.js +2 -2
- package/es/locales/de-DE.js +3 -3
- package/es/locales/es-ES.js +2 -2
- package/es/locales/fr-FR.js +1 -1
- package/es/locales/in-ID.d.ts +139 -0
- package/es/locales/in-ID.js +142 -0
- package/es/locales/ja-JP.js +2 -2
- package/es/locales/th-TH.js +2 -2
- package/es/utils/is-node-with-content.d.ts +3 -0
- package/es/utils/is-node-with-content.js +3 -0
- package/es/utils/use-mutation-effect.d.ts +1 -0
- package/es/utils/use-mutation-effect.js +19 -9
- package/es/utils/with-default-props.d.ts +7 -0
- package/es/utils/with-default-props.js +20 -5
- package/package.json +3 -2
- package/umd/antd-mobile.js +1 -1
|
@@ -434,14 +434,24 @@ function withNativeProps(props, element) {
|
|
|
434
434
|
function mergeProps(...items) {
|
|
435
435
|
const ret = {};
|
|
436
436
|
items.forEach((item) => {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
437
|
+
if (item) {
|
|
438
|
+
Object.keys(item).forEach((key) => {
|
|
439
|
+
if (item[key] !== void 0) {
|
|
440
|
+
ret[key] = item[key];
|
|
441
|
+
}
|
|
442
|
+
});
|
|
443
|
+
}
|
|
442
444
|
});
|
|
443
445
|
return ret;
|
|
444
446
|
}
|
|
447
|
+
function mergeProp(defaultProp, ...propList) {
|
|
448
|
+
for (let i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
|
|
449
|
+
if (propList[i2] !== void 0) {
|
|
450
|
+
return propList[i2];
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
return defaultProp;
|
|
454
|
+
}
|
|
445
455
|
var createUpdateEffect = function(hook) {
|
|
446
456
|
return function(effect, deps) {
|
|
447
457
|
var isMounted = useRef(false);
|
|
@@ -6493,6 +6503,7 @@ function TextDeletionOutline(props) {
|
|
|
6493
6503
|
}
|
|
6494
6504
|
const defaultPopupBaseProps = {
|
|
6495
6505
|
closeOnMaskClick: false,
|
|
6506
|
+
closeIcon: React__default.createElement(CloseOutline, null),
|
|
6496
6507
|
destroyOnClose: false,
|
|
6497
6508
|
disableBodyScroll: true,
|
|
6498
6509
|
forceRender: false,
|
|
@@ -8350,11 +8361,12 @@ const defaultProps$14 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
8350
8361
|
position: "bottom"
|
|
8351
8362
|
});
|
|
8352
8363
|
const Popup = (p) => {
|
|
8353
|
-
const props = mergeProps(defaultProps$14, p);
|
|
8354
|
-
const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
|
|
8355
8364
|
const {
|
|
8356
|
-
locale
|
|
8365
|
+
locale,
|
|
8366
|
+
popup: componentConfig = {}
|
|
8357
8367
|
} = useConfig();
|
|
8368
|
+
const props = mergeProps(defaultProps$14, componentConfig, p);
|
|
8369
|
+
const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
|
|
8358
8370
|
const [active, setActive] = useState(props.visible);
|
|
8359
8371
|
const ref = useRef(null);
|
|
8360
8372
|
useLockScroll(ref, props.disableBodyScroll && active ? "strict" : false);
|
|
@@ -8451,7 +8463,7 @@ const Popup = (p) => {
|
|
|
8451
8463
|
},
|
|
8452
8464
|
role: "button",
|
|
8453
8465
|
"aria-label": locale.common.close
|
|
8454
|
-
},
|
|
8466
|
+
}, props.closeIcon), props.children))));
|
|
8455
8467
|
return React__default.createElement(ShouldRender, {
|
|
8456
8468
|
active,
|
|
8457
8469
|
forceRender: props.forceRender,
|
|
@@ -9709,18 +9721,27 @@ function useResizeEffect(effect, targetRef) {
|
|
|
9709
9721
|
}
|
|
9710
9722
|
}, [targetRef]);
|
|
9711
9723
|
}
|
|
9712
|
-
function
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
|
|
9716
|
-
fn();
|
|
9724
|
+
function observe(element, options, callback) {
|
|
9725
|
+
if (element && typeof MutationObserver !== "undefined") {
|
|
9726
|
+
let observer = new MutationObserver(() => {
|
|
9727
|
+
callback();
|
|
9717
9728
|
});
|
|
9718
|
-
|
|
9719
|
-
return;
|
|
9720
|
-
observer.observe(targetRef.current, options);
|
|
9729
|
+
observer.observe(element, options);
|
|
9721
9730
|
return () => {
|
|
9722
|
-
observer
|
|
9731
|
+
if (observer) {
|
|
9732
|
+
observer.disconnect();
|
|
9733
|
+
observer = null;
|
|
9734
|
+
}
|
|
9723
9735
|
};
|
|
9736
|
+
}
|
|
9737
|
+
return () => {
|
|
9738
|
+
};
|
|
9739
|
+
}
|
|
9740
|
+
function useMutationEffect(effect, targetRef, options) {
|
|
9741
|
+
const fn = useMemoizedFn(effect);
|
|
9742
|
+
useEffect(() => {
|
|
9743
|
+
const cleanup = observe(targetRef.current, options, fn);
|
|
9744
|
+
return cleanup;
|
|
9724
9745
|
}, [targetRef]);
|
|
9725
9746
|
}
|
|
9726
9747
|
function bound(position, min2, max2) {
|
|
@@ -11386,9 +11407,17 @@ function isNodeWithContent(node) {
|
|
|
11386
11407
|
}
|
|
11387
11408
|
const classPrefix$12 = `adm-list-item`;
|
|
11388
11409
|
const ListItem = (props) => {
|
|
11389
|
-
var _a;
|
|
11410
|
+
var _a, _b;
|
|
11411
|
+
const {
|
|
11412
|
+
arrow: arrow2,
|
|
11413
|
+
arrowIcon
|
|
11414
|
+
} = props;
|
|
11415
|
+
const {
|
|
11416
|
+
list: componentConfig = {}
|
|
11417
|
+
} = useConfig();
|
|
11390
11418
|
const clickable = (_a = props.clickable) !== null && _a !== void 0 ? _a : !!props.onClick;
|
|
11391
|
-
const
|
|
11419
|
+
const showArrow = (_b = arrow2 !== null && arrow2 !== void 0 ? arrow2 : arrowIcon) !== null && _b !== void 0 ? _b : clickable;
|
|
11420
|
+
const mergedArrowIcon = mergeProp(componentConfig.arrowIcon, arrow2 !== true ? arrow2 : null, arrowIcon !== true ? arrowIcon : null);
|
|
11392
11421
|
const content = React__default.createElement("div", {
|
|
11393
11422
|
className: `${classPrefix$12}-content`
|
|
11394
11423
|
}, isNodeWithContent(props.prefix) && React__default.createElement("div", {
|
|
@@ -11401,9 +11430,9 @@ const ListItem = (props) => {
|
|
|
11401
11430
|
className: `${classPrefix$12}-description`
|
|
11402
11431
|
}, props.description)), isNodeWithContent(props.extra) && React__default.createElement("div", {
|
|
11403
11432
|
className: `${classPrefix$12}-content-extra`
|
|
11404
|
-
}, props.extra),
|
|
11433
|
+
}, props.extra), showArrow && React__default.createElement("div", {
|
|
11405
11434
|
className: `${classPrefix$12}-content-arrow`
|
|
11406
|
-
},
|
|
11435
|
+
}, mergedArrowIcon || React__default.createElement(RightOutline, null)));
|
|
11407
11436
|
return withNativeProps(props, React__default.createElement(clickable ? "a" : "div", {
|
|
11408
11437
|
className: classNames(`${classPrefix$12}`, clickable ? ["adm-plain-anchor"] : [], props.disabled && `${classPrefix$12}-disabled`),
|
|
11409
11438
|
onClick: props.disabled ? void 0 : props.onClick
|
|
@@ -11419,11 +11448,14 @@ const defaultProps$R = {
|
|
|
11419
11448
|
defaultValue: [],
|
|
11420
11449
|
activeIcon: React__default.createElement(CheckOutline, null)
|
|
11421
11450
|
};
|
|
11422
|
-
const CheckList$1 = (
|
|
11423
|
-
const
|
|
11424
|
-
|
|
11451
|
+
const CheckList$1 = (props) => {
|
|
11452
|
+
const {
|
|
11453
|
+
checkList: componentConfig = {}
|
|
11454
|
+
} = useConfig();
|
|
11455
|
+
const mergedProps = mergeProps(defaultProps$R, componentConfig, props);
|
|
11456
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
11425
11457
|
function check(val) {
|
|
11426
|
-
if (
|
|
11458
|
+
if (mergedProps.multiple) {
|
|
11427
11459
|
setValue2([...value, val]);
|
|
11428
11460
|
} else {
|
|
11429
11461
|
setValue2([val]);
|
|
@@ -11437,7 +11469,7 @@ const CheckList$1 = (p) => {
|
|
|
11437
11469
|
extra,
|
|
11438
11470
|
disabled,
|
|
11439
11471
|
readOnly
|
|
11440
|
-
} =
|
|
11472
|
+
} = mergedProps;
|
|
11441
11473
|
return React__default.createElement(CheckListContext.Provider, {
|
|
11442
11474
|
value: {
|
|
11443
11475
|
value,
|
|
@@ -11448,10 +11480,10 @@ const CheckList$1 = (p) => {
|
|
|
11448
11480
|
disabled,
|
|
11449
11481
|
readOnly
|
|
11450
11482
|
}
|
|
11451
|
-
}, withNativeProps(
|
|
11452
|
-
mode:
|
|
11483
|
+
}, withNativeProps(mergedProps, React__default.createElement(List$1, {
|
|
11484
|
+
mode: mergedProps.mode,
|
|
11453
11485
|
className: classPrefix$11
|
|
11454
|
-
},
|
|
11486
|
+
}, mergedProps.children)));
|
|
11455
11487
|
};
|
|
11456
11488
|
const classPrefix$10 = `adm-check-list-item`;
|
|
11457
11489
|
const CheckListItem = (props) => {
|
|
@@ -11924,12 +11956,15 @@ const classPrefix$Y = "adm-center-popup";
|
|
|
11924
11956
|
const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
11925
11957
|
getContainer: null
|
|
11926
11958
|
});
|
|
11927
|
-
const CenterPopup = (
|
|
11928
|
-
const
|
|
11959
|
+
const CenterPopup = (props) => {
|
|
11960
|
+
const {
|
|
11961
|
+
popup: componentConfig = {}
|
|
11962
|
+
} = useConfig();
|
|
11963
|
+
const mergedProps = mergeProps(defaultProps$O, componentConfig, props);
|
|
11929
11964
|
const unmountedRef = useUnmountedRef$1();
|
|
11930
11965
|
const style = useSpring({
|
|
11931
|
-
scale:
|
|
11932
|
-
opacity:
|
|
11966
|
+
scale: mergedProps.visible ? 1 : 0.8,
|
|
11967
|
+
opacity: mergedProps.visible ? 1 : 0,
|
|
11933
11968
|
config: {
|
|
11934
11969
|
mass: 1.2,
|
|
11935
11970
|
tension: 200,
|
|
@@ -11940,69 +11975,69 @@ const CenterPopup = (p) => {
|
|
|
11940
11975
|
var _a, _b;
|
|
11941
11976
|
if (unmountedRef.current)
|
|
11942
11977
|
return;
|
|
11943
|
-
setActive(
|
|
11944
|
-
if (
|
|
11945
|
-
(_a =
|
|
11978
|
+
setActive(mergedProps.visible);
|
|
11979
|
+
if (mergedProps.visible) {
|
|
11980
|
+
(_a = mergedProps.afterShow) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
11946
11981
|
} else {
|
|
11947
|
-
(_b =
|
|
11982
|
+
(_b = mergedProps.afterClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
|
|
11948
11983
|
}
|
|
11949
11984
|
}
|
|
11950
11985
|
});
|
|
11951
|
-
const [active, setActive] = useState(
|
|
11986
|
+
const [active, setActive] = useState(mergedProps.visible);
|
|
11952
11987
|
useIsomorphicLayoutEffect$2(() => {
|
|
11953
|
-
if (
|
|
11988
|
+
if (mergedProps.visible) {
|
|
11954
11989
|
setActive(true);
|
|
11955
11990
|
}
|
|
11956
|
-
}, [
|
|
11991
|
+
}, [mergedProps.visible]);
|
|
11957
11992
|
const ref = useRef(null);
|
|
11958
|
-
useLockScroll(ref,
|
|
11959
|
-
const maskVisible = useInnerVisible(active &&
|
|
11993
|
+
useLockScroll(ref, mergedProps.disableBodyScroll && active);
|
|
11994
|
+
const maskVisible = useInnerVisible(active && mergedProps.visible);
|
|
11960
11995
|
const body = React__default.createElement("div", {
|
|
11961
|
-
className: classNames(`${classPrefix$Y}-body`,
|
|
11962
|
-
style:
|
|
11963
|
-
},
|
|
11964
|
-
const node = withStopPropagation(
|
|
11996
|
+
className: classNames(`${classPrefix$Y}-body`, mergedProps.bodyClassName),
|
|
11997
|
+
style: mergedProps.bodyStyle
|
|
11998
|
+
}, mergedProps.children);
|
|
11999
|
+
const node = withStopPropagation(mergedProps.stopPropagation, withNativeProps(mergedProps, React__default.createElement("div", {
|
|
11965
12000
|
className: classPrefix$Y,
|
|
11966
12001
|
style: {
|
|
11967
12002
|
display: active ? void 0 : "none",
|
|
11968
12003
|
pointerEvents: active ? void 0 : "none"
|
|
11969
12004
|
}
|
|
11970
|
-
},
|
|
12005
|
+
}, mergedProps.mask && React__default.createElement(Mask, {
|
|
11971
12006
|
visible: maskVisible,
|
|
11972
|
-
forceRender:
|
|
11973
|
-
destroyOnClose:
|
|
12007
|
+
forceRender: mergedProps.forceRender,
|
|
12008
|
+
destroyOnClose: mergedProps.destroyOnClose,
|
|
11974
12009
|
onMaskClick: (e2) => {
|
|
11975
12010
|
var _a, _b;
|
|
11976
|
-
(_a =
|
|
11977
|
-
if (
|
|
11978
|
-
(_b =
|
|
12011
|
+
(_a = mergedProps.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
12012
|
+
if (mergedProps.closeOnMaskClick) {
|
|
12013
|
+
(_b = mergedProps.onClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
|
|
11979
12014
|
}
|
|
11980
12015
|
},
|
|
11981
|
-
style:
|
|
11982
|
-
className: classNames(`${classPrefix$Y}-mask`,
|
|
12016
|
+
style: mergedProps.maskStyle,
|
|
12017
|
+
className: classNames(`${classPrefix$Y}-mask`, mergedProps.maskClassName),
|
|
11983
12018
|
disableBodyScroll: false,
|
|
11984
|
-
stopPropagation:
|
|
12019
|
+
stopPropagation: mergedProps.stopPropagation
|
|
11985
12020
|
}), React__default.createElement("div", {
|
|
11986
12021
|
className: `${classPrefix$Y}-wrap`,
|
|
11987
|
-
role:
|
|
11988
|
-
"aria-label":
|
|
12022
|
+
role: mergedProps.role,
|
|
12023
|
+
"aria-label": mergedProps["aria-label"]
|
|
11989
12024
|
}, React__default.createElement(animated.div, {
|
|
11990
12025
|
style: Object.assign(Object.assign({}, style), {
|
|
11991
12026
|
pointerEvents: style.opacity.to((v) => v === 1 ? "unset" : "none")
|
|
11992
12027
|
}),
|
|
11993
12028
|
ref
|
|
11994
|
-
},
|
|
12029
|
+
}, mergedProps.showCloseButton && React__default.createElement("a", {
|
|
11995
12030
|
className: classNames(`${classPrefix$Y}-close`, "adm-plain-anchor"),
|
|
11996
12031
|
onClick: () => {
|
|
11997
12032
|
var _a;
|
|
11998
|
-
(_a =
|
|
12033
|
+
(_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
11999
12034
|
}
|
|
12000
|
-
},
|
|
12035
|
+
}, mergedProps.closeIcon), body)))));
|
|
12001
12036
|
return React__default.createElement(ShouldRender, {
|
|
12002
12037
|
active,
|
|
12003
|
-
forceRender:
|
|
12004
|
-
destroyOnClose:
|
|
12005
|
-
}, renderToContainer(
|
|
12038
|
+
forceRender: mergedProps.forceRender,
|
|
12039
|
+
destroyOnClose: mergedProps.destroyOnClose
|
|
12040
|
+
}, renderToContainer(mergedProps.getContainer, node));
|
|
12006
12041
|
};
|
|
12007
12042
|
const CheckboxGroupContext = createContext(null);
|
|
12008
12043
|
const defaultProps$N = {
|
|
@@ -12197,9 +12232,26 @@ const CollapsePanelContent = (props) => {
|
|
|
12197
12232
|
if (!inner)
|
|
12198
12233
|
return;
|
|
12199
12234
|
if (visible) {
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
}
|
|
12235
|
+
let lastMotionId = 0;
|
|
12236
|
+
let cancelObserve = () => {
|
|
12237
|
+
};
|
|
12238
|
+
const handleMotion = () => {
|
|
12239
|
+
lastMotionId += 1;
|
|
12240
|
+
const motionId = lastMotionId;
|
|
12241
|
+
api.start({
|
|
12242
|
+
height: inner.offsetHeight
|
|
12243
|
+
})[0].then(() => {
|
|
12244
|
+
if (motionId === lastMotionId) {
|
|
12245
|
+
cancelObserve();
|
|
12246
|
+
}
|
|
12247
|
+
});
|
|
12248
|
+
};
|
|
12249
|
+
cancelObserve = observe(inner, {
|
|
12250
|
+
childList: true,
|
|
12251
|
+
subtree: true
|
|
12252
|
+
}, handleMotion);
|
|
12253
|
+
handleMotion();
|
|
12254
|
+
return cancelObserve;
|
|
12203
12255
|
} else {
|
|
12204
12256
|
api.start({
|
|
12205
12257
|
height: inner.offsetHeight,
|
|
@@ -12229,8 +12281,12 @@ const CollapsePanelContent = (props) => {
|
|
|
12229
12281
|
}, React__default.createElement(List$1.Item, null, shouldRender && props.children)));
|
|
12230
12282
|
};
|
|
12231
12283
|
const Collapse = (props) => {
|
|
12284
|
+
const {
|
|
12285
|
+
collapse: componentConfig = {}
|
|
12286
|
+
} = useConfig();
|
|
12287
|
+
const mergedProps = mergeProps(componentConfig, props);
|
|
12232
12288
|
const panels = [];
|
|
12233
|
-
traverseReactNode(
|
|
12289
|
+
traverseReactNode(mergedProps.children, (child) => {
|
|
12234
12290
|
if (!isValidElement(child))
|
|
12235
12291
|
return;
|
|
12236
12292
|
const key = child.key;
|
|
@@ -12240,11 +12296,11 @@ const Collapse = (props) => {
|
|
|
12240
12296
|
});
|
|
12241
12297
|
const handlePropsValue = () => {
|
|
12242
12298
|
var _a;
|
|
12243
|
-
if (!
|
|
12299
|
+
if (!mergedProps.accordion) {
|
|
12244
12300
|
return {
|
|
12245
|
-
value:
|
|
12246
|
-
defaultValue: (_a =
|
|
12247
|
-
onChange:
|
|
12301
|
+
value: mergedProps.activeKey,
|
|
12302
|
+
defaultValue: (_a = mergedProps.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
|
|
12303
|
+
onChange: mergedProps.onChange
|
|
12248
12304
|
};
|
|
12249
12305
|
}
|
|
12250
12306
|
const initValue = {
|
|
@@ -12252,29 +12308,29 @@ const Collapse = (props) => {
|
|
|
12252
12308
|
defaultValue: [],
|
|
12253
12309
|
onChange: (v) => {
|
|
12254
12310
|
var _a2, _b;
|
|
12255
|
-
(_a2 =
|
|
12311
|
+
(_a2 = mergedProps.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(mergedProps, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
|
|
12256
12312
|
}
|
|
12257
12313
|
};
|
|
12258
|
-
if (
|
|
12314
|
+
if (mergedProps.activeKey === void 0) {
|
|
12259
12315
|
initValue.value = void 0;
|
|
12260
|
-
} else if (
|
|
12261
|
-
initValue.value = [
|
|
12316
|
+
} else if (mergedProps.activeKey !== null) {
|
|
12317
|
+
initValue.value = [mergedProps.activeKey];
|
|
12262
12318
|
}
|
|
12263
|
-
if (![null, void 0].includes(
|
|
12264
|
-
initValue.defaultValue = [
|
|
12319
|
+
if (![null, void 0].includes(mergedProps.defaultActiveKey)) {
|
|
12320
|
+
initValue.defaultValue = [mergedProps.defaultActiveKey];
|
|
12265
12321
|
}
|
|
12266
12322
|
return initValue;
|
|
12267
12323
|
};
|
|
12268
12324
|
const [activeKey, setActiveKey] = usePropsValue(handlePropsValue());
|
|
12269
12325
|
const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
|
|
12270
|
-
return withNativeProps(
|
|
12326
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
12271
12327
|
className: classPrefix$W
|
|
12272
12328
|
}, React__default.createElement(List$1, null, panels.map((panel) => {
|
|
12273
12329
|
const key = panel.key;
|
|
12274
12330
|
const active = activeKeyList.includes(key);
|
|
12275
12331
|
function handleClick(event) {
|
|
12276
12332
|
var _a, _b;
|
|
12277
|
-
if (
|
|
12333
|
+
if (mergedProps.accordion) {
|
|
12278
12334
|
if (active) {
|
|
12279
12335
|
setActiveKey([]);
|
|
12280
12336
|
} else {
|
|
@@ -12289,27 +12345,19 @@ const Collapse = (props) => {
|
|
|
12289
12345
|
}
|
|
12290
12346
|
(_b = (_a = panel.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
12291
12347
|
}
|
|
12292
|
-
const
|
|
12293
|
-
|
|
12294
|
-
|
|
12295
|
-
|
|
12296
|
-
}
|
|
12297
|
-
|
|
12298
|
-
arrow2 = panel.props.arrow;
|
|
12299
|
-
}
|
|
12300
|
-
return typeof arrow2 === "function" ? arrow2(active) : React__default.createElement("div", {
|
|
12301
|
-
className: classNames(`${classPrefix$W}-arrow`, {
|
|
12302
|
-
[`${classPrefix$W}-arrow-active`]: active
|
|
12303
|
-
})
|
|
12304
|
-
}, arrow2);
|
|
12305
|
-
};
|
|
12348
|
+
const arrow2 = mergeProp(React__default.createElement(DownOutline, null), mergedProps.arrow, mergedProps.arrowIcon, panel.props.arrow, panel.props.arrowIcon);
|
|
12349
|
+
const arrowIcon = typeof arrow2 === "function" ? arrow2(active) : React__default.createElement("div", {
|
|
12350
|
+
className: classNames(`${classPrefix$W}-arrow`, {
|
|
12351
|
+
[`${classPrefix$W}-arrow-active`]: active
|
|
12352
|
+
})
|
|
12353
|
+
}, arrow2);
|
|
12306
12354
|
return React__default.createElement(React__default.Fragment, {
|
|
12307
12355
|
key
|
|
12308
12356
|
}, withNativeProps(panel.props, React__default.createElement(List$1.Item, {
|
|
12309
12357
|
className: `${classPrefix$W}-panel-header`,
|
|
12310
12358
|
onClick: handleClick,
|
|
12311
12359
|
disabled: panel.props.disabled,
|
|
12312
|
-
|
|
12360
|
+
arrowIcon
|
|
12313
12361
|
}, panel.props.title)), React__default.createElement(CollapsePanelContent, {
|
|
12314
12362
|
visible: active,
|
|
12315
12363
|
forceRender: !!panel.props.forceRender,
|
|
@@ -12945,25 +12993,37 @@ const index$c = attachPropertiesToComponent(Dialog, {
|
|
|
12945
12993
|
confirm: confirm$1,
|
|
12946
12994
|
clear: clear$2
|
|
12947
12995
|
});
|
|
12996
|
+
const IconContext = React__default.createContext(null);
|
|
12948
12997
|
const classPrefix$V = `adm-dropdown-item`;
|
|
12949
12998
|
const Item = (props) => {
|
|
12950
|
-
|
|
12999
|
+
const {
|
|
13000
|
+
dropdown: componentConfig = {}
|
|
13001
|
+
} = useConfig();
|
|
13002
|
+
const mergedProps = mergeProps(componentConfig, props);
|
|
13003
|
+
const {
|
|
13004
|
+
active,
|
|
13005
|
+
highlight,
|
|
13006
|
+
onClick,
|
|
13007
|
+
title
|
|
13008
|
+
} = mergedProps;
|
|
12951
13009
|
const cls2 = classNames(classPrefix$V, {
|
|
12952
|
-
[`${classPrefix$V}-active`]:
|
|
12953
|
-
[`${classPrefix$V}-highlight`]:
|
|
13010
|
+
[`${classPrefix$V}-active`]: active,
|
|
13011
|
+
[`${classPrefix$V}-highlight`]: highlight !== null && highlight !== void 0 ? highlight : active
|
|
12954
13012
|
});
|
|
13013
|
+
const contextArrowIcon = React__default.useContext(IconContext);
|
|
13014
|
+
const mergedArrowIcon = mergeProp(React__default.createElement(DownFill, null), contextArrowIcon, mergedProps.arrow, mergedProps.arrowIcon);
|
|
12955
13015
|
return withNativeProps(props, React__default.createElement("div", {
|
|
12956
13016
|
className: cls2,
|
|
12957
|
-
onClick
|
|
13017
|
+
onClick
|
|
12958
13018
|
}, React__default.createElement("div", {
|
|
12959
13019
|
className: `${classPrefix$V}-title`
|
|
12960
13020
|
}, React__default.createElement("span", {
|
|
12961
13021
|
className: `${classPrefix$V}-title-text`
|
|
12962
|
-
},
|
|
13022
|
+
}, title), React__default.createElement("span", {
|
|
12963
13023
|
className: classNames(`${classPrefix$V}-title-arrow`, {
|
|
12964
|
-
[`${classPrefix$V}-title-arrow-active`]:
|
|
13024
|
+
[`${classPrefix$V}-title-arrow-active`]: active
|
|
12965
13025
|
})
|
|
12966
|
-
},
|
|
13026
|
+
}, mergedArrowIcon))));
|
|
12967
13027
|
};
|
|
12968
13028
|
const Item$1 = Item;
|
|
12969
13029
|
const ItemChildrenWrap = (props) => {
|
|
@@ -12986,17 +13046,21 @@ const defaultProps$H = {
|
|
|
12986
13046
|
closeOnClickAway: false,
|
|
12987
13047
|
getContainer: defaultPopupBaseProps["getContainer"]
|
|
12988
13048
|
};
|
|
12989
|
-
const Dropdown = forwardRef((
|
|
12990
|
-
const
|
|
13049
|
+
const Dropdown = forwardRef((props, ref) => {
|
|
13050
|
+
const {
|
|
13051
|
+
dropdown: componentConfig = {}
|
|
13052
|
+
} = useConfig();
|
|
13053
|
+
const mergedProps = mergeProps(defaultProps$H, componentConfig, props);
|
|
13054
|
+
const arrowIcon = mergeProp(componentConfig.arrowIcon, props.arrow, props.arrowIcon);
|
|
12991
13055
|
const [value, setValue2] = usePropsValue({
|
|
12992
|
-
value:
|
|
12993
|
-
defaultValue:
|
|
12994
|
-
onChange:
|
|
13056
|
+
value: mergedProps.activeKey,
|
|
13057
|
+
defaultValue: mergedProps.defaultActiveKey,
|
|
13058
|
+
onChange: mergedProps.onChange
|
|
12995
13059
|
});
|
|
12996
13060
|
const navRef = useRef(null);
|
|
12997
13061
|
const contentRef = useRef(null);
|
|
12998
13062
|
useClickAway(() => {
|
|
12999
|
-
if (!
|
|
13063
|
+
if (!mergedProps.closeOnClickAway)
|
|
13000
13064
|
return;
|
|
13001
13065
|
setValue2(null);
|
|
13002
13066
|
}, [navRef, contentRef]);
|
|
@@ -13020,7 +13084,7 @@ const Dropdown = forwardRef((p, ref) => {
|
|
|
13020
13084
|
};
|
|
13021
13085
|
let popupForceRender = false;
|
|
13022
13086
|
const items = [];
|
|
13023
|
-
const navs = React__default.Children.map(
|
|
13087
|
+
const navs = React__default.Children.map(mergedProps.children, (child) => {
|
|
13024
13088
|
if (isValidElement(child)) {
|
|
13025
13089
|
const childProps = Object.assign(Object.assign({}, child.props), {
|
|
13026
13090
|
onClick: (event) => {
|
|
@@ -13028,8 +13092,7 @@ const Dropdown = forwardRef((p, ref) => {
|
|
|
13028
13092
|
changeActive(child.key);
|
|
13029
13093
|
(_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
13030
13094
|
},
|
|
13031
|
-
active: child.key === value
|
|
13032
|
-
arrow: child.props.arrow === void 0 ? props.arrow : child.props.arrow
|
|
13095
|
+
active: child.key === value
|
|
13033
13096
|
});
|
|
13034
13097
|
items.push(child);
|
|
13035
13098
|
if (child.props.forceRender)
|
|
@@ -13044,18 +13107,20 @@ const Dropdown = forwardRef((p, ref) => {
|
|
|
13044
13107
|
setValue2(null);
|
|
13045
13108
|
}
|
|
13046
13109
|
}), [setValue2]);
|
|
13047
|
-
return withNativeProps(
|
|
13110
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
13048
13111
|
className: classNames(classPrefix$U, {
|
|
13049
13112
|
[`${classPrefix$U}-open`]: !!value
|
|
13050
13113
|
}),
|
|
13051
13114
|
ref: containerRef
|
|
13115
|
+
}, React__default.createElement(IconContext.Provider, {
|
|
13116
|
+
value: arrowIcon
|
|
13052
13117
|
}, React__default.createElement("div", {
|
|
13053
13118
|
className: `${classPrefix$U}-nav`,
|
|
13054
13119
|
ref: navRef
|
|
13055
|
-
}, navs), React__default.createElement(Popup, {
|
|
13120
|
+
}, navs)), React__default.createElement(Popup, {
|
|
13056
13121
|
visible: !!value,
|
|
13057
13122
|
position: "top",
|
|
13058
|
-
getContainer:
|
|
13123
|
+
getContainer: mergedProps.getContainer,
|
|
13059
13124
|
className: `${classPrefix$U}-popup`,
|
|
13060
13125
|
maskClassName: `${classPrefix$U}-popup-mask`,
|
|
13061
13126
|
bodyClassName: `${classPrefix$U}-popup-body`,
|
|
@@ -13063,7 +13128,7 @@ const Dropdown = forwardRef((p, ref) => {
|
|
|
13063
13128
|
top
|
|
13064
13129
|
},
|
|
13065
13130
|
forceRender: popupForceRender,
|
|
13066
|
-
onMaskClick:
|
|
13131
|
+
onMaskClick: mergedProps.closeOnMaskClick ? () => {
|
|
13067
13132
|
changeActive(null);
|
|
13068
13133
|
} : void 0
|
|
13069
13134
|
}, React__default.createElement("div", {
|
|
@@ -18276,24 +18341,13 @@ var Context = /* @__PURE__ */ React.createContext({
|
|
|
18276
18341
|
});
|
|
18277
18342
|
var _default = Context;
|
|
18278
18343
|
default_1 = FieldContext.default = _default;
|
|
18279
|
-
function
|
|
18280
|
-
|
|
18281
|
-
|
|
18282
|
-
|
|
18283
|
-
|
|
18284
|
-
|
|
18285
|
-
|
|
18286
|
-
return !!(prototype && prototype.isReactComponent);
|
|
18287
|
-
}
|
|
18288
|
-
function isSimpleFunctionComponent(type4) {
|
|
18289
|
-
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
18290
|
-
}
|
|
18291
|
-
function isSafeSetRefComponent(component) {
|
|
18292
|
-
if (reactIsExports.isFragment(component))
|
|
18293
|
-
return false;
|
|
18294
|
-
if (reactIsExports.isMemo(component))
|
|
18295
|
-
return isSafeSetRefComponent(component.type);
|
|
18296
|
-
return !isSimpleFunctionComponent(component.type);
|
|
18344
|
+
function undefinedFallback(...items) {
|
|
18345
|
+
let i2;
|
|
18346
|
+
for (i2 = 0; i2 < items.length; i2++) {
|
|
18347
|
+
if (items[i2] !== void 0)
|
|
18348
|
+
break;
|
|
18349
|
+
}
|
|
18350
|
+
return items[i2];
|
|
18297
18351
|
}
|
|
18298
18352
|
const Arrow = memo((props) => {
|
|
18299
18353
|
return withNativeProps(props, React__default.createElement("svg", {
|
|
@@ -19921,13 +19975,24 @@ const PopoverMenu = forwardRef((props, ref) => {
|
|
|
19921
19975
|
const Popover = attachPropertiesToComponent(Popover$1, {
|
|
19922
19976
|
Menu: PopoverMenu
|
|
19923
19977
|
});
|
|
19924
|
-
function
|
|
19925
|
-
|
|
19926
|
-
|
|
19927
|
-
|
|
19928
|
-
|
|
19929
|
-
|
|
19930
|
-
|
|
19978
|
+
function toArray(candidate) {
|
|
19979
|
+
if (candidate === void 0 || candidate === false)
|
|
19980
|
+
return [];
|
|
19981
|
+
return Array.isArray(candidate) ? candidate : [candidate];
|
|
19982
|
+
}
|
|
19983
|
+
function shouldConstruct(Component) {
|
|
19984
|
+
const prototype = Component.prototype;
|
|
19985
|
+
return !!(prototype && prototype.isReactComponent);
|
|
19986
|
+
}
|
|
19987
|
+
function isSimpleFunctionComponent(type4) {
|
|
19988
|
+
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
19989
|
+
}
|
|
19990
|
+
function isSafeSetRefComponent(component) {
|
|
19991
|
+
if (reactIsExports.isFragment(component))
|
|
19992
|
+
return false;
|
|
19993
|
+
if (reactIsExports.isMemo(component))
|
|
19994
|
+
return isSafeSetRefComponent(component.type);
|
|
19995
|
+
return !isSimpleFunctionComponent(component.type);
|
|
19931
19996
|
}
|
|
19932
19997
|
const NAME_SPLIT = "__SPLIT__";
|
|
19933
19998
|
const classPrefix$L = `adm-form-item`;
|
|
@@ -19936,22 +20001,25 @@ const MemoInput = React__default.memo(({
|
|
|
19936
20001
|
}) => children, (prev, next) => prev.value === next.value && prev.update === next.update);
|
|
19937
20002
|
const FormItemLayout = (props) => {
|
|
19938
20003
|
var _a;
|
|
20004
|
+
const {
|
|
20005
|
+
locale,
|
|
20006
|
+
form: componentConfig = {}
|
|
20007
|
+
} = useConfig();
|
|
19939
20008
|
const {
|
|
19940
20009
|
style,
|
|
19941
20010
|
extra,
|
|
19942
20011
|
label,
|
|
19943
20012
|
help,
|
|
20013
|
+
helpIcon,
|
|
19944
20014
|
required: required4,
|
|
19945
20015
|
children,
|
|
19946
20016
|
htmlFor,
|
|
19947
20017
|
hidden,
|
|
19948
20018
|
arrow: arrow2,
|
|
20019
|
+
arrowIcon,
|
|
19949
20020
|
childElementPosition = "normal"
|
|
19950
|
-
} = props;
|
|
20021
|
+
} = mergeProps(componentConfig, props);
|
|
19951
20022
|
const context = useContext(FormContext);
|
|
19952
|
-
const {
|
|
19953
|
-
locale
|
|
19954
|
-
} = useConfig();
|
|
19955
20023
|
const hasFeedback = props.hasFeedback !== void 0 ? props.hasFeedback : context.hasFeedback;
|
|
19956
20024
|
const layout = props.layout || context.layout;
|
|
19957
20025
|
const disabled = (_a = props.disabled) !== null && _a !== void 0 ? _a : context.disabled;
|
|
@@ -19991,7 +20059,7 @@ const FormItemLayout = (props) => {
|
|
|
19991
20059
|
e2.stopPropagation();
|
|
19992
20060
|
e2.preventDefault();
|
|
19993
20061
|
}
|
|
19994
|
-
}, React__default.createElement(QuestionCircleOutline, null))));
|
|
20062
|
+
}, helpIcon || React__default.createElement(QuestionCircleOutline, null))));
|
|
19995
20063
|
const description = (!!props.description || hasFeedback) && React__default.createElement(React__default.Fragment, null, props.description, hasFeedback && React__default.createElement(React__default.Fragment, null, props.errors.map((error, index2) => React__default.createElement("div", {
|
|
19996
20064
|
key: `error-${index2}`,
|
|
19997
20065
|
className: `${classPrefix$L}-feedback-error`
|
|
@@ -20012,7 +20080,7 @@ const FormItemLayout = (props) => {
|
|
|
20012
20080
|
disabled,
|
|
20013
20081
|
onClick: props.onClick,
|
|
20014
20082
|
clickable: props.clickable,
|
|
20015
|
-
|
|
20083
|
+
arrowIcon: arrowIcon || arrow2
|
|
20016
20084
|
}, React__default.createElement("div", {
|
|
20017
20085
|
className: classNames(`${classPrefix$L}-child`, `${classPrefix$L}-child-position-${childElementPosition}`)
|
|
20018
20086
|
}, React__default.createElement("div", {
|
|
@@ -20026,6 +20094,7 @@ const FormItem = (props) => {
|
|
|
20026
20094
|
// FormItem 相关
|
|
20027
20095
|
label,
|
|
20028
20096
|
help,
|
|
20097
|
+
helpIcon,
|
|
20029
20098
|
extra,
|
|
20030
20099
|
hasFeedback,
|
|
20031
20100
|
name,
|
|
@@ -20046,8 +20115,9 @@ const FormItem = (props) => {
|
|
|
20046
20115
|
shouldUpdate,
|
|
20047
20116
|
dependencies,
|
|
20048
20117
|
clickable,
|
|
20049
|
-
arrow: arrow2
|
|
20050
|
-
|
|
20118
|
+
arrow: arrow2,
|
|
20119
|
+
arrowIcon
|
|
20120
|
+
} = props, fieldProps = __rest(props, ["style", "label", "help", "helpIcon", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow", "arrowIcon"]);
|
|
20051
20121
|
const {
|
|
20052
20122
|
name: formName
|
|
20053
20123
|
} = useContext(FormContext);
|
|
@@ -20099,6 +20169,7 @@ const FormItem = (props) => {
|
|
|
20099
20169
|
label,
|
|
20100
20170
|
extra,
|
|
20101
20171
|
help,
|
|
20172
|
+
helpIcon,
|
|
20102
20173
|
description,
|
|
20103
20174
|
required: isRequired,
|
|
20104
20175
|
disabled,
|
|
@@ -20111,7 +20182,8 @@ const FormItem = (props) => {
|
|
|
20111
20182
|
layout,
|
|
20112
20183
|
childElementPosition,
|
|
20113
20184
|
clickable,
|
|
20114
|
-
arrow: arrow2
|
|
20185
|
+
arrow: arrow2,
|
|
20186
|
+
arrowIcon
|
|
20115
20187
|
}, React__default.createElement(NoStyleItemContext.Provider, {
|
|
20116
20188
|
value: onSubMetaChange
|
|
20117
20189
|
}, baseChildren)));
|
|
@@ -21338,22 +21410,24 @@ function useInputHandleKeyDown({
|
|
|
21338
21410
|
const classPrefix$A = `adm-input`;
|
|
21339
21411
|
const defaultProps$v = {
|
|
21340
21412
|
defaultValue: "",
|
|
21413
|
+
clearIcon: React__default.createElement(CloseCircleFill, null),
|
|
21341
21414
|
onlyShowClearWhenFocus: true
|
|
21342
21415
|
};
|
|
21343
|
-
const Input = forwardRef((
|
|
21344
|
-
const
|
|
21345
|
-
|
|
21416
|
+
const Input = forwardRef((props, ref) => {
|
|
21417
|
+
const {
|
|
21418
|
+
locale,
|
|
21419
|
+
input: componentConfig = {}
|
|
21420
|
+
} = useConfig();
|
|
21421
|
+
const mergedProps = mergeProps(defaultProps$v, componentConfig, props);
|
|
21422
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
21346
21423
|
const [hasFocus, setHasFocus] = useState(false);
|
|
21347
21424
|
const compositionStartRef = useRef(false);
|
|
21348
21425
|
const nativeInputRef = useRef(null);
|
|
21349
|
-
const {
|
|
21350
|
-
locale
|
|
21351
|
-
} = useConfig();
|
|
21352
21426
|
const handleKeydown = useInputHandleKeyDown({
|
|
21353
|
-
onEnterPress:
|
|
21354
|
-
onKeyDown:
|
|
21427
|
+
onEnterPress: mergedProps.onEnterPress,
|
|
21428
|
+
onKeyDown: mergedProps.onKeyDown,
|
|
21355
21429
|
nativeInputRef,
|
|
21356
|
-
enterKeyHint:
|
|
21430
|
+
enterKeyHint: mergedProps.enterKeyHint
|
|
21357
21431
|
});
|
|
21358
21432
|
useImperativeHandle(ref, () => ({
|
|
21359
21433
|
clear: () => {
|
|
@@ -21373,8 +21447,8 @@ const Input = forwardRef((p, ref) => {
|
|
|
21373
21447
|
}));
|
|
21374
21448
|
function checkValue() {
|
|
21375
21449
|
let nextValue = value;
|
|
21376
|
-
if (
|
|
21377
|
-
const boundValue = nextValue && bound(parseFloat(nextValue),
|
|
21450
|
+
if (mergedProps.type === "number") {
|
|
21451
|
+
const boundValue = nextValue && bound(parseFloat(nextValue), mergedProps.min, mergedProps.max).toString();
|
|
21378
21452
|
if (Number(nextValue) !== Number(boundValue)) {
|
|
21379
21453
|
nextValue = boundValue;
|
|
21380
21454
|
}
|
|
@@ -21384,16 +21458,16 @@ const Input = forwardRef((p, ref) => {
|
|
|
21384
21458
|
}
|
|
21385
21459
|
}
|
|
21386
21460
|
const shouldShowClear = (() => {
|
|
21387
|
-
if (!
|
|
21461
|
+
if (!mergedProps.clearable || !value || mergedProps.readOnly)
|
|
21388
21462
|
return false;
|
|
21389
|
-
if (
|
|
21463
|
+
if (mergedProps.onlyShowClearWhenFocus) {
|
|
21390
21464
|
return hasFocus;
|
|
21391
21465
|
} else {
|
|
21392
21466
|
return true;
|
|
21393
21467
|
}
|
|
21394
21468
|
})();
|
|
21395
|
-
return withNativeProps(
|
|
21396
|
-
className: classNames(`${classPrefix$A}`,
|
|
21469
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
21470
|
+
className: classNames(`${classPrefix$A}`, mergedProps.disabled && `${classPrefix$A}-disabled`)
|
|
21397
21471
|
}, React__default.createElement("input", {
|
|
21398
21472
|
ref: nativeInputRef,
|
|
21399
21473
|
className: `${classPrefix$A}-element`,
|
|
@@ -21404,50 +21478,50 @@ const Input = forwardRef((p, ref) => {
|
|
|
21404
21478
|
onFocus: (e2) => {
|
|
21405
21479
|
var _a;
|
|
21406
21480
|
setHasFocus(true);
|
|
21407
|
-
(_a =
|
|
21481
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21408
21482
|
},
|
|
21409
21483
|
onBlur: (e2) => {
|
|
21410
21484
|
var _a;
|
|
21411
21485
|
setHasFocus(false);
|
|
21412
21486
|
checkValue();
|
|
21413
|
-
(_a =
|
|
21487
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21414
21488
|
},
|
|
21415
|
-
id:
|
|
21416
|
-
placeholder:
|
|
21417
|
-
disabled:
|
|
21418
|
-
readOnly:
|
|
21419
|
-
maxLength:
|
|
21420
|
-
minLength:
|
|
21421
|
-
max:
|
|
21422
|
-
min:
|
|
21423
|
-
autoComplete:
|
|
21424
|
-
enterKeyHint:
|
|
21425
|
-
autoFocus:
|
|
21426
|
-
pattern:
|
|
21427
|
-
inputMode:
|
|
21428
|
-
type:
|
|
21429
|
-
name:
|
|
21430
|
-
autoCapitalize:
|
|
21431
|
-
autoCorrect:
|
|
21489
|
+
id: mergedProps.id,
|
|
21490
|
+
placeholder: mergedProps.placeholder,
|
|
21491
|
+
disabled: mergedProps.disabled,
|
|
21492
|
+
readOnly: mergedProps.readOnly,
|
|
21493
|
+
maxLength: mergedProps.maxLength,
|
|
21494
|
+
minLength: mergedProps.minLength,
|
|
21495
|
+
max: mergedProps.max,
|
|
21496
|
+
min: mergedProps.min,
|
|
21497
|
+
autoComplete: mergedProps.autoComplete,
|
|
21498
|
+
enterKeyHint: mergedProps.enterKeyHint,
|
|
21499
|
+
autoFocus: mergedProps.autoFocus,
|
|
21500
|
+
pattern: mergedProps.pattern,
|
|
21501
|
+
inputMode: mergedProps.inputMode,
|
|
21502
|
+
type: mergedProps.type,
|
|
21503
|
+
name: mergedProps.name,
|
|
21504
|
+
autoCapitalize: mergedProps.autoCapitalize,
|
|
21505
|
+
autoCorrect: mergedProps.autoCorrect,
|
|
21432
21506
|
onKeyDown: handleKeydown,
|
|
21433
|
-
onKeyUp:
|
|
21507
|
+
onKeyUp: mergedProps.onKeyUp,
|
|
21434
21508
|
onCompositionStart: (e2) => {
|
|
21435
21509
|
var _a;
|
|
21436
21510
|
compositionStartRef.current = true;
|
|
21437
|
-
(_a =
|
|
21511
|
+
(_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21438
21512
|
},
|
|
21439
21513
|
onCompositionEnd: (e2) => {
|
|
21440
21514
|
var _a;
|
|
21441
21515
|
compositionStartRef.current = false;
|
|
21442
|
-
(_a =
|
|
21516
|
+
(_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21443
21517
|
},
|
|
21444
|
-
onClick:
|
|
21445
|
-
step:
|
|
21446
|
-
role:
|
|
21447
|
-
"aria-valuenow":
|
|
21448
|
-
"aria-valuemax":
|
|
21449
|
-
"aria-valuemin":
|
|
21450
|
-
"aria-label":
|
|
21518
|
+
onClick: mergedProps.onClick,
|
|
21519
|
+
step: mergedProps.step,
|
|
21520
|
+
role: mergedProps.role,
|
|
21521
|
+
"aria-valuenow": mergedProps["aria-valuenow"],
|
|
21522
|
+
"aria-valuemax": mergedProps["aria-valuemax"],
|
|
21523
|
+
"aria-valuemin": mergedProps["aria-valuemin"],
|
|
21524
|
+
"aria-label": mergedProps["aria-label"]
|
|
21451
21525
|
}), shouldShowClear && React__default.createElement("div", {
|
|
21452
21526
|
className: `${classPrefix$A}-clear`,
|
|
21453
21527
|
onMouseDown: (e2) => {
|
|
@@ -21456,14 +21530,14 @@ const Input = forwardRef((p, ref) => {
|
|
|
21456
21530
|
onClick: () => {
|
|
21457
21531
|
var _a, _b;
|
|
21458
21532
|
setValue2("");
|
|
21459
|
-
(_a =
|
|
21533
|
+
(_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
21460
21534
|
if (isIOS() && compositionStartRef.current) {
|
|
21461
21535
|
compositionStartRef.current = false;
|
|
21462
21536
|
(_b = nativeInputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
21463
21537
|
}
|
|
21464
21538
|
},
|
|
21465
21539
|
"aria-label": locale.Input.clear
|
|
21466
|
-
},
|
|
21540
|
+
}, mergedProps.clearIcon)));
|
|
21467
21541
|
});
|
|
21468
21542
|
const classPrefix$z = `adm-jumbo-tabs`;
|
|
21469
21543
|
const JumboTab = () => {
|
|
@@ -21724,50 +21798,60 @@ const index$7 = attachPropertiesToComponent(Modal, {
|
|
|
21724
21798
|
});
|
|
21725
21799
|
const classPrefix$y = `adm-nav-bar`;
|
|
21726
21800
|
const defaultProps$s = {
|
|
21727
|
-
|
|
21801
|
+
backIcon: true
|
|
21728
21802
|
};
|
|
21729
|
-
const NavBar = (
|
|
21730
|
-
const
|
|
21803
|
+
const NavBar = (props) => {
|
|
21804
|
+
const {
|
|
21805
|
+
navBar: componentConfig = {}
|
|
21806
|
+
} = useConfig();
|
|
21807
|
+
const mergedProps = mergeProps(defaultProps$s, componentConfig, props);
|
|
21731
21808
|
const {
|
|
21732
21809
|
back,
|
|
21810
|
+
backIcon,
|
|
21733
21811
|
backArrow
|
|
21734
|
-
} =
|
|
21735
|
-
return withNativeProps(
|
|
21812
|
+
} = mergedProps;
|
|
21813
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
21736
21814
|
className: classNames(classPrefix$y)
|
|
21737
21815
|
}, React__default.createElement("div", {
|
|
21738
21816
|
className: `${classPrefix$y}-left`,
|
|
21739
21817
|
role: "button"
|
|
21740
21818
|
}, back !== null && React__default.createElement("div", {
|
|
21741
21819
|
className: `${classPrefix$y}-back`,
|
|
21742
|
-
onClick:
|
|
21743
|
-
}, backArrow && React__default.createElement("span", {
|
|
21820
|
+
onClick: mergedProps.onBack
|
|
21821
|
+
}, (backIcon || backArrow) && React__default.createElement("span", {
|
|
21744
21822
|
className: `${classPrefix$y}-back-arrow`
|
|
21745
|
-
}, backArrow === true ? React__default.createElement(LeftOutline, null) : backArrow), React__default.createElement("span", {
|
|
21823
|
+
}, backIcon === true || backArrow === true ? componentConfig.backIcon || React__default.createElement(LeftOutline, null) : backIcon || backArrow), React__default.createElement("span", {
|
|
21746
21824
|
"aria-hidden": "true"
|
|
21747
|
-
}, back)),
|
|
21825
|
+
}, back)), mergedProps.left), React__default.createElement("div", {
|
|
21748
21826
|
className: `${classPrefix$y}-title`
|
|
21749
|
-
},
|
|
21827
|
+
}, mergedProps.children), React__default.createElement("div", {
|
|
21750
21828
|
className: `${classPrefix$y}-right`
|
|
21751
|
-
},
|
|
21829
|
+
}, mergedProps.right)));
|
|
21752
21830
|
};
|
|
21753
21831
|
const classPrefix$x = `adm-notice-bar`;
|
|
21754
21832
|
const defaultProps$r = {
|
|
21755
21833
|
color: "default",
|
|
21756
21834
|
delay: 2e3,
|
|
21757
21835
|
speed: 50,
|
|
21758
|
-
|
|
21759
|
-
|
|
21836
|
+
icon: React__default.createElement(SoundOutline, null),
|
|
21837
|
+
wrap: false
|
|
21760
21838
|
};
|
|
21761
|
-
const NoticeBar = memo((
|
|
21762
|
-
const
|
|
21839
|
+
const NoticeBar = memo((props) => {
|
|
21840
|
+
const {
|
|
21841
|
+
noticeBar: componentConfig = {}
|
|
21842
|
+
} = useConfig();
|
|
21843
|
+
const mergedProps = mergeProps(defaultProps$r, componentConfig, props);
|
|
21844
|
+
const closeIcon = mergeProp(React__default.createElement(CloseOutline, {
|
|
21845
|
+
className: `${classPrefix$x}-close-icon`
|
|
21846
|
+
}), componentConfig.closeIcon, props.closeIcon);
|
|
21763
21847
|
const containerRef = useRef(null);
|
|
21764
21848
|
const textRef = useRef(null);
|
|
21765
21849
|
const [visible, setVisible] = useState(true);
|
|
21766
|
-
const speed =
|
|
21850
|
+
const speed = mergedProps.speed;
|
|
21767
21851
|
const delayLockRef = useRef(true);
|
|
21768
21852
|
const animatingRef = useRef(false);
|
|
21769
21853
|
function start2() {
|
|
21770
|
-
if (delayLockRef.current ||
|
|
21854
|
+
if (delayLockRef.current || mergedProps.wrap)
|
|
21771
21855
|
return;
|
|
21772
21856
|
const container = containerRef.current;
|
|
21773
21857
|
const text = textRef.current;
|
|
@@ -21796,7 +21880,7 @@ const NoticeBar = memo((p) => {
|
|
|
21796
21880
|
useTimeout$1(() => {
|
|
21797
21881
|
delayLockRef.current = false;
|
|
21798
21882
|
start2();
|
|
21799
|
-
},
|
|
21883
|
+
}, mergedProps.delay);
|
|
21800
21884
|
useResizeEffect(() => {
|
|
21801
21885
|
start2();
|
|
21802
21886
|
}, containerRef);
|
|
@@ -21809,14 +21893,14 @@ const NoticeBar = memo((p) => {
|
|
|
21809
21893
|
});
|
|
21810
21894
|
if (!visible)
|
|
21811
21895
|
return null;
|
|
21812
|
-
return withNativeProps(
|
|
21813
|
-
className: classNames(classPrefix$x, `${classPrefix$x}-${
|
|
21814
|
-
[`${classPrefix$x}-wrap`]:
|
|
21896
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
21897
|
+
className: classNames(classPrefix$x, `${classPrefix$x}-${mergedProps.color}`, {
|
|
21898
|
+
[`${classPrefix$x}-wrap`]: mergedProps.wrap
|
|
21815
21899
|
}),
|
|
21816
|
-
onClick:
|
|
21817
|
-
},
|
|
21900
|
+
onClick: mergedProps.onClick
|
|
21901
|
+
}, mergedProps.icon && React__default.createElement("span", {
|
|
21818
21902
|
className: `${classPrefix$x}-left`
|
|
21819
|
-
},
|
|
21903
|
+
}, mergedProps.icon), React__default.createElement("span", {
|
|
21820
21904
|
ref: containerRef,
|
|
21821
21905
|
className: `${classPrefix$x}-content`
|
|
21822
21906
|
}, React__default.createElement("span", {
|
|
@@ -21826,18 +21910,16 @@ const NoticeBar = memo((p) => {
|
|
|
21826
21910
|
},
|
|
21827
21911
|
ref: textRef,
|
|
21828
21912
|
className: `${classPrefix$x}-content-inner`
|
|
21829
|
-
},
|
|
21913
|
+
}, mergedProps.content)), (mergedProps.closeable || mergedProps.extra) && React__default.createElement("span", {
|
|
21830
21914
|
className: `${classPrefix$x}-right`
|
|
21831
|
-
},
|
|
21915
|
+
}, mergedProps.extra, mergedProps.closeable && React__default.createElement("div", {
|
|
21832
21916
|
className: `${classPrefix$x}-close`,
|
|
21833
21917
|
onClick: () => {
|
|
21834
21918
|
var _a;
|
|
21835
21919
|
setVisible(false);
|
|
21836
|
-
(_a =
|
|
21920
|
+
(_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
21837
21921
|
}
|
|
21838
|
-
},
|
|
21839
|
-
className: `${classPrefix$x}-close-icon`
|
|
21840
|
-
})))));
|
|
21922
|
+
}, closeIcon))));
|
|
21841
21923
|
});
|
|
21842
21924
|
function shuffle(array4) {
|
|
21843
21925
|
const result = [...array4];
|
|
@@ -21896,13 +21978,13 @@ const NumberKeyboard = (p) => {
|
|
|
21896
21978
|
var _a;
|
|
21897
21979
|
(_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
21898
21980
|
});
|
|
21899
|
-
const
|
|
21981
|
+
const startContinueClear = () => {
|
|
21900
21982
|
timeoutRef.current = window.setTimeout(() => {
|
|
21901
21983
|
onDelete();
|
|
21902
21984
|
intervalRef.current = window.setInterval(onDelete, 150);
|
|
21903
21985
|
}, 700);
|
|
21904
21986
|
};
|
|
21905
|
-
const
|
|
21987
|
+
const stopContinueClear = () => {
|
|
21906
21988
|
clearTimeout(timeoutRef.current);
|
|
21907
21989
|
clearInterval(intervalRef.current);
|
|
21908
21990
|
};
|
|
@@ -21962,14 +22044,15 @@ const NumberKeyboard = (p) => {
|
|
|
21962
22044
|
key,
|
|
21963
22045
|
className,
|
|
21964
22046
|
onTouchStart: () => {
|
|
22047
|
+
stopContinueClear();
|
|
21965
22048
|
if (key === "BACKSPACE") {
|
|
21966
|
-
|
|
22049
|
+
startContinueClear();
|
|
21967
22050
|
}
|
|
21968
22051
|
},
|
|
21969
22052
|
onTouchEnd: (e2) => {
|
|
21970
22053
|
onKeyPress(e2, key);
|
|
21971
22054
|
if (key === "BACKSPACE") {
|
|
21972
|
-
|
|
22055
|
+
stopContinueClear();
|
|
21973
22056
|
}
|
|
21974
22057
|
}
|
|
21975
22058
|
}, ariaProps), key === "BACKSPACE" ? React__default.createElement(TextDeletionOutline, null) : key);
|
|
@@ -22001,11 +22084,11 @@ const NumberKeyboard = (p) => {
|
|
|
22001
22084
|
}, React__default.createElement("div", {
|
|
22002
22085
|
className: `${classPrefix$w}-key ${classPrefix$w}-key-extra ${classPrefix$w}-key-bs`,
|
|
22003
22086
|
onTouchStart: () => {
|
|
22004
|
-
|
|
22087
|
+
startContinueClear();
|
|
22005
22088
|
},
|
|
22006
22089
|
onTouchEnd: (e2) => {
|
|
22007
22090
|
onKeyPress(e2, "BACKSPACE");
|
|
22008
|
-
|
|
22091
|
+
stopContinueClear();
|
|
22009
22092
|
},
|
|
22010
22093
|
onContextMenu: (e2) => {
|
|
22011
22094
|
e2.preventDefault();
|
|
@@ -22573,14 +22656,33 @@ const Rate = (p) => {
|
|
|
22573
22656
|
className: classNames(`${classPrefix$p}-box`)
|
|
22574
22657
|
}, props.allowHalf && renderStar(i2 + 0.5, true), renderStar(i2 + 1, false)))));
|
|
22575
22658
|
};
|
|
22576
|
-
const
|
|
22577
|
-
const
|
|
22578
|
-
|
|
22579
|
-
|
|
22580
|
-
|
|
22581
|
-
|
|
22582
|
-
|
|
22659
|
+
const useResultIcon = (status) => {
|
|
22660
|
+
const {
|
|
22661
|
+
result: componentConfig = {}
|
|
22662
|
+
} = useConfig();
|
|
22663
|
+
const {
|
|
22664
|
+
successIcon = React__default.createElement(CheckCircleFill, null),
|
|
22665
|
+
errorIcon = React__default.createElement(CloseCircleFill, null),
|
|
22666
|
+
infoIcon = React__default.createElement(InformationCircleFill, null),
|
|
22667
|
+
waitingIcon = React__default.createElement(ClockCircleFill, null),
|
|
22668
|
+
warningIcon = React__default.createElement(ExclamationCircleFill, null)
|
|
22669
|
+
} = componentConfig || {};
|
|
22670
|
+
switch (status) {
|
|
22671
|
+
case "success":
|
|
22672
|
+
return successIcon;
|
|
22673
|
+
case "error":
|
|
22674
|
+
return errorIcon;
|
|
22675
|
+
case "info":
|
|
22676
|
+
return infoIcon;
|
|
22677
|
+
case "waiting":
|
|
22678
|
+
return waitingIcon;
|
|
22679
|
+
case "warning":
|
|
22680
|
+
return warningIcon;
|
|
22681
|
+
default:
|
|
22682
|
+
return null;
|
|
22683
|
+
}
|
|
22583
22684
|
};
|
|
22685
|
+
const classPrefix$o = `adm-result`;
|
|
22584
22686
|
const defaultProps$i = {
|
|
22585
22687
|
status: "info"
|
|
22586
22688
|
};
|
|
@@ -22592,27 +22694,20 @@ const Result = (p) => {
|
|
|
22592
22694
|
description,
|
|
22593
22695
|
icon
|
|
22594
22696
|
} = props;
|
|
22697
|
+
const fallbackIcon = useResultIcon(status);
|
|
22595
22698
|
if (!status)
|
|
22596
22699
|
return null;
|
|
22597
|
-
const resultIcon = icon || React__default.createElement(iconRecord$1[status]);
|
|
22598
22700
|
return withNativeProps(props, React__default.createElement("div", {
|
|
22599
22701
|
className: classNames(classPrefix$o, `${classPrefix$o}-${status}`)
|
|
22600
22702
|
}, React__default.createElement("div", {
|
|
22601
22703
|
className: `${classPrefix$o}-icon`
|
|
22602
|
-
},
|
|
22704
|
+
}, icon || fallbackIcon), React__default.createElement("div", {
|
|
22603
22705
|
className: `${classPrefix$o}-title`
|
|
22604
22706
|
}, title), !!description && React__default.createElement("div", {
|
|
22605
22707
|
className: `${classPrefix$o}-description`
|
|
22606
22708
|
}, description)));
|
|
22607
22709
|
};
|
|
22608
22710
|
const classPrefix$n = `adm-result-page`;
|
|
22609
|
-
const iconRecord = {
|
|
22610
|
-
success: CheckCircleFill,
|
|
22611
|
-
error: CloseCircleFill,
|
|
22612
|
-
info: InformationCircleFill,
|
|
22613
|
-
waiting: ClockCircleFill,
|
|
22614
|
-
warning: ExclamationCircleFill
|
|
22615
|
-
};
|
|
22616
22711
|
const defaultProps$h = {
|
|
22617
22712
|
status: "info",
|
|
22618
22713
|
details: []
|
|
@@ -22630,7 +22725,7 @@ const ResultPage = (p) => {
|
|
|
22630
22725
|
onPrimaryButtonClick,
|
|
22631
22726
|
onSecondaryButtonClick
|
|
22632
22727
|
} = props;
|
|
22633
|
-
const
|
|
22728
|
+
const fallbackIcon = useResultIcon(status);
|
|
22634
22729
|
const [collapse, setCollapse] = useState(true);
|
|
22635
22730
|
const showSecondaryButton = isNodeWithContent(secondaryButtonText);
|
|
22636
22731
|
const showPrimaryButton = isNodeWithContent(primaryButtonText);
|
|
@@ -22640,7 +22735,7 @@ const ResultPage = (p) => {
|
|
|
22640
22735
|
className: `${classPrefix$n}-header`
|
|
22641
22736
|
}, React__default.createElement("div", {
|
|
22642
22737
|
className: `${classPrefix$n}-icon`
|
|
22643
|
-
},
|
|
22738
|
+
}, icon || fallbackIcon), React__default.createElement("div", {
|
|
22644
22739
|
className: `${classPrefix$n}-title`
|
|
22645
22740
|
}, title), isNodeWithContent(description) ? React__default.createElement("div", {
|
|
22646
22741
|
className: `${classPrefix$n}-description`
|
|
@@ -22696,17 +22791,18 @@ const defaultProps$g = {
|
|
|
22696
22791
|
onlyShowClearWhenFocus: false,
|
|
22697
22792
|
showCancelButton: false,
|
|
22698
22793
|
defaultValue: "",
|
|
22699
|
-
clearOnCancel: true
|
|
22700
|
-
icon: React__default.createElement(SearchOutline, null)
|
|
22794
|
+
clearOnCancel: true
|
|
22701
22795
|
};
|
|
22702
|
-
const SearchBar = forwardRef((
|
|
22796
|
+
const SearchBar = forwardRef((props, ref) => {
|
|
22703
22797
|
const {
|
|
22704
|
-
locale
|
|
22798
|
+
locale,
|
|
22799
|
+
searchBar: componentConfig = {}
|
|
22705
22800
|
} = useConfig();
|
|
22706
|
-
const
|
|
22801
|
+
const mergedProps = mergeProps(defaultProps$g, componentConfig, {
|
|
22707
22802
|
cancelText: locale.common.cancel
|
|
22708
|
-
},
|
|
22709
|
-
const
|
|
22803
|
+
}, props);
|
|
22804
|
+
const searchIcon = mergeProp(React__default.createElement(SearchOutline, null), componentConfig.searchIcon, props.icon, props.searchIcon);
|
|
22805
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
22710
22806
|
const [hasFocus, setHasFocus] = useState(false);
|
|
22711
22807
|
const inputRef = useRef(null);
|
|
22712
22808
|
const composingRef = useRef(false);
|
|
@@ -22730,10 +22826,10 @@ const SearchBar = forwardRef((p, ref) => {
|
|
|
22730
22826
|
}));
|
|
22731
22827
|
const renderCancelButton = () => {
|
|
22732
22828
|
let isShowCancel;
|
|
22733
|
-
if (typeof
|
|
22734
|
-
isShowCancel =
|
|
22829
|
+
if (typeof mergedProps.showCancelButton === "function") {
|
|
22830
|
+
isShowCancel = mergedProps.showCancelButton(hasFocus, value);
|
|
22735
22831
|
} else {
|
|
22736
|
-
isShowCancel =
|
|
22832
|
+
isShowCancel = mergedProps.showCancelButton && hasFocus;
|
|
22737
22833
|
}
|
|
22738
22834
|
return isShowCancel && React__default.createElement("div", {
|
|
22739
22835
|
className: `${classPrefix$l}-suffix`
|
|
@@ -22742,66 +22838,66 @@ const SearchBar = forwardRef((p, ref) => {
|
|
|
22742
22838
|
className: `${classPrefix$l}-cancel-button`,
|
|
22743
22839
|
onClick: () => {
|
|
22744
22840
|
var _a, _b, _c;
|
|
22745
|
-
if (
|
|
22841
|
+
if (mergedProps.clearOnCancel) {
|
|
22746
22842
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
22747
22843
|
}
|
|
22748
22844
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
22749
|
-
(_c =
|
|
22845
|
+
(_c = mergedProps.onCancel) === null || _c === void 0 ? void 0 : _c.call(mergedProps);
|
|
22750
22846
|
},
|
|
22751
22847
|
onMouseDown: (e2) => {
|
|
22752
22848
|
e2.preventDefault();
|
|
22753
22849
|
}
|
|
22754
|
-
},
|
|
22850
|
+
}, mergedProps.cancelText));
|
|
22755
22851
|
};
|
|
22756
|
-
return withNativeProps(
|
|
22852
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
22757
22853
|
className: classNames(classPrefix$l, {
|
|
22758
22854
|
[`${classPrefix$l}-active`]: hasFocus
|
|
22759
22855
|
})
|
|
22760
22856
|
}, React__default.createElement("div", {
|
|
22761
22857
|
className: `${classPrefix$l}-input-box`
|
|
22762
|
-
},
|
|
22858
|
+
}, searchIcon && React__default.createElement("div", {
|
|
22763
22859
|
className: `${classPrefix$l}-input-box-icon`
|
|
22764
|
-
},
|
|
22860
|
+
}, searchIcon), React__default.createElement(Input, {
|
|
22765
22861
|
ref: inputRef,
|
|
22766
22862
|
className: classNames(`${classPrefix$l}-input`, {
|
|
22767
|
-
[`${classPrefix$l}-input-without-icon`]: !
|
|
22863
|
+
[`${classPrefix$l}-input-without-icon`]: !searchIcon
|
|
22768
22864
|
}),
|
|
22769
22865
|
value,
|
|
22770
22866
|
onChange: setValue2,
|
|
22771
|
-
maxLength:
|
|
22772
|
-
placeholder:
|
|
22773
|
-
clearable:
|
|
22774
|
-
onlyShowClearWhenFocus:
|
|
22867
|
+
maxLength: mergedProps.maxLength,
|
|
22868
|
+
placeholder: mergedProps.placeholder,
|
|
22869
|
+
clearable: mergedProps.clearable,
|
|
22870
|
+
onlyShowClearWhenFocus: mergedProps.onlyShowClearWhenFocus,
|
|
22775
22871
|
onFocus: (e2) => {
|
|
22776
22872
|
var _a;
|
|
22777
22873
|
setHasFocus(true);
|
|
22778
|
-
(_a =
|
|
22874
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22779
22875
|
},
|
|
22780
22876
|
onBlur: (e2) => {
|
|
22781
22877
|
var _a;
|
|
22782
22878
|
setHasFocus(false);
|
|
22783
|
-
(_a =
|
|
22879
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22784
22880
|
},
|
|
22785
|
-
onClear:
|
|
22881
|
+
onClear: mergedProps.onClear,
|
|
22786
22882
|
type: "search",
|
|
22787
22883
|
enterKeyHint: "search",
|
|
22788
22884
|
onEnterPress: () => {
|
|
22789
22885
|
var _a, _b;
|
|
22790
22886
|
if (!composingRef.current) {
|
|
22791
22887
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
22792
|
-
(_b =
|
|
22888
|
+
(_b = mergedProps.onSearch) === null || _b === void 0 ? void 0 : _b.call(mergedProps, value);
|
|
22793
22889
|
}
|
|
22794
22890
|
},
|
|
22795
22891
|
"aria-label": locale.SearchBar.name,
|
|
22796
22892
|
onCompositionStart: (e2) => {
|
|
22797
22893
|
var _a;
|
|
22798
22894
|
composingRef.current = true;
|
|
22799
|
-
(_a =
|
|
22895
|
+
(_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22800
22896
|
},
|
|
22801
22897
|
onCompositionEnd: (e2) => {
|
|
22802
22898
|
var _a;
|
|
22803
22899
|
composingRef.current = false;
|
|
22804
|
-
(_a =
|
|
22900
|
+
(_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22805
22901
|
}
|
|
22806
22902
|
})), renderCancelButton()));
|
|
22807
22903
|
});
|
|
@@ -25400,15 +25496,17 @@ const classPrefix$2 = "adm-virtual-input";
|
|
|
25400
25496
|
const defaultProps$2 = {
|
|
25401
25497
|
defaultValue: ""
|
|
25402
25498
|
};
|
|
25403
|
-
const VirtualInput = forwardRef((
|
|
25404
|
-
const
|
|
25405
|
-
|
|
25499
|
+
const VirtualInput = forwardRef((props, ref) => {
|
|
25500
|
+
const {
|
|
25501
|
+
locale,
|
|
25502
|
+
input: componentConfig = {}
|
|
25503
|
+
} = useConfig();
|
|
25504
|
+
const mergedProps = mergeProps(defaultProps$2, componentConfig, props);
|
|
25505
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
25406
25506
|
const rootRef = useRef(null);
|
|
25407
25507
|
const contentRef = useRef(null);
|
|
25408
25508
|
const [hasFocus, setHasFocus] = useState(false);
|
|
25409
|
-
const
|
|
25410
|
-
locale
|
|
25411
|
-
} = useConfig();
|
|
25509
|
+
const clearIcon = mergeProp(React__default.createElement(CloseCircleFill, null), componentConfig.clearIcon, props.clearIcon);
|
|
25412
25510
|
function scrollToEnd() {
|
|
25413
25511
|
const root2 = rootRef.current;
|
|
25414
25512
|
if (!root2)
|
|
@@ -25442,14 +25540,14 @@ const VirtualInput = forwardRef((p, ref) => {
|
|
|
25442
25540
|
function onFocus() {
|
|
25443
25541
|
var _a;
|
|
25444
25542
|
setHasFocus(true);
|
|
25445
|
-
(_a =
|
|
25543
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25446
25544
|
}
|
|
25447
25545
|
function onBlur() {
|
|
25448
25546
|
var _a;
|
|
25449
25547
|
setHasFocus(false);
|
|
25450
|
-
(_a =
|
|
25548
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25451
25549
|
}
|
|
25452
|
-
const keyboard =
|
|
25550
|
+
const keyboard = mergedProps.keyboard;
|
|
25453
25551
|
const keyboardElement = keyboard && React__default.cloneElement(keyboard, {
|
|
25454
25552
|
onInput: (v) => {
|
|
25455
25553
|
var _a, _b;
|
|
@@ -25474,38 +25572,38 @@ const VirtualInput = forwardRef((p, ref) => {
|
|
|
25474
25572
|
},
|
|
25475
25573
|
getContainer: null
|
|
25476
25574
|
});
|
|
25477
|
-
return withNativeProps(
|
|
25575
|
+
return withNativeProps(mergedProps, React__default.createElement("div", {
|
|
25478
25576
|
ref: rootRef,
|
|
25479
25577
|
className: classNames(classPrefix$2, {
|
|
25480
|
-
[`${classPrefix$2}-disabled`]:
|
|
25578
|
+
[`${classPrefix$2}-disabled`]: mergedProps.disabled
|
|
25481
25579
|
}),
|
|
25482
|
-
tabIndex:
|
|
25580
|
+
tabIndex: mergedProps.disabled ? void 0 : 0,
|
|
25483
25581
|
role: "textbox",
|
|
25484
25582
|
onFocus,
|
|
25485
25583
|
onBlur,
|
|
25486
|
-
onClick:
|
|
25584
|
+
onClick: mergedProps.onClick
|
|
25487
25585
|
}, React__default.createElement("div", {
|
|
25488
25586
|
className: `${classPrefix$2}-content`,
|
|
25489
25587
|
ref: contentRef,
|
|
25490
|
-
"aria-disabled":
|
|
25491
|
-
"aria-label":
|
|
25588
|
+
"aria-disabled": mergedProps.disabled,
|
|
25589
|
+
"aria-label": mergedProps.placeholder
|
|
25492
25590
|
}, value, React__default.createElement("div", {
|
|
25493
25591
|
className: `${classPrefix$2}-caret-container`
|
|
25494
25592
|
}, hasFocus && React__default.createElement("div", {
|
|
25495
25593
|
className: `${classPrefix$2}-caret`
|
|
25496
|
-
}))),
|
|
25594
|
+
}))), mergedProps.clearable && !!value && hasFocus && React__default.createElement("div", {
|
|
25497
25595
|
className: `${classPrefix$2}-clear`,
|
|
25498
25596
|
onClick: (e2) => {
|
|
25499
25597
|
var _a;
|
|
25500
25598
|
e2.stopPropagation();
|
|
25501
25599
|
setValue2("");
|
|
25502
|
-
(_a =
|
|
25600
|
+
(_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25503
25601
|
},
|
|
25504
25602
|
role: "button",
|
|
25505
25603
|
"aria-label": locale.Input.clear
|
|
25506
|
-
},
|
|
25604
|
+
}, clearIcon), [void 0, null, ""].includes(value) && React__default.createElement("div", {
|
|
25507
25605
|
className: `${classPrefix$2}-placeholder`
|
|
25508
|
-
},
|
|
25606
|
+
}, mergedProps.placeholder), keyboardElement));
|
|
25509
25607
|
});
|
|
25510
25608
|
const classPrefix$1 = `adm-water-mark`;
|
|
25511
25609
|
const defaultProps$1 = {
|