@firestitch/content 13.0.3 → 13.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/app/consts/index.d.ts +1 -1
- package/app/consts/page-types.const.d.ts +5 -5
- package/app/enums/editor-type.d.ts +6 -6
- package/app/enums/index.d.ts +2 -2
- package/app/enums/page-type.enum.d.ts +6 -6
- package/app/injectors/content-config.injector.d.ts +2 -2
- package/app/injectors/index.d.ts +1 -1
- package/app/interfaces/content-config.d.ts +21 -21
- package/app/interfaces/content-layout.d.ts +10 -10
- package/app/interfaces/content-page.d.ts +14 -14
- package/app/interfaces/content-style.d.ts +4 -4
- package/app/interfaces/index.d.ts +4 -4
- package/app/modules/content/components/content/content.component.d.ts +25 -25
- package/app/modules/content/components/content/index.d.ts +1 -1
- package/app/modules/content/components/content-renderer/content-renderer.component.d.ts +24 -24
- package/app/modules/content/components/content-renderer/index.d.ts +1 -1
- package/app/modules/content/fs-content.module.d.ts +10 -10
- package/app/modules/content-layouts/components/content-layout/content-layout.component.d.ts +27 -27
- package/app/modules/content-layouts/components/content-layout/index.d.ts +1 -1
- package/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.d.ts +50 -50
- package/app/modules/content-layouts/components/content-layout-editor/index.d.ts +1 -1
- package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts +21 -21
- package/app/modules/content-layouts/components/content-layouts/index.d.ts +1 -1
- package/app/modules/content-layouts/components/index.d.ts +3 -3
- package/app/modules/content-layouts/fs-content-layouts.module.d.ts +28 -28
- package/app/modules/content-pages/components/content-page/content-page.component.d.ts +32 -32
- package/app/modules/content-pages/components/content-page/index.d.ts +1 -1
- package/app/modules/content-pages/components/content-page-editor/content-page-editor.component.d.ts +56 -56
- package/app/modules/content-pages/components/content-page-editor/index.d.ts +1 -1
- package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +24 -24
- package/app/modules/content-pages/components/content-pages/index.d.ts +1 -1
- package/app/modules/content-pages/components/index.d.ts +3 -3
- package/app/modules/content-pages/fs-content-pages.module.d.ts +33 -33
- package/app/modules/content-style/components/content-style/content-style.component.d.ts +27 -27
- package/app/modules/content-style/components/content-style/index.d.ts +1 -1
- package/app/modules/content-style/fs-content-style.module.d.ts +14 -14
- package/app/modules/editor/components/editor/editor.component.d.ts +49 -49
- package/app/modules/editor/components/editor/index.d.ts +1 -1
- package/app/modules/editor/components/editor-label/editor-label.component.d.ts +7 -7
- package/app/modules/editor/components/editor-label/index.d.ts +1 -1
- package/app/modules/editor/fs-content-editor.module.d.ts +24 -24
- package/app/modules/editor/index.d.ts +1 -1
- package/esm2020/app/consts/index.mjs +1 -1
- package/esm2020/app/consts/page-types.const.mjs +5 -5
- package/esm2020/app/enums/editor-type.mjs +7 -7
- package/esm2020/app/enums/index.mjs +3 -3
- package/esm2020/app/enums/page-type.enum.mjs +7 -7
- package/esm2020/app/injectors/content-config.injector.mjs +2 -2
- package/esm2020/app/injectors/index.mjs +1 -1
- package/esm2020/app/interfaces/content-config.mjs +1 -1
- package/esm2020/app/interfaces/content-layout.mjs +1 -1
- package/esm2020/app/interfaces/content-page.mjs +1 -1
- package/esm2020/app/interfaces/content-style.mjs +1 -1
- package/esm2020/app/interfaces/index.mjs +5 -5
- package/esm2020/app/modules/content/components/content/content.component.mjs +80 -80
- package/esm2020/app/modules/content/components/content/index.mjs +1 -1
- package/esm2020/app/modules/content/components/content-renderer/content-renderer.component.mjs +73 -73
- package/esm2020/app/modules/content/components/content-renderer/index.mjs +1 -1
- package/esm2020/app/modules/content/fs-content.module.mjs +32 -32
- package/esm2020/app/modules/content-layouts/components/content-layout/content-layout.component.mjs +67 -67
- package/esm2020/app/modules/content-layouts/components/content-layout/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.mjs +161 -161
- package/esm2020/app/modules/content-layouts/components/content-layout-editor/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/content-layouts/content-layouts.component.mjs +115 -115
- package/esm2020/app/modules/content-layouts/components/content-layouts/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/index.mjs +4 -4
- package/esm2020/app/modules/content-layouts/fs-content-layouts.module.mjs +103 -103
- package/esm2020/app/modules/content-pages/components/content-page/content-page.component.mjs +82 -81
- package/esm2020/app/modules/content-pages/components/content-page/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/content-page-editor/content-page-editor.component.mjs +178 -178
- package/esm2020/app/modules/content-pages/components/content-page-editor/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/content-pages/content-pages.component.mjs +129 -128
- package/esm2020/app/modules/content-pages/components/content-pages/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/index.mjs +4 -4
- package/esm2020/app/modules/content-pages/fs-content-pages.module.mjs +120 -120
- package/esm2020/app/modules/content-style/components/content-style/content-style.component.mjs +68 -68
- package/esm2020/app/modules/content-style/components/content-style/index.mjs +1 -1
- package/esm2020/app/modules/content-style/fs-content-style.module.mjs +49 -49
- package/esm2020/app/modules/editor/components/editor/editor.component.mjs +143 -143
- package/esm2020/app/modules/editor/components/editor/index.mjs +1 -1
- package/esm2020/app/modules/editor/components/editor-label/editor-label.component.mjs +15 -15
- package/esm2020/app/modules/editor/components/editor-label/index.mjs +1 -1
- package/esm2020/app/modules/editor/fs-content-editor.module.mjs +88 -88
- package/esm2020/app/modules/editor/index.mjs +1 -1
- package/esm2020/firestitch-content.mjs +4 -4
- package/esm2020/public_api.mjs +10 -10
- package/fesm2015/firestitch-content.mjs +1249 -1251
- package/fesm2015/firestitch-content.mjs.map +1 -1
- package/fesm2020/firestitch-content.mjs +1253 -1251
- package/fesm2020/firestitch-content.mjs.map +1 -1
- package/firestitch-content.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +10 -10
@@ -1,179 +1,179 @@
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, ViewChild, } from '@angular/core';
|
2
|
-
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
3
|
-
import { FsMessage } from '@firestitch/message';
|
4
|
-
import { FsPrompt } from '@firestitch/prompt';
|
5
|
-
import { Subject, fromEvent, of, throwError } from 'rxjs';
|
6
|
-
import { filter, finalize, switchMap, takeUntil, tap } from 'rxjs/operators';
|
7
|
-
import { EditorType } from '../../../../enums';
|
8
|
-
import { EditorComponent } from '../../../editor/components/editor';
|
9
|
-
import { ContentPageComponent } from '../content-page/content-page.component';
|
10
|
-
import * as i0 from "@angular/core";
|
11
|
-
import * as i1 from "@angular/material/dialog";
|
12
|
-
import * as i2 from "@firestitch/message";
|
13
|
-
import * as i3 from "@firestitch/prompt";
|
14
|
-
import * as i4 from "@firestitch/dialog";
|
15
|
-
import * as i5 from "@angular/material/button";
|
16
|
-
import * as i6 from "@angular/material/icon";
|
17
|
-
import * as i7 from "@angular/material/button-toggle";
|
18
|
-
import * as i8 from "../../../editor/components/editor/editor.component";
|
19
|
-
import * as i9 from "@angular/forms";
|
20
|
-
import * as i10 from "@firestitch/form";
|
21
|
-
import * as i11 from "@firestitch/skeleton";
|
22
|
-
import * as i12 from "@angular/material/tooltip";
|
23
|
-
import * as i13 from "@angular/router";
|
24
|
-
export class ContentPageEditorComponent {
|
25
|
-
constructor(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
|
26
|
-
this._data = _data;
|
27
|
-
this._dialogRef = _dialogRef;
|
28
|
-
this._message = _message;
|
29
|
-
this._dialog = _dialog;
|
30
|
-
this._cdRef = _cdRef;
|
31
|
-
this._prompt = _prompt;
|
32
|
-
this.focused = null;
|
33
|
-
this.resizing = false;
|
34
|
-
this.editors = {
|
35
|
-
[EditorType.Html]: true,
|
36
|
-
[EditorType.Scss]: true,
|
37
|
-
[EditorType.Js]: false,
|
38
|
-
[EditorType.GlobalScss]: false,
|
39
|
-
};
|
40
|
-
this._destroy$ = new Subject();
|
41
|
-
this.submit = () => {
|
42
|
-
this.submitting = true;
|
43
|
-
return of(null)
|
44
|
-
.pipe(filter(() => this.focused), switchMap(() => {
|
45
|
-
switch (this.focused) {
|
46
|
-
case EditorType.Js:
|
47
|
-
case EditorType.Html:
|
48
|
-
case EditorType.Scss:
|
49
|
-
return this.saveContentPage();
|
50
|
-
case EditorType.GlobalScss:
|
51
|
-
return this.editor.saveGlobalScss();
|
52
|
-
}
|
53
|
-
return throwError('Invalid focus');
|
54
|
-
}), tap(() => {
|
55
|
-
this.editor.clearChange(this.focused);
|
56
|
-
this._cdRef.markForCheck();
|
57
|
-
}), finalize(() => {
|
58
|
-
this.submitting = false;
|
59
|
-
this._cdRef.markForCheck();
|
60
|
-
}))
|
61
|
-
.pipe(takeUntil(this._destroy$));
|
62
|
-
};
|
63
|
-
}
|
64
|
-
get isMac() {
|
65
|
-
return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
66
|
-
}
|
67
|
-
ngOnInit() {
|
68
|
-
this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
|
69
|
-
this._dialogRef.disableClose = true;
|
70
|
-
this.config = this._data.contentConfig;
|
71
|
-
this._initContentPage(this._data.contentPage);
|
72
|
-
this._initEscape();
|
73
|
-
}
|
74
|
-
editorToggleChange(event) {
|
75
|
-
this.editors[event.value] = !this.editors[event.value];
|
76
|
-
}
|
77
|
-
ngOnDestroy() {
|
78
|
-
this._destroy$.next();
|
79
|
-
this._destroy$.complete();
|
80
|
-
}
|
81
|
-
_initContentPage(contentPage) {
|
82
|
-
this.config.loadContentPage(contentPage.id)
|
83
|
-
.subscribe((data) => {
|
84
|
-
this.contentPage = data;
|
85
|
-
this._cdRef.markForCheck();
|
86
|
-
});
|
87
|
-
}
|
88
|
-
editorFocused(type) {
|
89
|
-
this.focused = type;
|
90
|
-
}
|
91
|
-
save() {
|
92
|
-
this.submit()
|
93
|
-
.subscribe();
|
94
|
-
}
|
95
|
-
saveContentPage() {
|
96
|
-
const names = {
|
97
|
-
[EditorType.Js]: 'js',
|
98
|
-
[EditorType.Scss]: 'styles',
|
99
|
-
[EditorType.Html]: 'content',
|
100
|
-
};
|
101
|
-
const data = {
|
102
|
-
id: this.contentPage.id,
|
103
|
-
[names[this.focused]]: this.editor.changes[this.focused],
|
104
|
-
};
|
105
|
-
return this.config.saveContentPage({
|
106
|
-
id: this.contentPage.id,
|
107
|
-
...data,
|
108
|
-
})
|
109
|
-
.pipe(tap(() => {
|
110
|
-
this._message.success('Saved Changes');
|
111
|
-
}));
|
112
|
-
}
|
113
|
-
close() {
|
114
|
-
if (!this.editor.hasChanges) {
|
115
|
-
return this._dialogRef.close();
|
116
|
-
}
|
117
|
-
this._prompt.confirm({
|
118
|
-
dialogConfig: {
|
119
|
-
width: null,
|
120
|
-
},
|
121
|
-
title: 'You have unsaved changes',
|
122
|
-
template: 'What would you like to do with your changes?',
|
123
|
-
buttons: [
|
124
|
-
{
|
125
|
-
label: 'Review Changes',
|
126
|
-
value: 'review',
|
127
|
-
},
|
128
|
-
{
|
129
|
-
label: 'Discard Changes',
|
130
|
-
value: 'discard',
|
131
|
-
},
|
132
|
-
],
|
133
|
-
})
|
134
|
-
.pipe(takeUntil(this._destroy$))
|
135
|
-
.subscribe((value) => {
|
136
|
-
if (value === 'discard') {
|
137
|
-
this._dialogRef.close();
|
138
|
-
}
|
139
|
-
});
|
140
|
-
}
|
141
|
-
openSettings() {
|
142
|
-
this._dialog.open(ContentPageComponent, {
|
143
|
-
data: {
|
144
|
-
contentPage: this.contentPage,
|
145
|
-
},
|
146
|
-
})
|
147
|
-
.afterClosed()
|
148
|
-
.pipe(takeUntil(this._destroy$))
|
149
|
-
.subscribe((contentPage) => {
|
150
|
-
this.contentPage = {
|
151
|
-
...this.contentPage,
|
152
|
-
...contentPage,
|
153
|
-
};
|
154
|
-
this._cdRef.markForCheck();
|
155
|
-
});
|
156
|
-
}
|
157
|
-
_initEscape() {
|
158
|
-
fromEvent(document, 'keydown')
|
159
|
-
.pipe(filter((event) => event.code === 'Escape'), takeUntil(this._destroy$)).subscribe(() => {
|
160
|
-
const dialogRef = this._dialog.openDialogs.reverse()[0];
|
161
|
-
if (dialogRef?.componentInstance === this) {
|
162
|
-
this.close();
|
163
|
-
}
|
164
|
-
});
|
165
|
-
}
|
166
|
-
}
|
167
|
-
ContentPageEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentPageEditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }, { token: i3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
168
|
-
ContentPageEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ContentPageEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" [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 .mat-stroked-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i5.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: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], 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: i10.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"] }, { type: i11.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { type: i10.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i13.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
169
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentPageEditorComponent, decorators: [{
|
170
|
-
type: Component,
|
171
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\" [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 .mat-stroked-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
|
172
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
173
|
-
type: Inject,
|
174
|
-
args: [MAT_DIALOG_DATA]
|
175
|
-
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i3.FsPrompt }]; }, propDecorators: { editor: [{
|
176
|
-
type: ViewChild,
|
177
|
-
args: [EditorComponent]
|
178
|
-
}] } });
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Inject, ViewChild, } from '@angular/core';
|
2
|
+
import { MAT_DIALOG_DATA, MatDialog, MatDialogRef } from '@angular/material/dialog';
|
3
|
+
import { FsMessage } from '@firestitch/message';
|
4
|
+
import { FsPrompt } from '@firestitch/prompt';
|
5
|
+
import { Subject, fromEvent, of, throwError } from 'rxjs';
|
6
|
+
import { filter, finalize, switchMap, takeUntil, tap } from 'rxjs/operators';
|
7
|
+
import { EditorType } from '../../../../enums';
|
8
|
+
import { EditorComponent } from '../../../editor/components/editor';
|
9
|
+
import { ContentPageComponent } from '../content-page/content-page.component';
|
10
|
+
import * as i0 from "@angular/core";
|
11
|
+
import * as i1 from "@angular/material/dialog";
|
12
|
+
import * as i2 from "@firestitch/message";
|
13
|
+
import * as i3 from "@firestitch/prompt";
|
14
|
+
import * as i4 from "@firestitch/dialog";
|
15
|
+
import * as i5 from "@angular/material/button";
|
16
|
+
import * as i6 from "@angular/material/icon";
|
17
|
+
import * as i7 from "@angular/material/button-toggle";
|
18
|
+
import * as i8 from "../../../editor/components/editor/editor.component";
|
19
|
+
import * as i9 from "@angular/forms";
|
20
|
+
import * as i10 from "@firestitch/form";
|
21
|
+
import * as i11 from "@firestitch/skeleton";
|
22
|
+
import * as i12 from "@angular/material/tooltip";
|
23
|
+
import * as i13 from "@angular/router";
|
24
|
+
export class ContentPageEditorComponent {
|
25
|
+
constructor(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
|
26
|
+
this._data = _data;
|
27
|
+
this._dialogRef = _dialogRef;
|
28
|
+
this._message = _message;
|
29
|
+
this._dialog = _dialog;
|
30
|
+
this._cdRef = _cdRef;
|
31
|
+
this._prompt = _prompt;
|
32
|
+
this.focused = null;
|
33
|
+
this.resizing = false;
|
34
|
+
this.editors = {
|
35
|
+
[EditorType.Html]: true,
|
36
|
+
[EditorType.Scss]: true,
|
37
|
+
[EditorType.Js]: false,
|
38
|
+
[EditorType.GlobalScss]: false,
|
39
|
+
};
|
40
|
+
this._destroy$ = new Subject();
|
41
|
+
this.submit = () => {
|
42
|
+
this.submitting = true;
|
43
|
+
return of(null)
|
44
|
+
.pipe(filter(() => this.focused), switchMap(() => {
|
45
|
+
switch (this.focused) {
|
46
|
+
case EditorType.Js:
|
47
|
+
case EditorType.Html:
|
48
|
+
case EditorType.Scss:
|
49
|
+
return this.saveContentPage();
|
50
|
+
case EditorType.GlobalScss:
|
51
|
+
return this.editor.saveGlobalScss();
|
52
|
+
}
|
53
|
+
return throwError('Invalid focus');
|
54
|
+
}), tap(() => {
|
55
|
+
this.editor.clearChange(this.focused);
|
56
|
+
this._cdRef.markForCheck();
|
57
|
+
}), finalize(() => {
|
58
|
+
this.submitting = false;
|
59
|
+
this._cdRef.markForCheck();
|
60
|
+
}))
|
61
|
+
.pipe(takeUntil(this._destroy$));
|
62
|
+
};
|
63
|
+
}
|
64
|
+
get isMac() {
|
65
|
+
return navigator.platform.toUpperCase().indexOf('MAC') >= 0;
|
66
|
+
}
|
67
|
+
ngOnInit() {
|
68
|
+
this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
|
69
|
+
this._dialogRef.disableClose = true;
|
70
|
+
this.config = this._data.contentConfig;
|
71
|
+
this._initContentPage(this._data.contentPage);
|
72
|
+
this._initEscape();
|
73
|
+
}
|
74
|
+
editorToggleChange(event) {
|
75
|
+
this.editors[event.value] = !this.editors[event.value];
|
76
|
+
}
|
77
|
+
ngOnDestroy() {
|
78
|
+
this._destroy$.next();
|
79
|
+
this._destroy$.complete();
|
80
|
+
}
|
81
|
+
_initContentPage(contentPage) {
|
82
|
+
this.config.loadContentPage(contentPage.id)
|
83
|
+
.subscribe((data) => {
|
84
|
+
this.contentPage = data;
|
85
|
+
this._cdRef.markForCheck();
|
86
|
+
});
|
87
|
+
}
|
88
|
+
editorFocused(type) {
|
89
|
+
this.focused = type;
|
90
|
+
}
|
91
|
+
save() {
|
92
|
+
this.submit()
|
93
|
+
.subscribe();
|
94
|
+
}
|
95
|
+
saveContentPage() {
|
96
|
+
const names = {
|
97
|
+
[EditorType.Js]: 'js',
|
98
|
+
[EditorType.Scss]: 'styles',
|
99
|
+
[EditorType.Html]: 'content',
|
100
|
+
};
|
101
|
+
const data = {
|
102
|
+
id: this.contentPage.id,
|
103
|
+
[names[this.focused]]: this.editor.changes[this.focused],
|
104
|
+
};
|
105
|
+
return this.config.saveContentPage({
|
106
|
+
id: this.contentPage.id,
|
107
|
+
...data,
|
108
|
+
})
|
109
|
+
.pipe(tap(() => {
|
110
|
+
this._message.success('Saved Changes');
|
111
|
+
}));
|
112
|
+
}
|
113
|
+
close() {
|
114
|
+
if (!this.editor.hasChanges) {
|
115
|
+
return this._dialogRef.close();
|
116
|
+
}
|
117
|
+
this._prompt.confirm({
|
118
|
+
dialogConfig: {
|
119
|
+
width: null,
|
120
|
+
},
|
121
|
+
title: 'You have unsaved changes',
|
122
|
+
template: 'What would you like to do with your changes?',
|
123
|
+
buttons: [
|
124
|
+
{
|
125
|
+
label: 'Review Changes',
|
126
|
+
value: 'review',
|
127
|
+
},
|
128
|
+
{
|
129
|
+
label: 'Discard Changes',
|
130
|
+
value: 'discard',
|
131
|
+
},
|
132
|
+
],
|
133
|
+
})
|
134
|
+
.pipe(takeUntil(this._destroy$))
|
135
|
+
.subscribe((value) => {
|
136
|
+
if (value === 'discard') {
|
137
|
+
this._dialogRef.close();
|
138
|
+
}
|
139
|
+
});
|
140
|
+
}
|
141
|
+
openSettings() {
|
142
|
+
this._dialog.open(ContentPageComponent, {
|
143
|
+
data: {
|
144
|
+
contentPage: this.contentPage,
|
145
|
+
},
|
146
|
+
})
|
147
|
+
.afterClosed()
|
148
|
+
.pipe(takeUntil(this._destroy$))
|
149
|
+
.subscribe((contentPage) => {
|
150
|
+
this.contentPage = {
|
151
|
+
...this.contentPage,
|
152
|
+
...contentPage,
|
153
|
+
};
|
154
|
+
this._cdRef.markForCheck();
|
155
|
+
});
|
156
|
+
}
|
157
|
+
_initEscape() {
|
158
|
+
fromEvent(document, 'keydown')
|
159
|
+
.pipe(filter((event) => event.code === 'Escape'), takeUntil(this._destroy$)).subscribe(() => {
|
160
|
+
const dialogRef = this._dialog.openDialogs.reverse()[0];
|
161
|
+
if (dialogRef?.componentInstance === this) {
|
162
|
+
this.close();
|
163
|
+
}
|
164
|
+
});
|
165
|
+
}
|
166
|
+
}
|
167
|
+
ContentPageEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentPageEditorComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2.FsMessage }, { token: i1.MatDialog }, { token: i0.ChangeDetectorRef }, { token: i3.FsPrompt }], target: i0.ɵɵFactoryTarget.Component });
|
168
|
+
ContentPageEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ContentPageEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0, template: "<form fsForm [submit]=\"submit\" [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 .mat-stroked-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout"] }, { type: i5.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: i6.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i7.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i8.EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }], 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: i10.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"] }, { type: i11.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i7.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { type: i10.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i12.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i13.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "preserveFragment", "skipLocationChange", "replaceUrl", "state", "relativeTo", "routerLink"] }, { type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentPageEditorComponent, decorators: [{
|
170
|
+
type: Component,
|
171
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, template: "<form fsForm [submit]=\"submit\" [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 .mat-stroked-button{margin-left:5px}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"] }]
|
172
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
173
|
+
type: Inject,
|
174
|
+
args: [MAT_DIALOG_DATA]
|
175
|
+
}] }, { type: i1.MatDialogRef }, { type: i2.FsMessage }, { type: i1.MatDialog }, { type: i0.ChangeDetectorRef }, { type: i3.FsPrompt }]; }, propDecorators: { editor: [{
|
176
|
+
type: ViewChild,
|
177
|
+
args: [EditorComponent]
|
178
|
+
}] } });
|
179
179
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1wYWdlLWVkaXRvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC1wYWdlcy9jb21wb25lbnRzL2NvbnRlbnQtcGFnZS1lZGl0b3IvY29udGVudC1wYWdlLWVkaXRvci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC1wYWdlcy9jb21wb25lbnRzL2NvbnRlbnQtcGFnZS1lZGl0b3IvY29udGVudC1wYWdlLWVkaXRvci5jb21wb25lbnQua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4gIH1cblxuICBwdWJsaWMgc3VibWl0ID0gKCk6IE9ic2VydmFibGU8YW55PiA9PiB7XG4gICAgdGhpcy5zdWJtaXR0aW5nID0gdHJ1ZTtcblxuICAgIHJldHVybiBvZihudWxsKVxuICAgICAgLnBpcGUoXG4gICAgICAgIGZpbHRlcigoKSA9PiB0aGlzLmZvY3VzZWQpLFxuICAgICAgICBzd2l0Y2hNYXAoKCkgPT4ge1xuICAgICAgICAgIHN3aXRjaCAodGhpcy5mb2N1c2VkKSB7XG4gICAgICAgICAgICBjYXNlIEVkaXRvclR5cGUuSnM6XG4gICAgICAgICAgICBjYXNlIEVkaXRvclR5cGUuSHRtbDpcbiAgICAgICAgICAgIGNhc2UgRWRpdG9yVHlwZS5TY3NzOlxuICAgICAgICAgICAgICByZXR1cm4gdGhpcy5zYXZlQ29udGVudFBhZ2UoKTtcbiAgICAgICAgICAgIGNhc2UgRWRpdG9yVHlwZS5HbG9iYWxTY3NzOlxuICAgICAgICAgICAgICByZXR1cm4gdGhpcy5lZGl0b3Iuc2F2ZUdsb2JhbFNjc3MoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gdGhyb3dFcnJvcignSW52YWxpZCBmb2N1cycpO1xuICAgICAgICB9KSxcbiAgICAgICAgdGFwKCgpID0+IHtcbiAgICAgICAgICB0aGlzLmVkaXRvci5jbGVhckNoYW5nZSh0aGlzLmZvY3VzZWQpO1xuICAgICAgICAgIHRoaXMuX2NkUmVmLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICB9KSxcbiAgICAgICAgZmluYWxpemUoKCkgPT4ge1xuICAgICAgICAgIHRoaXMuc3VibWl0dGluZyA9IGZhbHNlO1xuICAgICAgICAgIHRoaXMuX2NkUmVmLm1hcmtGb3JDaGVjaygpO1xuICAgICAgICB9KSxcbiAgICAgIClcbiAgICAgIC5waXBlKFxuICAgICAgICB0YWtlVW50aWwodGhpcy5fZGVzdHJveSQpLFxuICAgICAgKTtcbiAgfTtcblxuICB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ryb2tlZC1idXR0b25cbiAgICAgICAgICAgICAgY29sb3I9XCJwcmltYXJ5XCJcbiAgICAgICAgICAgICAgW2Rpc2FibGVkXT1cIiFlZGl0b3I/Lmhhc0NoYW5nZXMgfHwgc3VibWl0dGluZ1wiXG4gICAgICAgICAgICAgIFttYXRUb29sdGlwXT1cImlzTWFjID8gJ2NtZCtzJyA6ICdjdHJsK3MnXCJcbiAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiXG4gICAgICAgICAgICAgIChjbGljayk9XCJzYXZlKClcIj4gIFxuICAgICAgICAgICAgU2F2ZVxuICAgICAgICAgIDwvYnV0dG9uPlxuXG4gICAgICAgICAgPGEgXG4gICAgICAgICAgICAgIG1hdC1zdHJva2VkLWJ1dHRvblxuICAgICAgICAgICAgICB0YXJnZXQ9XCJfYmxhbmtcIlxuICAgICAgICAgICAgICBbcm91dGVyTGlua109XCJjb250ZW50UGFnZS5wYXRoXCJcbiAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiPiAgXG4gICAgICAgICAgICBQcmV2aWV3XG4gICAgICAgICAgPC9hPlxuXG4gICAgICAgICAgPGJ1dHRvbiBcbiAgICAgICAgICAgICAgbWF0LXN0cm9rZWQtYnV0dG9uXG4gICAgICAgICAgICAgIChjbGljayk9XCJjbG9zZSgpXCJcbiAgICAgICAgICAgICAgdHlwZT1cImJ1dHRvblwiPiAgXG4gICAgICAgICAgICBEb25lXG4gICAgICAgICAgPC9idXR0b24+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9kaXY+XG4gICAgPC9oMT5cbiAgICA8ZGl2IG1hdC1kaWFsb2ctY29udGVudD5cbiAgICAgIDxhcHAtZWRpdG9yXG4gICAgICAgIFtjb250ZW50Q29uZmlnXT1cImNvbmZpZ1wiXG4gICAgICAgIFtzaG93SHRtbF09XCJlZGl0b3JzLmh0bWxcIlxuICAgICAgICBbc2hvd0pzXT1cImVkaXRvcnMuanNcIlxuICAgICAgICBbc2hvd1Njc3NdPVwiZWRpdG9ycy5zY3NzXCJcbiAgICAgICAgW3Nob3dHbG9iYWxTY3NzXT1cImVkaXRvcnMuZ2xvYmFsU2Nzc1wiXG4gICAgICAgIFtodG1sXT1cImNvbnRlbnRQYWdlLmNvbnRlbnRcIlxuICAgICAgICBbc2Nzc109XCJjb250ZW50UGFnZS5zdHlsZXNcIlxuICAgICAgICBbanNdPVwiY29udGVudFBhZ2UuanNcIlxuICAgICAgICAoZm9jdXNlZCk9XCJlZGl0b3JGb2N1c2VkKCRldmVudClcIj5cbiAgICAgIDwvYXBwLWVkaXRvcj5cbiAgICA8L2Rpdj5cbiAgPC9mcy1kaWFsb2c+XG48L2Zvcm0+XG4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './content-page-editor.component';
|
1
|
+
export * from './content-page-editor.component';
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC1wYWdlcy9jb21wb25lbnRzL2NvbnRlbnQtcGFnZS1lZGl0b3IvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxpQ0FBaUMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGVudC1wYWdlLWVkaXRvci5jb21wb25lbnQnO1xuIl19
|