@firestitch/content 12.1.0 → 12.2.0
Sign up to get free protection for your applications and to get access to all the features.
- package/app/interfaces/content-config.d.ts +3 -3
- package/app/modules/content-pages/components/content-page/content-page.component.d.ts +1 -1
- package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +2 -3
- package/app/modules/editor/components/editor/editor.component.d.ts +22 -7
- package/bundles/firestitch-content.umd.js +279 -210
- package/bundles/firestitch-content.umd.js.map +1 -1
- package/esm2015/app/interfaces/content-config.js +1 -1
- package/esm2015/app/modules/content-pages/components/content-page/content-page.component.js +5 -4
- package/esm2015/app/modules/content-pages/components/content-pages/content-pages.component.js +25 -28
- package/esm2015/app/modules/editor/components/editor/editor.component.js +97 -27
- package/fesm2015/firestitch-content.js +196 -129
- package/fesm2015/firestitch-content.js.map +1 -1
- package/package.json +1 -1
@@ -1,84 +1,220 @@
|
|
1
1
|
import * as i10 from '@angular/common';
|
2
2
|
import { CommonModule } from '@angular/common';
|
3
3
|
import * as i0 from '@angular/core';
|
4
|
-
import { Component, ChangeDetectionStrategy, Inject, ViewChildren,
|
4
|
+
import { InjectionToken, Component, ChangeDetectionStrategy, Inject, ViewChildren, ElementRef, ViewChild, NgModule, Input } from '@angular/core';
|
5
5
|
import * as i9 from '@angular/forms';
|
6
6
|
import { FormsModule } from '@angular/forms';
|
7
|
+
import * as i4$1 from '@angular/material/button';
|
7
8
|
import { MatButtonModule } from '@angular/material/button';
|
8
|
-
import * as
|
9
|
+
import * as i9$1 from '@angular/material/button-toggle';
|
9
10
|
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
10
11
|
import * as i1 from '@angular/material/dialog';
|
11
12
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
12
|
-
import * as i4
|
13
|
+
import * as i4 from '@angular/material/form-field';
|
13
14
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
14
|
-
import * as
|
15
|
+
import * as i5$1 from '@angular/material/icon';
|
15
16
|
import { MatIconModule } from '@angular/material/icon';
|
16
17
|
import * as i11 from '@angular/material/input';
|
17
18
|
import { MatInputModule } from '@angular/material/input';
|
18
|
-
import * as i5
|
19
|
+
import * as i5 from '@angular/material/select';
|
19
20
|
import { MatSelectModule } from '@angular/material/select';
|
20
21
|
import { MatTabsModule } from '@angular/material/tabs';
|
21
|
-
import * as
|
22
|
+
import * as i3$1 from '@firestitch/date';
|
22
23
|
import { FsDateModule } from '@firestitch/date';
|
23
24
|
import * as i3 from '@firestitch/dialog';
|
24
25
|
import { FsDialogModule } from '@firestitch/dialog';
|
25
26
|
import * as i7 from '@firestitch/form';
|
26
27
|
import { FsFormModule } from '@firestitch/form';
|
27
28
|
import { FsHtmlEditorModule } from '@firestitch/html-editor';
|
28
|
-
import * as
|
29
|
+
import * as i6$1 from '@firestitch/label';
|
29
30
|
import { FsLabelModule } from '@firestitch/label';
|
30
31
|
import * as i2$1 from '@firestitch/list';
|
31
32
|
import { FsListModule, FsListComponent } from '@firestitch/list';
|
32
33
|
import * as i8 from '@firestitch/skeleton';
|
33
34
|
import { FsSkeletonModule } from '@firestitch/skeleton';
|
34
|
-
import * as
|
35
|
+
import * as i7$1 from '@firestitch/text-editor';
|
35
36
|
import { FsTextEditorComponent, FsTextEditorModule } from '@firestitch/text-editor';
|
36
37
|
import * as i2 from '@firestitch/message';
|
37
|
-
import { Subject, of } from 'rxjs';
|
38
|
-
import { tap, switchMap, takeUntil, filter, map } from 'rxjs/operators';
|
39
|
-
import * as i6
|
40
|
-
import { ItemType } from '@firestitch/filter';
|
38
|
+
import { Subject, of, fromEvent } from 'rxjs';
|
39
|
+
import { tap, switchMap, takeUntil, finalize, take, filter, map } from 'rxjs/operators';
|
40
|
+
import * as i6 from '@angular/material/core';
|
41
41
|
import { index } from '@firestitch/common';
|
42
|
+
import { ItemType } from '@firestitch/filter';
|
42
43
|
import * as i1$1 from '@angular/platform-browser';
|
43
44
|
import * as i2$2 from '@angular/router';
|
44
45
|
import { NavigationEnd } from '@angular/router';
|
45
46
|
|
47
|
+
var PageType;
|
48
|
+
(function (PageType) {
|
49
|
+
PageType["StandardPage"] = "standardPage";
|
50
|
+
PageType["BlogPost"] = "blogPost";
|
51
|
+
PageType["HomePage"] = "homePage";
|
52
|
+
PageType["NotFoundPage"] = "notFoundPage";
|
53
|
+
})(PageType || (PageType = {}));
|
54
|
+
|
55
|
+
const PageTypes = [
|
56
|
+
{ name: 'Standard Page', value: PageType.StandardPage },
|
57
|
+
{ name: 'Home Page', value: PageType.HomePage },
|
58
|
+
{ name: 'Not Found Page', value: PageType.NotFoundPage },
|
59
|
+
{ name: 'Blog Post', value: PageType.BlogPost },
|
60
|
+
];
|
61
|
+
|
62
|
+
const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
|
63
|
+
|
64
|
+
class ContentPageComponent {
|
65
|
+
constructor(_config, _data, _dialogRef, _message, _cdRef) {
|
66
|
+
this._config = _config;
|
67
|
+
this._data = _data;
|
68
|
+
this._dialogRef = _dialogRef;
|
69
|
+
this._message = _message;
|
70
|
+
this._cdRef = _cdRef;
|
71
|
+
this.contentPage = null;
|
72
|
+
this.PageTypes = PageTypes;
|
73
|
+
this.editors = { content: true, styles: true };
|
74
|
+
this._destroy$ = new Subject();
|
75
|
+
this.save = () => {
|
76
|
+
return this._config.saveContentPage(this.contentPage)
|
77
|
+
.pipe(tap((contentPage) => {
|
78
|
+
this._message.success('Saved Changes');
|
79
|
+
this._dialogRef.close(contentPage);
|
80
|
+
}));
|
81
|
+
};
|
82
|
+
}
|
83
|
+
ngOnInit() {
|
84
|
+
this._dialogRef.updateSize('600px');
|
85
|
+
this._fetchData();
|
86
|
+
}
|
87
|
+
ngOnDestroy() {
|
88
|
+
this._destroy$.next();
|
89
|
+
this._destroy$.complete();
|
90
|
+
}
|
91
|
+
_fetchData() {
|
92
|
+
this._config.loadContentLayouts()
|
93
|
+
.subscribe((contentLayouts) => {
|
94
|
+
this.contentLayouts = contentLayouts;
|
95
|
+
this._cdRef.markForCheck();
|
96
|
+
});
|
97
|
+
of(this._data.contentPage)
|
98
|
+
.pipe(switchMap((contentPage) => {
|
99
|
+
return of(contentPage);
|
100
|
+
}), takeUntil(this._destroy$))
|
101
|
+
.subscribe((contentPage) => {
|
102
|
+
this.contentPage = Object.assign({}, contentPage);
|
103
|
+
this._cdRef.markForCheck();
|
104
|
+
});
|
105
|
+
}
|
106
|
+
}
|
107
|
+
ContentPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentPageComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
108
|
+
ContentPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required\n placeholder=\"Type\">\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>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required\n placeholder=\"Name\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n placeholder=\"Path\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\"\n placeholder=\"Title\">\n </mat-form-field>\n <mat-form-field *ngIf=\"contentLayouts\">\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\"\n placeholder=\"Layout\">\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 </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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.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"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
109
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentPageComponent, decorators: [{
|
110
|
+
type: Component,
|
111
|
+
args: [{
|
112
|
+
templateUrl: './content-page.component.html',
|
113
|
+
styleUrls: ['./content-page.component.scss'],
|
114
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
115
|
+
}]
|
116
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
117
|
+
type: Inject,
|
118
|
+
args: [FS_CONTENT_CONFIG]
|
119
|
+
}] }, { type: undefined, decorators: [{
|
120
|
+
type: Inject,
|
121
|
+
args: [MAT_DIALOG_DATA]
|
122
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { textEditors: [{
|
123
|
+
type: ViewChildren,
|
124
|
+
args: [FsTextEditorComponent]
|
125
|
+
}] } });
|
126
|
+
|
46
127
|
class EditorComponent {
|
47
|
-
constructor(_data, _dialogRef, _message) {
|
128
|
+
constructor(_data, _dialogRef, _dialog, _message, _cdRef) {
|
48
129
|
this._data = _data;
|
49
130
|
this._dialogRef = _dialogRef;
|
131
|
+
this._dialog = _dialog;
|
50
132
|
this._message = _message;
|
51
|
-
this.
|
52
|
-
this.
|
133
|
+
this._cdRef = _cdRef;
|
134
|
+
this.resizing = false;
|
53
135
|
this.editors = { content: true, styles: true };
|
54
136
|
this._destroy$ = new Subject();
|
55
137
|
this.save = () => {
|
56
|
-
return this.
|
138
|
+
return this._config.saveContentPage(this.contentPage)
|
57
139
|
.pipe(tap(() => {
|
58
140
|
this._message.success('Saved Changes');
|
59
141
|
}));
|
60
142
|
};
|
61
143
|
}
|
62
144
|
ngOnInit() {
|
63
|
-
this.
|
64
|
-
this.
|
65
|
-
this.
|
145
|
+
this.contentPage = this._data.contentPage;
|
146
|
+
this._config = this._data.config;
|
147
|
+
this._initSeparator();
|
66
148
|
}
|
67
149
|
editorToggleChange(event) {
|
68
150
|
this.editors[event.value] = !this.editors[event.value];
|
151
|
+
this.updateEditorLayouts();
|
152
|
+
}
|
153
|
+
updateEditorLayouts() {
|
69
154
|
setTimeout(() => {
|
70
|
-
this.
|
71
|
-
|
72
|
-
}
|
73
|
-
|
155
|
+
if (this.editors.content) {
|
156
|
+
this.contentEditor.updateLayout();
|
157
|
+
}
|
158
|
+
if (this.editors.styles) {
|
159
|
+
this.styleEditor.updateLayout();
|
160
|
+
}
|
161
|
+
});
|
74
162
|
}
|
75
163
|
ngOnDestroy() {
|
76
164
|
this._destroy$.next();
|
77
165
|
this._destroy$.complete();
|
78
166
|
}
|
167
|
+
openSettings() {
|
168
|
+
this._dialog.open(ContentPageComponent, {
|
169
|
+
data: {
|
170
|
+
contentPage: this.contentPage,
|
171
|
+
},
|
172
|
+
})
|
173
|
+
.afterClosed()
|
174
|
+
.pipe(takeUntil(this._destroy$))
|
175
|
+
.subscribe((contentPage) => {
|
176
|
+
this.contentPage = Object.assign(Object.assign({}, this.contentPage), contentPage);
|
177
|
+
this._cdRef.markForCheck();
|
178
|
+
});
|
179
|
+
}
|
180
|
+
_initSeparator() {
|
181
|
+
fromEvent(this.separator.nativeElement, 'mousedown')
|
182
|
+
.pipe(takeUntil(this._destroy$))
|
183
|
+
.subscribe((e) => {
|
184
|
+
this._moveSeparator(e);
|
185
|
+
});
|
186
|
+
}
|
187
|
+
_moveSeparator(separatorEvent) {
|
188
|
+
let mouseDown = {
|
189
|
+
clientX: separatorEvent.clientX,
|
190
|
+
clientY: separatorEvent.clientY,
|
191
|
+
offsetLeft: Number(this.separator.nativeElement.offsetLeft),
|
192
|
+
offsetTop: Number(this.separator.nativeElement.offsetTop),
|
193
|
+
firstWidth: Number(this.contentContainer.nativeElement.offsetWidth),
|
194
|
+
secondWidth: Number(this.styleContainer.nativeElement.offsetWidth),
|
195
|
+
};
|
196
|
+
this.resizing = true;
|
197
|
+
this._cdRef.markForCheck();
|
198
|
+
fromEvent(document, 'mousemove')
|
199
|
+
.pipe(finalize(() => {
|
200
|
+
mouseDown = null;
|
201
|
+
this.resizing = false;
|
202
|
+
this._cdRef.markForCheck();
|
203
|
+
this.updateEditorLayouts();
|
204
|
+
}), takeUntil(fromEvent(this.separator.nativeElement, 'mouseup')
|
205
|
+
.pipe(take(1), takeUntil(this._destroy$))), takeUntil(this._destroy$))
|
206
|
+
.subscribe((e) => {
|
207
|
+
const delta = { x: e.clientX - mouseDown.clientX,
|
208
|
+
y: e.clientY - mouseDown.clientY };
|
209
|
+
delta.x = Math.min(Math.max(delta.x, -mouseDown.firstWidth), mouseDown.secondWidth);
|
210
|
+
this.separator.nativeElement.style.left = `${mouseDown.offsetLeft + delta.x}px`;
|
211
|
+
this.contentContainer.nativeElement.style.width = `${mouseDown.firstWidth + delta.x}px`;
|
212
|
+
this.styleContainer.nativeElement.style.width = `${mouseDown.secondWidth - delta.x}px`;
|
213
|
+
});
|
214
|
+
}
|
79
215
|
}
|
80
|
-
EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }], target: i0.ɵɵFactoryTarget.Component });
|
81
|
-
EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "
|
216
|
+
EditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i1.MatDialog }, { token: i2.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
217
|
+
EditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: EditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "styleEditor", first: true, predicate: ["styleEditor"], descendants: true }, { propertyName: "contentEditor", first: true, predicate: ["contentEditor"], descendants: true }, { propertyName: "separator", first: true, predicate: ["separator"], descendants: true, read: ElementRef, static: true }, { propertyName: "contentContainer", first: true, predicate: ["contentContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "styleContainer", first: true, predicate: ["styleContainer"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<form fsForm [submit]=\"save\">\n <fs-dialog>\n <h1 mat-dialog-title>\n <div class=\"title-container\">\n <div class=\"title\">\n Page\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 </div>\n </h1>\n <div mat-dialog-content>\n <div class=\"container\">\n <div class=\"editors\" [ngClass]=\"{ resizing: resizing, 'separator-enabled': editors.styles && editors.content }\">\n <div #contentContainer class=\"editor editor-content\" [ngClass]=\"{ 'content-enabled': editors.content }\">\n <fs-label>Content</fs-label>\n <div class=\"editor-container\">\n <fs-text-editor \n #contentEditor\n [(ngModel)]=\"contentPage.content\" \n name=\"content\"\n [config]=\"{ tabSize: 2, language: 'html' }\">\n </fs-text-editor> \n </div>\n </div>\n <div \n #separator\n class=\"separator\">\n </div>\n <div \n #styleContainer \n class=\"editor editor-styles\" \n [ngClass]=\"{ 'styles-enabled': editors.styles }\"\n [style.width]=\"'600px'\">\n <fs-label>Styles</fs-label>\n <div class=\"editor-container\">\n <fs-text-editor \n #styleEditor\n [(ngModel)]=\"contentPage.styles\" \n name=\"styles\"\n [config]=\"{ tabSize: 2, language: 'scss' }\">\n </fs-text-editor> \n </div>\n </div> \n </div>\n </div>\n </div>\n\n <div mat-dialog-actions>\n <fs-form-dialog-actions>\n </fs-form-dialog-actions>\n <div class=\"toggles\">\n <mat-button-toggle-group multiple>\n <mat-button-toggle value=\"content\" [checked]=\"editors.content\" (change)=\"editorToggleChange($event)\">Content</mat-button-toggle>\n <mat-button-toggle value=\"styles\" [checked]=\"editors.styles\" (change)=\"editorToggleChange($event)\">Styles</mat-button-toggle>\n </mat-button-toggle-group> \n </div>\n </div>\n </fs-dialog>\n</form>\n\n", styles: ["form{display:block;height:100%}form fs-dialog{display:flex;flex-direction:column;height:100%}form ::ng-deep .mat-dialog-content{max-height:none;flex:1}.toggles{display:flex;justify-content:flex-end;justify-self:baseline;flex:1}.container{height:100%;display:flex;flex-direction:column}.editors{width:5000px;max-width:100%;height:100%;display:flex;min-height:0}.editors:not(.separator-enabled) .separator{display:none}.editors:not(.separator-enabled) .editor{width:100%!important}.editors .separator{cursor:col-resize;background-color:#fff;background-image:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='30'><path d='M2 0 v30 M5 0 v30 M8 0 v30' fill='none' stroke='black'/></svg>\");background-repeat:no-repeat;background-position:center;width:40px;height:100%;-webkit-user-select:none;user-select:none;flex-shrink:0}.editors .editor{height:100%;display:flex;min-width:0;width:100%;flex-direction:column}.editors .editor.editor-styles:not(.styles-enabled),.editors .editor.editor-content:not(.content-enabled){display:none}.editors .editor .editor-container{height:100%;overflow:hidden;background:#1E1E1E;border-radius:5px}.editors .editor .editor-container fs-text-editor{display:block}.editors .editor+.editor{margin-left:20px}.editors .editor fs-label{background-color:#fff;padding-bottom:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}\n"], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4$1.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i6$1.FsLabelComponent, selector: "fs-label" }, { type: i7$1.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i7.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }, { type: i9$1.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-labelledby", "tabIndex", "appearance", "checked", "disabled", "id", "name", "aria-label", "value"], outputs: ["change"], exportAs: ["matButtonToggle"] }], directives: [{ type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.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"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i9$1.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
82
218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: EditorComponent, decorators: [{
|
83
219
|
type: Component,
|
84
220
|
args: [{
|
@@ -89,9 +225,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
89
225
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
90
226
|
type: Inject,
|
91
227
|
args: [MAT_DIALOG_DATA]
|
92
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }]; }, propDecorators: {
|
93
|
-
type:
|
94
|
-
args: [
|
228
|
+
}] }, { type: i1.MatDialogRef }, { type: i1.MatDialog }, { type: i2.FsMessage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { styleEditor: [{
|
229
|
+
type: ViewChild,
|
230
|
+
args: ['styleEditor']
|
231
|
+
}], contentEditor: [{
|
232
|
+
type: ViewChild,
|
233
|
+
args: ['contentEditor']
|
234
|
+
}], separator: [{
|
235
|
+
type: ViewChild,
|
236
|
+
args: ['separator', { static: true, read: ElementRef }]
|
237
|
+
}], contentContainer: [{
|
238
|
+
type: ViewChild,
|
239
|
+
args: ['contentContainer', { static: true, read: ElementRef }]
|
240
|
+
}], styleContainer: [{
|
241
|
+
type: ViewChild,
|
242
|
+
args: ['styleContainer', { static: true, read: ElementRef }]
|
95
243
|
}] } });
|
96
244
|
|
97
245
|
class FsContentEditorModule {
|
@@ -152,85 +300,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
152
300
|
}]
|
153
301
|
}] });
|
154
302
|
|
155
|
-
var PageType;
|
156
|
-
(function (PageType) {
|
157
|
-
PageType["StandardPage"] = "standardPage";
|
158
|
-
PageType["BlogPost"] = "blogPost";
|
159
|
-
PageType["HomePage"] = "homePage";
|
160
|
-
PageType["NotFoundPage"] = "notFoundPage";
|
161
|
-
})(PageType || (PageType = {}));
|
162
|
-
|
163
|
-
const PageTypes = [
|
164
|
-
{ name: 'Standard Page', value: PageType.StandardPage },
|
165
|
-
{ name: 'Home Page', value: PageType.HomePage },
|
166
|
-
{ name: 'Not Found Page', value: PageType.NotFoundPage },
|
167
|
-
{ name: 'Blog Post', value: PageType.BlogPost },
|
168
|
-
];
|
169
|
-
|
170
|
-
const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
|
171
|
-
|
172
|
-
class ContentPageComponent {
|
173
|
-
constructor(_config, _data, _dialogRef, _message, _cdRef) {
|
174
|
-
this._config = _config;
|
175
|
-
this._data = _data;
|
176
|
-
this._dialogRef = _dialogRef;
|
177
|
-
this._message = _message;
|
178
|
-
this._cdRef = _cdRef;
|
179
|
-
this.contentPage = null;
|
180
|
-
this.PageTypes = PageTypes;
|
181
|
-
this.editors = { content: true, styles: true };
|
182
|
-
this._destroy$ = new Subject();
|
183
|
-
this.save = () => {
|
184
|
-
return this._config.saveContentPage(this.contentPage)
|
185
|
-
.pipe(tap((contentPage) => {
|
186
|
-
this._message.success('Saved Changes');
|
187
|
-
this._dialogRef.close(contentPage);
|
188
|
-
}));
|
189
|
-
};
|
190
|
-
}
|
191
|
-
ngOnInit() {
|
192
|
-
this._fetchData();
|
193
|
-
}
|
194
|
-
ngOnDestroy() {
|
195
|
-
this._destroy$.next();
|
196
|
-
this._destroy$.complete();
|
197
|
-
}
|
198
|
-
_fetchData() {
|
199
|
-
this._config.loadContentLayouts()
|
200
|
-
.subscribe((contentLayouts) => {
|
201
|
-
this.contentLayouts = contentLayouts;
|
202
|
-
this._cdRef.markForCheck();
|
203
|
-
});
|
204
|
-
of(this._data.contentPage)
|
205
|
-
.pipe(switchMap((contentPage) => {
|
206
|
-
return of(contentPage);
|
207
|
-
}), takeUntil(this._destroy$))
|
208
|
-
.subscribe((contentPage) => {
|
209
|
-
this.contentPage = Object.assign({}, contentPage);
|
210
|
-
this._cdRef.markForCheck();
|
211
|
-
});
|
212
|
-
}
|
213
|
-
}
|
214
|
-
ContentPageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentPageComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
215
|
-
ContentPageComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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-select\n [(ngModel)]=\"contentPage.type\"\n name=\"type\"\n required\n placeholder=\"Type\">\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>\n <input\n matInput\n [(ngModel)]=\"contentPage.name\"\n name=\"name\"\n required\n placeholder=\"Name\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentPage.path\"\n name=\"path\"\n placeholder=\"Path\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentPage.title\"\n name=\"title\"\n placeholder=\"Title\">\n </mat-form-field>\n <mat-form-field *ngIf=\"contentLayouts\">\n <mat-select\n [(ngModel)]=\"contentPage.contentLayoutId\"\n required\n name=\"contentLayoutId\"\n placeholder=\"Layout\">\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 </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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i7.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.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"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
216
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentPageComponent, decorators: [{
|
217
|
-
type: Component,
|
218
|
-
args: [{
|
219
|
-
templateUrl: './content-page.component.html',
|
220
|
-
styleUrls: ['./content-page.component.scss'],
|
221
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
222
|
-
}]
|
223
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
224
|
-
type: Inject,
|
225
|
-
args: [FS_CONTENT_CONFIG]
|
226
|
-
}] }, { type: undefined, decorators: [{
|
227
|
-
type: Inject,
|
228
|
-
args: [MAT_DIALOG_DATA]
|
229
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { textEditors: [{
|
230
|
-
type: ViewChildren,
|
231
|
-
args: [FsTextEditorComponent]
|
232
|
-
}] } });
|
233
|
-
|
234
303
|
class FsContentPagesComponent {
|
235
304
|
constructor(_config, _dialog) {
|
236
305
|
this._config = _config;
|
@@ -243,27 +312,15 @@ class FsContentPagesComponent {
|
|
243
312
|
}
|
244
313
|
openEditor(contentPage) {
|
245
314
|
this._dialog.open(EditorComponent, {
|
246
|
-
maxWidth: null,
|
247
|
-
maxHeight: null,
|
248
|
-
data: {
|
249
|
-
styles: contentPage.styles,
|
250
|
-
content: contentPage.content,
|
251
|
-
save: (data) => {
|
252
|
-
return this._config.saveContentPage(Object.assign({ id: contentPage.id }, data));
|
253
|
-
},
|
254
|
-
},
|
255
|
-
})
|
256
|
-
.afterClosed()
|
257
|
-
.pipe(takeUntil(this._destroy$))
|
258
|
-
.subscribe(() => {
|
259
|
-
this.listComponent.reload();
|
260
|
-
});
|
261
|
-
}
|
262
|
-
openPage(contentPage) {
|
263
|
-
this._dialog.open(ContentPageComponent, {
|
264
315
|
data: {
|
265
316
|
contentPage,
|
317
|
+
config: this._config,
|
266
318
|
},
|
319
|
+
maxWidth: '100vw',
|
320
|
+
maxHeight: '100vw',
|
321
|
+
width: '100%',
|
322
|
+
height: '100%',
|
323
|
+
autoFocus: false,
|
267
324
|
})
|
268
325
|
.afterClosed()
|
269
326
|
.pipe(filter((_contentPage) => !!_contentPage), takeUntil(this._destroy$))
|
@@ -288,7 +345,17 @@ class FsContentPagesComponent {
|
|
288
345
|
{
|
289
346
|
label: 'Create',
|
290
347
|
click: () => {
|
291
|
-
this.
|
348
|
+
this._dialog.open(ContentPageComponent, {
|
349
|
+
data: {
|
350
|
+
contentPage: {},
|
351
|
+
},
|
352
|
+
})
|
353
|
+
.afterClosed()
|
354
|
+
.pipe(filter((contentPage) => !!contentPage), takeUntil(this._destroy$))
|
355
|
+
.subscribe((contentPage) => {
|
356
|
+
this.openEditor(contentPage);
|
357
|
+
this.listComponent.reload();
|
358
|
+
});
|
292
359
|
},
|
293
360
|
},
|
294
361
|
],
|
@@ -324,7 +391,7 @@ class FsContentPagesComponent {
|
|
324
391
|
}
|
325
392
|
}
|
326
393
|
FsContentPagesComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentPagesComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
327
|
-
FsContentPagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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=\"
|
394
|
+
FsContentPagesComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 (click)=\"openEditor(row)\">{{row.name}}</a>\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 [href]=\"'/' + row.path\" target=\"_black\">/{{row.path}}</a>\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(black),to(rgba(0,0,0,0)))}\n"], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3$1.FsDatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
328
395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentPagesComponent, decorators: [{
|
329
396
|
type: Component,
|
330
397
|
args: [{
|
@@ -463,7 +530,7 @@ class ContentLayoutComponent {
|
|
463
530
|
}
|
464
531
|
}
|
465
532
|
ContentLayoutComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentLayoutComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
466
|
-
ContentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required\n placeholder=\"Name\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\"\n placeholder=\"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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4
|
533
|
+
ContentLayoutComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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 <input\n matInput\n [(ngModel)]=\"contentLayout.name\"\n name=\"name\"\n required\n placeholder=\"Name\">\n </mat-form-field>\n <mat-form-field>\n <input\n matInput\n [(ngModel)]=\"contentLayout.tag\"\n name=\"tag\"\n placeholder=\"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: [""], components: [{ type: i3.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i7.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"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i9.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i9.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i7.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
467
534
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: ContentLayoutComponent, decorators: [{
|
468
535
|
type: Component,
|
469
536
|
args: [{
|
@@ -575,7 +642,7 @@ class FsContentLayoutsComponent {
|
|
575
642
|
}
|
576
643
|
}
|
577
644
|
FsContentLayoutsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentLayoutsComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
578
|
-
FsContentLayoutsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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=\"design\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openEditor(row)\"><mat-icon>design_services</mat-icon></a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openLayout(row)\">{{row.name}}</a>\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: [""], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type:
|
645
|
+
FsContentLayoutsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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=\"design\" width=\"1%\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openEditor(row)\"><mat-icon>design_services</mat-icon></a>\n </ng-template>\n </fs-list-column>\n <fs-list-column name=\"name\" title=\"Name\" [sortable]=\"true\">\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"openLayout(row)\">{{row.name}}</a>\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: [""], components: [{ type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i5$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3$1.FsDatePipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
579
646
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentLayoutsComponent, decorators: [{
|
580
647
|
type: Component,
|
581
648
|
args: [{
|