kempo-ui 0.4.19 → 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 +20 -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/0006-create-pagination-component.md +1 -1
- 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/tasks/0006-create-pagination-component/screenshot-01-top.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-02-controls.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-03-preconfigured.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-04-live-demo-page1.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-05-live-demo-page2.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-06-live-demo-last-page.png +0 -0
- package/tasks/0006-create-pagination-component/screenshot-07-js-reference.png +0 -0
- package/tasks/0006-create-pagination-component.md +0 -136
- package/tests/components/tableControls/TableControl.browser-test.js +0 -300
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { css, html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Dropdown.js';
|
|
4
|
+
import '../Icon.js';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
Base class for dropdown-style controls. The trigger button is provided
|
|
8
|
+
by this base; subclasses just provide children via the default slot
|
|
9
|
+
(and optionally <slot name="icon"> / <slot name="label">).
|
|
10
|
+
|
|
11
|
+
Items slotted into the menu have their individual borders/radii
|
|
12
|
+
overridden so the menu reads as a single unified surface.
|
|
13
|
+
*/
|
|
14
|
+
export default class ControlMenu extends Control {
|
|
15
|
+
static properties = {
|
|
16
|
+
...Control.properties,
|
|
17
|
+
opened: { type: Boolean, reflect: true }
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
constructor() {
|
|
21
|
+
super();
|
|
22
|
+
this.opened = false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/*
|
|
26
|
+
Event Handlers
|
|
27
|
+
*/
|
|
28
|
+
handleToggle = () => { this.opened = !this.opened; };
|
|
29
|
+
handleOpened = () => { this.opened = true; };
|
|
30
|
+
handleClosed = () => { this.opened = false; };
|
|
31
|
+
|
|
32
|
+
/*
|
|
33
|
+
Rendering
|
|
34
|
+
*/
|
|
35
|
+
render() {
|
|
36
|
+
return html`
|
|
37
|
+
<k-dropdown
|
|
38
|
+
?opened=${this.opened}
|
|
39
|
+
@opened=${this.handleOpened}
|
|
40
|
+
@closed=${this.handleClosed}
|
|
41
|
+
>
|
|
42
|
+
<button slot="trigger" class="no-btn icon-btn">
|
|
43
|
+
<slot name="icon"><k-icon name="arrow_drop_down"></k-icon></slot>
|
|
44
|
+
<slot name="label"></slot>
|
|
45
|
+
</button>
|
|
46
|
+
<slot></slot>
|
|
47
|
+
</k-dropdown>
|
|
48
|
+
`;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/*
|
|
52
|
+
Styles
|
|
53
|
+
*/
|
|
54
|
+
static styles = [
|
|
55
|
+
Control.styles,
|
|
56
|
+
css`
|
|
57
|
+
:host {
|
|
58
|
+
border: 1px solid var(--c_border);
|
|
59
|
+
border-radius: var(--radius);
|
|
60
|
+
margin: var(--spacer_q);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
k-dropdown {
|
|
64
|
+
display: inline-flex;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
button[slot="trigger"] {
|
|
68
|
+
display: inline-flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
gap: 0.5rem;
|
|
72
|
+
min-width: 2.5rem;
|
|
73
|
+
min-height: 2.5rem;
|
|
74
|
+
padding: 0 0.75rem;
|
|
75
|
+
background: transparent;
|
|
76
|
+
border: none;
|
|
77
|
+
color: inherit;
|
|
78
|
+
cursor: pointer;
|
|
79
|
+
font-size: inherit;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/* Slotted menu items: remove individual borders/radii so the menu
|
|
83
|
+
reads as a single unified surface. */
|
|
84
|
+
::slotted(:not([slot="icon"]):not([slot="label"])) {
|
|
85
|
+
display: block !important;
|
|
86
|
+
margin: 0 !important;
|
|
87
|
+
border: none !important;
|
|
88
|
+
border-radius: 0 !important;
|
|
89
|
+
border-bottom: 1px solid var(--c_border) !important;
|
|
90
|
+
}
|
|
91
|
+
::slotted(:not([slot="icon"]):not([slot="label"]):last-child) {
|
|
92
|
+
border-bottom: none !important;
|
|
93
|
+
}
|
|
94
|
+
`
|
|
95
|
+
];
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
customElements.define('kc-menu', ControlMenu);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class Minimap extends ButtonControl {
|
|
6
|
+
static requires = ['toggleMinimap'];
|
|
7
|
+
static hostMode = 'code';
|
|
8
|
+
static hostEvents = ['minimap-changed'];
|
|
9
|
+
|
|
10
|
+
static properties = {
|
|
11
|
+
...ButtonControl.properties,
|
|
12
|
+
active: { type: Boolean, reflect: true }
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
constructor() {
|
|
16
|
+
super();
|
|
17
|
+
this.active = false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
connectedCallback() {
|
|
21
|
+
super.connectedCallback();
|
|
22
|
+
if(!this.hasAttribute('title')) this.title = 'Toggle Minimap';
|
|
23
|
+
if(this.host) this.active = !!this.host.minimapEnabled;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
willUpdate(changed) {
|
|
27
|
+
super.willUpdate?.(changed);
|
|
28
|
+
if(this.host) this.active = !!this.host.minimapEnabled;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
handleAction() { this.host?.toggleMinimap?.(); }
|
|
32
|
+
|
|
33
|
+
render() { return html`<slot><k-icon name="map"></k-icon></slot>`; }
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
customElements.define('kc-minimap', Minimap);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
/*
|
|
6
|
+
Mode toggle (visual <-> code) — visible in all modes where the host
|
|
7
|
+
exposes toggleMode.
|
|
8
|
+
*/
|
|
9
|
+
export default class Mode extends ButtonControl {
|
|
10
|
+
static requires = ['toggleMode'];
|
|
11
|
+
|
|
12
|
+
connectedCallback() {
|
|
13
|
+
super.connectedCallback();
|
|
14
|
+
if(!this.hasAttribute('title')) this.title = 'Toggle Code View';
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
updated(changed) {
|
|
18
|
+
super.updated(changed);
|
|
19
|
+
const host = this.host;
|
|
20
|
+
if(host) this.toggleAttribute('active', host.mode === 'code');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
get mode() { return this.host?.mode; }
|
|
24
|
+
|
|
25
|
+
handleAction() { this.host?.toggleMode?.(); }
|
|
26
|
+
|
|
27
|
+
render() { return html`<slot><k-icon name="code"></k-icon></slot>`; }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
customElements.define('kc-mode', Mode);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class NumberList extends ButtonControl {
|
|
6
|
+
static requires = ['numberList'];
|
|
7
|
+
static hostMode = ['visual', 'write'];
|
|
8
|
+
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback();
|
|
11
|
+
if(!this.hasAttribute('title')) this.title = 'Numbered List';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
handleAction() { this.host?.numberList?.(); }
|
|
15
|
+
|
|
16
|
+
render() { return html`<slot><k-icon name="format_list_numbered"></k-icon></slot>`; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define('kc-number-list', NumberList);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
|
|
4
|
+
export default class PgPageCount extends Control {
|
|
5
|
+
static hostEvents = ['page-change'];
|
|
6
|
+
|
|
7
|
+
render() {
|
|
8
|
+
return html`<span>${this.host?.totalPages ?? 1}</span>`;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
customElements.define('kc-pg-count', PgPageCount);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class PgFirst extends ButtonControl {
|
|
6
|
+
static hostEvents = ['page-change'];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
super.connectedCallback();
|
|
10
|
+
if(!this.hasAttribute('title')) this.title = 'First Page';
|
|
11
|
+
if(!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'First Page');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
willUpdate(changed) {
|
|
15
|
+
super.willUpdate(changed);
|
|
16
|
+
const host = this.host;
|
|
17
|
+
this.disabled = !host || host.page <= 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
handleAction() {
|
|
21
|
+
const host = this.host;
|
|
22
|
+
if(host) host.page = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() { return html`<slot><k-icon name="chevron-line" direction="left"></k-icon></slot>`; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
customElements.define('kc-pg-first', PgFirst);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
import '../Combobox.js';
|
|
4
|
+
|
|
5
|
+
export default class PgGotoPage extends Control {
|
|
6
|
+
static hostEvents = ['page-change'];
|
|
7
|
+
|
|
8
|
+
handleInput = (e) => {
|
|
9
|
+
const host = this.host;
|
|
10
|
+
if(host && e.target.value){
|
|
11
|
+
const page = parseInt(e.target.value, 10);
|
|
12
|
+
if(!isNaN(page) && page > 0) host.page = page;
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
handleBlur = (e) => {
|
|
17
|
+
const host = this.host;
|
|
18
|
+
if(host) e.target.value = String(host.page);
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
render() {
|
|
22
|
+
const host = this.host;
|
|
23
|
+
const current = host?.page ?? 1;
|
|
24
|
+
const total = host?.totalPages ?? 1;
|
|
25
|
+
return html`
|
|
26
|
+
<k-combobox
|
|
27
|
+
.value=${String(current)}
|
|
28
|
+
@input=${this.handleInput}
|
|
29
|
+
@blur=${this.handleBlur}
|
|
30
|
+
placeholder="page"
|
|
31
|
+
no-results-message="Invalid Page"
|
|
32
|
+
>
|
|
33
|
+
${Array.from({ length: total }, (_, i) => html`
|
|
34
|
+
<k-option value=${i + 1}>${i + 1}</k-option>
|
|
35
|
+
`)}
|
|
36
|
+
</k-combobox>
|
|
37
|
+
`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
static styles = [
|
|
41
|
+
Control.styles,
|
|
42
|
+
css`
|
|
43
|
+
k-combobox { width: 5rem; }
|
|
44
|
+
`
|
|
45
|
+
];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
customElements.define('kc-pg-goto-page', PgGotoPage);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
|
|
4
|
+
export default class PgItemsPerPage extends Control {
|
|
5
|
+
static hostEvents = ['page-change'];
|
|
6
|
+
|
|
7
|
+
handleChange = (e) => {
|
|
8
|
+
const host = this.host;
|
|
9
|
+
if(host) host.itemsPerPage = parseInt(e.target.value, 10);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
render() {
|
|
13
|
+
const host = this.host;
|
|
14
|
+
const current = host?.itemsPerPage ?? 10;
|
|
15
|
+
const options = host?.pageSizes ?? [5, 10, 25, 50, 100];
|
|
16
|
+
return html`
|
|
17
|
+
<label>
|
|
18
|
+
<slot>Items per page:</slot>
|
|
19
|
+
<select @change=${this.handleChange}>
|
|
20
|
+
${options.map(n => html`<option value=${n} ?selected=${n === current}>${n}</option>`)}
|
|
21
|
+
</select>
|
|
22
|
+
</label>
|
|
23
|
+
`;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
static styles = [
|
|
27
|
+
Control.styles,
|
|
28
|
+
css`
|
|
29
|
+
:host { align-items: center; }
|
|
30
|
+
label { display: inline-flex; align-items: center; gap: var(--spacer_q, 0.25rem); padding: 0; white-space: nowrap; }
|
|
31
|
+
select { min-height: 2.5rem; box-sizing: border-box; }
|
|
32
|
+
`
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
customElements.define('kc-pg-items-per-page', PgItemsPerPage);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class PgLast extends ButtonControl {
|
|
6
|
+
static hostEvents = ['page-change'];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
super.connectedCallback();
|
|
10
|
+
if(!this.hasAttribute('title')) this.title = 'Last Page';
|
|
11
|
+
if(!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Last Page');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
willUpdate(changed) {
|
|
15
|
+
super.willUpdate(changed);
|
|
16
|
+
const host = this.host;
|
|
17
|
+
this.disabled = !host || host.page >= host.totalPages;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
handleAction() {
|
|
21
|
+
const host = this.host;
|
|
22
|
+
if(host) host.page = host.totalPages;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() { return html`<slot><k-icon name="chevron-line"></k-icon></slot>`; }
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
customElements.define('kc-pg-last', PgLast);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class PgNext extends ButtonControl {
|
|
6
|
+
static hostEvents = ['page-change'];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
super.connectedCallback();
|
|
10
|
+
if(!this.hasAttribute('title')) this.title = 'Next Page';
|
|
11
|
+
if(!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Next Page');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
willUpdate(changed) {
|
|
15
|
+
super.willUpdate(changed);
|
|
16
|
+
const host = this.host;
|
|
17
|
+
this.disabled = !host || host.page >= host.totalPages;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
handleAction() { this.host?.nextPage(); }
|
|
21
|
+
|
|
22
|
+
render() { return html`<slot><k-icon name="chevron"></k-icon></slot>`; }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
customElements.define('kc-pg-next', PgNext);
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
|
|
4
|
+
export default class PgPageInfo extends Control {
|
|
5
|
+
static hostEvents = ['page-change'];
|
|
6
|
+
|
|
7
|
+
render() {
|
|
8
|
+
const host = this.host;
|
|
9
|
+
const current = host?.page ?? 1;
|
|
10
|
+
const total = host?.totalPages ?? 1;
|
|
11
|
+
return html`<span class="info">Page ${current} of ${total}</span>`;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
static styles = [
|
|
15
|
+
Control.styles,
|
|
16
|
+
css`
|
|
17
|
+
.info { padding: 0 var(--spacer_q, 0.25rem); white-space: nowrap; }
|
|
18
|
+
`
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
customElements.define('kc-pg-page-info', PgPageInfo);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class PgPrev extends ButtonControl {
|
|
6
|
+
static hostEvents = ['page-change'];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
super.connectedCallback();
|
|
10
|
+
if(!this.hasAttribute('title')) this.title = 'Previous Page';
|
|
11
|
+
if(!this.hasAttribute('aria-label')) this.setAttribute('aria-label', 'Previous Page');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
willUpdate(changed) {
|
|
15
|
+
super.willUpdate(changed);
|
|
16
|
+
const host = this.host;
|
|
17
|
+
this.disabled = !host || host.page <= 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
handleAction() { this.host?.previousPage(); }
|
|
21
|
+
|
|
22
|
+
render() { return html`<slot><k-icon name="chevron" direction="left"></k-icon></slot>`; }
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
customElements.define('kc-pg-prev', PgPrev);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class Quote extends ButtonControl {
|
|
6
|
+
static requires = ['quote'];
|
|
7
|
+
static hostMode = ['visual', 'write'];
|
|
8
|
+
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback();
|
|
11
|
+
if(!this.hasAttribute('title')) this.title = 'Quote';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
handleAction() { this.host?.quote?.(); }
|
|
15
|
+
|
|
16
|
+
render() { return html`<slot><k-icon name="format_quote"></k-icon></slot>`; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define('kc-quote', Quote);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class Redo extends ButtonControl {
|
|
6
|
+
static requires = ['redo'];
|
|
7
|
+
|
|
8
|
+
connectedCallback() {
|
|
9
|
+
super.connectedCallback();
|
|
10
|
+
if(!this.hasAttribute('title')) this.title = 'Redo';
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
handleAction() { this.host?.redo?.(); }
|
|
14
|
+
|
|
15
|
+
render() { return html`<slot><k-icon name="redo"></k-icon></slot>`; }
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
customElements.define('kc-redo', Redo);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import ShadowComponent from '../ShadowComponent.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
|
|
4
|
+
export default class ControlSpacer extends ShadowComponent {
|
|
5
|
+
static styles = css`
|
|
6
|
+
:host {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
flex: 1;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
|
|
12
|
+
render() { return html``; }
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
customElements.define('kc-spacer', ControlSpacer);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class Strikethrough extends ButtonControl {
|
|
6
|
+
static requires = ['strikethrough'];
|
|
7
|
+
static hostMode = ['visual', 'write'];
|
|
8
|
+
|
|
9
|
+
connectedCallback() {
|
|
10
|
+
super.connectedCallback();
|
|
11
|
+
if(!this.hasAttribute('title')) this.title = 'Strikethrough';
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
handleAction() { this.host?.strikethrough?.(); }
|
|
15
|
+
|
|
16
|
+
render() { return html`<slot><k-icon name="strikethrough_s"></k-icon></slot>`; }
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
customElements.define('kc-strikethrough', Strikethrough);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class TcDeleteRecord extends ButtonControl {
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
super.connectedCallback();
|
|
8
|
+
if(!this.hasAttribute('title')) this.title = 'Delete Record';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
get record() {
|
|
12
|
+
const $rec = this.closest('.record');
|
|
13
|
+
if($rec){
|
|
14
|
+
const idx = $rec.dataset.index;
|
|
15
|
+
if(idx !== undefined) return this.host?.records?.[idx];
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
delete() { this.handleAction(); }
|
|
21
|
+
|
|
22
|
+
handleAction() {
|
|
23
|
+
const rec = this.record;
|
|
24
|
+
if(rec) this.host?.deleteRecord(rec);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
render() { return html`<slot><k-icon name="delete"></k-icon></slot>`; }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
customElements.define('kc-tc-delete-record', TcDeleteRecord);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class TcDeleteSelected extends ButtonControl {
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
super.connectedCallback();
|
|
8
|
+
if(!this.hasAttribute('title')) this.title = 'Delete Selected';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
handleAction() { this.host?.deleteSelected(); }
|
|
12
|
+
|
|
13
|
+
render() { return html`<slot><k-icon name="delete_sweep"></k-icon></slot>`; }
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
customElements.define('kc-tc-delete-selected', TcDeleteSelected);
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Control from './Control.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class TcEdit extends Control {
|
|
6
|
+
static hostEvents = ['editingChange'];
|
|
7
|
+
|
|
8
|
+
static properties = {
|
|
9
|
+
...Control.properties,
|
|
10
|
+
isEditing: { type: Boolean, state: true }
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
constructor() {
|
|
14
|
+
super();
|
|
15
|
+
this.isEditing = false;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
get record() {
|
|
19
|
+
const $rec = this.closest('.record');
|
|
20
|
+
if($rec){
|
|
21
|
+
const idx = $rec.dataset.index;
|
|
22
|
+
if(idx !== undefined) return this.host?.records?.[idx];
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
connectedCallback() {
|
|
28
|
+
super.connectedCallback();
|
|
29
|
+
const host = this.host;
|
|
30
|
+
if(host){
|
|
31
|
+
host.addEventListener('editingChange', (e) => {
|
|
32
|
+
if(e.detail.record === this.record) this.isEditing = e.detail.editing;
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
handleEdit = () => {
|
|
38
|
+
const rec = this.record;
|
|
39
|
+
if(rec) this.host?.editRecord(rec);
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
handleSave = () => {
|
|
43
|
+
const rec = this.record;
|
|
44
|
+
if(rec) this.host?.saveEditedRecord(rec);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
handleCancel = () => {
|
|
48
|
+
const rec = this.record;
|
|
49
|
+
if(rec) this.host?.cancelEditedRecord(rec);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
render() {
|
|
53
|
+
return this.isEditing ? html`
|
|
54
|
+
<button class="edit-btn save" @click=${this.handleSave}><k-icon name="check"></k-icon></button>
|
|
55
|
+
<button class="edit-btn cancel" @click=${this.handleCancel}><k-icon name="close"></k-icon></button>
|
|
56
|
+
` : html`
|
|
57
|
+
<button class="edit-btn" @click=${this.handleEdit}><k-icon name="edit"></k-icon></button>
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
static styles = [
|
|
62
|
+
Control.styles,
|
|
63
|
+
css`
|
|
64
|
+
:host { align-items: baseline; gap: 0.25rem; }
|
|
65
|
+
.edit-btn { background: transparent; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: var(--radius); }
|
|
66
|
+
.edit-btn:hover { background: oklch(from var(--c_bg__inv) l c h / 0.1); }
|
|
67
|
+
.save { color: var(--c_success, green); }
|
|
68
|
+
.cancel { color: var(--c_danger, red); }
|
|
69
|
+
`
|
|
70
|
+
];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
customElements.define('kc-tc-edit', TcEdit);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import ButtonControl from './ButtonControl.js';
|
|
2
|
+
import { html, css } from '../../lit-all.min.js';
|
|
3
|
+
import '../Icon.js';
|
|
4
|
+
|
|
5
|
+
export default class TcExportCsv extends ButtonControl {
|
|
6
|
+
connectedCallback() {
|
|
7
|
+
super.connectedCallback();
|
|
8
|
+
if(!this.hasAttribute('title')) this.title = 'Export CSV';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
get record() {
|
|
12
|
+
const $rec = this.closest('.record');
|
|
13
|
+
if($rec){
|
|
14
|
+
const idx = $rec.dataset.index;
|
|
15
|
+
if(idx !== undefined) return this.host?.records?.[idx];
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
getCSV() {
|
|
21
|
+
const host = this.host;
|
|
22
|
+
if(!host) return '';
|
|
23
|
+
const fields = [];
|
|
24
|
+
host.fields.forEach(({ name, calculator }) => { if(!calculator) fields.push(name); });
|
|
25
|
+
let csv = fields.join(',') + '\n';
|
|
26
|
+
const rec = this.record;
|
|
27
|
+
if(rec){
|
|
28
|
+
csv += fields.map(f => rec[f] || '').join(',') + '\n';
|
|
29
|
+
} else {
|
|
30
|
+
host.records.forEach(r => { csv += fields.map(f => r[f] || '').join(',') + '\n'; });
|
|
31
|
+
}
|
|
32
|
+
return csv;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export() { this.handleAction(); }
|
|
36
|
+
|
|
37
|
+
handleAction() {
|
|
38
|
+
const data = this.getCSV();
|
|
39
|
+
const blob = new Blob([data], { type: 'text/csv' });
|
|
40
|
+
const url = URL.createObjectURL(blob);
|
|
41
|
+
const a = document.createElement('a');
|
|
42
|
+
a.href = url;
|
|
43
|
+
a.download = 'data.csv';
|
|
44
|
+
a.click();
|
|
45
|
+
URL.revokeObjectURL(url);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
render() {
|
|
49
|
+
return html`<slot><k-icon name="export-file"></k-icon> Export CSV</slot>`;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
static styles = [
|
|
53
|
+
ButtonControl.styles,
|
|
54
|
+
css`
|
|
55
|
+
:host { gap: 0.25rem; padding: 0 var(--spacer_h, 0.5rem); }
|
|
56
|
+
`
|
|
57
|
+
];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
customElements.define('kc-tc-export-csv', TcExportCsv);
|