@firestitch/content 18.0.2 → 18.0.4

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 (54) hide show
  1. package/app/modules/content/components/content/content.component.d.ts +2 -7
  2. package/app/modules/content/components/content-renderer/content-renderer.component.d.ts +2 -5
  3. package/app/modules/content-layouts/components/content-layout/content-layout.component.d.ts +2 -6
  4. package/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.d.ts +2 -9
  5. package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts +1 -4
  6. package/app/modules/content-pages/components/content-page/content-page.component.d.ts +2 -6
  7. package/app/modules/content-pages/components/content-page-editor/content-page-editor.component.d.ts +2 -9
  8. package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +1 -4
  9. package/app/modules/content-pages/fs-content-pages.module.d.ts +1 -23
  10. package/app/modules/content-style/components/content-style/content-style.component.d.ts +2 -5
  11. package/app/modules/editor/components/editor/editor.component.d.ts +2 -4
  12. package/app/modules/editor/components/editor-label/editor-label.component.d.ts +1 -1
  13. package/esm2022/app/enums/index.mjs +1 -1
  14. package/esm2022/app/interfaces/index.mjs +1 -1
  15. package/esm2022/app/modules/content/components/content/content.component.mjs +13 -28
  16. package/esm2022/app/modules/content/components/content-renderer/content-renderer.component.mjs +10 -20
  17. package/esm2022/app/modules/content-layouts/components/content-layout/content-layout.component.mjs +36 -33
  18. package/esm2022/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.mjs +43 -36
  19. package/esm2022/app/modules/content-layouts/components/content-layouts/content-layouts.component.mjs +17 -20
  20. package/esm2022/app/modules/content-pages/components/content-page/content-page.component.mjs +40 -36
  21. package/esm2022/app/modules/content-pages/components/content-page-editor/content-page-editor.component.mjs +46 -37
  22. package/esm2022/app/modules/content-pages/components/content-pages/content-pages.component.mjs +17 -20
  23. package/esm2022/app/modules/content-pages/components/index.mjs +1 -1
  24. package/esm2022/app/modules/content-pages/fs-content-pages.module.mjs +9 -95
  25. package/esm2022/app/modules/content-style/components/content-style/content-style.component.mjs +22 -23
  26. package/esm2022/app/modules/editor/components/editor/editor.component.mjs +28 -19
  27. package/esm2022/app/modules/editor/components/editor-label/editor-label.component.mjs +4 -4
  28. package/esm2022/public_api.mjs +1 -4
  29. package/fesm2022/firestitch-content.mjs +388 -686
  30. package/fesm2022/firestitch-content.mjs.map +1 -1
  31. package/package.json +1 -1
  32. package/public_api.d.ts +0 -3
  33. package/app/modules/content/components/content/index.d.ts +0 -1
  34. package/app/modules/content/components/content-renderer/index.d.ts +0 -1
  35. package/app/modules/content/fs-content.module.d.ts +0 -10
  36. package/app/modules/content-layouts/components/content-layout-editor/index.d.ts +0 -1
  37. package/app/modules/content-layouts/components/content-layouts/index.d.ts +0 -1
  38. package/app/modules/content-layouts/components/index.d.ts +0 -3
  39. package/app/modules/content-layouts/fs-content-layouts.module.d.ts +0 -29
  40. package/app/modules/content-style/fs-content-style.module.d.ts +0 -14
  41. package/app/modules/editor/components/editor-label/index.d.ts +0 -1
  42. package/app/modules/editor/fs-content-editor.module.d.ts +0 -24
  43. package/app/modules/editor/index.d.ts +0 -1
  44. package/esm2022/app/modules/content/components/content/index.mjs +0 -2
  45. package/esm2022/app/modules/content/components/content-renderer/index.mjs +0 -2
  46. package/esm2022/app/modules/content/fs-content.module.mjs +0 -31
  47. package/esm2022/app/modules/content-layouts/components/content-layout-editor/index.mjs +0 -2
  48. package/esm2022/app/modules/content-layouts/components/content-layouts/index.mjs +0 -2
  49. package/esm2022/app/modules/content-layouts/components/index.mjs +0 -4
  50. package/esm2022/app/modules/content-layouts/fs-content-layouts.module.mjs +0 -106
  51. package/esm2022/app/modules/content-style/fs-content-style.module.mjs +0 -48
  52. package/esm2022/app/modules/editor/components/editor-label/index.mjs +0 -2
  53. package/esm2022/app/modules/editor/fs-content-editor.module.mjs +0 -87
  54. package/esm2022/app/modules/editor/index.mjs +0 -2
@@ -1,54 +1,43 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
1
  import * as i0 from '@angular/core';
4
- import { Component, ChangeDetectionStrategy, Input, EventEmitter, Output, NgModule, InjectionToken, Inject, ViewChildren, ViewChild, ElementRef } from '@angular/core';
5
- import * as i4 from '@angular/forms';
2
+ import { InjectionToken, inject, ChangeDetectorRef, Component, ChangeDetectionStrategy, ViewChildren, Input, EventEmitter, Output, ViewChild, NgModule, ElementRef } from '@angular/core';
3
+ import * as i4 from '@angular/material/dialog';
4
+ import { MAT_DIALOG_DATA, MatDialogRef, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialog } from '@angular/material/dialog';
5
+ import { FsMessage } from '@firestitch/message';
6
+ import * as i2$1 from '@firestitch/text-editor';
7
+ import { FsTextEditorComponent, FsTextEditorModule } from '@firestitch/text-editor';
8
+ import { Subject, of, throwError, fromEvent } from 'rxjs';
9
+ import { tap, switchMap, takeUntil, filter, finalize, map } from 'rxjs/operators';
10
+ import * as i1 from '@firestitch/skeleton';
11
+ import { FsSkeletonModule } from '@firestitch/skeleton';
12
+ import * as i2 from '@angular/forms';
6
13
  import { FormsModule } from '@angular/forms';
7
- import * as i6$1 from '@angular/material/button';
8
- import { MatButtonModule } from '@angular/material/button';
9
- import * as i7$1 from '@angular/material/button-toggle';
10
- import { MatButtonToggleModule } from '@angular/material/button-toggle';
11
- import * as i1 from '@angular/material/dialog';
12
- import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
13
- import * as i5$1 from '@angular/material/form-field';
14
- import { MatFormFieldModule } from '@angular/material/form-field';
15
- import * as i6$2 from '@angular/material/icon';
16
- import { MatIconModule } from '@angular/material/icon';
17
- import * as i4$1 from '@angular/material/input';
18
- import { MatInputModule } from '@angular/material/input';
19
- import * as i7$2 from '@angular/material/select';
20
- import { MatSelectModule } from '@angular/material/select';
21
- import { MatTabsModule } from '@angular/material/tabs';
22
- import * as i8 from '@angular/material/tooltip';
23
- import { MatTooltipModule } from '@angular/material/tooltip';
24
- import * as i4$2 from '@firestitch/date';
25
- import { FsDateModule } from '@firestitch/date';
26
- import * as i11 from '@firestitch/dialog';
27
- import { FsDialogModule } from '@firestitch/dialog';
28
- import * as i9 from '@firestitch/form';
14
+ import * as i3 from '@firestitch/form';
29
15
  import { FsFormModule, FsFormDirective } from '@firestitch/form';
30
- import { FsHtmlEditorModule } from '@firestitch/html-editor';
31
- import { FsLabelModule } from '@firestitch/label';
32
- import * as i3$1 from '@firestitch/list';
33
- import { FsListModule, FsListComponent } from '@firestitch/list';
34
- import * as i10 from '@firestitch/skeleton';
35
- import { FsSkeletonModule } from '@firestitch/skeleton';
36
- import * as i6 from '@firestitch/text-editor';
37
- import { FsTextEditorModule, FsTextEditorComponent } from '@firestitch/text-editor';
38
- import * as i5 from '@firestitch/common';
39
- import { FsCommonModule, index } from '@firestitch/common';
40
- import * as i7 from 'angular-split';
16
+ import * as i5 from '@firestitch/dialog';
17
+ import { FsDialogModule } from '@firestitch/dialog';
18
+ import { CdkScrollable } from '@angular/cdk/scrolling';
19
+ import { MatFormField, MatLabel } from '@angular/material/form-field';
20
+ import { MatSelect } from '@angular/material/select';
21
+ import { MatOption } from '@angular/material/core';
22
+ import { MatInput } from '@angular/material/input';
23
+ import { MatButtonToggleGroup, MatButtonToggle } from '@angular/material/button-toggle';
24
+ import { FsPrompt } from '@firestitch/prompt';
25
+ import * as i1$1 from 'angular-split';
41
26
  import { AngularSplitModule } from 'angular-split';
42
- import * as i2$1 from '@firestitch/message';
43
- import { Subject, of, throwError, fromEvent } from 'rxjs';
44
- import { tap, switchMap, takeUntil, filter, finalize, map } from 'rxjs/operators';
45
- import * as i3 from '@firestitch/prompt';
27
+ import { NgClass, NgTemplateOutlet } from '@angular/common';
28
+ import * as i5$1 from '@firestitch/common';
29
+ import { FsCommonModule, index } from '@firestitch/common';
30
+ import { MatIconAnchor, MatButton, MatAnchor } from '@angular/material/button';
31
+ import { MatIcon } from '@angular/material/icon';
32
+ import { MatTooltip } from '@angular/material/tooltip';
33
+ import { RouterLink, Router, NavigationEnd } from '@angular/router';
46
34
  import { ItemType } from '@firestitch/filter';
47
- import * as i2$2 from '@angular/router';
48
- import { RouterModule, NavigationEnd } from '@angular/router';
49
- import * as i8$1 from '@angular/material/core';
50
- import * as i1$1 from '@angular/platform-browser';
51
- import * as i3$2 from '@firestitch/html';
35
+ import * as i1$2 from '@firestitch/list';
36
+ import { FsListComponent, FsListModule } from '@firestitch/list';
37
+ import * as i2$2 from '@firestitch/date';
38
+ import { FsDateModule } from '@firestitch/date';
39
+ import { DomSanitizer, Title } from '@angular/platform-browser';
40
+ import { HtmlRenderer } from '@firestitch/html';
52
41
 
53
42
  var EditorType;
54
43
  (function (EditorType) {
@@ -66,15 +55,92 @@ var PageType;
66
55
  PageType["NotFoundPage"] = "notFoundPage";
67
56
  })(PageType || (PageType = {}));
68
57
 
58
+ const PageTypes = [
59
+ { name: 'Page', value: PageType.StandardPage },
60
+ { name: 'Page (Not Found)', value: PageType.NotFoundPage },
61
+ ];
62
+
63
+ const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
64
+
65
+ class ContentPageComponent {
66
+ _config = inject(FS_CONTENT_CONFIG);
67
+ _data = inject(MAT_DIALOG_DATA);
68
+ _dialogRef = inject(MatDialogRef);
69
+ _message = inject(FsMessage);
70
+ _cdRef = inject(ChangeDetectorRef);
71
+ textEditors;
72
+ contentPage = null;
73
+ PageTypes = PageTypes;
74
+ contentLayouts;
75
+ editors = { content: true, styles: true };
76
+ _destroy$ = new Subject();
77
+ ngOnInit() {
78
+ this._dialogRef.updateSize('600px');
79
+ this._fetchData();
80
+ }
81
+ ngOnDestroy() {
82
+ this._destroy$.next(null);
83
+ this._destroy$.complete();
84
+ }
85
+ save = () => {
86
+ return this._config.saveContentPage(this.contentPage)
87
+ .pipe(tap((contentPage) => {
88
+ this._message.success('Saved Changes');
89
+ this._dialogRef.close(contentPage);
90
+ }));
91
+ };
92
+ _fetchData() {
93
+ this._config.loadContentLayouts()
94
+ .subscribe((contentLayouts) => {
95
+ this.contentLayouts = contentLayouts;
96
+ this._cdRef.markForCheck();
97
+ });
98
+ of(this._data.contentPage)
99
+ .pipe(switchMap((contentPage) => {
100
+ return of(contentPage);
101
+ }), takeUntil(this._destroy$))
102
+ .subscribe((contentPage) => {
103
+ this.contentPage = {
104
+ ...contentPage,
105
+ path: contentPage.path || '/',
106
+ };
107
+ this._cdRef.markForCheck();
108
+ });
109
+ }
110
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: ContentPageComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: FsTextEditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentPage\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentPage.id ? 'Page' : 'Create Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required>\n @for (item of PageTypes; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (contentLayouts) {\n <mat-form-field>\n <mat-label>Layout</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\">\n @for (item of contentLayouts; track item) {\n <mat-option\n [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i3.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "component", type: i3.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
112
+ }
113
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageComponent, decorators: [{
114
+ type: Component,
115
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
116
+ FsSkeletonModule,
117
+ FormsModule,
118
+ FsFormModule,
119
+ FsDialogModule,
120
+ MatDialogTitle,
121
+ CdkScrollable,
122
+ MatDialogContent,
123
+ MatFormField,
124
+ MatLabel,
125
+ MatSelect,
126
+ MatOption,
127
+ MatInput,
128
+ MatDialogActions,
129
+ ], template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentPage\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentPage.id ? 'Page' : 'Create Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required>\n @for (item of PageTypes; track item) {\n <mat-option\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n @if (contentLayouts) {\n <mat-form-field>\n <mat-label>Layout</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\">\n @for (item of contentLayouts; track item) {\n <mat-option\n [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n }\n </mat-select>\n </mat-form-field>\n }\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n" }]
130
+ }], propDecorators: { textEditors: [{
131
+ type: ViewChildren,
132
+ args: [FsTextEditorComponent]
133
+ }] } });
134
+
69
135
  class EditorLabelComponent {
70
136
  changed;
71
137
  focused;
72
138
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: EditorLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: EditorLabelComponent, selector: "app-editor-label", inputs: { changed: "changed", focused: "focused" }, ngImport: i0, template: "<div class=\"label\" [ngClass]=\"{ focused: focused }\">\n <ng-content></ng-content>\n <span *ngIf=\"changed\" class=\"changed\">&nbsp;&#9679;</span>\n</div>\n", styles: [".label{display:inline-block;background-color:#1e1e1e;color:#c8c8c8;padding:3px 9px 2px;border-top-left-radius:6px;border-top-right-radius:6px;font-size:80%;text-transform:uppercase}.label.focused{color:#fff}.label .changed{font-size:110%;line-height:0}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
139
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: EditorLabelComponent, isStandalone: true, selector: "app-editor-label", inputs: { changed: "changed", focused: "focused" }, ngImport: i0, template: "<div class=\"label\" [ngClass]=\"{ focused: focused }\">\n <ng-content></ng-content>\n @if (changed) {\n <span class=\"changed\">&nbsp;&#9679;</span>\n }\n</div>\n", styles: [".label{display:inline-block;background-color:#1e1e1e;color:#c8c8c8;padding:3px 9px 2px;border-top-left-radius:6px;border-top-right-radius:6px;font-size:80%;text-transform:uppercase}.label.focused{color:#fff}.label .changed{font-size:110%;line-height:0}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
74
140
  }
75
141
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: EditorLabelComponent, decorators: [{
76
142
  type: Component,
77
- args: [{ selector: 'app-editor-label', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"label\" [ngClass]=\"{ focused: focused }\">\n <ng-content></ng-content>\n <span *ngIf=\"changed\" class=\"changed\">&nbsp;&#9679;</span>\n</div>\n", styles: [".label{display:inline-block;background-color:#1e1e1e;color:#c8c8c8;padding:3px 9px 2px;border-top-left-radius:6px;border-top-right-radius:6px;font-size:80%;text-transform:uppercase}.label.focused{color:#fff}.label .changed{font-size:110%;line-height:0}\n"] }]
143
+ args: [{ selector: 'app-editor-label', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [NgClass], template: "<div class=\"label\" [ngClass]=\"{ focused: focused }\">\n <ng-content></ng-content>\n @if (changed) {\n <span class=\"changed\">&nbsp;&#9679;</span>\n }\n</div>\n", styles: [".label{display:inline-block;background-color:#1e1e1e;color:#c8c8c8;padding:3px 9px 2px;border-top-left-radius:6px;border-top-right-radius:6px;font-size:80%;text-transform:uppercase}.label.focused{color:#fff}.label .changed{font-size:110%;line-height:0}\n"] }]
78
144
  }], propDecorators: { changed: [{
79
145
  type: Input
80
146
  }], focused: [{
@@ -82,8 +148,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
82
148
  }] } });
83
149
 
84
150
  class EditorComponent {
85
- _cdRef;
86
- _message;
151
+ _cdRef = inject(ChangeDetectorRef);
152
+ _message = inject(FsMessage);
87
153
  showHtml = false;
88
154
  showScss = false;
89
155
  showJs = false;
@@ -106,10 +172,6 @@ class EditorComponent {
106
172
  htmlConfig;
107
173
  jsConfig;
108
174
  _destroy$ = new Subject();
109
- constructor(_cdRef, _message) {
110
- this._cdRef = _cdRef;
111
- this._message = _message;
112
- }
113
175
  ngOnInit() {
114
176
  this.initTextEditors();
115
177
  this.initGlobalContentStyle();
@@ -194,13 +256,21 @@ class EditorComponent {
194
256
  this.focusedArea = type;
195
257
  this.focused.emit(type);
196
258
  }
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: EditorComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i2$1.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
198
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: EditorComponent, selector: "app-editor", inputs: { showHtml: "showHtml", showScss: "showScss", showJs: "showJs", showGlobalScss: "showGlobalScss", html: "html", scss: "scss", js: "js", contentConfig: "contentConfig" }, outputs: { changed: "changed", focused: "focused", blured: "blured" }, ngImport: i0, template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.html !== undefined\"\n [focused]=\"focusedArea === 'html'\">\n HTML\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"html\" \n name=\"html\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Html, $event)\"\n [config]=\"htmlConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showScss\" [order]=\"2\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.scss !== undefined\"\n [focused]=\"focusedArea === 'scss'\">\n SCSS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"scss\" \n name=\"scss\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Scss, $event)\"\n [config]=\"scssConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showJs\" [order]=\"3\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.js !== undefined\"\n [focused]=\"focusedArea === 'js'\">\n JS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"js\" \n name=\"js\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Js, $event)\"\n [config]=\"jsConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showGlobalScss\" [order]=\"4\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.globalScss !== undefined\"\n [focused]=\"focusedArea === 'globalScss'\">\n Global SCSS\n </app-editor-label>\n <ng-container *fsSkeleton=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"globalScss\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"change(EditorType.GlobalScss, $event)\"\n [config]=\"globalScssConfig\">\n </fs-text-editor> \n </ng-container> \n </div>\n </as-split-area>\n</as-split>\n", styles: [":host ::ng-deep .as-split-gutter{background-color:unset!important}.editor-container{height:100%;border-radius:5px;display:flex;flex-direction:column}.editor-container fs-text-editor{flex:1}\n"], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i9.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }, { kind: "directive", type: i5.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }, { kind: "component", type: i6.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }, { kind: "component", type: i7.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i7.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: EditorLabelComponent, selector: "app-editor-label", inputs: ["changed", "focused"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
259
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: EditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
260
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: EditorComponent, isStandalone: true, selector: "app-editor", inputs: { showHtml: "showHtml", showScss: "showScss", showJs: "showJs", showGlobalScss: "showGlobalScss", html: "html", scss: "scss", js: "js", contentConfig: "contentConfig" }, outputs: { changed: "changed", focused: "focused", blured: "blured" }, ngImport: i0, template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.html !== undefined\"\n [focused]=\"focusedArea === 'html'\">\n HTML\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"html\" \n name=\"html\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Html, $event)\"\n [config]=\"htmlConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showScss\" [order]=\"2\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.scss !== undefined\"\n [focused]=\"focusedArea === 'scss'\">\n SCSS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"scss\" \n name=\"scss\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Scss, $event)\"\n [config]=\"scssConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showJs\" [order]=\"3\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.js !== undefined\"\n [focused]=\"focusedArea === 'js'\">\n JS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"js\" \n name=\"js\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Js, $event)\"\n [config]=\"jsConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showGlobalScss\" [order]=\"4\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.globalScss !== undefined\"\n [focused]=\"focusedArea === 'globalScss'\">\n Global SCSS\n </app-editor-label>\n <ng-container *fsSkeleton=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"globalScss\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"change(EditorType.GlobalScss, $event)\"\n [config]=\"globalScssConfig\">\n </fs-text-editor> \n </ng-container> \n </div>\n </as-split-area>\n</as-split>\n", styles: [":host ::ng-deep .as-split-gutter{background-color:unset!important}.editor-container{height:100%;border-radius:5px;display:flex;flex-direction:column}.editor-container fs-text-editor{flex:1}\n"], dependencies: [{ kind: "ngmodule", type: AngularSplitModule }, { kind: "component", type: i1$1.SplitComponent, selector: "as-split", inputs: ["direction", "unit", "gutterSize", "gutterStep", "restrictMove", "useTransition", "disabled", "dir", "gutterDblClickDuration", "gutterClickDeltaPx", "gutterAriaLabel"], outputs: ["transitionEnd", "dragStart", "dragEnd", "gutterClick", "gutterDblClick"], exportAs: ["asSplit"] }, { kind: "directive", type: i1$1.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { kind: "component", type: EditorLabelComponent, selector: "app-editor-label", inputs: ["changed", "focused"] }, { kind: "ngmodule", type: FsTextEditorModule }, { kind: "component", type: i2$1.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsCommonModule }, { kind: "directive", type: i5$1.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }, { kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
199
261
  }
200
262
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: EditorComponent, decorators: [{
201
263
  type: Component,
202
- args: [{ selector: 'app-editor', changeDetection: ChangeDetectionStrategy.OnPush, template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.html !== undefined\"\n [focused]=\"focusedArea === 'html'\">\n HTML\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"html\" \n name=\"html\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Html, $event)\"\n [config]=\"htmlConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showScss\" [order]=\"2\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.scss !== undefined\"\n [focused]=\"focusedArea === 'scss'\">\n SCSS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"scss\" \n name=\"scss\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Scss, $event)\"\n [config]=\"scssConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showJs\" [order]=\"3\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.js !== undefined\"\n [focused]=\"focusedArea === 'js'\">\n JS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"js\" \n name=\"js\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Js, $event)\"\n [config]=\"jsConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showGlobalScss\" [order]=\"4\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.globalScss !== undefined\"\n [focused]=\"focusedArea === 'globalScss'\">\n Global SCSS\n </app-editor-label>\n <ng-container *fsSkeleton=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"globalScss\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"change(EditorType.GlobalScss, $event)\"\n [config]=\"globalScssConfig\">\n </fs-text-editor> \n </ng-container> \n </div>\n </as-split-area>\n</as-split>\n", styles: [":host ::ng-deep .as-split-gutter{background-color:unset!important}.editor-container{height:100%;border-radius:5px;display:flex;flex-direction:column}.editor-container fs-text-editor{flex:1}\n"] }]
203
- }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i2$1.FsMessage }], propDecorators: { showHtml: [{
264
+ args: [{ selector: 'app-editor', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
265
+ AngularSplitModule,
266
+ EditorLabelComponent,
267
+ FsTextEditorModule,
268
+ FormsModule,
269
+ FsFormModule,
270
+ FsCommonModule,
271
+ FsSkeletonModule,
272
+ ], template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.html !== undefined\"\n [focused]=\"focusedArea === 'html'\">\n HTML\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"html\" \n name=\"html\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Html, $event)\"\n [config]=\"htmlConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showScss\" [order]=\"2\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.scss !== undefined\"\n [focused]=\"focusedArea === 'scss'\">\n SCSS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"scss\" \n name=\"scss\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Scss, $event)\"\n [config]=\"scssConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showJs\" [order]=\"3\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.js !== undefined\"\n [focused]=\"focusedArea === 'js'\">\n JS\n </app-editor-label>\n <fs-text-editor \n [(ngModel)]=\"js\" \n name=\"js\"\n [fsModelChangeOptions]=\"{ debounce: 0 }\"\n (fsModelChange)=\"change(EditorType.Js, $event)\"\n [config]=\"jsConfig\">\n </fs-text-editor> \n </div>\n </as-split-area>\n <as-split-area [size]=\"30\" [visible]=\"showGlobalScss\" [order]=\"4\">\n <div class=\"editor-container\">\n <app-editor-label\n [changed]=\"changes.globalScss !== undefined\"\n [focused]=\"focusedArea === 'globalScss'\">\n Global SCSS\n </app-editor-label>\n <ng-container *fsSkeleton=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"globalScss\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"change(EditorType.GlobalScss, $event)\"\n [config]=\"globalScssConfig\">\n </fs-text-editor> \n </ng-container> \n </div>\n </as-split-area>\n</as-split>\n", styles: [":host ::ng-deep .as-split-gutter{background-color:unset!important}.editor-container{height:100%;border-radius:5px;display:flex;flex-direction:column}.editor-container fs-text-editor{flex:1}\n"] }]
273
+ }], propDecorators: { showHtml: [{
204
274
  type: Input
205
275
  }], showScss: [{
206
276
  type: Input
@@ -224,169 +294,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
224
294
  type: Output
225
295
  }] } });
226
296
 
227
- class FsContentEditorModule {
228
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
229
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentEditorModule, declarations: [EditorComponent,
230
- EditorLabelComponent], imports: [CommonModule,
231
- FormsModule,
232
- MatDialogModule,
233
- MatButtonModule,
234
- MatTabsModule,
235
- MatIconModule,
236
- MatButtonToggleModule,
237
- FsListModule,
238
- FsFormModule,
239
- FsSkeletonModule,
240
- FsLabelModule,
241
- FsHtmlEditorModule,
242
- FsCommonModule,
243
- FsDialogModule,
244
- FsTextEditorModule,
245
- AngularSplitModule], exports: [EditorComponent] });
246
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentEditorModule, imports: [CommonModule,
247
- FormsModule,
248
- MatDialogModule,
249
- MatButtonModule,
250
- MatTabsModule,
251
- MatIconModule,
252
- MatButtonToggleModule,
253
- FsListModule,
254
- FsFormModule,
255
- FsSkeletonModule,
256
- FsLabelModule,
257
- FsHtmlEditorModule,
258
- FsCommonModule,
259
- FsDialogModule,
260
- FsTextEditorModule,
261
- AngularSplitModule] });
262
- }
263
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentEditorModule, decorators: [{
264
- type: NgModule,
265
- args: [{
266
- imports: [
267
- CommonModule,
268
- FormsModule,
269
- MatDialogModule,
270
- MatButtonModule,
271
- MatTabsModule,
272
- MatIconModule,
273
- MatButtonToggleModule,
274
- FsListModule,
275
- FsFormModule,
276
- FsSkeletonModule,
277
- FsLabelModule,
278
- FsHtmlEditorModule,
279
- FsCommonModule,
280
- FsDialogModule,
281
- FsTextEditorModule,
282
- AngularSplitModule,
283
- ],
284
- exports: [
285
- EditorComponent,
286
- ],
287
- declarations: [
288
- EditorComponent,
289
- EditorLabelComponent,
290
- ],
291
- }]
292
- }] });
293
-
294
- const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
295
-
296
- class ContentLayoutComponent {
297
- _config;
298
- _data;
299
- _dialogRef;
300
- _message;
301
- _cdRef;
302
- textEditors;
303
- contentLayout = null;
304
- editors = { content: true, styles: true };
305
- _destroy$ = new Subject();
306
- constructor(_config, _data, _dialogRef, _message, _cdRef) {
307
- this._config = _config;
308
- this._data = _data;
309
- this._dialogRef = _dialogRef;
310
- this._message = _message;
311
- this._cdRef = _cdRef;
312
- }
313
- ngOnInit() {
314
- this._fetchData();
315
- }
316
- ngOnDestroy() {
317
- this._destroy$.next(null);
318
- this._destroy$.complete();
319
- }
320
- save = () => {
321
- return this._config.saveContentLayout(this.contentLayout)
322
- .pipe(tap((contentLayout) => {
323
- this._message.success('Saved Changes');
324
- this._dialogRef.close(contentLayout);
325
- }));
326
- };
327
- _fetchData() {
328
- of(this._data.contentLayout)
329
- .pipe(switchMap((contentLayout) => {
330
- return of(contentLayout);
331
- }), takeUntil(this._destroy$))
332
- .subscribe((contentLayout) => {
333
- this.contentLayout = { ...contentLayout };
334
- this._cdRef.markForCheck();
335
- });
336
- }
337
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$1.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
338
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentLayoutComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: FsTextEditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentLayout\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentLayout.id ? 'Layout' : 'Layout Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "component", type: i9.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }, { kind: "directive", type: i9.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "component", type: i11.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
339
- }
340
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutComponent, decorators: [{
341
- type: Component,
342
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentLayout\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentLayout.id ? 'Layout' : 'Layout Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n" }]
343
- }], ctorParameters: () => [{ type: undefined, decorators: [{
344
- type: Inject,
345
- args: [FS_CONTENT_CONFIG]
346
- }] }, { type: undefined, decorators: [{
347
- type: Inject,
348
- args: [MAT_DIALOG_DATA]
349
- }] }, { type: i1.MatDialogRef }, { type: i2$1.FsMessage }, { type: i0.ChangeDetectorRef }], propDecorators: { textEditors: [{
350
- type: ViewChildren,
351
- args: [FsTextEditorComponent]
352
- }] } });
353
-
354
- class ContentLayoutEditorComponent {
355
- _data;
356
- _dialogRef;
357
- _message;
358
- _dialog;
359
- _cdRef;
360
- _prompt;
297
+ class ContentPageEditorComponent {
298
+ _data = inject(MAT_DIALOG_DATA);
299
+ _dialogRef = inject(MatDialogRef);
300
+ _message = inject(FsMessage);
301
+ _dialog = inject(MatDialog);
302
+ _cdRef = inject(ChangeDetectorRef);
303
+ _prompt = inject(FsPrompt);
361
304
  editor;
362
- contentLayout;
363
- get isMac() {
364
- return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
365
- }
366
- submitting;
367
- config;
368
- EditorType = EditorType;
305
+ contentPage;
369
306
  focused = null;
307
+ config;
308
+ resizing = false;
370
309
  title;
371
310
  editors = {
372
311
  [EditorType.Html]: true,
373
312
  [EditorType.Scss]: true,
313
+ [EditorType.Js]: false,
374
314
  [EditorType.GlobalScss]: false,
375
315
  };
376
- _destroy$ = new Subject();
377
- constructor(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
378
- this._data = _data;
379
- this._dialogRef = _dialogRef;
380
- this._message = _message;
381
- this._dialog = _dialog;
382
- this._cdRef = _cdRef;
383
- this._prompt = _prompt;
316
+ get isMac() {
317
+ return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
384
318
  }
319
+ submitting;
320
+ _destroy$ = new Subject();
385
321
  ngOnInit() {
386
322
  this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
387
323
  this._dialogRef.disableClose = true;
388
324
  this.config = this._data.contentConfig;
389
- this._initContentLayout(this._data.contentLayout);
325
+ this._initContentPage(this._data.contentPage);
390
326
  this._initEscape();
391
327
  }
392
328
  editorToggleChange(event) {
@@ -396,10 +332,10 @@ class ContentLayoutEditorComponent {
396
332
  this._destroy$.next(null);
397
333
  this._destroy$.complete();
398
334
  }
399
- _initContentLayout(contentLayout) {
400
- this.config.loadContentLayout(contentLayout.id)
335
+ _initContentPage(contentPage) {
336
+ this.config.loadContentPage(contentPage.id)
401
337
  .subscribe((data) => {
402
- this.contentLayout = data;
338
+ this.contentPage = data;
403
339
  this._cdRef.markForCheck();
404
340
  });
405
341
  }
@@ -415,6 +351,7 @@ class ContentLayoutEditorComponent {
415
351
  return of(null)
416
352
  .pipe(filter(() => this.focused), switchMap(() => {
417
353
  switch (this.focused) {
354
+ case EditorType.Js:
418
355
  case EditorType.Html:
419
356
  case EditorType.Scss:
420
357
  return this.saveContentPage();
@@ -428,19 +365,21 @@ class ContentLayoutEditorComponent {
428
365
  }), finalize(() => {
429
366
  this.submitting = false;
430
367
  this._cdRef.markForCheck();
431
- }));
368
+ }))
369
+ .pipe(takeUntil(this._destroy$));
432
370
  };
433
371
  saveContentPage() {
434
372
  const names = {
373
+ [EditorType.Js]: 'js',
435
374
  [EditorType.Scss]: 'styles',
436
375
  [EditorType.Html]: 'content',
437
376
  };
438
377
  const data = {
439
- id: this.contentLayout.id,
378
+ id: this.contentPage.id,
440
379
  [names[this.focused]]: this.editor.changes[this.focused],
441
380
  };
442
- return this.config.saveContentLayout({
443
- id: this.contentLayout.id,
381
+ return this.config.saveContentPage({
382
+ id: this.contentPage.id,
444
383
  ...data,
445
384
  })
446
385
  .pipe(tap(() => {
@@ -476,17 +415,17 @@ class ContentLayoutEditorComponent {
476
415
  });
477
416
  }
478
417
  openSettings() {
479
- this._dialog.open(ContentLayoutComponent, {
418
+ this._dialog.open(ContentPageComponent, {
480
419
  data: {
481
- contentLayout: this.contentLayout,
420
+ contentPage: this.contentPage,
482
421
  },
483
422
  })
484
423
  .afterClosed()
485
424
  .pipe(takeUntil(this._destroy$))
486
- .subscribe((contentLayout) => {
487
- this.contentLayout = {
488
- ...this.contentLayout,
489
- ...contentLayout,
425
+ .subscribe((contentPage) => {
426
+ this.contentPage = {
427
+ ...this.contentPage,
428
+ ...contentPage,
490
429
  };
491
430
  this._cdRef.markForCheck();
492
431
  });
@@ -500,42 +439,56 @@ class ContentLayoutEditorComponent {
500
439
  }
501
440
  });
502
441
  }
503
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutEditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$1.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }, { token: i3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
504
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentLayoutEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentLayout\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Layout Editor\n <div class=\"small\">{{contentLayout.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <!-- <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle> -->\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentLayout.content\"\n [scss]=\"contentLayout.styles\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n\n <!-- <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"close()\"\n type=\"button\"> \n Done \n </button>\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n </div> -->\n </fs-dialog>\n</form>", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], dependencies: [{ kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i7$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i9.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "directive", type: i10.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "component", type: i11.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
442
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
443
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentPageEditorComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentPage\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Page Editor\n <div class=\"small\">{{contentPage.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <a \n mat-stroked-button\n target=\"_blank\"\n [routerLink]=\"contentPage.path\"\n type=\"button\"> \n Preview\n </a>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showJs]=\"editors.js\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentPage.content\"\n [scss]=\"contentPage.styles\"\n [js]=\"contentPage.js\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n </fs-dialog>\n</form>\n", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i3.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
505
444
  }
506
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutEditorComponent, decorators: [{
445
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageEditorComponent, decorators: [{
507
446
  type: Component,
508
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentLayout\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Layout Editor\n <div class=\"small\">{{contentLayout.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <!-- <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle> -->\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentLayout.content\"\n [scss]=\"contentLayout.styles\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n\n <!-- <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"close()\"\n type=\"button\"> \n Done \n </button>\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n </div> -->\n </fs-dialog>\n</form>", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
509
- }], ctorParameters: () => [{ type: undefined, decorators: [{
510
- type: Inject,
511
- args: [MAT_DIALOG_DATA]
512
- }] }, { type: i1.MatDialogRef }, { type: i2$1.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i3.FsPrompt }], propDecorators: { editor: [{
447
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
448
+ FormsModule,
449
+ FsFormModule,
450
+ FsSkeletonModule,
451
+ FsDialogModule,
452
+ MatDialogTitle,
453
+ MatIconAnchor,
454
+ MatIcon,
455
+ MatButtonToggleGroup,
456
+ MatButtonToggle,
457
+ MatButton,
458
+ MatTooltip,
459
+ MatAnchor,
460
+ RouterLink,
461
+ CdkScrollable,
462
+ MatDialogContent,
463
+ EditorComponent,
464
+ ], template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentPage\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Page Editor\n <div class=\"small\">{{contentPage.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <a \n mat-stroked-button\n target=\"_blank\"\n [routerLink]=\"contentPage.path\"\n type=\"button\"> \n Preview\n </a>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showJs]=\"editors.js\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentPage.content\"\n [scss]=\"contentPage.styles\"\n [js]=\"contentPage.js\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n </fs-dialog>\n</form>\n", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
465
+ }], propDecorators: { editor: [{
513
466
  type: ViewChild,
514
467
  args: [EditorComponent]
515
468
  }] } });
516
469
 
517
- class FsContentLayoutsComponent {
518
- _config;
519
- _dialog;
470
+ class FsContentPagesComponent {
471
+ _config = inject(FS_CONTENT_CONFIG);
472
+ _dialog = inject(MatDialog);
473
+ htmlEditorConfig;
520
474
  listComponent;
521
475
  listConfig;
476
+ pageTypes = index(PageTypes, 'value', 'name');
522
477
  _destroy$ = new Subject();
523
- constructor(_config, _dialog) {
524
- this._config = _config;
525
- this._dialog = _dialog;
526
- }
527
478
  ngOnInit() {
528
479
  this._initListConfig();
529
480
  }
530
- openEditor(contentLayout) {
531
- this._dialog.open(ContentLayoutEditorComponent, {
532
- maxWidth: '100vw',
533
- width: '100%',
534
- height: '100%',
481
+ openEditor(contentPage) {
482
+ this._dialog.open(ContentPageEditorComponent, {
535
483
  data: {
536
- contentLayout,
484
+ contentPage,
485
+ config: this._config,
537
486
  contentConfig: this._config,
538
487
  },
488
+ maxWidth: '100vw',
489
+ width: '100%',
490
+ height: '100%',
491
+ autoFocus: false,
539
492
  })
540
493
  .afterClosed()
541
494
  .pipe(takeUntil(this._destroy$))
@@ -543,19 +496,17 @@ class FsContentLayoutsComponent {
543
496
  this.listComponent.reload();
544
497
  });
545
498
  }
546
- openLayout(contentLayout) {
547
- return this._dialog.open(ContentLayoutComponent, {
548
- data: {
549
- contentLayout,
550
- },
551
- })
552
- .afterClosed()
553
- .pipe(filter((_contentLayout) => !!_contentLayout), takeUntil(this._destroy$));
554
- }
555
499
  ngOnDestroy() {
556
500
  this._destroy$.next(null);
557
501
  this._destroy$.complete();
558
502
  }
503
+ openContentPage(contentPage) {
504
+ return this._dialog.open(ContentPageComponent, {
505
+ data: { contentPage },
506
+ })
507
+ .afterClosed()
508
+ .pipe(takeUntil(this._destroy$));
509
+ }
559
510
  _initListConfig() {
560
511
  this.listConfig = {
561
512
  filters: [
@@ -569,8 +520,12 @@ class FsContentLayoutsComponent {
569
520
  {
570
521
  label: 'Create',
571
522
  click: () => {
572
- this.openLayout({})
573
- .subscribe(() => {
523
+ this.openContentPage({
524
+ type: PageType.StandardPage,
525
+ })
526
+ .pipe(filter((contentPage) => !!contentPage))
527
+ .subscribe((contentPage) => {
528
+ this.openEditor(contentPage);
574
529
  this.listComponent.reload();
575
530
  });
576
531
  },
@@ -579,7 +534,7 @@ class FsContentLayoutsComponent {
579
534
  rowActions: [
580
535
  {
581
536
  click: (data) => {
582
- return this._config.deleteContentLayout(data);
537
+ return this._config.deleteContentPage(data);
583
538
  },
584
539
  remove: {
585
540
  title: 'Confirm',
@@ -590,9 +545,13 @@ class FsContentLayoutsComponent {
590
545
  },
591
546
  ],
592
547
  fetch: (query) => {
593
- return this._config.loadContentLayouts(query)
548
+ query = {
549
+ contentLayouts: true,
550
+ ...query,
551
+ };
552
+ return this._config.loadContentPages(query)
594
553
  .pipe(map((response) => {
595
- return { data: response.contentLayouts, paging: response.paging };
554
+ return { data: response.contentPages, paging: response.paging };
596
555
  }));
597
556
  },
598
557
  restore: {
@@ -601,132 +560,67 @@ class FsContentLayoutsComponent {
601
560
  menuLabel: 'Restore',
602
561
  reload: true,
603
562
  click: (row) => {
604
- return this._config.saveContentLayout({ id: row.id, state: 'active' });
563
+ return this._config.saveContentPage({ id: row.id, state: 'active' });
605
564
  },
606
565
  },
607
566
  };
608
567
  }
609
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
610
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentLayoutsComponent, selector: "fs-content-layouts", viewQueries: [{ propertyName: "listComponent", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else name\" (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i3$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i3$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i4$2.FsDatePipe, name: "fsDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
568
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
569
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsContentPagesComponent, isStandalone: true, selector: "fs-content-pages", inputs: { htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n } @else {\n {{row.name}}\n }\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"path\" title=\"Path\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a [href]=\"'/' + row.path\" target=\"_black\">\n <ng-container [ngTemplateOutlet]=\"path\"></ng-container>\n </a>\n } @else {\n /{{row.path}}\n }\n <ng-template #path>/{{row.path}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"layout\" title=\"Layout\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.contentLayout?.name}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"type\" title=\"Type\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{pageTypes[row.type]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [":host ::ng-deep .modified,:host ::ng-deep .name{width:1%;white-space:nowrap}:host ::ng-deep .preview-content img{display:none}.preview-content{position:relative;max-height:100px;max-width:100%;overflow:hidden;-webkit-mask-image:-webkit-gradient(linear,left 60%,left bottom,from(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "pipe", type: i2$2.FsDatePipe, name: "fsDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
611
570
  }
612
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsComponent, decorators: [{
571
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesComponent, decorators: [{
613
572
  type: Component,
614
- args: [{ selector: 'fs-content-layouts', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else name\" (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n" }]
615
- }], ctorParameters: () => [{ type: undefined, decorators: [{
616
- type: Inject,
617
- args: [FS_CONTENT_CONFIG]
618
- }] }, { type: i1.MatDialog }], propDecorators: { listComponent: [{
573
+ args: [{ selector: 'fs-content-pages', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
574
+ FsListModule,
575
+ NgTemplateOutlet,
576
+ FsDateModule,
577
+ ], template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n } @else {\n {{row.name}}\n }\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"path\" title=\"Path\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a [href]=\"'/' + row.path\" target=\"_black\">\n <ng-container [ngTemplateOutlet]=\"path\"></ng-container>\n </a>\n } @else {\n /{{row.path}}\n }\n <ng-template #path>/{{row.path}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"layout\" title=\"Layout\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.contentLayout?.name}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"type\" title=\"Type\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{pageTypes[row.type]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [":host ::ng-deep .modified,:host ::ng-deep .name{width:1%;white-space:nowrap}:host ::ng-deep .preview-content img{display:none}.preview-content{position:relative;max-height:100px;max-width:100%;overflow:hidden;-webkit-mask-image:-webkit-gradient(linear,left 60%,left bottom,from(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"] }]
578
+ }], propDecorators: { htmlEditorConfig: [{
579
+ type: Input
580
+ }], listComponent: [{
619
581
  type: ViewChild,
620
582
  args: [FsListComponent]
621
583
  }] } });
622
584
 
623
- class FsContentLayoutsModule {
624
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
625
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsModule, declarations: [ContentLayoutComponent,
626
- FsContentLayoutsComponent,
627
- ContentLayoutEditorComponent], imports: [CommonModule,
628
- FormsModule,
629
- MatDialogModule,
630
- MatInputModule,
631
- MatFormFieldModule,
632
- MatButtonModule,
633
- MatTabsModule,
634
- MatIconModule,
635
- MatSelectModule,
636
- MatButtonToggleModule,
637
- MatTooltipModule,
638
- FsListModule,
639
- FsDateModule,
640
- FsFormModule,
641
- FsLabelModule,
642
- FsSkeletonModule,
643
- FsHtmlEditorModule,
644
- FsDialogModule,
645
- FsTextEditorModule,
646
- FsContentEditorModule], exports: [FsContentLayoutsComponent] });
647
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsModule, imports: [CommonModule,
648
- FormsModule,
649
- MatDialogModule,
650
- MatInputModule,
651
- MatFormFieldModule,
652
- MatButtonModule,
653
- MatTabsModule,
654
- MatIconModule,
655
- MatSelectModule,
656
- MatButtonToggleModule,
657
- MatTooltipModule,
658
- FsListModule,
659
- FsDateModule,
660
- FsFormModule,
661
- FsLabelModule,
662
- FsSkeletonModule,
663
- FsHtmlEditorModule,
664
- FsDialogModule,
665
- FsTextEditorModule,
666
- FsContentEditorModule] });
585
+ class FsContentPagesModule {
586
+ static forRoot() {
587
+ return {
588
+ ngModule: FsContentPagesModule,
589
+ };
590
+ }
591
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
592
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, imports: [FsContentPagesComponent,
593
+ ContentPageComponent,
594
+ ContentPageEditorComponent], exports: [FsContentPagesComponent] });
595
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, imports: [FsContentPagesComponent,
596
+ ContentPageComponent,
597
+ ContentPageEditorComponent] });
667
598
  }
668
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsModule, decorators: [{
599
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, decorators: [{
669
600
  type: NgModule,
670
601
  args: [{
671
602
  imports: [
672
- CommonModule,
673
- FormsModule,
674
- MatDialogModule,
675
- MatInputModule,
676
- MatFormFieldModule,
677
- MatButtonModule,
678
- MatTabsModule,
679
- MatIconModule,
680
- MatSelectModule,
681
- MatButtonToggleModule,
682
- MatTooltipModule,
683
- FsListModule,
684
- FsDateModule,
685
- FsFormModule,
686
- FsLabelModule,
687
- FsSkeletonModule,
688
- FsHtmlEditorModule,
689
- FsDialogModule,
690
- FsTextEditorModule,
691
- FsContentEditorModule,
603
+ FsContentPagesComponent,
604
+ ContentPageComponent,
605
+ ContentPageEditorComponent,
692
606
  ],
693
607
  exports: [
694
- FsContentLayoutsComponent,
695
- ],
696
- declarations: [
697
- ContentLayoutComponent,
698
- FsContentLayoutsComponent,
699
- ContentLayoutEditorComponent,
608
+ FsContentPagesComponent,
700
609
  ],
701
610
  }]
702
611
  }] });
703
612
 
704
- const PageTypes = [
705
- { name: 'Page', value: PageType.StandardPage },
706
- { name: 'Page (Not Found)', value: PageType.NotFoundPage },
707
- ];
708
-
709
- class ContentPageComponent {
710
- _config;
711
- _data;
712
- _dialogRef;
713
- _message;
714
- _cdRef;
613
+ class ContentLayoutComponent {
614
+ _config = inject(FS_CONTENT_CONFIG);
615
+ _data = inject(MAT_DIALOG_DATA);
616
+ _dialogRef = inject(MatDialogRef);
617
+ _message = inject(FsMessage);
618
+ _cdRef = inject(ChangeDetectorRef);
715
619
  textEditors;
716
- contentPage = null;
717
- PageTypes = PageTypes;
718
- contentLayouts;
620
+ contentLayout = null;
719
621
  editors = { content: true, styles: true };
720
622
  _destroy$ = new Subject();
721
- constructor(_config, _data, _dialogRef, _message, _cdRef) {
722
- this._config = _config;
723
- this._data = _data;
724
- this._dialogRef = _dialogRef;
725
- this._message = _message;
726
- this._cdRef = _cdRef;
727
- }
728
623
  ngOnInit() {
729
- this._dialogRef.updateSize('600px');
730
624
  this._fetchData();
731
625
  }
732
626
  ngOnDestroy() {
@@ -734,84 +628,73 @@ class ContentPageComponent {
734
628
  this._destroy$.complete();
735
629
  }
736
630
  save = () => {
737
- return this._config.saveContentPage(this.contentPage)
738
- .pipe(tap((contentPage) => {
631
+ return this._config.saveContentLayout(this.contentLayout)
632
+ .pipe(tap((contentLayout) => {
739
633
  this._message.success('Saved Changes');
740
- this._dialogRef.close(contentPage);
634
+ this._dialogRef.close(contentLayout);
741
635
  }));
742
636
  };
743
637
  _fetchData() {
744
- this._config.loadContentLayouts()
745
- .subscribe((contentLayouts) => {
746
- this.contentLayouts = contentLayouts;
747
- this._cdRef.markForCheck();
748
- });
749
- of(this._data.contentPage)
750
- .pipe(switchMap((contentPage) => {
751
- return of(contentPage);
638
+ of(this._data.contentLayout)
639
+ .pipe(switchMap((contentLayout) => {
640
+ return of(contentLayout);
752
641
  }), takeUntil(this._destroy$))
753
- .subscribe((contentPage) => {
754
- this.contentPage = {
755
- ...contentPage,
756
- path: contentPage.path || '/',
757
- };
642
+ .subscribe((contentLayout) => {
643
+ this.contentLayout = { ...contentLayout };
758
644
  this._cdRef.markForCheck();
759
645
  });
760
646
  }
761
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$1.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
762
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentPageComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: FsTextEditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentPage\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentPage.id ? 'Page' : 'Create Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required>\n <mat-option\n *ngFor=\"let item of PageTypes\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field *ngIf=\"contentLayouts\">\n <mat-label>Layout</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\">\n <mat-option\n *ngFor=\"let item of contentLayouts\"\n [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5$1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatLabel, selector: "mat-label" }, { kind: "component", type: i7$2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i8$1.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i9.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "component", type: i9.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }, { kind: "directive", type: i9.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i10.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "component", type: i11.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
647
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
648
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentLayoutComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: FsTextEditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentLayout\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentLayout.id ? 'Layout' : 'Layout Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i3.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "component", type: i3.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }, { kind: "directive", type: i3.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
763
649
  }
764
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageComponent, decorators: [{
650
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutComponent, decorators: [{
765
651
  type: Component,
766
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentPage\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentPage.id ? 'Page' : 'Create Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Type</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required>\n <mat-option\n *ngFor=\"let item of PageTypes\"\n [value]=\"item.value\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field *ngIf=\"contentLayouts\">\n <mat-label>Layout</mat-label>\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\">\n <mat-option\n *ngFor=\"let item of contentLayouts\"\n [value]=\"item.id\">\n {{ item.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Path</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Title</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n" }]
767
- }], ctorParameters: () => [{ type: undefined, decorators: [{
768
- type: Inject,
769
- args: [FS_CONTENT_CONFIG]
770
- }] }, { type: undefined, decorators: [{
771
- type: Inject,
772
- args: [MAT_DIALOG_DATA]
773
- }] }, { type: i1.MatDialogRef }, { type: i2$1.FsMessage }, { type: i0.ChangeDetectorRef }], propDecorators: { textEditors: [{
652
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
653
+ FsSkeletonModule,
654
+ FormsModule,
655
+ FsFormModule,
656
+ FsDialogModule,
657
+ MatDialogTitle,
658
+ CdkScrollable,
659
+ MatDialogContent,
660
+ MatFormField,
661
+ MatLabel,
662
+ MatInput,
663
+ MatDialogActions,
664
+ ], template: "<form fsForm [submit]=\"save\" *fsSkeletonForm=\"contentLayout\">\n <fs-dialog>\n <h1 mat-dialog-title>{{contentLayout.id ? 'Layout' : 'Layout Page'}}</h1>\n <div mat-dialog-content>\n <div class=\"fs-column\">\n <mat-form-field>\n <mat-label>Name</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required>\n </mat-form-field>\n <mat-form-field>\n <mat-label>Tag</mat-label>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\">\n </mat-form-field>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n </div>\n </fs-dialog>\n</form>\n" }]
665
+ }], propDecorators: { textEditors: [{
774
666
  type: ViewChildren,
775
667
  args: [FsTextEditorComponent]
776
668
  }] } });
777
669
 
778
- class ContentPageEditorComponent {
779
- _data;
780
- _dialogRef;
781
- _message;
782
- _dialog;
783
- _cdRef;
784
- _prompt;
670
+ class ContentLayoutEditorComponent {
671
+ _data = inject(MAT_DIALOG_DATA);
672
+ _dialogRef = inject(MatDialogRef);
673
+ _message = inject(FsMessage);
674
+ _dialog = inject(MatDialog);
675
+ _cdRef = inject(ChangeDetectorRef);
676
+ _prompt = inject(FsPrompt);
785
677
  editor;
786
- contentPage;
787
- focused = null;
678
+ contentLayout;
679
+ get isMac() {
680
+ return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
681
+ }
682
+ submitting;
788
683
  config;
789
- resizing = false;
684
+ EditorType = EditorType;
685
+ focused = null;
790
686
  title;
791
687
  editors = {
792
688
  [EditorType.Html]: true,
793
689
  [EditorType.Scss]: true,
794
- [EditorType.Js]: false,
795
690
  [EditorType.GlobalScss]: false,
796
691
  };
797
- get isMac() {
798
- return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
799
- }
800
- submitting;
801
692
  _destroy$ = new Subject();
802
- constructor(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
803
- this._data = _data;
804
- this._dialogRef = _dialogRef;
805
- this._message = _message;
806
- this._dialog = _dialog;
807
- this._cdRef = _cdRef;
808
- this._prompt = _prompt;
809
- }
810
693
  ngOnInit() {
811
694
  this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
812
695
  this._dialogRef.disableClose = true;
813
696
  this.config = this._data.contentConfig;
814
- this._initContentPage(this._data.contentPage);
697
+ this._initContentLayout(this._data.contentLayout);
815
698
  this._initEscape();
816
699
  }
817
700
  editorToggleChange(event) {
@@ -821,10 +704,10 @@ class ContentPageEditorComponent {
821
704
  this._destroy$.next(null);
822
705
  this._destroy$.complete();
823
706
  }
824
- _initContentPage(contentPage) {
825
- this.config.loadContentPage(contentPage.id)
707
+ _initContentLayout(contentLayout) {
708
+ this.config.loadContentLayout(contentLayout.id)
826
709
  .subscribe((data) => {
827
- this.contentPage = data;
710
+ this.contentLayout = data;
828
711
  this._cdRef.markForCheck();
829
712
  });
830
713
  }
@@ -840,7 +723,6 @@ class ContentPageEditorComponent {
840
723
  return of(null)
841
724
  .pipe(filter(() => this.focused), switchMap(() => {
842
725
  switch (this.focused) {
843
- case EditorType.Js:
844
726
  case EditorType.Html:
845
727
  case EditorType.Scss:
846
728
  return this.saveContentPage();
@@ -854,21 +736,19 @@ class ContentPageEditorComponent {
854
736
  }), finalize(() => {
855
737
  this.submitting = false;
856
738
  this._cdRef.markForCheck();
857
- }))
858
- .pipe(takeUntil(this._destroy$));
739
+ }));
859
740
  };
860
741
  saveContentPage() {
861
742
  const names = {
862
- [EditorType.Js]: 'js',
863
743
  [EditorType.Scss]: 'styles',
864
744
  [EditorType.Html]: 'content',
865
745
  };
866
746
  const data = {
867
- id: this.contentPage.id,
747
+ id: this.contentLayout.id,
868
748
  [names[this.focused]]: this.editor.changes[this.focused],
869
749
  };
870
- return this.config.saveContentPage({
871
- id: this.contentPage.id,
750
+ return this.config.saveContentLayout({
751
+ id: this.contentLayout.id,
872
752
  ...data,
873
753
  })
874
754
  .pipe(tap(() => {
@@ -904,17 +784,17 @@ class ContentPageEditorComponent {
904
784
  });
905
785
  }
906
786
  openSettings() {
907
- this._dialog.open(ContentPageComponent, {
787
+ this._dialog.open(ContentLayoutComponent, {
908
788
  data: {
909
- contentPage: this.contentPage,
789
+ contentLayout: this.contentLayout,
910
790
  },
911
791
  })
912
792
  .afterClosed()
913
793
  .pipe(takeUntil(this._destroy$))
914
- .subscribe((contentPage) => {
915
- this.contentPage = {
916
- ...this.contentPage,
917
- ...contentPage,
794
+ .subscribe((contentLayout) => {
795
+ this.contentLayout = {
796
+ ...this.contentLayout,
797
+ ...contentLayout,
918
798
  };
919
799
  this._cdRef.markForCheck();
920
800
  });
@@ -928,46 +808,50 @@ class ContentPageEditorComponent {
928
808
  }
929
809
  });
930
810
  }
931
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageEditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$1.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }, { token: i3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
932
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentPageEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentPage\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Page Editor\n <div class=\"small\">{{contentPage.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <a \n mat-stroked-button\n target=\"_blank\"\n [routerLink]=\"contentPage.path\"\n type=\"button\"> \n Preview\n </a>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showJs]=\"editors.js\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentPage.content\"\n [scss]=\"contentPage.styles\"\n [js]=\"contentPage.js\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n </fs-dialog>\n</form>\n", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], dependencies: [{ kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6$1.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i6$1.MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i7$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i7$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: i9.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i9.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "directive", type: i10.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "component", type: i11.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
811
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
812
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentLayoutEditorComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentLayout\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Layout Editor\n <div class=\"small\">{{contentLayout.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <!-- <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle> -->\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentLayout.content\"\n [scss]=\"contentLayout.styles\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n\n <!-- <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"close()\"\n type=\"button\"> \n Done \n </button>\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n </div> -->\n </fs-dialog>\n</form>", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i3.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i3.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i4.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i4.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i5.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: MatIconAnchor, selector: "a[mat-icon-button]", exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled", "disabledInteractive", "hideSingleSelectionIndicator", "hideMultipleSelectionIndicator"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: MatButtonToggle, selector: "mat-button-toggle", inputs: ["aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "disableRipple", "appearance", "checked", "disabled", "disabledInteractive"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "component", type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
933
813
  }
934
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentPageEditorComponent, decorators: [{
814
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentLayoutEditorComponent, decorators: [{
935
815
  type: Component,
936
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentPage\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Page Editor\n <div class=\"small\">{{contentPage.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <a \n mat-stroked-button\n target=\"_blank\"\n [routerLink]=\"contentPage.path\"\n type=\"button\"> \n Preview\n </a>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showJs]=\"editors.js\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentPage.content\"\n [scss]=\"contentPage.styles\"\n [js]=\"contentPage.js\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n </fs-dialog>\n</form>\n", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
937
- }], ctorParameters: () => [{ type: undefined, decorators: [{
938
- type: Inject,
939
- args: [MAT_DIALOG_DATA]
940
- }] }, { type: i1.MatDialogRef }, { type: i2$1.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i3.FsPrompt }], propDecorators: { editor: [{
816
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
817
+ FormsModule,
818
+ FsFormModule,
819
+ FsSkeletonModule,
820
+ FsDialogModule,
821
+ MatDialogTitle,
822
+ MatIconAnchor,
823
+ MatIcon,
824
+ MatButtonToggleGroup,
825
+ MatButtonToggle,
826
+ MatButton,
827
+ MatTooltip,
828
+ CdkScrollable,
829
+ MatDialogContent,
830
+ EditorComponent,
831
+ ], template: "<form fsForm [submit]=\"submitted\" [dirtySubmitButton]=\"false\" [confirm]=\"false\">\n <fs-dialog *fsSkeletonForm=\"contentLayout\">\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Layout Editor\n <div class=\"small\">{{contentLayout.name}}</div> \n </div>\n <a\n (click)=\"openSettings()\"\n mat-icon-button>\n <mat-icon>settings</mat-icon>\n </a>\n\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <!-- <mat-button-toggle value=\"js\" [checked]=\"editors.js\" (change)=\"editorToggleChange($event)\">JS</mat-button-toggle> -->\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n\n <div class=\"actions\">\n <button\n #submit\n mat-stroked-button\n color=\"primary\"\n [disabled]=\"!editor?.hasChanges || submitting\"\n [matTooltip]=\"isMac ? 'cmd+s' : 'ctrl+s'\"\n type=\"button\"\n (click)=\"save()\"> \n Save\n </button>\n\n <button \n mat-stroked-button\n (click)=\"close()\"\n type=\"button\"> \n Done\n </button>\n </div>\n </div>\n </h1>\n <div mat-dialog-content>\n <app-editor\n [contentConfig]=\"config\"\n [showHtml]=\"editors.html\"\n [showScss]=\"editors.scss\"\n [showGlobalScss]=\"editors.globalScss\"\n [html]=\"contentLayout.content\"\n [scss]=\"contentLayout.styles\"\n (focused)=\"editorFocused($event)\">\n </app-editor>\n </div>\n\n <!-- <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"close()\"\n type=\"button\"> \n Done \n </button>\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"html\" [checked]=\"editors.html\" (change)=\"editorToggleChange($event)\">HTML</mat-button-toggle>\n <mat-button-toggle value=\"scss\" [checked]=\"editors.scss\" (change)=\"editorToggleChange($event)\">SCSS</mat-button-toggle>\n <mat-button-toggle value=\"globalScss\" [checked]=\"editors.globalScss\" (change)=\"editorToggleChange($event)\">Global SCSS</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n </div> -->\n </fs-dialog>\n</form>", styles: ["::ng-deep .fs-content-editor-overlay-pane .mat-dialog-container{border-radius:0}form{height:100%}fs-dialog{display:flex;height:100%;flex-direction:column}fs-dialog ::ng-deep .mat-dialog-content{max-height:none;flex:1;overflow:hidden}fs-dialog ::ng-deep .mat-button-toggle-label-content{line-height:36px}h1 .toggles{display:flex;justify-content:flex-end;justify-self:baseline;font-size:13px}h1 .actions{margin-left:30px}h1 .actions .mdc-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
832
+ }], propDecorators: { editor: [{
941
833
  type: ViewChild,
942
834
  args: [EditorComponent]
943
835
  }] } });
944
836
 
945
- class FsContentPagesComponent {
946
- _config;
947
- _dialog;
948
- htmlEditorConfig;
837
+ class FsContentLayoutsComponent {
838
+ _config = inject(FS_CONTENT_CONFIG);
839
+ _dialog = inject(MatDialog);
949
840
  listComponent;
950
841
  listConfig;
951
- pageTypes = index(PageTypes, 'value', 'name');
952
842
  _destroy$ = new Subject();
953
- constructor(_config, _dialog) {
954
- this._config = _config;
955
- this._dialog = _dialog;
956
- }
957
843
  ngOnInit() {
958
844
  this._initListConfig();
959
845
  }
960
- openEditor(contentPage) {
961
- this._dialog.open(ContentPageEditorComponent, {
962
- data: {
963
- contentPage,
964
- config: this._config,
965
- contentConfig: this._config,
966
- },
846
+ openEditor(contentLayout) {
847
+ this._dialog.open(ContentLayoutEditorComponent, {
967
848
  maxWidth: '100vw',
968
849
  width: '100%',
969
850
  height: '100%',
970
- autoFocus: false,
851
+ data: {
852
+ contentLayout,
853
+ contentConfig: this._config,
854
+ },
971
855
  })
972
856
  .afterClosed()
973
857
  .pipe(takeUntil(this._destroy$))
@@ -975,17 +859,19 @@ class FsContentPagesComponent {
975
859
  this.listComponent.reload();
976
860
  });
977
861
  }
862
+ openLayout(contentLayout) {
863
+ return this._dialog.open(ContentLayoutComponent, {
864
+ data: {
865
+ contentLayout,
866
+ },
867
+ })
868
+ .afterClosed()
869
+ .pipe(filter((_contentLayout) => !!_contentLayout), takeUntil(this._destroy$));
870
+ }
978
871
  ngOnDestroy() {
979
872
  this._destroy$.next(null);
980
873
  this._destroy$.complete();
981
874
  }
982
- openContentPage(contentPage) {
983
- return this._dialog.open(ContentPageComponent, {
984
- data: { contentPage },
985
- })
986
- .afterClosed()
987
- .pipe(takeUntil(this._destroy$));
988
- }
989
875
  _initListConfig() {
990
876
  this.listConfig = {
991
877
  filters: [
@@ -999,12 +885,8 @@ class FsContentPagesComponent {
999
885
  {
1000
886
  label: 'Create',
1001
887
  click: () => {
1002
- this.openContentPage({
1003
- type: PageType.StandardPage,
1004
- })
1005
- .pipe(filter((contentPage) => !!contentPage))
1006
- .subscribe((contentPage) => {
1007
- this.openEditor(contentPage);
888
+ this.openLayout({})
889
+ .subscribe(() => {
1008
890
  this.listComponent.reload();
1009
891
  });
1010
892
  },
@@ -1013,7 +895,7 @@ class FsContentPagesComponent {
1013
895
  rowActions: [
1014
896
  {
1015
897
  click: (data) => {
1016
- return this._config.deleteContentPage(data);
898
+ return this._config.deleteContentLayout(data);
1017
899
  },
1018
900
  remove: {
1019
901
  title: 'Confirm',
@@ -1024,13 +906,9 @@ class FsContentPagesComponent {
1024
906
  },
1025
907
  ],
1026
908
  fetch: (query) => {
1027
- query = {
1028
- contentLayouts: true,
1029
- ...query,
1030
- };
1031
- return this._config.loadContentPages(query)
909
+ return this._config.loadContentLayouts(query)
1032
910
  .pipe(map((response) => {
1033
- return { data: response.contentPages, paging: response.paging };
911
+ return { data: response.contentLayouts, paging: response.paging };
1034
912
  }));
1035
913
  },
1036
914
  restore: {
@@ -1039,123 +917,30 @@ class FsContentPagesComponent {
1039
917
  menuLabel: 'Restore',
1040
918
  reload: true,
1041
919
  click: (row) => {
1042
- return this._config.saveContentPage({ id: row.id, state: 'active' });
920
+ return this._config.saveContentLayout({ id: row.id, state: 'active' });
1043
921
  },
1044
922
  },
1045
923
  };
1046
924
  }
1047
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
1048
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentPagesComponent, selector: "fs-content-pages", inputs: { htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else name\" (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"path\" title=\"Path\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else path\" [href]=\"'/' + row.path\" target=\"_black\">\n <ng-container [ngTemplateOutlet]=\"path\"></ng-container>\n </a>\n <ng-template #path>/{{row.path}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"layout\" title=\"Layout\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.contentLayout?.name}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"type\" title=\"Type\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{pageTypes[row.type]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [":host ::ng-deep .modified,:host ::ng-deep .name{width:1%;white-space:nowrap}:host ::ng-deep .preview-content img{display:none}.preview-content{position:relative;max-height:100px;max-width:100%;overflow:hidden;-webkit-mask-image:-webkit-gradient(linear,left 60%,left bottom,from(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i3$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i3$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "pipe", type: i4$2.FsDatePipe, name: "fsDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
925
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
926
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsContentLayoutsComponent, isStandalone: true, selector: "fs-content-layouts", viewQueries: [{ propertyName: "listComponent", first: true, predicate: FsListComponent, descendants: true }], ngImport: i0, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n } @else {\n {{row.name}}\n }\n\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "pipe", type: i2$2.FsDatePipe, name: "fsDate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1049
927
  }
1050
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesComponent, decorators: [{
928
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentLayoutsComponent, decorators: [{
1051
929
  type: Component,
1052
- args: [{ selector: 'fs-content-pages', changeDetection: ChangeDetectionStrategy.OnPush, template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else name\" (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"path\" title=\"Path\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a *ngIf=\"row.state !== 'deleted'; else path\" [href]=\"'/' + row.path\" target=\"_black\">\n <ng-container [ngTemplateOutlet]=\"path\"></ng-container>\n </a>\n <ng-template #path>/{{row.path}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"layout\" title=\"Layout\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.contentLayout?.name}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"type\" title=\"Type\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{pageTypes[row.type]}}\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n", styles: [":host ::ng-deep .modified,:host ::ng-deep .name{width:1%;white-space:nowrap}:host ::ng-deep .preview-content img{display:none}.preview-content{position:relative;max-height:100px;max-width:100%;overflow:hidden;-webkit-mask-image:-webkit-gradient(linear,left 60%,left bottom,from(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"] }]
1053
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1054
- type: Inject,
1055
- args: [FS_CONTENT_CONFIG]
1056
- }] }, { type: i1.MatDialog }], propDecorators: { htmlEditorConfig: [{
1057
- type: Input
1058
- }], listComponent: [{
930
+ args: [{ selector: 'fs-content-layouts', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
931
+ FsListModule,
932
+ NgTemplateOutlet,
933
+ FsDateModule,
934
+ ], template: "<fs-list [config]=\"listConfig\">\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n @if (row.state !== 'deleted') {\n <a (click)=\"openEditor(row)\">\n <ng-container [ngTemplateOutlet]=\"name\"></ng-container>\n </a>\n } @else {\n {{row.name}}\n }\n\n <ng-template #name>{{row.name}}</ng-template>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"modify_date\" title=\"Modified\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n {{row.modifyDate | fsDate: 'date-time-yearless'}}\n </ng-template>\n </fs-list-column>\n</fs-list>\n" }]
935
+ }], propDecorators: { listComponent: [{
1059
936
  type: ViewChild,
1060
937
  args: [FsListComponent]
1061
938
  }] } });
1062
939
 
1063
- class FsContentPagesModule {
1064
- static forRoot() {
1065
- return {
1066
- ngModule: FsContentPagesModule,
1067
- };
1068
- }
1069
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1070
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, declarations: [FsContentPagesComponent,
1071
- ContentPageComponent,
1072
- ContentPageEditorComponent], imports: [CommonModule,
1073
- FormsModule,
1074
- RouterModule,
1075
- MatDialogModule,
1076
- MatInputModule,
1077
- MatFormFieldModule,
1078
- MatButtonModule,
1079
- MatTabsModule,
1080
- MatIconModule,
1081
- MatSelectModule,
1082
- MatButtonToggleModule,
1083
- MatTooltipModule,
1084
- FsListModule,
1085
- FsDateModule,
1086
- FsCommonModule,
1087
- FsFormModule,
1088
- FsLabelModule,
1089
- FsSkeletonModule,
1090
- FsHtmlEditorModule,
1091
- FsDialogModule,
1092
- FsTextEditorModule,
1093
- FsContentEditorModule], exports: [FsContentPagesComponent] });
1094
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, imports: [CommonModule,
1095
- FormsModule,
1096
- RouterModule,
1097
- MatDialogModule,
1098
- MatInputModule,
1099
- MatFormFieldModule,
1100
- MatButtonModule,
1101
- MatTabsModule,
1102
- MatIconModule,
1103
- MatSelectModule,
1104
- MatButtonToggleModule,
1105
- MatTooltipModule,
1106
- FsListModule,
1107
- FsDateModule,
1108
- FsCommonModule,
1109
- FsFormModule,
1110
- FsLabelModule,
1111
- FsSkeletonModule,
1112
- FsHtmlEditorModule,
1113
- FsDialogModule,
1114
- FsTextEditorModule,
1115
- FsContentEditorModule] });
1116
- }
1117
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentPagesModule, decorators: [{
1118
- type: NgModule,
1119
- args: [{
1120
- imports: [
1121
- CommonModule,
1122
- FormsModule,
1123
- RouterModule,
1124
- MatDialogModule,
1125
- MatInputModule,
1126
- MatFormFieldModule,
1127
- MatButtonModule,
1128
- MatTabsModule,
1129
- MatIconModule,
1130
- MatSelectModule,
1131
- MatButtonToggleModule,
1132
- MatTooltipModule,
1133
- FsListModule,
1134
- FsDateModule,
1135
- FsCommonModule,
1136
- FsFormModule,
1137
- FsLabelModule,
1138
- FsSkeletonModule,
1139
- FsHtmlEditorModule,
1140
- FsDialogModule,
1141
- FsTextEditorModule,
1142
- FsContentEditorModule,
1143
- ],
1144
- exports: [
1145
- FsContentPagesComponent,
1146
- ],
1147
- declarations: [
1148
- FsContentPagesComponent,
1149
- ContentPageComponent,
1150
- ContentPageEditorComponent,
1151
- ],
1152
- }]
1153
- }] });
1154
-
1155
940
  class ContentStyleComponent {
1156
- _config;
1157
- _message;
1158
- _cdRef;
941
+ _config = inject(FS_CONTENT_CONFIG);
942
+ _message = inject(FsMessage);
943
+ _cdRef = inject(ChangeDetectorRef);
1159
944
  textEditors;
1160
945
  form;
1161
946
  height = '100%';
@@ -1166,11 +951,6 @@ class ContentStyleComponent {
1166
951
  height: '100%',
1167
952
  };
1168
953
  _destroy$ = new Subject();
1169
- constructor(_config, _message, _cdRef) {
1170
- this._config = _config;
1171
- this._message = _message;
1172
- this._cdRef = _cdRef;
1173
- }
1174
954
  ngOnInit() {
1175
955
  this.styleConfig.height = this.height;
1176
956
  this._config.loadContentStyle()
@@ -1194,16 +974,18 @@ class ContentStyleComponent {
1194
974
  this._message.success('Saved Changes');
1195
975
  })).subscribe();
1196
976
  }
1197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentStyleComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i2$1.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
1198
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentStyleComponent, selector: "fs-content-style", inputs: { height: "height" }, viewQueries: [{ propertyName: "textEditors", first: true, predicate: FsTextEditorComponent, descendants: true }, { propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<ng-container *fsSkeletonForm=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"contentStyle\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"save()\"\n [config]=\"styleConfig\">\n </fs-text-editor> \n</ng-container>\n", styles: [""], dependencies: [{ kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i6.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }, { kind: "directive", type: i10.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "directive", type: i5.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
977
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentStyleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
978
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentStyleComponent, isStandalone: true, selector: "fs-content-style", inputs: { height: "height" }, viewQueries: [{ propertyName: "textEditors", first: true, predicate: FsTextEditorComponent, descendants: true }, { propertyName: "form", first: true, predicate: FsFormDirective, descendants: true }], ngImport: i0, template: "<ng-container *fsSkeletonForm=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"contentStyle\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"save()\"\n [config]=\"styleConfig\">\n </fs-text-editor> \n</ng-container>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: FsSkeletonModule }, { kind: "directive", type: i1.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { kind: "ngmodule", type: FsTextEditorModule }, { kind: "component", type: i2$1.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FsCommonModule }, { kind: "directive", type: i5$1.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1199
979
  }
1200
980
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentStyleComponent, decorators: [{
1201
981
  type: Component,
1202
- args: [{ selector: 'fs-content-style', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *fsSkeletonForm=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"contentStyle\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"save()\"\n [config]=\"styleConfig\">\n </fs-text-editor> \n</ng-container>\n" }]
1203
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1204
- type: Inject,
1205
- args: [FS_CONTENT_CONFIG]
1206
- }] }, { type: i2$1.FsMessage }, { type: i0.ChangeDetectorRef }], propDecorators: { textEditors: [{
982
+ args: [{ selector: 'fs-content-style', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
983
+ FsSkeletonModule,
984
+ FsTextEditorModule,
985
+ FormsModule,
986
+ FsCommonModule,
987
+ ], template: "<ng-container *fsSkeletonForm=\"contentStyle\">\n <fs-text-editor \n [(ngModel)]=\"contentStyle.scss\" \n name=\"contentStyle\"\n [fsModelChangeOptions]=\"{ debounce: 300 }\"\n (fsModelChange)=\"save()\"\n [config]=\"styleConfig\">\n </fs-text-editor> \n</ng-container>\n" }]
988
+ }], propDecorators: { textEditors: [{
1207
989
  type: ViewChild,
1208
990
  args: [FsTextEditorComponent]
1209
991
  }], form: [{
@@ -1213,59 +995,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1213
995
  type: Input
1214
996
  }] } });
1215
997
 
1216
- class FsContentStyleModule {
1217
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentStyleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1218
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentStyleModule, declarations: [ContentStyleComponent], imports: [CommonModule,
1219
- FormsModule,
1220
- MatButtonModule,
1221
- FsTextEditorModule,
1222
- FsSkeletonModule,
1223
- FsCommonModule,
1224
- FsContentEditorModule], exports: [ContentStyleComponent] });
1225
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentStyleModule, imports: [CommonModule,
1226
- FormsModule,
1227
- MatButtonModule,
1228
- FsTextEditorModule,
1229
- FsSkeletonModule,
1230
- FsCommonModule,
1231
- FsContentEditorModule] });
1232
- }
1233
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentStyleModule, decorators: [{
1234
- type: NgModule,
1235
- args: [{
1236
- imports: [
1237
- CommonModule,
1238
- FormsModule,
1239
- MatButtonModule,
1240
- FsTextEditorModule,
1241
- FsSkeletonModule,
1242
- FsCommonModule,
1243
- FsContentEditorModule,
1244
- ],
1245
- exports: [
1246
- ContentStyleComponent,
1247
- ],
1248
- declarations: [
1249
- ContentStyleComponent,
1250
- ],
1251
- }]
1252
- }] });
1253
-
1254
998
  class ContentRendererComponent {
1255
- _sanitizer;
1256
- _router;
1257
- _el;
1258
- _htmlRenderer;
999
+ _sanitizer = inject(DomSanitizer);
1000
+ _router = inject(Router);
1001
+ _el = inject(ElementRef);
1002
+ _htmlRenderer = inject(HtmlRenderer);
1259
1003
  script;
1260
1004
  contentPage;
1261
1005
  content;
1262
1006
  _destroy$ = new Subject();
1263
- constructor(_sanitizer, _router, _el, _htmlRenderer) {
1264
- this._sanitizer = _sanitizer;
1265
- this._router = _router;
1266
- this._el = _el;
1267
- this._htmlRenderer = _htmlRenderer;
1268
- }
1269
1007
  ngOnChanges(changes) {
1270
1008
  if (changes.contentPage.currentValue) {
1271
1009
  this._htmlRenderer.addStyle(this.contentPage.styles, { id: 'contentPageStyles' });
@@ -1309,13 +1047,13 @@ class ContentRendererComponent {
1309
1047
  el.remove();
1310
1048
  }
1311
1049
  }
1312
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentRendererComponent, deps: [{ token: i1$1.DomSanitizer }, { token: i2$2.Router }, { token: i0.ElementRef }, { token: i3$2.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
1313
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1050
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1051
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: ContentRendererComponent, isStandalone: true, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "@if (content) {\n <div [innerHTML]=\"content\"></div>\n}\n<span #script></span>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1314
1052
  }
1315
1053
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ContentRendererComponent, decorators: [{
1316
1054
  type: Component,
1317
- args: [{ selector: 'fs-content-renderer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>" }]
1318
- }], ctorParameters: () => [{ type: i1$1.DomSanitizer }, { type: i2$2.Router }, { type: i0.ElementRef }, { type: i3$2.HtmlRenderer }], propDecorators: { script: [{
1055
+ args: [{ selector: 'fs-content-renderer', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "@if (content) {\n <div [innerHTML]=\"content\"></div>\n}\n<span #script></span>" }]
1056
+ }], propDecorators: { script: [{
1319
1057
  type: ViewChild,
1320
1058
  args: ['script', { read: ElementRef }]
1321
1059
  }], contentPage: [{
@@ -1323,22 +1061,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
1323
1061
  }] } });
1324
1062
 
1325
1063
  class FsContentComponent {
1326
- _config;
1327
- _title;
1328
- _cdRef;
1329
- _router;
1330
- _el;
1331
- _htmlRenderer;
1064
+ _config = inject(FS_CONTENT_CONFIG);
1065
+ _title = inject(Title);
1066
+ _cdRef = inject(ChangeDetectorRef);
1067
+ _router = inject(Router);
1068
+ _el = inject(ElementRef);
1069
+ _htmlRenderer = inject(HtmlRenderer);
1332
1070
  contentPage;
1333
1071
  _destroy$ = new Subject();
1334
- constructor(_config, _title, _cdRef, _router, _el, _htmlRenderer) {
1335
- this._config = _config;
1336
- this._title = _title;
1337
- this._cdRef = _cdRef;
1338
- this._router = _router;
1339
- this._el = _el;
1340
- this._htmlRenderer = _htmlRenderer;
1341
- }
1342
1072
  ngOnInit() {
1343
1073
  this._initContent();
1344
1074
  this._initStyles();
@@ -1386,45 +1116,17 @@ class FsContentComponent {
1386
1116
  this._cdRef.markForCheck();
1387
1117
  });
1388
1118
  }
1389
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1$1.Title }, { token: i0.ChangeDetectorRef }, { token: i2$2.Router }, { token: i0.ElementRef }, { token: i3$2.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
1390
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentComponent, selector: "fs-content", ngImport: i0, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsContentComponent, isStandalone: true, selector: "fs-content", ngImport: i0, template: "@if (contentPage) {\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n}", styles: [""], dependencies: [{ kind: "component", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1391
1121
  }
1392
1122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentComponent, decorators: [{
1393
1123
  type: Component,
1394
- args: [{ selector: 'fs-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>" }]
1395
- }], ctorParameters: () => [{ type: undefined, decorators: [{
1396
- type: Inject,
1397
- args: [FS_CONTENT_CONFIG]
1398
- }] }, { type: i1$1.Title }, { type: i0.ChangeDetectorRef }, { type: i2$2.Router }, { type: i0.ElementRef }, { type: i3$2.HtmlRenderer }] });
1399
-
1400
- class FsContentModule {
1401
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1402
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentModule, declarations: [FsContentComponent,
1403
- ContentRendererComponent], imports: [CommonModule,
1404
- FsHtmlEditorModule], exports: [FsContentComponent] });
1405
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentModule, imports: [CommonModule,
1406
- FsHtmlEditorModule] });
1407
- }
1408
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentModule, decorators: [{
1409
- type: NgModule,
1410
- args: [{
1411
- imports: [
1412
- CommonModule,
1413
- FsHtmlEditorModule,
1414
- ],
1415
- exports: [
1416
- FsContentComponent,
1417
- ],
1418
- declarations: [
1419
- FsContentComponent,
1420
- ContentRendererComponent,
1421
- ],
1422
- }]
1124
+ args: [{ selector: 'fs-content', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ContentRendererComponent], template: "@if (contentPage) {\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n}" }]
1423
1125
  }] });
1424
1126
 
1425
1127
  /**
1426
1128
  * Generated bundle index. Do not edit.
1427
1129
  */
1428
1130
 
1429
- export { ContentStyleComponent, FS_CONTENT_CONFIG, FsContentComponent, FsContentLayoutsComponent, FsContentLayoutsModule, FsContentModule, FsContentPagesComponent, FsContentPagesModule, FsContentStyleModule };
1131
+ export { ContentStyleComponent, FS_CONTENT_CONFIG, FsContentComponent, FsContentLayoutsComponent, FsContentPagesComponent, FsContentPagesModule };
1430
1132
  //# sourceMappingURL=firestitch-content.mjs.map