croco-html 4.8.0 → 4.9.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 +156 -72
- package/fesm2022/croco-html.mjs.map +1 -1
- package/lib/components/editor/audio-editor/audio-editor.component.d.ts +7 -6
- package/lib/components/xml-tags/audio-player-tag-view/audio-player-tag-view.component.d.ts +11 -5
- package/lib/extensions/AudioMethods.d.ts +0 -1
- package/lib/index.d.ts +4 -4
- package/lib/models/audio-models.d.ts +0 -2
- package/lib/services/CommonFileInfoQueryService.d.ts +16 -0
- package/package.json +1 -1
|
@@ -3,20 +3,23 @@ import { HtmlBodyTag } from '../../../models/models';
|
|
|
3
3
|
import { PublicFilesQueryService } from '../../../services/PublicFilesQueryService';
|
|
4
4
|
import { PrivateFilesQueryService } from '../../../services/PrivateFilesQueryService';
|
|
5
5
|
import { CrocoHtmlFileOptionsService } from '../../../services/CrocoHtmlFileOptionsService';
|
|
6
|
+
import { CommonFileInfoQueryService } from '../../../services/CommonFileInfoQueryService';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export declare class AudioEditorComponent implements OnInit, OnDestroy {
|
|
8
9
|
private readonly _publicFileService;
|
|
9
10
|
private readonly _privateFileService;
|
|
10
11
|
private readonly _htmlSettingsService;
|
|
12
|
+
private readonly _commonFileInfoService;
|
|
11
13
|
hasAudioError: boolean;
|
|
14
|
+
errorMessage: string;
|
|
12
15
|
isPlaying: boolean;
|
|
13
16
|
isLoading: boolean;
|
|
14
17
|
currentTime: number;
|
|
15
18
|
duration: number;
|
|
16
19
|
volume: number;
|
|
17
20
|
isMuted: boolean;
|
|
21
|
+
audioSrc: string;
|
|
18
22
|
searchOrEdit: string;
|
|
19
|
-
fileName: string;
|
|
20
23
|
files: Array<{
|
|
21
24
|
fileId: string;
|
|
22
25
|
fileName: string;
|
|
@@ -27,18 +30,16 @@ export declare class AudioEditorComponent implements OnInit, OnDestroy {
|
|
|
27
30
|
audioPlayer: ElementRef<HTMLAudioElement>;
|
|
28
31
|
tag: HtmlBodyTag;
|
|
29
32
|
presentOrEdit: boolean;
|
|
30
|
-
constructor(_publicFileService: PublicFilesQueryService, _privateFileService: PrivateFilesQueryService, _htmlSettingsService: CrocoHtmlFileOptionsService);
|
|
33
|
+
constructor(_publicFileService: PublicFilesQueryService, _privateFileService: PrivateFilesQueryService, _htmlSettingsService: CrocoHtmlFileOptionsService, _commonFileInfoService: CommonFileInfoQueryService);
|
|
31
34
|
get fileId(): string;
|
|
32
35
|
set fileId(value: string);
|
|
33
|
-
get fileNameAttr(): string;
|
|
34
|
-
set fileNameAttr(value: string);
|
|
35
36
|
hasFileId(): boolean;
|
|
36
|
-
getSrc(): string;
|
|
37
37
|
private get audioElement();
|
|
38
38
|
onErrorHandler(): void;
|
|
39
39
|
removeAudioError(): void;
|
|
40
|
+
setError(message: string): void;
|
|
40
41
|
onFileIdChanged(fileId: string): void;
|
|
41
|
-
|
|
42
|
+
checkAndLoadAudioFile(): void;
|
|
42
43
|
loadAudioFile(): void;
|
|
43
44
|
onLoadedMetadata(): void;
|
|
44
45
|
onTimeUpdate(): void;
|
|
@@ -1,26 +1,29 @@
|
|
|
1
|
-
import { OnInit, OnDestroy, ElementRef } from '@angular/core';
|
|
1
|
+
import { OnInit, OnDestroy, ElementRef, OnChanges, SimpleChanges } from '@angular/core';
|
|
2
2
|
import { InterfaceBlock } from '../../../models/InterfaceBlock';
|
|
3
3
|
import { CrocoHtmlOptions } from '../../../options';
|
|
4
|
+
import { CommonFileInfoQueryService } from '../../../services/CommonFileInfoQueryService';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class AudioPlayerTagViewComponent implements OnInit, OnDestroy {
|
|
6
|
+
export declare class AudioPlayerTagViewComponent implements OnInit, OnDestroy, OnChanges {
|
|
6
7
|
private readonly _options;
|
|
8
|
+
private readonly _commonFileInfoService;
|
|
7
9
|
hasAudioError: boolean;
|
|
10
|
+
errorMessage: string;
|
|
8
11
|
isPlaying: boolean;
|
|
9
12
|
isLoading: boolean;
|
|
10
13
|
currentTime: number;
|
|
11
14
|
duration: number;
|
|
12
15
|
volume: number;
|
|
13
16
|
isMuted: boolean;
|
|
17
|
+
audioSrc: string;
|
|
14
18
|
private unsubscribe;
|
|
15
19
|
audioPlayer: ElementRef<HTMLAudioElement>;
|
|
16
20
|
data: InterfaceBlock;
|
|
17
|
-
constructor(_options: CrocoHtmlOptions);
|
|
21
|
+
constructor(_options: CrocoHtmlOptions, _commonFileInfoService: CommonFileInfoQueryService);
|
|
18
22
|
get fileId(): string;
|
|
19
|
-
get fileName(): string;
|
|
20
|
-
getSrc(): string;
|
|
21
23
|
private get audioElement();
|
|
22
24
|
hasFileId(): boolean;
|
|
23
25
|
onErrorHandler(): void;
|
|
26
|
+
setError(message: string): void;
|
|
24
27
|
onLoadedMetadata(): void;
|
|
25
28
|
onTimeUpdate(): void;
|
|
26
29
|
onEnded(): void;
|
|
@@ -35,7 +38,10 @@ export declare class AudioPlayerTagViewComponent implements OnInit, OnDestroy {
|
|
|
35
38
|
formatTime(seconds: number): string;
|
|
36
39
|
getProgress(): number;
|
|
37
40
|
ngOnInit(): void;
|
|
41
|
+
checkAndLoadAudioFile(): void;
|
|
42
|
+
loadAudioFile(): void;
|
|
38
43
|
ngOnDestroy(): void;
|
|
44
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
39
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<AudioPlayerTagViewComponent, never>;
|
|
40
46
|
static ɵcmp: i0.ɵɵComponentDeclaration<AudioPlayerTagViewComponent, "croco-html-audio-player-tag-view", never, { "data": { "alias": "data"; "required": true; }; }, {}, never, never, true, never>;
|
|
41
47
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export declare class FileAudioTagDataConsts {
|
|
2
2
|
static readonly TagName = "audio-player";
|
|
3
3
|
static readonly FileIdAttrName = "file-id";
|
|
4
|
-
static readonly FileNameAttrName = "file-name";
|
|
5
4
|
}
|
|
6
5
|
export declare class AudioMethods {
|
|
7
6
|
static buildUrl(fileId: string, fileName: string): string;
|
package/lib/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { MainEditorBlockComponent } from "./components";
|
|
|
3
3
|
import { MainEditorComponent } from "./components";
|
|
4
4
|
import { TextEditorComponent } from "./components";
|
|
5
5
|
import { FileIdSelectComponent } from "./components";
|
|
6
|
-
import { XmlTagHeaderInnerTextViewComponent } from "./components";
|
|
7
6
|
import { XmlTagHtmlViewComponent } from "./components";
|
|
7
|
+
import { XmlTagTextViewComponent } from "./components";
|
|
8
8
|
import { XmlTagViewComponent } from "./components";
|
|
9
9
|
import { CustomWidgetEditorComponent } from "./components";
|
|
10
10
|
import { VisualEditorComponent } from './components';
|
|
@@ -16,8 +16,8 @@ import { TagToSpanPipe, ToHtmlBodyTagsPipe, ToPreviewHtmlPipe, ToPreviewPipe } f
|
|
|
16
16
|
import { FileImageTagViewComponent, AudioPlayerTagViewComponent, UploadFilesBtnComponent } from "./components";
|
|
17
17
|
import { HtmlRawViewComponent } from "./components";
|
|
18
18
|
import { XmlTagCustomWidgetComponent } from "./components";
|
|
19
|
-
export declare const EditorComponents: (typeof
|
|
20
|
-
export declare const XmlComponents: (typeof AudioPlayerTagViewComponent | typeof
|
|
19
|
+
export declare const EditorComponents: (typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof FileIdSelectComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof MainEditorComponent)[];
|
|
20
|
+
export declare const XmlComponents: (typeof AudioPlayerTagViewComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent)[];
|
|
21
21
|
export declare const CrocoPipes: (typeof ToPreviewPipe | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
22
|
-
export declare const CrocoHtmlDeclarations: (typeof
|
|
22
|
+
export declare const CrocoHtmlDeclarations: (typeof AudioPlayerTagViewComponent | typeof XmlTagTextViewComponent | typeof HtmlRawViewComponent | typeof FileImageTagViewComponent | typeof XmlTagHtmlViewComponent | typeof XmlTagExternalVideoComponent | typeof XmlTagCustomWidgetComponent | typeof DefinedCustomTagViewComponent | typeof XmlTagViewComponent | typeof UploadFilesBtnComponent | typeof TextEditorComponent | typeof ImageEditorComponent | typeof HtmlRawEditorComponent | typeof CustomWidgetEditorComponent | typeof DefinedCustomEditorBlockComponent | typeof MainEditorBlockComponent | typeof AddFilesBtnComponent | typeof FileIdSelectComponent | typeof CustomWidgetIconComponent | typeof VisualEditorComponent | typeof ToPreviewPipe | typeof MainEditorComponent | typeof TagToSpanPipe | typeof ToHtmlBodyTagsPipe | typeof ToPreviewHtmlPipe)[];
|
|
23
23
|
export declare const MaterialModules: (typeof MatCardModule)[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from "@angular/common/http";
|
|
2
|
+
import { CommonFileInfoResultModel } from "./file-models";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CommonFileInfoQueryService {
|
|
5
|
+
private readonly _httpClient;
|
|
6
|
+
private readonly _baseControllerUrl;
|
|
7
|
+
constructor(_httpClient: HttpClient, baseUrl: string);
|
|
8
|
+
/**
|
|
9
|
+
* Получить информацию о файле на сервере по идентификатору.
|
|
10
|
+
* @param model
|
|
11
|
+
* @returns
|
|
12
|
+
*/
|
|
13
|
+
getInfo(id: string): import("rxjs").Observable<CommonFileInfoResultModel>;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CommonFileInfoQueryService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CommonFileInfoQueryService>;
|
|
16
|
+
}
|