@firestitch/content-widget 12.1.0 → 12.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/app/content-widget/components/content-widget/content-widget.component.d.ts +15 -15
  2. package/app/content-widget/components/content-widget/index.d.ts +1 -1
  3. package/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.d.ts +16 -0
  4. package/app/content-widget/components/content-widget-renderer/index.d.ts +1 -0
  5. package/app/content-widget/fs-content-widget.module.d.ts +12 -11
  6. package/app/content-widget/injectors/content-wiget.injector.d.ts +2 -2
  7. package/app/content-widget/injectors/index.d.ts +1 -1
  8. package/app/content-widget/interfaces/content-widget-config.d.ts +4 -4
  9. package/app/content-widgets/components/content-widget/content-widget.component.d.ts +17 -17
  10. package/app/content-widgets/components/content-widget/index.d.ts +1 -1
  11. package/app/content-widgets/components/content-widgets/content-widgets.component.d.ts +24 -24
  12. package/app/content-widgets/components/content-widgets/index.d.ts +1 -1
  13. package/app/content-widgets/fs-content-widgets.module.d.ts +23 -23
  14. package/bundles/firestitch-content-widget.umd.js +294 -237
  15. package/bundles/firestitch-content-widget.umd.js.map +1 -1
  16. package/esm2015/app/content-widget/components/content-widget/content-widget.component.js +42 -42
  17. package/esm2015/app/content-widget/components/content-widget/index.js +1 -1
  18. package/esm2015/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.js +52 -0
  19. package/esm2015/app/content-widget/components/content-widget-renderer/index.js +2 -0
  20. package/esm2015/app/content-widget/fs-content-widget.module.js +41 -35
  21. package/esm2015/app/content-widget/injectors/content-wiget.injector.js +2 -2
  22. package/esm2015/app/content-widget/injectors/index.js +1 -1
  23. package/esm2015/app/content-widget/interfaces/content-widget-config.js +1 -1
  24. package/esm2015/app/content-widgets/components/content-widget/content-widget.component.js +47 -47
  25. package/esm2015/app/content-widgets/components/content-widget/index.js +1 -1
  26. package/esm2015/app/content-widgets/components/content-widgets/content-widgets.component.js +71 -71
  27. package/esm2015/app/content-widgets/components/content-widgets/index.js +1 -1
  28. package/esm2015/app/content-widgets/fs-content-widgets.module.js +81 -81
  29. package/esm2015/firestitch-content-widget.js +4 -4
  30. package/esm2015/public_api.js +5 -5
  31. package/fesm2015/firestitch-content-widget.js +269 -218
  32. package/fesm2015/firestitch-content-widget.js.map +1 -1
  33. package/firestitch-content-widget.d.ts +5 -5
  34. package/package.json +1 -2
  35. package/public_api.d.ts +6 -6
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/tabs'), require('@angular/material/dialog'), require('@angular/forms'), require('@angular/material/input'), require('@angular/material/form-field'), require('@firestitch/list'), require('@firestitch/date'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/html-editor'), require('@firestitch/text-editor'), require('rxjs/operators'), require('@firestitch/message'), require('@firestitch/filter'), require('rxjs')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/content-widget', ['exports', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/tabs', '@angular/material/dialog', '@angular/forms', '@angular/material/input', '@angular/material/form-field', '@firestitch/list', '@firestitch/date', '@firestitch/dialog', '@firestitch/form', '@firestitch/html-editor', '@firestitch/text-editor', 'rxjs/operators', '@firestitch/message', '@firestitch/filter', 'rxjs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["content-widget"] = {}), global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.tabs, global.ng.material.dialog, global.ng.forms, global.ng.material.input, global.ng.material.formField, global.i2$1, global.i3$1, global.i2, global.i9, global.i4, global.i5, global.rxjs.operators, global.i1, global.filter, global.rxjs));
5
- })(this, (function (exports, i0, i2$2, i7, i3, i10, i8, i11, i6, i2$1, i3$1, i2, i9, i4, i5, operators, i1, filter, rxjs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/material/button'), require('@angular/material/tabs'), require('@angular/material/dialog'), require('@angular/forms'), require('@angular/material/input'), require('@angular/material/form-field'), require('@firestitch/list'), require('@firestitch/date'), require('@firestitch/dialog'), require('@firestitch/form'), require('@firestitch/html-editor'), require('@firestitch/text-editor'), require('rxjs/operators'), require('@firestitch/message'), require('@firestitch/filter'), require('rxjs'), require('@angular/router')) :
3
+ typeof define === 'function' && define.amd ? define('@firestitch/content-widget', ['exports', '@angular/core', '@angular/common', '@angular/material/button', '@angular/material/tabs', '@angular/material/dialog', '@angular/forms', '@angular/material/input', '@angular/material/form-field', '@firestitch/list', '@firestitch/date', '@firestitch/dialog', '@firestitch/form', '@firestitch/html-editor', '@firestitch/text-editor', 'rxjs/operators', '@firestitch/message', '@firestitch/filter', 'rxjs', '@angular/router'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch["content-widget"] = {}), global.ng.core, global.ng.common, global.ng.material.button, global.ng.material.tabs, global.ng.material.dialog, global.ng.forms, global.ng.material.input, global.ng.material.formField, global.i2$1, global.i3$1, global.i2, global.i9, global.i5, global.i4, global.rxjs.operators, global.i1, global.filter, global.rxjs, global.ng.router));
5
+ })(this, (function (exports, i0, i3$2, i7, i3, i10, i8, i11, i6, i2$1, i3$1, i2, i9, i5, i4, operators, i1, filter, rxjs, i1$1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
26
+ var i3__namespace$2 = /*#__PURE__*/_interopNamespace(i3$2);
27
27
  var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
28
28
  var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
29
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
@@ -34,253 +34,310 @@
34
34
  var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
35
35
  var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
36
36
  var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
37
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
38
37
  var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
38
+ var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
39
39
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
40
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
40
41
 
41
- var FsContentWidgetComponent$1 = /** @class */ (function () {
42
- function FsContentWidgetComponent(_message, _data) {
43
- var _this = this;
44
- this._message = _message;
45
- this._data = _data;
46
- this.save = function () {
47
- return _this._saveContentWidget(_this.contentWidget)
48
- .pipe(operators.tap(function (contentWidget) {
49
- _this.contentWidget = Object.assign(Object.assign({}, _this.contentWidget), contentWidget);
50
- _this._message.success('Saved Changes');
51
- }));
52
- };
53
- }
54
- FsContentWidgetComponent.prototype.ngOnInit = function () {
55
- this._saveContentWidget = this._data.saveContentWidget;
56
- this.htmlEditorConfig = this._data.htmlEditorConfig || {};
57
- this.contentWidget = Object.assign({}, this._data.contentWidget);
58
- };
59
- return FsContentWidgetComponent;
60
- }());
61
- FsContentWidgetComponent$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, deps: [{ token: i1__namespace.FsMessage }, { token: i10.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
62
- FsContentWidgetComponent$1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent$1, selector: "ng-component", ngImport: i0__namespace, template: "\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>\n Content Widget\n <div class=\"subtitle\">{{contentWidget.name}}</div>\n </div>\n <mat-dialog-content>\n\n <mat-tab-group>\n <mat-tab label=\"Rich Text\">\n <ng-template matTabContent>\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"HTML\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.content\" \n [config]=\"{ language: 'html' }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.styles\" \n [config]=\"{ language: 'css' }\"\n name=\"css\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input \n matInput \n placeholder=\"Name\" \n [(ngModel)]=\"contentWidget.name\" \n name=\"name\" \n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n color=\"primary\">\n Save\n </button>\n <button \n mat-button \n [mat-dialog-close]=\"null\" \n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["mat-form-field{width:100%}fs-html-editor{min-height:400px;display:block;overflow:hidden}.subtitle{font-size:60%;line-height:normal}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i4__namespace.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i5__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace.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"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i10__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i10__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11__namespace.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: i8__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.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
63
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, decorators: [{
64
- type: i0.Component,
65
- args: [{
66
- templateUrl: './content-widget.component.html',
67
- styleUrls: ['./content-widget.component.scss'],
68
- }]
69
- }], ctorParameters: function () {
70
- return [{ type: i1__namespace.FsMessage }, { type: undefined, decorators: [{
71
- type: i0.Inject,
72
- args: [i10.MAT_DIALOG_DATA]
73
- }] }];
42
+ var FsContentWidgetComponent$1 = /** @class */ (function () {
43
+ function FsContentWidgetComponent(_message, _data) {
44
+ var _this = this;
45
+ this._message = _message;
46
+ this._data = _data;
47
+ this.save = function () {
48
+ return _this._saveContentWidget(_this.contentWidget)
49
+ .pipe(operators.tap(function (contentWidget) {
50
+ _this.contentWidget = Object.assign(Object.assign({}, _this.contentWidget), contentWidget);
51
+ _this._message.success('Saved Changes');
52
+ }));
53
+ };
54
+ }
55
+ FsContentWidgetComponent.prototype.ngOnInit = function () {
56
+ this._saveContentWidget = this._data.saveContentWidget;
57
+ this.htmlEditorConfig = this._data.htmlEditorConfig || {};
58
+ this.contentWidget = Object.assign({}, this._data.contentWidget);
59
+ };
60
+ return FsContentWidgetComponent;
61
+ }());
62
+ FsContentWidgetComponent$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, deps: [{ token: i1__namespace.FsMessage }, { token: i10.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
63
+ FsContentWidgetComponent$1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent$1, selector: "ng-component", ngImport: i0__namespace, template: "\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>\n Content Widget\n <div class=\"subtitle\">{{contentWidget.name}}</div>\n </div>\n <mat-dialog-content>\n\n <mat-tab-group>\n <mat-tab label=\"HTML\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"{ language: 'html', tabSize: 2 }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Rich Text\">\n <ng-template matTabContent>\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.styles\"\n [config]=\"{ language: 'scss', tabSize: 2 }\"\n name=\"styles\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"contentWidget.name\"\n name=\"name\"\n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\">\n Save\n </button>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["mat-form-field{width:100%}fs-html-editor{min-height:400px;display:block;overflow:hidden}.subtitle{font-size:60%;line-height:normal}\n"], components: [{ type: i2__namespace.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3__namespace.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3__namespace.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i4__namespace.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i5__namespace.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i6__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7__namespace.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"] }], directives: [{ type: i8__namespace.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8__namespace.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8__namespace.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9__namespace.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"] }, { type: i10__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i10__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3__namespace.MatTabContent, selector: "[matTabContent]" }, { type: i8__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11__namespace.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: i8__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.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8__namespace.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
64
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, decorators: [{
65
+ type: i0.Component,
66
+ args: [{
67
+ templateUrl: './content-widget.component.html',
68
+ styleUrls: ['./content-widget.component.scss'],
69
+ }]
70
+ }], ctorParameters: function () {
71
+ return [{ type: i1__namespace.FsMessage }, { type: undefined, decorators: [{
72
+ type: i0.Inject,
73
+ args: [i10.MAT_DIALOG_DATA]
74
+ }] }];
74
75
  } });
75
76
 
76
- var FsContentWidgetsComponent = /** @class */ (function () {
77
- function FsContentWidgetsComponent(_dialog) {
78
- this._dialog = _dialog;
79
- this._destroy$ = new rxjs.Subject();
80
- }
81
- FsContentWidgetsComponent.prototype.ngOnInit = function () {
82
- var _this = this;
83
- this.config = {
84
- paging: false,
85
- filters: [
86
- {
87
- name: 'keyword',
88
- type: filter.ItemType.Keyword,
89
- label: 'Search',
90
- },
91
- ],
92
- fetch: function (query) {
93
- return _this.fetchContentWidgets(query.keyword)
94
- .pipe(operators.map(function (data) { return ({ data: data.contentWidgets }); }));
95
- },
96
- };
97
- };
98
- FsContentWidgetsComponent.prototype.ngOnDestroy = function () {
99
- this._destroy$.next();
100
- this._destroy$.complete();
101
- };
102
- FsContentWidgetsComponent.prototype.open = function (contentWidget) {
103
- var _this = this;
104
- var dialogRef = this._dialog.open(FsContentWidgetComponent$1, {
105
- width: '90%',
106
- data: {
107
- contentWidget: contentWidget,
108
- htmlEditorConfig: this.htmlEditorConfig,
109
- saveContentWidget: this.saveContentWidget,
110
- },
111
- });
112
- dialogRef.afterClosed()
113
- .pipe(operators.takeUntil(this._destroy$))
114
- .subscribe(function () {
115
- _this.list.reload();
116
- });
117
- };
118
- return FsContentWidgetsComponent;
119
- }());
120
- FsContentWidgetsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, deps: [{ token: i10__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
121
- FsContentWidgetsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetsComponent, selector: "fs-content-widgets", inputs: { fetchContentWidgets: "fetchContentWidgets", saveContentWidget: "saveContentWidget", htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$1.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\n <fs-list-column class=\"name\">\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Preview</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"preview-container\">\n <div class=\"preview-content\">\n <div [innerHTML]=\"row.content\"></div>\n </div>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"modified\">\n <ng-template fs-list-header>Modified</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.modifiedDate\"></fs-date-ago>\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$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
122
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, decorators: [{
123
- type: i0.Component,
124
- args: [{
125
- selector: 'fs-content-widgets',
126
- templateUrl: './content-widgets.component.html',
127
- styleUrls: ['./content-widgets.component.scss'],
128
- }]
129
- }], ctorParameters: function () { return [{ type: i10__namespace.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
130
- type: i0.Input
131
- }], saveContentWidget: [{
132
- type: i0.Input
133
- }], htmlEditorConfig: [{
134
- type: i0.Input
135
- }], list: [{
136
- type: i0.ViewChild,
137
- args: [i2$1.FsListComponent, { static: true }]
77
+ var FsContentWidgetsComponent = /** @class */ (function () {
78
+ function FsContentWidgetsComponent(_dialog) {
79
+ this._dialog = _dialog;
80
+ this._destroy$ = new rxjs.Subject();
81
+ }
82
+ FsContentWidgetsComponent.prototype.ngOnInit = function () {
83
+ var _this = this;
84
+ this.config = {
85
+ paging: false,
86
+ filters: [
87
+ {
88
+ name: 'keyword',
89
+ type: filter.ItemType.Keyword,
90
+ label: 'Search',
91
+ },
92
+ ],
93
+ fetch: function (query) {
94
+ return _this.fetchContentWidgets(query.keyword)
95
+ .pipe(operators.map(function (data) { return ({ data: data.contentWidgets }); }));
96
+ },
97
+ };
98
+ };
99
+ FsContentWidgetsComponent.prototype.ngOnDestroy = function () {
100
+ this._destroy$.next();
101
+ this._destroy$.complete();
102
+ };
103
+ FsContentWidgetsComponent.prototype.open = function (contentWidget) {
104
+ var _this = this;
105
+ var dialogRef = this._dialog.open(FsContentWidgetComponent$1, {
106
+ width: '90%',
107
+ data: {
108
+ contentWidget: contentWidget,
109
+ htmlEditorConfig: this.htmlEditorConfig,
110
+ saveContentWidget: this.saveContentWidget,
111
+ },
112
+ });
113
+ dialogRef.afterClosed()
114
+ .pipe(operators.takeUntil(this._destroy$))
115
+ .subscribe(function () {
116
+ _this.list.reload();
117
+ });
118
+ };
119
+ return FsContentWidgetsComponent;
120
+ }());
121
+ FsContentWidgetsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, deps: [{ token: i10__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Component });
122
+ FsContentWidgetsComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetsComponent, selector: "fs-content-widgets", inputs: { fetchContentWidgets: "fetchContentWidgets", saveContentWidget: "saveContentWidget", htmlEditorConfig: "htmlEditorConfig" }, viewQueries: [{ propertyName: "list", first: true, predicate: i2$1.FsListComponent, descendants: true, static: true }], ngImport: i0__namespace, template: "<fs-list [config]=\"config\">\n <fs-list-column class=\"name\">\n <ng-template fs-list-header>Name</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <a (click)=\"open(row)\">{{row.name}}</a>\n </ng-template>\n </fs-list-column>\n <fs-list-column>\n <ng-template fs-list-header>Preview</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <div class=\"preview-container\">\n <div class=\"preview-content\">\n <div [innerHTML]=\"row.content\"></div>\n </div>\n </div>\n </ng-template>\n </fs-list-column>\n <fs-list-column class=\"modified\">\n <ng-template fs-list-header>Modified</ng-template>\n <ng-template fs-list-cell let-row=\"row\">\n <fs-date-ago [date]=\"row.modifiedDate\"></fs-date-ago>\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$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3__namespace$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2__namespace$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2__namespace$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2__namespace$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
123
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, decorators: [{
124
+ type: i0.Component,
125
+ args: [{
126
+ selector: 'fs-content-widgets',
127
+ templateUrl: './content-widgets.component.html',
128
+ styleUrls: ['./content-widgets.component.scss'],
129
+ }]
130
+ }], ctorParameters: function () { return [{ type: i10__namespace.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
131
+ type: i0.Input
132
+ }], saveContentWidget: [{
133
+ type: i0.Input
134
+ }], htmlEditorConfig: [{
135
+ type: i0.Input
136
+ }], list: [{
137
+ type: i0.ViewChild,
138
+ args: [i2$1.FsListComponent, { static: true }]
138
139
  }] } });
139
140
 
140
- var FsContentWidgetsModule = /** @class */ (function () {
141
- function FsContentWidgetsModule() {
142
- }
143
- FsContentWidgetsModule.forRoot = function () {
144
- return {
145
- ngModule: FsContentWidgetsModule,
146
- };
147
- };
148
- return FsContentWidgetsModule;
149
- }());
150
- FsContentWidgetsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
151
- FsContentWidgetsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, declarations: [FsContentWidgetsComponent,
152
- FsContentWidgetComponent$1], imports: [i2$2.CommonModule,
153
- i8.FormsModule,
154
- i10.MatDialogModule,
155
- i11.MatInputModule,
156
- i6.MatFormFieldModule,
157
- i7.MatButtonModule,
158
- i3.MatTabsModule,
159
- i2$1.FsListModule,
160
- i3$1.FsDateModule,
161
- i9.FsFormModule,
162
- i4.FsHtmlEditorModule,
163
- i2.FsDialogModule,
164
- i5.FsTextEditorModule], exports: [FsContentWidgetsComponent] });
165
- FsContentWidgetsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, imports: [[
166
- i2$2.CommonModule,
167
- i8.FormsModule,
168
- i10.MatDialogModule,
169
- i11.MatInputModule,
170
- i6.MatFormFieldModule,
171
- i7.MatButtonModule,
172
- i3.MatTabsModule,
173
- i2$1.FsListModule,
174
- i3$1.FsDateModule,
175
- i9.FsFormModule,
176
- i4.FsHtmlEditorModule,
177
- i2.FsDialogModule,
178
- i5.FsTextEditorModule,
179
- ]] });
180
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, decorators: [{
181
- type: i0.NgModule,
182
- args: [{
183
- imports: [
184
- i2$2.CommonModule,
185
- i8.FormsModule,
186
- i10.MatDialogModule,
187
- i11.MatInputModule,
188
- i6.MatFormFieldModule,
189
- i7.MatButtonModule,
190
- i3.MatTabsModule,
191
- i2$1.FsListModule,
192
- i3$1.FsDateModule,
193
- i9.FsFormModule,
194
- i4.FsHtmlEditorModule,
195
- i2.FsDialogModule,
196
- i5.FsTextEditorModule,
197
- ],
198
- exports: [
199
- FsContentWidgetsComponent,
200
- ],
201
- declarations: [
202
- FsContentWidgetsComponent,
203
- FsContentWidgetComponent$1,
204
- ],
205
- }]
141
+ var FsContentWidgetsModule = /** @class */ (function () {
142
+ function FsContentWidgetsModule() {
143
+ }
144
+ FsContentWidgetsModule.forRoot = function () {
145
+ return {
146
+ ngModule: FsContentWidgetsModule,
147
+ };
148
+ };
149
+ return FsContentWidgetsModule;
150
+ }());
151
+ FsContentWidgetsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
152
+ FsContentWidgetsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, declarations: [FsContentWidgetsComponent,
153
+ FsContentWidgetComponent$1], imports: [i3$2.CommonModule,
154
+ i8.FormsModule,
155
+ i10.MatDialogModule,
156
+ i11.MatInputModule,
157
+ i6.MatFormFieldModule,
158
+ i7.MatButtonModule,
159
+ i3.MatTabsModule,
160
+ i2$1.FsListModule,
161
+ i3$1.FsDateModule,
162
+ i9.FsFormModule,
163
+ i5.FsHtmlEditorModule,
164
+ i2.FsDialogModule,
165
+ i4.FsTextEditorModule], exports: [FsContentWidgetsComponent] });
166
+ FsContentWidgetsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, imports: [[
167
+ i3$2.CommonModule,
168
+ i8.FormsModule,
169
+ i10.MatDialogModule,
170
+ i11.MatInputModule,
171
+ i6.MatFormFieldModule,
172
+ i7.MatButtonModule,
173
+ i3.MatTabsModule,
174
+ i2$1.FsListModule,
175
+ i3$1.FsDateModule,
176
+ i9.FsFormModule,
177
+ i5.FsHtmlEditorModule,
178
+ i2.FsDialogModule,
179
+ i4.FsTextEditorModule,
180
+ ]] });
181
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, decorators: [{
182
+ type: i0.NgModule,
183
+ args: [{
184
+ imports: [
185
+ i3$2.CommonModule,
186
+ i8.FormsModule,
187
+ i10.MatDialogModule,
188
+ i11.MatInputModule,
189
+ i6.MatFormFieldModule,
190
+ i7.MatButtonModule,
191
+ i3.MatTabsModule,
192
+ i2$1.FsListModule,
193
+ i3$1.FsDateModule,
194
+ i9.FsFormModule,
195
+ i5.FsHtmlEditorModule,
196
+ i2.FsDialogModule,
197
+ i4.FsTextEditorModule,
198
+ ],
199
+ exports: [
200
+ FsContentWidgetsComponent,
201
+ ],
202
+ declarations: [
203
+ FsContentWidgetsComponent,
204
+ FsContentWidgetComponent$1,
205
+ ],
206
+ }]
206
207
  }] });
207
208
 
208
209
  var FS_CONTENT_WIDGET_CONFIG = new i0.InjectionToken('fs-content-widget-config');
209
210
 
210
- var FsContentWidgetComponent = /** @class */ (function () {
211
- function FsContentWidgetComponent(config, _cdRef) {
212
- this.config = config;
213
- this._cdRef = _cdRef;
214
- this.destroy$ = new rxjs.Subject();
215
- }
216
- FsContentWidgetComponent.prototype.ngOnInit = function () {
217
- var _this = this;
218
- this.config.fetchContentWidget(this.tag)
219
- .pipe(operators.takeUntil(this.destroy$))
220
- .subscribe(function (content) {
221
- _this.content = content;
222
- _this._cdRef.markForCheck();
223
- });
224
- };
225
- FsContentWidgetComponent.prototype.ngOnDestroy = function () {
226
- this.destroy$.next();
227
- this.destroy$.complete();
228
- };
229
- return FsContentWidgetComponent;
230
- }());
231
- FsContentWidgetComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent, deps: [{ token: FS_CONTENT_WIDGET_CONFIG }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
232
- FsContentWidgetComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: { tag: "tag" }, ngImport: i0__namespace, template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: i4__namespace.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i2__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
233
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent, decorators: [{
234
- type: i0.Component,
235
- args: [{
236
- selector: 'fs-content-widget',
237
- templateUrl: './content-widget.component.html',
238
- styleUrls: ['./content-widget.component.scss'],
239
- }]
240
- }], ctorParameters: function () {
241
- return [{ type: undefined, decorators: [{
242
- type: i0.Inject,
243
- args: [FS_CONTENT_WIDGET_CONFIG]
244
- }] }, { type: i0__namespace.ChangeDetectorRef }];
245
- }, propDecorators: { tag: [{
246
- type: i0.Input
211
+ var FsContentWidgetRendererComponent = /** @class */ (function () {
212
+ function FsContentWidgetRendererComponent(_router, _el) {
213
+ this._router = _router;
214
+ this._el = _el;
215
+ this.destroy$ = new rxjs.Subject();
216
+ }
217
+ FsContentWidgetRendererComponent.prototype.ngAfterViewChecked = function () {
218
+ this.registerHrefs();
219
+ };
220
+ Object.defineProperty(FsContentWidgetRendererComponent.prototype, "el", {
221
+ get: function () {
222
+ return this._el.nativeElement;
223
+ },
224
+ enumerable: false,
225
+ configurable: true
226
+ });
227
+ FsContentWidgetRendererComponent.prototype.registerHrefs = function () {
228
+ var _this = this;
229
+ Array.from(this.el.querySelectorAll('a[href]'))
230
+ .filter(function (el) {
231
+ return el.getAttribute('href').match(/^\//);
232
+ })
233
+ .forEach(function (el) {
234
+ el.addEventListener('click', function (event) {
235
+ if (!event.shiftKey && !event.ctrlKey) {
236
+ event.preventDefault();
237
+ var href = el.getAttribute('href');
238
+ _this._router.navigateByUrl(href);
239
+ }
240
+ });
241
+ });
242
+ };
243
+ FsContentWidgetRendererComponent.prototype.ngOnDestroy = function () {
244
+ this.destroy$.next();
245
+ this.destroy$.complete();
246
+ };
247
+ return FsContentWidgetRendererComponent;
248
+ }());
249
+ FsContentWidgetRendererComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetRendererComponent, deps: [{ token: i1__namespace$1.Router }, { token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
250
+ FsContentWidgetRendererComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: { content: "content" }, ngImport: i0__namespace, template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: i5__namespace.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
251
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetRendererComponent, decorators: [{
252
+ type: i0.Component,
253
+ args: [{
254
+ selector: 'fs-content-widget-renderer',
255
+ templateUrl: './content-widget-renderer.component.html',
256
+ styleUrls: ['./content-widget-renderer.component.scss'],
257
+ }]
258
+ }], ctorParameters: function () { return [{ type: i1__namespace$1.Router }, { type: i0__namespace.ElementRef }]; }, propDecorators: { content: [{
259
+ type: i0.Input
247
260
  }] } });
248
261
 
249
- var FsContentWidgetModule = /** @class */ (function () {
250
- function FsContentWidgetModule() {
251
- }
252
- FsContentWidgetModule.forRoot = function () {
253
- return {
254
- ngModule: FsContentWidgetModule,
255
- };
256
- };
257
- return FsContentWidgetModule;
258
- }());
259
- FsContentWidgetModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
260
- FsContentWidgetModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, declarations: [FsContentWidgetComponent], imports: [i2$2.CommonModule,
261
- i4.FsHtmlEditorModule], exports: [FsContentWidgetComponent] });
262
- FsContentWidgetModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, imports: [[
263
- i2$2.CommonModule,
264
- i4.FsHtmlEditorModule,
265
- ]] });
266
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, decorators: [{
267
- type: i0.NgModule,
268
- args: [{
269
- imports: [
270
- i2$2.CommonModule,
271
- i4.FsHtmlEditorModule,
272
- ],
273
- exports: [
274
- FsContentWidgetComponent,
275
- ],
276
- declarations: [
277
- FsContentWidgetComponent,
278
- ],
279
- }]
262
+ var FsContentWidgetComponent = /** @class */ (function () {
263
+ function FsContentWidgetComponent(config, _cdRef) {
264
+ this.config = config;
265
+ this._cdRef = _cdRef;
266
+ this.destroy$ = new rxjs.Subject();
267
+ }
268
+ FsContentWidgetComponent.prototype.ngOnInit = function () {
269
+ var _this = this;
270
+ this.config.fetchContentWidget(this.tag)
271
+ .pipe(operators.takeUntil(this.destroy$))
272
+ .subscribe(function (content) {
273
+ _this.content = content;
274
+ _this._cdRef.markForCheck();
275
+ });
276
+ };
277
+ FsContentWidgetComponent.prototype.ngOnDestroy = function () {
278
+ this.destroy$.next();
279
+ this.destroy$.complete();
280
+ };
281
+ return FsContentWidgetComponent;
282
+ }());
283
+ FsContentWidgetComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent, deps: [{ token: FS_CONTENT_WIDGET_CONFIG }, { token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
284
+ FsContentWidgetComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: { tag: "tag" }, ngImport: i0__namespace, template: "<fs-content-widget-renderer *ngIf=\"content\" [content]=\"content\"></fs-content-widget-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: ["content"] }], directives: [{ type: i3__namespace$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
285
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent, decorators: [{
286
+ type: i0.Component,
287
+ args: [{
288
+ selector: 'fs-content-widget',
289
+ templateUrl: './content-widget.component.html',
290
+ styleUrls: ['./content-widget.component.scss'],
291
+ }]
292
+ }], ctorParameters: function () {
293
+ return [{ type: undefined, decorators: [{
294
+ type: i0.Inject,
295
+ args: [FS_CONTENT_WIDGET_CONFIG]
296
+ }] }, { type: i0__namespace.ChangeDetectorRef }];
297
+ }, propDecorators: { tag: [{
298
+ type: i0.Input
299
+ }] } });
300
+
301
+ var FsContentWidgetModule = /** @class */ (function () {
302
+ function FsContentWidgetModule() {
303
+ }
304
+ FsContentWidgetModule.forRoot = function () {
305
+ return {
306
+ ngModule: FsContentWidgetModule,
307
+ };
308
+ };
309
+ return FsContentWidgetModule;
310
+ }());
311
+ FsContentWidgetModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
312
+ FsContentWidgetModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, declarations: [FsContentWidgetRendererComponent,
313
+ FsContentWidgetComponent], imports: [i3$2.CommonModule,
314
+ i5.FsHtmlEditorModule,
315
+ i5.FsHtmlRendererModule], exports: [FsContentWidgetComponent] });
316
+ FsContentWidgetModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, imports: [[
317
+ i3$2.CommonModule,
318
+ i5.FsHtmlEditorModule,
319
+ i5.FsHtmlRendererModule,
320
+ ]] });
321
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, decorators: [{
322
+ type: i0.NgModule,
323
+ args: [{
324
+ imports: [
325
+ i3$2.CommonModule,
326
+ i5.FsHtmlEditorModule,
327
+ i5.FsHtmlRendererModule,
328
+ ],
329
+ exports: [
330
+ FsContentWidgetComponent,
331
+ ],
332
+ declarations: [
333
+ FsContentWidgetRendererComponent,
334
+ FsContentWidgetComponent,
335
+ ],
336
+ }]
280
337
  }] });
281
338
 
282
- /**
283
- * Generated bundle index. Do not edit.
339
+ /**
340
+ * Generated bundle index. Do not edit.
284
341
  */
285
342
 
286
343
  exports.FS_CONTENT_WIDGET_CONFIG = FS_CONTENT_WIDGET_CONFIG;