@agnos-ui/svelte-bootstrap 0.4.0-next.0 → 0.4.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/components/accordion/Accordion.svelte.d.ts +1 -1
- package/components/accordion/Item.svelte.d.ts +1 -1
- package/components/accordion/accordion.d.ts +3 -6
- package/components/accordion/accordion.gen.d.ts +77 -5
- package/components/accordion/accordion.gen.js +32 -1
- package/components/accordion/accordion.js +1 -4
- package/components/alert/Alert.svelte.d.ts +1 -1
- package/components/alert/alert.d.ts +3 -5
- package/components/alert/alert.gen.d.ts +61 -7
- package/components/alert/alert.gen.js +14 -1
- package/components/alert/alert.js +1 -3
- package/components/modal/Modal.svelte +4 -4
- package/components/modal/ModalDefaultHeader.svelte +1 -1
- package/components/modal/ModalDefaultStructure.svelte +4 -4
- package/components/modal/modal.d.ts +3 -6
- package/components/modal/modal.gen.d.ts +131 -31
- package/components/modal/modal.gen.js +26 -1
- package/components/modal/modal.js +1 -4
- package/components/pagination/Pagination.svelte +10 -10
- package/components/pagination/Pagination.svelte.d.ts +1 -1
- package/components/pagination/PaginationDefaultPages.svelte +15 -15
- package/components/pagination/PaginationDefaultStructure.svelte +40 -40
- package/components/pagination/pagination.d.ts +3 -5
- package/components/pagination/pagination.gen.d.ts +204 -34
- package/components/pagination/pagination.gen.js +14 -1
- package/components/pagination/pagination.js +1 -3
- package/components/progressbar/Progressbar.svelte +3 -3
- package/components/progressbar/Progressbar.svelte.d.ts +1 -1
- package/components/progressbar/progressbar.d.ts +3 -5
- package/components/progressbar/progressbar.gen.d.ts +56 -3
- package/components/progressbar/progressbar.gen.js +14 -1
- package/components/progressbar/progressbar.js +1 -3
- package/components/rating/rating.d.ts +3 -5
- package/components/rating/rating.gen.d.ts +84 -1
- package/components/rating/rating.gen.js +14 -1
- package/components/rating/rating.js +1 -3
- package/components/select/select.d.ts +3 -5
- package/components/select/select.gen.d.ts +121 -1
- package/components/select/select.gen.js +14 -1
- package/components/select/select.js +1 -3
- package/components/slider/Slider.svelte.d.ts +1 -1
- package/components/slider/slider.d.ts +3 -5
- package/components/slider/slider.gen.d.ts +98 -3
- package/components/slider/slider.gen.js +14 -1
- package/components/slider/slider.js +1 -3
- package/components/toast/Toast.svelte.d.ts +1 -1
- package/components/toast/toast.d.ts +3 -5
- package/components/toast/toast.gen.d.ts +65 -7
- package/components/toast/toast.gen.js +14 -1
- package/components/toast/toast.js +1 -3
- package/config.d.ts +1 -1
- package/package.json +3 -3
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, Directive } from '@agnos-ui/svelte-headless/types';
|
|
1
|
+
import type { WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive } from '@agnos-ui/svelte-headless/types';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Pagination config
|
|
4
|
+
* @returns the default Pagination config
|
|
5
|
+
*/
|
|
6
|
+
declare const export_getPaginationDefaultConfig: () => PaginationProps;
|
|
7
|
+
export { export_getPaginationDefaultConfig as getPaginationDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* A type for the slot context of the pagination widget
|
|
10
|
+
*/
|
|
2
11
|
export type PaginationContext = WidgetSlotContext<PaginationWidget>;
|
|
12
|
+
/**
|
|
13
|
+
* A type for the slot context of the pagination widget when the slot is the number label
|
|
14
|
+
*/
|
|
3
15
|
export type PaginationNumberContext = PaginationContext & {
|
|
4
16
|
/**
|
|
5
17
|
* Displayed page
|
|
@@ -27,28 +39,26 @@ export interface PaginationState {
|
|
|
27
39
|
* The label for each "Page" page link.
|
|
28
40
|
*/
|
|
29
41
|
pagesLabel: string[];
|
|
30
|
-
/**
|
|
31
|
-
* The hrefs for each "Page" page link
|
|
32
|
-
*/
|
|
42
|
+
/** The hrefs for each "Page" page link */
|
|
33
43
|
pagesHrefs: string[];
|
|
34
|
-
/**
|
|
35
|
-
* The hrefs for the direction links
|
|
36
|
-
*/
|
|
44
|
+
/** The hrefs for the direction links */
|
|
37
45
|
directionsHrefs: DirectionsHrefs;
|
|
38
|
-
/**
|
|
39
|
-
* The aria-live text
|
|
40
|
-
*/
|
|
46
|
+
/** The aria-live text */
|
|
41
47
|
ariaLiveLabelText: string;
|
|
42
48
|
/**
|
|
43
49
|
* The current page.
|
|
44
50
|
*
|
|
45
51
|
* Page numbers start with `1`.
|
|
52
|
+
*
|
|
53
|
+
* @defaultValue `1`
|
|
46
54
|
*/
|
|
47
55
|
page: number;
|
|
48
56
|
/**
|
|
49
57
|
* The pagination display size.
|
|
50
58
|
*
|
|
51
59
|
* Bootstrap currently supports small and large sizes.
|
|
60
|
+
*
|
|
61
|
+
* @defaultValue `null`
|
|
52
62
|
*/
|
|
53
63
|
size: 'sm' | 'lg' | null;
|
|
54
64
|
/**
|
|
@@ -56,110 +66,163 @@ export interface PaginationState {
|
|
|
56
66
|
*
|
|
57
67
|
* for I18n, we suggest to use the global configuration
|
|
58
68
|
* override any configuration parameters provided for this
|
|
69
|
+
*
|
|
70
|
+
* @defaultValue `'Page navigation'`
|
|
59
71
|
*/
|
|
60
72
|
ariaLabel: string;
|
|
61
73
|
/**
|
|
62
74
|
* The label for the "active" page.
|
|
63
75
|
* for I18n, we suggest to use the global configuration
|
|
64
76
|
* override any configuration parameters provided for this
|
|
77
|
+
*
|
|
78
|
+
* @defaultValue
|
|
79
|
+
* ```ts
|
|
80
|
+
* '(current)'
|
|
81
|
+
* ```
|
|
65
82
|
*/
|
|
66
83
|
activeLabel: string;
|
|
67
84
|
/**
|
|
68
85
|
* The label for the "First" page button.
|
|
69
86
|
* for I18n, we suggest to use the global configuration
|
|
70
87
|
* override any configuration parameters provided for this
|
|
88
|
+
*
|
|
89
|
+
* @defaultValue
|
|
90
|
+
* ```ts
|
|
91
|
+
* 'Action link for first page'
|
|
92
|
+
* ```
|
|
71
93
|
*/
|
|
72
94
|
ariaFirstLabel: string;
|
|
73
95
|
/**
|
|
74
96
|
* The label for the "Previous" page button.
|
|
75
97
|
* for I18n, we suggest to use the global configuration
|
|
76
98
|
* override any configuration parameters provided for this
|
|
99
|
+
*
|
|
100
|
+
* @defaultValue
|
|
101
|
+
* ```ts
|
|
102
|
+
* 'Action link for previous page'
|
|
103
|
+
* ```
|
|
77
104
|
*/
|
|
78
105
|
ariaPreviousLabel: string;
|
|
79
106
|
/**
|
|
80
107
|
* The label for the "Next" page button.
|
|
81
108
|
* for I18n, we suggest to use the global configuration
|
|
82
109
|
* override any configuration parameters provided for this
|
|
110
|
+
*
|
|
111
|
+
* @defaultValue
|
|
112
|
+
* ```ts
|
|
113
|
+
* 'Action link for next page'
|
|
114
|
+
* ```
|
|
83
115
|
*/
|
|
84
116
|
ariaNextLabel: string;
|
|
85
117
|
/**
|
|
86
118
|
* The label for the "Last" page button.
|
|
87
119
|
* for I18n, we suggest to use the global configuration
|
|
88
120
|
* override any configuration parameters provided for this
|
|
121
|
+
*
|
|
122
|
+
* @defaultValue
|
|
123
|
+
* ```ts
|
|
124
|
+
* 'Action link for last page'
|
|
125
|
+
* ```
|
|
89
126
|
*/
|
|
90
127
|
ariaLastLabel: string;
|
|
91
128
|
/**
|
|
92
129
|
* The label for the "Ellipsis" page.
|
|
93
130
|
* for I18n, we suggest to use the global configuration
|
|
94
131
|
* override any configuration parameters provided for this
|
|
132
|
+
*
|
|
133
|
+
* @defaultValue `'Ellipsis page element'`
|
|
95
134
|
*/
|
|
96
135
|
ariaEllipsisLabel: string;
|
|
97
136
|
/**
|
|
98
137
|
* If `true`, pagination links will be disabled.
|
|
138
|
+
*
|
|
139
|
+
* @defaultValue `false`
|
|
99
140
|
*/
|
|
100
141
|
disabled: boolean;
|
|
101
142
|
/**
|
|
102
143
|
* If `true`, the "Next" and "Previous" page links are shown.
|
|
144
|
+
*
|
|
145
|
+
* @defaultValue `true`
|
|
103
146
|
*/
|
|
104
147
|
directionLinks: boolean;
|
|
105
148
|
/**
|
|
106
149
|
* If `true`, the "First" and "Last" page links are shown.
|
|
150
|
+
*
|
|
151
|
+
* @defaultValue `false`
|
|
107
152
|
*/
|
|
108
153
|
boundaryLinks: boolean;
|
|
109
154
|
/**
|
|
110
155
|
* CSS classes to be applied on the widget main container
|
|
156
|
+
*
|
|
157
|
+
* @defaultValue `''`
|
|
111
158
|
*/
|
|
112
159
|
className: string;
|
|
113
160
|
/**
|
|
114
161
|
* The template to use for the structure of the pagination component
|
|
115
|
-
* The default structure uses {@link
|
|
116
|
-
* {@link
|
|
117
|
-
* {@link
|
|
118
|
-
* {@link
|
|
162
|
+
* The default structure uses {@link PaginationProps.ellipsisLabel|ellipsisLabel}, {@link PaginationProps.firstPageLabel|firstPageLabel},
|
|
163
|
+
* {@link PaginationProps.previousPageLabel|previousPageLabel}, {@link PaginationProps.nextPageLabel|nextPageLabel},
|
|
164
|
+
* {@link PaginationProps.lastPageLabel|lastPageLabel}, {@link PaginationProps.pagesDisplay|pagesDisplay},
|
|
165
|
+
* {@link PaginationProps.numberLabel|numberLabel},
|
|
119
166
|
*/
|
|
120
|
-
|
|
167
|
+
structure: SlotContent<PaginationContext>;
|
|
121
168
|
/**
|
|
122
169
|
* The template to use for the ellipsis slot
|
|
123
170
|
* for I18n, we suggest to use the global configuration
|
|
124
171
|
* override any configuration parameters provided for this
|
|
172
|
+
*
|
|
173
|
+
* @defaultValue `'…'`
|
|
125
174
|
*/
|
|
126
|
-
|
|
175
|
+
ellipsisLabel: SlotContent<PaginationContext>;
|
|
127
176
|
/**
|
|
128
177
|
* The template to use for the first slot
|
|
129
178
|
* for I18n, we suggest to use the global configuration
|
|
130
179
|
* override any configuration parameters provided for this
|
|
180
|
+
*
|
|
181
|
+
* @defaultValue `'«'`
|
|
131
182
|
*/
|
|
132
|
-
|
|
183
|
+
firstPageLabel: SlotContent<PaginationContext>;
|
|
133
184
|
/**
|
|
134
185
|
* The template to use for the previous slot
|
|
135
186
|
* for I18n, we suggest to use the global configuration
|
|
136
187
|
* override any configuration parameters provided for this
|
|
188
|
+
*
|
|
189
|
+
* @defaultValue `'‹'`
|
|
137
190
|
*/
|
|
138
|
-
|
|
191
|
+
previousPageLabel: SlotContent<PaginationContext>;
|
|
139
192
|
/**
|
|
140
193
|
* The template to use for the next slot
|
|
141
194
|
* for I18n, we suggest to use the global configuration
|
|
142
195
|
* override any configuration parameters provided for this
|
|
196
|
+
*
|
|
197
|
+
* @defaultValue `'›'`
|
|
143
198
|
*/
|
|
144
|
-
|
|
199
|
+
nextPageLabel: SlotContent<PaginationContext>;
|
|
145
200
|
/**
|
|
146
201
|
* The template to use for the last slot
|
|
147
202
|
* for I18n, we suggest to use the global configuration
|
|
148
203
|
* override any configuration parameters provided for this
|
|
204
|
+
*
|
|
205
|
+
* @defaultValue `'»'`
|
|
149
206
|
*/
|
|
150
|
-
|
|
207
|
+
lastPageLabel: SlotContent<PaginationContext>;
|
|
151
208
|
/**
|
|
152
209
|
* The template to use for the pages slot
|
|
153
210
|
* To use to customize the pages view
|
|
154
211
|
* override any configuration parameters provided for this
|
|
155
212
|
*/
|
|
156
|
-
|
|
213
|
+
pagesDisplay: SlotContent<PaginationContext>;
|
|
157
214
|
/**
|
|
158
215
|
* The template to use for the number slot
|
|
159
216
|
* override any configuration parameters provided for this
|
|
160
217
|
* for I18n, we suggest to use the global configuration
|
|
218
|
+
* @param displayedPage - The current page number
|
|
219
|
+
*
|
|
220
|
+
* @defaultValue
|
|
221
|
+
* ```ts
|
|
222
|
+
* ({displayedPage}: PaginationNumberContext) => `${displayedPage}`
|
|
223
|
+
* ```
|
|
161
224
|
*/
|
|
162
|
-
|
|
225
|
+
numberLabel: SlotContent<PaginationNumberContext>;
|
|
163
226
|
}
|
|
164
227
|
export interface PaginationProps {
|
|
165
228
|
/**
|
|
@@ -171,10 +234,15 @@ export interface PaginationProps {
|
|
|
171
234
|
* Ex. if you have 100 items in your collection and displaying 20 items per page, you'll end up with 5 pages.
|
|
172
235
|
*
|
|
173
236
|
* Whatever the collectionSize the page number is of minimum 1.
|
|
237
|
+
*
|
|
238
|
+
* @defaultValue `0`
|
|
174
239
|
*/
|
|
175
240
|
collectionSize: number;
|
|
176
241
|
/**
|
|
177
242
|
* The number of items per page.
|
|
243
|
+
* @remarks min value is 1
|
|
244
|
+
*
|
|
245
|
+
* @defaultValue `10`
|
|
178
246
|
*/
|
|
179
247
|
pageSize: number;
|
|
180
248
|
/**
|
|
@@ -183,12 +251,29 @@ export interface PaginationProps {
|
|
|
183
251
|
* Event payload is the number of the newly selected page.
|
|
184
252
|
*
|
|
185
253
|
* Page numbers start with `1`.
|
|
254
|
+
* @defaultValue
|
|
255
|
+
* ```ts
|
|
256
|
+
* () => {}
|
|
257
|
+
* ```
|
|
186
258
|
*/
|
|
187
259
|
onPageChange: (page: number) => void;
|
|
188
260
|
/**
|
|
189
261
|
* pagesFactory returns a function computing the array of pages to be displayed
|
|
190
262
|
* as number (-1 are treated as ellipsis).
|
|
191
263
|
* Use Page slot to customize the pages view and not this
|
|
264
|
+
* @param page - The current page number
|
|
265
|
+
* @param pageCount - The total number of pages
|
|
266
|
+
*
|
|
267
|
+
* @defaultValue
|
|
268
|
+
* ```ts
|
|
269
|
+
* (_page: number, pageCount: number) => {
|
|
270
|
+
* const pages: number[] = [];
|
|
271
|
+
* for (let i = 1; i <= pageCount; i++) {
|
|
272
|
+
* pages.push(i);
|
|
273
|
+
* }
|
|
274
|
+
* return pages;
|
|
275
|
+
* }
|
|
276
|
+
* ```
|
|
192
277
|
*/
|
|
193
278
|
pagesFactory: (page: number, pageCount: number) => number[];
|
|
194
279
|
/**
|
|
@@ -196,6 +281,13 @@ export interface PaginationProps {
|
|
|
196
281
|
* This is used for accessibility purposes.
|
|
197
282
|
* for I18n, we suggest to use the global configuration
|
|
198
283
|
* override any configuration parameters provided for this
|
|
284
|
+
* @param processPage - The current page number
|
|
285
|
+
* @param pageCount - The total number of pages
|
|
286
|
+
*
|
|
287
|
+
* @defaultValue
|
|
288
|
+
* ```ts
|
|
289
|
+
* (processPage: number, pageCount: number) => `Page ${processPage} of ${pageCount}`
|
|
290
|
+
* ```
|
|
199
291
|
*/
|
|
200
292
|
ariaPageLabel: (processPage: number, pageCount: number) => string;
|
|
201
293
|
/**
|
|
@@ -203,23 +295,40 @@ export interface PaginationProps {
|
|
|
203
295
|
* This is used for accessibility purposes.
|
|
204
296
|
* for I18n, we suggest to use the global configuration
|
|
205
297
|
* override any configuration parameters provided for this
|
|
298
|
+
* @param currentPage - The current page number
|
|
299
|
+
* @param pageCount - The total number of pages
|
|
300
|
+
*
|
|
301
|
+
* @defaultValue
|
|
302
|
+
* ```ts
|
|
303
|
+
* (currentPage: number, pageCount: number) => `Current page is ${currentPage}`
|
|
304
|
+
* ```
|
|
206
305
|
*/
|
|
207
306
|
ariaLiveLabel: (currentPage: number, pageCount: number) => string;
|
|
208
307
|
/**
|
|
209
308
|
* Factory function providing the href for a "Page" page anchor,
|
|
210
309
|
* based on the current page number
|
|
310
|
+
* @param pageNumber - The index to use in the link
|
|
311
|
+
*
|
|
312
|
+
* @defaultValue
|
|
313
|
+
* ```ts
|
|
314
|
+
* (_page: number) => PAGE_LINK_DEFAULT
|
|
315
|
+
* ```
|
|
211
316
|
*/
|
|
212
317
|
pageLink: (pageNumber: number) => string;
|
|
213
318
|
/**
|
|
214
319
|
* The current page.
|
|
215
320
|
*
|
|
216
321
|
* Page numbers start with `1`.
|
|
322
|
+
*
|
|
323
|
+
* @defaultValue `1`
|
|
217
324
|
*/
|
|
218
325
|
page: number;
|
|
219
326
|
/**
|
|
220
327
|
* The pagination display size.
|
|
221
328
|
*
|
|
222
329
|
* Bootstrap currently supports small and large sizes.
|
|
330
|
+
*
|
|
331
|
+
* @defaultValue `null`
|
|
223
332
|
*/
|
|
224
333
|
size: 'sm' | 'lg' | null;
|
|
225
334
|
/**
|
|
@@ -227,112 +336,172 @@ export interface PaginationProps {
|
|
|
227
336
|
*
|
|
228
337
|
* for I18n, we suggest to use the global configuration
|
|
229
338
|
* override any configuration parameters provided for this
|
|
339
|
+
*
|
|
340
|
+
* @defaultValue `'Page navigation'`
|
|
230
341
|
*/
|
|
231
342
|
ariaLabel: string;
|
|
232
343
|
/**
|
|
233
344
|
* The label for the "active" page.
|
|
234
345
|
* for I18n, we suggest to use the global configuration
|
|
235
346
|
* override any configuration parameters provided for this
|
|
347
|
+
*
|
|
348
|
+
* @defaultValue
|
|
349
|
+
* ```ts
|
|
350
|
+
* '(current)'
|
|
351
|
+
* ```
|
|
236
352
|
*/
|
|
237
353
|
activeLabel: string;
|
|
238
354
|
/**
|
|
239
355
|
* The label for the "First" page button.
|
|
240
356
|
* for I18n, we suggest to use the global configuration
|
|
241
357
|
* override any configuration parameters provided for this
|
|
358
|
+
*
|
|
359
|
+
* @defaultValue
|
|
360
|
+
* ```ts
|
|
361
|
+
* 'Action link for first page'
|
|
362
|
+
* ```
|
|
242
363
|
*/
|
|
243
364
|
ariaFirstLabel: string;
|
|
244
365
|
/**
|
|
245
366
|
* The label for the "Previous" page button.
|
|
246
367
|
* for I18n, we suggest to use the global configuration
|
|
247
368
|
* override any configuration parameters provided for this
|
|
369
|
+
*
|
|
370
|
+
* @defaultValue
|
|
371
|
+
* ```ts
|
|
372
|
+
* 'Action link for previous page'
|
|
373
|
+
* ```
|
|
248
374
|
*/
|
|
249
375
|
ariaPreviousLabel: string;
|
|
250
376
|
/**
|
|
251
377
|
* The label for the "Next" page button.
|
|
252
378
|
* for I18n, we suggest to use the global configuration
|
|
253
379
|
* override any configuration parameters provided for this
|
|
380
|
+
*
|
|
381
|
+
* @defaultValue
|
|
382
|
+
* ```ts
|
|
383
|
+
* 'Action link for next page'
|
|
384
|
+
* ```
|
|
254
385
|
*/
|
|
255
386
|
ariaNextLabel: string;
|
|
256
387
|
/**
|
|
257
388
|
* The label for the "Last" page button.
|
|
258
389
|
* for I18n, we suggest to use the global configuration
|
|
259
390
|
* override any configuration parameters provided for this
|
|
391
|
+
*
|
|
392
|
+
* @defaultValue
|
|
393
|
+
* ```ts
|
|
394
|
+
* 'Action link for last page'
|
|
395
|
+
* ```
|
|
260
396
|
*/
|
|
261
397
|
ariaLastLabel: string;
|
|
262
398
|
/**
|
|
263
399
|
* The label for the "Ellipsis" page.
|
|
264
400
|
* for I18n, we suggest to use the global configuration
|
|
265
401
|
* override any configuration parameters provided for this
|
|
402
|
+
*
|
|
403
|
+
* @defaultValue `'Ellipsis page element'`
|
|
266
404
|
*/
|
|
267
405
|
ariaEllipsisLabel: string;
|
|
268
406
|
/**
|
|
269
407
|
* If `true`, pagination links will be disabled.
|
|
408
|
+
*
|
|
409
|
+
* @defaultValue `false`
|
|
270
410
|
*/
|
|
271
411
|
disabled: boolean;
|
|
272
412
|
/**
|
|
273
413
|
* If `true`, the "Next" and "Previous" page links are shown.
|
|
414
|
+
*
|
|
415
|
+
* @defaultValue `true`
|
|
274
416
|
*/
|
|
275
417
|
directionLinks: boolean;
|
|
276
418
|
/**
|
|
277
419
|
* If `true`, the "First" and "Last" page links are shown.
|
|
420
|
+
*
|
|
421
|
+
* @defaultValue `false`
|
|
278
422
|
*/
|
|
279
423
|
boundaryLinks: boolean;
|
|
280
424
|
/**
|
|
281
425
|
* CSS classes to be applied on the widget main container
|
|
426
|
+
*
|
|
427
|
+
* @defaultValue `''`
|
|
282
428
|
*/
|
|
283
429
|
className: string;
|
|
284
430
|
/**
|
|
285
431
|
* The template to use for the structure of the pagination component
|
|
286
|
-
* The default structure uses {@link
|
|
287
|
-
* {@link
|
|
288
|
-
* {@link
|
|
289
|
-
* {@link
|
|
432
|
+
* The default structure uses {@link PaginationProps.ellipsisLabel|ellipsisLabel}, {@link PaginationProps.firstPageLabel|firstPageLabel},
|
|
433
|
+
* {@link PaginationProps.previousPageLabel|previousPageLabel}, {@link PaginationProps.nextPageLabel|nextPageLabel},
|
|
434
|
+
* {@link PaginationProps.lastPageLabel|lastPageLabel}, {@link PaginationProps.pagesDisplay|pagesDisplay},
|
|
435
|
+
* {@link PaginationProps.numberLabel|numberLabel},
|
|
290
436
|
*/
|
|
291
|
-
|
|
437
|
+
structure: SlotContent<PaginationContext>;
|
|
292
438
|
/**
|
|
293
439
|
* The template to use for the ellipsis slot
|
|
294
440
|
* for I18n, we suggest to use the global configuration
|
|
295
441
|
* override any configuration parameters provided for this
|
|
442
|
+
*
|
|
443
|
+
* @defaultValue `'…'`
|
|
296
444
|
*/
|
|
297
|
-
|
|
445
|
+
ellipsisLabel: SlotContent<PaginationContext>;
|
|
298
446
|
/**
|
|
299
447
|
* The template to use for the first slot
|
|
300
448
|
* for I18n, we suggest to use the global configuration
|
|
301
449
|
* override any configuration parameters provided for this
|
|
450
|
+
*
|
|
451
|
+
* @defaultValue `'«'`
|
|
302
452
|
*/
|
|
303
|
-
|
|
453
|
+
firstPageLabel: SlotContent<PaginationContext>;
|
|
304
454
|
/**
|
|
305
455
|
* The template to use for the previous slot
|
|
306
456
|
* for I18n, we suggest to use the global configuration
|
|
307
457
|
* override any configuration parameters provided for this
|
|
458
|
+
*
|
|
459
|
+
* @defaultValue `'‹'`
|
|
308
460
|
*/
|
|
309
|
-
|
|
461
|
+
previousPageLabel: SlotContent<PaginationContext>;
|
|
310
462
|
/**
|
|
311
463
|
* The template to use for the next slot
|
|
312
464
|
* for I18n, we suggest to use the global configuration
|
|
313
465
|
* override any configuration parameters provided for this
|
|
466
|
+
*
|
|
467
|
+
* @defaultValue `'›'`
|
|
314
468
|
*/
|
|
315
|
-
|
|
469
|
+
nextPageLabel: SlotContent<PaginationContext>;
|
|
316
470
|
/**
|
|
317
471
|
* The template to use for the last slot
|
|
318
472
|
* for I18n, we suggest to use the global configuration
|
|
319
473
|
* override any configuration parameters provided for this
|
|
474
|
+
*
|
|
475
|
+
* @defaultValue `'»'`
|
|
320
476
|
*/
|
|
321
|
-
|
|
477
|
+
lastPageLabel: SlotContent<PaginationContext>;
|
|
322
478
|
/**
|
|
323
479
|
* The template to use for the pages slot
|
|
324
480
|
* To use to customize the pages view
|
|
325
481
|
* override any configuration parameters provided for this
|
|
326
482
|
*/
|
|
327
|
-
|
|
483
|
+
pagesDisplay: SlotContent<PaginationContext>;
|
|
328
484
|
/**
|
|
329
485
|
* The template to use for the number slot
|
|
330
486
|
* override any configuration parameters provided for this
|
|
331
487
|
* for I18n, we suggest to use the global configuration
|
|
488
|
+
* @param displayedPage - The current page number
|
|
489
|
+
*
|
|
490
|
+
* @defaultValue
|
|
491
|
+
* ```ts
|
|
492
|
+
* ({displayedPage}: PaginationNumberContext) => `${displayedPage}`
|
|
493
|
+
* ```
|
|
332
494
|
*/
|
|
333
|
-
|
|
495
|
+
numberLabel: SlotContent<PaginationNumberContext>;
|
|
334
496
|
}
|
|
335
497
|
export type PaginationWidget = Widget<PaginationProps, PaginationState, PaginationApi, PaginationActions, PaginationDirectives>;
|
|
498
|
+
/**
|
|
499
|
+
* Create a PaginationWidget with given config props
|
|
500
|
+
* @param config - an optional alert config
|
|
501
|
+
* @returns a PaginationWidget
|
|
502
|
+
*/
|
|
503
|
+
declare const export_createPagination: WidgetFactory<PaginationWidget>;
|
|
504
|
+
export { export_createPagination as createPagination };
|
|
336
505
|
export interface DirectionsHrefs {
|
|
337
506
|
/**
|
|
338
507
|
* The href for the 'Previous' navigation link
|
|
@@ -346,6 +515,7 @@ export interface DirectionsHrefs {
|
|
|
346
515
|
export interface PaginationActions {
|
|
347
516
|
/**
|
|
348
517
|
* To "go" to a specific page
|
|
518
|
+
* @param page - The page number to select
|
|
349
519
|
*/
|
|
350
520
|
select(page: number, event?: MouseEvent): void;
|
|
351
521
|
/**
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
import { getPaginationDefaultConfig, createPagination } from '@agnos-ui/core-bootstrap/components/pagination';
|
|
2
|
+
/**
|
|
3
|
+
* Retrieve a shallow copy of the default Pagination config
|
|
4
|
+
* @returns the default Pagination config
|
|
5
|
+
*/
|
|
6
|
+
const export_getPaginationDefaultConfig = getPaginationDefaultConfig;
|
|
7
|
+
export { export_getPaginationDefaultConfig as getPaginationDefaultConfig };
|
|
8
|
+
/**
|
|
9
|
+
* Create a PaginationWidget with given config props
|
|
10
|
+
* @param config - an optional alert config
|
|
11
|
+
* @returns a PaginationWidget
|
|
12
|
+
*/
|
|
13
|
+
const export_createPagination = createPagination;
|
|
14
|
+
export { export_createPagination as createPagination };
|
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export const createPagination = coreCreatePagination;
|
|
3
|
-
export const getPaginationDefaultConfig = coreGetPaginationDefaultConfig;
|
|
1
|
+
export * from './pagination.gen';
|
|
@@ -11,12 +11,12 @@ const widget = callWidgetFactory({
|
|
|
11
11
|
$$slots,
|
|
12
12
|
$$props,
|
|
13
13
|
defaultConfig: {
|
|
14
|
-
|
|
14
|
+
structure: ProgressbarDefaultStructure
|
|
15
15
|
},
|
|
16
16
|
events: {}
|
|
17
17
|
});
|
|
18
18
|
const {
|
|
19
|
-
stores: {
|
|
19
|
+
stores: { structure$, className$ },
|
|
20
20
|
state$,
|
|
21
21
|
directives: { ariaDirective }
|
|
22
22
|
} = widget;
|
|
@@ -26,7 +26,7 @@ $: slotContext = { widget, state: $state$ };
|
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<div use:ariaDirective use:__AgnosUISveltePreprocess__classDirective={($className$ || undefined)} {...__AgnosUISveltePreprocess__BROWSER ? {} : __AgnosUISveltePreprocess__ssrAttributes(ariaDirective, [__AgnosUISveltePreprocess__classDirective, ($className$ || undefined)])}>
|
|
29
|
-
<Slot slotContent={$
|
|
29
|
+
<Slot slotContent={$structure$} props={slotContext} let:component let:props>
|
|
30
30
|
<svelte:fragment slot="slot" let:props><slot name="structure" {...props} /></svelte:fragment>
|
|
31
31
|
<svelte:component this={component} {...props}>
|
|
32
32
|
<svelte:fragment let:state let:widget><slot {state} {widget} /></svelte:fragment>
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import { type ProgressbarProps, type ProgressbarSlots, type ProgressbarApi } from './progressbar';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
api?: ProgressbarApi
|
|
5
|
+
api?: ProgressbarApi;
|
|
6
6
|
} & Partial<ProgressbarProps>;
|
|
7
7
|
events: {
|
|
8
8
|
[evt: string]: CustomEvent<any>;
|
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
import type { WidgetPropsSlots
|
|
2
|
-
import type { ProgressbarProps
|
|
3
|
-
export
|
|
4
|
-
export declare const createProgressbar: WidgetFactory<ProgressbarWidget>;
|
|
5
|
-
export declare const getProgressbarDefaultConfig: () => ProgressbarProps;
|
|
1
|
+
import type { WidgetPropsSlots } from '@agnos-ui/svelte-headless/types';
|
|
2
|
+
import type { ProgressbarProps } from './progressbar.gen';
|
|
3
|
+
export * from './progressbar.gen';
|
|
6
4
|
export interface ProgressbarSlots extends WidgetPropsSlots<ProgressbarProps> {
|
|
7
5
|
}
|