@mintplayer/ng-spark 22.23.0 → 22.25.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 (71) hide show
  1. package/README.md +196 -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 +310 -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-contributions.mjs +721 -0
  9. package/fesm2022/mintplayer-ng-spark-contributions.mjs.map +1 -0
  10. package/fesm2022/mintplayer-ng-spark-grid.mjs +2385 -1118
  11. package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
  12. package/fesm2022/mintplayer-ng-spark-history.mjs +598 -0
  13. package/fesm2022/mintplayer-ng-spark-history.mjs.map +1 -0
  14. package/fesm2022/mintplayer-ng-spark-icon.mjs +64 -27
  15. package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -1
  16. package/fesm2022/mintplayer-ng-spark-models.mjs +405 -762
  17. package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
  18. package/fesm2022/mintplayer-ng-spark-moderation.mjs +1212 -0
  19. package/fesm2022/mintplayer-ng-spark-moderation.mjs.map +1 -0
  20. package/fesm2022/mintplayer-ng-spark-panels.mjs +60 -0
  21. package/fesm2022/mintplayer-ng-spark-panels.mjs.map +1 -0
  22. package/fesm2022/mintplayer-ng-spark-pipes.mjs +1158 -765
  23. package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
  24. package/fesm2022/mintplayer-ng-spark-po-create.mjs +273 -169
  25. package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -1
  26. package/fesm2022/mintplayer-ng-spark-po-detail.mjs +795 -410
  27. package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
  28. package/fesm2022/mintplayer-ng-spark-po-edit.mjs +1196 -280
  29. package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -1
  30. package/fesm2022/mintplayer-ng-spark-po-form.mjs +2244 -1224
  31. package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
  32. package/fesm2022/mintplayer-ng-spark-query-list.mjs +571 -303
  33. package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
  34. package/fesm2022/mintplayer-ng-spark-renderers.mjs +44 -55
  35. package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
  36. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +216 -177
  37. package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -1
  38. package/fesm2022/mintplayer-ng-spark-routes.mjs +24 -28
  39. package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -1
  40. package/fesm2022/mintplayer-ng-spark-services.mjs +625 -640
  41. package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
  42. package/fesm2022/mintplayer-ng-spark-shell.mjs +1031 -397
  43. package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -1
  44. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs +294 -0
  45. package/fesm2022/mintplayer-ng-spark-soft-delete.mjs.map +1 -0
  46. package/fesm2022/mintplayer-ng-spark.mjs +14 -48
  47. package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
  48. package/package.json +23 -2
  49. package/types/mintplayer-ng-spark-attribute-description.d.ts +25 -18
  50. package/types/mintplayer-ng-spark-client-operations.d.ts +139 -160
  51. package/types/mintplayer-ng-spark-column-filter.d.ts +73 -55
  52. package/types/mintplayer-ng-spark-contributions.d.ts +231 -0
  53. package/types/mintplayer-ng-spark-grid.d.ts +917 -448
  54. package/types/mintplayer-ng-spark-history.d.ts +216 -0
  55. package/types/mintplayer-ng-spark-icon.d.ts +15 -13
  56. package/types/mintplayer-ng-spark-models.d.ts +681 -573
  57. package/types/mintplayer-ng-spark-moderation.d.ts +402 -0
  58. package/types/mintplayer-ng-spark-panels.d.ts +143 -0
  59. package/types/mintplayer-ng-spark-pipes.d.ts +131 -149
  60. package/types/mintplayer-ng-spark-po-create.d.ts +46 -37
  61. package/types/mintplayer-ng-spark-po-detail.d.ts +180 -117
  62. package/types/mintplayer-ng-spark-po-edit.d.ts +367 -64
  63. package/types/mintplayer-ng-spark-po-form.d.ts +558 -373
  64. package/types/mintplayer-ng-spark-query-list.d.ts +143 -82
  65. package/types/mintplayer-ng-spark-renderers.d.ts +121 -85
  66. package/types/mintplayer-ng-spark-retry-action-modal.d.ts +31 -34
  67. package/types/mintplayer-ng-spark-routes.d.ts +7 -11
  68. package/types/mintplayer-ng-spark-services.d.ts +377 -261
  69. package/types/mintplayer-ng-spark-shell.d.ts +228 -132
  70. package/types/mintplayer-ng-spark-soft-delete.d.ts +90 -0
  71. package/types/mintplayer-ng-spark.d.ts +19 -12
@@ -1,88 +1,221 @@
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 { BS_THEME_DEFAULT_MODES, BsThemeService, BsThemeToggleComponent } from "@mintplayer/ng-bootstrap/theming";
7
+ import { SparkLanguageService, SparkService } from "@mintplayer/ng-spark/services";
8
+ import { RouterLink, RouterLinkActive } from "@angular/router";
9
+ import { BsAccordionComponent, BsAccordionTabComponent, BsAccordionTabHeaderDirective } from "@mintplayer/ng-bootstrap/accordion";
10
+ import { SPARK_AUTH_STATE } from "@mintplayer/ng-spark";
11
+ import { IconNamePipe, ResolveTranslationPipe, RouterLinkPipe } from "@mintplayer/ng-spark/pipes";
12
+ import { SparkIconComponent } from "@mintplayer/ng-spark/icon";
13
+ import * as i1 from "@angular/forms";
14
+ import { FormsModule } from "@angular/forms";
15
+ import { BsSelectComponent, BsSelectOption } from "@mintplayer/ng-bootstrap/select";
16
+ var SparkProgramUnitsComponent = class SparkProgramUnitsComponent {
17
+ sparkService = inject(SparkService);
18
+ authState = inject(SPARK_AUTH_STATE, { optional: true });
19
+ reloadToken = input(null, ...ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []);
20
+ extraTabs = input([], ...ngDevMode ? [{ debugName: "extraTabs" }] : /* istanbul ignore next */ []);
21
+ groups = signal([], ...ngDevMode ? [{ debugName: "groups" }] : /* istanbul ignore next */ []);
22
+ constructor() {
23
+ effect(() => {
24
+ this.authState?.();
25
+ this.reloadToken();
26
+ untracked(() => this.reload());
27
+ });
28
+ }
29
+ async reload() {
30
+ const groups = [...(await this.sparkService.getProgramUnits()).programUnitGroups].sort((a, b) => a.order - b.order).map((g) => ({
31
+ ...g,
32
+ programUnits: [...g.programUnits].sort((a, b) => a.order - b.order)
33
+ }));
34
+ this.groups.set(groups);
35
+ }
36
+ static ɵfac = i0.ɵɵngDeclareFactory({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.0",
39
+ ngImport: i0,
40
+ type: SparkProgramUnitsComponent,
41
+ deps: [],
42
+ target: i0.ɵɵFactoryTarget.Component
43
+ });
44
+ static ɵcmp = i0.ɵɵngDeclareComponent({
45
+ minVersion: "17.0.0",
46
+ version: "22.2.0",
47
+ type: SparkProgramUnitsComponent,
48
+ isStandalone: true,
49
+ selector: "spark-program-units",
50
+ inputs: {
51
+ reloadToken: {
52
+ classPropertyName: "reloadToken",
53
+ publicName: "reloadToken",
54
+ isSignal: true,
55
+ isRequired: false,
56
+ transformFunction: null
57
+ },
58
+ extraTabs: {
59
+ classPropertyName: "extraTabs",
60
+ publicName: "extraTabs",
61
+ isSignal: true,
62
+ isRequired: false,
63
+ transformFunction: null
64
+ }
65
+ },
66
+ ngImport: i0,
67
+ 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",
68
+ styles: [":host{display:block;--bs-primary-bg-subtle: rgba(var(--bs-emphasis-color-rgb), .1);--bs-border-color: transparent;--bs-body-bg: var(--spark-shell-sidebar-bg, var(--bs-tertiary-bg))}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:rgba(var(--bs-emphasis-color-rgb),.1)}.nav-link.active{background-color:rgba(var(--bs-emphasis-color-rgb),.2)}\n"],
69
+ dependencies: [
70
+ {
71
+ kind: "directive",
72
+ type: NgTemplateOutlet,
73
+ selector: "[ngTemplateOutlet]",
74
+ inputs: [
75
+ "ngTemplateOutletContext",
76
+ "ngTemplateOutlet",
77
+ "ngTemplateOutletInjector"
78
+ ]
79
+ },
80
+ {
81
+ kind: "directive",
82
+ type: RouterLink,
83
+ selector: "[routerLink]",
84
+ inputs: [
85
+ "target",
86
+ "queryParams",
87
+ "fragment",
88
+ "queryParamsHandling",
89
+ "state",
90
+ "info",
91
+ "relativeTo",
92
+ "preserveFragment",
93
+ "skipLocationChange",
94
+ "replaceUrl",
95
+ "browserUrl",
96
+ "routerLink"
97
+ ]
98
+ },
99
+ {
100
+ kind: "directive",
101
+ type: RouterLinkActive,
102
+ selector: "[routerLinkActive]",
103
+ inputs: [
104
+ "routerLinkActiveOptions",
105
+ "ariaCurrentWhenActive",
106
+ "routerLinkActive"
107
+ ],
108
+ outputs: ["isActiveChange"],
109
+ exportAs: ["routerLinkActive"]
110
+ },
111
+ {
112
+ kind: "component",
113
+ type: BsAccordionComponent,
114
+ selector: "bs-accordion",
115
+ inputs: ["multi", "highlightActiveTab"]
116
+ },
117
+ {
118
+ kind: "component",
119
+ type: BsAccordionTabComponent,
120
+ selector: "bs-accordion-tab",
121
+ inputs: ["isActive", "disabled"],
122
+ outputs: ["isActiveChange"]
123
+ },
124
+ {
125
+ kind: "directive",
126
+ type: BsAccordionTabHeaderDirective,
127
+ selector: "[bsAccordionTabHeader]"
128
+ },
129
+ {
130
+ kind: "component",
131
+ type: SparkIconComponent,
132
+ selector: "spark-icon",
133
+ inputs: ["name"]
134
+ },
135
+ {
136
+ kind: "pipe",
137
+ type: ResolveTranslationPipe,
138
+ name: "resolveTranslation"
139
+ },
140
+ {
141
+ kind: "pipe",
142
+ type: IconNamePipe,
143
+ name: "iconName"
144
+ },
145
+ {
146
+ kind: "pipe",
147
+ type: RouterLinkPipe,
148
+ name: "routerLink"
149
+ }
150
+ ],
151
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
152
+ });
153
+ };
154
+ i0.ɵɵngDeclareClassMetadata({
155
+ minVersion: "12.0.0",
156
+ version: "22.2.0",
157
+ ngImport: i0,
158
+ type: SparkProgramUnitsComponent,
159
+ decorators: [{
160
+ type: Component,
161
+ args: [{
162
+ selector: "spark-program-units",
163
+ standalone: true,
164
+ changeDetection: ChangeDetectionStrategy.OnPush,
165
+ imports: [
166
+ NgTemplateOutlet,
167
+ RouterLink,
168
+ RouterLinkActive,
169
+ BsAccordionComponent,
170
+ BsAccordionTabComponent,
171
+ BsAccordionTabHeaderDirective,
172
+ SparkIconComponent,
173
+ ResolveTranslationPipe,
174
+ IconNamePipe,
175
+ RouterLinkPipe
176
+ ],
177
+ 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",
178
+ styles: [":host{display:block;--bs-primary-bg-subtle: rgba(var(--bs-emphasis-color-rgb), .1);--bs-border-color: transparent;--bs-body-bg: var(--spark-shell-sidebar-bg, var(--bs-tertiary-bg))}:host ::ng-deep mp-accordion::part(content){padding:0}.nav-link{color:inherit}.nav-link:hover{background-color:rgba(var(--bs-emphasis-color-rgb),.1)}.nav-link.active{background-color:rgba(var(--bs-emphasis-color-rgb),.2)}\n"]
179
+ }]
180
+ }],
181
+ ctorParameters: () => [],
182
+ propDecorators: {
183
+ reloadToken: [{
184
+ type: i0.Input,
185
+ args: [{
186
+ isSignal: true,
187
+ alias: "reloadToken",
188
+ required: false
189
+ }]
190
+ }],
191
+ extraTabs: [{
192
+ type: i0.Input,
193
+ args: [{
194
+ isSignal: true,
195
+ alias: "extraTabs",
196
+ required: false
197
+ }]
198
+ }]
199
+ }
200
+ });
201
+ var SparkLanguageSelectorComponent = class SparkLanguageSelectorComponent {
202
+ lang = inject(SparkLanguageService);
203
+ static ɵfac = i0.ɵɵngDeclareFactory({
204
+ minVersion: "12.0.0",
205
+ version: "22.2.0",
206
+ ngImport: i0,
207
+ type: SparkLanguageSelectorComponent,
208
+ deps: [],
209
+ target: i0.ɵɵFactoryTarget.Component
210
+ });
211
+ static ɵcmp = i0.ɵɵngDeclareComponent({
212
+ minVersion: "17.0.0",
213
+ version: "22.2.0",
214
+ type: SparkLanguageSelectorComponent,
215
+ isStandalone: true,
216
+ selector: "spark-language-selector",
217
+ ngImport: i0,
218
+ template: `
86
219
  @if (lang.languages() | keyvalue; as langs) {
87
220
  @if (langs.length > 1) {
88
221
  <bs-select [ngModel]="lang.language()" (ngModelChange)="lang.setLanguage($event)">
@@ -92,16 +225,94 @@ class SparkLanguageSelectorComponent {
92
225
  </bs-select>
93
226
  }
94
227
  }
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: `
228
+ `,
229
+ isInline: true,
230
+ dependencies: [
231
+ {
232
+ kind: "ngmodule",
233
+ type: FormsModule
234
+ },
235
+ {
236
+ kind: "directive",
237
+ type: i1.NgSelectOption,
238
+ selector: "option",
239
+ inputs: ["ngValue", "value"]
240
+ },
241
+ {
242
+ kind: "directive",
243
+ type: i1.ɵNgSelectMultipleOption,
244
+ selector: "option",
245
+ inputs: ["ngValue", "value"]
246
+ },
247
+ {
248
+ kind: "directive",
249
+ type: i1.NgControlStatus,
250
+ selector: "[formControlName],[ngModel],[formControl]"
251
+ },
252
+ {
253
+ kind: "directive",
254
+ type: i1.NgModel,
255
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
256
+ inputs: [
257
+ "name",
258
+ "disabled",
259
+ "ngModel",
260
+ "ngModelOptions"
261
+ ],
262
+ outputs: ["ngModelChange"],
263
+ exportAs: ["ngModel"]
264
+ },
265
+ {
266
+ kind: "component",
267
+ type: BsSelectComponent,
268
+ selector: "bs-select",
269
+ inputs: [
270
+ "identifier",
271
+ "size",
272
+ "multiple",
273
+ "numberVisible",
274
+ "disabled"
275
+ ]
276
+ },
277
+ {
278
+ kind: "directive",
279
+ type: BsSelectOption,
280
+ selector: "option",
281
+ inputs: ["ngValue", "value"]
282
+ },
283
+ {
284
+ kind: "pipe",
285
+ type: KeyValuePipe,
286
+ name: "keyvalue"
287
+ },
288
+ {
289
+ kind: "pipe",
290
+ type: ResolveTranslationPipe,
291
+ name: "resolveTranslation"
292
+ }
293
+ ],
294
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
295
+ });
296
+ };
297
+ i0.ɵɵngDeclareClassMetadata({
298
+ minVersion: "12.0.0",
299
+ version: "22.2.0",
300
+ ngImport: i0,
301
+ type: SparkLanguageSelectorComponent,
302
+ decorators: [{
303
+ type: Component,
304
+ args: [{
305
+ selector: "spark-language-selector",
306
+ standalone: true,
307
+ changeDetection: ChangeDetectionStrategy.OnPush,
308
+ imports: [
309
+ KeyValuePipe,
310
+ FormsModule,
311
+ BsSelectComponent,
312
+ BsSelectOption,
313
+ ResolveTranslationPipe
314
+ ],
315
+ template: `
105
316
  @if (lang.languages() | keyvalue; as langs) {
106
317
  @if (langs.length > 1) {
107
318
  <bs-select [ngModel]="lang.language()" (ngModelChange)="lang.setLanguage($event)">
@@ -111,306 +322,729 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
111
322
  </bs-select>
112
323
  }
113
324
  }
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
-
325
+ `
326
+ }]
327
+ }]
328
+ });
329
+ var SparkShellTopbarStartDirective = class SparkShellTopbarStartDirective {
330
+ templateRef = inject(TemplateRef);
331
+ static ɵfac = i0.ɵɵngDeclareFactory({
332
+ minVersion: "12.0.0",
333
+ version: "22.2.0",
334
+ ngImport: i0,
335
+ type: SparkShellTopbarStartDirective,
336
+ deps: [],
337
+ target: i0.ɵɵFactoryTarget.Directive
338
+ });
339
+ static ɵdir = i0.ɵɵngDeclareDirective({
340
+ minVersion: "14.0.0",
341
+ version: "22.2.0",
342
+ type: SparkShellTopbarStartDirective,
343
+ isStandalone: true,
344
+ selector: "[sparkShellTopbarStart]",
345
+ ngImport: i0
346
+ });
347
+ };
348
+ i0.ɵɵngDeclareClassMetadata({
349
+ minVersion: "12.0.0",
350
+ version: "22.2.0",
351
+ ngImport: i0,
352
+ type: SparkShellTopbarStartDirective,
353
+ decorators: [{
354
+ type: Directive,
355
+ args: [{ selector: "[sparkShellTopbarStart]" }]
356
+ }]
357
+ });
358
+ var SparkShellTopbarEndDirective = class SparkShellTopbarEndDirective {
359
+ templateRef = inject(TemplateRef);
360
+ static ɵfac = i0.ɵɵngDeclareFactory({
361
+ minVersion: "12.0.0",
362
+ version: "22.2.0",
363
+ ngImport: i0,
364
+ type: SparkShellTopbarEndDirective,
365
+ deps: [],
366
+ target: i0.ɵɵFactoryTarget.Directive
367
+ });
368
+ static ɵdir = i0.ɵɵngDeclareDirective({
369
+ minVersion: "14.0.0",
370
+ version: "22.2.0",
371
+ type: SparkShellTopbarEndDirective,
372
+ isStandalone: true,
373
+ selector: "[sparkShellTopbarEnd]",
374
+ ngImport: i0
375
+ });
376
+ };
377
+ i0.ɵɵngDeclareClassMetadata({
378
+ minVersion: "12.0.0",
379
+ version: "22.2.0",
380
+ ngImport: i0,
381
+ type: SparkShellTopbarEndDirective,
382
+ decorators: [{
383
+ type: Directive,
384
+ args: [{ selector: "[sparkShellTopbarEnd]" }]
385
+ }]
386
+ });
387
+ var SparkShellTopbarActionsDirective = class SparkShellTopbarActionsDirective {
388
+ templateRef = inject(TemplateRef);
389
+ static ɵfac = i0.ɵɵngDeclareFactory({
390
+ minVersion: "12.0.0",
391
+ version: "22.2.0",
392
+ ngImport: i0,
393
+ type: SparkShellTopbarActionsDirective,
394
+ deps: [],
395
+ target: i0.ɵɵFactoryTarget.Directive
396
+ });
397
+ static ɵdir = i0.ɵɵngDeclareDirective({
398
+ minVersion: "14.0.0",
399
+ version: "22.2.0",
400
+ type: SparkShellTopbarActionsDirective,
401
+ isStandalone: true,
402
+ selector: "[sparkShellTopbarActions]",
403
+ ngImport: i0
404
+ });
405
+ };
406
+ i0.ɵɵngDeclareClassMetadata({
407
+ minVersion: "12.0.0",
408
+ version: "22.2.0",
409
+ ngImport: i0,
410
+ type: SparkShellTopbarActionsDirective,
411
+ decorators: [{
412
+ type: Directive,
413
+ args: [{ selector: "[sparkShellTopbarActions]" }]
414
+ }]
415
+ });
416
+ var SparkShellSidebarHeaderDirective = class SparkShellSidebarHeaderDirective {
417
+ templateRef = inject(TemplateRef);
418
+ static ɵfac = i0.ɵɵngDeclareFactory({
419
+ minVersion: "12.0.0",
420
+ version: "22.2.0",
421
+ ngImport: i0,
422
+ type: SparkShellSidebarHeaderDirective,
423
+ deps: [],
424
+ target: i0.ɵɵFactoryTarget.Directive
425
+ });
426
+ static ɵdir = i0.ɵɵngDeclareDirective({
427
+ minVersion: "14.0.0",
428
+ version: "22.2.0",
429
+ type: SparkShellSidebarHeaderDirective,
430
+ isStandalone: true,
431
+ selector: "[sparkShellSidebarHeader]",
432
+ ngImport: i0
433
+ });
434
+ };
435
+ i0.ɵɵngDeclareClassMetadata({
436
+ minVersion: "12.0.0",
437
+ version: "22.2.0",
438
+ ngImport: i0,
439
+ type: SparkShellSidebarHeaderDirective,
440
+ decorators: [{
441
+ type: Directive,
442
+ args: [{ selector: "[sparkShellSidebarHeader]" }]
443
+ }]
444
+ });
445
+ var SparkShellSidebarTopDirective = class SparkShellSidebarTopDirective {
446
+ templateRef = inject(TemplateRef);
447
+ static ɵfac = i0.ɵɵngDeclareFactory({
448
+ minVersion: "12.0.0",
449
+ version: "22.2.0",
450
+ ngImport: i0,
451
+ type: SparkShellSidebarTopDirective,
452
+ deps: [],
453
+ target: i0.ɵɵFactoryTarget.Directive
454
+ });
455
+ static ɵdir = i0.ɵɵngDeclareDirective({
456
+ minVersion: "14.0.0",
457
+ version: "22.2.0",
458
+ type: SparkShellSidebarTopDirective,
459
+ isStandalone: true,
460
+ selector: "[sparkShellSidebarTop]",
461
+ ngImport: i0
462
+ });
463
+ };
464
+ i0.ɵɵngDeclareClassMetadata({
465
+ minVersion: "12.0.0",
466
+ version: "22.2.0",
467
+ ngImport: i0,
468
+ type: SparkShellSidebarTopDirective,
469
+ decorators: [{
470
+ type: Directive,
471
+ args: [{ selector: "[sparkShellSidebarTop]" }]
472
+ }]
473
+ });
474
+ var SparkShellTabDirective = class SparkShellTabDirective {
475
+ templateRef = inject(TemplateRef);
476
+ header = input.required({
477
+ ...ngDevMode ? { debugName: "header" } : /* istanbul ignore next */ {},
478
+ alias: "sparkShellTab"
479
+ });
480
+ icon = input(void 0, {
481
+ ...ngDevMode ? { debugName: "icon" } : /* istanbul ignore next */ {},
482
+ alias: "sparkShellTabIcon"
483
+ });
484
+ headerTemplate = input(null, {
485
+ ...ngDevMode ? { debugName: "headerTemplate" } : /* istanbul ignore next */ {},
486
+ alias: "sparkShellTabHeader"
487
+ });
488
+ static ɵfac = i0.ɵɵngDeclareFactory({
489
+ minVersion: "12.0.0",
490
+ version: "22.2.0",
491
+ ngImport: i0,
492
+ type: SparkShellTabDirective,
493
+ deps: [],
494
+ target: i0.ɵɵFactoryTarget.Directive
495
+ });
496
+ static ɵdir = i0.ɵɵngDeclareDirective({
497
+ minVersion: "17.1.0",
498
+ version: "22.2.0",
499
+ type: SparkShellTabDirective,
500
+ isStandalone: true,
501
+ selector: "[sparkShellTab]",
502
+ inputs: {
503
+ header: {
504
+ classPropertyName: "header",
505
+ publicName: "sparkShellTab",
506
+ isSignal: true,
507
+ isRequired: true,
508
+ transformFunction: null
509
+ },
510
+ icon: {
511
+ classPropertyName: "icon",
512
+ publicName: "sparkShellTabIcon",
513
+ isSignal: true,
514
+ isRequired: false,
515
+ transformFunction: null
516
+ },
517
+ headerTemplate: {
518
+ classPropertyName: "headerTemplate",
519
+ publicName: "sparkShellTabHeader",
520
+ isSignal: true,
521
+ isRequired: false,
522
+ transformFunction: null
523
+ }
524
+ },
525
+ ngImport: i0
526
+ });
527
+ };
528
+ i0.ɵɵngDeclareClassMetadata({
529
+ minVersion: "12.0.0",
530
+ version: "22.2.0",
531
+ ngImport: i0,
532
+ type: SparkShellTabDirective,
533
+ decorators: [{
534
+ type: Directive,
535
+ args: [{ selector: "[sparkShellTab]" }]
536
+ }],
537
+ propDecorators: {
538
+ header: [{
539
+ type: i0.Input,
540
+ args: [{
541
+ isSignal: true,
542
+ alias: "sparkShellTab",
543
+ required: true
544
+ }]
545
+ }],
546
+ icon: [{
547
+ type: i0.Input,
548
+ args: [{
549
+ isSignal: true,
550
+ alias: "sparkShellTabIcon",
551
+ required: false
552
+ }]
553
+ }],
554
+ headerTemplate: [{
555
+ type: i0.Input,
556
+ args: [{
557
+ isSignal: true,
558
+ alias: "sparkShellTabHeader",
559
+ required: false
560
+ }]
561
+ }]
562
+ }
563
+ });
564
+ var SparkShellSidebarFooterDirective = class SparkShellSidebarFooterDirective {
565
+ templateRef = inject(TemplateRef);
566
+ static ɵfac = i0.ɵɵngDeclareFactory({
567
+ minVersion: "12.0.0",
568
+ version: "22.2.0",
569
+ ngImport: i0,
570
+ type: SparkShellSidebarFooterDirective,
571
+ deps: [],
572
+ target: i0.ɵɵFactoryTarget.Directive
573
+ });
574
+ static ɵdir = i0.ɵɵngDeclareDirective({
575
+ minVersion: "14.0.0",
576
+ version: "22.2.0",
577
+ type: SparkShellSidebarFooterDirective,
578
+ isStandalone: true,
579
+ selector: "[sparkShellSidebarFooter]",
580
+ ngImport: i0
581
+ });
582
+ };
583
+ i0.ɵɵngDeclareClassMetadata({
584
+ minVersion: "12.0.0",
585
+ version: "22.2.0",
586
+ ngImport: i0,
587
+ type: SparkShellSidebarFooterDirective,
588
+ decorators: [{
589
+ type: Directive,
590
+ args: [{ selector: "[sparkShellSidebarFooter]" }]
591
+ }]
592
+ });
593
+ var SparkShellMainHeaderDirective = class SparkShellMainHeaderDirective {
594
+ templateRef = inject(TemplateRef);
595
+ static ɵfac = i0.ɵɵngDeclareFactory({
596
+ minVersion: "12.0.0",
597
+ version: "22.2.0",
598
+ ngImport: i0,
599
+ type: SparkShellMainHeaderDirective,
600
+ deps: [],
601
+ target: i0.ɵɵFactoryTarget.Directive
602
+ });
603
+ static ɵdir = i0.ɵɵngDeclareDirective({
604
+ minVersion: "14.0.0",
605
+ version: "22.2.0",
606
+ type: SparkShellMainHeaderDirective,
607
+ isStandalone: true,
608
+ selector: "[sparkShellMainHeader]",
609
+ ngImport: i0
610
+ });
611
+ };
612
+ i0.ɵɵngDeclareClassMetadata({
613
+ minVersion: "12.0.0",
614
+ version: "22.2.0",
615
+ ngImport: i0,
616
+ type: SparkShellMainHeaderDirective,
617
+ decorators: [{
618
+ type: Directive,
619
+ args: [{ selector: "[sparkShellMainHeader]" }]
620
+ }]
621
+ });
622
+ var SparkShellComponent = class SparkShellComponent {
623
+ title = input("", ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
624
+ breakpoint = input("md", ...ngDevMode ? [{ debugName: "breakpoint" }] : /* istanbul ignore next */ []);
625
+ themeToggle = input(true, ...ngDevMode ? [{ debugName: "themeToggle" }] : /* istanbul ignore next */ []);
626
+ theme = inject(BsThemeService);
627
+ lang = inject(SparkLanguageService);
628
+ themeModes = computed(() => BS_THEME_DEFAULT_MODES.map((m) => {
629
+ const name = m.mode.charAt(0).toUpperCase() + m.mode.slice(1);
630
+ return {
631
+ ...m,
632
+ label: this.lang.t(`theme.switchTo${name}`),
633
+ announcement: this.lang.t(`theme.${m.mode}`)
634
+ };
635
+ }), ...ngDevMode ? [{ debugName: "themeModes" }] : /* istanbul ignore next */ []);
636
+ reloadToken = input(null, ...ngDevMode ? [{ debugName: "reloadToken" }] : /* istanbul ignore next */ []);
637
+ sidebarTabs = input([], ...ngDevMode ? [{ debugName: "sidebarTabs" }] : /* istanbul ignore next */ []);
638
+ topbarStartTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarStartTemplate" }] : /* istanbul ignore next */ []);
639
+ topbarEndTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarEndTemplate" }] : /* istanbul ignore next */ []);
640
+ topbarActionsTemplate = input(null, ...ngDevMode ? [{ debugName: "topbarActionsTemplate" }] : /* istanbul ignore next */ []);
641
+ sidebarHeaderTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarHeaderTemplate" }] : /* istanbul ignore next */ []);
642
+ sidebarTopTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarTopTemplate" }] : /* istanbul ignore next */ []);
643
+ sidebarFooterTemplate = input(null, ...ngDevMode ? [{ debugName: "sidebarFooterTemplate" }] : /* istanbul ignore next */ []);
644
+ mainHeaderTemplate = input(null, ...ngDevMode ? [{ debugName: "mainHeaderTemplate" }] : /* istanbul ignore next */ []);
645
+ topbarStartSlot = contentChild(SparkShellTopbarStartDirective, ...ngDevMode ? [{ debugName: "topbarStartSlot" }] : /* istanbul ignore next */ []);
646
+ topbarEndSlot = contentChild(SparkShellTopbarEndDirective, ...ngDevMode ? [{ debugName: "topbarEndSlot" }] : /* istanbul ignore next */ []);
647
+ topbarActionsSlot = contentChild(SparkShellTopbarActionsDirective, ...ngDevMode ? [{ debugName: "topbarActionsSlot" }] : /* istanbul ignore next */ []);
648
+ sidebarHeaderSlot = contentChild(SparkShellSidebarHeaderDirective, ...ngDevMode ? [{ debugName: "sidebarHeaderSlot" }] : /* istanbul ignore next */ []);
649
+ sidebarTopSlot = contentChild(SparkShellSidebarTopDirective, ...ngDevMode ? [{ debugName: "sidebarTopSlot" }] : /* istanbul ignore next */ []);
650
+ sidebarFooterSlot = contentChild(SparkShellSidebarFooterDirective, ...ngDevMode ? [{ debugName: "sidebarFooterSlot" }] : /* istanbul ignore next */ []);
651
+ mainHeaderSlot = contentChild(SparkShellMainHeaderDirective, ...ngDevMode ? [{ debugName: "mainHeaderSlot" }] : /* istanbul ignore next */ []);
652
+ topbarStartTpl = computed(() => this.topbarStartSlot()?.templateRef ?? this.topbarStartTemplate(), ...ngDevMode ? [{ debugName: "topbarStartTpl" }] : /* istanbul ignore next */ []);
653
+ topbarEndTpl = computed(() => this.topbarEndSlot()?.templateRef ?? this.topbarEndTemplate(), ...ngDevMode ? [{ debugName: "topbarEndTpl" }] : /* istanbul ignore next */ []);
654
+ topbarActionsTpl = computed(() => this.topbarActionsSlot()?.templateRef ?? this.topbarActionsTemplate(), ...ngDevMode ? [{ debugName: "topbarActionsTpl" }] : /* istanbul ignore next */ []);
655
+ sidebarHeaderTpl = computed(() => this.sidebarHeaderSlot()?.templateRef ?? this.sidebarHeaderTemplate(), ...ngDevMode ? [{ debugName: "sidebarHeaderTpl" }] : /* istanbul ignore next */ []);
656
+ sidebarTopTpl = computed(() => this.sidebarTopSlot()?.templateRef ?? this.sidebarTopTemplate(), ...ngDevMode ? [{ debugName: "sidebarTopTpl" }] : /* istanbul ignore next */ []);
657
+ sidebarFooterTpl = computed(() => this.sidebarFooterSlot()?.templateRef ?? this.sidebarFooterTemplate(), ...ngDevMode ? [{ debugName: "sidebarFooterTpl" }] : /* istanbul ignore next */ []);
658
+ mainHeaderTpl = computed(() => this.mainHeaderSlot()?.templateRef ?? this.mainHeaderTemplate(), ...ngDevMode ? [{ debugName: "mainHeaderTpl" }] : /* istanbul ignore next */ []);
659
+ tabSlots = contentChildren(SparkShellTabDirective, ...ngDevMode ? [{ debugName: "tabSlots" }] : /* istanbul ignore next */ []);
660
+ tabs = computed(() => [...this.sidebarTabs(), ...this.tabSlots().map((slot) => ({
661
+ header: slot.header(),
662
+ icon: slot.icon(),
663
+ headerTemplate: slot.headerTemplate(),
664
+ content: slot.templateRef
665
+ }))], ...ngDevMode ? [{ debugName: "tabs" }] : /* istanbul ignore next */ []);
666
+ shellState = signal("auto", ...ngDevMode ? [{ debugName: "shellState" }] : /* istanbul ignore next */ []);
667
+ isSidebarVisible = signal(false, ...ngDevMode ? [{ debugName: "isSidebarVisible" }] : /* istanbul ignore next */ []);
668
+ toggleSidebar(open) {
669
+ this.shellState.set(open ? "show" : "hide");
670
+ }
671
+ onShellToggle(detail) {
672
+ this.isSidebarVisible.set(detail.open);
673
+ }
674
+ static ɵfac = i0.ɵɵngDeclareFactory({
675
+ minVersion: "12.0.0",
676
+ version: "22.2.0",
677
+ ngImport: i0,
678
+ type: SparkShellComponent,
679
+ deps: [],
680
+ target: i0.ɵɵFactoryTarget.Component
681
+ });
682
+ static ɵcmp = i0.ɵɵngDeclareComponent({
683
+ minVersion: "17.0.0",
684
+ version: "22.2.0",
685
+ type: SparkShellComponent,
686
+ isStandalone: true,
687
+ selector: "spark-shell",
688
+ inputs: {
689
+ title: {
690
+ classPropertyName: "title",
691
+ publicName: "title",
692
+ isSignal: true,
693
+ isRequired: false,
694
+ transformFunction: null
695
+ },
696
+ breakpoint: {
697
+ classPropertyName: "breakpoint",
698
+ publicName: "breakpoint",
699
+ isSignal: true,
700
+ isRequired: false,
701
+ transformFunction: null
702
+ },
703
+ themeToggle: {
704
+ classPropertyName: "themeToggle",
705
+ publicName: "themeToggle",
706
+ isSignal: true,
707
+ isRequired: false,
708
+ transformFunction: null
709
+ },
710
+ reloadToken: {
711
+ classPropertyName: "reloadToken",
712
+ publicName: "reloadToken",
713
+ isSignal: true,
714
+ isRequired: false,
715
+ transformFunction: null
716
+ },
717
+ sidebarTabs: {
718
+ classPropertyName: "sidebarTabs",
719
+ publicName: "sidebarTabs",
720
+ isSignal: true,
721
+ isRequired: false,
722
+ transformFunction: null
723
+ },
724
+ topbarStartTemplate: {
725
+ classPropertyName: "topbarStartTemplate",
726
+ publicName: "topbarStartTemplate",
727
+ isSignal: true,
728
+ isRequired: false,
729
+ transformFunction: null
730
+ },
731
+ topbarEndTemplate: {
732
+ classPropertyName: "topbarEndTemplate",
733
+ publicName: "topbarEndTemplate",
734
+ isSignal: true,
735
+ isRequired: false,
736
+ transformFunction: null
737
+ },
738
+ topbarActionsTemplate: {
739
+ classPropertyName: "topbarActionsTemplate",
740
+ publicName: "topbarActionsTemplate",
741
+ isSignal: true,
742
+ isRequired: false,
743
+ transformFunction: null
744
+ },
745
+ sidebarHeaderTemplate: {
746
+ classPropertyName: "sidebarHeaderTemplate",
747
+ publicName: "sidebarHeaderTemplate",
748
+ isSignal: true,
749
+ isRequired: false,
750
+ transformFunction: null
751
+ },
752
+ sidebarTopTemplate: {
753
+ classPropertyName: "sidebarTopTemplate",
754
+ publicName: "sidebarTopTemplate",
755
+ isSignal: true,
756
+ isRequired: false,
757
+ transformFunction: null
758
+ },
759
+ sidebarFooterTemplate: {
760
+ classPropertyName: "sidebarFooterTemplate",
761
+ publicName: "sidebarFooterTemplate",
762
+ isSignal: true,
763
+ isRequired: false,
764
+ transformFunction: null
765
+ },
766
+ mainHeaderTemplate: {
767
+ classPropertyName: "mainHeaderTemplate",
768
+ publicName: "mainHeaderTemplate",
769
+ isSignal: true,
770
+ isRequired: false,
771
+ transformFunction: null
772
+ }
773
+ },
774
+ queries: [
775
+ {
776
+ propertyName: "topbarStartSlot",
777
+ first: true,
778
+ predicate: SparkShellTopbarStartDirective,
779
+ descendants: true,
780
+ isSignal: true
781
+ },
782
+ {
783
+ propertyName: "topbarEndSlot",
784
+ first: true,
785
+ predicate: SparkShellTopbarEndDirective,
786
+ descendants: true,
787
+ isSignal: true
788
+ },
789
+ {
790
+ propertyName: "topbarActionsSlot",
791
+ first: true,
792
+ predicate: SparkShellTopbarActionsDirective,
793
+ descendants: true,
794
+ isSignal: true
795
+ },
796
+ {
797
+ propertyName: "sidebarHeaderSlot",
798
+ first: true,
799
+ predicate: SparkShellSidebarHeaderDirective,
800
+ descendants: true,
801
+ isSignal: true
802
+ },
803
+ {
804
+ propertyName: "sidebarTopSlot",
805
+ first: true,
806
+ predicate: SparkShellSidebarTopDirective,
807
+ descendants: true,
808
+ isSignal: true
809
+ },
810
+ {
811
+ propertyName: "sidebarFooterSlot",
812
+ first: true,
813
+ predicate: SparkShellSidebarFooterDirective,
814
+ descendants: true,
815
+ isSignal: true
816
+ },
817
+ {
818
+ propertyName: "mainHeaderSlot",
819
+ first: true,
820
+ predicate: SparkShellMainHeaderDirective,
821
+ descendants: true,
822
+ isSignal: true
823
+ },
824
+ {
825
+ propertyName: "tabSlots",
826
+ predicate: SparkShellTabDirective,
827
+ isSignal: true
828
+ }
829
+ ],
830
+ ngImport: i0,
831
+ 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 <!-- Also outside the trailing @if: replacing the end slot (e.g. with spark-auth-bar) keeps it. -->\n @if (themeToggle()) {\n <bs-theme-toggle [modes]=\"themeModes()\" />\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 @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",
832
+ styles: ["::ng-deep :root,::ng-deep [data-bs-theme=light]{--spark-shell-topbar-bg: var(--bs-tertiary-bg);--spark-shell-topbar-color: var(--bs-body-color);--spark-shell-sidebar-bg: var(--bs-tertiary-bg);--spark-shell-sidebar-color: var(--bs-body-color);--spark-shell-main-bg: var(--bs-body-bg);--spark-shell-main-color: var(--bs-body-color)}::ng-deep [data-bs-theme=dark]{--spark-shell-topbar-bg: var(--bs-tertiary-bg);--spark-shell-topbar-color: var(--bs-body-color);--spark-shell-sidebar-bg: var(--bs-tertiary-bg);--spark-shell-sidebar-color: var(--bs-body-color);--spark-shell-main-bg: var(--bs-body-bg);--spark-shell-main-color: var(--bs-body-color)}:host{display:flex;flex-direction:column;height:100vh;--spark-shell-border-color: var(--bs-border-color)}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-tertiary-bg));color:var(--spark-shell-topbar-color, var(--bs-body-color));border-bottom:var(--bs-border-width) solid var(--spark-shell-border-color)}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: var(--spark-shell-topbar-color, var(--bs-body-color))}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, var(--bs-body-bg));color:var(--spark-shell-main-color, var(--bs-body-color));display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, var(--bs-tertiary-bg));color:var(--spark-shell-sidebar-color, var(--bs-body-color));border-inline-end:var(--bs-border-width) solid var(--spark-shell-border-color)}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(var(--bs-emphasis-color-rgb), .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:rgba(var(--bs-emphasis-color-rgb),.1)}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:rgba(var(--bs-emphasis-color-rgb),.2)}\n"],
833
+ dependencies: [
834
+ {
835
+ kind: "directive",
836
+ type: NgTemplateOutlet,
837
+ selector: "[ngTemplateOutlet]",
838
+ inputs: [
839
+ "ngTemplateOutletContext",
840
+ "ngTemplateOutlet",
841
+ "ngTemplateOutletInjector"
842
+ ]
843
+ },
844
+ {
845
+ kind: "component",
846
+ type: BsShellComponent,
847
+ selector: "bs-shell",
848
+ inputs: [
849
+ "state",
850
+ "breakpoint",
851
+ "dismissOnNavigate"
852
+ ],
853
+ outputs: ["statechange"]
854
+ },
855
+ {
856
+ kind: "directive",
857
+ type: BsShellSidebarDirective,
858
+ selector: "[bsShellSidebar]"
859
+ },
860
+ {
861
+ kind: "component",
862
+ type: BsNavbarTogglerComponent,
863
+ selector: "bs-navbar-toggler",
864
+ inputs: [
865
+ "state",
866
+ "toggleOnClick",
867
+ "ariaLabel",
868
+ "controls"
869
+ ],
870
+ outputs: ["stateChange"]
871
+ },
872
+ {
873
+ kind: "component",
874
+ type: BsThemeToggleComponent,
875
+ selector: "bs-theme-toggle",
876
+ inputs: ["modes"]
877
+ },
878
+ {
879
+ kind: "component",
880
+ type: SparkProgramUnitsComponent,
881
+ selector: "spark-program-units",
882
+ inputs: ["reloadToken", "extraTabs"]
883
+ },
884
+ {
885
+ kind: "component",
886
+ type: SparkLanguageSelectorComponent,
887
+ selector: "spark-language-selector"
888
+ }
889
+ ],
890
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
891
+ });
892
+ };
893
+ i0.ɵɵngDeclareClassMetadata({
894
+ minVersion: "12.0.0",
895
+ version: "22.2.0",
896
+ ngImport: i0,
897
+ type: SparkShellComponent,
898
+ decorators: [{
899
+ type: Component,
900
+ args: [{
901
+ selector: "spark-shell",
902
+ standalone: true,
903
+ changeDetection: ChangeDetectionStrategy.OnPush,
904
+ imports: [
905
+ NgTemplateOutlet,
906
+ BsShellComponent,
907
+ BsShellSidebarDirective,
908
+ BsNavbarTogglerComponent,
909
+ BsThemeToggleComponent,
910
+ SparkProgramUnitsComponent,
911
+ SparkLanguageSelectorComponent
912
+ ],
913
+ 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 <!-- Also outside the trailing @if: replacing the end slot (e.g. with spark-auth-bar) keeps it. -->\n @if (themeToggle()) {\n <bs-theme-toggle [modes]=\"themeModes()\" />\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 @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",
914
+ styles: ["::ng-deep :root,::ng-deep [data-bs-theme=light]{--spark-shell-topbar-bg: var(--bs-tertiary-bg);--spark-shell-topbar-color: var(--bs-body-color);--spark-shell-sidebar-bg: var(--bs-tertiary-bg);--spark-shell-sidebar-color: var(--bs-body-color);--spark-shell-main-bg: var(--bs-body-bg);--spark-shell-main-color: var(--bs-body-color)}::ng-deep [data-bs-theme=dark]{--spark-shell-topbar-bg: var(--bs-tertiary-bg);--spark-shell-topbar-color: var(--bs-body-color);--spark-shell-sidebar-bg: var(--bs-tertiary-bg);--spark-shell-sidebar-color: var(--bs-body-color);--spark-shell-main-bg: var(--bs-body-bg);--spark-shell-main-color: var(--bs-body-color)}:host{display:flex;flex-direction:column;height:100vh;--spark-shell-border-color: var(--bs-border-color)}bs-shell{flex:1 1 auto;min-height:0}.spark-topbar{background-color:var(--spark-shell-topbar-bg, var(--bs-tertiary-bg));color:var(--spark-shell-topbar-color, var(--bs-body-color));border-bottom:var(--bs-border-width) solid var(--spark-shell-border-color)}::ng-deep spark-shell mp-shell::part(hamburger){display:none}bs-navbar-toggler{--bs-secondary-color: var(--spark-shell-topbar-color, var(--bs-body-color))}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, var(--bs-body-bg));color:var(--spark-shell-main-color, var(--bs-body-color));display:flex;flex-direction:column;overflow:auto}nav.spark-sidebar{min-height:100%;background:var(--spark-shell-sidebar-bg, var(--bs-tertiary-bg));color:var(--spark-shell-sidebar-color, var(--bs-body-color));border-inline-end:var(--bs-border-width) solid var(--spark-shell-border-color)}:host ::ng-deep nav.spark-sidebar{--bs-primary-bg-subtle: rgba(var(--bs-emphasis-color-rgb), .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:rgba(var(--bs-emphasis-color-rgb),.1)}:host ::ng-deep nav.spark-sidebar .nav-link.active{background-color:rgba(var(--bs-emphasis-color-rgb),.2)}\n"]
915
+ }]
916
+ }],
917
+ propDecorators: {
918
+ title: [{
919
+ type: i0.Input,
920
+ args: [{
921
+ isSignal: true,
922
+ alias: "title",
923
+ required: false
924
+ }]
925
+ }],
926
+ breakpoint: [{
927
+ type: i0.Input,
928
+ args: [{
929
+ isSignal: true,
930
+ alias: "breakpoint",
931
+ required: false
932
+ }]
933
+ }],
934
+ themeToggle: [{
935
+ type: i0.Input,
936
+ args: [{
937
+ isSignal: true,
938
+ alias: "themeToggle",
939
+ required: false
940
+ }]
941
+ }],
942
+ reloadToken: [{
943
+ type: i0.Input,
944
+ args: [{
945
+ isSignal: true,
946
+ alias: "reloadToken",
947
+ required: false
948
+ }]
949
+ }],
950
+ sidebarTabs: [{
951
+ type: i0.Input,
952
+ args: [{
953
+ isSignal: true,
954
+ alias: "sidebarTabs",
955
+ required: false
956
+ }]
957
+ }],
958
+ topbarStartTemplate: [{
959
+ type: i0.Input,
960
+ args: [{
961
+ isSignal: true,
962
+ alias: "topbarStartTemplate",
963
+ required: false
964
+ }]
965
+ }],
966
+ topbarEndTemplate: [{
967
+ type: i0.Input,
968
+ args: [{
969
+ isSignal: true,
970
+ alias: "topbarEndTemplate",
971
+ required: false
972
+ }]
973
+ }],
974
+ topbarActionsTemplate: [{
975
+ type: i0.Input,
976
+ args: [{
977
+ isSignal: true,
978
+ alias: "topbarActionsTemplate",
979
+ required: false
980
+ }]
981
+ }],
982
+ sidebarHeaderTemplate: [{
983
+ type: i0.Input,
984
+ args: [{
985
+ isSignal: true,
986
+ alias: "sidebarHeaderTemplate",
987
+ required: false
988
+ }]
989
+ }],
990
+ sidebarTopTemplate: [{
991
+ type: i0.Input,
992
+ args: [{
993
+ isSignal: true,
994
+ alias: "sidebarTopTemplate",
995
+ required: false
996
+ }]
997
+ }],
998
+ sidebarFooterTemplate: [{
999
+ type: i0.Input,
1000
+ args: [{
1001
+ isSignal: true,
1002
+ alias: "sidebarFooterTemplate",
1003
+ required: false
1004
+ }]
1005
+ }],
1006
+ mainHeaderTemplate: [{
1007
+ type: i0.Input,
1008
+ args: [{
1009
+ isSignal: true,
1010
+ alias: "mainHeaderTemplate",
1011
+ required: false
1012
+ }]
1013
+ }],
1014
+ topbarStartSlot: [{
1015
+ type: i0.ContentChild,
1016
+ args: [i0.forwardRef(() => SparkShellTopbarStartDirective), { isSignal: true }]
1017
+ }],
1018
+ topbarEndSlot: [{
1019
+ type: i0.ContentChild,
1020
+ args: [i0.forwardRef(() => SparkShellTopbarEndDirective), { isSignal: true }]
1021
+ }],
1022
+ topbarActionsSlot: [{
1023
+ type: i0.ContentChild,
1024
+ args: [i0.forwardRef(() => SparkShellTopbarActionsDirective), { isSignal: true }]
1025
+ }],
1026
+ sidebarHeaderSlot: [{
1027
+ type: i0.ContentChild,
1028
+ args: [i0.forwardRef(() => SparkShellSidebarHeaderDirective), { isSignal: true }]
1029
+ }],
1030
+ sidebarTopSlot: [{
1031
+ type: i0.ContentChild,
1032
+ args: [i0.forwardRef(() => SparkShellSidebarTopDirective), { isSignal: true }]
1033
+ }],
1034
+ sidebarFooterSlot: [{
1035
+ type: i0.ContentChild,
1036
+ args: [i0.forwardRef(() => SparkShellSidebarFooterDirective), { isSignal: true }]
1037
+ }],
1038
+ mainHeaderSlot: [{
1039
+ type: i0.ContentChild,
1040
+ args: [i0.forwardRef(() => SparkShellMainHeaderDirective), { isSignal: true }]
1041
+ }],
1042
+ tabSlots: [{
1043
+ type: i0.ContentChildren,
1044
+ args: [i0.forwardRef(() => SparkShellTabDirective), { isSignal: true }]
1045
+ }]
1046
+ }
1047
+ });
415
1048
  export { SparkLanguageSelectorComponent, SparkProgramUnitsComponent, SparkShellComponent, SparkShellMainHeaderDirective, SparkShellSidebarFooterDirective, SparkShellSidebarHeaderDirective, SparkShellSidebarTopDirective, SparkShellTabDirective, SparkShellTopbarActionsDirective, SparkShellTopbarEndDirective, SparkShellTopbarStartDirective };
416
- //# sourceMappingURL=mintplayer-ng-spark-shell.mjs.map
1049
+
1050
+ //# sourceMappingURL=mintplayer-ng-spark-shell.mjs.map