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
 
@@ -1523,7 +1523,7 @@ NewActionNotificationComponent.decorators = [
1523
1523
  { type: Component, args: [{
1524
1524
  selector: "kt-new-action-notification",
1525
1525
  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",
1526
- 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}"]
1526
+ 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}"]
1527
1527
  }] }
1528
1528
  ];
1529
1529
  /** @nocollapse */
@@ -2462,7 +2462,7 @@ RsPageTabComponent.decorators = [
2462
2462
  { type: Component, args: [{
2463
2463
  selector: "rs-page-tab",
2464
2464
  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",
2465
- 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}"]
2465
+ 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}"]
2466
2466
  }] }
2467
2467
  ];
2468
2468
  RsPageTabComponent.propDecorators = {
@@ -3594,7 +3594,7 @@ DrawerComponent.decorators = [
3594
3594
  { type: Component, args: [{
3595
3595
  selector: "rs-drawer",
3596
3596
  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",
3597
- 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}"]
3597
+ 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}"]
3598
3598
  }] }
3599
3599
  ];
3600
3600
  /** @nocollapse */
@@ -21459,12 +21459,15 @@ const EmailPattern = /^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(
21459
21459
  * Generated from: lib/form/drawer-form/drawer-form.component.ts
21460
21460
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
21461
21461
  */
21462
+ /** @type {?} */
21463
+ const FORM_PROXY_TAG = Symbol.for("form-proxy");
21462
21464
  class DrawerFormComponent {
21463
21465
  /**
21464
21466
  * @param {?} ref
21465
21467
  */
21466
21468
  constructor(ref) {
21467
21469
  this.ref = ref;
21470
+ this._form = {};
21468
21471
  this._sections = [];
21469
21472
  this.optionsMap = {};
21470
21473
  this.formDisabled = false;
@@ -21476,12 +21479,14 @@ class DrawerFormComponent {
21476
21479
  groupBy: null,
21477
21480
  };
21478
21481
  this.showFilterNumber = 10;
21479
- this.form = {};
21482
+ this.dateFormat = "yyyy-MM-dd";
21480
21483
  this.formChange = new EventEmitter();
21481
21484
  this.fieldChange = new EventEmitter();
21482
21485
  this.sections = [];
21483
- this.filterOptionsMap = {};
21486
+ this.form = {};
21484
21487
  this.fieldValidMap = {};
21488
+ // 存储 datepicker 的值
21489
+ this.dateForm = {};
21485
21490
  this.dateValidMap = {};
21486
21491
  this.scrollIndex = 0;
21487
21492
  this.isClickAnchor = false;
@@ -21495,13 +21500,19 @@ class DrawerFormComponent {
21495
21500
  * @return {?}
21496
21501
  */
21497
21502
  ngOnChanges(changes) {
21503
+ if (changes._form) {
21504
+ if (!changes._form.currentValue[FORM_PROXY_TAG]) {
21505
+ this.form = this.getFormProxy(changes._form.currentValue);
21506
+ this.formChange.emit(this.form);
21507
+ }
21508
+ if (!changes._form.firstChange) {
21509
+ this.checkFormChange(changes._form.previousValue, changes._form.currentValue);
21510
+ }
21511
+ }
21498
21512
  if (changes._sections) {
21499
21513
  this.sections = filterShowSection(changes._sections.currentValue);
21500
21514
  this.formatForm(this.sections);
21501
21515
  }
21502
- if (changes.form && !changes.form.firstChange) {
21503
- this.checkFormChange(changes.form.previousValue, changes.form.currentValue);
21504
- }
21505
21516
  }
21506
21517
  /**
21507
21518
  * @return {?}
@@ -21612,6 +21623,21 @@ class DrawerFormComponent {
21612
21623
  }
21613
21624
  }));
21614
21625
  }
21626
+ /**
21627
+ * @param {?} field
21628
+ * @param {?} value
21629
+ * @return {?}
21630
+ */
21631
+ syncFormToDateForm(field, value) {
21632
+ if (value) {
21633
+ /** @type {?} */
21634
+ const date = moment(value);
21635
+ this.dateForm[field.formKey] = date.isValid() ? date.toDate() : null;
21636
+ }
21637
+ else {
21638
+ this.dateForm[field.formKey] = null;
21639
+ }
21640
+ }
21615
21641
  /**
21616
21642
  * @param {?} sections
21617
21643
  * @return {?}
@@ -21627,28 +21653,67 @@ class DrawerFormComponent {
21627
21653
  * @return {?}
21628
21654
  */
21629
21655
  (field) => {
21630
- if (this.form[field.formKey] === undefined) {
21631
- switch (field.fieldFormType) {
21632
- case "Text":
21633
- case "Email":
21634
- case "Textarea":
21656
+ switch (field.fieldFormType) {
21657
+ case "Text":
21658
+ case "Email":
21659
+ case "Textarea":
21660
+ if (this.form[field.formKey] === undefined) {
21635
21661
  this.form[field.formKey] = "";
21636
- break;
21637
- case "Tags":
21638
- case "Checkbox":
21639
- case "MultiSelect":
21662
+ }
21663
+ break;
21664
+ case "Tags":
21665
+ case "Checkbox":
21666
+ case "MultiSelect":
21667
+ if (!Array.isArray(this.form[field.formKey])) {
21640
21668
  this.form[field.formKey] = [];
21641
- break;
21642
- case "Switch":
21643
- this.form[field.formKey] = false;
21644
- break;
21645
- default:
21669
+ }
21670
+ break;
21671
+ case "Switch":
21672
+ this.form[field.formKey] = !!this.form[field.formKey];
21673
+ break;
21674
+ case "Datepicker":
21675
+ this.syncFormToDateForm(field, this.form[field.formKey]);
21676
+ break;
21677
+ default:
21678
+ if (this.form[field.formKey] === undefined) {
21646
21679
  this.form[field.formKey] = null;
21647
- }
21680
+ }
21648
21681
  }
21649
21682
  }));
21650
21683
  }));
21651
21684
  }
21685
+ /**
21686
+ * @param {?} form
21687
+ * @return {?}
21688
+ */
21689
+ getFormProxy(form) {
21690
+ // 现在除了 tag 之外不支持嵌套 form 属性,只对浅层进行处理
21691
+ /** @type {?} */
21692
+ const proxyForm = new Proxy(form, {
21693
+ set: (/**
21694
+ * @param {?} target
21695
+ * @param {?} prop
21696
+ * @param {?} value
21697
+ * @return {?}
21698
+ */
21699
+ (target, prop, value) => {
21700
+ target[prop] = value;
21701
+ /** @type {?} */
21702
+ const field = this.getField(prop);
21703
+ if (field && field.fieldFormType === "Datepicker") {
21704
+ this.syncFormToDateForm(field, value);
21705
+ }
21706
+ return true;
21707
+ }),
21708
+ });
21709
+ Object.defineProperty(proxyForm, FORM_PROXY_TAG, {
21710
+ value: true,
21711
+ writable: false,
21712
+ enumerable: false,
21713
+ configurable: false,
21714
+ });
21715
+ return proxyForm;
21716
+ }
21652
21717
  // 表单提交前会触发这个函数
21653
21718
  /**
21654
21719
  * @param {?} value
@@ -21656,11 +21721,8 @@ class DrawerFormComponent {
21656
21721
  * @return {?}
21657
21722
  */
21658
21723
  updateForm(value, field) {
21659
- /** @type {?} */
21660
- const newForm = Object.assign({}, this.form, { [field.formKey]: value });
21661
- // 修复错误提示显示 bug,不设置一下有概率拿不到最新的值
21662
- this.form = newForm;
21663
- this.formChange.emit(newForm);
21724
+ this.form[field.formKey] = value;
21725
+ this.formChange.emit(this.form);
21664
21726
  this.fieldChange.emit({ field, value });
21665
21727
  }
21666
21728
  /**
@@ -21784,13 +21846,14 @@ class DrawerFormComponent {
21784
21846
  if (!event.isInteracted) {
21785
21847
  return;
21786
21848
  }
21787
- /** @type {?} */
21788
- let value = event.value;
21789
- if (field.fieldFormType === "Datepicker") {
21790
- /** @type {?} */
21791
- const date = moment(value);
21792
- value = date.isValid() ? date.format("YYYY-MM-DD") : null;
21849
+ if (field.fieldFormType !== "Datepicker") {
21850
+ this.onChange(event.value, field);
21851
+ return;
21793
21852
  }
21853
+ console.log("change", event);
21854
+ /** @type {?} */
21855
+ const value = event.value ? moment(event.value).format("YYYY-MM-DD") : null;
21856
+ this.dateForm[field.formKey] = event.value;
21794
21857
  this.onChange(value, field);
21795
21858
  }
21796
21859
  /**
@@ -21809,16 +21872,19 @@ class DrawerFormComponent {
21809
21872
  */
21810
21873
  onDatePickerBlur(event, field) {
21811
21874
  this.onBlur(field);
21812
- /** @type {?} */
21813
- const $input = event.model.element.querySelector("input");
21814
- if (!$input || !$input.value) {
21815
- delete this.dateValidMap[field.formKey];
21816
- return;
21817
- }
21818
- /** @type {?} */
21819
- const date = moment($input.value);
21820
- this.onChange(date.isValid() ? date.format("YYYY-MM-DD") : null, field);
21821
- this.dateValidMap[field.formKey] = date.isValid();
21875
+ setTimeout((/**
21876
+ * @return {?}
21877
+ */
21878
+ () => {
21879
+ /** @type {?} */
21880
+ const $input = event.model.element.querySelector("input");
21881
+ if ($input && $input.value && !this.dateForm[field.formKey]) {
21882
+ this.dateValidMap[field.formKey] = false;
21883
+ }
21884
+ else {
21885
+ delete this.dateValidMap[field.formKey];
21886
+ }
21887
+ }), 50);
21822
21888
  }
21823
21889
  /**
21824
21890
  * @param {?} field
@@ -21845,19 +21911,20 @@ class DrawerFormComponent {
21845
21911
  if (event.text) {
21846
21912
  query.where(this.optionFields.text, "contains", event.text, true);
21847
21913
  }
21848
- event.updateData(this.optionsMap[field.optionKey] || [], query);
21914
+ event.updateData(this.getOptions(field), query);
21849
21915
  }
21850
21916
  /**
21851
21917
  * @param {?} field
21852
21918
  * @return {?}
21853
21919
  */
21854
- getValue(field) {
21855
- if (field.fieldFormType === "Datepicker" && this.form[field.formKey]) {
21856
- /** @type {?} */
21857
- const date = moment(this.form[field.formKey]);
21858
- return date.isValid() ? date.toDate() : null;
21920
+ getOptions(field) {
21921
+ if (Array.isArray(this.optionsMap[field.optionKey])) {
21922
+ return this.optionsMap[field.optionKey];
21859
21923
  }
21860
- return this.form[field.formKey];
21924
+ if (Array.isArray(this.optionsMap[field.formKey])) {
21925
+ return this.optionsMap[field.formKey];
21926
+ }
21927
+ return [];
21861
21928
  }
21862
21929
  /**
21863
21930
  * @param {?} field
@@ -21959,8 +22026,8 @@ class DrawerFormComponent {
21959
22026
  DrawerFormComponent.decorators = [
21960
22027
  { type: Component, args: [{
21961
22028
  selector: "rs-drawer-form",
21962
- 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",
21963
- 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}"]
22029
+ 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",
22030
+ 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}"]
21964
22031
  }] }
21965
22032
  ];
21966
22033
  /** @nocollapse */
@@ -21968,15 +22035,17 @@ DrawerFormComponent.ctorParameters = () => [
21968
22035
  { type: ChangeDetectorRef }
21969
22036
  ];
21970
22037
  DrawerFormComponent.propDecorators = {
22038
+ _form: [{ type: Input, args: ["form",] }],
21971
22039
  _sections: [{ type: Input, args: ["sections",] }],
21972
22040
  optionsMap: [{ type: Input, args: ["optionsMap",] }],
21973
- customTemplate: [{ type: Input, args: ["customTemplate",] }],
21974
- customSectionTemplate: [{ type: Input, args: ["customSectionTemplate",] }],
21975
22041
  formDisabled: [{ type: Input, args: ["disabled",] }],
21976
22042
  showAnchor: [{ type: Input, args: ["showAnchor",] }],
22043
+ customTemplate: [{ type: Input, args: ["customTemplate",] }],
22044
+ customSectionTemplate: [{ type: Input, args: ["customSectionTemplate",] }],
21977
22045
  optionFields: [{ type: Input, args: ["optionFields",] }],
21978
22046
  showFilterNumber: [{ type: Input, args: ["showFilterNumber",] }],
21979
- form: [{ type: Input, args: ["form",] }],
22047
+ numberFormat: [{ type: Input, args: ["numberFormat",] }],
22048
+ dateFormat: [{ type: Input, args: ["dateFormat",] }],
21980
22049
  formChange: [{ type: Output, args: ["formChange",] }],
21981
22050
  fieldChange: [{ type: Output, args: ["fieldChange",] }],
21982
22051
  rootEl: [{ type: ViewChild, args: ["drawerFormEl", { static: false },] }],
@@ -21985,24 +22054,28 @@ DrawerFormComponent.propDecorators = {
21985
22054
  sectionEls: [{ type: ViewChildren, args: ["sectionEl",] }]
21986
22055
  };
21987
22056
  if (false) {
22057
+ /** @type {?} */
22058
+ DrawerFormComponent.prototype._form;
21988
22059
  /** @type {?} */
21989
22060
  DrawerFormComponent.prototype._sections;
21990
22061
  /** @type {?} */
21991
22062
  DrawerFormComponent.prototype.optionsMap;
21992
22063
  /** @type {?} */
21993
- DrawerFormComponent.prototype.customTemplate;
21994
- /** @type {?} */
21995
- DrawerFormComponent.prototype.customSectionTemplate;
21996
- /** @type {?} */
21997
22064
  DrawerFormComponent.prototype.formDisabled;
21998
22065
  /** @type {?} */
21999
22066
  DrawerFormComponent.prototype.showAnchor;
22000
22067
  /** @type {?} */
22068
+ DrawerFormComponent.prototype.customTemplate;
22069
+ /** @type {?} */
22070
+ DrawerFormComponent.prototype.customSectionTemplate;
22071
+ /** @type {?} */
22001
22072
  DrawerFormComponent.prototype.optionFields;
22002
22073
  /** @type {?} */
22003
22074
  DrawerFormComponent.prototype.showFilterNumber;
22004
22075
  /** @type {?} */
22005
- DrawerFormComponent.prototype.form;
22076
+ DrawerFormComponent.prototype.numberFormat;
22077
+ /** @type {?} */
22078
+ DrawerFormComponent.prototype.dateFormat;
22006
22079
  /** @type {?} */
22007
22080
  DrawerFormComponent.prototype.formChange;
22008
22081
  /** @type {?} */
@@ -22022,10 +22095,12 @@ if (false) {
22022
22095
  /** @type {?} */
22023
22096
  DrawerFormComponent.prototype.sections;
22024
22097
  /** @type {?} */
22025
- DrawerFormComponent.prototype.filterOptionsMap;
22098
+ DrawerFormComponent.prototype.form;
22026
22099
  /** @type {?} */
22027
22100
  DrawerFormComponent.prototype.fieldValidMap;
22028
22101
  /** @type {?} */
22102
+ DrawerFormComponent.prototype.dateForm;
22103
+ /** @type {?} */
22029
22104
  DrawerFormComponent.prototype.dateValidMap;
22030
22105
  /** @type {?} */
22031
22106
  DrawerFormComponent.prototype.sectionEls;
@@ -22042,1587 +22117,1587 @@ if (false) {
22042
22117
 
22043
22118
  /**
22044
22119
  * @fileoverview added by tsickle
22045
- * Generated from: lib/form/richtexteditor/ai-config.ts
22120
+ * Generated from: lib/dialog/common-dialog/index.component.ts
22046
22121
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22047
22122
  */
22048
- /**
22049
- * @record
22050
- */
22051
- function AIConfig() { }
22123
+ class CommonDialogComponent {
22124
+ /**
22125
+ * @param {?} dialogRef
22126
+ */
22127
+ constructor(dialogRef) {
22128
+ this.dialogRef = dialogRef;
22129
+ // 隐藏元素相关属性
22130
+ this.hideHeader = false;
22131
+ this.hideCloseIcon = false;
22132
+ this.hideCloseBtn = false;
22133
+ this.hideSaveBtn = false;
22134
+ this.hideDiscardBtn = false;
22135
+ this.saveBtnLabel = "";
22136
+ this.cancelBtnLabel = "";
22137
+ this.discardBtnLabel = "";
22138
+ this.showErrorIcon = false;
22139
+ this.showZoomBtn = false;
22140
+ // 显示相关属性
22141
+ this.dialogStyle = {};
22142
+ this.size = "";
22143
+ this.title = "Dialog";
22144
+ this.loading = false;
22145
+ this.saveEmit = new EventEmitter();
22146
+ this.closeEmit = new EventEmitter();
22147
+ this.defaultSize = "";
22148
+ this.customFooter = false;
22149
+ }
22150
+ /**
22151
+ * @return {?}
22152
+ */
22153
+ ngAfterContentInit() {
22154
+ this.customFooter = !!this.footerContent;
22155
+ }
22156
+ /**
22157
+ * @return {?}
22158
+ */
22159
+ ngOnInit() {
22160
+ this.getInfo();
22161
+ }
22162
+ /**
22163
+ * @return {?}
22164
+ */
22165
+ onClose() {
22166
+ if (this.onCloseRequest) {
22167
+ this.onCloseRequest().then((/**
22168
+ * @param {?} confirmed
22169
+ * @return {?}
22170
+ */
22171
+ (confirmed) => {
22172
+ if (confirmed) {
22173
+ this.dialogRef.close("close");
22174
+ }
22175
+ }));
22176
+ }
22177
+ else {
22178
+ this.dialogRef.close("close");
22179
+ }
22180
+ }
22181
+ /**
22182
+ * @return {?}
22183
+ */
22184
+ onZoom() {
22185
+ if (this.size === "largest") {
22186
+ this.size = this.defaultSize; // 恢复到原始大小
22187
+ }
22188
+ else {
22189
+ this.size = "largest"; // 设置为最大化
22190
+ }
22191
+ }
22192
+ /**
22193
+ * @return {?}
22194
+ */
22195
+ onSave() {
22196
+ this.dialogRef.close("save");
22197
+ }
22198
+ /**
22199
+ * @return {?}
22200
+ */
22201
+ onDiscard() {
22202
+ this.dialogRef.close("discard");
22203
+ }
22204
+ /**
22205
+ * @private
22206
+ * @return {?}
22207
+ */
22208
+ getInfo() {
22209
+ this.translation = JSON.parse(localStorage.getItem("translation")) || {};
22210
+ this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
22211
+ this.cancelBtnLabel =
22212
+ this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
22213
+ this.defaultSize = this.size;
22214
+ }
22215
+ }
22216
+ CommonDialogComponent.decorators = [
22217
+ { type: Component, args: [{
22218
+ selector: "rs-common-dialog",
22219
+ 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",
22220
+ 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%)}"]
22221
+ }] }
22222
+ ];
22223
+ /** @nocollapse */
22224
+ CommonDialogComponent.ctorParameters = () => [
22225
+ { type: MatDialogRef }
22226
+ ];
22227
+ CommonDialogComponent.propDecorators = {
22228
+ hideHeader: [{ type: Input }],
22229
+ hideCloseIcon: [{ type: Input }],
22230
+ hideCloseBtn: [{ type: Input }],
22231
+ hideSaveBtn: [{ type: Input }],
22232
+ hideDiscardBtn: [{ type: Input }],
22233
+ saveBtnLabel: [{ type: Input }],
22234
+ cancelBtnLabel: [{ type: Input }],
22235
+ discardBtnLabel: [{ type: Input }],
22236
+ showErrorIcon: [{ type: Input }],
22237
+ showZoomBtn: [{ type: Input }],
22238
+ onCloseRequest: [{ type: Input }],
22239
+ dialogStyle: [{ type: Input }],
22240
+ size: [{ type: Input }],
22241
+ title: [{ type: Input }],
22242
+ loading: [{ type: Input }],
22243
+ saveEmit: [{ type: Output }],
22244
+ closeEmit: [{ type: Output }],
22245
+ footerContent: [{ type: ContentChild, args: ["footerSlot", { static: false },] }]
22246
+ };
22052
22247
  if (false) {
22053
22248
  /** @type {?} */
22054
- AIConfig.prototype.endpoint;
22249
+ CommonDialogComponent.prototype.translation;
22055
22250
  /** @type {?} */
22056
- AIConfig.prototype.apiKey;
22251
+ CommonDialogComponent.prototype.hideHeader;
22057
22252
  /** @type {?} */
22058
- AIConfig.prototype.deployment;
22253
+ CommonDialogComponent.prototype.hideCloseIcon;
22059
22254
  /** @type {?} */
22060
- AIConfig.prototype.apiVersion;
22255
+ CommonDialogComponent.prototype.hideCloseBtn;
22061
22256
  /** @type {?} */
22062
- AIConfig.prototype.enabled;
22063
- }
22064
- // 从环境配置获取AI配置
22065
- /**
22066
- * @return {?}
22067
- */
22068
- function getAIConfig() {
22069
- return {
22070
- endpoint: "https://aidevused.openai.azure.com/",
22071
- apiKey: "ccba76e279f64653a50ac4fee90afe5c",
22072
- deployment: "gpt-4",
22073
- apiVersion: "2025-01-01-preview",
22074
- enabled: true,
22075
- };
22076
- }
22077
- // 检查配置是否有效
22078
- /**
22079
- * @param {?} config
22080
- * @return {?}
22081
- */
22082
- function isAIConfigValid(config) {
22083
- // 检查是否为aidevused端点且有有效API密钥
22084
- return !!((config.endpoint &&
22085
- config.apiKey &&
22086
- config.deployment &&
22087
- config.enabled &&
22088
- config.endpoint === "https://aidevused.openai.azure.com/" &&
22089
- config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
22090
- );
22091
- }
22092
- // 从后端API获取AI配置(推荐方式)
22093
- /**
22094
- * @return {?}
22095
- * @this {*}
22096
- */
22097
- function getAIConfigFromBackend() {
22098
- return __awaiter(this, void 0, void 0, function* () {
22099
- try {
22100
- // 这里应该调用你的后端API来获取AI配置
22101
- // 例如:return await this.http.get('/api/ai-config');
22102
- // 临时返回默认配置
22103
- return getAIConfig();
22104
- }
22105
- catch (error) {
22106
- console.error("Failed to get AI config from backend:", error);
22107
- return getAIConfig();
22108
- }
22109
- });
22257
+ CommonDialogComponent.prototype.hideSaveBtn;
22258
+ /** @type {?} */
22259
+ CommonDialogComponent.prototype.hideDiscardBtn;
22260
+ /** @type {?} */
22261
+ CommonDialogComponent.prototype.saveBtnLabel;
22262
+ /** @type {?} */
22263
+ CommonDialogComponent.prototype.cancelBtnLabel;
22264
+ /** @type {?} */
22265
+ CommonDialogComponent.prototype.discardBtnLabel;
22266
+ /** @type {?} */
22267
+ CommonDialogComponent.prototype.showErrorIcon;
22268
+ /** @type {?} */
22269
+ CommonDialogComponent.prototype.showZoomBtn;
22270
+ /** @type {?} */
22271
+ CommonDialogComponent.prototype.onCloseRequest;
22272
+ /** @type {?} */
22273
+ CommonDialogComponent.prototype.dialogStyle;
22274
+ /** @type {?} */
22275
+ CommonDialogComponent.prototype.size;
22276
+ /** @type {?} */
22277
+ CommonDialogComponent.prototype.title;
22278
+ /** @type {?} */
22279
+ CommonDialogComponent.prototype.loading;
22280
+ /** @type {?} */
22281
+ CommonDialogComponent.prototype.saveEmit;
22282
+ /** @type {?} */
22283
+ CommonDialogComponent.prototype.closeEmit;
22284
+ /** @type {?} */
22285
+ CommonDialogComponent.prototype.defaultSize;
22286
+ /** @type {?} */
22287
+ CommonDialogComponent.prototype.footerContent;
22288
+ /** @type {?} */
22289
+ CommonDialogComponent.prototype.customFooter;
22290
+ /** @type {?} */
22291
+ CommonDialogComponent.prototype.dialogRef;
22110
22292
  }
22111
22293
 
22112
22294
  /**
22113
22295
  * @fileoverview added by tsickle
22114
- * Generated from: lib/form/richtexteditor/openapi.ts
22296
+ * Generated from: lib/service/icon-loader.service.ts
22115
22297
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22116
22298
  */
22117
- // import { testAIFunction } from './ai-test';
22118
- // testAIFunction();
22119
- // 使用fetch API发送请求到Azure OpenAI
22120
- /**
22121
- * @param {?} messages
22122
- * @param {?} config
22123
- * @return {?}
22124
- * @this {*}
22125
- */
22126
- function sendAIRequest(messages, config) {
22127
- return __awaiter(this, void 0, void 0, function* () {
22128
- try {
22129
- /** @type {?} */
22130
- const url = `${config.endpoint}/openai/deployments/${config.deployment}/chat/completions?api-version=${config.apiVersion}`;
22131
- /** @type {?} */
22132
- const url1 = `${config.endpoint}`;
22133
- /** @type {?} */
22134
- const response = yield fetch(url, {
22135
- method: 'POST',
22136
- headers: {
22137
- 'Content-Type': 'application/json',
22138
- 'api-key': config.apiKey,
22139
- },
22140
- body: JSON.stringify({
22141
- messages: messages,
22142
- max_tokens: 1000,
22143
- temperature: 0.7,
22144
- top_p: 1,
22145
- frequency_penalty: 0,
22146
- presence_penalty: 0,
22147
- }),
22148
- });
22149
- if (!response.ok) {
22150
- /** @type {?} */
22151
- const errorText = yield response.text();
22152
- throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`);
22153
- }
22154
- /** @type {?} */
22155
- const data = yield response.json();
22156
- if (!data.choices || !data.choices[0] || !data.choices[0].message) {
22157
- throw new Error('Invalid response format from AI service');
22158
- }
22159
- return data.choices[0].message.content;
22160
- }
22161
- catch (error) {
22162
- console.error('AI request failed:', error);
22163
- throw error;
22164
- }
22165
- });
22166
- }
22167
- // 备用方案:使用模拟数据(用于开发测试)
22168
- /**
22169
- * @param {?} subQuery
22170
- * @param {?} promptQuery
22171
- * @return {?}
22172
- */
22173
- function getMockAIResponse(subQuery, promptQuery) {
22174
- /** @type {?} */
22175
- const mockResponses = {
22176
- Rephrase: `Rephrased: ${promptQuery}`,
22177
- Grammar: `Corrected: ${promptQuery}`,
22178
- Summarize: `Summary: ${promptQuery.substring(0, 100)}...`,
22179
- Elaborate: `Elaborated: ${promptQuery} with additional details and context.`,
22180
- Translate: `Translated: ${promptQuery}`,
22181
- SentimentAnalysis: '😊 Positive',
22182
- };
22183
- for (const [key, value] of Object.entries(mockResponses)) {
22184
- if (subQuery.includes(key)) {
22185
- return value;
22186
- }
22299
+ class IconLoaderService {
22300
+ /**
22301
+ * @param {?} registry
22302
+ * @param {?} domSanitizer
22303
+ */
22304
+ constructor(registry, domSanitizer) {
22305
+ this.registry = registry;
22306
+ this.domSanitizer = domSanitizer;
22307
+ }
22308
+ /**
22309
+ * @param {?} list
22310
+ * @return {?}
22311
+ */
22312
+ registerIcons(list) {
22313
+ list.forEach((/**
22314
+ * @param {?} __0
22315
+ * @return {?}
22316
+ */
22317
+ ({ name, path }) => {
22318
+ this.registry.addSvgIcon(name, this.domSanitizer.bypassSecurityTrustResourceUrl(path));
22319
+ }));
22187
22320
  }
22188
- return `AI processed: ${promptQuery}`;
22189
- }
22190
- // 主要的AI请求方法
22191
- /**
22192
- * @param {?} subQuery
22193
- * @param {?} promptQuery
22194
- * @return {?}
22195
- * @this {*}
22196
- */
22197
- function OpenAiModelRTE(subQuery, promptQuery) {
22198
- return __awaiter(this, void 0, void 0, function* () {
22199
- try {
22200
- /** @type {?} */
22201
- const config = getAIConfig();
22202
- // 检查配置是否有效
22203
- if (!isAIConfigValid(config)) {
22204
- console.warn('AI configuration is incomplete or disabled, using mock response');
22205
- return getMockAIResponse(subQuery, promptQuery);
22206
- }
22207
- /** @type {?} */
22208
- const messages = [
22209
- {
22210
- role: 'system',
22211
- content: subQuery.includes('emoji followed by the sentiment in the format')
22212
- ? 'You are a helpful assistant. Please respond in string format.'
22213
- : "NOTE: Return same html format just do changes content only. don't change html formats.",
22214
- },
22215
- {
22216
- role: 'user',
22217
- content: `${subQuery} ${promptQuery}`,
22218
- },
22219
- ];
22220
- /** @type {?} */
22221
- const result = yield sendAIRequest(messages, config);
22222
- return result;
22223
- }
22224
- catch (error) {
22225
- console.error('AI request failed, using mock response:', error);
22226
- return getMockAIResponse(subQuery, promptQuery);
22227
- }
22228
- });
22229
- }
22230
- // 兼容性方法(保持向后兼容)
22231
- /**
22232
- * @param {?} options
22233
- * @return {?}
22234
- * @this {*}
22235
- */
22236
- function getAzureChatAIRequest(options) {
22237
- return __awaiter(this, void 0, void 0, function* () {
22238
- try {
22239
- /** @type {?} */
22240
- const config = getAIConfig();
22241
- if (!isAIConfigValid(config)) {
22242
- return null;
22243
- }
22244
- /** @type {?} */
22245
- const result = yield sendAIRequest(options.messages, config);
22246
- return result;
22247
- }
22248
- catch (err) {
22249
- console.error('Error occurred:', err);
22250
- return null;
22251
- }
22252
- });
22253
22321
  }
22254
- /**
22255
- * @param {?} prompt
22256
- * @return {?}
22257
- * @this {*}
22258
- */
22259
- function getAzureTextAIRequest(prompt) {
22260
- return __awaiter(this, void 0, void 0, function* () {
22261
- try {
22262
- /** @type {?} */
22263
- const config = getAIConfig();
22264
- if (!isAIConfigValid(config)) {
22265
- return undefined;
22266
- }
22267
- /** @type {?} */
22268
- const messages = [
22269
- {
22270
- role: 'user',
22271
- content: prompt,
22272
- },
22273
- ];
22274
- /** @type {?} */
22275
- const result = yield sendAIRequest(messages, config);
22276
- return result;
22277
- }
22278
- catch (err) {
22279
- console.error('Error occurred:', err);
22280
- return undefined;
22281
- }
22282
- });
22322
+ IconLoaderService.decorators = [
22323
+ { type: Injectable }
22324
+ ];
22325
+ /** @nocollapse */
22326
+ IconLoaderService.ctorParameters = () => [
22327
+ { type: MatIconRegistry },
22328
+ { type: DomSanitizer }
22329
+ ];
22330
+ if (false) {
22331
+ /**
22332
+ * @type {?}
22333
+ * @private
22334
+ */
22335
+ IconLoaderService.prototype.registry;
22336
+ /**
22337
+ * @type {?}
22338
+ * @private
22339
+ */
22340
+ IconLoaderService.prototype.domSanitizer;
22283
22341
  }
22284
22342
 
22285
22343
  /**
22286
22344
  * @fileoverview added by tsickle
22287
- * Generated from: lib/form/richtexteditor/data-config.ts
22345
+ * Generated from: lib/service/keep-alive.service.ts
22288
22346
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22289
22347
  */
22290
- // font family
22291
22348
  /** @type {?} */
22292
- const fontFamily = {
22293
- default: "Arial",
22294
- items: [
22295
- {
22296
- text: "Arial",
22297
- value: "Arial, Helvetica, sans-serif",
22298
- cssClass: "e-arial",
22299
- command: "Font",
22300
- subCommand: "FontName",
22301
- },
22302
- {
22303
- text: "Times New Roman",
22304
- value: "Times New Roman,Times,serif",
22305
- cssClass: "e-times-new-roman",
22306
- command: "Font",
22307
- subCommand: "FontName",
22308
- },
22309
- {
22310
- text: "Helvetica",
22311
- value: "Helvetica",
22312
- cssClass: "e-helvetica",
22313
- command: "Font",
22314
- subCommand: "FontName",
22315
- },
22316
- {
22317
- text: "Calibri",
22318
- value: "Calibri, Helvetica, sans-serif",
22319
- cssClass: "e-calibri",
22320
- command: "Font",
22321
- subCommand: "FontName",
22322
- },
22323
- {
22324
- text: "Verdana",
22325
- value: "Verdana,Geneva,sans-serif",
22326
- cssClass: "e-verdana",
22327
- command: "Font",
22328
- subCommand: "FontName",
22329
- },
22330
- {
22331
- text: "Georgia",
22332
- value: "Georgia,serif",
22333
- cssClass: "e-georgia",
22334
- command: "Font",
22335
- subCommand: "FontName",
22336
- },
22337
- {
22338
- text: "Open Sans",
22339
- value: "Open Sans, sans-serif",
22340
- cssClass: "e-open-sans",
22341
- command: "Font",
22342
- subCommand: "FontName",
22343
- },
22344
- {
22345
- text: "Roboto",
22346
- value: "Roboto",
22347
- cssClass: "e-roboto",
22348
- command: "Font",
22349
- subCommand: "FontName",
22350
- },
22351
- {
22352
- text: "Lato",
22353
- value: "Lato, sans-serif",
22354
- cssClass: "e-lato",
22355
- command: "Font",
22356
- subCommand: "FontName",
22357
- },
22358
- {
22359
- text: "Montserrat",
22360
- value: "Montserrat, sans-serif",
22361
- cssClass: "e-montserrat",
22362
- command: "Font",
22363
- subCommand: "FontName",
22364
- },
22365
- {
22366
- text: "Segoe UI",
22367
- value: "Segoe UI",
22368
- cssClass: "e-segoe-ui",
22369
- command: "Font",
22370
- subCommand: "FontName",
22371
- },
22372
- {
22373
- text: "Impact",
22374
- value: "Impact,Charcoal,sans-serif",
22375
- cssClass: "e-impact",
22376
- command: "Font",
22377
- subCommand: "FontName",
22378
- },
22379
- ],
22380
- };
22381
- // line height配置
22349
+ const storedRoutes = new Map();
22382
22350
  /** @type {?} */
22383
- const lineHeight_items = [
22384
- {
22385
- text: "1.0",
22386
- },
22387
- {
22388
- text: "1.15",
22389
- },
22390
- {
22391
- text: "1.5",
22392
- },
22393
- {
22394
- text: "2.0",
22395
- },
22396
- {
22397
- text: "2.5",
22398
- },
22399
- {
22400
- text: "3.0",
22401
- },
22402
- ];
22403
- /**
22404
- * @record
22405
- */
22406
- function BulletStyle() { }
22407
- if (false) {
22408
- /** @type {?} */
22409
- BulletStyle.prototype.id;
22410
- /** @type {?} */
22411
- BulletStyle.prototype.text;
22412
- /** @type {?} */
22413
- BulletStyle.prototype.symbol;
22414
- /** @type {?} */
22415
- BulletStyle.prototype.iconCss;
22416
- /** @type {?} */
22417
- BulletStyle.prototype.description;
22418
- }
22351
+ let toBeDeleteUrl;
22419
22352
  /** @type {?} */
22420
- const BULLET_STYLES = [
22421
- {
22422
- id: "disc",
22423
- text: "● 实心圆点",
22424
- symbol: "●",
22425
- iconCss: "e-icons e-bullet-disc",
22426
- description: "标准实心圆点",
22427
- },
22428
- {
22429
- id: "circle",
22430
- text: "○ 空心圆点",
22431
- symbol: "○",
22432
- iconCss: "e-icons e-bullet-circle",
22433
- description: "空心圆点",
22434
- },
22435
- {
22436
- id: "square",
22437
- text: "■ 实心方块",
22438
- symbol: "■",
22439
- iconCss: "e-icons e-bullet-square",
22440
- description: "实心方块",
22441
- },
22442
- {
22443
- id: "diamond",
22444
- text: "◆ 实心菱形",
22445
- symbol: "◆",
22446
- iconCss: "e-icons e-bullet-diamond",
22447
- description: "实心菱形",
22448
- },
22449
- {
22450
- id: "triangle",
22451
- text: "► 实心三角",
22452
- symbol: "►",
22453
- iconCss: "e-icons e-bullet-triangle",
22454
- description: "实心三角形",
22455
- },
22456
- {
22457
- id: "arrow",
22458
- text: "➤ 箭头",
22459
- symbol: "➤",
22460
- iconCss: "e-icons e-bullet-arrow",
22461
- description: "箭头符号",
22462
- },
22463
- {
22464
- id: "star",
22465
- text: "★ 星形",
22466
- symbol: "★",
22467
- iconCss: "e-icons e-bullet-star",
22468
- description: "星形符号",
22469
- },
22470
- {
22471
- id: "check",
22472
- text: "✓ 对勾",
22473
- symbol: "✓",
22474
- iconCss: "e-icons e-bullet-check",
22475
- description: "对勾符号",
22476
- },
22477
- {
22478
- id: "heart",
22479
- text: "♥ 心形",
22480
- symbol: "♥",
22481
- iconCss: "e-icons e-bullet-heart",
22482
- description: "心形符号",
22483
- },
22484
- {
22485
- id: "bullet",
22486
- text: "• 小圆点",
22487
- symbol: "•",
22488
- iconCss: "e-icons e-bullet-bullet",
22489
- description: "小圆点",
22490
- },
22491
- ];
22492
- // 获取符号样式
22493
- /**
22494
- * @param {?} id
22495
- * @return {?}
22496
- */
22497
- function getBulletStyle(id) {
22498
- return BULLET_STYLES.find((/**
22499
- * @param {?} style
22353
+ let excludeRoutes = [];
22354
+ // 不需要缓存的url
22355
+ class KeepAliveService {
22356
+ /**
22357
+ * @param {?} routes
22500
22358
  * @return {?}
22501
22359
  */
22502
- (style) => style.id === id));
22503
- }
22504
- // 获取所有符号样式
22505
- /**
22506
- * @return {?}
22507
- */
22508
- function getAllBulletStyles() {
22509
- return BULLET_STYLES;
22510
- }
22511
- // 应用符号样式到列表
22512
- /**
22513
- * @param {?} ul
22514
- * @param {?} style
22515
- * @return {?}
22516
- */
22517
- function applyBulletStyle(ul, style) {
22518
- if (style.id === "disc" || style.id === "circle" || style.id === "square") {
22519
- // 使用CSS list-style-type
22520
- ul.style.listStyleType = style.id;
22521
- // 移除自定义符号
22522
- ul.querySelectorAll(".custom-bullet").forEach((/**
22523
- * @param {?} bullet
22524
- * @return {?}
22525
- */
22526
- (bullet) => bullet.remove()));
22360
+ setExcludeRoutes(routes) {
22361
+ excludeRoutes = routes; // 设置不缓存的路由
22527
22362
  }
22528
- else {
22529
- // 使用自定义符号
22530
- ul.style.listStyleType = "none";
22531
- ul.setAttribute("data-bullet-style", style.id);
22363
+ /**
22364
+ * @param {?} route
22365
+ * @return {?}
22366
+ */
22367
+ shouldDetach(route) {
22532
22368
  /** @type {?} */
22533
- const listItems = ul.querySelectorAll("li");
22534
- listItems.forEach((/**
22535
- * @param {?} li
22536
- * @return {?}
22537
- */
22538
- (li) => {
22539
- // 移除现有的自定义符号
22540
- /** @type {?} */
22541
- const existingBullet = li.querySelector(".custom-bullet");
22542
- if (existingBullet) {
22543
- existingBullet.remove();
22369
+ let config = route.routeConfig;
22370
+ // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
22371
+ if (toBeDeleteUrl === this.getRoutePath(route)) {
22372
+ // 对于新开的又即将关闭的tab,不缓存
22373
+ if (route.children.length === 0) {
22374
+ toBeDeleteUrl = "";
22544
22375
  }
22545
- // 添加新的自定义符号
22546
- /** @type {?} */
22547
- const bullet = document.createElement("span");
22548
- bullet.className = "custom-bullet";
22549
- bullet.textContent = style.symbol;
22550
- bullet.style.marginRight = "8px";
22551
- bullet.style.color = "#666";
22552
- // 将符号插入到列表项的开头
22553
- li.insertBefore(bullet, li.firstChild);
22554
- }));
22555
- }
22556
- }
22557
-
22558
- /**
22559
- * @fileoverview added by tsickle
22560
- * Generated from: lib/form/richtexteditor/index.component.ts
22561
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22562
- */
22563
- class RichtexteditorComponent {
22564
- /**
22565
- * @param {?} ref
22566
- */
22567
- constructor(ref) {
22568
- this.ref = ref;
22569
- // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
22570
- this.placeholder = "";
22571
- this.value = "";
22572
- this.height = 150;
22573
- this.autoSaveOnIdle = true;
22574
- this.target = "#container"; // dialog 弹窗父级
22575
- // dialog 弹窗父级
22576
- this.toolbarClick = new EventEmitter();
22577
- this.change = new EventEmitter();
22578
- // @Output() change = new EventEmitter();
22579
- this.family = fontFamily;
22580
- this.dialogWidth = "800px";
22581
- this.dialogHeight = "642px";
22582
- this.showZoomBtn = true;
22583
- this.showMsg = false;
22584
- this.insertImageSettings = {
22585
- saveFormat: "Blob",
22586
- allowedTypes: [".svg", ".png"],
22587
- display: "none",
22588
- };
22589
- this.size = "";
22590
- this.dropValIndex = 0;
22591
- this.queryList = [
22592
- { id: "Rephrase", text: "Rephrase" },
22593
- { id: "Grammar", text: "Correct Grammar" },
22594
- { id: "Summarize", text: "Summarize" },
22595
- { id: "Elaborate", text: "Elaborate" },
22596
- { id: "Translate", text: "Translate" },
22597
- { id: "SentimentAnalysis", text: "Sentiment Analysis" },
22598
- ];
22599
- this.rephraseTyleList = [
22600
- { text: "Standard", id: "Standard" },
22601
- { text: "Fluent", id: "Fluent" },
22602
- { text: "Professional", id: "Professional" },
22603
- ];
22604
- this.languageList = [
22605
- { id: "EN", text: "English" },
22606
- { id: "ZH", text: "Chinese (Simplified)" },
22607
- { id: "ES", text: "Spanish" },
22608
- { id: "ZHT", text: "Chinese (Traditional)" },
22609
- { id: "HI", text: "Hindi" },
22610
- { id: "AR", text: "Arabic" },
22611
- { id: "BN", text: "Bengali" },
22612
- { id: "PT", text: "Portuguese" },
22613
- { id: "RU", text: "Russian" },
22614
- { id: "JA", text: "Japanese" },
22615
- { id: "DE", text: "German" },
22616
- { id: "KO", text: "Korean" },
22617
- { id: "FR", text: "French" },
22618
- { id: "IT", text: "Italian" },
22619
- { id: "TR", text: "Turkish" },
22620
- ];
22621
- this.promptQuery = "";
22622
- this.isSentimentCheck = false;
22623
- this.subQuery = "";
22624
- this.chipValue = "Standard";
22625
- this.tools = {
22626
- enableFloating: false,
22627
- items: [
22628
- {
22629
- tooltipText: "AI Assist",
22630
- 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>',
22631
- },
22632
- "Bold",
22633
- "Italic",
22634
- "Underline",
22635
- "StrikeThrough",
22636
- "FontName",
22637
- "FontSize",
22638
- "FontColor",
22639
- "BackgroundColor",
22640
- "LowerCase",
22641
- "UpperCase",
22642
- "|",
22643
- "CreateTable",
22644
- "Formats",
22645
- "Alignments",
22646
- {
22647
- tooltipText: "Line Height",
22648
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
22649
- },
22650
- "OrderedList",
22651
- "UnorderedList",
22652
- "Outdent",
22653
- "Indent",
22654
- "|",
22655
- "CreateLink",
22656
- {
22657
- tooltipText: "",
22658
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
22659
- '<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>',
22660
- },
22661
- "|",
22662
- "FormatPainter",
22663
- "ClearFormat",
22664
- "|",
22665
- "Undo",
22666
- "Redo",
22667
- ],
22668
- };
22376
+ return false;
22377
+ }
22378
+ if (config && excludeRoutes.includes(this.getRoutePath(route))) {
22379
+ return false;
22380
+ }
22381
+ //Don't store lazy loaded routes
22382
+ return config && !config.loadChildren;
22669
22383
  }
22670
22384
  /**
22385
+ * @param {?} route
22386
+ * @param {?} handle
22671
22387
  * @return {?}
22672
22388
  */
22673
- ngOnInit() { }
22674
- /**
22675
- * @param {?} args
22676
- * @return {?}
22677
- */
22678
- onContentChange(args) {
22389
+ store(route, handle) {
22390
+ // console.log("store", this.getRoutePath(route));
22391
+ // console.log("store", storedRoutes);
22679
22392
  /** @type {?} */
22680
- const tables = document.querySelectorAll("table.e-rte-table");
22681
- tables.forEach((/**
22682
- * @param {?} table
22683
- * @return {?}
22684
- */
22685
- (table) => {
22686
- /** @type {?} */
22687
- const htmlTable = (/** @type {?} */ (table));
22688
- htmlTable.style.marginBottom = "10px";
22689
- htmlTable.style.borderCollapse = "collapse";
22690
- htmlTable.style.emptyCells = "show";
22691
- /** @type {?} */
22692
- const tdElements = table.querySelectorAll("td");
22693
- tdElements.forEach((/**
22694
- * @param {?} td
22695
- * @return {?}
22696
- */
22697
- (td) => {
22698
- td.style.border = "1px solid #adb5bd";
22699
- td.style.height = "20px";
22700
- td.style.minWidth = "20px";
22701
- td.style.padding = "2px 5px";
22702
- td.style.boxSizing = "border-box";
22703
- }));
22704
- }));
22705
- this.change.emit(args);
22393
+ const key = this.getRoutePath(route);
22394
+ storedRoutes.set(key, handle);
22706
22395
  }
22707
22396
  /**
22397
+ * @param {?} route
22708
22398
  * @return {?}
22709
22399
  */
22710
- onCreate() {
22711
- //bind the a click event
22712
- // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
22713
- // editorContent.addEventListener('click', this.OnClicked.bind(this));
22714
- //add the line height
22715
- this.editorManager = this.rteObj.formatter.editorManager;
22716
- /** @type {?} */
22717
- let splitButton = new DropDownButton({
22718
- items: lineHeight_items,
22719
- iconCss: "e-icons e-line-spacing",
22720
- select: this.onSelect.bind(this),
22721
- });
22722
- splitButton.appendTo("#lineheight_tbar");
22723
- // ai assist
22400
+ shouldAttach(route) {
22724
22401
  /** @type {?} */
22725
- let aiassistantButton = new DropDownButton({
22726
- items: this.queryList,
22727
- // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
22728
- select: (/**
22729
- * @param {?} args
22730
- * @return {?}
22731
- */
22732
- (args) => this.aiQuerySelectedMenu(args)),
22733
- });
22734
- aiassistantButton.appendTo("#ai_assistant_button_tbar");
22402
+ const key = this.getRoutePath(route);
22403
+ return !!route.routeConfig && storedRoutes.has(key);
22735
22404
  }
22736
22405
  /**
22737
- * @private
22738
- * @param {?} args
22406
+ * @param {?} route
22739
22407
  * @return {?}
22740
22408
  */
22741
- onSelect(args) {
22742
- if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
22743
- this.rteObj.formatter.saveData();
22744
- }
22409
+ retrieve(route) {
22745
22410
  /** @type {?} */
22746
- let nodes = this.editorManager.domNode.blockNodes();
22747
- for (let i = 0; nodes.length > i; i++) {
22748
- ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
22411
+ let config = route.routeConfig;
22412
+ /** @type {?} */
22413
+ const key = this.getRoutePath(route);
22414
+ //We don't store lazy loaded routes, so don't even bother trying to retrieve them
22415
+ if (!config || config.loadChildren) {
22416
+ return false;
22749
22417
  }
22750
- this.rteObj.formatter.saveData();
22751
- this.rteObj.formatter.enableUndo(this.rteObj);
22418
+ return storedRoutes.get(key) || null;
22752
22419
  }
22753
22420
  /**
22754
- * @private
22755
- * @param {?} args
22421
+ * @param {?} future
22422
+ * @param {?} curr
22756
22423
  * @return {?}
22757
22424
  */
22758
- aiQuerySelectedMenu(args) {
22759
- this.dialogueOpen(args.item.text);
22425
+ shouldReuseRoute(future, curr) {
22426
+ // console.log("shouldReuseRoute", future, curr);
22427
+ // return future.routeConfig === curr.routeConfig;
22428
+ if (future.routeConfig === curr.routeConfig) {
22429
+ if (future.children.length === 0 && curr.children.length === 0) {
22430
+ // 无子路由时, 通过params和queryParams判断是否复用路由
22431
+ return (JSON.stringify(future.params) === JSON.stringify(curr.params));
22432
+ }
22433
+ return true;
22434
+ }
22435
+ return false;
22760
22436
  }
22761
22437
  /**
22762
- * @param {?} selectedQuery
22438
+ * @param {?} route
22763
22439
  * @return {?}
22764
22440
  */
22765
- dialogueOpen(selectedQuery) {
22766
- /** @type {?} */
22767
- var selectionText = this.rteObj.getSelectedHtml();
22768
- this.selectedQuery = selectedQuery;
22769
- if (selectionText) {
22441
+ getRoutePath(route) {
22442
+ if (route.routeConfig) {
22443
+ // const pathParams = JSON.stringify(route.params);
22444
+ // const queryParams = new URLSearchParams(route.queryParams).toString();
22770
22445
  /** @type {?} */
22771
- let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22772
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22773
- this.dropValIndex = this.queryList.findIndex((/**
22774
- * @param {?} q
22775
- * @return {?}
22776
- */
22777
- (q) => q.text.toLowerCase() === selectedQuery.toLowerCase()));
22778
- this.queryCategory.index = this.dropValIndex;
22779
- this.leftRte.value = this.promptQuery = selectionText;
22780
- this.leftRte.refreshUI();
22781
- this.AIdialog.show();
22782
- this.updateAISugesstionsData(selectedQuery);
22783
- }
22784
- else {
22785
- this.showMsg = true;
22786
- setTimeout((/**
22446
+ const url = route._urlSegment.segments.map((/**
22447
+ * @param {?} v
22787
22448
  * @return {?}
22788
22449
  */
22789
- () => {
22790
- this.showMsg = false;
22791
- }), 3000);
22792
- console.log("Please select the content to perform the AI operation.");
22450
+ (v) => v.path)).join("/");
22451
+ return "/" + url;
22793
22452
  }
22453
+ return "";
22794
22454
  }
22795
22455
  /**
22796
- * @param {?} selectedQuery
22456
+ * @param {?} path
22797
22457
  * @return {?}
22798
22458
  */
22799
- updateAISugesstionsData(selectedQuery) {
22800
- this.isSentimentCheck = false;
22801
- switch (selectedQuery) {
22802
- case "Summarize":
22803
- this.subQuery = "Summarize the upcoming sentence shortly.";
22804
- break;
22805
- case "Elaborate":
22806
- this.subQuery = "Elaborate on the upcoming sentence.";
22807
- break;
22808
- case "Rephrase":
22809
- this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
22810
- break;
22811
- case "Correct Grammar":
22812
- this.subQuery = "Correct the grammar of the upcoming sentence.";
22813
- break;
22814
- case "Translate":
22815
- this.subQuery =
22816
- "Translate the upcoming sentence to " + this.translatelanguage + ".";
22817
- break;
22818
- case "Sentiment Analysis":
22819
- this.isSentimentCheck = true;
22820
- this.subQuery =
22821
- '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:';
22822
- break;
22823
- }
22824
- this.updateAISugesstions();
22459
+ clearCache(path) {
22460
+ // console.log("clearCache", storedRoutes, path);
22461
+ toBeDeleteUrl = path;
22462
+ storedRoutes.delete(path);
22825
22463
  }
22826
22464
  /**
22827
22465
  * @return {?}
22828
22466
  */
22829
- updateAISugesstions() {
22830
- try {
22831
- if (this.promptQuery) {
22832
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
22833
- "";
22834
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
22835
- "none";
22836
- this.sentimentButton.element.style.display = "none";
22837
- this.regenerateButton.disabled = true;
22838
- this.copyButton.disabled = true;
22839
- this.replaceButton.disabled = true;
22840
- this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
22841
- this.apiResultData.then((/**
22842
- * @param {?} result
22843
- * @return {?}
22844
- */
22845
- (result) => {
22846
- this.AIResult = this.isSentimentCheck ? this.promptQuery : result;
22847
- this.sentimentButton.content = result
22848
- .toLowerCase()
22849
- .includes("positive")
22850
- ? "😊 Positive"
22851
- : result.toLowerCase().includes("negative")
22852
- ? "😞 Negative"
22853
- : "😐 Neutral";
22854
- this.sentimentButton.element.style.display = !this.isSentimentCheck
22855
- ? "none"
22856
- : "";
22857
- this.rightRte.value = this.AIResult;
22858
- /** @type {?} */
22859
- var noResultsFound = !(this.AIResult || this.promptQuery);
22860
- ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
22861
- this.regenerateButton.disabled = noResultsFound;
22862
- this.copyButton.disabled = noResultsFound;
22863
- this.replaceButton.disabled = noResultsFound;
22864
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
22865
- "none";
22866
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
22867
- noResultsFound ? "none" : "";
22868
- console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
22869
- // this.ref.markForCheck();
22870
- }));
22871
- }
22872
- }
22873
- catch (_a) {
22874
- // this.toastObj.show();
22875
- }
22467
+ clearAllCache() {
22468
+ storedRoutes.clear();
22876
22469
  }
22877
- /**
22878
- * @param {?} subQuery
22879
- * @param {?} promptQuery
22880
- * @return {?}
22881
- */
22882
- getResponseFromOpenAI(subQuery, promptQuery) {
22883
- return __awaiter(this, void 0, void 0, function* () {
22884
- /** @type {?} */
22885
- const content = yield OpenAiModelRTE(subQuery, promptQuery);
22886
- return content ? ((/** @type {?} */ (content))) : "";
22887
- });
22470
+ }
22471
+ KeepAliveService.decorators = [
22472
+ { type: Injectable, args: [{
22473
+ providedIn: "root",
22474
+ },] }
22475
+ ];
22476
+ /** @nocollapse */ KeepAliveService.ngInjectableDef = ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
22477
+
22478
+ /**
22479
+ * @fileoverview added by tsickle
22480
+ * Generated from: lib/form/confirm-select/index.component.ts
22481
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22482
+ */
22483
+ class ConfirmSelectComponent {
22484
+ constructor() {
22485
+ this.dataSource = [];
22486
+ this.disabled = false;
22487
+ this.fields = { text: "Game", value: "Id" };
22488
+ this.showSelectAll = true;
22489
+ this.valueChange = new EventEmitter();
22490
+ this.selectedItems = [];
22491
+ this.isInteracted = false;
22888
22492
  }
22889
22493
  /**
22890
22494
  * @return {?}
22891
22495
  */
22892
- dialogShow() {
22893
- (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
22894
- * @return {?}
22895
- */
22896
- () => {
22897
- this.updateAISugesstions();
22898
- }));
22899
- (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
22900
- * @return {?}
22901
- */
22902
- () => {
22903
- this.copyTextToClipboard(this.AIResult);
22904
- }));
22905
- (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
22906
- * @return {?}
22907
- */
22908
- () => {
22909
- /** @type {?} */
22910
- let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22911
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
22912
- ((/** @type {?} */ (this.rteObj))).executeCommand("insertHTML", this.AIResult, {
22913
- undo: true,
22914
- });
22915
- this.closeDialog();
22916
- }));
22917
- ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
22496
+ ngOnInit() {
22497
+ this.getInfo();
22498
+ this.resetSelectedItems();
22918
22499
  }
22919
22500
  /**
22501
+ * @param {?} changes
22920
22502
  * @return {?}
22921
22503
  */
22922
- closeDialog() {
22923
- this.AIdialog.hide();
22924
- this.rightRte.value = "";
22925
- this.leftRte.value = "";
22926
- this.promptQuery = "";
22927
- this.chipValue = "Standard";
22928
- this.AIResult = "";
22929
- this.dropValIndex = 0;
22930
- this.selectedQuery = "Rephrase";
22931
- this.sentimentButton.content = "😊 Neutral";
22504
+ ngOnChanges(changes) {
22505
+ if (changes.value && !changes.value.firstChange) {
22506
+ this.resetSelectedItems();
22507
+ }
22932
22508
  }
22933
22509
  /**
22934
- * @param {?} text
22935
22510
  * @return {?}
22936
22511
  */
22937
- copyTextToClipboard(text) {
22938
- if (navigator.clipboard) {
22939
- navigator.clipboard
22940
- .writeText(text)
22941
- .then((/**
22942
- * @return {?}
22943
- */
22944
- () => {
22945
- console.log("Text copied to clipboard successfully!");
22946
- }))
22947
- .catch((/**
22948
- * @param {?} err
22949
- * @return {?}
22950
- */
22951
- (err) => {
22952
- console.error("Failed to copy text: ", err);
22953
- }));
22954
- }
22955
- else {
22956
- // Fallback for browsers that do not support the Clipboard API
22957
- /** @type {?} */
22958
- const textarea = document.createElement("textarea");
22959
- textarea.value = text;
22960
- document.body.appendChild(textarea);
22961
- textarea.select();
22962
- try {
22963
- document.execCommand("copy");
22964
- console.log("Text copied to clipboard using execCommand");
22965
- }
22966
- catch (err) {
22967
- console.error("Failed to copy text: ", err);
22968
- }
22969
- finally {
22970
- document.body.removeChild(textarea);
22971
- }
22972
- }
22512
+ getInfo() {
22513
+ this.translation = JSON.parse(localStorage.getItem("translation"));
22973
22514
  }
22974
22515
  /**
22975
22516
  * @return {?}
22976
22517
  */
22977
- onOverlayClick() {
22978
- /** @type {?} */
22979
- let activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
22980
- if (activeEle) {
22981
- activeEle.classList.remove("e-active");
22518
+ resetSelectedItems() {
22519
+ this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
22520
+ if (this.comfirmSelect) {
22521
+ this.comfirmSelect.value = this.selectedItems;
22982
22522
  }
22983
- this.closeDialog();
22984
22523
  }
22985
22524
  /**
22986
- * @param {?} args
22987
22525
  * @return {?}
22988
22526
  */
22989
- onQuerySelect(args) {
22990
- // this.chipList.selectedChips = 0;
22991
- this.translatelanguage = "EN";
22992
- this.selectedQuery = args.itemData.text;
22993
- this.updateAISugesstionsData(args.itemData.text);
22527
+ onCancel() {
22528
+ this.isInteracted = true;
22529
+ this.resetSelectedItems();
22530
+ this.comfirmSelect.hidePopup();
22994
22531
  }
22995
22532
  /**
22996
- * @param {?} args
22997
22533
  * @return {?}
22998
22534
  */
22999
- onLanguageSelect(args) {
23000
- this.translatelanguage = args.itemData.id;
23001
- this.updateAISugesstionsData("Translate");
22535
+ onApply() {
22536
+ this.isInteracted = true;
22537
+ /** @type {?} */
22538
+ const val = this.comfirmSelect.value;
22539
+ this.valueChange.emit(val);
22540
+ this.comfirmSelect.hidePopup();
23002
22541
  }
23003
22542
  /**
23004
- * @param {?} args
22543
+ * @param {?} e
23005
22544
  * @return {?}
23006
22545
  */
23007
- onChipClick(args) {
23008
- this.chipValue = args.itemData.text;
23009
- // 事件会触发两次 必须判断args.text是否有值
23010
- if (args.itemData.text)
23011
- this.updateAISugesstionsData("Rephrase");
23012
- }
23013
- /**
23014
- * @param {?} args
23015
- * @return {?}
23016
- */
23017
- _toolbarClick(args) {
23018
- this.toolbarClick.emit(args);
23019
- }
23020
- /**
23021
- * @return {?}
23022
- */
23023
- hideToast() {
23024
- this.showMsg = false;
23025
- }
23026
- /**
23027
- * @return {?}
23028
- */
23029
- onZoom() {
23030
- if (this.size === "largest") {
23031
- this.size = ""; // 恢复到原始大小
22546
+ onClose(e) {
22547
+ if (this.isInteracted) {
22548
+ this.isInteracted = false;
23032
22549
  }
23033
22550
  else {
23034
- this.size = "largest"; // 设置为最大化
22551
+ this.resetSelectedItems();
23035
22552
  }
23036
22553
  }
23037
22554
  }
23038
- RichtexteditorComponent.decorators = [
22555
+ ConfirmSelectComponent.decorators = [
23039
22556
  { type: Component, args: [{
23040
- selector: "rs-richtext-editor",
23041
- 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",
23042
- 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}"]
22557
+ selector: "rs-confirm-select",
22558
+ 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",
22559
+ 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)}"]
23043
22560
  }] }
23044
22561
  ];
23045
- /** @nocollapse */
23046
- RichtexteditorComponent.ctorParameters = () => [
23047
- { type: ChangeDetectorRef }
23048
- ];
23049
- RichtexteditorComponent.propDecorators = {
23050
- rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
23051
- queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
23052
- leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
23053
- rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
23054
- AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
23055
- sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
23056
- regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
23057
- copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
23058
- replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
23059
- placeholder: [{ type: Input }],
22562
+ ConfirmSelectComponent.propDecorators = {
22563
+ comfirmSelect: [{ type: ViewChild, args: ["comfirmSelect", { static: false },] }],
23060
22564
  value: [{ type: Input }],
23061
- height: [{ type: Input }],
23062
- autoSaveOnIdle: [{ type: Input }],
23063
- target: [{ type: Input }],
23064
- toolbarClick: [{ type: Output }],
23065
- change: [{ type: Output }]
22565
+ dataSource: [{ type: Input }],
22566
+ disabled: [{ type: Input }],
22567
+ fields: [{ type: Input }],
22568
+ placeholder: [{ type: Input }],
22569
+ showSelectAll: [{ type: Input }],
22570
+ valueChange: [{ type: Output }]
23066
22571
  };
23067
22572
  if (false) {
23068
22573
  /** @type {?} */
23069
- RichtexteditorComponent.prototype.rteObj;
23070
- /** @type {?} */
23071
- RichtexteditorComponent.prototype.queryCategory;
23072
- /** @type {?} */
23073
- RichtexteditorComponent.prototype.leftRte;
23074
- /** @type {?} */
23075
- RichtexteditorComponent.prototype.rightRte;
23076
- /** @type {?} */
23077
- RichtexteditorComponent.prototype.AIdialog;
23078
- /** @type {?} */
23079
- RichtexteditorComponent.prototype.sentimentButton;
23080
- /** @type {?} */
23081
- RichtexteditorComponent.prototype.regenerateButton;
23082
- /** @type {?} */
23083
- RichtexteditorComponent.prototype.copyButton;
23084
- /** @type {?} */
23085
- RichtexteditorComponent.prototype.replaceButton;
23086
- /** @type {?} */
23087
- RichtexteditorComponent.prototype.placeholder;
23088
- /** @type {?} */
23089
- RichtexteditorComponent.prototype.value;
23090
- /** @type {?} */
23091
- RichtexteditorComponent.prototype.height;
23092
- /** @type {?} */
23093
- RichtexteditorComponent.prototype.autoSaveOnIdle;
23094
- /** @type {?} */
23095
- RichtexteditorComponent.prototype.target;
23096
- /** @type {?} */
23097
- RichtexteditorComponent.prototype.toolbarClick;
23098
- /** @type {?} */
23099
- RichtexteditorComponent.prototype.change;
22574
+ ConfirmSelectComponent.prototype.comfirmSelect;
23100
22575
  /** @type {?} */
23101
- RichtexteditorComponent.prototype.family;
22576
+ ConfirmSelectComponent.prototype.value;
23102
22577
  /** @type {?} */
23103
- RichtexteditorComponent.prototype.dialogWidth;
22578
+ ConfirmSelectComponent.prototype.dataSource;
23104
22579
  /** @type {?} */
23105
- RichtexteditorComponent.prototype.dialogHeight;
22580
+ ConfirmSelectComponent.prototype.disabled;
23106
22581
  /** @type {?} */
23107
- RichtexteditorComponent.prototype.showZoomBtn;
22582
+ ConfirmSelectComponent.prototype.fields;
23108
22583
  /** @type {?} */
23109
- RichtexteditorComponent.prototype.showMsg;
22584
+ ConfirmSelectComponent.prototype.placeholder;
23110
22585
  /** @type {?} */
23111
- RichtexteditorComponent.prototype.insertImageSettings;
22586
+ ConfirmSelectComponent.prototype.showSelectAll;
23112
22587
  /** @type {?} */
23113
- RichtexteditorComponent.prototype.editorManager;
22588
+ ConfirmSelectComponent.prototype.valueChange;
23114
22589
  /** @type {?} */
23115
- RichtexteditorComponent.prototype.size;
22590
+ ConfirmSelectComponent.prototype.translation;
23116
22591
  /** @type {?} */
23117
- RichtexteditorComponent.prototype.selectedQuery;
22592
+ ConfirmSelectComponent.prototype.selectedItems;
23118
22593
  /** @type {?} */
23119
- RichtexteditorComponent.prototype.dropValIndex;
22594
+ ConfirmSelectComponent.prototype.isInteracted;
22595
+ }
22596
+
22597
+ /**
22598
+ * @fileoverview added by tsickle
22599
+ * Generated from: lib/form/richtexteditor/ai-config.ts
22600
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22601
+ */
22602
+ /**
22603
+ * @record
22604
+ */
22605
+ function AIConfig() { }
22606
+ if (false) {
23120
22607
  /** @type {?} */
23121
- RichtexteditorComponent.prototype.queryList;
22608
+ AIConfig.prototype.endpoint;
23122
22609
  /** @type {?} */
23123
- RichtexteditorComponent.prototype.rephraseTyleList;
22610
+ AIConfig.prototype.apiKey;
23124
22611
  /** @type {?} */
23125
- RichtexteditorComponent.prototype.languageList;
22612
+ AIConfig.prototype.deployment;
23126
22613
  /** @type {?} */
23127
- RichtexteditorComponent.prototype.promptQuery;
22614
+ AIConfig.prototype.apiVersion;
23128
22615
  /** @type {?} */
23129
- RichtexteditorComponent.prototype.isSentimentCheck;
22616
+ AIConfig.prototype.enabled;
22617
+ }
22618
+ // 从环境配置获取AI配置
22619
+ /**
22620
+ * @return {?}
22621
+ */
22622
+ function getAIConfig() {
22623
+ return {
22624
+ endpoint: "https://aidevused.openai.azure.com/",
22625
+ apiKey: "ccba76e279f64653a50ac4fee90afe5c",
22626
+ deployment: "gpt-4",
22627
+ apiVersion: "2025-01-01-preview",
22628
+ enabled: true,
22629
+ };
22630
+ }
22631
+ // 检查配置是否有效
22632
+ /**
22633
+ * @param {?} config
22634
+ * @return {?}
22635
+ */
22636
+ function isAIConfigValid(config) {
22637
+ // 检查是否为aidevused端点且有有效API密钥
22638
+ return !!((config.endpoint &&
22639
+ config.apiKey &&
22640
+ config.deployment &&
22641
+ config.enabled &&
22642
+ config.endpoint === "https://aidevused.openai.azure.com/" &&
22643
+ config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
22644
+ );
22645
+ }
22646
+ // 从后端API获取AI配置(推荐方式)
22647
+ /**
22648
+ * @return {?}
22649
+ * @this {*}
22650
+ */
22651
+ function getAIConfigFromBackend() {
22652
+ return __awaiter(this, void 0, void 0, function* () {
22653
+ try {
22654
+ // 这里应该调用你的后端API来获取AI配置
22655
+ // 例如:return await this.http.get('/api/ai-config');
22656
+ // 临时返回默认配置
22657
+ return getAIConfig();
22658
+ }
22659
+ catch (error) {
22660
+ console.error("Failed to get AI config from backend:", error);
22661
+ return getAIConfig();
22662
+ }
22663
+ });
22664
+ }
22665
+
22666
+ /**
22667
+ * @fileoverview added by tsickle
22668
+ * Generated from: lib/form/richtexteditor/openapi.ts
22669
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22670
+ */
22671
+ // import { testAIFunction } from './ai-test';
22672
+ // testAIFunction();
22673
+ // 使用fetch API发送请求到Azure OpenAI
22674
+ /**
22675
+ * @param {?} messages
22676
+ * @param {?} config
22677
+ * @return {?}
22678
+ * @this {*}
22679
+ */
22680
+ function sendAIRequest(messages, config) {
22681
+ return __awaiter(this, void 0, void 0, function* () {
22682
+ try {
22683
+ /** @type {?} */
22684
+ const url = `${config.endpoint}/openai/deployments/${config.deployment}/chat/completions?api-version=${config.apiVersion}`;
22685
+ /** @type {?} */
22686
+ const url1 = `${config.endpoint}`;
22687
+ /** @type {?} */
22688
+ const response = yield fetch(url, {
22689
+ method: 'POST',
22690
+ headers: {
22691
+ 'Content-Type': 'application/json',
22692
+ 'api-key': config.apiKey,
22693
+ },
22694
+ body: JSON.stringify({
22695
+ messages: messages,
22696
+ max_tokens: 1000,
22697
+ temperature: 0.7,
22698
+ top_p: 1,
22699
+ frequency_penalty: 0,
22700
+ presence_penalty: 0,
22701
+ }),
22702
+ });
22703
+ if (!response.ok) {
22704
+ /** @type {?} */
22705
+ const errorText = yield response.text();
22706
+ throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`);
22707
+ }
22708
+ /** @type {?} */
22709
+ const data = yield response.json();
22710
+ if (!data.choices || !data.choices[0] || !data.choices[0].message) {
22711
+ throw new Error('Invalid response format from AI service');
22712
+ }
22713
+ return data.choices[0].message.content;
22714
+ }
22715
+ catch (error) {
22716
+ console.error('AI request failed:', error);
22717
+ throw error;
22718
+ }
22719
+ });
22720
+ }
22721
+ // 备用方案:使用模拟数据(用于开发测试)
22722
+ /**
22723
+ * @param {?} subQuery
22724
+ * @param {?} promptQuery
22725
+ * @return {?}
22726
+ */
22727
+ function getMockAIResponse(subQuery, promptQuery) {
23130
22728
  /** @type {?} */
23131
- RichtexteditorComponent.prototype.subQuery;
22729
+ const mockResponses = {
22730
+ Rephrase: `Rephrased: ${promptQuery}`,
22731
+ Grammar: `Corrected: ${promptQuery}`,
22732
+ Summarize: `Summary: ${promptQuery.substring(0, 100)}...`,
22733
+ Elaborate: `Elaborated: ${promptQuery} with additional details and context.`,
22734
+ Translate: `Translated: ${promptQuery}`,
22735
+ SentimentAnalysis: '😊 Positive',
22736
+ };
22737
+ for (const [key, value] of Object.entries(mockResponses)) {
22738
+ if (subQuery.includes(key)) {
22739
+ return value;
22740
+ }
22741
+ }
22742
+ return `AI processed: ${promptQuery}`;
22743
+ }
22744
+ // 主要的AI请求方法
22745
+ /**
22746
+ * @param {?} subQuery
22747
+ * @param {?} promptQuery
22748
+ * @return {?}
22749
+ * @this {*}
22750
+ */
22751
+ function OpenAiModelRTE(subQuery, promptQuery) {
22752
+ return __awaiter(this, void 0, void 0, function* () {
22753
+ try {
22754
+ /** @type {?} */
22755
+ const config = getAIConfig();
22756
+ // 检查配置是否有效
22757
+ if (!isAIConfigValid(config)) {
22758
+ console.warn('AI configuration is incomplete or disabled, using mock response');
22759
+ return getMockAIResponse(subQuery, promptQuery);
22760
+ }
22761
+ /** @type {?} */
22762
+ const messages = [
22763
+ {
22764
+ role: 'system',
22765
+ content: subQuery.includes('emoji followed by the sentiment in the format')
22766
+ ? 'You are a helpful assistant. Please respond in string format.'
22767
+ : "NOTE: Return same html format just do changes content only. don't change html formats.",
22768
+ },
22769
+ {
22770
+ role: 'user',
22771
+ content: `${subQuery} ${promptQuery}`,
22772
+ },
22773
+ ];
22774
+ /** @type {?} */
22775
+ const result = yield sendAIRequest(messages, config);
22776
+ return result;
22777
+ }
22778
+ catch (error) {
22779
+ console.error('AI request failed, using mock response:', error);
22780
+ return getMockAIResponse(subQuery, promptQuery);
22781
+ }
22782
+ });
22783
+ }
22784
+ // 兼容性方法(保持向后兼容)
22785
+ /**
22786
+ * @param {?} options
22787
+ * @return {?}
22788
+ * @this {*}
22789
+ */
22790
+ function getAzureChatAIRequest(options) {
22791
+ return __awaiter(this, void 0, void 0, function* () {
22792
+ try {
22793
+ /** @type {?} */
22794
+ const config = getAIConfig();
22795
+ if (!isAIConfigValid(config)) {
22796
+ return null;
22797
+ }
22798
+ /** @type {?} */
22799
+ const result = yield sendAIRequest(options.messages, config);
22800
+ return result;
22801
+ }
22802
+ catch (err) {
22803
+ console.error('Error occurred:', err);
22804
+ return null;
22805
+ }
22806
+ });
22807
+ }
22808
+ /**
22809
+ * @param {?} prompt
22810
+ * @return {?}
22811
+ * @this {*}
22812
+ */
22813
+ function getAzureTextAIRequest(prompt) {
22814
+ return __awaiter(this, void 0, void 0, function* () {
22815
+ try {
22816
+ /** @type {?} */
22817
+ const config = getAIConfig();
22818
+ if (!isAIConfigValid(config)) {
22819
+ return undefined;
22820
+ }
22821
+ /** @type {?} */
22822
+ const messages = [
22823
+ {
22824
+ role: 'user',
22825
+ content: prompt,
22826
+ },
22827
+ ];
22828
+ /** @type {?} */
22829
+ const result = yield sendAIRequest(messages, config);
22830
+ return result;
22831
+ }
22832
+ catch (err) {
22833
+ console.error('Error occurred:', err);
22834
+ return undefined;
22835
+ }
22836
+ });
22837
+ }
22838
+
22839
+ /**
22840
+ * @fileoverview added by tsickle
22841
+ * Generated from: lib/form/richtexteditor/data-config.ts
22842
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22843
+ */
22844
+ // font family
22845
+ /** @type {?} */
22846
+ const fontFamily = {
22847
+ default: "Arial",
22848
+ items: [
22849
+ {
22850
+ text: "Arial",
22851
+ value: "Arial, Helvetica, sans-serif",
22852
+ cssClass: "e-arial",
22853
+ command: "Font",
22854
+ subCommand: "FontName",
22855
+ },
22856
+ {
22857
+ text: "Times New Roman",
22858
+ value: "Times New Roman,Times,serif",
22859
+ cssClass: "e-times-new-roman",
22860
+ command: "Font",
22861
+ subCommand: "FontName",
22862
+ },
22863
+ {
22864
+ text: "Helvetica",
22865
+ value: "Helvetica",
22866
+ cssClass: "e-helvetica",
22867
+ command: "Font",
22868
+ subCommand: "FontName",
22869
+ },
22870
+ {
22871
+ text: "Calibri",
22872
+ value: "Calibri, Helvetica, sans-serif",
22873
+ cssClass: "e-calibri",
22874
+ command: "Font",
22875
+ subCommand: "FontName",
22876
+ },
22877
+ {
22878
+ text: "Verdana",
22879
+ value: "Verdana,Geneva,sans-serif",
22880
+ cssClass: "e-verdana",
22881
+ command: "Font",
22882
+ subCommand: "FontName",
22883
+ },
22884
+ {
22885
+ text: "Georgia",
22886
+ value: "Georgia,serif",
22887
+ cssClass: "e-georgia",
22888
+ command: "Font",
22889
+ subCommand: "FontName",
22890
+ },
22891
+ {
22892
+ text: "Open Sans",
22893
+ value: "Open Sans, sans-serif",
22894
+ cssClass: "e-open-sans",
22895
+ command: "Font",
22896
+ subCommand: "FontName",
22897
+ },
22898
+ {
22899
+ text: "Roboto",
22900
+ value: "Roboto",
22901
+ cssClass: "e-roboto",
22902
+ command: "Font",
22903
+ subCommand: "FontName",
22904
+ },
22905
+ {
22906
+ text: "Lato",
22907
+ value: "Lato, sans-serif",
22908
+ cssClass: "e-lato",
22909
+ command: "Font",
22910
+ subCommand: "FontName",
22911
+ },
22912
+ {
22913
+ text: "Montserrat",
22914
+ value: "Montserrat, sans-serif",
22915
+ cssClass: "e-montserrat",
22916
+ command: "Font",
22917
+ subCommand: "FontName",
22918
+ },
22919
+ {
22920
+ text: "Segoe UI",
22921
+ value: "Segoe UI",
22922
+ cssClass: "e-segoe-ui",
22923
+ command: "Font",
22924
+ subCommand: "FontName",
22925
+ },
22926
+ {
22927
+ text: "Impact",
22928
+ value: "Impact,Charcoal,sans-serif",
22929
+ cssClass: "e-impact",
22930
+ command: "Font",
22931
+ subCommand: "FontName",
22932
+ },
22933
+ ],
22934
+ };
22935
+ // line height配置
22936
+ /** @type {?} */
22937
+ const lineHeight_items = [
22938
+ {
22939
+ text: "1.0",
22940
+ },
22941
+ {
22942
+ text: "1.15",
22943
+ },
22944
+ {
22945
+ text: "1.5",
22946
+ },
22947
+ {
22948
+ text: "2.0",
22949
+ },
22950
+ {
22951
+ text: "2.5",
22952
+ },
22953
+ {
22954
+ text: "3.0",
22955
+ },
22956
+ ];
22957
+ /**
22958
+ * @record
22959
+ */
22960
+ function BulletStyle() { }
22961
+ if (false) {
23132
22962
  /** @type {?} */
23133
- RichtexteditorComponent.prototype.translatelanguage;
22963
+ BulletStyle.prototype.id;
23134
22964
  /** @type {?} */
23135
- RichtexteditorComponent.prototype.chipValue;
22965
+ BulletStyle.prototype.text;
23136
22966
  /** @type {?} */
23137
- RichtexteditorComponent.prototype.apiResultData;
22967
+ BulletStyle.prototype.symbol;
23138
22968
  /** @type {?} */
23139
- RichtexteditorComponent.prototype.AIResult;
22969
+ BulletStyle.prototype.iconCss;
23140
22970
  /** @type {?} */
23141
- RichtexteditorComponent.prototype.tools;
23142
- /**
23143
- * @type {?}
23144
- * @private
23145
- */
23146
- RichtexteditorComponent.prototype.ref;
23147
- }
23148
-
22971
+ BulletStyle.prototype.description;
22972
+ }
22973
+ /** @type {?} */
22974
+ const BULLET_STYLES = [
22975
+ {
22976
+ id: "disc",
22977
+ text: "● 实心圆点",
22978
+ symbol: "●",
22979
+ iconCss: "e-icons e-bullet-disc",
22980
+ description: "标准实心圆点",
22981
+ },
22982
+ {
22983
+ id: "circle",
22984
+ text: "○ 空心圆点",
22985
+ symbol: "○",
22986
+ iconCss: "e-icons e-bullet-circle",
22987
+ description: "空心圆点",
22988
+ },
22989
+ {
22990
+ id: "square",
22991
+ text: "■ 实心方块",
22992
+ symbol: "■",
22993
+ iconCss: "e-icons e-bullet-square",
22994
+ description: "实心方块",
22995
+ },
22996
+ {
22997
+ id: "diamond",
22998
+ text: "◆ 实心菱形",
22999
+ symbol: "◆",
23000
+ iconCss: "e-icons e-bullet-diamond",
23001
+ description: "实心菱形",
23002
+ },
23003
+ {
23004
+ id: "triangle",
23005
+ text: "► 实心三角",
23006
+ symbol: "►",
23007
+ iconCss: "e-icons e-bullet-triangle",
23008
+ description: "实心三角形",
23009
+ },
23010
+ {
23011
+ id: "arrow",
23012
+ text: "➤ 箭头",
23013
+ symbol: "➤",
23014
+ iconCss: "e-icons e-bullet-arrow",
23015
+ description: "箭头符号",
23016
+ },
23017
+ {
23018
+ id: "star",
23019
+ text: "★ 星形",
23020
+ symbol: "★",
23021
+ iconCss: "e-icons e-bullet-star",
23022
+ description: "星形符号",
23023
+ },
23024
+ {
23025
+ id: "check",
23026
+ text: "✓ 对勾",
23027
+ symbol: "✓",
23028
+ iconCss: "e-icons e-bullet-check",
23029
+ description: "对勾符号",
23030
+ },
23031
+ {
23032
+ id: "heart",
23033
+ text: "♥ 心形",
23034
+ symbol: "♥",
23035
+ iconCss: "e-icons e-bullet-heart",
23036
+ description: "心形符号",
23037
+ },
23038
+ {
23039
+ id: "bullet",
23040
+ text: "• 小圆点",
23041
+ symbol: "•",
23042
+ iconCss: "e-icons e-bullet-bullet",
23043
+ description: "小圆点",
23044
+ },
23045
+ ];
23046
+ // 获取符号样式
23149
23047
  /**
23150
- * @fileoverview added by tsickle
23151
- * Generated from: lib/dialog/common-dialog/index.component.ts
23152
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23048
+ * @param {?} id
23049
+ * @return {?}
23153
23050
  */
23154
- class CommonDialogComponent {
23155
- /**
23156
- * @param {?} dialogRef
23157
- */
23158
- constructor(dialogRef) {
23159
- this.dialogRef = dialogRef;
23160
- // 隐藏元素相关属性
23161
- this.hideHeader = false;
23162
- this.hideCloseIcon = false;
23163
- this.hideCloseBtn = false;
23164
- this.hideSaveBtn = false;
23165
- this.hideDiscardBtn = false;
23166
- this.saveBtnLabel = "";
23167
- this.cancelBtnLabel = "";
23168
- this.discardBtnLabel = "";
23169
- this.showErrorIcon = false;
23170
- this.showZoomBtn = false;
23171
- // 显示相关属性
23172
- this.dialogStyle = {};
23173
- this.size = "";
23174
- this.title = "Dialog";
23175
- this.loading = false;
23176
- this.saveEmit = new EventEmitter();
23177
- this.closeEmit = new EventEmitter();
23178
- this.defaultSize = "";
23179
- this.customFooter = false;
23180
- }
23181
- /**
23182
- * @return {?}
23183
- */
23184
- ngAfterContentInit() {
23185
- this.customFooter = !!this.footerContent;
23186
- }
23187
- /**
23188
- * @return {?}
23189
- */
23190
- ngOnInit() {
23191
- this.getInfo();
23192
- }
23193
- /**
23194
- * @return {?}
23195
- */
23196
- onClose() {
23197
- if (this.onCloseRequest) {
23198
- this.onCloseRequest().then((/**
23199
- * @param {?} confirmed
23200
- * @return {?}
23201
- */
23202
- (confirmed) => {
23203
- if (confirmed) {
23204
- this.dialogRef.close("close");
23205
- }
23206
- }));
23207
- }
23208
- else {
23209
- this.dialogRef.close("close");
23210
- }
23211
- }
23212
- /**
23213
- * @return {?}
23214
- */
23215
- onZoom() {
23216
- if (this.size === "largest") {
23217
- this.size = this.defaultSize; // 恢复到原始大小
23218
- }
23219
- else {
23220
- this.size = "largest"; // 设置为最大化
23221
- }
23222
- }
23223
- /**
23224
- * @return {?}
23225
- */
23226
- onSave() {
23227
- this.dialogRef.close("save");
23228
- }
23229
- /**
23051
+ function getBulletStyle(id) {
23052
+ return BULLET_STYLES.find((/**
23053
+ * @param {?} style
23230
23054
  * @return {?}
23231
23055
  */
23232
- onDiscard() {
23233
- this.dialogRef.close("discard");
23056
+ (style) => style.id === id));
23057
+ }
23058
+ // 获取所有符号样式
23059
+ /**
23060
+ * @return {?}
23061
+ */
23062
+ function getAllBulletStyles() {
23063
+ return BULLET_STYLES;
23064
+ }
23065
+ // 应用符号样式到列表
23066
+ /**
23067
+ * @param {?} ul
23068
+ * @param {?} style
23069
+ * @return {?}
23070
+ */
23071
+ function applyBulletStyle(ul, style) {
23072
+ if (style.id === "disc" || style.id === "circle" || style.id === "square") {
23073
+ // 使用CSS list-style-type
23074
+ ul.style.listStyleType = style.id;
23075
+ // 移除自定义符号
23076
+ ul.querySelectorAll(".custom-bullet").forEach((/**
23077
+ * @param {?} bullet
23078
+ * @return {?}
23079
+ */
23080
+ (bullet) => bullet.remove()));
23234
23081
  }
23235
- /**
23236
- * @private
23237
- * @return {?}
23238
- */
23239
- getInfo() {
23240
- this.translation = JSON.parse(localStorage.getItem("translation")) || {};
23241
- this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
23242
- this.cancelBtnLabel =
23243
- this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
23244
- this.defaultSize = this.size;
23082
+ else {
23083
+ // 使用自定义符号
23084
+ ul.style.listStyleType = "none";
23085
+ ul.setAttribute("data-bullet-style", style.id);
23086
+ /** @type {?} */
23087
+ const listItems = ul.querySelectorAll("li");
23088
+ listItems.forEach((/**
23089
+ * @param {?} li
23090
+ * @return {?}
23091
+ */
23092
+ (li) => {
23093
+ // 移除现有的自定义符号
23094
+ /** @type {?} */
23095
+ const existingBullet = li.querySelector(".custom-bullet");
23096
+ if (existingBullet) {
23097
+ existingBullet.remove();
23098
+ }
23099
+ // 添加新的自定义符号
23100
+ /** @type {?} */
23101
+ const bullet = document.createElement("span");
23102
+ bullet.className = "custom-bullet";
23103
+ bullet.textContent = style.symbol;
23104
+ bullet.style.marginRight = "8px";
23105
+ bullet.style.color = "#666";
23106
+ // 将符号插入到列表项的开头
23107
+ li.insertBefore(bullet, li.firstChild);
23108
+ }));
23245
23109
  }
23246
- }
23247
- CommonDialogComponent.decorators = [
23248
- { type: Component, args: [{
23249
- selector: "rs-common-dialog",
23250
- 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",
23251
- 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%)}"]
23252
- }] }
23253
- ];
23254
- /** @nocollapse */
23255
- CommonDialogComponent.ctorParameters = () => [
23256
- { type: MatDialogRef }
23257
- ];
23258
- CommonDialogComponent.propDecorators = {
23259
- hideHeader: [{ type: Input }],
23260
- hideCloseIcon: [{ type: Input }],
23261
- hideCloseBtn: [{ type: Input }],
23262
- hideSaveBtn: [{ type: Input }],
23263
- hideDiscardBtn: [{ type: Input }],
23264
- saveBtnLabel: [{ type: Input }],
23265
- cancelBtnLabel: [{ type: Input }],
23266
- discardBtnLabel: [{ type: Input }],
23267
- showErrorIcon: [{ type: Input }],
23268
- showZoomBtn: [{ type: Input }],
23269
- onCloseRequest: [{ type: Input }],
23270
- dialogStyle: [{ type: Input }],
23271
- size: [{ type: Input }],
23272
- title: [{ type: Input }],
23273
- loading: [{ type: Input }],
23274
- saveEmit: [{ type: Output }],
23275
- closeEmit: [{ type: Output }],
23276
- footerContent: [{ type: ContentChild, args: ["footerSlot", { static: false },] }]
23277
- };
23278
- if (false) {
23279
- /** @type {?} */
23280
- CommonDialogComponent.prototype.translation;
23281
- /** @type {?} */
23282
- CommonDialogComponent.prototype.hideHeader;
23283
- /** @type {?} */
23284
- CommonDialogComponent.prototype.hideCloseIcon;
23285
- /** @type {?} */
23286
- CommonDialogComponent.prototype.hideCloseBtn;
23287
- /** @type {?} */
23288
- CommonDialogComponent.prototype.hideSaveBtn;
23289
- /** @type {?} */
23290
- CommonDialogComponent.prototype.hideDiscardBtn;
23291
- /** @type {?} */
23292
- CommonDialogComponent.prototype.saveBtnLabel;
23293
- /** @type {?} */
23294
- CommonDialogComponent.prototype.cancelBtnLabel;
23295
- /** @type {?} */
23296
- CommonDialogComponent.prototype.discardBtnLabel;
23297
- /** @type {?} */
23298
- CommonDialogComponent.prototype.showErrorIcon;
23299
- /** @type {?} */
23300
- CommonDialogComponent.prototype.showZoomBtn;
23301
- /** @type {?} */
23302
- CommonDialogComponent.prototype.onCloseRequest;
23303
- /** @type {?} */
23304
- CommonDialogComponent.prototype.dialogStyle;
23305
- /** @type {?} */
23306
- CommonDialogComponent.prototype.size;
23307
- /** @type {?} */
23308
- CommonDialogComponent.prototype.title;
23309
- /** @type {?} */
23310
- CommonDialogComponent.prototype.loading;
23311
- /** @type {?} */
23312
- CommonDialogComponent.prototype.saveEmit;
23313
- /** @type {?} */
23314
- CommonDialogComponent.prototype.closeEmit;
23315
- /** @type {?} */
23316
- CommonDialogComponent.prototype.defaultSize;
23317
- /** @type {?} */
23318
- CommonDialogComponent.prototype.footerContent;
23319
- /** @type {?} */
23320
- CommonDialogComponent.prototype.customFooter;
23321
- /** @type {?} */
23322
- CommonDialogComponent.prototype.dialogRef;
23323
23110
  }
23324
23111
 
23325
23112
  /**
23326
23113
  * @fileoverview added by tsickle
23327
- * Generated from: lib/service/icon-loader.service.ts
23114
+ * Generated from: lib/form/richtexteditor/index.component.ts
23328
23115
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23329
23116
  */
23330
- class IconLoaderService {
23117
+ class RichtexteditorComponent {
23331
23118
  /**
23332
- * @param {?} registry
23333
- * @param {?} domSanitizer
23119
+ * @param {?} ref
23334
23120
  */
23335
- constructor(registry, domSanitizer) {
23336
- this.registry = registry;
23337
- this.domSanitizer = domSanitizer;
23121
+ constructor(ref) {
23122
+ this.ref = ref;
23123
+ // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
23124
+ this.placeholder = "";
23125
+ this.value = "";
23126
+ this.height = 150;
23127
+ this.autoSaveOnIdle = true;
23128
+ this.target = "#container"; // dialog 弹窗父级
23129
+ // dialog 弹窗父级
23130
+ this.toolbarClick = new EventEmitter();
23131
+ this.change = new EventEmitter();
23132
+ // @Output() change = new EventEmitter();
23133
+ this.family = fontFamily;
23134
+ this.dialogWidth = "800px";
23135
+ this.dialogHeight = "642px";
23136
+ this.showZoomBtn = true;
23137
+ this.showMsg = false;
23138
+ this.insertImageSettings = {
23139
+ saveFormat: "Blob",
23140
+ allowedTypes: [".svg", ".png"],
23141
+ display: "none",
23142
+ };
23143
+ this.size = "";
23144
+ this.dropValIndex = 0;
23145
+ this.queryList = [
23146
+ { id: "Rephrase", text: "Rephrase" },
23147
+ { id: "Grammar", text: "Correct Grammar" },
23148
+ { id: "Summarize", text: "Summarize" },
23149
+ { id: "Elaborate", text: "Elaborate" },
23150
+ { id: "Translate", text: "Translate" },
23151
+ { id: "SentimentAnalysis", text: "Sentiment Analysis" },
23152
+ ];
23153
+ this.rephraseTyleList = [
23154
+ { text: "Standard", id: "Standard" },
23155
+ { text: "Fluent", id: "Fluent" },
23156
+ { text: "Professional", id: "Professional" },
23157
+ ];
23158
+ this.languageList = [
23159
+ { id: "EN", text: "English" },
23160
+ { id: "ZH", text: "Chinese (Simplified)" },
23161
+ { id: "ES", text: "Spanish" },
23162
+ { id: "ZHT", text: "Chinese (Traditional)" },
23163
+ { id: "HI", text: "Hindi" },
23164
+ { id: "AR", text: "Arabic" },
23165
+ { id: "BN", text: "Bengali" },
23166
+ { id: "PT", text: "Portuguese" },
23167
+ { id: "RU", text: "Russian" },
23168
+ { id: "JA", text: "Japanese" },
23169
+ { id: "DE", text: "German" },
23170
+ { id: "KO", text: "Korean" },
23171
+ { id: "FR", text: "French" },
23172
+ { id: "IT", text: "Italian" },
23173
+ { id: "TR", text: "Turkish" },
23174
+ ];
23175
+ this.promptQuery = "";
23176
+ this.isSentimentCheck = false;
23177
+ this.subQuery = "";
23178
+ this.chipValue = "Standard";
23179
+ this.tools = {
23180
+ enableFloating: false,
23181
+ items: [
23182
+ {
23183
+ tooltipText: "AI Assist",
23184
+ 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>',
23185
+ },
23186
+ "Bold",
23187
+ "Italic",
23188
+ "Underline",
23189
+ "StrikeThrough",
23190
+ "FontName",
23191
+ "FontSize",
23192
+ "FontColor",
23193
+ "BackgroundColor",
23194
+ "LowerCase",
23195
+ "UpperCase",
23196
+ "|",
23197
+ "CreateTable",
23198
+ "Formats",
23199
+ "Alignments",
23200
+ {
23201
+ tooltipText: "Line Height",
23202
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
23203
+ },
23204
+ "OrderedList",
23205
+ "UnorderedList",
23206
+ "Outdent",
23207
+ "Indent",
23208
+ "|",
23209
+ "CreateLink",
23210
+ {
23211
+ tooltipText: "",
23212
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
23213
+ '<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>',
23214
+ },
23215
+ "|",
23216
+ "FormatPainter",
23217
+ "ClearFormat",
23218
+ "|",
23219
+ "Undo",
23220
+ "Redo",
23221
+ ],
23222
+ };
23338
23223
  }
23339
23224
  /**
23340
- * @param {?} list
23341
23225
  * @return {?}
23342
23226
  */
23343
- registerIcons(list) {
23344
- list.forEach((/**
23345
- * @param {?} __0
23346
- * @return {?}
23347
- */
23348
- ({ name, path }) => {
23349
- this.registry.addSvgIcon(name, this.domSanitizer.bypassSecurityTrustResourceUrl(path));
23350
- }));
23351
- }
23352
- }
23353
- IconLoaderService.decorators = [
23354
- { type: Injectable }
23355
- ];
23356
- /** @nocollapse */
23357
- IconLoaderService.ctorParameters = () => [
23358
- { type: MatIconRegistry },
23359
- { type: DomSanitizer }
23360
- ];
23361
- if (false) {
23362
- /**
23363
- * @type {?}
23364
- * @private
23365
- */
23366
- IconLoaderService.prototype.registry;
23227
+ ngOnInit() { }
23367
23228
  /**
23368
- * @type {?}
23369
- * @private
23229
+ * @param {?} args
23230
+ * @return {?}
23370
23231
  */
23371
- IconLoaderService.prototype.domSanitizer;
23372
- }
23373
-
23374
- /**
23375
- * @fileoverview added by tsickle
23376
- * Generated from: lib/service/keep-alive.service.ts
23377
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23378
- */
23379
- /** @type {?} */
23380
- const storedRoutes = new Map();
23381
- /** @type {?} */
23382
- let toBeDeleteUrl;
23383
- /** @type {?} */
23384
- let excludeRoutes = [];
23385
- // 不需要缓存的url
23386
- class KeepAliveService {
23232
+ onContentChange(args) {
23233
+ /** @type {?} */
23234
+ const tables = document.querySelectorAll("table.e-rte-table");
23235
+ tables.forEach((/**
23236
+ * @param {?} table
23237
+ * @return {?}
23238
+ */
23239
+ (table) => {
23240
+ /** @type {?} */
23241
+ const htmlTable = (/** @type {?} */ (table));
23242
+ htmlTable.style.marginBottom = "10px";
23243
+ htmlTable.style.borderCollapse = "collapse";
23244
+ htmlTable.style.emptyCells = "show";
23245
+ /** @type {?} */
23246
+ const tdElements = table.querySelectorAll("td");
23247
+ tdElements.forEach((/**
23248
+ * @param {?} td
23249
+ * @return {?}
23250
+ */
23251
+ (td) => {
23252
+ td.style.border = "1px solid #adb5bd";
23253
+ td.style.height = "20px";
23254
+ td.style.minWidth = "20px";
23255
+ td.style.padding = "2px 5px";
23256
+ td.style.boxSizing = "border-box";
23257
+ }));
23258
+ }));
23259
+ this.change.emit(args);
23260
+ }
23387
23261
  /**
23388
- * @param {?} routes
23389
23262
  * @return {?}
23390
23263
  */
23391
- setExcludeRoutes(routes) {
23392
- excludeRoutes = routes; // 设置不缓存的路由
23264
+ onCreate() {
23265
+ //bind the a click event
23266
+ // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
23267
+ // editorContent.addEventListener('click', this.OnClicked.bind(this));
23268
+ //add the line height
23269
+ this.editorManager = this.rteObj.formatter.editorManager;
23270
+ /** @type {?} */
23271
+ let splitButton = new DropDownButton({
23272
+ items: lineHeight_items,
23273
+ iconCss: "e-icons e-line-spacing",
23274
+ select: this.onSelect.bind(this),
23275
+ });
23276
+ splitButton.appendTo("#lineheight_tbar");
23277
+ // ai assist
23278
+ /** @type {?} */
23279
+ let aiassistantButton = new DropDownButton({
23280
+ items: this.queryList,
23281
+ // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
23282
+ select: (/**
23283
+ * @param {?} args
23284
+ * @return {?}
23285
+ */
23286
+ (args) => this.aiQuerySelectedMenu(args)),
23287
+ });
23288
+ aiassistantButton.appendTo("#ai_assistant_button_tbar");
23393
23289
  }
23394
23290
  /**
23395
- * @param {?} route
23291
+ * @private
23292
+ * @param {?} args
23396
23293
  * @return {?}
23397
23294
  */
23398
- shouldDetach(route) {
23399
- /** @type {?} */
23400
- let config = route.routeConfig;
23401
- // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
23402
- if (toBeDeleteUrl === this.getRoutePath(route)) {
23403
- // 对于新开的又即将关闭的tab,不缓存
23404
- if (route.children.length === 0) {
23405
- toBeDeleteUrl = "";
23406
- }
23407
- return false;
23295
+ onSelect(args) {
23296
+ if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
23297
+ this.rteObj.formatter.saveData();
23408
23298
  }
23409
- if (config && excludeRoutes.includes(this.getRoutePath(route))) {
23410
- return false;
23299
+ /** @type {?} */
23300
+ let nodes = this.editorManager.domNode.blockNodes();
23301
+ for (let i = 0; nodes.length > i; i++) {
23302
+ ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
23411
23303
  }
23412
- //Don't store lazy loaded routes
23413
- return config && !config.loadChildren;
23304
+ this.rteObj.formatter.saveData();
23305
+ this.rteObj.formatter.enableUndo(this.rteObj);
23414
23306
  }
23415
23307
  /**
23416
- * @param {?} route
23417
- * @param {?} handle
23308
+ * @private
23309
+ * @param {?} args
23418
23310
  * @return {?}
23419
23311
  */
23420
- store(route, handle) {
23421
- // console.log("store", this.getRoutePath(route));
23422
- // console.log("store", storedRoutes);
23423
- /** @type {?} */
23424
- const key = this.getRoutePath(route);
23425
- storedRoutes.set(key, handle);
23312
+ aiQuerySelectedMenu(args) {
23313
+ this.dialogueOpen(args.item.text);
23426
23314
  }
23427
23315
  /**
23428
- * @param {?} route
23316
+ * @param {?} selectedQuery
23429
23317
  * @return {?}
23430
23318
  */
23431
- shouldAttach(route) {
23319
+ dialogueOpen(selectedQuery) {
23432
23320
  /** @type {?} */
23433
- const key = this.getRoutePath(route);
23434
- return !!route.routeConfig && storedRoutes.has(key);
23321
+ var selectionText = this.rteObj.getSelectedHtml();
23322
+ this.selectedQuery = selectedQuery;
23323
+ if (selectionText) {
23324
+ /** @type {?} */
23325
+ let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23326
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23327
+ this.dropValIndex = this.queryList.findIndex((/**
23328
+ * @param {?} q
23329
+ * @return {?}
23330
+ */
23331
+ (q) => q.text.toLowerCase() === selectedQuery.toLowerCase()));
23332
+ this.queryCategory.index = this.dropValIndex;
23333
+ this.leftRte.value = this.promptQuery = selectionText;
23334
+ this.leftRte.refreshUI();
23335
+ this.AIdialog.show();
23336
+ this.updateAISugesstionsData(selectedQuery);
23337
+ }
23338
+ else {
23339
+ this.showMsg = true;
23340
+ setTimeout((/**
23341
+ * @return {?}
23342
+ */
23343
+ () => {
23344
+ this.showMsg = false;
23345
+ }), 3000);
23346
+ console.log("Please select the content to perform the AI operation.");
23347
+ }
23435
23348
  }
23436
23349
  /**
23437
- * @param {?} route
23350
+ * @param {?} selectedQuery
23438
23351
  * @return {?}
23439
23352
  */
23440
- retrieve(route) {
23441
- /** @type {?} */
23442
- let config = route.routeConfig;
23443
- /** @type {?} */
23444
- const key = this.getRoutePath(route);
23445
- //We don't store lazy loaded routes, so don't even bother trying to retrieve them
23446
- if (!config || config.loadChildren) {
23447
- return false;
23353
+ updateAISugesstionsData(selectedQuery) {
23354
+ this.isSentimentCheck = false;
23355
+ switch (selectedQuery) {
23356
+ case "Summarize":
23357
+ this.subQuery = "Summarize the upcoming sentence shortly.";
23358
+ break;
23359
+ case "Elaborate":
23360
+ this.subQuery = "Elaborate on the upcoming sentence.";
23361
+ break;
23362
+ case "Rephrase":
23363
+ this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
23364
+ break;
23365
+ case "Correct Grammar":
23366
+ this.subQuery = "Correct the grammar of the upcoming sentence.";
23367
+ break;
23368
+ case "Translate":
23369
+ this.subQuery =
23370
+ "Translate the upcoming sentence to " + this.translatelanguage + ".";
23371
+ break;
23372
+ case "Sentiment Analysis":
23373
+ this.isSentimentCheck = true;
23374
+ this.subQuery =
23375
+ '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:';
23376
+ break;
23448
23377
  }
23449
- return storedRoutes.get(key) || null;
23378
+ this.updateAISugesstions();
23450
23379
  }
23451
23380
  /**
23452
- * @param {?} future
23453
- * @param {?} curr
23454
23381
  * @return {?}
23455
23382
  */
23456
- shouldReuseRoute(future, curr) {
23457
- // console.log("shouldReuseRoute", future, curr);
23458
- // return future.routeConfig === curr.routeConfig;
23459
- if (future.routeConfig === curr.routeConfig) {
23460
- if (future.children.length === 0 && curr.children.length === 0) {
23461
- // 无子路由时, 通过params和queryParams判断是否复用路由
23462
- return (JSON.stringify(future.params) === JSON.stringify(curr.params));
23383
+ updateAISugesstions() {
23384
+ try {
23385
+ if (this.promptQuery) {
23386
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
23387
+ "";
23388
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
23389
+ "none";
23390
+ this.sentimentButton.element.style.display = "none";
23391
+ this.regenerateButton.disabled = true;
23392
+ this.copyButton.disabled = true;
23393
+ this.replaceButton.disabled = true;
23394
+ this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
23395
+ this.apiResultData.then((/**
23396
+ * @param {?} result
23397
+ * @return {?}
23398
+ */
23399
+ (result) => {
23400
+ this.AIResult = this.isSentimentCheck ? this.promptQuery : result;
23401
+ this.sentimentButton.content = result
23402
+ .toLowerCase()
23403
+ .includes("positive")
23404
+ ? "😊 Positive"
23405
+ : result.toLowerCase().includes("negative")
23406
+ ? "😞 Negative"
23407
+ : "😐 Neutral";
23408
+ this.sentimentButton.element.style.display = !this.isSentimentCheck
23409
+ ? "none"
23410
+ : "";
23411
+ this.rightRte.value = this.AIResult;
23412
+ /** @type {?} */
23413
+ var noResultsFound = !(this.AIResult || this.promptQuery);
23414
+ ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
23415
+ this.regenerateButton.disabled = noResultsFound;
23416
+ this.copyButton.disabled = noResultsFound;
23417
+ this.replaceButton.disabled = noResultsFound;
23418
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
23419
+ "none";
23420
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
23421
+ noResultsFound ? "none" : "";
23422
+ console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
23423
+ // this.ref.markForCheck();
23424
+ }));
23463
23425
  }
23464
- return true;
23465
23426
  }
23466
- return false;
23427
+ catch (_a) {
23428
+ // this.toastObj.show();
23429
+ }
23467
23430
  }
23468
23431
  /**
23469
- * @param {?} route
23432
+ * @param {?} subQuery
23433
+ * @param {?} promptQuery
23470
23434
  * @return {?}
23471
23435
  */
23472
- getRoutePath(route) {
23473
- if (route.routeConfig) {
23474
- // const pathParams = JSON.stringify(route.params);
23475
- // const queryParams = new URLSearchParams(route.queryParams).toString();
23436
+ getResponseFromOpenAI(subQuery, promptQuery) {
23437
+ return __awaiter(this, void 0, void 0, function* () {
23476
23438
  /** @type {?} */
23477
- const url = route._urlSegment.segments.map((/**
23478
- * @param {?} v
23479
- * @return {?}
23480
- */
23481
- (v) => v.path)).join("/");
23482
- return "/" + url;
23483
- }
23484
- return "";
23439
+ const content = yield OpenAiModelRTE(subQuery, promptQuery);
23440
+ return content ? ((/** @type {?} */ (content))) : "";
23441
+ });
23442
+ }
23443
+ /**
23444
+ * @return {?}
23445
+ */
23446
+ dialogShow() {
23447
+ (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
23448
+ * @return {?}
23449
+ */
23450
+ () => {
23451
+ this.updateAISugesstions();
23452
+ }));
23453
+ (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
23454
+ * @return {?}
23455
+ */
23456
+ () => {
23457
+ this.copyTextToClipboard(this.AIResult);
23458
+ }));
23459
+ (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
23460
+ * @return {?}
23461
+ */
23462
+ () => {
23463
+ /** @type {?} */
23464
+ let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23465
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
23466
+ ((/** @type {?} */ (this.rteObj))).executeCommand("insertHTML", this.AIResult, {
23467
+ undo: true,
23468
+ });
23469
+ this.closeDialog();
23470
+ }));
23471
+ ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
23485
23472
  }
23486
23473
  /**
23487
- * @param {?} path
23488
23474
  * @return {?}
23489
23475
  */
23490
- clearCache(path) {
23491
- // console.log("clearCache", storedRoutes, path);
23492
- toBeDeleteUrl = path;
23493
- storedRoutes.delete(path);
23476
+ closeDialog() {
23477
+ this.AIdialog.hide();
23478
+ this.rightRte.value = "";
23479
+ this.leftRte.value = "";
23480
+ this.promptQuery = "";
23481
+ this.chipValue = "Standard";
23482
+ this.AIResult = "";
23483
+ this.dropValIndex = 0;
23484
+ this.selectedQuery = "Rephrase";
23485
+ this.sentimentButton.content = "😊 Neutral";
23494
23486
  }
23495
23487
  /**
23488
+ * @param {?} text
23496
23489
  * @return {?}
23497
23490
  */
23498
- clearAllCache() {
23499
- storedRoutes.clear();
23500
- }
23501
- }
23502
- KeepAliveService.decorators = [
23503
- { type: Injectable, args: [{
23504
- providedIn: "root",
23505
- },] }
23506
- ];
23507
- /** @nocollapse */ KeepAliveService.ngInjectableDef = ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
23508
-
23509
- /**
23510
- * @fileoverview added by tsickle
23511
- * Generated from: lib/form/confirm-select/index.component.ts
23512
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23513
- */
23514
- class ConfirmSelectComponent {
23515
- constructor() {
23516
- this.dataSource = [];
23517
- this.disabled = false;
23518
- this.fields = { text: "Game", value: "Id" };
23519
- this.showSelectAll = true;
23520
- this.valueChange = new EventEmitter();
23521
- this.selectedItems = [];
23522
- this.isInteracted = false;
23491
+ copyTextToClipboard(text) {
23492
+ if (navigator.clipboard) {
23493
+ navigator.clipboard
23494
+ .writeText(text)
23495
+ .then((/**
23496
+ * @return {?}
23497
+ */
23498
+ () => {
23499
+ console.log("Text copied to clipboard successfully!");
23500
+ }))
23501
+ .catch((/**
23502
+ * @param {?} err
23503
+ * @return {?}
23504
+ */
23505
+ (err) => {
23506
+ console.error("Failed to copy text: ", err);
23507
+ }));
23508
+ }
23509
+ else {
23510
+ // Fallback for browsers that do not support the Clipboard API
23511
+ /** @type {?} */
23512
+ const textarea = document.createElement("textarea");
23513
+ textarea.value = text;
23514
+ document.body.appendChild(textarea);
23515
+ textarea.select();
23516
+ try {
23517
+ document.execCommand("copy");
23518
+ console.log("Text copied to clipboard using execCommand");
23519
+ }
23520
+ catch (err) {
23521
+ console.error("Failed to copy text: ", err);
23522
+ }
23523
+ finally {
23524
+ document.body.removeChild(textarea);
23525
+ }
23526
+ }
23523
23527
  }
23524
23528
  /**
23525
23529
  * @return {?}
23526
23530
  */
23527
- ngOnInit() {
23528
- this.getInfo();
23529
- this.resetSelectedItems();
23531
+ onOverlayClick() {
23532
+ /** @type {?} */
23533
+ let activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
23534
+ if (activeEle) {
23535
+ activeEle.classList.remove("e-active");
23536
+ }
23537
+ this.closeDialog();
23530
23538
  }
23531
23539
  /**
23532
- * @param {?} changes
23540
+ * @param {?} args
23533
23541
  * @return {?}
23534
23542
  */
23535
- ngOnChanges(changes) {
23536
- if (changes.value && !changes.value.firstChange) {
23537
- this.resetSelectedItems();
23538
- }
23543
+ onQuerySelect(args) {
23544
+ // this.chipList.selectedChips = 0;
23545
+ this.translatelanguage = "EN";
23546
+ this.selectedQuery = args.itemData.text;
23547
+ this.updateAISugesstionsData(args.itemData.text);
23539
23548
  }
23540
23549
  /**
23550
+ * @param {?} args
23541
23551
  * @return {?}
23542
23552
  */
23543
- getInfo() {
23544
- this.translation = JSON.parse(localStorage.getItem("translation"));
23553
+ onLanguageSelect(args) {
23554
+ this.translatelanguage = args.itemData.id;
23555
+ this.updateAISugesstionsData("Translate");
23545
23556
  }
23546
23557
  /**
23558
+ * @param {?} args
23547
23559
  * @return {?}
23548
23560
  */
23549
- resetSelectedItems() {
23550
- this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
23551
- if (this.comfirmSelect) {
23552
- this.comfirmSelect.value = this.selectedItems;
23553
- }
23561
+ onChipClick(args) {
23562
+ this.chipValue = args.itemData.text;
23563
+ // 事件会触发两次 必须判断args.text是否有值
23564
+ if (args.itemData.text)
23565
+ this.updateAISugesstionsData("Rephrase");
23554
23566
  }
23555
23567
  /**
23568
+ * @param {?} args
23556
23569
  * @return {?}
23557
23570
  */
23558
- onCancel() {
23559
- this.isInteracted = true;
23560
- this.resetSelectedItems();
23561
- this.comfirmSelect.hidePopup();
23571
+ _toolbarClick(args) {
23572
+ this.toolbarClick.emit(args);
23562
23573
  }
23563
23574
  /**
23564
23575
  * @return {?}
23565
23576
  */
23566
- onApply() {
23567
- this.isInteracted = true;
23568
- /** @type {?} */
23569
- const val = this.comfirmSelect.value;
23570
- this.valueChange.emit(val);
23571
- this.comfirmSelect.hidePopup();
23577
+ hideToast() {
23578
+ this.showMsg = false;
23572
23579
  }
23573
23580
  /**
23574
- * @param {?} e
23575
23581
  * @return {?}
23576
23582
  */
23577
- onClose(e) {
23578
- if (this.isInteracted) {
23579
- this.isInteracted = false;
23583
+ onZoom() {
23584
+ if (this.size === "largest") {
23585
+ this.size = ""; // 恢复到原始大小
23580
23586
  }
23581
23587
  else {
23582
- this.resetSelectedItems();
23588
+ this.size = "largest"; // 设置为最大化
23583
23589
  }
23584
23590
  }
23585
23591
  }
23586
- ConfirmSelectComponent.decorators = [
23592
+ RichtexteditorComponent.decorators = [
23587
23593
  { type: Component, args: [{
23588
- selector: "rs-confirm-select",
23589
- 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",
23590
- 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)}"]
23594
+ selector: "rs-richtext-editor",
23595
+ 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",
23596
+ 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}"]
23591
23597
  }] }
23592
23598
  ];
23593
- ConfirmSelectComponent.propDecorators = {
23594
- comfirmSelect: [{ type: ViewChild, args: ["comfirmSelect", { static: false },] }],
23595
- value: [{ type: Input }],
23596
- dataSource: [{ type: Input }],
23597
- disabled: [{ type: Input }],
23598
- fields: [{ type: Input }],
23599
+ /** @nocollapse */
23600
+ RichtexteditorComponent.ctorParameters = () => [
23601
+ { type: ChangeDetectorRef }
23602
+ ];
23603
+ RichtexteditorComponent.propDecorators = {
23604
+ rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
23605
+ queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
23606
+ leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
23607
+ rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
23608
+ AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
23609
+ sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
23610
+ regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
23611
+ copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
23612
+ replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
23599
23613
  placeholder: [{ type: Input }],
23600
- showSelectAll: [{ type: Input }],
23601
- valueChange: [{ type: Output }]
23614
+ value: [{ type: Input }],
23615
+ height: [{ type: Input }],
23616
+ autoSaveOnIdle: [{ type: Input }],
23617
+ target: [{ type: Input }],
23618
+ toolbarClick: [{ type: Output }],
23619
+ change: [{ type: Output }]
23602
23620
  };
23603
23621
  if (false) {
23604
23622
  /** @type {?} */
23605
- ConfirmSelectComponent.prototype.comfirmSelect;
23623
+ RichtexteditorComponent.prototype.rteObj;
23606
23624
  /** @type {?} */
23607
- ConfirmSelectComponent.prototype.value;
23625
+ RichtexteditorComponent.prototype.queryCategory;
23608
23626
  /** @type {?} */
23609
- ConfirmSelectComponent.prototype.dataSource;
23627
+ RichtexteditorComponent.prototype.leftRte;
23610
23628
  /** @type {?} */
23611
- ConfirmSelectComponent.prototype.disabled;
23629
+ RichtexteditorComponent.prototype.rightRte;
23612
23630
  /** @type {?} */
23613
- ConfirmSelectComponent.prototype.fields;
23631
+ RichtexteditorComponent.prototype.AIdialog;
23614
23632
  /** @type {?} */
23615
- ConfirmSelectComponent.prototype.placeholder;
23633
+ RichtexteditorComponent.prototype.sentimentButton;
23616
23634
  /** @type {?} */
23617
- ConfirmSelectComponent.prototype.showSelectAll;
23635
+ RichtexteditorComponent.prototype.regenerateButton;
23618
23636
  /** @type {?} */
23619
- ConfirmSelectComponent.prototype.valueChange;
23637
+ RichtexteditorComponent.prototype.copyButton;
23620
23638
  /** @type {?} */
23621
- ConfirmSelectComponent.prototype.translation;
23639
+ RichtexteditorComponent.prototype.replaceButton;
23622
23640
  /** @type {?} */
23623
- ConfirmSelectComponent.prototype.selectedItems;
23641
+ RichtexteditorComponent.prototype.placeholder;
23624
23642
  /** @type {?} */
23625
- ConfirmSelectComponent.prototype.isInteracted;
23643
+ RichtexteditorComponent.prototype.value;
23644
+ /** @type {?} */
23645
+ RichtexteditorComponent.prototype.height;
23646
+ /** @type {?} */
23647
+ RichtexteditorComponent.prototype.autoSaveOnIdle;
23648
+ /** @type {?} */
23649
+ RichtexteditorComponent.prototype.target;
23650
+ /** @type {?} */
23651
+ RichtexteditorComponent.prototype.toolbarClick;
23652
+ /** @type {?} */
23653
+ RichtexteditorComponent.prototype.change;
23654
+ /** @type {?} */
23655
+ RichtexteditorComponent.prototype.family;
23656
+ /** @type {?} */
23657
+ RichtexteditorComponent.prototype.dialogWidth;
23658
+ /** @type {?} */
23659
+ RichtexteditorComponent.prototype.dialogHeight;
23660
+ /** @type {?} */
23661
+ RichtexteditorComponent.prototype.showZoomBtn;
23662
+ /** @type {?} */
23663
+ RichtexteditorComponent.prototype.showMsg;
23664
+ /** @type {?} */
23665
+ RichtexteditorComponent.prototype.insertImageSettings;
23666
+ /** @type {?} */
23667
+ RichtexteditorComponent.prototype.editorManager;
23668
+ /** @type {?} */
23669
+ RichtexteditorComponent.prototype.size;
23670
+ /** @type {?} */
23671
+ RichtexteditorComponent.prototype.selectedQuery;
23672
+ /** @type {?} */
23673
+ RichtexteditorComponent.prototype.dropValIndex;
23674
+ /** @type {?} */
23675
+ RichtexteditorComponent.prototype.queryList;
23676
+ /** @type {?} */
23677
+ RichtexteditorComponent.prototype.rephraseTyleList;
23678
+ /** @type {?} */
23679
+ RichtexteditorComponent.prototype.languageList;
23680
+ /** @type {?} */
23681
+ RichtexteditorComponent.prototype.promptQuery;
23682
+ /** @type {?} */
23683
+ RichtexteditorComponent.prototype.isSentimentCheck;
23684
+ /** @type {?} */
23685
+ RichtexteditorComponent.prototype.subQuery;
23686
+ /** @type {?} */
23687
+ RichtexteditorComponent.prototype.translatelanguage;
23688
+ /** @type {?} */
23689
+ RichtexteditorComponent.prototype.chipValue;
23690
+ /** @type {?} */
23691
+ RichtexteditorComponent.prototype.apiResultData;
23692
+ /** @type {?} */
23693
+ RichtexteditorComponent.prototype.AIResult;
23694
+ /** @type {?} */
23695
+ RichtexteditorComponent.prototype.tools;
23696
+ /**
23697
+ * @type {?}
23698
+ * @private
23699
+ */
23700
+ RichtexteditorComponent.prototype.ref;
23626
23701
  }
23627
23702
 
23628
23703
  /**
@@ -23850,5 +23925,5 @@ RaiseCommonLibModule.decorators = [
23850
23925
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23851
23926
  */
23852
23927
 
23853
- 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 };
23928
+ 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 };
23854
23929
  //# sourceMappingURL=raise-common-lib.js.map