@firestitch/content-widget 12.2.2 → 13.0.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.
Files changed (57) hide show
  1. package/app/content-widget/components/content-widget/content-widget.component.d.ts +16 -16
  2. package/app/content-widget/components/content-widget/index.d.ts +1 -1
  3. package/app/content-widget/components/content-widget-dialog/content-widget-dialog.component.d.ts +9 -9
  4. package/app/content-widget/components/content-widget-dialog/index.d.ts +1 -1
  5. package/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.d.ts +16 -16
  6. package/app/content-widget/components/content-widget-renderer/index.d.ts +1 -1
  7. package/app/content-widget/components/index.d.ts +1 -1
  8. package/app/content-widget/directives/content-widget-content.directive.d.ts +5 -5
  9. package/app/content-widget/directives/index.d.ts +1 -1
  10. package/app/content-widget/fs-content-widget.module.d.ts +17 -17
  11. package/app/content-widget/injectors/content-wiget.injector.d.ts +2 -2
  12. package/app/content-widget/injectors/index.d.ts +1 -1
  13. package/app/content-widget/interfaces/content-widget-config.d.ts +4 -4
  14. package/app/content-widget/services/content-widget.service.d.ts +9 -9
  15. package/app/content-widget/services/index.d.ts +1 -1
  16. package/app/content-widgets/components/content-widget/content-widget.component.d.ts +17 -17
  17. package/app/content-widgets/components/content-widget/index.d.ts +1 -1
  18. package/app/content-widgets/components/content-widgets/content-widgets.component.d.ts +24 -24
  19. package/app/content-widgets/components/content-widgets/index.d.ts +1 -1
  20. package/app/content-widgets/fs-content-widgets.module.d.ts +23 -23
  21. package/esm2020/app/content-widget/components/content-widget/content-widget.component.mjs +42 -0
  22. package/{esm2015/app/content-widget/components/content-widget/index.js → esm2020/app/content-widget/components/content-widget/index.mjs} +1 -1
  23. package/esm2020/app/content-widget/components/content-widget-dialog/content-widget-dialog.component.mjs +25 -0
  24. package/{esm2015/app/content-widget/components/content-widget-dialog/index.js → esm2020/app/content-widget/components/content-widget-dialog/index.mjs} +1 -1
  25. package/{esm2015/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.js → esm2020/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.mjs} +48 -52
  26. package/{esm2015/app/content-widget/components/content-widget-renderer/index.js → esm2020/app/content-widget/components/content-widget-renderer/index.mjs} +1 -1
  27. package/{esm2015/app/content-widget/components/index.js → esm2020/app/content-widget/components/index.mjs} +1 -1
  28. package/{esm2015/app/content-widget/directives/content-widget-content.directive.js → esm2020/app/content-widget/directives/content-widget-content.directive.mjs} +13 -13
  29. package/{esm2015/app/content-widget/directives/index.js → esm2020/app/content-widget/directives/index.mjs} +1 -1
  30. package/{esm2015/app/content-widget/fs-content-widget.module.js → esm2020/app/content-widget/fs-content-widget.module.mjs} +61 -61
  31. package/{esm2015/app/content-widget/injectors/content-wiget.injector.js → esm2020/app/content-widget/injectors/content-wiget.injector.mjs} +2 -2
  32. package/{esm2015/app/content-widget/injectors/index.js → esm2020/app/content-widget/injectors/index.mjs} +1 -1
  33. package/{esm2015/app/content-widget/interfaces/content-widget-config.js → esm2020/app/content-widget/interfaces/content-widget-config.mjs} +1 -1
  34. package/{esm2015/app/content-widget/services/content-widget.service.js → esm2020/app/content-widget/services/content-widget.service.mjs} +27 -27
  35. package/{esm2015/app/content-widget/services/index.js → esm2020/app/content-widget/services/index.mjs} +1 -1
  36. package/esm2020/app/content-widgets/components/content-widget/content-widget.component.mjs +46 -0
  37. package/{esm2015/app/content-widgets/components/content-widget/index.js → esm2020/app/content-widgets/components/content-widget/index.mjs} +1 -1
  38. package/esm2020/app/content-widgets/components/content-widgets/content-widgets.component.mjs +68 -0
  39. package/{esm2015/app/content-widgets/components/content-widgets/index.js → esm2020/app/content-widgets/components/content-widgets/index.mjs} +1 -1
  40. package/{esm2015/app/content-widgets/fs-content-widgets.module.js → esm2020/app/content-widgets/fs-content-widgets.module.mjs} +82 -82
  41. package/{esm2015/firestitch-content-widget.js → esm2020/firestitch-content-widget.mjs} +4 -4
  42. package/{esm2015/public_api.js → esm2020/public_api.mjs} +7 -7
  43. package/fesm2015/firestitch-content-widget.mjs +373 -0
  44. package/fesm2015/firestitch-content-widget.mjs.map +1 -0
  45. package/fesm2020/firestitch-content-widget.mjs +369 -0
  46. package/fesm2020/firestitch-content-widget.mjs.map +1 -0
  47. package/firestitch-content-widget.d.ts +5 -5
  48. package/package.json +20 -7
  49. package/public_api.d.ts +8 -8
  50. package/bundles/firestitch-content-widget.umd.js +0 -433
  51. package/bundles/firestitch-content-widget.umd.js.map +0 -1
  52. package/esm2015/app/content-widget/components/content-widget/content-widget.component.js +0 -46
  53. package/esm2015/app/content-widget/components/content-widget-dialog/content-widget-dialog.component.js +0 -29
  54. package/esm2015/app/content-widgets/components/content-widget/content-widget.component.js +0 -47
  55. package/esm2015/app/content-widgets/components/content-widgets/content-widgets.component.js +0 -72
  56. package/fesm2015/firestitch-content-widget.js +0 -386
  57. package/fesm2015/firestitch-content-widget.js.map +0 -1
@@ -1,29 +0,0 @@
1
- import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';
2
- import { MAT_DIALOG_DATA } from '@angular/material/dialog';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@firestitch/dialog";
5
- import * as i2 from "../content-widget/content-widget.component";
6
- import * as i3 from "@angular/material/button";
7
- import * as i4 from "@angular/common";
8
- import * as i5 from "@angular/material/dialog";
9
- export class FsContentWidgetDialogComponent {
10
- constructor(_data) {
11
- this._data = _data;
12
- this.title = _data.title;
13
- this.tag = _data.tag;
14
- }
15
- }
16
- FsContentWidgetDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
17
- FsContentWidgetDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetDialogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <ng-container *ngIf=\"title\">\n <div mat-dialog-title>{{title}}</div>\n </ng-container>\n <mat-dialog-content>\n <fs-content-widget [tag]=\"tag\"></fs-content-widget>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n color=\"primary\" \n type=\"button\" \n [mat-dialog-close]=\"null\">\n Close \n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i1.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: i2.FsContentWidgetComponent, selector: "fs-content-widget", inputs: ["tag"] }, { type: i3.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: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i5.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i5.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i5.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i5.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetDialogComponent, decorators: [{
19
- type: Component,
20
- args: [{
21
- templateUrl: './content-widget-dialog.component.html',
22
- styleUrls: ['./content-widget-dialog.component.scss'],
23
- changeDetection: ChangeDetectionStrategy.OnPush,
24
- }]
25
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
26
- type: Inject,
27
- args: [MAT_DIALOG_DATA]
28
- }] }]; } });
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZ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V0dG9uIFxuICAgICAgICBjb2xvcj1cInByaW1hcnlcIiBcbiAgICAgICAgdHlwZT1cImJ1dHRvblwiIFxuICAgICAgICBbbWF0LWRpYWxvZy1jbG9zZV09XCJudWxsXCI+XG4gICAgICBDbG9zZSBcbiAgICA8L2J1dHRvbj5cbiAgPC9tYXQtZGlhbG9nLWFjdGlvbnM+XG48L2ZzLWRpYWxvZz5cbiJdfQ==
@@ -1,47 +0,0 @@
1
- import { Component, Inject } from '@angular/core';
2
- import { MAT_DIALOG_DATA } from '@angular/material/dialog';
3
- import { FsMessage } from '@firestitch/message';
4
- import { tap } from 'rxjs/operators';
5
- import * as i0 from "@angular/core";
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/text-editor";
10
- import * as i5 from "@firestitch/html-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";
17
- export class FsContentWidgetComponent {
18
- constructor(_message, _data) {
19
- this._message = _message;
20
- this._data = _data;
21
- this.save = () => {
22
- return this._saveContentWidget(this.contentWidget)
23
- .pipe(tap((contentWidget) => {
24
- this.contentWidget = Object.assign(Object.assign({}, this.contentWidget), contentWidget);
25
- this._message.success('Saved Changes');
26
- }));
27
- };
28
- }
29
- ngOnInit() {
30
- this._saveContentWidget = this._data.saveContentWidget;
31
- this.htmlEditorConfig = Object.assign({}, this._data.htmlEditorConfig);
32
- this.contentWidget = Object.assign({}, this._data.contentWidget);
33
- }
34
- }
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 <mat-tab-group>\n <mat-tab label=\"HTML\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"{ language: 'html', tabSize: 2 }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Rich Text\">\n <ng-template matTabContent>\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.styles\"\n [config]=\"{ language: 'scss', tabSize: 2 }\"\n name=\"styles\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"contentWidget.name\"\n name=\"name\"\n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\">\n Save\n </button>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["mat-form-field{width:100%}fs-html-editor{min-height:400px;display:block;overflow:hidden}.subtitle{font-size:60%;line-height:normal}:host ::ng-deep .mat-tab-body-content{overflow:visible}\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.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i5.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { 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
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
38
- type: Component,
39
- args: [{
40
- templateUrl: './content-widget.component.html',
41
- styleUrls: ['./content-widget.component.scss'],
42
- }]
43
- }], ctorParameters: function () { return [{ type: i1.FsMessage }, { type: undefined, decorators: [{
44
- type: Inject,
45
- args: [MAT_DIALOG_DATA]
46
- }] }]; } });
47
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vc3JjL2FwcC9jb250ZW50LXdpZGdldHMvY29tcG9uZW50cy9jb250ZW50LXdpZGdldC9jb250ZW50LXdpZGdldC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zc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FiPlxuICAgICAgICA8bWF0LXRhYiBsYWJlbD1cIlN0eWxlc1wiPlxuICAgICAgICAgIDxuZy10ZW1wbGF0ZSBtYXRUYWJDb250ZW50PlxuICAgICAgICAgICAgPGZzLXRleHQtZWRpdG9yXG4gICAgICAgICAgICAgIFsobmdNb2RlbCldPVwiY29udGVudFdpZGdldC5zdHlsZXNcIlxuICAgICAgICAgICAgICBbY29uZmlnXT1cInsgbGFuZ3VhZ2U6ICdzY3NzJywgdGFiU2l6ZTogMiB9XCJcbiAgICAgICAgICAgICAgbmFtZT1cInN0eWxlc1wiPlxuICAgICAgICAgICAgPC9mcy10ZXh0LWVkaXRvcj5cbiAgICAgICAgICA8L25nLXRlbXBsYXRlPlxuICAgICAgICA8L21hdC10YWI+XG4gICAgICAgIDxtYXQtdGFiIGxhYmVsPVwiU2V0dGluZ3NcIj5cbiAgICAgICAgICA8bWF0LWZvcm0tZmllbGQ+XG4gICAgICAgICAgICA8aW5wdXRcbiAgICAgICAgICAgICAgbWF0SW5wdXRcbiAgICAgICAgICAgICAgcGxhY2Vob2xkZXI9XCJOYW1lXCJcbiAgICAgICAgICAgICAgWyhuZ01vZGVsKV09XCJjb250ZW50V2lkZ2V0Lm5hbWVcIlxuICAgICAgICAgICAgICBuYW1lPVwibmFtZVwiXG4gICAgICAgICAgICAgIFtyZXF1aXJlZF09XCJ0cnVlXCI+XG4gICAgICAgICAgPC9tYXQtZm9ybS1maWVsZD5cbiAgICAgICAgPC9tYXQtdGFiPlxuICAgICAgPC9tYXQtdGFiLWdyb3VwPlxuICAgIDwvbWF0LWRpYWxvZy1jb250ZW50PlxuICAgIDxtYXQtZGlhbG9nLWFjdGlvbnM+XG4gICAgICA8YnV0dG9uXG4gICAgICAgICAgbWF0LWJ1dHRvblxuICAgICAgICAgIGNvbG9yPVwicHJpbWFyeVwiPlxuICAgICAgICBTYXZlXG4gICAgICA8L2J1dHRvbj5cbiAgICAgIDxidXR0b25cbiAgICAgICAgICBtYXQtYnV0dG9uXG4gICAgICAgICAgW21hdC1kaWFsb2ctY2xvc2VdPVwibnVsbFwiXG4gICAgICAgICAgdHlwZT1cImJ1dHRvblwiPlxuICAgICAgICBDYW5jZWxcbiAgICAgIDwvYnV0dG9uPlxuICAgIDwvbWF0LWRpYWxvZy1hY3Rpb25zPlxuICA8L2ZzLWRpYWxvZz5cbjwvZm9ybT5cbiJdfQ==
@@ -1,72 +0,0 @@
1
- import { Component, ViewChild, Input } from '@angular/core';
2
- import { MatDialog } from '@angular/material/dialog';
3
- import { FsListComponent } from '@firestitch/list';
4
- import { ItemType } from '@firestitch/filter';
5
- import { Subject } from 'rxjs';
6
- import { map, takeUntil } from 'rxjs/operators';
7
- import { FsContentWidgetComponent } from '../content-widget/content-widget.component';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "@angular/material/dialog";
10
- import * as i2 from "@firestitch/list";
11
- import * as i3 from "@firestitch/date";
12
- export class FsContentWidgetsComponent {
13
- constructor(_dialog) {
14
- this._dialog = _dialog;
15
- this._destroy$ = new Subject();
16
- }
17
- ngOnInit() {
18
- this.config = {
19
- paging: false,
20
- filters: [
21
- {
22
- name: 'keyword',
23
- type: ItemType.Keyword,
24
- label: 'Search',
25
- },
26
- ],
27
- fetch: (query) => {
28
- return this.fetchContentWidgets(query)
29
- .pipe(map((data) => ({ data: data.contentWidgets })));
30
- },
31
- };
32
- }
33
- ngOnDestroy() {
34
- this._destroy$.next();
35
- this._destroy$.complete();
36
- }
37
- open(contentWidget) {
38
- this._dialog.open(FsContentWidgetComponent, {
39
- width: '90%',
40
- data: {
41
- contentWidget,
42
- htmlEditorConfig: this.htmlEditorConfig,
43
- saveContentWidget: this.saveContentWidget,
44
- },
45
- })
46
- .afterClosed()
47
- .pipe(takeUntil(this._destroy$))
48
- .subscribe(() => {
49
- this.list.reload();
50
- });
51
- }
52
- }
53
- FsContentWidgetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, deps: [{ token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
54
- 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.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { type: i3.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }], directives: [{ type: i2.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "direction", "align", "width", "class"] }, { type: i2.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { type: i2.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }] });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, decorators: [{
56
- type: Component,
57
- args: [{
58
- selector: 'fs-content-widgets',
59
- templateUrl: './content-widgets.component.html',
60
- styleUrls: ['./content-widgets.component.scss'],
61
- }]
62
- }], ctorParameters: function () { return [{ type: i1.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
63
- type: Input
64
- }], saveContentWidget: [{
65
- type: Input
66
- }], htmlEditorConfig: [{
67
- type: Input
68
- }], list: [{
69
- type: ViewChild,
70
- args: [FsListComponent, { static: true }]
71
- }] } });
72
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC13aWRnZXRzLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3NyYy9hcHAvY29udGVudC13aWRnZXRzL2NvbXBvbmVudHMvY29udGVudC13aWRnZXRzL2NvbnRlbnQtd2lkZ2V0cy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL2NvbnRlbnQtd2lkZ2V0cy9jb21wb25lbnRzL2NvbnRlbnQtd2lkZ2V0cy9jb250ZW50LXdpZGdldHMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxTQUFTLEVBQXFCLEtBQUssRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUUvRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFckQsT0FBTyxFQUFFLGVBQWUsRUFBZ0IsTUFBTSxrQkFBa0IsQ0FBQztBQUNqRSxPQUFPLEVBQUUsUUFBUSxFQUFF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1cInByZXZpZXctY29udGVudFwiPlxuICAgICAgICAgIDxkaXYgW2lubmVySFRNTF09XCJyb3cuY29udGVudFwiPjwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvbmctdGVtcGxhdGU+XG4gIDwvZnMtbGlzdC1jb2x1bW4+XG4gIDxmcy1saXN0LWNvbHVtbiBjbGFzcz1cIm1vZGlmaWVkXCI+XG4gICAgPG5nLXRlbXBsYXRlIGZzLWxpc3QtaGVhZGVyPk1vZGlmaWVkPC9uZy10ZW1wbGF0ZT5cbiAgICA8bmctdGVtcGxhdGUgZnMtbGlzdC1jZWxsIGxldC1yb3c9XCJyb3dcIj5cbiAgICAgIDxmcy1kYXRlLWFnbyBbZGF0ZV09XCJyb3cubW9kaWZpZWREYXRlXCI+PC9mcy1kYXRlLWFnbz5cbiAgICA8L25nLXRlbXBsYXRlPlxuICA8L2ZzLWxpc3QtY29sdW1uPlxuPC9mcy1saXN0PlxuIl19
@@ -1,386 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, Inject, Input, ViewChild, NgModule, Directive, InjectionToken, TemplateRef, ContentChild, ChangeDetectionStrategy, Injectable } from '@angular/core';
3
- import * as i2$2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
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';
10
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
11
- import * as i8 from '@angular/forms';
12
- import { FormsModule } from '@angular/forms';
13
- import * as i11 from '@angular/material/input';
14
- import { MatInputModule } from '@angular/material/input';
15
- import * as i6 from '@angular/material/form-field';
16
- import { MatFormFieldModule } from '@angular/material/form-field';
17
- import * as i2$1 from '@firestitch/list';
18
- import { FsListComponent, FsListModule } from '@firestitch/list';
19
- import * as i3$1 from '@firestitch/date';
20
- import { FsDateModule } from '@firestitch/date';
21
- import * as i2 from '@firestitch/dialog';
22
- import { FsDialogModule } from '@firestitch/dialog';
23
- import * as i9 from '@firestitch/form';
24
- import { FsFormModule } from '@firestitch/form';
25
- import * as i5 from '@firestitch/html-editor';
26
- import { FsHtmlEditorModule, FsHtmlRendererModule } from '@firestitch/html-editor';
27
- import * as i4 from '@firestitch/text-editor';
28
- import { FsTextEditorModule } from '@firestitch/text-editor';
29
- import * as i1 from '@firestitch/message';
30
- import { tap, map, takeUntil } from 'rxjs/operators';
31
- import { ItemType } from '@firestitch/filter';
32
- import { Subject } from 'rxjs';
33
- import * as i1$1 from '@angular/router';
34
-
35
- class FsContentWidgetComponent$1 {
36
- constructor(_message, _data) {
37
- this._message = _message;
38
- this._data = _data;
39
- this.save = () => {
40
- return this._saveContentWidget(this.contentWidget)
41
- .pipe(tap((contentWidget) => {
42
- this.contentWidget = Object.assign(Object.assign({}, this.contentWidget), contentWidget);
43
- this._message.success('Saved Changes');
44
- }));
45
- };
46
- }
47
- ngOnInit() {
48
- this._saveContentWidget = this._data.saveContentWidget;
49
- this.htmlEditorConfig = Object.assign({}, this._data.htmlEditorConfig);
50
- this.contentWidget = Object.assign({}, this._data.contentWidget);
51
- }
52
- }
53
- 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 });
54
- 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 <mat-tab-group>\n <mat-tab label=\"HTML\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"{ language: 'html', tabSize: 2 }\"\n name=\"html\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Rich Text\">\n <ng-template matTabContent>\n <fs-html-editor\n [(ngModel)]=\"contentWidget.content\"\n [config]=\"htmlEditorConfig\"\n name=\"content\">\n </fs-html-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Styles\">\n <ng-template matTabContent>\n <fs-text-editor\n [(ngModel)]=\"contentWidget.styles\"\n [config]=\"{ language: 'scss', tabSize: 2 }\"\n name=\"styles\">\n </fs-text-editor>\n </ng-template>\n </mat-tab>\n <mat-tab label=\"Settings\">\n <mat-form-field>\n <input\n matInput\n placeholder=\"Name\"\n [(ngModel)]=\"contentWidget.name\"\n name=\"name\"\n [required]=\"true\">\n </mat-form-field>\n </mat-tab>\n </mat-tab-group>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button\n mat-button\n color=\"primary\">\n Save\n </button>\n <button\n mat-button\n [mat-dialog-close]=\"null\"\n type=\"button\">\n Cancel\n </button>\n </mat-dialog-actions>\n </fs-dialog>\n</form>\n", styles: ["mat-form-field{width:100%}fs-html-editor{min-height:400px;display:block;overflow:hidden}.subtitle{font-size:60%;line-height:normal}:host ::ng-deep .mat-tab-body-content{overflow:visible}\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.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["init", "blur"] }, { type: i5.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config"] }, { 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"] }] });
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent$1, decorators: [{
56
- type: Component,
57
- args: [{
58
- templateUrl: './content-widget.component.html',
59
- styleUrls: ['./content-widget.component.scss'],
60
- }]
61
- }], ctorParameters: function () { return [{ type: i1.FsMessage }, { type: undefined, decorators: [{
62
- type: Inject,
63
- args: [MAT_DIALOG_DATA]
64
- }] }]; } });
65
-
66
- class FsContentWidgetsComponent {
67
- constructor(_dialog) {
68
- this._dialog = _dialog;
69
- this._destroy$ = new Subject();
70
- }
71
- ngOnInit() {
72
- this.config = {
73
- paging: false,
74
- filters: [
75
- {
76
- name: 'keyword',
77
- type: ItemType.Keyword,
78
- label: 'Search',
79
- },
80
- ],
81
- fetch: (query) => {
82
- return this.fetchContentWidgets(query)
83
- .pipe(map((data) => ({ data: data.contentWidgets })));
84
- },
85
- };
86
- }
87
- ngOnDestroy() {
88
- this._destroy$.next();
89
- this._destroy$.complete();
90
- }
91
- open(contentWidget) {
92
- this._dialog.open(FsContentWidgetComponent$1, {
93
- width: '90%',
94
- data: {
95
- contentWidget,
96
- htmlEditorConfig: this.htmlEditorConfig,
97
- saveContentWidget: this.saveContentWidget,
98
- },
99
- })
100
- .afterClosed()
101
- .pipe(takeUntil(this._destroy$))
102
- .subscribe(() => {
103
- this.list.reload();
104
- });
105
- }
106
- }
107
- FsContentWidgetsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, deps: [{ token: i10.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
108
- 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"] }] });
109
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsComponent, decorators: [{
110
- type: Component,
111
- args: [{
112
- selector: 'fs-content-widgets',
113
- templateUrl: './content-widgets.component.html',
114
- styleUrls: ['./content-widgets.component.scss'],
115
- }]
116
- }], ctorParameters: function () { return [{ type: i10.MatDialog }]; }, propDecorators: { fetchContentWidgets: [{
117
- type: Input
118
- }], saveContentWidget: [{
119
- type: Input
120
- }], htmlEditorConfig: [{
121
- type: Input
122
- }], list: [{
123
- type: ViewChild,
124
- args: [FsListComponent, { static: true }]
125
- }] } });
126
-
127
- class FsContentWidgetsModule {
128
- static forRoot() {
129
- return {
130
- ngModule: FsContentWidgetsModule,
131
- };
132
- }
133
- }
134
- FsContentWidgetsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
135
- FsContentWidgetsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, declarations: [FsContentWidgetsComponent,
136
- FsContentWidgetComponent$1], imports: [CommonModule,
137
- FormsModule,
138
- MatDialogModule,
139
- MatInputModule,
140
- MatFormFieldModule,
141
- MatButtonModule,
142
- MatTabsModule,
143
- FsListModule,
144
- FsDateModule,
145
- FsFormModule,
146
- FsHtmlEditorModule,
147
- FsDialogModule,
148
- FsTextEditorModule], exports: [FsContentWidgetsComponent] });
149
- FsContentWidgetsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, imports: [[
150
- CommonModule,
151
- FormsModule,
152
- MatDialogModule,
153
- MatInputModule,
154
- MatFormFieldModule,
155
- MatButtonModule,
156
- MatTabsModule,
157
- FsListModule,
158
- FsDateModule,
159
- FsFormModule,
160
- FsHtmlEditorModule,
161
- FsDialogModule,
162
- FsTextEditorModule,
163
- ]] });
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetsModule, decorators: [{
165
- type: NgModule,
166
- args: [{
167
- imports: [
168
- CommonModule,
169
- FormsModule,
170
- MatDialogModule,
171
- MatInputModule,
172
- MatFormFieldModule,
173
- MatButtonModule,
174
- MatTabsModule,
175
- FsListModule,
176
- FsDateModule,
177
- FsFormModule,
178
- FsHtmlEditorModule,
179
- FsDialogModule,
180
- FsTextEditorModule,
181
- ],
182
- exports: [
183
- FsContentWidgetsComponent,
184
- ],
185
- declarations: [
186
- FsContentWidgetsComponent,
187
- FsContentWidgetComponent$1,
188
- ],
189
- }]
190
- }] });
191
-
192
- class FsContentWidgetContentDirective {
193
- }
194
- FsContentWidgetContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
195
- FsContentWidgetContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetContentDirective, selector: "[fsContentWidgetContent]", ngImport: i0 });
196
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetContentDirective, decorators: [{
197
- type: Directive,
198
- args: [{
199
- selector: '[fsContentWidgetContent]',
200
- }]
201
- }] });
202
-
203
- const FS_CONTENT_WIDGET_CONFIG = new InjectionToken('fs-content-widget-config');
204
-
205
- class FsContentWidgetRendererComponent {
206
- constructor(_router, _el) {
207
- this._router = _router;
208
- this._el = _el;
209
- this.destroy$ = new Subject();
210
- }
211
- ngAfterViewChecked() {
212
- this.registerHrefs();
213
- }
214
- get el() {
215
- return this._el.nativeElement;
216
- }
217
- registerHrefs() {
218
- Array.from(this.el.querySelectorAll('a[href]'))
219
- .filter((el) => {
220
- return el.getAttribute('href').match(/^\//);
221
- })
222
- .forEach((el) => {
223
- el.addEventListener('click', (event) => {
224
- if (!event.shiftKey && !event.ctrlKey) {
225
- event.preventDefault();
226
- const href = el.getAttribute('href');
227
- this._router.navigateByUrl(href);
228
- }
229
- });
230
- });
231
- }
232
- ngOnDestroy() {
233
- this.destroy$.next();
234
- this.destroy$.complete();
235
- }
236
- }
237
- FsContentWidgetRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetRendererComponent, deps: [{ token: i1$1.Router }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
238
- FsContentWidgetRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: { content: "content" }, ngImport: i0, template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: i5.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
239
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetRendererComponent, decorators: [{
240
- type: Component,
241
- args: [{
242
- selector: 'fs-content-widget-renderer',
243
- templateUrl: './content-widget-renderer.component.html',
244
- styleUrls: ['./content-widget-renderer.component.scss'],
245
- }]
246
- }], ctorParameters: function () { return [{ type: i1$1.Router }, { type: i0.ElementRef }]; }, propDecorators: { content: [{
247
- type: Input
248
- }] } });
249
-
250
- class FsContentWidgetComponent {
251
- constructor(config, _cdRef) {
252
- this.config = config;
253
- this._cdRef = _cdRef;
254
- this.destroy$ = new Subject();
255
- }
256
- ngOnInit() {
257
- this.config.fetchContentWidget(this.tag)
258
- .pipe(takeUntil(this.destroy$))
259
- .subscribe((content) => {
260
- this.content = content;
261
- this._cdRef.markForCheck();
262
- });
263
- }
264
- ngOnDestroy() {
265
- this.destroy$.next();
266
- this.destroy$.complete();
267
- }
268
- }
269
- 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 });
270
- FsContentWidgetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: { tag: "tag" }, queries: [{ propertyName: "contentWidgetContent", first: true, predicate: FsContentWidgetContentDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<ng-container *ngIf=\"content\">\n <ng-container *ngIf=\"contentWidgetContent; else renderer\">\n <ng-container \n [ngTemplateOutlet]=\"contentWidgetContent\" \n [ngTemplateOutletContext]=\"{ content: renderer }\">\n </ng-container>\n </ng-container>\n <ng-template #renderer>\n <fs-content-widget-renderer \n [content]=\"content\">\n </fs-content-widget-renderer>\n </ng-template>\n</ng-container>", styles: [":host ::ng-deep img{max-width:100%}\n"], components: [{ type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: ["content"] }], directives: [{ type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i2$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
271
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
272
- type: Component,
273
- args: [{
274
- selector: 'fs-content-widget',
275
- templateUrl: './content-widget.component.html',
276
- styleUrls: ['./content-widget.component.scss'],
277
- }]
278
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
279
- type: Inject,
280
- args: [FS_CONTENT_WIDGET_CONFIG]
281
- }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { contentWidgetContent: [{
282
- type: ContentChild,
283
- args: [FsContentWidgetContentDirective, { read: TemplateRef }]
284
- }], tag: [{
285
- type: Input
286
- }] } });
287
-
288
- class FsContentWidgetDialogComponent {
289
- constructor(_data) {
290
- this._data = _data;
291
- this.title = _data.title;
292
- this.tag = _data.tag;
293
- }
294
- }
295
- FsContentWidgetDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
296
- FsContentWidgetDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsContentWidgetDialogComponent, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n <ng-container *ngIf=\"title\">\n <div mat-dialog-title>{{title}}</div>\n </ng-container>\n <mat-dialog-content>\n <fs-content-widget [tag]=\"tag\"></fs-content-widget>\n </mat-dialog-content>\n <mat-dialog-actions>\n <button \n mat-button \n color=\"primary\" \n type=\"button\" \n [mat-dialog-close]=\"null\">\n Close \n </button>\n </mat-dialog-actions>\n</fs-dialog>\n", styles: [""], components: [{ type: i2.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode"] }, { type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: ["tag"] }, { 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: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i10.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i10.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { 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"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
297
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetDialogComponent, decorators: [{
298
- type: Component,
299
- args: [{
300
- templateUrl: './content-widget-dialog.component.html',
301
- styleUrls: ['./content-widget-dialog.component.scss'],
302
- changeDetection: ChangeDetectionStrategy.OnPush,
303
- }]
304
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
305
- type: Inject,
306
- args: [MAT_DIALOG_DATA]
307
- }] }]; } });
308
-
309
- class FsContentWidgetModule {
310
- static forRoot() {
311
- return {
312
- ngModule: FsContentWidgetModule,
313
- };
314
- }
315
- }
316
- FsContentWidgetModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
317
- FsContentWidgetModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetModule, declarations: [FsContentWidgetRendererComponent,
318
- FsContentWidgetComponent,
319
- FsContentWidgetDialogComponent,
320
- FsContentWidgetContentDirective], imports: [CommonModule,
321
- MatDialogModule,
322
- MatButtonModule,
323
- FsHtmlEditorModule,
324
- FsDialogModule,
325
- FsHtmlRendererModule], exports: [FsContentWidgetComponent,
326
- FsContentWidgetContentDirective] });
327
- FsContentWidgetModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetModule, imports: [[
328
- CommonModule,
329
- MatDialogModule,
330
- MatButtonModule,
331
- FsHtmlEditorModule,
332
- FsDialogModule,
333
- FsHtmlRendererModule,
334
- ]] });
335
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidgetModule, decorators: [{
336
- type: NgModule,
337
- args: [{
338
- imports: [
339
- CommonModule,
340
- MatDialogModule,
341
- MatButtonModule,
342
- FsHtmlEditorModule,
343
- FsDialogModule,
344
- FsHtmlRendererModule,
345
- ],
346
- exports: [
347
- FsContentWidgetComponent,
348
- FsContentWidgetContentDirective,
349
- ],
350
- declarations: [
351
- FsContentWidgetRendererComponent,
352
- FsContentWidgetComponent,
353
- FsContentWidgetDialogComponent,
354
- FsContentWidgetContentDirective,
355
- ],
356
- }]
357
- }] });
358
-
359
- class FsContentWidget {
360
- constructor(_dialog) {
361
- this._dialog = _dialog;
362
- }
363
- open(tag, title) {
364
- this._dialog.open(FsContentWidgetDialogComponent, {
365
- data: {
366
- tag,
367
- title,
368
- }
369
- });
370
- }
371
- }
372
- FsContentWidget.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidget, deps: [{ token: i10.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
373
- FsContentWidget.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidget, providedIn: 'root' });
374
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: FsContentWidget, decorators: [{
375
- type: Injectable,
376
- args: [{
377
- providedIn: 'root',
378
- }]
379
- }], ctorParameters: function () { return [{ type: i10.MatDialog }]; } });
380
-
381
- /**
382
- * Generated bundle index. Do not edit.
383
- */
384
-
385
- export { FS_CONTENT_WIDGET_CONFIG, FsContentWidget, FsContentWidgetComponent, FsContentWidgetContentDirective, FsContentWidgetModule, FsContentWidgetsComponent, FsContentWidgetsModule };
386
- //# sourceMappingURL=firestitch-content-widget.js.map