@worktile/theia 18.0.12 → 18.0.14
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/components/conversion-hint/conversion-hint.component.d.ts +3 -1
- package/components/plugin-menu/plugin-menu.component.d.ts +4 -2
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +2 -1
- package/components/toolbar-group/toolbar-group.component.d.ts +5 -2
- package/components/toolbar-item/toolbar-item.component.d.ts +2 -1
- package/core/toolbar-item/base-toolbar-item.d.ts +5 -0
- package/esm2022/components/conversion-hint/conversion-hint.component.mjs +5 -3
- package/esm2022/components/plugin-menu/plugin-menu.component.mjs +7 -5
- package/esm2022/components/toolbar-dropdown/toolbar-dropdown.component.mjs +8 -7
- package/esm2022/components/toolbar-group/toolbar-group.component.mjs +10 -7
- package/esm2022/components/toolbar-item/toolbar-item.component.mjs +14 -7
- package/esm2022/constants/plugin-menu.mjs +2 -2
- package/esm2022/core/toolbar-item/base-toolbar-item.mjs +15 -13
- package/esm2022/i18n/i18n.mjs +10 -0
- package/esm2022/i18n/i18n.service.mjs +49 -0
- package/esm2022/i18n/i18n.token.mjs +9 -0
- package/esm2022/i18n/index.mjs +10 -0
- package/esm2022/i18n/locales/de-de.mjs +100 -0
- package/esm2022/i18n/locales/en-us.mjs +100 -0
- package/esm2022/i18n/locales/ja-jp.mjs +100 -0
- package/esm2022/i18n/locales/ru-ru.mjs +100 -0
- package/esm2022/i18n/locales/zh-hans.mjs +100 -0
- package/esm2022/i18n/locales/zh-hant.mjs +100 -0
- package/esm2022/interfaces/plugins/plugin-menu.mjs +1 -1
- package/esm2022/interfaces/toolbar.mjs +1 -1
- package/esm2022/plugins/align/align.plugin.mjs +5 -1
- package/esm2022/plugins/blockquote/blockquote.plugin.mjs +5 -2
- package/esm2022/plugins/code/code.component.mjs +6 -4
- package/esm2022/plugins/code/code.plugin.mjs +5 -2
- package/esm2022/plugins/color/color.plugin.mjs +3 -1
- package/esm2022/plugins/color/toolbar-item.component.mjs +9 -8
- package/esm2022/plugins/common/common.plugin.mjs +2 -1
- package/esm2022/plugins/heading/heading.plugin.mjs +19 -5
- package/esm2022/plugins/hr/hr.plugin.mjs +5 -2
- package/esm2022/plugins/image/image.component.mjs +9 -7
- package/esm2022/plugins/image/image.plugin.mjs +5 -2
- package/esm2022/plugins/indent/indent.plugin.mjs +3 -1
- package/esm2022/plugins/inline-code/inline-code.plugin.mjs +2 -1
- package/esm2022/plugins/link/edit/link-edit.component.mjs +9 -7
- package/esm2022/plugins/link/link.editor.mjs +6 -3
- package/esm2022/plugins/link/link.plugin.mjs +5 -2
- package/esm2022/plugins/list/list.plugin.mjs +9 -3
- package/esm2022/plugins/mark/mark.plugin.mjs +5 -1
- package/esm2022/plugins/paint-format/paint-format.editor.mjs +5 -1
- package/esm2022/plugins/table/components/insert-mark/insert-mark.component.mjs +9 -6
- package/esm2022/plugins/table/components/toolbar/table-options.component.mjs +6 -4
- package/esm2022/plugins/table/components/toolbar/table-toolbar.component.mjs +11 -9
- package/esm2022/plugins/table/table.plugin.mjs +5 -2
- package/esm2022/plugins/table/toolbar-item.component.mjs +8 -7
- package/esm2022/plugins/todo-item/todo-item.plugin.mjs +5 -2
- package/esm2022/plugins/vertical-align/toolbar-item.component.mjs +8 -7
- package/esm2022/plugins/vertical-align/vertical-align.editor.mjs +5 -1
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/services/table-contextmenu.service.mjs +18 -16
- package/esm2022/utils/copy-node.mjs +7 -5
- package/fesm2022/worktile-theia.mjs +860 -117
- package/fesm2022/worktile-theia.mjs.map +1 -1
- package/i18n/i18n.d.ts +107 -0
- package/i18n/i18n.service.d.ts +14 -0
- package/i18n/i18n.token.d.ts +9 -0
- package/i18n/index.d.ts +9 -0
- package/i18n/locales/de-de.d.ts +100 -0
- package/i18n/locales/en-us.d.ts +100 -0
- package/i18n/locales/ja-jp.d.ts +100 -0
- package/i18n/locales/ru-ru.d.ts +100 -0
- package/i18n/locales/zh-hans.d.ts +100 -0
- package/i18n/locales/zh-hant.d.ts +100 -0
- package/interfaces/plugins/plugin-menu.d.ts +3 -0
- package/interfaces/toolbar.d.ts +1 -0
- package/package.json +1 -1
- package/plugins/code/code.component.d.ts +3 -1
- package/plugins/color/toolbar-item.component.d.ts +2 -1
- package/plugins/image/image.component.d.ts +3 -1
- package/plugins/link/edit/link-edit.component.d.ts +3 -1
- package/plugins/link/link.editor.d.ts +2 -1
- package/plugins/table/components/insert-mark/insert-mark.component.d.ts +5 -2
- package/plugins/table/components/toolbar/table-options.component.d.ts +3 -1
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +3 -1
- package/plugins/table/toolbar-item.component.d.ts +2 -1
- package/plugins/vertical-align/toolbar-item.component.d.ts +2 -1
- package/public-api.d.ts +1 -0
- package/services/table-contextmenu.service.d.ts +3 -1
- package/utils/copy-node.d.ts +3 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgIf, NgFor, NgStyle, NgTemplateOutlet, NgClass, DOCUMENT } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, Component, Directive, Input, HostBinding, ViewChild, HostListener, ViewContainerRef, Inject, TemplateRef, ChangeDetectionStrategy, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter,
|
|
3
|
+
import { InjectionToken, Component, inject, signal, Injectable, computed, Directive, Input, HostBinding, ViewChild, HostListener, ViewContainerRef, Inject, TemplateRef, ChangeDetectionStrategy, Optional, SkipSelf, ContentChildren, forwardRef, EventEmitter, NgZone, ElementRef, DestroyRef, Output, Pipe, ChangeDetectorRef, Renderer2, viewChild, ViewChildren, Injector, NgModule } from '@angular/core';
|
|
4
4
|
import { ThyDivider } from 'ngx-tethys/divider';
|
|
5
5
|
import { ThyAction, ThyActions } from 'ngx-tethys/action';
|
|
6
6
|
import { ThyDropdownMenuItemDirective, ThyDropdownMenuDivider, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownMenuItemExtendIconDirective } from 'ngx-tethys/dropdown';
|
|
@@ -346,7 +346,7 @@ const DefaultPluginMenu = [
|
|
|
346
346
|
ElementKinds.numberedList,
|
|
347
347
|
ElementKinds.bulletedList,
|
|
348
348
|
ElementKinds.link,
|
|
349
|
-
{ groupName: '基础' },
|
|
349
|
+
{ groupName: '基础', translateKey: 'base' },
|
|
350
350
|
ElementKinds.image,
|
|
351
351
|
ElementKinds.table,
|
|
352
352
|
ElementKinds.blockquote,
|
|
@@ -1737,18 +1737,20 @@ const setClipboardDataByDom = async (e, fragment, data) => {
|
|
|
1737
1737
|
await setClipboardData(clipboardData, div, attach, data);
|
|
1738
1738
|
document.body.removeChild(div);
|
|
1739
1739
|
};
|
|
1740
|
-
function copyNode(e, element, thyNotifyService) {
|
|
1740
|
+
function copyNode(e, element, thyNotifyService, locale) {
|
|
1741
|
+
const copyFailTips = (locale && locale() && locale().copyFailed) ?? '复制失败';
|
|
1742
|
+
const copySuccessTips = (locale && locale() && locale().copySuccess) ?? '复制成功';
|
|
1741
1743
|
if (!isClipboardWriteSupported()) {
|
|
1742
|
-
thyNotifyService?.error(
|
|
1744
|
+
thyNotifyService?.error(copyFailTips);
|
|
1743
1745
|
return;
|
|
1744
1746
|
}
|
|
1745
1747
|
const fragment = cloneDeep(element);
|
|
1746
1748
|
return setClipboardDataByDom(e, fragment)
|
|
1747
1749
|
.then(() => {
|
|
1748
|
-
thyNotifyService?.success(
|
|
1750
|
+
thyNotifyService?.success(copySuccessTips);
|
|
1749
1751
|
})
|
|
1750
1752
|
.catch(() => {
|
|
1751
|
-
thyNotifyService?.error(
|
|
1753
|
+
thyNotifyService?.error(copyFailTips);
|
|
1752
1754
|
});
|
|
1753
1755
|
}
|
|
1754
1756
|
|
|
@@ -2405,10 +2407,664 @@ const createToolbar = (editor, global = DefaultGlobalToolbarDefinition, inline =
|
|
|
2405
2407
|
};
|
|
2406
2408
|
};
|
|
2407
2409
|
|
|
2408
|
-
|
|
2410
|
+
var TheLocaleType;
|
|
2411
|
+
(function (TheLocaleType) {
|
|
2412
|
+
TheLocaleType["zhHans"] = "zh-hans";
|
|
2413
|
+
TheLocaleType["zhHant"] = "zh-hant";
|
|
2414
|
+
TheLocaleType["enUs"] = "en-us";
|
|
2415
|
+
TheLocaleType["jaJp"] = "ja-jp";
|
|
2416
|
+
TheLocaleType["deDe"] = "de-de";
|
|
2417
|
+
TheLocaleType["ruRu"] = "ru-ru";
|
|
2418
|
+
})(TheLocaleType || (TheLocaleType = {}));
|
|
2419
|
+
|
|
2420
|
+
const THE_I18N_LOCALE_ID = new InjectionToken('the-i18n-locale-id');
|
|
2421
|
+
const THE_I18N_ZH_HANS = new InjectionToken('the-i18n-zh-hans');
|
|
2422
|
+
const THE_I18N_ZH_HANT = new InjectionToken('the-i18n-zh-hant');
|
|
2423
|
+
const THE_I18N_EN_US = new InjectionToken('the-i18n-en-us');
|
|
2424
|
+
const THE_I18N_JA_JP = new InjectionToken('the-i18n-ja-jp');
|
|
2425
|
+
const THE_I18N_DE_DE = new InjectionToken('the-i18n-de-de');
|
|
2426
|
+
const THE_I18N_RU_RU = new InjectionToken('the-i18n-ru-ru');
|
|
2427
|
+
|
|
2428
|
+
function normalizeLocale(localeId) {
|
|
2429
|
+
return localeId?.toLowerCase().replace(/_/g, '-');
|
|
2430
|
+
}
|
|
2431
|
+
class TheI18nService {
|
|
2409
2432
|
constructor() {
|
|
2410
|
-
this.
|
|
2433
|
+
this.locales = {
|
|
2434
|
+
[TheLocaleType.zhHans]: inject(THE_I18N_ZH_HANS, { optional: true }) || zhHansLocale,
|
|
2435
|
+
[TheLocaleType.zhHant]: inject(THE_I18N_ZH_HANT, { optional: true }) || zhHantLocale,
|
|
2436
|
+
[TheLocaleType.enUs]: inject(THE_I18N_EN_US, { optional: true }) || enUsLocale,
|
|
2437
|
+
[TheLocaleType.jaJp]: inject(THE_I18N_JA_JP, { optional: true }) || jaJpLocale,
|
|
2438
|
+
[TheLocaleType.deDe]: inject(THE_I18N_DE_DE, { optional: true }) || deDeLocale,
|
|
2439
|
+
[TheLocaleType.ruRu]: inject(THE_I18N_RU_RU, { optional: true }) || ruRuLocale
|
|
2440
|
+
};
|
|
2441
|
+
this.defaultLocaleId = normalizeLocale(inject(THE_I18N_LOCALE_ID, { optional: true })) || TheLocaleType.zhHans;
|
|
2442
|
+
this.locale = signal(this.locales[this.defaultLocaleId]);
|
|
2443
|
+
}
|
|
2444
|
+
setLocale(id) {
|
|
2445
|
+
let localeId = normalizeLocale(id);
|
|
2446
|
+
if (localeId.includes('zh') && localeId !== TheLocaleType.zhHans && localeId !== TheLocaleType.zhHant) {
|
|
2447
|
+
localeId = TheLocaleType.zhHans;
|
|
2448
|
+
}
|
|
2449
|
+
this.locale.set(this.locales[localeId] || this.locales[this.defaultLocaleId] || {});
|
|
2450
|
+
}
|
|
2451
|
+
getLocale() {
|
|
2452
|
+
return this.locale;
|
|
2453
|
+
}
|
|
2454
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheI18nService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2455
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheI18nService, providedIn: 'root' }); }
|
|
2456
|
+
}
|
|
2457
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheI18nService, decorators: [{
|
|
2458
|
+
type: Injectable,
|
|
2459
|
+
args: [{
|
|
2460
|
+
providedIn: 'root'
|
|
2461
|
+
}]
|
|
2462
|
+
}] });
|
|
2463
|
+
function injectLocale() {
|
|
2464
|
+
return inject(TheI18nService).getLocale();
|
|
2465
|
+
}
|
|
2466
|
+
function injectTranslations() {
|
|
2467
|
+
return computed(() => {
|
|
2468
|
+
const locale = injectLocale();
|
|
2469
|
+
return locale().translations;
|
|
2470
|
+
});
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
var zhHansLocale = {
|
|
2474
|
+
id: TheLocaleType.zhHans,
|
|
2475
|
+
translations: {
|
|
2476
|
+
link: '链接',
|
|
2477
|
+
conversion: '立即转换',
|
|
2478
|
+
conversionHint: '检测到粘贴内容符合Markdown语法',
|
|
2479
|
+
search: '搜索',
|
|
2480
|
+
noData: '暂无数据',
|
|
2481
|
+
searchResult: '搜索结果',
|
|
2482
|
+
autoWrap: '自动换行',
|
|
2483
|
+
copy: '复制',
|
|
2484
|
+
copySuccess: '复制成功',
|
|
2485
|
+
copyFailed: '复制失败',
|
|
2486
|
+
delete: '删除',
|
|
2487
|
+
text: '文本',
|
|
2488
|
+
enterText: '请输入文本',
|
|
2489
|
+
textRequired: '文本不能为空',
|
|
2490
|
+
enterLink: '请输入链接',
|
|
2491
|
+
apply: '应用',
|
|
2492
|
+
cancel: '取消',
|
|
2493
|
+
linkRequired: '链接不能为空',
|
|
2494
|
+
linkPattern: '请输入正确的链接',
|
|
2495
|
+
insertRow: '插入行',
|
|
2496
|
+
insertCol: '插入列',
|
|
2497
|
+
insertUpward: '向上插入',
|
|
2498
|
+
insertDownward: '向下插入',
|
|
2499
|
+
insertLeft: '向左插入',
|
|
2500
|
+
insertRight: '向右插入',
|
|
2501
|
+
row: '行',
|
|
2502
|
+
column: '列',
|
|
2503
|
+
titleRow: '标题行',
|
|
2504
|
+
titleCol: '标题列',
|
|
2505
|
+
orderCol: '序号列',
|
|
2506
|
+
cellBackground: '单元格背景',
|
|
2507
|
+
colEqualWidth: '列等宽',
|
|
2508
|
+
fullscreen: '全屏',
|
|
2509
|
+
table: '表格',
|
|
2510
|
+
tableDesc: '支持插入表格',
|
|
2511
|
+
tableOptions: '表格选项',
|
|
2512
|
+
mergeCells: '合并单元格',
|
|
2513
|
+
splitCells: '拆分单元格',
|
|
2514
|
+
deleteEntireRow: '删除整行',
|
|
2515
|
+
deleteEntireCol: '删除整列',
|
|
2516
|
+
deleteTable: '删除表格',
|
|
2517
|
+
clearSelection: '清空选中区域',
|
|
2518
|
+
deleteTheRow: '删除所在行',
|
|
2519
|
+
deleteTheColumn: '删除所在列',
|
|
2520
|
+
base: '基础',
|
|
2521
|
+
alignment: '对齐方式',
|
|
2522
|
+
alignLeft: '左对齐',
|
|
2523
|
+
alignCenter: '居中',
|
|
2524
|
+
alignRight: '右对齐',
|
|
2525
|
+
wrapLeft: '图片居左',
|
|
2526
|
+
wrapRight: '图片居右',
|
|
2527
|
+
verticalAlign: '垂直对齐',
|
|
2528
|
+
verticalAlignTop: '顶部对齐',
|
|
2529
|
+
verticalAlignMiddle: '垂直居中',
|
|
2530
|
+
verticalAlignBottom: '底部对齐',
|
|
2531
|
+
blockquote: '引用',
|
|
2532
|
+
blockquoteDesc: '支持引用内容',
|
|
2533
|
+
code: '代码块',
|
|
2534
|
+
codeDesc: '支持插入语法高亮的代码',
|
|
2535
|
+
fontColor: '字体颜色',
|
|
2536
|
+
backgroundColor: '背景颜色',
|
|
2537
|
+
headingList: '正文',
|
|
2538
|
+
paragraph: '正文',
|
|
2539
|
+
heading1: '标题1',
|
|
2540
|
+
heading1Desc: '插入一级标题',
|
|
2541
|
+
heading2: '标题2',
|
|
2542
|
+
heading2Desc: '插入二级标题',
|
|
2543
|
+
heading3: '标题3',
|
|
2544
|
+
heading3Desc: '插入三级标题',
|
|
2545
|
+
heading4: '标题4',
|
|
2546
|
+
heading4Desc: '插入四级标题',
|
|
2547
|
+
divider: '分割线',
|
|
2548
|
+
dividerDesc: '使用水平线分隔内容',
|
|
2549
|
+
image: '图片',
|
|
2550
|
+
imageDesc: '支持 jpg、jpeg 等格式图像',
|
|
2551
|
+
increaseIndent: '增加缩进',
|
|
2552
|
+
decreaseIndent: '减少缩进',
|
|
2553
|
+
inlineCode: '行内代码',
|
|
2554
|
+
linkDesc: '支持插入链接',
|
|
2555
|
+
orderedList: '有序列表',
|
|
2556
|
+
orderedListDesc: '插入有序列表',
|
|
2557
|
+
unorderedList: '无序列表',
|
|
2558
|
+
unorderedListDesc: '插入无序列表',
|
|
2559
|
+
bold: '加粗',
|
|
2560
|
+
italic: '斜体',
|
|
2561
|
+
strike: '删除线',
|
|
2562
|
+
underline: '下划线',
|
|
2563
|
+
undo: '撤销',
|
|
2564
|
+
redo: '重做',
|
|
2565
|
+
paintFormat: '格式刷',
|
|
2566
|
+
cleanFormat: '清除格式',
|
|
2567
|
+
checkItem: '待办事项',
|
|
2568
|
+
checkItemDesc: '插入待办事项'
|
|
2569
|
+
}
|
|
2570
|
+
};
|
|
2571
|
+
|
|
2572
|
+
var zhHantLocale = {
|
|
2573
|
+
id: TheLocaleType.zhHant,
|
|
2574
|
+
translations: {
|
|
2575
|
+
link: '鏈接',
|
|
2576
|
+
conversion: '立即轉換',
|
|
2577
|
+
conversionHint: '檢測到貼上內容符合Markdown語法',
|
|
2578
|
+
search: '搜尋',
|
|
2579
|
+
noData: '暫無資料',
|
|
2580
|
+
searchResult: '搜尋結果',
|
|
2581
|
+
autoWrap: '自動換行',
|
|
2582
|
+
copy: '複製',
|
|
2583
|
+
copySuccess: '複製成功',
|
|
2584
|
+
copyFailed: '複製失敗',
|
|
2585
|
+
delete: '刪除',
|
|
2586
|
+
text: '文字',
|
|
2587
|
+
enterText: '請輸入文字',
|
|
2588
|
+
textRequired: '文字不能為空',
|
|
2589
|
+
enterLink: '請輸入鏈接',
|
|
2590
|
+
apply: '套用',
|
|
2591
|
+
cancel: '取消',
|
|
2592
|
+
linkRequired: '鏈接不能為空',
|
|
2593
|
+
linkPattern: '請輸入正確的鏈接',
|
|
2594
|
+
insertRow: '插入列',
|
|
2595
|
+
insertCol: '插入欄',
|
|
2596
|
+
insertUpward: '向上插入',
|
|
2597
|
+
insertDownward: '向下插入',
|
|
2598
|
+
insertLeft: '向左插入',
|
|
2599
|
+
insertRight: '向右插入',
|
|
2600
|
+
row: '列',
|
|
2601
|
+
column: '欄',
|
|
2602
|
+
titleRow: '標題列',
|
|
2603
|
+
titleCol: '標題欄',
|
|
2604
|
+
orderCol: '序號欄',
|
|
2605
|
+
cellBackground: '儲存格背景',
|
|
2606
|
+
colEqualWidth: '欄等寬',
|
|
2607
|
+
fullscreen: '全螢幕',
|
|
2608
|
+
table: '表格',
|
|
2609
|
+
tableDesc: '支援插入表格',
|
|
2610
|
+
tableOptions: '表格選項',
|
|
2611
|
+
mergeCells: '合併儲存格',
|
|
2612
|
+
splitCells: '分割儲存格',
|
|
2613
|
+
deleteEntireRow: '刪除整列',
|
|
2614
|
+
deleteEntireCol: '刪除整欄',
|
|
2615
|
+
deleteTable: '刪除表格',
|
|
2616
|
+
clearSelection: '清空選中區域',
|
|
2617
|
+
deleteTheRow: '刪除所在列',
|
|
2618
|
+
deleteTheColumn: '刪除所在欄',
|
|
2619
|
+
base: '基礎',
|
|
2620
|
+
alignment: '對齊方式',
|
|
2621
|
+
alignLeft: '靠左對齊',
|
|
2622
|
+
alignCenter: '置中',
|
|
2623
|
+
alignRight: '靠右對齊',
|
|
2624
|
+
wrapLeft: '圖片靠左',
|
|
2625
|
+
wrapRight: '圖片靠右',
|
|
2626
|
+
verticalAlign: '垂直對齊',
|
|
2627
|
+
verticalAlignTop: '頂部對齊',
|
|
2628
|
+
verticalAlignMiddle: '垂直置中',
|
|
2629
|
+
verticalAlignBottom: '底部對齊',
|
|
2630
|
+
blockquote: '引用',
|
|
2631
|
+
blockquoteDesc: '支援引用內容',
|
|
2632
|
+
code: '程式碼區塊',
|
|
2633
|
+
codeDesc: '支援插入語法高亮的程式碼',
|
|
2634
|
+
fontColor: '字型顏色',
|
|
2635
|
+
backgroundColor: '背景顏色',
|
|
2636
|
+
headingList: '正文',
|
|
2637
|
+
paragraph: '正文',
|
|
2638
|
+
heading1: '標題1',
|
|
2639
|
+
heading1Desc: '插入一級標題',
|
|
2640
|
+
heading2: '標題2',
|
|
2641
|
+
heading2Desc: '插入二級標題',
|
|
2642
|
+
heading3: '標題3',
|
|
2643
|
+
heading3Desc: '插入三級標題',
|
|
2644
|
+
heading4: '標題4',
|
|
2645
|
+
heading4Desc: '插入四級標題',
|
|
2646
|
+
divider: '分隔線',
|
|
2647
|
+
dividerDesc: '使用水平線分隔內容',
|
|
2648
|
+
image: '圖片',
|
|
2649
|
+
imageDesc: '支援 jpg、jpeg 等格式圖像',
|
|
2650
|
+
increaseIndent: '增加縮排',
|
|
2651
|
+
decreaseIndent: '減少縮排',
|
|
2652
|
+
inlineCode: '行內程式碼',
|
|
2653
|
+
linkDesc: '支援插入鏈接',
|
|
2654
|
+
orderedList: '有序清單',
|
|
2655
|
+
orderedListDesc: '插入有序清單',
|
|
2656
|
+
unorderedList: '無序清單',
|
|
2657
|
+
unorderedListDesc: '插入無序清單',
|
|
2658
|
+
bold: '粗體',
|
|
2659
|
+
italic: '斜體',
|
|
2660
|
+
strike: '刪除線',
|
|
2661
|
+
underline: '底線',
|
|
2662
|
+
undo: '復原',
|
|
2663
|
+
redo: '重做',
|
|
2664
|
+
paintFormat: '格式刷',
|
|
2665
|
+
cleanFormat: '清除格式',
|
|
2666
|
+
checkItem: '待辦事項',
|
|
2667
|
+
checkItemDesc: '插入待辦事項'
|
|
2668
|
+
}
|
|
2669
|
+
};
|
|
2670
|
+
|
|
2671
|
+
var enUsLocale = {
|
|
2672
|
+
id: TheLocaleType.enUs,
|
|
2673
|
+
translations: {
|
|
2674
|
+
link: 'Link',
|
|
2675
|
+
conversion: 'Convert Now',
|
|
2676
|
+
conversionHint: 'Markdown syntax detected in pasted content',
|
|
2677
|
+
search: 'Search',
|
|
2678
|
+
noData: 'No Data',
|
|
2679
|
+
searchResult: 'Search Results',
|
|
2680
|
+
autoWrap: 'Auto Wrap',
|
|
2681
|
+
copy: 'Copy',
|
|
2682
|
+
copySuccess: 'Copied',
|
|
2683
|
+
copyFailed: 'Copy Failed',
|
|
2684
|
+
delete: 'Delete',
|
|
2685
|
+
text: 'Text',
|
|
2686
|
+
enterText: 'Enter text',
|
|
2687
|
+
textRequired: 'Text is required',
|
|
2688
|
+
enterLink: 'Enter link',
|
|
2689
|
+
apply: 'Apply',
|
|
2690
|
+
cancel: 'Cancel',
|
|
2691
|
+
linkRequired: 'Link is required',
|
|
2692
|
+
linkPattern: 'Please enter a valid link',
|
|
2693
|
+
insertRow: 'Insert Row',
|
|
2694
|
+
insertCol: 'Insert Column',
|
|
2695
|
+
insertUpward: 'Insert Above',
|
|
2696
|
+
insertDownward: 'Insert Below',
|
|
2697
|
+
insertLeft: 'Insert Left',
|
|
2698
|
+
insertRight: 'Insert Right',
|
|
2699
|
+
row: 'Row',
|
|
2700
|
+
column: 'Column',
|
|
2701
|
+
titleRow: 'Header Row',
|
|
2702
|
+
titleCol: 'Header Column',
|
|
2703
|
+
orderCol: 'Order Column',
|
|
2704
|
+
cellBackground: 'Cell Background',
|
|
2705
|
+
colEqualWidth: 'Equal Column Width',
|
|
2706
|
+
fullscreen: 'Fullscreen',
|
|
2707
|
+
table: 'Table',
|
|
2708
|
+
tableDesc: 'Insert table',
|
|
2709
|
+
tableOptions: 'Table Options',
|
|
2710
|
+
mergeCells: 'Merge Cells',
|
|
2711
|
+
splitCells: 'Split Cells',
|
|
2712
|
+
deleteEntireRow: 'Delete Row',
|
|
2713
|
+
deleteEntireCol: 'Delete Column',
|
|
2714
|
+
deleteTable: 'Delete Table',
|
|
2715
|
+
clearSelection: 'Clear Selection',
|
|
2716
|
+
deleteTheRow: 'Delete Current Row',
|
|
2717
|
+
deleteTheColumn: 'Delete Current Column',
|
|
2718
|
+
base: 'Basic',
|
|
2719
|
+
alignment: 'Alignment',
|
|
2720
|
+
alignLeft: 'Align Left',
|
|
2721
|
+
alignCenter: 'Center',
|
|
2722
|
+
alignRight: 'Align Right',
|
|
2723
|
+
wrapLeft: 'Image Left',
|
|
2724
|
+
wrapRight: 'Image Right',
|
|
2725
|
+
verticalAlign: 'Vertical Align',
|
|
2726
|
+
verticalAlignTop: 'Top',
|
|
2727
|
+
verticalAlignMiddle: 'Middle',
|
|
2728
|
+
verticalAlignBottom: 'Bottom',
|
|
2729
|
+
blockquote: 'Quote',
|
|
2730
|
+
blockquoteDesc: 'Insert quote',
|
|
2731
|
+
code: 'Code Block',
|
|
2732
|
+
codeDesc: 'Insert code with syntax highlighting',
|
|
2733
|
+
fontColor: 'Font Color',
|
|
2734
|
+
backgroundColor: 'Background Color',
|
|
2735
|
+
headingList: 'Normal Text',
|
|
2736
|
+
paragraph: 'Normal Text',
|
|
2737
|
+
heading1: 'Heading 1',
|
|
2738
|
+
heading1Desc: 'Insert heading 1',
|
|
2739
|
+
heading2: 'Heading 2',
|
|
2740
|
+
heading2Desc: 'Insert heading 2',
|
|
2741
|
+
heading3: 'Heading 3',
|
|
2742
|
+
heading3Desc: 'Insert heading 3',
|
|
2743
|
+
heading4: 'Heading 4',
|
|
2744
|
+
heading4Desc: 'Insert heading 4',
|
|
2745
|
+
divider: 'Divider',
|
|
2746
|
+
dividerDesc: 'Insert horizontal divider',
|
|
2747
|
+
image: 'Image',
|
|
2748
|
+
imageDesc: 'Supports jpg, jpeg and other image formats',
|
|
2749
|
+
increaseIndent: 'Increase Indent',
|
|
2750
|
+
decreaseIndent: 'Decrease Indent',
|
|
2751
|
+
inlineCode: 'Inline Code',
|
|
2752
|
+
linkDesc: 'Insert link',
|
|
2753
|
+
orderedList: 'Ordered List',
|
|
2754
|
+
orderedListDesc: 'Insert ordered list',
|
|
2755
|
+
unorderedList: 'Unordered List',
|
|
2756
|
+
unorderedListDesc: 'Insert unordered list',
|
|
2757
|
+
bold: 'Bold',
|
|
2758
|
+
italic: 'Italic',
|
|
2759
|
+
strike: 'Strikethrough',
|
|
2760
|
+
underline: 'Underline',
|
|
2761
|
+
undo: 'Undo',
|
|
2762
|
+
redo: 'Redo',
|
|
2763
|
+
paintFormat: 'Format Painter',
|
|
2764
|
+
cleanFormat: 'Clear Format',
|
|
2765
|
+
checkItem: 'Todo Item',
|
|
2766
|
+
checkItemDesc: 'Insert todo item'
|
|
2767
|
+
}
|
|
2768
|
+
};
|
|
2769
|
+
|
|
2770
|
+
var jaJpLocale = {
|
|
2771
|
+
id: TheLocaleType.jaJp,
|
|
2772
|
+
translations: {
|
|
2773
|
+
link: 'リンク',
|
|
2774
|
+
conversion: '変換する',
|
|
2775
|
+
conversionHint: 'Markdown構文が検出されました',
|
|
2776
|
+
search: '検索',
|
|
2777
|
+
noData: 'データなし',
|
|
2778
|
+
searchResult: '検索結果',
|
|
2779
|
+
autoWrap: '自動改行',
|
|
2780
|
+
copy: 'コピー',
|
|
2781
|
+
copySuccess: 'コピーしました',
|
|
2782
|
+
copyFailed: 'コピーに失敗しました',
|
|
2783
|
+
delete: '削除',
|
|
2784
|
+
text: 'テキスト',
|
|
2785
|
+
enterText: 'テキストを入力',
|
|
2786
|
+
textRequired: 'テキストを入力してください',
|
|
2787
|
+
enterLink: 'リンクを入力',
|
|
2788
|
+
apply: '適用',
|
|
2789
|
+
cancel: 'キャンセル',
|
|
2790
|
+
linkRequired: 'リンクを入力してください',
|
|
2791
|
+
linkPattern: '有効なリンクを入力してください',
|
|
2792
|
+
insertRow: '行を挿入',
|
|
2793
|
+
insertCol: '列を挿入',
|
|
2794
|
+
insertUpward: '上に挿入',
|
|
2795
|
+
insertDownward: '下に挿入',
|
|
2796
|
+
insertLeft: '左に挿入',
|
|
2797
|
+
insertRight: '右に挿入',
|
|
2798
|
+
row: '行',
|
|
2799
|
+
column: '列',
|
|
2800
|
+
titleRow: 'ヘッダー行',
|
|
2801
|
+
titleCol: 'ヘッダー列',
|
|
2802
|
+
orderCol: '順序列',
|
|
2803
|
+
cellBackground: 'セルの背景',
|
|
2804
|
+
colEqualWidth: '列幅を揃える',
|
|
2805
|
+
fullscreen: '全画面',
|
|
2806
|
+
table: 'テーブル',
|
|
2807
|
+
tableDesc: 'テーブルを挿入',
|
|
2808
|
+
tableOptions: 'テーブルオプション',
|
|
2809
|
+
mergeCells: 'セルを結合',
|
|
2810
|
+
splitCells: 'セルを分割',
|
|
2811
|
+
deleteEntireRow: '行を削除',
|
|
2812
|
+
deleteEntireCol: '列を削除',
|
|
2813
|
+
deleteTable: 'テーブルを削除',
|
|
2814
|
+
clearSelection: '選択をクリア',
|
|
2815
|
+
deleteTheRow: '現在の行を削除',
|
|
2816
|
+
deleteTheColumn: '現在の列を削除',
|
|
2817
|
+
base: '基本',
|
|
2818
|
+
alignment: '配置',
|
|
2819
|
+
alignLeft: '左揃え',
|
|
2820
|
+
alignCenter: '中央揃え',
|
|
2821
|
+
alignRight: '右揃え',
|
|
2822
|
+
wrapLeft: '画像を左に配置',
|
|
2823
|
+
wrapRight: '画像を右に配置',
|
|
2824
|
+
verticalAlign: '垂直方向の配置',
|
|
2825
|
+
verticalAlignTop: '上揃え',
|
|
2826
|
+
verticalAlignMiddle: '中央揃え',
|
|
2827
|
+
verticalAlignBottom: '下揃え',
|
|
2828
|
+
blockquote: '引用',
|
|
2829
|
+
blockquoteDesc: '引用を挿入',
|
|
2830
|
+
code: 'コードブロック',
|
|
2831
|
+
codeDesc: 'シンタックスハイライト付きコードを挿入',
|
|
2832
|
+
fontColor: '文字色',
|
|
2833
|
+
backgroundColor: '背景色',
|
|
2834
|
+
headingList: '本文',
|
|
2835
|
+
paragraph: '本文',
|
|
2836
|
+
heading1: '見出し1',
|
|
2837
|
+
heading1Desc: '見出し1を挿入',
|
|
2838
|
+
heading2: '見出し2',
|
|
2839
|
+
heading2Desc: '見出し2を挿入',
|
|
2840
|
+
heading3: '見出し3',
|
|
2841
|
+
heading3Desc: '見出し3を挿入',
|
|
2842
|
+
heading4: '見出し4',
|
|
2843
|
+
heading4Desc: '見出し4を挿入',
|
|
2844
|
+
divider: '区切り線',
|
|
2845
|
+
dividerDesc: '水平線を挿入',
|
|
2846
|
+
image: '画像',
|
|
2847
|
+
imageDesc: 'jpg、jpeg等の画像形式に対応',
|
|
2848
|
+
increaseIndent: 'インデント増',
|
|
2849
|
+
decreaseIndent: 'インデント減',
|
|
2850
|
+
inlineCode: 'インラインコード',
|
|
2851
|
+
linkDesc: 'リンクを挿入',
|
|
2852
|
+
orderedList: '番号付きリスト',
|
|
2853
|
+
orderedListDesc: '番号付きリストを挿入',
|
|
2854
|
+
unorderedList: '番号なしリスト',
|
|
2855
|
+
unorderedListDesc: '番号なしリストを挿入',
|
|
2856
|
+
bold: '太字',
|
|
2857
|
+
italic: 'イタリック',
|
|
2858
|
+
strike: '取り消し線',
|
|
2859
|
+
underline: '下線',
|
|
2860
|
+
undo: '元に戻す',
|
|
2861
|
+
redo: 'やり直し',
|
|
2862
|
+
paintFormat: '書式のコピー',
|
|
2863
|
+
cleanFormat: '書式をクリア',
|
|
2864
|
+
checkItem: 'タスク',
|
|
2865
|
+
checkItemDesc: 'タスクを挿入'
|
|
2411
2866
|
}
|
|
2867
|
+
};
|
|
2868
|
+
|
|
2869
|
+
var deDeLocale = {
|
|
2870
|
+
id: TheLocaleType.deDe,
|
|
2871
|
+
translations: {
|
|
2872
|
+
link: 'Link',
|
|
2873
|
+
conversion: 'Jetzt konvertieren',
|
|
2874
|
+
conversionHint: 'Markdown-Syntax im eingefügten Inhalt erkannt',
|
|
2875
|
+
search: 'Suchen',
|
|
2876
|
+
noData: 'Keine Daten',
|
|
2877
|
+
searchResult: 'Suchergebnisse',
|
|
2878
|
+
autoWrap: 'Automatischer Zeilenumbruch',
|
|
2879
|
+
copy: 'Kopieren',
|
|
2880
|
+
copySuccess: 'Kopiert',
|
|
2881
|
+
copyFailed: 'Kopieren fehlgeschlagen',
|
|
2882
|
+
delete: 'Löschen',
|
|
2883
|
+
text: 'Text',
|
|
2884
|
+
enterText: 'Text eingeben',
|
|
2885
|
+
textRequired: 'Text ist erforderlich',
|
|
2886
|
+
enterLink: 'Link eingeben',
|
|
2887
|
+
apply: 'Anwenden',
|
|
2888
|
+
cancel: 'Abbrechen',
|
|
2889
|
+
linkRequired: 'Link ist erforderlich',
|
|
2890
|
+
linkPattern: 'Bitte geben Sie einen gültigen Link ein',
|
|
2891
|
+
insertRow: 'Zeile einfügen',
|
|
2892
|
+
insertCol: 'Spalte einfügen',
|
|
2893
|
+
insertUpward: 'Nach oben einfügen',
|
|
2894
|
+
insertDownward: 'Nach unten einfügen',
|
|
2895
|
+
insertLeft: 'Nach links einfügen',
|
|
2896
|
+
insertRight: 'Nach rechts einfügen',
|
|
2897
|
+
row: 'Zeile',
|
|
2898
|
+
column: 'Spalte',
|
|
2899
|
+
titleRow: 'Kopfzeile',
|
|
2900
|
+
titleCol: 'Kopfspalte',
|
|
2901
|
+
orderCol: 'Ordnungsspalte',
|
|
2902
|
+
cellBackground: 'Zellenhintergrund',
|
|
2903
|
+
colEqualWidth: 'Gleiche Spaltenbreite',
|
|
2904
|
+
fullscreen: 'Vollbild',
|
|
2905
|
+
table: 'Tabelle',
|
|
2906
|
+
tableDesc: 'Tabelle einfügen',
|
|
2907
|
+
tableOptions: 'Tabellenoptionen',
|
|
2908
|
+
mergeCells: 'Zellen verbinden',
|
|
2909
|
+
splitCells: 'Zellen teilen',
|
|
2910
|
+
deleteEntireRow: 'Zeile löschen',
|
|
2911
|
+
deleteEntireCol: 'Spalte löschen',
|
|
2912
|
+
deleteTable: 'Tabelle löschen',
|
|
2913
|
+
clearSelection: 'Auswahl löschen',
|
|
2914
|
+
deleteTheRow: 'Aktuelle Zeile löschen',
|
|
2915
|
+
deleteTheColumn: 'Aktuelle Spalte löschen',
|
|
2916
|
+
base: 'Basis',
|
|
2917
|
+
alignment: 'Ausrichtung',
|
|
2918
|
+
alignLeft: 'Linksbündig',
|
|
2919
|
+
alignCenter: 'Zentriert',
|
|
2920
|
+
alignRight: 'Rechtsbündig',
|
|
2921
|
+
wrapLeft: 'Bild links',
|
|
2922
|
+
wrapRight: 'Bild rechts',
|
|
2923
|
+
verticalAlign: 'Vertikale Ausrichtung',
|
|
2924
|
+
verticalAlignTop: 'Oben',
|
|
2925
|
+
verticalAlignMiddle: 'Mitte',
|
|
2926
|
+
verticalAlignBottom: 'Unten',
|
|
2927
|
+
blockquote: 'Zitat',
|
|
2928
|
+
blockquoteDesc: 'Zitat einfügen',
|
|
2929
|
+
code: 'Code Blöcke',
|
|
2930
|
+
codeDesc: 'Code mit Syntaxhervorhebung einfügen',
|
|
2931
|
+
fontColor: 'Schriftfarbe',
|
|
2932
|
+
backgroundColor: 'Hintergrundfarbe',
|
|
2933
|
+
headingList: 'Normaler Text',
|
|
2934
|
+
paragraph: 'Normaler Text',
|
|
2935
|
+
heading1: 'Überschrift 1',
|
|
2936
|
+
heading1Desc: 'Überschrift 1 einfügen',
|
|
2937
|
+
heading2: 'Überschrift 2',
|
|
2938
|
+
heading2Desc: 'Überschrift 2 einfügen',
|
|
2939
|
+
heading3: 'Überschrift 3',
|
|
2940
|
+
heading3Desc: 'Überschrift 3 einfügen',
|
|
2941
|
+
heading4: 'Überschrift 4',
|
|
2942
|
+
heading4Desc: 'Überschrift 4 einfügen',
|
|
2943
|
+
divider: 'Trennlinie',
|
|
2944
|
+
dividerDesc: 'Horizontale Linie einfügen',
|
|
2945
|
+
image: 'Bild',
|
|
2946
|
+
imageDesc: 'Unterstützt jpg, jpeg und andere Bildformate',
|
|
2947
|
+
increaseIndent: 'Einzug vergrößern',
|
|
2948
|
+
decreaseIndent: 'Einzug verkleinern',
|
|
2949
|
+
inlineCode: 'Inline-Code',
|
|
2950
|
+
linkDesc: 'Link einfügen',
|
|
2951
|
+
orderedList: 'Nummerierte Liste',
|
|
2952
|
+
orderedListDesc: 'Nummerierte Liste einfügen',
|
|
2953
|
+
unorderedList: 'Ungeordnete Liste',
|
|
2954
|
+
unorderedListDesc: 'Ungeordnete Liste einfügen',
|
|
2955
|
+
bold: 'Fett',
|
|
2956
|
+
italic: 'Kursiv',
|
|
2957
|
+
strike: 'Durchgestrichen',
|
|
2958
|
+
underline: 'Unterstrichen',
|
|
2959
|
+
undo: 'Rückgängig',
|
|
2960
|
+
redo: 'Wiederholen',
|
|
2961
|
+
paintFormat: 'Format übertragen',
|
|
2962
|
+
cleanFormat: 'Format löschen',
|
|
2963
|
+
checkItem: 'Aufgabe',
|
|
2964
|
+
checkItemDesc: 'Aufgabe einfügen'
|
|
2965
|
+
}
|
|
2966
|
+
};
|
|
2967
|
+
|
|
2968
|
+
var ruRuLocale = {
|
|
2969
|
+
id: TheLocaleType.ruRu,
|
|
2970
|
+
translations: {
|
|
2971
|
+
link: 'Ссылка',
|
|
2972
|
+
conversion: 'Конвертировать',
|
|
2973
|
+
conversionHint: 'Обнаружен синтаксис Markdown',
|
|
2974
|
+
search: 'Поиск',
|
|
2975
|
+
noData: 'Нет данных',
|
|
2976
|
+
searchResult: 'Результаты поиска',
|
|
2977
|
+
autoWrap: 'Автоперенос',
|
|
2978
|
+
copy: 'Копировать',
|
|
2979
|
+
copySuccess: 'Скопировано',
|
|
2980
|
+
copyFailed: 'Ошибка копирования',
|
|
2981
|
+
delete: 'Удалить',
|
|
2982
|
+
text: 'Текст',
|
|
2983
|
+
enterText: 'Введите текст',
|
|
2984
|
+
textRequired: 'Текст обязателен',
|
|
2985
|
+
enterLink: 'Введите ссылку',
|
|
2986
|
+
apply: 'Применить',
|
|
2987
|
+
cancel: 'Отмена',
|
|
2988
|
+
linkRequired: 'Ссылка обязательна',
|
|
2989
|
+
linkPattern: 'Введите корректную ссылку',
|
|
2990
|
+
insertRow: 'Вставить строку',
|
|
2991
|
+
insertCol: 'Вставить столбец',
|
|
2992
|
+
insertUpward: 'Вставить выше',
|
|
2993
|
+
insertDownward: 'Вставить ниже',
|
|
2994
|
+
insertLeft: 'Вставить слева',
|
|
2995
|
+
insertRight: 'Вставить справа',
|
|
2996
|
+
row: 'Строка',
|
|
2997
|
+
column: 'Столбец',
|
|
2998
|
+
titleRow: 'Заголовок строки',
|
|
2999
|
+
titleCol: 'Заголовок столбца',
|
|
3000
|
+
orderCol: 'Порядковый столбец',
|
|
3001
|
+
cellBackground: 'Фон ячейки',
|
|
3002
|
+
colEqualWidth: 'Равная ширина столбцов',
|
|
3003
|
+
fullscreen: 'Полный экран',
|
|
3004
|
+
table: 'Таблица',
|
|
3005
|
+
tableDesc: 'Вставить таблицу',
|
|
3006
|
+
tableOptions: 'Параметры таблицы',
|
|
3007
|
+
mergeCells: 'Объединить ячейки',
|
|
3008
|
+
splitCells: 'Разделить ячейки',
|
|
3009
|
+
deleteEntireRow: 'Удалить строку',
|
|
3010
|
+
deleteEntireCol: 'Удалить столбец',
|
|
3011
|
+
deleteTable: 'Удалить таблицу',
|
|
3012
|
+
clearSelection: 'Очистить выделение',
|
|
3013
|
+
deleteTheRow: 'Удалить текущую строку',
|
|
3014
|
+
deleteTheColumn: 'Удалить текущий столбец',
|
|
3015
|
+
base: 'Основное',
|
|
3016
|
+
alignment: 'Выравнивание',
|
|
3017
|
+
alignLeft: 'По левому краю',
|
|
3018
|
+
alignCenter: 'По центру',
|
|
3019
|
+
alignRight: 'По правому краю',
|
|
3020
|
+
wrapLeft: 'Изображение слева',
|
|
3021
|
+
wrapRight: 'Изображение справа',
|
|
3022
|
+
verticalAlign: 'Вертикальное выравнивание',
|
|
3023
|
+
verticalAlignTop: 'По верху',
|
|
3024
|
+
verticalAlignMiddle: 'По центру',
|
|
3025
|
+
verticalAlignBottom: 'По низу',
|
|
3026
|
+
blockquote: 'Цитата',
|
|
3027
|
+
blockquoteDesc: 'Вставить цитату',
|
|
3028
|
+
code: 'Блок кода',
|
|
3029
|
+
codeDesc: 'Вставить код с подсветкой синтаксиса',
|
|
3030
|
+
fontColor: 'Цвет текста',
|
|
3031
|
+
backgroundColor: 'Цвет фона',
|
|
3032
|
+
headingList: 'Обычный текст',
|
|
3033
|
+
paragraph: 'Обычный текст',
|
|
3034
|
+
heading1: 'Заголовок 1',
|
|
3035
|
+
heading1Desc: 'Вставить заголовок 1',
|
|
3036
|
+
heading2: 'Заголовок 2',
|
|
3037
|
+
heading2Desc: 'Вставить заголовок 2',
|
|
3038
|
+
heading3: 'Заголовок 3',
|
|
3039
|
+
heading3Desc: 'Вставить заголовок 3',
|
|
3040
|
+
heading4: 'Заголовок 4',
|
|
3041
|
+
heading4Desc: 'Вставить заголовок 4',
|
|
3042
|
+
divider: 'Разделитель',
|
|
3043
|
+
dividerDesc: 'Вставить горизонтальную линию',
|
|
3044
|
+
image: 'Изображение',
|
|
3045
|
+
imageDesc: 'Поддерживает форматы jpg, jpeg и другие',
|
|
3046
|
+
increaseIndent: 'Увеличить отступ',
|
|
3047
|
+
decreaseIndent: 'Уменьшить отступ',
|
|
3048
|
+
inlineCode: 'Встроенный код',
|
|
3049
|
+
linkDesc: 'Вставить ссылку',
|
|
3050
|
+
orderedList: 'Нумерованный список',
|
|
3051
|
+
orderedListDesc: 'Вставить нумерованный список',
|
|
3052
|
+
unorderedList: 'Неупорядоченный список',
|
|
3053
|
+
unorderedListDesc: 'Вставить неупорядоченный список',
|
|
3054
|
+
bold: 'Полужирный',
|
|
3055
|
+
italic: 'Курсив',
|
|
3056
|
+
strike: 'Зачеркнутый',
|
|
3057
|
+
underline: 'Подчеркнутый',
|
|
3058
|
+
undo: 'Отменить',
|
|
3059
|
+
redo: 'Повторить',
|
|
3060
|
+
paintFormat: 'Формат по образцу',
|
|
3061
|
+
cleanFormat: 'Очистить формат',
|
|
3062
|
+
checkItem: 'Задача',
|
|
3063
|
+
checkItemDesc: 'Вставить задачу'
|
|
3064
|
+
}
|
|
3065
|
+
};
|
|
3066
|
+
|
|
3067
|
+
class TheBaseToolbarItem {
|
|
2412
3068
|
set toolbarItem(value) {
|
|
2413
3069
|
this._toolbarItem = value;
|
|
2414
3070
|
}
|
|
@@ -2421,6 +3077,10 @@ class TheBaseToolbarItem {
|
|
|
2421
3077
|
get activeState() {
|
|
2422
3078
|
return this.active;
|
|
2423
3079
|
}
|
|
3080
|
+
constructor(i18n) {
|
|
3081
|
+
this.class = true;
|
|
3082
|
+
this.locale = signal(i18n.getLocale()().translations);
|
|
3083
|
+
}
|
|
2424
3084
|
execute(event) {
|
|
2425
3085
|
event.preventDefault();
|
|
2426
3086
|
event.stopPropagation();
|
|
@@ -2440,12 +3100,12 @@ class TheBaseToolbarItem {
|
|
|
2440
3100
|
this.active = false;
|
|
2441
3101
|
}
|
|
2442
3102
|
}
|
|
2443
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
3103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarItem, deps: [{ token: TheI18nService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2444
3104
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TheBaseToolbarItem, inputs: { toolbarItem: "toolbarItem", editor: "editor", itemMousedownHandle: "itemMousedownHandle" }, host: { properties: { "class.the-toolbar-item": "this.class", "class.disabled": "this.disabledState", "class.active": "this.activeState" } }, ngImport: i0 }); }
|
|
2445
3105
|
}
|
|
2446
3106
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarItem, decorators: [{
|
|
2447
3107
|
type: Directive
|
|
2448
|
-
}], propDecorators: { toolbarItem: [{
|
|
3108
|
+
}], ctorParameters: () => [{ type: TheI18nService }], propDecorators: { toolbarItem: [{
|
|
2449
3109
|
type: Input
|
|
2450
3110
|
}], editor: [{
|
|
2451
3111
|
type: Input
|
|
@@ -2462,14 +3122,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2462
3122
|
args: ['class.active']
|
|
2463
3123
|
}] } });
|
|
2464
3124
|
class TheBaseToolbarDropdown extends TheBaseToolbarItem {
|
|
2465
|
-
constructor() {
|
|
2466
|
-
super(...arguments);
|
|
2467
|
-
this.mode = DropdownMode.text;
|
|
2468
|
-
}
|
|
2469
3125
|
get defaultDropdownItem() {
|
|
2470
3126
|
const activeItem = this.dropdownItemKey && this.menus.find(item => item.key === this.dropdownItemKey);
|
|
2471
3127
|
return activeItem ? activeItem : this.menus[0];
|
|
2472
3128
|
}
|
|
3129
|
+
constructor(i18n) {
|
|
3130
|
+
super(i18n);
|
|
3131
|
+
this.mode = DropdownMode.text;
|
|
3132
|
+
}
|
|
2473
3133
|
selectionChange(editor) {
|
|
2474
3134
|
super.selectionChange(editor);
|
|
2475
3135
|
const activeItem = this.menus.find(i => {
|
|
@@ -2481,12 +3141,12 @@ class TheBaseToolbarDropdown extends TheBaseToolbarItem {
|
|
|
2481
3141
|
this.activeMenuItem = activeItem ? activeItem : this.defaultDropdownItem;
|
|
2482
3142
|
}
|
|
2483
3143
|
}
|
|
2484
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarDropdown, deps:
|
|
3144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarDropdown, deps: [{ token: TheI18nService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2485
3145
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: TheBaseToolbarDropdown, inputs: { menus: "menus", mode: "mode", dropdownItemKey: "dropdownItemKey" }, usesInheritance: true, ngImport: i0 }); }
|
|
2486
3146
|
}
|
|
2487
3147
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheBaseToolbarDropdown, decorators: [{
|
|
2488
3148
|
type: Directive
|
|
2489
|
-
}], propDecorators: { menus: [{
|
|
3149
|
+
}], ctorParameters: () => [{ type: TheI18nService }], propDecorators: { menus: [{
|
|
2490
3150
|
type: Input
|
|
2491
3151
|
}], mode: [{
|
|
2492
3152
|
type: Input
|
|
@@ -2700,8 +3360,8 @@ class TheToolbarDropdown extends TheBaseToolbarDropdown {
|
|
|
2700
3360
|
get activeDropdown() {
|
|
2701
3361
|
return this.toolbarItem.dropdownFixedIcon && !!this.activeKeys.length;
|
|
2702
3362
|
}
|
|
2703
|
-
constructor(elementRef, thyPopover, viewContainerRef, overlay) {
|
|
2704
|
-
super();
|
|
3363
|
+
constructor(elementRef, thyPopover, viewContainerRef, overlay, i18n) {
|
|
3364
|
+
super(i18n);
|
|
2705
3365
|
this.elementRef = elementRef;
|
|
2706
3366
|
this.thyPopover = thyPopover;
|
|
2707
3367
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -2782,8 +3442,8 @@ class TheToolbarDropdown extends TheBaseToolbarDropdown {
|
|
|
2782
3442
|
this.dropdownPopoverRef?.close();
|
|
2783
3443
|
}
|
|
2784
3444
|
}
|
|
2785
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarDropdown, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2786
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheToolbarDropdown, isStandalone: true, selector: "the-toolbar-dropdown", host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: ThyDropdownMenuDivider, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
|
|
3445
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarDropdown, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2.Overlay }, { token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3446
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheToolbarDropdown, isStandalone: true, selector: "the-toolbar-dropdown", host: { properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "iconModeTemplate", first: true, predicate: ["iconModeTemplate"], descendants: true, static: true }, { propertyName: "textModeTemplate", first: true, predicate: ["textModeTemplate"], descendants: true, static: true }, { propertyName: "dropdownTemplate", first: true, predicate: ["dropdownTemplate"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ locale()[activeMenuItem?.translateKey] ?? activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ locale()[menu?.translateKey] ?? menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: ThyDropdownMenuDivider, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
|
|
2787
3447
|
}
|
|
2788
3448
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarDropdown, decorators: [{
|
|
2789
3449
|
type: Component,
|
|
@@ -2798,8 +3458,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2798
3458
|
ThyDropdownMenuItemNameDirective,
|
|
2799
3459
|
ThyDropdownMenuItemIconDirective,
|
|
2800
3460
|
ThyDropdownMenuItemActiveDirective
|
|
2801
|
-
], template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
2802
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }], propDecorators: { className: [{
|
|
3461
|
+
], template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <thy-icon *ngIf=\"!toolbarItem.isHideDropdownActionIcon\" class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n<a\n *ngIf=\"mode !== dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"text-mode\"\n thyAction\n (mousedown)=\"preventDefault($event)\"\n (click)=\"toggleDropdown($event)\"\n>\n <span class=\"show-text\">{{ locale()[activeMenuItem?.translateKey] ?? activeMenuItem?.name }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #dropdownTemplate>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of menus\">\n <a\n *ngIf=\"menu.key !== 'split'\"\n class=\"d-flex justify-content-between text-secondary\"\n href=\"javascript:;\"\n thyDropdownMenuItem\n [ngStyle]=\"menu?.styles\"\n [thyDropdownMenuItemActive]=\"activeKeys.includes(menu.key)\"\n (mousedown)=\"preventDefault($event)\"\n (click)=\"itemMousedown($event, menu)\"\n >\n <div class=\"d-flex align-items-center\">\n <thy-icon\n class=\"text-secondary\"\n *ngIf=\"menu?.icon && mode === dropdownMode.icon\"\n thyDropdownMenuItemIcon\n [thyIconName]=\"menu.icon\"\n ></thy-icon>\n <span class=\"text-body\" *ngIf=\"menu?.name\" thyDropdownMenuItemName>{{ locale()[menu?.translateKey] ?? menu.name }}</span>\n </div>\n <div class=\"menu-item-right font-size-sm text-muted\" *ngIf=\"menu?.shortcutKey\">{{ menu.shortcutKey }}</div>\n </a>\n <thy-dropdown-menu-divider *ngIf=\"menu.key === 'split'\"></thy-dropdown-menu-divider>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
3462
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2.Overlay }, { type: TheI18nService }], propDecorators: { className: [{
|
|
2803
3463
|
type: HostBinding,
|
|
2804
3464
|
args: ['class']
|
|
2805
3465
|
}], iconModeTemplate: [{
|
|
@@ -2817,8 +3477,8 @@ class TheToolbarItem extends TheBaseToolbarItem {
|
|
|
2817
3477
|
toggleDropdown(event) {
|
|
2818
3478
|
super.execute(event);
|
|
2819
3479
|
}
|
|
2820
|
-
constructor() {
|
|
2821
|
-
super();
|
|
3480
|
+
constructor(i18n) {
|
|
3481
|
+
super(i18n);
|
|
2822
3482
|
this.className = 'the-toolbar-item';
|
|
2823
3483
|
}
|
|
2824
3484
|
ngOnInit() { }
|
|
@@ -2836,7 +3496,7 @@ class TheToolbarItem extends TheBaseToolbarItem {
|
|
|
2836
3496
|
}
|
|
2837
3497
|
this.toolbarItem?.execute(this.editor);
|
|
2838
3498
|
}
|
|
2839
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3499
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarItem, deps: [{ token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2840
3500
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheToolbarItem, isStandalone: true, selector: "the-toolbar-item", host: { listeners: { "mousedown": "toggleDropdown($event)" }, properties: { "class": "this.className" } }, usesInheritance: true, ngImport: i0, template: `
|
|
2841
3501
|
<a
|
|
2842
3502
|
href="javascript:;"
|
|
@@ -2844,7 +3504,10 @@ class TheToolbarItem extends TheBaseToolbarItem {
|
|
|
2844
3504
|
[thyActionIcon]="toolbarItem.icon"
|
|
2845
3505
|
[thyActionActive]="active"
|
|
2846
3506
|
[thyTooltip]="tooltip"
|
|
2847
|
-
[thyTooltipTemplateContext]="{
|
|
3507
|
+
[thyTooltipTemplateContext]="{
|
|
3508
|
+
name: locale()[toolbarItem.translateKey] ?? toolbarItem.name,
|
|
3509
|
+
shortcutKey: toolbarItem.shortcutKey
|
|
3510
|
+
}"
|
|
2848
3511
|
thyTooltipPlacement="top"
|
|
2849
3512
|
(mousedown)="preventDefault($event)"
|
|
2850
3513
|
(click)="execute($event)"
|
|
@@ -2863,7 +3526,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2863
3526
|
[thyActionIcon]="toolbarItem.icon"
|
|
2864
3527
|
[thyActionActive]="active"
|
|
2865
3528
|
[thyTooltip]="tooltip"
|
|
2866
|
-
[thyTooltipTemplateContext]="{
|
|
3529
|
+
[thyTooltipTemplateContext]="{
|
|
3530
|
+
name: locale()[toolbarItem.translateKey] ?? toolbarItem.name,
|
|
3531
|
+
shortcutKey: toolbarItem.shortcutKey
|
|
3532
|
+
}"
|
|
2867
3533
|
thyTooltipPlacement="top"
|
|
2868
3534
|
(mousedown)="preventDefault($event)"
|
|
2869
3535
|
(click)="execute($event)"
|
|
@@ -2873,7 +3539,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2873
3539
|
standalone: true,
|
|
2874
3540
|
imports: [ThyAction, ThyTooltipDirective]
|
|
2875
3541
|
}]
|
|
2876
|
-
}], ctorParameters: () => [], propDecorators: { className: [{
|
|
3542
|
+
}], ctorParameters: () => [{ type: TheI18nService }], propDecorators: { className: [{
|
|
2877
3543
|
type: HostBinding,
|
|
2878
3544
|
args: ['class']
|
|
2879
3545
|
}], toggleDropdown: [{
|
|
@@ -3160,12 +3826,14 @@ class TheToolbarGroup {
|
|
|
3160
3826
|
clickHandle(event) {
|
|
3161
3827
|
event.stopPropagation();
|
|
3162
3828
|
}
|
|
3163
|
-
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
3829
|
+
constructor(elementRef, thyPopover, viewContainerRef, i18n) {
|
|
3164
3830
|
this.elementRef = elementRef;
|
|
3165
3831
|
this.thyPopover = thyPopover;
|
|
3166
3832
|
this.viewContainerRef = viewContainerRef;
|
|
3833
|
+
this.i18n = i18n;
|
|
3167
3834
|
this.className = 'the-toolbar-group';
|
|
3168
3835
|
this.active = false;
|
|
3836
|
+
this.locale = signal(i18n.getLocale()().translations);
|
|
3169
3837
|
}
|
|
3170
3838
|
ngOnInit() { }
|
|
3171
3839
|
ngOnDestroy() {
|
|
@@ -3224,13 +3892,13 @@ class TheToolbarGroup {
|
|
|
3224
3892
|
this.groupPopoverRef.close();
|
|
3225
3893
|
}
|
|
3226
3894
|
}
|
|
3227
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarGroup, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3228
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheToolbarGroup, isStandalone: true, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] }); }
|
|
3895
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarGroup, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }, { token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3896
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheToolbarGroup, isStandalone: true, selector: "the-toolbar-group", inputs: { menus: "menus", item: "item" }, host: { listeners: { "mousedown": "mousedownHandler($event)", "document:mouseup": "documentMouseupHandle($event)", "click": "clickHandle($event)" }, properties: { "class": "this.className" } }, viewQueries: [{ propertyName: "groupTemplate", first: true, predicate: ["groupTemplate"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"locale()[item?.translateKey] ?? item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n", dependencies: [{ kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }] }); }
|
|
3229
3897
|
}
|
|
3230
3898
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheToolbarGroup, decorators: [{
|
|
3231
3899
|
type: Component,
|
|
3232
|
-
args: [{ selector: 'the-toolbar-group', standalone: true, imports: [ThyAction, ThyTooltipDirective, TheToolbarComponent], template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
|
|
3233
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }], propDecorators: { className: [{
|
|
3900
|
+
args: [{ selector: 'the-toolbar-group', standalone: true, imports: [ThyAction, ThyTooltipDirective, TheToolbarComponent], template: "<a\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyActionActive]=\"active\"\n [thyTooltip]=\"locale()[item?.translateKey] ?? item?.name\"\n thyTooltipPlacement=\"top\"\n></a>\n\n<ng-template #groupTemplate>\n <the-toolbar class=\"group\" [editor]=\"editor\" [toolbarItems]=\"menus\" [isMore]=\"false\"></the-toolbar>\n</ng-template>\n" }]
|
|
3901
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }, { type: TheI18nService }], propDecorators: { className: [{
|
|
3234
3902
|
type: HostBinding,
|
|
3235
3903
|
args: ['class']
|
|
3236
3904
|
}], menus: [{
|
|
@@ -6131,7 +6799,9 @@ const LinkEditor = {
|
|
|
6131
6799
|
if (Range.isCollapsed(editor.selection)) {
|
|
6132
6800
|
Promise.resolve()
|
|
6133
6801
|
.then(() => {
|
|
6134
|
-
|
|
6802
|
+
const locale = editor.injector.get(TheI18nService).getLocale();
|
|
6803
|
+
const linkDefaultText = locale().translations.link;
|
|
6804
|
+
LinkEditor.wrapLink(editor, linkDefaultText, '');
|
|
6135
6805
|
})
|
|
6136
6806
|
.then(() => {
|
|
6137
6807
|
const [linkNode] = getAboveByType(editor, ElementKinds.link);
|
|
@@ -6730,8 +7400,8 @@ class TheVerticalToolbarItem extends TheBaseToolbarDropdown {
|
|
|
6730
7400
|
this.close();
|
|
6731
7401
|
}
|
|
6732
7402
|
}
|
|
6733
|
-
constructor(elementRef, thyPopover, viewContainerRef) {
|
|
6734
|
-
super();
|
|
7403
|
+
constructor(elementRef, thyPopover, viewContainerRef, i18n) {
|
|
7404
|
+
super(i18n);
|
|
6735
7405
|
this.elementRef = elementRef;
|
|
6736
7406
|
this.thyPopover = thyPopover;
|
|
6737
7407
|
this.viewContainerRef = viewContainerRef;
|
|
@@ -6775,8 +7445,8 @@ class TheVerticalToolbarItem extends TheBaseToolbarDropdown {
|
|
|
6775
7445
|
this.dropdownPopoverRef.close();
|
|
6776
7446
|
}
|
|
6777
7447
|
}
|
|
6778
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheVerticalToolbarItem, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
6779
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheVerticalToolbarItem, isStandalone: true, selector: "the-toolbar-vertical-align-item", host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
|
|
7448
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheVerticalToolbarItem, deps: [{ token: i0.ElementRef }, { token: i1.ThyPopover }, { token: i0.ViewContainerRef }, { token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7449
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheVerticalToolbarItem, isStandalone: true, selector: "the-toolbar-vertical-align-item", host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, classAttribute: "the-toolbar-dropdown-container verticalAlign" }, viewQueries: [{ propertyName: "template", first: true, predicate: ["VerticalAlignItems"], descendants: true, read: TemplateRef, static: true }], usesInheritance: true, ngImport: i0, template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"locale()[toolbarItem?.translateKey] ?? toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ locale()[menu.translateKey] ?? menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] }); }
|
|
6780
7450
|
}
|
|
6781
7451
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheVerticalToolbarItem, decorators: [{
|
|
6782
7452
|
type: Component,
|
|
@@ -6792,8 +7462,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
6792
7462
|
ThyDropdownMenuItemIconDirective,
|
|
6793
7463
|
ThyDropdownMenuItemNameDirective,
|
|
6794
7464
|
ThyDropdownMenuItemActiveDirective
|
|
6795
|
-
], template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
6796
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }], propDecorators: { template: [{
|
|
7465
|
+
], template: "<a\n href=\"javascript:;\"\n class=\"icon-mode link-with-down\"\n thyAction\n [thyActionIcon]=\"activeMenuItem?.icon\"\n [thyActionActive]=\"isOpened\"\n [thyTooltip]=\"locale()[toolbarItem?.translateKey] ?? toolbarItem?.name\"\n thyTooltipPlacement=\"top\"\n (mousedown)=\"execute($event)\"\n>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n</a>\n\n<ng-template #VerticalAlignItems>\n <div class=\"thy-dropdown-menu\">\n <ng-container *ngFor=\"let menu of toolbarItem?.includes\">\n <a\n href=\"javascript:;\"\n thyDropdownMenuItem\n [thyDropdownMenuItemActive]=\"menu.key === activeMenuItem?.key\"\n (mousedown)=\"itemMousedown($event, menu)\"\n >\n <thy-icon *ngIf=\"menu.icon\" thyDropdownMenuItemIcon [thyIconName]=\"menu?.icon\"></thy-icon>\n <span thyDropdownMenuItemName>{{ locale()[menu.translateKey] ?? menu.name }}</span>\n </a>\n </ng-container>\n </div>\n</ng-template>\n" }]
|
|
7466
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.ThyPopover }, { type: i0.ViewContainerRef }, { type: TheI18nService }], propDecorators: { template: [{
|
|
6797
7467
|
type: ViewChild,
|
|
6798
7468
|
args: ['VerticalAlignItems', { read: TemplateRef, static: true }]
|
|
6799
7469
|
}], handleDocumentMouseDown: [{
|
|
@@ -6821,6 +7491,7 @@ const createVerticalAlignPlugin = createPluginFactory({
|
|
|
6821
7491
|
{
|
|
6822
7492
|
key: ToolbarActionTypes.verticalAlign,
|
|
6823
7493
|
name: '垂直对齐',
|
|
7494
|
+
translateKey: 'verticalAlign',
|
|
6824
7495
|
type: ToolbarItemType.dropdown,
|
|
6825
7496
|
dropdownMode: DropdownMode.icon,
|
|
6826
7497
|
iconComponent: TheVerticalToolbarItem,
|
|
@@ -6831,6 +7502,7 @@ const createVerticalAlignPlugin = createPluginFactory({
|
|
|
6831
7502
|
key: ToolbarActionTypes.verticalAlignTop,
|
|
6832
7503
|
icon: 'align-top',
|
|
6833
7504
|
name: '顶部对齐',
|
|
7505
|
+
translateKey: 'verticalAlignTop',
|
|
6834
7506
|
execute: editor => VerticalAlignEditor.setVerticalAlign(editor, VerticalAlignment.top),
|
|
6835
7507
|
active: editor => VerticalAlignEditor.isVerticalActive(editor, VerticalAlignment.top)
|
|
6836
7508
|
},
|
|
@@ -6838,6 +7510,7 @@ const createVerticalAlignPlugin = createPluginFactory({
|
|
|
6838
7510
|
key: ToolbarActionTypes.verticalAlignMiddle,
|
|
6839
7511
|
icon: 'align-middle',
|
|
6840
7512
|
name: '垂直居中',
|
|
7513
|
+
translateKey: 'verticalAlignMiddle',
|
|
6841
7514
|
execute: editor => VerticalAlignEditor.setVerticalAlign(editor, VerticalAlignment.middle),
|
|
6842
7515
|
active: editor => VerticalAlignEditor.isVerticalActive(editor, VerticalAlignment.middle)
|
|
6843
7516
|
},
|
|
@@ -6845,6 +7518,7 @@ const createVerticalAlignPlugin = createPluginFactory({
|
|
|
6845
7518
|
key: ToolbarActionTypes.verticalAlignBottom,
|
|
6846
7519
|
icon: 'align-bottom',
|
|
6847
7520
|
name: '底部对齐',
|
|
7521
|
+
translateKey: 'verticalAlignBottom',
|
|
6848
7522
|
execute: editor => VerticalAlignEditor.setVerticalAlign(editor, VerticalAlignment.bottom),
|
|
6849
7523
|
active: editor => VerticalAlignEditor.isVerticalActive(editor, VerticalAlignment.bottom)
|
|
6850
7524
|
}
|
|
@@ -7061,14 +7735,15 @@ class ThePluginMenuComponent {
|
|
|
7061
7735
|
this.theDisplaySearch = false;
|
|
7062
7736
|
this.autoActiveFirstItem = true;
|
|
7063
7737
|
this.containerClassName = `the-plugin-menu-container`;
|
|
7738
|
+
this.locale = injectTranslations();
|
|
7064
7739
|
this.listBox = viewChild(TheListboxDirective);
|
|
7065
7740
|
this.listBoxAutoActiveFirstItem = true;
|
|
7066
7741
|
this.groupMenu = [];
|
|
7067
7742
|
this.iconMenu = [];
|
|
7068
7743
|
this.ThePluginMenuItemType = ThePluginMenuItemType;
|
|
7069
|
-
this.thyMessage =
|
|
7744
|
+
this.thyMessage = this.locale().noData;
|
|
7070
7745
|
this.searchGroup = {
|
|
7071
|
-
groupName:
|
|
7746
|
+
groupName: this.locale().searchResult
|
|
7072
7747
|
};
|
|
7073
7748
|
this.expandPopoverOptions = {
|
|
7074
7749
|
placement: 'rightTop',
|
|
@@ -7254,7 +7929,7 @@ class ThePluginMenuComponent {
|
|
|
7254
7929
|
return item?.key ?? index;
|
|
7255
7930
|
}
|
|
7256
7931
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ThePluginMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7257
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ThePluginMenuComponent, isStandalone: true, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu", sceneKey: "sceneKey", subPanelClass: "subPanelClass", autoActiveFirstItem: "autoActiveFirstItem" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "listBox", first: true, predicate: TheListboxDirective, descendants: true, isSignal: true }, { propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], ngImport: i0, template: "@if (theDisplaySearch) {\n <div class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" [(ngModel)]=\"keyWords\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n </div>\n}\n\n@if (groupMenu.length > 0) {\n <div\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"listBoxChange($event)\"\n >\n <ng-container *ngIf=\"iconMenu?.length > 0\">\n <div theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n @for (item of iconMenu; track trackByFn) {\n @if (item.type === ThePluginMenuItemType.icon) {\n <a\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n ></a>\n }\n }\n </div>\n <thy-divider class=\"my-2\"></thy-divider>\n </ng-container>\n\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDropdown]=\"expand\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n @if (item.children?.length > 0) {\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n }\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n @for (child of item.children; track trackByFn) {\n @if (child.type === ThePluginMenuItemType.group) {\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n [theOptionValue]=\"child\"\n (mouseenter)=\"listBoxOptionMouseenter($event, child)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, child)\"\n (click)=\"handleItemSelection(child)\"\n >\n @if (child?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n } @else if (child === 'divider') {\n <thy-divider class=\"my-2\"></thy-divider>\n }\n }\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n [thyPopover]=\"tableSelect\"\n [thyConfig]=\"tableSelectPopoverConfig\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeBlock\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n\n @if (!item.isMenuItem) {\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n }\n </ng-container>\n </div>\n </div>\n} @else {\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ThyEmptyModule }, { kind: "component", type: i2$2.ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: TheTableSelect, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyInputSearch, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "component", type: ThyDropdownMenuGroup, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "pipe", type: PluginMenuPipe, name: "getMenuIcon" }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }] }); }
|
|
7932
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: ThePluginMenuComponent, isStandalone: true, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu", sceneKey: "sceneKey", subPanelClass: "subPanelClass", autoActiveFirstItem: "autoActiveFirstItem" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "listBox", first: true, predicate: TheListboxDirective, descendants: true, isSignal: true }, { propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], ngImport: i0, template: "@if (theDisplaySearch) {\n <div class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search\n [placeholder]=\"locale().search\"\n thyIconPosition=\"after\"\n [(ngModel)]=\"keyWords\"\n (ngModelChange)=\"updateKeywords(keyWords)\"\n >\n </thy-input-search>\n </div>\n}\n\n@if (groupMenu.length > 0) {\n <div\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"listBoxChange($event)\"\n >\n <ng-container *ngIf=\"iconMenu?.length > 0\">\n <div theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n @for (item of iconMenu; track trackByFn) {\n @if (item.type === ThePluginMenuItemType.icon) {\n <a\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"locale()[item.translateKey] ?? item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n ></a>\n }\n }\n </div>\n <thy-divider class=\"my-2\"></thy-divider>\n </ng-container>\n\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDropdown]=\"expand\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n @if (item.children?.length > 0) {\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n }\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n @for (child of item.children; track trackByFn) {\n @if (child.type === ThePluginMenuItemType.group) {\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n [theOptionValue]=\"child\"\n (mouseenter)=\"listBoxOptionMouseenter($event, child)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, child)\"\n (click)=\"handleItemSelection(child)\"\n >\n @if (child?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n } @else if (child === 'divider') {\n <thy-divider class=\"my-2\"></thy-divider>\n }\n }\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n [thyPopover]=\"tableSelect\"\n [thyConfig]=\"tableSelectPopoverConfig\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeBlock\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n\n @if (!item.isMenuItem) {\n <thy-dropdown-menu-group\n class=\"font-size-sm\"\n [thyTitle]=\"locale()[item.translateKey] ?? item.groupName\"\n ></thy-dropdown-menu-group>\n }\n </ng-container>\n </div>\n </div>\n} @else {\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n}\n", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ThyEmptyModule }, { kind: "component", type: i2$2.ThyEmpty, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "component", type: TheTableSelect, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyInputSearch, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth", "thyImmediateRender"] }, { kind: "component", type: ThyDropdownMenuGroup, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "pipe", type: PluginMenuPipe, name: "getMenuIcon" }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer", "autoActiveFirstItem"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyActiveClass", "thyPopoverOptions", "thyPlacement", "thyMenuInsideClosable", "thyPanelClass"], outputs: ["thyActiveChange"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue", "theOptionDisabled"], exportAs: ["theListboxOption"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }, { kind: "directive", type: ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }] }); }
|
|
7258
7933
|
}
|
|
7259
7934
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
7260
7935
|
type: Component,
|
|
@@ -7279,7 +7954,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
7279
7954
|
TheListboxOptionDirective,
|
|
7280
7955
|
ThePreventDefaultDirective,
|
|
7281
7956
|
ThyDropdownMenuItemDirective
|
|
7282
|
-
], template: "@if (theDisplaySearch) {\n <div class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search
|
|
7957
|
+
], template: "@if (theDisplaySearch) {\n <div class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search\n [placeholder]=\"locale().search\"\n thyIconPosition=\"after\"\n [(ngModel)]=\"keyWords\"\n (ngModelChange)=\"updateKeywords(keyWords)\"\n >\n </thy-input-search>\n </div>\n}\n\n@if (groupMenu.length > 0) {\n <div\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n [autoActiveFirstItem]=\"listBoxAutoActiveFirstItem\"\n (theListboxChange)=\"listBoxChange($event)\"\n >\n <ng-container *ngIf=\"iconMenu?.length > 0\">\n <div theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n @for (item of iconMenu; track trackByFn) {\n @if (item.type === ThePluginMenuItemType.icon) {\n <a\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"locale()[item.translateKey] ?? item?.name\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n ></a>\n }\n }\n </div>\n <thy-divider class=\"my-2\"></thy-divider>\n </ng-container>\n\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"item.isMenuItem && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [thyDisabled]=\"item.disabled\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDropdown]=\"expand\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n [thyPanelClass]=\"subPanelClass\"\n (click)=\"handleItemSelection(item)\"\n >\n @if (item?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n @if (item.children?.length > 0) {\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n }\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n @for (child of item.children; track trackByFn) {\n @if (child.type === ThePluginMenuItemType.group) {\n <div\n class=\"py-0\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"child.disabled\"\n [theOptionValue]=\"child\"\n (mouseenter)=\"listBoxOptionMouseenter($event, child)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, child)\"\n (click)=\"handleItemSelection(child)\"\n >\n @if (child?.menuIcon) {\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n }\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ child.name }}\n </div>\n </div>\n </div>\n } @else if (child === 'divider') {\n <thy-divider class=\"my-2\"></thy-divider>\n }\n }\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n\n <ng-container *ngIf=\"item.isMenuItem && item.key === 'table'\">\n <div\n #dropdownTriggers\n class=\"py-0\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n thePreventDefault\n [theOptionValue]=\"item\"\n [theOptionDisabled]=\"item.disabled\"\n [thyDisabled]=\"item.disabled\"\n [thyPopover]=\"tableSelect\"\n [thyConfig]=\"tableSelectPopoverConfig\"\n (mouseenter)=\"listBoxOptionMouseenter($event, item)\"\n (mouseleave)=\"listBoxOptionMouseleave($event, item)\"\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon | getMenuIcon: sceneKey\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n {{ locale()[item.translateKey] ?? item.name }}\n </div>\n </div>\n <div>\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n\n <ng-template #tableSelect>\n <table-select\n class=\"plugin-menu-table the-table-selector-panel\"\n [editor]=\"editor\"\n [beforeInsert]=\"removeBlock\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n\n @if (!item.isMenuItem) {\n <thy-dropdown-menu-group\n class=\"font-size-sm\"\n [thyTitle]=\"locale()[item.translateKey] ?? item.groupName\"\n ></thy-dropdown-menu-group>\n }\n </ng-container>\n </div>\n </div>\n} @else {\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n}\n" }]
|
|
7283
7958
|
}], propDecorators: { editor: [{
|
|
7284
7959
|
type: Input
|
|
7285
7960
|
}], theDisplaySearch: [{
|
|
@@ -7742,6 +8417,7 @@ const isMarkdownSyntax = content => {
|
|
|
7742
8417
|
|
|
7743
8418
|
class TheConversionHint {
|
|
7744
8419
|
constructor() {
|
|
8420
|
+
this.locale = injectTranslations();
|
|
7745
8421
|
this.duration = 10000;
|
|
7746
8422
|
this.pauseOnHover = true;
|
|
7747
8423
|
}
|
|
@@ -7771,13 +8447,13 @@ class TheConversionHint {
|
|
|
7771
8447
|
clearInterval(this.closeTimer);
|
|
7772
8448
|
}
|
|
7773
8449
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheConversionHint, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
7774
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheConversionHint, isStandalone: true, selector: "the-conversion-hint", inputs: { editor: "editor", conversion: "conversion" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, classAttribute: "the-conversion-hint" }, ngImport: i0, template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" thyMessage=\"\
|
|
8450
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheConversionHint, isStandalone: true, selector: "the-conversion-hint", inputs: { editor: "editor", conversion: "conversion" }, host: { listeners: { "mouseenter": "mouseenter()", "mouseleave": "mouseleave()" }, classAttribute: "the-conversion-hint" }, ngImport: i0, template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" [thyMessage]=\"locale().conversionHint\">\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\"> {{ locale().conversion }} </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n", dependencies: [{ kind: "component", type: ThyAlert, selector: "thy-alert", inputs: ["thyType", "thyTheme", "thyMessage", "thyIcon", "thyCloseable"] }, { kind: "directive", type: ThyAlertActionItemDirective, selector: "[thyAlertActionItem]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
7775
8451
|
}
|
|
7776
8452
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheConversionHint, decorators: [{
|
|
7777
8453
|
type: Component,
|
|
7778
8454
|
args: [{ selector: 'the-conversion-hint', host: {
|
|
7779
8455
|
class: 'the-conversion-hint'
|
|
7780
|
-
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ThyAlert, ThyAlertActionItemDirective], template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" thyMessage=\"\
|
|
8456
|
+
}, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ThyAlert, ThyAlertActionItemDirective], template: "<ng-container>\n <thy-alert thyType=\"primary-weak\" thyIcon=\"info-circle-fill\" thyCloseable=\"true\" [thyMessage]=\"locale().conversionHint\">\n <ng-template #operation>\n <a href=\"javascript:;\" thyAlertActionItem (click)=\"conversion()\"> {{ locale().conversion }} </a>\n </ng-template>\n </thy-alert>\n</ng-container>\n" }]
|
|
7781
8457
|
}], propDecorators: { editor: [{
|
|
7782
8458
|
type: Input
|
|
7783
8459
|
}], conversion: [{
|
|
@@ -8272,12 +8948,14 @@ const createAlignPlugin = createPluginFactory({
|
|
|
8272
8948
|
dropdownItemKey: ToolbarActionTypes.alignLeft,
|
|
8273
8949
|
includes: [ToolbarActionTypes.alignLeft, ToolbarActionTypes.alignCenter, ToolbarActionTypes.alignRight],
|
|
8274
8950
|
name: '对齐方式',
|
|
8951
|
+
translateKey: 'alignment',
|
|
8275
8952
|
disable: editor => AlignEditor.isDisabled(editor)
|
|
8276
8953
|
},
|
|
8277
8954
|
{
|
|
8278
8955
|
key: ToolbarActionTypes.alignLeft,
|
|
8279
8956
|
icon: 'align-left',
|
|
8280
8957
|
name: '左对齐',
|
|
8958
|
+
translateKey: 'alignLeft',
|
|
8281
8959
|
execute: editor => AlignEditor.setAlign(editor, Alignment.left),
|
|
8282
8960
|
active: editor => AlignEditor.isActive(editor, Alignment.left)
|
|
8283
8961
|
},
|
|
@@ -8285,6 +8963,7 @@ const createAlignPlugin = createPluginFactory({
|
|
|
8285
8963
|
key: ToolbarActionTypes.alignCenter,
|
|
8286
8964
|
icon: 'align-center',
|
|
8287
8965
|
name: '居中',
|
|
8966
|
+
translateKey: 'alignCenter',
|
|
8288
8967
|
execute: editor => AlignEditor.setAlign(editor, Alignment.center),
|
|
8289
8968
|
active: editor => AlignEditor.isActive(editor, Alignment.center)
|
|
8290
8969
|
},
|
|
@@ -8292,6 +8971,7 @@ const createAlignPlugin = createPluginFactory({
|
|
|
8292
8971
|
key: ToolbarActionTypes.alignRight,
|
|
8293
8972
|
icon: 'align-right',
|
|
8294
8973
|
name: '右对齐',
|
|
8974
|
+
translateKey: 'alignRight',
|
|
8295
8975
|
execute: editor => AlignEditor.setAlign(editor, Alignment.right),
|
|
8296
8976
|
active: editor => AlignEditor.isActive(editor, Alignment.right)
|
|
8297
8977
|
}
|
|
@@ -8715,6 +9395,7 @@ const createBlockquotePlugin = createPluginFactory({
|
|
|
8715
9395
|
key: ElementKinds.blockquote,
|
|
8716
9396
|
icon: 'blockquote',
|
|
8717
9397
|
name: '引用',
|
|
9398
|
+
translateKey: 'blockquote',
|
|
8718
9399
|
active: editor => isBlockActive(editor, ElementKinds.blockquote),
|
|
8719
9400
|
execute: editor => BlockquoteEditor.toggleBlockquote(editor)
|
|
8720
9401
|
}
|
|
@@ -8723,11 +9404,13 @@ const createBlockquotePlugin = createPluginFactory({
|
|
|
8723
9404
|
{
|
|
8724
9405
|
key: ElementKinds.blockquote,
|
|
8725
9406
|
type: ThePluginMenuItemType.group,
|
|
8726
|
-
keywords: 'yy,yinyong,quote
|
|
9407
|
+
keywords: 'yy,yinyong,quote,引用,цитата,zitat',
|
|
8727
9408
|
active: editor => isBlockActive(editor, ElementKinds.blockquote),
|
|
8728
9409
|
execute: editor => BlockquoteEditor.toggleBlockquote(editor),
|
|
8729
9410
|
name: '引用',
|
|
9411
|
+
translateKey: 'blockquote',
|
|
8730
9412
|
description: '支持引用内容',
|
|
9413
|
+
descriptionTranslateKey: 'blockquoteDesc',
|
|
8731
9414
|
menuIcon: PluginMenuIcons.blockquote,
|
|
8732
9415
|
displayKey: '/yy'
|
|
8733
9416
|
}
|
|
@@ -8740,6 +9423,7 @@ const createBlockquotePlugin = createPluginFactory({
|
|
|
8740
9423
|
class TheCode extends TheBaseElement {
|
|
8741
9424
|
constructor() {
|
|
8742
9425
|
super(...arguments);
|
|
9426
|
+
this.locale = injectTranslations();
|
|
8743
9427
|
this.startRenderCodemirror = false;
|
|
8744
9428
|
this.dropdownMode = DropdownMode;
|
|
8745
9429
|
this.maxHeight = 0;
|
|
@@ -8877,7 +9561,7 @@ class TheCode extends TheBaseElement {
|
|
|
8877
9561
|
}
|
|
8878
9562
|
onCopy(event) {
|
|
8879
9563
|
event.preventDefault();
|
|
8880
|
-
copyNode(this.editor, this.element, this.thyNotifyService);
|
|
9564
|
+
copyNode(this.editor, this.element, this.thyNotifyService, this.locale);
|
|
8881
9565
|
}
|
|
8882
9566
|
focusChange(codeMirrorFocused) {
|
|
8883
9567
|
if (codeMirrorFocused) {
|
|
@@ -8926,7 +9610,7 @@ class TheCode extends TheBaseElement {
|
|
|
8926
9610
|
this.destroy$.complete();
|
|
8927
9611
|
}
|
|
8928
9612
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheCode, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
8929
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheCode, isStandalone: true, selector: "div[theCode]", host: { classAttribute: "the-code-container" }, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdown", first: true, predicate: TheToolbarDropdown, descendants: true, read: TheToolbarDropdown }], usesInheritance: true, ngImport: i0, template: "<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span
|
|
9613
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheCode, isStandalone: true, selector: "div[theCode]", host: { classAttribute: "the-code-container" }, viewQueries: [{ propertyName: "toolbar", first: true, predicate: ["toolbar"], descendants: true, read: TemplateRef, static: true }, { propertyName: "codemirror", first: true, predicate: ["codemirror"], descendants: true, read: CodeMirrorComponent }, { propertyName: "toolbarDropdown", first: true, predicate: TheToolbarDropdown, descendants: true, read: TheToolbarDropdown }], usesInheritance: true, ngImport: i0, template: "<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n", dependencies: [{ kind: "directive", type: ThyResizableDirective, selector: "[thyResizable]", inputs: ["thyBounds", "thyMaxHeight", "thyMaxWidth", "thyMinHeight", "thyMinWidth", "thyGridColumnCount", "thyMaxColumn", "thyMinColumn", "thyLockAspectRatio", "thyPreview", "thyDisabled"], outputs: ["thyResize", "thyResizeStart", "thyResizeEnd"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SlateModule }, { kind: "ngmodule", type: CodemirrorModule }, { kind: "component", type: i2$3.CodeMirrorComponent, selector: "ng-codemirror, [ngCodeMirror]", inputs: ["options", "extensions", "languages"], outputs: ["focusChange"] }, { kind: "component", type: ThySwitch, selector: "thy-switch", inputs: ["thyType", "thySize", "thyDisabled", "thyLoading"], outputs: ["thyChange"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyResizeHandle, selector: "thy-resize-handle, [thy-resize-handle]", inputs: ["thyDirection", "thyLine"], outputs: ["thyMouseDown"], exportAs: ["thyResizeHandle"] }, { kind: "component", type: TheToolbarDropdown, selector: "the-toolbar-dropdown" }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
8930
9614
|
}
|
|
8931
9615
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheCode, decorators: [{
|
|
8932
9616
|
type: Component,
|
|
@@ -8950,7 +9634,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
8950
9634
|
ThyResizeHandle,
|
|
8951
9635
|
TheToolbarDropdown,
|
|
8952
9636
|
ThePreventDefaultDirective
|
|
8953
|
-
], template: "<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span
|
|
9637
|
+
], template: "<!-- \u53EA\u8BFB\u6A21\u5F0F\u4E0BCodeMirror-sizer\u9AD8\u5EA6\u6BD4\u7F16\u8F91\u6A21\u5F0F\u4E0B\u591A2px\uFF0C\u8BBE\u7F6EthyMinHeight\u4E3A46px\u9632\u6B62\u62D6\u62FD\u5230\u6700\u5C0F\u9AD8\u5EA6\u65F6\u53EA\u8BFB\u6A21\u5F0F\u4E0B\u51FA\u73B0\u6EDA\u52A8\u6761 -->\n<div\n thyResizable\n [thyMinHeight]=\"46\"\n [thyBounds]=\"resizeBounds\"\n [style.height.px]=\"resizeHeight\"\n (thyResize)=\"onResize($event)\"\n (thyResizeEnd)=\"onEndResize()\"\n class=\"resize-code-container\"\n [ngClass]=\"{ focus: isCollapsedAndNonReadonly, readonly: options.readonly, active: isHightLight && isCollapsedAndNonReadonly }\"\n>\n <ng-codemirror\n *ngIf=\"startRenderCodemirror\"\n #codemirror\n contenteditable=\"false\"\n class=\"ng-codemirror-wrapper\"\n [ngStyle]=\"{ maxHeight: maxHeight > 0 ? maxHeight + 'px' : 'auto' }\"\n [options]=\"options\"\n [ngModel]=\"code\"\n (ngModelChange)=\"codeChange($event)\"\n (focusChange)=\"focusChange($event)\"\n >\n </ng-codemirror>\n <thy-resize-handle thyDirection=\"bottom\" class=\"code-resize-icon\" *ngIf=\"isCollapsedAndNonReadonly\"></thy-resize-handle>\n</div>\n\n<ng-template #toolbar>\n <thy-actions thySize=\"xxs\" thePreventDefault>\n <the-toolbar-dropdown\n [menus]=\"menus\"\n [toolbarItem]=\"activeLanguage\"\n [dropdownItemKey]=\"activeLanguage?.key\"\n [itemMousedownHandle]=\"onChangeLanguage\"\n >\n </the-toolbar-dropdown>\n <span class=\"auto-wrap d-flex align-items-center px-2 text-secondary\">\n <span>{{ locale().autoWrap }}</span>\n <thy-switch\n class=\"auto-wrap-btn d-flex ml-1\"\n [(ngModel)]=\"options.lineWrapping\"\n (ngModelChange)=\"onChangeWrap($event)\"\n thySize=\"sm\"\n ></thy-switch>\n </span>\n <a\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n thyTooltipPlacement=\"top\"\n (click)=\"onCopy($event)\"\n ></a>\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n thyActionIcon=\"trash\"\n [thyTooltip]=\"locale().delete\"\n thyTooltipPlacement=\"top\"\n (click)=\"onDelete($event)\"\n ></a>\n </thy-actions>\n</ng-template>\n" }]
|
|
8954
9638
|
}], propDecorators: { toolbar: [{
|
|
8955
9639
|
type: ViewChild,
|
|
8956
9640
|
args: ['toolbar', { read: TemplateRef, static: true }]
|
|
@@ -8999,6 +9683,7 @@ const createCodePlugin = createPluginFactory({
|
|
|
8999
9683
|
key: ElementKinds.code,
|
|
9000
9684
|
icon: 'code-syntax',
|
|
9001
9685
|
name: '代码块',
|
|
9686
|
+
translateKey: 'code',
|
|
9002
9687
|
active: editor => isBlockActive(editor, ElementKinds.code),
|
|
9003
9688
|
execute: editor => CodeEditor.insertCode(editor)
|
|
9004
9689
|
}
|
|
@@ -9007,11 +9692,13 @@ const createCodePlugin = createPluginFactory({
|
|
|
9007
9692
|
{
|
|
9008
9693
|
key: ElementKinds.code,
|
|
9009
9694
|
type: ThePluginMenuItemType.group,
|
|
9010
|
-
keywords: 'dmk,daimakuai,code
|
|
9695
|
+
keywords: 'dmk,daimakuai,code,代码块,程式碼區塊,codeblöcke,コードブロック,Блок кода',
|
|
9011
9696
|
active: editor => isBlockActive(editor, ElementKinds.code),
|
|
9012
9697
|
execute: editor => CodeEditor.insertCode(editor),
|
|
9013
9698
|
name: '代码块',
|
|
9699
|
+
translateKey: 'code',
|
|
9014
9700
|
description: '支持插入语法高亮的代码',
|
|
9701
|
+
descriptionTranslateKey: 'codeDesc',
|
|
9015
9702
|
menuIcon: PluginMenuIcons.code,
|
|
9016
9703
|
displayKey: '/dmk'
|
|
9017
9704
|
}
|
|
@@ -9028,8 +9715,8 @@ class TheColorToolbarItem extends TheBaseToolbarItem {
|
|
|
9028
9715
|
get lastBackgroundColor() {
|
|
9029
9716
|
return THE_EDITOR_BG_COLOR.get(this.editor) ?? '#FFDA00';
|
|
9030
9717
|
}
|
|
9031
|
-
constructor() {
|
|
9032
|
-
super();
|
|
9718
|
+
constructor(i18n) {
|
|
9719
|
+
super(i18n);
|
|
9033
9720
|
this.pickerActive = false;
|
|
9034
9721
|
}
|
|
9035
9722
|
ngOnInit() {
|
|
@@ -9093,15 +9780,15 @@ class TheColorToolbarItem extends TheBaseToolbarItem {
|
|
|
9093
9780
|
});
|
|
9094
9781
|
});
|
|
9095
9782
|
}
|
|
9096
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheColorToolbarItem, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9097
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheColorToolbarItem, isStandalone: true, selector: "the-color-toolbar-item", host: { classAttribute: "the-color-toolbar-item" }, usesInheritance: true, ngImport: i0, template: "<thy-actions\n class=\"d-flex p-0\"\n thySize=\"zero\"\n thyTooltipPlacement=\"top\"\n [thyTooltip]=\"toolbarItem.name\"\n [ngClass]=\"{ 'thy-default-picker-active': pickerActive }\"\n>\n <a href=\"javascript:;\" class=\"color\" thyAction (mousedown)=\"selectColor($event)\">\n <thy-icon\n thyIconType=\"twotone\"\n [thyIconName]=\"toolbarItem.icon\"\n [thyTwotoneColor]=\"toolbarItem.key === 'color' ? lastTextColor : lastBackgroundColor\"\n (mousedown)=\"selectColor($event)\"\n ></thy-icon>\n </a>\n <a\n class=\"pl-0 pr-0 caret-down\"\n href=\"javascript:;\"\n thyAction\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (thyPanelOpen)=\"pickerActive = true\"\n (thyPanelOpen)=\"colorPanelOpen($event)\"\n (thyPanelClose)=\"colorPanelClose()\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n >\n <thy-icon class=\"link-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyDisabled"], outputs: ["thyPanelOpen", "thyPanelClose"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
9783
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheColorToolbarItem, deps: [{ token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
9784
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheColorToolbarItem, isStandalone: true, selector: "the-color-toolbar-item", host: { classAttribute: "the-color-toolbar-item" }, usesInheritance: true, ngImport: i0, template: "<thy-actions\n class=\"d-flex p-0\"\n thySize=\"zero\"\n thyTooltipPlacement=\"top\"\n [thyTooltip]=\"locale()[toolbarItem.translateKey] ?? toolbarItem.name\"\n [ngClass]=\"{ 'thy-default-picker-active': pickerActive }\"\n>\n <a href=\"javascript:;\" class=\"color\" thyAction (mousedown)=\"selectColor($event)\">\n <thy-icon\n thyIconType=\"twotone\"\n [thyIconName]=\"toolbarItem.icon\"\n [thyTwotoneColor]=\"toolbarItem.key === 'color' ? lastTextColor : lastBackgroundColor\"\n (mousedown)=\"selectColor($event)\"\n ></thy-icon>\n </a>\n <a\n class=\"pl-0 pr-0 caret-down\"\n href=\"javascript:;\"\n thyAction\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (thyPanelOpen)=\"pickerActive = true\"\n (thyPanelOpen)=\"colorPanelOpen($event)\"\n (thyPanelClose)=\"colorPanelClose()\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n >\n <thy-icon class=\"link-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyDisabled"], outputs: ["thyPanelOpen", "thyPanelClose"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }] }); }
|
|
9098
9785
|
}
|
|
9099
9786
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheColorToolbarItem, decorators: [{
|
|
9100
9787
|
type: Component,
|
|
9101
9788
|
args: [{ selector: 'the-color-toolbar-item', host: {
|
|
9102
9789
|
class: 'the-color-toolbar-item'
|
|
9103
|
-
}, standalone: true, imports: [NgClass, FormsModule, ThyAction, ThyActions, ThyColorPickerDirective, ThyTooltipDirective, ThyIcon], template: "<thy-actions\n class=\"d-flex p-0\"\n thySize=\"zero\"\n thyTooltipPlacement=\"top\"\n [thyTooltip]=\"toolbarItem.name\"\n [ngClass]=\"{ 'thy-default-picker-active': pickerActive }\"\n>\n <a href=\"javascript:;\" class=\"color\" thyAction (mousedown)=\"selectColor($event)\">\n <thy-icon\n thyIconType=\"twotone\"\n [thyIconName]=\"toolbarItem.icon\"\n [thyTwotoneColor]=\"toolbarItem.key === 'color' ? lastTextColor : lastBackgroundColor\"\n (mousedown)=\"selectColor($event)\"\n ></thy-icon>\n </a>\n <a\n class=\"pl-0 pr-0 caret-down\"\n href=\"javascript:;\"\n thyAction\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (thyPanelOpen)=\"pickerActive = true\"\n (thyPanelOpen)=\"colorPanelOpen($event)\"\n (thyPanelClose)=\"colorPanelClose()\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n >\n <thy-icon class=\"link-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</thy-actions>\n" }]
|
|
9104
|
-
}], ctorParameters: () => [] });
|
|
9790
|
+
}, standalone: true, imports: [NgClass, FormsModule, ThyAction, ThyActions, ThyColorPickerDirective, ThyTooltipDirective, ThyIcon], template: "<thy-actions\n class=\"d-flex p-0\"\n thySize=\"zero\"\n thyTooltipPlacement=\"top\"\n [thyTooltip]=\"locale()[toolbarItem.translateKey] ?? toolbarItem.name\"\n [ngClass]=\"{ 'thy-default-picker-active': pickerActive }\"\n>\n <a href=\"javascript:;\" class=\"color\" thyAction (mousedown)=\"selectColor($event)\">\n <thy-icon\n thyIconType=\"twotone\"\n [thyIconName]=\"toolbarItem.icon\"\n [thyTwotoneColor]=\"toolbarItem.key === 'color' ? lastTextColor : lastBackgroundColor\"\n (mousedown)=\"selectColor($event)\"\n ></thy-icon>\n </a>\n <a\n class=\"pl-0 pr-0 caret-down\"\n href=\"javascript:;\"\n thyAction\n thyColorPicker\n thyPlacement=\"bottomLeft\"\n [(ngModel)]=\"selectedColor\"\n (thyPanelOpen)=\"pickerActive = true\"\n (thyPanelOpen)=\"colorPanelOpen($event)\"\n (thyPanelClose)=\"colorPanelClose()\"\n (ngModelChange)=\"changeColor($event)\"\n (mousedown)=\"preventDefault($event)\"\n >\n <thy-icon class=\"link-down-icon font-size-sm text-desc\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n</thy-actions>\n" }]
|
|
9791
|
+
}], ctorParameters: () => [{ type: TheI18nService }] });
|
|
9105
9792
|
|
|
9106
9793
|
const createColorPlugin = createPluginFactory({
|
|
9107
9794
|
key: PluginKeys.color,
|
|
@@ -9110,6 +9797,7 @@ const createColorPlugin = createPluginFactory({
|
|
|
9110
9797
|
key: MarkTypes.color,
|
|
9111
9798
|
icon: 'color-tt',
|
|
9112
9799
|
name: '字体颜色',
|
|
9800
|
+
translateKey: 'fontColor',
|
|
9113
9801
|
type: ToolbarItemType.dropdown,
|
|
9114
9802
|
dropdownMode: DropdownMode.icon,
|
|
9115
9803
|
iconComponent: TheColorToolbarItem,
|
|
@@ -9119,6 +9807,7 @@ const createColorPlugin = createPluginFactory({
|
|
|
9119
9807
|
key: MarkTypes.backgroundColor,
|
|
9120
9808
|
icon: 'background-tt',
|
|
9121
9809
|
name: '背景颜色',
|
|
9810
|
+
translateKey: 'backgroundColor',
|
|
9122
9811
|
type: ToolbarItemType.dropdown,
|
|
9123
9812
|
dropdownMode: DropdownMode.icon,
|
|
9124
9813
|
iconComponent: TheColorToolbarItem,
|
|
@@ -9483,6 +10172,7 @@ const createCommonPlugin = createPluginFactory({
|
|
|
9483
10172
|
{
|
|
9484
10173
|
key: ToolbarActionTypes.group,
|
|
9485
10174
|
name: '更多',
|
|
10175
|
+
translateKey: 'more',
|
|
9486
10176
|
icon: 'more',
|
|
9487
10177
|
type: ToolbarItemType.dropdown,
|
|
9488
10178
|
dropdownMode: DropdownMode.icon,
|
|
@@ -9977,6 +10667,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
9977
10667
|
{
|
|
9978
10668
|
key: ElementKinds.headingList,
|
|
9979
10669
|
name: '正文',
|
|
10670
|
+
translateKey: 'headingList',
|
|
9980
10671
|
type: ToolbarItemType.dropdown,
|
|
9981
10672
|
dropdownMode: DropdownMode.text,
|
|
9982
10673
|
dropdownItemKey: ElementKinds.paragraph,
|
|
@@ -9985,6 +10676,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
9985
10676
|
{
|
|
9986
10677
|
key: ElementKinds.paragraph,
|
|
9987
10678
|
name: '正文',
|
|
10679
|
+
translateKey: 'paragraph',
|
|
9988
10680
|
styles: { height: '40px' },
|
|
9989
10681
|
execute: editor => Transforms.setNodes(editor, { type: ElementKinds.paragraph }),
|
|
9990
10682
|
active: editor => isParagraph(editor)
|
|
@@ -9992,6 +10684,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
9992
10684
|
{
|
|
9993
10685
|
key: ElementKinds.heading_1,
|
|
9994
10686
|
name: '标题1',
|
|
10687
|
+
translateKey: 'heading1',
|
|
9995
10688
|
icon: 'header-1',
|
|
9996
10689
|
styles: { height: '40px', fontSize: '28px' },
|
|
9997
10690
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_1),
|
|
@@ -10001,6 +10694,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10001
10694
|
key: ElementKinds.heading_2,
|
|
10002
10695
|
icon: 'header-2',
|
|
10003
10696
|
name: '标题2',
|
|
10697
|
+
translateKey: 'heading2',
|
|
10004
10698
|
styles: { height: '38px', fontSize: '24px' },
|
|
10005
10699
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_2),
|
|
10006
10700
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_2)
|
|
@@ -10009,6 +10703,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10009
10703
|
key: ElementKinds.heading_3,
|
|
10010
10704
|
icon: 'header-3',
|
|
10011
10705
|
name: '标题3',
|
|
10706
|
+
translateKey: 'heading3',
|
|
10012
10707
|
styles: { height: '34px', fontSize: '20px' },
|
|
10013
10708
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_3),
|
|
10014
10709
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_3)
|
|
@@ -10017,6 +10712,7 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10017
10712
|
key: ElementKinds.heading_4,
|
|
10018
10713
|
icon: 'header-4',
|
|
10019
10714
|
name: '标题4',
|
|
10715
|
+
translateKey: 'heading4',
|
|
10020
10716
|
styles: { height: '30px', fontSize: '16px' },
|
|
10021
10717
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_4),
|
|
10022
10718
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_4)
|
|
@@ -10029,11 +10725,13 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10029
10725
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_1),
|
|
10030
10726
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_1),
|
|
10031
10727
|
name: '标题1',
|
|
10728
|
+
translateKey: 'heading1',
|
|
10032
10729
|
displayKey: '/h1',
|
|
10033
10730
|
description: '插入一级标题',
|
|
10731
|
+
descriptionTranslateKey: 'heading1Desc',
|
|
10034
10732
|
icon: 'header-1',
|
|
10035
10733
|
menuIcon: PluginMenuIcons.heading_1,
|
|
10036
|
-
keywords: 'h,H,bt,heading1,标题,h1'
|
|
10734
|
+
keywords: 'h,H,bt,heading1,标题,h1,標題,заголовок,見出し,überschrift'
|
|
10037
10735
|
},
|
|
10038
10736
|
{
|
|
10039
10737
|
key: ElementKinds.heading_2,
|
|
@@ -10041,11 +10739,13 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10041
10739
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_2),
|
|
10042
10740
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_2),
|
|
10043
10741
|
name: '标题2',
|
|
10742
|
+
translateKey: 'heading2',
|
|
10044
10743
|
icon: 'header-2',
|
|
10045
10744
|
description: '插入二级标题',
|
|
10745
|
+
descriptionTranslateKey: 'heading2Desc',
|
|
10046
10746
|
displayKey: '/h2',
|
|
10047
10747
|
menuIcon: PluginMenuIcons.heading_2,
|
|
10048
|
-
keywords: 'h,H,bt,heading2,标题,h2'
|
|
10748
|
+
keywords: 'h,H,bt,heading2,标题,h2,標題,заголовок,見出し,überschrift'
|
|
10049
10749
|
},
|
|
10050
10750
|
{
|
|
10051
10751
|
key: ElementKinds.heading_3,
|
|
@@ -10053,11 +10753,13 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10053
10753
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_3),
|
|
10054
10754
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_3),
|
|
10055
10755
|
name: '标题3',
|
|
10756
|
+
translateKey: 'heading3',
|
|
10056
10757
|
icon: 'header-3',
|
|
10057
10758
|
description: '插入三级标题',
|
|
10759
|
+
descriptionTranslateKey: 'heading3Desc',
|
|
10058
10760
|
displayKey: '/h3',
|
|
10059
10761
|
menuIcon: PluginMenuIcons.heading_3,
|
|
10060
|
-
keywords: 'h,H,bt,heading3,标题,h3'
|
|
10762
|
+
keywords: 'h,H,bt,heading3,标题,h3,標題,заголовок,見出し,überschrift'
|
|
10061
10763
|
},
|
|
10062
10764
|
{
|
|
10063
10765
|
key: ElementKinds.heading_4,
|
|
@@ -10065,11 +10767,13 @@ const createHeadingPlugin = createPluginFactory({
|
|
|
10065
10767
|
execute: editor => HeadingEditor.setHeading(editor, ElementKinds.heading_4),
|
|
10066
10768
|
active: editor => HeadingEditor.isHeadingActive(editor, ElementKinds.heading_4),
|
|
10067
10769
|
name: '标题4',
|
|
10770
|
+
translateKey: 'heading4',
|
|
10068
10771
|
icon: 'header-4',
|
|
10069
10772
|
description: '插入四级标题',
|
|
10773
|
+
descriptionTranslateKey: 'heading4Desc',
|
|
10070
10774
|
displayKey: '/h4',
|
|
10071
10775
|
menuIcon: PluginMenuIcons.heading_4,
|
|
10072
|
-
keywords: 'h,H,bt,heading4,BT,标题,h4'
|
|
10776
|
+
keywords: 'h,H,bt,heading4,BT,标题,h4,標題,заголовок,見出し,überschrift'
|
|
10073
10777
|
}
|
|
10074
10778
|
],
|
|
10075
10779
|
options: headingOptions
|
|
@@ -10134,6 +10838,7 @@ const createHrPlugin = createPluginFactory({
|
|
|
10134
10838
|
key: ElementKinds.hr,
|
|
10135
10839
|
icon: 'horizontal-line',
|
|
10136
10840
|
name: '分割线',
|
|
10841
|
+
translateKey: 'divider',
|
|
10137
10842
|
active: editor => isBlockActive(editor, ElementKinds.hr),
|
|
10138
10843
|
execute: editor => HrEditor.insertHr(editor)
|
|
10139
10844
|
}
|
|
@@ -10141,13 +10846,15 @@ const createHrPlugin = createPluginFactory({
|
|
|
10141
10846
|
menuItems: [
|
|
10142
10847
|
{
|
|
10143
10848
|
key: ElementKinds.hr,
|
|
10144
|
-
keywords: 'fengexian,fgx,divider,line
|
|
10849
|
+
keywords: 'fengexian,fgx,divider,line,分割线,分隔線,разделитель,区切り線,trennlinie',
|
|
10145
10850
|
type: ThePluginMenuItemType.group,
|
|
10146
10851
|
active: editor => isBlockActive(editor, ElementKinds.hr),
|
|
10147
10852
|
execute: editor => HrEditor.insertHr(editor),
|
|
10148
10853
|
name: '分割线',
|
|
10854
|
+
translateKey: 'divider',
|
|
10149
10855
|
menuIcon: PluginMenuIcons.hr,
|
|
10150
10856
|
description: '使用水平线分隔内容',
|
|
10857
|
+
descriptionTranslateKey: 'dividerDesc',
|
|
10151
10858
|
displayKey: '/fgx'
|
|
10152
10859
|
}
|
|
10153
10860
|
],
|
|
@@ -10175,6 +10882,7 @@ class TheImage extends TheBaseElement {
|
|
|
10175
10882
|
this.thyPopover = thyPopover;
|
|
10176
10883
|
this.overlay = overlay;
|
|
10177
10884
|
this.destroyRef = destroyRef;
|
|
10885
|
+
this.locale = injectTranslations();
|
|
10178
10886
|
this.naturalWidth = 0;
|
|
10179
10887
|
this.naturalHeight = 0;
|
|
10180
10888
|
this.imageEntry = {};
|
|
@@ -10187,19 +10895,19 @@ class TheImage extends TheBaseElement {
|
|
|
10187
10895
|
{
|
|
10188
10896
|
key: Alignment.left,
|
|
10189
10897
|
icon: 'image-left',
|
|
10190
|
-
name:
|
|
10898
|
+
name: this.locale().alignLeft,
|
|
10191
10899
|
handle: (e, key) => this.setImageNode(e, { align: key, layout: undefined })
|
|
10192
10900
|
},
|
|
10193
10901
|
{
|
|
10194
10902
|
key: Alignment.center,
|
|
10195
10903
|
icon: 'image-center',
|
|
10196
|
-
name:
|
|
10904
|
+
name: this.locale().alignCenter,
|
|
10197
10905
|
handle: (e, key) => this.setImageNode(e, { align: key, layout: undefined })
|
|
10198
10906
|
},
|
|
10199
10907
|
{
|
|
10200
10908
|
key: Alignment.right,
|
|
10201
10909
|
icon: 'image-right',
|
|
10202
|
-
name:
|
|
10910
|
+
name: this.locale().alignRight,
|
|
10203
10911
|
handle: (e, key) => this.setImageNode(e, { align: key, layout: undefined })
|
|
10204
10912
|
},
|
|
10205
10913
|
{
|
|
@@ -10208,19 +10916,19 @@ class TheImage extends TheBaseElement {
|
|
|
10208
10916
|
{
|
|
10209
10917
|
key: LayoutTypes.wrapLeft,
|
|
10210
10918
|
icon: 'wrap-left',
|
|
10211
|
-
name:
|
|
10919
|
+
name: this.locale().wrapLeft,
|
|
10212
10920
|
handle: (e, key) => this.setImageNode(e, { layout: key })
|
|
10213
10921
|
},
|
|
10214
10922
|
{
|
|
10215
10923
|
key: LayoutTypes.wrapRight,
|
|
10216
10924
|
icon: 'wrap-right',
|
|
10217
|
-
name:
|
|
10925
|
+
name: this.locale().wrapRight,
|
|
10218
10926
|
handle: (e, key) => this.setImageNode(e, { layout: key })
|
|
10219
10927
|
},
|
|
10220
10928
|
{
|
|
10221
10929
|
key: 'remove',
|
|
10222
10930
|
icon: 'trash',
|
|
10223
|
-
name:
|
|
10931
|
+
name: this.locale().delete,
|
|
10224
10932
|
handle: (e) => this.onDelete(e)
|
|
10225
10933
|
}
|
|
10226
10934
|
];
|
|
@@ -10662,6 +11370,7 @@ const createImagePlugin = createPluginFactory({
|
|
|
10662
11370
|
key: ElementKinds.image,
|
|
10663
11371
|
icon: 'image',
|
|
10664
11372
|
name: '图片',
|
|
11373
|
+
translateKey: 'image',
|
|
10665
11374
|
execute: editor => ImageEditor.openUpload(editor),
|
|
10666
11375
|
active: editor => ImageEditor.isActive(editor)
|
|
10667
11376
|
}
|
|
@@ -10669,12 +11378,14 @@ const createImagePlugin = createPluginFactory({
|
|
|
10669
11378
|
menuItems: [
|
|
10670
11379
|
{
|
|
10671
11380
|
key: ElementKinds.image,
|
|
10672
|
-
keywords: 'tp,tupian,image,photo,picture
|
|
11381
|
+
keywords: 'tp,tupian,image,photo,picture,图片,圖片,изображение,画像,がぞう,bild',
|
|
10673
11382
|
execute: editor => ImageEditor.openUpload(editor),
|
|
10674
11383
|
active: editor => ImageEditor.isActive(editor),
|
|
10675
11384
|
name: '图片',
|
|
11385
|
+
translateKey: 'image',
|
|
10676
11386
|
menuIcon: PluginMenuIcons.image,
|
|
10677
11387
|
description: '支持 jpg、jpeg 等格式图像',
|
|
11388
|
+
descriptionTranslateKey: 'imageDesc',
|
|
10678
11389
|
type: ThePluginMenuItemType.group,
|
|
10679
11390
|
displayKey: '/tp'
|
|
10680
11391
|
}
|
|
@@ -10765,6 +11476,7 @@ const createIndentPlugin = createPluginFactory({
|
|
|
10765
11476
|
{
|
|
10766
11477
|
key: Indents.indentRight,
|
|
10767
11478
|
name: '增加缩进',
|
|
11479
|
+
translateKey: 'increaseIndent',
|
|
10768
11480
|
icon: 'float-left',
|
|
10769
11481
|
shortcutKey: 'Tab',
|
|
10770
11482
|
execute: editor => IndentEditor.setIndent(editor)
|
|
@@ -10772,6 +11484,7 @@ const createIndentPlugin = createPluginFactory({
|
|
|
10772
11484
|
{
|
|
10773
11485
|
key: Indents.indentLeft,
|
|
10774
11486
|
name: '减少缩进',
|
|
11487
|
+
translateKey: 'decreaseIndent',
|
|
10775
11488
|
icon: 'float-right',
|
|
10776
11489
|
shortcutKey: 'Shift+Tab',
|
|
10777
11490
|
execute: editor => IndentEditor.cancelIndent(editor)
|
|
@@ -10879,6 +11592,7 @@ const createInlineCodePlugin = createPluginFactory({
|
|
|
10879
11592
|
key: ElementKinds.inlineCode,
|
|
10880
11593
|
icon: 'code',
|
|
10881
11594
|
name: '行内代码',
|
|
11595
|
+
translateKey: 'inlineCode',
|
|
10882
11596
|
shortcutKey: `${CONTROL_KEY}+E`,
|
|
10883
11597
|
execute: editor => InlineCodeEditor.toggleInlineCode(editor),
|
|
10884
11598
|
active: editor => InlineCodeEditor.isInlineCodeActive(editor)
|
|
@@ -10901,14 +11615,15 @@ class TheLinkEdit {
|
|
|
10901
11615
|
this.className = 'the-link-edit-container';
|
|
10902
11616
|
this.link = '';
|
|
10903
11617
|
this.text = '';
|
|
11618
|
+
this.locale = injectTranslations();
|
|
10904
11619
|
this.validatorConfig = {
|
|
10905
11620
|
validationMessages: {
|
|
10906
11621
|
link: {
|
|
10907
|
-
required:
|
|
10908
|
-
pattern:
|
|
11622
|
+
required: this.locale().linkRequired,
|
|
11623
|
+
pattern: this.locale().linkPattern
|
|
10909
11624
|
},
|
|
10910
11625
|
text: {
|
|
10911
|
-
required:
|
|
11626
|
+
required: this.locale().textRequired
|
|
10912
11627
|
}
|
|
10913
11628
|
}
|
|
10914
11629
|
};
|
|
@@ -10942,11 +11657,11 @@ class TheLinkEdit {
|
|
|
10942
11657
|
this.closePopover(LinkCloseTypes.apply);
|
|
10943
11658
|
}
|
|
10944
11659
|
else {
|
|
10945
|
-
form.validator.setElementErrorMessage(`link`,
|
|
11660
|
+
form.validator.setElementErrorMessage(`link`, this.locale().linkPattern);
|
|
10946
11661
|
}
|
|
10947
11662
|
}
|
|
10948
11663
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheLinkEdit, deps: [{ token: i1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10949
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheLinkEdit, isStandalone: true, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\
|
|
11664
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheLinkEdit, isStandalone: true, selector: "the-link-edit", inputs: { tag: "tag", node: "node", link: "link", text: "text", originSelection: "originSelection" }, host: { listeners: { "document: mousedown": "handleDocumentMouseDown($event)" }, properties: { "class": "this.className" } }, ngImport: i0, template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group [thyLabelText]=\"locale().text\">\n <input thyInput [placeholder]=\"locale().enterText\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"locale().link\">\n <input name=\"link\" thyInput [placeholder]=\"locale().enterLink\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">{{ locale().cancel }}</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">{{ locale().apply }}</button>\n </div>\n </thy-form-group-footer>\n</form>\n", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2$1.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ThyFormDirective, selector: "[thyForm],[thy-form]", inputs: ["thyLayout", "thyEnterKeyMode", "thyFormValidatorConfig"], exportAs: ["thyForm"] }, { kind: "directive", type: ThyInputDirective, selector: "input[thyInput], select[thyInput], textarea[thyInput]", inputs: ["thySize"], exportAs: ["thyInput"] }, { kind: "component", type: ThyButton, selector: "thy-button,[thy-button],[thyButton]", inputs: ["thyButton", "thyType", "thyLoading", "thyLoadingText", "thySize", "thyIcon", "thyBlock"] }, { kind: "directive", type: ThyAutofocusDirective, selector: "input[thyAutofocus],textarea[thyAutofocus]", inputs: ["thyAutofocus", "thyAutoSelect"] }, { kind: "component", type: ThyFormGroup, selector: "thy-form-group", inputs: ["thyLabelText", "thyLabelTextTranslateKey", "thyLabelRequired", "thyLabelPaddingTopClear", "thyFeedbackIcon", "thyTipsMode", "thyTips", "thyTipsTranslateKey", "thyRowFill"] }, { kind: "directive", type: ThyFormSubmitDirective, selector: "[thyFormSubmit],[thy-form-submit]", outputs: ["thyFormSubmit"] }, { kind: "component", type: ThyFormGroupFooter, selector: "thy-form-group-footer", inputs: ["thyAlign"] }] }); }
|
|
10950
11665
|
}
|
|
10951
11666
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheLinkEdit, decorators: [{
|
|
10952
11667
|
type: Component,
|
|
@@ -10959,7 +11674,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
10959
11674
|
ThyFormGroup,
|
|
10960
11675
|
ThyFormSubmitDirective,
|
|
10961
11676
|
ThyFormGroupFooter
|
|
10962
|
-
], template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group thyLabelText=\"\
|
|
11677
|
+
], template: "<form thyForm #linkForm=\"thyForm\" [thyFormValidatorConfig]=\"validatorConfig\" name=\"linkForm\">\n <thy-form-group [thyLabelText]=\"locale().text\">\n <input thyInput [placeholder]=\"locale().enterText\" required name=\"text\" [(ngModel)]=\"text\" thyAutofocus type=\"text\" />\n </thy-form-group>\n <thy-form-group [thyLabelText]=\"locale().link\">\n <input name=\"link\" thyInput [placeholder]=\"locale().enterLink\" required type=\"text\" #linkControl=\"ngModel\" [(ngModel)]=\"link\" />\n </thy-form-group>\n <thy-form-group-footer>\n <div class=\"btn-pair\">\n <button thyButton=\"link-secondary\" thySize=\"sm\" (click)=\"closePopover()\">{{ locale().cancel }}</button>\n <button thyButton=\"primary-square\" thySize=\"sm\" (thyFormSubmit)=\"applyLink(linkForm)\">{{ locale().apply }}</button>\n </div>\n </thy-form-group-footer>\n</form>\n" }]
|
|
10963
11678
|
}], ctorParameters: () => [{ type: i1.ThyPopoverRef }], propDecorators: { className: [{
|
|
10964
11679
|
type: HostBinding,
|
|
10965
11680
|
args: ['class']
|
|
@@ -11223,6 +11938,7 @@ const createLinkPlugin = createPluginFactory({
|
|
|
11223
11938
|
key: ElementKinds.link,
|
|
11224
11939
|
icon: 'link-insert',
|
|
11225
11940
|
name: '链接',
|
|
11941
|
+
translateKey: 'link',
|
|
11226
11942
|
execute: editor => LinkEditor.insertLink(editor),
|
|
11227
11943
|
active: editor => LinkEditor.isActive(editor)
|
|
11228
11944
|
}
|
|
@@ -11230,12 +11946,14 @@ const createLinkPlugin = createPluginFactory({
|
|
|
11230
11946
|
menuItems: [
|
|
11231
11947
|
{
|
|
11232
11948
|
key: ElementKinds.link,
|
|
11233
|
-
keywords: 'lj,lianjie,link
|
|
11949
|
+
keywords: 'lj,lianjie,link,链接,鏈接,cсылка,リンク',
|
|
11234
11950
|
description: '支持插入链接',
|
|
11951
|
+
descriptionTranslateKey: 'linkDesc',
|
|
11235
11952
|
execute: editor => LinkEditor.insertLink(editor),
|
|
11236
11953
|
active: editor => LinkEditor.isActive(editor),
|
|
11237
11954
|
type: ThePluginMenuItemType.icon,
|
|
11238
11955
|
name: '链接',
|
|
11956
|
+
translateKey: 'link',
|
|
11239
11957
|
displayKey: '/lj',
|
|
11240
11958
|
icon: 'link-insert',
|
|
11241
11959
|
menuIcon: PluginMenuIcons.link
|
|
@@ -12193,6 +12911,7 @@ const createListPlugin = createPluginFactory({
|
|
|
12193
12911
|
key: ElementKinds.numberedList,
|
|
12194
12912
|
icon: 'list-ordered',
|
|
12195
12913
|
name: '有序列表',
|
|
12914
|
+
translateKey: 'orderedList',
|
|
12196
12915
|
execute: editor => ListEditor.toggleList(editor, ElementKinds.numberedList),
|
|
12197
12916
|
active: editor => ListEditor.isActive(editor, ElementKinds.numberedList)
|
|
12198
12917
|
},
|
|
@@ -12200,6 +12919,7 @@ const createListPlugin = createPluginFactory({
|
|
|
12200
12919
|
key: ElementKinds.bulletedList,
|
|
12201
12920
|
icon: 'list-bullet',
|
|
12202
12921
|
name: '无序列表',
|
|
12922
|
+
translateKey: 'unorderedList',
|
|
12203
12923
|
execute: editor => ListEditor.toggleList(editor, ElementKinds.bulletedList),
|
|
12204
12924
|
active: editor => ListEditor.isActive(editor, ElementKinds.bulletedList)
|
|
12205
12925
|
}
|
|
@@ -12207,24 +12927,28 @@ const createListPlugin = createPluginFactory({
|
|
|
12207
12927
|
menuItems: [
|
|
12208
12928
|
{
|
|
12209
12929
|
key: ElementKinds.numberedList,
|
|
12210
|
-
keywords: 'yxlb,youxuliebiao,numbered list,numberedlist
|
|
12930
|
+
keywords: 'yxlb,youxuliebiao,numbered list,numberedlist,有序列表,有序清單,нумерованный списо,nummerierte liste,順序付きリスト,番号付きリスト,',
|
|
12211
12931
|
execute: editor => ListEditor.toggleList(editor, ElementKinds.numberedList),
|
|
12212
12932
|
active: editor => ListEditor.isActive(editor, ElementKinds.numberedList),
|
|
12213
12933
|
type: ThePluginMenuItemType.icon,
|
|
12214
12934
|
name: '有序列表',
|
|
12935
|
+
translateKey: 'orderedList',
|
|
12215
12936
|
description: '插入有序列表',
|
|
12937
|
+
descriptionTranslateKey: 'orderedListDesc',
|
|
12216
12938
|
displayKey: '/yxlb',
|
|
12217
12939
|
icon: 'list-ordered',
|
|
12218
12940
|
menuIcon: PluginMenuIcons.numberedList
|
|
12219
12941
|
},
|
|
12220
12942
|
{
|
|
12221
12943
|
key: ElementKinds.bulletedList,
|
|
12222
|
-
keywords: 'wxlb,wuxuliebiao,bulletedlist,bulleted list
|
|
12944
|
+
keywords: 'wxlb,wuxuliebiao,bulletedlist,bulleted list,无序列表,無序清單,неупорядоченный список,ungeordneten liste,順序なしリスト,番号なしリスト',
|
|
12223
12945
|
execute: editor => ListEditor.toggleList(editor, ElementKinds.bulletedList),
|
|
12224
12946
|
active: editor => ListEditor.isActive(editor, ElementKinds.bulletedList),
|
|
12225
12947
|
type: ThePluginMenuItemType.icon,
|
|
12226
12948
|
name: '无序列表',
|
|
12949
|
+
translateKey: 'unorderedList',
|
|
12227
12950
|
description: '插入无序列表',
|
|
12951
|
+
descriptionTranslateKey: 'unorderedListDesc',
|
|
12228
12952
|
displayKey: '/wxlb',
|
|
12229
12953
|
icon: 'list-bullet',
|
|
12230
12954
|
menuIcon: PluginMenuIcons.bulletedList
|
|
@@ -12299,6 +13023,7 @@ const createMarkPlugin = createPluginFactory({
|
|
|
12299
13023
|
key: MarkTypes.bold,
|
|
12300
13024
|
icon: 'bold',
|
|
12301
13025
|
name: '加粗',
|
|
13026
|
+
translateKey: 'bold',
|
|
12302
13027
|
shortcutKey: `${CONTROL_KEY}+B`,
|
|
12303
13028
|
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.bold),
|
|
12304
13029
|
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.bold)
|
|
@@ -12307,6 +13032,7 @@ const createMarkPlugin = createPluginFactory({
|
|
|
12307
13032
|
key: MarkTypes.italic,
|
|
12308
13033
|
icon: 'italic',
|
|
12309
13034
|
name: '斜体',
|
|
13035
|
+
translateKey: 'italic',
|
|
12310
13036
|
shortcutKey: `${CONTROL_KEY}+I`,
|
|
12311
13037
|
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.italic),
|
|
12312
13038
|
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.italic)
|
|
@@ -12315,6 +13041,7 @@ const createMarkPlugin = createPluginFactory({
|
|
|
12315
13041
|
key: MarkTypes.strike,
|
|
12316
13042
|
icon: 'strike',
|
|
12317
13043
|
name: '删除线',
|
|
13044
|
+
translateKey: 'strike',
|
|
12318
13045
|
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.strike),
|
|
12319
13046
|
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.strike)
|
|
12320
13047
|
},
|
|
@@ -12322,6 +13049,7 @@ const createMarkPlugin = createPluginFactory({
|
|
|
12322
13049
|
key: MarkTypes.underline,
|
|
12323
13050
|
icon: 'underline',
|
|
12324
13051
|
name: '下划线',
|
|
13052
|
+
translateKey: 'underline',
|
|
12325
13053
|
shortcutKey: `${CONTROL_KEY}+U`,
|
|
12326
13054
|
execute: editor => MarkEditor.toggleMark(editor, MarkTypes.underline),
|
|
12327
13055
|
active: editor => MarkEditor.isMarkActive(editor, MarkTypes.underline)
|
|
@@ -12519,6 +13247,7 @@ const createPaintFormatPlugin = createPluginFactory({
|
|
|
12519
13247
|
key: ToolbarActionTypes.undo,
|
|
12520
13248
|
icon: 'undo',
|
|
12521
13249
|
name: '撤销',
|
|
13250
|
+
translateKey: 'undo',
|
|
12522
13251
|
shortcutKey: `${CONTROL_KEY}+Z`,
|
|
12523
13252
|
execute: (editor) => editor.undo()
|
|
12524
13253
|
},
|
|
@@ -12526,6 +13255,7 @@ const createPaintFormatPlugin = createPluginFactory({
|
|
|
12526
13255
|
key: ToolbarActionTypes.redo,
|
|
12527
13256
|
icon: 'redo',
|
|
12528
13257
|
name: '重做',
|
|
13258
|
+
translateKey: 'redo',
|
|
12529
13259
|
shortcutKey: `${CONTROL_KEY}+Shift+Z`,
|
|
12530
13260
|
execute: (editor) => editor.redo()
|
|
12531
13261
|
},
|
|
@@ -12533,6 +13263,7 @@ const createPaintFormatPlugin = createPluginFactory({
|
|
|
12533
13263
|
key: ToolbarActionTypes.paintformat,
|
|
12534
13264
|
icon: 'paintformat',
|
|
12535
13265
|
name: '格式刷',
|
|
13266
|
+
translateKey: 'paintFormat',
|
|
12536
13267
|
execute: PaintFormatEditor.enableFormatBrush,
|
|
12537
13268
|
active: PaintFormatEditor.isActive
|
|
12538
13269
|
},
|
|
@@ -12540,6 +13271,7 @@ const createPaintFormatPlugin = createPluginFactory({
|
|
|
12540
13271
|
key: ToolbarActionTypes.clean,
|
|
12541
13272
|
icon: 'clean',
|
|
12542
13273
|
name: '清除格式',
|
|
13274
|
+
translateKey: 'cleanFormat',
|
|
12543
13275
|
execute: (editor) => {
|
|
12544
13276
|
const { selection } = editor;
|
|
12545
13277
|
if (!selection) {
|
|
@@ -13351,12 +14083,13 @@ class TheTableContextMenuService {
|
|
|
13351
14083
|
this.thyPopover = thyPopover;
|
|
13352
14084
|
this.ngZone = ngZone;
|
|
13353
14085
|
this.theContextService = theContextService;
|
|
14086
|
+
this.locale = injectTranslations();
|
|
13354
14087
|
this.menuEntities = [
|
|
13355
14088
|
{
|
|
13356
14089
|
key: 'background-color',
|
|
13357
14090
|
icon: 'background-tt',
|
|
13358
14091
|
divider: true,
|
|
13359
|
-
name:
|
|
14092
|
+
name: this.locale().cellBackground,
|
|
13360
14093
|
extendIcon: 'angle-right',
|
|
13361
14094
|
visibility: true,
|
|
13362
14095
|
actionHandle: () => { },
|
|
@@ -13374,10 +14107,10 @@ class TheTableContextMenuService {
|
|
|
13374
14107
|
{
|
|
13375
14108
|
key: TableInsertType.insertRowsUp,
|
|
13376
14109
|
icon: 'table-insert-rows-top',
|
|
13377
|
-
name:
|
|
14110
|
+
name: this.locale().insertUpward,
|
|
13378
14111
|
visibility: true,
|
|
13379
14112
|
isInputNumber: true,
|
|
13380
|
-
nameSuffix:
|
|
14113
|
+
nameSuffix: this.locale().row,
|
|
13381
14114
|
actionHandle: (item) => {
|
|
13382
14115
|
const { targetRowIndex } = this.getTargetRowOrColIndex();
|
|
13383
14116
|
TableEditor.insertRow(this.editor, item.count, targetRowIndex);
|
|
@@ -13387,10 +14120,10 @@ class TheTableContextMenuService {
|
|
|
13387
14120
|
{
|
|
13388
14121
|
key: TableInsertType.insertRowsDown,
|
|
13389
14122
|
icon: 'table-insert-rows-down',
|
|
13390
|
-
name:
|
|
14123
|
+
name: this.locale().insertDownward,
|
|
13391
14124
|
visibility: true,
|
|
13392
14125
|
isInputNumber: true,
|
|
13393
|
-
nameSuffix:
|
|
14126
|
+
nameSuffix: this.locale().row,
|
|
13394
14127
|
actionHandle: (item) => {
|
|
13395
14128
|
const { targetRowIndex } = this.getTargetRowOrColIndex(false);
|
|
13396
14129
|
TableEditor.insertRow(this.editor, item.count, targetRowIndex);
|
|
@@ -13400,10 +14133,10 @@ class TheTableContextMenuService {
|
|
|
13400
14133
|
{
|
|
13401
14134
|
key: TableInsertType.insertColumnsLeft,
|
|
13402
14135
|
icon: 'table-insert-columns-left',
|
|
13403
|
-
name:
|
|
14136
|
+
name: this.locale().insertLeft,
|
|
13404
14137
|
visibility: true,
|
|
13405
14138
|
isInputNumber: true,
|
|
13406
|
-
nameSuffix:
|
|
14139
|
+
nameSuffix: this.locale().column,
|
|
13407
14140
|
actionHandle: (item) => {
|
|
13408
14141
|
const { targetColIndex } = this.getTargetRowOrColIndex();
|
|
13409
14142
|
TableEditor.insertColumn(this.editor, item.count, targetColIndex);
|
|
@@ -13414,10 +14147,10 @@ class TheTableContextMenuService {
|
|
|
13414
14147
|
key: TableInsertType.insertColumnsRight,
|
|
13415
14148
|
icon: 'table-insert-columns-right',
|
|
13416
14149
|
divider: true,
|
|
13417
|
-
name:
|
|
14150
|
+
name: this.locale().insertRight,
|
|
13418
14151
|
visibility: true,
|
|
13419
14152
|
isInputNumber: true,
|
|
13420
|
-
nameSuffix:
|
|
14153
|
+
nameSuffix: this.locale().column,
|
|
13421
14154
|
actionHandle: (item) => {
|
|
13422
14155
|
const { targetColIndex } = this.getTargetRowOrColIndex(false);
|
|
13423
14156
|
TableEditor.insertColumn(this.editor, item.count, targetColIndex);
|
|
@@ -13428,7 +14161,7 @@ class TheTableContextMenuService {
|
|
|
13428
14161
|
key: 'clear-selection',
|
|
13429
14162
|
icon: 'sweep',
|
|
13430
14163
|
divider: true,
|
|
13431
|
-
name:
|
|
14164
|
+
name: this.locale().clearSelection,
|
|
13432
14165
|
visibility: true,
|
|
13433
14166
|
actionHandle: () => {
|
|
13434
14167
|
TableEditor.clearCellsContent(this.editor);
|
|
@@ -13438,7 +14171,7 @@ class TheTableContextMenuService {
|
|
|
13438
14171
|
{
|
|
13439
14172
|
key: 'merge-cells',
|
|
13440
14173
|
icon: 'table-merge-cells',
|
|
13441
|
-
name:
|
|
14174
|
+
name: this.locale().mergeCells,
|
|
13442
14175
|
visibility: true,
|
|
13443
14176
|
actionHandle: () => {
|
|
13444
14177
|
TableEditor.mergeCell(this.editor);
|
|
@@ -13447,7 +14180,7 @@ class TheTableContextMenuService {
|
|
|
13447
14180
|
{
|
|
13448
14181
|
key: 'split-cells',
|
|
13449
14182
|
icon: 'table-unmerge-cells',
|
|
13450
|
-
name:
|
|
14183
|
+
name: this.locale().splitCells,
|
|
13451
14184
|
divider: true,
|
|
13452
14185
|
visibility: true,
|
|
13453
14186
|
actionHandle: () => {
|
|
@@ -13457,7 +14190,7 @@ class TheTableContextMenuService {
|
|
|
13457
14190
|
{
|
|
13458
14191
|
key: 'delete-selection-rows',
|
|
13459
14192
|
icon: 'table-delete-rows',
|
|
13460
|
-
name:
|
|
14193
|
+
name: this.locale().deleteTheRow,
|
|
13461
14194
|
visibility: true,
|
|
13462
14195
|
actionHandle: () => {
|
|
13463
14196
|
removeColumnOrRows(this.editor, this.tableStore, {
|
|
@@ -13475,7 +14208,7 @@ class TheTableContextMenuService {
|
|
|
13475
14208
|
key: 'delete-selection-columns',
|
|
13476
14209
|
icon: 'table-delete-columns',
|
|
13477
14210
|
divider: true,
|
|
13478
|
-
name:
|
|
14211
|
+
name: this.locale().deleteTheColumn,
|
|
13479
14212
|
visibility: true,
|
|
13480
14213
|
actionHandle: () => {
|
|
13481
14214
|
removeColumnOrRows(this.editor, this.tableStore, {
|
|
@@ -13492,7 +14225,7 @@ class TheTableContextMenuService {
|
|
|
13492
14225
|
{
|
|
13493
14226
|
key: 'delete-table',
|
|
13494
14227
|
icon: 'trash',
|
|
13495
|
-
name:
|
|
14228
|
+
name: this.locale().deleteTable,
|
|
13496
14229
|
visibility: true,
|
|
13497
14230
|
actionHandle: () => {
|
|
13498
14231
|
TableEditor.removeTable(this.editor);
|
|
@@ -13671,17 +14404,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
13671
14404
|
class TheTableOptions {
|
|
13672
14405
|
constructor(popoverRef) {
|
|
13673
14406
|
this.popoverRef = popoverRef;
|
|
14407
|
+
this.locale = injectTranslations();
|
|
13674
14408
|
this.tableDropdownList = [
|
|
13675
14409
|
{
|
|
13676
|
-
name:
|
|
14410
|
+
name: this.locale().titleRow,
|
|
13677
14411
|
key: TableOperations.headerRow
|
|
13678
14412
|
},
|
|
13679
14413
|
{
|
|
13680
|
-
name:
|
|
14414
|
+
name: this.locale().titleCol,
|
|
13681
14415
|
key: TableOperations.headerColumn
|
|
13682
14416
|
},
|
|
13683
14417
|
{
|
|
13684
|
-
name:
|
|
14418
|
+
name: this.locale().orderCol,
|
|
13685
14419
|
key: TableOperations.numberedColumn
|
|
13686
14420
|
}
|
|
13687
14421
|
];
|
|
@@ -13777,10 +14511,11 @@ class TheTableToolbar {
|
|
|
13777
14511
|
this.popoverRef = popoverRef;
|
|
13778
14512
|
this.thyNotifyService = thyNotifyService;
|
|
13779
14513
|
this.viewContainerRef = viewContainerRef;
|
|
14514
|
+
this.locale = injectTranslations();
|
|
13780
14515
|
this.cellMenuList = [
|
|
13781
14516
|
{
|
|
13782
14517
|
key: 'merge-cells',
|
|
13783
|
-
name:
|
|
14518
|
+
name: this.locale().mergeCells,
|
|
13784
14519
|
visibility: false,
|
|
13785
14520
|
icon: 'table-merge-cells',
|
|
13786
14521
|
actionHandle: () => {
|
|
@@ -13791,7 +14526,7 @@ class TheTableToolbar {
|
|
|
13791
14526
|
},
|
|
13792
14527
|
{
|
|
13793
14528
|
key: 'split-cells',
|
|
13794
|
-
name:
|
|
14529
|
+
name: this.locale().splitCells,
|
|
13795
14530
|
visibility: false,
|
|
13796
14531
|
icon: 'table-unmerge-cells',
|
|
13797
14532
|
actionHandle: () => {
|
|
@@ -13826,15 +14561,15 @@ class TheTableToolbar {
|
|
|
13826
14561
|
const pos = createTablePosition(this.editor);
|
|
13827
14562
|
if (this.tableStore.selectedRowsIndex.length > 0) {
|
|
13828
14563
|
this.deleteIcon = DeleteIcon['table-delete-rows'];
|
|
13829
|
-
this.iconName =
|
|
14564
|
+
this.iconName = this.locale().deleteEntireRow;
|
|
13830
14565
|
}
|
|
13831
14566
|
if (this.tableStore.selectedColumnsIndex.length > 0) {
|
|
13832
14567
|
this.deleteIcon = DeleteIcon['table-delete-columns'];
|
|
13833
|
-
this.iconName =
|
|
14568
|
+
this.iconName = this.locale().deleteEntireCol;
|
|
13834
14569
|
}
|
|
13835
14570
|
if (this.tableStore.isSelectedTable) {
|
|
13836
14571
|
this.deleteIcon = DeleteIcon.trash;
|
|
13837
|
-
this.iconName =
|
|
14572
|
+
this.iconName = this.locale().deleteTable;
|
|
13838
14573
|
}
|
|
13839
14574
|
// 满足已选中整行或者整列
|
|
13840
14575
|
const isSelectedWholeRowOrColumnCell = selectedRowsIndex.length * pos.getWidth() === selectedCellPositions.length ||
|
|
@@ -13875,7 +14610,7 @@ class TheTableToolbar {
|
|
|
13875
14610
|
}
|
|
13876
14611
|
onCopy(e) {
|
|
13877
14612
|
e?.preventDefault();
|
|
13878
|
-
copyNode(this.editor, this.tableElement, this.thyNotifyService);
|
|
14613
|
+
copyNode(this.editor, this.tableElement, this.thyNotifyService, this.locale);
|
|
13879
14614
|
}
|
|
13880
14615
|
setEquallyColumnHandle(event) {
|
|
13881
14616
|
this.preventDefault(event);
|
|
@@ -13899,11 +14634,11 @@ class TheTableToolbar {
|
|
|
13899
14634
|
});
|
|
13900
14635
|
}
|
|
13901
14636
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheTableToolbar, deps: [{ token: i1.ThyPopover }, { token: i1.ThyPopoverRef }, { token: i2$4.ThyNotifyService }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13902
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheTableToolbar, isStandalone: true, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\" (mousedown)=\"preventDefault($event)\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (click)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\
|
|
14637
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheTableToolbar, isStandalone: true, selector: "the-table-toolbar", inputs: { tableStore: "tableStore", tableElement: "tableElement" }, ngImport: i0, template: "<thy-actions thySize=\"xxs\" (mousedown)=\"preventDefault($event)\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (click)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n [thyTooltip]=\"locale().cellBackground\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (click)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n [thyHasBackdrop]=\"false\"\n >\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && !isColumnEqual\"\n thyAction\n [thyTooltip]=\"locale().colEqualWidth\"\n (click)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n [thyTooltip]=\"locale().fullscreen\"\n (click)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n (click)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"preventDefault($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>{{ locale().tableOptions }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (click)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n", dependencies: [{ kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ThyIcon, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: ThyAction, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: ThyActions, selector: "thy-actions", inputs: ["thySize"] }, { kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: ThyDivider, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: ThyColorPickerDirective, selector: "[thyColorPicker]", inputs: ["thyOffset", "thyHasBackdrop", "thyDefaultColor", "thyTransparentColorSelectable", "thyPresetColors", "thyPlacement", "thyTrigger", "thyShowDelay", "thyHideDelay", "thyDisabled"], outputs: ["thyPanelOpen", "thyPanelClose"] }] }); }
|
|
13903
14638
|
}
|
|
13904
14639
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheTableToolbar, decorators: [{
|
|
13905
14640
|
type: Component,
|
|
13906
|
-
args: [{ selector: 'the-table-toolbar', standalone: true, imports: [NgFor, NgIf, FormsModule, ThyIcon, ThyAction, ThyActions, ThyTooltipDirective, ThyDivider, ThyColorPickerDirective], template: "<thy-actions thySize=\"xxs\" (mousedown)=\"preventDefault($event)\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (click)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyTooltip=\"\
|
|
14641
|
+
args: [{ selector: 'the-table-toolbar', standalone: true, imports: [NgFor, NgIf, FormsModule, ThyIcon, ThyAction, ThyActions, ThyTooltipDirective, ThyDivider, ThyColorPickerDirective], template: "<thy-actions thySize=\"xxs\" (mousedown)=\"preventDefault($event)\">\n <ng-container *ngFor=\"let item of cellMenuList\">\n <a\n *ngIf=\"item.visibility\"\n href=\"javascript:;\"\n thyAction\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n (click)=\"item.actionHandle()\"\n ></a>\n </ng-container>\n <thy-divider *ngIf=\"hasDivider\" class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"> </thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n [thyTooltip]=\"locale().cellBackground\"\n thyColorPicker\n [(ngModel)]=\"selectedColor\"\n (ngModelChange)=\"changeColor($event)\"\n (click)=\"openColorPanel($event)\"\n thyPlacement=\"bottomLeft\"\n [thyHasBackdrop]=\"false\"\n >\n <thy-icon thyIconName=\"background-tt\" thyIconType=\"twotone\" [thyTwotoneColor]=\"selectedColor\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && !isColumnEqual\"\n thyAction\n [thyTooltip]=\"locale().colEqualWidth\"\n (click)=\"setEquallyColumnHandle($event)\"\n >\n <thy-icon thyIconName=\"table-column-equal-width\"></thy-icon>\n </a>\n <a\n href=\"javascript:;\"\n *ngIf=\"tableStore.isSelectedTable && tableOptions?.showFullscreen\"\n thyAction\n [thyTooltip]=\"locale().fullscreen\"\n (click)=\"setFullscreen($event)\"\n >\n <thy-icon thyIconName=\"arrows-alt\"></thy-icon>\n </a>\n <a\n *ngIf=\"tableStore.isSelectedTable && !tableStore?.isFullscreen\"\n class=\"fullscreen-hidden\"\n href=\"javascript:;\"\n thyAction\n thyActionIcon=\"copy\"\n [thyTooltip]=\"locale().copy\"\n (click)=\"onCopy($event)\"\n ></a>\n <ng-container *ngIf=\"tableStore.isSelectedTable\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a href=\"javascript:;\" class=\"link-with-down\" thyAction (mousedown)=\"preventDefault($event)\" (click)=\"openTableOptionMenu($event)\">\n <span>{{ locale().tableOptions }}</span>\n <thy-icon class=\"font-size-sm text-desc ml-1\" thyIconName=\"caret-down\"></thy-icon>\n </a>\n </ng-container>\n <ng-container *ngIf=\"tableStore?.isFullscreen ? deleteIcon && !tableStore.isSelectedTable : deleteIcon\">\n <thy-divider class=\"mr-2 ml-1 align-self-center\" [thyVertical]=\"true\" thyColor=\"light\"></thy-divider>\n <a\n href=\"javascript:;\"\n thyAction\n thyType=\"danger\"\n [thyActionIcon]=\"deleteIcon\"\n [thyTooltip]=\"iconName\"\n (click)=\"onDelete($event)\"\n (mouseenter)=\"onEnterDelete($event)\"\n (mouseleave)=\"onLeaveDelete($event)\"\n ></a>\n </ng-container>\n</thy-actions>\n" }]
|
|
13907
14642
|
}], ctorParameters: () => [{ type: i1.ThyPopover }, { type: i1.ThyPopoverRef }, { type: i2$4.ThyNotifyService }, { type: i0.ViewContainerRef }], propDecorators: { tableStore: [{
|
|
13908
14643
|
type: Input
|
|
13909
14644
|
}], tableElement: [{
|
|
@@ -14173,17 +14908,19 @@ class TheInsertMark {
|
|
|
14173
14908
|
get editor() {
|
|
14174
14909
|
return this.tableStore && this.tableStore.editor;
|
|
14175
14910
|
}
|
|
14176
|
-
constructor(cdr, renderer2, elementRef) {
|
|
14911
|
+
constructor(cdr, i18n, renderer2, elementRef) {
|
|
14177
14912
|
this.cdr = cdr;
|
|
14913
|
+
this.i18n = i18n;
|
|
14178
14914
|
this.renderer2 = renderer2;
|
|
14179
14915
|
this.elementRef = elementRef;
|
|
14180
14916
|
this.insertLineStyle = {};
|
|
14181
14917
|
this.destroy$ = new Subject();
|
|
14182
14918
|
this.tooltipContent = '';
|
|
14183
14919
|
this.disabled = false;
|
|
14920
|
+
this.locale = signal(i18n.getLocale()().translations);
|
|
14184
14921
|
}
|
|
14185
14922
|
ngOnInit() {
|
|
14186
|
-
this.tooltipContent = this.type === 'row' ?
|
|
14923
|
+
this.tooltipContent = this.type === 'row' ? this.locale().insertRow : this.locale().insertCol;
|
|
14187
14924
|
this.tableStore
|
|
14188
14925
|
.selectedCellsChange()
|
|
14189
14926
|
.pipe(takeUntil(this.destroy$))
|
|
@@ -14266,7 +15003,7 @@ class TheInsertMark {
|
|
|
14266
15003
|
}
|
|
14267
15004
|
return this.type === 'column' && this.at === tablePosition.getWidth();
|
|
14268
15005
|
}
|
|
14269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheInsertMark, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15006
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheInsertMark, deps: [{ token: i0.ChangeDetectorRef }, { token: TheI18nService }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14270
15007
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheInsertMark, isStandalone: true, selector: "the-table-insert-mark", inputs: { type: "type", at: "at", tableStore: "tableStore", parentElement: "parentElement" }, host: { classAttribute: "the-table-insert-mark" }, viewQueries: [{ propertyName: "insertWrapper", first: true, predicate: ["insertWrapper"], descendants: true }], ngImport: i0, template: "<div\n #insertWrapper\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [ngStyle]=\"insertLineStyle\"\n ></div>\n</div>\n", dependencies: [{ kind: "directive", type: ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
|
|
14271
15008
|
}
|
|
14272
15009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheInsertMark, decorators: [{
|
|
@@ -14274,7 +15011,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
14274
15011
|
args: [{ selector: 'the-table-insert-mark', host: {
|
|
14275
15012
|
class: 'the-table-insert-mark'
|
|
14276
15013
|
}, standalone: true, imports: [ThyTooltipDirective, NgClass, NgIf, NgStyle], template: "<div\n #insertWrapper\n [thyTooltip]=\"!disabled && tooltipContent\"\n class=\"the-table-controls-insert-wrapper\"\n [ngClass]=\"{ disabled: disabled }\"\n contenteditable=\"false\"\n (pointerdown)=\"preventDefault($event)\"\n (pointerup)=\"insert($event)\"\n (click)=\"preventDefault($event)\"\n (mouseup)=\"preventDefault($event)\"\n (mouseenter)=\"onMouseEnter($event)\"\n (mouseleave)=\"onMouseLeave($event)\"\n>\n <div\n class=\"the-table-controls-insert-line\"\n *ngIf=\"dotWrapperHovered\"\n [ngStyle]=\"insertLineStyle\"\n ></div>\n</div>\n" }]
|
|
14277
|
-
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { type: [{
|
|
15014
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: TheI18nService }, { type: i0.Renderer2 }, { type: i0.ElementRef }], propDecorators: { type: [{
|
|
14278
15015
|
type: Input
|
|
14279
15016
|
}], at: [{
|
|
14280
15017
|
type: Input
|
|
@@ -15731,8 +16468,8 @@ class TheTableToolbarItem extends TheBaseToolbarItem {
|
|
|
15731
16468
|
get isOpenTableSelect() {
|
|
15732
16469
|
return this.tableSelectRef && this.tableSelectRef.componentInstance;
|
|
15733
16470
|
}
|
|
15734
|
-
constructor(thyPopover, overlay) {
|
|
15735
|
-
super();
|
|
16471
|
+
constructor(thyPopover, overlay, i18n) {
|
|
16472
|
+
super(i18n);
|
|
15736
16473
|
this.thyPopover = thyPopover;
|
|
15737
16474
|
this.overlay = overlay;
|
|
15738
16475
|
}
|
|
@@ -15769,7 +16506,7 @@ class TheTableToolbarItem extends TheBaseToolbarItem {
|
|
|
15769
16506
|
});
|
|
15770
16507
|
return this.tableSelectRef;
|
|
15771
16508
|
}
|
|
15772
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheTableToolbarItem, deps: [{ token: i1.ThyPopover }, { token: i2.Overlay }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
16509
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TheTableToolbarItem, deps: [{ token: i1.ThyPopover }, { token: i2.Overlay }, { token: TheI18nService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
15773
16510
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: TheTableToolbarItem, isStandalone: true, selector: "the-table-toolbar-item", host: { classAttribute: "the-toolbar-dropdown-container" }, usesInheritance: true, ngImport: i0, template: `
|
|
15774
16511
|
<a
|
|
15775
16512
|
href="javascript:;"
|
|
@@ -15777,7 +16514,7 @@ class TheTableToolbarItem extends TheBaseToolbarItem {
|
|
|
15777
16514
|
thyAction
|
|
15778
16515
|
[thyActionIcon]="toolbarItem.icon"
|
|
15779
16516
|
[thyActionActive]="active"
|
|
15780
|
-
[thyTooltip]="toolbarItem?.name"
|
|
16517
|
+
[thyTooltip]="locale()[toolbarItem?.translateKey] ?? toolbarItem?.name"
|
|
15781
16518
|
thyTooltipPlacement="top"
|
|
15782
16519
|
(mousedown)="preventDefault($event)"
|
|
15783
16520
|
(click)="execute($event)"
|
|
@@ -15797,7 +16534,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
15797
16534
|
thyAction
|
|
15798
16535
|
[thyActionIcon]="toolbarItem.icon"
|
|
15799
16536
|
[thyActionActive]="active"
|
|
15800
|
-
[thyTooltip]="toolbarItem?.name"
|
|
16537
|
+
[thyTooltip]="locale()[toolbarItem?.translateKey] ?? toolbarItem?.name"
|
|
15801
16538
|
thyTooltipPlacement="top"
|
|
15802
16539
|
(mousedown)="preventDefault($event)"
|
|
15803
16540
|
(click)="execute($event)"
|
|
@@ -15811,7 +16548,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
15811
16548
|
standalone: true,
|
|
15812
16549
|
imports: [ThyAction, ThyTooltipDirective, ThyIcon]
|
|
15813
16550
|
}]
|
|
15814
|
-
}], ctorParameters: () => [{ type: i1.ThyPopover }, { type: i2.Overlay }] });
|
|
16551
|
+
}], ctorParameters: () => [{ type: i1.ThyPopover }, { type: i2.Overlay }, { type: TheI18nService }] });
|
|
15815
16552
|
|
|
15816
16553
|
/**
|
|
15817
16554
|
* Clear the content of the given node
|
|
@@ -16383,6 +17120,7 @@ const createTablePlugin = createPluginFactory({
|
|
|
16383
17120
|
key: ElementKinds.table,
|
|
16384
17121
|
icon: 'table-border-all',
|
|
16385
17122
|
name: '表格',
|
|
17123
|
+
translateKey: 'table',
|
|
16386
17124
|
type: ToolbarItemType.dropdown,
|
|
16387
17125
|
dropdownMode: DropdownMode.icon,
|
|
16388
17126
|
iconComponent: TheTableToolbarItem,
|
|
@@ -16393,13 +17131,15 @@ const createTablePlugin = createPluginFactory({
|
|
|
16393
17131
|
menuItems: [
|
|
16394
17132
|
{
|
|
16395
17133
|
key: ElementKinds.table,
|
|
16396
|
-
keywords: 'biaoge,bg,table
|
|
17134
|
+
keywords: 'biaoge,bg,table,表格,таблицу,テーブル,tabelle',
|
|
16397
17135
|
execute: editor => TableEditor.insertTable(editor),
|
|
16398
17136
|
active: editor => TableEditor.isActive(editor),
|
|
16399
17137
|
name: '表格',
|
|
17138
|
+
translateKey: 'table',
|
|
16400
17139
|
type: ThePluginMenuItemType.group,
|
|
16401
17140
|
menuIcon: PluginMenuIcons.table,
|
|
16402
17141
|
description: '支持插入表格',
|
|
17142
|
+
descriptionTranslateKey: 'tableDesc',
|
|
16403
17143
|
displayKey: '/bg'
|
|
16404
17144
|
}
|
|
16405
17145
|
],
|
|
@@ -16535,6 +17275,7 @@ const createTodoItemPlugin = createPluginFactory({
|
|
|
16535
17275
|
key: ElementKinds.checkItem,
|
|
16536
17276
|
icon: 'list-check',
|
|
16537
17277
|
name: '待办事项',
|
|
17278
|
+
translateKey: 'checkItem',
|
|
16538
17279
|
execute: editor => TodoItemEditor.insertTodoItem(editor),
|
|
16539
17280
|
active: editor => TodoItemEditor.isActive(editor)
|
|
16540
17281
|
}
|
|
@@ -16542,12 +17283,14 @@ const createTodoItemPlugin = createPluginFactory({
|
|
|
16542
17283
|
menuItems: [
|
|
16543
17284
|
{
|
|
16544
17285
|
key: ElementKinds.checkItem,
|
|
16545
|
-
keywords: 'dbsx,daibanshixiang,to do list,todolist
|
|
17286
|
+
keywords: 'dbsx,daibanshixiang,to do list,todolist,待办事项,待辦事項,Задача,タスク,zu tun,aufgabe,zu tun',
|
|
16546
17287
|
description: '插入待办事项',
|
|
17288
|
+
descriptionTranslateKey: 'checkItemDesc',
|
|
16547
17289
|
execute: editor => TodoItemEditor.insertTodoItem(editor),
|
|
16548
17290
|
active: editor => TodoItemEditor.isActive(editor),
|
|
16549
17291
|
type: ThePluginMenuItemType.icon,
|
|
16550
17292
|
name: '待办事项',
|
|
17293
|
+
translateKey: 'checkItem',
|
|
16551
17294
|
displayKey: '/dbsx',
|
|
16552
17295
|
icon: 'list-check',
|
|
16553
17296
|
menuIcon: PluginMenuIcons.checkItem
|
|
@@ -17348,5 +18091,5 @@ const withTestPlugin = (plugins, initValue) => {
|
|
|
17348
18091
|
* Generated bundle index. Do not edit.
|
|
17349
18092
|
*/
|
|
17350
18093
|
|
|
17351
|
-
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QUICK_INSERT_HOTKEY, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_IMAGE_SERVICE_TOKEN, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheDefaultElement, TheEditor, TheEditorComponent, TheEditorModule, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheQuickInsert, TheTableSelect, TheTemplate, TheText, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deleteElementKey, errorImageUrlMock, extractFragment, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isVirtualKey, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, scrollIntoView, setClipboardDataByDom, setEditorUUID, theTethysIconRegistryFaker, topLeftPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia };
|
|
18094
|
+
export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DefaultPluginMenu, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QUICK_INSERT_HOTKEY, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_I18N_DE_DE, THE_I18N_EN_US, THE_I18N_JA_JP, THE_I18N_LOCALE_ID, THE_I18N_RU_RU, THE_I18N_ZH_HANS, THE_I18N_ZH_HANT, THE_IMAGE_SERVICE_TOKEN, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheDefaultElement, TheEditor, TheEditorComponent, TheEditorModule, TheI18nService, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheLocaleType, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheQuickInsert, TheTableSelect, TheTemplate, TheText, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deDeLocale, deleteElementKey, enUsLocale, errorImageUrlMock, extractFragment, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, injectLocale, injectTranslations, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isVirtualKey, jaJpLocale, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, ruRuLocale, scrollIntoView, setClipboardDataByDom, setEditorUUID, theTethysIconRegistryFaker, topLeftPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia, zhHansLocale, zhHantLocale };
|
|
17352
18095
|
//# sourceMappingURL=worktile-theia.mjs.map
|