croco-html 20.1.1 → 20.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/croco-html.mjs +140 -50
- package/fesm2022/croco-html.mjs.map +1 -1
- package/index.d.ts +47 -14
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -211,11 +211,11 @@ declare class ExternalVideoTagService implements IMarkUpTagService {
|
|
|
211
211
|
declare class HtmlRawTagDataConsts {
|
|
212
212
|
static readonly TagName = "html-raw";
|
|
213
213
|
}
|
|
214
|
-
interface
|
|
214
|
+
interface HtmlRawTag {
|
|
215
215
|
type: string;
|
|
216
|
-
data:
|
|
216
|
+
data: HtmlRawTagData;
|
|
217
217
|
}
|
|
218
|
-
interface
|
|
218
|
+
interface HtmlRawTagData {
|
|
219
219
|
innerHTML: string;
|
|
220
220
|
}
|
|
221
221
|
declare class HtmlRawTagService implements IMarkUpTagService {
|
|
@@ -303,6 +303,30 @@ declare class CustomWidgetTagService implements IMarkUpTagService {
|
|
|
303
303
|
};
|
|
304
304
|
}
|
|
305
305
|
|
|
306
|
+
declare class LinkTagConsts {
|
|
307
|
+
static readonly TagName = "croco-link";
|
|
308
|
+
}
|
|
309
|
+
declare class LinkTagAttrs {
|
|
310
|
+
static readonly FileId = "file-id";
|
|
311
|
+
static readonly Url = "url";
|
|
312
|
+
static readonly Title = "title";
|
|
313
|
+
static readonly Type = "type";
|
|
314
|
+
}
|
|
315
|
+
interface LinkTagData {
|
|
316
|
+
url: string;
|
|
317
|
+
title: string;
|
|
318
|
+
type: string;
|
|
319
|
+
fileId: string;
|
|
320
|
+
}
|
|
321
|
+
declare class LinkTagService implements IMarkUpTagService {
|
|
322
|
+
tagName: string;
|
|
323
|
+
shortDescription: string;
|
|
324
|
+
bodyTagToHtmlStringConverter(bodyTag: HtmlBodyTag): string;
|
|
325
|
+
extractBlockFromHtmlElement(elem: HTMLElement, _: CrocoHtmlOptions): InterfaceBlock;
|
|
326
|
+
toBodyTag(data: InterfaceBlock): HtmlBodyTag;
|
|
327
|
+
getDefaultValue(props: IVisualEditorProps): HtmlBodyTag;
|
|
328
|
+
}
|
|
329
|
+
|
|
306
330
|
interface CrocoHtmlOptions {
|
|
307
331
|
/**
|
|
308
332
|
* Опции для отображения изображений.
|
|
@@ -331,10 +355,16 @@ interface CrocoHtmlOptions {
|
|
|
331
355
|
[id: string]: IMarkUpTagService;
|
|
332
356
|
};
|
|
333
357
|
/**
|
|
334
|
-
* Рендеры для кастомных
|
|
358
|
+
* Рендеры для кастомных тегов внутри редактора.
|
|
359
|
+
*/
|
|
360
|
+
definedEditorViewRenderers: {
|
|
361
|
+
[id: string]: ITagEditorViewRender;
|
|
362
|
+
};
|
|
363
|
+
/**
|
|
364
|
+
* Рендеры для тегов внутри просмотра.
|
|
335
365
|
*/
|
|
336
|
-
|
|
337
|
-
[id: string]:
|
|
366
|
+
definedViewRenderers: {
|
|
367
|
+
[id: string]: ITagViewViewRender;
|
|
338
368
|
};
|
|
339
369
|
/**
|
|
340
370
|
* Обработчик нажатия на кнопку кастомных виджетов
|
|
@@ -346,7 +376,7 @@ interface CrocoHtmlOptions {
|
|
|
346
376
|
*/
|
|
347
377
|
editorCustomAddTagButtons?: TagItem[] | null | undefined;
|
|
348
378
|
}
|
|
349
|
-
interface
|
|
379
|
+
interface ITagEditorViewRender {
|
|
350
380
|
/**
|
|
351
381
|
* Компонент для визуального редактора croco-html-custom-widget-editor
|
|
352
382
|
* Должен содержать инпуты
|
|
@@ -357,6 +387,8 @@ interface ICustomTagViewRender {
|
|
|
357
387
|
* Иконка в визуальном редакторе croco-html-custom-widget-icon
|
|
358
388
|
*/
|
|
359
389
|
iconComponent?: Type<any>;
|
|
390
|
+
}
|
|
391
|
+
interface ITagViewViewRender {
|
|
360
392
|
/**
|
|
361
393
|
* Компонент для отрисовки на интерфейсе croco-html-defined-custom-tag-view.
|
|
362
394
|
* Должен содержать input({required: true}) data: InterfaceBlock
|
|
@@ -1177,21 +1209,22 @@ declare class XmlTagViewComponent {
|
|
|
1177
1209
|
isEditor: boolean;
|
|
1178
1210
|
constructor(_options: CrocoHtmlOptions);
|
|
1179
1211
|
isHeaderTextTag(item: InterfaceBlock): boolean;
|
|
1212
|
+
isViewDefined(item: InterfaceBlock): boolean;
|
|
1180
1213
|
isDefinedCustomTag(item: InterfaceBlock): boolean;
|
|
1181
1214
|
static ɵfac: i0.ɵɵFactoryDeclaration<XmlTagViewComponent, never>;
|
|
1182
1215
|
static ɵcmp: i0.ɵɵComponentDeclaration<XmlTagViewComponent, "croco-html-xml-tag-view", never, { "data": { "alias": "data"; "required": true; }; "dataController": { "alias": "dataController"; "required": true; }; "isEditor": { "alias": "isEditor"; "required": true; }; }, {}, never, never, true, never>;
|
|
1183
1216
|
}
|
|
1184
1217
|
|
|
1185
|
-
declare class HtmlRawViewComponent
|
|
1218
|
+
declare class HtmlRawViewComponent {
|
|
1186
1219
|
private readonly _sanitizer;
|
|
1187
1220
|
private readonly router;
|
|
1188
|
-
|
|
1189
|
-
|
|
1221
|
+
private readonly _cdr;
|
|
1222
|
+
set data(item: InterfaceBlock);
|
|
1223
|
+
safeHtml: SafeHtml | null;
|
|
1190
1224
|
constructor(_sanitizer: DomSanitizer, router: Router);
|
|
1191
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
1192
1225
|
handleLink(event: MouseEvent): void;
|
|
1193
1226
|
static ɵfac: i0.ɵɵFactoryDeclaration<HtmlRawViewComponent, never>;
|
|
1194
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawViewComponent, "croco-html-raw-view", never, { "
|
|
1227
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<HtmlRawViewComponent, "croco-html-raw-view", never, { "data": { "alias": "data"; "required": true; }; }, {}, never, never, true, never>;
|
|
1195
1228
|
}
|
|
1196
1229
|
|
|
1197
1230
|
declare class FileImageTagViewComponent implements OnInit, OnDestroy {
|
|
@@ -1348,5 +1381,5 @@ declare class CrocoHtmlModule {
|
|
|
1348
1381
|
|
|
1349
1382
|
declare const CrocoHtmlOptionsToken = "croco-html-options";
|
|
1350
1383
|
|
|
1351
|
-
export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
|
|
1352
|
-
export type { AngularMaterialTableData, BaseApiResponse, ButtonTag, ButtonTagData, CommonFileInfoResultModel, CrocoHtmlEditorFileOptions, CrocoHtmlImageOptions, CrocoHtmlOptions, CustomWidgetTag, CustomWidgetTagData, DownloadButtonTag, DownloadButtonTagData, ExternalVideoTag, ExternalVideoTagData,
|
|
1384
|
+
export { AddFilesBtnComponent, AngularMaterialTableMethods, AudioEditorComponent, AudioMethods, AudioPlayerTagViewComponent, BodyTagsExtensions, BootstrapTableMethods, ButtonTagDataConsts, ButtonTagService, CrocoHtmlFileOptionsService, CrocoHtmlModule, CrocoHtmlOptionsToken, CustomWidgetEditorComponent, CustomWidgetIconComponent, CustomWidgetTagDataConsts, CustomWidgetTagService, DefinedCustomEditorBlockComponent, DefinedCustomTagViewComponent, DownloadButtonTagDataConsts, DownloadButtonTagService, ExternalVideoEditorComponent, ExternalVideoPlayers, ExternalVideoSupportedTypes, ExternalVideoTagDataConsts, ExternalVideoTagService, FileAudioTagDataConsts, FileIdSelectComponent, FileImageTagDataConsts, FileImageTagService, FileImageTagViewComponent, FileType, HtmlPageDataController, HtmlRawEditorComponent, HtmlRawTagDataConsts, HtmlRawTagService, HtmlRawViewComponent, HtmlViewComponent, HtmlViewController, ImageEditorComponent, ImageMethods, LinkTagAttrs, LinkTagConsts, LinkTagService, MainEditorBlockComponent, MainEditorComponent, TableBuilder, TableMethods, TableTypes, TagEditorService, TagToSpanPipe, TextAlignment, TextEditorComponent, TextSimpleMethods, TextTag, TextTagDataConsts, TextTagHtmlMarkupTagService, TextTags, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe, UploadFilesBtnComponent, VisualEditorComponent, XmlExtensions, XmlTagCustomWidgetComponent, XmlTagExternalVideoComponent, XmlTagHeaderInnerTextViewComponent, XmlTagHeaderTextViewComponent, XmlTagHtmlViewComponent, XmlTagTextViewComponent, XmlTagViewComponent };
|
|
1385
|
+
export type { AngularMaterialTableData, BaseApiResponse, ButtonTag, ButtonTagData, CommonFileInfoResultModel, CrocoHtmlEditorFileOptions, CrocoHtmlImageOptions, CrocoHtmlOptions, CustomWidgetTag, CustomWidgetTagData, DownloadButtonTag, DownloadButtonTagData, ExternalVideoTag, ExternalVideoTagData, FileAudioTag, FileAudioTagData, FileImageTag, FileImageTagData, FileInfoModel, FilePostingStarted, FileRelationModel, FileSimpleModel, FileUnifiedModel, GenericTextTag, GetListResult, GetListSearchModel, HtmlBodyTag, HtmlRawTag, HtmlRawTagData, IHorizontalAlignmentExtractionResult, IImageMediaRequest, IMarkUpTagService, ITagEditorViewRender, ITagViewViewRender, IVisualEditorProps, ImageRestrictions, InterfaceBlock, LinkTagData, SearchFilesRequest, SearchQuestionsFormData, SimpleTextTagData, TableData, TableHeaderData, TableRowColumnData, TableRowData, TableTagData, TagItem };
|