antd-mobile 5.6.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/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/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/utils/with-cache.d.ts +1 -0
- package/2x/cjs/utils/with-cache.js +17 -0
- 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/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/utils/with-cache.d.ts +1 -0
- package/2x/es/utils/with-cache.js +10 -0
- package/2x/package.json +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/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/utils/with-cache.d.ts +1 -0
- package/cjs/utils/with-cache.js +17 -0
- 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/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/utils/with-cache.d.ts +1 -0
- package/es/utils/with-cache.js +10 -0
- package/package.json +1 -1
- package/umd/antd-mobile.js +1 -1
- 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/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/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/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
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useColumns = useColumns;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
function useColumns(rawColumns, value) {
|
|
11
|
-
return (0, _react.useMemo)(() => {
|
|
12
|
-
const columns = typeof rawColumns === 'function' ? rawColumns(value) : rawColumns;
|
|
13
|
-
return columns.map(column => column.map(item => typeof item === 'string' ? {
|
|
14
|
-
label: item,
|
|
15
|
-
value: item
|
|
16
|
-
} : item));
|
|
17
|
-
}, [rawColumns, value]);
|
|
18
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.usePickerValueExtend = usePickerValueExtend;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function usePickerValueExtend(columns) {
|
|
15
|
-
const generateItems = (0, _react.useMemo)(() => {
|
|
16
|
-
return (0, _memoize.default)(val => {
|
|
17
|
-
return val.map((v, index) => {
|
|
18
|
-
var _a;
|
|
19
|
-
|
|
20
|
-
const column = columns[index];
|
|
21
|
-
if (!column) return null;
|
|
22
|
-
return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
|
|
23
|
-
});
|
|
24
|
-
}, val => JSON.stringify(val));
|
|
25
|
-
}, [columns]);
|
|
26
|
-
|
|
27
|
-
function generateValueExtend(val) {
|
|
28
|
-
return {
|
|
29
|
-
get items() {
|
|
30
|
-
return generateItems(val);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return generateValueExtend;
|
|
37
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export function useColumns(rawColumns, value) {
|
|
3
|
-
return useMemo(() => {
|
|
4
|
-
const columns = typeof rawColumns === 'function' ? rawColumns(value) : rawColumns;
|
|
5
|
-
return columns.map(column => column.map(item => typeof item === 'string' ? {
|
|
6
|
-
label: item,
|
|
7
|
-
value: item
|
|
8
|
-
} : item));
|
|
9
|
-
}, [rawColumns, value]);
|
|
10
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import memoize from 'lodash/memoize';
|
|
3
|
-
export function usePickerValueExtend(columns) {
|
|
4
|
-
const generateItems = useMemo(() => {
|
|
5
|
-
return memoize(val => {
|
|
6
|
-
return val.map((v, index) => {
|
|
7
|
-
var _a;
|
|
8
|
-
|
|
9
|
-
const column = columns[index];
|
|
10
|
-
if (!column) return null;
|
|
11
|
-
return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
|
|
12
|
-
});
|
|
13
|
-
}, val => JSON.stringify(val));
|
|
14
|
-
}, [columns]);
|
|
15
|
-
|
|
16
|
-
function generateValueExtend(val) {
|
|
17
|
-
return {
|
|
18
|
-
get items() {
|
|
19
|
-
return generateItems(val);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return generateValueExtend;
|
|
26
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.useColumns = useColumns;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
function useColumns(rawColumns, value) {
|
|
11
|
-
return (0, _react.useMemo)(() => {
|
|
12
|
-
const columns = typeof rawColumns === 'function' ? rawColumns(value) : rawColumns;
|
|
13
|
-
return columns.map(column => column.map(item => typeof item === 'string' ? {
|
|
14
|
-
label: item,
|
|
15
|
-
value: item
|
|
16
|
-
} : item));
|
|
17
|
-
}, [rawColumns, value]);
|
|
18
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.usePickerValueExtend = usePickerValueExtend;
|
|
7
|
-
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
|
|
10
|
-
var _memoize = _interopRequireDefault(require("lodash/memoize"));
|
|
11
|
-
|
|
12
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
-
|
|
14
|
-
function usePickerValueExtend(columns) {
|
|
15
|
-
const generateItems = (0, _react.useMemo)(() => {
|
|
16
|
-
return (0, _memoize.default)(val => {
|
|
17
|
-
return val.map((v, index) => {
|
|
18
|
-
var _a;
|
|
19
|
-
|
|
20
|
-
const column = columns[index];
|
|
21
|
-
if (!column) return null;
|
|
22
|
-
return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
|
|
23
|
-
});
|
|
24
|
-
}, val => JSON.stringify(val));
|
|
25
|
-
}, [columns]);
|
|
26
|
-
|
|
27
|
-
function generateValueExtend(val) {
|
|
28
|
-
return {
|
|
29
|
-
get items() {
|
|
30
|
-
return generateItems(val);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return generateValueExtend;
|
|
37
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
export function useColumns(rawColumns, value) {
|
|
3
|
-
return useMemo(() => {
|
|
4
|
-
const columns = typeof rawColumns === 'function' ? rawColumns(value) : rawColumns;
|
|
5
|
-
return columns.map(column => column.map(item => typeof item === 'string' ? {
|
|
6
|
-
label: item,
|
|
7
|
-
value: item
|
|
8
|
-
} : item));
|
|
9
|
-
}, [rawColumns, value]);
|
|
10
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { useMemo } from 'react';
|
|
2
|
-
import memoize from 'lodash/memoize';
|
|
3
|
-
export function usePickerValueExtend(columns) {
|
|
4
|
-
const generateItems = useMemo(() => {
|
|
5
|
-
return memoize(val => {
|
|
6
|
-
return val.map((v, index) => {
|
|
7
|
-
var _a;
|
|
8
|
-
|
|
9
|
-
const column = columns[index];
|
|
10
|
-
if (!column) return null;
|
|
11
|
-
return (_a = column.find(item => item.value === v)) !== null && _a !== void 0 ? _a : null;
|
|
12
|
-
});
|
|
13
|
-
}, val => JSON.stringify(val));
|
|
14
|
-
}, [columns]);
|
|
15
|
-
|
|
16
|
-
function generateValueExtend(val) {
|
|
17
|
-
return {
|
|
18
|
-
get items() {
|
|
19
|
-
return generateItems(val);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
return generateValueExtend;
|
|
26
|
-
}
|