antd-mobile 5.29.0 → 5.30.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 +3752 -3725
- package/2x/bundle/antd-mobile.cjs.js +9 -9
- package/2x/bundle/antd-mobile.es.development.js +3740 -3713
- package/2x/bundle/antd-mobile.es.js +6805 -6784
- package/2x/bundle/antd-mobile.umd.development.js +3752 -3725
- package/2x/bundle/antd-mobile.umd.js +9 -9
- package/2x/bundle/style.css +4 -2
- package/2x/cjs/components/calendar/calendar.js +1 -1
- package/2x/cjs/components/collapse/collapse.js +3 -1
- package/2x/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/2x/cjs/components/date-picker/date-picker-utils.d.ts +1 -1
- package/2x/cjs/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/2x/cjs/components/dropdown/dropdown.d.ts +3 -0
- package/2x/cjs/components/dropdown/dropdown.js +4 -1
- package/2x/cjs/components/dropdown/index.d.ts +1 -0
- package/2x/cjs/components/ellipsis/ellipsis.js +1 -1
- package/2x/cjs/components/footer/footer.css +1 -1
- package/2x/cjs/components/form/form-subscribe.js +4 -1
- package/2x/cjs/components/form/form.js +1 -1
- package/2x/cjs/components/form/index.d.ts +1 -1
- package/2x/cjs/components/image/image.js +9 -0
- package/2x/cjs/components/image-uploader/image-uploader.js +4 -5
- package/2x/cjs/components/number-keyboard/number-keyboard.js +5 -3
- package/2x/cjs/components/page-indicator/page-indicator.css +1 -1
- package/2x/cjs/components/picker-view/picker-view.d.ts +2 -2
- package/2x/cjs/components/popup/popup.js +16 -3
- package/2x/cjs/components/search-bar/search-bar.d.ts +2 -2
- package/2x/cjs/components/search-bar/search-bar.js +6 -2
- package/2x/cjs/components/steps/steps.css +2 -0
- package/2x/cjs/components/swiper/swiper.js +7 -5
- package/2x/cjs/components/text-area/text-area.js +6 -3
- package/2x/cjs/components/virtual-input/virtual-input.js +1 -2
- package/2x/cjs/locales/da-DK.d.ts +134 -0
- package/2x/cjs/locales/da-DK.js +132 -0
- package/2x/cjs/locales/it-IT.d.ts +134 -0
- package/2x/cjs/locales/it-IT.js +144 -0
- package/2x/cjs/locales/nb-NO.d.ts +134 -0
- package/2x/cjs/locales/nb-NO.js +144 -0
- package/2x/cjs/locales/nl-NL.d.ts +134 -0
- package/2x/cjs/locales/nl-NL.js +144 -0
- package/2x/es/components/calendar/calendar.js +1 -1
- package/2x/es/components/collapse/collapse.js +3 -1
- package/2x/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/2x/es/components/date-picker/date-picker-utils.d.ts +1 -1
- package/2x/es/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/2x/es/components/dropdown/dropdown.d.ts +3 -0
- package/2x/es/components/dropdown/dropdown.js +4 -1
- package/2x/es/components/dropdown/index.d.ts +1 -0
- package/2x/es/components/ellipsis/ellipsis.js +1 -1
- package/2x/es/components/footer/footer.css +1 -1
- package/2x/es/components/form/form-subscribe.js +4 -1
- package/2x/es/components/form/form.js +1 -1
- package/2x/es/components/form/index.d.ts +1 -1
- package/2x/es/components/image/image.js +10 -1
- package/2x/es/components/image-uploader/image-uploader.js +4 -5
- package/2x/es/components/number-keyboard/number-keyboard.js +5 -3
- package/2x/es/components/page-indicator/page-indicator.css +1 -1
- package/2x/es/components/picker-view/picker-view.d.ts +2 -2
- package/2x/es/components/popup/popup.js +16 -3
- package/2x/es/components/search-bar/search-bar.d.ts +2 -2
- package/2x/es/components/search-bar/search-bar.js +6 -2
- package/2x/es/components/steps/steps.css +2 -0
- package/2x/es/components/swiper/swiper.js +8 -6
- package/2x/es/components/text-area/text-area.js +5 -3
- package/2x/es/components/virtual-input/virtual-input.js +1 -2
- package/2x/es/locales/da-DK.d.ts +134 -0
- package/2x/es/locales/da-DK.js +125 -0
- package/2x/es/locales/it-IT.d.ts +134 -0
- package/2x/es/locales/it-IT.js +137 -0
- package/2x/es/locales/nb-NO.d.ts +134 -0
- package/2x/es/locales/nb-NO.js +137 -0
- package/2x/es/locales/nl-NL.d.ts +134 -0
- package/2x/es/locales/nl-NL.js +137 -0
- package/2x/package.json +9 -9
- package/bundle/antd-mobile.cjs.development.js +3752 -3725
- package/bundle/antd-mobile.cjs.js +9 -9
- package/bundle/antd-mobile.compatible.umd.js +1 -1
- package/bundle/antd-mobile.es.development.js +3740 -3713
- package/bundle/antd-mobile.es.js +6805 -6784
- package/bundle/antd-mobile.umd.development.js +3752 -3725
- package/bundle/antd-mobile.umd.js +9 -9
- package/bundle/style.css +1 -1
- package/cjs/components/calendar/calendar.js +1 -1
- package/cjs/components/collapse/collapse.js +3 -1
- package/cjs/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/cjs/components/date-picker/date-picker-utils.d.ts +1 -1
- package/cjs/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/cjs/components/dropdown/dropdown.d.ts +3 -0
- package/cjs/components/dropdown/dropdown.js +4 -1
- package/cjs/components/dropdown/index.d.ts +1 -0
- package/cjs/components/ellipsis/ellipsis.js +1 -1
- package/cjs/components/footer/footer.css +1 -1
- package/cjs/components/form/form-subscribe.js +4 -1
- package/cjs/components/form/form.js +1 -1
- package/cjs/components/form/index.d.ts +1 -1
- package/cjs/components/image/image.js +9 -0
- package/cjs/components/image-uploader/image-uploader.js +4 -5
- package/cjs/components/number-keyboard/number-keyboard.js +5 -3
- package/cjs/components/page-indicator/page-indicator.css +1 -1
- package/cjs/components/picker-view/picker-view.d.ts +2 -2
- package/cjs/components/popup/popup.js +16 -3
- package/cjs/components/search-bar/search-bar.d.ts +2 -2
- package/cjs/components/search-bar/search-bar.js +6 -2
- package/cjs/components/steps/steps.css +2 -0
- package/cjs/components/swiper/swiper.js +7 -5
- package/cjs/components/text-area/text-area.js +6 -3
- package/cjs/components/virtual-input/virtual-input.js +1 -2
- package/cjs/locales/da-DK.d.ts +134 -0
- package/cjs/locales/da-DK.js +132 -0
- package/cjs/locales/it-IT.d.ts +134 -0
- package/cjs/locales/it-IT.js +144 -0
- package/cjs/locales/nb-NO.d.ts +134 -0
- package/cjs/locales/nb-NO.js +144 -0
- package/cjs/locales/nl-NL.d.ts +134 -0
- package/cjs/locales/nl-NL.js +144 -0
- package/es/components/calendar/calendar.js +1 -1
- package/es/components/collapse/collapse.js +3 -1
- package/es/components/date-picker/date-picker-date-utils.d.ts +1 -1
- package/es/components/date-picker/date-picker-utils.d.ts +1 -1
- package/es/components/date-picker/date-picker-week-utils.d.ts +1 -1
- package/es/components/dropdown/dropdown.d.ts +3 -0
- package/es/components/dropdown/dropdown.js +4 -1
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/ellipsis/ellipsis.js +1 -1
- package/es/components/footer/footer.css +1 -1
- package/es/components/form/form-subscribe.js +4 -1
- package/es/components/form/form.js +1 -1
- package/es/components/form/index.d.ts +1 -1
- package/es/components/image/image.js +10 -1
- package/es/components/image-uploader/image-uploader.js +4 -5
- package/es/components/number-keyboard/number-keyboard.js +5 -3
- package/es/components/page-indicator/page-indicator.css +1 -1
- package/es/components/picker-view/picker-view.d.ts +2 -2
- package/es/components/popup/popup.js +16 -3
- package/es/components/search-bar/search-bar.d.ts +2 -2
- package/es/components/search-bar/search-bar.js +6 -2
- package/es/components/steps/steps.css +2 -0
- package/es/components/swiper/swiper.js +8 -6
- package/es/components/text-area/text-area.js +5 -3
- package/es/components/virtual-input/virtual-input.js +1 -2
- package/es/locales/da-DK.d.ts +134 -0
- package/es/locales/da-DK.js +125 -0
- package/es/locales/it-IT.d.ts +134 -0
- package/es/locales/it-IT.js +137 -0
- package/es/locales/nb-NO.d.ts +134 -0
- package/es/locales/nb-NO.js +137 -0
- package/es/locales/nl-NL.d.ts +134 -0
- package/es/locales/nl-NL.js +137 -0
- package/package.json +9 -9
- package/umd/antd-mobile.js +1 -1
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
declare const nlNL: {
|
|
2
|
+
locale: string;
|
|
3
|
+
common: {
|
|
4
|
+
confirm: string;
|
|
5
|
+
cancel: string;
|
|
6
|
+
loading: string;
|
|
7
|
+
close: string;
|
|
8
|
+
};
|
|
9
|
+
Calendar: {
|
|
10
|
+
markItems: string[];
|
|
11
|
+
renderYearAndMonth: (year: number, month: number) => string;
|
|
12
|
+
};
|
|
13
|
+
Cascader: {
|
|
14
|
+
placeholder: string;
|
|
15
|
+
};
|
|
16
|
+
Dialog: {
|
|
17
|
+
ok: string;
|
|
18
|
+
};
|
|
19
|
+
DatePicker: {
|
|
20
|
+
tillNow: string;
|
|
21
|
+
};
|
|
22
|
+
ErrorBlock: {
|
|
23
|
+
default: {
|
|
24
|
+
title: string;
|
|
25
|
+
description: string;
|
|
26
|
+
};
|
|
27
|
+
busy: {
|
|
28
|
+
title: string;
|
|
29
|
+
description: string;
|
|
30
|
+
};
|
|
31
|
+
disconnected: {
|
|
32
|
+
title: string;
|
|
33
|
+
description: string;
|
|
34
|
+
};
|
|
35
|
+
empty: {
|
|
36
|
+
title: string;
|
|
37
|
+
description: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
Form: {
|
|
41
|
+
required: string;
|
|
42
|
+
optional: string;
|
|
43
|
+
defaultValidateMessages: {
|
|
44
|
+
default: string;
|
|
45
|
+
required: string;
|
|
46
|
+
enum: string;
|
|
47
|
+
whitespace: string;
|
|
48
|
+
date: {
|
|
49
|
+
format: string;
|
|
50
|
+
parse: string;
|
|
51
|
+
invalid: string;
|
|
52
|
+
};
|
|
53
|
+
types: {
|
|
54
|
+
string: string;
|
|
55
|
+
method: string;
|
|
56
|
+
array: string;
|
|
57
|
+
object: string;
|
|
58
|
+
number: string;
|
|
59
|
+
date: string;
|
|
60
|
+
boolean: string;
|
|
61
|
+
integer: string;
|
|
62
|
+
float: string;
|
|
63
|
+
regexp: string;
|
|
64
|
+
email: string;
|
|
65
|
+
url: string;
|
|
66
|
+
hex: string;
|
|
67
|
+
};
|
|
68
|
+
string: {
|
|
69
|
+
len: string;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
72
|
+
range: string;
|
|
73
|
+
};
|
|
74
|
+
number: {
|
|
75
|
+
len: string;
|
|
76
|
+
min: string;
|
|
77
|
+
max: string;
|
|
78
|
+
range: string;
|
|
79
|
+
};
|
|
80
|
+
array: {
|
|
81
|
+
len: string;
|
|
82
|
+
min: string;
|
|
83
|
+
max: string;
|
|
84
|
+
range: string;
|
|
85
|
+
};
|
|
86
|
+
pattern: {
|
|
87
|
+
mismatch: string;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
ImageUploader: {
|
|
92
|
+
uploading: string;
|
|
93
|
+
upload: string;
|
|
94
|
+
};
|
|
95
|
+
InfiniteScroll: {
|
|
96
|
+
noMore: string;
|
|
97
|
+
failedToLoad: string;
|
|
98
|
+
retry: string;
|
|
99
|
+
};
|
|
100
|
+
Input: {
|
|
101
|
+
clear: string;
|
|
102
|
+
};
|
|
103
|
+
Mask: {
|
|
104
|
+
name: string;
|
|
105
|
+
};
|
|
106
|
+
Modal: {
|
|
107
|
+
ok: string;
|
|
108
|
+
};
|
|
109
|
+
PasscodeInput: {
|
|
110
|
+
name: string;
|
|
111
|
+
};
|
|
112
|
+
PullToRefresh: {
|
|
113
|
+
pulling: string;
|
|
114
|
+
canRelease: string;
|
|
115
|
+
complete: string;
|
|
116
|
+
};
|
|
117
|
+
SearchBar: {
|
|
118
|
+
name: string;
|
|
119
|
+
};
|
|
120
|
+
Slider: {
|
|
121
|
+
name: string;
|
|
122
|
+
};
|
|
123
|
+
Stepper: {
|
|
124
|
+
decrease: string;
|
|
125
|
+
increase: string;
|
|
126
|
+
};
|
|
127
|
+
Switch: {
|
|
128
|
+
name: string;
|
|
129
|
+
};
|
|
130
|
+
Selector: {
|
|
131
|
+
name: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export default nlNL;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _mergeLocale = require("../utils/merge-locale");
|
|
8
|
+
var _base = require("./base");
|
|
9
|
+
const typeTemplate = '${label} is niet geldig als ${type}';
|
|
10
|
+
const nlNL = (0, _mergeLocale.mergeLocale)(_base.base, {
|
|
11
|
+
locale: 'nl-NL',
|
|
12
|
+
common: {
|
|
13
|
+
confirm: 'Bevestigen',
|
|
14
|
+
cancel: 'Annuleren',
|
|
15
|
+
loading: 'Laden',
|
|
16
|
+
close: 'Sluiten'
|
|
17
|
+
},
|
|
18
|
+
Calendar: {
|
|
19
|
+
markItems: ['Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za', 'Zo'],
|
|
20
|
+
renderYearAndMonth: (year, month) => `${month}-${year}`
|
|
21
|
+
},
|
|
22
|
+
Cascader: {
|
|
23
|
+
placeholder: 'Selecteren'
|
|
24
|
+
},
|
|
25
|
+
Dialog: {
|
|
26
|
+
ok: 'OK'
|
|
27
|
+
},
|
|
28
|
+
DatePicker: {
|
|
29
|
+
tillNow: 'Tot nu'
|
|
30
|
+
},
|
|
31
|
+
ErrorBlock: {
|
|
32
|
+
default: {
|
|
33
|
+
title: 'Oeps, er is iets fout gegaan',
|
|
34
|
+
description: 'Wacht een minuutje en probeer opnieuw'
|
|
35
|
+
},
|
|
36
|
+
busy: {
|
|
37
|
+
title: 'Oeps, niet aan het laden',
|
|
38
|
+
description: 'Probeer de pagina te vernieuwen'
|
|
39
|
+
},
|
|
40
|
+
disconnected: {
|
|
41
|
+
title: 'Netwerk is bezet',
|
|
42
|
+
description: 'Probeer de pagina te vernieuwen'
|
|
43
|
+
},
|
|
44
|
+
empty: {
|
|
45
|
+
title: 'Hmm, dat kon niet gevonden worden...',
|
|
46
|
+
description: 'Wil je een nieuwe zoekopdracht proberen?'
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
Form: {
|
|
50
|
+
required: 'Verplicht',
|
|
51
|
+
optional: 'Optioneel',
|
|
52
|
+
defaultValidateMessages: {
|
|
53
|
+
default: 'Veldvalidatiefout voor ${label}',
|
|
54
|
+
required: 'Vul ${label} in',
|
|
55
|
+
enum: '${label} moet een van de volgende zijn: [${enum}]',
|
|
56
|
+
whitespace: '${label} mag geen leeg karakter zijn',
|
|
57
|
+
date: {
|
|
58
|
+
format: 'Ongeldige datumnotatie voor ${label}',
|
|
59
|
+
parse: 'Kan ${label} niet converteren naar een datum',
|
|
60
|
+
invalid: 'Ongeldige datum voor ${label}'
|
|
61
|
+
},
|
|
62
|
+
types: {
|
|
63
|
+
string: typeTemplate,
|
|
64
|
+
method: typeTemplate,
|
|
65
|
+
array: typeTemplate,
|
|
66
|
+
object: typeTemplate,
|
|
67
|
+
number: typeTemplate,
|
|
68
|
+
date: typeTemplate,
|
|
69
|
+
boolean: typeTemplate,
|
|
70
|
+
integer: typeTemplate,
|
|
71
|
+
float: typeTemplate,
|
|
72
|
+
regexp: typeTemplate,
|
|
73
|
+
email: typeTemplate,
|
|
74
|
+
url: typeTemplate,
|
|
75
|
+
hex: typeTemplate
|
|
76
|
+
},
|
|
77
|
+
string: {
|
|
78
|
+
len: '${label} moet ${len} tekens zijn',
|
|
79
|
+
min: '${label} moet minimaal ${min} tekens zijn',
|
|
80
|
+
max: '${label} mag maximaal ${max} tekens zijn',
|
|
81
|
+
range: '${label} moet tussen ${min}-${max} tekens zijn'
|
|
82
|
+
},
|
|
83
|
+
number: {
|
|
84
|
+
len: '${label} moet gelijk zijn aan ${len}',
|
|
85
|
+
min: '${label} moet minimaal ${min} zijn',
|
|
86
|
+
max: '${label} mag maximaal ${max} zijn',
|
|
87
|
+
range: '${label} moet tussen ${min}-${max} zijn'
|
|
88
|
+
},
|
|
89
|
+
array: {
|
|
90
|
+
len: 'Moet ${len} ${label} zijn',
|
|
91
|
+
min: 'Moet minimaal ${min} ${label} zijn',
|
|
92
|
+
max: 'Mag maximaal ${max} ${label} zijn',
|
|
93
|
+
range: 'Aantal ${label} moet tussen ${min}-${max} zijn'
|
|
94
|
+
},
|
|
95
|
+
pattern: {
|
|
96
|
+
mismatch: '${label} komt niet overeen met het patroon ${pattern}'
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
ImageUploader: {
|
|
101
|
+
uploading: 'Uploaden...',
|
|
102
|
+
upload: 'Uploaden'
|
|
103
|
+
},
|
|
104
|
+
InfiniteScroll: {
|
|
105
|
+
noMore: 'Geen meer',
|
|
106
|
+
failedToLoad: 'Laden mislukt',
|
|
107
|
+
retry: 'Opnieuw proberen'
|
|
108
|
+
},
|
|
109
|
+
Input: {
|
|
110
|
+
clear: 'wissen'
|
|
111
|
+
},
|
|
112
|
+
Mask: {
|
|
113
|
+
name: 'Masker'
|
|
114
|
+
},
|
|
115
|
+
Modal: {
|
|
116
|
+
ok: 'Begrepen'
|
|
117
|
+
},
|
|
118
|
+
PasscodeInput: {
|
|
119
|
+
name: 'Invoer voor toegangscode'
|
|
120
|
+
},
|
|
121
|
+
PullToRefresh: {
|
|
122
|
+
pulling: 'Trek naar beneden om te vernieuwen',
|
|
123
|
+
canRelease: 'Los om onmiddellijk te vernieuwen',
|
|
124
|
+
complete: 'Vernieuwen voltooid'
|
|
125
|
+
},
|
|
126
|
+
SearchBar: {
|
|
127
|
+
name: 'Zoekbalk'
|
|
128
|
+
},
|
|
129
|
+
Slider: {
|
|
130
|
+
name: 'Schuifregelaar'
|
|
131
|
+
},
|
|
132
|
+
Stepper: {
|
|
133
|
+
decrease: 'afnemen',
|
|
134
|
+
increase: 'toenemen'
|
|
135
|
+
},
|
|
136
|
+
Switch: {
|
|
137
|
+
name: 'Schakelaar'
|
|
138
|
+
},
|
|
139
|
+
Selector: {
|
|
140
|
+
name: 'Selector'
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
var _default = nlNL;
|
|
144
|
+
exports.default = _default;
|
|
@@ -60,7 +60,9 @@ const CollapsePanelContent = props => {
|
|
|
60
60
|
}
|
|
61
61
|
}, [visible]);
|
|
62
62
|
return React.createElement(animated.div, {
|
|
63
|
-
className: `${classPrefix}-panel-content`,
|
|
63
|
+
className: classNames(`${classPrefix}-panel-content`, {
|
|
64
|
+
[`${classPrefix}-panel-content-active`]: visible
|
|
65
|
+
}),
|
|
64
66
|
style: {
|
|
65
67
|
height: height.to(v => {
|
|
66
68
|
if (height.idle && visible) {
|
|
@@ -4,4 +4,4 @@ import { RenderLabel } from '../date-picker-view/date-picker-view';
|
|
|
4
4
|
export declare type DatePrecision = 'year' | 'month' | 'day' | 'hour' | 'minute' | 'second';
|
|
5
5
|
export declare function generateDatePickerColumns(selected: string[], min: Date, max: Date, precision: DatePrecision, renderLabel: RenderLabel, filter: DatePickerFilter | undefined, tillNow?: boolean): PickerColumn[];
|
|
6
6
|
export declare function convertDateToStringArray(date: Date | undefined | null): string[];
|
|
7
|
-
export declare function convertStringArrayToDate
|
|
7
|
+
export declare function convertStringArrayToDate<T extends string | number | null | undefined>(value: T[]): Date;
|
|
@@ -6,5 +6,5 @@ export declare type DatePickerFilter = Partial<Record<Precision, (val: number, e
|
|
|
6
6
|
date: Date;
|
|
7
7
|
}) => boolean>>;
|
|
8
8
|
export declare const convertDateToStringArray: (date: Date | undefined | null, precision: Precision) => string[];
|
|
9
|
-
export declare const convertStringArrayToDate:
|
|
9
|
+
export declare const convertStringArrayToDate: <T extends string | number | null | undefined>(value: T[], precision: Precision) => Date;
|
|
10
10
|
export declare const generateDatePickerColumns: (selected: string[], min: Date, max: Date, precision: Precision, renderLabel: RenderLabel, filter: DatePickerFilter | undefined, tillNow?: boolean | undefined) => import("../picker-view").PickerColumn[];
|
|
@@ -4,4 +4,4 @@ import type { DatePickerFilter } from './date-picker-utils';
|
|
|
4
4
|
export declare type WeekPrecision = 'year' | 'week' | 'week-day';
|
|
5
5
|
export declare function generateDatePickerColumns(selected: string[], min: Date, max: Date, precision: WeekPrecision, renderLabel: (type: WeekPrecision, data: number) => ReactNode, filter: DatePickerFilter | undefined): PickerColumn[];
|
|
6
6
|
export declare function convertDateToStringArray(date: Date | undefined | null): string[];
|
|
7
|
-
export declare function convertStringArrayToDate
|
|
7
|
+
export declare function convertStringArrayToDate<T extends string | number | null | undefined>(value: T[]): Date;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { PopupProps } from '../popup';
|
|
2
3
|
import { NativeProps } from '../../utils/native-props';
|
|
3
4
|
export declare type DropdownProps = {
|
|
4
5
|
activeKey?: string | null;
|
|
@@ -7,6 +8,7 @@ export declare type DropdownProps = {
|
|
|
7
8
|
closeOnClickAway?: boolean;
|
|
8
9
|
onChange?: (key: string | null) => void;
|
|
9
10
|
arrow?: React.ReactNode;
|
|
11
|
+
getContainer?: PopupProps['getContainer'];
|
|
10
12
|
} & NativeProps;
|
|
11
13
|
export declare type DropdownRef = {
|
|
12
14
|
close: () => void;
|
|
@@ -18,6 +20,7 @@ declare const Dropdown: React.ForwardRefExoticComponent<{
|
|
|
18
20
|
closeOnClickAway?: boolean | undefined;
|
|
19
21
|
onChange?: ((key: string | null) => void) | undefined;
|
|
20
22
|
arrow?: React.ReactNode;
|
|
23
|
+
getContainer?: PopupProps['getContainer'];
|
|
21
24
|
} & {
|
|
22
25
|
className?: string | undefined;
|
|
23
26
|
style?: (React.CSSProperties & Partial<Record<never, string>>) | undefined;
|
|
@@ -6,11 +6,13 @@ import { ItemChildrenWrap } from './item';
|
|
|
6
6
|
import { withNativeProps } from '../../utils/native-props';
|
|
7
7
|
import { mergeProps } from '../../utils/with-default-props';
|
|
8
8
|
import { usePropsValue } from '../../utils/use-props-value';
|
|
9
|
+
import { defaultPopupBaseProps } from '../popup/popup-base-props';
|
|
9
10
|
const classPrefix = `adm-dropdown`;
|
|
10
11
|
const defaultProps = {
|
|
11
12
|
defaultActiveKey: null,
|
|
12
13
|
closeOnMaskClick: true,
|
|
13
|
-
closeOnClickAway: false
|
|
14
|
+
closeOnClickAway: false,
|
|
15
|
+
getContainer: defaultPopupBaseProps['getContainer']
|
|
14
16
|
};
|
|
15
17
|
const Dropdown = forwardRef((p, ref) => {
|
|
16
18
|
const props = mergeProps(defaultProps, p);
|
|
@@ -78,6 +80,7 @@ const Dropdown = forwardRef((p, ref) => {
|
|
|
78
80
|
}, navs), React.createElement(Popup, {
|
|
79
81
|
visible: !!value,
|
|
80
82
|
position: 'top',
|
|
83
|
+
getContainer: props.getContainer,
|
|
81
84
|
className: `${classPrefix}-popup`,
|
|
82
85
|
maskClassName: `${classPrefix}-popup-mask`,
|
|
83
86
|
bodyClassName: `${classPrefix}-popup-body`,
|
|
@@ -8,6 +8,7 @@ declare const _default: import("react").ForwardRefExoticComponent<{
|
|
|
8
8
|
closeOnClickAway?: boolean | undefined;
|
|
9
9
|
onChange?: ((key: string | null) => void) | undefined;
|
|
10
10
|
arrow?: import("react").ReactNode;
|
|
11
|
+
getContainer?: import("../../utils/render-to-container").GetContainer | undefined;
|
|
11
12
|
} & {
|
|
12
13
|
className?: string | undefined;
|
|
13
14
|
style?: (import("react").CSSProperties & Partial<Record<never, string>>) | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useMemo, useRef, useState } from 'react';
|
|
2
|
-
import runes from '
|
|
2
|
+
import runes from 'runes2';
|
|
3
3
|
import { mergeProps } from '../../utils/with-default-props';
|
|
4
4
|
import { withNativeProps } from '../../utils/native-props';
|
|
5
5
|
import { useResizeEffect } from '../../utils/use-resize-effect';
|
|
@@ -5,7 +5,10 @@ import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-upda
|
|
|
5
5
|
export const FormSubscribe = props => {
|
|
6
6
|
const update = useUpdate();
|
|
7
7
|
const form = useContext(FieldContext);
|
|
8
|
-
|
|
8
|
+
const value = form.getFieldsValue(props.to);
|
|
9
|
+
// Memo to avoid useless render
|
|
10
|
+
const childNode = React.useMemo(() => props.children(value, form), [JSON.stringify(value)]);
|
|
11
|
+
return React.createElement(React.Fragment, null, childNode, props.to.map(namePath => React.createElement(Watcher, {
|
|
9
12
|
key: namePath.toString(),
|
|
10
13
|
form: form,
|
|
11
14
|
namePath: namePath,
|
|
@@ -4,7 +4,7 @@ export declare type FormLayout = 'vertical' | 'horizontal';
|
|
|
4
4
|
export type { FormProps, FormInstance } from './form';
|
|
5
5
|
export type { FormItemProps } from './form-item';
|
|
6
6
|
export type { FormSubscribeProps } from './form-subscribe';
|
|
7
|
-
export type { ValidateMessages, FieldData, NamePath, } from 'rc-field-form/es/interface';
|
|
7
|
+
export type { ValidateMessages, FieldData, NamePath, Rule, RuleObject, RuleRender, } from 'rc-field-form/es/interface';
|
|
8
8
|
export type { FormArrayField, FormArrayOperation, FormArrayProps, } from './form-array';
|
|
9
9
|
declare const _default: import("react").ForwardRefExoticComponent<Pick<import("rc-field-form").FormProps<any>, "children" | "form" | "name" | "initialValues" | "preserve" | "validateMessages" | "validateTrigger" | "onFieldsChange" | "onFinish" | "onFinishFailed" | "onValuesChange"> & {
|
|
10
10
|
className?: string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mergeProps } from '../../utils/with-default-props';
|
|
2
|
-
import React, { useState, useRef } from 'react';
|
|
2
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
3
3
|
import { withNativeProps } from '../../utils/native-props';
|
|
4
4
|
import { staged } from 'staged-components';
|
|
5
5
|
import { toCSSLength } from '../../utils/to-css-length';
|
|
@@ -24,6 +24,7 @@ export const Image = staged(p => {
|
|
|
24
24
|
const [loaded, setLoaded] = useState(false);
|
|
25
25
|
const [failed, setFailed] = useState(false);
|
|
26
26
|
const ref = useRef(null);
|
|
27
|
+
const imgRef = useRef(null);
|
|
27
28
|
let src = props.src;
|
|
28
29
|
let srcSet = props.srcSet;
|
|
29
30
|
const [initialized, setInitialized] = useState(!props.lazy);
|
|
@@ -33,11 +34,19 @@ export const Image = staged(p => {
|
|
|
33
34
|
setLoaded(false);
|
|
34
35
|
setFailed(false);
|
|
35
36
|
}, [src]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
var _a;
|
|
39
|
+
// for nextjs ssr
|
|
40
|
+
if ((_a = imgRef.current) === null || _a === void 0 ? void 0 : _a.complete) {
|
|
41
|
+
setLoaded(true);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
36
44
|
function renderInner() {
|
|
37
45
|
if (failed) {
|
|
38
46
|
return React.createElement(React.Fragment, null, props.fallback);
|
|
39
47
|
}
|
|
40
48
|
const img = React.createElement("img", {
|
|
49
|
+
ref: imgRef,
|
|
41
50
|
className: `${classPrefix}-img`,
|
|
42
51
|
src: src,
|
|
43
52
|
alt: props.alt,
|
|
@@ -118,9 +118,11 @@ export const ImageUploader = p => {
|
|
|
118
118
|
file
|
|
119
119
|
}));
|
|
120
120
|
setTasks(prev => [...getFinalTasks(prev), ...newTasks]);
|
|
121
|
-
|
|
121
|
+
const newVal = [];
|
|
122
|
+
yield Promise.all(newTasks.map((currentTask, index) => __awaiter(this, void 0, void 0, function* () {
|
|
122
123
|
try {
|
|
123
124
|
const result = yield props.upload(currentTask.file);
|
|
125
|
+
newVal[index] = result;
|
|
124
126
|
setTasks(prev => {
|
|
125
127
|
return prev.map(task => {
|
|
126
128
|
if (task.id === currentTask.id) {
|
|
@@ -132,10 +134,6 @@ export const ImageUploader = p => {
|
|
|
132
134
|
return task;
|
|
133
135
|
});
|
|
134
136
|
});
|
|
135
|
-
setValue(prev => {
|
|
136
|
-
const newVal = Object.assign({}, result);
|
|
137
|
-
return [...prev, newVal];
|
|
138
|
-
});
|
|
139
137
|
} catch (e) {
|
|
140
138
|
setTasks(prev => {
|
|
141
139
|
return prev.map(task => {
|
|
@@ -150,6 +148,7 @@ export const ImageUploader = p => {
|
|
|
150
148
|
throw e;
|
|
151
149
|
}
|
|
152
150
|
}))).catch(error => console.error(error));
|
|
151
|
+
setValue(prev => prev.concat(newVal));
|
|
153
152
|
});
|
|
154
153
|
}
|
|
155
154
|
const imageViewerHandlerRef = useRef(null);
|
|
@@ -97,7 +97,7 @@ export const NumberKeyboard = p => {
|
|
|
97
97
|
var _a;
|
|
98
98
|
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
99
99
|
},
|
|
100
|
-
role: '
|
|
100
|
+
role: 'grid',
|
|
101
101
|
title: 'CLOSE',
|
|
102
102
|
tabIndex: -1
|
|
103
103
|
}, React.createElement(DownOutline, null)));
|
|
@@ -164,11 +164,13 @@ export const NumberKeyboard = p => {
|
|
|
164
164
|
onBackspacePressEnd();
|
|
165
165
|
},
|
|
166
166
|
title: 'BACKSPACE',
|
|
167
|
-
role: '
|
|
167
|
+
role: 'grid',
|
|
168
|
+
tabIndex: -1
|
|
168
169
|
}, React.createElement(TextDeletionOutline, null)), React.createElement("div", {
|
|
169
170
|
className: `${classPrefix}-key ${classPrefix}-key-extra ${classPrefix}-key-ok`,
|
|
170
171
|
onTouchEnd: e => onKeyPress(e, 'OK'),
|
|
171
|
-
role: '
|
|
172
|
+
role: 'grid',
|
|
173
|
+
tabIndex: -1,
|
|
172
174
|
"aria-label": confirmText
|
|
173
175
|
}, confirmText))), props.safeArea && React.createElement("div", {
|
|
174
176
|
className: `${classPrefix}-footer`
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { NativeProps } from '../../utils/native-props';
|
|
3
3
|
import { PickerProps } from '../picker';
|
|
4
|
-
export declare type PickerValue = string | null;
|
|
4
|
+
export declare type PickerValue = string | number | null;
|
|
5
5
|
export declare type PickerValueExtend = {
|
|
6
6
|
columns: PickerColumnItem[][];
|
|
7
7
|
items: (PickerColumnItem | null)[];
|
|
8
8
|
};
|
|
9
9
|
export declare type PickerColumnItem = {
|
|
10
10
|
label: ReactNode;
|
|
11
|
-
value: string;
|
|
11
|
+
value: string | number;
|
|
12
12
|
key?: string | number;
|
|
13
13
|
};
|
|
14
14
|
export declare type PickerColumn = (string | PickerColumnItem)[];
|
|
@@ -13,6 +13,7 @@ import { CloseOutline } from 'antd-mobile-icons';
|
|
|
13
13
|
import { defaultPopupBaseProps } from './popup-base-props';
|
|
14
14
|
import { useInnerVisible } from '../../utils/use-inner-visible';
|
|
15
15
|
import { useConfig } from '../config-provider';
|
|
16
|
+
import { useDrag } from '@use-gesture/react';
|
|
16
17
|
const classPrefix = `adm-popup`;
|
|
17
18
|
const defaultProps = Object.assign(Object.assign({}, defaultPopupBaseProps), {
|
|
18
19
|
position: 'bottom'
|
|
@@ -53,14 +54,26 @@ export const Popup = p => {
|
|
|
53
54
|
}
|
|
54
55
|
}
|
|
55
56
|
});
|
|
57
|
+
const bind = useDrag(({
|
|
58
|
+
swipe: [, swipeY]
|
|
59
|
+
}) => {
|
|
60
|
+
var _a;
|
|
61
|
+
if (swipeY === 1 && props.position === 'bottom' || swipeY === -1 && props.position === 'top') {
|
|
62
|
+
(_a = props.onClose) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
axis: 'y',
|
|
66
|
+
enabled: ['top', 'bottom'].includes(props.position)
|
|
67
|
+
});
|
|
56
68
|
const maskVisible = useInnerVisible(active && props.visible);
|
|
57
|
-
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React.createElement("div", {
|
|
69
|
+
const node = withStopPropagation(props.stopPropagation, withNativeProps(props, React.createElement("div", Object.assign({
|
|
58
70
|
className: classPrefix,
|
|
59
71
|
onClick: props.onClick,
|
|
60
72
|
style: {
|
|
61
|
-
display: active ? undefined : 'none'
|
|
73
|
+
display: active ? undefined : 'none',
|
|
74
|
+
touchAction: ['top', 'bottom'].includes(props.position) ? 'none' : 'auto'
|
|
62
75
|
}
|
|
63
|
-
}, props.mask && React.createElement(Mask, {
|
|
76
|
+
}, bind()), props.mask && React.createElement(Mask, {
|
|
64
77
|
visible: maskVisible,
|
|
65
78
|
forceRender: props.forceRender,
|
|
66
79
|
destroyOnClose: props.destroyOnClose,
|
|
@@ -2,7 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { InputRef, InputProps } from '../input';
|
|
3
3
|
import { NativeProps } from '../../utils/native-props';
|
|
4
4
|
export declare type SearchBarRef = InputRef;
|
|
5
|
-
export declare type SearchBarProps = Pick<InputProps, 'onFocus' | 'onBlur' | 'onClear'> & {
|
|
5
|
+
export declare type SearchBarProps = Pick<InputProps, 'onFocus' | 'onBlur' | 'onClear' | 'onCompositionStart' | 'onCompositionEnd'> & {
|
|
6
6
|
value?: string;
|
|
7
7
|
defaultValue?: string;
|
|
8
8
|
maxLength?: number;
|
|
@@ -17,7 +17,7 @@ export declare type SearchBarProps = Pick<InputProps, 'onFocus' | 'onBlur' | 'on
|
|
|
17
17
|
onChange?: (val: string) => void;
|
|
18
18
|
onCancel?: () => void;
|
|
19
19
|
} & NativeProps<'--background' | '--border-radius' | '--placeholder-color' | '--height' | '--padding-left'>;
|
|
20
|
-
export declare const SearchBar: React.ForwardRefExoticComponent<Pick<InputProps, "onFocus" | "onBlur" | "onClear"> & {
|
|
20
|
+
export declare const SearchBar: React.ForwardRefExoticComponent<Pick<InputProps, "onCompositionEnd" | "onCompositionStart" | "onFocus" | "onBlur" | "onClear"> & {
|
|
21
21
|
value?: string | undefined;
|
|
22
22
|
defaultValue?: string | undefined;
|
|
23
23
|
maxLength?: number | undefined;
|
|
@@ -110,11 +110,15 @@ export const SearchBar = forwardRef((p, ref) => {
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"aria-label": locale.SearchBar.name,
|
|
113
|
-
onCompositionStart:
|
|
113
|
+
onCompositionStart: e => {
|
|
114
|
+
var _a;
|
|
114
115
|
composingRef.current = true;
|
|
116
|
+
(_a = props.onCompositionStart) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
115
117
|
},
|
|
116
|
-
onCompositionEnd:
|
|
118
|
+
onCompositionEnd: e => {
|
|
119
|
+
var _a;
|
|
117
120
|
composingRef.current = false;
|
|
121
|
+
(_a = props.onCompositionEnd) === null || _a === void 0 ? void 0 : _a.call(props, e);
|
|
118
122
|
}
|
|
119
123
|
})), renderCancelButton()));
|
|
120
124
|
});
|