@web-atoms/web-controls 2.6.5 → 2.6.7
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/dist/html-editor/InlineHtmlEditor.d.ts +1 -1
- package/dist/html-editor/InlineHtmlEditor.d.ts.map +1 -1
- package/dist/html-editor/InlineHtmlEditor.js +2 -2
- package/dist/html-editor/InlineHtmlEditor.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist-esm/ArrayLike.js +14 -12
- package/dist-esm/DataAttributes.js +18 -19
- package/dist-esm/Focusable.js +10 -11
- package/dist-esm/ModuleFiles.js +43 -42
- package/dist-esm/NumberFormats.js +60 -56
- package/dist-esm/PageNavigator.js +28 -30
- package/dist-esm/animations/Animations.js +36 -33
- package/dist-esm/basic/AtomChips.js +312 -305
- package/dist-esm/basic/AtomRepeater.js +1070 -1035
- package/dist-esm/basic/AtomSuggestions.js +97 -107
- package/dist-esm/basic/AttachedPopup.js +0 -1
- package/dist-esm/basic/Button.js +45 -19
- package/dist-esm/basic/ButtonBar.js +84 -64
- package/dist-esm/basic/Calendar.js +211 -203
- package/dist-esm/basic/CheckBoxList.js +90 -70
- package/dist-esm/basic/Checkbox.js +16 -8
- package/dist-esm/basic/Chip.js +36 -12
- package/dist-esm/basic/ComboBox.js +47 -51
- package/dist-esm/basic/DataGrid.js +258 -252
- package/dist-esm/basic/DateField.js +149 -127
- package/dist-esm/basic/DropDown.js +91 -103
- package/dist-esm/basic/DropDownInput.js +78 -106
- package/dist-esm/basic/Editable.js +82 -77
- package/dist-esm/basic/Expander.js +104 -86
- package/dist-esm/basic/FilesDragDrop.js +84 -80
- package/dist-esm/basic/Form.js +80 -52
- package/dist-esm/basic/FormField.js +164 -106
- package/dist-esm/basic/IElement.js +1 -2
- package/dist-esm/basic/InlinePopup.js +263 -234
- package/dist-esm/basic/InlinePopupButton.js +99 -88
- package/dist-esm/basic/InlinePopupControl.js +24 -23
- package/dist-esm/basic/ItemPath.js +59 -60
- package/dist-esm/basic/LimitedText.js +49 -38
- package/dist-esm/basic/ListRepeater.js +13 -14
- package/dist-esm/basic/MaskedInput.js +37 -29
- package/dist-esm/basic/MaskedInputDiv.js +55 -48
- package/dist-esm/basic/MergeNode.js +64 -35
- package/dist-esm/basic/PasswordBox.js +32 -17
- package/dist-esm/basic/PinchZoomView.js +221 -199
- package/dist-esm/basic/PopupButton.js +39 -16
- package/dist-esm/basic/PopupMenu.js +3 -4
- package/dist-esm/basic/RadioButtonList.js +35 -25
- package/dist-esm/basic/RefreshLock.js +41 -42
- package/dist-esm/basic/Resizable.js +43 -33
- package/dist-esm/basic/Select.js +72 -65
- package/dist-esm/basic/SortByButton.js +41 -31
- package/dist-esm/basic/Swipe.js +91 -84
- package/dist-esm/basic/Switch.js +22 -8
- package/dist-esm/basic/TableRepeater.js +29 -33
- package/dist-esm/basic/TimeEditor.js +97 -52
- package/dist-esm/basic/TitleEditor.js +115 -95
- package/dist-esm/basic/ToggleButtonBar.js +21 -22
- package/dist-esm/basic/Tooltip.js +49 -47
- package/dist-esm/basic/TypeWriter.js +45 -42
- package/dist-esm/basic/UploadEvent.js +211 -178
- package/dist-esm/basic/ZoomView.js +229 -198
- package/dist-esm/basic/combineClasses.js +2 -3
- package/dist-esm/basic/elements/AtomPopover.js +270 -253
- package/dist-esm/basic/elements/getContainingBlock.js +34 -35
- package/dist-esm/basic/elements/relativeRect.js +40 -21
- package/dist-esm/desktop-app/DesktopApp.js +65 -80
- package/dist-esm/desktop-app/MobileDesktopApp.js +20 -23
- package/dist-esm/html-editor/AtomHtmlEditor.js +243 -268
- package/dist-esm/html-editor/HtmlEditorCommands.js +6 -4
- package/dist-esm/html-editor/InlineHtmlEditor.d.ts +1 -1
- package/dist-esm/html-editor/InlineHtmlEditor.d.ts.map +1 -1
- package/dist-esm/html-editor/InlineHtmlEditor.js +175 -167
- package/dist-esm/html-editor/InlineHtmlEditor.js.map +1 -1
- package/dist-esm/html-editor/RangeEditor.js +49 -51
- package/dist-esm/html-editor/commands/AddImage.js +40 -35
- package/dist-esm/html-editor/commands/AddLink.js +56 -54
- package/dist-esm/html-editor/commands/Align.js +24 -7
- package/dist-esm/html-editor/commands/AttachFile.js +23 -13
- package/dist-esm/html-editor/commands/AttachImage.js +35 -25
- package/dist-esm/html-editor/commands/Bold.js +10 -11
- package/dist-esm/html-editor/commands/ChangeColor.js +31 -107
- package/dist-esm/html-editor/commands/ChangeFont.js +42 -42
- package/dist-esm/html-editor/commands/ChangeFontSize.js +15 -5
- package/dist-esm/html-editor/commands/Command.js +34 -16
- package/dist-esm/html-editor/commands/CommandButton.js +51 -32
- package/dist-esm/html-editor/commands/Headings.js +25 -9
- package/dist-esm/html-editor/commands/HorizontalRule.js +9 -10
- package/dist-esm/html-editor/commands/HtmlCommands.js +160 -65
- package/dist-esm/html-editor/commands/IndentLess.js +10 -11
- package/dist-esm/html-editor/commands/IndentMore.js +10 -11
- package/dist-esm/html-editor/commands/Italic.js +10 -11
- package/dist-esm/html-editor/commands/NumberedList.js +10 -11
- package/dist-esm/html-editor/commands/Quote.js +10 -11
- package/dist-esm/html-editor/commands/RemoveFormat.js +10 -11
- package/dist-esm/html-editor/commands/Separator.js +5 -4
- package/dist-esm/html-editor/commands/Source.js +29 -25
- package/dist-esm/html-editor/commands/StrikeThrough.js +10 -11
- package/dist-esm/html-editor/commands/Toolbar.js +6 -4
- package/dist-esm/html-editor/commands/Underline.js +10 -11
- package/dist-esm/html-editor/commands/Unlink.js +10 -9
- package/dist-esm/html-editor/commands/UnorderedList.js +10 -11
- package/dist-esm/mobile-app/BottomPopup.js +137 -148
- package/dist-esm/mobile-app/MasterDetailPage.js +153 -152
- package/dist-esm/mobile-app/MobileApp.js +577 -569
- package/dist-esm/player/AtomVideoPlayer.js +316 -270
- package/dist-esm/player/TrackProgress.js +11 -7
- package/dist-esm/player/input-range-style.js +97 -98
- package/dist-esm/tests/app-test/AppTestApp.js +12 -15
- package/dist-esm/tests/app-test/AppTestApp.pack.js +54 -0
- package/dist-esm/tests/app-test/commands/AppCommands.js +14 -11
- package/dist-esm/tests/app-test/drawer/AppDrawer.js +4 -6
- package/dist-esm/tests/app-test/model/model.js +1 -2
- package/dist-esm/tests/app-test/pages/detail/DetailPage.js +21 -15
- package/dist-esm/tests/app-test/pages/home/HomePage.js +7 -8
- package/dist-esm/tests/app-test/pages/list/ListPage.js +79 -62
- package/dist-esm/tests/basic/PopupTest.js +9 -7
- package/dist-esm/tests/basic/TimeEditorTest.js +5 -9
- package/dist-esm/tests/basic/TimeEditorTest.pack.js +39 -0
- package/dist-esm/tests/basic/TimerTest.js +27 -37
- package/dist-esm/tests/basic/TimerTest.pack.js +40 -0
- package/dist-esm/tests/basic/basic-form/BasicForm.js +47 -27
- package/dist-esm/tests/basic/basic-form/BasicForm.pack.js +44 -0
- package/dist-esm/tests/basic/calendar/BasicCalendarTest.js +5 -9
- package/dist-esm/tests/basic/calendar/BasicCalendarTest.pack.js +53 -0
- package/dist-esm/tests/basic/chips/ChipsTest.js +25 -15
- package/dist-esm/tests/basic/chips/ChipsTest.pack.js +56 -0
- package/dist-esm/tests/basic/data-grid/DataGridTest.js +55 -60
- package/dist-esm/tests/basic/data-grid/DataGridTest.pack.js +58 -0
- package/dist-esm/tests/basic/date/DateFieldTest.js +21 -96
- package/dist-esm/tests/basic/date/DateFieldTest.pack.js +57 -0
- package/dist-esm/tests/basic/drop-down/DropDownTest.js +25 -19
- package/dist-esm/tests/basic/drop-down/DropDownTest.pack.js +52 -0
- package/dist-esm/tests/basic/drop-down-input/DropDownTest.js +32 -32
- package/dist-esm/tests/basic/drop-down-input/DropDownTest.pack.js +54 -0
- package/dist-esm/tests/basic/expander/ExpanderMenuTest.js +20 -14
- package/dist-esm/tests/basic/expander/ExpanderMenuTest.pack.js +38 -0
- package/dist-esm/tests/basic/expander/ExpanderTest.js +11 -12
- package/dist-esm/tests/basic/expander/ExpanderTest.pack.js +38 -0
- package/dist-esm/tests/basic/form2/Form2Test.js +26 -24
- package/dist-esm/tests/basic/form2/Form2Test.pack.js +46 -0
- package/dist-esm/tests/basic/limited-text/LimitedTextTest.js +14 -11
- package/dist-esm/tests/basic/limited-text/LimitedTextTest.pack.js +38 -0
- package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.js +14 -14
- package/dist-esm/tests/basic/pinch-zoom/PinchZoomViewTest.pack.js +38 -0
- package/dist-esm/tests/basic/repeater/DragDropRepater.js +30 -12
- package/dist-esm/tests/basic/repeater/DragDropRepater.pack.js +51 -0
- package/dist-esm/tests/basic/repeater/RepeaterTest.js +45 -35
- package/dist-esm/tests/basic/repeater/RepeaterTest.pack.js +52 -0
- package/dist-esm/tests/basic/swipe/SwipeTest.js +13 -13
- package/dist-esm/tests/basic/swipe/SwipeTest.pack.js +52 -0
- package/dist-esm/tests/basic/switch-test/SwitchTest.js +8 -10
- package/dist-esm/tests/basic/switch-test/SwitchTest.pack.js +38 -0
- package/dist-esm/tests/basic/title-editor/TitleEditorTest.js +8 -9
- package/dist-esm/tests/basic/title-editor/TitleEditorTest.pack.js +38 -0
- package/dist-esm/tests/basic/tooltip/TooltipTest.js +30 -24
- package/dist-esm/tests/basic/tooltip/TooltipTest.pack.js +52 -0
- package/dist-esm/tests/basic/typewriter/TypeWriter.js +10 -9
- package/dist-esm/tests/basic/typewriter/TypeWriter.pack.js +39 -0
- package/dist-esm/tests/basic/video/AtomVideoTest.js +13 -10
- package/dist-esm/tests/basic/video/AtomVideoTest.pack.js +38 -0
- package/dist-esm/tests/basic/zoom/ZoomViewTest.js +13 -13
- package/dist-esm/tests/basic/zoom/ZoomViewTest.pack.js +38 -0
- package/dist-esm/tests/check-box-list/CheckBoxListSample.js +13 -12
- package/dist-esm/tests/check-box-list/CheckBoxListSample.pack.js +52 -0
- package/dist-esm/tests/data-grid/GridTestViewModel.js +203 -227
- package/dist-esm/tests/form/CustomHelp.js +6 -9
- package/dist-esm/tests/form/FormViewModel.js +21 -28
- package/dist-esm/tests/html-editor/HtmlEditorTest.js +7 -37
- package/dist-esm/tests/html-editor/HtmlEditorTest.pack.js +83 -0
- package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.js +9 -38
- package/dist-esm/tests/html-editor/InlineHtmlEdiorTest.pack.js +85 -0
- package/dist-esm/tests/mask/MaskedInputTest.js +11 -12
- package/dist-esm/tests/mask/MaskedInputTest.pack.js +38 -0
- package/dist-esm/tests/mobile-app/DesktopAppTest.js +8 -9
- package/dist-esm/tests/mobile-app/DesktopAppTest.pack.js +60 -0
- package/dist-esm/tests/mobile-app/MobileAppTest.js +64 -53
- package/dist-esm/tests/mobile-app/MobileAppTest.pack.js +55 -0
- package/dist-esm/tests/pop-over/PopOverTest.js +37 -77
- package/dist-esm/tests/switch/SwitchTest.js +9 -8
- package/dist-esm/tests/toggle-view/ToggleViewTest.js +15 -22
- package/dist-esm/tests/toggle-view/ToggleViewTest.pack.js +45 -0
- package/dist-esm/toggle-view/AtomToggleView.js +77 -73
- package/dist-esm/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/html-editor/InlineHtmlEditor.tsx +1 -1
|
@@ -1,39 +1,58 @@
|
|
|
1
1
|
import Bind from "@web-atoms/core/dist/core/Bind.js";
|
|
2
2
|
import XNode from "@web-atoms/core/dist/core/XNode.js";
|
|
3
3
|
export function notSet(text) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
return () => {
|
|
5
|
+
alert(`Command ${text} not set`);
|
|
6
|
+
};
|
|
7
7
|
}
|
|
8
8
|
function insert(callback, command) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
export default function CommandButton({ icon, label, eventInsertHtml, insertCommand, title, disabled }) {
|
|
27
|
-
disabled ??= Bind.oneWay((x) => x.version
|
|
28
|
-
? !insertCommand.canExecute(x)
|
|
29
|
-
: false);
|
|
30
|
-
if (label) {
|
|
31
|
-
return XNode.create("button", { class: "command", "data-layout": "toolbar-button", disabled: disabled, eventClick: Bind.event(insert(eventInsertHtml, insertCommand)), title: title },
|
|
32
|
-
XNode.create("label", { class: "label" },
|
|
33
|
-
XNode.create("i", { class: icon }),
|
|
34
|
-
XNode.create("span", { text: label })));
|
|
9
|
+
return async (s, e) => {
|
|
10
|
+
let r = callback(s, e);
|
|
11
|
+
if (typeof r !== "string") {
|
|
12
|
+
if (r?.then) {
|
|
13
|
+
r = await r;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
if (r) {
|
|
17
|
+
if (command) {
|
|
18
|
+
command.execute(s, false, r);
|
|
19
|
+
} else {
|
|
20
|
+
s.executeCommand("insertHTML", false, r);
|
|
21
|
+
}
|
|
35
22
|
}
|
|
36
|
-
|
|
37
|
-
XNode.create("i", { class: icon }));
|
|
23
|
+
};
|
|
38
24
|
}
|
|
39
|
-
|
|
25
|
+
export default function CommandButton({
|
|
26
|
+
icon,
|
|
27
|
+
label,
|
|
28
|
+
eventInsertHtml,
|
|
29
|
+
insertCommand,
|
|
30
|
+
title,
|
|
31
|
+
disabled
|
|
32
|
+
}) {
|
|
33
|
+
disabled ??= Bind.oneWay(x => x.version ? !insertCommand.canExecute(x) : false);
|
|
34
|
+
if (label) {
|
|
35
|
+
return XNode.create("button", {
|
|
36
|
+
class: "command",
|
|
37
|
+
"data-layout": "toolbar-button",
|
|
38
|
+
disabled: disabled,
|
|
39
|
+
eventClick: Bind.event(insert(eventInsertHtml, insertCommand)),
|
|
40
|
+
title: title
|
|
41
|
+
}, XNode.create("label", {
|
|
42
|
+
class: "label"
|
|
43
|
+
}, XNode.create("i", {
|
|
44
|
+
class: icon
|
|
45
|
+
}), XNode.create("span", {
|
|
46
|
+
text: label
|
|
47
|
+
})));
|
|
48
|
+
}
|
|
49
|
+
return XNode.create("button", {
|
|
50
|
+
"data-layout": "toolbar-button",
|
|
51
|
+
title: title,
|
|
52
|
+
class: "command",
|
|
53
|
+
disabled: disabled,
|
|
54
|
+
eventClick: Bind.event(insert(eventInsertHtml, insertCommand))
|
|
55
|
+
}, XNode.create("i", {
|
|
56
|
+
class: icon
|
|
57
|
+
}));
|
|
58
|
+
}
|
|
@@ -2,12 +2,28 @@ import Bind from "@web-atoms/core/dist/core/Bind.js";
|
|
|
2
2
|
import XNode from "@web-atoms/core/dist/core/XNode.js";
|
|
3
3
|
import PopupButton, { MenuItem } from "../../basic/PopupButton.js";
|
|
4
4
|
export default function Headings() {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
return XNode.create(PopupButton, {
|
|
6
|
+
"data-layout": "toolbar-button",
|
|
7
|
+
class: "command",
|
|
8
|
+
icon: "ri-heading",
|
|
9
|
+
title: "Apply Heading"
|
|
10
|
+
}, XNode.create(MenuItem, {
|
|
11
|
+
icon: "ri-h-1",
|
|
12
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H1"))
|
|
13
|
+
}), XNode.create(MenuItem, {
|
|
14
|
+
icon: "ri-h-2",
|
|
15
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H2"))
|
|
16
|
+
}), XNode.create(MenuItem, {
|
|
17
|
+
icon: "ri-h-3",
|
|
18
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H3"))
|
|
19
|
+
}), XNode.create(MenuItem, {
|
|
20
|
+
icon: "ri-h-4",
|
|
21
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H4"))
|
|
22
|
+
}), XNode.create(MenuItem, {
|
|
23
|
+
icon: "ri-h-5",
|
|
24
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H5"))
|
|
25
|
+
}), XNode.create(MenuItem, {
|
|
26
|
+
icon: "ri-h-6",
|
|
27
|
+
eventClick: Bind.event(e => e.executeCommand("formatBlock", false, "H6"))
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function HorizontalRule(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=HorizontalRule.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-separator",
|
|
5
|
+
title: "Insert Horizontal Line",
|
|
6
|
+
...cmd,
|
|
7
|
+
command(editor) {
|
|
8
|
+
editor.executeCommand("insertHorizontalRule");
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
}
|
|
@@ -1,68 +1,163 @@
|
|
|
1
1
|
function query(name) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
return {
|
|
3
|
+
canExecute(e) {
|
|
4
|
+
return e.queryCommandState(name);
|
|
5
|
+
},
|
|
6
|
+
execute(e, showUI, value) {
|
|
7
|
+
return e.executeCommand(name, showUI, value);
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
10
|
}
|
|
11
11
|
export default class HtmlCommands {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
12
|
+
static {
|
|
13
|
+
this.backColor = query("backColor");
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.bold = query("bold");
|
|
17
|
+
}
|
|
18
|
+
static {
|
|
19
|
+
this.contentReadOnly = query("contentReadOnly");
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.copy = query("copy");
|
|
23
|
+
}
|
|
24
|
+
static {
|
|
25
|
+
this.createLink = query("createLink");
|
|
26
|
+
}
|
|
27
|
+
static {
|
|
28
|
+
this.cut = query("cut");
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.decreaseFontSize = query("decreaseFontSize");
|
|
32
|
+
}
|
|
33
|
+
static {
|
|
34
|
+
this.defaultParagraphSeparator = query("defaultParagraphSeparator");
|
|
35
|
+
}
|
|
36
|
+
static {
|
|
37
|
+
this.enableAbsolutePositionEditor = query("enableAbsolutePositionEditor");
|
|
38
|
+
}
|
|
39
|
+
static {
|
|
40
|
+
this.enableInlineTableEditing = query("enableInlineTableEditing");
|
|
41
|
+
}
|
|
42
|
+
static {
|
|
43
|
+
this.enableObjectResizing = query("enableObjectResizing");
|
|
44
|
+
}
|
|
45
|
+
static {
|
|
46
|
+
this.fontName = query("fontName");
|
|
47
|
+
}
|
|
48
|
+
static {
|
|
49
|
+
this.fontSize = query("fontSize");
|
|
50
|
+
}
|
|
51
|
+
static {
|
|
52
|
+
this.foreColor = query("foreColor");
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.formatBlock = query("formatBlock");
|
|
56
|
+
}
|
|
57
|
+
static {
|
|
58
|
+
this.forwardDelete = query("forwardDelete");
|
|
59
|
+
}
|
|
60
|
+
static {
|
|
61
|
+
this.heading = query("heading");
|
|
62
|
+
}
|
|
63
|
+
static {
|
|
64
|
+
this.hiliteColor = query("hiliteColor");
|
|
65
|
+
}
|
|
66
|
+
static {
|
|
67
|
+
this.increaseFontSize = query("increaseFontSize");
|
|
68
|
+
}
|
|
69
|
+
static {
|
|
70
|
+
this.indent = query("indent");
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
this.insertBrOnReturn = query("insertBrOnReturn");
|
|
74
|
+
}
|
|
75
|
+
static {
|
|
76
|
+
this.insertHorizontalRule = query("insertHorizontalRule");
|
|
77
|
+
}
|
|
78
|
+
static {
|
|
79
|
+
this.insertHTML = query("insertHTML");
|
|
80
|
+
}
|
|
81
|
+
static {
|
|
82
|
+
this.insertImage = query("insertImage");
|
|
83
|
+
}
|
|
84
|
+
static {
|
|
85
|
+
this.insertOrderedList = query("insertOrderedList");
|
|
86
|
+
}
|
|
87
|
+
static {
|
|
88
|
+
this.insertUnorderedList = query("insertUnorderedList");
|
|
89
|
+
}
|
|
90
|
+
static {
|
|
91
|
+
this.insertParagraph = query("insertParagraph");
|
|
92
|
+
}
|
|
93
|
+
static {
|
|
94
|
+
this.insertText = query("insertText");
|
|
95
|
+
}
|
|
96
|
+
static {
|
|
97
|
+
this.italic = query("italic");
|
|
98
|
+
}
|
|
99
|
+
static {
|
|
100
|
+
this.justifyCenter = query("justifyCenter");
|
|
101
|
+
}
|
|
102
|
+
static {
|
|
103
|
+
this.justifyFull = query("justifyFull");
|
|
104
|
+
}
|
|
105
|
+
static {
|
|
106
|
+
this.justifyLeft = query("justifyLeft");
|
|
107
|
+
}
|
|
108
|
+
static {
|
|
109
|
+
this.justifyRight = query("justifyRight");
|
|
110
|
+
}
|
|
111
|
+
static {
|
|
112
|
+
this.outdent = query("outdent");
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.paste = query("paste");
|
|
116
|
+
}
|
|
117
|
+
static {
|
|
118
|
+
this.redo = query("redo");
|
|
119
|
+
}
|
|
120
|
+
static {
|
|
121
|
+
this.removeFormat = query("removeFormat");
|
|
122
|
+
}
|
|
123
|
+
static {
|
|
124
|
+
this.selectAll = query("selectAll");
|
|
125
|
+
}
|
|
126
|
+
static {
|
|
127
|
+
this.strikeThrough = query("strikeThrough");
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
this.subscript = query("subscript");
|
|
131
|
+
}
|
|
132
|
+
static {
|
|
133
|
+
this.superscript = query("superscript");
|
|
134
|
+
}
|
|
135
|
+
static {
|
|
136
|
+
this.underline = query("underline");
|
|
137
|
+
}
|
|
138
|
+
static {
|
|
139
|
+
this.undo = query("undo");
|
|
140
|
+
}
|
|
141
|
+
static {
|
|
142
|
+
this.unlink = query("unlink");
|
|
143
|
+
}
|
|
144
|
+
static {
|
|
145
|
+
this.useCSS = query("useCSS");
|
|
146
|
+
}
|
|
147
|
+
static {
|
|
148
|
+
this.styleWithCSS = query("styleWithCSS");
|
|
149
|
+
}
|
|
150
|
+
static {
|
|
151
|
+
this.AutoUrlDetect = query("AutoUrlDetect");
|
|
152
|
+
}
|
|
153
|
+
static {
|
|
154
|
+
this.enabled = {
|
|
155
|
+
canExecute(e) {
|
|
156
|
+
return true;
|
|
157
|
+
},
|
|
158
|
+
execute() {
|
|
159
|
+
throw new Error("not supported");
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function IndentLess(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=IndentLess.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-indent-decrease",
|
|
5
|
+
queryState: "outdent",
|
|
6
|
+
title: "Indent Less",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("outdent");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function IndentMore(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=IndentMore.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-indent-increase",
|
|
5
|
+
queryState: "indent",
|
|
6
|
+
title: "Indent More",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("indent");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function Italic(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=Italic.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-italic",
|
|
5
|
+
queryState: "italic",
|
|
6
|
+
title: "Italic",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("italic");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function NumberedList(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=NumberedList.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-list-ordered",
|
|
5
|
+
queryState: "insertOrderedList",
|
|
6
|
+
title: "Create Numbered List",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("insertOrderedList");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function IndentMore(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=Quote.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-double-quotes",
|
|
5
|
+
queryState: "formatBlock",
|
|
6
|
+
title: "Insert Quote",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("formatBlock");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function RemoveFormat(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=RemoveFormat.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-format-clear",
|
|
5
|
+
queryState: "removeFormat",
|
|
6
|
+
title: "Clear Formatting",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("removeFormat");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import XNode from "@web-atoms/core/dist/core/XNode.js";
|
|
2
|
-
import
|
|
2
|
+
ESMPack.installStyleSheet(import.meta.resolve("./Separator.global.css"));
|
|
3
3
|
export default function Separator() {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
return XNode.create("div", {
|
|
5
|
+
"data-toolbar-item": "separator"
|
|
6
|
+
});
|
|
7
|
+
}
|
|
@@ -5,32 +5,36 @@ import XNode from "@web-atoms/core/dist/core/XNode.js";
|
|
|
5
5
|
import PopupService, { PopupWindow } from "@web-atoms/core/dist/web/services/PopupService.js";
|
|
6
6
|
import CommandButton from "./CommandButton.js";
|
|
7
7
|
import HtmlCommands from "./HtmlCommands.js";
|
|
8
|
-
import
|
|
8
|
+
ESMPack.installStyleSheet(import.meta.resolve("./Source.local.css"));
|
|
9
9
|
const css = "web-controls-html-editor-source";
|
|
10
10
|
async function showDialog(s, e) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
11
|
+
class SourceDialog extends PopupWindow {
|
|
12
|
+
create() {
|
|
13
|
+
this.source = s.htmlContent;
|
|
14
|
+
this.render(XNode.create("div", {
|
|
15
|
+
class: css
|
|
16
|
+
}, XNode.create("textarea", {
|
|
17
|
+
value: Bind.twoWaysImmediate(() => this.source)
|
|
18
|
+
}), XNode.create("div", {
|
|
19
|
+
class: "command-bar"
|
|
20
|
+
}, XNode.create("button", {
|
|
21
|
+
eventClick: Bind.event(() => this.close(this.source)),
|
|
22
|
+
text: "Save"
|
|
23
|
+
}))));
|
|
19
24
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
s.htmlContent = result;
|
|
26
|
-
return null;
|
|
25
|
+
}
|
|
26
|
+
__decorate([BindableProperty, __metadata("design:type", String)], SourceDialog.prototype, "source", void 0);
|
|
27
|
+
const result = await PopupService.showWindow(s.element, SourceDialog);
|
|
28
|
+
s.htmlContent = result;
|
|
29
|
+
return null;
|
|
27
30
|
}
|
|
28
|
-
export default function Source({
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
export default function Source({
|
|
32
|
+
insertCommand = HtmlCommands.enabled
|
|
33
|
+
}) {
|
|
34
|
+
return CommandButton({
|
|
35
|
+
icon: "ri-edit-box-fill",
|
|
36
|
+
insertCommand,
|
|
37
|
+
eventInsertHtml: showDialog,
|
|
38
|
+
title: "Edit Source Code"
|
|
39
|
+
});
|
|
40
|
+
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import Command from "./Command.js";
|
|
2
2
|
export default function StrikeThrough(cmd) {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=StrikeThrough.js.map
|
|
3
|
+
return Command({
|
|
4
|
+
icon: "ri-strikethrough",
|
|
5
|
+
queryState: "strikeThrough",
|
|
6
|
+
title: "Strike Through",
|
|
7
|
+
...cmd,
|
|
8
|
+
command(editor) {
|
|
9
|
+
editor.executeCommand("strikeThrough");
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import XNode from "@web-atoms/core/dist/core/XNode.js";
|
|
2
|
-
import
|
|
2
|
+
ESMPack.installStyleSheet(import.meta.resolve("../../styles/html-editor-toolbar.global.css"));
|
|
3
3
|
export default function Toolbar(a, ...nodes) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
return XNode.create("div", {
|
|
5
|
+
"data-html-editor-element": "toolbar",
|
|
6
|
+
...a
|
|
7
|
+
}, ...nodes);
|
|
8
|
+
}
|