@datarailsshared/datarailsshared 1.4.177 → 1.4.179

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.
@@ -15,11 +15,11 @@ import { Overlay, OverlayPositionBuilder, OverlayConfig } from '@angular/cdk/ove
15
15
  import { ComponentPortal } from '@angular/cdk/portal';
16
16
  import * as i1$1 from '@angular/material/dialog';
17
17
  import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
18
+ import { DomSanitizer } from '@angular/platform-browser';
18
19
  import { MatCalendar, MatDatepickerModule } from '@angular/material/datepicker';
19
20
  import * as moment$9 from 'moment';
20
21
  import { MatTooltipModule } from '@angular/material/tooltip';
21
22
  import { MatTabsModule } from '@angular/material/tabs';
22
- import { DomSanitizer } from '@angular/platform-browser';
23
23
 
24
24
  // import {*} from ""
25
25
  class DateTagComponent {
@@ -3593,56 +3593,6 @@ DrDetailsListComponent.propDecorators = {
3593
3593
  collapse: [{ type: Input }]
3594
3594
  };
3595
3595
 
3596
- var TooltipPosition;
3597
- (function (TooltipPosition) {
3598
- TooltipPosition["TOP"] = "top";
3599
- TooltipPosition["BOTTOM"] = "bottom";
3600
- TooltipPosition["LEFT"] = "left";
3601
- TooltipPosition["RIGHT"] = "right";
3602
- TooltipPosition["TOP_RIGHT"] = "top-right";
3603
- TooltipPosition["TOP_LEFT"] = "top-left";
3604
- TooltipPosition["BOTTOM_RIGHT"] = "bottom-right";
3605
- TooltipPosition["BOTTOM_LEFT"] = "bottom-left";
3606
- TooltipPosition["RIGHT_TOP"] = "right-top";
3607
- TooltipPosition["RIGHT_BOTTOM"] = "right-bottom";
3608
- TooltipPosition["LEFT_TOP"] = "left-top";
3609
- TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
3610
- })(TooltipPosition || (TooltipPosition = {}));
3611
-
3612
- var Scenario;
3613
- (function (Scenario) {
3614
- Scenario["ACTUALS"] = "Actuals";
3615
- Scenario["FORECAST"] = "Forecast";
3616
- Scenario["BUDGET"] = "Budget";
3617
- Scenario["NONE"] = "None";
3618
- })(Scenario || (Scenario = {}));
3619
-
3620
- class DrModelDebounceChangeDirective {
3621
- constructor(ngModel) {
3622
- this.ngModel = ngModel;
3623
- this.debounce = 200;
3624
- this.ngModelDebounceChange = new EventEmitter();
3625
- }
3626
- ngOnInit() {
3627
- this.subscription = this.ngModel.control.valueChanges.pipe(skip(1), debounceTime(this.debounce), distinctUntilChanged()).subscribe(value => this.ngModelDebounceChange.emit(value));
3628
- }
3629
- ngOnDestroy() {
3630
- this.subscription.unsubscribe();
3631
- }
3632
- }
3633
- DrModelDebounceChangeDirective.decorators = [
3634
- { type: Directive, args: [{
3635
- selector: '[ngModelDebounceChange]'
3636
- },] }
3637
- ];
3638
- DrModelDebounceChangeDirective.ctorParameters = () => [
3639
- { type: NgModel }
3640
- ];
3641
- DrModelDebounceChangeDirective.propDecorators = {
3642
- debounce: [{ type: Input }],
3643
- ngModelDebounceChange: [{ type: Output }]
3644
- };
3645
-
3646
3596
  const IMAGE_TYPES = ['image/png', 'image/jpeg', 'image/gif'];
3647
3597
  var CHAT_MESSAGE_TYPE;
3648
3598
  (function (CHAT_MESSAGE_TYPE) {
@@ -3679,678 +3629,1166 @@ class ChatMessage {
3679
3629
  }
3680
3630
  }
3681
3631
 
3682
- var BadgeStatus;
3683
- (function (BadgeStatus) {
3684
- BadgeStatus["INFO"] = "info";
3685
- BadgeStatus["ERROR"] = "error";
3686
- BadgeStatus["WARNING"] = "warning";
3687
- BadgeStatus["SUCCESS"] = "success";
3688
- BadgeStatus["REGULAR"] = "regular";
3689
- BadgeStatus["PROGRESS"] = "progress";
3690
- BadgeStatus["DOTTED"] = "dotted";
3691
- })(BadgeStatus || (BadgeStatus = {}));
3692
-
3693
- const allDateTags = {
3694
- [TagsConfigSubType.YEAR]: {
3695
- name: 'Date',
3696
- toggle: false,
3697
- },
3698
- [TagsConfigSubType.QUARTER]: {
3699
- name: 'Date',
3700
- toggle: false,
3701
- },
3702
- [TagsConfigSubType.MONTH]: {
3703
- name: 'Date',
3704
- toggle: false,
3705
- },
3706
- [TagsConfigSubType.DAY]: {
3707
- name: 'Date',
3708
- toggle: false,
3709
- },
3710
- [TagsConfigSubType.WEEK]: {
3711
- name: 'Date',
3712
- toggle: false,
3632
+ class DrChatFormComponent {
3633
+ constructor(cdr, domSanitizer) {
3634
+ this.cdr = cdr;
3635
+ this.domSanitizer = domSanitizer;
3636
+ this._textareaInitialHeight = true;
3637
+ this.inputFocus = false;
3638
+ this.inputHover = false;
3639
+ this.droppedFiles = [];
3640
+ /**
3641
+ * Predefined message text
3642
+ *
3643
+ * @type {string}
3644
+ */
3645
+ this.message = '';
3646
+ /**
3647
+ * Message placeholder text
3648
+ *
3649
+ * @type {string}
3650
+ */
3651
+ this.messagePlaceholder = 'Type a message';
3652
+ /**
3653
+ * Show send button
3654
+ *
3655
+ * @type {boolean}
3656
+ */
3657
+ this.dropFiles = false;
3658
+ /**
3659
+ * File drop placeholder text
3660
+ *
3661
+ * @type {string}
3662
+ */
3663
+ this.dropFilePlaceholder = 'Drop file to send';
3664
+ /**
3665
+ * Parameter to check is send message function available
3666
+ *
3667
+ * @type {boolean}
3668
+ */
3669
+ this.waitForReply = false;
3670
+ /**
3671
+ *
3672
+ * @type {EventEmitter<{ message: string, files: File[] }>}
3673
+ */
3674
+ this.send = new EventEmitter();
3675
+ this.abort = new EventEmitter();
3676
+ /**
3677
+ * Emits when message input value has been changed
3678
+ *
3679
+ * @type {EventEmitter<string>}
3680
+ */
3681
+ this.inputChange = new EventEmitter();
3682
+ this.fileOver = false;
3713
3683
  }
3714
- };
3715
- function getScenarioTagDataConfig(isMultipleDimension) {
3716
- return {
3717
- [Scenario.ACTUALS]: Object.assign(Object.assign({}, allDateTags), { [TagsConfigSubType.MONTH]: {
3718
- name: 'Date',
3719
- toggle: true,
3720
- }, [TagsConfigSubType.FILE_STATUS]: {
3721
- toggle: false,
3722
- } }),
3723
- [Scenario.BUDGET]: {
3724
- [TagsConfigSubType.BUDGET_CYCLE]: {
3725
- toggle: true,
3726
- acceptableDateTags: [TagsConfigSubType.YEAR],
3727
- hidden: !isMultipleDimension,
3728
- },
3729
- [TagsConfigSubType.PLAN]: {
3730
- toggle: false,
3731
- turnOffDateTags: true,
3732
- hidden: isMultipleDimension,
3733
- },
3734
- [TagsConfigSubType.YEAR]: {
3735
- name: 'Date',
3736
- toggle: true,
3737
- },
3738
- [TagsConfigSubType.QUARTER]: {
3739
- name: 'Date',
3740
- toggle: false,
3741
- },
3742
- [TagsConfigSubType.FILE_STATUS]: {
3743
- toggle: false,
3744
- },
3745
- },
3746
- [Scenario.FORECAST]: {
3747
- [TagsConfigSubType.FORECAST_NEW]: {
3748
- toggle: true,
3749
- name: 'Date',
3750
- },
3751
- [TagsConfigSubType.FILE_STATUS]: {
3752
- toggle: false,
3753
- },
3754
- },
3755
- [Scenario.NONE]: Object.assign(Object.assign({}, allDateTags), { [TagsConfigSubType.MONTH]: {
3756
- name: 'Date',
3757
- toggle: true,
3758
- }, [TagsConfigSubType.FILE_STATUS]: {
3759
- toggle: true,
3760
- } }),
3761
- };
3762
- }
3763
-
3764
- class ScenarioService {
3765
- constructor() {
3766
- this.DEFAULT_FORECAST_DATE_TAG = 'Month';
3684
+ onDrop(event) {
3685
+ var _a;
3686
+ if (this.dropFiles) {
3687
+ event.preventDefault();
3688
+ event.stopPropagation();
3689
+ this.fileOver = false;
3690
+ if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) {
3691
+ for (const file of event.dataTransfer.files) {
3692
+ const res = file;
3693
+ if (IMAGE_TYPES.includes(file.type)) {
3694
+ const fr = new FileReader();
3695
+ fr.onload = (e) => {
3696
+ res.src = e.target.result;
3697
+ res.urlStyle = this.domSanitizer.bypassSecurityTrustStyle(`url(${res.src})`);
3698
+ this.cdr.detectChanges();
3699
+ };
3700
+ fr.readAsDataURL(file);
3701
+ }
3702
+ this.droppedFiles.push(res);
3703
+ }
3704
+ }
3705
+ }
3767
3706
  }
3768
- get scenarios() {
3769
- return orderBy(Object.values(Scenario), (scenario) => scenario === Scenario.NONE ? 1 : 0);
3707
+ removeFile(file) {
3708
+ const index = this.droppedFiles.indexOf(file);
3709
+ if (index >= 0) {
3710
+ this.droppedFiles.splice(index, 1);
3711
+ }
3770
3712
  }
3771
- get areExistingTagsConfig() {
3772
- return !!this.currentTagsConfig;
3713
+ onDragOver(event) {
3714
+ event.preventDefault();
3715
+ event.stopPropagation();
3716
+ if (this.dropFiles) {
3717
+ this.fileOver = true;
3718
+ }
3773
3719
  }
3774
- initScenarioTags(wholeTagsConfig, currentTagsConfig, isMultipleDimension) {
3775
- if (!(wholeTagsConfig === null || wholeTagsConfig === void 0 ? void 0 : wholeTagsConfig.length))
3720
+ onDragLeave(event) {
3721
+ event.preventDefault();
3722
+ event.stopPropagation();
3723
+ if (this.dropFiles) {
3724
+ this.fileOver = false;
3725
+ }
3726
+ }
3727
+ sendMessage() {
3728
+ if (this.waitForReply) {
3776
3729
  return;
3777
- this.wholeTagsConfig = cloneDeep(wholeTagsConfig);
3778
- this.currentTagsConfig = currentTagsConfig;
3779
- this.isMultipleDimension = isMultipleDimension;
3730
+ }
3731
+ if (this.droppedFiles.length || String(this.message).trim().length) {
3732
+ this._textareaInitialHeight = true;
3733
+ this.send.emit({ message: this.message, files: this.droppedFiles });
3734
+ this.message = '';
3735
+ this.droppedFiles = [];
3736
+ this.cdr.markForCheck();
3737
+ }
3780
3738
  }
3781
- getTagsConfigByScenarioTags(scenarioTags, tagsConfig) {
3782
- const scenarioTagsConfig = filter$1(tagsConfig, (tagConfig) => some(scenarioTags, (scenarioTag) => scenarioTag.toggle && scenarioTag.selectedTagSubType === tagConfig.options.sub_type));
3783
- return this.sortScenarioTags(scenarioTagsConfig);
3739
+ abortMessage() {
3740
+ this.abort.emit();
3784
3741
  }
3785
- getScenarioTagsByScenario(scenario) {
3786
- const scenarioTagsConfig = this.getScenarioTagsConfig(scenario, this.wholeTagsConfig);
3787
- const scenarioTagsUi = [];
3788
- forEach(scenarioTagsConfig, (scenarioTag) => {
3789
- const isTagWithSubTags = scenarioTag.type === TagTypes.DATE;
3790
- const tagWithSubTags = isTagWithSubTags && find(scenarioTagsUi, { type: scenarioTag.type });
3791
- const tag = tagWithSubTags || this.prepareScenarioTag(scenarioTagsConfig, scenarioTag, scenario, isTagWithSubTags);
3792
- if (isTagWithSubTags) {
3793
- this.updateScenarioSubTags(tag, scenarioTag);
3794
- tag.subTags = this.sortedScenarioSubTags(tag);
3795
- }
3796
- if (tagWithSubTags)
3797
- return;
3798
- scenarioTagsUi.push(tag);
3799
- });
3800
- if (this.areExistingTagsConfig) {
3801
- this.initExistingTagsConfig(scenario, scenarioTagsUi);
3802
- }
3803
- const isTagNotSupportingDates = some(scenarioTagsUi, { turnOffDateTags: true, toggle: true });
3804
- if (isTagNotSupportingDates) {
3805
- this.turnOffDateTag(scenarioTagsUi);
3806
- }
3807
- const tagWithSpecificDateTags = find(scenarioTagsUi, (tag) => { var _a; return tag.toggle && !!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length); });
3808
- if (tagWithSpecificDateTags) {
3809
- this.hideNotAvailableTags(tagWithSpecificDateTags, scenarioTagsUi);
3810
- }
3811
- return this.sortScenarioTags(scenarioTagsUi);
3812
- }
3813
- sortScenarioTags(scenarioTagsUi) {
3814
- return orderBy(scenarioTagsUi, [
3815
- (tag) => (tag.type === TagTypes.DATE ? 0 : 1),
3816
- (tag) => (tag.name === 'File Status')
3817
- ]);
3818
- }
3819
- initExistingTagsConfig(scenario, scenarioTagsUi) {
3820
- forEach(this.currentTagsConfig, (tagConfig) => {
3821
- var _a;
3822
- const tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
3823
- const scenarioTagDataConfig = getScenarioTagDataConfig(this.isMultipleDimension);
3824
- if (!scenarioTagDataConfig || !scenarioTagDataConfig[scenario] || !scenarioTagDataConfig[scenario][tagSubType]) {
3825
- return;
3826
- }
3827
- const scenarioTagUi = tagConfig.type === TagTypes.DATE
3828
- ? find(scenarioTagsUi, { type: tagConfig.type })
3829
- : find(scenarioTagsUi, { selectedTagSubType: tagSubType });
3830
- scenarioTagUi.toggle = true;
3831
- scenarioTagUi.selectedTagSubType = tagSubType;
3832
- });
3742
+ onModelChange(value) {
3743
+ this._textareaInitialHeight = false;
3744
+ this.inputChange.emit(value);
3833
3745
  }
3834
- prepareScenarioTag(scenarioTagsConfig, scenarioTag, scenario, isDateTag) {
3835
- const toggleStatus = isDateTag
3836
- ? some(scenarioTagsConfig, (tag) => tag.type === TagTypes.DATE && tag.scenarioData.toggle)
3837
- : scenarioTag.scenarioData.toggle;
3838
- const selectedTagSubType = isDateTag
3839
- ? this.getScenarioSelectedDateTag(scenario, scenarioTagsConfig)
3840
- : scenarioTag.options.sub_type;
3841
- const tag = {
3842
- toggle: this.areExistingTagsConfig ? false : toggleStatus,
3843
- name: scenarioTag.scenarioData.name || scenarioTag.name,
3844
- description: scenarioTag.scenarioData.description || scenarioTag.description,
3845
- type: scenarioTag.type,
3846
- selectedTagSubType,
3847
- };
3848
- if (scenarioTag.scenarioData.turnOffDateTags) {
3849
- tag.turnOffDateTags = scenarioTag.scenarioData.turnOffDateTags;
3850
- }
3851
- if (scenarioTag.scenarioData.acceptableDateTags) {
3852
- tag.acceptableDateTags = scenarioTag.scenarioData.acceptableDateTags;
3746
+ getTextAreaHeight(textAreaElement) {
3747
+ let height;
3748
+ if (this._textareaInitialHeight) {
3749
+ height = 50;
3853
3750
  }
3854
- return tag;
3855
- }
3856
- sortedScenarioSubTags(tag) {
3857
- const SUB_TAGS_ORDER = [TagsConfigSubType.DAY, TagsConfigSubType.WEEK, TagsConfigSubType.MONTH, TagsConfigSubType.QUARTER, TagsConfigSubType.YEAR];
3858
- return orderBy(tag.subTags, (subTag) => indexOf(SUB_TAGS_ORDER, subTag.subType));
3859
- }
3860
- updateScenarioSubTags(tag, scenarioTag) {
3861
- if (!tag.subTags) {
3862
- tag.subTags = [];
3751
+ else {
3752
+ height = textAreaElement.scrollHeight + 2;
3863
3753
  }
3864
- const tagSubType = scenarioTag.options.sub_type;
3865
- tag.subTags.push({
3866
- subType: tagSubType,
3867
- name: tagSubType === TagsConfigSubType.FORECAST_NEW ? this.DEFAULT_FORECAST_DATE_TAG : scenarioTag.name,
3868
- });
3754
+ return `height: ${height}px;`;
3869
3755
  }
3870
- turnOffDateTag(scenarioTags) {
3871
- const dateTag = find(scenarioTags, { type: TagTypes.DATE });
3872
- if (!dateTag)
3873
- return;
3874
- dateTag.toggle = false;
3756
+ }
3757
+ DrChatFormComponent.decorators = [
3758
+ { type: Component, args: [{
3759
+ selector: 'dr-chat-form',
3760
+ template: "<div class=\"dropped-files\" *ngIf=\"droppedFiles?.length\">\n <div class=\"dropped-files__item\" *ngFor=\"let file of droppedFiles\">\n <div class=\"dropped-files__item__preview\" [style.background-image]=\"file.urlStyle || 'none'\">\n <i class=\"dr-icon-file\" *ngIf=\"!file.urlStyle\"></i>\n </div>\n <div class=\"dropped-files__item__name\">{{ file.name }}</div>\n <i class=\"dropped-files__item__remove dr-icon-exit\" (click)=\"removeFile(file)\"></i>\n </div>\n</div>\n<div class=\"message-row\">\n <div class=\"message-row__input\">\n <textarea #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 (keyup.enter)=\"sendMessage()\">\n </textarea>\n <i *ngIf=\"!waitForReply\" (click)=\"sendMessage()\" class=\"dr-icon-notify send-button\"></i>\n <dr-dot-flashing *ngIf=\"waitForReply\" class=\"wait-reply-dot-flashing\"></dr-dot-flashing>\n <dr-button *ngIf=\"waitForReply\" (click)=\"abortMessage()\" theme=\"ghost\" class=\"abort-button\">Stop generating</dr-button>\n </div>\n</div>\n",
3761
+ changeDetection: ChangeDetectionStrategy.OnPush,
3762
+ styles: [":host{display:flex;flex-direction:column;align-items:center;padding:0 24px;margin-top:12px}:host .message-row{display:flex;justify-content:center;width:100%;padding:0 0 21px;max-width:970px}:host .message-row__input{position:relative;display:flex;align-items:center;flex-grow:1;flex-direction:row;height:auto;overflow:visible;min-width:265px}:host .message-row__input textarea{font-size:14px;line-height:22px;max-height:100%;flex-grow:1;resize:none;padding:14px 40px 12px 23px;margin:auto;border:1px solid #DFE0E3;border-radius:12px;min-height:50px}:host .message-row__input textarea:focus{border:1px solid #7F7FDD}:host .message-row__input textarea::placeholder{color:#9ea1aa}:host .message-row__input .send-button{position:absolute;right:14px;cursor:pointer;color:#dfe0e3;font-size:28px}:host .message-row__input .wait-reply-dot-flashing{position:absolute;right:20px}:host .message-row__input textarea:focus+.send-button,:host .message-row__input .send-button:hover{color:#25258c}:host .message-row__input .abort-button{position:absolute;right:0;top:-44px}:host .message-row__input .abort-button::ng-deep button{background:#F2F2FF!important;border-radius:4px}:host input{flex:1}:host input.with-button{border-bottom-right-radius:0;border-top-right-radius:0}:host .dropped-files{display:flex;flex-direction:row;margin-bottom:.5rem;flex-wrap:wrap}:host .dropped-files__item{display:flex;flex-direction:column;justify-content:center;margin:0 10px 10px 0;position:relative}:host .dropped-files__item__preview{background-size:cover;background-position:center;width:64px;height:64px;border-radius:8px;border:1px solid #ccc}:host .dropped-files__item__preview i{font-size:62px}:host .dropped-files__item__name{white-space:nowrap;font-size:12px;color:#8f929e;margin-top:4px;max-width:64px;overflow:hidden;text-overflow:ellipsis}:host .dropped-files__item__remove{position:absolute;right:-4px;top:-4px;cursor:pointer;background:white;border-radius:12px;color:#8f929e;border:1px solid #8f929e;font-size:14px}\n"]
3763
+ },] }
3764
+ ];
3765
+ DrChatFormComponent.ctorParameters = () => [
3766
+ { type: ChangeDetectorRef },
3767
+ { type: DomSanitizer }
3768
+ ];
3769
+ DrChatFormComponent.propDecorators = {
3770
+ message: [{ type: Input }],
3771
+ messagePlaceholder: [{ type: Input }],
3772
+ dropFiles: [{ type: Input }],
3773
+ dropFilePlaceholder: [{ type: Input }],
3774
+ waitForReply: [{ type: Input }],
3775
+ send: [{ type: Output }],
3776
+ abort: [{ type: Output }],
3777
+ inputChange: [{ type: Output }],
3778
+ fileOver: [{ type: HostBinding, args: ['class.file-over',] }],
3779
+ onDrop: [{ type: HostListener, args: ['drop', ['$event'],] }],
3780
+ onDragOver: [{ type: HostListener, args: ['dragover', ['$event'],] }],
3781
+ onDragLeave: [{ type: HostListener, args: ['dragleave', ['$event'],] }]
3782
+ };
3783
+
3784
+ /**
3785
+ * `DrCustomMessageService` is used to store instances of `DrChatCustomMessageDirective`s which
3786
+ * were provided in the chat component.
3787
+ */
3788
+ class DrChatCustomMessageService {
3789
+ constructor() {
3790
+ this.customMessages = new Map();
3875
3791
  }
3876
- hideNotAvailableTags(tagWithSpecificDateTags, scenarioTags) {
3877
- var _a;
3878
- const subTags = (_a = find(scenarioTags, { type: TagTypes.DATE })) === null || _a === void 0 ? void 0 : _a.subTags;
3879
- if (!subTags.length)
3880
- return;
3881
- forEach(scenarioTags, (tag) => {
3882
- var _a;
3883
- if (!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length))
3884
- return;
3885
- if (tag !== tagWithSpecificDateTags) {
3886
- tag.toggle = false;
3887
- }
3888
- });
3889
- forEach(subTags, (subTag) => {
3890
- subTag.hidden = !tagWithSpecificDateTags.acceptableDateTags.includes(subTag.subType);
3891
- });
3792
+ register(type, instance) {
3793
+ this.customMessages.set(type, instance);
3892
3794
  }
3893
- getScenarioSelectedDateTag(scenario, dateTags) {
3894
- var _a, _b;
3895
- const monthSubType = (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.MONTH)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type;
3896
- const scenarioSelectedDateTag = {
3897
- [Scenario.ACTUALS]: () => monthSubType,
3898
- [Scenario.BUDGET]: () => { var _a, _b; return (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.YEAR)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
3899
- [Scenario.FORECAST]: () => { var _a, _b; return (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.FORECAST_NEW)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
3900
- [Scenario.NONE]: () => monthSubType,
3901
- };
3902
- if (!scenarioSelectedDateTag[scenario])
3903
- return;
3904
- return scenarioSelectedDateTag[scenario]();
3795
+ unregister(type) {
3796
+ return this.customMessages.delete(type);
3905
3797
  }
3906
- getScenarioTagsConfig(scenario, tagsConfig) {
3907
- return reduce(tagsConfig, (acc, tagConfig) => {
3908
- var _a;
3909
- const tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
3910
- const scenarioTagDataConfig = getScenarioTagDataConfig(this.isMultipleDimension);
3911
- const scenarioTagConfig = scenarioTagDataConfig && scenarioTagDataConfig[scenario] ?
3912
- scenarioTagDataConfig[scenario][tagSubType] : null;
3913
- if (!scenarioTagConfig || scenarioTagConfig.hidden)
3914
- return acc;
3915
- const clonedTagConfig = cloneDeep(tagConfig);
3916
- const scenarioTag = Object.assign(Object.assign({}, clonedTagConfig), { scenarioData: scenarioTagConfig });
3917
- acc.push(scenarioTag);
3918
- return acc;
3919
- }, []);
3798
+ getInstance(type) {
3799
+ return this.customMessages.get(type);
3920
3800
  }
3921
3801
  }
3922
- ScenarioService.decorators = [
3802
+ DrChatCustomMessageService.decorators = [
3923
3803
  { type: Injectable }
3924
3804
  ];
3925
3805
 
3926
- class DrSharedUtils {
3806
+ class DrChatMessageComponent {
3807
+ constructor(customMessageService) {
3808
+ this.customMessageService = customMessageService;
3809
+ this.MESSAGE_TYPE = CHAT_MESSAGE_TYPE;
3810
+ this._reply = false;
3811
+ }
3812
+ get flyInOut() {
3813
+ return true;
3814
+ }
3815
+ get notReply() {
3816
+ return !this.reply;
3817
+ }
3927
3818
  /**
3928
- * Get timeframe (day, year, month, quarter) based on passed format
3929
- *
3930
- * @param format - date format string. Examples: MM/DD/YYYY, Q/YYYY
3819
+ * Determines if a message is a reply
3931
3820
  */
3932
- static getTimeframeByDateFormat(format) {
3933
- const defaultFrame = TimeframeOption.DAY;
3934
- if (!format) {
3935
- return defaultFrame;
3936
- }
3937
- const lowerCaseFormat = format.toLowerCase();
3938
- switch (true) {
3939
- case lowerCaseFormat.includes('q'):
3940
- return TimeframeOption.QUARTER;
3941
- case lowerCaseFormat.includes('d'):
3942
- return TimeframeOption.DAY;
3943
- case lowerCaseFormat.includes('w'):
3944
- return TimeframeOption.WEEK;
3945
- case lowerCaseFormat.includes('m'):
3946
- return TimeframeOption.MONTH;
3947
- case lowerCaseFormat.includes('y'):
3948
- return TimeframeOption.YEAR;
3949
- default:
3950
- return defaultFrame;
3951
- }
3821
+ get reply() {
3822
+ return this._reply;
3952
3823
  }
3953
- static getDateByTag(tag) {
3954
- const todayDate = moment$9().utc().endOf('day');
3955
- switch (tag) {
3956
- case DateTags.TODAY:
3957
- return todayDate;
3958
- case DateTags.YESTERDAY:
3959
- todayDate.subtract(1, 'days');
3960
- return todayDate;
3961
- case DateTags.THIS_MONTH:
3962
- todayDate.endOf('month');
3963
- return todayDate;
3964
- case DateTags.PREV_MONTH:
3965
- todayDate.subtract(1, 'months').endOf('month');
3966
- return todayDate;
3824
+ set reply(value) {
3825
+ this._reply = !!value;
3826
+ }
3827
+ getTemplate() {
3828
+ this.customMessage = true;
3829
+ const customMessage = this.getCustomMessage(this.type);
3830
+ return customMessage.templateRef;
3831
+ }
3832
+ getTemplateContext() {
3833
+ return { $implicit: this.customMessageData, isReply: this.reply };
3834
+ }
3835
+ getCustomMessage(type) {
3836
+ const customMessageDirective = this.customMessageService.getInstance(type);
3837
+ if (!customMessageDirective) {
3838
+ throw new Error(`dr-chat: Can't find template for custom type '${type}'. ` +
3839
+ `Make sure you provide it in the chat component with *drCustomMessage='${type}'.`);
3967
3840
  }
3841
+ return customMessageDirective;
3968
3842
  }
3969
3843
  }
3970
-
3971
- // @ts-ignore
3972
- const moment$2 = require('moment');
3973
- class DrDatePickerService {
3974
- constructor() {
3975
- this.isTimeframeSelectionEnabled = false;
3976
- this.timeframe = TimeframeOption.DAY;
3977
- this.format$ = new BehaviorSubject(DateFromats.MAT_DEFAULT_DATE_FORMAT);
3978
- this.updatedQuarter$ = new Subject();
3979
- this.updatedDateAndClose$ = new Subject();
3980
- this.presetTag$ = new BehaviorSubject('');
3981
- this.onSameDaySelectedInCalendar$ = new Subject();
3982
- this.keepPresetTag = false;
3983
- this.isValueUpdating = false;
3984
- this.availableTimeframes = [
3985
- TimeframeOption.DAY,
3986
- TimeframeOption.WEEK,
3987
- TimeframeOption.MONTH,
3988
- TimeframeOption.QUARTER,
3989
- TimeframeOption.YEAR
3990
- ];
3991
- this.formatConfig = {
3992
- day: DateFromats.MAT_DEFAULT_DATE_FORMAT,
3993
- month: DateFromats.MONTH_YEAR_FORMAT,
3994
- year: DateFromats.YEAR_FORMAT,
3995
- quarter: DateFromats.QUARTER_FORMAT,
3996
- week: DateFromats.WEEK_FORMAT
3997
- };
3998
- this.fiscalYearMonthsModifier = 0;
3844
+ DrChatMessageComponent.decorators = [
3845
+ { type: Component, args: [{
3846
+ selector: 'dr-chat-message',
3847
+ template: "<ng-container *ngIf=\"message.avatarUrl; else userAvatar\">\n <div class=\"avatar\" [style.background-image]=\"'url(' + message.avatarUrl + ')'\"></div>\n</ng-container>\n<ng-template #userAvatar>\n <dr-avatar *ngIf=\"message.user\" [users]=\"message.user\"></dr-avatar>\n</ng-template>\n<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-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 class=\"message__actions\" *ngIf=\"drChatMessageActions;\">\n <ng-container [ngTemplateOutlet]=\"drChatMessageActions\"></ng-container>\n </div>\n</div>\n",
3848
+ animations: [
3849
+ trigger('flyInOut', [
3850
+ state('in', style({ transform: 'translateX(0)' })),
3851
+ transition('void => *', [style({ transform: 'translateX(-100%)' }), animate(80)]),
3852
+ transition('* => void', [animate(80, style({ transform: 'translateX(100%)' }))]),
3853
+ ]),
3854
+ ],
3855
+ changeDetection: ChangeDetectionStrategy.OnPush,
3856
+ styles: [":host{position:relative;display:flex;flex-direction:row;width:100%;background:rgba(249,250,255,.7);border-top:1px solid #E5E5E5;padding:16px 24px}:host:first-child{border:none}:host:last-child{border-bottom:1px solid #E5E5E5}.reply+:host.reply,.not-reply+:host.not-reply{border-top:none;padding-top:0;padding-left:75px}.reply+:host.reply .avatar,.reply+:host.reply dr-avatar,.not-reply+:host.not-reply .avatar,.not-reply+:host.not-reply dr-avatar{display:none}:host.not-reply{background-color:#fff}:host .avatar{display:flex;width:28px;height:28px;background-color:#fff;border-radius:16px;flex-shrink:0;box-shadow:0 1px 3px 1px #0003;background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22Layer_1%22 data-name%3D%22Layer 1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 viewBox%3D%220 0 74 65%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1%2C .cls-2%2C .cls-3 %7B fill%3A none%3B %7D .cls-4 %7B fill%3A url(%23linear-gradient)%3B %7D .cls-5 %7B fill%3A %234eb7df%3B %7D .cls-2 %7B stroke%3A %23a6a8aa%3B stroke-miterlimit%3A 10%3B stroke-width%3A .37px%3B %7D .cls-6 %7B fill%3A url(%23linear-gradient-3)%3B %7D .cls-7 %7B fill%3A url(%23linear-gradient-2)%3B %7D .cls-3 %7B clip-path%3A url(%23clippath)%3B %7D %3C%2Fstyle%3E %3CclipPath id%3D%22clippath%22%3E %3Crect class%3D%22cls-1%22 width%3D%2274%22 height%3D%2265%22%2F%3E %3C%2FclipPath%3E %3ClinearGradient id%3D%22linear-gradient%22 x1%3D%2224.26%22 y1%3D%22-3.79%22 x2%3D%2295.63%22 y2%3D%2288.82%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%237676ff%22%2F%3E %3Cstop offset%3D%22.18%22 stop-color%3D%22%235959ff%22%2F%3E %3Cstop offset%3D%22.35%22 stop-color%3D%22%235757e0%22%2F%3E %3Cstop offset%3D%22.61%22 stop-color%3D%22%234646ce%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234b4be4%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234444eb%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-2%22 x1%3D%2212.05%22 y1%3D%2277.06%22 x2%3D%2210.77%22 y2%3D%2213.85%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%22.45%22 stop-color%3D%22%232f92b8%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234eb7df%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234eb7df%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-3%22 x1%3D%2262.26%22 y1%3D%22-2.54%22 x2%3D%2261.76%22 y2%3D%2285.91%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%2336369b%22%2F%3E %3Cstop offset%3D%22.52%22 stop-color%3D%22%234848d0%22%2F%3E %3C%2FlinearGradient%3E %3C%2Fdefs%3E %3Cg class%3D%22cls-3%22%3E %3Cg%3E %3Cpath class%3D%22cls-4%22 d%3D%22m73.32%2C24.79v15.73c0%2C13.12-9.87%2C23.79-22%2C23.79h-21.32c-3.46-.06-6.25-3.11-6.25-6.87s2.79-6.81%2C6.25-6.87h21.32c5.13%2C0%2C9.29-4.51%2C9.29-10.05v-15.73c0-5.54-4.17-10.05-9.29-10.05h-7.46c3.51%2C0%2C6.35-3.08%2C6.35-6.88s-2.79-6.8-6.25-6.87h7.35c12.12%2C0%2C22%2C10.67%2C22%2C23.79h0Z%22%2F%3E %3Cpath class%3D%22cls-5%22 d%3D%22m50.26%2C7.82c0%2C3.8-2.9%2C6.93-6.41%2C6.93h-21.86c-5.13%2C0-9.29%2C4.51-9.29%2C10.05v15.73c0%2C5.54%2C4.17%2C10.05%2C9.29%2C10.05h8.01c-3.46.06-6.25%2C3.11-6.25%2C6.87s2.79%2C6.81%2C6.25%2C6.87h-8.01c-12.12%2C0-22-10.67-22-23.79v-15.73C0%2C11.68%2C9.87%2C1%2C21.99%2C1h21.97c3.46.06%2C6.3%2C3.06%2C6.3%2C6.82Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m66.45%2C1h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m36.05%2C50.58h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-7%22 d%3D%22m0%2C33.78v-2.76C0%2C12.9%2C13.62%2C14.48%2C13.62%2C14.48h8.38c-5.5.46-9.5%2C4.71-9.5%2C9.96l.02%2C15.8c0%2C5.54%2C4.44%2C10.59%2C9.48%2C10.59l-8-.5S0%2C51.88%2C0%2C33.77h0Z%22%2F%3E %3Cpath class%3D%22cls-6%22 d%3D%22m73%2C31.51v2.76c0%2C18.12-13.62%2C16.53-13.62%2C16.53h-7.99c5.61-.85%2C9.09-4.76%2C9.09-10.02l.02-16.33c0-5.54-4.46-10-9.5-10h8s13.99-1.05%2C13.99%2C17.07h0Z%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\");background-size:20px 22px;background-repeat:no-repeat;background-position-x:4px;background-position-y:3px}:host .avatar,:host dr-avatar{margin:0 23px 0 0}:host .message{display:flex;align-items:center;flex-grow:1}:host .message__actions{display:flex;align-items:center;margin-left:24px;flex-grow:1;justify-content:flex-end}:host .message__actions::ng-deep button:not(:hover) i[class*=dr-icon]{color:#b9b9ec!important}\n"]
3857
+ },] }
3858
+ ];
3859
+ DrChatMessageComponent.ctorParameters = () => [
3860
+ { type: DrChatCustomMessageService }
3861
+ ];
3862
+ DrChatMessageComponent.propDecorators = {
3863
+ flyInOut: [{ type: HostBinding, args: ['@flyInOut',] }],
3864
+ notReply: [{ type: HostBinding, args: ['class.not-reply',] }],
3865
+ reply: [{ type: Input }, { type: HostBinding, args: ['class.reply',] }],
3866
+ type: [{ type: Input }],
3867
+ message: [{ type: Input }],
3868
+ customMessageData: [{ type: Input }],
3869
+ user: [{ type: Input }],
3870
+ drChatMessageActions: [{ type: ContentChild, args: ['drChatMessageActions',] }]
3871
+ };
3872
+
3873
+ class DrChatSuggestionsComponent {
3874
+ constructor(cdr) {
3875
+ this.cdr = cdr;
3876
+ this._nonHiddenValues = [];
3877
+ this.visibleValues = [];
3878
+ this.isSuggestedMenuOpen = false;
3879
+ this.values = [];
3880
+ this.fullScreen = false;
3881
+ this.buttonMode = false;
3882
+ /**
3883
+ * Parameter to check is send message function available
3884
+ *
3885
+ * @type {boolean}
3886
+ */
3887
+ this.waitForReply = false;
3888
+ this.suggestionSelect = new EventEmitter();
3999
3889
  }
4000
- getDisplayPrefix() {
4001
- const formatCached = this.format$.getValue();
4002
- switch (true) {
4003
- case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('Q'):
4004
- return 'Q';
4005
- case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('W'):
4006
- return 'W';
4007
- default:
4008
- return '';
4009
- }
3890
+ get hiddenValues() {
3891
+ return JSON.parse(localStorage.getItem('aiChatSuggestions')) || [];
4010
3892
  }
4011
- getTimeframe(format) {
4012
- return DrSharedUtils.getTimeframeByDateFormat(format);
3893
+ set hiddenValues(values) {
3894
+ localStorage.setItem('aiChatSuggestions', JSON.stringify(values));
4013
3895
  }
4014
- getConfiguredFormat(timeframe) {
4015
- return this.formatConfig[timeframe];
3896
+ ngOnInit() {
3897
+ this.filterValues();
4016
3898
  }
4017
- updateTimeframeAndFormat(format) {
4018
- const normalizedFormat = this.normalizeValue(format || this.format$.getValue());
4019
- this.timeframe = this.getTimeframe(normalizedFormat);
4020
- this.format$.next(this.getConfiguredFormat(this.timeframe));
3899
+ onItemClick(item) {
3900
+ if (this.waitForReply) {
3901
+ return;
3902
+ }
3903
+ this.isSuggestedMenuOpen = false;
3904
+ this.suggestionSelect.emit(item);
3905
+ this.hiddenValues = [...this.hiddenValues, item];
3906
+ this.filterValues();
4021
3907
  }
4022
- normalizeValue(value) {
4023
- return value.replace(/d/g, 'D');
3908
+ filterValues() {
3909
+ const hiddenValues = this.hiddenValues;
3910
+ this._nonHiddenValues = _.filter(this.values, val => !hiddenValues.includes(val));
3911
+ this.fillVisibleValues();
4024
3912
  }
4025
- /**
4026
- * Get quarter number for date according to fiscal year
4027
- *
4028
- * @param date
4029
- */
4030
- getQuarterAccordingToFiscalYear(date) {
4031
- let fiscalMonth = this.fiscalYearMonthsModifier;
4032
- const dateMonth = date.month();
4033
- if (dateMonth < fiscalMonth) {
4034
- fiscalMonth -= 12;
3913
+ fillVisibleValues() {
3914
+ const maxItemsCount = this.fullScreen ? 6 : 4;
3915
+ const nonHiddenValues = _.clone(this._nonHiddenValues);
3916
+ this.visibleValues.length = 0;
3917
+ for (let i = 0; i < maxItemsCount; i++) {
3918
+ if (!nonHiddenValues.length) {
3919
+ break;
3920
+ }
3921
+ const randomIndex = Math.floor(Math.random() * nonHiddenValues.length);
3922
+ const item = nonHiddenValues.splice(randomIndex, 1)[0];
3923
+ this.visibleValues.push(item);
4035
3924
  }
4036
- return Math.trunc((date.month() - fiscalMonth) / 3) + 1;
3925
+ this.cdr.markForCheck();
4037
3926
  }
4038
- /**
4039
- * Sets date to end of quarter in FY by passed quarter number
4040
- *
4041
- * @param date
4042
- * @param quarterNumber
4043
- */
4044
- setEndOfQuarter(date, quarterNumber) {
4045
- date
4046
- .subtract(this.fiscalYearMonthsModifier, 'M')
4047
- .startOf('year')
4048
- .add(this.fiscalYearMonthsModifier + quarterNumber * 3 - 1, 'M')
4049
- .endOf('month');
3927
+ clearHidden() {
3928
+ localStorage.setItem('aiChatSuggestions', null);
3929
+ this.filterValues();
4050
3930
  }
4051
- /**
4052
- * Sets date to start of quarter in FY by passed quarter number
4053
- *
4054
- * @param date
4055
- * @param quarterNumber
4056
- */
4057
- setStartOfQuarter(date, quarterNumber) {
4058
- date
4059
- .subtract(this.fiscalYearMonthsModifier, 'M')
4060
- .startOf('year')
4061
- .add(this.fiscalYearMonthsModifier + (quarterNumber - 1) * 3, 'M');
3931
+ toggleSuggestedMenu() {
3932
+ this.isSuggestedMenuOpen = !this.isSuggestedMenuOpen;
3933
+ if (this.isSuggestedMenuOpen) {
3934
+ this.fillVisibleValues();
3935
+ }
3936
+ this.cdr.markForCheck();
4062
3937
  }
4063
- /**
4064
- * Sets date to end of current quarter (in which date is located) according to FY
4065
- *
4066
- * @param date
4067
- */
4068
- setEndOfCurrentQuarter(date) {
4069
- this.setEndOfQuarter(date, this.getQuarterAccordingToFiscalYear(date));
3938
+ }
3939
+ DrChatSuggestionsComponent.decorators = [
3940
+ { type: Component, args: [{
3941
+ selector: 'dr-chat-suggestions',
3942
+ template: "<div class=\"chat-suggestions\">\n <ng-container *ngIf=\"buttonMode; else suggestionCards\">\n <div class=\"chat-suggestions__container\"\n [class.chat-suggestions__container--opened]=\"isSuggestedMenuOpen\"\n *ngIf=\"visibleValues.length\">\n <dr-button theme=\"ghost\" class=\"chat-suggestions__container__button\" (click)=\"toggleSuggestedMenu()\">\n Suggested chats\n </dr-button>\n <ng-container *ngTemplateOutlet=\"suggestionCards\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #suggestionCards>\n <div class=\"chat-suggestions__items\">\n <div class=\"chat-suggestions__items__background\"></div>\n <div *ngFor=\"let item of visibleValues\"\n class=\"chat-suggestions__items__item\" (click)=\"onItemClick(item)\">\n {{ item }}\n </div>\n </div>\n</ng-template>\n",
3943
+ changeDetection: ChangeDetectionStrategy.OnPush,
3944
+ styles: [":host{display:flex;align-items:flex-start;justify-content:center}:host .chat-suggestions{display:flex;width:100%;max-width:970px}:host .chat-suggestions__container{display:flex;position:relative;width:auto;margin-top:12px;padding:0 24px}:host .chat-suggestions__container__button{z-index:3}:host .chat-suggestions__container__button::ng-deep button{background:#F2F2FB!important;border-radius:4px;cursor:pointer}:host .chat-suggestions__container .chat-suggestions__items{display:none;position:absolute;width:100%;bottom:0;left:0;padding-bottom:32px;z-index:2}:host .chat-suggestions__container--opened{width:100%}:host .chat-suggestions__container--opened .chat-suggestions__container__button::ng-deep button{color:#4646ce;background:#F2F2FB}:host .chat-suggestions__container--opened .chat-suggestions__items,:host .chat-suggestions__container--opened .chat-suggestions__items__background{display:flex}:host .chat-suggestions__items{display:flex;flex-wrap:wrap;width:100%;justify-content:space-between;padding:0 24px}:host .chat-suggestions__items__background{display:none;position:absolute;top:-32px;right:0;bottom:32px;left:0;background:#FFFFFF;opacity:.7;z-index:-1}:host .chat-suggestions__items__item{margin:0 0 20px;display:inline-flex;height:76px;width:275px;padding:16px;border-radius:8px;background:#F2F2FB;box-shadow:0 1px 2px #00000026;font-size:14px;line-height:24px;color:#25258c}:host .chat-suggestions__items__item:hover{cursor:pointer;background:#EAEAFF}\n"]
3945
+ },] }
3946
+ ];
3947
+ DrChatSuggestionsComponent.ctorParameters = () => [
3948
+ { type: ChangeDetectorRef }
3949
+ ];
3950
+ DrChatSuggestionsComponent.propDecorators = {
3951
+ values: [{ type: Input }],
3952
+ fullScreen: [{ type: Input }],
3953
+ buttonMode: [{ type: Input }],
3954
+ waitForReply: [{ type: Input }],
3955
+ suggestionSelect: [{ type: Output }]
3956
+ };
3957
+
3958
+ class DrChatComponent {
3959
+ constructor(cdr) {
3960
+ this.cdr = cdr;
3961
+ this.destroy$ = new Subject();
3962
+ this.showClearButton = true;
3963
+ this.noMessagesPlaceholder = 'No messages yet.';
3964
+ this._scrollBottom = true;
3965
+ this.suggestions = [];
3966
+ /**
3967
+ * Parameter to check is send message function available
3968
+ *
3969
+ * @type {boolean}
3970
+ */
3971
+ this.waitForReply = false;
3972
+ this.clear = new EventEmitter();
3973
+ this.close = new EventEmitter();
3974
+ this.suggestionSelect = new EventEmitter();
4070
3975
  }
4071
- /**
4072
- * Sets date to start of current quarter (in which date is located) according to FY
4073
- *
4074
- * @param date
4075
- */
4076
- setStartOfCurrentQuarter(date) {
4077
- this.setStartOfQuarter(date, this.getQuarterAccordingToFiscalYear(date));
3976
+ set contentUpdateSubject(value) {
3977
+ if (value) {
3978
+ value.pipe(takeUntil(this.destroy$)).subscribe(() => {
3979
+ this.updateView();
3980
+ });
3981
+ }
4078
3982
  }
3983
+ ;
4079
3984
  /**
4080
- * If date selection on this timeframe depends on Fiscal Year
4081
- *
4082
- * @param timeframe
3985
+ * Scroll chat to the bottom of the list when a new message arrives
4083
3986
  */
4084
- isTimeframeDependingOnFY(timeframe) {
4085
- return _.includes([TimeframeOption.QUARTER, TimeframeOption.YEAR], timeframe);
3987
+ get scrollBottom() {
3988
+ return this._scrollBottom;
4086
3989
  }
4087
- /**
4088
- * Subtract from date fiscal year shift months count
4089
- *
4090
- * @param date
4091
- */
4092
- subtractFiscalYearMonthsFromDate(date) {
4093
- return this.getDateModifiedByFiscalMonths(date, true);
3990
+ set scrollBottom(value) {
3991
+ this._scrollBottom = !!value;
4094
3992
  }
4095
- /**
4096
- * Add to date fiscal year shift months count
4097
- *
4098
- * @param date
4099
- */
4100
- addFiscalYearMonthsToDate(date) {
4101
- return this.getDateModifiedByFiscalMonths(date);
3993
+ get messagesContainerWithScroll() {
3994
+ return this.messagesContainer && this.messagesContainer.nativeElement.scrollHeight > this.messagesContainer.nativeElement.offsetHeight;
4102
3995
  }
4103
- /**
4104
- * Add or subtract depending on isRevert paremeter Fiscal year month shift
4105
- *
4106
- * @param date
4107
- * @param isSubtract
4108
- */
4109
- getDateModifiedByFiscalMonths(date, isSubtract = false) {
4110
- return date ? _.cloneDeep(date)[isSubtract ? 'subtract' : 'add'](this.fiscalYearMonthsModifier, 'month') : date;
3996
+ ;
3997
+ ngAfterViewInit() {
3998
+ this.messages.changes.subscribe(messages => {
3999
+ this.messages = messages;
4000
+ this.updateView();
4001
+ });
4002
+ this.updateView();
4111
4003
  }
4112
- updateDatePickerByPreset(tag, calender) {
4113
- this.keepPresetTag = true;
4114
- let date = null;
4115
- if (tag) {
4116
- date = DrSharedUtils.getDateByTag(tag);
4117
- switch (tag) {
4118
- case DateTags.TODAY:
4119
- this.updateTimeframeAndFormat(DateFromats.MAT_DEFAULT_DATE_FORMAT);
4120
- break;
4121
- case DateTags.YESTERDAY:
4122
- this.updateTimeframeAndFormat(DateFromats.MAT_DEFAULT_DATE_FORMAT);
4123
- break;
4124
- case DateTags.THIS_MONTH:
4125
- this.updateTimeframeAndFormat(DateFromats.MONTH_YEAR_FORMAT);
4126
- this.selectDateInCalendarMonthView(date, calender);
4127
- break;
4128
- case DateTags.PREV_MONTH:
4129
- this.updateTimeframeAndFormat(DateFromats.MONTH_YEAR_FORMAT);
4130
- this.selectDateInCalendarMonthView(date, calender);
4131
- break;
4132
- }
4004
+ updateView() {
4005
+ if (this.scrollBottom) {
4006
+ this.scrollListBottom();
4133
4007
  }
4134
- this.presetTag$.next(tag);
4135
- this.updatedDateAndClose$.next(date);
4136
4008
  }
4137
- selectDateInCalendarMonthView(date, calender) {
4009
+ scrollListBottom() {
4138
4010
  setTimeout(() => {
4139
- const monthView = calender.monthView;
4140
- if (monthView) {
4141
- monthView._activeDate = date;
4142
- monthView._selected = date;
4143
- monthView._init();
4144
- }
4145
- });
4146
- }
4147
- resetPresetTag() {
4148
- if (!this.keepPresetTag) {
4149
- this.presetTag$.next(null);
4150
- }
4151
- else {
4152
- this.keepPresetTag = false;
4153
- }
4154
- }
4155
- }
4156
- DrDatePickerService.decorators = [
4157
- { type: Injectable }
4158
- ];
4159
-
4160
- // @ts-ignore
4161
- const moment$1 = require('moment');
4162
- class DrDatePickerCustomHeaderComponent {
4163
- constructor(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
4164
- this._calendar = _calendar;
4165
- this._dateAdapter = _dateAdapter;
4166
- this._dateFormats = _dateFormats;
4167
- this.cdr = cdr;
4168
- this.datePickerService = datePickerService;
4169
- this._destroyed = new Subject();
4170
- this.quarters = [1, 2, 3, 4];
4171
- this.selectedQuarter = 1;
4172
- this.timeframeOptions = [{
4173
- timeframe: TimeframeOption.DAY,
4174
- title: 'Day',
4175
- value: CalendarView.FOR_DAYS,
4176
- format: this.datePickerService.formatConfig.day,
4177
- periodLabel: () => this._dateAdapter.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase()
4178
- }, {
4179
- timeframe: TimeframeOption.WEEK,
4180
- title: 'Week',
4181
- value: CalendarView.FOR_DAYS,
4182
- format: this.datePickerService.formatConfig.week,
4183
- periodLabel: () => this._dateAdapter.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase()
4184
- }, {
4185
- timeframe: TimeframeOption.MONTH,
4186
- title: 'Month',
4187
- value: CalendarView.FOR_MONTHS,
4188
- format: this.datePickerService.formatConfig.month,
4189
- periodLabel: () => String(moment$1(this._calendar.activeDate).utc().year())
4190
- }, {
4191
- timeframe: TimeframeOption.QUARTER,
4192
- title: 'Quarter',
4193
- value: CalendarView.FOR_QUARTERS,
4194
- format: this.datePickerService.formatConfig.quarter,
4195
- periodLabel: () => String(moment$1(this.datePickerService.subtractFiscalYearMonthsFromDate(this._calendar.activeDate)).utc().year())
4196
- }, {
4197
- timeframe: TimeframeOption.YEAR,
4198
- title: 'Year',
4199
- value: CalendarView.FOR_YEARS,
4200
- format: this.datePickerService.formatConfig.year,
4201
- periodLabel: () => {
4202
- const currentYear = moment$1(this.datePickerService.subtractFiscalYearMonthsFromDate(this._calendar.activeDate)).utc().year();
4203
- const startPeriod = Math.floor(currentYear / 24) * 24;
4204
- return startPeriod + '-' + (startPeriod + 23);
4011
+ if (this.messagesContainer) {
4012
+ const scrollToOptions = {
4013
+ top: this.messagesContainer.nativeElement.scrollHeight,
4014
+ };
4015
+ if (!this.reopen) {
4016
+ scrollToOptions.behavior = 'smooth';
4205
4017
  }
4206
- }];
4207
- this.pagingSetup = {
4208
- [CalendarView.FOR_MONTHS]: (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
4209
- [CalendarView.FOR_QUARTERS]: (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
4210
- [CalendarView.FOR_DAYS]: (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
4211
- [CalendarView.FOR_YEARS]: (forward) => this.pagingDateChange('addCalendarYears', 24, forward)
4212
- };
4213
- this.selectedTimeframe = CalendarView.FOR_DAYS;
4214
- this.timeframeSelection = false;
4215
- this.periodMonthLabel = '';
4216
- this.periodYearLabel = '';
4217
- this.presetTagList = PRESET_TAGS_LIST;
4218
- this.calendarView = CalendarView;
4219
- _calendar.stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
4220
- this.datePickerService.format$.pipe(takeUntil(this._destroyed)).subscribe(value => {
4221
- this.selectedTimeframe = this.timeframeOptions.filter(option => option.format === value)[0].value;
4222
- _calendar.currentView = this.selectedTimeframe;
4223
- this.setPeriodLabels();
4224
- if (this.selectedTimeframe === CalendarView.FOR_QUARTERS) {
4225
- this.selectedQuarter = this.datePickerService.getQuarterAccordingToFiscalYear(this._calendar.activeDate);
4226
- }
4227
- });
4228
- _calendar.viewChanged.pipe(takeUntil(this._destroyed)).subscribe(() => {
4229
- this.setPeriodLabels();
4230
- if (_calendar.multiYearView) {
4231
- this.transformDateInMultiyearViewAccordingToFY();
4232
- }
4233
- });
4234
- _calendar._userSelection.subscribe(date => {
4235
- if (!this.datePickerService.isValueUpdating) {
4236
- this.datePickerService.onSameDaySelectedInCalendar$.next(date.value);
4237
- }
4238
- });
4239
- this.datePickerService.calendarInstance = _calendar;
4240
- }
4241
- get selectedPresetTag() {
4242
- return this.datePickerService.presetTag$.getValue();
4243
- }
4244
- ;
4245
- ngOnInit() {
4246
- setTimeout(() => {
4247
- if (this._calendar.multiYearView) {
4248
- this.transformDateInMultiyearViewAccordingToFY();
4018
+ this.messagesContainer.nativeElement.scrollTo(scrollToOptions);
4019
+ this.cdr.markForCheck();
4249
4020
  }
4250
4021
  });
4251
4022
  }
4252
4023
  ngOnDestroy() {
4253
- this._destroyed.next();
4254
- this._destroyed.complete();
4255
- }
4256
- setPeriodLabels() {
4257
- const currentTimeframeOption = this.timeframeOptions.filter(option => option.value === this._calendar.currentView)[0];
4258
- const fullPeriodLabel = currentTimeframeOption.periodLabel();
4259
- if (this._calendar.currentView === CalendarView.FOR_DAYS) {
4260
- this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
4261
- this.periodYearLabel = fullPeriodLabel.slice(4);
4262
- }
4263
- else {
4264
- this.periodMonthLabel = '';
4265
- this.periodYearLabel = fullPeriodLabel;
4266
- }
4267
- this.cdr.markForCheck();
4268
- }
4269
- setTimeframe(value) {
4270
- if (value !== this.selectedTimeframe) {
4271
- this.datePickerService.resetPresetTag();
4272
- }
4273
- this.selectedTimeframe = value;
4274
- this.timeframeSelection = false;
4275
- this._calendar.currentView = this.selectedTimeframe;
4276
- const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
4277
- this.datePickerService.updateTimeframeAndFormat(chosenTimeframeOption.format);
4278
- if (this.selectedTimeframe === CalendarView.FOR_QUARTERS) {
4279
- this.selectedQuarter = this.datePickerService.getQuarterAccordingToFiscalYear(this._calendar.activeDate);
4280
- }
4281
- }
4282
- get currentViewIsQuarter() {
4283
- return ![CalendarView.FOR_DAYS, CalendarView.FOR_MONTHS, CalendarView.FOR_YEARS].includes(this._calendar.currentView);
4284
- }
4285
- switchViewOnClickOnPeriodLabel(view) {
4286
- this._calendar.currentView = view;
4287
- }
4288
- onSelectQuarter(quarterNumber) {
4289
- this.selectedQuarter = quarterNumber;
4290
- this.datePickerService.setEndOfQuarter(this._calendar.activeDate, quarterNumber);
4291
- this.datePickerService.updatedQuarter$.next(this._calendar.activeDate);
4292
- this.datePickerService.datePickerInstance.close();
4024
+ this.destroy$.next();
4025
+ this.destroy$.complete();
4293
4026
  }
4294
- pagingClicked(forward) {
4295
- if (this.pagingSetup[this._calendar.currentView]) {
4296
- this.pagingSetup[this._calendar.currentView](forward);
4027
+ onClearClick($event) {
4028
+ this.clear.emit($event);
4029
+ if (this._chatSuggestions) {
4030
+ this._chatSuggestions.clearHidden();
4297
4031
  }
4298
4032
  }
4299
- pagingDateChange(actionCall, amount, forward) {
4300
- this._calendar.activeDate = this._dateAdapter[actionCall](this._calendar.activeDate, forward ? amount : -amount);
4301
- this.setPeriodLabels();
4302
- }
4303
- transformDateInMultiyearViewAccordingToFY() {
4304
- const multuYearView = this._calendar.multiYearView;
4305
- multuYearView._activeDate = this.datePickerService.subtractFiscalYearMonthsFromDate(multuYearView._activeDate);
4306
- multuYearView._selectedYear = multuYearView._activeDate.year();
4307
- multuYearView._init();
4308
- }
4309
- onSelectPresetTag(tag) {
4310
- if (tag.key === this.selectedPresetTag) {
4311
- this.datePickerService.presetTag$.next(null);
4312
- }
4313
- else {
4314
- this.datePickerService.presetTag$.next(tag.key);
4033
+ hideSuggestions() {
4034
+ if (this._chatSuggestions.isSuggestedMenuOpen) {
4035
+ this._chatSuggestions.toggleSuggestedMenu();
4315
4036
  }
4316
- this.datePickerService.updateDatePickerByPreset(this.selectedPresetTag, this._calendar);
4317
4037
  }
4318
4038
  }
4319
- DrDatePickerCustomHeaderComponent.decorators = [
4039
+ DrChatComponent.decorators = [
4320
4040
  { type: Component, args: [{
4321
- selector: 'dr-date-picker_custom-header.component',
4322
- template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\">\n <div *ngFor=\"let tag of presetTagList\" \n id=\"preset_tag\" \n class=\"dr-datepicker-preset-date__tags__tag\" \n (click)=\"onSelectPresetTag(tag)\" \n [ngClass]=\"{'dr-datepicker-preset-date__tags__tag--selected': tag.key === selectedPresetTag}\"\n [drTooltip]=\"selectedPresetTag === tag.key? 'Unselect preset' : ''\"\n [drTooltipPosition]=\"'top'\">\n {{ tag.label }}\n </div>\n </div>\n </div>\n <dr-select\n class=\"dr-datepicker__timeframe-select\"\n [ngModel]=\"selectedTimeframe\"\n [items]=\"timeframeOptions | drShowTimeframePipe: datePickerService.availableTimeframes\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe($event)\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_MONTHS)\">{{ periodMonthLabel + ' ' }}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{ periodYearLabel }}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\" (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter === selectedQuarter ? 'selected' : ''\"\n >Q{{quarter}}</div>\n</div>\n\n",
4323
- changeDetection: ChangeDetectionStrategy.OnPush,
4324
- styles: [":host{height:54px;align-items:center;font-family:\"Poppins\";font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags__tag{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9EA1AA;border-radius:18px;background:#FFFFFF;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected{color:#4646ce;background:#F2F2FB;border:1px solid #4646CE}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px;grid-gap:4px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label{cursor:pointer}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}\n"]
4041
+ selector: 'dr-chat',
4042
+ template: "<div class=\"chat\" [class.chat--in-full-screen]=\"fullScreen\">\n <div class=\"chat__header\">\n <div class=\"chat__header__logo\"></div>\n\n <div class=\"chat__header__text\">\n <div class=\"chat__header__text__title\">{{ title }}</div>\n <div *ngIf=\"subtitle\" class=\"chat__header__text__subtitle\">{{ subtitle }}</div>\n </div>\n\n <dr-button *ngIf=\"showClearButton\"\n (click)=\"onClearClick($event)\"\n theme=\"icon\"\n icon=\"dr-icon-clear\"\n class=\"ml-auto\"\n drTooltip=\"Clear chat\">\n </dr-button>\n\n <dr-button *ngIf=\"!fullScreen\"\n (click)=\"close.emit($event)\"\n theme=\"icon\"\n icon=\"dr-icon-exit\"\n class=\"ml-4\"\n drTooltip=\"Close\">\n </dr-button>\n </div>\n\n <div *ngIf=\"!messages?.length\" class=\"chat__empty-state\">\n <span class=\"chat__empty-state__text\">{{ noMessagesPlaceholder }}</span>\n </div>\n\n <div *ngIf=\"messages?.length\" class=\"chat__messages\">\n <div #messagesContainer class=\"chat__messages__container\"\n [class.chat__messages__container--scroll]=\"messagesContainerWithScroll\">\n <ng-content select=\"dr-chat-message\"></ng-content>\n </div>\n </div>\n\n <dr-chat-suggestions *ngIf=\"suggestions?.length\"\n [values]=\"suggestions\"\n [fullScreen]=\"fullScreen\"\n [waitForReply]=\"waitForReply\"\n class=\"chat__suggestions\"\n [class.chat__suggestions--full-height]=\"fullScreen && !messages?.length\"\n [buttonMode]=\"!!messages?.length\"\n (suggestionSelect)=\"suggestionSelect.emit($event)\">\n </dr-chat-suggestions>\n\n <div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n </div>\n</div>\n",
4043
+ providers: [DrChatCustomMessageService],
4044
+ styles: [":host{height:100%;width:100%;display:flex;flex-direction:column}.chat{position:relative;display:flex;flex-grow:1;flex-direction:column;height:100%;background-color:#fff;color:#4e566c;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}.chat__header{display:flex;align-items:center;background-color:#f2f2ff;color:#25258c;padding:15px 24px;font-weight:400;font-size:20px;line-height:28px;box-shadow:0 1px 3px #0003;z-index:1}.chat__header__logo{display:flex;width:43px;height:38px;background:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22Layer_1%22 data-name%3D%22Layer 1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 viewBox%3D%220 0 74 65%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1%2C .cls-2%2C .cls-3 %7B fill%3A none%3B %7D .cls-4 %7B fill%3A url(%23linear-gradient)%3B %7D .cls-5 %7B fill%3A %234eb7df%3B %7D .cls-2 %7B stroke%3A %23a6a8aa%3B stroke-miterlimit%3A 10%3B stroke-width%3A .37px%3B %7D .cls-6 %7B fill%3A url(%23linear-gradient-3)%3B %7D .cls-7 %7B fill%3A url(%23linear-gradient-2)%3B %7D .cls-3 %7B clip-path%3A url(%23clippath)%3B %7D %3C%2Fstyle%3E %3CclipPath id%3D%22clippath%22%3E %3Crect class%3D%22cls-1%22 width%3D%2274%22 height%3D%2265%22%2F%3E %3C%2FclipPath%3E %3ClinearGradient id%3D%22linear-gradient%22 x1%3D%2224.26%22 y1%3D%22-3.79%22 x2%3D%2295.63%22 y2%3D%2288.82%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%237676ff%22%2F%3E %3Cstop offset%3D%22.18%22 stop-color%3D%22%235959ff%22%2F%3E %3Cstop offset%3D%22.35%22 stop-color%3D%22%235757e0%22%2F%3E %3Cstop offset%3D%22.61%22 stop-color%3D%22%234646ce%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234b4be4%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234444eb%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-2%22 x1%3D%2212.05%22 y1%3D%2277.06%22 x2%3D%2210.77%22 y2%3D%2213.85%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%22.45%22 stop-color%3D%22%232f92b8%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234eb7df%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234eb7df%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-3%22 x1%3D%2262.26%22 y1%3D%22-2.54%22 x2%3D%2261.76%22 y2%3D%2285.91%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%2336369b%22%2F%3E %3Cstop offset%3D%22.52%22 stop-color%3D%22%234848d0%22%2F%3E %3C%2FlinearGradient%3E %3C%2Fdefs%3E %3Cg class%3D%22cls-3%22%3E %3Cg%3E %3Cpath class%3D%22cls-4%22 d%3D%22m73.32%2C24.79v15.73c0%2C13.12-9.87%2C23.79-22%2C23.79h-21.32c-3.46-.06-6.25-3.11-6.25-6.87s2.79-6.81%2C6.25-6.87h21.32c5.13%2C0%2C9.29-4.51%2C9.29-10.05v-15.73c0-5.54-4.17-10.05-9.29-10.05h-7.46c3.51%2C0%2C6.35-3.08%2C6.35-6.88s-2.79-6.8-6.25-6.87h7.35c12.12%2C0%2C22%2C10.67%2C22%2C23.79h0Z%22%2F%3E %3Cpath class%3D%22cls-5%22 d%3D%22m50.26%2C7.82c0%2C3.8-2.9%2C6.93-6.41%2C6.93h-21.86c-5.13%2C0-9.29%2C4.51-9.29%2C10.05v15.73c0%2C5.54%2C4.17%2C10.05%2C9.29%2C10.05h8.01c-3.46.06-6.25%2C3.11-6.25%2C6.87s2.79%2C6.81%2C6.25%2C6.87h-8.01c-12.12%2C0-22-10.67-22-23.79v-15.73C0%2C11.68%2C9.87%2C1%2C21.99%2C1h21.97c3.46.06%2C6.3%2C3.06%2C6.3%2C6.82Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m66.45%2C1h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m36.05%2C50.58h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-7%22 d%3D%22m0%2C33.78v-2.76C0%2C12.9%2C13.62%2C14.48%2C13.62%2C14.48h8.38c-5.5.46-9.5%2C4.71-9.5%2C9.96l.02%2C15.8c0%2C5.54%2C4.44%2C10.59%2C9.48%2C10.59l-8-.5S0%2C51.88%2C0%2C33.77h0Z%22%2F%3E %3Cpath class%3D%22cls-6%22 d%3D%22m73%2C31.51v2.76c0%2C18.12-13.62%2C16.53-13.62%2C16.53h-7.99c5.61-.85%2C9.09-4.76%2C9.09-10.02l.02-16.33c0-5.54-4.46-10-9.5-10h8s13.99-1.05%2C13.99%2C17.07h0Z%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%}.chat__header__text{display:flex;flex-direction:column;flex-grow:1;margin-left:20px}.chat__header__text__title{display:flex;align-items:center}.chat__header__text__title:after{content:\"BETA\";display:inline-flex;padding:2px 10px;background:#25258C;color:#f4f4f3;font-weight:600;font-size:10px;line-height:14px;border-radius:8px;margin-left:12px;font-family:\"Nunito Sans\",sans-serif}.chat__header__text__subtitle{font-size:14px;line-height:22px}.chat__header dr-button::ng-deep button:not(:hover){color:#25258c}.chat__empty-state{display:flex;justify-content:center}.chat__empty-state__text{padding:20px 0;font-family:Poppins,sans-serif;font-size:20px;font-weight:300;line-height:30px;text-align:center;max-width:440px;color:#4646ce}.chat__messages{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}.chat__messages__container{overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%;padding-bottom:1px}.chat__messages__container--scroll::ng-deep dr-chat-message{padding-right:16px}.chat__suggestions--full-height{flex-grow:1;height:1px;overflow:auto}.chat--in-full-screen .chat__header{padding-left:48px;padding-right:48px}.chat--in-full-screen .chat__empty-state__text{padding:77px 0;font-size:28px;line-height:46px;max-width:570px}.chat--in-full-screen .chat__messages::ng-deep dr-chat-message{justify-content:center}.chat--in-full-screen .chat__messages::ng-deep .message{max-width:919px}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__items{padding-left:0;padding-right:0}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__items__item{margin:0 0 26px;height:80px;width:310px;font-size:16px}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__container{padding:0}\n"]
4325
4045
  },] }
4326
4046
  ];
4327
- DrDatePickerCustomHeaderComponent.ctorParameters = () => [
4328
- { type: MatCalendar },
4329
- { type: DateAdapter },
4330
- { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
4331
- { type: ChangeDetectorRef },
4332
- { type: DrDatePickerService }
4047
+ DrChatComponent.ctorParameters = () => [
4048
+ { type: ChangeDetectorRef }
4333
4049
  ];
4334
-
4335
- // @ts-ignore
4336
- const moment = require('moment');
4337
- const noop = () => {
4050
+ DrChatComponent.propDecorators = {
4051
+ fullScreen: [{ type: Input }],
4052
+ title: [{ type: Input }],
4053
+ subtitle: [{ type: Input }],
4054
+ showClearButton: [{ type: Input }],
4055
+ noMessagesPlaceholder: [{ type: Input }],
4056
+ contentUpdateSubject: [{ type: Input }],
4057
+ scrollBottom: [{ type: Input }],
4058
+ suggestions: [{ type: Input }],
4059
+ reopen: [{ type: Input }],
4060
+ waitForReply: [{ type: Input }],
4061
+ messagesContainer: [{ type: ViewChild, args: ['messagesContainer',] }],
4062
+ messages: [{ type: ContentChildren, args: [DrChatMessageComponent,] }],
4063
+ chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }],
4064
+ clear: [{ type: Output }],
4065
+ close: [{ type: Output }],
4066
+ suggestionSelect: [{ type: Output }],
4067
+ _chatSuggestions: [{ type: ViewChild, args: [DrChatSuggestionsComponent,] }]
4338
4068
  };
4339
- const ɵ0$2 = noop;
4340
- class DrDatePickerComponent {
4341
- constructor(cdr, dateAdapter, datePickerService) {
4342
- this.cdr = cdr;
4343
- this.dateAdapter = dateAdapter;
4344
- this.datePickerService = datePickerService;
4345
- // Whether to transform date, taking end, start, middle of preiod (i.e. set middle of month if timeframe='month')
4346
- this.periodPosition = DatePickerPeriodPosition.DEFAULT;
4347
- this.placeholder = 'Select...';
4348
- this.fiscalYearMonthsModifier = 0;
4349
- this.calendarViewsTimeframeMapping = {
4350
- year: 'multi-year',
4351
- month: 'year',
4352
- quarter: 'none',
4353
- day: 'month',
4069
+
4070
+ var TooltipPosition;
4071
+ (function (TooltipPosition) {
4072
+ TooltipPosition["TOP"] = "top";
4073
+ TooltipPosition["BOTTOM"] = "bottom";
4074
+ TooltipPosition["LEFT"] = "left";
4075
+ TooltipPosition["RIGHT"] = "right";
4076
+ TooltipPosition["TOP_RIGHT"] = "top-right";
4077
+ TooltipPosition["TOP_LEFT"] = "top-left";
4078
+ TooltipPosition["BOTTOM_RIGHT"] = "bottom-right";
4079
+ TooltipPosition["BOTTOM_LEFT"] = "bottom-left";
4080
+ TooltipPosition["RIGHT_TOP"] = "right-top";
4081
+ TooltipPosition["RIGHT_BOTTOM"] = "right-bottom";
4082
+ TooltipPosition["LEFT_TOP"] = "left-top";
4083
+ TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
4084
+ })(TooltipPosition || (TooltipPosition = {}));
4085
+
4086
+ var Scenario;
4087
+ (function (Scenario) {
4088
+ Scenario["ACTUALS"] = "Actuals";
4089
+ Scenario["FORECAST"] = "Forecast";
4090
+ Scenario["BUDGET"] = "Budget";
4091
+ Scenario["NONE"] = "None";
4092
+ })(Scenario || (Scenario = {}));
4093
+
4094
+ class DrModelDebounceChangeDirective {
4095
+ constructor(ngModel) {
4096
+ this.ngModel = ngModel;
4097
+ this.debounce = 200;
4098
+ this.ngModelDebounceChange = new EventEmitter();
4099
+ }
4100
+ ngOnInit() {
4101
+ this.subscription = this.ngModel.control.valueChanges.pipe(skip(1), debounceTime(this.debounce), distinctUntilChanged()).subscribe(value => this.ngModelDebounceChange.emit(value));
4102
+ }
4103
+ ngOnDestroy() {
4104
+ this.subscription.unsubscribe();
4105
+ }
4106
+ }
4107
+ DrModelDebounceChangeDirective.decorators = [
4108
+ { type: Directive, args: [{
4109
+ selector: '[ngModelDebounceChange]'
4110
+ },] }
4111
+ ];
4112
+ DrModelDebounceChangeDirective.ctorParameters = () => [
4113
+ { type: NgModel }
4114
+ ];
4115
+ DrModelDebounceChangeDirective.propDecorators = {
4116
+ debounce: [{ type: Input }],
4117
+ ngModelDebounceChange: [{ type: Output }]
4118
+ };
4119
+
4120
+ var BadgeStatus;
4121
+ (function (BadgeStatus) {
4122
+ BadgeStatus["INFO"] = "info";
4123
+ BadgeStatus["ERROR"] = "error";
4124
+ BadgeStatus["WARNING"] = "warning";
4125
+ BadgeStatus["SUCCESS"] = "success";
4126
+ BadgeStatus["REGULAR"] = "regular";
4127
+ BadgeStatus["PROGRESS"] = "progress";
4128
+ BadgeStatus["DOTTED"] = "dotted";
4129
+ })(BadgeStatus || (BadgeStatus = {}));
4130
+
4131
+ const allDateTags = {
4132
+ [TagsConfigSubType.YEAR]: {
4133
+ name: 'Date',
4134
+ toggle: false,
4135
+ },
4136
+ [TagsConfigSubType.QUARTER]: {
4137
+ name: 'Date',
4138
+ toggle: false,
4139
+ },
4140
+ [TagsConfigSubType.MONTH]: {
4141
+ name: 'Date',
4142
+ toggle: false,
4143
+ },
4144
+ [TagsConfigSubType.DAY]: {
4145
+ name: 'Date',
4146
+ toggle: false,
4147
+ },
4148
+ [TagsConfigSubType.WEEK]: {
4149
+ name: 'Date',
4150
+ toggle: false,
4151
+ }
4152
+ };
4153
+ function getScenarioTagDataConfig(isMultipleDimension) {
4154
+ return {
4155
+ [Scenario.ACTUALS]: Object.assign(Object.assign({}, allDateTags), { [TagsConfigSubType.MONTH]: {
4156
+ name: 'Date',
4157
+ toggle: true,
4158
+ }, [TagsConfigSubType.FILE_STATUS]: {
4159
+ toggle: false,
4160
+ } }),
4161
+ [Scenario.BUDGET]: {
4162
+ [TagsConfigSubType.BUDGET_CYCLE]: {
4163
+ toggle: true,
4164
+ acceptableDateTags: [TagsConfigSubType.YEAR],
4165
+ hidden: !isMultipleDimension,
4166
+ },
4167
+ [TagsConfigSubType.PLAN]: {
4168
+ toggle: false,
4169
+ turnOffDateTags: true,
4170
+ hidden: isMultipleDimension,
4171
+ },
4172
+ [TagsConfigSubType.YEAR]: {
4173
+ name: 'Date',
4174
+ toggle: true,
4175
+ },
4176
+ [TagsConfigSubType.QUARTER]: {
4177
+ name: 'Date',
4178
+ toggle: false,
4179
+ },
4180
+ [TagsConfigSubType.FILE_STATUS]: {
4181
+ toggle: false,
4182
+ },
4183
+ },
4184
+ [Scenario.FORECAST]: {
4185
+ [TagsConfigSubType.FORECAST_NEW]: {
4186
+ toggle: true,
4187
+ name: 'Date',
4188
+ },
4189
+ [TagsConfigSubType.FILE_STATUS]: {
4190
+ toggle: false,
4191
+ },
4192
+ },
4193
+ [Scenario.NONE]: Object.assign(Object.assign({}, allDateTags), { [TagsConfigSubType.MONTH]: {
4194
+ name: 'Date',
4195
+ toggle: true,
4196
+ }, [TagsConfigSubType.FILE_STATUS]: {
4197
+ toggle: true,
4198
+ } }),
4199
+ };
4200
+ }
4201
+
4202
+ class ScenarioService {
4203
+ constructor() {
4204
+ this.DEFAULT_FORECAST_DATE_TAG = 'Month';
4205
+ }
4206
+ get scenarios() {
4207
+ return orderBy(Object.values(Scenario), (scenario) => scenario === Scenario.NONE ? 1 : 0);
4208
+ }
4209
+ get areExistingTagsConfig() {
4210
+ return !!this.currentTagsConfig;
4211
+ }
4212
+ initScenarioTags(wholeTagsConfig, currentTagsConfig, isMultipleDimension) {
4213
+ if (!(wholeTagsConfig === null || wholeTagsConfig === void 0 ? void 0 : wholeTagsConfig.length))
4214
+ return;
4215
+ this.wholeTagsConfig = cloneDeep(wholeTagsConfig);
4216
+ this.currentTagsConfig = currentTagsConfig;
4217
+ this.isMultipleDimension = isMultipleDimension;
4218
+ }
4219
+ getTagsConfigByScenarioTags(scenarioTags, tagsConfig) {
4220
+ const scenarioTagsConfig = filter$1(tagsConfig, (tagConfig) => some(scenarioTags, (scenarioTag) => scenarioTag.toggle && scenarioTag.selectedTagSubType === tagConfig.options.sub_type));
4221
+ return this.sortScenarioTags(scenarioTagsConfig);
4222
+ }
4223
+ getScenarioTagsByScenario(scenario) {
4224
+ const scenarioTagsConfig = this.getScenarioTagsConfig(scenario, this.wholeTagsConfig);
4225
+ const scenarioTagsUi = [];
4226
+ forEach(scenarioTagsConfig, (scenarioTag) => {
4227
+ const isTagWithSubTags = scenarioTag.type === TagTypes.DATE;
4228
+ const tagWithSubTags = isTagWithSubTags && find(scenarioTagsUi, { type: scenarioTag.type });
4229
+ const tag = tagWithSubTags || this.prepareScenarioTag(scenarioTagsConfig, scenarioTag, scenario, isTagWithSubTags);
4230
+ if (isTagWithSubTags) {
4231
+ this.updateScenarioSubTags(tag, scenarioTag);
4232
+ tag.subTags = this.sortedScenarioSubTags(tag);
4233
+ }
4234
+ if (tagWithSubTags)
4235
+ return;
4236
+ scenarioTagsUi.push(tag);
4237
+ });
4238
+ if (this.areExistingTagsConfig) {
4239
+ this.initExistingTagsConfig(scenario, scenarioTagsUi);
4240
+ }
4241
+ const isTagNotSupportingDates = some(scenarioTagsUi, { turnOffDateTags: true, toggle: true });
4242
+ if (isTagNotSupportingDates) {
4243
+ this.turnOffDateTag(scenarioTagsUi);
4244
+ }
4245
+ const tagWithSpecificDateTags = find(scenarioTagsUi, (tag) => { var _a; return tag.toggle && !!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length); });
4246
+ if (tagWithSpecificDateTags) {
4247
+ this.hideNotAvailableTags(tagWithSpecificDateTags, scenarioTagsUi);
4248
+ }
4249
+ return this.sortScenarioTags(scenarioTagsUi);
4250
+ }
4251
+ sortScenarioTags(scenarioTagsUi) {
4252
+ return orderBy(scenarioTagsUi, [
4253
+ (tag) => (tag.type === TagTypes.DATE ? 0 : 1),
4254
+ (tag) => (tag.name === 'File Status')
4255
+ ]);
4256
+ }
4257
+ initExistingTagsConfig(scenario, scenarioTagsUi) {
4258
+ forEach(this.currentTagsConfig, (tagConfig) => {
4259
+ var _a;
4260
+ const tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
4261
+ const scenarioTagDataConfig = getScenarioTagDataConfig(this.isMultipleDimension);
4262
+ if (!scenarioTagDataConfig || !scenarioTagDataConfig[scenario] || !scenarioTagDataConfig[scenario][tagSubType]) {
4263
+ return;
4264
+ }
4265
+ const scenarioTagUi = tagConfig.type === TagTypes.DATE
4266
+ ? find(scenarioTagsUi, { type: tagConfig.type })
4267
+ : find(scenarioTagsUi, { selectedTagSubType: tagSubType });
4268
+ scenarioTagUi.toggle = true;
4269
+ scenarioTagUi.selectedTagSubType = tagSubType;
4270
+ });
4271
+ }
4272
+ prepareScenarioTag(scenarioTagsConfig, scenarioTag, scenario, isDateTag) {
4273
+ const toggleStatus = isDateTag
4274
+ ? some(scenarioTagsConfig, (tag) => tag.type === TagTypes.DATE && tag.scenarioData.toggle)
4275
+ : scenarioTag.scenarioData.toggle;
4276
+ const selectedTagSubType = isDateTag
4277
+ ? this.getScenarioSelectedDateTag(scenario, scenarioTagsConfig)
4278
+ : scenarioTag.options.sub_type;
4279
+ const tag = {
4280
+ toggle: this.areExistingTagsConfig ? false : toggleStatus,
4281
+ name: scenarioTag.scenarioData.name || scenarioTag.name,
4282
+ description: scenarioTag.scenarioData.description || scenarioTag.description,
4283
+ type: scenarioTag.type,
4284
+ selectedTagSubType,
4285
+ };
4286
+ if (scenarioTag.scenarioData.turnOffDateTags) {
4287
+ tag.turnOffDateTags = scenarioTag.scenarioData.turnOffDateTags;
4288
+ }
4289
+ if (scenarioTag.scenarioData.acceptableDateTags) {
4290
+ tag.acceptableDateTags = scenarioTag.scenarioData.acceptableDateTags;
4291
+ }
4292
+ return tag;
4293
+ }
4294
+ sortedScenarioSubTags(tag) {
4295
+ const SUB_TAGS_ORDER = [TagsConfigSubType.DAY, TagsConfigSubType.WEEK, TagsConfigSubType.MONTH, TagsConfigSubType.QUARTER, TagsConfigSubType.YEAR];
4296
+ return orderBy(tag.subTags, (subTag) => indexOf(SUB_TAGS_ORDER, subTag.subType));
4297
+ }
4298
+ updateScenarioSubTags(tag, scenarioTag) {
4299
+ if (!tag.subTags) {
4300
+ tag.subTags = [];
4301
+ }
4302
+ const tagSubType = scenarioTag.options.sub_type;
4303
+ tag.subTags.push({
4304
+ subType: tagSubType,
4305
+ name: tagSubType === TagsConfigSubType.FORECAST_NEW ? this.DEFAULT_FORECAST_DATE_TAG : scenarioTag.name,
4306
+ });
4307
+ }
4308
+ turnOffDateTag(scenarioTags) {
4309
+ const dateTag = find(scenarioTags, { type: TagTypes.DATE });
4310
+ if (!dateTag)
4311
+ return;
4312
+ dateTag.toggle = false;
4313
+ }
4314
+ hideNotAvailableTags(tagWithSpecificDateTags, scenarioTags) {
4315
+ var _a;
4316
+ const subTags = (_a = find(scenarioTags, { type: TagTypes.DATE })) === null || _a === void 0 ? void 0 : _a.subTags;
4317
+ if (!subTags.length)
4318
+ return;
4319
+ forEach(scenarioTags, (tag) => {
4320
+ var _a;
4321
+ if (!((_a = tag.acceptableDateTags) === null || _a === void 0 ? void 0 : _a.length))
4322
+ return;
4323
+ if (tag !== tagWithSpecificDateTags) {
4324
+ tag.toggle = false;
4325
+ }
4326
+ });
4327
+ forEach(subTags, (subTag) => {
4328
+ subTag.hidden = !tagWithSpecificDateTags.acceptableDateTags.includes(subTag.subType);
4329
+ });
4330
+ }
4331
+ getScenarioSelectedDateTag(scenario, dateTags) {
4332
+ var _a, _b;
4333
+ const monthSubType = (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.MONTH)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type;
4334
+ const scenarioSelectedDateTag = {
4335
+ [Scenario.ACTUALS]: () => monthSubType,
4336
+ [Scenario.BUDGET]: () => { var _a, _b; return (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.YEAR)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
4337
+ [Scenario.FORECAST]: () => { var _a, _b; return (_b = (_a = find(dateTags, (tag) => tag.options.sub_type === TagsConfigSubType.FORECAST_NEW)) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.sub_type; },
4338
+ [Scenario.NONE]: () => monthSubType,
4339
+ };
4340
+ if (!scenarioSelectedDateTag[scenario])
4341
+ return;
4342
+ return scenarioSelectedDateTag[scenario]();
4343
+ }
4344
+ getScenarioTagsConfig(scenario, tagsConfig) {
4345
+ return reduce(tagsConfig, (acc, tagConfig) => {
4346
+ var _a;
4347
+ const tagSubType = (_a = tagConfig === null || tagConfig === void 0 ? void 0 : tagConfig.options) === null || _a === void 0 ? void 0 : _a.sub_type;
4348
+ const scenarioTagDataConfig = getScenarioTagDataConfig(this.isMultipleDimension);
4349
+ const scenarioTagConfig = scenarioTagDataConfig && scenarioTagDataConfig[scenario] ?
4350
+ scenarioTagDataConfig[scenario][tagSubType] : null;
4351
+ if (!scenarioTagConfig || scenarioTagConfig.hidden)
4352
+ return acc;
4353
+ const clonedTagConfig = cloneDeep(tagConfig);
4354
+ const scenarioTag = Object.assign(Object.assign({}, clonedTagConfig), { scenarioData: scenarioTagConfig });
4355
+ acc.push(scenarioTag);
4356
+ return acc;
4357
+ }, []);
4358
+ }
4359
+ }
4360
+ ScenarioService.decorators = [
4361
+ { type: Injectable }
4362
+ ];
4363
+
4364
+ class DrSharedUtils {
4365
+ /**
4366
+ * Get timeframe (day, year, month, quarter) based on passed format
4367
+ *
4368
+ * @param format - date format string. Examples: MM/DD/YYYY, Q/YYYY
4369
+ */
4370
+ static getTimeframeByDateFormat(format) {
4371
+ const defaultFrame = TimeframeOption.DAY;
4372
+ if (!format) {
4373
+ return defaultFrame;
4374
+ }
4375
+ const lowerCaseFormat = format.toLowerCase();
4376
+ switch (true) {
4377
+ case lowerCaseFormat.includes('q'):
4378
+ return TimeframeOption.QUARTER;
4379
+ case lowerCaseFormat.includes('d'):
4380
+ return TimeframeOption.DAY;
4381
+ case lowerCaseFormat.includes('w'):
4382
+ return TimeframeOption.WEEK;
4383
+ case lowerCaseFormat.includes('m'):
4384
+ return TimeframeOption.MONTH;
4385
+ case lowerCaseFormat.includes('y'):
4386
+ return TimeframeOption.YEAR;
4387
+ default:
4388
+ return defaultFrame;
4389
+ }
4390
+ }
4391
+ static getDateByTag(tag) {
4392
+ const todayDate = moment$9().utc().endOf('day');
4393
+ switch (tag) {
4394
+ case DateTags.TODAY:
4395
+ return todayDate;
4396
+ case DateTags.YESTERDAY:
4397
+ todayDate.subtract(1, 'days');
4398
+ return todayDate;
4399
+ case DateTags.THIS_MONTH:
4400
+ todayDate.endOf('month');
4401
+ return todayDate;
4402
+ case DateTags.PREV_MONTH:
4403
+ todayDate.subtract(1, 'months').endOf('month');
4404
+ return todayDate;
4405
+ }
4406
+ }
4407
+ }
4408
+
4409
+ // @ts-ignore
4410
+ const moment$2 = require('moment');
4411
+ class DrDatePickerService {
4412
+ constructor() {
4413
+ this.isTimeframeSelectionEnabled = false;
4414
+ this.timeframe = TimeframeOption.DAY;
4415
+ this.format$ = new BehaviorSubject(DateFromats.MAT_DEFAULT_DATE_FORMAT);
4416
+ this.updatedQuarter$ = new Subject();
4417
+ this.updatedDateAndClose$ = new Subject();
4418
+ this.presetTag$ = new BehaviorSubject('');
4419
+ this.onSameDaySelectedInCalendar$ = new Subject();
4420
+ this.keepPresetTag = false;
4421
+ this.isValueUpdating = false;
4422
+ this.availableTimeframes = [
4423
+ TimeframeOption.DAY,
4424
+ TimeframeOption.WEEK,
4425
+ TimeframeOption.MONTH,
4426
+ TimeframeOption.QUARTER,
4427
+ TimeframeOption.YEAR
4428
+ ];
4429
+ this.formatConfig = {
4430
+ day: DateFromats.MAT_DEFAULT_DATE_FORMAT,
4431
+ month: DateFromats.MONTH_YEAR_FORMAT,
4432
+ year: DateFromats.YEAR_FORMAT,
4433
+ quarter: DateFromats.QUARTER_FORMAT,
4434
+ week: DateFromats.WEEK_FORMAT
4435
+ };
4436
+ this.fiscalYearMonthsModifier = 0;
4437
+ }
4438
+ getDisplayPrefix() {
4439
+ const formatCached = this.format$.getValue();
4440
+ switch (true) {
4441
+ case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('Q'):
4442
+ return 'Q';
4443
+ case formatCached === null || formatCached === void 0 ? void 0 : formatCached.includes('W'):
4444
+ return 'W';
4445
+ default:
4446
+ return '';
4447
+ }
4448
+ }
4449
+ getTimeframe(format) {
4450
+ return DrSharedUtils.getTimeframeByDateFormat(format);
4451
+ }
4452
+ getConfiguredFormat(timeframe) {
4453
+ return this.formatConfig[timeframe];
4454
+ }
4455
+ updateTimeframeAndFormat(format) {
4456
+ const normalizedFormat = this.normalizeValue(format || this.format$.getValue());
4457
+ this.timeframe = this.getTimeframe(normalizedFormat);
4458
+ this.format$.next(this.getConfiguredFormat(this.timeframe));
4459
+ }
4460
+ normalizeValue(value) {
4461
+ return value.replace(/d/g, 'D');
4462
+ }
4463
+ /**
4464
+ * Get quarter number for date according to fiscal year
4465
+ *
4466
+ * @param date
4467
+ */
4468
+ getQuarterAccordingToFiscalYear(date) {
4469
+ let fiscalMonth = this.fiscalYearMonthsModifier;
4470
+ const dateMonth = date.month();
4471
+ if (dateMonth < fiscalMonth) {
4472
+ fiscalMonth -= 12;
4473
+ }
4474
+ return Math.trunc((date.month() - fiscalMonth) / 3) + 1;
4475
+ }
4476
+ /**
4477
+ * Sets date to end of quarter in FY by passed quarter number
4478
+ *
4479
+ * @param date
4480
+ * @param quarterNumber
4481
+ */
4482
+ setEndOfQuarter(date, quarterNumber) {
4483
+ date
4484
+ .subtract(this.fiscalYearMonthsModifier, 'M')
4485
+ .startOf('year')
4486
+ .add(this.fiscalYearMonthsModifier + quarterNumber * 3 - 1, 'M')
4487
+ .endOf('month');
4488
+ }
4489
+ /**
4490
+ * Sets date to start of quarter in FY by passed quarter number
4491
+ *
4492
+ * @param date
4493
+ * @param quarterNumber
4494
+ */
4495
+ setStartOfQuarter(date, quarterNumber) {
4496
+ date
4497
+ .subtract(this.fiscalYearMonthsModifier, 'M')
4498
+ .startOf('year')
4499
+ .add(this.fiscalYearMonthsModifier + (quarterNumber - 1) * 3, 'M');
4500
+ }
4501
+ /**
4502
+ * Sets date to end of current quarter (in which date is located) according to FY
4503
+ *
4504
+ * @param date
4505
+ */
4506
+ setEndOfCurrentQuarter(date) {
4507
+ this.setEndOfQuarter(date, this.getQuarterAccordingToFiscalYear(date));
4508
+ }
4509
+ /**
4510
+ * Sets date to start of current quarter (in which date is located) according to FY
4511
+ *
4512
+ * @param date
4513
+ */
4514
+ setStartOfCurrentQuarter(date) {
4515
+ this.setStartOfQuarter(date, this.getQuarterAccordingToFiscalYear(date));
4516
+ }
4517
+ /**
4518
+ * If date selection on this timeframe depends on Fiscal Year
4519
+ *
4520
+ * @param timeframe
4521
+ */
4522
+ isTimeframeDependingOnFY(timeframe) {
4523
+ return _.includes([TimeframeOption.QUARTER, TimeframeOption.YEAR], timeframe);
4524
+ }
4525
+ /**
4526
+ * Subtract from date fiscal year shift months count
4527
+ *
4528
+ * @param date
4529
+ */
4530
+ subtractFiscalYearMonthsFromDate(date) {
4531
+ return this.getDateModifiedByFiscalMonths(date, true);
4532
+ }
4533
+ /**
4534
+ * Add to date fiscal year shift months count
4535
+ *
4536
+ * @param date
4537
+ */
4538
+ addFiscalYearMonthsToDate(date) {
4539
+ return this.getDateModifiedByFiscalMonths(date);
4540
+ }
4541
+ /**
4542
+ * Add or subtract depending on isRevert paremeter Fiscal year month shift
4543
+ *
4544
+ * @param date
4545
+ * @param isSubtract
4546
+ */
4547
+ getDateModifiedByFiscalMonths(date, isSubtract = false) {
4548
+ return date ? _.cloneDeep(date)[isSubtract ? 'subtract' : 'add'](this.fiscalYearMonthsModifier, 'month') : date;
4549
+ }
4550
+ updateDatePickerByPreset(tag, calender) {
4551
+ this.keepPresetTag = true;
4552
+ let date = null;
4553
+ if (tag) {
4554
+ date = DrSharedUtils.getDateByTag(tag);
4555
+ switch (tag) {
4556
+ case DateTags.TODAY:
4557
+ this.updateTimeframeAndFormat(DateFromats.MAT_DEFAULT_DATE_FORMAT);
4558
+ break;
4559
+ case DateTags.YESTERDAY:
4560
+ this.updateTimeframeAndFormat(DateFromats.MAT_DEFAULT_DATE_FORMAT);
4561
+ break;
4562
+ case DateTags.THIS_MONTH:
4563
+ this.updateTimeframeAndFormat(DateFromats.MONTH_YEAR_FORMAT);
4564
+ this.selectDateInCalendarMonthView(date, calender);
4565
+ break;
4566
+ case DateTags.PREV_MONTH:
4567
+ this.updateTimeframeAndFormat(DateFromats.MONTH_YEAR_FORMAT);
4568
+ this.selectDateInCalendarMonthView(date, calender);
4569
+ break;
4570
+ }
4571
+ }
4572
+ this.presetTag$.next(tag);
4573
+ this.updatedDateAndClose$.next(date);
4574
+ }
4575
+ selectDateInCalendarMonthView(date, calender) {
4576
+ setTimeout(() => {
4577
+ const monthView = calender.monthView;
4578
+ if (monthView) {
4579
+ monthView._activeDate = date;
4580
+ monthView._selected = date;
4581
+ monthView._init();
4582
+ }
4583
+ });
4584
+ }
4585
+ resetPresetTag() {
4586
+ if (!this.keepPresetTag) {
4587
+ this.presetTag$.next(null);
4588
+ }
4589
+ else {
4590
+ this.keepPresetTag = false;
4591
+ }
4592
+ }
4593
+ }
4594
+ DrDatePickerService.decorators = [
4595
+ { type: Injectable }
4596
+ ];
4597
+
4598
+ // @ts-ignore
4599
+ const moment$1 = require('moment');
4600
+ class DrDatePickerCustomHeaderComponent {
4601
+ constructor(_calendar, _dateAdapter, _dateFormats, cdr, datePickerService) {
4602
+ this._calendar = _calendar;
4603
+ this._dateAdapter = _dateAdapter;
4604
+ this._dateFormats = _dateFormats;
4605
+ this.cdr = cdr;
4606
+ this.datePickerService = datePickerService;
4607
+ this._destroyed = new Subject();
4608
+ this.quarters = [1, 2, 3, 4];
4609
+ this.selectedQuarter = 1;
4610
+ this.timeframeOptions = [{
4611
+ timeframe: TimeframeOption.DAY,
4612
+ title: 'Day',
4613
+ value: CalendarView.FOR_DAYS,
4614
+ format: this.datePickerService.formatConfig.day,
4615
+ periodLabel: () => this._dateAdapter.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase()
4616
+ }, {
4617
+ timeframe: TimeframeOption.WEEK,
4618
+ title: 'Week',
4619
+ value: CalendarView.FOR_DAYS,
4620
+ format: this.datePickerService.formatConfig.week,
4621
+ periodLabel: () => this._dateAdapter.format(this._calendar.activeDate, this._dateFormats.display.monthYearLabel).toLocaleUpperCase()
4622
+ }, {
4623
+ timeframe: TimeframeOption.MONTH,
4624
+ title: 'Month',
4625
+ value: CalendarView.FOR_MONTHS,
4626
+ format: this.datePickerService.formatConfig.month,
4627
+ periodLabel: () => String(moment$1(this._calendar.activeDate).utc().year())
4628
+ }, {
4629
+ timeframe: TimeframeOption.QUARTER,
4630
+ title: 'Quarter',
4631
+ value: CalendarView.FOR_QUARTERS,
4632
+ format: this.datePickerService.formatConfig.quarter,
4633
+ periodLabel: () => String(moment$1(this.datePickerService.subtractFiscalYearMonthsFromDate(this._calendar.activeDate)).utc().year())
4634
+ }, {
4635
+ timeframe: TimeframeOption.YEAR,
4636
+ title: 'Year',
4637
+ value: CalendarView.FOR_YEARS,
4638
+ format: this.datePickerService.formatConfig.year,
4639
+ periodLabel: () => {
4640
+ const currentYear = moment$1(this.datePickerService.subtractFiscalYearMonthsFromDate(this._calendar.activeDate)).utc().year();
4641
+ const startPeriod = Math.floor(currentYear / 24) * 24;
4642
+ return startPeriod + '-' + (startPeriod + 23);
4643
+ }
4644
+ }];
4645
+ this.pagingSetup = {
4646
+ [CalendarView.FOR_MONTHS]: (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
4647
+ [CalendarView.FOR_QUARTERS]: (forward) => this.pagingDateChange('addCalendarYears', 1, forward),
4648
+ [CalendarView.FOR_DAYS]: (forward) => this.pagingDateChange('addCalendarMonths', 1, forward),
4649
+ [CalendarView.FOR_YEARS]: (forward) => this.pagingDateChange('addCalendarYears', 24, forward)
4650
+ };
4651
+ this.selectedTimeframe = CalendarView.FOR_DAYS;
4652
+ this.timeframeSelection = false;
4653
+ this.periodMonthLabel = '';
4654
+ this.periodYearLabel = '';
4655
+ this.presetTagList = PRESET_TAGS_LIST;
4656
+ this.calendarView = CalendarView;
4657
+ _calendar.stateChanges.pipe(takeUntil(this._destroyed)).subscribe(() => this.setPeriodLabels());
4658
+ this.datePickerService.format$.pipe(takeUntil(this._destroyed)).subscribe(value => {
4659
+ this.selectedTimeframe = this.timeframeOptions.filter(option => option.format === value)[0].value;
4660
+ _calendar.currentView = this.selectedTimeframe;
4661
+ this.setPeriodLabels();
4662
+ if (this.selectedTimeframe === CalendarView.FOR_QUARTERS) {
4663
+ this.selectedQuarter = this.datePickerService.getQuarterAccordingToFiscalYear(this._calendar.activeDate);
4664
+ }
4665
+ });
4666
+ _calendar.viewChanged.pipe(takeUntil(this._destroyed)).subscribe(() => {
4667
+ this.setPeriodLabels();
4668
+ if (_calendar.multiYearView) {
4669
+ this.transformDateInMultiyearViewAccordingToFY();
4670
+ }
4671
+ });
4672
+ _calendar._userSelection.subscribe(date => {
4673
+ if (!this.datePickerService.isValueUpdating) {
4674
+ this.datePickerService.onSameDaySelectedInCalendar$.next(date.value);
4675
+ }
4676
+ });
4677
+ this.datePickerService.calendarInstance = _calendar;
4678
+ }
4679
+ get selectedPresetTag() {
4680
+ return this.datePickerService.presetTag$.getValue();
4681
+ }
4682
+ ;
4683
+ ngOnInit() {
4684
+ setTimeout(() => {
4685
+ if (this._calendar.multiYearView) {
4686
+ this.transformDateInMultiyearViewAccordingToFY();
4687
+ }
4688
+ });
4689
+ }
4690
+ ngOnDestroy() {
4691
+ this._destroyed.next();
4692
+ this._destroyed.complete();
4693
+ }
4694
+ setPeriodLabels() {
4695
+ const currentTimeframeOption = this.timeframeOptions.filter(option => option.value === this._calendar.currentView)[0];
4696
+ const fullPeriodLabel = currentTimeframeOption.periodLabel();
4697
+ if (this._calendar.currentView === CalendarView.FOR_DAYS) {
4698
+ this.periodMonthLabel = fullPeriodLabel.slice(0, 3);
4699
+ this.periodYearLabel = fullPeriodLabel.slice(4);
4700
+ }
4701
+ else {
4702
+ this.periodMonthLabel = '';
4703
+ this.periodYearLabel = fullPeriodLabel;
4704
+ }
4705
+ this.cdr.markForCheck();
4706
+ }
4707
+ setTimeframe(value) {
4708
+ if (value !== this.selectedTimeframe) {
4709
+ this.datePickerService.resetPresetTag();
4710
+ }
4711
+ this.selectedTimeframe = value;
4712
+ this.timeframeSelection = false;
4713
+ this._calendar.currentView = this.selectedTimeframe;
4714
+ const chosenTimeframeOption = this.timeframeOptions.filter(option => option.value === this.selectedTimeframe)[0];
4715
+ this.datePickerService.updateTimeframeAndFormat(chosenTimeframeOption.format);
4716
+ if (this.selectedTimeframe === CalendarView.FOR_QUARTERS) {
4717
+ this.selectedQuarter = this.datePickerService.getQuarterAccordingToFiscalYear(this._calendar.activeDate);
4718
+ }
4719
+ }
4720
+ get currentViewIsQuarter() {
4721
+ return ![CalendarView.FOR_DAYS, CalendarView.FOR_MONTHS, CalendarView.FOR_YEARS].includes(this._calendar.currentView);
4722
+ }
4723
+ switchViewOnClickOnPeriodLabel(view) {
4724
+ this._calendar.currentView = view;
4725
+ }
4726
+ onSelectQuarter(quarterNumber) {
4727
+ this.selectedQuarter = quarterNumber;
4728
+ this.datePickerService.setEndOfQuarter(this._calendar.activeDate, quarterNumber);
4729
+ this.datePickerService.updatedQuarter$.next(this._calendar.activeDate);
4730
+ this.datePickerService.datePickerInstance.close();
4731
+ }
4732
+ pagingClicked(forward) {
4733
+ if (this.pagingSetup[this._calendar.currentView]) {
4734
+ this.pagingSetup[this._calendar.currentView](forward);
4735
+ }
4736
+ }
4737
+ pagingDateChange(actionCall, amount, forward) {
4738
+ this._calendar.activeDate = this._dateAdapter[actionCall](this._calendar.activeDate, forward ? amount : -amount);
4739
+ this.setPeriodLabels();
4740
+ }
4741
+ transformDateInMultiyearViewAccordingToFY() {
4742
+ const multuYearView = this._calendar.multiYearView;
4743
+ multuYearView._activeDate = this.datePickerService.subtractFiscalYearMonthsFromDate(multuYearView._activeDate);
4744
+ multuYearView._selectedYear = multuYearView._activeDate.year();
4745
+ multuYearView._init();
4746
+ }
4747
+ onSelectPresetTag(tag) {
4748
+ if (tag.key === this.selectedPresetTag) {
4749
+ this.datePickerService.presetTag$.next(null);
4750
+ }
4751
+ else {
4752
+ this.datePickerService.presetTag$.next(tag.key);
4753
+ }
4754
+ this.datePickerService.updateDatePickerByPreset(this.selectedPresetTag, this._calendar);
4755
+ }
4756
+ }
4757
+ DrDatePickerCustomHeaderComponent.decorators = [
4758
+ { type: Component, args: [{
4759
+ selector: 'dr-date-picker_custom-header.component',
4760
+ template: "<div *ngIf=\"datePickerService.isTimeframeSelectionEnabled\" class=\"dr-datepicker__timeframe-select__wrapper\">\n\n <div *ngIf=\"datePickerService.isUsingDateTagPresets\" class=\"dr-datepicker-preset-date\">\n <div class=\"dr-datepicker-preset-date__tags\">\n <div *ngFor=\"let tag of presetTagList\" \n id=\"preset_tag\" \n class=\"dr-datepicker-preset-date__tags__tag\" \n (click)=\"onSelectPresetTag(tag)\" \n [ngClass]=\"{'dr-datepicker-preset-date__tags__tag--selected': tag.key === selectedPresetTag}\"\n [drTooltip]=\"selectedPresetTag === tag.key? 'Unselect preset' : ''\"\n [drTooltipPosition]=\"'top'\">\n {{ tag.label }}\n </div>\n </div>\n </div>\n <dr-select\n class=\"dr-datepicker__timeframe-select\"\n [ngModel]=\"selectedTimeframe\"\n [items]=\"timeframeOptions | drShowTimeframePipe: datePickerService.availableTimeframes\"\n bindLabel=\"title\"\n bindValue=\"value\"\n (ngModelChange)=\"setTimeframe($event)\">\n </dr-select>\n</div>\n\n<div class=\"dr-date-paging\">\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(false)\">\n <i class=\"dr-icon-arrow-left presentation_buttons-navigate_input\"></i>\n </div>\n <span class=\"example-header-label\">\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_MONTHS)\">{{ periodMonthLabel + ' ' }}</span>\n <span (click)=\"switchViewOnClickOnPeriodLabel(calendarView.FOR_YEARS)\">{{ periodYearLabel }}</span>\n </span>\n <div class=\"dr-date-paging flip-page-button\"\n (click)=\"pagingClicked(true)\">\n <i class=\"dr-icon-arrow-right presentation_buttons-navigate_input\"></i>\n </div>\n</div>\n<div #quarterlyDatePicker class=\"dr-quarterly-datepicker\" *ngIf=\"currentViewIsQuarter\">\n <div *ngFor=\"let quarter of quarters\"\n class=\"quarter-selector\" (click)=\"onSelectQuarter(quarter)\"\n [class]=\"quarter === selectedQuarter ? 'selected' : ''\"\n >Q{{quarter}}</div>\n</div>\n\n",
4761
+ changeDetection: ChangeDetectionStrategy.OnPush,
4762
+ styles: [":host{height:54px;align-items:center;font-family:\"Poppins\";font-style:normal;font-weight:600;font-size:14px;line-height:22px}.dr-datepicker__timeframe-select__wrapper{background-color:#f9faff;padding:16px 32px;border-radius:18px 18px 0 0}.dr-datepicker-preset-date{display:flex;flex-direction:column}.dr-datepicker-preset-date__tags{display:flex;padding-bottom:21px;padding-top:10px;font-size:12px}.dr-datepicker-preset-date__tags__tag{cursor:pointer;font-weight:400;line-height:20px!important;padding:2px 8px;border:1px solid #9EA1AA;border-radius:18px;background:#FFFFFF;margin-right:4px}.dr-datepicker-preset-date__tags__tag--selected{color:#4646ce;background:#F2F2FB;border:1px solid #4646CE}.dr-date-paging{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:16px 32px;grid-gap:4px;gap:4px}.dr-date-paging.flip-page-button{width:20px;height:20px;padding:0;color:#4e566c}.dr-date-paging.flip-page-button:hover{border-radius:50%;background:#f2f2fb;color:#4646ce}.example-header-label{cursor:pointer}.dr-quarterly-datepicker{display:flex;justify-content:space-between;padding:10px}.dr-quarterly-datepicker .quarter-selector{display:block;width:74px;height:40px;text-align:center;border-radius:40px;font-weight:400;padding-top:9px}.dr-quarterly-datepicker .quarter-selector:hover{background:#f2f2fb;color:#4646ce;font-weight:600;cursor:pointer}.dr-quarterly-datepicker .quarter-selector.selected{background-color:#4646ce;color:#f3f7ff;font-weight:600}\n"]
4763
+ },] }
4764
+ ];
4765
+ DrDatePickerCustomHeaderComponent.ctorParameters = () => [
4766
+ { type: MatCalendar },
4767
+ { type: DateAdapter },
4768
+ { type: CustomDateFormat, decorators: [{ type: Inject, args: [MAT_DATE_FORMATS,] }] },
4769
+ { type: ChangeDetectorRef },
4770
+ { type: DrDatePickerService }
4771
+ ];
4772
+
4773
+ // @ts-ignore
4774
+ const moment = require('moment');
4775
+ const noop = () => {
4776
+ };
4777
+ const ɵ0$2 = noop;
4778
+ class DrDatePickerComponent {
4779
+ constructor(cdr, dateAdapter, datePickerService) {
4780
+ this.cdr = cdr;
4781
+ this.dateAdapter = dateAdapter;
4782
+ this.datePickerService = datePickerService;
4783
+ // Whether to transform date, taking end, start, middle of preiod (i.e. set middle of month if timeframe='month')
4784
+ this.periodPosition = DatePickerPeriodPosition.DEFAULT;
4785
+ this.placeholder = 'Select...';
4786
+ this.fiscalYearMonthsModifier = 0;
4787
+ this.calendarViewsTimeframeMapping = {
4788
+ year: 'multi-year',
4789
+ month: 'year',
4790
+ quarter: 'none',
4791
+ day: 'month',
4354
4792
  };
4355
4793
  this.customHeader = DrDatePickerCustomHeaderComponent;
4356
4794
  this.readonly = true;
@@ -5261,586 +5699,163 @@ DrTabsModule.decorators = [
5261
5699
  ],
5262
5700
  providers: [],
5263
5701
  declarations: [
5264
- DrTabsComponent,
5265
- DrTabComponent
5266
- ],
5267
- },] }
5268
- ];
5269
-
5270
- const DR_ACCORDION_COMPONENTS = [
5271
- DrAccordionComponent,
5272
- DrAccordionItemComponent,
5273
- DrAccordionItemHeaderComponent,
5274
- DrAccordionItemBodyComponent,
5275
- ];
5276
- class DrAccordionModule {
5277
- }
5278
- DrAccordionModule.decorators = [
5279
- { type: NgModule, args: [{
5280
- imports: [CommonModule],
5281
- exports: [...DR_ACCORDION_COMPONENTS],
5282
- declarations: [...DR_ACCORDION_COMPONENTS],
5283
- providers: [],
5284
- },] }
5285
- ];
5286
-
5287
- const components = [
5288
- DrLayoutComponent,
5289
- DrLayoutHeaderComponent,
5290
- DrLayoutBodyComponent
5291
- ];
5292
- class DrLayoutModule {
5293
- }
5294
- DrLayoutModule.decorators = [
5295
- { type: NgModule, args: [{
5296
- imports: [CommonModule],
5297
- exports: [...components],
5298
- declarations: [...components],
5299
- },] }
5300
- ];
5301
-
5302
- class DrErrorModule {
5303
- }
5304
- DrErrorModule.decorators = [
5305
- { type: NgModule, args: [{
5306
- imports: [
5307
- CommonModule,
5308
- FormsModule,
5309
- DrTooltipModule
5310
- ],
5311
- exports: [DrErrorComponent],
5312
- providers: [],
5313
- declarations: [
5314
- DrErrorComponent
5315
- ],
5316
- },] }
5317
- ];
5318
-
5319
- class StepperComponent {
5320
- constructor() {
5321
- this.withoutConnectors = false;
5322
- this.hiddenNames = false;
5323
- this.inlineLabels = false;
5324
- this.disabled = false;
5325
- this.hiddenIndex = false;
5326
- this.stepChange = new EventEmitter();
5327
- }
5328
- selectStep(step) {
5329
- if (step !== this.currentStep && !this.disabled) {
5330
- this.stepChange.emit(step);
5331
- }
5332
- }
5333
- getWidth(step) {
5334
- if (this.withoutConnectors)
5335
- return '0%';
5336
- if (step.completed)
5337
- return '100%';
5338
- if (step.index === 0 || this.steps[step.index - 1].completed)
5339
- return `${((step === null || step === void 0 ? void 0 : step.completedTasks) / (step === null || step === void 0 ? void 0 : step.requiredTasks) * 100) || 0}%`;
5340
- return '0%';
5341
- }
5342
- scrollLeft() {
5343
- this.stepper.nativeElement.scrollLeft -= 80;
5344
- }
5345
- scrollRight() {
5346
- this.stepper.nativeElement.scrollLeft += 80;
5347
- }
5348
- roundWidth(width) {
5349
- return Math.round(width);
5350
- }
5351
- }
5352
- StepperComponent.decorators = [
5353
- { type: Component, args: [{
5354
- selector: 'dr-stepper',
5355
- template: "<div class=\"scroll-section\" *ngIf=\"stepper?.scrollLeft !== 0\" (click)=\"scrollLeft()\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n<div #stepper class=\"stepper\" [ngClass]=\"{'stepper--disabled': disabled}\">\n <ng-container *ngFor=\"let step of steps; let index = index; last as isLast; first as isFirst\">\n <div *ngIf=\"!step.hide\" class=\"step\" (click)=\"selectStep(step)\"\n [class.step-setup]=\"inlineLabels\">\n <div class=\"step-wrapper\" [drTooltip]=\"step.description && tooltip\"\n [drTooltipContext]=\"{ step: step }\"\n [drTooltipPosition]=\"'bottom'\">\n <div data-test=\"step_point\" class=\"step-point\" [class.active]=\"currentStep === step\" [class.completed]=\"step.completed\">\n <div *ngIf=\"step === currentStep;\" class=\"ellipse\"></div>\n <ng-container [ngSwitch]=\"step.completed\">\n <ng-template [ngSwitchCase]=\"true\">\n <div class=\"pointer blue\">\n <i class=\"dr-icon-approve\"></i>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"false\">\n <div class=\"pointer\" [class.gray]=\"step !== currentStep\"\n [ngClass]=\"{'blue with-ellipse': step === currentStep}\">\n <div [hidden]=\"step === currentStep || hiddenIndex\" class=\"text\">{{index + 1}}</div>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div data-test=\"step_label_name\" class=\"step-label\" [class.active]=\"currentStep === step\"\n [ngClass]=\"step.completed ? 'completed' : 'uncompleted'\">\n <span [hidden]=\"hiddenNames\">{{step.name}}</span>\n </div>\n <ng-container *ngIf=\"inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n <span *ngIf=\"step.showProgress\"\n data-test=\"step_progress\"\n class=\"step-progress\">\n {{(step.requiredTasks ? step.completedTasks : step.requiredTasks) + '/' + step.requiredTasks}}\n </span>\n </div>\n <ng-container *ngIf=\"!inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n </div>\n </ng-container>\n</div>\n<div (click)=\"scrollRight()\" class=\"scroll-section\"\n *ngIf=\"stepper?.scrollWidth > stepper?.clientWidth && roundWidth(stepper?.scrollLeft + stepper?.clientWidth) < stepper?.scrollWidth\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n\n<ng-template #tooltip let-step=\"step\">\n <div class=\"step-tooltip\">\n <div class=\"step-tooltip_name\">{{step.name}}</div>\n <div class=\"step-tooltip_description\">{{step.description}}</div>\n </div>\n</ng-template>\n\n<ng-template #connector let-step=\"step\" let-isLast=\"isLast\" let-index=\"index\">\n <div class=\"step-connector\" [class.only-one-step]=\"steps.length === 1\"\n [class]=\"'step-connector--' + (!inlineLabels ? 'absolute' : 'inline')\"\n *ngIf=\"steps.length === 1 || !isLast\"\n [style.visibility]=\"withoutConnectors || steps[step.index + 1]?.hide ? 'hidden' : 'unset'\"\n [class.connector-grand]=\"!inlineLabels && (index === 0 || index === steps.length - 2)\">\n <div class=\"progress\" [style.width]=\"getWidth(step)\"></div>\n </div>\n</ng-template>\n",
5356
- changeDetection: ChangeDetectionStrategy.Default,
5357
- styles: [":host{font-family:\"Poppins\",sans-serif;display:flex;justify-content:center;height:100%;position:relative}:host .scroll-section{position:absolute;top:0;height:100%;width:108px;display:flex;align-items:center;z-index:10}:host .scroll-section i{font-size:24px;color:#2969b0;background:#f3f7ff;border-radius:24px}:host .scroll-section i:hover{background:#cde1fb;cursor:pointer}:host .scroll-section:first-child{left:0;padding-left:16px;background:linear-gradient(90deg,#ffffff 36.08%,rgba(255,255,255,0) 87.17%)}:host .scroll-section:first-child i{transform:rotate(180deg)}:host .scroll-section:last-child{right:0;padding-right:16px;background:linear-gradient(270deg,#ffffff 36.08%,rgba(255,255,255,0) 87.17%);justify-content:flex-end}:host .stepper{display:flex;align-items:center;height:100%;width:100%;overflow:auto;scroll-behavior:smooth}:host .stepper::-webkit-scrollbar{display:none}:host .stepper--disabled .step:hover{cursor:default}:host .stepper--disabled .step-point .ellipse{border-color:#bcbcbc}:host .stepper--disabled .step-point .pointer{color:#fff;background-color:#bcbcbc;cursor:default}:host .stepper--disabled .step-label{color:#bcbcbc}:host .stepper--disabled .step-connector{background-color:#bcbcbc}:host .stepper--disabled .step-connector .progress{background-color:#bcbcbc}:host .step{position:relative;display:flex;flex-direction:column;width:120px;align-items:center;flex-shrink:0;flex-grow:1}:host .step:hover{cursor:pointer}:host .step:not(.step-setup) .step-wrapper{width:100%}:host .step:not(.step-setup):first-child .step-wrapper,:host .step:not(.step-setup):first-child .step-point,:host .step:not(.step-setup):first-child .step-label,:host .step:not(.step-setup):first-child .step-progress{margin-left:8px}:host .step:not(.step-setup):first-child .only-one-step{left:0!important;margin-left:25px}:host .step-point{display:flex;justify-content:center;width:100%;height:28px;position:relative;align-items:center}:host .step-point .ellipse{width:28px;height:28px;position:absolute;border-radius:50px;border-color:#4646ce;border-style:solid;border-width:2px;background:white;display:flex;justify-content:center;align-items:center;z-index:2}:host .step-point .pointer{width:24px;height:24px;position:absolute;z-index:4;border-radius:20px;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:16px;line-height:1.4;color:#51566f;transition:box-shadow .2s ease-in-out}:host .step-point .pointer i{color:#fff;font-size:22px}:host .step-point .pointer.blue{background:#4646ce}:host .step-point .pointer.gray{background:#e5e6ea}:host .step-point .pointer.gray:hover{box-shadow:0 0 4px 2px #00000026}:host .step-point.completed :host .step-point.active{background:#4646ce}:host .step-point.active .ellipse{width:28px;height:28px}:host .step-point.active .pointer{width:20px;height:20px}:host .step-label{font-weight:normal;font-size:14px;line-height:22px;line-height:1.5;color:#6d6e6f;display:flex;justify-content:center;overflow:hidden;margin-top:8px}:host .step-label span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .step-label.active{font-weight:600;color:#333}:host .step-label:last-child{margin-bottom:23px}:host .step-progress{margin-top:3px;font-style:normal;font-weight:normal;font-size:12px;line-height:1.4;display:flex;justify-content:center}:host .step-connector{background-color:#e5e5e5;height:2px}:host .step-connector.connector-grand{width:calc(100% - 25px)}:host .step-connector.connector-grand.only-one-step{width:calc(100% - 50px)}:host .step-connector .progress{background-color:#4646ce;height:2px;width:0}:host .step-connector--absolute{position:absolute;top:calc(28px / 2);width:100%;left:calc(100% / 2 + 12px)}:host .step-connector--inline{width:50px;margin-left:32px;margin-right:32px}:host .step-setup{width:auto}:host .step-setup .step-wrapper{display:flex;flex-direction:row;align-items:center;width:auto}:host .step-setup+.step-setup{margin-left:0}:host .step-setup .step-progress{display:none}:host .step-setup .step-label{position:relative;transform:none;align-items:center;justify-content:start;margin:0 0 0 8px;font-size:16px}:host .step-setup .step-point{width:28px;height:28px}:host .step-setup .step-point .pointer i{font-size:22px}:host .step-setup .step-point .pointer .text{font-size:16px}::ng-deep .step-tooltip{max-width:250px;font-size:14px;line-height:22px;padding:10px 12px}::ng-deep .step-tooltip_name{font-weight:700;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1367px){.stepper .step-label{font-size:14px}}\n"]
5358
- },] }
5359
- ];
5360
- StepperComponent.ctorParameters = () => [];
5361
- StepperComponent.propDecorators = {
5362
- steps: [{ type: Input }],
5363
- currentStep: [{ type: Input }],
5364
- withoutConnectors: [{ type: Input }],
5365
- hiddenNames: [{ type: Input }],
5366
- inlineLabels: [{ type: Input }],
5367
- disabled: [{ type: Input }],
5368
- hiddenIndex: [{ type: Input }],
5369
- stepChange: [{ type: Output }],
5370
- stepper: [{ type: ViewChild, args: ['stepper', { read: ElementRef },] }]
5371
- };
5372
-
5373
- class DrStepperModule {
5374
- }
5375
- DrStepperModule.decorators = [
5376
- { type: NgModule, args: [{
5377
- declarations: [StepperComponent],
5378
- imports: [
5379
- CommonModule,
5380
- DrTooltipModule
5381
- ],
5382
- exports: [StepperComponent]
5383
- },] }
5384
- ];
5385
-
5386
- class DrDetailsListModule {
5387
- }
5388
- DrDetailsListModule.decorators = [
5389
- { type: NgModule, args: [{
5390
- imports: [
5391
- CommonModule,
5392
- ],
5393
- exports: [DrDetailsListComponent],
5394
- providers: [],
5395
- declarations: [DrDetailsListComponent],
5396
- },] }
5397
- ];
5398
-
5399
- const ɵ0$1 = {}, ɵ1 = {};
5400
- class DrDialogModule {
5401
- }
5402
- DrDialogModule.decorators = [
5403
- { type: NgModule, args: [{
5404
- declarations: [DialogWrapperComponent, DialogModalWrapperComponent],
5405
- imports: [
5406
- CommonModule,
5407
- MatDialogModule,
5408
- DrInputsModule,
5409
- ReactiveFormsModule,
5410
- DrTooltipModule,
5411
- DrDetailsListModule
5412
- ],
5413
- exports: [DialogWrapperComponent, DialogModalWrapperComponent],
5414
- providers: [
5415
- { provide: MatDialogRef, useValue: ɵ0$1 },
5416
- { provide: MAT_DIALOG_DATA, useValue: ɵ1 },
5417
- DialogService
5418
- ]
5702
+ DrTabsComponent,
5703
+ DrTabComponent
5704
+ ],
5419
5705
  },] }
5420
5706
  ];
5421
5707
 
5422
- class DrChatFormComponent {
5423
- constructor(cdr, domSanitizer) {
5424
- this.cdr = cdr;
5425
- this.domSanitizer = domSanitizer;
5426
- this._textareaInitialHeight = true;
5427
- this.inputFocus = false;
5428
- this.inputHover = false;
5429
- this.droppedFiles = [];
5430
- /**
5431
- * Predefined message text
5432
- *
5433
- * @type {string}
5434
- */
5435
- this.message = '';
5436
- /**
5437
- * Message placeholder text
5438
- *
5439
- * @type {string}
5440
- */
5441
- this.messagePlaceholder = 'Type a message';
5442
- /**
5443
- * Show send button
5444
- *
5445
- * @type {boolean}
5446
- */
5447
- this.dropFiles = false;
5448
- /**
5449
- * File drop placeholder text
5450
- *
5451
- * @type {string}
5452
- */
5453
- this.dropFilePlaceholder = 'Drop file to send';
5454
- /**
5455
- * Parameter to check is send message function available
5456
- *
5457
- * @type {boolean}
5458
- */
5459
- this.waitForReply = false;
5460
- /**
5461
- *
5462
- * @type {EventEmitter<{ message: string, files: File[] }>}
5463
- */
5464
- this.send = new EventEmitter();
5465
- this.abort = new EventEmitter();
5466
- /**
5467
- * Emits when message input value has been changed
5468
- *
5469
- * @type {EventEmitter<string>}
5470
- */
5471
- this.inputChange = new EventEmitter();
5472
- this.fileOver = false;
5473
- }
5474
- onDrop(event) {
5475
- var _a;
5476
- if (this.dropFiles) {
5477
- event.preventDefault();
5478
- event.stopPropagation();
5479
- this.fileOver = false;
5480
- if ((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) {
5481
- for (const file of event.dataTransfer.files) {
5482
- const res = file;
5483
- if (IMAGE_TYPES.includes(file.type)) {
5484
- const fr = new FileReader();
5485
- fr.onload = (e) => {
5486
- res.src = e.target.result;
5487
- res.urlStyle = this.domSanitizer.bypassSecurityTrustStyle(`url(${res.src})`);
5488
- this.cdr.detectChanges();
5489
- };
5490
- fr.readAsDataURL(file);
5491
- }
5492
- this.droppedFiles.push(res);
5493
- }
5494
- }
5495
- }
5496
- }
5497
- removeFile(file) {
5498
- const index = this.droppedFiles.indexOf(file);
5499
- if (index >= 0) {
5500
- this.droppedFiles.splice(index, 1);
5501
- }
5502
- }
5503
- onDragOver(event) {
5504
- event.preventDefault();
5505
- event.stopPropagation();
5506
- if (this.dropFiles) {
5507
- this.fileOver = true;
5508
- }
5509
- }
5510
- onDragLeave(event) {
5511
- event.preventDefault();
5512
- event.stopPropagation();
5513
- if (this.dropFiles) {
5514
- this.fileOver = false;
5515
- }
5516
- }
5517
- sendMessage() {
5518
- if (this.waitForReply) {
5519
- return;
5520
- }
5521
- if (this.droppedFiles.length || String(this.message).trim().length) {
5522
- this._textareaInitialHeight = true;
5523
- this.send.emit({ message: this.message, files: this.droppedFiles });
5524
- this.message = '';
5525
- this.droppedFiles = [];
5526
- this.cdr.markForCheck();
5527
- }
5528
- }
5529
- abortMessage() {
5530
- this.abort.emit();
5531
- }
5532
- onModelChange(value) {
5533
- this._textareaInitialHeight = false;
5534
- this.inputChange.emit(value);
5535
- }
5536
- getTextAreaHeight(textAreaElement) {
5537
- let height;
5538
- if (this._textareaInitialHeight) {
5539
- height = 50;
5540
- }
5541
- else {
5542
- height = textAreaElement.scrollHeight + 2;
5543
- }
5544
- return `height: ${height}px;`;
5545
- }
5708
+ const DR_ACCORDION_COMPONENTS = [
5709
+ DrAccordionComponent,
5710
+ DrAccordionItemComponent,
5711
+ DrAccordionItemHeaderComponent,
5712
+ DrAccordionItemBodyComponent,
5713
+ ];
5714
+ class DrAccordionModule {
5546
5715
  }
5547
- DrChatFormComponent.decorators = [
5548
- { type: Component, args: [{
5549
- selector: 'dr-chat-form',
5550
- template: "<div class=\"dropped-files\" *ngIf=\"droppedFiles?.length\">\n <div class=\"dropped-files__item\" *ngFor=\"let file of droppedFiles\">\n <div class=\"dropped-files__item__preview\" [style.background-image]=\"file.urlStyle || 'none'\">\n <i class=\"dr-icon-file\" *ngIf=\"!file.urlStyle\"></i>\n </div>\n <div class=\"dropped-files__item__name\">{{ file.name }}</div>\n <i class=\"dropped-files__item__remove dr-icon-exit\" (click)=\"removeFile(file)\"></i>\n </div>\n</div>\n<div class=\"message-row\">\n <div class=\"message-row__input\">\n <textarea #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 (keyup.enter)=\"sendMessage()\">\n </textarea>\n <i *ngIf=\"!waitForReply\" (click)=\"sendMessage()\" class=\"dr-icon-notify send-button\"></i>\n <dr-dot-flashing *ngIf=\"waitForReply\" class=\"wait-reply-dot-flashing\"></dr-dot-flashing>\n <dr-button *ngIf=\"waitForReply\" (click)=\"abortMessage()\" theme=\"ghost\" class=\"abort-button\">Stop generating</dr-button>\n </div>\n</div>\n",
5551
- changeDetection: ChangeDetectionStrategy.OnPush,
5552
- styles: [":host{display:flex;flex-direction:column;align-items:center;padding:0 24px;margin-top:12px}:host .message-row{display:flex;justify-content:center;width:100%;padding:0 0 21px;max-width:970px}:host .message-row__input{position:relative;display:flex;align-items:center;flex-grow:1;flex-direction:row;height:auto;overflow:visible;min-width:265px}:host .message-row__input textarea{font-size:14px;line-height:22px;max-height:100%;flex-grow:1;resize:none;padding:14px 40px 12px 23px;margin:auto;border:1px solid #DFE0E3;border-radius:12px;min-height:50px}:host .message-row__input textarea:focus{border:1px solid #7F7FDD}:host .message-row__input textarea::placeholder{color:#9ea1aa}:host .message-row__input .send-button{position:absolute;right:14px;cursor:pointer;color:#dfe0e3;font-size:28px}:host .message-row__input .wait-reply-dot-flashing{position:absolute;right:20px}:host .message-row__input textarea:focus+.send-button,:host .message-row__input .send-button:hover{color:#25258c}:host .message-row__input .abort-button{position:absolute;right:0;top:-44px}:host .message-row__input .abort-button::ng-deep button{background:#F2F2FF!important;border-radius:4px}:host input{flex:1}:host input.with-button{border-bottom-right-radius:0;border-top-right-radius:0}:host .dropped-files{display:flex;flex-direction:row;margin-bottom:.5rem;flex-wrap:wrap}:host .dropped-files__item{display:flex;flex-direction:column;justify-content:center;margin:0 10px 10px 0;position:relative}:host .dropped-files__item__preview{background-size:cover;background-position:center;width:64px;height:64px;border-radius:8px;border:1px solid #ccc}:host .dropped-files__item__preview i{font-size:62px}:host .dropped-files__item__name{white-space:nowrap;font-size:12px;color:#8f929e;margin-top:4px;max-width:64px;overflow:hidden;text-overflow:ellipsis}:host .dropped-files__item__remove{position:absolute;right:-4px;top:-4px;cursor:pointer;background:white;border-radius:12px;color:#8f929e;border:1px solid #8f929e;font-size:14px}\n"]
5716
+ DrAccordionModule.decorators = [
5717
+ { type: NgModule, args: [{
5718
+ imports: [CommonModule],
5719
+ exports: [...DR_ACCORDION_COMPONENTS],
5720
+ declarations: [...DR_ACCORDION_COMPONENTS],
5721
+ providers: [],
5553
5722
  },] }
5554
5723
  ];
5555
- DrChatFormComponent.ctorParameters = () => [
5556
- { type: ChangeDetectorRef },
5557
- { type: DomSanitizer }
5558
- ];
5559
- DrChatFormComponent.propDecorators = {
5560
- message: [{ type: Input }],
5561
- messagePlaceholder: [{ type: Input }],
5562
- dropFiles: [{ type: Input }],
5563
- dropFilePlaceholder: [{ type: Input }],
5564
- waitForReply: [{ type: Input }],
5565
- send: [{ type: Output }],
5566
- abort: [{ type: Output }],
5567
- inputChange: [{ type: Output }],
5568
- fileOver: [{ type: HostBinding, args: ['class.file-over',] }],
5569
- onDrop: [{ type: HostListener, args: ['drop', ['$event'],] }],
5570
- onDragOver: [{ type: HostListener, args: ['dragover', ['$event'],] }],
5571
- onDragLeave: [{ type: HostListener, args: ['dragleave', ['$event'],] }]
5572
- };
5573
5724
 
5574
- /**
5575
- * `DrCustomMessageService` is used to store instances of `DrChatCustomMessageDirective`s which
5576
- * were provided in the chat component.
5577
- */
5578
- class DrChatCustomMessageService {
5579
- constructor() {
5580
- this.customMessages = new Map();
5581
- }
5582
- register(type, instance) {
5583
- this.customMessages.set(type, instance);
5584
- }
5585
- unregister(type) {
5586
- return this.customMessages.delete(type);
5587
- }
5588
- getInstance(type) {
5589
- return this.customMessages.get(type);
5590
- }
5725
+ const components = [
5726
+ DrLayoutComponent,
5727
+ DrLayoutHeaderComponent,
5728
+ DrLayoutBodyComponent
5729
+ ];
5730
+ class DrLayoutModule {
5591
5731
  }
5592
- DrChatCustomMessageService.decorators = [
5593
- { type: Injectable }
5732
+ DrLayoutModule.decorators = [
5733
+ { type: NgModule, args: [{
5734
+ imports: [CommonModule],
5735
+ exports: [...components],
5736
+ declarations: [...components],
5737
+ },] }
5594
5738
  ];
5595
5739
 
5596
- class DrChatMessageComponent {
5597
- constructor(customMessageService) {
5598
- this.customMessageService = customMessageService;
5599
- this.MESSAGE_TYPE = CHAT_MESSAGE_TYPE;
5600
- this._reply = false;
5601
- }
5602
- get flyInOut() {
5603
- return true;
5604
- }
5605
- get notReply() {
5606
- return !this.reply;
5607
- }
5608
- /**
5609
- * Determines if a message is a reply
5610
- */
5611
- get reply() {
5612
- return this._reply;
5613
- }
5614
- set reply(value) {
5615
- this._reply = !!value;
5616
- }
5617
- getTemplate() {
5618
- this.customMessage = true;
5619
- const customMessage = this.getCustomMessage(this.type);
5620
- return customMessage.templateRef;
5621
- }
5622
- getTemplateContext() {
5623
- return { $implicit: this.customMessageData, isReply: this.reply };
5624
- }
5625
- getCustomMessage(type) {
5626
- const customMessageDirective = this.customMessageService.getInstance(type);
5627
- if (!customMessageDirective) {
5628
- throw new Error(`dr-chat: Can't find template for custom type '${type}'. ` +
5629
- `Make sure you provide it in the chat component with *drCustomMessage='${type}'.`);
5630
- }
5631
- return customMessageDirective;
5632
- }
5740
+ class DrErrorModule {
5633
5741
  }
5634
- DrChatMessageComponent.decorators = [
5635
- { type: Component, args: [{
5636
- selector: 'dr-chat-message',
5637
- template: "<ng-container *ngIf=\"message.avatarUrl; else userAvatar\">\n <div class=\"avatar\" [style.background-image]=\"'url(' + message.avatarUrl + ')'\"></div>\n</ng-container>\n<ng-template #userAvatar>\n <dr-avatar *ngIf=\"message.user\" [users]=\"message.user\"></dr-avatar>\n</ng-template>\n<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-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 class=\"message__actions\" *ngIf=\"drChatMessageActions;\">\n <ng-container [ngTemplateOutlet]=\"drChatMessageActions\"></ng-container>\n </div>\n</div>\n",
5638
- animations: [
5639
- trigger('flyInOut', [
5640
- state('in', style({ transform: 'translateX(0)' })),
5641
- transition('void => *', [style({ transform: 'translateX(-100%)' }), animate(80)]),
5642
- transition('* => void', [animate(80, style({ transform: 'translateX(100%)' }))]),
5643
- ]),
5742
+ DrErrorModule.decorators = [
5743
+ { type: NgModule, args: [{
5744
+ imports: [
5745
+ CommonModule,
5746
+ FormsModule,
5747
+ DrTooltipModule
5748
+ ],
5749
+ exports: [DrErrorComponent],
5750
+ providers: [],
5751
+ declarations: [
5752
+ DrErrorComponent
5644
5753
  ],
5645
- changeDetection: ChangeDetectionStrategy.OnPush,
5646
- styles: [":host{position:relative;display:flex;flex-direction:row;width:100%;background:rgba(249,250,255,.7);border-top:1px solid #E5E5E5;padding:16px 24px}:host:first-child{border:none}:host:last-child{border-bottom:1px solid #E5E5E5}.reply+:host.reply,.not-reply+:host.not-reply{border-top:none;padding-top:0;padding-left:75px}.reply+:host.reply .avatar,.reply+:host.reply dr-avatar,.not-reply+:host.not-reply .avatar,.not-reply+:host.not-reply dr-avatar{display:none}:host.not-reply{background-color:#fff}:host .avatar{display:flex;width:28px;height:28px;background-color:#fff;border-radius:16px;flex-shrink:0;box-shadow:0 1px 3px 1px #0003;background-image:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22Layer_1%22 data-name%3D%22Layer 1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 viewBox%3D%220 0 74 65%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1%2C .cls-2%2C .cls-3 %7B fill%3A none%3B %7D .cls-4 %7B fill%3A url(%23linear-gradient)%3B %7D .cls-5 %7B fill%3A %234eb7df%3B %7D .cls-2 %7B stroke%3A %23a6a8aa%3B stroke-miterlimit%3A 10%3B stroke-width%3A .37px%3B %7D .cls-6 %7B fill%3A url(%23linear-gradient-3)%3B %7D .cls-7 %7B fill%3A url(%23linear-gradient-2)%3B %7D .cls-3 %7B clip-path%3A url(%23clippath)%3B %7D %3C%2Fstyle%3E %3CclipPath id%3D%22clippath%22%3E %3Crect class%3D%22cls-1%22 width%3D%2274%22 height%3D%2265%22%2F%3E %3C%2FclipPath%3E %3ClinearGradient id%3D%22linear-gradient%22 x1%3D%2224.26%22 y1%3D%22-3.79%22 x2%3D%2295.63%22 y2%3D%2288.82%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%237676ff%22%2F%3E %3Cstop offset%3D%22.18%22 stop-color%3D%22%235959ff%22%2F%3E %3Cstop offset%3D%22.35%22 stop-color%3D%22%235757e0%22%2F%3E %3Cstop offset%3D%22.61%22 stop-color%3D%22%234646ce%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234b4be4%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234444eb%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-2%22 x1%3D%2212.05%22 y1%3D%2277.06%22 x2%3D%2210.77%22 y2%3D%2213.85%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%22.45%22 stop-color%3D%22%232f92b8%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234eb7df%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234eb7df%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-3%22 x1%3D%2262.26%22 y1%3D%22-2.54%22 x2%3D%2261.76%22 y2%3D%2285.91%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%2336369b%22%2F%3E %3Cstop offset%3D%22.52%22 stop-color%3D%22%234848d0%22%2F%3E %3C%2FlinearGradient%3E %3C%2Fdefs%3E %3Cg class%3D%22cls-3%22%3E %3Cg%3E %3Cpath class%3D%22cls-4%22 d%3D%22m73.32%2C24.79v15.73c0%2C13.12-9.87%2C23.79-22%2C23.79h-21.32c-3.46-.06-6.25-3.11-6.25-6.87s2.79-6.81%2C6.25-6.87h21.32c5.13%2C0%2C9.29-4.51%2C9.29-10.05v-15.73c0-5.54-4.17-10.05-9.29-10.05h-7.46c3.51%2C0%2C6.35-3.08%2C6.35-6.88s-2.79-6.8-6.25-6.87h7.35c12.12%2C0%2C22%2C10.67%2C22%2C23.79h0Z%22%2F%3E %3Cpath class%3D%22cls-5%22 d%3D%22m50.26%2C7.82c0%2C3.8-2.9%2C6.93-6.41%2C6.93h-21.86c-5.13%2C0-9.29%2C4.51-9.29%2C10.05v15.73c0%2C5.54%2C4.17%2C10.05%2C9.29%2C10.05h8.01c-3.46.06-6.25%2C3.11-6.25%2C6.87s2.79%2C6.81%2C6.25%2C6.87h-8.01c-12.12%2C0-22-10.67-22-23.79v-15.73C0%2C11.68%2C9.87%2C1%2C21.99%2C1h21.97c3.46.06%2C6.3%2C3.06%2C6.3%2C6.82Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m66.45%2C1h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m36.05%2C50.58h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-7%22 d%3D%22m0%2C33.78v-2.76C0%2C12.9%2C13.62%2C14.48%2C13.62%2C14.48h8.38c-5.5.46-9.5%2C4.71-9.5%2C9.96l.02%2C15.8c0%2C5.54%2C4.44%2C10.59%2C9.48%2C10.59l-8-.5S0%2C51.88%2C0%2C33.77h0Z%22%2F%3E %3Cpath class%3D%22cls-6%22 d%3D%22m73%2C31.51v2.76c0%2C18.12-13.62%2C16.53-13.62%2C16.53h-7.99c5.61-.85%2C9.09-4.76%2C9.09-10.02l.02-16.33c0-5.54-4.46-10-9.5-10h8s13.99-1.05%2C13.99%2C17.07h0Z%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\");background-size:20px 22px;background-repeat:no-repeat;background-position-x:4px;background-position-y:3px}:host .avatar,:host dr-avatar{margin:0 23px 0 0}:host .message{display:flex;align-items:center;flex-grow:1}:host .message__actions{display:flex;align-items:center;margin-left:24px;flex-grow:1;justify-content:flex-end}:host .message__actions::ng-deep button:not(:hover) i[class*=dr-icon]{color:#b9b9ec!important}\n"]
5647
5754
  },] }
5648
5755
  ];
5649
- DrChatMessageComponent.ctorParameters = () => [
5650
- { type: DrChatCustomMessageService }
5651
- ];
5652
- DrChatMessageComponent.propDecorators = {
5653
- flyInOut: [{ type: HostBinding, args: ['@flyInOut',] }],
5654
- notReply: [{ type: HostBinding, args: ['class.not-reply',] }],
5655
- reply: [{ type: Input }, { type: HostBinding, args: ['class.reply',] }],
5656
- type: [{ type: Input }],
5657
- message: [{ type: Input }],
5658
- customMessageData: [{ type: Input }],
5659
- user: [{ type: Input }],
5660
- drChatMessageActions: [{ type: ContentChild, args: ['drChatMessageActions',] }]
5661
- };
5662
5756
 
5663
- class DrChatSuggestionsComponent {
5757
+ class StepperComponent {
5664
5758
  constructor() {
5665
- this._nonHiddenValues = [];
5666
- this.visibleValues = [];
5667
- this.values = [];
5668
- this.fullScreen = false;
5669
- this.buttonMode = false;
5670
- /**
5671
- * Parameter to check is send message function available
5672
- *
5673
- * @type {boolean}
5674
- */
5675
- this.waitForReply = false;
5676
- this.suggestionSelect = new EventEmitter();
5677
- }
5678
- get hiddenValues() {
5679
- return JSON.parse(localStorage.getItem('aiChatSuggestions')) || [];
5680
- }
5681
- set hiddenValues(values) {
5682
- localStorage.setItem('aiChatSuggestions', JSON.stringify(values));
5683
- }
5684
- ngOnInit() {
5685
- this.filterValues();
5759
+ this.withoutConnectors = false;
5760
+ this.hiddenNames = false;
5761
+ this.inlineLabels = false;
5762
+ this.disabled = false;
5763
+ this.hiddenIndex = false;
5764
+ this.stepChange = new EventEmitter();
5686
5765
  }
5687
- onItemClick(item) {
5688
- if (this.waitForReply) {
5689
- return;
5766
+ selectStep(step) {
5767
+ if (step !== this.currentStep && !this.disabled) {
5768
+ this.stepChange.emit(step);
5690
5769
  }
5691
- this.suggestionSelect.emit(item);
5692
- this.hiddenValues = [...this.hiddenValues, item];
5693
- this.filterValues();
5694
- this.suggestionCardsList.nativeElement.style.visibility = 'hidden';
5695
- setTimeout(() => this.suggestionCardsList.nativeElement.style.visibility = '', 10);
5696
5770
  }
5697
- filterValues() {
5698
- const hiddenValues = this.hiddenValues;
5699
- this._nonHiddenValues = _.filter(this.values, val => !hiddenValues.includes(val));
5700
- this.fillVisibleValues();
5771
+ getWidth(step) {
5772
+ if (this.withoutConnectors)
5773
+ return '0%';
5774
+ if (step.completed)
5775
+ return '100%';
5776
+ if (step.index === 0 || this.steps[step.index - 1].completed)
5777
+ return `${((step === null || step === void 0 ? void 0 : step.completedTasks) / (step === null || step === void 0 ? void 0 : step.requiredTasks) * 100) || 0}%`;
5778
+ return '0%';
5701
5779
  }
5702
- fillVisibleValues() {
5703
- const maxItemsCount = this.fullScreen ? 6 : 4;
5704
- const nonHiddenValues = _.clone(this._nonHiddenValues);
5705
- this.visibleValues.length = 0;
5706
- for (let i = 0; i < maxItemsCount; i++) {
5707
- if (!nonHiddenValues.length) {
5708
- break;
5709
- }
5710
- const randomIndex = Math.floor(Math.random() * nonHiddenValues.length);
5711
- const item = nonHiddenValues.splice(randomIndex, 1)[0];
5712
- this.visibleValues.push(item);
5713
- }
5780
+ scrollLeft() {
5781
+ this.stepper.nativeElement.scrollLeft -= 80;
5714
5782
  }
5715
- clearHidden() {
5716
- localStorage.setItem('aiChatSuggestions', null);
5717
- this.filterValues();
5783
+ scrollRight() {
5784
+ this.stepper.nativeElement.scrollLeft += 80;
5785
+ }
5786
+ roundWidth(width) {
5787
+ return Math.round(width);
5718
5788
  }
5719
5789
  }
5720
- DrChatSuggestionsComponent.decorators = [
5790
+ StepperComponent.decorators = [
5721
5791
  { type: Component, args: [{
5722
- selector: 'dr-chat-suggestions',
5723
- template: "<div class=\"chat-suggestions\">\n <ng-container *ngIf=\"buttonMode; else suggestionCards\">\n <div class=\"chat-suggestions__container\" (mouseenter)=\"fillVisibleValues()\">\n <dr-button theme=\"ghost\" class=\"chat-suggestions__container__button\">\n Suggested chats\n </dr-button>\n <ng-container *ngTemplateOutlet=\"suggestionCards\"></ng-container>\n </div>\n </ng-container>\n</div>\n\n<ng-template #suggestionCards>\n <div class=\"chat-suggestions__items\" #suggestionCardsList>\n <div class=\"chat-suggestions__items__background\"></div>\n <div *ngFor=\"let item of visibleValues\"\n class=\"chat-suggestions__items__item\" (click)=\"onItemClick(item)\">\n {{ item }}\n </div>\n </div>\n</ng-template>\n",
5724
- changeDetection: ChangeDetectionStrategy.OnPush,
5725
- styles: [":host{display:flex;align-items:flex-start;justify-content:center}:host .chat-suggestions{display:flex;width:100%;max-width:970px}:host .chat-suggestions__container{display:flex;position:relative;width:auto;margin-top:12px;padding:0 24px}:host .chat-suggestions__container:hover{width:100%}:host .chat-suggestions__container:hover .chat-suggestions__container__button::ng-deep button{color:#4646ce;background:#f2f2fb}:host .chat-suggestions__container:hover .chat-suggestions__items,:host .chat-suggestions__container:hover .chat-suggestions__items__background{display:flex}:host .chat-suggestions__container__button::ng-deep button{background:#F2F2FF!important;border-radius:4px}:host .chat-suggestions__container .chat-suggestions__items{display:none;position:absolute;width:100%;bottom:0;left:0;padding-bottom:32px;z-index:2}:host .chat-suggestions__items{display:flex;flex-wrap:wrap;width:100%;justify-content:space-between;padding:0 24px}:host .chat-suggestions__items__background{display:none;position:absolute;top:-32px;right:0;bottom:32px;left:0;background:white;opacity:.7;z-index:-1}:host .chat-suggestions__items__item{margin:0 0 20px;display:inline-flex;height:76px;width:275px;padding:16px;border-radius:8px;background:#F2F2FF;box-shadow:0 1px 2px #00000026;font-size:14px;line-height:24px;color:#25258c}:host .chat-suggestions__items__item:hover{cursor:pointer;background:#EAEAFF}\n"]
5792
+ selector: 'dr-stepper',
5793
+ template: "<div class=\"scroll-section\" *ngIf=\"stepper?.scrollLeft !== 0\" (click)=\"scrollLeft()\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n<div #stepper class=\"stepper\" [ngClass]=\"{'stepper--disabled': disabled}\">\n <ng-container *ngFor=\"let step of steps; let index = index; last as isLast; first as isFirst\">\n <div *ngIf=\"!step.hide\" class=\"step\" (click)=\"selectStep(step)\"\n [class.step-setup]=\"inlineLabels\">\n <div class=\"step-wrapper\" [drTooltip]=\"step.description && tooltip\"\n [drTooltipContext]=\"{ step: step }\"\n [drTooltipPosition]=\"'bottom'\">\n <div data-test=\"step_point\" class=\"step-point\" [class.active]=\"currentStep === step\" [class.completed]=\"step.completed\">\n <div *ngIf=\"step === currentStep;\" class=\"ellipse\"></div>\n <ng-container [ngSwitch]=\"step.completed\">\n <ng-template [ngSwitchCase]=\"true\">\n <div class=\"pointer blue\">\n <i class=\"dr-icon-approve\"></i>\n </div>\n </ng-template>\n <ng-template [ngSwitchCase]=\"false\">\n <div class=\"pointer\" [class.gray]=\"step !== currentStep\"\n [ngClass]=\"{'blue with-ellipse': step === currentStep}\">\n <div [hidden]=\"step === currentStep || hiddenIndex\" class=\"text\">{{index + 1}}</div>\n </div>\n </ng-template>\n </ng-container>\n </div>\n <div data-test=\"step_label_name\" class=\"step-label\" [class.active]=\"currentStep === step\"\n [ngClass]=\"step.completed ? 'completed' : 'uncompleted'\">\n <span [hidden]=\"hiddenNames\">{{step.name}}</span>\n </div>\n <ng-container *ngIf=\"inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n <span *ngIf=\"step.showProgress\"\n data-test=\"step_progress\"\n class=\"step-progress\">\n {{(step.requiredTasks ? step.completedTasks : step.requiredTasks) + '/' + step.requiredTasks}}\n </span>\n </div>\n <ng-container *ngIf=\"!inlineLabels\" [ngTemplateOutlet]=\"connector\"\n [ngTemplateOutletContext]=\"{ index, isLast, step }\">\n </ng-container>\n </div>\n </ng-container>\n</div>\n<div (click)=\"scrollRight()\" class=\"scroll-section\"\n *ngIf=\"stepper?.scrollWidth > stepper?.clientWidth && roundWidth(stepper?.scrollLeft + stepper?.clientWidth) < stepper?.scrollWidth\">\n <i class=\"dr-icon-arrow-right\"></i>\n</div>\n\n<ng-template #tooltip let-step=\"step\">\n <div class=\"step-tooltip\">\n <div class=\"step-tooltip_name\">{{step.name}}</div>\n <div class=\"step-tooltip_description\">{{step.description}}</div>\n </div>\n</ng-template>\n\n<ng-template #connector let-step=\"step\" let-isLast=\"isLast\" let-index=\"index\">\n <div class=\"step-connector\" [class.only-one-step]=\"steps.length === 1\"\n [class]=\"'step-connector--' + (!inlineLabels ? 'absolute' : 'inline')\"\n *ngIf=\"steps.length === 1 || !isLast\"\n [style.visibility]=\"withoutConnectors || steps[step.index + 1]?.hide ? 'hidden' : 'unset'\"\n [class.connector-grand]=\"!inlineLabels && (index === 0 || index === steps.length - 2)\">\n <div class=\"progress\" [style.width]=\"getWidth(step)\"></div>\n </div>\n</ng-template>\n",
5794
+ changeDetection: ChangeDetectionStrategy.Default,
5795
+ styles: [":host{font-family:\"Poppins\",sans-serif;display:flex;justify-content:center;height:100%;position:relative}:host .scroll-section{position:absolute;top:0;height:100%;width:108px;display:flex;align-items:center;z-index:10}:host .scroll-section i{font-size:24px;color:#2969b0;background:#f3f7ff;border-radius:24px}:host .scroll-section i:hover{background:#cde1fb;cursor:pointer}:host .scroll-section:first-child{left:0;padding-left:16px;background:linear-gradient(90deg,#ffffff 36.08%,rgba(255,255,255,0) 87.17%)}:host .scroll-section:first-child i{transform:rotate(180deg)}:host .scroll-section:last-child{right:0;padding-right:16px;background:linear-gradient(270deg,#ffffff 36.08%,rgba(255,255,255,0) 87.17%);justify-content:flex-end}:host .stepper{display:flex;align-items:center;height:100%;width:100%;overflow:auto;scroll-behavior:smooth}:host .stepper::-webkit-scrollbar{display:none}:host .stepper--disabled .step:hover{cursor:default}:host .stepper--disabled .step-point .ellipse{border-color:#bcbcbc}:host .stepper--disabled .step-point .pointer{color:#fff;background-color:#bcbcbc;cursor:default}:host .stepper--disabled .step-label{color:#bcbcbc}:host .stepper--disabled .step-connector{background-color:#bcbcbc}:host .stepper--disabled .step-connector .progress{background-color:#bcbcbc}:host .step{position:relative;display:flex;flex-direction:column;width:120px;align-items:center;flex-shrink:0;flex-grow:1}:host .step:hover{cursor:pointer}:host .step:not(.step-setup) .step-wrapper{width:100%}:host .step:not(.step-setup):first-child .step-wrapper,:host .step:not(.step-setup):first-child .step-point,:host .step:not(.step-setup):first-child .step-label,:host .step:not(.step-setup):first-child .step-progress{margin-left:8px}:host .step:not(.step-setup):first-child .only-one-step{left:0!important;margin-left:25px}:host .step-point{display:flex;justify-content:center;width:100%;height:28px;position:relative;align-items:center}:host .step-point .ellipse{width:28px;height:28px;position:absolute;border-radius:50px;border-color:#4646ce;border-style:solid;border-width:2px;background:white;display:flex;justify-content:center;align-items:center;z-index:2}:host .step-point .pointer{width:24px;height:24px;position:absolute;z-index:4;border-radius:20px;display:flex;align-items:center;justify-content:center;font-weight:bold;font-size:16px;line-height:1.4;color:#51566f;transition:box-shadow .2s ease-in-out}:host .step-point .pointer i{color:#fff;font-size:22px}:host .step-point .pointer.blue{background:#4646ce}:host .step-point .pointer.gray{background:#e5e6ea}:host .step-point .pointer.gray:hover{box-shadow:0 0 4px 2px #00000026}:host .step-point.completed :host .step-point.active{background:#4646ce}:host .step-point.active .ellipse{width:28px;height:28px}:host .step-point.active .pointer{width:20px;height:20px}:host .step-label{font-weight:normal;font-size:14px;line-height:22px;line-height:1.5;color:#6d6e6f;display:flex;justify-content:center;overflow:hidden;margin-top:8px}:host .step-label span{white-space:nowrap;text-overflow:ellipsis;overflow:hidden}:host .step-label.active{font-weight:600;color:#333}:host .step-label:last-child{margin-bottom:23px}:host .step-progress{margin-top:3px;font-style:normal;font-weight:normal;font-size:12px;line-height:1.4;display:flex;justify-content:center}:host .step-connector{background-color:#e5e5e5;height:2px}:host .step-connector.connector-grand{width:calc(100% - 25px)}:host .step-connector.connector-grand.only-one-step{width:calc(100% - 50px)}:host .step-connector .progress{background-color:#4646ce;height:2px;width:0}:host .step-connector--absolute{position:absolute;top:calc(28px / 2);width:100%;left:calc(100% / 2 + 12px)}:host .step-connector--inline{width:50px;margin-left:32px;margin-right:32px}:host .step-setup{width:auto}:host .step-setup .step-wrapper{display:flex;flex-direction:row;align-items:center;width:auto}:host .step-setup+.step-setup{margin-left:0}:host .step-setup .step-progress{display:none}:host .step-setup .step-label{position:relative;transform:none;align-items:center;justify-content:start;margin:0 0 0 8px;font-size:16px}:host .step-setup .step-point{width:28px;height:28px}:host .step-setup .step-point .pointer i{font-size:22px}:host .step-setup .step-point .pointer .text{font-size:16px}::ng-deep .step-tooltip{max-width:250px;font-size:14px;line-height:22px;padding:10px 12px}::ng-deep .step-tooltip_name{font-weight:700;overflow:hidden;text-overflow:ellipsis}@media screen and (min-width: 1367px){.stepper .step-label{font-size:14px}}\n"]
5726
5796
  },] }
5727
5797
  ];
5728
- DrChatSuggestionsComponent.ctorParameters = () => [];
5729
- DrChatSuggestionsComponent.propDecorators = {
5730
- values: [{ type: Input }],
5731
- fullScreen: [{ type: Input }],
5732
- buttonMode: [{ type: Input }],
5733
- waitForReply: [{ type: Input }],
5734
- suggestionSelect: [{ type: Output }],
5735
- suggestionCardsList: [{ type: ViewChild, args: ['suggestionCardsList',] }]
5798
+ StepperComponent.ctorParameters = () => [];
5799
+ StepperComponent.propDecorators = {
5800
+ steps: [{ type: Input }],
5801
+ currentStep: [{ type: Input }],
5802
+ withoutConnectors: [{ type: Input }],
5803
+ hiddenNames: [{ type: Input }],
5804
+ inlineLabels: [{ type: Input }],
5805
+ disabled: [{ type: Input }],
5806
+ hiddenIndex: [{ type: Input }],
5807
+ stepChange: [{ type: Output }],
5808
+ stepper: [{ type: ViewChild, args: ['stepper', { read: ElementRef },] }]
5736
5809
  };
5737
5810
 
5738
- class DrChatComponent {
5739
- constructor(cdr) {
5740
- this.cdr = cdr;
5741
- this.destroy$ = new Subject();
5742
- this.showClearButton = true;
5743
- this.noMessagesPlaceholder = 'No messages yet.';
5744
- this._scrollBottom = true;
5745
- this.suggestions = [];
5746
- /**
5747
- * Parameter to check is send message function available
5748
- *
5749
- * @type {boolean}
5750
- */
5751
- this.waitForReply = false;
5752
- this.clear = new EventEmitter();
5753
- this.close = new EventEmitter();
5754
- this.suggestionSelect = new EventEmitter();
5755
- }
5756
- set contentUpdateSubject(value) {
5757
- if (value) {
5758
- value.pipe(takeUntil(this.destroy$)).subscribe(() => {
5759
- this.updateView();
5760
- });
5761
- }
5762
- }
5763
- ;
5764
- /**
5765
- * Scroll chat to the bottom of the list when a new message arrives
5766
- */
5767
- get scrollBottom() {
5768
- return this._scrollBottom;
5769
- }
5770
- set scrollBottom(value) {
5771
- this._scrollBottom = !!value;
5772
- }
5773
- get messagesContainerWithScroll() {
5774
- return this.messagesContainer && this.messagesContainer.nativeElement.scrollHeight > this.messagesContainer.nativeElement.offsetHeight;
5775
- }
5776
- ;
5777
- ngAfterViewInit() {
5778
- this.messages.changes.subscribe(messages => {
5779
- this.messages = messages;
5780
- this.updateView();
5781
- });
5782
- this.updateView();
5783
- }
5784
- updateView() {
5785
- if (this.scrollBottom) {
5786
- this.scrollListBottom();
5787
- }
5788
- }
5789
- scrollListBottom() {
5790
- setTimeout(() => {
5791
- if (this.messagesContainer) {
5792
- const scrollToOptions = {
5793
- top: this.messagesContainer.nativeElement.scrollHeight,
5794
- };
5795
- if (!this.reopen) {
5796
- scrollToOptions.behavior = 'smooth';
5797
- }
5798
- this.messagesContainer.nativeElement.scrollTo(scrollToOptions);
5799
- this.cdr.markForCheck();
5800
- }
5801
- });
5802
- }
5803
- ngOnDestroy() {
5804
- this.destroy$.next();
5805
- this.destroy$.complete();
5806
- }
5807
- onClearClick($event) {
5808
- this.clear.emit($event);
5809
- if (this._chatSuggestions) {
5810
- this._chatSuggestions.clearHidden();
5811
- }
5812
- }
5811
+ class DrStepperModule {
5813
5812
  }
5814
- DrChatComponent.decorators = [
5815
- { type: Component, args: [{
5816
- selector: 'dr-chat',
5817
- template: "<div class=\"chat\" [class.chat--in-full-screen]=\"fullScreen\">\n <div class=\"chat__header\">\n <div class=\"chat__header__logo\"></div>\n\n <div class=\"chat__header__text\">\n <div class=\"chat__header__text__title\">{{ title }}</div>\n <div *ngIf=\"subtitle\" class=\"chat__header__text__subtitle\">{{ subtitle }}</div>\n </div>\n\n <dr-button *ngIf=\"showClearButton\"\n (click)=\"onClearClick($event)\"\n theme=\"icon\"\n icon=\"dr-icon-clear\"\n class=\"ml-auto\"\n drTooltip=\"Clear chat\">\n </dr-button>\n\n <dr-button *ngIf=\"!fullScreen\"\n (click)=\"close.emit($event)\"\n theme=\"icon\"\n icon=\"dr-icon-exit\"\n class=\"ml-4\"\n drTooltip=\"Close\">\n </dr-button>\n </div>\n\n <div *ngIf=\"!messages?.length\" class=\"chat__empty-state\">\n <span class=\"chat__empty-state__text\">{{ noMessagesPlaceholder }}</span>\n </div>\n\n <div *ngIf=\"messages?.length\" class=\"chat__messages\">\n <div #messagesContainer class=\"chat__messages__container\"\n [class.chat__messages__container--scroll]=\"messagesContainerWithScroll\">\n <ng-content select=\"dr-chat-message\"></ng-content>\n </div>\n </div>\n\n <dr-chat-suggestions *ngIf=\"suggestions?.length\"\n [values]=\"suggestions\"\n [fullScreen]=\"fullScreen\"\n [waitForReply]=\"waitForReply\"\n class=\"chat__suggestions\"\n [class.chat__suggestions--full-height]=\"fullScreen && !messages?.length\"\n [buttonMode]=\"!!messages?.length\"\n (suggestionSelect)=\"suggestionSelect.emit($event)\">\n </dr-chat-suggestions>\n\n <div class=\"form\">\n <ng-content select=\"dr-chat-form\"></ng-content>\n </div>\n</div>\n",
5818
- providers: [DrChatCustomMessageService],
5819
- styles: [":host{height:100%;width:100%;display:flex;flex-direction:column}.chat{position:relative;display:flex;flex-grow:1;flex-direction:column;height:100%;background-color:#fff;color:#4e566c;font-family:\"Poppins\",sans-serif;font-size:14px;font-weight:400;line-height:22px}.chat__header{display:flex;align-items:center;background-color:#f2f2ff;color:#25258c;padding:15px 24px;font-weight:400;font-size:20px;line-height:28px;box-shadow:0 1px 3px #0003;z-index:1}.chat__header__logo{display:flex;width:43px;height:38px;background:url(\"data:image/svg+xml,%3C%3Fxml version%3D%221.0%22 encoding%3D%22UTF-8%22%3F%3E%3Csvg id%3D%22Layer_1%22 data-name%3D%22Layer 1%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 xmlns%3Axlink%3D%22http%3A%2F%2Fwww.w3.org%2F1999%2Fxlink%22 viewBox%3D%220 0 74 65%22%3E %3Cdefs%3E %3Cstyle%3E .cls-1%2C .cls-2%2C .cls-3 %7B fill%3A none%3B %7D .cls-4 %7B fill%3A url(%23linear-gradient)%3B %7D .cls-5 %7B fill%3A %234eb7df%3B %7D .cls-2 %7B stroke%3A %23a6a8aa%3B stroke-miterlimit%3A 10%3B stroke-width%3A .37px%3B %7D .cls-6 %7B fill%3A url(%23linear-gradient-3)%3B %7D .cls-7 %7B fill%3A url(%23linear-gradient-2)%3B %7D .cls-3 %7B clip-path%3A url(%23clippath)%3B %7D %3C%2Fstyle%3E %3CclipPath id%3D%22clippath%22%3E %3Crect class%3D%22cls-1%22 width%3D%2274%22 height%3D%2265%22%2F%3E %3C%2FclipPath%3E %3ClinearGradient id%3D%22linear-gradient%22 x1%3D%2224.26%22 y1%3D%22-3.79%22 x2%3D%2295.63%22 y2%3D%2288.82%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%237676ff%22%2F%3E %3Cstop offset%3D%22.18%22 stop-color%3D%22%235959ff%22%2F%3E %3Cstop offset%3D%22.35%22 stop-color%3D%22%235757e0%22%2F%3E %3Cstop offset%3D%22.61%22 stop-color%3D%22%234646ce%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234b4be4%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234444eb%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-2%22 x1%3D%2212.05%22 y1%3D%2277.06%22 x2%3D%2210.77%22 y2%3D%2213.85%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%22.45%22 stop-color%3D%22%232f92b8%22%2F%3E %3Cstop offset%3D%22.84%22 stop-color%3D%22%234eb7df%22%2F%3E %3Cstop offset%3D%221%22 stop-color%3D%22%234eb7df%22%2F%3E %3C%2FlinearGradient%3E %3ClinearGradient id%3D%22linear-gradient-3%22 x1%3D%2262.26%22 y1%3D%22-2.54%22 x2%3D%2261.76%22 y2%3D%2285.91%22 gradientTransform%3D%22translate(0 65.89) scale(1 -1)%22 gradientUnits%3D%22userSpaceOnUse%22%3E %3Cstop offset%3D%220%22 stop-color%3D%22%2336369b%22%2F%3E %3Cstop offset%3D%22.52%22 stop-color%3D%22%234848d0%22%2F%3E %3C%2FlinearGradient%3E %3C%2Fdefs%3E %3Cg class%3D%22cls-3%22%3E %3Cg%3E %3Cpath class%3D%22cls-4%22 d%3D%22m73.32%2C24.79v15.73c0%2C13.12-9.87%2C23.79-22%2C23.79h-21.32c-3.46-.06-6.25-3.11-6.25-6.87s2.79-6.81%2C6.25-6.87h21.32c5.13%2C0%2C9.29-4.51%2C9.29-10.05v-15.73c0-5.54-4.17-10.05-9.29-10.05h-7.46c3.51%2C0%2C6.35-3.08%2C6.35-6.88s-2.79-6.8-6.25-6.87h7.35c12.12%2C0%2C22%2C10.67%2C22%2C23.79h0Z%22%2F%3E %3Cpath class%3D%22cls-5%22 d%3D%22m50.26%2C7.82c0%2C3.8-2.9%2C6.93-6.41%2C6.93h-21.86c-5.13%2C0-9.29%2C4.51-9.29%2C10.05v15.73c0%2C5.54%2C4.17%2C10.05%2C9.29%2C10.05h8.01c-3.46.06-6.25%2C3.11-6.25%2C6.87s2.79%2C6.81%2C6.25%2C6.87h-8.01c-12.12%2C0-22-10.67-22-23.79v-15.73C0%2C11.68%2C9.87%2C1%2C21.99%2C1h21.97c3.46.06%2C6.3%2C3.06%2C6.3%2C6.82Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m66.45%2C1h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-2%22 d%3D%22m36.05%2C50.58h-.22.22%2C0Z%22%2F%3E %3Cpath class%3D%22cls-7%22 d%3D%22m0%2C33.78v-2.76C0%2C12.9%2C13.62%2C14.48%2C13.62%2C14.48h8.38c-5.5.46-9.5%2C4.71-9.5%2C9.96l.02%2C15.8c0%2C5.54%2C4.44%2C10.59%2C9.48%2C10.59l-8-.5S0%2C51.88%2C0%2C33.77h0Z%22%2F%3E %3Cpath class%3D%22cls-6%22 d%3D%22m73%2C31.51v2.76c0%2C18.12-13.62%2C16.53-13.62%2C16.53h-7.99c5.61-.85%2C9.09-4.76%2C9.09-10.02l.02-16.33c0-5.54-4.46-10-9.5-10h8s13.99-1.05%2C13.99%2C17.07h0Z%22%2F%3E %3C%2Fg%3E %3C%2Fg%3E%3C%2Fsvg%3E\") no-repeat;background-size:100% 100%}.chat__header__text{display:flex;flex-direction:column;flex-grow:1;margin-left:20px}.chat__header__text__title{display:flex;align-items:center}.chat__header__text__title:after{content:\"BETA\";display:inline-flex;padding:2px 10px;background:#25258C;color:#f4f4f3;font-weight:600;font-size:10px;line-height:14px;border-radius:8px;margin-left:12px;font-family:\"Nunito Sans\",sans-serif}.chat__header__text__subtitle{font-size:14px;line-height:22px}.chat__header dr-button::ng-deep button:not(:hover){color:#25258c}.chat__empty-state{display:flex;justify-content:center}.chat__empty-state__text{padding:20px 0;font-family:Poppins,sans-serif;font-size:20px;font-weight:300;line-height:30px;text-align:center;max-width:440px;color:#4646ce}.chat__messages{display:flex;flex-grow:1;overflow-x:hidden;overflow-y:auto;height:100%;width:100%}.chat__messages__container{overflow-y:auto;overflow-x:hidden;display:flex;flex-shrink:0;flex-direction:column;width:100%;padding-bottom:1px}.chat__messages__container--scroll::ng-deep dr-chat-message{padding-right:16px}.chat__suggestions--full-height{flex-grow:1;height:1px;overflow:auto}.chat--in-full-screen .chat__header{padding-left:48px;padding-right:48px}.chat--in-full-screen .chat__empty-state__text{padding:77px 0;font-size:28px;line-height:46px;max-width:570px}.chat--in-full-screen .chat__messages::ng-deep dr-chat-message{justify-content:center}.chat--in-full-screen .chat__messages::ng-deep .message{max-width:919px}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__items{padding-left:0;padding-right:0}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__items__item{margin:0 0 26px;height:80px;width:310px;font-size:16px}.chat--in-full-screen .chat__suggestions::ng-deep .chat-suggestions__container{padding:0}\n"]
5813
+ DrStepperModule.decorators = [
5814
+ { type: NgModule, args: [{
5815
+ declarations: [StepperComponent],
5816
+ imports: [
5817
+ CommonModule,
5818
+ DrTooltipModule
5819
+ ],
5820
+ exports: [StepperComponent]
5820
5821
  },] }
5821
5822
  ];
5822
- DrChatComponent.ctorParameters = () => [
5823
- { type: ChangeDetectorRef }
5823
+
5824
+ class DrDetailsListModule {
5825
+ }
5826
+ DrDetailsListModule.decorators = [
5827
+ { type: NgModule, args: [{
5828
+ imports: [
5829
+ CommonModule,
5830
+ ],
5831
+ exports: [DrDetailsListComponent],
5832
+ providers: [],
5833
+ declarations: [DrDetailsListComponent],
5834
+ },] }
5835
+ ];
5836
+
5837
+ const ɵ0$1 = {}, ɵ1 = {};
5838
+ class DrDialogModule {
5839
+ }
5840
+ DrDialogModule.decorators = [
5841
+ { type: NgModule, args: [{
5842
+ declarations: [DialogWrapperComponent, DialogModalWrapperComponent],
5843
+ imports: [
5844
+ CommonModule,
5845
+ MatDialogModule,
5846
+ DrInputsModule,
5847
+ ReactiveFormsModule,
5848
+ DrTooltipModule,
5849
+ DrDetailsListModule
5850
+ ],
5851
+ exports: [DialogWrapperComponent, DialogModalWrapperComponent],
5852
+ providers: [
5853
+ { provide: MatDialogRef, useValue: ɵ0$1 },
5854
+ { provide: MAT_DIALOG_DATA, useValue: ɵ1 },
5855
+ DialogService
5856
+ ]
5857
+ },] }
5824
5858
  ];
5825
- DrChatComponent.propDecorators = {
5826
- fullScreen: [{ type: Input }],
5827
- title: [{ type: Input }],
5828
- subtitle: [{ type: Input }],
5829
- showClearButton: [{ type: Input }],
5830
- noMessagesPlaceholder: [{ type: Input }],
5831
- contentUpdateSubject: [{ type: Input }],
5832
- scrollBottom: [{ type: Input }],
5833
- suggestions: [{ type: Input }],
5834
- reopen: [{ type: Input }],
5835
- waitForReply: [{ type: Input }],
5836
- messagesContainer: [{ type: ViewChild, args: ['messagesContainer',] }],
5837
- messages: [{ type: ContentChildren, args: [DrChatMessageComponent,] }],
5838
- chatForm: [{ type: ContentChild, args: [DrChatFormComponent,] }],
5839
- clear: [{ type: Output }],
5840
- close: [{ type: Output }],
5841
- suggestionSelect: [{ type: Output }],
5842
- _chatSuggestions: [{ type: ViewChild, args: [DrChatSuggestionsComponent,] }]
5843
- };
5844
5859
 
5845
5860
  /**
5846
5861
  * Chat text message component.
@@ -6223,5 +6238,5 @@ DrBadgeStatusModule.decorators = [
6223
6238
  * Generated bundle index. Do not edit.
6224
6239
  */
6225
6240
 
6226
- export { AnyTagComponent, BadgeStatus, CHAT_MESSAGE_TYPE, CalendarView, ChatMessage, ChatRole, CheckboxComponent, CustomDateFormat, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DayTagComponent, DialogService, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrBadgeStatusModule, DrButtonComponent, DrChatModule, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrScenarioModule, DrSelectComponent, DrSharedUtils, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, IMAGE_TYPES, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SpinnerSize, SpinnerType, TagTypes, TimeframeOption, ToggleButtonMode, TooltipComponent, TooltipPosition, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrChatCustomMessageDirective as ɵba, DrScenarioConfigurationComponent as ɵbb, DrScenarioTagConfigurationComponent as ɵbc, DrBadgeStatusComponent as ɵbd, DrDatePickerComponent as ɵc, DrDatePickerService as ɵd, DrDatePickerWithTimeframeComponent as ɵe, DrDatePickerFormatDirective as ɵf, DrDatePickerCustomHeaderComponent as ɵg, DrShowTimeframePipe as ɵh, DrSelectAddItemComponent as ɵi, TooltipInfoComponent as ɵj, TooltipInfoSimpleComponent as ɵk, TooltipNoBodyComponent as ɵl, TooltipProcessDefaultComponent as ɵm, DrDynamicTagModule as ɵn, DrDynamicTagComponent as ɵo, StepperComponent as ɵp, DialogWrapperComponent as ɵq, DialogModalWrapperComponent as ɵr, DrChatComponent as ɵs, DrChatCustomMessageService as ɵt, DrChatMessageComponent as ɵu, DrChatFormComponent as ɵv, DrChatSuggestionsComponent as ɵw, DrChatMessageTextComponent as ɵx, DrChatMessageFileComponent as ɵy, DrDotFlashingComponent as ɵz };
6241
+ export { AnyTagComponent, BadgeStatus, CHAT_MESSAGE_TYPE, CalendarView, ChatMessage, ChatRole, CheckboxComponent, CustomDateFormat, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DateTags, DayTagComponent, DialogService, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrBadgeStatusModule, DrButtonComponent, DrChatComponent, DrChatModule, DrDetailsListComponent, DrDetailsListModule, DrDialogModule, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrScenarioModule, DrSelectComponent, DrSharedUtils, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, IMAGE_TYPES, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, Scenario, ScenarioService, SpinnerSize, SpinnerType, TagTypes, TimeframeOption, ToggleButtonMode, TooltipComponent, TooltipPosition, WeekTagComponent, YearTagComponent, components$2 as ɵa, POPUP_ANIMATION as ɵb, DrScenarioConfigurationComponent as ɵba, DrScenarioTagConfigurationComponent as ɵbb, DrBadgeStatusComponent as ɵbc, DrChatCustomMessageService as ɵc, DrChatMessageComponent as ɵd, DrChatFormComponent as ɵe, DrChatSuggestionsComponent as ɵf, DrDatePickerComponent as ɵg, DrDatePickerService as ɵh, DrDatePickerWithTimeframeComponent as ɵi, DrDatePickerFormatDirective as ɵj, DrDatePickerCustomHeaderComponent as ɵk, DrShowTimeframePipe as ɵl, DrSelectAddItemComponent as ɵm, TooltipInfoComponent as ɵn, TooltipInfoSimpleComponent as ɵo, TooltipNoBodyComponent as ɵp, TooltipProcessDefaultComponent as ɵq, DrDynamicTagModule as ɵr, DrDynamicTagComponent as ɵs, StepperComponent as ɵt, DialogWrapperComponent as ɵu, DialogModalWrapperComponent as ɵv, DrChatMessageTextComponent as ɵw, DrChatMessageFileComponent as ɵx, DrDotFlashingComponent as ɵy, DrChatCustomMessageDirective as ɵz };
6227
6242
  //# sourceMappingURL=datarailsshared-datarailsshared.js.map