@firestitch/content 12.2.7 → 12.2.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (89) hide show
  1. package/app/consts/index.d.ts +1 -1
  2. package/app/consts/page-types.const.d.ts +5 -5
  3. package/app/enums/editor-type.d.ts +6 -6
  4. package/app/enums/index.d.ts +2 -2
  5. package/app/enums/page-type.enum.d.ts +6 -6
  6. package/app/injectors/content-config.injector.d.ts +2 -2
  7. package/app/injectors/index.d.ts +1 -1
  8. package/app/interfaces/content-config.d.ts +21 -21
  9. package/app/interfaces/content-layout.d.ts +10 -10
  10. package/app/interfaces/content-page.d.ts +14 -14
  11. package/app/interfaces/content-style.d.ts +4 -4
  12. package/app/interfaces/index.d.ts +4 -4
  13. package/app/modules/content/components/content/content.component.d.ts +25 -25
  14. package/app/modules/content/components/content/index.d.ts +1 -1
  15. package/app/modules/content/components/content-renderer/content-renderer.component.d.ts +24 -24
  16. package/app/modules/content/components/content-renderer/index.d.ts +1 -1
  17. package/app/modules/content/fs-content.module.d.ts +10 -10
  18. package/app/modules/content-layouts/components/content-layout/content-layout.component.d.ts +27 -27
  19. package/app/modules/content-layouts/components/content-layout/index.d.ts +1 -1
  20. package/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.d.ts +50 -49
  21. package/app/modules/content-layouts/components/content-layout-editor/index.d.ts +1 -1
  22. package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts +21 -21
  23. package/app/modules/content-layouts/components/content-layouts/index.d.ts +1 -1
  24. package/app/modules/content-layouts/components/index.d.ts +3 -3
  25. package/app/modules/content-layouts/fs-content-layouts.module.d.ts +28 -28
  26. package/app/modules/content-pages/components/content-page/content-page.component.d.ts +32 -32
  27. package/app/modules/content-pages/components/content-page/index.d.ts +1 -1
  28. package/app/modules/content-pages/components/content-page-editor/content-page-editor.component.d.ts +51 -50
  29. package/app/modules/content-pages/components/content-page-editor/index.d.ts +1 -1
  30. package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +24 -24
  31. package/app/modules/content-pages/components/content-pages/index.d.ts +1 -1
  32. package/app/modules/content-pages/components/index.d.ts +3 -3
  33. package/app/modules/content-pages/fs-content-pages.module.d.ts +31 -31
  34. package/app/modules/content-style/components/content-style/content-style.component.d.ts +27 -27
  35. package/app/modules/content-style/components/content-style/index.d.ts +1 -1
  36. package/app/modules/content-style/fs-content-style.module.d.ts +14 -14
  37. package/app/modules/editor/components/editor/editor.component.d.ts +47 -47
  38. package/app/modules/editor/components/editor/index.d.ts +1 -1
  39. package/app/modules/editor/fs-content-editor.module.d.ts +23 -23
  40. package/app/modules/editor/index.d.ts +1 -1
  41. package/bundles/firestitch-content.umd.js +1330 -1308
  42. package/bundles/firestitch-content.umd.js.map +1 -1
  43. package/esm2015/app/consts/index.js +1 -1
  44. package/esm2015/app/consts/page-types.const.js +7 -7
  45. package/esm2015/app/enums/editor-type.js +7 -7
  46. package/esm2015/app/enums/index.js +3 -3
  47. package/esm2015/app/enums/page-type.enum.js +7 -7
  48. package/esm2015/app/injectors/content-config.injector.js +2 -2
  49. package/esm2015/app/injectors/index.js +1 -1
  50. package/esm2015/app/interfaces/content-config.js +1 -1
  51. package/esm2015/app/interfaces/content-layout.js +1 -1
  52. package/esm2015/app/interfaces/content-page.js +1 -1
  53. package/esm2015/app/interfaces/content-style.js +1 -1
  54. package/esm2015/app/interfaces/index.js +5 -5
  55. package/esm2015/app/modules/content/components/content/content.component.js +84 -84
  56. package/esm2015/app/modules/content/components/content/index.js +1 -1
  57. package/esm2015/app/modules/content/components/content-renderer/content-renderer.component.js +76 -76
  58. package/esm2015/app/modules/content/components/content-renderer/index.js +1 -1
  59. package/esm2015/app/modules/content/fs-content.module.js +32 -32
  60. package/esm2015/app/modules/content-layouts/components/content-layout/content-layout.component.js +72 -72
  61. package/esm2015/app/modules/content-layouts/components/content-layout/index.js +1 -1
  62. package/esm2015/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.js +160 -150
  63. package/esm2015/app/modules/content-layouts/components/content-layout-editor/index.js +1 -1
  64. package/esm2015/app/modules/content-layouts/components/content-layouts/content-layouts.component.js +120 -120
  65. package/esm2015/app/modules/content-layouts/components/content-layouts/index.js +1 -1
  66. package/esm2015/app/modules/content-layouts/components/index.js +4 -4
  67. package/esm2015/app/modules/content-layouts/fs-content-layouts.module.js +103 -103
  68. package/esm2015/app/modules/content-pages/components/content-page/content-page.component.js +83 -83
  69. package/esm2015/app/modules/content-pages/components/content-page/index.js +1 -1
  70. package/esm2015/app/modules/content-pages/components/content-page-editor/content-page-editor.component.js +163 -153
  71. package/esm2015/app/modules/content-pages/components/content-page-editor/index.js +1 -1
  72. package/esm2015/app/modules/content-pages/components/content-pages/content-pages.component.js +129 -129
  73. package/esm2015/app/modules/content-pages/components/content-pages/index.js +1 -1
  74. package/esm2015/app/modules/content-pages/components/index.js +4 -4
  75. package/esm2015/app/modules/content-pages/fs-content-pages.module.js +112 -112
  76. package/esm2015/app/modules/content-style/components/content-style/content-style.component.js +70 -70
  77. package/esm2015/app/modules/content-style/components/content-style/index.js +1 -1
  78. package/esm2015/app/modules/content-style/fs-content-style.module.js +49 -49
  79. package/esm2015/app/modules/editor/components/editor/editor.component.js +144 -144
  80. package/esm2015/app/modules/editor/components/editor/index.js +1 -1
  81. package/esm2015/app/modules/editor/fs-content-editor.module.js +85 -85
  82. package/esm2015/app/modules/editor/index.js +1 -1
  83. package/esm2015/firestitch-content.js +4 -4
  84. package/esm2015/public_api.js +10 -10
  85. package/fesm2015/firestitch-content.js +1242 -1222
  86. package/fesm2015/firestitch-content.js.map +1 -1
  87. package/firestitch-content.d.ts +5 -5
  88. package/package.json +1 -1
  89. package/public_api.d.ts +10 -10
@@ -48,1352 +48,1374 @@
48
48
  var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
49
49
  var i3__namespace$4 = /*#__PURE__*/_interopNamespace(i3$4);
50
50
 
51
- var EditorType;
52
- (function (EditorType) {
53
- EditorType["Js"] = "js";
54
- EditorType["Html"] = "html";
55
- EditorType["Scss"] = "scss";
56
- EditorType["GlobalScss"] = "globalScss";
51
+ var EditorType;
52
+ (function (EditorType) {
53
+ EditorType["Js"] = "js";
54
+ EditorType["Html"] = "html";
55
+ EditorType["Scss"] = "scss";
56
+ EditorType["GlobalScss"] = "globalScss";
57
57
  })(EditorType || (EditorType = {}));
58
58
 
59
- var PageType;
60
- (function (PageType) {
61
- PageType["StandardPage"] = "standardPage";
62
- PageType["BlogPost"] = "blogPost";
63
- PageType["HomePage"] = "homePage";
64
- PageType["NotFoundPage"] = "notFoundPage";
59
+ var PageType;
60
+ (function (PageType) {
61
+ PageType["StandardPage"] = "standardPage";
62
+ PageType["BlogPost"] = "blogPost";
63
+ PageType["HomePage"] = "homePage";
64
+ PageType["NotFoundPage"] = "notFoundPage";
65
65
  })(PageType || (PageType = {}));
66
66
 
67
- var EditorComponent = /** @class */ (function () {
68
- function EditorComponent(_cdRef, _message) {
69
- this._cdRef = _cdRef;
70
- this._message = _message;
71
- this.showHtml = false;
72
- this.showScss = false;
73
- this.showJs = false;
74
- this.showGlobalScss = false;
75
- this.changed = new i0.EventEmitter();
76
- this.focused = new i0.EventEmitter();
77
- this.blured = new i0.EventEmitter();
78
- this.changes = {};
79
- this.EditorType = EditorType;
80
- this.resizing = false;
81
- this._destroy$ = new rxjs.Subject();
82
- }
83
- EditorComponent.prototype.ngOnInit = function () {
84
- this.initTextEditors();
85
- this.initGlobalContentStyle();
86
- };
87
- EditorComponent.prototype.ngOnDestroy = function () {
88
- this._destroy$.next();
89
- this._destroy$.complete();
90
- };
91
- EditorComponent.prototype.change = function (type, value) {
92
- this.changed.emit({ type: type, value: value });
93
- this.changes[type] = value;
94
- };
95
- Object.defineProperty(EditorComponent.prototype, "hasChanges", {
96
- get: function () {
97
- var _this = this;
98
- return Object.keys(this.changes)
99
- .filter(function (name) { return !!_this.changes[name]; })
100
- .length !== 0;
101
- },
102
- enumerable: false,
103
- configurable: true
104
- });
105
- EditorComponent.prototype.clearChange = function (type) {
106
- this.changes[type] = null;
107
- this._cdRef.markForCheck();
108
- };
109
- EditorComponent.prototype.initTextEditors = function () {
110
- var _this = this;
111
- this.scssConfig = {
112
- tabSize: 2,
113
- language: 'scss',
114
- height: '100%',
115
- focus: function () {
116
- _this.focused.emit(EditorType.Scss);
117
- },
118
- blur: function () {
119
- _this.blured.emit(EditorType.Scss);
120
- },
121
- };
122
- this.jsConfig = {
123
- tabSize: 2,
124
- language: 'js',
125
- height: '100%',
126
- focus: function () {
127
- _this.focused.emit(EditorType.Js);
128
- },
129
- blur: function () {
130
- _this.blured.emit(EditorType.Js);
131
- },
132
- };
133
- this.htmlConfig = {
134
- tabSize: 2,
135
- language: 'html',
136
- height: '100%',
137
- focus: function () {
138
- _this.focused.emit(EditorType.Html);
139
- },
140
- blur: function () {
141
- _this.blured.emit(EditorType.Html);
142
- },
143
- };
144
- this.globalScssConfig = {
145
- tabSize: 2,
146
- language: 'scss',
147
- height: '100%',
148
- focus: function () {
149
- _this.focused.emit(EditorType.GlobalScss);
150
- },
151
- blur: function () {
152
- _this.blured.emit(EditorType.GlobalScss);
153
- },
154
- };
155
- };
156
- EditorComponent.prototype.initGlobalContentStyle = function () {
157
- var _this = this;
158
- this.contentConfig.loadContentStyle()
159
- .subscribe(function (contentStyle) {
160
- _this.contentStyle = contentStyle || {};
161
- _this._cdRef.markForCheck();
162
- });
163
- };
164
- EditorComponent.prototype.saveGlobalScss = function () {
165
- var _this = this;
166
- return this.contentConfig.saveContentStyle(this.contentStyle)
167
- .pipe(operators.tap(function () {
168
- _this._message.success('Saved Changes');
169
- }));
170
- };
171
- return EditorComponent;
172
- }());
173
- EditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EditorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
174
- EditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <fs-label>HTML {{changes.html ? '*' : ''}}</fs-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 <fs-label>SCSS {{changes.scss ? '*' : ''}}</fs-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 <fs-label>JS {{changes.js ? '*' : ''}}</fs-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 <fs-label>Global SCSS {{changes.globalScss ? '*' : ''}}</fs-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"], components: [{ type: i2__namespace$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"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }], directives: [{ type: i2__namespace$1.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.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: i7__namespace.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }, { type: i8__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
175
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EditorComponent, decorators: [{
176
- type: i0.Component,
177
- args: [{
178
- selector: 'app-editor',
179
- templateUrl: './editor.component.html',
180
- styleUrls: ['./editor.component.scss'],
181
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
182
- }]
183
- }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }]; }, propDecorators: { showHtml: [{
184
- type: i0.Input
185
- }], showScss: [{
186
- type: i0.Input
187
- }], showJs: [{
188
- type: i0.Input
189
- }], showGlobalScss: [{
190
- type: i0.Input
191
- }], html: [{
192
- type: i0.Input
193
- }], scss: [{
194
- type: i0.Input
195
- }], js: [{
196
- type: i0.Input
197
- }], contentConfig: [{
198
- type: i0.Input
199
- }], changed: [{
200
- type: i0.Output
201
- }], focused: [{
202
- type: i0.Output
203
- }], blured: [{
204
- type: i0.Output
67
+ var EditorComponent = /** @class */ (function () {
68
+ function EditorComponent(_cdRef, _message) {
69
+ this._cdRef = _cdRef;
70
+ this._message = _message;
71
+ this.showHtml = false;
72
+ this.showScss = false;
73
+ this.showJs = false;
74
+ this.showGlobalScss = false;
75
+ this.changed = new i0.EventEmitter();
76
+ this.focused = new i0.EventEmitter();
77
+ this.blured = new i0.EventEmitter();
78
+ this.changes = {};
79
+ this.EditorType = EditorType;
80
+ this.resizing = false;
81
+ this._destroy$ = new rxjs.Subject();
82
+ }
83
+ EditorComponent.prototype.ngOnInit = function () {
84
+ this.initTextEditors();
85
+ this.initGlobalContentStyle();
86
+ };
87
+ EditorComponent.prototype.ngOnDestroy = function () {
88
+ this._destroy$.next();
89
+ this._destroy$.complete();
90
+ };
91
+ EditorComponent.prototype.change = function (type, value) {
92
+ this.changed.emit({ type: type, value: value });
93
+ this.changes[type] = value;
94
+ };
95
+ Object.defineProperty(EditorComponent.prototype, "hasChanges", {
96
+ get: function () {
97
+ var _this = this;
98
+ return Object.keys(this.changes)
99
+ .filter(function (name) { return !!_this.changes[name]; })
100
+ .length !== 0;
101
+ },
102
+ enumerable: false,
103
+ configurable: true
104
+ });
105
+ EditorComponent.prototype.clearChange = function (type) {
106
+ this.changes[type] = null;
107
+ this._cdRef.markForCheck();
108
+ };
109
+ EditorComponent.prototype.initTextEditors = function () {
110
+ var _this = this;
111
+ this.scssConfig = {
112
+ tabSize: 2,
113
+ language: 'scss',
114
+ height: '100%',
115
+ focus: function () {
116
+ _this.focused.emit(EditorType.Scss);
117
+ },
118
+ blur: function () {
119
+ _this.blured.emit(EditorType.Scss);
120
+ },
121
+ };
122
+ this.jsConfig = {
123
+ tabSize: 2,
124
+ language: 'js',
125
+ height: '100%',
126
+ focus: function () {
127
+ _this.focused.emit(EditorType.Js);
128
+ },
129
+ blur: function () {
130
+ _this.blured.emit(EditorType.Js);
131
+ },
132
+ };
133
+ this.htmlConfig = {
134
+ tabSize: 2,
135
+ language: 'html',
136
+ height: '100%',
137
+ focus: function () {
138
+ _this.focused.emit(EditorType.Html);
139
+ },
140
+ blur: function () {
141
+ _this.blured.emit(EditorType.Html);
142
+ },
143
+ };
144
+ this.globalScssConfig = {
145
+ tabSize: 2,
146
+ language: 'scss',
147
+ height: '100%',
148
+ focus: function () {
149
+ _this.focused.emit(EditorType.GlobalScss);
150
+ },
151
+ blur: function () {
152
+ _this.blured.emit(EditorType.GlobalScss);
153
+ },
154
+ };
155
+ };
156
+ EditorComponent.prototype.initGlobalContentStyle = function () {
157
+ var _this = this;
158
+ this.contentConfig.loadContentStyle()
159
+ .subscribe(function (contentStyle) {
160
+ _this.contentStyle = contentStyle || {};
161
+ _this._cdRef.markForCheck();
162
+ });
163
+ };
164
+ EditorComponent.prototype.saveGlobalScss = function () {
165
+ var _this = this;
166
+ return this.contentConfig.saveContentStyle(this.contentStyle)
167
+ .pipe(operators.tap(function () {
168
+ _this._message.success('Saved Changes');
169
+ }));
170
+ };
171
+ return EditorComponent;
172
+ }());
173
+ EditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EditorComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace.FsMessage }], target: i0__namespace.ɵɵFactoryTarget.Component });
174
+ EditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", 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__namespace, template: "<as-split [unit]=\"'percent'\" [gutterSize]=\"25\"> \n <as-split-area [size]=\"70\" [visible]=\"showHtml\" [order]=\"1\">\n <div class=\"editor-container\">\n <fs-label>HTML {{changes.html ? '*' : ''}}</fs-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 <fs-label>SCSS {{changes.scss ? '*' : ''}}</fs-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 <fs-label>JS {{changes.js ? '*' : ''}}</fs-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 <fs-label>Global SCSS {{changes.globalScss ? '*' : ''}}</fs-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"], components: [{ type: i2__namespace$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"] }, { type: i3__namespace.FsLabelComponent, selector: "fs-label" }, { type: i4__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }], directives: [{ type: i2__namespace$1.SplitAreaDirective, selector: "as-split-area, [as-split-area]", inputs: ["order", "size", "minSize", "maxSize", "lockSize", "visible"], exportAs: ["asSplitArea"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.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: i7__namespace.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }, { type: i8__namespace.FsSkeletonContentDirective, selector: "[fsSkeleton]", inputs: ["fsSkeleton", "fsSkeletonPattern"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
175
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: EditorComponent, decorators: [{
176
+ type: i0.Component,
177
+ args: [{
178
+ selector: 'app-editor',
179
+ templateUrl: './editor.component.html',
180
+ styleUrls: ['./editor.component.scss'],
181
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
182
+ }]
183
+ }], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace.FsMessage }]; }, propDecorators: { showHtml: [{
184
+ type: i0.Input
185
+ }], showScss: [{
186
+ type: i0.Input
187
+ }], showJs: [{
188
+ type: i0.Input
189
+ }], showGlobalScss: [{
190
+ type: i0.Input
191
+ }], html: [{
192
+ type: i0.Input
193
+ }], scss: [{
194
+ type: i0.Input
195
+ }], js: [{
196
+ type: i0.Input
197
+ }], contentConfig: [{
198
+ type: i0.Input
199
+ }], changed: [{
200
+ type: i0.Output
201
+ }], focused: [{
202
+ type: i0.Output
203
+ }], blured: [{
204
+ type: i0.Output
205
205
  }] } });
206
206
 
207
- var FsContentEditorModule = /** @class */ (function () {
208
- function FsContentEditorModule() {
209
- }
210
- return FsContentEditorModule;
211
- }());
212
- FsContentEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
213
- FsContentEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, declarations: [EditorComponent], imports: [i10.CommonModule,
214
- i9.FormsModule,
215
- i1.MatDialogModule,
216
- i5$1.MatButtonModule,
217
- tabs.MatTabsModule,
218
- i6.MatIconModule,
219
- i8$1.MatButtonToggleModule,
220
- i2$2.FsListModule,
221
- i5.FsFormModule,
222
- i8.FsSkeletonModule,
223
- i3.FsLabelModule,
224
- htmlEditor.FsHtmlEditorModule,
225
- i7.FsCommonModule,
226
- i3$1.FsDialogModule,
227
- i4.FsTextEditorModule,
228
- i2$1.AngularSplitModule], exports: [EditorComponent] });
229
- FsContentEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, imports: [[
230
- i10.CommonModule,
231
- i9.FormsModule,
232
- i1.MatDialogModule,
233
- i5$1.MatButtonModule,
234
- tabs.MatTabsModule,
235
- i6.MatIconModule,
236
- i8$1.MatButtonToggleModule,
237
- i2$2.FsListModule,
238
- i5.FsFormModule,
239
- i8.FsSkeletonModule,
240
- i3.FsLabelModule,
241
- htmlEditor.FsHtmlEditorModule,
242
- i7.FsCommonModule,
243
- i3$1.FsDialogModule,
244
- i4.FsTextEditorModule,
245
- i2$1.AngularSplitModule,
246
- ]] });
247
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, decorators: [{
248
- type: i0.NgModule,
249
- args: [{
250
- imports: [
251
- i10.CommonModule,
252
- i9.FormsModule,
253
- i1.MatDialogModule,
254
- i5$1.MatButtonModule,
255
- tabs.MatTabsModule,
256
- i6.MatIconModule,
257
- i8$1.MatButtonToggleModule,
258
- i2$2.FsListModule,
259
- i5.FsFormModule,
260
- i8.FsSkeletonModule,
261
- i3.FsLabelModule,
262
- htmlEditor.FsHtmlEditorModule,
263
- i7.FsCommonModule,
264
- i3$1.FsDialogModule,
265
- i4.FsTextEditorModule,
266
- i2$1.AngularSplitModule,
267
- ],
268
- exports: [
269
- EditorComponent,
270
- ],
271
- declarations: [
272
- EditorComponent,
273
- ],
274
- }]
207
+ var FsContentEditorModule = /** @class */ (function () {
208
+ function FsContentEditorModule() {
209
+ }
210
+ return FsContentEditorModule;
211
+ }());
212
+ FsContentEditorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
213
+ FsContentEditorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, declarations: [EditorComponent], imports: [i10.CommonModule,
214
+ i9.FormsModule,
215
+ i1.MatDialogModule,
216
+ i5$1.MatButtonModule,
217
+ tabs.MatTabsModule,
218
+ i6.MatIconModule,
219
+ i8$1.MatButtonToggleModule,
220
+ i2$2.FsListModule,
221
+ i5.FsFormModule,
222
+ i8.FsSkeletonModule,
223
+ i3.FsLabelModule,
224
+ htmlEditor.FsHtmlEditorModule,
225
+ i7.FsCommonModule,
226
+ i3$1.FsDialogModule,
227
+ i4.FsTextEditorModule,
228
+ i2$1.AngularSplitModule], exports: [EditorComponent] });
229
+ FsContentEditorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, imports: [[
230
+ i10.CommonModule,
231
+ i9.FormsModule,
232
+ i1.MatDialogModule,
233
+ i5$1.MatButtonModule,
234
+ tabs.MatTabsModule,
235
+ i6.MatIconModule,
236
+ i8$1.MatButtonToggleModule,
237
+ i2$2.FsListModule,
238
+ i5.FsFormModule,
239
+ i8.FsSkeletonModule,
240
+ i3.FsLabelModule,
241
+ htmlEditor.FsHtmlEditorModule,
242
+ i7.FsCommonModule,
243
+ i3$1.FsDialogModule,
244
+ i4.FsTextEditorModule,
245
+ i2$1.AngularSplitModule,
246
+ ]] });
247
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentEditorModule, decorators: [{
248
+ type: i0.NgModule,
249
+ args: [{
250
+ imports: [
251
+ i10.CommonModule,
252
+ i9.FormsModule,
253
+ i1.MatDialogModule,
254
+ i5$1.MatButtonModule,
255
+ tabs.MatTabsModule,
256
+ i6.MatIconModule,
257
+ i8$1.MatButtonToggleModule,
258
+ i2$2.FsListModule,
259
+ i5.FsFormModule,
260
+ i8.FsSkeletonModule,
261
+ i3.FsLabelModule,
262
+ htmlEditor.FsHtmlEditorModule,
263
+ i7.FsCommonModule,
264
+ i3$1.FsDialogModule,
265
+ i4.FsTextEditorModule,
266
+ i2$1.AngularSplitModule,
267
+ ],
268
+ exports: [
269
+ EditorComponent,
270
+ ],
271
+ declarations: [
272
+ EditorComponent,
273
+ ],
274
+ }]
275
275
  }] });
276
276
 
277
277
  var FS_CONTENT_CONFIG = new i0.InjectionToken('fs-content-config');
278
278
 
279
- var ContentLayoutComponent = /** @class */ (function () {
280
- function ContentLayoutComponent(_config, _data, _dialogRef, _message, _cdRef) {
281
- var _this = this;
282
- this._config = _config;
283
- this._data = _data;
284
- this._dialogRef = _dialogRef;
285
- this._message = _message;
286
- this._cdRef = _cdRef;
287
- this.contentLayout = null;
288
- this.editors = { content: true, styles: true };
289
- this._destroy$ = new rxjs.Subject();
290
- this.save = function () {
291
- return _this._config.saveContentLayout(_this.contentLayout)
292
- .pipe(operators.tap(function (contentLayout) {
293
- _this._message.success('Saved Changes');
294
- _this._dialogRef.close(contentLayout);
295
- }));
296
- };
297
- }
298
- ContentLayoutComponent.prototype.ngOnInit = function () {
299
- this._fetchData();
300
- };
301
- ContentLayoutComponent.prototype.ngOnDestroy = function () {
302
- this._destroy$.next();
303
- this._destroy$.complete();
304
- };
305
- ContentLayoutComponent.prototype._fetchData = function () {
306
- var _this = this;
307
- rxjs.of(this._data.contentLayout)
308
- .pipe(operators.switchMap(function (contentLayout) {
309
- return rxjs.of(contentLayout);
310
- }), operators.takeUntil(this._destroy$))
311
- .subscribe(function (contentLayout) {
312
- _this.contentLayout = Object.assign({}, contentLayout);
313
- _this._cdRef.markForCheck();
314
- });
315
- };
316
- return ContentLayoutComponent;
317
- }());
318
- ContentLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
319
- ContentLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentLayoutComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: i4.FsTextEditorComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i8__namespace$1.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__namespace.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__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i5__namespace.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__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
320
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutComponent, decorators: [{
321
- type: i0.Component,
322
- args: [{
323
- templateUrl: './content-layout.component.html',
324
- styleUrls: ['./content-layout.component.scss'],
325
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
326
- }]
327
- }], ctorParameters: function () {
328
- return [{ type: undefined, decorators: [{
329
- type: i0.Inject,
330
- args: [FS_CONTENT_CONFIG]
331
- }] }, { type: undefined, decorators: [{
332
- type: i0.Inject,
333
- args: [i1.MAT_DIALOG_DATA]
334
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
335
- }, propDecorators: { textEditors: [{
336
- type: i0.ViewChildren,
337
- args: [i4.FsTextEditorComponent]
279
+ var ContentLayoutComponent = /** @class */ (function () {
280
+ function ContentLayoutComponent(_config, _data, _dialogRef, _message, _cdRef) {
281
+ var _this = this;
282
+ this._config = _config;
283
+ this._data = _data;
284
+ this._dialogRef = _dialogRef;
285
+ this._message = _message;
286
+ this._cdRef = _cdRef;
287
+ this.contentLayout = null;
288
+ this.editors = { content: true, styles: true };
289
+ this._destroy$ = new rxjs.Subject();
290
+ this.save = function () {
291
+ return _this._config.saveContentLayout(_this.contentLayout)
292
+ .pipe(operators.tap(function (contentLayout) {
293
+ _this._message.success('Saved Changes');
294
+ _this._dialogRef.close(contentLayout);
295
+ }));
296
+ };
297
+ }
298
+ ContentLayoutComponent.prototype.ngOnInit = function () {
299
+ this._fetchData();
300
+ };
301
+ ContentLayoutComponent.prototype.ngOnDestroy = function () {
302
+ this._destroy$.next();
303
+ this._destroy$.complete();
304
+ };
305
+ ContentLayoutComponent.prototype._fetchData = function () {
306
+ var _this = this;
307
+ rxjs.of(this._data.contentLayout)
308
+ .pipe(operators.switchMap(function (contentLayout) {
309
+ return rxjs.of(contentLayout);
310
+ }), operators.takeUntil(this._destroy$))
311
+ .subscribe(function (contentLayout) {
312
+ _this.contentLayout = Object.assign({}, contentLayout);
313
+ _this._cdRef.markForCheck();
314
+ });
315
+ };
316
+ return ContentLayoutComponent;
317
+ }());
318
+ ContentLayoutComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
319
+ ContentLayoutComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentLayoutComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: i4.FsTextEditorComponent, descendants: true }], ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4__namespace$1.MatLabel, selector: "mat-label" }, { type: i8__namespace$1.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__namespace.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__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i5__namespace.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__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
320
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutComponent, decorators: [{
321
+ type: i0.Component,
322
+ args: [{
323
+ templateUrl: './content-layout.component.html',
324
+ styleUrls: ['./content-layout.component.scss'],
325
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
326
+ }]
327
+ }], ctorParameters: function () {
328
+ return [{ type: undefined, decorators: [{
329
+ type: i0.Inject,
330
+ args: [FS_CONTENT_CONFIG]
331
+ }] }, { type: undefined, decorators: [{
332
+ type: i0.Inject,
333
+ args: [i1.MAT_DIALOG_DATA]
334
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
335
+ }, propDecorators: { textEditors: [{
336
+ type: i0.ViewChildren,
337
+ args: [i4.FsTextEditorComponent]
338
338
  }] } });
339
339
 
340
- var ContentLayoutEditorComponent = /** @class */ (function () {
341
- function ContentLayoutEditorComponent(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
342
- var _a;
343
- var _this = this;
344
- this._data = _data;
345
- this._dialogRef = _dialogRef;
346
- this._message = _message;
347
- this._dialog = _dialog;
348
- this._cdRef = _cdRef;
349
- this._prompt = _prompt;
350
- this.EditorType = EditorType;
351
- this.focused = null;
352
- this.editors = (_a = {},
353
- _a[EditorType.Html] = true,
354
- _a[EditorType.Scss] = true,
355
- _a[EditorType.GlobalScss] = false,
356
- _a);
357
- this._destroy$ = new rxjs.Subject();
358
- this.save = function () {
359
- return rxjs.of(null)
360
- .pipe(operators.filter(function () { return _this.focused; }), operators.switchMap(function () {
361
- switch (_this.focused) {
362
- case EditorType.Html:
363
- case EditorType.Scss:
364
- return _this.saveContentPage();
365
- case EditorType.GlobalScss:
366
- return _this.editor.saveGlobalScss();
367
- }
368
- return rxjs.throwError('Invalid focus');
369
- }), operators.tap(function () {
370
- _this.editor.clearChange(_this.focused);
371
- _this._cdRef.markForCheck();
372
- }));
373
- };
374
- }
375
- ContentLayoutEditorComponent.prototype.ngOnInit = function () {
376
- this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
377
- this._dialogRef.disableClose = true;
378
- this.config = this._data.contentConfig;
379
- this._initContentLayout(this._data.contentLayout);
380
- };
381
- ContentLayoutEditorComponent.prototype.editorToggleChange = function (event) {
382
- this.editors[event.value] = !this.editors[event.value];
383
- };
384
- ContentLayoutEditorComponent.prototype.ngOnDestroy = function () {
385
- this._destroy$.next();
386
- this._destroy$.complete();
387
- };
388
- ContentLayoutEditorComponent.prototype._initContentLayout = function (contentLayout) {
389
- var _this = this;
390
- this.config.loadContentLayout(contentLayout.id)
391
- .subscribe(function (data) {
392
- _this.contentLayout = data;
393
- _this._cdRef.markForCheck();
394
- });
395
- };
396
- ContentLayoutEditorComponent.prototype.editorFocused = function (type) {
397
- this.focused = type;
398
- };
399
- ContentLayoutEditorComponent.prototype.saveContentPage = function () {
400
- var _a, _b;
401
- var _this = this;
402
- var names = (_a = {},
403
- _a[EditorType.Scss] = 'styles',
404
- _a[EditorType.Html] = 'content',
405
- _a);
406
- var data = (_b = {
407
- id: this.contentLayout.id
408
- },
409
- _b[names[this.focused]] = this.editor.changes[this.focused],
410
- _b);
411
- return this.config.saveContentLayout(Object.assign({ id: this.contentLayout.id }, data))
412
- .pipe(operators.tap(function () {
413
- _this._message.success('Saved Changes');
414
- }));
415
- };
416
- ContentLayoutEditorComponent.prototype.cancel = function () {
417
- var _this = this;
418
- if (!this.editor.hasChanges) {
419
- return this._dialogRef.close();
420
- }
421
- this._prompt.confirm({
422
- dialogConfig: {
423
- width: null,
424
- },
425
- title: 'You have unsaved changes',
426
- template: 'What would you like to do with your changes?',
427
- buttons: [
428
- {
429
- label: 'Review Changes',
430
- value: 'review',
431
- },
432
- {
433
- label: 'Discard Changes',
434
- value: 'discard',
435
- },
436
- ],
437
- })
438
- .pipe(operators.takeUntil(this._destroy$))
439
- .subscribe(function (value) {
440
- if (value === 'discard') {
441
- _this._dialogRef.close();
442
- }
443
- });
444
- };
445
- ContentLayoutEditorComponent.prototype.openSettings = function () {
446
- var _this = this;
447
- this._dialog.open(ContentLayoutComponent, {
448
- data: {
449
- contentLayout: this.contentLayout,
450
- },
451
- })
452
- .afterClosed()
453
- .pipe(operators.takeUntil(this._destroy$))
454
- .subscribe(function (contentLayout) {
455
- _this.contentLayout = Object.assign(Object.assign({}, _this.contentLayout), contentLayout);
456
- _this._cdRef.markForCheck();
457
- });
458
- };
459
- return ContentLayoutEditorComponent;
460
- }());
461
- ContentLayoutEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutEditorComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
462
- ContentLayoutEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentLayoutEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"save\" [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 </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)=\"cancel()\"\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}.mat-dialog-actions .toggles{display:flex;justify-content:flex-end;justify-self:baseline;flex:1}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i5__namespace$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: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }, { type: i5__namespace$1.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__namespace$2.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__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i8__namespace$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
463
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutEditorComponent, decorators: [{
464
- type: i0.Component,
465
- args: [{
466
- templateUrl: './content-layout-editor.component.html',
467
- styleUrls: ['./content-layout-editor.component.scss'],
468
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
469
- }]
470
- }], ctorParameters: function () {
471
- return [{ type: undefined, decorators: [{
472
- type: i0.Inject,
473
- args: [i1.MAT_DIALOG_DATA]
474
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$2.FsPrompt }];
475
- }, propDecorators: { editor: [{
476
- type: i0.ViewChild,
477
- args: [EditorComponent]
340
+ var ContentLayoutEditorComponent = /** @class */ (function () {
341
+ function ContentLayoutEditorComponent(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
342
+ var _a;
343
+ var _this = this;
344
+ this._data = _data;
345
+ this._dialogRef = _dialogRef;
346
+ this._message = _message;
347
+ this._dialog = _dialog;
348
+ this._cdRef = _cdRef;
349
+ this._prompt = _prompt;
350
+ this.EditorType = EditorType;
351
+ this.focused = null;
352
+ this.editors = (_a = {},
353
+ _a[EditorType.Html] = true,
354
+ _a[EditorType.Scss] = true,
355
+ _a[EditorType.GlobalScss] = false,
356
+ _a);
357
+ this._destroy$ = new rxjs.Subject();
358
+ this.save = function () {
359
+ return rxjs.of(null)
360
+ .pipe(operators.filter(function () { return _this.focused; }), operators.switchMap(function () {
361
+ switch (_this.focused) {
362
+ case EditorType.Html:
363
+ case EditorType.Scss:
364
+ return _this.saveContentPage();
365
+ case EditorType.GlobalScss:
366
+ return _this.editor.saveGlobalScss();
367
+ }
368
+ return rxjs.throwError('Invalid focus');
369
+ }), operators.tap(function () {
370
+ _this.editor.clearChange(_this.focused);
371
+ _this._cdRef.markForCheck();
372
+ }));
373
+ };
374
+ }
375
+ ContentLayoutEditorComponent.prototype.ngOnInit = function () {
376
+ this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
377
+ this._dialogRef.disableClose = true;
378
+ this.config = this._data.contentConfig;
379
+ this._initContentLayout(this._data.contentLayout);
380
+ this._initEscape();
381
+ };
382
+ ContentLayoutEditorComponent.prototype.editorToggleChange = function (event) {
383
+ this.editors[event.value] = !this.editors[event.value];
384
+ };
385
+ ContentLayoutEditorComponent.prototype.ngOnDestroy = function () {
386
+ this._destroy$.next();
387
+ this._destroy$.complete();
388
+ };
389
+ ContentLayoutEditorComponent.prototype._initContentLayout = function (contentLayout) {
390
+ var _this = this;
391
+ this.config.loadContentLayout(contentLayout.id)
392
+ .subscribe(function (data) {
393
+ _this.contentLayout = data;
394
+ _this._cdRef.markForCheck();
395
+ });
396
+ };
397
+ ContentLayoutEditorComponent.prototype.editorFocused = function (type) {
398
+ this.focused = type;
399
+ };
400
+ ContentLayoutEditorComponent.prototype.saveContentPage = function () {
401
+ var _a, _b;
402
+ var _this = this;
403
+ var names = (_a = {},
404
+ _a[EditorType.Scss] = 'styles',
405
+ _a[EditorType.Html] = 'content',
406
+ _a);
407
+ var data = (_b = {
408
+ id: this.contentLayout.id
409
+ },
410
+ _b[names[this.focused]] = this.editor.changes[this.focused],
411
+ _b);
412
+ return this.config.saveContentLayout(Object.assign({ id: this.contentLayout.id }, data))
413
+ .pipe(operators.tap(function () {
414
+ _this._message.success('Saved Changes');
415
+ }));
416
+ };
417
+ ContentLayoutEditorComponent.prototype.close = function () {
418
+ var _this = this;
419
+ if (!this.editor.hasChanges) {
420
+ return this._dialogRef.close();
421
+ }
422
+ this._prompt.confirm({
423
+ dialogConfig: {
424
+ width: null,
425
+ },
426
+ title: 'You have unsaved changes',
427
+ template: 'What would you like to do with your changes?',
428
+ buttons: [
429
+ {
430
+ label: 'Review Changes',
431
+ value: 'review',
432
+ },
433
+ {
434
+ label: 'Discard Changes',
435
+ value: 'discard',
436
+ },
437
+ ],
438
+ })
439
+ .pipe(operators.takeUntil(this._destroy$))
440
+ .subscribe(function (value) {
441
+ if (value === 'discard') {
442
+ _this._dialogRef.close();
443
+ }
444
+ });
445
+ };
446
+ ContentLayoutEditorComponent.prototype.openSettings = function () {
447
+ var _this = this;
448
+ this._dialog.open(ContentLayoutComponent, {
449
+ data: {
450
+ contentLayout: this.contentLayout,
451
+ },
452
+ })
453
+ .afterClosed()
454
+ .pipe(operators.takeUntil(this._destroy$))
455
+ .subscribe(function (contentLayout) {
456
+ _this.contentLayout = Object.assign(Object.assign({}, _this.contentLayout), contentLayout);
457
+ _this._cdRef.markForCheck();
458
+ });
459
+ };
460
+ ContentLayoutEditorComponent.prototype._initEscape = function () {
461
+ var _this = this;
462
+ rxjs.fromEvent(document, 'keydown')
463
+ .pipe(operators.filter(function (event) { return event.code === 'Escape'; }), operators.takeUntil(this._destroy$)).subscribe(function () {
464
+ var dialogRef = _this._dialog.openDialogs.reverse()[0];
465
+ if ((dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.componentInstance) === _this) {
466
+ _this.close();
467
+ }
468
+ });
469
+ };
470
+ return ContentLayoutEditorComponent;
471
+ }());
472
+ ContentLayoutEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutEditorComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
473
+ ContentLayoutEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentLayoutEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"save\" [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 </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}.mat-dialog-actions .toggles{display:flex;justify-content:flex-end;justify-self:baseline;flex:1}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i5__namespace$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: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }, { type: i5__namespace$1.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__namespace$2.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__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i8__namespace$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
474
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentLayoutEditorComponent, decorators: [{
475
+ type: i0.Component,
476
+ args: [{
477
+ templateUrl: './content-layout-editor.component.html',
478
+ styleUrls: ['./content-layout-editor.component.scss'],
479
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
480
+ }]
481
+ }], ctorParameters: function () {
482
+ return [{ type: undefined, decorators: [{
483
+ type: i0.Inject,
484
+ args: [i1.MAT_DIALOG_DATA]
485
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$2.FsPrompt }];
486
+ }, propDecorators: { editor: [{
487
+ type: i0.ViewChild,
488
+ args: [EditorComponent]
478
489
  }] } });
479
490
 
480
- var FsContentLayoutsComponent = /** @class */ (function () {
481
- function FsContentLayoutsComponent(_config, _dialog) {
482
- this._config = _config;
483
- this._dialog = _dialog;
484
- this._destroy$ = new rxjs.Subject();
485
- }
486
- FsContentLayoutsComponent.prototype.ngOnInit = function () {
487
- this._initListConfig();
488
- };
489
- FsContentLayoutsComponent.prototype.openEditor = function (contentLayout) {
490
- var _this = this;
491
- this._dialog.open(ContentLayoutEditorComponent, {
492
- maxWidth: '100vw',
493
- width: '100%',
494
- height: '100%',
495
- data: {
496
- contentLayout: contentLayout,
497
- contentConfig: this._config,
498
- },
499
- })
500
- .afterClosed()
501
- .pipe(operators.takeUntil(this._destroy$))
502
- .subscribe(function () {
503
- _this.listComponent.reload();
504
- });
505
- };
506
- FsContentLayoutsComponent.prototype.openLayout = function (contentLayout) {
507
- return this._dialog.open(ContentLayoutComponent, {
508
- data: {
509
- contentLayout: contentLayout,
510
- },
511
- })
512
- .afterClosed()
513
- .pipe(operators.filter(function (_contentLayout) { return !!_contentLayout; }), operators.takeUntil(this._destroy$));
514
- };
515
- FsContentLayoutsComponent.prototype.ngOnDestroy = function () {
516
- this._destroy$.next();
517
- this._destroy$.complete();
518
- };
519
- FsContentLayoutsComponent.prototype._initListConfig = function () {
520
- var _this = this;
521
- this.listConfig = {
522
- paging: false,
523
- filters: [
524
- {
525
- name: 'keyword',
526
- type: filter.ItemType.Keyword,
527
- label: 'Search',
528
- },
529
- ],
530
- actions: [
531
- {
532
- label: 'Create',
533
- click: function () {
534
- _this.openLayout({})
535
- .subscribe(function () {
536
- _this.listComponent.reload();
537
- });
538
- },
539
- },
540
- ],
541
- rowActions: [
542
- {
543
- click: function (data) {
544
- return _this._config.deleteContentLayout(data);
545
- },
546
- remove: {
547
- title: 'Confirm',
548
- template: 'Are you sure you would like to delete this record?',
549
- },
550
- menu: true,
551
- label: 'Delete',
552
- },
553
- ],
554
- fetch: function (query) {
555
- return _this._config.loadContentLayouts(query)
556
- .pipe(operators.map(function (contentLayouts) {
557
- return { data: contentLayouts };
558
- }));
559
- },
560
- restore: {
561
- query: { state: 'deleted' },
562
- filterLabel: 'Show Deleted',
563
- menuLabel: 'Restore',
564
- reload: true,
565
- click: function (row) {
566
- return _this._config.saveContentLayout({ id: row.id, state: 'active' });
567
- },
568
- },
569
- };
570
- };
571
- return FsContentLayoutsComponent;
572
- }());
573
- FsContentLayoutsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
574
- FsContentLayoutsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentLayoutsComponent, selector: "fs-content-layouts", viewQueries: [{ propertyName: "listComponent", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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=\"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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3__namespace$3.FsDatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
575
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsComponent, decorators: [{
576
- type: i0.Component,
577
- args: [{
578
- selector: 'fs-content-layouts',
579
- templateUrl: './content-layouts.component.html',
580
- styleUrls: ['./content-layouts.component.scss'],
581
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
582
- }]
583
- }], ctorParameters: function () {
584
- return [{ type: undefined, decorators: [{
585
- type: i0.Inject,
586
- args: [FS_CONTENT_CONFIG]
587
- }] }, { type: i1__namespace.MatDialog }];
588
- }, propDecorators: { listComponent: [{
589
- type: i0.ViewChild,
590
- args: [i2$2.FsListComponent]
491
+ var FsContentLayoutsComponent = /** @class */ (function () {
492
+ function FsContentLayoutsComponent(_config, _dialog) {
493
+ this._config = _config;
494
+ this._dialog = _dialog;
495
+ this._destroy$ = new rxjs.Subject();
496
+ }
497
+ FsContentLayoutsComponent.prototype.ngOnInit = function () {
498
+ this._initListConfig();
499
+ };
500
+ FsContentLayoutsComponent.prototype.openEditor = function (contentLayout) {
501
+ var _this = this;
502
+ this._dialog.open(ContentLayoutEditorComponent, {
503
+ maxWidth: '100vw',
504
+ width: '100%',
505
+ height: '100%',
506
+ data: {
507
+ contentLayout: contentLayout,
508
+ contentConfig: this._config,
509
+ },
510
+ })
511
+ .afterClosed()
512
+ .pipe(operators.takeUntil(this._destroy$))
513
+ .subscribe(function () {
514
+ _this.listComponent.reload();
515
+ });
516
+ };
517
+ FsContentLayoutsComponent.prototype.openLayout = function (contentLayout) {
518
+ return this._dialog.open(ContentLayoutComponent, {
519
+ data: {
520
+ contentLayout: contentLayout,
521
+ },
522
+ })
523
+ .afterClosed()
524
+ .pipe(operators.filter(function (_contentLayout) { return !!_contentLayout; }), operators.takeUntil(this._destroy$));
525
+ };
526
+ FsContentLayoutsComponent.prototype.ngOnDestroy = function () {
527
+ this._destroy$.next();
528
+ this._destroy$.complete();
529
+ };
530
+ FsContentLayoutsComponent.prototype._initListConfig = function () {
531
+ var _this = this;
532
+ this.listConfig = {
533
+ paging: false,
534
+ filters: [
535
+ {
536
+ name: 'keyword',
537
+ type: filter.ItemType.Keyword,
538
+ label: 'Search',
539
+ },
540
+ ],
541
+ actions: [
542
+ {
543
+ label: 'Create',
544
+ click: function () {
545
+ _this.openLayout({})
546
+ .subscribe(function () {
547
+ _this.listComponent.reload();
548
+ });
549
+ },
550
+ },
551
+ ],
552
+ rowActions: [
553
+ {
554
+ click: function (data) {
555
+ return _this._config.deleteContentLayout(data);
556
+ },
557
+ remove: {
558
+ title: 'Confirm',
559
+ template: 'Are you sure you would like to delete this record?',
560
+ },
561
+ menu: true,
562
+ label: 'Delete',
563
+ },
564
+ ],
565
+ fetch: function (query) {
566
+ return _this._config.loadContentLayouts(query)
567
+ .pipe(operators.map(function (contentLayouts) {
568
+ return { data: contentLayouts };
569
+ }));
570
+ },
571
+ restore: {
572
+ query: { state: 'deleted' },
573
+ filterLabel: 'Show Deleted',
574
+ menuLabel: 'Restore',
575
+ reload: true,
576
+ click: function (row) {
577
+ return _this._config.saveContentLayout({ id: row.id, state: 'active' });
578
+ },
579
+ },
580
+ };
581
+ };
582
+ return FsContentLayoutsComponent;
583
+ }());
584
+ FsContentLayoutsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
585
+ FsContentLayoutsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentLayoutsComponent, selector: "fs-content-layouts", viewQueries: [{ propertyName: "listComponent", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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=\"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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3__namespace$3.FsDatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
586
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsComponent, decorators: [{
587
+ type: i0.Component,
588
+ args: [{
589
+ selector: 'fs-content-layouts',
590
+ templateUrl: './content-layouts.component.html',
591
+ styleUrls: ['./content-layouts.component.scss'],
592
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
593
+ }]
594
+ }], ctorParameters: function () {
595
+ return [{ type: undefined, decorators: [{
596
+ type: i0.Inject,
597
+ args: [FS_CONTENT_CONFIG]
598
+ }] }, { type: i1__namespace.MatDialog }];
599
+ }, propDecorators: { listComponent: [{
600
+ type: i0.ViewChild,
601
+ args: [i2$2.FsListComponent]
591
602
  }] } });
592
603
 
593
- var FsContentLayoutsModule = /** @class */ (function () {
594
- function FsContentLayoutsModule() {
595
- }
596
- return FsContentLayoutsModule;
597
- }());
598
- FsContentLayoutsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
599
- FsContentLayoutsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, declarations: [ContentLayoutComponent,
600
- FsContentLayoutsComponent,
601
- ContentLayoutEditorComponent], imports: [i10.CommonModule,
602
- i9.FormsModule,
603
- i1.MatDialogModule,
604
- i8$2.MatInputModule,
605
- i4$1.MatFormFieldModule,
606
- i5$1.MatButtonModule,
607
- tabs.MatTabsModule,
608
- i6.MatIconModule,
609
- i5$2.MatSelectModule,
610
- i8$1.MatButtonToggleModule,
611
- i2$2.FsListModule,
612
- i3$3.FsDateModule,
613
- i5.FsFormModule,
614
- i3.FsLabelModule,
615
- i8.FsSkeletonModule,
616
- htmlEditor.FsHtmlEditorModule,
617
- i3$1.FsDialogModule,
618
- i4.FsTextEditorModule,
619
- FsContentEditorModule], exports: [FsContentLayoutsComponent] });
620
- FsContentLayoutsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, imports: [[
621
- i10.CommonModule,
622
- i9.FormsModule,
623
- i1.MatDialogModule,
624
- i8$2.MatInputModule,
625
- i4$1.MatFormFieldModule,
626
- i5$1.MatButtonModule,
627
- tabs.MatTabsModule,
628
- i6.MatIconModule,
629
- i5$2.MatSelectModule,
630
- i8$1.MatButtonToggleModule,
631
- i2$2.FsListModule,
632
- i3$3.FsDateModule,
633
- i5.FsFormModule,
634
- i3.FsLabelModule,
635
- i8.FsSkeletonModule,
636
- htmlEditor.FsHtmlEditorModule,
637
- i3$1.FsDialogModule,
638
- i4.FsTextEditorModule,
639
- FsContentEditorModule,
640
- ]] });
641
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, decorators: [{
642
- type: i0.NgModule,
643
- args: [{
644
- imports: [
645
- i10.CommonModule,
646
- i9.FormsModule,
647
- i1.MatDialogModule,
648
- i8$2.MatInputModule,
649
- i4$1.MatFormFieldModule,
650
- i5$1.MatButtonModule,
651
- tabs.MatTabsModule,
652
- i6.MatIconModule,
653
- i5$2.MatSelectModule,
654
- i8$1.MatButtonToggleModule,
655
- i2$2.FsListModule,
656
- i3$3.FsDateModule,
657
- i5.FsFormModule,
658
- i3.FsLabelModule,
659
- i8.FsSkeletonModule,
660
- htmlEditor.FsHtmlEditorModule,
661
- i3$1.FsDialogModule,
662
- i4.FsTextEditorModule,
663
- FsContentEditorModule,
664
- ],
665
- exports: [
666
- FsContentLayoutsComponent,
667
- ],
668
- declarations: [
669
- ContentLayoutComponent,
670
- FsContentLayoutsComponent,
671
- ContentLayoutEditorComponent,
672
- ],
673
- }]
604
+ var FsContentLayoutsModule = /** @class */ (function () {
605
+ function FsContentLayoutsModule() {
606
+ }
607
+ return FsContentLayoutsModule;
608
+ }());
609
+ FsContentLayoutsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
610
+ FsContentLayoutsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, declarations: [ContentLayoutComponent,
611
+ FsContentLayoutsComponent,
612
+ ContentLayoutEditorComponent], imports: [i10.CommonModule,
613
+ i9.FormsModule,
614
+ i1.MatDialogModule,
615
+ i8$2.MatInputModule,
616
+ i4$1.MatFormFieldModule,
617
+ i5$1.MatButtonModule,
618
+ tabs.MatTabsModule,
619
+ i6.MatIconModule,
620
+ i5$2.MatSelectModule,
621
+ i8$1.MatButtonToggleModule,
622
+ i2$2.FsListModule,
623
+ i3$3.FsDateModule,
624
+ i5.FsFormModule,
625
+ i3.FsLabelModule,
626
+ i8.FsSkeletonModule,
627
+ htmlEditor.FsHtmlEditorModule,
628
+ i3$1.FsDialogModule,
629
+ i4.FsTextEditorModule,
630
+ FsContentEditorModule], exports: [FsContentLayoutsComponent] });
631
+ FsContentLayoutsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, imports: [[
632
+ i10.CommonModule,
633
+ i9.FormsModule,
634
+ i1.MatDialogModule,
635
+ i8$2.MatInputModule,
636
+ i4$1.MatFormFieldModule,
637
+ i5$1.MatButtonModule,
638
+ tabs.MatTabsModule,
639
+ i6.MatIconModule,
640
+ i5$2.MatSelectModule,
641
+ i8$1.MatButtonToggleModule,
642
+ i2$2.FsListModule,
643
+ i3$3.FsDateModule,
644
+ i5.FsFormModule,
645
+ i3.FsLabelModule,
646
+ i8.FsSkeletonModule,
647
+ htmlEditor.FsHtmlEditorModule,
648
+ i3$1.FsDialogModule,
649
+ i4.FsTextEditorModule,
650
+ FsContentEditorModule,
651
+ ]] });
652
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentLayoutsModule, decorators: [{
653
+ type: i0.NgModule,
654
+ args: [{
655
+ imports: [
656
+ i10.CommonModule,
657
+ i9.FormsModule,
658
+ i1.MatDialogModule,
659
+ i8$2.MatInputModule,
660
+ i4$1.MatFormFieldModule,
661
+ i5$1.MatButtonModule,
662
+ tabs.MatTabsModule,
663
+ i6.MatIconModule,
664
+ i5$2.MatSelectModule,
665
+ i8$1.MatButtonToggleModule,
666
+ i2$2.FsListModule,
667
+ i3$3.FsDateModule,
668
+ i5.FsFormModule,
669
+ i3.FsLabelModule,
670
+ i8.FsSkeletonModule,
671
+ htmlEditor.FsHtmlEditorModule,
672
+ i3$1.FsDialogModule,
673
+ i4.FsTextEditorModule,
674
+ FsContentEditorModule,
675
+ ],
676
+ exports: [
677
+ FsContentLayoutsComponent,
678
+ ],
679
+ declarations: [
680
+ ContentLayoutComponent,
681
+ FsContentLayoutsComponent,
682
+ ContentLayoutEditorComponent,
683
+ ],
684
+ }]
674
685
  }] });
675
686
 
676
- var PageTypes = [
677
- { name: 'Standard Page', value: PageType.StandardPage },
678
- { name: 'Home Page', value: PageType.HomePage },
679
- { name: 'Not Found Page', value: PageType.NotFoundPage },
680
- { name: 'Blog Post', value: PageType.BlogPost },
687
+ var PageTypes = [
688
+ { name: 'Standard Page', value: PageType.StandardPage },
689
+ { name: 'Home Page', value: PageType.HomePage },
690
+ { name: 'Not Found Page', value: PageType.NotFoundPage },
691
+ { name: 'Blog Post', value: PageType.BlogPost },
681
692
  ];
682
693
 
683
- var ContentPageComponent = /** @class */ (function () {
684
- function ContentPageComponent(_config, _data, _dialogRef, _message, _cdRef) {
685
- var _this = this;
686
- this._config = _config;
687
- this._data = _data;
688
- this._dialogRef = _dialogRef;
689
- this._message = _message;
690
- this._cdRef = _cdRef;
691
- this.contentPage = null;
692
- this.PageTypes = PageTypes;
693
- this.editors = { content: true, styles: true };
694
- this._destroy$ = new rxjs.Subject();
695
- this.save = function () {
696
- return _this._config.saveContentPage(_this.contentPage)
697
- .pipe(operators.tap(function (contentPage) {
698
- _this._message.success('Saved Changes');
699
- _this._dialogRef.close(contentPage);
700
- }));
701
- };
702
- }
703
- ContentPageComponent.prototype.ngOnInit = function () {
704
- this._dialogRef.updateSize('600px');
705
- this._fetchData();
706
- };
707
- ContentPageComponent.prototype.ngOnDestroy = function () {
708
- this._destroy$.next();
709
- this._destroy$.complete();
710
- };
711
- ContentPageComponent.prototype._fetchData = function () {
712
- var _this = this;
713
- this._config.loadContentLayouts()
714
- .subscribe(function (contentLayouts) {
715
- _this.contentLayouts = contentLayouts;
716
- _this._cdRef.markForCheck();
717
- });
718
- rxjs.of(this._data.contentPage)
719
- .pipe(operators.switchMap(function (contentPage) {
720
- return rxjs.of(contentPage);
721
- }), operators.takeUntil(this._destroy$))
722
- .subscribe(function (contentPage) {
723
- _this.contentPage = Object.assign({}, contentPage);
724
- _this._cdRef.markForCheck();
725
- });
726
- };
727
- return ContentPageComponent;
728
- }());
729
- ContentPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
730
- ContentPageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentPageComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: i4.FsTextEditorComponent, descendants: true }], ngImport: i0__namespace, 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 *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 <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 required\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 </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__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6__namespace$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5__namespace.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i9__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace$1.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__namespace.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: i5__namespace.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__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
731
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageComponent, decorators: [{
732
- type: i0.Component,
733
- args: [{
734
- templateUrl: './content-page.component.html',
735
- styleUrls: ['./content-page.component.scss'],
736
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
737
- }]
738
- }], ctorParameters: function () {
739
- return [{ type: undefined, decorators: [{
740
- type: i0.Inject,
741
- args: [FS_CONTENT_CONFIG]
742
- }] }, { type: undefined, decorators: [{
743
- type: i0.Inject,
744
- args: [i1.MAT_DIALOG_DATA]
745
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
746
- }, propDecorators: { textEditors: [{
747
- type: i0.ViewChildren,
748
- args: [i4.FsTextEditorComponent]
694
+ var ContentPageComponent = /** @class */ (function () {
695
+ function ContentPageComponent(_config, _data, _dialogRef, _message, _cdRef) {
696
+ var _this = this;
697
+ this._config = _config;
698
+ this._data = _data;
699
+ this._dialogRef = _dialogRef;
700
+ this._message = _message;
701
+ this._cdRef = _cdRef;
702
+ this.contentPage = null;
703
+ this.PageTypes = PageTypes;
704
+ this.editors = { content: true, styles: true };
705
+ this._destroy$ = new rxjs.Subject();
706
+ this.save = function () {
707
+ return _this._config.saveContentPage(_this.contentPage)
708
+ .pipe(operators.tap(function (contentPage) {
709
+ _this._message.success('Saved Changes');
710
+ _this._dialogRef.close(contentPage);
711
+ }));
712
+ };
713
+ }
714
+ ContentPageComponent.prototype.ngOnInit = function () {
715
+ this._dialogRef.updateSize('600px');
716
+ this._fetchData();
717
+ };
718
+ ContentPageComponent.prototype.ngOnDestroy = function () {
719
+ this._destroy$.next();
720
+ this._destroy$.complete();
721
+ };
722
+ ContentPageComponent.prototype._fetchData = function () {
723
+ var _this = this;
724
+ this._config.loadContentLayouts()
725
+ .subscribe(function (contentLayouts) {
726
+ _this.contentLayouts = contentLayouts;
727
+ _this._cdRef.markForCheck();
728
+ });
729
+ rxjs.of(this._data.contentPage)
730
+ .pipe(operators.switchMap(function (contentPage) {
731
+ return rxjs.of(contentPage);
732
+ }), operators.takeUntil(this._destroy$))
733
+ .subscribe(function (contentPage) {
734
+ _this.contentPage = Object.assign({}, contentPage);
735
+ _this._cdRef.markForCheck();
736
+ });
737
+ };
738
+ return ContentPageComponent;
739
+ }());
740
+ ContentPageComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
741
+ ContentPageComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentPageComponent, selector: "ng-component", viewQueries: [{ propertyName: "textEditors", predicate: i4.FsTextEditorComponent, descendants: true }], ngImport: i0__namespace, 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: [""], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i4__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace$2.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6__namespace$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: i5__namespace.FsFormDialogActionsComponent, selector: "fs-form-dialog-actions", inputs: ["save", "create", "close", "done", "closeData", "name"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i4__namespace$1.MatLabel, selector: "mat-label" }, { type: i9__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i5__namespace.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i10__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i8__namespace$1.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__namespace.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: i5__namespace.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__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
742
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageComponent, decorators: [{
743
+ type: i0.Component,
744
+ args: [{
745
+ templateUrl: './content-page.component.html',
746
+ styleUrls: ['./content-page.component.scss'],
747
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
748
+ }]
749
+ }], ctorParameters: function () {
750
+ return [{ type: undefined, decorators: [{
751
+ type: i0.Inject,
752
+ args: [FS_CONTENT_CONFIG]
753
+ }] }, { type: undefined, decorators: [{
754
+ type: i0.Inject,
755
+ args: [i1.MAT_DIALOG_DATA]
756
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
757
+ }, propDecorators: { textEditors: [{
758
+ type: i0.ViewChildren,
759
+ args: [i4.FsTextEditorComponent]
749
760
  }] } });
750
761
 
751
- var ContentPageEditorComponent = /** @class */ (function () {
752
- function ContentPageEditorComponent(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
753
- var _a;
754
- var _this = this;
755
- this._data = _data;
756
- this._dialogRef = _dialogRef;
757
- this._message = _message;
758
- this._dialog = _dialog;
759
- this._cdRef = _cdRef;
760
- this._prompt = _prompt;
761
- this.focused = null;
762
- this.resizing = false;
763
- this.editors = (_a = {},
764
- _a[EditorType.Html] = true,
765
- _a[EditorType.Scss] = true,
766
- _a[EditorType.Js] = false,
767
- _a[EditorType.GlobalScss] = false,
768
- _a);
769
- this._destroy$ = new rxjs.Subject();
770
- this.save = function () {
771
- return rxjs.of(null)
772
- .pipe(operators.filter(function () { return _this.focused; }), operators.switchMap(function () {
773
- switch (_this.focused) {
774
- case EditorType.Js:
775
- case EditorType.Html:
776
- case EditorType.Scss:
777
- return _this.saveContentPage();
778
- case EditorType.GlobalScss:
779
- return _this.editor.saveGlobalScss();
780
- }
781
- return rxjs.throwError('Invalid focus');
782
- }), operators.tap(function () {
783
- _this.editor.clearChange(_this.focused);
784
- _this._cdRef.markForCheck();
785
- }));
786
- };
787
- }
788
- ContentPageEditorComponent.prototype.ngOnInit = function () {
789
- this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
790
- this._dialogRef.disableClose = true;
791
- this.config = this._data.contentConfig;
792
- this._initContentPage(this._data.contentPage);
793
- };
794
- ContentPageEditorComponent.prototype.editorToggleChange = function (event) {
795
- this.editors[event.value] = !this.editors[event.value];
796
- };
797
- ContentPageEditorComponent.prototype.ngOnDestroy = function () {
798
- this._destroy$.next();
799
- this._destroy$.complete();
800
- };
801
- ContentPageEditorComponent.prototype._initContentPage = function (contentPage) {
802
- var _this = this;
803
- this.config.loadContentPage(contentPage.id)
804
- .subscribe(function (data) {
805
- _this.contentPage = data;
806
- _this._cdRef.markForCheck();
807
- });
808
- };
809
- ContentPageEditorComponent.prototype.editorFocused = function (type) {
810
- this.focused = type;
811
- };
812
- ContentPageEditorComponent.prototype.saveContentPage = function () {
813
- var _a, _b;
814
- var _this = this;
815
- var names = (_a = {},
816
- _a[EditorType.Js] = 'js',
817
- _a[EditorType.Scss] = 'styles',
818
- _a[EditorType.Html] = 'content',
819
- _a);
820
- var data = (_b = {
821
- id: this.contentPage.id
822
- },
823
- _b[names[this.focused]] = this.editor.changes[this.focused],
824
- _b);
825
- return this.config.saveContentPage(Object.assign({ id: this.contentPage.id }, data))
826
- .pipe(operators.tap(function () {
827
- _this._message.success('Saved Changes');
828
- }));
829
- };
830
- ContentPageEditorComponent.prototype.cancel = function () {
831
- var _this = this;
832
- if (!this.editor.hasChanges) {
833
- return this._dialogRef.close();
834
- }
835
- this._prompt.confirm({
836
- dialogConfig: {
837
- width: null,
838
- },
839
- title: 'You have unsaved changes',
840
- template: 'What would you like to do with your changes?',
841
- buttons: [
842
- {
843
- label: 'Review Changes',
844
- value: 'review',
845
- },
846
- {
847
- label: 'Discard Changes',
848
- value: 'discard',
849
- },
850
- ],
851
- })
852
- .pipe(operators.takeUntil(this._destroy$))
853
- .subscribe(function (value) {
854
- if (value === 'discard') {
855
- _this._dialogRef.close();
856
- }
857
- });
858
- };
859
- ContentPageEditorComponent.prototype.openSettings = function () {
860
- var _this = this;
861
- this._dialog.open(ContentPageComponent, {
862
- data: {
863
- contentPage: this.contentPage,
864
- },
865
- })
866
- .afterClosed()
867
- .pipe(operators.takeUntil(this._destroy$))
868
- .subscribe(function (contentPage) {
869
- _this.contentPage = Object.assign(Object.assign({}, _this.contentPage), contentPage);
870
- _this._cdRef.markForCheck();
871
- });
872
- };
873
- return ContentPageEditorComponent;
874
- }());
875
- ContentPageEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageEditorComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
876
- ContentPageEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentPageEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"save\" [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 </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\n <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"cancel()\"\n type=\"button\"> \n Done \n </button>\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 </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}.mat-dialog-actions fs-form-dialog-actions{width:auto}.mat-dialog-actions .toggles{display:flex;justify-content:flex-end;justify-self:baseline;flex:1}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i5__namespace$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: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }, { type: i5__namespace$1.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__namespace$2.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__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i8__namespace$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
877
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageEditorComponent, decorators: [{
878
- type: i0.Component,
879
- args: [{
880
- templateUrl: './content-page-editor.component.html',
881
- styleUrls: ['./content-page-editor.component.scss'],
882
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
883
- }]
884
- }], ctorParameters: function () {
885
- return [{ type: undefined, decorators: [{
886
- type: i0.Inject,
887
- args: [i1.MAT_DIALOG_DATA]
888
- }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$2.FsPrompt }];
889
- }, propDecorators: { editor: [{
890
- type: i0.ViewChild,
891
- args: [EditorComponent]
762
+ var ContentPageEditorComponent = /** @class */ (function () {
763
+ function ContentPageEditorComponent(_data, _dialogRef, _message, _dialog, _cdRef, _prompt) {
764
+ var _a;
765
+ var _this = this;
766
+ this._data = _data;
767
+ this._dialogRef = _dialogRef;
768
+ this._message = _message;
769
+ this._dialog = _dialog;
770
+ this._cdRef = _cdRef;
771
+ this._prompt = _prompt;
772
+ this.focused = null;
773
+ this.resizing = false;
774
+ this.editors = (_a = {},
775
+ _a[EditorType.Html] = true,
776
+ _a[EditorType.Scss] = true,
777
+ _a[EditorType.Js] = false,
778
+ _a[EditorType.GlobalScss] = false,
779
+ _a);
780
+ this._destroy$ = new rxjs.Subject();
781
+ this.save = function () {
782
+ return rxjs.of(null)
783
+ .pipe(operators.filter(function () { return _this.focused; }), operators.switchMap(function () {
784
+ switch (_this.focused) {
785
+ case EditorType.Js:
786
+ case EditorType.Html:
787
+ case EditorType.Scss:
788
+ return _this.saveContentPage();
789
+ case EditorType.GlobalScss:
790
+ return _this.editor.saveGlobalScss();
791
+ }
792
+ return rxjs.throwError('Invalid focus');
793
+ }), operators.tap(function () {
794
+ _this.editor.clearChange(_this.focused);
795
+ _this._cdRef.markForCheck();
796
+ }));
797
+ };
798
+ }
799
+ ContentPageEditorComponent.prototype.ngOnInit = function () {
800
+ this._dialogRef.addPanelClass('fs-content-editor-overlay-pane');
801
+ this._dialogRef.disableClose = true;
802
+ this.config = this._data.contentConfig;
803
+ this._initContentPage(this._data.contentPage);
804
+ this._initEscape();
805
+ };
806
+ ContentPageEditorComponent.prototype.editorToggleChange = function (event) {
807
+ this.editors[event.value] = !this.editors[event.value];
808
+ };
809
+ ContentPageEditorComponent.prototype.ngOnDestroy = function () {
810
+ this._destroy$.next();
811
+ this._destroy$.complete();
812
+ };
813
+ ContentPageEditorComponent.prototype._initContentPage = function (contentPage) {
814
+ var _this = this;
815
+ this.config.loadContentPage(contentPage.id)
816
+ .subscribe(function (data) {
817
+ _this.contentPage = data;
818
+ _this._cdRef.markForCheck();
819
+ });
820
+ };
821
+ ContentPageEditorComponent.prototype.editorFocused = function (type) {
822
+ this.focused = type;
823
+ };
824
+ ContentPageEditorComponent.prototype.saveContentPage = function () {
825
+ var _a, _b;
826
+ var _this = this;
827
+ var names = (_a = {},
828
+ _a[EditorType.Js] = 'js',
829
+ _a[EditorType.Scss] = 'styles',
830
+ _a[EditorType.Html] = 'content',
831
+ _a);
832
+ var data = (_b = {
833
+ id: this.contentPage.id
834
+ },
835
+ _b[names[this.focused]] = this.editor.changes[this.focused],
836
+ _b);
837
+ return this.config.saveContentPage(Object.assign({ id: this.contentPage.id }, data))
838
+ .pipe(operators.tap(function () {
839
+ _this._message.success('Saved Changes');
840
+ }));
841
+ };
842
+ ContentPageEditorComponent.prototype.close = function () {
843
+ var _this = this;
844
+ if (!this.editor.hasChanges) {
845
+ return this._dialogRef.close();
846
+ }
847
+ this._prompt.confirm({
848
+ dialogConfig: {
849
+ width: null,
850
+ },
851
+ title: 'You have unsaved changes',
852
+ template: 'What would you like to do with your changes?',
853
+ buttons: [
854
+ {
855
+ label: 'Review Changes',
856
+ value: 'review',
857
+ },
858
+ {
859
+ label: 'Discard Changes',
860
+ value: 'discard',
861
+ },
862
+ ],
863
+ })
864
+ .pipe(operators.takeUntil(this._destroy$))
865
+ .subscribe(function (value) {
866
+ if (value === 'discard') {
867
+ _this._dialogRef.close();
868
+ }
869
+ });
870
+ };
871
+ ContentPageEditorComponent.prototype.openSettings = function () {
872
+ var _this = this;
873
+ this._dialog.open(ContentPageComponent, {
874
+ data: {
875
+ contentPage: this.contentPage,
876
+ },
877
+ })
878
+ .afterClosed()
879
+ .pipe(operators.takeUntil(this._destroy$))
880
+ .subscribe(function (contentPage) {
881
+ _this.contentPage = Object.assign(Object.assign({}, _this.contentPage), contentPage);
882
+ _this._cdRef.markForCheck();
883
+ });
884
+ };
885
+ ContentPageEditorComponent.prototype._initEscape = function () {
886
+ var _this = this;
887
+ rxjs.fromEvent(document, 'keydown')
888
+ .pipe(operators.filter(function (event) { return event.code === 'Escape'; }), operators.takeUntil(this._destroy$)).subscribe(function () {
889
+ var dialogRef = _this._dialog.openDialogs.reverse()[0];
890
+ if ((dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.componentInstance) === _this) {
891
+ _this.close();
892
+ }
893
+ });
894
+ };
895
+ return ContentPageEditorComponent;
896
+ }());
897
+ ContentPageEditorComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageEditorComponent, deps: [{ token: i1.MAT_DIALOG_DATA }, { token: i1__namespace.MatDialogRef }, { token: i2__namespace.FsMessage }, { token: i1__namespace.MatDialog }, { token: i0__namespace.ChangeDetectorRef }, { token: i3__namespace$2.FsPrompt }], target: i0__namespace.ɵɵFactoryTarget.Component });
898
+ ContentPageEditorComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentPageEditorComponent, selector: "ng-component", viewQueries: [{ propertyName: "editor", first: true, predicate: EditorComponent, descendants: true }], ngImport: i0__namespace, template: "<form fsForm [submit]=\"save\" [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 </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\n <div mat-dialog-actions>\n <button \n mat-button\n color=\"primary\"\n (click)=\"close()\"\n type=\"button\"> \n Done \n </button>\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 </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}.mat-dialog-actions fs-form-dialog-actions{width:auto}.mat-dialog-actions .toggles{display:flex;justify-content:flex-end;justify-self:baseline;flex:1}.title-container{display:flex;align-items:center}.title-container .title{flex:1}.title-container .title .small{line-height:normal}\n"], components: [{ type: i3__namespace$1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileActionPlacement", "mobileWidth", "mode"] }, { type: i5__namespace$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: i6__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: EditorComponent, selector: "app-editor", inputs: ["showHtml", "showScss", "showJs", "showGlobalScss", "html", "scss", "js", "contentConfig"], outputs: ["changed", "focused", "blured"] }, { type: i5__namespace$1.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__namespace$2.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__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i9__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i9__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i5__namespace.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: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5__namespace.FsButtonDirective, selector: "[mat-raised-button],[mat-button],[mat-flat-button],[mat-stroked-button]", inputs: ["name", "dirtySubmit", "form"] }, { type: i8__namespace$2.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
899
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentPageEditorComponent, decorators: [{
900
+ type: i0.Component,
901
+ args: [{
902
+ templateUrl: './content-page-editor.component.html',
903
+ styleUrls: ['./content-page-editor.component.scss'],
904
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
905
+ }]
906
+ }], ctorParameters: function () {
907
+ return [{ type: undefined, decorators: [{
908
+ type: i0.Inject,
909
+ args: [i1.MAT_DIALOG_DATA]
910
+ }] }, { type: i1__namespace.MatDialogRef }, { type: i2__namespace.FsMessage }, { type: i1__namespace.MatDialog }, { type: i0__namespace.ChangeDetectorRef }, { type: i3__namespace$2.FsPrompt }];
911
+ }, propDecorators: { editor: [{
912
+ type: i0.ViewChild,
913
+ args: [EditorComponent]
892
914
  }] } });
893
915
 
894
- var FsContentPagesComponent = /** @class */ (function () {
895
- function FsContentPagesComponent(_config, _dialog) {
896
- this._config = _config;
897
- this._dialog = _dialog;
898
- this.pageTypes = i7.index(PageTypes, 'value', 'name');
899
- this._destroy$ = new rxjs.Subject();
900
- }
901
- FsContentPagesComponent.prototype.ngOnInit = function () {
902
- this._initListConfig();
903
- };
904
- FsContentPagesComponent.prototype.openEditor = function (contentPage) {
905
- var _this = this;
906
- this._dialog.open(ContentPageEditorComponent, {
907
- data: {
908
- contentPage: contentPage,
909
- config: this._config,
910
- contentConfig: this._config,
911
- },
912
- maxWidth: '100vw',
913
- width: '100%',
914
- height: '100%',
915
- autoFocus: false,
916
- })
917
- .afterClosed()
918
- .pipe(operators.takeUntil(this._destroy$))
919
- .subscribe(function () {
920
- _this.listComponent.reload();
921
- });
922
- };
923
- FsContentPagesComponent.prototype.ngOnDestroy = function () {
924
- this._destroy$.next();
925
- this._destroy$.complete();
926
- };
927
- FsContentPagesComponent.prototype.openContentPage = function (contentPage) {
928
- return this._dialog.open(ContentPageComponent, {
929
- data: { contentPage: contentPage },
930
- })
931
- .afterClosed()
932
- .pipe(operators.takeUntil(this._destroy$));
933
- };
934
- FsContentPagesComponent.prototype._initListConfig = function () {
935
- var _this = this;
936
- this.listConfig = {
937
- filters: [
938
- {
939
- name: 'keyword',
940
- type: filter.ItemType.Keyword,
941
- label: 'Search',
942
- },
943
- ],
944
- actions: [
945
- {
946
- label: 'Create',
947
- click: function () {
948
- _this.openContentPage({
949
- type: PageType.StandardPage,
950
- })
951
- .pipe(operators.filter(function (contentPage) { return !!contentPage; }))
952
- .subscribe(function (contentPage) {
953
- _this.openEditor(contentPage);
954
- _this.listComponent.reload();
955
- });
956
- },
957
- },
958
- ],
959
- rowActions: [
960
- {
961
- click: function (data) {
962
- return _this._config.deleteContentPage(data);
963
- },
964
- remove: {
965
- title: 'Confirm',
966
- template: 'Are you sure you would like to delete this record?',
967
- },
968
- menu: true,
969
- label: 'Delete',
970
- },
971
- ],
972
- fetch: function (query) {
973
- return _this._config.loadContentPages(query)
974
- .pipe(operators.map(function (response) {
975
- return { data: response.contentPages, paging: response.paging };
976
- }));
977
- },
978
- restore: {
979
- query: { state: 'deleted' },
980
- filterLabel: 'Show Deleted',
981
- menuLabel: 'Restore',
982
- reload: true,
983
- click: function (row) {
984
- return _this._config.saveContentPage({ id: row.id, state: 'active' });
985
- },
986
- },
987
- };
988
- };
989
- return FsContentPagesComponent;
990
- }());
991
- FsContentPagesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
992
- FsContentPagesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentPagesComponent, selector: "fs-content-pages", inputs: { htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3__namespace$3.FsDatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
993
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesComponent, decorators: [{
994
- type: i0.Component,
995
- args: [{
996
- selector: 'fs-content-pages',
997
- templateUrl: './content-pages.component.html',
998
- styleUrls: ['./content-pages.component.scss'],
999
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1000
- }]
1001
- }], ctorParameters: function () {
1002
- return [{ type: undefined, decorators: [{
1003
- type: i0.Inject,
1004
- args: [FS_CONTENT_CONFIG]
1005
- }] }, { type: i1__namespace.MatDialog }];
1006
- }, propDecorators: { htmlEditorConfig: [{
1007
- type: i0.Input
1008
- }], listComponent: [{
1009
- type: i0.ViewChild,
1010
- args: [i2$2.FsListComponent]
916
+ var FsContentPagesComponent = /** @class */ (function () {
917
+ function FsContentPagesComponent(_config, _dialog) {
918
+ this._config = _config;
919
+ this._dialog = _dialog;
920
+ this.pageTypes = i7.index(PageTypes, 'value', 'name');
921
+ this._destroy$ = new rxjs.Subject();
922
+ }
923
+ FsContentPagesComponent.prototype.ngOnInit = function () {
924
+ this._initListConfig();
925
+ };
926
+ FsContentPagesComponent.prototype.openEditor = function (contentPage) {
927
+ var _this = this;
928
+ this._dialog.open(ContentPageEditorComponent, {
929
+ data: {
930
+ contentPage: contentPage,
931
+ config: this._config,
932
+ contentConfig: this._config,
933
+ },
934
+ maxWidth: '100vw',
935
+ width: '100%',
936
+ height: '100%',
937
+ autoFocus: false,
938
+ })
939
+ .afterClosed()
940
+ .pipe(operators.takeUntil(this._destroy$))
941
+ .subscribe(function () {
942
+ _this.listComponent.reload();
943
+ });
944
+ };
945
+ FsContentPagesComponent.prototype.ngOnDestroy = function () {
946
+ this._destroy$.next();
947
+ this._destroy$.complete();
948
+ };
949
+ FsContentPagesComponent.prototype.openContentPage = function (contentPage) {
950
+ return this._dialog.open(ContentPageComponent, {
951
+ data: { contentPage: contentPage },
952
+ })
953
+ .afterClosed()
954
+ .pipe(operators.takeUntil(this._destroy$));
955
+ };
956
+ FsContentPagesComponent.prototype._initListConfig = function () {
957
+ var _this = this;
958
+ this.listConfig = {
959
+ filters: [
960
+ {
961
+ name: 'keyword',
962
+ type: filter.ItemType.Keyword,
963
+ label: 'Search',
964
+ },
965
+ ],
966
+ actions: [
967
+ {
968
+ label: 'Create',
969
+ click: function () {
970
+ _this.openContentPage({
971
+ type: PageType.StandardPage,
972
+ })
973
+ .pipe(operators.filter(function (contentPage) { return !!contentPage; }))
974
+ .subscribe(function (contentPage) {
975
+ _this.openEditor(contentPage);
976
+ _this.listComponent.reload();
977
+ });
978
+ },
979
+ },
980
+ ],
981
+ rowActions: [
982
+ {
983
+ click: function (data) {
984
+ return _this._config.deleteContentPage(data);
985
+ },
986
+ remove: {
987
+ title: 'Confirm',
988
+ template: 'Are you sure you would like to delete this record?',
989
+ },
990
+ menu: true,
991
+ label: 'Delete',
992
+ },
993
+ ],
994
+ fetch: function (query) {
995
+ return _this._config.loadContentPages(query)
996
+ .pipe(operators.map(function (response) {
997
+ return { data: response.contentPages, paging: response.paging };
998
+ }));
999
+ },
1000
+ restore: {
1001
+ query: { state: 'deleted' },
1002
+ filterLabel: 'Show Deleted',
1003
+ menuLabel: 'Restore',
1004
+ reload: true,
1005
+ click: function (row) {
1006
+ return _this._config.saveContentPage({ id: row.id, state: 'active' });
1007
+ },
1008
+ },
1009
+ };
1010
+ };
1011
+ return FsContentPagesComponent;
1012
+ }());
1013
+ FsContentPagesComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
1014
+ FsContentPagesComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentPagesComponent, selector: "fs-content-pages", inputs: { htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "listComponent", first: true, predicate: i2$2.FsListComponent, descendants: true }], ngImport: i0__namespace, 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__namespace$2.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }], directives: [{ type: i2__namespace$2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }], pipes: { "fsDate": i3__namespace$3.FsDatePipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1015
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesComponent, decorators: [{
1016
+ type: i0.Component,
1017
+ args: [{
1018
+ selector: 'fs-content-pages',
1019
+ templateUrl: './content-pages.component.html',
1020
+ styleUrls: ['./content-pages.component.scss'],
1021
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1022
+ }]
1023
+ }], ctorParameters: function () {
1024
+ return [{ type: undefined, decorators: [{
1025
+ type: i0.Inject,
1026
+ args: [FS_CONTENT_CONFIG]
1027
+ }] }, { type: i1__namespace.MatDialog }];
1028
+ }, propDecorators: { htmlEditorConfig: [{
1029
+ type: i0.Input
1030
+ }], listComponent: [{
1031
+ type: i0.ViewChild,
1032
+ args: [i2$2.FsListComponent]
1011
1033
  }] } });
1012
1034
 
1013
- var FsContentPagesModule = /** @class */ (function () {
1014
- function FsContentPagesModule() {
1015
- }
1016
- FsContentPagesModule.forRoot = function () {
1017
- return {
1018
- ngModule: FsContentPagesModule,
1019
- };
1020
- };
1021
- return FsContentPagesModule;
1022
- }());
1023
- FsContentPagesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1024
- FsContentPagesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, declarations: [FsContentPagesComponent,
1025
- ContentPageComponent,
1026
- ContentPageEditorComponent], imports: [i10.CommonModule,
1027
- i9.FormsModule,
1028
- i1.MatDialogModule,
1029
- i8$2.MatInputModule,
1030
- i4$1.MatFormFieldModule,
1031
- i5$1.MatButtonModule,
1032
- tabs.MatTabsModule,
1033
- i6.MatIconModule,
1034
- i5$2.MatSelectModule,
1035
- i8$1.MatButtonToggleModule,
1036
- i2$2.FsListModule,
1037
- i3$3.FsDateModule,
1038
- i7.FsCommonModule,
1039
- i5.FsFormModule,
1040
- i3.FsLabelModule,
1041
- i8.FsSkeletonModule,
1042
- htmlEditor.FsHtmlEditorModule,
1043
- i3$1.FsDialogModule,
1044
- i4.FsTextEditorModule,
1045
- FsContentEditorModule], exports: [FsContentPagesComponent] });
1046
- FsContentPagesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, imports: [[
1047
- i10.CommonModule,
1048
- i9.FormsModule,
1049
- i1.MatDialogModule,
1050
- i8$2.MatInputModule,
1051
- i4$1.MatFormFieldModule,
1052
- i5$1.MatButtonModule,
1053
- tabs.MatTabsModule,
1054
- i6.MatIconModule,
1055
- i5$2.MatSelectModule,
1056
- i8$1.MatButtonToggleModule,
1057
- i2$2.FsListModule,
1058
- i3$3.FsDateModule,
1059
- i7.FsCommonModule,
1060
- i5.FsFormModule,
1061
- i3.FsLabelModule,
1062
- i8.FsSkeletonModule,
1063
- htmlEditor.FsHtmlEditorModule,
1064
- i3$1.FsDialogModule,
1065
- i4.FsTextEditorModule,
1066
- FsContentEditorModule,
1067
- ]] });
1068
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, decorators: [{
1069
- type: i0.NgModule,
1070
- args: [{
1071
- imports: [
1072
- i10.CommonModule,
1073
- i9.FormsModule,
1074
- i1.MatDialogModule,
1075
- i8$2.MatInputModule,
1076
- i4$1.MatFormFieldModule,
1077
- i5$1.MatButtonModule,
1078
- tabs.MatTabsModule,
1079
- i6.MatIconModule,
1080
- i5$2.MatSelectModule,
1081
- i8$1.MatButtonToggleModule,
1082
- i2$2.FsListModule,
1083
- i3$3.FsDateModule,
1084
- i7.FsCommonModule,
1085
- i5.FsFormModule,
1086
- i3.FsLabelModule,
1087
- i8.FsSkeletonModule,
1088
- htmlEditor.FsHtmlEditorModule,
1089
- i3$1.FsDialogModule,
1090
- i4.FsTextEditorModule,
1091
- FsContentEditorModule,
1092
- ],
1093
- exports: [
1094
- FsContentPagesComponent,
1095
- ],
1096
- declarations: [
1097
- FsContentPagesComponent,
1098
- ContentPageComponent,
1099
- ContentPageEditorComponent,
1100
- ],
1101
- }]
1035
+ var FsContentPagesModule = /** @class */ (function () {
1036
+ function FsContentPagesModule() {
1037
+ }
1038
+ FsContentPagesModule.forRoot = function () {
1039
+ return {
1040
+ ngModule: FsContentPagesModule,
1041
+ };
1042
+ };
1043
+ return FsContentPagesModule;
1044
+ }());
1045
+ FsContentPagesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1046
+ FsContentPagesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, declarations: [FsContentPagesComponent,
1047
+ ContentPageComponent,
1048
+ ContentPageEditorComponent], imports: [i10.CommonModule,
1049
+ i9.FormsModule,
1050
+ i1.MatDialogModule,
1051
+ i8$2.MatInputModule,
1052
+ i4$1.MatFormFieldModule,
1053
+ i5$1.MatButtonModule,
1054
+ tabs.MatTabsModule,
1055
+ i6.MatIconModule,
1056
+ i5$2.MatSelectModule,
1057
+ i8$1.MatButtonToggleModule,
1058
+ i2$2.FsListModule,
1059
+ i3$3.FsDateModule,
1060
+ i7.FsCommonModule,
1061
+ i5.FsFormModule,
1062
+ i3.FsLabelModule,
1063
+ i8.FsSkeletonModule,
1064
+ htmlEditor.FsHtmlEditorModule,
1065
+ i3$1.FsDialogModule,
1066
+ i4.FsTextEditorModule,
1067
+ FsContentEditorModule], exports: [FsContentPagesComponent] });
1068
+ FsContentPagesModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, imports: [[
1069
+ i10.CommonModule,
1070
+ i9.FormsModule,
1071
+ i1.MatDialogModule,
1072
+ i8$2.MatInputModule,
1073
+ i4$1.MatFormFieldModule,
1074
+ i5$1.MatButtonModule,
1075
+ tabs.MatTabsModule,
1076
+ i6.MatIconModule,
1077
+ i5$2.MatSelectModule,
1078
+ i8$1.MatButtonToggleModule,
1079
+ i2$2.FsListModule,
1080
+ i3$3.FsDateModule,
1081
+ i7.FsCommonModule,
1082
+ i5.FsFormModule,
1083
+ i3.FsLabelModule,
1084
+ i8.FsSkeletonModule,
1085
+ htmlEditor.FsHtmlEditorModule,
1086
+ i3$1.FsDialogModule,
1087
+ i4.FsTextEditorModule,
1088
+ FsContentEditorModule,
1089
+ ]] });
1090
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentPagesModule, decorators: [{
1091
+ type: i0.NgModule,
1092
+ args: [{
1093
+ imports: [
1094
+ i10.CommonModule,
1095
+ i9.FormsModule,
1096
+ i1.MatDialogModule,
1097
+ i8$2.MatInputModule,
1098
+ i4$1.MatFormFieldModule,
1099
+ i5$1.MatButtonModule,
1100
+ tabs.MatTabsModule,
1101
+ i6.MatIconModule,
1102
+ i5$2.MatSelectModule,
1103
+ i8$1.MatButtonToggleModule,
1104
+ i2$2.FsListModule,
1105
+ i3$3.FsDateModule,
1106
+ i7.FsCommonModule,
1107
+ i5.FsFormModule,
1108
+ i3.FsLabelModule,
1109
+ i8.FsSkeletonModule,
1110
+ htmlEditor.FsHtmlEditorModule,
1111
+ i3$1.FsDialogModule,
1112
+ i4.FsTextEditorModule,
1113
+ FsContentEditorModule,
1114
+ ],
1115
+ exports: [
1116
+ FsContentPagesComponent,
1117
+ ],
1118
+ declarations: [
1119
+ FsContentPagesComponent,
1120
+ ContentPageComponent,
1121
+ ContentPageEditorComponent,
1122
+ ],
1123
+ }]
1102
1124
  }] });
1103
1125
 
1104
- var ContentStyleComponent = /** @class */ (function () {
1105
- function ContentStyleComponent(_config, _message, _cdRef) {
1106
- this._config = _config;
1107
- this._message = _message;
1108
- this._cdRef = _cdRef;
1109
- this.height = '100%';
1110
- this.contentStyle = null;
1111
- this.styleConfig = {
1112
- tabSize: 2,
1113
- language: 'scss',
1114
- height: '100%',
1115
- };
1116
- this._destroy$ = new rxjs.Subject();
1117
- }
1118
- ContentStyleComponent.prototype.ngOnInit = function () {
1119
- var _this = this;
1120
- this.styleConfig.height = this.height;
1121
- this._config.loadContentStyle()
1122
- .subscribe(function (contentStyle) {
1123
- _this.contentStyle = contentStyle;
1124
- _this._cdRef.markForCheck();
1125
- });
1126
- };
1127
- ContentStyleComponent.prototype.ngOnDestroy = function () {
1128
- this._destroy$.next();
1129
- this._destroy$.complete();
1130
- };
1131
- ContentStyleComponent.prototype.save = function () {
1132
- var _this = this;
1133
- this._config.saveContentStyle(this.contentStyle)
1134
- .pipe(operators.tap(function (contentStyle) {
1135
- _this.contentStyle = Object.assign(Object.assign({}, _this.contentStyle), contentStyle);
1136
- _this._cdRef.markForCheck();
1137
- _this._message.success('Saved Changes');
1138
- })).subscribe();
1139
- };
1140
- return ContentStyleComponent;
1141
- }());
1142
- ContentStyleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentStyleComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1143
- ContentStyleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentStyleComponent, selector: "fs-content-style", inputs: { height: "height" }, viewQueries: [{ propertyName: "textEditors", first: true, predicate: i4.FsTextEditorComponent, descendants: true }, { propertyName: "form", first: true, predicate: i5.FsFormDirective, descendants: true }], ngImport: i0__namespace, 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: [""], components: [{ type: i4__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7__namespace.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1144
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentStyleComponent, decorators: [{
1145
- type: i0.Component,
1146
- args: [{
1147
- selector: 'fs-content-style',
1148
- templateUrl: './content-style.component.html',
1149
- styleUrls: ['./content-style.component.scss'],
1150
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1151
- }]
1152
- }], ctorParameters: function () {
1153
- return [{ type: undefined, decorators: [{
1154
- type: i0.Inject,
1155
- args: [FS_CONTENT_CONFIG]
1156
- }] }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
1157
- }, propDecorators: { textEditors: [{
1158
- type: i0.ViewChild,
1159
- args: [i4.FsTextEditorComponent]
1160
- }], form: [{
1161
- type: i0.ViewChild,
1162
- args: [i5.FsFormDirective]
1163
- }], height: [{
1164
- type: i0.Input
1126
+ var ContentStyleComponent = /** @class */ (function () {
1127
+ function ContentStyleComponent(_config, _message, _cdRef) {
1128
+ this._config = _config;
1129
+ this._message = _message;
1130
+ this._cdRef = _cdRef;
1131
+ this.height = '100%';
1132
+ this.contentStyle = null;
1133
+ this.styleConfig = {
1134
+ tabSize: 2,
1135
+ language: 'scss',
1136
+ height: '100%',
1137
+ };
1138
+ this._destroy$ = new rxjs.Subject();
1139
+ }
1140
+ ContentStyleComponent.prototype.ngOnInit = function () {
1141
+ var _this = this;
1142
+ this.styleConfig.height = this.height;
1143
+ this._config.loadContentStyle()
1144
+ .subscribe(function (contentStyle) {
1145
+ _this.contentStyle = contentStyle;
1146
+ _this._cdRef.markForCheck();
1147
+ });
1148
+ };
1149
+ ContentStyleComponent.prototype.ngOnDestroy = function () {
1150
+ this._destroy$.next();
1151
+ this._destroy$.complete();
1152
+ };
1153
+ ContentStyleComponent.prototype.save = function () {
1154
+ var _this = this;
1155
+ this._config.saveContentStyle(this.contentStyle)
1156
+ .pipe(operators.tap(function (contentStyle) {
1157
+ _this.contentStyle = Object.assign(Object.assign({}, _this.contentStyle), contentStyle);
1158
+ _this._cdRef.markForCheck();
1159
+ _this._message.success('Saved Changes');
1160
+ })).subscribe();
1161
+ };
1162
+ return ContentStyleComponent;
1163
+ }());
1164
+ ContentStyleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentStyleComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i2__namespace.FsMessage }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
1165
+ ContentStyleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentStyleComponent, selector: "fs-content-style", inputs: { height: "height" }, viewQueries: [{ propertyName: "textEditors", first: true, predicate: i4.FsTextEditorComponent, descendants: true }, { propertyName: "form", first: true, predicate: i5.FsFormDirective, descendants: true }], ngImport: i0__namespace, 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: [""], components: [{ type: i4__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }], directives: [{ type: i8__namespace.FsSkeletonFormDirective, selector: "[fsSkeletonForm]", inputs: ["fsSkeletonForm", "fsSkeletonFormLines"] }, { type: i9__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i9__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i7__namespace.FsModelChangeDirective, selector: "[fsModelChange]", inputs: ["fsModelChangeOptions"], outputs: ["fsModelChange"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1166
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentStyleComponent, decorators: [{
1167
+ type: i0.Component,
1168
+ args: [{
1169
+ selector: 'fs-content-style',
1170
+ templateUrl: './content-style.component.html',
1171
+ styleUrls: ['./content-style.component.scss'],
1172
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1173
+ }]
1174
+ }], ctorParameters: function () {
1175
+ return [{ type: undefined, decorators: [{
1176
+ type: i0.Inject,
1177
+ args: [FS_CONTENT_CONFIG]
1178
+ }] }, { type: i2__namespace.FsMessage }, { type: i0__namespace.ChangeDetectorRef }];
1179
+ }, propDecorators: { textEditors: [{
1180
+ type: i0.ViewChild,
1181
+ args: [i4.FsTextEditorComponent]
1182
+ }], form: [{
1183
+ type: i0.ViewChild,
1184
+ args: [i5.FsFormDirective]
1185
+ }], height: [{
1186
+ type: i0.Input
1165
1187
  }] } });
1166
1188
 
1167
- var FsContentStyleModule = /** @class */ (function () {
1168
- function FsContentStyleModule() {
1169
- }
1170
- return FsContentStyleModule;
1171
- }());
1172
- FsContentStyleModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1173
- FsContentStyleModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, declarations: [ContentStyleComponent], imports: [i10.CommonModule,
1174
- i9.FormsModule,
1175
- i5$1.MatButtonModule,
1176
- i4.FsTextEditorModule,
1177
- i8.FsSkeletonModule,
1178
- i7.FsCommonModule,
1179
- FsContentEditorModule], exports: [ContentStyleComponent] });
1180
- FsContentStyleModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, imports: [[
1181
- i10.CommonModule,
1182
- i9.FormsModule,
1183
- i5$1.MatButtonModule,
1184
- i4.FsTextEditorModule,
1185
- i8.FsSkeletonModule,
1186
- i7.FsCommonModule,
1187
- FsContentEditorModule,
1188
- ]] });
1189
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, decorators: [{
1190
- type: i0.NgModule,
1191
- args: [{
1192
- imports: [
1193
- i10.CommonModule,
1194
- i9.FormsModule,
1195
- i5$1.MatButtonModule,
1196
- i4.FsTextEditorModule,
1197
- i8.FsSkeletonModule,
1198
- i7.FsCommonModule,
1199
- FsContentEditorModule,
1200
- ],
1201
- exports: [
1202
- ContentStyleComponent,
1203
- ],
1204
- declarations: [
1205
- ContentStyleComponent,
1206
- ],
1207
- }]
1189
+ var FsContentStyleModule = /** @class */ (function () {
1190
+ function FsContentStyleModule() {
1191
+ }
1192
+ return FsContentStyleModule;
1193
+ }());
1194
+ FsContentStyleModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1195
+ FsContentStyleModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, declarations: [ContentStyleComponent], imports: [i10.CommonModule,
1196
+ i9.FormsModule,
1197
+ i5$1.MatButtonModule,
1198
+ i4.FsTextEditorModule,
1199
+ i8.FsSkeletonModule,
1200
+ i7.FsCommonModule,
1201
+ FsContentEditorModule], exports: [ContentStyleComponent] });
1202
+ FsContentStyleModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, imports: [[
1203
+ i10.CommonModule,
1204
+ i9.FormsModule,
1205
+ i5$1.MatButtonModule,
1206
+ i4.FsTextEditorModule,
1207
+ i8.FsSkeletonModule,
1208
+ i7.FsCommonModule,
1209
+ FsContentEditorModule,
1210
+ ]] });
1211
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentStyleModule, decorators: [{
1212
+ type: i0.NgModule,
1213
+ args: [{
1214
+ imports: [
1215
+ i10.CommonModule,
1216
+ i9.FormsModule,
1217
+ i5$1.MatButtonModule,
1218
+ i4.FsTextEditorModule,
1219
+ i8.FsSkeletonModule,
1220
+ i7.FsCommonModule,
1221
+ FsContentEditorModule,
1222
+ ],
1223
+ exports: [
1224
+ ContentStyleComponent,
1225
+ ],
1226
+ declarations: [
1227
+ ContentStyleComponent,
1228
+ ],
1229
+ }]
1208
1230
  }] });
1209
1231
 
1210
- var ContentRendererComponent = /** @class */ (function () {
1211
- function ContentRendererComponent(_sanitizer, _router, _el, _htmlRenderer) {
1212
- this._sanitizer = _sanitizer;
1213
- this._router = _router;
1214
- this._el = _el;
1215
- this._htmlRenderer = _htmlRenderer;
1216
- this._destroy$ = new rxjs.Subject();
1217
- }
1218
- ContentRendererComponent.prototype.ngOnInit = function () {
1219
- this._htmlRenderer.addStyle(this.contentPage.styles, { id: 'contentPageStyles' });
1220
- this.content = this._sanitizer.bypassSecurityTrustHtml(this.contentPage.content);
1221
- };
1222
- ContentRendererComponent.prototype.ngAfterViewChecked = function () {
1223
- this.registerHrefs();
1224
- if (this.contentPage.js) {
1225
- var script = document.createElement('script');
1226
- script.text = this.contentPage.js;
1227
- this.script.nativeElement.after(script);
1228
- }
1229
- };
1230
- ContentRendererComponent.prototype.registerHrefs = function () {
1231
- var _this = this;
1232
- Array.from(this.el.querySelectorAll('a[href]'))
1233
- .filter(function (el) {
1234
- return el.getAttribute('href').match(/^\//);
1235
- })
1236
- .forEach(function (el) {
1237
- el.addEventListener('click', function (event) {
1238
- if (!event.shiftKey && !event.ctrlKey) {
1239
- event.preventDefault();
1240
- var href = el.getAttribute('href');
1241
- _this._router.navigateByUrl(href);
1242
- }
1243
- });
1244
- });
1245
- };
1246
- Object.defineProperty(ContentRendererComponent.prototype, "el", {
1247
- get: function () {
1248
- return this._el.nativeElement;
1249
- },
1250
- enumerable: false,
1251
- configurable: true
1252
- });
1253
- ContentRendererComponent.prototype.ngOnDestroy = function () {
1254
- this.removeStyles();
1255
- this._destroy$.next();
1256
- this._destroy$.complete();
1257
- };
1258
- ContentRendererComponent.prototype.removeStyles = function () {
1259
- var el = document.querySelector('#contentPageStyles');
1260
- if (el) {
1261
- el.remove();
1262
- }
1263
- };
1264
- return ContentRendererComponent;
1265
- }());
1266
- ContentRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentRendererComponent, deps: [{ token: i1__namespace$1.DomSanitizer }, { token: i2__namespace$3.Router }, { token: i0__namespace.ElementRef }, { token: i3__namespace$4.HtmlRenderer }], target: i0__namespace.ɵɵFactoryTarget.Component });
1267
- ContentRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1268
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentRendererComponent, decorators: [{
1269
- type: i0.Component,
1270
- args: [{
1271
- selector: 'fs-content-renderer',
1272
- templateUrl: './content-renderer.component.html',
1273
- styleUrls: ['./content-renderer.component.scss'],
1274
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1275
- }]
1276
- }], ctorParameters: function () { return [{ type: i1__namespace$1.DomSanitizer }, { type: i2__namespace$3.Router }, { type: i0__namespace.ElementRef }, { type: i3__namespace$4.HtmlRenderer }]; }, propDecorators: { script: [{
1277
- type: i0.ViewChild,
1278
- args: ['script', { read: i0.ElementRef }]
1279
- }], contentPage: [{
1280
- type: i0.Input
1232
+ var ContentRendererComponent = /** @class */ (function () {
1233
+ function ContentRendererComponent(_sanitizer, _router, _el, _htmlRenderer) {
1234
+ this._sanitizer = _sanitizer;
1235
+ this._router = _router;
1236
+ this._el = _el;
1237
+ this._htmlRenderer = _htmlRenderer;
1238
+ this._destroy$ = new rxjs.Subject();
1239
+ }
1240
+ ContentRendererComponent.prototype.ngOnInit = function () {
1241
+ this._htmlRenderer.addStyle(this.contentPage.styles, { id: 'contentPageStyles' });
1242
+ this.content = this._sanitizer.bypassSecurityTrustHtml(this.contentPage.content);
1243
+ };
1244
+ ContentRendererComponent.prototype.ngAfterViewChecked = function () {
1245
+ this.registerHrefs();
1246
+ if (this.contentPage.js) {
1247
+ var script = document.createElement('script');
1248
+ script.text = this.contentPage.js;
1249
+ this.script.nativeElement.after(script);
1250
+ }
1251
+ };
1252
+ ContentRendererComponent.prototype.registerHrefs = function () {
1253
+ var _this = this;
1254
+ Array.from(this.el.querySelectorAll('a[href]'))
1255
+ .filter(function (el) {
1256
+ return el.getAttribute('href').match(/^\//);
1257
+ })
1258
+ .forEach(function (el) {
1259
+ el.addEventListener('click', function (event) {
1260
+ if (!event.shiftKey && !event.ctrlKey) {
1261
+ event.preventDefault();
1262
+ var href = el.getAttribute('href');
1263
+ _this._router.navigateByUrl(href);
1264
+ }
1265
+ });
1266
+ });
1267
+ };
1268
+ Object.defineProperty(ContentRendererComponent.prototype, "el", {
1269
+ get: function () {
1270
+ return this._el.nativeElement;
1271
+ },
1272
+ enumerable: false,
1273
+ configurable: true
1274
+ });
1275
+ ContentRendererComponent.prototype.ngOnDestroy = function () {
1276
+ this.removeStyles();
1277
+ this._destroy$.next();
1278
+ this._destroy$.complete();
1279
+ };
1280
+ ContentRendererComponent.prototype.removeStyles = function () {
1281
+ var el = document.querySelector('#contentPageStyles');
1282
+ if (el) {
1283
+ el.remove();
1284
+ }
1285
+ };
1286
+ return ContentRendererComponent;
1287
+ }());
1288
+ ContentRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentRendererComponent, deps: [{ token: i1__namespace$1.DomSanitizer }, { token: i2__namespace$3.Router }, { token: i0__namespace.ElementRef }, { token: i3__namespace$4.HtmlRenderer }], target: i0__namespace.ɵɵFactoryTarget.Component });
1289
+ ContentRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: i0.ElementRef }], ngImport: i0__namespace, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1290
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: ContentRendererComponent, decorators: [{
1291
+ type: i0.Component,
1292
+ args: [{
1293
+ selector: 'fs-content-renderer',
1294
+ templateUrl: './content-renderer.component.html',
1295
+ styleUrls: ['./content-renderer.component.scss'],
1296
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1297
+ }]
1298
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.DomSanitizer }, { type: i2__namespace$3.Router }, { type: i0__namespace.ElementRef }, { type: i3__namespace$4.HtmlRenderer }]; }, propDecorators: { script: [{
1299
+ type: i0.ViewChild,
1300
+ args: ['script', { read: i0.ElementRef }]
1301
+ }], contentPage: [{
1302
+ type: i0.Input
1281
1303
  }] } });
1282
1304
 
1283
- var FsContentComponent = /** @class */ (function () {
1284
- function FsContentComponent(_config, _title, _cdRef, _router, _el, _htmlRenderer) {
1285
- this._config = _config;
1286
- this._title = _title;
1287
- this._cdRef = _cdRef;
1288
- this._router = _router;
1289
- this._el = _el;
1290
- this._htmlRenderer = _htmlRenderer;
1291
- this._destroy$ = new rxjs.Subject();
1292
- }
1293
- FsContentComponent.prototype.ngOnInit = function () {
1294
- this._initContent();
1295
- this._initStyles();
1296
- };
1297
- Object.defineProperty(FsContentComponent.prototype, "el", {
1298
- get: function () {
1299
- return this._el.nativeElement;
1300
- },
1301
- enumerable: false,
1302
- configurable: true
1303
- });
1304
- FsContentComponent.prototype.ngOnDestroy = function () {
1305
- this._destroy$.next();
1306
- this._destroy$.complete();
1307
- this._title.setTitle('');
1308
- };
1309
- FsContentComponent.prototype._initStyles = function () {
1310
- var _this = this;
1311
- if (this._config.loadContentStyleCss) {
1312
- this._config.loadContentStyleCss()
1313
- .subscribe(function (styles) {
1314
- _this._htmlRenderer.addStyle(styles, { id: 'content-sytle' });
1315
- });
1316
- }
1317
- };
1318
- FsContentComponent.prototype._initContent = function () {
1319
- var _this = this;
1320
- this._loadContent();
1321
- this._router.events
1322
- .pipe(operators.filter(function (e) { return e instanceof i2$3.NavigationEnd; }), operators.takeUntil(this._destroy$))
1323
- .subscribe(function (e) {
1324
- _this._loadContent();
1325
- });
1326
- };
1327
- FsContentComponent.prototype._loadContent = function () {
1328
- var _this = this;
1329
- var path = window.location.pathname;
1330
- this._config.loadContent(path)
1331
- .subscribe(function (contentPage) {
1332
- if (contentPage.title) {
1333
- _this._title.setTitle(contentPage.title);
1334
- var ogTitleEl = document.querySelector('head meta[property="og:title"]');
1335
- if (!ogTitleEl) {
1336
- ogTitleEl = document.createElement('meta');
1337
- ogTitleEl.setAttribute('property', 'og:title');
1338
- document.getElementsByTagName('head')[0].appendChild(ogTitleEl);
1339
- }
1340
- ogTitleEl.setAttribute('content', contentPage.title);
1341
- }
1342
- _this.contentPage = contentPage;
1343
- _this._cdRef.markForCheck();
1344
- });
1345
- };
1346
- return FsContentComponent;
1347
- }());
1348
- FsContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace$1.Title }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$3.Router }, { token: i0__namespace.ElementRef }, { token: i3__namespace$4.HtmlRenderer }], target: i0__namespace.ɵɵFactoryTarget.Component });
1349
- FsContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentComponent, selector: "fs-content", ngImport: i0__namespace, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""], components: [{ type: ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1350
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentComponent, decorators: [{
1351
- type: i0.Component,
1352
- args: [{
1353
- selector: 'fs-content',
1354
- templateUrl: './content.component.html',
1355
- styleUrls: ['./content.component.scss'],
1356
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1357
- }]
1358
- }], ctorParameters: function () {
1359
- return [{ type: undefined, decorators: [{
1360
- type: i0.Inject,
1361
- args: [FS_CONTENT_CONFIG]
1362
- }] }, { type: i1__namespace$1.Title }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$3.Router }, { type: i0__namespace.ElementRef }, { type: i3__namespace$4.HtmlRenderer }];
1305
+ var FsContentComponent = /** @class */ (function () {
1306
+ function FsContentComponent(_config, _title, _cdRef, _router, _el, _htmlRenderer) {
1307
+ this._config = _config;
1308
+ this._title = _title;
1309
+ this._cdRef = _cdRef;
1310
+ this._router = _router;
1311
+ this._el = _el;
1312
+ this._htmlRenderer = _htmlRenderer;
1313
+ this._destroy$ = new rxjs.Subject();
1314
+ }
1315
+ FsContentComponent.prototype.ngOnInit = function () {
1316
+ this._initContent();
1317
+ this._initStyles();
1318
+ };
1319
+ Object.defineProperty(FsContentComponent.prototype, "el", {
1320
+ get: function () {
1321
+ return this._el.nativeElement;
1322
+ },
1323
+ enumerable: false,
1324
+ configurable: true
1325
+ });
1326
+ FsContentComponent.prototype.ngOnDestroy = function () {
1327
+ this._destroy$.next();
1328
+ this._destroy$.complete();
1329
+ this._title.setTitle('');
1330
+ };
1331
+ FsContentComponent.prototype._initStyles = function () {
1332
+ var _this = this;
1333
+ if (this._config.loadContentStyleCss) {
1334
+ this._config.loadContentStyleCss()
1335
+ .subscribe(function (styles) {
1336
+ _this._htmlRenderer.addStyle(styles, { id: 'content-sytle' });
1337
+ });
1338
+ }
1339
+ };
1340
+ FsContentComponent.prototype._initContent = function () {
1341
+ var _this = this;
1342
+ this._loadContent();
1343
+ this._router.events
1344
+ .pipe(operators.filter(function (e) { return e instanceof i2$3.NavigationEnd; }), operators.takeUntil(this._destroy$))
1345
+ .subscribe(function (e) {
1346
+ _this._loadContent();
1347
+ });
1348
+ };
1349
+ FsContentComponent.prototype._loadContent = function () {
1350
+ var _this = this;
1351
+ var path = window.location.pathname;
1352
+ this._config.loadContent(path)
1353
+ .subscribe(function (contentPage) {
1354
+ if (contentPage.title) {
1355
+ _this._title.setTitle(contentPage.title);
1356
+ var ogTitleEl = document.querySelector('head meta[property="og:title"]');
1357
+ if (!ogTitleEl) {
1358
+ ogTitleEl = document.createElement('meta');
1359
+ ogTitleEl.setAttribute('property', 'og:title');
1360
+ document.getElementsByTagName('head')[0].appendChild(ogTitleEl);
1361
+ }
1362
+ ogTitleEl.setAttribute('content', contentPage.title);
1363
+ }
1364
+ _this.contentPage = contentPage;
1365
+ _this._cdRef.markForCheck();
1366
+ });
1367
+ };
1368
+ return FsContentComponent;
1369
+ }());
1370
+ FsContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1__namespace$1.Title }, { token: i0__namespace.ChangeDetectorRef }, { token: i2__namespace$3.Router }, { token: i0__namespace.ElementRef }, { token: i3__namespace$4.HtmlRenderer }], target: i0__namespace.ɵɵFactoryTarget.Component });
1371
+ FsContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentComponent, selector: "fs-content", ngImport: i0__namespace, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""], components: [{ type: ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], directives: [{ type: i10__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1372
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentComponent, decorators: [{
1373
+ type: i0.Component,
1374
+ args: [{
1375
+ selector: 'fs-content',
1376
+ templateUrl: './content.component.html',
1377
+ styleUrls: ['./content.component.scss'],
1378
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1379
+ }]
1380
+ }], ctorParameters: function () {
1381
+ return [{ type: undefined, decorators: [{
1382
+ type: i0.Inject,
1383
+ args: [FS_CONTENT_CONFIG]
1384
+ }] }, { type: i1__namespace$1.Title }, { type: i0__namespace.ChangeDetectorRef }, { type: i2__namespace$3.Router }, { type: i0__namespace.ElementRef }, { type: i3__namespace$4.HtmlRenderer }];
1363
1385
  } });
1364
1386
 
1365
- var FsContentModule = /** @class */ (function () {
1366
- function FsContentModule() {
1367
- }
1368
- return FsContentModule;
1369
- }());
1370
- FsContentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1371
- FsContentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, declarations: [FsContentComponent,
1372
- ContentRendererComponent], imports: [i10.CommonModule,
1373
- htmlEditor.FsHtmlEditorModule], exports: [FsContentComponent] });
1374
- FsContentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, imports: [[
1375
- i10.CommonModule,
1376
- htmlEditor.FsHtmlEditorModule,
1377
- ]] });
1378
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, decorators: [{
1379
- type: i0.NgModule,
1380
- args: [{
1381
- imports: [
1382
- i10.CommonModule,
1383
- htmlEditor.FsHtmlEditorModule,
1384
- ],
1385
- exports: [
1386
- FsContentComponent,
1387
- ],
1388
- declarations: [
1389
- FsContentComponent,
1390
- ContentRendererComponent,
1391
- ],
1392
- }]
1387
+ var FsContentModule = /** @class */ (function () {
1388
+ function FsContentModule() {
1389
+ }
1390
+ return FsContentModule;
1391
+ }());
1392
+ FsContentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1393
+ FsContentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, declarations: [FsContentComponent,
1394
+ ContentRendererComponent], imports: [i10.CommonModule,
1395
+ htmlEditor.FsHtmlEditorModule], exports: [FsContentComponent] });
1396
+ FsContentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, imports: [[
1397
+ i10.CommonModule,
1398
+ htmlEditor.FsHtmlEditorModule,
1399
+ ]] });
1400
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentModule, decorators: [{
1401
+ type: i0.NgModule,
1402
+ args: [{
1403
+ imports: [
1404
+ i10.CommonModule,
1405
+ htmlEditor.FsHtmlEditorModule,
1406
+ ],
1407
+ exports: [
1408
+ FsContentComponent,
1409
+ ],
1410
+ declarations: [
1411
+ FsContentComponent,
1412
+ ContentRendererComponent,
1413
+ ],
1414
+ }]
1393
1415
  }] });
1394
1416
 
1395
- /**
1396
- * Generated bundle index. Do not edit.
1417
+ /**
1418
+ * Generated bundle index. Do not edit.
1397
1419
  */
1398
1420
 
1399
1421
  exports.ContentStyleComponent = ContentStyleComponent;