@mintplayer/ng-bootstrap 22.32.0 → 22.34.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 (230) hide show
  1. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +3 -166
  2. package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -140
  4. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  5. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +33 -63
  6. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  7. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs +23 -30
  8. package/fesm2022/mintplayer-ng-bootstrap-badge.mjs.map +1 -1
  9. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs +37 -22
  10. package/fesm2022/mintplayer-ng-bootstrap-breadcrumb.mjs.map +1 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs +25 -9
  12. package/fesm2022/mintplayer-ng-bootstrap-button-group.mjs.map +1 -1
  13. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +5 -9
  14. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  15. package/fesm2022/mintplayer-ng-bootstrap-card.mjs +157 -219
  16. package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
  17. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +7 -9
  18. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  19. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +12 -14
  20. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  21. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -40
  22. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  23. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +8 -8
  24. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  25. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +313 -212
  26. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  27. package/fesm2022/mintplayer-ng-bootstrap-close.mjs +25 -15
  28. package/fesm2022/mintplayer-ng-bootstrap-close.mjs.map +1 -1
  29. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +7 -7
  30. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  31. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +87 -676
  32. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  33. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +52 -119
  34. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  35. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +15 -27
  36. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  37. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +6 -10
  38. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  39. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +7 -9
  40. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  41. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +5 -7
  42. package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
  43. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +201 -197
  44. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  45. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +9 -19
  46. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  47. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +64 -123
  48. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  49. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +18 -32
  50. package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-form.mjs +52 -38
  52. package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
  53. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs +64 -119
  54. package/fesm2022/mintplayer-ng-bootstrap-grid.mjs.map +1 -1
  55. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +23 -38
  56. package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
  57. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs +44 -44
  58. package/fesm2022/mintplayer-ng-bootstrap-list-group.mjs.map +1 -1
  59. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +201 -18
  60. package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
  61. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs +27 -12
  62. package/fesm2022/mintplayer-ng-bootstrap-marquee.mjs.map +1 -1
  63. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +61 -261
  64. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  65. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +13 -15
  66. package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
  67. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs +3 -4
  68. package/fesm2022/mintplayer-ng-bootstrap-nav.mjs.map +1 -1
  69. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs +30 -18
  70. package/fesm2022/mintplayer-ng-bootstrap-navbar-toggler.mjs.map +1 -1
  71. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +20 -90
  72. package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
  73. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +52 -401
  74. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  75. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +7 -7
  76. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  77. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +27 -50
  78. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  79. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs +21 -12
  80. package/fesm2022/mintplayer-ng-bootstrap-parallax.mjs.map +1 -1
  81. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -10
  82. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  83. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs +26 -54
  84. package/fesm2022/mintplayer-ng-bootstrap-placeholder.mjs.map +1 -1
  85. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs +29 -15
  86. package/fesm2022/mintplayer-ng-bootstrap-playlist-toggler.mjs.map +1 -1
  87. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs +56 -267
  88. package/fesm2022/mintplayer-ng-bootstrap-popover.mjs.map +1 -1
  89. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +60 -335
  90. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  91. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs +47 -63
  92. package/fesm2022/mintplayer-ng-bootstrap-progress-bar.mjs.map +1 -1
  93. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +8 -16
  94. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  95. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +232 -169
  96. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  97. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +85 -47
  98. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  99. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +80 -137
  100. package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
  101. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +29 -326
  102. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  103. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +49 -65
  104. package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
  105. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +16 -24
  106. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  107. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +48 -181
  108. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  109. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -9
  110. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  111. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +52 -108
  112. package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
  113. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +7 -9
  114. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  115. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +7 -7
  116. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  117. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs +35 -40
  118. package/fesm2022/mintplayer-ng-bootstrap-sticky-footer.mjs.map +1 -1
  119. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +61 -101
  120. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  121. package/fesm2022/mintplayer-ng-bootstrap-table.mjs +29 -23
  122. package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
  123. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +1 -1
  124. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  125. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +67 -306
  126. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  127. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +7 -9
  128. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  129. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +13 -17
  130. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  131. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs +103 -152
  132. package/fesm2022/mintplayer-ng-bootstrap-toast.mjs.map +1 -1
  133. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +50 -157
  134. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  135. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +10 -12
  136. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  137. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +11 -13
  138. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  139. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +159 -234
  140. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  141. package/package.json +2 -22
  142. package/types/mintplayer-ng-bootstrap-a11y.d.ts +2 -81
  143. package/types/mintplayer-ng-bootstrap-accordion.d.ts +51 -86
  144. package/types/mintplayer-ng-bootstrap-alert.d.ts +20 -28
  145. package/types/mintplayer-ng-bootstrap-badge.d.ts +12 -12
  146. package/types/mintplayer-ng-bootstrap-breadcrumb.d.ts +29 -8
  147. package/types/mintplayer-ng-bootstrap-button-group.d.ts +14 -4
  148. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -5
  149. package/types/mintplayer-ng-bootstrap-card.d.ts +93 -78
  150. package/types/mintplayer-ng-bootstrap-carousel.d.ts +4 -6
  151. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +4 -6
  152. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +24 -17
  153. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +3 -3
  154. package/types/mintplayer-ng-bootstrap-checkbox.d.ts +143 -91
  155. package/types/mintplayer-ng-bootstrap-close.d.ts +16 -5
  156. package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +3 -3
  157. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +42 -226
  158. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +35 -17
  159. package/types/mintplayer-ng-bootstrap-datatable.d.ts +23 -35
  160. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +2 -6
  161. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +2 -4
  162. package/types/mintplayer-ng-bootstrap-dock.d.ts +6 -8
  163. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +122 -54
  164. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +10 -20
  165. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +62 -44
  166. package/types/mintplayer-ng-bootstrap-floating-labels.d.ts +12 -15
  167. package/types/mintplayer-ng-bootstrap-form.d.ts +32 -11
  168. package/types/mintplayer-ng-bootstrap-grid.d.ts +38 -31
  169. package/types/mintplayer-ng-bootstrap-input-group.d.ts +11 -22
  170. package/types/mintplayer-ng-bootstrap-list-group.d.ts +28 -14
  171. package/types/mintplayer-ng-bootstrap-machine.d.ts +101 -4
  172. package/types/mintplayer-ng-bootstrap-marquee.d.ts +18 -5
  173. package/types/mintplayer-ng-bootstrap-modal.d.ts +43 -86
  174. package/types/mintplayer-ng-bootstrap-multi-range.d.ts +4 -6
  175. package/types/mintplayer-ng-bootstrap-nav.d.ts +3 -3
  176. package/types/mintplayer-ng-bootstrap-navbar-toggler.d.ts +21 -6
  177. package/types/mintplayer-ng-bootstrap-navbar.d.ts +15 -42
  178. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +35 -112
  179. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +4 -3
  180. package/types/mintplayer-ng-bootstrap-pagination.d.ts +22 -35
  181. package/types/mintplayer-ng-bootstrap-parallax.d.ts +14 -4
  182. package/types/mintplayer-ng-bootstrap-phone-input.d.ts +5 -6
  183. package/types/mintplayer-ng-bootstrap-placeholder.d.ts +17 -16
  184. package/types/mintplayer-ng-bootstrap-playlist-toggler.d.ts +22 -6
  185. package/types/mintplayer-ng-bootstrap-popover.d.ts +35 -61
  186. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +80 -68
  187. package/types/mintplayer-ng-bootstrap-progress-bar.d.ts +34 -19
  188. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +12 -20
  189. package/types/mintplayer-ng-bootstrap-radio.d.ts +112 -84
  190. package/types/mintplayer-ng-bootstrap-range.d.ts +35 -13
  191. package/types/mintplayer-ng-bootstrap-rating.d.ts +33 -42
  192. package/types/mintplayer-ng-bootstrap-resizable.d.ts +24 -114
  193. package/types/mintplayer-ng-bootstrap-ribbon.d.ts +21 -37
  194. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +19 -27
  195. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +26 -51
  196. package/types/mintplayer-ng-bootstrap-select.d.ts +8 -7
  197. package/types/mintplayer-ng-bootstrap-shell.d.ts +40 -63
  198. package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +4 -6
  199. package/types/mintplayer-ng-bootstrap-splitter.d.ts +3 -3
  200. package/types/mintplayer-ng-bootstrap-sticky-footer.d.ts +23 -19
  201. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +61 -57
  202. package/types/mintplayer-ng-bootstrap-table.d.ts +21 -12
  203. package/types/mintplayer-ng-bootstrap-tile-manager.d.ts +94 -154
  204. package/types/mintplayer-ng-bootstrap-timeline.d.ts +23 -25
  205. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +3 -7
  206. package/types/mintplayer-ng-bootstrap-toast.d.ts +92 -55
  207. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +34 -33
  208. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +14 -16
  209. package/types/mintplayer-ng-bootstrap-treeview.d.ts +12 -13
  210. package/types/mintplayer-ng-bootstrap-typeahead.d.ts +109 -133
  211. package/calendar-month/package.json +0 -4
  212. package/dropdown-divider/package.json +0 -4
  213. package/dropdown-menu/package.json +0 -4
  214. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs +0 -136
  215. package/fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs.map +0 -1
  216. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs +0 -30
  217. package/fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs.map +0 -1
  218. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +0 -169
  219. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +0 -1
  220. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs +0 -32
  221. package/fesm2022/mintplayer-ng-bootstrap-has-overlay.mjs.map +0 -1
  222. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs +0 -31
  223. package/fesm2022/mintplayer-ng-bootstrap-no-noscript.mjs.map +0 -1
  224. package/has-overlay/package.json +0 -4
  225. package/no-noscript/package.json +0 -4
  226. package/types/mintplayer-ng-bootstrap-calendar-month.d.ts +0 -54
  227. package/types/mintplayer-ng-bootstrap-dropdown-divider.d.ts +0 -9
  228. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +0 -94
  229. package/types/mintplayer-ng-bootstrap-has-overlay.d.ts +0 -22
  230. package/types/mintplayer-ng-bootstrap-no-noscript.d.ts +0 -11
@@ -1,152 +1,128 @@
1
- import * as _mintplayer_ui_core_typeahead from '@mintplayer/ui-core/typeahead';
2
- import { TypeaheadRequest, TypeaheadMachine } from '@mintplayer/ui-core/typeahead';
3
- export { TypeaheadLabels, TypeaheadProvider, TypeaheadRequest, inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
4
1
  import * as _angular_core from '@angular/core';
5
- import { TemplateRef } from '@angular/core';
2
+ import { OnInit, ElementRef, TemplateRef } from '@angular/core';
3
+ import * as _mintplayer_ui_core_typeahead from '@mintplayer/ui-core/typeahead';
4
+ import { TypeaheadItem, TypeaheadItemSelectDetail, TypeaheadMethods } from '@mintplayer/ui-core/typeahead';
5
+ export { TypeaheadItem, TypeaheadItemSelectDetail, TypeaheadLabels, TypeaheadProvider, TypeaheadRequest, TypeaheadSource, TypeaheadSubscribable, inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
6
+ import * as _mintplayer_ng_bootstrap_machine from '@mintplayer/ng-bootstrap/machine';
6
7
  import { ControlValueAccessor } from '@angular/forms';
7
- import { Observable } from 'rxjs';
8
8
 
9
- /** The context of a `*bsTypeaheadItem` template: the item and the current term (for highlighting). */
10
- interface BsTypeaheadItemContext<T = unknown> {
11
- $implicit: T;
12
- term: string;
13
- }
14
9
  /**
15
- * Renders one suggestion row. Declared inside `<bs-typeahead>`; absent, the
16
- * row shows the item's text (`itemText`).
17
- *
18
- * ```html
19
- * <bs-typeahead [provider]="streets">
20
- * <ng-container *bsTypeaheadItem="let street; let term = term; of: streetList">
21
- * {{ street.name }} <small>{{ street.municipality }}</small>
22
- * </ng-container>
23
- * </bs-typeahead>
24
- * ```
25
- *
26
- * `of:` is optional and only carries the item type into the template (like
27
- * `ngFor`'s `of`); pass any value of the item type or an array of it.
10
+ * The `ControlValueAccessor` of `bs-typeahead` (a host directive of the
11
+ * generated component, see `typeahead.angular.ts`). The value is the term. A
12
+ * bound form control drives it through `viewValue`; what the user types reaches
13
+ * the form through the component's `valuechange`, which a form write never
14
+ * echoes (a programmatic set does not query either).
28
15
  */
29
- declare class BsTypeaheadItemDirective<T = unknown> {
30
- readonly templateRef: TemplateRef<BsTypeaheadItemContext<T>>;
31
- /** Type carrier only; never read at runtime. */
32
- readonly bsTypeaheadItemOf: _angular_core.InputSignal<T | readonly T[] | null | undefined>;
33
- static ngTemplateContextGuard<T>(_dir: BsTypeaheadItemDirective<T>, ctx: unknown): ctx is BsTypeaheadItemContext<T>;
34
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTypeaheadItemDirective<any>, never>;
35
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsTypeaheadItemDirective<any>, "[bsTypeaheadItem]", never, { "bsTypeaheadItemOf": { "alias": "bsTypeaheadItemOf"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
16
+ declare class BsTypeaheadValueAccessor implements ControlValueAccessor, OnInit {
17
+ private readonly injector;
18
+ private readonly destroyRef;
19
+ private readonly host;
20
+ /** A form control drives the term: its `viewValue` wins over the `value` input. */
21
+ readonly bound: _angular_core.WritableSignal<boolean>;
22
+ readonly viewValue: _angular_core.WritableSignal<string>;
23
+ readonly disabled: _angular_core.WritableSignal<boolean>;
24
+ private onChange;
25
+ onTouched: () => void;
26
+ constructor();
27
+ ngOnInit(): void;
28
+ registerOnChange(fn: (value: string) => void): void;
29
+ registerOnTouched(fn: () => void): void;
30
+ writeValue(value: string | null | undefined): void;
31
+ setDisabledState(isDisabled: boolean): void;
32
+ /**
33
+ * Text typed into the server-rendered input before hydration would be
34
+ * overwritten by the `value` binding. Read it while the host still holds the
35
+ * server DOM, and replay it as typing once the form directives have written
36
+ * their initial value (ngModel writes in a microtask after the first render)
37
+ * and the core has attached: a real `input` event, so the term, the model,
38
+ * the form control and the query all take the path live typing takes.
39
+ */
40
+ private adoptPreHydrationText;
41
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTypeaheadValueAccessor, never>;
42
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsTypeaheadValueAccessor, never, never, {}, {}, never, never, true, never>;
36
43
  }
37
44
 
45
+ /** The `item` slot of `<bs-typeahead>`: `<ng-template bsTypeaheadItem>` or `*bsTypeaheadItem`. */
46
+ declare class BsTypeaheadItemDirective {
47
+ readonly templateRef: TemplateRef<{
48
+ item: TypeaheadItem;
49
+ term: string;
50
+ } & {
51
+ $implicit: {
52
+ item: TypeaheadItem;
53
+ term: string;
54
+ }["item"];
55
+ }>;
56
+ static ngTemplateContextGuard(_dir: BsTypeaheadItemDirective, ctx: unknown): ctx is {
57
+ item: TypeaheadItem;
58
+ term: string;
59
+ } & {
60
+ $implicit: {
61
+ item: TypeaheadItem;
62
+ term: string;
63
+ }['item'];
64
+ };
65
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTypeaheadItemDirective, never>;
66
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsTypeaheadItemDirective, "[bsTypeaheadItem]", never, {}, {}, never, never, true, never>;
67
+ }
38
68
  /**
39
- * An Angular provider may answer with a Promise or an Observable. An
40
- * Observable is unsubscribed when `request.signal` aborts, which cancels an
41
- * `HttpClient` request in flight.
42
- */
43
- type BsTypeaheadProvider<T> = (term: string, request: TypeaheadRequest) => Promise<readonly T[]> | Observable<readonly T[]>;
44
- /**
45
- * Typeahead: a text input with asynchronous suggestions and free text.
46
- *
47
- * The first component built on the headless-core architecture (#436): all
48
- * behaviour lives in `TypeaheadMachine` (`@mintplayer/ui-core/typeahead`); this
49
- * component renders its own Angular template from the machine's snapshot and
50
- * applies the core's ARIA bags with `[mpProps]`. Because it is an Angular
51
- * template, Angular SSR emits a real, named `<input>` that submits free text
52
- * with JavaScript disabled, and hydration attaches to that same node.
53
- *
54
- * Value = the term (string). `selectedItem()` holds the last picked item until
55
- * the text changes. Usable with `[(value)]`, `[(ngModel)]`, `formControlName`.
69
+ * A text input with asynchronous suggestions and free text (#436). The value is the term; a
70
+ * pick writes its text into the input and emits `itemSelect`. The `provider` answers with a
71
+ * Promise or an Observable, and a newer term aborts the previous request. Server-rendered as a
72
+ * real, named `<input>` that submits free text with JavaScript off. Slot: `item` (a
73
+ * suggestion's content, with the `item` and the `term`). An `aria-label` names the input.
56
74
  */
57
- declare class BsTypeaheadComponent<T = unknown> implements ControlValueAccessor {
58
- /** Supplies suggestions for a settled term; a newer term aborts the previous request. */
59
- readonly provider: _angular_core.InputSignal<BsTypeaheadProvider<T> | null>;
60
- /** Quiet time after the last keystroke, ms. 0 requests synchronously. */
61
- readonly debounceMs: _angular_core.InputSignal<number>;
62
- /** A trimmed term shorter than this closes the list without querying. */
63
- readonly minLength: _angular_core.InputSignal<number>;
64
- readonly disabled: _angular_core.InputSignal<boolean>;
65
- /** The text a pick writes into the input. Default: `item.text`, else `String(item)`. */
66
- readonly itemText: _angular_core.InputSignal<((item: T) => string) | undefined>;
67
- /** Row identity for keyed rendering. Default: `itemText`. */
68
- readonly itemKey: _angular_core.InputSignal<((item: T) => unknown) | undefined>;
69
- /** Submitted with a native `<form>` under this name (also with JavaScript disabled). */
75
+ declare class BsTypeaheadComponent {
76
+ #private;
77
+ /** The host element. */
78
+ readonly elementRef: ElementRef<HTMLElement>;
79
+ /** The consumer's aria-*, id and tabindex on the host, for the role-bearing node. */
80
+ protected readonly hostAttrs: _mintplayer_ng_bootstrap_machine.HostAttrs;
81
+ readonly provider: _angular_core.InputSignal<_mintplayer_ui_core_typeahead.TypeaheadSource<any> | null>;
82
+ readonly debounceMs: _angular_core.InputSignalWithTransform<number, unknown>;
83
+ readonly minLength: _angular_core.InputSignalWithTransform<number, unknown>;
84
+ readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
85
+ readonly itemText: _angular_core.InputSignal<((item: TypeaheadItem) => string) | null>;
86
+ readonly itemKey: _angular_core.InputSignal<((item: TypeaheadItem) => unknown) | null>;
70
87
  readonly name: _angular_core.InputSignal<string | null>;
71
- /** Accessible name of the input. A host `aria-label` or `aria-labelledby` wins. */
72
88
  readonly inputLabel: _angular_core.InputSignal<string | null>;
73
- readonly loadingLabel: _angular_core.InputSignal<string | undefined>;
74
- readonly noResultsLabel: _angular_core.InputSignal<string | undefined>;
75
- /** Spoken once per settled request, e.g. `n => n + ' resultaten'`. */
76
- readonly resultsLabel: _angular_core.InputSignal<((count: number) => string) | undefined>;
77
- /** A persistent validation message, wired to the input with aria-errormessage. */
89
+ readonly loadingLabel: _angular_core.InputSignal<string | null>;
90
+ readonly noResultsLabel: _angular_core.InputSignal<string | null>;
91
+ readonly resultsLabel: _angular_core.InputSignal<((count: number) => string) | null>;
78
92
  readonly errorText: _angular_core.InputSignal<string | null>;
79
- /** The term. Two-way; also the ControlValueAccessor value. */
80
93
  readonly value: _angular_core.ModelSignal<string>;
81
- readonly select: _angular_core.OutputEmitterRef<T>;
82
- readonly submitted: _angular_core.OutputEmitterRef<string>;
83
- readonly opened: _angular_core.OutputEmitterRef<void>;
84
- readonly closed: _angular_core.OutputEmitterRef<void>;
94
+ /** A suggestion was picked, with the text it wrote. */
95
+ readonly itemSelect: _angular_core.OutputEmitterRef<TypeaheadItemSelectDetail>;
96
+ /** Enter with no suggestion highlighted. */
97
+ readonly termSubmit: _angular_core.OutputEmitterRef<string>;
98
+ /** The list opened (true) or closed (false). */
99
+ readonly openChange: _angular_core.OutputEmitterRef<boolean>;
100
+ /** A provider call started for this term. */
101
+ readonly searchStart: _angular_core.OutputEmitterRef<string>;
102
+ /** The provider rejected. */
85
103
  readonly loadError: _angular_core.OutputEmitterRef<unknown>;
86
- readonly itemTemplate: _angular_core.Signal<BsTypeaheadItemDirective<T> | undefined>;
87
- private readonly inputRef;
88
- private readonly listboxRef;
89
- readonly id: string;
90
- /**
91
- * Host transparency: a consumer's `aria-*`, `id` and `tabindex` on
92
- * `<bs-typeahead>` land on the role-bearing input (`id` and `tabindex` are
93
- * moved, so no duplicate id and no dead tab stop on the host). A consumer
94
- * `role` is NOT forwarded: the input's role is `combobox` by contract. Read
95
- * once, in the constructor, so the server render carries them too.
96
- */
97
- private readonly hostAria;
98
- readonly machine: TypeaheadMachine<T>;
99
- readonly state: _angular_core.Signal<_mintplayer_ui_core_typeahead.TypeaheadState<T>>;
100
- readonly api: _angular_core.Signal<{
101
- input: {
102
- [x: string]: string | boolean | null;
103
- };
104
- root: _mintplayer_ui_core_typeahead.AttrBag;
105
- listbox: _mintplayer_ui_core_typeahead.AttrBag;
106
- status: {
107
- attrs: _mintplayer_ui_core_typeahead.AttrBag;
108
- text: string;
109
- } | null;
110
- option(index: number): _mintplayer_ui_core_typeahead.AttrBag;
111
- live: {
112
- attrs: _mintplayer_ui_core_typeahead.AttrBag;
113
- text: string;
114
- };
115
- error: {
116
- attrs: _mintplayer_ui_core_typeahead.AttrBag;
117
- text: string;
118
- } | null;
104
+ private readonly itemSlot;
105
+ /** The template's named slots. */
106
+ protected readonly slots: _angular_core.Signal<{
107
+ item: TemplateRef<{
108
+ item: TypeaheadItem;
109
+ term: string;
110
+ } & {
111
+ $implicit: {
112
+ item: TypeaheadItem;
113
+ term: string;
114
+ }["item"];
115
+ }> | undefined;
116
+ }>;
117
+ /** The template's props. */
118
+ protected readonly props: _angular_core.Signal<{
119
+ view: _mintplayer_ui_core_typeahead.TypeaheadView;
119
120
  }>;
120
- /** The last picked item, `null` once the text changes after the pick. */
121
- readonly selectedItem: _angular_core.Signal<T | null>;
122
- private readonly disabledByCva;
123
- /** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */
124
- private readonly hydrated;
125
- private onChange;
126
- private onTouched;
127
121
  constructor();
128
- /**
129
- * Text typed or pasted into the server-rendered input before hydration lives
130
- * only in the DOM. Hydration's [value] binding would overwrite it with the
131
- * empty term, and the replayed input event then reads the empty field, so it
132
- * is lost. Read it here, while the host still holds the server DOM, and keep
133
- * it as the term; once effects have configured the provider, re-enter it as a
134
- * typed term so it notifies the model and queries.
135
- */
136
- private adoptPreHydrationText;
137
- protected onInput(event: Event): void;
138
- protected onKeydown(event: KeyboardEvent): void;
139
- protected onBlur(): void;
140
- protected trackItem: (index: number, item: T) => unknown;
141
122
  /** Focus the input. */
142
- focus(): void;
143
- writeValue(value: string | null): void;
144
- registerOnChange(fn: (value: string) => void): void;
145
- registerOnTouched(fn: () => void): void;
146
- setDisabledState(isDisabled: boolean): void;
147
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTypeaheadComponent<any>, never>;
148
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTypeaheadComponent<any>, "bs-typeahead", never, { "provider": { "alias": "provider"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemText": { "alias": "itemText"; "required": false; "isSignal": true; }; "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "noResultsLabel": { "alias": "noResultsLabel"; "required": false; "isSignal": true; }; "resultsLabel": { "alias": "resultsLabel"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "select": "select"; "submitted": "submitted"; "opened": "opened"; "closed": "closed"; "loadError": "loadError"; }, ["itemTemplate"], never, true, never>;
123
+ focus(...args: Parameters<TypeaheadMethods['focus']>): ReturnType<TypeaheadMethods['focus']>;
124
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsTypeaheadComponent, never>;
125
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsTypeaheadComponent, "bs-typeahead", never, { "provider": { "alias": "provider"; "required": false; "isSignal": true; }; "debounceMs": { "alias": "debounceMs"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "itemText": { "alias": "itemText"; "required": false; "isSignal": true; }; "itemKey": { "alias": "itemKey"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "loadingLabel": { "alias": "loadingLabel"; "required": false; "isSignal": true; }; "noResultsLabel": { "alias": "noResultsLabel"; "required": false; "isSignal": true; }; "resultsLabel": { "alias": "resultsLabel"; "required": false; "isSignal": true; }; "errorText": { "alias": "errorText"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "itemSelect": "itemSelect"; "termSubmit": "termSubmit"; "openChange": "openChange"; "searchStart": "searchStart"; "loadError": "loadError"; }, ["itemSlot"], never, true, [{ directive: typeof BsTypeaheadValueAccessor; inputs: {}; outputs: {}; }]>;
149
126
  }
150
127
 
151
- export { BsTypeaheadComponent, BsTypeaheadItemDirective };
152
- export type { BsTypeaheadItemContext, BsTypeaheadProvider };
128
+ export { BsTypeaheadComponent, BsTypeaheadItemDirective, BsTypeaheadValueAccessor };
@@ -1,4 +0,0 @@
1
- {
2
- "module": "../fesm2022/mintplayer-ng-bootstrap-calendar-month.mjs",
3
- "typings": "../types/mintplayer-ng-bootstrap-calendar-month.d.ts"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "module": "../fesm2022/mintplayer-ng-bootstrap-dropdown-divider.mjs",
3
- "typings": "../types/mintplayer-ng-bootstrap-dropdown-divider.d.ts"
4
- }
@@ -1,4 +0,0 @@
1
- {
2
- "module": "../fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs",
3
- "typings": "../types/mintplayer-ng-bootstrap-dropdown-menu.d.ts"
4
- }
@@ -1,136 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, Pipe } from '@angular/core';
3
-
4
- class BsCalendarMonthService {
5
- getWeeks(month) {
6
- const firstAndLast = this.getFirstAndLastDayOfMonth(month);
7
- const firstOfMonth = this.getMondayBefore(firstAndLast.first);
8
- const lastOfMonth = this.getSundayAfter(firstAndLast.last);
9
- const days = this.dateDiff(firstOfMonth, lastOfMonth) + 1;
10
- const firstDayOffset = (firstAndLast.first.getDay() + 7 - 1) % 7;
11
- const allDays = this.generateList(days).map(d => d - firstDayOffset).map(d => {
12
- const wrongDate = new Date(firstAndLast.first.getFullYear(), firstAndLast.first.getMonth(), firstAndLast.first.getDate() + d);
13
- const correctDate = new Date(wrongDate.getFullYear(), wrongDate.getMonth(), wrongDate.getDate());
14
- return {
15
- date: correctDate,
16
- dayOfMonth: correctDate.getDate(),
17
- isInMonth: (correctDate.getFullYear() === month.getFullYear()) && (correctDate.getMonth() === month.getMonth())
18
- };
19
- });
20
- const weeks = this.chunk(allDays, 7);
21
- const weeksMapped = weeks.map((w, i) => ({
22
- number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), w.find(d => d.isInMonth)?.dayOfMonth)),
23
- days: w
24
- }));
25
- return weeksMapped;
26
- }
27
- generateList(count) {
28
- return [...Array(count).keys()];
29
- }
30
- dayOfWeekMondayBased(date) {
31
- const d = date.getDay() - 1;
32
- if (d < 0) {
33
- return 6;
34
- }
35
- else {
36
- return d;
37
- }
38
- }
39
- weekOfYear(date) {
40
- const dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));
41
- dateClone.setUTCDate(dateClone.getUTCDate() + 4 - (dateClone.getUTCDay() || 7));
42
- const yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));
43
- const utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);
44
- return Math.ceil((utcDiff / (1000 * 60 * 60 * 24) + 1) / 7);
45
- }
46
- getFirstAndLastDayOfMonth(date) {
47
- const first = new Date(date.getFullYear(), date.getMonth(), 1);
48
- const last = new Date(date.getFullYear(), date.getMonth() + 1, 0);
49
- return { first, last };
50
- }
51
- dateDiff(date1, date2) {
52
- const utc1 = this.toUTC(date1);
53
- const utc2 = this.toUTC(date2);
54
- const msPerDay = 1000 * 60 * 60 * 24;
55
- return Math.floor((utc2 - utc1) / msPerDay);
56
- }
57
- dayOfYear(date) {
58
- const start = new Date(date.getFullYear(), 0, 0);
59
- return this.dateDiff(start, date);
60
- }
61
- toUTC(date) {
62
- return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());
63
- }
64
- chunk(items, size) {
65
- const result = [];
66
- for (let i = 0; i < items.length; i += size) {
67
- result.push(items.slice(i, i + size));
68
- }
69
- return result;
70
- }
71
- getMondayBefore(date) {
72
- const day = date.getDay(), diff = date.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday
73
- const monday = new Date(date);
74
- monday.setDate(diff);
75
- return monday;
76
- }
77
- getSundayAfter(date) {
78
- const day = date.getDay();
79
- const sunday = new Date(date);
80
- if (day !== 0) {
81
- const diff = date.getDate() + 7 - day;
82
- sunday.setDate(diff);
83
- }
84
- return sunday;
85
- }
86
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCalendarMonthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
87
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCalendarMonthService, providedIn: 'root' }); }
88
- }
89
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsCalendarMonthService, decorators: [{
90
- type: Injectable,
91
- args: [{
92
- providedIn: 'root'
93
- }]
94
- }] });
95
-
96
- class BsMonthNamePipe {
97
- transform(date) {
98
- if (date) {
99
- return date.toLocaleString("default", { month: 'long' });
100
- }
101
- else {
102
- return '';
103
- }
104
- }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMonthNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
106
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: BsMonthNamePipe, isStandalone: true, name: "monthName" }); }
107
- }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsMonthNamePipe, decorators: [{
109
- type: Pipe,
110
- args: [{
111
- name: 'monthName',
112
- pure: true,
113
- }]
114
- }] });
115
-
116
- class BsWeekdayNamePipe {
117
- transform(date) {
118
- return date.toLocaleString("default", { weekday: 'short' });
119
- }
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsWeekdayNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
121
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: BsWeekdayNamePipe, isStandalone: true, name: "weekdayName" }); }
122
- }
123
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsWeekdayNamePipe, decorators: [{
124
- type: Pipe,
125
- args: [{
126
- name: 'weekdayName',
127
- pure: true,
128
- }]
129
- }] });
130
-
131
- /**
132
- * Generated bundle index. Do not edit.
133
- */
134
-
135
- export { BsCalendarMonthService, BsMonthNamePipe, BsWeekdayNamePipe };
136
- //# sourceMappingURL=mintplayer-ng-bootstrap-calendar-month.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-calendar-month.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/calendar-month/src/service/calendar-month.service.ts","../../../../libs/mintplayer-ng-bootstrap/calendar-month/src/pipes/month-name/month-name.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/calendar-month/src/pipes/weekday-name/weekday-name.pipe.ts","../../../../libs/mintplayer-ng-bootstrap/calendar-month/mintplayer-ng-bootstrap-calendar-month.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { Week } from '../interfaces/week';\nimport { FirstAndLastDate } from '../interfaces/first-and-last-date';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class BsCalendarMonthService {\n\n public getWeeks(month: Date) {\n const firstAndLast = this.getFirstAndLastDayOfMonth(month);\n const firstOfMonth = this.getMondayBefore(firstAndLast.first);\n const lastOfMonth = this.getSundayAfter(firstAndLast.last);\n const days = this.dateDiff(firstOfMonth, lastOfMonth) + 1;\n const firstDayOffset = (firstAndLast.first.getDay() + 7 - 1) % 7;\n const allDays = this.generateList(days).map(d => d - firstDayOffset).map(d => {\n const wrongDate = new Date(firstAndLast.first.getFullYear(), firstAndLast.first.getMonth(), firstAndLast.first.getDate() + d);\n const correctDate = new Date(wrongDate.getFullYear(), wrongDate.getMonth(), wrongDate.getDate());\n return {\n date: correctDate,\n dayOfMonth: correctDate.getDate(),\n isInMonth: (correctDate.getFullYear() === month.getFullYear()) && (correctDate.getMonth() === month.getMonth())\n };\n });\n const weeks = this.chunk(allDays, 7);\n const weeksMapped = weeks.map<Week>((w, i) => ({\n number: this.weekOfYear(new Date(month.getFullYear(), month.getMonth(), w.find(d => d.isInMonth)?.dayOfMonth)),\n days: w\n }));\n return weeksMapped;\n }\n \n generateList(count: number) {\n return [...Array(count).keys()];\n }\n\n dayOfWeekMondayBased(date: Date) {\n const d = date.getDay() - 1;\n if (d < 0) {\n return 6;\n } else {\n return d;\n }\n }\n\n weekOfYear(date: Date) {\n const dateClone = new Date(Date.UTC(date.getFullYear(), date.getMonth(), date.getDate()));\n dateClone.setUTCDate(dateClone.getUTCDate() + 4 - (dateClone.getUTCDay() || 7));\n const yearStart = new Date(Date.UTC(dateClone.getUTCFullYear(), 0, 1));\n const utcDiff = this.toUTC(dateClone) - this.toUTC(yearStart);\n return Math.ceil((utcDiff / (1000 * 60 * 60 * 24) + 1) / 7);\n }\n\n getFirstAndLastDayOfMonth(date: Date) {\n const first = new Date(date.getFullYear(), date.getMonth(), 1);\n const last = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n return <FirstAndLastDate>{ first, last };\n }\n\n dateDiff(date1: Date, date2: Date) {\n const utc1 = this.toUTC(date1);\n const utc2 = this.toUTC(date2);\n const msPerDay = 1000 * 60 * 60 * 24;\n return Math.floor((utc2 - utc1) / msPerDay);\n }\n\n dayOfYear(date: Date) {\n const start = new Date(date.getFullYear(), 0, 0);\n return this.dateDiff(start, date);\n }\n\n toUTC(date: Date) {\n return Date.UTC(date.getFullYear(), date.getMonth(), date.getDate());\n }\n\n chunk<T>(items: T[], size: number) {\n const result: T[][] = [];\n for (let i = 0; i < items.length; i += size) {\n result.push(items.slice(i, i + size));\n }\n return result;\n }\n\n getMondayBefore(date: Date) {\n const day = date.getDay(), diff = date.getDate() - day + (day == 0 ? -6 : 1); // adjust when day is sunday\n const monday = new Date(date);\n monday.setDate(diff);\n return monday;\n }\n\n getSundayAfter(date: Date) {\n const day = date.getDay();\n const sunday = new Date(date);\n if (day !== 0) {\n const diff = date.getDate() + 7 - day;\n sunday.setDate(diff);\n }\n return sunday;\n }\n}","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'monthName',\n pure: true,\n})\nexport class BsMonthNamePipe implements PipeTransform {\n\n transform(date: Date | null) {\n if (date) {\n return date.toLocaleString(\"default\", { month: 'long' });\n } else {\n return '';\n }\n }\n\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'weekdayName',\n pure: true,\n})\nexport class BsWeekdayNamePipe implements PipeTransform {\n\n transform(date: Date): unknown {\n return date.toLocaleString(\"default\", { weekday: 'short' });\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAOa,sBAAsB,CAAA;AAE1B,IAAA,QAAQ,CAAC,KAAW,EAAA;QACzB,MAAM,YAAY,GAAG,IAAI,CAAC,yBAAyB,CAAC,KAAK,CAAC;QAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC;QAC7D,MAAM,WAAW,GAAG,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,CAAC;AAC1D,QAAA,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC;AACzD,QAAA,MAAM,cAAc,GAAG,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;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8GARW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAf,eAAe,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,CAAA;;2FAAf,eAAe,EAAA,UAAA,EAAA,CAAA;kBAJ3B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,WAAW;AACjB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;MCCY,iBAAiB,CAAA;AAE5B,IAAA,SAAS,CAAC,IAAU,EAAA;AAClB,QAAA,OAAO,IAAI,CAAC,cAAc,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAC7D;8GAJW,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;4GAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,aAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACJ,oBAAA,IAAI,EAAE,aAAa;AACnB,oBAAA,IAAI,EAAE,IAAI;AACX,iBAAA;;;ACLD;;AAEG;;;;"}
@@ -1,30 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive } from '@angular/core';
3
- import { useBootstrap } from '@mintplayer/ng-bootstrap/machine';
4
- import { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';
5
-
6
- class BsDropdownDividerDirective {
7
- constructor() {
8
- // #452: the dropdown partial ships with this component, scoped to the elements it stamps (data-mps="dropdown").
9
- useBootstrap(bootstrapDropdown);
10
- }
11
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDropdownDividerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsDropdownDividerDirective, isStandalone: true, selector: "[bsDropdownDivider]", host: { properties: { "attr.data-mps": "\"dropdown\"", "class.dropdown-divider": "true" } }, ngImport: i0 }); }
13
- }
14
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDropdownDividerDirective, decorators: [{
15
- type: Directive,
16
- args: [{
17
- selector: '[bsDropdownDivider]',
18
- host: {
19
- '[attr.data-mps]': '"dropdown"',
20
- '[class.dropdown-divider]': 'true',
21
- },
22
- }]
23
- }], ctorParameters: () => [] });
24
-
25
- /**
26
- * Generated bundle index. Do not edit.
27
- */
28
-
29
- export { BsDropdownDividerDirective };
30
- //# sourceMappingURL=mintplayer-ng-bootstrap-dropdown-divider.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-dropdown-divider.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown-divider/src/dropdown-divider.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-divider/mintplayer-ng-bootstrap-dropdown-divider.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { useBootstrap } from '@mintplayer/ng-bootstrap/machine';\nimport { bootstrapDropdown } from '@mintplayer/ui-core/bootstrap/dropdown';\n\n@Directive({\n selector: '[bsDropdownDivider]',\n host: {\n '[attr.data-mps]': '\"dropdown\"',\n '[class.dropdown-divider]': 'true',\n },\n})\nexport class BsDropdownDividerDirective {\n constructor() {\n // #452: the dropdown partial ships with this component, scoped to the elements it stamps (data-mps=\"dropdown\").\n useBootstrap(bootstrapDropdown);\n }\n\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAWa,0BAA0B,CAAA;AACrC,IAAA,WAAA,GAAA;;QAEE,YAAY,CAAC,iBAAiB,CAAC;IACjC;8GAJW,0BAA0B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA1B,0BAA0B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,eAAA,EAAA,cAAA,EAAA,wBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA1B,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBAPtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,iBAAiB,EAAE,YAAY;AAC/B,wBAAA,0BAA0B,EAAE,MAAM;AACnC,qBAAA;AACF,iBAAA;;;ACVD;;AAEG;;;;"}