@acorex/components 18.5.12 → 18.5.14
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +29 -4
- package/calendar/lib/calendar-range.component.d.ts +2 -1
- package/comment/index.d.ts +1 -1
- package/comment/lib/comment-container/comment-container.component.d.ts +1 -1
- package/comment/lib/comment-item/comment-item.component.d.ts +1 -1
- package/comment/lib/comment-reply-text/comment-reply-text.component.d.ts +5 -0
- package/comment/lib/comment.module.d.ts +6 -6
- package/datetime-box/lib/datetime-box.component.d.ts +1 -1
- package/dialog/lib/dialog.class.d.ts +1 -0
- package/esm2022/calendar/lib/calendar-range.component.mjs +7 -7
- package/esm2022/calendar/lib/calendar.component.mjs +3 -3
- package/esm2022/comment/index.mjs +2 -2
- package/esm2022/comment/lib/comment-container/comment-container.component.mjs +3 -3
- package/esm2022/comment/lib/comment-item/comment-item.component.mjs +4 -5
- package/esm2022/comment/lib/comment-reply-text/comment-reply-text.component.mjs +12 -0
- package/esm2022/comment/lib/comment.module.mjs +7 -7
- package/esm2022/datetime-box/lib/datetime-box.component.mjs +2 -2
- package/esm2022/datetime-picker/lib/datetime-picker.component.mjs +4 -1
- package/esm2022/dialog/lib/dialog.class.mjs +1 -1
- package/esm2022/dialog/lib/dialog.component.mjs +3 -3
- package/esm2022/number-box/lib/number-box.component.mjs +1 -1
- package/esm2022/uploader/index.mjs +2 -1
- package/esm2022/uploader/lib/uploader-browse-handle.directive.mjs +3 -3
- package/esm2022/uploader/lib/uploader-drop-zone.component.mjs +1 -1
- package/esm2022/uploader/lib/uploader-zone.directive.mjs +41 -12
- package/esm2022/uploader/lib/uploader.models.mjs +37 -31
- package/esm2022/uploader/lib/uploader.module.mjs +3 -8
- package/esm2022/uploader/lib/uploader.service.mjs +20 -5
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-container/wysiwyg-container.component.mjs +2 -2
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.mjs +62 -19
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.mjs +24 -5
- package/esm2022/wysiwyg/lib/wysiwyg/wysiwyg.service.mjs +2 -1
- package/fesm2022/acorex-components-calendar.mjs +8 -8
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-comment.mjs +27 -48
- package/fesm2022/acorex-components-comment.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-picker.mjs +3 -0
- package/fesm2022/acorex-components-datetime-picker.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +2 -2
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-uploader.mjs +101 -54
- package/fesm2022/acorex-components-uploader.mjs.map +1 -1
- package/fesm2022/acorex-components-wysiwyg.mjs +84 -22
- package/fesm2022/acorex-components-wysiwyg.mjs.map +1 -1
- package/number-box/lib/number-box.component.d.ts +1 -1
- package/package.json +43 -43
- package/uploader/index.d.ts +1 -0
- package/uploader/lib/uploader-zone.directive.d.ts +9 -5
- package/uploader/lib/uploader.models.d.ts +26 -9
- package/uploader/lib/uploader.module.d.ts +10 -11
- package/uploader/lib/uploader.service.d.ts +8 -4
- package/wysiwyg/lib/wysiwyg/wysiwyg-toolbar/wysiwyg-toolbar.component.d.ts +19 -4
- package/wysiwyg/lib/wysiwyg/wysiwyg-view/wysiwyg-view.component.d.ts +6 -1
- package/wysiwyg/lib/wysiwyg/wysiwyg.service.d.ts +1 -0
- package/comment/lib/comment-input/comment-input.component.d.ts +0 -10
- package/esm2022/comment/lib/comment-input/comment-input.component.mjs +0 -33
@@ -1,21 +1,36 @@
|
|
1
|
-
import { AXFileService } from '@acorex/core/file';
|
2
1
|
import { AXTranslationService } from '@acorex/core/translation';
|
3
|
-
import { Directive, ElementRef, HostBinding, Input, inject } from '@angular/core';
|
2
|
+
import { Directive, ElementRef, EventEmitter, HostBinding, Input, Output, inject } from '@angular/core';
|
4
3
|
import { AXUploaderService } from './uploader.service';
|
4
|
+
import { AXUnsubscriber } from '@acorex/core/utils';
|
5
5
|
import * as i0 from "@angular/core";
|
6
6
|
export class AXUploaderZoneDirective {
|
7
|
-
init() {
|
8
|
-
this.element = this.elementRef.nativeElement;
|
9
|
-
this.element.style.position = 'relative';
|
10
|
-
}
|
11
7
|
constructor(elementRef) {
|
12
8
|
this.elementRef = elementRef;
|
13
9
|
this.multiple = true;
|
14
|
-
this.
|
10
|
+
this.accept = null;
|
15
11
|
this.uploadService = inject(AXUploaderService);
|
12
|
+
this.unsubscriber = inject(AXUnsubscriber);
|
16
13
|
this.translateService = inject(AXTranslationService);
|
14
|
+
this.onChanged = new EventEmitter();
|
15
|
+
this.onFileUploadComplete = new EventEmitter();
|
16
|
+
this.onFilesUploadComplete = new EventEmitter();
|
17
17
|
this.stateClass = 'ax-uploader-overlay-state';
|
18
|
-
this.
|
18
|
+
this.element = this.elementRef.nativeElement;
|
19
|
+
this.element.style.position = 'relative';
|
20
|
+
//
|
21
|
+
this.uploadService
|
22
|
+
.onFileUploadComplete
|
23
|
+
.pipe(this.unsubscriber.takeUntilDestroy)
|
24
|
+
.subscribe(c => {
|
25
|
+
this.onFileUploadComplete.next(c);
|
26
|
+
});
|
27
|
+
this.uploadService
|
28
|
+
.onFilesUploadComplete
|
29
|
+
.pipe(this.unsubscriber.takeUntilDestroy)
|
30
|
+
.subscribe(c => {
|
31
|
+
this.onFilesUploadComplete.next(c);
|
32
|
+
});
|
33
|
+
//
|
19
34
|
this.element.addEventListener('dragenter', this.handleDragEnter.bind(this), true);
|
20
35
|
this.element.addEventListener('dragover', this.handleDragOver.bind(this), true);
|
21
36
|
this.element.addEventListener('drop', this.handleOnDrop.bind(this), true);
|
@@ -56,24 +71,38 @@ export class AXUploaderZoneDirective {
|
|
56
71
|
removeZone() {
|
57
72
|
this.overlayElement.remove();
|
58
73
|
}
|
59
|
-
browser() {
|
60
|
-
this.uploadService.browse();
|
74
|
+
async browser() {
|
75
|
+
const requests = await this.uploadService.browse({ accept: this.accept, multiple: this.multiple });
|
76
|
+
this.onChanged.emit({
|
77
|
+
component: this,
|
78
|
+
requests,
|
79
|
+
isUserInteraction: true
|
80
|
+
});
|
61
81
|
}
|
62
82
|
get __hostClass() {
|
63
83
|
return `ax-drop-zone`;
|
64
84
|
}
|
65
85
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderZoneDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
|
66
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: AXUploaderZoneDirective, selector: "[axUploaderZone]", inputs: { multiple: "multiple" }, host: { properties: { "class": "this.__hostClass" } }, ngImport: i0 }); }
|
86
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.2", type: AXUploaderZoneDirective, selector: "[axUploaderZone]", inputs: { multiple: "multiple", accept: "accept" }, outputs: { onChanged: "onChanged", onFileUploadComplete: "onFileUploadComplete", onFilesUploadComplete: "onFilesUploadComplete" }, host: { properties: { "class": "this.__hostClass" } }, providers: [AXUnsubscriber], ngImport: i0 }); }
|
67
87
|
}
|
68
88
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderZoneDirective, decorators: [{
|
69
89
|
type: Directive,
|
70
90
|
args: [{
|
71
91
|
selector: '[axUploaderZone]',
|
92
|
+
providers: [AXUnsubscriber]
|
72
93
|
}]
|
73
94
|
}], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { multiple: [{
|
74
95
|
type: Input
|
96
|
+
}], accept: [{
|
97
|
+
type: Input
|
98
|
+
}], onChanged: [{
|
99
|
+
type: Output
|
100
|
+
}], onFileUploadComplete: [{
|
101
|
+
type: Output
|
102
|
+
}], onFilesUploadComplete: [{
|
103
|
+
type: Output
|
75
104
|
}], __hostClass: [{
|
76
105
|
type: HostBinding,
|
77
106
|
args: ['class']
|
78
107
|
}] } });
|
79
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkZXItem9uZS5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvdXBsb2FkZXIvc3JjL2xpYi91cGxvYWRlci16b25lLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0sbUJBQW1CLENBQUM7QUFDbEQsT0FBTyxFQUFFLG9CQUFvQixFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDaEUsT0FBTyxFQUFFLFNBQVMsRUFBRSxVQUFVLEVBQUUsV0FBVyxFQUFFLEtBQUssRUFBYSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDN0YsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7O0FBSXZELE1BQU0sT0FBTyx1QkFBdUI7SUFVbEMsSUFBSTtRQUNGLElBQUksQ0FBQyxPQUFPLEdBQUcsSUFBSSxDQUFDLFVBQVUsQ0FBQyxhQUE0QixDQUFDO1FBQzVELElBQUksQ0FBQyxPQUFPLENBQUMsS0FBSyxDQUFDLFFBQVEsR0FBRyxVQUFVLENBQUM7SUFDM0MsQ0FBQztJQUVELFlBQW9CLFVBQXNCO1FBQXRCLGVBQVUsR0FBVixVQUFVLENBQVk7UUFkakMsYUFBUSxHQUFHLElBQUksQ0FBQztRQUNqQixnQkFBVyxHQUFrQixNQUFNLENBQUMsYUFBYSxDQUFDLENBQUM7UUFDbkQsa0JBQWEsR0FBc0IsTUFBTSxDQUFDLGlCQUFpQix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lLmJyb3dzZSh7IGFjY2VwdDogdGhpcy5hY2NlcHQsIG11bHRpcGxlOiB0aGlzLm11bHRpcGxlIH0pO1xuICAgIHRoaXMub25DaGFuZ2VkLmVtaXQoe1xuICAgICAgY29tcG9uZW50OiB0aGlzLFxuICAgICAgcmVxdWVzdHMsXG4gICAgICBpc1VzZXJJbnRlcmFjdGlvbjogdHJ1ZVxuICAgIH0pO1xuICB9XG5cbiAgQEhvc3RCaW5kaW5nKCdjbGFzcycpXG4gIGdldCBfX2hvc3RDbGFzcygpOiBzdHJpbmcge1xuICAgIHJldHVybiBgYXgtZHJvcC16b25lYDtcbiAgfVxufVxuIl19
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { signal } from '@angular/core';
|
1
|
+
import { computed, signal } from '@angular/core';
|
2
2
|
export class AXUploadRequest {
|
3
3
|
get name() {
|
4
4
|
return this.file.name;
|
@@ -16,15 +16,18 @@ export class AXUploadRequest {
|
|
16
16
|
get size() {
|
17
17
|
return this.file.size;
|
18
18
|
}
|
19
|
-
|
20
|
-
this.
|
21
|
-
|
22
|
-
|
23
|
-
this.
|
19
|
+
get file() {
|
20
|
+
return this.uploadFile;
|
21
|
+
}
|
22
|
+
constructor(uploadFile) {
|
23
|
+
this.uploadFile = uploadFile;
|
24
|
+
this._progress = signal(0);
|
25
|
+
this.progress = computed(() => this._progress());
|
26
|
+
this._estimateTime = signal(0);
|
27
|
+
this.estimateTime = computed(() => this._estimateTime());
|
28
|
+
this._status = signal('new');
|
29
|
+
this.status = computed(() => this._status());
|
24
30
|
this.bytesTransferred = 0;
|
25
|
-
this.uploadSpeed = 1000000; // Simulated upload speed in bytes per interval (e.g., 50KB per interval)
|
26
|
-
this.interval = 1000;
|
27
|
-
this.intervalId = -1;
|
28
31
|
}
|
29
32
|
estimateTimeRemaining(bytesTransferred) {
|
30
33
|
const now = Date.now();
|
@@ -37,32 +40,35 @@ export class AXUploadRequest {
|
|
37
40
|
const estimatedTime = Math.ceil(remainingBytes / speed); // Time in milliseconds
|
38
41
|
return estimatedTime; // Return the estimated time in milliseconds
|
39
42
|
}
|
43
|
+
setTransferredBytes(value) {
|
44
|
+
this.bytesTransferred = value;
|
45
|
+
this.updateEstimateTime();
|
46
|
+
}
|
47
|
+
updateEstimateTime() {
|
48
|
+
this._estimateTime.set(this.estimateTimeRemaining(this.bytesTransferred));
|
49
|
+
const progress = Math.floor((this.bytesTransferred / this.size) * 100);
|
50
|
+
this._progress.set(progress);
|
51
|
+
}
|
40
52
|
async upload() {
|
41
53
|
this.startTime = Date.now();
|
42
|
-
this.
|
43
|
-
this.
|
44
|
-
this.
|
45
|
-
this.
|
46
|
-
if (this.bytesTransferred > this.size) {
|
47
|
-
this.bytesTransferred = this.size;
|
48
|
-
}
|
49
|
-
const progress = Math.floor((this.bytesTransferred / this.size) * 100);
|
50
|
-
this.progress.set(progress);
|
51
|
-
this.estimateTime.set(this.estimateTimeRemaining(this.bytesTransferred));
|
52
|
-
if (this.bytesTransferred === this.size) {
|
53
|
-
clearInterval(this.intervalId);
|
54
|
-
this.progress.set(100);
|
55
|
-
this.status.set('completed');
|
56
|
-
}
|
57
|
-
}, this.interval);
|
54
|
+
this._progress.set(0);
|
55
|
+
this._status.set('inprogress');
|
56
|
+
if (this.onStart)
|
57
|
+
this.onStart(this);
|
58
58
|
}
|
59
59
|
cancel() {
|
60
|
-
this.
|
60
|
+
this._status.set('canceled');
|
61
61
|
this.bytesTransferred = 0;
|
62
|
-
this.
|
63
|
-
this.
|
64
|
-
|
65
|
-
|
62
|
+
this._estimateTime.set(0);
|
63
|
+
this._progress.set(0);
|
64
|
+
}
|
65
|
+
finish(data) {
|
66
|
+
this._status.set('completed');
|
67
|
+
this.bytesTransferred = this.size;
|
68
|
+
this._estimateTime.set(0);
|
69
|
+
this._progress.set(100);
|
70
|
+
if (this.onComplete)
|
71
|
+
this.onComplete(this);
|
66
72
|
}
|
67
73
|
}
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
74
|
+
//# sourceMapping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GxldGVkJyk7XG4gICAgdGhpcy5ieXRlc1RyYW5zZmVycmVkID0gdGhpcy5zaXplO1xuICAgIHRoaXMuX2VzdGltYXRlVGltZS5zZXQoMCk7XG4gICAgdGhpcy5fcHJvZ3Jlc3Muc2V0KDEwMCk7XG4gICAgaWYgKHRoaXMub25Db21wbGV0ZSlcbiAgICAgIHRoaXMub25Db21wbGV0ZSh0aGlzKTtcbiAgfVxufVxuIl19
|
@@ -9,13 +9,11 @@ import { AXDateTimeModule } from '@acorex/core/date-time';
|
|
9
9
|
import { AXFileModule } from '@acorex/core/file';
|
10
10
|
import { AXFormatModule } from '@acorex/core/format';
|
11
11
|
import { AXTranslationModule } from '@acorex/core/translation';
|
12
|
-
import { HttpClientModule } from '@angular/common/http';
|
13
12
|
import { AXUploaderBrowseDirective } from './uploader-browse-handle.directive';
|
14
13
|
import { AXUploaderDialogContainerComponent } from './uploader-dialog-container.component';
|
15
14
|
import { AXUploaderDropZoneComponent } from './uploader-drop-zone.component';
|
16
15
|
import { AXUploaderListComponent } from './uploader-list.component';
|
17
16
|
import { AXUploaderZoneDirective } from './uploader-zone.directive';
|
18
|
-
import { AXUploaderService } from './uploader.service';
|
19
17
|
import * as i0 from "@angular/core";
|
20
18
|
export class AXUploaderModule {
|
21
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
@@ -24,7 +22,6 @@ export class AXUploaderModule {
|
|
24
22
|
AXUploaderZoneDirective,
|
25
23
|
AXUploaderBrowseDirective,
|
26
24
|
AXUploaderDialogContainerComponent], imports: [CommonModule,
|
27
|
-
HttpClientModule,
|
28
25
|
AXDecoratorModule,
|
29
26
|
AXButtonModule,
|
30
27
|
AXTranslationModule,
|
@@ -34,8 +31,7 @@ export class AXUploaderModule {
|
|
34
31
|
AXDateTimeModule,
|
35
32
|
AXCircularProgressModule,
|
36
33
|
AXPopupModule], exports: [AXUploaderDropZoneComponent, AXUploaderZoneDirective, AXUploaderBrowseDirective, AXUploaderDialogContainerComponent] }); }
|
37
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderModule,
|
38
|
-
HttpClientModule,
|
34
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.0.2", ngImport: i0, type: AXUploaderModule, imports: [CommonModule,
|
39
35
|
AXDecoratorModule,
|
40
36
|
AXButtonModule,
|
41
37
|
AXTranslationModule,
|
@@ -58,7 +54,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
58
54
|
],
|
59
55
|
imports: [
|
60
56
|
CommonModule,
|
61
|
-
HttpClientModule,
|
62
57
|
AXDecoratorModule,
|
63
58
|
AXButtonModule,
|
64
59
|
AXTranslationModule,
|
@@ -70,7 +65,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
70
65
|
AXPopupModule,
|
71
66
|
],
|
72
67
|
exports: [AXUploaderDropZoneComponent, AXUploaderZoneDirective, AXUploaderBrowseDirective, AXUploaderDialogContainerComponent],
|
73
|
-
providers: [
|
68
|
+
providers: [],
|
74
69
|
}]
|
75
70
|
}] });
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
71
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkZXIubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3VwbG9hZGVyL3NyYy9saWIvdXBsb2FkZXIubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUMzR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IHByb3ZpZGVyczogW10sXG59KVxuZXhwb3J0IGNsYXNzIEFYVXBsb2FkZXJNb2R1bGUgeyB9XG4iXX0=
|
@@ -2,7 +2,7 @@ import { AXPopupService } from '@acorex/components/popup';
|
|
2
2
|
import { AXFileService } from '@acorex/core/file';
|
3
3
|
import { Injectable, inject } from '@angular/core';
|
4
4
|
import { sumBy } from 'lodash-es';
|
5
|
-
import { BehaviorSubject, interval, map, switchMap } from 'rxjs';
|
5
|
+
import { BehaviorSubject, interval, map, Subject, switchMap } from 'rxjs';
|
6
6
|
import { AXUploadRequest } from './uploader.models';
|
7
7
|
import * as i0 from "@angular/core";
|
8
8
|
export class AXUploaderService {
|
@@ -10,6 +10,8 @@ export class AXUploaderService {
|
|
10
10
|
this.popupService = inject(AXPopupService);
|
11
11
|
this.fileService = inject(AXFileService);
|
12
12
|
this.files$ = new BehaviorSubject([]);
|
13
|
+
this.onFileUploadComplete = new Subject();
|
14
|
+
this.onFilesUploadComplete = new Subject();
|
13
15
|
this.totalEstimateTime = interval(500).pipe(switchMap(() => this.files$.asObservable()), map((f) => sumBy(f, (c) => c.estimateTime())));
|
14
16
|
}
|
15
17
|
get files() {
|
@@ -35,12 +37,26 @@ export class AXUploaderService {
|
|
35
37
|
this.files.value
|
36
38
|
.filter((c) => c.status() == 'new')
|
37
39
|
.forEach((c) => {
|
40
|
+
c.onComplete = () => {
|
41
|
+
this.onFileUploadComplete.next({
|
42
|
+
component: this,
|
43
|
+
uploadedFile: c,
|
44
|
+
isUserInteraction: false
|
45
|
+
});
|
46
|
+
if (this.files.value.every(c => c.status() == 'completed')) {
|
47
|
+
this.onFilesUploadComplete.next({
|
48
|
+
component: this,
|
49
|
+
uploadedFiles: this.files.value,
|
50
|
+
isUserInteraction: false
|
51
|
+
});
|
52
|
+
}
|
53
|
+
};
|
38
54
|
c.upload();
|
39
55
|
});
|
40
56
|
}
|
41
|
-
async browse() {
|
57
|
+
async browse(options = { multiple: false }) {
|
42
58
|
try {
|
43
|
-
const files = await this.fileService.choose();
|
59
|
+
const files = await this.fileService.choose({ multiple: options?.multiple || false, accept: options.accept });
|
44
60
|
if (files.length) {
|
45
61
|
return this.add(files);
|
46
62
|
}
|
@@ -59,7 +75,6 @@ export class AXUploaderService {
|
|
59
75
|
this.startUpload();
|
60
76
|
return Promise.resolve(list);
|
61
77
|
}
|
62
|
-
upload() { }
|
63
78
|
async cancelAll() {
|
64
79
|
await Promise.all(this.files$.value.filter((c) => c.status() != 'completed').map((c) => c.cancel()));
|
65
80
|
}
|
@@ -78,4 +93,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
78
93
|
type: Injectable,
|
79
94
|
args: [{ providedIn: 'root' }]
|
80
95
|
}] });
|
81
|
-
//# sourceMappingURL=data:application/json;base64,
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXBsb2FkZXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy91cGxvYWRlci9zcmMvbGliL3VwbG9hZGVyLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzFELE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRCxPQUFPLEVBQUUsS0FBSyxFQUFFLE1BQU0sV0FBVyxDQUFDO0FBQ2xDLE9BQU8sRUFBRSxlQUFlLEVBQUUsUUFBUSxFQUFFLEdBQUcsRUFBRSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sTUFBTSxDQUFDO0FBQzFFLE9BQU8sRUFBNkQs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NlLmFsbCh0aGlzLmZpbGVzJC52YWx1ZS5maWx0ZXIoKGMpID0+IGMuc3RhdHVzKCkgIT0gJ2NvbXBsZXRlZCcpLm1hcCgoYykgPT4gYy5jYW5jZWwoKSkpO1xuICB9XG5cbiAgY2xlYXJBbGwoKSB7XG4gICAgdGhpcy5maWxlcyQudmFsdWUuZmlsdGVyKChjKSA9PiBjLnN0YXR1cygpICE9ICdpbnByb2dyZXNzJykuZm9yRWFjaCgoYykgPT4gdGhpcy5yZW1vdmUoYykpO1xuICB9XG5cbiAgcmVtb3ZlKGl0ZW06IEFYVXBsb2FkUmVxdWVzdCkge1xuICAgIGxldCBjdXJyZW50VmFsdWUgPSB0aGlzLmZpbGVzJC52YWx1ZTtcbiAgICBjdXJyZW50VmFsdWUgPSBjdXJyZW50VmFsdWUuZmlsdGVyKChjKSA9PiBjICE9IGl0ZW0pO1xuICAgIHRoaXMuZmlsZXMkLm5leHQoY3VycmVudFZhbHVlKTtcbiAgfVxufVxuIl19
|
@@ -10,7 +10,7 @@ export class AXWysiwygContainerComponent extends MXBaseComponent {
|
|
10
10
|
this.view = signal(null);
|
11
11
|
this.service = inject(AXWysiwygService);
|
12
12
|
afterNextRender(() => {
|
13
|
-
this.view.set(this.getHostElement().querySelector('ax-
|
13
|
+
this.view.set(this.getHostElement().querySelector('.ax-editor-wrapper'));
|
14
14
|
this.wysiwyg.set(new AXWysiwyg(this.view(), {
|
15
15
|
placeholder: 'Write Your Message ...',
|
16
16
|
}));
|
@@ -24,4 +24,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.2", ngImpor
|
|
24
24
|
type: Component,
|
25
25
|
args: [{ selector: 'ax-wysiwyg-container', encapsulation: ViewEncapsulation.None, template: "<ng-content></ng-content>\n", styles: [".ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container:not(.ql-disabled) li[data-list=checked]>.ql-ui,.ql-container:not(.ql-disabled) li[data-list=unchecked]>.ql-ui{cursor:pointer}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0}@supports (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-set:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor p,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{counter-reset:list-0 list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor table{border-collapse:collapse}.ql-editor td{border:1px solid #000;padding:2px 5px}.ql-editor ol{padding-left:1.5em}.ql-editor li{list-style-type:none;padding-left:1.5em;position:relative}.ql-editor li>.ql-ui:before{display:inline-block;margin-left:-1.5em;margin-right:.3em;text-align:right;white-space:nowrap;width:1.2em}.ql-editor li[data-list=checked]>.ql-ui,.ql-editor li[data-list=unchecked]>.ql-ui{color:#777}.ql-editor li[data-list=bullet]>.ql-ui:before{content:\"\\2022\"}.ql-editor li[data-list=checked]>.ql-ui:before{content:\"\\2611\"}.ql-editor li[data-list=unchecked]>.ql-ui:before{content:\"\\2610\"}@supports (counter-set:none){.ql-editor li[data-list]{counter-set:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list]{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered]{counter-increment:list-0}.ql-editor li[data-list=ordered]>.ql-ui:before{content:counter(list-0,decimal) \". \"}.ql-editor li[data-list=ordered].ql-indent-1{counter-increment:list-1}.ql-editor li[data-list=ordered].ql-indent-1>.ql-ui:before{content:counter(list-1,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-set:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-2{counter-increment:list-2}.ql-editor li[data-list=ordered].ql-indent-2>.ql-ui:before{content:counter(list-2,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-set:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-3{counter-increment:list-3}.ql-editor li[data-list=ordered].ql-indent-3>.ql-ui:before{content:counter(list-3,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-set:list-4 list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-4{counter-increment:list-4}.ql-editor li[data-list=ordered].ql-indent-4>.ql-ui:before{content:counter(list-4,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-set:list-5 list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-5{counter-increment:list-5}.ql-editor li[data-list=ordered].ql-indent-5>.ql-ui:before{content:counter(list-5,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-set:list-6 list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-6{counter-increment:list-6}.ql-editor li[data-list=ordered].ql-indent-6>.ql-ui:before{content:counter(list-6,decimal) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-set:list-7 list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-6{counter-reset:list-7 list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-7{counter-increment:list-7}.ql-editor li[data-list=ordered].ql-indent-7>.ql-ui:before{content:counter(list-7,lower-alpha) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-set:list-8 list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-7{counter-reset:list-8 list-9}}.ql-editor li[data-list=ordered].ql-indent-8{counter-increment:list-8}.ql-editor li[data-list=ordered].ql-indent-8>.ql-ui:before{content:counter(list-8,lower-roman) \". \"}@supports (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-set:list-9}}@supports not (counter-set:none){.ql-editor li[data-list].ql-indent-8{counter-reset:list-9}}.ql-editor li[data-list=ordered].ql-indent-9{counter-increment:list-9}.ql-editor li[data-list=ordered].ql-indent-9>.ql-ui:before{content:counter(list-9,decimal) \". \"}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor li.ql-direction-rtl{padding-right:1.5em}.ql-editor li.ql-direction-rtl>.ql-ui:before{margin-left:.3em;margin-right:-1.5em;text-align:left}.ql-editor table{table-layout:fixed;width:100%}.ql-editor table td{outline:none}.ql-editor .ql-code-block-container{font-family:monospace}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor .ql-ui{position:absolute}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}ax-wysiwyg-container{border:1px solid rgb(var(--ax-color-border-default));border-radius:var(--ax-rounded-border-default);width:100%;display:block;overflow-x:auto}\n/*! Bundled license information:\n\nquill/dist/quill.core.css:\n (*!\n * Quill Editor v2.0.2\n * https://quilljs.com\n * Copyright (c) 2017-2024, Slab\n * Copyright (c) 2014, Jason Chen\n * Copyright (c) 2013, salesforce.com\n *)\n*/\n"] }]
|
26
26
|
}], ctorParameters: () => [] });
|
27
|
-
//# sourceMappingURL=data:application/json;base64,
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3lzaXd5Zy1jb250YWluZXIuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3d5c2l3eWcvc3JjL2xpYi93eXNpd3lnL3d5c2l3eWctY29udGFpbmVyL3d5c2l3eWctY29udGFpbmVyLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy93eXNpd3lnL3NyYy9saWIvd3lzaXd5Zy93eXNpd3lnLWNvbnRhaW5lci93eXNpd3lnLWNvbnRhaW5lci5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDaEQsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzVELE9BQU8sRUFBRSxTQUFTLEVBQUUsaUJBQWlCLEVBQUUsZUFBZSxFQUFFLE1BQU0sRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDOUYsT0FBTyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sb0JBQW9CLENBQUM7O0FBUXRELE1BQU0sT0FBTywyQkFBNEIsU0FBUSxlQUFlO0lBSzlEO1FBQ0UsS0FBSyx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