antd-mobile 5.5.1 → 5.7.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/cjs/components/action-sheet/action-sheet.d.ts +5 -5
- package/2x/cjs/components/action-sheet/action-sheet.js +6 -46
- package/2x/cjs/components/action-sheet/index.d.ts +1 -1
- package/2x/cjs/components/badge/badge.js +1 -1
- package/2x/cjs/components/calendar/calendar.d.ts +4 -3
- package/2x/cjs/components/calendar/calendar.js +67 -56
- package/2x/cjs/components/calendar/convert.d.ts +2 -0
- package/2x/cjs/components/calendar/convert.js +22 -0
- package/2x/cjs/components/cascader-view/cascader-view.js +7 -0
- package/2x/cjs/components/checkbox/checkbox.js +4 -20
- package/2x/cjs/components/checkbox/native-input.d.ts +10 -0
- package/2x/cjs/components/checkbox/native-input.js +42 -0
- package/2x/cjs/components/dialog/index.d.ts +1 -1
- package/2x/cjs/components/dialog/show.d.ts +2 -4
- package/2x/cjs/components/dialog/show.js +9 -47
- package/2x/cjs/components/dot-loading/dot-loading.js +1 -2
- package/2x/cjs/components/empty/empty-icon.d.ts +3 -0
- package/2x/cjs/components/empty/empty-icon.js +37 -0
- package/2x/cjs/components/empty/empty.js +27 -15
- package/2x/cjs/components/error-block/error-block.css +1 -0
- package/2x/cjs/components/error-block/error-block.js +5 -8
- package/2x/cjs/components/error-block/images/busy.d.ts +1 -0
- package/2x/cjs/components/error-block/images/busy.js +102 -0
- package/2x/cjs/components/error-block/images/default.d.ts +1 -0
- package/2x/cjs/components/error-block/images/default.js +178 -0
- package/2x/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/cjs/components/error-block/images/disconnected.js +135 -0
- package/2x/cjs/components/error-block/images/empty.d.ts +1 -0
- package/2x/cjs/components/error-block/images/empty.js +131 -0
- package/2x/cjs/components/error-block/images/index.d.ts +2 -0
- package/2x/cjs/components/error-block/images/index.js +22 -0
- package/2x/cjs/components/floating-bubble/floating-bubble.css +2 -1
- package/2x/cjs/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/2x/cjs/components/form/form-item.d.ts +1 -1
- package/2x/cjs/components/form/form-item.js +4 -1
- package/2x/cjs/components/image-viewer/index.d.ts +1 -1
- package/2x/cjs/components/image-viewer/methods.d.ts +3 -7
- package/2x/cjs/components/image-viewer/methods.js +13 -79
- package/2x/cjs/components/modal/index.d.ts +1 -1
- package/2x/cjs/components/modal/show.d.ts +2 -4
- package/2x/cjs/components/modal/show.js +9 -47
- package/2x/cjs/components/picker/picker.js +6 -9
- package/2x/cjs/components/picker-view/columns-extend.d.ts +3 -0
- package/2x/cjs/components/picker-view/columns-extend.js +45 -0
- package/2x/cjs/components/picker-view/picker-view.d.ts +1 -0
- package/2x/cjs/components/picker-view/picker-view.js +14 -16
- package/2x/cjs/components/popover/popover.css +1 -0
- package/2x/cjs/components/popover/popover.js +1 -0
- package/2x/cjs/components/popover/temp-floating-ui.min.js +1 -430
- package/2x/cjs/components/radio/radio.js +4 -20
- package/2x/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/2x/cjs/components/tab-bar/tab-bar.d.ts +1 -1
- package/2x/cjs/components/tab-bar/tab-bar.js +1 -1
- package/2x/cjs/components/tree-select/tree-select.js +2 -2
- package/2x/cjs/utils/render-imperatively.d.ts +10 -0
- package/2x/cjs/utils/render-imperatively.js +68 -0
- package/2x/cjs/utils/with-cache.d.ts +1 -0
- package/2x/cjs/utils/with-cache.js +17 -0
- package/2x/es/components/action-sheet/action-sheet.d.ts +5 -5
- package/2x/es/components/action-sheet/action-sheet.js +5 -41
- package/2x/es/components/action-sheet/index.d.ts +1 -1
- package/2x/es/components/badge/badge.js +1 -1
- package/2x/es/components/calendar/calendar.d.ts +4 -3
- package/2x/es/components/calendar/calendar.js +67 -58
- package/2x/es/components/calendar/convert.d.ts +2 -0
- package/2x/es/components/calendar/convert.js +15 -0
- package/2x/es/components/cascader-view/cascader-view.js +7 -0
- package/2x/es/components/checkbox/checkbox.js +4 -21
- package/2x/es/components/checkbox/native-input.d.ts +10 -0
- package/2x/es/components/checkbox/native-input.js +28 -0
- package/2x/es/components/dialog/index.d.ts +1 -1
- package/2x/es/components/dialog/show.d.ts +2 -4
- package/2x/es/components/dialog/show.js +8 -44
- package/2x/es/components/dot-loading/dot-loading.js +1 -2
- package/2x/es/components/empty/empty-icon.d.ts +3 -0
- package/2x/es/components/empty/empty-icon.js +24 -0
- package/2x/es/components/empty/empty.js +27 -14
- package/2x/es/components/error-block/error-block.css +1 -0
- package/2x/es/components/error-block/error-block.js +4 -6
- package/2x/es/components/error-block/images/busy.d.ts +1 -0
- package/2x/es/components/error-block/images/busy.js +90 -0
- package/2x/es/components/error-block/images/default.d.ts +1 -0
- package/2x/es/components/error-block/images/default.js +166 -0
- package/2x/es/components/error-block/images/disconnected.d.ts +1 -0
- package/2x/es/components/error-block/images/disconnected.js +123 -0
- package/2x/es/components/error-block/images/empty.d.ts +1 -0
- package/2x/es/components/error-block/images/empty.js +119 -0
- package/2x/es/components/error-block/images/index.d.ts +2 -0
- package/2x/es/components/error-block/images/index.js +10 -0
- package/2x/es/components/floating-bubble/floating-bubble.css +2 -1
- package/2x/es/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/2x/es/components/form/form-item.d.ts +1 -1
- package/2x/es/components/form/form-item.js +4 -1
- package/2x/es/components/image-viewer/index.d.ts +1 -1
- package/2x/es/components/image-viewer/methods.d.ts +3 -7
- package/2x/es/components/image-viewer/methods.js +12 -75
- package/2x/es/components/modal/index.d.ts +1 -1
- package/2x/es/components/modal/show.d.ts +2 -4
- package/2x/es/components/modal/show.js +8 -44
- package/2x/es/components/picker/picker.js +6 -8
- package/2x/es/components/picker-view/columns-extend.d.ts +3 -0
- package/2x/es/components/picker-view/columns-extend.js +34 -0
- package/2x/es/components/picker-view/picker-view.d.ts +1 -0
- package/2x/es/components/picker-view/picker-view.js +14 -15
- package/2x/es/components/popover/popover.css +1 -0
- package/2x/es/components/popover/popover.js +1 -0
- package/2x/es/components/popover/temp-floating-ui.min.js +1 -430
- package/2x/es/components/radio/radio.js +4 -21
- package/2x/es/components/search-bar/search-bar.d.ts +1 -1
- package/2x/es/components/tab-bar/tab-bar.d.ts +1 -1
- package/2x/es/components/tab-bar/tab-bar.js +1 -1
- package/2x/es/components/tree-select/tree-select.js +2 -2
- package/2x/es/utils/render-imperatively.d.ts +10 -0
- package/2x/es/utils/render-imperatively.js +53 -0
- package/2x/es/utils/with-cache.d.ts +1 -0
- package/2x/es/utils/with-cache.js +10 -0
- package/2x/package.json +2 -3
- package/cjs/components/action-sheet/action-sheet.d.ts +5 -5
- package/cjs/components/action-sheet/action-sheet.js +6 -46
- package/cjs/components/action-sheet/index.d.ts +1 -1
- package/cjs/components/badge/badge.js +1 -1
- package/cjs/components/calendar/calendar.d.ts +4 -3
- package/cjs/components/calendar/calendar.js +67 -56
- package/cjs/components/calendar/convert.d.ts +2 -0
- package/cjs/components/calendar/convert.js +22 -0
- package/cjs/components/cascader-view/cascader-view.js +7 -0
- package/cjs/components/checkbox/checkbox.js +4 -20
- package/cjs/components/checkbox/native-input.d.ts +10 -0
- package/cjs/components/checkbox/native-input.js +42 -0
- package/cjs/components/dialog/index.d.ts +1 -1
- package/cjs/components/dialog/show.d.ts +2 -4
- package/cjs/components/dialog/show.js +9 -47
- package/cjs/components/dot-loading/dot-loading.js +1 -2
- package/cjs/components/empty/empty-icon.d.ts +3 -0
- package/cjs/components/empty/empty-icon.js +37 -0
- package/cjs/components/empty/empty.js +27 -15
- package/cjs/components/error-block/error-block.css +1 -0
- package/cjs/components/error-block/error-block.js +5 -8
- package/cjs/components/error-block/images/busy.d.ts +1 -0
- package/cjs/components/error-block/images/busy.js +102 -0
- package/cjs/components/error-block/images/default.d.ts +1 -0
- package/cjs/components/error-block/images/default.js +178 -0
- package/cjs/components/error-block/images/disconnected.d.ts +1 -0
- package/cjs/components/error-block/images/disconnected.js +135 -0
- package/cjs/components/error-block/images/empty.d.ts +1 -0
- package/cjs/components/error-block/images/empty.js +131 -0
- package/cjs/components/error-block/images/index.d.ts +2 -0
- package/cjs/components/error-block/images/index.js +22 -0
- package/cjs/components/floating-bubble/floating-bubble.css +2 -1
- package/cjs/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/cjs/components/form/form-item.d.ts +1 -1
- package/cjs/components/form/form-item.js +4 -1
- package/cjs/components/image-viewer/index.d.ts +1 -1
- package/cjs/components/image-viewer/methods.d.ts +3 -7
- package/cjs/components/image-viewer/methods.js +13 -79
- package/cjs/components/modal/index.d.ts +1 -1
- package/cjs/components/modal/show.d.ts +2 -4
- package/cjs/components/modal/show.js +9 -47
- package/cjs/components/picker/picker.js +6 -9
- package/cjs/components/picker-view/columns-extend.d.ts +3 -0
- package/cjs/components/picker-view/columns-extend.js +45 -0
- package/cjs/components/picker-view/picker-view.d.ts +1 -0
- package/cjs/components/picker-view/picker-view.js +14 -16
- package/cjs/components/popover/popover.css +1 -0
- package/cjs/components/popover/popover.js +1 -0
- package/cjs/components/popover/temp-floating-ui.min.js +1 -430
- package/cjs/components/radio/radio.js +4 -20
- package/cjs/components/search-bar/search-bar.d.ts +1 -1
- package/cjs/components/tab-bar/tab-bar.d.ts +1 -1
- package/cjs/components/tab-bar/tab-bar.js +1 -1
- package/cjs/components/tree-select/tree-select.js +2 -2
- package/cjs/utils/render-imperatively.d.ts +10 -0
- package/cjs/utils/render-imperatively.js +68 -0
- package/cjs/utils/with-cache.d.ts +1 -0
- package/cjs/utils/with-cache.js +17 -0
- package/es/components/action-sheet/action-sheet.d.ts +5 -5
- package/es/components/action-sheet/action-sheet.js +5 -41
- package/es/components/action-sheet/index.d.ts +1 -1
- package/es/components/badge/badge.js +1 -1
- package/es/components/calendar/calendar.d.ts +4 -3
- package/es/components/calendar/calendar.js +67 -58
- package/es/components/calendar/convert.d.ts +2 -0
- package/es/components/calendar/convert.js +15 -0
- package/es/components/cascader-view/cascader-view.js +7 -0
- package/es/components/checkbox/checkbox.js +4 -21
- package/es/components/checkbox/native-input.d.ts +10 -0
- package/es/components/checkbox/native-input.js +28 -0
- package/es/components/dialog/index.d.ts +1 -1
- package/es/components/dialog/show.d.ts +2 -4
- package/es/components/dialog/show.js +8 -44
- package/es/components/dot-loading/dot-loading.js +1 -2
- package/es/components/empty/empty-icon.d.ts +3 -0
- package/es/components/empty/empty-icon.js +24 -0
- package/es/components/empty/empty.js +27 -14
- package/es/components/error-block/error-block.css +1 -0
- package/es/components/error-block/error-block.js +4 -6
- package/es/components/error-block/images/busy.d.ts +1 -0
- package/es/components/error-block/images/busy.js +90 -0
- package/es/components/error-block/images/default.d.ts +1 -0
- package/es/components/error-block/images/default.js +166 -0
- package/es/components/error-block/images/disconnected.d.ts +1 -0
- package/es/components/error-block/images/disconnected.js +123 -0
- package/es/components/error-block/images/empty.d.ts +1 -0
- package/es/components/error-block/images/empty.js +119 -0
- package/es/components/error-block/images/index.d.ts +2 -0
- package/es/components/error-block/images/index.js +10 -0
- package/es/components/floating-bubble/floating-bubble.css +2 -1
- package/es/components/floating-bubble/floating-bubble.d.ts +1 -1
- package/es/components/form/form-item.d.ts +1 -1
- package/es/components/form/form-item.js +4 -1
- package/es/components/image-viewer/index.d.ts +1 -1
- package/es/components/image-viewer/methods.d.ts +3 -7
- package/es/components/image-viewer/methods.js +12 -75
- package/es/components/modal/index.d.ts +1 -1
- package/es/components/modal/show.d.ts +2 -4
- package/es/components/modal/show.js +8 -44
- package/es/components/picker/picker.js +6 -8
- package/es/components/picker-view/columns-extend.d.ts +3 -0
- package/es/components/picker-view/columns-extend.js +34 -0
- package/es/components/picker-view/picker-view.d.ts +1 -0
- package/es/components/picker-view/picker-view.js +14 -15
- package/es/components/popover/popover.css +1 -0
- package/es/components/popover/popover.js +1 -0
- package/es/components/popover/temp-floating-ui.min.js +1 -430
- package/es/components/radio/radio.js +4 -21
- package/es/components/search-bar/search-bar.d.ts +1 -1
- package/es/components/tab-bar/tab-bar.d.ts +1 -1
- package/es/components/tab-bar/tab-bar.js +1 -1
- package/es/components/tree-select/tree-select.js +2 -2
- package/es/utils/render-imperatively.d.ts +10 -0
- package/es/utils/render-imperatively.js +53 -0
- package/es/utils/with-cache.d.ts +1 -0
- package/es/utils/with-cache.js +10 -0
- package/package.json +2 -3
- package/umd/antd-mobile.js +1 -1
- package/2x/assets/busy.svg +0 -42
- package/2x/assets/default.svg +0 -53
- package/2x/assets/disconnected.svg +0 -60
- package/2x/assets/empty-icon.svg +0 -18
- package/2x/assets/empty.svg +0 -52
- package/2x/cjs/assets/busy.svg +0 -42
- package/2x/cjs/assets/default.svg +0 -53
- package/2x/cjs/assets/disconnected.svg +0 -60
- package/2x/cjs/assets/empty-icon.svg +0 -18
- package/2x/cjs/assets/empty.svg +0 -52
- package/2x/cjs/components/error-block/error.d.ts +0 -1
- package/2x/cjs/components/error-block/error.js +0 -24
- package/2x/cjs/components/picker-view/use-columns.d.ts +0 -2
- package/2x/cjs/components/picker-view/use-columns.js +0 -18
- package/2x/cjs/components/picker-view/use-picker-value-extend.d.ts +0 -2
- package/2x/cjs/components/picker-view/use-picker-value-extend.js +0 -37
- package/2x/es/assets/busy.svg +0 -42
- package/2x/es/assets/default.svg +0 -53
- package/2x/es/assets/disconnected.svg +0 -60
- package/2x/es/assets/empty-icon.svg +0 -18
- package/2x/es/assets/empty.svg +0 -52
- package/2x/es/components/error-block/error.d.ts +0 -1
- package/2x/es/components/error-block/error.js +0 -10
- package/2x/es/components/picker-view/use-columns.d.ts +0 -2
- package/2x/es/components/picker-view/use-columns.js +0 -10
- package/2x/es/components/picker-view/use-picker-value-extend.d.ts +0 -2
- package/2x/es/components/picker-view/use-picker-value-extend.js +0 -26
- package/assets/busy.svg +0 -42
- package/assets/default.svg +0 -53
- package/assets/disconnected.svg +0 -60
- package/assets/empty-icon.svg +0 -18
- package/assets/empty.svg +0 -52
- package/cjs/assets/busy.svg +0 -42
- package/cjs/assets/default.svg +0 -53
- package/cjs/assets/disconnected.svg +0 -60
- package/cjs/assets/empty-icon.svg +0 -18
- package/cjs/assets/empty.svg +0 -52
- package/cjs/components/error-block/error.d.ts +0 -1
- package/cjs/components/error-block/error.js +0 -24
- package/cjs/components/picker-view/use-columns.d.ts +0 -2
- package/cjs/components/picker-view/use-columns.js +0 -18
- package/cjs/components/picker-view/use-picker-value-extend.d.ts +0 -2
- package/cjs/components/picker-view/use-picker-value-extend.js +0 -37
- package/es/assets/busy.svg +0 -42
- package/es/assets/default.svg +0 -53
- package/es/assets/disconnected.svg +0 -60
- package/es/assets/empty-icon.svg +0 -18
- package/es/assets/empty.svg +0 -52
- package/es/components/error-block/error.d.ts +0 -1
- package/es/components/error-block/error.js +0 -10
- package/es/components/picker-view/use-columns.d.ts +0 -2
- package/es/components/picker-view/use-columns.js +0 -10
- package/es/components/picker-view/use-picker-value-extend.d.ts +0 -2
- package/es/components/picker-view/use-picker-value-extend.js +0 -26
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.emptyImage = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const emptyImage = _react.default.createElement("svg", {
|
|
13
|
+
viewBox: '0 0 400 400',
|
|
14
|
+
xmlns: 'http://www.w3.org/2000/svg',
|
|
15
|
+
xmlnsXlink: 'http://www.w3.org/1999/xlink'
|
|
16
|
+
}, _react.default.createElement("defs", null, _react.default.createElement("linearGradient", {
|
|
17
|
+
x1: '50%',
|
|
18
|
+
y1: '-116.862%',
|
|
19
|
+
x2: '50%',
|
|
20
|
+
y2: '90.764%',
|
|
21
|
+
id: 'error-block-image-empty-a'
|
|
22
|
+
}, _react.default.createElement("stop", {
|
|
23
|
+
stopColor: '#72A7FD',
|
|
24
|
+
stopOpacity: 0.207,
|
|
25
|
+
offset: '0%'
|
|
26
|
+
}), _react.default.createElement("stop", {
|
|
27
|
+
stopColor: '#72A7FD',
|
|
28
|
+
stopOpacity: 0.115,
|
|
29
|
+
offset: '80.072%'
|
|
30
|
+
}), _react.default.createElement("stop", {
|
|
31
|
+
stopColor: '#72A7FD',
|
|
32
|
+
stopOpacity: 0,
|
|
33
|
+
offset: '100%'
|
|
34
|
+
})), _react.default.createElement("path", {
|
|
35
|
+
d: 'M146.183 18.461c31.705 23.336 33.349 71.85 4.93 96.614-.252.22 6.172 5.602 13.577 11.414l.686.537.69.54.695.54.348.27.698.54a341.27 341.27 0 0 0 8.806 6.596c1.114.802 4.643-.853 10.587-4.965l-.532 12.218a1.2 1.2 0 0 1-.481.91l-10.868 8.111c-1.405 1.048-3.32 1.185-4.854.072l-35.578-25.834c-33.414 17.333-79.913 15-109.804-7-33.444-24.616-33.444-75.95 0-100.563 33.443-24.615 87.657-24.615 121.1 0Zm-60.469 7.653C51.63 26.114 24 44.534 24 67.257S51.63 108.4 85.714 108.4s61.715-18.42 61.715-41.143c0-22.722-27.63-41.143-61.715-41.143Z',
|
|
36
|
+
id: 'error-block-image-empty-b'
|
|
37
|
+
})), _react.default.createElement("g", {
|
|
38
|
+
fill: 'none',
|
|
39
|
+
fillRule: 'evenodd'
|
|
40
|
+
}, _react.default.createElement("path", {
|
|
41
|
+
d: 'M157.964 244.661H0L3.806 100.13a4.572 4.572 0 0 1 4.353-4.446l.217-.006h45.588V68.2a4.572 4.572 0 0 1 4.356-4.567l.216-.005h65.498l2.554-58.689a4.571 4.571 0 0 1 4.779-4.367l.214.015 87.79 8.222a4.572 4.572 0 0 1 4.126 4.133l.015.212 3.146 69.652L301.634 64.9a4.571 4.571 0 0 1 5.628 4.231l.005.215v43.955l56.162.001v130.264h-56.163v.001h-82.383v-.004h-66.919v1.098ZM89.503 160.03h-9.968v8.436h9.968v-8.436Zm0-14.507h-9.968v8.435h9.968v-8.435Zm197.985-5.15h-9.967v8.432h9.967v-8.431Zm-197.985-8.806h-9.968v8.436h9.968v-8.436Zm197.985-5.153h-9.967v8.432h9.967v-8.432Zm0-14.503h-9.967v8.432h9.967v-8.432Zm-84.643-.777h-30.8v8.436h30.8v-8.436Zm84.643-13.186h-9.967v8.436h9.967v-8.436Zm-84.643-3.29h-30.8v8.436h30.8v-8.436Zm0-15.912h-30.8v8.436h30.8v-8.436Z',
|
|
42
|
+
transform: 'translate(18.286 50.286)',
|
|
43
|
+
fill: 'url(#error-block-image-empty-a)'
|
|
44
|
+
}), _react.default.createElement("g", {
|
|
45
|
+
transform: 'translate(108.571 189.886)'
|
|
46
|
+
}, _react.default.createElement("mask", {
|
|
47
|
+
id: 'error-block-image-empty-c',
|
|
48
|
+
fill: '#fff'
|
|
49
|
+
}, _react.default.createElement("use", {
|
|
50
|
+
xlinkHref: '#error-block-image-empty-b'
|
|
51
|
+
})), _react.default.createElement("use", {
|
|
52
|
+
fill: '#377EFF',
|
|
53
|
+
xlinkHref: '#error-block-image-empty-b'
|
|
54
|
+
}), _react.default.createElement("path", {
|
|
55
|
+
d: 'M131.429 134.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM128 133.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM120 128.971a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.142.125.006a1.143 1.143 0 1 1-.125-.006Zm11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-22.857 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm17.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285ZM136 125.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-13.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm18.857-2.286a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-37.143 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm13.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm18.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-28 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm17.715-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-4.571a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.428 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.143 1.142a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-9.143 0a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm30.286-3.429a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM124 109.543a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.858-1.142a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm-11.428-3.429a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM124 99.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM49.143 55.829a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-9.143-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-5.714 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm21.143-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM52 52.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm12-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-19.429-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm5.715 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm16-1.143.124.007a1.143 1.143 0 1 1-.124-.007Zm11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm17.143-1.142a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429-1.143a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-13.143 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm4.572-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM64 44.4a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-16-1.143.125.007a1.143 1.143 0 1 1-.125-.007Zm11.429 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-22.858 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm36.572 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM30.286 44.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM44 43.257a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm9.714-1.143a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM72 38.686a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-11.429 0a1.143 1.143 0 1 1 0 2.285 1.143 1.143 0 0 1 0-2.285Zm-28 1.143a.571.571 0 1 1 0 1.142.571.571 0 0 1 0-1.142Zm5.715-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM56 37.543a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-5.714 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-6.857 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM60.57 32.97a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-11.428 0a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286ZM44 34.114a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-8-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-9.143 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm30.286-3.428a1.143 1.143 0 1 1 0 2.286 1.143 1.143 0 0 1 0-2.286Zm-15.429 1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.715 0a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm5.714-4.572a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-22.857-1.143a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Zm-11.429-3.428a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143ZM41.714 20.4a.571.571 0 1 1 0 1.143.571.571 0 0 1 0-1.143Z',
|
|
56
|
+
fill: '#003CFF',
|
|
57
|
+
fillRule: 'nonzero',
|
|
58
|
+
mask: 'url(#error-block-image-empty-c)'
|
|
59
|
+
})), _react.default.createElement("path", {
|
|
60
|
+
d: 'M295.213 319.24c.744.546.745 1.433.002 1.98l-11.806 8.81c-1.069.799-3.326.474-4.853-.609l-35.622-25.241c-33.375 17.037-79.545 14.615-109.28-7.271-33.443-24.615-33.443-64.521 0-89.133 33.443-24.616 87.657-24.616 121.1 0 31.706 23.336 33.35 60.42 4.931 85.185-.543.473 35.528 26.278 35.528 26.278ZM148.06 220.015c-25.44 17.853-25.44 46.8 0 64.652 25.44 17.85 66.689 17.85 92.129 0 25.436-17.853 25.436-46.799 0-64.652-25.44-17.853-66.688-17.853-92.129 0Z',
|
|
61
|
+
fill: '#5D96FE'
|
|
62
|
+
}), _react.default.createElement("path", {
|
|
63
|
+
d: 'M123.514 233.021c2.185-5.241 5.67-9.735 10.453-13.482M264.967 271.54c-2.185 5.24-5.67 9.734-10.453 13.481',
|
|
64
|
+
stroke: '#FFF',
|
|
65
|
+
strokeWidth: 0.75,
|
|
66
|
+
strokeLinecap: 'round',
|
|
67
|
+
strokeLinejoin: 'round'
|
|
68
|
+
}), _react.default.createElement("path", {
|
|
69
|
+
d: 'M81.143 252.571c7.574 0 13.714 23.88 13.714 31.649 0 6.97-4.942 12.755-11.429 13.871v11.672c0 1.235-.767 2.237-1.713 2.237-.904 0-1.644-.912-1.71-2.07l-.005-.167v-11.526c-7.04-.595-12.571-6.644-12.571-14.017 0-7.024 5.02-27.222 11.581-31.027l.096-.053c.027-.016.055-.03.082-.045l.067-.035.066-.033.1-.05.094-.041a3.34 3.34 0 0 1 .224-.093l.11-.042.097-.032c.038-.013.077-.025.115-.036l.053-.016.053-.014a3.351 3.351 0 0 1 .23-.055l.085-.016a3.95 3.95 0 0 1 .441-.054l.11-.005.11-.002Z',
|
|
70
|
+
fill: '#FFCD6B',
|
|
71
|
+
fillRule: 'nonzero'
|
|
72
|
+
}), _react.default.createElement("g", {
|
|
73
|
+
transform: 'translate(283.429 177.143)',
|
|
74
|
+
fillRule: 'nonzero'
|
|
75
|
+
}, _react.default.createElement("path", {
|
|
76
|
+
d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.49 0-2.707-1.46-2.79-3.301l-.004-.2-.001-19.018C8.659 71.92.13 62.518.13 51.123.13 40.071 8.154 8.49 18.694 2.015l.054-.031a5.94 5.94 0 0 1 .214-.128l.088-.048c.213-.12.427-.228.642-.326l.135-.06.18-.075.135-.053a5.796 5.796 0 0 1 .464-.16 4.44 4.44 0 0 1 .33-.092l.124-.03a7.122 7.122 0 0 1 .31-.065l.018-.003a6.305 6.305 0 0 1 .756-.088l.165-.007.166-.002Z',
|
|
77
|
+
fill: '#FFCD6B'
|
|
78
|
+
}), _react.default.createElement("path", {
|
|
79
|
+
d: 'M22.475.847c12.34 0 22.345 37.935 22.345 50.276 0 11.395-8.53 20.798-19.552 22.172v19.019c0 1.932-1.25 3.5-2.792 3.5-1.543 0-2.794-1.566-2.794-3.5V73.295C8.659 71.921.13 62.518.13 51.123.13 38.783 10.134.847 22.475.847Z',
|
|
80
|
+
fill: '#FFCD6B'
|
|
81
|
+
}), _react.default.createElement("circle", {
|
|
82
|
+
fill: '#FFB400',
|
|
83
|
+
cx: 26.4,
|
|
84
|
+
cy: 56.869,
|
|
85
|
+
r: 1.45
|
|
86
|
+
}), _react.default.createElement("circle", {
|
|
87
|
+
fill: '#FFB400',
|
|
88
|
+
cx: 39.453,
|
|
89
|
+
cy: 58.319,
|
|
90
|
+
r: 1
|
|
91
|
+
}), _react.default.createElement("circle", {
|
|
92
|
+
fill: '#FFB400',
|
|
93
|
+
cx: 17.698,
|
|
94
|
+
cy: 63.637,
|
|
95
|
+
r: 2.417
|
|
96
|
+
}), _react.default.createElement("circle", {
|
|
97
|
+
fill: '#FFB400',
|
|
98
|
+
cx: 38.002,
|
|
99
|
+
cy: 51.068,
|
|
100
|
+
r: 2.417
|
|
101
|
+
}), _react.default.createElement("circle", {
|
|
102
|
+
fill: '#FFB400',
|
|
103
|
+
cx: 18.665,
|
|
104
|
+
cy: 17.228,
|
|
105
|
+
r: 2.417
|
|
106
|
+
}), _react.default.createElement("circle", {
|
|
107
|
+
fill: '#FFB400',
|
|
108
|
+
cx: 32.201,
|
|
109
|
+
cy: 13.36,
|
|
110
|
+
r: 2.417
|
|
111
|
+
}), _react.default.createElement("circle", {
|
|
112
|
+
fill: '#FFB400',
|
|
113
|
+
cx: 26.83,
|
|
114
|
+
cy: 20.666,
|
|
115
|
+
r: 1.45
|
|
116
|
+
}), _react.default.createElement("circle", {
|
|
117
|
+
fill: '#FFB400',
|
|
118
|
+
cx: 38.969,
|
|
119
|
+
cy: 31.731,
|
|
120
|
+
r: 2.417
|
|
121
|
+
}), _react.default.createElement("circle", {
|
|
122
|
+
fill: '#FFB400',
|
|
123
|
+
cx: 25.433,
|
|
124
|
+
cy: 29.797,
|
|
125
|
+
r: 1.45
|
|
126
|
+
}), _react.default.createElement("path", {
|
|
127
|
+
d: 'M34.197 53.033c0 9.825-6.934 18.017-16.172 19.987a22.44 22.44 0 0 0 4.45.448c12.34 0 22.344-10.004 22.344-22.345C44.82 38.783 34.815.847 22.475.847c8.947 14.03 11.722 40.891 11.722 52.186Z',
|
|
128
|
+
fill: '#FBBE47'
|
|
129
|
+
}))));
|
|
130
|
+
|
|
131
|
+
exports.emptyImage = emptyImage;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.imageRecord = void 0;
|
|
7
|
+
|
|
8
|
+
var _default = require("./default");
|
|
9
|
+
|
|
10
|
+
var _disconnected = require("./disconnected");
|
|
11
|
+
|
|
12
|
+
var _empty = require("./empty");
|
|
13
|
+
|
|
14
|
+
var _busy = require("./busy");
|
|
15
|
+
|
|
16
|
+
const imageRecord = {
|
|
17
|
+
'default': _default.defaultImage,
|
|
18
|
+
'disconnected': _disconnected.disconnectedImage,
|
|
19
|
+
'empty': _empty.emptyImage,
|
|
20
|
+
'busy': _busy.busyImage
|
|
21
|
+
};
|
|
22
|
+
exports.imageRecord = imageRecord;
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
--edge-distance: 0;
|
|
8
8
|
--size: 96px;
|
|
9
9
|
--border-radius: 50%;
|
|
10
|
+
--background: var(--adm-color-primary);
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
.adm-floating-bubble-boundary-outer {
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
transition: opacity ease 0.15s;
|
|
44
45
|
user-select: none;
|
|
45
46
|
touch-action: none;
|
|
46
|
-
background: var(--
|
|
47
|
+
background: var(--background);
|
|
47
48
|
color: var(--adm-color-white);
|
|
48
49
|
border-radius: var(--border-radius);
|
|
49
50
|
z-index: var(--z-index);
|
|
@@ -4,5 +4,5 @@ export declare type FloatingBubbleProps = {
|
|
|
4
4
|
onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;
|
|
5
5
|
axis?: 'x' | 'y' | 'xy' | 'lock';
|
|
6
6
|
magnetic?: 'x' | 'y';
|
|
7
|
-
} & NativeProps<'--initial-position-left' | '--initial-position-right' | '--initial-position-top' | '--initial-position-bottom' | '--z-index' | '--edge-distance' | '--size' | '--border-radius'>;
|
|
7
|
+
} & NativeProps<'--initial-position-left' | '--initial-position-right' | '--initial-position-top' | '--initial-position-bottom' | '--z-index' | '--edge-distance' | '--size' | '--border-radius' | '--background'>;
|
|
8
8
|
export declare const FloatingBubble: FC<FloatingBubbleProps>;
|
|
@@ -7,7 +7,7 @@ import type { FormLayout } from './index';
|
|
|
7
7
|
declare type RenderChildren<Values = any> = (form: FormInstance<Values>) => React.ReactNode;
|
|
8
8
|
declare type ChildrenType<Values = any> = RenderChildren<Values> | React.ReactNode;
|
|
9
9
|
declare type RcFieldProps = Omit<FieldProps, 'children'>;
|
|
10
|
-
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'arrow' | 'description'> & {
|
|
10
|
+
export declare type FormItemProps = Pick<RcFieldProps, 'dependencies' | 'valuePropName' | 'name' | 'rules' | 'messageVariables' | 'trigger' | 'validateTrigger' | 'shouldUpdate' | 'initialValue'> & Pick<ListItemProps, 'style' | 'onClick' | 'extra' | 'clickable' | 'arrow' | 'description'> & {
|
|
11
11
|
label?: React.ReactNode;
|
|
12
12
|
help?: React.ReactNode;
|
|
13
13
|
hasFeedback?: boolean;
|
|
@@ -120,6 +120,7 @@ const FormItemLayout = props => {
|
|
|
120
120
|
}),
|
|
121
121
|
disabled: disabled,
|
|
122
122
|
onClick: props.onClick,
|
|
123
|
+
clickable: props.clickable,
|
|
123
124
|
arrow: arrow
|
|
124
125
|
}, _react.default.createElement("div", {
|
|
125
126
|
className: (0, _classnames.default)(`${classPrefix}-child`, `${classPrefix}-child-position-${childElementPosition}`)
|
|
@@ -155,9 +156,10 @@ const FormItem = props => {
|
|
|
155
156
|
onClick,
|
|
156
157
|
shouldUpdate,
|
|
157
158
|
dependencies,
|
|
159
|
+
clickable,
|
|
158
160
|
arrow
|
|
159
161
|
} = props,
|
|
160
|
-
fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "arrow"]);
|
|
162
|
+
fieldProps = (0, _tslib.__rest)(props, ["className", "style", "label", "help", "extra", "hasFeedback", "name", "required", "noStyle", "hidden", "layout", "childElementPosition", "description", "disabled", "rules", "children", "messageVariables", "trigger", "validateTrigger", "onClick", "shouldUpdate", "dependencies", "clickable", "arrow"]);
|
|
161
163
|
|
|
162
164
|
const {
|
|
163
165
|
validateTrigger: contextValidateTrigger
|
|
@@ -232,6 +234,7 @@ const FormItem = props => {
|
|
|
232
234
|
hidden: hidden,
|
|
233
235
|
layout: layout,
|
|
234
236
|
childElementPosition: childElementPosition,
|
|
237
|
+
clickable: clickable,
|
|
235
238
|
arrow: arrow
|
|
236
239
|
}, _react.default.createElement(_context.NoStyleItemContext.Provider, {
|
|
237
240
|
value: onSubMetaChange
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import './image-viewer.less';
|
|
3
3
|
import { showMultiImageViewer, showImageViewer, clearImageViewer } from './methods';
|
|
4
4
|
export type { ImageViewerProps, MultiImageViewerProps, MultiImageViewerRef, } from './image-viewer';
|
|
5
|
-
export type {
|
|
5
|
+
export type { ImageViewerShowHandler } from './methods';
|
|
6
6
|
declare const _default: import("react").FC<import("./image-viewer").ImageViewerProps> & {
|
|
7
7
|
Multi: import("react").ForwardRefExoticComponent<Omit<import("./image-viewer").ImageViewerProps, "image"> & {
|
|
8
8
|
images?: string[] | undefined;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
1
|
import { ImageViewerProps, MultiImageViewerProps } from './image-viewer';
|
|
2
|
-
export declare type
|
|
3
|
-
close: () => void;
|
|
4
|
-
};
|
|
5
|
-
export declare function showImageViewer(props: Omit<ImageViewerProps, 'visible'>): {
|
|
6
|
-
close: () => void;
|
|
7
|
-
};
|
|
8
|
-
export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): {
|
|
2
|
+
export declare type ImageViewerShowHandler = {
|
|
9
3
|
close: () => void;
|
|
10
4
|
};
|
|
5
|
+
export declare function showImageViewer(props: Omit<ImageViewerProps, 'visible'>): ImageViewerShowHandler;
|
|
6
|
+
export declare function showMultiImageViewer(props: Omit<MultiImageViewerProps, 'visible'>): ImageViewerShowHandler;
|
|
11
7
|
export declare function clearImageViewer(): void;
|
|
@@ -7,106 +7,40 @@ exports.clearImageViewer = clearImageViewer;
|
|
|
7
7
|
exports.showImageViewer = showImageViewer;
|
|
8
8
|
exports.showMultiImageViewer = showMultiImageViewer;
|
|
9
9
|
|
|
10
|
-
var _react =
|
|
11
|
-
|
|
12
|
-
var _renderToBody = require("../../utils/render-to-body");
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
11
|
|
|
14
12
|
var _imageViewer = require("./image-viewer");
|
|
15
13
|
|
|
16
|
-
var
|
|
17
|
-
|
|
18
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
var _renderImperatively = require("../../utils/render-imperatively");
|
|
19
15
|
|
|
20
|
-
function
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
17
|
|
|
22
18
|
const handlerSet = new Set();
|
|
23
19
|
|
|
24
20
|
function showImageViewer(props) {
|
|
25
21
|
clearImageViewer();
|
|
26
|
-
const
|
|
27
|
-
|
|
28
|
-
(0, _react.useEffect)(() => {
|
|
29
|
-
setVisible(true);
|
|
30
|
-
}, []);
|
|
31
|
-
const isUnmountedRef = (0, _ahooks.useUnmountedRef)();
|
|
32
|
-
(0, _react.useImperativeHandle)(ref, () => ({
|
|
33
|
-
close: () => {
|
|
34
|
-
if (isUnmountedRef.current) return;
|
|
35
|
-
setVisible(false);
|
|
36
|
-
}
|
|
37
|
-
}));
|
|
38
|
-
return _react.default.createElement(_imageViewer.ImageViewer, Object.assign({}, props, {
|
|
39
|
-
visible: visible,
|
|
40
|
-
onClose: () => {
|
|
41
|
-
var _a;
|
|
42
|
-
|
|
43
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
44
|
-
setVisible(false);
|
|
45
|
-
},
|
|
46
|
-
afterClose: () => {
|
|
47
|
-
var _a;
|
|
48
|
-
|
|
49
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
50
|
-
unmount();
|
|
51
|
-
}
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
const ref = (0, _react.createRef)();
|
|
55
|
-
const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
|
|
56
|
-
ref: ref
|
|
57
|
-
}));
|
|
58
|
-
const handler = {
|
|
59
|
-
close: () => {
|
|
22
|
+
const handler = (0, _renderImperatively.renderImperatively)(_react.default.createElement(_imageViewer.ImageViewer, Object.assign({}, props, {
|
|
23
|
+
afterClose: () => {
|
|
60
24
|
var _a;
|
|
61
25
|
|
|
62
|
-
|
|
26
|
+
handlerSet.delete(handler);
|
|
27
|
+
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
63
28
|
}
|
|
64
|
-
};
|
|
29
|
+
})));
|
|
65
30
|
handlerSet.add(handler);
|
|
66
31
|
return handler;
|
|
67
32
|
}
|
|
68
33
|
|
|
69
34
|
function showMultiImageViewer(props) {
|
|
70
35
|
clearImageViewer();
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
(0, _react.useEffect)(() => {
|
|
74
|
-
setVisible(true);
|
|
75
|
-
}, []);
|
|
76
|
-
const isUnmountedRef = (0, _ahooks.useUnmountedRef)();
|
|
77
|
-
(0, _react.useImperativeHandle)(ref, () => ({
|
|
78
|
-
close: () => {
|
|
79
|
-
if (isUnmountedRef.current) return;
|
|
80
|
-
setVisible(false);
|
|
81
|
-
}
|
|
82
|
-
}));
|
|
83
|
-
return _react.default.createElement(_imageViewer.MultiImageViewer, Object.assign({}, props, {
|
|
84
|
-
visible: visible,
|
|
85
|
-
onClose: () => {
|
|
86
|
-
var _a;
|
|
87
|
-
|
|
88
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
89
|
-
setVisible(false);
|
|
90
|
-
},
|
|
91
|
-
afterClose: () => {
|
|
92
|
-
var _a;
|
|
93
|
-
|
|
94
|
-
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
95
|
-
unmount();
|
|
96
|
-
}
|
|
97
|
-
}));
|
|
98
|
-
});
|
|
99
|
-
const ref = (0, _react.createRef)();
|
|
100
|
-
const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
|
|
101
|
-
ref: ref
|
|
102
|
-
}));
|
|
103
|
-
const handler = {
|
|
104
|
-
close: () => {
|
|
36
|
+
const handler = (0, _renderImperatively.renderImperatively)(_react.default.createElement(_imageViewer.MultiImageViewer, Object.assign({}, props, {
|
|
37
|
+
afterClose: () => {
|
|
105
38
|
var _a;
|
|
106
39
|
|
|
107
|
-
|
|
40
|
+
handlerSet.delete(handler);
|
|
41
|
+
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
108
42
|
}
|
|
109
|
-
};
|
|
43
|
+
})));
|
|
110
44
|
handlerSet.add(handler);
|
|
111
45
|
return handler;
|
|
112
46
|
}
|
|
@@ -6,7 +6,7 @@ import { confirm } from './confirm';
|
|
|
6
6
|
import { clear } from './clear';
|
|
7
7
|
export type { ModalProps } from './modal';
|
|
8
8
|
export type { Action } from './modal-action-button';
|
|
9
|
-
export type { ModalShowProps,
|
|
9
|
+
export type { ModalShowProps, ModalShowHandler } from './show';
|
|
10
10
|
export type { ModalAlertProps } from './alert';
|
|
11
11
|
export type { ModalConfirmProps } from './confirm';
|
|
12
12
|
declare const _default: import("react").FC<import("./modal").ModalProps> & {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ModalProps } from './modal';
|
|
2
2
|
export declare type ModalShowProps = Omit<ModalProps, 'visible'>;
|
|
3
|
-
export declare type
|
|
3
|
+
export declare type ModalShowHandler = {
|
|
4
4
|
close: () => void;
|
|
5
5
|
};
|
|
6
6
|
export declare const closeFnSet: Set<() => void>;
|
|
7
|
-
export declare function show(props: ModalShowProps):
|
|
8
|
-
close: () => void;
|
|
9
|
-
};
|
|
7
|
+
export declare function show(props: ModalShowProps): ModalShowHandler;
|
|
@@ -6,64 +6,26 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.closeFnSet = void 0;
|
|
7
7
|
exports.show = show;
|
|
8
8
|
|
|
9
|
-
var _react =
|
|
10
|
-
|
|
11
|
-
var _renderToBody = require("../../utils/render-to-body");
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
12
10
|
|
|
13
11
|
var _modal = require("./modal");
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
var _renderImperatively = require("../../utils/render-imperatively");
|
|
16
14
|
|
|
17
|
-
function
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
16
|
|
|
19
17
|
const closeFnSet = new Set();
|
|
20
18
|
exports.closeFnSet = closeFnSet;
|
|
21
19
|
|
|
22
20
|
function show(props) {
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
(0, _react.useEffect)(() => {
|
|
26
|
-
setVisible(true);
|
|
27
|
-
}, []);
|
|
28
|
-
|
|
29
|
-
function handleClose() {
|
|
30
|
-
var _a;
|
|
31
|
-
|
|
32
|
-
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
33
|
-
setVisible(false);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
(0, _react.useImperativeHandle)(ref, () => ({
|
|
37
|
-
close: handleClose
|
|
38
|
-
}));
|
|
39
|
-
|
|
40
|
-
function handleAfterClose() {
|
|
21
|
+
const handler = (0, _renderImperatively.renderImperatively)(_react.default.createElement(_modal.Modal, Object.assign({}, props, {
|
|
22
|
+
afterClose: () => {
|
|
41
23
|
var _a;
|
|
42
24
|
|
|
25
|
+
closeFnSet.delete(handler.close);
|
|
43
26
|
(_a = props.afterClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
44
|
-
unmount();
|
|
45
|
-
closeFnSet.delete(close);
|
|
46
27
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onClose: handleClose,
|
|
51
|
-
afterClose: handleAfterClose
|
|
52
|
-
}));
|
|
53
|
-
});
|
|
54
|
-
const ref = (0, _react.createRef)();
|
|
55
|
-
const unmount = (0, _renderToBody.renderToBody)(_react.default.createElement(Wrapper, {
|
|
56
|
-
ref: ref
|
|
57
|
-
}));
|
|
58
|
-
|
|
59
|
-
const close = () => {
|
|
60
|
-
var _a;
|
|
61
|
-
|
|
62
|
-
(_a = ref.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
closeFnSet.add(close);
|
|
66
|
-
return {
|
|
67
|
-
close
|
|
68
|
-
};
|
|
28
|
+
})));
|
|
29
|
+
closeFnSet.add(handler.close);
|
|
30
|
+
return handler;
|
|
69
31
|
}
|
|
@@ -17,12 +17,10 @@ var _usePropsValue = require("../../utils/use-props-value");
|
|
|
17
17
|
|
|
18
18
|
var _pickerView = _interopRequireDefault(require("../picker-view"));
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
var _columnsExtend = require("../picker-view/columns-extend");
|
|
21
21
|
|
|
22
22
|
var _configProvider = require("../config-provider");
|
|
23
23
|
|
|
24
|
-
var _usePickerValueExtend = require("../picker-view/use-picker-value-extend");
|
|
25
|
-
|
|
26
24
|
var _ahooks = require("ahooks");
|
|
27
25
|
|
|
28
26
|
var _safeArea = _interopRequireDefault(require("../safe-area"));
|
|
@@ -52,12 +50,11 @@ const Picker = (0, _react.memo)(p => {
|
|
|
52
50
|
onChange: val => {
|
|
53
51
|
var _a;
|
|
54
52
|
|
|
55
|
-
|
|
53
|
+
const extend = (0, _columnsExtend.generateColumnsExtend)(props.columns, val);
|
|
54
|
+
(_a = props.onConfirm) === null || _a === void 0 ? void 0 : _a.call(props, val, extend);
|
|
56
55
|
}
|
|
57
|
-
}));
|
|
58
|
-
|
|
59
|
-
const columns = (0, _useColumns.useColumns)(props.columns, value);
|
|
60
|
-
const generateValueExtend = (0, _usePickerValueExtend.usePickerValueExtend)(columns);
|
|
56
|
+
}));
|
|
57
|
+
const extend = (0, _columnsExtend.useColumnsExtend)(props.columns, value);
|
|
61
58
|
const [innerValue, setInnerValue] = (0, _react.useState)(value);
|
|
62
59
|
(0, _react.useEffect)(() => {
|
|
63
60
|
if (innerValue !== value) {
|
|
@@ -130,7 +127,7 @@ const Picker = (0, _react.memo)(p => {
|
|
|
130
127
|
position: 'bottom'
|
|
131
128
|
}));
|
|
132
129
|
|
|
133
|
-
return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props,
|
|
130
|
+
return _react.default.createElement(_react.default.Fragment, null, popupElement, (_a = props.children) === null || _a === void 0 ? void 0 : _a.call(props, extend.items));
|
|
134
131
|
});
|
|
135
132
|
exports.Picker = Picker;
|
|
136
133
|
Picker.displayName = 'Picker';
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { PickerViewProps, PickerValue, PickerValueExtend } from './picker-view';
|
|
2
|
+
export declare function generateColumnsExtend(rawColumns: PickerViewProps['columns'], val: PickerValue[]): PickerValueExtend;
|
|
3
|
+
export declare function useColumnsExtend(rawColumns: PickerViewProps['columns'], value: PickerValue[]): PickerValueExtend;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.generateColumnsExtend = generateColumnsExtend;
|
|
7
|
+
exports.useColumnsExtend = useColumnsExtend;
|
|
8
|
+
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
|
|
11
|
+
var _withCache = require("../../utils/with-cache");
|
|
12
|
+
|
|
13
|
+
function generateColumnsExtend(rawColumns, val) {
|
|
14
|
+
const columns = (0, _withCache.withCache)(() => {
|
|
15
|
+
const c = typeof rawColumns === 'function' ? rawColumns(val) : rawColumns;
|
|
16
|
+
return c.map(column => column.map(item => typeof item === 'string' ? {
|
|
17
|
+
label: item,
|
|
18
|
+
value: item
|
|
19
|
+
} : item));
|
|
20
|
+
});
|
|
21
|
+
const items = (0, _withCache.withCache)(() => {
|
|
22
|
+
return val.map((v, index) => {
|
|
23
|
+
var _a;
|
|
24
|
+
|
|
25
|
+
const column = columns()[index];
|
|
26
|
+
if (!column) return null;
|
|
27
|
+
return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
|
|
28
|
+
});
|
|
29
|
+
});
|
|
30
|
+
const extend = {
|
|
31
|
+
get columns() {
|
|
32
|
+
return columns();
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
get items() {
|
|
36
|
+
return items();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
};
|
|
40
|
+
return extend;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function useColumnsExtend(rawColumns, value) {
|
|
44
|
+
return (0, _react.useMemo)(() => generateColumnsExtend(rawColumns, value), [rawColumns, value]);
|
|
45
|
+
}
|
|
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
export declare type PickerValue = string | null;
|
|
4
4
|
export declare type PickerValueExtend = {
|
|
5
|
+
columns: PickerColumnItem[][];
|
|
5
6
|
items: (PickerColumnItem | null)[];
|
|
6
7
|
};
|
|
7
8
|
export declare type PickerColumnItem = {
|
|
@@ -11,12 +11,10 @@ var _withDefaultProps = require("../../utils/with-default-props");
|
|
|
11
11
|
|
|
12
12
|
var _wheel = require("./wheel");
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _columnsExtend = require("./columns-extend");
|
|
15
15
|
|
|
16
16
|
var _nativeProps = require("../../utils/native-props");
|
|
17
17
|
|
|
18
|
-
var _usePickerValueExtend = require("./use-picker-value-extend");
|
|
19
|
-
|
|
20
18
|
var _ahooks = require("ahooks");
|
|
21
19
|
|
|
22
20
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -29,17 +27,7 @@ const defaultProps = {
|
|
|
29
27
|
};
|
|
30
28
|
const PickerView = (0, _react.memo)(p => {
|
|
31
29
|
const props = (0, _withDefaultProps.mergeProps)(defaultProps, p);
|
|
32
|
-
const [innerValue, setInnerValue] = (0, _react.useState)(props.value === undefined ? props.defaultValue : props.value);
|
|
33
|
-
(0, _ahooks.useDebounceEffect)(() => {
|
|
34
|
-
var _a;
|
|
35
|
-
|
|
36
|
-
if (props.value === innerValue) return;
|
|
37
|
-
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, generateValueExtend(innerValue));
|
|
38
|
-
}, [innerValue], {
|
|
39
|
-
wait: 0,
|
|
40
|
-
leading: false,
|
|
41
|
-
trailing: true
|
|
42
|
-
}); // Sync `value` to `innerValue`
|
|
30
|
+
const [innerValue, setInnerValue] = (0, _react.useState)(props.value === undefined ? props.defaultValue : props.value); // Sync `value` to `innerValue`
|
|
43
31
|
|
|
44
32
|
(0, _react.useEffect)(() => {
|
|
45
33
|
if (props.value === undefined) return; // Uncontrolled mode
|
|
@@ -58,8 +46,18 @@ const PickerView = (0, _react.memo)(p => {
|
|
|
58
46
|
window.clearTimeout(timeout);
|
|
59
47
|
};
|
|
60
48
|
}, [props.value, innerValue]);
|
|
61
|
-
const
|
|
62
|
-
const
|
|
49
|
+
const extend = (0, _columnsExtend.useColumnsExtend)(props.columns, innerValue);
|
|
50
|
+
const columns = extend.columns;
|
|
51
|
+
(0, _ahooks.useDebounceEffect)(() => {
|
|
52
|
+
var _a;
|
|
53
|
+
|
|
54
|
+
if (props.value === innerValue) return;
|
|
55
|
+
(_a = props.onChange) === null || _a === void 0 ? void 0 : _a.call(props, innerValue, extend);
|
|
56
|
+
}, [innerValue], {
|
|
57
|
+
wait: 0,
|
|
58
|
+
leading: false,
|
|
59
|
+
trailing: true
|
|
60
|
+
});
|
|
63
61
|
const handleSelect = (0, _react.useCallback)((val, index) => {
|
|
64
62
|
setInnerValue(prev => {
|
|
65
63
|
const next = [...prev];
|