@banta/sdk 4.4.0 → 4.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/banta-sdk.umd.js +56 -53
- package/bundles/banta-sdk.umd.js.map +1 -1
- package/bundles/banta-sdk.umd.min.js +1 -1
- package/bundles/banta-sdk.umd.min.js.map +1 -1
- package/esm2015/lib/common/index.js +4 -1
- package/fesm2015/banta-sdk.js +45 -45
- package/fesm2015/banta-sdk.js.map +1 -1
- package/lib/common/index.d.ts +3 -0
- package/package.json +1 -1
package/bundles/banta-sdk.umd.js
CHANGED
|
@@ -207,59 +207,6 @@
|
|
|
207
207
|
{ type: platformBrowser.DomSanitizer }
|
|
208
208
|
]; };
|
|
209
209
|
|
|
210
|
-
var BantaAttachmentsComponent = /** @class */ (function () {
|
|
211
|
-
function BantaAttachmentsComponent() {
|
|
212
|
-
this.editing = false;
|
|
213
|
-
this.remove = new rxjs.Subject();
|
|
214
|
-
}
|
|
215
|
-
BantaAttachmentsComponent.prototype.removeAttachment = function (attachment) {
|
|
216
|
-
this.remove.next(attachment);
|
|
217
|
-
};
|
|
218
|
-
BantaAttachmentsComponent.prototype.isImageAttachment = function (attachment) {
|
|
219
|
-
if (attachment.type.startsWith('image/'))
|
|
220
|
-
return true;
|
|
221
|
-
return false;
|
|
222
|
-
};
|
|
223
|
-
BantaAttachmentsComponent.prototype.isCardAttachment = function (attachment) {
|
|
224
|
-
if (['card'].includes(attachment.type))
|
|
225
|
-
return true;
|
|
226
|
-
return false;
|
|
227
|
-
};
|
|
228
|
-
BantaAttachmentsComponent.prototype.showLightbox = function (image) {
|
|
229
|
-
this.lightbox.open(image.url, this.attachments
|
|
230
|
-
.filter(function (x) { return x.type === 'image/png'; })
|
|
231
|
-
.map(function (x) { return x.url; }));
|
|
232
|
-
};
|
|
233
|
-
Object.defineProperty(BantaAttachmentsComponent.prototype, "inlineAttachments", {
|
|
234
|
-
get: function () {
|
|
235
|
-
return this.attachments.filter(function (x) { return x.type !== 'card' && (x.style === 'inline' || !x.style); });
|
|
236
|
-
},
|
|
237
|
-
enumerable: false,
|
|
238
|
-
configurable: true
|
|
239
|
-
});
|
|
240
|
-
Object.defineProperty(BantaAttachmentsComponent.prototype, "blockAttachments", {
|
|
241
|
-
get: function () {
|
|
242
|
-
return this.attachments.filter(function (x) { return x.style === 'block' || x.type === 'card'; });
|
|
243
|
-
},
|
|
244
|
-
enumerable: false,
|
|
245
|
-
configurable: true
|
|
246
|
-
});
|
|
247
|
-
return BantaAttachmentsComponent;
|
|
248
|
-
}());
|
|
249
|
-
BantaAttachmentsComponent.decorators = [
|
|
250
|
-
{ type: core.Component, args: [{
|
|
251
|
-
selector: 'banta-attachments',
|
|
252
|
-
template: "<ng-container *ngIf=\"attachments?.length > 0\">\r\n <banta-lightbox #lightbox></banta-lightbox>\r\n <div class=\"block-attachments\">\r\n <ng-container *ngFor=\"let attachment of blockAttachments\">\r\n <banta-attachment \r\n [attachment]=\"attachment\"\r\n [editing]=\"editing\"\r\n (removed)=\"removeAttachment(attachment)\"\r\n (activated)=\"showLightbox(attachment)\"\r\n ></banta-attachment>\r\n </ng-container>\r\n </div>\r\n\r\n <div \r\n class=\"inline-attachments\" \r\n [class.single]=\"attachments?.length === 1\" \r\n *ngIf=\"attachments && attachments?.length > 0\"\r\n >\r\n <ng-container *ngFor=\"let attachment of inlineAttachments\">\r\n <banta-attachment \r\n [attachment]=\"attachment\"\r\n [editing]=\"editing\"\r\n (removed)=\"removeAttachment(attachment)\"\r\n (activated)=\"showLightbox(attachment)\"\r\n ></banta-attachment>\r\n </ng-container>\r\n </div>\r\n</ng-container>",
|
|
253
|
-
styles: [".block-attachments{display:flex;flex-direction:column}.block-attachments banta-attachment{width:100%}.inline-attachments{flex-direction:row;margin-top:15px;display:flex;gap:20px;flex-wrap:wrap}"]
|
|
254
|
-
},] }
|
|
255
|
-
];
|
|
256
|
-
BantaAttachmentsComponent.propDecorators = {
|
|
257
|
-
attachments: [{ type: core.Input }],
|
|
258
|
-
editing: [{ type: core.Input }],
|
|
259
|
-
lightbox: [{ type: core.ViewChild, args: ['lightbox',] }],
|
|
260
|
-
remove: [{ type: core.Output }]
|
|
261
|
-
};
|
|
262
|
-
|
|
263
210
|
var BantaTrustResourceUrlPipe = /** @class */ (function () {
|
|
264
211
|
function BantaTrustResourceUrlPipe(sanitizer) {
|
|
265
212
|
this.sanitizer = sanitizer;
|
|
@@ -350,6 +297,59 @@
|
|
|
350
297
|
isLoading: [{ type: core.HostBinding, args: ['class.loading',] }]
|
|
351
298
|
};
|
|
352
299
|
|
|
300
|
+
var BantaAttachmentsComponent = /** @class */ (function () {
|
|
301
|
+
function BantaAttachmentsComponent() {
|
|
302
|
+
this.editing = false;
|
|
303
|
+
this.remove = new rxjs.Subject();
|
|
304
|
+
}
|
|
305
|
+
BantaAttachmentsComponent.prototype.removeAttachment = function (attachment) {
|
|
306
|
+
this.remove.next(attachment);
|
|
307
|
+
};
|
|
308
|
+
BantaAttachmentsComponent.prototype.isImageAttachment = function (attachment) {
|
|
309
|
+
if (attachment.type.startsWith('image/'))
|
|
310
|
+
return true;
|
|
311
|
+
return false;
|
|
312
|
+
};
|
|
313
|
+
BantaAttachmentsComponent.prototype.isCardAttachment = function (attachment) {
|
|
314
|
+
if (['card'].includes(attachment.type))
|
|
315
|
+
return true;
|
|
316
|
+
return false;
|
|
317
|
+
};
|
|
318
|
+
BantaAttachmentsComponent.prototype.showLightbox = function (image) {
|
|
319
|
+
this.lightbox.open(image.url, this.attachments
|
|
320
|
+
.filter(function (x) { return x.type === 'image/png'; })
|
|
321
|
+
.map(function (x) { return x.url; }));
|
|
322
|
+
};
|
|
323
|
+
Object.defineProperty(BantaAttachmentsComponent.prototype, "inlineAttachments", {
|
|
324
|
+
get: function () {
|
|
325
|
+
return this.attachments.filter(function (x) { return x.type !== 'card' && (x.style === 'inline' || !x.style); });
|
|
326
|
+
},
|
|
327
|
+
enumerable: false,
|
|
328
|
+
configurable: true
|
|
329
|
+
});
|
|
330
|
+
Object.defineProperty(BantaAttachmentsComponent.prototype, "blockAttachments", {
|
|
331
|
+
get: function () {
|
|
332
|
+
return this.attachments.filter(function (x) { return x.style === 'block' || x.type === 'card'; });
|
|
333
|
+
},
|
|
334
|
+
enumerable: false,
|
|
335
|
+
configurable: true
|
|
336
|
+
});
|
|
337
|
+
return BantaAttachmentsComponent;
|
|
338
|
+
}());
|
|
339
|
+
BantaAttachmentsComponent.decorators = [
|
|
340
|
+
{ type: core.Component, args: [{
|
|
341
|
+
selector: 'banta-attachments',
|
|
342
|
+
template: "<ng-container *ngIf=\"attachments?.length > 0\">\r\n <banta-lightbox #lightbox></banta-lightbox>\r\n <div class=\"block-attachments\">\r\n <ng-container *ngFor=\"let attachment of blockAttachments\">\r\n <banta-attachment \r\n [attachment]=\"attachment\"\r\n [editing]=\"editing\"\r\n (removed)=\"removeAttachment(attachment)\"\r\n (activated)=\"showLightbox(attachment)\"\r\n ></banta-attachment>\r\n </ng-container>\r\n </div>\r\n\r\n <div \r\n class=\"inline-attachments\" \r\n [class.single]=\"attachments?.length === 1\" \r\n *ngIf=\"attachments && attachments?.length > 0\"\r\n >\r\n <ng-container *ngFor=\"let attachment of inlineAttachments\">\r\n <banta-attachment \r\n [attachment]=\"attachment\"\r\n [editing]=\"editing\"\r\n (removed)=\"removeAttachment(attachment)\"\r\n (activated)=\"showLightbox(attachment)\"\r\n ></banta-attachment>\r\n </ng-container>\r\n </div>\r\n</ng-container>",
|
|
343
|
+
styles: [".block-attachments{display:flex;flex-direction:column}.block-attachments banta-attachment{width:100%}.inline-attachments{flex-direction:row;margin-top:15px;display:flex;gap:20px;flex-wrap:wrap}"]
|
|
344
|
+
},] }
|
|
345
|
+
];
|
|
346
|
+
BantaAttachmentsComponent.propDecorators = {
|
|
347
|
+
attachments: [{ type: core.Input }],
|
|
348
|
+
editing: [{ type: core.Input }],
|
|
349
|
+
lightbox: [{ type: core.ViewChild, args: ['lightbox',] }],
|
|
350
|
+
remove: [{ type: core.Output }]
|
|
351
|
+
};
|
|
352
|
+
|
|
353
353
|
var COMPONENTS = [
|
|
354
354
|
TimestampComponent,
|
|
355
355
|
LightboxComponent,
|
|
@@ -11014,6 +11014,8 @@
|
|
|
11014
11014
|
|
|
11015
11015
|
exports.AttachmentButtonComponent = AttachmentButtonComponent;
|
|
11016
11016
|
exports.BANTA_SDK_OPTIONS = BANTA_SDK_OPTIONS;
|
|
11017
|
+
exports.BantaAttachmentComponent = BantaAttachmentComponent;
|
|
11018
|
+
exports.BantaAttachmentsComponent = BantaAttachmentsComponent;
|
|
11017
11019
|
exports.BantaChatComponent = BantaChatComponent;
|
|
11018
11020
|
exports.BantaCommentsComponent = BantaCommentsComponent;
|
|
11019
11021
|
exports.BantaCommonModule = BantaCommonModule;
|
|
@@ -11022,6 +11024,7 @@
|
|
|
11022
11024
|
exports.BantaMarkdownToHtmlPipe = BantaMarkdownToHtmlPipe;
|
|
11023
11025
|
exports.BantaReplySendOptionsDirective = BantaReplySendOptionsDirective;
|
|
11024
11026
|
exports.BantaSdkModule = BantaSdkModule;
|
|
11027
|
+
exports.BantaTrustResourceUrlPipe = BantaTrustResourceUrlPipe;
|
|
11025
11028
|
exports.ChatBackend = ChatBackend;
|
|
11026
11029
|
exports.ChatBackendBase = ChatBackendBase;
|
|
11027
11030
|
exports.ChatMessageComponent = ChatMessageComponent;
|