kempo-ui 0.4.20 → 0.4.21
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/CHANGELOG.md +18 -0
- package/dist/components/Chat.js +10 -10
- package/dist/components/CodeEditor.js +23 -24
- package/dist/components/ControlGroup.js +17 -0
- package/dist/components/HtmlEditor.js +105 -106
- package/dist/components/MarkdownEditor.js +49 -49
- package/dist/components/Pagination.js +11 -11
- package/dist/components/Table.js +1 -1
- package/dist/components/controls/AlignCenter.js +1 -0
- package/dist/components/controls/AlignJustify.js +1 -0
- package/dist/components/controls/AlignLeft.js +1 -0
- package/dist/components/controls/AlignRight.js +1 -0
- package/dist/components/controls/Bold.js +1 -0
- package/dist/components/controls/BulletList.js +1 -0
- package/dist/components/controls/ButtonControl.js +33 -0
- package/dist/components/controls/CharacterCount.js +4 -0
- package/dist/components/controls/ClearFormatting.js +1 -0
- package/dist/components/controls/CodeBlock.js +1 -0
- package/dist/components/controls/Control.js +12 -0
- package/dist/components/controls/CopyCode.js +1 -0
- package/dist/components/controls/CreateLink.js +1 -0
- package/dist/components/controls/EditorTheme.js +30 -0
- package/dist/components/controls/FindReplace.js +1 -0
- package/dist/components/controls/FoldAll.js +1 -0
- package/dist/components/controls/FontSize.js +8 -0
- package/dist/components/controls/FontSizeDecrease.js +1 -0
- package/dist/components/controls/FontSizeIncrease.js +1 -0
- package/dist/components/controls/FormatBlock.js +8 -0
- package/dist/components/controls/FormatCode.js +1 -0
- package/dist/components/controls/Fullscreen.js +1 -0
- package/dist/components/controls/InlineCode.js +1 -0
- package/dist/components/controls/InsertTable.js +1 -0
- package/dist/components/controls/Italic.js +1 -0
- package/dist/components/controls/Language.js +21 -0
- package/dist/components/controls/MdImage.js +23 -0
- package/dist/components/controls/MdLink.js +1 -0
- package/dist/components/controls/MdSpeechToText.js +10 -0
- package/dist/components/controls/MdTable.js +19 -0
- package/dist/components/controls/Menu.js +51 -0
- package/dist/components/controls/Minimap.js +1 -0
- package/dist/components/controls/Mode.js +1 -0
- package/dist/components/controls/NumberList.js +1 -0
- package/dist/components/controls/PgCount.js +1 -0
- package/dist/components/controls/PgFirst.js +1 -0
- package/dist/components/controls/PgGotoPage.js +15 -0
- package/dist/components/controls/PgItemsPerPage.js +12 -0
- package/dist/components/controls/PgLast.js +1 -0
- package/dist/components/controls/PgNext.js +1 -0
- package/dist/components/controls/PgPageInfo.js +3 -0
- package/dist/components/controls/PgPrev.js +1 -0
- package/dist/components/controls/Quote.js +1 -0
- package/dist/components/controls/Redo.js +1 -0
- package/dist/components/{htmlEditorControls/ControlSpacer.js → controls/Spacer.js} +5 -5
- package/dist/components/controls/Strikethrough.js +1 -0
- package/dist/components/controls/TcDeleteRecord.js +1 -0
- package/dist/components/controls/TcDeleteSelected.js +1 -0
- package/dist/components/controls/TcEdit.js +12 -0
- package/dist/components/controls/TcExportCsv.js +3 -0
- package/dist/components/controls/TcExportJson.js +3 -0
- package/dist/components/controls/TcFieldSortHide.js +21 -0
- package/dist/components/controls/TcFilters.js +34 -0
- package/dist/components/controls/TcFirstPage.js +1 -0
- package/dist/components/controls/TcHiddenCount.js +1 -0
- package/dist/components/controls/TcHide.js +1 -0
- package/dist/components/controls/TcLastPage.js +1 -0
- package/dist/components/controls/TcNextPage.js +1 -0
- package/dist/components/controls/TcPageSelect.js +9 -0
- package/dist/components/controls/TcPageSize.js +5 -0
- package/dist/components/controls/TcPrevPage.js +1 -0
- package/dist/components/controls/TcSearch.js +1 -0
- package/dist/components/controls/TcShowAll.js +1 -0
- package/dist/components/controls/TextBackgroundColor.js +26 -0
- package/dist/components/controls/TextColor.js +26 -0
- package/dist/components/controls/Underline.js +1 -0
- package/dist/components/controls/Undo.js +1 -0
- package/dist/components/controls/WordCount.js +4 -0
- package/dist/components/controls/WordWrap.js +1 -0
- package/docs/components/code-editor.html +69 -48
- package/docs/components/html-editor.html +70 -69
- package/docs/components/markdown-editor.html +59 -78
- package/docs/components/pagination.html +51 -51
- package/docs/components/tableControls.html +5 -5
- package/docs/components/tableCustomFields.html +3 -3
- package/docs/components/tableFetchRecords.html +13 -13
- package/docs/components/tableFieldSortHide.html +4 -4
- package/docs/components/tablePagination.html +13 -13
- package/docs/components/tablePlaceholder.html +3 -3
- package/docs/components/tableRecordEditing.html +4 -4
- package/docs/components/tableRecordFiltering.html +5 -5
- package/docs/components/tableRecordHiding.html +7 -7
- package/docs/components/tableRecordSearching.html +3 -3
- package/docs/components/tableRowControls.html +6 -6
- package/docs/components/tableServerSync.html +7 -7
- package/docs/src/components/Chat.js +10 -10
- package/docs/src/components/CodeEditor.js +23 -24
- package/docs/src/components/ControlGroup.js +17 -0
- package/docs/src/components/HtmlEditor.js +105 -106
- package/docs/src/components/MarkdownEditor.js +49 -49
- package/docs/src/components/Pagination.js +11 -11
- package/docs/src/components/Table.js +1 -1
- package/docs/src/components/controls/AlignCenter.js +1 -0
- package/docs/src/components/controls/AlignJustify.js +1 -0
- package/docs/src/components/controls/AlignLeft.js +1 -0
- package/docs/src/components/controls/AlignRight.js +1 -0
- package/docs/src/components/controls/Bold.js +1 -0
- package/docs/src/components/controls/BulletList.js +1 -0
- package/docs/src/components/controls/ButtonControl.js +33 -0
- package/docs/src/components/controls/CharacterCount.js +4 -0
- package/docs/src/components/controls/ClearFormatting.js +1 -0
- package/docs/src/components/controls/CodeBlock.js +1 -0
- package/docs/src/components/controls/Control.js +12 -0
- package/docs/src/components/controls/CopyCode.js +1 -0
- package/docs/src/components/controls/CreateLink.js +1 -0
- package/docs/src/components/controls/EditorTheme.js +30 -0
- package/docs/src/components/controls/FindReplace.js +1 -0
- package/docs/src/components/controls/FoldAll.js +1 -0
- package/docs/src/components/controls/FontSize.js +8 -0
- package/docs/src/components/controls/FontSizeDecrease.js +1 -0
- package/docs/src/components/controls/FontSizeIncrease.js +1 -0
- package/docs/src/components/controls/FormatBlock.js +8 -0
- package/docs/src/components/controls/FormatCode.js +1 -0
- package/docs/src/components/controls/Fullscreen.js +1 -0
- package/docs/src/components/controls/InlineCode.js +1 -0
- package/docs/src/components/controls/InsertTable.js +1 -0
- package/docs/src/components/controls/Italic.js +1 -0
- package/docs/src/components/controls/Language.js +21 -0
- package/docs/src/components/controls/MdImage.js +23 -0
- package/docs/src/components/controls/MdLink.js +1 -0
- package/docs/src/components/controls/MdSpeechToText.js +10 -0
- package/docs/src/components/controls/MdTable.js +19 -0
- package/docs/src/components/controls/Menu.js +51 -0
- package/docs/src/components/controls/Minimap.js +1 -0
- package/docs/src/components/controls/Mode.js +1 -0
- package/docs/src/components/controls/NumberList.js +1 -0
- package/docs/src/components/controls/PgCount.js +1 -0
- package/docs/src/components/controls/PgFirst.js +1 -0
- package/docs/src/components/controls/PgGotoPage.js +15 -0
- package/docs/src/components/controls/PgItemsPerPage.js +12 -0
- package/docs/src/components/controls/PgLast.js +1 -0
- package/docs/src/components/controls/PgNext.js +1 -0
- package/docs/src/components/controls/PgPageInfo.js +3 -0
- package/docs/src/components/controls/PgPrev.js +1 -0
- package/docs/src/components/controls/Quote.js +1 -0
- package/docs/src/components/controls/Redo.js +1 -0
- package/docs/src/components/{codeEditorControls/ControlSpacer.js → controls/Spacer.js} +5 -5
- package/docs/src/components/controls/Strikethrough.js +1 -0
- package/docs/src/components/controls/TcDeleteRecord.js +1 -0
- package/docs/src/components/controls/TcDeleteSelected.js +1 -0
- package/docs/src/components/controls/TcEdit.js +12 -0
- package/docs/src/components/controls/TcExportCsv.js +3 -0
- package/docs/src/components/controls/TcExportJson.js +3 -0
- package/docs/src/components/controls/TcFieldSortHide.js +21 -0
- package/docs/src/components/controls/TcFilters.js +34 -0
- package/docs/src/components/controls/TcFirstPage.js +1 -0
- package/docs/src/components/controls/TcHiddenCount.js +1 -0
- package/docs/src/components/controls/TcHide.js +1 -0
- package/docs/src/components/controls/TcLastPage.js +1 -0
- package/docs/src/components/controls/TcNextPage.js +1 -0
- package/docs/src/components/controls/TcPageSelect.js +9 -0
- package/docs/src/components/controls/TcPageSize.js +5 -0
- package/docs/src/components/controls/TcPrevPage.js +1 -0
- package/docs/src/components/controls/TcSearch.js +1 -0
- package/docs/src/components/controls/TcShowAll.js +1 -0
- package/docs/src/components/controls/TextBackgroundColor.js +26 -0
- package/docs/src/components/controls/TextColor.js +26 -0
- package/docs/src/components/controls/Underline.js +1 -0
- package/docs/src/components/controls/Undo.js +1 -0
- package/docs/src/components/controls/WordCount.js +4 -0
- package/docs/src/components/controls/WordWrap.js +1 -0
- package/docs-src/components/code-editor.page.html +69 -48
- package/docs-src/components/html-editor.page.html +70 -69
- package/docs-src/components/markdown-editor.page.html +59 -78
- package/docs-src/components/pagination.page.html +51 -51
- package/docs-src/components/tableControls.page.html +5 -5
- package/docs-src/components/tableCustomFields.page.html +3 -3
- package/docs-src/components/tableFetchRecords.page.html +13 -13
- package/docs-src/components/tableFieldSortHide.page.html +4 -4
- package/docs-src/components/tablePagination.page.html +13 -13
- package/docs-src/components/tablePlaceholder.page.html +3 -3
- package/docs-src/components/tableRecordEditing.page.html +4 -4
- package/docs-src/components/tableRecordFiltering.page.html +5 -5
- package/docs-src/components/tableRecordHiding.page.html +7 -7
- package/docs-src/components/tableRecordSearching.page.html +3 -3
- package/docs-src/components/tableRowControls.page.html +6 -6
- package/docs-src/components/tableServerSync.page.html +7 -7
- package/llms.txt +37 -3
- package/package.json +1 -1
- package/src/components/Chat.js +14 -14
- package/src/components/CodeEditor.js +26 -32
- package/src/components/{codeEditorControls/ControlGroup.js → ControlGroup.js} +10 -6
- package/src/components/HtmlEditor.js +107 -125
- package/src/components/MarkdownEditor.js +117 -59
- package/src/components/Pagination.js +18 -23
- package/src/components/Table.js +5 -0
- package/src/components/controls/AlignCenter.js +19 -0
- package/src/components/controls/AlignJustify.js +19 -0
- package/src/components/controls/AlignLeft.js +19 -0
- package/src/components/controls/AlignRight.js +19 -0
- package/src/components/controls/Bold.js +19 -0
- package/src/components/controls/BulletList.js +19 -0
- package/src/components/controls/ButtonControl.js +114 -0
- package/src/components/controls/CharacterCount.js +48 -0
- package/src/components/controls/ClearFormatting.js +19 -0
- package/src/components/controls/CodeBlock.js +27 -0
- package/src/components/controls/Control.js +176 -0
- package/src/components/controls/CopyCode.js +19 -0
- package/src/components/controls/CreateLink.js +63 -0
- package/src/components/controls/EditorTheme.js +71 -0
- package/src/components/controls/FindReplace.js +19 -0
- package/src/components/controls/FoldAll.js +35 -0
- package/src/components/controls/FontSize.js +31 -0
- package/src/components/controls/FontSizeDecrease.js +19 -0
- package/src/components/controls/FontSizeIncrease.js +19 -0
- package/src/components/controls/FormatBlock.js +64 -0
- package/src/components/controls/FormatCode.js +19 -0
- package/src/components/controls/Fullscreen.js +42 -0
- package/src/components/controls/InlineCode.js +19 -0
- package/src/components/controls/InsertTable.js +67 -0
- package/src/components/controls/Italic.js +19 -0
- package/src/components/controls/Language.js +69 -0
- package/src/components/controls/MdImage.js +72 -0
- package/src/components/controls/MdLink.js +60 -0
- package/src/components/controls/MdSpeechToText.js +46 -0
- package/src/components/controls/MdTable.js +79 -0
- package/src/components/controls/Menu.js +98 -0
- package/src/components/controls/Minimap.js +36 -0
- package/src/components/controls/Mode.js +30 -0
- package/src/components/controls/NumberList.js +19 -0
- package/src/components/controls/PgCount.js +12 -0
- package/src/components/controls/PgFirst.js +28 -0
- package/src/components/controls/PgGotoPage.js +48 -0
- package/src/components/controls/PgItemsPerPage.js +36 -0
- package/src/components/controls/PgLast.js +28 -0
- package/src/components/controls/PgNext.js +25 -0
- package/src/components/controls/PgPageInfo.js +22 -0
- package/src/components/controls/PgPrev.js +25 -0
- package/src/components/controls/Quote.js +19 -0
- package/src/components/controls/Redo.js +18 -0
- package/src/components/controls/Spacer.js +15 -0
- package/src/components/controls/Strikethrough.js +19 -0
- package/src/components/controls/TcDeleteRecord.js +30 -0
- package/src/components/controls/TcDeleteSelected.js +16 -0
- package/src/components/controls/TcEdit.js +73 -0
- package/src/components/controls/TcExportCsv.js +60 -0
- package/src/components/controls/TcExportJson.js +46 -0
- package/src/components/controls/TcFieldSortHide.js +56 -0
- package/src/components/controls/TcFilters.js +86 -0
- package/src/components/controls/TcFirstPage.js +24 -0
- package/src/components/controls/TcHiddenCount.js +39 -0
- package/src/components/controls/TcHide.js +30 -0
- package/src/components/controls/TcLastPage.js +24 -0
- package/src/components/controls/TcNextPage.js +24 -0
- package/src/components/controls/TcPageSelect.js +36 -0
- package/src/components/controls/TcPageSize.js +23 -0
- package/src/components/controls/TcPrevPage.js +24 -0
- package/src/components/controls/TcSearch.js +34 -0
- package/src/components/controls/TcShowAll.js +18 -0
- package/src/components/controls/TextBackgroundColor.js +84 -0
- package/src/components/controls/TextColor.js +84 -0
- package/src/components/controls/Underline.js +19 -0
- package/src/components/controls/Undo.js +18 -0
- package/src/components/controls/WordCount.js +48 -0
- package/src/components/controls/WordWrap.js +36 -0
- package/tasks/released/0007-code-editor-updates/branch-custom-controls.png +0 -0
- package/tasks/released/0007-code-editor-updates/branch-toolbar.png +0 -0
- package/tasks/released/0007-code-editor-updates/docs-overview.png +0 -0
- package/tasks/released/0007-code-editor-updates/form-integration.png +0 -0
- package/tasks/released/0007-code-editor-updates/live-builtin-controls.png +0 -0
- package/tasks/released/0007-code-editor-updates/live-custom-controls.png +0 -0
- package/tasks/released/0007-code-editor-updates/live-toolbar.png +0 -0
- package/tasks/released/0007-code-editor-updates/local-builtin-controls.png +0 -0
- package/tasks/released/0007-code-editor-updates/local-fixed-builtin.png +0 -0
- package/tasks/released/0007-code-editor-updates/theme-selector.png +0 -0
- package/tasks/released/0007-code-editor-updates.md +96 -0
- package/tests/components/CodeEditor.browser-test.js +0 -42
- package/tests/components/HtmlEditor.browser-test.js +0 -88
- package/tests/components/MarkdownEditor.browser-test.js +0 -72
- package/tests/components/Pagination.browser-test.js +12 -90
- package/tests/components/{htmlEditorControls → controls}/Align.browser-test.js +16 -16
- package/tests/components/{htmlEditorControls → controls}/Bold.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/BulletList.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/CharacterCount.browser-test.js +5 -5
- package/tests/components/{htmlEditorControls → controls}/ClearFormatting.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/CodeBlock.browser-test.js +8 -8
- package/tests/components/controls/Control.browser-test.js +147 -0
- package/tests/components/{htmlEditorControls → controls}/ControlGroup.browser-test.js +9 -9
- package/tests/components/{htmlEditorControls → controls}/ControlSpacer.browser-test.js +4 -4
- package/tests/components/{codeEditorControls → controls}/CopyCode.browser-test.js +8 -8
- package/tests/components/{htmlEditorControls → controls}/CreateLink.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/DropdownControl.browser-test.js +8 -8
- package/tests/components/{codeEditorControls → controls}/EditorTheme.browser-test.js +4 -4
- package/tests/components/{tableControls → controls}/ExportControls.browser-test.js +22 -46
- package/tests/components/{tableControls → controls}/FieldSortHide.browser-test.js +14 -26
- package/tests/components/{tableControls → controls}/Filters.browser-test.js +15 -27
- package/tests/components/{codeEditorControls → controls}/FindReplace.browser-test.js +8 -8
- package/tests/components/{codeEditorControls → controls}/FoldAll.browser-test.js +10 -10
- package/tests/components/{codeEditorControls → controls}/FontSize.browser-test.js +19 -14
- package/tests/components/{htmlEditorControls → controls}/FormatBlock.browser-test.js +9 -9
- package/tests/components/{htmlEditorControls → controls}/FormatCode.browser-test.js +17 -18
- package/tests/components/{codeEditorControls → controls}/Fullscreen.browser-test.js +11 -32
- package/tests/components/{tableControls → controls}/HiddenCount.browser-test.js +4 -4
- package/tests/components/{htmlEditorControls → controls}/InlineCode.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/InsertTable.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/Italic.browser-test.js +7 -7
- package/tests/components/{codeEditorControls → controls}/LanguageSelect.browser-test.js +4 -4
- package/tests/components/{codeEditorControls → controls}/Minimap.browser-test.js +8 -8
- package/tests/components/{htmlEditorControls → controls}/Mode.browser-test.js +7 -7
- package/tests/components/{codeEditorControls → controls}/ModeVisibility.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/NumberList.browser-test.js +7 -7
- package/tests/components/{tableControls → controls}/PaginationControls.browser-test.js +45 -45
- package/tests/components/{tableControls → controls}/RecordControls.browser-test.js +24 -60
- package/tests/components/{tableControls → controls}/Search.browser-test.js +4 -16
- package/tests/components/{htmlEditorControls → controls}/Strikethrough.browser-test.js +7 -7
- package/tests/components/{htmlEditorControls → controls}/TextBackgroundColor.browser-test.js +5 -5
- package/tests/components/{htmlEditorControls → controls}/TextColor.browser-test.js +5 -5
- package/tests/components/{htmlEditorControls → controls}/Underline.browser-test.js +7 -7
- package/tests/components/{codeEditorControls → controls}/UndoRedo.browser-test.js +15 -15
- package/tests/components/{htmlEditorControls → controls}/WordCount.browser-test.js +5 -5
- package/tests/components/{codeEditorControls → controls}/WordWrap.browser-test.js +8 -8
- package/dist/components/codeEditorControls/CodeEditorControl.js +0 -17
- package/dist/components/codeEditorControls/ControlGroup.js +0 -12
- package/dist/components/codeEditorControls/ControlSpacer.js +0 -6
- package/dist/components/codeEditorControls/CopyCode.js +0 -9
- package/dist/components/codeEditorControls/EditorTheme.js +0 -26
- package/dist/components/codeEditorControls/FindReplace.js +0 -7
- package/dist/components/codeEditorControls/FoldAll.js +0 -7
- package/dist/components/codeEditorControls/FontSize.js +0 -13
- package/dist/components/codeEditorControls/FormatCode.js +0 -9
- package/dist/components/codeEditorControls/Fullscreen.js +0 -12
- package/dist/components/codeEditorControls/LanguageSelect.js +0 -15
- package/dist/components/codeEditorControls/Minimap.js +0 -8
- package/dist/components/codeEditorControls/Redo.js +0 -7
- package/dist/components/codeEditorControls/Undo.js +0 -7
- package/dist/components/codeEditorControls/WordWrap.js +0 -8
- package/dist/components/htmlEditorControls/AlignCenter.js +0 -12
- package/dist/components/htmlEditorControls/AlignJustify.js +0 -12
- package/dist/components/htmlEditorControls/AlignLeft.js +0 -12
- package/dist/components/htmlEditorControls/AlignRight.js +0 -12
- package/dist/components/htmlEditorControls/Bold.js +0 -12
- package/dist/components/htmlEditorControls/BulletList.js +0 -12
- package/dist/components/htmlEditorControls/CharacterCount.js +0 -18
- package/dist/components/htmlEditorControls/ClearFormatting.js +0 -12
- package/dist/components/htmlEditorControls/CodeBlock.js +0 -12
- package/dist/components/htmlEditorControls/ControlGroup.js +0 -12
- package/dist/components/htmlEditorControls/CreateLink.js +0 -15
- package/dist/components/htmlEditorControls/DropdownControl.js +0 -57
- package/dist/components/htmlEditorControls/FormatBlock.js +0 -12
- package/dist/components/htmlEditorControls/FormatCode.js +0 -1
- package/dist/components/htmlEditorControls/HtmlEditorControl.js +0 -44
- package/dist/components/htmlEditorControls/InlineCode.js +0 -12
- package/dist/components/htmlEditorControls/InsertTable.js +0 -15
- package/dist/components/htmlEditorControls/Italic.js +0 -12
- package/dist/components/htmlEditorControls/Mode.js +0 -9
- package/dist/components/htmlEditorControls/NumberList.js +0 -12
- package/dist/components/htmlEditorControls/Strikethrough.js +0 -12
- package/dist/components/htmlEditorControls/TextBackgroundColor.js +0 -97
- package/dist/components/htmlEditorControls/TextColor.js +0 -97
- package/dist/components/htmlEditorControls/Underline.js +0 -12
- package/dist/components/htmlEditorControls/WordCount.js +0 -18
- package/dist/components/markdownEditorControls/Bold.js +0 -11
- package/dist/components/markdownEditorControls/BulletList.js +0 -11
- package/dist/components/markdownEditorControls/Code.js +0 -11
- package/dist/components/markdownEditorControls/FormatBlock.js +0 -30
- package/dist/components/markdownEditorControls/Heading.js +0 -11
- package/dist/components/markdownEditorControls/Image.js +0 -93
- package/dist/components/markdownEditorControls/Italic.js +0 -11
- package/dist/components/markdownEditorControls/Link.js +0 -11
- package/dist/components/markdownEditorControls/MarkdownEditorControl.js +0 -39
- package/dist/components/markdownEditorControls/Menu.js +0 -30
- package/dist/components/markdownEditorControls/NumberedList.js +0 -11
- package/dist/components/markdownEditorControls/Quote.js +0 -11
- package/dist/components/markdownEditorControls/SpeechToText.js +0 -16
- package/dist/components/markdownEditorControls/Strikethrough.js +0 -11
- package/dist/components/markdownEditorControls/Table.js +0 -80
- package/dist/components/paginationControls/FirstPage.js +0 -1
- package/dist/components/paginationControls/GotoPage.js +0 -17
- package/dist/components/paginationControls/ItemsPerPage.js +0 -15
- package/dist/components/paginationControls/LastPage.js +0 -1
- package/dist/components/paginationControls/NextPage.js +0 -1
- package/dist/components/paginationControls/PageCount.js +0 -1
- package/dist/components/paginationControls/PageInfo.js +0 -6
- package/dist/components/paginationControls/PaginationButtonControl.js +0 -20
- package/dist/components/paginationControls/PaginationControl.js +0 -5
- package/dist/components/paginationControls/PrevPage.js +0 -1
- package/dist/components/tableControls/DeleteRecord.js +0 -7
- package/dist/components/tableControls/DeleteSelected.js +0 -7
- package/dist/components/tableControls/Edit.js +0 -18
- package/dist/components/tableControls/ExportCSV.js +0 -8
- package/dist/components/tableControls/ExportJson.js +0 -8
- package/dist/components/tableControls/FieldSortHide.js +0 -25
- package/dist/components/tableControls/Filters.js +0 -46
- package/dist/components/tableControls/FirstPage.js +0 -9
- package/dist/components/tableControls/HiddenCount.js +0 -3
- package/dist/components/tableControls/Hide.js +0 -5
- package/dist/components/tableControls/LastPage.js +0 -9
- package/dist/components/tableControls/NextPage.js +0 -9
- package/dist/components/tableControls/PageSelect.js +0 -22
- package/dist/components/tableControls/PageSize.js +0 -5
- package/dist/components/tableControls/PrevPage.js +0 -9
- package/dist/components/tableControls/Search.js +0 -9
- package/dist/components/tableControls/ShowAll.js +0 -5
- package/dist/components/tableControls/TableControl.js +0 -16
- package/docs/src/components/codeEditorControls/CodeEditorControl.js +0 -17
- package/docs/src/components/codeEditorControls/ControlGroup.js +0 -12
- package/docs/src/components/codeEditorControls/CopyCode.js +0 -9
- package/docs/src/components/codeEditorControls/EditorTheme.js +0 -26
- package/docs/src/components/codeEditorControls/FindReplace.js +0 -7
- package/docs/src/components/codeEditorControls/FoldAll.js +0 -7
- package/docs/src/components/codeEditorControls/FontSize.js +0 -13
- package/docs/src/components/codeEditorControls/FormatCode.js +0 -9
- package/docs/src/components/codeEditorControls/Fullscreen.js +0 -12
- package/docs/src/components/codeEditorControls/LanguageSelect.js +0 -15
- package/docs/src/components/codeEditorControls/Minimap.js +0 -8
- package/docs/src/components/codeEditorControls/Redo.js +0 -7
- package/docs/src/components/codeEditorControls/Undo.js +0 -7
- package/docs/src/components/codeEditorControls/WordWrap.js +0 -8
- package/docs/src/components/htmlEditorControls/AlignCenter.js +0 -12
- package/docs/src/components/htmlEditorControls/AlignJustify.js +0 -12
- package/docs/src/components/htmlEditorControls/AlignLeft.js +0 -12
- package/docs/src/components/htmlEditorControls/AlignRight.js +0 -12
- package/docs/src/components/htmlEditorControls/Bold.js +0 -12
- package/docs/src/components/htmlEditorControls/BulletList.js +0 -12
- package/docs/src/components/htmlEditorControls/CharacterCount.js +0 -18
- package/docs/src/components/htmlEditorControls/ClearFormatting.js +0 -12
- package/docs/src/components/htmlEditorControls/CodeBlock.js +0 -12
- package/docs/src/components/htmlEditorControls/ControlGroup.js +0 -12
- package/docs/src/components/htmlEditorControls/ControlSpacer.js +0 -6
- package/docs/src/components/htmlEditorControls/CreateLink.js +0 -15
- package/docs/src/components/htmlEditorControls/DropdownControl.js +0 -57
- package/docs/src/components/htmlEditorControls/FormatBlock.js +0 -12
- package/docs/src/components/htmlEditorControls/FormatCode.js +0 -1
- package/docs/src/components/htmlEditorControls/HtmlEditorControl.js +0 -44
- package/docs/src/components/htmlEditorControls/InlineCode.js +0 -12
- package/docs/src/components/htmlEditorControls/InsertTable.js +0 -15
- package/docs/src/components/htmlEditorControls/Italic.js +0 -12
- package/docs/src/components/htmlEditorControls/Mode.js +0 -9
- package/docs/src/components/htmlEditorControls/NumberList.js +0 -12
- package/docs/src/components/htmlEditorControls/Strikethrough.js +0 -12
- package/docs/src/components/htmlEditorControls/TextBackgroundColor.js +0 -97
- package/docs/src/components/htmlEditorControls/TextColor.js +0 -97
- package/docs/src/components/htmlEditorControls/Underline.js +0 -12
- package/docs/src/components/htmlEditorControls/WordCount.js +0 -18
- package/docs/src/components/markdownEditorControls/Bold.js +0 -11
- package/docs/src/components/markdownEditorControls/BulletList.js +0 -11
- package/docs/src/components/markdownEditorControls/Code.js +0 -11
- package/docs/src/components/markdownEditorControls/FormatBlock.js +0 -30
- package/docs/src/components/markdownEditorControls/Heading.js +0 -11
- package/docs/src/components/markdownEditorControls/Image.js +0 -93
- package/docs/src/components/markdownEditorControls/Italic.js +0 -11
- package/docs/src/components/markdownEditorControls/Link.js +0 -11
- package/docs/src/components/markdownEditorControls/MarkdownEditorControl.js +0 -39
- package/docs/src/components/markdownEditorControls/Menu.js +0 -30
- package/docs/src/components/markdownEditorControls/NumberedList.js +0 -11
- package/docs/src/components/markdownEditorControls/Quote.js +0 -11
- package/docs/src/components/markdownEditorControls/SpeechToText.js +0 -16
- package/docs/src/components/markdownEditorControls/Strikethrough.js +0 -11
- package/docs/src/components/markdownEditorControls/Table.js +0 -80
- package/docs/src/components/paginationControls/FirstPage.js +0 -1
- package/docs/src/components/paginationControls/GotoPage.js +0 -17
- package/docs/src/components/paginationControls/ItemsPerPage.js +0 -15
- package/docs/src/components/paginationControls/LastPage.js +0 -1
- package/docs/src/components/paginationControls/NextPage.js +0 -1
- package/docs/src/components/paginationControls/PageCount.js +0 -1
- package/docs/src/components/paginationControls/PageInfo.js +0 -6
- package/docs/src/components/paginationControls/PaginationButtonControl.js +0 -20
- package/docs/src/components/paginationControls/PaginationControl.js +0 -5
- package/docs/src/components/paginationControls/PrevPage.js +0 -1
- package/docs/src/components/tableControls/DeleteRecord.js +0 -7
- package/docs/src/components/tableControls/DeleteSelected.js +0 -7
- package/docs/src/components/tableControls/Edit.js +0 -18
- package/docs/src/components/tableControls/ExportCSV.js +0 -8
- package/docs/src/components/tableControls/ExportJson.js +0 -8
- package/docs/src/components/tableControls/FieldSortHide.js +0 -25
- package/docs/src/components/tableControls/Filters.js +0 -46
- package/docs/src/components/tableControls/FirstPage.js +0 -9
- package/docs/src/components/tableControls/HiddenCount.js +0 -3
- package/docs/src/components/tableControls/Hide.js +0 -5
- package/docs/src/components/tableControls/LastPage.js +0 -9
- package/docs/src/components/tableControls/NextPage.js +0 -9
- package/docs/src/components/tableControls/PageSelect.js +0 -22
- package/docs/src/components/tableControls/PageSize.js +0 -5
- package/docs/src/components/tableControls/PrevPage.js +0 -9
- package/docs/src/components/tableControls/Search.js +0 -9
- package/docs/src/components/tableControls/ShowAll.js +0 -5
- package/docs/src/components/tableControls/TableControl.js +0 -16
- package/src/components/codeEditorControls/CodeEditorControl.js +0 -134
- package/src/components/codeEditorControls/ControlSpacer.js +0 -23
- package/src/components/codeEditorControls/CopyCode.js +0 -37
- package/src/components/codeEditorControls/EditorTheme.js +0 -81
- package/src/components/codeEditorControls/FindReplace.js +0 -35
- package/src/components/codeEditorControls/FoldAll.js +0 -49
- package/src/components/codeEditorControls/FontSize.js +0 -45
- package/src/components/codeEditorControls/FormatCode.js +0 -37
- package/src/components/codeEditorControls/Fullscreen.js +0 -72
- package/src/components/codeEditorControls/LanguageSelect.js +0 -74
- package/src/components/codeEditorControls/Minimap.js +0 -60
- package/src/components/codeEditorControls/Redo.js +0 -35
- package/src/components/codeEditorControls/Undo.js +0 -35
- package/src/components/codeEditorControls/WordWrap.js +0 -60
- package/src/components/htmlEditorControls/AlignCenter.js +0 -63
- package/src/components/htmlEditorControls/AlignJustify.js +0 -63
- package/src/components/htmlEditorControls/AlignLeft.js +0 -63
- package/src/components/htmlEditorControls/AlignRight.js +0 -63
- package/src/components/htmlEditorControls/Bold.js +0 -63
- package/src/components/htmlEditorControls/BulletList.js +0 -63
- package/src/components/htmlEditorControls/CharacterCount.js +0 -75
- package/src/components/htmlEditorControls/ClearFormatting.js +0 -63
- package/src/components/htmlEditorControls/CodeBlock.js +0 -64
- package/src/components/htmlEditorControls/ControlGroup.js +0 -70
- package/src/components/htmlEditorControls/ControlSpacer.js +0 -23
- package/src/components/htmlEditorControls/CreateLink.js +0 -115
- package/src/components/htmlEditorControls/DropdownControl.js +0 -149
- package/src/components/htmlEditorControls/FormatBlock.js +0 -106
- package/src/components/htmlEditorControls/FormatCode.js +0 -7
- package/src/components/htmlEditorControls/HtmlEditorControl.js +0 -164
- package/src/components/htmlEditorControls/InlineCode.js +0 -63
- package/src/components/htmlEditorControls/InsertTable.js +0 -126
- package/src/components/htmlEditorControls/Italic.js +0 -63
- package/src/components/htmlEditorControls/Mode.js +0 -68
- package/src/components/htmlEditorControls/NumberList.js +0 -63
- package/src/components/htmlEditorControls/Strikethrough.js +0 -63
- package/src/components/htmlEditorControls/TextBackgroundColor.js +0 -189
- package/src/components/htmlEditorControls/TextColor.js +0 -189
- package/src/components/htmlEditorControls/Underline.js +0 -63
- package/src/components/htmlEditorControls/WordCount.js +0 -76
- package/src/components/markdownEditorControls/Bold.js +0 -30
- package/src/components/markdownEditorControls/BulletList.js +0 -30
- package/src/components/markdownEditorControls/Code.js +0 -39
- package/src/components/markdownEditorControls/FormatBlock.js +0 -102
- package/src/components/markdownEditorControls/Heading.js +0 -46
- package/src/components/markdownEditorControls/Image.js +0 -250
- package/src/components/markdownEditorControls/Italic.js +0 -30
- package/src/components/markdownEditorControls/Link.js +0 -74
- package/src/components/markdownEditorControls/MarkdownEditorControl.js +0 -158
- package/src/components/markdownEditorControls/Menu.js +0 -86
- package/src/components/markdownEditorControls/NumberedList.js +0 -69
- package/src/components/markdownEditorControls/Quote.js +0 -30
- package/src/components/markdownEditorControls/SpeechToText.js +0 -65
- package/src/components/markdownEditorControls/Strikethrough.js +0 -35
- package/src/components/markdownEditorControls/Table.js +0 -165
- package/src/components/paginationControls/FirstPage.js +0 -26
- package/src/components/paginationControls/GotoPage.js +0 -56
- package/src/components/paginationControls/ItemsPerPage.js +0 -44
- package/src/components/paginationControls/LastPage.js +0 -26
- package/src/components/paginationControls/NextPage.js +0 -26
- package/src/components/paginationControls/PageCount.js +0 -10
- package/src/components/paginationControls/PageInfo.js +0 -23
- package/src/components/paginationControls/PaginationButtonControl.js +0 -76
- package/src/components/paginationControls/PaginationControl.js +0 -43
- package/src/components/paginationControls/PrevPage.js +0 -26
- package/src/components/tableControls/DeleteRecord.js +0 -29
- package/src/components/tableControls/DeleteSelected.js +0 -27
- package/src/components/tableControls/Edit.js +0 -86
- package/src/components/tableControls/ExportCSV.js +0 -71
- package/src/components/tableControls/ExportJson.js +0 -55
- package/src/components/tableControls/FieldSortHide.js +0 -76
- package/src/components/tableControls/Filters.js +0 -113
- package/src/components/tableControls/FirstPage.js +0 -65
- package/src/components/tableControls/HiddenCount.js +0 -43
- package/src/components/tableControls/Hide.js +0 -34
- package/src/components/tableControls/LastPage.js +0 -65
- package/src/components/tableControls/NextPage.js +0 -65
- package/src/components/tableControls/PageSelect.js +0 -101
- package/src/components/tableControls/PageSize.js +0 -68
- package/src/components/tableControls/PrevPage.js +0 -65
- package/src/components/tableControls/Search.js +0 -56
- package/src/components/tableControls/ShowAll.js +0 -34
- package/src/components/tableControls/TableControl.js +0 -103
- package/tests/components/tableControls/TableControl.browser-test.js +0 -300
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.alignJustify()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_align_justify"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-align-justify",o);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.alignLeft()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_align_left"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-align-left",o);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.alignRight()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_align_right"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-align-right",o);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as o}from"../../lit-all.min.js";import"../Icon.js";export default class i extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.bold()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_bold"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-bold",i);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.unorderedList()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_list_bulleted"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-bullet-list",o);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as r}from"../../lit-all.min.js";export default class s extends t{static properties={count:{type:Number,state:!0}};constructor(){super(),this.count=0}connectedCallback(){super.connectedCallback(),this.editor&&(this.editor.addEventListener("ready",()=>{this.updateCount()}),this.editor.addEventListener("change",()=>{this.updateCount()}),setTimeout(()=>this.updateCount(),0))}updateCount=()=>{if(!this.editor)return;const t=(new DOMParser).parseFromString(this.editor.getValue(),"text/html").body.innerText||"";this.count=t.length};render(){return e`
|
|
2
|
-
<span class="character-count">
|
|
3
|
-
<slot name="label">Characters:</slot> ${this.count}
|
|
4
|
-
</span>
|
|
5
|
-
`}static styles=[t.styles,r`
|
|
6
|
-
:host {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding: 0 0.5rem;
|
|
10
|
-
font-size: 0.875rem;
|
|
11
|
-
color: var(--text-color-secondary, #666);
|
|
12
|
-
}
|
|
13
|
-
.character-count {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
gap: 0.25rem;
|
|
17
|
-
}
|
|
18
|
-
`]}customElements.define("k-hec-character-count",s);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as o}from"../../lit-all.min.js";import"../Icon.js";export default class i extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.removeFormat()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_clear"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-clear-formatting",i);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as o}from"../../lit-all.min.js";import"../Icon.js";export default class i extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.formatBlock(this.editor.isSelectionInCodeBlock()?"p":"pre")};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="code_blocks"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-code-block",i);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"../ShadowComponent.js";import{html as e,css as i}from"../../lit-all.min.js";export default class s extends t{static properties={hidden:{type:Boolean,reflect:!0}};constructor(){super(),this.hidden=!1}connectedCallback(){super.connectedCallback(),this.hasAttribute("class")||this.setAttribute("class","b r mq"),this.addEventListener("control_visibility_change",this.checkVisibility)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("control_visibility_change",this.checkVisibility)}checkVisibility=t=>{if(t.target===this)return;const e=this.hidden;this.hidden=Array.from(this.children).every(t=>!0===t.hidden),this.hidden!==e&&this.dispatchEvent(new CustomEvent("control_visibility_change",{bubbles:!0}))};static styles=i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
:host([hidden]) {
|
|
6
|
-
display: none !important;
|
|
7
|
-
}
|
|
8
|
-
::slotted(*) {
|
|
9
|
-
margin-top: -1px;
|
|
10
|
-
margin-bottom: -1px;
|
|
11
|
-
}
|
|
12
|
-
`;render(){return e`<slot></slot>`}}customElements.define("k-hec-group",s);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import e from"./HtmlEditorControl.js";import{html as t,css as i}from"../../lit-all.min.js";import"../Icon.js";import o from"../Dialog.js";export default class l extends e{static properties={editorMode:{type:String,state:!0}};constructor(){super()}connectedCallback(){super.connectedCallback(),this.editor&&(this.editorMode=this.editor.mode,this.editor?.addEventListener("mode-changed",()=>{this.editor&&(this.editorMode=this.editor.mode)}))}handleClick=()=>{if(!this.editor)return;const e=this.editor.getSelectedText(),t=document.createElement("input");t.type="text",t.placeholder="https://example.com",t.style.cssText="padding: 0.5rem; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 1rem;";const i=document.createElement("input");i.type="text",i.placeholder="Enter link text",i.value=e,i.style.cssText="padding: 0.5rem; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 1rem;";const l=document.createElement("div");l.className="p",l.style.cssText="display: flex; flex-direction: column; gap: 1rem;",l.innerHTML='\n\t\t\t<div style="display: flex; flex-direction: column; gap: 0.5rem;">\n\t\t\t\t<label style="font-weight: bold;">URL</label>\n\t\t\t</div>\n\t\t\t<div style="display: flex; flex-direction: column; gap: 0.5rem;">\n\t\t\t\t<label style="font-weight: bold;">Link Text</label>\n\t\t\t</div>\n\t\t',l.children[0].appendChild(t),l.children[1].appendChild(i),o.create(l,{title:"Create Link",cancelText:"Cancel",confirmText:"Insert Link",confirmClasses:"success ml",confirmAction:o=>{const l=t.value.trim(),n=i.value.trim();l?!this.editor.selection||n&&n!==e?this.editor.createLinkWithText(l,n||l):this.editor.createLink(l):o.keepDialogOpen=!0}})};render(){return this.hidden="code"===this.editorMode,t`
|
|
2
|
-
<button
|
|
3
|
-
class="${this.buttonClasses}"
|
|
4
|
-
@click="${this.handleClick}"
|
|
5
|
-
>
|
|
6
|
-
<slot name="icon">
|
|
7
|
-
<k-icon name="link"></k-icon>
|
|
8
|
-
</slot>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</button>
|
|
11
|
-
`}static styles=[e.styles,i`
|
|
12
|
-
:host {
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
}
|
|
15
|
-
`]}customElements.define("k-hec-create-link",l);
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as o,css as e}from"../../lit-all.min.js";import"../Dropdown.js";import"../Icon.js";export default class n extends t{static properties={opened:{type:Boolean,reflect:!0},editorMode:{type:String,state:!0}};constructor(){super(),this.opened=!1}connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}updated(t){super.updated(t),t.has("editorMode")&&requestAnimationFrame(()=>{this.hidden="code"===this.editorMode&&!this.hasVisibleChildren()})}updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}hasVisibleChildren(){return Array.from(this.children).filter(t=>!t.hasAttribute("slot")).some(t=>{if(!1===t.hidden||void 0===t.hidden){return"none"!==window.getComputedStyle(t).display}return!1})}static styles=[t.styles,e`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
k-dropdown {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* Override fixed sizing for dropdown trigger */
|
|
11
|
-
button[slot="trigger"] {
|
|
12
|
-
width: auto !important;
|
|
13
|
-
height: auto !important;
|
|
14
|
-
min-width: 40px;
|
|
15
|
-
min-height: 40px;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
/* Style slotted items (not icon or label) */
|
|
19
|
-
::slotted(:not([slot="icon"]):not([slot="label"])) {
|
|
20
|
-
display: block !important;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
::slotted(:not([slot="icon"]):not([slot="label"])) .icon-btn,
|
|
24
|
-
::slotted(:not([slot="icon"]):not([slot="label"])) button {
|
|
25
|
-
display: flex !important;
|
|
26
|
-
width: 100% !important;
|
|
27
|
-
height: auto !important;
|
|
28
|
-
justify-content: flex-start !important;
|
|
29
|
-
padding: 0.5rem 0.75rem !important;
|
|
30
|
-
margin: 0 !important;
|
|
31
|
-
border: none !important;
|
|
32
|
-
border-radius: 0 !important;
|
|
33
|
-
border-bottom: 1px solid var(--c_border) !important;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
::slotted(:not([slot="icon"]):not([slot="label"]):last-of-type) .icon-btn,
|
|
37
|
-
::slotted(:not([slot="icon"]):not([slot="label"]):last-of-type) button {
|
|
38
|
-
border-bottom: none !important;
|
|
39
|
-
}
|
|
40
|
-
`];handleToggle=()=>{this.opened=!this.opened};handleOpened=()=>{this.opened=!0};handleClosed=()=>{this.opened=!1};render(){return o`
|
|
41
|
-
<k-dropdown
|
|
42
|
-
?opened=${this.opened}
|
|
43
|
-
@opened=${this.handleOpened}
|
|
44
|
-
@closed=${this.handleClosed}
|
|
45
|
-
>
|
|
46
|
-
<button
|
|
47
|
-
slot="trigger"
|
|
48
|
-
class="${this.buttonClasses}"
|
|
49
|
-
>
|
|
50
|
-
<slot name="icon">
|
|
51
|
-
<k-icon name="arrow_drop_down"></k-icon>
|
|
52
|
-
</slot>
|
|
53
|
-
<slot name="label"></slot>
|
|
54
|
-
</button>
|
|
55
|
-
<slot></slot>
|
|
56
|
-
</k-dropdown>
|
|
57
|
-
`}}customElements.define("k-hec-dropdown",n);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as a}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0},tag:{type:String},label:{type:String}};static styles=[t.styles,a`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];constructor(){super(),this.tag="p",this.label=""}connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.formatBlock(this.tag)};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){this.hidden="code"===this.editorMode;this.label||this.getDefaultLabel();const t=this.getDefaultIcon();return e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="${t}"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}getDefaultLabel(){return{h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",h4:"Heading 4",h5:"Heading 5",h6:"Heading 6",p:"Paragraph"}[this.tag]||this.tag.toUpperCase()}getDefaultIcon(){return{h1:"format_h1",h2:"format_h2",h3:"format_h3",h4:"format_h4",h5:"format_h5",h6:"format_h6",p:"format_paragraph"}[this.tag]||"format_paragraph"}}customElements.define("k-hec-format-block",o);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import o from"../codeEditorControls/FormatCode.js";export default o;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import t from"../ShadowComponent.js";import{html as e,css as n}from"../../lit-all.min.js";export default class o extends t{static properties={btnClass:{type:String,attribute:"btn-class"},groupBtnClass:{type:String,attribute:"group-btn-class"},groupLastBtnClass:{type:String,attribute:"group-last-btn-class"},hidden:{type:Boolean,reflect:!0}};constructor(){super(),this.btnClass="b r mq ph",this.groupBtnClass="br ph",this.groupLastBtnClass="ph",this.hidesInCodeMode=!0}connectedCallback(){super.connectedCallback();const t=this.editor;t&&(this.modeEditor=t,this.modeHandler=()=>{const t=this.hidesInCodeMode&&"code"===this.modeEditor.mode;this.hidden!==t&&(this.hidden=t,this.dispatchEvent(new CustomEvent("control_visibility_change",{bubbles:!0})))},t.addEventListener("mode-changed",this.modeHandler))}disconnectedCallback(){super.disconnectedCallback(),this.modeEditor?.removeEventListener("mode-changed",this.modeHandler),this.modeEditor=null,this.modeHandler=null}updated(t){super.updated(t),t.has("hidden")&&this.dispatchEvent(new CustomEvent("control_visibility_change",{bubbles:!0}))}get editor(){const t=t=>t?.tagName?.startsWith("K-HTML-EDITOR");let e=this.getRootNode();for(;e instanceof ShadowRoot;){const n=e.host;if(t(n))return n;e=n.getRootNode()}let n=this.parentElement;for(;n;){if(t(n))return n;n=n.parentElement}return null}get isInGroup(){const t=this.parentElement;return t&&"K-HEC-GROUP"===t.tagName}get isInDropdown(){const t=this.parentElement;return t&&"K-HEC-DROPDOWN"===t.tagName}get isLastInGroup(){if(!this.isInGroup)return!1;const t=this.parentElement,e=Array.from(t.children).filter(t=>t.tagName.startsWith("K-HEC-")&&"K-HEC-SPACER"!==t.tagName);return e[e.length-1]===this}get buttonClasses(){let t;return t=this.isInDropdown?"dropdown-item":this.isInGroup?this.isLastInGroup?this.groupLastBtnClass:this.groupBtnClass:this.btnClass,`no-btn icon-btn ${t}`.trim()}static styles=n`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
:host([hidden]) {
|
|
7
|
-
display: none !important;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.icon-btn {
|
|
11
|
-
display: inline-flex !important;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
width: 40px;
|
|
15
|
-
height: 40px;
|
|
16
|
-
gap: 0.5rem;
|
|
17
|
-
}
|
|
18
|
-
.icon-btn:disabled {
|
|
19
|
-
opacity: 0.6;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.icon-btn:has(slot:not([name])) {
|
|
23
|
-
width: auto;
|
|
24
|
-
padding-left: 0.75rem;
|
|
25
|
-
padding-right: 0.75rem;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/* Styles for controls in dropdown */
|
|
29
|
-
.icon-btn.dropdown-item {
|
|
30
|
-
display: flex !important;
|
|
31
|
-
width: 100% !important;
|
|
32
|
-
height: auto !important;
|
|
33
|
-
justify-content: flex-start !important;
|
|
34
|
-
padding: 0.5rem 0.75rem !important;
|
|
35
|
-
margin: 0 !important;
|
|
36
|
-
border: none !important;
|
|
37
|
-
border-radius: 0 !important;
|
|
38
|
-
border-bottom: 1px solid var(--c_border) !important;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
:host(:last-child) .icon-btn.dropdown-item {
|
|
42
|
-
border-bottom: none !important;
|
|
43
|
-
}
|
|
44
|
-
`}customElements.define("k-html-editor-control",o);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as o}from"../../lit-all.min.js";import"../Icon.js";export default class i extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor?.inlineCode()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="code_blocks"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-inline-code",i);
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import e from"./HtmlEditorControl.js";import{html as t,css as l}from"../../lit-all.min.js";import"../Icon.js";import i from"../Dialog.js";export default class n extends e{static properties={editorMode:{type:String,state:!0}};constructor(){super()}connectedCallback(){super.connectedCallback(),this.editor&&(this.editorMode=this.editor.mode,this.editor?.addEventListener("mode-changed",()=>{this.editor&&(this.editorMode=this.editor.mode)}))}handleClick=()=>{if(!this.editor)return;const e=this.editor.getTableAtSelection(),t=!!e,l=e?.rows??3,n=e?.cols??3,o=e?.hasHeaders??!0,s=e?.cellData??null,r=document.createElement("input");r.type="number",r.min="1",r.max="20",r.value=l.toString(),r.style.cssText="padding: 0.5rem; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 1rem;";const d=document.createElement("input");d.type="number",d.min="1",d.max="10",d.value=n.toString(),d.style.cssText="padding: 0.5rem; border: 1px solid var(--border-color, #ccc); border-radius: 4px; font-size: 1rem;";const c=document.createElement("input");c.type="checkbox",c.checked=o,c.id="table-headers-checkbox";const a=document.createElement("div");a.className="p",a.style.cssText="display: flex; flex-direction: column; gap: 1rem;",a.innerHTML='\n\t\t\t<div style="display: flex; flex-direction: column; gap: 0.5rem;">\n\t\t\t\t<label style="font-weight: bold;">Rows</label>\n\t\t\t</div>\n\t\t\t<div style="display: flex; flex-direction: column; gap: 0.5rem;">\n\t\t\t\t<label style="font-weight: bold;">Columns</label>\n\t\t\t</div>\n\t\t\t<div style="display: flex; align-items: center; gap: 0.5rem;">\n\t\t\t\t<label for="table-headers-checkbox" style="font-weight: bold;">Include Headers</label>\n\t\t\t</div>\n\t\t',a.children[0].appendChild(r),a.children[1].appendChild(d),a.children[2].insertBefore(c,a.children[2].firstChild),i.create(a,{title:t?"Edit Table":"Insert Table",cancelText:"Cancel",confirmText:t?"Update Table":"Insert Table",confirmClasses:"success",confirmAction:()=>{const l=parseInt(r.value)||3,i=parseInt(d.value)||3,n=c.checked;t&&this.editor.removeTableByKey(e.key),this.editor.insertTable(l,i,n,s)}})};render(){return this.hidden="code"===this.editorMode,t`
|
|
2
|
-
<button
|
|
3
|
-
class="${this.buttonClasses}"
|
|
4
|
-
@click="${this.handleClick}"
|
|
5
|
-
>
|
|
6
|
-
<slot name="icon">
|
|
7
|
-
<k-icon name="table"></k-icon>
|
|
8
|
-
</slot>
|
|
9
|
-
<slot></slot>
|
|
10
|
-
</button>
|
|
11
|
-
`}static styles=[e.styles,l`
|
|
12
|
-
:host {
|
|
13
|
-
display: inline-flex;
|
|
14
|
-
}
|
|
15
|
-
`]}customElements.define("k-hec-insert-table",n);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.italic()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_italic"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-italic",o);
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import e from"./HtmlEditorControl.js";import{html as t,css as o}from"../../lit-all.min.js";import"../Icon.js";export default class s extends e{static properties={mode:{type:String,reflect:!0}};hidesInCodeMode=!1;connectedCallback(){super.connectedCallback(),this.updateMode(),this.editor?.addEventListener("mode-changed",()=>this.updateMode())}handleClick=()=>{this.editor&&this.editor.toggleMode()};updateMode(){this.editor&&(this.mode=this.editor.mode)}static styles=[e.styles,o`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];render(){const e="code"===this.mode?`${this.buttonClasses} bg-primary`:this.buttonClasses;return t`
|
|
6
|
-
<button class="${e}" @click="${this.handleClick}">
|
|
7
|
-
<k-icon name="code"></k-icon>
|
|
8
|
-
</button>
|
|
9
|
-
`}}customElements.define("k-hec-mode",s);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.orderedList()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_list_numbered"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-number-list",o);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.strikethrough()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="strikethrough_s"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-strikethrough",o);
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import o from"./DropdownControl.js";import{html as e,css as t}from"../../lit-all.min.js";import"../Icon.js";export default class r extends o{static properties={editorMode:{type:String,state:!0},colors:{type:String},disableRemove:{type:Boolean,attribute:"disable-remove"},disablePicker:{type:Boolean,attribute:"disable-picker"}};static styles=[o.styles,t`
|
|
2
|
-
.dropdown-content {
|
|
3
|
-
padding: 8px;
|
|
4
|
-
min-width: 200px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.remove-btn {
|
|
8
|
-
width: 100%;
|
|
9
|
-
padding: 8px;
|
|
10
|
-
margin-bottom: 8px;
|
|
11
|
-
border: 1px solid var(--border-color, #ccc);
|
|
12
|
-
background: var(--background-color, white);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
border-radius: 4px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.remove-btn:hover {
|
|
18
|
-
background: var(--hover-background-color, #f5f5f5);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.color-swatches {
|
|
22
|
-
display: grid;
|
|
23
|
-
grid-template-columns: repeat(6, 1fr);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.color-swatch {
|
|
27
|
-
width: 32px;
|
|
28
|
-
height: 32px;
|
|
29
|
-
border: 1px solid var(--border-color, #ccc);
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.color-swatch:hover {
|
|
35
|
-
border-color: var(--primary-color, #007acc);
|
|
36
|
-
box-shadow: 0 0 4px rgba(0, 122, 204, 0.3);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.picker-row {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: 8px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.picker-row label {
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.picker-row input[type="color"] {
|
|
50
|
-
flex: 1;
|
|
51
|
-
height: 32px;
|
|
52
|
-
border: 1px solid var(--border-color, #ccc);
|
|
53
|
-
border-radius: 4px;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
}
|
|
56
|
-
`];constructor(){super(),this.colors="#ffff00,#00ffff,#ff66ff,#99ff99,#ffcc99,#ff9999,#cccccc,#ffffff,#ffffcc,#ccffff,#ffccff,#ccffcc",this.disableRemove=!1,this.disablePicker=!1,this.icon="format_color_fill"}connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleRemove=o=>{this.editor&&this.editor.removeTextBackgroundColor(),this.opened=!1};handleSwatchClick=o=>{const e=o.target.style.backgroundColor;if(this.editor&&e){const o=e.match(/\d+/g),t=o?"#"+o.map(o=>parseInt(o).toString(16).padStart(2,"0")).join(""):e;this.editor.setTextBackgroundColor(t)}this.opened=!1};handlePickerChange=o=>{const e=o.target.value;this.editor&&e&&this.editor.setTextBackgroundColor(e),this.opened=!1};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}getColorArray(){return this.colors.split(",").map(o=>o.trim()).filter(o=>o)}render(){this.hidden="code"===this.editorMode;const o=this.getColorArray();return e`
|
|
57
|
-
<k-dropdown
|
|
58
|
-
?opened=${this.opened}
|
|
59
|
-
@opened=${this.handleOpened}
|
|
60
|
-
@closed=${this.handleClosed}
|
|
61
|
-
>
|
|
62
|
-
<button
|
|
63
|
-
slot="trigger"
|
|
64
|
-
class="${this.buttonClasses}"
|
|
65
|
-
>
|
|
66
|
-
<k-icon name="format_color_fill"></k-icon>
|
|
67
|
-
</button>
|
|
68
|
-
|
|
69
|
-
<div class="dropdown-content">
|
|
70
|
-
${this.disableRemove?"":e`
|
|
71
|
-
<button class="remove-btn" @click=${this.handleRemove}>
|
|
72
|
-
Remove Color
|
|
73
|
-
</button>
|
|
74
|
-
`}
|
|
75
|
-
|
|
76
|
-
<div class="color-swatches">
|
|
77
|
-
${o.map(o=>e`
|
|
78
|
-
<button
|
|
79
|
-
class="color-swatch"
|
|
80
|
-
style="background-color: ${o}"
|
|
81
|
-
@click=${this.handleSwatchClick}
|
|
82
|
-
></button>
|
|
83
|
-
`)}
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
${this.disablePicker?"":e`
|
|
87
|
-
<div class="picker-row">
|
|
88
|
-
<label>Custom:</label>
|
|
89
|
-
<input
|
|
90
|
-
type="color"
|
|
91
|
-
@input=${this.handlePickerChange}
|
|
92
|
-
/>
|
|
93
|
-
</div>
|
|
94
|
-
`}
|
|
95
|
-
</div>
|
|
96
|
-
</k-dropdown>
|
|
97
|
-
`}}customElements.define("k-hec-text-background-color",r);
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import e from"./DropdownControl.js";import{html as o,css as t}from"../../lit-all.min.js";import"../Icon.js";export default class r extends e{static properties={editorMode:{type:String,state:!0},colors:{type:String},disableRemove:{type:Boolean,attribute:"disable-remove"},disablePicker:{type:Boolean,attribute:"disable-picker"}};static styles=[e.styles,t`
|
|
2
|
-
.dropdown-content {
|
|
3
|
-
padding: 8px;
|
|
4
|
-
min-width: 200px;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
.remove-btn {
|
|
8
|
-
width: 100%;
|
|
9
|
-
padding: 8px;
|
|
10
|
-
margin-bottom: 8px;
|
|
11
|
-
border: 1px solid var(--border-color, #ccc);
|
|
12
|
-
background: var(--background-color, white);
|
|
13
|
-
cursor: pointer;
|
|
14
|
-
border-radius: 4px;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.remove-btn:hover {
|
|
18
|
-
background: var(--hover-background-color, #f5f5f5);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.color-swatches {
|
|
22
|
-
display: grid;
|
|
23
|
-
grid-template-columns: repeat(6, 1fr);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.color-swatch {
|
|
27
|
-
width: 32px;
|
|
28
|
-
height: 32px;
|
|
29
|
-
border: 1px solid var(--border-color, #ccc);
|
|
30
|
-
cursor: pointer;
|
|
31
|
-
border-radius: 4px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.color-swatch:hover {
|
|
35
|
-
border-color: var(--primary-color, #007acc);
|
|
36
|
-
box-shadow: 0 0 4px rgba(0, 122, 204, 0.3);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.picker-row {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
gap: 8px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.picker-row label {
|
|
46
|
-
flex-shrink: 0;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.picker-row input[type="color"] {
|
|
50
|
-
flex: 1;
|
|
51
|
-
height: 32px;
|
|
52
|
-
border: 1px solid var(--border-color, #ccc);
|
|
53
|
-
border-radius: 4px;
|
|
54
|
-
cursor: pointer;
|
|
55
|
-
}
|
|
56
|
-
`];constructor(){super(),this.colors="#000000,#e60000,#ff9900,#ffff00,#008a00,#0066cc,#9933ff,#ffffff,#facccc,#ffebcc,#ffffcc,#cce8cc,#cce0f5,#ebd6ff",this.disableRemove=!1,this.disablePicker=!1,this.icon="format_color_text"}connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleRemove=e=>{this.editor&&this.editor.removeTextColor(),this.opened=!1};handleSwatchClick=e=>{const o=e.target.style.backgroundColor;if(this.editor&&o){const e=o.match(/\d+/g),t=e?"#"+e.map(e=>parseInt(e).toString(16).padStart(2,"0")).join(""):o;this.editor.setTextColor(t)}this.opened=!1};handlePickerChange=e=>{const o=e.target.value;this.editor&&o&&this.editor.setTextColor(o),this.opened=!1};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}getColorArray(){return this.colors.split(",").map(e=>e.trim()).filter(e=>e)}render(){this.hidden="code"===this.editorMode;const e=this.getColorArray();return o`
|
|
57
|
-
<k-dropdown
|
|
58
|
-
?opened=${this.opened}
|
|
59
|
-
@opened=${this.handleOpened}
|
|
60
|
-
@closed=${this.handleClosed}
|
|
61
|
-
>
|
|
62
|
-
<button
|
|
63
|
-
slot="trigger"
|
|
64
|
-
class="${this.buttonClasses}"
|
|
65
|
-
>
|
|
66
|
-
<k-icon name="format_color_text"></k-icon>
|
|
67
|
-
</button>
|
|
68
|
-
|
|
69
|
-
<div class="dropdown-content">
|
|
70
|
-
${this.disableRemove?"":o`
|
|
71
|
-
<button class="remove-btn" @click=${this.handleRemove}>
|
|
72
|
-
Remove Color
|
|
73
|
-
</button>
|
|
74
|
-
`}
|
|
75
|
-
|
|
76
|
-
<div class="color-swatches">
|
|
77
|
-
${e.map(e=>o`
|
|
78
|
-
<button
|
|
79
|
-
class="color-swatch"
|
|
80
|
-
style="background-color: ${e}"
|
|
81
|
-
@click=${this.handleSwatchClick}
|
|
82
|
-
></button>
|
|
83
|
-
`)}
|
|
84
|
-
</div>
|
|
85
|
-
|
|
86
|
-
${this.disablePicker?"":o`
|
|
87
|
-
<div class="picker-row">
|
|
88
|
-
<label>Custom:</label>
|
|
89
|
-
<input
|
|
90
|
-
type="color"
|
|
91
|
-
@input=${this.handlePickerChange}
|
|
92
|
-
/>
|
|
93
|
-
</div>
|
|
94
|
-
`}
|
|
95
|
-
</div>
|
|
96
|
-
</k-dropdown>
|
|
97
|
-
`}}customElements.define("k-hec-text-color",r);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as i}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{static properties={editorMode:{type:String,state:!0}};static styles=[t.styles,i`
|
|
2
|
-
:host {
|
|
3
|
-
display: inline-flex;
|
|
4
|
-
}
|
|
5
|
-
`];connectedCallback(){super.connectedCallback(),this.updateEditorMode(),this.editor?.addEventListener("mode-changed",()=>this.updateEditorMode())}handleClick=()=>{this.editor&&this.editor.underline()};updateEditorMode(){this.editor&&(this.editorMode=this.editor.mode)}render(){return this.hidden="code"===this.editorMode,e`
|
|
6
|
-
<button class="${this.buttonClasses}" @click="${this.handleClick}">
|
|
7
|
-
<slot name="icon">
|
|
8
|
-
<k-icon name="format_underlined"></k-icon>
|
|
9
|
-
</slot>
|
|
10
|
-
<slot></slot>
|
|
11
|
-
</button>
|
|
12
|
-
`}}customElements.define("k-hec-underline",o);
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import t from"./HtmlEditorControl.js";import{html as e,css as s}from"../../lit-all.min.js";export default class r extends t{static properties={count:{type:Number,state:!0}};constructor(){super(),this.count=0}connectedCallback(){super.connectedCallback(),this.editor&&(this.editor.addEventListener("ready",()=>{this.updateCount()}),this.editor.addEventListener("change",()=>{this.updateCount()}),setTimeout(()=>this.updateCount(),0))}updateCount=()=>{if(!this.editor)return;const t=((new DOMParser).parseFromString(this.editor.getValue(),"text/html").body.innerText||"").trim().split(/\s+/).filter(t=>t.length>0);this.count=t.length};render(){return e`
|
|
2
|
-
<span class="word-count">
|
|
3
|
-
<slot name="label">Words:</slot> ${this.count}
|
|
4
|
-
</span>
|
|
5
|
-
`}static styles=[t.styles,s`
|
|
6
|
-
:host {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
align-items: center;
|
|
9
|
-
padding: 0 0.5rem;
|
|
10
|
-
font-size: 0.875rem;
|
|
11
|
-
color: var(--text-color-secondary, #666);
|
|
12
|
-
}
|
|
13
|
-
.word-count {
|
|
14
|
-
display: flex;
|
|
15
|
-
align-items: center;
|
|
16
|
-
gap: 0.25rem;
|
|
17
|
-
}
|
|
18
|
-
`]}customElements.define("k-hec-word-count",r);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import t from"./MarkdownEditorControl.js";import{html as l}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{constructor(){super(),this.label="Bold (Cmd/Ctrl+B)"}command(){this.wrapSelection("**","**","bold text")}render(){return l`
|
|
2
|
-
<button
|
|
3
|
-
type="button"
|
|
4
|
-
class=${this.btnClass}
|
|
5
|
-
title=${this.label}
|
|
6
|
-
aria-label=${this.label}
|
|
7
|
-
@click=${this.handleClick}
|
|
8
|
-
>
|
|
9
|
-
<k-icon name="format_bold"></k-icon>
|
|
10
|
-
</button>
|
|
11
|
-
`}}customElements.define("k-md-bold",o);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import t from"./MarkdownEditorControl.js";import{html as l}from"../../lit-all.min.js";import"../Icon.js";export default class e extends t{constructor(){super(),this.label="Bulleted list"}command(){this.insertLinePrefix("- ")}render(){return l`
|
|
2
|
-
<button
|
|
3
|
-
type="button"
|
|
4
|
-
class=${this.btnClass}
|
|
5
|
-
title=${this.label}
|
|
6
|
-
aria-label=${this.label}
|
|
7
|
-
@click=${this.handleClick}
|
|
8
|
-
>
|
|
9
|
-
<k-icon name="format_list_bulleted"></k-icon>
|
|
10
|
-
</button>
|
|
11
|
-
`}}customElements.define("k-md-bullet-list",e);
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import t from"./MarkdownEditorControl.js";import{html as e}from"../../lit-all.min.js";import"../Icon.js";export default class o extends t{constructor(){super(),this.label="Code"}command(){this.getSelection().text.includes("\n")?this.wrapSelection("```\n","\n```","code"):this.wrapSelection("`","`","code")}render(){return e`
|
|
2
|
-
<button
|
|
3
|
-
type="button"
|
|
4
|
-
class=${this.btnClass}
|
|
5
|
-
title=${this.label}
|
|
6
|
-
aria-label=${this.label}
|
|
7
|
-
@click=${this.handleClick}
|
|
8
|
-
>
|
|
9
|
-
<k-icon name="code"></k-icon>
|
|
10
|
-
</button>
|
|
11
|
-
`}}customElements.define("k-md-code",o);
|