raise-common-lib 0.0.193 → 0.0.195

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