@cuby-ui/core 0.0.394 → 0.0.395
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/components/file-icon/file-icon.component.d.ts +8 -0
- package/components/file-icon/file-icon.options.d.ts +12 -0
- package/components/file-icon/index.d.ts +1 -0
- package/components/index.d.ts +1 -0
- package/components/sidebar/sidebar-header/sidebar-header.component.d.ts +1 -1
- package/components/sidebar/sidebar-navigation-item/sidebar-navigation-item.component.d.ts +1 -1
- package/editor/components/editor-attaches-tool/editor-attaches-tool.component.d.ts +6 -34
- package/editor/config/index.d.ts +0 -1
- package/editor/index.d.ts +0 -1
- package/editor/interfaces/combined-block-adding-event.d.ts +3 -3
- package/editor/interfaces/combined-part-block-data.d.ts +2 -2
- package/editor/interfaces/full-block-data.d.ts +2 -2
- package/editor/interfaces/index.d.ts +1 -1
- package/editor/interfaces/main-editor-config.d.ts +2 -5
- package/editor/providers/editor-resource-url.provider.d.ts +2 -0
- package/editor/providers/editor.provider.d.ts +1 -1
- package/editor/providers/index.d.ts +2 -1
- package/editor/services/editor.service.d.ts +4 -4
- package/editor/services/index.d.ts +0 -2
- package/editor/tools/attaches.tool.d.ts +1 -0
- package/editor/widgets/editor-readonly/editor-readonly.component.d.ts +1 -1
- package/esm2022/components/file-icon/file-icon.component.mjs +21 -0
- package/esm2022/components/file-icon/file-icon.options.mjs +119 -0
- package/esm2022/components/file-icon/index.mjs +2 -0
- package/esm2022/components/index.mjs +2 -1
- package/esm2022/editor/components/editor-attaches-tool/editor-attaches-tool.component.mjs +18 -40
- package/esm2022/editor/components/editor-image-tool/editor-image-tool.component.mjs +3 -3
- package/esm2022/editor/components/editor-video-tool/editor-video-tool.component.mjs +3 -3
- package/esm2022/editor/config/index.mjs +1 -2
- package/esm2022/editor/editor.component.mjs +5 -4
- package/esm2022/editor/index.mjs +1 -2
- package/esm2022/editor/interfaces/combined-block-adding-event.mjs +1 -1
- package/esm2022/editor/interfaces/combined-part-block-data.mjs +1 -1
- package/esm2022/editor/interfaces/full-block-data.mjs +1 -1
- package/esm2022/editor/interfaces/index.mjs +1 -1
- package/esm2022/editor/interfaces/main-editor-config.mjs +1 -1
- package/esm2022/editor/providers/editor-resource-url.provider.mjs +5 -0
- package/esm2022/editor/providers/editor.provider.mjs +18 -4
- package/esm2022/editor/providers/index.mjs +3 -2
- package/esm2022/editor/services/editor.service.mjs +2 -2
- package/esm2022/editor/services/index.mjs +1 -3
- package/esm2022/editor/tools/attaches.tool.mjs +4 -1
- package/fesm2022/cuby-ui-core.mjs +233 -164
- package/fesm2022/cuby-ui-core.mjs.map +1 -1
- package/package.json +4 -4
- package/styles/fonts.scss +1 -1
- package/styles/theme.scss +1 -1
- package/styles/variables/fonts.scss +1 -1
- package/widgets/categories/components/category-item/category-item.component.d.ts +2 -2
- package/widgets/storage-list/components/storage-list-item/storage-list-item.component.d.ts +1 -1
- package/widgets/user-action-context-menu/activity-item/activity-item.component.d.ts +1 -1
- package/editor/config/editor.provider.d.ts +0 -2
- package/editor/services/jtext-api.options.d.ts +0 -20
- package/editor/services/jtext-api.service.d.ts +0 -23
- package/esm2022/editor/config/editor.provider.mjs +0 -19
- package/esm2022/editor/services/jtext-api.options.mjs +0 -2
- package/esm2022/editor/services/jtext-api.service.mjs +0 -50
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, ElementRef, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, booleanAttribute, computed, untracked, Pipe,
|
|
2
|
+
import { Component, ChangeDetectionStrategy, inject, Renderer2, input, model, effect, Directive, InjectionToken, Input, HostBinding, ChangeDetectorRef, ViewChild, EventEmitter, Output, NgModule, Injector, Injectable, SkipSelf, Optional, DestroyRef, NgZone, signal, TemplateRef, ContentChildren, ElementRef, HostListener, Self, INJECTOR, forwardRef, ViewContainerRef, booleanAttribute, computed, untracked, Pipe, viewChild, output, APP_INITIALIZER, makeEnvironmentProviders } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor,
|
|
4
|
+
import { CommonModule, DOCUMENT, NgForOf, NgIf, NgComponentOutlet, NgTemplateOutlet, NgFor, NgClass, Location, UpperCasePipe, AsyncPipe } from '@angular/common';
|
|
5
5
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
6
6
|
import { cuiIsIcon, CUI_ICONS } from '@cuby-ui/icons';
|
|
7
7
|
import * as i1$1 from '@cuby-ui/cdk';
|
|
@@ -9,7 +9,7 @@ import { cuiCreateToken, cuiCreateTokenFromFactory, CuiDestroyService, CuiFilter
|
|
|
9
9
|
import { BehaviorSubject, takeUntil, Observable, merge, distinctUntilChanged, startWith, map, finalize, switchMap, tap, catchError, throwError, of, from, filter, timer, Subject, delay, repeat, takeWhile, fromEvent, debounce, skip, take, forkJoin, throttleTime, concatMap, toArray, debounceTime, pairwise } from 'rxjs';
|
|
10
10
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
11
11
|
import { OAuthService, OAuthErrorEvent, OAuthSuccessEvent, OAuthInfoEvent, provideOAuthClient } from 'angular-oauth2-oidc';
|
|
12
|
-
import { CuiExchangeContextApiService, CuiTreeStructNavigatorApiService, CuiNodeChecklistApiService, CuiTreeStructApiService, CuiFrameApiService, UserCompanyApiService } from '@cuby-ui/api';
|
|
12
|
+
import { CuiExchangeContextApiService, CuiJTextApiService, CuiTreeStructNavigatorApiService, CuiNodeChecklistApiService, CuiTreeStructApiService, CuiFrameApiService, UserCompanyApiService } from '@cuby-ui/api';
|
|
13
13
|
import { trigger, transition, query, animateChild, style, animate, stagger } from '@angular/animations';
|
|
14
14
|
import * as i2 from '@taiga-ui/polymorpheus';
|
|
15
15
|
import { PolymorpheusOutlet, PolymorpheusTemplate, PolymorpheusComponent, injectContext } from '@taiga-ui/polymorpheus';
|
|
@@ -24,8 +24,8 @@ import Header from '@editorjs/header';
|
|
|
24
24
|
import List from '@editorjs/list';
|
|
25
25
|
import * as i4 from '@jsverse/transloco';
|
|
26
26
|
import { TranslocoDirective, TranslocoService, TranslocoModule } from '@jsverse/transloco';
|
|
27
|
-
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
|
|
28
27
|
import { createCustomElement } from '@angular/elements';
|
|
28
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
29
29
|
import { Router } from '@angular/router';
|
|
30
30
|
|
|
31
31
|
class CuiAccordionComponent {
|
|
@@ -3968,6 +3968,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
3968
3968
|
}]
|
|
3969
3969
|
}] });
|
|
3970
3970
|
|
|
3971
|
+
const EXTENSION_GROUP_COLOR = {
|
|
3972
|
+
model: 'var(--cui-light-green-500)',
|
|
3973
|
+
doc: 'var(--cui-light-blue-500)',
|
|
3974
|
+
image: 'var(--cui-yellow-400)',
|
|
3975
|
+
sheet: 'var(--cui-green-600)',
|
|
3976
|
+
presentations: 'var(--cui-green-600)',
|
|
3977
|
+
video: 'var(--cui-light-green-500)',
|
|
3978
|
+
audio: 'var(--cui-lavender-400)',
|
|
3979
|
+
archive: 'var(--cui-orange-600)',
|
|
3980
|
+
geo: 'var(--cui-magenta-400)'
|
|
3981
|
+
};
|
|
3982
|
+
const EXTENSION_TO_GROUP = {
|
|
3983
|
+
// 3D Model formats - var(--cui-light-green-500)
|
|
3984
|
+
dae: 'model',
|
|
3985
|
+
fbx: 'model',
|
|
3986
|
+
glb: 'model',
|
|
3987
|
+
gltf: 'model',
|
|
3988
|
+
mtl: 'model',
|
|
3989
|
+
obj: 'model',
|
|
3990
|
+
ply: 'model',
|
|
3991
|
+
step: 'model',
|
|
3992
|
+
stl: 'model',
|
|
3993
|
+
usd: 'model',
|
|
3994
|
+
usda: 'model',
|
|
3995
|
+
usdc: 'model',
|
|
3996
|
+
usdz: 'model',
|
|
3997
|
+
// Document formats - var(--cui-light-blue-500)
|
|
3998
|
+
azw: 'doc',
|
|
3999
|
+
doc: 'doc',
|
|
4000
|
+
docx: 'doc',
|
|
4001
|
+
epub: 'doc',
|
|
4002
|
+
mobi: 'doc',
|
|
4003
|
+
odt: 'doc',
|
|
4004
|
+
pdf: 'doc',
|
|
4005
|
+
ps: 'doc',
|
|
4006
|
+
rtf: 'doc',
|
|
4007
|
+
txt: 'doc',
|
|
4008
|
+
w: 'doc',
|
|
4009
|
+
// Spreadsheet formats - var(--cui-green-600)
|
|
4010
|
+
ods: 'sheet',
|
|
4011
|
+
x: 'sheet',
|
|
4012
|
+
xls: 'sheet',
|
|
4013
|
+
xlsx: 'sheet',
|
|
4014
|
+
// Presentation formats - var(--cui-green-600)
|
|
4015
|
+
odp: 'presentations',
|
|
4016
|
+
p: 'presentations',
|
|
4017
|
+
pt: 'presentations',
|
|
4018
|
+
ppt: 'presentations',
|
|
4019
|
+
pptx: 'presentations',
|
|
4020
|
+
sldx: 'presentations',
|
|
4021
|
+
// Video formats - var(--cui-light-green-500)
|
|
4022
|
+
'3g2': 'video',
|
|
4023
|
+
'3gp': 'video',
|
|
4024
|
+
avi: 'video',
|
|
4025
|
+
flv: 'video',
|
|
4026
|
+
m4v: 'video',
|
|
4027
|
+
mkv: 'video',
|
|
4028
|
+
mov: 'video',
|
|
4029
|
+
mp4: 'video',
|
|
4030
|
+
mpg: 'video',
|
|
4031
|
+
pr: 'video',
|
|
4032
|
+
rm: 'video',
|
|
4033
|
+
rmvb: 'video',
|
|
4034
|
+
vob: 'video',
|
|
4035
|
+
webm: 'video',
|
|
4036
|
+
wmv: 'video',
|
|
4037
|
+
// Audio formats - var(--cui-lavender-400)
|
|
4038
|
+
aac: 'audio',
|
|
4039
|
+
aif: 'audio',
|
|
4040
|
+
aiff: 'audio',
|
|
4041
|
+
alac: 'audio',
|
|
4042
|
+
amr: 'audio',
|
|
4043
|
+
au: 'audio',
|
|
4044
|
+
dsd: 'audio',
|
|
4045
|
+
flac: 'audio',
|
|
4046
|
+
m4a: 'audio',
|
|
4047
|
+
mp3: 'audio',
|
|
4048
|
+
ogg: 'audio',
|
|
4049
|
+
opus: 'audio',
|
|
4050
|
+
pcm: 'audio',
|
|
4051
|
+
wav: 'audio',
|
|
4052
|
+
wma: 'audio',
|
|
4053
|
+
// Archive formats - var(--cui-orange-600)
|
|
4054
|
+
'7z': 'archive',
|
|
4055
|
+
arj: 'archive',
|
|
4056
|
+
gz: 'archive',
|
|
4057
|
+
rar: 'archive',
|
|
4058
|
+
sfx: 'archive',
|
|
4059
|
+
tar: 'archive',
|
|
4060
|
+
zip: 'archive',
|
|
4061
|
+
// Geographic Data formats - var(--cui-magenta-400)
|
|
4062
|
+
geojson: 'geo',
|
|
4063
|
+
gpx: 'geo',
|
|
4064
|
+
kml: 'geo',
|
|
4065
|
+
kmz: 'geo',
|
|
4066
|
+
shp: 'geo',
|
|
4067
|
+
// Image formats - var(--cui-yellow-400)
|
|
4068
|
+
arw: 'image',
|
|
4069
|
+
bmp: 'image',
|
|
4070
|
+
cr2: 'image',
|
|
4071
|
+
dng: 'image',
|
|
4072
|
+
gif: 'image',
|
|
4073
|
+
ico: 'image',
|
|
4074
|
+
jpeg: 'image',
|
|
4075
|
+
jpg: 'image',
|
|
4076
|
+
nef: 'image',
|
|
4077
|
+
orf: 'image',
|
|
4078
|
+
pef: 'image',
|
|
4079
|
+
png: 'image',
|
|
4080
|
+
raf: 'image',
|
|
4081
|
+
raw: 'image',
|
|
4082
|
+
svg: 'image',
|
|
4083
|
+
tga: 'image',
|
|
4084
|
+
tif: 'image',
|
|
4085
|
+
tiff: 'image',
|
|
4086
|
+
webp: 'image',
|
|
4087
|
+
xcf: 'image'
|
|
4088
|
+
};
|
|
4089
|
+
|
|
4090
|
+
class CuiFileIconComponent {
|
|
4091
|
+
constructor() {
|
|
4092
|
+
this.color = computed(() => this.getColorByExtension(this.extension()));
|
|
4093
|
+
this.extension = input.required();
|
|
4094
|
+
}
|
|
4095
|
+
getColorByExtension(extension) {
|
|
4096
|
+
return EXTENSION_GROUP_COLOR[EXTENSION_TO_GROUP[extension]];
|
|
4097
|
+
}
|
|
4098
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiFileIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4099
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: CuiFileIconComponent, isStandalone: true, selector: "cui-file-icon", inputs: { extension: { classPropertyName: "extension", publicName: "extension", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@if (color(); as color) {\n <cui-svg\n icon=\"cuiIconBoldFileDefaultSm\"\n [color]=\"color\"\n class=\"icon\"\n ></cui-svg>\n\n <div class=\"extension\">{{ extension() }}</div>\n}\n", styles: [":host{position:relative;display:inline-block}.extension{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:absolute;bottom:4px;left:5px;font-family:var(--cui-nunito-italic-font);font-weight:800;font-style:italic;font-size:5px;line-height:1;max-width:15px;text-transform:uppercase}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4100
|
+
}
|
|
4101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiFileIconComponent, decorators: [{
|
|
4102
|
+
type: Component,
|
|
4103
|
+
args: [{ selector: 'cui-file-icon', imports: [CuiSvgModule], standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (color(); as color) {\n <cui-svg\n icon=\"cuiIconBoldFileDefaultSm\"\n [color]=\"color\"\n class=\"icon\"\n ></cui-svg>\n\n <div class=\"extension\">{{ extension() }}</div>\n}\n", styles: [":host{position:relative;display:inline-block}.extension{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:absolute;bottom:4px;left:5px;font-family:var(--cui-nunito-italic-font);font-weight:800;font-style:italic;font-size:5px;line-height:1;max-width:15px;text-transform:uppercase}\n"] }]
|
|
4104
|
+
}] });
|
|
4105
|
+
|
|
3971
4106
|
const COMBINED_TEXT_BLOCK_PART = 'combined-text-block-part';
|
|
3972
4107
|
const COMBINED_TEXT_BLOCK = 'combined-text-block';
|
|
3973
4108
|
const COMBINED_TEXT_BLOCK_NAME = 'paragraph';
|
|
@@ -4189,53 +4324,6 @@ function generateId() {
|
|
|
4189
4324
|
return '_' + Math.random().toString(36).substring(2, 9);
|
|
4190
4325
|
}
|
|
4191
4326
|
|
|
4192
|
-
class CuiJTextApiService {
|
|
4193
|
-
constructor() {
|
|
4194
|
-
this.httpClient = inject(HttpClient);
|
|
4195
|
-
this.GET_BLOCK_DEFAULT_SIZE = 40;
|
|
4196
|
-
this.JTEXT_URL = 'framer/jtext';
|
|
4197
|
-
this.BLOCK_URL = 'block';
|
|
4198
|
-
this.BLOCKS_URL = 'blocks';
|
|
4199
|
-
this.JTEXT_BLOCK_URL = this.JTEXT_URL + '/' + this.BLOCK_URL;
|
|
4200
|
-
this.JTEXT_BLOCKS_URL = this.JTEXT_URL + '/' + this.BLOCKS_URL;
|
|
4201
|
-
this.options = {};
|
|
4202
|
-
}
|
|
4203
|
-
addOptions(options) {
|
|
4204
|
-
this.options = options ?? {};
|
|
4205
|
-
}
|
|
4206
|
-
createBlock(body) {
|
|
4207
|
-
return this.httpClient.post(this.JTEXT_BLOCK_URL, body, this.options);
|
|
4208
|
-
}
|
|
4209
|
-
updateBlock(body) {
|
|
4210
|
-
return this.httpClient.patch(this.JTEXT_BLOCK_URL, body, this.options);
|
|
4211
|
-
}
|
|
4212
|
-
getBlocks(fragmentId, page = 0, sizeBlock = this.GET_BLOCK_DEFAULT_SIZE) {
|
|
4213
|
-
return this.httpClient.get(`${this.JTEXT_URL}/${fragmentId}`, {
|
|
4214
|
-
params: { page, sizeBlock },
|
|
4215
|
-
headers: { 'Content-Type': 'application/x-ndjson' },
|
|
4216
|
-
observe: 'events',
|
|
4217
|
-
...this.options
|
|
4218
|
-
});
|
|
4219
|
-
}
|
|
4220
|
-
createBlocks(body) {
|
|
4221
|
-
return this.httpClient.post(this.JTEXT_BLOCKS_URL, body, this.options);
|
|
4222
|
-
}
|
|
4223
|
-
deleteBlock(containerId, blockId) {
|
|
4224
|
-
return this.httpClient.delete(`${this.JTEXT_URL}/${containerId}/${this.BLOCK_URL}/${blockId}`, this.options);
|
|
4225
|
-
}
|
|
4226
|
-
deleteBlocks(containerId, blocksIds) {
|
|
4227
|
-
return this.httpClient.delete(`${this.JTEXT_URL}/${containerId}/${this.BLOCKS_URL}`, {
|
|
4228
|
-
params: { blocksIds },
|
|
4229
|
-
...this.options
|
|
4230
|
-
});
|
|
4231
|
-
}
|
|
4232
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiJTextApiService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4233
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiJTextApiService }); }
|
|
4234
|
-
}
|
|
4235
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiJTextApiService, decorators: [{
|
|
4236
|
-
type: Injectable
|
|
4237
|
-
}] });
|
|
4238
|
-
|
|
4239
4327
|
class CuiEditorService {
|
|
4240
4328
|
constructor() {
|
|
4241
4329
|
this.destroyRef = inject(DestroyRef);
|
|
@@ -5048,6 +5136,29 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5048
5136
|
|
|
5049
5137
|
const EDITOR_TOOLTIP_SELECTOR = 'cc-editor-tooltip';
|
|
5050
5138
|
|
|
5139
|
+
class FileSizePipe {
|
|
5140
|
+
constructor() {
|
|
5141
|
+
this.SIZES = ['Bytes', 'KB', 'MB', 'GB'];
|
|
5142
|
+
this.BYTES_IN_KILOBYTE = 1024;
|
|
5143
|
+
}
|
|
5144
|
+
transform(bytes) {
|
|
5145
|
+
if (isNaN(bytes) || bytes === 0) {
|
|
5146
|
+
return '0 Bytes';
|
|
5147
|
+
}
|
|
5148
|
+
const index = Math.floor(Math.log(bytes) / Math.log(this.BYTES_IN_KILOBYTE));
|
|
5149
|
+
return `${parseFloat((bytes / Math.pow(this.BYTES_IN_KILOBYTE, index)).toFixed(1))} ${this.SIZES[index]}`;
|
|
5150
|
+
}
|
|
5151
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5152
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, isStandalone: true, name: "fileSize" }); }
|
|
5153
|
+
}
|
|
5154
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, decorators: [{
|
|
5155
|
+
type: Pipe,
|
|
5156
|
+
args: [{
|
|
5157
|
+
name: 'fileSize',
|
|
5158
|
+
standalone: true
|
|
5159
|
+
}]
|
|
5160
|
+
}] });
|
|
5161
|
+
|
|
5051
5162
|
class EditorToolComponent {
|
|
5052
5163
|
constructor() {
|
|
5053
5164
|
this.window = inject(CUI_WINDOW);
|
|
@@ -5118,67 +5229,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
5118
5229
|
type: Output
|
|
5119
5230
|
}] } });
|
|
5120
5231
|
|
|
5121
|
-
class FileSizePipe {
|
|
5122
|
-
constructor() {
|
|
5123
|
-
this.SIZES = ['Bytes', 'KB', 'MB', 'GB'];
|
|
5124
|
-
this.BYTES_IN_KILOBYTE = 1024;
|
|
5125
|
-
}
|
|
5126
|
-
transform(bytes) {
|
|
5127
|
-
if (isNaN(bytes) || bytes === 0) {
|
|
5128
|
-
return '0 Bytes';
|
|
5129
|
-
}
|
|
5130
|
-
const index = Math.floor(Math.log(bytes) / Math.log(this.BYTES_IN_KILOBYTE));
|
|
5131
|
-
return `${parseFloat((bytes / Math.pow(this.BYTES_IN_KILOBYTE, index)).toFixed(1))} ${this.SIZES[index]}`;
|
|
5132
|
-
}
|
|
5133
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
5134
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, isStandalone: true, name: "fileSize" }); }
|
|
5135
|
-
}
|
|
5136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: FileSizePipe, decorators: [{
|
|
5137
|
-
type: Pipe,
|
|
5138
|
-
args: [{
|
|
5139
|
-
name: 'fileSize',
|
|
5140
|
-
standalone: true
|
|
5141
|
-
}]
|
|
5142
|
-
}] });
|
|
5143
|
-
|
|
5144
5232
|
class EditorAttachesToolComponent extends EditorToolComponent {
|
|
5145
5233
|
constructor() {
|
|
5146
5234
|
super(...arguments);
|
|
5147
|
-
this.Extensions = {
|
|
5148
|
-
doc: '#1483E9',
|
|
5149
|
-
docx: '#1483E9',
|
|
5150
|
-
odt: '#1483E9',
|
|
5151
|
-
pdf: '#DB2F2F',
|
|
5152
|
-
rtf: '#744FDC',
|
|
5153
|
-
tex: '#5a5a5b',
|
|
5154
|
-
txt: '#5a5a5b',
|
|
5155
|
-
pptx: '#E35200',
|
|
5156
|
-
ppt: '#E35200',
|
|
5157
|
-
mp3: '#eab456',
|
|
5158
|
-
mp4: '#f676a6',
|
|
5159
|
-
xls: '#11AE3D',
|
|
5160
|
-
html: '#2988f0',
|
|
5161
|
-
htm: '#2988f0',
|
|
5162
|
-
png: '#AA2284',
|
|
5163
|
-
jpg: '#D13359',
|
|
5164
|
-
jpeg: '#D13359',
|
|
5165
|
-
gif: '#f6af76',
|
|
5166
|
-
zip: '#4f566f',
|
|
5167
|
-
rar: '#4f566f',
|
|
5168
|
-
exe: '#e26f6f',
|
|
5169
|
-
svg: '#bf5252',
|
|
5170
|
-
key: '#00B2FF',
|
|
5171
|
-
sketch: '#FFC700',
|
|
5172
|
-
ai: '#FB601D',
|
|
5173
|
-
psd: '#388ae5',
|
|
5174
|
-
dmg: '#e26f6f',
|
|
5175
|
-
json: '#2988f0',
|
|
5176
|
-
csv: '#11AE3D'
|
|
5177
|
-
};
|
|
5178
5235
|
this.fileClicked = new EventEmitter();
|
|
5179
5236
|
}
|
|
5180
|
-
get
|
|
5181
|
-
return this.
|
|
5237
|
+
get file() {
|
|
5238
|
+
return this._file;
|
|
5239
|
+
}
|
|
5240
|
+
set file(value) {
|
|
5241
|
+
this._file = value;
|
|
5242
|
+
}
|
|
5243
|
+
get title() {
|
|
5244
|
+
return this._title;
|
|
5245
|
+
}
|
|
5246
|
+
set title(value) {
|
|
5247
|
+
this._title = value;
|
|
5182
5248
|
}
|
|
5183
5249
|
get isShowLoadButton() {
|
|
5184
5250
|
return !this.file && !this.isCaptionShown && !this.isLoading;
|
|
@@ -5197,13 +5263,13 @@ class EditorAttachesToolComponent extends EditorToolComponent {
|
|
|
5197
5263
|
return event.key !== 'Enter';
|
|
5198
5264
|
}
|
|
5199
5265
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAttachesToolComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5200
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorAttachesToolComponent, isStandalone: true, selector: "ng-component", inputs: { file: "file", title: "title" }, outputs: { fileClicked: "fileClicked" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <div\r\n *ngIf=\"file; else buttonTemplate\"\r\n class=\"file\"\r\n >\r\n <
|
|
5266
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorAttachesToolComponent, isStandalone: true, selector: "ng-component", inputs: { file: "file", title: "title" }, outputs: { fileClicked: "fileClicked" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <div\r\n *ngIf=\"file; else buttonTemplate\"\r\n class=\"file\"\r\n >\r\n <cui-file-icon\r\n *ngIf=\"file.extension\"\r\n [extension]=\"file.extension\"\r\n ></cui-file-icon>\r\n\r\n <div class=\"info\">\r\n <div\r\n class=\"title\"\r\n attr.data-placeholder=\"{{ t('FILE_TITLE') }}...\"\r\n [innerHTML]=\"title\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n ></div>\r\n <div\r\n *ngIf=\"file.size; let size\"\r\n class=\"size\"\r\n >\r\n {{ size | fileSize }}\r\n </div>\r\n </div>\r\n <a\r\n class=\"download\"\r\n (click)=\"onFileClick()\"\r\n >\r\n <cui-svg\r\n icon=\"cuiIconChevronRightSm\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n </a>\r\n </div>\r\n <ng-template #buttonTemplate>\r\n <button\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n type=\"button\"\r\n >\r\n <cui-svg icon=\"cuiIconPaperclipSm\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:4px;padding-bottom:4px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host._hidden{display:none}:host ::ng-deep .icon path{stroke:none}.file{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:4px 12px;border-radius:8px;border:1px solid var(--cui-base-200);background-color:var(--cui-base-10)}.info{display:flex;flex-direction:column;gap:2px;flex-grow:1;width:0;word-wrap:break-word}.extension{display:flex;align-items:flex-end;padding:6px 2px;font-weight:500;font-size:12px;line-height:14px;border-radius:8px;width:35px;height:35px;color:var(--cui-gray-0)}.size{font-weight:400;font-size:13px;line-height:16px;color:var(--cui-base-500)}.download{padding:6px;flex-shrink:0;margin-left:auto;border-radius:8px;color:var(--cui-base-0)}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:50px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.preloader{width:30px;height:30px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader:after{content:\"\";position:absolute;z-index:3;width:30px;height:30px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-15px;margin-left:-15px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.title{font-weight:400;font-size:14px;line-height:20px;outline:none}.title[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"], dependencies: [{ kind: "pipe", type: FileSizePipe, name: "fileSize" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }, { kind: "component", type: CuiFileIconComponent, selector: "cui-file-icon", inputs: ["extension"] }, { kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5201
5267
|
}
|
|
5202
5268
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorAttachesToolComponent, decorators: [{
|
|
5203
5269
|
type: Component,
|
|
5204
|
-
args: [{ standalone: true, imports: [
|
|
5270
|
+
args: [{ standalone: true, imports: [FileSizePipe, FormsModule, NgIf, TranslocoDirective, CuiFileIconComponent, CuiSvgModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5205
5271
|
'[class._hidden]': 'isShowLoadButton'
|
|
5206
|
-
}, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <div\r\n *ngIf=\"file; else buttonTemplate\"\r\n class=\"file\"\r\n >\r\n <
|
|
5272
|
+
}, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <div\r\n *ngIf=\"file; else buttonTemplate\"\r\n class=\"file\"\r\n >\r\n <cui-file-icon\r\n *ngIf=\"file.extension\"\r\n [extension]=\"file.extension\"\r\n ></cui-file-icon>\r\n\r\n <div class=\"info\">\r\n <div\r\n class=\"title\"\r\n attr.data-placeholder=\"{{ t('FILE_TITLE') }}...\"\r\n [innerHTML]=\"title\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n ></div>\r\n <div\r\n *ngIf=\"file.size; let size\"\r\n class=\"size\"\r\n >\r\n {{ size | fileSize }}\r\n </div>\r\n </div>\r\n <a\r\n class=\"download\"\r\n (click)=\"onFileClick()\"\r\n >\r\n <cui-svg\r\n icon=\"cuiIconChevronRightSm\"\r\n color=\"var(--cui-base-500)\"\r\n />\r\n </a>\r\n </div>\r\n <ng-template #buttonTemplate>\r\n <button\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n type=\"button\"\r\n >\r\n <cui-svg icon=\"cuiIconPaperclipSm\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\"></div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:4px;padding-bottom:4px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host._hidden{display:none}:host ::ng-deep .icon path{stroke:none}.file{display:flex;gap:8px;align-items:center;justify-content:space-between;padding:4px 12px;border-radius:8px;border:1px solid var(--cui-base-200);background-color:var(--cui-base-10)}.info{display:flex;flex-direction:column;gap:2px;flex-grow:1;width:0;word-wrap:break-word}.extension{display:flex;align-items:flex-end;padding:6px 2px;font-weight:500;font-size:12px;line-height:14px;border-radius:8px;width:35px;height:35px;color:var(--cui-gray-0)}.size{font-weight:400;font-size:13px;line-height:16px;color:var(--cui-base-500)}.download{padding:6px;flex-shrink:0;margin-left:auto;border-radius:8px;color:var(--cui-base-0)}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:50px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.preloader{width:30px;height:30px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader:after{content:\"\";position:absolute;z-index:3;width:30px;height:30px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-15px;margin-left:-15px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.title{font-weight:400;font-size:14px;line-height:20px;outline:none}.title[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"] }]
|
|
5207
5273
|
}], propDecorators: { file: [{
|
|
5208
5274
|
type: Input,
|
|
5209
5275
|
args: [{ required: true }]
|
|
@@ -5238,13 +5304,13 @@ class EditorImageToolComponent extends EditorToolComponent {
|
|
|
5238
5304
|
return (event.key !== 'Backspace' && event.key !== 'Enter') || event.shiftKey;
|
|
5239
5305
|
}
|
|
5240
5306
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorImageToolComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5241
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorImageToolComponent, isStandalone: true, selector: "ng-component", inputs: { image: "image", tunes: "tunes" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"image; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [ngClass]=\"tunesSignal()\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <img\r\n class=\"image\"\r\n [src]=\"image\"\r\n alt=\"Image\"\r\n />\r\n </div>\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #buttonTemplate>\r\n <button\r\n #button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M12.5013 4.1665H7.5013C5.66035 4.1665 4.16797 5.65889 4.16797 7.49984V12.4998C4.16797 14.3408 5.66035 15.8332 7.5013 15.8332H12.5013C14.3423 15.8332 15.8346 14.3408 15.8346 12.4998V7.49984C15.8346 5.65889 14.3423 4.1665 12.5013 4.1665Z\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M4.28125 12.7665L7.24033 9.63825C7.52263 9.33617 7.90546 9.1665 8.30463 9.1665C8.70377 9.1665 9.0866 9.33617 9.36893 9.63825L12.8208 13.3332M11.3154 11.7218L12.5092 10.444C12.7914 10.1419 13.1743 9.97217 13.5734 9.97217C13.9726 9.97217 14.3554 10.1419 14.6378 10.444L15.699 11.636\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path\r\n d=\"M11.4805 7.77783H11.4879\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:6px;padding-bottom:6px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.image{display:block;max-width:100%;width:fit-content;height:250px}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border:1px solid var(--cui-base-200);
|
|
5307
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorImageToolComponent, isStandalone: true, selector: "ng-component", inputs: { image: "image", tunes: "tunes" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"image; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [ngClass]=\"tunesSignal()\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <img\r\n class=\"image\"\r\n [src]=\"image\"\r\n alt=\"Image\"\r\n />\r\n </div>\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #buttonTemplate>\r\n <button\r\n #button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M12.5013 4.1665H7.5013C5.66035 4.1665 4.16797 5.65889 4.16797 7.49984V12.4998C4.16797 14.3408 5.66035 15.8332 7.5013 15.8332H12.5013C14.3423 15.8332 15.8346 14.3408 15.8346 12.4998V7.49984C15.8346 5.65889 14.3423 4.1665 12.5013 4.1665Z\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M4.28125 12.7665L7.24033 9.63825C7.52263 9.33617 7.90546 9.1665 8.30463 9.1665C8.70377 9.1665 9.0866 9.33617 9.36893 9.63825L12.8208 13.3332M11.3154 11.7218L12.5092 10.444C12.7914 10.1419 13.1743 9.97217 13.5734 9.97217C13.9726 9.97217 14.3554 10.1419 14.6378 10.444L15.699 11.636\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path\r\n d=\"M11.4805 7.77783H11.4879\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:6px;padding-bottom:6px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.image{display:block;max-width:100%;width:fit-content;height:250px}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:200px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.wrapper.stretched .image{width:100%;height:auto}.wrapper.center .image{margin:auto}.preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--cui-base-200);background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader__image{width:50px;height:50px;border-radius:50%}.preloader:after{content:\"\";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.caption{border-radius:8px}.caption[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5242
5308
|
}
|
|
5243
5309
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorImageToolComponent, decorators: [{
|
|
5244
5310
|
type: Component,
|
|
5245
5311
|
args: [{ standalone: true, imports: [CuiSvgModule, FormsModule, NgClass, NgIf, TranslocoDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5246
5312
|
'[class._hidden]': 'isShowLoadButton'
|
|
5247
|
-
}, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"image; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [ngClass]=\"tunesSignal()\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <img\r\n class=\"image\"\r\n [src]=\"image\"\r\n alt=\"Image\"\r\n />\r\n </div>\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #buttonTemplate>\r\n <button\r\n #button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M12.5013 4.1665H7.5013C5.66035 4.1665 4.16797 5.65889 4.16797 7.49984V12.4998C4.16797 14.3408 5.66035 15.8332 7.5013 15.8332H12.5013C14.3423 15.8332 15.8346 14.3408 15.8346 12.4998V7.49984C15.8346 5.65889 14.3423 4.1665 12.5013 4.1665Z\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M4.28125 12.7665L7.24033 9.63825C7.52263 9.33617 7.90546 9.1665 8.30463 9.1665C8.70377 9.1665 9.0866 9.33617 9.36893 9.63825L12.8208 13.3332M11.3154 11.7218L12.5092 10.444C12.7914 10.1419 13.1743 9.97217 13.5734 9.97217C13.9726 9.97217 14.3554 10.1419 14.6378 10.444L15.699 11.636\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path\r\n d=\"M11.4805 7.77783H11.4879\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:6px;padding-bottom:6px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.image{display:block;max-width:100%;width:fit-content;height:250px}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border:1px solid var(--cui-base-200);
|
|
5313
|
+
}, template: "<ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"image; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [ngClass]=\"tunesSignal()\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <img\r\n class=\"image\"\r\n [src]=\"image\"\r\n alt=\"Image\"\r\n />\r\n </div>\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n <ng-template #buttonTemplate>\r\n <button\r\n #button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width=\"20\"\r\n height=\"20\"\r\n viewBox=\"0 0 20 20\"\r\n fill=\"none\"\r\n >\r\n <path\r\n d=\"M12.5013 4.1665H7.5013C5.66035 4.1665 4.16797 5.65889 4.16797 7.49984V12.4998C4.16797 14.3408 5.66035 15.8332 7.5013 15.8332H12.5013C14.3423 15.8332 15.8346 14.3408 15.8346 12.4998V7.49984C15.8346 5.65889 14.3423 4.1665 12.5013 4.1665Z\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n />\r\n <path\r\n d=\"M4.28125 12.7665L7.24033 9.63825C7.52263 9.33617 7.90546 9.1665 8.30463 9.1665C8.70377 9.1665 9.0866 9.33617 9.36893 9.63825L12.8208 13.3332M11.3154 11.7218L12.5092 10.444C12.7914 10.1419 13.1743 9.97217 13.5734 9.97217C13.9726 9.97217 14.3554 10.1419 14.6378 10.444L15.699 11.636\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n <path\r\n d=\"M11.4805 7.77783H11.4879\"\r\n stroke=\"#121315\"\r\n stroke-width=\"1.66667\"\r\n stroke-linecap=\"round\"\r\n stroke-linejoin=\"round\"\r\n />\r\n </svg>\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{padding-top:6px;padding-bottom:6px;font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.image{display:block;max-width:100%;width:fit-content;height:250px}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:200px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.wrapper.stretched .image{width:100%;height:auto}.wrapper.center .image{margin:auto}.preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--cui-base-200);background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader__image{width:50px;height:50px;border-radius:50%}.preloader:after{content:\"\";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.caption{border-radius:8px}.caption[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"] }]
|
|
5248
5314
|
}], propDecorators: { image: [{
|
|
5249
5315
|
type: Input,
|
|
5250
5316
|
args: [{ required: true }]
|
|
@@ -5275,13 +5341,13 @@ class EditorVideoToolComponent extends EditorToolComponent {
|
|
|
5275
5341
|
return (event.key !== 'Backspace' && event.key !== 'Enter') || event.shiftKey;
|
|
5276
5342
|
}
|
|
5277
5343
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorVideoToolComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
5278
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorVideoToolComponent, isStandalone: true, selector: "ng-component", inputs: { video: "video" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *ngIf=\"video; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <video\r\n *ngIf=\"isLoaded(); else playButtonTemplate\"\r\n class=\"video\"\r\n [src]=\"video\"\r\n controls\r\n autoplay\r\n muted\r\n playsinline\r\n ></video>\r\n\r\n <ng-template #playButtonTemplate>\r\n <button\r\n type=\"button\"\r\n class=\"play\"\r\n (click)=\"onPlay()\"\r\n >\r\n <cui-svg\r\n class=\"play\"\r\n icon=\"cuiIconPlayCircleSm\"\r\n [height]=\"72\"\r\n [width]=\"72\"\r\n [strokeWidth]=\"0.5\"\r\n />\r\n </button>\r\n </ng-template>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n\r\n <ng-template #buttonTemplate>\r\n <button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <cui-svg icon=\"cuiIconPlayCircle\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;padding-top:6px;padding-bottom:6px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border:1px solid var(--cui-base-200);
|
|
5344
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: EditorVideoToolComponent, isStandalone: true, selector: "ng-component", inputs: { video: "video" }, host: { properties: { "class._hidden": "isShowLoadButton" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *ngIf=\"video; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <video\r\n *ngIf=\"isLoaded(); else playButtonTemplate\"\r\n class=\"video\"\r\n [src]=\"video\"\r\n controls\r\n autoplay\r\n muted\r\n playsinline\r\n ></video>\r\n\r\n <ng-template #playButtonTemplate>\r\n <button\r\n type=\"button\"\r\n class=\"play\"\r\n (click)=\"onPlay()\"\r\n >\r\n <cui-svg\r\n class=\"play\"\r\n icon=\"cuiIconPlayCircleSm\"\r\n [height]=\"72\"\r\n [width]=\"72\"\r\n [strokeWidth]=\"0.5\"\r\n />\r\n </button>\r\n </ng-template>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n\r\n <ng-template #buttonTemplate>\r\n <button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <cui-svg icon=\"cuiIconPlayCircle\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;padding-top:6px;padding-bottom:6px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:200px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.video{display:block;max-width:100%}.preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--cui-base-200);background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader__image{width:50px;height:50px;border-radius:50%}.preloader:after{content:\"\";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.caption{border-radius:8px}.caption[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"], dependencies: [{ kind: "ngmodule", type: CuiSvgModule }, { kind: "component", type: CuiSvgComponent, selector: "cui-svg[icon]", inputs: ["width", "height", "strokeWidth", "color", "icon"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: TranslocoDirective, selector: "[transloco]", inputs: ["transloco", "translocoParams", "translocoScope", "translocoRead", "translocoPrefix", "translocoLang", "translocoLoadingTpl"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
5279
5345
|
}
|
|
5280
5346
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditorVideoToolComponent, decorators: [{
|
|
5281
5347
|
type: Component,
|
|
5282
5348
|
args: [{ standalone: true, imports: [CuiSvgModule, FormsModule, NgIf, TranslocoDirective], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5283
5349
|
'[class._hidden]': 'isShowLoadButton'
|
|
5284
|
-
}, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *ngIf=\"video; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <video\r\n *ngIf=\"isLoaded(); else playButtonTemplate\"\r\n class=\"video\"\r\n [src]=\"video\"\r\n controls\r\n autoplay\r\n muted\r\n playsinline\r\n ></video>\r\n\r\n <ng-template #playButtonTemplate>\r\n <button\r\n type=\"button\"\r\n class=\"play\"\r\n (click)=\"onPlay()\"\r\n >\r\n <cui-svg\r\n class=\"play\"\r\n icon=\"cuiIconPlayCircleSm\"\r\n [height]=\"72\"\r\n [width]=\"72\"\r\n [strokeWidth]=\"0.5\"\r\n />\r\n </button>\r\n </ng-template>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n\r\n <ng-template #buttonTemplate>\r\n <button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <cui-svg icon=\"cuiIconPlayCircle\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;padding-top:6px;padding-bottom:6px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border:1px solid var(--cui-base-200);
|
|
5350
|
+
}, template: "<ng-container *transloco=\"let t\">\r\n <ng-container *ngIf=\"!isLoading; else preloader\">\r\n <ng-container *ngIf=\"video; else buttonTemplate\">\r\n <div\r\n class=\"wrapper\"\r\n [class._loaded]=\"isLoaded()\"\r\n >\r\n <video\r\n *ngIf=\"isLoaded(); else playButtonTemplate\"\r\n class=\"video\"\r\n [src]=\"video\"\r\n controls\r\n autoplay\r\n muted\r\n playsinline\r\n ></video>\r\n\r\n <ng-template #playButtonTemplate>\r\n <button\r\n type=\"button\"\r\n class=\"play\"\r\n (click)=\"onPlay()\"\r\n >\r\n <cui-svg\r\n class=\"play\"\r\n icon=\"cuiIconPlayCircleSm\"\r\n [height]=\"72\"\r\n [width]=\"72\"\r\n [strokeWidth]=\"0.5\"\r\n />\r\n </button>\r\n </ng-template>\r\n </div>\r\n\r\n <div\r\n *ngIf=\"isCaptionShown\"\r\n class=\"caption cdx-input\"\r\n [attr.contenteditable]=\"!readOnly\"\r\n attr.data-placeholder=\"{{ t('CAPTION') }}...\"\r\n (paste)=\"onTitlePaste($event)\"\r\n (keydown)=\"onPreventEnter($event)\"\r\n (keyup)=\"onTitleChange($event)\"\r\n [innerHTML]=\"caption\"\r\n ></div>\r\n </ng-container>\r\n\r\n <ng-template #buttonTemplate>\r\n <button\r\n type=\"button\"\r\n [class]=\"['select-btn', this.api.styles.button]\"\r\n (click)=\"onSelectFile()\"\r\n >\r\n <cui-svg icon=\"cuiIconPlayCircle\" />\r\n {{ buttonContent }}\r\n </button>\r\n </ng-template>\r\n </ng-container>\r\n</ng-container>\r\n\r\n<ng-template #preloader>\r\n <div class=\"wrapper\">\r\n <div class=\"preloader\">\r\n <img\r\n *ngIf=\"preview\"\r\n class=\"preloader__image\"\r\n [src]=\"preview\"\r\n alt=\"Preloader\"\r\n />\r\n </div>\r\n </div>\r\n</ng-template>\r\n", styles: [":host{font-weight:400;font-size:14px;line-height:20px;padding-top:6px;padding-bottom:6px;font-family:var(--cui-main-font);display:block}:host ::ng-deep .cdx-input{border:1px solid var(--cui-base-200);background:transparent;box-shadow:none}:host ::ng-deep .play{margin:auto}:host ::ng-deep .play path{fill:var(--cui-base-0);stroke:var(--cui-base-300)}:host._hidden{display:none}.wrapper{display:flex;flex-direction:column;margin-bottom:10px;border-radius:8px;border:1px solid var(--cui-base-200);min-height:200px;background-color:var(--cui-base-0);overflow:hidden}.wrapper._loaded{min-height:auto}.video{display:block;max-width:100%}.preloader{width:50px;height:50px;border-radius:50%;background-size:cover;margin:auto;position:relative;background-color:var(--cui-base-200);background-position:center center}@keyframes preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.preloader__image{width:50px;height:50px;border-radius:50%}.preloader:after{content:\"\";position:absolute;z-index:3;width:60px;height:60px;border-radius:50%;border:2px solid var(--cui-base-200);border-top-color:var(--cui-blue-600);left:50%;top:50%;margin-top:-30px;margin-left:-30px;animation:preloader-spin 2s infinite linear;box-sizing:border-box}.caption{border-radius:8px}.caption[data-placeholder]:empty:before{content:attr(data-placeholder);position:absolute;color:var(--cui-base-400)}.select-btn{display:flex;align-items:center;justify-content:center;width:100%}\n"] }]
|
|
5285
5351
|
}], propDecorators: { video: [{
|
|
5286
5352
|
type: Input,
|
|
5287
5353
|
args: [{ required: true }]
|
|
@@ -5946,6 +6012,9 @@ class CuiAttachesTool {
|
|
|
5946
6012
|
this.uploader = new CuiFileUploader(this.config, this.onUpload.bind(this), this.uploadingFailed.bind(this));
|
|
5947
6013
|
this.data = data;
|
|
5948
6014
|
}
|
|
6015
|
+
appendCallback() {
|
|
6016
|
+
this.selectFile();
|
|
6017
|
+
}
|
|
5949
6018
|
render() {
|
|
5950
6019
|
this.attachesTool = document.createElement(EDITOR_ATTACHES_TOOL_SELECTOR);
|
|
5951
6020
|
this.attachesTool.api = this.api;
|
|
@@ -6734,53 +6803,6 @@ const getEditorConfig = (id, config = DEFAULT_CONFIG) => ({
|
|
|
6734
6803
|
defaultBlock: COMBINED_TEXT_BLOCK_NAME
|
|
6735
6804
|
});
|
|
6736
6805
|
|
|
6737
|
-
const EDITOR_CUSTOM_ELEMENTS = [
|
|
6738
|
-
{
|
|
6739
|
-
selector: EDITOR_TOOLTIP_SELECTOR,
|
|
6740
|
-
component: EditorTooltipComponent
|
|
6741
|
-
},
|
|
6742
|
-
{
|
|
6743
|
-
selector: MARKER_SELECT_SELECTOR,
|
|
6744
|
-
component: MarkerSelectComponent
|
|
6745
|
-
},
|
|
6746
|
-
{
|
|
6747
|
-
selector: EDITOR_TOOL_MODAL_SELECTOR,
|
|
6748
|
-
component: EditorToolModalComponent
|
|
6749
|
-
},
|
|
6750
|
-
{
|
|
6751
|
-
selector: MARKER_MODAL_SELECTOR,
|
|
6752
|
-
component: MarkerModalComponent
|
|
6753
|
-
},
|
|
6754
|
-
{
|
|
6755
|
-
selector: EDITOR_VIDEO_TOOL_SELECTOR,
|
|
6756
|
-
component: EditorVideoToolComponent
|
|
6757
|
-
},
|
|
6758
|
-
{
|
|
6759
|
-
selector: EDITOR_IMAGE_TOOL_SELECTOR,
|
|
6760
|
-
component: EditorImageToolComponent
|
|
6761
|
-
},
|
|
6762
|
-
{
|
|
6763
|
-
selector: EDITOR_ATTACHES_TOOL_SELECTOR,
|
|
6764
|
-
component: EditorAttachesToolComponent
|
|
6765
|
-
}
|
|
6766
|
-
];
|
|
6767
|
-
|
|
6768
|
-
function cuiProvideEditor() {
|
|
6769
|
-
return [
|
|
6770
|
-
{
|
|
6771
|
-
provide: APP_INITIALIZER,
|
|
6772
|
-
useFactory: (injector) => () => {
|
|
6773
|
-
EDITOR_CUSTOM_ELEMENTS.forEach(({ component, selector }) => {
|
|
6774
|
-
const element = createCustomElement(component, { injector });
|
|
6775
|
-
window.customElements.define(selector, element);
|
|
6776
|
-
});
|
|
6777
|
-
},
|
|
6778
|
-
deps: [Injector],
|
|
6779
|
-
multi: true
|
|
6780
|
-
}
|
|
6781
|
-
];
|
|
6782
|
-
}
|
|
6783
|
-
|
|
6784
6806
|
function setEditorDragEvents(editorElement, signal) {
|
|
6785
6807
|
editorElement.addEventListener('dragstart', dragstartListener, { signal });
|
|
6786
6808
|
}
|
|
@@ -7280,11 +7302,11 @@ class CuiEditorComponent {
|
|
|
7280
7302
|
this.abortController = new AbortController();
|
|
7281
7303
|
}
|
|
7282
7304
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7283
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CuiEditorComponent, isStandalone: true, selector: "cui-editor", inputs: { editorApiId: "editorApiId", config: "config", requestSize: "requestSize" }, outputs: { editorEmpty: "editorEmpty" }, providers: [CuiEditorService, CuiJTextApiService], viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #editor\n [id]=\"editorId\"\n data-editor\n [class._readonly]=\"config.readOnly\"\n></div>\n", styles: [":host{--textColor: var(--cui-base-900);--menuBackground: var(--cui-base-0);--menuBorder: var(--cui-base-200);--menuItemHover: var(--cui-base-10);--menuItemBackground: var(cui-base-900);--menuIconBackground: var(--cui-base-50);--menuIconHover: var(--cui-base-10);font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font)}:host ::ng-deep .ce-popover{--color-background: var(--menuBackground);--color-text-primary: var(--textColor);--color-border: var(--menuBorder);--color-border-icon: var(--menuBorder);--color-background-item: var(--menuItemBackground);--color-background-item-hover: var(--menuItemHover)}:host ::ng-deep .ce-popover__search{background:var(--menuIconBackground)}:host ::ng-deep .ce-popover .ce-popover-item__icon{background:var(--menuIconBackground)}:host ::ng-deep .ce-conversion-toolbar{background-color:var(--menuBackground);border-color:var(--menuBorder)}:host ::ng-deep .ce-conversion-toolbar__tools{padding:0 6px 6px}:host ::ng-deep .ce-conversion-tool{padding:3px;border-radius:6px}:host ::ng-deep .ce-conversion-tool__icon{border:1px solid var(--menuBorder);background-color:var(--menuIconBackground);box-shadow:none}:host ::ng-deep .ce-conversion-tool:hover{background-color:var(--menuItemHover)}:host ::ng-deep .ce-conversion-tool:hover .ce-conversion-tool__icon{border-color:var(--menuIconHover)}:host ::ng-deep .combined-text-block{padding:.4em 0;line-height:1.6em;outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part{outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child,:host ::ng-deep .combined-text-block .combined-text-block-part._selected{display:list-item}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child::marker,:host ::ng-deep .combined-text-block .combined-text-block-part._selected::marker{content:\"\"}:host ::ng-deep .image-tool__image{border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}:host ::ng-deep .image-tool__image-preloader{background-color:var(--cui-base-200)}:host ::ng-deep .image-tool__image-preloader:after{border:1px solid var(--cui-base-200);border-top:1px solid var(--cui-blue-600)}:host ::ng-deep .cdx-button{border:1px solid var(--cui-base-200);color:var(--textColor);background-color:var(--cui-base-
|
|
7305
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: CuiEditorComponent, isStandalone: true, selector: "cui-editor", inputs: { editorApiId: "editorApiId", config: "config", requestSize: "requestSize" }, outputs: { editorEmpty: "editorEmpty" }, providers: [CuiEditorService, CuiJTextApiService], viewQueries: [{ propertyName: "editorRef", first: true, predicate: ["editor"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n #editor\n [id]=\"editorId\"\n data-editor\n [class._readonly]=\"config.readOnly\"\n></div>\n", styles: [":host{--textColor: var(--cui-base-900);--menuBackground: var(--cui-base-0);--menuBorder: var(--cui-base-200);--menuItemHover: var(--cui-base-10);--menuItemBackground: var(cui-base-900);--menuIconBackground: var(--cui-base-50);--menuIconHover: var(--cui-base-10);font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font)}:host ::ng-deep .ce-popover{--color-background: var(--menuBackground);--color-text-primary: var(--textColor);--color-border: var(--menuBorder);--color-border-icon: var(--menuBorder);--color-background-item: var(--menuItemBackground);--color-background-item-hover: var(--menuItemHover)}:host ::ng-deep .ce-popover__search{background:var(--menuIconBackground)}:host ::ng-deep .ce-popover .ce-popover-item__icon{background:var(--menuIconBackground)}:host ::ng-deep .ce-conversion-toolbar{background-color:var(--menuBackground);border-color:var(--menuBorder)}:host ::ng-deep .ce-conversion-toolbar__tools{padding:0 6px 6px}:host ::ng-deep .ce-conversion-tool{padding:3px;border-radius:6px}:host ::ng-deep .ce-conversion-tool__icon{border:1px solid var(--menuBorder);background-color:var(--menuIconBackground);box-shadow:none}:host ::ng-deep .ce-conversion-tool:hover{background-color:var(--menuItemHover)}:host ::ng-deep .ce-conversion-tool:hover .ce-conversion-tool__icon{border-color:var(--menuIconHover)}:host ::ng-deep .combined-text-block{padding:.4em 0;line-height:1.6em;outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part{outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child,:host ::ng-deep .combined-text-block .combined-text-block-part._selected{display:list-item}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child::marker,:host ::ng-deep .combined-text-block .combined-text-block-part._selected::marker{content:\"\"}:host ::ng-deep .image-tool__image{border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}:host ::ng-deep .image-tool__image-preloader{background-color:var(--cui-base-200)}:host ::ng-deep .image-tool__image-preloader:after{border:1px solid var(--cui-base-200);border-top:1px solid var(--cui-blue-600)}:host ::ng-deep .cdx-button{border-radius:8px;border:1px solid var(--cui-base-200);color:var(--textColor);background-color:var(--cui-base-10);box-shadow:none}:host ::ng-deep .ce-inline-toolbar{border-color:var(--cui-base-100);color:var(--textColor);background-color:var(--cui-base-0)}:host ::ng-deep .ce-inline-toolbar__dropdown:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-inline-tool:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-toolbar__plus,:host ::ng-deep .ce-toolbar__settings-btn{color:var(--cui-base-500)}:host ::ng-deep .ce-toolbar__plus:hover,:host ::ng-deep .ce-toolbar__settings-btn:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-toolbar__actions{right:100%}:host ::ng-deep .ce-toolbar__content{max-width:none}@media (max-width: 650px){:host ::ng-deep .ce-toolbar__plus,:host ::ng-deep .ce-toolbar__settings-btn{border-color:var(--menuBorder);background-color:var(--menuBackground)}:host ::ng-deep .ce-toolbar__actions{inset:0 auto auto 0}}:host ::ng-deep .ce-block--selected .ce-block__content{background-color:var(--cui-base-200)}:host ::ng-deep .ce-block__content{max-width:100%}:host ::ng-deep .ce-block:only-of-type .combined-text-block[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active);position:absolute;color:var(--cui-base-400)}:host ::ng-deep [data-editor]{padding-right:4px;width:100%;height:100%;min-height:200px;overflow:hidden auto;scrollbar-gutter:stable}:host ::ng-deep [data-editor] .codex-editor{margin-left:60px}:host ::ng-deep [data-editor] .codex-editor--narrow .ce-popover{right:auto}:host ::ng-deep [data-editor] .codex-editor__redactor{margin-right:auto;padding-bottom:260px!important}@media (max-width: 650px){:host ::ng-deep [data-editor] .codex-editor{margin-left:0}}:host ::ng-deep [data-editor]._readonly{min-height:auto}:host ::ng-deep [data-editor]._readonly .codex-editor{margin:auto}:host ::ng-deep [data-editor]._readonly .codex-editor__redactor{padding-bottom:0!important}:host ::ng-deep [data-editor]._readonly .combined-text-block{padding:0}:host ::ng-deep [data-editor] [data-item-name=move-up],:host ::ng-deep [data-editor] [data-item-name=move-down],:host ::ng-deep [data-editor] [data-tool=paragraph]{display:none}:host ::ng-deep [data-editor] *::selection{background:var(--cui-base-200)}:host ::ng-deep [data-editor] a{color:var(--cui-light-blue-600)}:host ::ng-deep .marker{cursor:pointer;text-decoration:underline;color:var(--cui-light-blue-600);background-color:transparent}:host ::ng-deep .tool-marker,:host ::ng-deep .role-marker{margin:0 5px}:host ::ng-deep .tool-marker{color:#e97c00}:host ::ng-deep .role-marker{color:#8803f1}.form{height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7284
7306
|
}
|
|
7285
7307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CuiEditorComponent, decorators: [{
|
|
7286
7308
|
type: Component,
|
|
7287
|
-
args: [{ selector: 'cui-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiEditorService, CuiJTextApiService], template: "<div\n #editor\n [id]=\"editorId\"\n data-editor\n [class._readonly]=\"config.readOnly\"\n></div>\n", styles: [":host{--textColor: var(--cui-base-900);--menuBackground: var(--cui-base-0);--menuBorder: var(--cui-base-200);--menuItemHover: var(--cui-base-10);--menuItemBackground: var(cui-base-900);--menuIconBackground: var(--cui-base-50);--menuIconHover: var(--cui-base-10);font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font)}:host ::ng-deep .ce-popover{--color-background: var(--menuBackground);--color-text-primary: var(--textColor);--color-border: var(--menuBorder);--color-border-icon: var(--menuBorder);--color-background-item: var(--menuItemBackground);--color-background-item-hover: var(--menuItemHover)}:host ::ng-deep .ce-popover__search{background:var(--menuIconBackground)}:host ::ng-deep .ce-popover .ce-popover-item__icon{background:var(--menuIconBackground)}:host ::ng-deep .ce-conversion-toolbar{background-color:var(--menuBackground);border-color:var(--menuBorder)}:host ::ng-deep .ce-conversion-toolbar__tools{padding:0 6px 6px}:host ::ng-deep .ce-conversion-tool{padding:3px;border-radius:6px}:host ::ng-deep .ce-conversion-tool__icon{border:1px solid var(--menuBorder);background-color:var(--menuIconBackground);box-shadow:none}:host ::ng-deep .ce-conversion-tool:hover{background-color:var(--menuItemHover)}:host ::ng-deep .ce-conversion-tool:hover .ce-conversion-tool__icon{border-color:var(--menuIconHover)}:host ::ng-deep .combined-text-block{padding:.4em 0;line-height:1.6em;outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part{outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child,:host ::ng-deep .combined-text-block .combined-text-block-part._selected{display:list-item}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child::marker,:host ::ng-deep .combined-text-block .combined-text-block-part._selected::marker{content:\"\"}:host ::ng-deep .image-tool__image{border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}:host ::ng-deep .image-tool__image-preloader{background-color:var(--cui-base-200)}:host ::ng-deep .image-tool__image-preloader:after{border:1px solid var(--cui-base-200);border-top:1px solid var(--cui-blue-600)}:host ::ng-deep .cdx-button{border:1px solid var(--cui-base-200);color:var(--textColor);background-color:var(--cui-base-
|
|
7309
|
+
args: [{ selector: 'cui-editor', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [CuiEditorService, CuiJTextApiService], template: "<div\n #editor\n [id]=\"editorId\"\n data-editor\n [class._readonly]=\"config.readOnly\"\n></div>\n", styles: [":host{--textColor: var(--cui-base-900);--menuBackground: var(--cui-base-0);--menuBorder: var(--cui-base-200);--menuItemHover: var(--cui-base-10);--menuItemBackground: var(cui-base-900);--menuIconBackground: var(--cui-base-50);--menuIconHover: var(--cui-base-10);font-weight:400;font-size:14px;line-height:20px;font-family:var(--cui-main-font)}:host ::ng-deep .ce-popover{--color-background: var(--menuBackground);--color-text-primary: var(--textColor);--color-border: var(--menuBorder);--color-border-icon: var(--menuBorder);--color-background-item: var(--menuItemBackground);--color-background-item-hover: var(--menuItemHover)}:host ::ng-deep .ce-popover__search{background:var(--menuIconBackground)}:host ::ng-deep .ce-popover .ce-popover-item__icon{background:var(--menuIconBackground)}:host ::ng-deep .ce-conversion-toolbar{background-color:var(--menuBackground);border-color:var(--menuBorder)}:host ::ng-deep .ce-conversion-toolbar__tools{padding:0 6px 6px}:host ::ng-deep .ce-conversion-tool{padding:3px;border-radius:6px}:host ::ng-deep .ce-conversion-tool__icon{border:1px solid var(--menuBorder);background-color:var(--menuIconBackground);box-shadow:none}:host ::ng-deep .ce-conversion-tool:hover{background-color:var(--menuItemHover)}:host ::ng-deep .ce-conversion-tool:hover .ce-conversion-tool__icon{border-color:var(--menuIconHover)}:host ::ng-deep .combined-text-block{padding:.4em 0;line-height:1.6em;outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part{outline:none}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child,:host ::ng-deep .combined-text-block .combined-text-block-part._selected{display:list-item}:host ::ng-deep .combined-text-block .combined-text-block-part:only-child::marker,:host ::ng-deep .combined-text-block .combined-text-block-part._selected::marker{content:\"\"}:host ::ng-deep .image-tool__image{border:1px solid var(--cui-base-200);background-color:var(--cui-base-0)}:host ::ng-deep .image-tool__image-preloader{background-color:var(--cui-base-200)}:host ::ng-deep .image-tool__image-preloader:after{border:1px solid var(--cui-base-200);border-top:1px solid var(--cui-blue-600)}:host ::ng-deep .cdx-button{border-radius:8px;border:1px solid var(--cui-base-200);color:var(--textColor);background-color:var(--cui-base-10);box-shadow:none}:host ::ng-deep .ce-inline-toolbar{border-color:var(--cui-base-100);color:var(--textColor);background-color:var(--cui-base-0)}:host ::ng-deep .ce-inline-toolbar__dropdown:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-inline-tool:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-toolbar__plus,:host ::ng-deep .ce-toolbar__settings-btn{color:var(--cui-base-500)}:host ::ng-deep .ce-toolbar__plus:hover,:host ::ng-deep .ce-toolbar__settings-btn:hover{background-color:var(--cui-base-100)}:host ::ng-deep .ce-toolbar__actions{right:100%}:host ::ng-deep .ce-toolbar__content{max-width:none}@media (max-width: 650px){:host ::ng-deep .ce-toolbar__plus,:host ::ng-deep .ce-toolbar__settings-btn{border-color:var(--menuBorder);background-color:var(--menuBackground)}:host ::ng-deep .ce-toolbar__actions{inset:0 auto auto 0}}:host ::ng-deep .ce-block--selected .ce-block__content{background-color:var(--cui-base-200)}:host ::ng-deep .ce-block__content{max-width:100%}:host ::ng-deep .ce-block:only-of-type .combined-text-block[data-placeholder-active][data-empty=true]:before{content:attr(data-placeholder-active);position:absolute;color:var(--cui-base-400)}:host ::ng-deep [data-editor]{padding-right:4px;width:100%;height:100%;min-height:200px;overflow:hidden auto;scrollbar-gutter:stable}:host ::ng-deep [data-editor] .codex-editor{margin-left:60px}:host ::ng-deep [data-editor] .codex-editor--narrow .ce-popover{right:auto}:host ::ng-deep [data-editor] .codex-editor__redactor{margin-right:auto;padding-bottom:260px!important}@media (max-width: 650px){:host ::ng-deep [data-editor] .codex-editor{margin-left:0}}:host ::ng-deep [data-editor]._readonly{min-height:auto}:host ::ng-deep [data-editor]._readonly .codex-editor{margin:auto}:host ::ng-deep [data-editor]._readonly .codex-editor__redactor{padding-bottom:0!important}:host ::ng-deep [data-editor]._readonly .combined-text-block{padding:0}:host ::ng-deep [data-editor] [data-item-name=move-up],:host ::ng-deep [data-editor] [data-item-name=move-down],:host ::ng-deep [data-editor] [data-tool=paragraph]{display:none}:host ::ng-deep [data-editor] *::selection{background:var(--cui-base-200)}:host ::ng-deep [data-editor] a{color:var(--cui-light-blue-600)}:host ::ng-deep .marker{cursor:pointer;text-decoration:underline;color:var(--cui-light-blue-600);background-color:transparent}:host ::ng-deep .tool-marker,:host ::ng-deep .role-marker{margin:0 5px}:host ::ng-deep .tool-marker{color:#e97c00}:host ::ng-deep .role-marker{color:#8803f1}.form{height:100%}\n"] }]
|
|
7288
7310
|
}], propDecorators: { editorRef: [{
|
|
7289
7311
|
type: ViewChild,
|
|
7290
7312
|
args: ['editor']
|
|
@@ -7470,6 +7492,53 @@ function provideCuiEditorResourceUrl(resourceUrl) {
|
|
|
7470
7492
|
return { provide: CUI_RESOURCE_URL, useValue: resourceUrl };
|
|
7471
7493
|
}
|
|
7472
7494
|
|
|
7495
|
+
const EDITOR_CUSTOM_ELEMENTS = [
|
|
7496
|
+
{
|
|
7497
|
+
selector: EDITOR_TOOLTIP_SELECTOR,
|
|
7498
|
+
component: EditorTooltipComponent
|
|
7499
|
+
},
|
|
7500
|
+
{
|
|
7501
|
+
selector: MARKER_SELECT_SELECTOR,
|
|
7502
|
+
component: MarkerSelectComponent
|
|
7503
|
+
},
|
|
7504
|
+
{
|
|
7505
|
+
selector: EDITOR_TOOL_MODAL_SELECTOR,
|
|
7506
|
+
component: EditorToolModalComponent
|
|
7507
|
+
},
|
|
7508
|
+
{
|
|
7509
|
+
selector: MARKER_MODAL_SELECTOR,
|
|
7510
|
+
component: MarkerModalComponent
|
|
7511
|
+
},
|
|
7512
|
+
{
|
|
7513
|
+
selector: EDITOR_VIDEO_TOOL_SELECTOR,
|
|
7514
|
+
component: EditorVideoToolComponent
|
|
7515
|
+
},
|
|
7516
|
+
{
|
|
7517
|
+
selector: EDITOR_IMAGE_TOOL_SELECTOR,
|
|
7518
|
+
component: EditorImageToolComponent
|
|
7519
|
+
},
|
|
7520
|
+
{
|
|
7521
|
+
selector: EDITOR_ATTACHES_TOOL_SELECTOR,
|
|
7522
|
+
component: EditorAttachesToolComponent
|
|
7523
|
+
}
|
|
7524
|
+
];
|
|
7525
|
+
|
|
7526
|
+
function cuiProvideEditor() {
|
|
7527
|
+
return [
|
|
7528
|
+
{
|
|
7529
|
+
provide: APP_INITIALIZER,
|
|
7530
|
+
useFactory: (injector) => () => {
|
|
7531
|
+
EDITOR_CUSTOM_ELEMENTS.forEach(({ component, selector }) => {
|
|
7532
|
+
const element = createCustomElement(component, { injector });
|
|
7533
|
+
window.customElements.define(selector, element);
|
|
7534
|
+
});
|
|
7535
|
+
},
|
|
7536
|
+
deps: [Injector],
|
|
7537
|
+
multi: true
|
|
7538
|
+
}
|
|
7539
|
+
];
|
|
7540
|
+
}
|
|
7541
|
+
|
|
7473
7542
|
const cuiXNdjsonInterceptor = (request, next) => {
|
|
7474
7543
|
if (request.headers.get('Content-Type') !== 'application/x-ndjson') {
|
|
7475
7544
|
return next(request);
|
|
@@ -10215,5 +10284,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
10215
10284
|
* Generated bundle index. Do not edit.
|
|
10216
10285
|
*/
|
|
10217
10286
|
|
|
10218
|
-
export { AngularOutsideLoaderService, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_RESOURCE_URL, CUI_ROOT_SELECTOR, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_TABS_SERVICE_TOKEN, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityContextMenuTranslations, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionModalCreateComponent, CuiCriterionReadonlyInfoComponent, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorToolsService, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiVideoTool, CuiVisualViewportService, UTILITY_MODAL_SERVICE_TOKEN, cuiAuthInterceptor, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, provideCuiAuth, provideCuiEditorResourceUrl, provideCuiTabs };
|
|
10287
|
+
export { AngularOutsideLoaderService, CUI_ACTIVITY_SERVICE_TOKEN, CUI_ALERTS, CUI_ALERT_CONTEXT, CUI_ALERT_DEFAULT_OPTIONS, CUI_ALERT_OPTIONS, CUI_ANIMATIONS_DEFAULT_DURATION, CUI_BANNER_DEFAULT_OPTIONS, CUI_BANNER_OPTIONS, CUI_BUTTON_DEFAULT_OPTIONS, CUI_BUTTON_OPTIONS, CUI_DEFAULT_THEME, CUI_DIALOGS, CUI_DIALOG_CONTEXT, CUI_DIALOG_DEFAULT_OPTIONS, CUI_DIALOG_OPTIONS, CUI_INPUT_TIME_DEFAULT_OPTIONS, CUI_INPUT_TIME_OPTIONS, CUI_NOTIFICATION_DEFAULT_OPTIONS, CUI_NOTIFICATION_ICONS, CUI_NOTIFICATION_ICON_OPTIONS, CUI_NOTIFICATION_ICON_OPTIONS_DEFAULT_MODE, CUI_NOTIFICATION_ICON_OPTIONS_LIGHT_MODE, CUI_NOTIFICATION_OPTIONS, CUI_RESOURCE_URL, CUI_ROOT_SELECTOR, CUI_STORAGE_LIST_SERVICE_TOKEN, CUI_TABS_SERVICE_TOKEN, CUI_TEXT_FIELD_CONTROLLER, CUI_TEXT_FIELD_ICON_LEFT, CUI_TEXT_FIELD_ID, CUI_TEXT_FIELD_IS_ERROR, CUI_TEXT_FIELD_PLACEHOLDER, CUI_TEXT_FIELD_SIZE, CUI_TEXT_FILED_CONTROLLER_PROVIDER, CUI_THEME, CUI_THEME_STORAGE_DEFAULT_KEY, CUI_THEME_STORAGE_KEY, CUI_TOOLTIP_COMPONENT, CUI_TOOLTIP_DEFAULT_OPTIONS, CUI_TOOLTIP_DIRECTIONS, CUI_TOOLTIP_OPTIONS, CUI_TOOLTIP_PROVIDERS, CuiAccordionComponent, CuiAccordionDirective, CuiAccordionItemComponent, CuiAccordionModule, CuiActivityBaseService, CuiActivityContextMenuTranslations, CuiActivityImplService, CuiAlertComponent, CuiAlertModule, CuiAlertService, CuiAlertsComponent, CuiAttachesTool, CuiAuthBase, CuiAuthService, CuiBadgeComponent, CuiBadgeModule, CuiBannerComponent, CuiBannerModule, CuiBreadcrumbComponent, CuiBreadcrumbsComponent, CuiBreadcrumbsModule, CuiButtonComponent, CuiButtonGroupComponent, CuiButtonGroupModule, CuiButtonModule, CuiCardWrapperComponent, CuiCategoriesComponent, CuiCheckboxComponent, CuiCheckboxModule, CuiChecklistBlockComponent, CuiContentWrapperComponent, CuiContextMenuComponent, CuiContextMenuModule, CuiCriterionInfoComponent, CuiCriterionModalCreateComponent, CuiCriterionReadonlyInfoComponent, CuiDeleteModalComponent, CuiDialogActionsComponent, CuiDialogComponent, CuiDialogHeaderComponent, CuiDialogModule, CuiDialogService, CuiDialogsComponent, CuiDropdownDirective, CuiDropdownWrapperComponent, CuiEditorBlockComponent, CuiEditorComponent, CuiEditorModalComponent, CuiEditorReadonlyComponent, CuiEditorToolsService, CuiEditorTranslations, CuiEmptyStateComponent, CuiFileIconComponent, CuiFileUploaderStatus, CuiFormFieldComponent, CuiFormFieldModule, CuiGeneralControlErrorHintComponent, CuiGhostInputComponent, CuiHeaderTool, CuiHintComponent, CuiHintModule, CuiIconButtonComponent, CuiIconButtonModule, CuiImageTool, CuiInputModule, CuiInputNumberComponent, CuiInputNumberModule, CuiInputPasswordComponent, CuiInputPasswordModule, CuiInputTextComponent, CuiInputTimeComponent, CuiInputTimeModule, CuiInstructionInfoComponent, CuiInstructionModalCreateComponent, CuiInstructionReadonlyInfoComponent, CuiLabelComponent, CuiLabelModule, CuiLayoutComponent, CuiLetterBoxComponent, CuiLinkMarker, CuiListTool, CuiLoaderComponent, CuiLoaderService, CuiLoadingState, CuiNotificationComponent, CuiNotificationModule, CuiPositionService, CuiRadioComponent, CuiRadioModule, CuiReadonlyCriterionModalComponent, CuiReadonlyInstructionModalComponent, CuiRenderDynamicComponentsComponent, CuiRenderDynamicComponentsService, CuiRoleMarker, CuiRootComponent, CuiRootModule, CuiSelectComponent, CuiSelectModalComponent, CuiSelectModalFolderComponent, CuiSelectModalSearchComponent, CuiSelectModalService, CuiSelectModule, CuiSelectedCategoryService, CuiSidebarContainerComponent, CuiSidebarHeaderComponent, CuiSidebarNavigationComponent, CuiSidebarNavigationContainerComponent, CuiSidebarNavigationItemComponent, CuiSidebarService, CuiStorageListComponent, CuiSvgComponent, CuiSvgModule, CuiTabDirective, CuiTabsComponent, CuiTextFieldController, CuiTextFieldControllerModule, CuiTextFieldIconLeftDirective, CuiTextFieldIdDirective, CuiTextFieldIsErrorDirective, CuiTextFieldPlaceholderDirective, CuiTextFieldSizeDirective, CuiTextareaComponent, CuiTextareaModule, CuiThemeService, CuiToggleComponent, CuiToggleModule, CuiToolMarker, CuiTooltip, CuiTooltipComponent, CuiTooltipDescribe, CuiTooltipDirective, CuiTooltipDriver, CuiTooltipHost, CuiTooltipHover, CuiTooltipManual, CuiTooltipOptionsDirective, CuiTooltipOverflow, CuiTooltipPointer, CuiTooltipPosition, CuiTooltipService, CuiTooltipUnstyled, CuiTooltipUnstyledComponent, CuiTooltips, CuiUserActionContextMenuComponent, CuiUtilityModalComponent, CuiVideoTool, CuiVisualViewportService, UTILITY_MODAL_SERVICE_TOKEN, cuiAuthInterceptor, cuiCreateDefaultValidators, cuiErrorHandlerInterceptor, cuiGetDuration, cuiIsObscured, cuiLoaderInterceptor, cuiOverrideOptions, cuiProvideEditor, cuiRemoveSpaces, cuiReplace, cuiToAnimationOptions, cuiTooltipOptionsProvider, cuiXNdjsonInterceptor, provideCuiAuth, provideCuiEditorResourceUrl, provideCuiTabs };
|
|
10219
10288
|
//# sourceMappingURL=cuby-ui-core.mjs.map
|