@firestitch/content 13.0.3 → 13.0.5
Sign up to get free protection for your applications and to get access to all the features.
- package/app/consts/index.d.ts +1 -1
- package/app/consts/page-types.const.d.ts +5 -5
- package/app/enums/editor-type.d.ts +6 -6
- package/app/enums/index.d.ts +2 -2
- package/app/enums/page-type.enum.d.ts +6 -6
- package/app/injectors/content-config.injector.d.ts +2 -2
- package/app/injectors/index.d.ts +1 -1
- package/app/interfaces/content-config.d.ts +21 -21
- package/app/interfaces/content-layout.d.ts +10 -10
- package/app/interfaces/content-page.d.ts +14 -14
- package/app/interfaces/content-style.d.ts +4 -4
- package/app/interfaces/index.d.ts +4 -4
- package/app/modules/content/components/content/content.component.d.ts +25 -25
- package/app/modules/content/components/content/index.d.ts +1 -1
- package/app/modules/content/components/content-renderer/content-renderer.component.d.ts +24 -24
- package/app/modules/content/components/content-renderer/index.d.ts +1 -1
- package/app/modules/content/fs-content.module.d.ts +10 -10
- package/app/modules/content-layouts/components/content-layout/content-layout.component.d.ts +27 -27
- package/app/modules/content-layouts/components/content-layout/index.d.ts +1 -1
- package/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.d.ts +50 -50
- package/app/modules/content-layouts/components/content-layout-editor/index.d.ts +1 -1
- package/app/modules/content-layouts/components/content-layouts/content-layouts.component.d.ts +21 -21
- package/app/modules/content-layouts/components/content-layouts/index.d.ts +1 -1
- package/app/modules/content-layouts/components/index.d.ts +3 -3
- package/app/modules/content-layouts/fs-content-layouts.module.d.ts +28 -28
- package/app/modules/content-pages/components/content-page/content-page.component.d.ts +32 -32
- package/app/modules/content-pages/components/content-page/index.d.ts +1 -1
- package/app/modules/content-pages/components/content-page-editor/content-page-editor.component.d.ts +56 -56
- package/app/modules/content-pages/components/content-page-editor/index.d.ts +1 -1
- package/app/modules/content-pages/components/content-pages/content-pages.component.d.ts +24 -24
- package/app/modules/content-pages/components/content-pages/index.d.ts +1 -1
- package/app/modules/content-pages/components/index.d.ts +3 -3
- package/app/modules/content-pages/fs-content-pages.module.d.ts +33 -33
- package/app/modules/content-style/components/content-style/content-style.component.d.ts +27 -27
- package/app/modules/content-style/components/content-style/index.d.ts +1 -1
- package/app/modules/content-style/fs-content-style.module.d.ts +14 -14
- package/app/modules/editor/components/editor/editor.component.d.ts +49 -49
- package/app/modules/editor/components/editor/index.d.ts +1 -1
- package/app/modules/editor/components/editor-label/editor-label.component.d.ts +7 -7
- package/app/modules/editor/components/editor-label/index.d.ts +1 -1
- package/app/modules/editor/fs-content-editor.module.d.ts +24 -24
- package/app/modules/editor/index.d.ts +1 -1
- package/esm2020/app/consts/index.mjs +1 -1
- package/esm2020/app/consts/page-types.const.mjs +5 -5
- package/esm2020/app/enums/editor-type.mjs +7 -7
- package/esm2020/app/enums/index.mjs +3 -3
- package/esm2020/app/enums/page-type.enum.mjs +7 -7
- package/esm2020/app/injectors/content-config.injector.mjs +2 -2
- package/esm2020/app/injectors/index.mjs +1 -1
- package/esm2020/app/interfaces/content-config.mjs +1 -1
- package/esm2020/app/interfaces/content-layout.mjs +1 -1
- package/esm2020/app/interfaces/content-page.mjs +1 -1
- package/esm2020/app/interfaces/content-style.mjs +1 -1
- package/esm2020/app/interfaces/index.mjs +5 -5
- package/esm2020/app/modules/content/components/content/content.component.mjs +80 -80
- package/esm2020/app/modules/content/components/content/index.mjs +1 -1
- package/esm2020/app/modules/content/components/content-renderer/content-renderer.component.mjs +73 -73
- package/esm2020/app/modules/content/components/content-renderer/index.mjs +1 -1
- package/esm2020/app/modules/content/fs-content.module.mjs +32 -32
- package/esm2020/app/modules/content-layouts/components/content-layout/content-layout.component.mjs +67 -67
- package/esm2020/app/modules/content-layouts/components/content-layout/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/content-layout-editor/content-layout-editor.component.mjs +161 -161
- package/esm2020/app/modules/content-layouts/components/content-layout-editor/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/content-layouts/content-layouts.component.mjs +115 -115
- package/esm2020/app/modules/content-layouts/components/content-layouts/index.mjs +1 -1
- package/esm2020/app/modules/content-layouts/components/index.mjs +4 -4
- package/esm2020/app/modules/content-layouts/fs-content-layouts.module.mjs +103 -103
- package/esm2020/app/modules/content-pages/components/content-page/content-page.component.mjs +82 -81
- package/esm2020/app/modules/content-pages/components/content-page/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/content-page-editor/content-page-editor.component.mjs +178 -178
- package/esm2020/app/modules/content-pages/components/content-page-editor/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/content-pages/content-pages.component.mjs +129 -128
- package/esm2020/app/modules/content-pages/components/content-pages/index.mjs +1 -1
- package/esm2020/app/modules/content-pages/components/index.mjs +4 -4
- package/esm2020/app/modules/content-pages/fs-content-pages.module.mjs +120 -120
- package/esm2020/app/modules/content-style/components/content-style/content-style.component.mjs +68 -68
- package/esm2020/app/modules/content-style/components/content-style/index.mjs +1 -1
- package/esm2020/app/modules/content-style/fs-content-style.module.mjs +49 -49
- package/esm2020/app/modules/editor/components/editor/editor.component.mjs +143 -143
- package/esm2020/app/modules/editor/components/editor/index.mjs +1 -1
- package/esm2020/app/modules/editor/components/editor-label/editor-label.component.mjs +15 -15
- package/esm2020/app/modules/editor/components/editor-label/index.mjs +1 -1
- package/esm2020/app/modules/editor/fs-content-editor.module.mjs +88 -88
- package/esm2020/app/modules/editor/index.mjs +1 -1
- package/esm2020/firestitch-content.mjs +4 -4
- package/esm2020/public_api.mjs +10 -10
- package/fesm2015/firestitch-content.mjs +1249 -1251
- package/fesm2015/firestitch-content.mjs.map +1 -1
- package/fesm2020/firestitch-content.mjs +1253 -1251
- package/fesm2020/firestitch-content.mjs.map +1 -1
- package/firestitch-content.d.ts +5 -5
- package/package.json +1 -1
- package/public_api.d.ts +10 -10
@@ -1,3 +1,3 @@
|
|
1
|
-
export * from './editor-type';
|
2
|
-
export * from './page-type.enum';
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
export * from './editor-type';
|
2
|
+
export * from './page-type.enum';
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2VudW1zL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsZUFBZSxDQUFDO0FBQzlCLGNBQWMsa0JBQWtCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2VkaXRvci10eXBlJztcbmV4cG9ydCAqIGZyb20gJy4vcGFnZS10eXBlLmVudW0nO1xuIl19
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export var PageType;
|
2
|
-
(function (PageType) {
|
3
|
-
PageType["StandardPage"] = "standardPage";
|
4
|
-
PageType["BlogPost"] = "blogPost";
|
5
|
-
PageType["HomePage"] = "homePage";
|
6
|
-
PageType["NotFoundPage"] = "notFoundPage";
|
7
|
-
})(PageType || (PageType = {}));
|
1
|
+
export var PageType;
|
2
|
+
(function (PageType) {
|
3
|
+
PageType["StandardPage"] = "standardPage";
|
4
|
+
PageType["BlogPost"] = "blogPost";
|
5
|
+
PageType["HomePage"] = "homePage";
|
6
|
+
PageType["NotFoundPage"] = "notFoundPage";
|
7
|
+
})(PageType || (PageType = {}));
|
8
8
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFnZS10eXBlLmVudW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2VudW1zL3BhZ2UtdHlwZS5lbnVtLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE1BQU0sQ0FBTixJQUFZLFFBS1g7QUFMRCxXQUFZLFFBQVE7SUFDbEIseUNBQTZCLENBQUE7SUFDN0IsaUNBQXFCLENBQUE7SUFDckIsaUNBQXFCLENBQUE7SUFDckIseUNBQTZCLENBQUE7QUFDL0IsQ0FBQyxFQUxXLFFBQVEsS0FBUixRQUFRLFFBS25CIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGVudW0gUGFnZVR5cGUge1xuICBTdGFuZGFyZFBhZ2UgPSAnc3RhbmRhcmRQYWdlJyxcbiAgQmxvZ1Bvc3QgPSAnYmxvZ1Bvc3QnLFxuICBIb21lUGFnZSA9ICdob21lUGFnZScsXG4gIE5vdEZvdW5kUGFnZSA9ICdub3RGb3VuZFBhZ2UnLFxufVxuIl19
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
2
|
-
export const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
export const FS_CONTENT_CONFIG = new InjectionToken('fs-content-config');
|
3
3
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1jb25maWcuaW5qZWN0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2luamVjdG9ycy9jb250ZW50LWNvbmZpZy5pbmplY3Rvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRS9DLE1BQU0sQ0FBQyxNQUFNLGlCQUFpQixHQUFHLElBQUksY0FBYyxDQUFNLG1CQUFtQixDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgY29uc3QgRlNfQ09OVEVOVF9DT05GSUcgPSBuZXcgSW5qZWN0aW9uVG9rZW48YW55PignZnMtY29udGVudC1jb25maWcnKTtcbiJdfQ==
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './content-config.injector';
|
1
|
+
export * from './content-config.injector';
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2luamVjdG9ycy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9jb250ZW50LWNvbmZpZy5pbmplY3Rvcic7XG4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1jb25maWcuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2ludGVyZmFjZXMvY29udGVudC1jb25maWcudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IE9ic2VydmFibGUgfSBmcm9tICdyeGpzJztcblxuaW1wb3J0IHsgRnNDb250ZW50TGF5b3V0IH0gZnJvbSAnLi9jb250ZW50LWxheW91dCc7XG5pbXBvcnQgeyBGc0NvbnRlbnRQYWdlIH0gZnJvbSAnLi9jb250ZW50LXBhZ2UnO1xuaW1wb3J0IHsgRnNDb250ZW50U3R5bGUgfSBmcm9tICcuL2NvbnRlbnQtc3R5bGUnO1xuXG5cbmV4cG9ydCBpbnRlcmZhY2UgRnNDb250ZW50Q29uZmlnIHtcbiAgbG9hZENvbnRlbnQ6IChwYXRoOiBzdHJpbmcpID0+IE9ic2VydmFibGU8RnNDb250ZW50UGFnZT47XG4gIGxvYWRDb250ZW50UGFnZXM6IChxdWVyeTogYW55KSA9PiBPYnNlcnZhYmxlPHsgY29udGVudFBhZ2VzOiBGc0NvbnRlbnRQYWdlW107IHBhZ2luZzogYW55IH0+O1xuICBsb2FkQ29udGVudFBhZ2U6IChjb250ZW50UGFnZUlkOiBudW1iZXIpID0+IE9ic2VydmFibGU8RnNDb250ZW50UGFnZT47XG4gIHNhdmVDb250ZW50UGFnZTogKGNvbnRlbnRQYWdlOiBGc0NvbnRlbnRQYWdlKSA9PiBPYnNlcnZhYmxlPEZzQ29udGVudFBhZ2U+O1xuICBkZWxldGVDb250ZW50UGFnZTogKGNvbnRlbnRQYWdlOiBGc0NvbnRlbnRQYWdlKSA9PiBPYnNlcnZhYmxlPEZzQ29udGVudFBhZ2U+O1xuICBsb2FkQ29udGVudExheW91dHM6IChxdWVyeT86IGFueSkgPT4gT2JzZXJ2YWJsZTxGc0NvbnRlbnRMYXlvdXRbXT47XG4gIGxvYWRDb250ZW50TGF5b3V0OiAoY29udGVudExheW91dElkKSA9PiBPYnNlcnZhYmxlPEZzQ29udGVudExheW91dD47XG4gIGxvYWRDb250ZW50U3R5bGVDc3M/OiAoKSA9PiBPYnNlcnZhYmxlPHN0cmluZz47XG4gIGxvYWRDb250ZW50U3R5bGU6ICgpID0+IE9ic2VydmFibGU8RnNDb250ZW50U3R5bGU+O1xuICBzYXZlQ29udGVudFN0eWxlOiAoY29udGVudFN0eWxlOiBGc0NvbnRlbnRTdHlsZSkgPT4gT2JzZXJ2YWJsZTxGc0NvbnRlbnRTdHlsZT47XG4gIHNhdmVDb250ZW50TGF5b3V0OiAoY29udGVudExheW91dDogRnNDb250ZW50TGF5b3V0KSA9PiBPYnNlcnZhYmxlPEZzQ29udGVudExheW91dD47XG4gIGRlbGV0ZUNvbnRlbnRMYXlvdXQ6IChjb250ZW50TGF5b3V0OiBGc0NvbnRlbnRMYXlvdXQpID0+IE9ic2VydmFibGU8RnNDb250ZW50TGF5b3V0Pjtcbn1cbiJdfQ==
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1sYXlvdXQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2ludGVyZmFjZXMvY29udGVudC1sYXlvdXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBpbnRlcmZhY2UgRnNDb250ZW50TGF5b3V0IHtcbiAgaWQ/OiBudW1iZXI7XG4gIHN0YXRlPzogc3RyaW5nO1xuICBuYW1lPzogc3RyaW5nO1xuICB0YWc/OiBzdHJpbmc7XG4gIGNvbnRlbnQ/OiBzdHJpbmc7XG4gIHN0eWxlcz86IHN0cmluZztcbiAgY3JlYXRlRGF0ZT86IERhdGU7XG4gIG1vZGlmeURhdGU/OiBEYXRlO1xufSJdfQ==
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1wYWdlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL2FwcC9pbnRlcmZhY2VzL2NvbnRlbnQtcGFnZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0IGludGVyZmFjZSBGc0NvbnRlbnRQYWdlIHtcbiAgaWQ/OiBudW1iZXI7XG4gIGNvbnRlbnRMYXlvdXRJZD86IG51bWJlcjtcbiAgc3RhdGU/OiBzdHJpbmc7XG4gIHR5cGU/OiBzdHJpbmc7XG4gIHBhdGg/OiBzdHJpbmc7XG4gIGpzPzogc3RyaW5nO1xuICB0aXRsZT86IHN0cmluZztcbiAgY29udGVudD86IHN0cmluZztcbiAgc3R5bGVzPzogc3RyaW5nO1xuICBuYW1lPzogc3RyaW5nO1xuICBjcmVhdGVEYXRlPzogRGF0ZTtcbiAgbW9kaWZ5RGF0ZT86IERhdGU7XG59XG4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1zdHlsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9hcHAvaW50ZXJmYWNlcy9jb250ZW50LXN0eWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIEZzQ29udGVudFN0eWxlIHtcbiAgc2Nzcz86IHN0cmluZztcbiAgbW9kaWZ5RGF0ZT86IERhdGU7XG59XG4iXX0=
|
@@ -1,5 +1,5 @@
|
|
1
|
-
export * from './content-config';
|
2
|
-
export * from './content-layout';
|
3
|
-
export * from './content-page';
|
4
|
-
export * from './content-style';
|
5
|
-
//# sourceMappingURL=data:application/json;base64,
|
1
|
+
export * from './content-config';
|
2
|
+
export * from './content-layout';
|
3
|
+
export * from './content-page';
|
4
|
+
export * from './content-style';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvYXBwL2ludGVyZmFjZXMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQkFBa0IsQ0FBQztBQUNqQyxjQUFjLGtCQUFrQixDQUFDO0FBQ2pDLGNBQWMsZ0JBQWdCLENBQUM7QUFDL0IsY0FBYyxpQkFBaUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGVudC1jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9jb250ZW50LWxheW91dCc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRlbnQtcGFnZSc7XG5leHBvcnQgKiBmcm9tICcuL2NvbnRlbnQtc3R5bGUnO1xuIl19
|
@@ -1,81 +1,81 @@
|
|
1
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, } from '@angular/core';
|
2
|
-
import { Title } from '@angular/platform-browser';
|
3
|
-
import { NavigationEnd, Router } from '@angular/router';
|
4
|
-
import { HtmlRenderer } from '@firestitch/html';
|
5
|
-
import { Subject } from 'rxjs';
|
6
|
-
import { filter, takeUntil } from 'rxjs/operators';
|
7
|
-
import { FS_CONTENT_CONFIG } from '../../../../injectors';
|
8
|
-
import * as i0 from "@angular/core";
|
9
|
-
import * as i1 from "@angular/platform-browser";
|
10
|
-
import * as i2 from "@angular/router";
|
11
|
-
import * as i3 from "@firestitch/html";
|
12
|
-
import * as i4 from "../content-renderer/content-renderer.component";
|
13
|
-
import * as i5 from "@angular/common";
|
14
|
-
export class FsContentComponent {
|
15
|
-
constructor(_config, _title, _cdRef, _router, _el, _htmlRenderer) {
|
16
|
-
this._config = _config;
|
17
|
-
this._title = _title;
|
18
|
-
this._cdRef = _cdRef;
|
19
|
-
this._router = _router;
|
20
|
-
this._el = _el;
|
21
|
-
this._htmlRenderer = _htmlRenderer;
|
22
|
-
this._destroy$ = new Subject();
|
23
|
-
}
|
24
|
-
ngOnInit() {
|
25
|
-
this._initContent();
|
26
|
-
this._initStyles();
|
27
|
-
}
|
28
|
-
get el() {
|
29
|
-
return this._el.nativeElement;
|
30
|
-
}
|
31
|
-
ngOnDestroy() {
|
32
|
-
this._destroy$.next();
|
33
|
-
this._destroy$.complete();
|
34
|
-
this._title.setTitle('');
|
35
|
-
document.querySelector('#content-style')?.remove();
|
36
|
-
}
|
37
|
-
_initStyles() {
|
38
|
-
if (this._config.loadContentStyleCss) {
|
39
|
-
this._config.loadContentStyleCss()
|
40
|
-
.subscribe((styles) => {
|
41
|
-
this._htmlRenderer.addStyle(styles, { id: 'content-style' });
|
42
|
-
});
|
43
|
-
}
|
44
|
-
}
|
45
|
-
_initContent() {
|
46
|
-
this._loadContent();
|
47
|
-
this._router.events
|
48
|
-
.pipe(filter((e) => e instanceof NavigationEnd), takeUntil(this._destroy$))
|
49
|
-
.subscribe((e) => {
|
50
|
-
this._loadContent();
|
51
|
-
});
|
52
|
-
}
|
53
|
-
_loadContent() {
|
54
|
-
const path = window.location.pathname;
|
55
|
-
this._config.loadContent(path)
|
56
|
-
.subscribe((contentPage) => {
|
57
|
-
if (contentPage.title) {
|
58
|
-
this._title.setTitle(contentPage.title);
|
59
|
-
let ogTitleEl = document.querySelector('head meta[property="og:title"]');
|
60
|
-
if (!ogTitleEl) {
|
61
|
-
ogTitleEl = document.createElement('meta');
|
62
|
-
ogTitleEl.setAttribute('property', 'og:title');
|
63
|
-
document.getElementsByTagName('head')[0].appendChild(ogTitleEl);
|
64
|
-
}
|
65
|
-
ogTitleEl.setAttribute('content', contentPage.title);
|
66
|
-
}
|
67
|
-
this.contentPage = contentPage;
|
68
|
-
this._cdRef.markForCheck();
|
69
|
-
});
|
70
|
-
}
|
71
|
-
}
|
72
|
-
FsContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.Title }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i0.ElementRef }, { token: i3.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
|
73
|
-
FsContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsContentComponent, selector: "fs-content", ngImport: i0, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""], components: [{ type: i4.ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentComponent, decorators: [{
|
75
|
-
type: Component,
|
76
|
-
args: [{ selector: 'fs-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""] }]
|
77
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
78
|
-
type: Inject,
|
79
|
-
args: [FS_CONTENT_CONFIG]
|
80
|
-
}] }, { type: i1.Title }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i0.ElementRef }, { type: i3.HtmlRenderer }]; } });
|
1
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ElementRef, Inject, } from '@angular/core';
|
2
|
+
import { Title } from '@angular/platform-browser';
|
3
|
+
import { NavigationEnd, Router } from '@angular/router';
|
4
|
+
import { HtmlRenderer } from '@firestitch/html';
|
5
|
+
import { Subject } from 'rxjs';
|
6
|
+
import { filter, takeUntil } from 'rxjs/operators';
|
7
|
+
import { FS_CONTENT_CONFIG } from '../../../../injectors';
|
8
|
+
import * as i0 from "@angular/core";
|
9
|
+
import * as i1 from "@angular/platform-browser";
|
10
|
+
import * as i2 from "@angular/router";
|
11
|
+
import * as i3 from "@firestitch/html";
|
12
|
+
import * as i4 from "../content-renderer/content-renderer.component";
|
13
|
+
import * as i5 from "@angular/common";
|
14
|
+
export class FsContentComponent {
|
15
|
+
constructor(_config, _title, _cdRef, _router, _el, _htmlRenderer) {
|
16
|
+
this._config = _config;
|
17
|
+
this._title = _title;
|
18
|
+
this._cdRef = _cdRef;
|
19
|
+
this._router = _router;
|
20
|
+
this._el = _el;
|
21
|
+
this._htmlRenderer = _htmlRenderer;
|
22
|
+
this._destroy$ = new Subject();
|
23
|
+
}
|
24
|
+
ngOnInit() {
|
25
|
+
this._initContent();
|
26
|
+
this._initStyles();
|
27
|
+
}
|
28
|
+
get el() {
|
29
|
+
return this._el.nativeElement;
|
30
|
+
}
|
31
|
+
ngOnDestroy() {
|
32
|
+
this._destroy$.next();
|
33
|
+
this._destroy$.complete();
|
34
|
+
this._title.setTitle('');
|
35
|
+
document.querySelector('#content-style')?.remove();
|
36
|
+
}
|
37
|
+
_initStyles() {
|
38
|
+
if (this._config.loadContentStyleCss) {
|
39
|
+
this._config.loadContentStyleCss()
|
40
|
+
.subscribe((styles) => {
|
41
|
+
this._htmlRenderer.addStyle(styles, { id: 'content-style' });
|
42
|
+
});
|
43
|
+
}
|
44
|
+
}
|
45
|
+
_initContent() {
|
46
|
+
this._loadContent();
|
47
|
+
this._router.events
|
48
|
+
.pipe(filter((e) => e instanceof NavigationEnd), takeUntil(this._destroy$))
|
49
|
+
.subscribe((e) => {
|
50
|
+
this._loadContent();
|
51
|
+
});
|
52
|
+
}
|
53
|
+
_loadContent() {
|
54
|
+
const path = window.location.pathname;
|
55
|
+
this._config.loadContent(path)
|
56
|
+
.subscribe((contentPage) => {
|
57
|
+
if (contentPage.title) {
|
58
|
+
this._title.setTitle(contentPage.title);
|
59
|
+
let ogTitleEl = document.querySelector('head meta[property="og:title"]');
|
60
|
+
if (!ogTitleEl) {
|
61
|
+
ogTitleEl = document.createElement('meta');
|
62
|
+
ogTitleEl.setAttribute('property', 'og:title');
|
63
|
+
document.getElementsByTagName('head')[0].appendChild(ogTitleEl);
|
64
|
+
}
|
65
|
+
ogTitleEl.setAttribute('content', contentPage.title);
|
66
|
+
}
|
67
|
+
this.contentPage = contentPage;
|
68
|
+
this._cdRef.markForCheck();
|
69
|
+
});
|
70
|
+
}
|
71
|
+
}
|
72
|
+
FsContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentComponent, deps: [{ token: FS_CONTENT_CONFIG }, { token: i1.Title }, { token: i0.ChangeDetectorRef }, { token: i2.Router }, { token: i0.ElementRef }, { token: i3.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
|
73
|
+
FsContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: FsContentComponent, selector: "fs-content", ngImport: i0, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""], components: [{ type: i4.ContentRendererComponent, selector: "fs-content-renderer", inputs: ["contentPage"] }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentComponent, decorators: [{
|
75
|
+
type: Component,
|
76
|
+
args: [{ selector: 'fs-content', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"contentPage\">\n <fs-content-renderer [contentPage]=\"contentPage\"></fs-content-renderer>\n</ng-container>", styles: [""] }]
|
77
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
78
|
+
type: Inject,
|
79
|
+
args: [FS_CONTENT_CONFIG]
|
80
|
+
}] }, { type: i1.Title }, { type: i0.ChangeDetectorRef }, { type: i2.Router }, { type: i0.ElementRef }, { type: i3.HtmlRenderer }]; } });
|
81
81
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2NvbnRlbnQvY29udGVudC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2Nvbn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RsZUVsKSB7XG4gICAgICAgICAgICBvZ1RpdGxlRWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdtZXRhJyk7XG4gICAgICAgICAgICBvZ1RpdGxlRWwuc2V0QXR0cmlidXRlKCdwcm9wZXJ0eScsJ29nOnRpdGxlJyk7XG4gICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgnaGVhZCcpWzBdLmFwcGVuZENoaWxkKG9nVGl0bGVFbCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgb2dUaXRsZUVsLnNldEF0dHJpYnV0ZSgnY29udGVudCcsY29udGVudFBhZ2UudGl0bGUpO1xuICAgICAgICB9XG5cbiAgICAgICAgdGhpcy5jb250ZW50UGFnZSA9IGNvbnRlbnRQYWdlO1xuICAgICAgICB0aGlzLl9jZFJlZi5tYXJrRm9yQ2hlY2soKTtcbiAgICAgIH0pO1xuICB9XG5cbn1cbiIsIjxuZy1jb250YWluZXIgKm5nSWY9XCJjb250ZW50UGFnZVwiPlxuICA8ZnMtY29udGVudC1yZW5kZXJlciBbY29udGVudFBhZ2VdPVwiY29udGVudFBhZ2VcIj48L2ZzLWNvbnRlbnQtcmVuZGVyZXI+XG48L25nLWNvbnRhaW5lcj4iXX0=
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './content.component';
|
1
|
+
export * from './content.component';
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2NvbnRlbnQvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxxQkFBcUIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGVudC5jb21wb25lbnQnO1xuIl19
|
package/esm2020/app/modules/content/components/content-renderer/content-renderer.component.mjs
CHANGED
@@ -1,74 +1,74 @@
|
|
1
|
-
import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, } from '@angular/core';
|
2
|
-
import { DomSanitizer } from '@angular/platform-browser';
|
3
|
-
import { Router } from '@angular/router';
|
4
|
-
import { HtmlRenderer } from '@firestitch/html';
|
5
|
-
import { Subject } from 'rxjs';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
import * as i1 from "@angular/platform-browser";
|
8
|
-
import * as i2 from "@angular/router";
|
9
|
-
import * as i3 from "@firestitch/html";
|
10
|
-
import * as i4 from "@angular/common";
|
11
|
-
export class ContentRendererComponent {
|
12
|
-
constructor(_sanitizer, _router, _el, _htmlRenderer) {
|
13
|
-
this._sanitizer = _sanitizer;
|
14
|
-
this._router = _router;
|
15
|
-
this._el = _el;
|
16
|
-
this._htmlRenderer = _htmlRenderer;
|
17
|
-
this._destroy$ = new Subject();
|
18
|
-
}
|
19
|
-
ngOnChanges(changes) {
|
20
|
-
if (changes.contentPage.currentValue) {
|
21
|
-
this._htmlRenderer.addStyle(this.contentPage.styles, { id: 'contentPageStyles' });
|
22
|
-
this.content = this._sanitizer.bypassSecurityTrustHtml(this.contentPage.content);
|
23
|
-
}
|
24
|
-
}
|
25
|
-
ngAfterViewChecked() {
|
26
|
-
this.registerHrefs();
|
27
|
-
if (this.contentPage.js) {
|
28
|
-
const script = document.createElement('script');
|
29
|
-
script.text = this.contentPage.js;
|
30
|
-
this.script.nativeElement.after(script);
|
31
|
-
}
|
32
|
-
}
|
33
|
-
registerHrefs() {
|
34
|
-
Array.from(this.el.querySelectorAll('a[href]'))
|
35
|
-
.filter((el) => {
|
36
|
-
return el.getAttribute('href').match(/^\//);
|
37
|
-
})
|
38
|
-
.forEach((el) => {
|
39
|
-
el.addEventListener('click', (event) => {
|
40
|
-
if (!event.shiftKey && !event.ctrlKey) {
|
41
|
-
event.preventDefault();
|
42
|
-
const href = el.getAttribute('href');
|
43
|
-
this._router.navigateByUrl(href);
|
44
|
-
}
|
45
|
-
});
|
46
|
-
});
|
47
|
-
}
|
48
|
-
get el() {
|
49
|
-
return this._el.nativeElement;
|
50
|
-
}
|
51
|
-
ngOnDestroy() {
|
52
|
-
this.removeStyles();
|
53
|
-
this._destroy$.next();
|
54
|
-
this._destroy$.complete();
|
55
|
-
}
|
56
|
-
removeStyles() {
|
57
|
-
const el = document.querySelector('#contentPageStyles');
|
58
|
-
if (el) {
|
59
|
-
el.remove();
|
60
|
-
}
|
61
|
-
}
|
62
|
-
}
|
63
|
-
ContentRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentRendererComponent, deps: [{ token: i1.DomSanitizer }, { token: i2.Router }, { token: i0.ElementRef }, { token: i3.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
|
64
|
-
ContentRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentRendererComponent, decorators: [{
|
66
|
-
type: Component,
|
67
|
-
args: [{ selector: 'fs-content-renderer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""] }]
|
68
|
-
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i2.Router }, { type: i0.ElementRef }, { type: i3.HtmlRenderer }]; }, propDecorators: { script: [{
|
69
|
-
type: ViewChild,
|
70
|
-
args: ['script', { read: ElementRef }]
|
71
|
-
}], contentPage: [{
|
72
|
-
type: Input
|
73
|
-
}] } });
|
1
|
+
import { ChangeDetectionStrategy, Component, ElementRef, Input, ViewChild, } from '@angular/core';
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
3
|
+
import { Router } from '@angular/router';
|
4
|
+
import { HtmlRenderer } from '@firestitch/html';
|
5
|
+
import { Subject } from 'rxjs';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
import * as i1 from "@angular/platform-browser";
|
8
|
+
import * as i2 from "@angular/router";
|
9
|
+
import * as i3 from "@firestitch/html";
|
10
|
+
import * as i4 from "@angular/common";
|
11
|
+
export class ContentRendererComponent {
|
12
|
+
constructor(_sanitizer, _router, _el, _htmlRenderer) {
|
13
|
+
this._sanitizer = _sanitizer;
|
14
|
+
this._router = _router;
|
15
|
+
this._el = _el;
|
16
|
+
this._htmlRenderer = _htmlRenderer;
|
17
|
+
this._destroy$ = new Subject();
|
18
|
+
}
|
19
|
+
ngOnChanges(changes) {
|
20
|
+
if (changes.contentPage.currentValue) {
|
21
|
+
this._htmlRenderer.addStyle(this.contentPage.styles, { id: 'contentPageStyles' });
|
22
|
+
this.content = this._sanitizer.bypassSecurityTrustHtml(this.contentPage.content);
|
23
|
+
}
|
24
|
+
}
|
25
|
+
ngAfterViewChecked() {
|
26
|
+
this.registerHrefs();
|
27
|
+
if (this.contentPage.js) {
|
28
|
+
const script = document.createElement('script');
|
29
|
+
script.text = this.contentPage.js;
|
30
|
+
this.script.nativeElement.after(script);
|
31
|
+
}
|
32
|
+
}
|
33
|
+
registerHrefs() {
|
34
|
+
Array.from(this.el.querySelectorAll('a[href]'))
|
35
|
+
.filter((el) => {
|
36
|
+
return el.getAttribute('href').match(/^\//);
|
37
|
+
})
|
38
|
+
.forEach((el) => {
|
39
|
+
el.addEventListener('click', (event) => {
|
40
|
+
if (!event.shiftKey && !event.ctrlKey) {
|
41
|
+
event.preventDefault();
|
42
|
+
const href = el.getAttribute('href');
|
43
|
+
this._router.navigateByUrl(href);
|
44
|
+
}
|
45
|
+
});
|
46
|
+
});
|
47
|
+
}
|
48
|
+
get el() {
|
49
|
+
return this._el.nativeElement;
|
50
|
+
}
|
51
|
+
ngOnDestroy() {
|
52
|
+
this.removeStyles();
|
53
|
+
this._destroy$.next();
|
54
|
+
this._destroy$.complete();
|
55
|
+
}
|
56
|
+
removeStyles() {
|
57
|
+
const el = document.querySelector('#contentPageStyles');
|
58
|
+
if (el) {
|
59
|
+
el.remove();
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
ContentRendererComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentRendererComponent, deps: [{ token: i1.DomSanitizer }, { token: i2.Router }, { token: i0.ElementRef }, { token: i3.HtmlRenderer }], target: i0.ɵɵFactoryTarget.Component });
|
64
|
+
ContentRendererComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: ContentRendererComponent, selector: "fs-content-renderer", inputs: { contentPage: "contentPage" }, viewQueries: [{ propertyName: "script", first: true, predicate: ["script"], descendants: true, read: ElementRef }], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""], directives: [{ type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
65
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ContentRendererComponent, decorators: [{
|
66
|
+
type: Component,
|
67
|
+
args: [{ selector: 'fs-content-renderer', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"content\" [innerHTML]=\"content\"></div>\n<span #script></span>", styles: [""] }]
|
68
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }, { type: i2.Router }, { type: i0.ElementRef }, { type: i3.HtmlRenderer }]; }, propDecorators: { script: [{
|
69
|
+
type: ViewChild,
|
70
|
+
args: ['script', { read: ElementRef }]
|
71
|
+
}], contentPage: [{
|
72
|
+
type: Input
|
73
|
+
}] } });
|
74
74
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29udGVudC1yZW5kZXJlci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2NvbnRlbnQtcmVuZGVyZXIvY29udGVudC1yZW5kZXJlci5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2NvbnRlbnQtcmVuZGVyZXIvY29udGVudC1yZW5kZXJlci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBRUwsdUJBQXVCLEVBQ3ZCLFNBQVMsRUFDVCxVQUFVLEVBQ1YsS0FBSyxFQUlMLFNBQVMsR0FDVixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQUUsWUFBWSxFQUFZLE1BQU0sMkJBQTJCLENBQUM7QUFDbkUsT0FBTyxFQUFFLE1BQU0sRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXpDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxrQkFBa0IsQ0FBQztBQUVoRCxPQUFPLEVBQUUsT0FBTyxFQUFFLE1BQU0sTUFBTSxDQUFDOzs7Ozs7QUFTL0IsTUFBTSxPQUFPLHdCQUF3QjtJQVduQyxZQUNVLFVBQXdCLEVBQ3hCLE9BQWUsRUFDZixHQUFlLEVBQ2YsYUFBMkI7UUF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IHRoaXMucmVtb3ZlU3R5bGVzKCk7XG4gICAgdGhpcy5fZGVzdHJveSQubmV4dCgpO1xuICAgIHRoaXMuX2Rlc3Ryb3kkLmNvbXBsZXRlKCk7XG4gIH1cblxuICBwdWJsaWMgcmVtb3ZlU3R5bGVzKCk6IHZvaWQge1xuICAgIGNvbnN0IGVsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2NvbnRlbnRQYWdlU3R5bGVzJyk7XG4gICAgaWYoZWwpIHtcbiAgICAgIGVsLnJlbW92ZSgpO1xuICAgIH1cbiAgfVxuXG59XG4iLCI8ZGl2ICpuZ0lmPVwiY29udGVudFwiIFtpbm5lckhUTUxdPVwiY29udGVudFwiPjwvZGl2PlxuPHNwYW4gI3NjcmlwdD48L3NwYW4+Il19
|
@@ -1,2 +1,2 @@
|
|
1
|
-
export * from './content-renderer.component';
|
1
|
+
export * from './content-renderer.component';
|
2
2
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9jb21wb25lbnRzL2NvbnRlbnQtcmVuZGVyZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyw4QkFBOEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vY29udGVudC1yZW5kZXJlci5jb21wb25lbnQnO1xuIl19
|
@@ -1,33 +1,33 @@
|
|
1
|
-
import { NgModule } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { FsHtmlEditorModule } from '@firestitch/html-editor';
|
4
|
-
import { FsContentComponent } from './components/content';
|
5
|
-
import { ContentRendererComponent } from './components/content-renderer';
|
6
|
-
import * as i0 from "@angular/core";
|
7
|
-
export class FsContentModule {
|
8
|
-
}
|
9
|
-
FsContentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
10
|
-
FsContentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, declarations: [FsContentComponent,
|
11
|
-
ContentRendererComponent], imports: [CommonModule,
|
12
|
-
FsHtmlEditorModule], exports: [FsContentComponent] });
|
13
|
-
FsContentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, imports: [[
|
14
|
-
CommonModule,
|
15
|
-
FsHtmlEditorModule,
|
16
|
-
]] });
|
17
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, decorators: [{
|
18
|
-
type: NgModule,
|
19
|
-
args: [{
|
20
|
-
imports: [
|
21
|
-
CommonModule,
|
22
|
-
FsHtmlEditorModule,
|
23
|
-
],
|
24
|
-
exports: [
|
25
|
-
FsContentComponent,
|
26
|
-
],
|
27
|
-
declarations: [
|
28
|
-
FsContentComponent,
|
29
|
-
ContentRendererComponent,
|
30
|
-
],
|
31
|
-
}]
|
32
|
-
}] });
|
1
|
+
import { NgModule } from '@angular/core';
|
2
|
+
import { CommonModule } from '@angular/common';
|
3
|
+
import { FsHtmlEditorModule } from '@firestitch/html-editor';
|
4
|
+
import { FsContentComponent } from './components/content';
|
5
|
+
import { ContentRendererComponent } from './components/content-renderer';
|
6
|
+
import * as i0 from "@angular/core";
|
7
|
+
export class FsContentModule {
|
8
|
+
}
|
9
|
+
FsContentModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
10
|
+
FsContentModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, declarations: [FsContentComponent,
|
11
|
+
ContentRendererComponent], imports: [CommonModule,
|
12
|
+
FsHtmlEditorModule], exports: [FsContentComponent] });
|
13
|
+
FsContentModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, imports: [[
|
14
|
+
CommonModule,
|
15
|
+
FsHtmlEditorModule,
|
16
|
+
]] });
|
17
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: FsContentModule, decorators: [{
|
18
|
+
type: NgModule,
|
19
|
+
args: [{
|
20
|
+
imports: [
|
21
|
+
CommonModule,
|
22
|
+
FsHtmlEditorModule,
|
23
|
+
],
|
24
|
+
exports: [
|
25
|
+
FsContentComponent,
|
26
|
+
],
|
27
|
+
declarations: [
|
28
|
+
FsContentComponent,
|
29
|
+
ContentRendererComponent,
|
30
|
+
],
|
31
|
+
}]
|
32
|
+
}] });
|
33
33
|
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZnMtY29udGVudC5tb2R1bGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvYXBwL21vZHVsZXMvY29udGVudC9mcy1jb250ZW50Lm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsUUFBUSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQ3pDLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxpQkFBaUIsQ0FBQztBQUUvQyxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQztBQUU3RCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUMxRCxPQUFPLEVBQUUsd0JBQXdCLEVBQUUsTUFBTSwrQk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