antd-mobile 5.36.0 → 5.36.1

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.
Files changed (64) hide show
  1. package/2x/bundle/antd-mobile.cjs.development.js +38 -12
  2. package/2x/bundle/antd-mobile.cjs.js +7 -7
  3. package/2x/bundle/antd-mobile.es.development.js +38 -12
  4. package/2x/bundle/antd-mobile.es.js +1432 -1412
  5. package/2x/bundle/antd-mobile.umd.development.js +38 -12
  6. package/2x/bundle/antd-mobile.umd.js +7 -7
  7. package/2x/cjs/components/collapse/collapse.d.ts +1 -1
  8. package/2x/cjs/components/collapse/collapse.js +28 -11
  9. package/2x/cjs/locales/ar-SA.js +2 -2
  10. package/2x/cjs/locales/de-DE.js +3 -3
  11. package/2x/cjs/locales/es-ES.js +2 -2
  12. package/2x/cjs/locales/fr-FR.js +1 -1
  13. package/2x/cjs/locales/in-ID.d.ts +139 -0
  14. package/2x/cjs/locales/in-ID.js +149 -0
  15. package/2x/cjs/locales/ja-JP.js +2 -2
  16. package/2x/cjs/locales/th-TH.js +2 -2
  17. package/2x/cjs/utils/use-mutation-effect.d.ts +1 -0
  18. package/2x/cjs/utils/use-mutation-effect.js +20 -9
  19. package/2x/es/components/collapse/collapse.d.ts +1 -1
  20. package/2x/es/components/collapse/collapse.js +27 -10
  21. package/2x/es/locales/ar-SA.js +2 -2
  22. package/2x/es/locales/de-DE.js +3 -3
  23. package/2x/es/locales/es-ES.js +2 -2
  24. package/2x/es/locales/fr-FR.js +1 -1
  25. package/2x/es/locales/in-ID.d.ts +139 -0
  26. package/2x/es/locales/in-ID.js +142 -0
  27. package/2x/es/locales/ja-JP.js +2 -2
  28. package/2x/es/locales/th-TH.js +2 -2
  29. package/2x/es/utils/use-mutation-effect.d.ts +1 -0
  30. package/2x/es/utils/use-mutation-effect.js +19 -9
  31. package/2x/package.json +3 -2
  32. package/bundle/antd-mobile.cjs.development.js +38 -12
  33. package/bundle/antd-mobile.cjs.js +7 -7
  34. package/bundle/antd-mobile.compatible.umd.js +1 -1
  35. package/bundle/antd-mobile.es.development.js +38 -12
  36. package/bundle/antd-mobile.es.js +1432 -1412
  37. package/bundle/antd-mobile.umd.development.js +38 -12
  38. package/bundle/antd-mobile.umd.js +7 -7
  39. package/cjs/components/collapse/collapse.d.ts +1 -1
  40. package/cjs/components/collapse/collapse.js +28 -11
  41. package/cjs/locales/ar-SA.js +2 -2
  42. package/cjs/locales/de-DE.js +3 -3
  43. package/cjs/locales/es-ES.js +2 -2
  44. package/cjs/locales/fr-FR.js +1 -1
  45. package/cjs/locales/in-ID.d.ts +139 -0
  46. package/cjs/locales/in-ID.js +149 -0
  47. package/cjs/locales/ja-JP.js +2 -2
  48. package/cjs/locales/th-TH.js +2 -2
  49. package/cjs/utils/use-mutation-effect.d.ts +1 -0
  50. package/cjs/utils/use-mutation-effect.js +20 -9
  51. package/es/components/collapse/collapse.d.ts +1 -1
  52. package/es/components/collapse/collapse.js +27 -10
  53. package/es/locales/ar-SA.js +2 -2
  54. package/es/locales/de-DE.js +3 -3
  55. package/es/locales/es-ES.js +2 -2
  56. package/es/locales/fr-FR.js +1 -1
  57. package/es/locales/in-ID.d.ts +139 -0
  58. package/es/locales/in-ID.js +142 -0
  59. package/es/locales/ja-JP.js +2 -2
  60. package/es/locales/th-TH.js +2 -2
  61. package/es/utils/use-mutation-effect.d.ts +1 -0
  62. package/es/utils/use-mutation-effect.js +19 -9
  63. package/package.json +3 -2
  64. package/umd/antd-mobile.js +1 -1
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import type { FC, ReactNode } from 'react';
2
+ import React from 'react';
3
3
  import { NativeProps } from '../../utils/native-props';
4
4
  export declare type CollapsePanelProps = {
5
5
  key: string;
@@ -4,20 +4,21 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.CollapsePanel = exports.Collapse = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _nativeProps = require("../../utils/native-props");
9
- var _list = _interopRequireDefault(require("../list"));
10
- var _antdMobileIcons = require("antd-mobile-icons");
11
- var _classnames = _interopRequireDefault(require("classnames"));
12
7
  var _web = require("@react-spring/web");
13
- var _usePropsValue = require("../../utils/use-props-value");
14
8
  var _ahooks = require("ahooks");
9
+ var _antdMobileIcons = require("antd-mobile-icons");
10
+ var _classnames = _interopRequireDefault(require("classnames"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _nativeProps = require("../../utils/native-props");
15
13
  var _shouldRender = require("../../utils/should-render");
16
- var _useIsomorphicUpdateLayoutEffect = require("../../utils/use-isomorphic-update-layout-effect");
17
14
  var _traverseReactNode = require("../../utils/traverse-react-node");
18
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
+ var _useIsomorphicUpdateLayoutEffect = require("../../utils/use-isomorphic-update-layout-effect");
16
+ var _useMutationEffect = require("../../utils/use-mutation-effect");
17
+ var _usePropsValue = require("../../utils/use-props-value");
18
+ var _list = _interopRequireDefault(require("../list"));
19
19
  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); }
20
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
22
  const classPrefix = `adm-collapse`;
22
23
  const CollapsePanel = () => {
23
24
  return null;
@@ -56,9 +57,25 @@ const CollapsePanelContent = props => {
56
57
  const inner = innerRef.current;
57
58
  if (!inner) return;
58
59
  if (visible) {
59
- api.start({
60
- height: inner.offsetHeight
61
- });
60
+ let lastMotionId = 0;
61
+ let cancelObserve = () => {};
62
+ const handleMotion = () => {
63
+ lastMotionId += 1;
64
+ const motionId = lastMotionId;
65
+ api.start({
66
+ height: inner.offsetHeight
67
+ })[0].then(() => {
68
+ if (motionId === lastMotionId) {
69
+ cancelObserve();
70
+ }
71
+ });
72
+ };
73
+ cancelObserve = (0, _useMutationEffect.observe)(inner, {
74
+ childList: true,
75
+ subtree: true
76
+ }, handleMotion);
77
+ handleMotion();
78
+ return cancelObserve;
62
79
  } else {
63
80
  api.start({
64
81
  height: inner.offsetHeight,
@@ -28,7 +28,7 @@ const arSA = (0, _mergeLocale.mergeLocale)(_base.base, {
28
28
  'placeholder': 'اختر من فضلك'
29
29
  },
30
30
  'Dialog': {
31
- 'ok': 'عرفت'
31
+ 'ok': 'فهمت'
32
32
  },
33
33
  'DatePicker': {
34
34
  'tillNow': 'إلى اليوم'
@@ -118,7 +118,7 @@ const arSA = (0, _mergeLocale.mergeLocale)(_base.base, {
118
118
  'name': 'قناع الخلفية'
119
119
  },
120
120
  'Modal': {
121
- 'ok': 'عرفت'
121
+ 'ok': 'فهمت'
122
122
  },
123
123
  'PasscodeInput': {
124
124
  'name': 'مربع إدخال كلمة المرور'
@@ -21,14 +21,14 @@ const deDE = (0, _mergeLocale.mergeLocale)(_base.base, {
21
21
  'start': 'Starten',
22
22
  'end': 'Beenden',
23
23
  'today': 'Heute',
24
- 'markItems': ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Tag'],
24
+ 'markItems': ['I', 'II', 'III', 'IV', 'V', 'Sechs', 'Tag'],
25
25
  'yearAndMonth': '${year}Jahr${month}Monat'
26
26
  },
27
27
  'Cascader': {
28
28
  'placeholder': 'Bitte auswählen'
29
29
  },
30
30
  'Dialog': {
31
- 'ok': 'OK'
31
+ 'ok': 'Ich weiß.'
32
32
  },
33
33
  'DatePicker': {
34
34
  'tillNow': 'Bis heute'
@@ -118,7 +118,7 @@ const deDE = (0, _mergeLocale.mergeLocale)(_base.base, {
118
118
  'name': 'Hintergrundmaske'
119
119
  },
120
120
  'Modal': {
121
- 'ok': 'OK'
121
+ 'ok': 'Ich weiß.'
122
122
  },
123
123
  'PasscodeInput': {
124
124
  'name': 'Passwort-Eingabefeld'
@@ -22,7 +22,7 @@ const esES = (0, _mergeLocale.mergeLocale)(_base.base, {
22
22
  placeholder: 'Seleccionando'
23
23
  },
24
24
  Dialog: {
25
- ok: 'OK'
25
+ ok: 'Entendido'
26
26
  },
27
27
  ErrorBlock: {
28
28
  default: {
@@ -100,7 +100,7 @@ const esES = (0, _mergeLocale.mergeLocale)(_base.base, {
100
100
  name: 'Máscara'
101
101
  },
102
102
  Modal: {
103
- ok: 'OK'
103
+ ok: 'Entendido'
104
104
  },
105
105
  PullToRefresh: {
106
106
  pulling: 'Desplácese hacia abajo para refrescar',
@@ -10,7 +10,7 @@ const typeTemplate = '${label}Pas un valide${type}';
10
10
  const frFR = (0, _mergeLocale.mergeLocale)(_base.base, {
11
11
  locale: 'fr-FR',
12
12
  common: {
13
- confirm: 'Valider',
13
+ confirm: 'Activer',
14
14
  cancel: 'Annuler',
15
15
  loading: 'Chargement'
16
16
  },
@@ -0,0 +1,139 @@
1
+ declare const inID: {
2
+ locale: string;
3
+ common: {
4
+ confirm: string;
5
+ cancel: string;
6
+ loading: string;
7
+ close: string;
8
+ };
9
+ Calendar: {
10
+ title: string;
11
+ confirm: string;
12
+ start: string;
13
+ end: string;
14
+ today: string;
15
+ markItems: string[];
16
+ yearAndMonth: string;
17
+ };
18
+ Cascader: {
19
+ placeholder: string;
20
+ };
21
+ Dialog: {
22
+ ok: string;
23
+ };
24
+ DatePicker: {
25
+ tillNow: string;
26
+ };
27
+ ErrorBlock: {
28
+ default: {
29
+ title: string;
30
+ description: string;
31
+ };
32
+ busy: {
33
+ title: string;
34
+ description: string;
35
+ };
36
+ disconnected: {
37
+ title: string;
38
+ description: string;
39
+ };
40
+ empty: {
41
+ title: string;
42
+ description: string;
43
+ };
44
+ };
45
+ Form: {
46
+ required: string;
47
+ optional: string;
48
+ defaultValidateMessages: {
49
+ default: string;
50
+ required: string;
51
+ enum: string;
52
+ whitespace: string;
53
+ date: {
54
+ format: string;
55
+ parse: string;
56
+ invalid: string;
57
+ };
58
+ types: {
59
+ string: string;
60
+ method: string;
61
+ array: string;
62
+ object: string;
63
+ number: string;
64
+ date: string;
65
+ boolean: string;
66
+ integer: string;
67
+ float: string;
68
+ regexp: string;
69
+ email: string;
70
+ url: string;
71
+ hex: string;
72
+ };
73
+ string: {
74
+ len: string;
75
+ min: string;
76
+ max: string;
77
+ range: string;
78
+ };
79
+ number: {
80
+ len: string;
81
+ min: string;
82
+ max: string;
83
+ range: string;
84
+ };
85
+ array: {
86
+ len: string;
87
+ min: string;
88
+ max: string;
89
+ range: string;
90
+ };
91
+ pattern: {
92
+ mismatch: string;
93
+ };
94
+ };
95
+ };
96
+ ImageUploader: {
97
+ uploading: string;
98
+ upload: string;
99
+ };
100
+ InfiniteScroll: {
101
+ noMore: string;
102
+ failedToLoad: string;
103
+ retry: string;
104
+ };
105
+ Input: {
106
+ clear: string;
107
+ };
108
+ Mask: {
109
+ name: string;
110
+ };
111
+ Modal: {
112
+ ok: string;
113
+ };
114
+ PasscodeInput: {
115
+ name: string;
116
+ };
117
+ PullToRefresh: {
118
+ pulling: string;
119
+ canRelease: string;
120
+ complete: string;
121
+ };
122
+ SearchBar: {
123
+ name: string;
124
+ };
125
+ Slider: {
126
+ name: string;
127
+ };
128
+ Stepper: {
129
+ decrease: string;
130
+ increase: string;
131
+ };
132
+ Switch: {
133
+ name: string;
134
+ };
135
+ Selector: {
136
+ name: string;
137
+ };
138
+ };
139
+ export default inID;
@@ -0,0 +1,149 @@
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} bukan ${type} yang valid';
10
+ const inID = (0, _mergeLocale.mergeLocale)(_base.base, {
11
+ locale: 'in-ID',
12
+ common: {
13
+ confirm: 'Yakin',
14
+ cancel: 'Batal ',
15
+ loading: 'memuat',
16
+ close: 'Tutup'
17
+ },
18
+ Calendar: {
19
+ title: 'Pilih Tanggal',
20
+ confirm: 'OK',
21
+ start: 'Mulai',
22
+ end: 'Selesai',
23
+ today: 'Hari Ini',
24
+ markItems: ['Senin', 'Selasa', 'Rabu', 'Kamis', 'Jumat', 'Sabtu', 'Minggu'],
25
+ yearAndMonth: '${year} Tahun ${month} Bulan'
26
+ },
27
+ Cascader: {
28
+ placeholder: 'Silahkan Pilih'
29
+ },
30
+ Dialog: {
31
+ ok: 'Saya mendapatkannya'
32
+ },
33
+ DatePicker: {
34
+ tillNow: 'Sampai sekarang'
35
+ },
36
+ ErrorBlock: {
37
+ default: {
38
+ title: 'Halaman mengalami beberapa permasalahan kecil',
39
+ description: 'Coba lagi nanti'
40
+ },
41
+ busy: {
42
+ title: 'kepadatan diawal',
43
+ description: 'Coba untuk menyegarkan'
44
+ },
45
+ disconnected: {
46
+ title: 'jaringan sedikit sibuk',
47
+ description: 'Gerakkan jari Anda untuk membantu memperbaiki'
48
+ },
49
+ empty: {
50
+ title: 'Itu tidak menemukan apa yang Anda butuhkan',
51
+ description: 'Silahkan cari yang lain'
52
+ }
53
+ },
54
+ Form: {
55
+ required: 'Diperlukan',
56
+ optional: 'opsional untuk diisi',
57
+ defaultValidateMessages: {
58
+ default: 'Kesalahan validasi bidang ${label}',
59
+ required: 'Harap masukkan ${label}',
60
+ enum: '${label} harus salah satu dari [${enum}]',
61
+ whitespace: '${label} tidak boleh berupa karakter kosong',
62
+ date: {
63
+ format: 'Format tanggal ${label} tidak valid',
64
+ parse: '${label} tidak dapat dikonversi ke tanggal',
65
+ invalid: '${label} adalah tanggal yang tidak valid'
66
+ },
67
+ types: {
68
+ string: typeTemplate,
69
+ method: typeTemplate,
70
+ array: typeTemplate,
71
+ object: typeTemplate,
72
+ number: typeTemplate,
73
+ date: typeTemplate,
74
+ boolean: typeTemplate,
75
+ integer: typeTemplate,
76
+ float: typeTemplate,
77
+ regexp: typeTemplate,
78
+ email: typeTemplate,
79
+ url: typeTemplate,
80
+ hex: typeTemplate
81
+ },
82
+ string: {
83
+ len: '${label} harus berupa ${len} karakter',
84
+ min: '${label} Minimal ${min} karakter',
85
+ max: '${label}Maksimum ${max} karakter',
86
+ range: '${label} harus antara ${min}-${max} karakter'
87
+ },
88
+ number: {
89
+ len: '${label} harus sama dengan ${len}',
90
+ min: 'Nilai minimum ${label} adalah ${min}',
91
+ max: '${label} memiliki nilai maksimum ${max}',
92
+ range: '${label} harus antara ${min}-${max}'
93
+ },
94
+ array: {
95
+ len: 'Harus ${len} ${label}',
96
+ min: 'Minimal ${min} ${label}',
97
+ max: 'Hingga ${max} ${label}',
98
+ range: 'Jumlah ${label} harus antara ${min}-${max}'
99
+ },
100
+ pattern: {
101
+ mismatch: '${label} tidak cocok dengan pola ${pattern}'
102
+ }
103
+ }
104
+ },
105
+ ImageUploader: {
106
+ uploading: 'mengunggah...',
107
+ upload: 'diunggah'
108
+ },
109
+ InfiniteScroll: {
110
+ noMore: 'tidak ada lagi',
111
+ failedToLoad: 'Gagal memuat',
112
+ retry: 'memuat ulang'
113
+ },
114
+ Input: {
115
+ clear: 'Hapus'
116
+ },
117
+ Mask: {
118
+ name: 'lapisan pelindung'
119
+ },
120
+ Modal: {
121
+ ok: 'Saya mendapatkannya'
122
+ },
123
+ PasscodeInput: {
124
+ name: 'Kotak kata sandi'
125
+ },
126
+ PullToRefresh: {
127
+ pulling: 'Tarik ke bawah untuk menyegarkan',
128
+ canRelease: 'Lepaskan untuk menyegarkan segera',
129
+ complete: 'Segarkan berhasil'
130
+ },
131
+ SearchBar: {
132
+ name: 'Bilah Pencarian'
133
+ },
134
+ Slider: {
135
+ name: 'Penggeser'
136
+ },
137
+ Stepper: {
138
+ decrease: 'mengurangi',
139
+ increase: 'meningkat'
140
+ },
141
+ Switch: {
142
+ name: 'Mengalihkan'
143
+ },
144
+ Selector: {
145
+ name: 'Grup pilih'
146
+ }
147
+ });
148
+ var _default = inID;
149
+ exports.default = _default;
@@ -22,7 +22,7 @@ const jaJP = (0, _mergeLocale.mergeLocale)(_base.base, {
22
22
  placeholder: '選択下さい'
23
23
  },
24
24
  Dialog: {
25
- ok: 'わかりました'
25
+ ok: '了解'
26
26
  },
27
27
  ErrorBlock: {
28
28
  default: {
@@ -109,7 +109,7 @@ const jaJP = (0, _mergeLocale.mergeLocale)(_base.base, {
109
109
  name: 'マスク'
110
110
  },
111
111
  Modal: {
112
- ok: 'わかりました'
112
+ ok: '了解'
113
113
  },
114
114
  PasscodeInput: {
115
115
  name: 'パスコード入力'
@@ -28,7 +28,7 @@ const thTH = (0, _mergeLocale.mergeLocale)(_base.base, {
28
28
  placeholder: 'เลือก'
29
29
  },
30
30
  Dialog: {
31
- ok: 'โอเค'
31
+ ok: 'ฉันรู้แล้ว'
32
32
  },
33
33
  DatePicker: {
34
34
  tillNow: 'จนถึงตอนนี้'
@@ -118,7 +118,7 @@ const thTH = (0, _mergeLocale.mergeLocale)(_base.base, {
118
118
  name: 'มาสก์'
119
119
  },
120
120
  Modal: {
121
- ok: 'ตกลง'
121
+ ok: 'ฉันรู้แล้ว'
122
122
  },
123
123
  PasscodeInput: {
124
124
  name: 'ป้อนรหัสผ่าน'
@@ -1,2 +1,3 @@
1
1
  import { RefObject } from 'react';
2
+ export declare function observe(element: HTMLElement | null, options: MutationObserverInit, callback: VoidFunction): () => void;
2
3
  export declare function useMutationEffect(effect: () => void, targetRef: RefObject<HTMLElement>, options: MutationObserverInit): void;
@@ -3,19 +3,30 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.observe = observe;
6
7
  exports.useMutationEffect = useMutationEffect;
7
- var _react = require("react");
8
8
  var _ahooks = require("ahooks");
9
- function useMutationEffect(effect, targetRef, options) {
10
- const fn = (0, _ahooks.useMemoizedFn)(effect);
11
- (0, _react.useEffect)(() => {
12
- const observer = new MutationObserver(() => {
13
- fn();
9
+ var _react = require("react");
10
+ function observe(element, options, callback) {
11
+ if (element && typeof MutationObserver !== 'undefined') {
12
+ let observer = new MutationObserver(() => {
13
+ callback();
14
14
  });
15
- if (!targetRef.current) return;
16
- observer.observe(targetRef.current, options);
15
+ observer.observe(element, options);
16
+ // Return cleanup function
17
17
  return () => {
18
- observer.disconnect();
18
+ if (observer) {
19
+ observer.disconnect();
20
+ observer = null;
21
+ }
19
22
  };
23
+ }
24
+ return () => {};
25
+ }
26
+ function useMutationEffect(effect, targetRef, options) {
27
+ const fn = (0, _ahooks.useMemoizedFn)(effect);
28
+ (0, _react.useEffect)(() => {
29
+ const cleanup = observe(targetRef.current, options, fn);
30
+ return cleanup;
20
31
  }, [targetRef]);
21
32
  }
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import type { FC, ReactNode } from 'react';
2
+ import React from 'react';
3
3
  import { NativeProps } from '../../utils/native-props';
4
4
  export declare type CollapsePanelProps = {
5
5
  key: string;
@@ -1,14 +1,15 @@
1
- import React, { isValidElement, useRef } from 'react';
2
- import { withNativeProps } from '../../utils/native-props';
3
- import List from '../list';
1
+ import { animated, useSpring } from '@react-spring/web';
2
+ import { useMount } from 'ahooks';
4
3
  import { DownOutline } from 'antd-mobile-icons';
5
4
  import classNames from 'classnames';
6
- import { useSpring, animated } from '@react-spring/web';
7
- import { usePropsValue } from '../../utils/use-props-value';
8
- import { useMount } from 'ahooks';
5
+ import React, { isValidElement, useRef } from 'react';
6
+ import { withNativeProps } from '../../utils/native-props';
9
7
  import { useShouldRender } from '../../utils/should-render';
10
- import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect';
11
8
  import { traverseReactNode } from '../../utils/traverse-react-node';
9
+ import { useIsomorphicUpdateLayoutEffect } from '../../utils/use-isomorphic-update-layout-effect';
10
+ import { observe } from '../../utils/use-mutation-effect';
11
+ import { usePropsValue } from '../../utils/use-props-value';
12
+ import List from '../list';
12
13
  const classPrefix = `adm-collapse`;
13
14
  export const CollapsePanel = () => {
14
15
  return null;
@@ -46,9 +47,25 @@ const CollapsePanelContent = props => {
46
47
  const inner = innerRef.current;
47
48
  if (!inner) return;
48
49
  if (visible) {
49
- api.start({
50
- height: inner.offsetHeight
51
- });
50
+ let lastMotionId = 0;
51
+ let cancelObserve = () => {};
52
+ const handleMotion = () => {
53
+ lastMotionId += 1;
54
+ const motionId = lastMotionId;
55
+ api.start({
56
+ height: inner.offsetHeight
57
+ })[0].then(() => {
58
+ if (motionId === lastMotionId) {
59
+ cancelObserve();
60
+ }
61
+ });
62
+ };
63
+ cancelObserve = observe(inner, {
64
+ childList: true,
65
+ subtree: true
66
+ }, handleMotion);
67
+ handleMotion();
68
+ return cancelObserve;
52
69
  } else {
53
70
  api.start({
54
71
  height: inner.offsetHeight,
@@ -22,7 +22,7 @@ const arSA = mergeLocale(base, {
22
22
  'placeholder': 'اختر من فضلك'
23
23
  },
24
24
  'Dialog': {
25
- 'ok': 'عرفت'
25
+ 'ok': 'فهمت'
26
26
  },
27
27
  'DatePicker': {
28
28
  'tillNow': 'إلى اليوم'
@@ -112,7 +112,7 @@ const arSA = mergeLocale(base, {
112
112
  'name': 'قناع الخلفية'
113
113
  },
114
114
  'Modal': {
115
- 'ok': 'عرفت'
115
+ 'ok': 'فهمت'
116
116
  },
117
117
  'PasscodeInput': {
118
118
  'name': 'مربع إدخال كلمة المرور'
@@ -15,14 +15,14 @@ const deDE = mergeLocale(base, {
15
15
  'start': 'Starten',
16
16
  'end': 'Beenden',
17
17
  'today': 'Heute',
18
- 'markItems': ['Montag', 'Dienstag', 'Mittwoch', 'Donnerstag', 'Freitag', 'Samstag', 'Tag'],
18
+ 'markItems': ['I', 'II', 'III', 'IV', 'V', 'Sechs', 'Tag'],
19
19
  'yearAndMonth': '${year}Jahr${month}Monat'
20
20
  },
21
21
  'Cascader': {
22
22
  'placeholder': 'Bitte auswählen'
23
23
  },
24
24
  'Dialog': {
25
- 'ok': 'OK'
25
+ 'ok': 'Ich weiß.'
26
26
  },
27
27
  'DatePicker': {
28
28
  'tillNow': 'Bis heute'
@@ -112,7 +112,7 @@ const deDE = mergeLocale(base, {
112
112
  'name': 'Hintergrundmaske'
113
113
  },
114
114
  'Modal': {
115
- 'ok': 'OK'
115
+ 'ok': 'Ich weiß.'
116
116
  },
117
117
  'PasscodeInput': {
118
118
  'name': 'Passwort-Eingabefeld'
@@ -16,7 +16,7 @@ const esES = mergeLocale(base, {
16
16
  placeholder: 'Seleccionando'
17
17
  },
18
18
  Dialog: {
19
- ok: 'OK'
19
+ ok: 'Entendido'
20
20
  },
21
21
  ErrorBlock: {
22
22
  default: {
@@ -94,7 +94,7 @@ const esES = mergeLocale(base, {
94
94
  name: 'Máscara'
95
95
  },
96
96
  Modal: {
97
- ok: 'OK'
97
+ ok: 'Entendido'
98
98
  },
99
99
  PullToRefresh: {
100
100
  pulling: 'Desplácese hacia abajo para refrescar',
@@ -4,7 +4,7 @@ const typeTemplate = '${label}Pas un valide${type}';
4
4
  const frFR = mergeLocale(base, {
5
5
  locale: 'fr-FR',
6
6
  common: {
7
- confirm: 'Valider',
7
+ confirm: 'Activer',
8
8
  cancel: 'Annuler',
9
9
  loading: 'Chargement'
10
10
  },