@vaadin/rich-text-editor 25.4.0-alpha5 → 25.4.0-alpha7
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/package.json +14 -14
- package/src/vaadin-rich-text-editor.js +53 -57
- package/web-types.json +1 -1
- package/web-types.lit.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vaadin/rich-text-editor",
|
|
3
|
-
"version": "25.4.0-
|
|
3
|
+
"version": "25.4.0-alpha7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -35,22 +35,22 @@
|
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@open-wc/dedupe-mixin": "^1.3.0",
|
|
38
|
-
"@vaadin/a11y-base": "25.4.0-
|
|
39
|
-
"@vaadin/button": "25.4.0-
|
|
40
|
-
"@vaadin/component-base": "25.4.0-
|
|
41
|
-
"@vaadin/confirm-dialog": "25.4.0-
|
|
42
|
-
"@vaadin/overlay": "25.4.0-
|
|
43
|
-
"@vaadin/text-field": "25.4.0-
|
|
44
|
-
"@vaadin/tooltip": "25.4.0-
|
|
45
|
-
"@vaadin/vaadin-themable-mixin": "25.4.0-
|
|
38
|
+
"@vaadin/a11y-base": "25.4.0-alpha7",
|
|
39
|
+
"@vaadin/button": "25.4.0-alpha7",
|
|
40
|
+
"@vaadin/component-base": "25.4.0-alpha7",
|
|
41
|
+
"@vaadin/confirm-dialog": "25.4.0-alpha7",
|
|
42
|
+
"@vaadin/overlay": "25.4.0-alpha7",
|
|
43
|
+
"@vaadin/text-field": "25.4.0-alpha7",
|
|
44
|
+
"@vaadin/tooltip": "25.4.0-alpha7",
|
|
45
|
+
"@vaadin/vaadin-themable-mixin": "25.4.0-alpha7",
|
|
46
46
|
"lit": "^3.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@vaadin/aura": "25.4.0-
|
|
50
|
-
"@vaadin/chai-plugins": "25.4.0-
|
|
51
|
-
"@vaadin/test-runner-commands": "25.4.0-
|
|
49
|
+
"@vaadin/aura": "25.4.0-alpha7",
|
|
50
|
+
"@vaadin/chai-plugins": "25.4.0-alpha7",
|
|
51
|
+
"@vaadin/test-runner-commands": "25.4.0-alpha7",
|
|
52
52
|
"@vaadin/testing-helpers": "^2.0.0",
|
|
53
|
-
"@vaadin/vaadin-lumo-styles": "25.4.0-
|
|
53
|
+
"@vaadin/vaadin-lumo-styles": "25.4.0-alpha7",
|
|
54
54
|
"sinon": "^22.0.0"
|
|
55
55
|
},
|
|
56
56
|
"cvdlName": "vaadin-rich-text-editor",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"web-types.json",
|
|
60
60
|
"web-types.lit.json"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "368fb0f0df09ec6f51766d9c44047c8d7620d6bd"
|
|
63
63
|
}
|
|
@@ -12,9 +12,10 @@ import '@vaadin/confirm-dialog/src/vaadin-confirm-dialog.js';
|
|
|
12
12
|
import '@vaadin/text-field/src/vaadin-text-field.js';
|
|
13
13
|
import '@vaadin/tooltip/src/vaadin-tooltip.js';
|
|
14
14
|
import './vaadin-rich-text-editor-popup.js';
|
|
15
|
-
import { html, LitElement
|
|
15
|
+
import { html, LitElement } from 'lit';
|
|
16
16
|
import { isKeyboardActive } from '@vaadin/a11y-base/src/focus-utils.js';
|
|
17
17
|
import { defineCustomElement } from '@vaadin/component-base/src/define.js';
|
|
18
|
+
import { slotContent } from '@vaadin/component-base/src/directives/slot-content.js';
|
|
18
19
|
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
|
|
19
20
|
import { PolylitMixin } from '@vaadin/component-base/src/polylit-mixin.js';
|
|
20
21
|
import { LumoInjectionMixin } from '@vaadin/vaadin-themable-mixin/lumo-injection-mixin.js';
|
|
@@ -403,71 +404,66 @@ class RichTextEditor extends RichTextEditorMixin(
|
|
|
403
404
|
|
|
404
405
|
<slot name="tooltip"></slot>
|
|
405
406
|
|
|
406
|
-
<slot name="link-dialog"></slot>
|
|
407
|
+
<slot name="link-dialog" ${slotContent(this.__renderLinkDialog())}></slot>
|
|
407
408
|
|
|
408
|
-
<slot name="color-popup"></slot>
|
|
409
|
+
<slot name="color-popup" ${slotContent(this.__renderColorPopup())}></slot>
|
|
409
410
|
|
|
410
|
-
<slot name="background-popup"></slot>
|
|
411
|
+
<slot name="background-popup" ${slotContent(this.__renderBackgroundPopup())}></slot>
|
|
411
412
|
`;
|
|
412
413
|
}
|
|
413
414
|
|
|
414
|
-
/**
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
415
|
+
/** @private */
|
|
416
|
+
__renderLinkDialog() {
|
|
417
|
+
return html`
|
|
418
|
+
<vaadin-confirm-dialog
|
|
419
|
+
slot="link-dialog"
|
|
420
|
+
cancel-button-visible
|
|
421
|
+
reject-theme="error"
|
|
422
|
+
.opened="${this._linkEditing}"
|
|
423
|
+
.header="${this.__effectiveI18n.linkDialogTitle}"
|
|
424
|
+
.confirmText="${this.__effectiveI18n.ok}"
|
|
425
|
+
.rejectText="${this.__effectiveI18n.remove}"
|
|
426
|
+
.cancelText="${this.__effectiveI18n.cancel}"
|
|
427
|
+
.rejectButtonVisible="${!!this._linkRange}"
|
|
428
|
+
@confirm="${this._onLinkEditConfirm}"
|
|
429
|
+
@cancel="${this._onLinkEditCancel}"
|
|
430
|
+
@reject="${this._onLinkEditRemove}"
|
|
431
|
+
@opened-changed="${this._onLinkEditingChanged}"
|
|
432
|
+
>
|
|
433
|
+
<vaadin-text-field
|
|
434
|
+
.value="${this._linkUrl}"
|
|
435
|
+
style="width: 100%;"
|
|
436
|
+
@keydown="${this._onLinkKeydown}"
|
|
437
|
+
@value-changed="${this._onLinkUrlChanged}"
|
|
438
|
+
></vaadin-text-field>
|
|
439
|
+
</vaadin-confirm-dialog>
|
|
440
|
+
`;
|
|
441
|
+
}
|
|
421
442
|
|
|
422
|
-
|
|
443
|
+
/** @private */
|
|
444
|
+
__renderColorPopup() {
|
|
445
|
+
return html`
|
|
446
|
+
<vaadin-rich-text-editor-popup
|
|
447
|
+
slot="color-popup"
|
|
448
|
+
.colors="${['#000000', ...[...this.colorOptions].filter((c) => c !== '#000000')]}"
|
|
449
|
+
.opened="${this._colorEditing}"
|
|
450
|
+
@color-selected="${this.__onColorSelected}"
|
|
451
|
+
@opened-changed="${this.__onColorEditingChanged}"
|
|
452
|
+
></vaadin-rich-text-editor-popup>
|
|
453
|
+
`;
|
|
423
454
|
}
|
|
424
455
|
|
|
425
456
|
/** @private */
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
.rejectText="${this.__effectiveI18n.remove}"
|
|
437
|
-
.cancelText="${this.__effectiveI18n.cancel}"
|
|
438
|
-
.rejectButtonVisible="${!!this._linkRange}"
|
|
439
|
-
@confirm="${this._onLinkEditConfirm}"
|
|
440
|
-
@cancel="${this._onLinkEditCancel}"
|
|
441
|
-
@reject="${this._onLinkEditRemove}"
|
|
442
|
-
@opened-changed="${this._onLinkEditingChanged}"
|
|
443
|
-
>
|
|
444
|
-
<vaadin-text-field
|
|
445
|
-
.value="${this._linkUrl}"
|
|
446
|
-
style="width: 100%;"
|
|
447
|
-
@keydown="${this._onLinkKeydown}"
|
|
448
|
-
@value-changed="${this._onLinkUrlChanged}"
|
|
449
|
-
></vaadin-text-field>
|
|
450
|
-
</vaadin-confirm-dialog>
|
|
451
|
-
|
|
452
|
-
<vaadin-rich-text-editor-popup
|
|
453
|
-
slot="color-popup"
|
|
454
|
-
.colors="${['#000000', ...[...this.colorOptions].filter((c) => c !== '#000000')]}"
|
|
455
|
-
.opened="${this._colorEditing}"
|
|
456
|
-
@color-selected="${this.__onColorSelected}"
|
|
457
|
-
@opened-changed="${this.__onColorEditingChanged}"
|
|
458
|
-
></vaadin-rich-text-editor-popup>
|
|
459
|
-
|
|
460
|
-
<vaadin-rich-text-editor-popup
|
|
461
|
-
slot="background-popup"
|
|
462
|
-
.colors="${['#ffffff', ...[...this.colorOptions].filter((c) => c !== '#ffffff')]}"
|
|
463
|
-
.opened="${this._backgroundEditing}"
|
|
464
|
-
@color-selected="${this.__onBackgroundSelected}"
|
|
465
|
-
@opened-changed="${this.__onBackgroundEditingChanged}"
|
|
466
|
-
></vaadin-rich-text-editor-popup>
|
|
467
|
-
`,
|
|
468
|
-
this,
|
|
469
|
-
{ host: this },
|
|
470
|
-
);
|
|
457
|
+
__renderBackgroundPopup() {
|
|
458
|
+
return html`
|
|
459
|
+
<vaadin-rich-text-editor-popup
|
|
460
|
+
slot="background-popup"
|
|
461
|
+
.colors="${['#ffffff', ...[...this.colorOptions].filter((c) => c !== '#ffffff')]}"
|
|
462
|
+
.opened="${this._backgroundEditing}"
|
|
463
|
+
@color-selected="${this.__onBackgroundSelected}"
|
|
464
|
+
@opened-changed="${this.__onBackgroundEditingChanged}"
|
|
465
|
+
></vaadin-rich-text-editor-popup>
|
|
466
|
+
`;
|
|
471
467
|
}
|
|
472
468
|
|
|
473
469
|
/** @private */
|
package/web-types.json
CHANGED
package/web-types.lit.json
CHANGED