@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.
- package/_bootstrap.scss +10 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs +6 -3
- package/fesm2022/mintplayer-ng-bootstrap-alert.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs +9 -11
- package/fesm2022/mintplayer-ng-bootstrap-button-type.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +3 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +36 -56
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +10 -18
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +13 -24
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +6 -15
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +5 -7
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +17 -6
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs +47 -50
- package/fesm2022/mintplayer-ng-bootstrap-context-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs +8 -5
- package/fesm2022/mintplayer-ng-bootstrap-copy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +160 -83
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +4 -2
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs +21 -7
- package/fesm2022/mintplayer-ng-bootstrap-dropdown.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs +19 -14
- package/fesm2022/mintplayer-ng-bootstrap-enhanced-paste.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs +15 -12
- package/fesm2022/mintplayer-ng-bootstrap-enum.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +3 -3
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs +16 -6
- package/fesm2022/mintplayer-ng-bootstrap-file-upload.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs +21 -4
- package/fesm2022/mintplayer-ng-bootstrap-modal.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs +26 -10
- package/fesm2022/mintplayer-ng-bootstrap-offcanvas.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +4 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +8 -11
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs +73 -67
- package/fesm2022/mintplayer-ng-bootstrap-priority-nav.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +4 -16
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +11 -22
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs +188 -249
- package/fesm2022/mintplayer-ng-bootstrap-resizable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +64 -146
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs +37 -30
- package/fesm2022/mintplayer-ng-bootstrap-scrollspy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +9 -25
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +6 -6
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +150 -83
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs +3 -0
- package/fesm2022/mintplayer-ng-bootstrap-tile-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +46 -44
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +2 -4
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs +63 -89
- package/fesm2022/mintplayer-ng-bootstrap-tooltip.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +6 -14
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +25 -56
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +1 -0
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs +47 -58
- package/fesm2022/mintplayer-ng-bootstrap-user-agent.mjs.map +1 -1
- package/package.json +2 -2
- package/types/mintplayer-ng-bootstrap-alert.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-button-type.d.ts +6 -6
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +0 -1
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-color-picker.d.ts +9 -3
- package/types/mintplayer-ng-bootstrap-context-menu.d.ts +8 -10
- package/types/mintplayer-ng-bootstrap-copy.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +56 -11
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +3 -1
- package/types/mintplayer-ng-bootstrap-dropdown.d.ts +3 -0
- package/types/mintplayer-ng-bootstrap-enhanced-paste.d.ts +6 -1
- package/types/mintplayer-ng-bootstrap-enum.d.ts +17 -4
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-file-upload.d.ts +7 -1
- package/types/mintplayer-ng-bootstrap-modal.d.ts +9 -1
- package/types/mintplayer-ng-bootstrap-offcanvas.d.ts +10 -1
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-priority-nav.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +2 -3
- package/types/mintplayer-ng-bootstrap-resizable.d.ts +65 -31
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +27 -21
- package/types/mintplayer-ng-bootstrap-scrollspy.d.ts +18 -2
- package/types/mintplayer-ng-bootstrap-select.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +2 -2
- package/types/mintplayer-ng-bootstrap-theming.d.ts +86 -54
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +27 -5
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +1 -1
- package/types/mintplayer-ng-bootstrap-tooltip.d.ts +18 -17
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +3 -4
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +4 -4
- package/types/mintplayer-ng-bootstrap-user-agent.d.ts +13 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-treeview.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-node-template/treeview-node-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/mintplayer-ng-bootstrap-treeview.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { TreeNode } from '@mintplayer/web-components/treeview';\n\n/**\n * Marks an `<ng-template>` as the per-node body renderer for `<bs-treeview>`.\n * The template's `$implicit` is the `TreeNode`; consumers can render arbitrary\n * Angular content (icons, badges, custom layout) per node.\n *\n * `mp-treeview` is a light-tier component: the nodes this template produces stay\n * in the document, so this component's own styles, the page's stylesheet and\n * Bootstrap's utility classes all reach them. (Before the light-DOM conversion\n * they were mounted into a shadow root, where none of that applied.)\n *\n * Example:\n * ```html\n * <bs-treeview [items]=\"nodes()\">\n * <ng-container *bsTreeviewNode=\"let node\">\n * <span [innerHTML]=\"iconFor(node)\"></span>\n * <strong>{{ node.label }}</strong>\n * @if (node.meta?.['badge']) {\n * <bs-badge [type]=\"colors.secondary\">{{ node.meta!['badge'] }}</bs-badge>\n * }\n * </ng-container>\n * </bs-treeview>\n * ```\n *\n * `<bs-badge>` rather than `<span class=\"badge\">`: the workspace's own\n * `_bootstrap.scss` ships only a subset of Bootstrap's partials and `badge` is\n * not among them, so a raw `.badge` class is unstyled on a stock setup. It\n * works, of course, in an app that loads the full framework.\n */\n@Directive({ selector: '[bsTreeviewNode]' })\nexport class BsTreeviewNodeTemplateDirective {\n readonly templateRef = inject<TemplateRef<{ $implicit: TreeNode }>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: BsTreeviewNodeTemplateDirective,\n ctx: unknown,\n ): ctx is { $implicit: TreeNode } {\n return true;\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n model,\n output,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport {\n MpTreeview,\n type IconResolver,\n type TreeNode,\n type TreeNodeCollapseEventDetail,\n type TreeNodeExpandEventDetail,\n type TreeNodeRenderer,\n type TreeNodeSelectEventDetail,\n type TreeviewSelectionMode,\n} from '@mintplayer/web-components/treeview';\n\n// Side-effect import: registers the `<mp-treeview>` custom element.\nimport '@mintplayer/web-components/treeview';\n\nimport { BsTreeviewNodeTemplateDirective } from '../treeview-node-template/treeview-node-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\n@Component({\n selector: 'bs-treeview',\n templateUrl: './treeview.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./treeview.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewComponent implements AfterViewInit {\n readonly items = input<TreeNode[]>([]);\n readonly expandedIds = model<string[]>([]);\n readonly selectedIds = model<string[]>([]);\n readonly selectionMode = input<TreeviewSelectionMode>('single');\n readonly hideBorders = input<boolean>(false);\n readonly iconResolver = input<IconResolver | undefined>(undefined);\n\n readonly nodeSelect = output<TreeNodeSelectEventDetail>();\n readonly nodeExpand = output<TreeNodeExpandEventDetail>();\n readonly nodeCollapse = output<TreeNodeCollapseEventDetail>();\n\n readonly treeviewRef = viewChild<ElementRef<MpTreeview>>('treeview');\n readonly nodeTemplate = contentChild(BsTreeviewNodeTemplateDirective);\n\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly viewCache = new Map<string, EmbeddedViewRef<{ $implicit: TreeNode }>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => {\n for (const view of this.viewCache.values()) view.destroy();\n this.viewCache.clear();\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.items = this.items();\n // Prune cached views for nodes that no longer exist.\n const liveIds = new Set<string>();\n const walk = (nodes: ReadonlyArray<TreeNode>) => {\n for (const n of nodes) {\n liveIds.add(n.id);\n if (n.children) walk(n.children);\n }\n };\n walk(this.items());\n for (const [id, view] of this.viewCache) {\n if (!liveIds.has(id)) {\n view.destroy();\n this.viewCache.delete(id);\n }\n }\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.expandedIds = this.expandedIds();\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.selectedIds = this.selectedIds();\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.selectionMode = this.selectionMode();\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.hideBorders = this.hideBorders();\n });\n\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n el.iconResolver = this.iconResolver();\n });\n\n // Wire nodeRenderer when a *bsTreeviewNode template is provided.\n effect(() => {\n const el = this.treeviewRef()?.nativeElement;\n if (!el) return;\n const tpl = this.nodeTemplate();\n if (!tpl) {\n el.nodeRenderer = undefined;\n // Destroy any stale views from a previous template.\n for (const view of this.viewCache.values()) view.destroy();\n this.viewCache.clear();\n return;\n }\n el.nodeRenderer = this.buildNodeRenderer(tpl);\n });\n }\n\n ngAfterViewInit(): void {\n // Effects above re-run as the view is created; nothing else needed.\n }\n\n private buildNodeRenderer(tpl: BsTreeviewNodeTemplateDirective): TreeNodeRenderer {\n return (node) => {\n let viewRef = this.viewCache.get(node.id);\n if (!viewRef) {\n viewRef = this.viewContainerRef.createEmbeddedView(tpl.templateRef, { $implicit: node });\n this.viewCache.set(node.id, viewRef);\n } else {\n viewRef.context.$implicit = node;\n }\n viewRef.detectChanges();\n const nodes = (viewRef.rootNodes as unknown[]).filter((n): n is Node => n instanceof Node);\n if (nodes.length === 0) return undefined;\n if (nodes.length === 1) return nodes[0];\n const fragment = document.createDocumentFragment();\n for (const n of nodes) fragment.appendChild(n);\n return fragment;\n };\n }\n\n onSelect(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeSelectEventDetail>).detail;\n this.selectedIds.set([...detail.selectedIds]);\n this.nodeSelect.emit(detail);\n }\n\n onExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeExpandEventDetail>).detail;\n this.expandedIds.set([...detail.expandedIds]);\n this.nodeExpand.emit(detail);\n }\n\n onCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeCollapseEventDetail>).detail;\n this.expandedIds.set([...detail.expandedIds]);\n this.nodeCollapse.emit(detail);\n }\n}\n","<mp-treeview bsForwardAria\n #treeview\n class=\"bs-treeview\"\n (tree-node-select)=\"onSelect($event)\"\n (tree-node-expand)=\"onExpand($event)\"\n (tree-node-collapse)=\"onCollapse($event)\"\n></mp-treeview>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAuC,WAAW,CAAC;AAQjF,IAAA;AANC,IAAA,OAAO,sBAAsB,CAC3B,IAAqC,EACrC,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;8GARW,+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,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA/B,+BAA+B,EAAA,UAAA,EAAA,CAAA;kBAD3C,SAAS;mBAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE;;;MCW9B,mBAAmB,CAAA;AAmB9B,IAAA,WAAA,GAAA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EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,UAAU,6FAC9B,+BAA+B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEvDtE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-treeview.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview-node-template/treeview-node-template.directive.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/treeview/treeview.component.html","../../../../libs/mintplayer-ng-bootstrap/treeview/mintplayer-ng-bootstrap-treeview.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { TreeNode } from '@mintplayer/web-components/treeview';\n\n/**\n * Marks an `<ng-template>` as the per-node body renderer for `<bs-treeview>`.\n * The template's `$implicit` is the `TreeNode`; consumers can render arbitrary\n * Angular content (icons, badges, custom layout) per node.\n *\n * `mp-treeview` is a light-tier component: the nodes this template produces stay\n * in the document, so this component's own styles, the page's stylesheet and\n * Bootstrap's utility classes all reach them. (Before the light-DOM conversion\n * they were mounted into a shadow root, where none of that applied.)\n *\n * Example:\n * ```html\n * <bs-treeview [items]=\"nodes()\">\n * <ng-container *bsTreeviewNode=\"let node\">\n * <span [innerHTML]=\"iconFor(node)\"></span>\n * <strong>{{ node.label }}</strong>\n * @if (node.meta?.['badge']) {\n * <bs-badge [type]=\"colors.secondary\">{{ node.meta!['badge'] }}</bs-badge>\n * }\n * </ng-container>\n * </bs-treeview>\n * ```\n *\n * `<bs-badge>` rather than `<span class=\"badge\">`: the workspace's own\n * `_bootstrap.scss` ships only a subset of Bootstrap's partials and `badge` is\n * not among them, so a raw `.badge` class is unstyled on a stock setup. It\n * works, of course, in an app that loads the full framework.\n */\n@Directive({ selector: '[bsTreeviewNode]' })\nexport class BsTreeviewNodeTemplateDirective {\n readonly templateRef = inject<TemplateRef<{ $implicit: TreeNode }>>(TemplateRef);\n\n static ngTemplateContextGuard(\n _dir: BsTreeviewNodeTemplateDirective,\n ctx: unknown,\n ): ctx is { $implicit: TreeNode } {\n return true;\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n inject,\n input,\n model,\n output,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport {\n MpTreeview,\n type IconResolver,\n type TreeNode,\n type TreeNodeCollapseEventDetail,\n type TreeNodeExpandEventDetail,\n type TreeNodeRenderer,\n type TreeNodeSelectEventDetail,\n type TreeviewSelectionMode,\n} from '@mintplayer/web-components/treeview';\n\n// Side-effect import: registers the `<mp-treeview>` custom element.\nimport '@mintplayer/web-components/treeview';\n\nimport { BsTreeviewNodeTemplateDirective } from '../treeview-node-template/treeview-node-template.directive';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\n@Component({\n selector: 'bs-treeview',\n templateUrl: './treeview.component.html',\n imports: [BsForwardAriaDirective],\n styleUrls: ['./treeview.component.scss'],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewComponent {\n readonly items = input<TreeNode[]>([]);\n readonly expandedIds = model<string[]>([]);\n readonly selectedIds = model<string[]>([]);\n readonly selectionMode = input<TreeviewSelectionMode>('single');\n readonly hideBorders = input<boolean>(false);\n readonly iconResolver = input<IconResolver | undefined>(undefined);\n\n readonly nodeSelect = output<TreeNodeSelectEventDetail>();\n readonly nodeExpand = output<TreeNodeExpandEventDetail>();\n readonly nodeCollapse = output<TreeNodeCollapseEventDetail>();\n\n readonly treeviewRef = viewChild.required<ElementRef<MpTreeview>>('treeview');\n readonly nodeTemplate = contentChild(BsTreeviewNodeTemplateDirective);\n\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly viewCache = new Map<string, EmbeddedViewRef<{ $implicit: TreeNode }>>();\n\n constructor() {\n this.destroyRef.onDestroy(() => this.destroyCachedViews());\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.items = this.items();\n // Prune cached views for nodes that no longer exist.\n const ids = (nodes: ReadonlyArray<TreeNode>): string[] =>\n nodes.flatMap((n) => [n.id, ...ids(n.children ?? [])]);\n const liveIds = new Set(ids(this.items()));\n [...this.viewCache.entries()]\n .filter(([id]) => !liveIds.has(id))\n .map(([id, view]) => {\n view.destroy();\n this.viewCache.delete(id);\n });\n });\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.expandedIds = this.expandedIds();\n });\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.selectedIds = this.selectedIds();\n });\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.selectionMode = this.selectionMode();\n });\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.hideBorders = this.hideBorders();\n });\n\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n el.iconResolver = this.iconResolver();\n });\n\n // Wire nodeRenderer when a *bsTreeviewNode template is provided.\n effect(() => {\n const el = this.treeviewRef().nativeElement;\n const tpl = this.nodeTemplate();\n // Views cached for a previous template would keep rendering ITS markup: drop them.\n this.destroyCachedViews();\n el.nodeRenderer = tpl ? this.buildNodeRenderer(tpl) : undefined;\n });\n }\n\n private buildNodeRenderer(tpl: BsTreeviewNodeTemplateDirective): TreeNodeRenderer {\n return (node) => {\n let viewRef = this.viewCache.get(node.id);\n if (!viewRef) {\n viewRef = this.viewContainerRef.createEmbeddedView(tpl.templateRef, { $implicit: node });\n this.viewCache.set(node.id, viewRef);\n } else {\n viewRef.context.$implicit = node;\n }\n viewRef.detectChanges();\n const nodes = (viewRef.rootNodes as unknown[]).filter((n): n is Node => n instanceof Node);\n if (nodes.length === 0) return undefined;\n if (nodes.length === 1) return nodes[0];\n const fragment = document.createDocumentFragment();\n fragment.append(...nodes);\n return fragment;\n };\n }\n\n private destroyCachedViews(): void {\n [...this.viewCache.values()].map((view) => view.destroy());\n this.viewCache.clear();\n }\n\n onSelect(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeSelectEventDetail>).detail;\n this.selectedIds.set([...detail.selectedIds]);\n this.nodeSelect.emit(detail);\n }\n\n onExpand(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeExpandEventDetail>).detail;\n this.expandedIds.set([...detail.expandedIds]);\n this.nodeExpand.emit(detail);\n }\n\n onCollapse(event: Event): void {\n const detail = (event as CustomEvent<TreeNodeCollapseEventDetail>).detail;\n this.expandedIds.set([...detail.expandedIds]);\n this.nodeCollapse.emit(detail);\n }\n}\n","<mp-treeview bsForwardAria\n #treeview\n class=\"bs-treeview\"\n (tree-node-select)=\"onSelect($event)\"\n (tree-node-expand)=\"onExpand($event)\"\n (tree-node-collapse)=\"onCollapse($event)\"\n></mp-treeview>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BG;MAEU,+BAA+B,CAAA;AAD5C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAuC,WAAW,CAAC;AAQjF,IAAA;AANC,IAAA,OAAO,sBAAsB,CAC3B,IAAqC,EACrC,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;8GARW,+BAA+B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAA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IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,cAAA,CAAA,EAAA,CAAA,EAAA,WAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,UAAU,6FACvC,+BAA+B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEtDtE;;AAEG;;;;"}
|
|
@@ -29,6 +29,7 @@ class BsTypeaheadComponent {
|
|
|
29
29
|
...(ngDevMode ? [{ debugName: "showNoSuggestions" }] : /* istanbul ignore next */ []));
|
|
30
30
|
this.textbox = viewChild.required('textbox', /* @ts-ignore */
|
|
31
31
|
...(ngDevMode ? [{ debugName: "textbox" }] : /* istanbul ignore next */ []));
|
|
32
|
+
// Optional on purpose: it lives in the dropdown menu, which renders only while open.
|
|
32
33
|
this.rovingFocus = viewChild(BsRovingFocusDirective, /* @ts-ignore */
|
|
33
34
|
...(ngDevMode ? [{ debugName: "rovingFocus" }] : /* istanbul ignore next */ []));
|
|
34
35
|
this.searchterm = model('', /* @ts-ignore */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, signal, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BsLiveAnnouncerService, BsRovingFocusDirective, BsRovingFocusItemDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsComboboxDirective, BsDropdownDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuComponent, BsDropdownItemDirective } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';\n\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n styleUrls: ['./typeahead.component.scss'],\n imports: [\n FormsModule,\n BsFormComponent, BsFormControlDirective,\n BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemDirective,\n BsComboboxDirective,\n BsRovingFocusDirective, BsRovingFocusItemDirective,\n BsProgressComponent, BsHasOverlayComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTypeaheadComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n isOpen = model(false);\n\n /**\n * Accessible name for the text input. Optional — a consumer wrapping the\n * typeahead in bs-floating-label gets a real <label> association instead —\n * but without either the control is unnamed.\n */\n inputLabel = input<string | null>(null);\n\n suggestions = input<any[]>([]);\n isLoading = signal<boolean>(false);\n showNoSuggestions = computed(() => this.suggestions().length === 0);\n\n readonly textbox = viewChild.required<ElementRef<HTMLInputElement>>('textbox');\n readonly rovingFocus = viewChild(BsRovingFocusDirective);\n searchterm = model('');\n isLoadingText = input('Loading...');\n noSuggestionsText = input('No suggestions found');\n resultsAnnouncementSingular = input<string>('1 result found');\n resultsAnnouncementPlural = input<(count: number) => string>((count) => `${count} results found`);\n provideSuggestions = output<string>();\n suggestionSelected = output<any>();\n submitted = output<string>();\n\n private requestInFlight = false;\n\n constructor() {\n effect(() => {\n const suggestions = this.suggestions();\n if (suggestions) {\n this.isLoading.set(false);\n if (this.requestInFlight) {\n this.requestInFlight = false;\n this.announceResults(suggestions.length);\n }\n }\n });\n }\n\n private announceResults(count: number) {\n if (count === 0) {\n this.announcer.announce(this.noSuggestionsText());\n } else if (count === 1) {\n this.announcer.announce(this.resultsAnnouncementSingular());\n } else {\n this.announcer.announce(this.resultsAnnouncementPlural()(count));\n }\n }\n\n onProvideSuggestions(value: string) {\n this.searchterm.set(value);\n if (value === '') {\n this.isOpen.set(false);\n this.requestInFlight = false;\n } else {\n this.requestInFlight = true;\n this.isLoading.set(true);\n this.isOpen.set(true);\n this.provideSuggestions.emit(value);\n }\n }\n\n suggestionClicked(suggestion: any) {\n this.searchterm.set(suggestion.text);\n this.isOpen.set(false);\n this.suggestionSelected.emit(suggestion);\n }\n\n onActivate() {\n const rf = this.rovingFocus();\n if (!rf) return;\n const suggestion = this.suggestions()[rf.activeIndex()];\n if (suggestion) {\n this.suggestionClicked(suggestion);\n }\n }\n\n onCancel() {\n // dropdown was already closed by bsCombobox; no extra work needed\n }\n\n onSubmit(event?: Event) {\n // Suppress browser form-submit; we own the Enter semantics here.\n event?.preventDefault();\n this.isOpen.set(false);\n this.submitted.emit(this.searchterm());\n }\n\n public focus() {\n this.textbox().nativeElement.focus();\n }\n}\n","<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown #dd=\"bsDropdown\" popupRole=\"listbox\" [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\">\n <input type=\"text\"\n #textbox\n [attr.aria-label]=\"inputLabel()\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n bsCombobox\n (activate)=\"onActivate()\"\n (cancel)=\"onCancel()\"\n (keydown.enter)=\"onSubmit($event)\"\n autocomplete=\"off\" />\n <!--\n `mode=\"activedescendant\"` drives the a11y `bsRovingFocus` primitive;\n `menuMode=\"listbox\"` drives the WC-backed `bs-dropdown-menu`. Both\n directives sit on this one element (so roving's `contentChildren` finds\n the option `<li>`s as direct children) — the menu's mode input is aliased\n to `menuMode` precisely so it doesn't clobber roving's `mode`. The menu\n also mirrors the trigger's generated id + popup role (the `aria-controls`\n target) via the exported `bsDropdown` reference.\n -->\n <bs-dropdown-menu *bsDropdownMenu bsRovingFocus mode=\"activedescendant\" menuMode=\"listbox\"\n [attr.id]=\"dd.menuId() || null\" [attr.role]=\"dd.popupRole()\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li bsDropdownItem [disabled]=\"true\">\n {{ isLoadingText() }}\n </li>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <li bsDropdownItem [disabled]=\"true\">\n {{ noSuggestionsText() }}\n </li>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <li bsDropdownItem bsRovingFocusItem (click)=\"suggestionClicked(suggestion)\">\n {{ suggestion.text }}\n </li>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,oBAAoB,CAAA;AA6B/B,IAAA,WAAA,GAAA;AA5BQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAElD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK;mFAAC;AAErB;;;;AAIG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAgB,IAAI;uFAAC;QAEvC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAQ,EAAE;wFAAC;QAC9B,IAAA,CAAA,SAAS,GAAG,MAAM,CAAU,KAAK;sFAAC;AAClC,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC;8FAAC;AAE1D,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA+B,SAAS;oFAAC;QACrE,IAAA,CAAA,WAAW,GAAG,SAAS,CAAC,sBAAsB;wFAAC;QACxD,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE;uFAAC;QACtB,IAAA,CAAA,aAAa,GAAG,KAAK,CAAC,YAAY;0FAAC;QACnC,IAAA,CAAA,iBAAiB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AAA,EAAA,CAAA,EAAA,2BAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AExCzD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-typeahead.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.ts","../../../../libs/mintplayer-ng-bootstrap/typeahead/src/typeahead.component.html","../../../../libs/mintplayer-ng-bootstrap/typeahead/mintplayer-ng-bootstrap-typeahead.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, effect, ElementRef, inject, input, model, output, signal, viewChild } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { BsLiveAnnouncerService, BsRovingFocusDirective, BsRovingFocusItemDirective } from '@mintplayer/ng-bootstrap/a11y';\nimport { BsComboboxDirective, BsDropdownDirective, BsDropdownMenuDirective } from '@mintplayer/ng-bootstrap/dropdown';\nimport { BsDropdownMenuComponent, BsDropdownItemDirective } from '@mintplayer/ng-bootstrap/dropdown-menu';\nimport { BsFormComponent, BsFormControlDirective } from '@mintplayer/ng-bootstrap/form';\nimport { BsHasOverlayComponent } from '@mintplayer/ng-bootstrap/has-overlay';\nimport { BsProgressComponent } from '@mintplayer/ng-bootstrap/progress-bar';\n\n@Component({\n selector: 'bs-typeahead',\n templateUrl: './typeahead.component.html',\n styleUrls: ['./typeahead.component.scss'],\n imports: [\n FormsModule,\n BsFormComponent, BsFormControlDirective,\n BsDropdownDirective, BsDropdownMenuDirective, BsDropdownMenuComponent, BsDropdownItemDirective,\n BsComboboxDirective,\n BsRovingFocusDirective, BsRovingFocusItemDirective,\n BsProgressComponent, BsHasOverlayComponent,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTypeaheadComponent {\n private announcer = inject(BsLiveAnnouncerService);\n\n isOpen = model(false);\n\n /**\n * Accessible name for the text input. Optional — a consumer wrapping the\n * typeahead in bs-floating-label gets a real <label> association instead —\n * but without either the control is unnamed.\n */\n inputLabel = input<string | null>(null);\n\n suggestions = input<any[]>([]);\n isLoading = signal<boolean>(false);\n showNoSuggestions = computed(() => this.suggestions().length === 0);\n\n readonly textbox = viewChild.required<ElementRef<HTMLInputElement>>('textbox');\n // Optional on purpose: it lives in the dropdown menu, which renders only while open.\n readonly rovingFocus = viewChild(BsRovingFocusDirective);\n searchterm = model('');\n isLoadingText = input('Loading...');\n noSuggestionsText = input('No suggestions found');\n resultsAnnouncementSingular = input<string>('1 result found');\n resultsAnnouncementPlural = input<(count: number) => string>((count) => `${count} results found`);\n provideSuggestions = output<string>();\n suggestionSelected = output<any>();\n submitted = output<string>();\n\n private requestInFlight = false;\n\n constructor() {\n effect(() => {\n const suggestions = this.suggestions();\n if (suggestions) {\n this.isLoading.set(false);\n if (this.requestInFlight) {\n this.requestInFlight = false;\n this.announceResults(suggestions.length);\n }\n }\n });\n }\n\n private announceResults(count: number) {\n if (count === 0) {\n this.announcer.announce(this.noSuggestionsText());\n } else if (count === 1) {\n this.announcer.announce(this.resultsAnnouncementSingular());\n } else {\n this.announcer.announce(this.resultsAnnouncementPlural()(count));\n }\n }\n\n onProvideSuggestions(value: string) {\n this.searchterm.set(value);\n if (value === '') {\n this.isOpen.set(false);\n this.requestInFlight = false;\n } else {\n this.requestInFlight = true;\n this.isLoading.set(true);\n this.isOpen.set(true);\n this.provideSuggestions.emit(value);\n }\n }\n\n suggestionClicked(suggestion: any) {\n this.searchterm.set(suggestion.text);\n this.isOpen.set(false);\n this.suggestionSelected.emit(suggestion);\n }\n\n onActivate() {\n const rf = this.rovingFocus();\n if (!rf) return;\n const suggestion = this.suggestions()[rf.activeIndex()];\n if (suggestion) {\n this.suggestionClicked(suggestion);\n }\n }\n\n onCancel() {\n // dropdown was already closed by bsCombobox; no extra work needed\n }\n\n onSubmit(event?: Event) {\n // Suppress browser form-submit; we own the Enter semantics here.\n event?.preventDefault();\n this.isOpen.set(false);\n this.submitted.emit(this.searchterm());\n }\n\n public focus() {\n this.textbox().nativeElement.focus();\n }\n}\n","<bs-has-overlay></bs-has-overlay>\n<bs-form>\n <div bsDropdown #dd=\"bsDropdown\" popupRole=\"listbox\" [(isOpen)]=\"isOpen\" [hasBackdrop]=\"false\" [sameDropdownWidth]=\"true\">\n <input type=\"text\"\n #textbox\n [attr.aria-label]=\"inputLabel()\"\n [ngModel]=\"searchterm()\"\n (ngModelChange)=\"onProvideSuggestions($event)\"\n bsCombobox\n (activate)=\"onActivate()\"\n (cancel)=\"onCancel()\"\n (keydown.enter)=\"onSubmit($event)\"\n autocomplete=\"off\" />\n <!--\n `mode=\"activedescendant\"` drives the a11y `bsRovingFocus` primitive;\n `menuMode=\"listbox\"` drives the WC-backed `bs-dropdown-menu`. Both\n directives sit on this one element (so roving's `contentChildren` finds\n the option `<li>`s as direct children) — the menu's mode input is aliased\n to `menuMode` precisely so it doesn't clobber roving's `mode`. The menu\n also mirrors the trigger's generated id + popup role (the `aria-controls`\n target) via the exported `bsDropdown` reference.\n -->\n <bs-dropdown-menu *bsDropdownMenu bsRovingFocus mode=\"activedescendant\" menuMode=\"listbox\"\n [attr.id]=\"dd.menuId() || null\" [attr.role]=\"dd.popupRole()\">\n @if (isLoading()) {\n <bs-progress [height]=\"2\" [isIndeterminate]=\"true\"></bs-progress>\n <li bsDropdownItem [disabled]=\"true\">\n {{ isLoadingText() }}\n </li>\n }\n @if (!isLoading()) {\n @if (showNoSuggestions()) {\n <li bsDropdownItem [disabled]=\"true\">\n {{ noSuggestionsText() }}\n </li>\n }\n @for (suggestion of suggestions(); track suggestion) {\n <li bsDropdownItem bsRovingFocusItem (click)=\"suggestionClicked(suggestion)\">\n {{ suggestion.text }}\n </li>\n }\n }\n </bs-dropdown-menu>\n </div>\n</bs-form>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAuBa,oBAAoB,CAAA;AA8B/B,IAAA,WAAA,GAAA;AA7BQ,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,sBAAsB,CAAC;QAElD,IAAA,CAAA,MAAM,GAAG,KAAK,CAAC,KAAK;mFAAC;AAErB;;;;AAIG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAgB,IAAI;uFAAC;QAEvC,IAAA,CAAA,WAAW,GAAG,KAAK,CAAQ,EAAE;wFAAC;QAC9B,IAAA,CAAA,SAAS,GAAG,MAAM,CAAU,KAAK;sFAAC;AAClC,QAAA,IAAA,CAAA,iBAAiB,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,MAAM,KAAK,CAAC;8FAAC;AAE1D,QAAA,IAAA,CAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA+B,SAAS;oFAAC;;QAErE,IAAA,CAAA,WAAW,GAAG,SAAS,CAAC,sBAAsB;wFAAC;QACxD,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE;uFAAC;QACtB,IAAA,CAAA,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IAAA,EAAA,KAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,2BAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,6BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,yBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,MAAA,EAAA,IAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AEzCzD;;AAEG;;;;"}
|
|
@@ -2,93 +2,82 @@ import { isPlatformServer } from '@angular/common';
|
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, PLATFORM_ID, DestroyRef, output, Directive } from '@angular/core';
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* The browser a user-agent string names. Order matters: Opera and Edge also claim Chrome,
|
|
7
|
+
* and Chrome also claims Safari.
|
|
8
|
+
*/
|
|
9
|
+
function detectBrowser(userAgent) {
|
|
10
|
+
if (/opr\//i.test(userAgent))
|
|
11
|
+
return 'Opera';
|
|
12
|
+
if (/edg/i.test(userAgent))
|
|
13
|
+
return 'Edge';
|
|
14
|
+
if (/chrome|chromium|crios/i.test(userAgent))
|
|
15
|
+
return 'Chrome';
|
|
16
|
+
if (/firefox|fxios/i.test(userAgent))
|
|
17
|
+
return 'Firefox';
|
|
18
|
+
if (/safari/i.test(userAgent))
|
|
19
|
+
return 'Safari';
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
/** The operating system a user-agent string names, when it is one this directive marks. */
|
|
23
|
+
function detectOperatingSystem(userAgent) {
|
|
24
|
+
if (/Android/i.test(userAgent))
|
|
25
|
+
return 'Android';
|
|
26
|
+
if (/iPhone|iPad|iPod/i.test(userAgent))
|
|
27
|
+
return 'iOS';
|
|
28
|
+
if (/Windows/i.test(userAgent))
|
|
29
|
+
return 'Windows';
|
|
30
|
+
return undefined;
|
|
31
|
+
}
|
|
5
32
|
class BsUserAgentDirective {
|
|
6
33
|
constructor() {
|
|
7
|
-
this.
|
|
34
|
+
this.isServer = isPlatformServer(inject(PLATFORM_ID));
|
|
8
35
|
this.destroyRef = inject(DestroyRef);
|
|
9
36
|
this.detected = output();
|
|
10
37
|
}
|
|
38
|
+
/** There is no user agent on the server: nothing is detected, nothing is marked. */
|
|
39
|
+
get userAgent() {
|
|
40
|
+
return this.isServer ? '' : navigator.userAgent;
|
|
41
|
+
}
|
|
42
|
+
get os() {
|
|
43
|
+
return detectOperatingSystem(this.userAgent);
|
|
44
|
+
}
|
|
11
45
|
get isAndroid() {
|
|
12
|
-
return
|
|
46
|
+
return this.os === 'Android';
|
|
13
47
|
}
|
|
14
48
|
get isIos() {
|
|
15
|
-
return
|
|
49
|
+
return this.os === 'iOS';
|
|
16
50
|
}
|
|
17
51
|
get isWindows() {
|
|
18
|
-
return
|
|
52
|
+
return this.os === 'Windows';
|
|
19
53
|
}
|
|
20
54
|
get browserClass() {
|
|
21
|
-
const browser = this.
|
|
22
|
-
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
return `browser-${browser.toLowerCase()}`;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
getBrowser() {
|
|
30
|
-
if (!isPlatformServer(this.platformId) && !!navigator) {
|
|
31
|
-
const userAgent = navigator.userAgent;
|
|
32
|
-
if (userAgent.match(/opr\//i)) {
|
|
33
|
-
return 'Opera';
|
|
34
|
-
}
|
|
35
|
-
else if (userAgent.match(/edg/i)) {
|
|
36
|
-
return 'Edge';
|
|
37
|
-
}
|
|
38
|
-
else if (userAgent.match(/chrome|chromium|crios/i)) {
|
|
39
|
-
return 'Chrome';
|
|
40
|
-
}
|
|
41
|
-
else if (userAgent.match(/firefox|fxios/i)) {
|
|
42
|
-
return 'Firefox';
|
|
43
|
-
}
|
|
44
|
-
else if (userAgent.match(/safari/i)) {
|
|
45
|
-
return 'Safari';
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return undefined;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
else {
|
|
52
|
-
return undefined;
|
|
53
|
-
}
|
|
55
|
+
const browser = detectBrowser(this.userAgent);
|
|
56
|
+
return browser ? `browser-${browser.toLowerCase()}` : null;
|
|
54
57
|
}
|
|
55
58
|
ngAfterViewInit() {
|
|
56
59
|
// UA detection is meaningless on the server (no `navigator`), and the
|
|
57
60
|
// setTimeout-then-emit pattern races prerender teardown — the macrotask
|
|
58
61
|
// can fire after Angular destroys the application, hitting NG0953 on
|
|
59
62
|
// every prerendered route.
|
|
60
|
-
if (
|
|
63
|
+
if (this.isServer)
|
|
61
64
|
return;
|
|
62
65
|
const handle = setTimeout(() => {
|
|
63
|
-
|
|
64
|
-
let webbrowser = this.getBrowser();
|
|
65
|
-
if (this.isAndroid) {
|
|
66
|
-
os = 'Android';
|
|
67
|
-
}
|
|
68
|
-
else if (this.isIos) {
|
|
69
|
-
os = 'iOS';
|
|
70
|
-
}
|
|
71
|
-
else if (this.isWindows) {
|
|
72
|
-
os = 'Windows';
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
os = undefined;
|
|
76
|
-
}
|
|
77
|
-
this.detected.emit({ os, webbrowser });
|
|
66
|
+
this.detected.emit({ os: this.os, webbrowser: detectBrowser(this.userAgent) });
|
|
78
67
|
});
|
|
79
68
|
this.destroyRef.onDestroy(() => clearTimeout(handle));
|
|
80
69
|
}
|
|
81
70
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsUserAgentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
82
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsUserAgentDirective, isStandalone: true, selector: "[bsUserAgent]", outputs: { detected: "detected" }, host: { properties: { "class.os-android": "
|
|
71
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsUserAgentDirective, isStandalone: true, selector: "[bsUserAgent]", outputs: { detected: "detected" }, host: { properties: { "class.os-android": "os === \"Android\"", "class.os-ios": "os === \"iOS\"", "class.os-windows": "os === \"Windows\"", "class": "browserClass" } }, ngImport: i0 }); }
|
|
83
72
|
}
|
|
84
73
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsUserAgentDirective, decorators: [{
|
|
85
74
|
type: Directive,
|
|
86
75
|
args: [{
|
|
87
76
|
selector: '[bsUserAgent]',
|
|
88
77
|
host: {
|
|
89
|
-
'[class.os-android]': '
|
|
90
|
-
'[class.os-ios]': '
|
|
91
|
-
'[class.os-windows]': '
|
|
78
|
+
'[class.os-android]': 'os === "Android"',
|
|
79
|
+
'[class.os-ios]': 'os === "iOS"',
|
|
80
|
+
'[class.os-windows]': 'os === "Windows"',
|
|
92
81
|
'[class]': 'browserClass',
|
|
93
82
|
},
|
|
94
83
|
}]
|
|
@@ -98,5 +87,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImpor
|
|
|
98
87
|
* Generated bundle index. Do not edit.
|
|
99
88
|
*/
|
|
100
89
|
|
|
101
|
-
export { BsUserAgentDirective };
|
|
90
|
+
export { BsUserAgentDirective, detectBrowser, detectOperatingSystem };
|
|
102
91
|
//# sourceMappingURL=mintplayer-ng-bootstrap-user-agent.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-user-agent.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/user-agent/src/directive/user-agent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/user-agent/mintplayer-ng-bootstrap-user-agent.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { AfterViewInit, DestroyRef, Directive, inject, output, PLATFORM_ID } from '@angular/core';\nimport { BsUserAgent } from '../interfaces/user-agent';\nimport { BsOperatingSystem } from '../types/operating-system.type';\nimport { BsWebbrowser } from '../types/webbrowser.type';\n\n@Directive({\n selector: '[bsUserAgent]',\n host: {\n '[class.os-android]': '
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-user-agent.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/user-agent/src/directive/user-agent.directive.ts","../../../../libs/mintplayer-ng-bootstrap/user-agent/mintplayer-ng-bootstrap-user-agent.ts"],"sourcesContent":["import { isPlatformServer } from '@angular/common';\nimport { AfterViewInit, DestroyRef, Directive, inject, output, PLATFORM_ID } from '@angular/core';\nimport { BsUserAgent } from '../interfaces/user-agent';\nimport { BsOperatingSystem } from '../types/operating-system.type';\nimport { BsWebbrowser } from '../types/webbrowser.type';\n\n/**\n * The browser a user-agent string names. Order matters: Opera and Edge also claim Chrome,\n * and Chrome also claims Safari.\n */\nexport function detectBrowser(userAgent: string): BsWebbrowser | undefined {\n if (/opr\\//i.test(userAgent)) return 'Opera';\n if (/edg/i.test(userAgent)) return 'Edge';\n if (/chrome|chromium|crios/i.test(userAgent)) return 'Chrome';\n if (/firefox|fxios/i.test(userAgent)) return 'Firefox';\n if (/safari/i.test(userAgent)) return 'Safari';\n return undefined;\n}\n\n/** The operating system a user-agent string names, when it is one this directive marks. */\nexport function detectOperatingSystem(userAgent: string): BsOperatingSystem | undefined {\n if (/Android/i.test(userAgent)) return 'Android';\n if (/iPhone|iPad|iPod/i.test(userAgent)) return 'iOS';\n if (/Windows/i.test(userAgent)) return 'Windows';\n return undefined;\n}\n\n@Directive({\n selector: '[bsUserAgent]',\n host: {\n '[class.os-android]': 'os === \"Android\"',\n '[class.os-ios]': 'os === \"iOS\"',\n '[class.os-windows]': 'os === \"Windows\"',\n '[class]': 'browserClass',\n },\n})\nexport class BsUserAgentDirective implements AfterViewInit {\n private readonly isServer = isPlatformServer(inject(PLATFORM_ID));\n private readonly destroyRef = inject(DestroyRef);\n\n /** There is no user agent on the server: nothing is detected, nothing is marked. */\n private get userAgent(): string {\n return this.isServer ? '' : navigator.userAgent;\n }\n\n get os(): BsOperatingSystem | undefined {\n return detectOperatingSystem(this.userAgent);\n }\n\n get isAndroid() {\n return this.os === 'Android';\n }\n\n get isIos() {\n return this.os === 'iOS';\n }\n\n get isWindows() {\n return this.os === 'Windows';\n }\n\n get browserClass() {\n const browser = detectBrowser(this.userAgent);\n return browser ? `browser-${browser.toLowerCase()}` : null;\n }\n\n ngAfterViewInit() {\n // UA detection is meaningless on the server (no `navigator`), and the\n // setTimeout-then-emit pattern races prerender teardown — the macrotask\n // can fire after Angular destroys the application, hitting NG0953 on\n // every prerendered route.\n if (this.isServer) return;\n\n const handle = setTimeout(() => {\n this.detected.emit({ os: this.os, webbrowser: detectBrowser(this.userAgent) });\n });\n this.destroyRef.onDestroy(() => clearTimeout(handle));\n }\n\n readonly detected = output<BsUserAgent>();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAMA;;;AAGG;AACG,SAAU,aAAa,CAAC,SAAiB,EAAA;AAC7C,IAAA,IAAI,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC;AAAE,QAAA,OAAO,OAAO;AAC5C,IAAA,IAAI,MAAM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,EAAE,kBAAkB;AACxC,wBAAA,gBAAgB,EAAE,cAAc;AAChC,wBAAA,oBAAoB,EAAE,kBAAkB;AACxC,wBAAA,SAAS,EAAE,cAAc;AAC1B,qBAAA;AACF,iBAAA;;;ACnCD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-bootstrap",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "22.
|
|
4
|
+
"version": "22.21.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -424,7 +424,7 @@
|
|
|
424
424
|
"@mintplayer/ng-animations": "^22.0.0",
|
|
425
425
|
"@mintplayer/pagination": "^2.3.0",
|
|
426
426
|
"@mintplayer/ng-focus-on-load": "^22.0.0",
|
|
427
|
-
"@mintplayer/web-components": "^2.
|
|
427
|
+
"@mintplayer/web-components": "^2.18.0",
|
|
428
428
|
"lit": "^3.3.0"
|
|
429
429
|
},
|
|
430
430
|
"dependencies": {
|
|
@@ -24,9 +24,11 @@ declare class BsAlertComponent {
|
|
|
24
24
|
|
|
25
25
|
declare class BsAlertCloseComponent {
|
|
26
26
|
private alert;
|
|
27
|
+
/** Accessible name of the icon-only close button. Override to translate. */
|
|
28
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
27
29
|
closeAlert(): boolean;
|
|
28
30
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsAlertCloseComponent, never>;
|
|
29
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsAlertCloseComponent, "bs-alert-close", never, {}, {}, never, never, true, never>;
|
|
31
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsAlertCloseComponent, "bs-alert-close", never, { "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
export { BsAlertCloseComponent, BsAlertComponent };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { Color } from '@mintplayer/ng-bootstrap';
|
|
3
3
|
|
|
4
4
|
declare class BsButtonTypeDirective {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
static ɵfac:
|
|
9
|
-
static ɵdir:
|
|
5
|
+
readonly color: _angular_core.InputSignal<Color | undefined>;
|
|
6
|
+
/** Derived, not written from an effect: clearing the colour must restore the transparent style. */
|
|
7
|
+
readonly buttonClass: _angular_core.Signal<string>;
|
|
8
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsButtonTypeDirective, never>;
|
|
9
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsButtonTypeDirective, "button[color],input[type=\"button\"][color],input[type=\"submit\"][color],a[color]", never, { "color": { "alias": "color"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
export { BsButtonTypeDirective };
|
|
@@ -11,7 +11,7 @@ declare class BsCalendarComponent implements AfterViewInit {
|
|
|
11
11
|
max: _angular_core.InputSignal<Date | undefined>;
|
|
12
12
|
firstDayOfWeek: _angular_core.InputSignal<FirstDayOfWeek>;
|
|
13
13
|
locale: _angular_core.InputSignal<string | undefined>;
|
|
14
|
-
readonly wcRef: _angular_core.Signal<ElementRef<MpCalendarElement
|
|
14
|
+
readonly wcRef: _angular_core.Signal<ElementRef<MpCalendarElement>>;
|
|
15
15
|
constructor();
|
|
16
16
|
ngAfterViewInit(): void;
|
|
17
17
|
onSelectedDateChange(event: Event): void;
|
|
@@ -36,7 +36,6 @@ declare class BsCarouselComponent {
|
|
|
36
36
|
readonly wrap: _angular_core.InputSignal<boolean>;
|
|
37
37
|
/** Arrow/Home/End navigation on the focused viewport. */
|
|
38
38
|
readonly keyboardEvents: _angular_core.InputSignal<boolean>;
|
|
39
|
-
/** Accessible label for the carousel region. */
|
|
40
39
|
/** Two-way: whether autoplay is paused. */
|
|
41
40
|
readonly paused: _angular_core.ModelSignal<boolean>;
|
|
42
41
|
/** The committed slide index changed. */
|
|
@@ -44,7 +44,7 @@ declare class BsHierarchyChartComponent {
|
|
|
44
44
|
readonly nodeSelect: _angular_core.OutputEmitterRef<HierarchyNodeEventDetail>;
|
|
45
45
|
readonly nodeHover: _angular_core.OutputEmitterRef<HierarchyHoverEventDetail>;
|
|
46
46
|
readonly nodeLoadError: _angular_core.OutputEmitterRef<HierarchyLoadErrorEventDetail>;
|
|
47
|
-
readonly chartRef: _angular_core.Signal<ElementRef<MpHierarchyChart
|
|
47
|
+
readonly chartRef: _angular_core.Signal<ElementRef<MpHierarchyChart>>;
|
|
48
48
|
constructor();
|
|
49
49
|
protected onZoom(event: Event): void;
|
|
50
50
|
protected onNodeSelect(event: Event): void;
|
|
@@ -11,7 +11,7 @@ declare class BsSparklineComponent {
|
|
|
11
11
|
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
12
12
|
readonly inputLabel: _angular_core.InputSignal<string | undefined>;
|
|
13
13
|
readonly summaryFormatter: _angular_core.InputSignal<((points: (number | null)[]) => string | undefined) | undefined>;
|
|
14
|
-
readonly sparklineRef: _angular_core.Signal<ElementRef<MpSparkline
|
|
14
|
+
readonly sparklineRef: _angular_core.Signal<ElementRef<MpSparkline>>;
|
|
15
15
|
constructor();
|
|
16
16
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSparklineComponent, never>;
|
|
17
17
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSparklineComponent, "bs-sparkline", never, { "points": { "alias": "points"; "required": false; "isSignal": true; }; "area": { "alias": "area"; "required": false; "isSignal": true; }; "showLastDot": { "alias": "showLastDot"; "required": false; "isSignal": true; }; "yMin": { "alias": "yMin"; "required": false; "isSignal": true; }; "yMax": { "alias": "yMax"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "inputLabel": { "alias": "inputLabel"; "required": false; "isSignal": true; }; "summaryFormatter": { "alias": "summaryFormatter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -17,7 +17,7 @@ declare class BsTrendChartComponent {
|
|
|
17
17
|
readonly summaryFormatter: _angular_core.InputSignal<((series: TrendSeries[]) => string | undefined) | undefined>;
|
|
18
18
|
readonly pointHover: _angular_core.OutputEmitterRef<TrendHoverEventDetail>;
|
|
19
19
|
readonly pointSelect: _angular_core.OutputEmitterRef<TrendPointEventDetail>;
|
|
20
|
-
readonly chartRef: _angular_core.Signal<ElementRef<MpTrendChart
|
|
20
|
+
readonly chartRef: _angular_core.Signal<ElementRef<MpTrendChart>>;
|
|
21
21
|
constructor();
|
|
22
22
|
protected onPointHover(event: Event): void;
|
|
23
23
|
protected onPointSelect(event: Event): void;
|
|
@@ -97,8 +97,8 @@ declare class BsColorWheelComponent {
|
|
|
97
97
|
onPointerUp(_ev: MouseEvent | TouchEvent): void;
|
|
98
98
|
/**
|
|
99
99
|
* Keyboard model for the 2-D wheel:
|
|
100
|
-
* ArrowLeft / ArrowRight → -
|
|
101
|
-
* ArrowDown / ArrowUp → -
|
|
100
|
+
* ArrowLeft / ArrowRight → -5° / +5° hue (Shift: 1° for "fine")
|
|
101
|
+
* ArrowDown / ArrowUp → -5% / +5% saturation (Shift: 1% for "fine")
|
|
102
102
|
* PageDown / PageUp → -30° / +30° hue
|
|
103
103
|
* Home / End → saturation 100% / 0%
|
|
104
104
|
*
|
|
@@ -219,6 +219,12 @@ declare class BsSliderComponent {
|
|
|
219
219
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsSliderComponent, never>;
|
|
220
220
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BsSliderComponent, "bs-slider", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "valueScale": { "alias": "valueScale"; "required": false; "isSignal": true; }; "valueUnit": { "alias": "valueUnit"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["[bsTrack]", "[bsThumb]"], true, never>;
|
|
221
221
|
}
|
|
222
|
+
/**
|
|
223
|
+
* Where `clientX` falls along a track starting at `left` and `width` px wide, clamped to 0..1.
|
|
224
|
+
* A track with no width (not laid out yet, or display:none) has no position to report: null,
|
|
225
|
+
* rather than the NaN or Infinity the division would produce.
|
|
226
|
+
*/
|
|
227
|
+
declare function trackFraction(clientX: number, left: number, width: number): number | null;
|
|
222
228
|
declare class BsThumbDirective {
|
|
223
229
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsThumbDirective, never>;
|
|
224
230
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsThumbDirective, "[bsThumb]", never, {}, {}, never, never, true, never>;
|
|
@@ -230,5 +236,5 @@ declare class BsTrackDirective {
|
|
|
230
236
|
|
|
231
237
|
type HtmlColor = `#${string}`;
|
|
232
238
|
|
|
233
|
-
export { BsAlphaStripComponent, BsBrightnessStripComponent, BsColorPickerComponent, BsColorPickerValueAccessor, BsColorWheelComponent, BsHueStripComponent, BsSaturationStripComponent, BsSliderComponent, BsThumbDirective, BsTrackDirective, hex2hsv, hex2rgb, hs2polar, hsl2hsv, hsl2rgb, hsv2hex, hsv2hsl, hsv2rgb, polar2hs, rgb2hex, rgb2hsl, rgb2hsv };
|
|
239
|
+
export { BsAlphaStripComponent, BsBrightnessStripComponent, BsColorPickerComponent, BsColorPickerValueAccessor, BsColorWheelComponent, BsHueStripComponent, BsSaturationStripComponent, BsSliderComponent, BsThumbDirective, BsTrackDirective, hex2hsv, hex2rgb, hs2polar, hsl2hsv, hsl2rgb, hsv2hex, hsv2hsl, hsv2rgb, polar2hs, rgb2hex, rgb2hsl, rgb2hsv, trackFraction };
|
|
234
240
|
export type { HS, HslColor, HsvColor, HtmlColor, RgbColor };
|
|
@@ -1,23 +1,21 @@
|
|
|
1
|
-
import { Overlay } from '@angular/cdk/overlay';
|
|
2
1
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { TemplateRef, ViewContainerRef, ElementRef } from '@angular/core';
|
|
4
2
|
|
|
5
3
|
declare class BsContextMenuDirective {
|
|
6
|
-
private overlay;
|
|
7
|
-
private templateRef;
|
|
8
|
-
private viewContainerRef;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
private openAt;
|
|
4
|
+
private readonly overlay;
|
|
5
|
+
private readonly templateRef;
|
|
6
|
+
private readonly viewContainerRef;
|
|
7
|
+
/** The element the structural directive sits on: the menu's trigger. */
|
|
8
|
+
private readonly element;
|
|
12
9
|
private overlayRef;
|
|
13
|
-
private templatePortal;
|
|
14
10
|
private returnTarget;
|
|
11
|
+
constructor();
|
|
12
|
+
private openAt;
|
|
15
13
|
onEscape(): void;
|
|
16
14
|
clickAnywhere(ev: MouseEvent): void;
|
|
17
15
|
onBlur(): void;
|
|
18
16
|
private close;
|
|
19
17
|
private checkAndCloseExisting;
|
|
20
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BsContextMenuDirective,
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BsContextMenuDirective, never>;
|
|
21
19
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BsContextMenuDirective, "[bsContextMenu]", never, {}, {}, never, never, true, never>;
|
|
22
20
|
}
|
|
23
21
|
|
|
@@ -4,10 +4,12 @@ declare class BsCopyDirective {
|
|
|
4
4
|
private doc;
|
|
5
5
|
private announcer;
|
|
6
6
|
readonly bsCopy: _angular_core.InputSignal<string | null>;
|
|
7
|
+
/** Announced to screen readers after a copy. Override to translate. */
|
|
8
|
+
readonly copiedAnnouncement: _angular_core.InputSignal<string>;
|
|
7
9
|
readonly bsCopied: _angular_core.OutputEmitterRef<string>;
|
|
8
10
|
click(event: MouseEvent): void;
|
|
9
11
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BsCopyDirective, never>;
|
|
10
|
-
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsCopyDirective, "[bsCopy]", never, { "bsCopy": { "alias": "bsCopy"; "required": false; "isSignal": true; }; }, { "bsCopied": "bsCopied"; }, never, never, true, never>;
|
|
12
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BsCopyDirective, "[bsCopy]", never, { "bsCopy": { "alias": "bsCopy"; "required": false; "isSignal": true; }; "copiedAnnouncement": { "alias": "copiedAnnouncement"; "required": false; "isSignal": true; }; }, { "bsCopied": "bsCopied"; }, never, never, true, never>;
|
|
11
13
|
}
|
|
12
14
|
|
|
13
15
|
export { BsCopyDirective };
|