@firestitch/content-widget 17.0.0 → 18.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 (23) hide show
  1. package/app/content-widget/components/content-widget/content-widget.component.d.ts +2 -3
  2. package/app/content-widget/components/content-widget-dialog/content-widget-dialog.component.d.ts +2 -2
  3. package/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.d.ts +10 -11
  4. package/app/content-widget/directives/content-widget-content.directive.d.ts +1 -1
  5. package/app/content-widget/fs-content-widget.module.d.ts +10 -10
  6. package/app/content-widget/interfaces/content-widget-config.d.ts +1 -1
  7. package/app/content-widget/services/content-widget.service.d.ts +0 -2
  8. package/app/content-widgets/components/content-widget/content-widget.component.d.ts +1 -3
  9. package/app/content-widgets/components/content-widgets/content-widgets.component.d.ts +1 -3
  10. package/app/content-widgets/fs-content-widgets.module.d.ts +16 -16
  11. package/esm2022/app/content-widget/components/content-widget/content-widget.component.mjs +11 -18
  12. package/esm2022/app/content-widget/components/content-widget-dialog/content-widget-dialog.component.mjs +26 -19
  13. package/esm2022/app/content-widget/components/content-widget-renderer/content-widget-renderer.component.mjs +48 -26
  14. package/esm2022/app/content-widget/directives/content-widget-content.directive.mjs +5 -4
  15. package/esm2022/app/content-widget/fs-content-widget.module.mjs +19 -22
  16. package/esm2022/app/content-widget/interfaces/content-widget-config.mjs +1 -1
  17. package/esm2022/app/content-widget/services/content-widget.service.mjs +7 -11
  18. package/esm2022/app/content-widgets/components/content-widget/content-widget.component.mjs +42 -27
  19. package/esm2022/app/content-widgets/components/content-widgets/content-widgets.component.mjs +12 -15
  20. package/esm2022/app/content-widgets/fs-content-widgets.module.mjs +13 -12
  21. package/fesm2022/firestitch-content-widget.mjs +151 -127
  22. package/fesm2022/firestitch-content-widget.mjs.map +1 -1
  23. package/package.json +1 -1
@@ -1,47 +1,39 @@
1
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 i1$2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i6 from '@angular/material/button';
6
- import { MatButtonModule } from '@angular/material/button';
7
- import * as i7 from '@angular/material/tabs';
8
- import { MatTabsModule } from '@angular/material/tabs';
2
+ import { inject, Component, Input, ViewChild, NgModule, Directive, InjectionToken, ChangeDetectorRef, TemplateRef, ContentChild, ChangeDetectionStrategy, Injectable } from '@angular/core';
3
+ import { CommonModule, NgTemplateOutlet } from '@angular/common';
4
+ import { MatButton, MatButtonModule } from '@angular/material/button';
5
+ import { MatTabGroup, MatTab, MatTabContent, MatTabsModule } from '@angular/material/tabs';
9
6
  import * as i3 from '@angular/material/dialog';
10
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
11
- import * as i2 from '@angular/forms';
7
+ import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogClose, MatDialog, MatDialogModule } from '@angular/material/dialog';
8
+ import * as i1 from '@angular/forms';
12
9
  import { FormsModule } from '@angular/forms';
13
- import * as i4 from '@angular/material/input';
14
- import { MatInputModule } from '@angular/material/input';
15
- import * as i5 from '@angular/material/form-field';
16
- import { MatFormFieldModule } from '@angular/material/form-field';
17
- import * as i2$1 from '@firestitch/list';
10
+ import { MatInput, MatInputModule } from '@angular/material/input';
11
+ import { MatFormField, MatFormFieldModule } from '@angular/material/form-field';
12
+ import * as i1$1 from '@firestitch/list';
18
13
  import { FsListComponent, FsListModule } from '@firestitch/list';
19
- import * as i3$1 from '@firestitch/date';
14
+ import * as i2$1 from '@firestitch/date';
20
15
  import { FsDateModule } from '@firestitch/date';
21
- import * as i10 from '@firestitch/dialog';
16
+ import * as i4 from '@firestitch/dialog';
22
17
  import { FsDialogModule } from '@firestitch/dialog';
23
- import * as i8 from '@firestitch/form';
18
+ import * as i2 from '@firestitch/form';
24
19
  import { FsFormModule } from '@firestitch/form';
25
- import * as i9 from '@firestitch/html-editor';
26
- import { FsHtmlEditorModule, FsHtmlRendererModule } from '@firestitch/html-editor';
27
- import * as i11 from '@firestitch/text-editor';
20
+ import * as i6 from '@firestitch/html-editor';
21
+ import { FsHtmlEditorModule } from '@firestitch/html-editor';
22
+ import * as i5 from '@firestitch/text-editor';
28
23
  import { FsTextEditorModule } from '@firestitch/text-editor';
29
- import * as i1 from '@firestitch/message';
24
+ import { FsMessage } from '@firestitch/message';
30
25
  import { tap, map, takeUntil } from 'rxjs/operators';
26
+ import { CdkScrollable } from '@angular/cdk/scrolling';
31
27
  import { ItemType } from '@firestitch/filter';
32
28
  import { Subject } from 'rxjs';
33
- import * as i1$1 from '@angular/router';
29
+ import { Router } from '@angular/router';
34
30
 
35
31
  let FsContentWidgetComponent$1 = class FsContentWidgetComponent {
36
- _message;
37
- _data;
32
+ _message = inject(FsMessage);
33
+ _data = inject(MAT_DIALOG_DATA);
38
34
  contentWidget;
39
35
  htmlEditorConfig;
40
36
  _saveContentWidget;
41
- constructor(_message, _data) {
42
- this._message = _message;
43
- this._data = _data;
44
- }
45
37
  ngOnInit() {
46
38
  this._saveContentWidget = this._data.saveContentWidget;
47
39
  this.htmlEditorConfig = {
@@ -56,28 +48,39 @@ let FsContentWidgetComponent$1 = class FsContentWidgetComponent {
56
48
  this._message.success('Saved Changes');
57
49
  }));
58
50
  };
59
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetComponent, deps: [{ token: i1.FsMessage }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
60
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"], dependencies: [{ kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i7.MatTabContent, selector: "[matTabContent]" }, { kind: "component", type: i7.MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "component", type: i7.MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "directive", type: i8.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i8.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i8.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i8.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "component", type: i9.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config", "disabled"] }, { kind: "component", type: i10.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: i11.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }] });
51
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
52
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentWidgetComponent, isStandalone: true, 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"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FsFormModule }, { kind: "directive", type: i2.FsFormDirective, selector: "[fsForm]", inputs: ["wrapperSelector", "messageSelector", "hintSelector", "labelSelector", "autocomplete", "shortcuts", "confirm", "confirmDialog", "confirmDrawer", "confirmBrowser", "confirmTabs", "dirtySubmitButton", "submit", "successDelay", "errorDelay", "tabGroup", "deactivationGuard"], outputs: ["fsForm", "invalid", "valid", "submitted", "reseted", "cleared"], exportAs: ["fsForm"] }, { kind: "directive", type: i2.FsFormRequiredDirective, selector: "[fsFormRequired],[ngModel][required]", inputs: ["fsFormRequired", "required", "fsFormRequiredMessage"] }, { kind: "directive", type: i2.FsFormNoFsValidatorsDirective, selector: "[ngModel]:not([required]):not([fsFormRequired]):not([fsFormCompare]):not([fsFormDateRange]):not([fsFormEmail]):not([fsFormEmails]):not([fsFormFunction]):not([fsFormGreater]):not([fsFormGreaterEqual]):not([fsFormInteger]):not([fsFormLesser]):not([fsFormMax]):not([fsFormMaxLength]):not([fsFormMin]):not([fsFormMinLength]):not([fsFormNumeric]):not([fsFormPattern]):not([fsFormPhone]):not([fsFormUrl]):not([validate])" }, { kind: "directive", type: i2.FsButtonDirective, selector: "[mat-raised-button]:not([fsFormButtonStandalone]),[mat-button]:not([fsFormButtonStandalone]),[mat-flat-button]:not([fsFormButtonStandalone]),[mat-stroked-button]:not([fsFormButtonStandalone])", inputs: ["name", "dirtySubmit", "form"] }, { kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: MatTabGroup, selector: "mat-tab-group", inputs: ["color", "fitInkBarToContent", "mat-stretch-tabs", "dynamicHeight", "selectedIndex", "headerPosition", "animationDuration", "contentTabIndex", "disablePagination", "disableRipple", "preserveContent", "backgroundColor", "aria-label", "aria-labelledby"], outputs: ["selectedIndexChange", "focusChange", "animationDone", "selectedTabChange"], exportAs: ["matTabGroup"] }, { kind: "component", type: MatTab, selector: "mat-tab", inputs: ["disabled", "label", "aria-label", "aria-labelledby", "labelClass", "bodyClass"], exportAs: ["matTab"] }, { kind: "directive", type: MatTabContent, selector: "[matTabContent]" }, { kind: "ngmodule", type: FsTextEditorModule }, { kind: "component", type: i5.FsTextEditorComponent, selector: "fs-text-editor", inputs: ["config", "scrollable"], outputs: ["ready", "blur"] }, { kind: "ngmodule", type: FsHtmlEditorModule }, { kind: "component", type: i6.FsHtmlEditorComponent, selector: "fs-html-editor", inputs: ["config", "disabled"] }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }] });
61
53
  };
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetComponent$1, decorators: [{
54
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetComponent$1, decorators: [{
63
55
  type: Component,
64
- args: [{ 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"] }]
65
- }], ctorParameters: () => [{ type: i1.FsMessage }, { type: undefined, decorators: [{
66
- type: Inject,
67
- args: [MAT_DIALOG_DATA]
68
- }] }] });
56
+ args: [{ standalone: true, imports: [
57
+ FormsModule,
58
+ FsFormModule,
59
+ FsDialogModule,
60
+ MatDialogTitle,
61
+ CdkScrollable,
62
+ MatDialogContent,
63
+ MatTabGroup,
64
+ MatTab,
65
+ MatTabContent,
66
+ FsTextEditorModule,
67
+ FsHtmlEditorModule,
68
+ MatFormField,
69
+ MatInput,
70
+ MatDialogActions,
71
+ MatButton,
72
+ MatDialogClose,
73
+ ], 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"] }]
74
+ }] });
69
75
 
70
76
  class FsContentWidgetsComponent {
71
- _dialog;
77
+ _dialog = inject(MatDialog);
72
78
  fetchContentWidgets;
73
79
  saveContentWidget;
74
80
  htmlEditorConfig;
75
81
  list;
76
82
  config;
77
83
  _destroy$ = new Subject();
78
- constructor(_dialog) {
79
- this._dialog = _dialog;
80
- }
81
84
  ngOnInit() {
82
85
  this.config = {
83
86
  paging: false,
@@ -113,13 +116,13 @@ class FsContentWidgetsComponent {
113
116
  this.list.reload();
114
117
  });
115
118
  }
116
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsComponent, deps: [{ token: i3.MatDialog }], target: i0.ɵɵFactoryTarget.Component });
117
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"], dependencies: [{ kind: "component", type: i2$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i2$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i2$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i2$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "component", type: i3$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }] });
119
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
120
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentWidgetsComponent, isStandalone: true, 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(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"], dependencies: [{ kind: "ngmodule", type: FsListModule }, { kind: "component", type: i1$1.FsListComponent, selector: "fs-list", inputs: ["config", "loaderLines"], outputs: ["filtersReady"] }, { kind: "directive", type: i1$1.FsListColumnDirective, selector: "fs-list-column", inputs: ["show", "title", "name", "customize", "sortable", "sortableDefault", "sortableDirection", "direction", "align", "width", "class"] }, { kind: "directive", type: i1$1.FsListCellDirective, selector: "[fs-list-cell]", inputs: ["colspan", "align", "class"] }, { kind: "directive", type: i1$1.FsListHeaderDirective, selector: "[fs-list-header]", inputs: ["colspan", "align", "class"] }, { kind: "ngmodule", type: FsDateModule }, { kind: "component", type: i2$1.FsDateAgoComponent, selector: "fs-date-ago", inputs: ["date", "showTime", "format", "showTooltip", "tooltipDateFormat"] }] });
118
121
  }
119
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsComponent, decorators: [{
122
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsComponent, decorators: [{
120
123
  type: Component,
121
- args: [{ selector: 'fs-content-widgets', 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(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"] }]
122
- }], ctorParameters: () => [{ type: i3.MatDialog }], propDecorators: { fetchContentWidgets: [{
124
+ args: [{ selector: 'fs-content-widgets', standalone: true, imports: [FsListModule, FsDateModule], 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(rgb(0,0,0)),to(rgba(0,0,0,0)))}\n"] }]
125
+ }], propDecorators: { fetchContentWidgets: [{
123
126
  type: Input
124
127
  }], saveContentWidget: [{
125
128
  type: Input
@@ -136,9 +139,8 @@ class FsContentWidgetsModule {
136
139
  ngModule: FsContentWidgetsModule,
137
140
  };
138
141
  }
139
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
140
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsModule, declarations: [FsContentWidgetsComponent,
141
- FsContentWidgetComponent$1], imports: [CommonModule,
142
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
143
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsModule, imports: [CommonModule,
142
144
  FormsModule,
143
145
  MatDialogModule,
144
146
  MatInputModule,
@@ -150,8 +152,10 @@ class FsContentWidgetsModule {
150
152
  FsFormModule,
151
153
  FsHtmlEditorModule,
152
154
  FsDialogModule,
153
- FsTextEditorModule], exports: [FsContentWidgetsComponent] });
154
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsModule, imports: [CommonModule,
155
+ FsTextEditorModule,
156
+ FsContentWidgetsComponent,
157
+ FsContentWidgetComponent$1], exports: [FsContentWidgetsComponent] });
158
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsModule, imports: [CommonModule,
155
159
  FormsModule,
156
160
  MatDialogModule,
157
161
  MatInputModule,
@@ -163,9 +167,11 @@ class FsContentWidgetsModule {
163
167
  FsFormModule,
164
168
  FsHtmlEditorModule,
165
169
  FsDialogModule,
166
- FsTextEditorModule] });
170
+ FsTextEditorModule,
171
+ FsContentWidgetsComponent,
172
+ FsContentWidgetComponent$1] });
167
173
  }
168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetsModule, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetsModule, decorators: [{
169
175
  type: NgModule,
170
176
  args: [{
171
177
  imports: [
@@ -182,47 +188,69 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
182
188
  FsHtmlEditorModule,
183
189
  FsDialogModule,
184
190
  FsTextEditorModule,
185
- ],
186
- exports: [
187
191
  FsContentWidgetsComponent,
192
+ FsContentWidgetComponent$1,
188
193
  ],
189
- declarations: [
194
+ exports: [
190
195
  FsContentWidgetsComponent,
191
- FsContentWidgetComponent$1,
192
196
  ],
193
197
  }]
194
198
  }] });
195
199
 
196
200
  class FsContentWidgetContentDirective {
197
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
198
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: FsContentWidgetContentDirective, selector: "[fsContentWidgetContent]", ngImport: i0 });
201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
202
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.7", type: FsContentWidgetContentDirective, isStandalone: true, selector: "[fsContentWidgetContent]", ngImport: i0 });
199
203
  }
200
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetContentDirective, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetContentDirective, decorators: [{
201
205
  type: Directive,
202
206
  args: [{
203
207
  selector: '[fsContentWidgetContent]',
208
+ standalone: true,
204
209
  }]
205
210
  }] });
206
211
 
207
212
  const FS_CONTENT_WIDGET_CONFIG = new InjectionToken('fs-content-widget-config');
208
213
 
209
214
  class FsContentWidgetRendererComponent {
210
- _router;
211
- _el;
212
215
  content;
213
- destroy$ = new Subject();
214
- constructor(_router, _el) {
215
- this._router = _router;
216
- this._el = _el;
216
+ containerRef;
217
+ _router = inject(Router);
218
+ _addedScripts = [];
219
+ ngOnChanges(changes) {
220
+ if (changes.content) {
221
+ this._renderContent();
222
+ }
217
223
  }
218
- ngAfterViewChecked() {
219
- this.registerHrefs();
224
+ ngOnDestroy() {
225
+ this._cleanup();
220
226
  }
221
- get el() {
222
- return this._el.nativeElement;
227
+ _renderContent() {
228
+ this._cleanup();
229
+ const container = this.containerRef.nativeElement;
230
+ if (!this.content) {
231
+ container.innerHTML = '';
232
+ return;
233
+ }
234
+ const temp = document.createElement('div');
235
+ temp.innerHTML = this.content;
236
+ const scripts = Array.from(temp.querySelectorAll('script'));
237
+ scripts.forEach((script) => script.remove());
238
+ container.innerHTML = temp.innerHTML;
239
+ scripts.forEach((original) => {
240
+ const script = document.createElement('script');
241
+ Array.from(original.attributes).forEach((attr) => {
242
+ script.setAttribute(attr.name, attr.value);
243
+ });
244
+ if (original.textContent) {
245
+ script.textContent = original.textContent;
246
+ }
247
+ container.appendChild(script);
248
+ this._addedScripts.push(script);
249
+ });
250
+ this._registerHrefs(container);
223
251
  }
224
- registerHrefs() {
225
- Array.from(this.el.querySelectorAll('a[href]'))
252
+ _registerHrefs(container) {
253
+ Array.from(container.querySelectorAll('a[href]'))
226
254
  .filter((el) => {
227
255
  return el.getAttribute('href').match(/^\//);
228
256
  })
@@ -236,31 +264,30 @@ class FsContentWidgetRendererComponent {
236
264
  });
237
265
  });
238
266
  }
239
- ngOnDestroy() {
240
- this.destroy$.next(null);
241
- this.destroy$.complete();
267
+ _cleanup() {
268
+ this._addedScripts.forEach((script) => script.remove());
269
+ this._addedScripts = [];
242
270
  }
243
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetRendererComponent, deps: [{ token: i1$1.Router }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
244
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i9.FsHtmlRendererComponent, selector: "fs-html-renderer", inputs: ["html"] }] });
271
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetRendererComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
272
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: FsContentWidgetRendererComponent, isStandalone: true, selector: "fs-content-widget-renderer", inputs: { content: "content" }, viewQueries: [{ propertyName: "containerRef", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<div #container></div>\n", styles: [":host ::ng-deep img{max-width:100%}\n"] });
245
273
  }
246
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetRendererComponent, decorators: [{
274
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetRendererComponent, decorators: [{
247
275
  type: Component,
248
- args: [{ selector: 'fs-content-widget-renderer', template: "<fs-html-renderer *ngIf=\"content\" [html]=\"content\"></fs-html-renderer>", styles: [":host ::ng-deep img{max-width:100%}\n"] }]
249
- }], ctorParameters: () => [{ type: i1$1.Router }, { type: i0.ElementRef }], propDecorators: { content: [{
276
+ args: [{ selector: 'fs-content-widget-renderer', standalone: true, template: "<div #container></div>\n", styles: [":host ::ng-deep img{max-width:100%}\n"] }]
277
+ }], propDecorators: { content: [{
250
278
  type: Input
279
+ }], containerRef: [{
280
+ type: ViewChild,
281
+ args: ['container', { static: true }]
251
282
  }] } });
252
283
 
253
284
  class FsContentWidgetComponent {
254
- config;
255
- _cdRef;
285
+ config = inject(FS_CONTENT_WIDGET_CONFIG);
286
+ _cdRef = inject(ChangeDetectorRef);
256
287
  contentWidgetContent;
257
288
  content;
258
289
  destroy$ = new Subject();
259
290
  tag;
260
- constructor(config, _cdRef) {
261
- this.config = config;
262
- this._cdRef = _cdRef;
263
- }
264
291
  ngOnInit() {
265
292
  this.config.fetchContentWidget(this.tag)
266
293
  .pipe(takeUntil(this.destroy$))
@@ -273,16 +300,13 @@ class FsContentWidgetComponent {
273
300
  this.destroy$.next(null);
274
301
  this.destroy$.complete();
275
302
  }
276
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetComponent, deps: [{ token: FS_CONTENT_WIDGET_CONFIG }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
277
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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"], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: ["content"] }] });
303
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
304
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsContentWidgetComponent, isStandalone: true, selector: "fs-content-widget", inputs: { tag: "tag" }, queries: [{ propertyName: "contentWidgetContent", first: true, predicate: FsContentWidgetContentDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "@if (content) {\n @if (contentWidgetContent) {\n <ng-container\n [ngTemplateOutlet]=\"contentWidgetContent\"\n [ngTemplateOutletContext]=\"{ content: renderer }\">\n </ng-container>\n } @else {\n <fs-content-widget-renderer\n [content]=\"content\">\n </fs-content-widget-renderer>\n }\n <ng-template #renderer>\n <fs-content-widget-renderer\n [content]=\"content\">\n </fs-content-widget-renderer>\n </ng-template>\n}", styles: [":host ::ng-deep img{max-width:100%}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FsContentWidgetRendererComponent, selector: "fs-content-widget-renderer", inputs: ["content"] }] });
278
305
  }
279
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
306
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetComponent, decorators: [{
280
307
  type: Component,
281
- args: [{ selector: 'fs-content-widget', 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"] }]
282
- }], ctorParameters: () => [{ type: undefined, decorators: [{
283
- type: Inject,
284
- args: [FS_CONTENT_WIDGET_CONFIG]
285
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { contentWidgetContent: [{
308
+ args: [{ selector: 'fs-content-widget', standalone: true, imports: [NgTemplateOutlet, FsContentWidgetRendererComponent], template: "@if (content) {\n @if (contentWidgetContent) {\n <ng-container\n [ngTemplateOutlet]=\"contentWidgetContent\"\n [ngTemplateOutletContext]=\"{ content: renderer }\">\n </ng-container>\n } @else {\n <fs-content-widget-renderer\n [content]=\"content\">\n </fs-content-widget-renderer>\n }\n <ng-template #renderer>\n <fs-content-widget-renderer\n [content]=\"content\">\n </fs-content-widget-renderer>\n </ng-template>\n}", styles: [":host ::ng-deep img{max-width:100%}\n"] }]
309
+ }], propDecorators: { contentWidgetContent: [{
286
310
  type: ContentChild,
287
311
  args: [FsContentWidgetContentDirective, { read: TemplateRef }]
288
312
  }], tag: [{
@@ -290,24 +314,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
290
314
  }] } });
291
315
 
292
316
  class FsContentWidgetDialogComponent {
293
- _data;
317
+ _data = inject(MAT_DIALOG_DATA);
294
318
  title;
295
319
  tag;
296
- constructor(_data) {
297
- this._data = _data;
320
+ constructor() {
321
+ const _data = this._data;
298
322
  this.title = _data.title;
299
323
  this.tag = _data.tag;
300
324
  }
301
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetDialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
302
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", 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: [""], dependencies: [{ kind: "directive", type: i1$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i10.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: ["tag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
325
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
326
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.7", type: FsContentWidgetDialogComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: "<fs-dialog>\n @if (title) {\n <div mat-dialog-title>{{title}}</div>\n }\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: [""], dependencies: [{ kind: "ngmodule", type: FsDialogModule }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i3.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i3.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i3.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i4.FsDialogComponent, selector: "fs-dialog", inputs: ["mobileMode", "mobileButtonPlacement", "mobileWidth", "mode", "buttonLayout", "dock", "dockable", "fullscreenPercent"] }, { kind: "component", type: FsContentWidgetComponent, selector: "fs-content-widget", inputs: ["tag"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
303
327
  }
304
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetDialogComponent, decorators: [{
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetDialogComponent, decorators: [{
305
329
  type: Component,
306
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, 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" }]
307
- }], ctorParameters: () => [{ type: undefined, decorators: [{
308
- type: Inject,
309
- args: [MAT_DIALOG_DATA]
310
- }] }] });
330
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [
331
+ FsDialogModule,
332
+ MatDialogTitle,
333
+ CdkScrollable,
334
+ MatDialogContent,
335
+ FsContentWidgetComponent,
336
+ MatDialogActions,
337
+ MatButton,
338
+ MatDialogClose,
339
+ ], template: "<fs-dialog>\n @if (title) {\n <div mat-dialog-title>{{title}}</div>\n }\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" }]
340
+ }], ctorParameters: () => [] });
311
341
 
312
342
  class FsContentWidgetModule {
313
343
  static forRoot() {
@@ -315,25 +345,25 @@ class FsContentWidgetModule {
315
345
  ngModule: FsContentWidgetModule,
316
346
  };
317
347
  }
318
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
319
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetModule, declarations: [FsContentWidgetRendererComponent,
320
- FsContentWidgetComponent,
321
- FsContentWidgetDialogComponent,
322
- FsContentWidgetContentDirective], imports: [CommonModule,
348
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
349
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetModule, imports: [CommonModule,
323
350
  MatDialogModule,
324
351
  MatButtonModule,
325
352
  FsHtmlEditorModule,
326
353
  FsDialogModule,
327
- FsHtmlRendererModule], exports: [FsContentWidgetComponent,
354
+ FsContentWidgetRendererComponent,
355
+ FsContentWidgetComponent,
356
+ FsContentWidgetDialogComponent,
357
+ FsContentWidgetContentDirective], exports: [FsContentWidgetComponent,
328
358
  FsContentWidgetContentDirective] });
329
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetModule, imports: [CommonModule,
359
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetModule, imports: [CommonModule,
330
360
  MatDialogModule,
331
361
  MatButtonModule,
332
362
  FsHtmlEditorModule,
333
363
  FsDialogModule,
334
- FsHtmlRendererModule] });
364
+ FsContentWidgetDialogComponent] });
335
365
  }
336
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidgetModule, decorators: [{
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidgetModule, decorators: [{
337
367
  type: NgModule,
338
368
  args: [{
339
369
  imports: [
@@ -342,26 +372,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
342
372
  MatButtonModule,
343
373
  FsHtmlEditorModule,
344
374
  FsDialogModule,
345
- FsHtmlRendererModule,
346
- ],
347
- exports: [
375
+ FsContentWidgetRendererComponent,
348
376
  FsContentWidgetComponent,
377
+ FsContentWidgetDialogComponent,
349
378
  FsContentWidgetContentDirective,
350
379
  ],
351
- declarations: [
352
- FsContentWidgetRendererComponent,
380
+ exports: [
353
381
  FsContentWidgetComponent,
354
- FsContentWidgetDialogComponent,
355
382
  FsContentWidgetContentDirective,
356
383
  ],
357
384
  }]
358
385
  }] });
359
386
 
360
387
  class FsContentWidget {
361
- _dialog;
362
- constructor(_dialog) {
363
- this._dialog = _dialog;
364
- }
388
+ _dialog = inject(MatDialog);
365
389
  open(tag, title) {
366
390
  this._dialog.open(FsContentWidgetDialogComponent, {
367
391
  data: {
@@ -370,15 +394,15 @@ class FsContentWidget {
370
394
  }
371
395
  });
372
396
  }
373
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidget, deps: [{ token: i3.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
374
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidget, providedIn: 'root' });
397
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidget, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
398
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidget, providedIn: 'root' });
375
399
  }
376
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FsContentWidget, decorators: [{
400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: FsContentWidget, decorators: [{
377
401
  type: Injectable,
378
402
  args: [{
379
403
  providedIn: 'root',
380
404
  }]
381
- }], ctorParameters: () => [{ type: i3.MatDialog }] });
405
+ }] });
382
406
 
383
407
  /**
384
408
  * Generated bundle index. Do not edit.