raise-common-lib 0.0.193 → 0.0.195

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.
Files changed (63) hide show
  1. package/README.md +57 -57
  2. package/bundles/raise-common-lib.umd.js +1664 -1579
  3. package/bundles/raise-common-lib.umd.js.map +1 -1
  4. package/bundles/raise-common-lib.umd.min.js +1 -1
  5. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  6. package/esm2015/lib/dialog/new-action-notification/new-action-notification.component.js +1 -1
  7. package/esm2015/lib/form/drawer-form/drawer-form.component.js +135 -60
  8. package/esm2015/lib/form/richtexteditor/index.component.js +4 -7
  9. package/esm2015/lib/layout/drawer/index.component.js +1 -1
  10. package/esm2015/lib/layout/page-tab/index.component.js +1 -1
  11. package/esm2015/public-api.js +1 -2
  12. package/esm2015/raise-common-lib.js +6 -5
  13. package/esm5/lib/dialog/new-action-notification/new-action-notification.component.js +1 -1
  14. package/esm5/lib/form/drawer-form/drawer-form.component.js +146 -61
  15. package/esm5/lib/form/richtexteditor/index.component.js +4 -7
  16. package/esm5/lib/layout/drawer/index.component.js +1 -1
  17. package/esm5/lib/layout/page-tab/index.component.js +1 -1
  18. package/esm5/public-api.js +1 -2
  19. package/esm5/raise-common-lib.js +6 -5
  20. package/fesm2015/raise-common-lib.js +1483 -1408
  21. package/fesm2015/raise-common-lib.js.map +1 -1
  22. package/fesm5/raise-common-lib.js +1662 -1577
  23. package/fesm5/raise-common-lib.js.map +1 -1
  24. package/lib/form/drawer-form/drawer-form.component.d.ts +10 -5
  25. package/package.json +1 -1
  26. package/public-api.d.ts +0 -1
  27. package/raise-common-lib.d.ts +4 -3
  28. package/raise-common-lib.metadata.json +1 -1
  29. package/src/assets/img/arrow_right.svg +4 -4
  30. package/src/assets/img/calendar-disabled.svg +6 -6
  31. package/src/assets/img/calendar.svg +6 -6
  32. package/src/assets/img/calendar_arrow_left.svg +3 -3
  33. package/src/assets/img/calendar_arrow_right.svg +3 -3
  34. package/src/assets/img/checked-vector.svg +3 -3
  35. package/src/assets/img/dialog-close.svg +4 -4
  36. package/src/assets/img/dialog-grow.svg +6 -6
  37. package/src/assets/img/dialog-shrink.svg +6 -6
  38. package/src/assets/img/plus.svg +4 -4
  39. package/src/assets/img/search.svg +4 -4
  40. package/src/assets/img/shrink-icon.svg +6 -6
  41. package/src/assets/img/time-disabled.svg +4 -4
  42. package/src/assets/img/time.svg +4 -4
  43. package/src/assets/img/toolbar-action-addFolder.svg +17 -17
  44. package/src/assets/img/toolbar-action-calculator.svg +11 -11
  45. package/src/assets/img/toolbar-action-collapse.svg +7 -7
  46. package/src/assets/img/toolbar-action-combine.svg +4 -4
  47. package/src/assets/img/toolbar-action-edit.svg +4 -4
  48. package/src/assets/img/toolbar-action-expand.svg +7 -7
  49. package/src/assets/img/toolbar-action-folderMove.svg +8 -8
  50. package/src/assets/img/toolbar-action-lock.svg +6 -6
  51. package/src/assets/img/toolbar-action-preview.svg +7 -7
  52. package/src/assets/img/toolbar-action-publish.svg +5 -5
  53. package/src/assets/img/toolbar-action-reminders.svg +10 -10
  54. package/src/assets/img/toolbar-action-rename.svg +7 -7
  55. package/src/assets/img/toolbar-action-saveSequence.svg +5 -5
  56. package/src/assets/img/toolbar-action-send-file.svg +5 -5
  57. package/src/assets/img/toolbar-action-settle.svg +7 -7
  58. package/src/assets/img/toolbar-action-share.svg +5 -5
  59. package/src/assets/img/toolbar-action-submitForApproval.svg +4 -4
  60. package/src/assets/img/toolbar-action-sync.svg +4 -4
  61. package/src/assets/img/toolbar-action-template.svg +6 -6
  62. package/src/assets/img/toolbar-action-workflow.svg +9 -9
  63. package/src/assets/style/reset/grid.scss +2 -1
@@ -15,22 +15,22 @@ import { setCulture, L10n } from '@syncfusion/ej2-base';
15
15
  import ResizeObserver from 'resize-observer-polyfill';
16
16
  import { Query } from '@syncfusion/ej2-data';
17
17
  import moment from 'moment';
18
- import { DropDownListModule, DropDownTreeModule, MultiSelectAllModule, AutoCompleteModule, ListBoxModule } from '@syncfusion/ej2-angular-dropdowns';
19
- import { RichTextEditorAllModule, HtmlEditorService, ToolbarService as ToolbarService$2 } from '@syncfusion/ej2-angular-richtexteditor';
20
- import { SwitchModule, CheckBoxModule, RadioButtonModule, ButtonModule, ChipListModule } from '@syncfusion/ej2-angular-buttons';
21
- import { DropDownButton, DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
22
- import { TooltipModule, DialogModule } from '@syncfusion/ej2-angular-popups';
23
18
  import { MatIconRegistry, MatIconModule } from '@angular/material/icon';
24
19
  import { DomSanitizer } from '@angular/platform-browser';
25
20
  import { ReactiveFormsModule, FormsModule } from '@angular/forms';
26
21
  import { CommonModule } from '@angular/common';
22
+ import { SwitchModule, CheckBoxModule, RadioButtonModule, ButtonModule, ChipListModule } from '@syncfusion/ej2-angular-buttons';
27
23
  import { DiagramModule } from '@syncfusion/ej2-angular-diagrams';
24
+ import { TooltipModule, DialogModule } from '@syncfusion/ej2-angular-popups';
28
25
  import { DatePickerModule, DateRangePickerModule, DateTimePickerModule } from '@syncfusion/ej2-angular-calendars';
29
26
  import { TextBoxModule, ColorPickerModule, UploaderModule, NumericTextBoxModule } from '@syncfusion/ej2-angular-inputs';
27
+ import { DropDownListModule, DropDownTreeModule, MultiSelectAllModule, AutoCompleteModule, ListBoxModule } from '@syncfusion/ej2-angular-dropdowns';
30
28
  import { PivotViewAllModule, PivotFieldListAllModule } from '@syncfusion/ej2-angular-pivotview';
31
29
  import { ChartAllModule, AccumulationChartAllModule, RangeNavigatorAllModule, AccumulationChartModule, PieSeriesService, AccumulationLegendService, AccumulationTooltipService, AccumulationAnnotationService, AccumulationDataLabelService } from '@syncfusion/ej2-angular-charts';
32
30
  import { DashboardLayoutModule } from '@syncfusion/ej2-angular-layouts';
33
31
  import { PdfViewerModule, LinkAnnotationService, BookmarkViewService, MagnificationService, ThumbnailViewService, ToolbarService as ToolbarService$1, NavigationService, TextSearchService, TextSelectionService, PrintService } from '@syncfusion/ej2-angular-pdfviewer';
32
+ import { DropDownButton, DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
33
+ import { RichTextEditorAllModule, HtmlEditorService, ToolbarService as ToolbarService$2 } from '@syncfusion/ej2-angular-richtexteditor';
34
34
  import { MatMenuModule } from '@angular/material/menu';
35
35
  import { MatTooltipModule } from '@angular/material/tooltip';
36
36
 
@@ -1780,7 +1780,7 @@ var NewActionNotificationComponent = /** @class */ (function () {
1780
1780
  { type: Component, args: [{
1781
1781
  selector: "kt-new-action-notification",
1782
1782
  template: "<div class=\"new-action-notification-container\" [attr.data-collapse]=\"collapsed\">\r\n\t<span\r\n\t\tclass=\"notification-icon\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t[attr.data-status]=\"config.status?.toLowerCase()\"\r\n\t\t(click)=\"expandNotification()\"\r\n\t></span>\r\n\t<span\r\n\t\tclass=\"notification-icon notification-loading\"\r\n\t\t*ngIf=\"config.type === 'Progress'\"\r\n\t></span>\r\n\t<div class=\"notification-content\">\r\n\t\t<span *ngIf=\"config.type === 'Detail'\" class=\"notification-title\">\r\n\t\t\t{{ config.title }}\r\n\t\t</span>\r\n\t\t<span class=\"notification-text\">{{ config.message }}</span>\r\n\t\t<a *ngIf=\"config.type === 'Detail'\" class=\"notification-link\">View</a>\r\n\t</div>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"notification-close\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t(click)=\"closeNotification()\"\r\n\t></button>\r\n</div>\r\n",
1783
- styles: ["::ng-deep .new-action-notification{margin:0;padding:64px 12px;background-color:transparent!important;background-image:none!important;box-shadow:none}::ng-deep .mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:none;background-color:transparent}.new-action-notification-container{min-width:320px;max-width:400px;padding:12px;border-radius:10px;background-color:#fff;box-shadow:0 0 8px 0 #00000033;display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-end}.new-action-notification-container .notification-icon{flex:none;width:24px;height:24px;margin-right:8px}.new-action-notification-container .notification-icon[data-type=default][data-status=success]::before{content:url(../../assets/img/notification-status-success.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=warning]::before{content:url(../../assets/img/notification-status-warning.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=error]::before{content:url(../../assets/img/notification-status-error.svg)}.new-action-notification-container .notification-icon[data-type=loading]{-webkit-animation:2s linear infinite rotate;animation:2s linear infinite rotate}@-webkit-keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}.new-action-notification-container .notification-icon[data-type=loading]::before{content:url(../../assets/img/notification-status-loading.svg)}.new-action-notification-container .notification-close{flex:none;height:24px;margin-left:24px;padding:0;border:none;background-color:transparent}.new-action-notification-container .notification-close[data-type=default]::before{content:url(../../assets/img/notification-close.svg)}.new-action-notification-container .notification-close[data-type=loading]::before{content:url(../../assets/img/notification-collapse.svg)}.new-action-notification-container .notification-content{flex:auto;min-height:24px;padding-top:4px;display:flex;flex-flow:column nowrap}.new-action-notification-container .notification-content .notification-title{margin-bottom:8px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:19px}.new-action-notification-container .notification-content .notification-text{color:#1f3f5c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.new-action-notification-container .notification-content .notification-link{margin-top:6px;cursor:pointer;color:#1364b3;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px}.new-action-notification-container[data-collapse=true]{padding:0;background-color:transparent;box-shadow:none}.new-action-notification-container[data-collapse=true] .notification-icon{cursor:pointer}.new-action-notification-container[data-collapse=true] .notification-close,.new-action-notification-container[data-collapse=true] .notification-content{display:none}"]
1783
+ styles: ["::ng-deep .new-action-notification{margin:0;padding:64px 12px;background-color:transparent!important;background-image:none!important;box-shadow:none}::ng-deep .mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:none;background-color:transparent}.new-action-notification-container{min-width:320px;max-width:400px;padding:12px;border-radius:10px;background-color:#fff;box-shadow:0 0 8px 0 #00000033;display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-end}.new-action-notification-container .notification-icon{flex:none;width:24px;height:24px;margin-right:8px}.new-action-notification-container .notification-icon[data-type=default][data-status=success]::before{content:url(../../../assets/img/notification-status-success.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=warning]::before{content:url(../../../assets/img/notification-status-warning.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=error]::before{content:url(../../../assets/img/notification-status-error.svg)}.new-action-notification-container .notification-icon[data-type=loading]{-webkit-animation:2s linear infinite rotate;animation:2s linear infinite rotate}@-webkit-keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}.new-action-notification-container .notification-icon[data-type=loading]::before{content:url(../../../assets/img/notification-status-loading.svg)}.new-action-notification-container .notification-close{flex:none;height:24px;margin-left:24px;padding:0;border:none;background-color:transparent}.new-action-notification-container .notification-close[data-type=default]::before{content:url(../../../assets/img/notification-close.svg)}.new-action-notification-container .notification-close[data-type=loading]::before{content:url(../../../assets/img/notification-collapse.svg)}.new-action-notification-container .notification-content{flex:auto;min-height:24px;padding-top:4px;display:flex;flex-flow:column nowrap}.new-action-notification-container .notification-content .notification-title{margin-bottom:8px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:19px}.new-action-notification-container .notification-content .notification-text{color:#1f3f5c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.new-action-notification-container .notification-content .notification-link{margin-top:6px;cursor:pointer;color:#1364b3;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px}.new-action-notification-container[data-collapse=true]{padding:0;background-color:transparent;box-shadow:none}.new-action-notification-container[data-collapse=true] .notification-icon{cursor:pointer}.new-action-notification-container[data-collapse=true] .notification-close,.new-action-notification-container[data-collapse=true] .notification-content{display:none}"]
1784
1784
  }] }
1785
1785
  ];
1786
1786
  /** @nocollapse */
@@ -2880,7 +2880,7 @@ var RsPageTabComponent = /** @class */ (function () {
2880
2880
  { type: Component, args: [{
2881
2881
  selector: "rs-page-tab",
2882
2882
  template: "<div class=\"rs-page-list-wrap\">\r\n <ng-container *ngIf=\"customPageTitle; else defaultTitle\">\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultTitle>\r\n <div class=\"rs-page-title\" *ngIf=\"pageTitle\">{{ pageTitle }}</div>\r\n </ng-template>\r\n <ejs-tab\r\n class=\"rs-tab\"\r\n #tabObj\r\n (selected)=\"onTabClick($event)\"\r\n [animation]=\"animation\"\r\n\t overflowMode=\"Popup\"\r\n heightAdjustMode=\"None\"\r\n [selectedItem]=\"selectedItemIndex\"\r\n >\r\n <e-tabitems>\r\n <e-tabitem *ngFor=\"let item of tabList\">\r\n <ng-template #headerText>\r\n <div>{{ item.title }}</div>\r\n </ng-template>\r\n </e-tabitem>\r\n </e-tabitems>\r\n </ejs-tab>\r\n <div class=\"rs-grid-wrap\">\r\n <ng-content select=\"[tabContentSlot]\"></ng-content>\r\n </div>\r\n</div>\r\n",
2883
- styles: [".rs-page-list-wrap{height:100%;display:flex;flex-direction:column;position:relative;margin:0 auto;max-width:1885px}.rs-page-list-wrap .rs-page-title{font-family:var(--rs-font-family);font-size:var(--rs-page-title-font-size);font-weight:700;text-align:left;color:var(--rs-page-title-color);display:flex;align-items:center;padding:16px 8px 12px 20px}.rs-page-list-wrap .rs-tab{padding:0 20px}.rs-page-list-wrap .rs-tab .e-tab-header::before{display:none}.rs-page-list-wrap .rs-tab .e-toolbar-items{gap:32px;min-height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item{border:0}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap{padding:0;border:0;position:relative;height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap::before{content:\" \";position:absolute;left:0;bottom:0;width:100%;height:2px;background-color:transparent}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-text{color:#5f6f81;font-family:Arial;font-size:13px;font-style:normal;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap::before{background-color:#1f7bff}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-text{color:#44566c}.rs-page-list-wrap .rs-tab .e-hor-nav{width:24px;height:24px;min-height:24px;top:3px;border-radius:4px;background-color:transparent!important;border:1px solid #eaedf0!important}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons{box-shadow:none;background-color:transparent!important;border-color:transparent!important;background-image:url(../../assets/img/icon-more.svg);background-size:14px 3px;background-repeat:no-repeat;background-position:4px 14px}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons::before{display:none}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons:hover{background-color:#eff5fb!important;border-color:#b1d0fc!important;background-image:url(../../assets/img/icon-more-active.svg)}.rs-page-list-wrap .rs-tab .e-toolbar-pop{min-width:160px;border-radius:10px;background:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25);padding:8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap{padding:0 8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap .e-tab-text{color:#44566c;font-family:Arial;font-size:13px;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap:hover{border-radius:6px;background:rgba(31,123,255,.05)}.rs-page-list-wrap .rs-grid-wrap{flex:1;height:0}"]
2883
+ styles: [".rs-page-list-wrap{height:100%;display:flex;flex-direction:column;position:relative;margin:0 auto;max-width:1885px}.rs-page-list-wrap .rs-page-title{font-family:var(--rs-font-family);font-size:var(--rs-page-title-font-size);font-weight:700;text-align:left;color:var(--rs-page-title-color);display:flex;align-items:center;padding:16px 8px 12px 20px}.rs-page-list-wrap .rs-tab{padding:0 20px}.rs-page-list-wrap .rs-tab .e-tab-header::before{display:none}.rs-page-list-wrap .rs-tab .e-toolbar-items{gap:32px;min-height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item{border:0}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap{padding:0;border:0;position:relative;height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap::before{content:\" \";position:absolute;left:0;bottom:0;width:100%;height:2px;background-color:transparent}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-text{color:#5f6f81;font-family:Arial;font-size:13px;font-style:normal;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap::before{background-color:#1f7bff}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-text{color:#44566c}.rs-page-list-wrap .rs-tab .e-hor-nav{width:24px;height:24px;min-height:24px;top:3px;border-radius:4px;background-color:transparent!important;border:1px solid #eaedf0!important}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons{box-shadow:none;background-color:transparent!important;border-color:transparent!important;background-image:url(../../../assets/img/icon-more.svg);background-size:14px 3px;background-repeat:no-repeat;background-position:4px 14px}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons::before{display:none}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons:hover{background-color:#eff5fb!important;border-color:#b1d0fc!important;background-image:url(../../../assets/img/icon-more-active.svg)}.rs-page-list-wrap .rs-tab .e-toolbar-pop{min-width:160px;border-radius:10px;background:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25);padding:8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap{padding:0 8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap .e-tab-text{color:#44566c;font-family:Arial;font-size:13px;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap:hover{border-radius:6px;background:rgba(31,123,255,.05)}.rs-page-list-wrap .rs-grid-wrap{flex:1;height:0}"]
2884
2884
  }] }
2885
2885
  ];
2886
2886
  RsPageTabComponent.propDecorators = {
@@ -4210,7 +4210,7 @@ var DrawerComponent = /** @class */ (function () {
4210
4210
  { type: Component, args: [{
4211
4211
  selector: "rs-drawer",
4212
4212
  template: "<div #element id=\"rs-drawer-container\" class=\"rs-drawer-container\">\r\n <div class=\"rs-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div\r\n #drawer\r\n class=\"rs-drawer\"\r\n [attr.data-mode]=\"config.mode\"\r\n [attr.data-opened]=\"isOpened ? 'yes' : 'no'\"\r\n [attr.data-animation]=\"useAnimation\"\r\n [hidden]=\"hiddenDrawer\"\r\n (animationend)=\"onAnimationEnd()\"\r\n >\r\n <div class=\"drawer-header\" #header>\r\n <button class=\"drawer-return-button\" (click)=\"hide()\">\r\n <span class=\"drawer-sub-title\" *ngIf=\"config.subTitle\">\r\n {{ config.subTitle }}\r\n </span>\r\n </button>\r\n <div class=\"drawer-title\">{{ config.title }}</div>\r\n <div class=\"drawer-header-slot\" #headerSlot></div>\r\n </div>\r\n <div class=\"drawer-top-slot\" #topSlot></div>\r\n <div class=\"drawer-content-box\">\r\n <div class=\"drawer-content\" #content>\r\n <div class=\"drawer-content-container\">\r\n <ng-template #dynamicComponentContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"drawer-toolbar-slot\" #toolbarSlot></div>\r\n </div>\r\n</div>\r\n",
4213
- styles: [":host{display:block;height:100%}#rs-drawer-container{height:100%}.rs-drawer-container{height:100%;background-color:transparent;overflow:hidden;position:relative}.rs-drawer-container .rs-drawer-content{width:100%;height:100%;overflow:auto;margin-right:0!important}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar{width:5px;height:5px;background:#fff;position:static;z-index:999;border-radius:10px}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar-thumb{background:#eaedf0}.rs-drawer-container .rs-drawer{width:100%;height:100%;border-left:none;background-color:transparent;overflow:visible;pointer-events:none;opacity:0;display:flex;flex-flow:column nowrap;position:absolute;z-index:2;top:0;left:100%}.rs-drawer-container .rs-drawer[data-opened=yes]{left:0;opacity:1}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=yes]{-webkit-animation:.5s ease-in-out drawer-open;animation:.5s ease-in-out drawer-open}@-webkit-keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}@keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=no]{-webkit-animation:.5s ease-in-out drawer-close;animation:.5s ease-in-out drawer-close}@-webkit-keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}@keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}.rs-drawer-container .rs-drawer[hidden]{display:none}.rs-drawer-container .rs-drawer .drawer-header{flex:none;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:content-box;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button{flex:none;display:flex;flex-flow:row nowrap;align-items:center;padding:0;border:none;background-color:transparent;cursor:pointer}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button::before{content:url(../../assets/img/drawer-back.svg);width:24px;height:24px;margin-right:8px;transition:transform 125ms ease-in-out}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button:hover::before{transform:translateX(-2px)}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button .drawer-sub-title{margin-right:12px;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title{flex:none;min-height:14px;padding:0 12px;border-left:1px solid #bdc4ca;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title:empty{padding:0}.rs-drawer-container .rs-drawer .drawer-content-box{flex:auto;height:0;background-color:#f7fafb;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-content{height:100%;padding:0 20px;border:1px solid #ebedf0;border-radius:15px;background-color:#fff;display:flex;flex-flow:column nowrap}.rs-drawer-container .rs-drawer .drawer-content .drawer-content-container{flex:auto;overflow:hidden auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot{flex:none;height:32px;margin-left:auto;display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot:empty{display:none}.rs-drawer-container .rs-drawer .drawer-top-slot{flex:none;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-top-slot:empty{height:var(--drawer-top,0);pointer-events:none}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header{height:46px;padding:0 12px 0 8px;background-color:#f7fafb}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-title{color:#1f3f5c;font-size:15px;font-weight:700;line-height:18px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content{padding-bottom:20px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-top-slot:empty+.drawer-content-box{padding-top:calc((var(--drawer-top,0) + 1) * 16px)}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header{height:24px;padding:6px 0;border-bottom:1px solid #eaedf0}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{color:#44566c;font-size:12px;line-height:14px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{font-weight:700}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px;padding-left:8px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot{width:100%;padding:16px 0;box-sizing:content-box;border-top:1px solid #eaedf0}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar]{display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;gap:12px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;gap:6px;min-width:80px;height:32px;padding:0 12px;border:1px solid #adb5bd;border-radius:4px;background-color:#fff;cursor:pointer;color:#44566c;font-size:13px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:hover{border-color:#6c7c90}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:disabled{opacity:1!important;border-color:#6c7c9066;color:#44566c66;cursor:unset}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary{border:none;background-color:#1364b3;color:#fff}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:hover{background-color:#176bca}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:disabled{background-color:#1364b366}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button img{width:16px;height:16px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=outer] .drawer-toolbar-slot [drawer-toolbar] button{height:26px;font-size:12px;line-height:14px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot [drawer-toolbar] button img{display:none}"]
4213
+ styles: [":host{display:block;height:100%}#rs-drawer-container{height:100%}.rs-drawer-container{height:100%;background-color:transparent;overflow:hidden;position:relative}.rs-drawer-container .rs-drawer-content{width:100%;height:100%;overflow:auto;margin-right:0!important}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar{width:5px;height:5px;background:#fff;position:static;z-index:999;border-radius:10px}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar-thumb{background:#eaedf0}.rs-drawer-container .rs-drawer{width:100%;height:100%;border-left:none;background-color:transparent;overflow:visible;pointer-events:none;opacity:0;display:flex;flex-flow:column nowrap;position:absolute;z-index:2;top:0;left:100%}.rs-drawer-container .rs-drawer[data-opened=yes]{left:0;opacity:1}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=yes]{-webkit-animation:.5s ease-in-out drawer-open;animation:.5s ease-in-out drawer-open}@-webkit-keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}@keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=no]{-webkit-animation:.5s ease-in-out drawer-close;animation:.5s ease-in-out drawer-close}@-webkit-keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}@keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}.rs-drawer-container .rs-drawer[hidden]{display:none}.rs-drawer-container .rs-drawer .drawer-header{flex:none;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:content-box;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button{flex:none;display:flex;flex-flow:row nowrap;align-items:center;padding:0;border:none;background-color:transparent;cursor:pointer}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button::before{content:url(../../../assets/img/drawer-back.svg);width:24px;height:24px;margin-right:8px;transition:transform 125ms ease-in-out}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button:hover::before{transform:translateX(-2px)}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button .drawer-sub-title{margin-right:12px;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title{flex:none;min-height:14px;padding:0 12px;border-left:1px solid #bdc4ca;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title:empty{padding:0}.rs-drawer-container .rs-drawer .drawer-content-box{flex:auto;height:0;background-color:#f7fafb;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-content{height:100%;padding:0 20px;border:1px solid #ebedf0;border-radius:15px;background-color:#fff;display:flex;flex-flow:column nowrap}.rs-drawer-container .rs-drawer .drawer-content .drawer-content-container{flex:auto;overflow:hidden auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot{flex:none;height:32px;margin-left:auto;display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot:empty{display:none}.rs-drawer-container .rs-drawer .drawer-top-slot{flex:none;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-top-slot:empty{height:var(--drawer-top,0);pointer-events:none}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header{height:46px;padding:0 12px 0 8px;background-color:#f7fafb}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-title{color:#1f3f5c;font-size:15px;font-weight:700;line-height:18px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content{padding-bottom:20px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-top-slot:empty+.drawer-content-box{padding-top:calc((var(--drawer-top,0) + 1) * 16px)}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header{height:24px;padding:6px 0;border-bottom:1px solid #eaedf0}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{color:#44566c;font-size:12px;line-height:14px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{font-weight:700}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px;padding-left:8px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot{width:100%;padding:16px 0;box-sizing:content-box;border-top:1px solid #eaedf0}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar]{display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;gap:12px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;gap:6px;min-width:80px;height:32px;padding:0 12px;border:1px solid #adb5bd;border-radius:4px;background-color:#fff;cursor:pointer;color:#44566c;font-size:13px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:hover{border-color:#6c7c90}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:disabled{opacity:1!important;border-color:#6c7c9066;color:#44566c66;cursor:unset}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary{border:none;background-color:#1364b3;color:#fff}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:hover{background-color:#176bca}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:disabled{background-color:#1364b366}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button img{width:16px;height:16px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=outer] .drawer-toolbar-slot [drawer-toolbar] button{height:26px;font-size:12px;line-height:14px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot [drawer-toolbar] button img{display:none}"]
4214
4214
  }] }
4215
4215
  ];
4216
4216
  /** @nocollapse */
@@ -22237,9 +22237,12 @@ var EmailPattern = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:
22237
22237
  * Generated from: lib/form/drawer-form/drawer-form.component.ts
22238
22238
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22239
22239
  */
22240
+ /** @type {?} */
22241
+ var FORM_PROXY_TAG = Symbol.for("form-proxy");
22240
22242
  var DrawerFormComponent = /** @class */ (function () {
22241
22243
  function DrawerFormComponent(ref) {
22242
22244
  this.ref = ref;
22245
+ this._form = {};
22243
22246
  this._sections = [];
22244
22247
  this.optionsMap = {};
22245
22248
  this.formDisabled = false;
@@ -22251,12 +22254,14 @@ var DrawerFormComponent = /** @class */ (function () {
22251
22254
  groupBy: null,
22252
22255
  };
22253
22256
  this.showFilterNumber = 10;
22254
- this.form = {};
22257
+ this.dateFormat = "yyyy-MM-dd";
22255
22258
  this.formChange = new EventEmitter();
22256
22259
  this.fieldChange = new EventEmitter();
22257
22260
  this.sections = [];
22258
- this.filterOptionsMap = {};
22261
+ this.form = {};
22259
22262
  this.fieldValidMap = {};
22263
+ // 存储 datepicker 的值
22264
+ this.dateForm = {};
22260
22265
  this.dateValidMap = {};
22261
22266
  this.scrollIndex = 0;
22262
22267
  this.isClickAnchor = false;
@@ -22277,13 +22282,19 @@ var DrawerFormComponent = /** @class */ (function () {
22277
22282
  * @return {?}
22278
22283
  */
22279
22284
  function (changes) {
22285
+ if (changes._form) {
22286
+ if (!changes._form.currentValue[FORM_PROXY_TAG]) {
22287
+ this.form = this.getFormProxy(changes._form.currentValue);
22288
+ this.formChange.emit(this.form);
22289
+ }
22290
+ if (!changes._form.firstChange) {
22291
+ this.checkFormChange(changes._form.previousValue, changes._form.currentValue);
22292
+ }
22293
+ }
22280
22294
  if (changes._sections) {
22281
22295
  this.sections = filterShowSection(changes._sections.currentValue);
22282
22296
  this.formatForm(this.sections);
22283
22297
  }
22284
- if (changes.form && !changes.form.firstChange) {
22285
- this.checkFormChange(changes.form.previousValue, changes.form.currentValue);
22286
- }
22287
22298
  };
22288
22299
  /**
22289
22300
  * @return {?}
@@ -22415,6 +22426,26 @@ var DrawerFormComponent = /** @class */ (function () {
22415
22426
  }
22416
22427
  }));
22417
22428
  };
22429
+ /**
22430
+ * @param {?} field
22431
+ * @param {?} value
22432
+ * @return {?}
22433
+ */
22434
+ DrawerFormComponent.prototype.syncFormToDateForm = /**
22435
+ * @param {?} field
22436
+ * @param {?} value
22437
+ * @return {?}
22438
+ */
22439
+ function (field, value) {
22440
+ if (value) {
22441
+ /** @type {?} */
22442
+ var date = moment(value);
22443
+ this.dateForm[field.formKey] = date.isValid() ? date.toDate() : null;
22444
+ }
22445
+ else {
22446
+ this.dateForm[field.formKey] = null;
22447
+ }
22448
+ };
22418
22449
  /**
22419
22450
  * @param {?} sections
22420
22451
  * @return {?}
@@ -22435,28 +22466,72 @@ var DrawerFormComponent = /** @class */ (function () {
22435
22466
  * @return {?}
22436
22467
  */
22437
22468
  function (field) {
22438
- if (_this.form[field.formKey] === undefined) {
22439
- switch (field.fieldFormType) {
22440
- case "Text":
22441
- case "Email":
22442
- case "Textarea":
22469
+ switch (field.fieldFormType) {
22470
+ case "Text":
22471
+ case "Email":
22472
+ case "Textarea":
22473
+ if (_this.form[field.formKey] === undefined) {
22443
22474
  _this.form[field.formKey] = "";
22444
- break;
22445
- case "Tags":
22446
- case "Checkbox":
22447
- case "MultiSelect":
22475
+ }
22476
+ break;
22477
+ case "Tags":
22478
+ case "Checkbox":
22479
+ case "MultiSelect":
22480
+ if (!Array.isArray(_this.form[field.formKey])) {
22448
22481
  _this.form[field.formKey] = [];
22449
- break;
22450
- case "Switch":
22451
- _this.form[field.formKey] = false;
22452
- break;
22453
- default:
22482
+ }
22483
+ break;
22484
+ case "Switch":
22485
+ _this.form[field.formKey] = !!_this.form[field.formKey];
22486
+ break;
22487
+ case "Datepicker":
22488
+ _this.syncFormToDateForm(field, _this.form[field.formKey]);
22489
+ break;
22490
+ default:
22491
+ if (_this.form[field.formKey] === undefined) {
22454
22492
  _this.form[field.formKey] = null;
22455
- }
22493
+ }
22456
22494
  }
22457
22495
  }));
22458
22496
  }));
22459
22497
  };
22498
+ /**
22499
+ * @param {?} form
22500
+ * @return {?}
22501
+ */
22502
+ DrawerFormComponent.prototype.getFormProxy = /**
22503
+ * @param {?} form
22504
+ * @return {?}
22505
+ */
22506
+ function (form) {
22507
+ var _this = this;
22508
+ // 现在除了 tag 之外不支持嵌套 form 属性,只对浅层进行处理
22509
+ /** @type {?} */
22510
+ var proxyForm = new Proxy(form, {
22511
+ set: (/**
22512
+ * @param {?} target
22513
+ * @param {?} prop
22514
+ * @param {?} value
22515
+ * @return {?}
22516
+ */
22517
+ function (target, prop, value) {
22518
+ target[prop] = value;
22519
+ /** @type {?} */
22520
+ var field = _this.getField(prop);
22521
+ if (field && field.fieldFormType === "Datepicker") {
22522
+ _this.syncFormToDateForm(field, value);
22523
+ }
22524
+ return true;
22525
+ }),
22526
+ });
22527
+ Object.defineProperty(proxyForm, FORM_PROXY_TAG, {
22528
+ value: true,
22529
+ writable: false,
22530
+ enumerable: false,
22531
+ configurable: false,
22532
+ });
22533
+ return proxyForm;
22534
+ };
22460
22535
  // 表单提交前会触发这个函数
22461
22536
  // 表单提交前会触发这个函数
22462
22537
  /**
@@ -22472,12 +22547,8 @@ var DrawerFormComponent = /** @class */ (function () {
22472
22547
  * @return {?}
22473
22548
  */
22474
22549
  function (value, field) {
22475
- var _a;
22476
- /** @type {?} */
22477
- var newForm = __assign({}, this.form, (_a = {}, _a[field.formKey] = value, _a));
22478
- // 修复错误提示显示 bug,不设置一下有概率拿不到最新的值
22479
- this.form = newForm;
22480
- this.formChange.emit(newForm);
22550
+ this.form[field.formKey] = value;
22551
+ this.formChange.emit(this.form);
22481
22552
  this.fieldChange.emit({ field: field, value: value });
22482
22553
  };
22483
22554
  /**
@@ -22644,13 +22715,14 @@ var DrawerFormComponent = /** @class */ (function () {
22644
22715
  if (!event.isInteracted) {
22645
22716
  return;
22646
22717
  }
22647
- /** @type {?} */
22648
- var value = event.value;
22649
- if (field.fieldFormType === "Datepicker") {
22650
- /** @type {?} */
22651
- var date = moment(value);
22652
- value = date.isValid() ? date.format("YYYY-MM-DD") : null;
22718
+ if (field.fieldFormType !== "Datepicker") {
22719
+ this.onChange(event.value, field);
22720
+ return;
22653
22721
  }
22722
+ console.log("change", event);
22723
+ /** @type {?} */
22724
+ var value = event.value ? moment(event.value).format("YYYY-MM-DD") : null;
22725
+ this.dateForm[field.formKey] = event.value;
22654
22726
  this.onChange(value, field);
22655
22727
  };
22656
22728
  /**
@@ -22678,17 +22750,21 @@ var DrawerFormComponent = /** @class */ (function () {
22678
22750
  * @return {?}
22679
22751
  */
22680
22752
  function (event, field) {
22753
+ var _this = this;
22681
22754
  this.onBlur(field);
22682
- /** @type {?} */
22683
- var $input = event.model.element.querySelector("input");
22684
- if (!$input || !$input.value) {
22685
- delete this.dateValidMap[field.formKey];
22686
- return;
22687
- }
22688
- /** @type {?} */
22689
- var date = moment($input.value);
22690
- this.onChange(date.isValid() ? date.format("YYYY-MM-DD") : null, field);
22691
- this.dateValidMap[field.formKey] = date.isValid();
22755
+ setTimeout((/**
22756
+ * @return {?}
22757
+ */
22758
+ function () {
22759
+ /** @type {?} */
22760
+ var $input = event.model.element.querySelector("input");
22761
+ if ($input && $input.value && !_this.dateForm[field.formKey]) {
22762
+ _this.dateValidMap[field.formKey] = false;
22763
+ }
22764
+ else {
22765
+ delete _this.dateValidMap[field.formKey];
22766
+ }
22767
+ }), 50);
22692
22768
  };
22693
22769
  /**
22694
22770
  * @param {?} field
@@ -22728,23 +22804,24 @@ var DrawerFormComponent = /** @class */ (function () {
22728
22804
  if (event.text) {
22729
22805
  query.where(this.optionFields.text, "contains", event.text, true);
22730
22806
  }
22731
- event.updateData(this.optionsMap[field.optionKey] || [], query);
22807
+ event.updateData(this.getOptions(field), query);
22732
22808
  };
22733
22809
  /**
22734
22810
  * @param {?} field
22735
22811
  * @return {?}
22736
22812
  */
22737
- DrawerFormComponent.prototype.getValue = /**
22813
+ DrawerFormComponent.prototype.getOptions = /**
22738
22814
  * @param {?} field
22739
22815
  * @return {?}
22740
22816
  */
22741
22817
  function (field) {
22742
- if (field.fieldFormType === "Datepicker" && this.form[field.formKey]) {
22743
- /** @type {?} */
22744
- var date = moment(this.form[field.formKey]);
22745
- return date.isValid() ? date.toDate() : null;
22818
+ if (Array.isArray(this.optionsMap[field.optionKey])) {
22819
+ return this.optionsMap[field.optionKey];
22820
+ }
22821
+ if (Array.isArray(this.optionsMap[field.formKey])) {
22822
+ return this.optionsMap[field.formKey];
22746
22823
  }
22747
- return this.form[field.formKey];
22824
+ return [];
22748
22825
  };
22749
22826
  /**
22750
22827
  * @param {?} field
@@ -22865,8 +22942,8 @@ var DrawerFormComponent = /** @class */ (function () {
22865
22942
  DrawerFormComponent.decorators = [
22866
22943
  { type: Component, args: [{
22867
22944
  selector: "rs-drawer-form",
22868
- template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [value]=\"getValue(field)\"\r\n [format]=\"field.format || 'dd-MMM-yyyy'\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
22869
- styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{flex:auto;display:flex;flex-flow:column nowrap;max-width:1576px}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
22945
+ template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format || numberFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"getOptions(field)\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [(value)]=\"dateForm[field.formKey]\"\r\n [format]=\"field.format || dateFormat\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
22946
+ styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{flex:auto;display:flex;flex-flow:column nowrap;max-width:1576px}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
22870
22947
  }] }
22871
22948
  ];
22872
22949
  /** @nocollapse */
@@ -22874,15 +22951,17 @@ var DrawerFormComponent = /** @class */ (function () {
22874
22951
  { type: ChangeDetectorRef }
22875
22952
  ]; };
22876
22953
  DrawerFormComponent.propDecorators = {
22954
+ _form: [{ type: Input, args: ["form",] }],
22877
22955
  _sections: [{ type: Input, args: ["sections",] }],
22878
22956
  optionsMap: [{ type: Input, args: ["optionsMap",] }],
22879
- customTemplate: [{ type: Input, args: ["customTemplate",] }],
22880
- customSectionTemplate: [{ type: Input, args: ["customSectionTemplate",] }],
22881
22957
  formDisabled: [{ type: Input, args: ["disabled",] }],
22882
22958
  showAnchor: [{ type: Input, args: ["showAnchor",] }],
22959
+ customTemplate: [{ type: Input, args: ["customTemplate",] }],
22960
+ customSectionTemplate: [{ type: Input, args: ["customSectionTemplate",] }],
22883
22961
  optionFields: [{ type: Input, args: ["optionFields",] }],
22884
22962
  showFilterNumber: [{ type: Input, args: ["showFilterNumber",] }],
22885
- form: [{ type: Input, args: ["form",] }],
22963
+ numberFormat: [{ type: Input, args: ["numberFormat",] }],
22964
+ dateFormat: [{ type: Input, args: ["dateFormat",] }],
22886
22965
  formChange: [{ type: Output, args: ["formChange",] }],
22887
22966
  fieldChange: [{ type: Output, args: ["fieldChange",] }],
22888
22967
  rootEl: [{ type: ViewChild, args: ["drawerFormEl", { static: false },] }],
@@ -22893,24 +22972,28 @@ var DrawerFormComponent = /** @class */ (function () {
22893
22972
  return DrawerFormComponent;
22894
22973
  }());
22895
22974
  if (false) {
22975
+ /** @type {?} */
22976
+ DrawerFormComponent.prototype._form;
22896
22977
  /** @type {?} */
22897
22978
  DrawerFormComponent.prototype._sections;
22898
22979
  /** @type {?} */
22899
22980
  DrawerFormComponent.prototype.optionsMap;
22900
22981
  /** @type {?} */
22901
- DrawerFormComponent.prototype.customTemplate;
22902
- /** @type {?} */
22903
- DrawerFormComponent.prototype.customSectionTemplate;
22904
- /** @type {?} */
22905
22982
  DrawerFormComponent.prototype.formDisabled;
22906
22983
  /** @type {?} */
22907
22984
  DrawerFormComponent.prototype.showAnchor;
22908
22985
  /** @type {?} */
22986
+ DrawerFormComponent.prototype.customTemplate;
22987
+ /** @type {?} */
22988
+ DrawerFormComponent.prototype.customSectionTemplate;
22989
+ /** @type {?} */
22909
22990
  DrawerFormComponent.prototype.optionFields;
22910
22991
  /** @type {?} */
22911
22992
  DrawerFormComponent.prototype.showFilterNumber;
22912
22993
  /** @type {?} */
22913
- DrawerFormComponent.prototype.form;
22994
+ DrawerFormComponent.prototype.numberFormat;
22995
+ /** @type {?} */
22996
+ DrawerFormComponent.prototype.dateFormat;
22914
22997
  /** @type {?} */
22915
22998
  DrawerFormComponent.prototype.formChange;
22916
22999
  /** @type {?} */
@@ -22930,10 +23013,12 @@ if (false) {
22930
23013
  /** @type {?} */
22931
23014
  DrawerFormComponent.prototype.sections;
22932
23015
  /** @type {?} */
22933
- DrawerFormComponent.prototype.filterOptionsMap;
23016
+ DrawerFormComponent.prototype.form;
22934
23017
  /** @type {?} */
22935
23018
  DrawerFormComponent.prototype.fieldValidMap;
22936
23019
  /** @type {?} */
23020
+ DrawerFormComponent.prototype.dateForm;
23021
+ /** @type {?} */
22937
23022
  DrawerFormComponent.prototype.dateValidMap;
22938
23023
  /** @type {?} */
22939
23024
  DrawerFormComponent.prototype.sectionEls;
@@ -22950,1790 +23035,1790 @@ if (false) {
22950
23035
 
22951
23036
  /**
22952
23037
  * @fileoverview added by tsickle
22953
- * Generated from: lib/form/richtexteditor/ai-config.ts
23038
+ * Generated from: lib/dialog/common-dialog/index.component.ts
22954
23039
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22955
23040
  */
22956
- /**
22957
- * @record
22958
- */
22959
- function AIConfig() { }
23041
+ var CommonDialogComponent = /** @class */ (function () {
23042
+ function CommonDialogComponent(dialogRef) {
23043
+ this.dialogRef = dialogRef;
23044
+ // 隐藏元素相关属性
23045
+ this.hideHeader = false;
23046
+ this.hideCloseIcon = false;
23047
+ this.hideCloseBtn = false;
23048
+ this.hideSaveBtn = false;
23049
+ this.hideDiscardBtn = false;
23050
+ this.saveBtnLabel = "";
23051
+ this.cancelBtnLabel = "";
23052
+ this.discardBtnLabel = "";
23053
+ this.showErrorIcon = false;
23054
+ this.showZoomBtn = false;
23055
+ // 显示相关属性
23056
+ this.dialogStyle = {};
23057
+ this.size = "";
23058
+ this.title = "Dialog";
23059
+ this.loading = false;
23060
+ this.saveEmit = new EventEmitter();
23061
+ this.closeEmit = new EventEmitter();
23062
+ this.defaultSize = "";
23063
+ this.customFooter = false;
23064
+ }
23065
+ /**
23066
+ * @return {?}
23067
+ */
23068
+ CommonDialogComponent.prototype.ngAfterContentInit = /**
23069
+ * @return {?}
23070
+ */
23071
+ function () {
23072
+ this.customFooter = !!this.footerContent;
23073
+ };
23074
+ /**
23075
+ * @return {?}
23076
+ */
23077
+ CommonDialogComponent.prototype.ngOnInit = /**
23078
+ * @return {?}
23079
+ */
23080
+ function () {
23081
+ this.getInfo();
23082
+ };
23083
+ /**
23084
+ * @return {?}
23085
+ */
23086
+ CommonDialogComponent.prototype.onClose = /**
23087
+ * @return {?}
23088
+ */
23089
+ function () {
23090
+ var _this = this;
23091
+ if (this.onCloseRequest) {
23092
+ this.onCloseRequest().then((/**
23093
+ * @param {?} confirmed
23094
+ * @return {?}
23095
+ */
23096
+ function (confirmed) {
23097
+ if (confirmed) {
23098
+ _this.dialogRef.close("close");
23099
+ }
23100
+ }));
23101
+ }
23102
+ else {
23103
+ this.dialogRef.close("close");
23104
+ }
23105
+ };
23106
+ /**
23107
+ * @return {?}
23108
+ */
23109
+ CommonDialogComponent.prototype.onZoom = /**
23110
+ * @return {?}
23111
+ */
23112
+ function () {
23113
+ if (this.size === "largest") {
23114
+ this.size = this.defaultSize; // 恢复到原始大小
23115
+ }
23116
+ else {
23117
+ this.size = "largest"; // 设置为最大化
23118
+ }
23119
+ };
23120
+ /**
23121
+ * @return {?}
23122
+ */
23123
+ CommonDialogComponent.prototype.onSave = /**
23124
+ * @return {?}
23125
+ */
23126
+ function () {
23127
+ this.dialogRef.close("save");
23128
+ };
23129
+ /**
23130
+ * @return {?}
23131
+ */
23132
+ CommonDialogComponent.prototype.onDiscard = /**
23133
+ * @return {?}
23134
+ */
23135
+ function () {
23136
+ this.dialogRef.close("discard");
23137
+ };
23138
+ /**
23139
+ * @private
23140
+ * @return {?}
23141
+ */
23142
+ CommonDialogComponent.prototype.getInfo = /**
23143
+ * @private
23144
+ * @return {?}
23145
+ */
23146
+ function () {
23147
+ this.translation = JSON.parse(localStorage.getItem("translation")) || {};
23148
+ this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
23149
+ this.cancelBtnLabel =
23150
+ this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
23151
+ this.defaultSize = this.size;
23152
+ };
23153
+ CommonDialogComponent.decorators = [
23154
+ { type: Component, args: [{
23155
+ selector: "rs-common-dialog",
23156
+ template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header-btn\" (click)=\"onClose()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button\r\n *ngIf=\"!hideCloseBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideDiscardBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onDiscard()\"\r\n >\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideSaveBtn\"\r\n class=\"e-btn e-primary\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
23157
+ styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
23158
+ }] }
23159
+ ];
23160
+ /** @nocollapse */
23161
+ CommonDialogComponent.ctorParameters = function () { return [
23162
+ { type: MatDialogRef }
23163
+ ]; };
23164
+ CommonDialogComponent.propDecorators = {
23165
+ hideHeader: [{ type: Input }],
23166
+ hideCloseIcon: [{ type: Input }],
23167
+ hideCloseBtn: [{ type: Input }],
23168
+ hideSaveBtn: [{ type: Input }],
23169
+ hideDiscardBtn: [{ type: Input }],
23170
+ saveBtnLabel: [{ type: Input }],
23171
+ cancelBtnLabel: [{ type: Input }],
23172
+ discardBtnLabel: [{ type: Input }],
23173
+ showErrorIcon: [{ type: Input }],
23174
+ showZoomBtn: [{ type: Input }],
23175
+ onCloseRequest: [{ type: Input }],
23176
+ dialogStyle: [{ type: Input }],
23177
+ size: [{ type: Input }],
23178
+ title: [{ type: Input }],
23179
+ loading: [{ type: Input }],
23180
+ saveEmit: [{ type: Output }],
23181
+ closeEmit: [{ type: Output }],
23182
+ footerContent: [{ type: ContentChild, args: ["footerSlot", { static: false },] }]
23183
+ };
23184
+ return CommonDialogComponent;
23185
+ }());
22960
23186
  if (false) {
22961
23187
  /** @type {?} */
22962
- AIConfig.prototype.endpoint;
23188
+ CommonDialogComponent.prototype.translation;
22963
23189
  /** @type {?} */
22964
- AIConfig.prototype.apiKey;
23190
+ CommonDialogComponent.prototype.hideHeader;
22965
23191
  /** @type {?} */
22966
- AIConfig.prototype.deployment;
23192
+ CommonDialogComponent.prototype.hideCloseIcon;
22967
23193
  /** @type {?} */
22968
- AIConfig.prototype.apiVersion;
23194
+ CommonDialogComponent.prototype.hideCloseBtn;
22969
23195
  /** @type {?} */
22970
- AIConfig.prototype.enabled;
22971
- }
22972
- // 从环境配置获取AI配置
22973
- /**
22974
- * @return {?}
22975
- */
22976
- function getAIConfig() {
22977
- return {
22978
- endpoint: "https://aidevused.openai.azure.com/",
22979
- apiKey: "ccba76e279f64653a50ac4fee90afe5c",
22980
- deployment: "gpt-4",
22981
- apiVersion: "2025-01-01-preview",
22982
- enabled: true,
22983
- };
22984
- }
22985
- // 检查配置是否有效
22986
- /**
22987
- * @param {?} config
22988
- * @return {?}
22989
- */
22990
- function isAIConfigValid(config) {
22991
- // 检查是否为aidevused端点且有有效API密钥
22992
- return !!((config.endpoint &&
22993
- config.apiKey &&
22994
- config.deployment &&
22995
- config.enabled &&
22996
- config.endpoint === "https://aidevused.openai.azure.com/" &&
22997
- config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
22998
- );
22999
- }
23000
- // 从后端API获取AI配置(推荐方式)
23001
- /**
23002
- * @return {?}
23003
- * @this {*}
23004
- */
23005
- function getAIConfigFromBackend() {
23006
- return __awaiter(this, void 0, void 0, function () {
23007
- return __generator(this, function (_a) {
23008
- try {
23009
- // 这里应该调用你的后端API来获取AI配置
23010
- // 例如:return await this.http.get('/api/ai-config');
23011
- // 临时返回默认配置
23012
- return [2 /*return*/, getAIConfig()];
23013
- }
23014
- catch (error) {
23015
- console.error("Failed to get AI config from backend:", error);
23016
- return [2 /*return*/, getAIConfig()];
23017
- }
23018
- return [2 /*return*/];
23019
- });
23020
- });
23196
+ CommonDialogComponent.prototype.hideSaveBtn;
23197
+ /** @type {?} */
23198
+ CommonDialogComponent.prototype.hideDiscardBtn;
23199
+ /** @type {?} */
23200
+ CommonDialogComponent.prototype.saveBtnLabel;
23201
+ /** @type {?} */
23202
+ CommonDialogComponent.prototype.cancelBtnLabel;
23203
+ /** @type {?} */
23204
+ CommonDialogComponent.prototype.discardBtnLabel;
23205
+ /** @type {?} */
23206
+ CommonDialogComponent.prototype.showErrorIcon;
23207
+ /** @type {?} */
23208
+ CommonDialogComponent.prototype.showZoomBtn;
23209
+ /** @type {?} */
23210
+ CommonDialogComponent.prototype.onCloseRequest;
23211
+ /** @type {?} */
23212
+ CommonDialogComponent.prototype.dialogStyle;
23213
+ /** @type {?} */
23214
+ CommonDialogComponent.prototype.size;
23215
+ /** @type {?} */
23216
+ CommonDialogComponent.prototype.title;
23217
+ /** @type {?} */
23218
+ CommonDialogComponent.prototype.loading;
23219
+ /** @type {?} */
23220
+ CommonDialogComponent.prototype.saveEmit;
23221
+ /** @type {?} */
23222
+ CommonDialogComponent.prototype.closeEmit;
23223
+ /** @type {?} */
23224
+ CommonDialogComponent.prototype.defaultSize;
23225
+ /** @type {?} */
23226
+ CommonDialogComponent.prototype.footerContent;
23227
+ /** @type {?} */
23228
+ CommonDialogComponent.prototype.customFooter;
23229
+ /** @type {?} */
23230
+ CommonDialogComponent.prototype.dialogRef;
23021
23231
  }
23022
23232
 
23023
23233
  /**
23024
23234
  * @fileoverview added by tsickle
23025
- * Generated from: lib/form/richtexteditor/openapi.ts
23235
+ * Generated from: lib/service/icon-loader.service.ts
23026
23236
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23027
23237
  */
23028
- // import { testAIFunction } from './ai-test';
23029
- // testAIFunction();
23030
- // 使用fetch API发送请求到Azure OpenAI
23031
- /**
23032
- * @param {?} messages
23033
- * @param {?} config
23034
- * @return {?}
23035
- * @this {*}
23036
- */
23037
- function sendAIRequest(messages, config) {
23038
- return __awaiter(this, void 0, void 0, function () {
23039
- var url, url1, response, errorText, data, error_1;
23040
- return __generator(this, function (_a) {
23041
- switch (_a.label) {
23042
- case 0:
23043
- _a.trys.push([0, 5, , 6]);
23044
- url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
23045
- url1 = "" + config.endpoint;
23046
- return [4 /*yield*/, fetch(url, {
23047
- method: 'POST',
23048
- headers: {
23049
- 'Content-Type': 'application/json',
23050
- 'api-key': config.apiKey,
23051
- },
23052
- body: JSON.stringify({
23053
- messages: messages,
23054
- max_tokens: 1000,
23055
- temperature: 0.7,
23056
- top_p: 1,
23057
- frequency_penalty: 0,
23058
- presence_penalty: 0,
23059
- }),
23060
- })];
23061
- case 1:
23062
- response = _a.sent();
23063
- if (!!response.ok) return [3 /*break*/, 3];
23064
- return [4 /*yield*/, response.text()];
23065
- case 2:
23066
- errorText = _a.sent();
23067
- throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
23068
- case 3: return [4 /*yield*/, response.json()];
23069
- case 4:
23070
- data = _a.sent();
23071
- if (!data.choices || !data.choices[0] || !data.choices[0].message) {
23072
- throw new Error('Invalid response format from AI service');
23073
- }
23074
- return [2 /*return*/, data.choices[0].message.content];
23075
- case 5:
23076
- error_1 = _a.sent();
23077
- console.error('AI request failed:', error_1);
23078
- throw error_1;
23079
- case 6: return [2 /*return*/];
23080
- }
23081
- });
23082
- });
23083
- }
23084
- // 备用方案:使用模拟数据(用于开发测试)
23238
+ var IconLoaderService = /** @class */ (function () {
23239
+ function IconLoaderService(registry, domSanitizer) {
23240
+ this.registry = registry;
23241
+ this.domSanitizer = domSanitizer;
23242
+ }
23243
+ /**
23244
+ * @param {?} list
23245
+ * @return {?}
23246
+ */
23247
+ IconLoaderService.prototype.registerIcons = /**
23248
+ * @param {?} list
23249
+ * @return {?}
23250
+ */
23251
+ function (list) {
23252
+ var _this = this;
23253
+ list.forEach((/**
23254
+ * @param {?} __0
23255
+ * @return {?}
23256
+ */
23257
+ function (_a) {
23258
+ var name = _a.name, path = _a.path;
23259
+ _this.registry.addSvgIcon(name, _this.domSanitizer.bypassSecurityTrustResourceUrl(path));
23260
+ }));
23261
+ };
23262
+ IconLoaderService.decorators = [
23263
+ { type: Injectable }
23264
+ ];
23265
+ /** @nocollapse */
23266
+ IconLoaderService.ctorParameters = function () { return [
23267
+ { type: MatIconRegistry },
23268
+ { type: DomSanitizer }
23269
+ ]; };
23270
+ return IconLoaderService;
23271
+ }());
23272
+ if (false) {
23273
+ /**
23274
+ * @type {?}
23275
+ * @private
23276
+ */
23277
+ IconLoaderService.prototype.registry;
23278
+ /**
23279
+ * @type {?}
23280
+ * @private
23281
+ */
23282
+ IconLoaderService.prototype.domSanitizer;
23283
+ }
23284
+
23085
23285
  /**
23086
- * @param {?} subQuery
23087
- * @param {?} promptQuery
23088
- * @return {?}
23286
+ * @fileoverview added by tsickle
23287
+ * Generated from: lib/service/keep-alive.service.ts
23288
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23089
23289
  */
23090
- function getMockAIResponse(subQuery, promptQuery) {
23091
- var e_1, _a;
23092
- /** @type {?} */
23093
- var mockResponses = {
23094
- Rephrase: "Rephrased: " + promptQuery,
23095
- Grammar: "Corrected: " + promptQuery,
23096
- Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
23097
- Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
23098
- Translate: "Translated: " + promptQuery,
23099
- SentimentAnalysis: '😊 Positive',
23290
+ /** @type {?} */
23291
+ var storedRoutes = new Map();
23292
+ /** @type {?} */
23293
+ var toBeDeleteUrl;
23294
+ /** @type {?} */
23295
+ var excludeRoutes = [];
23296
+ // 不需要缓存的url
23297
+ var KeepAliveService = /** @class */ (function () {
23298
+ function KeepAliveService() {
23299
+ }
23300
+ /**
23301
+ * @param {?} routes
23302
+ * @return {?}
23303
+ */
23304
+ KeepAliveService.prototype.setExcludeRoutes = /**
23305
+ * @param {?} routes
23306
+ * @return {?}
23307
+ */
23308
+ function (routes) {
23309
+ excludeRoutes = routes; // 设置不缓存的路由
23100
23310
  };
23101
- try {
23102
- for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
23103
- var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
23104
- if (subQuery.includes(key)) {
23105
- return value;
23311
+ /**
23312
+ * @param {?} route
23313
+ * @return {?}
23314
+ */
23315
+ KeepAliveService.prototype.shouldDetach = /**
23316
+ * @param {?} route
23317
+ * @return {?}
23318
+ */
23319
+ function (route) {
23320
+ /** @type {?} */
23321
+ var config = route.routeConfig;
23322
+ // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
23323
+ if (toBeDeleteUrl === this.getRoutePath(route)) {
23324
+ // 对于新开的又即将关闭的tab,不缓存
23325
+ if (route.children.length === 0) {
23326
+ toBeDeleteUrl = "";
23106
23327
  }
23328
+ return false;
23107
23329
  }
23108
- }
23109
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
23110
- finally {
23111
- try {
23112
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
23330
+ if (config && excludeRoutes.includes(this.getRoutePath(route))) {
23331
+ return false;
23113
23332
  }
23114
- finally { if (e_1) throw e_1.error; }
23115
- }
23116
- return "AI processed: " + promptQuery;
23117
- }
23118
- // 主要的AI请求方法
23119
- /**
23120
- * @param {?} subQuery
23121
- * @param {?} promptQuery
23122
- * @return {?}
23123
- * @this {*}
23124
- */
23125
- function OpenAiModelRTE(subQuery, promptQuery) {
23126
- return __awaiter(this, void 0, void 0, function () {
23127
- var config, messages, result, error_2;
23128
- return __generator(this, function (_a) {
23129
- switch (_a.label) {
23130
- case 0:
23131
- _a.trys.push([0, 2, , 3]);
23132
- config = getAIConfig();
23133
- // 检查配置是否有效
23134
- if (!isAIConfigValid(config)) {
23135
- console.warn('AI configuration is incomplete or disabled, using mock response');
23136
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23137
- }
23138
- messages = [
23139
- {
23140
- role: 'system',
23141
- content: subQuery.includes('emoji followed by the sentiment in the format')
23142
- ? 'You are a helpful assistant. Please respond in string format.'
23143
- : "NOTE: Return same html format just do changes content only. don't change html formats.",
23144
- },
23145
- {
23146
- role: 'user',
23147
- content: subQuery + " " + promptQuery,
23148
- },
23149
- ];
23150
- return [4 /*yield*/, sendAIRequest(messages, config)];
23151
- case 1:
23152
- result = _a.sent();
23153
- return [2 /*return*/, result];
23154
- case 2:
23155
- error_2 = _a.sent();
23156
- console.error('AI request failed, using mock response:', error_2);
23157
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23158
- case 3: return [2 /*return*/];
23159
- }
23160
- });
23161
- });
23162
- }
23163
- // 兼容性方法(保持向后兼容)
23164
- /**
23165
- * @param {?} options
23166
- * @return {?}
23167
- * @this {*}
23168
- */
23169
- function getAzureChatAIRequest(options) {
23170
- return __awaiter(this, void 0, void 0, function () {
23171
- var config, result, err_1;
23172
- return __generator(this, function (_a) {
23173
- switch (_a.label) {
23174
- case 0:
23175
- _a.trys.push([0, 2, , 3]);
23176
- config = getAIConfig();
23177
- if (!isAIConfigValid(config)) {
23178
- return [2 /*return*/, null];
23179
- }
23180
- return [4 /*yield*/, sendAIRequest(options.messages, config)];
23181
- case 1:
23182
- result = _a.sent();
23183
- return [2 /*return*/, result];
23184
- case 2:
23185
- err_1 = _a.sent();
23186
- console.error('Error occurred:', err_1);
23187
- return [2 /*return*/, null];
23188
- case 3: return [2 /*return*/];
23189
- }
23190
- });
23191
- });
23192
- }
23193
- /**
23194
- * @param {?} prompt
23195
- * @return {?}
23196
- * @this {*}
23197
- */
23198
- function getAzureTextAIRequest(prompt) {
23199
- return __awaiter(this, void 0, void 0, function () {
23200
- var config, messages, result, err_2;
23201
- return __generator(this, function (_a) {
23202
- switch (_a.label) {
23203
- case 0:
23204
- _a.trys.push([0, 2, , 3]);
23205
- config = getAIConfig();
23206
- if (!isAIConfigValid(config)) {
23207
- return [2 /*return*/, undefined];
23208
- }
23209
- messages = [
23210
- {
23211
- role: 'user',
23212
- content: prompt,
23213
- },
23214
- ];
23215
- return [4 /*yield*/, sendAIRequest(messages, config)];
23216
- case 1:
23217
- result = _a.sent();
23218
- return [2 /*return*/, result];
23219
- case 2:
23220
- err_2 = _a.sent();
23221
- console.error('Error occurred:', err_2);
23222
- return [2 /*return*/, undefined];
23223
- case 3: return [2 /*return*/];
23224
- }
23225
- });
23226
- });
23227
- }
23228
-
23229
- /**
23230
- * @fileoverview added by tsickle
23231
- * Generated from: lib/form/richtexteditor/data-config.ts
23232
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23233
- */
23234
- // font family
23235
- /** @type {?} */
23236
- var fontFamily = {
23237
- default: "Arial",
23238
- items: [
23239
- {
23240
- text: "Arial",
23241
- value: "Arial, Helvetica, sans-serif",
23242
- cssClass: "e-arial",
23243
- command: "Font",
23244
- subCommand: "FontName",
23245
- },
23246
- {
23247
- text: "Times New Roman",
23248
- value: "Times New Roman,Times,serif",
23249
- cssClass: "e-times-new-roman",
23250
- command: "Font",
23251
- subCommand: "FontName",
23252
- },
23253
- {
23254
- text: "Helvetica",
23255
- value: "Helvetica",
23256
- cssClass: "e-helvetica",
23257
- command: "Font",
23258
- subCommand: "FontName",
23259
- },
23260
- {
23261
- text: "Calibri",
23262
- value: "Calibri, Helvetica, sans-serif",
23263
- cssClass: "e-calibri",
23264
- command: "Font",
23265
- subCommand: "FontName",
23266
- },
23267
- {
23268
- text: "Verdana",
23269
- value: "Verdana,Geneva,sans-serif",
23270
- cssClass: "e-verdana",
23271
- command: "Font",
23272
- subCommand: "FontName",
23273
- },
23274
- {
23275
- text: "Georgia",
23276
- value: "Georgia,serif",
23277
- cssClass: "e-georgia",
23278
- command: "Font",
23279
- subCommand: "FontName",
23280
- },
23281
- {
23282
- text: "Open Sans",
23283
- value: "Open Sans, sans-serif",
23284
- cssClass: "e-open-sans",
23285
- command: "Font",
23286
- subCommand: "FontName",
23287
- },
23288
- {
23289
- text: "Roboto",
23290
- value: "Roboto",
23291
- cssClass: "e-roboto",
23292
- command: "Font",
23293
- subCommand: "FontName",
23294
- },
23295
- {
23296
- text: "Lato",
23297
- value: "Lato, sans-serif",
23298
- cssClass: "e-lato",
23299
- command: "Font",
23300
- subCommand: "FontName",
23301
- },
23302
- {
23303
- text: "Montserrat",
23304
- value: "Montserrat, sans-serif",
23305
- cssClass: "e-montserrat",
23306
- command: "Font",
23307
- subCommand: "FontName",
23308
- },
23309
- {
23310
- text: "Segoe UI",
23311
- value: "Segoe UI",
23312
- cssClass: "e-segoe-ui",
23313
- command: "Font",
23314
- subCommand: "FontName",
23315
- },
23316
- {
23317
- text: "Impact",
23318
- value: "Impact,Charcoal,sans-serif",
23319
- cssClass: "e-impact",
23320
- command: "Font",
23321
- subCommand: "FontName",
23322
- },
23323
- ],
23324
- };
23325
- // line height配置
23326
- /** @type {?} */
23327
- var lineHeight_items = [
23328
- {
23329
- text: "1.0",
23330
- },
23331
- {
23332
- text: "1.15",
23333
- },
23334
- {
23335
- text: "1.5",
23336
- },
23337
- {
23338
- text: "2.0",
23339
- },
23340
- {
23341
- text: "2.5",
23342
- },
23343
- {
23344
- text: "3.0",
23345
- },
23346
- ];
23347
- /**
23348
- * @record
23349
- */
23350
- function BulletStyle() { }
23351
- if (false) {
23352
- /** @type {?} */
23353
- BulletStyle.prototype.id;
23354
- /** @type {?} */
23355
- BulletStyle.prototype.text;
23356
- /** @type {?} */
23357
- BulletStyle.prototype.symbol;
23358
- /** @type {?} */
23359
- BulletStyle.prototype.iconCss;
23360
- /** @type {?} */
23361
- BulletStyle.prototype.description;
23362
- }
23363
- /** @type {?} */
23364
- var BULLET_STYLES = [
23365
- {
23366
- id: "disc",
23367
- text: "● 实心圆点",
23368
- symbol: "●",
23369
- iconCss: "e-icons e-bullet-disc",
23370
- description: "标准实心圆点",
23371
- },
23372
- {
23373
- id: "circle",
23374
- text: "○ 空心圆点",
23375
- symbol: "○",
23376
- iconCss: "e-icons e-bullet-circle",
23377
- description: "空心圆点",
23378
- },
23379
- {
23380
- id: "square",
23381
- text: "■ 实心方块",
23382
- symbol: "■",
23383
- iconCss: "e-icons e-bullet-square",
23384
- description: "实心方块",
23385
- },
23386
- {
23387
- id: "diamond",
23388
- text: "◆ 实心菱形",
23389
- symbol: "◆",
23390
- iconCss: "e-icons e-bullet-diamond",
23391
- description: "实心菱形",
23392
- },
23393
- {
23394
- id: "triangle",
23395
- text: "► 实心三角",
23396
- symbol: "►",
23397
- iconCss: "e-icons e-bullet-triangle",
23398
- description: "实心三角形",
23399
- },
23400
- {
23401
- id: "arrow",
23402
- text: "➤ 箭头",
23403
- symbol: "➤",
23404
- iconCss: "e-icons e-bullet-arrow",
23405
- description: "箭头符号",
23406
- },
23407
- {
23408
- id: "star",
23409
- text: "★ 星形",
23410
- symbol: "★",
23411
- iconCss: "e-icons e-bullet-star",
23412
- description: "星形符号",
23413
- },
23414
- {
23415
- id: "check",
23416
- text: "✓ 对勾",
23417
- symbol: "✓",
23418
- iconCss: "e-icons e-bullet-check",
23419
- description: "对勾符号",
23420
- },
23421
- {
23422
- id: "heart",
23423
- text: "♥ 心形",
23424
- symbol: "♥",
23425
- iconCss: "e-icons e-bullet-heart",
23426
- description: "心形符号",
23427
- },
23428
- {
23429
- id: "bullet",
23430
- text: "• 小圆点",
23431
- symbol: "•",
23432
- iconCss: "e-icons e-bullet-bullet",
23433
- description: "小圆点",
23434
- },
23435
- ];
23436
- // 获取符号样式
23437
- /**
23438
- * @param {?} id
23439
- * @return {?}
23440
- */
23441
- function getBulletStyle(id) {
23442
- return BULLET_STYLES.find((/**
23443
- * @param {?} style
23444
- * @return {?}
23445
- */
23446
- function (style) { return style.id === id; }));
23447
- }
23448
- // 获取所有符号样式
23449
- /**
23450
- * @return {?}
23451
- */
23452
- function getAllBulletStyles() {
23453
- return BULLET_STYLES;
23454
- }
23455
- // 应用符号样式到列表
23456
- /**
23457
- * @param {?} ul
23458
- * @param {?} style
23459
- * @return {?}
23460
- */
23461
- function applyBulletStyle(ul, style) {
23462
- if (style.id === "disc" || style.id === "circle" || style.id === "square") {
23463
- // 使用CSS list-style-type
23464
- ul.style.listStyleType = style.id;
23465
- // 移除自定义符号
23466
- ul.querySelectorAll(".custom-bullet").forEach((/**
23467
- * @param {?} bullet
23468
- * @return {?}
23469
- */
23470
- function (bullet) { return bullet.remove(); }));
23471
- }
23472
- else {
23473
- // 使用自定义符号
23474
- ul.style.listStyleType = "none";
23475
- ul.setAttribute("data-bullet-style", style.id);
23476
- /** @type {?} */
23477
- var listItems = ul.querySelectorAll("li");
23478
- listItems.forEach((/**
23479
- * @param {?} li
23480
- * @return {?}
23481
- */
23482
- function (li) {
23483
- // 移除现有的自定义符号
23484
- /** @type {?} */
23485
- var existingBullet = li.querySelector(".custom-bullet");
23486
- if (existingBullet) {
23487
- existingBullet.remove();
23488
- }
23489
- // 添加新的自定义符号
23490
- /** @type {?} */
23491
- var bullet = document.createElement("span");
23492
- bullet.className = "custom-bullet";
23493
- bullet.textContent = style.symbol;
23494
- bullet.style.marginRight = "8px";
23495
- bullet.style.color = "#666";
23496
- // 将符号插入到列表项的开头
23497
- li.insertBefore(bullet, li.firstChild);
23498
- }));
23499
- }
23500
- }
23501
-
23502
- /**
23503
- * @fileoverview added by tsickle
23504
- * Generated from: lib/form/richtexteditor/index.component.ts
23505
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23506
- */
23507
- var RichtexteditorComponent = /** @class */ (function () {
23508
- function RichtexteditorComponent(ref) {
23509
- this.ref = ref;
23510
- // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
23511
- this.placeholder = "";
23512
- this.value = "";
23513
- this.height = 150;
23514
- this.autoSaveOnIdle = true;
23515
- this.target = "#container"; // dialog 弹窗父级
23516
- // dialog 弹窗父级
23517
- this.toolbarClick = new EventEmitter();
23518
- this.change = new EventEmitter();
23519
- // @Output() change = new EventEmitter();
23520
- this.family = fontFamily;
23521
- this.dialogWidth = "800px";
23522
- this.dialogHeight = "642px";
23523
- this.showZoomBtn = true;
23524
- this.showMsg = false;
23525
- this.insertImageSettings = {
23526
- saveFormat: "Blob",
23527
- allowedTypes: [".svg", ".png"],
23528
- display: "none",
23529
- };
23530
- this.size = "";
23531
- this.dropValIndex = 0;
23532
- this.queryList = [
23533
- { id: "Rephrase", text: "Rephrase" },
23534
- { id: "Grammar", text: "Correct Grammar" },
23535
- { id: "Summarize", text: "Summarize" },
23536
- { id: "Elaborate", text: "Elaborate" },
23537
- { id: "Translate", text: "Translate" },
23538
- { id: "SentimentAnalysis", text: "Sentiment Analysis" },
23539
- ];
23540
- this.rephraseTyleList = [
23541
- { text: "Standard", id: "Standard" },
23542
- { text: "Fluent", id: "Fluent" },
23543
- { text: "Professional", id: "Professional" },
23544
- ];
23545
- this.languageList = [
23546
- { id: "EN", text: "English" },
23547
- { id: "ZH", text: "Chinese (Simplified)" },
23548
- { id: "ES", text: "Spanish" },
23549
- { id: "ZHT", text: "Chinese (Traditional)" },
23550
- { id: "HI", text: "Hindi" },
23551
- { id: "AR", text: "Arabic" },
23552
- { id: "BN", text: "Bengali" },
23553
- { id: "PT", text: "Portuguese" },
23554
- { id: "RU", text: "Russian" },
23555
- { id: "JA", text: "Japanese" },
23556
- { id: "DE", text: "German" },
23557
- { id: "KO", text: "Korean" },
23558
- { id: "FR", text: "French" },
23559
- { id: "IT", text: "Italian" },
23560
- { id: "TR", text: "Turkish" },
23561
- ];
23562
- this.promptQuery = "";
23563
- this.isSentimentCheck = false;
23564
- this.subQuery = "";
23565
- this.chipValue = "Standard";
23566
- this.tools = {
23567
- enableFloating: false,
23568
- items: [
23569
- {
23570
- tooltipText: "AI Assist",
23571
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="ai_assistant_button_tbar" style="width:100%"><div class="e-rte-dropdown-btn-text">AI Assist</div></button>',
23572
- },
23573
- "Bold",
23574
- "Italic",
23575
- "Underline",
23576
- "StrikeThrough",
23577
- "FontName",
23578
- "FontSize",
23579
- "FontColor",
23580
- "BackgroundColor",
23581
- "LowerCase",
23582
- "UpperCase",
23583
- "|",
23584
- "CreateTable",
23585
- "Formats",
23586
- "Alignments",
23587
- {
23588
- tooltipText: "Line Height",
23589
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
23590
- },
23591
- "OrderedList",
23592
- "UnorderedList",
23593
- "Outdent",
23594
- "Indent",
23595
- "|",
23596
- "CreateLink",
23597
- {
23598
- tooltipText: "",
23599
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
23600
- '<div class="e-tbar-btn-text" style="font-weight: 500;"><img src="/assets/img/file-icon.svg" style="position: relative;top: -2px;"/><div class="uploadActions"><div id="uploadFromUser">Computer File</div><div id="relationDom">Ticket Attachment</div></div></div></button>',
23601
- },
23602
- "|",
23603
- "FormatPainter",
23604
- "ClearFormat",
23605
- "|",
23606
- "Undo",
23607
- "Redo",
23608
- ],
23609
- };
23610
- }
23611
- /**
23612
- * @return {?}
23613
- */
23614
- RichtexteditorComponent.prototype.ngOnInit = /**
23615
- * @return {?}
23616
- */
23617
- function () { };
23618
- /**
23619
- * @param {?} args
23620
- * @return {?}
23621
- */
23622
- RichtexteditorComponent.prototype.onContentChange = /**
23623
- * @param {?} args
23624
- * @return {?}
23625
- */
23626
- function (args) {
23627
- /** @type {?} */
23628
- var tables = document.querySelectorAll("table.e-rte-table");
23629
- tables.forEach((/**
23630
- * @param {?} table
23631
- * @return {?}
23632
- */
23633
- function (table) {
23634
- /** @type {?} */
23635
- var htmlTable = (/** @type {?} */ (table));
23636
- htmlTable.style.marginBottom = "10px";
23637
- htmlTable.style.borderCollapse = "collapse";
23638
- htmlTable.style.emptyCells = "show";
23639
- /** @type {?} */
23640
- var tdElements = table.querySelectorAll("td");
23641
- tdElements.forEach((/**
23642
- * @param {?} td
23643
- * @return {?}
23644
- */
23645
- function (td) {
23646
- td.style.border = "1px solid #adb5bd";
23647
- td.style.height = "20px";
23648
- td.style.minWidth = "20px";
23649
- td.style.padding = "2px 5px";
23650
- td.style.boxSizing = "border-box";
23651
- }));
23652
- }));
23653
- this.change.emit(args);
23654
- };
23655
- /**
23656
- * @return {?}
23657
- */
23658
- RichtexteditorComponent.prototype.onCreate = /**
23659
- * @return {?}
23660
- */
23661
- function () {
23662
- var _this = this;
23663
- //bind the a click event
23664
- // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
23665
- // editorContent.addEventListener('click', this.OnClicked.bind(this));
23666
- //add the line height
23667
- this.editorManager = this.rteObj.formatter.editorManager;
23668
- /** @type {?} */
23669
- var splitButton = new DropDownButton({
23670
- items: lineHeight_items,
23671
- iconCss: "e-icons e-line-spacing",
23672
- select: this.onSelect.bind(this),
23673
- });
23674
- splitButton.appendTo("#lineheight_tbar");
23675
- // ai assist
23676
- /** @type {?} */
23677
- var aiassistantButton = new DropDownButton({
23678
- items: this.queryList,
23679
- // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
23680
- select: (/**
23681
- * @param {?} args
23682
- * @return {?}
23683
- */
23684
- function (args) { return _this.aiQuerySelectedMenu(args); }),
23685
- });
23686
- aiassistantButton.appendTo("#ai_assistant_button_tbar");
23333
+ //Don't store lazy loaded routes
23334
+ return config && !config.loadChildren;
23687
23335
  };
23688
23336
  /**
23689
- * @private
23690
- * @param {?} args
23337
+ * @param {?} route
23338
+ * @param {?} handle
23691
23339
  * @return {?}
23692
23340
  */
23693
- RichtexteditorComponent.prototype.onSelect = /**
23694
- * @private
23695
- * @param {?} args
23341
+ KeepAliveService.prototype.store = /**
23342
+ * @param {?} route
23343
+ * @param {?} handle
23696
23344
  * @return {?}
23697
23345
  */
23698
- function (args) {
23699
- if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
23700
- this.rteObj.formatter.saveData();
23701
- }
23346
+ function (route, handle) {
23347
+ // console.log("store", this.getRoutePath(route));
23348
+ // console.log("store", storedRoutes);
23702
23349
  /** @type {?} */
23703
- var nodes = this.editorManager.domNode.blockNodes();
23704
- for (var i = 0; nodes.length > i; i++) {
23705
- ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
23706
- }
23707
- this.rteObj.formatter.saveData();
23708
- this.rteObj.formatter.enableUndo(this.rteObj);
23709
- };
23710
- /**
23711
- * @private
23712
- * @param {?} args
23713
- * @return {?}
23714
- */
23715
- RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
23716
- * @private
23717
- * @param {?} args
23718
- * @return {?}
23719
- */
23720
- function (args) {
23721
- this.dialogueOpen(args.item.text);
23350
+ var key = this.getRoutePath(route);
23351
+ storedRoutes.set(key, handle);
23722
23352
  };
23723
23353
  /**
23724
- * @param {?} selectedQuery
23354
+ * @param {?} route
23725
23355
  * @return {?}
23726
23356
  */
23727
- RichtexteditorComponent.prototype.dialogueOpen = /**
23728
- * @param {?} selectedQuery
23357
+ KeepAliveService.prototype.shouldAttach = /**
23358
+ * @param {?} route
23729
23359
  * @return {?}
23730
23360
  */
23731
- function (selectedQuery) {
23732
- var _this = this;
23361
+ function (route) {
23733
23362
  /** @type {?} */
23734
- var selectionText = this.rteObj.getSelectedHtml();
23735
- this.selectedQuery = selectedQuery;
23736
- if (selectionText) {
23737
- /** @type {?} */
23738
- var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23739
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23740
- this.dropValIndex = this.queryList.findIndex((/**
23741
- * @param {?} q
23742
- * @return {?}
23743
- */
23744
- function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
23745
- this.queryCategory.index = this.dropValIndex;
23746
- this.leftRte.value = this.promptQuery = selectionText;
23747
- this.leftRte.refreshUI();
23748
- this.AIdialog.show();
23749
- this.updateAISugesstionsData(selectedQuery);
23750
- }
23751
- else {
23752
- this.showMsg = true;
23753
- setTimeout((/**
23754
- * @return {?}
23755
- */
23756
- function () {
23757
- _this.showMsg = false;
23758
- }), 3000);
23759
- console.log("Please select the content to perform the AI operation.");
23760
- }
23761
- };
23762
- /**
23763
- * @param {?} selectedQuery
23764
- * @return {?}
23765
- */
23766
- RichtexteditorComponent.prototype.updateAISugesstionsData = /**
23767
- * @param {?} selectedQuery
23768
- * @return {?}
23769
- */
23770
- function (selectedQuery) {
23771
- this.isSentimentCheck = false;
23772
- switch (selectedQuery) {
23773
- case "Summarize":
23774
- this.subQuery = "Summarize the upcoming sentence shortly.";
23775
- break;
23776
- case "Elaborate":
23777
- this.subQuery = "Elaborate on the upcoming sentence.";
23778
- break;
23779
- case "Rephrase":
23780
- this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
23781
- break;
23782
- case "Correct Grammar":
23783
- this.subQuery = "Correct the grammar of the upcoming sentence.";
23784
- break;
23785
- case "Translate":
23786
- this.subQuery =
23787
- "Translate the upcoming sentence to " + this.translatelanguage + ".";
23788
- break;
23789
- case "Sentiment Analysis":
23790
- this.isSentimentCheck = true;
23791
- this.subQuery =
23792
- 'Analyze the sentiment and grammar of the following paragraphs and provide the expression score with an emoji followed by the sentiment in the format: "😊 Neutral". \n\nNOTE: Avoid any additional text or explanation:';
23793
- break;
23794
- }
23795
- this.updateAISugesstions();
23363
+ var key = this.getRoutePath(route);
23364
+ return !!route.routeConfig && storedRoutes.has(key);
23796
23365
  };
23797
23366
  /**
23367
+ * @param {?} route
23798
23368
  * @return {?}
23799
23369
  */
23800
- RichtexteditorComponent.prototype.updateAISugesstions = /**
23370
+ KeepAliveService.prototype.retrieve = /**
23371
+ * @param {?} route
23801
23372
  * @return {?}
23802
23373
  */
23803
- function () {
23804
- var _this = this;
23805
- try {
23806
- if (this.promptQuery) {
23807
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
23808
- "";
23809
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
23810
- "none";
23811
- this.sentimentButton.element.style.display = "none";
23812
- this.regenerateButton.disabled = true;
23813
- this.copyButton.disabled = true;
23814
- this.replaceButton.disabled = true;
23815
- this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
23816
- this.apiResultData.then((/**
23817
- * @param {?} result
23818
- * @return {?}
23819
- */
23820
- function (result) {
23821
- _this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
23822
- _this.sentimentButton.content = result
23823
- .toLowerCase()
23824
- .includes("positive")
23825
- ? "😊 Positive"
23826
- : result.toLowerCase().includes("negative")
23827
- ? "😞 Negative"
23828
- : "😐 Neutral";
23829
- _this.sentimentButton.element.style.display = !_this.isSentimentCheck
23830
- ? "none"
23831
- : "";
23832
- _this.rightRte.value = _this.AIResult;
23833
- /** @type {?} */
23834
- var noResultsFound = !(_this.AIResult || _this.promptQuery);
23835
- ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
23836
- _this.regenerateButton.disabled = noResultsFound;
23837
- _this.copyButton.disabled = noResultsFound;
23838
- _this.replaceButton.disabled = noResultsFound;
23839
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
23840
- "none";
23841
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
23842
- noResultsFound ? "none" : "";
23843
- console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
23844
- // this.ref.markForCheck();
23845
- }));
23846
- }
23847
- }
23848
- catch (_a) {
23849
- // this.toastObj.show();
23374
+ function (route) {
23375
+ /** @type {?} */
23376
+ var config = route.routeConfig;
23377
+ /** @type {?} */
23378
+ var key = this.getRoutePath(route);
23379
+ //We don't store lazy loaded routes, so don't even bother trying to retrieve them
23380
+ if (!config || config.loadChildren) {
23381
+ return false;
23850
23382
  }
23383
+ return storedRoutes.get(key) || null;
23851
23384
  };
23852
23385
  /**
23853
- * @param {?} subQuery
23854
- * @param {?} promptQuery
23855
- * @return {?}
23856
- */
23857
- RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
23858
- * @param {?} subQuery
23859
- * @param {?} promptQuery
23860
- * @return {?}
23861
- */
23862
- function (subQuery, promptQuery) {
23863
- return __awaiter(this, void 0, void 0, function () {
23864
- var content;
23865
- return __generator(this, function (_a) {
23866
- switch (_a.label) {
23867
- case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
23868
- case 1:
23869
- content = _a.sent();
23870
- return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
23871
- }
23872
- });
23873
- });
23874
- };
23875
- /**
23386
+ * @param {?} future
23387
+ * @param {?} curr
23876
23388
  * @return {?}
23877
23389
  */
23878
- RichtexteditorComponent.prototype.dialogShow = /**
23390
+ KeepAliveService.prototype.shouldReuseRoute = /**
23391
+ * @param {?} future
23392
+ * @param {?} curr
23879
23393
  * @return {?}
23880
23394
  */
23881
- function () {
23882
- var _this = this;
23883
- (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
23884
- * @return {?}
23885
- */
23886
- function () {
23887
- _this.updateAISugesstions();
23888
- }));
23889
- (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
23890
- * @return {?}
23891
- */
23892
- function () {
23893
- _this.copyTextToClipboard(_this.AIResult);
23894
- }));
23895
- (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
23896
- * @return {?}
23897
- */
23898
- function () {
23899
- /** @type {?} */
23900
- var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
23901
- ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
23902
- ((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
23903
- undo: true,
23904
- });
23905
- _this.closeDialog();
23906
- }));
23907
- ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
23395
+ function (future, curr) {
23396
+ // console.log("shouldReuseRoute", future, curr);
23397
+ // return future.routeConfig === curr.routeConfig;
23398
+ if (future.routeConfig === curr.routeConfig) {
23399
+ if (future.children.length === 0 && curr.children.length === 0) {
23400
+ // 无子路由时, 通过params和queryParams判断是否复用路由
23401
+ return (JSON.stringify(future.params) === JSON.stringify(curr.params));
23402
+ }
23403
+ return true;
23404
+ }
23405
+ return false;
23908
23406
  };
23909
23407
  /**
23408
+ * @param {?} route
23910
23409
  * @return {?}
23911
23410
  */
23912
- RichtexteditorComponent.prototype.closeDialog = /**
23411
+ KeepAliveService.prototype.getRoutePath = /**
23412
+ * @param {?} route
23913
23413
  * @return {?}
23914
23414
  */
23915
- function () {
23916
- this.AIdialog.hide();
23917
- this.rightRte.value = "";
23918
- this.leftRte.value = "";
23919
- this.promptQuery = "";
23920
- this.chipValue = "Standard";
23921
- this.AIResult = "";
23922
- this.dropValIndex = 0;
23923
- this.selectedQuery = "Rephrase";
23924
- this.sentimentButton.content = "😊 Neutral";
23415
+ function (route) {
23416
+ if (route.routeConfig) {
23417
+ // const pathParams = JSON.stringify(route.params);
23418
+ // const queryParams = new URLSearchParams(route.queryParams).toString();
23419
+ /** @type {?} */
23420
+ var url = route._urlSegment.segments.map((/**
23421
+ * @param {?} v
23422
+ * @return {?}
23423
+ */
23424
+ function (v) { return v.path; })).join("/");
23425
+ return "/" + url;
23426
+ }
23427
+ return "";
23925
23428
  };
23926
23429
  /**
23927
- * @param {?} text
23430
+ * @param {?} path
23928
23431
  * @return {?}
23929
23432
  */
23930
- RichtexteditorComponent.prototype.copyTextToClipboard = /**
23931
- * @param {?} text
23433
+ KeepAliveService.prototype.clearCache = /**
23434
+ * @param {?} path
23932
23435
  * @return {?}
23933
23436
  */
23934
- function (text) {
23935
- if (navigator.clipboard) {
23936
- navigator.clipboard
23937
- .writeText(text)
23938
- .then((/**
23939
- * @return {?}
23940
- */
23941
- function () {
23942
- console.log("Text copied to clipboard successfully!");
23943
- }))
23944
- .catch((/**
23945
- * @param {?} err
23946
- * @return {?}
23947
- */
23948
- function (err) {
23949
- console.error("Failed to copy text: ", err);
23950
- }));
23951
- }
23952
- else {
23953
- // Fallback for browsers that do not support the Clipboard API
23954
- /** @type {?} */
23955
- var textarea = document.createElement("textarea");
23956
- textarea.value = text;
23957
- document.body.appendChild(textarea);
23958
- textarea.select();
23959
- try {
23960
- document.execCommand("copy");
23961
- console.log("Text copied to clipboard using execCommand");
23962
- }
23963
- catch (err) {
23964
- console.error("Failed to copy text: ", err);
23965
- }
23966
- finally {
23967
- document.body.removeChild(textarea);
23968
- }
23969
- }
23437
+ function (path) {
23438
+ // console.log("clearCache", storedRoutes, path);
23439
+ toBeDeleteUrl = path;
23440
+ storedRoutes.delete(path);
23970
23441
  };
23971
23442
  /**
23972
23443
  * @return {?}
23973
23444
  */
23974
- RichtexteditorComponent.prototype.onOverlayClick = /**
23445
+ KeepAliveService.prototype.clearAllCache = /**
23975
23446
  * @return {?}
23976
23447
  */
23977
23448
  function () {
23978
- /** @type {?} */
23979
- var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
23980
- if (activeEle) {
23981
- activeEle.classList.remove("e-active");
23982
- }
23983
- this.closeDialog();
23449
+ storedRoutes.clear();
23984
23450
  };
23451
+ KeepAliveService.decorators = [
23452
+ { type: Injectable, args: [{
23453
+ providedIn: "root",
23454
+ },] }
23455
+ ];
23456
+ /** @nocollapse */ KeepAliveService.ngInjectableDef = ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
23457
+ return KeepAliveService;
23458
+ }());
23459
+
23460
+ /**
23461
+ * @fileoverview added by tsickle
23462
+ * Generated from: lib/form/confirm-select/index.component.ts
23463
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23464
+ */
23465
+ var ConfirmSelectComponent = /** @class */ (function () {
23466
+ function ConfirmSelectComponent() {
23467
+ this.dataSource = [];
23468
+ this.disabled = false;
23469
+ this.fields = { text: "Game", value: "Id" };
23470
+ this.showSelectAll = true;
23471
+ this.valueChange = new EventEmitter();
23472
+ this.selectedItems = [];
23473
+ this.isInteracted = false;
23474
+ }
23985
23475
  /**
23986
- * @param {?} args
23987
23476
  * @return {?}
23988
23477
  */
23989
- RichtexteditorComponent.prototype.onQuerySelect = /**
23990
- * @param {?} args
23478
+ ConfirmSelectComponent.prototype.ngOnInit = /**
23991
23479
  * @return {?}
23992
23480
  */
23993
- function (args) {
23994
- // this.chipList.selectedChips = 0;
23995
- this.translatelanguage = "EN";
23996
- this.selectedQuery = args.itemData.text;
23997
- this.updateAISugesstionsData(args.itemData.text);
23481
+ function () {
23482
+ this.getInfo();
23483
+ this.resetSelectedItems();
23998
23484
  };
23999
23485
  /**
24000
- * @param {?} args
23486
+ * @param {?} changes
24001
23487
  * @return {?}
24002
23488
  */
24003
- RichtexteditorComponent.prototype.onLanguageSelect = /**
24004
- * @param {?} args
23489
+ ConfirmSelectComponent.prototype.ngOnChanges = /**
23490
+ * @param {?} changes
24005
23491
  * @return {?}
24006
23492
  */
24007
- function (args) {
24008
- this.translatelanguage = args.itemData.id;
24009
- this.updateAISugesstionsData("Translate");
23493
+ function (changes) {
23494
+ if (changes.value && !changes.value.firstChange) {
23495
+ this.resetSelectedItems();
23496
+ }
24010
23497
  };
24011
23498
  /**
24012
- * @param {?} args
24013
23499
  * @return {?}
24014
23500
  */
24015
- RichtexteditorComponent.prototype.onChipClick = /**
24016
- * @param {?} args
23501
+ ConfirmSelectComponent.prototype.getInfo = /**
24017
23502
  * @return {?}
24018
23503
  */
24019
- function (args) {
24020
- this.chipValue = args.itemData.text;
24021
- // 事件会触发两次 必须判断args.text是否有值
24022
- if (args.itemData.text)
24023
- this.updateAISugesstionsData("Rephrase");
23504
+ function () {
23505
+ this.translation = JSON.parse(localStorage.getItem("translation"));
24024
23506
  };
24025
23507
  /**
24026
- * @param {?} args
24027
23508
  * @return {?}
24028
23509
  */
24029
- RichtexteditorComponent.prototype._toolbarClick = /**
24030
- * @param {?} args
23510
+ ConfirmSelectComponent.prototype.resetSelectedItems = /**
24031
23511
  * @return {?}
24032
23512
  */
24033
- function (args) {
24034
- this.toolbarClick.emit(args);
23513
+ function () {
23514
+ this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
23515
+ if (this.comfirmSelect) {
23516
+ this.comfirmSelect.value = this.selectedItems;
23517
+ }
24035
23518
  };
24036
23519
  /**
24037
23520
  * @return {?}
24038
23521
  */
24039
- RichtexteditorComponent.prototype.hideToast = /**
23522
+ ConfirmSelectComponent.prototype.onCancel = /**
24040
23523
  * @return {?}
24041
23524
  */
24042
23525
  function () {
24043
- this.showMsg = false;
23526
+ this.isInteracted = true;
23527
+ this.resetSelectedItems();
23528
+ this.comfirmSelect.hidePopup();
24044
23529
  };
24045
23530
  /**
24046
23531
  * @return {?}
24047
23532
  */
24048
- RichtexteditorComponent.prototype.onZoom = /**
23533
+ ConfirmSelectComponent.prototype.onApply = /**
24049
23534
  * @return {?}
24050
23535
  */
24051
23536
  function () {
24052
- if (this.size === "largest") {
24053
- this.size = ""; // 恢复到原始大小
24054
- }
24055
- else {
24056
- this.size = "largest"; // 设置为最大化
24057
- }
24058
- };
24059
- RichtexteditorComponent.decorators = [
24060
- { type: Component, args: [{
24061
- selector: "rs-richtext-editor",
24062
- template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n id=\"editor\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [fontFamily]=\"family\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n <ejs-dialog\r\n #AIdialog\r\n id=\"AIdialog\"\r\n [ngClass]=\"size\"\r\n [visible]=\"false\"\r\n [target]=\"target\"\r\n [isModal]=\"true\"\r\n [height]=\"dialogHeight\"\r\n [width]=\"dialogWidth\"\r\n maxHeight=\"80%\"\r\n cssClass=\"e-rte-elements custom-dialog-rte\"\r\n zIndex=\"1000\"\r\n (close)=\"closeDialog()\"\r\n (overlayClick)=\"onOverlayClick()\"\r\n (open)=\"dialogShow()\"\r\n >\r\n <ng-template #header>\r\n <div class=\"header-title\">AI Assist</div>\r\n <div class=\"header-buttons\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-zoom\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div class=\"header-btn\" (click)=\"closeDialog()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #footerTemplate>\r\n <div id=\"dialog-footer-content\">\r\n <div class=\"custom-row-0\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"width: 100%; align-items: center; justify-content: left\"\r\n ></div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: right; width: 100%\">\r\n <button\r\n ejs-button\r\n #sentimentButton\r\n content=\"\uD83D\uDE0A Neutral\"\r\n disabled=\"false\"\r\n cssClass=\"sentiment\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #copyButton\r\n content=\"Copy\"\r\n disabled=\"false\"\r\n class=\"copy-btn\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #replaceButton\r\n content=\"Replace\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #content>\r\n <div class=\"dialog-content\" style=\"height: 100%\">\r\n <div class=\"custom-row-0\">\r\n <div class=\"cuscol-0\" style=\"width: 100%\">\r\n <ejs-dropdownlist\r\n #queryCategory\r\n style=\"width: 200px\"\r\n id=\"queryCategory\"\r\n [dataSource]=\"queryList\"\r\n index=\"0\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onQuerySelect($event)\"\r\n >\r\n Rephrase\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Rephrase'\"\r\n id=\"chips-container\"\r\n #chipList\r\n style=\"width: 160px\"\r\n [(ngModel)]=\"chipValue\"\r\n [dataSource]=\"rephraseTyleList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onChipClick($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Translate'\"\r\n #languageCategory\r\n index=\"0\"\r\n id=\"language-Category\"\r\n [dataSource]=\"languageList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onLanguageSelect($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <!-- <ejs-chiplist\r\n id=\"chips-container\"\r\n #chipList\r\n [chips]=\"['Standard', 'Fluent', 'Professional']\"\r\n selection=\"Single\"\r\n cssClass=\"e-outline\"\r\n [selectedChips]=\"[0]\"\r\n (click)=\"onChipClick($event)\"\r\n >\r\n </ejs-chiplist> -->\r\n <button\r\n ejs-button\r\n #regenerateButton\r\n content=\"Regenerate\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"custom-row-1\" style=\"height: calc(100% - 40px)\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: left;\r\n \"\r\n >\r\n <div style=\"text-align: left; height: 100%\">\r\n <ejs-richtexteditor\r\n #leftRte\r\n id=\"leftRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n </ejs-richtexteditor>\r\n </div>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: left; width: 100%; height: 100%\">\r\n <ejs-richtexteditor\r\n #rightRte\r\n id=\"rightRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n <!-- style=\"display: none\" -->\r\n </ejs-richtexteditor>\r\n <div\r\n class=\"no-results-found\"\r\n id=\"no-results-found\"\r\n style=\"display: none; height: 244px; align-content: center\"\r\n >\r\n <img\r\n height=\"50\"\r\n width=\"50\"\r\n src=\"https://storage.googleapis.com/cdn-bolddesk/agent-angular-app/images/light/no-records-warning.svg\"\r\n />\r\n <div>No results found</div>\r\n </div>\r\n <div id=\"skeletonId\" style=\"display: none\">\r\n <ejs-skeleton\r\n #skeletonId1\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"100%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId2\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"90%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId3\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"70%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId4\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"50%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId5\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"30%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId6\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"10%\"\r\n ></ejs-skeleton\r\n ><br />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ejs-dialog>\r\n <div class=\"toast\" *ngIf=\"showMsg\">\r\n <span class=\"toast_text\">First, Select some text</span\r\n ><span class=\"close_icon\" (click)=\"hideToast()\"></span>\r\n </div>\r\n</div>\r\n",
24063
- styles: [".editor_box{position:relative;width:100%;height:100%}.editor_box .toast{position:absolute;left:35%;top:110px;z-index:1;width:400px;border-radius:4px;border:1px solid #e8f2ff;background:#f4f8ff;padding:4px 12px;color:#1f3f5c;font-size:12px;font-style:normal;font-weight:400;height:32px;font-family:Arial;display:flex;align-items:center;justify-content:space-between}.editor_box .toast .toast_text::before{content:url(../../assets/img/info.svg);display:inline-block;width:16px;height:16px;vertical-align:bottom;margin-right:8px}.editor_box .toast .close_icon{background-image:url(../../assets/img/notification-close.svg);cursor:pointer;display:inline-block;width:16px;height:16px}.custom-dialog-rte{padding:0 20px;border-radius:10px}.custom-row-0,.custom-row-1,.custom-row-2{display:flex;align-items:center;padding:12px 24px}.e-rte-dropdown-btn-text{padding-left:4px}.no-results-found{text-align:center}.no-results-found img{display:block;margin:0 auto}.e-custom{margin-right:.5rem;border-radius:25px!important}.custom-dialog-rte .skeleton-rectangle{border-radius:4px}@media (max-width:767px){.cuscol-0,.cuscol-1,.cuscol-2{justify-content:center!important}.custom-row-0,.custom-row-1,.custom-row-2{flex-direction:column!important}.cuscol-1{border-right:none!important}.cuscol-0{width:100%;align-items:center}::ng-deep:host .e-dialog{max-height:80%!important}.custom-dialog-rte .e-dialog .e-dlg-content{overflow-y:auto!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor{height:100px!important}.cuscol-noresult{padding-bottom:20px!important}.e-chip-list{padding:5px!important}.cuscol{padding-right:.2rem!important;width:auto!important}.custom-row-1{height:auto!important}}.cuscol-1{display:flex;flex-direction:row!important}.cuscol-2{display:flex;flex-direction:column!important}.sentiment{color:#000!important}.custom-dialog-rte .e-dialog .e-dlg-content{padding:0!important;overflow-y:hidden}.custom-dialog-rte .e-dialog .e-dlg-header-content{padding:20px 0!important;border:0!important}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header{display:flex;align-items:center;line-height:18px;justify-content:space-between}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header .header-title{font-family:Arial;font-size:15px;font-weight:700;font-style:normal}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons{display:flex}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons img{width:16px;height:16px;cursor:pointer;padding:2px;margin-left:12px}.custom-dialog-rte .e-dialog .e-footer-content{padding:0!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor.e-rte-tb-expand .e-rte-content,.e-richtexteditor.e-rte-tb-expand .e-source-content{border:0;border-bottom:1px solid #dee2e6;border-top:0 solid #dee2e6!important}.custom-dialog-rte .dialog-content .custom-row-0{border-top:0 solid #ddd!important;padding:0;margin-bottom:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-0{justify-content:left;border-right:none!important;padding:0;display:flex;gap:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1{padding:0;margin-left:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1 .e-primary{color:#44566c;border-radius:4px;border:1px solid #dbe1e7;background:#fff;width:87px;margin:0;padding:2px 12px;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;height:28px}.custom-dialog-rte .dialog-content .custom-row-1{padding:0;height:calc(100% - 40px);gap:12px}.custom-dialog-rte .e-footer-content{border:0}.custom-dialog-rte .e-footer-content .custom-row-0{padding:20px 0}.custom-dialog-rte .e-footer-content .e-control.e-btn{font-family:Arial;font-size:12px;line-height:14px;padding:2px 12px;height:28px;background:#fff;color:#44566c}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn{border-color:#dbe1e7}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn::before{content:url(../../assets/img/editor-copy.svg);vertical-align:middle;margin-right:6px}.custom-dialog-rte .e-footer-content .e-control.e-btn.e-primary{color:#fff;background:#1364b3}.editor_box .e-dialog.largest{width:96vw!important;height:88vh!important;max-height:88vh;max-width:2100px}"]
24064
- }] }
24065
- ];
24066
- /** @nocollapse */
24067
- RichtexteditorComponent.ctorParameters = function () { return [
24068
- { type: ChangeDetectorRef }
24069
- ]; };
24070
- RichtexteditorComponent.propDecorators = {
24071
- rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
24072
- queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
24073
- leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
24074
- rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
24075
- AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
24076
- sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
24077
- regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
24078
- copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
24079
- replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
24080
- placeholder: [{ type: Input }],
24081
- value: [{ type: Input }],
24082
- height: [{ type: Input }],
24083
- autoSaveOnIdle: [{ type: Input }],
24084
- target: [{ type: Input }],
24085
- toolbarClick: [{ type: Output }],
24086
- change: [{ type: Output }]
23537
+ this.isInteracted = true;
23538
+ /** @type {?} */
23539
+ var val = this.comfirmSelect.value;
23540
+ this.valueChange.emit(val);
23541
+ this.comfirmSelect.hidePopup();
24087
23542
  };
24088
- return RichtexteditorComponent;
24089
- }());
24090
- if (false) {
24091
- /** @type {?} */
24092
- RichtexteditorComponent.prototype.rteObj;
24093
- /** @type {?} */
24094
- RichtexteditorComponent.prototype.queryCategory;
24095
- /** @type {?} */
24096
- RichtexteditorComponent.prototype.leftRte;
24097
- /** @type {?} */
24098
- RichtexteditorComponent.prototype.rightRte;
24099
- /** @type {?} */
24100
- RichtexteditorComponent.prototype.AIdialog;
24101
- /** @type {?} */
24102
- RichtexteditorComponent.prototype.sentimentButton;
24103
- /** @type {?} */
24104
- RichtexteditorComponent.prototype.regenerateButton;
24105
- /** @type {?} */
24106
- RichtexteditorComponent.prototype.copyButton;
24107
- /** @type {?} */
24108
- RichtexteditorComponent.prototype.replaceButton;
24109
- /** @type {?} */
24110
- RichtexteditorComponent.prototype.placeholder;
24111
- /** @type {?} */
24112
- RichtexteditorComponent.prototype.value;
24113
- /** @type {?} */
24114
- RichtexteditorComponent.prototype.height;
24115
- /** @type {?} */
24116
- RichtexteditorComponent.prototype.autoSaveOnIdle;
24117
- /** @type {?} */
24118
- RichtexteditorComponent.prototype.target;
24119
- /** @type {?} */
24120
- RichtexteditorComponent.prototype.toolbarClick;
24121
- /** @type {?} */
24122
- RichtexteditorComponent.prototype.change;
24123
- /** @type {?} */
24124
- RichtexteditorComponent.prototype.family;
24125
- /** @type {?} */
24126
- RichtexteditorComponent.prototype.dialogWidth;
24127
- /** @type {?} */
24128
- RichtexteditorComponent.prototype.dialogHeight;
24129
- /** @type {?} */
24130
- RichtexteditorComponent.prototype.showZoomBtn;
23543
+ /**
23544
+ * @param {?} e
23545
+ * @return {?}
23546
+ */
23547
+ ConfirmSelectComponent.prototype.onClose = /**
23548
+ * @param {?} e
23549
+ * @return {?}
23550
+ */
23551
+ function (e) {
23552
+ if (this.isInteracted) {
23553
+ this.isInteracted = false;
23554
+ }
23555
+ else {
23556
+ this.resetSelectedItems();
23557
+ }
23558
+ };
23559
+ ConfirmSelectComponent.decorators = [
23560
+ { type: Component, args: [{
23561
+ selector: "rs-confirm-select",
23562
+ template: "<div class=\"rs-confirm-select\">\r\n <ejs-multiselect\r\n #comfirmSelect\r\n [dataSource]=\"dataSource\"\r\n [showDropDownIcon]=\"true\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"selectedItems\"\r\n [fields]=\"fields\"\r\n [showSelectAll]=\"showSelectAll\"\r\n mode=\"CheckBox\"\r\n [footerTemplate]=\"footerTemplate\"\r\n [showClearButton]=\"false\"\r\n (close)=\"onClose($event)\"\r\n filterType=\"Contains\"\r\n >\r\n <ng-template #footerTemplate=\"\" let-data=\"data\">\r\n <div class=\"confirm-select-footer\">\r\n <button class=\"e-btn\" (click)=\"onCancel()\">\r\n {{ translation.CANCEL }}\r\n </button>\r\n <button class=\"e-btn e-primary\" (click)=\"onApply()\">\r\n {{ translation.APPLY }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </ejs-multiselect>\r\n</div>\r\n",
23563
+ styles: [".confirm-select-footer{display:flex;align-items:center;justify-content:flex-end;padding:0 12px;gap:12px;height:40px;border-top:solid 1px var(--rs-border-color)}"]
23564
+ }] }
23565
+ ];
23566
+ ConfirmSelectComponent.propDecorators = {
23567
+ comfirmSelect: [{ type: ViewChild, args: ["comfirmSelect", { static: false },] }],
23568
+ value: [{ type: Input }],
23569
+ dataSource: [{ type: Input }],
23570
+ disabled: [{ type: Input }],
23571
+ fields: [{ type: Input }],
23572
+ placeholder: [{ type: Input }],
23573
+ showSelectAll: [{ type: Input }],
23574
+ valueChange: [{ type: Output }]
23575
+ };
23576
+ return ConfirmSelectComponent;
23577
+ }());
23578
+ if (false) {
24131
23579
  /** @type {?} */
24132
- RichtexteditorComponent.prototype.showMsg;
23580
+ ConfirmSelectComponent.prototype.comfirmSelect;
24133
23581
  /** @type {?} */
24134
- RichtexteditorComponent.prototype.insertImageSettings;
23582
+ ConfirmSelectComponent.prototype.value;
24135
23583
  /** @type {?} */
24136
- RichtexteditorComponent.prototype.editorManager;
23584
+ ConfirmSelectComponent.prototype.dataSource;
24137
23585
  /** @type {?} */
24138
- RichtexteditorComponent.prototype.size;
23586
+ ConfirmSelectComponent.prototype.disabled;
24139
23587
  /** @type {?} */
24140
- RichtexteditorComponent.prototype.selectedQuery;
23588
+ ConfirmSelectComponent.prototype.fields;
24141
23589
  /** @type {?} */
24142
- RichtexteditorComponent.prototype.dropValIndex;
23590
+ ConfirmSelectComponent.prototype.placeholder;
24143
23591
  /** @type {?} */
24144
- RichtexteditorComponent.prototype.queryList;
23592
+ ConfirmSelectComponent.prototype.showSelectAll;
24145
23593
  /** @type {?} */
24146
- RichtexteditorComponent.prototype.rephraseTyleList;
23594
+ ConfirmSelectComponent.prototype.valueChange;
24147
23595
  /** @type {?} */
24148
- RichtexteditorComponent.prototype.languageList;
23596
+ ConfirmSelectComponent.prototype.translation;
24149
23597
  /** @type {?} */
24150
- RichtexteditorComponent.prototype.promptQuery;
23598
+ ConfirmSelectComponent.prototype.selectedItems;
24151
23599
  /** @type {?} */
24152
- RichtexteditorComponent.prototype.isSentimentCheck;
23600
+ ConfirmSelectComponent.prototype.isInteracted;
23601
+ }
23602
+
23603
+ /**
23604
+ * @fileoverview added by tsickle
23605
+ * Generated from: lib/form/richtexteditor/ai-config.ts
23606
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23607
+ */
23608
+ /**
23609
+ * @record
23610
+ */
23611
+ function AIConfig() { }
23612
+ if (false) {
24153
23613
  /** @type {?} */
24154
- RichtexteditorComponent.prototype.subQuery;
23614
+ AIConfig.prototype.endpoint;
24155
23615
  /** @type {?} */
24156
- RichtexteditorComponent.prototype.translatelanguage;
23616
+ AIConfig.prototype.apiKey;
24157
23617
  /** @type {?} */
24158
- RichtexteditorComponent.prototype.chipValue;
23618
+ AIConfig.prototype.deployment;
24159
23619
  /** @type {?} */
24160
- RichtexteditorComponent.prototype.apiResultData;
23620
+ AIConfig.prototype.apiVersion;
24161
23621
  /** @type {?} */
24162
- RichtexteditorComponent.prototype.AIResult;
23622
+ AIConfig.prototype.enabled;
23623
+ }
23624
+ // 从环境配置获取AI配置
23625
+ /**
23626
+ * @return {?}
23627
+ */
23628
+ function getAIConfig() {
23629
+ return {
23630
+ endpoint: "https://aidevused.openai.azure.com/",
23631
+ apiKey: "ccba76e279f64653a50ac4fee90afe5c",
23632
+ deployment: "gpt-4",
23633
+ apiVersion: "2025-01-01-preview",
23634
+ enabled: true,
23635
+ };
23636
+ }
23637
+ // 检查配置是否有效
23638
+ /**
23639
+ * @param {?} config
23640
+ * @return {?}
23641
+ */
23642
+ function isAIConfigValid(config) {
23643
+ // 检查是否为aidevused端点且有有效API密钥
23644
+ return !!((config.endpoint &&
23645
+ config.apiKey &&
23646
+ config.deployment &&
23647
+ config.enabled &&
23648
+ config.endpoint === "https://aidevused.openai.azure.com/" &&
23649
+ config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
23650
+ );
23651
+ }
23652
+ // 从后端API获取AI配置(推荐方式)
23653
+ /**
23654
+ * @return {?}
23655
+ * @this {*}
23656
+ */
23657
+ function getAIConfigFromBackend() {
23658
+ return __awaiter(this, void 0, void 0, function () {
23659
+ return __generator(this, function (_a) {
23660
+ try {
23661
+ // 这里应该调用你的后端API来获取AI配置
23662
+ // 例如:return await this.http.get('/api/ai-config');
23663
+ // 临时返回默认配置
23664
+ return [2 /*return*/, getAIConfig()];
23665
+ }
23666
+ catch (error) {
23667
+ console.error("Failed to get AI config from backend:", error);
23668
+ return [2 /*return*/, getAIConfig()];
23669
+ }
23670
+ return [2 /*return*/];
23671
+ });
23672
+ });
23673
+ }
23674
+
23675
+ /**
23676
+ * @fileoverview added by tsickle
23677
+ * Generated from: lib/form/richtexteditor/openapi.ts
23678
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23679
+ */
23680
+ // import { testAIFunction } from './ai-test';
23681
+ // testAIFunction();
23682
+ // 使用fetch API发送请求到Azure OpenAI
23683
+ /**
23684
+ * @param {?} messages
23685
+ * @param {?} config
23686
+ * @return {?}
23687
+ * @this {*}
23688
+ */
23689
+ function sendAIRequest(messages, config) {
23690
+ return __awaiter(this, void 0, void 0, function () {
23691
+ var url, url1, response, errorText, data, error_1;
23692
+ return __generator(this, function (_a) {
23693
+ switch (_a.label) {
23694
+ case 0:
23695
+ _a.trys.push([0, 5, , 6]);
23696
+ url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
23697
+ url1 = "" + config.endpoint;
23698
+ return [4 /*yield*/, fetch(url, {
23699
+ method: 'POST',
23700
+ headers: {
23701
+ 'Content-Type': 'application/json',
23702
+ 'api-key': config.apiKey,
23703
+ },
23704
+ body: JSON.stringify({
23705
+ messages: messages,
23706
+ max_tokens: 1000,
23707
+ temperature: 0.7,
23708
+ top_p: 1,
23709
+ frequency_penalty: 0,
23710
+ presence_penalty: 0,
23711
+ }),
23712
+ })];
23713
+ case 1:
23714
+ response = _a.sent();
23715
+ if (!!response.ok) return [3 /*break*/, 3];
23716
+ return [4 /*yield*/, response.text()];
23717
+ case 2:
23718
+ errorText = _a.sent();
23719
+ throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
23720
+ case 3: return [4 /*yield*/, response.json()];
23721
+ case 4:
23722
+ data = _a.sent();
23723
+ if (!data.choices || !data.choices[0] || !data.choices[0].message) {
23724
+ throw new Error('Invalid response format from AI service');
23725
+ }
23726
+ return [2 /*return*/, data.choices[0].message.content];
23727
+ case 5:
23728
+ error_1 = _a.sent();
23729
+ console.error('AI request failed:', error_1);
23730
+ throw error_1;
23731
+ case 6: return [2 /*return*/];
23732
+ }
23733
+ });
23734
+ });
23735
+ }
23736
+ // 备用方案:使用模拟数据(用于开发测试)
23737
+ /**
23738
+ * @param {?} subQuery
23739
+ * @param {?} promptQuery
23740
+ * @return {?}
23741
+ */
23742
+ function getMockAIResponse(subQuery, promptQuery) {
23743
+ var e_1, _a;
24163
23744
  /** @type {?} */
24164
- RichtexteditorComponent.prototype.tools;
24165
- /**
24166
- * @type {?}
24167
- * @private
24168
- */
24169
- RichtexteditorComponent.prototype.ref;
23745
+ var mockResponses = {
23746
+ Rephrase: "Rephrased: " + promptQuery,
23747
+ Grammar: "Corrected: " + promptQuery,
23748
+ Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
23749
+ Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
23750
+ Translate: "Translated: " + promptQuery,
23751
+ SentimentAnalysis: '😊 Positive',
23752
+ };
23753
+ try {
23754
+ for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
23755
+ var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
23756
+ if (subQuery.includes(key)) {
23757
+ return value;
23758
+ }
23759
+ }
23760
+ }
23761
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
23762
+ finally {
23763
+ try {
23764
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
23765
+ }
23766
+ finally { if (e_1) throw e_1.error; }
23767
+ }
23768
+ return "AI processed: " + promptQuery;
23769
+ }
23770
+ // 主要的AI请求方法
23771
+ /**
23772
+ * @param {?} subQuery
23773
+ * @param {?} promptQuery
23774
+ * @return {?}
23775
+ * @this {*}
23776
+ */
23777
+ function OpenAiModelRTE(subQuery, promptQuery) {
23778
+ return __awaiter(this, void 0, void 0, function () {
23779
+ var config, messages, result, error_2;
23780
+ return __generator(this, function (_a) {
23781
+ switch (_a.label) {
23782
+ case 0:
23783
+ _a.trys.push([0, 2, , 3]);
23784
+ config = getAIConfig();
23785
+ // 检查配置是否有效
23786
+ if (!isAIConfigValid(config)) {
23787
+ console.warn('AI configuration is incomplete or disabled, using mock response');
23788
+ return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23789
+ }
23790
+ messages = [
23791
+ {
23792
+ role: 'system',
23793
+ content: subQuery.includes('emoji followed by the sentiment in the format')
23794
+ ? 'You are a helpful assistant. Please respond in string format.'
23795
+ : "NOTE: Return same html format just do changes content only. don't change html formats.",
23796
+ },
23797
+ {
23798
+ role: 'user',
23799
+ content: subQuery + " " + promptQuery,
23800
+ },
23801
+ ];
23802
+ return [4 /*yield*/, sendAIRequest(messages, config)];
23803
+ case 1:
23804
+ result = _a.sent();
23805
+ return [2 /*return*/, result];
23806
+ case 2:
23807
+ error_2 = _a.sent();
23808
+ console.error('AI request failed, using mock response:', error_2);
23809
+ return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23810
+ case 3: return [2 /*return*/];
23811
+ }
23812
+ });
23813
+ });
23814
+ }
23815
+ // 兼容性方法(保持向后兼容)
23816
+ /**
23817
+ * @param {?} options
23818
+ * @return {?}
23819
+ * @this {*}
23820
+ */
23821
+ function getAzureChatAIRequest(options) {
23822
+ return __awaiter(this, void 0, void 0, function () {
23823
+ var config, result, err_1;
23824
+ return __generator(this, function (_a) {
23825
+ switch (_a.label) {
23826
+ case 0:
23827
+ _a.trys.push([0, 2, , 3]);
23828
+ config = getAIConfig();
23829
+ if (!isAIConfigValid(config)) {
23830
+ return [2 /*return*/, null];
23831
+ }
23832
+ return [4 /*yield*/, sendAIRequest(options.messages, config)];
23833
+ case 1:
23834
+ result = _a.sent();
23835
+ return [2 /*return*/, result];
23836
+ case 2:
23837
+ err_1 = _a.sent();
23838
+ console.error('Error occurred:', err_1);
23839
+ return [2 /*return*/, null];
23840
+ case 3: return [2 /*return*/];
23841
+ }
23842
+ });
23843
+ });
23844
+ }
23845
+ /**
23846
+ * @param {?} prompt
23847
+ * @return {?}
23848
+ * @this {*}
23849
+ */
23850
+ function getAzureTextAIRequest(prompt) {
23851
+ return __awaiter(this, void 0, void 0, function () {
23852
+ var config, messages, result, err_2;
23853
+ return __generator(this, function (_a) {
23854
+ switch (_a.label) {
23855
+ case 0:
23856
+ _a.trys.push([0, 2, , 3]);
23857
+ config = getAIConfig();
23858
+ if (!isAIConfigValid(config)) {
23859
+ return [2 /*return*/, undefined];
23860
+ }
23861
+ messages = [
23862
+ {
23863
+ role: 'user',
23864
+ content: prompt,
23865
+ },
23866
+ ];
23867
+ return [4 /*yield*/, sendAIRequest(messages, config)];
23868
+ case 1:
23869
+ result = _a.sent();
23870
+ return [2 /*return*/, result];
23871
+ case 2:
23872
+ err_2 = _a.sent();
23873
+ console.error('Error occurred:', err_2);
23874
+ return [2 /*return*/, undefined];
23875
+ case 3: return [2 /*return*/];
23876
+ }
23877
+ });
23878
+ });
24170
23879
  }
24171
23880
 
24172
23881
  /**
24173
23882
  * @fileoverview added by tsickle
24174
- * Generated from: lib/dialog/common-dialog/index.component.ts
23883
+ * Generated from: lib/form/richtexteditor/data-config.ts
24175
23884
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24176
23885
  */
24177
- var CommonDialogComponent = /** @class */ (function () {
24178
- function CommonDialogComponent(dialogRef) {
24179
- this.dialogRef = dialogRef;
24180
- // 隐藏元素相关属性
24181
- this.hideHeader = false;
24182
- this.hideCloseIcon = false;
24183
- this.hideCloseBtn = false;
24184
- this.hideSaveBtn = false;
24185
- this.hideDiscardBtn = false;
24186
- this.saveBtnLabel = "";
24187
- this.cancelBtnLabel = "";
24188
- this.discardBtnLabel = "";
24189
- this.showErrorIcon = false;
24190
- this.showZoomBtn = false;
24191
- // 显示相关属性
24192
- this.dialogStyle = {};
24193
- this.size = "";
24194
- this.title = "Dialog";
24195
- this.loading = false;
24196
- this.saveEmit = new EventEmitter();
24197
- this.closeEmit = new EventEmitter();
24198
- this.defaultSize = "";
24199
- this.customFooter = false;
24200
- }
24201
- /**
24202
- * @return {?}
24203
- */
24204
- CommonDialogComponent.prototype.ngAfterContentInit = /**
24205
- * @return {?}
24206
- */
24207
- function () {
24208
- this.customFooter = !!this.footerContent;
24209
- };
24210
- /**
24211
- * @return {?}
24212
- */
24213
- CommonDialogComponent.prototype.ngOnInit = /**
24214
- * @return {?}
24215
- */
24216
- function () {
24217
- this.getInfo();
24218
- };
24219
- /**
24220
- * @return {?}
24221
- */
24222
- CommonDialogComponent.prototype.onClose = /**
24223
- * @return {?}
24224
- */
24225
- function () {
24226
- var _this = this;
24227
- if (this.onCloseRequest) {
24228
- this.onCloseRequest().then((/**
24229
- * @param {?} confirmed
24230
- * @return {?}
24231
- */
24232
- function (confirmed) {
24233
- if (confirmed) {
24234
- _this.dialogRef.close("close");
24235
- }
24236
- }));
24237
- }
24238
- else {
24239
- this.dialogRef.close("close");
24240
- }
24241
- };
24242
- /**
24243
- * @return {?}
24244
- */
24245
- CommonDialogComponent.prototype.onZoom = /**
24246
- * @return {?}
24247
- */
24248
- function () {
24249
- if (this.size === "largest") {
24250
- this.size = this.defaultSize; // 恢复到原始大小
24251
- }
24252
- else {
24253
- this.size = "largest"; // 设置为最大化
24254
- }
24255
- };
24256
- /**
24257
- * @return {?}
24258
- */
24259
- CommonDialogComponent.prototype.onSave = /**
24260
- * @return {?}
24261
- */
24262
- function () {
24263
- this.dialogRef.close("save");
24264
- };
24265
- /**
24266
- * @return {?}
24267
- */
24268
- CommonDialogComponent.prototype.onDiscard = /**
24269
- * @return {?}
24270
- */
24271
- function () {
24272
- this.dialogRef.close("discard");
24273
- };
24274
- /**
24275
- * @private
24276
- * @return {?}
24277
- */
24278
- CommonDialogComponent.prototype.getInfo = /**
24279
- * @private
24280
- * @return {?}
24281
- */
24282
- function () {
24283
- this.translation = JSON.parse(localStorage.getItem("translation")) || {};
24284
- this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
24285
- this.cancelBtnLabel =
24286
- this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
24287
- this.defaultSize = this.size;
24288
- };
24289
- CommonDialogComponent.decorators = [
24290
- { type: Component, args: [{
24291
- selector: "rs-common-dialog",
24292
- template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header-btn\" (click)=\"onClose()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button\r\n *ngIf=\"!hideCloseBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onClose()\"\r\n >\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideDiscardBtn\"\r\n class=\"e-btn\"\r\n (click)=\"onDiscard()\"\r\n >\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button\r\n *ngIf=\"!hideSaveBtn\"\r\n class=\"e-btn e-primary\"\r\n (click)=\"onSave()\"\r\n >\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
24293
- styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
24294
- }] }
24295
- ];
24296
- /** @nocollapse */
24297
- CommonDialogComponent.ctorParameters = function () { return [
24298
- { type: MatDialogRef }
24299
- ]; };
24300
- CommonDialogComponent.propDecorators = {
24301
- hideHeader: [{ type: Input }],
24302
- hideCloseIcon: [{ type: Input }],
24303
- hideCloseBtn: [{ type: Input }],
24304
- hideSaveBtn: [{ type: Input }],
24305
- hideDiscardBtn: [{ type: Input }],
24306
- saveBtnLabel: [{ type: Input }],
24307
- cancelBtnLabel: [{ type: Input }],
24308
- discardBtnLabel: [{ type: Input }],
24309
- showErrorIcon: [{ type: Input }],
24310
- showZoomBtn: [{ type: Input }],
24311
- onCloseRequest: [{ type: Input }],
24312
- dialogStyle: [{ type: Input }],
24313
- size: [{ type: Input }],
24314
- title: [{ type: Input }],
24315
- loading: [{ type: Input }],
24316
- saveEmit: [{ type: Output }],
24317
- closeEmit: [{ type: Output }],
24318
- footerContent: [{ type: ContentChild, args: ["footerSlot", { static: false },] }]
24319
- };
24320
- return CommonDialogComponent;
24321
- }());
23886
+ // font family
23887
+ /** @type {?} */
23888
+ var fontFamily = {
23889
+ default: "Arial",
23890
+ items: [
23891
+ {
23892
+ text: "Arial",
23893
+ value: "Arial, Helvetica, sans-serif",
23894
+ cssClass: "e-arial",
23895
+ command: "Font",
23896
+ subCommand: "FontName",
23897
+ },
23898
+ {
23899
+ text: "Times New Roman",
23900
+ value: "Times New Roman,Times,serif",
23901
+ cssClass: "e-times-new-roman",
23902
+ command: "Font",
23903
+ subCommand: "FontName",
23904
+ },
23905
+ {
23906
+ text: "Helvetica",
23907
+ value: "Helvetica",
23908
+ cssClass: "e-helvetica",
23909
+ command: "Font",
23910
+ subCommand: "FontName",
23911
+ },
23912
+ {
23913
+ text: "Calibri",
23914
+ value: "Calibri, Helvetica, sans-serif",
23915
+ cssClass: "e-calibri",
23916
+ command: "Font",
23917
+ subCommand: "FontName",
23918
+ },
23919
+ {
23920
+ text: "Verdana",
23921
+ value: "Verdana,Geneva,sans-serif",
23922
+ cssClass: "e-verdana",
23923
+ command: "Font",
23924
+ subCommand: "FontName",
23925
+ },
23926
+ {
23927
+ text: "Georgia",
23928
+ value: "Georgia,serif",
23929
+ cssClass: "e-georgia",
23930
+ command: "Font",
23931
+ subCommand: "FontName",
23932
+ },
23933
+ {
23934
+ text: "Open Sans",
23935
+ value: "Open Sans, sans-serif",
23936
+ cssClass: "e-open-sans",
23937
+ command: "Font",
23938
+ subCommand: "FontName",
23939
+ },
23940
+ {
23941
+ text: "Roboto",
23942
+ value: "Roboto",
23943
+ cssClass: "e-roboto",
23944
+ command: "Font",
23945
+ subCommand: "FontName",
23946
+ },
23947
+ {
23948
+ text: "Lato",
23949
+ value: "Lato, sans-serif",
23950
+ cssClass: "e-lato",
23951
+ command: "Font",
23952
+ subCommand: "FontName",
23953
+ },
23954
+ {
23955
+ text: "Montserrat",
23956
+ value: "Montserrat, sans-serif",
23957
+ cssClass: "e-montserrat",
23958
+ command: "Font",
23959
+ subCommand: "FontName",
23960
+ },
23961
+ {
23962
+ text: "Segoe UI",
23963
+ value: "Segoe UI",
23964
+ cssClass: "e-segoe-ui",
23965
+ command: "Font",
23966
+ subCommand: "FontName",
23967
+ },
23968
+ {
23969
+ text: "Impact",
23970
+ value: "Impact,Charcoal,sans-serif",
23971
+ cssClass: "e-impact",
23972
+ command: "Font",
23973
+ subCommand: "FontName",
23974
+ },
23975
+ ],
23976
+ };
23977
+ // line height配置
23978
+ /** @type {?} */
23979
+ var lineHeight_items = [
23980
+ {
23981
+ text: "1.0",
23982
+ },
23983
+ {
23984
+ text: "1.15",
23985
+ },
23986
+ {
23987
+ text: "1.5",
23988
+ },
23989
+ {
23990
+ text: "2.0",
23991
+ },
23992
+ {
23993
+ text: "2.5",
23994
+ },
23995
+ {
23996
+ text: "3.0",
23997
+ },
23998
+ ];
23999
+ /**
24000
+ * @record
24001
+ */
24002
+ function BulletStyle() { }
24322
24003
  if (false) {
24323
24004
  /** @type {?} */
24324
- CommonDialogComponent.prototype.translation;
24325
- /** @type {?} */
24326
- CommonDialogComponent.prototype.hideHeader;
24327
- /** @type {?} */
24328
- CommonDialogComponent.prototype.hideCloseIcon;
24329
- /** @type {?} */
24330
- CommonDialogComponent.prototype.hideCloseBtn;
24331
- /** @type {?} */
24332
- CommonDialogComponent.prototype.hideSaveBtn;
24333
- /** @type {?} */
24334
- CommonDialogComponent.prototype.hideDiscardBtn;
24335
- /** @type {?} */
24336
- CommonDialogComponent.prototype.saveBtnLabel;
24337
- /** @type {?} */
24338
- CommonDialogComponent.prototype.cancelBtnLabel;
24339
- /** @type {?} */
24340
- CommonDialogComponent.prototype.discardBtnLabel;
24341
- /** @type {?} */
24342
- CommonDialogComponent.prototype.showErrorIcon;
24343
- /** @type {?} */
24344
- CommonDialogComponent.prototype.showZoomBtn;
24345
- /** @type {?} */
24346
- CommonDialogComponent.prototype.onCloseRequest;
24347
- /** @type {?} */
24348
- CommonDialogComponent.prototype.dialogStyle;
24349
- /** @type {?} */
24350
- CommonDialogComponent.prototype.size;
24351
- /** @type {?} */
24352
- CommonDialogComponent.prototype.title;
24353
- /** @type {?} */
24354
- CommonDialogComponent.prototype.loading;
24355
- /** @type {?} */
24356
- CommonDialogComponent.prototype.saveEmit;
24357
- /** @type {?} */
24358
- CommonDialogComponent.prototype.closeEmit;
24005
+ BulletStyle.prototype.id;
24359
24006
  /** @type {?} */
24360
- CommonDialogComponent.prototype.defaultSize;
24007
+ BulletStyle.prototype.text;
24361
24008
  /** @type {?} */
24362
- CommonDialogComponent.prototype.footerContent;
24009
+ BulletStyle.prototype.symbol;
24363
24010
  /** @type {?} */
24364
- CommonDialogComponent.prototype.customFooter;
24011
+ BulletStyle.prototype.iconCss;
24365
24012
  /** @type {?} */
24366
- CommonDialogComponent.prototype.dialogRef;
24013
+ BulletStyle.prototype.description;
24014
+ }
24015
+ /** @type {?} */
24016
+ var BULLET_STYLES = [
24017
+ {
24018
+ id: "disc",
24019
+ text: "● 实心圆点",
24020
+ symbol: "●",
24021
+ iconCss: "e-icons e-bullet-disc",
24022
+ description: "标准实心圆点",
24023
+ },
24024
+ {
24025
+ id: "circle",
24026
+ text: "○ 空心圆点",
24027
+ symbol: "○",
24028
+ iconCss: "e-icons e-bullet-circle",
24029
+ description: "空心圆点",
24030
+ },
24031
+ {
24032
+ id: "square",
24033
+ text: "■ 实心方块",
24034
+ symbol: "■",
24035
+ iconCss: "e-icons e-bullet-square",
24036
+ description: "实心方块",
24037
+ },
24038
+ {
24039
+ id: "diamond",
24040
+ text: "◆ 实心菱形",
24041
+ symbol: "◆",
24042
+ iconCss: "e-icons e-bullet-diamond",
24043
+ description: "实心菱形",
24044
+ },
24045
+ {
24046
+ id: "triangle",
24047
+ text: "► 实心三角",
24048
+ symbol: "►",
24049
+ iconCss: "e-icons e-bullet-triangle",
24050
+ description: "实心三角形",
24051
+ },
24052
+ {
24053
+ id: "arrow",
24054
+ text: "➤ 箭头",
24055
+ symbol: "➤",
24056
+ iconCss: "e-icons e-bullet-arrow",
24057
+ description: "箭头符号",
24058
+ },
24059
+ {
24060
+ id: "star",
24061
+ text: "★ 星形",
24062
+ symbol: "★",
24063
+ iconCss: "e-icons e-bullet-star",
24064
+ description: "星形符号",
24065
+ },
24066
+ {
24067
+ id: "check",
24068
+ text: "✓ 对勾",
24069
+ symbol: "✓",
24070
+ iconCss: "e-icons e-bullet-check",
24071
+ description: "对勾符号",
24072
+ },
24073
+ {
24074
+ id: "heart",
24075
+ text: "♥ 心形",
24076
+ symbol: "♥",
24077
+ iconCss: "e-icons e-bullet-heart",
24078
+ description: "心形符号",
24079
+ },
24080
+ {
24081
+ id: "bullet",
24082
+ text: "• 小圆点",
24083
+ symbol: "•",
24084
+ iconCss: "e-icons e-bullet-bullet",
24085
+ description: "小圆点",
24086
+ },
24087
+ ];
24088
+ // 获取符号样式
24089
+ /**
24090
+ * @param {?} id
24091
+ * @return {?}
24092
+ */
24093
+ function getBulletStyle(id) {
24094
+ return BULLET_STYLES.find((/**
24095
+ * @param {?} style
24096
+ * @return {?}
24097
+ */
24098
+ function (style) { return style.id === id; }));
24099
+ }
24100
+ // 获取所有符号样式
24101
+ /**
24102
+ * @return {?}
24103
+ */
24104
+ function getAllBulletStyles() {
24105
+ return BULLET_STYLES;
24106
+ }
24107
+ // 应用符号样式到列表
24108
+ /**
24109
+ * @param {?} ul
24110
+ * @param {?} style
24111
+ * @return {?}
24112
+ */
24113
+ function applyBulletStyle(ul, style) {
24114
+ if (style.id === "disc" || style.id === "circle" || style.id === "square") {
24115
+ // 使用CSS list-style-type
24116
+ ul.style.listStyleType = style.id;
24117
+ // 移除自定义符号
24118
+ ul.querySelectorAll(".custom-bullet").forEach((/**
24119
+ * @param {?} bullet
24120
+ * @return {?}
24121
+ */
24122
+ function (bullet) { return bullet.remove(); }));
24123
+ }
24124
+ else {
24125
+ // 使用自定义符号
24126
+ ul.style.listStyleType = "none";
24127
+ ul.setAttribute("data-bullet-style", style.id);
24128
+ /** @type {?} */
24129
+ var listItems = ul.querySelectorAll("li");
24130
+ listItems.forEach((/**
24131
+ * @param {?} li
24132
+ * @return {?}
24133
+ */
24134
+ function (li) {
24135
+ // 移除现有的自定义符号
24136
+ /** @type {?} */
24137
+ var existingBullet = li.querySelector(".custom-bullet");
24138
+ if (existingBullet) {
24139
+ existingBullet.remove();
24140
+ }
24141
+ // 添加新的自定义符号
24142
+ /** @type {?} */
24143
+ var bullet = document.createElement("span");
24144
+ bullet.className = "custom-bullet";
24145
+ bullet.textContent = style.symbol;
24146
+ bullet.style.marginRight = "8px";
24147
+ bullet.style.color = "#666";
24148
+ // 将符号插入到列表项的开头
24149
+ li.insertBefore(bullet, li.firstChild);
24150
+ }));
24151
+ }
24367
24152
  }
24368
24153
 
24369
24154
  /**
24370
24155
  * @fileoverview added by tsickle
24371
- * Generated from: lib/service/icon-loader.service.ts
24156
+ * Generated from: lib/form/richtexteditor/index.component.ts
24372
24157
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24373
24158
  */
24374
- var IconLoaderService = /** @class */ (function () {
24375
- function IconLoaderService(registry, domSanitizer) {
24376
- this.registry = registry;
24377
- this.domSanitizer = domSanitizer;
24159
+ var RichtexteditorComponent = /** @class */ (function () {
24160
+ function RichtexteditorComponent(ref) {
24161
+ this.ref = ref;
24162
+ // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
24163
+ this.placeholder = "";
24164
+ this.value = "";
24165
+ this.height = 150;
24166
+ this.autoSaveOnIdle = true;
24167
+ this.target = "#container"; // dialog 弹窗父级
24168
+ // dialog 弹窗父级
24169
+ this.toolbarClick = new EventEmitter();
24170
+ this.change = new EventEmitter();
24171
+ // @Output() change = new EventEmitter();
24172
+ this.family = fontFamily;
24173
+ this.dialogWidth = "800px";
24174
+ this.dialogHeight = "642px";
24175
+ this.showZoomBtn = true;
24176
+ this.showMsg = false;
24177
+ this.insertImageSettings = {
24178
+ saveFormat: "Blob",
24179
+ allowedTypes: [".svg", ".png"],
24180
+ display: "none",
24181
+ };
24182
+ this.size = "";
24183
+ this.dropValIndex = 0;
24184
+ this.queryList = [
24185
+ { id: "Rephrase", text: "Rephrase" },
24186
+ { id: "Grammar", text: "Correct Grammar" },
24187
+ { id: "Summarize", text: "Summarize" },
24188
+ { id: "Elaborate", text: "Elaborate" },
24189
+ { id: "Translate", text: "Translate" },
24190
+ { id: "SentimentAnalysis", text: "Sentiment Analysis" },
24191
+ ];
24192
+ this.rephraseTyleList = [
24193
+ { text: "Standard", id: "Standard" },
24194
+ { text: "Fluent", id: "Fluent" },
24195
+ { text: "Professional", id: "Professional" },
24196
+ ];
24197
+ this.languageList = [
24198
+ { id: "EN", text: "English" },
24199
+ { id: "ZH", text: "Chinese (Simplified)" },
24200
+ { id: "ES", text: "Spanish" },
24201
+ { id: "ZHT", text: "Chinese (Traditional)" },
24202
+ { id: "HI", text: "Hindi" },
24203
+ { id: "AR", text: "Arabic" },
24204
+ { id: "BN", text: "Bengali" },
24205
+ { id: "PT", text: "Portuguese" },
24206
+ { id: "RU", text: "Russian" },
24207
+ { id: "JA", text: "Japanese" },
24208
+ { id: "DE", text: "German" },
24209
+ { id: "KO", text: "Korean" },
24210
+ { id: "FR", text: "French" },
24211
+ { id: "IT", text: "Italian" },
24212
+ { id: "TR", text: "Turkish" },
24213
+ ];
24214
+ this.promptQuery = "";
24215
+ this.isSentimentCheck = false;
24216
+ this.subQuery = "";
24217
+ this.chipValue = "Standard";
24218
+ this.tools = {
24219
+ enableFloating: false,
24220
+ items: [
24221
+ {
24222
+ tooltipText: "AI Assist",
24223
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="ai_assistant_button_tbar" style="width:100%"><div class="e-rte-dropdown-btn-text">AI Assist</div></button>',
24224
+ },
24225
+ "Bold",
24226
+ "Italic",
24227
+ "Underline",
24228
+ "StrikeThrough",
24229
+ "FontName",
24230
+ "FontSize",
24231
+ "FontColor",
24232
+ "BackgroundColor",
24233
+ "LowerCase",
24234
+ "UpperCase",
24235
+ "|",
24236
+ "CreateTable",
24237
+ "Formats",
24238
+ "Alignments",
24239
+ {
24240
+ tooltipText: "Line Height",
24241
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
24242
+ },
24243
+ "OrderedList",
24244
+ "UnorderedList",
24245
+ "Outdent",
24246
+ "Indent",
24247
+ "|",
24248
+ "CreateLink",
24249
+ {
24250
+ tooltipText: "",
24251
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
24252
+ '<div class="e-tbar-btn-text" style="font-weight: 500;"><img src="/assets/img/file-icon.svg" style="position: relative;top: -2px;"/><div class="uploadActions"><div id="uploadFromUser">Computer File</div><div id="relationDom">Ticket Attachment</div></div></div></button>',
24253
+ },
24254
+ "|",
24255
+ "FormatPainter",
24256
+ "ClearFormat",
24257
+ "|",
24258
+ "Undo",
24259
+ "Redo",
24260
+ ],
24261
+ };
24378
24262
  }
24379
24263
  /**
24380
- * @param {?} list
24381
24264
  * @return {?}
24382
24265
  */
24383
- IconLoaderService.prototype.registerIcons = /**
24384
- * @param {?} list
24266
+ RichtexteditorComponent.prototype.ngOnInit = /**
24385
24267
  * @return {?}
24386
24268
  */
24387
- function (list) {
24388
- var _this = this;
24389
- list.forEach((/**
24390
- * @param {?} __0
24269
+ function () { };
24270
+ /**
24271
+ * @param {?} args
24272
+ * @return {?}
24273
+ */
24274
+ RichtexteditorComponent.prototype.onContentChange = /**
24275
+ * @param {?} args
24276
+ * @return {?}
24277
+ */
24278
+ function (args) {
24279
+ /** @type {?} */
24280
+ var tables = document.querySelectorAll("table.e-rte-table");
24281
+ tables.forEach((/**
24282
+ * @param {?} table
24391
24283
  * @return {?}
24392
24284
  */
24393
- function (_a) {
24394
- var name = _a.name, path = _a.path;
24395
- _this.registry.addSvgIcon(name, _this.domSanitizer.bypassSecurityTrustResourceUrl(path));
24285
+ function (table) {
24286
+ /** @type {?} */
24287
+ var htmlTable = (/** @type {?} */ (table));
24288
+ htmlTable.style.marginBottom = "10px";
24289
+ htmlTable.style.borderCollapse = "collapse";
24290
+ htmlTable.style.emptyCells = "show";
24291
+ /** @type {?} */
24292
+ var tdElements = table.querySelectorAll("td");
24293
+ tdElements.forEach((/**
24294
+ * @param {?} td
24295
+ * @return {?}
24296
+ */
24297
+ function (td) {
24298
+ td.style.border = "1px solid #adb5bd";
24299
+ td.style.height = "20px";
24300
+ td.style.minWidth = "20px";
24301
+ td.style.padding = "2px 5px";
24302
+ td.style.boxSizing = "border-box";
24303
+ }));
24396
24304
  }));
24305
+ this.change.emit(args);
24397
24306
  };
24398
- IconLoaderService.decorators = [
24399
- { type: Injectable }
24400
- ];
24401
- /** @nocollapse */
24402
- IconLoaderService.ctorParameters = function () { return [
24403
- { type: MatIconRegistry },
24404
- { type: DomSanitizer }
24405
- ]; };
24406
- return IconLoaderService;
24407
- }());
24408
- if (false) {
24409
- /**
24410
- * @type {?}
24411
- * @private
24412
- */
24413
- IconLoaderService.prototype.registry;
24414
- /**
24415
- * @type {?}
24416
- * @private
24417
- */
24418
- IconLoaderService.prototype.domSanitizer;
24419
- }
24420
-
24421
- /**
24422
- * @fileoverview added by tsickle
24423
- * Generated from: lib/service/keep-alive.service.ts
24424
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24425
- */
24426
- /** @type {?} */
24427
- var storedRoutes = new Map();
24428
- /** @type {?} */
24429
- var toBeDeleteUrl;
24430
- /** @type {?} */
24431
- var excludeRoutes = [];
24432
- // 不需要缓存的url
24433
- var KeepAliveService = /** @class */ (function () {
24434
- function KeepAliveService() {
24435
- }
24436
24307
  /**
24437
- * @param {?} routes
24438
24308
  * @return {?}
24439
24309
  */
24440
- KeepAliveService.prototype.setExcludeRoutes = /**
24441
- * @param {?} routes
24310
+ RichtexteditorComponent.prototype.onCreate = /**
24442
24311
  * @return {?}
24443
24312
  */
24444
- function (routes) {
24445
- excludeRoutes = routes; // 设置不缓存的路由
24313
+ function () {
24314
+ var _this = this;
24315
+ //bind the a click event
24316
+ // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
24317
+ // editorContent.addEventListener('click', this.OnClicked.bind(this));
24318
+ //add the line height
24319
+ this.editorManager = this.rteObj.formatter.editorManager;
24320
+ /** @type {?} */
24321
+ var splitButton = new DropDownButton({
24322
+ items: lineHeight_items,
24323
+ iconCss: "e-icons e-line-spacing",
24324
+ select: this.onSelect.bind(this),
24325
+ });
24326
+ splitButton.appendTo("#lineheight_tbar");
24327
+ // ai assist
24328
+ /** @type {?} */
24329
+ var aiassistantButton = new DropDownButton({
24330
+ items: this.queryList,
24331
+ // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
24332
+ select: (/**
24333
+ * @param {?} args
24334
+ * @return {?}
24335
+ */
24336
+ function (args) { return _this.aiQuerySelectedMenu(args); }),
24337
+ });
24338
+ aiassistantButton.appendTo("#ai_assistant_button_tbar");
24446
24339
  };
24447
24340
  /**
24448
- * @param {?} route
24341
+ * @private
24342
+ * @param {?} args
24449
24343
  * @return {?}
24450
24344
  */
24451
- KeepAliveService.prototype.shouldDetach = /**
24452
- * @param {?} route
24345
+ RichtexteditorComponent.prototype.onSelect = /**
24346
+ * @private
24347
+ * @param {?} args
24453
24348
  * @return {?}
24454
24349
  */
24455
- function (route) {
24456
- /** @type {?} */
24457
- var config = route.routeConfig;
24458
- // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
24459
- if (toBeDeleteUrl === this.getRoutePath(route)) {
24460
- // 对于新开的又即将关闭的tab,不缓存
24461
- if (route.children.length === 0) {
24462
- toBeDeleteUrl = "";
24463
- }
24464
- return false;
24350
+ function (args) {
24351
+ if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
24352
+ this.rteObj.formatter.saveData();
24465
24353
  }
24466
- if (config && excludeRoutes.includes(this.getRoutePath(route))) {
24467
- return false;
24354
+ /** @type {?} */
24355
+ var nodes = this.editorManager.domNode.blockNodes();
24356
+ for (var i = 0; nodes.length > i; i++) {
24357
+ ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
24468
24358
  }
24469
- //Don't store lazy loaded routes
24470
- return config && !config.loadChildren;
24359
+ this.rteObj.formatter.saveData();
24360
+ this.rteObj.formatter.enableUndo(this.rteObj);
24471
24361
  };
24472
24362
  /**
24473
- * @param {?} route
24474
- * @param {?} handle
24363
+ * @private
24364
+ * @param {?} args
24475
24365
  * @return {?}
24476
24366
  */
24477
- KeepAliveService.prototype.store = /**
24478
- * @param {?} route
24479
- * @param {?} handle
24367
+ RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
24368
+ * @private
24369
+ * @param {?} args
24480
24370
  * @return {?}
24481
24371
  */
24482
- function (route, handle) {
24483
- // console.log("store", this.getRoutePath(route));
24484
- // console.log("store", storedRoutes);
24485
- /** @type {?} */
24486
- var key = this.getRoutePath(route);
24487
- storedRoutes.set(key, handle);
24372
+ function (args) {
24373
+ this.dialogueOpen(args.item.text);
24488
24374
  };
24489
24375
  /**
24490
- * @param {?} route
24376
+ * @param {?} selectedQuery
24491
24377
  * @return {?}
24492
24378
  */
24493
- KeepAliveService.prototype.shouldAttach = /**
24494
- * @param {?} route
24379
+ RichtexteditorComponent.prototype.dialogueOpen = /**
24380
+ * @param {?} selectedQuery
24495
24381
  * @return {?}
24496
24382
  */
24497
- function (route) {
24383
+ function (selectedQuery) {
24384
+ var _this = this;
24498
24385
  /** @type {?} */
24499
- var key = this.getRoutePath(route);
24500
- return !!route.routeConfig && storedRoutes.has(key);
24386
+ var selectionText = this.rteObj.getSelectedHtml();
24387
+ this.selectedQuery = selectedQuery;
24388
+ if (selectionText) {
24389
+ /** @type {?} */
24390
+ var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
24391
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
24392
+ this.dropValIndex = this.queryList.findIndex((/**
24393
+ * @param {?} q
24394
+ * @return {?}
24395
+ */
24396
+ function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
24397
+ this.queryCategory.index = this.dropValIndex;
24398
+ this.leftRte.value = this.promptQuery = selectionText;
24399
+ this.leftRte.refreshUI();
24400
+ this.AIdialog.show();
24401
+ this.updateAISugesstionsData(selectedQuery);
24402
+ }
24403
+ else {
24404
+ this.showMsg = true;
24405
+ setTimeout((/**
24406
+ * @return {?}
24407
+ */
24408
+ function () {
24409
+ _this.showMsg = false;
24410
+ }), 3000);
24411
+ console.log("Please select the content to perform the AI operation.");
24412
+ }
24501
24413
  };
24502
24414
  /**
24503
- * @param {?} route
24415
+ * @param {?} selectedQuery
24504
24416
  * @return {?}
24505
24417
  */
24506
- KeepAliveService.prototype.retrieve = /**
24507
- * @param {?} route
24418
+ RichtexteditorComponent.prototype.updateAISugesstionsData = /**
24419
+ * @param {?} selectedQuery
24508
24420
  * @return {?}
24509
24421
  */
24510
- function (route) {
24511
- /** @type {?} */
24512
- var config = route.routeConfig;
24513
- /** @type {?} */
24514
- var key = this.getRoutePath(route);
24515
- //We don't store lazy loaded routes, so don't even bother trying to retrieve them
24516
- if (!config || config.loadChildren) {
24517
- return false;
24422
+ function (selectedQuery) {
24423
+ this.isSentimentCheck = false;
24424
+ switch (selectedQuery) {
24425
+ case "Summarize":
24426
+ this.subQuery = "Summarize the upcoming sentence shortly.";
24427
+ break;
24428
+ case "Elaborate":
24429
+ this.subQuery = "Elaborate on the upcoming sentence.";
24430
+ break;
24431
+ case "Rephrase":
24432
+ this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
24433
+ break;
24434
+ case "Correct Grammar":
24435
+ this.subQuery = "Correct the grammar of the upcoming sentence.";
24436
+ break;
24437
+ case "Translate":
24438
+ this.subQuery =
24439
+ "Translate the upcoming sentence to " + this.translatelanguage + ".";
24440
+ break;
24441
+ case "Sentiment Analysis":
24442
+ this.isSentimentCheck = true;
24443
+ this.subQuery =
24444
+ 'Analyze the sentiment and grammar of the following paragraphs and provide the expression score with an emoji followed by the sentiment in the format: "😊 Neutral". \n\nNOTE: Avoid any additional text or explanation:';
24445
+ break;
24518
24446
  }
24519
- return storedRoutes.get(key) || null;
24447
+ this.updateAISugesstions();
24520
24448
  };
24521
24449
  /**
24522
- * @param {?} future
24523
- * @param {?} curr
24524
24450
  * @return {?}
24525
24451
  */
24526
- KeepAliveService.prototype.shouldReuseRoute = /**
24527
- * @param {?} future
24528
- * @param {?} curr
24452
+ RichtexteditorComponent.prototype.updateAISugesstions = /**
24529
24453
  * @return {?}
24530
24454
  */
24531
- function (future, curr) {
24532
- // console.log("shouldReuseRoute", future, curr);
24533
- // return future.routeConfig === curr.routeConfig;
24534
- if (future.routeConfig === curr.routeConfig) {
24535
- if (future.children.length === 0 && curr.children.length === 0) {
24536
- // 无子路由时, 通过params和queryParams判断是否复用路由
24537
- return (JSON.stringify(future.params) === JSON.stringify(curr.params));
24455
+ function () {
24456
+ var _this = this;
24457
+ try {
24458
+ if (this.promptQuery) {
24459
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24460
+ "";
24461
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24462
+ "none";
24463
+ this.sentimentButton.element.style.display = "none";
24464
+ this.regenerateButton.disabled = true;
24465
+ this.copyButton.disabled = true;
24466
+ this.replaceButton.disabled = true;
24467
+ this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
24468
+ this.apiResultData.then((/**
24469
+ * @param {?} result
24470
+ * @return {?}
24471
+ */
24472
+ function (result) {
24473
+ _this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
24474
+ _this.sentimentButton.content = result
24475
+ .toLowerCase()
24476
+ .includes("positive")
24477
+ ? "😊 Positive"
24478
+ : result.toLowerCase().includes("negative")
24479
+ ? "😞 Negative"
24480
+ : "😐 Neutral";
24481
+ _this.sentimentButton.element.style.display = !_this.isSentimentCheck
24482
+ ? "none"
24483
+ : "";
24484
+ _this.rightRte.value = _this.AIResult;
24485
+ /** @type {?} */
24486
+ var noResultsFound = !(_this.AIResult || _this.promptQuery);
24487
+ ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
24488
+ _this.regenerateButton.disabled = noResultsFound;
24489
+ _this.copyButton.disabled = noResultsFound;
24490
+ _this.replaceButton.disabled = noResultsFound;
24491
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24492
+ "none";
24493
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24494
+ noResultsFound ? "none" : "";
24495
+ console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
24496
+ // this.ref.markForCheck();
24497
+ }));
24538
24498
  }
24539
- return true;
24540
24499
  }
24541
- return false;
24500
+ catch (_a) {
24501
+ // this.toastObj.show();
24502
+ }
24542
24503
  };
24543
24504
  /**
24544
- * @param {?} route
24505
+ * @param {?} subQuery
24506
+ * @param {?} promptQuery
24545
24507
  * @return {?}
24546
24508
  */
24547
- KeepAliveService.prototype.getRoutePath = /**
24548
- * @param {?} route
24509
+ RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
24510
+ * @param {?} subQuery
24511
+ * @param {?} promptQuery
24549
24512
  * @return {?}
24550
24513
  */
24551
- function (route) {
24552
- if (route.routeConfig) {
24553
- // const pathParams = JSON.stringify(route.params);
24554
- // const queryParams = new URLSearchParams(route.queryParams).toString();
24514
+ function (subQuery, promptQuery) {
24515
+ return __awaiter(this, void 0, void 0, function () {
24516
+ var content;
24517
+ return __generator(this, function (_a) {
24518
+ switch (_a.label) {
24519
+ case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
24520
+ case 1:
24521
+ content = _a.sent();
24522
+ return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
24523
+ }
24524
+ });
24525
+ });
24526
+ };
24527
+ /**
24528
+ * @return {?}
24529
+ */
24530
+ RichtexteditorComponent.prototype.dialogShow = /**
24531
+ * @return {?}
24532
+ */
24533
+ function () {
24534
+ var _this = this;
24535
+ (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
24536
+ * @return {?}
24537
+ */
24538
+ function () {
24539
+ _this.updateAISugesstions();
24540
+ }));
24541
+ (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
24542
+ * @return {?}
24543
+ */
24544
+ function () {
24545
+ _this.copyTextToClipboard(_this.AIResult);
24546
+ }));
24547
+ (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
24548
+ * @return {?}
24549
+ */
24550
+ function () {
24555
24551
  /** @type {?} */
24556
- var url = route._urlSegment.segments.map((/**
24557
- * @param {?} v
24558
- * @return {?}
24559
- */
24560
- function (v) { return v.path; })).join("/");
24561
- return "/" + url;
24562
- }
24563
- return "";
24552
+ var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
24553
+ ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
24554
+ ((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
24555
+ undo: true,
24556
+ });
24557
+ _this.closeDialog();
24558
+ }));
24559
+ ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
24564
24560
  };
24565
24561
  /**
24566
- * @param {?} path
24567
24562
  * @return {?}
24568
24563
  */
24569
- KeepAliveService.prototype.clearCache = /**
24570
- * @param {?} path
24564
+ RichtexteditorComponent.prototype.closeDialog = /**
24571
24565
  * @return {?}
24572
24566
  */
24573
- function (path) {
24574
- // console.log("clearCache", storedRoutes, path);
24575
- toBeDeleteUrl = path;
24576
- storedRoutes.delete(path);
24567
+ function () {
24568
+ this.AIdialog.hide();
24569
+ this.rightRte.value = "";
24570
+ this.leftRte.value = "";
24571
+ this.promptQuery = "";
24572
+ this.chipValue = "Standard";
24573
+ this.AIResult = "";
24574
+ this.dropValIndex = 0;
24575
+ this.selectedQuery = "Rephrase";
24576
+ this.sentimentButton.content = "😊 Neutral";
24577
24577
  };
24578
24578
  /**
24579
+ * @param {?} text
24579
24580
  * @return {?}
24580
24581
  */
24581
- KeepAliveService.prototype.clearAllCache = /**
24582
+ RichtexteditorComponent.prototype.copyTextToClipboard = /**
24583
+ * @param {?} text
24582
24584
  * @return {?}
24583
24585
  */
24584
- function () {
24585
- storedRoutes.clear();
24586
+ function (text) {
24587
+ if (navigator.clipboard) {
24588
+ navigator.clipboard
24589
+ .writeText(text)
24590
+ .then((/**
24591
+ * @return {?}
24592
+ */
24593
+ function () {
24594
+ console.log("Text copied to clipboard successfully!");
24595
+ }))
24596
+ .catch((/**
24597
+ * @param {?} err
24598
+ * @return {?}
24599
+ */
24600
+ function (err) {
24601
+ console.error("Failed to copy text: ", err);
24602
+ }));
24603
+ }
24604
+ else {
24605
+ // Fallback for browsers that do not support the Clipboard API
24606
+ /** @type {?} */
24607
+ var textarea = document.createElement("textarea");
24608
+ textarea.value = text;
24609
+ document.body.appendChild(textarea);
24610
+ textarea.select();
24611
+ try {
24612
+ document.execCommand("copy");
24613
+ console.log("Text copied to clipboard using execCommand");
24614
+ }
24615
+ catch (err) {
24616
+ console.error("Failed to copy text: ", err);
24617
+ }
24618
+ finally {
24619
+ document.body.removeChild(textarea);
24620
+ }
24621
+ }
24586
24622
  };
24587
- KeepAliveService.decorators = [
24588
- { type: Injectable, args: [{
24589
- providedIn: "root",
24590
- },] }
24591
- ];
24592
- /** @nocollapse */ KeepAliveService.ngInjectableDef = ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
24593
- return KeepAliveService;
24594
- }());
24595
-
24596
- /**
24597
- * @fileoverview added by tsickle
24598
- * Generated from: lib/form/confirm-select/index.component.ts
24599
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24600
- */
24601
- var ConfirmSelectComponent = /** @class */ (function () {
24602
- function ConfirmSelectComponent() {
24603
- this.dataSource = [];
24604
- this.disabled = false;
24605
- this.fields = { text: "Game", value: "Id" };
24606
- this.showSelectAll = true;
24607
- this.valueChange = new EventEmitter();
24608
- this.selectedItems = [];
24609
- this.isInteracted = false;
24610
- }
24611
24623
  /**
24612
24624
  * @return {?}
24613
24625
  */
24614
- ConfirmSelectComponent.prototype.ngOnInit = /**
24626
+ RichtexteditorComponent.prototype.onOverlayClick = /**
24615
24627
  * @return {?}
24616
24628
  */
24617
24629
  function () {
24618
- this.getInfo();
24619
- this.resetSelectedItems();
24630
+ /** @type {?} */
24631
+ var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
24632
+ if (activeEle) {
24633
+ activeEle.classList.remove("e-active");
24634
+ }
24635
+ this.closeDialog();
24620
24636
  };
24621
24637
  /**
24622
- * @param {?} changes
24638
+ * @param {?} args
24623
24639
  * @return {?}
24624
24640
  */
24625
- ConfirmSelectComponent.prototype.ngOnChanges = /**
24626
- * @param {?} changes
24641
+ RichtexteditorComponent.prototype.onQuerySelect = /**
24642
+ * @param {?} args
24627
24643
  * @return {?}
24628
24644
  */
24629
- function (changes) {
24630
- if (changes.value && !changes.value.firstChange) {
24631
- this.resetSelectedItems();
24632
- }
24645
+ function (args) {
24646
+ // this.chipList.selectedChips = 0;
24647
+ this.translatelanguage = "EN";
24648
+ this.selectedQuery = args.itemData.text;
24649
+ this.updateAISugesstionsData(args.itemData.text);
24633
24650
  };
24634
24651
  /**
24652
+ * @param {?} args
24635
24653
  * @return {?}
24636
24654
  */
24637
- ConfirmSelectComponent.prototype.getInfo = /**
24655
+ RichtexteditorComponent.prototype.onLanguageSelect = /**
24656
+ * @param {?} args
24638
24657
  * @return {?}
24639
24658
  */
24640
- function () {
24641
- this.translation = JSON.parse(localStorage.getItem("translation"));
24659
+ function (args) {
24660
+ this.translatelanguage = args.itemData.id;
24661
+ this.updateAISugesstionsData("Translate");
24642
24662
  };
24643
24663
  /**
24664
+ * @param {?} args
24644
24665
  * @return {?}
24645
24666
  */
24646
- ConfirmSelectComponent.prototype.resetSelectedItems = /**
24667
+ RichtexteditorComponent.prototype.onChipClick = /**
24668
+ * @param {?} args
24647
24669
  * @return {?}
24648
24670
  */
24649
- function () {
24650
- this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
24651
- if (this.comfirmSelect) {
24652
- this.comfirmSelect.value = this.selectedItems;
24653
- }
24671
+ function (args) {
24672
+ this.chipValue = args.itemData.text;
24673
+ // 事件会触发两次 必须判断args.text是否有值
24674
+ if (args.itemData.text)
24675
+ this.updateAISugesstionsData("Rephrase");
24654
24676
  };
24655
24677
  /**
24678
+ * @param {?} args
24656
24679
  * @return {?}
24657
24680
  */
24658
- ConfirmSelectComponent.prototype.onCancel = /**
24681
+ RichtexteditorComponent.prototype._toolbarClick = /**
24682
+ * @param {?} args
24659
24683
  * @return {?}
24660
24684
  */
24661
- function () {
24662
- this.isInteracted = true;
24663
- this.resetSelectedItems();
24664
- this.comfirmSelect.hidePopup();
24685
+ function (args) {
24686
+ this.toolbarClick.emit(args);
24665
24687
  };
24666
24688
  /**
24667
24689
  * @return {?}
24668
24690
  */
24669
- ConfirmSelectComponent.prototype.onApply = /**
24691
+ RichtexteditorComponent.prototype.hideToast = /**
24670
24692
  * @return {?}
24671
24693
  */
24672
24694
  function () {
24673
- this.isInteracted = true;
24674
- /** @type {?} */
24675
- var val = this.comfirmSelect.value;
24676
- this.valueChange.emit(val);
24677
- this.comfirmSelect.hidePopup();
24695
+ this.showMsg = false;
24678
24696
  };
24679
24697
  /**
24680
- * @param {?} e
24681
24698
  * @return {?}
24682
24699
  */
24683
- ConfirmSelectComponent.prototype.onClose = /**
24684
- * @param {?} e
24700
+ RichtexteditorComponent.prototype.onZoom = /**
24685
24701
  * @return {?}
24686
24702
  */
24687
- function (e) {
24688
- if (this.isInteracted) {
24689
- this.isInteracted = false;
24703
+ function () {
24704
+ if (this.size === "largest") {
24705
+ this.size = ""; // 恢复到原始大小
24690
24706
  }
24691
24707
  else {
24692
- this.resetSelectedItems();
24708
+ this.size = "largest"; // 设置为最大化
24693
24709
  }
24694
24710
  };
24695
- ConfirmSelectComponent.decorators = [
24711
+ RichtexteditorComponent.decorators = [
24696
24712
  { type: Component, args: [{
24697
- selector: "rs-confirm-select",
24698
- template: "<div class=\"rs-confirm-select\">\r\n <ejs-multiselect\r\n #comfirmSelect\r\n [dataSource]=\"dataSource\"\r\n [showDropDownIcon]=\"true\"\r\n [placeholder]=\"placeholder\"\r\n [(ngModel)]=\"selectedItems\"\r\n [fields]=\"fields\"\r\n [showSelectAll]=\"showSelectAll\"\r\n mode=\"CheckBox\"\r\n [footerTemplate]=\"footerTemplate\"\r\n [showClearButton]=\"false\"\r\n (close)=\"onClose($event)\"\r\n filterType=\"Contains\"\r\n >\r\n <ng-template #footerTemplate=\"\" let-data=\"data\">\r\n <div class=\"confirm-select-footer\">\r\n <button class=\"e-btn\" (click)=\"onCancel()\">\r\n {{ translation.CANCEL }}\r\n </button>\r\n <button class=\"e-btn e-primary\" (click)=\"onApply()\">\r\n {{ translation.APPLY }}\r\n </button>\r\n </div>\r\n </ng-template>\r\n </ejs-multiselect>\r\n</div>\r\n",
24699
- styles: [".confirm-select-footer{display:flex;align-items:center;justify-content:flex-end;padding:0 12px;gap:12px;height:40px;border-top:solid 1px var(--rs-border-color)}"]
24713
+ selector: "rs-richtext-editor",
24714
+ template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n id=\"editor\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [fontFamily]=\"family\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n <ejs-dialog\r\n #AIdialog\r\n id=\"AIdialog\"\r\n [ngClass]=\"size\"\r\n [visible]=\"false\"\r\n [target]=\"target\"\r\n [isModal]=\"true\"\r\n [height]=\"dialogHeight\"\r\n [width]=\"dialogWidth\"\r\n maxHeight=\"80%\"\r\n cssClass=\"e-rte-elements custom-dialog-rte\"\r\n zIndex=\"1000\"\r\n (close)=\"closeDialog()\"\r\n (overlayClick)=\"onOverlayClick()\"\r\n (open)=\"dialogShow()\"\r\n >\r\n <ng-template #header>\r\n <div class=\"header-title\">AI Assist</div>\r\n <div class=\"header-buttons\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-zoom\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div class=\"header-btn\" (click)=\"closeDialog()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #footerTemplate>\r\n <div id=\"dialog-footer-content\">\r\n <div class=\"custom-row-0\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"width: 100%; align-items: center; justify-content: left\"\r\n ></div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: right; width: 100%\">\r\n <button\r\n ejs-button\r\n #sentimentButton\r\n content=\"\uD83D\uDE0A Neutral\"\r\n disabled=\"false\"\r\n cssClass=\"sentiment\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #copyButton\r\n content=\"Copy\"\r\n disabled=\"false\"\r\n class=\"copy-btn\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #replaceButton\r\n content=\"Replace\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #content>\r\n <div class=\"dialog-content\" style=\"height: 100%\">\r\n <div class=\"custom-row-0\">\r\n <div class=\"cuscol-0\" style=\"width: 100%\">\r\n <ejs-dropdownlist\r\n #queryCategory\r\n style=\"width: 200px\"\r\n id=\"queryCategory\"\r\n [dataSource]=\"queryList\"\r\n index=\"0\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onQuerySelect($event)\"\r\n >\r\n Rephrase\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Rephrase'\"\r\n id=\"chips-container\"\r\n #chipList\r\n style=\"width: 160px\"\r\n [(ngModel)]=\"chipValue\"\r\n [dataSource]=\"rephraseTyleList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onChipClick($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Translate'\"\r\n #languageCategory\r\n index=\"0\"\r\n id=\"language-Category\"\r\n [dataSource]=\"languageList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onLanguageSelect($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <!-- <ejs-chiplist\r\n id=\"chips-container\"\r\n #chipList\r\n [chips]=\"['Standard', 'Fluent', 'Professional']\"\r\n selection=\"Single\"\r\n cssClass=\"e-outline\"\r\n [selectedChips]=\"[0]\"\r\n (click)=\"onChipClick($event)\"\r\n >\r\n </ejs-chiplist> -->\r\n <button\r\n ejs-button\r\n #regenerateButton\r\n content=\"Regenerate\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"custom-row-1\" style=\"height: calc(100% - 40px)\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: left;\r\n \"\r\n >\r\n <div style=\"text-align: left; height: 100%\">\r\n <ejs-richtexteditor\r\n #leftRte\r\n id=\"leftRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n </ejs-richtexteditor>\r\n </div>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: left; width: 100%; height: 100%\">\r\n <ejs-richtexteditor\r\n #rightRte\r\n id=\"rightRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n <!-- style=\"display: none\" -->\r\n </ejs-richtexteditor>\r\n <div\r\n class=\"no-results-found\"\r\n id=\"no-results-found\"\r\n style=\"display: none; height: 244px; align-content: center\"\r\n >\r\n <img\r\n height=\"50\"\r\n width=\"50\"\r\n src=\"https://storage.googleapis.com/cdn-bolddesk/agent-angular-app/images/light/no-records-warning.svg\"\r\n />\r\n <div>No results found</div>\r\n </div>\r\n <div id=\"skeletonId\" style=\"display: none\">\r\n <ejs-skeleton\r\n #skeletonId1\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"100%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId2\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"90%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId3\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"70%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId4\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"50%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId5\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"30%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId6\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"10%\"\r\n ></ejs-skeleton\r\n ><br />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ejs-dialog>\r\n <div class=\"toast\" *ngIf=\"showMsg\">\r\n <span class=\"toast_text\">First, Select some text</span\r\n ><span class=\"close_icon\" (click)=\"hideToast()\"></span>\r\n </div>\r\n</div>\r\n",
24715
+ styles: [".editor_box{position:relative;width:100%;height:100%}.editor_box .toast{position:absolute;left:35%;top:110px;z-index:1;width:400px;border-radius:4px;border:1px solid #e8f2ff;background:#f4f8ff;padding:4px 12px;color:#1f3f5c;font-size:12px;font-style:normal;font-weight:400;height:32px;font-family:Arial;display:flex;align-items:center;justify-content:space-between}.editor_box .toast .toast_text::before{content:url(../../../assets/img/info.svg);display:inline-block;width:16px;height:16px;vertical-align:bottom;margin-right:8px}.editor_box .toast .close_icon{background-image:url(../../../assets/img/notification-close.svg);cursor:pointer;display:inline-block;width:16px;height:16px}.custom-dialog-rte{padding:0 20px;border-radius:10px}.custom-row-0,.custom-row-1,.custom-row-2{display:flex;align-items:center;padding:12px 24px}.e-rte-dropdown-btn-text{padding-left:4px}.no-results-found{text-align:center}.no-results-found img{display:block;margin:0 auto}.e-custom{margin-right:.5rem;border-radius:25px!important}.custom-dialog-rte .skeleton-rectangle{border-radius:4px}@media (max-width:767px){.cuscol-0,.cuscol-1,.cuscol-2{justify-content:center!important}.custom-row-0,.custom-row-1,.custom-row-2{flex-direction:column!important}.cuscol-1{border-right:none!important}.cuscol-0{width:100%;align-items:center}::ng-deep:host .e-dialog{max-height:80%!important}.custom-dialog-rte .e-dialog .e-dlg-content{overflow-y:auto!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor{height:100px!important}.cuscol-noresult{padding-bottom:20px!important}.e-chip-list{padding:5px!important}.cuscol{padding-right:.2rem!important;width:auto!important}.custom-row-1{height:auto!important}}.cuscol-1{display:flex;flex-direction:row!important}.cuscol-2{display:flex;flex-direction:column!important}.sentiment{color:#000!important}.custom-dialog-rte .e-dialog .e-dlg-content{padding:0!important;overflow-y:hidden}.custom-dialog-rte .e-dialog .e-dlg-header-content{padding:20px 0!important;border:0!important}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header{display:flex;align-items:center;line-height:18px;justify-content:space-between}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header .header-title{font-family:Arial;font-size:15px;font-weight:700;font-style:normal}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons{display:flex}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons img{width:16px;height:16px;cursor:pointer;padding:2px;margin-left:12px}.custom-dialog-rte .e-dialog .e-footer-content{padding:0!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor.e-rte-tb-expand .e-rte-content,.e-richtexteditor.e-rte-tb-expand .e-source-content{border:0;border-bottom:1px solid #dee2e6;border-top:0 solid #dee2e6!important}.custom-dialog-rte .dialog-content .custom-row-0{border-top:0 solid #ddd!important;padding:0;margin-bottom:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-0{justify-content:left;border-right:none!important;padding:0;display:flex;gap:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1{padding:0;margin-left:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1 .e-primary{color:#44566c;border-radius:4px;border:1px solid #dbe1e7;background:#fff;width:87px;margin:0;padding:2px 12px;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;height:28px}.custom-dialog-rte .dialog-content .custom-row-1{padding:0;height:calc(100% - 40px);gap:12px}.custom-dialog-rte .e-footer-content{border:0}.custom-dialog-rte .e-footer-content .custom-row-0{padding:20px 0}.custom-dialog-rte .e-footer-content .e-control.e-btn{font-family:Arial;font-size:12px;line-height:14px;padding:2px 12px;height:28px;background:#fff;color:#44566c}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn{border-color:#dbe1e7}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn::before{content:url(../../../assets/img/editor-copy.svg);vertical-align:middle;margin-right:6px}.custom-dialog-rte .e-footer-content .e-control.e-btn.e-primary{color:#fff;background:#1364b3}.editor_box .e-dialog.largest{width:96vw!important;height:88vh!important;max-height:88vh;max-width:2100px}"]
24700
24716
  }] }
24701
24717
  ];
24702
- ConfirmSelectComponent.propDecorators = {
24703
- comfirmSelect: [{ type: ViewChild, args: ["comfirmSelect", { static: false },] }],
24704
- value: [{ type: Input }],
24705
- dataSource: [{ type: Input }],
24706
- disabled: [{ type: Input }],
24707
- fields: [{ type: Input }],
24718
+ /** @nocollapse */
24719
+ RichtexteditorComponent.ctorParameters = function () { return [
24720
+ { type: ChangeDetectorRef }
24721
+ ]; };
24722
+ RichtexteditorComponent.propDecorators = {
24723
+ rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
24724
+ queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
24725
+ leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
24726
+ rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
24727
+ AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
24728
+ sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
24729
+ regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
24730
+ copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
24731
+ replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
24708
24732
  placeholder: [{ type: Input }],
24709
- showSelectAll: [{ type: Input }],
24710
- valueChange: [{ type: Output }]
24733
+ value: [{ type: Input }],
24734
+ height: [{ type: Input }],
24735
+ autoSaveOnIdle: [{ type: Input }],
24736
+ target: [{ type: Input }],
24737
+ toolbarClick: [{ type: Output }],
24738
+ change: [{ type: Output }]
24711
24739
  };
24712
- return ConfirmSelectComponent;
24740
+ return RichtexteditorComponent;
24713
24741
  }());
24714
24742
  if (false) {
24715
24743
  /** @type {?} */
24716
- ConfirmSelectComponent.prototype.comfirmSelect;
24744
+ RichtexteditorComponent.prototype.rteObj;
24717
24745
  /** @type {?} */
24718
- ConfirmSelectComponent.prototype.value;
24746
+ RichtexteditorComponent.prototype.queryCategory;
24719
24747
  /** @type {?} */
24720
- ConfirmSelectComponent.prototype.dataSource;
24748
+ RichtexteditorComponent.prototype.leftRte;
24721
24749
  /** @type {?} */
24722
- ConfirmSelectComponent.prototype.disabled;
24750
+ RichtexteditorComponent.prototype.rightRte;
24723
24751
  /** @type {?} */
24724
- ConfirmSelectComponent.prototype.fields;
24752
+ RichtexteditorComponent.prototype.AIdialog;
24725
24753
  /** @type {?} */
24726
- ConfirmSelectComponent.prototype.placeholder;
24754
+ RichtexteditorComponent.prototype.sentimentButton;
24727
24755
  /** @type {?} */
24728
- ConfirmSelectComponent.prototype.showSelectAll;
24756
+ RichtexteditorComponent.prototype.regenerateButton;
24729
24757
  /** @type {?} */
24730
- ConfirmSelectComponent.prototype.valueChange;
24758
+ RichtexteditorComponent.prototype.copyButton;
24731
24759
  /** @type {?} */
24732
- ConfirmSelectComponent.prototype.translation;
24760
+ RichtexteditorComponent.prototype.replaceButton;
24733
24761
  /** @type {?} */
24734
- ConfirmSelectComponent.prototype.selectedItems;
24762
+ RichtexteditorComponent.prototype.placeholder;
24735
24763
  /** @type {?} */
24736
- ConfirmSelectComponent.prototype.isInteracted;
24764
+ RichtexteditorComponent.prototype.value;
24765
+ /** @type {?} */
24766
+ RichtexteditorComponent.prototype.height;
24767
+ /** @type {?} */
24768
+ RichtexteditorComponent.prototype.autoSaveOnIdle;
24769
+ /** @type {?} */
24770
+ RichtexteditorComponent.prototype.target;
24771
+ /** @type {?} */
24772
+ RichtexteditorComponent.prototype.toolbarClick;
24773
+ /** @type {?} */
24774
+ RichtexteditorComponent.prototype.change;
24775
+ /** @type {?} */
24776
+ RichtexteditorComponent.prototype.family;
24777
+ /** @type {?} */
24778
+ RichtexteditorComponent.prototype.dialogWidth;
24779
+ /** @type {?} */
24780
+ RichtexteditorComponent.prototype.dialogHeight;
24781
+ /** @type {?} */
24782
+ RichtexteditorComponent.prototype.showZoomBtn;
24783
+ /** @type {?} */
24784
+ RichtexteditorComponent.prototype.showMsg;
24785
+ /** @type {?} */
24786
+ RichtexteditorComponent.prototype.insertImageSettings;
24787
+ /** @type {?} */
24788
+ RichtexteditorComponent.prototype.editorManager;
24789
+ /** @type {?} */
24790
+ RichtexteditorComponent.prototype.size;
24791
+ /** @type {?} */
24792
+ RichtexteditorComponent.prototype.selectedQuery;
24793
+ /** @type {?} */
24794
+ RichtexteditorComponent.prototype.dropValIndex;
24795
+ /** @type {?} */
24796
+ RichtexteditorComponent.prototype.queryList;
24797
+ /** @type {?} */
24798
+ RichtexteditorComponent.prototype.rephraseTyleList;
24799
+ /** @type {?} */
24800
+ RichtexteditorComponent.prototype.languageList;
24801
+ /** @type {?} */
24802
+ RichtexteditorComponent.prototype.promptQuery;
24803
+ /** @type {?} */
24804
+ RichtexteditorComponent.prototype.isSentimentCheck;
24805
+ /** @type {?} */
24806
+ RichtexteditorComponent.prototype.subQuery;
24807
+ /** @type {?} */
24808
+ RichtexteditorComponent.prototype.translatelanguage;
24809
+ /** @type {?} */
24810
+ RichtexteditorComponent.prototype.chipValue;
24811
+ /** @type {?} */
24812
+ RichtexteditorComponent.prototype.apiResultData;
24813
+ /** @type {?} */
24814
+ RichtexteditorComponent.prototype.AIResult;
24815
+ /** @type {?} */
24816
+ RichtexteditorComponent.prototype.tools;
24817
+ /**
24818
+ * @type {?}
24819
+ * @private
24820
+ */
24821
+ RichtexteditorComponent.prototype.ref;
24737
24822
  }
24738
24823
 
24739
24824
  /**
@@ -24964,5 +25049,5 @@ var RaiseCommonLibModule = /** @class */ (function () {
24964
25049
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24965
25050
  */
24966
25051
 
24967
- export { CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RichtexteditorComponent, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, ConfirmSelectComponent as ɵb, NewActionNotificationComponent as ɵc, CommonDeleteComponent as ɵd };
25052
+ export { CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, RichtexteditorComponent as ɵb, ConfirmSelectComponent as ɵc, NewActionNotificationComponent as ɵd, CommonDeleteComponent as ɵe };
24968
25053
  //# sourceMappingURL=raise-common-lib.js.map