raise-common-lib 0.0.249 → 0.0.250
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 +197 -791
- 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/dialog/common-dialog/index.component.js +1 -1
- package/esm2015/lib/form/richtexteditor/data-config.js +68 -1
- package/esm2015/lib/form/richtexteditor/index.component.js +130 -474
- package/esm5/lib/dialog/common-dialog/index.component.js +1 -1
- package/esm5/lib/form/richtexteditor/data-config.js +68 -1
- package/esm5/lib/form/richtexteditor/index.component.js +132 -523
- package/fesm2015/raise-common-lib.js +196 -707
- package/fesm2015/raise-common-lib.js.map +1 -1
- package/fesm5/raise-common-lib.js +198 -792
- package/fesm5/raise-common-lib.js.map +1 -1
- package/lib/form/richtexteditor/data-config.d.ts +8 -0
- package/lib/form/richtexteditor/index.component.d.ts +41 -65
- package/package.json +1 -1
- package/raise-common-lib.metadata.json +1 -1
- package/src/assets/img/arrow_right.svg +4 -4
- package/src/assets/img/bullet-dash.svg +3 -0
- 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/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
- package/esm2015/lib/form/richtexteditor/ai-config.js +0 -70
- package/esm2015/lib/form/richtexteditor/openapi.js +0 -175
- package/esm5/lib/form/richtexteditor/ai-config.js +0 -73
- package/esm5/lib/form/richtexteditor/openapi.js +0 -208
- package/lib/form/richtexteditor/ai-config.d.ts +0 -10
- package/lib/form/richtexteditor/openapi.d.ts +0 -3
|
@@ -26149,7 +26149,7 @@
|
|
|
26149
26149
|
{ type: core.Component, args: [{
|
|
26150
26150
|
selector: "rs-common-dialog",
|
|
26151
26151
|
template: "<div class=\"dialog\" [ngClass]=\"size\" [ngStyle]=\"dialogStyle\">\r\n <!-- \u5934\u90E8 -->\r\n <div *ngIf=\"!hideHeader\" mat-dialog-title class=\"dialog__header\">\r\n <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=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n </div>\r\n </ng-template>\r\n <!-- <div class=\"header__title\">\r\n <img\r\n src=\"../../../assets/img/notification-status-warning.svg\"\r\n alt=\"\"\r\n *ngIf=\"showErrorIcon\"\r\n />\r\n {{ title }}\r\n <ng-content select=\"[titleSlot]\"></ng-content>\r\n </div> -->\r\n <div class=\"header__actions\">\r\n <div *ngIf=\"showZoomBtn\" class=\"header-btn\" (click)=\"onZoom()\">\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size === 'largest'\"\r\n src=\"../../../assets/img/dialog-shrink.svg\"\r\n />\r\n <img\r\n class=\"header-icon\"\r\n *ngIf=\"size !== 'largest'\"\r\n src=\"../../../assets/img/dialog-grow.svg\"\r\n />\r\n </div>\r\n <div *ngIf=\"!hideCloseIcon\" class=\"header-btn\" (click)=\"onClose()\">\r\n <img class=\"header-icon\" src=\"../../../assets/img/dialog-close.svg\" />\r\n </div>\r\n </div>\r\n </div>\r\n <!-- \u5185\u5BB9 -->\r\n <div class=\"dialog__content\" mat-dialog-content>\r\n <ng-content></ng-content>\r\n </div>\r\n <!-- \u5E95\u90E8\u6309\u94AE -->\r\n <div mat-dialog-actions class=\"dialog__footer\">\r\n <ng-content select=\"[footerSlot]\"></ng-content>\r\n <!-- \u9ED8\u8BA4\u5C55\u793A\u4FDD\u5B58/\u5173\u95ED\u6309\u94AE -->\r\n <ng-container *ngIf=\"!customFooter\">\r\n <ng-template [ngTemplateOutlet]=\"defaultTemplate\"></ng-template>\r\n </ng-container>\r\n <ng-template #defaultTemplate>\r\n <button *ngIf=\"!hideCloseBtn\" class=\"e-btn\" (click)=\"onClose()\">\r\n {{ cancelBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideDiscardBtn\" class=\"e-btn\" (click)=\"onDiscard()\">\r\n {{ discardBtnLabel }}\r\n </button>\r\n <button *ngIf=\"!hideSaveBtn\" class=\"e-btn e-primary\" (click)=\"onSave()\">\r\n {{ saveBtnLabel }}\r\n </button>\r\n </ng-template>\r\n </div>\r\n <!-- loading -->\r\n <div class=\"dialog__loading\" [hidden]=\"!loading\">\r\n <img src=\"../../../assets/img/raise_loading.gif\" alt=\"\" />\r\n </div>\r\n</div>\r\n",
|
|
26152
|
-
styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
|
|
26152
|
+
styles: [":host::ng-deep .dialog{position:relative;max-height:90vh;max-width:90vw;font-weight:400;padding:20px;overflow:hidden;display:flex;flex-direction:column}:host::ng-deep .dialog.largest{width:96vw!important;height:88vh!important;max-width:2100px;padding:20px}:host::ng-deep .dialog.medium{width:500px;padding:20px}:host::ng-deep .dialog.small{width:350px;padding:20px 16px}:host::ng-deep .dialog.small .dialog__header{color:#002c4f;margin-bottom:16px}:host::ng-deep .dialog.small .dialog__header .header__title{font-size:13px;line-height:16px}:host::ng-deep .dialog.small .dialog__content{font-size:12px;line-height:16px}:host::ng-deep .dialog.small .dialog__footer{min-height:42px;padding:16px 0 0;font-size:12px;line-height:14px}:host::ng-deep .dialog.small .dialog__footer button{padding:6px 12px;min-width:60px}:host::ng-deep .dialog.large{width:800px;padding:20px}:host::ng-deep .dialog .dialog__header{width:100%;display:flex;justify-content:space-between;align-items:center;padding:0}:host::ng-deep .dialog .dialog__header::before{display:none}:host::ng-deep .dialog .dialog__header .header__title{color:#002c4f;font-family:Arial;font-size:15px;font-weight:700;line-height:18px;flex:1;overflow:hidden;display:flex;align-items:center;gap:8px}:host::ng-deep .dialog .dialog__header .header__actions{display:flex;align-items:center;gap:20px}:host::ng-deep .dialog .dialog__header .header-icon{display:block}:host::ng-deep .dialog .dialog__header .header-btn{cursor:pointer;padding:2px;display:flex;justify-content:center;align-items:center}:host::ng-deep .dialog .dialog__content{width:100%;min-height:38px;position:relative;overflow-y:auto;overflow-x:hidden;margin:0;padding:0;font-size:13px;line-height:19px;flex:1;height:0}:host::ng-deep .dialog .dialog__footer{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:20px 0 0;font-size:13px;line-height:16px;margin-bottom:0}:host::ng-deep .dialog .dialog__loading{height:100%;background:0 0;position:fixed;top:0;left:0;right:0;bottom:0;z-index:9999}:host::ng-deep .dialog .dialog__loading img{position:absolute;left:50%;top:50%;width:40px;height:40px;transform:translate(-50%,-50%)}"]
|
|
26153
26153
|
}] }
|
|
26154
26154
|
];
|
|
26155
26155
|
/** @nocollapse */
|
|
@@ -38368,284 +38368,6 @@
|
|
|
38368
38368
|
ConfirmSelectComponent.prototype.isInteracted;
|
|
38369
38369
|
}
|
|
38370
38370
|
|
|
38371
|
-
/**
|
|
38372
|
-
* @fileoverview added by tsickle
|
|
38373
|
-
* Generated from: lib/form/richtexteditor/ai-config.ts
|
|
38374
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
38375
|
-
*/
|
|
38376
|
-
/**
|
|
38377
|
-
* @record
|
|
38378
|
-
*/
|
|
38379
|
-
function AIConfig() { }
|
|
38380
|
-
if (false) {
|
|
38381
|
-
/** @type {?} */
|
|
38382
|
-
AIConfig.prototype.endpoint;
|
|
38383
|
-
/** @type {?} */
|
|
38384
|
-
AIConfig.prototype.apiKey;
|
|
38385
|
-
/** @type {?} */
|
|
38386
|
-
AIConfig.prototype.deployment;
|
|
38387
|
-
/** @type {?} */
|
|
38388
|
-
AIConfig.prototype.apiVersion;
|
|
38389
|
-
/** @type {?} */
|
|
38390
|
-
AIConfig.prototype.enabled;
|
|
38391
|
-
}
|
|
38392
|
-
// 从环境配置获取AI配置
|
|
38393
|
-
/**
|
|
38394
|
-
* @return {?}
|
|
38395
|
-
*/
|
|
38396
|
-
function getAIConfig() {
|
|
38397
|
-
return {
|
|
38398
|
-
endpoint: "https://aidevused.openai.azure.com/",
|
|
38399
|
-
apiKey: "ccba76e279f64653a50ac4fee90afe5c",
|
|
38400
|
-
deployment: "gpt-4",
|
|
38401
|
-
apiVersion: "2025-01-01-preview",
|
|
38402
|
-
enabled: true,
|
|
38403
|
-
};
|
|
38404
|
-
}
|
|
38405
|
-
// 检查配置是否有效
|
|
38406
|
-
/**
|
|
38407
|
-
* @param {?} config
|
|
38408
|
-
* @return {?}
|
|
38409
|
-
*/
|
|
38410
|
-
function isAIConfigValid(config) {
|
|
38411
|
-
// 检查是否为aidevused端点且有有效API密钥
|
|
38412
|
-
return !!((config.endpoint &&
|
|
38413
|
-
config.apiKey &&
|
|
38414
|
-
config.deployment &&
|
|
38415
|
-
config.enabled &&
|
|
38416
|
-
config.endpoint === "https://aidevused.openai.azure.com/" &&
|
|
38417
|
-
config.apiKey !== "your-api-key-here") // Azure OpenAI API密钥通常以sk-开头
|
|
38418
|
-
);
|
|
38419
|
-
}
|
|
38420
|
-
// 从后端API获取AI配置(推荐方式)
|
|
38421
|
-
/**
|
|
38422
|
-
* @return {?}
|
|
38423
|
-
* @this {*}
|
|
38424
|
-
*/
|
|
38425
|
-
function getAIConfigFromBackend() {
|
|
38426
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
38427
|
-
return __generator(this, function (_a) {
|
|
38428
|
-
try {
|
|
38429
|
-
// 这里应该调用你的后端API来获取AI配置
|
|
38430
|
-
// 例如:return await this.http.get('/api/ai-config');
|
|
38431
|
-
// 临时返回默认配置
|
|
38432
|
-
return [2 /*return*/, getAIConfig()];
|
|
38433
|
-
}
|
|
38434
|
-
catch (error) {
|
|
38435
|
-
console.error("Failed to get AI config from backend:", error);
|
|
38436
|
-
return [2 /*return*/, getAIConfig()];
|
|
38437
|
-
}
|
|
38438
|
-
return [2 /*return*/];
|
|
38439
|
-
});
|
|
38440
|
-
});
|
|
38441
|
-
}
|
|
38442
|
-
|
|
38443
|
-
/**
|
|
38444
|
-
* @fileoverview added by tsickle
|
|
38445
|
-
* Generated from: lib/form/richtexteditor/openapi.ts
|
|
38446
|
-
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
38447
|
-
*/
|
|
38448
|
-
// import { testAIFunction } from './ai-test';
|
|
38449
|
-
// testAIFunction();
|
|
38450
|
-
// 使用fetch API发送请求到Azure OpenAI
|
|
38451
|
-
/**
|
|
38452
|
-
* @param {?} messages
|
|
38453
|
-
* @param {?} config
|
|
38454
|
-
* @return {?}
|
|
38455
|
-
* @this {*}
|
|
38456
|
-
*/
|
|
38457
|
-
function sendAIRequest(messages, config) {
|
|
38458
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
38459
|
-
var url, url1, response, errorText, data, error_1;
|
|
38460
|
-
return __generator(this, function (_a) {
|
|
38461
|
-
switch (_a.label) {
|
|
38462
|
-
case 0:
|
|
38463
|
-
_a.trys.push([0, 5, , 6]);
|
|
38464
|
-
url = config.endpoint + "/openai/deployments/" + config.deployment + "/chat/completions?api-version=" + config.apiVersion;
|
|
38465
|
-
url1 = "" + config.endpoint;
|
|
38466
|
-
return [4 /*yield*/, fetch(url, {
|
|
38467
|
-
method: 'POST',
|
|
38468
|
-
headers: {
|
|
38469
|
-
'Content-Type': 'application/json',
|
|
38470
|
-
'api-key': config.apiKey,
|
|
38471
|
-
},
|
|
38472
|
-
body: JSON.stringify({
|
|
38473
|
-
messages: messages,
|
|
38474
|
-
max_tokens: 1000,
|
|
38475
|
-
temperature: 0.7,
|
|
38476
|
-
top_p: 1,
|
|
38477
|
-
frequency_penalty: 0,
|
|
38478
|
-
presence_penalty: 0,
|
|
38479
|
-
}),
|
|
38480
|
-
})];
|
|
38481
|
-
case 1:
|
|
38482
|
-
response = _a.sent();
|
|
38483
|
-
if (!!response.ok) return [3 /*break*/, 3];
|
|
38484
|
-
return [4 /*yield*/, response.text()];
|
|
38485
|
-
case 2:
|
|
38486
|
-
errorText = _a.sent();
|
|
38487
|
-
throw new Error("HTTP error! status: " + response.status + ", message: " + errorText);
|
|
38488
|
-
case 3: return [4 /*yield*/, response.json()];
|
|
38489
|
-
case 4:
|
|
38490
|
-
data = _a.sent();
|
|
38491
|
-
if (!data.choices || !data.choices[0] || !data.choices[0].message) {
|
|
38492
|
-
throw new Error('Invalid response format from AI service');
|
|
38493
|
-
}
|
|
38494
|
-
return [2 /*return*/, data.choices[0].message.content];
|
|
38495
|
-
case 5:
|
|
38496
|
-
error_1 = _a.sent();
|
|
38497
|
-
console.error('AI request failed:', error_1);
|
|
38498
|
-
throw error_1;
|
|
38499
|
-
case 6: return [2 /*return*/];
|
|
38500
|
-
}
|
|
38501
|
-
});
|
|
38502
|
-
});
|
|
38503
|
-
}
|
|
38504
|
-
// 备用方案:使用模拟数据(用于开发测试)
|
|
38505
|
-
/**
|
|
38506
|
-
* @param {?} subQuery
|
|
38507
|
-
* @param {?} promptQuery
|
|
38508
|
-
* @return {?}
|
|
38509
|
-
*/
|
|
38510
|
-
function getMockAIResponse(subQuery, promptQuery) {
|
|
38511
|
-
var e_1, _a;
|
|
38512
|
-
/** @type {?} */
|
|
38513
|
-
var mockResponses = {
|
|
38514
|
-
Rephrase: "Rephrased: " + promptQuery,
|
|
38515
|
-
Grammar: "Corrected: " + promptQuery,
|
|
38516
|
-
Summarize: "Summary: " + promptQuery.substring(0, 100) + "...",
|
|
38517
|
-
Elaborate: "Elaborated: " + promptQuery + " with additional details and context.",
|
|
38518
|
-
Translate: "Translated: " + promptQuery,
|
|
38519
|
-
SentimentAnalysis: '😊 Positive',
|
|
38520
|
-
};
|
|
38521
|
-
try {
|
|
38522
|
-
for (var _b = __values(Object.entries(mockResponses)), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
38523
|
-
var _d = __read(_c.value, 2), key = _d[0], value = _d[1];
|
|
38524
|
-
if (subQuery.includes(key)) {
|
|
38525
|
-
return value;
|
|
38526
|
-
}
|
|
38527
|
-
}
|
|
38528
|
-
}
|
|
38529
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
38530
|
-
finally {
|
|
38531
|
-
try {
|
|
38532
|
-
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
38533
|
-
}
|
|
38534
|
-
finally { if (e_1) throw e_1.error; }
|
|
38535
|
-
}
|
|
38536
|
-
return "AI processed: " + promptQuery;
|
|
38537
|
-
}
|
|
38538
|
-
// 主要的AI请求方法
|
|
38539
|
-
/**
|
|
38540
|
-
* @param {?} subQuery
|
|
38541
|
-
* @param {?} promptQuery
|
|
38542
|
-
* @return {?}
|
|
38543
|
-
* @this {*}
|
|
38544
|
-
*/
|
|
38545
|
-
function OpenAiModelRTE(subQuery, promptQuery) {
|
|
38546
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
38547
|
-
var config, messages, result, error_2;
|
|
38548
|
-
return __generator(this, function (_a) {
|
|
38549
|
-
switch (_a.label) {
|
|
38550
|
-
case 0:
|
|
38551
|
-
_a.trys.push([0, 2, , 3]);
|
|
38552
|
-
config = getAIConfig();
|
|
38553
|
-
// 检查配置是否有效
|
|
38554
|
-
if (!isAIConfigValid(config)) {
|
|
38555
|
-
console.warn('AI configuration is incomplete or disabled, using mock response');
|
|
38556
|
-
return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
|
|
38557
|
-
}
|
|
38558
|
-
messages = [
|
|
38559
|
-
{
|
|
38560
|
-
role: 'system',
|
|
38561
|
-
content: subQuery.includes('emoji followed by the sentiment in the format')
|
|
38562
|
-
? 'You are a helpful assistant. Please respond in string format.'
|
|
38563
|
-
: "NOTE: Return same html format just do changes content only. don't change html formats.",
|
|
38564
|
-
},
|
|
38565
|
-
{
|
|
38566
|
-
role: 'user',
|
|
38567
|
-
content: subQuery + " " + promptQuery,
|
|
38568
|
-
},
|
|
38569
|
-
];
|
|
38570
|
-
return [4 /*yield*/, sendAIRequest(messages, config)];
|
|
38571
|
-
case 1:
|
|
38572
|
-
result = _a.sent();
|
|
38573
|
-
return [2 /*return*/, result];
|
|
38574
|
-
case 2:
|
|
38575
|
-
error_2 = _a.sent();
|
|
38576
|
-
console.error('AI request failed, using mock response:', error_2);
|
|
38577
|
-
return [2 /*return*/, getMockAIResponse(subQuery, promptQuery)];
|
|
38578
|
-
case 3: return [2 /*return*/];
|
|
38579
|
-
}
|
|
38580
|
-
});
|
|
38581
|
-
});
|
|
38582
|
-
}
|
|
38583
|
-
// 兼容性方法(保持向后兼容)
|
|
38584
|
-
/**
|
|
38585
|
-
* @param {?} options
|
|
38586
|
-
* @return {?}
|
|
38587
|
-
* @this {*}
|
|
38588
|
-
*/
|
|
38589
|
-
function getAzureChatAIRequest(options) {
|
|
38590
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
38591
|
-
var config, result, err_1;
|
|
38592
|
-
return __generator(this, function (_a) {
|
|
38593
|
-
switch (_a.label) {
|
|
38594
|
-
case 0:
|
|
38595
|
-
_a.trys.push([0, 2, , 3]);
|
|
38596
|
-
config = getAIConfig();
|
|
38597
|
-
if (!isAIConfigValid(config)) {
|
|
38598
|
-
return [2 /*return*/, null];
|
|
38599
|
-
}
|
|
38600
|
-
return [4 /*yield*/, sendAIRequest(options.messages, config)];
|
|
38601
|
-
case 1:
|
|
38602
|
-
result = _a.sent();
|
|
38603
|
-
return [2 /*return*/, result];
|
|
38604
|
-
case 2:
|
|
38605
|
-
err_1 = _a.sent();
|
|
38606
|
-
console.error('Error occurred:', err_1);
|
|
38607
|
-
return [2 /*return*/, null];
|
|
38608
|
-
case 3: return [2 /*return*/];
|
|
38609
|
-
}
|
|
38610
|
-
});
|
|
38611
|
-
});
|
|
38612
|
-
}
|
|
38613
|
-
/**
|
|
38614
|
-
* @param {?} prompt
|
|
38615
|
-
* @return {?}
|
|
38616
|
-
* @this {*}
|
|
38617
|
-
*/
|
|
38618
|
-
function getAzureTextAIRequest(prompt) {
|
|
38619
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
38620
|
-
var config, messages, result, err_2;
|
|
38621
|
-
return __generator(this, function (_a) {
|
|
38622
|
-
switch (_a.label) {
|
|
38623
|
-
case 0:
|
|
38624
|
-
_a.trys.push([0, 2, , 3]);
|
|
38625
|
-
config = getAIConfig();
|
|
38626
|
-
if (!isAIConfigValid(config)) {
|
|
38627
|
-
return [2 /*return*/, undefined];
|
|
38628
|
-
}
|
|
38629
|
-
messages = [
|
|
38630
|
-
{
|
|
38631
|
-
role: 'user',
|
|
38632
|
-
content: prompt,
|
|
38633
|
-
},
|
|
38634
|
-
];
|
|
38635
|
-
return [4 /*yield*/, sendAIRequest(messages, config)];
|
|
38636
|
-
case 1:
|
|
38637
|
-
result = _a.sent();
|
|
38638
|
-
return [2 /*return*/, result];
|
|
38639
|
-
case 2:
|
|
38640
|
-
err_2 = _a.sent();
|
|
38641
|
-
console.error('Error occurred:', err_2);
|
|
38642
|
-
return [2 /*return*/, undefined];
|
|
38643
|
-
case 3: return [2 /*return*/];
|
|
38644
|
-
}
|
|
38645
|
-
});
|
|
38646
|
-
});
|
|
38647
|
-
}
|
|
38648
|
-
|
|
38649
38371
|
/**
|
|
38650
38372
|
* @fileoverview added by tsickle
|
|
38651
38373
|
* Generated from: lib/form/richtexteditor/data-config.ts
|
|
@@ -38740,6 +38462,73 @@
|
|
|
38740
38462
|
command: "Font",
|
|
38741
38463
|
subCommand: "FontName",
|
|
38742
38464
|
},
|
|
38465
|
+
// New fonts
|
|
38466
|
+
{
|
|
38467
|
+
text: "Tiempos Headline - Semibold",
|
|
38468
|
+
value: "Tiempos Headline Semibold",
|
|
38469
|
+
cssClass: "e-tiempos-headline",
|
|
38470
|
+
command: "Font",
|
|
38471
|
+
subCommand: "FontName",
|
|
38472
|
+
},
|
|
38473
|
+
{
|
|
38474
|
+
text: "微软雅黑",
|
|
38475
|
+
value: "Microsoft YaHei,微软雅黑,SimHei, sans-serif",
|
|
38476
|
+
cssClass: "e-yahei",
|
|
38477
|
+
command: "Font",
|
|
38478
|
+
subCommand: "FontName",
|
|
38479
|
+
},
|
|
38480
|
+
{
|
|
38481
|
+
text: "等线",
|
|
38482
|
+
value: "DengXian,等线,sans-serif",
|
|
38483
|
+
cssClass: "e-dengxian",
|
|
38484
|
+
command: "Font",
|
|
38485
|
+
subCommand: "FontName",
|
|
38486
|
+
},
|
|
38487
|
+
{
|
|
38488
|
+
text: "思源黑体",
|
|
38489
|
+
value: "Source Han Sans CN, Microsoft YaHei,'微软雅黑', sans-serif",
|
|
38490
|
+
cssClass: "e-source-han-sans-cn-regular",
|
|
38491
|
+
command: "Font",
|
|
38492
|
+
subCommand: "FontName",
|
|
38493
|
+
},
|
|
38494
|
+
{
|
|
38495
|
+
text: "思源宋体",
|
|
38496
|
+
value: "Source Han Serif CN, SimSun,'宋体',serif",
|
|
38497
|
+
cssClass: "e-source-han-serif-cn-regular",
|
|
38498
|
+
command: "Font",
|
|
38499
|
+
subCommand: "FontName",
|
|
38500
|
+
},
|
|
38501
|
+
{
|
|
38502
|
+
text: "霞鹜文楷",
|
|
38503
|
+
value: "LXGW WenKai,'霞鹜文楷',STKaiti, KaiTi, '楷体', '华文楷体', Arial, sans-serif",
|
|
38504
|
+
cssClass: "e-lxgw",
|
|
38505
|
+
command: "Font",
|
|
38506
|
+
subCommand: "FontName",
|
|
38507
|
+
},
|
|
38508
|
+
// Ping Fang SC 系列
|
|
38509
|
+
{
|
|
38510
|
+
text: "Ping Fang SC - Light",
|
|
38511
|
+
value: "苹方-简",
|
|
38512
|
+
cssClass: "e-ping-fang-sc-light",
|
|
38513
|
+
command: "Font",
|
|
38514
|
+
subCommand: "FontName",
|
|
38515
|
+
},
|
|
38516
|
+
],
|
|
38517
|
+
};
|
|
38518
|
+
/** @type {?} */
|
|
38519
|
+
var size = {
|
|
38520
|
+
default: "11pt",
|
|
38521
|
+
width: "40px",
|
|
38522
|
+
items: [
|
|
38523
|
+
{ text: "8 pt", value: "8pt" },
|
|
38524
|
+
{ text: "9 pt", value: "9pt" },
|
|
38525
|
+
{ text: "10 pt", value: "10pt" },
|
|
38526
|
+
{ text: "11 pt", value: "11pt" },
|
|
38527
|
+
{ text: "12 pt", value: "12pt" },
|
|
38528
|
+
{ text: "14 pt", value: "14pt" },
|
|
38529
|
+
{ text: "18 pt", value: "18pt" },
|
|
38530
|
+
{ text: "24 pt", value: "24pt" },
|
|
38531
|
+
{ text: "36 pt", value: "36pt" },
|
|
38743
38532
|
],
|
|
38744
38533
|
};
|
|
38745
38534
|
// line height配置
|
|
@@ -38925,71 +38714,30 @@
|
|
|
38925
38714
|
* @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
|
|
38926
38715
|
*/
|
|
38927
38716
|
var RichtexteditorComponent = /** @class */ (function () {
|
|
38928
|
-
function RichtexteditorComponent(
|
|
38929
|
-
this.ref = ref;
|
|
38930
|
-
// @ViewChild("chipList", { static: false }) public chipList!: ChipListComponent;
|
|
38931
|
-
this.placeholder = "";
|
|
38717
|
+
function RichtexteditorComponent() {
|
|
38932
38718
|
this.value = "";
|
|
38719
|
+
this.editorId = "editorId";
|
|
38933
38720
|
this.height = 150;
|
|
38934
38721
|
this.autoSaveOnIdle = true;
|
|
38935
|
-
this.
|
|
38936
|
-
// dialog 弹窗父级
|
|
38937
|
-
this.toolbarClick = new core.EventEmitter();
|
|
38938
|
-
this.change = new core.EventEmitter();
|
|
38939
|
-
// @Output() change = new EventEmitter();
|
|
38940
|
-
this.family = fontFamily;
|
|
38941
|
-
this.dialogWidth = "800px";
|
|
38942
|
-
this.dialogHeight = "642px";
|
|
38943
|
-
this.showZoomBtn = true;
|
|
38944
|
-
this.showMsg = false;
|
|
38722
|
+
this.disabled = false;
|
|
38945
38723
|
this.insertImageSettings = {
|
|
38946
38724
|
saveFormat: "Blob",
|
|
38947
38725
|
allowedTypes: [".svg", ".png"],
|
|
38948
38726
|
display: "none",
|
|
38949
38727
|
};
|
|
38950
|
-
this.
|
|
38951
|
-
this.
|
|
38952
|
-
this.
|
|
38953
|
-
|
|
38954
|
-
|
|
38955
|
-
|
|
38956
|
-
|
|
38957
|
-
|
|
38958
|
-
|
|
38959
|
-
|
|
38960
|
-
this.rephraseTyleList = [
|
|
38961
|
-
{ text: "Standard", id: "Standard" },
|
|
38962
|
-
{ text: "Fluent", id: "Fluent" },
|
|
38963
|
-
{ text: "Professional", id: "Professional" },
|
|
38964
|
-
];
|
|
38965
|
-
this.languageList = [
|
|
38966
|
-
{ id: "EN", text: "English" },
|
|
38967
|
-
{ id: "ZH", text: "Chinese (Simplified)" },
|
|
38968
|
-
{ id: "ES", text: "Spanish" },
|
|
38969
|
-
{ id: "ZHT", text: "Chinese (Traditional)" },
|
|
38970
|
-
{ id: "HI", text: "Hindi" },
|
|
38971
|
-
{ id: "AR", text: "Arabic" },
|
|
38972
|
-
{ id: "BN", text: "Bengali" },
|
|
38973
|
-
{ id: "PT", text: "Portuguese" },
|
|
38974
|
-
{ id: "RU", text: "Russian" },
|
|
38975
|
-
{ id: "JA", text: "Japanese" },
|
|
38976
|
-
{ id: "DE", text: "German" },
|
|
38977
|
-
{ id: "KO", text: "Korean" },
|
|
38978
|
-
{ id: "FR", text: "French" },
|
|
38979
|
-
{ id: "IT", text: "Italian" },
|
|
38980
|
-
{ id: "TR", text: "Turkish" },
|
|
38981
|
-
];
|
|
38982
|
-
this.promptQuery = "";
|
|
38983
|
-
this.isSentimentCheck = false;
|
|
38984
|
-
this.subQuery = "";
|
|
38985
|
-
this.chipValue = "Standard";
|
|
38728
|
+
this.toolbarClick = new core.EventEmitter();
|
|
38729
|
+
this.change = new core.EventEmitter();
|
|
38730
|
+
this.created = new core.EventEmitter();
|
|
38731
|
+
this.actionBegin = new core.EventEmitter();
|
|
38732
|
+
this.input = new core.EventEmitter();
|
|
38733
|
+
this.focus = new core.EventEmitter();
|
|
38734
|
+
this.blur = new core.EventEmitter();
|
|
38735
|
+
this.actionComplete = new core.EventEmitter();
|
|
38736
|
+
this.family = fontFamily;
|
|
38737
|
+
this.fontSize = size;
|
|
38986
38738
|
this.tools = {
|
|
38987
38739
|
enableFloating: false,
|
|
38988
38740
|
items: [
|
|
38989
|
-
{
|
|
38990
|
-
tooltipText: "AI Assist",
|
|
38991
|
-
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>',
|
|
38992
|
-
},
|
|
38993
38741
|
"Bold",
|
|
38994
38742
|
"Italic",
|
|
38995
38743
|
"Underline",
|
|
@@ -39004,21 +38752,12 @@
|
|
|
39004
38752
|
"CreateTable",
|
|
39005
38753
|
"Formats",
|
|
39006
38754
|
"Alignments",
|
|
39007
|
-
|
|
39008
|
-
|
|
39009
|
-
template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="lineheight_tbar" style="width:100%"></button>',
|
|
39010
|
-
},
|
|
39011
|
-
"OrderedList",
|
|
39012
|
-
"UnorderedList",
|
|
38755
|
+
"BulletFormatList",
|
|
38756
|
+
"NumberFormatList",
|
|
39013
38757
|
"Outdent",
|
|
39014
38758
|
"Indent",
|
|
39015
38759
|
"|",
|
|
39016
38760
|
"CreateLink",
|
|
39017
|
-
{
|
|
39018
|
-
tooltipText: "",
|
|
39019
|
-
template: '<button class="e-tbar-btn e-btn" tabindex="-1" id="custom_tbar" style="width:100%">' +
|
|
39020
|
-
'<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>',
|
|
39021
|
-
},
|
|
39022
38761
|
"|",
|
|
39023
38762
|
"FormatPainter",
|
|
39024
38763
|
"ClearFormat",
|
|
@@ -39027,14 +38766,64 @@
|
|
|
39027
38766
|
"Redo",
|
|
39028
38767
|
],
|
|
39029
38768
|
};
|
|
38769
|
+
/**
|
|
38770
|
+
* 表格快捷工具栏:含 TableCell(合并/拆分单元格)
|
|
38771
|
+
*/
|
|
38772
|
+
this.quickToolbarSettings = {
|
|
38773
|
+
table: [
|
|
38774
|
+
"Tableheader",
|
|
38775
|
+
"TableRemove",
|
|
38776
|
+
"|",
|
|
38777
|
+
"TableRows",
|
|
38778
|
+
"TableColumns",
|
|
38779
|
+
"TableCell",
|
|
38780
|
+
"|",
|
|
38781
|
+
"Styles",
|
|
38782
|
+
"BackgroundColor",
|
|
38783
|
+
"Alignments",
|
|
38784
|
+
"TableCellVerticalAlign",
|
|
38785
|
+
],
|
|
38786
|
+
};
|
|
38787
|
+
this.bulletFormatList = {
|
|
38788
|
+
types: [
|
|
38789
|
+
{ text: "None", value: "none" },
|
|
38790
|
+
{ text: "●", value: "disc" },
|
|
38791
|
+
{ text: "○", value: "circle" },
|
|
38792
|
+
{ text: "■", value: "square" },
|
|
38793
|
+
{ text: "-", value: "dash" },
|
|
38794
|
+
],
|
|
38795
|
+
};
|
|
38796
|
+
this.numberFormatList = {
|
|
38797
|
+
types: [
|
|
38798
|
+
{ text: "None", value: "none" },
|
|
38799
|
+
{ text: "1, 2, 3, …", value: "decimal" },
|
|
38800
|
+
{
|
|
38801
|
+
text: "α, β, γ, …",
|
|
38802
|
+
value: "lowerGreek",
|
|
38803
|
+
},
|
|
38804
|
+
{
|
|
38805
|
+
text: "i, ii, iii, …",
|
|
38806
|
+
value: "lowerRoman",
|
|
38807
|
+
},
|
|
38808
|
+
{
|
|
38809
|
+
text: "A, B, C, …",
|
|
38810
|
+
value: "upperAlpha",
|
|
38811
|
+
},
|
|
38812
|
+
{
|
|
38813
|
+
text: "a, b, c, …",
|
|
38814
|
+
value: "lowerAlpha",
|
|
38815
|
+
},
|
|
38816
|
+
{
|
|
38817
|
+
text: "I, II, III, …",
|
|
38818
|
+
value: "upperRoman",
|
|
38819
|
+
},
|
|
38820
|
+
{
|
|
38821
|
+
text: "(1), (2), (3), …",
|
|
38822
|
+
value: "parentheses",
|
|
38823
|
+
},
|
|
38824
|
+
],
|
|
38825
|
+
};
|
|
39030
38826
|
}
|
|
39031
|
-
/**
|
|
39032
|
-
* @return {?}
|
|
39033
|
-
*/
|
|
39034
|
-
RichtexteditorComponent.prototype.ngOnInit = /**
|
|
39035
|
-
* @return {?}
|
|
39036
|
-
*/
|
|
39037
|
-
function () { };
|
|
39038
38827
|
/**
|
|
39039
38828
|
* @param {?} args
|
|
39040
38829
|
* @return {?}
|
|
@@ -39044,32 +38833,6 @@
|
|
|
39044
38833
|
* @return {?}
|
|
39045
38834
|
*/
|
|
39046
38835
|
function (args) {
|
|
39047
|
-
/** @type {?} */
|
|
39048
|
-
var tables = document.querySelectorAll("table.e-rte-table");
|
|
39049
|
-
tables.forEach((/**
|
|
39050
|
-
* @param {?} table
|
|
39051
|
-
* @return {?}
|
|
39052
|
-
*/
|
|
39053
|
-
function (table) {
|
|
39054
|
-
/** @type {?} */
|
|
39055
|
-
var htmlTable = (/** @type {?} */ (table));
|
|
39056
|
-
htmlTable.style.marginBottom = "10px";
|
|
39057
|
-
htmlTable.style.borderCollapse = "collapse";
|
|
39058
|
-
htmlTable.style.emptyCells = "show";
|
|
39059
|
-
/** @type {?} */
|
|
39060
|
-
var tdElements = table.querySelectorAll("td");
|
|
39061
|
-
tdElements.forEach((/**
|
|
39062
|
-
* @param {?} td
|
|
39063
|
-
* @return {?}
|
|
39064
|
-
*/
|
|
39065
|
-
function (td) {
|
|
39066
|
-
td.style.border = "1px solid #adb5bd";
|
|
39067
|
-
td.style.height = "20px";
|
|
39068
|
-
td.style.minWidth = "20px";
|
|
39069
|
-
td.style.padding = "2px 5px";
|
|
39070
|
-
td.style.boxSizing = "border-box";
|
|
39071
|
-
}));
|
|
39072
|
-
}));
|
|
39073
38836
|
this.change.emit(args);
|
|
39074
38837
|
};
|
|
39075
38838
|
/**
|
|
@@ -39079,514 +38842,157 @@
|
|
|
39079
38842
|
* @return {?}
|
|
39080
38843
|
*/
|
|
39081
38844
|
function () {
|
|
39082
|
-
|
|
39083
|
-
//bind the a click event
|
|
39084
|
-
// let editorContent = this.rteObj.contentModule.getEditPanel() as HTMLElement;
|
|
39085
|
-
// editorContent.addEventListener('click', this.OnClicked.bind(this));
|
|
39086
|
-
//add the line height
|
|
39087
|
-
this.editorManager = this.rteObj.formatter.editorManager;
|
|
39088
|
-
/** @type {?} */
|
|
39089
|
-
var splitButton = new ej2AngularSplitbuttons.DropDownButton({
|
|
39090
|
-
items: lineHeight_items,
|
|
39091
|
-
iconCss: "e-icons e-line-spacing",
|
|
39092
|
-
select: this.onSelect.bind(this),
|
|
39093
|
-
});
|
|
39094
|
-
splitButton.appendTo("#lineheight_tbar");
|
|
39095
|
-
// ai assist
|
|
39096
|
-
/** @type {?} */
|
|
39097
|
-
var aiassistantButton = new ej2AngularSplitbuttons.DropDownButton({
|
|
39098
|
-
items: this.queryList,
|
|
39099
|
-
// iconCss: "e-btn-icon e-icons e-assistview-icon e-icon-left",
|
|
39100
|
-
select: (/**
|
|
39101
|
-
* @param {?} args
|
|
39102
|
-
* @return {?}
|
|
39103
|
-
*/
|
|
39104
|
-
function (args) { return _this.aiQuerySelectedMenu(args); }),
|
|
39105
|
-
});
|
|
39106
|
-
aiassistantButton.appendTo("#ai_assistant_button_tbar");
|
|
38845
|
+
this.created.emit();
|
|
39107
38846
|
};
|
|
39108
38847
|
/**
|
|
39109
|
-
* @private
|
|
39110
38848
|
* @param {?} args
|
|
39111
38849
|
* @return {?}
|
|
39112
38850
|
*/
|
|
39113
|
-
RichtexteditorComponent.prototype.
|
|
39114
|
-
* @private
|
|
38851
|
+
RichtexteditorComponent.prototype._toolbarClick = /**
|
|
39115
38852
|
* @param {?} args
|
|
39116
38853
|
* @return {?}
|
|
39117
38854
|
*/
|
|
39118
38855
|
function (args) {
|
|
39119
|
-
|
|
39120
|
-
this.rteObj.formatter.saveData();
|
|
39121
|
-
}
|
|
39122
|
-
/** @type {?} */
|
|
39123
|
-
var nodes = this.editorManager.domNode.blockNodes();
|
|
39124
|
-
for (var i = 0; nodes.length > i; i++) {
|
|
39125
|
-
((/** @type {?} */ (nodes[i]))).style.lineHeight = args.item.text;
|
|
39126
|
-
}
|
|
39127
|
-
this.rteObj.formatter.saveData();
|
|
39128
|
-
this.rteObj.formatter.enableUndo(this.rteObj);
|
|
38856
|
+
this.toolbarClick.emit(args);
|
|
39129
38857
|
};
|
|
39130
38858
|
/**
|
|
39131
|
-
* @private
|
|
39132
38859
|
* @param {?} args
|
|
39133
38860
|
* @return {?}
|
|
39134
38861
|
*/
|
|
39135
|
-
RichtexteditorComponent.prototype.
|
|
39136
|
-
* @private
|
|
38862
|
+
RichtexteditorComponent.prototype._actionBegin = /**
|
|
39137
38863
|
* @param {?} args
|
|
39138
38864
|
* @return {?}
|
|
39139
38865
|
*/
|
|
39140
38866
|
function (args) {
|
|
39141
|
-
this.
|
|
39142
|
-
};
|
|
39143
|
-
/**
|
|
39144
|
-
* @param {?} selectedQuery
|
|
39145
|
-
* @return {?}
|
|
39146
|
-
*/
|
|
39147
|
-
RichtexteditorComponent.prototype.dialogueOpen = /**
|
|
39148
|
-
* @param {?} selectedQuery
|
|
39149
|
-
* @return {?}
|
|
39150
|
-
*/
|
|
39151
|
-
function (selectedQuery) {
|
|
39152
|
-
var _this = this;
|
|
39153
|
-
/** @type {?} */
|
|
39154
|
-
var selectionText = this.rteObj.getSelectedHtml();
|
|
39155
|
-
this.selectedQuery = selectedQuery;
|
|
39156
|
-
if (selectionText) {
|
|
39157
|
-
/** @type {?} */
|
|
39158
|
-
var range = ((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
|
|
39159
|
-
((/** @type {?} */ (this.rteObj))).formatter.editorManager.nodeSelection.save(range, ((/** @type {?} */ (this.rteObj))).contentModule.getDocument());
|
|
39160
|
-
this.dropValIndex = this.queryList.findIndex((/**
|
|
39161
|
-
* @param {?} q
|
|
39162
|
-
* @return {?}
|
|
39163
|
-
*/
|
|
39164
|
-
function (q) { return q.text.toLowerCase() === selectedQuery.toLowerCase(); }));
|
|
39165
|
-
this.queryCategory.index = this.dropValIndex;
|
|
39166
|
-
this.leftRte.value = this.promptQuery = selectionText;
|
|
39167
|
-
this.leftRte.refreshUI();
|
|
39168
|
-
this.AIdialog.show();
|
|
39169
|
-
this.updateAISugesstionsData(selectedQuery);
|
|
39170
|
-
}
|
|
39171
|
-
else {
|
|
39172
|
-
this.showMsg = true;
|
|
39173
|
-
setTimeout((/**
|
|
39174
|
-
* @return {?}
|
|
39175
|
-
*/
|
|
39176
|
-
function () {
|
|
39177
|
-
_this.showMsg = false;
|
|
39178
|
-
}), 3000);
|
|
39179
|
-
console.log("Please select the content to perform the AI operation.");
|
|
39180
|
-
}
|
|
39181
|
-
};
|
|
39182
|
-
/**
|
|
39183
|
-
* @param {?} selectedQuery
|
|
39184
|
-
* @return {?}
|
|
39185
|
-
*/
|
|
39186
|
-
RichtexteditorComponent.prototype.updateAISugesstionsData = /**
|
|
39187
|
-
* @param {?} selectedQuery
|
|
39188
|
-
* @return {?}
|
|
39189
|
-
*/
|
|
39190
|
-
function (selectedQuery) {
|
|
39191
|
-
this.isSentimentCheck = false;
|
|
39192
|
-
switch (selectedQuery) {
|
|
39193
|
-
case "Summarize":
|
|
39194
|
-
this.subQuery = "Summarize the upcoming sentence shortly.";
|
|
39195
|
-
break;
|
|
39196
|
-
case "Elaborate":
|
|
39197
|
-
this.subQuery = "Elaborate on the upcoming sentence.";
|
|
39198
|
-
break;
|
|
39199
|
-
case "Rephrase":
|
|
39200
|
-
this.subQuery = this.chipValue + " rephrase the upcoming sentence.";
|
|
39201
|
-
break;
|
|
39202
|
-
case "Correct Grammar":
|
|
39203
|
-
this.subQuery = "Correct the grammar of the upcoming sentence.";
|
|
39204
|
-
break;
|
|
39205
|
-
case "Translate":
|
|
39206
|
-
this.subQuery =
|
|
39207
|
-
"Translate the upcoming sentence to " + this.translatelanguage + ".";
|
|
39208
|
-
break;
|
|
39209
|
-
case "Sentiment Analysis":
|
|
39210
|
-
this.isSentimentCheck = true;
|
|
39211
|
-
this.subQuery =
|
|
39212
|
-
'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:';
|
|
39213
|
-
break;
|
|
39214
|
-
}
|
|
39215
|
-
this.updateAISugesstions();
|
|
39216
|
-
};
|
|
39217
|
-
/**
|
|
39218
|
-
* @return {?}
|
|
39219
|
-
*/
|
|
39220
|
-
RichtexteditorComponent.prototype.updateAISugesstions = /**
|
|
39221
|
-
* @return {?}
|
|
39222
|
-
*/
|
|
39223
|
-
function () {
|
|
39224
|
-
var _this = this;
|
|
39225
|
-
try {
|
|
39226
|
-
if (this.promptQuery) {
|
|
39227
|
-
((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
|
|
39228
|
-
"";
|
|
39229
|
-
((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
|
|
39230
|
-
"none";
|
|
39231
|
-
this.sentimentButton.element.style.display = "none";
|
|
39232
|
-
this.regenerateButton.disabled = true;
|
|
39233
|
-
this.copyButton.disabled = true;
|
|
39234
|
-
this.replaceButton.disabled = true;
|
|
39235
|
-
this.apiResultData = this.getResponseFromOpenAI(this.subQuery, this.promptQuery);
|
|
39236
|
-
this.apiResultData.then((/**
|
|
39237
|
-
* @param {?} result
|
|
39238
|
-
* @return {?}
|
|
39239
|
-
*/
|
|
39240
|
-
function (result) {
|
|
39241
|
-
_this.AIResult = _this.isSentimentCheck ? _this.promptQuery : result;
|
|
39242
|
-
_this.sentimentButton.content = result
|
|
39243
|
-
.toLowerCase()
|
|
39244
|
-
.includes("positive")
|
|
39245
|
-
? "😊 Positive"
|
|
39246
|
-
: result.toLowerCase().includes("negative")
|
|
39247
|
-
? "😞 Negative"
|
|
39248
|
-
: "😐 Neutral";
|
|
39249
|
-
_this.sentimentButton.element.style.display = !_this.isSentimentCheck
|
|
39250
|
-
? "none"
|
|
39251
|
-
: "";
|
|
39252
|
-
_this.rightRte.value = _this.AIResult;
|
|
39253
|
-
/** @type {?} */
|
|
39254
|
-
var noResultsFound = !(_this.AIResult || _this.promptQuery);
|
|
39255
|
-
((/** @type {?} */ (document.getElementById("no-results-found")))).style.display = noResultsFound ? "" : "none";
|
|
39256
|
-
_this.regenerateButton.disabled = noResultsFound;
|
|
39257
|
-
_this.copyButton.disabled = noResultsFound;
|
|
39258
|
-
_this.replaceButton.disabled = noResultsFound;
|
|
39259
|
-
((/** @type {?} */ (document.getElementById("skeletonId")))).style.display =
|
|
39260
|
-
"none";
|
|
39261
|
-
((/** @type {?} */ (document.getElementById("rightRte")))).style.display =
|
|
39262
|
-
noResultsFound ? "none" : "";
|
|
39263
|
-
console.log(noResultsFound, ((/** @type {?} */ (document.getElementById("rightRte")))).style);
|
|
39264
|
-
// this.ref.markForCheck();
|
|
39265
|
-
}));
|
|
39266
|
-
}
|
|
39267
|
-
}
|
|
39268
|
-
catch (_a) {
|
|
39269
|
-
// this.toastObj.show();
|
|
39270
|
-
}
|
|
39271
|
-
};
|
|
39272
|
-
/**
|
|
39273
|
-
* @param {?} subQuery
|
|
39274
|
-
* @param {?} promptQuery
|
|
39275
|
-
* @return {?}
|
|
39276
|
-
*/
|
|
39277
|
-
RichtexteditorComponent.prototype.getResponseFromOpenAI = /**
|
|
39278
|
-
* @param {?} subQuery
|
|
39279
|
-
* @param {?} promptQuery
|
|
39280
|
-
* @return {?}
|
|
39281
|
-
*/
|
|
39282
|
-
function (subQuery, promptQuery) {
|
|
39283
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
39284
|
-
var content;
|
|
39285
|
-
return __generator(this, function (_a) {
|
|
39286
|
-
switch (_a.label) {
|
|
39287
|
-
case 0: return [4 /*yield*/, OpenAiModelRTE(subQuery, promptQuery)];
|
|
39288
|
-
case 1:
|
|
39289
|
-
content = _a.sent();
|
|
39290
|
-
return [2 /*return*/, content ? ((/** @type {?} */ (content))) : ""];
|
|
39291
|
-
}
|
|
39292
|
-
});
|
|
39293
|
-
});
|
|
39294
|
-
};
|
|
39295
|
-
/**
|
|
39296
|
-
* @return {?}
|
|
39297
|
-
*/
|
|
39298
|
-
RichtexteditorComponent.prototype.dialogShow = /**
|
|
39299
|
-
* @return {?}
|
|
39300
|
-
*/
|
|
39301
|
-
function () {
|
|
39302
|
-
var _this = this;
|
|
39303
|
-
(/** @type {?} */ (this.regenerateButton)).element.addEventListener("click", (/**
|
|
39304
|
-
* @return {?}
|
|
39305
|
-
*/
|
|
39306
|
-
function () {
|
|
39307
|
-
_this.updateAISugesstions();
|
|
39308
|
-
}));
|
|
39309
|
-
(/** @type {?} */ (this.copyButton)).element.addEventListener("click", (/**
|
|
39310
|
-
* @return {?}
|
|
39311
|
-
*/
|
|
39312
|
-
function () {
|
|
39313
|
-
_this.copyTextToClipboard(_this.AIResult);
|
|
39314
|
-
}));
|
|
39315
|
-
(/** @type {?} */ (this.replaceButton)).element.addEventListener("click", (/**
|
|
39316
|
-
* @return {?}
|
|
39317
|
-
*/
|
|
39318
|
-
function () {
|
|
39319
|
-
/** @type {?} */
|
|
39320
|
-
var range = ((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.getRange(((/** @type {?} */ (_this.rteObj))).contentModule.getDocument());
|
|
39321
|
-
((/** @type {?} */ (_this.rteObj))).formatter.editorManager.nodeSelection.restore(range);
|
|
39322
|
-
((/** @type {?} */ (_this.rteObj))).executeCommand("insertHTML", _this.AIResult, {
|
|
39323
|
-
undo: true,
|
|
39324
|
-
});
|
|
39325
|
-
_this.closeDialog();
|
|
39326
|
-
}));
|
|
39327
|
-
((/** @type {?} */ (this.AIdialog))).element.style.display = "";
|
|
39328
|
-
};
|
|
39329
|
-
/**
|
|
39330
|
-
* @return {?}
|
|
39331
|
-
*/
|
|
39332
|
-
RichtexteditorComponent.prototype.closeDialog = /**
|
|
39333
|
-
* @return {?}
|
|
39334
|
-
*/
|
|
39335
|
-
function () {
|
|
39336
|
-
this.AIdialog.hide();
|
|
39337
|
-
this.rightRte.value = "";
|
|
39338
|
-
this.leftRte.value = "";
|
|
39339
|
-
this.promptQuery = "";
|
|
39340
|
-
this.chipValue = "Standard";
|
|
39341
|
-
this.AIResult = "";
|
|
39342
|
-
this.dropValIndex = 0;
|
|
39343
|
-
this.selectedQuery = "Rephrase";
|
|
39344
|
-
this.sentimentButton.content = "😊 Neutral";
|
|
39345
|
-
};
|
|
39346
|
-
/**
|
|
39347
|
-
* @param {?} text
|
|
39348
|
-
* @return {?}
|
|
39349
|
-
*/
|
|
39350
|
-
RichtexteditorComponent.prototype.copyTextToClipboard = /**
|
|
39351
|
-
* @param {?} text
|
|
39352
|
-
* @return {?}
|
|
39353
|
-
*/
|
|
39354
|
-
function (text) {
|
|
39355
|
-
if (navigator.clipboard) {
|
|
39356
|
-
navigator.clipboard
|
|
39357
|
-
.writeText(text)
|
|
39358
|
-
.then((/**
|
|
39359
|
-
* @return {?}
|
|
39360
|
-
*/
|
|
39361
|
-
function () {
|
|
39362
|
-
console.log("Text copied to clipboard successfully!");
|
|
39363
|
-
}))
|
|
39364
|
-
.catch((/**
|
|
39365
|
-
* @param {?} err
|
|
39366
|
-
* @return {?}
|
|
39367
|
-
*/
|
|
39368
|
-
function (err) {
|
|
39369
|
-
console.error("Failed to copy text: ", err);
|
|
39370
|
-
}));
|
|
39371
|
-
}
|
|
39372
|
-
else {
|
|
39373
|
-
// Fallback for browsers that do not support the Clipboard API
|
|
39374
|
-
/** @type {?} */
|
|
39375
|
-
var textarea = document.createElement("textarea");
|
|
39376
|
-
textarea.value = text;
|
|
39377
|
-
document.body.appendChild(textarea);
|
|
39378
|
-
textarea.select();
|
|
39379
|
-
try {
|
|
39380
|
-
document.execCommand("copy");
|
|
39381
|
-
console.log("Text copied to clipboard using execCommand");
|
|
39382
|
-
}
|
|
39383
|
-
catch (err) {
|
|
39384
|
-
console.error("Failed to copy text: ", err);
|
|
39385
|
-
}
|
|
39386
|
-
finally {
|
|
39387
|
-
document.body.removeChild(textarea);
|
|
39388
|
-
}
|
|
39389
|
-
}
|
|
39390
|
-
};
|
|
39391
|
-
/**
|
|
39392
|
-
* @return {?}
|
|
39393
|
-
*/
|
|
39394
|
-
RichtexteditorComponent.prototype.onOverlayClick = /**
|
|
39395
|
-
* @return {?}
|
|
39396
|
-
*/
|
|
39397
|
-
function () {
|
|
39398
|
-
/** @type {?} */
|
|
39399
|
-
var activeEle = this.AIdialog.element.querySelector(".char_block.e-active");
|
|
39400
|
-
if (activeEle) {
|
|
39401
|
-
activeEle.classList.remove("e-active");
|
|
39402
|
-
}
|
|
39403
|
-
this.closeDialog();
|
|
38867
|
+
this.actionBegin.emit(args);
|
|
39404
38868
|
};
|
|
39405
38869
|
/**
|
|
39406
38870
|
* @param {?} args
|
|
39407
38871
|
* @return {?}
|
|
39408
38872
|
*/
|
|
39409
|
-
RichtexteditorComponent.prototype.
|
|
38873
|
+
RichtexteditorComponent.prototype._input = /**
|
|
39410
38874
|
* @param {?} args
|
|
39411
38875
|
* @return {?}
|
|
39412
38876
|
*/
|
|
39413
38877
|
function (args) {
|
|
39414
|
-
|
|
39415
|
-
this.translatelanguage = "EN";
|
|
39416
|
-
this.selectedQuery = args.itemData.text;
|
|
39417
|
-
this.updateAISugesstionsData(args.itemData.text);
|
|
38878
|
+
this.input.emit(args);
|
|
39418
38879
|
};
|
|
39419
38880
|
/**
|
|
39420
38881
|
* @param {?} args
|
|
39421
38882
|
* @return {?}
|
|
39422
38883
|
*/
|
|
39423
|
-
RichtexteditorComponent.prototype.
|
|
38884
|
+
RichtexteditorComponent.prototype._actionComplete = /**
|
|
39424
38885
|
* @param {?} args
|
|
39425
38886
|
* @return {?}
|
|
39426
38887
|
*/
|
|
39427
38888
|
function (args) {
|
|
39428
|
-
|
|
39429
|
-
|
|
38889
|
+
if (args.requestType == "UL") {
|
|
38890
|
+
if (args.elements[0].parentElement.style.listStyleType == "dash") {
|
|
38891
|
+
args.elements[0].parentElement.style.listStyleImage =
|
|
38892
|
+
"url('../../../assets/img/bullet-dash.svg')";
|
|
38893
|
+
args.elements[0].parentElement.style.listStyleType = "none";
|
|
38894
|
+
}
|
|
38895
|
+
}
|
|
38896
|
+
else if (args.requestType == "OL") {
|
|
38897
|
+
args.elements[0].parentElement.classList.remove("custom-list", "parentheses");
|
|
38898
|
+
if (args.elements[0].parentElement.style.listStyleType == "parentheses") {
|
|
38899
|
+
args.elements[0].parentElement.classList = "custom-list";
|
|
38900
|
+
args.elements[0].parentElement.classList.add("parentheses");
|
|
38901
|
+
}
|
|
38902
|
+
}
|
|
38903
|
+
this.actionComplete.emit(args);
|
|
39430
38904
|
};
|
|
39431
38905
|
/**
|
|
39432
38906
|
* @param {?} args
|
|
39433
38907
|
* @return {?}
|
|
39434
38908
|
*/
|
|
39435
|
-
RichtexteditorComponent.prototype.
|
|
38909
|
+
RichtexteditorComponent.prototype._focus = /**
|
|
39436
38910
|
* @param {?} args
|
|
39437
38911
|
* @return {?}
|
|
39438
38912
|
*/
|
|
39439
38913
|
function (args) {
|
|
39440
|
-
this.
|
|
39441
|
-
// 事件会触发两次 必须判断args.text是否有值
|
|
39442
|
-
if (args.itemData.text)
|
|
39443
|
-
this.updateAISugesstionsData("Rephrase");
|
|
38914
|
+
this.focus.emit(args);
|
|
39444
38915
|
};
|
|
39445
38916
|
/**
|
|
39446
38917
|
* @param {?} args
|
|
39447
38918
|
* @return {?}
|
|
39448
38919
|
*/
|
|
39449
|
-
RichtexteditorComponent.prototype.
|
|
38920
|
+
RichtexteditorComponent.prototype._blur = /**
|
|
39450
38921
|
* @param {?} args
|
|
39451
38922
|
* @return {?}
|
|
39452
38923
|
*/
|
|
39453
38924
|
function (args) {
|
|
39454
|
-
this.
|
|
39455
|
-
};
|
|
39456
|
-
/**
|
|
39457
|
-
* @return {?}
|
|
39458
|
-
*/
|
|
39459
|
-
RichtexteditorComponent.prototype.hideToast = /**
|
|
39460
|
-
* @return {?}
|
|
39461
|
-
*/
|
|
39462
|
-
function () {
|
|
39463
|
-
this.showMsg = false;
|
|
39464
|
-
};
|
|
39465
|
-
/**
|
|
39466
|
-
* @return {?}
|
|
39467
|
-
*/
|
|
39468
|
-
RichtexteditorComponent.prototype.onZoom = /**
|
|
39469
|
-
* @return {?}
|
|
39470
|
-
*/
|
|
39471
|
-
function () {
|
|
39472
|
-
if (this.size === "largest") {
|
|
39473
|
-
this.size = ""; // 恢复到原始大小
|
|
39474
|
-
}
|
|
39475
|
-
else {
|
|
39476
|
-
this.size = "largest"; // 设置为最大化
|
|
39477
|
-
}
|
|
38925
|
+
this.blur.emit(args);
|
|
39478
38926
|
};
|
|
39479
38927
|
RichtexteditorComponent.decorators = [
|
|
39480
38928
|
{ type: core.Component, args: [{
|
|
39481
38929
|
selector: "rs-richtext-editor",
|
|
39482
|
-
template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n id=\"
|
|
38930
|
+
template: "<div class=\"editor_box\" id=\"container\">\r\n <ejs-richtexteditor\r\n #editor\r\n [id]=\"editorId\"\r\n [height]=\"height\"\r\n [saveInterval]=\"0\"\r\n [autoSaveOnIdle]=\"autoSaveOnIdle\"\r\n [toolbarSettings]=\"tools\"\r\n [quickToolbarSettings]=\"quickToolbarSettings\"\r\n [bulletFormatList]=\"bulletFormatList\"\r\n [numberFormatList]=\"numberFormatList\"\r\n [fontFamily]=\"family\"\r\n [fontSize]=\"fontSize\"\r\n [disabled]=\"disabled\"\r\n [insertImageSettings]=\"insertImageSettings\"\r\n [(value)]=\"value\"\r\n (actionBegin)=\"_actionBegin($event)\"\r\n (change)=\"onContentChange($event)\"\r\n (created)=\"onCreate()\"\r\n (toolbarClick)=\"_toolbarClick($event)\"\r\n (input)=\"_input($event)\"\r\n (focus)=\"_focus($event)\"\r\n (blur)=\"_blur($event)\"\r\n (actionComplete)=\"_actionComplete($event)\"\r\n >\r\n </ejs-richtexteditor>\r\n</div>\r\n",
|
|
39483
38931
|
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}"]
|
|
39484
38932
|
}] }
|
|
39485
38933
|
];
|
|
39486
|
-
/** @nocollapse */
|
|
39487
|
-
RichtexteditorComponent.ctorParameters = function () { return [
|
|
39488
|
-
{ type: core.ChangeDetectorRef }
|
|
39489
|
-
]; };
|
|
39490
38934
|
RichtexteditorComponent.propDecorators = {
|
|
39491
|
-
rteObj: [{ type: core.ViewChild, args: ["editor", { static: false },] }],
|
|
39492
|
-
queryCategory: [{ type: core.ViewChild, args: ["queryCategory", { static: false },] }],
|
|
39493
|
-
leftRte: [{ type: core.ViewChild, args: ["leftRte", { static: false },] }],
|
|
39494
|
-
rightRte: [{ type: core.ViewChild, args: ["rightRte", { static: false },] }],
|
|
39495
|
-
AIdialog: [{ type: core.ViewChild, args: ["AIdialog", { static: true },] }],
|
|
39496
|
-
sentimentButton: [{ type: core.ViewChild, args: ["sentimentButton", { static: false },] }],
|
|
39497
|
-
regenerateButton: [{ type: core.ViewChild, args: ["regenerateButton", { static: false },] }],
|
|
39498
|
-
copyButton: [{ type: core.ViewChild, args: ["copyButton", { static: false },] }],
|
|
39499
|
-
replaceButton: [{ type: core.ViewChild, args: ["replaceButton", { static: false },] }],
|
|
39500
|
-
placeholder: [{ type: core.Input }],
|
|
39501
38935
|
value: [{ type: core.Input }],
|
|
38936
|
+
editorId: [{ type: core.Input }],
|
|
39502
38937
|
height: [{ type: core.Input }],
|
|
39503
38938
|
autoSaveOnIdle: [{ type: core.Input }],
|
|
39504
|
-
|
|
38939
|
+
disabled: [{ type: core.Input }],
|
|
38940
|
+
insertImageSettings: [{ type: core.Input }],
|
|
39505
38941
|
toolbarClick: [{ type: core.Output }],
|
|
39506
|
-
change: [{ type: core.Output }]
|
|
38942
|
+
change: [{ type: core.Output }],
|
|
38943
|
+
created: [{ type: core.Output }],
|
|
38944
|
+
actionBegin: [{ type: core.Output }],
|
|
38945
|
+
input: [{ type: core.Output }],
|
|
38946
|
+
focus: [{ type: core.Output }],
|
|
38947
|
+
blur: [{ type: core.Output }],
|
|
38948
|
+
actionComplete: [{ type: core.Output }]
|
|
39507
38949
|
};
|
|
39508
38950
|
return RichtexteditorComponent;
|
|
39509
38951
|
}());
|
|
39510
38952
|
if (false) {
|
|
39511
|
-
/** @type {?} */
|
|
39512
|
-
RichtexteditorComponent.prototype.rteObj;
|
|
39513
|
-
/** @type {?} */
|
|
39514
|
-
RichtexteditorComponent.prototype.queryCategory;
|
|
39515
|
-
/** @type {?} */
|
|
39516
|
-
RichtexteditorComponent.prototype.leftRte;
|
|
39517
|
-
/** @type {?} */
|
|
39518
|
-
RichtexteditorComponent.prototype.rightRte;
|
|
39519
|
-
/** @type {?} */
|
|
39520
|
-
RichtexteditorComponent.prototype.AIdialog;
|
|
39521
|
-
/** @type {?} */
|
|
39522
|
-
RichtexteditorComponent.prototype.sentimentButton;
|
|
39523
|
-
/** @type {?} */
|
|
39524
|
-
RichtexteditorComponent.prototype.regenerateButton;
|
|
39525
|
-
/** @type {?} */
|
|
39526
|
-
RichtexteditorComponent.prototype.copyButton;
|
|
39527
|
-
/** @type {?} */
|
|
39528
|
-
RichtexteditorComponent.prototype.replaceButton;
|
|
39529
|
-
/** @type {?} */
|
|
39530
|
-
RichtexteditorComponent.prototype.placeholder;
|
|
39531
38953
|
/** @type {?} */
|
|
39532
38954
|
RichtexteditorComponent.prototype.value;
|
|
39533
38955
|
/** @type {?} */
|
|
38956
|
+
RichtexteditorComponent.prototype.editorId;
|
|
38957
|
+
/** @type {?} */
|
|
39534
38958
|
RichtexteditorComponent.prototype.height;
|
|
39535
38959
|
/** @type {?} */
|
|
39536
38960
|
RichtexteditorComponent.prototype.autoSaveOnIdle;
|
|
39537
38961
|
/** @type {?} */
|
|
39538
|
-
RichtexteditorComponent.prototype.
|
|
39539
|
-
/** @type {?} */
|
|
39540
|
-
RichtexteditorComponent.prototype.toolbarClick;
|
|
39541
|
-
/** @type {?} */
|
|
39542
|
-
RichtexteditorComponent.prototype.change;
|
|
39543
|
-
/** @type {?} */
|
|
39544
|
-
RichtexteditorComponent.prototype.family;
|
|
39545
|
-
/** @type {?} */
|
|
39546
|
-
RichtexteditorComponent.prototype.dialogWidth;
|
|
39547
|
-
/** @type {?} */
|
|
39548
|
-
RichtexteditorComponent.prototype.dialogHeight;
|
|
39549
|
-
/** @type {?} */
|
|
39550
|
-
RichtexteditorComponent.prototype.showZoomBtn;
|
|
39551
|
-
/** @type {?} */
|
|
39552
|
-
RichtexteditorComponent.prototype.showMsg;
|
|
38962
|
+
RichtexteditorComponent.prototype.disabled;
|
|
39553
38963
|
/** @type {?} */
|
|
39554
38964
|
RichtexteditorComponent.prototype.insertImageSettings;
|
|
39555
38965
|
/** @type {?} */
|
|
39556
|
-
RichtexteditorComponent.prototype.
|
|
39557
|
-
/** @type {?} */
|
|
39558
|
-
RichtexteditorComponent.prototype.size;
|
|
39559
|
-
/** @type {?} */
|
|
39560
|
-
RichtexteditorComponent.prototype.selectedQuery;
|
|
39561
|
-
/** @type {?} */
|
|
39562
|
-
RichtexteditorComponent.prototype.dropValIndex;
|
|
39563
|
-
/** @type {?} */
|
|
39564
|
-
RichtexteditorComponent.prototype.queryList;
|
|
38966
|
+
RichtexteditorComponent.prototype.toolbarClick;
|
|
39565
38967
|
/** @type {?} */
|
|
39566
|
-
RichtexteditorComponent.prototype.
|
|
38968
|
+
RichtexteditorComponent.prototype.change;
|
|
39567
38969
|
/** @type {?} */
|
|
39568
|
-
RichtexteditorComponent.prototype.
|
|
38970
|
+
RichtexteditorComponent.prototype.created;
|
|
39569
38971
|
/** @type {?} */
|
|
39570
|
-
RichtexteditorComponent.prototype.
|
|
38972
|
+
RichtexteditorComponent.prototype.actionBegin;
|
|
39571
38973
|
/** @type {?} */
|
|
39572
|
-
RichtexteditorComponent.prototype.
|
|
38974
|
+
RichtexteditorComponent.prototype.input;
|
|
39573
38975
|
/** @type {?} */
|
|
39574
|
-
RichtexteditorComponent.prototype.
|
|
38976
|
+
RichtexteditorComponent.prototype.focus;
|
|
39575
38977
|
/** @type {?} */
|
|
39576
|
-
RichtexteditorComponent.prototype.
|
|
38978
|
+
RichtexteditorComponent.prototype.blur;
|
|
39577
38979
|
/** @type {?} */
|
|
39578
|
-
RichtexteditorComponent.prototype.
|
|
38980
|
+
RichtexteditorComponent.prototype.actionComplete;
|
|
39579
38981
|
/** @type {?} */
|
|
39580
|
-
RichtexteditorComponent.prototype.
|
|
38982
|
+
RichtexteditorComponent.prototype.family;
|
|
39581
38983
|
/** @type {?} */
|
|
39582
|
-
RichtexteditorComponent.prototype.
|
|
38984
|
+
RichtexteditorComponent.prototype.fontSize;
|
|
39583
38985
|
/** @type {?} */
|
|
39584
38986
|
RichtexteditorComponent.prototype.tools;
|
|
39585
38987
|
/**
|
|
38988
|
+
* 表格快捷工具栏:含 TableCell(合并/拆分单元格)
|
|
39586
38989
|
* @type {?}
|
|
39587
|
-
* @private
|
|
39588
38990
|
*/
|
|
39589
|
-
RichtexteditorComponent.prototype.
|
|
38991
|
+
RichtexteditorComponent.prototype.quickToolbarSettings;
|
|
38992
|
+
/** @type {?} */
|
|
38993
|
+
RichtexteditorComponent.prototype.bulletFormatList;
|
|
38994
|
+
/** @type {?} */
|
|
38995
|
+
RichtexteditorComponent.prototype.numberFormatList;
|
|
39590
38996
|
}
|
|
39591
38997
|
|
|
39592
38998
|
/**
|