@dignite-ng/expand.ck-editor 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/config/ck-editor-config.module.mjs +4 -4
- package/esm2022/lib/adapter/ckEditorUpload.mjs +61 -0
- package/esm2022/lib/adapter/index.mjs +2 -0
- package/esm2022/lib/ck-editor-routing.module.mjs +4 -4
- package/esm2022/lib/ck-editor.module.mjs +6 -6
- package/esm2022/lib/components/dome/ck-editor-dome.component.mjs +17 -15
- package/esm2022/lib/dynamic-form/ck-editor/ck-editor-config.component.mjs +3 -11
- package/esm2022/lib/dynamic-form/ck-editor/ck-editor-config.mjs +7 -7
- package/esm2022/lib/dynamic-form/ck-editor/ck-editor-control.component.mjs +19 -29
- package/esm2022/lib/dynamic-form/ck-editor/ckEditorUpload.mjs +9 -12
- package/esm2022/lib/pipes/index.mjs +2 -0
- package/esm2022/lib/pipes/set-ckeditor-content.pipe.mjs +25 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/dignite-ng-expand.ck-editor-config.mjs +3 -3
- package/fesm2022/dignite-ng-expand.ck-editor-config.mjs.map +1 -1
- package/fesm2022/dignite-ng-expand.ck-editor.mjs +147 -82
- package/fesm2022/dignite-ng-expand.ck-editor.mjs.map +1 -1
- package/lib/adapter/ckEditorUpload.d.ts +19 -0
- package/lib/adapter/index.d.ts +1 -0
- package/lib/pipes/index.d.ts +1 -0
- package/lib/pipes/set-ckeditor-content.pipe.d.ts +8 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
export class isBase64UploadAdapter {
|
|
2
|
-
reader = new FileReader();
|
|
3
|
-
restService;
|
|
4
|
-
loader;
|
|
5
|
-
ImagesContainerName;
|
|
6
|
-
Base64 = false;
|
|
7
2
|
constructor(loader, ImagesContainerName, restService) {
|
|
3
|
+
this.reader = new FileReader();
|
|
4
|
+
this.Base64 = false;
|
|
5
|
+
this.createFile = (input, config) => this.restService.request({
|
|
6
|
+
method: 'POST',
|
|
7
|
+
url: '/api/file-explorer/files',
|
|
8
|
+
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
9
|
+
body: input.file,
|
|
10
|
+
}, { apiName: 'FileExplorer', ...config });
|
|
8
11
|
this.loader = loader;
|
|
9
12
|
this.ImagesContainerName = ImagesContainerName;
|
|
10
13
|
this.restService = restService;
|
|
@@ -44,11 +47,5 @@ export class isBase64UploadAdapter {
|
|
|
44
47
|
}
|
|
45
48
|
});
|
|
46
49
|
}
|
|
47
|
-
createFile = (input, config) => this.restService.request({
|
|
48
|
-
method: 'POST',
|
|
49
|
-
url: '/api/file-explorer/files',
|
|
50
|
-
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
51
|
-
body: input.file,
|
|
52
|
-
}, { apiName: 'FileExplorer', ...config });
|
|
53
50
|
}
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
51
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2tFZGl0b3JVcGxvYWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jay1lZGl0b3Ivc3JjL2xpYi9keW5hbWljLWZvcm0vY2stZWRpdG9yL2NrRWRpdG9yVXBsb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxxQkFBcUI7SUFNaEMsWUFDRSxNQUFXLEVBQ1gsbUJBQXdCLEVBQ3hCLFdBQXdCO1FBUm5CLFdBQU0sR0FBRyxJQUFJLFVBQVUsRUFBRSxDQUFDO1FBSWpDLFdBQU0sR0FBWSxLQUFLLENBQUE7UUFrRHZCLGVBQVUsR0FBRyxDQUFDLEtBQVUsRUFBRSxNQUE2QixFQUFFLEVBQUUsQ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clxuICAgICAgICByZWFkZXIuYWRkRXZlbnRMaXN0ZW5lcignZXJyb3InLCBlcnIgPT4ge1xyXG4gICAgICAgICAgcmVqZWN0KGVycik7XHJcbiAgICAgICAgfSk7XHJcblxyXG4gICAgICAgIHJlYWRlci5hZGRFdmVudExpc3RlbmVyKCdhYm9ydCcsICgpID0+IHtcclxuICAgICAgICAgIHJlamVjdCgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmxvYWRlci5maWxlLnRoZW4oKGZpbGU6IEJsb2IpID0+IHtcclxuICAgICAgICAgIHJlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGUpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIHRoaXMubG9hZGVyLmZpbGUudGhlbigoZmlsZTogRmlsZSkgPT4ge1xyXG4gICAgICAgICAgdmFyIGZvcm1EYXRhID0gbmV3IEZvcm1EYXRhKCk7XHJcbiAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpbGUnLCBmaWxlLCBmaWxlLm5hbWUpO1xyXG4gICAgICAgICAgdGhpcy5jcmVhdGVGaWxlKHtcclxuICAgICAgICAgICAgZmlsZTogZm9ybURhdGEsXHJcbiAgICAgICAgICAgIGNvbnRhaW5lck5hbWU6IHRoaXMuSW1hZ2VzQ29udGFpbmVyTmFtZSxcclxuICAgICAgICAgICAgZGlyZWN0b3J5SWQ6ICcnLFxyXG4gICAgICAgICAgICBlbnRpdHlJZDogJydcclxuICAgICAgICAgIH0pLnN1YnNjcmliZSgocmVzcG9uc2U6YW55KT0+e1xyXG4gICAgICAgICAgICByZXNvbHZlKHsgZGVmYXVsdDogcmVzcG9uc2UudXJsIH0pXHJcbiAgICAgICAgICB9LChlcnJvcik9PntcclxuICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH1cclxuXHJcbiAgICB9KTtcclxuICB9XHJcblxyXG4gIGNyZWF0ZUZpbGUgPSAoaW5wdXQ6IGFueSwgY29uZmlnPzogUGFydGlhbDxSZXN0LkNvbmZpZz4pID0+XHJcbiAgICB0aGlzLnJlc3RTZXJ2aWNlLnJlcXVlc3Q8YW55LCBhbnk+KHtcclxuICAgICAgbWV0aG9kOiAnUE9TVCcsXHJcbiAgICAgIHVybDogJy9hcGkvZmlsZS1leHBsb3Jlci9maWxlcycsXHJcbiAgICAgIHBhcmFtczogeyBjb250YWluZXJOYW1lOiBpbnB1dC5jb250YWluZXJOYW1lLCBjZWxsTmFtZTogaW5wdXQuY2VsbE5hbWUsIGRpcmVjdG9yeUlkOiBpbnB1dC5kaXJlY3RvcnlJZCwgZW50aXR5SWQ6IGlucHV0LmVudGl0eUlkIH0sXHJcbiAgICAgIGJvZHk6IGlucHV0LmZpbGUsXHJcbiAgICB9LFxyXG4gICAgICB7IGFwaU5hbWU6ICdGaWxlRXhwbG9yZXInLCAuLi5jb25maWcgfSk7XHJcblxyXG59Il19
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export * from './set-ckeditor-content.pipe';
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jay1lZGl0b3Ivc3JjL2xpYi9waXBlcy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDZCQUE2QixDQUFBIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zZXQtY2tlZGl0b3ItY29udGVudC5waXBlJyJdfQ==
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { inject, Pipe } from '@angular/core';
|
|
2
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export class SetCkeditorContentPipe {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.sanitized = inject(DomSanitizer);
|
|
7
|
+
}
|
|
8
|
+
transform(value, ...args) {
|
|
9
|
+
if (value) {
|
|
10
|
+
value = value.replace(/<oembed url/ig, "<iframe src").replace(/oembed>/ig, "iframe>");
|
|
11
|
+
value = value.replace(/<figure class="media"/ig, "<div").replace(/figure>/ig, "div>");
|
|
12
|
+
}
|
|
13
|
+
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
14
|
+
}
|
|
15
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
16
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, isStandalone: true, name: "setCkeditorContent" }); }
|
|
17
|
+
}
|
|
18
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, decorators: [{
|
|
19
|
+
type: Pipe,
|
|
20
|
+
args: [{
|
|
21
|
+
name: 'setCkeditorContent',
|
|
22
|
+
standalone: true
|
|
23
|
+
}]
|
|
24
|
+
}] });
|
|
25
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0LWNrZWRpdG9yLWNvbnRlbnQucGlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NrLWVkaXRvci9zcmMvbGliL3BpcGVzL3NldC1ja2VkaXRvci1jb250ZW50LnBpcGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE1BQU0sRUFBRSxJQUFJLEVBQWlCLE1BQU0sZUFBZSxDQUFDO0FBQzVELE9BQU8sRUFB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WRpdG9yQ29udGVudFBpcGUgaW1wbGVtZW50cyBQaXBlVHJhbnNmb3JtIHtcclxuICBwcml2YXRlIHNhbml0aXplZCA9IGluamVjdChEb21TYW5pdGl6ZXIpXHJcbiAgdHJhbnNmb3JtKHZhbHVlOiBhbnksIC4uLmFyZ3M6IHVua25vd25bXSk6IHVua25vd24ge1xyXG4gICAgaWYodmFsdWUpe1xyXG4gICAgICB2YWx1ZSA9IHZhbHVlLnJlcGxhY2UoLzxvZW1iZWQgdXJsL2lnLCBcIjxpZnJhbWUgICBzcmNcIikucmVwbGFjZSgvb2VtYmVkPi9pZywgXCJpZnJhbWU+XCIpXHJcbiAgICAgIHZhbHVlID0gdmFsdWUucmVwbGFjZSgvPGZpZ3VyZSBjbGFzcz1cIm1lZGlhXCIvaWcsIFwiPGRpdlwiKS5yZXBsYWNlKC9maWd1cmU+L2lnLCBcImRpdj5cIilcclxuICAgIH1cclxuICAgIHJldHVybiB0aGlzLnNhbml0aXplZC5ieXBhc3NTZWN1cml0eVRydXN0SHRtbCh2YWx1ZSk7XHJcbiAgfVxyXG5cclxufVxyXG4iXX0=
|
package/esm2022/public-api.mjs
CHANGED
|
@@ -6,4 +6,6 @@ export * from './lib/ck-editor-routing.module';
|
|
|
6
6
|
export * from './lib/dynamic-form/form-control-group';
|
|
7
7
|
export * from './lib/enums/languages-map';
|
|
8
8
|
export * from './lib/object/ck-editor-object';
|
|
9
|
-
|
|
9
|
+
export * from './lib/adapter';
|
|
10
|
+
export * from './lib/pipes';
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NrLWVkaXRvci9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLHVDQUF1QyxDQUFDO0FBQ3RELGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLGFBQWEsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY2stZWRpdG9yXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY2stZWRpdG9yLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jay1lZGl0b3Itcm91dGluZy5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZHluYW1pYy1mb3JtL2Zvcm0tY29udHJvbC1ncm91cCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lbnVtcy9sYW5ndWFnZXMtbWFwJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL29iamVjdC9jay1lZGl0b3Itb2JqZWN0JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2FkYXB0ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvcGlwZXMnO1xuIl19
|
|
@@ -31,9 +31,9 @@ class CkEditorConfigModule {
|
|
|
31
31
|
providers: [ck_editor_ROUTE_PROVIDERS],
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
static
|
|
35
|
-
static
|
|
36
|
-
static
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
35
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigModule }); }
|
|
36
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigModule }); }
|
|
37
37
|
}
|
|
38
38
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigModule, decorators: [{
|
|
39
39
|
type: NgModule
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dignite-ng-expand.ck-editor-config.mjs","sources":["../../../projects/ck-editor/config/src/providers/route.provider.ts","../../../projects/ck-editor/config/src/ck-editor-config.module.ts","../../../projects/ck-editor/config/src/dignite-ng-expand.ck-editor-config.ts"],"sourcesContent":["import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eCkEditorRouteNames } from '../enums';\r\n\r\nexport const ck_editor_ROUTE_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureRoutes,\r\n deps: [RoutesService],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureRoutes(routesService: RoutesService) {\r\n return () => {\r\n routesService.add([\r\n {\r\n path: '/ck-editor/dome',\r\n name:eCkEditorRouteNames.CkEditorDemo,\r\n iconClass: 'fas fa fa-file-archive-o',\r\n layout: eLayoutType.application,\r\n order: 9,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { ck_editor_ROUTE_PROVIDERS } from './providers/route.provider';\r\n\r\n@NgModule()\r\nexport class CkEditorConfigModule {\r\n static forRoot(): ModuleWithProviders<CkEditorConfigModule> {\r\n return {\r\n ngModule: CkEditorConfigModule,\r\n providers: [ck_editor_ROUTE_PROVIDERS],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAIa,MAAA,yBAAyB,GAAG;AACvC,IAAA;AACE,QAAA,OAAO,EAAE,eAAe;AACxB,QAAA,UAAU,EAAE,eAAe;QAC3B,IAAI,EAAE,CAAC,aAAa,CAAC;AACrB,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;EACD;AAEI,SAAU,eAAe,CAAC,aAA4B,EAAA;AAC1D,IAAA,OAAO,MAAK;QACV,aAAa,CAAC,GAAG,CAAC;AAChB,YAAA;AACE,gBAAA,IAAI,EAAE,iBAAiB;AACvB,gBAAA,IAAI,EAAiC,gBAAA;AACrC,gBAAA,SAAS,EAAE,0BAA0B;AACrC,gBAAA,MAAM,EAAyB,aAAA;AAC/B,gBAAA,KAAK,EAAE,CAAC;AACT,aAAA;AACF,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;AACJ;;MCrBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;KACH;
|
|
1
|
+
{"version":3,"file":"dignite-ng-expand.ck-editor-config.mjs","sources":["../../../projects/ck-editor/config/src/providers/route.provider.ts","../../../projects/ck-editor/config/src/ck-editor-config.module.ts","../../../projects/ck-editor/config/src/dignite-ng-expand.ck-editor-config.ts"],"sourcesContent":["import { eLayoutType, RoutesService } from '@abp/ng.core';\r\nimport { APP_INITIALIZER } from '@angular/core';\r\nimport { eCkEditorRouteNames } from '../enums';\r\n\r\nexport const ck_editor_ROUTE_PROVIDERS = [\r\n {\r\n provide: APP_INITIALIZER,\r\n useFactory: configureRoutes,\r\n deps: [RoutesService],\r\n multi: true,\r\n },\r\n];\r\n\r\nexport function configureRoutes(routesService: RoutesService) {\r\n return () => {\r\n routesService.add([\r\n {\r\n path: '/ck-editor/dome',\r\n name:eCkEditorRouteNames.CkEditorDemo,\r\n iconClass: 'fas fa fa-file-archive-o',\r\n layout: eLayoutType.application,\r\n order: 9,\r\n },\r\n ]);\r\n };\r\n}\r\n","import { ModuleWithProviders, NgModule } from '@angular/core';\r\nimport { ck_editor_ROUTE_PROVIDERS } from './providers/route.provider';\r\n\r\n@NgModule()\r\nexport class CkEditorConfigModule {\r\n static forRoot(): ModuleWithProviders<CkEditorConfigModule> {\r\n return {\r\n ngModule: CkEditorConfigModule,\r\n providers: [ck_editor_ROUTE_PROVIDERS],\r\n };\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;AAIa,MAAA,yBAAyB,GAAG;AACvC,IAAA;AACE,QAAA,OAAO,EAAE,eAAe;AACxB,QAAA,UAAU,EAAE,eAAe;QAC3B,IAAI,EAAE,CAAC,aAAa,CAAC;AACrB,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;EACD;AAEI,SAAU,eAAe,CAAC,aAA4B,EAAA;AAC1D,IAAA,OAAO,MAAK;QACV,aAAa,CAAC,GAAG,CAAC;AAChB,YAAA;AACE,gBAAA,IAAI,EAAE,iBAAiB;AACvB,gBAAA,IAAI,EAAiC,gBAAA;AACrC,gBAAA,SAAS,EAAE,0BAA0B;AACrC,gBAAA,MAAM,EAAyB,aAAA;AAC/B,gBAAA,KAAK,EAAE,CAAC;AACT,aAAA;AACF,SAAA,CAAC,CAAC;AACL,KAAC,CAAC;AACJ;;MCrBa,oBAAoB,CAAA;AAC/B,IAAA,OAAO,OAAO,GAAA;QACZ,OAAO;AACL,YAAA,QAAQ,EAAE,oBAAoB;YAC9B,SAAS,EAAE,CAAC,yBAAyB,CAAC;SACvC,CAAC;KACH;8GANU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAApB,oBAAoB,EAAA,CAAA,CAAA,EAAA;+GAApB,oBAAoB,EAAA,CAAA,CAAA,EAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,QAAQ;;;ACHT;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, Component, NgModule, Input, ViewChild } from '@angular/core';
|
|
2
|
+
import { inject, Component, NgModule, Input, ViewChild, Pipe } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/router';
|
|
4
4
|
import { RouterModule } from '@angular/router';
|
|
5
5
|
import { AccessibilityHelp, Alignment, Autoformat, AutoImage, Autosave, Base64UploadAdapter, BlockQuote, Bold, CloudServices, Code, Essentials, FontBackgroundColor, FontColor, FontFamily, FontSize, GeneralHtmlSupport, Heading, Highlight, HorizontalLine, ImageBlock, ImageCaption, ImageInline, ImageInsert, ImageInsertViaUrl, ImageResize, ImageStyle, ImageTextAlternative, ImageToolbar, ImageUpload, Indent, IndentBlock, Italic, Link, LinkImage, List, ListProperties, MediaEmbed, Paragraph, PasteFromOffice, RemoveFormat, SelectAll, SpecialCharacters, SpecialCharactersArrows, SpecialCharactersCurrency, SpecialCharactersEssentials, SpecialCharactersLatin, SpecialCharactersMathematical, SpecialCharactersText, Strikethrough, Style, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, TextTransformation, TodoList, Underline, Undo, ClassicEditor } from 'ckeditor5';
|
|
@@ -29,6 +29,7 @@ import * as i4 from '@ckeditor/ckeditor5-angular';
|
|
|
29
29
|
import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
|
|
30
30
|
import { ThemeSharedModule } from '@abp/ng.theme.shared';
|
|
31
31
|
import * as i3 from '@ngx-validate/core';
|
|
32
|
+
import { DomSanitizer } from '@angular/platform-browser';
|
|
32
33
|
|
|
33
34
|
var easy = {
|
|
34
35
|
toolbar: {
|
|
@@ -941,17 +942,20 @@ var LanguagesMap;
|
|
|
941
942
|
})(LanguagesMap || (LanguagesMap = {}));
|
|
942
943
|
|
|
943
944
|
class CkEditorDomeComponent {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
945
|
+
constructor() {
|
|
946
|
+
this.config = inject(ConfigStateService);
|
|
947
|
+
this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
|
|
948
|
+
// CkEditorTypesObject = CkEditorTypesObject
|
|
949
|
+
this.Editor = ClassicEditor;
|
|
950
|
+
this._config = {
|
|
951
|
+
plugins: [Bold, Essentials, Italic, Paragraph, Undo],
|
|
952
|
+
toolbar: ['undo', 'redo', '|', 'bold', 'italic']
|
|
953
|
+
};
|
|
954
|
+
this.configType = 'default';
|
|
955
|
+
this.editorValue = '<p>12233</p>';
|
|
956
|
+
this.languagesMap = LanguagesMap;
|
|
957
|
+
this._config_ck = CkEditorTypesObject['full'];
|
|
958
|
+
}
|
|
955
959
|
/**切换类型 */
|
|
956
960
|
switchType(type) {
|
|
957
961
|
this.configType = type;
|
|
@@ -977,9 +981,8 @@ class CkEditorDomeComponent {
|
|
|
977
981
|
const data = editor.getData();
|
|
978
982
|
this.editorValue = data;
|
|
979
983
|
}
|
|
980
|
-
|
|
981
|
-
static
|
|
982
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorDomeComponent, selector: "lib-ck-editor-dome", ngImport: i0, template: "<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('easy')\">\u6781\u7B80</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('default')\">\u9ED8\u8BA4</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('standard')\">\u6807\u51C6</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('full')\">\u5B8C\u6574</button>\r\n\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"clearconfig()\">\u6E05\u7A7A\u914D\u7F6E</button>\r\n\r\n<h3>\u81EA\u5B9A\u4E49\u914D\u7F6E</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config\" ></ckeditor>\r\n\r\n<h3>\u7C7B\u578B</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config_ck\" (change)=\"ckChange($event)\" (ready)=\"ckReady($event)\"></ckeditor>\r\n\r\n{{editorValue}}", styles: [""], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] });
|
|
984
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
985
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorDomeComponent, selector: "lib-ck-editor-dome", ngImport: i0, template: "<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('easy')\">\u6781\u7B80</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('default')\">\u9ED8\u8BA4</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('standard')\">\u6807\u51C6</button>\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"switchType('full')\">\u5B8C\u6574</button>\r\n\r\n<button class=\"btn btn-sm btn-primary mx-2 mb-2\" (click.stop)=\"clearconfig()\">\u6E05\u7A7A\u914D\u7F6E</button>\r\n\r\n<h3>\u81EA\u5B9A\u4E49\u914D\u7F6E</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config\" ></ckeditor>\r\n\r\n<h3>\u7C7B\u578B</h3>\r\n<ckeditor #editor [editor]=\"Editor\" *ngIf=\"_config_ck\" [(ngModel)]=\"editorValue\" [config]=\"_config_ck\" (change)=\"ckChange($event)\" (ready)=\"ckReady($event)\"></ckeditor>\r\n\r\n{{editorValue}}", styles: [""], dependencies: [{ kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.StopPropagationDirective, selector: "[click.stop]", outputs: ["click.stop"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }] }); }
|
|
983
986
|
}
|
|
984
987
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, decorators: [{
|
|
985
988
|
type: Component,
|
|
@@ -991,9 +994,9 @@ const routes = [{
|
|
|
991
994
|
component: CkEditorDomeComponent,
|
|
992
995
|
}];
|
|
993
996
|
class CkEditorRoutingModule {
|
|
994
|
-
static
|
|
995
|
-
static
|
|
996
|
-
static
|
|
997
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
998
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
999
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
997
1000
|
}
|
|
998
1001
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, decorators: [{
|
|
999
1002
|
type: NgModule,
|
|
@@ -1004,13 +1007,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1004
1007
|
}] });
|
|
1005
1008
|
|
|
1006
1009
|
class CkEditorConfig {
|
|
1007
|
-
/**文件容器名称 */
|
|
1008
|
-
// placeholder: any = new FormControl('', Validators.required);
|
|
1009
|
-
'Ckeditor.ImagesContainerName' = ['', []];
|
|
1010
|
-
/**多选 */
|
|
1011
|
-
// placeholder: any = new FormControl('', Validators.required);
|
|
1012
|
-
'Ckeditor.InitialContent' = ['', []];
|
|
1013
1010
|
constructor(data) {
|
|
1011
|
+
/**文件容器名称 */
|
|
1012
|
+
// placeholder: any = new FormControl('', Validators.required);
|
|
1013
|
+
this['Ckeditor.ImagesContainerName'] = ['', []];
|
|
1014
|
+
/**多选 */
|
|
1015
|
+
// placeholder: any = new FormControl('', Validators.required);
|
|
1016
|
+
this['Ckeditor.InitialContent'] = ['', []];
|
|
1014
1017
|
if (data) {
|
|
1015
1018
|
for (const key in data) {
|
|
1016
1019
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1022,20 +1025,13 @@ class CkEditorConfig {
|
|
|
1022
1025
|
}
|
|
1023
1026
|
|
|
1024
1027
|
class CkEditorConfigComponent {
|
|
1025
|
-
fb;
|
|
1026
1028
|
constructor(fb) {
|
|
1027
1029
|
this.fb = fb;
|
|
1028
1030
|
}
|
|
1029
|
-
/**表单实体 */
|
|
1030
|
-
Entity;
|
|
1031
|
-
/**选择的表单信息 */
|
|
1032
|
-
_selected;
|
|
1033
1031
|
set selected(v) {
|
|
1034
1032
|
this._selected = v || '';
|
|
1035
1033
|
this.dataLoaded();
|
|
1036
1034
|
}
|
|
1037
|
-
/**表单控件类型 */
|
|
1038
|
-
_type;
|
|
1039
1035
|
set type(v) {
|
|
1040
1036
|
this._type = v;
|
|
1041
1037
|
this.dataLoaded();
|
|
@@ -1043,7 +1039,6 @@ class CkEditorConfigComponent {
|
|
|
1043
1039
|
get formConfiguration() {
|
|
1044
1040
|
return this.Entity.get('formConfiguration');
|
|
1045
1041
|
}
|
|
1046
|
-
submitclick;
|
|
1047
1042
|
async dataLoaded() {
|
|
1048
1043
|
// if (this.Entity && (this._selected || this._selected === '')) {
|
|
1049
1044
|
if (this.Entity && this._type) {
|
|
@@ -1062,8 +1057,8 @@ class CkEditorConfigComponent {
|
|
|
1062
1057
|
resolve(true);
|
|
1063
1058
|
});
|
|
1064
1059
|
}
|
|
1065
|
-
static
|
|
1066
|
-
static
|
|
1060
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, deps: [{ token: i1.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1061
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorConfigComponent, selector: "ck-editor-config", inputs: { Entity: "Entity", selected: "selected", type: "type" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"Entity\">\n <div formGroupName=\"formConfiguration\">\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::ImagesContainerName' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.ImagesContainerName\">\n </div>\n <div class=\"mb-2\">\n <label class=\"form-label\">{{'DigniteAbpDynamicFormsCkEditor::InitialContent' | abpLocalization}}</label>\n <input type=\"text\" class=\"form-control\" formControlName=\"Ckeditor.InitialContent\">\n </div>\n <button type=\"submit\" (abpInit)=\"submitclick?.nativeElement?.click()\" style=\"display: none;\"\n #submitclick></button>\n </div>\n</form>", styles: [""], dependencies: [{ 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.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2$1.InitDirective, selector: "[abpInit]", outputs: ["abpInit"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1067
1062
|
}
|
|
1068
1063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, decorators: [{
|
|
1069
1064
|
type: Component,
|
|
@@ -1079,13 +1074,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1079
1074
|
args: ['submitclick', { static: true }]
|
|
1080
1075
|
}] } });
|
|
1081
1076
|
|
|
1082
|
-
class isBase64UploadAdapter {
|
|
1083
|
-
reader = new FileReader();
|
|
1084
|
-
restService;
|
|
1085
|
-
loader;
|
|
1086
|
-
ImagesContainerName;
|
|
1087
|
-
Base64 = false;
|
|
1077
|
+
let isBase64UploadAdapter$1 = class isBase64UploadAdapter {
|
|
1088
1078
|
constructor(loader, ImagesContainerName, restService) {
|
|
1079
|
+
this.reader = new FileReader();
|
|
1080
|
+
this.Base64 = false;
|
|
1081
|
+
this.createFile = (input, config) => this.restService.request({
|
|
1082
|
+
method: 'POST',
|
|
1083
|
+
url: '/api/file-explorer/files',
|
|
1084
|
+
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
1085
|
+
body: input.file,
|
|
1086
|
+
}, { apiName: 'FileExplorer', ...config });
|
|
1089
1087
|
this.loader = loader;
|
|
1090
1088
|
this.ImagesContainerName = ImagesContainerName;
|
|
1091
1089
|
this.restService = restService;
|
|
@@ -1125,65 +1123,53 @@ class isBase64UploadAdapter {
|
|
|
1125
1123
|
}
|
|
1126
1124
|
});
|
|
1127
1125
|
}
|
|
1128
|
-
|
|
1129
|
-
method: 'POST',
|
|
1130
|
-
url: '/api/file-explorer/files',
|
|
1131
|
-
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
1132
|
-
body: input.file,
|
|
1133
|
-
}, { apiName: 'FileExplorer', ...config });
|
|
1134
|
-
}
|
|
1126
|
+
};
|
|
1135
1127
|
|
|
1136
1128
|
class CkEditorControlComponent {
|
|
1137
|
-
config = inject(ConfigStateService);
|
|
1138
|
-
_restService = inject(RestService);
|
|
1139
|
-
/**ck-Editor的值 */
|
|
1140
|
-
ckEditorValue = '';
|
|
1141
|
-
/**系统语言 */
|
|
1142
|
-
currentCulture = this.config.getOne('localization')?.currentCulture?.name;
|
|
1143
|
-
/** 语言目录,匹配系统语言,设置ckeditor的语言 */
|
|
1144
|
-
languagesMap = LanguagesMap;
|
|
1145
|
-
Editor = ClassicEditor;
|
|
1146
1129
|
constructor() {
|
|
1130
|
+
this.config = inject(ConfigStateService);
|
|
1131
|
+
this._restService = inject(RestService);
|
|
1132
|
+
/**ck-Editor的值 */
|
|
1133
|
+
this.ckEditorValue = '';
|
|
1134
|
+
/**系统语言 */
|
|
1135
|
+
this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
|
|
1136
|
+
/** 语言目录,匹配系统语言,设置ckeditor的语言 */
|
|
1137
|
+
this.languagesMap = LanguagesMap;
|
|
1138
|
+
this.Editor = ClassicEditor;
|
|
1139
|
+
this.fb = inject(FormBuilder);
|
|
1140
|
+
/**字段配置列表 */
|
|
1141
|
+
this._fields = '';
|
|
1142
|
+
this.invalidfeedback = false;
|
|
1143
|
+
/**图片容器名称 */
|
|
1144
|
+
this.imagesContainerName = '';
|
|
1147
1145
|
this.loadckeditor();
|
|
1148
1146
|
}
|
|
1149
1147
|
onReady(editor) {
|
|
1150
1148
|
let _this = this;
|
|
1151
1149
|
editor.plugins.get('FileRepository').createUploadAdapter = function (loader) {
|
|
1152
|
-
return new isBase64UploadAdapter(loader, _this.imagesContainerName, _this._restService);
|
|
1150
|
+
return new isBase64UploadAdapter$1(loader, _this.imagesContainerName, _this._restService);
|
|
1153
1151
|
};
|
|
1154
1152
|
}
|
|
1155
|
-
/**ck-editor配置 */
|
|
1156
|
-
ckOptions;
|
|
1157
1153
|
/**富文本内容改变 */
|
|
1158
1154
|
ckEditorChange(event) {
|
|
1159
1155
|
this.setckeditorInput(event);
|
|
1160
1156
|
}
|
|
1161
|
-
fb = inject(FormBuilder);
|
|
1162
|
-
/**表单实体 */
|
|
1163
|
-
_entity;
|
|
1164
1157
|
set entity(v) {
|
|
1165
1158
|
this._entity = v;
|
|
1166
1159
|
this.dataLoaded();
|
|
1167
1160
|
}
|
|
1168
|
-
/**字段配置列表 */
|
|
1169
|
-
_fields = '';
|
|
1170
1161
|
set fields(v) {
|
|
1171
1162
|
this._fields = v;
|
|
1172
1163
|
this.dataLoaded();
|
|
1173
1164
|
}
|
|
1174
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1175
|
-
_parentFiledName;
|
|
1176
1165
|
set parentFiledName(v) {
|
|
1177
1166
|
this._parentFiledName = v;
|
|
1178
1167
|
this.dataLoaded();
|
|
1179
1168
|
}
|
|
1180
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1181
|
-
_selected;
|
|
1182
1169
|
set selected(v) {
|
|
1183
1170
|
this._selected = v;
|
|
1184
1171
|
this.dataLoaded();
|
|
1185
1172
|
}
|
|
1186
|
-
submitclick;
|
|
1187
1173
|
get extraProperties() {
|
|
1188
1174
|
return this._entity.get('extraProperties');
|
|
1189
1175
|
}
|
|
@@ -1205,17 +1191,13 @@ class CkEditorControlComponent {
|
|
|
1205
1191
|
loadckeditor() {
|
|
1206
1192
|
let configs = CkEditorTypesObject['default'];
|
|
1207
1193
|
configs.language = this.languagesMap[this.currentCulture],
|
|
1208
|
-
|
|
1209
|
-
this.ckOptions = configs;
|
|
1194
|
+
this.ckOptions = configs;
|
|
1210
1195
|
}
|
|
1211
|
-
invalidfeedback = false;
|
|
1212
1196
|
//设置值
|
|
1213
1197
|
setckeditorInput(val) {
|
|
1214
1198
|
this.invalidfeedback = true;
|
|
1215
1199
|
this.ckeditorInput.patchValue(val);
|
|
1216
1200
|
}
|
|
1217
|
-
/**图片容器名称 */
|
|
1218
|
-
imagesContainerName = '';
|
|
1219
1201
|
AfterInit() {
|
|
1220
1202
|
return new Promise(resolve => {
|
|
1221
1203
|
let ValidatorsArray = [];
|
|
@@ -1234,8 +1216,8 @@ class CkEditorControlComponent {
|
|
|
1234
1216
|
resolve(true);
|
|
1235
1217
|
});
|
|
1236
1218
|
}
|
|
1237
|
-
static
|
|
1238
|
-
static
|
|
1219
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1220
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.1.5", type: CkEditorControlComponent, selector: "ck-editor-control", inputs: { entity: "entity", fields: "fields", parentFiledName: "parentFiledName", selected: "selected" }, viewQueries: [{ propertyName: "submitclick", first: true, predicate: ["submitclick"], descendants: true, static: true }], ngImport: i0, template: "<form [formGroup]=\"_entity\">\n <div formGroupName=\"extraProperties\">\n <div class=\"mb-2\">\n <label class=\"form-label\" *ngIf=\"_fields.displayName\">{{ _fields.displayName }}</label>\n <ckeditor [editor]=\"Editor\" *ngIf=\"Editor\" [config]=\"ckOptions\" (ready)=\"onReady($event)\" [formControlName]=\"_fields.field.name\">\n </ckeditor>\n <ng-container *ngIf=\"ckeditorInput?.errors?.required&&invalidfeedback\">\n <div class=\"text-danger \">\n {{'DigniteAbpForms::Validate:Required' | abpLocalization:' '}}\n </div>\n </ng-container>\n <div class=\"form-text\" *ngIf=\"_fields.field.description\">{{_fields.field.description}}</div>\n </div>\n </div>\n <button type=\"submit\" style=\"display: none;\" #submitclick></button>\n</form>", styles: [""], dependencies: [{ kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i3.ValidationGroupDirective, selector: "[formGroup],[formGroupName]", exportAs: ["validationGroup"] }, { kind: "directive", type: i3.ValidationDirective, selector: "[formControl],[formControlName]", exportAs: ["validationDirective"] }, { kind: "component", type: i4.CKEditorComponent, selector: "ckeditor", inputs: ["editor", "config", "data", "tagName", "watchdog", "editorWatchdogConfig", "disableTwoWayDataBinding", "disabled"], outputs: ["ready", "change", "blur", "focus", "error"] }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }] }); }
|
|
1239
1221
|
}
|
|
1240
1222
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorControlComponent, decorators: [{
|
|
1241
1223
|
type: Component,
|
|
@@ -1274,21 +1256,21 @@ function AddFieldControlGroup(array = []) {
|
|
|
1274
1256
|
}
|
|
1275
1257
|
|
|
1276
1258
|
class CkEditorModule {
|
|
1277
|
-
static
|
|
1278
|
-
static
|
|
1259
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1260
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, declarations: [CkEditorControlComponent,
|
|
1279
1261
|
CkEditorConfigComponent,
|
|
1280
1262
|
CkEditorDomeComponent], imports: [FormsModule,
|
|
1281
1263
|
CoreModule,
|
|
1282
1264
|
ThemeSharedModule,
|
|
1283
1265
|
ReactiveFormsModule,
|
|
1284
1266
|
CkEditorRoutingModule,
|
|
1285
|
-
CKEditorModule] });
|
|
1286
|
-
static
|
|
1267
|
+
CKEditorModule] }); }
|
|
1268
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, imports: [FormsModule,
|
|
1287
1269
|
CoreModule,
|
|
1288
1270
|
ThemeSharedModule,
|
|
1289
1271
|
ReactiveFormsModule,
|
|
1290
1272
|
CkEditorRoutingModule,
|
|
1291
|
-
CKEditorModule] });
|
|
1273
|
+
CKEditorModule] }); }
|
|
1292
1274
|
}
|
|
1293
1275
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorModule, decorators: [{
|
|
1294
1276
|
type: NgModule,
|
|
@@ -1310,6 +1292,89 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1310
1292
|
}]
|
|
1311
1293
|
}] });
|
|
1312
1294
|
|
|
1295
|
+
class isBase64UploadAdapter {
|
|
1296
|
+
constructor(input) {
|
|
1297
|
+
this.reader = new FileReader();
|
|
1298
|
+
this.Base64 = false;
|
|
1299
|
+
this.createFile = (input, config) => this.restService.request({
|
|
1300
|
+
method: 'POST',
|
|
1301
|
+
url: '/api/file-explorer/files',
|
|
1302
|
+
params: {
|
|
1303
|
+
containerName: input.containerName,
|
|
1304
|
+
cellName: input.cellName,
|
|
1305
|
+
directoryId: input.directoryId,
|
|
1306
|
+
entityId: input.entityId,
|
|
1307
|
+
},
|
|
1308
|
+
body: input.file,
|
|
1309
|
+
}, { apiName: 'FileExplorer', ...config });
|
|
1310
|
+
this.loader = input.loader;
|
|
1311
|
+
this.ImagesContainerName = input.ImagesContainerName;
|
|
1312
|
+
this.restService = input.restService;
|
|
1313
|
+
this.configState = input.configState;
|
|
1314
|
+
this.environment = input.environment;
|
|
1315
|
+
}
|
|
1316
|
+
upload() {
|
|
1317
|
+
return new Promise((resolve, reject) => {
|
|
1318
|
+
const reader = this.reader;
|
|
1319
|
+
if (this.Base64) {
|
|
1320
|
+
reader.addEventListener('load', () => {
|
|
1321
|
+
resolve({ default: reader.result });
|
|
1322
|
+
});
|
|
1323
|
+
reader.addEventListener('error', err => {
|
|
1324
|
+
reject(err);
|
|
1325
|
+
});
|
|
1326
|
+
reader.addEventListener('abort', () => {
|
|
1327
|
+
reject();
|
|
1328
|
+
});
|
|
1329
|
+
this.loader.file.then((file) => {
|
|
1330
|
+
reader.readAsDataURL(file);
|
|
1331
|
+
});
|
|
1332
|
+
}
|
|
1333
|
+
else {
|
|
1334
|
+
this.loader.file.then((file) => {
|
|
1335
|
+
var formData = new FormData();
|
|
1336
|
+
formData.append('file', file, file.name);
|
|
1337
|
+
this.createFile({
|
|
1338
|
+
file: formData,
|
|
1339
|
+
containerName: this.ImagesContainerName,
|
|
1340
|
+
// directoryId: '',
|
|
1341
|
+
// entityId: ''
|
|
1342
|
+
}).subscribe((response) => {
|
|
1343
|
+
let tenantId = this.configState.getDeep('currentUser.tenantId');
|
|
1344
|
+
const environment = this.environment.getEnvironment();
|
|
1345
|
+
let imgUrl = `${environment.apis.default.url}/api/file-explorer/files/${this.ImagesContainerName}/${response.blobName}?__tenant=${tenantId}`;
|
|
1346
|
+
resolve({ default: imgUrl });
|
|
1347
|
+
}, error => {
|
|
1348
|
+
reject(error);
|
|
1349
|
+
});
|
|
1350
|
+
});
|
|
1351
|
+
}
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
class SetCkeditorContentPipe {
|
|
1357
|
+
constructor() {
|
|
1358
|
+
this.sanitized = inject(DomSanitizer);
|
|
1359
|
+
}
|
|
1360
|
+
transform(value, ...args) {
|
|
1361
|
+
if (value) {
|
|
1362
|
+
value = value.replace(/<oembed url/ig, "<iframe src").replace(/oembed>/ig, "iframe>");
|
|
1363
|
+
value = value.replace(/<figure class="media"/ig, "<div").replace(/figure>/ig, "div>");
|
|
1364
|
+
}
|
|
1365
|
+
return this.sanitized.bypassSecurityTrustHtml(value);
|
|
1366
|
+
}
|
|
1367
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1368
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, isStandalone: true, name: "setCkeditorContent" }); }
|
|
1369
|
+
}
|
|
1370
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: SetCkeditorContentPipe, decorators: [{
|
|
1371
|
+
type: Pipe,
|
|
1372
|
+
args: [{
|
|
1373
|
+
name: 'setCkeditorContent',
|
|
1374
|
+
standalone: true
|
|
1375
|
+
}]
|
|
1376
|
+
}] });
|
|
1377
|
+
|
|
1313
1378
|
/*
|
|
1314
1379
|
* Public API Surface of ck-editor
|
|
1315
1380
|
*/
|
|
@@ -1318,5 +1383,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1318
1383
|
* Generated bundle index. Do not edit.
|
|
1319
1384
|
*/
|
|
1320
1385
|
|
|
1321
|
-
export { AddFieldControlGroup, CkEditorModule, CkEditorRoutingModule, CkEditorTypesObject, LanguagesMap, ckEditorFieldControlGroup, defaults, easy, full, getExcludeAssignControl, standard };
|
|
1386
|
+
export { AddFieldControlGroup, CkEditorModule, CkEditorRoutingModule, CkEditorTypesObject, LanguagesMap, SetCkeditorContentPipe, ckEditorFieldControlGroup, defaults, easy, full, getExcludeAssignControl, isBase64UploadAdapter, standard };
|
|
1322
1387
|
//# sourceMappingURL=dignite-ng-expand.ck-editor.mjs.map
|