@worktile/theia 14.2.6 → 14.2.8
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/plugin-menu/plugin-menu.component.d.ts +3 -0
- package/components/plugin-menu/plugin-menu.component.scss +4 -2
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +15 -5
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +4 -3
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +3 -3
- package/esm2020/constants/plugin-menu.mjs +47 -55
- package/esm2020/plugins/image/image.editor.mjs +7 -3
- package/esm2020/plugins/mention/mention.editor.mjs +4 -3
- package/fesm2015/worktile-theia.mjs +75 -66
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +74 -66
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/package.json +1 -1
- package/plugins/code/code.component.scss +1 -1
|
@@ -450,51 +450,44 @@ const PluginMenuSvgs = [
|
|
|
450
450
|
},
|
|
451
451
|
{
|
|
452
452
|
key: PluginMenuIcons.blockquote,
|
|
453
|
-
svg:
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
453
|
+
svg: `
|
|
454
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36px" height="36px" viewBox="0 0 36 36" version="1.1">
|
|
455
|
+
<title>引用</title>
|
|
456
|
+
<g id="引用" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
457
|
+
<g id="矩形">
|
|
458
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"/>
|
|
459
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z M32,1 L4,1 C2.40231912,1 1.09633912,2.24891996 1.00509269,3.82372721 L1,4 L1,32 C1,33.5976809 2.24891996,34.9036609 3.82372721,34.9949073 L4,35 L32,35 C33.5976809,35 34.9036609,33.75108 34.9949073,32.1762728 L35,32 L35,4 C35,2.40231912 33.75108,1.09633912 32.1762728,1.00509269 L32,1 Z" id="蒙版" fill="#EEEEEE" fill-rule="nonzero"/>
|
|
460
|
+
<g id="编组-34" transform="translate(7.000000, 7.600000)">
|
|
461
|
+
<path d="M-9.3,9.9 L10.5,9.9 C10.8313708,9.9 11.1,10.1686292 11.1,10.5 C11.1,10.8313708 10.8313708,11.1 10.5,11.1 L-9.3,11.1 C-9.63137085,11.1 -9.9,10.8313708 -9.9,10.5 C-9.9,10.1686292 -9.63137085,9.9 -9.3,9.9 Z" id="矩形备份-86" fill="#AAAAAA" transform="translate(0.600000, 10.500000) rotate(-270.000000) translate(-0.600000, -10.500000) "/>
|
|
462
|
+
<path d="M15.9430505,11.8926185 C18.9465926,9.90944702 20.6151885,7.60118786 20.9488503,4.96786972 C21.468286,0.868403103 17.902536,-1.1381708 16.0958081,0.664723529 C14.2890802,2.46761786 15.3721039,4.75598884 16.6803553,5.38150287 C17.9886068,6.00705792 18.78865,5.78919007 18.6490941,6.62510876 C18.5095382,7.46098644 16.6482882,9.77859509 15.0131035,10.8579287 C14.9046177,10.9527769 14.8633372,11.1368143 14.9677947,11.2764416 C15.0365157,11.3682553 15.1712854,11.5483356 15.3721039,11.8166948 C15.5477153,12.0513631 15.7159481,12.0425795 15.9430505,11.8926185 Z M8.03570922,11.8926185 C11.0392114,9.90944702 12.7078193,7.60118786 13.0414931,4.96786972 C13.5609089,0.868403103 9.99515489,-1.1381708 8.18842697,0.664723529 C6.38169904,2.46761786 7.46472273,4.75598884 8.77297419,5.38150287 C10.0812256,6.00705792 10.8813087,5.78919007 10.7417129,6.62510876 C10.6021571,7.46098644 8.74090705,9.77859509 7.10572235,10.8579287 C6.99723652,10.9527769 6.95595606,11.1368143 7.06045345,11.2764416 C7.12913455,11.3682553 7.26390428,11.5483356 7.46472273,11.8166948 C7.64033418,12.0513631 7.808567,12.0425795 8.03570922,11.8926185 Z M6.6,20.4 L15.7517228,20.4 C16.0830937,20.4 16.3517228,20.6686292 16.3517228,21 C16.3517228,21.3313708 16.0830937,21.6 15.7517228,21.6 L6.6,21.6 C6.26862915,21.6 6,21.3313708 6,21 C6,20.6686292 6.26862915,20.4 6.6,20.4 Z M6.6,15.4 L21.4,15.4 C21.7313708,15.4 22,15.6686292 22,16 C22,16.3313708 21.7313708,16.6 21.4,16.6 L6.6,16.6 C6.26862915,16.6 6,16.3313708 6,16 C6,15.6686292 6.26862915,15.4 6.6,15.4 Z" id="形状结合" fill="#CACACA"/>
|
|
463
|
+
</g>
|
|
464
|
+
</g>
|
|
464
465
|
</g>
|
|
465
|
-
</
|
|
466
|
-
|
|
467
|
-
</svg>`
|
|
466
|
+
</svg>
|
|
467
|
+
`
|
|
468
468
|
},
|
|
469
469
|
{
|
|
470
470
|
key: PluginMenuIcons.code,
|
|
471
|
-
svg:
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
<path d="M2,0 L6,0 L6,0 L6,24 L2,24 C0.8954305,24 1.3527075e-16,23.1045695 0,22 L0,2 C-1.3527075e-16,0.8954305 0.8954305,2.02906125e-16 2,0 Z" id="矩形备份-60" fill="#EEEEEE"></path>
|
|
488
|
-
<path d="M2.6,4 L3.4,4 C3.73137085,4 4,4.26862915 4,4.6 C4,4.93137085 3.73137085,5.2 3.4,5.2 L2.6,5.2 C2.26862915,5.2 2,4.93137085 2,4.6 C2,4.26862915 2.26862915,4 2.6,4 Z M2.6,9 L3.4,9 C3.73137085,9 4,9.26862915 4,9.6 C4,9.93137085 3.73137085,10.2 3.4,10.2 L2.6,10.2 C2.26862915,10.2 2,9.93137085 2,9.6 C2,9.26862915 2.26862915,9 2.6,9 Z M2.6,14 L3.4,14 C3.73137085,14 4,14.2686292 4,14.6 C4,14.9313708 3.73137085,15.2 3.4,15.2 L2.6,15.2 C2.26862915,15.2 2,14.9313708 2,14.6 C2,14.2686292 2.26862915,14 2.6,14 Z M2.6,19 L3.4,19 C3.73137085,19 4,19.2686292 4,19.6 C4,19.9313708 3.73137085,20.2 3.4,20.2 L2.6,20.2 C2.26862915,20.2 2,19.9313708 2,19.6 C2,19.2686292 2.26862915,19 2.6,19 Z" id="形状结合" fill="#CACACA"></path>
|
|
489
|
-
<path d="M10.6,4 L23.8215948,4 C24.1529656,4 24.4215948,4.26862915 24.4215948,4.6 C24.4215948,4.93137085 24.1529656,5.2 23.8215948,5.2 L10.6,5.2 C10.2686292,5.2 10,4.93137085 10,4.6 C10,4.26862915 10.2686292,4 10.6,4 Z" id="矩形备份-61" fill="#CACACA"></path>
|
|
490
|
-
<path d="M15.6,9 L23.9488547,9 C24.2802256,9 24.5488547,9.26862915 24.5488547,9.6 C24.5488547,9.93137085 24.2802256,10.2 23.9488547,10.2 L15.6,10.2 C15.2686292,10.2 15,9.93137085 15,9.6 C15,9.26862915 15.2686292,9 15.6,9 Z" id="矩形备份-63" fill="#FF7575"></path>
|
|
491
|
-
<path d="M10.6,14 L21.7142342,14 C22.0456051,14 22.3142342,14.2686292 22.3142342,14.6 C22.3142342,14.9313708 22.0456051,15.2 21.7142342,15.2 L10.6,15.2 C10.2686292,15.2 10,14.9313708 10,14.6 C10,14.2686292 10.2686292,14 10.6,14 Z" id="矩形备份-65" fill="#CACACA"></path>
|
|
492
|
-
<path d="M13.6,19 L29.1044747,19 C29.4358456,19 29.7044747,19.2686292 29.7044747,19.6 C29.7044747,19.9313708 29.4358456,20.2 29.1044747,20.2 L13.6,20.2 C13.2686292,20.2 13,19.9313708 13,19.6 C13,19.2686292 13.2686292,19 13.6,19 Z" id="矩形备份-66" fill="#6698FF"></path>
|
|
471
|
+
svg: `
|
|
472
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36px" height="36px" viewBox="0 0 36 36" version="1.1">
|
|
473
|
+
<title>代码块</title>
|
|
474
|
+
<g id="代码块" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
475
|
+
<g id="icon">
|
|
476
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"/>
|
|
477
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z M32,1 L4,1 C2.40231912,1 1.09633912,2.24891996 1.00509269,3.82372721 L1,4 L1,32 C1,33.5976809 2.24891996,34.9036609 3.82372721,34.9949073 L4,35 L32,35 C33.5976809,35 34.9036609,33.75108 34.9949073,32.1762728 L35,32 L35,4 C35,2.40231912 33.75108,1.09633912 32.1762728,1.00509269 L32,1 Z" id="蒙版" fill="#EEEEEE" fill-rule="nonzero"/>
|
|
478
|
+
<g id="编组-24" transform="translate(6.000000, 6.000000)">
|
|
479
|
+
<path d="M2,0 L29,0 L29,0 L29,24 L2,24 C0.8954305,24 1.3527075e-16,23.1045695 0,22 L0,2 C-1.3527075e-16,0.8954305 0.8954305,2.02906125e-16 2,0 Z" id="矩形备份-60" fill="#F5F5F5"/>
|
|
480
|
+
<path d="M2,0 L6,0 L6,0 L6,24 L2,24 C0.8954305,24 1.3527075e-16,23.1045695 0,22 L0,2 C-1.3527075e-16,0.8954305 0.8954305,2.02906125e-16 2,0 Z" id="矩形备份-60" fill="#EEEEEE"/>
|
|
481
|
+
<path d="M2.6,4 L3.4,4 C3.73137085,4 4,4.26862915 4,4.6 C4,4.93137085 3.73137085,5.2 3.4,5.2 L2.6,5.2 C2.26862915,5.2 2,4.93137085 2,4.6 C2,4.26862915 2.26862915,4 2.6,4 Z M2.6,9 L3.4,9 C3.73137085,9 4,9.26862915 4,9.6 C4,9.93137085 3.73137085,10.2 3.4,10.2 L2.6,10.2 C2.26862915,10.2 2,9.93137085 2,9.6 C2,9.26862915 2.26862915,9 2.6,9 Z M2.6,14 L3.4,14 C3.73137085,14 4,14.2686292 4,14.6 C4,14.9313708 3.73137085,15.2 3.4,15.2 L2.6,15.2 C2.26862915,15.2 2,14.9313708 2,14.6 C2,14.2686292 2.26862915,14 2.6,14 Z M2.6,19 L3.4,19 C3.73137085,19 4,19.2686292 4,19.6 C4,19.9313708 3.73137085,20.2 3.4,20.2 L2.6,20.2 C2.26862915,20.2 2,19.9313708 2,19.6 C2,19.2686292 2.26862915,19 2.6,19 Z" id="形状结合" fill="#CACACA"/>
|
|
482
|
+
<path d="M10.6,4 L23.8215948,4 C24.1529656,4 24.4215948,4.26862915 24.4215948,4.6 C24.4215948,4.93137085 24.1529656,5.2 23.8215948,5.2 L10.6,5.2 C10.2686292,5.2 10,4.93137085 10,4.6 C10,4.26862915 10.2686292,4 10.6,4 Z" id="矩形备份-61" fill="#CACACA"/>
|
|
483
|
+
<path d="M15.6,9 L23.9488547,9 C24.2802256,9 24.5488547,9.26862915 24.5488547,9.6 C24.5488547,9.93137085 24.2802256,10.2 23.9488547,10.2 L15.6,10.2 C15.2686292,10.2 15,9.93137085 15,9.6 C15,9.26862915 15.2686292,9 15.6,9 Z" id="矩形备份-63" fill="#FF7575"/>
|
|
484
|
+
<path d="M10.6,14 L21.7142342,14 C22.0456051,14 22.3142342,14.2686292 22.3142342,14.6 C22.3142342,14.9313708 22.0456051,15.2 21.7142342,15.2 L10.6,15.2 C10.2686292,15.2 10,14.9313708 10,14.6 C10,14.2686292 10.2686292,14 10.6,14 Z" id="矩形备份-65" fill="#CACACA"/>
|
|
485
|
+
<path d="M13.6,19 L29,19 L29,19 L29,20.2 L13.6,20.2 C13.2686292,20.2 13,19.9313708 13,19.6 C13,19.2686292 13.2686292,19 13.6,19 Z" id="矩形备份-66" fill="#6698FF"/>
|
|
486
|
+
</g>
|
|
493
487
|
</g>
|
|
494
488
|
</g>
|
|
495
|
-
</
|
|
496
|
-
|
|
497
|
-
</svg>`
|
|
489
|
+
</svg>
|
|
490
|
+
`
|
|
498
491
|
},
|
|
499
492
|
{
|
|
500
493
|
key: PluginMenuIcons.table,
|
|
@@ -517,22 +510,21 @@ const PluginMenuSvgs = [
|
|
|
517
510
|
},
|
|
518
511
|
{
|
|
519
512
|
key: PluginMenuIcons.hr,
|
|
520
|
-
svg:
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
513
|
+
svg: `
|
|
514
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="36px" height="36px" viewBox="0 0 36 36" version="1.1">
|
|
515
|
+
<title>分割线</title>
|
|
516
|
+
<g id="分割线" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
517
|
+
<g id="矩形备份-60">
|
|
518
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z" id="路径" fill="#FFFFFF" fill-rule="nonzero"/>
|
|
519
|
+
<path d="M32,0 C34.209139,0 36,1.790861 36,4 L36,32 C36,34.209139 34.209139,36 32,36 L4,36 C1.790861,36 0,34.209139 0,32 L0,4 C0,1.790861 1.790861,0 4,0 L32,0 Z M32,1 L4,1 C2.40231912,1 1.09633912,2.24891996 1.00509269,3.82372721 L1,4 L1,32 C1,33.5976809 2.24891996,34.9036609 3.82372721,34.9949073 L4,35 L32,35 C33.5976809,35 34.9036609,33.75108 34.9949073,32.1762728 L35,32 L35,4 C35,2.40231912 33.75108,1.09633912 32.1762728,1.00509269 L32,1 Z" id="蒙版" fill="#EEEEEE" fill-rule="nonzero"/>
|
|
520
|
+
<g id="编组-33" transform="translate(7.000000, 7.500000)">
|
|
521
|
+
<path d="M3.6,0 L17.5238673,0 C17.8552382,1.87571599e-15 18.1238673,0.26862915 18.1238673,0.6 C18.1238673,0.93137085 17.8552382,1.2 17.5238673,1.2 L3.6,1.2 C3.26862915,1.2 3,0.93137085 3,0.6 C3,0.26862915 3.26862915,1.7189414e-16 3.6,0 Z M6.47613265,15 L20.4,15 C20.7313708,15 21,15.2686292 21,15.6 C21,15.9313708 20.7313708,16.2 20.4,16.2 L6.47613265,16.2 C6.1447618,16.2 5.87613265,15.9313708 5.87613265,15.6 C5.87613265,15.2686292 6.1447618,15 6.47613265,15 Z M5.49677721,5 L14.6485,5 C14.9798709,5 15.2485,5.26862915 15.2485,5.6 C15.2485,5.93137085 14.9798709,6.2 14.6485,6.2 L5.49677721,6.2 C5.16540636,6.2 4.89677721,5.93137085 4.89677721,5.6 C4.89677721,5.26862915 5.16540636,5 5.49677721,5 Z M2.55871088,20 L11.7104337,20 C12.0418046,20 12.3104337,20.2686292 12.3104337,20.6 C12.3104337,20.9313708 12.0418046,21.2 11.7104337,21.2 L2.55871088,21.2 C2.22734003,21.2 1.95871088,20.9313708 1.95871088,20.6 C1.95871088,20.2686292 2.22734003,20 2.55871088,20 Z" id="形状结合" fill="#CACACA"/>
|
|
522
|
+
<path d="M0.6,10 L20.4,10 C20.7313708,10 21,10.2686292 21,10.6 C21,10.9313708 20.7313708,11.2 20.4,11.2 L0.6,11.2 C0.26862915,11.2 4.05812251e-17,10.9313708 0,10.6 C-4.05812251e-17,10.2686292 0.26862915,10 0.6,10 Z" id="矩形备份-83" fill="#AAAAAA"/>
|
|
523
|
+
</g>
|
|
524
|
+
</g>
|
|
532
525
|
</g>
|
|
533
|
-
</
|
|
534
|
-
|
|
535
|
-
</svg>`
|
|
526
|
+
</svg>
|
|
527
|
+
`
|
|
536
528
|
},
|
|
537
529
|
{
|
|
538
530
|
key: PluginMenuIcons.heading_1,
|
|
@@ -2512,6 +2504,7 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
2512
2504
|
}
|
|
2513
2505
|
selectionChange(editor) {
|
|
2514
2506
|
super.selectionChange(editor);
|
|
2507
|
+
this.activeKeys = [];
|
|
2515
2508
|
for (const menu of this.menus) {
|
|
2516
2509
|
if (menu?.active && menu?.active(editor)) {
|
|
2517
2510
|
this.activeKeys.push(menu.key);
|
|
@@ -2590,10 +2583,10 @@ class TheToolbarDropdownComponent extends TheBaseToolbarDropdown {
|
|
|
2590
2583
|
}
|
|
2591
2584
|
}
|
|
2592
2585
|
TheToolbarDropdownComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.ThyPopover }, { token: i0.ViewContainerRef }, { token: i2$1.Overlay }], target: i0.ɵɵFactoryTarget.Component });
|
|
2593
|
-
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, 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
|
|
2586
|
+
TheToolbarDropdownComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: TheToolbarDropdownComponent, selector: "the-toolbar-dropdown", inputs: { itemMousedownHandle: "itemMousedownHandle" }, 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: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i6.ThyDropdownMenuDividerComponent, selector: "thy-dropdown-menu-divider" }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "directive", type: i6.ThyDropdownMenuItemNameDirective, selector: "[thyDropdownMenuItemName]" }, { kind: "directive", type: i6.ThyDropdownMenuItemIconDirective, selector: "[thyDropdownMenuItemIcon]" }, { kind: "directive", type: i6.ThyDropdownMenuItemActiveDirective, selector: "[thyDropdownMenuItemActive]", inputs: ["thyDropdownMenuItemActive"] }] });
|
|
2594
2587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarDropdownComponent, decorators: [{
|
|
2595
2588
|
type: Component,
|
|
2596
|
-
args: [{ selector: 'the-toolbar-dropdown', template: "<a\n *ngIf=\"mode === dropdownMode.icon\"\n href=\"javascript:;\"\n class=\"icon-mode\"\n thyAction\n [thyActionIcon]=\"activeIcon\"\n [thyActionActive]=\"activeDropdown\"\n
|
|
2589
|
+
args: [{ selector: 'the-toolbar-dropdown', 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" }]
|
|
2597
2590
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1$1.ThyPopover }, { type: i0.ViewContainerRef }, { type: i2$1.Overlay }]; }, propDecorators: { className: [{
|
|
2598
2591
|
type: HostBinding,
|
|
2599
2592
|
args: ['class']
|
|
@@ -2645,7 +2638,7 @@ TheToolbarItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0"
|
|
|
2645
2638
|
(mousedown)="preventDefault($event)"
|
|
2646
2639
|
(click)="execute($event)"
|
|
2647
2640
|
></a>
|
|
2648
|
-
<ng-template #tooltip let-data> {{ data
|
|
2641
|
+
<ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
|
|
2649
2642
|
`, isInline: true, dependencies: [{ kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }] });
|
|
2650
2643
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: TheToolbarItemComponent, decorators: [{
|
|
2651
2644
|
type: Component,
|
|
@@ -2663,7 +2656,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
2663
2656
|
(mousedown)="preventDefault($event)"
|
|
2664
2657
|
(click)="execute($event)"
|
|
2665
2658
|
></a>
|
|
2666
|
-
<ng-template #tooltip let-data> {{ data
|
|
2659
|
+
<ng-template #tooltip let-data> {{ data?.name }} {{ data?.shortcutKey }} </ng-template>
|
|
2667
2660
|
`
|
|
2668
2661
|
}]
|
|
2669
2662
|
}], ctorParameters: function () { return [{ type: i0.NgZone }]; }, propDecorators: { className: [{
|
|
@@ -6339,14 +6332,18 @@ const ImageEditor = {
|
|
|
6339
6332
|
if (isString(image.originUrl) && image.originUrl.includes('base64')) {
|
|
6340
6333
|
const indexSplit = image.originUrl.indexOf(',');
|
|
6341
6334
|
const base64 = image.originUrl.slice(indexSplit + 1);
|
|
6342
|
-
const contentType = image.originUrl.substring(
|
|
6335
|
+
const contentType = image.originUrl.substring(image.originUrl.indexOf(':') + 1, image.originUrl.indexOf(';'));
|
|
6336
|
+
const ext = contentType.substring(contentType.indexOf('/') + 1);
|
|
6343
6337
|
const blob = base64toBlob(base64, contentType);
|
|
6344
6338
|
const blobUrl = URL.createObjectURL(blob);
|
|
6345
6339
|
image.thumbUrl = blobUrl;
|
|
6346
6340
|
image.originUrl = blobUrl;
|
|
6347
6341
|
image.url = blobUrl;
|
|
6348
6342
|
const contextService = editor.injector.get(TheContextService);
|
|
6349
|
-
contextService.addUploadingFiles({
|
|
6343
|
+
contextService.addUploadingFiles({
|
|
6344
|
+
url: blobUrl,
|
|
6345
|
+
file: new File([blob], `${new Date().getTime()}.${ext}`, { type: contentType })
|
|
6346
|
+
});
|
|
6350
6347
|
}
|
|
6351
6348
|
},
|
|
6352
6349
|
verifyImage(editor, image) {
|
|
@@ -9210,10 +9207,11 @@ const MentionEditor = {
|
|
|
9210
9207
|
insideClosable: false,
|
|
9211
9208
|
outsideClosable: true,
|
|
9212
9209
|
hasBackdrop: false,
|
|
9213
|
-
offset:
|
|
9210
|
+
offset: 4,
|
|
9214
9211
|
minWidth: 0,
|
|
9215
9212
|
viewContainerRef: viewContainerRef,
|
|
9216
|
-
scrollStrategy: overlay.scrollStrategies.reposition()
|
|
9213
|
+
scrollStrategy: overlay.scrollStrategies.reposition(),
|
|
9214
|
+
autoAdaptive: true
|
|
9217
9215
|
});
|
|
9218
9216
|
popoverRef?.afterClosed().subscribe(() => {
|
|
9219
9217
|
MentionEditor.close(editor);
|
|
@@ -10180,7 +10178,12 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10180
10178
|
placement: 'rightTop',
|
|
10181
10179
|
width: '266px'
|
|
10182
10180
|
};
|
|
10183
|
-
this.tableSelectPopoverConfig = {
|
|
10181
|
+
this.tableSelectPopoverConfig = {
|
|
10182
|
+
panelClass: 'plugin-menu-table-select-container',
|
|
10183
|
+
minWidth: 0,
|
|
10184
|
+
//避免重写
|
|
10185
|
+
originActiveClass: 'thy-popover-origin-active'
|
|
10186
|
+
};
|
|
10184
10187
|
this.containerClassName = `the-plugin-menu-container`;
|
|
10185
10188
|
this.theDisplaySearch = false;
|
|
10186
10189
|
this.removeKeywords = () => {
|
|
@@ -10198,6 +10201,7 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10198
10201
|
}
|
|
10199
10202
|
initializeSearch() {
|
|
10200
10203
|
if (this.theDisplaySearch) {
|
|
10204
|
+
this.scrollContainer = this.elementRef.nativeElement.querySelector('.the-plugin-menu-scroll-container');
|
|
10201
10205
|
this.keyboardContainer = this.elementRef.nativeElement;
|
|
10202
10206
|
setTimeout(() => {
|
|
10203
10207
|
// 记住位置
|
|
@@ -10271,6 +10275,7 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10271
10275
|
updateKeywords(keywords) {
|
|
10272
10276
|
this.keyWords = keywords.toLowerCase().trim();
|
|
10273
10277
|
this.buildMenus();
|
|
10278
|
+
this.scrollContainer.scrollTop = 0;
|
|
10274
10279
|
}
|
|
10275
10280
|
theListboxChange(event) {
|
|
10276
10281
|
if (event.type === 'select') {
|
|
@@ -10287,7 +10292,7 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10287
10292
|
dropdown.hide();
|
|
10288
10293
|
}
|
|
10289
10294
|
if (event.type === 'turn' && !event.option.parentOption) {
|
|
10290
|
-
ScrollToService.scrollToElement(event.option.elementRef.nativeElement, this.
|
|
10295
|
+
ScrollToService.scrollToElement(event.option.elementRef.nativeElement, this.scrollContainer);
|
|
10291
10296
|
}
|
|
10292
10297
|
}
|
|
10293
10298
|
findDropdownTrigger(option) {
|
|
@@ -10296,15 +10301,18 @@ class ThePluginMenuComponent extends mixinUnsubscribe(MixinBase) {
|
|
|
10296
10301
|
});
|
|
10297
10302
|
return dropdown;
|
|
10298
10303
|
}
|
|
10304
|
+
trackByFn(index, item) {
|
|
10305
|
+
return item?.key ?? index;
|
|
10306
|
+
}
|
|
10299
10307
|
ngOnDestroy() {
|
|
10300
10308
|
super.ngOnDestroy();
|
|
10301
10309
|
}
|
|
10302
10310
|
}
|
|
10303
10311
|
ThePluginMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }, { token: i1$1.ThyPopoverRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10304
|
-
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"buildMenus()\"> </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu py-2\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"text-muted font-size-sm\">{{ item.description }}</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]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10$1.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
10312
|
+
ThePluginMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.0", type: ThePluginMenuComponent, selector: "the-plugin-menu", inputs: { editor: "editor", theDisplaySearch: "theDisplaySearch", thePluginMenu: "thePluginMenu" }, host: { properties: { "class": "this.containerClassName" } }, viewQueries: [{ propertyName: "dropdownTriggers", predicate: ["dropdownTriggers"], descendants: true, read: ThyDropdownDirective }], usesInheritance: true, ngImport: i0, template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"text-muted font-size-sm\">{{ item.description }}</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]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i4.ThyIconComponent, selector: "thy-icon, [thy-icon]", inputs: ["thyIconType", "thyTwotoneColor", "thyIconName", "thyIconRotate", "thyIconSet", "thyIconLegging", "thyIconLinearGradient"] }, { kind: "directive", type: i8.ThyTooltipDirective, selector: "[thyTooltip],[thy-tooltip]", inputs: ["thyTooltip", "thyTooltipPlacement", "thyTooltipClass", "thyTooltipShowDelay", "thyTooltipHideDelay", "thyTooltipTrigger", "thyTooltipDisabled", "thyTooltipTemplateContext", "thyTooltipOffset", "thyTooltipPin"], exportAs: ["thyTooltip"] }, { kind: "component", type: i5$1.ThyInputSearchComponent, selector: "thy-input-search", inputs: ["name", "placeholder", "thyTheme", "thySearchFocus", "thyIconPosition", "thySize"], outputs: ["clear", "thyClear"] }, { kind: "component", type: i5.ThyActionComponent, selector: "thy-action, [thyAction]", inputs: ["thyType", "thyIcon", "thyActionIcon", "thyActive", "thyActionActive", "thyTheme", "thyHoverIcon", "thyDisabled"] }, { kind: "component", type: i12.ThyDividerComponent, selector: "thy-divider", inputs: ["thyVertical", "thyStyle", "thyColor", "thyText", "thyTextDirection", "thyDeeper"] }, { kind: "directive", type: i6.ThyDropdownDirective, selector: "[thyDropdown]", inputs: ["thyDropdownMenu", "thyDropdown", "thyTrigger", "thyActiveClass", "thyPopoverOptions"], outputs: ["thyActiveChange"] }, { kind: "component", type: i6.ThyDropdownMenuComponent, selector: "thy-dropdown-menu", inputs: ["thyWidth"] }, { kind: "component", type: i6.ThyDropdownMenuGroupComponent, selector: "thy-dropdown-menu-group", inputs: ["thyTitle"] }, { kind: "directive", type: i6.ThyDropdownMenuItemDirective, selector: "[thyDropdownMenuItem]", inputs: ["thyType", "thyDisabled"] }, { kind: "component", type: i10$1.ThyEmptyComponent, selector: "thy-empty", inputs: ["thyMessage", "thyTranslationKey", "thyTranslationValues", "thyEntityName", "thyEntityNameTranslateKey", "thyIconName", "thySize", "thyMarginTop", "thyTopAuto", "thyContainer", "thyImageUrl", "thyImageLoading", "thyImageFetchPriority", "thyDescription"] }, { kind: "directive", type: i1$1.ThyPopoverDirective, selector: "[thyPopover]", inputs: ["thyPopover", "thyTrigger", "thyPlacement", "thyOffset", "thyConfig", "thyShowDelay", "thyHideDelay", "thyAutoAdaptive", "thyDisabled"] }, { kind: "component", type: TheTableSelectComponent, selector: "table-select", inputs: ["optionsParam", "editor", "beforeInsert"] }, { kind: "directive", type: TheListboxOptionDirective, selector: "[theListboxOption]", inputs: ["theOptionValue"], exportAs: ["theListboxOption"] }, { kind: "directive", type: TheListboxGroupDirective, selector: "[theListboxGroup]", inputs: ["horizontalColumn"], exportAs: ["theListboxGroup"] }, { kind: "directive", type: TheListboxDirective, selector: "[theListBox]", inputs: ["keyboardContainer"], outputs: ["theListboxChange"], exportAs: ["theListBox"] }, { kind: "directive", type: ThePreventDefaultDirective, selector: "[thePreventDefault]", exportAs: ["thePreventDefault"] }] });
|
|
10305
10313
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: ThePluginMenuComponent, decorators: [{
|
|
10306
10314
|
type: Component,
|
|
10307
|
-
args: [{ selector: 'the-plugin-menu', template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"
|
|
10315
|
+
args: [{ selector: 'the-plugin-menu', template: "<div *ngIf=\"theDisplaySearch\" class=\"menu-search px-5 pt-5 pb-2\">\n <thy-input-search [(ngModel)]=\"keyWords\" placeholder=\"\u641C\u7D22\" thyIconPosition=\"after\" (ngModelChange)=\"updateKeywords(keyWords)\">\n </thy-input-search>\n</div>\n\n<div\n *ngIf=\"groupMenu.length > 0; else thyEmpty\"\n theListBox\n [keyboardContainer]=\"keyboardContainer\"\n (theListboxChange)=\"theListboxChange($event)\"\n class=\"thy-dropdown-menu the-plugin-menu-scroll-container pb-2 pt-0\"\n>\n <div *ngIf=\"iconMenu?.length > 0\" theListboxGroup [horizontalColumn]=\"6\" class=\"icon-menu d-flex pl-5 py-1\">\n <ng-container *ngFor=\"let item of iconMenu; trackBy: trackByFn\">\n <a\n *ngIf=\"item.type === ThePluginMenuItemType.icon\"\n href=\"javascript:;\"\n class=\"mt-2\"\n thyAction\n theListboxOption\n [theOptionValue]=\"item\"\n [thyActionIcon]=\"item.icon\"\n [thyTooltip]=\"item.name\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n ></a>\n </ng-container>\n </div>\n\n <thy-divider *ngIf=\"this.iconMenu?.length\" class=\"my-2\"></thy-divider>\n <div theListboxGroup>\n <ng-container *ngFor=\"let item of groupMenu; trackBy: trackByFn\">\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && !(item.children?.length > 0) && item.key !== 'table'\">\n <div\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.children?.length > 0\" #hasExpanded>\n <div\n #dropdownTriggers\n [thyDropdown]=\"expand\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [theOptionValue]=\"item\"\n [thyPopoverOptions]=\"expandPopoverOptions\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span *ngIf=\"!(item.children?.length > 0)\" class=\"menu-item-display-key font-size-sm text-placeholder\">\n {{ item.displayKey }}</span\n >\n {{ item.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ item.description }}</div>\n </div>\n <div *ngIf=\"item.children?.length > 0\">\n <thy-icon class=\"text-muted\" thyIconName=\"angle-right\"></thy-icon>\n </div>\n <thy-dropdown-menu #expand>\n <div class=\"the-plugin-menu-container expand-menu\" theListboxGroup>\n <div\n *ngFor=\"let child of item.children\"\n thyDropdownMenuItem\n theListboxOption\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(child)\"\n [theOptionValue]=\"child\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"child.menuIcon\"></thy-icon>\n </div>\n <div class=\"menu-content d-flex align-items-center\">\n <div class=\"menu-item-title w-100\">\n <span class=\"menu-item-display-key font-size-sm text-placeholder\"> {{ child.displayKey }}</span>\n {{ child.name }}\n </div>\n <div class=\"text-muted font-size-sm\">{{ child.description }}</div>\n </div>\n </div>\n </div>\n </thy-dropdown-menu>\n </div>\n </ng-container>\n <ng-container *ngIf=\"ThePluginMenu.isMenuItem(item) && item.key === 'table'\">\n <div\n #dropdownTriggers\n [thyPopover]=\"tableSelect\"\n thyPlacement=\"rightTop\"\n thyTrigger=\"hover\"\n thyDropdownMenuItem\n theListboxOption\n [thyConfig]=\"tableSelectPopoverConfig\"\n [theOptionValue]=\"item\"\n class=\"py-0\"\n thePreventDefault\n (click)=\"handleItemSelection(item)\"\n >\n <div class=\"menu-icon mr-2\">\n <thy-icon [thyIconName]=\"item.menuIcon\"></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 class=\"text-muted font-size-sm\">{{ item.description }}</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]=\"removeKeywords\"\n ></table-select>\n </ng-template>\n </div>\n </ng-container>\n <ng-container *ngIf=\"!ThePluginMenu.isMenuItem(item)\" #menuGroup>\n <thy-dropdown-menu-group class=\"font-size-sm\" [thyTitle]=\"item.groupName\"></thy-dropdown-menu-group>\n </ng-container>\n </ng-container>\n </div>\n</div>\n\n<ng-template #thyEmpty>\n <div class=\"empty d-flex align-items-center justify-content-center\">\n <thy-empty [thyMessage]=\"thyMessage\"></thy-empty>\n </div>\n</ng-template>\n" }]
|
|
10308
10316
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i0.NgZone }, { type: i1$1.ThyPopoverRef }]; }, propDecorators: { dropdownTriggers: [{
|
|
10309
10317
|
type: ViewChildren,
|
|
10310
10318
|
args: ['dropdownTriggers', { read: ThyDropdownDirective }]
|