@mintplayer/ng-spark 22.23.0 → 22.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/README.md +181 -0
  2. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs +100 -47
  3. package/fesm2022/mintplayer-ng-spark-attribute-description.mjs.map +1 -1
  4. package/fesm2022/mintplayer-ng-spark-client-operations.mjs +308 -329
  5. package/fesm2022/mintplayer-ng-spark-client-operations.mjs.map +1 -1
  6. package/fesm2022/mintplayer-ng-spark-column-filter.mjs +175 -135
  7. package/fesm2022/mintplayer-ng-spark-column-filter.mjs.map +1 -1
  8. package/fesm2022/mintplayer-ng-spark-grid.mjs +2259 -1119
  9. package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
  10. package/fesm2022/mintplayer-ng-spark-history.mjs +611 -0
  11. package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
  12. package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
  13. package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
  14. package/fesm2022/mintplayer-ng-spark-models.mjs +366 -762
  15. package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
  17. package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
  18. package/fesm2022/mintplayer-ng-spark-panels.mjs +52 -0
  19. package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
  20. package/fesm2022/mintplayer-ng-spark-pipes.mjs +1122 -765
  21. package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
  22. package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
  23. package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-spark-po-detail.mjs +786 -410
  25. package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-spark-po-edit.mjs +292 -284
  27. package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-spark-po-form.mjs +2187 -1225
  29. package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-spark-query-list.mjs +516 -303
  31. package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-spark-renderers.mjs +17 -55
  33. package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
  35. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
  37. package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
  39. package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-spark-shell.mjs +1013 -397
  41. package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
  43. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
  44. package/fesm2022/mintplayer-ng-spark.mjs +13 -50
  45. package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
  46. package/package.json +17 -1
  47. package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
  48. package/types/mintplayer-ng-spark-client-operations.d.ts +133 -160
  49. package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
  50. package/types/mintplayer-ng-spark-grid.d.ts +885 -448
  51. package/types/mintplayer-ng-spark-history.d.ts +223 -0
  52. package/types/mintplayer-ng-spark-icon.d.ts +15 -13
  53. package/types/mintplayer-ng-spark-models.d.ts +624 -573
  54. package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
  55. package/types/mintplayer-ng-spark-panels.d.ts +108 -0
  56. package/types/mintplayer-ng-spark-pipes.d.ts +120 -149
  57. package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
  58. package/types/mintplayer-ng-spark-po-detail.d.ts +177 -117
  59. package/types/mintplayer-ng-spark-po-edit.d.ts +64 -65
  60. package/types/mintplayer-ng-spark-po-form.d.ts +507 -371
  61. package/types/mintplayer-ng-spark-query-list.d.ts +118 -82
  62. package/types/mintplayer-ng-spark-renderers.d.ts +79 -85
  63. package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
  64. package/types/mintplayer-ng-spark-routes.d.ts +7 -11
  65. package/types/mintplayer-ng-spark-services.d.ts +377 -261
  66. package/types/mintplayer-ng-spark-shell.d.ts +209 -128
  67. package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
  68. package/types/mintplayer-ng-spark.d.ts +7 -12
@@ -1,88 +1,220 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, input, signal, effect, untracked, ChangeDetectionStrategy, Component, TemplateRef, Directive, contentChild, computed, contentChildren } from '@angular/core';
3
- import { NgTemplateOutlet, KeyValuePipe } from '@angular/common';
4
- import { BsShellComponent, BsShellSidebarDirective } from '@mintplayer/ng-bootstrap/shell';
5
- import { BsNavbarTogglerComponent } from '@mintplayer/ng-bootstrap/navbar-toggler';
6
- import { RouterLink, RouterLinkActive } from '@angular/router';
7
- import { BsAccordionComponent, BsAccordionTabComponent, BsAccordionTabHeaderDirective } from '@mintplayer/ng-bootstrap/accordion';
8
- import { SPARK_AUTH_STATE } from '@mintplayer/ng-spark';
9
- import { SparkService, SparkLanguageService } from '@mintplayer/ng-spark/services';
10
- import { ResolveTranslationPipe, IconNamePipe, RouterLinkPipe } from '@mintplayer/ng-spark/pipes';
11
- import { SparkIconComponent } from '@mintplayer/ng-spark/icon';
12
- import * as i1 from '@angular/forms';
13
- import { FormsModule } from '@angular/forms';
14
- import { BsSelectComponent, BsSelectOption } from '@mintplayer/ng-bootstrap/select';
15
-
16
- /**
17
- * The server-driven navigation menu: an accordion of program-unit groups fetched from
18
- * `GET /spark/program-units`, which the server has already filtered to what the caller's rights
19
- * allow. Hosts write ZERO router links for navigation — every group, unit, icon, label and link
20
- * comes from `programUnits.json`; content around the menu belongs in `<spark-shell>`'s slots,
21
- * and a host tempted to hand-write a unit anchor should add a unit to `programUnits.json`
22
- * instead.
23
- *
24
- * Because the response is caller-scoped it must be re-fetched when the caller changes: the
25
- * component tracks the optional `SPARK_AUTH_STATE` signal (supplied by ng-spark-auth's
26
- * `provideSparkAuth()`, or by the app's own auth stack) and reloads on every change. Without a
27
- * provider it fetches once. `reloadToken` is the manual escape hatch (any changed value triggers
28
- * a reload), and `reload()` the imperative one.
29
- *
30
- * Usually rendered by `<spark-shell>`; exported standalone for hosts that own their own layout.
31
- */
32
- class SparkProgramUnitsComponent {
33
- sparkService = inject(SparkService);
34
- authState = inject(SPARK_AUTH_STATE, { optional: true });
35
- /** Any changed value triggers a reload — for apps whose auth state isn't a provided signal. */
36
- reloadToken = input(null, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []));
38
- /**
39
- * Extra tabs to render after the generated groups, normally forwarded by `<spark-shell>` from
40
- * its `*sparkShellTab` directives. They must be rendered by THIS template — see
41
- * `SparkShellTabDirective` for why a host-declared `<bs-accordion-tab>` cannot work.
42
- */
43
- extraTabs = input([], /* @ts-ignore */
44
- ...(ngDevMode ? [{ debugName: "extraTabs" }] : /* istanbul ignore next */ []));
45
- groups = signal([], /* @ts-ignore */
46
- ...(ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []));
47
- constructor() {
48
- effect(() => {
49
- this.authState?.();
50
- this.reloadToken();
51
- untracked(() => this.reload());
52
- });
53
- }
54
- /** Re-fetches the menu. The response is already rights-filtered per caller. */
55
- async reload() {
56
- const config = await this.sparkService.getProgramUnits();
57
- // Order is the server file's contract, but sort both levels here so the rendered menu never
58
- // depends on JSON array order — groups were sorted, units were not (#324 F5).
59
- const groups = [...config.programUnitGroups]
60
- .sort((a, b) => a.order - b.order)
61
- .map(g => ({ ...g, programUnits: [...g.programUnits].sort((a, b) => a.order - b.order) }));
62
- this.groups.set(groups);
63
- }
64
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkProgramUnitsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
65
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: SparkProgramUnitsComponent, isStandalone: true, selector: "spark-program-units", inputs: { reloadToken: { classPropertyName: "reloadToken", publicName: "reloadToken", isSignal: true, isRequired: false, transformFunction: null }, extraTabs: { classPropertyName: "extraTabs", publicName: "extraTabs", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<bs-accordion class=\"d-block\">\n @for (group of groups(); track group.id) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n <spark-icon [name]=\"group.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ group.name | resolveTranslation }}</span>\n </ng-container>\n @for (unit of group.programUnits; track unit.id) {\n @if (unit | routerLink; as link) {\n <a [routerLink]=\"link\"\n routerLinkActive=\"active\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-file'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n } @else {\n <!-- A url unit is an external address: a plain anchor, never a router link. -->\n <a [href]=\"unit.url\" target=\"_blank\" rel=\"noopener\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-box-arrow-up-right'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n }\n }\n </bs-accordion-tab>\n }\n <!-- Host-contributed tabs are rendered HERE, by this template, so that the accordion's content\n query registers them and they join the generated groups' single-open group. -->\n @for (tab of extraTabs(); track tab.content) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n @if (tab.headerTemplate; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-icon [name]=\"tab.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ tab.header }}</span>\n }\n </ng-container>\n <ng-container *ngTemplateOutlet=\"tab.content\" />\n </bs-accordion-tab>\n }\n</bs-accordion>\n", styles: [":host{display:block;--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:#ffffff1a}.nav-link.active{background-color:#fff3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "browserUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: BsAccordionComponent, selector: "bs-accordion", inputs: ["multi", "highlightActiveTab"] }, { kind: "component", type: BsAccordionTabComponent, selector: "bs-accordion-tab", inputs: ["isActive", "disabled"], outputs: ["isActiveChange"] }, { kind: "directive", type: BsAccordionTabHeaderDirective, selector: "[bsAccordionTabHeader]" }, { kind: "component", type: SparkIconComponent, selector: "spark-icon", inputs: ["name"] }, { kind: "pipe", type: ResolveTranslationPipe, name: "resolveTranslation" }, { kind: "pipe", type: IconNamePipe, name: "iconName" }, { kind: "pipe", type: RouterLinkPipe, name: "routerLink" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkProgramUnitsComponent, decorators: [{
68
- type: Component,
69
- args: [{ selector: 'spark-program-units', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
70
- NgTemplateOutlet,
71
- RouterLink, RouterLinkActive,
72
- BsAccordionComponent, BsAccordionTabComponent, BsAccordionTabHeaderDirective,
73
- SparkIconComponent, ResolveTranslationPipe, IconNamePipe, RouterLinkPipe,
74
- ], template: "<bs-accordion class=\"d-block\">\n @for (group of groups(); track group.id) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n <spark-icon [name]=\"group.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ group.name | resolveTranslation }}</span>\n </ng-container>\n @for (unit of group.programUnits; track unit.id) {\n @if (unit | routerLink; as link) {\n <a [routerLink]=\"link\"\n routerLinkActive=\"active\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-file'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n } @else {\n <!-- A url unit is an external address: a plain anchor, never a router link. -->\n <a [href]=\"unit.url\" target=\"_blank\" rel=\"noopener\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-box-arrow-up-right'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n }\n }\n </bs-accordion-tab>\n }\n <!-- Host-contributed tabs are rendered HERE, by this template, so that the accordion's content\n query registers them and they join the generated groups' single-open group. -->\n @for (tab of extraTabs(); track tab.content) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n @if (tab.headerTemplate; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-icon [name]=\"tab.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ tab.header }}</span>\n }\n </ng-container>\n <ng-container *ngTemplateOutlet=\"tab.content\" />\n </bs-accordion-tab>\n }\n</bs-accordion>\n", styles: [":host{display:block;--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:#ffffff1a}.nav-link.active{background-color:#fff3}\n"] }]
75
- }], ctorParameters: () => [], propDecorators: { reloadToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloadToken", required: false }] }], extraTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "extraTabs", required: false }] }] } });
76
-
77
- /**
78
- * The culture switcher: a `bs-select` over `SparkLanguageService`'s languages, persisting the
79
- * choice. Renders nothing when the app declares one language (or none), so hosts can include it
80
- * unconditionally — `<spark-shell>`'s topbar does exactly that as its trailing default.
81
- */
82
- class SparkLanguageSelectorComponent {
83
- lang = inject(SparkLanguageService);
84
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkLanguageSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
85
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: SparkLanguageSelectorComponent, isStandalone: true, selector: "spark-language-selector", ngImport: i0, template: `
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, TemplateRef, computed, contentChild, contentChildren, effect, inject, input, signal, untracked } from "@angular/core";
3
+ import { KeyValuePipe, NgTemplateOutlet } from "@angular/common";
4
+ import { BsShellComponent, BsShellSidebarDirective } from "@mintplayer/ng-bootstrap/shell";
5
+ import { BsNavbarTogglerComponent } from "@mintplayer/ng-bootstrap/navbar-toggler";
6
+ import { RouterLink, RouterLinkActive } from "@angular/router";
7
+ import { BsAccordionComponent, BsAccordionTabComponent, BsAccordionTabHeaderDirective } from "@mintplayer/ng-bootstrap/accordion";
8
+ import { SPARK_AUTH_STATE } from "@mintplayer/ng-spark";
9
+ import { SparkLanguageService, SparkService } from "@mintplayer/ng-spark/services";
10
+ import { IconNamePipe, ResolveTranslationPipe, RouterLinkPipe } from "@mintplayer/ng-spark/pipes";
11
+ import { SparkIconComponent } from "@mintplayer/ng-spark/icon";
12
+ import * as i1 from "@angular/forms";
13
+ import { FormsModule } from "@angular/forms";
14
+ import { BsSelectComponent, BsSelectOption } from "@mintplayer/ng-bootstrap/select";
15
+ var SparkProgramUnitsComponent = class SparkProgramUnitsComponent {
16
+ sparkService = inject(SparkService);
17
+ authState = inject(SPARK_AUTH_STATE, { optional: true });
18
+ reloadToken = input(null, ...ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []);
19
+ extraTabs = input([], ...ngDevMode ? [{ debugName: "extraTabs" }] : /* istanbul ignore next */ []);
20
+ groups = signal([], ...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
21
+ constructor() {
22
+ effect(() => {
23
+ this.authState?.();
24
+ this.reloadToken();
25
+ untracked(() => this.reload());
26
+ });
27
+ }
28
+ async reload() {
29
+ const groups = [...(await this.sparkService.getProgramUnits()).programUnitGroups].sort((a, b) => a.order - b.order).map((g) => ({
30
+ ...g,
31
+ programUnits: [...g.programUnits].sort((a, b) => a.order - b.order)
32
+ }));
33
+ this.groups.set(groups);
34
+ }
35
+ static ɵfac = i0.ɵɵngDeclareFactory({
36
+ minVersion: "12.0.0",
37
+ version: "22.2.0",
38
+ ngImport: i0,
39
+ type: SparkProgramUnitsComponent,
40
+ deps: [],
41
+ target: i0.ɵɵFactoryTarget.Component
42
+ });
43
+ static ɵcmp = i0.ɵɵngDeclareComponent({
44
+ minVersion: "17.0.0",
45
+ version: "22.2.0",
46
+ type: SparkProgramUnitsComponent,
47
+ isStandalone: true,
48
+ selector: "spark-program-units",
49
+ inputs: {
50
+ reloadToken: {
51
+ classPropertyName: "reloadToken",
52
+ publicName: "reloadToken",
53
+ isSignal: true,
54
+ isRequired: false,
55
+ transformFunction: null
56
+ },
57
+ extraTabs: {
58
+ classPropertyName: "extraTabs",
59
+ publicName: "extraTabs",
60
+ isSignal: true,
61
+ isRequired: false,
62
+ transformFunction: null
63
+ }
64
+ },
65
+ ngImport: i0,
66
+ template: "<bs-accordion class=\"d-block\">\n @for (group of groups(); track group.id) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n <spark-icon [name]=\"group.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ group.name | resolveTranslation }}</span>\n </ng-container>\n @for (unit of group.programUnits; track unit.id) {\n @if (unit | routerLink; as link) {\n <a [routerLink]=\"link\"\n routerLinkActive=\"active\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-file'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n } @else {\n <!-- A url unit is an external address: a plain anchor, never a router link. -->\n <a [href]=\"unit.url\" target=\"_blank\" rel=\"noopener\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-box-arrow-up-right'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n }\n }\n </bs-accordion-tab>\n }\n <!-- Host-contributed tabs are rendered HERE, by this template, so that the accordion's content\n query registers them and they join the generated groups' single-open group. -->\n @for (tab of extraTabs(); track tab.content) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n @if (tab.headerTemplate; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-icon [name]=\"tab.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ tab.header }}</span>\n }\n </ng-container>\n <ng-container *ngTemplateOutlet=\"tab.content\" />\n </bs-accordion-tab>\n }\n</bs-accordion>\n",
67
+ styles: [":host{display:block;--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:#ffffff1a}.nav-link.active{background-color:#fff3}\n"],
68
+ dependencies: [
69
+ {
70
+ kind: "directive",
71
+ type: NgTemplateOutlet,
72
+ selector: "[ngTemplateOutlet]",
73
+ inputs: [
74
+ "ngTemplateOutletContext",
75
+ "ngTemplateOutlet",
76
+ "ngTemplateOutletInjector"
77
+ ]
78
+ },
79
+ {
80
+ kind: "directive",
81
+ type: RouterLink,
82
+ selector: "[routerLink]",
83
+ inputs: [
84
+ "target",
85
+ "queryParams",
86
+ "fragment",
87
+ "queryParamsHandling",
88
+ "state",
89
+ "info",
90
+ "relativeTo",
91
+ "preserveFragment",
92
+ "skipLocationChange",
93
+ "replaceUrl",
94
+ "browserUrl",
95
+ "routerLink"
96
+ ]
97
+ },
98
+ {
99
+ kind: "directive",
100
+ type: RouterLinkActive,
101
+ selector: "[routerLinkActive]",
102
+ inputs: [
103
+ "routerLinkActiveOptions",
104
+ "ariaCurrentWhenActive",
105
+ "routerLinkActive"
106
+ ],
107
+ outputs: ["isActiveChange"],
108
+ exportAs: ["routerLinkActive"]
109
+ },
110
+ {
111
+ kind: "component",
112
+ type: BsAccordionComponent,
113
+ selector: "bs-accordion",
114
+ inputs: ["multi", "highlightActiveTab"]
115
+ },
116
+ {
117
+ kind: "component",
118
+ type: BsAccordionTabComponent,
119
+ selector: "bs-accordion-tab",
120
+ inputs: ["isActive", "disabled"],
121
+ outputs: ["isActiveChange"]
122
+ },
123
+ {
124
+ kind: "directive",
125
+ type: BsAccordionTabHeaderDirective,
126
+ selector: "[bsAccordionTabHeader]"
127
+ },
128
+ {
129
+ kind: "component",
130
+ type: SparkIconComponent,
131
+ selector: "spark-icon",
132
+ inputs: ["name"]
133
+ },
134
+ {
135
+ kind: "pipe",
136
+ type: ResolveTranslationPipe,
137
+ name: "resolveTranslation"
138
+ },
139
+ {
140
+ kind: "pipe",
141
+ type: IconNamePipe,
142
+ name: "iconName"
143
+ },
144
+ {
145
+ kind: "pipe",
146
+ type: RouterLinkPipe,
147
+ name: "routerLink"
148
+ }
149
+ ],
150
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
151
+ });
152
+ };
153
+ i0.ɵɵngDeclareClassMetadata({
154
+ minVersion: "12.0.0",
155
+ version: "22.2.0",
156
+ ngImport: i0,
157
+ type: SparkProgramUnitsComponent,
158
+ decorators: [{
159
+ type: Component,
160
+ args: [{
161
+ selector: "spark-program-units",
162
+ standalone: true,
163
+ changeDetection: ChangeDetectionStrategy.OnPush,
164
+ imports: [
165
+ NgTemplateOutlet,
166
+ RouterLink,
167
+ RouterLinkActive,
168
+ BsAccordionComponent,
169
+ BsAccordionTabComponent,
170
+ BsAccordionTabHeaderDirective,
171
+ SparkIconComponent,
172
+ ResolveTranslationPipe,
173
+ IconNamePipe,
174
+ RouterLinkPipe
175
+ ],
176
+ template: "<bs-accordion class=\"d-block\">\n @for (group of groups(); track group.id) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n <spark-icon [name]=\"group.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ group.name | resolveTranslation }}</span>\n </ng-container>\n @for (unit of group.programUnits; track unit.id) {\n @if (unit | routerLink; as link) {\n <a [routerLink]=\"link\"\n routerLinkActive=\"active\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-file'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n } @else {\n <!-- A url unit is an external address: a plain anchor, never a router link. -->\n <a [href]=\"unit.url\" target=\"_blank\" rel=\"noopener\"\n class=\"d-block px-3 py-2 text-decoration-none nav-link\">\n <spark-icon [name]=\"unit.icon | iconName:'bi-box-arrow-up-right'\" />\n <span class=\"ms-2\">{{ unit.name | resolveTranslation }}</span>\n </a>\n }\n }\n </bs-accordion-tab>\n }\n <!-- Host-contributed tabs are rendered HERE, by this template, so that the accordion's content\n query registers them and they join the generated groups' single-open group. -->\n @for (tab of extraTabs(); track tab.content) {\n <bs-accordion-tab>\n <ng-container *bsAccordionTabHeader>\n @if (tab.headerTemplate; as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-icon [name]=\"tab.icon | iconName:'bi-folder'\" />\n <span class=\"ms-2\">{{ tab.header }}</span>\n }\n </ng-container>\n <ng-container *ngTemplateOutlet=\"tab.content\" />\n </bs-accordion-tab>\n }\n</bs-accordion>\n",
177
+ styles: [":host{display:block;--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:#ffffff1a}.nav-link.active{background-color:#fff3}\n"]
178
+ }]
179
+ }],
180
+ ctorParameters: () => [],
181
+ propDecorators: {
182
+ reloadToken: [{
183
+ type: i0.Input,
184
+ args: [{
185
+ isSignal: true,
186
+ alias: "reloadToken",
187
+ required: false
188
+ }]
189
+ }],
190
+ extraTabs: [{
191
+ type: i0.Input,
192
+ args: [{
193
+ isSignal: true,
194
+ alias: "extraTabs",
195
+ required: false
196
+ }]
197
+ }]
198
+ }
199
+ });
200
+ var SparkLanguageSelectorComponent = class SparkLanguageSelectorComponent {
201
+ lang = inject(SparkLanguageService);
202
+ static ɵfac = i0.ɵɵngDeclareFactory({
203
+ minVersion: "12.0.0",
204
+ version: "22.2.0",
205
+ ngImport: i0,
206
+ type: SparkLanguageSelectorComponent,
207
+ deps: [],
208
+ target: i0.ɵɵFactoryTarget.Component
209
+ });
210
+ static ɵcmp = i0.ɵɵngDeclareComponent({
211
+ minVersion: "17.0.0",
212
+ version: "22.2.0",
213
+ type: SparkLanguageSelectorComponent,
214
+ isStandalone: true,
215
+ selector: "spark-language-selector",
216
+ ngImport: i0,
217
+ template: `
86
218
  @if (lang.languages() | keyvalue; as langs) {
87
219
  @if (langs.length > 1) {
88
220
  <bs-select [ngModel]="lang.language()" (ngModelChange)="lang.setLanguage($event)">
@@ -92,16 +224,94 @@ class SparkLanguageSelectorComponent {
92
224
  </bs-select>
93
225
  }
94
226
  }
95
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: BsSelectComponent, selector: "bs-select", inputs: ["identifier", "size", "multiple", "numberVisible", "disabled"] }, { kind: "directive", type: BsSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: ResolveTranslationPipe, name: "resolveTranslation" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
96
- }
97
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkLanguageSelectorComponent, decorators: [{
98
- type: Component,
99
- args: [{
100
- selector: 'spark-language-selector',
101
- standalone: true,
102
- changeDetection: ChangeDetectionStrategy.OnPush,
103
- imports: [KeyValuePipe, FormsModule, BsSelectComponent, BsSelectOption, ResolveTranslationPipe],
104
- template: `
227
+ `,
228
+ isInline: true,
229
+ dependencies: [
230
+ {
231
+ kind: "ngmodule",
232
+ type: FormsModule
233
+ },
234
+ {
235
+ kind: "directive",
236
+ type: i1.NgSelectOption,
237
+ selector: "option",
238
+ inputs: ["ngValue", "value"]
239
+ },
240
+ {
241
+ kind: "directive",
242
+ type: i1.ɵNgSelectMultipleOption,
243
+ selector: "option",
244
+ inputs: ["ngValue", "value"]
245
+ },
246
+ {
247
+ kind: "directive",
248
+ type: i1.NgControlStatus,
249
+ selector: "[formControlName],[ngModel],[formControl]"
250
+ },
251
+ {
252
+ kind: "directive",
253
+ type: i1.NgModel,
254
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
255
+ inputs: [
256
+ "name",
257
+ "disabled",
258
+ "ngModel",
259
+ "ngModelOptions"
260
+ ],
261
+ outputs: ["ngModelChange"],
262
+ exportAs: ["ngModel"]
263
+ },
264
+ {
265
+ kind: "component",
266
+ type: BsSelectComponent,
267
+ selector: "bs-select",
268
+ inputs: [
269
+ "identifier",
270
+ "size",
271
+ "multiple",
272
+ "numberVisible",
273
+ "disabled"
274
+ ]
275
+ },
276
+ {
277
+ kind: "directive",
278
+ type: BsSelectOption,
279
+ selector: "option",
280
+ inputs: ["ngValue", "value"]
281
+ },
282
+ {
283
+ kind: "pipe",
284
+ type: KeyValuePipe,
285
+ name: "keyvalue"
286
+ },
287
+ {
288
+ kind: "pipe",
289
+ type: ResolveTranslationPipe,
290
+ name: "resolveTranslation"
291
+ }
292
+ ],
293
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
294
+ });
295
+ };
296
+ i0.ɵɵngDeclareClassMetadata({
297
+ minVersion: "12.0.0",
298
+ version: "22.2.0",
299
+ ngImport: i0,
300
+ type: SparkLanguageSelectorComponent,
301
+ decorators: [{
302
+ type: Component,
303
+ args: [{
304
+ selector: "spark-language-selector",
305
+ standalone: true,
306
+ changeDetection: ChangeDetectionStrategy.OnPush,
307
+ imports: [
308
+ KeyValuePipe,
309
+ FormsModule,
310
+ BsSelectComponent,
311
+ BsSelectOption,
312
+ ResolveTranslationPipe
313
+ ],
314
+ template: `
105
315
  @if (lang.languages() | keyvalue; as langs) {
106
316
  @if (langs.length > 1) {
107
317
  <bs-select [ngModel]="lang.language()" (ngModelChange)="lang.setLanguage($event)">
@@ -111,306 +321,712 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
111
321
  </bs-select>
112
322
  }
113
323
  }
114
- `,
115
- }]
116
- }] });
117
-
118
- /**
119
- * Region slots for `<spark-shell>`.
120
- *
121
- * Each directive marks a template that REPLACES one region of the shell chrome (or fills an
122
- * empty one). An omitted slot is not an empty slot: the shell renders its default — the toggler,
123
- * the language selector, the title heading — so a host that supplies nothing still gets a
124
- * complete working shell, and a host that supplies one slot leaves the rest alone.
125
- *
126
- * The menu itself is deliberately NOT a slot. Navigation is sourced entirely from
127
- * `programUnits.json` through the rights-filtered `/spark/program-units` endpoint and re-fetched
128
- * on sign-in/out; a host that finds itself writing unit anchors in a slot should be adding units
129
- * to `programUnits.json` instead. Slots exist for the content AROUND the menu: an auth bar, a
130
- * user chip, branding, a one-off extra link, an alert strip above the routed content.
131
- *
132
- * Naming follows the house convention (prefix, component, slot — see `*sparkQueryIcon` in
133
- * `@mintplayer/ng-spark/grid`): `sparkShell` + region. Every slot also exists as a `TemplateRef`
134
- * input on `SparkShellComponent` for hosts that cannot use content projection.
135
- *
136
- * ```html
137
- * <spark-shell title="My App">
138
- * <spark-auth-bar *sparkShellTopbarEnd />
139
- * <div *sparkShellSidebarTop>
140
- * <a routerLink="/github-projects" class="nav-link">GitHub projects</a>
141
- * </div>
142
- * <router-outlet />
143
- * </spark-shell>
144
- * ```
145
- */
146
- /** Topbar, leading edge. Default: a `bs-navbar-toggler` mirroring the shell's open state. */
147
- class SparkShellTopbarStartDirective {
148
- templateRef = inject(TemplateRef);
149
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarStartDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
150
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellTopbarStartDirective, isStandalone: true, selector: "[sparkShellTopbarStart]", ngImport: i0 });
151
- }
152
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarStartDirective, decorators: [{
153
- type: Directive,
154
- args: [{ selector: '[sparkShellTopbarStart]' }]
155
- }] });
156
- /**
157
- * Topbar, trailing edge. Default: the language selector (which hides itself when the app has
158
- * one language). This is where an auth bar goes — the shell cannot ship one itself, since
159
- * `@mintplayer/ng-spark` does not (and must not) depend on `@mintplayer/ng-spark-auth`.
160
- */
161
- class SparkShellTopbarEndDirective {
162
- templateRef = inject(TemplateRef);
163
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarEndDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
164
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellTopbarEndDirective, isStandalone: true, selector: "[sparkShellTopbarEnd]", ngImport: i0 });
165
- }
166
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarEndDirective, decorators: [{
167
- type: Directive,
168
- args: [{ selector: '[sparkShellTopbarEnd]' }]
169
- }] });
170
- /**
171
- * Topbar, trailing edge, **beside** the default chrome rather than instead of it — rendered before
172
- * the language selector, which stays.
173
- *
174
- * ## Why this is not just `*sparkShellTopbarEnd`
175
- *
176
- * That slot REPLACES the region, which is right for an auth bar (a host taking over the trailing
177
- * edge wholesale) and wrong for a page-level action button. A host that only wanted to add a
178
- * button had to re-render the language selector itself to keep it — which means importing it,
179
- * knowing it hides itself in a single-language app, and keeping that copy in step with the shell.
180
- * Every host that did this got it slightly differently.
181
- *
182
- * Pairs with `SparkQueryActionsService`: that service resolves a query's custom actions without the
183
- * grid, and this is where a page-level one goes.
184
- *
185
- * ```html
186
- * <button *sparkShellTopbarActions class="btn btn-primary" (click)="publish()">Publish</button>
187
- * ```
188
- *
189
- * Supplying both slots is allowed and does what it says: `topbarEnd` replaces the default chrome,
190
- * and these actions still render ahead of whatever it put there.
191
- */
192
- class SparkShellTopbarActionsDirective {
193
- templateRef = inject(TemplateRef);
194
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
195
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellTopbarActionsDirective, isStandalone: true, selector: "[sparkShellTopbarActions]", ngImport: i0 });
196
- }
197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTopbarActionsDirective, decorators: [{
198
- type: Directive,
199
- args: [{ selector: '[sparkShellTopbarActions]' }]
200
- }] });
201
- /** Sidebar, above everything. Default: `<h5>{{ title }}</h5>`. */
202
- class SparkShellSidebarHeaderDirective {
203
- templateRef = inject(TemplateRef);
204
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
205
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellSidebarHeaderDirective, isStandalone: true, selector: "[sparkShellSidebarHeader]", ngImport: i0 });
206
- }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarHeaderDirective, decorators: [{
208
- type: Directive,
209
- args: [{ selector: '[sparkShellSidebarHeader]' }]
210
- }] });
211
- /** Sidebar, between the header and the program-units menu. No default. */
212
- class SparkShellSidebarTopDirective {
213
- templateRef = inject(TemplateRef);
214
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarTopDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
215
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellSidebarTopDirective, isStandalone: true, selector: "[sparkShellSidebarTop]", ngImport: i0 });
216
- }
217
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarTopDirective, decorators: [{
218
- type: Directive,
219
- args: [{ selector: '[sparkShellSidebarTop]' }]
220
- }] });
221
- /**
222
- * An extra accordion tab in the sidebar menu, rendered after the generated program-unit groups
223
- * and sharing their single-open behavior.
224
- *
225
- * A tab is contributed as DATA (header + body template), not as markup, and that is load-bearing:
226
- * `bs-accordion` discovers its tabs with an Angular content query, which matches by declaration
227
- * view, so a `<bs-accordion-tab>` written in a host's template and inserted into the library's
228
- * accordion is never registered — it would land at index -1, get no hoisted header and no slot.
229
- * Declaring a second `<bs-accordion>` instead is what puts the tab in its own exclusivity group:
230
- * `mp-accordion` enforces single-open per element, over children it owns and over
231
- * `<details name>`, whose grouping cannot cross a shadow root. So the tab element must be created
232
- * by the menu itself, from what this directive carries.
233
- *
234
- * ```html
235
- * <ng-container *sparkShellTab="'Component demos'; icon: 'palette'">
236
- * <a routerLink="/query-slots" routerLinkActive="active" class="nav-link">Query card slots</a>
237
- * </ng-container>
238
- * ```
239
- *
240
- * Navigation still belongs in `programUnits.json` — this is for pages the model cannot describe
241
- * (client-side demos, external tools). For sidebar content that is NOT an accordion tab, use
242
- * `*sparkShellSidebarTop` or `*sparkShellSidebarFooter`.
243
- */
244
- class SparkShellTabDirective {
245
- templateRef = inject(TemplateRef);
246
- /** The tab's header label. */
247
- header = input.required({ ...(ngDevMode ? { debugName: "header" } : /* istanbul ignore next */ {}), alias: 'sparkShellTab' });
248
- /** Bootstrap icon name for the header, as in `programUnits.json`. Defaults to a folder. */
249
- icon = input(undefined, { ...(ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {}), alias: 'sparkShellTabIcon' });
250
- /** Replaces the icon+label header entirely, for a header that needs its own markup. */
251
- headerTemplate = input(null, { ...(ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {}), alias: 'sparkShellTabHeader' });
252
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTabDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
253
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.1.3", type: SparkShellTabDirective, isStandalone: true, selector: "[sparkShellTab]", inputs: { header: { classPropertyName: "header", publicName: "sparkShellTab", isSignal: true, isRequired: true, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "sparkShellTabIcon", isSignal: true, isRequired: false, transformFunction: null }, headerTemplate: { classPropertyName: "headerTemplate", publicName: "sparkShellTabHeader", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
254
- }
255
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellTabDirective, decorators: [{
256
- type: Directive,
257
- args: [{ selector: '[sparkShellTab]' }]
258
- }], propDecorators: { header: [{ type: i0.Input, args: [{ isSignal: true, alias: "sparkShellTab", required: true }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "sparkShellTabIcon", required: false }] }], headerTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "sparkShellTabHeader", required: false }] }] } });
259
- /** Sidebar, at the very bottom. No default. */
260
- class SparkShellSidebarFooterDirective {
261
- templateRef = inject(TemplateRef);
262
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
263
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellSidebarFooterDirective, isStandalone: true, selector: "[sparkShellSidebarFooter]", ngImport: i0 });
264
- }
265
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellSidebarFooterDirective, decorators: [{
266
- type: Directive,
267
- args: [{ selector: '[sparkShellSidebarFooter]' }]
268
- }] });
269
- /** Main region, above the projected content (the host's `<router-outlet>`). No default. */
270
- class SparkShellMainHeaderDirective {
271
- templateRef = inject(TemplateRef);
272
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellMainHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
273
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.3", type: SparkShellMainHeaderDirective, isStandalone: true, selector: "[sparkShellMainHeader]", ngImport: i0 });
274
- }
275
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellMainHeaderDirective, decorators: [{
276
- type: Directive,
277
- args: [{ selector: '[sparkShellMainHeader]' }]
278
- }] });
279
-
280
- /**
281
- * The application frame: topbar + sidebar + main, wrapping ng-bootstrap's `bs-shell` (whose
282
- * `mp-shell` web component owns ALL responsive behavior — breakpoints, the overlay drawer,
283
- * dismiss-on-navigate — in CSS; nothing here re-derives a pixel width). The sidebar renders the
284
- * server-driven program-units menu; the host projects its `<router-outlet>` as the default
285
- * content and customizes the chrome through the `*sparkShell*` slots (see `spark-shell-slots.ts`
286
- * for the doctrine: an omitted slot renders its default, and the menu itself is never a slot).
287
- *
288
- * ```html
289
- * <spark-shell title="My App">
290
- * <spark-auth-bar *sparkShellTopbarEnd />
291
- * <router-outlet />
292
- * </spark-shell>
293
- * ```
294
- *
295
- * The one piece of state the shell keeps is the toggler↔drawer mirror: the built-in hamburger is
296
- * hidden (`::part(hamburger)`) in favor of a `bs-navbar-toggler` in the topbar, so the shell
297
- * listens to `statechange` to keep the toggler's icon truthful in `auto` mode and only forces
298
- * `show`/`hide` on explicit toggles.
299
- *
300
- * Theming: the chrome colors are CSS custom properties with the classic dark-sidebar defaults —
301
- * `--spark-shell-topbar-bg`, `--spark-shell-sidebar-bg`, `--spark-shell-main-bg` — overridable on
302
- * the `<spark-shell>` element. `sidebarTheme` flips the sidebar's `data-bs-theme` (which is what
303
- * recolors the accordion internals across the shadow boundary) together with its default palette.
304
- */
305
- class SparkShellComponent {
306
- /** The sidebar heading. Ignored when a `*sparkShellSidebarHeader` slot is supplied. */
307
- title = input('', /* @ts-ignore */
308
- ...(ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []));
309
- /** Forwarded to `bs-shell`: below it the sidebar is an overlay drawer. */
310
- breakpoint = input('md', /* @ts-ignore */
311
- ...(ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []));
312
- /**
313
- * `data-bs-theme` for the sidebar — what flips the accordion's shadow-DOM internals between
314
- * palettes — plus the matching default background. `null` sets no theme (inherit the page's).
315
- */
316
- sidebarTheme = input('dark', /* @ts-ignore */
317
- ...(ngDevMode ? [{ debugName: "sidebarTheme" }] : /* istanbul ignore next */ []));
318
- /** Forwarded to the menu: any changed value re-fetches the program units. */
319
- reloadToken = input(null, /* @ts-ignore */
320
- ...(ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []));
321
- /** Extra sidebar tabs as data, for hosts that compute them; `*sparkShellTab` is the usual way. */
322
- sidebarTabs = input([], /* @ts-ignore */
323
- ...(ngDevMode ? [{ debugName: "sidebarTabs" }] : /* istanbul ignore next */ []));
324
- // One TemplateRef input per slot, for hosts that cannot use content projection
325
- // (the spark-query-card precedent). The projected directive wins when both are present.
326
- topbarStartTemplate = input(null, /* @ts-ignore */
327
- ...(ngDevMode ? [{ debugName: "topbarStartTemplate" }] : /* istanbul ignore next */ []));
328
- topbarEndTemplate = input(null, /* @ts-ignore */
329
- ...(ngDevMode ? [{ debugName: "topbarEndTemplate" }] : /* istanbul ignore next */ []));
330
- topbarActionsTemplate = input(null, /* @ts-ignore */
331
- ...(ngDevMode ? [{ debugName: "topbarActionsTemplate" }] : /* istanbul ignore next */ []));
332
- sidebarHeaderTemplate = input(null, /* @ts-ignore */
333
- ...(ngDevMode ? [{ debugName: "sidebarHeaderTemplate" }] : /* istanbul ignore next */ []));
334
- sidebarTopTemplate = input(null, /* @ts-ignore */
335
- ...(ngDevMode ? [{ debugName: "sidebarTopTemplate" }] : /* istanbul ignore next */ []));
336
- sidebarFooterTemplate = input(null, /* @ts-ignore */
337
- ...(ngDevMode ? [{ debugName: "sidebarFooterTemplate" }] : /* istanbul ignore next */ []));
338
- mainHeaderTemplate = input(null, /* @ts-ignore */
339
- ...(ngDevMode ? [{ debugName: "mainHeaderTemplate" }] : /* istanbul ignore next */ []));
340
- topbarStartSlot = contentChild(SparkShellTopbarStartDirective, /* @ts-ignore */
341
- ...(ngDevMode ? [{ debugName: "topbarStartSlot" }] : /* istanbul ignore next */ []));
342
- topbarEndSlot = contentChild(SparkShellTopbarEndDirective, /* @ts-ignore */
343
- ...(ngDevMode ? [{ debugName: "topbarEndSlot" }] : /* istanbul ignore next */ []));
344
- topbarActionsSlot = contentChild(SparkShellTopbarActionsDirective, /* @ts-ignore */
345
- ...(ngDevMode ? [{ debugName: "topbarActionsSlot" }] : /* istanbul ignore next */ []));
346
- sidebarHeaderSlot = contentChild(SparkShellSidebarHeaderDirective, /* @ts-ignore */
347
- ...(ngDevMode ? [{ debugName: "sidebarHeaderSlot" }] : /* istanbul ignore next */ []));
348
- sidebarTopSlot = contentChild(SparkShellSidebarTopDirective, /* @ts-ignore */
349
- ...(ngDevMode ? [{ debugName: "sidebarTopSlot" }] : /* istanbul ignore next */ []));
350
- sidebarFooterSlot = contentChild(SparkShellSidebarFooterDirective, /* @ts-ignore */
351
- ...(ngDevMode ? [{ debugName: "sidebarFooterSlot" }] : /* istanbul ignore next */ []));
352
- mainHeaderSlot = contentChild(SparkShellMainHeaderDirective, /* @ts-ignore */
353
- ...(ngDevMode ? [{ debugName: "mainHeaderSlot" }] : /* istanbul ignore next */ []));
354
- topbarStartTpl = computed(() => this.topbarStartSlot()?.templateRef ?? this.topbarStartTemplate(), /* @ts-ignore */
355
- ...(ngDevMode ? [{ debugName: "topbarStartTpl" }] : /* istanbul ignore next */ []));
356
- topbarEndTpl = computed(() => this.topbarEndSlot()?.templateRef ?? this.topbarEndTemplate(), /* @ts-ignore */
357
- ...(ngDevMode ? [{ debugName: "topbarEndTpl" }] : /* istanbul ignore next */ []));
358
- topbarActionsTpl = computed(() => this.topbarActionsSlot()?.templateRef ?? this.topbarActionsTemplate(), /* @ts-ignore */
359
- ...(ngDevMode ? [{ debugName: "topbarActionsTpl" }] : /* istanbul ignore next */ []));
360
- sidebarHeaderTpl = computed(() => this.sidebarHeaderSlot()?.templateRef ?? this.sidebarHeaderTemplate(), /* @ts-ignore */
361
- ...(ngDevMode ? [{ debugName: "sidebarHeaderTpl" }] : /* istanbul ignore next */ []));
362
- sidebarTopTpl = computed(() => this.sidebarTopSlot()?.templateRef ?? this.sidebarTopTemplate(), /* @ts-ignore */
363
- ...(ngDevMode ? [{ debugName: "sidebarTopTpl" }] : /* istanbul ignore next */ []));
364
- sidebarFooterTpl = computed(() => this.sidebarFooterSlot()?.templateRef ?? this.sidebarFooterTemplate(), /* @ts-ignore */
365
- ...(ngDevMode ? [{ debugName: "sidebarFooterTpl" }] : /* istanbul ignore next */ []));
366
- mainHeaderTpl = computed(() => this.mainHeaderSlot()?.templateRef ?? this.mainHeaderTemplate(), /* @ts-ignore */
367
- ...(ngDevMode ? [{ debugName: "mainHeaderTpl" }] : /* istanbul ignore next */ []));
368
- /**
369
- * Extra accordion tabs, forwarded to the menu so IT creates the `<bs-accordion-tab>` elements —
370
- * the only way they share the generated groups' single-open behavior (see
371
- * `SparkShellTabDirective`). Data-supplied tabs come first, then projected ones in declaration
372
- * order.
373
- */
374
- tabSlots = contentChildren(SparkShellTabDirective, /* @ts-ignore */
375
- ...(ngDevMode ? [{ debugName: "tabSlots" }] : /* istanbul ignore next */ []));
376
- tabs = computed(() => [
377
- ...this.sidebarTabs(),
378
- ...this.tabSlots().map(slot => ({
379
- header: slot.header(),
380
- icon: slot.icon(),
381
- headerTemplate: slot.headerTemplate(),
382
- content: slot.templateRef,
383
- })),
384
- ], /* @ts-ignore */
385
- ...(ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []));
386
- shellState = signal('auto', /* @ts-ignore */
387
- ...(ngDevMode ? [{ debugName: "shellState" }] : /* istanbul ignore next */ []));
388
- isSidebarVisible = signal(false, /* @ts-ignore */
389
- ...(ngDevMode ? [{ debugName: "isSidebarVisible" }] : /* istanbul ignore next */ []));
390
- // Explicit toggles force show/hide; 'auto' responsive behavior is otherwise preserved by
391
- // never writing state on our own. The mirror below keeps the toggler icon truthful when the
392
- // shell opens/closes itself at the breakpoint.
393
- toggleSidebar(open) {
394
- this.shellState.set(open ? 'show' : 'hide');
395
- }
396
- onShellToggle(detail) {
397
- this.isSidebarVisible.set(detail.open);
398
- }
399
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
400
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: SparkShellComponent, isStandalone: true, selector: "spark-shell", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, breakpoint: { classPropertyName: "breakpoint", publicName: "breakpoint", isSignal: true, isRequired: false, transformFunction: null }, sidebarTheme: { classPropertyName: "sidebarTheme", publicName: "sidebarTheme", isSignal: true, isRequired: false, transformFunction: null }, reloadToken: { classPropertyName: "reloadToken", publicName: "reloadToken", isSignal: true, isRequired: false, transformFunction: null }, sidebarTabs: { classPropertyName: "sidebarTabs", publicName: "sidebarTabs", isSignal: true, isRequired: false, transformFunction: null }, topbarStartTemplate: { classPropertyName: "topbarStartTemplate", publicName: "topbarStartTemplate", isSignal: true, isRequired: false, transformFunction: null }, topbarEndTemplate: { classPropertyName: "topbarEndTemplate", publicName: "topbarEndTemplate", isSignal: true, isRequired: false, transformFunction: null }, topbarActionsTemplate: { classPropertyName: "topbarActionsTemplate", publicName: "topbarActionsTemplate", isSignal: true, isRequired: false, transformFunction: null }, sidebarHeaderTemplate: { classPropertyName: "sidebarHeaderTemplate", publicName: "sidebarHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null }, sidebarTopTemplate: { classPropertyName: "sidebarTopTemplate", publicName: "sidebarTopTemplate", isSignal: true, isRequired: false, transformFunction: null }, sidebarFooterTemplate: { classPropertyName: "sidebarFooterTemplate", publicName: "sidebarFooterTemplate", isSignal: true, isRequired: false, transformFunction: null }, mainHeaderTemplate: { classPropertyName: "mainHeaderTemplate", publicName: "mainHeaderTemplate", isSignal: true, isRequired: false, transformFunction: null } }, queries: [{ propertyName: "topbarStartSlot", first: true, predicate: SparkShellTopbarStartDirective, descendants: true, isSignal: true }, { propertyName: "topbarEndSlot", first: true, predicate: SparkShellTopbarEndDirective, descendants: true, isSignal: true }, { propertyName: "topbarActionsSlot", first: true, predicate: SparkShellTopbarActionsDirective, descendants: true, isSignal: true }, { propertyName: "sidebarHeaderSlot", first: true, predicate: SparkShellSidebarHeaderDirective, descendants: true, isSignal: true }, { propertyName: "sidebarTopSlot", first: true, predicate: SparkShellSidebarTopDirective, descendants: true, isSignal: true }, { propertyName: "sidebarFooterSlot", first: true, predicate: SparkShellSidebarFooterDirective, descendants: true, isSignal: true }, { propertyName: "mainHeaderSlot", first: true, predicate: SparkShellMainHeaderDirective, descendants: true, isSignal: true }, { propertyName: "tabSlots", predicate: SparkShellTabDirective, isSignal: true }], ngImport: i0, template: "<bs-shell [state]=\"shellState()\" [breakpoint]=\"breakpoint()\" [dismissOnNavigate]=\"true\"\n (statechange)=\"onShellToggle($event)\">\n <div slot=\"topbar\" class=\"spark-topbar w-100 d-flex align-items-center\">\n @if (topbarStartTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <bs-navbar-toggler [state]=\"isSidebarVisible()\" (stateChange)=\"toggleSidebar($event)\" />\n }\n <div class=\"ms-auto me-3 d-flex align-items-center gap-2\">\n <!-- Ahead of the trailing chrome, and OUTSIDE the @if below: these actions are additive, so\n they render whether the host replaced the trailing edge or left the default selector. -->\n @if (topbarActionsTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n @if (topbarEndTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-language-selector />\n }\n </div>\n </div>\n\n <nav bsShellSidebar class=\"spark-sidebar p-2\"\n [class.spark-sidebar-dark]=\"sidebarTheme() === 'dark'\"\n [attr.data-bs-theme]=\"sidebarTheme()\">\n @if (sidebarHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <h5 class=\"p-3 border-bottom\">{{ title() }}</h5>\n }\n @if (sidebarTopTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <spark-program-units [reloadToken]=\"reloadToken()\" [extraTabs]=\"tabs()\" />\n @if (sidebarFooterTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n </nav>\n\n <!-- The padding lives in the stylesheet as `--spark-main-padding`, not as a `p-4` utility, so the\n sticky action bar can read it and bleed back out to the scrollport edges. See _actionbar.scss. -->\n <main>\n @if (mainHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <ng-content />\n </main>\n</bs-shell>\n", styles: [":host{display:flex;flex-direction:column;height:100vh}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-dark, #212529))}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: rgba(255, 255, 255, .85)}main{--spark-main-padding: 1.5rem;--spark-content-inset-block: var(--spark-main-padding);--spark-content-inset-inline: var(--spark-main-padding);height:100%;padding:var(--spark-main-padding);background-color:var(--spark-shell-main-bg, #f8f9fa);display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, #f8f9fa)}nav.spark-sidebar.spark-sidebar-dark{background:var(--spark-shell-sidebar-bg, #333);color:#fff}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep nav.spark-sidebar mp-accordion::part(content){padding:0}:host ::ng-deep nav.spark-sidebar .nav-link{color:inherit}:host ::ng-deep nav.spark-sidebar .nav-link:hover{background-color:#ffffff1a}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:#fff3}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: BsShellComponent, selector: "bs-shell", inputs: ["state", "breakpoint", "dismissOnNavigate"], outputs: ["statechange"] }, { kind: "directive", type: BsShellSidebarDirective, selector: "[bsShellSidebar]" }, { kind: "component", type: BsNavbarTogglerComponent, selector: "bs-navbar-toggler", inputs: ["state", "toggleOnClick", "ariaLabel", "controls"], outputs: ["stateChange"] }, { kind: "component", type: SparkProgramUnitsComponent, selector: "spark-program-units", inputs: ["reloadToken", "extraTabs"] }, { kind: "component", type: SparkLanguageSelectorComponent, selector: "spark-language-selector" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
401
- }
402
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: SparkShellComponent, decorators: [{
403
- type: Component,
404
- args: [{ selector: 'spark-shell', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
405
- NgTemplateOutlet,
406
- BsShellComponent, BsShellSidebarDirective, BsNavbarTogglerComponent,
407
- SparkProgramUnitsComponent, SparkLanguageSelectorComponent,
408
- ], template: "<bs-shell [state]=\"shellState()\" [breakpoint]=\"breakpoint()\" [dismissOnNavigate]=\"true\"\n (statechange)=\"onShellToggle($event)\">\n <div slot=\"topbar\" class=\"spark-topbar w-100 d-flex align-items-center\">\n @if (topbarStartTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <bs-navbar-toggler [state]=\"isSidebarVisible()\" (stateChange)=\"toggleSidebar($event)\" />\n }\n <div class=\"ms-auto me-3 d-flex align-items-center gap-2\">\n <!-- Ahead of the trailing chrome, and OUTSIDE the @if below: these actions are additive, so\n they render whether the host replaced the trailing edge or left the default selector. -->\n @if (topbarActionsTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n @if (topbarEndTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-language-selector />\n }\n </div>\n </div>\n\n <nav bsShellSidebar class=\"spark-sidebar p-2\"\n [class.spark-sidebar-dark]=\"sidebarTheme() === 'dark'\"\n [attr.data-bs-theme]=\"sidebarTheme()\">\n @if (sidebarHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <h5 class=\"p-3 border-bottom\">{{ title() }}</h5>\n }\n @if (sidebarTopTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <spark-program-units [reloadToken]=\"reloadToken()\" [extraTabs]=\"tabs()\" />\n @if (sidebarFooterTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n </nav>\n\n <!-- The padding lives in the stylesheet as `--spark-main-padding`, not as a `p-4` utility, so the\n sticky action bar can read it and bleed back out to the scrollport edges. See _actionbar.scss. -->\n <main>\n @if (mainHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <ng-content />\n </main>\n</bs-shell>\n", styles: [":host{display:flex;flex-direction:column;height:100vh}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-dark, #212529))}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: rgba(255, 255, 255, .85)}main{--spark-main-padding: 1.5rem;--spark-content-inset-block: var(--spark-main-padding);--spark-content-inset-inline: var(--spark-main-padding);height:100%;padding:var(--spark-main-padding);background-color:var(--spark-shell-main-bg, #f8f9fa);display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, #f8f9fa)}nav.spark-sidebar.spark-sidebar-dark{background:var(--spark-shell-sidebar-bg, #333);color:#fff}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep nav.spark-sidebar mp-accordion::part(content){padding:0}:host ::ng-deep nav.spark-sidebar .nav-link{color:inherit}:host ::ng-deep nav.spark-sidebar .nav-link:hover{background-color:#ffffff1a}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:#fff3}\n"] }]
409
- }], propDecorators: { title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], breakpoint: [{ type: i0.Input, args: [{ isSignal: true, alias: "breakpoint", required: false }] }], sidebarTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarTheme", required: false }] }], reloadToken: [{ type: i0.Input, args: [{ isSignal: true, alias: "reloadToken", required: false }] }], sidebarTabs: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarTabs", required: false }] }], topbarStartTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "topbarStartTemplate", required: false }] }], topbarEndTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "topbarEndTemplate", required: false }] }], topbarActionsTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "topbarActionsTemplate", required: false }] }], sidebarHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarHeaderTemplate", required: false }] }], sidebarTopTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarTopTemplate", required: false }] }], sidebarFooterTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebarFooterTemplate", required: false }] }], mainHeaderTemplate: [{ type: i0.Input, args: [{ isSignal: true, alias: "mainHeaderTemplate", required: false }] }], topbarStartSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellTopbarStartDirective), { isSignal: true }] }], topbarEndSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellTopbarEndDirective), { isSignal: true }] }], topbarActionsSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellTopbarActionsDirective), { isSignal: true }] }], sidebarHeaderSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellSidebarHeaderDirective), { isSignal: true }] }], sidebarTopSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellSidebarTopDirective), { isSignal: true }] }], sidebarFooterSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellSidebarFooterDirective), { isSignal: true }] }], mainHeaderSlot: [{ type: i0.ContentChild, args: [i0.forwardRef(() => SparkShellMainHeaderDirective), { isSignal: true }] }], tabSlots: [{ type: i0.ContentChildren, args: [i0.forwardRef(() => SparkShellTabDirective), { isSignal: true }] }] } });
410
-
411
- /**
412
- * Generated bundle index. Do not edit.
413
- */
414
-
324
+ `
325
+ }]
326
+ }]
327
+ });
328
+ var SparkShellTopbarStartDirective = class SparkShellTopbarStartDirective {
329
+ templateRef = inject(TemplateRef);
330
+ static ɵfac = i0.ɵɵngDeclareFactory({
331
+ minVersion: "12.0.0",
332
+ version: "22.2.0",
333
+ ngImport: i0,
334
+ type: SparkShellTopbarStartDirective,
335
+ deps: [],
336
+ target: i0.ɵɵFactoryTarget.Directive
337
+ });
338
+ static ɵdir = i0.ɵɵngDeclareDirective({
339
+ minVersion: "14.0.0",
340
+ version: "22.2.0",
341
+ type: SparkShellTopbarStartDirective,
342
+ isStandalone: true,
343
+ selector: "[sparkShellTopbarStart]",
344
+ ngImport: i0
345
+ });
346
+ };
347
+ i0.ɵɵngDeclareClassMetadata({
348
+ minVersion: "12.0.0",
349
+ version: "22.2.0",
350
+ ngImport: i0,
351
+ type: SparkShellTopbarStartDirective,
352
+ decorators: [{
353
+ type: Directive,
354
+ args: [{ selector: "[sparkShellTopbarStart]" }]
355
+ }]
356
+ });
357
+ var SparkShellTopbarEndDirective = class SparkShellTopbarEndDirective {
358
+ templateRef = inject(TemplateRef);
359
+ static ɵfac = i0.ɵɵngDeclareFactory({
360
+ minVersion: "12.0.0",
361
+ version: "22.2.0",
362
+ ngImport: i0,
363
+ type: SparkShellTopbarEndDirective,
364
+ deps: [],
365
+ target: i0.ɵɵFactoryTarget.Directive
366
+ });
367
+ static ɵdir = i0.ɵɵngDeclareDirective({
368
+ minVersion: "14.0.0",
369
+ version: "22.2.0",
370
+ type: SparkShellTopbarEndDirective,
371
+ isStandalone: true,
372
+ selector: "[sparkShellTopbarEnd]",
373
+ ngImport: i0
374
+ });
375
+ };
376
+ i0.ɵɵngDeclareClassMetadata({
377
+ minVersion: "12.0.0",
378
+ version: "22.2.0",
379
+ ngImport: i0,
380
+ type: SparkShellTopbarEndDirective,
381
+ decorators: [{
382
+ type: Directive,
383
+ args: [{ selector: "[sparkShellTopbarEnd]" }]
384
+ }]
385
+ });
386
+ var SparkShellTopbarActionsDirective = class SparkShellTopbarActionsDirective {
387
+ templateRef = inject(TemplateRef);
388
+ static ɵfac = i0.ɵɵngDeclareFactory({
389
+ minVersion: "12.0.0",
390
+ version: "22.2.0",
391
+ ngImport: i0,
392
+ type: SparkShellTopbarActionsDirective,
393
+ deps: [],
394
+ target: i0.ɵɵFactoryTarget.Directive
395
+ });
396
+ static ɵdir = i0.ɵɵngDeclareDirective({
397
+ minVersion: "14.0.0",
398
+ version: "22.2.0",
399
+ type: SparkShellTopbarActionsDirective,
400
+ isStandalone: true,
401
+ selector: "[sparkShellTopbarActions]",
402
+ ngImport: i0
403
+ });
404
+ };
405
+ i0.ɵɵngDeclareClassMetadata({
406
+ minVersion: "12.0.0",
407
+ version: "22.2.0",
408
+ ngImport: i0,
409
+ type: SparkShellTopbarActionsDirective,
410
+ decorators: [{
411
+ type: Directive,
412
+ args: [{ selector: "[sparkShellTopbarActions]" }]
413
+ }]
414
+ });
415
+ var SparkShellSidebarHeaderDirective = class SparkShellSidebarHeaderDirective {
416
+ templateRef = inject(TemplateRef);
417
+ static ɵfac = i0.ɵɵngDeclareFactory({
418
+ minVersion: "12.0.0",
419
+ version: "22.2.0",
420
+ ngImport: i0,
421
+ type: SparkShellSidebarHeaderDirective,
422
+ deps: [],
423
+ target: i0.ɵɵFactoryTarget.Directive
424
+ });
425
+ static ɵdir = i0.ɵɵngDeclareDirective({
426
+ minVersion: "14.0.0",
427
+ version: "22.2.0",
428
+ type: SparkShellSidebarHeaderDirective,
429
+ isStandalone: true,
430
+ selector: "[sparkShellSidebarHeader]",
431
+ ngImport: i0
432
+ });
433
+ };
434
+ i0.ɵɵngDeclareClassMetadata({
435
+ minVersion: "12.0.0",
436
+ version: "22.2.0",
437
+ ngImport: i0,
438
+ type: SparkShellSidebarHeaderDirective,
439
+ decorators: [{
440
+ type: Directive,
441
+ args: [{ selector: "[sparkShellSidebarHeader]" }]
442
+ }]
443
+ });
444
+ var SparkShellSidebarTopDirective = class SparkShellSidebarTopDirective {
445
+ templateRef = inject(TemplateRef);
446
+ static ɵfac = i0.ɵɵngDeclareFactory({
447
+ minVersion: "12.0.0",
448
+ version: "22.2.0",
449
+ ngImport: i0,
450
+ type: SparkShellSidebarTopDirective,
451
+ deps: [],
452
+ target: i0.ɵɵFactoryTarget.Directive
453
+ });
454
+ static ɵdir = i0.ɵɵngDeclareDirective({
455
+ minVersion: "14.0.0",
456
+ version: "22.2.0",
457
+ type: SparkShellSidebarTopDirective,
458
+ isStandalone: true,
459
+ selector: "[sparkShellSidebarTop]",
460
+ ngImport: i0
461
+ });
462
+ };
463
+ i0.ɵɵngDeclareClassMetadata({
464
+ minVersion: "12.0.0",
465
+ version: "22.2.0",
466
+ ngImport: i0,
467
+ type: SparkShellSidebarTopDirective,
468
+ decorators: [{
469
+ type: Directive,
470
+ args: [{ selector: "[sparkShellSidebarTop]" }]
471
+ }]
472
+ });
473
+ var SparkShellTabDirective = class SparkShellTabDirective {
474
+ templateRef = inject(TemplateRef);
475
+ header = input.required({
476
+ ...ngDevMode ? { debugName: "header" } : /* istanbul ignore next */ {},
477
+ alias: "sparkShellTab"
478
+ });
479
+ icon = input(void 0, {
480
+ ...ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {},
481
+ alias: "sparkShellTabIcon"
482
+ });
483
+ headerTemplate = input(null, {
484
+ ...ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {},
485
+ alias: "sparkShellTabHeader"
486
+ });
487
+ static ɵfac = i0.ɵɵngDeclareFactory({
488
+ minVersion: "12.0.0",
489
+ version: "22.2.0",
490
+ ngImport: i0,
491
+ type: SparkShellTabDirective,
492
+ deps: [],
493
+ target: i0.ɵɵFactoryTarget.Directive
494
+ });
495
+ static ɵdir = i0.ɵɵngDeclareDirective({
496
+ minVersion: "17.1.0",
497
+ version: "22.2.0",
498
+ type: SparkShellTabDirective,
499
+ isStandalone: true,
500
+ selector: "[sparkShellTab]",
501
+ inputs: {
502
+ header: {
503
+ classPropertyName: "header",
504
+ publicName: "sparkShellTab",
505
+ isSignal: true,
506
+ isRequired: true,
507
+ transformFunction: null
508
+ },
509
+ icon: {
510
+ classPropertyName: "icon",
511
+ publicName: "sparkShellTabIcon",
512
+ isSignal: true,
513
+ isRequired: false,
514
+ transformFunction: null
515
+ },
516
+ headerTemplate: {
517
+ classPropertyName: "headerTemplate",
518
+ publicName: "sparkShellTabHeader",
519
+ isSignal: true,
520
+ isRequired: false,
521
+ transformFunction: null
522
+ }
523
+ },
524
+ ngImport: i0
525
+ });
526
+ };
527
+ i0.ɵɵngDeclareClassMetadata({
528
+ minVersion: "12.0.0",
529
+ version: "22.2.0",
530
+ ngImport: i0,
531
+ type: SparkShellTabDirective,
532
+ decorators: [{
533
+ type: Directive,
534
+ args: [{ selector: "[sparkShellTab]" }]
535
+ }],
536
+ propDecorators: {
537
+ header: [{
538
+ type: i0.Input,
539
+ args: [{
540
+ isSignal: true,
541
+ alias: "sparkShellTab",
542
+ required: true
543
+ }]
544
+ }],
545
+ icon: [{
546
+ type: i0.Input,
547
+ args: [{
548
+ isSignal: true,
549
+ alias: "sparkShellTabIcon",
550
+ required: false
551
+ }]
552
+ }],
553
+ headerTemplate: [{
554
+ type: i0.Input,
555
+ args: [{
556
+ isSignal: true,
557
+ alias: "sparkShellTabHeader",
558
+ required: false
559
+ }]
560
+ }]
561
+ }
562
+ });
563
+ var SparkShellSidebarFooterDirective = class SparkShellSidebarFooterDirective {
564
+ templateRef = inject(TemplateRef);
565
+ static ɵfac = i0.ɵɵngDeclareFactory({
566
+ minVersion: "12.0.0",
567
+ version: "22.2.0",
568
+ ngImport: i0,
569
+ type: SparkShellSidebarFooterDirective,
570
+ deps: [],
571
+ target: i0.ɵɵFactoryTarget.Directive
572
+ });
573
+ static ɵdir = i0.ɵɵngDeclareDirective({
574
+ minVersion: "14.0.0",
575
+ version: "22.2.0",
576
+ type: SparkShellSidebarFooterDirective,
577
+ isStandalone: true,
578
+ selector: "[sparkShellSidebarFooter]",
579
+ ngImport: i0
580
+ });
581
+ };
582
+ i0.ɵɵngDeclareClassMetadata({
583
+ minVersion: "12.0.0",
584
+ version: "22.2.0",
585
+ ngImport: i0,
586
+ type: SparkShellSidebarFooterDirective,
587
+ decorators: [{
588
+ type: Directive,
589
+ args: [{ selector: "[sparkShellSidebarFooter]" }]
590
+ }]
591
+ });
592
+ var SparkShellMainHeaderDirective = class SparkShellMainHeaderDirective {
593
+ templateRef = inject(TemplateRef);
594
+ static ɵfac = i0.ɵɵngDeclareFactory({
595
+ minVersion: "12.0.0",
596
+ version: "22.2.0",
597
+ ngImport: i0,
598
+ type: SparkShellMainHeaderDirective,
599
+ deps: [],
600
+ target: i0.ɵɵFactoryTarget.Directive
601
+ });
602
+ static ɵdir = i0.ɵɵngDeclareDirective({
603
+ minVersion: "14.0.0",
604
+ version: "22.2.0",
605
+ type: SparkShellMainHeaderDirective,
606
+ isStandalone: true,
607
+ selector: "[sparkShellMainHeader]",
608
+ ngImport: i0
609
+ });
610
+ };
611
+ i0.ɵɵngDeclareClassMetadata({
612
+ minVersion: "12.0.0",
613
+ version: "22.2.0",
614
+ ngImport: i0,
615
+ type: SparkShellMainHeaderDirective,
616
+ decorators: [{
617
+ type: Directive,
618
+ args: [{ selector: "[sparkShellMainHeader]" }]
619
+ }]
620
+ });
621
+ var SparkShellComponent = class SparkShellComponent {
622
+ title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
623
+ breakpoint = input("md", ...ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []);
624
+ sidebarTheme = input("dark", ...ngDevMode ? [{ debugName: "sidebarTheme" }] : /* istanbul ignore next */ []);
625
+ reloadToken = input(null, ...ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []);
626
+ sidebarTabs = input([], ...ngDevMode ? [{ debugName: "sidebarTabs" }] : /* istanbul ignore next */ []);
627
+ topbarStartTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarStartTemplate" }] : /* istanbul ignore next */ []);
628
+ topbarEndTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarEndTemplate" }] : /* istanbul ignore next */ []);
629
+ topbarActionsTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarActionsTemplate" }] : /* istanbul ignore next */ []);
630
+ sidebarHeaderTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarHeaderTemplate" }] : /* istanbul ignore next */ []);
631
+ sidebarTopTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarTopTemplate" }] : /* istanbul ignore next */ []);
632
+ sidebarFooterTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarFooterTemplate" }] : /* istanbul ignore next */ []);
633
+ mainHeaderTemplate = input(null, ...ngDevMode ? [{ debugName: "mainHeaderTemplate" }] : /* istanbul ignore next */ []);
634
+ topbarStartSlot = contentChild(SparkShellTopbarStartDirective, ...ngDevMode ? [{ debugName: "topbarStartSlot" }] : /* istanbul ignore next */ []);
635
+ topbarEndSlot = contentChild(SparkShellTopbarEndDirective, ...ngDevMode ? [{ debugName: "topbarEndSlot" }] : /* istanbul ignore next */ []);
636
+ topbarActionsSlot = contentChild(SparkShellTopbarActionsDirective, ...ngDevMode ? [{ debugName: "topbarActionsSlot" }] : /* istanbul ignore next */ []);
637
+ sidebarHeaderSlot = contentChild(SparkShellSidebarHeaderDirective, ...ngDevMode ? [{ debugName: "sidebarHeaderSlot" }] : /* istanbul ignore next */ []);
638
+ sidebarTopSlot = contentChild(SparkShellSidebarTopDirective, ...ngDevMode ? [{ debugName: "sidebarTopSlot" }] : /* istanbul ignore next */ []);
639
+ sidebarFooterSlot = contentChild(SparkShellSidebarFooterDirective, ...ngDevMode ? [{ debugName: "sidebarFooterSlot" }] : /* istanbul ignore next */ []);
640
+ mainHeaderSlot = contentChild(SparkShellMainHeaderDirective, ...ngDevMode ? [{ debugName: "mainHeaderSlot" }] : /* istanbul ignore next */ []);
641
+ topbarStartTpl = computed(() => this.topbarStartSlot()?.templateRef ?? this.topbarStartTemplate(), ...ngDevMode ? [{ debugName: "topbarStartTpl" }] : /* istanbul ignore next */ []);
642
+ topbarEndTpl = computed(() => this.topbarEndSlot()?.templateRef ?? this.topbarEndTemplate(), ...ngDevMode ? [{ debugName: "topbarEndTpl" }] : /* istanbul ignore next */ []);
643
+ topbarActionsTpl = computed(() => this.topbarActionsSlot()?.templateRef ?? this.topbarActionsTemplate(), ...ngDevMode ? [{ debugName: "topbarActionsTpl" }] : /* istanbul ignore next */ []);
644
+ sidebarHeaderTpl = computed(() => this.sidebarHeaderSlot()?.templateRef ?? this.sidebarHeaderTemplate(), ...ngDevMode ? [{ debugName: "sidebarHeaderTpl" }] : /* istanbul ignore next */ []);
645
+ sidebarTopTpl = computed(() => this.sidebarTopSlot()?.templateRef ?? this.sidebarTopTemplate(), ...ngDevMode ? [{ debugName: "sidebarTopTpl" }] : /* istanbul ignore next */ []);
646
+ sidebarFooterTpl = computed(() => this.sidebarFooterSlot()?.templateRef ?? this.sidebarFooterTemplate(), ...ngDevMode ? [{ debugName: "sidebarFooterTpl" }] : /* istanbul ignore next */ []);
647
+ mainHeaderTpl = computed(() => this.mainHeaderSlot()?.templateRef ?? this.mainHeaderTemplate(), ...ngDevMode ? [{ debugName: "mainHeaderTpl" }] : /* istanbul ignore next */ []);
648
+ tabSlots = contentChildren(SparkShellTabDirective, ...ngDevMode ? [{ debugName: "tabSlots" }] : /* istanbul ignore next */ []);
649
+ tabs = computed(() => [...this.sidebarTabs(), ...this.tabSlots().map((slot) => ({
650
+ header: slot.header(),
651
+ icon: slot.icon(),
652
+ headerTemplate: slot.headerTemplate(),
653
+ content: slot.templateRef
654
+ }))], ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
655
+ shellState = signal("auto", ...ngDevMode ? [{ debugName: "shellState" }] : /* istanbul ignore next */ []);
656
+ isSidebarVisible = signal(false, ...ngDevMode ? [{ debugName: "isSidebarVisible" }] : /* istanbul ignore next */ []);
657
+ toggleSidebar(open) {
658
+ this.shellState.set(open ? "show" : "hide");
659
+ }
660
+ onShellToggle(detail) {
661
+ this.isSidebarVisible.set(detail.open);
662
+ }
663
+ static ɵfac = i0.ɵɵngDeclareFactory({
664
+ minVersion: "12.0.0",
665
+ version: "22.2.0",
666
+ ngImport: i0,
667
+ type: SparkShellComponent,
668
+ deps: [],
669
+ target: i0.ɵɵFactoryTarget.Component
670
+ });
671
+ static ɵcmp = i0.ɵɵngDeclareComponent({
672
+ minVersion: "17.0.0",
673
+ version: "22.2.0",
674
+ type: SparkShellComponent,
675
+ isStandalone: true,
676
+ selector: "spark-shell",
677
+ inputs: {
678
+ title: {
679
+ classPropertyName: "title",
680
+ publicName: "title",
681
+ isSignal: true,
682
+ isRequired: false,
683
+ transformFunction: null
684
+ },
685
+ breakpoint: {
686
+ classPropertyName: "breakpoint",
687
+ publicName: "breakpoint",
688
+ isSignal: true,
689
+ isRequired: false,
690
+ transformFunction: null
691
+ },
692
+ sidebarTheme: {
693
+ classPropertyName: "sidebarTheme",
694
+ publicName: "sidebarTheme",
695
+ isSignal: true,
696
+ isRequired: false,
697
+ transformFunction: null
698
+ },
699
+ reloadToken: {
700
+ classPropertyName: "reloadToken",
701
+ publicName: "reloadToken",
702
+ isSignal: true,
703
+ isRequired: false,
704
+ transformFunction: null
705
+ },
706
+ sidebarTabs: {
707
+ classPropertyName: "sidebarTabs",
708
+ publicName: "sidebarTabs",
709
+ isSignal: true,
710
+ isRequired: false,
711
+ transformFunction: null
712
+ },
713
+ topbarStartTemplate: {
714
+ classPropertyName: "topbarStartTemplate",
715
+ publicName: "topbarStartTemplate",
716
+ isSignal: true,
717
+ isRequired: false,
718
+ transformFunction: null
719
+ },
720
+ topbarEndTemplate: {
721
+ classPropertyName: "topbarEndTemplate",
722
+ publicName: "topbarEndTemplate",
723
+ isSignal: true,
724
+ isRequired: false,
725
+ transformFunction: null
726
+ },
727
+ topbarActionsTemplate: {
728
+ classPropertyName: "topbarActionsTemplate",
729
+ publicName: "topbarActionsTemplate",
730
+ isSignal: true,
731
+ isRequired: false,
732
+ transformFunction: null
733
+ },
734
+ sidebarHeaderTemplate: {
735
+ classPropertyName: "sidebarHeaderTemplate",
736
+ publicName: "sidebarHeaderTemplate",
737
+ isSignal: true,
738
+ isRequired: false,
739
+ transformFunction: null
740
+ },
741
+ sidebarTopTemplate: {
742
+ classPropertyName: "sidebarTopTemplate",
743
+ publicName: "sidebarTopTemplate",
744
+ isSignal: true,
745
+ isRequired: false,
746
+ transformFunction: null
747
+ },
748
+ sidebarFooterTemplate: {
749
+ classPropertyName: "sidebarFooterTemplate",
750
+ publicName: "sidebarFooterTemplate",
751
+ isSignal: true,
752
+ isRequired: false,
753
+ transformFunction: null
754
+ },
755
+ mainHeaderTemplate: {
756
+ classPropertyName: "mainHeaderTemplate",
757
+ publicName: "mainHeaderTemplate",
758
+ isSignal: true,
759
+ isRequired: false,
760
+ transformFunction: null
761
+ }
762
+ },
763
+ queries: [
764
+ {
765
+ propertyName: "topbarStartSlot",
766
+ first: true,
767
+ predicate: SparkShellTopbarStartDirective,
768
+ descendants: true,
769
+ isSignal: true
770
+ },
771
+ {
772
+ propertyName: "topbarEndSlot",
773
+ first: true,
774
+ predicate: SparkShellTopbarEndDirective,
775
+ descendants: true,
776
+ isSignal: true
777
+ },
778
+ {
779
+ propertyName: "topbarActionsSlot",
780
+ first: true,
781
+ predicate: SparkShellTopbarActionsDirective,
782
+ descendants: true,
783
+ isSignal: true
784
+ },
785
+ {
786
+ propertyName: "sidebarHeaderSlot",
787
+ first: true,
788
+ predicate: SparkShellSidebarHeaderDirective,
789
+ descendants: true,
790
+ isSignal: true
791
+ },
792
+ {
793
+ propertyName: "sidebarTopSlot",
794
+ first: true,
795
+ predicate: SparkShellSidebarTopDirective,
796
+ descendants: true,
797
+ isSignal: true
798
+ },
799
+ {
800
+ propertyName: "sidebarFooterSlot",
801
+ first: true,
802
+ predicate: SparkShellSidebarFooterDirective,
803
+ descendants: true,
804
+ isSignal: true
805
+ },
806
+ {
807
+ propertyName: "mainHeaderSlot",
808
+ first: true,
809
+ predicate: SparkShellMainHeaderDirective,
810
+ descendants: true,
811
+ isSignal: true
812
+ },
813
+ {
814
+ propertyName: "tabSlots",
815
+ predicate: SparkShellTabDirective,
816
+ isSignal: true
817
+ }
818
+ ],
819
+ ngImport: i0,
820
+ template: "<bs-shell [state]=\"shellState()\" [breakpoint]=\"breakpoint()\" [dismissOnNavigate]=\"true\"\n (statechange)=\"onShellToggle($event)\">\n <div slot=\"topbar\" class=\"spark-topbar w-100 d-flex align-items-center\">\n @if (topbarStartTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <bs-navbar-toggler [state]=\"isSidebarVisible()\" (stateChange)=\"toggleSidebar($event)\" />\n }\n <div class=\"ms-auto me-3 d-flex align-items-center gap-2\">\n <!-- Ahead of the trailing chrome, and OUTSIDE the @if below: these actions are additive, so\n they render whether the host replaced the trailing edge or left the default selector. -->\n @if (topbarActionsTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n @if (topbarEndTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-language-selector />\n }\n </div>\n </div>\n\n <nav bsShellSidebar class=\"spark-sidebar p-2\"\n [class.spark-sidebar-dark]=\"sidebarTheme() === 'dark'\"\n [attr.data-bs-theme]=\"sidebarTheme()\">\n @if (sidebarHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <h5 class=\"p-3 border-bottom\">{{ title() }}</h5>\n }\n @if (sidebarTopTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <spark-program-units [reloadToken]=\"reloadToken()\" [extraTabs]=\"tabs()\" />\n @if (sidebarFooterTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n </nav>\n\n <!-- The padding lives in the stylesheet as `--spark-main-padding`, not as a `p-4` utility, so the\n sticky action bar can read it and bleed back out to the scrollport edges. See _actionbar.scss. -->\n <main>\n @if (mainHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <ng-content />\n </main>\n</bs-shell>\n",
821
+ styles: [":host{display:flex;flex-direction:column;height:100vh}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-dark, #212529))}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: rgba(255, 255, 255, .85)}main{--spark-main-padding: 1.5rem;--spark-content-inset-block: var(--spark-main-padding);--spark-content-inset-inline: var(--spark-main-padding);height:100%;padding:var(--spark-main-padding);background-color:var(--spark-shell-main-bg, #f8f9fa);display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, #f8f9fa)}nav.spark-sidebar.spark-sidebar-dark{background:var(--spark-shell-sidebar-bg, #333);color:#fff}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep nav.spark-sidebar mp-accordion::part(content){padding:0}:host ::ng-deep nav.spark-sidebar .nav-link{color:inherit}:host ::ng-deep nav.spark-sidebar .nav-link:hover{background-color:#ffffff1a}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:#fff3}\n"],
822
+ dependencies: [
823
+ {
824
+ kind: "directive",
825
+ type: NgTemplateOutlet,
826
+ selector: "[ngTemplateOutlet]",
827
+ inputs: [
828
+ "ngTemplateOutletContext",
829
+ "ngTemplateOutlet",
830
+ "ngTemplateOutletInjector"
831
+ ]
832
+ },
833
+ {
834
+ kind: "component",
835
+ type: BsShellComponent,
836
+ selector: "bs-shell",
837
+ inputs: [
838
+ "state",
839
+ "breakpoint",
840
+ "dismissOnNavigate"
841
+ ],
842
+ outputs: ["statechange"]
843
+ },
844
+ {
845
+ kind: "directive",
846
+ type: BsShellSidebarDirective,
847
+ selector: "[bsShellSidebar]"
848
+ },
849
+ {
850
+ kind: "component",
851
+ type: BsNavbarTogglerComponent,
852
+ selector: "bs-navbar-toggler",
853
+ inputs: [
854
+ "state",
855
+ "toggleOnClick",
856
+ "ariaLabel",
857
+ "controls"
858
+ ],
859
+ outputs: ["stateChange"]
860
+ },
861
+ {
862
+ kind: "component",
863
+ type: SparkProgramUnitsComponent,
864
+ selector: "spark-program-units",
865
+ inputs: ["reloadToken", "extraTabs"]
866
+ },
867
+ {
868
+ kind: "component",
869
+ type: SparkLanguageSelectorComponent,
870
+ selector: "spark-language-selector"
871
+ }
872
+ ],
873
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
874
+ });
875
+ };
876
+ i0.ɵɵngDeclareClassMetadata({
877
+ minVersion: "12.0.0",
878
+ version: "22.2.0",
879
+ ngImport: i0,
880
+ type: SparkShellComponent,
881
+ decorators: [{
882
+ type: Component,
883
+ args: [{
884
+ selector: "spark-shell",
885
+ standalone: true,
886
+ changeDetection: ChangeDetectionStrategy.OnPush,
887
+ imports: [
888
+ NgTemplateOutlet,
889
+ BsShellComponent,
890
+ BsShellSidebarDirective,
891
+ BsNavbarTogglerComponent,
892
+ SparkProgramUnitsComponent,
893
+ SparkLanguageSelectorComponent
894
+ ],
895
+ template: "<bs-shell [state]=\"shellState()\" [breakpoint]=\"breakpoint()\" [dismissOnNavigate]=\"true\"\n (statechange)=\"onShellToggle($event)\">\n <div slot=\"topbar\" class=\"spark-topbar w-100 d-flex align-items-center\">\n @if (topbarStartTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <bs-navbar-toggler [state]=\"isSidebarVisible()\" (stateChange)=\"toggleSidebar($event)\" />\n }\n <div class=\"ms-auto me-3 d-flex align-items-center gap-2\">\n <!-- Ahead of the trailing chrome, and OUTSIDE the @if below: these actions are additive, so\n they render whether the host replaced the trailing edge or left the default selector. -->\n @if (topbarActionsTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n @if (topbarEndTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <spark-language-selector />\n }\n </div>\n </div>\n\n <nav bsShellSidebar class=\"spark-sidebar p-2\"\n [class.spark-sidebar-dark]=\"sidebarTheme() === 'dark'\"\n [attr.data-bs-theme]=\"sidebarTheme()\">\n @if (sidebarHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n } @else {\n <h5 class=\"p-3 border-bottom\">{{ title() }}</h5>\n }\n @if (sidebarTopTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <spark-program-units [reloadToken]=\"reloadToken()\" [extraTabs]=\"tabs()\" />\n @if (sidebarFooterTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n </nav>\n\n <!-- The padding lives in the stylesheet as `--spark-main-padding`, not as a `p-4` utility, so the\n sticky action bar can read it and bleed back out to the scrollport edges. See _actionbar.scss. -->\n <main>\n @if (mainHeaderTpl(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl\" />\n }\n <ng-content />\n </main>\n</bs-shell>\n",
896
+ styles: [":host{display:flex;flex-direction:column;height:100vh}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-dark, #212529))}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: rgba(255, 255, 255, .85)}main{--spark-main-padding: 1.5rem;--spark-content-inset-block: var(--spark-main-padding);--spark-content-inset-inline: var(--spark-main-padding);height:100%;padding:var(--spark-main-padding);background-color:var(--spark-shell-main-bg, #f8f9fa);display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, #f8f9fa)}nav.spark-sidebar.spark-sidebar-dark{background:var(--spark-shell-sidebar-bg, #333);color:#fff}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(255, 255, 255, .1);--bs-border-color: transparent}:host ::ng-deep nav.spark-sidebar mp-accordion::part(content){padding:0}:host ::ng-deep nav.spark-sidebar .nav-link{color:inherit}:host ::ng-deep nav.spark-sidebar .nav-link:hover{background-color:#ffffff1a}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:#fff3}\n"]
897
+ }]
898
+ }],
899
+ propDecorators: {
900
+ title: [{
901
+ type: i0.Input,
902
+ args: [{
903
+ isSignal: true,
904
+ alias: "title",
905
+ required: false
906
+ }]
907
+ }],
908
+ breakpoint: [{
909
+ type: i0.Input,
910
+ args: [{
911
+ isSignal: true,
912
+ alias: "breakpoint",
913
+ required: false
914
+ }]
915
+ }],
916
+ sidebarTheme: [{
917
+ type: i0.Input,
918
+ args: [{
919
+ isSignal: true,
920
+ alias: "sidebarTheme",
921
+ required: false
922
+ }]
923
+ }],
924
+ reloadToken: [{
925
+ type: i0.Input,
926
+ args: [{
927
+ isSignal: true,
928
+ alias: "reloadToken",
929
+ required: false
930
+ }]
931
+ }],
932
+ sidebarTabs: [{
933
+ type: i0.Input,
934
+ args: [{
935
+ isSignal: true,
936
+ alias: "sidebarTabs",
937
+ required: false
938
+ }]
939
+ }],
940
+ topbarStartTemplate: [{
941
+ type: i0.Input,
942
+ args: [{
943
+ isSignal: true,
944
+ alias: "topbarStartTemplate",
945
+ required: false
946
+ }]
947
+ }],
948
+ topbarEndTemplate: [{
949
+ type: i0.Input,
950
+ args: [{
951
+ isSignal: true,
952
+ alias: "topbarEndTemplate",
953
+ required: false
954
+ }]
955
+ }],
956
+ topbarActionsTemplate: [{
957
+ type: i0.Input,
958
+ args: [{
959
+ isSignal: true,
960
+ alias: "topbarActionsTemplate",
961
+ required: false
962
+ }]
963
+ }],
964
+ sidebarHeaderTemplate: [{
965
+ type: i0.Input,
966
+ args: [{
967
+ isSignal: true,
968
+ alias: "sidebarHeaderTemplate",
969
+ required: false
970
+ }]
971
+ }],
972
+ sidebarTopTemplate: [{
973
+ type: i0.Input,
974
+ args: [{
975
+ isSignal: true,
976
+ alias: "sidebarTopTemplate",
977
+ required: false
978
+ }]
979
+ }],
980
+ sidebarFooterTemplate: [{
981
+ type: i0.Input,
982
+ args: [{
983
+ isSignal: true,
984
+ alias: "sidebarFooterTemplate",
985
+ required: false
986
+ }]
987
+ }],
988
+ mainHeaderTemplate: [{
989
+ type: i0.Input,
990
+ args: [{
991
+ isSignal: true,
992
+ alias: "mainHeaderTemplate",
993
+ required: false
994
+ }]
995
+ }],
996
+ topbarStartSlot: [{
997
+ type: i0.ContentChild,
998
+ args: [i0.forwardRef(() => SparkShellTopbarStartDirective), { isSignal: true }]
999
+ }],
1000
+ topbarEndSlot: [{
1001
+ type: i0.ContentChild,
1002
+ args: [i0.forwardRef(() => SparkShellTopbarEndDirective), { isSignal: true }]
1003
+ }],
1004
+ topbarActionsSlot: [{
1005
+ type: i0.ContentChild,
1006
+ args: [i0.forwardRef(() => SparkShellTopbarActionsDirective), { isSignal: true }]
1007
+ }],
1008
+ sidebarHeaderSlot: [{
1009
+ type: i0.ContentChild,
1010
+ args: [i0.forwardRef(() => SparkShellSidebarHeaderDirective), { isSignal: true }]
1011
+ }],
1012
+ sidebarTopSlot: [{
1013
+ type: i0.ContentChild,
1014
+ args: [i0.forwardRef(() => SparkShellSidebarTopDirective), { isSignal: true }]
1015
+ }],
1016
+ sidebarFooterSlot: [{
1017
+ type: i0.ContentChild,
1018
+ args: [i0.forwardRef(() => SparkShellSidebarFooterDirective), { isSignal: true }]
1019
+ }],
1020
+ mainHeaderSlot: [{
1021
+ type: i0.ContentChild,
1022
+ args: [i0.forwardRef(() => SparkShellMainHeaderDirective), { isSignal: true }]
1023
+ }],
1024
+ tabSlots: [{
1025
+ type: i0.ContentChildren,
1026
+ args: [i0.forwardRef(() => SparkShellTabDirective), { isSignal: true }]
1027
+ }]
1028
+ }
1029
+ });
415
1030
  export { SparkLanguageSelectorComponent, SparkProgramUnitsComponent, SparkShellComponent, SparkShellMainHeaderDirective, SparkShellSidebarFooterDirective, SparkShellSidebarHeaderDirective, SparkShellSidebarTopDirective, SparkShellTabDirective, SparkShellTopbarActionsDirective, SparkShellTopbarEndDirective, SparkShellTopbarStartDirective };
416
- //# sourceMappingURL=mintplayer-ng-spark-shell.mjs.map
1031
+
1032
+ //# sourceMappingURL=mintplayer-ng-spark-shell.mjs.map