@mintplayer/ng-bootstrap 22.19.0 → 22.21.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 (133) hide show
  1. package/_bootstrap.scss +10 -0
  2. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -0
  3. package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +6 -3
  5. package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +9 -11
  7. package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +2 -4
  9. package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -1
  11. package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +36 -56
  13. package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +10 -18
  15. package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +13 -24
  17. package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +6 -15
  19. package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
  20. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -7
  21. package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +17 -6
  23. package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +47 -50
  25. package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +8 -5
  27. package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +160 -83
  29. package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -4
  31. package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -4
  33. package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -2
  35. package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +21 -7
  37. package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +19 -14
  39. package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +15 -12
  41. package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -3
  43. package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +16 -6
  45. package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
  46. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +21 -4
  47. package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
  48. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +26 -10
  49. package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
  50. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -1
  51. package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
  52. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +2 -4
  53. package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
  54. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -11
  55. package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
  56. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +73 -67
  57. package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
  58. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -16
  59. package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
  60. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +11 -22
  61. package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
  62. package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -4
  63. package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
  64. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +188 -249
  65. package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
  66. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +64 -146
  67. package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
  68. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +37 -30
  69. package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
  70. package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -25
  71. package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
  72. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -4
  73. package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
  74. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -0
  75. package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
  76. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +6 -6
  77. package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
  78. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +150 -83
  79. package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
  80. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +3 -0
  81. package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
  82. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +46 -44
  83. package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
  84. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -4
  85. package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
  86. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +63 -89
  87. package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
  88. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +6 -14
  89. package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
  90. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +25 -56
  91. package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
  92. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +1 -0
  93. package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
  94. package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +47 -58
  95. package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
  96. package/package.json +2 -2
  97. package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -1
  98. package/types/mintplayer-ng-bootstrap-button-type.d.ts +6 -6
  99. package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -1
  100. package/types/mintplayer-ng-bootstrap-carousel.d.ts +0 -1
  101. package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +1 -1
  102. package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +1 -1
  103. package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +1 -1
  104. package/types/mintplayer-ng-bootstrap-color-picker.d.ts +9 -3
  105. package/types/mintplayer-ng-bootstrap-context-menu.d.ts +8 -10
  106. package/types/mintplayer-ng-bootstrap-copy.d.ts +3 -1
  107. package/types/mintplayer-ng-bootstrap-datatable.d.ts +56 -11
  108. package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
  109. package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
  110. package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +3 -1
  111. package/types/mintplayer-ng-bootstrap-dropdown.d.ts +3 -0
  112. package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +6 -1
  113. package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -4
  114. package/types/mintplayer-ng-bootstrap-file-manager.d.ts +2 -3
  115. package/types/mintplayer-ng-bootstrap-file-upload.d.ts +7 -1
  116. package/types/mintplayer-ng-bootstrap-modal.d.ts +9 -1
  117. package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +10 -1
  118. package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
  119. package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -1
  120. package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
  121. package/types/mintplayer-ng-bootstrap-query-builder.d.ts +2 -3
  122. package/types/mintplayer-ng-bootstrap-resizable.d.ts +65 -31
  123. package/types/mintplayer-ng-bootstrap-scheduler.d.ts +27 -21
  124. package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +18 -2
  125. package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
  126. package/types/mintplayer-ng-bootstrap-tab-control.d.ts +2 -2
  127. package/types/mintplayer-ng-bootstrap-theming.d.ts +86 -54
  128. package/types/mintplayer-ng-bootstrap-timeline.d.ts +27 -5
  129. package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
  130. package/types/mintplayer-ng-bootstrap-tooltip.d.ts +18 -17
  131. package/types/mintplayer-ng-bootstrap-tree-select.d.ts +3 -4
  132. package/types/mintplayer-ng-bootstrap-treeview.d.ts +4 -4
  133. package/types/mintplayer-ng-bootstrap-user-agent.d.ts +13 -4
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-filter-panel/datatable-filter-panel.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest, SortColumn } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n\n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortColumns: SortColumn[] = [];\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n public pageNumberOfBoxes: number = 11;\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortColumns: this.sortColumns,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, input, TemplateRef, type Signal } from '@angular/core';\nimport type {\n FilterContext,\n FilterInputType,\n FilterMode,\n FilterOperator,\n FilterSelection,\n DistinctValues,\n} from '@mintplayer/web-components/datatable';\n\n/**\n * Context of a `*bsDatatableFilterPanel` template.\n *\n * `$implicit` is a **Signal**, not a plain object. The demos and the specs run\n * zoneless, where mutating a context object notifies nothing and the panel never\n * repaints; a signal the wrapper writes to is what makes the override update as\n * values load.\n */\nexport interface BsDatatableFilterPanelContext {\n $implicit: Signal<DistinctValues | null>;\n ctx: FilterContext;\n}\n\n/**\n * Declares a column in `<bs-datatable>`.\n *\n * - `bsDatatableColumn` (the directive value) is the **data property name** —\n * it must match the field key on each row in the fetched data and is what\n * `SortColumn.property` references when the column is clicked.\n * - The directive's **template content** is the header template — what gets\n * rendered inside the `<th>`.\n *\n * Example:\n * ```html\n * <div *bsDatatableColumn=\"'YearStarted'; sortable: true\">Year started</div>\n * ```\n *\n * Optional `bsDatatableColumnSortable` controls whether the header acts as a\n * sort toggle (default `true`).\n */\n@Directive({ selector: '[bsDatatableColumn]' })\nexport class BsDatatableColumnDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Data property name on each row; used as `SortColumn.property` on sort. */\n readonly name = input('', { alias: 'bsDatatableColumn' });\n\n readonly sortable = input(true, { alias: 'bsDatatableColumnSortable' });\n\n /** Opt this column into the filter row. Default `false`, unlike `sortable`. */\n readonly filterable = input(false, { alias: 'bsDatatableColumnFilterable' });\n\n /**\n * Purely visual: marks this column's trigger as \"filtered\". The component\n * attaches no meaning to it — the consumer decides when it is true, because\n * the component never filters the data itself.\n */\n readonly filterActive = input(false, { alias: 'bsDatatableColumnFilterActive' });\n\n /** Short description of the active filter, shown on the trigger and in its name. */\n readonly filterSummary = input<string | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSummary',\n });\n\n /** Initial or externally restored selection for this column's panel. */\n readonly filterSelection = input<FilterSelection | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSelection',\n });\n\n /**\n * `'values'` (default) lists the column's distinct values as checkboxes;\n * `'comparison'` offers an operator and one operand — the right shape for a\n * quantity, where ticking forty individual years is a poor way to say\n * \"after 1990\".\n */\n readonly filterMode = input<FilterMode>('values', { alias: 'bsDatatableColumnFilterMode' });\n\n /** `type` of the operand input in comparison mode. Default `'number'`. */\n readonly filterInputType = input<FilterInputType | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterInputType',\n });\n\n /** Operators offered in comparison mode, in order. Defaults to all six. */\n readonly filterOperators = input<FilterOperator[] | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterOperators',\n });\n\n /**\n * Set by a nested `*bsDatatableFilterPanel`, and a **plain field** rather than\n * a signal on purpose.\n *\n * The nested directive assigns this from its constructor, which runs while\n * the column's own header view is being created — i.e. inside a reactive\n * read. Writing a signal there is NG0600. Nothing reads this reactively: the\n * wrapper resolves it when the web component asks for the panel's contents,\n * which is at panel open, long after any computed has settled.\n */\n filterPanelTemplate?: TemplateRef<BsDatatableFilterPanelContext>;\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks an `<ng-template>` as the per-row body for `<bs-datatable>`. The\n * template's `$implicit` is the row object. The template should render one\n * `<td>` per data column (in column order).\n *\n * In tree mode (`[tree]=\"true\"`) the context also carries `depth` (0 for\n * roots, +1 per nesting level), `isExpanded`, and `isPlaceholder` (true when\n * the row is a not-yet-loaded child slot — `$implicit` is undefined).\n *\n * Example:\n * ```html\n * <ng-container *bsRowTemplate=\"let artist\">\n * <td class=\"text-nowrap\">{{ artist?.name }}</td>\n * <td class=\"text-nowrap\">{{ artist?.yearStarted }}</td>\n * </ng-container>\n *\n * <!-- tree mode: render a spinner for placeholder rows -->\n * <ng-container *bsRowTemplate=\"let item; let isPlaceholder = isPlaceholder\">\n * @if (isPlaceholder) { <td colspan=\"3\"><i>Loading…</i></td> }\n * @else { <td>{{ item.name }}</td><td>{{ item.headcount }}</td><td>{{ item.code }}</td> }\n * </ng-container>\n * ```\n */\n@Directive({ selector: '[bsRowTemplate]' })\nexport class BsRowTemplateDirective<TData = unknown> {\n readonly templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _dir: BsRowTemplateDirective<TData>,\n ctx: unknown,\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n $implicit: TData | undefined = undefined;\n index?: number;\n /** 0 for roots; +1 per nesting level. Always 0 in flat mode. */\n depth = 0;\n /** True when the row is currently expanded. Always false in flat mode. */\n isExpanded = false;\n /** True when the row is a not-yet-loaded child slot — `$implicit` is undefined. */\n isPlaceholder = false;\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n type ViewRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n type WritableSignal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { SortColumn } from '@mintplayer/pagination';\nimport {\n computeNextSort,\n type DatatableColumnDef,\n type DatatableDistincts,\n type DatatableLabels,\n type DatatableSelectionMode,\n type DistinctValues,\n type FilterChangeDetail,\n type MpDatatable,\n type RowEventDetail,\n type RowRenderer,\n type SortChangeEventDetail,\n type SelectionChangeEventDetail,\n type TreeRowExpandDetail,\n type TreeExpandedIdsChangeDetail,\n type TreeIdKey,\n type TreeSelectionStrategy,\n} from '@mintplayer/web-components/datatable';\n\n// Side-effect import: registers <mp-datatable>.\nimport '@mintplayer/web-components/datatable';\n\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableFetch } from '../datatable-fetch';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective, BsRowTemplateContext } from '../row-template/row-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\nexport interface BsDatatableRowEvent<T> {\n row: T;\n rowIndex: number;\n rowKey: string;\n originalEvent: Event;\n}\n\nexport interface BsDatatableTreeRowEvent<T> {\n row: T;\n depth: number;\n parentId: unknown | null;\n}\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./datatable.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> implements AfterViewInit {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Programmatic column list. Mutually exclusive with the `*bsDatatableColumn`\n * template directives — if provided, takes precedence.\n */\n readonly columnsInput = input<DatatableColumnDef<TData>[] | null>(null, { alias: 'columns' });\n\n /**\n * The **complete** row set. Use `[fetch]` for server-side pagination.\n *\n * \"Complete\" matters to the filter panels: their value lists are computed from\n * this array, so a consumer who pages `[data]` themselves is showing the\n * component one page and will get a value list covering one page. That case\n * needs `[distincts]`.\n */\n readonly data = input<TData[] | null>(null);\n\n /** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */\n readonly fetch = input<BsDatatableFetch<TData> | null>(null);\n\n /**\n * Source of distinct values for the filter panels.\n *\n * Required whenever the component does not hold every row — with `[fetch]`,\n * with external paging, or with a tree whose children are loaded on demand, a\n * locally computed list would silently omit values, so it is not computed at\n * all. Resolve `null` for a column to hand that one column back to the local\n * path.\n */\n readonly distincts = input<DatatableDistincts | null>(null);\n\n /** Partial override of the component's user-visible strings. */\n readonly labels = input<Partial<DatatableLabels> | null>(null);\n\n /** Two-way bound pagination / sort settings. */\n readonly settings = model<DatatableSettings>(new DatatableSettings());\n\n /** `'none'` hides selection; `'multiple'` shows checkboxes; `'single'` is a single-row selection. */\n readonly selectionMode = input<DatatableSelectionMode>('none');\n /** @deprecated Use `selectionMode`. Kept for source-level compatibility. */\n readonly selectable = input<DatatableSelectionMode | undefined>(undefined);\n\n /** Two-way bound array of selected rows (identity via `rowKey`). */\n readonly selection = model<TData[]>([]);\n\n /** Required for selection / async refetch identity. Default `String((row as any).id)`. */\n readonly rowKey = input<(row: TData, index: number) => string>((row: TData, index: number) => {\n const r = row as { id?: unknown } | null;\n return r && r.id != null ? String(r.id) : `row-${index}`;\n });\n\n /** Drag-resize column widths. Default `true`. */\n readonly resizableColumns = input<boolean>(true);\n\n /** Built-in pagination footer. Ignored when `[fetch]` is provided (server-side paging owns the page state). */\n readonly pagination = input<boolean>(true);\n\n /** Enable virtual scrolling for large datasets. */\n readonly virtualScroll = input<boolean>(false);\n /** Approximate row height in px (drives virtual scroll). */\n readonly itemSize = input<number>(40);\n /** Off-screen row buffer per side for virtual scrolling. */\n readonly virtualBuffer = input<number>(10);\n\n /** Forwarded to the inner table (legacy responsive flag, currently a CSS hook). */\n readonly isResponsive = input<boolean>(false);\n\n /** Optional row equality predicate (selection identity across re-fetches). */\n readonly compareWith = input<((a: TData, b: TData) => boolean) | undefined>(undefined);\n\n /** Emitted on row single-click. */\n readonly rowClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row double-click. */\n readonly rowDblClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row context-menu. */\n readonly rowContextMenu = output<BsDatatableRowEvent<TData>>();\n\n // ─── Tree-mode inputs / models / outputs ─────────────────────────────────\n\n /** Enable tree mode (chevron column, nested expansion, lazy children). */\n readonly tree = input<boolean>(false);\n\n /**\n * Property name (or function) that extracts the row's stable identity.\n * Required when `tree=true`. Used as the expansion key and as the\n * `parentId` value the WC sends in `mp-datatable-fetch-request`.\n */\n readonly idKey = input<TreeIdKey<TData> | null>(null);\n\n /**\n * Property name on the row holding the direct-child count. Drives chevron\n * visibility AND placeholder reservation for lazy children. Required when\n * `tree=true`.\n */\n readonly childCountKey = input<string | null>(null);\n\n /** Indent in rem per depth level on the chevron cell. Default `1.25`. */\n readonly treeIndent = input<number>(1.25);\n\n /** Two-way bound set of expanded-row ids (keyed by `idKey`). */\n readonly expandedIds = model<Set<unknown>>(new Set());\n\n /**\n * `'flat'` (default) leaves selection to per-row toggles; `'cascading'`\n * (recommended in tree mode) propagates a parent toggle to all loaded\n * descendants and surfaces an indeterminate state on partially-selected\n * parents.\n */\n readonly selectionStrategy = input<TreeSelectionStrategy>('flat');\n\n /** Emitted after a row is expanded. */\n readonly rowExpand = output<BsDatatableTreeRowEvent<TData>>();\n /** Emitted after a row is collapsed. */\n readonly rowCollapse = output<BsDatatableTreeRowEvent<TData>>();\n\n /**\n * Emitted whenever a column's filter selection changes, including when it is\n * cleared (`selected: []`).\n *\n * The component does not filter `[data]`: acting on this — and setting\n * `filterActive` / `filterSummary` back on the column — is the consumer's job,\n * because only they know whether the filter is client-side or a new query.\n */\n readonly filterChange = output<FilterChangeDetail>();\n\n readonly datatableRef = viewChild<ElementRef<MpDatatable>>('datatable');\n\n /** Column directives (header template + sortable). Wrapper-level discovery. */\n readonly columnDirectives = contentChildren(BsDatatableColumnDirective);\n\n /** Optional row template. When present, drives a per-row EmbeddedView render path. */\n readonly rowTemplate = contentChild(BsRowTemplateDirective<TData>);\n\n /**\n * Merged column defs:\n * - `[columns]` if provided\n * - else the `*bsDatatableColumn` directives mapped onto column defs whose\n * `headerRenderer` returns a DOM node produced from the directive's template.\n */\n protected readonly effectiveColumns = computed<DatatableColumnDef<TData>[]>(() => {\n const programmatic = this.columnsInput();\n if (programmatic && programmatic.length) return programmatic;\n\n // Every recompute builds fresh closures with fresh views, so the previous\n // generation is dead the moment we return. Without retiring them they\n // accumulated until the component was destroyed — harmless-looking with one\n // view per column, twice as bad now that filters add a second.\n //\n // Retired, not destroyed: see `retireTemplateViews`. Destroying here is\n // NG0600.\n this.retireTemplateViews();\n\n return this.columnDirectives().map((dir): DatatableColumnDef<TData> => {\n let headerView: EmbeddedViewRef<unknown> | undefined;\n let filterView: EmbeddedViewRef<BsDatatableFilterPanelContext> | undefined;\n let filterValues: WritableSignal<DistinctValues | null> | undefined;\n return {\n name: dir.name(),\n sortable: dir.sortable(),\n filterable: dir.filterable(),\n filterActive: dir.filterActive(),\n filterSummary: dir.filterSummary(),\n filterSelection: dir.filterSelection(),\n filterMode: dir.filterMode(),\n filterInputType: dir.filterInputType(),\n filterOperators: dir.filterOperators(),\n headerRenderer: () => {\n if (!headerView) {\n headerView = this.vcr.createEmbeddedView(dir.templateRef);\n this.headerViews.push(headerView);\n }\n headerView.detectChanges();\n const nodes = headerView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 0) return '';\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n // Installed UNCONDITIONALLY, and the nested template is resolved inside\n // it rather than out here.\n //\n // `dir.filterPanelTemplate` is assigned by the nested directive's\n // constructor, which does not run until the column's header view is\n // created — too late for this computed's first evaluation. Reading it\n // here would see `undefined` for every column and no override would ever\n // appear. Creating the header view eagerly to force it is worse: the\n // insertion dirties Angular's query signals inside a reactive read, and\n // that throws NG0600 as soon as the host declares any `viewChild`.\n //\n // Returning `null` means \"use the built-in panel\", so a column with no\n // override costs nothing.\n filterRenderer: (_col, ctx) => {\n const tpl = dir.filterPanelTemplate;\n if (!tpl) return null;\n if (!filterView || !filterValues) {\n // The context is a signal because the demos and specs are zoneless:\n // mutating a context object notifies nothing, so the override would\n // never repaint as values load.\n filterValues = signal(ctx.values());\n filterView = this.vcr.createEmbeddedView(tpl, { $implicit: filterValues, ctx });\n this.filterViews.push(filterView);\n const values = filterValues;\n this.filterUnsubscribes.push(ctx.onChange(() => values.set(ctx.values())));\n }\n filterView.detectChanges();\n const nodes = filterView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n };\n });\n });\n\n /** EmbeddedViews for header templates (one per column directive). */\n private headerViews: EmbeddedViewRef<unknown>[] = [];\n /** EmbeddedViews for filter panel templates (one per overriding column). */\n private filterViews: EmbeddedViewRef<BsDatatableFilterPanelContext>[] = [];\n /** `FilterContext.onChange` unsubscribes, one per live filter view. */\n private filterUnsubscribes: (() => void)[] = [];\n\n /** The previous generation, awaiting disposal by the columns effect. */\n private staleViews: ViewRef[] = [];\n\n /**\n * Hands the previous generation over for disposal — it does **not** destroy\n * anything, and must not.\n *\n * This runs inside `effectiveColumns`, and destroying a view detaches it,\n * which dirties Angular's query signals: a signal write inside a computed,\n * i.e. NG0600, the moment the host declares any view query. It is the exact\n * mirror of why views are not CREATED here either — attach and detach are\n * both signal writes, so neither belongs in a computed.\n *\n * Handing over is a plain field write, and the effect that forwards the\n * columns disposes the batch on the same tick, so the leak this replaced\n * stays fixed: at most one dead generation exists, and only momentarily.\n */\n private retireTemplateViews(): void {\n this.staleViews.push(...this.headerViews, ...this.filterViews);\n this.headerViews = [];\n this.filterViews = [];\n this.releaseFilterSubscriptions();\n }\n\n /** Destroys the retired generation. Only ever called from an effect. */\n private disposeStaleViews(): void {\n for (const v of this.staleViews) v.destroy();\n this.staleViews = [];\n }\n\n /**\n * Without this the web component keeps calling into a destroyed view's signal\n * on every value change, for the life of the element.\n */\n private releaseFilterSubscriptions(): void {\n for (const unsubscribe of this.filterUnsubscribes) unsubscribe();\n this.filterUnsubscribes = [];\n }\n /** EmbeddedViews for row templates, keyed by rowKey for reuse. */\n private rowViews = new Map<string, EmbeddedViewRef<BsRowTemplateContext<TData>>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n // Deliberately does NOT destroy the views. Every one of them is attached\n // to this component's ViewContainerRef, so Angular tears them down with\n // the host view; destroying them again from a cleanup hook re-enters that\n // teardown and desynchronises the container's view bookkeeping — a hard\n // \"attached view should be in the same position within its container\"\n // assertion in dev mode. It only surfaces once a header template contains\n // a nested structural directive, which `*bsDatatableFilterPanel` is, so\n // the previous code looked correct right up until it was not.\n //\n // The subscriptions are the only thing here Angular knows nothing about.\n this.releaseFilterSubscriptions();\n this.headerViews = [];\n this.filterViews = [];\n this.staleViews = [];\n this.rowViews.clear();\n });\n\n // Forward the `[fetch]` callback to the WC, which owns the entire\n // server-paged loop (initial page, on-demand windows, tree children,\n // pagination, sort/perPage reloads) and derives `totalRecords` from the\n // response. The wrapper no longer runs any fetch loop. Skipped on the\n // server so SSR doesn't kick off a client fetch.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (isPlatformServer(this.platformId)) return;\n el.fetch = (this.fetch() as unknown as MpDatatable['fetch']) ?? null;\n });\n\n // Same server guard as `fetch`: the source is a network call in every real\n // consumer, and a panel cannot be opened during SSR anyway.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (isPlatformServer(this.platformId)) return;\n el.distincts = this.distincts();\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.labels = this.labels() ?? undefined;\n });\n\n // Forward columns to the WC, and dispose the generation the recompute\n // retired. An effect may write signals; a computed may not, which is the\n // whole reason the disposal happens out here.\n effect(() => {\n const columns = this.effectiveColumns();\n this.disposeStaleViews();\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.columns = columns as DatatableColumnDef[];\n });\n\n // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the\n // wrapper must not also push `el.data` (it would clobber fetched pages).\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n if (this.fetch()) return;\n const d = this.data();\n el.data = (d ?? []) as unknown[];\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const settings = this.settings();\n const fetching = !!this.fetch();\n const virtual = this.virtualScroll();\n el.sortColumns = settings.sortColumns.map((c) => ({ property: c.property, direction: c.direction }));\n el.autoSort = !fetching;\n // Pagination renders in non-virtual mode; in fetch mode the wrapper\n // owns page state and the WC just reports the change via event.\n el.pagination = this.pagination() && !virtual;\n el.page = settings.page.selected;\n el.perPage = settings.perPage.selected;\n el.perPageOptions = settings.perPage.values;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const mode = this.selectable() ?? this.selectionMode();\n el.selectionMode = mode;\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.rowKey = (row, index) => this.rowKey()(row as TData, index);\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.resizableColumns = this.resizableColumns();\n });\n\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.virtualScroll = this.virtualScroll();\n el.itemSize = this.itemSize();\n el.virtualBuffer = this.virtualBuffer();\n });\n\n // Tree-mode prop sync to the WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n el.tree = this.tree();\n el.idKey = this.idKey() as TreeIdKey;\n el.childCountKey = this.childCountKey();\n el.treeIndent = this.treeIndent();\n el.selectionStrategy = this.selectionStrategy();\n });\n\n // Two-way bind `expandedIds` to the WC. Skip-on-echo via structural equality\n // — the WC's getter returns a fresh Set on every read.\n effect(() => {\n const desired = this.expandedIds();\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const current = el.expandedIds;\n if (setsEqual(current, desired)) return;\n el.expandedIds = desired;\n });\n\n // Wire the row renderer when *bsRowTemplate is provided.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const tpl = this.rowTemplate();\n if (!tpl) {\n el.rowRenderer = undefined;\n // Destroy any stale row views.\n for (const v of this.rowViews.values()) v.destroy();\n this.rowViews.clear();\n return;\n }\n el.rowRenderer = this.buildRowRenderer(tpl) as RowRenderer;\n });\n\n // Selection rows → IDs forwarded to WC.\n effect(() => {\n const el = this.datatableRef()?.nativeElement;\n if (!el) return;\n const rows = this.selection();\n const keyFn = this.rowKey();\n el.selectedIds = rows.map((row, i) => keyFn(row, i));\n });\n }\n\n ngAfterViewInit(): void {\n // Effects above re-run as the view is created; nothing else needed.\n }\n\n private buildRowRenderer(tpl: BsRowTemplateDirective<TData>): RowRenderer<TData> {\n return (row, rowIndex, ctx) => {\n // Placeholder rows (tree-mode, children pending fetch) get a synthetic key\n // so the view is reused per slot. Consumers detect them via `isPlaceholder`.\n const isPlaceholder = ctx?.isPlaceholder ?? row === undefined;\n const depth = ctx?.depth ?? 0;\n const isExpanded = ctx?.isExpanded ?? false;\n const key = isPlaceholder\n ? `__placeholder-${rowIndex}`\n : this.rowKey()(row as TData, rowIndex);\n let viewRef = this.rowViews.get(key);\n if (!viewRef) {\n const context = new BsRowTemplateContext<TData>();\n context.$implicit = row as TData | undefined;\n context.index = rowIndex;\n context.depth = depth;\n context.isExpanded = isExpanded;\n context.isPlaceholder = isPlaceholder;\n viewRef = this.vcr.createEmbeddedView(tpl.templateRef, context);\n this.rowViews.set(key, viewRef);\n } else {\n viewRef.context.$implicit = row as TData | undefined;\n viewRef.context.index = rowIndex;\n viewRef.context.depth = depth;\n viewRef.context.isExpanded = isExpanded;\n viewRef.context.isPlaceholder = isPlaceholder;\n }\n viewRef.detectChanges();\n const nodes = viewRef.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n return nodes;\n };\n }\n\n // ─── WC event handlers ───────────────────────────────────────────────────\n\n onSortChange(event: Event): void {\n const detail = (event as CustomEvent<SortChangeEventDetail>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n sortColumns: detail.sortColumns as SortColumn[],\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<SelectionChangeEventDetail<TData>>).detail;\n // The WC owns the data and resolves ids → row objects itself (across page 1,\n // fetched windows, and tree children), so we take the rows straight from the\n // event — no wrapper-side row bookkeeping.\n this.selection.set([...detail.selectedRows]);\n }\n\n onPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ page: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n page: { ...settings.page, selected: detail.page },\n }),\n );\n }\n\n onPerPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ perPage: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n perPage: { ...settings.perPage, selected: detail.perPage },\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onRowClick(event: Event): void {\n this.rowClick.emit(this.toBsEvent(event));\n }\n onRowDblClick(event: Event): void {\n this.rowDblClick.emit(this.toBsEvent(event));\n }\n onRowContextMenu(event: Event): void {\n this.rowContextMenu.emit(this.toBsEvent(event));\n }\n\n // ─── Tree-mode event handlers ────────────────────────────────────────────\n\n onRowExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowExpand.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onRowCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowCollapse.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onExpandedIdsChange(event: Event): void {\n const detail = (event as CustomEvent<TreeExpandedIdsChangeDetail>).detail;\n const next = new Set(detail.expandedIds);\n if (setsEqual(this.expandedIds(), next)) return;\n this.expandedIds.set(next);\n }\n\n onFilterChange(event: Event): void {\n this.filterChange.emit((event as CustomEvent<FilterChangeDetail>).detail);\n }\n\n private toBsEvent(event: Event): BsDatatableRowEvent<TData> {\n const detail = (event as CustomEvent<RowEventDetail<TData>>).detail;\n return {\n row: detail.row,\n rowIndex: detail.rowIndex,\n rowKey: detail.rowKey,\n originalEvent: detail.originalEvent,\n };\n }\n}\n\nfunction setsEqual<T>(\n a: Set<T> | ReadonlyArray<T> | null | undefined,\n b: Set<T> | ReadonlyArray<T> | null | undefined,\n): boolean {\n // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns\n // `undefined` instead of the getter's `new Set()`. Treat both-missing as\n // equal so the sync effect short-circuits cleanly during pre-hydration.\n if (a == null && b == null) return true;\n if (a == null || b == null) return false;\n const aSize = a instanceof Set ? a.size : a.length;\n const bSize = b instanceof Set ? b.size : b.length;\n if (aSize !== bSize) return false;\n const bSet = b instanceof Set ? b : new Set(b);\n for (const v of a) if (!bSet.has(v)) return false;\n return true;\n}\n\nexport { computeNextSort };\n","<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n (mp-datatable-filter-change)=\"onFilterChange($event)\"\n></mp-datatable>\n","import { DestroyRef, Directive, inject, TemplateRef } from '@angular/core';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\n\n/**\n * Overrides the filter panel of the column it is nested in.\n *\n * ```html\n * <div *bsDatatableColumn=\"'country'; filterable: true\">\n * Country\n * <ng-container *bsDatatableFilterPanel=\"let values\">\n * <my-panel [values]=\"values()\"></my-panel>\n * </ng-container>\n * </div>\n * ```\n *\n * Nested inside the column rather than a sibling keyed by name: the column is\n * the thing being configured, and a name-keyed sibling has no way to fail loudly\n * when the two names drift apart. It is also the pattern every other per-item\n * override in this workspace uses.\n *\n * Omitting it is not a lesser option — the web component renders a built-in\n * panel (search, include/exclude, checkbox list, clear) which React and Vue get\n * for free. This directive is for the cases that need something else.\n *\n * ### Inputs on the column, not here\n *\n * `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs\n * on `*bsDatatableColumn`. They cannot live here: this directive's own inputs\n * are not yet set when its constructor runs, and the constructor is the only\n * point at which it can register itself with the column early enough.\n */\n@Directive({ selector: '[bsDatatableFilterPanel]' })\nexport class BsDatatableFilterPanelDirective {\n private readonly column = inject(BsDatatableColumnDirective);\n private readonly templateRef =\n inject<TemplateRef<BsDatatableFilterPanelContext>>(TemplateRef);\n\n constructor() {\n // A plain field assignment, deliberately. See the field's own comment on\n // `BsDatatableColumnDirective`: a signal write here is NG0600.\n this.column.filterPanelTemplate = this.templateRef;\n\n inject(DestroyRef).onDestroy(() => {\n // Guarded: under `@if`, the incoming directive's constructor can run\n // before the outgoing one's destroy hook, and an unguarded clear would\n // erase the template that just replaced this one.\n if (this.column.filterPanelTemplate === this.templateRef) {\n this.column.filterPanelTemplate = undefined;\n }\n });\n }\n\n /**\n * Lets `let values = $implicit` and `let ctx = ctx` type-check against the\n * real context. Without it both are `any`, so `values().anything.deeper`\n * compiles and fails at runtime.\n */\n static ngTemplateContextGuard(\n _dir: BsDatatableFilterPanelDirective,\n _ctx: unknown,\n ): _ctx is BsDatatableFilterPanelContext {\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAY,IAAiC,EAAA;QAwBtC,IAAA,CAAA,WAAW,GAAiB,EAAE;QAG9B,IAAA,CAAA,iBAAiB,GAAW,EAAE;AA1BjC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;AAEzB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;QAC/B;aAAO;;YAEH,IAAI,CAAC,OAAO,GAAG;AACX,gBAAA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACpB,gBAAA,QAAQ,EAAE;aACb;QACL;AAEA,QAAA,IAAI,IAAI,I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AC,MAAM,CAAC,mBAAmB,GAAG,SAAS;YAC7C;AACF,QAAA,CAAC,CAAC;IACJ;AAEA;;;;AAIG;AACH,IAAA,OAAO,sBAAsB,CAC3B,IAAqC,EACrC,IAAa,EAAA;AAEb,QAAA,OAAO,IAAI;IACb;8GA9BW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA/B,+BAA+B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,SAAS;mBAAC,EAAE,QAAQ,EAAE,0BAA0B,EAAE;;;AClCnD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-datatable.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-settings.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-column/datatable-column.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/row-template/row-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable/datatable.component.html","../../../../libs/mintplayer-ng-bootstrap/datatable/src/datatable-filter-panel/datatable-filter-panel.directive.ts","../../../../libs/mintplayer-ng-bootstrap/datatable/mintplayer-ng-bootstrap-datatable.ts"],"sourcesContent":["import { PaginationRequest, SortColumn } from \"@mintplayer/pagination\";\n\nexport class DatatableSettings {\n constructor(data?: Partial<DatatableSettings>) {\n Object.assign(this, data);\n\n if (data && data.perPage) {\n this.perPage = data.perPage;\n } else {\n // Set default value\n this.perPage = {\n values: [10, 20, 50],\n selected: 20\n };\n }\n\n if (data && data.page) {\n this.page = data.page;\n } else {\n // Set default value\n this.page = {\n values: [1],\n selected: 1\n };\n }\n }\n\n public sortColumns: SortColumn[] = [];\n public perPage: { values: number[], selected: number };\n public page: { values: number[], selected: number };\n public pageNumberOfBoxes: number = 11;\n\n public toPagination() {\n const res = <PaginationRequest>{\n sortColumns: this.sortColumns,\n perPage: this.perPage.selected,\n page: this.page.selected\n };\n return res;\n }\n}","import { Directive, inject, input, TemplateRef, type Signal } from '@angular/core';\nimport type {\n FilterContext,\n FilterInputType,\n FilterMode,\n FilterOperator,\n FilterSelection,\n DistinctValues,\n} from '@mintplayer/web-components/datatable';\n\n/**\n * Context of a `*bsDatatableFilterPanel` template.\n *\n * `$implicit` is a **Signal**, not a plain object. The demos and the specs run\n * zoneless, where mutating a context object notifies nothing and the panel never\n * repaints; a signal the wrapper writes to is what makes the override update as\n * values load.\n */\nexport interface BsDatatableFilterPanelContext {\n $implicit: Signal<DistinctValues | null>;\n ctx: FilterContext;\n}\n\n/**\n * Declares a column in `<bs-datatable>`.\n *\n * - `bsDatatableColumn` (the directive value) is the **data property name** —\n * it must match the field key on each row in the fetched data and is what\n * `SortColumn.property` references when the column is clicked.\n * - The directive's **template content** is the header template — what gets\n * rendered inside the `<th>`.\n *\n * Example:\n * ```html\n * <div *bsDatatableColumn=\"'YearStarted'; sortable: true\">Year started</div>\n * ```\n *\n * Optional `bsDatatableColumnSortable` controls whether the header acts as a\n * sort toggle (default `true`).\n */\n@Directive({ selector: '[bsDatatableColumn]' })\nexport class BsDatatableColumnDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n\n /** Data property name on each row; used as `SortColumn.property` on sort. */\n readonly name = input('', { alias: 'bsDatatableColumn' });\n\n readonly sortable = input(true, { alias: 'bsDatatableColumnSortable' });\n\n /** Opt this column into the filter row. Default `false`, unlike `sortable`. */\n readonly filterable = input(false, { alias: 'bsDatatableColumnFilterable' });\n\n /**\n * Purely visual: marks this column's trigger as \"filtered\". The component\n * attaches no meaning to it — the consumer decides when it is true, because\n * the component never filters the data itself.\n */\n readonly filterActive = input(false, { alias: 'bsDatatableColumnFilterActive' });\n\n /** Short description of the active filter, shown on the trigger and in its name. */\n readonly filterSummary = input<string | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSummary',\n });\n\n /** Initial or externally restored selection for this column's panel. */\n readonly filterSelection = input<FilterSelection | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterSelection',\n });\n\n /**\n * `'values'` (default) lists the column's distinct values as checkboxes;\n * `'comparison'` offers an operator and one operand — the right shape for a\n * quantity, where ticking forty individual years is a poor way to say\n * \"after 1990\".\n */\n readonly filterMode = input<FilterMode>('values', { alias: 'bsDatatableColumnFilterMode' });\n\n /** `type` of the operand input in comparison mode. Default `'number'`. */\n readonly filterInputType = input<FilterInputType | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterInputType',\n });\n\n /** Operators offered in comparison mode, in order. Defaults to all six. */\n readonly filterOperators = input<FilterOperator[] | undefined>(undefined, {\n alias: 'bsDatatableColumnFilterOperators',\n });\n\n /**\n * Set by a nested `*bsDatatableFilterPanel`, and a **plain field** rather than\n * a signal on purpose.\n *\n * The nested directive assigns this from its constructor, which runs while\n * the column's own header view is being created — i.e. inside a reactive\n * read. Writing a signal there is NG0600. Nothing reads this reactively: the\n * wrapper resolves it when the web component asks for the panel's contents,\n * which is at panel open, long after any computed has settled.\n */\n filterPanelTemplate?: TemplateRef<BsDatatableFilterPanelContext>;\n}\n","import { Directive, inject, TemplateRef } from '@angular/core';\n\n/**\n * Marks an `<ng-template>` as the per-row body for `<bs-datatable>`. The\n * template's `$implicit` is the row object. The template should render one\n * `<td>` per data column (in column order).\n *\n * In tree mode (`[tree]=\"true\"`) the context also carries `depth` (0 for\n * roots, +1 per nesting level), `isExpanded`, and `isPlaceholder` (true when\n * the row is a not-yet-loaded child slot — `$implicit` is undefined).\n *\n * Example:\n * ```html\n * <ng-container *bsRowTemplate=\"let artist\">\n * <td class=\"text-nowrap\">{{ artist?.name }}</td>\n * <td class=\"text-nowrap\">{{ artist?.yearStarted }}</td>\n * </ng-container>\n *\n * <!-- tree mode: render a spinner for placeholder rows -->\n * <ng-container *bsRowTemplate=\"let item; let isPlaceholder = isPlaceholder\">\n * @if (isPlaceholder) { <td colspan=\"3\"><i>Loading…</i></td> }\n * @else { <td>{{ item.name }}</td><td>{{ item.headcount }}</td><td>{{ item.code }}</td> }\n * </ng-container>\n * ```\n */\n@Directive({ selector: '[bsRowTemplate]' })\nexport class BsRowTemplateDirective<TData = unknown> {\n readonly templateRef = inject<TemplateRef<BsRowTemplateContext<TData>>>(TemplateRef);\n\n static ngTemplateContextGuard<TData>(\n _dir: BsRowTemplateDirective<TData>,\n ctx: unknown,\n ): ctx is BsRowTemplateContext<Exclude<TData, false | 0 | '' | null | undefined>> {\n return true;\n }\n}\n\nexport class BsRowTemplateContext<TData = unknown> {\n $implicit: TData | undefined = undefined;\n index?: number;\n /** 0 for roots; +1 per nesting level. Always 0 in flat mode. */\n depth = 0;\n /** True when the row is currently expanded. Always false in flat mode. */\n isExpanded = false;\n /** True when the row is a not-yet-loaded child slot — `$implicit` is undefined. */\n isPlaceholder = false;\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n type ViewRef,\n inject,\n input,\n model,\n output,\n PLATFORM_ID,\n signal,\n type WritableSignal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { isPlatformServer } from '@angular/common';\nimport { SortColumn } from '@mintplayer/pagination';\nimport {\n computeNextSort,\n type DatatableColumnDef,\n type DatatableDistincts,\n type DatatableLabels,\n type DatatableReloadOptions,\n type DatatableSelectionMode,\n type DistinctValues,\n type FilterChangeDetail,\n type MpDatatable,\n type RowEventDetail,\n type RowRenderer,\n type SortChangeEventDetail,\n type SelectionChangeEventDetail,\n type TreeRowExpandDetail,\n type TreeExpandedIdsChangeDetail,\n type TreeIdKey,\n type TreeSelectionStrategy,\n} from '@mintplayer/web-components/datatable';\n\n// Side-effect import: registers <mp-datatable>.\nimport '@mintplayer/web-components/datatable';\n\nimport { DatatableSettings } from '../datatable-settings';\nimport { BsDatatableFetch } from '../datatable-fetch';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\nimport { BsRowTemplateDirective, BsRowTemplateContext } from '../row-template/row-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\nexport interface BsDatatableRowEvent<T> {\n row: T;\n rowIndex: number;\n rowKey: string;\n originalEvent: Event;\n}\n\nexport interface BsDatatableTreeRowEvent<T> {\n row: T;\n depth: number;\n parentId: unknown | null;\n}\n\n@Component({\n selector: 'bs-datatable',\n templateUrl: './datatable.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./datatable.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsDatatableComponent<TData> {\n private readonly platformId = inject(PLATFORM_ID);\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n\n /**\n * Programmatic column list. Mutually exclusive with the `*bsDatatableColumn`\n * template directives — if provided, takes precedence.\n */\n readonly columnsInput = input<DatatableColumnDef<TData>[] | null>(null, { alias: 'columns' });\n\n /**\n * The **complete** row set. Use `[fetch]` for server-side pagination.\n *\n * \"Complete\" matters to the filter panels: their value lists are computed from\n * this array, so a consumer who pages `[data]` themselves is showing the\n * component one page and will get a value list covering one page. That case\n * needs `[distincts]`.\n */\n readonly data = input<TData[] | null>(null);\n\n /** Async data loader (server-side pagination). Mutually exclusive with `[data]`. */\n readonly fetch = input<BsDatatableFetch<TData> | null>(null);\n\n /**\n * Source of distinct values for the filter panels.\n *\n * Required whenever the component does not hold every row — with `[fetch]`,\n * with external paging, or with a tree whose children are loaded on demand, a\n * locally computed list would silently omit values, so it is not computed at\n * all. Resolve `null` for a column to hand that one column back to the local\n * path.\n */\n readonly distincts = input<DatatableDistincts | null>(null);\n\n /** Partial override of the component's user-visible strings. */\n readonly labels = input<Partial<DatatableLabels> | null>(null);\n\n /** Two-way bound pagination / sort settings. */\n readonly settings = model<DatatableSettings>(new DatatableSettings());\n\n /**\n * - `'none'` (default): no selection, no checkbox column.\n * - `'single'`: a row click selects that one row.\n * - `'multiple'`: a row click selects (Ctrl/Shift extend it), plus a checkbox column.\n * - `'checkbox'`: multi-select through the checkbox column only; a row click\n * just opens the row (`rowClick`), it never changes the selection.\n */\n readonly selectionMode = input<DatatableSelectionMode>('none');\n /** @deprecated Use `selectionMode`. Kept for source-level compatibility. */\n readonly selectable = input<DatatableSelectionMode | undefined>(undefined);\n\n /**\n * Two-way bound array of selected rows. Identity is `rowKey`: two row\n * objects with the same key are the same selection entry.\n *\n * The selection survives paging, sorting and re-fetching: a selected row\n * that leaves the loaded data stays in the model (the element remembers it).\n * Rows written here are handed to the element, so a host may select rows\n * that are not loaded at all. After a selection change the model holds the\n * freshest row object the element knows for each key.\n */\n readonly selection = model<TData[]>([]);\n\n /**\n * The row's identity, used for selection and for keeping views across\n * re-renders. Default: `String(row.id)`.\n *\n * **With `[fetch]` (or any selection that must survive paging) the key must\n * be stable** — derived from the row itself, never from its position. The\n * fallback for a row without an `id`, `row-${index}`, is positional and\n * therefore unstable: the same row gets another key on another page or sort.\n * Worse, a selected row that is not loaded has no index and is keyed\n * `rowKey(row, -1)`, so every id-less off-page row collapses onto the one\n * key `row--1` — in this wrapper's model and in the element alike — and the\n * selection can no longer tell them apart. Supply a stable `rowKey`.\n */\n readonly rowKey = input<(row: TData, index: number) => string>((row: TData, index: number) => {\n const r = row as { id?: unknown } | null;\n return r && r.id != null ? String(r.id) : `row-${index}`;\n });\n\n /**\n * Names a row for its selection checkbox (\"Select {label}\"). When unset, or\n * when it returns an empty string, the trimmed text of the row's first cell\n * is used, and failing that the row number.\n */\n readonly rowLabel = input<((row: TData) => string) | null>(null);\n\n /** Drag-resize column widths. Default `true`. */\n readonly resizableColumns = input<boolean>(true);\n\n /** Built-in pagination footer. Ignored when `[fetch]` is provided (server-side paging owns the page state). */\n readonly pagination = input<boolean>(true);\n\n /** Enable virtual scrolling for large datasets. */\n readonly virtualScroll = input<boolean>(false);\n /** Approximate row height in px (drives virtual scroll). */\n readonly itemSize = input<number>(40);\n /** Off-screen row buffer per side for virtual scrolling. */\n readonly virtualBuffer = input<number>(10);\n\n /** Forwarded to the inner table (legacy responsive flag, currently a CSS hook). */\n readonly isResponsive = input<boolean>(false);\n\n /** Emitted on row single-click. */\n readonly rowClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row double-click. */\n readonly rowDblClick = output<BsDatatableRowEvent<TData>>();\n /** Emitted on row context-menu. */\n readonly rowContextMenu = output<BsDatatableRowEvent<TData>>();\n\n // ─── Tree-mode inputs / models / outputs ─────────────────────────────────\n\n /** Enable tree mode (chevron column, nested expansion, lazy children). */\n readonly tree = input<boolean>(false);\n\n /**\n * Property name (or function) that extracts the row's stable identity.\n * Required when `tree=true`. Used as the expansion key and as the\n * `parentId` value the WC sends in `mp-datatable-fetch-request`.\n */\n readonly idKey = input<TreeIdKey<TData> | null>(null);\n\n /**\n * Property name on the row holding the direct-child count. Drives chevron\n * visibility AND placeholder reservation for lazy children. Required when\n * `tree=true`.\n */\n readonly childCountKey = input<string | null>(null);\n\n /** Indent in rem per depth level on the chevron cell. Default `1.25`. */\n readonly treeIndent = input<number>(1.25);\n\n /** Two-way bound set of expanded-row ids (keyed by `idKey`). */\n readonly expandedIds = model<Set<unknown>>(new Set());\n\n /**\n * `'flat'` (default) leaves selection to per-row toggles; `'cascading'`\n * (recommended in tree mode) propagates a parent toggle to all loaded\n * descendants and surfaces an indeterminate state on partially-selected\n * parents.\n */\n readonly selectionStrategy = input<TreeSelectionStrategy>('flat');\n\n /** Emitted after a row is expanded. */\n readonly rowExpand = output<BsDatatableTreeRowEvent<TData>>();\n /** Emitted after a row is collapsed. */\n readonly rowCollapse = output<BsDatatableTreeRowEvent<TData>>();\n\n /**\n * Emitted whenever a column's filter selection changes, including when it is\n * cleared (`selected: []`).\n *\n * The component does not filter `[data]`: acting on this — and setting\n * `filterActive` / `filterSummary` back on the column — is the consumer's job,\n * because only they know whether the filter is client-side or a new query.\n */\n readonly filterChange = output<FilterChangeDetail>();\n\n readonly datatableRef = viewChild.required<ElementRef<MpDatatable>>('datatable');\n\n /** Column directives (header template + sortable). Wrapper-level discovery. */\n readonly columnDirectives = contentChildren(BsDatatableColumnDirective);\n\n /** Optional row template. When present, drives a per-row EmbeddedView render path. */\n readonly rowTemplate = contentChild(BsRowTemplateDirective<TData>);\n\n /**\n * Merged column defs:\n * - `[columns]` if provided\n * - else the `*bsDatatableColumn` directives mapped onto column defs whose\n * `headerRenderer` returns a DOM node produced from the directive's template.\n */\n protected readonly effectiveColumns = computed<DatatableColumnDef<TData>[]>(() => {\n const programmatic = this.columnsInput();\n if (programmatic && programmatic.length) return programmatic;\n\n // Every recompute builds fresh closures with fresh views, so the previous\n // generation is dead the moment we return. Without retiring them they\n // accumulated until the component was destroyed — harmless-looking with one\n // view per column, twice as bad now that filters add a second.\n //\n // Retired, not destroyed: see `retireTemplateViews`. Destroying here is\n // NG0600.\n this.retireTemplateViews();\n\n return this.columnDirectives().map((dir): DatatableColumnDef<TData> => {\n let headerView: EmbeddedViewRef<unknown> | undefined;\n let filterView: EmbeddedViewRef<BsDatatableFilterPanelContext> | undefined;\n let filterValues: WritableSignal<DistinctValues | null> | undefined;\n return {\n name: dir.name(),\n sortable: dir.sortable(),\n filterable: dir.filterable(),\n filterActive: dir.filterActive(),\n filterSummary: dir.filterSummary(),\n filterSelection: dir.filterSelection(),\n filterMode: dir.filterMode(),\n filterInputType: dir.filterInputType(),\n filterOperators: dir.filterOperators(),\n headerRenderer: () => {\n if (!headerView) {\n headerView = this.vcr.createEmbeddedView(dir.templateRef);\n this.headerViews.push(headerView);\n }\n headerView.detectChanges();\n const nodes = headerView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 0) return '';\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n // Installed UNCONDITIONALLY, and the nested template is resolved inside\n // it rather than out here.\n //\n // `dir.filterPanelTemplate` is assigned by the nested directive's\n // constructor, which does not run until the column's header view is\n // created — too late for this computed's first evaluation. Reading it\n // here would see `undefined` for every column and no override would ever\n // appear. Creating the header view eagerly to force it is worse: the\n // insertion dirties Angular's query signals inside a reactive read, and\n // that throws NG0600 as soon as the host declares any `viewChild`.\n //\n // Returning `null` means \"use the built-in panel\", so a column with no\n // override costs nothing.\n filterRenderer: (_col, ctx) => {\n const tpl = dir.filterPanelTemplate;\n if (!tpl) return null;\n if (!filterView || !filterValues) {\n // The context is a signal because the demos and specs are zoneless:\n // mutating a context object notifies nothing, so the override would\n // never repaint as values load.\n filterValues = signal(ctx.values());\n filterView = this.vcr.createEmbeddedView(tpl, { $implicit: filterValues, ctx });\n this.filterViews.push(filterView);\n const values = filterValues;\n this.filterUnsubscribes.push(ctx.onChange(() => values.set(ctx.values())));\n }\n filterView.detectChanges();\n const nodes = filterView.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n if (nodes.length === 1) return nodes[0];\n const frag = document.createDocumentFragment();\n for (const n of nodes) frag.appendChild(n);\n return frag;\n },\n };\n });\n });\n\n /** EmbeddedViews for header templates (one per column directive). */\n private headerViews: EmbeddedViewRef<unknown>[] = [];\n /** EmbeddedViews for filter panel templates (one per overriding column). */\n private filterViews: EmbeddedViewRef<BsDatatableFilterPanelContext>[] = [];\n /** `FilterContext.onChange` unsubscribes, one per live filter view. */\n private filterUnsubscribes: (() => void)[] = [];\n\n /** The previous generation, awaiting disposal by the columns effect. */\n private staleViews: ViewRef[] = [];\n\n /**\n * Hands the previous generation over for disposal — it does **not** destroy\n * anything, and must not.\n *\n * This runs inside `effectiveColumns`, and destroying a view detaches it,\n * which dirties Angular's query signals: a signal write inside a computed,\n * i.e. NG0600, the moment the host declares any view query. It is the exact\n * mirror of why views are not CREATED here either — attach and detach are\n * both signal writes, so neither belongs in a computed.\n *\n * Handing over is a plain field write, and the effect that forwards the\n * columns disposes the batch on the same tick, so the leak this replaced\n * stays fixed: at most one dead generation exists, and only momentarily.\n */\n private retireTemplateViews(): void {\n this.staleViews.push(...this.headerViews, ...this.filterViews);\n this.headerViews = [];\n this.filterViews = [];\n this.releaseFilterSubscriptions();\n }\n\n /** Destroys the retired generation. Only ever called from an effect. */\n private disposeStaleViews(): void {\n for (const v of this.staleViews) v.destroy();\n this.staleViews = [];\n }\n\n /**\n * Without this the web component keeps calling into a destroyed view's signal\n * on every value change, for the life of the element.\n */\n private releaseFilterSubscriptions(): void {\n for (const unsubscribe of this.filterUnsubscribes) unsubscribe();\n this.filterUnsubscribes = [];\n }\n /** EmbeddedViews for row templates, keyed by rowKey for reuse. */\n private rowViews = new Map<string, EmbeddedViewRef<BsRowTemplateContext<TData>>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n // Deliberately does NOT destroy the views. Every one of them is attached\n // to this component's ViewContainerRef, so Angular tears them down with\n // the host view; destroying them again from a cleanup hook re-enters that\n // teardown and desynchronises the container's view bookkeeping — a hard\n // \"attached view should be in the same position within its container\"\n // assertion in dev mode. It only surfaces once a header template contains\n // a nested structural directive, which `*bsDatatableFilterPanel` is, so\n // the previous code looked correct right up until it was not.\n //\n // The subscriptions are the only thing here Angular knows nothing about.\n this.releaseFilterSubscriptions();\n this.headerViews = [];\n this.filterViews = [];\n this.staleViews = [];\n this.rowViews.clear();\n });\n\n // Same server guard as `fetch`: the source is a network call in every real\n // consumer, and a panel cannot be opened during SSR anyway.\n effect(() => {\n const el = this.datatableRef().nativeElement;\n if (isPlatformServer(this.platformId)) return;\n el.distincts = this.distincts();\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n el.labels = this.labels() ?? undefined;\n });\n\n // Forward columns to the WC, and dispose the generation the recompute\n // retired. An effect may write signals; a computed may not, which is the\n // whole reason the disposal happens out here.\n effect(() => {\n const columns = this.effectiveColumns();\n this.disposeStaleViews();\n const el = this.datatableRef().nativeElement;\n el.columns = columns as DatatableColumnDef[];\n });\n\n // Static `[data]` only. When `[fetch]` is set the WC owns the rows, so the\n // wrapper must not also push `el.data` (it would clobber fetched pages).\n effect(() => {\n const el = this.datatableRef().nativeElement;\n if (this.fetch()) return;\n const d = this.data();\n el.data = (d ?? []) as unknown[];\n });\n\n // Forward `[fetch]` and the paging/sort settings as ONE change (#407). The\n // WC owns the entire server-paged loop (initial page, on-demand windows,\n // tree children, pagination, sort/perPage reloads) and derives\n // `totalRecords` from the response; the wrapper runs no fetch loop.\n // Assigning fetch, sort, page and perPage through separate setters (they\n // used to live in two effects) could split across ticks and cost two\n // requests; `applyFetchState` schedules exactly one.\n //\n // This effect must never read `selection`: a selection change would then\n // re-run it, and with an inline `[fetch]` closure that is a request.\n effect(() => {\n const el = this.datatableRef().nativeElement;\n const settings = this.settings();\n const fetch = this.fetch();\n const virtual = this.virtualScroll();\n const sortColumns = settings.sortColumns.map((c) => ({ property: c.property, direction: c.direction }));\n if (isPlatformServer(this.platformId)) {\n // No fetch on the server (SSR must not kick off a client request), and\n // the element may not be upgraded there, so no method calls either.\n el.sortColumns = sortColumns;\n el.page = settings.page.selected;\n el.perPage = settings.perPage.selected;\n } else {\n el.applyFetchState({\n fetch: (fetch as unknown as MpDatatable['fetch']) ?? null,\n sortColumns,\n perPage: settings.perPage.selected,\n page: settings.page.selected,\n });\n }\n el.autoSort = !fetch;\n // Pagination renders in non-virtual mode; in fetch mode the wrapper\n // owns page state and the WC just reports the change via event.\n el.pagination = this.pagination() && !virtual;\n el.perPageOptions = settings.perPage.values;\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n const mode = this.selectable() ?? this.selectionMode();\n el.selectionMode = mode;\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n el.rowKey = (row, index) => this.rowKey()(row as TData, index);\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n const label = this.rowLabel();\n el.rowLabel = label ? (row) => label(row as TData) : null;\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n el.resizableColumns = this.resizableColumns();\n });\n\n effect(() => {\n const el = this.datatableRef().nativeElement;\n el.virtualScroll = this.virtualScroll();\n el.itemSize = this.itemSize();\n el.virtualBuffer = this.virtualBuffer();\n });\n\n // Tree-mode prop sync to the WC.\n effect(() => {\n const el = this.datatableRef().nativeElement;\n el.tree = this.tree();\n el.idKey = this.idKey() as TreeIdKey;\n el.childCountKey = this.childCountKey();\n el.treeIndent = this.treeIndent();\n el.selectionStrategy = this.selectionStrategy();\n });\n\n // Two-way bind `expandedIds` to the WC. Skip-on-echo via structural equality\n // — the WC's getter returns a fresh Set on every read.\n effect(() => {\n const desired = this.expandedIds();\n const el = this.datatableRef().nativeElement;\n const current = el.expandedIds;\n if (setsEqual(current, desired)) return;\n el.expandedIds = desired;\n });\n\n // Wire the row renderer when *bsRowTemplate is provided.\n effect(() => {\n const el = this.datatableRef().nativeElement;\n const tpl = this.rowTemplate();\n // Row views cached for a previous template would keep rendering ITS cells: drop them.\n [...this.rowViews.values()].map((v) => v.destroy());\n this.rowViews.clear();\n el.rowRenderer = tpl ? this.buildRowRenderer(tpl) as RowRenderer : undefined;\n });\n\n // Selection model → WC. Rows are pushed, not keys, so the element\n // remembers host-supplied rows that are not loaded (and derives the keys\n // itself, from the row's position in its data — not from the row's index\n // in this array, which was K3).\n //\n // Echo guard (spike S2). The `selectedRows` setter REPLACES the selection.\n // A model built from an event can legitimately lack a key the element\n // still holds (a key that has never had a row, D3), so pushing that model\n // back would silently DROP the key. Two checks keep that from happening:\n // 1. The model the wrapper itself just built from an event is not pushed\n // back — compared by reference. The guard covers that IMMEDIATE echo\n // only: the first other value clears it, so a host that clears the\n // selection and later restores the earlier array (cancel, error) is\n // pushed like any other write.\n // 2. Anything else with the element's key set is pushed only when some\n // row differs (`!==`) from the row the element holds for its key: a\n // host's fresher object (a new etag) must reach the element, or its\n // next event would report the stale one. Equal key sets mean no\n // row-less key can be lost by that push; an identical model is skipped.\n // The setter emits no event and this effect writes no signal, so there is\n // no loop either way.\n effect(() => {\n const el = this.datatableRef().nativeElement;\n const rows = this.selection();\n const keyFn = this.rowKey();\n if (rows === this.lastEmittedSelection) return;\n this.lastEmittedSelection = null;\n const current = el.selectedIds ?? [];\n const currentRows = el.selectedRows ?? [];\n const keyOf = this.selectionKeyLookup(keyFn, current, currentRows);\n const keys = rows.map(keyOf);\n const next = new Set(keys);\n const sameKeys = next.size === current.length && current.every((k) => next.has(k));\n if (sameKeys) {\n const elementRow = new Map(current.map((k, i) => [k, currentRows[i]] as const));\n if (rows.every((row, i) => elementRow.get(keys[i]) === row)) return;\n }\n el.selectedRows = rows;\n });\n }\n\n /** The selection model the wrapper last built from a WC event (echo guard). */\n private lastEmittedSelection: TData[] | null = null;\n\n /**\n * Keys a selection-model row the way the element would: a row the element\n * currently reports keeps the key it reports it under; any other row gets\n * `rowKey(row, -1)`, which is what the element uses for a row that is not\n * in its loaded data.\n */\n private selectionKeyLookup(\n keyFn: (row: TData, index: number) => string,\n ids: ReadonlyArray<string>,\n rows: ReadonlyArray<unknown>,\n ): (row: TData) => string {\n const known = new Map(\n rows.flatMap((row, i): [unknown, string][] => (row === undefined ? [] : [[row, ids[i]]])),\n );\n return (row) => known.get(row) ?? keyFn(row, -1);\n }\n\n /**\n * Re-queries `[fetch]` for the current sort, page and page size, e.g. after\n * the server data changed. The selection is kept. `resetPage: true` also\n * returns to page 1. A no-op on the server and without `[fetch]`.\n */\n reload(options?: DatatableReloadOptions): void {\n if (isPlatformServer(this.platformId)) return;\n this.datatableRef().nativeElement.reload(options);\n }\n\n private buildRowRenderer(tpl: BsRowTemplateDirective<TData>): RowRenderer<TData> {\n return (row, rowIndex, ctx) => {\n // Placeholder rows (tree-mode, children pending fetch) get a synthetic key\n // so the view is reused per slot. Consumers detect them via `isPlaceholder`.\n const isPlaceholder = ctx?.isPlaceholder ?? row === undefined;\n const depth = ctx?.depth ?? 0;\n const isExpanded = ctx?.isExpanded ?? false;\n const key = isPlaceholder\n ? `__placeholder-${rowIndex}`\n : this.rowKey()(row as TData, rowIndex);\n let viewRef = this.rowViews.get(key);\n if (!viewRef) {\n const context = new BsRowTemplateContext<TData>();\n context.$implicit = row as TData | undefined;\n context.index = rowIndex;\n context.depth = depth;\n context.isExpanded = isExpanded;\n context.isPlaceholder = isPlaceholder;\n viewRef = this.vcr.createEmbeddedView(tpl.templateRef, context);\n this.rowViews.set(key, viewRef);\n } else {\n viewRef.context.$implicit = row as TData | undefined;\n viewRef.context.index = rowIndex;\n viewRef.context.depth = depth;\n viewRef.context.isExpanded = isExpanded;\n viewRef.context.isPlaceholder = isPlaceholder;\n }\n viewRef.detectChanges();\n const nodes = viewRef.rootNodes.filter((n: unknown): n is Node => n instanceof Node);\n return nodes;\n };\n }\n\n // ─── WC event handlers ───────────────────────────────────────────────────\n\n onSortChange(event: Event): void {\n const detail = (event as CustomEvent<SortChangeEventDetail>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n sortColumns: detail.sortColumns as SortColumn[],\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onSelectionChange(event: Event): void {\n const detail = (event as CustomEvent<SelectionChangeEventDetail<TData>>).detail;\n // `selectedIds` is authoritative; `selectedRows` is index-aligned with it,\n // with `undefined` for a key whose row the element has never seen (D3/D5).\n // Such a key falls back to the row the model already held for it, and is\n // otherwise left out of the model — it stays selected in the element,\n // which is why the selection effect's echo guard never pushes it back.\n const keyFn = this.rowKey();\n const previous = new Map(this.selection().map((row) => [keyFn(row, -1), row] as const));\n const next = detail.selectedIds.flatMap((id, i): TData[] => {\n const row = detail.selectedRows[i] ?? previous.get(id);\n return row === undefined ? [] : [row];\n });\n this.lastEmittedSelection = next;\n this.selection.set(next);\n }\n\n onPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ page: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n page: { ...settings.page, selected: detail.page },\n }),\n );\n }\n\n onPerPageChange(event: Event): void {\n const detail = (event as CustomEvent<{ perPage: number }>).detail;\n const settings = this.settings();\n this.settings.set(\n new DatatableSettings({\n ...settings,\n perPage: { ...settings.perPage, selected: detail.perPage },\n page: { ...settings.page, selected: 1 },\n }),\n );\n }\n\n onRowClick(event: Event): void {\n this.rowClick.emit(this.toBsEvent(event));\n }\n onRowDblClick(event: Event): void {\n this.rowDblClick.emit(this.toBsEvent(event));\n }\n onRowContextMenu(event: Event): void {\n this.rowContextMenu.emit(this.toBsEvent(event));\n }\n\n // ─── Tree-mode event handlers ────────────────────────────────────────────\n\n onRowExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowExpand.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onRowCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeRowExpandDetail<TData>>).detail;\n this.rowCollapse.emit({ row: detail.row, depth: detail.depth, parentId: detail.parentId });\n }\n\n onExpandedIdsChange(event: Event): void {\n const detail = (event as CustomEvent<TreeExpandedIdsChangeDetail>).detail;\n const next = new Set(detail.expandedIds);\n if (setsEqual(this.expandedIds(), next)) return;\n this.expandedIds.set(next);\n }\n\n onFilterChange(event: Event): void {\n this.filterChange.emit((event as CustomEvent<FilterChangeDetail>).detail);\n }\n\n private toBsEvent(event: Event): BsDatatableRowEvent<TData> {\n const detail = (event as CustomEvent<RowEventDetail<TData>>).detail;\n return {\n row: detail.row,\n rowIndex: detail.rowIndex,\n rowKey: detail.rowKey,\n originalEvent: detail.originalEvent,\n };\n }\n}\n\nfunction setsEqual<T>(\n a: Set<T> | ReadonlyArray<T> | null | undefined,\n b: Set<T> | ReadonlyArray<T> | null | undefined,\n): boolean {\n // In SSR the WC isn't upgraded yet, so reading `el.expandedIds` returns\n // `undefined` instead of the getter's `new Set()`. Treat both-missing as\n // equal so the sync effect short-circuits cleanly during pre-hydration.\n if (a == null && b == null) return true;\n if (a == null || b == null) return false;\n const aSize = a instanceof Set ? a.size : a.length;\n const bSize = b instanceof Set ? b.size : b.length;\n if (aSize !== bSize) return false;\n const bSet = b instanceof Set ? b : new Set(b);\n for (const v of a) if (!bSet.has(v)) return false;\n return true;\n}\n\nexport { computeNextSort };\n","<mp-datatable bsForwardAria\n #datatable\n class=\"bs-datatable\"\n (mp-datatable-sort-change)=\"onSortChange($event)\"\n (mp-datatable-selection-change)=\"onSelectionChange($event)\"\n (mp-datatable-page-change)=\"onPageChange($event)\"\n (mp-datatable-per-page-change)=\"onPerPageChange($event)\"\n (mp-datatable-row-click)=\"onRowClick($event)\"\n (mp-datatable-row-dblclick)=\"onRowDblClick($event)\"\n (mp-datatable-row-contextmenu)=\"onRowContextMenu($event)\"\n (mp-datatable-row-expand)=\"onRowExpand($event)\"\n (mp-datatable-row-collapse)=\"onRowCollapse($event)\"\n (mp-datatable-expanded-ids-change)=\"onExpandedIdsChange($event)\"\n (mp-datatable-filter-change)=\"onFilterChange($event)\"\n></mp-datatable>\n","import { DestroyRef, Directive, inject, TemplateRef } from '@angular/core';\nimport {\n BsDatatableColumnDirective,\n type BsDatatableFilterPanelContext,\n} from '../datatable-column/datatable-column.directive';\n\n/**\n * Overrides the filter panel of the column it is nested in.\n *\n * ```html\n * <div *bsDatatableColumn=\"'country'; filterable: true\">\n * Country\n * <ng-container *bsDatatableFilterPanel=\"let values\">\n * <my-panel [values]=\"values()\"></my-panel>\n * </ng-container>\n * </div>\n * ```\n *\n * Nested inside the column rather than a sibling keyed by name: the column is\n * the thing being configured, and a name-keyed sibling has no way to fail loudly\n * when the two names drift apart. It is also the pattern every other per-item\n * override in this workspace uses.\n *\n * Omitting it is not a lesser option — the web component renders a built-in\n * panel (search, include/exclude, checkbox list, clear) which React and Vue get\n * for free. This directive is for the cases that need something else.\n *\n * ### Inputs on the column, not here\n *\n * `filterable`, `filterActive`, `filterSummary` and `filterSelection` are inputs\n * on `*bsDatatableColumn`. They cannot live here: this directive's own inputs\n * are not yet set when its constructor runs, and the constructor is the only\n * point at which it can register itself with the column early enough.\n */\n@Directive({ selector: '[bsDatatableFilterPanel]' })\nexport class BsDatatableFilterPanelDirective {\n private readonly column = inject(BsDatatableColumnDirective);\n private readonly templateRef =\n inject<TemplateRef<BsDatatableFilterPanelContext>>(TemplateRef);\n\n constructor() {\n // A plain field assignment, deliberately. See the field's own comment on\n // `BsDatatableColumnDirective`: a signal write here is NG0600.\n this.column.filterPanelTemplate = this.templateRef;\n\n inject(DestroyRef).onDestroy(() => {\n // Guarded: under `@if`, the incoming directive's constructor can run\n // before the outgoing one's destroy hook, and an unguarded clear would\n // erase the template that just replaced this one.\n if (this.column.filterPanelTemplate === this.templateRef) {\n this.column.filterPanelTemplate = undefined;\n }\n });\n }\n\n /**\n * Lets `let values = $implicit` and `let ctx = ctx` type-check against the\n * real context. Without it both are `any`, so `values().anything.deeper`\n * compiles and fails at runtime.\n */\n static ngTemplateContextGuard(\n _dir: BsDatatableFilterPanelDirective,\n _ctx: unknown,\n ): _ctx is BsDatatableFilterPanelContext {\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MAEa,iBAAiB,CAAA;AAC1B,IAAA,WAAA,CAAY,IAAiC,EAAA;QAwBtC,IAAA,CAAA,WAAW,GAAiB,EAAE;QAG9B,IAAA,CAAA,iBAAiB,GAAW,EAAE;AA1BjC,QAAA,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC;AAEzB,QAAA,IAAI,IAAI,IAAI,IAAI,CAAC,OAAO,EAAE;AACtB,YAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,OAAO;QAC/B;aAAO;;YAEH,IAAI,CAAC,OAAO,GAAG;AACX,gBAAA,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AACpB,gBAAA,QAAQ,EAAE;aACb;QACL;AAEA,QAAA,IAAI,IAAI,IAA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AAE,0BAA0B,EAAE;;;AClCnD;;AAEG;;;;"}
@@ -36,16 +36,14 @@ class BsDatepickerComponent {
36
36
  ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
37
37
  this.effectiveDisabled = signal(false, /* @ts-ignore */
38
38
  ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
39
- this.wcRef = viewChild('wc', /* @ts-ignore */
39
+ this.wcRef = viewChild.required('wc', /* @ts-ignore */
40
40
  ...(ngDevMode ? [{ debugName: "wcRef" }] : /* istanbul ignore next */ []));
41
41
  this.onChange = () => { };
42
42
  this.onTouched = () => { };
43
43
  this.onValidatorChange = () => { };
44
44
  // Mirror inputs to the WC.
45
45
  effect(() => {
46
- const wc = this.wcRef()?.nativeElement;
47
- if (!wc)
48
- return;
46
+ const wc = this.wcRef().nativeElement;
49
47
  wc.selectedDate = this.selectedDate();
50
48
  wc.currentMonth = this.currentMonth();
51
49
  wc.disableDateFn = this.disableDateFn() ?? null;
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-datepicker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.html","../../../../libs/mintplayer-ng-bootstrap/datepicker/mintplayer-ng-bootstrap-datepicker.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n forwardRef,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport type { FirstDayOfWeek } from '@mintplayer/web-components/calendar';\nimport { MpDatepickerElement } from '@mintplayer/web-components/datepicker';\n\n// Side-effect: registers <mp-datepicker>.\nvoid MpDatepickerElement;\n\nfunction dateOnly(d: Date): number {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n}\n\n@Component({\n selector: 'bs-datepicker',\n templateUrl: './datepicker.component.html',\n styleUrls: ['./datepicker.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsDatepickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => BsDatepickerComponent), multi: true },\n ],\n})\nexport class BsDatepickerComponent implements AfterViewInit, ControlValueAccessor, Validator {\n selectedDate = model<Date>(new Date());\n currentMonth = model<Date>(new Date());\n disableDateFn = input<((date: Date) => boolean) | undefined>(undefined);\n min = input<Date | undefined>(undefined);\n max = input<Date | undefined>(undefined);\n firstDayOfWeek = input<FirstDayOfWeek>(1);\n locale = input<string | undefined>(undefined);\n placeholder = input<string>('');\n triggerLabel = input<string>('Choose date');\n\n /** Disabled state driven by form's disable() (via setDisabledState) or [disabled] input. */\n protected readonly formDisabled = signal(false);\n disabled = input<boolean>(false);\n protected readonly effectiveDisabled = signal(false);\n\n readonly wcRef = viewChild<ElementRef<MpDatepickerElement>>('wc');\n\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n private onValidatorChange: () => void = () => {};\n\n constructor() {\n // Mirror inputs to the WC.\n effect(() => {\n const wc = this.wcRef()?.nativeElement;\n if (!wc) return;\n wc.selectedDate = this.selectedDate();\n wc.currentMonth = this.currentMonth();\n wc.disableDateFn = this.disableDateFn() ?? null;\n wc.min = this.min() ?? null;\n wc.max = this.max() ?? null;\n wc.firstDayOfWeek = this.firstDayOfWeek();\n wc.locale = this.locale();\n wc.placeholder = this.placeholder();\n wc.triggerLabel = this.triggerLabel();\n wc.disabled = this.effectiveDisabled();\n wc.requestUpdate?.();\n });\n\n // Effective disabled = input OR form-disabled.\n effect(() => {\n this.effectiveDisabled.set(this.disabled() || this.formDisabled());\n });\n\n // Notify validator pipeline when min/max/disableDateFn change.\n effect(() => {\n // Establish reactive deps.\n this.min();\n this.max();\n this.disableDateFn();\n this.onValidatorChange();\n });\n }\n\n ngAfterViewInit(): void {\n // Initial sync via effect once viewChild resolves.\n }\n\n onSelectedDateChange(event: Event): void {\n const detail = (event as CustomEvent<Date>).detail;\n if (!(detail instanceof Date)) return;\n this.selectedDate.set(detail);\n this.onChange(detail);\n }\n\n onCurrentMonthChange(event: Event): void {\n const detail = (event as CustomEvent<Date>).detail;\n if (detail instanceof Date) this.currentMonth.set(detail);\n }\n\n onClosed(): void {\n // Treat closing the popup as a \"touched\" event for forms.\n this.onTouched();\n }\n\n /* ---- ControlValueAccessor ---- */\n\n writeValue(value: Date | null | undefined): void {\n if (value instanceof Date) {\n this.selectedDate.set(value);\n }\n // If value is null/undefined, leave the model alone — Angular forms call\n // writeValue(null) on form reset; we honor it by leaving the prior date\n // as a stable default. Consumers wanting to clear should bind to value or\n // use a separate clear gesture.\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /* ---- Validator ---- */\n\n validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n if (!(value instanceof Date)) return null;\n const errors: ValidationErrors = {};\n const min = this.min();\n const max = this.max();\n if (min && dateOnly(value) < dateOnly(min)) {\n errors['min'] = { min, actual: value };\n }\n if (max && dateOnly(value) > dateOnly(max)) {\n errors['max'] = { max, actual: value };\n }\n const fn = this.disableDateFn();\n if (fn && fn(value)) errors['disabledDate'] = true;\n return Object.keys(errors).length ? errors : null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n}\n","<mp-datepicker\n #wc\n (selected-date-change)=\"onSelectedDateChange($event)\"\n (current-month-change)=\"onCurrentMonthChange($event)\"\n (closed)=\"onClosed()\">\n</mp-datepicker>\n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player-ng-bootstrap-datepicker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datepicker/src/datepicker.component.html","../../../../libs/mintplayer-ng-bootstrap/datepicker/mintplayer-ng-bootstrap-datepicker.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n forwardRef,\n input,\n model,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport type { FirstDayOfWeek } from '@mintplayer/web-components/calendar';\nimport { MpDatepickerElement } from '@mintplayer/web-components/datepicker';\n\n// Side-effect: registers <mp-datepicker>.\nvoid MpDatepickerElement;\n\nfunction dateOnly(d: Date): number {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n}\n\n@Component({\n selector: 'bs-datepicker',\n templateUrl: './datepicker.component.html',\n styleUrls: ['./datepicker.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsDatepickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => BsDatepickerComponent), multi: true },\n ],\n})\nexport class BsDatepickerComponent implements AfterViewInit, ControlValueAccessor, Validator {\n selectedDate = model<Date>(new Date());\n currentMonth = model<Date>(new Date());\n disableDateFn = input<((date: Date) => boolean) | undefined>(undefined);\n min = input<Date | undefined>(undefined);\n max = input<Date | undefined>(undefined);\n firstDayOfWeek = input<FirstDayOfWeek>(1);\n locale = input<string | undefined>(undefined);\n placeholder = input<string>('');\n triggerLabel = input<string>('Choose date');\n\n /** Disabled state driven by form's disable() (via setDisabledState) or [disabled] input. */\n protected readonly formDisabled = signal(false);\n disabled = input<boolean>(false);\n protected readonly effectiveDisabled = signal(false);\n\n readonly wcRef = viewChild.required<ElementRef<MpDatepickerElement>>('wc');\n\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n private onValidatorChange: () => void = () => {};\n\n constructor() {\n // Mirror inputs to the WC.\n effect(() => {\n const wc = this.wcRef().nativeElement;\n wc.selectedDate = this.selectedDate();\n wc.currentMonth = this.currentMonth();\n wc.disableDateFn = this.disableDateFn() ?? null;\n wc.min = this.min() ?? null;\n wc.max = this.max() ?? null;\n wc.firstDayOfWeek = this.firstDayOfWeek();\n wc.locale = this.locale();\n wc.placeholder = this.placeholder();\n wc.triggerLabel = this.triggerLabel();\n wc.disabled = this.effectiveDisabled();\n wc.requestUpdate?.();\n });\n\n // Effective disabled = input OR form-disabled.\n effect(() => {\n this.effectiveDisabled.set(this.disabled() || this.formDisabled());\n });\n\n // Notify validator pipeline when min/max/disableDateFn change.\n effect(() => {\n // Establish reactive deps.\n this.min();\n this.max();\n this.disableDateFn();\n this.onValidatorChange();\n });\n }\n\n ngAfterViewInit(): void {\n // Initial sync via effect once viewChild resolves.\n }\n\n onSelectedDateChange(event: Event): void {\n const detail = (event as CustomEvent<Date>).detail;\n if (!(detail instanceof Date)) return;\n this.selectedDate.set(detail);\n this.onChange(detail);\n }\n\n onCurrentMonthChange(event: Event): void {\n const detail = (event as CustomEvent<Date>).detail;\n if (detail instanceof Date) this.currentMonth.set(detail);\n }\n\n onClosed(): void {\n // Treat closing the popup as a \"touched\" event for forms.\n this.onTouched();\n }\n\n /* ---- ControlValueAccessor ---- */\n\n writeValue(value: Date | null | undefined): void {\n if (value instanceof Date) {\n this.selectedDate.set(value);\n }\n // If value is null/undefined, leave the model alone — Angular forms call\n // writeValue(null) on form reset; we honor it by leaving the prior date\n // as a stable default. Consumers wanting to clear should bind to value or\n // use a separate clear gesture.\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /* ---- Validator ---- */\n\n validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n if (!(value instanceof Date)) return null;\n const errors: ValidationErrors = {};\n const min = this.min();\n const max = this.max();\n if (min && dateOnly(value) < dateOnly(min)) {\n errors['min'] = { min, actual: value };\n }\n if (max && dateOnly(value) > dateOnly(max)) {\n errors['max'] = { max, actual: value };\n }\n const fn = this.disableDateFn();\n if (fn && fn(value)) errors['disabledDate'] = true;\n return Object.keys(errors).length ? errors : null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n}\n","<mp-datepicker\n #wc\n (selected-date-change)=\"onSelectedDateChange($event)\"\n (current-month-change)=\"onCurrentMonthChange($event)\"\n (closed)=\"onClosed()\">\n</mp-datepicker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAwBA;AACA,KAAK,mBAAmB;AAExB,SAAS,QAAQ,CAAC,CAAO,EAAA;IACvB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AACvE;MAaa,qBAAqB,CAAA;AAsBhC,IAAA,WAAA,GAAA;AArBA,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE;yFAAC;AACtC,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAO,IAAI,IAAI,EAAE;yFAAC;QACtC,IAAA,CAAA,aAAa,GAAG,KAAK,CAAwC,SAAS;0FAAC;QACvE,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA,cAAc,GAAG,KAAK,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,EAAA,UAAA,EAAA,CAAA;kBAXjC,SAAS;+BACE,eAAe,EAAA,OAAA,EAGhB,CAAC,sBAAsB,CAAC,mBAChB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACjG,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAC9F,qBAAA,EAAA,QAAA,EAAA,6LAAA,EAAA;+pCAkBoE,IAAI,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE1D3E;;AAEG;;;;"}
@@ -60,15 +60,13 @@ class BsDatetimePickerComponent {
60
60
  ...(ngDevMode ? [{ debugName: "effectiveDisabled" }] : /* istanbul ignore next */ []));
61
61
  this.opened = output();
62
62
  this.closed = output();
63
- this.wcRef = viewChild('wc', /* @ts-ignore */
63
+ this.wcRef = viewChild.required('wc', /* @ts-ignore */
64
64
  ...(ngDevMode ? [{ debugName: "wcRef" }] : /* istanbul ignore next */ []));
65
65
  this.onChange = () => { };
66
66
  this.onTouched = () => { };
67
67
  this.onValidatorChange = () => { };
68
68
  effect(() => {
69
- const wc = this.wcRef()?.nativeElement;
70
- if (!wc)
71
- return;
69
+ const wc = this.wcRef().nativeElement;
72
70
  wc.value = this.value();
73
71
  wc.min = this.min() ?? null;
74
72
  wc.max = this.max() ?? null;
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-datetime-picker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datetime-picker/src/datetime-picker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datetime-picker/src/datetime-picker.component.html","../../../../libs/mintplayer-ng-bootstrap/datetime-picker/mintplayer-ng-bootstrap-datetime-picker.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n forwardRef,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport type { FirstDayOfWeek } from '@mintplayer/web-components/calendar';\nimport type { Hour12Mode, TimeStep } from '@mintplayer/web-components/timepicker';\nimport { MpDatetimePickerElement, type DatetimePopup } from '@mintplayer/web-components/datetime-picker';\n\nvoid MpDatetimePickerElement;\n\nexport interface TimePartInput {\n hour: number;\n minute: number;\n}\n\nfunction dateOnly(d: Date): number {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n}\n\n@Component({\n selector: 'bs-datetime-picker',\n templateUrl: './datetime-picker.component.html',\n styleUrls: ['./datetime-picker.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsDatetimePickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => BsDatetimePickerComponent), multi: true },\n ],\n})\nexport class BsDatetimePickerComponent implements AfterViewInit, ControlValueAccessor, Validator {\n value = model<Date | null>(null);\n\n min = input<Date | undefined>(undefined);\n max = input<Date | undefined>(undefined);\n disableDateFn = input<((date: Date) => boolean) | undefined>(undefined);\n firstDayOfWeek = input<FirstDayOfWeek>(1);\n locale = input<string | undefined>(undefined);\n hour12 = input<Hour12Mode>('auto');\n step = input<TimeStep>(15);\n defaultTime = input<TimePartInput>({ hour: 0, minute: 0 });\n placeholder = input<string>('');\n showClear = input<boolean>(false);\n dateButtonLabel = input<string>('Choose date');\n timeButtonLabel = input<string>('Choose time');\n clearLabel = input<string>('Clear');\n todayLabel = input<string>('Today');\n nowLabel = input<string>('Now');\n\n /**\n * The `error-text` channel. A validation message for this control cannot be\n * supplied from outside — its role lives on an input inside the WC's shadow\n * root, and an IDREF does not cross that boundary — so it travels in as\n * text and is wired up in there.\n */\n invalid = input<boolean>(false);\n errorText = input<string | null>(null);\n\n disabled = input<boolean>(false);\n protected readonly formDisabled = signal(false);\n protected readonly effectiveDisabled = signal(false);\n\n readonly opened = output<DatetimePopup>();\n readonly closed = output<DatetimePopup>();\n\n readonly wcRef = viewChild<ElementRef<MpDatetimePickerElement>>('wc');\n\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n private onValidatorChange: () => void = () => {};\n\n constructor() {\n effect(() => {\n const wc = this.wcRef()?.nativeElement;\n if (!wc) return;\n wc.value = this.value();\n wc.min = this.min() ?? null;\n wc.max = this.max() ?? null;\n wc.disableDateFn = this.disableDateFn() ?? null;\n wc.firstDayOfWeek = this.firstDayOfWeek();\n wc.locale = this.locale();\n wc.hour12 = this.hour12();\n wc.step = this.step();\n wc.defaultTime = this.defaultTime();\n wc.placeholder = this.placeholder();\n wc.showClear = this.showClear();\n wc.dateButtonLabel = this.dateButtonLabel();\n wc.timeButtonLabel = this.timeButtonLabel();\n wc.clearLabel = this.clearLabel();\n wc.todayLabel = this.todayLabel();\n wc.nowLabel = this.nowLabel();\n wc.disabled = this.effectiveDisabled();\n wc.invalid = this.invalid();\n wc.errorText = this.errorText();\n wc.requestUpdate?.();\n });\n\n effect(() => {\n this.effectiveDisabled.set(this.disabled() || this.formDisabled());\n });\n\n effect(() => {\n this.min();\n this.max();\n this.disableDateFn();\n this.onValidatorChange();\n });\n }\n\n ngAfterViewInit(): void {}\n\n onValueChange(event: Event): void {\n const detail = (event as CustomEvent<Date | null>).detail;\n const next: Date | null = detail instanceof Date ? detail : null;\n this.value.set(next);\n this.onChange(next);\n }\n\n onOpened(event: Event): void {\n const detail = (event as CustomEvent<DatetimePopup>).detail;\n this.opened.emit(detail);\n }\n\n onClosed(event: Event): void {\n const detail = (event as CustomEvent<DatetimePopup>).detail;\n this.closed.emit(detail);\n this.onTouched();\n }\n\n /* ---- ControlValueAccessor ---- */\n\n writeValue(value: Date | null | undefined): void {\n if (value instanceof Date) {\n this.value.set(value);\n } else if (value === null) {\n this.value.set(null);\n }\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /* ---- Validator ---- */\n\n validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n if (!(value instanceof Date)) return null;\n const errors: ValidationErrors = {};\n const min = this.min();\n const max = this.max();\n if (min && dateOnly(value) < dateOnly(min)) {\n errors['min'] = { min, actual: value };\n }\n if (max && dateOnly(value) > dateOnly(max)) {\n errors['max'] = { max, actual: value };\n }\n const fn = this.disableDateFn();\n if (fn && fn(value)) errors['disabledDate'] = true;\n return Object.keys(errors).length ? errors : null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n}\n","<mp-datetime-picker\n #wc\n (value-change)=\"onValueChange($event)\"\n (opened)=\"onOpened($event)\"\n (closed)=\"onClosed($event)\">\n</mp-datetime-picker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA0BA,KAAK,uBAAuB;AAO5B,SAAS,QAAQ,CAAC,CAAO,EAAA;IACvB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AACvE;MAaa,yBAAyB,CAAA;AAyCpC,IAAA,WAAA,GAAA;QAxCA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,IAAI;kFAAC;QAEhC,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA,G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AAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACrG,YAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAyB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAClG,SAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,IAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC9CH,oKAMA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD0Ca,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EAGrB,CAAC,sBAAsB,CAAC,mBAChB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACrG,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAClG,qBAAA,EAAA,QAAA,EAAA,oKAAA,EAAA;yiEAqC+D,IAAI,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnFtE;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-datetime-picker.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/datetime-picker/src/datetime-picker.component.ts","../../../../libs/mintplayer-ng-bootstrap/datetime-picker/src/datetime-picker.component.html","../../../../libs/mintplayer-ng-bootstrap/datetime-picker/mintplayer-ng-bootstrap-datetime-picker.ts"],"sourcesContent":["import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n CUSTOM_ELEMENTS_SCHEMA,\n effect,\n ElementRef,\n forwardRef,\n input,\n model,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport {\n AbstractControl,\n ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n ValidationErrors,\n Validator,\n} from '@angular/forms';\nimport type { FirstDayOfWeek } from '@mintplayer/web-components/calendar';\nimport type { Hour12Mode, TimeStep } from '@mintplayer/web-components/timepicker';\nimport { MpDatetimePickerElement, type DatetimePopup } from '@mintplayer/web-components/datetime-picker';\n\nvoid MpDatetimePickerElement;\n\nexport interface TimePartInput {\n hour: number;\n minute: number;\n}\n\nfunction dateOnly(d: Date): number {\n return new Date(d.getFullYear(), d.getMonth(), d.getDate()).getTime();\n}\n\n@Component({\n selector: 'bs-datetime-picker',\n templateUrl: './datetime-picker.component.html',\n styleUrls: ['./datetime-picker.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsDatetimePickerComponent), multi: true },\n { provide: NG_VALIDATORS, useExisting: forwardRef(() => BsDatetimePickerComponent), multi: true },\n ],\n})\nexport class BsDatetimePickerComponent implements AfterViewInit, ControlValueAccessor, Validator {\n value = model<Date | null>(null);\n\n min = input<Date | undefined>(undefined);\n max = input<Date | undefined>(undefined);\n disableDateFn = input<((date: Date) => boolean) | undefined>(undefined);\n firstDayOfWeek = input<FirstDayOfWeek>(1);\n locale = input<string | undefined>(undefined);\n hour12 = input<Hour12Mode>('auto');\n step = input<TimeStep>(15);\n defaultTime = input<TimePartInput>({ hour: 0, minute: 0 });\n placeholder = input<string>('');\n showClear = input<boolean>(false);\n dateButtonLabel = input<string>('Choose date');\n timeButtonLabel = input<string>('Choose time');\n clearLabel = input<string>('Clear');\n todayLabel = input<string>('Today');\n nowLabel = input<string>('Now');\n\n /**\n * The `error-text` channel. A validation message for this control cannot be\n * supplied from outside — its role lives on an input inside the WC's shadow\n * root, and an IDREF does not cross that boundary — so it travels in as\n * text and is wired up in there.\n */\n invalid = input<boolean>(false);\n errorText = input<string | null>(null);\n\n disabled = input<boolean>(false);\n protected readonly formDisabled = signal(false);\n protected readonly effectiveDisabled = signal(false);\n\n readonly opened = output<DatetimePopup>();\n readonly closed = output<DatetimePopup>();\n\n readonly wcRef = viewChild.required<ElementRef<MpDatetimePickerElement>>('wc');\n\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n private onValidatorChange: () => void = () => {};\n\n constructor() {\n effect(() => {\n const wc = this.wcRef().nativeElement;\n wc.value = this.value();\n wc.min = this.min() ?? null;\n wc.max = this.max() ?? null;\n wc.disableDateFn = this.disableDateFn() ?? null;\n wc.firstDayOfWeek = this.firstDayOfWeek();\n wc.locale = this.locale();\n wc.hour12 = this.hour12();\n wc.step = this.step();\n wc.defaultTime = this.defaultTime();\n wc.placeholder = this.placeholder();\n wc.showClear = this.showClear();\n wc.dateButtonLabel = this.dateButtonLabel();\n wc.timeButtonLabel = this.timeButtonLabel();\n wc.clearLabel = this.clearLabel();\n wc.todayLabel = this.todayLabel();\n wc.nowLabel = this.nowLabel();\n wc.disabled = this.effectiveDisabled();\n wc.invalid = this.invalid();\n wc.errorText = this.errorText();\n wc.requestUpdate?.();\n });\n\n effect(() => {\n this.effectiveDisabled.set(this.disabled() || this.formDisabled());\n });\n\n effect(() => {\n this.min();\n this.max();\n this.disableDateFn();\n this.onValidatorChange();\n });\n }\n\n ngAfterViewInit(): void {}\n\n onValueChange(event: Event): void {\n const detail = (event as CustomEvent<Date | null>).detail;\n const next: Date | null = detail instanceof Date ? detail : null;\n this.value.set(next);\n this.onChange(next);\n }\n\n onOpened(event: Event): void {\n const detail = (event as CustomEvent<DatetimePopup>).detail;\n this.opened.emit(detail);\n }\n\n onClosed(event: Event): void {\n const detail = (event as CustomEvent<DatetimePopup>).detail;\n this.closed.emit(detail);\n this.onTouched();\n }\n\n /* ---- ControlValueAccessor ---- */\n\n writeValue(value: Date | null | undefined): void {\n if (value instanceof Date) {\n this.value.set(value);\n } else if (value === null) {\n this.value.set(null);\n }\n }\n\n registerOnChange(fn: (value: Date | null) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.formDisabled.set(isDisabled);\n }\n\n /* ---- Validator ---- */\n\n validate(control: AbstractControl): ValidationErrors | null {\n const value = control.value;\n if (!(value instanceof Date)) return null;\n const errors: ValidationErrors = {};\n const min = this.min();\n const max = this.max();\n if (min && dateOnly(value) < dateOnly(min)) {\n errors['min'] = { min, actual: value };\n }\n if (max && dateOnly(value) > dateOnly(max)) {\n errors['max'] = { max, actual: value };\n }\n const fn = this.disableDateFn();\n if (fn && fn(value)) errors['disabledDate'] = true;\n return Object.keys(errors).length ? errors : null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this.onValidatorChange = fn;\n }\n}\n","<mp-datetime-picker\n #wc\n (value-change)=\"onValueChange($event)\"\n (opened)=\"onOpened($event)\"\n (closed)=\"onClosed($event)\">\n</mp-datetime-picker>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA0BA,KAAK,uBAAuB;AAO5B,SAAS,QAAQ,CAAC,CAAO,EAAA;IACvB,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE;AACvE;MAaa,yBAAyB,CAAA;AAyCpC,IAAA,WAAA,GAAA;QAxCA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAc,IAAI;kFAAC;QAEhC,IAAA,CAAA,GAAG,GAAG,KAAK,CAAmB,SAAS;gFAAC;QACxC,IAAA,CAAA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K,EAAE,IAAI,EAAE;AACrG,YAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,MAAM,yBAAyB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAClG,SAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA,OAAA,EAAA,KAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,IAAA,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC9CH,oKAMA,EAAA,MAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FD0Ca,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAXrC,SAAS;+BACE,oBAAoB,EAAA,OAAA,EAGrB,CAAC,sBAAsB,CAAC,mBAChB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC;AACT,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AACrG,wBAAA,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE;AAClG,qBAAA,EAAA,QAAA,EAAA,oKAAA,EAAA;yiEAqCwE,IAAI,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEnF/E;;AAEG;;;;"}
@@ -97,7 +97,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
97
97
  * a `listbox` menu).
98
98
  * - `disabled` — non-interactive; removed from the menu's roving order.
99
99
  * - `value` — opaque value carried in the menu's `select` event detail;
100
- * assigned as a `value` property on the host `<li>` (the WC reads it).
100
+ * written to the host `<li>` as its `dropdownValue` property, which the WC
101
+ * reads. Not the `value` property: `HTMLLIElement.value` is a native long
102
+ * that turns an object or a string into 0.
101
103
  */
102
104
  class BsDropdownItemDirective {
103
105
  constructor() {
@@ -110,7 +112,7 @@ class BsDropdownItemDirective {
110
112
  ...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
111
113
  const el = inject(ElementRef);
112
114
  effect(() => {
113
- el.nativeElement.value = this.value();
115
+ el.nativeElement.dropdownValue = this.value();
114
116
  });
115
117
  }
116
118
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsDropdownItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
@@ -1 +1 @@
1
- {"version":3,"file":"mintplayer-ng-bootstrap-dropdown-menu.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/tokens/menu-context.token.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.html","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-divider.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/mintplayer-ng-bootstrap-dropdown-menu.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * DI marker meaning \"this content is authored inside a dropdown menu\".\n *\n * Provided by `BsDropdownMenuComponent` and `BsNavbarDropdownComponent`;\n * optionally injected by context-aware children (`bs-navbar-item`) to render\n * their `.dropdown-item` shape instead of their nav-link shape, so the same\n * item element works at every nesting level of a navbar.\n *\n * Element injectors follow the CONSUMER template's nesting (not the projection\n * site), so any `<bs-navbar-item>` written between the tags of either provider\n * sees the token — including content projected through `<ng-content>`.\n */\nexport const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken<boolean>('BS_DROPDOWN_MENU_CONTEXT');\n","import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input, output, ViewEncapsulation } from '@angular/core';\nimport type { DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '../tokens/menu-context.token';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\n/**\n * `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web\n * component. This is the single dropdown-menu implementation: it is used\n * standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger\n * stack), inside `<bs-navbar>`, and as the listbox panel for the combobox /\n * typeahead (`mode=\"listbox\"`).\n *\n * Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware\n * styling all live in the WC (single source of UI truth). This wrapper bridges\n * inputs to attributes and projects `[bsDropdownItem]` / `[bsDropdownDivider]` /\n * `[bsDropdownHeader]` `<li>`s into the WC's default slot.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-dropdown-menu>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.\n *\n * This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it\n * lives in a sibling entry point). When projected as a combobox/listbox panel,\n * the consumer sets `mode=\"listbox\"` and mirrors the trigger's `menuId`/\n * `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported\n * `bsDropdown` reference — the same directive the toggle and combobox read.\n */\n@Component({\n selector: 'bs-dropdown-menu',\n templateUrl: './dropdown-menu.component.html',\n imports: [BsForwardAriaDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n // Marks content authored between these tags as \"inside a menu\" so\n // context-aware children (bs-navbar-item) render their dropdown-item shape.\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n // The COMPANION light-DOM sheet: the one thing the menu's shadow `::slotted`\n // rules cannot reach is a nested `<a>`/`<button>` inside an item. Ship it as an\n // un-encapsulated (global, class-scoped) rule so the link fills the padded item\n // box and inherits its color — the whole row navigates, like Bootstrap. The\n // `--bs-dropdown-item-padding-*` tokens inherit out of the menu's shadow through\n // the flat tree (fallbacks cover standalone use).\n encapsulation: ViewEncapsulation.None,\n styles: [`\n .dropdown-item > a,\n .dropdown-item > button {\n display: block;\n width: auto;\n margin: calc(-1 * var(--bs-dropdown-item-padding-y, 0.25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));\n padding: var(--bs-dropdown-item-padding-y, 0.25rem) var(--bs-dropdown-item-padding-x, 1rem);\n color: inherit;\n text-decoration: none;\n text-align: inherit;\n background: none;\n border: 0;\n font: inherit;\n }\n /* Active route (routerLinkActive classes the ANCHOR, which ::slotted can't\n reach) — stock .dropdown-item.active look; the negative-margin fill above\n makes the anchor paint the FULL item row. */\n .dropdown-item > a.active,\n .dropdown-item > button.active {\n color: var(--bs-dropdown-link-active-color, #fff);\n background-color: var(--bs-dropdown-link-active-bg, var(--bs-primary));\n }\n `],\n})\nexport class BsDropdownMenuComponent {\n /**\n * `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).\n *\n * Aliased to `menuMode` so it never collides with the `mode` input of the\n * a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this\n * one element (same reason `bsCombobox` aliases its `autocomplete`).\n */\n readonly mode = input<DropdownMode>('menu', { alias: 'menuMode' });\n /** Pixel cap on the menu height; scrolls beyond. */\n readonly maxHeight = input<number>();\n /** Id of an external label, set as `aria-labelledby` on the WC's list. */\n\n /** Fires when an enabled item is activated (re-emits the WC's `select`). */\n readonly select = output<DropdownSelectEventDetail>();\n\n /** `max-height` attribute is numeric-or-absent; derive once via a signal. */\n protected readonly maxHeightAttr = computed(() => {\n const value = this.maxHeight();\n return value === undefined ? null : `${value}`;\n });\n\n\n protected onSelect(event: Event) {\n // The WC's `select` is a general-purpose DOM event (bubbles + composed).\n // The public Angular API is this typed `output()`, so consume the raw\n // event here. Without `stopPropagation` it keeps bubbling to the consumer's\n // `<bs-dropdown-menu>` host, where their `(select)` binding fires a\n // SECOND time with the raw `CustomEvent` (Angular doesn't unwrap `.detail`).\n event.stopPropagation();\n this.select.emit((event as CustomEvent<DropdownSelectEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-dropdown-menu> and friends; client-only\n // so SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/dropdown-menu');\n });\n }\n}\n","<mp-dropdown-menu bsForwardAria [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n","import { Directive, ElementRef, effect, inject, input } from '@angular/core';\n\n/**\n * `[bsDropdownItem]` — marks a plain `<li>` as a Bootstrap `.dropdown-item`\n * inside a `<bs-dropdown-menu>`. There is no per-item web component: the item is\n * light-DOM `<li>` slotted into `<mp-dropdown-menu>`, whose shadow styles the box\n * via `::slotted(.dropdown-item)`. A nested `<a>`/`<button>` (e.g. a `routerLink`)\n * is reset by the companion light-DOM stylesheet the menu wrapper ships.\n *\n * Usage: `<li bsDropdownItem><a routerLink=\"/x\">Action</a></li>`.\n *\n * Inputs:\n * - `active` — Bootstrap `.active` appearance (also drives `aria-selected` in\n * a `listbox` menu).\n * - `disabled` — non-interactive; removed from the menu's roving order.\n * - `value` — opaque value carried in the menu's `select` event detail;\n * assigned as a `value` property on the host `<li>` (the WC reads it).\n */\n@Directive({\n selector: '[bsDropdownItem]',\n host: {\n '[class.dropdown-item]': 'true',\n '[class.active]': 'active()',\n '[class.disabled]': 'disabled()',\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsDropdownItemDirective {\n readonly active = input(false);\n readonly disabled = input(false);\n /** Opaque value carried in the menu's `select` event detail. */\n readonly value = input<unknown>();\n\n constructor() {\n const el = inject<ElementRef<HTMLElement>>(ElementRef);\n effect(() => {\n (el.nativeElement as HTMLElement & { value?: unknown }).value = this.value();\n });\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownDivider]` — marks an element (typically an `<li>`) as a Bootstrap\n * `.dropdown-divider` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-divider)` rule. Usage: `<li bsDropdownDivider></li>`.\n */\n@Directive({\n selector: '[bsDropdownDivider]',\n host: {\n '[class.dropdown-divider]': 'true',\n role: 'separator',\n },\n})\nexport class BsDropdownDividerDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownHeader]` — marks an element (an `<li>` or a heading) as a Bootstrap\n * `.dropdown-header` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-header)` rule. Usage: `<li bsDropdownHeader>Section</li>`.\n */\n@Directive({\n selector: '[bsDropdownHeader]',\n host: {\n '[class.dropdown-header]': 'true',\n },\n})\nexport class BsDropdownHeaderDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;AAWG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAU,0BAA0B;;ACT9F;;;;;;;;;;;;;;;;;;;;;AAqBG;MAyCU,uBAAuB,CAAA;AAuBxB,IAAA,QAAQ,CAAC,KAAY,EAAA;;;;;;QAM7B,KAAK,CAAC,eAAe,EAAE;QACvB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAE,KAAgD,CAAC,MAAM,CAAC;IAC5E;AAEA,IAAA,WAAA,GAAA;AAhCA;;;;;;AAMG;QACM,IAAA,CAAA,IAAI,GAAG,KAAK,CAAe,MAAM,4EAAI,KAAK,EAAE,UAAU,EAAA,CAAG;;AAEzD,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAAU;;;QAI3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AC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,IAAI,EAAE;AACJ,wBAAA,0BAA0B,EAAE,MAAM;AAClC,wBAAA,IAAI,EAAE,WAAW;AAClB,qBAAA;AACF,iBAAA;;;ACXD;;;;AAIG;MAOU,yBAAyB,CAAA;8GAAzB,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBANrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oBAAoB;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,yBAAyB,EAAE,MAAM;AAClC,qBAAA;AACF,iBAAA;;;ACZD;;AAEG;;;;"}
1
+ {"version":3,"file":"mintplayer-ng-bootstrap-dropdown-menu.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/tokens/menu-context.token.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/dropdown-menu/dropdown-menu.component.html","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-item.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-divider.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/src/directives/dropdown-header.directive.ts","../../../../libs/mintplayer-ng-bootstrap/dropdown-menu/mintplayer-ng-bootstrap-dropdown-menu.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/**\n * DI marker meaning \"this content is authored inside a dropdown menu\".\n *\n * Provided by `BsDropdownMenuComponent` and `BsNavbarDropdownComponent`;\n * optionally injected by context-aware children (`bs-navbar-item`) to render\n * their `.dropdown-item` shape instead of their nav-link shape, so the same\n * item element works at every nesting level of a navbar.\n *\n * Element injectors follow the CONSUMER template's nesting (not the projection\n * site), so any `<bs-navbar-item>` written between the tags of either provider\n * sees the token — including content projected through `<ng-content>`.\n */\nexport const BS_DROPDOWN_MENU_CONTEXT = new InjectionToken<boolean>('BS_DROPDOWN_MENU_CONTEXT');\n","import { afterNextRender, ChangeDetectionStrategy, Component, computed, CUSTOM_ELEMENTS_SCHEMA, input, output, ViewEncapsulation } from '@angular/core';\nimport type { DropdownMode, DropdownSelectEventDetail } from '@mintplayer/web-components/dropdown-menu';\nimport { BS_DROPDOWN_MENU_CONTEXT } from '../tokens/menu-context.token';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\n/**\n * `<bs-dropdown-menu>` — Angular wrapper around the `<mp-dropdown-menu>` web\n * component. This is the single dropdown-menu implementation: it is used\n * standalone (projected through `*bsDropdownMenu` by the `[bsDropdown]` trigger\n * stack), inside `<bs-navbar>`, and as the listbox panel for the combobox /\n * typeahead (`mode=\"listbox\"`).\n *\n * Keyboard navigation, roving tabindex, the ARIA roles and the theme-aware\n * styling all live in the WC (single source of UI truth). This wrapper bridges\n * inputs to attributes and projects `[bsDropdownItem]` / `[bsDropdownDivider]` /\n * `[bsDropdownHeader]` `<li>`s into the WC's default slot.\n *\n * The WC is registered **client-side only** (`afterNextRender`); on the server\n * Angular emits a bare `<mp-dropdown-menu>` tag and the SSR layer injects its\n * Declarative Shadow DOM (see `injectMpDropdownDsd`), so it renders with JS off.\n *\n * This wrapper stays framework-agnostic of the `[bsDropdown]` trigger stack (it\n * lives in a sibling entry point). When projected as a combobox/listbox panel,\n * the consumer sets `mode=\"listbox\"` and mirrors the trigger's `menuId`/\n * `popupRole` onto this host (`[attr.id]`/`[attr.role]`) via the exported\n * `bsDropdown` reference — the same directive the toggle and combobox read.\n */\n@Component({\n selector: 'bs-dropdown-menu',\n templateUrl: './dropdown-menu.component.html',\n imports: [BsForwardAriaDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n // Marks content authored between these tags as \"inside a menu\" so\n // context-aware children (bs-navbar-item) render their dropdown-item shape.\n providers: [{ provide: BS_DROPDOWN_MENU_CONTEXT, useValue: true }],\n // The COMPANION light-DOM sheet: the one thing the menu's shadow `::slotted`\n // rules cannot reach is a nested `<a>`/`<button>` inside an item. Ship it as an\n // un-encapsulated (global, class-scoped) rule so the link fills the padded item\n // box and inherits its color — the whole row navigates, like Bootstrap. The\n // `--bs-dropdown-item-padding-*` tokens inherit out of the menu's shadow through\n // the flat tree (fallbacks cover standalone use).\n encapsulation: ViewEncapsulation.None,\n styles: [`\n .dropdown-item > a,\n .dropdown-item > button {\n display: block;\n width: auto;\n margin: calc(-1 * var(--bs-dropdown-item-padding-y, 0.25rem)) calc(-1 * var(--bs-dropdown-item-padding-x, 1rem));\n padding: var(--bs-dropdown-item-padding-y, 0.25rem) var(--bs-dropdown-item-padding-x, 1rem);\n color: inherit;\n text-decoration: none;\n text-align: inherit;\n background: none;\n border: 0;\n font: inherit;\n }\n /* Active route (routerLinkActive classes the ANCHOR, which ::slotted can't\n reach) — stock .dropdown-item.active look; the negative-margin fill above\n makes the anchor paint the FULL item row. */\n .dropdown-item > a.active,\n .dropdown-item > button.active {\n color: var(--bs-dropdown-link-active-color, #fff);\n background-color: var(--bs-dropdown-link-active-bg, var(--bs-primary));\n }\n `],\n})\nexport class BsDropdownMenuComponent {\n /**\n * `menu` (default, roving-tabindex nav) | `listbox` (consumer manages focus).\n *\n * Aliased to `menuMode` so it never collides with the `mode` input of the\n * a11y `bsRovingFocus` directive when a combobox/listbox stacks both on this\n * one element (same reason `bsCombobox` aliases its `autocomplete`).\n */\n readonly mode = input<DropdownMode>('menu', { alias: 'menuMode' });\n /** Pixel cap on the menu height; scrolls beyond. */\n readonly maxHeight = input<number>();\n /** Id of an external label, set as `aria-labelledby` on the WC's list. */\n\n /** Fires when an enabled item is activated (re-emits the WC's `select`). */\n readonly select = output<DropdownSelectEventDetail>();\n\n /** `max-height` attribute is numeric-or-absent; derive once via a signal. */\n protected readonly maxHeightAttr = computed(() => {\n const value = this.maxHeight();\n return value === undefined ? null : `${value}`;\n });\n\n\n protected onSelect(event: Event) {\n // The WC's `select` is a general-purpose DOM event (bubbles + composed).\n // The public Angular API is this typed `output()`, so consume the raw\n // event here. Without `stopPropagation` it keeps bubbling to the consumer's\n // `<bs-dropdown-menu>` host, where their `(select)` binding fires a\n // SECOND time with the raw `CustomEvent` (Angular doesn't unwrap `.detail`).\n event.stopPropagation();\n this.select.emit((event as CustomEvent<DropdownSelectEventDetail>).detail);\n }\n\n constructor() {\n afterNextRender(() => {\n // Side-effect import registers <mp-dropdown-menu> and friends; client-only\n // so SSR stays a bare tag for DSD injection.\n import('@mintplayer/web-components/dropdown-menu');\n });\n }\n}\n","<mp-dropdown-menu bsForwardAria [attr.mode]=\"mode()\" [attr.max-height]=\"maxHeightAttr()\" (select)=\"onSelect($event)\">\n <ng-content></ng-content>\n</mp-dropdown-menu>\n","import { Directive, ElementRef, effect, inject, input } from '@angular/core';\nimport type { DropdownItemElement } from '@mintplayer/web-components/dropdown-menu';\n\n/**\n * `[bsDropdownItem]` — marks a plain `<li>` as a Bootstrap `.dropdown-item`\n * inside a `<bs-dropdown-menu>`. There is no per-item web component: the item is\n * light-DOM `<li>` slotted into `<mp-dropdown-menu>`, whose shadow styles the box\n * via `::slotted(.dropdown-item)`. A nested `<a>`/`<button>` (e.g. a `routerLink`)\n * is reset by the companion light-DOM stylesheet the menu wrapper ships.\n *\n * Usage: `<li bsDropdownItem><a routerLink=\"/x\">Action</a></li>`.\n *\n * Inputs:\n * - `active` — Bootstrap `.active` appearance (also drives `aria-selected` in\n * a `listbox` menu).\n * - `disabled` — non-interactive; removed from the menu's roving order.\n * - `value` — opaque value carried in the menu's `select` event detail;\n * written to the host `<li>` as its `dropdownValue` property, which the WC\n * reads. Not the `value` property: `HTMLLIElement.value` is a native long\n * that turns an object or a string into 0.\n */\n@Directive({\n selector: '[bsDropdownItem]',\n host: {\n '[class.dropdown-item]': 'true',\n '[class.active]': 'active()',\n '[class.disabled]': 'disabled()',\n '[attr.aria-disabled]': \"disabled() ? 'true' : null\",\n },\n})\nexport class BsDropdownItemDirective {\n readonly active = input(false);\n readonly disabled = input(false);\n /** Opaque value carried in the menu's `select` event detail. */\n readonly value = input<unknown>();\n\n constructor() {\n const el = inject<ElementRef<DropdownItemElement>>(ElementRef);\n effect(() => {\n el.nativeElement.dropdownValue = this.value();\n });\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownDivider]` — marks an element (typically an `<li>`) as a Bootstrap\n * `.dropdown-divider` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-divider)` rule. Usage: `<li bsDropdownDivider></li>`.\n */\n@Directive({\n selector: '[bsDropdownDivider]',\n host: {\n '[class.dropdown-divider]': 'true',\n role: 'separator',\n },\n})\nexport class BsDropdownDividerDirective {}\n","import { Directive } from '@angular/core';\n\n/**\n * `[bsDropdownHeader]` — marks an element (an `<li>` or a heading) as a Bootstrap\n * `.dropdown-header` inside a `<bs-dropdown-menu>`. Styled by the menu shadow's\n * `::slotted(.dropdown-header)` rule. Usage: `<li bsDropdownHeader>Section</li>`.\n */\n@Directive({\n selector: '[bsDropdownHeader]',\n host: {\n '[class.dropdown-header]': 'true',\n },\n})\nexport class BsDropdownHeaderDirective {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAEA;;;;;;;;;;;AAWG;MACU,wBAAwB,GAAG,IAAI,cAAc,CAAU,0BAA0B;;ACT9F;;;;;;;;;;;;;;;;;;;;;AAqBG;MAyCU,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