raise-common-lib 0.0.193 → 0.0.194

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 +1642 -1564
  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 +113 -45
  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 +124 -46
  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 +1503 -1435
  21. package/fesm2015/raise-common-lib.js.map +1 -1
  22. package/fesm5/raise-common-lib.js +1640 -1562
  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
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@syncfusion/ej2-angular-grids'), require('lodash'), require('rxjs'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('@syncfusion/ej2-angular-treegrid'), require('@syncfusion/ej2-angular-navigations'), require('@angular/router'), require('rxjs/operators'), require('@angular/cdk/drag-drop'), require('@angular/common/http'), require('@syncfusion/ej2-base'), require('resize-observer-polyfill'), require('@syncfusion/ej2-data'), require('moment'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-richtexteditor'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-splitbuttons'), require('@syncfusion/ej2-angular-popups'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/forms'), require('@angular/common'), require('@syncfusion/ej2-angular-diagrams'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-pivotview'), require('@syncfusion/ej2-angular-charts'), require('@syncfusion/ej2-angular-layouts'), require('@syncfusion/ej2-angular-pdfviewer'), require('@angular/material/menu'), require('@angular/material/tooltip')) :
3
- typeof define === 'function' && define.amd ? define('raise-common-lib', ['exports', '@angular/core', '@syncfusion/ej2-angular-grids', 'lodash', 'rxjs', '@angular/material/snack-bar', '@angular/material/dialog', '@syncfusion/ej2-angular-treegrid', '@syncfusion/ej2-angular-navigations', '@angular/router', 'rxjs/operators', '@angular/cdk/drag-drop', '@angular/common/http', '@syncfusion/ej2-base', 'resize-observer-polyfill', '@syncfusion/ej2-data', 'moment', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-richtexteditor', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-splitbuttons', '@syncfusion/ej2-angular-popups', '@angular/material/icon', '@angular/platform-browser', '@angular/forms', '@angular/common', '@syncfusion/ej2-angular-diagrams', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-pivotview', '@syncfusion/ej2-angular-charts', '@syncfusion/ej2-angular-layouts', '@syncfusion/ej2-angular-pdfviewer', '@angular/material/menu', '@angular/material/tooltip'], factory) :
4
- (global = global || self, factory(global['raise-common-lib'] = {}, global.ng.core, global.ej2AngularGrids, global.lodash, global.rxjs, global.ng.material['snack-bar'], global.ng.material.dialog, global.ej2AngularTreegrid, global.ej2AngularNavigations, global.ng.router, global.rxjs.operators, global.ng.cdk['drag-drop'], global.ng.common.http, global.ej2Base, global.ResizeObserver, global.ej2Data, global.moment, global.ej2AngularDropdowns, global.ej2AngularRichtexteditor, global.ej2AngularButtons, global.ej2AngularSplitbuttons, global.ej2AngularPopups, global.ng.material.icon, global.ng.platformBrowser, global.ng.forms, global.ng.common, global.ej2AngularDiagrams, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularPivotview, global.ej2AngularCharts, global.ej2AngularLayouts, global.ej2AngularPdfviewer, global.ng.material.menu, global.ng.material.tooltip));
5
- }(this, (function (exports, core, ej2AngularGrids, lodash, rxjs, snackBar, dialog, ej2AngularTreegrid, ej2AngularNavigations, router, operators, dragDrop, http, ej2Base, ResizeObserver, ej2Data, moment, ej2AngularDropdowns, ej2AngularRichtexteditor, ej2AngularButtons, ej2AngularSplitbuttons, ej2AngularPopups, icon, platformBrowser, forms, common, ej2AngularDiagrams, ej2AngularCalendars, ej2AngularInputs, ej2AngularPivotview, ej2AngularCharts, ej2AngularLayouts, ej2AngularPdfviewer, menu, tooltip) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@syncfusion/ej2-angular-grids'), require('lodash'), require('rxjs'), require('@angular/material/snack-bar'), require('@angular/material/dialog'), require('@syncfusion/ej2-angular-treegrid'), require('@syncfusion/ej2-angular-navigations'), require('@angular/router'), require('rxjs/operators'), require('@angular/cdk/drag-drop'), require('@angular/common/http'), require('@syncfusion/ej2-base'), require('resize-observer-polyfill'), require('@syncfusion/ej2-data'), require('moment'), require('@angular/material/icon'), require('@angular/platform-browser'), require('@angular/forms'), require('@angular/common'), require('@syncfusion/ej2-angular-buttons'), require('@syncfusion/ej2-angular-diagrams'), require('@syncfusion/ej2-angular-popups'), require('@syncfusion/ej2-angular-calendars'), require('@syncfusion/ej2-angular-inputs'), require('@syncfusion/ej2-angular-dropdowns'), require('@syncfusion/ej2-angular-pivotview'), require('@syncfusion/ej2-angular-charts'), require('@syncfusion/ej2-angular-layouts'), require('@syncfusion/ej2-angular-pdfviewer'), require('@syncfusion/ej2-angular-splitbuttons'), require('@syncfusion/ej2-angular-richtexteditor'), require('@angular/material/menu'), require('@angular/material/tooltip')) :
3
+ typeof define === 'function' && define.amd ? define('raise-common-lib', ['exports', '@angular/core', '@syncfusion/ej2-angular-grids', 'lodash', 'rxjs', '@angular/material/snack-bar', '@angular/material/dialog', '@syncfusion/ej2-angular-treegrid', '@syncfusion/ej2-angular-navigations', '@angular/router', 'rxjs/operators', '@angular/cdk/drag-drop', '@angular/common/http', '@syncfusion/ej2-base', 'resize-observer-polyfill', '@syncfusion/ej2-data', 'moment', '@angular/material/icon', '@angular/platform-browser', '@angular/forms', '@angular/common', '@syncfusion/ej2-angular-buttons', '@syncfusion/ej2-angular-diagrams', '@syncfusion/ej2-angular-popups', '@syncfusion/ej2-angular-calendars', '@syncfusion/ej2-angular-inputs', '@syncfusion/ej2-angular-dropdowns', '@syncfusion/ej2-angular-pivotview', '@syncfusion/ej2-angular-charts', '@syncfusion/ej2-angular-layouts', '@syncfusion/ej2-angular-pdfviewer', '@syncfusion/ej2-angular-splitbuttons', '@syncfusion/ej2-angular-richtexteditor', '@angular/material/menu', '@angular/material/tooltip'], factory) :
4
+ (global = global || self, factory(global['raise-common-lib'] = {}, global.ng.core, global.ej2AngularGrids, global.lodash, global.rxjs, global.ng.material['snack-bar'], global.ng.material.dialog, global.ej2AngularTreegrid, global.ej2AngularNavigations, global.ng.router, global.rxjs.operators, global.ng.cdk['drag-drop'], global.ng.common.http, global.ej2Base, global.ResizeObserver, global.ej2Data, global.moment, global.ng.material.icon, global.ng.platformBrowser, global.ng.forms, global.ng.common, global.ej2AngularButtons, global.ej2AngularDiagrams, global.ej2AngularPopups, global.ej2AngularCalendars, global.ej2AngularInputs, global.ej2AngularDropdowns, global.ej2AngularPivotview, global.ej2AngularCharts, global.ej2AngularLayouts, global.ej2AngularPdfviewer, global.ej2AngularSplitbuttons, global.ej2AngularRichtexteditor, global.ng.material.menu, global.ng.material.tooltip));
5
+ }(this, (function (exports, core, ej2AngularGrids, lodash, rxjs, snackBar, dialog, ej2AngularTreegrid, ej2AngularNavigations, router, operators, dragDrop, http, ej2Base, ResizeObserver, ej2Data, moment, icon, platformBrowser, forms, common, ej2AngularButtons, ej2AngularDiagrams, ej2AngularPopups, ej2AngularCalendars, ej2AngularInputs, ej2AngularDropdowns, ej2AngularPivotview, ej2AngularCharts, ej2AngularLayouts, ej2AngularPdfviewer, ej2AngularSplitbuttons, ej2AngularRichtexteditor, menu, tooltip) { 'use strict';
6
6
 
7
7
  ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
8
8
  moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
@@ -1972,7 +1972,7 @@
1972
1972
  { type: core.Component, args: [{
1973
1973
  selector: "kt-new-action-notification",
1974
1974
  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",
1975
- 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}"]
1975
+ 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}"]
1976
1976
  }] }
1977
1977
  ];
1978
1978
  /** @nocollapse */
@@ -3072,7 +3072,7 @@
3072
3072
  { type: core.Component, args: [{
3073
3073
  selector: "rs-page-tab",
3074
3074
  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",
3075
- 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}"]
3075
+ 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}"]
3076
3076
  }] }
3077
3077
  ];
3078
3078
  RsPageTabComponent.propDecorators = {
@@ -4402,7 +4402,7 @@
4402
4402
  { type: core.Component, args: [{
4403
4403
  selector: "rs-drawer",
4404
4404
  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",
4405
- 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}"]
4405
+ 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}"]
4406
4406
  }] }
4407
4407
  ];
4408
4408
  /** @nocollapse */
@@ -22429,9 +22429,12 @@
22429
22429
  * Generated from: lib/form/drawer-form/drawer-form.component.ts
22430
22430
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22431
22431
  */
22432
+ /** @type {?} */
22433
+ var FORM_PROXY_TAG = Symbol.for("form-proxy");
22432
22434
  var DrawerFormComponent = /** @class */ (function () {
22433
22435
  function DrawerFormComponent(ref) {
22434
22436
  this.ref = ref;
22437
+ this._form = {};
22435
22438
  this._sections = [];
22436
22439
  this.optionsMap = {};
22437
22440
  this.formDisabled = false;
@@ -22443,12 +22446,14 @@
22443
22446
  groupBy: null,
22444
22447
  };
22445
22448
  this.showFilterNumber = 10;
22446
- this.form = {};
22449
+ this.dateFormat = "yyyy-MM-dd";
22447
22450
  this.formChange = new core.EventEmitter();
22448
22451
  this.fieldChange = new core.EventEmitter();
22449
22452
  this.sections = [];
22450
- this.filterOptionsMap = {};
22453
+ this.form = {};
22451
22454
  this.fieldValidMap = {};
22455
+ // 存储 datepicker 的值
22456
+ this.dateForm = {};
22452
22457
  this.dateValidMap = {};
22453
22458
  this.scrollIndex = 0;
22454
22459
  this.isClickAnchor = false;
@@ -22469,13 +22474,19 @@
22469
22474
  * @return {?}
22470
22475
  */
22471
22476
  function (changes) {
22477
+ if (changes._form) {
22478
+ if (!changes._form.currentValue[FORM_PROXY_TAG]) {
22479
+ this.form = this.getFormProxy(changes._form.currentValue);
22480
+ this.formChange.emit(this.form);
22481
+ }
22482
+ if (!changes._form.firstChange) {
22483
+ this.checkFormChange(changes._form.previousValue, changes._form.currentValue);
22484
+ }
22485
+ }
22472
22486
  if (changes._sections) {
22473
22487
  this.sections = filterShowSection(changes._sections.currentValue);
22474
22488
  this.formatForm(this.sections);
22475
22489
  }
22476
- if (changes.form && !changes.form.firstChange) {
22477
- this.checkFormChange(changes.form.previousValue, changes.form.currentValue);
22478
- }
22479
22490
  };
22480
22491
  /**
22481
22492
  * @return {?}
@@ -22607,6 +22618,23 @@
22607
22618
  }
22608
22619
  }));
22609
22620
  };
22621
+ /**
22622
+ * @param {?} field
22623
+ * @param {?} value
22624
+ * @return {?}
22625
+ */
22626
+ DrawerFormComponent.prototype.syncFormToDateForm = /**
22627
+ * @param {?} field
22628
+ * @param {?} value
22629
+ * @return {?}
22630
+ */
22631
+ function (field, value) {
22632
+ if (value) {
22633
+ /** @type {?} */
22634
+ var date = moment(value);
22635
+ this.dateForm[field.formKey] = date.isValid() ? date.toDate() : null;
22636
+ }
22637
+ };
22610
22638
  /**
22611
22639
  * @param {?} sections
22612
22640
  * @return {?}
@@ -22642,6 +22670,9 @@
22642
22670
  case "Switch":
22643
22671
  _this.form[field.formKey] = false;
22644
22672
  break;
22673
+ case "Datepicker":
22674
+ _this.syncFormToDateForm(field, _this.form[field.formKey]);
22675
+ break;
22645
22676
  default:
22646
22677
  _this.form[field.formKey] = null;
22647
22678
  }
@@ -22649,6 +22680,43 @@
22649
22680
  }));
22650
22681
  }));
22651
22682
  };
22683
+ /**
22684
+ * @param {?} form
22685
+ * @return {?}
22686
+ */
22687
+ DrawerFormComponent.prototype.getFormProxy = /**
22688
+ * @param {?} form
22689
+ * @return {?}
22690
+ */
22691
+ function (form) {
22692
+ var _this = this;
22693
+ // 现在除了 tag 之外不支持嵌套 form 属性,只对浅层进行处理
22694
+ /** @type {?} */
22695
+ var proxyForm = new Proxy(form, {
22696
+ set: (/**
22697
+ * @param {?} target
22698
+ * @param {?} prop
22699
+ * @param {?} value
22700
+ * @return {?}
22701
+ */
22702
+ function (target, prop, value) {
22703
+ target[prop] = value;
22704
+ /** @type {?} */
22705
+ var field = _this.getField(prop);
22706
+ if (field && field.fieldFormType === "Datepicker") {
22707
+ _this.syncFormToDateForm(field, value);
22708
+ }
22709
+ return true;
22710
+ }),
22711
+ });
22712
+ Object.defineProperty(proxyForm, FORM_PROXY_TAG, {
22713
+ value: true,
22714
+ writable: false,
22715
+ enumerable: false,
22716
+ configurable: false,
22717
+ });
22718
+ return proxyForm;
22719
+ };
22652
22720
  // 表单提交前会触发这个函数
22653
22721
  // 表单提交前会触发这个函数
22654
22722
  /**
@@ -22664,12 +22732,8 @@
22664
22732
  * @return {?}
22665
22733
  */
22666
22734
  function (value, field) {
22667
- var _a;
22668
- /** @type {?} */
22669
- var newForm = __assign({}, this.form, (_a = {}, _a[field.formKey] = value, _a));
22670
- // 修复错误提示显示 bug,不设置一下有概率拿不到最新的值
22671
- this.form = newForm;
22672
- this.formChange.emit(newForm);
22735
+ this.form[field.formKey] = value;
22736
+ this.formChange.emit(this.form);
22673
22737
  this.fieldChange.emit({ field: field, value: value });
22674
22738
  };
22675
22739
  /**
@@ -22836,13 +22900,14 @@
22836
22900
  if (!event.isInteracted) {
22837
22901
  return;
22838
22902
  }
22839
- /** @type {?} */
22840
- var value = event.value;
22841
- if (field.fieldFormType === "Datepicker") {
22842
- /** @type {?} */
22843
- var date = moment(value);
22844
- value = date.isValid() ? date.format("YYYY-MM-DD") : null;
22903
+ if (field.fieldFormType !== "Datepicker") {
22904
+ this.onChange(event.value, field);
22905
+ return;
22845
22906
  }
22907
+ console.log("change", event);
22908
+ /** @type {?} */
22909
+ var value = event.value ? moment(event.value).format("YYYY-MM-DD") : null;
22910
+ this.dateForm[field.formKey] = event.value;
22846
22911
  this.onChange(value, field);
22847
22912
  };
22848
22913
  /**
@@ -22870,17 +22935,21 @@
22870
22935
  * @return {?}
22871
22936
  */
22872
22937
  function (event, field) {
22938
+ var _this = this;
22873
22939
  this.onBlur(field);
22874
- /** @type {?} */
22875
- var $input = event.model.element.querySelector("input");
22876
- if (!$input || !$input.value) {
22877
- delete this.dateValidMap[field.formKey];
22878
- return;
22879
- }
22880
- /** @type {?} */
22881
- var date = moment($input.value);
22882
- this.onChange(date.isValid() ? date.format("YYYY-MM-DD") : null, field);
22883
- this.dateValidMap[field.formKey] = date.isValid();
22940
+ setTimeout((/**
22941
+ * @return {?}
22942
+ */
22943
+ function () {
22944
+ /** @type {?} */
22945
+ var $input = event.model.element.querySelector("input");
22946
+ if ($input && $input.value && !_this.dateForm[field.formKey]) {
22947
+ _this.dateValidMap[field.formKey] = false;
22948
+ }
22949
+ else {
22950
+ delete _this.dateValidMap[field.formKey];
22951
+ }
22952
+ }), 50);
22884
22953
  };
22885
22954
  /**
22886
22955
  * @param {?} field
@@ -22920,23 +22989,24 @@
22920
22989
  if (event.text) {
22921
22990
  query.where(this.optionFields.text, "contains", event.text, true);
22922
22991
  }
22923
- event.updateData(this.optionsMap[field.optionKey] || [], query);
22992
+ event.updateData(this.getOptions(field), query);
22924
22993
  };
22925
22994
  /**
22926
22995
  * @param {?} field
22927
22996
  * @return {?}
22928
22997
  */
22929
- DrawerFormComponent.prototype.getValue = /**
22998
+ DrawerFormComponent.prototype.getOptions = /**
22930
22999
  * @param {?} field
22931
23000
  * @return {?}
22932
23001
  */
22933
23002
  function (field) {
22934
- if (field.fieldFormType === "Datepicker" && this.form[field.formKey]) {
22935
- /** @type {?} */
22936
- var date = moment(this.form[field.formKey]);
22937
- return date.isValid() ? date.toDate() : null;
23003
+ if (Array.isArray(this.optionsMap[field.optionKey])) {
23004
+ return this.optionsMap[field.optionKey];
22938
23005
  }
22939
- return this.form[field.formKey];
23006
+ if (Array.isArray(this.optionsMap[field.formKey])) {
23007
+ return this.optionsMap[field.formKey];
23008
+ }
23009
+ return [];
22940
23010
  };
22941
23011
  /**
22942
23012
  * @param {?} field
@@ -23057,8 +23127,8 @@
23057
23127
  DrawerFormComponent.decorators = [
23058
23128
  { type: core.Component, args: [{
23059
23129
  selector: "rs-drawer-form",
23060
- 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",
23061
- 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}"]
23130
+ 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",
23131
+ 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}"]
23062
23132
  }] }
23063
23133
  ];
23064
23134
  /** @nocollapse */
@@ -23066,15 +23136,17 @@
23066
23136
  { type: core.ChangeDetectorRef }
23067
23137
  ]; };
23068
23138
  DrawerFormComponent.propDecorators = {
23139
+ _form: [{ type: core.Input, args: ["form",] }],
23069
23140
  _sections: [{ type: core.Input, args: ["sections",] }],
23070
23141
  optionsMap: [{ type: core.Input, args: ["optionsMap",] }],
23071
- customTemplate: [{ type: core.Input, args: ["customTemplate",] }],
23072
- customSectionTemplate: [{ type: core.Input, args: ["customSectionTemplate",] }],
23073
23142
  formDisabled: [{ type: core.Input, args: ["disabled",] }],
23074
23143
  showAnchor: [{ type: core.Input, args: ["showAnchor",] }],
23144
+ customTemplate: [{ type: core.Input, args: ["customTemplate",] }],
23145
+ customSectionTemplate: [{ type: core.Input, args: ["customSectionTemplate",] }],
23075
23146
  optionFields: [{ type: core.Input, args: ["optionFields",] }],
23076
23147
  showFilterNumber: [{ type: core.Input, args: ["showFilterNumber",] }],
23077
- form: [{ type: core.Input, args: ["form",] }],
23148
+ numberFormat: [{ type: core.Input, args: ["numberFormat",] }],
23149
+ dateFormat: [{ type: core.Input, args: ["dateFormat",] }],
23078
23150
  formChange: [{ type: core.Output, args: ["formChange",] }],
23079
23151
  fieldChange: [{ type: core.Output, args: ["fieldChange",] }],
23080
23152
  rootEl: [{ type: core.ViewChild, args: ["drawerFormEl", { static: false },] }],
@@ -23085,24 +23157,28 @@
23085
23157
  return DrawerFormComponent;
23086
23158
  }());
23087
23159
  if (false) {
23160
+ /** @type {?} */
23161
+ DrawerFormComponent.prototype._form;
23088
23162
  /** @type {?} */
23089
23163
  DrawerFormComponent.prototype._sections;
23090
23164
  /** @type {?} */
23091
23165
  DrawerFormComponent.prototype.optionsMap;
23092
23166
  /** @type {?} */
23093
- DrawerFormComponent.prototype.customTemplate;
23094
- /** @type {?} */
23095
- DrawerFormComponent.prototype.customSectionTemplate;
23096
- /** @type {?} */
23097
23167
  DrawerFormComponent.prototype.formDisabled;
23098
23168
  /** @type {?} */
23099
23169
  DrawerFormComponent.prototype.showAnchor;
23100
23170
  /** @type {?} */
23171
+ DrawerFormComponent.prototype.customTemplate;
23172
+ /** @type {?} */
23173
+ DrawerFormComponent.prototype.customSectionTemplate;
23174
+ /** @type {?} */
23101
23175
  DrawerFormComponent.prototype.optionFields;
23102
23176
  /** @type {?} */
23103
23177
  DrawerFormComponent.prototype.showFilterNumber;
23104
23178
  /** @type {?} */
23105
- DrawerFormComponent.prototype.form;
23179
+ DrawerFormComponent.prototype.numberFormat;
23180
+ /** @type {?} */
23181
+ DrawerFormComponent.prototype.dateFormat;
23106
23182
  /** @type {?} */
23107
23183
  DrawerFormComponent.prototype.formChange;
23108
23184
  /** @type {?} */
@@ -23122,10 +23198,12 @@
23122
23198
  /** @type {?} */
23123
23199
  DrawerFormComponent.prototype.sections;
23124
23200
  /** @type {?} */
23125
- DrawerFormComponent.prototype.filterOptionsMap;
23201
+ DrawerFormComponent.prototype.form;
23126
23202
  /** @type {?} */
23127
23203
  DrawerFormComponent.prototype.fieldValidMap;
23128
23204
  /** @type {?} */
23205
+ DrawerFormComponent.prototype.dateForm;
23206
+ /** @type {?} */
23129
23207
  DrawerFormComponent.prototype.dateValidMap;
23130
23208
  /** @type {?} */
23131
23209
  DrawerFormComponent.prototype.sectionEls;
@@ -23142,1790 +23220,1790 @@
23142
23220
 
23143
23221
  /**
23144
23222
  * @fileoverview added by tsickle
23145
- * Generated from: lib/form/richtexteditor/ai-config.ts
23223
+ * Generated from: lib/dialog/common-dialog/index.component.ts
23146
23224
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23147
23225
  */
23148
- /**
23149
- * @record
23150
- */
23151
- function AIConfig() { }
23226
+ var CommonDialogComponent = /** @class */ (function () {
23227
+ function CommonDialogComponent(dialogRef) {
23228
+ this.dialogRef = dialogRef;
23229
+ // 隐藏元素相关属性
23230
+ this.hideHeader = false;
23231
+ this.hideCloseIcon = false;
23232
+ this.hideCloseBtn = false;
23233
+ this.hideSaveBtn = false;
23234
+ this.hideDiscardBtn = false;
23235
+ this.saveBtnLabel = "";
23236
+ this.cancelBtnLabel = "";
23237
+ this.discardBtnLabel = "";
23238
+ this.showErrorIcon = false;
23239
+ this.showZoomBtn = false;
23240
+ // 显示相关属性
23241
+ this.dialogStyle = {};
23242
+ this.size = "";
23243
+ this.title = "Dialog";
23244
+ this.loading = false;
23245
+ this.saveEmit = new core.EventEmitter();
23246
+ this.closeEmit = new core.EventEmitter();
23247
+ this.defaultSize = "";
23248
+ this.customFooter = false;
23249
+ }
23250
+ /**
23251
+ * @return {?}
23252
+ */
23253
+ CommonDialogComponent.prototype.ngAfterContentInit = /**
23254
+ * @return {?}
23255
+ */
23256
+ function () {
23257
+ this.customFooter = !!this.footerContent;
23258
+ };
23259
+ /**
23260
+ * @return {?}
23261
+ */
23262
+ CommonDialogComponent.prototype.ngOnInit = /**
23263
+ * @return {?}
23264
+ */
23265
+ function () {
23266
+ this.getInfo();
23267
+ };
23268
+ /**
23269
+ * @return {?}
23270
+ */
23271
+ CommonDialogComponent.prototype.onClose = /**
23272
+ * @return {?}
23273
+ */
23274
+ function () {
23275
+ var _this = this;
23276
+ if (this.onCloseRequest) {
23277
+ this.onCloseRequest().then((/**
23278
+ * @param {?} confirmed
23279
+ * @return {?}
23280
+ */
23281
+ function (confirmed) {
23282
+ if (confirmed) {
23283
+ _this.dialogRef.close("close");
23284
+ }
23285
+ }));
23286
+ }
23287
+ else {
23288
+ this.dialogRef.close("close");
23289
+ }
23290
+ };
23291
+ /**
23292
+ * @return {?}
23293
+ */
23294
+ CommonDialogComponent.prototype.onZoom = /**
23295
+ * @return {?}
23296
+ */
23297
+ function () {
23298
+ if (this.size === "largest") {
23299
+ this.size = this.defaultSize; // 恢复到原始大小
23300
+ }
23301
+ else {
23302
+ this.size = "largest"; // 设置为最大化
23303
+ }
23304
+ };
23305
+ /**
23306
+ * @return {?}
23307
+ */
23308
+ CommonDialogComponent.prototype.onSave = /**
23309
+ * @return {?}
23310
+ */
23311
+ function () {
23312
+ this.dialogRef.close("save");
23313
+ };
23314
+ /**
23315
+ * @return {?}
23316
+ */
23317
+ CommonDialogComponent.prototype.onDiscard = /**
23318
+ * @return {?}
23319
+ */
23320
+ function () {
23321
+ this.dialogRef.close("discard");
23322
+ };
23323
+ /**
23324
+ * @private
23325
+ * @return {?}
23326
+ */
23327
+ CommonDialogComponent.prototype.getInfo = /**
23328
+ * @private
23329
+ * @return {?}
23330
+ */
23331
+ function () {
23332
+ this.translation = JSON.parse(localStorage.getItem("translation")) || {};
23333
+ this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
23334
+ this.cancelBtnLabel =
23335
+ this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
23336
+ this.defaultSize = this.size;
23337
+ };
23338
+ CommonDialogComponent.decorators = [
23339
+ { type: core.Component, args: [{
23340
+ selector: "rs-common-dialog",
23341
+ 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",
23342
+ 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%)}"]
23343
+ }] }
23344
+ ];
23345
+ /** @nocollapse */
23346
+ CommonDialogComponent.ctorParameters = function () { return [
23347
+ { type: dialog.MatDialogRef }
23348
+ ]; };
23349
+ CommonDialogComponent.propDecorators = {
23350
+ hideHeader: [{ type: core.Input }],
23351
+ hideCloseIcon: [{ type: core.Input }],
23352
+ hideCloseBtn: [{ type: core.Input }],
23353
+ hideSaveBtn: [{ type: core.Input }],
23354
+ hideDiscardBtn: [{ type: core.Input }],
23355
+ saveBtnLabel: [{ type: core.Input }],
23356
+ cancelBtnLabel: [{ type: core.Input }],
23357
+ discardBtnLabel: [{ type: core.Input }],
23358
+ showErrorIcon: [{ type: core.Input }],
23359
+ showZoomBtn: [{ type: core.Input }],
23360
+ onCloseRequest: [{ type: core.Input }],
23361
+ dialogStyle: [{ type: core.Input }],
23362
+ size: [{ type: core.Input }],
23363
+ title: [{ type: core.Input }],
23364
+ loading: [{ type: core.Input }],
23365
+ saveEmit: [{ type: core.Output }],
23366
+ closeEmit: [{ type: core.Output }],
23367
+ footerContent: [{ type: core.ContentChild, args: ["footerSlot", { static: false },] }]
23368
+ };
23369
+ return CommonDialogComponent;
23370
+ }());
23152
23371
  if (false) {
23153
23372
  /** @type {?} */
23154
- AIConfig.prototype.endpoint;
23373
+ CommonDialogComponent.prototype.translation;
23155
23374
  /** @type {?} */
23156
- AIConfig.prototype.apiKey;
23375
+ CommonDialogComponent.prototype.hideHeader;
23157
23376
  /** @type {?} */
23158
- AIConfig.prototype.deployment;
23377
+ CommonDialogComponent.prototype.hideCloseIcon;
23159
23378
  /** @type {?} */
23160
- AIConfig.prototype.apiVersion;
23379
+ CommonDialogComponent.prototype.hideCloseBtn;
23161
23380
  /** @type {?} */
23162
- AIConfig.prototype.enabled;
23163
- }
23164
- // 从环境配置获取AI配置
23165
- /**
23166
- * @return {?}
23167
- */
23168
- function getAIConfig() {
23169
- return {
23170
- endpoint: "https://aidevused.openai.azure.com/",
23171
- apiKey: "ccba76e279f64653a50ac4fee90afe5c",
23172
- deployment: "gpt-4",
23173
- apiVersion: "2025-01-01-preview",
23174
- enabled: true,
23175
- };
23176
- }
23177
- // 检查配置是否有效
23178
- /**
23179
- * @param {?} config
23180
- * @return {?}
23181
- */
23182
- function isAIConfigValid(config) {
23183
- // 检查是否为aidevused端点且有有效API密钥
23184
- return !!((config.endpoint &&
23185
- config.apiKey &&
23186
- config.deployment &&
23187
- config.enabled &&
23188
- config.endpoint === "https://aidevused.openai.azure.com/" &&
23189
- config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
23190
- );
23191
- }
23192
- // 从后端API获取AI配置(推荐方式)
23193
- /**
23194
- * @return {?}
23195
- * @this {*}
23196
- */
23197
- function getAIConfigFromBackend() {
23198
- return __awaiter(this, void 0, void 0, function () {
23199
- return __generator(this, function (_a) {
23200
- try {
23201
- // 这里应该调用你的后端API来获取AI配置
23202
- // 例如:return await this.http.get('/api/ai-config');
23203
- // 临时返回默认配置
23204
- return [2 /*return*/, getAIConfig()];
23205
- }
23206
- catch (error) {
23207
- console.error("Failed to get AI config from backend:", error);
23208
- return [2 /*return*/, getAIConfig()];
23209
- }
23210
- return [2 /*return*/];
23211
- });
23212
- });
23381
+ CommonDialogComponent.prototype.hideSaveBtn;
23382
+ /** @type {?} */
23383
+ CommonDialogComponent.prototype.hideDiscardBtn;
23384
+ /** @type {?} */
23385
+ CommonDialogComponent.prototype.saveBtnLabel;
23386
+ /** @type {?} */
23387
+ CommonDialogComponent.prototype.cancelBtnLabel;
23388
+ /** @type {?} */
23389
+ CommonDialogComponent.prototype.discardBtnLabel;
23390
+ /** @type {?} */
23391
+ CommonDialogComponent.prototype.showErrorIcon;
23392
+ /** @type {?} */
23393
+ CommonDialogComponent.prototype.showZoomBtn;
23394
+ /** @type {?} */
23395
+ CommonDialogComponent.prototype.onCloseRequest;
23396
+ /** @type {?} */
23397
+ CommonDialogComponent.prototype.dialogStyle;
23398
+ /** @type {?} */
23399
+ CommonDialogComponent.prototype.size;
23400
+ /** @type {?} */
23401
+ CommonDialogComponent.prototype.title;
23402
+ /** @type {?} */
23403
+ CommonDialogComponent.prototype.loading;
23404
+ /** @type {?} */
23405
+ CommonDialogComponent.prototype.saveEmit;
23406
+ /** @type {?} */
23407
+ CommonDialogComponent.prototype.closeEmit;
23408
+ /** @type {?} */
23409
+ CommonDialogComponent.prototype.defaultSize;
23410
+ /** @type {?} */
23411
+ CommonDialogComponent.prototype.footerContent;
23412
+ /** @type {?} */
23413
+ CommonDialogComponent.prototype.customFooter;
23414
+ /** @type {?} */
23415
+ CommonDialogComponent.prototype.dialogRef;
23213
23416
  }
23214
23417
 
23215
23418
  /**
23216
23419
  * @fileoverview added by tsickle
23217
- * Generated from: lib/form/richtexteditor/openapi.ts
23420
+ * Generated from: lib/service/icon-loader.service.ts
23218
23421
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23219
23422
  */
23220
- // import { testAIFunction } from './ai-test';
23221
- // testAIFunction();
23222
- // 使用fetch API发送请求到Azure OpenAI
23223
- /**
23224
- * @param {?} messages
23225
- * @param {?} config
23226
- * @return {?}
23227
- * @this {*}
23228
- */
23229
- function sendAIRequest(messages, config) {
23230
- return __awaiter(this, void 0, void 0, function () {
23231
- var url, url1, response, errorText, data, error_1;
23232
- return __generator(this, function (_a) {
23233
- switch (_a.label) {
23234
- case 0:
23235
- _a.trys.push([0, 5, , 6]);
23236
- url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
23237
- url1 = "" + config.endpoint;
23238
- return [4 /*yield*/, fetch(url, {
23239
- method: 'POST',
23240
- headers: {
23241
- 'Content-Type': 'application/json',
23242
- 'api-key': config.apiKey,
23243
- },
23244
- body: JSON.stringify({
23245
- messages: messages,
23246
- max_tokens: 1000,
23247
- temperature: 0.7,
23248
- top_p: 1,
23249
- frequency_penalty: 0,
23250
- presence_penalty: 0,
23251
- }),
23252
- })];
23253
- case 1:
23254
- response = _a.sent();
23255
- if (!!response.ok) return [3 /*break*/, 3];
23256
- return [4 /*yield*/, response.text()];
23257
- case 2:
23258
- errorText = _a.sent();
23259
- throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
23260
- case 3: return [4 /*yield*/, response.json()];
23261
- case 4:
23262
- data = _a.sent();
23263
- if (!data.choices || !data.choices[0] || !data.choices[0].message) {
23264
- throw new Error('Invalid response format from AI service');
23265
- }
23266
- return [2 /*return*/, data.choices[0].message.content];
23267
- case 5:
23268
- error_1 = _a.sent();
23269
- console.error('AI request failed:', error_1);
23270
- throw error_1;
23271
- case 6: return [2 /*return*/];
23272
- }
23273
- });
23274
- });
23275
- }
23276
- // 备用方案:使用模拟数据(用于开发测试)
23423
+ var IconLoaderService = /** @class */ (function () {
23424
+ function IconLoaderService(registry, domSanitizer) {
23425
+ this.registry = registry;
23426
+ this.domSanitizer = domSanitizer;
23427
+ }
23428
+ /**
23429
+ * @param {?} list
23430
+ * @return {?}
23431
+ */
23432
+ IconLoaderService.prototype.registerIcons = /**
23433
+ * @param {?} list
23434
+ * @return {?}
23435
+ */
23436
+ function (list) {
23437
+ var _this = this;
23438
+ list.forEach((/**
23439
+ * @param {?} __0
23440
+ * @return {?}
23441
+ */
23442
+ function (_a) {
23443
+ var name = _a.name, path = _a.path;
23444
+ _this.registry.addSvgIcon(name, _this.domSanitizer.bypassSecurityTrustResourceUrl(path));
23445
+ }));
23446
+ };
23447
+ IconLoaderService.decorators = [
23448
+ { type: core.Injectable }
23449
+ ];
23450
+ /** @nocollapse */
23451
+ IconLoaderService.ctorParameters = function () { return [
23452
+ { type: icon.MatIconRegistry },
23453
+ { type: platformBrowser.DomSanitizer }
23454
+ ]; };
23455
+ return IconLoaderService;
23456
+ }());
23457
+ if (false) {
23458
+ /**
23459
+ * @type {?}
23460
+ * @private
23461
+ */
23462
+ IconLoaderService.prototype.registry;
23463
+ /**
23464
+ * @type {?}
23465
+ * @private
23466
+ */
23467
+ IconLoaderService.prototype.domSanitizer;
23468
+ }
23469
+
23277
23470
  /**
23278
- * @param {?} subQuery
23279
- * @param {?} promptQuery
23280
- * @return {?}
23471
+ * @fileoverview added by tsickle
23472
+ * Generated from: lib/service/keep-alive.service.ts
23473
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23281
23474
  */
23282
- function getMockAIResponse(subQuery, promptQuery) {
23283
- var e_1, _a;
23284
- /** @type {?} */
23285
- var mockResponses = {
23286
- Rephrase: "Rephrased: " + promptQuery,
23287
- Grammar: "Corrected: " + promptQuery,
23288
- Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
23289
- Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
23290
- Translate: "Translated: " + promptQuery,
23291
- SentimentAnalysis: '😊 Positive',
23475
+ /** @type {?} */
23476
+ var storedRoutes = new Map();
23477
+ /** @type {?} */
23478
+ var toBeDeleteUrl;
23479
+ /** @type {?} */
23480
+ var excludeRoutes = [];
23481
+ // 不需要缓存的url
23482
+ var KeepAliveService = /** @class */ (function () {
23483
+ function KeepAliveService() {
23484
+ }
23485
+ /**
23486
+ * @param {?} routes
23487
+ * @return {?}
23488
+ */
23489
+ KeepAliveService.prototype.setExcludeRoutes = /**
23490
+ * @param {?} routes
23491
+ * @return {?}
23492
+ */
23493
+ function (routes) {
23494
+ excludeRoutes = routes; // 设置不缓存的路由
23292
23495
  };
23293
- try {
23294
- for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
23295
- var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
23296
- if (subQuery.includes(key)) {
23297
- return value;
23496
+ /**
23497
+ * @param {?} route
23498
+ * @return {?}
23499
+ */
23500
+ KeepAliveService.prototype.shouldDetach = /**
23501
+ * @param {?} route
23502
+ * @return {?}
23503
+ */
23504
+ function (route) {
23505
+ /** @type {?} */
23506
+ var config = route.routeConfig;
23507
+ // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
23508
+ if (toBeDeleteUrl === this.getRoutePath(route)) {
23509
+ // 对于新开的又即将关闭的tab,不缓存
23510
+ if (route.children.length === 0) {
23511
+ toBeDeleteUrl = "";
23298
23512
  }
23513
+ return false;
23299
23514
  }
23300
- }
23301
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
23302
- finally {
23303
- try {
23304
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
23515
+ if (config && excludeRoutes.includes(this.getRoutePath(route))) {
23516
+ return false;
23305
23517
  }
23306
- finally { if (e_1) throw e_1.error; }
23307
- }
23308
- return "AI processed: " + promptQuery;
23309
- }
23310
- // 主要的AI请求方法
23311
- /**
23312
- * @param {?} subQuery
23313
- * @param {?} promptQuery
23314
- * @return {?}
23315
- * @this {*}
23316
- */
23317
- function OpenAiModelRTE(subQuery, promptQuery) {
23318
- return __awaiter(this, void 0, void 0, function () {
23319
- var config, messages, result, error_2;
23320
- return __generator(this, function (_a) {
23321
- switch (_a.label) {
23322
- case 0:
23323
- _a.trys.push([0, 2, , 3]);
23324
- config = getAIConfig();
23325
- // 检查配置是否有效
23326
- if (!isAIConfigValid(config)) {
23327
- console.warn('AI configuration is incomplete or disabled, using mock response');
23328
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23329
- }
23330
- messages = [
23331
- {
23332
- role: 'system',
23333
- content: subQuery.includes('emoji followed by the sentiment in the format')
23334
- ? 'You are a helpful assistant. Please respond in string format.'
23335
- : "NOTE: Return same html format just do changes content only. don't change html formats.",
23336
- },
23337
- {
23338
- role: 'user',
23339
- content: subQuery + " " + promptQuery,
23340
- },
23341
- ];
23342
- return [4 /*yield*/, sendAIRequest(messages, config)];
23343
- case 1:
23344
- result = _a.sent();
23345
- return [2 /*return*/, result];
23346
- case 2:
23347
- error_2 = _a.sent();
23348
- console.error('AI request failed, using mock response:', error_2);
23349
- return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23350
- case 3: return [2 /*return*/];
23351
- }
23352
- });
23353
- });
23354
- }
23355
- // 兼容性方法(保持向后兼容)
23356
- /**
23357
- * @param {?} options
23358
- * @return {?}
23359
- * @this {*}
23360
- */
23361
- function getAzureChatAIRequest(options) {
23362
- return __awaiter(this, void 0, void 0, function () {
23363
- var config, result, err_1;
23364
- return __generator(this, function (_a) {
23365
- switch (_a.label) {
23366
- case 0:
23367
- _a.trys.push([0, 2, , 3]);
23368
- config = getAIConfig();
23369
- if (!isAIConfigValid(config)) {
23370
- return [2 /*return*/, null];
23371
- }
23372
- return [4 /*yield*/, sendAIRequest(options.messages, config)];
23373
- case 1:
23374
- result = _a.sent();
23375
- return [2 /*return*/, result];
23376
- case 2:
23377
- err_1 = _a.sent();
23378
- console.error('Error occurred:', err_1);
23379
- return [2 /*return*/, null];
23380
- case 3: return [2 /*return*/];
23381
- }
23382
- });
23383
- });
23384
- }
23385
- /**
23386
- * @param {?} prompt
23387
- * @return {?}
23388
- * @this {*}
23389
- */
23390
- function getAzureTextAIRequest(prompt) {
23391
- return __awaiter(this, void 0, void 0, function () {
23392
- var config, messages, result, err_2;
23393
- return __generator(this, function (_a) {
23394
- switch (_a.label) {
23395
- case 0:
23396
- _a.trys.push([0, 2, , 3]);
23397
- config = getAIConfig();
23398
- if (!isAIConfigValid(config)) {
23399
- return [2 /*return*/, undefined];
23400
- }
23401
- messages = [
23402
- {
23403
- role: 'user',
23404
- content: prompt,
23405
- },
23406
- ];
23407
- return [4 /*yield*/, sendAIRequest(messages, config)];
23408
- case 1:
23409
- result = _a.sent();
23410
- return [2 /*return*/, result];
23411
- case 2:
23412
- err_2 = _a.sent();
23413
- console.error('Error occurred:', err_2);
23414
- return [2 /*return*/, undefined];
23415
- case 3: return [2 /*return*/];
23416
- }
23417
- });
23418
- });
23419
- }
23420
-
23421
- /**
23422
- * @fileoverview added by tsickle
23423
- * Generated from: lib/form/richtexteditor/data-config.ts
23424
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23425
- */
23426
- // font family
23427
- /** @type {?} */
23428
- var fontFamily = {
23429
- default: "Arial",
23430
- items: [
23431
- {
23432
- text: "Arial",
23433
- value: "Arial, Helvetica, sans-serif",
23434
- cssClass: "e-arial",
23435
- command: "Font",
23436
- subCommand: "FontName",
23437
- },
23438
- {
23439
- text: "Times New Roman",
23440
- value: "Times New Roman,Times,serif",
23441
- cssClass: "e-times-new-roman",
23442
- command: "Font",
23443
- subCommand: "FontName",
23444
- },
23445
- {
23446
- text: "Helvetica",
23447
- value: "Helvetica",
23448
- cssClass: "e-helvetica",
23449
- command: "Font",
23450
- subCommand: "FontName",
23451
- },
23452
- {
23453
- text: "Calibri",
23454
- value: "Calibri, Helvetica, sans-serif",
23455
- cssClass: "e-calibri",
23456
- command: "Font",
23457
- subCommand: "FontName",
23458
- },
23459
- {
23460
- text: "Verdana",
23461
- value: "Verdana,Geneva,sans-serif",
23462
- cssClass: "e-verdana",
23463
- command: "Font",
23464
- subCommand: "FontName",
23465
- },
23466
- {
23467
- text: "Georgia",
23468
- value: "Georgia,serif",
23469
- cssClass: "e-georgia",
23470
- command: "Font",
23471
- subCommand: "FontName",
23472
- },
23473
- {
23474
- text: "Open Sans",
23475
- value: "Open Sans, sans-serif",
23476
- cssClass: "e-open-sans",
23477
- command: "Font",
23478
- subCommand: "FontName",
23479
- },
23480
- {
23481
- text: "Roboto",
23482
- value: "Roboto",
23483
- cssClass: "e-roboto",
23484
- command: "Font",
23485
- subCommand: "FontName",
23486
- },
23487
- {
23488
- text: "Lato",
23489
- value: "Lato, sans-serif",
23490
- cssClass: "e-lato",
23491
- command: "Font",
23492
- subCommand: "FontName",
23493
- },
23494
- {
23495
- text: "Montserrat",
23496
- value: "Montserrat, sans-serif",
23497
- cssClass: "e-montserrat",
23498
- command: "Font",
23499
- subCommand: "FontName",
23500
- },
23501
- {
23502
- text: "Segoe UI",
23503
- value: "Segoe UI",
23504
- cssClass: "e-segoe-ui",
23505
- command: "Font",
23506
- subCommand: "FontName",
23507
- },
23508
- {
23509
- text: "Impact",
23510
- value: "Impact,Charcoal,sans-serif",
23511
- cssClass: "e-impact",
23512
- command: "Font",
23513
- subCommand: "FontName",
23514
- },
23515
- ],
23516
- };
23517
- // line height配置
23518
- /** @type {?} */
23519
- var lineHeight_items = [
23520
- {
23521
- text: "1.0",
23522
- },
23523
- {
23524
- text: "1.15",
23525
- },
23526
- {
23527
- text: "1.5",
23528
- },
23529
- {
23530
- text: "2.0",
23531
- },
23532
- {
23533
- text: "2.5",
23534
- },
23535
- {
23536
- text: "3.0",
23537
- },
23538
- ];
23539
- /**
23540
- * @record
23541
- */
23542
- function BulletStyle() { }
23543
- if (false) {
23544
- /** @type {?} */
23545
- BulletStyle.prototype.id;
23546
- /** @type {?} */
23547
- BulletStyle.prototype.text;
23548
- /** @type {?} */
23549
- BulletStyle.prototype.symbol;
23550
- /** @type {?} */
23551
- BulletStyle.prototype.iconCss;
23552
- /** @type {?} */
23553
- BulletStyle.prototype.description;
23554
- }
23555
- /** @type {?} */
23556
- var BULLET_STYLES = [
23557
- {
23558
- id: "disc",
23559
- text: "● 实心圆点",
23560
- symbol: "●",
23561
- iconCss: "e-icons e-bullet-disc",
23562
- description: "标准实心圆点",
23563
- },
23564
- {
23565
- id: "circle",
23566
- text: "○ 空心圆点",
23567
- symbol: "○",
23568
- iconCss: "e-icons e-bullet-circle",
23569
- description: "空心圆点",
23570
- },
23571
- {
23572
- id: "square",
23573
- text: "■ 实心方块",
23574
- symbol: "■",
23575
- iconCss: "e-icons e-bullet-square",
23576
- description: "实心方块",
23577
- },
23578
- {
23579
- id: "diamond",
23580
- text: "◆ 实心菱形",
23581
- symbol: "◆",
23582
- iconCss: "e-icons e-bullet-diamond",
23583
- description: "实心菱形",
23584
- },
23585
- {
23586
- id: "triangle",
23587
- text: "► 实心三角",
23588
- symbol: "►",
23589
- iconCss: "e-icons e-bullet-triangle",
23590
- description: "实心三角形",
23591
- },
23592
- {
23593
- id: "arrow",
23594
- text: "➤ 箭头",
23595
- symbol: "➤",
23596
- iconCss: "e-icons e-bullet-arrow",
23597
- description: "箭头符号",
23598
- },
23599
- {
23600
- id: "star",
23601
- text: "★ 星形",
23602
- symbol: "★",
23603
- iconCss: "e-icons e-bullet-star",
23604
- description: "星形符号",
23605
- },
23606
- {
23607
- id: "check",
23608
- text: "✓ 对勾",
23609
- symbol: "✓",
23610
- iconCss: "e-icons e-bullet-check",
23611
- description: "对勾符号",
23612
- },
23613
- {
23614
- id: "heart",
23615
- text: "♥ 心形",
23616
- symbol: "♥",
23617
- iconCss: "e-icons e-bullet-heart",
23618
- description: "心形符号",
23619
- },
23620
- {
23621
- id: "bullet",
23622
- text: "• 小圆点",
23623
- symbol: "•",
23624
- iconCss: "e-icons e-bullet-bullet",
23625
- description: "小圆点",
23626
- },
23627
- ];
23628
- // 获取符号样式
23629
- /**
23630
- * @param {?} id
23631
- * @return {?}
23632
- */
23633
- function getBulletStyle(id) {
23634
- return BULLET_STYLES.find((/**
23635
- * @param {?} style
23636
- * @return {?}
23637
- */
23638
- function (style) { return style.id === id; }));
23639
- }
23640
- // 获取所有符号样式
23641
- /**
23642
- * @return {?}
23643
- */
23644
- function getAllBulletStyles() {
23645
- return BULLET_STYLES;
23646
- }
23647
- // 应用符号样式到列表
23648
- /**
23649
- * @param {?} ul
23650
- * @param {?} style
23651
- * @return {?}
23652
- */
23653
- function applyBulletStyle(ul, style) {
23654
- if (style.id === "disc" || style.id === "circle" || style.id === "square") {
23655
- // 使用CSS list-style-type
23656
- ul.style.listStyleType = style.id;
23657
- // 移除自定义符号
23658
- ul.querySelectorAll(".custom-bullet").forEach((/**
23659
- * @param {?} bullet
23660
- * @return {?}
23661
- */
23662
- function (bullet) { return bullet.remove(); }));
23663
- }
23664
- else {
23665
- // 使用自定义符号
23666
- ul.style.listStyleType = "none";
23667
- ul.setAttribute("data-bullet-style", style.id);
23668
- /** @type {?} */
23669
- var listItems = ul.querySelectorAll("li");
23670
- listItems.forEach((/**
23671
- * @param {?} li
23672
- * @return {?}
23673
- */
23674
- function (li) {
23675
- // 移除现有的自定义符号
23676
- /** @type {?} */
23677
- var existingBullet = li.querySelector(".custom-bullet");
23678
- if (existingBullet) {
23679
- existingBullet.remove();
23680
- }
23681
- // 添加新的自定义符号
23682
- /** @type {?} */
23683
- var bullet = document.createElement("span");
23684
- bullet.className = "custom-bullet";
23685
- bullet.textContent = style.symbol;
23686
- bullet.style.marginRight = "8px";
23687
- bullet.style.color = "#666";
23688
- // 将符号插入到列表项的开头
23689
- li.insertBefore(bullet, li.firstChild);
23690
- }));
23691
- }
23692
- }
23693
-
23694
- /**
23695
- * @fileoverview added by tsickle
23696
- * Generated from: lib/form/richtexteditor/index.component.ts
23697
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23698
- */
23699
- var RichtexteditorComponent = /** @class */ (function () {
23700
- function RichtexteditorComponent(ref) {
23701
- this.ref = ref;
23702
- // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
23703
- this.placeholder = "";
23704
- this.value = "";
23705
- this.height = 150;
23706
- this.autoSaveOnIdle = true;
23707
- this.target = "#container"; // dialog 弹窗父级
23708
- // dialog 弹窗父级
23709
- this.toolbarClick = new core.EventEmitter();
23710
- this.change = new core.EventEmitter();
23711
- // @Output() change = new EventEmitter();
23712
- this.family = fontFamily;
23713
- this.dialogWidth = "800px";
23714
- this.dialogHeight = "642px";
23715
- this.showZoomBtn = true;
23716
- this.showMsg = false;
23717
- this.insertImageSettings = {
23718
- saveFormat: "Blob",
23719
- allowedTypes: [".svg", ".png"],
23720
- display: "none",
23721
- };
23722
- this.size = "";
23723
- this.dropValIndex = 0;
23724
- this.queryList = [
23725
- { id: "Rephrase", text: "Rephrase" },
23726
- { id: "Grammar", text: "Correct Grammar" },
23727
- { id: "Summarize", text: "Summarize" },
23728
- { id: "Elaborate", text: "Elaborate" },
23729
- { id: "Translate", text: "Translate" },
23730
- { id: "SentimentAnalysis", text: "Sentiment Analysis" },
23731
- ];
23732
- this.rephraseTyleList = [
23733
- { text: "Standard", id: "Standard" },
23734
- { text: "Fluent", id: "Fluent" },
23735
- { text: "Professional", id: "Professional" },
23736
- ];
23737
- this.languageList = [
23738
- { id: "EN", text: "English" },
23739
- { id: "ZH", text: "Chinese (Simplified)" },
23740
- { id: "ES", text: "Spanish" },
23741
- { id: "ZHT", text: "Chinese (Traditional)" },
23742
- { id: "HI", text: "Hindi" },
23743
- { id: "AR", text: "Arabic" },
23744
- { id: "BN", text: "Bengali" },
23745
- { id: "PT", text: "Portuguese" },
23746
- { id: "RU", text: "Russian" },
23747
- { id: "JA", text: "Japanese" },
23748
- { id: "DE", text: "German" },
23749
- { id: "KO", text: "Korean" },
23750
- { id: "FR", text: "French" },
23751
- { id: "IT", text: "Italian" },
23752
- { id: "TR", text: "Turkish" },
23753
- ];
23754
- this.promptQuery = "";
23755
- this.isSentimentCheck = false;
23756
- this.subQuery = "";
23757
- this.chipValue = "Standard";
23758
- this.tools = {
23759
- enableFloating: false,
23760
- items: [
23761
- {
23762
- tooltipText: "AI Assist",
23763
- 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>',
23764
- },
23765
- "Bold",
23766
- "Italic",
23767
- "Underline",
23768
- "StrikeThrough",
23769
- "FontName",
23770
- "FontSize",
23771
- "FontColor",
23772
- "BackgroundColor",
23773
- "LowerCase",
23774
- "UpperCase",
23775
- "|",
23776
- "CreateTable",
23777
- "Formats",
23778
- "Alignments",
23779
- {
23780
- tooltipText: "Line Height",
23781
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
23782
- },
23783
- "OrderedList",
23784
- "UnorderedList",
23785
- "Outdent",
23786
- "Indent",
23787
- "|",
23788
- "CreateLink",
23789
- {
23790
- tooltipText: "",
23791
- template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
23792
- '<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>',
23793
- },
23794
- "|",
23795
- "FormatPainter",
23796
- "ClearFormat",
23797
- "|",
23798
- "Undo",
23799
- "Redo",
23800
- ],
23801
- };
23802
- }
23803
- /**
23804
- * @return {?}
23805
- */
23806
- RichtexteditorComponent.prototype.ngOnInit = /**
23807
- * @return {?}
23808
- */
23809
- function () { };
23810
- /**
23811
- * @param {?} args
23812
- * @return {?}
23813
- */
23814
- RichtexteditorComponent.prototype.onContentChange = /**
23815
- * @param {?} args
23816
- * @return {?}
23817
- */
23818
- function (args) {
23819
- /** @type {?} */
23820
- var tables = document.querySelectorAll("table.e-rte-table");
23821
- tables.forEach((/**
23822
- * @param {?} table
23823
- * @return {?}
23824
- */
23825
- function (table) {
23826
- /** @type {?} */
23827
- var htmlTable = (/** @type {?} */ (table));
23828
- htmlTable.style.marginBottom = "10px";
23829
- htmlTable.style.borderCollapse = "collapse";
23830
- htmlTable.style.emptyCells = "show";
23831
- /** @type {?} */
23832
- var tdElements = table.querySelectorAll("td");
23833
- tdElements.forEach((/**
23834
- * @param {?} td
23835
- * @return {?}
23836
- */
23837
- function (td) {
23838
- td.style.border = "1px solid #adb5bd";
23839
- td.style.height = "20px";
23840
- td.style.minWidth = "20px";
23841
- td.style.padding = "2px 5px";
23842
- td.style.boxSizing = "border-box";
23843
- }));
23844
- }));
23845
- this.change.emit(args);
23846
- };
23847
- /**
23848
- * @return {?}
23849
- */
23850
- RichtexteditorComponent.prototype.onCreate = /**
23851
- * @return {?}
23852
- */
23853
- function () {
23854
- var _this = this;
23855
- //bind the a click event
23856
- // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
23857
- // editorContent.addEventListener('click', this.OnClicked.bind(this));
23858
- //add the line height
23859
- this.editorManager = this.rteObj.formatter.editorManager;
23860
- /** @type {?} */
23861
- var splitButton = new ej2AngularSplitbuttons.DropDownButton({
23862
- items: lineHeight_items,
23863
- iconCss: "e-icons e-line-spacing",
23864
- select: this.onSelect.bind(this),
23865
- });
23866
- splitButton.appendTo("#lineheight_tbar");
23867
- // ai assist
23868
- /** @type {?} */
23869
- var aiassistantButton = new ej2AngularSplitbuttons.DropDownButton({
23870
- items: this.queryList,
23871
- // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
23872
- select: (/**
23873
- * @param {?} args
23874
- * @return {?}
23875
- */
23876
- function (args) { return _this.aiQuerySelectedMenu(args); }),
23877
- });
23878
- aiassistantButton.appendTo("#ai_assistant_button_tbar");
23518
+ //Don't store lazy loaded routes
23519
+ return config && !config.loadChildren;
23879
23520
  };
23880
23521
  /**
23881
- * @private
23882
- * @param {?} args
23522
+ * @param {?} route
23523
+ * @param {?} handle
23883
23524
  * @return {?}
23884
23525
  */
23885
- RichtexteditorComponent.prototype.onSelect = /**
23886
- * @private
23887
- * @param {?} args
23526
+ KeepAliveService.prototype.store = /**
23527
+ * @param {?} route
23528
+ * @param {?} handle
23888
23529
  * @return {?}
23889
23530
  */
23890
- function (args) {
23891
- if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
23892
- this.rteObj.formatter.saveData();
23893
- }
23531
+ function (route, handle) {
23532
+ // console.log("store", this.getRoutePath(route));
23533
+ // console.log("store", storedRoutes);
23894
23534
  /** @type {?} */
23895
- var nodes = this.editorManager.domNode.blockNodes();
23896
- for (var i = 0; nodes.length > i; i++) {
23897
- ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
23898
- }
23899
- this.rteObj.formatter.saveData();
23900
- this.rteObj.formatter.enableUndo(this.rteObj);
23901
- };
23902
- /**
23903
- * @private
23904
- * @param {?} args
23905
- * @return {?}
23906
- */
23907
- RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
23908
- * @private
23909
- * @param {?} args
23910
- * @return {?}
23911
- */
23912
- function (args) {
23913
- this.dialogueOpen(args.item.text);
23535
+ var key = this.getRoutePath(route);
23536
+ storedRoutes.set(key, handle);
23914
23537
  };
23915
23538
  /**
23916
- * @param {?} selectedQuery
23539
+ * @param {?} route
23917
23540
  * @return {?}
23918
23541
  */
23919
- RichtexteditorComponent.prototype.dialogueOpen = /**
23920
- * @param {?} selectedQuery
23542
+ KeepAliveService.prototype.shouldAttach = /**
23543
+ * @param {?} route
23921
23544
  * @return {?}
23922
23545
  */
23923
- function (selectedQuery) {
23924
- var _this = this;
23546
+ function (route) {
23925
23547
  /** @type {?} */
23926
- var selectionText = this.rteObj.getSelectedHtml();
23927
- this.selectedQuery = selectedQuery;
23928
- if (selectionText) {
23929
- /** @type {?} */
23930
- var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23931
- ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
23932
- this.dropValIndex = this.queryList.findIndex((/**
23933
- * @param {?} q
23934
- * @return {?}
23935
- */
23936
- function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
23937
- this.queryCategory.index = this.dropValIndex;
23938
- this.leftRte.value = this.promptQuery = selectionText;
23939
- this.leftRte.refreshUI();
23940
- this.AIdialog.show();
23941
- this.updateAISugesstionsData(selectedQuery);
23942
- }
23943
- else {
23944
- this.showMsg = true;
23945
- setTimeout((/**
23946
- * @return {?}
23947
- */
23948
- function () {
23949
- _this.showMsg = false;
23950
- }), 3000);
23951
- console.log("Please select the content to perform the AI operation.");
23952
- }
23953
- };
23954
- /**
23955
- * @param {?} selectedQuery
23956
- * @return {?}
23957
- */
23958
- RichtexteditorComponent.prototype.updateAISugesstionsData = /**
23959
- * @param {?} selectedQuery
23960
- * @return {?}
23961
- */
23962
- function (selectedQuery) {
23963
- this.isSentimentCheck = false;
23964
- switch (selectedQuery) {
23965
- case "Summarize":
23966
- this.subQuery = "Summarize the upcoming sentence shortly.";
23967
- break;
23968
- case "Elaborate":
23969
- this.subQuery = "Elaborate on the upcoming sentence.";
23970
- break;
23971
- case "Rephrase":
23972
- this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
23973
- break;
23974
- case "Correct Grammar":
23975
- this.subQuery = "Correct the grammar of the upcoming sentence.";
23976
- break;
23977
- case "Translate":
23978
- this.subQuery =
23979
- "Translate the upcoming sentence to " + this.translatelanguage + ".";
23980
- break;
23981
- case "Sentiment Analysis":
23982
- this.isSentimentCheck = true;
23983
- this.subQuery =
23984
- '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:';
23985
- break;
23986
- }
23987
- this.updateAISugesstions();
23548
+ var key = this.getRoutePath(route);
23549
+ return !!route.routeConfig && storedRoutes.has(key);
23988
23550
  };
23989
23551
  /**
23552
+ * @param {?} route
23990
23553
  * @return {?}
23991
23554
  */
23992
- RichtexteditorComponent.prototype.updateAISugesstions = /**
23555
+ KeepAliveService.prototype.retrieve = /**
23556
+ * @param {?} route
23993
23557
  * @return {?}
23994
23558
  */
23995
- function () {
23996
- var _this = this;
23997
- try {
23998
- if (this.promptQuery) {
23999
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24000
- "";
24001
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24002
- "none";
24003
- this.sentimentButton.element.style.display = "none";
24004
- this.regenerateButton.disabled = true;
24005
- this.copyButton.disabled = true;
24006
- this.replaceButton.disabled = true;
24007
- this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
24008
- this.apiResultData.then((/**
24009
- * @param {?} result
24010
- * @return {?}
24011
- */
24012
- function (result) {
24013
- _this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
24014
- _this.sentimentButton.content = result
24015
- .toLowerCase()
24016
- .includes("positive")
24017
- ? "😊 Positive"
24018
- : result.toLowerCase().includes("negative")
24019
- ? "😞 Negative"
24020
- : "😐 Neutral";
24021
- _this.sentimentButton.element.style.display = !_this.isSentimentCheck
24022
- ? "none"
24023
- : "";
24024
- _this.rightRte.value = _this.AIResult;
24025
- /** @type {?} */
24026
- var noResultsFound = !(_this.AIResult || _this.promptQuery);
24027
- ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
24028
- _this.regenerateButton.disabled = noResultsFound;
24029
- _this.copyButton.disabled = noResultsFound;
24030
- _this.replaceButton.disabled = noResultsFound;
24031
- ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24032
- "none";
24033
- ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24034
- noResultsFound ? "none" : "";
24035
- console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
24036
- // this.ref.markForCheck();
24037
- }));
24038
- }
24039
- }
24040
- catch (_a) {
24041
- // this.toastObj.show();
23559
+ function (route) {
23560
+ /** @type {?} */
23561
+ var config = route.routeConfig;
23562
+ /** @type {?} */
23563
+ var key = this.getRoutePath(route);
23564
+ //We don't store lazy loaded routes, so don't even bother trying to retrieve them
23565
+ if (!config || config.loadChildren) {
23566
+ return false;
24042
23567
  }
23568
+ return storedRoutes.get(key) || null;
24043
23569
  };
24044
23570
  /**
24045
- * @param {?} subQuery
24046
- * @param {?} promptQuery
24047
- * @return {?}
24048
- */
24049
- RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
24050
- * @param {?} subQuery
24051
- * @param {?} promptQuery
24052
- * @return {?}
24053
- */
24054
- function (subQuery, promptQuery) {
24055
- return __awaiter(this, void 0, void 0, function () {
24056
- var content;
24057
- return __generator(this, function (_a) {
24058
- switch (_a.label) {
24059
- case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
24060
- case 1:
24061
- content = _a.sent();
24062
- return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
24063
- }
24064
- });
24065
- });
24066
- };
24067
- /**
23571
+ * @param {?} future
23572
+ * @param {?} curr
24068
23573
  * @return {?}
24069
23574
  */
24070
- RichtexteditorComponent.prototype.dialogShow = /**
23575
+ KeepAliveService.prototype.shouldReuseRoute = /**
23576
+ * @param {?} future
23577
+ * @param {?} curr
24071
23578
  * @return {?}
24072
23579
  */
24073
- function () {
24074
- var _this = this;
24075
- (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
24076
- * @return {?}
24077
- */
24078
- function () {
24079
- _this.updateAISugesstions();
24080
- }));
24081
- (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
24082
- * @return {?}
24083
- */
24084
- function () {
24085
- _this.copyTextToClipboard(_this.AIResult);
24086
- }));
24087
- (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
24088
- * @return {?}
24089
- */
24090
- function () {
24091
- /** @type {?} */
24092
- var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
24093
- ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
24094
- ((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
24095
- undo: true,
24096
- });
24097
- _this.closeDialog();
24098
- }));
24099
- ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
23580
+ function (future, curr) {
23581
+ // console.log("shouldReuseRoute", future, curr);
23582
+ // return future.routeConfig === curr.routeConfig;
23583
+ if (future.routeConfig === curr.routeConfig) {
23584
+ if (future.children.length === 0 && curr.children.length === 0) {
23585
+ // 无子路由时, 通过params和queryParams判断是否复用路由
23586
+ return (JSON.stringify(future.params) === JSON.stringify(curr.params));
23587
+ }
23588
+ return true;
23589
+ }
23590
+ return false;
24100
23591
  };
24101
23592
  /**
23593
+ * @param {?} route
24102
23594
  * @return {?}
24103
23595
  */
24104
- RichtexteditorComponent.prototype.closeDialog = /**
23596
+ KeepAliveService.prototype.getRoutePath = /**
23597
+ * @param {?} route
24105
23598
  * @return {?}
24106
23599
  */
24107
- function () {
24108
- this.AIdialog.hide();
24109
- this.rightRte.value = "";
24110
- this.leftRte.value = "";
24111
- this.promptQuery = "";
24112
- this.chipValue = "Standard";
24113
- this.AIResult = "";
24114
- this.dropValIndex = 0;
24115
- this.selectedQuery = "Rephrase";
24116
- this.sentimentButton.content = "😊 Neutral";
23600
+ function (route) {
23601
+ if (route.routeConfig) {
23602
+ // const pathParams = JSON.stringify(route.params);
23603
+ // const queryParams = new URLSearchParams(route.queryParams).toString();
23604
+ /** @type {?} */
23605
+ var url = route._urlSegment.segments.map((/**
23606
+ * @param {?} v
23607
+ * @return {?}
23608
+ */
23609
+ function (v) { return v.path; })).join("/");
23610
+ return "/" + url;
23611
+ }
23612
+ return "";
24117
23613
  };
24118
23614
  /**
24119
- * @param {?} text
23615
+ * @param {?} path
24120
23616
  * @return {?}
24121
23617
  */
24122
- RichtexteditorComponent.prototype.copyTextToClipboard = /**
24123
- * @param {?} text
23618
+ KeepAliveService.prototype.clearCache = /**
23619
+ * @param {?} path
24124
23620
  * @return {?}
24125
23621
  */
24126
- function (text) {
24127
- if (navigator.clipboard) {
24128
- navigator.clipboard
24129
- .writeText(text)
24130
- .then((/**
24131
- * @return {?}
24132
- */
24133
- function () {
24134
- console.log("Text copied to clipboard successfully!");
24135
- }))
24136
- .catch((/**
24137
- * @param {?} err
24138
- * @return {?}
24139
- */
24140
- function (err) {
24141
- console.error("Failed to copy text: ", err);
24142
- }));
24143
- }
24144
- else {
24145
- // Fallback for browsers that do not support the Clipboard API
24146
- /** @type {?} */
24147
- var textarea = document.createElement("textarea");
24148
- textarea.value = text;
24149
- document.body.appendChild(textarea);
24150
- textarea.select();
24151
- try {
24152
- document.execCommand("copy");
24153
- console.log("Text copied to clipboard using execCommand");
24154
- }
24155
- catch (err) {
24156
- console.error("Failed to copy text: ", err);
24157
- }
24158
- finally {
24159
- document.body.removeChild(textarea);
24160
- }
24161
- }
23622
+ function (path) {
23623
+ // console.log("clearCache", storedRoutes, path);
23624
+ toBeDeleteUrl = path;
23625
+ storedRoutes.delete(path);
24162
23626
  };
24163
23627
  /**
24164
23628
  * @return {?}
24165
23629
  */
24166
- RichtexteditorComponent.prototype.onOverlayClick = /**
23630
+ KeepAliveService.prototype.clearAllCache = /**
24167
23631
  * @return {?}
24168
23632
  */
24169
23633
  function () {
24170
- /** @type {?} */
24171
- var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
24172
- if (activeEle) {
24173
- activeEle.classList.remove("e-active");
24174
- }
24175
- this.closeDialog();
23634
+ storedRoutes.clear();
24176
23635
  };
23636
+ KeepAliveService.decorators = [
23637
+ { type: core.Injectable, args: [{
23638
+ providedIn: "root",
23639
+ },] }
23640
+ ];
23641
+ /** @nocollapse */ KeepAliveService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
23642
+ return KeepAliveService;
23643
+ }());
23644
+
23645
+ /**
23646
+ * @fileoverview added by tsickle
23647
+ * Generated from: lib/form/confirm-select/index.component.ts
23648
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23649
+ */
23650
+ var ConfirmSelectComponent = /** @class */ (function () {
23651
+ function ConfirmSelectComponent() {
23652
+ this.dataSource = [];
23653
+ this.disabled = false;
23654
+ this.fields = { text: "Game", value: "Id" };
23655
+ this.showSelectAll = true;
23656
+ this.valueChange = new core.EventEmitter();
23657
+ this.selectedItems = [];
23658
+ this.isInteracted = false;
23659
+ }
24177
23660
  /**
24178
- * @param {?} args
24179
23661
  * @return {?}
24180
23662
  */
24181
- RichtexteditorComponent.prototype.onQuerySelect = /**
24182
- * @param {?} args
23663
+ ConfirmSelectComponent.prototype.ngOnInit = /**
24183
23664
  * @return {?}
24184
23665
  */
24185
- function (args) {
24186
- // this.chipList.selectedChips = 0;
24187
- this.translatelanguage = "EN";
24188
- this.selectedQuery = args.itemData.text;
24189
- this.updateAISugesstionsData(args.itemData.text);
23666
+ function () {
23667
+ this.getInfo();
23668
+ this.resetSelectedItems();
24190
23669
  };
24191
23670
  /**
24192
- * @param {?} args
23671
+ * @param {?} changes
24193
23672
  * @return {?}
24194
23673
  */
24195
- RichtexteditorComponent.prototype.onLanguageSelect = /**
24196
- * @param {?} args
23674
+ ConfirmSelectComponent.prototype.ngOnChanges = /**
23675
+ * @param {?} changes
24197
23676
  * @return {?}
24198
23677
  */
24199
- function (args) {
24200
- this.translatelanguage = args.itemData.id;
24201
- this.updateAISugesstionsData("Translate");
23678
+ function (changes) {
23679
+ if (changes.value && !changes.value.firstChange) {
23680
+ this.resetSelectedItems();
23681
+ }
24202
23682
  };
24203
23683
  /**
24204
- * @param {?} args
24205
23684
  * @return {?}
24206
23685
  */
24207
- RichtexteditorComponent.prototype.onChipClick = /**
24208
- * @param {?} args
23686
+ ConfirmSelectComponent.prototype.getInfo = /**
24209
23687
  * @return {?}
24210
23688
  */
24211
- function (args) {
24212
- this.chipValue = args.itemData.text;
24213
- // 事件会触发两次 必须判断args.text是否有值
24214
- if (args.itemData.text)
24215
- this.updateAISugesstionsData("Rephrase");
23689
+ function () {
23690
+ this.translation = JSON.parse(localStorage.getItem("translation"));
24216
23691
  };
24217
23692
  /**
24218
- * @param {?} args
24219
23693
  * @return {?}
24220
23694
  */
24221
- RichtexteditorComponent.prototype._toolbarClick = /**
24222
- * @param {?} args
23695
+ ConfirmSelectComponent.prototype.resetSelectedItems = /**
24223
23696
  * @return {?}
24224
23697
  */
24225
- function (args) {
24226
- this.toolbarClick.emit(args);
23698
+ function () {
23699
+ this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
23700
+ if (this.comfirmSelect) {
23701
+ this.comfirmSelect.value = this.selectedItems;
23702
+ }
24227
23703
  };
24228
23704
  /**
24229
23705
  * @return {?}
24230
23706
  */
24231
- RichtexteditorComponent.prototype.hideToast = /**
23707
+ ConfirmSelectComponent.prototype.onCancel = /**
24232
23708
  * @return {?}
24233
23709
  */
24234
23710
  function () {
24235
- this.showMsg = false;
23711
+ this.isInteracted = true;
23712
+ this.resetSelectedItems();
23713
+ this.comfirmSelect.hidePopup();
24236
23714
  };
24237
23715
  /**
24238
23716
  * @return {?}
24239
23717
  */
24240
- RichtexteditorComponent.prototype.onZoom = /**
23718
+ ConfirmSelectComponent.prototype.onApply = /**
24241
23719
  * @return {?}
24242
23720
  */
24243
23721
  function () {
24244
- if (this.size === "largest") {
24245
- this.size = ""; // 恢复到原始大小
24246
- }
24247
- else {
24248
- this.size = "largest"; // 设置为最大化
24249
- }
24250
- };
24251
- RichtexteditorComponent.decorators = [
24252
- { type: core.Component, args: [{
24253
- selector: "rs-richtext-editor",
24254
- 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",
24255
- 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}"]
24256
- }] }
24257
- ];
24258
- /** @nocollapse */
24259
- RichtexteditorComponent.ctorParameters = function () { return [
24260
- { type: core.ChangeDetectorRef }
24261
- ]; };
24262
- RichtexteditorComponent.propDecorators = {
24263
- rteObj: [{ type: core.ViewChild, args: ["editor", { static: false },] }],
24264
- queryCategory: [{ type: core.ViewChild, args: ["queryCategory", { static: false },] }],
24265
- leftRte: [{ type: core.ViewChild, args: ["leftRte", { static: false },] }],
24266
- rightRte: [{ type: core.ViewChild, args: ["rightRte", { static: false },] }],
24267
- AIdialog: [{ type: core.ViewChild, args: ["AIdialog", { static: true },] }],
24268
- sentimentButton: [{ type: core.ViewChild, args: ["sentimentButton", { static: false },] }],
24269
- regenerateButton: [{ type: core.ViewChild, args: ["regenerateButton", { static: false },] }],
24270
- copyButton: [{ type: core.ViewChild, args: ["copyButton", { static: false },] }],
24271
- replaceButton: [{ type: core.ViewChild, args: ["replaceButton", { static: false },] }],
24272
- placeholder: [{ type: core.Input }],
24273
- value: [{ type: core.Input }],
24274
- height: [{ type: core.Input }],
24275
- autoSaveOnIdle: [{ type: core.Input }],
24276
- target: [{ type: core.Input }],
24277
- toolbarClick: [{ type: core.Output }],
24278
- change: [{ type: core.Output }]
23722
+ this.isInteracted = true;
23723
+ /** @type {?} */
23724
+ var val = this.comfirmSelect.value;
23725
+ this.valueChange.emit(val);
23726
+ this.comfirmSelect.hidePopup();
24279
23727
  };
24280
- return RichtexteditorComponent;
24281
- }());
24282
- if (false) {
24283
- /** @type {?} */
24284
- RichtexteditorComponent.prototype.rteObj;
24285
- /** @type {?} */
24286
- RichtexteditorComponent.prototype.queryCategory;
24287
- /** @type {?} */
24288
- RichtexteditorComponent.prototype.leftRte;
24289
- /** @type {?} */
24290
- RichtexteditorComponent.prototype.rightRte;
24291
- /** @type {?} */
24292
- RichtexteditorComponent.prototype.AIdialog;
24293
- /** @type {?} */
24294
- RichtexteditorComponent.prototype.sentimentButton;
24295
- /** @type {?} */
24296
- RichtexteditorComponent.prototype.regenerateButton;
24297
- /** @type {?} */
24298
- RichtexteditorComponent.prototype.copyButton;
24299
- /** @type {?} */
24300
- RichtexteditorComponent.prototype.replaceButton;
24301
- /** @type {?} */
24302
- RichtexteditorComponent.prototype.placeholder;
24303
- /** @type {?} */
24304
- RichtexteditorComponent.prototype.value;
24305
- /** @type {?} */
24306
- RichtexteditorComponent.prototype.height;
24307
- /** @type {?} */
24308
- RichtexteditorComponent.prototype.autoSaveOnIdle;
24309
- /** @type {?} */
24310
- RichtexteditorComponent.prototype.target;
24311
- /** @type {?} */
24312
- RichtexteditorComponent.prototype.toolbarClick;
24313
- /** @type {?} */
24314
- RichtexteditorComponent.prototype.change;
24315
- /** @type {?} */
24316
- RichtexteditorComponent.prototype.family;
24317
- /** @type {?} */
24318
- RichtexteditorComponent.prototype.dialogWidth;
24319
- /** @type {?} */
24320
- RichtexteditorComponent.prototype.dialogHeight;
24321
- /** @type {?} */
24322
- RichtexteditorComponent.prototype.showZoomBtn;
23728
+ /**
23729
+ * @param {?} e
23730
+ * @return {?}
23731
+ */
23732
+ ConfirmSelectComponent.prototype.onClose = /**
23733
+ * @param {?} e
23734
+ * @return {?}
23735
+ */
23736
+ function (e) {
23737
+ if (this.isInteracted) {
23738
+ this.isInteracted = false;
23739
+ }
23740
+ else {
23741
+ this.resetSelectedItems();
23742
+ }
23743
+ };
23744
+ ConfirmSelectComponent.decorators = [
23745
+ { type: core.Component, args: [{
23746
+ selector: "rs-confirm-select",
23747
+ 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",
23748
+ 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)}"]
23749
+ }] }
23750
+ ];
23751
+ ConfirmSelectComponent.propDecorators = {
23752
+ comfirmSelect: [{ type: core.ViewChild, args: ["comfirmSelect", { static: false },] }],
23753
+ value: [{ type: core.Input }],
23754
+ dataSource: [{ type: core.Input }],
23755
+ disabled: [{ type: core.Input }],
23756
+ fields: [{ type: core.Input }],
23757
+ placeholder: [{ type: core.Input }],
23758
+ showSelectAll: [{ type: core.Input }],
23759
+ valueChange: [{ type: core.Output }]
23760
+ };
23761
+ return ConfirmSelectComponent;
23762
+ }());
23763
+ if (false) {
24323
23764
  /** @type {?} */
24324
- RichtexteditorComponent.prototype.showMsg;
23765
+ ConfirmSelectComponent.prototype.comfirmSelect;
24325
23766
  /** @type {?} */
24326
- RichtexteditorComponent.prototype.insertImageSettings;
23767
+ ConfirmSelectComponent.prototype.value;
24327
23768
  /** @type {?} */
24328
- RichtexteditorComponent.prototype.editorManager;
23769
+ ConfirmSelectComponent.prototype.dataSource;
24329
23770
  /** @type {?} */
24330
- RichtexteditorComponent.prototype.size;
23771
+ ConfirmSelectComponent.prototype.disabled;
24331
23772
  /** @type {?} */
24332
- RichtexteditorComponent.prototype.selectedQuery;
23773
+ ConfirmSelectComponent.prototype.fields;
24333
23774
  /** @type {?} */
24334
- RichtexteditorComponent.prototype.dropValIndex;
23775
+ ConfirmSelectComponent.prototype.placeholder;
24335
23776
  /** @type {?} */
24336
- RichtexteditorComponent.prototype.queryList;
23777
+ ConfirmSelectComponent.prototype.showSelectAll;
24337
23778
  /** @type {?} */
24338
- RichtexteditorComponent.prototype.rephraseTyleList;
23779
+ ConfirmSelectComponent.prototype.valueChange;
24339
23780
  /** @type {?} */
24340
- RichtexteditorComponent.prototype.languageList;
23781
+ ConfirmSelectComponent.prototype.translation;
24341
23782
  /** @type {?} */
24342
- RichtexteditorComponent.prototype.promptQuery;
23783
+ ConfirmSelectComponent.prototype.selectedItems;
24343
23784
  /** @type {?} */
24344
- RichtexteditorComponent.prototype.isSentimentCheck;
23785
+ ConfirmSelectComponent.prototype.isInteracted;
23786
+ }
23787
+
23788
+ /**
23789
+ * @fileoverview added by tsickle
23790
+ * Generated from: lib/form/richtexteditor/ai-config.ts
23791
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23792
+ */
23793
+ /**
23794
+ * @record
23795
+ */
23796
+ function AIConfig() { }
23797
+ if (false) {
24345
23798
  /** @type {?} */
24346
- RichtexteditorComponent.prototype.subQuery;
23799
+ AIConfig.prototype.endpoint;
24347
23800
  /** @type {?} */
24348
- RichtexteditorComponent.prototype.translatelanguage;
23801
+ AIConfig.prototype.apiKey;
24349
23802
  /** @type {?} */
24350
- RichtexteditorComponent.prototype.chipValue;
23803
+ AIConfig.prototype.deployment;
24351
23804
  /** @type {?} */
24352
- RichtexteditorComponent.prototype.apiResultData;
23805
+ AIConfig.prototype.apiVersion;
24353
23806
  /** @type {?} */
24354
- RichtexteditorComponent.prototype.AIResult;
23807
+ AIConfig.prototype.enabled;
23808
+ }
23809
+ // 从环境配置获取AI配置
23810
+ /**
23811
+ * @return {?}
23812
+ */
23813
+ function getAIConfig() {
23814
+ return {
23815
+ endpoint: "https://aidevused.openai.azure.com/",
23816
+ apiKey: "ccba76e279f64653a50ac4fee90afe5c",
23817
+ deployment: "gpt-4",
23818
+ apiVersion: "2025-01-01-preview",
23819
+ enabled: true,
23820
+ };
23821
+ }
23822
+ // 检查配置是否有效
23823
+ /**
23824
+ * @param {?} config
23825
+ * @return {?}
23826
+ */
23827
+ function isAIConfigValid(config) {
23828
+ // 检查是否为aidevused端点且有有效API密钥
23829
+ return !!((config.endpoint &&
23830
+ config.apiKey &&
23831
+ config.deployment &&
23832
+ config.enabled &&
23833
+ config.endpoint === "https://aidevused.openai.azure.com/" &&
23834
+ config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
23835
+ );
23836
+ }
23837
+ // 从后端API获取AI配置(推荐方式)
23838
+ /**
23839
+ * @return {?}
23840
+ * @this {*}
23841
+ */
23842
+ function getAIConfigFromBackend() {
23843
+ return __awaiter(this, void 0, void 0, function () {
23844
+ return __generator(this, function (_a) {
23845
+ try {
23846
+ // 这里应该调用你的后端API来获取AI配置
23847
+ // 例如:return await this.http.get('/api/ai-config');
23848
+ // 临时返回默认配置
23849
+ return [2 /*return*/, getAIConfig()];
23850
+ }
23851
+ catch (error) {
23852
+ console.error("Failed to get AI config from backend:", error);
23853
+ return [2 /*return*/, getAIConfig()];
23854
+ }
23855
+ return [2 /*return*/];
23856
+ });
23857
+ });
23858
+ }
23859
+
23860
+ /**
23861
+ * @fileoverview added by tsickle
23862
+ * Generated from: lib/form/richtexteditor/openapi.ts
23863
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
23864
+ */
23865
+ // import { testAIFunction } from './ai-test';
23866
+ // testAIFunction();
23867
+ // 使用fetch API发送请求到Azure OpenAI
23868
+ /**
23869
+ * @param {?} messages
23870
+ * @param {?} config
23871
+ * @return {?}
23872
+ * @this {*}
23873
+ */
23874
+ function sendAIRequest(messages, config) {
23875
+ return __awaiter(this, void 0, void 0, function () {
23876
+ var url, url1, response, errorText, data, error_1;
23877
+ return __generator(this, function (_a) {
23878
+ switch (_a.label) {
23879
+ case 0:
23880
+ _a.trys.push([0, 5, , 6]);
23881
+ url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
23882
+ url1 = "" + config.endpoint;
23883
+ return [4 /*yield*/, fetch(url, {
23884
+ method: 'POST',
23885
+ headers: {
23886
+ 'Content-Type': 'application/json',
23887
+ 'api-key': config.apiKey,
23888
+ },
23889
+ body: JSON.stringify({
23890
+ messages: messages,
23891
+ max_tokens: 1000,
23892
+ temperature: 0.7,
23893
+ top_p: 1,
23894
+ frequency_penalty: 0,
23895
+ presence_penalty: 0,
23896
+ }),
23897
+ })];
23898
+ case 1:
23899
+ response = _a.sent();
23900
+ if (!!response.ok) return [3 /*break*/, 3];
23901
+ return [4 /*yield*/, response.text()];
23902
+ case 2:
23903
+ errorText = _a.sent();
23904
+ throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
23905
+ case 3: return [4 /*yield*/, response.json()];
23906
+ case 4:
23907
+ data = _a.sent();
23908
+ if (!data.choices || !data.choices[0] || !data.choices[0].message) {
23909
+ throw new Error('Invalid response format from AI service');
23910
+ }
23911
+ return [2 /*return*/, data.choices[0].message.content];
23912
+ case 5:
23913
+ error_1 = _a.sent();
23914
+ console.error('AI request failed:', error_1);
23915
+ throw error_1;
23916
+ case 6: return [2 /*return*/];
23917
+ }
23918
+ });
23919
+ });
23920
+ }
23921
+ // 备用方案:使用模拟数据(用于开发测试)
23922
+ /**
23923
+ * @param {?} subQuery
23924
+ * @param {?} promptQuery
23925
+ * @return {?}
23926
+ */
23927
+ function getMockAIResponse(subQuery, promptQuery) {
23928
+ var e_1, _a;
24355
23929
  /** @type {?} */
24356
- RichtexteditorComponent.prototype.tools;
24357
- /**
24358
- * @type {?}
24359
- * @private
24360
- */
24361
- RichtexteditorComponent.prototype.ref;
23930
+ var mockResponses = {
23931
+ Rephrase: "Rephrased: " + promptQuery,
23932
+ Grammar: "Corrected: " + promptQuery,
23933
+ Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
23934
+ Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
23935
+ Translate: "Translated: " + promptQuery,
23936
+ SentimentAnalysis: '😊 Positive',
23937
+ };
23938
+ try {
23939
+ for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
23940
+ var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
23941
+ if (subQuery.includes(key)) {
23942
+ return value;
23943
+ }
23944
+ }
23945
+ }
23946
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
23947
+ finally {
23948
+ try {
23949
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
23950
+ }
23951
+ finally { if (e_1) throw e_1.error; }
23952
+ }
23953
+ return "AI processed: " + promptQuery;
23954
+ }
23955
+ // 主要的AI请求方法
23956
+ /**
23957
+ * @param {?} subQuery
23958
+ * @param {?} promptQuery
23959
+ * @return {?}
23960
+ * @this {*}
23961
+ */
23962
+ function OpenAiModelRTE(subQuery, promptQuery) {
23963
+ return __awaiter(this, void 0, void 0, function () {
23964
+ var config, messages, result, error_2;
23965
+ return __generator(this, function (_a) {
23966
+ switch (_a.label) {
23967
+ case 0:
23968
+ _a.trys.push([0, 2, , 3]);
23969
+ config = getAIConfig();
23970
+ // 检查配置是否有效
23971
+ if (!isAIConfigValid(config)) {
23972
+ console.warn('AI configuration is incomplete or disabled, using mock response');
23973
+ return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23974
+ }
23975
+ messages = [
23976
+ {
23977
+ role: 'system',
23978
+ content: subQuery.includes('emoji followed by the sentiment in the format')
23979
+ ? 'You are a helpful assistant. Please respond in string format.'
23980
+ : "NOTE: Return same html format just do changes content only. don't change html formats.",
23981
+ },
23982
+ {
23983
+ role: 'user',
23984
+ content: subQuery + " " + promptQuery,
23985
+ },
23986
+ ];
23987
+ return [4 /*yield*/, sendAIRequest(messages, config)];
23988
+ case 1:
23989
+ result = _a.sent();
23990
+ return [2 /*return*/, result];
23991
+ case 2:
23992
+ error_2 = _a.sent();
23993
+ console.error('AI request failed, using mock response:', error_2);
23994
+ return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
23995
+ case 3: return [2 /*return*/];
23996
+ }
23997
+ });
23998
+ });
23999
+ }
24000
+ // 兼容性方法(保持向后兼容)
24001
+ /**
24002
+ * @param {?} options
24003
+ * @return {?}
24004
+ * @this {*}
24005
+ */
24006
+ function getAzureChatAIRequest(options) {
24007
+ return __awaiter(this, void 0, void 0, function () {
24008
+ var config, result, err_1;
24009
+ return __generator(this, function (_a) {
24010
+ switch (_a.label) {
24011
+ case 0:
24012
+ _a.trys.push([0, 2, , 3]);
24013
+ config = getAIConfig();
24014
+ if (!isAIConfigValid(config)) {
24015
+ return [2 /*return*/, null];
24016
+ }
24017
+ return [4 /*yield*/, sendAIRequest(options.messages, config)];
24018
+ case 1:
24019
+ result = _a.sent();
24020
+ return [2 /*return*/, result];
24021
+ case 2:
24022
+ err_1 = _a.sent();
24023
+ console.error('Error occurred:', err_1);
24024
+ return [2 /*return*/, null];
24025
+ case 3: return [2 /*return*/];
24026
+ }
24027
+ });
24028
+ });
24029
+ }
24030
+ /**
24031
+ * @param {?} prompt
24032
+ * @return {?}
24033
+ * @this {*}
24034
+ */
24035
+ function getAzureTextAIRequest(prompt) {
24036
+ return __awaiter(this, void 0, void 0, function () {
24037
+ var config, messages, result, err_2;
24038
+ return __generator(this, function (_a) {
24039
+ switch (_a.label) {
24040
+ case 0:
24041
+ _a.trys.push([0, 2, , 3]);
24042
+ config = getAIConfig();
24043
+ if (!isAIConfigValid(config)) {
24044
+ return [2 /*return*/, undefined];
24045
+ }
24046
+ messages = [
24047
+ {
24048
+ role: 'user',
24049
+ content: prompt,
24050
+ },
24051
+ ];
24052
+ return [4 /*yield*/, sendAIRequest(messages, config)];
24053
+ case 1:
24054
+ result = _a.sent();
24055
+ return [2 /*return*/, result];
24056
+ case 2:
24057
+ err_2 = _a.sent();
24058
+ console.error('Error occurred:', err_2);
24059
+ return [2 /*return*/, undefined];
24060
+ case 3: return [2 /*return*/];
24061
+ }
24062
+ });
24063
+ });
24362
24064
  }
24363
24065
 
24364
24066
  /**
24365
24067
  * @fileoverview added by tsickle
24366
- * Generated from: lib/dialog/common-dialog/index.component.ts
24068
+ * Generated from: lib/form/richtexteditor/data-config.ts
24367
24069
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24368
24070
  */
24369
- var CommonDialogComponent = /** @class */ (function () {
24370
- function CommonDialogComponent(dialogRef) {
24371
- this.dialogRef = dialogRef;
24372
- // 隐藏元素相关属性
24373
- this.hideHeader = false;
24374
- this.hideCloseIcon = false;
24375
- this.hideCloseBtn = false;
24376
- this.hideSaveBtn = false;
24377
- this.hideDiscardBtn = false;
24378
- this.saveBtnLabel = "";
24379
- this.cancelBtnLabel = "";
24380
- this.discardBtnLabel = "";
24381
- this.showErrorIcon = false;
24382
- this.showZoomBtn = false;
24383
- // 显示相关属性
24384
- this.dialogStyle = {};
24385
- this.size = "";
24386
- this.title = "Dialog";
24387
- this.loading = false;
24388
- this.saveEmit = new core.EventEmitter();
24389
- this.closeEmit = new core.EventEmitter();
24390
- this.defaultSize = "";
24391
- this.customFooter = false;
24392
- }
24393
- /**
24394
- * @return {?}
24395
- */
24396
- CommonDialogComponent.prototype.ngAfterContentInit = /**
24397
- * @return {?}
24398
- */
24399
- function () {
24400
- this.customFooter = !!this.footerContent;
24401
- };
24402
- /**
24403
- * @return {?}
24404
- */
24405
- CommonDialogComponent.prototype.ngOnInit = /**
24406
- * @return {?}
24407
- */
24408
- function () {
24409
- this.getInfo();
24410
- };
24411
- /**
24412
- * @return {?}
24413
- */
24414
- CommonDialogComponent.prototype.onClose = /**
24415
- * @return {?}
24416
- */
24417
- function () {
24418
- var _this = this;
24419
- if (this.onCloseRequest) {
24420
- this.onCloseRequest().then((/**
24421
- * @param {?} confirmed
24422
- * @return {?}
24423
- */
24424
- function (confirmed) {
24425
- if (confirmed) {
24426
- _this.dialogRef.close("close");
24427
- }
24428
- }));
24429
- }
24430
- else {
24431
- this.dialogRef.close("close");
24432
- }
24433
- };
24434
- /**
24435
- * @return {?}
24436
- */
24437
- CommonDialogComponent.prototype.onZoom = /**
24438
- * @return {?}
24439
- */
24440
- function () {
24441
- if (this.size === "largest") {
24442
- this.size = this.defaultSize; // 恢复到原始大小
24443
- }
24444
- else {
24445
- this.size = "largest"; // 设置为最大化
24446
- }
24447
- };
24448
- /**
24449
- * @return {?}
24450
- */
24451
- CommonDialogComponent.prototype.onSave = /**
24452
- * @return {?}
24453
- */
24454
- function () {
24455
- this.dialogRef.close("save");
24456
- };
24457
- /**
24458
- * @return {?}
24459
- */
24460
- CommonDialogComponent.prototype.onDiscard = /**
24461
- * @return {?}
24462
- */
24463
- function () {
24464
- this.dialogRef.close("discard");
24465
- };
24466
- /**
24467
- * @private
24468
- * @return {?}
24469
- */
24470
- CommonDialogComponent.prototype.getInfo = /**
24471
- * @private
24472
- * @return {?}
24473
- */
24474
- function () {
24475
- this.translation = JSON.parse(localStorage.getItem("translation")) || {};
24476
- this.saveBtnLabel = this.saveBtnLabel || this.translation.SAVE || ".SAVE";
24477
- this.cancelBtnLabel =
24478
- this.cancelBtnLabel || this.translation.CANCEL || ".CANCEL";
24479
- this.defaultSize = this.size;
24480
- };
24481
- CommonDialogComponent.decorators = [
24482
- { type: core.Component, args: [{
24483
- selector: "rs-common-dialog",
24484
- 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",
24485
- 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%)}"]
24486
- }] }
24487
- ];
24488
- /** @nocollapse */
24489
- CommonDialogComponent.ctorParameters = function () { return [
24490
- { type: dialog.MatDialogRef }
24491
- ]; };
24492
- CommonDialogComponent.propDecorators = {
24493
- hideHeader: [{ type: core.Input }],
24494
- hideCloseIcon: [{ type: core.Input }],
24495
- hideCloseBtn: [{ type: core.Input }],
24496
- hideSaveBtn: [{ type: core.Input }],
24497
- hideDiscardBtn: [{ type: core.Input }],
24498
- saveBtnLabel: [{ type: core.Input }],
24499
- cancelBtnLabel: [{ type: core.Input }],
24500
- discardBtnLabel: [{ type: core.Input }],
24501
- showErrorIcon: [{ type: core.Input }],
24502
- showZoomBtn: [{ type: core.Input }],
24503
- onCloseRequest: [{ type: core.Input }],
24504
- dialogStyle: [{ type: core.Input }],
24505
- size: [{ type: core.Input }],
24506
- title: [{ type: core.Input }],
24507
- loading: [{ type: core.Input }],
24508
- saveEmit: [{ type: core.Output }],
24509
- closeEmit: [{ type: core.Output }],
24510
- footerContent: [{ type: core.ContentChild, args: ["footerSlot", { static: false },] }]
24511
- };
24512
- return CommonDialogComponent;
24513
- }());
24071
+ // font family
24072
+ /** @type {?} */
24073
+ var fontFamily = {
24074
+ default: "Arial",
24075
+ items: [
24076
+ {
24077
+ text: "Arial",
24078
+ value: "Arial, Helvetica, sans-serif",
24079
+ cssClass: "e-arial",
24080
+ command: "Font",
24081
+ subCommand: "FontName",
24082
+ },
24083
+ {
24084
+ text: "Times New Roman",
24085
+ value: "Times New Roman,Times,serif",
24086
+ cssClass: "e-times-new-roman",
24087
+ command: "Font",
24088
+ subCommand: "FontName",
24089
+ },
24090
+ {
24091
+ text: "Helvetica",
24092
+ value: "Helvetica",
24093
+ cssClass: "e-helvetica",
24094
+ command: "Font",
24095
+ subCommand: "FontName",
24096
+ },
24097
+ {
24098
+ text: "Calibri",
24099
+ value: "Calibri, Helvetica, sans-serif",
24100
+ cssClass: "e-calibri",
24101
+ command: "Font",
24102
+ subCommand: "FontName",
24103
+ },
24104
+ {
24105
+ text: "Verdana",
24106
+ value: "Verdana,Geneva,sans-serif",
24107
+ cssClass: "e-verdana",
24108
+ command: "Font",
24109
+ subCommand: "FontName",
24110
+ },
24111
+ {
24112
+ text: "Georgia",
24113
+ value: "Georgia,serif",
24114
+ cssClass: "e-georgia",
24115
+ command: "Font",
24116
+ subCommand: "FontName",
24117
+ },
24118
+ {
24119
+ text: "Open Sans",
24120
+ value: "Open Sans, sans-serif",
24121
+ cssClass: "e-open-sans",
24122
+ command: "Font",
24123
+ subCommand: "FontName",
24124
+ },
24125
+ {
24126
+ text: "Roboto",
24127
+ value: "Roboto",
24128
+ cssClass: "e-roboto",
24129
+ command: "Font",
24130
+ subCommand: "FontName",
24131
+ },
24132
+ {
24133
+ text: "Lato",
24134
+ value: "Lato, sans-serif",
24135
+ cssClass: "e-lato",
24136
+ command: "Font",
24137
+ subCommand: "FontName",
24138
+ },
24139
+ {
24140
+ text: "Montserrat",
24141
+ value: "Montserrat, sans-serif",
24142
+ cssClass: "e-montserrat",
24143
+ command: "Font",
24144
+ subCommand: "FontName",
24145
+ },
24146
+ {
24147
+ text: "Segoe UI",
24148
+ value: "Segoe UI",
24149
+ cssClass: "e-segoe-ui",
24150
+ command: "Font",
24151
+ subCommand: "FontName",
24152
+ },
24153
+ {
24154
+ text: "Impact",
24155
+ value: "Impact,Charcoal,sans-serif",
24156
+ cssClass: "e-impact",
24157
+ command: "Font",
24158
+ subCommand: "FontName",
24159
+ },
24160
+ ],
24161
+ };
24162
+ // line height配置
24163
+ /** @type {?} */
24164
+ var lineHeight_items = [
24165
+ {
24166
+ text: "1.0",
24167
+ },
24168
+ {
24169
+ text: "1.15",
24170
+ },
24171
+ {
24172
+ text: "1.5",
24173
+ },
24174
+ {
24175
+ text: "2.0",
24176
+ },
24177
+ {
24178
+ text: "2.5",
24179
+ },
24180
+ {
24181
+ text: "3.0",
24182
+ },
24183
+ ];
24184
+ /**
24185
+ * @record
24186
+ */
24187
+ function BulletStyle() { }
24514
24188
  if (false) {
24515
24189
  /** @type {?} */
24516
- CommonDialogComponent.prototype.translation;
24517
- /** @type {?} */
24518
- CommonDialogComponent.prototype.hideHeader;
24519
- /** @type {?} */
24520
- CommonDialogComponent.prototype.hideCloseIcon;
24521
- /** @type {?} */
24522
- CommonDialogComponent.prototype.hideCloseBtn;
24523
- /** @type {?} */
24524
- CommonDialogComponent.prototype.hideSaveBtn;
24525
- /** @type {?} */
24526
- CommonDialogComponent.prototype.hideDiscardBtn;
24527
- /** @type {?} */
24528
- CommonDialogComponent.prototype.saveBtnLabel;
24529
- /** @type {?} */
24530
- CommonDialogComponent.prototype.cancelBtnLabel;
24531
- /** @type {?} */
24532
- CommonDialogComponent.prototype.discardBtnLabel;
24533
- /** @type {?} */
24534
- CommonDialogComponent.prototype.showErrorIcon;
24535
- /** @type {?} */
24536
- CommonDialogComponent.prototype.showZoomBtn;
24537
- /** @type {?} */
24538
- CommonDialogComponent.prototype.onCloseRequest;
24539
- /** @type {?} */
24540
- CommonDialogComponent.prototype.dialogStyle;
24541
- /** @type {?} */
24542
- CommonDialogComponent.prototype.size;
24543
- /** @type {?} */
24544
- CommonDialogComponent.prototype.title;
24545
- /** @type {?} */
24546
- CommonDialogComponent.prototype.loading;
24547
- /** @type {?} */
24548
- CommonDialogComponent.prototype.saveEmit;
24549
- /** @type {?} */
24550
- CommonDialogComponent.prototype.closeEmit;
24190
+ BulletStyle.prototype.id;
24551
24191
  /** @type {?} */
24552
- CommonDialogComponent.prototype.defaultSize;
24192
+ BulletStyle.prototype.text;
24553
24193
  /** @type {?} */
24554
- CommonDialogComponent.prototype.footerContent;
24194
+ BulletStyle.prototype.symbol;
24555
24195
  /** @type {?} */
24556
- CommonDialogComponent.prototype.customFooter;
24196
+ BulletStyle.prototype.iconCss;
24557
24197
  /** @type {?} */
24558
- CommonDialogComponent.prototype.dialogRef;
24198
+ BulletStyle.prototype.description;
24199
+ }
24200
+ /** @type {?} */
24201
+ var BULLET_STYLES = [
24202
+ {
24203
+ id: "disc",
24204
+ text: "● 实心圆点",
24205
+ symbol: "●",
24206
+ iconCss: "e-icons e-bullet-disc",
24207
+ description: "标准实心圆点",
24208
+ },
24209
+ {
24210
+ id: "circle",
24211
+ text: "○ 空心圆点",
24212
+ symbol: "○",
24213
+ iconCss: "e-icons e-bullet-circle",
24214
+ description: "空心圆点",
24215
+ },
24216
+ {
24217
+ id: "square",
24218
+ text: "■ 实心方块",
24219
+ symbol: "■",
24220
+ iconCss: "e-icons e-bullet-square",
24221
+ description: "实心方块",
24222
+ },
24223
+ {
24224
+ id: "diamond",
24225
+ text: "◆ 实心菱形",
24226
+ symbol: "◆",
24227
+ iconCss: "e-icons e-bullet-diamond",
24228
+ description: "实心菱形",
24229
+ },
24230
+ {
24231
+ id: "triangle",
24232
+ text: "► 实心三角",
24233
+ symbol: "►",
24234
+ iconCss: "e-icons e-bullet-triangle",
24235
+ description: "实心三角形",
24236
+ },
24237
+ {
24238
+ id: "arrow",
24239
+ text: "➤ 箭头",
24240
+ symbol: "➤",
24241
+ iconCss: "e-icons e-bullet-arrow",
24242
+ description: "箭头符号",
24243
+ },
24244
+ {
24245
+ id: "star",
24246
+ text: "★ 星形",
24247
+ symbol: "★",
24248
+ iconCss: "e-icons e-bullet-star",
24249
+ description: "星形符号",
24250
+ },
24251
+ {
24252
+ id: "check",
24253
+ text: "✓ 对勾",
24254
+ symbol: "✓",
24255
+ iconCss: "e-icons e-bullet-check",
24256
+ description: "对勾符号",
24257
+ },
24258
+ {
24259
+ id: "heart",
24260
+ text: "♥ 心形",
24261
+ symbol: "♥",
24262
+ iconCss: "e-icons e-bullet-heart",
24263
+ description: "心形符号",
24264
+ },
24265
+ {
24266
+ id: "bullet",
24267
+ text: "• 小圆点",
24268
+ symbol: "•",
24269
+ iconCss: "e-icons e-bullet-bullet",
24270
+ description: "小圆点",
24271
+ },
24272
+ ];
24273
+ // 获取符号样式
24274
+ /**
24275
+ * @param {?} id
24276
+ * @return {?}
24277
+ */
24278
+ function getBulletStyle(id) {
24279
+ return BULLET_STYLES.find((/**
24280
+ * @param {?} style
24281
+ * @return {?}
24282
+ */
24283
+ function (style) { return style.id === id; }));
24284
+ }
24285
+ // 获取所有符号样式
24286
+ /**
24287
+ * @return {?}
24288
+ */
24289
+ function getAllBulletStyles() {
24290
+ return BULLET_STYLES;
24291
+ }
24292
+ // 应用符号样式到列表
24293
+ /**
24294
+ * @param {?} ul
24295
+ * @param {?} style
24296
+ * @return {?}
24297
+ */
24298
+ function applyBulletStyle(ul, style) {
24299
+ if (style.id === "disc" || style.id === "circle" || style.id === "square") {
24300
+ // 使用CSS list-style-type
24301
+ ul.style.listStyleType = style.id;
24302
+ // 移除自定义符号
24303
+ ul.querySelectorAll(".custom-bullet").forEach((/**
24304
+ * @param {?} bullet
24305
+ * @return {?}
24306
+ */
24307
+ function (bullet) { return bullet.remove(); }));
24308
+ }
24309
+ else {
24310
+ // 使用自定义符号
24311
+ ul.style.listStyleType = "none";
24312
+ ul.setAttribute("data-bullet-style", style.id);
24313
+ /** @type {?} */
24314
+ var listItems = ul.querySelectorAll("li");
24315
+ listItems.forEach((/**
24316
+ * @param {?} li
24317
+ * @return {?}
24318
+ */
24319
+ function (li) {
24320
+ // 移除现有的自定义符号
24321
+ /** @type {?} */
24322
+ var existingBullet = li.querySelector(".custom-bullet");
24323
+ if (existingBullet) {
24324
+ existingBullet.remove();
24325
+ }
24326
+ // 添加新的自定义符号
24327
+ /** @type {?} */
24328
+ var bullet = document.createElement("span");
24329
+ bullet.className = "custom-bullet";
24330
+ bullet.textContent = style.symbol;
24331
+ bullet.style.marginRight = "8px";
24332
+ bullet.style.color = "#666";
24333
+ // 将符号插入到列表项的开头
24334
+ li.insertBefore(bullet, li.firstChild);
24335
+ }));
24336
+ }
24559
24337
  }
24560
24338
 
24561
24339
  /**
24562
24340
  * @fileoverview added by tsickle
24563
- * Generated from: lib/service/icon-loader.service.ts
24341
+ * Generated from: lib/form/richtexteditor/index.component.ts
24564
24342
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24565
24343
  */
24566
- var IconLoaderService = /** @class */ (function () {
24567
- function IconLoaderService(registry, domSanitizer) {
24568
- this.registry = registry;
24569
- this.domSanitizer = domSanitizer;
24344
+ var RichtexteditorComponent = /** @class */ (function () {
24345
+ function RichtexteditorComponent(ref) {
24346
+ this.ref = ref;
24347
+ // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
24348
+ this.placeholder = "";
24349
+ this.value = "";
24350
+ this.height = 150;
24351
+ this.autoSaveOnIdle = true;
24352
+ this.target = "#container"; // dialog 弹窗父级
24353
+ // dialog 弹窗父级
24354
+ this.toolbarClick = new core.EventEmitter();
24355
+ this.change = new core.EventEmitter();
24356
+ // @Output() change = new EventEmitter();
24357
+ this.family = fontFamily;
24358
+ this.dialogWidth = "800px";
24359
+ this.dialogHeight = "642px";
24360
+ this.showZoomBtn = true;
24361
+ this.showMsg = false;
24362
+ this.insertImageSettings = {
24363
+ saveFormat: "Blob",
24364
+ allowedTypes: [".svg", ".png"],
24365
+ display: "none",
24366
+ };
24367
+ this.size = "";
24368
+ this.dropValIndex = 0;
24369
+ this.queryList = [
24370
+ { id: "Rephrase", text: "Rephrase" },
24371
+ { id: "Grammar", text: "Correct Grammar" },
24372
+ { id: "Summarize", text: "Summarize" },
24373
+ { id: "Elaborate", text: "Elaborate" },
24374
+ { id: "Translate", text: "Translate" },
24375
+ { id: "SentimentAnalysis", text: "Sentiment Analysis" },
24376
+ ];
24377
+ this.rephraseTyleList = [
24378
+ { text: "Standard", id: "Standard" },
24379
+ { text: "Fluent", id: "Fluent" },
24380
+ { text: "Professional", id: "Professional" },
24381
+ ];
24382
+ this.languageList = [
24383
+ { id: "EN", text: "English" },
24384
+ { id: "ZH", text: "Chinese (Simplified)" },
24385
+ { id: "ES", text: "Spanish" },
24386
+ { id: "ZHT", text: "Chinese (Traditional)" },
24387
+ { id: "HI", text: "Hindi" },
24388
+ { id: "AR", text: "Arabic" },
24389
+ { id: "BN", text: "Bengali" },
24390
+ { id: "PT", text: "Portuguese" },
24391
+ { id: "RU", text: "Russian" },
24392
+ { id: "JA", text: "Japanese" },
24393
+ { id: "DE", text: "German" },
24394
+ { id: "KO", text: "Korean" },
24395
+ { id: "FR", text: "French" },
24396
+ { id: "IT", text: "Italian" },
24397
+ { id: "TR", text: "Turkish" },
24398
+ ];
24399
+ this.promptQuery = "";
24400
+ this.isSentimentCheck = false;
24401
+ this.subQuery = "";
24402
+ this.chipValue = "Standard";
24403
+ this.tools = {
24404
+ enableFloating: false,
24405
+ items: [
24406
+ {
24407
+ tooltipText: "AI Assist",
24408
+ 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>',
24409
+ },
24410
+ "Bold",
24411
+ "Italic",
24412
+ "Underline",
24413
+ "StrikeThrough",
24414
+ "FontName",
24415
+ "FontSize",
24416
+ "FontColor",
24417
+ "BackgroundColor",
24418
+ "LowerCase",
24419
+ "UpperCase",
24420
+ "|",
24421
+ "CreateTable",
24422
+ "Formats",
24423
+ "Alignments",
24424
+ {
24425
+ tooltipText: "Line Height",
24426
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
24427
+ },
24428
+ "OrderedList",
24429
+ "UnorderedList",
24430
+ "Outdent",
24431
+ "Indent",
24432
+ "|",
24433
+ "CreateLink",
24434
+ {
24435
+ tooltipText: "",
24436
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
24437
+ '<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>',
24438
+ },
24439
+ "|",
24440
+ "FormatPainter",
24441
+ "ClearFormat",
24442
+ "|",
24443
+ "Undo",
24444
+ "Redo",
24445
+ ],
24446
+ };
24570
24447
  }
24571
24448
  /**
24572
- * @param {?} list
24573
24449
  * @return {?}
24574
24450
  */
24575
- IconLoaderService.prototype.registerIcons = /**
24576
- * @param {?} list
24451
+ RichtexteditorComponent.prototype.ngOnInit = /**
24577
24452
  * @return {?}
24578
24453
  */
24579
- function (list) {
24580
- var _this = this;
24581
- list.forEach((/**
24582
- * @param {?} __0
24454
+ function () { };
24455
+ /**
24456
+ * @param {?} args
24457
+ * @return {?}
24458
+ */
24459
+ RichtexteditorComponent.prototype.onContentChange = /**
24460
+ * @param {?} args
24461
+ * @return {?}
24462
+ */
24463
+ function (args) {
24464
+ /** @type {?} */
24465
+ var tables = document.querySelectorAll("table.e-rte-table");
24466
+ tables.forEach((/**
24467
+ * @param {?} table
24583
24468
  * @return {?}
24584
24469
  */
24585
- function (_a) {
24586
- var name = _a.name, path = _a.path;
24587
- _this.registry.addSvgIcon(name, _this.domSanitizer.bypassSecurityTrustResourceUrl(path));
24470
+ function (table) {
24471
+ /** @type {?} */
24472
+ var htmlTable = (/** @type {?} */ (table));
24473
+ htmlTable.style.marginBottom = "10px";
24474
+ htmlTable.style.borderCollapse = "collapse";
24475
+ htmlTable.style.emptyCells = "show";
24476
+ /** @type {?} */
24477
+ var tdElements = table.querySelectorAll("td");
24478
+ tdElements.forEach((/**
24479
+ * @param {?} td
24480
+ * @return {?}
24481
+ */
24482
+ function (td) {
24483
+ td.style.border = "1px solid #adb5bd";
24484
+ td.style.height = "20px";
24485
+ td.style.minWidth = "20px";
24486
+ td.style.padding = "2px 5px";
24487
+ td.style.boxSizing = "border-box";
24488
+ }));
24588
24489
  }));
24490
+ this.change.emit(args);
24589
24491
  };
24590
- IconLoaderService.decorators = [
24591
- { type: core.Injectable }
24592
- ];
24593
- /** @nocollapse */
24594
- IconLoaderService.ctorParameters = function () { return [
24595
- { type: icon.MatIconRegistry },
24596
- { type: platformBrowser.DomSanitizer }
24597
- ]; };
24598
- return IconLoaderService;
24599
- }());
24600
- if (false) {
24601
- /**
24602
- * @type {?}
24603
- * @private
24604
- */
24605
- IconLoaderService.prototype.registry;
24606
- /**
24607
- * @type {?}
24608
- * @private
24609
- */
24610
- IconLoaderService.prototype.domSanitizer;
24611
- }
24612
-
24613
- /**
24614
- * @fileoverview added by tsickle
24615
- * Generated from: lib/service/keep-alive.service.ts
24616
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24617
- */
24618
- /** @type {?} */
24619
- var storedRoutes = new Map();
24620
- /** @type {?} */
24621
- var toBeDeleteUrl;
24622
- /** @type {?} */
24623
- var excludeRoutes = [];
24624
- // 不需要缓存的url
24625
- var KeepAliveService = /** @class */ (function () {
24626
- function KeepAliveService() {
24627
- }
24628
24492
  /**
24629
- * @param {?} routes
24630
24493
  * @return {?}
24631
24494
  */
24632
- KeepAliveService.prototype.setExcludeRoutes = /**
24633
- * @param {?} routes
24495
+ RichtexteditorComponent.prototype.onCreate = /**
24634
24496
  * @return {?}
24635
24497
  */
24636
- function (routes) {
24637
- excludeRoutes = routes; // 设置不缓存的路由
24498
+ function () {
24499
+ var _this = this;
24500
+ //bind the a click event
24501
+ // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
24502
+ // editorContent.addEventListener('click', this.OnClicked.bind(this));
24503
+ //add the line height
24504
+ this.editorManager = this.rteObj.formatter.editorManager;
24505
+ /** @type {?} */
24506
+ var splitButton = new ej2AngularSplitbuttons.DropDownButton({
24507
+ items: lineHeight_items,
24508
+ iconCss: "e-icons e-line-spacing",
24509
+ select: this.onSelect.bind(this),
24510
+ });
24511
+ splitButton.appendTo("#lineheight_tbar");
24512
+ // ai assist
24513
+ /** @type {?} */
24514
+ var aiassistantButton = new ej2AngularSplitbuttons.DropDownButton({
24515
+ items: this.queryList,
24516
+ // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
24517
+ select: (/**
24518
+ * @param {?} args
24519
+ * @return {?}
24520
+ */
24521
+ function (args) { return _this.aiQuerySelectedMenu(args); }),
24522
+ });
24523
+ aiassistantButton.appendTo("#ai_assistant_button_tbar");
24638
24524
  };
24639
24525
  /**
24640
- * @param {?} route
24526
+ * @private
24527
+ * @param {?} args
24641
24528
  * @return {?}
24642
24529
  */
24643
- KeepAliveService.prototype.shouldDetach = /**
24644
- * @param {?} route
24530
+ RichtexteditorComponent.prototype.onSelect = /**
24531
+ * @private
24532
+ * @param {?} args
24645
24533
  * @return {?}
24646
24534
  */
24647
- function (route) {
24648
- /** @type {?} */
24649
- var config = route.routeConfig;
24650
- // console.log("shouldDetach", toBeDeleteUrl, this.getRoutePath(route));
24651
- if (toBeDeleteUrl === this.getRoutePath(route)) {
24652
- // 对于新开的又即将关闭的tab,不缓存
24653
- if (route.children.length === 0) {
24654
- toBeDeleteUrl = "";
24655
- }
24656
- return false;
24535
+ function (args) {
24536
+ if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
24537
+ this.rteObj.formatter.saveData();
24657
24538
  }
24658
- if (config && excludeRoutes.includes(this.getRoutePath(route))) {
24659
- return false;
24539
+ /** @type {?} */
24540
+ var nodes = this.editorManager.domNode.blockNodes();
24541
+ for (var i = 0; nodes.length > i; i++) {
24542
+ ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
24660
24543
  }
24661
- //Don't store lazy loaded routes
24662
- return config && !config.loadChildren;
24544
+ this.rteObj.formatter.saveData();
24545
+ this.rteObj.formatter.enableUndo(this.rteObj);
24663
24546
  };
24664
24547
  /**
24665
- * @param {?} route
24666
- * @param {?} handle
24548
+ * @private
24549
+ * @param {?} args
24667
24550
  * @return {?}
24668
24551
  */
24669
- KeepAliveService.prototype.store = /**
24670
- * @param {?} route
24671
- * @param {?} handle
24552
+ RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
24553
+ * @private
24554
+ * @param {?} args
24672
24555
  * @return {?}
24673
24556
  */
24674
- function (route, handle) {
24675
- // console.log("store", this.getRoutePath(route));
24676
- // console.log("store", storedRoutes);
24677
- /** @type {?} */
24678
- var key = this.getRoutePath(route);
24679
- storedRoutes.set(key, handle);
24557
+ function (args) {
24558
+ this.dialogueOpen(args.item.text);
24680
24559
  };
24681
24560
  /**
24682
- * @param {?} route
24561
+ * @param {?} selectedQuery
24683
24562
  * @return {?}
24684
24563
  */
24685
- KeepAliveService.prototype.shouldAttach = /**
24686
- * @param {?} route
24564
+ RichtexteditorComponent.prototype.dialogueOpen = /**
24565
+ * @param {?} selectedQuery
24687
24566
  * @return {?}
24688
24567
  */
24689
- function (route) {
24568
+ function (selectedQuery) {
24569
+ var _this = this;
24690
24570
  /** @type {?} */
24691
- var key = this.getRoutePath(route);
24692
- return !!route.routeConfig && storedRoutes.has(key);
24571
+ var selectionText = this.rteObj.getSelectedHtml();
24572
+ this.selectedQuery = selectedQuery;
24573
+ if (selectionText) {
24574
+ /** @type {?} */
24575
+ var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
24576
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
24577
+ this.dropValIndex = this.queryList.findIndex((/**
24578
+ * @param {?} q
24579
+ * @return {?}
24580
+ */
24581
+ function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
24582
+ this.queryCategory.index = this.dropValIndex;
24583
+ this.leftRte.value = this.promptQuery = selectionText;
24584
+ this.leftRte.refreshUI();
24585
+ this.AIdialog.show();
24586
+ this.updateAISugesstionsData(selectedQuery);
24587
+ }
24588
+ else {
24589
+ this.showMsg = true;
24590
+ setTimeout((/**
24591
+ * @return {?}
24592
+ */
24593
+ function () {
24594
+ _this.showMsg = false;
24595
+ }), 3000);
24596
+ console.log("Please select the content to perform the AI operation.");
24597
+ }
24693
24598
  };
24694
24599
  /**
24695
- * @param {?} route
24600
+ * @param {?} selectedQuery
24696
24601
  * @return {?}
24697
24602
  */
24698
- KeepAliveService.prototype.retrieve = /**
24699
- * @param {?} route
24603
+ RichtexteditorComponent.prototype.updateAISugesstionsData = /**
24604
+ * @param {?} selectedQuery
24700
24605
  * @return {?}
24701
24606
  */
24702
- function (route) {
24703
- /** @type {?} */
24704
- var config = route.routeConfig;
24705
- /** @type {?} */
24706
- var key = this.getRoutePath(route);
24707
- //We don't store lazy loaded routes, so don't even bother trying to retrieve them
24708
- if (!config || config.loadChildren) {
24709
- return false;
24607
+ function (selectedQuery) {
24608
+ this.isSentimentCheck = false;
24609
+ switch (selectedQuery) {
24610
+ case "Summarize":
24611
+ this.subQuery = "Summarize the upcoming sentence shortly.";
24612
+ break;
24613
+ case "Elaborate":
24614
+ this.subQuery = "Elaborate on the upcoming sentence.";
24615
+ break;
24616
+ case "Rephrase":
24617
+ this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
24618
+ break;
24619
+ case "Correct Grammar":
24620
+ this.subQuery = "Correct the grammar of the upcoming sentence.";
24621
+ break;
24622
+ case "Translate":
24623
+ this.subQuery =
24624
+ "Translate the upcoming sentence to " + this.translatelanguage + ".";
24625
+ break;
24626
+ case "Sentiment Analysis":
24627
+ this.isSentimentCheck = true;
24628
+ this.subQuery =
24629
+ '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:';
24630
+ break;
24710
24631
  }
24711
- return storedRoutes.get(key) || null;
24632
+ this.updateAISugesstions();
24712
24633
  };
24713
24634
  /**
24714
- * @param {?} future
24715
- * @param {?} curr
24716
24635
  * @return {?}
24717
24636
  */
24718
- KeepAliveService.prototype.shouldReuseRoute = /**
24719
- * @param {?} future
24720
- * @param {?} curr
24637
+ RichtexteditorComponent.prototype.updateAISugesstions = /**
24721
24638
  * @return {?}
24722
24639
  */
24723
- function (future, curr) {
24724
- // console.log("shouldReuseRoute", future, curr);
24725
- // return future.routeConfig === curr.routeConfig;
24726
- if (future.routeConfig === curr.routeConfig) {
24727
- if (future.children.length === 0 && curr.children.length === 0) {
24728
- // 无子路由时, 通过params和queryParams判断是否复用路由
24729
- return (JSON.stringify(future.params) === JSON.stringify(curr.params));
24640
+ function () {
24641
+ var _this = this;
24642
+ try {
24643
+ if (this.promptQuery) {
24644
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24645
+ "";
24646
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24647
+ "none";
24648
+ this.sentimentButton.element.style.display = "none";
24649
+ this.regenerateButton.disabled = true;
24650
+ this.copyButton.disabled = true;
24651
+ this.replaceButton.disabled = true;
24652
+ this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
24653
+ this.apiResultData.then((/**
24654
+ * @param {?} result
24655
+ * @return {?}
24656
+ */
24657
+ function (result) {
24658
+ _this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
24659
+ _this.sentimentButton.content = result
24660
+ .toLowerCase()
24661
+ .includes("positive")
24662
+ ? "😊 Positive"
24663
+ : result.toLowerCase().includes("negative")
24664
+ ? "😞 Negative"
24665
+ : "😐 Neutral";
24666
+ _this.sentimentButton.element.style.display = !_this.isSentimentCheck
24667
+ ? "none"
24668
+ : "";
24669
+ _this.rightRte.value = _this.AIResult;
24670
+ /** @type {?} */
24671
+ var noResultsFound = !(_this.AIResult || _this.promptQuery);
24672
+ ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
24673
+ _this.regenerateButton.disabled = noResultsFound;
24674
+ _this.copyButton.disabled = noResultsFound;
24675
+ _this.replaceButton.disabled = noResultsFound;
24676
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
24677
+ "none";
24678
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
24679
+ noResultsFound ? "none" : "";
24680
+ console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
24681
+ // this.ref.markForCheck();
24682
+ }));
24730
24683
  }
24731
- return true;
24732
24684
  }
24733
- return false;
24685
+ catch (_a) {
24686
+ // this.toastObj.show();
24687
+ }
24734
24688
  };
24735
24689
  /**
24736
- * @param {?} route
24690
+ * @param {?} subQuery
24691
+ * @param {?} promptQuery
24737
24692
  * @return {?}
24738
24693
  */
24739
- KeepAliveService.prototype.getRoutePath = /**
24740
- * @param {?} route
24694
+ RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
24695
+ * @param {?} subQuery
24696
+ * @param {?} promptQuery
24741
24697
  * @return {?}
24742
24698
  */
24743
- function (route) {
24744
- if (route.routeConfig) {
24745
- // const pathParams = JSON.stringify(route.params);
24746
- // const queryParams = new URLSearchParams(route.queryParams).toString();
24699
+ function (subQuery, promptQuery) {
24700
+ return __awaiter(this, void 0, void 0, function () {
24701
+ var content;
24702
+ return __generator(this, function (_a) {
24703
+ switch (_a.label) {
24704
+ case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
24705
+ case 1:
24706
+ content = _a.sent();
24707
+ return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
24708
+ }
24709
+ });
24710
+ });
24711
+ };
24712
+ /**
24713
+ * @return {?}
24714
+ */
24715
+ RichtexteditorComponent.prototype.dialogShow = /**
24716
+ * @return {?}
24717
+ */
24718
+ function () {
24719
+ var _this = this;
24720
+ (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
24721
+ * @return {?}
24722
+ */
24723
+ function () {
24724
+ _this.updateAISugesstions();
24725
+ }));
24726
+ (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
24727
+ * @return {?}
24728
+ */
24729
+ function () {
24730
+ _this.copyTextToClipboard(_this.AIResult);
24731
+ }));
24732
+ (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
24733
+ * @return {?}
24734
+ */
24735
+ function () {
24747
24736
  /** @type {?} */
24748
- var url = route._urlSegment.segments.map((/**
24749
- * @param {?} v
24750
- * @return {?}
24751
- */
24752
- function (v) { return v.path; })).join("/");
24753
- return "/" + url;
24754
- }
24755
- return "";
24737
+ var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
24738
+ ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
24739
+ ((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
24740
+ undo: true,
24741
+ });
24742
+ _this.closeDialog();
24743
+ }));
24744
+ ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
24756
24745
  };
24757
24746
  /**
24758
- * @param {?} path
24759
24747
  * @return {?}
24760
24748
  */
24761
- KeepAliveService.prototype.clearCache = /**
24762
- * @param {?} path
24749
+ RichtexteditorComponent.prototype.closeDialog = /**
24763
24750
  * @return {?}
24764
24751
  */
24765
- function (path) {
24766
- // console.log("clearCache", storedRoutes, path);
24767
- toBeDeleteUrl = path;
24768
- storedRoutes.delete(path);
24752
+ function () {
24753
+ this.AIdialog.hide();
24754
+ this.rightRte.value = "";
24755
+ this.leftRte.value = "";
24756
+ this.promptQuery = "";
24757
+ this.chipValue = "Standard";
24758
+ this.AIResult = "";
24759
+ this.dropValIndex = 0;
24760
+ this.selectedQuery = "Rephrase";
24761
+ this.sentimentButton.content = "😊 Neutral";
24769
24762
  };
24770
24763
  /**
24764
+ * @param {?} text
24771
24765
  * @return {?}
24772
24766
  */
24773
- KeepAliveService.prototype.clearAllCache = /**
24767
+ RichtexteditorComponent.prototype.copyTextToClipboard = /**
24768
+ * @param {?} text
24774
24769
  * @return {?}
24775
24770
  */
24776
- function () {
24777
- storedRoutes.clear();
24771
+ function (text) {
24772
+ if (navigator.clipboard) {
24773
+ navigator.clipboard
24774
+ .writeText(text)
24775
+ .then((/**
24776
+ * @return {?}
24777
+ */
24778
+ function () {
24779
+ console.log("Text copied to clipboard successfully!");
24780
+ }))
24781
+ .catch((/**
24782
+ * @param {?} err
24783
+ * @return {?}
24784
+ */
24785
+ function (err) {
24786
+ console.error("Failed to copy text: ", err);
24787
+ }));
24788
+ }
24789
+ else {
24790
+ // Fallback for browsers that do not support the Clipboard API
24791
+ /** @type {?} */
24792
+ var textarea = document.createElement("textarea");
24793
+ textarea.value = text;
24794
+ document.body.appendChild(textarea);
24795
+ textarea.select();
24796
+ try {
24797
+ document.execCommand("copy");
24798
+ console.log("Text copied to clipboard using execCommand");
24799
+ }
24800
+ catch (err) {
24801
+ console.error("Failed to copy text: ", err);
24802
+ }
24803
+ finally {
24804
+ document.body.removeChild(textarea);
24805
+ }
24806
+ }
24778
24807
  };
24779
- KeepAliveService.decorators = [
24780
- { type: core.Injectable, args: [{
24781
- providedIn: "root",
24782
- },] }
24783
- ];
24784
- /** @nocollapse */ KeepAliveService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function KeepAliveService_Factory() { return new KeepAliveService(); }, token: KeepAliveService, providedIn: "root" });
24785
- return KeepAliveService;
24786
- }());
24787
-
24788
- /**
24789
- * @fileoverview added by tsickle
24790
- * Generated from: lib/form/confirm-select/index.component.ts
24791
- * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
24792
- */
24793
- var ConfirmSelectComponent = /** @class */ (function () {
24794
- function ConfirmSelectComponent() {
24795
- this.dataSource = [];
24796
- this.disabled = false;
24797
- this.fields = { text: "Game", value: "Id" };
24798
- this.showSelectAll = true;
24799
- this.valueChange = new core.EventEmitter();
24800
- this.selectedItems = [];
24801
- this.isInteracted = false;
24802
- }
24803
24808
  /**
24804
24809
  * @return {?}
24805
24810
  */
24806
- ConfirmSelectComponent.prototype.ngOnInit = /**
24811
+ RichtexteditorComponent.prototype.onOverlayClick = /**
24807
24812
  * @return {?}
24808
24813
  */
24809
24814
  function () {
24810
- this.getInfo();
24811
- this.resetSelectedItems();
24815
+ /** @type {?} */
24816
+ var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
24817
+ if (activeEle) {
24818
+ activeEle.classList.remove("e-active");
24819
+ }
24820
+ this.closeDialog();
24812
24821
  };
24813
24822
  /**
24814
- * @param {?} changes
24823
+ * @param {?} args
24815
24824
  * @return {?}
24816
24825
  */
24817
- ConfirmSelectComponent.prototype.ngOnChanges = /**
24818
- * @param {?} changes
24826
+ RichtexteditorComponent.prototype.onQuerySelect = /**
24827
+ * @param {?} args
24819
24828
  * @return {?}
24820
24829
  */
24821
- function (changes) {
24822
- if (changes.value && !changes.value.firstChange) {
24823
- this.resetSelectedItems();
24824
- }
24830
+ function (args) {
24831
+ // this.chipList.selectedChips = 0;
24832
+ this.translatelanguage = "EN";
24833
+ this.selectedQuery = args.itemData.text;
24834
+ this.updateAISugesstionsData(args.itemData.text);
24825
24835
  };
24826
24836
  /**
24837
+ * @param {?} args
24827
24838
  * @return {?}
24828
24839
  */
24829
- ConfirmSelectComponent.prototype.getInfo = /**
24840
+ RichtexteditorComponent.prototype.onLanguageSelect = /**
24841
+ * @param {?} args
24830
24842
  * @return {?}
24831
24843
  */
24832
- function () {
24833
- this.translation = JSON.parse(localStorage.getItem("translation"));
24844
+ function (args) {
24845
+ this.translatelanguage = args.itemData.id;
24846
+ this.updateAISugesstionsData("Translate");
24834
24847
  };
24835
24848
  /**
24849
+ * @param {?} args
24836
24850
  * @return {?}
24837
24851
  */
24838
- ConfirmSelectComponent.prototype.resetSelectedItems = /**
24852
+ RichtexteditorComponent.prototype.onChipClick = /**
24853
+ * @param {?} args
24839
24854
  * @return {?}
24840
24855
  */
24841
- function () {
24842
- this.selectedItems = JSON.parse(JSON.stringify(this.value || []));
24843
- if (this.comfirmSelect) {
24844
- this.comfirmSelect.value = this.selectedItems;
24845
- }
24856
+ function (args) {
24857
+ this.chipValue = args.itemData.text;
24858
+ // 事件会触发两次 必须判断args.text是否有值
24859
+ if (args.itemData.text)
24860
+ this.updateAISugesstionsData("Rephrase");
24846
24861
  };
24847
24862
  /**
24863
+ * @param {?} args
24848
24864
  * @return {?}
24849
24865
  */
24850
- ConfirmSelectComponent.prototype.onCancel = /**
24866
+ RichtexteditorComponent.prototype._toolbarClick = /**
24867
+ * @param {?} args
24851
24868
  * @return {?}
24852
24869
  */
24853
- function () {
24854
- this.isInteracted = true;
24855
- this.resetSelectedItems();
24856
- this.comfirmSelect.hidePopup();
24870
+ function (args) {
24871
+ this.toolbarClick.emit(args);
24857
24872
  };
24858
24873
  /**
24859
24874
  * @return {?}
24860
24875
  */
24861
- ConfirmSelectComponent.prototype.onApply = /**
24876
+ RichtexteditorComponent.prototype.hideToast = /**
24862
24877
  * @return {?}
24863
24878
  */
24864
24879
  function () {
24865
- this.isInteracted = true;
24866
- /** @type {?} */
24867
- var val = this.comfirmSelect.value;
24868
- this.valueChange.emit(val);
24869
- this.comfirmSelect.hidePopup();
24880
+ this.showMsg = false;
24870
24881
  };
24871
24882
  /**
24872
- * @param {?} e
24873
24883
  * @return {?}
24874
24884
  */
24875
- ConfirmSelectComponent.prototype.onClose = /**
24876
- * @param {?} e
24885
+ RichtexteditorComponent.prototype.onZoom = /**
24877
24886
  * @return {?}
24878
24887
  */
24879
- function (e) {
24880
- if (this.isInteracted) {
24881
- this.isInteracted = false;
24888
+ function () {
24889
+ if (this.size === "largest") {
24890
+ this.size = ""; // 恢复到原始大小
24882
24891
  }
24883
24892
  else {
24884
- this.resetSelectedItems();
24893
+ this.size = "largest"; // 设置为最大化
24885
24894
  }
24886
24895
  };
24887
- ConfirmSelectComponent.decorators = [
24896
+ RichtexteditorComponent.decorators = [
24888
24897
  { type: core.Component, args: [{
24889
- selector: "rs-confirm-select",
24890
- 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",
24891
- 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)}"]
24898
+ selector: "rs-richtext-editor",
24899
+ 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",
24900
+ 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}"]
24892
24901
  }] }
24893
24902
  ];
24894
- ConfirmSelectComponent.propDecorators = {
24895
- comfirmSelect: [{ type: core.ViewChild, args: ["comfirmSelect", { static: false },] }],
24896
- value: [{ type: core.Input }],
24897
- dataSource: [{ type: core.Input }],
24898
- disabled: [{ type: core.Input }],
24899
- fields: [{ type: core.Input }],
24903
+ /** @nocollapse */
24904
+ RichtexteditorComponent.ctorParameters = function () { return [
24905
+ { type: core.ChangeDetectorRef }
24906
+ ]; };
24907
+ RichtexteditorComponent.propDecorators = {
24908
+ rteObj: [{ type: core.ViewChild, args: ["editor", { static: false },] }],
24909
+ queryCategory: [{ type: core.ViewChild, args: ["queryCategory", { static: false },] }],
24910
+ leftRte: [{ type: core.ViewChild, args: ["leftRte", { static: false },] }],
24911
+ rightRte: [{ type: core.ViewChild, args: ["rightRte", { static: false },] }],
24912
+ AIdialog: [{ type: core.ViewChild, args: ["AIdialog", { static: true },] }],
24913
+ sentimentButton: [{ type: core.ViewChild, args: ["sentimentButton", { static: false },] }],
24914
+ regenerateButton: [{ type: core.ViewChild, args: ["regenerateButton", { static: false },] }],
24915
+ copyButton: [{ type: core.ViewChild, args: ["copyButton", { static: false },] }],
24916
+ replaceButton: [{ type: core.ViewChild, args: ["replaceButton", { static: false },] }],
24900
24917
  placeholder: [{ type: core.Input }],
24901
- showSelectAll: [{ type: core.Input }],
24902
- valueChange: [{ type: core.Output }]
24918
+ value: [{ type: core.Input }],
24919
+ height: [{ type: core.Input }],
24920
+ autoSaveOnIdle: [{ type: core.Input }],
24921
+ target: [{ type: core.Input }],
24922
+ toolbarClick: [{ type: core.Output }],
24923
+ change: [{ type: core.Output }]
24903
24924
  };
24904
- return ConfirmSelectComponent;
24925
+ return RichtexteditorComponent;
24905
24926
  }());
24906
24927
  if (false) {
24907
24928
  /** @type {?} */
24908
- ConfirmSelectComponent.prototype.comfirmSelect;
24929
+ RichtexteditorComponent.prototype.rteObj;
24909
24930
  /** @type {?} */
24910
- ConfirmSelectComponent.prototype.value;
24931
+ RichtexteditorComponent.prototype.queryCategory;
24911
24932
  /** @type {?} */
24912
- ConfirmSelectComponent.prototype.dataSource;
24933
+ RichtexteditorComponent.prototype.leftRte;
24913
24934
  /** @type {?} */
24914
- ConfirmSelectComponent.prototype.disabled;
24935
+ RichtexteditorComponent.prototype.rightRte;
24915
24936
  /** @type {?} */
24916
- ConfirmSelectComponent.prototype.fields;
24937
+ RichtexteditorComponent.prototype.AIdialog;
24917
24938
  /** @type {?} */
24918
- ConfirmSelectComponent.prototype.placeholder;
24939
+ RichtexteditorComponent.prototype.sentimentButton;
24919
24940
  /** @type {?} */
24920
- ConfirmSelectComponent.prototype.showSelectAll;
24941
+ RichtexteditorComponent.prototype.regenerateButton;
24921
24942
  /** @type {?} */
24922
- ConfirmSelectComponent.prototype.valueChange;
24943
+ RichtexteditorComponent.prototype.copyButton;
24923
24944
  /** @type {?} */
24924
- ConfirmSelectComponent.prototype.translation;
24945
+ RichtexteditorComponent.prototype.replaceButton;
24925
24946
  /** @type {?} */
24926
- ConfirmSelectComponent.prototype.selectedItems;
24947
+ RichtexteditorComponent.prototype.placeholder;
24927
24948
  /** @type {?} */
24928
- ConfirmSelectComponent.prototype.isInteracted;
24949
+ RichtexteditorComponent.prototype.value;
24950
+ /** @type {?} */
24951
+ RichtexteditorComponent.prototype.height;
24952
+ /** @type {?} */
24953
+ RichtexteditorComponent.prototype.autoSaveOnIdle;
24954
+ /** @type {?} */
24955
+ RichtexteditorComponent.prototype.target;
24956
+ /** @type {?} */
24957
+ RichtexteditorComponent.prototype.toolbarClick;
24958
+ /** @type {?} */
24959
+ RichtexteditorComponent.prototype.change;
24960
+ /** @type {?} */
24961
+ RichtexteditorComponent.prototype.family;
24962
+ /** @type {?} */
24963
+ RichtexteditorComponent.prototype.dialogWidth;
24964
+ /** @type {?} */
24965
+ RichtexteditorComponent.prototype.dialogHeight;
24966
+ /** @type {?} */
24967
+ RichtexteditorComponent.prototype.showZoomBtn;
24968
+ /** @type {?} */
24969
+ RichtexteditorComponent.prototype.showMsg;
24970
+ /** @type {?} */
24971
+ RichtexteditorComponent.prototype.insertImageSettings;
24972
+ /** @type {?} */
24973
+ RichtexteditorComponent.prototype.editorManager;
24974
+ /** @type {?} */
24975
+ RichtexteditorComponent.prototype.size;
24976
+ /** @type {?} */
24977
+ RichtexteditorComponent.prototype.selectedQuery;
24978
+ /** @type {?} */
24979
+ RichtexteditorComponent.prototype.dropValIndex;
24980
+ /** @type {?} */
24981
+ RichtexteditorComponent.prototype.queryList;
24982
+ /** @type {?} */
24983
+ RichtexteditorComponent.prototype.rephraseTyleList;
24984
+ /** @type {?} */
24985
+ RichtexteditorComponent.prototype.languageList;
24986
+ /** @type {?} */
24987
+ RichtexteditorComponent.prototype.promptQuery;
24988
+ /** @type {?} */
24989
+ RichtexteditorComponent.prototype.isSentimentCheck;
24990
+ /** @type {?} */
24991
+ RichtexteditorComponent.prototype.subQuery;
24992
+ /** @type {?} */
24993
+ RichtexteditorComponent.prototype.translatelanguage;
24994
+ /** @type {?} */
24995
+ RichtexteditorComponent.prototype.chipValue;
24996
+ /** @type {?} */
24997
+ RichtexteditorComponent.prototype.apiResultData;
24998
+ /** @type {?} */
24999
+ RichtexteditorComponent.prototype.AIResult;
25000
+ /** @type {?} */
25001
+ RichtexteditorComponent.prototype.tools;
25002
+ /**
25003
+ * @type {?}
25004
+ * @private
25005
+ */
25006
+ RichtexteditorComponent.prototype.ref;
24929
25007
  }
24930
25008
 
24931
25009
  /**
@@ -25171,7 +25249,6 @@
25171
25249
  exports.RSToolbarComponent = RSToolbarComponent;
25172
25250
  exports.RadioGroupComponent = RadioGroupComponent;
25173
25251
  exports.RaiseCommonLibModule = RaiseCommonLibModule;
25174
- exports.RichtexteditorComponent = RichtexteditorComponent;
25175
25252
  exports.RsCommentaryComponent = RsCommentaryComponent;
25176
25253
  exports.RsPageListComponent = RsPageListComponent;
25177
25254
  exports.RsPageTabComponent = RsPageTabComponent;
@@ -25183,9 +25260,10 @@
25183
25260
  exports.TruncatedTextToggleComponent = TruncatedTextToggleComponent;
25184
25261
  exports.filterShowSection = filterShowSection;
25185
25262
  exports.ɵa = Debounce;
25186
- exports.ɵb = ConfirmSelectComponent;
25187
- exports.ɵc = NewActionNotificationComponent;
25188
- exports.ɵd = CommonDeleteComponent;
25263
+ exports.ɵb = RichtexteditorComponent;
25264
+ exports.ɵc = ConfirmSelectComponent;
25265
+ exports.ɵd = NewActionNotificationComponent;
25266
+ exports.ɵe = CommonDeleteComponent;
25189
25267
 
25190
25268
  Object.defineProperty(exports, '__esModule', { value: true });
25191
25269