@thescaffold/ngx-apps-blog 0.2.21 → 0.2.31

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 (61) hide show
  1. package/fesm2022/thescaffold-ngx-apps-blog-article.module-Dw4mmJ0O.mjs +128 -0
  2. package/fesm2022/thescaffold-ngx-apps-blog-article.module-Dw4mmJ0O.mjs.map +1 -0
  3. package/fesm2022/thescaffold-ngx-apps-blog-docs.module-DKKKNEI-.mjs +484 -0
  4. package/fesm2022/thescaffold-ngx-apps-blog-docs.module-DKKKNEI-.mjs.map +1 -0
  5. package/fesm2022/{thescaffold-ngx-apps-blog-error.module-BzAoFNog.mjs → thescaffold-ngx-apps-blog-error.module-Ck2ZPspy.mjs} +9 -9
  6. package/fesm2022/thescaffold-ngx-apps-blog-error.module-Ck2ZPspy.mjs.map +1 -0
  7. package/fesm2022/thescaffold-ngx-apps-blog-home.module-LXerbHw9.mjs +1028 -0
  8. package/fesm2022/thescaffold-ngx-apps-blog-home.module-LXerbHw9.mjs.map +1 -0
  9. package/fesm2022/thescaffold-ngx-apps-blog.mjs +22 -22
  10. package/fesm2022/thescaffold-ngx-apps-blog.mjs.map +1 -1
  11. package/package.json +77 -27
  12. package/types/thescaffold-ngx-apps-blog.d.ts +33 -0
  13. package/esm2022/lib/app.module.mjs +0 -17
  14. package/esm2022/lib/index.mjs +0 -6
  15. package/esm2022/lib/pages/article/article.component.mjs +0 -82
  16. package/esm2022/lib/pages/article/article.module.mjs +0 -35
  17. package/esm2022/lib/pages/docs/docs.component.mjs +0 -386
  18. package/esm2022/lib/pages/docs/docs.module.mjs +0 -47
  19. package/esm2022/lib/pages/error/error.component.mjs +0 -75
  20. package/esm2022/lib/pages/error/error.module.mjs +0 -26
  21. package/esm2022/lib/pages/home/home.component.mjs +0 -49
  22. package/esm2022/lib/pages/home/home.module.mjs +0 -36
  23. package/esm2022/lib/pages/pages.component.mjs +0 -60
  24. package/esm2022/lib/pages/pages.module.mjs +0 -95
  25. package/esm2022/lib/pkg/cards/card/card.component.mjs +0 -763
  26. package/esm2022/lib/pkg/cards/card/index.mjs +0 -3
  27. package/esm2022/lib/pkg/cards/cards.component.mjs +0 -27
  28. package/esm2022/lib/pkg/cards/cards.module.mjs +0 -21
  29. package/esm2022/lib/pkg/cards/cards.utils.mjs +0 -2
  30. package/esm2022/lib/pkg/cards/index.mjs +0 -4
  31. package/esm2022/lib/pkg/index.mjs +0 -2
  32. package/esm2022/public-api.mjs +0 -5
  33. package/esm2022/thescaffold-ngx-apps-blog.mjs +0 -5
  34. package/fesm2022/thescaffold-ngx-apps-blog-article.module-BnLR8e24.mjs +0 -114
  35. package/fesm2022/thescaffold-ngx-apps-blog-article.module-BnLR8e24.mjs.map +0 -1
  36. package/fesm2022/thescaffold-ngx-apps-blog-docs.module-DRQ-g0-1.mjs +0 -430
  37. package/fesm2022/thescaffold-ngx-apps-blog-docs.module-DRQ-g0-1.mjs.map +0 -1
  38. package/fesm2022/thescaffold-ngx-apps-blog-error.module-BzAoFNog.mjs.map +0 -1
  39. package/fesm2022/thescaffold-ngx-apps-blog-home.module-CG11DLKD.mjs +0 -876
  40. package/fesm2022/thescaffold-ngx-apps-blog-home.module-CG11DLKD.mjs.map +0 -1
  41. package/index.d.ts +0 -5
  42. package/lib/app.module.d.ts +0 -8
  43. package/lib/index.d.ts +0 -5
  44. package/lib/pages/article/article.component.d.ts +0 -11
  45. package/lib/pages/article/article.module.d.ts +0 -10
  46. package/lib/pages/docs/docs.component.d.ts +0 -17
  47. package/lib/pages/docs/docs.module.d.ts +0 -10
  48. package/lib/pages/error/error.component.d.ts +0 -11
  49. package/lib/pages/error/error.module.d.ts +0 -10
  50. package/lib/pages/home/home.component.d.ts +0 -7
  51. package/lib/pages/home/home.module.d.ts +0 -11
  52. package/lib/pages/pages.component.d.ts +0 -9
  53. package/lib/pages/pages.module.d.ts +0 -11
  54. package/lib/pkg/cards/card/card.component.d.ts +0 -9
  55. package/lib/pkg/cards/card/index.d.ts +0 -2
  56. package/lib/pkg/cards/cards.component.d.ts +0 -7
  57. package/lib/pkg/cards/cards.module.d.ts +0 -10
  58. package/lib/pkg/cards/cards.utils.d.ts +0 -29
  59. package/lib/pkg/cards/index.d.ts +0 -3
  60. package/lib/pkg/index.d.ts +0 -1
  61. package/public-api.d.ts +0 -1
@@ -0,0 +1,128 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/router';
4
+ import { ActivatedRoute, RouterModule } from '@angular/router';
5
+ import * as i4 from '@thescaffold/ngx-core';
6
+ import { MediaService, SharedModule } from '@thescaffold/ngx-core';
7
+ import * as i2 from '@thescaffold/ngx-ui';
8
+ import { LayoutsModule, ElementsModule } from '@thescaffold/ngx-ui';
9
+ import { switchMap } from 'rxjs';
10
+ import * as i1$1 from '@angular/common';
11
+
12
+ class ArticleComponent {
13
+ constructor() {
14
+ this.route = inject(ActivatedRoute);
15
+ this.mediaService = inject(MediaService);
16
+ this.article$ = this.route.params.pipe(switchMap((params) => {
17
+ this.category = params['category'];
18
+ this.title = params['article'];
19
+ const name = this.category
20
+ ? `${this.category}/${this.title}`
21
+ : `${this.title}`;
22
+ return this.mediaService.context('blog').article(name);
23
+ }));
24
+ }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ArticleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
26
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: ArticleComponent, isStandalone: false, selector: "x-article", ngImport: i0, template: `
27
+ @if (article$ | async; as article) {
28
+ <div class="">
29
+ <div class="">
30
+ <nav>
31
+ @if (title) {
32
+ <ol class="breadcrumb">
33
+ <li class="breadcrumb-item">
34
+ <a [routerLink]="'blog.root' | xRoute">{{
35
+ 'apps.blog.component.article.home.title' | xTranslate
36
+ }}</a>
37
+ </li>
38
+ @if (category) {
39
+ <li class="breadcrumb-item">{{ category }}</li>
40
+ }
41
+ @if (title) {
42
+ <li class="breadcrumb-item">{{ title }}</li>
43
+ }
44
+ </ol>
45
+ }
46
+ </nav>
47
+ </div>
48
+ <div [innerHTML]="article" class="w-75"></div>
49
+ </div>
50
+ } @else {
51
+ <x-element-blank></x-element-blank>
52
+ }
53
+
54
+ <!-- misc -->
55
+ <ng-template #loader>
56
+ <x-element-loader></x-element-loader>
57
+ </ng-template>
58
+
59
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i2.BlankComponent, selector: "x-element-blank", inputs: ["image", "icon", "type"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.RoutePipe, name: "xRoute" }, { kind: "pipe", type: i4.TranslatePipe, name: "xTranslate" }] }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ArticleComponent, decorators: [{
62
+ type: Component,
63
+ args: [{ standalone: false, selector: 'x-article', template: `
64
+ @if (article$ | async; as article) {
65
+ <div class="">
66
+ <div class="">
67
+ <nav>
68
+ @if (title) {
69
+ <ol class="breadcrumb">
70
+ <li class="breadcrumb-item">
71
+ <a [routerLink]="'blog.root' | xRoute">{{
72
+ 'apps.blog.component.article.home.title' | xTranslate
73
+ }}</a>
74
+ </li>
75
+ @if (category) {
76
+ <li class="breadcrumb-item">{{ category }}</li>
77
+ }
78
+ @if (title) {
79
+ <li class="breadcrumb-item">{{ title }}</li>
80
+ }
81
+ </ol>
82
+ }
83
+ </nav>
84
+ </div>
85
+ <div [innerHTML]="article" class="w-75"></div>
86
+ </div>
87
+ } @else {
88
+ <x-element-blank></x-element-blank>
89
+ }
90
+
91
+ <!-- misc -->
92
+ <ng-template #loader>
93
+ <x-element-loader></x-element-loader>
94
+ </ng-template>
95
+
96
+ ` }]
97
+ }] });
98
+
99
+ class ArticleModule {
100
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ArticleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
101
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: ArticleModule, declarations: [ArticleComponent], imports: [SharedModule, i1.RouterModule, LayoutsModule,
102
+ ElementsModule] }); }
103
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ArticleModule, imports: [SharedModule,
104
+ RouterModule.forChild([
105
+ { path: ':category/:article', component: ArticleComponent },
106
+ { path: ':article', component: ArticleComponent },
107
+ ]),
108
+ LayoutsModule,
109
+ ElementsModule] }); }
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: ArticleModule, decorators: [{
112
+ type: NgModule,
113
+ args: [{
114
+ declarations: [ArticleComponent],
115
+ imports: [
116
+ SharedModule,
117
+ RouterModule.forChild([
118
+ { path: ':category/:article', component: ArticleComponent },
119
+ { path: ':article', component: ArticleComponent },
120
+ ]),
121
+ LayoutsModule,
122
+ ElementsModule,
123
+ ],
124
+ }]
125
+ }] });
126
+
127
+ export { ArticleModule };
128
+ //# sourceMappingURL=thescaffold-ngx-apps-blog-article.module-Dw4mmJ0O.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"thescaffold-ngx-apps-blog-article.module-Dw4mmJ0O.mjs","sources":["../../../projects/blog/src/lib/pages/article/article.component.ts","../../../projects/blog/src/lib/pages/article/article.module.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { MediaService } from '@thescaffold/ngx-core';\nimport { Observable, switchMap } from 'rxjs';\n\n@Component({\n standalone: false,\n selector: 'x-article',\n template: `\n @if (article$ | async; as article) {\n <div class=\"\">\n <div class=\"\">\n <nav>\n @if (title) {\n <ol class=\"breadcrumb\">\n <li class=\"breadcrumb-item\">\n <a [routerLink]=\"'blog.root' | xRoute\">{{\n 'apps.blog.component.article.home.title' | xTranslate\n }}</a>\n </li>\n @if (category) {\n <li class=\"breadcrumb-item\">{{ category }}</li>\n }\n @if (title) {\n <li class=\"breadcrumb-item\">{{ title }}</li>\n }\n </ol>\n }\n </nav>\n </div>\n <div [innerHTML]=\"article\" class=\"w-75\"></div>\n </div>\n } @else {\n <x-element-blank></x-element-blank>\n }\n \n <!-- misc -->\n <ng-template #loader>\n <x-element-loader></x-element-loader>\n </ng-template>\n \n `,\n styles: [],\n})\nexport class ArticleComponent {\n private readonly route = inject(ActivatedRoute);\n private readonly mediaService = inject(MediaService);\n\n category?: string;\n title?: string;\n article$: Observable<any> = this.route.params.pipe(\n switchMap((params) => {\n this.category = params['category'];\n this.title = params['article'];\n const name = this.category\n ? `${this.category}/${this.title}`\n : `${this.title}`;\n return this.mediaService.context('blog').article(name);\n }),\n );\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { SharedModule } from '@thescaffold/ngx-core';\nimport { ElementsModule, LayoutsModule } from '@thescaffold/ngx-ui';\nimport { ArticleComponent } from './article.component';\n\n@NgModule({\n declarations: [ArticleComponent],\n imports: [\n SharedModule,\n RouterModule.forChild([\n { path: ':category/:article', component: ArticleComponent },\n { path: ':article', component: ArticleComponent },\n ]),\n LayoutsModule,\n ElementsModule,\n ],\n})\nexport class ArticleModule {}\n"],"names":["i3"],"mappings":";;;;;;;;;;;MA4Ca,gBAAgB,CAAA;AAvC7B,IAAA,WAAA,GAAA;AAwCmB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC;AAC9B,QAAA,IAAA,CAAA,YAAY,GAAG,MAA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,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YATtB,YAAY;YACZ,YAAY,CAAC,QAAQ,CAAC;AACpB,gBAAA,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,gBAAgB,EAAE;AAC3D,gBAAA,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE;aAClD,CAAC;YACF,aAAa;YACb,cAAc,CAAA,EAAA,CAAA,CAAA;;2FAGL,aAAa,EAAA,UAAA,EAAA,CAAA;kBAZzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,gBAAgB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,YAAY,CAAC,QAAQ,CAAC;AACpB,4BAAA,EAAE,IAAI,EAAE,oBAAoB,EAAE,SAAS,EAAE,gBAAgB,EAAE;AAC3D,4BAAA,EAAE,IAAI,EAAE,UAAU,EAAE,SAAS,EAAE,gBAAgB,EAAE;yBAClD,CAAC;wBACF,aAAa;wBACb,cAAc;AACf,qBAAA;AACF,iBAAA;;;;;"}
@@ -0,0 +1,484 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@angular/router';
4
+ import { ActivatedRoute, RouterModule } from '@angular/router';
5
+ import * as i4 from '@thescaffold/ngx-core';
6
+ import { BaseDirective, MediaService, titleCase, SharedModule, PipesModule } from '@thescaffold/ngx-core';
7
+ import * as i2 from '@thescaffold/ngx-ui';
8
+ import { LayoutsModule, ElementsModule, ToolbarModule } from '@thescaffold/ngx-ui';
9
+ import { map, switchMap } from 'rxjs';
10
+ import * as i1 from '@angular/forms';
11
+ import * as i1$2 from '@angular/common';
12
+
13
+ class DocsComponent extends BaseDirective {
14
+ constructor() {
15
+ super(...arguments);
16
+ this.mediaService = inject(MediaService);
17
+ this.route = inject(ActivatedRoute);
18
+ this.navList = [];
19
+ this.showHeaders = true;
20
+ this.nav$ = this.mediaService
21
+ .context('blog')
22
+ .index()
23
+ .pipe(map((content) => {
24
+ return (this.navList = content?.nav);
25
+ }));
26
+ this.breadcrumbs$ = this.route.url.pipe(map((segments) => {
27
+ const breads = [
28
+ {
29
+ title: this.translate('apps.blog.component.docs.home.title'),
30
+ url: '/blog',
31
+ },
32
+ ...(segments.length > 1
33
+ ? [
34
+ {
35
+ title: titleCase(segments[0].path.replace(/-/g, ' ')),
36
+ url: `/${segments[0]}`,
37
+ },
38
+ ]
39
+ : []),
40
+ ...(segments.length > 2
41
+ ? [
42
+ {
43
+ title: titleCase(segments[1].path.replace(/-/g, ' ')),
44
+ url: `/${segments[1]}`,
45
+ },
46
+ ]
47
+ : []),
48
+ ...(segments.length > 3
49
+ ? [
50
+ {
51
+ title: titleCase(segments[2].path.replace(/-/g, ' ')),
52
+ url: `/${segments[2]}`,
53
+ },
54
+ ]
55
+ : []),
56
+ {
57
+ title: titleCase(segments[segments.length - 1].path.replace(/-/g, ' ')),
58
+ url: null,
59
+ },
60
+ ];
61
+ return breads;
62
+ }));
63
+ this.docs$ = this.route.params.pipe(switchMap((params) => {
64
+ let name = '';
65
+ const sub1 = (this.currentNav = params['sub1']);
66
+ if (sub1) {
67
+ this.showHeaders = sub1.toLowerCase() != 'index';
68
+ name += sub1;
69
+ }
70
+ const sub2 = params['sub2'];
71
+ if (sub2) {
72
+ this.showHeaders = sub2.toLowerCase() != 'index';
73
+ name += `/${sub2}`;
74
+ }
75
+ const sub3 = params['sub3'];
76
+ if (sub3) {
77
+ this.showHeaders = sub3.toLowerCase() != 'index';
78
+ name += `/${sub3}`;
79
+ }
80
+ const sub4 = params['sub4'];
81
+ if (sub4) {
82
+ this.showHeaders = sub4.toLowerCase() != 'index';
83
+ name += `/${sub4}`;
84
+ }
85
+ const sub5 = params['sub5'];
86
+ if (sub5) {
87
+ this.showHeaders = sub5.toLowerCase() != 'index';
88
+ name += `/${sub5}`;
89
+ }
90
+ return this.mediaService.context('blog').article(name, true);
91
+ }));
92
+ }
93
+ onSelectChange(event) {
94
+ const selectedUrl = event.target.value;
95
+ if (selectedUrl) {
96
+ this.router.navigate([selectedUrl]);
97
+ }
98
+ }
99
+ getLowestLevelHeaders(headers) {
100
+ if (headers.length === 0)
101
+ return [];
102
+ // Find the lowest level in the array
103
+ const minLevel = Math.min(...headers.map((header) => header.level));
104
+ // Filter headers by the lowest level
105
+ return headers.filter((header) => header.level == minLevel);
106
+ }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DocsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
108
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.1.4", type: DocsComponent, isStandalone: false, selector: "x-docs", usesInheritance: true, ngImport: i0, template: `
109
+ <div class="row m-0 p-0">
110
+ @if (nav$ | async; as nav) {
111
+ <div
112
+ class="col-12 col-lg-3 p-0 mb-3 sticky-top d-block d-lg-none"
113
+ style="max-height: 75vh; overflow-y: scroll;"
114
+ >
115
+ @if (nav?.length) {
116
+ <select (change)="onSelectChange($event)" class="form-select">
117
+ <option value="" disabled selected>Menu</option>
118
+ @for (a of nav; track a) {
119
+ <optgroup [label]="a.title">
120
+ @if (!a?.links?.length) {
121
+ <option [value]="a.url">
122
+ {{ a.title }}
123
+ </option>
124
+ }
125
+ @if (a?.links?.length) {
126
+ @for (b of a.links; track b) {
127
+ <option [value]="b.url">
128
+ -- {{ b.title }}
129
+ </option>
130
+ }
131
+ @for (b of a.links; track b) {
132
+ @for (c of b.links; track c) {
133
+ <option [value]="c.url">
134
+ ---- {{ c.title }}
135
+ </option>
136
+ }
137
+ }
138
+ }
139
+ </optgroup>
140
+ }
141
+ </select>
142
+ }
143
+ </div>
144
+ } @else {
145
+ <x-element-loader></x-element-loader>
146
+ }
147
+ @if (nav$ | async; as nav) {
148
+ <div
149
+ class="col-12 col-lg-3 sticky-top d-none d-lg-block p-0 m-0"
150
+ style="max-height: 75vh; overflow-y: scroll;"
151
+ >
152
+ <ul class="nav flex-column">
153
+ @if (nav?.length) {
154
+ @for (a of nav; track a) {
155
+ <li class="nav-item mb-5">
156
+ <p class="fw-bold fs-4 text-body" [innerHTML]="a.title"></p>
157
+ @if (a?.links?.length) {
158
+ <ul class="nav flex-column">
159
+ @for (b of a?.links; track b) {
160
+ <li class="nav-item">
161
+ <a
162
+ class="x-docs-parent-nav nav-link fs-6 ps-0 ms-0 pt-0 mt-0"
163
+ [routerLink]="b.url"
164
+ [routerLinkActive]="'active'"
165
+ [innerHTML]="b.title"
166
+ ></a>
167
+ @if (b?.links?.length) {
168
+ @for (c of b.links; track c) {
169
+ <ul
170
+ class="nav flex-column border-start"
171
+ >
172
+ <li class="nav-item">
173
+ <a
174
+ class="x-docs-child-nav nav-link text-tiny"
175
+ [routerLink]="c.url"
176
+ [routerLinkActive]="'active'"
177
+ [innerHTML]="c.title"
178
+ ></a>
179
+ </li>
180
+ </ul>
181
+ }
182
+ }
183
+ </li>
184
+ }
185
+ </ul>
186
+ }
187
+ </li>
188
+ }
189
+ }
190
+ </ul>
191
+ </div>
192
+ } @else {
193
+ <x-element-loader></x-element-loader>
194
+ }
195
+ <div class="col-12 col-lg-9 p-3 p-lg-5 bg-body-tertiary">
196
+ @if (docs$ | async; as docs) {
197
+ <div class="row">
198
+ <div class="col-12 col-lg-9 px-3">
199
+ @if (breadcrumbs$ | async; as breadcrumbs) {
200
+ <div class="">
201
+ <nav id="x-docs-nav">
202
+ <ol class="breadcrumb">
203
+ @for (breadcrumb of breadcrumbs; track breadcrumb) {
204
+ <li
205
+ class="breadcrumb-item"
206
+ >
207
+ @if (breadcrumb?.url) {
208
+ <a [routerLink]="breadcrumb.url">{{
209
+ breadcrumb.title
210
+ }}</a>
211
+ }
212
+ @if (!breadcrumb?.url) {
213
+ <span
214
+ [routerLink]="breadcrumb.url"
215
+ >{{ breadcrumb.title }}</span
216
+ >
217
+ }
218
+ </li>
219
+ }
220
+ </ol>
221
+ </nav>
222
+ </div>
223
+ }
224
+ @if (docs?.html) {
225
+ <div
226
+ data-bs-spy="scroll"
227
+ data-bs-target="#x-docs-nav"
228
+ data-bs-root-margin="0px 0px -40%"
229
+ data-bs-smooth-scroll="true"
230
+ class="scrollspy-example"
231
+ tabindex="0"
232
+ >
233
+ <div [innerHTML]="docs.html | xSafeHtml"></div>
234
+ </div>
235
+ } @else {
236
+ <x-element-blank></x-element-blank>
237
+ }
238
+ </div>
239
+ @if (showHeaders && docs?.headers?.length) {
240
+ <div
241
+ class="col-lg-3 sticky-top d-none d-lg-block"
242
+ style="max-height: 75vh; overflow-y: scroll;"
243
+ >
244
+ <ul class="nav flex-column">
245
+ @for (h of getLowestLevelHeaders(docs.headers); track h) {
246
+ <li
247
+ class="nav-item"
248
+ >
249
+ <a
250
+ class="x-docs-header-nav nav-link text-tiny"
251
+ [routerLink]="['./']"
252
+ [routerLinkActive]="'active'"
253
+ [fragment]="h.id"
254
+ [innerHTML]="h.text"
255
+ ></a>
256
+ </li>
257
+ }
258
+ </ul>
259
+ </div>
260
+ }
261
+ </div>
262
+ } @else {
263
+ <x-element-loader></x-element-loader>
264
+ }
265
+ </div>
266
+ </div>
267
+
268
+ <div class="py-3"></div>
269
+
270
+ <!-- misc -->
271
+
272
+ `, isInline: true, styles: [".text-tiny{font-size:.9em}.x-docs-parent-nav.nav-link.active,.x-docs-parent-nav.nav-link:hover{font-weight:700}.x-docs-child-nav.nav-link.active,.x-docs-child-nav.nav-link:hover{border-left:5px solid;font-weight:700}.x-docs-header-nav.nav-link.active,.x-docs-header-nav.nav-link:hover{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1$1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1$1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: i2.BlankComponent, selector: "x-element-blank", inputs: ["image", "icon", "type"] }, { kind: "component", type: i2.LoaderComponent, selector: "x-element-loader", inputs: ["data"] }, { kind: "pipe", type: i1$2.AsyncPipe, name: "async" }, { kind: "pipe", type: i4.SafeHtmlPipe, name: "xSafeHtml" }] }); }
273
+ }
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DocsComponent, decorators: [{
275
+ type: Component,
276
+ args: [{ standalone: false, selector: 'x-docs', template: `
277
+ <div class="row m-0 p-0">
278
+ @if (nav$ | async; as nav) {
279
+ <div
280
+ class="col-12 col-lg-3 p-0 mb-3 sticky-top d-block d-lg-none"
281
+ style="max-height: 75vh; overflow-y: scroll;"
282
+ >
283
+ @if (nav?.length) {
284
+ <select (change)="onSelectChange($event)" class="form-select">
285
+ <option value="" disabled selected>Menu</option>
286
+ @for (a of nav; track a) {
287
+ <optgroup [label]="a.title">
288
+ @if (!a?.links?.length) {
289
+ <option [value]="a.url">
290
+ {{ a.title }}
291
+ </option>
292
+ }
293
+ @if (a?.links?.length) {
294
+ @for (b of a.links; track b) {
295
+ <option [value]="b.url">
296
+ -- {{ b.title }}
297
+ </option>
298
+ }
299
+ @for (b of a.links; track b) {
300
+ @for (c of b.links; track c) {
301
+ <option [value]="c.url">
302
+ ---- {{ c.title }}
303
+ </option>
304
+ }
305
+ }
306
+ }
307
+ </optgroup>
308
+ }
309
+ </select>
310
+ }
311
+ </div>
312
+ } @else {
313
+ <x-element-loader></x-element-loader>
314
+ }
315
+ @if (nav$ | async; as nav) {
316
+ <div
317
+ class="col-12 col-lg-3 sticky-top d-none d-lg-block p-0 m-0"
318
+ style="max-height: 75vh; overflow-y: scroll;"
319
+ >
320
+ <ul class="nav flex-column">
321
+ @if (nav?.length) {
322
+ @for (a of nav; track a) {
323
+ <li class="nav-item mb-5">
324
+ <p class="fw-bold fs-4 text-body" [innerHTML]="a.title"></p>
325
+ @if (a?.links?.length) {
326
+ <ul class="nav flex-column">
327
+ @for (b of a?.links; track b) {
328
+ <li class="nav-item">
329
+ <a
330
+ class="x-docs-parent-nav nav-link fs-6 ps-0 ms-0 pt-0 mt-0"
331
+ [routerLink]="b.url"
332
+ [routerLinkActive]="'active'"
333
+ [innerHTML]="b.title"
334
+ ></a>
335
+ @if (b?.links?.length) {
336
+ @for (c of b.links; track c) {
337
+ <ul
338
+ class="nav flex-column border-start"
339
+ >
340
+ <li class="nav-item">
341
+ <a
342
+ class="x-docs-child-nav nav-link text-tiny"
343
+ [routerLink]="c.url"
344
+ [routerLinkActive]="'active'"
345
+ [innerHTML]="c.title"
346
+ ></a>
347
+ </li>
348
+ </ul>
349
+ }
350
+ }
351
+ </li>
352
+ }
353
+ </ul>
354
+ }
355
+ </li>
356
+ }
357
+ }
358
+ </ul>
359
+ </div>
360
+ } @else {
361
+ <x-element-loader></x-element-loader>
362
+ }
363
+ <div class="col-12 col-lg-9 p-3 p-lg-5 bg-body-tertiary">
364
+ @if (docs$ | async; as docs) {
365
+ <div class="row">
366
+ <div class="col-12 col-lg-9 px-3">
367
+ @if (breadcrumbs$ | async; as breadcrumbs) {
368
+ <div class="">
369
+ <nav id="x-docs-nav">
370
+ <ol class="breadcrumb">
371
+ @for (breadcrumb of breadcrumbs; track breadcrumb) {
372
+ <li
373
+ class="breadcrumb-item"
374
+ >
375
+ @if (breadcrumb?.url) {
376
+ <a [routerLink]="breadcrumb.url">{{
377
+ breadcrumb.title
378
+ }}</a>
379
+ }
380
+ @if (!breadcrumb?.url) {
381
+ <span
382
+ [routerLink]="breadcrumb.url"
383
+ >{{ breadcrumb.title }}</span
384
+ >
385
+ }
386
+ </li>
387
+ }
388
+ </ol>
389
+ </nav>
390
+ </div>
391
+ }
392
+ @if (docs?.html) {
393
+ <div
394
+ data-bs-spy="scroll"
395
+ data-bs-target="#x-docs-nav"
396
+ data-bs-root-margin="0px 0px -40%"
397
+ data-bs-smooth-scroll="true"
398
+ class="scrollspy-example"
399
+ tabindex="0"
400
+ >
401
+ <div [innerHTML]="docs.html | xSafeHtml"></div>
402
+ </div>
403
+ } @else {
404
+ <x-element-blank></x-element-blank>
405
+ }
406
+ </div>
407
+ @if (showHeaders && docs?.headers?.length) {
408
+ <div
409
+ class="col-lg-3 sticky-top d-none d-lg-block"
410
+ style="max-height: 75vh; overflow-y: scroll;"
411
+ >
412
+ <ul class="nav flex-column">
413
+ @for (h of getLowestLevelHeaders(docs.headers); track h) {
414
+ <li
415
+ class="nav-item"
416
+ >
417
+ <a
418
+ class="x-docs-header-nav nav-link text-tiny"
419
+ [routerLink]="['./']"
420
+ [routerLinkActive]="'active'"
421
+ [fragment]="h.id"
422
+ [innerHTML]="h.text"
423
+ ></a>
424
+ </li>
425
+ }
426
+ </ul>
427
+ </div>
428
+ }
429
+ </div>
430
+ } @else {
431
+ <x-element-loader></x-element-loader>
432
+ }
433
+ </div>
434
+ </div>
435
+
436
+ <div class="py-3"></div>
437
+
438
+ <!-- misc -->
439
+
440
+ `, styles: [".text-tiny{font-size:.9em}.x-docs-parent-nav.nav-link.active,.x-docs-parent-nav.nav-link:hover{font-weight:700}.x-docs-child-nav.nav-link.active,.x-docs-child-nav.nav-link:hover{border-left:5px solid;font-weight:700}.x-docs-header-nav.nav-link.active,.x-docs-header-nav.nav-link:hover{font-weight:700}\n"] }]
441
+ }] });
442
+
443
+ class DocsModule {
444
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DocsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
445
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.1.4", ngImport: i0, type: DocsModule, declarations: [DocsComponent], imports: [SharedModule, i1$1.RouterModule, LayoutsModule,
446
+ ElementsModule,
447
+ ToolbarModule,
448
+ PipesModule] }); }
449
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DocsModule, imports: [SharedModule,
450
+ RouterModule.forChild([
451
+ { path: ':sub1/:sub2/:sub3/:sub4/:sub5', component: DocsComponent },
452
+ { path: ':sub1/:sub2/:sub3/:sub4', component: DocsComponent },
453
+ { path: ':sub1/:sub2/:sub3', component: DocsComponent },
454
+ { path: ':sub1/:sub2', component: DocsComponent },
455
+ { path: ':sub1', component: DocsComponent },
456
+ ]),
457
+ LayoutsModule,
458
+ ElementsModule,
459
+ ToolbarModule,
460
+ PipesModule] }); }
461
+ }
462
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.4", ngImport: i0, type: DocsModule, decorators: [{
463
+ type: NgModule,
464
+ args: [{
465
+ declarations: [DocsComponent],
466
+ imports: [
467
+ SharedModule,
468
+ RouterModule.forChild([
469
+ { path: ':sub1/:sub2/:sub3/:sub4/:sub5', component: DocsComponent },
470
+ { path: ':sub1/:sub2/:sub3/:sub4', component: DocsComponent },
471
+ { path: ':sub1/:sub2/:sub3', component: DocsComponent },
472
+ { path: ':sub1/:sub2', component: DocsComponent },
473
+ { path: ':sub1', component: DocsComponent },
474
+ ]),
475
+ LayoutsModule,
476
+ ElementsModule,
477
+ ToolbarModule,
478
+ PipesModule,
479
+ ],
480
+ }]
481
+ }] });
482
+
483
+ export { DocsModule };
484
+ //# sourceMappingURL=thescaffold-ngx-apps-blog-docs.module-DKKKNEI-.mjs.map