raise-common-lib 0.0.191 → 0.0.193

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 (38) hide show
  1. package/bundles/raise-common-lib.umd.js +1241 -8
  2. package/bundles/raise-common-lib.umd.js.map +1 -1
  3. package/bundles/raise-common-lib.umd.min.js +1 -1
  4. package/bundles/raise-common-lib.umd.min.js.map +1 -1
  5. package/esm2015/lib/common-grid/index.component.js +2 -2
  6. package/esm2015/lib/form/drawer-form/drawer-form.component.js +6 -3
  7. package/esm2015/lib/form/richtexteditor/ai-config.js +70 -0
  8. package/esm2015/lib/form/richtexteditor/data-config.js +273 -0
  9. package/esm2015/lib/form/richtexteditor/index.component.js +604 -0
  10. package/esm2015/lib/form/richtexteditor/openapi.js +175 -0
  11. package/esm2015/lib/layout/page-tab/index.component.js +6 -2
  12. package/esm2015/lib/raise-common-lib.module.js +7 -2
  13. package/esm2015/public-api.js +2 -1
  14. package/esm2015/raise-common-lib.js +2 -2
  15. package/esm5/lib/common-grid/index.component.js +2 -2
  16. package/esm5/lib/form/drawer-form/drawer-form.component.js +6 -3
  17. package/esm5/lib/form/richtexteditor/ai-config.js +73 -0
  18. package/esm5/lib/form/richtexteditor/data-config.js +273 -0
  19. package/esm5/lib/form/richtexteditor/index.component.js +684 -0
  20. package/esm5/lib/form/richtexteditor/openapi.js +208 -0
  21. package/esm5/lib/layout/page-tab/index.component.js +6 -2
  22. package/esm5/lib/raise-common-lib.module.js +7 -2
  23. package/esm5/public-api.js +2 -1
  24. package/esm5/raise-common-lib.js +2 -2
  25. package/fesm2015/raise-common-lib.js +1127 -10
  26. package/fesm2015/raise-common-lib.js.map +1 -1
  27. package/fesm5/raise-common-lib.js +1242 -10
  28. package/fesm5/raise-common-lib.js.map +1 -1
  29. package/lib/form/richtexteditor/ai-config.d.ts +10 -0
  30. package/lib/form/richtexteditor/data-config.d.ts +14 -0
  31. package/lib/form/richtexteditor/index.component.d.ts +78 -0
  32. package/lib/form/richtexteditor/openapi.d.ts +3 -0
  33. package/lib/layout/page-tab/index.component.d.ts +1 -0
  34. package/package.json +1 -1
  35. package/public-api.d.ts +1 -0
  36. package/raise-common-lib.metadata.json +1 -1
  37. package/src/assets/img/editor-copy.svg +5 -0
  38. package/src/assets/img/info.svg +5 -0
@@ -15,22 +15,22 @@ import { setCulture, L10n } from '@syncfusion/ej2-base';
15
15
  import ResizeObserver from 'resize-observer-polyfill';
16
16
  import { Query } from '@syncfusion/ej2-data';
17
17
  import moment from 'moment';
18
+ import { DropDownListModule, DropDownTreeModule, MultiSelectAllModule, AutoCompleteModule, ListBoxModule } from '@syncfusion/ej2-angular-dropdowns';
19
+ import { RichTextEditorAllModule, HtmlEditorService, ToolbarService as ToolbarService$2 } from '@syncfusion/ej2-angular-richtexteditor';
20
+ import { SwitchModule, CheckBoxModule, RadioButtonModule, ButtonModule, ChipListModule } from '@syncfusion/ej2-angular-buttons';
21
+ import { DropDownButton, DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
22
+ import { TooltipModule, DialogModule } from '@syncfusion/ej2-angular-popups';
18
23
  import { MatIconRegistry, MatIconModule } from '@angular/material/icon';
19
24
  import { DomSanitizer } from '@angular/platform-browser';
20
25
  import { ReactiveFormsModule, FormsModule } from '@angular/forms';
21
26
  import { CommonModule } from '@angular/common';
22
- import { SwitchModule, CheckBoxModule, RadioButtonModule, ButtonModule } from '@syncfusion/ej2-angular-buttons';
23
27
  import { DiagramModule } from '@syncfusion/ej2-angular-diagrams';
24
- import { TooltipModule, DialogModule } from '@syncfusion/ej2-angular-popups';
25
28
  import { DatePickerModule, DateRangePickerModule, DateTimePickerModule } from '@syncfusion/ej2-angular-calendars';
26
29
  import { TextBoxModule, ColorPickerModule, UploaderModule, NumericTextBoxModule } from '@syncfusion/ej2-angular-inputs';
27
- import { DropDownListModule, DropDownTreeModule, MultiSelectAllModule, AutoCompleteModule, ListBoxModule } from '@syncfusion/ej2-angular-dropdowns';
28
30
  import { PivotViewAllModule, PivotFieldListAllModule } from '@syncfusion/ej2-angular-pivotview';
29
31
  import { ChartAllModule, AccumulationChartAllModule, RangeNavigatorAllModule, AccumulationChartModule, PieSeriesService, AccumulationLegendService, AccumulationTooltipService, AccumulationAnnotationService, AccumulationDataLabelService } from '@syncfusion/ej2-angular-charts';
30
32
  import { DashboardLayoutModule } from '@syncfusion/ej2-angular-layouts';
31
33
  import { PdfViewerModule, LinkAnnotationService, BookmarkViewService, MagnificationService, ThumbnailViewService, ToolbarService as ToolbarService$1, NavigationService, TextSearchService, TextSelectionService, PrintService } from '@syncfusion/ej2-angular-pdfviewer';
32
- import { DropDownButtonModule, SplitButtonModule } from '@syncfusion/ej2-angular-splitbuttons';
33
- import { RichTextEditorAllModule, HtmlEditorService, ToolbarService as ToolbarService$2 } from '@syncfusion/ej2-angular-richtexteditor';
34
34
  import { MatMenuModule } from '@angular/material/menu';
35
35
  import { MatTooltipModule } from '@angular/material/tooltip';
36
36
 
@@ -647,7 +647,7 @@ class CommonGridComponent {
647
647
  CommonGridComponent.decorators = [
648
648
  { type: Component, args: [{
649
649
  selector: "rs-common-grid",
650
- template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
650
+ template: "<ejs-grid\r\n #grid\r\n [id]=\"gridId\"\r\n [ngClass]=\"{\r\n 'hide-Check-box': !alwaysShowCheckbox,\r\n 'grid-loading': className === 'grid-loading'\r\n }\"\r\n [dataSource]=\"dataSource\"\r\n [allowPaging]=\"allowPaging && pageSettings\"\r\n [allowResizing]=\"true\"\r\n [pageSettings]=\"pageSettings\"\r\n [showColumnMenu]=\"true\"\r\n [allowSorting]=\"true\"\r\n [allowFiltering]=\"true\"\r\n [allowExcelExport]=\"true\"\r\n [allowRowDragAndDrop]=\"allowRowDragAndDrop\"\r\n [filterSettings]=\"filterSettings\"\r\n [resizeSettings]=\"resizeSettings\"\r\n [allowSelection]=\"true\"\r\n [editSettings]=\"editSettings\"\r\n [childGrid]=\"childGrid\"\r\n [contextMenuItems]=\"dataSource && dataSource.length ? contextMenuItems : null\"\r\n [selectionSettings]=\"selectionSettings\"\r\n (recordClick)=\"_recordClick($event)\"\r\n (recordDoubleClick)=\"_recordDoubleClick($event)\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (actionComplete)=\"_actionHandler($event)\"\r\n (rowSelected)=\"_rowSelected($event)\"\r\n (rowDeselecting)=\"_rowDeselecting($event)\"\r\n (rowDeselected)=\"_rowDeselected($event)\"\r\n style=\"border: none\"\r\n (contextMenuClick)=\"_onContextMenu($event)\"\r\n (contextMenuOpen)=\"contextMenuOpen($event)\"\r\n (queryCellInfo)=\"customiseCell($event)\"\r\n (dataBound)=\"_dataBound($event)\"\r\n (rowDataBound)=\"_rowDataBound($event)\"\r\n (rowSelecting)=\"_rowSelecting($event)\"\r\n (excelQueryCellInfo)=\"_exportQueryCellInfo($event)\"\r\n (rowDrop)=\"onRowDrop($event)\"\r\n (rowDragStart)=\"_rowDragStart($event)\"\r\n (rowDrag)=\"_rowDrag($event)\"\r\n (load)=\"_load()\"\r\n [frozenColumns]=\"frozenColumns\"\r\n [columnChooserSettings]=\"columnChooserSettings\"\r\n>\r\n <e-columns>\r\n <e-column\r\n *ngIf=\"showCheckBox\"\r\n type=\"checkbox\"\r\n [width]=\"checkBoxWidth\"\r\n [minWidth]=\"checkBoxWidth\"\r\n [showColumnMenu]=\"false\"\r\n [allowResizing]=\"false\"\r\n ></e-column>\r\n <e-column\r\n *ngFor=\"let item of fields; trackBy: trackByFn; let last = last\"\r\n [field]=\"item.columnName\"\r\n [filter]=\"item.filter ? item.filter : { type: 'CheckBox' }\"\r\n [customAttributes]=\"\r\n item.colName === 'entityUserList' || item.colName === 'kycProgress'\r\n ? { class: 'hideColumnFilterClass' }\r\n : {}\r\n \"\r\n [headerText]=\"item.columnDisplayName\"\r\n [textAlign]=\"item.textAlign\"\r\n [showColumnMenu]=\"item.showColumnMenu === undefined ? true : false\"\r\n [allowFiltering]=\"item.allowFiltering === undefined ? true : false\"\r\n [allowSorting]=\"item.allowSorting === undefined ? true : false\"\r\n [showInColumnChooser]=\"\r\n item.showInColumnChooser === undefined ? true : item.showInColumnChooser\r\n \"\r\n [editType]=\"item.editType\"\r\n [validationRules]=\"item.validationRules\"\r\n [type]=\"item.dataType || 'string'\"\r\n [width]=\"item.width\"\r\n [minWidth]=\"item.minWidth\"\r\n [format]=\"item.format\"\r\n [visible]=\"item.visible\"\r\n [template]=\"item.showTemplate ? columnTemplate : undefined\"\r\n [clipMode]=\"\r\n item.clipMode ? item.clipMode : clipMode || 'EllipsisWithTooltip'\r\n \"\r\n [sortComparer]=\"item.dateComparer || null\"\r\n [allowResizing]=\"!last\"\r\n >\r\n </e-column>\r\n </e-columns>\r\n</ejs-grid>\r\n",
651
651
  styles: [""]
652
652
  }] }
653
653
  ];
@@ -2407,6 +2407,7 @@ class RsPageTabComponent {
2407
2407
  this.customPageTitle = false;
2408
2408
  this.tabList = [];
2409
2409
  this.tabChange = new EventEmitter();
2410
+ this.selectedItemIndex = 0;
2410
2411
  this.animation = {
2411
2412
  previous: { effect: "", duration: 0, easing: "" },
2412
2413
  next: { effect: "", duration: 0, easing: "" },
@@ -2444,6 +2445,7 @@ class RsPageTabComponent {
2444
2445
  const index = e.selectedItem.dataset.id.split('_')[1] // sy的bug只能这么取了
2445
2446
  ;
2446
2447
  if (e.isInteracted) {
2448
+ this.selectedItemIndex = index;
2447
2449
  this.tabChange.emit(this.tabList[index]);
2448
2450
  }
2449
2451
  }
@@ -2459,7 +2461,7 @@ class RsPageTabComponent {
2459
2461
  RsPageTabComponent.decorators = [
2460
2462
  { type: Component, args: [{
2461
2463
  selector: "rs-page-tab",
2462
- 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 >\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",
2464
+ template: "<div class=\"rs-page-list-wrap\">\r\n <ng-container *ngIf=\"customPageTitle; else defaultTitle\">\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </ng-container>\r\n <ng-template #defaultTitle>\r\n <div class=\"rs-page-title\" *ngIf=\"pageTitle\">{{ pageTitle }}</div>\r\n </ng-template>\r\n <ejs-tab\r\n class=\"rs-tab\"\r\n #tabObj\r\n (selected)=\"onTabClick($event)\"\r\n [animation]=\"animation\"\r\n\t overflowMode=\"Popup\"\r\n heightAdjustMode=\"None\"\r\n [selectedItem]=\"selectedItemIndex\"\r\n >\r\n <e-tabitems>\r\n <e-tabitem *ngFor=\"let item of tabList\">\r\n <ng-template #headerText>\r\n <div>{{ item.title }}</div>\r\n </ng-template>\r\n </e-tabitem>\r\n </e-tabitems>\r\n </ejs-tab>\r\n <div class=\"rs-grid-wrap\">\r\n <ng-content select=\"[tabContentSlot]\"></ng-content>\r\n </div>\r\n</div>\r\n",
2463
2465
  styles: [".rs-page-list-wrap{height:100%;display:flex;flex-direction:column;position:relative;margin:0 auto;max-width:1885px}.rs-page-list-wrap .rs-page-title{font-family:var(--rs-font-family);font-size:var(--rs-page-title-font-size);font-weight:700;text-align:left;color:var(--rs-page-title-color);display:flex;align-items:center;padding:16px 8px 12px 20px}.rs-page-list-wrap .rs-tab{padding:0 20px}.rs-page-list-wrap .rs-tab .e-tab-header::before{display:none}.rs-page-list-wrap .rs-tab .e-toolbar-items{gap:32px;min-height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item{border:0}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap{padding:0;border:0;position:relative;height:36px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-wrap::before{content:\" \";position:absolute;left:0;bottom:0;width:100%;height:2px;background-color:transparent}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item .e-tab-text{color:#5f6f81;font-family:Arial;font-size:13px;font-style:normal;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-wrap::before{background-color:#1f7bff}.rs-page-list-wrap .rs-tab .e-toolbar-items .e-toolbar-item.e-active .e-tab-text{color:#44566c}.rs-page-list-wrap .rs-tab .e-hor-nav{width:24px;height:24px;min-height:24px;top:3px;border-radius:4px;background-color:transparent!important;border:1px solid #eaedf0!important}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons{box-shadow:none;background-color:transparent!important;border-color:transparent!important;background-image:url(../../assets/img/icon-more.svg);background-size:14px 3px;background-repeat:no-repeat;background-position:4px 14px}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons::before{display:none}.rs-page-list-wrap .rs-tab .e-hor-nav .e-icons:hover{background-color:#eff5fb!important;border-color:#b1d0fc!important;background-image:url(../../assets/img/icon-more-active.svg)}.rs-page-list-wrap .rs-tab .e-toolbar-pop{min-width:160px;border-radius:10px;background:#fff;box-shadow:0 0 8px 0 rgba(0,0,0,.25);padding:8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap{padding:0 8px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap .e-tab-text{color:#44566c;font-family:Arial;font-size:13px;font-weight:400;line-height:16px}.rs-page-list-wrap .rs-tab .e-toolbar-pop .e-toolbar-item .e-tab-wrap:hover{border-radius:6px;background:rgba(31,123,255,.05)}.rs-page-list-wrap .rs-grid-wrap{flex:1;height:0}"]
2464
2466
  }] }
2465
2467
  ];
@@ -2485,6 +2487,8 @@ if (false) {
2485
2487
  /** @type {?} */
2486
2488
  RsPageTabComponent.prototype.tabChange;
2487
2489
  /** @type {?} */
2490
+ RsPageTabComponent.prototype.selectedItemIndex;
2491
+ /** @type {?} */
2488
2492
  RsPageTabComponent.prototype.animation;
2489
2493
  }
2490
2494
 
@@ -21783,7 +21787,9 @@ class DrawerFormComponent {
21783
21787
  /** @type {?} */
21784
21788
  let value = event.value;
21785
21789
  if (field.fieldFormType === "Datepicker") {
21786
- value = moment(value).format("YYYY-MM-DD");
21790
+ /** @type {?} */
21791
+ const date = moment(value);
21792
+ value = date.isValid() ? date.format("YYYY-MM-DD") : null;
21787
21793
  }
21788
21794
  this.onChange(value, field);
21789
21795
  }
@@ -21805,7 +21811,8 @@ class DrawerFormComponent {
21805
21811
  this.onBlur(field);
21806
21812
  /** @type {?} */
21807
21813
  const $input = event.model.element.querySelector("input");
21808
- if (!$input) {
21814
+ if (!$input || !$input.value) {
21815
+ delete this.dateValidMap[field.formKey];
21809
21816
  return;
21810
21817
  }
21811
21818
  /** @type {?} */
@@ -22033,6 +22040,1112 @@ if (false) {
22033
22040
  DrawerFormComponent.prototype.ref;
22034
22041
  }
22035
22042
 
22043
+ /**
22044
+ * @fileoverview added by tsickle
22045
+ * Generated from: lib/form/richtexteditor/ai-config.ts
22046
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22047
+ */
22048
+ /**
22049
+ * @record
22050
+ */
22051
+ function AIConfig() { }
22052
+ if (false) {
22053
+ /** @type {?} */
22054
+ AIConfig.prototype.endpoint;
22055
+ /** @type {?} */
22056
+ AIConfig.prototype.apiKey;
22057
+ /** @type {?} */
22058
+ AIConfig.prototype.deployment;
22059
+ /** @type {?} */
22060
+ AIConfig.prototype.apiVersion;
22061
+ /** @type {?} */
22062
+ AIConfig.prototype.enabled;
22063
+ }
22064
+ // 从环境配置获取AI配置
22065
+ /**
22066
+ * @return {?}
22067
+ */
22068
+ function getAIConfig() {
22069
+ return {
22070
+ endpoint: "https://aidevused.openai.azure.com/",
22071
+ apiKey: "ccba76e279f64653a50ac4fee90afe5c",
22072
+ deployment: "gpt-4",
22073
+ apiVersion: "2025-01-01-preview",
22074
+ enabled: true,
22075
+ };
22076
+ }
22077
+ // 检查配置是否有效
22078
+ /**
22079
+ * @param {?} config
22080
+ * @return {?}
22081
+ */
22082
+ function isAIConfigValid(config) {
22083
+ // 检查是否为aidevused端点且有有效API密钥
22084
+ return !!((config.endpoint &&
22085
+ config.apiKey &&
22086
+ config.deployment &&
22087
+ config.enabled &&
22088
+ config.endpoint === "https://aidevused.openai.azure.com/" &&
22089
+ config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
22090
+ );
22091
+ }
22092
+ // 从后端API获取AI配置(推荐方式)
22093
+ /**
22094
+ * @return {?}
22095
+ * @this {*}
22096
+ */
22097
+ function getAIConfigFromBackend() {
22098
+ return __awaiter(this, void 0, void 0, function* () {
22099
+ try {
22100
+ // 这里应该调用你的后端API来获取AI配置
22101
+ // 例如:return await this.http.get('/api/ai-config');
22102
+ // 临时返回默认配置
22103
+ return getAIConfig();
22104
+ }
22105
+ catch (error) {
22106
+ console.error("Failed to get AI config from backend:", error);
22107
+ return getAIConfig();
22108
+ }
22109
+ });
22110
+ }
22111
+
22112
+ /**
22113
+ * @fileoverview added by tsickle
22114
+ * Generated from: lib/form/richtexteditor/openapi.ts
22115
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22116
+ */
22117
+ // import { testAIFunction } from './ai-test';
22118
+ // testAIFunction();
22119
+ // 使用fetch API发送请求到Azure OpenAI
22120
+ /**
22121
+ * @param {?} messages
22122
+ * @param {?} config
22123
+ * @return {?}
22124
+ * @this {*}
22125
+ */
22126
+ function sendAIRequest(messages, config) {
22127
+ return __awaiter(this, void 0, void 0, function* () {
22128
+ try {
22129
+ /** @type {?} */
22130
+ const url = `${config.endpoint}/openai/deployments/${config.deployment}/chat/completions?api-version=${config.apiVersion}`;
22131
+ /** @type {?} */
22132
+ const url1 = `${config.endpoint}`;
22133
+ /** @type {?} */
22134
+ const response = yield fetch(url, {
22135
+ method: 'POST',
22136
+ headers: {
22137
+ 'Content-Type': 'application/json',
22138
+ 'api-key': config.apiKey,
22139
+ },
22140
+ body: JSON.stringify({
22141
+ messages: messages,
22142
+ max_tokens: 1000,
22143
+ temperature: 0.7,
22144
+ top_p: 1,
22145
+ frequency_penalty: 0,
22146
+ presence_penalty: 0,
22147
+ }),
22148
+ });
22149
+ if (!response.ok) {
22150
+ /** @type {?} */
22151
+ const errorText = yield response.text();
22152
+ throw new Error(`HTTP error! status: ${response.status}, message: ${errorText}`);
22153
+ }
22154
+ /** @type {?} */
22155
+ const data = yield response.json();
22156
+ if (!data.choices || !data.choices[0] || !data.choices[0].message) {
22157
+ throw new Error('Invalid response format from AI service');
22158
+ }
22159
+ return data.choices[0].message.content;
22160
+ }
22161
+ catch (error) {
22162
+ console.error('AI request failed:', error);
22163
+ throw error;
22164
+ }
22165
+ });
22166
+ }
22167
+ // 备用方案:使用模拟数据(用于开发测试)
22168
+ /**
22169
+ * @param {?} subQuery
22170
+ * @param {?} promptQuery
22171
+ * @return {?}
22172
+ */
22173
+ function getMockAIResponse(subQuery, promptQuery) {
22174
+ /** @type {?} */
22175
+ const mockResponses = {
22176
+ Rephrase: `Rephrased: ${promptQuery}`,
22177
+ Grammar: `Corrected: ${promptQuery}`,
22178
+ Summarize: `Summary: ${promptQuery.substring(0, 100)}...`,
22179
+ Elaborate: `Elaborated: ${promptQuery} with additional details and context.`,
22180
+ Translate: `Translated: ${promptQuery}`,
22181
+ SentimentAnalysis: '😊 Positive',
22182
+ };
22183
+ for (const [key, value] of Object.entries(mockResponses)) {
22184
+ if (subQuery.includes(key)) {
22185
+ return value;
22186
+ }
22187
+ }
22188
+ return `AI processed: ${promptQuery}`;
22189
+ }
22190
+ // 主要的AI请求方法
22191
+ /**
22192
+ * @param {?} subQuery
22193
+ * @param {?} promptQuery
22194
+ * @return {?}
22195
+ * @this {*}
22196
+ */
22197
+ function OpenAiModelRTE(subQuery, promptQuery) {
22198
+ return __awaiter(this, void 0, void 0, function* () {
22199
+ try {
22200
+ /** @type {?} */
22201
+ const config = getAIConfig();
22202
+ // 检查配置是否有效
22203
+ if (!isAIConfigValid(config)) {
22204
+ console.warn('AI configuration is incomplete or disabled, using mock response');
22205
+ return getMockAIResponse(subQuery, promptQuery);
22206
+ }
22207
+ /** @type {?} */
22208
+ const messages = [
22209
+ {
22210
+ role: 'system',
22211
+ content: subQuery.includes('emoji followed by the sentiment in the format')
22212
+ ? 'You are a helpful assistant. Please respond in string format.'
22213
+ : "NOTE: Return same html format just do changes content only. don't change html formats.",
22214
+ },
22215
+ {
22216
+ role: 'user',
22217
+ content: `${subQuery} ${promptQuery}`,
22218
+ },
22219
+ ];
22220
+ /** @type {?} */
22221
+ const result = yield sendAIRequest(messages, config);
22222
+ return result;
22223
+ }
22224
+ catch (error) {
22225
+ console.error('AI request failed, using mock response:', error);
22226
+ return getMockAIResponse(subQuery, promptQuery);
22227
+ }
22228
+ });
22229
+ }
22230
+ // 兼容性方法(保持向后兼容)
22231
+ /**
22232
+ * @param {?} options
22233
+ * @return {?}
22234
+ * @this {*}
22235
+ */
22236
+ function getAzureChatAIRequest(options) {
22237
+ return __awaiter(this, void 0, void 0, function* () {
22238
+ try {
22239
+ /** @type {?} */
22240
+ const config = getAIConfig();
22241
+ if (!isAIConfigValid(config)) {
22242
+ return null;
22243
+ }
22244
+ /** @type {?} */
22245
+ const result = yield sendAIRequest(options.messages, config);
22246
+ return result;
22247
+ }
22248
+ catch (err) {
22249
+ console.error('Error occurred:', err);
22250
+ return null;
22251
+ }
22252
+ });
22253
+ }
22254
+ /**
22255
+ * @param {?} prompt
22256
+ * @return {?}
22257
+ * @this {*}
22258
+ */
22259
+ function getAzureTextAIRequest(prompt) {
22260
+ return __awaiter(this, void 0, void 0, function* () {
22261
+ try {
22262
+ /** @type {?} */
22263
+ const config = getAIConfig();
22264
+ if (!isAIConfigValid(config)) {
22265
+ return undefined;
22266
+ }
22267
+ /** @type {?} */
22268
+ const messages = [
22269
+ {
22270
+ role: 'user',
22271
+ content: prompt,
22272
+ },
22273
+ ];
22274
+ /** @type {?} */
22275
+ const result = yield sendAIRequest(messages, config);
22276
+ return result;
22277
+ }
22278
+ catch (err) {
22279
+ console.error('Error occurred:', err);
22280
+ return undefined;
22281
+ }
22282
+ });
22283
+ }
22284
+
22285
+ /**
22286
+ * @fileoverview added by tsickle
22287
+ * Generated from: lib/form/richtexteditor/data-config.ts
22288
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22289
+ */
22290
+ // font family
22291
+ /** @type {?} */
22292
+ const fontFamily = {
22293
+ default: "Arial",
22294
+ items: [
22295
+ {
22296
+ text: "Arial",
22297
+ value: "Arial, Helvetica, sans-serif",
22298
+ cssClass: "e-arial",
22299
+ command: "Font",
22300
+ subCommand: "FontName",
22301
+ },
22302
+ {
22303
+ text: "Times New Roman",
22304
+ value: "Times New Roman,Times,serif",
22305
+ cssClass: "e-times-new-roman",
22306
+ command: "Font",
22307
+ subCommand: "FontName",
22308
+ },
22309
+ {
22310
+ text: "Helvetica",
22311
+ value: "Helvetica",
22312
+ cssClass: "e-helvetica",
22313
+ command: "Font",
22314
+ subCommand: "FontName",
22315
+ },
22316
+ {
22317
+ text: "Calibri",
22318
+ value: "Calibri, Helvetica, sans-serif",
22319
+ cssClass: "e-calibri",
22320
+ command: "Font",
22321
+ subCommand: "FontName",
22322
+ },
22323
+ {
22324
+ text: "Verdana",
22325
+ value: "Verdana,Geneva,sans-serif",
22326
+ cssClass: "e-verdana",
22327
+ command: "Font",
22328
+ subCommand: "FontName",
22329
+ },
22330
+ {
22331
+ text: "Georgia",
22332
+ value: "Georgia,serif",
22333
+ cssClass: "e-georgia",
22334
+ command: "Font",
22335
+ subCommand: "FontName",
22336
+ },
22337
+ {
22338
+ text: "Open Sans",
22339
+ value: "Open Sans, sans-serif",
22340
+ cssClass: "e-open-sans",
22341
+ command: "Font",
22342
+ subCommand: "FontName",
22343
+ },
22344
+ {
22345
+ text: "Roboto",
22346
+ value: "Roboto",
22347
+ cssClass: "e-roboto",
22348
+ command: "Font",
22349
+ subCommand: "FontName",
22350
+ },
22351
+ {
22352
+ text: "Lato",
22353
+ value: "Lato, sans-serif",
22354
+ cssClass: "e-lato",
22355
+ command: "Font",
22356
+ subCommand: "FontName",
22357
+ },
22358
+ {
22359
+ text: "Montserrat",
22360
+ value: "Montserrat, sans-serif",
22361
+ cssClass: "e-montserrat",
22362
+ command: "Font",
22363
+ subCommand: "FontName",
22364
+ },
22365
+ {
22366
+ text: "Segoe UI",
22367
+ value: "Segoe UI",
22368
+ cssClass: "e-segoe-ui",
22369
+ command: "Font",
22370
+ subCommand: "FontName",
22371
+ },
22372
+ {
22373
+ text: "Impact",
22374
+ value: "Impact,Charcoal,sans-serif",
22375
+ cssClass: "e-impact",
22376
+ command: "Font",
22377
+ subCommand: "FontName",
22378
+ },
22379
+ ],
22380
+ };
22381
+ // line height配置
22382
+ /** @type {?} */
22383
+ const lineHeight_items = [
22384
+ {
22385
+ text: "1.0",
22386
+ },
22387
+ {
22388
+ text: "1.15",
22389
+ },
22390
+ {
22391
+ text: "1.5",
22392
+ },
22393
+ {
22394
+ text: "2.0",
22395
+ },
22396
+ {
22397
+ text: "2.5",
22398
+ },
22399
+ {
22400
+ text: "3.0",
22401
+ },
22402
+ ];
22403
+ /**
22404
+ * @record
22405
+ */
22406
+ function BulletStyle() { }
22407
+ if (false) {
22408
+ /** @type {?} */
22409
+ BulletStyle.prototype.id;
22410
+ /** @type {?} */
22411
+ BulletStyle.prototype.text;
22412
+ /** @type {?} */
22413
+ BulletStyle.prototype.symbol;
22414
+ /** @type {?} */
22415
+ BulletStyle.prototype.iconCss;
22416
+ /** @type {?} */
22417
+ BulletStyle.prototype.description;
22418
+ }
22419
+ /** @type {?} */
22420
+ const BULLET_STYLES = [
22421
+ {
22422
+ id: "disc",
22423
+ text: "● 实心圆点",
22424
+ symbol: "●",
22425
+ iconCss: "e-icons e-bullet-disc",
22426
+ description: "标准实心圆点",
22427
+ },
22428
+ {
22429
+ id: "circle",
22430
+ text: "○ 空心圆点",
22431
+ symbol: "○",
22432
+ iconCss: "e-icons e-bullet-circle",
22433
+ description: "空心圆点",
22434
+ },
22435
+ {
22436
+ id: "square",
22437
+ text: "■ 实心方块",
22438
+ symbol: "■",
22439
+ iconCss: "e-icons e-bullet-square",
22440
+ description: "实心方块",
22441
+ },
22442
+ {
22443
+ id: "diamond",
22444
+ text: "◆ 实心菱形",
22445
+ symbol: "◆",
22446
+ iconCss: "e-icons e-bullet-diamond",
22447
+ description: "实心菱形",
22448
+ },
22449
+ {
22450
+ id: "triangle",
22451
+ text: "► 实心三角",
22452
+ symbol: "►",
22453
+ iconCss: "e-icons e-bullet-triangle",
22454
+ description: "实心三角形",
22455
+ },
22456
+ {
22457
+ id: "arrow",
22458
+ text: "➤ 箭头",
22459
+ symbol: "➤",
22460
+ iconCss: "e-icons e-bullet-arrow",
22461
+ description: "箭头符号",
22462
+ },
22463
+ {
22464
+ id: "star",
22465
+ text: "★ 星形",
22466
+ symbol: "★",
22467
+ iconCss: "e-icons e-bullet-star",
22468
+ description: "星形符号",
22469
+ },
22470
+ {
22471
+ id: "check",
22472
+ text: "✓ 对勾",
22473
+ symbol: "✓",
22474
+ iconCss: "e-icons e-bullet-check",
22475
+ description: "对勾符号",
22476
+ },
22477
+ {
22478
+ id: "heart",
22479
+ text: "♥ 心形",
22480
+ symbol: "♥",
22481
+ iconCss: "e-icons e-bullet-heart",
22482
+ description: "心形符号",
22483
+ },
22484
+ {
22485
+ id: "bullet",
22486
+ text: "• 小圆点",
22487
+ symbol: "•",
22488
+ iconCss: "e-icons e-bullet-bullet",
22489
+ description: "小圆点",
22490
+ },
22491
+ ];
22492
+ // 获取符号样式
22493
+ /**
22494
+ * @param {?} id
22495
+ * @return {?}
22496
+ */
22497
+ function getBulletStyle(id) {
22498
+ return BULLET_STYLES.find((/**
22499
+ * @param {?} style
22500
+ * @return {?}
22501
+ */
22502
+ (style) => style.id === id));
22503
+ }
22504
+ // 获取所有符号样式
22505
+ /**
22506
+ * @return {?}
22507
+ */
22508
+ function getAllBulletStyles() {
22509
+ return BULLET_STYLES;
22510
+ }
22511
+ // 应用符号样式到列表
22512
+ /**
22513
+ * @param {?} ul
22514
+ * @param {?} style
22515
+ * @return {?}
22516
+ */
22517
+ function applyBulletStyle(ul, style) {
22518
+ if (style.id === "disc" || style.id === "circle" || style.id === "square") {
22519
+ // 使用CSS list-style-type
22520
+ ul.style.listStyleType = style.id;
22521
+ // 移除自定义符号
22522
+ ul.querySelectorAll(".custom-bullet").forEach((/**
22523
+ * @param {?} bullet
22524
+ * @return {?}
22525
+ */
22526
+ (bullet) => bullet.remove()));
22527
+ }
22528
+ else {
22529
+ // 使用自定义符号
22530
+ ul.style.listStyleType = "none";
22531
+ ul.setAttribute("data-bullet-style", style.id);
22532
+ /** @type {?} */
22533
+ const listItems = ul.querySelectorAll("li");
22534
+ listItems.forEach((/**
22535
+ * @param {?} li
22536
+ * @return {?}
22537
+ */
22538
+ (li) => {
22539
+ // 移除现有的自定义符号
22540
+ /** @type {?} */
22541
+ const existingBullet = li.querySelector(".custom-bullet");
22542
+ if (existingBullet) {
22543
+ existingBullet.remove();
22544
+ }
22545
+ // 添加新的自定义符号
22546
+ /** @type {?} */
22547
+ const bullet = document.createElement("span");
22548
+ bullet.className = "custom-bullet";
22549
+ bullet.textContent = style.symbol;
22550
+ bullet.style.marginRight = "8px";
22551
+ bullet.style.color = "#666";
22552
+ // 将符号插入到列表项的开头
22553
+ li.insertBefore(bullet, li.firstChild);
22554
+ }));
22555
+ }
22556
+ }
22557
+
22558
+ /**
22559
+ * @fileoverview added by tsickle
22560
+ * Generated from: lib/form/richtexteditor/index.component.ts
22561
+ * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22562
+ */
22563
+ class RichtexteditorComponent {
22564
+ /**
22565
+ * @param {?} ref
22566
+ */
22567
+ constructor(ref) {
22568
+ this.ref = ref;
22569
+ // @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
22570
+ this.placeholder = "";
22571
+ this.value = "";
22572
+ this.height = 150;
22573
+ this.autoSaveOnIdle = true;
22574
+ this.target = "#container"; // dialog 弹窗父级
22575
+ // dialog 弹窗父级
22576
+ this.toolbarClick = new EventEmitter();
22577
+ this.change = new EventEmitter();
22578
+ // @Output() change = new EventEmitter();
22579
+ this.family = fontFamily;
22580
+ this.dialogWidth = "800px";
22581
+ this.dialogHeight = "642px";
22582
+ this.showZoomBtn = true;
22583
+ this.showMsg = false;
22584
+ this.insertImageSettings = {
22585
+ saveFormat: "Blob",
22586
+ allowedTypes: [".svg", ".png"],
22587
+ display: "none",
22588
+ };
22589
+ this.size = "";
22590
+ this.dropValIndex = 0;
22591
+ this.queryList = [
22592
+ { id: "Rephrase", text: "Rephrase" },
22593
+ { id: "Grammar", text: "Correct Grammar" },
22594
+ { id: "Summarize", text: "Summarize" },
22595
+ { id: "Elaborate", text: "Elaborate" },
22596
+ { id: "Translate", text: "Translate" },
22597
+ { id: "SentimentAnalysis", text: "Sentiment Analysis" },
22598
+ ];
22599
+ this.rephraseTyleList = [
22600
+ { text: "Standard", id: "Standard" },
22601
+ { text: "Fluent", id: "Fluent" },
22602
+ { text: "Professional", id: "Professional" },
22603
+ ];
22604
+ this.languageList = [
22605
+ { id: "EN", text: "English" },
22606
+ { id: "ZH", text: "Chinese (Simplified)" },
22607
+ { id: "ES", text: "Spanish" },
22608
+ { id: "ZHT", text: "Chinese (Traditional)" },
22609
+ { id: "HI", text: "Hindi" },
22610
+ { id: "AR", text: "Arabic" },
22611
+ { id: "BN", text: "Bengali" },
22612
+ { id: "PT", text: "Portuguese" },
22613
+ { id: "RU", text: "Russian" },
22614
+ { id: "JA", text: "Japanese" },
22615
+ { id: "DE", text: "German" },
22616
+ { id: "KO", text: "Korean" },
22617
+ { id: "FR", text: "French" },
22618
+ { id: "IT", text: "Italian" },
22619
+ { id: "TR", text: "Turkish" },
22620
+ ];
22621
+ this.promptQuery = "";
22622
+ this.isSentimentCheck = false;
22623
+ this.subQuery = "";
22624
+ this.chipValue = "Standard";
22625
+ this.tools = {
22626
+ enableFloating: false,
22627
+ items: [
22628
+ {
22629
+ tooltipText: "AI Assist",
22630
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="ai_assistant_button_tbar" style="width:100%"><div class="e-rte-dropdown-btn-text">AI Assist</div></button>',
22631
+ },
22632
+ "Bold",
22633
+ "Italic",
22634
+ "Underline",
22635
+ "StrikeThrough",
22636
+ "FontName",
22637
+ "FontSize",
22638
+ "FontColor",
22639
+ "BackgroundColor",
22640
+ "LowerCase",
22641
+ "UpperCase",
22642
+ "|",
22643
+ "CreateTable",
22644
+ "Formats",
22645
+ "Alignments",
22646
+ {
22647
+ tooltipText: "Line Height",
22648
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
22649
+ },
22650
+ "OrderedList",
22651
+ "UnorderedList",
22652
+ "Outdent",
22653
+ "Indent",
22654
+ "|",
22655
+ "CreateLink",
22656
+ {
22657
+ tooltipText: "",
22658
+ template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
22659
+ '<div class="e-tbar-btn-text" style="font-weight: 500;"><img src="/assets/img/file-icon.svg" style="position: relative;top: -2px;"/><div class="uploadActions"><div id="uploadFromUser">Computer File</div><div id="relationDom">Ticket Attachment</div></div></div></button>',
22660
+ },
22661
+ "|",
22662
+ "FormatPainter",
22663
+ "ClearFormat",
22664
+ "|",
22665
+ "Undo",
22666
+ "Redo",
22667
+ ],
22668
+ };
22669
+ }
22670
+ /**
22671
+ * @return {?}
22672
+ */
22673
+ ngOnInit() { }
22674
+ /**
22675
+ * @param {?} args
22676
+ * @return {?}
22677
+ */
22678
+ onContentChange(args) {
22679
+ /** @type {?} */
22680
+ const tables = document.querySelectorAll("table.e-rte-table");
22681
+ tables.forEach((/**
22682
+ * @param {?} table
22683
+ * @return {?}
22684
+ */
22685
+ (table) => {
22686
+ /** @type {?} */
22687
+ const htmlTable = (/** @type {?} */ (table));
22688
+ htmlTable.style.marginBottom = "10px";
22689
+ htmlTable.style.borderCollapse = "collapse";
22690
+ htmlTable.style.emptyCells = "show";
22691
+ /** @type {?} */
22692
+ const tdElements = table.querySelectorAll("td");
22693
+ tdElements.forEach((/**
22694
+ * @param {?} td
22695
+ * @return {?}
22696
+ */
22697
+ (td) => {
22698
+ td.style.border = "1px solid #adb5bd";
22699
+ td.style.height = "20px";
22700
+ td.style.minWidth = "20px";
22701
+ td.style.padding = "2px 5px";
22702
+ td.style.boxSizing = "border-box";
22703
+ }));
22704
+ }));
22705
+ this.change.emit(args);
22706
+ }
22707
+ /**
22708
+ * @return {?}
22709
+ */
22710
+ onCreate() {
22711
+ //bind the a click event
22712
+ // let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
22713
+ // editorContent.addEventListener('click', this.OnClicked.bind(this));
22714
+ //add the line height
22715
+ this.editorManager = this.rteObj.formatter.editorManager;
22716
+ /** @type {?} */
22717
+ let splitButton = new DropDownButton({
22718
+ items: lineHeight_items,
22719
+ iconCss: "e-icons e-line-spacing",
22720
+ select: this.onSelect.bind(this),
22721
+ });
22722
+ splitButton.appendTo("#lineheight_tbar");
22723
+ // ai assist
22724
+ /** @type {?} */
22725
+ let aiassistantButton = new DropDownButton({
22726
+ items: this.queryList,
22727
+ // iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
22728
+ select: (/**
22729
+ * @param {?} args
22730
+ * @return {?}
22731
+ */
22732
+ (args) => this.aiQuerySelectedMenu(args)),
22733
+ });
22734
+ aiassistantButton.appendTo("#ai_assistant_button_tbar");
22735
+ }
22736
+ /**
22737
+ * @private
22738
+ * @param {?} args
22739
+ * @return {?}
22740
+ */
22741
+ onSelect(args) {
22742
+ if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
22743
+ this.rteObj.formatter.saveData();
22744
+ }
22745
+ /** @type {?} */
22746
+ let nodes = this.editorManager.domNode.blockNodes();
22747
+ for (let i = 0; nodes.length > i; i++) {
22748
+ ((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
22749
+ }
22750
+ this.rteObj.formatter.saveData();
22751
+ this.rteObj.formatter.enableUndo(this.rteObj);
22752
+ }
22753
+ /**
22754
+ * @private
22755
+ * @param {?} args
22756
+ * @return {?}
22757
+ */
22758
+ aiQuerySelectedMenu(args) {
22759
+ this.dialogueOpen(args.item.text);
22760
+ }
22761
+ /**
22762
+ * @param {?} selectedQuery
22763
+ * @return {?}
22764
+ */
22765
+ dialogueOpen(selectedQuery) {
22766
+ /** @type {?} */
22767
+ var selectionText = this.rteObj.getSelectedHtml();
22768
+ this.selectedQuery = selectedQuery;
22769
+ if (selectionText) {
22770
+ /** @type {?} */
22771
+ let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22772
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22773
+ this.dropValIndex = this.queryList.findIndex((/**
22774
+ * @param {?} q
22775
+ * @return {?}
22776
+ */
22777
+ (q) => q.text.toLowerCase() === selectedQuery.toLowerCase()));
22778
+ this.queryCategory.index = this.dropValIndex;
22779
+ this.leftRte.value = this.promptQuery = selectionText;
22780
+ this.leftRte.refreshUI();
22781
+ this.AIdialog.show();
22782
+ this.updateAISugesstionsData(selectedQuery);
22783
+ }
22784
+ else {
22785
+ this.showMsg = true;
22786
+ setTimeout((/**
22787
+ * @return {?}
22788
+ */
22789
+ () => {
22790
+ this.showMsg = false;
22791
+ }), 3000);
22792
+ console.log("Please select the content to perform the AI operation.");
22793
+ }
22794
+ }
22795
+ /**
22796
+ * @param {?} selectedQuery
22797
+ * @return {?}
22798
+ */
22799
+ updateAISugesstionsData(selectedQuery) {
22800
+ this.isSentimentCheck = false;
22801
+ switch (selectedQuery) {
22802
+ case "Summarize":
22803
+ this.subQuery = "Summarize the upcoming sentence shortly.";
22804
+ break;
22805
+ case "Elaborate":
22806
+ this.subQuery = "Elaborate on the upcoming sentence.";
22807
+ break;
22808
+ case "Rephrase":
22809
+ this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
22810
+ break;
22811
+ case "Correct Grammar":
22812
+ this.subQuery = "Correct the grammar of the upcoming sentence.";
22813
+ break;
22814
+ case "Translate":
22815
+ this.subQuery =
22816
+ "Translate the upcoming sentence to " + this.translatelanguage + ".";
22817
+ break;
22818
+ case "Sentiment Analysis":
22819
+ this.isSentimentCheck = true;
22820
+ this.subQuery =
22821
+ 'Analyze the sentiment and grammar of the following paragraphs and provide the expression score with an emoji followed by the sentiment in the format: "😊 Neutral". \n\nNOTE: Avoid any additional text or explanation:';
22822
+ break;
22823
+ }
22824
+ this.updateAISugesstions();
22825
+ }
22826
+ /**
22827
+ * @return {?}
22828
+ */
22829
+ updateAISugesstions() {
22830
+ try {
22831
+ if (this.promptQuery) {
22832
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
22833
+ "";
22834
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
22835
+ "none";
22836
+ this.sentimentButton.element.style.display = "none";
22837
+ this.regenerateButton.disabled = true;
22838
+ this.copyButton.disabled = true;
22839
+ this.replaceButton.disabled = true;
22840
+ this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
22841
+ this.apiResultData.then((/**
22842
+ * @param {?} result
22843
+ * @return {?}
22844
+ */
22845
+ (result) => {
22846
+ this.AIResult = this.isSentimentCheck ? this.promptQuery : result;
22847
+ this.sentimentButton.content = result
22848
+ .toLowerCase()
22849
+ .includes("positive")
22850
+ ? "😊 Positive"
22851
+ : result.toLowerCase().includes("negative")
22852
+ ? "😞 Negative"
22853
+ : "😐 Neutral";
22854
+ this.sentimentButton.element.style.display = !this.isSentimentCheck
22855
+ ? "none"
22856
+ : "";
22857
+ this.rightRte.value = this.AIResult;
22858
+ /** @type {?} */
22859
+ var noResultsFound = !(this.AIResult || this.promptQuery);
22860
+ ((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
22861
+ this.regenerateButton.disabled = noResultsFound;
22862
+ this.copyButton.disabled = noResultsFound;
22863
+ this.replaceButton.disabled = noResultsFound;
22864
+ ((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
22865
+ "none";
22866
+ ((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
22867
+ noResultsFound ? "none" : "";
22868
+ console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
22869
+ // this.ref.markForCheck();
22870
+ }));
22871
+ }
22872
+ }
22873
+ catch (_a) {
22874
+ // this.toastObj.show();
22875
+ }
22876
+ }
22877
+ /**
22878
+ * @param {?} subQuery
22879
+ * @param {?} promptQuery
22880
+ * @return {?}
22881
+ */
22882
+ getResponseFromOpenAI(subQuery, promptQuery) {
22883
+ return __awaiter(this, void 0, void 0, function* () {
22884
+ /** @type {?} */
22885
+ const content = yield OpenAiModelRTE(subQuery, promptQuery);
22886
+ return content ? ((/** @type {?} */ (content))) : "";
22887
+ });
22888
+ }
22889
+ /**
22890
+ * @return {?}
22891
+ */
22892
+ dialogShow() {
22893
+ (/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
22894
+ * @return {?}
22895
+ */
22896
+ () => {
22897
+ this.updateAISugesstions();
22898
+ }));
22899
+ (/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
22900
+ * @return {?}
22901
+ */
22902
+ () => {
22903
+ this.copyTextToClipboard(this.AIResult);
22904
+ }));
22905
+ (/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
22906
+ * @return {?}
22907
+ */
22908
+ () => {
22909
+ /** @type {?} */
22910
+ let range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
22911
+ ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
22912
+ ((/** @type {?} */ (this.rteObj))).executeCommand("insertHTML", this.AIResult, {
22913
+ undo: true,
22914
+ });
22915
+ this.closeDialog();
22916
+ }));
22917
+ ((/** @type {?} */ (this.AIdialog))).element.style.display = "";
22918
+ }
22919
+ /**
22920
+ * @return {?}
22921
+ */
22922
+ closeDialog() {
22923
+ this.AIdialog.hide();
22924
+ this.rightRte.value = "";
22925
+ this.leftRte.value = "";
22926
+ this.promptQuery = "";
22927
+ this.chipValue = "Standard";
22928
+ this.AIResult = "";
22929
+ this.dropValIndex = 0;
22930
+ this.selectedQuery = "Rephrase";
22931
+ this.sentimentButton.content = "😊 Neutral";
22932
+ }
22933
+ /**
22934
+ * @param {?} text
22935
+ * @return {?}
22936
+ */
22937
+ copyTextToClipboard(text) {
22938
+ if (navigator.clipboard) {
22939
+ navigator.clipboard
22940
+ .writeText(text)
22941
+ .then((/**
22942
+ * @return {?}
22943
+ */
22944
+ () => {
22945
+ console.log("Text copied to clipboard successfully!");
22946
+ }))
22947
+ .catch((/**
22948
+ * @param {?} err
22949
+ * @return {?}
22950
+ */
22951
+ (err) => {
22952
+ console.error("Failed to copy text: ", err);
22953
+ }));
22954
+ }
22955
+ else {
22956
+ // Fallback for browsers that do not support the Clipboard API
22957
+ /** @type {?} */
22958
+ const textarea = document.createElement("textarea");
22959
+ textarea.value = text;
22960
+ document.body.appendChild(textarea);
22961
+ textarea.select();
22962
+ try {
22963
+ document.execCommand("copy");
22964
+ console.log("Text copied to clipboard using execCommand");
22965
+ }
22966
+ catch (err) {
22967
+ console.error("Failed to copy text: ", err);
22968
+ }
22969
+ finally {
22970
+ document.body.removeChild(textarea);
22971
+ }
22972
+ }
22973
+ }
22974
+ /**
22975
+ * @return {?}
22976
+ */
22977
+ onOverlayClick() {
22978
+ /** @type {?} */
22979
+ let activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
22980
+ if (activeEle) {
22981
+ activeEle.classList.remove("e-active");
22982
+ }
22983
+ this.closeDialog();
22984
+ }
22985
+ /**
22986
+ * @param {?} args
22987
+ * @return {?}
22988
+ */
22989
+ onQuerySelect(args) {
22990
+ // this.chipList.selectedChips = 0;
22991
+ this.translatelanguage = "EN";
22992
+ this.selectedQuery = args.itemData.text;
22993
+ this.updateAISugesstionsData(args.itemData.text);
22994
+ }
22995
+ /**
22996
+ * @param {?} args
22997
+ * @return {?}
22998
+ */
22999
+ onLanguageSelect(args) {
23000
+ this.translatelanguage = args.itemData.id;
23001
+ this.updateAISugesstionsData("Translate");
23002
+ }
23003
+ /**
23004
+ * @param {?} args
23005
+ * @return {?}
23006
+ */
23007
+ onChipClick(args) {
23008
+ this.chipValue = args.itemData.text;
23009
+ // 事件会触发两次 必须判断args.text是否有值
23010
+ if (args.itemData.text)
23011
+ this.updateAISugesstionsData("Rephrase");
23012
+ }
23013
+ /**
23014
+ * @param {?} args
23015
+ * @return {?}
23016
+ */
23017
+ _toolbarClick(args) {
23018
+ this.toolbarClick.emit(args);
23019
+ }
23020
+ /**
23021
+ * @return {?}
23022
+ */
23023
+ hideToast() {
23024
+ this.showMsg = false;
23025
+ }
23026
+ /**
23027
+ * @return {?}
23028
+ */
23029
+ onZoom() {
23030
+ if (this.size === "largest") {
23031
+ this.size = ""; // 恢复到原始大小
23032
+ }
23033
+ else {
23034
+ this.size = "largest"; // 设置为最大化
23035
+ }
23036
+ }
23037
+ }
23038
+ RichtexteditorComponent.decorators = [
23039
+ { type: Component, args: [{
23040
+ selector: "rs-richtext-editor",
23041
+ template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n id=\"editor\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [fontFamily]=\"family\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n <ejs-dialog\r\n #AIdialog\r\n id=\"AIdialog\"\r\n [ngClass]=\"size\"\r\n [visible]=\"false\"\r\n [target]=\"target\"\r\n [isModal]=\"true\"\r\n [height]=\"dialogHeight\"\r\n [width]=\"dialogWidth\"\r\n maxHeight=\"80%\"\r\n cssClass=\"e-rte-elements custom-dialog-rte\"\r\n zIndex=\"1000\"\r\n (close)=\"closeDialog()\"\r\n (overlayClick)=\"onOverlayClick()\"\r\n (open)=\"dialogShow()\"\r\n >\r\n <ng-template #header>\r\n <div class=\"header-title\">AI Assist</div>\r\n <div class=\"header-buttons\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-zoom\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div class=\"header-btn\" (click)=\"closeDialog()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #footerTemplate>\r\n <div id=\"dialog-footer-content\">\r\n <div class=\"custom-row-0\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"width: 100%; align-items: center; justify-content: left\"\r\n ></div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n flex-direction: column;\r\n justify-content: center;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: right; width: 100%\">\r\n <button\r\n ejs-button\r\n #sentimentButton\r\n content=\"\uD83D\uDE0A Neutral\"\r\n disabled=\"false\"\r\n cssClass=\"sentiment\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #copyButton\r\n content=\"Copy\"\r\n disabled=\"false\"\r\n class=\"copy-btn\"\r\n ></button>\r\n <button\r\n ejs-button\r\n #replaceButton\r\n content=\"Replace\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n <ng-template #content>\r\n <div class=\"dialog-content\" style=\"height: 100%\">\r\n <div class=\"custom-row-0\">\r\n <div class=\"cuscol-0\" style=\"width: 100%\">\r\n <ejs-dropdownlist\r\n #queryCategory\r\n style=\"width: 200px\"\r\n id=\"queryCategory\"\r\n [dataSource]=\"queryList\"\r\n index=\"0\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onQuerySelect($event)\"\r\n >\r\n Rephrase\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Rephrase'\"\r\n id=\"chips-container\"\r\n #chipList\r\n style=\"width: 160px\"\r\n [(ngModel)]=\"chipValue\"\r\n [dataSource]=\"rephraseTyleList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onChipClick($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n <ejs-dropdownlist\r\n *ngIf=\"selectedQuery == 'Translate'\"\r\n #languageCategory\r\n index=\"0\"\r\n id=\"language-Category\"\r\n [dataSource]=\"languageList\"\r\n [fields]=\"{ text: 'text', value: 'id' }\"\r\n (select)=\"onLanguageSelect($event)\"\r\n >\r\n </ejs-dropdownlist>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n justify-content: space-between;\r\n align-items: center;\r\n width: 100%;\r\n \"\r\n >\r\n <!-- <ejs-chiplist\r\n id=\"chips-container\"\r\n #chipList\r\n [chips]=\"['Standard', 'Fluent', 'Professional']\"\r\n selection=\"Single\"\r\n cssClass=\"e-outline\"\r\n [selectedChips]=\"[0]\"\r\n (click)=\"onChipClick($event)\"\r\n >\r\n </ejs-chiplist> -->\r\n <button\r\n ejs-button\r\n #regenerateButton\r\n content=\"Regenerate\"\r\n isPrimary=\"true\"\r\n disabled=\"false\"\r\n ></button>\r\n </div>\r\n </div>\r\n <div class=\"custom-row-1\" style=\"height: calc(100% - 40px)\">\r\n <div\r\n class=\"cuscol-0\"\r\n style=\"\r\n width: 100%;\r\n height: 100%;\r\n align-items: center;\r\n justify-content: left;\r\n \"\r\n >\r\n <div style=\"text-align: left; height: 100%\">\r\n <ejs-richtexteditor\r\n #leftRte\r\n id=\"leftRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n </ejs-richtexteditor>\r\n </div>\r\n </div>\r\n <div\r\n class=\"cuscol-1\"\r\n style=\"\r\n display: flex;\r\n justify-content: space-between;\r\n width: 100%;\r\n height: 100%;\r\n \"\r\n >\r\n <div style=\"text-align: left; width: 100%; height: 100%\">\r\n <ejs-richtexteditor\r\n #rightRte\r\n id=\"rightRte\"\r\n height=\"100%\"\r\n [toolbarSettings]=\"{ enable: false }\"\r\n placeholder=\"Analysis of AI Support\"\r\n cssClass=\"e-outline\"\r\n >\r\n <!-- style=\"display: none\" -->\r\n </ejs-richtexteditor>\r\n <div\r\n class=\"no-results-found\"\r\n id=\"no-results-found\"\r\n style=\"display: none; height: 244px; align-content: center\"\r\n >\r\n <img\r\n height=\"50\"\r\n width=\"50\"\r\n src=\"https://storage.googleapis.com/cdn-bolddesk/agent-angular-app/images/light/no-records-warning.svg\"\r\n />\r\n <div>No results found</div>\r\n </div>\r\n <div id=\"skeletonId\" style=\"display: none\">\r\n <ejs-skeleton\r\n #skeletonId1\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"100%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId2\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"90%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId3\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"70%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId4\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"50%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId5\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"30%\"\r\n ></ejs-skeleton\r\n ><br />\r\n <ejs-skeleton\r\n #skeletonId6\r\n shape=\"Rectangle\"\r\n height=\"20px\"\r\n width=\"10%\"\r\n ></ejs-skeleton\r\n ><br />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-template>\r\n </ejs-dialog>\r\n <div class=\"toast\" *ngIf=\"showMsg\">\r\n <span class=\"toast_text\">First, Select some text</span\r\n ><span class=\"close_icon\" (click)=\"hideToast()\"></span>\r\n </div>\r\n</div>\r\n",
23042
+ styles: [".editor_box{position:relative;width:100%;height:100%}.editor_box .toast{position:absolute;left:35%;top:110px;z-index:1;width:400px;border-radius:4px;border:1px solid #e8f2ff;background:#f4f8ff;padding:4px 12px;color:#1f3f5c;font-size:12px;font-style:normal;font-weight:400;height:32px;font-family:Arial;display:flex;align-items:center;justify-content:space-between}.editor_box .toast .toast_text::before{content:url(../../assets/img/info.svg);display:inline-block;width:16px;height:16px;vertical-align:bottom;margin-right:8px}.editor_box .toast .close_icon{background-image:url(../../assets/img/notification-close.svg);cursor:pointer;display:inline-block;width:16px;height:16px}.custom-dialog-rte{padding:0 20px;border-radius:10px}.custom-row-0,.custom-row-1,.custom-row-2{display:flex;align-items:center;padding:12px 24px}.e-rte-dropdown-btn-text{padding-left:4px}.no-results-found{text-align:center}.no-results-found img{display:block;margin:0 auto}.e-custom{margin-right:.5rem;border-radius:25px!important}.custom-dialog-rte .skeleton-rectangle{border-radius:4px}@media (max-width:767px){.cuscol-0,.cuscol-1,.cuscol-2{justify-content:center!important}.custom-row-0,.custom-row-1,.custom-row-2{flex-direction:column!important}.cuscol-1{border-right:none!important}.cuscol-0{width:100%;align-items:center}::ng-deep:host .e-dialog{max-height:80%!important}.custom-dialog-rte .e-dialog .e-dlg-content{overflow-y:auto!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor{height:100px!important}.cuscol-noresult{padding-bottom:20px!important}.e-chip-list{padding:5px!important}.cuscol{padding-right:.2rem!important;width:auto!important}.custom-row-1{height:auto!important}}.cuscol-1{display:flex;flex-direction:row!important}.cuscol-2{display:flex;flex-direction:column!important}.sentiment{color:#000!important}.custom-dialog-rte .e-dialog .e-dlg-content{padding:0!important;overflow-y:hidden}.custom-dialog-rte .e-dialog .e-dlg-header-content{padding:20px 0!important;border:0!important}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header{display:flex;align-items:center;line-height:18px;justify-content:space-between}.custom-dialog-rte .e-dialog .e-dlg-header-content .e-dlg-header .header-title{font-family:Arial;font-size:15px;font-weight:700;font-style:normal}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons{display:flex}.custom-dialog-rte .e-dialog .e-dlg-header-content .header-buttons img{width:16px;height:16px;cursor:pointer;padding:2px;margin-left:12px}.custom-dialog-rte .e-dialog .e-footer-content{padding:0!important}.custom-dialog-rte .e-dialog .e-dlg-content .e-richtexteditor.e-rte-tb-expand .e-rte-content,.e-richtexteditor.e-rte-tb-expand .e-source-content{border:0;border-bottom:1px solid #dee2e6;border-top:0 solid #dee2e6!important}.custom-dialog-rte .dialog-content .custom-row-0{border-top:0 solid #ddd!important;padding:0;margin-bottom:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-0{justify-content:left;border-right:none!important;padding:0;display:flex;gap:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1{padding:0;margin-left:12px}.custom-dialog-rte .dialog-content .custom-row-0 .cuscol-1 .e-primary{color:#44566c;border-radius:4px;border:1px solid #dbe1e7;background:#fff;width:87px;margin:0;padding:2px 12px;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;height:28px}.custom-dialog-rte .dialog-content .custom-row-1{padding:0;height:calc(100% - 40px);gap:12px}.custom-dialog-rte .e-footer-content{border:0}.custom-dialog-rte .e-footer-content .custom-row-0{padding:20px 0}.custom-dialog-rte .e-footer-content .e-control.e-btn{font-family:Arial;font-size:12px;line-height:14px;padding:2px 12px;height:28px;background:#fff;color:#44566c}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn{border-color:#dbe1e7}.custom-dialog-rte .e-footer-content .e-control.e-btn.copy-btn::before{content:url(../../assets/img/editor-copy.svg);vertical-align:middle;margin-right:6px}.custom-dialog-rte .e-footer-content .e-control.e-btn.e-primary{color:#fff;background:#1364b3}.editor_box .e-dialog.largest{width:96vw!important;height:88vh!important;max-height:88vh;max-width:2100px}"]
23043
+ }] }
23044
+ ];
23045
+ /** @nocollapse */
23046
+ RichtexteditorComponent.ctorParameters = () => [
23047
+ { type: ChangeDetectorRef }
23048
+ ];
23049
+ RichtexteditorComponent.propDecorators = {
23050
+ rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
23051
+ queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
23052
+ leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
23053
+ rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
23054
+ AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
23055
+ sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
23056
+ regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
23057
+ copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
23058
+ replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
23059
+ placeholder: [{ type: Input }],
23060
+ value: [{ type: Input }],
23061
+ height: [{ type: Input }],
23062
+ autoSaveOnIdle: [{ type: Input }],
23063
+ target: [{ type: Input }],
23064
+ toolbarClick: [{ type: Output }],
23065
+ change: [{ type: Output }]
23066
+ };
23067
+ if (false) {
23068
+ /** @type {?} */
23069
+ RichtexteditorComponent.prototype.rteObj;
23070
+ /** @type {?} */
23071
+ RichtexteditorComponent.prototype.queryCategory;
23072
+ /** @type {?} */
23073
+ RichtexteditorComponent.prototype.leftRte;
23074
+ /** @type {?} */
23075
+ RichtexteditorComponent.prototype.rightRte;
23076
+ /** @type {?} */
23077
+ RichtexteditorComponent.prototype.AIdialog;
23078
+ /** @type {?} */
23079
+ RichtexteditorComponent.prototype.sentimentButton;
23080
+ /** @type {?} */
23081
+ RichtexteditorComponent.prototype.regenerateButton;
23082
+ /** @type {?} */
23083
+ RichtexteditorComponent.prototype.copyButton;
23084
+ /** @type {?} */
23085
+ RichtexteditorComponent.prototype.replaceButton;
23086
+ /** @type {?} */
23087
+ RichtexteditorComponent.prototype.placeholder;
23088
+ /** @type {?} */
23089
+ RichtexteditorComponent.prototype.value;
23090
+ /** @type {?} */
23091
+ RichtexteditorComponent.prototype.height;
23092
+ /** @type {?} */
23093
+ RichtexteditorComponent.prototype.autoSaveOnIdle;
23094
+ /** @type {?} */
23095
+ RichtexteditorComponent.prototype.target;
23096
+ /** @type {?} */
23097
+ RichtexteditorComponent.prototype.toolbarClick;
23098
+ /** @type {?} */
23099
+ RichtexteditorComponent.prototype.change;
23100
+ /** @type {?} */
23101
+ RichtexteditorComponent.prototype.family;
23102
+ /** @type {?} */
23103
+ RichtexteditorComponent.prototype.dialogWidth;
23104
+ /** @type {?} */
23105
+ RichtexteditorComponent.prototype.dialogHeight;
23106
+ /** @type {?} */
23107
+ RichtexteditorComponent.prototype.showZoomBtn;
23108
+ /** @type {?} */
23109
+ RichtexteditorComponent.prototype.showMsg;
23110
+ /** @type {?} */
23111
+ RichtexteditorComponent.prototype.insertImageSettings;
23112
+ /** @type {?} */
23113
+ RichtexteditorComponent.prototype.editorManager;
23114
+ /** @type {?} */
23115
+ RichtexteditorComponent.prototype.size;
23116
+ /** @type {?} */
23117
+ RichtexteditorComponent.prototype.selectedQuery;
23118
+ /** @type {?} */
23119
+ RichtexteditorComponent.prototype.dropValIndex;
23120
+ /** @type {?} */
23121
+ RichtexteditorComponent.prototype.queryList;
23122
+ /** @type {?} */
23123
+ RichtexteditorComponent.prototype.rephraseTyleList;
23124
+ /** @type {?} */
23125
+ RichtexteditorComponent.prototype.languageList;
23126
+ /** @type {?} */
23127
+ RichtexteditorComponent.prototype.promptQuery;
23128
+ /** @type {?} */
23129
+ RichtexteditorComponent.prototype.isSentimentCheck;
23130
+ /** @type {?} */
23131
+ RichtexteditorComponent.prototype.subQuery;
23132
+ /** @type {?} */
23133
+ RichtexteditorComponent.prototype.translatelanguage;
23134
+ /** @type {?} */
23135
+ RichtexteditorComponent.prototype.chipValue;
23136
+ /** @type {?} */
23137
+ RichtexteditorComponent.prototype.apiResultData;
23138
+ /** @type {?} */
23139
+ RichtexteditorComponent.prototype.AIResult;
23140
+ /** @type {?} */
23141
+ RichtexteditorComponent.prototype.tools;
23142
+ /**
23143
+ * @type {?}
23144
+ * @private
23145
+ */
23146
+ RichtexteditorComponent.prototype.ref;
23147
+ }
23148
+
22036
23149
  /**
22037
23150
  * @fileoverview added by tsickle
22038
23151
  * Generated from: lib/dialog/common-dialog/index.component.ts
@@ -22537,6 +23650,7 @@ RaiseCommonLibModule.decorators = [
22537
23650
  TagInputComponent,
22538
23651
  RadioGroupComponent,
22539
23652
  CheckboxGroupComponent,
23653
+ RichtexteditorComponent,
22540
23654
  SwitchInputComponent,
22541
23655
  EncryptedInputComponent,
22542
23656
  SearchInputComponent,
@@ -22570,6 +23684,7 @@ RaiseCommonLibModule.decorators = [
22570
23684
  CheckBoxModule,
22571
23685
  RadioButtonModule,
22572
23686
  ButtonModule,
23687
+ ChipListModule,
22573
23688
  DiagramModule,
22574
23689
  TooltipModule,
22575
23690
  DialogModule,
@@ -22654,6 +23769,7 @@ RaiseCommonLibModule.decorators = [
22654
23769
  CheckBoxModule,
22655
23770
  RadioButtonModule,
22656
23771
  ButtonModule,
23772
+ ChipListModule,
22657
23773
  DiagramModule,
22658
23774
  TooltipModule,
22659
23775
  DialogModule,
@@ -22699,6 +23815,7 @@ RaiseCommonLibModule.decorators = [
22699
23815
  TagInputComponent,
22700
23816
  RadioGroupComponent,
22701
23817
  CheckboxGroupComponent,
23818
+ RichtexteditorComponent,
22702
23819
  SwitchInputComponent,
22703
23820
  EncryptedInputComponent,
22704
23821
  SearchInputComponent,
@@ -22733,5 +23850,5 @@ RaiseCommonLibModule.decorators = [
22733
23850
  * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
22734
23851
  */
22735
23852
 
22736
- export { CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, ConfirmSelectComponent as ɵb, NewActionNotificationComponent as ɵc, CommonDeleteComponent as ɵd };
23853
+ export { CheckboxGroupComponent, CommonDialogComponent, CommonFunctionService, CommonGridComponent, DefaultDrawerConfig, DialogService, DrawerComponent, DrawerFormComponent, DrawerService, EmailPattern, EncryptedInputComponent, FloatBoxComponent, GridActionComponent, GridActionItemComponent, GridBoxComponent, IconLoaderService, KeepAliveService, MainContainerComponent, MessageType, MultiTabComponent, RSAsideComponent, RSFooterComponent, RSHeaderComponent, RSNavCardGroupComponent, RSToolbarComponent, RadioGroupComponent, RaiseCommonLibModule, RichtexteditorComponent, RsCommentaryComponent, RsPageListComponent, RsPageTabComponent, SearchInputComponent, SwitchInputComponent, TagInputComponent, ToolbarItemComponent, TranslationService, TruncatedTextToggleComponent, filterShowSection, Debounce as ɵa, ConfirmSelectComponent as ɵb, NewActionNotificationComponent as ɵc, CommonDeleteComponent as ɵd };
22737
23854
  //# sourceMappingURL=raise-common-lib.js.map