raise-common-lib 0.0.192 → 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/README.md +57 -57
- package/bundles/raise-common-lib.umd.js +1240 -10
- 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/dialog/new-action-notification/new-action-notification.component.js +1 -1
- package/esm2015/lib/form/drawer-form/drawer-form.component.js +1 -1
- 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/drawer/index.component.js +1 -1
- package/esm2015/lib/layout/page-tab/index.component.js +7 -3
- 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/dialog/new-action-notification/new-action-notification.component.js +1 -1
- package/esm5/lib/form/drawer-form/drawer-form.component.js +1 -1
- 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/drawer/index.component.js +1 -1
- package/esm5/lib/layout/page-tab/index.component.js +7 -3
- 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 +1126 -12
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +1241 -12
- 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/arrow_right.svg +4 -4
- package/src/assets/img/calendar-disabled.svg +6 -6
- package/src/assets/img/calendar.svg +6 -6
- package/src/assets/img/calendar_arrow_left.svg +3 -3
- package/src/assets/img/calendar_arrow_right.svg +3 -3
- package/src/assets/img/checked-vector.svg +3 -3
- package/src/assets/img/dialog-close.svg +4 -4
- package/src/assets/img/dialog-grow.svg +6 -6
- package/src/assets/img/dialog-shrink.svg +6 -6
- package/src/assets/img/editor-copy.svg +5 -0
- package/src/assets/img/info.svg +5 -0
- package/src/assets/img/plus.svg +4 -4
- package/src/assets/img/search.svg +4 -4
- package/src/assets/img/shrink-icon.svg +6 -6
- package/src/assets/img/time-disabled.svg +4 -4
- package/src/assets/img/time.svg +4 -4
- package/src/assets/img/toolbar-action-addFolder.svg +17 -17
- package/src/assets/img/toolbar-action-calculator.svg +11 -11
- package/src/assets/img/toolbar-action-collapse.svg +7 -7
- package/src/assets/img/toolbar-action-combine.svg +4 -4
- package/src/assets/img/toolbar-action-edit.svg +4 -4
- package/src/assets/img/toolbar-action-expand.svg +7 -7
- package/src/assets/img/toolbar-action-folderMove.svg +8 -8
- package/src/assets/img/toolbar-action-lock.svg +6 -6
- package/src/assets/img/toolbar-action-preview.svg +7 -7
- package/src/assets/img/toolbar-action-publish.svg +5 -5
- package/src/assets/img/toolbar-action-reminders.svg +10 -10
- package/src/assets/img/toolbar-action-rename.svg +7 -7
- package/src/assets/img/toolbar-action-saveSequence.svg +5 -5
- package/src/assets/img/toolbar-action-send-file.svg +5 -5
- package/src/assets/img/toolbar-action-settle.svg +7 -7
- package/src/assets/img/toolbar-action-share.svg +5 -5
- package/src/assets/img/toolbar-action-submitForApproval.svg +4 -4
- package/src/assets/img/toolbar-action-sync.svg +4 -4
- package/src/assets/img/toolbar-action-template.svg +6 -6
- package/src/assets/img/toolbar-action-workflow.svg +9 -9
|
@@ -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
|
|
|
@@ -811,7 +811,7 @@ var CommonGridComponent = /** @class */ (function () {
|
|
|
811
811
|
CommonGridComponent.decorators = [
|
|
812
812
|
{ type: Component, args: [{
|
|
813
813
|
selector: "rs-common-grid",
|
|
814
|
-
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",
|
|
814
|
+
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",
|
|
815
815
|
styles: [""]
|
|
816
816
|
}] }
|
|
817
817
|
];
|
|
@@ -1780,7 +1780,7 @@ var NewActionNotificationComponent = /** @class */ (function () {
|
|
|
1780
1780
|
{ type: Component, args: [{
|
|
1781
1781
|
selector: "kt-new-action-notification",
|
|
1782
1782
|
template: "<div class=\"new-action-notification-container\" [attr.data-collapse]=\"collapsed\">\r\n\t<span\r\n\t\tclass=\"notification-icon\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t[attr.data-status]=\"config.status?.toLowerCase()\"\r\n\t\t(click)=\"expandNotification()\"\r\n\t></span>\r\n\t<span\r\n\t\tclass=\"notification-icon notification-loading\"\r\n\t\t*ngIf=\"config.type === 'Progress'\"\r\n\t></span>\r\n\t<div class=\"notification-content\">\r\n\t\t<span *ngIf=\"config.type === 'Detail'\" class=\"notification-title\">\r\n\t\t\t{{ config.title }}\r\n\t\t</span>\r\n\t\t<span class=\"notification-text\">{{ config.message }}</span>\r\n\t\t<a *ngIf=\"config.type === 'Detail'\" class=\"notification-link\">View</a>\r\n\t</div>\r\n\t<button\r\n\t\ttype=\"button\"\r\n\t\tclass=\"notification-close\"\r\n\t\t[attr.data-type]=\"config.type === 'Loading' ? 'loading' : 'default'\"\r\n\t\t(click)=\"closeNotification()\"\r\n\t></button>\r\n</div>\r\n",
|
|
1783
|
-
styles: ["::ng-deep .new-action-notification{margin:0;padding:64px 12px;background-color:transparent!important;background-image:none!important;box-shadow:none}::ng-deep .mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:none;background-color:transparent}.new-action-notification-container{min-width:320px;max-width:400px;padding:12px;border-radius:10px;background-color:#fff;box-shadow:0 0 8px 0 #00000033;display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-end}.new-action-notification-container .notification-icon{flex:none;width:24px;height:24px;margin-right:8px}.new-action-notification-container .notification-icon[data-type=default][data-status=success]::before{content:url(
|
|
1783
|
+
styles: ["::ng-deep .new-action-notification{margin:0;padding:64px 12px;background-color:transparent!important;background-image:none!important;box-shadow:none}::ng-deep .mat-mdc-snack-bar-container .mdc-snackbar__surface{box-shadow:none;background-color:transparent}.new-action-notification-container{min-width:320px;max-width:400px;padding:12px;border-radius:10px;background-color:#fff;box-shadow:0 0 8px 0 #00000033;display:flex;flex-flow:row nowrap;align-items:flex-start;justify-content:flex-end}.new-action-notification-container .notification-icon{flex:none;width:24px;height:24px;margin-right:8px}.new-action-notification-container .notification-icon[data-type=default][data-status=success]::before{content:url(../../assets/img/notification-status-success.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=warning]::before{content:url(../../assets/img/notification-status-warning.svg)}.new-action-notification-container .notification-icon[data-type=default][data-status=error]::before{content:url(../../assets/img/notification-status-error.svg)}.new-action-notification-container .notification-icon[data-type=loading]{-webkit-animation:2s linear infinite rotate;animation:2s linear infinite rotate}@-webkit-keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}@keyframes rotate{from{transform:rotate(360deg)}to{transform:rotate(0)}}.new-action-notification-container .notification-icon[data-type=loading]::before{content:url(../../assets/img/notification-status-loading.svg)}.new-action-notification-container .notification-close{flex:none;height:24px;margin-left:24px;padding:0;border:none;background-color:transparent}.new-action-notification-container .notification-close[data-type=default]::before{content:url(../../assets/img/notification-close.svg)}.new-action-notification-container .notification-close[data-type=loading]::before{content:url(../../assets/img/notification-collapse.svg)}.new-action-notification-container .notification-content{flex:auto;min-height:24px;padding-top:4px;display:flex;flex-flow:column nowrap}.new-action-notification-container .notification-content .notification-title{margin-bottom:8px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:19px}.new-action-notification-container .notification-content .notification-text{color:#1f3f5c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:16px}.new-action-notification-container .notification-content .notification-link{margin-top:6px;cursor:pointer;color:#1364b3;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px}.new-action-notification-container[data-collapse=true]{padding:0;background-color:transparent;box-shadow:none}.new-action-notification-container[data-collapse=true] .notification-icon{cursor:pointer}.new-action-notification-container[data-collapse=true] .notification-close,.new-action-notification-container[data-collapse=true] .notification-content{display:none}"]
|
|
1784
1784
|
}] }
|
|
1785
1785
|
];
|
|
1786
1786
|
/** @nocollapse */
|
|
@@ -2808,6 +2808,7 @@ var RsPageTabComponent = /** @class */ (function () {
|
|
|
2808
2808
|
this.customPageTitle = false;
|
|
2809
2809
|
this.tabList = [];
|
|
2810
2810
|
this.tabChange = new EventEmitter();
|
|
2811
|
+
this.selectedItemIndex = 0;
|
|
2811
2812
|
this.animation = {
|
|
2812
2813
|
previous: { effect: "", duration: 0, easing: "" },
|
|
2813
2814
|
next: { effect: "", duration: 0, easing: "" },
|
|
@@ -2856,6 +2857,7 @@ var RsPageTabComponent = /** @class */ (function () {
|
|
|
2856
2857
|
var index = e.selectedItem.dataset.id.split('_')[1] // sy的bug只能这么取了
|
|
2857
2858
|
;
|
|
2858
2859
|
if (e.isInteracted) {
|
|
2860
|
+
this.selectedItemIndex = index;
|
|
2859
2861
|
this.tabChange.emit(this.tabList[index]);
|
|
2860
2862
|
}
|
|
2861
2863
|
};
|
|
@@ -2877,8 +2879,8 @@ var RsPageTabComponent = /** @class */ (function () {
|
|
|
2877
2879
|
RsPageTabComponent.decorators = [
|
|
2878
2880
|
{ type: Component, args: [{
|
|
2879
2881
|
selector: "rs-page-tab",
|
|
2880
|
-
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",
|
|
2881
|
-
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(
|
|
2882
|
+
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",
|
|
2883
|
+
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}"]
|
|
2882
2884
|
}] }
|
|
2883
2885
|
];
|
|
2884
2886
|
RsPageTabComponent.propDecorators = {
|
|
@@ -2905,6 +2907,8 @@ if (false) {
|
|
|
2905
2907
|
/** @type {?} */
|
|
2906
2908
|
RsPageTabComponent.prototype.tabChange;
|
|
2907
2909
|
/** @type {?} */
|
|
2910
|
+
RsPageTabComponent.prototype.selectedItemIndex;
|
|
2911
|
+
/** @type {?} */
|
|
2908
2912
|
RsPageTabComponent.prototype.animation;
|
|
2909
2913
|
}
|
|
2910
2914
|
|
|
@@ -4206,7 +4210,7 @@ var DrawerComponent = /** @class */ (function () {
|
|
|
4206
4210
|
{ type: Component, args: [{
|
|
4207
4211
|
selector: "rs-drawer",
|
|
4208
4212
|
template: "<div #element id=\"rs-drawer-container\" class=\"rs-drawer-container\">\r\n <div class=\"rs-drawer-content\">\r\n <ng-content></ng-content>\r\n </div>\r\n <div\r\n #drawer\r\n class=\"rs-drawer\"\r\n [attr.data-mode]=\"config.mode\"\r\n [attr.data-opened]=\"isOpened ? 'yes' : 'no'\"\r\n [attr.data-animation]=\"useAnimation\"\r\n [hidden]=\"hiddenDrawer\"\r\n (animationend)=\"onAnimationEnd()\"\r\n >\r\n <div class=\"drawer-header\" #header>\r\n <button class=\"drawer-return-button\" (click)=\"hide()\">\r\n <span class=\"drawer-sub-title\" *ngIf=\"config.subTitle\">\r\n {{ config.subTitle }}\r\n </span>\r\n </button>\r\n <div class=\"drawer-title\">{{ config.title }}</div>\r\n <div class=\"drawer-header-slot\" #headerSlot></div>\r\n </div>\r\n <div class=\"drawer-top-slot\" #topSlot></div>\r\n <div class=\"drawer-content-box\">\r\n <div class=\"drawer-content\" #content>\r\n <div class=\"drawer-content-container\">\r\n <ng-template #dynamicComponentContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"drawer-toolbar-slot\" #toolbarSlot></div>\r\n </div>\r\n</div>\r\n",
|
|
4209
|
-
styles: [":host{display:block;height:100%}#rs-drawer-container{height:100%}.rs-drawer-container{height:100%;background-color:transparent;overflow:hidden;position:relative}.rs-drawer-container .rs-drawer-content{width:100%;height:100%;overflow:auto;margin-right:0!important}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar{width:5px;height:5px;background:#fff;position:static;z-index:999;border-radius:10px}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar-thumb{background:#eaedf0}.rs-drawer-container .rs-drawer{width:100%;height:100%;border-left:none;background-color:transparent;overflow:visible;pointer-events:none;opacity:0;display:flex;flex-flow:column nowrap;position:absolute;z-index:2;top:0;left:100%}.rs-drawer-container .rs-drawer[data-opened=yes]{left:0;opacity:1}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=yes]{-webkit-animation:.5s ease-in-out drawer-open;animation:.5s ease-in-out drawer-open}@-webkit-keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}@keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=no]{-webkit-animation:.5s ease-in-out drawer-close;animation:.5s ease-in-out drawer-close}@-webkit-keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}@keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}.rs-drawer-container .rs-drawer[hidden]{display:none}.rs-drawer-container .rs-drawer .drawer-header{flex:none;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:content-box;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button{flex:none;display:flex;flex-flow:row nowrap;align-items:center;padding:0;border:none;background-color:transparent;cursor:pointer}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button::before{content:url(
|
|
4213
|
+
styles: [":host{display:block;height:100%}#rs-drawer-container{height:100%}.rs-drawer-container{height:100%;background-color:transparent;overflow:hidden;position:relative}.rs-drawer-container .rs-drawer-content{width:100%;height:100%;overflow:auto;margin-right:0!important}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar{width:5px;height:5px;background:#fff;position:static;z-index:999;border-radius:10px}.rs-drawer-container .rs-drawer-content::-webkit-scrollbar-thumb{background:#eaedf0}.rs-drawer-container .rs-drawer{width:100%;height:100%;border-left:none;background-color:transparent;overflow:visible;pointer-events:none;opacity:0;display:flex;flex-flow:column nowrap;position:absolute;z-index:2;top:0;left:100%}.rs-drawer-container .rs-drawer[data-opened=yes]{left:0;opacity:1}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=yes]{-webkit-animation:.5s ease-in-out drawer-open;animation:.5s ease-in-out drawer-open}@-webkit-keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}@keyframes drawer-open{from{left:100%;opacity:0}to{left:0;opacity:1}}.rs-drawer-container .rs-drawer[data-animation=yes][data-opened=no]{-webkit-animation:.5s ease-in-out drawer-close;animation:.5s ease-in-out drawer-close}@-webkit-keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}@keyframes drawer-close{from{left:0;opacity:1}to{left:100%;opacity:0}}.rs-drawer-container .rs-drawer[hidden]{display:none}.rs-drawer-container .rs-drawer .drawer-header{flex:none;display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:center;box-sizing:content-box;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button{flex:none;display:flex;flex-flow:row nowrap;align-items:center;padding:0;border:none;background-color:transparent;cursor:pointer}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button::before{content:url(../../assets/img/drawer-back.svg);width:24px;height:24px;margin-right:8px;transition:transform 125ms ease-in-out}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button:hover::before{transform:translateX(-2px)}.rs-drawer-container .rs-drawer .drawer-header .drawer-return-button .drawer-sub-title{margin-right:12px;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title{flex:none;min-height:14px;padding:0 12px;border-left:1px solid #bdc4ca;font-family:Arial;font-style:normal;font-weight:400}.rs-drawer-container .rs-drawer .drawer-header .drawer-title:empty{padding:0}.rs-drawer-container .rs-drawer .drawer-content-box{flex:auto;height:0;background-color:#f7fafb;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-content{height:100%;padding:0 20px;border:1px solid #ebedf0;border-radius:15px;background-color:#fff;display:flex;flex-flow:column nowrap}.rs-drawer-container .rs-drawer .drawer-content .drawer-content-container{flex:auto;overflow:hidden auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot{flex:none;height:32px;margin-left:auto;display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-toolbar-slot:empty{display:none}.rs-drawer-container .rs-drawer .drawer-top-slot{flex:none;pointer-events:auto}.rs-drawer-container .rs-drawer .drawer-top-slot:empty{height:var(--drawer-top,0);pointer-events:none}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header{height:46px;padding:0 12px 0 8px;background-color:#f7fafb}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-header .drawer-title{color:#1f3f5c;font-size:15px;font-weight:700;line-height:18px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content{padding-bottom:20px}.rs-drawer-container .rs-drawer[data-mode=outer] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-top-slot:empty+.drawer-content-box{padding-top:calc((var(--drawer-top,0) + 1) * 16px)}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header{height:24px;padding:6px 0;border-bottom:1px solid #eaedf0}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-sub-title,.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{color:#44566c;font-size:12px;line-height:14px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-header .drawer-title{font-weight:700}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-content .drawer-content-container{margin-right:-20px;padding-right:20px;padding-left:8px}.rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot{width:100%;padding:16px 0;box-sizing:content-box;border-top:1px solid #eaedf0}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar]{display:flex;flex-flow:row nowrap;justify-content:flex-end;align-items:center;gap:12px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button{display:flex;flex-flow:row nowrap;justify-content:center;align-items:center;gap:6px;min-width:80px;height:32px;padding:0 12px;border:1px solid #adb5bd;border-radius:4px;background-color:#fff;cursor:pointer;color:#44566c;font-size:13px;font-family:Arial;font-style:normal;font-weight:400;line-height:16px}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:hover{border-color:#6c7c90}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button:disabled{opacity:1!important;border-color:#6c7c9066;color:#44566c66;cursor:unset}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary{border:none;background-color:#1364b3;color:#fff}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:hover{background-color:#176bca}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button.primary:disabled{background-color:#1364b366}::ng-deep .rs-drawer-container .rs-drawer .drawer-toolbar-slot [drawer-toolbar] button img{width:16px;height:16px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=outer] .drawer-toolbar-slot [drawer-toolbar] button{height:26px;font-size:12px;line-height:14px}::ng-deep .rs-drawer-container .rs-drawer[data-mode=inner] .drawer-toolbar-slot [drawer-toolbar] button img{display:none}"]
|
|
4210
4214
|
}] }
|
|
4211
4215
|
];
|
|
4212
4216
|
/** @nocollapse */
|
|
@@ -22862,7 +22866,7 @@ var DrawerFormComponent = /** @class */ (function () {
|
|
|
22862
22866
|
{ type: Component, args: [{
|
|
22863
22867
|
selector: "rs-drawer-form",
|
|
22864
22868
|
template: "<div #drawerFormEl class=\"rs-drawer-form-container\">\r\n <div class=\"section-container\">\r\n <div #sectionEl class=\"section-item\" *ngFor=\"let section of sections\">\r\n <input\r\n type=\"checkbox\"\r\n class=\"section-expand-checkbox\"\r\n *ngIf=\"section.title\"\r\n />\r\n <div class=\"section-title\" *ngIf=\"section.title\">\r\n <span>{{ section.title }}</span>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"!section.customKey\">\r\n <div\r\n class=\"form-item\"\r\n *ngFor=\"let field of section.fields\"\r\n [attr.data-required]=\"field.required ? 'yes' : 'no'\"\r\n [attr.data-disabled]=\"field.disabled || formDisabled ? 'yes' : 'no'\"\r\n [attr.data-error]=\"\r\n fieldValidMap[field.formKey] === false ? 'yes' : 'no'\r\n \"\r\n >\r\n <div class=\"form-label\">\r\n <span>{{ field.label }}</span>\r\n <ejs-tooltip\r\n class=\"form-tooltip\"\r\n cssClass=\"rs-drawer-tooltip\"\r\n *ngIf=\"field.tooltip\"\r\n position=\"RightCenter\"\r\n [content]=\"field.tooltip\"\r\n >\r\n <span class=\"tooltip-icon\"></span>\r\n </ejs-tooltip>\r\n </div>\r\n <div class=\"form-content\">\r\n <!-- Radio -->\r\n <rs-radio-group\r\n *ngIf=\"field.fieldFormType === 'Radio'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-radio-group>\r\n <!-- Checkbox -->\r\n <rs-checkbox-group\r\n *ngIf=\"field.fieldFormType === 'Checkbox'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-checkbox-group>\r\n <!-- Switch -->\r\n <rs-switch-input\r\n *ngIf=\"field.fieldFormType === 'Switch'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n (valueChange)=\"onChange($event, field)\"\r\n ></rs-switch-input>\r\n <!-- Input -->\r\n <input\r\n class=\"e-input\"\r\n *ngIf=\"\r\n field.fieldFormType === 'Text' ||\r\n field.fieldFormType === 'Email'\r\n \"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n />\r\n <!-- Textarea -->\r\n <textarea\r\n class=\"e-input\"\r\n *ngIf=\"field.fieldFormType === 'Textarea'\"\r\n [value]=\"form[field.formKey]\"\r\n [disabled]=\"getDisabled(field)\"\r\n [required]=\"field.required\"\r\n [attr.maxlength]=\"field.maxlength\"\r\n [attr.minlength]=\"field.minlength\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (input)=\"onInput($event.target.value, field)\"\r\n (change)=\"onChange($event.target.value, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n autocomplete=\"off\"\r\n rows=\"3\"\r\n ></textarea>\r\n <!-- Number Input -->\r\n <ejs-numerictextbox\r\n *ngIf=\"field.fieldFormType === 'Number'\"\r\n [value]=\"form[field.formKey]\"\r\n [max]=\"field.max\"\r\n [min]=\"field.min\"\r\n [step]=\"field.step\"\r\n [decimals]=\"field.decimals\"\r\n [format]=\"field.format\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-numerictextbox>\r\n <!-- Tags Input -->\r\n <rs-tag-input\r\n *ngIf=\"field.fieldFormType === 'Tags'\"\r\n [value]=\"form[field.formKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [inputMaxlength]=\"field.maxlength\"\r\n [inputMinlength]=\"field.minlength\"\r\n [disabled]=\"getDisabled(field)\"\r\n [error]=\"fieldValidMap[field.formKey] === false\"\r\n (valueChange)=\"onChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></rs-tag-input>\r\n <!-- AutoComplete -->\r\n <ejs-autocomplete\r\n *ngIf=\"field.fieldFormType === 'AutoComplete'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-autocomplete>\r\n <!-- Dropdown -->\r\n <ejs-dropdownlist\r\n *ngIf=\"field.fieldFormType === 'Dropdown'\"\r\n [value]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showClearButton]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n ></ejs-dropdownlist>\r\n <!-- MultiSelect -->\r\n <ejs-multiselect\r\n *ngIf=\"field.fieldFormType === 'MultiSelect'\"\r\n mode=\"CheckBox\"\r\n [ngModel]=\"form[field.formKey]\"\r\n [dataSource]=\"optionsMap[field.optionKey]\"\r\n [fields]=\"getOptionFields(field)\"\r\n [allowFiltering]=\"true\"\r\n [showDropDownIcon]=\"true\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"fieldValidMap[field.formKey] === false\"\r\n (filtering)=\"onFiltering($event, field)\"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onBlur(field)\"\r\n >\r\n </ejs-multiselect>\r\n <!-- Datepicker -->\r\n <ejs-datepicker\r\n *ngIf=\"field.fieldFormType === 'Datepicker'\"\r\n [value]=\"getValue(field)\"\r\n [format]=\"field.format || 'dd-MMM-yyyy'\"\r\n [enabled]=\"!getDisabled(field)\"\r\n [class.error]=\"\r\n fieldValidMap[field.formKey] === false ||\r\n dateValidMap[field.formKey] === false\r\n \"\r\n (change)=\"onComponentChange($event, field)\"\r\n (focus)=\"onFocus(field)\"\r\n (blur)=\"onDatePickerBlur($event, field)\"\r\n ></ejs-datepicker>\r\n <ng-template\r\n #customTemplateContainer\r\n *ngIf=\"field.fieldFormType === 'Custom'\"\r\n ></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"section-form\" *ngIf=\"section.customKey\">\r\n <ng-template #customSectionContainer></ng-template>\r\n </div>\r\n </div>\r\n </div>\r\n <div *ngIf=\"sections.length > 1 && showAnchor\" class=\"anchor-container\">\r\n <div\r\n class=\"anchor-item\"\r\n *ngFor=\"let section of sections; let index = index\"\r\n [style.display]=\"section.title ? 'block' : 'none'\"\r\n [attr.data-active]=\"scrollIndex === index ? 'yes' : 'no'\"\r\n [attr.data-content]=\"section.title\"\r\n (click)=\"onClickAnchor(index)\"\r\n ></div>\r\n </div>\r\n</div>\r\n",
|
|
22865
|
-
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{flex:auto;display:flex;flex-flow:column nowrap;max-width:1576px}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(
|
|
22869
|
+
styles: [":host{display:block;margin-top:16px}.rs-drawer-form-container{display:flex;flex-flow:row nowrap;align-items:flex-start;gap:32px}.rs-drawer-form-container .section-container{flex:auto;display:flex;flex-flow:column nowrap;max-width:1576px}.rs-drawer-form-container .section-item{position:relative}.rs-drawer-form-container .section-item:not(:first-child){border-top:1px solid #eaedf0}.rs-drawer-form-container .section-expand-checkbox{display:block;width:100%;height:28px;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer;position:absolute;top:0;left:0}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title::before{transform:rotate(-90deg)}.rs-drawer-form-container .section-expand-checkbox:checked+.section-title+.section-form{max-height:0;overflow:hidden}.rs-drawer-form-container .section-title{padding:6px 0;margin-bottom:12px;color:#44566c;font-family:Arial;font-size:13px;font-style:normal;font-weight:700;line-height:16px;display:flex;flex-flow:row nowrap;align-items:center;pointer-events:none}.rs-drawer-form-container .section-title::before{content:url(../../assets/img/down-arrow.svg);display:block;height:16px;width:16px;margin-right:8px}.rs-drawer-form-container .section-form{display:flex;flex-flow:row wrap;justify-content:space-between;gap:12px 56px;max-width:1576px;padding:0 24px;margin-bottom:20px}.rs-drawer-form-container .section-form .form-item{min-height:28px;min-width:400px;max-width:700px;width:calc((100% - 56px)/ 2);display:flex;flex-flow:row nowrap;justify-content:flex-start;align-items:flex-start}.rs-drawer-form-container .section-form .form-item[data-required=yes] .form-label>span:first-child::after{content:\"*\";color:var(--rs-input-require-label-color)}.rs-drawer-form-container .section-form .form-item .form-label{flex:none;width:144px;height:28px;margin-right:16px;color:#43566c;font-family:Arial;font-size:12px;font-style:normal;font-weight:400;line-height:14px;display:flex;flex-flow:row nowrap;align-items:center}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip{margin-left:4px}.rs-drawer-form-container .section-form .form-item .form-label .form-tooltip .tooltip-icon::before{content:\" \";display:block;width:14px;height:14px;background-image:url(../../assets/img/tooltip-icon.svg);background-size:contain;cursor:pointer}.rs-drawer-form-container .section-form .form-item .form-content{flex:auto}@media (max-width:1420px){.rs-drawer-form-container .section-form .form-item{width:100%}}.rs-drawer-form-container .anchor-container{flex:none;display:flex;flex-flow:column nowrap;gap:4px;min-width:120px;height:auto;position:-webkit-sticky;position:sticky;top:56px}.rs-drawer-form-container .anchor-item{min-width:120px;padding:4px 12px;border-left:1px solid #eaedf0;cursor:pointer;color:#44566c;font-family:Arial;font-size:11px;font-style:normal;font-weight:400;line-height:16px;position:relative}.rs-drawer-form-container .anchor-item::before{content:attr(data-content);color:#44566c;font-weight:400;position:absolute;left:12px}.rs-drawer-form-container .anchor-item::after{content:attr(data-content);visibility:hidden;color:#1364b3;font-weight:700}.rs-drawer-form-container .anchor-item[data-active=yes]{border-color:#1f7bff}.rs-drawer-form-container .anchor-item[data-active=yes]::before{visibility:hidden}.rs-drawer-form-container .anchor-item[data-active=yes]::after{visibility:visible}.rs-drawer-tooltip.e-tooltip-wrap{border:none;background-color:#44566c}.rs-drawer-tooltip.e-tooltip-wrap .e-arrow-tip{height:4px;visibility:hidden}"]
|
|
22866
22870
|
}] }
|
|
22867
22871
|
];
|
|
22868
22872
|
/** @nocollapse */
|
|
@@ -22944,6 +22948,1227 @@ if (false) {
|
|
|
22944
22948
|
DrawerFormComponent.prototype.ref;
|
|
22945
22949
|
}
|
|
22946
22950
|
|
|
22951
|
+
/**
|
|
22952
|
+
* @fileoverview added by tsickle
|
|
22953
|
+
* Generated from: lib/form/richtexteditor/ai-config.ts
|
|
22954
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
22955
|
+
*/
|
|
22956
|
+
/**
|
|
22957
|
+
* @record
|
|
22958
|
+
*/
|
|
22959
|
+
function AIConfig() { }
|
|
22960
|
+
if (false) {
|
|
22961
|
+
/** @type {?} */
|
|
22962
|
+
AIConfig.prototype.endpoint;
|
|
22963
|
+
/** @type {?} */
|
|
22964
|
+
AIConfig.prototype.apiKey;
|
|
22965
|
+
/** @type {?} */
|
|
22966
|
+
AIConfig.prototype.deployment;
|
|
22967
|
+
/** @type {?} */
|
|
22968
|
+
AIConfig.prototype.apiVersion;
|
|
22969
|
+
/** @type {?} */
|
|
22970
|
+
AIConfig.prototype.enabled;
|
|
22971
|
+
}
|
|
22972
|
+
// 从环境配置获取AI配置
|
|
22973
|
+
/**
|
|
22974
|
+
* @return {?}
|
|
22975
|
+
*/
|
|
22976
|
+
function getAIConfig() {
|
|
22977
|
+
return {
|
|
22978
|
+
endpoint: "https://aidevused.openai.azure.com/",
|
|
22979
|
+
apiKey: "ccba76e279f64653a50ac4fee90afe5c",
|
|
22980
|
+
deployment: "gpt-4",
|
|
22981
|
+
apiVersion: "2025-01-01-preview",
|
|
22982
|
+
enabled: true,
|
|
22983
|
+
};
|
|
22984
|
+
}
|
|
22985
|
+
// 检查配置是否有效
|
|
22986
|
+
/**
|
|
22987
|
+
* @param {?} config
|
|
22988
|
+
* @return {?}
|
|
22989
|
+
*/
|
|
22990
|
+
function isAIConfigValid(config) {
|
|
22991
|
+
// 检查是否为aidevused端点且有有效API密钥
|
|
22992
|
+
return !!((config.endpoint &&
|
|
22993
|
+
config.apiKey &&
|
|
22994
|
+
config.deployment &&
|
|
22995
|
+
config.enabled &&
|
|
22996
|
+
config.endpoint === "https://aidevused.openai.azure.com/" &&
|
|
22997
|
+
config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
|
|
22998
|
+
);
|
|
22999
|
+
}
|
|
23000
|
+
// 从后端API获取AI配置(推荐方式)
|
|
23001
|
+
/**
|
|
23002
|
+
* @return {?}
|
|
23003
|
+
* @this {*}
|
|
23004
|
+
*/
|
|
23005
|
+
function getAIConfigFromBackend() {
|
|
23006
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23007
|
+
return __generator(this, function (_a) {
|
|
23008
|
+
try {
|
|
23009
|
+
// 这里应该调用你的后端API来获取AI配置
|
|
23010
|
+
// 例如:return await this.http.get('/api/ai-config');
|
|
23011
|
+
// 临时返回默认配置
|
|
23012
|
+
return [2 /*return*/, getAIConfig()];
|
|
23013
|
+
}
|
|
23014
|
+
catch (error) {
|
|
23015
|
+
console.error("Failed to get AI config from backend:", error);
|
|
23016
|
+
return [2 /*return*/, getAIConfig()];
|
|
23017
|
+
}
|
|
23018
|
+
return [2 /*return*/];
|
|
23019
|
+
});
|
|
23020
|
+
});
|
|
23021
|
+
}
|
|
23022
|
+
|
|
23023
|
+
/**
|
|
23024
|
+
* @fileoverview added by tsickle
|
|
23025
|
+
* Generated from: lib/form/richtexteditor/openapi.ts
|
|
23026
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23027
|
+
*/
|
|
23028
|
+
// import { testAIFunction } from './ai-test';
|
|
23029
|
+
// testAIFunction();
|
|
23030
|
+
// 使用fetch API发送请求到Azure OpenAI
|
|
23031
|
+
/**
|
|
23032
|
+
* @param {?} messages
|
|
23033
|
+
* @param {?} config
|
|
23034
|
+
* @return {?}
|
|
23035
|
+
* @this {*}
|
|
23036
|
+
*/
|
|
23037
|
+
function sendAIRequest(messages, config) {
|
|
23038
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23039
|
+
var url, url1, response, errorText, data, error_1;
|
|
23040
|
+
return __generator(this, function (_a) {
|
|
23041
|
+
switch (_a.label) {
|
|
23042
|
+
case 0:
|
|
23043
|
+
_a.trys.push([0, 5, , 6]);
|
|
23044
|
+
url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
|
|
23045
|
+
url1 = "" + config.endpoint;
|
|
23046
|
+
return [4 /*yield*/, fetch(url, {
|
|
23047
|
+
method: 'POST',
|
|
23048
|
+
headers: {
|
|
23049
|
+
'Content-Type': 'application/json',
|
|
23050
|
+
'api-key': config.apiKey,
|
|
23051
|
+
},
|
|
23052
|
+
body: JSON.stringify({
|
|
23053
|
+
messages: messages,
|
|
23054
|
+
max_tokens: 1000,
|
|
23055
|
+
temperature: 0.7,
|
|
23056
|
+
top_p: 1,
|
|
23057
|
+
frequency_penalty: 0,
|
|
23058
|
+
presence_penalty: 0,
|
|
23059
|
+
}),
|
|
23060
|
+
})];
|
|
23061
|
+
case 1:
|
|
23062
|
+
response = _a.sent();
|
|
23063
|
+
if (!!response.ok) return [3 /*break*/, 3];
|
|
23064
|
+
return [4 /*yield*/, response.text()];
|
|
23065
|
+
case 2:
|
|
23066
|
+
errorText = _a.sent();
|
|
23067
|
+
throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
|
|
23068
|
+
case 3: return [4 /*yield*/, response.json()];
|
|
23069
|
+
case 4:
|
|
23070
|
+
data = _a.sent();
|
|
23071
|
+
if (!data.choices || !data.choices[0] || !data.choices[0].message) {
|
|
23072
|
+
throw new Error('Invalid response format from AI service');
|
|
23073
|
+
}
|
|
23074
|
+
return [2 /*return*/, data.choices[0].message.content];
|
|
23075
|
+
case 5:
|
|
23076
|
+
error_1 = _a.sent();
|
|
23077
|
+
console.error('AI request failed:', error_1);
|
|
23078
|
+
throw error_1;
|
|
23079
|
+
case 6: return [2 /*return*/];
|
|
23080
|
+
}
|
|
23081
|
+
});
|
|
23082
|
+
});
|
|
23083
|
+
}
|
|
23084
|
+
// 备用方案:使用模拟数据(用于开发测试)
|
|
23085
|
+
/**
|
|
23086
|
+
* @param {?} subQuery
|
|
23087
|
+
* @param {?} promptQuery
|
|
23088
|
+
* @return {?}
|
|
23089
|
+
*/
|
|
23090
|
+
function getMockAIResponse(subQuery, promptQuery) {
|
|
23091
|
+
var e_1, _a;
|
|
23092
|
+
/** @type {?} */
|
|
23093
|
+
var mockResponses = {
|
|
23094
|
+
Rephrase: "Rephrased: " + promptQuery,
|
|
23095
|
+
Grammar: "Corrected: " + promptQuery,
|
|
23096
|
+
Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
|
|
23097
|
+
Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
|
|
23098
|
+
Translate: "Translated: " + promptQuery,
|
|
23099
|
+
SentimentAnalysis: '😊 Positive',
|
|
23100
|
+
};
|
|
23101
|
+
try {
|
|
23102
|
+
for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
23103
|
+
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
23104
|
+
if (subQuery.includes(key)) {
|
|
23105
|
+
return value;
|
|
23106
|
+
}
|
|
23107
|
+
}
|
|
23108
|
+
}
|
|
23109
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
23110
|
+
finally {
|
|
23111
|
+
try {
|
|
23112
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
23113
|
+
}
|
|
23114
|
+
finally { if (e_1) throw e_1.error; }
|
|
23115
|
+
}
|
|
23116
|
+
return "AI processed: " + promptQuery;
|
|
23117
|
+
}
|
|
23118
|
+
// 主要的AI请求方法
|
|
23119
|
+
/**
|
|
23120
|
+
* @param {?} subQuery
|
|
23121
|
+
* @param {?} promptQuery
|
|
23122
|
+
* @return {?}
|
|
23123
|
+
* @this {*}
|
|
23124
|
+
*/
|
|
23125
|
+
function OpenAiModelRTE(subQuery, promptQuery) {
|
|
23126
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23127
|
+
var config, messages, result, error_2;
|
|
23128
|
+
return __generator(this, function (_a) {
|
|
23129
|
+
switch (_a.label) {
|
|
23130
|
+
case 0:
|
|
23131
|
+
_a.trys.push([0, 2, , 3]);
|
|
23132
|
+
config = getAIConfig();
|
|
23133
|
+
// 检查配置是否有效
|
|
23134
|
+
if (!isAIConfigValid(config)) {
|
|
23135
|
+
console.warn('AI configuration is incomplete or disabled, using mock response');
|
|
23136
|
+
return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
|
|
23137
|
+
}
|
|
23138
|
+
messages = [
|
|
23139
|
+
{
|
|
23140
|
+
role: 'system',
|
|
23141
|
+
content: subQuery.includes('emoji followed by the sentiment in the format')
|
|
23142
|
+
? 'You are a helpful assistant. Please respond in string format.'
|
|
23143
|
+
: "NOTE: Return same html format just do changes content only. don't change html formats.",
|
|
23144
|
+
},
|
|
23145
|
+
{
|
|
23146
|
+
role: 'user',
|
|
23147
|
+
content: subQuery + " " + promptQuery,
|
|
23148
|
+
},
|
|
23149
|
+
];
|
|
23150
|
+
return [4 /*yield*/, sendAIRequest(messages, config)];
|
|
23151
|
+
case 1:
|
|
23152
|
+
result = _a.sent();
|
|
23153
|
+
return [2 /*return*/, result];
|
|
23154
|
+
case 2:
|
|
23155
|
+
error_2 = _a.sent();
|
|
23156
|
+
console.error('AI request failed, using mock response:', error_2);
|
|
23157
|
+
return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
|
|
23158
|
+
case 3: return [2 /*return*/];
|
|
23159
|
+
}
|
|
23160
|
+
});
|
|
23161
|
+
});
|
|
23162
|
+
}
|
|
23163
|
+
// 兼容性方法(保持向后兼容)
|
|
23164
|
+
/**
|
|
23165
|
+
* @param {?} options
|
|
23166
|
+
* @return {?}
|
|
23167
|
+
* @this {*}
|
|
23168
|
+
*/
|
|
23169
|
+
function getAzureChatAIRequest(options) {
|
|
23170
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23171
|
+
var config, result, err_1;
|
|
23172
|
+
return __generator(this, function (_a) {
|
|
23173
|
+
switch (_a.label) {
|
|
23174
|
+
case 0:
|
|
23175
|
+
_a.trys.push([0, 2, , 3]);
|
|
23176
|
+
config = getAIConfig();
|
|
23177
|
+
if (!isAIConfigValid(config)) {
|
|
23178
|
+
return [2 /*return*/, null];
|
|
23179
|
+
}
|
|
23180
|
+
return [4 /*yield*/, sendAIRequest(options.messages, config)];
|
|
23181
|
+
case 1:
|
|
23182
|
+
result = _a.sent();
|
|
23183
|
+
return [2 /*return*/, result];
|
|
23184
|
+
case 2:
|
|
23185
|
+
err_1 = _a.sent();
|
|
23186
|
+
console.error('Error occurred:', err_1);
|
|
23187
|
+
return [2 /*return*/, null];
|
|
23188
|
+
case 3: return [2 /*return*/];
|
|
23189
|
+
}
|
|
23190
|
+
});
|
|
23191
|
+
});
|
|
23192
|
+
}
|
|
23193
|
+
/**
|
|
23194
|
+
* @param {?} prompt
|
|
23195
|
+
* @return {?}
|
|
23196
|
+
* @this {*}
|
|
23197
|
+
*/
|
|
23198
|
+
function getAzureTextAIRequest(prompt) {
|
|
23199
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23200
|
+
var config, messages, result, err_2;
|
|
23201
|
+
return __generator(this, function (_a) {
|
|
23202
|
+
switch (_a.label) {
|
|
23203
|
+
case 0:
|
|
23204
|
+
_a.trys.push([0, 2, , 3]);
|
|
23205
|
+
config = getAIConfig();
|
|
23206
|
+
if (!isAIConfigValid(config)) {
|
|
23207
|
+
return [2 /*return*/, undefined];
|
|
23208
|
+
}
|
|
23209
|
+
messages = [
|
|
23210
|
+
{
|
|
23211
|
+
role: 'user',
|
|
23212
|
+
content: prompt,
|
|
23213
|
+
},
|
|
23214
|
+
];
|
|
23215
|
+
return [4 /*yield*/, sendAIRequest(messages, config)];
|
|
23216
|
+
case 1:
|
|
23217
|
+
result = _a.sent();
|
|
23218
|
+
return [2 /*return*/, result];
|
|
23219
|
+
case 2:
|
|
23220
|
+
err_2 = _a.sent();
|
|
23221
|
+
console.error('Error occurred:', err_2);
|
|
23222
|
+
return [2 /*return*/, undefined];
|
|
23223
|
+
case 3: return [2 /*return*/];
|
|
23224
|
+
}
|
|
23225
|
+
});
|
|
23226
|
+
});
|
|
23227
|
+
}
|
|
23228
|
+
|
|
23229
|
+
/**
|
|
23230
|
+
* @fileoverview added by tsickle
|
|
23231
|
+
* Generated from: lib/form/richtexteditor/data-config.ts
|
|
23232
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23233
|
+
*/
|
|
23234
|
+
// font family
|
|
23235
|
+
/** @type {?} */
|
|
23236
|
+
var fontFamily = {
|
|
23237
|
+
default: "Arial",
|
|
23238
|
+
items: [
|
|
23239
|
+
{
|
|
23240
|
+
text: "Arial",
|
|
23241
|
+
value: "Arial, Helvetica, sans-serif",
|
|
23242
|
+
cssClass: "e-arial",
|
|
23243
|
+
command: "Font",
|
|
23244
|
+
subCommand: "FontName",
|
|
23245
|
+
},
|
|
23246
|
+
{
|
|
23247
|
+
text: "Times New Roman",
|
|
23248
|
+
value: "Times New Roman,Times,serif",
|
|
23249
|
+
cssClass: "e-times-new-roman",
|
|
23250
|
+
command: "Font",
|
|
23251
|
+
subCommand: "FontName",
|
|
23252
|
+
},
|
|
23253
|
+
{
|
|
23254
|
+
text: "Helvetica",
|
|
23255
|
+
value: "Helvetica",
|
|
23256
|
+
cssClass: "e-helvetica",
|
|
23257
|
+
command: "Font",
|
|
23258
|
+
subCommand: "FontName",
|
|
23259
|
+
},
|
|
23260
|
+
{
|
|
23261
|
+
text: "Calibri",
|
|
23262
|
+
value: "Calibri, Helvetica, sans-serif",
|
|
23263
|
+
cssClass: "e-calibri",
|
|
23264
|
+
command: "Font",
|
|
23265
|
+
subCommand: "FontName",
|
|
23266
|
+
},
|
|
23267
|
+
{
|
|
23268
|
+
text: "Verdana",
|
|
23269
|
+
value: "Verdana,Geneva,sans-serif",
|
|
23270
|
+
cssClass: "e-verdana",
|
|
23271
|
+
command: "Font",
|
|
23272
|
+
subCommand: "FontName",
|
|
23273
|
+
},
|
|
23274
|
+
{
|
|
23275
|
+
text: "Georgia",
|
|
23276
|
+
value: "Georgia,serif",
|
|
23277
|
+
cssClass: "e-georgia",
|
|
23278
|
+
command: "Font",
|
|
23279
|
+
subCommand: "FontName",
|
|
23280
|
+
},
|
|
23281
|
+
{
|
|
23282
|
+
text: "Open Sans",
|
|
23283
|
+
value: "Open Sans, sans-serif",
|
|
23284
|
+
cssClass: "e-open-sans",
|
|
23285
|
+
command: "Font",
|
|
23286
|
+
subCommand: "FontName",
|
|
23287
|
+
},
|
|
23288
|
+
{
|
|
23289
|
+
text: "Roboto",
|
|
23290
|
+
value: "Roboto",
|
|
23291
|
+
cssClass: "e-roboto",
|
|
23292
|
+
command: "Font",
|
|
23293
|
+
subCommand: "FontName",
|
|
23294
|
+
},
|
|
23295
|
+
{
|
|
23296
|
+
text: "Lato",
|
|
23297
|
+
value: "Lato, sans-serif",
|
|
23298
|
+
cssClass: "e-lato",
|
|
23299
|
+
command: "Font",
|
|
23300
|
+
subCommand: "FontName",
|
|
23301
|
+
},
|
|
23302
|
+
{
|
|
23303
|
+
text: "Montserrat",
|
|
23304
|
+
value: "Montserrat, sans-serif",
|
|
23305
|
+
cssClass: "e-montserrat",
|
|
23306
|
+
command: "Font",
|
|
23307
|
+
subCommand: "FontName",
|
|
23308
|
+
},
|
|
23309
|
+
{
|
|
23310
|
+
text: "Segoe UI",
|
|
23311
|
+
value: "Segoe UI",
|
|
23312
|
+
cssClass: "e-segoe-ui",
|
|
23313
|
+
command: "Font",
|
|
23314
|
+
subCommand: "FontName",
|
|
23315
|
+
},
|
|
23316
|
+
{
|
|
23317
|
+
text: "Impact",
|
|
23318
|
+
value: "Impact,Charcoal,sans-serif",
|
|
23319
|
+
cssClass: "e-impact",
|
|
23320
|
+
command: "Font",
|
|
23321
|
+
subCommand: "FontName",
|
|
23322
|
+
},
|
|
23323
|
+
],
|
|
23324
|
+
};
|
|
23325
|
+
// line height配置
|
|
23326
|
+
/** @type {?} */
|
|
23327
|
+
var lineHeight_items = [
|
|
23328
|
+
{
|
|
23329
|
+
text: "1.0",
|
|
23330
|
+
},
|
|
23331
|
+
{
|
|
23332
|
+
text: "1.15",
|
|
23333
|
+
},
|
|
23334
|
+
{
|
|
23335
|
+
text: "1.5",
|
|
23336
|
+
},
|
|
23337
|
+
{
|
|
23338
|
+
text: "2.0",
|
|
23339
|
+
},
|
|
23340
|
+
{
|
|
23341
|
+
text: "2.5",
|
|
23342
|
+
},
|
|
23343
|
+
{
|
|
23344
|
+
text: "3.0",
|
|
23345
|
+
},
|
|
23346
|
+
];
|
|
23347
|
+
/**
|
|
23348
|
+
* @record
|
|
23349
|
+
*/
|
|
23350
|
+
function BulletStyle() { }
|
|
23351
|
+
if (false) {
|
|
23352
|
+
/** @type {?} */
|
|
23353
|
+
BulletStyle.prototype.id;
|
|
23354
|
+
/** @type {?} */
|
|
23355
|
+
BulletStyle.prototype.text;
|
|
23356
|
+
/** @type {?} */
|
|
23357
|
+
BulletStyle.prototype.symbol;
|
|
23358
|
+
/** @type {?} */
|
|
23359
|
+
BulletStyle.prototype.iconCss;
|
|
23360
|
+
/** @type {?} */
|
|
23361
|
+
BulletStyle.prototype.description;
|
|
23362
|
+
}
|
|
23363
|
+
/** @type {?} */
|
|
23364
|
+
var BULLET_STYLES = [
|
|
23365
|
+
{
|
|
23366
|
+
id: "disc",
|
|
23367
|
+
text: "● 实心圆点",
|
|
23368
|
+
symbol: "●",
|
|
23369
|
+
iconCss: "e-icons e-bullet-disc",
|
|
23370
|
+
description: "标准实心圆点",
|
|
23371
|
+
},
|
|
23372
|
+
{
|
|
23373
|
+
id: "circle",
|
|
23374
|
+
text: "○ 空心圆点",
|
|
23375
|
+
symbol: "○",
|
|
23376
|
+
iconCss: "e-icons e-bullet-circle",
|
|
23377
|
+
description: "空心圆点",
|
|
23378
|
+
},
|
|
23379
|
+
{
|
|
23380
|
+
id: "square",
|
|
23381
|
+
text: "■ 实心方块",
|
|
23382
|
+
symbol: "■",
|
|
23383
|
+
iconCss: "e-icons e-bullet-square",
|
|
23384
|
+
description: "实心方块",
|
|
23385
|
+
},
|
|
23386
|
+
{
|
|
23387
|
+
id: "diamond",
|
|
23388
|
+
text: "◆ 实心菱形",
|
|
23389
|
+
symbol: "◆",
|
|
23390
|
+
iconCss: "e-icons e-bullet-diamond",
|
|
23391
|
+
description: "实心菱形",
|
|
23392
|
+
},
|
|
23393
|
+
{
|
|
23394
|
+
id: "triangle",
|
|
23395
|
+
text: "► 实心三角",
|
|
23396
|
+
symbol: "►",
|
|
23397
|
+
iconCss: "e-icons e-bullet-triangle",
|
|
23398
|
+
description: "实心三角形",
|
|
23399
|
+
},
|
|
23400
|
+
{
|
|
23401
|
+
id: "arrow",
|
|
23402
|
+
text: "➤ 箭头",
|
|
23403
|
+
symbol: "➤",
|
|
23404
|
+
iconCss: "e-icons e-bullet-arrow",
|
|
23405
|
+
description: "箭头符号",
|
|
23406
|
+
},
|
|
23407
|
+
{
|
|
23408
|
+
id: "star",
|
|
23409
|
+
text: "★ 星形",
|
|
23410
|
+
symbol: "★",
|
|
23411
|
+
iconCss: "e-icons e-bullet-star",
|
|
23412
|
+
description: "星形符号",
|
|
23413
|
+
},
|
|
23414
|
+
{
|
|
23415
|
+
id: "check",
|
|
23416
|
+
text: "✓ 对勾",
|
|
23417
|
+
symbol: "✓",
|
|
23418
|
+
iconCss: "e-icons e-bullet-check",
|
|
23419
|
+
description: "对勾符号",
|
|
23420
|
+
},
|
|
23421
|
+
{
|
|
23422
|
+
id: "heart",
|
|
23423
|
+
text: "♥ 心形",
|
|
23424
|
+
symbol: "♥",
|
|
23425
|
+
iconCss: "e-icons e-bullet-heart",
|
|
23426
|
+
description: "心形符号",
|
|
23427
|
+
},
|
|
23428
|
+
{
|
|
23429
|
+
id: "bullet",
|
|
23430
|
+
text: "• 小圆点",
|
|
23431
|
+
symbol: "•",
|
|
23432
|
+
iconCss: "e-icons e-bullet-bullet",
|
|
23433
|
+
description: "小圆点",
|
|
23434
|
+
},
|
|
23435
|
+
];
|
|
23436
|
+
// 获取符号样式
|
|
23437
|
+
/**
|
|
23438
|
+
* @param {?} id
|
|
23439
|
+
* @return {?}
|
|
23440
|
+
*/
|
|
23441
|
+
function getBulletStyle(id) {
|
|
23442
|
+
return BULLET_STYLES.find((/**
|
|
23443
|
+
* @param {?} style
|
|
23444
|
+
* @return {?}
|
|
23445
|
+
*/
|
|
23446
|
+
function (style) { return style.id === id; }));
|
|
23447
|
+
}
|
|
23448
|
+
// 获取所有符号样式
|
|
23449
|
+
/**
|
|
23450
|
+
* @return {?}
|
|
23451
|
+
*/
|
|
23452
|
+
function getAllBulletStyles() {
|
|
23453
|
+
return BULLET_STYLES;
|
|
23454
|
+
}
|
|
23455
|
+
// 应用符号样式到列表
|
|
23456
|
+
/**
|
|
23457
|
+
* @param {?} ul
|
|
23458
|
+
* @param {?} style
|
|
23459
|
+
* @return {?}
|
|
23460
|
+
*/
|
|
23461
|
+
function applyBulletStyle(ul, style) {
|
|
23462
|
+
if (style.id === "disc" || style.id === "circle" || style.id === "square") {
|
|
23463
|
+
// 使用CSS list-style-type
|
|
23464
|
+
ul.style.listStyleType = style.id;
|
|
23465
|
+
// 移除自定义符号
|
|
23466
|
+
ul.querySelectorAll(".custom-bullet").forEach((/**
|
|
23467
|
+
* @param {?} bullet
|
|
23468
|
+
* @return {?}
|
|
23469
|
+
*/
|
|
23470
|
+
function (bullet) { return bullet.remove(); }));
|
|
23471
|
+
}
|
|
23472
|
+
else {
|
|
23473
|
+
// 使用自定义符号
|
|
23474
|
+
ul.style.listStyleType = "none";
|
|
23475
|
+
ul.setAttribute("data-bullet-style", style.id);
|
|
23476
|
+
/** @type {?} */
|
|
23477
|
+
var listItems = ul.querySelectorAll("li");
|
|
23478
|
+
listItems.forEach((/**
|
|
23479
|
+
* @param {?} li
|
|
23480
|
+
* @return {?}
|
|
23481
|
+
*/
|
|
23482
|
+
function (li) {
|
|
23483
|
+
// 移除现有的自定义符号
|
|
23484
|
+
/** @type {?} */
|
|
23485
|
+
var existingBullet = li.querySelector(".custom-bullet");
|
|
23486
|
+
if (existingBullet) {
|
|
23487
|
+
existingBullet.remove();
|
|
23488
|
+
}
|
|
23489
|
+
// 添加新的自定义符号
|
|
23490
|
+
/** @type {?} */
|
|
23491
|
+
var bullet = document.createElement("span");
|
|
23492
|
+
bullet.className = "custom-bullet";
|
|
23493
|
+
bullet.textContent = style.symbol;
|
|
23494
|
+
bullet.style.marginRight = "8px";
|
|
23495
|
+
bullet.style.color = "#666";
|
|
23496
|
+
// 将符号插入到列表项的开头
|
|
23497
|
+
li.insertBefore(bullet, li.firstChild);
|
|
23498
|
+
}));
|
|
23499
|
+
}
|
|
23500
|
+
}
|
|
23501
|
+
|
|
23502
|
+
/**
|
|
23503
|
+
* @fileoverview added by tsickle
|
|
23504
|
+
* Generated from: lib/form/richtexteditor/index.component.ts
|
|
23505
|
+
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23506
|
+
*/
|
|
23507
|
+
var RichtexteditorComponent = /** @class */ (function () {
|
|
23508
|
+
function RichtexteditorComponent(ref) {
|
|
23509
|
+
this.ref = ref;
|
|
23510
|
+
// @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
|
|
23511
|
+
this.placeholder = "";
|
|
23512
|
+
this.value = "";
|
|
23513
|
+
this.height = 150;
|
|
23514
|
+
this.autoSaveOnIdle = true;
|
|
23515
|
+
this.target = "#container"; // dialog 弹窗父级
|
|
23516
|
+
// dialog 弹窗父级
|
|
23517
|
+
this.toolbarClick = new EventEmitter();
|
|
23518
|
+
this.change = new EventEmitter();
|
|
23519
|
+
// @Output() change = new EventEmitter();
|
|
23520
|
+
this.family = fontFamily;
|
|
23521
|
+
this.dialogWidth = "800px";
|
|
23522
|
+
this.dialogHeight = "642px";
|
|
23523
|
+
this.showZoomBtn = true;
|
|
23524
|
+
this.showMsg = false;
|
|
23525
|
+
this.insertImageSettings = {
|
|
23526
|
+
saveFormat: "Blob",
|
|
23527
|
+
allowedTypes: [".svg", ".png"],
|
|
23528
|
+
display: "none",
|
|
23529
|
+
};
|
|
23530
|
+
this.size = "";
|
|
23531
|
+
this.dropValIndex = 0;
|
|
23532
|
+
this.queryList = [
|
|
23533
|
+
{ id: "Rephrase", text: "Rephrase" },
|
|
23534
|
+
{ id: "Grammar", text: "Correct Grammar" },
|
|
23535
|
+
{ id: "Summarize", text: "Summarize" },
|
|
23536
|
+
{ id: "Elaborate", text: "Elaborate" },
|
|
23537
|
+
{ id: "Translate", text: "Translate" },
|
|
23538
|
+
{ id: "SentimentAnalysis", text: "Sentiment Analysis" },
|
|
23539
|
+
];
|
|
23540
|
+
this.rephraseTyleList = [
|
|
23541
|
+
{ text: "Standard", id: "Standard" },
|
|
23542
|
+
{ text: "Fluent", id: "Fluent" },
|
|
23543
|
+
{ text: "Professional", id: "Professional" },
|
|
23544
|
+
];
|
|
23545
|
+
this.languageList = [
|
|
23546
|
+
{ id: "EN", text: "English" },
|
|
23547
|
+
{ id: "ZH", text: "Chinese (Simplified)" },
|
|
23548
|
+
{ id: "ES", text: "Spanish" },
|
|
23549
|
+
{ id: "ZHT", text: "Chinese (Traditional)" },
|
|
23550
|
+
{ id: "HI", text: "Hindi" },
|
|
23551
|
+
{ id: "AR", text: "Arabic" },
|
|
23552
|
+
{ id: "BN", text: "Bengali" },
|
|
23553
|
+
{ id: "PT", text: "Portuguese" },
|
|
23554
|
+
{ id: "RU", text: "Russian" },
|
|
23555
|
+
{ id: "JA", text: "Japanese" },
|
|
23556
|
+
{ id: "DE", text: "German" },
|
|
23557
|
+
{ id: "KO", text: "Korean" },
|
|
23558
|
+
{ id: "FR", text: "French" },
|
|
23559
|
+
{ id: "IT", text: "Italian" },
|
|
23560
|
+
{ id: "TR", text: "Turkish" },
|
|
23561
|
+
];
|
|
23562
|
+
this.promptQuery = "";
|
|
23563
|
+
this.isSentimentCheck = false;
|
|
23564
|
+
this.subQuery = "";
|
|
23565
|
+
this.chipValue = "Standard";
|
|
23566
|
+
this.tools = {
|
|
23567
|
+
enableFloating: false,
|
|
23568
|
+
items: [
|
|
23569
|
+
{
|
|
23570
|
+
tooltipText: "AI Assist",
|
|
23571
|
+
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>',
|
|
23572
|
+
},
|
|
23573
|
+
"Bold",
|
|
23574
|
+
"Italic",
|
|
23575
|
+
"Underline",
|
|
23576
|
+
"StrikeThrough",
|
|
23577
|
+
"FontName",
|
|
23578
|
+
"FontSize",
|
|
23579
|
+
"FontColor",
|
|
23580
|
+
"BackgroundColor",
|
|
23581
|
+
"LowerCase",
|
|
23582
|
+
"UpperCase",
|
|
23583
|
+
"|",
|
|
23584
|
+
"CreateTable",
|
|
23585
|
+
"Formats",
|
|
23586
|
+
"Alignments",
|
|
23587
|
+
{
|
|
23588
|
+
tooltipText: "Line Height",
|
|
23589
|
+
template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
|
|
23590
|
+
},
|
|
23591
|
+
"OrderedList",
|
|
23592
|
+
"UnorderedList",
|
|
23593
|
+
"Outdent",
|
|
23594
|
+
"Indent",
|
|
23595
|
+
"|",
|
|
23596
|
+
"CreateLink",
|
|
23597
|
+
{
|
|
23598
|
+
tooltipText: "",
|
|
23599
|
+
template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
|
|
23600
|
+
'<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>',
|
|
23601
|
+
},
|
|
23602
|
+
"|",
|
|
23603
|
+
"FormatPainter",
|
|
23604
|
+
"ClearFormat",
|
|
23605
|
+
"|",
|
|
23606
|
+
"Undo",
|
|
23607
|
+
"Redo",
|
|
23608
|
+
],
|
|
23609
|
+
};
|
|
23610
|
+
}
|
|
23611
|
+
/**
|
|
23612
|
+
* @return {?}
|
|
23613
|
+
*/
|
|
23614
|
+
RichtexteditorComponent.prototype.ngOnInit = /**
|
|
23615
|
+
* @return {?}
|
|
23616
|
+
*/
|
|
23617
|
+
function () { };
|
|
23618
|
+
/**
|
|
23619
|
+
* @param {?} args
|
|
23620
|
+
* @return {?}
|
|
23621
|
+
*/
|
|
23622
|
+
RichtexteditorComponent.prototype.onContentChange = /**
|
|
23623
|
+
* @param {?} args
|
|
23624
|
+
* @return {?}
|
|
23625
|
+
*/
|
|
23626
|
+
function (args) {
|
|
23627
|
+
/** @type {?} */
|
|
23628
|
+
var tables = document.querySelectorAll("table.e-rte-table");
|
|
23629
|
+
tables.forEach((/**
|
|
23630
|
+
* @param {?} table
|
|
23631
|
+
* @return {?}
|
|
23632
|
+
*/
|
|
23633
|
+
function (table) {
|
|
23634
|
+
/** @type {?} */
|
|
23635
|
+
var htmlTable = (/** @type {?} */ (table));
|
|
23636
|
+
htmlTable.style.marginBottom = "10px";
|
|
23637
|
+
htmlTable.style.borderCollapse = "collapse";
|
|
23638
|
+
htmlTable.style.emptyCells = "show";
|
|
23639
|
+
/** @type {?} */
|
|
23640
|
+
var tdElements = table.querySelectorAll("td");
|
|
23641
|
+
tdElements.forEach((/**
|
|
23642
|
+
* @param {?} td
|
|
23643
|
+
* @return {?}
|
|
23644
|
+
*/
|
|
23645
|
+
function (td) {
|
|
23646
|
+
td.style.border = "1px solid #adb5bd";
|
|
23647
|
+
td.style.height = "20px";
|
|
23648
|
+
td.style.minWidth = "20px";
|
|
23649
|
+
td.style.padding = "2px 5px";
|
|
23650
|
+
td.style.boxSizing = "border-box";
|
|
23651
|
+
}));
|
|
23652
|
+
}));
|
|
23653
|
+
this.change.emit(args);
|
|
23654
|
+
};
|
|
23655
|
+
/**
|
|
23656
|
+
* @return {?}
|
|
23657
|
+
*/
|
|
23658
|
+
RichtexteditorComponent.prototype.onCreate = /**
|
|
23659
|
+
* @return {?}
|
|
23660
|
+
*/
|
|
23661
|
+
function () {
|
|
23662
|
+
var _this = this;
|
|
23663
|
+
//bind the a click event
|
|
23664
|
+
// let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
|
|
23665
|
+
// editorContent.addEventListener('click', this.OnClicked.bind(this));
|
|
23666
|
+
//add the line height
|
|
23667
|
+
this.editorManager = this.rteObj.formatter.editorManager;
|
|
23668
|
+
/** @type {?} */
|
|
23669
|
+
var splitButton = new DropDownButton({
|
|
23670
|
+
items: lineHeight_items,
|
|
23671
|
+
iconCss: "e-icons e-line-spacing",
|
|
23672
|
+
select: this.onSelect.bind(this),
|
|
23673
|
+
});
|
|
23674
|
+
splitButton.appendTo("#lineheight_tbar");
|
|
23675
|
+
// ai assist
|
|
23676
|
+
/** @type {?} */
|
|
23677
|
+
var aiassistantButton = new DropDownButton({
|
|
23678
|
+
items: this.queryList,
|
|
23679
|
+
// iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
|
|
23680
|
+
select: (/**
|
|
23681
|
+
* @param {?} args
|
|
23682
|
+
* @return {?}
|
|
23683
|
+
*/
|
|
23684
|
+
function (args) { return _this.aiQuerySelectedMenu(args); }),
|
|
23685
|
+
});
|
|
23686
|
+
aiassistantButton.appendTo("#ai_assistant_button_tbar");
|
|
23687
|
+
};
|
|
23688
|
+
/**
|
|
23689
|
+
* @private
|
|
23690
|
+
* @param {?} args
|
|
23691
|
+
* @return {?}
|
|
23692
|
+
*/
|
|
23693
|
+
RichtexteditorComponent.prototype.onSelect = /**
|
|
23694
|
+
* @private
|
|
23695
|
+
* @param {?} args
|
|
23696
|
+
* @return {?}
|
|
23697
|
+
*/
|
|
23698
|
+
function (args) {
|
|
23699
|
+
if (this.rteObj.formatter.getUndoRedoStack().length === 0) {
|
|
23700
|
+
this.rteObj.formatter.saveData();
|
|
23701
|
+
}
|
|
23702
|
+
/** @type {?} */
|
|
23703
|
+
var nodes = this.editorManager.domNode.blockNodes();
|
|
23704
|
+
for (var i = 0; nodes.length > i; i++) {
|
|
23705
|
+
((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
|
|
23706
|
+
}
|
|
23707
|
+
this.rteObj.formatter.saveData();
|
|
23708
|
+
this.rteObj.formatter.enableUndo(this.rteObj);
|
|
23709
|
+
};
|
|
23710
|
+
/**
|
|
23711
|
+
* @private
|
|
23712
|
+
* @param {?} args
|
|
23713
|
+
* @return {?}
|
|
23714
|
+
*/
|
|
23715
|
+
RichtexteditorComponent.prototype.aiQuerySelectedMenu = /**
|
|
23716
|
+
* @private
|
|
23717
|
+
* @param {?} args
|
|
23718
|
+
* @return {?}
|
|
23719
|
+
*/
|
|
23720
|
+
function (args) {
|
|
23721
|
+
this.dialogueOpen(args.item.text);
|
|
23722
|
+
};
|
|
23723
|
+
/**
|
|
23724
|
+
* @param {?} selectedQuery
|
|
23725
|
+
* @return {?}
|
|
23726
|
+
*/
|
|
23727
|
+
RichtexteditorComponent.prototype.dialogueOpen = /**
|
|
23728
|
+
* @param {?} selectedQuery
|
|
23729
|
+
* @return {?}
|
|
23730
|
+
*/
|
|
23731
|
+
function (selectedQuery) {
|
|
23732
|
+
var _this = this;
|
|
23733
|
+
/** @type {?} */
|
|
23734
|
+
var selectionText = this.rteObj.getSelectedHtml();
|
|
23735
|
+
this.selectedQuery = selectedQuery;
|
|
23736
|
+
if (selectionText) {
|
|
23737
|
+
/** @type {?} */
|
|
23738
|
+
var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
|
|
23739
|
+
((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
|
|
23740
|
+
this.dropValIndex = this.queryList.findIndex((/**
|
|
23741
|
+
* @param {?} q
|
|
23742
|
+
* @return {?}
|
|
23743
|
+
*/
|
|
23744
|
+
function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
|
|
23745
|
+
this.queryCategory.index = this.dropValIndex;
|
|
23746
|
+
this.leftRte.value = this.promptQuery = selectionText;
|
|
23747
|
+
this.leftRte.refreshUI();
|
|
23748
|
+
this.AIdialog.show();
|
|
23749
|
+
this.updateAISugesstionsData(selectedQuery);
|
|
23750
|
+
}
|
|
23751
|
+
else {
|
|
23752
|
+
this.showMsg = true;
|
|
23753
|
+
setTimeout((/**
|
|
23754
|
+
* @return {?}
|
|
23755
|
+
*/
|
|
23756
|
+
function () {
|
|
23757
|
+
_this.showMsg = false;
|
|
23758
|
+
}), 3000);
|
|
23759
|
+
console.log("Please select the content to perform the AI operation.");
|
|
23760
|
+
}
|
|
23761
|
+
};
|
|
23762
|
+
/**
|
|
23763
|
+
* @param {?} selectedQuery
|
|
23764
|
+
* @return {?}
|
|
23765
|
+
*/
|
|
23766
|
+
RichtexteditorComponent.prototype.updateAISugesstionsData = /**
|
|
23767
|
+
* @param {?} selectedQuery
|
|
23768
|
+
* @return {?}
|
|
23769
|
+
*/
|
|
23770
|
+
function (selectedQuery) {
|
|
23771
|
+
this.isSentimentCheck = false;
|
|
23772
|
+
switch (selectedQuery) {
|
|
23773
|
+
case "Summarize":
|
|
23774
|
+
this.subQuery = "Summarize the upcoming sentence shortly.";
|
|
23775
|
+
break;
|
|
23776
|
+
case "Elaborate":
|
|
23777
|
+
this.subQuery = "Elaborate on the upcoming sentence.";
|
|
23778
|
+
break;
|
|
23779
|
+
case "Rephrase":
|
|
23780
|
+
this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
|
|
23781
|
+
break;
|
|
23782
|
+
case "Correct Grammar":
|
|
23783
|
+
this.subQuery = "Correct the grammar of the upcoming sentence.";
|
|
23784
|
+
break;
|
|
23785
|
+
case "Translate":
|
|
23786
|
+
this.subQuery =
|
|
23787
|
+
"Translate the upcoming sentence to " + this.translatelanguage + ".";
|
|
23788
|
+
break;
|
|
23789
|
+
case "Sentiment Analysis":
|
|
23790
|
+
this.isSentimentCheck = true;
|
|
23791
|
+
this.subQuery =
|
|
23792
|
+
'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:';
|
|
23793
|
+
break;
|
|
23794
|
+
}
|
|
23795
|
+
this.updateAISugesstions();
|
|
23796
|
+
};
|
|
23797
|
+
/**
|
|
23798
|
+
* @return {?}
|
|
23799
|
+
*/
|
|
23800
|
+
RichtexteditorComponent.prototype.updateAISugesstions = /**
|
|
23801
|
+
* @return {?}
|
|
23802
|
+
*/
|
|
23803
|
+
function () {
|
|
23804
|
+
var _this = this;
|
|
23805
|
+
try {
|
|
23806
|
+
if (this.promptQuery) {
|
|
23807
|
+
((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
|
|
23808
|
+
"";
|
|
23809
|
+
((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
|
|
23810
|
+
"none";
|
|
23811
|
+
this.sentimentButton.element.style.display = "none";
|
|
23812
|
+
this.regenerateButton.disabled = true;
|
|
23813
|
+
this.copyButton.disabled = true;
|
|
23814
|
+
this.replaceButton.disabled = true;
|
|
23815
|
+
this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
|
|
23816
|
+
this.apiResultData.then((/**
|
|
23817
|
+
* @param {?} result
|
|
23818
|
+
* @return {?}
|
|
23819
|
+
*/
|
|
23820
|
+
function (result) {
|
|
23821
|
+
_this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
|
|
23822
|
+
_this.sentimentButton.content = result
|
|
23823
|
+
.toLowerCase()
|
|
23824
|
+
.includes("positive")
|
|
23825
|
+
? "😊 Positive"
|
|
23826
|
+
: result.toLowerCase().includes("negative")
|
|
23827
|
+
? "😞 Negative"
|
|
23828
|
+
: "😐 Neutral";
|
|
23829
|
+
_this.sentimentButton.element.style.display = !_this.isSentimentCheck
|
|
23830
|
+
? "none"
|
|
23831
|
+
: "";
|
|
23832
|
+
_this.rightRte.value = _this.AIResult;
|
|
23833
|
+
/** @type {?} */
|
|
23834
|
+
var noResultsFound = !(_this.AIResult || _this.promptQuery);
|
|
23835
|
+
((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
|
|
23836
|
+
_this.regenerateButton.disabled = noResultsFound;
|
|
23837
|
+
_this.copyButton.disabled = noResultsFound;
|
|
23838
|
+
_this.replaceButton.disabled = noResultsFound;
|
|
23839
|
+
((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
|
|
23840
|
+
"none";
|
|
23841
|
+
((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
|
|
23842
|
+
noResultsFound ? "none" : "";
|
|
23843
|
+
console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
|
|
23844
|
+
// this.ref.markForCheck();
|
|
23845
|
+
}));
|
|
23846
|
+
}
|
|
23847
|
+
}
|
|
23848
|
+
catch (_a) {
|
|
23849
|
+
// this.toastObj.show();
|
|
23850
|
+
}
|
|
23851
|
+
};
|
|
23852
|
+
/**
|
|
23853
|
+
* @param {?} subQuery
|
|
23854
|
+
* @param {?} promptQuery
|
|
23855
|
+
* @return {?}
|
|
23856
|
+
*/
|
|
23857
|
+
RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
|
|
23858
|
+
* @param {?} subQuery
|
|
23859
|
+
* @param {?} promptQuery
|
|
23860
|
+
* @return {?}
|
|
23861
|
+
*/
|
|
23862
|
+
function (subQuery, promptQuery) {
|
|
23863
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
23864
|
+
var content;
|
|
23865
|
+
return __generator(this, function (_a) {
|
|
23866
|
+
switch (_a.label) {
|
|
23867
|
+
case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
|
|
23868
|
+
case 1:
|
|
23869
|
+
content = _a.sent();
|
|
23870
|
+
return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
|
|
23871
|
+
}
|
|
23872
|
+
});
|
|
23873
|
+
});
|
|
23874
|
+
};
|
|
23875
|
+
/**
|
|
23876
|
+
* @return {?}
|
|
23877
|
+
*/
|
|
23878
|
+
RichtexteditorComponent.prototype.dialogShow = /**
|
|
23879
|
+
* @return {?}
|
|
23880
|
+
*/
|
|
23881
|
+
function () {
|
|
23882
|
+
var _this = this;
|
|
23883
|
+
(/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
|
|
23884
|
+
* @return {?}
|
|
23885
|
+
*/
|
|
23886
|
+
function () {
|
|
23887
|
+
_this.updateAISugesstions();
|
|
23888
|
+
}));
|
|
23889
|
+
(/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
|
|
23890
|
+
* @return {?}
|
|
23891
|
+
*/
|
|
23892
|
+
function () {
|
|
23893
|
+
_this.copyTextToClipboard(_this.AIResult);
|
|
23894
|
+
}));
|
|
23895
|
+
(/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
|
|
23896
|
+
* @return {?}
|
|
23897
|
+
*/
|
|
23898
|
+
function () {
|
|
23899
|
+
/** @type {?} */
|
|
23900
|
+
var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
|
|
23901
|
+
((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
|
|
23902
|
+
((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
|
|
23903
|
+
undo: true,
|
|
23904
|
+
});
|
|
23905
|
+
_this.closeDialog();
|
|
23906
|
+
}));
|
|
23907
|
+
((/** @type {?} */ (this.AIdialog))).element.style.display = "";
|
|
23908
|
+
};
|
|
23909
|
+
/**
|
|
23910
|
+
* @return {?}
|
|
23911
|
+
*/
|
|
23912
|
+
RichtexteditorComponent.prototype.closeDialog = /**
|
|
23913
|
+
* @return {?}
|
|
23914
|
+
*/
|
|
23915
|
+
function () {
|
|
23916
|
+
this.AIdialog.hide();
|
|
23917
|
+
this.rightRte.value = "";
|
|
23918
|
+
this.leftRte.value = "";
|
|
23919
|
+
this.promptQuery = "";
|
|
23920
|
+
this.chipValue = "Standard";
|
|
23921
|
+
this.AIResult = "";
|
|
23922
|
+
this.dropValIndex = 0;
|
|
23923
|
+
this.selectedQuery = "Rephrase";
|
|
23924
|
+
this.sentimentButton.content = "😊 Neutral";
|
|
23925
|
+
};
|
|
23926
|
+
/**
|
|
23927
|
+
* @param {?} text
|
|
23928
|
+
* @return {?}
|
|
23929
|
+
*/
|
|
23930
|
+
RichtexteditorComponent.prototype.copyTextToClipboard = /**
|
|
23931
|
+
* @param {?} text
|
|
23932
|
+
* @return {?}
|
|
23933
|
+
*/
|
|
23934
|
+
function (text) {
|
|
23935
|
+
if (navigator.clipboard) {
|
|
23936
|
+
navigator.clipboard
|
|
23937
|
+
.writeText(text)
|
|
23938
|
+
.then((/**
|
|
23939
|
+
* @return {?}
|
|
23940
|
+
*/
|
|
23941
|
+
function () {
|
|
23942
|
+
console.log("Text copied to clipboard successfully!");
|
|
23943
|
+
}))
|
|
23944
|
+
.catch((/**
|
|
23945
|
+
* @param {?} err
|
|
23946
|
+
* @return {?}
|
|
23947
|
+
*/
|
|
23948
|
+
function (err) {
|
|
23949
|
+
console.error("Failed to copy text: ", err);
|
|
23950
|
+
}));
|
|
23951
|
+
}
|
|
23952
|
+
else {
|
|
23953
|
+
// Fallback for browsers that do not support the Clipboard API
|
|
23954
|
+
/** @type {?} */
|
|
23955
|
+
var textarea = document.createElement("textarea");
|
|
23956
|
+
textarea.value = text;
|
|
23957
|
+
document.body.appendChild(textarea);
|
|
23958
|
+
textarea.select();
|
|
23959
|
+
try {
|
|
23960
|
+
document.execCommand("copy");
|
|
23961
|
+
console.log("Text copied to clipboard using execCommand");
|
|
23962
|
+
}
|
|
23963
|
+
catch (err) {
|
|
23964
|
+
console.error("Failed to copy text: ", err);
|
|
23965
|
+
}
|
|
23966
|
+
finally {
|
|
23967
|
+
document.body.removeChild(textarea);
|
|
23968
|
+
}
|
|
23969
|
+
}
|
|
23970
|
+
};
|
|
23971
|
+
/**
|
|
23972
|
+
* @return {?}
|
|
23973
|
+
*/
|
|
23974
|
+
RichtexteditorComponent.prototype.onOverlayClick = /**
|
|
23975
|
+
* @return {?}
|
|
23976
|
+
*/
|
|
23977
|
+
function () {
|
|
23978
|
+
/** @type {?} */
|
|
23979
|
+
var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
|
|
23980
|
+
if (activeEle) {
|
|
23981
|
+
activeEle.classList.remove("e-active");
|
|
23982
|
+
}
|
|
23983
|
+
this.closeDialog();
|
|
23984
|
+
};
|
|
23985
|
+
/**
|
|
23986
|
+
* @param {?} args
|
|
23987
|
+
* @return {?}
|
|
23988
|
+
*/
|
|
23989
|
+
RichtexteditorComponent.prototype.onQuerySelect = /**
|
|
23990
|
+
* @param {?} args
|
|
23991
|
+
* @return {?}
|
|
23992
|
+
*/
|
|
23993
|
+
function (args) {
|
|
23994
|
+
// this.chipList.selectedChips = 0;
|
|
23995
|
+
this.translatelanguage = "EN";
|
|
23996
|
+
this.selectedQuery = args.itemData.text;
|
|
23997
|
+
this.updateAISugesstionsData(args.itemData.text);
|
|
23998
|
+
};
|
|
23999
|
+
/**
|
|
24000
|
+
* @param {?} args
|
|
24001
|
+
* @return {?}
|
|
24002
|
+
*/
|
|
24003
|
+
RichtexteditorComponent.prototype.onLanguageSelect = /**
|
|
24004
|
+
* @param {?} args
|
|
24005
|
+
* @return {?}
|
|
24006
|
+
*/
|
|
24007
|
+
function (args) {
|
|
24008
|
+
this.translatelanguage = args.itemData.id;
|
|
24009
|
+
this.updateAISugesstionsData("Translate");
|
|
24010
|
+
};
|
|
24011
|
+
/**
|
|
24012
|
+
* @param {?} args
|
|
24013
|
+
* @return {?}
|
|
24014
|
+
*/
|
|
24015
|
+
RichtexteditorComponent.prototype.onChipClick = /**
|
|
24016
|
+
* @param {?} args
|
|
24017
|
+
* @return {?}
|
|
24018
|
+
*/
|
|
24019
|
+
function (args) {
|
|
24020
|
+
this.chipValue = args.itemData.text;
|
|
24021
|
+
// 事件会触发两次 必须判断args.text是否有值
|
|
24022
|
+
if (args.itemData.text)
|
|
24023
|
+
this.updateAISugesstionsData("Rephrase");
|
|
24024
|
+
};
|
|
24025
|
+
/**
|
|
24026
|
+
* @param {?} args
|
|
24027
|
+
* @return {?}
|
|
24028
|
+
*/
|
|
24029
|
+
RichtexteditorComponent.prototype._toolbarClick = /**
|
|
24030
|
+
* @param {?} args
|
|
24031
|
+
* @return {?}
|
|
24032
|
+
*/
|
|
24033
|
+
function (args) {
|
|
24034
|
+
this.toolbarClick.emit(args);
|
|
24035
|
+
};
|
|
24036
|
+
/**
|
|
24037
|
+
* @return {?}
|
|
24038
|
+
*/
|
|
24039
|
+
RichtexteditorComponent.prototype.hideToast = /**
|
|
24040
|
+
* @return {?}
|
|
24041
|
+
*/
|
|
24042
|
+
function () {
|
|
24043
|
+
this.showMsg = false;
|
|
24044
|
+
};
|
|
24045
|
+
/**
|
|
24046
|
+
* @return {?}
|
|
24047
|
+
*/
|
|
24048
|
+
RichtexteditorComponent.prototype.onZoom = /**
|
|
24049
|
+
* @return {?}
|
|
24050
|
+
*/
|
|
24051
|
+
function () {
|
|
24052
|
+
if (this.size === "largest") {
|
|
24053
|
+
this.size = ""; // 恢复到原始大小
|
|
24054
|
+
}
|
|
24055
|
+
else {
|
|
24056
|
+
this.size = "largest"; // 设置为最大化
|
|
24057
|
+
}
|
|
24058
|
+
};
|
|
24059
|
+
RichtexteditorComponent.decorators = [
|
|
24060
|
+
{ type: Component, args: [{
|
|
24061
|
+
selector: "rs-richtext-editor",
|
|
24062
|
+
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",
|
|
24063
|
+
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}"]
|
|
24064
|
+
}] }
|
|
24065
|
+
];
|
|
24066
|
+
/** @nocollapse */
|
|
24067
|
+
RichtexteditorComponent.ctorParameters = function () { return [
|
|
24068
|
+
{ type: ChangeDetectorRef }
|
|
24069
|
+
]; };
|
|
24070
|
+
RichtexteditorComponent.propDecorators = {
|
|
24071
|
+
rteObj: [{ type: ViewChild, args: ["editor", { static: false },] }],
|
|
24072
|
+
queryCategory: [{ type: ViewChild, args: ["queryCategory", { static: false },] }],
|
|
24073
|
+
leftRte: [{ type: ViewChild, args: ["leftRte", { static: false },] }],
|
|
24074
|
+
rightRte: [{ type: ViewChild, args: ["rightRte", { static: false },] }],
|
|
24075
|
+
AIdialog: [{ type: ViewChild, args: ["AIdialog", { static: true },] }],
|
|
24076
|
+
sentimentButton: [{ type: ViewChild, args: ["sentimentButton", { static: false },] }],
|
|
24077
|
+
regenerateButton: [{ type: ViewChild, args: ["regenerateButton", { static: false },] }],
|
|
24078
|
+
copyButton: [{ type: ViewChild, args: ["copyButton", { static: false },] }],
|
|
24079
|
+
replaceButton: [{ type: ViewChild, args: ["replaceButton", { static: false },] }],
|
|
24080
|
+
placeholder: [{ type: Input }],
|
|
24081
|
+
value: [{ type: Input }],
|
|
24082
|
+
height: [{ type: Input }],
|
|
24083
|
+
autoSaveOnIdle: [{ type: Input }],
|
|
24084
|
+
target: [{ type: Input }],
|
|
24085
|
+
toolbarClick: [{ type: Output }],
|
|
24086
|
+
change: [{ type: Output }]
|
|
24087
|
+
};
|
|
24088
|
+
return RichtexteditorComponent;
|
|
24089
|
+
}());
|
|
24090
|
+
if (false) {
|
|
24091
|
+
/** @type {?} */
|
|
24092
|
+
RichtexteditorComponent.prototype.rteObj;
|
|
24093
|
+
/** @type {?} */
|
|
24094
|
+
RichtexteditorComponent.prototype.queryCategory;
|
|
24095
|
+
/** @type {?} */
|
|
24096
|
+
RichtexteditorComponent.prototype.leftRte;
|
|
24097
|
+
/** @type {?} */
|
|
24098
|
+
RichtexteditorComponent.prototype.rightRte;
|
|
24099
|
+
/** @type {?} */
|
|
24100
|
+
RichtexteditorComponent.prototype.AIdialog;
|
|
24101
|
+
/** @type {?} */
|
|
24102
|
+
RichtexteditorComponent.prototype.sentimentButton;
|
|
24103
|
+
/** @type {?} */
|
|
24104
|
+
RichtexteditorComponent.prototype.regenerateButton;
|
|
24105
|
+
/** @type {?} */
|
|
24106
|
+
RichtexteditorComponent.prototype.copyButton;
|
|
24107
|
+
/** @type {?} */
|
|
24108
|
+
RichtexteditorComponent.prototype.replaceButton;
|
|
24109
|
+
/** @type {?} */
|
|
24110
|
+
RichtexteditorComponent.prototype.placeholder;
|
|
24111
|
+
/** @type {?} */
|
|
24112
|
+
RichtexteditorComponent.prototype.value;
|
|
24113
|
+
/** @type {?} */
|
|
24114
|
+
RichtexteditorComponent.prototype.height;
|
|
24115
|
+
/** @type {?} */
|
|
24116
|
+
RichtexteditorComponent.prototype.autoSaveOnIdle;
|
|
24117
|
+
/** @type {?} */
|
|
24118
|
+
RichtexteditorComponent.prototype.target;
|
|
24119
|
+
/** @type {?} */
|
|
24120
|
+
RichtexteditorComponent.prototype.toolbarClick;
|
|
24121
|
+
/** @type {?} */
|
|
24122
|
+
RichtexteditorComponent.prototype.change;
|
|
24123
|
+
/** @type {?} */
|
|
24124
|
+
RichtexteditorComponent.prototype.family;
|
|
24125
|
+
/** @type {?} */
|
|
24126
|
+
RichtexteditorComponent.prototype.dialogWidth;
|
|
24127
|
+
/** @type {?} */
|
|
24128
|
+
RichtexteditorComponent.prototype.dialogHeight;
|
|
24129
|
+
/** @type {?} */
|
|
24130
|
+
RichtexteditorComponent.prototype.showZoomBtn;
|
|
24131
|
+
/** @type {?} */
|
|
24132
|
+
RichtexteditorComponent.prototype.showMsg;
|
|
24133
|
+
/** @type {?} */
|
|
24134
|
+
RichtexteditorComponent.prototype.insertImageSettings;
|
|
24135
|
+
/** @type {?} */
|
|
24136
|
+
RichtexteditorComponent.prototype.editorManager;
|
|
24137
|
+
/** @type {?} */
|
|
24138
|
+
RichtexteditorComponent.prototype.size;
|
|
24139
|
+
/** @type {?} */
|
|
24140
|
+
RichtexteditorComponent.prototype.selectedQuery;
|
|
24141
|
+
/** @type {?} */
|
|
24142
|
+
RichtexteditorComponent.prototype.dropValIndex;
|
|
24143
|
+
/** @type {?} */
|
|
24144
|
+
RichtexteditorComponent.prototype.queryList;
|
|
24145
|
+
/** @type {?} */
|
|
24146
|
+
RichtexteditorComponent.prototype.rephraseTyleList;
|
|
24147
|
+
/** @type {?} */
|
|
24148
|
+
RichtexteditorComponent.prototype.languageList;
|
|
24149
|
+
/** @type {?} */
|
|
24150
|
+
RichtexteditorComponent.prototype.promptQuery;
|
|
24151
|
+
/** @type {?} */
|
|
24152
|
+
RichtexteditorComponent.prototype.isSentimentCheck;
|
|
24153
|
+
/** @type {?} */
|
|
24154
|
+
RichtexteditorComponent.prototype.subQuery;
|
|
24155
|
+
/** @type {?} */
|
|
24156
|
+
RichtexteditorComponent.prototype.translatelanguage;
|
|
24157
|
+
/** @type {?} */
|
|
24158
|
+
RichtexteditorComponent.prototype.chipValue;
|
|
24159
|
+
/** @type {?} */
|
|
24160
|
+
RichtexteditorComponent.prototype.apiResultData;
|
|
24161
|
+
/** @type {?} */
|
|
24162
|
+
RichtexteditorComponent.prototype.AIResult;
|
|
24163
|
+
/** @type {?} */
|
|
24164
|
+
RichtexteditorComponent.prototype.tools;
|
|
24165
|
+
/**
|
|
24166
|
+
* @type {?}
|
|
24167
|
+
* @private
|
|
24168
|
+
*/
|
|
24169
|
+
RichtexteditorComponent.prototype.ref;
|
|
24170
|
+
}
|
|
24171
|
+
|
|
22947
24172
|
/**
|
|
22948
24173
|
* @fileoverview added by tsickle
|
|
22949
24174
|
* Generated from: lib/dialog/common-dialog/index.component.ts
|
|
@@ -23537,6 +24762,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
|
|
|
23537
24762
|
TagInputComponent,
|
|
23538
24763
|
RadioGroupComponent,
|
|
23539
24764
|
CheckboxGroupComponent,
|
|
24765
|
+
RichtexteditorComponent,
|
|
23540
24766
|
SwitchInputComponent,
|
|
23541
24767
|
EncryptedInputComponent,
|
|
23542
24768
|
SearchInputComponent,
|
|
@@ -23570,6 +24796,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
|
|
|
23570
24796
|
CheckBoxModule,
|
|
23571
24797
|
RadioButtonModule,
|
|
23572
24798
|
ButtonModule,
|
|
24799
|
+
ChipListModule,
|
|
23573
24800
|
DiagramModule,
|
|
23574
24801
|
TooltipModule,
|
|
23575
24802
|
DialogModule,
|
|
@@ -23654,6 +24881,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
|
|
|
23654
24881
|
CheckBoxModule,
|
|
23655
24882
|
RadioButtonModule,
|
|
23656
24883
|
ButtonModule,
|
|
24884
|
+
ChipListModule,
|
|
23657
24885
|
DiagramModule,
|
|
23658
24886
|
TooltipModule,
|
|
23659
24887
|
DialogModule,
|
|
@@ -23699,6 +24927,7 @@ var RaiseCommonLibModule = /** @class */ (function () {
|
|
|
23699
24927
|
TagInputComponent,
|
|
23700
24928
|
RadioGroupComponent,
|
|
23701
24929
|
CheckboxGroupComponent,
|
|
24930
|
+
RichtexteditorComponent,
|
|
23702
24931
|
SwitchInputComponent,
|
|
23703
24932
|
EncryptedInputComponent,
|
|
23704
24933
|
SearchInputComponent,
|
|
@@ -23735,5 +24964,5 @@ var RaiseCommonLibModule = /** @class */ (function () {
|
|
|
23735
24964
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
23736
24965
|
*/
|
|
23737
24966
|
|
|
23738
|
-
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 };
|
|
24967
|
+
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 };
|
|
23739
24968
|
//# sourceMappingURL=raise-common-lib.js.map
|