@mintplayer/ng-bootstrap 22.28.0 → 22.30.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 +4 -101
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs +62 -30
- package/fesm2022/mintplayer-ng-bootstrap-a11y.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs +71 -64
- package/fesm2022/mintplayer-ng-bootstrap-accordion.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs +50 -46
- package/fesm2022/mintplayer-ng-bootstrap-calendar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs +65 -94
- package/fesm2022/mintplayer-ng-bootstrap-card.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs +122 -97
- package/fesm2022/mintplayer-ng-bootstrap-carousel.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs +80 -133
- package/fesm2022/mintplayer-ng-bootstrap-charts-hierarchy.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs +31 -19
- package/fesm2022/mintplayer-ng-bootstrap-charts-sparkline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs +41 -46
- package/fesm2022/mintplayer-ng-bootstrap-charts-trend.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs +76 -37
- package/fesm2022/mintplayer-ng-bootstrap-checkbox.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs +37 -82
- package/fesm2022/mintplayer-ng-bootstrap-code-snippet.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-color-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs +157 -824
- package/fesm2022/mintplayer-ng-bootstrap-datatable.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs +172 -118
- package/fesm2022/mintplayer-ng-bootstrap-datepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs +180 -142
- package/fesm2022/mintplayer-ng-bootstrap-datetime-picker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs +66 -116
- package/fesm2022/mintplayer-ng-bootstrap-dock.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs +41 -46
- package/fesm2022/mintplayer-ng-bootstrap-dropdown-menu.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs +80 -204
- package/fesm2022/mintplayer-ng-bootstrap-file-manager.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-floating-labels.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs +32 -17
- package/fesm2022/mintplayer-ng-bootstrap-input-group.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs +283 -20
- package/fesm2022/mintplayer-ng-bootstrap-machine.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs +98 -129
- package/fesm2022/mintplayer-ng-bootstrap-multi-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs +144 -265
- package/fesm2022/mintplayer-ng-bootstrap-navbar.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs +133 -217
- package/fesm2022/mintplayer-ng-bootstrap-otp-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs +46 -25
- package/fesm2022/mintplayer-ng-bootstrap-pagination.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs +166 -93
- package/fesm2022/mintplayer-ng-bootstrap-phone-input.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs +148 -231
- package/fesm2022/mintplayer-ng-bootstrap-query-builder.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs +133 -94
- package/fesm2022/mintplayer-ng-bootstrap-radio.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs +2 -2
- package/fesm2022/mintplayer-ng-bootstrap-range.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs +76 -7
- package/fesm2022/mintplayer-ng-bootstrap-rating.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs +766 -812
- package/fesm2022/mintplayer-ng-bootstrap-ribbon.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs +206 -180
- package/fesm2022/mintplayer-ng-bootstrap-scheduler.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs +202 -141
- package/fesm2022/mintplayer-ng-bootstrap-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs +113 -59
- package/fesm2022/mintplayer-ng-bootstrap-shell.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs +133 -76
- package/fesm2022/mintplayer-ng-bootstrap-signature-pad.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs +60 -87
- package/fesm2022/mintplayer-ng-bootstrap-splitter.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs +86 -83
- package/fesm2022/mintplayer-ng-bootstrap-tab-control.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs +1 -2
- package/fesm2022/mintplayer-ng-bootstrap-table.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs +38 -34
- package/fesm2022/mintplayer-ng-bootstrap-theming.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs +177 -147
- package/fesm2022/mintplayer-ng-bootstrap-timeline.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs +200 -94
- package/fesm2022/mintplayer-ng-bootstrap-timepicker.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs +186 -233
- package/fesm2022/mintplayer-ng-bootstrap-tree-select.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs +58 -136
- package/fesm2022/mintplayer-ng-bootstrap-treeview.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs +22 -16
- package/fesm2022/mintplayer-ng-bootstrap-typeahead.mjs.map +1 -1
- package/package.json +11 -9
- package/types/mintplayer-ng-bootstrap-a11y.d.ts +40 -21
- package/types/mintplayer-ng-bootstrap-accordion.d.ts +36 -33
- package/types/mintplayer-ng-bootstrap-calendar.d.ts +39 -16
- package/types/mintplayer-ng-bootstrap-card.d.ts +25 -33
- package/types/mintplayer-ng-bootstrap-carousel.d.ts +70 -55
- package/types/mintplayer-ng-bootstrap-charts-hierarchy.d.ts +65 -45
- package/types/mintplayer-ng-bootstrap-charts-sparkline.d.ts +12 -3
- package/types/mintplayer-ng-bootstrap-charts-trend.d.ts +34 -19
- package/types/mintplayer-ng-bootstrap-checkbox.d.ts +34 -8
- package/types/mintplayer-ng-bootstrap-code-snippet.d.ts +32 -59
- package/types/mintplayer-ng-bootstrap-datatable.d.ts +222 -422
- package/types/mintplayer-ng-bootstrap-datepicker.d.ts +77 -29
- package/types/mintplayer-ng-bootstrap-datetime-picker.d.ts +83 -51
- package/types/mintplayer-ng-bootstrap-dock.d.ts +57 -38
- package/types/mintplayer-ng-bootstrap-dropdown-menu.d.ts +25 -30
- package/types/mintplayer-ng-bootstrap-file-manager.d.ts +61 -81
- package/types/mintplayer-ng-bootstrap-input-group.d.ts +17 -12
- package/types/mintplayer-ng-bootstrap-machine.d.ts +124 -4
- package/types/mintplayer-ng-bootstrap-multi-range.d.ts +53 -27
- package/types/mintplayer-ng-bootstrap-navbar.d.ts +88 -164
- package/types/mintplayer-ng-bootstrap-otp-input.d.ts +63 -30
- package/types/mintplayer-ng-bootstrap-pagination.d.ts +23 -7
- package/types/mintplayer-ng-bootstrap-phone-input.d.ts +77 -47
- package/types/mintplayer-ng-bootstrap-query-builder.d.ts +95 -98
- package/types/mintplayer-ng-bootstrap-radio.d.ts +68 -35
- package/types/mintplayer-ng-bootstrap-rating.d.ts +27 -2
- package/types/mintplayer-ng-bootstrap-ribbon.d.ts +546 -220
- package/types/mintplayer-ng-bootstrap-scheduler.d.ts +82 -197
- package/types/mintplayer-ng-bootstrap-select.d.ts +113 -53
- package/types/mintplayer-ng-bootstrap-shell.d.ts +59 -33
- package/types/mintplayer-ng-bootstrap-signature-pad.d.ts +63 -27
- package/types/mintplayer-ng-bootstrap-splitter.d.ts +45 -56
- package/types/mintplayer-ng-bootstrap-tab-control.d.ts +47 -26
- package/types/mintplayer-ng-bootstrap-table.d.ts +1 -2
- package/types/mintplayer-ng-bootstrap-theming.d.ts +19 -18
- package/types/mintplayer-ng-bootstrap-timeline.d.ts +287 -117
- package/types/mintplayer-ng-bootstrap-timepicker.d.ts +100 -27
- package/types/mintplayer-ng-bootstrap-tree-select.d.ts +188 -94
- package/types/mintplayer-ng-bootstrap-treeview.d.ts +74 -59
- package/types/mintplayer-ng-bootstrap-typeahead.d.ts +3 -0
- package/src/styles/utilities/cursor.scss +0 -12
- package/src/styles/utilities/overflow.scss +0 -12
- package/src/styles/utilities/white-space.scss +0 -12
- package/src/styles/utilities/width.scss +0 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mintplayer-ng-bootstrap-tree-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tree-select/src/directives/template-directives.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/tree-select/tree-select.component.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/tree-select/tree-select.component.html","../../../../libs/mintplayer-ng-bootstrap/tree-select/mintplayer-ng-bootstrap-tree-select.ts"],"sourcesContent":["import { Directive, inject, TemplateRef } from '@angular/core';\nimport type { TreeNode } from '@mintplayer/web-components/tree-select';\n\nexport interface BsTreeSelectNodeContext {\n $implicit: TreeNode;\n query: string;\n}\n\nexport interface BsTreeSelectValueContext {\n $implicit: TreeNode | TreeNode[] | null;\n}\n\n/** Selected-item (chip / single value) template. Context: `{ $implicit: node, query }`. */\n@Directive({ selector: '[bsTreeSelectItem]' })\nexport class BsTreeSelectItemTemplateDirective {\n readonly templateRef = inject<TemplateRef<BsTreeSelectNodeContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTreeSelectItemTemplateDirective,\n ctx: unknown,\n ): ctx is BsTreeSelectNodeContext {\n return true;\n }\n}\n\n/** Dropdown row template. Context: `{ $implicit: node, query }`. */\n@Directive({ selector: '[bsTreeSelectSuggestion]' })\nexport class BsTreeSelectSuggestionTemplateDirective {\n readonly templateRef = inject<TemplateRef<BsTreeSelectNodeContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTreeSelectSuggestionTemplateDirective,\n ctx: unknown,\n ): ctx is BsTreeSelectNodeContext {\n return true;\n }\n}\n\n/** Full trigger override (button variant). Context: `{ $implicit: value }`. */\n@Directive({ selector: '[bsTreeSelectButton]' })\nexport class BsTreeSelectButtonTemplateDirective {\n readonly templateRef = inject<TemplateRef<BsTreeSelectValueContext>>(TemplateRef);\n static ngTemplateContextGuard(\n _d: BsTreeSelectButtonTemplateDirective,\n ctx: unknown,\n ): ctx is BsTreeSelectValueContext {\n return true;\n }\n}\n\n/** Panel header template. No context. */\n@Directive({ selector: '[bsTreeSelectHeader]' })\nexport class BsTreeSelectHeaderTemplateDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** Panel footer template. No context. */\n@Directive({ selector: '[bsTreeSelectFooter]' })\nexport class BsTreeSelectFooterTemplateDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** Shown when a search returns no rows. No context. */\n@Directive({ selector: '[bsTreeSelectNoResults]' })\nexport class BsTreeSelectNoResultsTemplateDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** Shown when the panel is open with no items / before a search. No context. */\n@Directive({ selector: '[bsTreeSelectEnterSearchTerm]' })\nexport class BsTreeSelectEnterSearchTermTemplateDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n CUSTOM_ELEMENTS_SCHEMA,\n DestroyRef,\n effect,\n ElementRef,\n EmbeddedViewRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n signal,\n ViewContainerRef,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { BsFormComponent } from '@mintplayer/ng-bootstrap/form';\nimport {\n MpTreeSelect,\n type TreeNode,\n type TreeSelectChangeEventDetail,\n type TreeSelectMode,\n type TreeSelectProvider,\n type TreeSelectVariant,\n} from '@mintplayer/web-components/tree-select';\n\n// Side-effect import: registers the <mp-tree-select> custom element.\nimport '@mintplayer/web-components/tree-select';\n\nimport {\n BsTreeSelectButtonTemplateDirective,\n BsTreeSelectEnterSearchTermTemplateDirective,\n BsTreeSelectFooterTemplateDirective,\n BsTreeSelectHeaderTemplateDirective,\n BsTreeSelectItemTemplateDirective,\n type BsTreeSelectNodeContext,\n BsTreeSelectNoResultsTemplateDirective,\n BsTreeSelectSuggestionTemplateDirective,\n type BsTreeSelectValueContext,\n} from '../directives/template-directives';\nimport { BsForwardAriaDirective } from '@mintplayer/ng-bootstrap/a11y';\n\ntype Value = TreeNode | TreeNode[] | null;\n\n/**\n * Angular wrapper for `<mp-tree-select>`. A `ControlValueAccessor`, so it works\n * with `[(ngModel)]` / `formControlName`. **Requires a `<bs-form>` ancestor**\n * (parity with the legacy searchbox it replaces).\n */\n@Component({\n selector: 'bs-tree-select',\n templateUrl: './tree-select.component.html',\n imports: [BsForwardAriaDirective],\n schemas: [CUSTOM_ELEMENTS_SCHEMA],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => BsTreeSelectComponent),\n multi: true,\n },\n ],\n})\nexport class BsTreeSelectComponent implements ControlValueAccessor {\n // ---- inputs (pushed to the WC as properties) --------------------------\n readonly provider = input<TreeSelectProvider | undefined>(undefined);\n readonly mode = input<TreeSelectMode>('single');\n readonly variant = input<TreeSelectVariant>('textbox');\n readonly cascadeSelect = input<boolean>(false);\n readonly placeholder = input<string>('');\n readonly showClear = input<boolean>(false);\n readonly panelScrollHeight = input<string>('300px');\n readonly searchDebounceMs = input<number>(200);\n readonly disabled = input<boolean>(false);\n\n readonly value = model<Value>(null);\n\n readonly opened = output<void>();\n readonly closed = output<void>();\n readonly cleared = output<void>();\n\n readonly elementRef = viewChild.required<ElementRef<MpTreeSelect>>('el');\n\n private readonly itemTpl = contentChild(BsTreeSelectItemTemplateDirective);\n private readonly suggestionTpl = contentChild(BsTreeSelectSuggestionTemplateDirective);\n private readonly buttonTpl = contentChild(BsTreeSelectButtonTemplateDirective);\n private readonly headerTpl = contentChild(BsTreeSelectHeaderTemplateDirective);\n private readonly footerTpl = contentChild(BsTreeSelectFooterTemplateDirective);\n private readonly noResultsTpl = contentChild(BsTreeSelectNoResultsTemplateDirective);\n private readonly enterSearchTermTpl = contentChild(BsTreeSelectEnterSearchTermTemplateDirective);\n\n private readonly bsForm = inject(BsFormComponent, { optional: true });\n private readonly vcr = inject(ViewContainerRef);\n private readonly destroyRef = inject(DestroyRef);\n\n private readonly nodeCaches = new Set<Map<string, EmbeddedViewRef<unknown>>>();\n private readonly singleViews: EmbeddedViewRef<unknown>[] = [];\n private readonly disabledByCva = signal(false);\n private readonly effectiveDisabled = computed(() => this.disabled() || this.disabledByCva());\n\n private onChange: (value: Value) => void = () => undefined;\n private onTouched: () => void = () => undefined;\n\n constructor() {\n if (!this.bsForm) {\n throw new Error('<bs-tree-select> must be inside a <bs-form>');\n }\n\n this.destroyRef.onDestroy(() => {\n [...this.nodeCaches].flatMap((cache) => [...cache.values()]).map((v) => v.destroy());\n this.singleViews.map((v) => v.destroy());\n });\n\n // Push scalar config to the WC element.\n this.bindProp((el) => (el.mode = this.mode()));\n this.bindProp((el) => (el.variant = this.variant()));\n this.bindProp((el) => (el.cascadeSelect = this.cascadeSelect()));\n this.bindProp((el) => (el.placeholder = this.placeholder()));\n this.bindProp((el) => (el.showClear = this.showClear()));\n this.bindProp((el) => (el.panelScrollHeight = this.panelScrollHeight()));\n this.bindProp((el) => (el.searchDebounceMs = this.searchDebounceMs()));\n this.bindProp((el) => (el.disabled = this.effectiveDisabled()));\n this.bindProp((el) => (el.provider = this.provider()));\n this.bindProp((el) => (el.value = this.value()));\n\n // Wire render-callbacks from any provided ng-templates.\n this.bindProp((el) => (el.itemTemplate = this.nodeRenderer(this.itemTpl())));\n this.bindProp((el) => (el.suggestionTemplate = this.nodeRenderer(this.suggestionTpl())));\n this.bindProp((el) => (el.buttonTemplate = this.valueRenderer(this.buttonTpl())));\n this.bindProp((el) => (el.headerTemplate = this.staticRenderer(this.headerTpl())));\n this.bindProp((el) => (el.footerTemplate = this.staticRenderer(this.footerTpl())));\n this.bindProp((el) => (el.noResultsTemplate = this.staticRenderer(this.noResultsTpl())));\n this.bindProp((el) => (el.enterSearchTermTemplate = this.staticRenderer(this.enterSearchTermTpl())));\n }\n\n private bindProp(apply: (el: MpTreeSelect) => void): void {\n effect(() => {\n const el = this.elementRef().nativeElement;\n apply(el);\n });\n }\n\n // ---- event handlers ----------------------------------------------------\n onValueChange(event: Event): void {\n const detail = (event as CustomEvent<TreeSelectChangeEventDetail>).detail;\n this.value.set(detail.value);\n this.onChange(detail.value);\n }\n\n onOpen(): void {\n this.opened.emit();\n }\n onClose(): void {\n this.onTouched();\n this.closed.emit();\n }\n onClear(): void {\n this.cleared.emit();\n }\n\n // ---- ControlValueAccessor ---------------------------------------------\n writeValue(value: Value): void {\n this.value.set(value);\n }\n registerOnChange(fn: (value: Value) => void): void {\n this.onChange = fn;\n }\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n\n // ---- ng-template → render-callback bridges -----------------------------\n private nodeRenderer(\n dir: { templateRef: import('@angular/core').TemplateRef<BsTreeSelectNodeContext> } | undefined,\n ): ((node: TreeNode, query: string) => Node) | undefined {\n if (!dir) return undefined;\n // LRU-bounded so browsing a large server tree (every distinct node id seen\n // over the component's lifetime) can't grow the cache without limit. Map\n // iteration is insertion-ordered; re-inserting on hit marks recency, and we\n // destroy the oldest entry past the cap. Currently-rendered nodes are the\n // most-recently-used, so eviction only ever targets off-screen views.\n const MAX_VIEWS = 400;\n const cache = new Map<string, EmbeddedViewRef<BsTreeSelectNodeContext>>();\n this.nodeCaches.add(cache as Map<string, EmbeddedViewRef<unknown>>);\n return (node, query) => {\n let view = cache.get(node.id);\n if (!view) {\n view = this.vcr.createEmbeddedView(dir.templateRef, { $implicit: node, query });\n cache.set(node.id, view);\n if (cache.size > MAX_VIEWS) {\n const oldest = cache.keys().next().value as string;\n cache.get(oldest)?.destroy();\n cache.delete(oldest);\n }\n } else {\n cache.delete(node.id);\n cache.set(node.id, view);\n view.context.$implicit = node;\n view.context.query = query;\n }\n view.detectChanges();\n return this.rootNode(view);\n };\n }\n\n private valueRenderer(\n dir: { templateRef: import('@angular/core').TemplateRef<BsTreeSelectValueContext> } | undefined,\n ): ((value: Value) => Node) | undefined {\n if (!dir) return undefined;\n let view: EmbeddedViewRef<BsTreeSelectValueContext> | undefined;\n return (value) => {\n if (!view) {\n view = this.vcr.createEmbeddedView(dir.templateRef, { $implicit: value });\n this.singleViews.push(view);\n } else {\n view.context.$implicit = value;\n }\n view.detectChanges();\n return this.rootNode(view);\n };\n }\n\n private staticRenderer(\n dir: { templateRef: import('@angular/core').TemplateRef<unknown> } | undefined,\n ): (() => Node) | undefined {\n if (!dir) return undefined;\n let view: EmbeddedViewRef<unknown> | undefined;\n return () => {\n if (!view) {\n view = this.vcr.createEmbeddedView(dir.templateRef, {});\n this.singleViews.push(view);\n }\n view.detectChanges();\n return this.rootNode(view);\n };\n }\n\n private rootNode(view: EmbeddedViewRef<unknown>): Node {\n const nodes = (view.rootNodes as unknown[]).filter((n): n is Node => n instanceof Node);\n if (nodes.length === 1) return nodes[0];\n const fragment = document.createDocumentFragment();\n fragment.append(...nodes);\n return fragment;\n }\n}\n","<mp-tree-select bsForwardAria\n #el\n class=\"bs-tree-select\"\n (value-change)=\"onValueChange($event)\"\n (open)=\"onOpen()\"\n (close)=\"onClose()\"\n (clear)=\"onClear()\"\n></mp-tree-select>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAYA;MAEa,iCAAiC,CAAA;AAD9C,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAuC,WAAW,CAAC;AAOjF,IAAA;AANC,IAAA,OAAO,sBAAsB,CAC3B,EAAqC,EACrC,GAAY,EAAA;AAEZ,QAAA,OAAO,IAAI;IACb;8GAPW,iCAAiC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjC,iCAAiC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjC,iCAAiC,EAAA,UAAA,EAAA,CAAA;kBAD7C,SAAS;mBAAC,EAAE,QAAQ,EAAE,oBAAoB,EAAE;;AAW7C;MAEa,uCAAuC,CAAA;AADpD,IAAA,WAAA,GAAA;AAEW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IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAC3B,uCAAuC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAC3C,mCAAmC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACnC,mCAAmC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACnC,mCAAmC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAChC,sCAAsC,oGAChC,4CAA4C,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7FjG;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-tree-select.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/tree-select/src/value-accessor/tree-select-value-accessor.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/tree-select.angular.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/generated/tree-select.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/generated/tree-select.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/tree-select/mintplayer-ng-bootstrap-tree-select.ts"],"sourcesContent":["import { DestroyRef, Directive, Injector, OnInit, forwardRef, inject, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { TreeSelectValue } from '@mintplayer/ui-core/tree-select';\nimport { BsTreeSelectComponent } from '../generated';\n\n/**\n * The `ControlValueAccessor` of `bs-tree-select` (a host directive of the\n * generated component, see `tree-select.angular.ts`). A bound form control\n * drives the value through `viewValue`; a user's change reaches the form\n * through the component's `value` model, which a form write never echoes.\n */\n@Directive({\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTreeSelectValueAccessor), multi: true }],\n host: {\n '(focusout)': 'onTouched()',\n },\n})\nexport class BsTreeSelectValueAccessor implements ControlValueAccessor, OnInit {\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n\n /** A form control drives the value: its `viewValue` wins over the `value` input. */\n readonly bound = signal(false);\n readonly viewValue = signal<TreeSelectValue>(null);\n readonly disabled = signal(false);\n\n private onChange: (value: TreeSelectValue) => void = () => undefined;\n onTouched: () => void = () => undefined;\n\n ngOnInit(): void {\n // The component is created after its host directives, so it is looked up here.\n const component = this.injector.get(BsTreeSelectComponent);\n const sub = component.valuechange.subscribe((value) => {\n if (!this.bound() || value === this.viewValue()) return;\n this.viewValue.set(value);\n this.onChange(value);\n });\n this.destroyRef.onDestroy(() => sub.unsubscribe());\n }\n\n registerOnChange(fn: (value: TreeSelectValue) => void): void {\n this.bound.set(true);\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n writeValue(value: TreeSelectValue | undefined): void {\n this.viewValue.set(value ?? null);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n}\n","import { computed, inject } from '@angular/core';\nimport type { TreeSelectInputs } from '@mintplayer/ui-core/tree-select';\nimport { BsTreeSelectValueAccessor } from './value-accessor/tree-select-value-accessor';\n\n/*\n * The Angular extension of the generated `bs-tree-select` (PRD #437 D10 escape\n * hatch): Angular forms. A bound form control drives the value and the\n * disabled state.\n */\n\nexport const hostDirectives = [BsTreeSelectValueAccessor];\n\nexport function extendInputs(inputs: () => TreeSelectInputs): () => TreeSelectInputs {\n const accessor = inject(BsTreeSelectValueAccessor, { self: true });\n return computed<TreeSelectInputs>(() => {\n const value = inputs();\n return {\n ...value,\n value: accessor.bound() ? accessor.viewValue() : value.value,\n disabled: value.disabled || accessor.disabled(),\n };\n });\n}\n","// GENERATED from the tree-select manifest (tree-select) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, numberAttribute, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type TreeSelectChangeEventDetail, treeSelectCore, type TreeSelectInputs, type TreeSelectLoadErrorEventDetail, type TreeSelectMethods, treeSelectScopedStyles, type TreeSelectSearchEventDetail, type TreeSelectValue } from '@mintplayer/ui-core/tree-select';\nimport { type TreeNode } from '@mintplayer/ui-core/tree';\nimport { hostDirectives as ext_hostDirectives, extendInputs as ext_extendInputs } from '../tree-select.angular';\n\n/** The `item` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectItem>` or `*bsTreeSelectItem`. */\n@Directive({ selector: '[bsTreeSelectItem]' })\nexport class BsTreeSelectItemDirective {\n readonly templateRef = inject<TemplateRef<{ node: TreeNode; query: string } & { $implicit: { node: TreeNode; query: string } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsTreeSelectItemDirective, ctx: unknown): ctx is { node: TreeNode; query: string } & { $implicit: { node: TreeNode; query: string } } {\n return true;\n }\n}\n\n/** The `suggestion` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectSuggestion>` or `*bsTreeSelectSuggestion`. */\n@Directive({ selector: '[bsTreeSelectSuggestion]' })\nexport class BsTreeSelectSuggestionDirective {\n readonly templateRef = inject<TemplateRef<{ node: TreeNode; query: string } & { $implicit: { node: TreeNode; query: string } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsTreeSelectSuggestionDirective, ctx: unknown): ctx is { node: TreeNode; query: string } & { $implicit: { node: TreeNode; query: string } } {\n return true;\n }\n}\n\n/** The `button` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectButton>` or `*bsTreeSelectButton`. */\n@Directive({ selector: '[bsTreeSelectButton]' })\nexport class BsTreeSelectButtonDirective {\n readonly templateRef = inject<TemplateRef<{ value: TreeSelectValue } & { $implicit: { value: TreeSelectValue } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsTreeSelectButtonDirective, ctx: unknown): ctx is { value: TreeSelectValue } & { $implicit: { value: TreeSelectValue } } {\n return true;\n }\n}\n\n/** The `header` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectHeader>` or `*bsTreeSelectHeader`. */\n@Directive({ selector: '[bsTreeSelectHeader]' })\nexport class BsTreeSelectHeaderDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** The `footer` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectFooter>` or `*bsTreeSelectFooter`. */\n@Directive({ selector: '[bsTreeSelectFooter]' })\nexport class BsTreeSelectFooterDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** The `noResults` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectNoResults>` or `*bsTreeSelectNoResults`. */\n@Directive({ selector: '[bsTreeSelectNoResults]' })\nexport class BsTreeSelectNoResultsDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/** The `enterSearchTerm` slot of `<bs-tree-select>`: `<ng-template bsTreeSelectEnterSearchTerm>` or `*bsTreeSelectEnterSearchTerm`. */\n@Directive({ selector: '[bsTreeSelectEnterSearchTerm]' })\nexport class BsTreeSelectEnterSearchTermDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef);\n}\n\n/**\n * A hierarchical, async, searchable select (#437): a combobox, or a button, opening a tree in\n * a native popover.\n *\n * Data comes from a `provider` (roots, search and lazy children, each paged); `value` holds\n * whole nodes, one in `single` mode and an array in `multiple` / `checkbox`. `cascadeSelect`\n * checks a branch with its loaded children. Slots: `item` (a chosen node), `suggestion` (a\n * tree row's body), `button` (the button variant's body), `header`, `footer`, `noResults`,\n * `enterSearchTerm`. An `aria-label` names the combobox.\n */\n@Component({\n selector: 'bs-tree-select',\n templateUrl: './tree-select.view.generated.html',\n imports: [MpPropsDirective, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: ext_hostDirectives,\n})\nexport class BsTreeSelectComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly provider = input<TreeSelectInputs['provider']>(null);\n readonly value = model<TreeSelectInputs['value']>(null);\n readonly mode = input<TreeSelectInputs['mode']>('single');\n readonly variant = input<TreeSelectInputs['variant']>('textbox');\n readonly cascadeSelect = input<TreeSelectInputs['cascadeSelect'], unknown>(false, { transform: booleanAttribute });\n readonly placeholder = input<TreeSelectInputs['placeholder']>('');\n readonly showClear = input<TreeSelectInputs['showClear'], unknown>(false, { transform: booleanAttribute });\n readonly panelScrollHeight = input<TreeSelectInputs['panelScrollHeight']>('300px');\n readonly disabled = input<TreeSelectInputs['disabled'], unknown>(false, { transform: booleanAttribute });\n readonly searchDebounceMs = input<TreeSelectInputs['searchDebounceMs'], unknown>(200, { transform: (v: unknown) => numberAttribute(v) as TreeSelectInputs['searchDebounceMs'] });\n readonly inputLabel = input<TreeSelectInputs['inputLabel']>(null);\n readonly labels = input<TreeSelectInputs['labels']>(null);\n /** The value, after the user changed it. */\n readonly valuechange = output<TreeSelectValue>();\n /** The node added or removed (neither for a clear), with the value. */\n readonly selectionchanged = output<TreeSelectChangeEventDetail>();\n /** The panel opened (true) or closed (false). */\n readonly openchange = output<boolean>();\n /** A search started (an empty query restores the browse tree). */\n readonly searchstart = output<TreeSelectSearchEventDetail>();\n /** A provider call rejected. */\n readonly loaderror = output<TreeSelectLoadErrorEventDetail>();\n\n private readonly itemSlot = contentChild(BsTreeSelectItemDirective);\n private readonly suggestionSlot = contentChild(BsTreeSelectSuggestionDirective);\n private readonly buttonSlot = contentChild(BsTreeSelectButtonDirective);\n private readonly headerSlot = contentChild(BsTreeSelectHeaderDirective);\n private readonly footerSlot = contentChild(BsTreeSelectFooterDirective);\n private readonly noResultsSlot = contentChild(BsTreeSelectNoResultsDirective);\n private readonly enterSearchTermSlot = contentChild(BsTreeSelectEnterSearchTermDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ item: this.itemSlot()?.templateRef, suggestion: this.suggestionSlot()?.templateRef, button: this.buttonSlot()?.templateRef, header: this.headerSlot()?.templateRef, footer: this.footerSlot()?.templateRef, noResults: this.noResultsSlot()?.templateRef, enterSearchTerm: this.enterSearchTermSlot()?.templateRef }));\n readonly #core = useCore(treeSelectCore, { inputs: ext_extendInputs(() => ({ provider: this.provider(), value: this.value(), mode: this.mode(), variant: this.variant(), cascadeSelect: this.cascadeSelect(), placeholder: this.placeholder(), showClear: this.showClear(), panelScrollHeight: this.panelScrollHeight(), disabled: this.disabled(), searchDebounceMs: this.searchDebounceMs(), inputLabel: this.inputLabel(), labels: this.labels() })), idPrefix: 'bs-tree-select', outputs: { valueChange: this.valuechange, selectionChanged: this.selectionchanged, openChange: this.openchange, searchStart: this.searchstart, loadError: this.loaderror }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'tree-select' }), models: { value: this.value } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('tree-select', treeSelectScopedStyles);\n }\n\n /** Open the panel (ignored when disabled or without a provider). */\n open(...args: Parameters<TreeSelectMethods['open']>): ReturnType<TreeSelectMethods['open']> {\n return this.#core.call('open', args) as ReturnType<TreeSelectMethods['open']>;\n }\n\n /** Close the panel. */\n close(...args: Parameters<TreeSelectMethods['close']>): ReturnType<TreeSelectMethods['close']> {\n return this.#core.call('close', args) as ReturnType<TreeSelectMethods['close']>;\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/tree-select/src/templates/tree-select.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n@if (p_view.textbox) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.control\">\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: chip.node, query: p_view.query }, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n @if (chip.remove) {\n <button data-mps=\"tree-select\" [mpProps]=\"chip.remove\">\n ×\n </button>\n }\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: p_view.single, query: p_view.query }, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.input\" [value]=\"p_view.query\">\n @if (p_view.clear) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.clear\">\n ×\n </button>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </div>\n} @else {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.button\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.buttonBody\">\n @if (slots().button; as slot_button) {\n <ng-container [ngTemplateOutlet]=\"slot_button\" [ngTemplateOutletContext]=\"{ $implicit: { value: p_view.value }, value: p_view.value }\" />\n } @else {\n @if (p_view.showPlaceholder) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.placeholder\">\n {{ p_view.placeholderText }}\n </span>\n }\n @for (chip of p_view.chips; track chip.key) {\n <span data-mps=\"tree-select\" [mpProps]=\"chip.bag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.chipLabel\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: chip.node, query: p_view.query }, node: chip.node, query: p_view.query }\" />\n } @else {\n {{ chip.node.label }}\n }\n </span>\n </span>\n }\n @if (p_view.single) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.singleBag\">\n @if (slots().item; as slot_item) {\n <ng-container [ngTemplateOutlet]=\"slot_item\" [ngTemplateOutletContext]=\"{ $implicit: { node: p_view.single, query: p_view.query }, node: p_view.single, query: p_view.query }\" />\n } @else {\n {{ p_view.single.label }}\n }\n </span>\n }\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.caret\"></span>\n </button>\n}\n<div data-mps=\"tree-select\" [mpProps]=\"p_view.panel\">\n @if (slots().header) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n @if (slots().header; as slot_header) {\n <ng-container [ngTemplateOutlet]=\"slot_header\" />\n }\n </div>\n }\n @if (p_view.panelSearch) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.header\">\n <input data-mps=\"tree-select\" [mpProps]=\"p_view.panelSearch\" [value]=\"p_view.query\">\n </div>\n }\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.body\" [style]=\"p_view.bodyStyle\">\n @if (p_view.noProvider) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n {{ p_view.labels.noProvider }}\n </div>\n } @else if (p_view.busy) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n </div>\n } @else if (p_view.noResults) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().noResults; as slot_noResults) {\n <ng-container [ngTemplateOutlet]=\"slot_noResults\" />\n } @else {\n {{ p_view.labels.noResults }}\n }\n </div>\n } @else if (p_view.noItems) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.stateBag\">\n @if (slots().enterSearchTerm; as slot_enterSearchTerm) {\n <ng-container [ngTemplateOutlet]=\"slot_enterSearchTerm\" />\n } @else {\n {{ p_view.labels.noItems }}\n }\n </div>\n }\n @if (p_view.showTree) {\n <ul data-mps=\"tree-select\" [mpProps]=\"p_view.tree.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"tree-select\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.spinner\"></span>\n }\n </span>\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.body\">\n @if (row.check) {\n <span data-mps=\"tree-select\" [mpProps]=\"row.check\"></span>\n }\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.tree.label\">\n @if (slots().suggestion; as slot_suggestion) {\n <ng-container [ngTemplateOutlet]=\"slot_suggestion\" [ngTemplateOutletContext]=\"{ $implicit: { node: row.node, query: p_view.query }, node: row.node, query: p_view.query }\" />\n } @else {\n {{ row.node.label }}\n }\n </span>\n </span>\n </li>\n }\n </ul>\n }\n </div>\n @if (p_view.loadMore) {\n <button data-mps=\"tree-select\" [mpProps]=\"p_view.loadMore\">\n @if (p_view.loadMoreBusy) {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.spinner\"></span>\n } @else {\n <span data-mps=\"tree-select\" [mpProps]=\"p_view.loadMoreLabel\">\n {{ p_view.labels.loadMore }}\n </span>\n }\n </button>\n }\n @if (slots().footer) {\n <div data-mps=\"tree-select\" [mpProps]=\"p_view.footer\">\n @if (slots().footer; as slot_footer) {\n <ng-container [ngTemplateOutlet]=\"slot_footer\" />\n }\n </div>\n }\n</div>\n","// GENERATED from the tree-select manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsTreeSelectComponent, BsTreeSelectItemDirective, BsTreeSelectSuggestionDirective, BsTreeSelectButtonDirective, BsTreeSelectHeaderDirective, BsTreeSelectFooterDirective, BsTreeSelectNoResultsDirective, BsTreeSelectEnterSearchTermDirective } from './tree-select.component.generated';\n","// The tree-select is generated from @mintplayer/ui-core/tree-select (PRD #437 D10).\nexport * from './generated';\nexport * from './value-accessor/tree-select-value-accessor';\nexport { InMemoryTreeSelectProvider } from '@mintplayer/ui-core/tree-select';\nexport type {\n InMemoryProviderOptions,\n NodePage,\n NodeRequest,\n TreeNode,\n TreeSelectChangeEventDetail,\n TreeSelectLabels,\n TreeSelectLoadErrorEventDetail,\n TreeSelectMode,\n TreeSelectProvider,\n TreeSelectSearchEventDetail,\n TreeSelectValue,\n TreeSelectVariant,\n} from '@mintplayer/ui-core/tree-select';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["ext_extendInputs","i1.BsTreeSelectValueAccessor","ext_hostDirectives"],"mappings":";;;;;;;;AAKA;;;;;AAKG;MAOU,yBAAyB,CAAA;AANtC,IAAA,WAAA,GAAA;AAOmB,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;AAC3B,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;;QAGvC,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,KAAK;kFAAC;QACrB,IAAA,CAAA,SAAS,GAAG,MAAM,CA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A,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACnC,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAC3B,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MAC3B,2BAA2B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,aAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACxB,8BAA8B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,mBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,YAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACxB,oCAAoC,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE7G1F;;ACAA;;ACAA;;AAEG;;;;"}
|
|
@@ -1,53 +1,37 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, TemplateRef, Directive, input, model,
|
|
3
|
-
import '@
|
|
4
|
-
import {
|
|
2
|
+
import { inject, TemplateRef, Directive, ElementRef, input, model, booleanAttribute, output, contentChild, computed, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
4
|
+
import { useCore, useScopedStyles, MpPropsDirective, MpTrustedHtmlPipe } from '@mintplayer/ng-bootstrap/machine';
|
|
5
|
+
import { treeviewCore, treeviewScopedStyles } from '@mintplayer/ui-core/treeview';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
* Angular content (icons, badges, custom layout) per node.
|
|
10
|
-
*
|
|
11
|
-
* `mp-treeview` is a light-tier component: the nodes this template produces stay
|
|
12
|
-
* in the document, so this component's own styles, the page's stylesheet and
|
|
13
|
-
* Bootstrap's utility classes all reach them. (Before the light-DOM conversion
|
|
14
|
-
* they were mounted into a shadow root, where none of that applied.)
|
|
15
|
-
*
|
|
16
|
-
* Example:
|
|
17
|
-
* ```html
|
|
18
|
-
* <bs-treeview [items]="nodes()">
|
|
19
|
-
* <ng-container *bsTreeviewNode="let node">
|
|
20
|
-
* <span [innerHTML]="iconFor(node)"></span>
|
|
21
|
-
* <strong>{{ node.label }}</strong>
|
|
22
|
-
* @if (node.meta?.['badge']) {
|
|
23
|
-
* <bs-badge [type]="colors.secondary">{{ node.meta!['badge'] }}</bs-badge>
|
|
24
|
-
* }
|
|
25
|
-
* </ng-container>
|
|
26
|
-
* </bs-treeview>
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* `<bs-badge>` rather than `<span class="badge">`: the workspace's own
|
|
30
|
-
* `_bootstrap.scss` ships only a subset of Bootstrap's partials and `badge` is
|
|
31
|
-
* not among them, so a raw `.badge` class is unstyled on a stock setup. It
|
|
32
|
-
* works, of course, in an app that loads the full framework.
|
|
33
|
-
*/
|
|
34
|
-
class BsTreeviewNodeTemplateDirective {
|
|
7
|
+
// GENERATED from the treeview manifest (treeview) by @mintplayer/nx-component-compiler. Do not edit.
|
|
8
|
+
/** The `node` slot of `<bs-treeview>`: `<ng-template bsTreeviewNode>` or `*bsTreeviewNode`. */
|
|
9
|
+
class BsTreeviewNodeDirective {
|
|
35
10
|
constructor() {
|
|
36
11
|
this.templateRef = inject(TemplateRef);
|
|
37
12
|
}
|
|
38
13
|
static ngTemplateContextGuard(_dir, ctx) {
|
|
39
14
|
return true;
|
|
40
15
|
}
|
|
41
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
42
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type:
|
|
16
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeviewNodeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
17
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.8", type: BsTreeviewNodeDirective, isStandalone: true, selector: "[bsTreeviewNode]", ngImport: i0 }); }
|
|
43
18
|
}
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type:
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeviewNodeDirective, decorators: [{
|
|
45
20
|
type: Directive,
|
|
46
21
|
args: [{ selector: '[bsTreeviewNode]' }]
|
|
47
22
|
}] });
|
|
48
|
-
|
|
23
|
+
/**
|
|
24
|
+
* A data-driven tree (WAI-ARIA tree pattern, #437).
|
|
25
|
+
*
|
|
26
|
+
* Give it `items`; `expandedIds` and `selectedIds` are two-way. The `node` slot renders a
|
|
27
|
+
* node's body (the chevron stays). Lazy nodes (`lazy: true`) load through `loadChildren` on
|
|
28
|
+
* first expansion. The server render shows every expanded level. An `aria-label` names it.
|
|
29
|
+
*/
|
|
49
30
|
class BsTreeviewComponent {
|
|
31
|
+
#core;
|
|
50
32
|
constructor() {
|
|
33
|
+
/** The host element. */
|
|
34
|
+
this.elementRef = inject(ElementRef);
|
|
51
35
|
this.items = input([], /* @ts-ignore */
|
|
52
36
|
...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
|
|
53
37
|
this.expandedIds = model([], /* @ts-ignore */
|
|
@@ -56,114 +40,52 @@ class BsTreeviewComponent {
|
|
|
56
40
|
...(ngDevMode ? [{ debugName: "selectedIds" }] : /* istanbul ignore next */ []));
|
|
57
41
|
this.selectionMode = input('single', /* @ts-ignore */
|
|
58
42
|
...(ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []));
|
|
59
|
-
this.hideBorders = input(false, /*
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
this.
|
|
65
|
-
|
|
66
|
-
this.
|
|
67
|
-
...(ngDevMode ? [{ debugName: "
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
this.
|
|
72
|
-
|
|
73
|
-
this.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
el.expandedIds = this.expandedIds();
|
|
90
|
-
});
|
|
91
|
-
effect(() => {
|
|
92
|
-
const el = this.treeviewRef().nativeElement;
|
|
93
|
-
el.selectedIds = this.selectedIds();
|
|
94
|
-
});
|
|
95
|
-
effect(() => {
|
|
96
|
-
const el = this.treeviewRef().nativeElement;
|
|
97
|
-
el.selectionMode = this.selectionMode();
|
|
98
|
-
});
|
|
99
|
-
effect(() => {
|
|
100
|
-
const el = this.treeviewRef().nativeElement;
|
|
101
|
-
el.hideBorders = this.hideBorders();
|
|
102
|
-
});
|
|
103
|
-
effect(() => {
|
|
104
|
-
const el = this.treeviewRef().nativeElement;
|
|
105
|
-
el.iconResolver = this.iconResolver();
|
|
106
|
-
});
|
|
107
|
-
// Wire nodeRenderer when a *bsTreeviewNode template is provided.
|
|
108
|
-
effect(() => {
|
|
109
|
-
const el = this.treeviewRef().nativeElement;
|
|
110
|
-
const tpl = this.nodeTemplate();
|
|
111
|
-
// Views cached for a previous template would keep rendering ITS markup: drop them.
|
|
112
|
-
this.destroyCachedViews();
|
|
113
|
-
el.nodeRenderer = tpl ? this.buildNodeRenderer(tpl) : undefined;
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
buildNodeRenderer(tpl) {
|
|
117
|
-
return (node) => {
|
|
118
|
-
let viewRef = this.viewCache.get(node.id);
|
|
119
|
-
if (!viewRef) {
|
|
120
|
-
viewRef = this.viewContainerRef.createEmbeddedView(tpl.templateRef, { $implicit: node });
|
|
121
|
-
this.viewCache.set(node.id, viewRef);
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
viewRef.context.$implicit = node;
|
|
125
|
-
}
|
|
126
|
-
viewRef.detectChanges();
|
|
127
|
-
const nodes = viewRef.rootNodes.filter((n) => n instanceof Node);
|
|
128
|
-
if (nodes.length === 0)
|
|
129
|
-
return undefined;
|
|
130
|
-
if (nodes.length === 1)
|
|
131
|
-
return nodes[0];
|
|
132
|
-
const fragment = document.createDocumentFragment();
|
|
133
|
-
fragment.append(...nodes);
|
|
134
|
-
return fragment;
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
destroyCachedViews() {
|
|
138
|
-
[...this.viewCache.values()].map((view) => view.destroy());
|
|
139
|
-
this.viewCache.clear();
|
|
140
|
-
}
|
|
141
|
-
onSelect(event) {
|
|
142
|
-
const detail = event.detail;
|
|
143
|
-
this.selectedIds.set([...detail.selectedIds]);
|
|
144
|
-
this.nodeSelect.emit(detail);
|
|
145
|
-
}
|
|
146
|
-
onExpand(event) {
|
|
147
|
-
const detail = event.detail;
|
|
148
|
-
this.expandedIds.set([...detail.expandedIds]);
|
|
149
|
-
this.nodeExpand.emit(detail);
|
|
150
|
-
}
|
|
151
|
-
onCollapse(event) {
|
|
152
|
-
const detail = event.detail;
|
|
153
|
-
this.expandedIds.set([...detail.expandedIds]);
|
|
154
|
-
this.nodeCollapse.emit(detail);
|
|
43
|
+
this.hideBorders = input(false, { ...(ngDevMode ? { debugName: "hideBorders" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
44
|
+
this.iconResolver = input(/* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [undefined, { debugName: "iconResolver" }] : /* istanbul ignore next */ []));
|
|
46
|
+
this.loadChildren = input(/* @ts-ignore */
|
|
47
|
+
...(ngDevMode ? [undefined, { debugName: "loadChildren" }] : /* istanbul ignore next */ []));
|
|
48
|
+
this.inputLabel = input(null, /* @ts-ignore */
|
|
49
|
+
...(ngDevMode ? [{ debugName: "inputLabel" }] : /* istanbul ignore next */ []));
|
|
50
|
+
this.labels = input(/* @ts-ignore */
|
|
51
|
+
...(ngDevMode ? [undefined, { debugName: "labels" }] : /* istanbul ignore next */ []));
|
|
52
|
+
/** A node was selected or deselected. */
|
|
53
|
+
this.nodeselect = output();
|
|
54
|
+
/** A node expanded (after its lazy load, if any). */
|
|
55
|
+
this.nodeexpand = output();
|
|
56
|
+
/** A node collapsed. */
|
|
57
|
+
this.nodecollapse = output();
|
|
58
|
+
/** A lazy node's loader rejected. */
|
|
59
|
+
this.nodeloaderror = output();
|
|
60
|
+
/** The ids of the selected nodes. */
|
|
61
|
+
this.selectedidschange = output();
|
|
62
|
+
/** The ids of the expanded nodes. */
|
|
63
|
+
this.expandedidschange = output();
|
|
64
|
+
this.nodeSlot = contentChild(BsTreeviewNodeDirective, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "nodeSlot" }] : /* istanbul ignore next */ []));
|
|
66
|
+
/** The template's named slots. */
|
|
67
|
+
this.slots = computed(() => ({ node: this.nodeSlot()?.templateRef }), /* @ts-ignore */
|
|
68
|
+
...(ngDevMode ? [{ debugName: "slots" }] : /* istanbul ignore next */ []));
|
|
69
|
+
this.#core = useCore(treeviewCore, { inputs: () => ({ items: this.items(), expandedIds: this.expandedIds(), selectedIds: this.selectedIds(), selectionMode: this.selectionMode(), hideBorders: this.hideBorders(), iconResolver: this.iconResolver(), loadChildren: this.loadChildren(), inputLabel: this.inputLabel(), labels: this.labels() }), idPrefix: 'bs-treeview', outputs: { nodeSelect: this.nodeselect, nodeExpand: this.nodeexpand, nodeCollapse: this.nodecollapse, nodeLoadError: this.nodeloaderror, selectedIdsChange: this.selectedidschange, expandedIdsChange: this.expandedidschange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'treeview' }), models: { expandedIds: this.expandedIds, selectedIds: this.selectedIds } });
|
|
70
|
+
/** The template's props. */
|
|
71
|
+
this.props = this.#core.props;
|
|
72
|
+
useScopedStyles('treeview', treeviewScopedStyles);
|
|
155
73
|
}
|
|
156
74
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeviewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
157
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
75
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTreeviewComponent, isStandalone: true, selector: "bs-treeview", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, expandedIds: { classPropertyName: "expandedIds", publicName: "expandedIds", isSignal: true, isRequired: false, transformFunction: null }, selectedIds: { classPropertyName: "selectedIds", publicName: "selectedIds", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, hideBorders: { classPropertyName: "hideBorders", publicName: "hideBorders", isSignal: true, isRequired: false, transformFunction: null }, iconResolver: { classPropertyName: "iconResolver", publicName: "iconResolver", isSignal: true, isRequired: false, transformFunction: null }, loadChildren: { classPropertyName: "loadChildren", publicName: "loadChildren", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { expandedIds: "expandedIdsChange", selectedIds: "selectedIdsChange", nodeselect: "nodeselect", nodeexpand: "nodeexpand", nodecollapse: "nodecollapse", nodeloaderror: "nodeloaderror", selectedidschange: "selectedidschange", expandedidschange: "expandedidschange" }, queries: [{ propertyName: "nodeSlot", first: true, predicate: BsTreeviewNodeDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<!-- GENERATED from libs/mintplayer-ui-core/treeview/src/templates/treeview.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ul data-mps=\"treeview\" [mpProps]=\"p_view.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"treeview\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"treeview\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.spinner\"></span>\n }\n </span>\n <span data-mps=\"treeview\" [mpProps]=\"p_view.body\">\n @if (slots().node; as slot_node) {\n <ng-container [ngTemplateOutlet]=\"slot_node\" [ngTemplateOutletContext]=\"{ $implicit: { node: row.node, ctx: row.ctx }, node: row.node, ctx: row.ctx }\" />\n } @else {\n @if (row.icon) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.icon\" [innerHTML]=\"row.icon | mpTrustedHtml\"></span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"p_view.label\">\n {{ row.node.label }}\n </span>\n }\n </span>\n </li>\n }\n</ul>\n<div data-mps=\"treeview\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n", dependencies: [{ kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: MpTrustedHtmlPipe, name: "mpTrustedHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
158
76
|
}
|
|
159
77
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTreeviewComponent, decorators: [{
|
|
160
78
|
type: Component,
|
|
161
|
-
args: [{ selector: 'bs-treeview', imports: [
|
|
162
|
-
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], hideBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideBorders", required: false }] }], iconResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconResolver", required: false }] }],
|
|
79
|
+
args: [{ selector: 'bs-treeview', imports: [MpPropsDirective, MpTrustedHtmlPipe, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- GENERATED from libs/mintplayer-ui-core/treeview/src/templates/treeview.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ul data-mps=\"treeview\" [mpProps]=\"p_view.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"treeview\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"treeview\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.spinner\"></span>\n }\n </span>\n <span data-mps=\"treeview\" [mpProps]=\"p_view.body\">\n @if (slots().node; as slot_node) {\n <ng-container [ngTemplateOutlet]=\"slot_node\" [ngTemplateOutletContext]=\"{ $implicit: { node: row.node, ctx: row.ctx }, node: row.node, ctx: row.ctx }\" />\n } @else {\n @if (row.icon) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.icon\" [innerHTML]=\"row.icon | mpTrustedHtml\"></span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"p_view.label\">\n {{ row.node.label }}\n </span>\n }\n </span>\n </li>\n }\n</ul>\n<div data-mps=\"treeview\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n" }]
|
|
80
|
+
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], expandedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "expandedIds", required: false }] }, { type: i0.Output, args: ["expandedIdsChange"] }], selectedIds: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedIds", required: false }] }, { type: i0.Output, args: ["selectedIdsChange"] }], selectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectionMode", required: false }] }], hideBorders: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideBorders", required: false }] }], iconResolver: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconResolver", required: false }] }], loadChildren: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadChildren", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], labels: [{ type: i0.Input, args: [{ isSignal: true, alias: "labels", required: false }] }], nodeselect: [{ type: i0.Output, args: ["nodeselect"] }], nodeexpand: [{ type: i0.Output, args: ["nodeexpand"] }], nodecollapse: [{ type: i0.Output, args: ["nodecollapse"] }], nodeloaderror: [{ type: i0.Output, args: ["nodeloaderror"] }], selectedidschange: [{ type: i0.Output, args: ["selectedidschange"] }], expandedidschange: [{ type: i0.Output, args: ["expandedidschange"] }], nodeSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTreeviewNodeDirective), { isSignal: true }] }] } });
|
|
81
|
+
|
|
82
|
+
// GENERATED from the treeview manifest by @mintplayer/nx-component-compiler. Do not edit.
|
|
83
|
+
|
|
84
|
+
// The treeview is generated from @mintplayer/ui-core/treeview (PRD #437 D10).
|
|
163
85
|
|
|
164
86
|
/**
|
|
165
87
|
* Generated bundle index. Do not edit.
|
|
166
88
|
*/
|
|
167
89
|
|
|
168
|
-
export { BsTreeviewComponent,
|
|
90
|
+
export { BsTreeviewComponent, BsTreeviewNodeDirective };
|
|
169
91
|
//# sourceMappingURL=mintplayer-ng-bootstrap-treeview.mjs.map
|
|
@@ -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 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,CAAA,CAAA;kGA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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;;;;"}
|
|
1
|
+
{"version":3,"file":"mintplayer-ng-bootstrap-treeview.mjs","sources":["../../../../libs/mintplayer-ng-bootstrap/treeview/src/generated/treeview.component.generated.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/generated/treeview.view.generated.html","../../../../libs/mintplayer-ng-bootstrap/treeview/src/generated/index.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/src/index.ts","../../../../libs/mintplayer-ng-bootstrap/treeview/mintplayer-ng-bootstrap-treeview.ts"],"sourcesContent":["// GENERATED from the treeview manifest (treeview) by @mintplayer/nx-component-compiler. Do not edit.\nimport { ChangeDetectionStrategy, Component, Directive, ElementRef, TemplateRef, booleanAttribute, computed, contentChild, inject, input, model, output } from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { MpPropsDirective, MpTrustedHtmlPipe, useCore, useScopedStyles } from '@mintplayer/ng-bootstrap/machine';\nimport { type TreeNodeCollapseEventDetail, type TreeNodeExpandEventDetail, type TreeNodeLoadErrorEventDetail, type TreeNodeRenderContext, type TreeNodeSelectEventDetail, treeviewCore, type TreeviewIds, type TreeviewInputs, treeviewScopedStyles } from '@mintplayer/ui-core/treeview';\nimport { type TreeNode } from '@mintplayer/ui-core/tree';\n\n/** The `node` slot of `<bs-treeview>`: `<ng-template bsTreeviewNode>` or `*bsTreeviewNode`. */\n@Directive({ selector: '[bsTreeviewNode]' })\nexport class BsTreeviewNodeDirective {\n readonly templateRef = inject<TemplateRef<{ node: TreeNode; ctx: TreeNodeRenderContext } & { $implicit: { node: TreeNode; ctx: TreeNodeRenderContext } }>>(TemplateRef);\n static ngTemplateContextGuard(_dir: BsTreeviewNodeDirective, ctx: unknown): ctx is { node: TreeNode; ctx: TreeNodeRenderContext } & { $implicit: { node: TreeNode; ctx: TreeNodeRenderContext } } {\n return true;\n }\n}\n\n/**\n * A data-driven tree (WAI-ARIA tree pattern, #437).\n *\n * Give it `items`; `expandedIds` and `selectedIds` are two-way. The `node` slot renders a\n * node's body (the chevron stays). Lazy nodes (`lazy: true`) load through `loadChildren` on\n * first expansion. The server render shows every expanded level. An `aria-label` names it.\n */\n@Component({\n selector: 'bs-treeview',\n templateUrl: './treeview.view.generated.html',\n imports: [MpPropsDirective, MpTrustedHtmlPipe, NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BsTreeviewComponent {\n /** The host element. */\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly items = input<TreeviewInputs['items']>([]);\n readonly expandedIds = model<TreeviewInputs['expandedIds']>([]);\n readonly selectedIds = model<TreeviewInputs['selectedIds']>([]);\n readonly selectionMode = input<TreeviewInputs['selectionMode']>('single');\n readonly hideBorders = input<TreeviewInputs['hideBorders'], unknown>(false, { transform: booleanAttribute });\n readonly iconResolver = input<TreeviewInputs['iconResolver']>();\n readonly loadChildren = input<TreeviewInputs['loadChildren']>();\n readonly inputLabel = input<TreeviewInputs['inputLabel']>(null);\n readonly labels = input<TreeviewInputs['labels']>();\n /** A node was selected or deselected. */\n readonly nodeselect = output<TreeNodeSelectEventDetail>();\n /** A node expanded (after its lazy load, if any). */\n readonly nodeexpand = output<TreeNodeExpandEventDetail>();\n /** A node collapsed. */\n readonly nodecollapse = output<TreeNodeCollapseEventDetail>();\n /** A lazy node's loader rejected. */\n readonly nodeloaderror = output<TreeNodeLoadErrorEventDetail>();\n /** The ids of the selected nodes. */\n readonly selectedidschange = output<TreeviewIds>();\n /** The ids of the expanded nodes. */\n readonly expandedidschange = output<TreeviewIds>();\n\n private readonly nodeSlot = contentChild(BsTreeviewNodeDirective);\n /** The template's named slots. */\n protected readonly slots = computed(() => ({ node: this.nodeSlot()?.templateRef }));\n readonly #core = useCore(treeviewCore, { inputs: () => ({ items: this.items(), expandedIds: this.expandedIds(), selectedIds: this.selectedIds(), selectionMode: this.selectionMode(), hideBorders: this.hideBorders(), iconResolver: this.iconResolver(), loadChildren: this.loadChildren(), inputLabel: this.inputLabel(), labels: this.labels() }), idPrefix: 'bs-treeview', outputs: { nodeSelect: this.nodeselect, nodeExpand: this.nodeexpand, nodeCollapse: this.nodecollapse, nodeLoadError: this.nodeloaderror, selectedIdsChange: this.selectedidschange, expandedIdsChange: this.expandedidschange }, hostBag: (props) => ({ ...props.view.root, 'data-mps': 'treeview' }), models: { expandedIds: this.expandedIds, selectedIds: this.selectedIds } });\n /** The template's props. */\n protected readonly props = this.#core.props;\n\n constructor() {\n useScopedStyles('treeview', treeviewScopedStyles);\n }\n}\n","<!-- GENERATED from libs/mintplayer-ui-core/treeview/src/templates/treeview.view.vue by @mintplayer/nx-component-compiler. Do not edit. -->\n@let p_view = props().view;\n<ul data-mps=\"treeview\" [mpProps]=\"p_view.tree\">\n @for (row of p_view.rows; track row.key) {\n <li data-mps=\"treeview\" [mpProps]=\"row.item\" [style]=\"row.style\">\n @if (row.error) {\n <span data-mps=\"treeview\" [mpProps]=\"row.errorBag\">\n {{ row.error }}\n </span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"row.chevron\">\n @if (row.loading) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.spinner\"></span>\n }\n </span>\n <span data-mps=\"treeview\" [mpProps]=\"p_view.body\">\n @if (slots().node; as slot_node) {\n <ng-container [ngTemplateOutlet]=\"slot_node\" [ngTemplateOutletContext]=\"{ $implicit: { node: row.node, ctx: row.ctx }, node: row.node, ctx: row.ctx }\" />\n } @else {\n @if (row.icon) {\n <span data-mps=\"treeview\" [mpProps]=\"p_view.icon\" [innerHTML]=\"row.icon | mpTrustedHtml\"></span>\n }\n <span data-mps=\"treeview\" [mpProps]=\"p_view.label\">\n {{ row.node.label }}\n </span>\n }\n </span>\n </li>\n }\n</ul>\n<div data-mps=\"treeview\" [mpProps]=\"p_view.live\">\n {{ p_view.announcement }}\n</div>\n","// GENERATED from the treeview manifest by @mintplayer/nx-component-compiler. Do not edit.\nexport { BsTreeviewComponent, BsTreeviewNodeDirective } from './treeview.component.generated';\n","// The treeview is generated from @mintplayer/ui-core/treeview (PRD #437 D10).\nexport * from './generated';\nexport type {\n IconResolver,\n TreeChildrenLoader,\n TreeNode,\n TreeNodeCollapseEventDetail,\n TreeNodeExpandEventDetail,\n TreeNodeLoadErrorEventDetail,\n TreeNodeRenderContext,\n TreeNodeSelectEventDetail,\n TreeviewIds,\n TreeviewLabels,\n TreeviewSelectionMode,\n} from '@mintplayer/ui-core/treeview';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAAA;AAOA;MAEa,uBAAuB,CAAA;AADpC,IAAA,WAAA,GAAA;AAEW,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAA8H,WAAW,CAAC;AAIxK,IAAA;AAHC,IAAA,OAAO,sBAAsB,CAAC,IAA6B,EAAE,GAAY,EAAA;AACvE,QAAA,OAAO,IAAI;IACb;8GAJW,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAvB,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBADnC,SAAS;mBAAC,EAAE,QAAQ,EAAE,kBAAkB,EAAE;;AAQ3C;;;;;;AAMG;MAOU,mBAAmB,CAAA;AA6BrB,IAAA,KAAK;AAId,IAAA,WAAA,GAAA;;AA/BS,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAA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ject, TemplateRef, input, Directive, model, output, contentChild, viewChild, ElementRef, signal, computed, DestroyRef, effect, untracked,
|
|
3
|
+
import { inject, TemplateRef, input, Directive, model, output, contentChild, viewChild, ElementRef, signal, computed, DestroyRef, effect, untracked, afterNextRender, PLATFORM_ID, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import { isObservable } from 'rxjs';
|
|
6
|
-
import { BsIdService } from '@mintplayer/ng-bootstrap/a11y';
|
|
6
|
+
import { BsIdService, takeHostAria } from '@mintplayer/ng-bootstrap/a11y';
|
|
7
7
|
import { useScopedStyles, machineSignal, MpPropsDirective } from '@mintplayer/ng-bootstrap/machine';
|
|
8
8
|
import { abortError } from '@mintplayer/ui-core/async';
|
|
9
|
+
import { preHydrationValue } from '@mintplayer/ui-core/forms';
|
|
10
|
+
import { trackOpenSide } from '@mintplayer/ui-core/overlay';
|
|
9
11
|
import { TYPEAHEAD_SCOPE, typeaheadScopedStyles, TypeaheadMachine, connect } from '@mintplayer/ui-core/typeahead';
|
|
10
12
|
export { inMemoryTypeaheadProvider } from '@mintplayer/ui-core/typeahead';
|
|
11
13
|
|
|
@@ -102,6 +104,8 @@ class BsTypeaheadComponent {
|
|
|
102
104
|
...(ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []));
|
|
103
105
|
this.inputRef = viewChild.required('input', /* @ts-ignore */
|
|
104
106
|
...(ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []));
|
|
107
|
+
this.listboxRef = viewChild.required('listbox', /* @ts-ignore */
|
|
108
|
+
...(ngDevMode ? [{ debugName: "listboxRef" }] : /* istanbul ignore next */ []));
|
|
105
109
|
this.id = inject(BsIdService).next('bs-typeahead');
|
|
106
110
|
/**
|
|
107
111
|
* Host transparency: a consumer's `aria-*`, `id` and `tabindex` on
|
|
@@ -113,6 +117,9 @@ class BsTypeaheadComponent {
|
|
|
113
117
|
this.hostAria = takeHostAria(inject(ElementRef).nativeElement);
|
|
114
118
|
this.disabledByCva = signal(false, /* @ts-ignore */
|
|
115
119
|
...(ngDevMode ? [{ debugName: "disabledByCva" }] : /* istanbul ignore next */ []));
|
|
120
|
+
/** Set by afterNextRender (client only), so the readiness mark is never in server HTML. */
|
|
121
|
+
this.hydrated = signal(false, /* @ts-ignore */
|
|
122
|
+
...(ngDevMode ? [{ debugName: "hydrated" }] : /* istanbul ignore next */ []));
|
|
116
123
|
this.onChange = () => undefined;
|
|
117
124
|
this.onTouched = () => undefined;
|
|
118
125
|
this.trackItem = (index, item) => this.machine.itemKeyOf(item) ?? index;
|
|
@@ -136,7 +143,7 @@ class BsTypeaheadComponent {
|
|
|
136
143
|
});
|
|
137
144
|
this.state = machineSignal(this.machine);
|
|
138
145
|
this.api = computed(() => {
|
|
139
|
-
const api = connect(this.state(), this.id, { name: this.name() });
|
|
146
|
+
const api = connect(this.state(), this.id, { name: this.name(), hydrated: this.hydrated() });
|
|
140
147
|
// A host aria-label / aria-labelledby wins over inputLabel (naming conformance).
|
|
141
148
|
return { ...api, input: { ...api.input, ...this.hostAria } };
|
|
142
149
|
}, /* @ts-ignore */
|
|
@@ -176,6 +183,13 @@ class BsTypeaheadComponent {
|
|
|
176
183
|
this.machine.setValue(next);
|
|
177
184
|
});
|
|
178
185
|
this.adoptPreHydrationText(host);
|
|
186
|
+
// Browser only (afterNextRender never runs on the server): flip the list above the input near the viewport bottom.
|
|
187
|
+
const destroyRef = inject(DestroyRef);
|
|
188
|
+
afterNextRender(() => {
|
|
189
|
+
const untrack = trackOpenSide(this.machine, () => this.inputRef().nativeElement, () => this.listboxRef().nativeElement);
|
|
190
|
+
destroyRef.onDestroy(untrack);
|
|
191
|
+
this.hydrated.set(true);
|
|
192
|
+
});
|
|
179
193
|
}
|
|
180
194
|
/**
|
|
181
195
|
* Text typed or pasted into the server-rendered input before hydration lives
|
|
@@ -188,8 +202,8 @@ class BsTypeaheadComponent {
|
|
|
188
202
|
adoptPreHydrationText(host) {
|
|
189
203
|
if (!isPlatformBrowser(inject(PLATFORM_ID)))
|
|
190
204
|
return;
|
|
191
|
-
const typed = host.
|
|
192
|
-
if (
|
|
205
|
+
const typed = preHydrationValue(host, this.machine.snapshot.term, 'input');
|
|
206
|
+
if (typed === null)
|
|
193
207
|
return;
|
|
194
208
|
this.machine.setValue(typed);
|
|
195
209
|
this.value.set(typed);
|
|
@@ -232,20 +246,12 @@ class BsTypeaheadComponent {
|
|
|
232
246
|
this.disabledByCva.set(isDisabled);
|
|
233
247
|
}
|
|
234
248
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
235
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, itemKey: { classPropertyName: "itemKey", publicName: "itemKey", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsLabel: { classPropertyName: "resultsLabel", publicName: "resultsLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", select: "select", submitted: "submitted", opened: "opened", closed: "closed", loadError: "loadError" }, host: { attributes: { "role": "presentation" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: BsTypeaheadItemDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
249
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: BsTypeaheadComponent, isStandalone: true, selector: "bs-typeahead", inputs: { provider: { classPropertyName: "provider", publicName: "provider", isSignal: true, isRequired: false, transformFunction: null }, debounceMs: { classPropertyName: "debounceMs", publicName: "debounceMs", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, itemText: { classPropertyName: "itemText", publicName: "itemText", isSignal: true, isRequired: false, transformFunction: null }, itemKey: { classPropertyName: "itemKey", publicName: "itemKey", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, inputLabel: { classPropertyName: "inputLabel", publicName: "inputLabel", isSignal: true, isRequired: false, transformFunction: null }, loadingLabel: { classPropertyName: "loadingLabel", publicName: "loadingLabel", isSignal: true, isRequired: false, transformFunction: null }, noResultsLabel: { classPropertyName: "noResultsLabel", publicName: "noResultsLabel", isSignal: true, isRequired: false, transformFunction: null }, resultsLabel: { classPropertyName: "resultsLabel", publicName: "resultsLabel", isSignal: true, isRequired: false, transformFunction: null }, errorText: { classPropertyName: "errorText", publicName: "errorText", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", select: "select", submitted: "submitted", opened: "opened", closed: "closed", loadError: "loadError" }, host: { attributes: { "role": "presentation" } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], queries: [{ propertyName: "itemTemplate", first: true, predicate: BsTypeaheadItemDirective, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "inputRef", first: true, predicate: ["input"], descendants: true, isSignal: true }, { propertyName: "listboxRef", first: true, predicate: ["listbox"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul #listbox class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: MpPropsDirective, selector: "[mpProps]", inputs: ["mpProps"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
236
250
|
}
|
|
237
251
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: BsTypeaheadComponent, decorators: [{
|
|
238
252
|
type: Component,
|
|
239
|
-
args: [{ selector: 'bs-typeahead', imports: [NgTemplateOutlet, MpPropsDirective], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'presentation' }, template: "<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n" }]
|
|
240
|
-
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemText", required: false }] }], itemKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemKey", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], resultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsLabel", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], select: [{ type: i0.Output, args: ["select"] }], submitted: [{ type: i0.Output, args: ["submitted"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], loadError: [{ type: i0.Output, args: ["loadError"] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTypeaheadItemDirective), { isSignal: true }] }], inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }] } });
|
|
241
|
-
/** Collect `aria-*` (copied) and `id` / `tabindex` (moved) from the host element. */
|
|
242
|
-
function takeHostAria(host) {
|
|
243
|
-
const bag = Object.fromEntries(Array.from(host.attributes)
|
|
244
|
-
.filter(({ name }) => name.startsWith('aria-') || name === 'id' || name === 'tabindex')
|
|
245
|
-
.map(({ name, value }) => [name, value]));
|
|
246
|
-
['id', 'tabindex'].filter((name) => name in bag).forEach((name) => host.removeAttribute(name));
|
|
247
|
-
return bag;
|
|
248
|
-
}
|
|
253
|
+
args: [{ selector: 'bs-typeahead', imports: [NgTemplateOutlet, MpPropsDirective], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BsTypeaheadComponent), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, host: { role: 'presentation' }, template: "<div class=\"mp-typeahead\" [mpProps]=\"api().root\">\n <input #input\n class=\"form-control\"\n type=\"text\"\n [mpProps]=\"api().input\"\n [value]=\"state().term\"\n (input)=\"onInput($event)\"\n (keydown)=\"onKeydown($event)\"\n (blur)=\"onBlur()\" />\n <ul #listbox class=\"dropdown-menu\" [mpProps]=\"api().listbox\">\n @if (api().status; as status) {\n <li class=\"ta-status\" [mpProps]=\"status.attrs\">{{ status.text }}</li>\n }\n @for (item of state().items; track trackItem($index, item); let i = $index) {\n <li class=\"dropdown-item\" [mpProps]=\"api().option(i)\" (mousedown)=\"$event.preventDefault()\" (click)=\"machine.pick(i)\">\n <ng-container *ngTemplateOutlet=\"itemTemplate()?.templateRef ?? defaultItem; context: { $implicit: item, term: state().term }\"></ng-container>\n </li>\n }\n </ul>\n <span class=\"visually-hidden\" [mpProps]=\"api().live.attrs\">{{ api().live.text }}</span>\n @if (api().error; as error) {\n <div class=\"ta-error\" [mpProps]=\"error.attrs\">{{ error.text }}</div>\n }\n</div>\n<ng-template #defaultItem let-item>{{ machine.itemTextOf(item) }}</ng-template>\n" }]
|
|
254
|
+
}], ctorParameters: () => [], propDecorators: { provider: [{ type: i0.Input, args: [{ isSignal: true, alias: "provider", required: false }] }], debounceMs: [{ type: i0.Input, args: [{ isSignal: true, alias: "debounceMs", required: false }] }], minLength: [{ type: i0.Input, args: [{ isSignal: true, alias: "minLength", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], itemText: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemText", required: false }] }], itemKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "itemKey", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], inputLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputLabel", required: false }] }], loadingLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "loadingLabel", required: false }] }], noResultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "noResultsLabel", required: false }] }], resultsLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "resultsLabel", required: false }] }], errorText: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorText", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], select: [{ type: i0.Output, args: ["select"] }], submitted: [{ type: i0.Output, args: ["submitted"] }], opened: [{ type: i0.Output, args: ["opened"] }], closed: [{ type: i0.Output, args: ["closed"] }], loadError: [{ type: i0.Output, args: ["loadError"] }], itemTemplate: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BsTypeaheadItemDirective), { isSignal: true }] }], inputRef: [{ type: i0.ViewChild, args: ['input', { isSignal: true }] }], listboxRef: [{ type: i0.ViewChild, args: ['listbox', { isSignal: true }] }] } });
|
|
249
255
|
/** Promise or Observable in, Promise out; the Observable is unsubscribed when the request aborts. */
|
|
250
256
|
function adaptProvider(provider) {
|
|
251
257
|
return (term, request) => {
|