@firestitch/content-widget 12.1.0 → 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/bundles/firestitch-content-widget.umd.js +1 -1
- package/bundles/firestitch-content-widget.umd.js.map +1 -1
- package/esm2015/app/content-widgets/components/content-widget/content-widget.component.js +2 -2
- package/fesm2015/firestitch-content-widget.js +1 -1
- package/fesm2015/firestitch-content-widget.js.map +1 -1
- package/package.json +1 -1
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
return FsContentWidgetComponent;
|
|
60
60
|
}());
|
|
61
61
|
FsContentWidgetComponent$1.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsContentWidgetComponent$1, deps: [{ token: i1__namespace.FsMessage }, { token: i10.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
62
|
-
FsContentWidgetComponent$1.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent$1, selector: "ng-component", ngImport: i0__namespace, template: "\n<form fsForm [submit]=\"save\">\n <fs-dialog>\n <div mat-dialog-title>\n Content Widget\n <div class=\"subtitle\">{{contentWidget.name}}</div>\n </div>\n <mat-dialog-content>\n\n <mat-tab-group>\n <mat-tab label=\"Rich Text\">\n <ng-template matTabContent>\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"HTML\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.content\" \n [config]=\"{ language: 'html' }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.styles\" \n [config]=\"{ language: '
|
|
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: [{
|
|
@@ -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 { 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' }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.styles\" \n [config]=\"{ language: 'css' }\"\n name=\"css\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input \n matInput \n placeholder=\"Name\" \n [(ngModel)]=\"contentWidget.name\" \n name=\"name\" \n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n color=\"primary\">\n Save\n </button>\n <button \n mat-button \n [mat-dialog-close]=\"null\" \n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","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,6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AwB,aARxBE,iBAAY;YAEZU,qBAAkB,aAGlB,wBAAwB;8IAMf,qBAAqB,YAZvB;gBACPV,iBAAY;gBAEZU,qBAAkB;aACnB;sHAQU,qBAAqB;sBAbjCG,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPb,iBAAY;4BAEZU,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,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C,UAAC,OAAO;gBACjB,KAAI,CAAC,OAAO,GAAG,OAAO,CAAC;gBACvB,KAAI,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;aAC5B,CAAC,CAAC;SACJ;QAEM,8CAAW,GAAX;YACL,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;SAC1B;;;gJA3BU,wBAAwB,kBASzB,wBAAwB;yHATvB,wBAAwB,4FCbrC,4EAAsE;sHDazD,wBAAwB;sBALpCL,YAAS;uBAAC;wBACT,QAAQ,EAAE,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;YAEZU,qBAAkB,aAGlB,wBAAwB;8IAMf,qBAAqB,YAZvB;gBACPV,iBAAY;gBAEZU,qBAAkB;aACnB;sHAQU,qBAAqB;sBAbjCG,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPb,iBAAY;4BAEZU,qBAAkB;yBACnB;wBACD,OAAO,EAAE;4BACP,wBAAwB;yBACzB;wBACD,YAAY,EAAE;4BACZ,wBAAwB;yBACzB;qBACF;;;ICpBD;;;;;;;;;;;;;;;;"}
|
|
@@ -33,7 +33,7 @@ export class FsContentWidgetComponent {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
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' }\"\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: '
|
|
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: [{
|
|
@@ -44,4 +44,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
|
|
|
44
44
|
type: Inject,
|
|
45
45
|
args: [MAT_DIALOG_DATA]
|
|
46
46
|
}] }]; } });
|
|
47
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
47
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb250ZW50LXdpZGdldHMvY29tcG9uZW50cy9jb250ZW50LXdpZGdldC9jb250ZW50LXdpZGdldC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbnRlbnQtd2lkZ2V0cy9jb21wb25lbnRzL2NvbnRlbnQtd2lkZ2V0L2NvbnRlbnQtd2lkZ2V0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBRTFELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUczRCxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFHaEQsT0FBTyxFQUFFLEdBQUcsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7Ozs7Ozs7Ozs7O0FBT3JDLE1BQU0sT0FBTyx3QkFBd0I7SUFPbkMsWUFDVSxRQUFtQixFQUNNLEt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ICAgICAgICBbY29uZmlnXT1cImh0bWxFZGl0b3JDb25maWdcIlxuICAgICAgICAgICAgICBuYW1lPVwiY29udGVudFwiPlxuICAgICAgICAgICAgPC9mcy1odG1sLWVkaXRvcj5cbiAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICA8L21hdC10YWI+XG4gICAgICAgIDxtYXQtdGFiIGxhYmVsPVwiSFRNTFwiPlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQuY29udGVudFwiIFxuICAgICAgICAgICAgICBbY29uZmlnXT1cInsgbGFuZ3VhZ2U6ICdodG1sJywgdGFiU2l6ZTogMiB9XCJcbiAgICAgICAgICAgICAgbmFtZT1cImh0bWxcIj5cbiAgICAgICAgICAgIDwvZnMtdGV4dC1lZGl0b3I+XG4gICAgICAgICAgPC9uZy10ZW1wbGF0ZT5cbiAgICAgICAgPC9tYXQtdGFiPlxuICAgICAgICA8bWF0LXRhYiBsYWJlbD1cIlN0eWxlc1wiPlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQuc3R5bGVzXCIgXG4gICAgICAgICAgICAgIFtjb25maWddPVwieyBsYW5ndWFnZTogJ3Njc3MnLCB0YWJTaXplOiAyIH1cIlxuICAgICAgICAgICAgICBuYW1lPVwic3R5bGVzXCI+XG4gICAgICAgICAgICA8L2ZzLXRleHQtZWRpdG9yPlxuICAgICAgICAgIDwvbmctdGVtcGxhdGU+XG4gICAgICAgIDwvbWF0LXRhYj5cbiAgICAgICAgPG1hdC10YWIgbGFiZWw9XCJTZXR0aW5nc1wiPlxuICAgICAgICAgIDxtYXQtZm9ybS1maWVsZD5cbiAgICAgICAgICAgIDxpbnB1dCBcbiAgICAgICAgICAgICAgbWF0SW5wdXQgXG4gICAgICAgICAgICAgIHBsYWNlaG9sZGVyPVwiTmFtZVwiIFxuICAgICAgICAgICAgICBbKG5nTW9kZWwpXT1cImNvbnRlbnRXaWRnZXQubmFtZVwiIFxuICAgICAgICAgICAgICBuYW1lPVwibmFtZVwiIFxuICAgICAgICAgICAgICBbcmVxdWlyZWRdPVwidHJ1ZVwiPlxuICAgICAgICAgIDwvbWF0LWZvcm0tZmllbGQ+XG4gICAgICAgIDwvbWF0LXRhYj5cbiAgICAgIDwvbWF0LXRhYi1ncm91cD5cblxuXG4gICAgPC9tYXQtZGlhbG9nLWNvbnRlbnQ+XG4gICAgPG1hdC1kaWFsb2ctYWN0aW9ucz5cbiAgICAgIDxidXR0b24gXG4gICAgICAgICAgbWF0LWJ1dHRvbiBcbiAgICAgICAgICBjb2xvcj1cInByaW1hcnlcIj5cbiAgICAgICAgU2F2ZVxuICAgICAgPC9idXR0b24+XG4gICAgICA8YnV0dG9uIFxuICAgICAgICAgIG1hdC1idXR0b24gXG4gICAgICAgICAgW21hdC1kaWFsb2ctY2xvc2VdPVwibnVsbFwiIFxuICAgICAgICAgIHR5cGU9XCJidXR0b25cIj5cbiAgICAgICAgQ2FuY2VsXG4gICAgICA8L2J1dHRvbj5cbiAgICA8L21hdC1kaWFsb2ctYWN0aW9ucz5cbiAgPC9mcy1kaWFsb2c+XG48L2Zvcm0+XG4iXX0=
|
|
@@ -50,7 +50,7 @@ class FsContentWidgetComponent$1 {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
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' }\"\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: '
|
|
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"] }] });
|
|
54
54
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent$1, decorators: [{
|
|
55
55
|
type: Component,
|
|
56
56
|
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 { 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' }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor \n [(ngModel)]=\"contentWidget.styles\" \n [config]=\"{ language: 'css' }\"\n name=\"css\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input \n matInput \n placeholder=\"Name\" \n [(ngModel)]=\"contentWidget.name\" \n name=\"name\" \n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n\n\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n color=\"primary\">\n Save\n </button>\n <button \n mat-button \n [mat-dialog-close]=\"null\" \n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n","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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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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