@datarailsshared/datarailsshared 1.4.94-dragons → 1.4.98
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/datarailsshared-datarailsshared.umd.js +12 -12
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.98.tgz +0 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/lib/dr-chat/dr-chat-form/chat-form.component.js +6 -7
- package/esm2015/lib/dr-chat/dr-chat-message/chat-message.component.js +4 -4
- package/esm2015/lib/dr-chat/dr-chat-message/dr-chat-message-file/chat-message-file.component.js +4 -3
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +2 -2
- package/esm2015/lib/models/chat.js +2 -1
- package/fesm2015/datarailsshared-datarailsshared.js +12 -13
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-chat/dr-chat-form/chat-form.component.d.ts +1 -2
- package/lib/dr-chat/dr-chat-message/chat-message.component.d.ts +2 -2
- package/lib/dr-chat/dr-chat-message/dr-chat-message-file/chat-message-file.component.d.ts +1 -1
- package/lib/models/chat.d.ts +1 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.4.94-dragons.tgz +0 -0
|
@@ -1757,7 +1757,7 @@
|
|
|
1757
1757
|
DrSelectComponent.decorators = [
|
|
1758
1758
|
{ type: i0.Component, args: [{
|
|
1759
1759
|
selector: 'dr-select',
|
|
1760
|
-
template: "<ng-select [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"isOpen\"\n [groupBy]=\"groupBy\"\n [attr.autofocus]=\"autofocus\"\n (change)=\"onChange(selectedItem); change.emit(selectedItem)\"\n (open)=\"open.emit($event)\"\n class=\"dr-select\"\n #selectComponent>\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\n <div class=\"dr-select__option-with-desc__wrapper\">\n <div>{{ item.name }}</div>\n <div class=\"dr-select__option-with-desc__description\"\n >{{ item?.description }}</div>\n </div>\n </ng-template>\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionFooterTemplate\" [ngTemplateOutletContext]=\"{item: item, close: selectComponent.close.bind(selectComponent)}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"groupBy\" ng-optgroup-tmp let-item=\"item\">\n {{ item[groupBy] }}\n </ng-template>\n</ng-select>\n",
|
|
1760
|
+
template: "<ng-select [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"isOpen\"\n [groupBy]=\"groupBy\"\n [attr.autofocus]=\"autofocus\"\n (change)=\"onChange(selectedItem); change.emit(selectedItem)\"\n (open)=\"open.emit($event)\"\n class=\"dr-select\"\n #selectComponent>\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\n <div class=\"dr-select__option-with-desc__wrapper\">\n <div>{{ item.name }}</div>\n <div class=\"dr-select__option-with-desc__description\"\n >{{ item?.description }}</div>\n </div>\n </ng-template>\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionFooterTemplate\" [ngTemplateOutletContext]=\"{ item: item, close: selectComponent.close.bind(selectComponent) }\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"groupBy\" ng-optgroup-tmp let-item=\"item\">\n {{ item[groupBy] }}\n </ng-template>\n</ng-select>\n",
|
|
1761
1761
|
providers: [{
|
|
1762
1762
|
provide: forms.NG_VALUE_ACCESSOR,
|
|
1763
1763
|
useExisting: DrSelectComponent,
|
|
@@ -3929,6 +3929,7 @@
|
|
|
3929
3929
|
CalendarView["FOR_YEARS"] = "multi-year";
|
|
3930
3930
|
})(exports.CalendarView || (exports.CalendarView = {}));
|
|
3931
3931
|
|
|
3932
|
+
var IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/gif'];
|
|
3932
3933
|
exports.CHAT_MESSAGE_TYPE = void 0;
|
|
3933
3934
|
(function (CHAT_MESSAGE_TYPE) {
|
|
3934
3935
|
CHAT_MESSAGE_TYPE["TEXT"] = "text";
|
|
@@ -5024,7 +5025,6 @@
|
|
|
5024
5025
|
this.inputFocus = false;
|
|
5025
5026
|
this.inputHover = false;
|
|
5026
5027
|
this.droppedFiles = [];
|
|
5027
|
-
this.imgDropTypes = ['image/png', 'image/jpeg', 'image/gif'];
|
|
5028
5028
|
/**
|
|
5029
5029
|
* Predefined message text
|
|
5030
5030
|
*
|
|
@@ -5059,8 +5059,7 @@
|
|
|
5059
5059
|
*
|
|
5060
5060
|
* @type {EventEmitter<string>}
|
|
5061
5061
|
*/
|
|
5062
|
-
|
|
5063
|
-
this.onInputChange = new i0.EventEmitter();
|
|
5062
|
+
this.inputChange = new i0.EventEmitter();
|
|
5064
5063
|
this.fileOver = false;
|
|
5065
5064
|
}
|
|
5066
5065
|
DrChatFormComponent.prototype.onDrop = function (event) {
|
|
@@ -5074,7 +5073,7 @@
|
|
|
5074
5073
|
if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) {
|
|
5075
5074
|
var _loop_1 = function (file) {
|
|
5076
5075
|
var res = file;
|
|
5077
|
-
if (
|
|
5076
|
+
if (IMAGE_TYPES.includes(file.type)) {
|
|
5078
5077
|
var fr = new FileReader();
|
|
5079
5078
|
fr.onload = function (e) {
|
|
5080
5079
|
res.src = e.target.result;
|
|
@@ -5131,7 +5130,7 @@
|
|
|
5131
5130
|
}
|
|
5132
5131
|
};
|
|
5133
5132
|
DrChatFormComponent.prototype.onModelChange = function (value) {
|
|
5134
|
-
this.
|
|
5133
|
+
this.inputChange.emit(value);
|
|
5135
5134
|
};
|
|
5136
5135
|
return DrChatFormComponent;
|
|
5137
5136
|
}());
|
|
@@ -5153,7 +5152,7 @@
|
|
|
5153
5152
|
dropFiles: [{ type: i0.Input }],
|
|
5154
5153
|
dropFilePlaceholder: [{ type: i0.Input }],
|
|
5155
5154
|
send: [{ type: i0.Output }],
|
|
5156
|
-
|
|
5155
|
+
inputChange: [{ type: i0.Output }],
|
|
5157
5156
|
fileOver: [{ type: i0.HostBinding, args: ['class.file-over',] }],
|
|
5158
5157
|
onDrop: [{ type: i0.HostListener, args: ['drop', ['$event'],] }],
|
|
5159
5158
|
onDragOver: [{ type: i0.HostListener, args: ['dragover', ['$event'],] }],
|
|
@@ -5217,12 +5216,12 @@
|
|
|
5217
5216
|
enumerable: false,
|
|
5218
5217
|
configurable: true
|
|
5219
5218
|
});
|
|
5220
|
-
DrChatMessageComponent.prototype.
|
|
5219
|
+
DrChatMessageComponent.prototype.getTemplate = function () {
|
|
5221
5220
|
this.customMessage = true;
|
|
5222
5221
|
var customMessage = this.getCustomMessage(this.type);
|
|
5223
5222
|
return customMessage.templateRef;
|
|
5224
5223
|
};
|
|
5225
|
-
DrChatMessageComponent.prototype.
|
|
5224
|
+
DrChatMessageComponent.prototype.getTemplateContext = function () {
|
|
5226
5225
|
return { $implicit: this.customMessageData, isReply: this.reply };
|
|
5227
5226
|
};
|
|
5228
5227
|
DrChatMessageComponent.prototype.getCustomMessage = function (type) {
|
|
@@ -5238,7 +5237,7 @@
|
|
|
5238
5237
|
DrChatMessageComponent.decorators = [
|
|
5239
5238
|
{ type: i0.Component, args: [{
|
|
5240
5239
|
selector: 'dr-chat-message',
|
|
5241
|
-
template: "<div class=\"message\" [class.message--custom]=\"customMessage\">\n <ng-container [ngSwitch]=\"message.kind\">\n <dr-chat-message-text *ngSwitchCase=\"MESSAGE_TYPE.TEXT\" [message]=\"message\"></dr-chat-message-text>\n <dr-chat-message-rich-text *ngSwitchCase=\"MESSAGE_TYPE.RICH_TEXT\" [message]=\"message\"></dr-chat-message-rich-text>\n <dr-chat-message-file *ngSwitchCase=\"MESSAGE_TYPE.DOWNLOAD_FILE\" [message]=\"message\"></dr-chat-message-file>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"
|
|
5240
|
+
template: "<div class=\"message\" [class.message--custom]=\"customMessage\">\n <ng-container [ngSwitch]=\"message.kind\">\n <dr-chat-message-text *ngSwitchCase=\"MESSAGE_TYPE.TEXT\" [message]=\"message\"></dr-chat-message-text>\n <dr-chat-message-rich-text *ngSwitchCase=\"MESSAGE_TYPE.RICH_TEXT\" [message]=\"message\"></dr-chat-message-rich-text>\n <dr-chat-message-file *ngSwitchCase=\"MESSAGE_TYPE.DOWNLOAD_FILE\" [message]=\"message\"></dr-chat-message-file>\n <ng-container *ngSwitchDefault>\n <ng-container [ngTemplateOutlet]=\"getTemplate()\" [ngTemplateOutletContext]=\"getTemplateContext()\"></ng-container>\n </ng-container>\n </ng-container>\n</div>\n",
|
|
5242
5241
|
animations: [
|
|
5243
5242
|
animations.trigger('flyInOut', [
|
|
5244
5243
|
animations.state('in', animations.style({ transform: 'translateX(0)' })),
|
|
@@ -5391,7 +5390,7 @@
|
|
|
5391
5390
|
DrChatMessageFileComponent.prototype.isImage = function (file) {
|
|
5392
5391
|
var type = file.type;
|
|
5393
5392
|
if (type) {
|
|
5394
|
-
return
|
|
5393
|
+
return IMAGE_TYPES.includes(type);
|
|
5395
5394
|
}
|
|
5396
5395
|
return false;
|
|
5397
5396
|
};
|
|
@@ -5400,7 +5399,7 @@
|
|
|
5400
5399
|
DrChatMessageFileComponent.decorators = [
|
|
5401
5400
|
{ type: i0.Component, args: [{
|
|
5402
5401
|
selector: 'dr-chat-message-file',
|
|
5403
|
-
template: "<
|
|
5402
|
+
template: "<div class=\"message-content-group\">\n <a *ngFor=\"let file of readyFiles\" [href]=\"file.url\" target=\"_blank\">\n <i class=\"dr-icon-file\" *ngIf=\"!file.urlStyle && file.icon\"></i>\n <div *ngIf=\"file.urlStyle\" [style.background-image]=\"file.urlStyle\"></div>\n </a>\n</div>\n",
|
|
5404
5403
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
5405
5404
|
},] }
|
|
5406
5405
|
];
|
|
@@ -5557,6 +5556,7 @@
|
|
|
5557
5556
|
exports.DrTooltipDirective = DrTooltipDirective;
|
|
5558
5557
|
exports.DrTooltipModule = DrTooltipModule;
|
|
5559
5558
|
exports.ForecastTagComponent = ForecastTagComponent;
|
|
5559
|
+
exports.IMAGE_TYPES = IMAGE_TYPES;
|
|
5560
5560
|
exports.ListTagComponent = ListTagComponent;
|
|
5561
5561
|
exports.ListTagModule = ListTagModule;
|
|
5562
5562
|
exports.MonthTagComponent = MonthTagComponent;
|