@agnos-ui/angular-bootstrap 0.4.0-next.1 → 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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion.component.d.ts +38 -1
  3. package/components/accordion/accordion.gen.d.ts +77 -5
  4. package/components/accordion/index.d.ts +1 -1
  5. package/components/alert/alert.component.d.ts +32 -1
  6. package/components/alert/alert.gen.d.ts +61 -7
  7. package/components/alert/index.d.ts +1 -1
  8. package/components/modal/index.d.ts +1 -1
  9. package/components/modal/modal.component.d.ts +56 -4
  10. package/components/modal/modal.gen.d.ts +123 -23
  11. package/components/modal/modal.service.d.ts +1 -1
  12. package/components/pagination/index.d.ts +1 -1
  13. package/components/pagination/pagination.component.d.ts +104 -18
  14. package/components/pagination/pagination.gen.d.ts +188 -18
  15. package/components/progressbar/index.d.ts +1 -1
  16. package/components/progressbar/progressbar.component.d.ts +25 -1
  17. package/components/progressbar/progressbar.gen.d.ts +54 -1
  18. package/components/rating/index.d.ts +1 -1
  19. package/components/rating/rating.component.d.ts +46 -1
  20. package/components/rating/rating.gen.d.ts +84 -1
  21. package/components/select/index.d.ts +1 -1
  22. package/components/select/select.component.d.ts +67 -1
  23. package/components/select/select.gen.d.ts +121 -1
  24. package/components/slider/index.d.ts +1 -1
  25. package/components/slider/slider.component.d.ts +49 -1
  26. package/components/slider/slider.gen.d.ts +98 -3
  27. package/components/toast/index.d.ts +1 -1
  28. package/components/toast/toast.component.d.ts +35 -1
  29. package/components/toast/toast.gen.d.ts +65 -7
  30. package/esm2022/components/accordion/accordion.component.mjs +12 -2
  31. package/esm2022/components/accordion/accordion.gen.mjs +33 -2
  32. package/esm2022/components/accordion/index.mjs +2 -2
  33. package/esm2022/components/alert/alert.component.mjs +17 -2
  34. package/esm2022/components/alert/alert.gen.mjs +15 -2
  35. package/esm2022/components/alert/index.mjs +2 -2
  36. package/esm2022/components/modal/index.mjs +2 -2
  37. package/esm2022/components/modal/modal.component.mjs +28 -3
  38. package/esm2022/components/modal/modal.gen.mjs +27 -2
  39. package/esm2022/components/modal/modal.service.mjs +1 -1
  40. package/esm2022/components/pagination/index.mjs +2 -2
  41. package/esm2022/components/pagination/pagination.component.mjs +6 -2
  42. package/esm2022/components/pagination/pagination.gen.mjs +15 -2
  43. package/esm2022/components/progressbar/index.mjs +2 -2
  44. package/esm2022/components/progressbar/progressbar.component.mjs +2 -2
  45. package/esm2022/components/progressbar/progressbar.gen.mjs +15 -2
  46. package/esm2022/components/rating/index.mjs +2 -2
  47. package/esm2022/components/rating/rating.component.mjs +17 -2
  48. package/esm2022/components/rating/rating.gen.mjs +15 -2
  49. package/esm2022/components/select/index.mjs +2 -2
  50. package/esm2022/components/select/select.component.mjs +19 -2
  51. package/esm2022/components/select/select.gen.mjs +15 -2
  52. package/esm2022/components/slider/index.mjs +2 -2
  53. package/esm2022/components/slider/slider.component.mjs +7 -2
  54. package/esm2022/components/slider/slider.gen.mjs +15 -2
  55. package/esm2022/components/toast/index.mjs +2 -2
  56. package/esm2022/components/toast/toast.component.mjs +17 -2
  57. package/esm2022/components/toast/toast.gen.mjs +15 -2
  58. package/esm2022/index.mjs +3 -3
  59. package/fesm2022/agnos-ui-angular-bootstrap.mjs +251 -40
  60. package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
  61. package/index.d.ts +2 -2
  62. package/package.json +5 -5
  63. package/components/accordion/accordion.d.ts +0 -6
  64. package/components/alert/alert.d.ts +0 -5
  65. package/components/modal/modal.d.ts +0 -6
  66. package/components/pagination/pagination.d.ts +0 -5
  67. package/components/progressbar/progressbar.d.ts +0 -5
  68. package/components/rating/rating.d.ts +0 -5
  69. package/components/select/select.d.ts +0 -5
  70. package/components/slider/slider.d.ts +0 -5
  71. package/components/toast/toast.d.ts +0 -5
  72. package/esm2022/components/accordion/accordion.mjs +0 -5
  73. package/esm2022/components/alert/alert.mjs +0 -4
  74. package/esm2022/components/modal/modal.mjs +0 -5
  75. package/esm2022/components/pagination/pagination.mjs +0 -4
  76. package/esm2022/components/progressbar/progressbar.mjs +0 -4
  77. package/esm2022/components/rating/rating.mjs +0 -4
  78. package/esm2022/components/select/select.mjs +0 -4
  79. package/esm2022/components/slider/slider.mjs +0 -4
  80. package/esm2022/components/toast/toast.mjs +0 -4
@@ -2,7 +2,7 @@ import type { SlotContent } from '@agnos-ui/angular-headless';
2
2
  import { BaseWidgetDirective, ComponentTemplate } from '@agnos-ui/angular-headless';
3
3
  import type { AfterContentChecked } from '@angular/core';
4
4
  import { EventEmitter, TemplateRef } from '@angular/core';
5
- import type { PaginationContext, PaginationNumberContext, PaginationWidget } from './pagination';
5
+ import type { PaginationContext, PaginationNumberContext, PaginationWidget } from './pagination.gen';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
8
  * A directive to use to give the 'ellipsis' link template to the pagination component
@@ -98,6 +98,11 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
98
98
  * override any configuration parameters provided for this
99
99
  * @param processPage - The current page number
100
100
  * @param pageCount - The total number of pages
101
+ *
102
+ * @defaultValue
103
+ * ```ts
104
+ * (processPage: number, pageCount: number) => `Page ${processPage} of ${pageCount}`
105
+ * ```
101
106
  */
102
107
  ariaPageLabel: ((processPage: number, pageCount: number) => string) | undefined;
103
108
  /**
@@ -105,6 +110,13 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
105
110
  * This is used for accessibility purposes.
106
111
  * for I18n, we suggest to use the global configuration
107
112
  * override any configuration parameters provided for this
113
+ * @param currentPage - The current page number
114
+ * @param pageCount - The total number of pages
115
+ *
116
+ * @defaultValue
117
+ * ```ts
118
+ * (currentPage: number, pageCount: number) => `Current page is ${currentPage}`
119
+ * ```
108
120
  */
109
121
  ariaLiveLabel: ((currentPage: number, pageCount: number) => string) | undefined;
110
122
  /**
@@ -112,49 +124,71 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
112
124
  *
113
125
  * for I18n, we suggest to use the global configuration
114
126
  * override any configuration parameters provided for this
115
- * @defaultValue 'Page navigation'
127
+ *
128
+ * @defaultValue `'Page navigation'`
116
129
  */
117
130
  ariaLabel: string | undefined;
118
131
  /**
119
132
  * The label for the "active" page.
120
133
  * for I18n, we suggest to use the global configuration
121
134
  * override any configuration parameters provided for this
122
- * @defaultValue '(current)'
135
+ *
136
+ * @defaultValue
137
+ * ```ts
138
+ * '(current)'
139
+ * ```
123
140
  */
124
141
  activeLabel: string | undefined;
125
142
  /**
126
143
  * The label for the "First" page button.
127
144
  * for I18n, we suggest to use the global configuration
128
145
  * override any configuration parameters provided for this
129
- * @defaultValue 'Action link for first page'
146
+ *
147
+ * @defaultValue
148
+ * ```ts
149
+ * 'Action link for first page'
150
+ * ```
130
151
  */
131
152
  ariaFirstLabel: string | undefined;
132
153
  /**
133
154
  * The label for the "Previous" page button.
134
155
  * for I18n, we suggest to use the global configuration
135
156
  * override any configuration parameters provided for this
136
- * @defaultValue 'Action link for previous page'
157
+ *
158
+ * @defaultValue
159
+ * ```ts
160
+ * 'Action link for previous page'
161
+ * ```
137
162
  */
138
163
  ariaPreviousLabel: string | undefined;
139
164
  /**
140
165
  * The label for the "Next" page button.
141
166
  * for I18n, we suggest to use the global configuration
142
167
  * override any configuration parameters provided for this
143
- * @defaultValue 'Action link for next page'
168
+ *
169
+ * @defaultValue
170
+ * ```ts
171
+ * 'Action link for next page'
172
+ * ```
144
173
  */
145
174
  ariaNextLabel: string | undefined;
146
175
  /**
147
176
  * The label for the "Last" page button.
148
177
  * for I18n, we suggest to use the global configuration
149
178
  * override any configuration parameters provided for this
150
- * @defaultValue 'Action link for last page'
179
+ *
180
+ * @defaultValue
181
+ * ```ts
182
+ * 'Action link for last page'
183
+ * ```
151
184
  */
152
185
  ariaLastLabel: string | undefined;
153
186
  /**
154
187
  * The label for the "Ellipsis" page.
155
188
  * for I18n, we suggest to use the global configuration
156
189
  * override any configuration parameters provided for this
157
- * @defaultValue 'Ellipsis page element'
190
+ *
191
+ * @defaultValue `'Ellipsis page element'`
158
192
  */
159
193
  ariaEllipsisLabel: string | undefined;
160
194
  /**
@@ -162,6 +196,10 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
162
196
  * based on the current page number
163
197
  * @param pageNumber - The index to use in the link
164
198
  *
199
+ * @defaultValue
200
+ * ```ts
201
+ * (_page: number) => PAGE_LINK_DEFAULT
202
+ * ```
165
203
  */
166
204
  pageLink: ((pageNumber: number) => string) | undefined;
167
205
  readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<PaginationWidget>;
@@ -169,6 +207,8 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
169
207
  * The template to use for the ellipsis slot
170
208
  * for I18n, we suggest to use the global configuration
171
209
  * override any configuration parameters provided for this
210
+ *
211
+ * @defaultValue `'…'`
172
212
  */
173
213
  ellipsisLabel: SlotContent<PaginationContext>;
174
214
  slotEllipsisFromContent: PaginationEllipsisDirective | undefined;
@@ -176,6 +216,8 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
176
216
  * The template to use for the first slot
177
217
  * for I18n, we suggest to use the global configuration
178
218
  * override any configuration parameters provided for this
219
+ *
220
+ * @defaultValue `'«'`
179
221
  */
180
222
  firstPageLabel: SlotContent<PaginationContext>;
181
223
  slotFirstFromContent: PaginationFirstDirective | undefined;
@@ -183,6 +225,8 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
183
225
  * The template to use for the previous slot
184
226
  * for I18n, we suggest to use the global configuration
185
227
  * override any configuration parameters provided for this
228
+ *
229
+ * @defaultValue `'‹'`
186
230
  */
187
231
  previousPageLabel: SlotContent<PaginationContext>;
188
232
  slotPreviousFromContent: PaginationPreviousDirective | undefined;
@@ -190,6 +234,8 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
190
234
  * The template to use for the next slot
191
235
  * for I18n, we suggest to use the global configuration
192
236
  * override any configuration parameters provided for this
237
+ *
238
+ * @defaultValue `'›'`
193
239
  */
194
240
  nextPageLabel: SlotContent<PaginationContext>;
195
241
  slotNextFromContent: PaginationNextDirective | undefined;
@@ -197,6 +243,8 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
197
243
  * The template to use for the last slot
198
244
  * for I18n, we suggest to use the global configuration
199
245
  * override any configuration parameters provided for this
246
+ *
247
+ * @defaultValue `'»'`
200
248
  */
201
249
  lastPageLabel: SlotContent<PaginationContext>;
202
250
  slotLastFromContent: PaginationLastDirective | undefined;
@@ -211,63 +259,95 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
211
259
  * The template to use for the number slot
212
260
  * override any configuration parameters provided for this
213
261
  * for I18n, we suggest to use the global configuration
262
+ * @param displayedPage - The current page number
263
+ *
264
+ * @defaultValue
265
+ * ```ts
266
+ * ({displayedPage}: PaginationNumberContext) => `${displayedPage}`
267
+ * ```
214
268
  */
215
269
  numberLabel: SlotContent<PaginationNumberContext>;
216
270
  slotNumberLabelFromContent: PaginationNumberDirective | undefined;
217
271
  /**
218
272
  * The template to use for the structure of the pagination component
219
- * The default structure uses PaginationProps.ellipsisLabelellipsisLabel , PaginationProps.firstPageLabelfirstPageLabel ,
220
- * PaginationProps.previousPageLabelpreviousPageLabel , PaginationProps.nextPageLabelnextPageLabel ,
221
- * PaginationProps.lastPageLabellastPageLabel , PaginationProps.pagesDisplaypagesDisplay ,
222
- * PaginationProps.numberLabelnumberLabel ,
273
+ * The default structure uses {@link PaginationProps.ellipsisLabel|ellipsisLabel}, {@link PaginationProps.firstPageLabel|firstPageLabel},
274
+ * {@link PaginationProps.previousPageLabel|previousPageLabel}, {@link PaginationProps.nextPageLabel|nextPageLabel},
275
+ * {@link PaginationProps.lastPageLabel|lastPageLabel}, {@link PaginationProps.pagesDisplay|pagesDisplay},
276
+ * {@link PaginationProps.numberLabel|numberLabel},
223
277
  */
224
278
  structure: SlotContent<PaginationContext>;
225
279
  slotStructureFromContent: PaginationStructureDirective | undefined;
226
280
  /**
227
281
  * If `true`, pagination links will be disabled.
282
+ *
283
+ * @defaultValue `false`
228
284
  */
229
285
  disabled: boolean | undefined;
230
286
  /**
231
287
  * If `true`, the "First" and "Last" page links are shown.
288
+ *
289
+ * @defaultValue `false`
232
290
  */
233
291
  boundaryLinks: boolean | undefined;
234
292
  /**
235
293
  * If `true`, the "Next" and "Previous" page links are shown.
294
+ *
295
+ * @defaultValue `true`
236
296
  */
237
297
  directionLinks: boolean | undefined;
238
298
  /**
239
299
  * The number of items in your paginated collection.
240
300
  *
241
301
  * Note, that this is not the number of pages. Page numbers are calculated dynamically based on
242
- * `collectionSize` and `pageSize`. Ex. if you have 100 items in your collection and displaying 20 items per page,
243
- * you'll end up with 5 pages.
302
+ * `collectionSize` and `pageSize`.
303
+ *
304
+ * Ex. if you have 100 items in your collection and displaying 20 items per page, you'll end up with 5 pages.
305
+ *
244
306
  * Whatever the collectionSize the page number is of minimum 1.
245
- * @defaultValue 0
307
+ *
308
+ * @defaultValue `0`
246
309
  */
247
310
  collectionSize: number | undefined;
248
311
  /**
249
312
  * The current page.
250
313
  *
251
314
  * Page numbers start with `1`.
252
- * @defaultValue 1
315
+ *
316
+ * @defaultValue `1`
253
317
  */
254
318
  page: number | undefined;
255
319
  /**
256
320
  * The number of items per page.
257
- * @defaultValue 10
321
+ * @remarks min value is 1
322
+ *
323
+ * @defaultValue `10`
258
324
  */
259
325
  pageSize: number | undefined;
260
326
  /**
261
327
  * The pagination display size.
262
328
  *
263
329
  * Bootstrap currently supports small and large sizes.
264
- * @defaultValue null
330
+ *
331
+ * @defaultValue `null`
265
332
  */
266
333
  size: 'sm' | 'lg' | null | undefined;
267
334
  /**
268
335
  * pagesFactory returns a function computing the array of pages to be displayed
269
336
  * as number (-1 are treated as ellipsis).
270
337
  * Use Page slot to customize the pages view and not this
338
+ * @param page - The current page number
339
+ * @param pageCount - The total number of pages
340
+ *
341
+ * @defaultValue
342
+ * ```ts
343
+ * (_page: number, pageCount: number) => {
344
+ * const pages: number[] = [];
345
+ * for (let i = 1; i <= pageCount; i++) {
346
+ * pages.push(i);
347
+ * }
348
+ * return pages;
349
+ * }
350
+ * ```
271
351
  */
272
352
  pagesFactory: ((page: number, pageCount: number) => number[]) | undefined;
273
353
  /**
@@ -276,10 +356,16 @@ export declare class PaginationComponent extends BaseWidgetDirective<PaginationW
276
356
  * Event payload is the number of the newly selected page.
277
357
  *
278
358
  * Page numbers start with `1`.
359
+ * @defaultValue
360
+ * ```ts
361
+ * () => {}
362
+ * ```
279
363
  */
280
364
  pageChange: EventEmitter<number>;
281
365
  /**
282
366
  * CSS classes to be applied on the widget main container
367
+ *
368
+ * @defaultValue `''`
283
369
  */
284
370
  className: string | undefined;
285
371
  ngAfterContentChecked(): void;