@contember/create 2.1.0-alpha.1 → 2.1.0-alpha.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/development/src/commands/WorkspaceCreateCommand.cjs +37 -23
- package/dist/development/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/development/src/commands/WorkspaceCreateCommand.js +37 -23
- package/dist/development/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/development/src/lib/FileSystem.cjs +1 -0
- package/dist/development/src/lib/FileSystem.cjs.map +1 -1
- package/dist/development/src/lib/FileSystem.js +1 -0
- package/dist/development/src/lib/FileSystem.js.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.cjs +24 -5
- package/dist/development/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/development/src/lib/TemplateInstaller.js +24 -5
- package/dist/development/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/development/src/lib/packageManagerDetector.cjs +22 -0
- package/dist/development/src/lib/packageManagerDetector.cjs.map +1 -0
- package/dist/development/src/lib/packageManagerDetector.js +22 -0
- package/dist/development/src/lib/packageManagerDetector.js.map +1 -0
- package/dist/production/src/commands/WorkspaceCreateCommand.cjs +37 -23
- package/dist/production/src/commands/WorkspaceCreateCommand.cjs.map +1 -1
- package/dist/production/src/commands/WorkspaceCreateCommand.js +37 -23
- package/dist/production/src/commands/WorkspaceCreateCommand.js.map +1 -1
- package/dist/production/src/lib/FileSystem.cjs +1 -0
- package/dist/production/src/lib/FileSystem.cjs.map +1 -1
- package/dist/production/src/lib/FileSystem.js +1 -0
- package/dist/production/src/lib/FileSystem.js.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.cjs +24 -5
- package/dist/production/src/lib/TemplateInstaller.cjs.map +1 -1
- package/dist/production/src/lib/TemplateInstaller.js +24 -5
- package/dist/production/src/lib/TemplateInstaller.js.map +1 -1
- package/dist/production/src/lib/packageManagerDetector.cjs +22 -0
- package/dist/production/src/lib/packageManagerDetector.cjs.map +1 -0
- package/dist/production/src/lib/packageManagerDetector.js +22 -0
- package/dist/production/src/lib/packageManagerDetector.js.map +1 -0
- package/dist/types/commands/WorkspaceCreateCommand.d.ts +4 -2
- package/dist/types/commands/WorkspaceCreateCommand.d.ts.map +1 -1
- package/dist/types/lib/FileSystem.d.ts +1 -0
- package/dist/types/lib/FileSystem.d.ts.map +1 -1
- package/dist/types/lib/TemplateInstaller.d.ts.map +1 -1
- package/dist/types/lib/packageManagerDetector.d.ts +3 -0
- package/dist/types/lib/packageManagerDetector.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -3
- package/resources/templates/default/.gitignore.dist +154 -0
- package/resources/templates/default/README.md +98 -0
- package/resources/templates/{template-workspace → default}/admin/.env.development +1 -0
- package/resources/templates/{template-workspace → default}/admin/app/components/layout.tsx +7 -3
- package/resources/templates/default/admin/app/components/navigation.tsx +85 -0
- package/resources/templates/{template-workspace → default}/admin/app/index.tsx +4 -4
- package/resources/templates/default/admin/app/pages/tenant.tsx +160 -0
- package/resources/templates/default/admin/entrypoint/components/layout.tsx +14 -0
- package/resources/templates/default/admin/entrypoint/components/logged-in.tsx +47 -0
- package/resources/templates/default/admin/entrypoint/components/login.tsx +103 -0
- package/resources/templates/default/admin/entrypoint/config.ts +35 -0
- package/resources/templates/default/admin/entrypoint/contexts/login.tsx +18 -0
- package/resources/templates/default/admin/entrypoint/index.tsx +12 -0
- package/resources/templates/default/admin/entrypoint/login-entrypoint.tsx +24 -0
- package/resources/templates/default/admin/entrypoint/pages/index.tsx +48 -0
- package/resources/templates/default/admin/entrypoint/pages/magicLink.tsx +56 -0
- package/resources/templates/default/admin/entrypoint/pages/magicLintSent.tsx +63 -0
- package/resources/templates/default/admin/entrypoint/pages/passwordReset.tsx +44 -0
- package/resources/templates/default/admin/entrypoint/pages/resetRequest.tsx +35 -0
- package/resources/templates/default/admin/entrypoint/pages/resetRequestSuccess.tsx +34 -0
- package/resources/templates/default/admin/index.css +94 -0
- package/resources/templates/{template-workspace → default}/admin/index.html +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/block-repeater/block-repeater.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/board/board.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/column-header.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/columns.tsx +8 -8
- package/resources/templates/default/admin/lib/datagrid/elements.tsx +59 -0
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/empty.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/date.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/relation.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/pagination.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/table.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/datagrid/ui.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/dimensions/dimensions.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-block-toolbar.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-canvas.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-inline-toolbar.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/BlockElement.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableCellElementRenderer.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/editor-block.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/editor/sortable-block.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/form/container.tsx +2 -1
- package/resources/templates/{template-workspace → default}/admin/lib/form/inputs.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/layout/layout-boxed.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/repeater/repeater.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/select/ui.tsx +5 -5
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/common.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/memberships-control.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/tenant/otp/otp-setup.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/toast/toast.tsx +4 -5
- package/resources/templates/{template-workspace → default}/admin/lib/ui/button.tsx +6 -6
- package/resources/templates/{template-workspace → default}/admin/lib/ui/card.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/dialog.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/ui/dropdown.tsx +6 -6
- package/resources/templates/{template-workspace → default}/admin/lib/ui/input.tsx +11 -11
- package/resources/templates/{template-workspace → default}/admin/lib/ui/overlay.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/popover.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/property-list.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/select.tsx +4 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sheet.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sidebar.tsx +15 -16
- package/resources/templates/{template-workspace → default}/admin/lib/ui/sortable.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/switch.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/ui/table.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/textarea.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/toggle.tsx +2 -3
- package/resources/templates/{template-workspace → default}/admin/lib/ui/tooltip.tsx +2 -2
- package/resources/templates/{template-workspace → default}/admin/lib/upload/ui.tsx +4 -4
- package/resources/templates/{template-workspace → default}/admin/lib/upload/upload-progress.tsx +1 -1
- package/resources/templates/{template-workspace → default}/admin/lib/upload/view.tsx +3 -3
- package/resources/templates/{template-workspace → default}/admin/lib/utils/uic.tsx +30 -23
- package/resources/templates/{template-workspace → default}/admin/package.json +6 -3
- package/resources/templates/default/admin/postcss.config.js +5 -0
- package/resources/templates/default/admin/sentry.ts +26 -0
- package/resources/templates/{template-workspace → default}/admin/tsconfig.json +1 -9
- package/resources/templates/default/admin/vite-env.d.ts +12 -0
- package/resources/templates/default/admin/vite.config.ts +11 -0
- package/resources/templates/default/api/README.md +87 -0
- package/resources/templates/{template-workspace → default}/biome.json +1 -1
- package/resources/templates/default/client/README.md +285 -0
- package/resources/templates/{template-workspace → default}/contember.template.yaml +5 -0
- package/resources/templates/{template-workspace → default}/package.json +2 -2
- package/resources/templates/default/scripts/generate-client.sh +7 -0
- package/resources/templates/default/scripts/update-ui-lib.sh +344 -0
- package/src/commands/WorkspaceCreateCommand.ts +41 -24
- package/src/lib/FileSystem.ts +1 -0
- package/src/lib/TemplateInstaller.ts +30 -7
- package/src/lib/packageManagerDetector.ts +24 -0
- package/resources/templates/template-workspace/.gitignore.dist +0 -3
- package/resources/templates/template-workspace/admin/app/components/navigation.tsx +0 -1
- package/resources/templates/template-workspace/admin/index.css +0 -53
- package/resources/templates/template-workspace/admin/index.tsx +0 -268
- package/resources/templates/template-workspace/admin/lib/datagrid/elements.tsx +0 -48
- package/resources/templates/template-workspace/admin/postcss.config.js +0 -6
- package/resources/templates/template-workspace/admin/tailwind.config.js +0 -73
- package/resources/templates/template-workspace/admin/vite-env.d.ts +0 -7
- package/resources/templates/template-workspace/scripts/generate-client.sh +0 -8
- /package/resources/templates/{template-workspace → default}/.github/scripts/setup-actions-variables.sh +0 -0
- /package/resources/templates/{template-workspace → default}/.github/workflows/deploy.yaml +0 -0
- /package/resources/templates/{template-workspace → default}/admin/app/components/logo.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/app/config.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/app/index.html +0 -0
- /package/resources/templates/{template-workspace → default}/admin/app/pages/index.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/binding.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/delete.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/hooks.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/identity.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/navigation-guard-dialog.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/binding/persist.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/block-repeater/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/board/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/buttons/back-button.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/buttons/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/buttons/link-back-button.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/cells.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/column-leaf.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/export.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/boolean.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/common.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/defined.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/enum.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/mobile.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/number.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/text.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/grid.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/labels.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/layout-switcher.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/loader.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/tiles.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/datagrid/toolbar.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dev/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dev/login-panel.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dev/todo.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dict.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/dimensions/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/block-editor.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/baseEditorPlugins.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/buttons.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/editor-editable-canvas.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/AnchorRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/HeadingRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/HorizontalRuleRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ListItemRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/OrderedListRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ParagraphRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/ScrollTargetRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableElementRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/TableRowElementRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/elements/UnorderedListRenderer.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/common/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/plugins.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/rich-text-view.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/editor/rich-text.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/error-boundary.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/errors/use-error-formatter.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/field/formatted-field.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/field/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/labels.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/select.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/ui.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/upload-repeaters.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/form/upload.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/formatting/formatting.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/formatting/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/images/formatImageResizeUrl.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/images/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/labels/enum-labels.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/labels/field-labels.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/labels/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/layout/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/layout/layout.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/layout/slots.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/outdated-application-dialog/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/outdated-application-dialog/outdated-application-dialog.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/repeater/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/create-new.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/filter.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/highlight.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/list.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/multi-select.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/select.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/select/sortable-select.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/change-my-password.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/create-api-key.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/invite.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/login.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/password-reset-request.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/password-reset.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/passwordless-signin-init.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/passwordless-signin.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/forms/update-project-member.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/hooks/useInvite.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/hooks/useInviteUser.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/api-key-list.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/member-delete-dialog.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/member-list.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/listing/person-list.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/tenant/otp/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/toast/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/toast/toaster.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/alert-dialog.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/avatar.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/collapsible.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/divider.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/label.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/loader.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/menu.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/progress.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/scroll-area.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/separator.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/skeleton.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/ui/toggle-group.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/upload/dropzone.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/upload/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/upload/repeater.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/cn.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/createComponentOpenHooks.tsx +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/lib/utils/use-mobile.ts +0 -0
- /package/resources/templates/{template-workspace → default}/admin/public/favicon.png +0 -0
- /package/resources/templates/{template-workspace → default}/api/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/api/migrations/.gitkeep +0 -0
- /package/resources/templates/{template-workspace → default}/api/model/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/api/package.json +0 -0
- /package/resources/templates/{template-workspace → default}/api/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/client/package.json +0 -0
- /package/resources/templates/{template-workspace → default}/client/src/index.ts +0 -0
- /package/resources/templates/{template-workspace → default}/client/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/docker-compose.yaml +0 -0
- /package/resources/templates/{template-workspace → default}/tsconfig.json +0 -0
- /package/resources/templates/{template-workspace → default}/tsconfig.settings.json +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { CircleAlert } from 'lucide-react'
|
|
2
|
+
import { dict } from '~/lib/dict'
|
|
3
|
+
import { Button } from '~/lib/ui/button'
|
|
4
|
+
import { Card, CardContent } from '~/lib/ui/card'
|
|
5
|
+
import { Loader } from '~/lib/ui/loader'
|
|
6
|
+
import { Overlay } from '~/lib/ui/overlay'
|
|
7
|
+
import { Login } from '../components/login'
|
|
8
|
+
import { LoggedIn } from '../components/logged-in'
|
|
9
|
+
import { useLoginConfig } from '../contexts/login'
|
|
10
|
+
import { IdentityProvider, IdentityState, LogoutTrigger } from '@contember/react-identity'
|
|
11
|
+
|
|
12
|
+
export default () => {
|
|
13
|
+
const entrypointConfig = useLoginConfig()
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<IdentityProvider>
|
|
17
|
+
<IdentityState state={['none', 'cleared']}>
|
|
18
|
+
<Login
|
|
19
|
+
appUrl={entrypointConfig.appUrl}
|
|
20
|
+
hasTokenFromEnv={entrypointConfig.hasTokenFromEnv}
|
|
21
|
+
idps={entrypointConfig.idps}
|
|
22
|
+
magicLink={entrypointConfig.magicLink}
|
|
23
|
+
/>
|
|
24
|
+
</IdentityState>
|
|
25
|
+
<IdentityState state="success">
|
|
26
|
+
<LoggedIn appUrl={entrypointConfig.appUrl} />
|
|
27
|
+
</IdentityState>
|
|
28
|
+
<IdentityState state="loading">
|
|
29
|
+
<Loader />
|
|
30
|
+
</IdentityState>
|
|
31
|
+
<IdentityState state="failed">
|
|
32
|
+
<Overlay>
|
|
33
|
+
<Card className="w-72">
|
|
34
|
+
<CardContent className="flex flex-col items-center gap-2">
|
|
35
|
+
<CircleAlert className="h-12 w-12 text-destructive" />
|
|
36
|
+
<p className="text-center text-lg text-gray-600">
|
|
37
|
+
{dict.identityLoader.fail}
|
|
38
|
+
</p>
|
|
39
|
+
<LogoutTrigger>
|
|
40
|
+
<Button>Login again</Button>
|
|
41
|
+
</LogoutTrigger>
|
|
42
|
+
</CardContent>
|
|
43
|
+
</Card>
|
|
44
|
+
</Overlay>
|
|
45
|
+
</IdentityState>
|
|
46
|
+
</IdentityProvider>
|
|
47
|
+
)
|
|
48
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '~/lib/ui/card'
|
|
2
|
+
import { dict } from '~/lib/dict'
|
|
3
|
+
import { Loader } from '~/lib/ui/loader'
|
|
4
|
+
import { PasswordlessSignInFormFields } from '~/lib/tenant/forms/passwordless-signin'
|
|
5
|
+
import { AnchorButton } from '~/lib/ui/button'
|
|
6
|
+
import { Link, useCurrentRequest, useRedirect } from '@contember/react-routing'
|
|
7
|
+
import { PasswordlessSignInForm, usePasswordlessOtpActivator } from '@contember/react-identity'
|
|
8
|
+
|
|
9
|
+
export default () => {
|
|
10
|
+
const request = useCurrentRequest()
|
|
11
|
+
const redirect = useRedirect()
|
|
12
|
+
const requestId = request?.parameters.request_id as string | undefined
|
|
13
|
+
const token = request?.parameters.token as string | undefined
|
|
14
|
+
const otpActivation = usePasswordlessOtpActivator()
|
|
15
|
+
|
|
16
|
+
if (!requestId || !token || otpActivation.type === 'empty') {
|
|
17
|
+
return <p>Invalid request</p>
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<Card className="w-96">
|
|
22
|
+
<CardHeader>
|
|
23
|
+
<CardTitle className="text-2xl">{dict.tenant.passwordlessSignIn.title}</CardTitle>
|
|
24
|
+
</CardHeader>
|
|
25
|
+
<CardContent>
|
|
26
|
+
{otpActivation.type === 'otp_activating' && <Loader />}
|
|
27
|
+
{otpActivation.type === 'otp_activation_failed' && <div className="text-red-500 text-center">
|
|
28
|
+
{dict.tenant.otpActivation.errorMessages[otpActivation.error]}
|
|
29
|
+
</div>}
|
|
30
|
+
{otpActivation.type === 'otp_activated' && <div className="flex flex-col items-center gap-4">
|
|
31
|
+
<p className="text-lg text-center">
|
|
32
|
+
Enter the following code where you initiated signing in:
|
|
33
|
+
</p>
|
|
34
|
+
<div className="text-4xl font-bold border p-2 rounded font-mono">
|
|
35
|
+
{otpActivation.otp}
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
</div>}
|
|
39
|
+
{otpActivation.type === 'can_proceed_to_login' && <PasswordlessSignInForm onSuccess={() => {
|
|
40
|
+
redirect('index')
|
|
41
|
+
}} requestId={requestId} token={token?.toString()} validationType="token">
|
|
42
|
+
<form>
|
|
43
|
+
<PasswordlessSignInFormFields type="token" />
|
|
44
|
+
</form>
|
|
45
|
+
</PasswordlessSignInForm>}
|
|
46
|
+
</CardContent>
|
|
47
|
+
<CardFooter>
|
|
48
|
+
<Link to="index">
|
|
49
|
+
<AnchorButton variant="link" className="ml-auto">
|
|
50
|
+
{dict.tenant.login.backToLogin}
|
|
51
|
+
</AnchorButton>
|
|
52
|
+
</Link>
|
|
53
|
+
</CardFooter>
|
|
54
|
+
</Card>
|
|
55
|
+
)
|
|
56
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '~/lib/ui/card'
|
|
3
|
+
import { dict } from '~/lib/dict'
|
|
4
|
+
import { PasswordlessSignInFormFields } from '~/lib/tenant/forms/passwordless-signin'
|
|
5
|
+
import { MailIcon } from 'lucide-react'
|
|
6
|
+
import { AnchorButton } from '~/lib/ui/button'
|
|
7
|
+
import { PasswordlessSignInForm } from '@contember/react-identity'
|
|
8
|
+
import { Link, useCurrentRequest, useRedirect } from '@contember/react-routing'
|
|
9
|
+
|
|
10
|
+
export default () => {
|
|
11
|
+
const request = useCurrentRequest()
|
|
12
|
+
const redirect = useRedirect()
|
|
13
|
+
const requestId = request?.parameters.request_id as string | undefined
|
|
14
|
+
const [showOtp, setShowOtp] = useState(false)
|
|
15
|
+
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
setTimeout(() => {
|
|
18
|
+
setShowOtp(true)
|
|
19
|
+
}, 5000)
|
|
20
|
+
}, [])
|
|
21
|
+
|
|
22
|
+
if (!requestId) {
|
|
23
|
+
return <p>Invalid request</p>
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<Card className="w-96">
|
|
28
|
+
<CardHeader>
|
|
29
|
+
<CardTitle className="text-2xl">{dict.tenant.passwordlessSignIn.title}</CardTitle>
|
|
30
|
+
</CardHeader>
|
|
31
|
+
<CardContent>
|
|
32
|
+
{showOtp ? (<>
|
|
33
|
+
<p className="text-gray-600">Have a verification code? Enter it here:</p>
|
|
34
|
+
<PasswordlessSignInForm onSuccess={() => {
|
|
35
|
+
redirect('index')
|
|
36
|
+
}} requestId={requestId} validationType="otp">
|
|
37
|
+
<form>
|
|
38
|
+
<PasswordlessSignInFormFields type="otp" />
|
|
39
|
+
</form>
|
|
40
|
+
</PasswordlessSignInForm>
|
|
41
|
+
</>) : <div className="flex flex-col items-center justify-center gap-4">
|
|
42
|
+
<MailIcon className="text-gray-300 w-16 h-16" />
|
|
43
|
+
<div className="text-center">
|
|
44
|
+
An email with password reset instructions has been sent to your email address.
|
|
45
|
+
</div>
|
|
46
|
+
<div className="text-xs text-gray-600">
|
|
47
|
+
Do you have a verification code?{' '}
|
|
48
|
+
<span onClick={() => setShowOtp(true)} className="underline cursor-pointer">
|
|
49
|
+
Enter manually
|
|
50
|
+
</span>
|
|
51
|
+
</div>
|
|
52
|
+
</div>}
|
|
53
|
+
</CardContent>
|
|
54
|
+
<CardFooter>
|
|
55
|
+
<Link to="index">
|
|
56
|
+
<AnchorButton variant="link" className="ml-auto">
|
|
57
|
+
{dict.tenant.login.backToLogin}
|
|
58
|
+
</AnchorButton>
|
|
59
|
+
</Link>
|
|
60
|
+
</CardFooter>
|
|
61
|
+
</Card>
|
|
62
|
+
)
|
|
63
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ToastContent, useShowToast } from '~/lib/toast'
|
|
2
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '~/lib/ui/card'
|
|
3
|
+
import { dict } from '~/lib/dict'
|
|
4
|
+
import { PasswordResetFormFields } from '~/lib/tenant'
|
|
5
|
+
import { AnchorButton } from '~/lib/ui/button'
|
|
6
|
+
import { Link, useCurrentRequest, useRedirect } from '@contember/react-routing'
|
|
7
|
+
import { PasswordResetForm } from '@contember/react-identity'
|
|
8
|
+
|
|
9
|
+
export default () => {
|
|
10
|
+
const request = useCurrentRequest()
|
|
11
|
+
const redirect = useRedirect()
|
|
12
|
+
const showToast = useShowToast()
|
|
13
|
+
const token = request?.parameters.token as string | undefined
|
|
14
|
+
|
|
15
|
+
return (
|
|
16
|
+
<Card className="w-96">
|
|
17
|
+
<CardHeader>
|
|
18
|
+
<CardTitle className="text-2xl">{dict.tenant.passwordReset.title}</CardTitle>
|
|
19
|
+
<CardDescription>
|
|
20
|
+
{dict.tenant.passwordReset.description}
|
|
21
|
+
</CardDescription>
|
|
22
|
+
</CardHeader>
|
|
23
|
+
<CardContent>
|
|
24
|
+
<PasswordResetForm onSuccess={() => {
|
|
25
|
+
showToast(<ToastContent>
|
|
26
|
+
Password has been reset
|
|
27
|
+
</ToastContent>, { type: 'success' })
|
|
28
|
+
redirect('index')
|
|
29
|
+
}} token={token}>
|
|
30
|
+
<form>
|
|
31
|
+
<PasswordResetFormFields hasToken={!!token} />
|
|
32
|
+
</form>
|
|
33
|
+
</PasswordResetForm>
|
|
34
|
+
</CardContent>
|
|
35
|
+
<CardFooter>
|
|
36
|
+
<Link to="index">
|
|
37
|
+
<AnchorButton variant="link" className="ml-auto">
|
|
38
|
+
{dict.tenant.login.backToLogin}
|
|
39
|
+
</AnchorButton>
|
|
40
|
+
</Link>
|
|
41
|
+
</CardFooter>
|
|
42
|
+
</Card>
|
|
43
|
+
)
|
|
44
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '~/lib/ui/card'
|
|
2
|
+
import { dict } from '~/lib/dict'
|
|
3
|
+
import { PasswordResetRequestFormFields } from '~/lib/tenant'
|
|
4
|
+
import { AnchorButton } from '~/lib/ui/button'
|
|
5
|
+
import { Link, useRedirect } from '@contember/react-routing'
|
|
6
|
+
import { PasswordResetRequestForm } from '@contember/react-identity'
|
|
7
|
+
|
|
8
|
+
export default () => {
|
|
9
|
+
const redirect = useRedirect()
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<Card className="w-96">
|
|
13
|
+
<CardHeader>
|
|
14
|
+
<CardTitle className="text-2xl">{dict.tenant.passwordResetRequest.title}</CardTitle>
|
|
15
|
+
<CardDescription>
|
|
16
|
+
{dict.tenant.passwordResetRequest.description}
|
|
17
|
+
</CardDescription>
|
|
18
|
+
</CardHeader>
|
|
19
|
+
<CardContent>
|
|
20
|
+
<PasswordResetRequestForm onSuccess={() => redirect('resetRequestSuccess')}>
|
|
21
|
+
<form>
|
|
22
|
+
<PasswordResetRequestFormFields />
|
|
23
|
+
</form>
|
|
24
|
+
</PasswordResetRequestForm>
|
|
25
|
+
</CardContent>
|
|
26
|
+
<CardFooter>
|
|
27
|
+
<Link to="index">
|
|
28
|
+
<AnchorButton variant="link" className="ml-auto">
|
|
29
|
+
{dict.tenant.login.backToLogin}
|
|
30
|
+
</AnchorButton>
|
|
31
|
+
</Link>
|
|
32
|
+
</CardFooter>
|
|
33
|
+
</Card>
|
|
34
|
+
)
|
|
35
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '~/lib/ui/card'
|
|
2
|
+
import { dict } from '~/lib/dict'
|
|
3
|
+
import { MailIcon } from 'lucide-react'
|
|
4
|
+
import { AnchorButton } from '~/lib/ui/button'
|
|
5
|
+
import { Link } from '@contember/react-routing'
|
|
6
|
+
|
|
7
|
+
export default () => (
|
|
8
|
+
<Card className="w-96">
|
|
9
|
+
<CardHeader>
|
|
10
|
+
<CardTitle className="text-2xl">{dict.tenant.passwordResetRequest.title}</CardTitle>
|
|
11
|
+
<CardDescription>
|
|
12
|
+
{dict.tenant.passwordResetRequest.description}
|
|
13
|
+
</CardDescription>
|
|
14
|
+
</CardHeader>
|
|
15
|
+
<CardContent>
|
|
16
|
+
<div className="flex flex-col items-center justify-center gap-4">
|
|
17
|
+
<MailIcon className="text-gray-300 w-16 h-16" />
|
|
18
|
+
<div className="text-center">
|
|
19
|
+
An email with password reset instructions has been sent to your email address.
|
|
20
|
+
</div>
|
|
21
|
+
<div className="text-center text-gray-500">
|
|
22
|
+
<Link to="passwordReset"><a className="underline">{dict.tenant.passwordResetRequest.entryCode}</a></Link>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</CardContent>
|
|
26
|
+
<CardFooter>
|
|
27
|
+
<Link to="index">
|
|
28
|
+
<AnchorButton variant="link" className="ml-auto">
|
|
29
|
+
{dict.tenant.login.backToLogin}
|
|
30
|
+
</AnchorButton>
|
|
31
|
+
</Link>
|
|
32
|
+
</CardFooter>
|
|
33
|
+
</Card>
|
|
34
|
+
)
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
@import '@contember/react-devbar/index.css' layer(base);
|
|
2
|
+
@import 'tailwindcss';
|
|
3
|
+
|
|
4
|
+
@layer base {
|
|
5
|
+
:root {
|
|
6
|
+
--background: hsl(0 0% 100%);
|
|
7
|
+
--foreground: hsl(240 10% 3.9%);
|
|
8
|
+
--card: hsl(0 0% 100%);
|
|
9
|
+
--card-foreground: hsl(240 10% 3.9%);
|
|
10
|
+
--popover: hsl(0 0% 100%);
|
|
11
|
+
--popover-foreground: hsl(240 10% 3.9%);
|
|
12
|
+
--primary: hsl(240 5.9% 10%);
|
|
13
|
+
--primary-foreground: hsl(0 0% 98%);
|
|
14
|
+
--secondary: hsl(240 4.8% 95.9%);
|
|
15
|
+
--secondary-foreground: hsl(240 5.9% 10%);
|
|
16
|
+
--muted: hsl(240 4.8% 95.9%);
|
|
17
|
+
--muted-foreground: hsl(240 3.8% 46.1%);
|
|
18
|
+
--accent: hsl(240 4.8% 95.9%);
|
|
19
|
+
--accent-foreground: hsl(240 5.9% 10%);
|
|
20
|
+
--destructive: hsl(0 72.22% 50.59%);
|
|
21
|
+
--destructive-foreground: hsl(0 0% 98%);
|
|
22
|
+
--border: hsl(240 5.9% 90%);
|
|
23
|
+
--input: hsl(240 5.9% 90%);
|
|
24
|
+
--ring: hsl(240 5% 64.9%);
|
|
25
|
+
--radius: 0.5rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.dark {
|
|
29
|
+
--background: hsl(240 10% 3.9%);
|
|
30
|
+
--foreground: hsl(0 0% 98%);
|
|
31
|
+
--card: hsl(240 10% 3.9%);
|
|
32
|
+
--card-foreground: hsl(0 0% 98%);
|
|
33
|
+
--popover: hsl(240 10% 3.9%);
|
|
34
|
+
--popover-foreground: hsl(0 0% 98%);
|
|
35
|
+
--primary: hsl(0 0% 98%);
|
|
36
|
+
--primary-foreground: hsl(240 5.9% 10%);
|
|
37
|
+
--secondary: hsl(240 3.7% 15.9%);
|
|
38
|
+
--secondary-foreground: hsl(0 0% 98%);
|
|
39
|
+
--muted: hsl(240 3.7% 15.9%);
|
|
40
|
+
--muted-foreground: hsl(240 5% 64.9%);
|
|
41
|
+
--accent: hsl(240 3.7% 15.9%);
|
|
42
|
+
--accent-foreground: hsl(0 0% 98%);
|
|
43
|
+
--destructive: hsl(0 62.8% 30.6%);
|
|
44
|
+
--destructive-foreground: hsl(0 85.7% 97.3%);
|
|
45
|
+
--border: hsl(240 3.7% 15.9%);
|
|
46
|
+
--input: hsl(240 3.7% 15.9%);
|
|
47
|
+
--ring: hsl(240 4.9% 83.9%);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@utility container {
|
|
52
|
+
margin-inline: auto;
|
|
53
|
+
padding-inline: 2rem;
|
|
54
|
+
|
|
55
|
+
@media screen and (min-width: 1400px) {
|
|
56
|
+
max-width: 1400px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
@theme {
|
|
61
|
+
--color-background: var(--background);
|
|
62
|
+
--color-foreground: var(--foreground);
|
|
63
|
+
--color-border: var(--border);
|
|
64
|
+
--color-input: var(--input);
|
|
65
|
+
--color-ring: var(--ring);
|
|
66
|
+
--color-background: var(--background);
|
|
67
|
+
--color-foreground: var(--foreground);
|
|
68
|
+
--color-primary: var(--primary);
|
|
69
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
70
|
+
--color-secondary: var(--secondary);
|
|
71
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
72
|
+
--color-destructive: var(--destructive);
|
|
73
|
+
--color-destructive-foreground: var(--destructive-foreground);
|
|
74
|
+
--color-muted: var(--muted);
|
|
75
|
+
--color-muted-foreground: var(--muted-foreground);
|
|
76
|
+
--color-accent: var(--accent);
|
|
77
|
+
--color-accent-foreground: var(--accent-foreground);
|
|
78
|
+
--color-popover: var(--popover);
|
|
79
|
+
--color-popover-foreground: var(--popover-foreground);
|
|
80
|
+
--color-card: var(--card);
|
|
81
|
+
--color-card-foreground: var(--card-foreground);
|
|
82
|
+
|
|
83
|
+
--color-divider: var(--border);
|
|
84
|
+
--color-sidebar-border: var(--border);
|
|
85
|
+
|
|
86
|
+
--border-radius-xl: calc(var(--radius) + 4px),
|
|
87
|
+
--border-radius-lg: var(--radius),
|
|
88
|
+
--border-radius-md: calc(var(--radius) - 2px),
|
|
89
|
+
--border-radius-sm: calc(var(--radius) - 4px),
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
:focus-visible {
|
|
93
|
+
outline: 0
|
|
94
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<link rel="icon" type="image/png" href="favicon.png">
|
|
8
8
|
<link rel="apple-touch-icon" href="apple-touch-icon.png">
|
|
9
9
|
<title>My Contember Application</title>
|
|
10
|
-
<script type="module" src="/index.tsx"></script>
|
|
10
|
+
<script type="module" src="/entrypoint/index.tsx"></script>
|
|
11
11
|
</head>
|
|
12
12
|
|
|
13
13
|
</html>
|
|
@@ -28,13 +28,13 @@ import { Switch } from '../ui/switch'
|
|
|
28
28
|
import { uic } from '../utils'
|
|
29
29
|
|
|
30
30
|
const BlockRepeaterItemsWrapperUI = uic('div', {
|
|
31
|
-
baseClass: 'rounded border border-gray-300 px-4 py-8 flex flex-col',
|
|
31
|
+
baseClass: 'rounded-sm border border-gray-300 px-4 py-8 flex flex-col',
|
|
32
32
|
})
|
|
33
33
|
const BlockRepeaterItemUI = uic('div', {
|
|
34
|
-
baseClass: 'relative border-t transition-all group',
|
|
34
|
+
baseClass: 'relative border-t border-gray-200 transition-all group',
|
|
35
35
|
})
|
|
36
36
|
const BlockRepeaterDragOverlayUI = uic('div', {
|
|
37
|
-
baseClass: 'rounded border border-gray-300 p-4 relative bg-
|
|
37
|
+
baseClass: 'rounded-sm border border-gray-300 p-4 relative bg-gray-100/60 backdrop-blur-xs',
|
|
38
38
|
})
|
|
39
39
|
const BlockRepeaterHandleUI = uic('button', {
|
|
40
40
|
baseClass: 'absolute top-1/2 -left-6 h-6 w-6 flex justify-end align-center opacity-10 hover:opacity-100 transition-opacity -translate-y-1/2',
|
|
@@ -224,7 +224,7 @@ const BlockRepeaterAddItemBefore = ({ sortableBy }: { sortableBy: DefaultBlockRe
|
|
|
224
224
|
return (
|
|
225
225
|
<DropdownMenu>
|
|
226
226
|
<DropdownMenuTrigger asChild>
|
|
227
|
-
<Button className="absolute top-0 right-1/2 -translate-x-1/2 -translate-y-1/2 bg-
|
|
227
|
+
<Button className="absolute top-0 right-1/2 -translate-x-1/2 -translate-y-1/2 bg-background" variant="ghost">
|
|
228
228
|
<PlusCircleIcon className="w-4 h-4 opacity-25 hover:opacity-100 transition-opacity" />
|
|
229
229
|
</Button>
|
|
230
230
|
</DropdownMenuTrigger>
|
|
@@ -27,13 +27,13 @@ export const BoardColumnHeaderUI = uic('div', {
|
|
|
27
27
|
baseClass: 'px-4 py-1 border-b border-gray-100',
|
|
28
28
|
})
|
|
29
29
|
export const BoardCardUI = uic('div', {
|
|
30
|
-
baseClass: 'rounded border bg-card text-card-foreground shadow-
|
|
30
|
+
baseClass: 'rounded-sm border border-gray-200 bg-card text-card-foreground shadow-xs p-4 relative hover:shadow-md transition-all duration-200',
|
|
31
31
|
})
|
|
32
32
|
export const BoardColumnUI = uic('div', {
|
|
33
|
-
baseClass: 'rounded-lg border bg-card text-card-foreground shadow-md relative min-w-48 data-[sortable-over="item"]:bg-yellow-100 hover:shadow-lg transition-all duration-200',
|
|
33
|
+
baseClass: 'rounded-lg border border-gray-200 bg-card text-card-foreground shadow-md relative min-w-48 data-[sortable-over="item"]:bg-yellow-100 hover:shadow-lg transition-all duration-200',
|
|
34
34
|
})
|
|
35
35
|
export const BoardDragOverlayUI = uic('div', {
|
|
36
|
-
baseClass: 'rounded border border-gray-300 p-4 relative bg-
|
|
36
|
+
baseClass: 'rounded-sm border border-gray-200 border-gray-300 p-4 relative bg-gray-100/60 backdrop-blur-xs',
|
|
37
37
|
})
|
|
38
38
|
export const BoardItemHandleUI = uic('button', {
|
|
39
39
|
baseClass: 'absolute top-0 right-0 h-5 w-5 flex justify-center items-center opacity-10 hover:opacity-100 transition-opacity',
|
package/resources/templates/{template-workspace → default}/admin/lib/datagrid/column-header.tsx
RENAMED
|
@@ -57,7 +57,7 @@ export const DataGridColumnHeader = Component(({ sortingField, hidingName, child
|
|
|
57
57
|
<div className="flex flex-col gap-1">
|
|
58
58
|
|
|
59
59
|
{(sortingField || hidingName) && <>
|
|
60
|
-
<div className="flex gap-2 border rounded p-1">
|
|
60
|
+
<div className="flex gap-2 border border-gray-200 rounded-sm p-1">
|
|
61
61
|
{sortingField && <><DataViewSortingTrigger field={sortingField} action="toggleAsc">
|
|
62
62
|
<Button variant="ghost" className={'data-[active]:text-blue-600 cursor-pointer flex-1'} size="sm">
|
|
63
63
|
<ArrowDownAZIcon className="mr-2 h-3.5 w-3.5 text-muted-foreground/70" />
|
|
@@ -148,7 +148,7 @@ export const DataGridBooleanColumn = Component<DataGridBooleanColumnProps>(({ fi
|
|
|
148
148
|
children={children ?? <Field field={field} format={format ?? formatBoolean} />}
|
|
149
149
|
filterName={field}
|
|
150
150
|
filter={filter ?? <DataViewBooleanFilter field={field}>
|
|
151
|
-
<div className="border rounded p-2">
|
|
151
|
+
<div className="border border-gray-200 rounded-sm p-2">
|
|
152
152
|
<DataGridBooleanFilterControls />
|
|
153
153
|
</div>
|
|
154
154
|
</DataViewBooleanFilter>}
|
|
@@ -199,7 +199,7 @@ export const DataGridNumberColumn = Component<DataGridNumberColumnProps>(({ fiel
|
|
|
199
199
|
children={children ?? <Field field={field} format={format ?? formatNumber} />}
|
|
200
200
|
filterName={field}
|
|
201
201
|
filter={filter ?? <DataViewNumberFilter field={field}>
|
|
202
|
-
<div className="border rounded max-w-60 p-2">
|
|
202
|
+
<div className="border border-gray-200 rounded-sm max-w-60 p-2">
|
|
203
203
|
<DataGridNumberFilterControls/>
|
|
204
204
|
</div>
|
|
205
205
|
</DataViewNumberFilter>}
|
|
@@ -249,7 +249,7 @@ export const DataGridDateColumn = Component<DataGridDateColumnProps>(({ field, h
|
|
|
249
249
|
children={children ?? <Field field={field} format={format ?? formatDate} />}
|
|
250
250
|
filterName={field}
|
|
251
251
|
filter={filter ?? <DataViewDateFilter field={field}>
|
|
252
|
-
<div className="border rounded">
|
|
252
|
+
<div className="border border-gray-200 rounded-sm">
|
|
253
253
|
<DataGridDateFilterControls layout="row"/>
|
|
254
254
|
</div>
|
|
255
255
|
</DataViewDateFilter>}
|
|
@@ -300,7 +300,7 @@ export const DataGridDateTimeColumn = Component<DataGridDateTimeColumnProps>(({
|
|
|
300
300
|
children={children ?? <Field field={field} format={format ?? formatDateTime} />}
|
|
301
301
|
filterName={field}
|
|
302
302
|
filter={filter ?? <DataViewDateFilter field={field}>
|
|
303
|
-
<div className="border rounded">
|
|
303
|
+
<div className="border border-gray-200 rounded-sm">
|
|
304
304
|
<DataGridDateFilterControls layout="row" />
|
|
305
305
|
</div>
|
|
306
306
|
</DataViewDateFilter>}
|
|
@@ -363,7 +363,7 @@ export const DataGridEnumColumn = Component<DataGridEnumColumnProps>(({ field, h
|
|
|
363
363
|
children={children ?? <DataGridEnumCell field={field} options={options} tooltipActions={tooltipActions} />}
|
|
364
364
|
filterName={field}
|
|
365
365
|
filter={filter ?? <DataViewEnumFilter field={field}>
|
|
366
|
-
<div className="max-w-60 border rounded p-2">
|
|
366
|
+
<div className="max-w-60 border border-gray-200 rounded-sm p-2">
|
|
367
367
|
<DataGridEnumFilterControls options={options} />
|
|
368
368
|
</div>
|
|
369
369
|
</DataViewEnumFilter>}
|
|
@@ -425,7 +425,7 @@ export const DataGridEnumListColumn = Component<DataGridEnumListColumnProps>(({
|
|
|
425
425
|
children={children ?? <DataGridEnumListCell field={field} options={options} tooltipActions={tooltipActions} />}
|
|
426
426
|
filterName={field}
|
|
427
427
|
filter={filter ?? <DataViewEnumListFilter field={field}>
|
|
428
|
-
<div className="max-w-60 border rounded p-2">
|
|
428
|
+
<div className="max-w-60 border border-gray-200 rounded-sm p-2">
|
|
429
429
|
<DataGridEnumFilterControls options={options} />
|
|
430
430
|
</div>
|
|
431
431
|
</DataViewEnumListFilter>}
|
|
@@ -574,7 +574,7 @@ export const DataGridHasOneColumn = Component<DataGridHasOneColumnProps>(({ fiel
|
|
|
574
574
|
children={<DataGridHasOneCell field={field} filterName={filterName} tooltipActions={tooltipActions}>{children}</DataGridHasOneCell>}
|
|
575
575
|
filterName={filterName ?? (typeof field === 'string' ? field : undefined)}
|
|
576
576
|
filter={filter ?? <DataViewHasOneFilter field={field} name={filterName}>
|
|
577
|
-
<div className="border rounded p-2 max-w-60 flex flex-col gap-2">
|
|
577
|
+
<div className="border border-gray-200 rounded-sm p-2 max-w-60 flex flex-col gap-2">
|
|
578
578
|
<div className="flex flex-wrap gap-2">
|
|
579
579
|
<DataGridRelationFilteredItemsList>
|
|
580
580
|
{children}
|
|
@@ -637,7 +637,7 @@ export const DataGridHasManyColumn = Component<DataGridHasManyColumnProps>(({ fi
|
|
|
637
637
|
children={<DataGridHasManyCell field={field} filterName={filterName} tooltipActions={tooltipActions}>{children}</DataGridHasManyCell>}
|
|
638
638
|
filterName={filterName ?? (typeof field === 'string' ? field : undefined)}
|
|
639
639
|
filter={filter ?? <DataViewHasManyFilter field={field} name={filterName}>
|
|
640
|
-
<div className="border rounded p-2 max-w-60 flex flex-col gap-2">
|
|
640
|
+
<div className="border border-gray-200 rounded-sm p-2 max-w-60 flex flex-col gap-2">
|
|
641
641
|
<div className="flex flex-wrap gap-2">
|
|
642
642
|
<DataGridRelationFilteredItemsList>
|
|
643
643
|
{children}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EyeIcon, EyeOffIcon } from 'lucide-react'
|
|
2
|
+
import { dict } from '../dict'
|
|
3
|
+
import * as React from 'react'
|
|
4
|
+
import { DataViewElementData, DataViewVisibilityTrigger, useDataViewElements } from '@contember/react-dataview'
|
|
5
|
+
import { ScrollArea } from '../ui/scroll-area'
|
|
6
|
+
import { Fragment } from 'react'
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Props for {@link DataGridToolbarVisibleElements}.
|
|
10
|
+
*/
|
|
11
|
+
export interface DataGridToolbarVisibleElementsProps {
|
|
12
|
+
elements?: DataViewElementData[]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Control for toggling visibility of columns in data grid.
|
|
17
|
+
*/
|
|
18
|
+
export const DataGridToolbarVisibleElements = ({ elements }: DataGridToolbarVisibleElementsProps) => {
|
|
19
|
+
const globalElements = useDataViewElements()
|
|
20
|
+
|
|
21
|
+
const resolvedElements = elements ?? globalElements
|
|
22
|
+
if (resolvedElements.length === 0) {
|
|
23
|
+
return null
|
|
24
|
+
}
|
|
25
|
+
return (
|
|
26
|
+
<div>
|
|
27
|
+
<p className="text-gray-400 text-xs font-semibold mb-1">{dict.datagrid.visibleFields}</p>
|
|
28
|
+
<div className="flex flex-col bg-gray-50 p-2 border border-gray-200 rounded-sm shadow-inner">
|
|
29
|
+
<ScrollArea className={'max-h-48'}>
|
|
30
|
+
<div className="flex flex-col">
|
|
31
|
+
<DataGridToolbarVisibleElementsList elements={resolvedElements} />
|
|
32
|
+
</div>
|
|
33
|
+
</ScrollArea>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
const DataGridToolbarVisibleElementsList = ({ elements }: { elements: DataViewElementData[] }) => {
|
|
41
|
+
return elements.map(element => {
|
|
42
|
+
if (!element.name) {
|
|
43
|
+
return null
|
|
44
|
+
}
|
|
45
|
+
return (
|
|
46
|
+
<Fragment key={element.name}>
|
|
47
|
+
<DataViewVisibilityTrigger key={element.name} name={element.name} value={it => !(it ?? true)}>
|
|
48
|
+
<button className={'gap-2 group text-gray-400 data-[current]:text-black text-left inline-flex items-center p-0.5 text-sm rounded-sm hover:bg-background'}>
|
|
49
|
+
<EyeIcon className={'w-3 h-3 hidden group-data-[current]:block'} />
|
|
50
|
+
<EyeOffIcon className={'w-3 h-3 block group-data-[current]:hidden'} />
|
|
51
|
+
<span>{element.label}</span>
|
|
52
|
+
</button>
|
|
53
|
+
</DataViewVisibilityTrigger>
|
|
54
|
+
{element.children && <div className="flex flex-col ml-4"><DataGridToolbarVisibleElementsList elements={element.children} /></div>}
|
|
55
|
+
</Fragment>
|
|
56
|
+
)
|
|
57
|
+
})
|
|
58
|
+
|
|
59
|
+
}
|
package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/date.tsx
RENAMED
|
@@ -113,7 +113,7 @@ const DataGridDateFilterSelect = ({ label, ranges = defaultRanges }: {
|
|
|
113
113
|
</PopoverTrigger>
|
|
114
114
|
<PopoverContent className="p-0">
|
|
115
115
|
<div className="flex">
|
|
116
|
-
{ranges?.length > 0 && <div className="flex flex-col gap-2 bg-gray-50 p-4 border-r">
|
|
116
|
+
{ranges?.length > 0 && <div className="flex flex-col gap-2 bg-gray-50 p-4 border-r border-gray-200">
|
|
117
117
|
{ranges.map(({ start, end, label }) => (
|
|
118
118
|
<DataGridRangeFilter start={start} end={end} label={label} key={`${start}-${end}`} />
|
|
119
119
|
))}
|
|
@@ -154,7 +154,7 @@ export const DataGridDateFilterControls = ({ layout }: { layout?: 'row' | 'colum
|
|
|
154
154
|
{dict.datagrid.dateStart}:
|
|
155
155
|
</Label>
|
|
156
156
|
<DataViewDateFilterResetTrigger type="start">
|
|
157
|
-
<span className="text-sm text-gray-500 cursor-pointer hover:bg-gray-100 rounded p-0.5"><XIcon
|
|
157
|
+
<span className="text-sm text-gray-500 cursor-pointer hover:bg-gray-100 rounded-sm p-0.5"><XIcon
|
|
158
158
|
className="w-3 h-3" /></span>
|
|
159
159
|
</DataViewDateFilterResetTrigger>
|
|
160
160
|
</div>
|
|
@@ -168,7 +168,7 @@ export const DataGridDateFilterControls = ({ layout }: { layout?: 'row' | 'colum
|
|
|
168
168
|
{dict.datagrid.dateEnd}:
|
|
169
169
|
</Label>
|
|
170
170
|
<DataViewDateFilterResetTrigger type="end">
|
|
171
|
-
<span className="text-sm text-gray-500 cursor-pointer hover:bg-gray-100 rounded p-0.5"><XIcon
|
|
171
|
+
<span className="text-sm text-gray-500 cursor-pointer hover:bg-gray-100 rounded-sm p-0.5"><XIcon
|
|
172
172
|
className="w-3 h-3" /></span>
|
|
173
173
|
</DataViewDateFilterResetTrigger>
|
|
174
174
|
</div>
|
|
@@ -177,7 +177,7 @@ export const DataGridDateFilterControls = ({ layout }: { layout?: 'row' | 'colum
|
|
|
177
177
|
</DataViewDateFilterInput>
|
|
178
178
|
</div>
|
|
179
179
|
</div>
|
|
180
|
-
<div className="mt-auto p-2 border-t">
|
|
180
|
+
<div className="mt-auto p-2 border-t border-gray-200">
|
|
181
181
|
<DataGridNullFilter />
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
package/resources/templates/{template-workspace → default}/admin/lib/datagrid/filters/relation.tsx
RENAMED
|
@@ -179,7 +179,7 @@ export type DataGridHasManyTooltipProps =
|
|
|
179
179
|
* ```tsx
|
|
180
180
|
* <HasMany field="tags">
|
|
181
181
|
* <DataGridHasManyTooltip field={'tags'}>
|
|
182
|
-
* <button className="text-sm border rounded px-2 py-1">
|
|
182
|
+
* <button className="text-sm border border-gray-200 rounded-sm px-2 py-1">
|
|
183
183
|
* <Field field="name" />
|
|
184
184
|
* </button>
|
|
185
185
|
* </DataGridHasManyTooltip>
|
package/resources/templates/{template-workspace → default}/admin/lib/datagrid/pagination.tsx
RENAMED
|
@@ -22,7 +22,7 @@ const PaginationWrapper = uic('div', {
|
|
|
22
22
|
baseClass: 'flex gap-6 lg:gap-8 items-center justify-between mt-4 pb-4',
|
|
23
23
|
variants: {
|
|
24
24
|
sticky: {
|
|
25
|
-
true: 'sticky bottom-0 z-50 bg-
|
|
25
|
+
true: 'sticky bottom-0 z-50 bg-background pt-4 border-t border-gray-200',
|
|
26
26
|
},
|
|
27
27
|
},
|
|
28
28
|
})
|
|
@@ -35,7 +35,7 @@ export const DataGridTable = Component<DataViewTableProps>(({ children }) => {
|
|
|
35
35
|
<span>{dict.datagrid.showTable}</span>
|
|
36
36
|
</>}
|
|
37
37
|
>
|
|
38
|
-
<div className="relative rounded-md border overflow-y-auto">
|
|
38
|
+
<div className="relative rounded-md border border-gray-200 overflow-y-auto">
|
|
39
39
|
<DataGridTableRenderer>
|
|
40
40
|
{children}
|
|
41
41
|
</DataGridTableRenderer>
|