@firestitch/content-widget 12.0.2 → 12.1.1
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.
- package/app/content-widgets/components/content-widget/content-widget.component.d.ts +1 -3
- package/app/content-widgets/fs-content-widgets.module.d.ts +8 -6
- package/bundles/firestitch-content-widget.umd.js +55 -49
- package/bundles/firestitch-content-widget.umd.js.map +1 -1
- package/esm2015/app/content-widgets/components/content-widget/content-widget.component.js +17 -17
- package/esm2015/app/content-widgets/components/content-widgets/content-widgets.component.js +2 -2
- package/esm2015/app/content-widgets/fs-content-widgets.module.js +11 -3
- package/fesm2015/firestitch-content-widget.js +29 -21
- package/fesm2015/firestitch-content-widget.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import { OnInit } from '@angular/core';
|
|
2
|
-
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
2
|
import { FsHtmlEditorConfig } from '@firestitch/html-editor';
|
|
4
3
|
import { FsMessage } from '@firestitch/message';
|
|
5
4
|
import { Observable } from 'rxjs';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
6
|
export declare class FsContentWidgetComponent implements OnInit {
|
|
8
|
-
private _dialogRef;
|
|
9
7
|
private _message;
|
|
10
8
|
private _data;
|
|
11
9
|
contentWidget: any;
|
|
12
10
|
htmlEditorConfig: FsHtmlEditorConfig;
|
|
13
11
|
private _saveContentWidget;
|
|
14
|
-
constructor(
|
|
12
|
+
constructor(_message: FsMessage, _data: any);
|
|
15
13
|
ngOnInit(): void;
|
|
16
14
|
save: () => Observable<any>;
|
|
17
15
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentWidgetComponent, never>;
|
|
@@ -8,14 +8,16 @@ import * as i5 from "@angular/material/dialog";
|
|
|
8
8
|
import * as i6 from "@angular/material/input";
|
|
9
9
|
import * as i7 from "@angular/material/form-field";
|
|
10
10
|
import * as i8 from "@angular/material/button";
|
|
11
|
-
import * as i9 from "@
|
|
12
|
-
import * as i10 from "@firestitch/
|
|
13
|
-
import * as i11 from "@firestitch/
|
|
14
|
-
import * as i12 from "@firestitch/
|
|
15
|
-
import * as i13 from "@firestitch/
|
|
11
|
+
import * as i9 from "@angular/material/tabs";
|
|
12
|
+
import * as i10 from "@firestitch/list";
|
|
13
|
+
import * as i11 from "@firestitch/date";
|
|
14
|
+
import * as i12 from "@firestitch/form";
|
|
15
|
+
import * as i13 from "@firestitch/html-editor";
|
|
16
|
+
import * as i14 from "@firestitch/dialog";
|
|
17
|
+
import * as i15 from "@firestitch/text-editor";
|
|
16
18
|
export declare class FsContentWidgetsModule {
|
|
17
19
|
static forRoot(): ModuleWithProviders<FsContentWidgetsModule>;
|
|
18
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<FsContentWidgetsModule, never>;
|
|
19
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FsContentWidgetsModule, [typeof i1.FsContentWidgetsComponent, typeof i2.FsContentWidgetComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.MatDialogModule, typeof i6.MatInputModule, typeof i7.MatFormFieldModule, typeof i8.MatButtonModule, typeof i9.
|
|
21
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FsContentWidgetsModule, [typeof i1.FsContentWidgetsComponent, typeof i2.FsContentWidgetComponent], [typeof i3.CommonModule, typeof i4.FormsModule, typeof i5.MatDialogModule, typeof i6.MatInputModule, typeof i7.MatFormFieldModule, typeof i8.MatButtonModule, typeof i9.MatTabsModule, typeof i10.FsListModule, typeof i11.FsDateModule, typeof i12.FsFormModule, typeof i13.FsHtmlEditorModule, typeof i14.FsDialogModule, typeof i15.FsTextEditorModule], [typeof i1.FsContentWidgetsComponent]>;
|
|
20
22
|
static ɵinj: i0.ɵɵInjectorDeclaration<FsContentWidgetsModule>;
|
|
21
23
|
}
|
|
@@ -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/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('
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@firestitch/content-widget', ['exports', '@angular/core', '@angular/common', '@angular/material/dialog', '@angular/forms', '@angular/material/input', '@angular/material/form-field', '@firestitch/list', '@firestitch/date', '@firestitch/dialog', '@firestitch/form', '@firestitch/html-editor', '
|
|
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.dialog, global.ng.forms, global.ng.material.input, global.ng.material.formField, global.i2$1, global.i3$1, global.
|
|
5
|
-
})(this, (function (exports, i0, i2$2,
|
|
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';
|
|
6
6
|
|
|
7
7
|
function _interopNamespace(e) {
|
|
8
8
|
if (e && e.__esModule) return e;
|
|
@@ -24,29 +24,29 @@
|
|
|
24
24
|
|
|
25
25
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
26
|
var i2__namespace$2 = /*#__PURE__*/_interopNamespace(i2$2);
|
|
27
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
28
27
|
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
29
|
-
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
30
|
-
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
31
|
-
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
32
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
28
|
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
29
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
34
30
|
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
35
|
-
var
|
|
36
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
31
|
+
var i11__namespace = /*#__PURE__*/_interopNamespace(i11);
|
|
37
32
|
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
33
|
+
var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
|
|
34
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
35
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
36
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
37
|
+
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
|
38
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
39
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
38
40
|
|
|
39
41
|
var FsContentWidgetComponent$1 = /** @class */ (function () {
|
|
40
|
-
function FsContentWidgetComponent(
|
|
42
|
+
function FsContentWidgetComponent(_message, _data) {
|
|
41
43
|
var _this = this;
|
|
42
|
-
this._dialogRef = _dialogRef;
|
|
43
44
|
this._message = _message;
|
|
44
45
|
this._data = _data;
|
|
45
46
|
this.save = function () {
|
|
46
47
|
return _this._saveContentWidget(_this.contentWidget)
|
|
47
48
|
.pipe(operators.tap(function (contentWidget) {
|
|
48
49
|
_this.contentWidget = Object.assign(Object.assign({}, _this.contentWidget), contentWidget);
|
|
49
|
-
_this._dialogRef.close(_this.contentWidget);
|
|
50
50
|
_this._message.success('Saved Changes');
|
|
51
51
|
}));
|
|
52
52
|
};
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
};
|
|
59
59
|
return FsContentWidgetComponent;
|
|
60
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.
|
|
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
|
|
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', tabSize: 2 }\"\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: '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\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
63
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, decorators: [{
|
|
64
64
|
type: i0.Component,
|
|
65
65
|
args: [{
|
|
@@ -67,21 +67,21 @@
|
|
|
67
67
|
styleUrls: ['./content-widget.component.scss'],
|
|
68
68
|
}]
|
|
69
69
|
}], ctorParameters: function () {
|
|
70
|
-
return [{ type: i1__namespace.
|
|
70
|
+
return [{ type: i1__namespace.FsMessage }, { type: undefined, decorators: [{
|
|
71
71
|
type: i0.Inject,
|
|
72
|
-
args: [
|
|
72
|
+
args: [i10.MAT_DIALOG_DATA]
|
|
73
73
|
}] }];
|
|
74
74
|
} });
|
|
75
75
|
|
|
76
76
|
var FsContentWidgetsComponent = /** @class */ (function () {
|
|
77
77
|
function FsContentWidgetsComponent(_dialog) {
|
|
78
78
|
this._dialog = _dialog;
|
|
79
|
-
this.config = null;
|
|
80
79
|
this._destroy$ = new rxjs.Subject();
|
|
81
80
|
}
|
|
82
81
|
FsContentWidgetsComponent.prototype.ngOnInit = function () {
|
|
83
82
|
var _this = this;
|
|
84
83
|
this.config = {
|
|
84
|
+
paging: false,
|
|
85
85
|
filters: [
|
|
86
86
|
{
|
|
87
87
|
name: 'keyword',
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
};
|
|
118
118
|
return FsContentWidgetsComponent;
|
|
119
119
|
}());
|
|
120
|
-
FsContentWidgetsComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, deps: [{ token:
|
|
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
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
122
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsComponent, decorators: [{
|
|
123
123
|
type: i0.Component,
|
|
@@ -126,7 +126,7 @@
|
|
|
126
126
|
templateUrl: './content-widgets.component.html',
|
|
127
127
|
styleUrls: ['./content-widgets.component.scss'],
|
|
128
128
|
}]
|
|
129
|
-
}], ctorParameters: function () { return [{ type:
|
|
129
|
+
}], ctorParameters: function () { return [{ type: i10__namespace.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
|
|
130
130
|
type: i0.Input
|
|
131
131
|
}], saveContentWidget: [{
|
|
132
132
|
type: i0.Input
|
|
@@ -150,44 +150,50 @@
|
|
|
150
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
151
|
FsContentWidgetsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, declarations: [FsContentWidgetsComponent,
|
|
152
152
|
FsContentWidgetComponent$1], imports: [i2$2.CommonModule,
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
153
|
+
i8.FormsModule,
|
|
154
|
+
i10.MatDialogModule,
|
|
155
|
+
i11.MatInputModule,
|
|
156
|
+
i6.MatFormFieldModule,
|
|
157
|
+
i7.MatButtonModule,
|
|
158
|
+
i3.MatTabsModule,
|
|
158
159
|
i2$1.FsListModule,
|
|
159
160
|
i3$1.FsDateModule,
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
i9.FsFormModule,
|
|
162
|
+
i4.FsHtmlEditorModule,
|
|
163
|
+
i2.FsDialogModule,
|
|
164
|
+
i5.FsTextEditorModule], exports: [FsContentWidgetsComponent] });
|
|
163
165
|
FsContentWidgetsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, imports: [[
|
|
164
166
|
i2$2.CommonModule,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
i8.FormsModule,
|
|
168
|
+
i10.MatDialogModule,
|
|
169
|
+
i11.MatInputModule,
|
|
170
|
+
i6.MatFormFieldModule,
|
|
171
|
+
i7.MatButtonModule,
|
|
172
|
+
i3.MatTabsModule,
|
|
170
173
|
i2$1.FsListModule,
|
|
171
174
|
i3$1.FsDateModule,
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
+
i9.FsFormModule,
|
|
176
|
+
i4.FsHtmlEditorModule,
|
|
177
|
+
i2.FsDialogModule,
|
|
178
|
+
i5.FsTextEditorModule,
|
|
175
179
|
]] });
|
|
176
180
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetsModule, decorators: [{
|
|
177
181
|
type: i0.NgModule,
|
|
178
182
|
args: [{
|
|
179
183
|
imports: [
|
|
180
184
|
i2$2.CommonModule,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
185
|
+
i8.FormsModule,
|
|
186
|
+
i10.MatDialogModule,
|
|
187
|
+
i11.MatInputModule,
|
|
188
|
+
i6.MatFormFieldModule,
|
|
189
|
+
i7.MatButtonModule,
|
|
190
|
+
i3.MatTabsModule,
|
|
186
191
|
i2$1.FsListModule,
|
|
187
192
|
i3$1.FsDateModule,
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
193
|
+
i9.FsFormModule,
|
|
194
|
+
i4.FsHtmlEditorModule,
|
|
195
|
+
i2.FsDialogModule,
|
|
196
|
+
i5.FsTextEditorModule,
|
|
191
197
|
],
|
|
192
198
|
exports: [
|
|
193
199
|
FsContentWidgetsComponent,
|
|
@@ -223,7 +229,7 @@
|
|
|
223
229
|
return FsContentWidgetComponent;
|
|
224
230
|
}());
|
|
225
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 });
|
|
226
|
-
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:
|
|
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"] }] });
|
|
227
233
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent, decorators: [{
|
|
228
234
|
type: i0.Component,
|
|
229
235
|
args: [{
|
|
@@ -252,17 +258,17 @@
|
|
|
252
258
|
}());
|
|
253
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 });
|
|
254
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,
|
|
255
|
-
|
|
261
|
+
i4.FsHtmlEditorModule], exports: [FsContentWidgetComponent] });
|
|
256
262
|
FsContentWidgetModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, imports: [[
|
|
257
263
|
i2$2.CommonModule,
|
|
258
|
-
|
|
264
|
+
i4.FsHtmlEditorModule,
|
|
259
265
|
]] });
|
|
260
266
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetModule, decorators: [{
|
|
261
267
|
type: i0.NgModule,
|
|
262
268
|
args: [{
|
|
263
269
|
imports: [
|
|
264
270
|
i2$2.CommonModule,
|
|
265
|
-
|
|
271
|
+
i4.FsHtmlEditorModule,
|
|
266
272
|
],
|
|
267
273
|
exports: [
|
|
268
274
|
FsContentWidgetComponent,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestitch-content-widget.umd.js","sources":["../../src/app/content-widgets/components/content-widget/content-widget.component.ts","../../src/app/content-widgets/components/content-widget/content-widget.component.html","../../src/app/content-widgets/components/content-widgets/content-widgets.component.ts","../../src/app/content-widgets/components/content-widgets/content-widgets.component.html","../../src/app/content-widgets/fs-content-widgets.module.ts","../../src/app/content-widget/injectors/content-wiget.injector.ts","../../src/app/content-widget/components/content-widget/content-widget.component.ts","../../src/app/content-widget/components/content-widget/content-widget.component.html","../../src/app/content-widget/fs-content-widget.module.ts","../../src/firestitch-content-widget.ts"],"sourcesContent":["import { Component, Inject, OnInit } from '@angular/core';\n\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\nimport { FsMessage } from '@firestitch/message';\nimport { Observable } from 'rxjs';\n\nimport { tap } from 'rxjs/operators';\n\n\n@Component({\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnInit {\n\n public contentWidget;\n public htmlEditorConfig: FsHtmlEditorConfig;\n \n private _saveContentWidget: (contentWidget: any) => Observable<any>;\n\n public constructor(\n private _dialogRef: MatDialogRef<FsContentWidgetComponent>,\n private _message: FsMessage,\n @Inject(MAT_DIALOG_DATA) private _data: any,\n ) {\n }\n\n public ngOnInit(): void {\n this._saveContentWidget = this._data.saveContentWidget;\n this.htmlEditorConfig = this._data.htmlEditorConfig || {};\n this.contentWidget = { ...this._data.contentWidget };\n }\n\n public save = () => {\n return this._saveContentWidget(this.contentWidget)\n .pipe(\n tap((contentWidget) => {\n this.contentWidget = { ...this.contentWidget, ...contentWidget };\n this._dialogRef.close(this.contentWidget);\n this._message.success('Saved Changes');\n }),\n );\n }\n\n}\n","\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>Content Widget</div>\n <mat-dialog-content>\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\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\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","import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { FsListComponent, FsListConfig } from '@firestitch/list';\nimport { ItemType } from '@firestitch/filter';\n\nimport { Observable, Subject } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { FsContentWidgetComponent } from '../content-widget/content-widget.component';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\n\n@Component({\n selector: 'fs-content-widgets',\n templateUrl: './content-widgets.component.html',\n styleUrls: ['./content-widgets.component.scss'],\n})\nexport class FsContentWidgetsComponent implements OnInit, OnDestroy {\n\n @Input() public fetchContentWidgets: (query?: string) => Observable<{ contentWigets: any[], paging?: any }>;\n @Input() public saveContentWidget: (contentWidget: any) => Observable<any>;\n @Input() public htmlEditorConfig: FsHtmlEditorConfig;\n\n @ViewChild(FsListComponent, { static: true })\n public list: FsListComponent;\n\n public config: FsListConfig = null;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public ngOnInit(): void {\n this.config = {\n filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\n fetch: (query) => {\n return this.fetchContentWidgets(query.keyword)\n .pipe(\n map((data: any) => ({ data: data.contentWidgets })),\n );\n },\n };\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public open(contentWidget): void {\n const dialogRef = this._dialog.open(FsContentWidgetComponent, {\n width: '90%',\n data: { \n contentWidget,\n htmlEditorConfig: this.htmlEditorConfig,\n saveContentWidget: this.saveContentWidget,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.list.reload();\n });\n }\n\n}\n","<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","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCardModule } from '@angular/material/card';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDateModule } from '@firestitch/date';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\nimport { FsContentWidgetsComponent } from './components/content-widgets';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatDialogModule,\n MatInputModule,\n MatFormFieldModule,\n MatButtonModule,\n\n FsListModule,\n FsDateModule,\n FsFormModule,\n FsHtmlEditorModule,\n FsDialogModule,\n ],\n exports: [\n FsContentWidgetsComponent,\n ],\n declarations: [\n FsContentWidgetsComponent,\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetsModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetsModule> {\n return {\n ngModule: FsContentWidgetsModule,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FS_CONTENT_WIDGET_CONFIG = new InjectionToken<any>('fs-content-widget-config');\n","import { ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FS_CONTENT_WIDGET_CONFIG } from '../../injectors';\nimport { FsContentWidgetConfig } from '../../interfaces/content-widget-config';\n\n\n@Component({\n selector: 'fs-content-widget',\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnDestroy, OnInit {\n\n public content;\n\n private destroy$ = new Subject();\n\n @Input() public tag: string;\n\n constructor(\n @Inject(FS_CONTENT_WIDGET_CONFIG) public config: FsContentWidgetConfig,\n private _cdRef: ChangeDetectorRef,\n ) { }\n \n public ngOnInit(): void {\n this.config.fetchContentWidget(this.tag)\n .pipe(\n takeUntil(this.destroy$),\n )\n .subscribe((content) => {\n this.content = content;\n this._cdRef.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n}\n","<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\n\n\n@NgModule({\n imports: [\n CommonModule,\n\n FsHtmlEditorModule,\n ],\n exports: [\n FsContentWidgetComponent,\n ],\n declarations: [\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetModule> {\n return {\n ngModule: FsContentWidgetModule,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["tap","FsContentWidgetComponent","MAT_DIALOG_DATA","Component","Inject","Subject","ItemType","map","takeUntil","FsListComponent","Input","ViewChild","CommonModule","FormsModule","MatDialogModule","MatInputModule","MatFormFieldModule","MatButtonModule","FsListModule","FsDateModule","FsFormModule","FsHtmlEditorModule","FsDialogModule","NgModule","InjectionToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeA;QAOE,kCACU,UAAkD,EAClD,QAAmB,EACM,KAAU;YAH7C,iBAKC;YAJS,eAAU,GAAV,UAAU,CAAwC;YAClD,aAAQ,GAAR,QAAQ,CAAW;YACM,UAAK,GAAL,KAAK,CAAK;YAUtC,SAAI,GAAG;gBACZ,OAAO,KAAI,CAAC,kBAAkB,CAAC,KAAI,CAAC,aAAa,CAAC;qBAC/C,IAAI,CACHA,aAAG,CAAC,UAAC,aAAa;oBAChB,KAAI,CAAC,aAAa,mCAAQ,KAAI,CAAC,aAAa,GAAK,aAAa,CAAE,CAAC;oBACjE,KAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAI,CAAC,aAAa,CAAC,CAAC;oBAC1C,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,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,mBAAmB;wBAC7B,WAAW,EAAE,iCAAiC;wBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;qBAC/C;;;kCAUIC,SAAM;mCAAC,wBAAwB;;6BAHlB,GAAG;0BAAlBM,QAAK;;;;QEER;;QACS,6BAAO,GAAd;YACE,OAAO;gBACL,QAAQ,EAAE,qBAAqB;aAChC,CAAC;SACH;;;6IALU,qBAAqB;8IAArB,qBAAqB,iBAH9B,wBAAwB,aARxBE,iBAAY;YAEZS,qBAAkB,aAGlB,wBAAwB;8IAMf,qBAAqB,YAZvB;gBACPT,iBAAY;gBAEZS,qBAAkB;aACnB;sHAQU,qBAAqB;sBAbjCE,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPX,iBAAY;4BAEZS,qBAAkB;yBACnB;wBACD,OAAO,EAAE;4BACP,wBAAwB;yBACzB;wBACD,YAAY,EAAE;4BACZ,wBAAwB;yBACzB;qBACF;;;ICpBD;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"firestitch-content-widget.umd.js","sources":["../../src/app/content-widgets/components/content-widget/content-widget.component.ts","../../src/app/content-widgets/components/content-widget/content-widget.component.html","../../src/app/content-widgets/components/content-widgets/content-widgets.component.ts","../../src/app/content-widgets/components/content-widgets/content-widgets.component.html","../../src/app/content-widgets/fs-content-widgets.module.ts","../../src/app/content-widget/injectors/content-wiget.injector.ts","../../src/app/content-widget/components/content-widget/content-widget.component.ts","../../src/app/content-widget/components/content-widget/content-widget.component.html","../../src/app/content-widget/fs-content-widget.module.ts","../../src/firestitch-content-widget.ts"],"sourcesContent":["import { Component, Inject, OnInit } from '@angular/core';\n\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\nimport { FsMessage } from '@firestitch/message';\nimport { Observable } from 'rxjs';\n\nimport { tap } from 'rxjs/operators';\n\n\n@Component({\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnInit {\n\n public contentWidget;\n public htmlEditorConfig: FsHtmlEditorConfig;\n \n private _saveContentWidget: (contentWidget: any) => Observable<any>;\n\n public constructor(\n private _message: FsMessage,\n @Inject(MAT_DIALOG_DATA) private _data: any,\n ) {\n }\n\n public ngOnInit(): void {\n this._saveContentWidget = this._data.saveContentWidget;\n this.htmlEditorConfig = this._data.htmlEditorConfig || {};\n this.contentWidget = { ...this._data.contentWidget };\n }\n\n public save = () => {\n return this._saveContentWidget(this.contentWidget)\n .pipe(\n tap((contentWidget) => {\n this.contentWidget = { ...this.contentWidget, ...contentWidget };\n this._message.success('Saved Changes');\n }),\n );\n }\n\n}\n","\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', tabSize: 2 }\"\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: '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\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","import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { FsListComponent, FsListConfig } from '@firestitch/list';\nimport { ItemType } from '@firestitch/filter';\n\nimport { Observable, Subject } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { FsContentWidgetComponent } from '../content-widget/content-widget.component';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\n\n@Component({\n selector: 'fs-content-widgets',\n templateUrl: './content-widgets.component.html',\n styleUrls: ['./content-widgets.component.scss'],\n})\nexport class FsContentWidgetsComponent implements OnInit, OnDestroy {\n\n @Input() public fetchContentWidgets: (query?: string) => Observable<{ contentWigets: any[], paging?: any }>;\n @Input() public saveContentWidget: (contentWidget: any) => Observable<any>;\n @Input() public htmlEditorConfig: FsHtmlEditorConfig;\n\n @ViewChild(FsListComponent, { static: true })\n public list: FsListComponent;\n\n public config: FsListConfig;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public ngOnInit(): void {\n this.config = {\n paging: false,\n filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\n fetch: (query) => {\n return this.fetchContentWidgets(query.keyword)\n .pipe(\n map((data: any) => ({ data: data.contentWidgets })),\n );\n },\n };\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public open(contentWidget): void {\n const dialogRef = this._dialog.open(FsContentWidgetComponent, {\n width: '90%',\n data: { \n contentWidget,\n htmlEditorConfig: this.htmlEditorConfig,\n saveContentWidget: this.saveContentWidget,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.list.reload();\n });\n }\n\n}\n","<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","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDateModule } from '@firestitch/date';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\nimport { FsTextEditorModule } from '@firestitch/text-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\nimport { FsContentWidgetsComponent } from './components/content-widgets';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatDialogModule,\n MatInputModule,\n MatFormFieldModule,\n MatButtonModule,\n MatTabsModule,\n\n FsListModule,\n FsDateModule,\n FsFormModule,\n FsHtmlEditorModule,\n FsDialogModule,\n FsTextEditorModule,\n ],\n exports: [\n FsContentWidgetsComponent,\n ],\n declarations: [\n FsContentWidgetsComponent,\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetsModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetsModule> {\n return {\n ngModule: FsContentWidgetsModule,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FS_CONTENT_WIDGET_CONFIG = new InjectionToken<any>('fs-content-widget-config');\n","import { ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FS_CONTENT_WIDGET_CONFIG } from '../../injectors';\nimport { FsContentWidgetConfig } from '../../interfaces/content-widget-config';\n\n\n@Component({\n selector: 'fs-content-widget',\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnDestroy, OnInit {\n\n public content;\n\n private destroy$ = new Subject();\n\n @Input() public tag: string;\n\n constructor(\n @Inject(FS_CONTENT_WIDGET_CONFIG) public config: FsContentWidgetConfig,\n private _cdRef: ChangeDetectorRef,\n ) { }\n \n public ngOnInit(): void {\n this.config.fetchContentWidget(this.tag)\n .pipe(\n takeUntil(this.destroy$),\n )\n .subscribe((content) => {\n this.content = content;\n this._cdRef.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n}\n","<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\n\n\n@NgModule({\n imports: [\n CommonModule,\n\n FsHtmlEditorModule,\n ],\n exports: [\n FsContentWidgetComponent,\n ],\n declarations: [\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetModule> {\n return {\n ngModule: FsContentWidgetModule,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["tap","FsContentWidgetComponent","MAT_DIALOG_DATA","Component","Inject","Subject","ItemType","map","takeUntil","FsListComponent","Input","ViewChild","CommonModule","FormsModule","MatDialogModule","MatInputModule","MatFormFieldModule","MatButtonModule","MatTabsModule","FsListModule","FsDateModule","FsFormModule","FsHtmlEditorModule","FsDialogModule","FsTextEditorModule","NgModule","InjectionToken"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAeA;QAOE,kCACU,QAAmB,EACM,KAAU;YAF7C,iBAIC;YAHS,aAAQ,GAAR,QAAQ,CAAW;YACM,UAAK,GAAL,KAAK,CAAK;YAUtC,SAAI,GAAG;gBACZ,OAAO,KAAI,CAAC,kBAAkB,CAAC,KAAI,CAAC,aAAa,CAAC;qBAC/C,IAAI,CACHA,aAAG,CAAC,UAAC,aAAa;oBAChB,KAAI,CAAC,aAAa,mCAAQ,KAAI,CAAC,aAAa,GAAK,aAAa,CAAE,CAAC;oBACjE,KAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;iBACxC,CAAC,CACH,CAAC;aACL,CAAA;SAhBA;QAEM,2CAAQ,GAAR;YACL,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;YACvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC;YAC1D,IAAI,CAAC,aAAa,qBAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAE,CAAC;SACtD;;;kJAjBUC,0BAAwB,sDASzBC,mBAAe;2HATdD,0BAAwB,+DCfrC,y1DAkEA;sHDnDaA,0BAAwB;sBAJpCE,YAAS;uBAAC;wBACT,WAAW,EAAE,iCAAiC;wBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;qBAC/C;;;kCAUIC,SAAM;mCAACF,mBAAe;;;;;QEQzB,mCACU,OAAkB;YAAlB,YAAO,GAAP,OAAO,CAAW;YAHpB,cAAS,GAAG,IAAIG,YAAO,EAAE,CAAC;SAI9B;QAEG,4CAAQ,GAAR;YAAA,iB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;;ICpBD;;;;;;;;;;;;;;;;"}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { Component, Inject } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
3
3
|
import { FsMessage } from '@firestitch/message';
|
|
4
4
|
import { tap } from 'rxjs/operators';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
import * as i1 from "@
|
|
7
|
-
import * as i2 from "@firestitch/
|
|
8
|
-
import * as i3 from "@
|
|
9
|
-
import * as i4 from "@
|
|
10
|
-
import * as i5 from "@firestitch/
|
|
11
|
-
import * as i6 from "@angular/material/
|
|
12
|
-
import * as i7 from "@angular/
|
|
13
|
-
import * as i8 from "@
|
|
14
|
-
import * as i9 from "@
|
|
6
|
+
import * as i1 from "@firestitch/message";
|
|
7
|
+
import * as i2 from "@firestitch/dialog";
|
|
8
|
+
import * as i3 from "@angular/material/tabs";
|
|
9
|
+
import * as i4 from "@firestitch/html-editor";
|
|
10
|
+
import * as i5 from "@firestitch/text-editor";
|
|
11
|
+
import * as i6 from "@angular/material/form-field";
|
|
12
|
+
import * as i7 from "@angular/material/button";
|
|
13
|
+
import * as i8 from "@angular/forms";
|
|
14
|
+
import * as i9 from "@firestitch/form";
|
|
15
|
+
import * as i10 from "@angular/material/dialog";
|
|
16
|
+
import * as i11 from "@angular/material/input";
|
|
15
17
|
export class FsContentWidgetComponent {
|
|
16
|
-
constructor(
|
|
17
|
-
this._dialogRef = _dialogRef;
|
|
18
|
+
constructor(_message, _data) {
|
|
18
19
|
this._message = _message;
|
|
19
20
|
this._data = _data;
|
|
20
21
|
this.save = () => {
|
|
21
22
|
return this._saveContentWidget(this.contentWidget)
|
|
22
23
|
.pipe(tap((contentWidget) => {
|
|
23
24
|
this.contentWidget = Object.assign(Object.assign({}, this.contentWidget), contentWidget);
|
|
24
|
-
this._dialogRef.close(this.contentWidget);
|
|
25
25
|
this._message.success('Saved Changes');
|
|
26
26
|
}));
|
|
27
27
|
};
|
|
@@ -32,16 +32,16 @@ export class FsContentWidgetComponent {
|
|
|
32
32
|
this.contentWidget = Object.assign({}, this._data.contentWidget);
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
FsContentWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, deps: [{ token: i1.
|
|
36
|
-
FsContentWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "ng-component", ngImport: i0, template: "\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title
|
|
35
|
+
FsContentWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, deps: [{ token: i1.FsMessage }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
36
|
+
FsContentWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "ng-component", ngImport: i0, 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', tabSize: 2 }\"\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: '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\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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i4.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i5.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.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.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i10.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.MatTabContent, selector: "[matTabContent]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8.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.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
37
37
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
|
|
38
38
|
type: Component,
|
|
39
39
|
args: [{
|
|
40
40
|
templateUrl: './content-widget.component.html',
|
|
41
41
|
styleUrls: ['./content-widget.component.scss'],
|
|
42
42
|
}]
|
|
43
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
43
|
+
}], ctorParameters: function () { return [{ type: i1.FsMessage }, { type: undefined, decorators: [{
|
|
44
44
|
type: Inject,
|
|
45
45
|
args: [MAT_DIALOG_DATA]
|
|
46
46
|
}] }]; } });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb250ZW50LXdpZGdldHMvY29tcG9uZW50cy9jb250ZW50LXdpZGdldC9jb250ZW50LXdpZGdldC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbnRlbnQtd2lkZ2V0cy9jb21wb25lbnRzL2NvbnRlbnQtd2lkZ2V0L2NvbnRlbnQtd2lkZ2V0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBRTFELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUczRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFHaEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7Ozs7Ozs7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gICAgICAgICAgWyhuZ01vZGVsKV09XCJjb250ZW50V2lkZ2V0LmNvbnRlbnRcIlxuICAgICAgICAgICAgICBbY29uZmlnXT1cImh0bWxFZGl0b3JDb25maWdcIlxuICAgICAgICAgICAgICBuYW1lPVwiY29udGVudFwiPlxuICAgICAgICAgICAgPC9mcy1odG1sLWVkaXRvcj5cbiAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICA8L21hdC10YWI+XG4gICAgICAgIDxtYXQtdGFiIGxhYmVsPVwiSFRNTFwiPlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQuY29udGVudFwiIFxuICAgICAgICAgICAgICBbY29uZmlnXT1cInsgbGFuZ3VhZ2U6ICdodG1sJywgdGFiU2l6ZTogMiB9XCJcbiAgICAgICAgICAgICAgbmFtZT1cImh0bWxcIj5cbiAgICAgICAgICAgIDwvZnMtdGV4dC1lZGl0b3I+XG4gICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgPC9tYXQtdGFiPlxuICAgICAgICA8bWF0LXRhYiBsYWJlbD1cIlN0eWxlc1wiPlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQuc3R5bGVzXCIgXG4gICAgICAgICAgICAgIFtjb25maWddPVwieyBsYW5ndWFnZTogJ3Njc3MnLCB0YWJTaXplOiAyIH1cIlxuICAgICAgICAgICAgICBuYW1lPVwic3R5bGVzXCI+XG4gICAgICAgICAgICA8L2ZzLXRleHQtZWRpdG9yPlxuICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgIDwvbWF0LXRhYj5cbiAgICAgICAgPG1hdC10YWIgbGFiZWw9XCJTZXR0aW5nc1wiPlxuICAgICAgICAgIDxtYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgIDxpbnB1dCBcbiAgICAgICAgICAgICAgbWF0SW5wdXQgXG4gICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiTmFtZVwiIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQubmFtZVwiIFxuICAgICAgICAgICAgICBuYW1lPVwibmFtZVwiIFxuICAgICAgICAgICAgICBbcmVxdWlyZWRdPVwidHJ1ZVwiPlxuICAgICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gICAgICAgIDwvbWF0LXRhYj5cbiAgICAgIDwvbWF0LXRhYi1ncm91cD5cblxuXG4gICAgPC9tYXQtZGlhbG9nLWNvbnRlbnQ+XG4gICAgPG1hdC1kaWFsb2ctYWN0aW9ucz5cbiAgICAgIDxidXR0b24gXG4gICAgICAgICAgbWF0LWJ1dHRvbiBcbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIj5cbiAgICAgICAgU2F2ZVxuICAgICAgPC9idXR0b24+XG4gICAgICA8YnV0dG9uIFxuICAgICAgICAgIG1hdC1idXR0b24gXG4gICAgICAgICAgW21hdC1kaWFsb2ctY2xvc2VdPVwibnVsbFwiIFxuICAgICAgICAgIHR5cGU9XCJidXR0b25cIj5cbiAgICAgICAgQ2FuY2VsXG4gICAgICA8L2J1dHRvbj5cbiAgICA8L21hdC1kaWFsb2ctYWN0aW9ucz5cbiAgPC9mcy1kaWFsb2c+XG48L2Zvcm0+XG4iXX0=
|
|
@@ -12,11 +12,11 @@ import * as i3 from "@firestitch/date";
|
|
|
12
12
|
export class FsContentWidgetsComponent {
|
|
13
13
|
constructor(_dialog) {
|
|
14
14
|
this._dialog = _dialog;
|
|
15
|
-
this.config = null;
|
|
16
15
|
this._destroy$ = new Subject();
|
|
17
16
|
}
|
|
18
17
|
ngOnInit() {
|
|
19
18
|
this.config = {
|
|
19
|
+
paging: false,
|
|
20
20
|
filters: [
|
|
21
21
|
{
|
|
22
22
|
name: 'keyword',
|
|
@@ -69,4 +69,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
69
69
|
type: ViewChild,
|
|
70
70
|
args: [FsListComponent, { static: true }]
|
|
71
71
|
}] } });
|
|
72
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZXRzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29udGVudC13aWRnZXRzL2NvbXBvbmVudHMvY29udGVudC13aWRnZXRzL2NvbnRlbnQtd2lkZ2V0cy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbnRlbnQtd2lkZ2V0cy9jb21wb25lbnRzL2NvbnRlbnQtd2lkZ2V0cy9jb250ZW50LXdpZGdldHMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQXFCLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFckQsT0FBTyxFQUFFLGVBQWUsRUFBZ0IsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sb0JBQW9CLENBQUM7QUFFOUMsT0FBTyxFQUFjLE9BQU8sRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUMzQyxPQUFPLEVBQUUsR0FBRyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQ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IFtpbm5lckhUTUxdPVwicm93LmNvbnRlbnRcIj48L2Rpdj5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L25nLXRlbXBsYXRlPlxuICA8L2ZzLWxpc3QtY29sdW1uPlxuICA8ZnMtbGlzdC1jb2x1bW4gY2xhc3M9XCJtb2RpZmllZFwiPlxuICAgIDxuZy10ZW1wbGF0ZSBmcy1saXN0LWhlYWRlcj5Nb2RpZmllZDwvbmctdGVtcGxhdGU+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtY2VsbCBsZXQtcm93PVwicm93XCI+XG4gICAgICA8ZnMtZGF0ZS1hZ28gW2RhdGVdPVwicm93Lm1vZGlmaWVkRGF0ZVwiPjwvZnMtZGF0ZS1hZ28+XG4gICAgPC9uZy10ZW1wbGF0ZT5cbiAgPC9mcy1saXN0LWNvbHVtbj5cbjwvZnMtbGlzdD5cbiJdfQ==
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
4
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
3
5
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
4
6
|
import { FormsModule } from '@angular/forms';
|
|
5
7
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -9,9 +11,9 @@ import { FsDateModule } from '@firestitch/date';
|
|
|
9
11
|
import { FsDialogModule } from '@firestitch/dialog';
|
|
10
12
|
import { FsFormModule } from '@firestitch/form';
|
|
11
13
|
import { FsHtmlEditorModule } from '@firestitch/html-editor';
|
|
14
|
+
import { FsTextEditorModule } from '@firestitch/text-editor';
|
|
12
15
|
import { FsContentWidgetComponent } from './components/content-widget';
|
|
13
16
|
import { FsContentWidgetsComponent } from './components/content-widgets';
|
|
14
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
15
17
|
import * as i0 from "@angular/core";
|
|
16
18
|
export class FsContentWidgetsModule {
|
|
17
19
|
static forRoot() {
|
|
@@ -28,11 +30,13 @@ FsContentWidgetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
28
30
|
MatInputModule,
|
|
29
31
|
MatFormFieldModule,
|
|
30
32
|
MatButtonModule,
|
|
33
|
+
MatTabsModule,
|
|
31
34
|
FsListModule,
|
|
32
35
|
FsDateModule,
|
|
33
36
|
FsFormModule,
|
|
34
37
|
FsHtmlEditorModule,
|
|
35
|
-
FsDialogModule
|
|
38
|
+
FsDialogModule,
|
|
39
|
+
FsTextEditorModule], exports: [FsContentWidgetsComponent] });
|
|
36
40
|
FsContentWidgetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, imports: [[
|
|
37
41
|
CommonModule,
|
|
38
42
|
FormsModule,
|
|
@@ -40,11 +44,13 @@ FsContentWidgetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
40
44
|
MatInputModule,
|
|
41
45
|
MatFormFieldModule,
|
|
42
46
|
MatButtonModule,
|
|
47
|
+
MatTabsModule,
|
|
43
48
|
FsListModule,
|
|
44
49
|
FsDateModule,
|
|
45
50
|
FsFormModule,
|
|
46
51
|
FsHtmlEditorModule,
|
|
47
52
|
FsDialogModule,
|
|
53
|
+
FsTextEditorModule,
|
|
48
54
|
]] });
|
|
49
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, decorators: [{
|
|
50
56
|
type: NgModule,
|
|
@@ -56,11 +62,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
56
62
|
MatInputModule,
|
|
57
63
|
MatFormFieldModule,
|
|
58
64
|
MatButtonModule,
|
|
65
|
+
MatTabsModule,
|
|
59
66
|
FsListModule,
|
|
60
67
|
FsDateModule,
|
|
61
68
|
FsFormModule,
|
|
62
69
|
FsHtmlEditorModule,
|
|
63
70
|
FsDialogModule,
|
|
71
|
+
FsTextEditorModule,
|
|
64
72
|
],
|
|
65
73
|
exports: [
|
|
66
74
|
FsContentWidgetsComponent,
|
|
@@ -71,4 +79,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
71
79
|
],
|
|
72
80
|
}]
|
|
73
81
|
}] });
|
|
74
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
82
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnMtY29udGVudC13aWRnZXRzLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHAvY29udGVudC13aWRnZXRzL2ZzLWNvbnRlbnQtd2lkZ2V0cy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBdUIsTUFBTSxlQUFlLENBQUM7QUFDOUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRS9DLE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDdkQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQztBQUM3QyxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDekQsT0FBTyxFQUFFLGtCQUFrQixFQUFFLE1BQU0sOEJBQThCLENBQUM7QUFFbEUsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FB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zOiBbXG4gICAgRnNDb250ZW50V2lkZ2V0c0NvbXBvbmVudCxcbiAgXSxcbiAgZGVjbGFyYXRpb25zOiBbXG4gICAgRnNDb250ZW50V2lkZ2V0c0NvbXBvbmVudCxcbiAgICBGc0NvbnRlbnRXaWRnZXRDb21wb25lbnQsXG4gIF0sXG59KVxuZXhwb3J0IGNsYXNzIEZzQ29udGVudFdpZGdldHNNb2R1bGUge1xuICBzdGF0aWMgZm9yUm9vdCgpOiBNb2R1bGVXaXRoUHJvdmlkZXJzPEZzQ29udGVudFdpZGdldHNNb2R1bGU+IHtcbiAgICByZXR1cm4ge1xuICAgICAgbmdNb2R1bGU6IEZzQ29udGVudFdpZGdldHNNb2R1bGUsXG4gICAgfTtcbiAgfVxufVxuIl19
|
|
@@ -2,41 +2,43 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component, Inject, Input, ViewChild, NgModule, InjectionToken } from '@angular/core';
|
|
3
3
|
import * as i2$2 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i7 from '@angular/material/button';
|
|
6
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
7
|
+
import * as i3 from '@angular/material/tabs';
|
|
8
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
9
|
+
import * as i10 from '@angular/material/dialog';
|
|
6
10
|
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
7
|
-
import * as
|
|
11
|
+
import * as i8 from '@angular/forms';
|
|
8
12
|
import { FormsModule } from '@angular/forms';
|
|
9
|
-
import * as
|
|
13
|
+
import * as i11 from '@angular/material/input';
|
|
10
14
|
import { MatInputModule } from '@angular/material/input';
|
|
11
|
-
import * as
|
|
15
|
+
import * as i6 from '@angular/material/form-field';
|
|
12
16
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
13
17
|
import * as i2$1 from '@firestitch/list';
|
|
14
18
|
import { FsListComponent, FsListModule } from '@firestitch/list';
|
|
15
19
|
import * as i3$1 from '@firestitch/date';
|
|
16
20
|
import { FsDateModule } from '@firestitch/date';
|
|
17
|
-
import * as
|
|
21
|
+
import * as i2 from '@firestitch/dialog';
|
|
18
22
|
import { FsDialogModule } from '@firestitch/dialog';
|
|
19
|
-
import * as
|
|
23
|
+
import * as i9 from '@firestitch/form';
|
|
20
24
|
import { FsFormModule } from '@firestitch/form';
|
|
21
|
-
import * as
|
|
25
|
+
import * as i4 from '@firestitch/html-editor';
|
|
22
26
|
import { FsHtmlEditorModule } from '@firestitch/html-editor';
|
|
23
|
-
import * as
|
|
27
|
+
import * as i5 from '@firestitch/text-editor';
|
|
28
|
+
import { FsTextEditorModule } from '@firestitch/text-editor';
|
|
29
|
+
import * as i1 from '@firestitch/message';
|
|
24
30
|
import { tap, map, takeUntil } from 'rxjs/operators';
|
|
25
|
-
import * as i6 from '@angular/material/button';
|
|
26
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
27
31
|
import { ItemType } from '@firestitch/filter';
|
|
28
32
|
import { Subject } from 'rxjs';
|
|
29
33
|
|
|
30
34
|
class FsContentWidgetComponent$1 {
|
|
31
|
-
constructor(
|
|
32
|
-
this._dialogRef = _dialogRef;
|
|
35
|
+
constructor(_message, _data) {
|
|
33
36
|
this._message = _message;
|
|
34
37
|
this._data = _data;
|
|
35
38
|
this.save = () => {
|
|
36
39
|
return this._saveContentWidget(this.contentWidget)
|
|
37
40
|
.pipe(tap((contentWidget) => {
|
|
38
41
|
this.contentWidget = Object.assign(Object.assign({}, this.contentWidget), contentWidget);
|
|
39
|
-
this._dialogRef.close(this.contentWidget);
|
|
40
42
|
this._message.success('Saved Changes');
|
|
41
43
|
}));
|
|
42
44
|
};
|
|
@@ -47,15 +49,15 @@ class FsContentWidgetComponent$1 {
|
|
|
47
49
|
this.contentWidget = Object.assign({}, this._data.contentWidget);
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
|
-
FsContentWidgetComponent$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent$1, deps: [{ token: i1.
|
|
51
|
-
FsContentWidgetComponent$1.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent$1, selector: "ng-component", ngImport: i0, template: "\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title
|
|
52
|
+
FsContentWidgetComponent$1.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent$1, deps: [{ token: i1.FsMessage }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
+
FsContentWidgetComponent$1.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent$1, selector: "ng-component", ngImport: i0, 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', tabSize: 2 }\"\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: '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\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.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i3.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "disableRipple"], exportAs: ["matTabGroup"] }, { type: i3.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby"], exportAs: ["matTab"] }, { type: i4.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { type: i5.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i6.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i7.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.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { type: i8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i9.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.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i10.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i3.MatTabContent, selector: "[matTabContent]" }, { type: i8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i11.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i8.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.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { type: i8.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { type: i10.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i10.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
52
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent$1, decorators: [{
|
|
53
55
|
type: Component,
|
|
54
56
|
args: [{
|
|
55
57
|
templateUrl: './content-widget.component.html',
|
|
56
58
|
styleUrls: ['./content-widget.component.scss'],
|
|
57
59
|
}]
|
|
58
|
-
}], ctorParameters: function () { return [{ type: i1.
|
|
60
|
+
}], ctorParameters: function () { return [{ type: i1.FsMessage }, { type: undefined, decorators: [{
|
|
59
61
|
type: Inject,
|
|
60
62
|
args: [MAT_DIALOG_DATA]
|
|
61
63
|
}] }]; } });
|
|
@@ -63,11 +65,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
63
65
|
class FsContentWidgetsComponent {
|
|
64
66
|
constructor(_dialog) {
|
|
65
67
|
this._dialog = _dialog;
|
|
66
|
-
this.config = null;
|
|
67
68
|
this._destroy$ = new Subject();
|
|
68
69
|
}
|
|
69
70
|
ngOnInit() {
|
|
70
71
|
this.config = {
|
|
72
|
+
paging: false,
|
|
71
73
|
filters: [
|
|
72
74
|
{
|
|
73
75
|
name: 'keyword',
|
|
@@ -101,7 +103,7 @@ class FsContentWidgetsComponent {
|
|
|
101
103
|
});
|
|
102
104
|
}
|
|
103
105
|
}
|
|
104
|
-
FsContentWidgetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, deps: [{ token:
|
|
106
|
+
FsContentWidgetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, deps: [{ token: i10.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
|
|
105
107
|
FsContentWidgetsComponent.ɵcmp = i0.ɵɵ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: FsListComponent, descendants: true, static: true }], ngImport: i0, 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$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
|
|
106
108
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, decorators: [{
|
|
107
109
|
type: Component,
|
|
@@ -110,7 +112,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
110
112
|
templateUrl: './content-widgets.component.html',
|
|
111
113
|
styleUrls: ['./content-widgets.component.scss'],
|
|
112
114
|
}]
|
|
113
|
-
}], ctorParameters: function () { return [{ type:
|
|
115
|
+
}], ctorParameters: function () { return [{ type: i10.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
|
|
114
116
|
type: Input
|
|
115
117
|
}], saveContentWidget: [{
|
|
116
118
|
type: Input
|
|
@@ -136,11 +138,13 @@ FsContentWidgetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0",
|
|
|
136
138
|
MatInputModule,
|
|
137
139
|
MatFormFieldModule,
|
|
138
140
|
MatButtonModule,
|
|
141
|
+
MatTabsModule,
|
|
139
142
|
FsListModule,
|
|
140
143
|
FsDateModule,
|
|
141
144
|
FsFormModule,
|
|
142
145
|
FsHtmlEditorModule,
|
|
143
|
-
FsDialogModule
|
|
146
|
+
FsDialogModule,
|
|
147
|
+
FsTextEditorModule], exports: [FsContentWidgetsComponent] });
|
|
144
148
|
FsContentWidgetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, imports: [[
|
|
145
149
|
CommonModule,
|
|
146
150
|
FormsModule,
|
|
@@ -148,11 +152,13 @@ FsContentWidgetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0",
|
|
|
148
152
|
MatInputModule,
|
|
149
153
|
MatFormFieldModule,
|
|
150
154
|
MatButtonModule,
|
|
155
|
+
MatTabsModule,
|
|
151
156
|
FsListModule,
|
|
152
157
|
FsDateModule,
|
|
153
158
|
FsFormModule,
|
|
154
159
|
FsHtmlEditorModule,
|
|
155
160
|
FsDialogModule,
|
|
161
|
+
FsTextEditorModule,
|
|
156
162
|
]] });
|
|
157
163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, decorators: [{
|
|
158
164
|
type: NgModule,
|
|
@@ -164,11 +170,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
164
170
|
MatInputModule,
|
|
165
171
|
MatFormFieldModule,
|
|
166
172
|
MatButtonModule,
|
|
173
|
+
MatTabsModule,
|
|
167
174
|
FsListModule,
|
|
168
175
|
FsDateModule,
|
|
169
176
|
FsFormModule,
|
|
170
177
|
FsHtmlEditorModule,
|
|
171
178
|
FsDialogModule,
|
|
179
|
+
FsTextEditorModule,
|
|
172
180
|
],
|
|
173
181
|
exports: [
|
|
174
182
|
FsContentWidgetsComponent,
|
|
@@ -202,7 +210,7 @@ class FsContentWidgetComponent {
|
|
|
202
210
|
}
|
|
203
211
|
}
|
|
204
212
|
FsContentWidgetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, deps: [{ token: FS_CONTENT_WIDGET_CONFIG }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
205
|
-
FsContentWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: { tag: "tag" }, ngImport: i0, template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type:
|
|
213
|
+
FsContentWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: { tag: "tag" }, ngImport: i0, template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: i4.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
206
214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
|
|
207
215
|
type: Component,
|
|
208
216
|
args: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestitch-content-widget.js","sources":["../../src/app/content-widgets/components/content-widget/content-widget.component.ts","../../src/app/content-widgets/components/content-widget/content-widget.component.html","../../src/app/content-widgets/components/content-widgets/content-widgets.component.ts","../../src/app/content-widgets/components/content-widgets/content-widgets.component.html","../../src/app/content-widgets/fs-content-widgets.module.ts","../../src/app/content-widget/injectors/content-wiget.injector.ts","../../src/app/content-widget/components/content-widget/content-widget.component.ts","../../src/app/content-widget/components/content-widget/content-widget.component.html","../../src/app/content-widget/fs-content-widget.module.ts","../../src/firestitch-content-widget.ts"],"sourcesContent":["import { Component, Inject, OnInit } from '@angular/core';\n\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\nimport { FsMessage } from '@firestitch/message';\nimport { Observable } from 'rxjs';\n\nimport { tap } from 'rxjs/operators';\n\n\n@Component({\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnInit {\n\n public contentWidget;\n public htmlEditorConfig: FsHtmlEditorConfig;\n \n private _saveContentWidget: (contentWidget: any) => Observable<any>;\n\n public constructor(\n private _dialogRef: MatDialogRef<FsContentWidgetComponent>,\n private _message: FsMessage,\n @Inject(MAT_DIALOG_DATA) private _data: any,\n ) {\n }\n\n public ngOnInit(): void {\n this._saveContentWidget = this._data.saveContentWidget;\n this.htmlEditorConfig = this._data.htmlEditorConfig || {};\n this.contentWidget = { ...this._data.contentWidget };\n }\n\n public save = () => {\n return this._saveContentWidget(this.contentWidget)\n .pipe(\n tap((contentWidget) => {\n this.contentWidget = { ...this.contentWidget, ...contentWidget };\n this._dialogRef.close(this.contentWidget);\n this._message.success('Saved Changes');\n }),\n );\n }\n\n}\n","\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>Content Widget</div>\n <mat-dialog-content>\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\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\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","import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { FsListComponent, FsListConfig } from '@firestitch/list';\nimport { ItemType } from '@firestitch/filter';\n\nimport { Observable, Subject } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { FsContentWidgetComponent } from '../content-widget/content-widget.component';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\n\n@Component({\n selector: 'fs-content-widgets',\n templateUrl: './content-widgets.component.html',\n styleUrls: ['./content-widgets.component.scss'],\n})\nexport class FsContentWidgetsComponent implements OnInit, OnDestroy {\n\n @Input() public fetchContentWidgets: (query?: string) => Observable<{ contentWigets: any[], paging?: any }>;\n @Input() public saveContentWidget: (contentWidget: any) => Observable<any>;\n @Input() public htmlEditorConfig: FsHtmlEditorConfig;\n\n @ViewChild(FsListComponent, { static: true })\n public list: FsListComponent;\n\n public config: FsListConfig = null;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public ngOnInit(): void {\n this.config = {\n filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\n fetch: (query) => {\n return this.fetchContentWidgets(query.keyword)\n .pipe(\n map((data: any) => ({ data: data.contentWidgets })),\n );\n },\n };\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public open(contentWidget): void {\n const dialogRef = this._dialog.open(FsContentWidgetComponent, {\n width: '90%',\n data: { \n contentWidget,\n htmlEditorConfig: this.htmlEditorConfig,\n saveContentWidget: this.saveContentWidget,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.list.reload();\n });\n }\n\n}\n","<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","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatCardModule } from '@angular/material/card';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDateModule } from '@firestitch/date';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\nimport { FsContentWidgetsComponent } from './components/content-widgets';\nimport { MatButtonModule } from '@angular/material/button';\n\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatDialogModule,\n MatInputModule,\n MatFormFieldModule,\n MatButtonModule,\n\n FsListModule,\n FsDateModule,\n FsFormModule,\n FsHtmlEditorModule,\n FsDialogModule,\n ],\n exports: [\n FsContentWidgetsComponent,\n ],\n declarations: [\n FsContentWidgetsComponent,\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetsModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetsModule> {\n return {\n ngModule: FsContentWidgetsModule,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FS_CONTENT_WIDGET_CONFIG = new InjectionToken<any>('fs-content-widget-config');\n","import { ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FS_CONTENT_WIDGET_CONFIG } from '../../injectors';\nimport { FsContentWidgetConfig } from '../../interfaces/content-widget-config';\n\n\n@Component({\n selector: 'fs-content-widget',\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnDestroy, OnInit {\n\n public content;\n\n private destroy$ = new Subject();\n\n @Input() public tag: string;\n\n constructor(\n @Inject(FS_CONTENT_WIDGET_CONFIG) public config: FsContentWidgetConfig,\n private _cdRef: ChangeDetectorRef,\n ) { }\n \n public ngOnInit(): void {\n this.config.fetchContentWidget(this.tag)\n .pipe(\n takeUntil(this.destroy$),\n )\n .subscribe((content) => {\n this.content = content;\n this._cdRef.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n}\n","<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\n\n\n@NgModule({\n imports: [\n CommonModule,\n\n FsHtmlEditorModule,\n ],\n exports: [\n FsContentWidgetComponent,\n ],\n declarations: [\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetModule> {\n return {\n ngModule: FsContentWidgetModule,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FsContentWidgetComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeaA,0BAAwB;IAOnC,YACU,UAAkD,EAClD,QAAmB,EACM,KAAU;QAFnC,eAAU,GAAV,UAAU,CAAwC;QAClD,aAAQ,GAAR,QAAQ,CAAW;QACM,UAAK,GAAL,KAAK,CAAK;QAUtC,SAAI,GAAG;YACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC;iBAC/C,IAAI,CACH,GAAG,CAAC,CAAC,aAAa;gBAChB,IAAI,CAAC,aAAa,mCAAQ,IAAI,CAAC,aAAa,GAAK,aAAa,CAAE,CAAC;gBACjE,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;gBAC1C,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;aACxC,CAAC,CACH,CAAC;SACL,CAAA;KAjBA;IAEM,QAAQ;QACb,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,aAAa,qBAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAE,CAAC;KACtD;;wHAlBUA,0BAAwB,uEAUzB,eAAe;4GAVdA,0BAAwB,oDCfrC,21BAmCA;4FDpBaA,0BAAwB;kBAJpC,SAAS;mBAAC;oBACT,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;iBAC/C;;0BAWI,MA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I,OAAO,EAAE,CAAC;KAO5B;IAEE,QAAQ;QACb,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,CAAC,GAAG,CAAC;aACvC,IAAI,CACH,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,CACzB;aACA,SAAS,CAAC,CAAC,OAAO;YACjB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;SAC5B,CAAC,CAAC;KACJ;IAEM,WAAW;QAChB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QACrB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;KAC1B;;sHA3BU,wBAAwB,kBASzB,wBAAwB;0GATvB,wBAAwB,iFCbrC,4EAAsE;4FDazD,wBAAwB;kBALpC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;oBAC7B,WAAW,EAAE,iCAAiC;oBAC9C,SAAS,EAAE,CAAC,iCAAiC,CAAC;iBAC/C;;0BAUI,MAAM;2BAAC,wBAAwB;4EAHlB,GAAG;sBAAlB,KAAK;;;MEEK,qBAAqB;IAChC,OAAO,OAAO;QACZ,OAAO;YACL,QAAQ,EAAE,qBAAqB;SAChC,CAAC;KACH;;mHALU,qBAAqB;oHAArB,qBAAqB,iBAH9B,wBAAwB,aARxB,YAAY;QAEZ,kBAAkB,aAGlB,wBAAwB;oHAMf,qBAAqB,YAZvB;YACP,YAAY;YAEZ,kBAAkB;SACnB;4FAQU,qBAAqB;kBAbjC,QAAQ;mBAAC;oBACR,OAAO,EAAE;wBACP,YAAY;wBAEZ,kBAAkB;qBACnB;oBACD,OAAO,EAAE;wBACP,wBAAwB;qBACzB;oBACD,YAAY,EAAE;wBACZ,wBAAwB;qBACzB;iBACF;;;ACpBD;;;;;;"}
|
|
1
|
+
{"version":3,"file":"firestitch-content-widget.js","sources":["../../src/app/content-widgets/components/content-widget/content-widget.component.ts","../../src/app/content-widgets/components/content-widget/content-widget.component.html","../../src/app/content-widgets/components/content-widgets/content-widgets.component.ts","../../src/app/content-widgets/components/content-widgets/content-widgets.component.html","../../src/app/content-widgets/fs-content-widgets.module.ts","../../src/app/content-widget/injectors/content-wiget.injector.ts","../../src/app/content-widget/components/content-widget/content-widget.component.ts","../../src/app/content-widget/components/content-widget/content-widget.component.html","../../src/app/content-widget/fs-content-widget.module.ts","../../src/firestitch-content-widget.ts"],"sourcesContent":["import { Component, Inject, OnInit } from '@angular/core';\n\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\nimport { FsMessage } from '@firestitch/message';\nimport { Observable } from 'rxjs';\n\nimport { tap } from 'rxjs/operators';\n\n\n@Component({\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnInit {\n\n public contentWidget;\n public htmlEditorConfig: FsHtmlEditorConfig;\n \n private _saveContentWidget: (contentWidget: any) => Observable<any>;\n\n public constructor(\n private _message: FsMessage,\n @Inject(MAT_DIALOG_DATA) private _data: any,\n ) {\n }\n\n public ngOnInit(): void {\n this._saveContentWidget = this._data.saveContentWidget;\n this.htmlEditorConfig = this._data.htmlEditorConfig || {};\n this.contentWidget = { ...this._data.contentWidget };\n }\n\n public save = () => {\n return this._saveContentWidget(this.contentWidget)\n .pipe(\n tap((contentWidget) => {\n this.contentWidget = { ...this.contentWidget, ...contentWidget };\n this._message.success('Saved Changes');\n }),\n );\n }\n\n}\n","\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', tabSize: 2 }\"\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: '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\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","import { Component, ViewChild, OnInit, OnDestroy, Input } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\n\nimport { FsListComponent, FsListConfig } from '@firestitch/list';\nimport { ItemType } from '@firestitch/filter';\n\nimport { Observable, Subject } from 'rxjs';\nimport { map, takeUntil } from 'rxjs/operators';\n\nimport { FsContentWidgetComponent } from '../content-widget/content-widget.component';\nimport { FsHtmlEditorConfig } from '@firestitch/html-editor';\n\n\n@Component({\n selector: 'fs-content-widgets',\n templateUrl: './content-widgets.component.html',\n styleUrls: ['./content-widgets.component.scss'],\n})\nexport class FsContentWidgetsComponent implements OnInit, OnDestroy {\n\n @Input() public fetchContentWidgets: (query?: string) => Observable<{ contentWigets: any[], paging?: any }>;\n @Input() public saveContentWidget: (contentWidget: any) => Observable<any>;\n @Input() public htmlEditorConfig: FsHtmlEditorConfig;\n\n @ViewChild(FsListComponent, { static: true })\n public list: FsListComponent;\n\n public config: FsListConfig;\n\n private _destroy$ = new Subject();\n\n constructor(\n private _dialog: MatDialog,\n ) {}\n\n public ngOnInit(): void {\n this.config = {\n paging: false,\n filters: [\n {\n name: 'keyword',\n type: ItemType.Keyword,\n label: 'Search',\n },\n ],\n fetch: (query) => {\n return this.fetchContentWidgets(query.keyword)\n .pipe(\n map((data: any) => ({ data: data.contentWidgets })),\n );\n },\n };\n }\n\n public ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n public open(contentWidget): void {\n const dialogRef = this._dialog.open(FsContentWidgetComponent, {\n width: '90%',\n data: { \n contentWidget,\n htmlEditorConfig: this.htmlEditorConfig,\n saveContentWidget: this.saveContentWidget,\n },\n });\n\n dialogRef.afterClosed()\n .pipe(\n takeUntil(this._destroy$),\n )\n .subscribe(() => {\n this.list.reload();\n });\n }\n\n}\n","<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","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatTabsModule } from '@angular/material/tabs';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatFormFieldModule } from '@angular/material/form-field';\n\nimport { FsListModule } from '@firestitch/list';\nimport { FsDateModule } from '@firestitch/date';\nimport { FsDialogModule } from '@firestitch/dialog';\nimport { FsFormModule } from '@firestitch/form';\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\nimport { FsTextEditorModule } from '@firestitch/text-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\nimport { FsContentWidgetsComponent } from './components/content-widgets';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n\n MatDialogModule,\n MatInputModule,\n MatFormFieldModule,\n MatButtonModule,\n MatTabsModule,\n\n FsListModule,\n FsDateModule,\n FsFormModule,\n FsHtmlEditorModule,\n FsDialogModule,\n FsTextEditorModule,\n ],\n exports: [\n FsContentWidgetsComponent,\n ],\n declarations: [\n FsContentWidgetsComponent,\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetsModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetsModule> {\n return {\n ngModule: FsContentWidgetsModule,\n };\n }\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FS_CONTENT_WIDGET_CONFIG = new InjectionToken<any>('fs-content-widget-config');\n","import { ChangeDetectorRef, Component, Inject, Input, OnDestroy, OnInit } from '@angular/core';\n\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { FS_CONTENT_WIDGET_CONFIG } from '../../injectors';\nimport { FsContentWidgetConfig } from '../../interfaces/content-widget-config';\n\n\n@Component({\n selector: 'fs-content-widget',\n templateUrl: './content-widget.component.html',\n styleUrls: ['./content-widget.component.scss'],\n})\nexport class FsContentWidgetComponent implements OnDestroy, OnInit {\n\n public content;\n\n private destroy$ = new Subject();\n\n @Input() public tag: string;\n\n constructor(\n @Inject(FS_CONTENT_WIDGET_CONFIG) public config: FsContentWidgetConfig,\n private _cdRef: ChangeDetectorRef,\n ) { }\n \n public ngOnInit(): void {\n this.config.fetchContentWidget(this.tag)\n .pipe(\n takeUntil(this.destroy$),\n )\n .subscribe((content) => {\n this.content = content;\n this._cdRef.markForCheck();\n });\n }\n\n public ngOnDestroy(): void {\n this.destroy$.next();\n this.destroy$.complete();\n }\n\n}\n","<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>","import { NgModule, ModuleWithProviders } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { FsHtmlEditorModule } from '@firestitch/html-editor';\n\nimport { FsContentWidgetComponent } from './components/content-widget';\n\n\n@NgModule({\n imports: [\n CommonModule,\n\n FsHtmlEditorModule,\n ],\n exports: [\n FsContentWidgetComponent,\n ],\n declarations: [\n FsContentWidgetComponent,\n ],\n})\nexport class FsContentWidgetModule {\n static forRoot(): ModuleWithProviders<FsContentWidgetModule> {\n return {\n ngModule: FsContentWidgetModule,\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["FsContentWidgetComponent"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAeaA,0BAAwB;IAOnC,YACU,QAAmB,EACM,KAAU;QADnC,aAAQ,GAAR,QAAQ,CAAW;QACM,UAAK,GAAL,KAAK,CAAK;QAUtC,SAAI,GAAG;YACZ,OAAO,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,aAAa,CAAC;iBAC/C,IAAI,CACH,GAAG,CAAC,CAAC,aAAa;gBAChB,IAAI,CAAC,aAAa,mCAAQ,IAAI,CAAC,aAAa,GAAK,aAAa,CAAE,CAAC;gBACjE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC;aACxC,CAAC,CACH,CAAC;SACL,CAAA;KAhBA;IAEM,QAAQ;QACb,IAAI,CAAC,kBAAkB,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC;QACvD,IAAI,CAAC,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,gBAAgB,IAAI,EAAE,CAAC;QAC1D,IAAI,CAAC,aAAa,qBAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,CAAE,CAAC;KACtD;;wHAjBUA,0BAAwB,2CASzB,eAAe;4GATdA,0BAAwB,oDCfrC,y1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