@datarailsshared/datarailsshared 1.6.39 → 1.6.43
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/datarailsshared-datarailsshared-1.6.43.tgz +0 -0
- package/esm2022/lib/dr-chat/dr-chat-form-dropdown/dr-chat-form-dropdown.component.mjs +32 -31
- package/esm2022/lib/dr-inputs/dr-toggle-button/dr-toggle-button.component.mjs +17 -8
- package/esm2022/lib/dr-inputs/dr-toggle-button/toggle-button-mode.mjs +2 -1
- package/esm2022/lib/dr-popover/dr-popover.directive.mjs +11 -5
- package/esm2022/lib/models/serverTags.mjs +1 -1
- package/fesm2022/datarailsshared-datarailsshared.mjs +57 -40
- package/fesm2022/datarailsshared-datarailsshared.mjs.map +1 -1
- package/lib/dr-chat/dr-chat-form-dropdown/dr-chat-form-dropdown.component.d.ts +2 -2
- package/lib/dr-inputs/dr-toggle-button/toggle-button-mode.d.ts +2 -1
- package/lib/dr-popover/dr-popover.directive.d.ts +4 -2
- package/lib/models/serverTags.d.ts +1 -0
- package/package.json +1 -1
- package/datarailsshared-datarailsshared-1.6.39.tgz +0 -0
|
@@ -3110,13 +3110,21 @@ var ToggleButtonMode;
|
|
|
3110
3110
|
(function (ToggleButtonMode) {
|
|
3111
3111
|
ToggleButtonMode["DEFAULT"] = "default";
|
|
3112
3112
|
ToggleButtonMode["DOTTED"] = "dotted";
|
|
3113
|
+
ToggleButtonMode["BOX"] = "box";
|
|
3113
3114
|
})(ToggleButtonMode || (ToggleButtonMode = {}));
|
|
3114
3115
|
|
|
3116
|
+
function DrToggleButtonComponent_ng_container_1_div_1_i_1_Template(rf, ctx) { if (rf & 1) {
|
|
3117
|
+
i0.ɵɵelement(0, "i", 5);
|
|
3118
|
+
} if (rf & 2) {
|
|
3119
|
+
const item_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
3120
|
+
i0.ɵɵclassMap(item_r1.icon);
|
|
3121
|
+
} }
|
|
3115
3122
|
function DrToggleButtonComponent_ng_container_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
3116
|
-
const
|
|
3123
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
3117
3124
|
i0.ɵɵelementStart(0, "div", 3);
|
|
3118
|
-
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(
|
|
3119
|
-
i0.ɵɵ
|
|
3125
|
+
i0.ɵɵlistener("click", function DrToggleButtonComponent_ng_container_1_div_1_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r7); const item_r1 = i0.ɵɵnextContext().$implicit; const ctx_r5 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r5.setValue(item_r1)); });
|
|
3126
|
+
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_i_1_Template, 1, 2, "i", 4);
|
|
3127
|
+
i0.ɵɵtext(2);
|
|
3120
3128
|
i0.ɵɵelementEnd();
|
|
3121
3129
|
} if (rf & 2) {
|
|
3122
3130
|
const item_r1 = i0.ɵɵnextContext().$implicit;
|
|
@@ -3124,11 +3132,13 @@ function DrToggleButtonComponent_ng_container_1_div_1_Template(rf, ctx) { if (rf
|
|
|
3124
3132
|
i0.ɵɵclassProp("selected", item_r1[ctx_r2.bindValue] === ctx_r2.selectedValue || item_r1 === ctx_r2.selectedValue)("disabled", item_r1.disabled);
|
|
3125
3133
|
i0.ɵɵattribute("data-analytics", ctx_r2.getDataAnalyticsTag(item_r1));
|
|
3126
3134
|
i0.ɵɵadvance(1);
|
|
3135
|
+
i0.ɵɵproperty("ngIf", item_r1.icon);
|
|
3136
|
+
i0.ɵɵadvance(1);
|
|
3127
3137
|
i0.ɵɵtextInterpolate1(" ", item_r1[ctx_r2.bindLabel] || item_r1.name || item_r1, " ");
|
|
3128
3138
|
} }
|
|
3129
3139
|
function DrToggleButtonComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
3130
3140
|
i0.ɵɵelementContainerStart(0);
|
|
3131
|
-
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template,
|
|
3141
|
+
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_div_1_Template, 3, 7, "div", 2);
|
|
3132
3142
|
i0.ɵɵelementContainerEnd();
|
|
3133
3143
|
} if (rf & 2) {
|
|
3134
3144
|
const item_r1 = ctx.$implicit;
|
|
@@ -3182,7 +3192,7 @@ class DrToggleButtonComponent {
|
|
|
3182
3192
|
return this.dataAnalytics + '_' + String(value).toLowerCase().replace(/ /g, '-');
|
|
3183
3193
|
}
|
|
3184
3194
|
/** @nocollapse */ static { this.ɵfac = function DrToggleButtonComponent_Factory(t) { return new (t || DrToggleButtonComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
3185
|
-
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "click"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3195
|
+
/** @nocollapse */ static { this.ɵcmp = /** @pureOrBreakMyCode */ i0.ɵɵdefineComponent({ type: DrToggleButtonComponent, selectors: [["dr-toggle-button"]], inputs: { items: "items", bindLabel: "bindLabel", bindValue: "bindValue", bindHidden: "bindHidden", mode: "mode", selectedValue: "selectedValue", disabled: "disabled", dataAnalytics: ["data-analytics", "dataAnalytics"] }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }])], decls: 2, vars: 4, consts: [[1, "toggle-container"], [4, "ngFor", "ngForOf"], ["class", "toggle-container__item", 3, "selected", "disabled", "click", 4, "ngIf"], [1, "toggle-container__item", 3, "click"], ["class", "toggle-container__item__icon", 3, "class", 4, "ngIf"], [1, "toggle-container__item__icon"]], template: function DrToggleButtonComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3186
3196
|
i0.ɵɵelementStart(0, "div", 0);
|
|
3187
3197
|
i0.ɵɵtemplate(1, DrToggleButtonComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
3188
3198
|
i0.ɵɵelementEnd();
|
|
@@ -3191,11 +3201,11 @@ class DrToggleButtonComponent {
|
|
|
3191
3201
|
i0.ɵɵattribute("mode", ctx.mode);
|
|
3192
3202
|
i0.ɵɵadvance(1);
|
|
3193
3203
|
i0.ɵɵproperty("ngForOf", ctx.items);
|
|
3194
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container[mode~=default][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}"], changeDetection: 0 }); }
|
|
3204
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf], styles: ["[_nghost-%COMP%]{display:flex}.toggle-container[_ngcontent-%COMP%]{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.toggle-container__item[_ngcontent-%COMP%]{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected[_ngcontent-%COMP%]{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon[_ngcontent-%COMP%]{margin-right:4px}.toggle-container[mode~=default][_ngcontent-%COMP%]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=dotted][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]{height:40px;padding:8px 16px 8px 8px;border:1px solid #DFE0E3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover{background:#f0f1f4}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:#eaeaff!important;border:1px solid #DFE0E3!important;color:#333!important}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:hover .toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item.selected[_ngcontent-%COMP%]{background:unset}.toggle-container[mode~=box][_ngcontent-%COMP%] .toggle-container__item[_ngcontent-%COMP%]:first-child{margin-left:0}"], changeDetection: 0 }); }
|
|
3195
3205
|
}
|
|
3196
3206
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrToggleButtonComponent, [{
|
|
3197
3207
|
type: Component,
|
|
3198
|
-
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n {{ item[bindLabel] || item.name || item }}\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container[mode~=default]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}\n"] }]
|
|
3208
|
+
args: [{ selector: 'dr-toggle-button', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef((() => DrToggleButtonComponent)), multi: true }], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"toggle-container\" [class.disabled]=\"_disabled\" [attr.mode]=\"mode\">\n <ng-container *ngFor=\"let item of items\">\n <div\n *ngIf=\"item && !item[bindHidden]\"\n class=\"toggle-container__item\"\n [class.selected]=\"item[bindValue] === selectedValue || item === selectedValue\"\n [class.disabled]=\"item.disabled\"\n (click)=\"setValue(item)\"\n [attr.data-analytics]=\"getDataAnalyticsTag(item)\">\n <i *ngIf=\"item.icon\" class=\"toggle-container__item__icon\" [class]=\"item.icon\"></i>\n {{ item[bindLabel] || item.name || item }}\n </div>\n </ng-container>\n</div>\n", styles: [":host{display:flex}.toggle-container{display:flex;flex-wrap:nowrap;box-sizing:border-box;border-radius:20px;height:28px;font-family:Poppins,sans-serif}.toggle-container.disabled{pointer-events:none}.toggle-container__item{height:28px;display:flex;align-items:center;justify-content:center;padding:4px 16px;border-radius:20px;margin:-1px;cursor:pointer;font-weight:400;font-size:12px;line-height:20px;white-space:nowrap;color:#4e566c;box-sizing:border-box}.toggle-container__item.selected{background:#f2f2fb!important;border:1px solid #7f7fdd!important;color:#25258c!important}.toggle-container__item.disabled{pointer-events:none;cursor:default;background:#f0f1f4;color:#9ea1aa;border:1px solid #c3c4ce}.toggle-container__item__icon{margin-right:4px}.toggle-container[mode~=default]{background:#f6f7f8;border:1px solid #c3c4ce}.toggle-container[mode~=dotted] .toggle-container__item{padding:2px 8px;border:1px solid #9ea1aa;border-radius:18px;margin-left:4px;color:#0c142b}.toggle-container[mode~=dotted] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=dotted] .toggle-container__item:hover .toggle-container[mode~=dotted] .toggle-container__item.selected{background:unset}.toggle-container[mode~=dotted] .toggle-container__item:first-child{margin-left:0}.toggle-container[mode~=box] .toggle-container__item{height:40px;padding:8px 16px 8px 8px;border:1px solid #DFE0E3;border-radius:8px;margin-left:8px;color:#333;font-weight:400;font-size:14px;line-height:22px}.toggle-container[mode~=box] .toggle-container__item:hover{background:#f0f1f4}.toggle-container[mode~=box] .toggle-container__item.selected{background:#eaeaff!important;border:1px solid #DFE0E3!important;color:#333!important}.toggle-container[mode~=box] .toggle-container__item:hover .toggle-container[mode~=box] .toggle-container__item.selected{background:unset}.toggle-container[mode~=box] .toggle-container__item:first-child{margin-left:0}\n"] }]
|
|
3199
3209
|
}], function () { return [{ type: i0.ChangeDetectorRef }]; }, { items: [{
|
|
3200
3210
|
type: Input
|
|
3201
3211
|
}], bindLabel: [{
|
|
@@ -6950,29 +6960,29 @@ class DrChatComponent {
|
|
|
6950
6960
|
|
|
6951
6961
|
const _c0$n = ["textAreaElement"];
|
|
6952
6962
|
const _c1$9 = ["fileInput"];
|
|
6953
|
-
function
|
|
6963
|
+
function DrChatFormDropdownComponent_dr_chat_dropped_files_3_Template(rf, ctx) { if (rf & 1) {
|
|
6954
6964
|
const _r7 = i0.ɵɵgetCurrentView();
|
|
6955
6965
|
i0.ɵɵelementStart(0, "dr-chat-dropped-files", 12);
|
|
6956
|
-
i0.ɵɵlistener("removeFileEvent", function
|
|
6966
|
+
i0.ɵɵlistener("removeFileEvent", function DrChatFormDropdownComponent_dr_chat_dropped_files_3_Template_dr_chat_dropped_files_removeFileEvent_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r6.removeFile($event)); });
|
|
6957
6967
|
i0.ɵɵpipe(1, "async");
|
|
6958
6968
|
i0.ɵɵelementEnd();
|
|
6959
6969
|
} if (rf & 2) {
|
|
6960
6970
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
6961
6971
|
i0.ɵɵproperty("files", i0.ɵɵpipeBind1(1, 3, ctx_r0.droppedFiles$))("isRemovable", true)("maxLengthText", 15);
|
|
6962
6972
|
} }
|
|
6963
|
-
function
|
|
6973
|
+
function DrChatFormDropdownComponent_i_13_Template(rf, ctx) { if (rf & 1) {
|
|
6964
6974
|
const _r9 = i0.ɵɵgetCurrentView();
|
|
6965
6975
|
i0.ɵɵelementStart(0, "i", 13);
|
|
6966
|
-
i0.ɵɵlistener("click", function
|
|
6976
|
+
i0.ɵɵlistener("click", function DrChatFormDropdownComponent_i_13_Template_i_click_0_listener($event) { i0.ɵɵrestoreView(_r9); const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.sendMessage($event)); });
|
|
6967
6977
|
i0.ɵɵelementEnd();
|
|
6968
6978
|
} }
|
|
6969
|
-
function
|
|
6979
|
+
function DrChatFormDropdownComponent_i_14_Template(rf, ctx) { if (rf & 1) {
|
|
6970
6980
|
const _r11 = i0.ɵɵgetCurrentView();
|
|
6971
6981
|
i0.ɵɵelementStart(0, "i", 14);
|
|
6972
|
-
i0.ɵɵlistener("click", function
|
|
6982
|
+
i0.ɵɵlistener("click", function DrChatFormDropdownComponent_i_14_Template_i_click_0_listener() { i0.ɵɵrestoreView(_r11); const ctx_r10 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r10.abortMessage()); });
|
|
6973
6983
|
i0.ɵɵelementEnd();
|
|
6974
6984
|
} }
|
|
6975
|
-
function
|
|
6985
|
+
function DrChatFormDropdownComponent_dr_dot_flashing_15_Template(rf, ctx) { if (rf & 1) {
|
|
6976
6986
|
i0.ɵɵelement(0, "dr-dot-flashing", 15);
|
|
6977
6987
|
} }
|
|
6978
6988
|
const _c2$2 = function (a0) { return { "message-row_loading": a0 }; };
|
|
@@ -6986,7 +6996,7 @@ class DrChatFormDropdownComponent {
|
|
|
6986
6996
|
this.inputFocus = false;
|
|
6987
6997
|
this.inputHover = false;
|
|
6988
6998
|
this.droppedFiles$ = new BehaviorSubject([]);
|
|
6989
|
-
this.
|
|
6999
|
+
this.isUploadingFiles = false;
|
|
6990
7000
|
/**
|
|
6991
7001
|
* Predefined message text
|
|
6992
7002
|
*
|
|
@@ -7075,7 +7085,7 @@ class DrChatFormDropdownComponent {
|
|
|
7075
7085
|
if (!$event || !$event.shiftKey) {
|
|
7076
7086
|
$event?.preventDefault();
|
|
7077
7087
|
$event?.stopPropagation();
|
|
7078
|
-
if (this.waitForReply) {
|
|
7088
|
+
if (this.waitForReply || this.isUploadingFiles) {
|
|
7079
7089
|
return;
|
|
7080
7090
|
}
|
|
7081
7091
|
else if (this.droppedFiles$.value.length || String(this.message).trim().length) {
|
|
@@ -7145,32 +7155,33 @@ class DrChatFormDropdownComponent {
|
|
|
7145
7155
|
i0.ɵɵlistener("drop", function DrChatFormDropdownComponent_drop_HostBindingHandler($event) { return ctx.onDrop($event); })("dragover", function DrChatFormDropdownComponent_dragover_HostBindingHandler($event) { return ctx.onDragOver($event); })("dragleave", function DrChatFormDropdownComponent_dragleave_HostBindingHandler($event) { return ctx.onDragLeave($event); });
|
|
7146
7156
|
} if (rf & 2) {
|
|
7147
7157
|
i0.ɵɵclassProp("file-over", ctx.fileOver);
|
|
7148
|
-
} }, inputs: {
|
|
7158
|
+
} }, inputs: { isUploadingFiles: "isUploadingFiles", message: "message", messagePlaceholder: "messagePlaceholder", dropFiles: "dropFiles", dropFilePlaceholder: "dropFilePlaceholder", waitForReply: "waitForReply", showDotFlashing: "showDotFlashing" }, outputs: { send: "send", uploadFiles: "uploadFiles", abort: "abort", inputChange: "inputChange" }, ngContentSelectors: _c4$1, decls: 16, vars: 20, consts: [[1, "message-row", 3, "ngClass"], [1, "message-row__input", 3, "ngClass"], [3, "files", "isRemovable", "maxLengthText", "removeFileEvent", 4, "ngIf"], [1, "message-row__input-textarea-wrap"], ["type", "text", 3, "ngModel", "rows", "placeholder", "focus", "blur", "mouseenter", "mouseleave", "ngModelChange", "keydown.enter"], ["textAreaElement", ""], [1, "message-row__btns"], ["type", "file", "hidden", "", "multiple", "", 3, "change"], ["fileInput", ""], ["class", "dr-icon-send-arrow-up send-button", 3, "click", 4, "ngIf"], ["class", "dr-icon-stop abort-button", 3, "click", 4, "ngIf"], ["class", "wait-reply-dot-flashing", 4, "ngIf"], [3, "files", "isRemovable", "maxLengthText", "removeFileEvent"], [1, "dr-icon-send-arrow-up", "send-button", 3, "click"], [1, "dr-icon-stop", "abort-button", 3, "click"], [1, "wait-reply-dot-flashing"]], template: function DrChatFormDropdownComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7149
7159
|
i0.ɵɵprojectionDef();
|
|
7150
7160
|
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
7151
|
-
i0.ɵɵ
|
|
7152
|
-
i0.ɵɵ
|
|
7153
|
-
i0.ɵɵ
|
|
7154
|
-
i0.ɵɵ
|
|
7155
|
-
i0.ɵɵ
|
|
7161
|
+
i0.ɵɵpipe(2, "async");
|
|
7162
|
+
i0.ɵɵtemplate(3, DrChatFormDropdownComponent_dr_chat_dropped_files_3_Template, 2, 5, "dr-chat-dropped-files", 2);
|
|
7163
|
+
i0.ɵɵpipe(4, "async");
|
|
7164
|
+
i0.ɵɵelementStart(5, "div", 3)(6, "textarea", 4, 5);
|
|
7165
|
+
i0.ɵɵlistener("focus", function DrChatFormDropdownComponent_Template_textarea_focus_6_listener() { return ctx.inputFocus = true; })("blur", function DrChatFormDropdownComponent_Template_textarea_blur_6_listener() { return ctx.inputFocus = false; })("mouseenter", function DrChatFormDropdownComponent_Template_textarea_mouseenter_6_listener() { return ctx.inputHover = true; })("mouseleave", function DrChatFormDropdownComponent_Template_textarea_mouseleave_6_listener() { return ctx.inputHover = false; })("ngModelChange", function DrChatFormDropdownComponent_Template_textarea_ngModelChange_6_listener($event) { return ctx.message = $event; })("ngModelChange", function DrChatFormDropdownComponent_Template_textarea_ngModelChange_6_listener($event) { return ctx.onModelChange($event); })("keydown.enter", function DrChatFormDropdownComponent_Template_textarea_keydown_enter_6_listener($event) { return ctx.sendMessage($event); });
|
|
7166
|
+
i0.ɵɵtext(8, " ");
|
|
7156
7167
|
i0.ɵɵelementEnd()();
|
|
7157
|
-
i0.ɵɵelementStart(
|
|
7158
|
-
i0.ɵɵprojection(
|
|
7159
|
-
i0.ɵɵelementStart(
|
|
7160
|
-
i0.ɵɵlistener("change", function
|
|
7168
|
+
i0.ɵɵelementStart(9, "div", 6);
|
|
7169
|
+
i0.ɵɵprojection(10);
|
|
7170
|
+
i0.ɵɵelementStart(11, "input", 7, 8);
|
|
7171
|
+
i0.ɵɵlistener("change", function DrChatFormDropdownComponent_Template_input_change_11_listener($event) { return ctx.onFileSelected($event); });
|
|
7161
7172
|
i0.ɵɵelementEnd();
|
|
7162
|
-
i0.ɵɵtemplate(
|
|
7163
|
-
i0.ɵɵtemplate(
|
|
7164
|
-
i0.ɵɵtemplate(
|
|
7173
|
+
i0.ɵɵtemplate(13, DrChatFormDropdownComponent_i_13_Template, 1, 0, "i", 9);
|
|
7174
|
+
i0.ɵɵtemplate(14, DrChatFormDropdownComponent_i_14_Template, 1, 0, "i", 10);
|
|
7175
|
+
i0.ɵɵtemplate(15, DrChatFormDropdownComponent_dr_dot_flashing_15_Template, 1, 0, "dr-dot-flashing", 11);
|
|
7165
7176
|
i0.ɵɵelementEnd()()();
|
|
7166
7177
|
} if (rf & 2) {
|
|
7167
|
-
const _r1 = i0.ɵɵreference(
|
|
7178
|
+
const _r1 = i0.ɵɵreference(7);
|
|
7168
7179
|
let tmp_1_0;
|
|
7169
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(
|
|
7170
|
-
i0.ɵɵadvance(1);
|
|
7171
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(15, _c3$2, ctx.inputFocus, !!(ctx.message == null ? null : (tmp_1_0 = ctx.message.trim()) == null ? null : tmp_1_0.length)));
|
|
7180
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c2$2, ctx.isUploadingFiles));
|
|
7172
7181
|
i0.ɵɵadvance(1);
|
|
7173
|
-
i0.ɵɵproperty("
|
|
7182
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(17, _c3$2, ctx.inputFocus, !!(ctx.message == null ? null : (tmp_1_0 = ctx.message.trim()) == null ? null : tmp_1_0.length) || !!i0.ɵɵpipeBind1(2, 11, ctx.droppedFiles$).length));
|
|
7183
|
+
i0.ɵɵadvance(2);
|
|
7184
|
+
i0.ɵɵproperty("ngIf", i0.ɵɵpipeBind1(4, 13, ctx.droppedFiles$).length);
|
|
7174
7185
|
i0.ɵɵadvance(3);
|
|
7175
7186
|
i0.ɵɵstyleMap(ctx.getTextAreaHeight(_r1));
|
|
7176
7187
|
i0.ɵɵpropertyInterpolate("placeholder", ctx.fileOver ? ctx.dropFilePlaceholder : ctx.messagePlaceholder);
|
|
@@ -7181,18 +7192,18 @@ class DrChatFormDropdownComponent {
|
|
|
7181
7192
|
i0.ɵɵproperty("ngIf", ctx.waitForReply && !ctx.showDotFlashing);
|
|
7182
7193
|
i0.ɵɵadvance(1);
|
|
7183
7194
|
i0.ɵɵproperty("ngIf", ctx.waitForReply && ctx.showDotFlashing);
|
|
7184
|
-
} }, dependencies: [i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgIf, DrDotFlashingComponent, DrChatDroppedFilesComponent, i1.AsyncPipe], styles: ["[_nghost-%COMP%] {--disabled-bg: linear-gradient(270.95deg, rgba(130, 210, 240, .2) 10.98%, rgba(146, 146, 255, .2) 93.38%);display:flex;flex-direction:column;align-items:center;padding:0}[_nghost-%COMP%] .message-row{display:flex;justify-content:center;width:100%;padding:0 0 21px;max-width:956px}[_nghost-%COMP%] .message-row__input{flex-direction:column;background-color:#fff;position:relative;display:flex;align-items:center;flex-grow:1;padding:14px 8px 8px 15px;height:auto;overflow:visible;min-width:265px;border-radius:24px;border:1.5px solid transparent;box-shadow:0 2px 16px -10px #603cff29;transition:.35s ease}[_nghost-%COMP%] .message-row__input .abort-button, [_nghost-%COMP%] .message-row__input .send-button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:24px;border-radius:100px;color:#fff;transition:.15s ease-in-out;background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box}[_nghost-%COMP%] .message-row__input .send-button{background:var(--disabled-bg);pointer-events:none}[_nghost-%COMP%] .message-row__input--focused{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;height:auto!important;background:#fff}[_nghost-%COMP%] .message-row__input--filled{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;background:#fff}[_nghost-%COMP%] .message-row__input--filled .send-button{background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box;pointer-events:all}[_nghost-%COMP%] .message-row__input .wait-reply-dot-flashing{display:flex;align-items:center;width:32px;height:
|
|
7195
|
+
} }, dependencies: [i1$2.DefaultValueAccessor, i1$2.NgControlStatus, i1$2.NgModel, i1.NgClass, i1.NgIf, DrDotFlashingComponent, DrChatDroppedFilesComponent, i1.AsyncPipe], styles: ["[_nghost-%COMP%] {--disabled-bg: linear-gradient(270.95deg, rgba(130, 210, 240, .2) 10.98%, rgba(146, 146, 255, .2) 93.38%);display:flex;flex-direction:column;align-items:center;padding:0}[_nghost-%COMP%] .message-row{display:flex;justify-content:center;width:100%;padding:0 0 21px;max-width:956px}[_nghost-%COMP%] .message-row__input{flex-direction:column;background-color:#fff;position:relative;display:flex;align-items:center;flex-grow:1;padding:14px 8px 8px 15px;height:auto;overflow:visible;min-width:265px;border-radius:24px;border:1.5px solid transparent;box-shadow:0 2px 16px -10px #603cff29;transition:.35s ease}[_nghost-%COMP%] .message-row__input .abort-button, [_nghost-%COMP%] .message-row__input .send-button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:24px;border-radius:100px;color:#fff;transition:.15s ease-in-out;background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box}[_nghost-%COMP%] .message-row__input .send-button, [_nghost-%COMP%] .message-row__input .abort-button{background:var(--disabled-bg);pointer-events:none}[_nghost-%COMP%] .message-row__input--focused{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;height:auto!important;background:#fff}[_nghost-%COMP%] .message-row__input--filled{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;background:#fff}[_nghost-%COMP%] .message-row__input--filled .send-button{background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box;pointer-events:all}[_nghost-%COMP%] .message-row__input .wait-reply-dot-flashing{display:flex;align-items:center;width:32px;height:32px}[_nghost-%COMP%] .message-row__input:before{content:\"\";position:absolute;inset:-3px;background:linear-gradient(266.3deg,#6969ff 25.2%,#4eb7df 90.24%);border-radius:25px;z-index:-1}[_nghost-%COMP%] .message-row__input textarea{color:#333;width:100%;outline:none;min-height:30px;flex-grow:1;resize:none;padding:4px 48px 4px 4px;margin:auto;border:none;border-radius:22.5px;font-family:Poppins,sans-serif;font-size:14px;line-height:22px}[_nghost-%COMP%] .message-row__input textarea:focus{border:none}[_nghost-%COMP%] .message-row__input textarea::placeholder{color:#9ea1aa}[_nghost-%COMP%] .message-row__btns{display:flex;justify-content:space-between;width:100%;align-items:center}[_nghost-%COMP%] .message-row__input-textarea-wrap{display:flex;width:100%;position:relative}[_nghost-%COMP%] dr-chat-dropped-files{margin-right:auto}[_nghost-%COMP%] dr-chat-dropped-files .dropped-files{padding:0}[_nghost-%COMP%] dr-chat-dropped-files .dropped-files__item{margin:0}[_nghost-%COMP%] .message-row_loading .send-button{background:var(--disabled-bg);pointer-events:none}[_nghost-%COMP%] .message-row_loading .dropped-files__item{opacity:.5;pointer-events:none}"], changeDetection: 0 }); }
|
|
7185
7196
|
}
|
|
7186
7197
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DrChatFormDropdownComponent, [{
|
|
7187
7198
|
type: Component,
|
|
7188
|
-
args: [{ selector: 'dr-chat-form-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"message-row\" [ngClass]=\"{ 'message-row_loading':
|
|
7199
|
+
args: [{ selector: 'dr-chat-form-dropdown', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"message-row\" [ngClass]=\"{ 'message-row_loading': isUploadingFiles }\">\n <div\n class=\"message-row__input\"\n [ngClass]=\"{\n 'message-row__input--focused': inputFocus,\n 'message-row__input--filled': !!message?.trim()?.length || !!(droppedFiles$ | async).length,\n }\">\n <dr-chat-dropped-files\n *ngIf=\"(droppedFiles$ | async).length\"\n [files]=\"droppedFiles$ | async\"\n [isRemovable]=\"true\"\n [maxLengthText]=\"15\"\n (removeFileEvent)=\"removeFile($event)\"></dr-chat-dropped-files>\n\n <div class=\"message-row__input-textarea-wrap\">\n <textarea\n #textAreaElement\n (focus)=\"inputFocus = true\"\n (blur)=\"inputFocus = false\"\n (mouseenter)=\"inputHover = true\"\n (mouseleave)=\"inputHover = false\"\n [(ngModel)]=\"message\"\n [rows]=\"1\"\n [style]=\"getTextAreaHeight(textAreaElement)\"\n (ngModelChange)=\"onModelChange($event)\"\n type=\"text\"\n placeholder=\"{{ fileOver ? dropFilePlaceholder : messagePlaceholder }}\"\n (keydown.enter)=\"sendMessage($event)\">\n </textarea>\n </div>\n <div class=\"message-row__btns\">\n <ng-content></ng-content>\n <input #fileInput type=\"file\" hidden multiple (change)=\"onFileSelected($event)\" />\n <i *ngIf=\"!waitForReply\" (click)=\"sendMessage($event)\" class=\"dr-icon-send-arrow-up send-button\"></i>\n\n <i *ngIf=\"waitForReply && !showDotFlashing\" class=\"dr-icon-stop abort-button\" (click)=\"abortMessage()\"></i>\n <dr-dot-flashing *ngIf=\"waitForReply && showDotFlashing\" class=\"wait-reply-dot-flashing\"></dr-dot-flashing>\n </div>\n </div>\n</div>\n", styles: [":host::ng-deep{--disabled-bg: linear-gradient(270.95deg, rgba(130, 210, 240, .2) 10.98%, rgba(146, 146, 255, .2) 93.38%);display:flex;flex-direction:column;align-items:center;padding:0}:host::ng-deep .message-row{display:flex;justify-content:center;width:100%;padding:0 0 21px;max-width:956px}:host::ng-deep .message-row__input{flex-direction:column;background-color:#fff;position:relative;display:flex;align-items:center;flex-grow:1;padding:14px 8px 8px 15px;height:auto;overflow:visible;min-width:265px;border-radius:24px;border:1.5px solid transparent;box-shadow:0 2px 16px -10px #603cff29;transition:.35s ease}:host::ng-deep .message-row__input .abort-button,:host::ng-deep .message-row__input .send-button{width:32px;height:32px;display:flex;align-items:center;justify-content:center;cursor:pointer;font-size:24px;border-radius:100px;color:#fff;transition:.15s ease-in-out;background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box}:host::ng-deep .message-row__input .send-button,:host::ng-deep .message-row__input .abort-button{background:var(--disabled-bg);pointer-events:none}:host::ng-deep .message-row__input--focused{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;height:auto!important;background:#fff}:host::ng-deep .message-row__input--filled{box-shadow:8px 8px 16px #6969ff40,-4px -4px 8px #40b6e340,8px 8px 60px #00000040;background:#fff}:host::ng-deep .message-row__input--filled .send-button{background:linear-gradient(266deg,#6969ff 25.2%,#4eb7df 90.24%) border-box;pointer-events:all}:host::ng-deep .message-row__input .wait-reply-dot-flashing{display:flex;align-items:center;width:32px;height:32px}:host::ng-deep .message-row__input:before{content:\"\";position:absolute;inset:-3px;background:linear-gradient(266.3deg,#6969ff 25.2%,#4eb7df 90.24%);border-radius:25px;z-index:-1}:host::ng-deep .message-row__input textarea{color:#333;width:100%;outline:none;min-height:30px;flex-grow:1;resize:none;padding:4px 48px 4px 4px;margin:auto;border:none;border-radius:22.5px;font-family:Poppins,sans-serif;font-size:14px;line-height:22px}:host::ng-deep .message-row__input textarea:focus{border:none}:host::ng-deep .message-row__input textarea::placeholder{color:#9ea1aa}:host::ng-deep .message-row__btns{display:flex;justify-content:space-between;width:100%;align-items:center}:host::ng-deep .message-row__input-textarea-wrap{display:flex;width:100%;position:relative}:host::ng-deep dr-chat-dropped-files{margin-right:auto}:host::ng-deep dr-chat-dropped-files .dropped-files{padding:0}:host::ng-deep dr-chat-dropped-files .dropped-files__item{margin:0}:host::ng-deep .message-row_loading .send-button{background:var(--disabled-bg);pointer-events:none}:host::ng-deep .message-row_loading .dropped-files__item{opacity:.5;pointer-events:none}\n"] }]
|
|
7189
7200
|
}], function () { return [{ type: i0.ChangeDetectorRef }, { type: i1$5.DomSanitizer }]; }, { textAreaElementRef: [{
|
|
7190
7201
|
type: ViewChild,
|
|
7191
7202
|
args: ['textAreaElement']
|
|
7192
7203
|
}], fileInput: [{
|
|
7193
7204
|
type: ViewChild,
|
|
7194
7205
|
args: ['fileInput']
|
|
7195
|
-
}],
|
|
7206
|
+
}], isUploadingFiles: [{
|
|
7196
7207
|
type: Input
|
|
7197
7208
|
}], message: [{
|
|
7198
7209
|
type: Input
|
|
@@ -9130,9 +9141,14 @@ class DrPopoverService {
|
|
|
9130
9141
|
}], function () { return [{ type: i1$1.Overlay }, { type: i1$1.OverlayPositionBuilder }, { type: i0.Injector }]; }, null); })();
|
|
9131
9142
|
|
|
9132
9143
|
class DrPopoverDirective {
|
|
9133
|
-
|
|
9144
|
+
// Using in the template as drPopoverInstance.isPopoverRef
|
|
9145
|
+
get isPopoverRef() {
|
|
9146
|
+
return !!this.popoverRef;
|
|
9147
|
+
}
|
|
9148
|
+
constructor(elementRef, drPopoverService, cdr) {
|
|
9134
9149
|
this.elementRef = elementRef;
|
|
9135
9150
|
this.drPopoverService = drPopoverService;
|
|
9151
|
+
this.cdr = cdr;
|
|
9136
9152
|
this.contentContext = {};
|
|
9137
9153
|
this.position = 'bottom';
|
|
9138
9154
|
this.class = '';
|
|
@@ -9167,6 +9183,7 @@ class DrPopoverDirective {
|
|
|
9167
9183
|
this.popoverRef.close(res);
|
|
9168
9184
|
this.popoverRef = null;
|
|
9169
9185
|
window.removeEventListener('wheel', this.scrollHandler);
|
|
9186
|
+
this.cdr.markForCheck();
|
|
9170
9187
|
}
|
|
9171
9188
|
}
|
|
9172
9189
|
renderPopover() {
|
|
@@ -9209,7 +9226,7 @@ class DrPopoverDirective {
|
|
|
9209
9226
|
}
|
|
9210
9227
|
return null;
|
|
9211
9228
|
}
|
|
9212
|
-
/** @nocollapse */ static { this.ɵfac = function DrPopoverDirective_Factory(t) { return new (t || DrPopoverDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DrPopoverService)); }; }
|
|
9229
|
+
/** @nocollapse */ static { this.ɵfac = function DrPopoverDirective_Factory(t) { return new (t || DrPopoverDirective)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(DrPopoverService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); }; }
|
|
9213
9230
|
/** @nocollapse */ static { this.ɵdir = /** @pureOrBreakMyCode */ i0.ɵɵdefineDirective({ type: DrPopoverDirective, selectors: [["", "drPopover", ""]], hostBindings: function DrPopoverDirective_HostBindings(rf, ctx) { if (rf & 1) {
|
|
9214
9231
|
i0.ɵɵlistener("click", function DrPopoverDirective_click_HostBindingHandler() { return ctx.togglePopover(); });
|
|
9215
9232
|
} }, inputs: { content: ["drPopover", "content"], contentContext: ["drPopoverContext", "contentContext"], position: ["drPopoverPosition", "position"], class: ["drPopoverClass", "class"], overlayConfig: ["drPopoverOverlayConfig", "overlayConfig"], manualClosing: ["drPopoverManualClosing", "manualClosing"], alignment: ["drPopoverAlignment", "alignment"], disabled: ["drPopoverDisabled", "disabled"], freezeToContainerSelector: ["drPopoverFreezeToContainerSelector", "freezeToContainerSelector"] }, outputs: { popoverClose: "drPopoverClose", popoverOpened: "drPopoverOpened", showStateChange: "drPopoverShowStateChange" }, exportAs: ["drPopoverInstance"] }); }
|
|
@@ -9220,7 +9237,7 @@ class DrPopoverDirective {
|
|
|
9220
9237
|
selector: '[drPopover]',
|
|
9221
9238
|
exportAs: 'drPopoverInstance',
|
|
9222
9239
|
}]
|
|
9223
|
-
}], function () { return [{ type: i0.ElementRef }, { type: DrPopoverService }]; }, { content: [{
|
|
9240
|
+
}], function () { return [{ type: i0.ElementRef }, { type: DrPopoverService }, { type: i0.ChangeDetectorRef }]; }, { content: [{
|
|
9224
9241
|
type: Input,
|
|
9225
9242
|
args: ['drPopover']
|
|
9226
9243
|
}], contentContext: [{
|