@web-atoms/web-controls 2.1.7 → 2.1.11

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.
Files changed (122) hide show
  1. package/dist/basic/PopupButton.d.ts +8 -7
  2. package/dist/basic/PopupButton.d.ts.map +1 -1
  3. package/dist/basic/PopupButton.js +41 -78
  4. package/dist/basic/PopupButton.js.map +1 -1
  5. package/dist/html-editor/HtmlEditor.d.ts +23 -0
  6. package/dist/html-editor/HtmlEditor.d.ts.map +1 -0
  7. package/dist/html-editor/HtmlEditor.js +206 -0
  8. package/dist/html-editor/HtmlEditor.js.map +1 -0
  9. package/dist/html-editor/commands/AddImage.d.ts +5 -0
  10. package/dist/html-editor/commands/AddImage.d.ts.map +1 -0
  11. package/dist/html-editor/commands/AddImage.js +23 -0
  12. package/dist/html-editor/commands/AddImage.js.map +1 -0
  13. package/dist/html-editor/commands/AddLink.d.ts +5 -0
  14. package/dist/html-editor/commands/AddLink.d.ts.map +1 -0
  15. package/dist/html-editor/commands/AddLink.js +23 -0
  16. package/dist/html-editor/commands/AddLink.js.map +1 -0
  17. package/dist/html-editor/commands/Align.d.ts +2 -0
  18. package/dist/html-editor/commands/Align.d.ts.map +1 -0
  19. package/dist/html-editor/commands/Align.js +24 -0
  20. package/dist/html-editor/commands/Align.js.map +1 -0
  21. package/dist/html-editor/commands/Bold.d.ts +3 -0
  22. package/dist/html-editor/commands/Bold.d.ts.map +1 -0
  23. package/dist/html-editor/commands/Bold.js +20 -0
  24. package/dist/html-editor/commands/Bold.js.map +1 -0
  25. package/dist/html-editor/commands/ChangeColor.d.ts +2 -0
  26. package/dist/html-editor/commands/ChangeColor.d.ts.map +1 -0
  27. package/dist/html-editor/commands/ChangeColor.js +146 -0
  28. package/dist/html-editor/commands/ChangeColor.js.map +1 -0
  29. package/dist/html-editor/commands/ChangeFont.d.ts +6 -0
  30. package/dist/html-editor/commands/ChangeFont.d.ts.map +1 -0
  31. package/dist/html-editor/commands/ChangeFont.js +72 -0
  32. package/dist/html-editor/commands/ChangeFont.js.map +1 -0
  33. package/dist/html-editor/commands/ChangeFontSize.d.ts +3 -0
  34. package/dist/html-editor/commands/ChangeFontSize.d.ts.map +1 -0
  35. package/dist/html-editor/commands/ChangeFontSize.js +22 -0
  36. package/dist/html-editor/commands/ChangeFontSize.js.map +1 -0
  37. package/dist/html-editor/commands/Command.d.ts +12 -0
  38. package/dist/html-editor/commands/Command.d.ts.map +1 -0
  39. package/dist/html-editor/commands/Command.js +43 -0
  40. package/dist/html-editor/commands/Command.js.map +1 -0
  41. package/dist/html-editor/commands/CommandButton.d.ts +19 -0
  42. package/dist/html-editor/commands/CommandButton.d.ts.map +1 -0
  43. package/dist/html-editor/commands/CommandButton.js +53 -0
  44. package/dist/html-editor/commands/CommandButton.js.map +1 -0
  45. package/dist/html-editor/commands/Headings.d.ts +2 -0
  46. package/dist/html-editor/commands/Headings.d.ts.map +1 -0
  47. package/dist/html-editor/commands/Headings.js +26 -0
  48. package/dist/html-editor/commands/Headings.js.map +1 -0
  49. package/dist/html-editor/commands/HorizontalRule.d.ts +3 -0
  50. package/dist/html-editor/commands/HorizontalRule.d.ts.map +1 -0
  51. package/dist/html-editor/commands/HorizontalRule.js +20 -0
  52. package/dist/html-editor/commands/HorizontalRule.js.map +1 -0
  53. package/dist/html-editor/commands/IndentLess.d.ts +2 -0
  54. package/dist/html-editor/commands/IndentLess.d.ts.map +1 -0
  55. package/dist/html-editor/commands/IndentLess.js +20 -0
  56. package/dist/html-editor/commands/IndentLess.js.map +1 -0
  57. package/dist/html-editor/commands/IndentMore.d.ts +2 -0
  58. package/dist/html-editor/commands/IndentMore.d.ts.map +1 -0
  59. package/dist/html-editor/commands/IndentMore.js +20 -0
  60. package/dist/html-editor/commands/IndentMore.js.map +1 -0
  61. package/dist/html-editor/commands/Italic.d.ts +3 -0
  62. package/dist/html-editor/commands/Italic.d.ts.map +1 -0
  63. package/dist/html-editor/commands/Italic.js +20 -0
  64. package/dist/html-editor/commands/Italic.js.map +1 -0
  65. package/dist/html-editor/commands/NumberedList.d.ts +2 -0
  66. package/dist/html-editor/commands/NumberedList.d.ts.map +1 -0
  67. package/dist/html-editor/commands/NumberedList.js +20 -0
  68. package/dist/html-editor/commands/NumberedList.js.map +1 -0
  69. package/dist/html-editor/commands/Quote.d.ts +2 -0
  70. package/dist/html-editor/commands/Quote.d.ts.map +1 -0
  71. package/dist/html-editor/commands/Quote.js +20 -0
  72. package/dist/html-editor/commands/Quote.js.map +1 -0
  73. package/dist/html-editor/commands/RemoveFormat.d.ts +2 -0
  74. package/dist/html-editor/commands/RemoveFormat.d.ts.map +1 -0
  75. package/dist/html-editor/commands/RemoveFormat.js +20 -0
  76. package/dist/html-editor/commands/RemoveFormat.js.map +1 -0
  77. package/dist/html-editor/commands/Separator.d.ts +2 -0
  78. package/dist/html-editor/commands/Separator.d.ts.map +1 -0
  79. package/dist/html-editor/commands/Separator.js +29 -0
  80. package/dist/html-editor/commands/Separator.js.map +1 -0
  81. package/dist/html-editor/commands/StrikeThrough.d.ts +3 -0
  82. package/dist/html-editor/commands/StrikeThrough.d.ts.map +1 -0
  83. package/dist/html-editor/commands/StrikeThrough.js +20 -0
  84. package/dist/html-editor/commands/StrikeThrough.js.map +1 -0
  85. package/dist/html-editor/commands/Underline.d.ts +3 -0
  86. package/dist/html-editor/commands/Underline.d.ts.map +1 -0
  87. package/dist/html-editor/commands/Underline.js +20 -0
  88. package/dist/html-editor/commands/Underline.js.map +1 -0
  89. package/dist/html-editor/commands/Unlink.d.ts +2 -0
  90. package/dist/html-editor/commands/Unlink.d.ts.map +1 -0
  91. package/dist/html-editor/commands/Unlink.js +20 -0
  92. package/dist/html-editor/commands/Unlink.js.map +1 -0
  93. package/dist/html-editor/commands/UnorderedList.d.ts +2 -0
  94. package/dist/html-editor/commands/UnorderedList.d.ts.map +1 -0
  95. package/dist/html-editor/commands/UnorderedList.js +20 -0
  96. package/dist/html-editor/commands/UnorderedList.js.map +1 -0
  97. package/dist/tsconfig.tsbuildinfo +1 -0
  98. package/package.json +2 -2
  99. package/src/basic/PopupButton.tsx +67 -89
  100. package/src/html-editor/HtmlEditor.tsx +206 -0
  101. package/src/html-editor/commands/AddImage.tsx +13 -0
  102. package/src/html-editor/commands/AddLink.tsx +13 -0
  103. package/src/html-editor/commands/Align.tsx +32 -0
  104. package/src/html-editor/commands/Bold.ts +13 -0
  105. package/src/html-editor/commands/ChangeColor.tsx +178 -0
  106. package/src/html-editor/commands/ChangeFont.tsx +75 -0
  107. package/src/html-editor/commands/ChangeFontSize.tsx +18 -0
  108. package/src/html-editor/commands/Command.tsx +44 -0
  109. package/src/html-editor/commands/CommandButton.tsx +66 -0
  110. package/src/html-editor/commands/Headings.tsx +24 -0
  111. package/src/html-editor/commands/HorizontalRule.tsx +12 -0
  112. package/src/html-editor/commands/IndentLess.tsx +13 -0
  113. package/src/html-editor/commands/IndentMore.tsx +13 -0
  114. package/src/html-editor/commands/Italic.ts +13 -0
  115. package/src/html-editor/commands/NumberedList.tsx +13 -0
  116. package/src/html-editor/commands/Quote.tsx +13 -0
  117. package/src/html-editor/commands/RemoveFormat.tsx +13 -0
  118. package/src/html-editor/commands/Separator.tsx +18 -0
  119. package/src/html-editor/commands/StrikeThrough.ts +13 -0
  120. package/src/html-editor/commands/Underline.ts +13 -0
  121. package/src/html-editor/commands/Unlink.tsx +13 -0
  122. package/src/html-editor/commands/UnorderedList.tsx +13 -0
@@ -0,0 +1,12 @@
1
+ import Command, { ICommand } from "./Command";
2
+
3
+ export default function HorizontalRule(cmd: ICommand) {
4
+ return Command({
5
+ icon: "ri-separator",
6
+ title: "Insert Horizontal Line",
7
+ ... cmd,
8
+ command(editor) {
9
+ editor.executeCommand("insertHorizontalRule");
10
+ }
11
+ });
12
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function IndentLess(cmd: any) {
4
+ return Command({
5
+ icon: "ri-indent-decrease",
6
+ queryState: "outdent",
7
+ title: "Indent Less",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("outdent");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function IndentMore(cmd: any) {
4
+ return Command({
5
+ icon: "ri-indent-increase",
6
+ queryState: "indent",
7
+ title: "Indent More",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("indent");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command, { ICommand } from "./Command";
2
+
3
+ export default function Italic(cmd: ICommand) {
4
+ return Command({
5
+ icon: "ri-italic",
6
+ queryState: "italic",
7
+ title: "Italic",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("italic");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function NumberedList(cmd: any) {
4
+ return Command({
5
+ icon: "ri-list-ordered",
6
+ queryState: "insertOrderedList",
7
+ title: "Create Numbered List",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("insertOrderedList");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function IndentMore(cmd: any) {
4
+ return Command({
5
+ icon: "ri-double-quotes",
6
+ queryState: "formatBlock",
7
+ title: "Insert Quote",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("formatBlock");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function RemoveFormat(cmd: any) {
4
+ return Command({
5
+ icon: "ri-format-clear",
6
+ queryState: "removeFormat",
7
+ title: "Clear Formatting",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("removeFormat");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,18 @@
1
+ import Colors from "@web-atoms/core/dist/core/Colors";
2
+ import XNode from "@web-atoms/core/dist/core/XNode";
3
+ import StyleRule from "@web-atoms/core/dist/style/StyleRule";
4
+ import CSS from "@web-atoms/core/dist/web/styles/CSS";
5
+
6
+ const separatorCss = CSS(StyleRule()
7
+ .backgroundColor(Colors.darkGray)
8
+ .marginLeft(4)
9
+ .marginRight(4)
10
+ .display("inline-block")
11
+ .marginTop(4)
12
+ .height(20)
13
+ .width(2)
14
+ );
15
+
16
+ export default function Separator() {
17
+ return <div class={separatorCss}></div>;
18
+ }
@@ -0,0 +1,13 @@
1
+ import Command, { ICommand } from "./Command";
2
+
3
+ export default function StrikeThrough(cmd: ICommand) {
4
+ return Command({
5
+ icon: "ri-strikethrough",
6
+ queryState: "strikeThrough",
7
+ title: "Strike Through",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("strikeThrough");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command, { ICommand } from "./Command";
2
+
3
+ export default function Underline(cmd: ICommand) {
4
+ return Command({
5
+ icon: "ri-underline",
6
+ queryState: "underline",
7
+ title: "Underline",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("underline");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function Unlink(cmd: any) {
4
+ return Command({
5
+ icon: "ri-link-unlink-m",
6
+ queryState: "unlink",
7
+ title: "Remove Link",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("unlink");
11
+ }
12
+ });
13
+ }
@@ -0,0 +1,13 @@
1
+ import Command from "./Command";
2
+
3
+ export default function UnorderedList(cmd: any) {
4
+ return Command({
5
+ icon: "ri-list-unordered",
6
+ queryState: "insertUnorderedList",
7
+ title: "Create List",
8
+ ... cmd,
9
+ command(editor) {
10
+ editor.executeCommand("insertUnorderedList");
11
+ }
12
+ });
13
+ }