@banta/sdk 4.7.12 → 4.7.14
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/esm2020/lib/common/common.module.mjs +2 -2
- package/esm2020/lib/common/timestamp.component.mjs +2 -2
- package/fesm2015/banta-sdk.mjs +101 -103
- package/fesm2015/banta-sdk.mjs.map +1 -1
- package/fesm2020/banta-sdk.mjs +98 -100
- package/fesm2020/banta-sdk.mjs.map +1 -1
- package/lib/common/timestamp.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|
|
10
10
|
import { BantaTrustResourceUrlPipe } from './trust-resource-url.pipe';
|
|
11
11
|
import { BantaAttachmentComponent } from './attachment/attachment.component';
|
|
12
12
|
import { BantaMentionLinkerPipe } from './mention-linker.pipe';
|
|
13
|
-
import { TimerPool } from '
|
|
13
|
+
import { TimerPool } from './timer-pool.service';
|
|
14
14
|
import * as i0 from "@angular/core";
|
|
15
15
|
const COMPONENTS = [
|
|
16
16
|
TimestampComponent,
|
|
@@ -65,4 +65,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
65
65
|
exports: COMPONENTS
|
|
66
66
|
}]
|
|
67
67
|
}] });
|
|
68
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
68
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbW9uLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3Nkay9zcmMvbGliL2NvbW1vbi9jb21tb24ubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQXVCLE1BQU0sZUFBZSxDQUFDO0FBQzlELE9BQU8sRUFBRSxrQkFBa0IsRU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xyXG4gICAgZGVjbGFyYXRpb25zOiBDT01QT05FTlRTLFxyXG4gICAgaW1wb3J0czogW1xyXG4gICAgICAgIENvbW1vbk1vZHVsZSxcclxuICAgICAgICBNYXRJY29uTW9kdWxlLFxyXG4gICAgICAgIE1hdFByb2dyZXNzU3Bpbm5lck1vZHVsZSxcclxuICAgICAgICBNYXRCdXR0b25Nb2R1bGVcclxuICAgIF0sXHJcbiAgICBleHBvcnRzOiBDT01QT05FTlRTXHJcbn0pXHJcbmV4cG9ydCBjbGFzcyBCYW50YUNvbW1vbk1vZHVsZSB7XHJcbiAgICBzdGF0aWMgZm9yUm9vdCgpOiBNb2R1bGVXaXRoUHJvdmlkZXJzPEJhbnRhQ29tbW9uTW9kdWxlPiB7XHJcbiAgICAgICAgcmV0dXJuIHtcclxuICAgICAgICAgICAgbmdNb2R1bGU6IEJhbnRhQ29tbW9uTW9kdWxlLFxyXG4gICAgICAgICAgICBwcm92aWRlcnM6IFtcclxuICAgICAgICAgICAgICAgIFRpbWVyUG9vbFxyXG4gICAgICAgICAgICBdXHJcbiAgICAgICAgfVxyXG4gICAgfVxyXG59Il19
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Component, Input } from "@angular/core";
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "
|
|
3
|
+
import * as i1 from "../../lib/common/timer-pool.service";
|
|
4
4
|
import * as i2 from "@angular/common";
|
|
5
5
|
export class TimestampComponent {
|
|
6
6
|
constructor(timerPool) {
|
|
@@ -120,4 +120,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
120
120
|
}], ctorParameters: function () { return [{ type: i1.TimerPool }]; }, propDecorators: { value: [{
|
|
121
121
|
type: Input
|
|
122
122
|
}] } });
|
|
123
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
123
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGltZXN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xuICAgICAgICB0aGlzLl9kZXN0cm95ZWQgPSB0cnVlO1xyXG4gICAgICAgIHRoaXMudGltZXJVbnN1YnNjcmliZT8uKCk7XHJcbiAgICB9XHJcblxyXG4gICAgQElucHV0KClcclxuICAgIGdldCB2YWx1ZSgpIHtcclxuICAgICAgICByZXR1cm4gdGhpcy5fdmFsdWU7XHJcbiAgICB9XHJcblxyXG4gICAgc2hvd0Fic29sdXRlID0gZmFsc2U7XHJcblxyXG4gICAgdXBkYXRlKCkge1xyXG4gICAgICAgIGlmICh0aGlzLl9kZXN0cm95ZWQpXHJcbiAgICAgICAgICAgIHJldHVybjtcclxuICAgICAgICBcclxuICAgICAgICBsZXQgbm93ID0gRGF0ZS5ub3coKTtcclxuICAgICAgICBsZXQgZGlmZiA9IG5vdyAtIHRoaXMudmFsdWU7XHJcbiAgICAgICAgbGV0IG1pbnV0ZSA9IDEwMDAqNjA7XHJcbiAgICAgICAgbGV0IGhvdXIgPSBtaW51dGUgKiA2MDtcclxuICAgICAgICBsZXQgZGF5ID0gaG91ciAqIDI0O1xyXG4gICAgICAgIGxldCB3ZWVrID0gZGF5ICogNztcclxuICAgICAgICBsZXQgbW9udGggPSBkYXkgKiAzMDtcclxuICAgICAgICBsZXQgeWVhciA9IGRheSAqIDM2NTtcclxuICAgICAgICB0aGlzLnNob3dBYnNvbHV0ZSA9IGZhbHNlO1xyXG4gICAgICAgIGxldCB1cGRhdGVUaW1lID0gMDtcclxuXHJcbiAgICAgICAgaWYgKGRpZmYgPiB5ZWFyKSB7XHJcbiAgICAgICAgICAgIHRoaXMuc2hvd0Fic29sdXRlID0gdHJ1ZTtcclxuICAgICAgICAgICAgdGhpcy5yZWxhdGl2ZSA9ICdhYnMnO1xyXG4gICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBpZiAoZGlmZiA+IG1vbnRoKSB7XHJcbiAgICAgICAgICAgIGxldCBtb250aHMgPSBNYXRoLmZsb29yKGRpZmYgLyBtb250aCk7XHJcblxyXG4gICAgICAgICAgICBpZiAobW9udGhzID09PSAxKVxyXG4gICAgICAgICAgICAgICAgdGhpcy5yZWxhdGl2ZSA9IGAke21vbnRoc30gbW9udGggYWdvYDtcclxuICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAgdGhpcy5yZWxhdGl2ZSA9IGAke21vbnRoc30gbW9udGhzIGFnb2A7XHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgIH0gZWxzZSBpZiAoZGlmZiA+IHdlZWspIHtcclxuICAgICAgICAgICAgbGV0IHdlZWtzID0gTWF0aC5mbG9vcihkaWZmIC8gd2Vlayk7XHJcblxyXG4gICAgICAgICAgICBpZiAod2Vla3MgPT09IDEpXHJcbiAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aXZlID0gYCR7d2Vla3N9IHdlZWsgYWdvYDtcclxuICAgICAgICAgICAgZWxzZVxyXG4gICAgICAgICAgICAgICAgdGhpcy5yZWxhdGl2ZSA9IGAke3dlZWtzfSB3ZWVrcyBhZ29gO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZGlmZiA+IGRheSkge1xyXG4gICAgICAgICAgICBsZXQgZGF5cyA9IE1hdGguZmxvb3IoZGlmZiAvIGRheSk7XHJcbiAgICAgICAgICAgIGlmIChkYXlzID09PSAxKVxyXG4gICAgICAgICAgICAgICAgdGhpcy5yZWxhdGl2ZSA9IGAke2RheXN9IGRheSBhZ29gO1xyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aXZlID0gYCR7ZGF5c30gZGF5cyBhZ29gO1xyXG4gICAgICAgIH0gZWxzZSBpZiAoZGlmZiA+IGhvdXIpIHtcclxuICAgICAgICAgICAgbGV0IGhvdXJzID0gTWF0aC5mbG9vcihkaWZmIC8gaG91cik7XHJcbiAgICAgICAgICAgIGlmIChob3VycyA9PT0gMSlcclxuICAgICAgICAgICAgICAgIHRoaXMucmVsYXRpdmUgPSBgJHtob3Vyc30gaG91ciBhZ29gO1xyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aXZlID0gYCR7aG91cnN9IGhvdXJzIGFnb2A7XHJcbiAgICAgICAgICAgIFxyXG4gICAgICAgICAgICB1cGRhdGVUaW1lID0gMTAwMCAqIDYwICogMzA7XHJcbiAgICAgICAgfSBlbHNlIGlmIChkaWZmID4gbWludXRlKSB7XHJcbiAgICAgICAgICAgIGxldCBtaW51dGVzID0gTWF0aC5mbG9vcihkaWZmIC8gbWludXRlKTtcclxuICAgICAgICAgICAgaWYgKG1pbnV0ZXMgPT09IDEpXHJcbiAgICAgICAgICAgICAgICB0aGlzLnJlbGF0aXZlID0gYCR7bWludXRlc30gbWludXRlIGFnb2A7XHJcbiAgICAgICAgICAgIGVsc2VcclxuICAgICAgICAgICAgICAgIHRoaXMucmVsYXRpdmUgPSBgJHttaW51dGVzfSBtaW51dGVzIGFnb2A7XHJcbiAgICAgICAgICAgIHVwZGF0ZVRpbWUgPSAxMDAwICogNDU7XHJcbiAgICAgICAgfSBlbHNlIGlmIChkaWZmID4gMzBfMDAwKSB7XHJcbiAgICAgICAgICAgIHRoaXMucmVsYXRpdmUgPSBgYWJvdXQgYSBtaW51dGUgYWdvYDtcclxuICAgICAgICAgICAgdXBkYXRlVGltZSA9IDEwMDAgKiA2MDtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICB0aGlzLnJlbGF0aXZlID0gYGp1c3Qgbm93YDtcclxuICAgICAgICAgICAgdXBkYXRlVGltZSA9IDEwMDAgKiAzMDtcclxuICAgICAgICB9XHJcbiAgICAgICAgXHJcbiAgICAgICAgaWYgKHR5cGVvZiB3aW5kb3cgIT09ICd1bmRlZmluZWQnKSB7XHJcbiAgICAgICAgICAgIGlmICh0aGlzLnRpbWVySW50ZXJ2YWwgIT09IHVwZGF0ZVRpbWUpIHtcclxuICAgICAgICAgICAgICAgIHRoaXMudGltZXJJbnRlcnZhbCA9IHVwZGF0ZVRpbWU7XHJcbiAgICAgICAgICAgICAgICB0aGlzLnRpbWVyVW5zdWJzY3JpYmU/LigpO1xyXG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZVRpbWUgPiAwKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy50aW1lclVuc3Vic2NyaWJlID0gdGhpcy50aW1lclBvb2wuYWRkVGltZXIodXBkYXRlVGltZSwgKCkgPT4gdGhpcy51cGRhdGUoKSk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcbiAgICB9XHJcblxyXG4gICAgc2V0IHZhbHVlKHYpIHtcclxuICAgICAgICBpZiAodGhpcy5fdmFsdWUgIT09IHYpIHtcclxuICAgICAgICAgICAgdGhpcy5fdmFsdWUgPSB2O1xyXG4gICAgICAgICAgICB0aGlzLnVwZGF0ZSgpO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxufSJdfQ==
|
package/fesm2015/banta-sdk.mjs
CHANGED
|
@@ -2,8 +2,9 @@ import { Observable, Subject, BehaviorSubject, Subscription } from 'rxjs';
|
|
|
2
2
|
import { publish, take } from 'rxjs/operators';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Component, Input, ViewChild, Pipe, Inject, Optional, Output, HostBinding, NgModule, ViewChildren, Directive, TemplateRef, ContentChild, Injectable as Injectable$1 } from '@angular/core';
|
|
5
|
-
import
|
|
6
|
-
import
|
|
5
|
+
import { __decorate, __awaiter } from 'tslib';
|
|
6
|
+
import * as i1$2 from '@banta/common';
|
|
7
|
+
import { Injectable, CommentsOrder, SocketRPC, RpcEvent, DurableSocket } from '@banta/common';
|
|
7
8
|
import * as i2 from '@angular/common';
|
|
8
9
|
import { CommonModule } from '@angular/common';
|
|
9
10
|
import * as i2$1 from '@angular/material/icon';
|
|
@@ -11,22 +12,19 @@ import { MatIconModule } from '@angular/material/icon';
|
|
|
11
12
|
import * as marked from 'marked';
|
|
12
13
|
import createDOMPurify from 'dompurify';
|
|
13
14
|
import twemoji$1 from 'twemoji';
|
|
14
|
-
import * as i1
|
|
15
|
+
import * as i1 from '@angular/platform-browser';
|
|
15
16
|
import * as i3 from '@angular/cdk/bidi';
|
|
16
17
|
import * as i4 from '@angular/material/progress-spinner';
|
|
17
18
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
18
19
|
import * as i6 from '@angular/material/button';
|
|
19
20
|
import { MatButtonModule } from '@angular/material/button';
|
|
20
|
-
import { __decorate, __awaiter } from 'tslib';
|
|
21
|
-
import * as i1$3 from '@banta/common';
|
|
22
|
-
import { Injectable, CommentsOrder, SocketRPC, RpcEvent, DurableSocket } from '@banta/common';
|
|
23
21
|
import * as i4$1 from '@angular/forms';
|
|
24
22
|
import { FormsModule } from '@angular/forms';
|
|
25
23
|
import * as i6$1 from '@angular/material/form-field';
|
|
26
24
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
27
25
|
import * as i7 from '@angular/material/input';
|
|
28
26
|
import { MatInputModule } from '@angular/material/input';
|
|
29
|
-
import * as i1$
|
|
27
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
30
28
|
import { OverlayModule } from '@angular/cdk/overlay';
|
|
31
29
|
import * as i4$2 from '@angular/cdk/portal';
|
|
32
30
|
import { PortalModule } from '@angular/cdk/portal';
|
|
@@ -58,6 +56,89 @@ function lazyConnection(options) {
|
|
|
58
56
|
return obs.pipe(publish()).refCount();
|
|
59
57
|
}
|
|
60
58
|
|
|
59
|
+
/**
|
|
60
|
+
* Provides a way to hook in to a shared set of timers, instead of creating a timer per instance.
|
|
61
|
+
* This is very useful for cases where the update is not extremely time-sensitive, but happens at scale.
|
|
62
|
+
* The principal use case is the TimestampComponent. When several hundred (or several thousand) comments are
|
|
63
|
+
* being displayed, we do not want to trigger thousands of independent relative timestamp updates, because over
|
|
64
|
+
* time the updates will saturate the CPU since they don't perfectly align.
|
|
65
|
+
*/
|
|
66
|
+
let TimerPool = class TimerPool {
|
|
67
|
+
constructor() {
|
|
68
|
+
this.subscriptions = new Map();
|
|
69
|
+
this.newSubscriptions = new Map();
|
|
70
|
+
this.removedSubscriptions = new Map();
|
|
71
|
+
}
|
|
72
|
+
addTimer(interval, callback) {
|
|
73
|
+
var _a;
|
|
74
|
+
if (interval <= 0) {
|
|
75
|
+
console.warn(`Refusing to set timer with interval of ${interval}!`);
|
|
76
|
+
return () => { };
|
|
77
|
+
}
|
|
78
|
+
let state;
|
|
79
|
+
let sizeWas = this.subscriptions.size;
|
|
80
|
+
if (!this.subscriptions.has(interval)) {
|
|
81
|
+
state = { subscribers: [] };
|
|
82
|
+
state.handle = setInterval(() => {
|
|
83
|
+
console.debug(`[Banta/TimerPool] Notifying ${state.subscribers.length} subs [${interval}ms]`);
|
|
84
|
+
state.subscribers.forEach(sub => sub());
|
|
85
|
+
}, interval);
|
|
86
|
+
this.subscriptions.set(interval, state);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
state = this.subscriptions.get(interval);
|
|
90
|
+
}
|
|
91
|
+
state.subscribers.push(callback);
|
|
92
|
+
// Debug information //////////////////////////
|
|
93
|
+
//
|
|
94
|
+
if (!this.newSubscriptions.has(interval))
|
|
95
|
+
this.newSubscriptions.set(interval, 0);
|
|
96
|
+
this.newSubscriptions.set(interval, ((_a = this.newSubscriptions.get(interval)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
97
|
+
clearTimeout(this.newSubscriptionsNotice);
|
|
98
|
+
this.newSubscriptionsNotice = setTimeout(() => {
|
|
99
|
+
for (let [interval, count] of this.newSubscriptions) {
|
|
100
|
+
console.debug(`[Banta/TimerPool] ${count} new subscriptions to ${interval}ms [${state.subscribers.length} total]`);
|
|
101
|
+
}
|
|
102
|
+
this.newSubscriptions.clear();
|
|
103
|
+
});
|
|
104
|
+
//
|
|
105
|
+
///////////////////////////////////////////////
|
|
106
|
+
if (sizeWas === 0) {
|
|
107
|
+
console.debug(`[Banta/TimerPool] No longer idle.`);
|
|
108
|
+
}
|
|
109
|
+
// Unsubscribe function
|
|
110
|
+
return () => {
|
|
111
|
+
var _a;
|
|
112
|
+
let state = this.subscriptions.get(interval);
|
|
113
|
+
let index = state.subscribers.indexOf(callback);
|
|
114
|
+
if (index >= 0)
|
|
115
|
+
state.subscribers.splice(index, 1);
|
|
116
|
+
if (state.subscribers.length === 0) {
|
|
117
|
+
clearInterval(state.handle);
|
|
118
|
+
this.subscriptions.delete(interval);
|
|
119
|
+
}
|
|
120
|
+
if (!this.removedSubscriptions.has(interval))
|
|
121
|
+
this.removedSubscriptions.set(interval, 0);
|
|
122
|
+
this.removedSubscriptions.set(interval, ((_a = this.removedSubscriptions.get(interval)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
123
|
+
// Debug information ////////////////////////////////////////////////////////////////////
|
|
124
|
+
clearTimeout(this.removedSubscriptionsNotice);
|
|
125
|
+
this.removedSubscriptionsNotice = setTimeout(() => {
|
|
126
|
+
var _a, _b;
|
|
127
|
+
for (let [interval, count] of this.removedSubscriptions) {
|
|
128
|
+
let state = this.subscriptions.get(interval);
|
|
129
|
+
console.debug(`[Banta/TimerPool] ${count} unsubscribed from ${interval}ms [${(_b = (_a = state === null || state === void 0 ? void 0 : state.subscribers) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0} remain]`);
|
|
130
|
+
}
|
|
131
|
+
if (this.subscriptions.size === 0)
|
|
132
|
+
console.debug(`[Banta/TimerPool] All subscriptions have been removed. Now idle.`);
|
|
133
|
+
this.removedSubscriptions.clear();
|
|
134
|
+
});
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
};
|
|
138
|
+
TimerPool = __decorate([
|
|
139
|
+
Injectable()
|
|
140
|
+
], TimerPool);
|
|
141
|
+
|
|
61
142
|
class TimestampComponent {
|
|
62
143
|
constructor(timerPool) {
|
|
63
144
|
this.timerPool = timerPool;
|
|
@@ -156,7 +237,7 @@ class TimestampComponent {
|
|
|
156
237
|
}
|
|
157
238
|
}
|
|
158
239
|
}
|
|
159
|
-
TimestampComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TimestampComponent, deps: [{ token:
|
|
240
|
+
TimestampComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: TimestampComponent, deps: [{ token: TimerPool }], target: i0.ɵɵFactoryTarget.Component });
|
|
160
241
|
TimestampComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: TimestampComponent, selector: "banta-timestamp", inputs: { value: "value" }, ngImport: i0, template: `
|
|
161
242
|
<span *ngIf="showAbsolute" [title]="value | date : 'short'">
|
|
162
243
|
{{value | date : 'shortDate'}}
|
|
@@ -175,7 +256,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
175
256
|
{{relative}}
|
|
176
257
|
</span>
|
|
177
258
|
` }]
|
|
178
|
-
}], ctorParameters: function () { return [{ type:
|
|
259
|
+
}], ctorParameters: function () { return [{ type: TimerPool }]; }, propDecorators: { value: [{
|
|
179
260
|
type: Input
|
|
180
261
|
}] } });
|
|
181
262
|
|
|
@@ -278,7 +359,7 @@ class BantaMarkdownToHtmlPipe {
|
|
|
278
359
|
}));
|
|
279
360
|
}
|
|
280
361
|
}
|
|
281
|
-
BantaMarkdownToHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaMarkdownToHtmlPipe, deps: [{ token: i1
|
|
362
|
+
BantaMarkdownToHtmlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaMarkdownToHtmlPipe, deps: [{ token: i1.DomSanitizer }, { token: BANTA_SDK_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
282
363
|
BantaMarkdownToHtmlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: BantaMarkdownToHtmlPipe, name: "markdownToHtml" });
|
|
283
364
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaMarkdownToHtmlPipe, decorators: [{
|
|
284
365
|
type: Pipe,
|
|
@@ -286,7 +367,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
286
367
|
name: 'markdownToHtml'
|
|
287
368
|
}]
|
|
288
369
|
}], ctorParameters: function () {
|
|
289
|
-
return [{ type: i1
|
|
370
|
+
return [{ type: i1.DomSanitizer }, { type: undefined, decorators: [{
|
|
290
371
|
type: Inject,
|
|
291
372
|
args: [BANTA_SDK_OPTIONS]
|
|
292
373
|
}, {
|
|
@@ -304,14 +385,14 @@ class BantaTrustResourceUrlPipe {
|
|
|
304
385
|
return this.sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
305
386
|
}
|
|
306
387
|
}
|
|
307
|
-
BantaTrustResourceUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaTrustResourceUrlPipe, deps: [{ token: i1
|
|
388
|
+
BantaTrustResourceUrlPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaTrustResourceUrlPipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
308
389
|
BantaTrustResourceUrlPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: BantaTrustResourceUrlPipe, name: "trustResourceUrl" });
|
|
309
390
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: BantaTrustResourceUrlPipe, decorators: [{
|
|
310
391
|
type: Pipe,
|
|
311
392
|
args: [{
|
|
312
393
|
name: 'trustResourceUrl'
|
|
313
394
|
}]
|
|
314
|
-
}], ctorParameters: function () { return [{ type: i1
|
|
395
|
+
}], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
|
|
315
396
|
|
|
316
397
|
class BantaMentionLinkerPipe {
|
|
317
398
|
transform(value, links) {
|
|
@@ -524,89 +605,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
524
605
|
type: Output
|
|
525
606
|
}] } });
|
|
526
607
|
|
|
527
|
-
/**
|
|
528
|
-
* Provides a way to hook in to a shared set of timers, instead of creating a timer per instance.
|
|
529
|
-
* This is very useful for cases where the update is not extremely time-sensitive, but happens at scale.
|
|
530
|
-
* The principal use case is the TimestampComponent. When several hundred (or several thousand) comments are
|
|
531
|
-
* being displayed, we do not want to trigger thousands of independent relative timestamp updates, because over
|
|
532
|
-
* time the updates will saturate the CPU since they don't perfectly align.
|
|
533
|
-
*/
|
|
534
|
-
let TimerPool = class TimerPool {
|
|
535
|
-
constructor() {
|
|
536
|
-
this.subscriptions = new Map();
|
|
537
|
-
this.newSubscriptions = new Map();
|
|
538
|
-
this.removedSubscriptions = new Map();
|
|
539
|
-
}
|
|
540
|
-
addTimer(interval, callback) {
|
|
541
|
-
var _a;
|
|
542
|
-
if (interval <= 0) {
|
|
543
|
-
console.warn(`Refusing to set timer with interval of ${interval}!`);
|
|
544
|
-
return () => { };
|
|
545
|
-
}
|
|
546
|
-
let state;
|
|
547
|
-
let sizeWas = this.subscriptions.size;
|
|
548
|
-
if (!this.subscriptions.has(interval)) {
|
|
549
|
-
state = { subscribers: [] };
|
|
550
|
-
state.handle = setInterval(() => {
|
|
551
|
-
console.debug(`[Banta/TimerPool] Notifying ${state.subscribers.length} subs [${interval}ms]`);
|
|
552
|
-
state.subscribers.forEach(sub => sub());
|
|
553
|
-
}, interval);
|
|
554
|
-
this.subscriptions.set(interval, state);
|
|
555
|
-
}
|
|
556
|
-
else {
|
|
557
|
-
state = this.subscriptions.get(interval);
|
|
558
|
-
}
|
|
559
|
-
state.subscribers.push(callback);
|
|
560
|
-
// Debug information //////////////////////////
|
|
561
|
-
//
|
|
562
|
-
if (!this.newSubscriptions.has(interval))
|
|
563
|
-
this.newSubscriptions.set(interval, 0);
|
|
564
|
-
this.newSubscriptions.set(interval, ((_a = this.newSubscriptions.get(interval)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
565
|
-
clearTimeout(this.newSubscriptionsNotice);
|
|
566
|
-
this.newSubscriptionsNotice = setTimeout(() => {
|
|
567
|
-
for (let [interval, count] of this.newSubscriptions) {
|
|
568
|
-
console.debug(`[Banta/TimerPool] ${count} new subscriptions to ${interval}ms [${state.subscribers.length} total]`);
|
|
569
|
-
}
|
|
570
|
-
this.newSubscriptions.clear();
|
|
571
|
-
});
|
|
572
|
-
//
|
|
573
|
-
///////////////////////////////////////////////
|
|
574
|
-
if (sizeWas === 0) {
|
|
575
|
-
console.debug(`[Banta/TimerPool] No longer idle.`);
|
|
576
|
-
}
|
|
577
|
-
// Unsubscribe function
|
|
578
|
-
return () => {
|
|
579
|
-
var _a;
|
|
580
|
-
let state = this.subscriptions.get(interval);
|
|
581
|
-
let index = state.subscribers.indexOf(callback);
|
|
582
|
-
if (index >= 0)
|
|
583
|
-
state.subscribers.splice(index, 1);
|
|
584
|
-
if (state.subscribers.length === 0) {
|
|
585
|
-
clearInterval(state.handle);
|
|
586
|
-
this.subscriptions.delete(interval);
|
|
587
|
-
}
|
|
588
|
-
if (!this.removedSubscriptions.has(interval))
|
|
589
|
-
this.removedSubscriptions.set(interval, 0);
|
|
590
|
-
this.removedSubscriptions.set(interval, ((_a = this.removedSubscriptions.get(interval)) !== null && _a !== void 0 ? _a : 0) + 1);
|
|
591
|
-
// Debug information ////////////////////////////////////////////////////////////////////
|
|
592
|
-
clearTimeout(this.removedSubscriptionsNotice);
|
|
593
|
-
this.removedSubscriptionsNotice = setTimeout(() => {
|
|
594
|
-
var _a, _b;
|
|
595
|
-
for (let [interval, count] of this.removedSubscriptions) {
|
|
596
|
-
let state = this.subscriptions.get(interval);
|
|
597
|
-
console.debug(`[Banta/TimerPool] ${count} unsubscribed from ${interval}ms [${(_b = (_a = state === null || state === void 0 ? void 0 : state.subscribers) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0} remain]`);
|
|
598
|
-
}
|
|
599
|
-
if (this.subscriptions.size === 0)
|
|
600
|
-
console.debug(`[Banta/TimerPool] All subscriptions have been removed. Now idle.`);
|
|
601
|
-
this.removedSubscriptions.clear();
|
|
602
|
-
});
|
|
603
|
-
};
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
TimerPool = __decorate([
|
|
607
|
-
Injectable()
|
|
608
|
-
], TimerPool);
|
|
609
|
-
|
|
610
608
|
const COMPONENTS$3 = [
|
|
611
609
|
TimestampComponent,
|
|
612
610
|
LightboxComponent,
|
|
@@ -621,7 +619,7 @@ class BantaCommonModule {
|
|
|
621
619
|
return {
|
|
622
620
|
ngModule: BantaCommonModule,
|
|
623
621
|
providers: [
|
|
624
|
-
TimerPool
|
|
622
|
+
TimerPool
|
|
625
623
|
]
|
|
626
624
|
};
|
|
627
625
|
}
|
|
@@ -7242,13 +7240,13 @@ class EmojiSelectorPanelComponent {
|
|
|
7242
7240
|
this.categories = this.pairs(cats).map(pair => pair[1]);
|
|
7243
7241
|
}
|
|
7244
7242
|
}
|
|
7245
|
-
EmojiSelectorPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: EmojiSelectorPanelComponent, deps: [{ token: i1
|
|
7243
|
+
EmojiSelectorPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: EmojiSelectorPanelComponent, deps: [{ token: i1.DomSanitizer }, { token: BANTA_SDK_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
7246
7244
|
EmojiSelectorPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: EmojiSelectorPanelComponent, selector: "emoji-selector-panel", outputs: { selected: "selected" }, ngImport: i0, template: "<div class=\"search-box\" *ngIf=\"searchVisible\">\r\n\t<a mat-icon-button href=\"javascript:;\" (click)=\"hideSearch()\">\r\n\t\t<mat-icon>arrow_back</mat-icon>\r\n\t</a>\r\n\t<mat-form-field appearance=\"outline\" floatLabel=\"always\">\r\n\t\t<mat-label>Search for emoji</mat-label>\r\n\t\t<input name=\"search\" type=\"text\" matInput placeholder=\"Start typing\" [(ngModel)]=\"searchQuery\" />\r\n\t</mat-form-field>\r\n</div>\r\n\r\n<div class=\"selector\">\r\n\t<ng-container *ngIf=\"searchVisible\">\r\n\t\t<div class=\"emoji-list\">\r\n\t\t\t<a href=\"javascript:;\" (click)=\"select(emoji.char)\" \r\n\t\t\t\t*ngFor=\"let emoji of searchResults\" [innerHtml]=\"emoji.html || ''\">\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</ng-container>\r\n\t<ng-container *ngIf=\"!searchVisible\">\r\n\t\t<div class=\"categories\">\r\n\t\t\t<ng-container *ngIf=\"!searchVisible\">\r\n\t\t\t\t<a [title]=\"humanize(category.name)\" [class.active]=\"activeCategory === category.name\" mat-icon-button *ngFor=\"let category of categories\" (click)=\"activeCategory = category.name\">\r\n\t\t\t\t\t<mat-icon>{{category.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\r\n\t\t\t\t<a title=\"Search\" [class.active] mat-icon-button (click)=\"showSearch()\">\r\n\t\t\t\t\t<mat-icon>search</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t\t<ng-container *ngFor=\"let category of categories\">\r\n\t\t\t<div class=\"emoji-list\" *ngIf=\"activeCategory && activeCategory == category.name\">\r\n\t\t\t\t<a href=\"javascript:;\" (click)=\"select(emoji.char)\" \r\n\t\t\t\t\t*ngFor=\"let emoji of category.emojis\" [innerHtml]=\"emoji.html || ''\">\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n</div>", styles: [":host{background:#111;color:#fff;border:1px solid #333;border-radius:5px;padding:.5em;width:calc(9*(32px + 1em));max-width:calc(100vw - 1.5em - 5px)}.selector{display:flex;flex-direction:column}.categories a{opacity:.25;transition:.4s opacity ease-in-out}.categories a:hover{opacity:.5}.categories a.active{opacity:1}.emoji-list{flex-grow:1;overflow-y:auto;height:20em}.emoji-list a{display:inline-block;padding:2px;margin:4px;background-color:#111}.emoji-list a ::ng-deep .emoji{width:32px;height:32px}.emoji-list a:hover{background-color:#333}.search-box{display:flex;align-items:baseline}.search-box mat-form-field{flex-grow:1}@media (max-width: 500px){.selector{flex-direction:row;height:27em}.emoji-list{height:auto}}:host-context(.banta-mobile) .selector{flex-direction:row;height:27em}:host-context(.banta-mobile) .emoji-list{height:auto}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i6$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i6$1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i7.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }] });
|
|
7247
7245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: EmojiSelectorPanelComponent, decorators: [{
|
|
7248
7246
|
type: Component,
|
|
7249
7247
|
args: [{ selector: 'emoji-selector-panel', template: "<div class=\"search-box\" *ngIf=\"searchVisible\">\r\n\t<a mat-icon-button href=\"javascript:;\" (click)=\"hideSearch()\">\r\n\t\t<mat-icon>arrow_back</mat-icon>\r\n\t</a>\r\n\t<mat-form-field appearance=\"outline\" floatLabel=\"always\">\r\n\t\t<mat-label>Search for emoji</mat-label>\r\n\t\t<input name=\"search\" type=\"text\" matInput placeholder=\"Start typing\" [(ngModel)]=\"searchQuery\" />\r\n\t</mat-form-field>\r\n</div>\r\n\r\n<div class=\"selector\">\r\n\t<ng-container *ngIf=\"searchVisible\">\r\n\t\t<div class=\"emoji-list\">\r\n\t\t\t<a href=\"javascript:;\" (click)=\"select(emoji.char)\" \r\n\t\t\t\t*ngFor=\"let emoji of searchResults\" [innerHtml]=\"emoji.html || ''\">\r\n\t\t\t</a>\r\n\t\t</div>\r\n\t</ng-container>\r\n\t<ng-container *ngIf=\"!searchVisible\">\r\n\t\t<div class=\"categories\">\r\n\t\t\t<ng-container *ngIf=\"!searchVisible\">\r\n\t\t\t\t<a [title]=\"humanize(category.name)\" [class.active]=\"activeCategory === category.name\" mat-icon-button *ngFor=\"let category of categories\" (click)=\"activeCategory = category.name\">\r\n\t\t\t\t\t<mat-icon>{{category.icon}}</mat-icon>\r\n\t\t\t\t</a>\r\n\r\n\t\t\t\t<a title=\"Search\" [class.active] mat-icon-button (click)=\"showSearch()\">\r\n\t\t\t\t\t<mat-icon>search</mat-icon>\r\n\t\t\t\t</a>\r\n\t\t\t</ng-container>\r\n\t\t</div>\r\n\t\t<ng-container *ngFor=\"let category of categories\">\r\n\t\t\t<div class=\"emoji-list\" *ngIf=\"activeCategory && activeCategory == category.name\">\r\n\t\t\t\t<a href=\"javascript:;\" (click)=\"select(emoji.char)\" \r\n\t\t\t\t\t*ngFor=\"let emoji of category.emojis\" [innerHtml]=\"emoji.html || ''\">\r\n\t\t\t\t</a>\r\n\t\t\t</div>\r\n\t\t</ng-container>\r\n\t</ng-container>\r\n</div>", styles: [":host{background:#111;color:#fff;border:1px solid #333;border-radius:5px;padding:.5em;width:calc(9*(32px + 1em));max-width:calc(100vw - 1.5em - 5px)}.selector{display:flex;flex-direction:column}.categories a{opacity:.25;transition:.4s opacity ease-in-out}.categories a:hover{opacity:.5}.categories a.active{opacity:1}.emoji-list{flex-grow:1;overflow-y:auto;height:20em}.emoji-list a{display:inline-block;padding:2px;margin:4px;background-color:#111}.emoji-list a ::ng-deep .emoji{width:32px;height:32px}.emoji-list a:hover{background-color:#333}.search-box{display:flex;align-items:baseline}.search-box mat-form-field{flex-grow:1}@media (max-width: 500px){.selector{flex-direction:row;height:27em}.emoji-list{height:auto}}:host-context(.banta-mobile) .selector{flex-direction:row;height:27em}:host-context(.banta-mobile) .emoji-list{height:auto}\n"] }]
|
|
7250
7248
|
}], ctorParameters: function () {
|
|
7251
|
-
return [{ type: i1
|
|
7249
|
+
return [{ type: i1.DomSanitizer }, { type: undefined, decorators: [{
|
|
7252
7250
|
type: Inject,
|
|
7253
7251
|
args: [BANTA_SDK_OPTIONS]
|
|
7254
7252
|
}, {
|
|
@@ -7323,7 +7321,7 @@ class EmojiSelectorButtonComponent {
|
|
|
7323
7321
|
this.overlayRef.attach(this.selectorPanelTemplate);
|
|
7324
7322
|
}
|
|
7325
7323
|
}
|
|
7326
|
-
EmojiSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: EmojiSelectorButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$
|
|
7324
|
+
EmojiSelectorButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: EmojiSelectorButtonComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
7327
7325
|
EmojiSelectorButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: EmojiSelectorButtonComponent, selector: "emoji-selector-button", inputs: { overlayX: "overlayX", overlayY: "overlayY", originX: "originX", originY: "originY" }, outputs: { selected: "selected" }, viewQueries: [{ propertyName: "selectorPanelTemplate", first: true, predicate: ["selectorPanelTemplate"], descendants: true }], ngImport: i0, template: `
|
|
7328
7326
|
<button #button type="button" mat-icon-button (click)="show()">
|
|
7329
7327
|
<mat-icon>emoji_emotions</mat-icon>
|
|
@@ -7348,7 +7346,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
7348
7346
|
></emoji-selector-panel>
|
|
7349
7347
|
</ng-template>
|
|
7350
7348
|
`, styles: [":host{display:block;position:relative}button{color:#666}\n"] }]
|
|
7351
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$
|
|
7349
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.Overlay }]; }, propDecorators: { selectorPanelTemplate: [{
|
|
7352
7350
|
type: ViewChild,
|
|
7353
7351
|
args: ['selectorPanelTemplate']
|
|
7354
7352
|
}], selected: [{
|
|
@@ -8082,12 +8080,12 @@ class AttachmentButtonComponent {
|
|
|
8082
8080
|
});
|
|
8083
8081
|
}
|
|
8084
8082
|
}
|
|
8085
|
-
AttachmentButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AttachmentButtonComponent, deps: [{ token: i1$
|
|
8083
|
+
AttachmentButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AttachmentButtonComponent, deps: [{ token: i1$2.CDNProvider }], target: i0.ɵɵFactoryTarget.Component });
|
|
8086
8084
|
AttachmentButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: AttachmentButtonComponent, selector: "banta-attachment-button", outputs: { addedAttachment: "addedAttachment", attachmentError: "attachmentError" }, viewQueries: [{ propertyName: "fileInput", first: true, predicate: ["fileUpload"], descendants: true }], ngImport: i0, template: "<button matTooltip=\"Add an image or gif\" #button type=\"button\" mat-icon-button (click)=\"show()\">\r\n\t<mat-icon>image</mat-icon>\r\n</button>\r\n<input style=\"display: none;\" #fileUpload [multiple]=\"false\" (change)=\"fileChange($event)\" type=\"file\" >", styles: ["button{color:#666}\n"], dependencies: [{ kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i6.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i11.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
8087
8085
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: AttachmentButtonComponent, decorators: [{
|
|
8088
8086
|
type: Component,
|
|
8089
8087
|
args: [{ selector: 'banta-attachment-button', template: "<button matTooltip=\"Add an image or gif\" #button type=\"button\" mat-icon-button (click)=\"show()\">\r\n\t<mat-icon>image</mat-icon>\r\n</button>\r\n<input style=\"display: none;\" #fileUpload [multiple]=\"false\" (change)=\"fileChange($event)\" type=\"file\" >", styles: ["button{color:#666}\n"] }]
|
|
8090
|
-
}], ctorParameters: function () { return [{ type: i1$
|
|
8088
|
+
}], ctorParameters: function () { return [{ type: i1$2.CDNProvider }]; }, propDecorators: { fileInput: [{
|
|
8091
8089
|
type: ViewChild,
|
|
8092
8090
|
args: ['fileUpload', { static: false }]
|
|
8093
8091
|
}], addedAttachment: [{
|