@nativescript-community/ui-pager 14.1.33 → 14.1.39
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/CHANGELOG.md +352 -0
- package/angular/fesm2022/nativescript-community-ui-pager-angular.mjs +6 -5
- package/angular/fesm2022/nativescript-community-ui-pager-angular.mjs.map +1 -1
- package/angular/index.d.ts +2 -2
- package/angular/package.json +0 -2
- package/angular/pager-items-comp.d.ts +3 -3
- package/index.android.d.ts +21 -2
- package/index.ios.d.ts +16 -2
- package/index.ios.js +4 -1
- package/index.ios.js.map +1 -1
- package/package.json +5 -5
- package/react/index.d.ts +1 -1
- package/svelte/index.d.ts +1 -1
- package/svelte/index.js +1 -1
- package/svelte/index.js.map +1 -1
- package/tsconfig.tsbuildinfo +1 -0
- package/angular/esm2022/index.mjs +0 -55
- package/angular/esm2022/nativescript-community-ui-pager-angular.mjs +0 -5
- package/angular/esm2022/pager-items-comp.mjs +0 -332
- package/platforms/android/java/com/nativescript/pager/Utils.java.old +0 -52
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
+
|
|
6
|
+
## [14.1.39](https://github.com/nativescript-community/ui-pager/compare/v14.1.34...v14.1.39) (2026-03-31)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
9
|
+
|
|
10
|
+
## [14.1.34](https://github.com/nativescript-community/ui-pager/compare/v14.1.33...v14.1.34) (2025-09-12)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
13
|
+
|
|
14
|
+
## [14.1.33](https://github.com/nativescript-community/ui-pager/compare/v14.1.32...v14.1.33) (2025-01-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
17
|
+
|
|
18
|
+
## [14.1.32](https://github.com/nativescript-community/ui-pager/compare/v14.1.31...v14.1.32) (2024-12-17)
|
|
19
|
+
|
|
20
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
21
|
+
|
|
22
|
+
## [14.1.31](https://github.com/nativescript-community/ui-pager/compare/v14.1.30...v14.1.31) (2024-12-16)
|
|
23
|
+
|
|
24
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
25
|
+
|
|
26
|
+
## [14.1.30](https://github.com/nativescript-community/ui-pager/compare/v14.1.29...v14.1.30) (2024-12-14)
|
|
27
|
+
|
|
28
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
29
|
+
|
|
30
|
+
## [14.1.29](https://github.com/nativescript-community/ui-pager/compare/v14.1.28...v14.1.29) (2024-12-10)
|
|
31
|
+
|
|
32
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
33
|
+
|
|
34
|
+
## [14.1.28](https://github.com/nativescript-community/ui-pager/compare/v14.1.27...v14.1.28) (2024-11-07)
|
|
35
|
+
|
|
36
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
37
|
+
|
|
38
|
+
## [14.1.27](https://github.com/nativescript-community/ui-pager/compare/v14.1.26...v14.1.27) (2024-10-08)
|
|
39
|
+
|
|
40
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
41
|
+
|
|
42
|
+
## [14.1.26](https://github.com/nativescript-community/ui-pager/compare/v14.1.25...v14.1.26) (2024-10-06)
|
|
43
|
+
|
|
44
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
45
|
+
|
|
46
|
+
## [14.1.25](https://github.com/nativescript-community/ui-pager/compare/v14.1.24...v14.1.25) (2024-05-31)
|
|
47
|
+
|
|
48
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
49
|
+
|
|
50
|
+
## [14.1.24](https://github.com/nativescript-community/ui-pager/compare/v14.1.23...v14.1.24) (2024-05-14)
|
|
51
|
+
|
|
52
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
53
|
+
|
|
54
|
+
## [14.1.23](https://github.com/nativescript-community/ui-pager/compare/v14.1.22...v14.1.23) (2024-04-17)
|
|
55
|
+
|
|
56
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
57
|
+
|
|
58
|
+
## [14.1.22](https://github.com/nativescript-community/ui-pager/compare/v14.1.21...v14.1.22) (2024-03-22)
|
|
59
|
+
|
|
60
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
61
|
+
|
|
62
|
+
## [14.1.21](https://github.com/nativescript-community/ui-pager/compare/v14.1.20...v14.1.21) (2024-03-22)
|
|
63
|
+
|
|
64
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
65
|
+
|
|
66
|
+
## [14.1.20](https://github.com/nativescript-community/ui-pager/compare/v14.1.19...v14.1.20) (2024-03-01)
|
|
67
|
+
|
|
68
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
69
|
+
|
|
70
|
+
## [14.1.19](https://github.com/nativescript-community/ui-pager/compare/v14.1.18...v14.1.19) (2024-02-15)
|
|
71
|
+
|
|
72
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
73
|
+
|
|
74
|
+
## [14.1.18](https://github.com/nativescript-community/ui-pager/compare/v14.1.17...v14.1.18) (2024-02-09)
|
|
75
|
+
|
|
76
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
77
|
+
|
|
78
|
+
## [14.1.17](https://github.com/nativescript-community/ui-pager/compare/v14.1.16...v14.1.17) (2024-02-09)
|
|
79
|
+
|
|
80
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
81
|
+
|
|
82
|
+
## [14.1.16](https://github.com/nativescript-community/ui-pager/compare/v14.1.15...v14.1.16) (2023-12-14)
|
|
83
|
+
|
|
84
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
85
|
+
|
|
86
|
+
## [14.1.15](https://github.com/nativescript-community/ui-pager/compare/v14.1.14...v14.1.15) (2023-12-14)
|
|
87
|
+
|
|
88
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
89
|
+
|
|
90
|
+
## [14.1.14](https://github.com/nativescript-community/ui-pager/compare/v14.1.13...v14.1.14) (2023-12-12)
|
|
91
|
+
|
|
92
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
93
|
+
|
|
94
|
+
## [14.1.13](https://github.com/nativescript-community/ui-pager/compare/v14.1.12...v14.1.13) (2023-12-11)
|
|
95
|
+
|
|
96
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
97
|
+
|
|
98
|
+
## [14.1.12](https://github.com/nativescript-community/ui-pager/compare/v14.1.11...v14.1.12) (2023-12-10)
|
|
99
|
+
|
|
100
|
+
### Bug Fixes
|
|
101
|
+
|
|
102
|
+
* **android:** peaking and spacing can work together with improved performances ([f8fa9e4](https://github.com/nativescript-community/ui-pager/commit/f8fa9e43e314f85f3066cbb91a632bfdd0f0f376))
|
|
103
|
+
|
|
104
|
+
## [14.1.11](https://github.com/nativescript-community/ui-pager/compare/v14.1.10...v14.1.11) (2023-12-08)
|
|
105
|
+
|
|
106
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
107
|
+
|
|
108
|
+
## [14.1.10](https://github.com/nativescript-community/ui-pager/compare/v14.1.9...v14.1.10) (2023-12-08)
|
|
109
|
+
|
|
110
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
111
|
+
|
|
112
|
+
## [14.1.9](https://github.com/nativescript-community/ui-pager/compare/v14.1.8...v14.1.9) (2023-11-17)
|
|
113
|
+
|
|
114
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
115
|
+
|
|
116
|
+
## [14.1.8](https://github.com/nativescript-community/ui-pager/compare/v14.1.7...v14.1.8) (2023-09-18)
|
|
117
|
+
|
|
118
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
119
|
+
|
|
120
|
+
## [14.1.7](https://github.com/nativescript-community/ui-pager/compare/v14.1.6...v14.1.7) (2023-09-18)
|
|
121
|
+
|
|
122
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
123
|
+
|
|
124
|
+
## [14.1.6](https://github.com/nativescript-community/ui-pager/compare/v14.1.5...v14.1.6) (2023-05-11)
|
|
125
|
+
|
|
126
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
127
|
+
|
|
128
|
+
## [14.1.5](https://github.com/nativescript-community/ui-pager/compare/v14.1.4...v14.1.5) (2023-05-10)
|
|
129
|
+
|
|
130
|
+
### Bug Fixes
|
|
131
|
+
|
|
132
|
+
* **android:** prevent views from disappearing when using peaking ([54519ca](https://github.com/nativescript-community/ui-pager/commit/54519ca5c72ea67b1101dcee9f64fedb9556096d))
|
|
133
|
+
|
|
134
|
+
## [14.1.4](https://github.com/nativescript-community/ui-pager/compare/v14.1.3...v14.1.4) (2023-05-09)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
137
|
+
|
|
138
|
+
## [14.1.3](https://github.com/nativescript-community/ui-pager/compare/v14.1.2...v14.1.3) (2023-04-06)
|
|
139
|
+
|
|
140
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
141
|
+
|
|
142
|
+
## [14.1.2](https://github.com/nativescript-community/ui-pager/compare/v14.1.1...v14.1.2) (2023-03-21)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
145
|
+
|
|
146
|
+
## [14.1.1](https://github.com/nativescript-community/ui-pager/compare/v14.1.0...v14.1.1) (2023-01-28)
|
|
147
|
+
|
|
148
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
149
|
+
|
|
150
|
+
# [14.1.0](https://github.com/nativescript-community/ui-pager/compare/v14.0.3...v14.1.0) (2023-01-23)
|
|
151
|
+
|
|
152
|
+
### Features
|
|
153
|
+
|
|
154
|
+
* allow to register custom transformers ([5eed813](https://github.com/nativescript-community/ui-pager/commit/5eed813b11f07b689582a6ae63f1c6520c2b8916))
|
|
155
|
+
|
|
156
|
+
## [14.0.3](https://github.com/nativescript-community/ui-pager/compare/v14.0.2...v14.0.3) (2023-01-23)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
159
|
+
|
|
160
|
+
## [14.0.2](https://github.com/nativescript-community/ui-pager/compare/v14.0.0...v14.0.2) (2023-01-23)
|
|
161
|
+
|
|
162
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
163
|
+
|
|
164
|
+
# [14.0.0](https://github.com/nativescript-community/ui-pager/compare/v13.0.44...v14.0.0) (2023-01-23)
|
|
165
|
+
|
|
166
|
+
### Features
|
|
167
|
+
|
|
168
|
+
* moved indicator into it's own package ([631859d](https://github.com/nativescript-community/ui-pager/commit/631859d077d4afcc52e4ac06a3ab1f326e64f593))
|
|
169
|
+
|
|
170
|
+
### BREAKING CHANGES
|
|
171
|
+
|
|
172
|
+
* You now create a `PagerIndicator`(from `@nativescript-community/ui-pager-indicator) and set `pagerViewId` on it to the id of your Pager.
|
|
173
|
+
|
|
174
|
+
## [13.0.44](https://github.com/nativescript-community/ui-pager/compare/v13.0.43...v13.0.44) (2022-12-01)
|
|
175
|
+
|
|
176
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
177
|
+
|
|
178
|
+
## [13.0.43](https://github.com/nativescript-community/ui-pager/compare/v13.0.42...v13.0.43) (2022-08-31)
|
|
179
|
+
|
|
180
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
181
|
+
|
|
182
|
+
## [13.0.42](https://github.com/nativescript-community/ui-pager/compare/v13.0.40...v13.0.42) (2022-07-28)
|
|
183
|
+
|
|
184
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
185
|
+
|
|
186
|
+
## [13.0.41](https://github.com/nativescript-community/ui-pager/compare/v13.0.40...v13.0.41) (2022-07-28)
|
|
187
|
+
|
|
188
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
189
|
+
|
|
190
|
+
## [13.0.40](https://github.com/nativescript-community/ui-pager/compare/v13.0.39...v13.0.40) (2022-07-17)
|
|
191
|
+
|
|
192
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
193
|
+
|
|
194
|
+
## [13.0.39](https://github.com/nativescript-community/ui-pager/compare/v13.0.38...v13.0.39) (2022-07-15)
|
|
195
|
+
|
|
196
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
197
|
+
|
|
198
|
+
## [13.0.38](https://github.com/nativescript-community/ui-pager/compare/v13.0.37...v13.0.38) (2022-07-15)
|
|
199
|
+
|
|
200
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
201
|
+
|
|
202
|
+
## [13.0.37](https://github.com/nativescript-community/ui-pager/compare/v13.0.36...v13.0.37) (2022-05-17)
|
|
203
|
+
|
|
204
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
205
|
+
|
|
206
|
+
## [13.0.36](https://github.com/nativescript-community/ui-pager/compare/v13.0.35...v13.0.36) (2022-05-17)
|
|
207
|
+
|
|
208
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
209
|
+
|
|
210
|
+
## [13.0.35](https://github.com/nativescript-community/ui-pager/compare/v13.0.34...v13.0.35) (2022-03-15)
|
|
211
|
+
|
|
212
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
213
|
+
|
|
214
|
+
## [13.0.34](https://github.com/nativescript-community/ui-pager/compare/v13.0.33...v13.0.34) (2022-01-19)
|
|
215
|
+
|
|
216
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
217
|
+
|
|
218
|
+
## [13.0.33](https://github.com/nativescript-community/ui-pager/compare/v13.0.32...v13.0.33) (2021-11-17)
|
|
219
|
+
|
|
220
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
221
|
+
|
|
222
|
+
## [13.0.32](https://github.com/nativescript-community/ui-pager/compare/v13.0.31...v13.0.32) (2021-11-15)
|
|
223
|
+
|
|
224
|
+
### Bug Fixes
|
|
225
|
+
|
|
226
|
+
* missing platforms directory ([44bff68](https://github.com/nativescript-community/ui-pager/commit/44bff68074855d14032201fe9198e1519ab22ca0))
|
|
227
|
+
|
|
228
|
+
## [13.0.31](https://github.com/nativescript-community/ui-pager/compare/v13.0.30...v13.0.31) (2021-10-22)
|
|
229
|
+
|
|
230
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
231
|
+
|
|
232
|
+
## [13.0.30](https://github.com/nativescript-community/ui-pager/compare/v13.0.29...v13.0.30) (2021-09-29)
|
|
233
|
+
|
|
234
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
235
|
+
|
|
236
|
+
## [13.0.29](https://github.com/nativescript-community/ui-pager/compare/v13.0.28...v13.0.29) (2021-09-17)
|
|
237
|
+
|
|
238
|
+
### Bug Fixes
|
|
239
|
+
|
|
240
|
+
* **android:** allow to change appcompat version ([8925202](https://github.com/nativescript-community/ui-pager/commit/8925202f1787054e1791f7ebfdf82b6f8d078746))
|
|
241
|
+
|
|
242
|
+
## [13.0.28](https://github.com/nativescript-community/ui-pager/compare/v13.0.27...v13.0.28) (2021-09-17)
|
|
243
|
+
|
|
244
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
245
|
+
|
|
246
|
+
## [13.0.27](https://github.com/nativescript-community/ui-pager/compare/v13.0.26...v13.0.27) (2021-08-19)
|
|
247
|
+
|
|
248
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
249
|
+
|
|
250
|
+
## [13.0.26](https://github.com/nativescript-community/ui-pager/compare/v13.0.25...v13.0.26) (2021-08-08)
|
|
251
|
+
|
|
252
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
253
|
+
|
|
254
|
+
## [13.0.25](https://github.com/nativescript-community/ui-pager/compare/v13.0.24...v13.0.25) (2021-08-05)
|
|
255
|
+
|
|
256
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
257
|
+
|
|
258
|
+
## [13.0.24](https://github.com/nativescript-community/ui-pager/compare/v13.0.23...v13.0.24) (2021-08-04)
|
|
259
|
+
|
|
260
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
261
|
+
|
|
262
|
+
## [13.0.23](https://github.com/nativescript-community/ui-pager/compare/v13.0.22...v13.0.23) (2021-07-26)
|
|
263
|
+
|
|
264
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
265
|
+
|
|
266
|
+
## [13.0.22](https://github.com/nativescript-community/ui-pager/compare/v13.0.21...v13.0.22) (2021-07-26)
|
|
267
|
+
|
|
268
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
269
|
+
|
|
270
|
+
## [13.0.21](https://github.com/nativescript-community/ui-pager/compare/v13.0.20...v13.0.21) (2021-05-07)
|
|
271
|
+
|
|
272
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
273
|
+
|
|
274
|
+
## [13.0.20](https://github.com/nativescript-community/ui-pager/compare/v13.0.19...v13.0.20) (2021-05-06)
|
|
275
|
+
|
|
276
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
277
|
+
|
|
278
|
+
## [13.0.19](https://github.com/nativescript-community/ui-pager/compare/v13.0.18...v13.0.19) (2021-04-08)
|
|
279
|
+
|
|
280
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
281
|
+
|
|
282
|
+
## [13.0.18](https://github.com/nativescript-community/ui-pager/compare/v13.0.17...v13.0.18) (2021-03-31)
|
|
283
|
+
|
|
284
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
285
|
+
|
|
286
|
+
## [13.0.17](https://github.com/nativescript-community/ui-pager/compare/v13.0.16...v13.0.17) (2021-03-25)
|
|
287
|
+
|
|
288
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
289
|
+
|
|
290
|
+
## [13.0.16](https://github.com/nativescript-community/ui-pager/compare/v13.0.15...v13.0.16) (2021-03-19)
|
|
291
|
+
|
|
292
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
293
|
+
|
|
294
|
+
## [13.0.15](https://github.com/nativescript-community/ui-pager/compare/v13.0.14...v13.0.15) (2021-03-18)
|
|
295
|
+
|
|
296
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
297
|
+
|
|
298
|
+
## [13.0.14](https://github.com/nativescript-community/ui-pager/compare/v13.0.13...v13.0.14) (2021-03-16)
|
|
299
|
+
|
|
300
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
301
|
+
|
|
302
|
+
## [13.0.13](https://github.com/nativescript-community/ui-pager/compare/v13.0.12...v13.0.13) (2021-03-12)
|
|
303
|
+
|
|
304
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
305
|
+
|
|
306
|
+
## [13.0.12](https://github.com/nativescript-community/ui-pager/compare/v13.0.11...v13.0.12) (2021-03-08)
|
|
307
|
+
|
|
308
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
309
|
+
|
|
310
|
+
## [13.0.11](https://github.com/nativescript-community/ui-pager/compare/v13.0.10...v13.0.11) (2021-02-16)
|
|
311
|
+
|
|
312
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
313
|
+
|
|
314
|
+
## [13.0.10](https://github.com/nativescript-community/ui-pager/compare/v13.0.9...v13.0.10) (2021-02-10)
|
|
315
|
+
|
|
316
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
317
|
+
|
|
318
|
+
## [13.0.9](https://github.com/nativescript-community/ui-pager/compare/v13.0.8...v13.0.9) (2021-02-10)
|
|
319
|
+
|
|
320
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
321
|
+
|
|
322
|
+
## [13.0.8](https://github.com/nativescript-community/ui-pager/compare/v13.0.7...v13.0.8) (2021-02-09)
|
|
323
|
+
|
|
324
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
325
|
+
|
|
326
|
+
## [13.0.7](https://github.com/nativescript-community/ui-pager/compare/v13.0.6...v13.0.7) (2021-02-08)
|
|
327
|
+
|
|
328
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
329
|
+
|
|
330
|
+
## [13.0.6](https://github.com/nativescript-community/ui-pager/compare/v13.0.5...v13.0.6) (2021-01-23)
|
|
331
|
+
|
|
332
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
333
|
+
|
|
334
|
+
## [13.0.5](https://github.com/nativescript-community/ui-pager/compare/v13.0.4...v13.0.5) (2021-01-22)
|
|
335
|
+
|
|
336
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
337
|
+
|
|
338
|
+
## [13.0.4](https://github.com/nativescript-community/ui-pager/compare/v13.0.3...v13.0.4) (2021-01-21)
|
|
339
|
+
|
|
340
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
341
|
+
|
|
342
|
+
## [13.0.3](https://github.com/nativescript-community/ui-pager/compare/v13.0.2...v13.0.3) (2020-12-07)
|
|
343
|
+
|
|
344
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
345
|
+
|
|
346
|
+
## [13.0.2](https://github.com/nativescript-community/ui-pager/compare/v13.0.1...v13.0.2) (2020-11-29)
|
|
347
|
+
|
|
348
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
349
|
+
|
|
350
|
+
## [13.0.1](https://github.com/nativescript-community/ui-pager/compare/v11.0.11...v13.0.1) (2020-11-27)
|
|
351
|
+
|
|
352
|
+
**Note:** Version bump only for package @nativescript-community/ui-pager
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter,
|
|
2
|
+
import { EventEmitter, ViewContainerRef, TemplateRef, Component, Input, ContentChild, Output, ViewChild, InjectionToken, Directive, Inject, Host, forwardRef, NO_ERRORS_SCHEMA, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
3
3
|
import { Pager, PagerItem, PagerLog, PagerError } from '@nativescript-community/ui-pager';
|
|
4
4
|
import { registerElement, isListLikeIterable, extractSingleViewRecursive, isInvisibleNode } from '@nativescript/angular';
|
|
5
5
|
import { isIOS, Trace, LayoutBase } from '@nativescript/core';
|
|
@@ -363,10 +363,11 @@ class PagerComponent extends TemplatedItemsComponent {
|
|
|
363
363
|
provide: TEMPLATED_ITEMS_COMPONENT,
|
|
364
364
|
useExisting: forwardRef(() => PagerComponent)
|
|
365
365
|
}
|
|
366
|
-
]
|
|
366
|
+
],
|
|
367
|
+
schemas: [NO_ERRORS_SCHEMA]
|
|
367
368
|
}]
|
|
368
369
|
}], () => [{ type: i0.ElementRef }, { type: i0.IterableDiffers }], null); })();
|
|
369
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PagerComponent, { className: "PagerComponent", filePath: "index.ts", lineNumber:
|
|
370
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PagerComponent, { className: "PagerComponent", filePath: "index.ts", lineNumber: 22 }); })();
|
|
370
371
|
class PagerModule {
|
|
371
372
|
static ɵfac = function PagerModule_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PagerModule)(); };
|
|
372
373
|
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PagerModule });
|
|
@@ -375,12 +376,12 @@ class PagerModule {
|
|
|
375
376
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PagerModule, [{
|
|
376
377
|
type: NgModule,
|
|
377
378
|
args: [{
|
|
378
|
-
|
|
379
|
+
imports: [PagerComponent, TemplateKeyDirective, PagerItemDirective],
|
|
379
380
|
exports: [PagerComponent, TemplateKeyDirective, PagerItemDirective],
|
|
380
381
|
schemas: [NO_ERRORS_SCHEMA]
|
|
381
382
|
}]
|
|
382
383
|
}], null, null); })();
|
|
383
|
-
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PagerModule, {
|
|
384
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PagerModule, { imports: [PagerComponent, TemplateKeyDirective, PagerItemDirective], exports: [PagerComponent, TemplateKeyDirective, PagerItemDirective] }); })();
|
|
384
385
|
|
|
385
386
|
/**
|
|
386
387
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nativescript-community-ui-pager-angular.mjs","sources":["../../../../src/ui-pager/angular/pager-items-comp.ts","../../../../src/ui-pager/angular/index.ts","../../../../src/ui-pager/angular/nativescript-community-ui-pager-angular.ts"],"sourcesContent":["import {\n AfterContentInit,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n Inject,\n InjectionToken,\n Input,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { Pager, PagerError, PagerItem, PagerLog } from '@nativescript-community/ui-pager';\nimport { extractSingleViewRecursive, isInvisibleNode, isListLikeIterable, registerElement } from '@nativescript/angular';\nimport { EventData, KeyedTemplate, LayoutBase, Template, Trace, View, isIOS } from '@nativescript/core';\nimport { ObservableArray } from '@nativescript/core/data/observable-array';\nimport { profile } from '@nativescript/core/profiling';\nimport { ItemEventData, ItemsSource } from '@nativescript/core/ui/list-view';\n\nregisterElement('Pager', () => Pager);\nregisterElement('PagerItem', () => PagerItem);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport interface PagerTemplatedItemsView {\n items: any[] | ItemsSource;\n itemTemplate: string | Template;\n itemTemplates?: string | KeyedTemplate[];\n\n refresh(): void;\n\n on(event: 'itemDisposing' | 'itemLoading', callback: (args: ItemEventData) => void, thisArg?: any);\n\n off(event: 'itemLoading' | 'itemDisposing', callback: (args: EventData) => void, thisArg?: any);\n}\n\nexport class ItemContext {\n constructor(public $implicit?: any, public item?: any, public index?: number, public even?: boolean, public odd?: boolean) {}\n}\n\nexport interface SetupItemViewArgs {\n view: EmbeddedViewRef<any>;\n data: any;\n index: number;\n context: ItemContext;\n}\n@Component({\n template: ''\n})\nexport abstract class TemplatedItemsComponent implements DoCheck, OnDestroy, AfterContentInit {\n public abstract get nativeElement(): Pager;\n\n protected templatedItemsView: Pager;\n protected _items: any;\n protected _differ: IterableDiffer<KeyedTemplate>;\n protected _templateMap: Map<string, KeyedTemplate>;\n private _selectedIndex: number;\n @ViewChild('loader', { read: ViewContainerRef, static: false }) loader: ViewContainerRef;\n\n @Output()\n public setupItemView = new EventEmitter<SetupItemViewArgs>();\n\n @ContentChild(TemplateRef, { static: false }) itemTemplateQuery: TemplateRef<ItemContext>;\n\n itemTemplate: TemplateRef<ItemContext>;\n\n @Input()\n get items() {\n return this._items;\n }\n\n set items(value: any) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => item);\n }\n\n this.templatedItemsView.items = this._items;\n }\n\n @Input()\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n set selectedIndex(value) {\n this._selectedIndex = value;\n this.templatedItemsView.selectedIndex = this._selectedIndex;\n }\n\n ngAfterViewInit() {\n if (!!this._selectedIndex) {\n setTimeout(() => {\n if (isIOS) {\n this.templatedItemsView.scrollToIndexAnimated(this._selectedIndex, false);\n }\n this.templatedItemsView.selectedIndex = this._selectedIndex;\n });\n }\n }\n\n constructor(_elementRef: ElementRef, private _iterableDiffers: IterableDiffers) {\n this.templatedItemsView = _elementRef.nativeElement;\n\n this.templatedItemsView.on('itemLoading', this.onItemLoading, this);\n this.templatedItemsView.on('itemDisposing', this.onItemDisposing, this);\n }\n\n ngAfterContentInit() {\n if (Trace.isEnabled()) {\n PagerLog('TemplatedItemsView.ngAfterContentInit()');\n }\n this.setItemTemplates();\n }\n\n ngOnDestroy() {\n this.templatedItemsView.off('itemLoading', this.onItemLoading, this);\n this.templatedItemsView.off('itemDisposing', this.onItemDisposing, this);\n }\n\n private setItemTemplates() {\n if (!this.items) return;\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.itemTemplate = this.itemTemplateQuery;\n\n if (this._templateMap) {\n if (Trace.isEnabled()) {\n PagerLog('Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value) => {\n templates.push(value);\n });\n this.templatedItemsView.itemTemplates = templates;\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext>) {\n if (Trace.isEnabled()) {\n PagerLog(`registerTemplate for key: ${key}`);\n }\n\n if (!this._templateMap) {\n this._templateMap = new Map<string, KeyedTemplate>();\n }\n\n const keyedTemplate = {\n key,\n createView: this.getItemTemplateViewFactory(template)\n };\n\n this._templateMap.set(key, keyedTemplate);\n }\n\n @profile\n public onItemLoading(args: ItemEventData) {\n if (!args.view && !this.itemTemplate) {\n return;\n }\n\n if (!this.items) return;\n\n const index = args.index;\n const items = (args.object as any).items;\n const currentItem = typeof items.getItem === 'function' ? items.getItem(index) : items[index];\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (args.view) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemLoading: ${index} - Reusing existing view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n PagerError(`ViewReference not found for item ${index}. View recycling is not working`);\n }\n }\n\n if (!viewRef) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemLoading: ${index} - Creating view from template`);\n }\n\n viewRef = this.loader.createEmbeddedView(this.itemTemplate, new ItemContext(), 0);\n args.view = getItemViewRoot(viewRef);\n args.view[NG_VIEW] = viewRef;\n }\n\n this.setupViewRef(viewRef, currentItem, index);\n\n this.detectChangesOnChild(viewRef, index);\n }\n\n @profile\n public onItemDisposing(args: ItemEventData) {\n if (!args.view) {\n return;\n }\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (args.view) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemDisposing: ${args.index} - Removing angular view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n PagerError(`ViewReference not found for item ${args.index}. View disposing is not working`);\n }\n }\n\n if (viewRef) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemDisposing: ${args.index} - Disposing view reference`);\n }\n\n viewRef.destroy();\n }\n }\n\n public setupViewRef(viewRef: EmbeddedViewRef<ItemContext>, data: any, index: number): void {\n const context = viewRef.context;\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n\n this.setupItemView.next({\n view: viewRef,\n data,\n index,\n context\n });\n }\n\n protected getItemTemplateViewFactory(template: TemplateRef<ItemContext>): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(template, new ItemContext(), 0);\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n\n return resultView;\n };\n }\n\n @profile\n private detectChangesOnChild(viewRef: EmbeddedViewRef<ItemContext>, index: number) {\n if (Trace.isEnabled()) {\n PagerLog(`Manually detect changes in child: ${index}`);\n }\n\n viewRef.markForCheck();\n viewRef.detectChanges();\n }\n\n ngDoCheck() {\n if (this._differ) {\n if (Trace.isEnabled()) {\n PagerLog('ngDoCheck() - execute differ');\n }\n\n const changes = this._differ.diff(this._items);\n if (changes) {\n if (Trace.isEnabled()) {\n PagerLog('ngDoCheck() - refresh');\n }\n\n this.templatedItemsView.refresh();\n }\n }\n }\n}\n\nexport interface ComponentView {\n rootNodes: any[];\n\n destroy(): void;\n}\n\nexport type RootLocator = (nodes: any[], nestLevel: number) => View;\n\nexport function getItemViewRoot(viewRef: ComponentView, rootLocator: RootLocator = extractSingleViewRecursive as any): View {\n return rootLocator(viewRef.rootNodes, 0);\n}\n\nexport const TEMPLATED_ITEMS_COMPONENT = new InjectionToken<TemplatedItemsComponent>('TemplatedItemsComponent');\n\n@Directive({\n selector: '[pagerItem]'\n})\nexport class PagerItemDirective implements OnInit {\n private item: PagerItem;\n\n constructor(\n private templateRef: TemplateRef<any>,\n @Inject(TEMPLATED_ITEMS_COMPONENT)\n @Host()\n private owner: TemplatedItemsComponent,\n private viewContainer: ViewContainerRef\n ) {}\n\n private ensureItem() {\n if (!this.item) {\n this.item = new PagerItem();\n }\n }\n\n private applyConfig() {\n this.ensureItem();\n }\n\n ngOnInit() {\n this.applyConfig();\n\n const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);\n // Filter out text nodes and comments\n const realViews = viewRef.rootNodes.filter((node) => !isInvisibleNode(node));\n\n if (realViews.length > 0) {\n const view = realViews[0];\n this.item.addChild(view);\n this.owner.nativeElement._addChildFromBuilder('PagerItem', this.item);\n }\n }\n}\n\n@Directive({ selector: '[pagerTemplateKey]' })\nexport class TemplateKeyDirective {\n constructor(\n private templateRef: TemplateRef<any>,\n @Inject(TEMPLATED_ITEMS_COMPONENT)\n @Host()\n private comp: TemplatedItemsComponent\n ) {}\n\n @Input()\n set pagerTemplateKey(value: any) {\n if (this.comp && this.templateRef) {\n this.comp.registerTemplate(value, this.templateRef);\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, IterableDiffers, NO_ERRORS_SCHEMA, NgModule, forwardRef } from '@angular/core';\n\nimport { Pager } from '@nativescript-community/ui-pager';\nimport { PagerItemDirective, TEMPLATED_ITEMS_COMPONENT, TemplateKeyDirective, TemplatedItemsComponent } from './pager-items-comp';\n\nexport { PagerItemDirective, TemplatedItemsComponent, TemplateKeyDirective } from './pager-items-comp';\n\n@Component({\n selector: 'Pager',\n template: ` <DetachedContainer>\n <Placeholder #loader></Placeholder>\n </DetachedContainer>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TEMPLATED_ITEMS_COMPONENT,\n useExisting: forwardRef(() => PagerComponent)\n }\n ]\n})\nexport class PagerComponent extends TemplatedItemsComponent {\n public get nativeElement(): Pager {\n return this.templatedItemsView;\n }\n\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers) {\n super(_elementRef, _iterableDiffers);\n }\n}\n\n@NgModule({\n declarations: [PagerComponent, TemplateKeyDirective, PagerItemDirective],\n exports: [PagerComponent, TemplateKeyDirective, PagerItemDirective],\n schemas: [NO_ERRORS_SCHEMA]\n})\nexport class PagerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA6BA,eAAe,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC;AACrC,eAAe,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,GAAG,YAAY;MAcf,WAAW,CAAA;AACD,IAAA,SAAA;AAAwB,IAAA,IAAA;AAAmB,IAAA,KAAA;AAAuB,IAAA,IAAA;AAAuB,IAAA,GAAA;IAA5G,WAAmB,CAAA,SAAe,EAAS,IAAU,EAAS,KAAc,EAAS,IAAc,EAAS,GAAa,EAAA;QAAtG,IAAS,CAAA,SAAA,GAAT,SAAS;QAAe,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAe,IAAK,CAAA,KAAA,GAAL,KAAK;QAAkB,IAAI,CAAA,IAAA,GAAJ,IAAI;QAAmB,IAAG,CAAA,GAAA,GAAH,GAAG;;AAClH;MAWqB,uBAAuB,CAAA;AAwDI,IAAA,gBAAA;AArDnC,IAAA,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AO,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;gBACnE,OAAO,EAAE,CAAC,gBAAgB;AAC7B,aAAA;;wFACY,WAAW,EAAA,EAAA,YAAA,EAAA,CAfX,cAAc,EAWQ,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAX9D,cAAc,EAYG,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,EAAA,GAAA;;AChCtE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"nativescript-community-ui-pager-angular.mjs","sources":["../../../../src/ui-pager/angular/pager-items-comp.ts","../../../../src/ui-pager/angular/index.ts","../../../../src/ui-pager/angular/nativescript-community-ui-pager-angular.ts"],"sourcesContent":["import {\n AfterContentInit,\n Component,\n ContentChild,\n Directive,\n DoCheck,\n ElementRef,\n EmbeddedViewRef,\n EventEmitter,\n Host,\n Inject,\n InjectionToken,\n Input,\n IterableDiffer,\n IterableDiffers,\n OnDestroy,\n OnInit,\n Output,\n TemplateRef,\n ViewChild,\n ViewContainerRef\n} from '@angular/core';\nimport { Pager, PagerError, PagerItem, PagerLog } from '@nativescript-community/ui-pager';\nimport { extractSingleViewRecursive, isInvisibleNode, isListLikeIterable, registerElement } from '@nativescript/angular';\nimport { EventData, KeyedTemplate, LayoutBase, Template, Trace, View, isIOS } from '@nativescript/core';\nimport { ObservableArray } from '@nativescript/core/data/observable-array';\nimport { profile } from '@nativescript/core/profiling';\nimport { ItemEventData, ItemsSource } from '@nativescript/core/ui/list-view';\n\nregisterElement('Pager', () => Pager);\nregisterElement('PagerItem', () => PagerItem);\n\nconst NG_VIEW = '_ngViewRef';\n\nexport interface PagerTemplatedItemsView {\n items: any[] | ItemsSource;\n itemTemplate: string | Template;\n itemTemplates?: string | KeyedTemplate[];\n\n refresh(): void;\n\n on(event: 'itemDisposing' | 'itemLoading', callback: (args: ItemEventData) => void, thisArg?: any);\n\n off(event: 'itemLoading' | 'itemDisposing', callback: (args: EventData) => void, thisArg?: any);\n}\n\nexport class ItemContext {\n constructor(public $implicit?: any, public item?: any, public index?: number, public even?: boolean, public odd?: boolean) {}\n}\n\nexport interface SetupItemViewArgs {\n view: EmbeddedViewRef<any>;\n data: any;\n index: number;\n context: ItemContext;\n}\n@Component({\n template: ''\n})\nexport abstract class TemplatedItemsComponent implements DoCheck, OnDestroy, AfterContentInit {\n public abstract get nativeElement(): Pager;\n\n protected templatedItemsView: Pager;\n protected _items: any;\n protected _differ: IterableDiffer<KeyedTemplate>;\n protected _templateMap: Map<string, KeyedTemplate>;\n private _selectedIndex: number;\n @ViewChild('loader', { read: ViewContainerRef, static: false }) loader: ViewContainerRef;\n\n @Output()\n public setupItemView = new EventEmitter<SetupItemViewArgs>();\n\n @ContentChild(TemplateRef, { static: false }) itemTemplateQuery: TemplateRef<ItemContext>;\n\n itemTemplate: TemplateRef<ItemContext>;\n\n @Input()\n get items() {\n return this._items;\n }\n\n set items(value: any) {\n this._items = value;\n let needDiffer = true;\n if (value instanceof ObservableArray) {\n needDiffer = false;\n }\n if (needDiffer && !this._differ && isListLikeIterable(value)) {\n this._differ = this._iterableDiffers.find(this._items).create((_index, item) => item);\n }\n\n this.templatedItemsView.items = this._items;\n }\n\n @Input()\n get selectedIndex(): number {\n return this._selectedIndex;\n }\n\n set selectedIndex(value) {\n this._selectedIndex = value;\n this.templatedItemsView.selectedIndex = this._selectedIndex;\n }\n\n ngAfterViewInit() {\n if (!!this._selectedIndex) {\n setTimeout(() => {\n if (isIOS) {\n this.templatedItemsView.scrollToIndexAnimated(this._selectedIndex, false);\n }\n this.templatedItemsView.selectedIndex = this._selectedIndex;\n });\n }\n }\n\n constructor(_elementRef: ElementRef, private _iterableDiffers: IterableDiffers) {\n this.templatedItemsView = _elementRef.nativeElement;\n\n this.templatedItemsView.on('itemLoading', this.onItemLoading, this);\n this.templatedItemsView.on('itemDisposing', this.onItemDisposing, this);\n }\n\n ngAfterContentInit() {\n if (Trace.isEnabled()) {\n PagerLog('TemplatedItemsView.ngAfterContentInit()');\n }\n this.setItemTemplates();\n }\n\n ngOnDestroy() {\n this.templatedItemsView.off('itemLoading', this.onItemLoading, this);\n this.templatedItemsView.off('itemDisposing', this.onItemDisposing, this);\n }\n\n private setItemTemplates() {\n if (!this.items) return;\n // The itemTemplateQuery may be changed after list items are added that contain <template> inside,\n // so cache and use only the original template to avoid errors.\n this.itemTemplate = this.itemTemplateQuery;\n\n if (this._templateMap) {\n if (Trace.isEnabled()) {\n PagerLog('Setting templates');\n }\n\n const templates: KeyedTemplate[] = [];\n this._templateMap.forEach((value) => {\n templates.push(value);\n });\n this.templatedItemsView.itemTemplates = templates;\n }\n }\n\n public registerTemplate(key: string, template: TemplateRef<ItemContext>) {\n if (Trace.isEnabled()) {\n PagerLog(`registerTemplate for key: ${key}`);\n }\n\n if (!this._templateMap) {\n this._templateMap = new Map<string, KeyedTemplate>();\n }\n\n const keyedTemplate = {\n key,\n createView: this.getItemTemplateViewFactory(template)\n };\n\n this._templateMap.set(key, keyedTemplate);\n }\n\n @profile\n public onItemLoading(args: ItemEventData) {\n if (!args.view && !this.itemTemplate) {\n return;\n }\n\n if (!this.items) return;\n\n const index = args.index;\n const items = (args.object as any).items;\n const currentItem = typeof items.getItem === 'function' ? items.getItem(index) : items[index];\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (args.view) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemLoading: ${index} - Reusing existing view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n PagerError(`ViewReference not found for item ${index}. View recycling is not working`);\n }\n }\n\n if (!viewRef) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemLoading: ${index} - Creating view from template`);\n }\n\n viewRef = this.loader.createEmbeddedView(this.itemTemplate, new ItemContext(), 0);\n args.view = getItemViewRoot(viewRef);\n args.view[NG_VIEW] = viewRef;\n }\n\n this.setupViewRef(viewRef, currentItem, index);\n\n this.detectChangesOnChild(viewRef, index);\n }\n\n @profile\n public onItemDisposing(args: ItemEventData) {\n if (!args.view) {\n return;\n }\n let viewRef: EmbeddedViewRef<ItemContext>;\n\n if (args.view) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemDisposing: ${args.index} - Removing angular view`);\n }\n\n viewRef = args.view[NG_VIEW];\n // Getting angular view from original element (in cases when ProxyViewContainer\n // is used NativeScript internally wraps it in a StackLayout)\n if (!viewRef && args.view instanceof LayoutBase && args.view.getChildrenCount() > 0) {\n viewRef = args.view.getChildAt(0)[NG_VIEW];\n }\n\n if (!viewRef && Trace.isEnabled()) {\n PagerError(`ViewReference not found for item ${args.index}. View disposing is not working`);\n }\n }\n\n if (viewRef) {\n if (Trace.isEnabled()) {\n PagerLog(`onItemDisposing: ${args.index} - Disposing view reference`);\n }\n\n viewRef.destroy();\n }\n }\n\n public setupViewRef(viewRef: EmbeddedViewRef<ItemContext>, data: any, index: number): void {\n const context = viewRef.context;\n context.$implicit = data;\n context.item = data;\n context.index = index;\n context.even = index % 2 === 0;\n context.odd = !context.even;\n\n this.setupItemView.next({\n view: viewRef,\n data,\n index,\n context\n });\n }\n\n protected getItemTemplateViewFactory(template: TemplateRef<ItemContext>): () => View {\n return () => {\n const viewRef = this.loader.createEmbeddedView(template, new ItemContext(), 0);\n const resultView = getItemViewRoot(viewRef);\n resultView[NG_VIEW] = viewRef;\n\n return resultView;\n };\n }\n\n @profile\n private detectChangesOnChild(viewRef: EmbeddedViewRef<ItemContext>, index: number) {\n if (Trace.isEnabled()) {\n PagerLog(`Manually detect changes in child: ${index}`);\n }\n\n viewRef.markForCheck();\n viewRef.detectChanges();\n }\n\n ngDoCheck() {\n if (this._differ) {\n if (Trace.isEnabled()) {\n PagerLog('ngDoCheck() - execute differ');\n }\n\n const changes = this._differ.diff(this._items);\n if (changes) {\n if (Trace.isEnabled()) {\n PagerLog('ngDoCheck() - refresh');\n }\n\n this.templatedItemsView.refresh();\n }\n }\n }\n}\n\nexport interface ComponentView {\n rootNodes: any[];\n\n destroy(): void;\n}\n\nexport type RootLocator = (nodes: any[], nestLevel: number) => View;\n\nexport function getItemViewRoot(viewRef: ComponentView, rootLocator: RootLocator = extractSingleViewRecursive as any): View {\n return rootLocator(viewRef.rootNodes, 0);\n}\n\nexport const TEMPLATED_ITEMS_COMPONENT = new InjectionToken<TemplatedItemsComponent>('TemplatedItemsComponent');\n\n@Directive({\n selector: '[pagerItem]'\n})\nexport class PagerItemDirective implements OnInit {\n private item: PagerItem;\n\n constructor(\n private templateRef: TemplateRef<any>,\n @Inject(TEMPLATED_ITEMS_COMPONENT)\n @Host()\n private owner: TemplatedItemsComponent,\n private viewContainer: ViewContainerRef\n ) {}\n\n private ensureItem() {\n if (!this.item) {\n this.item = new PagerItem();\n }\n }\n\n private applyConfig() {\n this.ensureItem();\n }\n\n ngOnInit() {\n this.applyConfig();\n\n const viewRef = this.viewContainer.createEmbeddedView(this.templateRef);\n // Filter out text nodes and comments\n const realViews = viewRef.rootNodes.filter((node) => !isInvisibleNode(node));\n\n if (realViews.length > 0) {\n const view = realViews[0];\n this.item.addChild(view);\n this.owner.nativeElement._addChildFromBuilder('PagerItem', this.item);\n }\n }\n}\n\n@Directive({ selector: '[pagerTemplateKey]' })\nexport class TemplateKeyDirective {\n constructor(\n private templateRef: TemplateRef<any>,\n @Inject(TEMPLATED_ITEMS_COMPONENT)\n @Host()\n private comp: TemplatedItemsComponent\n ) {}\n\n @Input()\n set pagerTemplateKey(value: any) {\n if (this.comp && this.templateRef) {\n this.comp.registerTemplate(value, this.templateRef);\n }\n }\n}\n","import { ChangeDetectionStrategy, Component, ElementRef, IterableDiffers, NO_ERRORS_SCHEMA, NgModule, forwardRef } from '@angular/core';\n\nimport { Pager } from '@nativescript-community/ui-pager';\nimport { PagerItemDirective, TEMPLATED_ITEMS_COMPONENT, TemplateKeyDirective, TemplatedItemsComponent } from './pager-items-comp';\n\nexport { PagerItemDirective, TemplatedItemsComponent, TemplateKeyDirective } from './pager-items-comp';\n\n@Component({\n selector: 'Pager',\n template: ` <DetachedContainer>\n <Placeholder #loader></Placeholder>\n </DetachedContainer>`,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: TEMPLATED_ITEMS_COMPONENT,\n useExisting: forwardRef(() => PagerComponent)\n }\n ],\n schemas: [NO_ERRORS_SCHEMA]\n})\nexport class PagerComponent extends TemplatedItemsComponent {\n public get nativeElement(): Pager {\n return this.templatedItemsView;\n }\n\n constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers) {\n super(_elementRef, _iterableDiffers);\n }\n}\n\n@NgModule({\n imports: [PagerComponent, TemplateKeyDirective, PagerItemDirective],\n exports: [PagerComponent, TemplateKeyDirective, PagerItemDirective],\n schemas: [NO_ERRORS_SCHEMA]\n})\nexport class PagerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AA6BA,eAAe,CAAC,OAAO,EAAE,MAAM,KAAK,CAAC;AACrC,eAAe,CAAC,WAAW,EAAE,MAAM,SAAS,CAAC;AAE7C,MAAM,OAAO,GAAG,YAAY;MAcf,WAAW,CAAA;AACD,IAAA,SAAA;AAAwB,IAAA,IAAA;AAAmB,IAAA,KAAA;AAAuB,IAAA,IAAA;AAAuB,IAAA,GAAA;IAA5G,WAAA,CAAmB,SAAe,EAAS,IAAU,EAAS,KAAc,EAAS,IAAc,EAAS,GAAa,EAAA;QAAtG,IAAA,CAAA,SAAS,GAAT,SAAS;QAAe,IAAA,CAAA,IAAI,GAAJ,IAAI;QAAe,IAAA,CAAA,KAAK,GAAL,KAAK;QAAkB,IAAA,CAAA,IAAI,GAAJ,IAAI;QAAmB,IAAA,CAAA,GAAG,GAAH,GAAG;IAAa;AAC/H;MAWqB,uBAAuB,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AgB;AAC7B,aAAA;;kFACY,cAAc,EAAA,EAAA,SAAA,EAAA,gBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,UAAA,EAAA,EAAA,EAAA,CAAA,CAAA,CAAA,CAAA,GAAA;MAed,WAAW,CAAA;qGAAX,WAAW,GAAA,CAAA,CAAA,CAAA;4DAAX,WAAW,EAAA,CAAA;;;iFAAX,WAAW,EAAA,CAAA;cALvB,QAAQ;AAAC,QAAA,IAAA,EAAA,CAAA;AACN,gBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;AACnE,gBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,kBAAkB,CAAC;gBACnE,OAAO,EAAE,CAAC,gBAAgB;AAC7B,aAAA;;wFACY,WAAW,EAAA,EAAA,OAAA,EAAA,CAfX,cAAc,EAWG,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAXzD,cAAc,EAYG,oBAAoB,EAAE,kBAAkB,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,GAAA;;ACjCtE;;AAEG;;;;"}
|
package/angular/index.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare class PagerComponent extends TemplatedItemsComponent {
|
|
|
8
8
|
get nativeElement(): Pager;
|
|
9
9
|
constructor(_elementRef: ElementRef, _iterableDiffers: IterableDiffers);
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<PagerComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PagerComponent, "Pager", never, {}, {}, never, never,
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PagerComponent, "Pager", never, {}, {}, never, never, true, never>;
|
|
12
12
|
}
|
|
13
13
|
export declare class PagerModule {
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<PagerModule, never>;
|
|
15
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<PagerModule, [typeof PagerComponent, typeof i1.TemplateKeyDirective, typeof i1.PagerItemDirective],
|
|
15
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<PagerModule, never, [typeof PagerComponent, typeof i1.TemplateKeyDirective, typeof i1.PagerItemDirective], [typeof PagerComponent, typeof i1.TemplateKeyDirective, typeof i1.PagerItemDirective]>;
|
|
16
16
|
static ɵinj: i0.ɵɵInjectorDeclaration<PagerModule>;
|
|
17
17
|
}
|
package/angular/package.json
CHANGED
|
@@ -54,7 +54,7 @@ export declare abstract class TemplatedItemsComponent implements DoCheck, OnDest
|
|
|
54
54
|
private detectChangesOnChild;
|
|
55
55
|
ngDoCheck(): void;
|
|
56
56
|
static ɵfac: i0.ɵɵFactoryDeclaration<TemplatedItemsComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TemplatedItemsComponent, "ng-component", never, { "items": { "alias": "items"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; }, { "setupItemView": "setupItemView"; }, ["itemTemplateQuery"], never,
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TemplatedItemsComponent, "ng-component", never, { "items": { "alias": "items"; "required": false; }; "selectedIndex": { "alias": "selectedIndex"; "required": false; }; }, { "setupItemView": "setupItemView"; }, ["itemTemplateQuery"], never, true, never>;
|
|
58
58
|
}
|
|
59
59
|
export interface ComponentView {
|
|
60
60
|
rootNodes: any[];
|
|
@@ -73,7 +73,7 @@ export declare class PagerItemDirective implements OnInit {
|
|
|
73
73
|
private applyConfig;
|
|
74
74
|
ngOnInit(): void;
|
|
75
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<PagerItemDirective, [null, { host: true; }, null]>;
|
|
76
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<PagerItemDirective, "[pagerItem]", never, {}, {}, never, never,
|
|
76
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<PagerItemDirective, "[pagerItem]", never, {}, {}, never, never, true, never>;
|
|
77
77
|
}
|
|
78
78
|
export declare class TemplateKeyDirective {
|
|
79
79
|
private templateRef;
|
|
@@ -81,5 +81,5 @@ export declare class TemplateKeyDirective {
|
|
|
81
81
|
constructor(templateRef: TemplateRef<any>, comp: TemplatedItemsComponent);
|
|
82
82
|
set pagerTemplateKey(value: any);
|
|
83
83
|
static ɵfac: i0.ɵɵFactoryDeclaration<TemplateKeyDirective, [null, { host: true; }]>;
|
|
84
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateKeyDirective, "[pagerTemplateKey]", never, { "pagerTemplateKey": { "alias": "pagerTemplateKey"; "required": false; }; }, {}, never, never,
|
|
84
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TemplateKeyDirective, "[pagerTemplateKey]", never, { "pagerTemplateKey": { "alias": "pagerTemplateKey"; "required": false; }; }, {}, never, never, true, never>;
|
|
85
85
|
}
|
package/index.android.d.ts
CHANGED
|
@@ -1,9 +1,28 @@
|
|
|
1
|
-
import { Property, View, ViewBase } from '@nativescript/core';
|
|
2
|
-
import { PagerBase } from './index.common';
|
|
1
|
+
import { CoreTypes, KeyedTemplate, Property, View, ViewBase, paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty } from '@nativescript/core';
|
|
2
|
+
import { Orientation, PagerBase, autoPlayProperty, autoplayDelayProperty, disableSwipeProperty, itemTemplatesProperty, itemsProperty, orientationProperty, peakingProperty, selectedIndexProperty, spacingProperty } from './index.common';
|
|
3
3
|
export * from './index.common';
|
|
4
4
|
export { ItemsSource, Transformer } from './index.common';
|
|
5
5
|
export declare const pagesCountProperty: Property<Pager, number>;
|
|
6
6
|
export declare class Pager extends PagerBase {
|
|
7
|
+
[spacingProperty.setNative]: (value: any) => void;
|
|
8
|
+
[peakingProperty.setNative]: (value: any) => void;
|
|
9
|
+
[disableSwipeProperty.setNative]: (value: boolean) => void;
|
|
10
|
+
[itemsProperty.setNative]: (value: any) => void;
|
|
11
|
+
[paddingTopProperty.getDefault]: () => CoreTypes.LengthType;
|
|
12
|
+
[paddingTopProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
13
|
+
[paddingRightProperty.getDefault]: () => CoreTypes.LengthType;
|
|
14
|
+
[paddingRightProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
15
|
+
[paddingBottomProperty.getDefault]: () => CoreTypes.LengthType;
|
|
16
|
+
[paddingBottomProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
17
|
+
[paddingLeftProperty.getDefault]: () => CoreTypes.LengthType;
|
|
18
|
+
[paddingLeftProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
19
|
+
[selectedIndexProperty.setNative]: (value: number, animated?: boolean, requestTransform?: boolean) => void;
|
|
20
|
+
[itemTemplatesProperty.getDefault]: () => KeyedTemplate[];
|
|
21
|
+
[itemTemplatesProperty.setNative]: (value: KeyedTemplate[]) => void;
|
|
22
|
+
[orientationProperty.setNative]: (value: Orientation) => void;
|
|
23
|
+
[autoPlayProperty.setNative]: (value: boolean) => void;
|
|
24
|
+
[autoplayDelayProperty.setNative]: (value: number) => void;
|
|
25
|
+
[pagesCountProperty.setNative]: (value: number) => void;
|
|
7
26
|
nativeViewProtected: androidx.viewpager2.widget.ViewPager2;
|
|
8
27
|
_androidViewId: number;
|
|
9
28
|
private _disableAnimation;
|
package/index.ios.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { Property, View, ViewBase } from '@nativescript/core';
|
|
2
|
-
import {
|
|
1
|
+
import { CoreTypes, KeyedTemplate, Property, View, ViewBase } from '@nativescript/core';
|
|
2
|
+
import { paddingBottomProperty, paddingLeftProperty, paddingRightProperty, paddingTopProperty } from '@nativescript/core/ui/styling/style-properties';
|
|
3
|
+
import { Orientation, PagerBase, autoPlayProperty, autoplayDelayProperty, disableSwipeProperty, itemTemplatesProperty, itemsProperty, orientationProperty, selectedIndexProperty } from './index.common';
|
|
3
4
|
export * from './index.common';
|
|
4
5
|
export { ItemsSource, Transformer } from './index.common';
|
|
5
6
|
export declare enum ContentInsetAdjustmentBehavior {
|
|
@@ -10,6 +11,19 @@ export declare enum ContentInsetAdjustmentBehavior {
|
|
|
10
11
|
}
|
|
11
12
|
export declare const contentInsetAdjustmentBehaviorProperty: Property<Pager, ContentInsetAdjustmentBehavior>;
|
|
12
13
|
export declare class Pager extends PagerBase {
|
|
14
|
+
[orientationProperty.setNative]: (value: Orientation) => void;
|
|
15
|
+
[selectedIndexProperty.setNative]: (value: number, animated?: boolean) => void;
|
|
16
|
+
[itemTemplatesProperty.getDefault]: () => KeyedTemplate[];
|
|
17
|
+
[itemTemplatesProperty.setNative]: (value: KeyedTemplate[]) => void;
|
|
18
|
+
[itemsProperty.setNative]: (value: any) => void;
|
|
19
|
+
[autoPlayProperty.setNative]: (value: boolean) => void;
|
|
20
|
+
[autoplayDelayProperty.setNative]: (value: number) => void;
|
|
21
|
+
[paddingTopProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
22
|
+
[paddingRightProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
23
|
+
[paddingBottomProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
24
|
+
[paddingLeftProperty.setNative]: (value: CoreTypes.LengthType) => void;
|
|
25
|
+
[disableSwipeProperty.setNative]: (value: boolean) => void;
|
|
26
|
+
[contentInsetAdjustmentBehaviorProperty.setNative]: (value: ContentInsetAdjustmentBehavior) => void;
|
|
13
27
|
lastEvent: number;
|
|
14
28
|
private mDisableSwipe;
|
|
15
29
|
private mDisableAnimation;
|
package/index.ios.js
CHANGED
|
@@ -306,8 +306,11 @@ export class Pager extends PagerBase {
|
|
|
306
306
|
}
|
|
307
307
|
_updateScrollPosition() {
|
|
308
308
|
const view = this.nativeViewProtected;
|
|
309
|
+
if (!view) {
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
309
312
|
const size = this.orientation === 'vertical' ? view.contentSize.height : view.contentSize.width;
|
|
310
|
-
if (
|
|
313
|
+
if (size === 0) {
|
|
311
314
|
return;
|
|
312
315
|
}
|
|
313
316
|
this.scrollToIndexAnimated(this.selectedIndex, false);
|