kempo 4.2.4 → 4.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +60 -0
- package/README.md +427 -0
- package/app-drizzle.config.js +14 -0
- package/app-public/.config.json +25 -0
- package/app-public/account/index.page.html +110 -0
- package/app-public/account/split2.template.html +36 -0
- package/app-public/default.template.html +24 -0
- package/app-public/forgot-password/index.page.html +79 -0
- package/app-public/index.page.html +16 -0
- package/app-public/init.js +2 -0
- package/app-public/kempo-global.global-disabled.html +0 -0
- package/app-public/kempo-global.global.html +6 -0
- package/app-public/login/index.page.html +51 -0
- package/app-public/manifest.json +87 -0
- package/app-public/media/hexagon.svg +22 -0
- package/app-public/media/icon-maskable.png +0 -0
- package/app-public/media/icon.svg +1 -0
- package/app-public/media/icon128.png +0 -0
- package/app-public/media/icon144.png +0 -0
- package/app-public/media/icon152.png +0 -0
- package/app-public/media/icon16-48.svg +19 -0
- package/app-public/media/icon16.png +0 -0
- package/app-public/media/icon192.png +0 -0
- package/app-public/media/icon256.png +0 -0
- package/app-public/media/icon32.png +0 -0
- package/app-public/media/icon384.png +0 -0
- package/app-public/media/icon48.png +0 -0
- package/app-public/media/icon512.png +0 -0
- package/app-public/media/icon64.png +0 -0
- package/app-public/media/icon72.png +0 -0
- package/app-public/media/icon96.png +0 -0
- package/app-public/media/kempo-fist.svg +21 -0
- package/app-public/media/nsx.jpg +0 -0
- package/app-public/nav.fragment.html +41 -0
- package/app-public/new-page.page.html +17 -0
- package/app-public/register/index.page.html +60 -0
- package/app-public/reset-password/[token]/index.html +123 -0
- package/app-public/reset-password/[token]/index.page.html +75 -0
- package/app-public/styles.css +1 -0
- package/app-public/test.page.html +20 -0
- package/app-public/verify-email/[token]/index.html +107 -0
- package/app-public/verify-email/[token]/index.page.html +59 -0
- package/app-public/verify-email/index.page.html +21 -0
- package/app-server/db/schema.js +19 -0
- package/bin/cli.js +468 -0
- package/dist/admin/accounts/groups/[name]/index.page.html +286 -0
- package/dist/admin/accounts/groups/index.page.html +171 -0
- package/dist/admin/accounts/permissions/index.page.html +193 -0
- package/dist/admin/accounts/users/[id]/index.page.html +314 -0
- package/dist/admin/accounts/users/index.page.html +160 -0
- package/dist/admin/components/AddGroupControl.js +6 -0
- package/dist/admin/components/AddGroupControl.js.map +1 -0
- package/dist/admin/components/ClearExpiredSessionsControl.js +6 -0
- package/dist/admin/components/ClearExpiredSessionsControl.js.map +1 -0
- package/dist/admin/components/FragmentEditor.js +101 -0
- package/dist/admin/components/FragmentEditor.js.map +1 -0
- package/dist/admin/components/GlobalContentEditor.js +85 -0
- package/dist/admin/components/GlobalContentEditor.js.map +1 -0
- package/dist/admin/components/GroupDeleteSelected.js +6 -0
- package/dist/admin/components/GroupDeleteSelected.js.map +1 -0
- package/dist/admin/components/GroupRemoveRecord.js +6 -0
- package/dist/admin/components/GroupRemoveRecord.js.map +1 -0
- package/dist/admin/components/Monaco.js +2 -0
- package/dist/admin/components/Monaco.js.map +1 -0
- package/dist/admin/components/PageEditor.js +138 -0
- package/dist/admin/components/PageEditor.js.map +1 -0
- package/dist/admin/components/TableRowDelete.js +4 -0
- package/dist/admin/components/TableRowDelete.js.map +1 -0
- package/dist/admin/components/TableRowLink.js +8 -0
- package/dist/admin/components/TableRowLink.js.map +1 -0
- package/dist/admin/components/TemplateEditor.js +125 -0
- package/dist/admin/components/TemplateEditor.js.map +1 -0
- package/dist/admin/components/ValueEditor.js +40 -0
- package/dist/admin/components/ValueEditor.js.map +1 -0
- package/dist/admin/components/tableControls/AddMember.js +6 -0
- package/dist/admin/components/tableControls/AddMember.js.map +1 -0
- package/dist/admin/components/tableControls/AddPermission.js +6 -0
- package/dist/admin/components/tableControls/AddPermission.js.map +1 -0
- package/dist/admin/components/tableControls/InstallExtension.js +6 -0
- package/dist/admin/components/tableControls/InstallExtension.js.map +1 -0
- package/dist/admin/components/tableControls/UninstallExtension.js +6 -0
- package/dist/admin/components/tableControls/UninstallExtension.js.map +1 -0
- package/dist/admin/content/fragments/edit/index.page.html +4 -0
- package/dist/admin/content/fragments/index.page.html +169 -0
- package/dist/admin/content/globals/edit/index.page.html +4 -0
- package/dist/admin/content/globals/index.page.html +152 -0
- package/dist/admin/content/pages/edit/index.page.html +4 -0
- package/dist/admin/content/pages/index.page.html +218 -0
- package/dist/admin/content/templates/edit/index.page.html +4 -0
- package/dist/admin/content/templates/index.page.html +193 -0
- package/dist/admin/default.template.html +9 -0
- package/dist/admin/extensions/index.page.html +32 -0
- package/dist/admin/icons/article.svg +1 -0
- package/dist/admin/icons/browse.svg +1 -0
- package/dist/admin/icons/cards_stack.svg +1 -0
- package/dist/admin/icons/content.svg +1 -0
- package/dist/admin/icons/docs.svg +1 -0
- package/dist/admin/icons/drive_file_move.svg +1 -0
- package/dist/admin/icons/extension.svg +1 -0
- package/dist/admin/icons/globe.svg +1 -0
- package/dist/admin/icons/group.svg +1 -0
- package/dist/admin/icons/lock.svg +1 -0
- package/dist/admin/icons/lock_add.svg +1 -0
- package/dist/admin/icons/manage-accounts.svg +1 -0
- package/dist/admin/icons/person.svg +1 -0
- package/dist/admin/icons/person_add.svg +1 -0
- package/dist/admin/icons/preview.svg +1 -0
- package/dist/admin/icons/save.svg +1 -0
- package/dist/admin/icons/segment.svg +1 -0
- package/dist/admin/icons/timer_off.svg +1 -0
- package/dist/admin/icons/web.svg +1 -0
- package/dist/admin/index.page.html +4 -0
- package/dist/admin/init.js +2 -0
- package/dist/admin/init.js.map +1 -0
- package/dist/admin/known-extensions.json +1 -0
- package/dist/admin/nav.fragment.html +20 -0
- package/dist/admin/settings/[owner]/[name]/index.page.html +260 -0
- package/dist/admin/settings/index.page.html +203 -0
- package/dist/kempo/api/admin-globals/DELETE.js +2 -0
- package/dist/kempo/api/admin-globals/DELETE.js.map +1 -0
- package/dist/kempo/api/admin-globals/GET.js +2 -0
- package/dist/kempo/api/admin-globals/GET.js.map +1 -0
- package/dist/kempo/api/admin-globals/POST.js +2 -0
- package/dist/kempo/api/admin-globals/POST.js.map +1 -0
- package/dist/kempo/api/admin-globals/[id]/GET.js +2 -0
- package/dist/kempo/api/admin-globals/[id]/GET.js.map +1 -0
- package/dist/kempo/api/admin-globals/[id]/PUT.js +2 -0
- package/dist/kempo/api/admin-globals/[id]/PUT.js.map +1 -0
- package/dist/kempo/api/admin-globals/[id]/disable/PUT.js +2 -0
- package/dist/kempo/api/admin-globals/[id]/disable/PUT.js.map +1 -0
- package/dist/kempo/api/admin-globals/[id]/enable/PUT.js +2 -0
- package/dist/kempo/api/admin-globals/[id]/enable/PUT.js.map +1 -0
- package/dist/kempo/api/auth/change-password/POST.js +2 -0
- package/dist/kempo/api/auth/change-password/POST.js.map +1 -0
- package/dist/kempo/api/auth/login/email/POST.js +2 -0
- package/dist/kempo/api/auth/login/email/POST.js.map +1 -0
- package/dist/kempo/api/auth/logout/POST.js +2 -0
- package/dist/kempo/api/auth/logout/POST.js.map +1 -0
- package/dist/kempo/api/auth/register/email/POST.js +2 -0
- package/dist/kempo/api/auth/register/email/POST.js.map +1 -0
- package/dist/kempo/api/auth/reset-password/POST.js +2 -0
- package/dist/kempo/api/auth/reset-password/POST.js.map +1 -0
- package/dist/kempo/api/auth/session/GET.js +2 -0
- package/dist/kempo/api/auth/session/GET.js.map +1 -0
- package/dist/kempo/api/auth/verify-email/POST.js +2 -0
- package/dist/kempo/api/auth/verify-email/POST.js.map +1 -0
- package/dist/kempo/api/extensions/DELETE.js +2 -0
- package/dist/kempo/api/extensions/DELETE.js.map +1 -0
- package/dist/kempo/api/extensions/GET.js +2 -0
- package/dist/kempo/api/extensions/GET.js.map +1 -0
- package/dist/kempo/api/extensions/POST.js +2 -0
- package/dist/kempo/api/extensions/POST.js.map +1 -0
- package/dist/kempo/api/extensions/[name]/disable/POST.js +2 -0
- package/dist/kempo/api/extensions/[name]/disable/POST.js.map +1 -0
- package/dist/kempo/api/extensions/[name]/enable/POST.js +2 -0
- package/dist/kempo/api/extensions/[name]/enable/POST.js.map +1 -0
- package/dist/kempo/api/extensions/[name]/update/POST.js +2 -0
- package/dist/kempo/api/extensions/[name]/update/POST.js.map +1 -0
- package/dist/kempo/api/extensions/[name]/update-check/GET.js +2 -0
- package/dist/kempo/api/extensions/[name]/update-check/GET.js.map +1 -0
- package/dist/kempo/api/extensions/available/GET.js +2 -0
- package/dist/kempo/api/extensions/available/GET.js.map +1 -0
- package/dist/kempo/api/extensions/known/GET.js +2 -0
- package/dist/kempo/api/extensions/known/GET.js.map +1 -0
- package/dist/kempo/api/forgot-password/POST.js +2 -0
- package/dist/kempo/api/forgot-password/POST.js.map +1 -0
- package/dist/kempo/api/fragments/DELETE.js +2 -0
- package/dist/kempo/api/fragments/DELETE.js.map +1 -0
- package/dist/kempo/api/fragments/GET.js +2 -0
- package/dist/kempo/api/fragments/GET.js.map +1 -0
- package/dist/kempo/api/fragments/POST.js +2 -0
- package/dist/kempo/api/fragments/POST.js.map +1 -0
- package/dist/kempo/api/fragments/disable/PUT.js +2 -0
- package/dist/kempo/api/fragments/disable/PUT.js.map +1 -0
- package/dist/kempo/api/fragments/enable/PUT.js +2 -0
- package/dist/kempo/api/fragments/enable/PUT.js.map +1 -0
- package/dist/kempo/api/fragments/file/GET.js +2 -0
- package/dist/kempo/api/fragments/file/GET.js.map +1 -0
- package/dist/kempo/api/fragments/file/PATCH.js +2 -0
- package/dist/kempo/api/fragments/file/PATCH.js.map +1 -0
- package/dist/kempo/api/fragments/file/PUT.js +2 -0
- package/dist/kempo/api/fragments/file/PUT.js.map +1 -0
- package/dist/kempo/api/globals/DELETE.js +2 -0
- package/dist/kempo/api/globals/DELETE.js.map +1 -0
- package/dist/kempo/api/globals/GET.js +2 -0
- package/dist/kempo/api/globals/GET.js.map +1 -0
- package/dist/kempo/api/globals/POST.js +2 -0
- package/dist/kempo/api/globals/POST.js.map +1 -0
- package/dist/kempo/api/globals/disable/PUT.js +2 -0
- package/dist/kempo/api/globals/disable/PUT.js.map +1 -0
- package/dist/kempo/api/globals/enable/PUT.js +2 -0
- package/dist/kempo/api/globals/enable/PUT.js.map +1 -0
- package/dist/kempo/api/globals/entry/GET.js +2 -0
- package/dist/kempo/api/globals/entry/GET.js.map +1 -0
- package/dist/kempo/api/globals/entry/PUT.js +2 -0
- package/dist/kempo/api/globals/entry/PUT.js.map +1 -0
- package/dist/kempo/api/groups/DELETE.js +2 -0
- package/dist/kempo/api/groups/DELETE.js.map +1 -0
- package/dist/kempo/api/groups/GET.js +2 -0
- package/dist/kempo/api/groups/GET.js.map +1 -0
- package/dist/kempo/api/groups/PATCH.js +2 -0
- package/dist/kempo/api/groups/PATCH.js.map +1 -0
- package/dist/kempo/api/groups/POST.js +2 -0
- package/dist/kempo/api/groups/POST.js.map +1 -0
- package/dist/kempo/api/groups/[name]/GET.js +2 -0
- package/dist/kempo/api/groups/[name]/GET.js.map +1 -0
- package/dist/kempo/api/groups/[name]/members/DELETE.js +2 -0
- package/dist/kempo/api/groups/[name]/members/DELETE.js.map +1 -0
- package/dist/kempo/api/groups/[name]/members/GET.js +2 -0
- package/dist/kempo/api/groups/[name]/members/GET.js.map +1 -0
- package/dist/kempo/api/groups/[name]/members/POST.js +2 -0
- package/dist/kempo/api/groups/[name]/members/POST.js.map +1 -0
- package/dist/kempo/api/groups/[name]/permissions/DELETE.js +2 -0
- package/dist/kempo/api/groups/[name]/permissions/DELETE.js.map +1 -0
- package/dist/kempo/api/groups/[name]/permissions/GET.js +2 -0
- package/dist/kempo/api/groups/[name]/permissions/GET.js.map +1 -0
- package/dist/kempo/api/groups/[name]/permissions/POST.js +2 -0
- package/dist/kempo/api/groups/[name]/permissions/POST.js.map +1 -0
- package/dist/kempo/api/pages/DELETE.js +2 -0
- package/dist/kempo/api/pages/DELETE.js.map +1 -0
- package/dist/kempo/api/pages/GET.js +2 -0
- package/dist/kempo/api/pages/GET.js.map +1 -0
- package/dist/kempo/api/pages/POST.js +2 -0
- package/dist/kempo/api/pages/POST.js.map +1 -0
- package/dist/kempo/api/pages/directories/GET.js +2 -0
- package/dist/kempo/api/pages/directories/GET.js.map +1 -0
- package/dist/kempo/api/pages/disable/PUT.js +2 -0
- package/dist/kempo/api/pages/disable/PUT.js.map +1 -0
- package/dist/kempo/api/pages/enable/PUT.js +2 -0
- package/dist/kempo/api/pages/enable/PUT.js.map +1 -0
- package/dist/kempo/api/pages/file/GET.js +2 -0
- package/dist/kempo/api/pages/file/GET.js.map +1 -0
- package/dist/kempo/api/pages/file/PATCH.js +2 -0
- package/dist/kempo/api/pages/file/PATCH.js.map +1 -0
- package/dist/kempo/api/pages/file/PUT.js +2 -0
- package/dist/kempo/api/pages/file/PUT.js.map +1 -0
- package/dist/kempo/api/pages/templates/GET.js +2 -0
- package/dist/kempo/api/pages/templates/GET.js.map +1 -0
- package/dist/kempo/api/permissions/DELETE.js +2 -0
- package/dist/kempo/api/permissions/DELETE.js.map +1 -0
- package/dist/kempo/api/permissions/GET.js +2 -0
- package/dist/kempo/api/permissions/GET.js.map +1 -0
- package/dist/kempo/api/permissions/PATCH.js +2 -0
- package/dist/kempo/api/permissions/PATCH.js.map +1 -0
- package/dist/kempo/api/permissions/POST.js +2 -0
- package/dist/kempo/api/permissions/POST.js.map +1 -0
- package/dist/kempo/api/settings/[owner]/GET.js +2 -0
- package/dist/kempo/api/settings/[owner]/GET.js.map +1 -0
- package/dist/kempo/api/settings/[owner]/[name]/DELETE.js +2 -0
- package/dist/kempo/api/settings/[owner]/[name]/DELETE.js.map +1 -0
- package/dist/kempo/api/settings/[owner]/[name]/GET.js +2 -0
- package/dist/kempo/api/settings/[owner]/[name]/GET.js.map +1 -0
- package/dist/kempo/api/settings/[owner]/[name]/POST.js +2 -0
- package/dist/kempo/api/settings/[owner]/[name]/POST.js.map +1 -0
- package/dist/kempo/api/settings/public/GET.js +2 -0
- package/dist/kempo/api/settings/public/GET.js.map +1 -0
- package/dist/kempo/api/templates/DELETE.js +2 -0
- package/dist/kempo/api/templates/DELETE.js.map +1 -0
- package/dist/kempo/api/templates/GET.js +2 -0
- package/dist/kempo/api/templates/GET.js.map +1 -0
- package/dist/kempo/api/templates/POST.js +2 -0
- package/dist/kempo/api/templates/POST.js.map +1 -0
- package/dist/kempo/api/templates/disable/PUT.js +2 -0
- package/dist/kempo/api/templates/disable/PUT.js.map +1 -0
- package/dist/kempo/api/templates/enable/PUT.js +2 -0
- package/dist/kempo/api/templates/enable/PUT.js.map +1 -0
- package/dist/kempo/api/templates/file/GET.js +2 -0
- package/dist/kempo/api/templates/file/GET.js.map +1 -0
- package/dist/kempo/api/templates/file/PATCH.js +2 -0
- package/dist/kempo/api/templates/file/PATCH.js.map +1 -0
- package/dist/kempo/api/templates/file/PUT.js +2 -0
- package/dist/kempo/api/templates/file/PUT.js.map +1 -0
- package/dist/kempo/api/user/DELETE.js +2 -0
- package/dist/kempo/api/user/DELETE.js.map +1 -0
- package/dist/kempo/api/user/GET.js +2 -0
- package/dist/kempo/api/user/GET.js.map +1 -0
- package/dist/kempo/api/user/PATCH.js +2 -0
- package/dist/kempo/api/user/PATCH.js.map +1 -0
- package/dist/kempo/api/user/[userid]/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/groups/DELETE.js +2 -0
- package/dist/kempo/api/user/[userid]/groups/DELETE.js.map +1 -0
- package/dist/kempo/api/user/[userid]/groups/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/groups/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/groups/POST.js +2 -0
- package/dist/kempo/api/user/[userid]/groups/POST.js.map +1 -0
- package/dist/kempo/api/user/[userid]/permissions/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/permissions/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/permissions/all/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/permissions/all/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/permissions/list/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/permissions/list/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/permissions/some/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/permissions/some/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/sessions/DELETE.js +2 -0
- package/dist/kempo/api/user/[userid]/sessions/DELETE.js.map +1 -0
- package/dist/kempo/api/user/[userid]/sessions/GET.js +2 -0
- package/dist/kempo/api/user/[userid]/sessions/GET.js.map +1 -0
- package/dist/kempo/api/user/[userid]/sessions/expired/DELETE.js +2 -0
- package/dist/kempo/api/user/[userid]/sessions/expired/DELETE.js.map +1 -0
- package/dist/kempo/api/user/create/POST.js +2 -0
- package/dist/kempo/api/user/create/POST.js.map +1 -0
- package/dist/kempo/api/user/search/GET.js +2 -0
- package/dist/kempo/api/user/search/GET.js.map +1 -0
- package/dist/kempo/components/LogoutBtn.js +2 -0
- package/dist/kempo/components/LogoutBtn.js.map +1 -0
- package/dist/kempo/components/Menu.js +17 -0
- package/dist/kempo/components/Menu.js.map +1 -0
- package/dist/kempo/components/Permission.js +2 -0
- package/dist/kempo/components/Permission.js.map +1 -0
- package/dist/kempo/components/Role.js +2 -0
- package/dist/kempo/components/Role.js.map +1 -0
- package/dist/kempo/components/UserCreatedAt.js +2 -0
- package/dist/kempo/components/UserCreatedAt.js.map +1 -0
- package/dist/kempo/components/UserEmail.js +2 -0
- package/dist/kempo/components/UserEmail.js.map +1 -0
- package/dist/kempo/components/UserEmailVerified.js +2 -0
- package/dist/kempo/components/UserEmailVerified.js.map +1 -0
- package/dist/kempo/components/UserName.js +2 -0
- package/dist/kempo/components/UserName.js.map +1 -0
- package/dist/kempo/fetch.js +2 -0
- package/dist/kempo/fetch.js.map +1 -0
- package/dist/kempo/icons/format_indent_decrease.svg +1 -0
- package/dist/kempo/icons/format_indent_increase.svg +1 -0
- package/dist/kempo/icons/format_quote.svg +1 -0
- package/dist/kempo/icons/redo.svg +1 -0
- package/dist/kempo/icons/restart_alt.svg +1 -0
- package/dist/kempo/icons/subscript.svg +1 -0
- package/dist/kempo/icons/superscript.svg +1 -0
- package/dist/kempo/icons/undo.svg +1 -0
- package/dist/kempo/sdk.js +2 -0
- package/dist/kempo/sdk.js.map +1 -0
- package/middleware/extension-scope-router.js +255 -0
- package/middleware/kempo-auth.js +26 -0
- package/package.json +46 -19
- package/scripts/init-db.js +211 -0
- package/server/db/index.js +24 -0
- package/server/db/schema.js +173 -0
- package/server/sdk.js +192 -0
- package/server/utils/admin-global-content/createAdminGlobalContent.js +43 -0
- package/server/utils/admin-global-content/deleteAdminGlobalContent.js +34 -0
- package/server/utils/admin-global-content/deleteAdminGlobalContentByOwner.js +26 -0
- package/server/utils/admin-global-content/disableAdminGlobalContent.js +33 -0
- package/server/utils/admin-global-content/enableAdminGlobalContent.js +33 -0
- package/server/utils/admin-global-content/getAdminGlobalContent.js +28 -0
- package/server/utils/admin-global-content/helpers.js +47 -0
- package/server/utils/admin-global-content/listAdminGlobalContent.js +20 -0
- package/server/utils/admin-global-content/updateAdminGlobalContent.js +41 -0
- package/server/utils/auth/changePassword.js +27 -0
- package/server/utils/auth/getSession.js +35 -0
- package/server/utils/auth/loginEmail.js +66 -0
- package/server/utils/auth/logout.js +16 -0
- package/server/utils/auth/registerEmail.js +105 -0
- package/server/utils/auth/requestPasswordReset.js +62 -0
- package/server/utils/auth/resetPassword.js +58 -0
- package/server/utils/auth/sendVerificationEmail.js +57 -0
- package/server/utils/auth/verifyEmail.js +46 -0
- package/server/utils/email/sendEmail.js +42 -0
- package/server/utils/email/sendEmailFromTemplate.js +45 -0
- package/server/utils/extensions/checkExtensionUpdate.js +56 -0
- package/server/utils/extensions/createTablesFromSchema.js +57 -0
- package/server/utils/extensions/disableExtension.js +26 -0
- package/server/utils/extensions/enableExtension.js +26 -0
- package/server/utils/extensions/getExtension.js +34 -0
- package/server/utils/extensions/installExtension.js +134 -0
- package/server/utils/extensions/listExtensions.js +36 -0
- package/server/utils/extensions/scopeCache.js +18 -0
- package/server/utils/extensions/uninstallExtension.js +88 -0
- package/server/utils/extensions/updateExtension.js +159 -0
- package/server/utils/fragments/createFragment.js +57 -0
- package/server/utils/fragments/deleteFragment.js +35 -0
- package/server/utils/fragments/disableFragment.js +37 -0
- package/server/utils/fragments/enableFragment.js +30 -0
- package/server/utils/fragments/getFragment.js +36 -0
- package/server/utils/fragments/listFragments.js +32 -0
- package/server/utils/fragments/moveFragment.js +54 -0
- package/server/utils/fragments/updateFragment.js +58 -0
- package/server/utils/fs/parseFrontmatter.js +13 -0
- package/server/utils/fs/scanDir.js +26 -0
- package/server/utils/global-content/createGlobalContent.js +58 -0
- package/server/utils/global-content/deleteGlobalContent.js +52 -0
- package/server/utils/global-content/disableGlobalContent.js +57 -0
- package/server/utils/global-content/enableGlobalContent.js +53 -0
- package/server/utils/global-content/getGlobalContent.js +28 -0
- package/server/utils/global-content/helpers.js +33 -0
- package/server/utils/global-content/listGlobalContent.js +24 -0
- package/server/utils/global-content/updateGlobalContent.js +56 -0
- package/server/utils/groups/addUserToGroup.js +46 -0
- package/server/utils/groups/createGroup.js +32 -0
- package/server/utils/groups/deleteGroup.js +29 -0
- package/server/utils/groups/getGroup.js +25 -0
- package/server/utils/groups/getGroupMembers.js +33 -0
- package/server/utils/groups/listGroups.js +21 -0
- package/server/utils/groups/removeUserFromGroup.js +31 -0
- package/server/utils/groups/updateGroup.js +54 -0
- package/server/utils/hooks/createHook.js +29 -0
- package/server/utils/hooks/deleteHook.js +19 -0
- package/server/utils/hooks/getHook.js +19 -0
- package/server/utils/hooks/listHooks.js +30 -0
- package/server/utils/hooks/triggerHook.js +61 -0
- package/server/utils/hooks/updateHook.js +27 -0
- package/server/utils/pages/createPage.js +60 -0
- package/server/utils/pages/deletePage.js +35 -0
- package/server/utils/pages/disablePage.js +37 -0
- package/server/utils/pages/enablePage.js +30 -0
- package/server/utils/pages/getPage.js +53 -0
- package/server/utils/pages/listDirectories.js +18 -0
- package/server/utils/pages/listPages.js +40 -0
- package/server/utils/pages/listTemplates.js +52 -0
- package/server/utils/pages/movePage.js +54 -0
- package/server/utils/pages/updatePage.js +74 -0
- package/server/utils/permissions/addPermissionToGroup.js +43 -0
- package/server/utils/permissions/createPermission.js +43 -0
- package/server/utils/permissions/currentUserHasAllPermissions.js +24 -0
- package/server/utils/permissions/currentUserHasPermission.js +24 -0
- package/server/utils/permissions/currentUserHasSomePermissions.js +24 -0
- package/server/utils/permissions/deletePermission.js +29 -0
- package/server/utils/permissions/getAllPermissions.js +21 -0
- package/server/utils/permissions/getPermissionsForGroups.js +26 -0
- package/server/utils/permissions/getUserGroups.js +31 -0
- package/server/utils/permissions/getUserPermission.js +30 -0
- package/server/utils/permissions/getUserPermissions.js +16 -0
- package/server/utils/permissions/removePermissionFromGroup.js +31 -0
- package/server/utils/permissions/updatePermission.js +33 -0
- package/server/utils/permissions/userHasAllPermissions.js +31 -0
- package/server/utils/permissions/userHasPermission.js +13 -0
- package/server/utils/permissions/userHasSomePermissions.js +31 -0
- package/server/utils/sessions/createSession.js +36 -0
- package/server/utils/sessions/deleteExpiredUserSessions.js +22 -0
- package/server/utils/sessions/deleteSession.js +16 -0
- package/server/utils/sessions/deleteUserSessions.js +16 -0
- package/server/utils/sessions/getSessionById.js +21 -0
- package/server/utils/sessions/getSessionByToken.js +21 -0
- package/server/utils/sessions/getSessions.js +19 -0
- package/server/utils/sessions/getUserSessions.js +30 -0
- package/server/utils/settings/deleteSetting.js +24 -0
- package/server/utils/settings/getPublicSettings.js +22 -0
- package/server/utils/settings/getSetting.js +25 -0
- package/server/utils/settings/getSettingWithMetadata.js +33 -0
- package/server/utils/settings/getSettingsByOwner.js +23 -0
- package/server/utils/settings/helpers.js +29 -0
- package/server/utils/settings/listSettings.js +25 -0
- package/server/utils/settings/setSetting.js +49 -0
- package/server/utils/templates/createTemplate.js +71 -0
- package/server/utils/templates/deleteTemplate.js +35 -0
- package/server/utils/templates/disableTemplate.js +37 -0
- package/server/utils/templates/enableTemplate.js +30 -0
- package/server/utils/templates/getTemplate.js +30 -0
- package/server/utils/templates/moveTemplate.js +54 -0
- package/server/utils/templates/updateTemplate.js +46 -0
- package/server/utils/users/createUser.js +60 -0
- package/server/utils/users/deleteUser.js +19 -0
- package/server/utils/users/findUsersByEmail.js +35 -0
- package/server/utils/users/findUsersByName.js +35 -0
- package/server/utils/users/getUserByEmail.js +26 -0
- package/server/utils/users/getUserById.js +27 -0
- package/server/utils/users/getUsers.js +26 -0
- package/server/utils/users/searchUsers.js +53 -0
- package/server/utils/users/updateUser.js +38 -0
- package/.gitattributes +0 -2
- package/LICENSE +0 -21
- package/dist/components/Accordion.js +0 -1
- package/dist/components/Card.js +0 -1
- package/dist/components/Collapsible.js +0 -1
- package/dist/components/Component.js +0 -1
- package/dist/components/ContentSlider.js +0 -1
- package/dist/components/Dialog.js +0 -1
- package/dist/components/DirectoryViewer.js +0 -1
- package/dist/components/FocusCapture.js +0 -1
- package/dist/components/Icon.js +0 -1
- package/dist/components/Import.js +0 -1
- package/dist/components/LazyComponent.js +0 -1
- package/dist/components/PersistantCollapsible.js +0 -1
- package/dist/components/PhotoViewer.js +0 -1
- package/dist/components/ReactiveComponent.js +0 -1
- package/dist/components/ReactiveLazyComponent.js +0 -1
- package/dist/components/Resize.js +0 -1
- package/dist/components/Search.js +0 -1
- package/dist/components/ShowMore.js +0 -1
- package/dist/components/SideMenu.js +0 -1
- package/dist/components/Sortable.js +0 -1
- package/dist/components/Split.js +0 -1
- package/dist/components/Stacks.js +0 -1
- package/dist/components/Table.js +0 -1
- package/dist/components/Tabs.js +0 -1
- package/dist/components/Tags.js +0 -1
- package/dist/components/ThemeSwitcher.js +0 -1
- package/dist/components/Timestamp.js +0 -1
- package/dist/components/Toast.js +0 -1
- package/dist/components/Toggle.js +0 -1
- package/dist/components/tableControls/DeleteRecord.js +0 -1
- package/dist/components/tableControls/DeleteSelected.js +0 -1
- package/dist/components/tableControls/Edit.js +0 -1
- package/dist/components/tableControls/ExportCSV.js +0 -1
- package/dist/components/tableControls/ExportJson.js +0 -1
- package/dist/components/tableControls/FieldSortHide.js +0 -1
- package/dist/components/tableControls/Filters.js +0 -1
- package/dist/components/tableControls/FirstPage.js +0 -1
- package/dist/components/tableControls/HiddenCount.js +0 -1
- package/dist/components/tableControls/Hide.js +0 -1
- package/dist/components/tableControls/LastPage.js +0 -1
- package/dist/components/tableControls/NextPage.js +0 -1
- package/dist/components/tableControls/PageSelect.js +0 -1
- package/dist/components/tableControls/PageSize.js +0 -1
- package/dist/components/tableControls/PrevPage.js +0 -1
- package/dist/components/tableControls/Search.js +0 -1
- package/dist/components/tableControls/SelectCount.js +0 -1
- package/dist/components/tableControls/ShowAll.js +0 -1
- package/dist/components/tableControls/ShowHideFields.js +0 -1
- package/dist/components/tableControls/TableControl.js +0 -1
- package/dist/kempo-hljs.css +0 -1
- package/dist/kempo-styles.css +0 -1
- package/dist/kempo-vars.css +0 -1
- package/dist/utils/Server.js +0 -1
- package/dist/utils/cli.js +0 -1
- package/dist/utils/cookie.js +0 -1
- package/dist/utils/debounce.js +0 -1
- package/dist/utils/drag.js +0 -1
- package/dist/utils/element.js +0 -1
- package/dist/utils/files.js +0 -1
- package/dist/utils/formatTimestamp.js +0 -1
- package/dist/utils/fs-utils.js +0 -1
- package/dist/utils/fuzzyMatch.js +0 -1
- package/dist/utils/getPreferredTheme.js +0 -1
- package/dist/utils/loadCss.js +0 -1
- package/dist/utils/loadScript.js +0 -1
- package/dist/utils/minify.js +0 -1
- package/dist/utils/object.js +0 -1
- package/dist/utils/raf.js +0 -1
- package/dist/utils/string.js +0 -1
- package/dist/utils/toFunction.js +0 -1
- package/dist/utils/type.js +0 -1
- package/dist/utils/waitFrames.js +0 -1
- package/dist/utils/watchDirectoryHandle.js +0 -1
- package/dist/utils/watchWindowSize.js +0 -1
- package/docs/components/_template.html +0 -77
- package/docs/components/accordion.html +0 -124
- package/docs/components/card.html +0 -93
- package/docs/components/component.html +0 -92
- package/docs/components/content-slider.html +0 -195
- package/docs/components/dialog.html +0 -247
- package/docs/components/directory-viewer.html +0 -92
- package/docs/components/focus-capture.html +0 -70
- package/docs/components/icon.html +0 -160
- package/docs/components/import.html +0 -79
- package/docs/components/lazy-component.html +0 -86
- package/docs/components/reactive-component.html +0 -71
- package/docs/components/reactive-lazy-component.html +0 -71
- package/docs/components/resize.html +0 -154
- package/docs/components/search.html +0 -104
- package/docs/components/show-more.html +0 -125
- package/docs/components/side-menu.html +0 -148
- package/docs/components/sortable.html +0 -98
- package/docs/components/split.html +0 -128
- package/docs/components/table.html +0 -314
- package/docs/components/tableControls.html +0 -79
- package/docs/components/tableCustomFields.html +0 -115
- package/docs/components/tableFetchRecords.html +0 -116
- package/docs/components/tableFieldSortHide.html +0 -77
- package/docs/components/tablePagination.html +0 -102
- package/docs/components/tableRecordEditing.html +0 -146
- package/docs/components/tableRecordFiltering.html +0 -77
- package/docs/components/tableRecordHiding.html +0 -82
- package/docs/components/tableRecordSearching.html +0 -77
- package/docs/components/tableRecordSelection.html +0 -77
- package/docs/components/tableRowControls.html +0 -80
- package/docs/components/tableSorting.html +0 -75
- package/docs/components/tabs.html +0 -165
- package/docs/components/tags.html +0 -96
- package/docs/components/theme-switcher.html +0 -76
- package/docs/components/timestamp.html +0 -88
- package/docs/components/toast.html +0 -330
- package/docs/components/toggle.html +0 -157
- package/docs/icons/add.svg +0 -1
- package/docs/icons/arrow-back.svg +0 -1
- package/docs/icons/arrow-down-double.svg +0 -1
- package/docs/icons/arrow-down.svg +0 -1
- package/docs/icons/arrow-forward.svg +0 -1
- package/docs/icons/arrow-up-double.svg +0 -1
- package/docs/icons/arrow-up.svg +0 -1
- package/docs/icons/cards.svg +0 -1
- package/docs/icons/check.svg +0 -1
- package/docs/icons/chevron-left.svg +0 -1
- package/docs/icons/chevron-right.svg +0 -1
- package/docs/icons/close.svg +0 -2
- package/docs/icons/compare.svg +0 -1
- package/docs/icons/delete.svg +0 -1
- package/docs/icons/drag-handle.svg +0 -1
- package/docs/icons/drawing2.svg +0 -124
- package/docs/icons/edit.svg +0 -1
- package/docs/icons/error.svg +0 -1
- package/docs/icons/export-file.svg +0 -1
- package/docs/icons/file-text.svg +0 -1
- package/docs/icons/file.svg +0 -1
- package/docs/icons/filter-off.svg +0 -1
- package/docs/icons/filter.svg +0 -1
- package/docs/icons/first.svg +0 -1
- package/docs/icons/folder-clear.svg +0 -1
- package/docs/icons/folder-create.svg +0 -1
- package/docs/icons/folder-open.svg +0 -1
- package/docs/icons/folder.svg +0 -1
- package/docs/icons/hide.svg +0 -1
- package/docs/icons/image.svg +0 -1
- package/docs/icons/label-add.svg +0 -1
- package/docs/icons/label.svg +0 -1
- package/docs/icons/last.svg +0 -1
- package/docs/icons/menu.svg +0 -1
- package/docs/icons/mode-auto.svg +0 -1
- package/docs/icons/mode-dark.svg +0 -1
- package/docs/icons/mode-light.svg +0 -1
- package/docs/icons/open-in-browser.svg +0 -1
- package/docs/icons/pause.svg +0 -1
- package/docs/icons/play.svg +0 -1
- package/docs/icons/refresh.svg +0 -1
- package/docs/icons/remove.svg +0 -1
- package/docs/icons/save.svg +0 -1
- package/docs/icons/search.svg +0 -1
- package/docs/icons/settings.svg +0 -1
- package/docs/icons/storage.svg +0 -1
- package/docs/icons/table-visibility.svg +0 -1
- package/docs/icons/tag.svg +0 -1
- package/docs/icons/tools.svg +0 -1
- package/docs/icons/trash-x.svg +0 -1
- package/docs/icons/warning.svg +0 -1
- package/docs/index.html +0 -21
- package/docs/js/nav.inc.js +0 -4
- package/docs/kempo/components/Accordion.js +0 -1
- package/docs/kempo/components/Card.js +0 -1
- package/docs/kempo/components/Collapsible.js +0 -1
- package/docs/kempo/components/Component.js +0 -1
- package/docs/kempo/components/ContentSlider.js +0 -1
- package/docs/kempo/components/Dialog.js +0 -1
- package/docs/kempo/components/DirectoryViewer.js +0 -1
- package/docs/kempo/components/FocusCapture.js +0 -1
- package/docs/kempo/components/Icon.js +0 -1
- package/docs/kempo/components/Import.js +0 -1
- package/docs/kempo/components/LazyComponent.js +0 -1
- package/docs/kempo/components/PersistantCollapsible.js +0 -1
- package/docs/kempo/components/PhotoViewer.js +0 -1
- package/docs/kempo/components/ReactiveComponent.js +0 -1
- package/docs/kempo/components/ReactiveLazyComponent.js +0 -1
- package/docs/kempo/components/Resize.js +0 -1
- package/docs/kempo/components/Search.js +0 -1
- package/docs/kempo/components/ShowMore.js +0 -1
- package/docs/kempo/components/SideMenu.js +0 -1
- package/docs/kempo/components/Sortable.js +0 -1
- package/docs/kempo/components/Split.js +0 -1
- package/docs/kempo/components/Stacks.js +0 -1
- package/docs/kempo/components/Table.js +0 -1
- package/docs/kempo/components/Tabs.js +0 -1
- package/docs/kempo/components/Tags.js +0 -1
- package/docs/kempo/components/ThemeSwitcher.js +0 -1
- package/docs/kempo/components/Timestamp.js +0 -1
- package/docs/kempo/components/Toast.js +0 -1
- package/docs/kempo/components/Toggle.js +0 -1
- package/docs/kempo/components/tableControls/DeleteRecord.js +0 -1
- package/docs/kempo/components/tableControls/DeleteSelected.js +0 -1
- package/docs/kempo/components/tableControls/Edit.js +0 -1
- package/docs/kempo/components/tableControls/ExportCSV.js +0 -1
- package/docs/kempo/components/tableControls/ExportJson.js +0 -1
- package/docs/kempo/components/tableControls/FieldSortHide.js +0 -1
- package/docs/kempo/components/tableControls/Filters.js +0 -1
- package/docs/kempo/components/tableControls/FirstPage.js +0 -1
- package/docs/kempo/components/tableControls/HiddenCount.js +0 -1
- package/docs/kempo/components/tableControls/Hide.js +0 -1
- package/docs/kempo/components/tableControls/LastPage.js +0 -1
- package/docs/kempo/components/tableControls/NextPage.js +0 -1
- package/docs/kempo/components/tableControls/PageSelect.js +0 -1
- package/docs/kempo/components/tableControls/PageSize.js +0 -1
- package/docs/kempo/components/tableControls/PrevPage.js +0 -1
- package/docs/kempo/components/tableControls/Search.js +0 -1
- package/docs/kempo/components/tableControls/SelectCount.js +0 -1
- package/docs/kempo/components/tableControls/ShowAll.js +0 -1
- package/docs/kempo/components/tableControls/ShowHideFields.js +0 -1
- package/docs/kempo/components/tableControls/TableControl.js +0 -1
- package/docs/kempo/index.js +0 -1
- package/docs/kempo/kempo-hljs.css +0 -1
- package/docs/kempo/kempo-styles.css +0 -1
- package/docs/kempo/kempo-vars.css +0 -1
- package/docs/kempo/utils/Server.js +0 -1
- package/docs/kempo/utils/cli.js +0 -1
- package/docs/kempo/utils/cookie.js +0 -1
- package/docs/kempo/utils/debounce.js +0 -1
- package/docs/kempo/utils/drag.js +0 -1
- package/docs/kempo/utils/element.js +0 -1
- package/docs/kempo/utils/files.js +0 -1
- package/docs/kempo/utils/formatTimestamp.js +0 -1
- package/docs/kempo/utils/fs-utils.js +0 -1
- package/docs/kempo/utils/fuzzyMatch.js +0 -1
- package/docs/kempo/utils/getPreferredTheme.js +0 -1
- package/docs/kempo/utils/loadCss.js +0 -1
- package/docs/kempo/utils/loadScript.js +0 -1
- package/docs/kempo/utils/minify.js +0 -1
- package/docs/kempo/utils/object.js +0 -1
- package/docs/kempo/utils/raf.js +0 -1
- package/docs/kempo/utils/string.js +0 -1
- package/docs/kempo/utils/toFunction.js +0 -1
- package/docs/kempo/utils/type.js +0 -1
- package/docs/kempo/utils/waitFrames.js +0 -1
- package/docs/kempo/utils/watchDirectoryHandle.js +0 -1
- package/docs/kempo/utils/watchWindowSize.js +0 -1
- package/docs/nav.inc.html +0 -74
- package/docs/search.json +0 -400
- package/docs/styles/_template.html +0 -26
- package/docs/styles/borders-spacing.html +0 -197
- package/docs/styles/buttons.html +0 -117
- package/docs/styles/colors.html +0 -69
- package/docs/styles/displays-layouts.html +0 -162
- package/docs/styles/embed-1.html +0 -40
- package/docs/styles/inputs.html +0 -93
- package/docs/styles/tables.html +0 -147
- package/docs/styles/typography.html +0 -120
- package/docs/utils/Server.html +0 -119
- package/docs/utils/_template.html +0 -77
- package/docs/utils/cli.html +0 -86
- package/docs/utils/cookie.html +0 -89
- package/docs/utils/debounce.html +0 -63
- package/docs/utils/drag.html +0 -87
- package/docs/utils/element.html +0 -126
- package/docs/utils/format-timestamp.html +0 -66
- package/docs/utils/fuzzy-match.html +0 -60
- package/icons/add.svg +0 -1
- package/icons/arrow-back.svg +0 -1
- package/icons/arrow-down-double.svg +0 -1
- package/icons/arrow-down.svg +0 -1
- package/icons/arrow-forward.svg +0 -1
- package/icons/arrow-up-double.svg +0 -1
- package/icons/arrow-up.svg +0 -1
- package/icons/cards.svg +0 -1
- package/icons/check.svg +0 -1
- package/icons/chevron-left.svg +0 -1
- package/icons/chevron-right.svg +0 -1
- package/icons/close.svg +0 -2
- package/icons/compare.svg +0 -1
- package/icons/delete.svg +0 -1
- package/icons/drag-handle.svg +0 -1
- package/icons/drawing2.svg +0 -124
- package/icons/edit.svg +0 -1
- package/icons/error.svg +0 -1
- package/icons/export-file.svg +0 -1
- package/icons/file-text.svg +0 -1
- package/icons/file.svg +0 -1
- package/icons/filter-off.svg +0 -1
- package/icons/filter.svg +0 -1
- package/icons/first.svg +0 -1
- package/icons/folder-clear.svg +0 -1
- package/icons/folder-create.svg +0 -1
- package/icons/folder-open.svg +0 -1
- package/icons/folder.svg +0 -1
- package/icons/hide.svg +0 -1
- package/icons/image.svg +0 -1
- package/icons/label-add.svg +0 -1
- package/icons/label.svg +0 -1
- package/icons/last.svg +0 -1
- package/icons/menu.svg +0 -1
- package/icons/mode-auto.svg +0 -1
- package/icons/mode-dark.svg +0 -1
- package/icons/mode-light.svg +0 -1
- package/icons/open-in-browser.svg +0 -1
- package/icons/pause.svg +0 -1
- package/icons/play.svg +0 -1
- package/icons/refresh.svg +0 -1
- package/icons/remove.svg +0 -1
- package/icons/save.svg +0 -1
- package/icons/search.svg +0 -1
- package/icons/settings.svg +0 -1
- package/icons/show.svg +0 -1
- package/icons/storage.svg +0 -1
- package/icons/table-visibility.svg +0 -1
- package/icons/tag.svg +0 -1
- package/icons/tools.svg +0 -1
- package/icons/trash-x.svg +0 -1
- package/icons/warning.svg +0 -1
- package/scripts/build.js +0 -154
- package/scripts/docs.js +0 -47
- package/src/components/Accordion.js +0 -182
- package/src/components/Card.js +0 -62
- package/src/components/Collapsible.js +0 -104
- package/src/components/Component.js +0 -110
- package/src/components/ContentSlider.js +0 -192
- package/src/components/Dialog.js +0 -338
- package/src/components/DirectoryViewer.js +0 -363
- package/src/components/FocusCapture.js +0 -31
- package/src/components/Icon.js +0 -119
- package/src/components/Import.js +0 -48
- package/src/components/LazyComponent.js +0 -65
- package/src/components/PersistantCollapsible.js +0 -44
- package/src/components/PhotoViewer.js +0 -358
- package/src/components/ReactiveComponent.js +0 -11
- package/src/components/ReactiveLazyComponent.js +0 -11
- package/src/components/Resize.js +0 -168
- package/src/components/Search.js +0 -140
- package/src/components/ShowMore.js +0 -102
- package/src/components/SideMenu.js +0 -150
- package/src/components/Sortable.js +0 -169
- package/src/components/Split.js +0 -164
- package/src/components/Table.js +0 -935
- package/src/components/Tabs.js +0 -349
- package/src/components/Tags.js +0 -224
- package/src/components/ThemeSwitcher.js +0 -100
- package/src/components/Timestamp.js +0 -28
- package/src/components/Toast.js +0 -424
- package/src/components/Toggle.js +0 -137
- package/src/components/tableControls/DeleteRecord.js +0 -43
- package/src/components/tableControls/DeleteSelected.js +0 -70
- package/src/components/tableControls/Edit.js +0 -84
- package/src/components/tableControls/ExportCSV.js +0 -91
- package/src/components/tableControls/ExportJson.js +0 -62
- package/src/components/tableControls/FieldSortHide.js +0 -77
- package/src/components/tableControls/Filters.js +0 -129
- package/src/components/tableControls/FirstPage.js +0 -69
- package/src/components/tableControls/HiddenCount.js +0 -37
- package/src/components/tableControls/Hide.js +0 -40
- package/src/components/tableControls/LastPage.js +0 -67
- package/src/components/tableControls/NextPage.js +0 -69
- package/src/components/tableControls/PageSelect.js +0 -89
- package/src/components/tableControls/PageSize.js +0 -70
- package/src/components/tableControls/PrevPage.js +0 -69
- package/src/components/tableControls/Search.js +0 -49
- package/src/components/tableControls/SelectCount.js +0 -42
- package/src/components/tableControls/ShowAll.js +0 -37
- package/src/components/tableControls/TableControl.js +0 -51
- package/src/kempo-hljs.css +0 -146
- package/src/kempo-styles.css +0 -952
- package/src/kempo-vars.css +0 -159
- package/src/utils/Server.js +0 -189
- package/src/utils/cli.js +0 -119
- package/src/utils/cookie.js +0 -20
- package/src/utils/debounce.js +0 -9
- package/src/utils/drag.js +0 -74
- package/src/utils/element.js +0 -81
- package/src/utils/formatTimestamp.js +0 -27
- package/src/utils/fs-utils.js +0 -41
- package/src/utils/fuzzyMatch.js +0 -60
- package/src/utils/getPreferredTheme.js +0 -1
- package/src/utils/loadCss.js +0 -10
- package/src/utils/loadScript.js +0 -10
- package/src/utils/object.js +0 -198
- package/src/utils/raf.js +0 -10
- package/src/utils/string.js +0 -66
- package/src/utils/toFunction.js +0 -24
- package/src/utils/type.js +0 -13
- package/src/utils/waitFrames.js +0 -17
- package/src/utils/watchDirectoryHandle.js +0 -18
- package/src/utils/watchWindowSize.js +0 -15
- package/test/components/SuiteList.js +0 -26
- package/test/components/Test.js +0 -357
- package/test/index.html +0 -49
- package/test/index.js +0 -36
- package/test/suite.html +0 -45
- package/test/suites.inc.html +0 -4
- package/test/tests/components/Component.test.js +0 -138
- package/test/tests/utils/cli.test.js +0 -113
- package/test/tests/utils/cookie.test.js +0 -87
- package/test/tests/utils/debounce.test.js +0 -71
- /package/{docs/icons/show.svg → dist/admin/icons/visibility.svg} +0 -0
package/docs/utils/cookie.html
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Cookie - Utils - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css" />
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css" />
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css" />
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Import from '../kempo/components/Import.js';
|
|
12
|
-
import Icon from '../kempo/components/Icon.js';
|
|
13
|
-
import Search from '../kempo/components/Search.js';
|
|
14
|
-
Import.addReplacement('root', '../');
|
|
15
|
-
Icon.pathToIcons = ['../icons'];
|
|
16
|
-
Search.searchDataUrl = '../search.json';
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
21
|
-
<h1 class="ta-center">Cookie</h1>
|
|
22
|
-
<main>
|
|
23
|
-
<details class="b r mb">
|
|
24
|
-
<summary class="p">Table of Contents</summary>
|
|
25
|
-
<div class="m mt0 pl">
|
|
26
|
-
<h6>Examples</h6>
|
|
27
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
28
|
-
|
|
29
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
30
|
-
<a href="#saveCookie">saveCookie</a><br />
|
|
31
|
-
<a href="#getCookie">getCookie</a><br />
|
|
32
|
-
<a href="#deleteCookie">deleteCookie</a><br />
|
|
33
|
-
</div>
|
|
34
|
-
</details>
|
|
35
|
-
|
|
36
|
-
<h3>Description</h3>
|
|
37
|
-
<p>The Cookie utility provides functions to manage cookies in the browser.</p>
|
|
38
|
-
|
|
39
|
-
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
40
|
-
<pre><code class="language-js">import { saveCookie, getCookie, deleteCookie } from '../src/utils/cookie.js';
|
|
41
|
-
|
|
42
|
-
// Save a cookie
|
|
43
|
-
saveCookie('username', 'john_doe');
|
|
44
|
-
|
|
45
|
-
// Get a cookie
|
|
46
|
-
const username = getCookie('username');
|
|
47
|
-
console.log(username);
|
|
48
|
-
|
|
49
|
-
// Delete a cookie
|
|
50
|
-
deleteCookie('username');</code></pre>
|
|
51
|
-
|
|
52
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
53
|
-
|
|
54
|
-
<h3 id="saveCookie"><a href="#saveCookie" class="no-link">saveCookie</a></h3>
|
|
55
|
-
<h5>
|
|
56
|
-
<code>saveCookie(<i>name</i> string, <i>value</i> string, <i>minutes</i> number, <i>path</i> string)</code>
|
|
57
|
-
</h5>
|
|
58
|
-
<h4>Parameters</h4>
|
|
59
|
-
<h5><code>name<i>: string</i></code></h5>
|
|
60
|
-
<p>The name of the cookie.</p>
|
|
61
|
-
<h5><code>value<i>: string</i></code></h5>
|
|
62
|
-
<p>The value of the cookie.</p>
|
|
63
|
-
<h5><code>minutes<i>: number</i></code></h5>
|
|
64
|
-
<p>The expiration time of the cookie in minutes. Default is 30 days.</p>
|
|
65
|
-
<h5><code>path<i>: string</i></code></h5>
|
|
66
|
-
<p>The path where the cookie is accessible. Default is '/'.</p>
|
|
67
|
-
|
|
68
|
-
<h3 id="getCookie"><a href="#getCookie" class="no-link">getCookie</a></h3>
|
|
69
|
-
<h5>
|
|
70
|
-
<code>getCookie(<i>name</i> string)</code>
|
|
71
|
-
</h5>
|
|
72
|
-
<h4>Parameters</h4>
|
|
73
|
-
<h5><code>name<i>: string</i></code></h5>
|
|
74
|
-
<p>The name of the cookie to retrieve.</p>
|
|
75
|
-
<h4>Returns</h4>
|
|
76
|
-
<p>The value of the cookie, or null if the cookie does not exist.</p>
|
|
77
|
-
|
|
78
|
-
<h3 id="deleteCookie"><a href="#deleteCookie" class="no-link">deleteCookie</a></h3>
|
|
79
|
-
<h5>
|
|
80
|
-
<code>deleteCookie(<i>name</i> string)</code>
|
|
81
|
-
</h5>
|
|
82
|
-
<h4>Parameters</h4>
|
|
83
|
-
<h5><code>name<i>: string</i></code></h5>
|
|
84
|
-
<p>The name of the cookie to delete.</p>
|
|
85
|
-
|
|
86
|
-
</main>
|
|
87
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
88
|
-
</body>
|
|
89
|
-
</html>
|
package/docs/utils/debounce.html
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Debounce - Utils - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css" />
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css" />
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css" />
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Import from '../kempo/components/Import.js';
|
|
12
|
-
import Icon from '../kempo/components/Icon.js';
|
|
13
|
-
import Search from '../kempo/components/Search.js';
|
|
14
|
-
Import.addReplacement('root', '../');
|
|
15
|
-
Icon.pathToIcons = ['../icons'];
|
|
16
|
-
Search.searchDataUrl = '../search.json';
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
21
|
-
<h1 class="ta-center">Debounce</h1>
|
|
22
|
-
<main>
|
|
23
|
-
<details class="b r mb">
|
|
24
|
-
<summary class="p">Table of Contents</summary>
|
|
25
|
-
<div class="m mt0 pl">
|
|
26
|
-
<h6>Examples</h6>
|
|
27
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
28
|
-
|
|
29
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
30
|
-
<a href="#debounce">debounce</a><br />
|
|
31
|
-
</div>
|
|
32
|
-
</details>
|
|
33
|
-
|
|
34
|
-
<h3>Description</h3>
|
|
35
|
-
<p>The Debounce utility provides a function to delay the execution of a function until after a specified wait time has elapsed since the last time it was invoked.</p>
|
|
36
|
-
|
|
37
|
-
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
38
|
-
<pre><code class="language-js">import debounce from '../src/utils/debounce.js';
|
|
39
|
-
|
|
40
|
-
const saveInput = debounce(() => {
|
|
41
|
-
console.log('Saving data');
|
|
42
|
-
}, 2000);
|
|
43
|
-
|
|
44
|
-
document.getElementById('input').addEventListener('input', saveInput);</code></pre>
|
|
45
|
-
|
|
46
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
47
|
-
|
|
48
|
-
<h3 id="debounce"><a href="#debounce" class="no-link">debounce</a></h3>
|
|
49
|
-
<h5>
|
|
50
|
-
<code>debounce(<i>func</i> function, <i>timeout</i> number)</code>
|
|
51
|
-
</h5>
|
|
52
|
-
<h4>Parameters</h4>
|
|
53
|
-
<h5><code>func<i>: function</i></code></h5>
|
|
54
|
-
<p>The function to debounce.</p>
|
|
55
|
-
<h5><code>timeout<i>: number</i></code></h5>
|
|
56
|
-
<p>The number of milliseconds to delay. Default is 300ms.</p>
|
|
57
|
-
<h4>Returns</h4>
|
|
58
|
-
<p>A debounced version of the provided function.</p>
|
|
59
|
-
|
|
60
|
-
</main>
|
|
61
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
62
|
-
</body>
|
|
63
|
-
</html>
|
package/docs/utils/drag.html
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Drag - Utils - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css" />
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css" />
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css" />
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Import from '../kempo/components/Import.js';
|
|
12
|
-
import Icon from '../kempo/components/Icon.js';
|
|
13
|
-
import Search from '../kempo/components/Search.js';
|
|
14
|
-
Import.addReplacement('root', '../');
|
|
15
|
-
Icon.pathToIcons = ['../icons'];
|
|
16
|
-
Search.searchDataUrl = '../search.json';
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
21
|
-
<h1 class="ta-center">Drag</h1>
|
|
22
|
-
<main>
|
|
23
|
-
<details class="b r mb">
|
|
24
|
-
<summary class="p">Table of Contents</summary>
|
|
25
|
-
<div class="m mt0 pl">
|
|
26
|
-
<h6>Examples</h6>
|
|
27
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
28
|
-
|
|
29
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
30
|
-
<a href="#drag">drag</a><br />
|
|
31
|
-
</div>
|
|
32
|
-
</details>
|
|
33
|
-
|
|
34
|
-
<h3>Description</h3>
|
|
35
|
-
<p>The Drag utility provides a function to handle drag events and execute callbacks during the drag lifecycle.</p>
|
|
36
|
-
|
|
37
|
-
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
38
|
-
<pre><code class="language-js">import drag from '../src/utils/drag.js';
|
|
39
|
-
|
|
40
|
-
const element = document.getElementById('draggable');
|
|
41
|
-
const removeListeners = drag({
|
|
42
|
-
element,
|
|
43
|
-
callback: (diff) => console.log(diff),
|
|
44
|
-
startCallback: () => console.log('Drag started'),
|
|
45
|
-
moveCallback: (diff) => console.log('Dragging', diff),
|
|
46
|
-
endCallback: (diff) => console.log('Drag ended', diff),
|
|
47
|
-
preventScroll: true
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
// To remove event listeners
|
|
51
|
-
removeListeners();</code></pre>
|
|
52
|
-
|
|
53
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
54
|
-
|
|
55
|
-
<h3 id="drag"><a href="#drag" class="no-link">drag</a></h3>
|
|
56
|
-
<h5>
|
|
57
|
-
<code>drag(<i>options</i> object)</code>
|
|
58
|
-
</h5>
|
|
59
|
-
<h4>Parameters</h4>
|
|
60
|
-
<h5><code>options<i>: object</i></code></h5>
|
|
61
|
-
<p>An object containing the following properties:</p>
|
|
62
|
-
|
|
63
|
-
<h6><code>element<i>: HTMLElement</i></code></h6>
|
|
64
|
-
<p>The element to attach drag events to.</p>
|
|
65
|
-
|
|
66
|
-
<h6><code>callback<i>: function</i></code></h6>
|
|
67
|
-
<p>A function to call on drag move. The object passed into the callback contains an <code>x</code> and a <code>y</code> that represents the distance the mouse has traveled in x and y since the drag started, with positive x being to the right, negative x to the left, positive y towards the bottom, and negative y towards the top.</p>
|
|
68
|
-
|
|
69
|
-
<h6><code>startCallback<i>: function</i></code></h6>
|
|
70
|
-
<p>A function to call on drag start. The object passed into the callback contains an <code>x</code> and a <code>y</code> that represents the initial position of the mouse.</p>
|
|
71
|
-
|
|
72
|
-
<h6><code>moveCallback<i>: function</i></code></h6>
|
|
73
|
-
<p>A function to call on drag move. The object passed into the callback contains an <code>x</code> and a <code>y</code> that represents the distance the mouse has traveled in x and y since the drag started, with positive x being to the right, negative x to the left, positive y towards the bottom, and negative y towards the top.</p>
|
|
74
|
-
|
|
75
|
-
<h6><code>endCallback<i>: function</i></code></h6>
|
|
76
|
-
<p>A function to call on drag end. The object passed into the callback contains an <code>x</code> and a <code>y</code> that represents the distance the mouse has traveled in x and y since the drag started, with positive x being to the right, negative x to the left, positive y towards the bottom, and negative y towards the top.</p>
|
|
77
|
-
|
|
78
|
-
<h6><code>preventScroll<i>: boolean</i></code></h6>
|
|
79
|
-
<p>Whether to prevent scrolling during drag. Default is false.</p>
|
|
80
|
-
|
|
81
|
-
<h4>Returns</h4>
|
|
82
|
-
<p>A function to remove the event listeners.</p>
|
|
83
|
-
|
|
84
|
-
</main>
|
|
85
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
86
|
-
</body>
|
|
87
|
-
</html>
|
package/docs/utils/element.html
DELETED
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Element - Utils - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css" />
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css" />
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css" />
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Import from '../kempo/components/Import.js';
|
|
12
|
-
import Icon from '../kempo/components/Icon.js';
|
|
13
|
-
import Search from '../kempo/components/Search.js';
|
|
14
|
-
Import.addReplacement('root', '../');
|
|
15
|
-
Icon.pathToIcons = ['../icons'];
|
|
16
|
-
Search.searchDataUrl = '../search.json';
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
21
|
-
<h1 class="ta-center">Element</h1>
|
|
22
|
-
<main>
|
|
23
|
-
<details class="b r mb">
|
|
24
|
-
<summary class="p">Table of Contents</summary>
|
|
25
|
-
<div class="m mt0 pl">
|
|
26
|
-
<h6>Examples</h6>
|
|
27
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
28
|
-
|
|
29
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
30
|
-
<a href="#onEvent">onEvent</a><br />
|
|
31
|
-
<a href="#offEvent">offEvent</a><br />
|
|
32
|
-
<a href="#dispatchEvent">dispatchEvent</a><br />
|
|
33
|
-
<a href="#isInView">isInView</a><br />
|
|
34
|
-
<a href="#firstFocusable">firstFocusable</a><br />
|
|
35
|
-
<a href="#setProp">setProp</a><br />
|
|
36
|
-
</div>
|
|
37
|
-
</details>
|
|
38
|
-
|
|
39
|
-
<br><h3>Description</h3>
|
|
40
|
-
<p>The Element utility provides functions to handle DOM events, check element visibility, and manipulate element properties.</p>
|
|
41
|
-
|
|
42
|
-
<br><h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
43
|
-
<pre><code class="hljs javascript"><span class="hljs-keyword">import</span> { onEvent, offEvent, dispatchEvent, isInView, firstFocusable, setProp } <span class="hljs-keyword">from</span> <span class="hljs-string">'../src/utils/element.js'</span>;<br /><br /><span class="hljs-comment">// Add event listener</span><br />onEvent(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myElement'</span>), <span class="hljs-string">'click'</span>, () => <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Clicked'</span>));<br /><br /><span class="hljs-comment">// Remove event listener</span><br />offEvent(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myElement'</span>), <span class="hljs-string">'click'</span>, () => <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Clicked'</span>));<br /><br /><span class="hljs-comment">// Dispatch event</span><br />dispatchEvent(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myElement'</span>), <span class="hljs-string">'customEvent'</span>, { <span class="hljs-attr">detail</span>: <span class="hljs-string">'example'</span> });<br /><br /><span class="hljs-comment">// Check if element is in view</span><br />isInView(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myElement'</span>)).then(<span class="hljs-function"><span class="hljs-params">inView</span> =></span> <span class="hljs-built_in">console</span>.log(inView));<br /><br /><span class="hljs-comment">// Get first focusable element</span><br /><span class="hljs-keyword">const</span> firstFocusableElement = firstFocusable(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myContainer'</span>));<br /><span class="hljs-built_in">console</span>.log(firstFocusableElement);<br /><br /><span class="hljs-comment">// Set property on element</span><br />setProp(<span class="hljs-built_in">document</span>.getElementById(<span class="hljs-string">'myElement'</span>), <span class="hljs-string">'innerText'</span>, <span class="hljs-string">'New Text'</span>);</code></pre>
|
|
44
|
-
|
|
45
|
-
<br><h2 id="jsRef">JavaScript Reference</h2>
|
|
46
|
-
|
|
47
|
-
<br><h3 id="onEvent"><a href="#onEvent" class="no-link">onEvent</a></h3>
|
|
48
|
-
<h6>
|
|
49
|
-
<code>onEvent(<i>element</i> EventTarget | NodeList | Array | string, <i>events</i> string, <i>handler</i> function, <i>scope</i> Document)</code>
|
|
50
|
-
</h6>
|
|
51
|
-
<h5>Parameters</h5>
|
|
52
|
-
<h6><code>element<i>: EventTarget | NodeList | Array | string</i></code></h6>
|
|
53
|
-
<p>The element(s) to attach the event listener to.</p>
|
|
54
|
-
<h6><code>events<i>: string</i></code></h6>
|
|
55
|
-
<p>The event(s) to listen for, separated by spaces.</p>
|
|
56
|
-
<h6><code>handler<i>: function</i></code></h6>
|
|
57
|
-
<p>The function to call when the event is triggered.</p>
|
|
58
|
-
<h6><code>scope<i>: Document</i></code></h6>
|
|
59
|
-
<p>The scope to query for elements if a string selector is provided. Default is <code>document</code>.</p>
|
|
60
|
-
|
|
61
|
-
<br><h3 id="offEvent"><a href="#offEvent" class="no-link">offEvent</a></h3>
|
|
62
|
-
<h6>
|
|
63
|
-
<code>offEvent(<i>element</i> EventTarget | NodeList | Array | string, <i>events</i> string, <i>handler</i> function, <i>scope</i> Document)</code>
|
|
64
|
-
</h6>
|
|
65
|
-
<h5>Parameters</h5>
|
|
66
|
-
<h6><code>element<i>: EventTarget | NodeList | Array | string</i></code></h6>
|
|
67
|
-
<p>The element(s) to remove the event listener from.</p>
|
|
68
|
-
<h6><code>events<i>: string</i></code></h6>
|
|
69
|
-
<p>The event(s) to stop listening for, separated by spaces.</p>
|
|
70
|
-
<h6><code>handler<i>: function</i></code></h6>
|
|
71
|
-
<p>The function to remove from the event listener.</p>
|
|
72
|
-
<h6><code>scope<i>: Document</i></code></h6>
|
|
73
|
-
<p>The scope to query for elements if a string selector is provided. Default is <code>document</code>.</p>
|
|
74
|
-
|
|
75
|
-
<br><h3 id="dispatchEvent"><a href="#dispatchEvent" class="no-link">dispatchEvent</a></h3>
|
|
76
|
-
<h6>
|
|
77
|
-
<code>dispatchEvent(<i>element</i> EventTarget | NodeList | Array | string, <i>events</i> string, <i>detail</i> any, <i>options</i> object)</code>
|
|
78
|
-
</h6>
|
|
79
|
-
<h5>Parameters</h5>
|
|
80
|
-
<h6><code>element<i>: EventTarget | NodeList | Array | string</i></code></h6>
|
|
81
|
-
<p>The element(s) to dispatch the event on.</p>
|
|
82
|
-
<h6><code>events<i>: string</i></code></h6>
|
|
83
|
-
<p>The event(s) to dispatch, separated by spaces.</p>
|
|
84
|
-
<h6><code>detail<i>: any</i></code></h6>
|
|
85
|
-
<p>The detail to include in the event.</p>
|
|
86
|
-
<h6><code>options<i>: object</i></code></h6>
|
|
87
|
-
<p>Additional options for the event. Default is <code>{ scope: document, bubbles: false }</code>.</p>
|
|
88
|
-
|
|
89
|
-
<br><h3 id="isInView"><a href="#isInView" class="no-link">isInView</a></h3>
|
|
90
|
-
<h6>
|
|
91
|
-
<code>isInView(<i>element</i> HTMLElement)</code>
|
|
92
|
-
</h6>
|
|
93
|
-
<h5>Parameters</h5>
|
|
94
|
-
<h6><code>element<i>: HTMLElement</i></code></h6>
|
|
95
|
-
<p>The element to check for visibility.</p>
|
|
96
|
-
<h5>Returns</h5>
|
|
97
|
-
<p>A promise that resolves to <code>true</code> if the element is in view, and <code>false</code> otherwise.</p>
|
|
98
|
-
|
|
99
|
-
<br><h3 id="firstFocusable"><a href="#firstFocusable" class="no-link">firstFocusable</a></h3>
|
|
100
|
-
<h6>
|
|
101
|
-
<code>firstFocusable(<i>scope</i> HTMLElement)</code>
|
|
102
|
-
</h6>
|
|
103
|
-
<h5>Parameters</h5>
|
|
104
|
-
<h6><code>scope<i>: HTMLElement</i></code></h6>
|
|
105
|
-
<p>The scope to query for focusable elements.</p>
|
|
106
|
-
<h5>Returns</h5>
|
|
107
|
-
<p>The first focusable element within the scope.</p>
|
|
108
|
-
|
|
109
|
-
<br><h3 id="setProp"><a href="#setProp" class="no-link">setProp</a></h3>
|
|
110
|
-
<h6>
|
|
111
|
-
<code>setProp(<i>element</i> HTMLElement | NodeList | Array | string, <i>prop</i> string, <i>value</i> any, <i>scope</i> Document)</code>
|
|
112
|
-
</h6>
|
|
113
|
-
<h5>Parameters</h5>
|
|
114
|
-
<h6><code>element<i>: HTMLElement | NodeList | Array | string</i></code></h6>
|
|
115
|
-
<p>The element(s) to set the property on.</p>
|
|
116
|
-
<h6><code>prop<i>: string</i></code></h6>
|
|
117
|
-
<p>The property to set.</p>
|
|
118
|
-
<h6><code>value<i>: any</i></code></h6>
|
|
119
|
-
<p>The value to set the property to.</p>
|
|
120
|
-
<h6><code>scope<i>: Document</i></code></h6>
|
|
121
|
-
<p>The scope to query for elements if a string selector is provided. Default is <code>document</code>.</p>
|
|
122
|
-
|
|
123
|
-
</main>
|
|
124
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
125
|
-
</body>
|
|
126
|
-
</html>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>formatTimestamp - Utils - Kempo Docs - A Web Components Solution</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css" />
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css" />
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css" />
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Import from '../kempo/components/Import.js';
|
|
12
|
-
import Icon from '../kempo/components/Icon.js';
|
|
13
|
-
import Search from '../kempo/components/Search.js';
|
|
14
|
-
Import.addReplacement('root', '../');
|
|
15
|
-
Icon.pathToIcons = ['../icons'];
|
|
16
|
-
Search.searchDataUrl = '../search.json';
|
|
17
|
-
</script>
|
|
18
|
-
</head>
|
|
19
|
-
<body>
|
|
20
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
21
|
-
<h1 class="ta-center">formatTimestamp</h1>
|
|
22
|
-
<main>
|
|
23
|
-
<details class="b r mb">
|
|
24
|
-
<summary class="p">Table of Contents</summary>
|
|
25
|
-
<div class="m mt0 pl">
|
|
26
|
-
<h6>Examples</h6>
|
|
27
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
28
|
-
|
|
29
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
30
|
-
<a href="#function">Function</a><br />
|
|
31
|
-
<a href="#parameters">Parameters</a><br />
|
|
32
|
-
<a href="#returns">Returns</a><br />
|
|
33
|
-
</div>
|
|
34
|
-
</details>
|
|
35
|
-
|
|
36
|
-
<h3>Description</h3>
|
|
37
|
-
<p>The <code>formatTimestamp</code> function formats a given timestamp into a specified format or locale string.</p>
|
|
38
|
-
|
|
39
|
-
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
40
|
-
<pre><code class="language-javascript">
|
|
41
|
-
import formatTimestamp from '../../src/utils/formatTimestamp.js';
|
|
42
|
-
|
|
43
|
-
const timestamp = Date.now();
|
|
44
|
-
console.log(formatTimestamp(timestamp, 'YYYY-MM-DD hh:mm:ss')); // Example output: 2023-10-05 14:48:32
|
|
45
|
-
console.log(formatTimestamp(timestamp)); // Example output: 10/5/2023, 2:48:32 PM if the browser locale is en-US
|
|
46
|
-
</code></pre>
|
|
47
|
-
|
|
48
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
49
|
-
|
|
50
|
-
<h3 id="function"><a href="#function" class="no-link">Function</a></h3>
|
|
51
|
-
<h5><code>formatTimestamp(timestamp, format, forceLocale)</code></h5>
|
|
52
|
-
|
|
53
|
-
<h3 id="parameters"><a href="#parameters" class="no-link">Parameters</a></h3>
|
|
54
|
-
<ul>
|
|
55
|
-
<li><code>timestamp</code> <i>: number</i> - The timestamp to format.</li>
|
|
56
|
-
<li><code>format</code> <i>: string</i> (optional) - The format string. If not provided, the locale string is returned.</li>
|
|
57
|
-
<li><code>forceLocale</code> <i>: string</i> (optional) - The locale to use for formatting.</li>
|
|
58
|
-
</ul>
|
|
59
|
-
|
|
60
|
-
<h3 id="returns"><a href="#returns" class="no-link">Returns</a></h3>
|
|
61
|
-
<p><code>string</code> - The formatted timestamp.</p>
|
|
62
|
-
|
|
63
|
-
</main>
|
|
64
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
65
|
-
</body>
|
|
66
|
-
</html>
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Fuzzy Match Utility Documentation</title>
|
|
7
|
-
<link rel="stylesheet" href="../kempo/kempo-vars.css">
|
|
8
|
-
<link rel="stylesheet" href="../kempo/kempo-styles.css">
|
|
9
|
-
<link rel="stylesheet" href="../kempo/kempo-hljs.css">
|
|
10
|
-
<script type="module">
|
|
11
|
-
import Icon from '../kempo/components/Icon.js';
|
|
12
|
-
Icon.pathToIcons = ['../icons'];
|
|
13
|
-
</script>
|
|
14
|
-
</head>
|
|
15
|
-
<body>
|
|
16
|
-
<k-import src="../nav.inc.html"></k-import>
|
|
17
|
-
<h1 class="ta-center">Fuzzy Match Utility Documentation</h1>
|
|
18
|
-
<main>
|
|
19
|
-
<details class="b r mb">
|
|
20
|
-
<summary class="p">Table of Contents</summary>
|
|
21
|
-
<div class="m mt0 pl">
|
|
22
|
-
<h6>Examples</h6>
|
|
23
|
-
<a href="#basicUsage">Basic Usage</a><br />
|
|
24
|
-
|
|
25
|
-
<h6 class="mt">JavaScript Reference</h6>
|
|
26
|
-
<a href="#fuzzyMatch">fuzzyMatch</a><br />
|
|
27
|
-
<a href="#fuzzyMatchArray">fuzzyMatchArray</a><br />
|
|
28
|
-
</div>
|
|
29
|
-
</details>
|
|
30
|
-
|
|
31
|
-
<h3>Description</h3>
|
|
32
|
-
<p>This module provides functions for performing fuzzy matching on strings.</p>
|
|
33
|
-
|
|
34
|
-
<h3 id="basicUsage"><a href="#basicUsage" class="no-link">Basic Usage</a></h3>
|
|
35
|
-
|
|
36
|
-
<h2 id="jsRef">JavaScript Reference</h2>
|
|
37
|
-
|
|
38
|
-
<h3 id="fuzzyMatch"><a href="#fuzzyMatch" class="no-link">fuzzyMatch(str1, str2)</a></h3>
|
|
39
|
-
<p>Performs a fuzzy match between two strings and returns a score between 0 and 10.</p>
|
|
40
|
-
<pre><code class="hljs javascript"><span class="hljs-keyword">import</span> { fuzzyMatch } <span class="hljs-keyword">from</span> <span class="hljs-string">'./src/utils/fuzzyMatch.js'</span>;<br /><br /><span class="hljs-keyword">const</span> score = fuzzyMatch(<span class="hljs-string">'example'</span>, <span class="hljs-string">'exampel'</span>);<br /><span class="hljs-built_in">console</span>.log(score); <span class="hljs-comment">// Outputs a score between 0 and 10</span></code></pre>
|
|
41
|
-
<p><strong>Parameters:</strong></p>
|
|
42
|
-
<ul>
|
|
43
|
-
<li><code>str1</code> (string): The first string to match against.</li>
|
|
44
|
-
<li><code>str2</code> (string): The second string to match.</li>
|
|
45
|
-
</ul>
|
|
46
|
-
<p><strong>Returns:</strong> (number): A score between 0 and 10 indicating the strength of the match.</p>
|
|
47
|
-
|
|
48
|
-
<h3 id="fuzzyMatchArray"><a href="#fuzzyMatchArray" class="no-link">fuzzyMatchArray(array, targetString)</a></h3>
|
|
49
|
-
<p>Calculates the average non-zero fuzzy match score of a target string against an array of strings.</p>
|
|
50
|
-
<pre><code class="hljs javascript"><span class="hljs-keyword">import</span> { fuzzyMatchArray } <span class="hljs-keyword">from</span> <span class="hljs-string">'./src/utils/fuzzyMatch.js'</span>;<br /><br /><span class="hljs-keyword">const</span> averageScore = fuzzyMatchArray([<span class="hljs-string">'example'</span>, <span class="hljs-string">'sample'</span>, <span class="hljs-string">'exampel'</span>], <span class="hljs-string">'exampel'</span>);<br /><span class="hljs-built_in">console</span>.log(averageScore); <span class="hljs-comment">// Outputs the average non-zero score</span></code></pre>
|
|
51
|
-
<p><strong>Parameters:</strong></p>
|
|
52
|
-
<ul>
|
|
53
|
-
<li><code>array</code> (Array<string>): An array of strings to match against.</li>
|
|
54
|
-
<li><code>targetString</code> (string): The string to match.</li>
|
|
55
|
-
</ul>
|
|
56
|
-
<p><strong>Returns:</strong> (number): The average non-zero match score.</p>
|
|
57
|
-
</main>
|
|
58
|
-
<script type="module" src="../kempo/components/Import.js"></script>
|
|
59
|
-
</body>
|
|
60
|
-
</html>
|
package/icons/add.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M440-440H200v-80h240v-240h80v240h240v80H520v240h-80v-240Z"/></svg>
|
package/icons/arrow-back.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m313-440 224 224-57 56-320-320 320-320 57 56-224 224h487v80H313Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M480-200 240-440l56-56 184 183 184-183 56 56-240 240Zm0-240L240-680l56-56 184 183 184-183 56 56-240 240Z"/></svg>
|
package/icons/arrow-down.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M440-800v487L216-537l-56 57 320 320 320-320-56-57-224 224v-487h-80Z"/></svg>
|
package/icons/arrow-forward.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M647-440H160v-80h487L423-744l57-56 320 320-320 320-57-56 224-224Z"/></svg>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="m296-224-56-56 240-240 240 240-56 56-184-183-184 183Zm0-240-56-56 240-240 240 240-56 56-184-183-184 183Z"/></svg>
|
package/icons/arrow-up.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M440-160v-487L216-423l-56-57 320-320 320 320-56 57-224-224v487h-80Z"/></svg>
|
package/icons/cards.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M240-500v-220h220v220H240Zm0 260v-220h220v220H240Zm260-260v-220h220v220H500Zm0 260v-220h220v220H500ZM320-580h60v-60h-60v60Zm260 0h60v-60h-60v60ZM320-320h60v-60h-60v60Zm260 0h60v-60h-60v60ZM380-580Zm200 0Zm0 200Zm-200 0ZM200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Z"/></svg>
|
package/icons/check.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z"/></svg>
|
package/icons/chevron-left.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z"/></svg>
|
package/icons/chevron-right.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z"/></svg>
|
package/icons/close.svg
DELETED
package/icons/compare.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M400-40v-80H200q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h200v-80h80v880h-80ZM200-240h200v-240L200-240Zm360 120v-360l200 240v-520H560v-80h200q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H560Z"/></svg>
|
package/icons/delete.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M280-120q-33 0-56.5-23.5T200-200v-520h-40v-80h200v-40h240v40h200v80h-40v520q0 33-23.5 56.5T680-120H280Zm400-600H280v520h400v-520ZM360-280h80v-360h-80v360Zm160 0h80v-360h-80v360ZM280-720v520-520Z"/></svg>
|
package/icons/drag-handle.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -960 960 960"><path fill="currentColor" d="M160-360v-80h640v80H160Zm0-160v-80h640v80H160Z"/></svg>
|