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.
- package/bundles/raise-common-lib.umd.js +1241 -8
- package/bundles/raise-common-lib.umd.js.map +1 -1
- package/bundles/raise-common-lib.umd.min.js +1 -1
- package/bundles/raise-common-lib.umd.min.js.map +1 -1
- package/esm2015/lib/common-grid/index.component.js +2 -2
- package/esm2015/lib/form/drawer-form/drawer-form.component.js +6 -3
- package/esm2015/lib/form/richtexteditor/ai-config.js +70 -0
- package/esm2015/lib/form/richtexteditor/data-config.js +273 -0
- package/esm2015/lib/form/richtexteditor/index.component.js +604 -0
- package/esm2015/lib/form/richtexteditor/openapi.js +175 -0
- package/esm2015/lib/layout/page-tab/index.component.js +6 -2
- package/esm2015/lib/raise-common-lib.module.js +7 -2
- package/esm2015/public-api.js +2 -1
- package/esm2015/raise-common-lib.js +2 -2
- package/esm5/lib/common-grid/index.component.js +2 -2
- package/esm5/lib/form/drawer-form/drawer-form.component.js +6 -3
- package/esm5/lib/form/richtexteditor/ai-config.js +73 -0
- package/esm5/lib/form/richtexteditor/data-config.js +273 -0
- package/esm5/lib/form/richtexteditor/index.component.js +684 -0
- package/esm5/lib/form/richtexteditor/openapi.js +208 -0
- package/esm5/lib/layout/page-tab/index.component.js +6 -2
- package/esm5/lib/raise-common-lib.module.js +7 -2
- package/esm5/public-api.js +2 -1
- package/esm5/raise-common-lib.js +2 -2
- package/fesm2015/raise-common-lib.js +1127 -10
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +1242 -10
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/form/richtexteditor/ai-config.d.ts +10 -0
- package/lib/form/richtexteditor/data-config.d.ts +14 -0
- package/lib/form/richtexteditor/index.component.d.ts +78 -0
- package/lib/form/richtexteditor/openapi.d.ts +3 -0
- package/lib/layout/page-tab/index.component.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/img/editor-copy.svg +5 -0
- package/src/assets/img/info.svg +5 -0
|
@@ -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('@angular
|
|
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', '@
|
|
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.
|
|
5
|
-
}(this, (function (exports, core, ej2AngularGrids, lodash, rxjs, snackBar, dialog, ej2AngularTreegrid, ej2AngularNavigations, router, operators, dragDrop, http, ej2Base, ResizeObserver, ej2Data, moment, icon, platformBrowser, forms, common,
|
|
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';
|
|
6
6
|
|
|
7
7
|
ResizeObserver = ResizeObserver && ResizeObserver.hasOwnProperty('default') ? ResizeObserver['default'] : ResizeObserver;
|
|
8
8
|
moment = moment && moment.hasOwnProperty('default') ? moment['default'] : moment;
|
|
@@ -1003,7 +1003,7 @@
|
|
|
1003
1003
|
CommonGridComponent.decorators = [
|
|
1004
1004
|
{ type: core.Component, args: [{
|
|
1005
1005
|
selector: "rs-common-grid",
|
|
1006
|
-
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",
|
|
1006
|
+
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",
|
|
1007
1007
|
styles: [""]
|
|
1008
1008
|
}] }
|
|
1009
1009
|
];
|
|
@@ -3000,6 +3000,7 @@
|
|
|
3000
3000
|
this.customPageTitle = false;
|
|
3001
3001
|
this.tabList = [];
|
|
3002
3002
|
this.tabChange = new core.EventEmitter();
|
|
3003
|
+
this.selectedItemIndex = 0;
|
|
3003
3004
|
this.animation = {
|
|
3004
3005
|
previous: { effect: "", duration: 0, easing: "" },
|
|
3005
3006
|
next: { effect: "", duration: 0, easing: "" },
|
|
@@ -3048,6 +3049,7 @@
|
|
|
3048
3049
|
var index = e.selectedItem.dataset.id.split('_')[1] // sy的bug只能这么取了
|
|
3049
3050
|
;
|
|
3050
3051
|
if (e.isInteracted) {
|
|
3052
|
+
this.selectedItemIndex = index;
|
|
3051
3053
|
this.tabChange.emit(this.tabList[index]);
|
|
3052
3054
|
}
|
|
3053
3055
|
};
|
|
@@ -3069,7 +3071,7 @@
|
|
|
3069
3071
|
RsPageTabComponent.decorators = [
|
|
3070
3072
|
{ type: core.Component, args: [{
|
|
3071
3073
|
selector: "rs-page-tab",
|
|
3072
|
-
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",
|
|
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",
|
|
3073
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}"]
|
|
3074
3076
|
}] }
|
|
3075
3077
|
];
|
|
@@ -3097,6 +3099,8 @@
|
|
|
3097
3099
|
/** @type {?} */
|
|
3098
3100
|
RsPageTabComponent.prototype.tabChange;
|
|
3099
3101
|
/** @type {?} */
|
|
3102
|
+
RsPageTabComponent.prototype.selectedItemIndex;
|
|
3103
|
+
/** @type {?} */
|
|
3100
3104
|
RsPageTabComponent.prototype.animation;
|
|
3101
3105
|
}
|
|
3102
3106
|
|
|
@@ -22835,7 +22839,9 @@
|
|
|
22835
22839
|
/** @type {?} */
|
|
22836
22840
|
var value = event.value;
|
|
22837
22841
|
if (field.fieldFormType === "Datepicker") {
|
|
22838
|
-
|
|
22842
|
+
/** @type {?} */
|
|
22843
|
+
var date = moment(value);
|
|
22844
|
+
value = date.isValid() ? date.format("YYYY-MM-DD") : null;
|
|
22839
22845
|
}
|
|
22840
22846
|
this.onChange(value, field);
|
|
22841
22847
|
};
|
|
@@ -22867,7 +22873,8 @@
|
|
|
22867
22873
|
this.onBlur(field);
|
|
22868
22874
|
/** @type {?} */
|
|
22869
22875
|
var $input = event.model.element.querySelector("input");
|
|
22870
|
-
if (!$input) {
|
|
22876
|
+
if (!$input || !$input.value) {
|
|
22877
|
+
delete this.dateValidMap[field.formKey];
|
|
22871
22878
|
return;
|
|
22872
22879
|
}
|
|
22873
22880
|
/** @type {?} */
|
|
@@ -23133,6 +23140,1227 @@
|
|
|
23133
23140
|
DrawerFormComponent.prototype.ref;
|
|
23134
23141
|
}
|
|
23135
23142
|
|
|
23143
|
+
/**
|
|
23144
|
+
* @fileoverview added by tsickle
|
|
23145
|
+
* Generated from: lib/form/richtexteditor/ai-config.ts
|
|
23146
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23147
|
+
*/
|
|
23148
|
+
/**
|
|
23149
|
+
* @record
|
|
23150
|
+
*/
|
|
23151
|
+
function AIConfig() { }
|
|
23152
|
+
if (false) {
|
|
23153
|
+
/** @type {?} */
|
|
23154
|
+
AIConfig.prototype.endpoint;
|
|
23155
|
+
/** @type {?} */
|
|
23156
|
+
AIConfig.prototype.apiKey;
|
|
23157
|
+
/** @type {?} */
|
|
23158
|
+
AIConfig.prototype.deployment;
|
|
23159
|
+
/** @type {?} */
|
|
23160
|
+
AIConfig.prototype.apiVersion;
|
|
23161
|
+
/** @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
|
+
});
|
|
23213
|
+
}
|
|
23214
|
+
|
|
23215
|
+
/**
|
|
23216
|
+
* @fileoverview added by tsickle
|
|
23217
|
+
* Generated from: lib/form/richtexteditor/openapi.ts
|
|
23218
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23219
|
+
*/
|
|
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
|
+
// 备用方案:使用模拟数据(用于开发测试)
|
|
23277
|
+
/**
|
|
23278
|
+
* @param {?} subQuery
|
|
23279
|
+
* @param {?} promptQuery
|
|
23280
|
+
* @return {?}
|
|
23281
|
+
*/
|
|
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',
|
|
23292
|
+
};
|
|
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;
|
|
23298
|
+
}
|
|
23299
|
+
}
|
|
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);
|
|
23305
|
+
}
|
|
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");
|
|
23879
|
+
};
|
|
23880
|
+
/**
|
|
23881
|
+
* @private
|
|
23882
|
+
* @param {?} args
|
|
23883
|
+
* @return {?}
|
|
23884
|
+
*/
|
|
23885
|
+
RichtexteditorComponent.prototype.onSelect = /**
|
|
23886
|
+
* @private
|
|
23887
|
+
* @param {?} args
|
|
23888
|
+
* @return {?}
|
|
23889
|
+
*/
|
|
23890
|
+
function (args) {
|
|
23891
|
+
if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
|
|
23892
|
+
this.rteObj.formatter.saveData();
|
|
23893
|
+
}
|
|
23894
|
+
/** @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);
|
|
23914
|
+
};
|
|
23915
|
+
/**
|
|
23916
|
+
* @param {?} selectedQuery
|
|
23917
|
+
* @return {?}
|
|
23918
|
+
*/
|
|
23919
|
+
RichtexteditorComponent.prototype.dialogueOpen = /**
|
|
23920
|
+
* @param {?} selectedQuery
|
|
23921
|
+
* @return {?}
|
|
23922
|
+
*/
|
|
23923
|
+
function (selectedQuery) {
|
|
23924
|
+
var _this = this;
|
|
23925
|
+
/** @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();
|
|
23988
|
+
};
|
|
23989
|
+
/**
|
|
23990
|
+
* @return {?}
|
|
23991
|
+
*/
|
|
23992
|
+
RichtexteditorComponent.prototype.updateAISugesstions = /**
|
|
23993
|
+
* @return {?}
|
|
23994
|
+
*/
|
|
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();
|
|
24042
|
+
}
|
|
24043
|
+
};
|
|
24044
|
+
/**
|
|
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
|
+
/**
|
|
24068
|
+
* @return {?}
|
|
24069
|
+
*/
|
|
24070
|
+
RichtexteditorComponent.prototype.dialogShow = /**
|
|
24071
|
+
* @return {?}
|
|
24072
|
+
*/
|
|
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 = "";
|
|
24100
|
+
};
|
|
24101
|
+
/**
|
|
24102
|
+
* @return {?}
|
|
24103
|
+
*/
|
|
24104
|
+
RichtexteditorComponent.prototype.closeDialog = /**
|
|
24105
|
+
* @return {?}
|
|
24106
|
+
*/
|
|
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";
|
|
24117
|
+
};
|
|
24118
|
+
/**
|
|
24119
|
+
* @param {?} text
|
|
24120
|
+
* @return {?}
|
|
24121
|
+
*/
|
|
24122
|
+
RichtexteditorComponent.prototype.copyTextToClipboard = /**
|
|
24123
|
+
* @param {?} text
|
|
24124
|
+
* @return {?}
|
|
24125
|
+
*/
|
|
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
|
+
}
|
|
24162
|
+
};
|
|
24163
|
+
/**
|
|
24164
|
+
* @return {?}
|
|
24165
|
+
*/
|
|
24166
|
+
RichtexteditorComponent.prototype.onOverlayClick = /**
|
|
24167
|
+
* @return {?}
|
|
24168
|
+
*/
|
|
24169
|
+
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();
|
|
24176
|
+
};
|
|
24177
|
+
/**
|
|
24178
|
+
* @param {?} args
|
|
24179
|
+
* @return {?}
|
|
24180
|
+
*/
|
|
24181
|
+
RichtexteditorComponent.prototype.onQuerySelect = /**
|
|
24182
|
+
* @param {?} args
|
|
24183
|
+
* @return {?}
|
|
24184
|
+
*/
|
|
24185
|
+
function (args) {
|
|
24186
|
+
// this.chipList.selectedChips = 0;
|
|
24187
|
+
this.translatelanguage = "EN";
|
|
24188
|
+
this.selectedQuery = args.itemData.text;
|
|
24189
|
+
this.updateAISugesstionsData(args.itemData.text);
|
|
24190
|
+
};
|
|
24191
|
+
/**
|
|
24192
|
+
* @param {?} args
|
|
24193
|
+
* @return {?}
|
|
24194
|
+
*/
|
|
24195
|
+
RichtexteditorComponent.prototype.onLanguageSelect = /**
|
|
24196
|
+
* @param {?} args
|
|
24197
|
+
* @return {?}
|
|
24198
|
+
*/
|
|
24199
|
+
function (args) {
|
|
24200
|
+
this.translatelanguage = args.itemData.id;
|
|
24201
|
+
this.updateAISugesstionsData("Translate");
|
|
24202
|
+
};
|
|
24203
|
+
/**
|
|
24204
|
+
* @param {?} args
|
|
24205
|
+
* @return {?}
|
|
24206
|
+
*/
|
|
24207
|
+
RichtexteditorComponent.prototype.onChipClick = /**
|
|
24208
|
+
* @param {?} args
|
|
24209
|
+
* @return {?}
|
|
24210
|
+
*/
|
|
24211
|
+
function (args) {
|
|
24212
|
+
this.chipValue = args.itemData.text;
|
|
24213
|
+
// 事件会触发两次 必须判断args.text是否有值
|
|
24214
|
+
if (args.itemData.text)
|
|
24215
|
+
this.updateAISugesstionsData("Rephrase");
|
|
24216
|
+
};
|
|
24217
|
+
/**
|
|
24218
|
+
* @param {?} args
|
|
24219
|
+
* @return {?}
|
|
24220
|
+
*/
|
|
24221
|
+
RichtexteditorComponent.prototype._toolbarClick = /**
|
|
24222
|
+
* @param {?} args
|
|
24223
|
+
* @return {?}
|
|
24224
|
+
*/
|
|
24225
|
+
function (args) {
|
|
24226
|
+
this.toolbarClick.emit(args);
|
|
24227
|
+
};
|
|
24228
|
+
/**
|
|
24229
|
+
* @return {?}
|
|
24230
|
+
*/
|
|
24231
|
+
RichtexteditorComponent.prototype.hideToast = /**
|
|
24232
|
+
* @return {?}
|
|
24233
|
+
*/
|
|
24234
|
+
function () {
|
|
24235
|
+
this.showMsg = false;
|
|
24236
|
+
};
|
|
24237
|
+
/**
|
|
24238
|
+
* @return {?}
|
|
24239
|
+
*/
|
|
24240
|
+
RichtexteditorComponent.prototype.onZoom = /**
|
|
24241
|
+
* @return {?}
|
|
24242
|
+
*/
|
|
24243
|
+
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 }]
|
|
24279
|
+
};
|
|
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;
|
|
24323
|
+
/** @type {?} */
|
|
24324
|
+
RichtexteditorComponent.prototype.showMsg;
|
|
24325
|
+
/** @type {?} */
|
|
24326
|
+
RichtexteditorComponent.prototype.insertImageSettings;
|
|
24327
|
+
/** @type {?} */
|
|
24328
|
+
RichtexteditorComponent.prototype.editorManager;
|
|
24329
|
+
/** @type {?} */
|
|
24330
|
+
RichtexteditorComponent.prototype.size;
|
|
24331
|
+
/** @type {?} */
|
|
24332
|
+
RichtexteditorComponent.prototype.selectedQuery;
|
|
24333
|
+
/** @type {?} */
|
|
24334
|
+
RichtexteditorComponent.prototype.dropValIndex;
|
|
24335
|
+
/** @type {?} */
|
|
24336
|
+
RichtexteditorComponent.prototype.queryList;
|
|
24337
|
+
/** @type {?} */
|
|
24338
|
+
RichtexteditorComponent.prototype.rephraseTyleList;
|
|
24339
|
+
/** @type {?} */
|
|
24340
|
+
RichtexteditorComponent.prototype.languageList;
|
|
24341
|
+
/** @type {?} */
|
|
24342
|
+
RichtexteditorComponent.prototype.promptQuery;
|
|
24343
|
+
/** @type {?} */
|
|
24344
|
+
RichtexteditorComponent.prototype.isSentimentCheck;
|
|
24345
|
+
/** @type {?} */
|
|
24346
|
+
RichtexteditorComponent.prototype.subQuery;
|
|
24347
|
+
/** @type {?} */
|
|
24348
|
+
RichtexteditorComponent.prototype.translatelanguage;
|
|
24349
|
+
/** @type {?} */
|
|
24350
|
+
RichtexteditorComponent.prototype.chipValue;
|
|
24351
|
+
/** @type {?} */
|
|
24352
|
+
RichtexteditorComponent.prototype.apiResultData;
|
|
24353
|
+
/** @type {?} */
|
|
24354
|
+
RichtexteditorComponent.prototype.AIResult;
|
|
24355
|
+
/** @type {?} */
|
|
24356
|
+
RichtexteditorComponent.prototype.tools;
|
|
24357
|
+
/**
|
|
24358
|
+
* @type {?}
|
|
24359
|
+
* @private
|
|
24360
|
+
*/
|
|
24361
|
+
RichtexteditorComponent.prototype.ref;
|
|
24362
|
+
}
|
|
24363
|
+
|
|
23136
24364
|
/**
|
|
23137
24365
|
* @fileoverview added by tsickle
|
|
23138
24366
|
* Generated from: lib/dialog/common-dialog/index.component.ts
|
|
@@ -23726,6 +24954,7 @@
|
|
|
23726
24954
|
TagInputComponent,
|
|
23727
24955
|
RadioGroupComponent,
|
|
23728
24956
|
CheckboxGroupComponent,
|
|
24957
|
+
RichtexteditorComponent,
|
|
23729
24958
|
SwitchInputComponent,
|
|
23730
24959
|
EncryptedInputComponent,
|
|
23731
24960
|
SearchInputComponent,
|
|
@@ -23759,6 +24988,7 @@
|
|
|
23759
24988
|
ej2AngularButtons.CheckBoxModule,
|
|
23760
24989
|
ej2AngularButtons.RadioButtonModule,
|
|
23761
24990
|
ej2AngularButtons.ButtonModule,
|
|
24991
|
+
ej2AngularButtons.ChipListModule,
|
|
23762
24992
|
ej2AngularDiagrams.DiagramModule,
|
|
23763
24993
|
ej2AngularPopups.TooltipModule,
|
|
23764
24994
|
ej2AngularPopups.DialogModule,
|
|
@@ -23843,6 +25073,7 @@
|
|
|
23843
25073
|
ej2AngularButtons.CheckBoxModule,
|
|
23844
25074
|
ej2AngularButtons.RadioButtonModule,
|
|
23845
25075
|
ej2AngularButtons.ButtonModule,
|
|
25076
|
+
ej2AngularButtons.ChipListModule,
|
|
23846
25077
|
ej2AngularDiagrams.DiagramModule,
|
|
23847
25078
|
ej2AngularPopups.TooltipModule,
|
|
23848
25079
|
ej2AngularPopups.DialogModule,
|
|
@@ -23888,6 +25119,7 @@
|
|
|
23888
25119
|
TagInputComponent,
|
|
23889
25120
|
RadioGroupComponent,
|
|
23890
25121
|
CheckboxGroupComponent,
|
|
25122
|
+
RichtexteditorComponent,
|
|
23891
25123
|
SwitchInputComponent,
|
|
23892
25124
|
EncryptedInputComponent,
|
|
23893
25125
|
SearchInputComponent,
|
|
@@ -23939,6 +25171,7 @@
|
|
|
23939
25171
|
exports.RSToolbarComponent = RSToolbarComponent;
|
|
23940
25172
|
exports.RadioGroupComponent = RadioGroupComponent;
|
|
23941
25173
|
exports.RaiseCommonLibModule = RaiseCommonLibModule;
|
|
25174
|
+
exports.RichtexteditorComponent = RichtexteditorComponent;
|
|
23942
25175
|
exports.RsCommentaryComponent = RsCommentaryComponent;
|
|
23943
25176
|
exports.RsPageListComponent = RsPageListComponent;
|
|
23944
25177
|
exports.RsPageTabComponent = RsPageTabComponent;
|