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
|
@@ -452,14 +452,24 @@ function withNativeProps(props, element) {
|
|
|
452
452
|
function mergeProps(...items) {
|
|
453
453
|
const ret = {};
|
|
454
454
|
items.forEach((item) => {
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
455
|
+
if (item) {
|
|
456
|
+
Object.keys(item).forEach((key) => {
|
|
457
|
+
if (item[key] !== void 0) {
|
|
458
|
+
ret[key] = item[key];
|
|
459
|
+
}
|
|
460
|
+
});
|
|
461
|
+
}
|
|
460
462
|
});
|
|
461
463
|
return ret;
|
|
462
464
|
}
|
|
465
|
+
function mergeProp(defaultProp, ...propList) {
|
|
466
|
+
for (let i2 = propList.length - 1; i2 >= 0; i2 -= 1) {
|
|
467
|
+
if (propList[i2] !== void 0) {
|
|
468
|
+
return propList[i2];
|
|
469
|
+
}
|
|
470
|
+
}
|
|
471
|
+
return defaultProp;
|
|
472
|
+
}
|
|
463
473
|
var createUpdateEffect = function(hook) {
|
|
464
474
|
return function(effect, deps) {
|
|
465
475
|
var isMounted = React$1.useRef(false);
|
|
@@ -6511,6 +6521,7 @@ function TextDeletionOutline(props) {
|
|
|
6511
6521
|
}
|
|
6512
6522
|
const defaultPopupBaseProps = {
|
|
6513
6523
|
closeOnMaskClick: false,
|
|
6524
|
+
closeIcon: React$1.createElement(CloseOutline, null),
|
|
6514
6525
|
destroyOnClose: false,
|
|
6515
6526
|
disableBodyScroll: true,
|
|
6516
6527
|
forceRender: false,
|
|
@@ -8368,11 +8379,12 @@ const defaultProps$14 = Object.assign(Object.assign({}, defaultPopupBaseProps),
|
|
|
8368
8379
|
position: "bottom"
|
|
8369
8380
|
});
|
|
8370
8381
|
const Popup = (p) => {
|
|
8371
|
-
const props = mergeProps(defaultProps$14, p);
|
|
8372
|
-
const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
|
|
8373
8382
|
const {
|
|
8374
|
-
locale
|
|
8383
|
+
locale,
|
|
8384
|
+
popup: componentConfig = {}
|
|
8375
8385
|
} = useConfig();
|
|
8386
|
+
const props = mergeProps(defaultProps$14, componentConfig, p);
|
|
8387
|
+
const bodyCls = classNames(`${classPrefix$1o}-body`, props.bodyClassName, `${classPrefix$1o}-body-position-${props.position}`);
|
|
8376
8388
|
const [active, setActive] = React$1.useState(props.visible);
|
|
8377
8389
|
const ref = React$1.useRef(null);
|
|
8378
8390
|
useLockScroll(ref, props.disableBodyScroll && active ? "strict" : false);
|
|
@@ -8469,7 +8481,7 @@ const Popup = (p) => {
|
|
|
8469
8481
|
},
|
|
8470
8482
|
role: "button",
|
|
8471
8483
|
"aria-label": locale.common.close
|
|
8472
|
-
},
|
|
8484
|
+
}, props.closeIcon), props.children))));
|
|
8473
8485
|
return React$1.createElement(ShouldRender, {
|
|
8474
8486
|
active,
|
|
8475
8487
|
forceRender: props.forceRender,
|
|
@@ -9727,18 +9739,27 @@ function useResizeEffect(effect, targetRef) {
|
|
|
9727
9739
|
}
|
|
9728
9740
|
}, [targetRef]);
|
|
9729
9741
|
}
|
|
9730
|
-
function
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
fn();
|
|
9742
|
+
function observe(element, options, callback) {
|
|
9743
|
+
if (element && typeof MutationObserver !== "undefined") {
|
|
9744
|
+
let observer = new MutationObserver(() => {
|
|
9745
|
+
callback();
|
|
9735
9746
|
});
|
|
9736
|
-
|
|
9737
|
-
return;
|
|
9738
|
-
observer.observe(targetRef.current, options);
|
|
9747
|
+
observer.observe(element, options);
|
|
9739
9748
|
return () => {
|
|
9740
|
-
observer
|
|
9749
|
+
if (observer) {
|
|
9750
|
+
observer.disconnect();
|
|
9751
|
+
observer = null;
|
|
9752
|
+
}
|
|
9741
9753
|
};
|
|
9754
|
+
}
|
|
9755
|
+
return () => {
|
|
9756
|
+
};
|
|
9757
|
+
}
|
|
9758
|
+
function useMutationEffect(effect, targetRef, options) {
|
|
9759
|
+
const fn = useMemoizedFn(effect);
|
|
9760
|
+
React$1.useEffect(() => {
|
|
9761
|
+
const cleanup = observe(targetRef.current, options, fn);
|
|
9762
|
+
return cleanup;
|
|
9742
9763
|
}, [targetRef]);
|
|
9743
9764
|
}
|
|
9744
9765
|
function bound(position, min2, max2) {
|
|
@@ -11404,9 +11425,17 @@ function isNodeWithContent(node) {
|
|
|
11404
11425
|
}
|
|
11405
11426
|
const classPrefix$12 = `adm-list-item`;
|
|
11406
11427
|
const ListItem = (props) => {
|
|
11407
|
-
var _a;
|
|
11428
|
+
var _a, _b;
|
|
11429
|
+
const {
|
|
11430
|
+
arrow: arrow2,
|
|
11431
|
+
arrowIcon
|
|
11432
|
+
} = props;
|
|
11433
|
+
const {
|
|
11434
|
+
list: componentConfig = {}
|
|
11435
|
+
} = useConfig();
|
|
11408
11436
|
const clickable = (_a = props.clickable) !== null && _a !== void 0 ? _a : !!props.onClick;
|
|
11409
|
-
const
|
|
11437
|
+
const showArrow = (_b = arrow2 !== null && arrow2 !== void 0 ? arrow2 : arrowIcon) !== null && _b !== void 0 ? _b : clickable;
|
|
11438
|
+
const mergedArrowIcon = mergeProp(componentConfig.arrowIcon, arrow2 !== true ? arrow2 : null, arrowIcon !== true ? arrowIcon : null);
|
|
11410
11439
|
const content = React$1.createElement("div", {
|
|
11411
11440
|
className: `${classPrefix$12}-content`
|
|
11412
11441
|
}, isNodeWithContent(props.prefix) && React$1.createElement("div", {
|
|
@@ -11419,9 +11448,9 @@ const ListItem = (props) => {
|
|
|
11419
11448
|
className: `${classPrefix$12}-description`
|
|
11420
11449
|
}, props.description)), isNodeWithContent(props.extra) && React$1.createElement("div", {
|
|
11421
11450
|
className: `${classPrefix$12}-content-extra`
|
|
11422
|
-
}, props.extra),
|
|
11451
|
+
}, props.extra), showArrow && React$1.createElement("div", {
|
|
11423
11452
|
className: `${classPrefix$12}-content-arrow`
|
|
11424
|
-
},
|
|
11453
|
+
}, mergedArrowIcon || React$1.createElement(RightOutline, null)));
|
|
11425
11454
|
return withNativeProps(props, React$1.createElement(clickable ? "a" : "div", {
|
|
11426
11455
|
className: classNames(`${classPrefix$12}`, clickable ? ["adm-plain-anchor"] : [], props.disabled && `${classPrefix$12}-disabled`),
|
|
11427
11456
|
onClick: props.disabled ? void 0 : props.onClick
|
|
@@ -11437,11 +11466,14 @@ const defaultProps$R = {
|
|
|
11437
11466
|
defaultValue: [],
|
|
11438
11467
|
activeIcon: React$1.createElement(CheckOutline, null)
|
|
11439
11468
|
};
|
|
11440
|
-
const CheckList$1 = (
|
|
11441
|
-
const
|
|
11442
|
-
|
|
11469
|
+
const CheckList$1 = (props) => {
|
|
11470
|
+
const {
|
|
11471
|
+
checkList: componentConfig = {}
|
|
11472
|
+
} = useConfig();
|
|
11473
|
+
const mergedProps = mergeProps(defaultProps$R, componentConfig, props);
|
|
11474
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
11443
11475
|
function check(val) {
|
|
11444
|
-
if (
|
|
11476
|
+
if (mergedProps.multiple) {
|
|
11445
11477
|
setValue2([...value, val]);
|
|
11446
11478
|
} else {
|
|
11447
11479
|
setValue2([val]);
|
|
@@ -11455,7 +11487,7 @@ const CheckList$1 = (p) => {
|
|
|
11455
11487
|
extra,
|
|
11456
11488
|
disabled,
|
|
11457
11489
|
readOnly
|
|
11458
|
-
} =
|
|
11490
|
+
} = mergedProps;
|
|
11459
11491
|
return React$1.createElement(CheckListContext.Provider, {
|
|
11460
11492
|
value: {
|
|
11461
11493
|
value,
|
|
@@ -11466,10 +11498,10 @@ const CheckList$1 = (p) => {
|
|
|
11466
11498
|
disabled,
|
|
11467
11499
|
readOnly
|
|
11468
11500
|
}
|
|
11469
|
-
}, withNativeProps(
|
|
11470
|
-
mode:
|
|
11501
|
+
}, withNativeProps(mergedProps, React$1.createElement(List$1, {
|
|
11502
|
+
mode: mergedProps.mode,
|
|
11471
11503
|
className: classPrefix$11
|
|
11472
|
-
},
|
|
11504
|
+
}, mergedProps.children)));
|
|
11473
11505
|
};
|
|
11474
11506
|
const classPrefix$10 = `adm-check-list-item`;
|
|
11475
11507
|
const CheckListItem = (props) => {
|
|
@@ -11942,12 +11974,15 @@ const classPrefix$Y = "adm-center-popup";
|
|
|
11942
11974
|
const defaultProps$O = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
11943
11975
|
getContainer: null
|
|
11944
11976
|
});
|
|
11945
|
-
const CenterPopup = (
|
|
11946
|
-
const
|
|
11977
|
+
const CenterPopup = (props) => {
|
|
11978
|
+
const {
|
|
11979
|
+
popup: componentConfig = {}
|
|
11980
|
+
} = useConfig();
|
|
11981
|
+
const mergedProps = mergeProps(defaultProps$O, componentConfig, props);
|
|
11947
11982
|
const unmountedRef = useUnmountedRef$1();
|
|
11948
11983
|
const style = useSpring({
|
|
11949
|
-
scale:
|
|
11950
|
-
opacity:
|
|
11984
|
+
scale: mergedProps.visible ? 1 : 0.8,
|
|
11985
|
+
opacity: mergedProps.visible ? 1 : 0,
|
|
11951
11986
|
config: {
|
|
11952
11987
|
mass: 1.2,
|
|
11953
11988
|
tension: 200,
|
|
@@ -11958,69 +11993,69 @@ const CenterPopup = (p) => {
|
|
|
11958
11993
|
var _a, _b;
|
|
11959
11994
|
if (unmountedRef.current)
|
|
11960
11995
|
return;
|
|
11961
|
-
setActive(
|
|
11962
|
-
if (
|
|
11963
|
-
(_a =
|
|
11996
|
+
setActive(mergedProps.visible);
|
|
11997
|
+
if (mergedProps.visible) {
|
|
11998
|
+
(_a = mergedProps.afterShow) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
11964
11999
|
} else {
|
|
11965
|
-
(_b =
|
|
12000
|
+
(_b = mergedProps.afterClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
|
|
11966
12001
|
}
|
|
11967
12002
|
}
|
|
11968
12003
|
});
|
|
11969
|
-
const [active, setActive] = React$1.useState(
|
|
12004
|
+
const [active, setActive] = React$1.useState(mergedProps.visible);
|
|
11970
12005
|
useIsomorphicLayoutEffect$2(() => {
|
|
11971
|
-
if (
|
|
12006
|
+
if (mergedProps.visible) {
|
|
11972
12007
|
setActive(true);
|
|
11973
12008
|
}
|
|
11974
|
-
}, [
|
|
12009
|
+
}, [mergedProps.visible]);
|
|
11975
12010
|
const ref = React$1.useRef(null);
|
|
11976
|
-
useLockScroll(ref,
|
|
11977
|
-
const maskVisible = useInnerVisible(active &&
|
|
12011
|
+
useLockScroll(ref, mergedProps.disableBodyScroll && active);
|
|
12012
|
+
const maskVisible = useInnerVisible(active && mergedProps.visible);
|
|
11978
12013
|
const body = React$1.createElement("div", {
|
|
11979
|
-
className: classNames(`${classPrefix$Y}-body`,
|
|
11980
|
-
style:
|
|
11981
|
-
},
|
|
11982
|
-
const node = withStopPropagation(
|
|
12014
|
+
className: classNames(`${classPrefix$Y}-body`, mergedProps.bodyClassName),
|
|
12015
|
+
style: mergedProps.bodyStyle
|
|
12016
|
+
}, mergedProps.children);
|
|
12017
|
+
const node = withStopPropagation(mergedProps.stopPropagation, withNativeProps(mergedProps, React$1.createElement("div", {
|
|
11983
12018
|
className: classPrefix$Y,
|
|
11984
12019
|
style: {
|
|
11985
12020
|
display: active ? void 0 : "none",
|
|
11986
12021
|
pointerEvents: active ? void 0 : "none"
|
|
11987
12022
|
}
|
|
11988
|
-
},
|
|
12023
|
+
}, mergedProps.mask && React$1.createElement(Mask, {
|
|
11989
12024
|
visible: maskVisible,
|
|
11990
|
-
forceRender:
|
|
11991
|
-
destroyOnClose:
|
|
12025
|
+
forceRender: mergedProps.forceRender,
|
|
12026
|
+
destroyOnClose: mergedProps.destroyOnClose,
|
|
11992
12027
|
onMaskClick: (e2) => {
|
|
11993
12028
|
var _a, _b;
|
|
11994
|
-
(_a =
|
|
11995
|
-
if (
|
|
11996
|
-
(_b =
|
|
12029
|
+
(_a = mergedProps.onMaskClick) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
12030
|
+
if (mergedProps.closeOnMaskClick) {
|
|
12031
|
+
(_b = mergedProps.onClose) === null || _b === void 0 ? void 0 : _b.call(mergedProps);
|
|
11997
12032
|
}
|
|
11998
12033
|
},
|
|
11999
|
-
style:
|
|
12000
|
-
className: classNames(`${classPrefix$Y}-mask`,
|
|
12034
|
+
style: mergedProps.maskStyle,
|
|
12035
|
+
className: classNames(`${classPrefix$Y}-mask`, mergedProps.maskClassName),
|
|
12001
12036
|
disableBodyScroll: false,
|
|
12002
|
-
stopPropagation:
|
|
12037
|
+
stopPropagation: mergedProps.stopPropagation
|
|
12003
12038
|
}), React$1.createElement("div", {
|
|
12004
12039
|
className: `${classPrefix$Y}-wrap`,
|
|
12005
|
-
role:
|
|
12006
|
-
"aria-label":
|
|
12040
|
+
role: mergedProps.role,
|
|
12041
|
+
"aria-label": mergedProps["aria-label"]
|
|
12007
12042
|
}, React$1.createElement(animated.div, {
|
|
12008
12043
|
style: Object.assign(Object.assign({}, style), {
|
|
12009
12044
|
pointerEvents: style.opacity.to((v) => v === 1 ? "unset" : "none")
|
|
12010
12045
|
}),
|
|
12011
12046
|
ref
|
|
12012
|
-
},
|
|
12047
|
+
}, mergedProps.showCloseButton && React$1.createElement("a", {
|
|
12013
12048
|
className: classNames(`${classPrefix$Y}-close`, "adm-plain-anchor"),
|
|
12014
12049
|
onClick: () => {
|
|
12015
12050
|
var _a;
|
|
12016
|
-
(_a =
|
|
12051
|
+
(_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
12017
12052
|
}
|
|
12018
|
-
},
|
|
12053
|
+
}, mergedProps.closeIcon), body)))));
|
|
12019
12054
|
return React$1.createElement(ShouldRender, {
|
|
12020
12055
|
active,
|
|
12021
|
-
forceRender:
|
|
12022
|
-
destroyOnClose:
|
|
12023
|
-
}, renderToContainer(
|
|
12056
|
+
forceRender: mergedProps.forceRender,
|
|
12057
|
+
destroyOnClose: mergedProps.destroyOnClose
|
|
12058
|
+
}, renderToContainer(mergedProps.getContainer, node));
|
|
12024
12059
|
};
|
|
12025
12060
|
const CheckboxGroupContext = React$1.createContext(null);
|
|
12026
12061
|
const defaultProps$N = {
|
|
@@ -12215,9 +12250,26 @@ const CollapsePanelContent = (props) => {
|
|
|
12215
12250
|
if (!inner)
|
|
12216
12251
|
return;
|
|
12217
12252
|
if (visible) {
|
|
12218
|
-
|
|
12219
|
-
|
|
12220
|
-
}
|
|
12253
|
+
let lastMotionId = 0;
|
|
12254
|
+
let cancelObserve = () => {
|
|
12255
|
+
};
|
|
12256
|
+
const handleMotion = () => {
|
|
12257
|
+
lastMotionId += 1;
|
|
12258
|
+
const motionId = lastMotionId;
|
|
12259
|
+
api.start({
|
|
12260
|
+
height: inner.offsetHeight
|
|
12261
|
+
})[0].then(() => {
|
|
12262
|
+
if (motionId === lastMotionId) {
|
|
12263
|
+
cancelObserve();
|
|
12264
|
+
}
|
|
12265
|
+
});
|
|
12266
|
+
};
|
|
12267
|
+
cancelObserve = observe(inner, {
|
|
12268
|
+
childList: true,
|
|
12269
|
+
subtree: true
|
|
12270
|
+
}, handleMotion);
|
|
12271
|
+
handleMotion();
|
|
12272
|
+
return cancelObserve;
|
|
12221
12273
|
} else {
|
|
12222
12274
|
api.start({
|
|
12223
12275
|
height: inner.offsetHeight,
|
|
@@ -12247,8 +12299,12 @@ const CollapsePanelContent = (props) => {
|
|
|
12247
12299
|
}, React$1.createElement(List$1.Item, null, shouldRender && props.children)));
|
|
12248
12300
|
};
|
|
12249
12301
|
const Collapse = (props) => {
|
|
12302
|
+
const {
|
|
12303
|
+
collapse: componentConfig = {}
|
|
12304
|
+
} = useConfig();
|
|
12305
|
+
const mergedProps = mergeProps(componentConfig, props);
|
|
12250
12306
|
const panels = [];
|
|
12251
|
-
traverseReactNode(
|
|
12307
|
+
traverseReactNode(mergedProps.children, (child) => {
|
|
12252
12308
|
if (!React$1.isValidElement(child))
|
|
12253
12309
|
return;
|
|
12254
12310
|
const key = child.key;
|
|
@@ -12258,11 +12314,11 @@ const Collapse = (props) => {
|
|
|
12258
12314
|
});
|
|
12259
12315
|
const handlePropsValue = () => {
|
|
12260
12316
|
var _a;
|
|
12261
|
-
if (!
|
|
12317
|
+
if (!mergedProps.accordion) {
|
|
12262
12318
|
return {
|
|
12263
|
-
value:
|
|
12264
|
-
defaultValue: (_a =
|
|
12265
|
-
onChange:
|
|
12319
|
+
value: mergedProps.activeKey,
|
|
12320
|
+
defaultValue: (_a = mergedProps.defaultActiveKey) !== null && _a !== void 0 ? _a : [],
|
|
12321
|
+
onChange: mergedProps.onChange
|
|
12266
12322
|
};
|
|
12267
12323
|
}
|
|
12268
12324
|
const initValue = {
|
|
@@ -12270,29 +12326,29 @@ const Collapse = (props) => {
|
|
|
12270
12326
|
defaultValue: [],
|
|
12271
12327
|
onChange: (v) => {
|
|
12272
12328
|
var _a2, _b;
|
|
12273
|
-
(_a2 =
|
|
12329
|
+
(_a2 = mergedProps.onChange) === null || _a2 === void 0 ? void 0 : _a2.call(mergedProps, (_b = v[0]) !== null && _b !== void 0 ? _b : null);
|
|
12274
12330
|
}
|
|
12275
12331
|
};
|
|
12276
|
-
if (
|
|
12332
|
+
if (mergedProps.activeKey === void 0) {
|
|
12277
12333
|
initValue.value = void 0;
|
|
12278
|
-
} else if (
|
|
12279
|
-
initValue.value = [
|
|
12334
|
+
} else if (mergedProps.activeKey !== null) {
|
|
12335
|
+
initValue.value = [mergedProps.activeKey];
|
|
12280
12336
|
}
|
|
12281
|
-
if (![null, void 0].includes(
|
|
12282
|
-
initValue.defaultValue = [
|
|
12337
|
+
if (![null, void 0].includes(mergedProps.defaultActiveKey)) {
|
|
12338
|
+
initValue.defaultValue = [mergedProps.defaultActiveKey];
|
|
12283
12339
|
}
|
|
12284
12340
|
return initValue;
|
|
12285
12341
|
};
|
|
12286
12342
|
const [activeKey, setActiveKey] = usePropsValue(handlePropsValue());
|
|
12287
12343
|
const activeKeyList = activeKey === null ? [] : Array.isArray(activeKey) ? activeKey : [activeKey];
|
|
12288
|
-
return withNativeProps(
|
|
12344
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
12289
12345
|
className: classPrefix$W
|
|
12290
12346
|
}, React$1.createElement(List$1, null, panels.map((panel) => {
|
|
12291
12347
|
const key = panel.key;
|
|
12292
12348
|
const active = activeKeyList.includes(key);
|
|
12293
12349
|
function handleClick(event) {
|
|
12294
12350
|
var _a, _b;
|
|
12295
|
-
if (
|
|
12351
|
+
if (mergedProps.accordion) {
|
|
12296
12352
|
if (active) {
|
|
12297
12353
|
setActiveKey([]);
|
|
12298
12354
|
} else {
|
|
@@ -12307,27 +12363,19 @@ const Collapse = (props) => {
|
|
|
12307
12363
|
}
|
|
12308
12364
|
(_b = (_a = panel.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
12309
12365
|
}
|
|
12310
|
-
const
|
|
12311
|
-
|
|
12312
|
-
|
|
12313
|
-
|
|
12314
|
-
}
|
|
12315
|
-
|
|
12316
|
-
arrow2 = panel.props.arrow;
|
|
12317
|
-
}
|
|
12318
|
-
return typeof arrow2 === "function" ? arrow2(active) : React$1.createElement("div", {
|
|
12319
|
-
className: classNames(`${classPrefix$W}-arrow`, {
|
|
12320
|
-
[`${classPrefix$W}-arrow-active`]: active
|
|
12321
|
-
})
|
|
12322
|
-
}, arrow2);
|
|
12323
|
-
};
|
|
12366
|
+
const arrow2 = mergeProp(React$1.createElement(DownOutline, null), mergedProps.arrow, mergedProps.arrowIcon, panel.props.arrow, panel.props.arrowIcon);
|
|
12367
|
+
const arrowIcon = typeof arrow2 === "function" ? arrow2(active) : React$1.createElement("div", {
|
|
12368
|
+
className: classNames(`${classPrefix$W}-arrow`, {
|
|
12369
|
+
[`${classPrefix$W}-arrow-active`]: active
|
|
12370
|
+
})
|
|
12371
|
+
}, arrow2);
|
|
12324
12372
|
return React$1.createElement(React$1.Fragment, {
|
|
12325
12373
|
key
|
|
12326
12374
|
}, withNativeProps(panel.props, React$1.createElement(List$1.Item, {
|
|
12327
12375
|
className: `${classPrefix$W}-panel-header`,
|
|
12328
12376
|
onClick: handleClick,
|
|
12329
12377
|
disabled: panel.props.disabled,
|
|
12330
|
-
|
|
12378
|
+
arrowIcon
|
|
12331
12379
|
}, panel.props.title)), React$1.createElement(CollapsePanelContent, {
|
|
12332
12380
|
visible: active,
|
|
12333
12381
|
forceRender: !!panel.props.forceRender,
|
|
@@ -12963,25 +13011,37 @@ const index$c = attachPropertiesToComponent(Dialog, {
|
|
|
12963
13011
|
confirm: confirm$1,
|
|
12964
13012
|
clear: clear$2
|
|
12965
13013
|
});
|
|
13014
|
+
const IconContext = React$1.createContext(null);
|
|
12966
13015
|
const classPrefix$V = `adm-dropdown-item`;
|
|
12967
13016
|
const Item = (props) => {
|
|
12968
|
-
|
|
13017
|
+
const {
|
|
13018
|
+
dropdown: componentConfig = {}
|
|
13019
|
+
} = useConfig();
|
|
13020
|
+
const mergedProps = mergeProps(componentConfig, props);
|
|
13021
|
+
const {
|
|
13022
|
+
active,
|
|
13023
|
+
highlight,
|
|
13024
|
+
onClick,
|
|
13025
|
+
title
|
|
13026
|
+
} = mergedProps;
|
|
12969
13027
|
const cls2 = classNames(classPrefix$V, {
|
|
12970
|
-
[`${classPrefix$V}-active`]:
|
|
12971
|
-
[`${classPrefix$V}-highlight`]:
|
|
13028
|
+
[`${classPrefix$V}-active`]: active,
|
|
13029
|
+
[`${classPrefix$V}-highlight`]: highlight !== null && highlight !== void 0 ? highlight : active
|
|
12972
13030
|
});
|
|
13031
|
+
const contextArrowIcon = React$1.useContext(IconContext);
|
|
13032
|
+
const mergedArrowIcon = mergeProp(React$1.createElement(DownFill, null), contextArrowIcon, mergedProps.arrow, mergedProps.arrowIcon);
|
|
12973
13033
|
return withNativeProps(props, React$1.createElement("div", {
|
|
12974
13034
|
className: cls2,
|
|
12975
|
-
onClick
|
|
13035
|
+
onClick
|
|
12976
13036
|
}, React$1.createElement("div", {
|
|
12977
13037
|
className: `${classPrefix$V}-title`
|
|
12978
13038
|
}, React$1.createElement("span", {
|
|
12979
13039
|
className: `${classPrefix$V}-title-text`
|
|
12980
|
-
},
|
|
13040
|
+
}, title), React$1.createElement("span", {
|
|
12981
13041
|
className: classNames(`${classPrefix$V}-title-arrow`, {
|
|
12982
|
-
[`${classPrefix$V}-title-arrow-active`]:
|
|
13042
|
+
[`${classPrefix$V}-title-arrow-active`]: active
|
|
12983
13043
|
})
|
|
12984
|
-
},
|
|
13044
|
+
}, mergedArrowIcon))));
|
|
12985
13045
|
};
|
|
12986
13046
|
const Item$1 = Item;
|
|
12987
13047
|
const ItemChildrenWrap = (props) => {
|
|
@@ -13004,17 +13064,21 @@ const defaultProps$H = {
|
|
|
13004
13064
|
closeOnClickAway: false,
|
|
13005
13065
|
getContainer: defaultPopupBaseProps["getContainer"]
|
|
13006
13066
|
};
|
|
13007
|
-
const Dropdown = React$1.forwardRef((
|
|
13008
|
-
const
|
|
13067
|
+
const Dropdown = React$1.forwardRef((props, ref) => {
|
|
13068
|
+
const {
|
|
13069
|
+
dropdown: componentConfig = {}
|
|
13070
|
+
} = useConfig();
|
|
13071
|
+
const mergedProps = mergeProps(defaultProps$H, componentConfig, props);
|
|
13072
|
+
const arrowIcon = mergeProp(componentConfig.arrowIcon, props.arrow, props.arrowIcon);
|
|
13009
13073
|
const [value, setValue2] = usePropsValue({
|
|
13010
|
-
value:
|
|
13011
|
-
defaultValue:
|
|
13012
|
-
onChange:
|
|
13074
|
+
value: mergedProps.activeKey,
|
|
13075
|
+
defaultValue: mergedProps.defaultActiveKey,
|
|
13076
|
+
onChange: mergedProps.onChange
|
|
13013
13077
|
});
|
|
13014
13078
|
const navRef = React$1.useRef(null);
|
|
13015
13079
|
const contentRef = React$1.useRef(null);
|
|
13016
13080
|
useClickAway(() => {
|
|
13017
|
-
if (!
|
|
13081
|
+
if (!mergedProps.closeOnClickAway)
|
|
13018
13082
|
return;
|
|
13019
13083
|
setValue2(null);
|
|
13020
13084
|
}, [navRef, contentRef]);
|
|
@@ -13038,7 +13102,7 @@ const Dropdown = React$1.forwardRef((p, ref) => {
|
|
|
13038
13102
|
};
|
|
13039
13103
|
let popupForceRender = false;
|
|
13040
13104
|
const items = [];
|
|
13041
|
-
const navs = React$1.Children.map(
|
|
13105
|
+
const navs = React$1.Children.map(mergedProps.children, (child) => {
|
|
13042
13106
|
if (React$1.isValidElement(child)) {
|
|
13043
13107
|
const childProps = Object.assign(Object.assign({}, child.props), {
|
|
13044
13108
|
onClick: (event) => {
|
|
@@ -13046,8 +13110,7 @@ const Dropdown = React$1.forwardRef((p, ref) => {
|
|
|
13046
13110
|
changeActive(child.key);
|
|
13047
13111
|
(_b = (_a = child.props).onClick) === null || _b === void 0 ? void 0 : _b.call(_a, event);
|
|
13048
13112
|
},
|
|
13049
|
-
active: child.key === value
|
|
13050
|
-
arrow: child.props.arrow === void 0 ? props.arrow : child.props.arrow
|
|
13113
|
+
active: child.key === value
|
|
13051
13114
|
});
|
|
13052
13115
|
items.push(child);
|
|
13053
13116
|
if (child.props.forceRender)
|
|
@@ -13062,18 +13125,20 @@ const Dropdown = React$1.forwardRef((p, ref) => {
|
|
|
13062
13125
|
setValue2(null);
|
|
13063
13126
|
}
|
|
13064
13127
|
}), [setValue2]);
|
|
13065
|
-
return withNativeProps(
|
|
13128
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
13066
13129
|
className: classNames(classPrefix$U, {
|
|
13067
13130
|
[`${classPrefix$U}-open`]: !!value
|
|
13068
13131
|
}),
|
|
13069
13132
|
ref: containerRef
|
|
13133
|
+
}, React$1.createElement(IconContext.Provider, {
|
|
13134
|
+
value: arrowIcon
|
|
13070
13135
|
}, React$1.createElement("div", {
|
|
13071
13136
|
className: `${classPrefix$U}-nav`,
|
|
13072
13137
|
ref: navRef
|
|
13073
|
-
}, navs), React$1.createElement(Popup, {
|
|
13138
|
+
}, navs)), React$1.createElement(Popup, {
|
|
13074
13139
|
visible: !!value,
|
|
13075
13140
|
position: "top",
|
|
13076
|
-
getContainer:
|
|
13141
|
+
getContainer: mergedProps.getContainer,
|
|
13077
13142
|
className: `${classPrefix$U}-popup`,
|
|
13078
13143
|
maskClassName: `${classPrefix$U}-popup-mask`,
|
|
13079
13144
|
bodyClassName: `${classPrefix$U}-popup-body`,
|
|
@@ -13081,7 +13146,7 @@ const Dropdown = React$1.forwardRef((p, ref) => {
|
|
|
13081
13146
|
top
|
|
13082
13147
|
},
|
|
13083
13148
|
forceRender: popupForceRender,
|
|
13084
|
-
onMaskClick:
|
|
13149
|
+
onMaskClick: mergedProps.closeOnMaskClick ? () => {
|
|
13085
13150
|
changeActive(null);
|
|
13086
13151
|
} : void 0
|
|
13087
13152
|
}, React$1.createElement("div", {
|
|
@@ -18294,24 +18359,13 @@ var Context = /* @__PURE__ */ React.createContext({
|
|
|
18294
18359
|
});
|
|
18295
18360
|
var _default = Context;
|
|
18296
18361
|
default_1 = FieldContext.default = _default;
|
|
18297
|
-
function
|
|
18298
|
-
|
|
18299
|
-
|
|
18300
|
-
|
|
18301
|
-
|
|
18302
|
-
|
|
18303
|
-
|
|
18304
|
-
return !!(prototype && prototype.isReactComponent);
|
|
18305
|
-
}
|
|
18306
|
-
function isSimpleFunctionComponent(type4) {
|
|
18307
|
-
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
18308
|
-
}
|
|
18309
|
-
function isSafeSetRefComponent(component) {
|
|
18310
|
-
if (reactIsExports.isFragment(component))
|
|
18311
|
-
return false;
|
|
18312
|
-
if (reactIsExports.isMemo(component))
|
|
18313
|
-
return isSafeSetRefComponent(component.type);
|
|
18314
|
-
return !isSimpleFunctionComponent(component.type);
|
|
18362
|
+
function undefinedFallback(...items) {
|
|
18363
|
+
let i2;
|
|
18364
|
+
for (i2 = 0; i2 < items.length; i2++) {
|
|
18365
|
+
if (items[i2] !== void 0)
|
|
18366
|
+
break;
|
|
18367
|
+
}
|
|
18368
|
+
return items[i2];
|
|
18315
18369
|
}
|
|
18316
18370
|
const Arrow = React$1.memo((props) => {
|
|
18317
18371
|
return withNativeProps(props, React$1.createElement("svg", {
|
|
@@ -19939,13 +19993,24 @@ const PopoverMenu = React$1.forwardRef((props, ref) => {
|
|
|
19939
19993
|
const Popover = attachPropertiesToComponent(Popover$1, {
|
|
19940
19994
|
Menu: PopoverMenu
|
|
19941
19995
|
});
|
|
19942
|
-
function
|
|
19943
|
-
|
|
19944
|
-
|
|
19945
|
-
|
|
19946
|
-
|
|
19947
|
-
|
|
19948
|
-
|
|
19996
|
+
function toArray(candidate) {
|
|
19997
|
+
if (candidate === void 0 || candidate === false)
|
|
19998
|
+
return [];
|
|
19999
|
+
return Array.isArray(candidate) ? candidate : [candidate];
|
|
20000
|
+
}
|
|
20001
|
+
function shouldConstruct(Component) {
|
|
20002
|
+
const prototype = Component.prototype;
|
|
20003
|
+
return !!(prototype && prototype.isReactComponent);
|
|
20004
|
+
}
|
|
20005
|
+
function isSimpleFunctionComponent(type4) {
|
|
20006
|
+
return typeof type4 === "function" && !shouldConstruct(type4) && type4.defaultProps === void 0;
|
|
20007
|
+
}
|
|
20008
|
+
function isSafeSetRefComponent(component) {
|
|
20009
|
+
if (reactIsExports.isFragment(component))
|
|
20010
|
+
return false;
|
|
20011
|
+
if (reactIsExports.isMemo(component))
|
|
20012
|
+
return isSafeSetRefComponent(component.type);
|
|
20013
|
+
return !isSimpleFunctionComponent(component.type);
|
|
19949
20014
|
}
|
|
19950
20015
|
const NAME_SPLIT = "__SPLIT__";
|
|
19951
20016
|
const classPrefix$L = `adm-form-item`;
|
|
@@ -19954,22 +20019,25 @@ const MemoInput = React$1.memo(({
|
|
|
19954
20019
|
}) => children, (prev, next) => prev.value === next.value && prev.update === next.update);
|
|
19955
20020
|
const FormItemLayout = (props) => {
|
|
19956
20021
|
var _a;
|
|
20022
|
+
const {
|
|
20023
|
+
locale,
|
|
20024
|
+
form: componentConfig = {}
|
|
20025
|
+
} = useConfig();
|
|
19957
20026
|
const {
|
|
19958
20027
|
style,
|
|
19959
20028
|
extra,
|
|
19960
20029
|
label,
|
|
19961
20030
|
help,
|
|
20031
|
+
helpIcon,
|
|
19962
20032
|
required: required4,
|
|
19963
20033
|
children,
|
|
19964
20034
|
htmlFor,
|
|
19965
20035
|
hidden,
|
|
19966
20036
|
arrow: arrow2,
|
|
20037
|
+
arrowIcon,
|
|
19967
20038
|
childElementPosition = "normal"
|
|
19968
|
-
} = props;
|
|
20039
|
+
} = mergeProps(componentConfig, props);
|
|
19969
20040
|
const context = React$1.useContext(FormContext);
|
|
19970
|
-
const {
|
|
19971
|
-
locale
|
|
19972
|
-
} = useConfig();
|
|
19973
20041
|
const hasFeedback = props.hasFeedback !== void 0 ? props.hasFeedback : context.hasFeedback;
|
|
19974
20042
|
const layout = props.layout || context.layout;
|
|
19975
20043
|
const disabled = (_a = props.disabled) !== null && _a !== void 0 ? _a : context.disabled;
|
|
@@ -20009,7 +20077,7 @@ const FormItemLayout = (props) => {
|
|
|
20009
20077
|
e2.stopPropagation();
|
|
20010
20078
|
e2.preventDefault();
|
|
20011
20079
|
}
|
|
20012
|
-
}, React$1.createElement(QuestionCircleOutline, null))));
|
|
20080
|
+
}, helpIcon || React$1.createElement(QuestionCircleOutline, null))));
|
|
20013
20081
|
const description = (!!props.description || hasFeedback) && React$1.createElement(React$1.Fragment, null, props.description, hasFeedback && React$1.createElement(React$1.Fragment, null, props.errors.map((error, index2) => React$1.createElement("div", {
|
|
20014
20082
|
key: `error-${index2}`,
|
|
20015
20083
|
className: `${classPrefix$L}-feedback-error`
|
|
@@ -20030,7 +20098,7 @@ const FormItemLayout = (props) => {
|
|
|
20030
20098
|
disabled,
|
|
20031
20099
|
onClick: props.onClick,
|
|
20032
20100
|
clickable: props.clickable,
|
|
20033
|
-
|
|
20101
|
+
arrowIcon: arrowIcon || arrow2
|
|
20034
20102
|
}, React$1.createElement("div", {
|
|
20035
20103
|
className: classNames(`${classPrefix$L}-child`, `${classPrefix$L}-child-position-${childElementPosition}`)
|
|
20036
20104
|
}, React$1.createElement("div", {
|
|
@@ -20044,6 +20112,7 @@ const FormItem = (props) => {
|
|
|
20044
20112
|
// FormItem 相关
|
|
20045
20113
|
label,
|
|
20046
20114
|
help,
|
|
20115
|
+
helpIcon,
|
|
20047
20116
|
extra,
|
|
20048
20117
|
hasFeedback,
|
|
20049
20118
|
name,
|
|
@@ -20064,8 +20133,9 @@ const FormItem = (props) => {
|
|
|
20064
20133
|
shouldUpdate,
|
|
20065
20134
|
dependencies,
|
|
20066
20135
|
clickable,
|
|
20067
|
-
arrow: arrow2
|
|
20068
|
-
|
|
20136
|
+
arrow: arrow2,
|
|
20137
|
+
arrowIcon
|
|
20138
|
+
} = 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"]);
|
|
20069
20139
|
const {
|
|
20070
20140
|
name: formName
|
|
20071
20141
|
} = React$1.useContext(FormContext);
|
|
@@ -20117,6 +20187,7 @@ const FormItem = (props) => {
|
|
|
20117
20187
|
label,
|
|
20118
20188
|
extra,
|
|
20119
20189
|
help,
|
|
20190
|
+
helpIcon,
|
|
20120
20191
|
description,
|
|
20121
20192
|
required: isRequired,
|
|
20122
20193
|
disabled,
|
|
@@ -20129,7 +20200,8 @@ const FormItem = (props) => {
|
|
|
20129
20200
|
layout,
|
|
20130
20201
|
childElementPosition,
|
|
20131
20202
|
clickable,
|
|
20132
|
-
arrow: arrow2
|
|
20203
|
+
arrow: arrow2,
|
|
20204
|
+
arrowIcon
|
|
20133
20205
|
}, React$1.createElement(NoStyleItemContext.Provider, {
|
|
20134
20206
|
value: onSubMetaChange
|
|
20135
20207
|
}, baseChildren)));
|
|
@@ -21356,22 +21428,24 @@ function useInputHandleKeyDown({
|
|
|
21356
21428
|
const classPrefix$A = `adm-input`;
|
|
21357
21429
|
const defaultProps$v = {
|
|
21358
21430
|
defaultValue: "",
|
|
21431
|
+
clearIcon: React$1.createElement(CloseCircleFill, null),
|
|
21359
21432
|
onlyShowClearWhenFocus: true
|
|
21360
21433
|
};
|
|
21361
|
-
const Input = React$1.forwardRef((
|
|
21362
|
-
const
|
|
21363
|
-
|
|
21434
|
+
const Input = React$1.forwardRef((props, ref) => {
|
|
21435
|
+
const {
|
|
21436
|
+
locale,
|
|
21437
|
+
input: componentConfig = {}
|
|
21438
|
+
} = useConfig();
|
|
21439
|
+
const mergedProps = mergeProps(defaultProps$v, componentConfig, props);
|
|
21440
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
21364
21441
|
const [hasFocus, setHasFocus] = React$1.useState(false);
|
|
21365
21442
|
const compositionStartRef = React$1.useRef(false);
|
|
21366
21443
|
const nativeInputRef = React$1.useRef(null);
|
|
21367
|
-
const {
|
|
21368
|
-
locale
|
|
21369
|
-
} = useConfig();
|
|
21370
21444
|
const handleKeydown = useInputHandleKeyDown({
|
|
21371
|
-
onEnterPress:
|
|
21372
|
-
onKeyDown:
|
|
21445
|
+
onEnterPress: mergedProps.onEnterPress,
|
|
21446
|
+
onKeyDown: mergedProps.onKeyDown,
|
|
21373
21447
|
nativeInputRef,
|
|
21374
|
-
enterKeyHint:
|
|
21448
|
+
enterKeyHint: mergedProps.enterKeyHint
|
|
21375
21449
|
});
|
|
21376
21450
|
React$1.useImperativeHandle(ref, () => ({
|
|
21377
21451
|
clear: () => {
|
|
@@ -21391,8 +21465,8 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21391
21465
|
}));
|
|
21392
21466
|
function checkValue() {
|
|
21393
21467
|
let nextValue = value;
|
|
21394
|
-
if (
|
|
21395
|
-
const boundValue = nextValue && bound(parseFloat(nextValue),
|
|
21468
|
+
if (mergedProps.type === "number") {
|
|
21469
|
+
const boundValue = nextValue && bound(parseFloat(nextValue), mergedProps.min, mergedProps.max).toString();
|
|
21396
21470
|
if (Number(nextValue) !== Number(boundValue)) {
|
|
21397
21471
|
nextValue = boundValue;
|
|
21398
21472
|
}
|
|
@@ -21402,16 +21476,16 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21402
21476
|
}
|
|
21403
21477
|
}
|
|
21404
21478
|
const shouldShowClear = (() => {
|
|
21405
|
-
if (!
|
|
21479
|
+
if (!mergedProps.clearable || !value || mergedProps.readOnly)
|
|
21406
21480
|
return false;
|
|
21407
|
-
if (
|
|
21481
|
+
if (mergedProps.onlyShowClearWhenFocus) {
|
|
21408
21482
|
return hasFocus;
|
|
21409
21483
|
} else {
|
|
21410
21484
|
return true;
|
|
21411
21485
|
}
|
|
21412
21486
|
})();
|
|
21413
|
-
return withNativeProps(
|
|
21414
|
-
className: classNames(`${classPrefix$A}`,
|
|
21487
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
21488
|
+
className: classNames(`${classPrefix$A}`, mergedProps.disabled && `${classPrefix$A}-disabled`)
|
|
21415
21489
|
}, React$1.createElement("input", {
|
|
21416
21490
|
ref: nativeInputRef,
|
|
21417
21491
|
className: `${classPrefix$A}-element`,
|
|
@@ -21422,50 +21496,50 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21422
21496
|
onFocus: (e2) => {
|
|
21423
21497
|
var _a;
|
|
21424
21498
|
setHasFocus(true);
|
|
21425
|
-
(_a =
|
|
21499
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21426
21500
|
},
|
|
21427
21501
|
onBlur: (e2) => {
|
|
21428
21502
|
var _a;
|
|
21429
21503
|
setHasFocus(false);
|
|
21430
21504
|
checkValue();
|
|
21431
|
-
(_a =
|
|
21505
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21432
21506
|
},
|
|
21433
|
-
id:
|
|
21434
|
-
placeholder:
|
|
21435
|
-
disabled:
|
|
21436
|
-
readOnly:
|
|
21437
|
-
maxLength:
|
|
21438
|
-
minLength:
|
|
21439
|
-
max:
|
|
21440
|
-
min:
|
|
21441
|
-
autoComplete:
|
|
21442
|
-
enterKeyHint:
|
|
21443
|
-
autoFocus:
|
|
21444
|
-
pattern:
|
|
21445
|
-
inputMode:
|
|
21446
|
-
type:
|
|
21447
|
-
name:
|
|
21448
|
-
autoCapitalize:
|
|
21449
|
-
autoCorrect:
|
|
21507
|
+
id: mergedProps.id,
|
|
21508
|
+
placeholder: mergedProps.placeholder,
|
|
21509
|
+
disabled: mergedProps.disabled,
|
|
21510
|
+
readOnly: mergedProps.readOnly,
|
|
21511
|
+
maxLength: mergedProps.maxLength,
|
|
21512
|
+
minLength: mergedProps.minLength,
|
|
21513
|
+
max: mergedProps.max,
|
|
21514
|
+
min: mergedProps.min,
|
|
21515
|
+
autoComplete: mergedProps.autoComplete,
|
|
21516
|
+
enterKeyHint: mergedProps.enterKeyHint,
|
|
21517
|
+
autoFocus: mergedProps.autoFocus,
|
|
21518
|
+
pattern: mergedProps.pattern,
|
|
21519
|
+
inputMode: mergedProps.inputMode,
|
|
21520
|
+
type: mergedProps.type,
|
|
21521
|
+
name: mergedProps.name,
|
|
21522
|
+
autoCapitalize: mergedProps.autoCapitalize,
|
|
21523
|
+
autoCorrect: mergedProps.autoCorrect,
|
|
21450
21524
|
onKeyDown: handleKeydown,
|
|
21451
|
-
onKeyUp:
|
|
21525
|
+
onKeyUp: mergedProps.onKeyUp,
|
|
21452
21526
|
onCompositionStart: (e2) => {
|
|
21453
21527
|
var _a;
|
|
21454
21528
|
compositionStartRef.current = true;
|
|
21455
|
-
(_a =
|
|
21529
|
+
(_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21456
21530
|
},
|
|
21457
21531
|
onCompositionEnd: (e2) => {
|
|
21458
21532
|
var _a;
|
|
21459
21533
|
compositionStartRef.current = false;
|
|
21460
|
-
(_a =
|
|
21534
|
+
(_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
21461
21535
|
},
|
|
21462
|
-
onClick:
|
|
21463
|
-
step:
|
|
21464
|
-
role:
|
|
21465
|
-
"aria-valuenow":
|
|
21466
|
-
"aria-valuemax":
|
|
21467
|
-
"aria-valuemin":
|
|
21468
|
-
"aria-label":
|
|
21536
|
+
onClick: mergedProps.onClick,
|
|
21537
|
+
step: mergedProps.step,
|
|
21538
|
+
role: mergedProps.role,
|
|
21539
|
+
"aria-valuenow": mergedProps["aria-valuenow"],
|
|
21540
|
+
"aria-valuemax": mergedProps["aria-valuemax"],
|
|
21541
|
+
"aria-valuemin": mergedProps["aria-valuemin"],
|
|
21542
|
+
"aria-label": mergedProps["aria-label"]
|
|
21469
21543
|
}), shouldShowClear && React$1.createElement("div", {
|
|
21470
21544
|
className: `${classPrefix$A}-clear`,
|
|
21471
21545
|
onMouseDown: (e2) => {
|
|
@@ -21474,14 +21548,14 @@ const Input = React$1.forwardRef((p, ref) => {
|
|
|
21474
21548
|
onClick: () => {
|
|
21475
21549
|
var _a, _b;
|
|
21476
21550
|
setValue2("");
|
|
21477
|
-
(_a =
|
|
21551
|
+
(_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
21478
21552
|
if (isIOS() && compositionStartRef.current) {
|
|
21479
21553
|
compositionStartRef.current = false;
|
|
21480
21554
|
(_b = nativeInputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
21481
21555
|
}
|
|
21482
21556
|
},
|
|
21483
21557
|
"aria-label": locale.Input.clear
|
|
21484
|
-
},
|
|
21558
|
+
}, mergedProps.clearIcon)));
|
|
21485
21559
|
});
|
|
21486
21560
|
const classPrefix$z = `adm-jumbo-tabs`;
|
|
21487
21561
|
const JumboTab = () => {
|
|
@@ -21742,50 +21816,60 @@ const index$7 = attachPropertiesToComponent(Modal, {
|
|
|
21742
21816
|
});
|
|
21743
21817
|
const classPrefix$y = `adm-nav-bar`;
|
|
21744
21818
|
const defaultProps$s = {
|
|
21745
|
-
|
|
21819
|
+
backIcon: true
|
|
21746
21820
|
};
|
|
21747
|
-
const NavBar = (
|
|
21748
|
-
const
|
|
21821
|
+
const NavBar = (props) => {
|
|
21822
|
+
const {
|
|
21823
|
+
navBar: componentConfig = {}
|
|
21824
|
+
} = useConfig();
|
|
21825
|
+
const mergedProps = mergeProps(defaultProps$s, componentConfig, props);
|
|
21749
21826
|
const {
|
|
21750
21827
|
back,
|
|
21828
|
+
backIcon,
|
|
21751
21829
|
backArrow
|
|
21752
|
-
} =
|
|
21753
|
-
return withNativeProps(
|
|
21830
|
+
} = mergedProps;
|
|
21831
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
21754
21832
|
className: classNames(classPrefix$y)
|
|
21755
21833
|
}, React$1.createElement("div", {
|
|
21756
21834
|
className: `${classPrefix$y}-left`,
|
|
21757
21835
|
role: "button"
|
|
21758
21836
|
}, back !== null && React$1.createElement("div", {
|
|
21759
21837
|
className: `${classPrefix$y}-back`,
|
|
21760
|
-
onClick:
|
|
21761
|
-
}, backArrow && React$1.createElement("span", {
|
|
21838
|
+
onClick: mergedProps.onBack
|
|
21839
|
+
}, (backIcon || backArrow) && React$1.createElement("span", {
|
|
21762
21840
|
className: `${classPrefix$y}-back-arrow`
|
|
21763
|
-
}, backArrow === true ? React$1.createElement(LeftOutline, null) : backArrow), React$1.createElement("span", {
|
|
21841
|
+
}, backIcon === true || backArrow === true ? componentConfig.backIcon || React$1.createElement(LeftOutline, null) : backIcon || backArrow), React$1.createElement("span", {
|
|
21764
21842
|
"aria-hidden": "true"
|
|
21765
|
-
}, back)),
|
|
21843
|
+
}, back)), mergedProps.left), React$1.createElement("div", {
|
|
21766
21844
|
className: `${classPrefix$y}-title`
|
|
21767
|
-
},
|
|
21845
|
+
}, mergedProps.children), React$1.createElement("div", {
|
|
21768
21846
|
className: `${classPrefix$y}-right`
|
|
21769
|
-
},
|
|
21847
|
+
}, mergedProps.right)));
|
|
21770
21848
|
};
|
|
21771
21849
|
const classPrefix$x = `adm-notice-bar`;
|
|
21772
21850
|
const defaultProps$r = {
|
|
21773
21851
|
color: "default",
|
|
21774
21852
|
delay: 2e3,
|
|
21775
21853
|
speed: 50,
|
|
21776
|
-
|
|
21777
|
-
|
|
21854
|
+
icon: React$1.createElement(SoundOutline, null),
|
|
21855
|
+
wrap: false
|
|
21778
21856
|
};
|
|
21779
|
-
const NoticeBar = React$1.memo((
|
|
21780
|
-
const
|
|
21857
|
+
const NoticeBar = React$1.memo((props) => {
|
|
21858
|
+
const {
|
|
21859
|
+
noticeBar: componentConfig = {}
|
|
21860
|
+
} = useConfig();
|
|
21861
|
+
const mergedProps = mergeProps(defaultProps$r, componentConfig, props);
|
|
21862
|
+
const closeIcon = mergeProp(React$1.createElement(CloseOutline, {
|
|
21863
|
+
className: `${classPrefix$x}-close-icon`
|
|
21864
|
+
}), componentConfig.closeIcon, props.closeIcon);
|
|
21781
21865
|
const containerRef = React$1.useRef(null);
|
|
21782
21866
|
const textRef = React$1.useRef(null);
|
|
21783
21867
|
const [visible, setVisible] = React$1.useState(true);
|
|
21784
|
-
const speed =
|
|
21868
|
+
const speed = mergedProps.speed;
|
|
21785
21869
|
const delayLockRef = React$1.useRef(true);
|
|
21786
21870
|
const animatingRef = React$1.useRef(false);
|
|
21787
21871
|
function start2() {
|
|
21788
|
-
if (delayLockRef.current ||
|
|
21872
|
+
if (delayLockRef.current || mergedProps.wrap)
|
|
21789
21873
|
return;
|
|
21790
21874
|
const container = containerRef.current;
|
|
21791
21875
|
const text = textRef.current;
|
|
@@ -21814,7 +21898,7 @@ const NoticeBar = React$1.memo((p) => {
|
|
|
21814
21898
|
useTimeout$1(() => {
|
|
21815
21899
|
delayLockRef.current = false;
|
|
21816
21900
|
start2();
|
|
21817
|
-
},
|
|
21901
|
+
}, mergedProps.delay);
|
|
21818
21902
|
useResizeEffect(() => {
|
|
21819
21903
|
start2();
|
|
21820
21904
|
}, containerRef);
|
|
@@ -21827,14 +21911,14 @@ const NoticeBar = React$1.memo((p) => {
|
|
|
21827
21911
|
});
|
|
21828
21912
|
if (!visible)
|
|
21829
21913
|
return null;
|
|
21830
|
-
return withNativeProps(
|
|
21831
|
-
className: classNames(classPrefix$x, `${classPrefix$x}-${
|
|
21832
|
-
[`${classPrefix$x}-wrap`]:
|
|
21914
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
21915
|
+
className: classNames(classPrefix$x, `${classPrefix$x}-${mergedProps.color}`, {
|
|
21916
|
+
[`${classPrefix$x}-wrap`]: mergedProps.wrap
|
|
21833
21917
|
}),
|
|
21834
|
-
onClick:
|
|
21835
|
-
},
|
|
21918
|
+
onClick: mergedProps.onClick
|
|
21919
|
+
}, mergedProps.icon && React$1.createElement("span", {
|
|
21836
21920
|
className: `${classPrefix$x}-left`
|
|
21837
|
-
},
|
|
21921
|
+
}, mergedProps.icon), React$1.createElement("span", {
|
|
21838
21922
|
ref: containerRef,
|
|
21839
21923
|
className: `${classPrefix$x}-content`
|
|
21840
21924
|
}, React$1.createElement("span", {
|
|
@@ -21844,18 +21928,16 @@ const NoticeBar = React$1.memo((p) => {
|
|
|
21844
21928
|
},
|
|
21845
21929
|
ref: textRef,
|
|
21846
21930
|
className: `${classPrefix$x}-content-inner`
|
|
21847
|
-
},
|
|
21931
|
+
}, mergedProps.content)), (mergedProps.closeable || mergedProps.extra) && React$1.createElement("span", {
|
|
21848
21932
|
className: `${classPrefix$x}-right`
|
|
21849
|
-
},
|
|
21933
|
+
}, mergedProps.extra, mergedProps.closeable && React$1.createElement("div", {
|
|
21850
21934
|
className: `${classPrefix$x}-close`,
|
|
21851
21935
|
onClick: () => {
|
|
21852
21936
|
var _a;
|
|
21853
21937
|
setVisible(false);
|
|
21854
|
-
(_a =
|
|
21938
|
+
(_a = mergedProps.onClose) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
21855
21939
|
}
|
|
21856
|
-
},
|
|
21857
|
-
className: `${classPrefix$x}-close-icon`
|
|
21858
|
-
})))));
|
|
21940
|
+
}, closeIcon))));
|
|
21859
21941
|
});
|
|
21860
21942
|
function shuffle(array4) {
|
|
21861
21943
|
const result = [...array4];
|
|
@@ -21914,13 +21996,13 @@ const NumberKeyboard = (p) => {
|
|
|
21914
21996
|
var _a;
|
|
21915
21997
|
(_a = props.onDelete) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
21916
21998
|
});
|
|
21917
|
-
const
|
|
21999
|
+
const startContinueClear = () => {
|
|
21918
22000
|
timeoutRef.current = window.setTimeout(() => {
|
|
21919
22001
|
onDelete();
|
|
21920
22002
|
intervalRef.current = window.setInterval(onDelete, 150);
|
|
21921
22003
|
}, 700);
|
|
21922
22004
|
};
|
|
21923
|
-
const
|
|
22005
|
+
const stopContinueClear = () => {
|
|
21924
22006
|
clearTimeout(timeoutRef.current);
|
|
21925
22007
|
clearInterval(intervalRef.current);
|
|
21926
22008
|
};
|
|
@@ -21980,14 +22062,15 @@ const NumberKeyboard = (p) => {
|
|
|
21980
22062
|
key,
|
|
21981
22063
|
className,
|
|
21982
22064
|
onTouchStart: () => {
|
|
22065
|
+
stopContinueClear();
|
|
21983
22066
|
if (key === "BACKSPACE") {
|
|
21984
|
-
|
|
22067
|
+
startContinueClear();
|
|
21985
22068
|
}
|
|
21986
22069
|
},
|
|
21987
22070
|
onTouchEnd: (e2) => {
|
|
21988
22071
|
onKeyPress(e2, key);
|
|
21989
22072
|
if (key === "BACKSPACE") {
|
|
21990
|
-
|
|
22073
|
+
stopContinueClear();
|
|
21991
22074
|
}
|
|
21992
22075
|
}
|
|
21993
22076
|
}, ariaProps), key === "BACKSPACE" ? React$1.createElement(TextDeletionOutline, null) : key);
|
|
@@ -22019,11 +22102,11 @@ const NumberKeyboard = (p) => {
|
|
|
22019
22102
|
}, React$1.createElement("div", {
|
|
22020
22103
|
className: `${classPrefix$w}-key ${classPrefix$w}-key-extra ${classPrefix$w}-key-bs`,
|
|
22021
22104
|
onTouchStart: () => {
|
|
22022
|
-
|
|
22105
|
+
startContinueClear();
|
|
22023
22106
|
},
|
|
22024
22107
|
onTouchEnd: (e2) => {
|
|
22025
22108
|
onKeyPress(e2, "BACKSPACE");
|
|
22026
|
-
|
|
22109
|
+
stopContinueClear();
|
|
22027
22110
|
},
|
|
22028
22111
|
onContextMenu: (e2) => {
|
|
22029
22112
|
e2.preventDefault();
|
|
@@ -22591,14 +22674,33 @@ const Rate = (p) => {
|
|
|
22591
22674
|
className: classNames(`${classPrefix$p}-box`)
|
|
22592
22675
|
}, props.allowHalf && renderStar(i2 + 0.5, true), renderStar(i2 + 1, false)))));
|
|
22593
22676
|
};
|
|
22594
|
-
const
|
|
22595
|
-
const
|
|
22596
|
-
|
|
22597
|
-
|
|
22598
|
-
|
|
22599
|
-
|
|
22600
|
-
|
|
22677
|
+
const useResultIcon = (status) => {
|
|
22678
|
+
const {
|
|
22679
|
+
result: componentConfig = {}
|
|
22680
|
+
} = useConfig();
|
|
22681
|
+
const {
|
|
22682
|
+
successIcon = React$1.createElement(CheckCircleFill, null),
|
|
22683
|
+
errorIcon = React$1.createElement(CloseCircleFill, null),
|
|
22684
|
+
infoIcon = React$1.createElement(InformationCircleFill, null),
|
|
22685
|
+
waitingIcon = React$1.createElement(ClockCircleFill, null),
|
|
22686
|
+
warningIcon = React$1.createElement(ExclamationCircleFill, null)
|
|
22687
|
+
} = componentConfig || {};
|
|
22688
|
+
switch (status) {
|
|
22689
|
+
case "success":
|
|
22690
|
+
return successIcon;
|
|
22691
|
+
case "error":
|
|
22692
|
+
return errorIcon;
|
|
22693
|
+
case "info":
|
|
22694
|
+
return infoIcon;
|
|
22695
|
+
case "waiting":
|
|
22696
|
+
return waitingIcon;
|
|
22697
|
+
case "warning":
|
|
22698
|
+
return warningIcon;
|
|
22699
|
+
default:
|
|
22700
|
+
return null;
|
|
22701
|
+
}
|
|
22601
22702
|
};
|
|
22703
|
+
const classPrefix$o = `adm-result`;
|
|
22602
22704
|
const defaultProps$i = {
|
|
22603
22705
|
status: "info"
|
|
22604
22706
|
};
|
|
@@ -22610,27 +22712,20 @@ const Result = (p) => {
|
|
|
22610
22712
|
description,
|
|
22611
22713
|
icon
|
|
22612
22714
|
} = props;
|
|
22715
|
+
const fallbackIcon = useResultIcon(status);
|
|
22613
22716
|
if (!status)
|
|
22614
22717
|
return null;
|
|
22615
|
-
const resultIcon = icon || React$1.createElement(iconRecord$1[status]);
|
|
22616
22718
|
return withNativeProps(props, React$1.createElement("div", {
|
|
22617
22719
|
className: classNames(classPrefix$o, `${classPrefix$o}-${status}`)
|
|
22618
22720
|
}, React$1.createElement("div", {
|
|
22619
22721
|
className: `${classPrefix$o}-icon`
|
|
22620
|
-
},
|
|
22722
|
+
}, icon || fallbackIcon), React$1.createElement("div", {
|
|
22621
22723
|
className: `${classPrefix$o}-title`
|
|
22622
22724
|
}, title), !!description && React$1.createElement("div", {
|
|
22623
22725
|
className: `${classPrefix$o}-description`
|
|
22624
22726
|
}, description)));
|
|
22625
22727
|
};
|
|
22626
22728
|
const classPrefix$n = `adm-result-page`;
|
|
22627
|
-
const iconRecord = {
|
|
22628
|
-
success: CheckCircleFill,
|
|
22629
|
-
error: CloseCircleFill,
|
|
22630
|
-
info: InformationCircleFill,
|
|
22631
|
-
waiting: ClockCircleFill,
|
|
22632
|
-
warning: ExclamationCircleFill
|
|
22633
|
-
};
|
|
22634
22729
|
const defaultProps$h = {
|
|
22635
22730
|
status: "info",
|
|
22636
22731
|
details: []
|
|
@@ -22648,7 +22743,7 @@ const ResultPage = (p) => {
|
|
|
22648
22743
|
onPrimaryButtonClick,
|
|
22649
22744
|
onSecondaryButtonClick
|
|
22650
22745
|
} = props;
|
|
22651
|
-
const
|
|
22746
|
+
const fallbackIcon = useResultIcon(status);
|
|
22652
22747
|
const [collapse, setCollapse] = React$1.useState(true);
|
|
22653
22748
|
const showSecondaryButton = isNodeWithContent(secondaryButtonText);
|
|
22654
22749
|
const showPrimaryButton = isNodeWithContent(primaryButtonText);
|
|
@@ -22658,7 +22753,7 @@ const ResultPage = (p) => {
|
|
|
22658
22753
|
className: `${classPrefix$n}-header`
|
|
22659
22754
|
}, React$1.createElement("div", {
|
|
22660
22755
|
className: `${classPrefix$n}-icon`
|
|
22661
|
-
},
|
|
22756
|
+
}, icon || fallbackIcon), React$1.createElement("div", {
|
|
22662
22757
|
className: `${classPrefix$n}-title`
|
|
22663
22758
|
}, title), isNodeWithContent(description) ? React$1.createElement("div", {
|
|
22664
22759
|
className: `${classPrefix$n}-description`
|
|
@@ -22714,17 +22809,18 @@ const defaultProps$g = {
|
|
|
22714
22809
|
onlyShowClearWhenFocus: false,
|
|
22715
22810
|
showCancelButton: false,
|
|
22716
22811
|
defaultValue: "",
|
|
22717
|
-
clearOnCancel: true
|
|
22718
|
-
icon: React$1.createElement(SearchOutline, null)
|
|
22812
|
+
clearOnCancel: true
|
|
22719
22813
|
};
|
|
22720
|
-
const SearchBar = React$1.forwardRef((
|
|
22814
|
+
const SearchBar = React$1.forwardRef((props, ref) => {
|
|
22721
22815
|
const {
|
|
22722
|
-
locale
|
|
22816
|
+
locale,
|
|
22817
|
+
searchBar: componentConfig = {}
|
|
22723
22818
|
} = useConfig();
|
|
22724
|
-
const
|
|
22819
|
+
const mergedProps = mergeProps(defaultProps$g, componentConfig, {
|
|
22725
22820
|
cancelText: locale.common.cancel
|
|
22726
|
-
},
|
|
22727
|
-
const
|
|
22821
|
+
}, props);
|
|
22822
|
+
const searchIcon = mergeProp(React$1.createElement(SearchOutline, null), componentConfig.searchIcon, props.icon, props.searchIcon);
|
|
22823
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
22728
22824
|
const [hasFocus, setHasFocus] = React$1.useState(false);
|
|
22729
22825
|
const inputRef = React$1.useRef(null);
|
|
22730
22826
|
const composingRef = React$1.useRef(false);
|
|
@@ -22748,10 +22844,10 @@ const SearchBar = React$1.forwardRef((p, ref) => {
|
|
|
22748
22844
|
}));
|
|
22749
22845
|
const renderCancelButton = () => {
|
|
22750
22846
|
let isShowCancel;
|
|
22751
|
-
if (typeof
|
|
22752
|
-
isShowCancel =
|
|
22847
|
+
if (typeof mergedProps.showCancelButton === "function") {
|
|
22848
|
+
isShowCancel = mergedProps.showCancelButton(hasFocus, value);
|
|
22753
22849
|
} else {
|
|
22754
|
-
isShowCancel =
|
|
22850
|
+
isShowCancel = mergedProps.showCancelButton && hasFocus;
|
|
22755
22851
|
}
|
|
22756
22852
|
return isShowCancel && React$1.createElement("div", {
|
|
22757
22853
|
className: `${classPrefix$l}-suffix`
|
|
@@ -22760,66 +22856,66 @@ const SearchBar = React$1.forwardRef((p, ref) => {
|
|
|
22760
22856
|
className: `${classPrefix$l}-cancel-button`,
|
|
22761
22857
|
onClick: () => {
|
|
22762
22858
|
var _a, _b, _c;
|
|
22763
|
-
if (
|
|
22859
|
+
if (mergedProps.clearOnCancel) {
|
|
22764
22860
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.clear();
|
|
22765
22861
|
}
|
|
22766
22862
|
(_b = inputRef.current) === null || _b === void 0 ? void 0 : _b.blur();
|
|
22767
|
-
(_c =
|
|
22863
|
+
(_c = mergedProps.onCancel) === null || _c === void 0 ? void 0 : _c.call(mergedProps);
|
|
22768
22864
|
},
|
|
22769
22865
|
onMouseDown: (e2) => {
|
|
22770
22866
|
e2.preventDefault();
|
|
22771
22867
|
}
|
|
22772
|
-
},
|
|
22868
|
+
}, mergedProps.cancelText));
|
|
22773
22869
|
};
|
|
22774
|
-
return withNativeProps(
|
|
22870
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
22775
22871
|
className: classNames(classPrefix$l, {
|
|
22776
22872
|
[`${classPrefix$l}-active`]: hasFocus
|
|
22777
22873
|
})
|
|
22778
22874
|
}, React$1.createElement("div", {
|
|
22779
22875
|
className: `${classPrefix$l}-input-box`
|
|
22780
|
-
},
|
|
22876
|
+
}, searchIcon && React$1.createElement("div", {
|
|
22781
22877
|
className: `${classPrefix$l}-input-box-icon`
|
|
22782
|
-
},
|
|
22878
|
+
}, searchIcon), React$1.createElement(Input, {
|
|
22783
22879
|
ref: inputRef,
|
|
22784
22880
|
className: classNames(`${classPrefix$l}-input`, {
|
|
22785
|
-
[`${classPrefix$l}-input-without-icon`]: !
|
|
22881
|
+
[`${classPrefix$l}-input-without-icon`]: !searchIcon
|
|
22786
22882
|
}),
|
|
22787
22883
|
value,
|
|
22788
22884
|
onChange: setValue2,
|
|
22789
|
-
maxLength:
|
|
22790
|
-
placeholder:
|
|
22791
|
-
clearable:
|
|
22792
|
-
onlyShowClearWhenFocus:
|
|
22885
|
+
maxLength: mergedProps.maxLength,
|
|
22886
|
+
placeholder: mergedProps.placeholder,
|
|
22887
|
+
clearable: mergedProps.clearable,
|
|
22888
|
+
onlyShowClearWhenFocus: mergedProps.onlyShowClearWhenFocus,
|
|
22793
22889
|
onFocus: (e2) => {
|
|
22794
22890
|
var _a;
|
|
22795
22891
|
setHasFocus(true);
|
|
22796
|
-
(_a =
|
|
22892
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22797
22893
|
},
|
|
22798
22894
|
onBlur: (e2) => {
|
|
22799
22895
|
var _a;
|
|
22800
22896
|
setHasFocus(false);
|
|
22801
|
-
(_a =
|
|
22897
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22802
22898
|
},
|
|
22803
|
-
onClear:
|
|
22899
|
+
onClear: mergedProps.onClear,
|
|
22804
22900
|
type: "search",
|
|
22805
22901
|
enterKeyHint: "search",
|
|
22806
22902
|
onEnterPress: () => {
|
|
22807
22903
|
var _a, _b;
|
|
22808
22904
|
if (!composingRef.current) {
|
|
22809
22905
|
(_a = inputRef.current) === null || _a === void 0 ? void 0 : _a.blur();
|
|
22810
|
-
(_b =
|
|
22906
|
+
(_b = mergedProps.onSearch) === null || _b === void 0 ? void 0 : _b.call(mergedProps, value);
|
|
22811
22907
|
}
|
|
22812
22908
|
},
|
|
22813
22909
|
"aria-label": locale.SearchBar.name,
|
|
22814
22910
|
onCompositionStart: (e2) => {
|
|
22815
22911
|
var _a;
|
|
22816
22912
|
composingRef.current = true;
|
|
22817
|
-
(_a =
|
|
22913
|
+
(_a = mergedProps.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22818
22914
|
},
|
|
22819
22915
|
onCompositionEnd: (e2) => {
|
|
22820
22916
|
var _a;
|
|
22821
22917
|
composingRef.current = false;
|
|
22822
|
-
(_a =
|
|
22918
|
+
(_a = mergedProps.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(mergedProps, e2);
|
|
22823
22919
|
}
|
|
22824
22920
|
})), renderCancelButton()));
|
|
22825
22921
|
});
|
|
@@ -25418,15 +25514,17 @@ const classPrefix$2 = "adm-virtual-input";
|
|
|
25418
25514
|
const defaultProps$2 = {
|
|
25419
25515
|
defaultValue: ""
|
|
25420
25516
|
};
|
|
25421
|
-
const VirtualInput = React$1.forwardRef((
|
|
25422
|
-
const
|
|
25423
|
-
|
|
25517
|
+
const VirtualInput = React$1.forwardRef((props, ref) => {
|
|
25518
|
+
const {
|
|
25519
|
+
locale,
|
|
25520
|
+
input: componentConfig = {}
|
|
25521
|
+
} = useConfig();
|
|
25522
|
+
const mergedProps = mergeProps(defaultProps$2, componentConfig, props);
|
|
25523
|
+
const [value, setValue2] = usePropsValue(mergedProps);
|
|
25424
25524
|
const rootRef = React$1.useRef(null);
|
|
25425
25525
|
const contentRef = React$1.useRef(null);
|
|
25426
25526
|
const [hasFocus, setHasFocus] = React$1.useState(false);
|
|
25427
|
-
const
|
|
25428
|
-
locale
|
|
25429
|
-
} = useConfig();
|
|
25527
|
+
const clearIcon = mergeProp(React$1.createElement(CloseCircleFill, null), componentConfig.clearIcon, props.clearIcon);
|
|
25430
25528
|
function scrollToEnd() {
|
|
25431
25529
|
const root2 = rootRef.current;
|
|
25432
25530
|
if (!root2)
|
|
@@ -25460,14 +25558,14 @@ const VirtualInput = React$1.forwardRef((p, ref) => {
|
|
|
25460
25558
|
function onFocus() {
|
|
25461
25559
|
var _a;
|
|
25462
25560
|
setHasFocus(true);
|
|
25463
|
-
(_a =
|
|
25561
|
+
(_a = mergedProps.onFocus) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25464
25562
|
}
|
|
25465
25563
|
function onBlur() {
|
|
25466
25564
|
var _a;
|
|
25467
25565
|
setHasFocus(false);
|
|
25468
|
-
(_a =
|
|
25566
|
+
(_a = mergedProps.onBlur) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25469
25567
|
}
|
|
25470
|
-
const keyboard =
|
|
25568
|
+
const keyboard = mergedProps.keyboard;
|
|
25471
25569
|
const keyboardElement = keyboard && React$1.cloneElement(keyboard, {
|
|
25472
25570
|
onInput: (v) => {
|
|
25473
25571
|
var _a, _b;
|
|
@@ -25492,38 +25590,38 @@ const VirtualInput = React$1.forwardRef((p, ref) => {
|
|
|
25492
25590
|
},
|
|
25493
25591
|
getContainer: null
|
|
25494
25592
|
});
|
|
25495
|
-
return withNativeProps(
|
|
25593
|
+
return withNativeProps(mergedProps, React$1.createElement("div", {
|
|
25496
25594
|
ref: rootRef,
|
|
25497
25595
|
className: classNames(classPrefix$2, {
|
|
25498
|
-
[`${classPrefix$2}-disabled`]:
|
|
25596
|
+
[`${classPrefix$2}-disabled`]: mergedProps.disabled
|
|
25499
25597
|
}),
|
|
25500
|
-
tabIndex:
|
|
25598
|
+
tabIndex: mergedProps.disabled ? void 0 : 0,
|
|
25501
25599
|
role: "textbox",
|
|
25502
25600
|
onFocus,
|
|
25503
25601
|
onBlur,
|
|
25504
|
-
onClick:
|
|
25602
|
+
onClick: mergedProps.onClick
|
|
25505
25603
|
}, React$1.createElement("div", {
|
|
25506
25604
|
className: `${classPrefix$2}-content`,
|
|
25507
25605
|
ref: contentRef,
|
|
25508
|
-
"aria-disabled":
|
|
25509
|
-
"aria-label":
|
|
25606
|
+
"aria-disabled": mergedProps.disabled,
|
|
25607
|
+
"aria-label": mergedProps.placeholder
|
|
25510
25608
|
}, value, React$1.createElement("div", {
|
|
25511
25609
|
className: `${classPrefix$2}-caret-container`
|
|
25512
25610
|
}, hasFocus && React$1.createElement("div", {
|
|
25513
25611
|
className: `${classPrefix$2}-caret`
|
|
25514
|
-
}))),
|
|
25612
|
+
}))), mergedProps.clearable && !!value && hasFocus && React$1.createElement("div", {
|
|
25515
25613
|
className: `${classPrefix$2}-clear`,
|
|
25516
25614
|
onClick: (e2) => {
|
|
25517
25615
|
var _a;
|
|
25518
25616
|
e2.stopPropagation();
|
|
25519
25617
|
setValue2("");
|
|
25520
|
-
(_a =
|
|
25618
|
+
(_a = mergedProps.onClear) === null || _a === void 0 ? void 0 : _a.call(mergedProps);
|
|
25521
25619
|
},
|
|
25522
25620
|
role: "button",
|
|
25523
25621
|
"aria-label": locale.Input.clear
|
|
25524
|
-
},
|
|
25622
|
+
}, clearIcon), [void 0, null, ""].includes(value) && React$1.createElement("div", {
|
|
25525
25623
|
className: `${classPrefix$2}-placeholder`
|
|
25526
|
-
},
|
|
25624
|
+
}, mergedProps.placeholder), keyboardElement));
|
|
25527
25625
|
});
|
|
25528
25626
|
const classPrefix$1 = `adm-water-mark`;
|
|
25529
25627
|
const defaultProps$1 = {
|