@dignite-ng/expand.ck-editor 0.0.11 → 0.0.12
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 +18 -27
- package/esm2022/lib/dynamic-form/ck-editor/ckEditorUpload.mjs +9 -12
- package/esm2022/public-api.mjs +2 -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 +122 -79
- 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/package.json +1 -1
- package/public-api.d.ts +1 -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2tFZGl0b3JVcGxvYWQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jay1lZGl0b3Ivc3JjL2xpYi9keW5hbWljLWZvcm0vY2stZWRpdG9yL2NrRWRpdG9yVXBsb2FkLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxxQkFBcUI7SUFNaEMsWUFDRSxNQUFXLEVBQ1gsbUJBQXdCLEVBQ3hCLFdBQXdCO1FBUm5CLFdBQU0sR0FBRyxJQUFJLFVBQVUsRUFBRSxDQUFDO1FBSWpDLFdBQU0sR0FBWSxLQUFLLENBQUE7UUFrRHZCLGVBQVUsR0FBRyxDQUFDLEtBQVUsRUFBRSxNQUE2QixFQUFFLEVBQUUsQ0FDekQsSUFBSSxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQVc7WUFDakMsTUFBTSxFQUFFLE1BQU07WUFDZCxHQUFHLEVBQUUsMEJBQTBCO1lBQy9CLE1BQU0sRUF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gICAgICAgIHJlYWRlci5hZGRFdmVudExpc3RlbmVyKCdhYm9ydCcsICgpID0+IHtcclxuICAgICAgICAgIHJlamVjdCgpO1xyXG4gICAgICAgIH0pO1xyXG5cclxuICAgICAgICB0aGlzLmxvYWRlci5maWxlLnRoZW4oKGZpbGU6IEJsb2IpID0+IHtcclxuICAgICAgICAgIHJlYWRlci5yZWFkQXNEYXRhVVJMKGZpbGUpO1xyXG4gICAgICAgIH0pO1xyXG4gICAgICB9IGVsc2Uge1xyXG4gICAgICAgIHRoaXMubG9hZGVyLmZpbGUudGhlbigoZmlsZTogRmlsZSkgPT4ge1xyXG4gICAgICAgICAgdmFyIGZvcm1EYXRhID0gbmV3IEZvcm1EYXRhKCk7XHJcbiAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpbGUnLCBmaWxlLCBmaWxlLm5hbWUpO1xyXG4gICAgICAgICAgdGhpcy5jcmVhdGVGaWxlKHtcclxuICAgICAgICAgICAgZmlsZTogZm9ybURhdGEsXHJcbiAgICAgICAgICAgIGNvbnRhaW5lck5hbWU6IHRoaXMuSW1hZ2VzQ29udGFpbmVyTmFtZSxcclxuICAgICAgICAgICAgZGlyZWN0b3J5SWQ6ICcnLFxyXG4gICAgICAgICAgICBlbnRpdHlJZDogJydcclxuICAgICAgICAgIH0pLnN1YnNjcmliZSgocmVzcG9uc2U6YW55KT0+e1xyXG4gICAgICAgICAgICByZXNvbHZlKHsgZGVmYXVsdDogcmVzcG9uc2UudXJsIH0pXHJcbiAgICAgICAgICB9LChlcnJvcik9PntcclxuICAgICAgICAgICAgcmVqZWN0KGVycm9yKTtcclxuICAgICAgICAgIH0pXHJcbiAgICAgICAgfSk7XHJcbiAgICAgIH1cclxuXHJcbiAgICB9KTtcclxuICB9XHJcblxyXG4gIGNyZWF0ZUZpbGUgPSAoaW5wdXQ6IGFueSwgY29uZmlnPzogUGFydGlhbDxSZXN0LkNvbmZpZz4pID0+XHJcbiAgICB0aGlzLnJlc3RTZXJ2aWNlLnJlcXVlc3Q8YW55LCBhbnk+KHtcclxuICAgICAgbWV0aG9kOiAnUE9TVCcsXHJcbiAgICAgIHVybDogJy9hcGkvZmlsZS1leHBsb3Jlci9maWxlcycsXHJcbiAgICAgIHBhcmFtczogeyBjb250YWluZXJOYW1lOiBpbnB1dC5jb250YWluZXJOYW1lLCBjZWxsTmFtZTogaW5wdXQuY2VsbE5hbWUsIGRpcmVjdG9yeUlkOiBpbnB1dC5kaXJlY3RvcnlJZCwgZW50aXR5SWQ6IGlucHV0LmVudGl0eUlkIH0sXHJcbiAgICAgIGJvZHk6IGlucHV0LmZpbGUsXHJcbiAgICB9LFxyXG4gICAgICB7IGFwaU5hbWU6ICdGaWxlRXhwbG9yZXInLCAuLi5jb25maWcgfSk7XHJcblxyXG59Il19
|
package/esm2022/public-api.mjs
CHANGED
|
@@ -6,4 +6,5 @@ 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
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2NrLWVkaXRvci9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLHVDQUF1QyxDQUFDO0FBQ3RELGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYywrQkFBK0IsQ0FBQztBQUM5QyxjQUFjLGVBQWUsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qXG4gKiBQdWJsaWMgQVBJIFN1cmZhY2Ugb2YgY2stZWRpdG9yXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9saWIvY2stZWRpdG9yLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jay1lZGl0b3Itcm91dGluZy5tb2R1bGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZHluYW1pYy1mb3JtL2Zvcm0tY29udHJvbC1ncm91cCc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9lbnVtcy9sYW5ndWFnZXMtbWFwJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL29iamVjdC9jay1lZGl0b3Itb2JqZWN0JztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2FkYXB0ZXInO1xuIl19
|
|
@@ -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;;;;"}
|
|
@@ -941,17 +941,20 @@ var LanguagesMap;
|
|
|
941
941
|
})(LanguagesMap || (LanguagesMap = {}));
|
|
942
942
|
|
|
943
943
|
class CkEditorDomeComponent {
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
944
|
+
constructor() {
|
|
945
|
+
this.config = inject(ConfigStateService);
|
|
946
|
+
this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
|
|
947
|
+
// CkEditorTypesObject = CkEditorTypesObject
|
|
948
|
+
this.Editor = ClassicEditor;
|
|
949
|
+
this._config = {
|
|
950
|
+
plugins: [Bold, Essentials, Italic, Paragraph, Undo],
|
|
951
|
+
toolbar: ['undo', 'redo', '|', 'bold', 'italic']
|
|
952
|
+
};
|
|
953
|
+
this.configType = 'default';
|
|
954
|
+
this.editorValue = '<p>12233</p>';
|
|
955
|
+
this.languagesMap = LanguagesMap;
|
|
956
|
+
this._config_ck = CkEditorTypesObject['full'];
|
|
957
|
+
}
|
|
955
958
|
/**切换类型 */
|
|
956
959
|
switchType(type) {
|
|
957
960
|
this.configType = type;
|
|
@@ -977,9 +980,8 @@ class CkEditorDomeComponent {
|
|
|
977
980
|
const data = editor.getData();
|
|
978
981
|
this.editorValue = data;
|
|
979
982
|
}
|
|
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"] }] });
|
|
983
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
984
|
+
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
985
|
}
|
|
984
986
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorDomeComponent, decorators: [{
|
|
985
987
|
type: Component,
|
|
@@ -991,9 +993,9 @@ const routes = [{
|
|
|
991
993
|
component: CkEditorDomeComponent,
|
|
992
994
|
}];
|
|
993
995
|
class CkEditorRoutingModule {
|
|
994
|
-
static
|
|
995
|
-
static
|
|
996
|
-
static
|
|
996
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
997
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [i1$1.RouterModule], exports: [RouterModule] }); }
|
|
998
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] }); }
|
|
997
999
|
}
|
|
998
1000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorRoutingModule, decorators: [{
|
|
999
1001
|
type: NgModule,
|
|
@@ -1004,13 +1006,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1004
1006
|
}] });
|
|
1005
1007
|
|
|
1006
1008
|
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
1009
|
constructor(data) {
|
|
1010
|
+
/**文件容器名称 */
|
|
1011
|
+
// placeholder: any = new FormControl('', Validators.required);
|
|
1012
|
+
this['Ckeditor.ImagesContainerName'] = ['', []];
|
|
1013
|
+
/**多选 */
|
|
1014
|
+
// placeholder: any = new FormControl('', Validators.required);
|
|
1015
|
+
this['Ckeditor.InitialContent'] = ['', []];
|
|
1014
1016
|
if (data) {
|
|
1015
1017
|
for (const key in data) {
|
|
1016
1018
|
if (data.hasOwnProperty(key)) {
|
|
@@ -1022,20 +1024,13 @@ class CkEditorConfig {
|
|
|
1022
1024
|
}
|
|
1023
1025
|
|
|
1024
1026
|
class CkEditorConfigComponent {
|
|
1025
|
-
fb;
|
|
1026
1027
|
constructor(fb) {
|
|
1027
1028
|
this.fb = fb;
|
|
1028
1029
|
}
|
|
1029
|
-
/**表单实体 */
|
|
1030
|
-
Entity;
|
|
1031
|
-
/**选择的表单信息 */
|
|
1032
|
-
_selected;
|
|
1033
1030
|
set selected(v) {
|
|
1034
1031
|
this._selected = v || '';
|
|
1035
1032
|
this.dataLoaded();
|
|
1036
1033
|
}
|
|
1037
|
-
/**表单控件类型 */
|
|
1038
|
-
_type;
|
|
1039
1034
|
set type(v) {
|
|
1040
1035
|
this._type = v;
|
|
1041
1036
|
this.dataLoaded();
|
|
@@ -1043,7 +1038,6 @@ class CkEditorConfigComponent {
|
|
|
1043
1038
|
get formConfiguration() {
|
|
1044
1039
|
return this.Entity.get('formConfiguration');
|
|
1045
1040
|
}
|
|
1046
|
-
submitclick;
|
|
1047
1041
|
async dataLoaded() {
|
|
1048
1042
|
// if (this.Entity && (this._selected || this._selected === '')) {
|
|
1049
1043
|
if (this.Entity && this._type) {
|
|
@@ -1062,8 +1056,8 @@ class CkEditorConfigComponent {
|
|
|
1062
1056
|
resolve(true);
|
|
1063
1057
|
});
|
|
1064
1058
|
}
|
|
1065
|
-
static
|
|
1066
|
-
static
|
|
1059
|
+
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 }); }
|
|
1060
|
+
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
1061
|
}
|
|
1068
1062
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImport: i0, type: CkEditorConfigComponent, decorators: [{
|
|
1069
1063
|
type: Component,
|
|
@@ -1079,13 +1073,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1079
1073
|
args: ['submitclick', { static: true }]
|
|
1080
1074
|
}] } });
|
|
1081
1075
|
|
|
1082
|
-
class isBase64UploadAdapter {
|
|
1083
|
-
reader = new FileReader();
|
|
1084
|
-
restService;
|
|
1085
|
-
loader;
|
|
1086
|
-
ImagesContainerName;
|
|
1087
|
-
Base64 = false;
|
|
1076
|
+
let isBase64UploadAdapter$1 = class isBase64UploadAdapter {
|
|
1088
1077
|
constructor(loader, ImagesContainerName, restService) {
|
|
1078
|
+
this.reader = new FileReader();
|
|
1079
|
+
this.Base64 = false;
|
|
1080
|
+
this.createFile = (input, config) => this.restService.request({
|
|
1081
|
+
method: 'POST',
|
|
1082
|
+
url: '/api/file-explorer/files',
|
|
1083
|
+
params: { containerName: input.containerName, cellName: input.cellName, directoryId: input.directoryId, entityId: input.entityId },
|
|
1084
|
+
body: input.file,
|
|
1085
|
+
}, { apiName: 'FileExplorer', ...config });
|
|
1089
1086
|
this.loader = loader;
|
|
1090
1087
|
this.ImagesContainerName = ImagesContainerName;
|
|
1091
1088
|
this.restService = restService;
|
|
@@ -1125,65 +1122,53 @@ class isBase64UploadAdapter {
|
|
|
1125
1122
|
}
|
|
1126
1123
|
});
|
|
1127
1124
|
}
|
|
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
|
-
}
|
|
1125
|
+
};
|
|
1135
1126
|
|
|
1136
1127
|
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
1128
|
constructor() {
|
|
1129
|
+
this.config = inject(ConfigStateService);
|
|
1130
|
+
this._restService = inject(RestService);
|
|
1131
|
+
/**ck-Editor的值 */
|
|
1132
|
+
this.ckEditorValue = '';
|
|
1133
|
+
/**系统语言 */
|
|
1134
|
+
this.currentCulture = this.config.getOne('localization')?.currentCulture?.name;
|
|
1135
|
+
/** 语言目录,匹配系统语言,设置ckeditor的语言 */
|
|
1136
|
+
this.languagesMap = LanguagesMap;
|
|
1137
|
+
this.Editor = ClassicEditor;
|
|
1138
|
+
this.fb = inject(FormBuilder);
|
|
1139
|
+
/**字段配置列表 */
|
|
1140
|
+
this._fields = '';
|
|
1141
|
+
this.invalidfeedback = false;
|
|
1142
|
+
/**图片容器名称 */
|
|
1143
|
+
this.imagesContainerName = '';
|
|
1147
1144
|
this.loadckeditor();
|
|
1148
1145
|
}
|
|
1149
1146
|
onReady(editor) {
|
|
1150
1147
|
let _this = this;
|
|
1151
1148
|
editor.plugins.get('FileRepository').createUploadAdapter = function (loader) {
|
|
1152
|
-
return new isBase64UploadAdapter(loader, _this.imagesContainerName, _this._restService);
|
|
1149
|
+
return new isBase64UploadAdapter$1(loader, _this.imagesContainerName, _this._restService);
|
|
1153
1150
|
};
|
|
1154
1151
|
}
|
|
1155
|
-
/**ck-editor配置 */
|
|
1156
|
-
ckOptions;
|
|
1157
1152
|
/**富文本内容改变 */
|
|
1158
1153
|
ckEditorChange(event) {
|
|
1159
1154
|
this.setckeditorInput(event);
|
|
1160
1155
|
}
|
|
1161
|
-
fb = inject(FormBuilder);
|
|
1162
|
-
/**表单实体 */
|
|
1163
|
-
_entity;
|
|
1164
1156
|
set entity(v) {
|
|
1165
1157
|
this._entity = v;
|
|
1166
1158
|
this.dataLoaded();
|
|
1167
1159
|
}
|
|
1168
|
-
/**字段配置列表 */
|
|
1169
|
-
_fields = '';
|
|
1170
1160
|
set fields(v) {
|
|
1171
1161
|
this._fields = v;
|
|
1172
1162
|
this.dataLoaded();
|
|
1173
1163
|
}
|
|
1174
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1175
|
-
_parentFiledName;
|
|
1176
1164
|
set parentFiledName(v) {
|
|
1177
1165
|
this._parentFiledName = v;
|
|
1178
1166
|
this.dataLoaded();
|
|
1179
1167
|
}
|
|
1180
|
-
/**父级字段名称,用于为表单设置控件赋值 */
|
|
1181
|
-
_selected;
|
|
1182
1168
|
set selected(v) {
|
|
1183
1169
|
this._selected = v;
|
|
1184
1170
|
this.dataLoaded();
|
|
1185
1171
|
}
|
|
1186
|
-
submitclick;
|
|
1187
1172
|
get extraProperties() {
|
|
1188
1173
|
return this._entity.get('extraProperties');
|
|
1189
1174
|
}
|
|
@@ -1208,14 +1193,11 @@ class CkEditorControlComponent {
|
|
|
1208
1193
|
console.log(configs, 'configsconfigs');
|
|
1209
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,67 @@ 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
|
+
|
|
1313
1356
|
/*
|
|
1314
1357
|
* Public API Surface of ck-editor
|
|
1315
1358
|
*/
|
|
@@ -1318,5 +1361,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.5", ngImpor
|
|
|
1318
1361
|
* Generated bundle index. Do not edit.
|
|
1319
1362
|
*/
|
|
1320
1363
|
|
|
1321
|
-
export { AddFieldControlGroup, CkEditorModule, CkEditorRoutingModule, CkEditorTypesObject, LanguagesMap, ckEditorFieldControlGroup, defaults, easy, full, getExcludeAssignControl, standard };
|
|
1364
|
+
export { AddFieldControlGroup, CkEditorModule, CkEditorRoutingModule, CkEditorTypesObject, LanguagesMap, ckEditorFieldControlGroup, defaults, easy, full, getExcludeAssignControl, isBase64UploadAdapter, standard };
|
|
1322
1365
|
//# sourceMappingURL=dignite-ng-expand.ck-editor.mjs.map
|