@team-codeme/crud-forge 0.0.0-stage → 1.0.1
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/.cursor/agents/generator-engineer.md +31 -0
- package/.cursor/agents/keycloak-engineer.md +33 -0
- package/.cursor/agents/qa-engineer.md +32 -0
- package/.cursor/agents/security-reviewer.md +30 -0
- package/.cursor/mcp.json +13 -0
- package/.cursor/rules/crudforge-precautions.mdc +16 -0
- package/.cursor/rules/playwright-browser.mdc +30 -0
- package/.cursor/rules/readme-todo-sync.mdc +13 -0
- package/.env.qa.example +19 -0
- package/.github/workflows/qa-live.yml +32 -0
- package/.github/workflows/qa.yml +27 -0
- package/.vscode/settings.json +32 -0
- package/QA/IAM-PLAN.md +25 -0
- package/QA/IAM-RESULTS.md +39 -0
- package/QA/IAM-TESTCASES.md +36 -0
- package/QA/IAM-TODO.md +7 -0
- package/QA/KEYCLOAK-BOOTSTRAP.md +105 -0
- package/QA/PLAN.md +43 -0
- package/QA/RESULTS.md +59 -0
- package/QA/TESTCASES.md +65 -0
- package/QA/TODO.md +14 -0
- package/QA/pmb-dev/README.md +49 -0
- package/QA/pmb-dev/config/config.yml +152 -0
- package/QA/pmb-dev/gdl/i.gdl +17 -0
- package/README.md +851 -2
- package/Todo.md +207 -0
- package/assets/branding/crudforge-logo.png +0 -0
- package/assets/branding/crudforge-mark.png +0 -0
- package/branding/poster-crudforge.jpg +0 -0
- package/chat/last-chat/Investigating Mock Data Configuration.md +428 -0
- package/cli.js +167 -0
- package/config/default-config.yml +245 -0
- package/docs/performance/README.md +217 -0
- package/docs/performance/after.json +111 -0
- package/docs/performance/before.json +111 -0
- package/docs/quality/README.md +276 -0
- package/e2e/crudforge.e2e.yml +47 -0
- package/e2e/crudforge.field-profile.yml +33 -0
- package/e2e/crudforge.iam-live.yml +124 -0
- package/e2e/crudforge.iam.yml +62 -0
- package/e2e/tests/field-profile.spec.js +152 -0
- package/e2e/tests/generated-crud.spec.js +251 -0
- package/e2e/tests/iam-live.spec.js +149 -0
- package/e2e/tests/iam-pack.spec.js +151 -0
- package/e2e/tests/list-state.spec.js +73 -0
- package/features.csv +27 -0
- package/fuse-starter-pack/branding/crudforge-mark-source.jpg +0 -0
- package/fuse-starter-pack/branding/crudforge-mark-source.png +0 -0
- package/fuse-starter-pack/branding/crudforge-mark.png +0 -0
- package/fuse-starter-pack/branding/crudforge-wordmark-source.jpg +0 -0
- package/fuse-starter-pack/branding/crudforge-wordmark-source.png +0 -0
- package/fuse-starter-pack/branding/crudforge-wordmark.png +0 -0
- package/fuse-starter-pack/fuse-v21.1/Dockerfile +14 -0
- package/fuse-starter-pack/fuse-v21.1/LICENSE.md +6 -0
- package/fuse-starter-pack/fuse-v21.1/README.md +59 -0
- package/fuse-starter-pack/fuse-v21.1/angular.json +113 -0
- package/fuse-starter-pack/fuse-v21.1/eslint.config.ts +150 -0
- package/fuse-starter-pack/fuse-v21.1/nginx.conf +23 -0
- package/fuse-starter-pack/fuse-v21.1/nginx.dev.conf +18 -0
- package/fuse-starter-pack/fuse-v21.1/package-lock.json +11513 -0
- package/fuse-starter-pack/fuse-v21.1/package.json +69 -0
- package/fuse-starter-pack/fuse-v21.1/postcss.config.json +5 -0
- package/fuse-starter-pack/fuse-v21.1/prettier.config.ts +15 -0
- package/fuse-starter-pack/fuse-v21.1/proxy.conf.json +8 -0
- package/fuse-starter-pack/fuse-v21.1/proxy.dev.conf.json +8 -0
- package/fuse-starter-pack/fuse-v21.1/public/favicon.png +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/fonts/geist/Geist-Italic.woff2 +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/fonts/geist/Geist.woff2 +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/fonts/geist/GeistMono-Italic.woff2 +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/fonts/geist/GeistMono.woff2 +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/i18n/en.json +8 -0
- package/fuse-starter-pack/fuse-v21.1/public/i18n/es.json +8 -0
- package/fuse-starter-pack/fuse-v21.1/public/images/flags/ES.svg +79 -0
- package/fuse-starter-pack/fuse-v21.1/public/images/flags/US.svg +14 -0
- package/fuse-starter-pack/fuse-v21.1/public/images/flags/where-to-find-other-flags.txt +5 -0
- package/fuse-starter-pack/fuse-v21.1/public/images/logo/logo-mark.png +0 -0
- package/fuse-starter-pack/fuse-v21.1/public/images/logo/logo.png +0 -0
- package/fuse-starter-pack/fuse-v21.1/push.sh +27 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/app.config.server.ts +10 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/app.config.ts +64 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/app.routes.server.ts +8 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/app.routes.ts +39 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/app.ts +22 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/icons/index.ts +1 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/icons/lucide.ts +1 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/icons/provider.ts +23 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/local-storage/index.ts +2 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/local-storage/local-storage.ts +109 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/local-storage/provider.ts +15 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/media/index.ts +2 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/media/media.ts +64 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/media/provider.ts +15 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/theming/index.ts +3 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/theming/models/theming.ts +13 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/theming/palette.ts +209 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/theming/provider.ts +24 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/theming/theming.ts +129 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/core/transloco/transloco-http-loader.ts +12 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/data/navigation.ts +176 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/layout.ts +77 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/language-switcher.ts +91 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/navigation.ts +238 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/notifications.ts +252 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/scheme-switcher.ts +58 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/sidebar.ts +31 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/layout/ui/user.ts +132 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/academy/data/academy.ts +753 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/academy/data/model.ts +27 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/academy/features/course.ts +318 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/academy/features/courses.ts +228 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/academy/routes.ts +14 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/contacts/data/contacts.ts +4372 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/contacts/data/model.ts +34 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/contacts/features/contact.ts +239 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/contacts/features/contacts.ts +185 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/contacts/routes.ts +16 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/file-manager/data/file-manager.ts +261 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/file-manager/data/model.ts +12 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/file-manager/features/file-manager.ts +131 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/file-manager/routes.ts +15 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/file-manager/ui/list.ts +164 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/help-center/features/faq.ts +288 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/help-center/features/guide.ts +134 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/help-center/features/home.ts +219 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/help-center/features/support.ts +161 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/help-center/routes.ts +33 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/data/model.ts +18 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/data/notes.ts +324 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/features/note.ts +152 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/features/notes.ts +118 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/routes.ts +16 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/tasks/data/model.ts +17 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/tasks/data/tasks.ts +562 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/tasks/features/task.ts +195 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/tasks/features/tasks.ts +271 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/tasks/routes.ts +16 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/data/analytics.ts +1620 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/data/finance.ts +1065 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/data/project.ts +376 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/features/analytics/analytics.ts +1096 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/features/finance/finance.ts +658 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/features/project/budget-table.ts +188 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/features/project/project.ts +565 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/dashboards/routes.ts +23 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/features/changelog/changelog.ts +932 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/features/getting-started/building.ts +33 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/features/getting-started/development.ts +42 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/features/getting-started/installation.ts +47 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/layout.ts +9 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/documentation/routes.ts +45 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/error/features/error-page.ts +70 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/error/routes.ts +21 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/notifications/features/notifications.ts +262 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/notifications/routes.ts +10 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/features/account.ts +238 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/features/notifications.ts +134 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/features/plan-and-billing.ts +238 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/features/security.ts +211 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/features/team.ts +188 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/layout.ts +109 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/settings/routes.ts +37 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/extras/welcome/welcome.component.ts +22 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/routes.ts +95 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/forgot-password/forgot-password.html +54 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/forgot-password/forgot-password.ts +51 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/reset-password/reset-password.html +82 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/reset-password/reset-password.ts +69 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/sign-in/sign-in.html +132 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/sign-in/sign-in.ts +54 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/sign-up/sign-up.html +183 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/features/sign-up/sign-up.ts +56 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/layout.ts +9 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/auth/routes.ts +34 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/coming-soon/features/coming-soon.ts +156 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/coming-soon/layout.ts +9 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/coming-soon/routes.ts +16 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/website/layout/layout.ts +9 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/website/modules/home/features/home.ts +23 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/website/modules/home/routes.ts +10 -0
- package/fuse-starter-pack/fuse-v21.1/src/app/domains/website/routes.ts +30 -0
- package/fuse-starter-pack/fuse-v21.1/src/environments/environment.mock.ts +5 -0
- package/fuse-starter-pack/fuse-v21.1/src/environments/environment.prod.ts +5 -0
- package/fuse-starter-pack/fuse-v21.1/src/environments/environment.ts +5 -0
- package/fuse-starter-pack/fuse-v21.1/src/index.html +66 -0
- package/fuse-starter-pack/fuse-v21.1/src/main.server.ts +11 -0
- package/fuse-starter-pack/fuse-v21.1/src/main.ts +5 -0
- package/fuse-starter-pack/fuse-v21.1/src/server.ts +70 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/base/base.css +63 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/base/typography.css +54 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/components/a.css +18 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/components/input.css +22 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/components/kbd.css +55 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/components/material.css +1149 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/styles.css +31 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/tailwind/theme.css +147 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/tailwind/utilities.css +563 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/tailwind/variants.css +4 -0
- package/fuse-starter-pack/fuse-v21.1/src/styles/third-party/lucide-icons.css +12 -0
- package/fuse-starter-pack/fuse-v21.1/tsconfig.app.json +16 -0
- package/fuse-starter-pack/fuse-v21.1/tsconfig.json +37 -0
- package/fuse-starter-pack/fuse-v21.1/tsconfig.spec.json +10 -0
- package/generator/README.md +12 -0
- package/generator/issues/.gitkeep +0 -0
- package/package.json +56 -4
- package/playwright.config.js +29 -0
- package/playwright.field-profile.config.js +6 -0
- package/playwright.iam-live.config.js +31 -0
- package/playwright.iam.config.js +29 -0
- package/playwright.list-state.config.js +6 -0
- package/playwright.performance.config.js +1 -0
- package/run-config-tests.sh +5 -0
- package/scripts/e2e-paths.js +89 -0
- package/scripts/e2e-prepare-field-profile.js +17 -0
- package/scripts/e2e-prepare-iam-live.js +135 -0
- package/scripts/e2e-prepare-iam.js +65 -0
- package/scripts/e2e-prepare.js +72 -0
- package/scripts/e2e-serve-iam-live.js +28 -0
- package/scripts/e2e-serve-iam.js +28 -0
- package/scripts/e2e-serve.js +28 -0
- package/scripts/performance/generate.js +17 -0
- package/scripts/performance/measure.js +55 -0
- package/scripts/postinstall.js +9 -0
- package/scripts/prepare-quality-apps.js +34 -0
- package/scripts/run-config-tests.js +63 -0
- package/src/assets/logo-with-lable.jpeg +0 -0
- package/src/assets/logo.jpeg +0 -0
- package/src/commands/bootstrap.js +92 -0
- package/src/commands/doctor.js +403 -0
- package/src/commands/generate.js +301 -0
- package/src/commands/init-config.js +310 -0
- package/src/commands/keycloak-options.js +182 -0
- package/src/commands/validate.js +52 -0
- package/src/config/auth-config.js +183 -0
- package/src/config/default-values.js +235 -0
- package/src/config/env-refs.js +71 -0
- package/src/config/field-preferences.js +99 -0
- package/src/config/input-sources.js +104 -0
- package/src/config/load-config.js +166 -0
- package/src/config/proxy-routes.js +44 -0
- package/src/generator/access-control-tools.js +334 -0
- package/src/generator/ai-docs.js +691 -0
- package/src/generator/application-tests.js +252 -0
- package/src/generator/auth-pack.js +965 -0
- package/src/generator/embed-config.js +431 -0
- package/src/generator/entity-layout.js +30 -0
- package/src/generator/fuse-build.js +57 -0
- package/src/generator/fuse-runtime.js +344 -0
- package/src/generator/generated-banner.js +137 -0
- package/src/generator/index.js +874 -0
- package/src/generator/project-output.js +126 -0
- package/src/generator/team-pack.js +220 -0
- package/src/index.js +68 -0
- package/src/parser/gdl-parser.js +169 -0
- package/src/parser/jdl-parser.js +171 -0
- package/src/presets/pmb-test.js +139 -0
- package/src/presets/static-source.js +73 -0
- package/src/presets/store.js +96 -0
- package/src/provision/admin-service.js +148 -0
- package/src/provision/bootstrap.js +147 -0
- package/src/provision/http.js +123 -0
- package/src/provision/keycloak-admin-rest.js +335 -0
- package/src/provision/state.js +51 -0
- package/src/provision/token.js +52 -0
- package/src/templates/angular/auth/access-control.service.ts.ejs +179 -0
- package/src/templates/angular/auth/access-ctrl.pipe.ts.ejs +20 -0
- package/src/templates/angular/auth/auth.guard.ts.ejs +27 -0
- package/src/templates/angular/auth/auth.interceptor.ts.ejs +53 -0
- package/src/templates/angular/auth/auth.service.ts.ejs +594 -0
- package/src/templates/angular/auth/auth.utils.ts.ejs +28 -0
- package/src/templates/angular/auth/current-user.ts.ejs +24 -0
- package/src/templates/angular/auth/disabled-account-overlay.component.css.ejs +95 -0
- package/src/templates/angular/auth/disabled-account-overlay.component.html.ejs +33 -0
- package/src/templates/angular/auth/disabled-account-overlay.component.ts.ejs +23 -0
- package/src/templates/angular/auth/fuse-account.ts.ejs +234 -0
- package/src/templates/angular/auth/fuse-user.ts.ejs +264 -0
- package/src/templates/angular/auth/has-permission.directive.ts.ejs +51 -0
- package/src/templates/angular/auth/index.ts.ejs +24 -0
- package/src/templates/angular/auth/keycloak-admin.service.ts.ejs +670 -0
- package/src/templates/angular/auth/landing.guard.ts.ejs +61 -0
- package/src/templates/angular/auth/no-auth.guard.ts.ejs +19 -0
- package/src/templates/angular/auth/permission-attribute.util.ts.ejs +182 -0
- package/src/templates/angular/auth/sign-in.ts.ejs +60 -0
- package/src/templates/angular/entity/_entity_.model.ts.ejs +64 -0
- package/src/templates/angular/entity/_entity_.routes.ts.ejs +9 -0
- package/src/templates/angular/entity/components/forms/form/_entity_-form.component.html.ejs +168 -0
- package/src/templates/angular/entity/components/forms/form/_entity_-form.component.ts.ejs +175 -0
- package/src/templates/angular/entity/components/forms/form-page/_entity_-form-page.component.html.ejs +10 -0
- package/src/templates/angular/entity/components/forms/form-page/_entity_-form-page.component.ts.ejs +86 -0
- package/src/templates/angular/entity/components/forms/update/_entity_-form.service.ts.ejs +136 -0
- package/src/templates/angular/entity/components/interaction/actions/_entity_-actions.component.html.ejs +68 -0
- package/src/templates/angular/entity/components/interaction/actions/_entity_-actions.component.ts.ejs +69 -0
- package/src/templates/angular/entity/components/interaction/filter/_entity_-filter.component.html.ejs +111 -0
- package/src/templates/angular/entity/components/interaction/filter/_entity_-filter.component.ts.ejs +102 -0
- package/src/templates/angular/entity/components/presentation/card/_entity_-card.component.css.ejs +33 -0
- package/src/templates/angular/entity/components/presentation/card/_entity_-card.component.html.ejs +29 -0
- package/src/templates/angular/entity/components/presentation/card/_entity_-card.component.ts.ejs +93 -0
- package/src/templates/angular/entity/components/presentation/detail/_entity_-detail.component.css.ejs +54 -0
- package/src/templates/angular/entity/components/presentation/detail/_entity_-detail.component.html.ejs +58 -0
- package/src/templates/angular/entity/components/presentation/detail/_entity_-detail.component.ts.ejs +47 -0
- package/src/templates/angular/entity/components/presentation/list/_entity_-list.component.html.ejs +419 -0
- package/src/templates/angular/entity/components/presentation/list/_entity_-list.component.scss.ejs +48 -0
- package/src/templates/angular/entity/components/presentation/list/_entity_-list.component.ts.ejs +592 -0
- package/src/templates/angular/entity/service/_entity_.service.ts.ejs +153 -0
- package/src/templates/angular/entity/settings/_entity_.settings.ts.ejs +49 -0
- package/src/templates/angular/enums/_enum_.model.ts.ejs +11 -0
- package/src/templates/angular/iam/change-password.component.html.ejs +39 -0
- package/src/templates/angular/iam/change-password.component.ts.ejs +44 -0
- package/src/templates/angular/iam/no-access.component.ts.ejs +17 -0
- package/src/templates/angular/iam/role-list.component.html.ejs +331 -0
- package/src/templates/angular/iam/role-list.component.scss.ejs +107 -0
- package/src/templates/angular/iam/role-list.component.ts.ejs +597 -0
- package/src/templates/angular/iam/role-management/role-header.component.html.ejs +51 -0
- package/src/templates/angular/iam/role-management/role-header.component.ts.ejs +45 -0
- package/src/templates/angular/iam/role-management/role-inheritance.component.html.ejs +15 -0
- package/src/templates/angular/iam/role-management/role-inheritance.component.ts.ejs +19 -0
- package/src/templates/angular/iam/role-management/role-permissions-panel.component.css.ejs +24 -0
- package/src/templates/angular/iam/role-management/role-permissions-panel.component.html.ejs +108 -0
- package/src/templates/angular/iam/role-management/role-permissions-panel.component.ts.ejs +122 -0
- package/src/templates/angular/iam/role-management/role-users.component.html.ejs +104 -0
- package/src/templates/angular/iam/role-management/role-users.component.ts.ejs +53 -0
- package/src/templates/angular/iam/role-management/user-select-dialog.component.html.ejs +113 -0
- package/src/templates/angular/iam/role-management/user-select-dialog.component.ts.ejs +157 -0
- package/src/templates/angular/iam/role-permission-matrix.component.html.ejs +355 -0
- package/src/templates/angular/iam/role-permission-matrix.component.scss.ejs +217 -0
- package/src/templates/angular/iam/role-permission-matrix.component.ts.ejs +800 -0
- package/src/templates/angular/iam/screen-catalog.ts.ejs +147 -0
- package/src/templates/angular/iam/shared/confirm-dialog.component.ts.ejs +83 -0
- package/src/templates/angular/iam/shared/matrix-hierarchy.util.ts.ejs +196 -0
- package/src/templates/angular/iam/shared/permission-matrix-sound.ts.ejs +59 -0
- package/src/templates/angular/iam/shared/role-display.util.ts.ejs +43 -0
- package/src/templates/angular/iam/shared/role-permission-skeleton.component.ts.ejs +54 -0
- package/src/templates/angular/iam/shared/screen-matrix.util.ts.ejs +554 -0
- package/src/templates/angular/iam/shared/screen-navigation-map.ts.ejs +187 -0
- package/src/templates/angular/iam/shared/screen-navigation.registry.ts.ejs +64 -0
- package/src/templates/angular/iam/shared/text-highlight.pipe.ts.ejs +39 -0
- package/src/templates/angular/iam/user-access-matrix.component.html.ejs +212 -0
- package/src/templates/angular/iam/user-access-matrix.component.scss.ejs +34 -0
- package/src/templates/angular/iam/user-access-matrix.component.ts.ejs +239 -0
- package/src/templates/angular/iam/user-detail.component.html.ejs +143 -0
- package/src/templates/angular/iam/user-detail.component.ts.ejs +108 -0
- package/src/templates/angular/iam/user-form.component.html.ejs +63 -0
- package/src/templates/angular/iam/user-form.component.ts.ejs +100 -0
- package/src/templates/angular/iam/user-list.component.html.ejs +369 -0
- package/src/templates/angular/iam/user-list.component.scss.ejs +242 -0
- package/src/templates/angular/iam/user-list.component.ts.ejs +446 -0
- package/src/templates/angular/iam/user-management.routes.ts.ejs +47 -0
- package/src/templates/angular/iam/user-permission-matrix.component.html.ejs +231 -0
- package/src/templates/angular/iam/user-permission-matrix.component.scss.ejs +216 -0
- package/src/templates/angular/iam/user-permission-matrix.component.ts.ejs +516 -0
- package/src/templates/angular/shared/base/audit-user-name.pipe.ts.ejs +69 -0
- package/src/templates/angular/shared/base/base-filter.component.ts.ejs +245 -0
- package/src/templates/angular/shared/base/base-form.component.ts.ejs +109 -0
- package/src/templates/angular/shared/base/base-list.component.ts.ejs +507 -0
- package/src/templates/angular/shared/base/filter-types.ts.ejs +55 -0
- package/src/templates/angular/shared/base/input-format.directive.ts.ejs +47 -0
- package/src/templates/angular/shared/base/input-format.ts.ejs +15 -0
- package/src/templates/angular/shared/confirm-with-input-dialog.component.ts.ejs +91 -0
- package/src/templates/angular/shared/confirmation-dialog.component.ts.ejs +80 -0
- package/src/templates/angular/shared/list-styles.css.ejs +103 -0
- package/src/templates/angular/shared/loading-overlay.component.ts.ejs +24 -0
- package/src/templates/angular/shared/resizable.directive.ts.ejs +115 -0
- package/src/templates/angular/shared/snackbar-styles.css.ejs +11 -0
- package/src/templates/fuse-packs/access-control-tools/access-control-sync.js +819 -0
- package/src/templates/fuse-packs/access-control-tools/build-rename-map.js +67 -0
- package/src/templates/fuse-packs/access-control-tools/inject-qa-ids.js +14 -0
- package/src/templates/fuse-packs/access-control-tools/lib/hierarchy-scanner.js +628 -0
- package/src/templates/fuse-packs/access-control-tools/lib/hierarchy-scanner.test.js +323 -0
- package/src/templates/fuse-packs/access-control-tools/lib/html-scanner.js +362 -0
- package/src/templates/fuse-packs/access-control-tools/lib/id-rules.duplicate.test.js +136 -0
- package/src/templates/fuse-packs/access-control-tools/lib/id-rules.js +1095 -0
- package/src/templates/fuse-packs/access-control-tools/lib/ts-component-index.js +482 -0
- package/src/templates/fuse-packs/access-control-tools/output/.gitkeep +0 -0
- package/src/templates/fuse-packs/access-control-tools/run.sh +223 -0
- package/src/templates/fuse-packs/access-control-tools/scan-access-control.js +14 -0
- package/src/templates/fuse-packs/iam-assets/sound/apple-play.mp3 +0 -0
- package/src/templates/fuse-packs/iam-assets/sound/remove.mp3 +0 -0
- package/src/templates/generator/README.md +12 -0
- package/src/templates/testing/ci.cjs +45 -0
- package/src/templates/testing/mock.cjs +149 -0
- package/src/templates/testing/playwright.config.cjs +25 -0
- package/src/templates/testing/serve.cjs +22 -0
- package/src/templates/testing/smoke.spec.cjs +180 -0
- package/src/utils/branding.js +39 -0
- package/src/utils/colors.js +18 -0
- package/src/utils/diff.js +109 -0
- package/src/utils/merger.js +115 -0
- package/src/validator/backend-diagnostics.js +30 -0
- package/src/validator/blueprint-validator.js +276 -0
- package/src/validator/diagnostics.js +608 -0
- package/src/validator/pattern.js +28 -0
- package/test/auth-interceptor.js +84 -0
- package/test/auth-provision-checks.js +297 -0
- package/test/field-preferences.js +145 -0
- package/test/fixtures/field-profile.gdl +7 -0
- package/test/fixtures/mock.jdl +17 -0
- package/test/fixtures/mock.png +0 -0
- package/test/fixtures/performance/config.yml +33 -0
- package/test/fixtures/performance/large.gdl +199 -0
- package/test/fixtures/performance/small.gdl +7 -0
- package/test/fixtures/quality/custom.yml +22 -0
- package/test/fixtures/quality/go-duck.yml +22 -0
- package/test/fixtures/quality/jhipster.yml +30 -0
- package/test/fixtures/quality/representative.gdl +14 -0
- package/test/list-state.js +138 -0
- package/test/micro-functions-layout.js +95 -0
- package/test/performance-generation.js +32 -0
- package/test/pmb-preset.js +127 -0
- package/test/project-workflow.js +111 -0
- package/test/quality-features.js +250 -0
- package/test/verify-commands.js +83 -0
- package/test/verify.js +959 -0
- package/test-files/GDL/example.gdl +15 -0
- package/test-files/JDL/example.jdl +15 -0
- package/test-files/config/crudforge.config.yml +127 -0
- package/test-run.sh +272 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
2
|
+
import { Component, signal } from '@angular/core';
|
|
3
|
+
import { ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { email, form, FormField, required } from '@angular/forms/signals';
|
|
5
|
+
import { MatButton } from '@angular/material/button';
|
|
6
|
+
import { MatIcon } from '@angular/material/icon';
|
|
7
|
+
import {
|
|
8
|
+
MatError,
|
|
9
|
+
MatFormField,
|
|
10
|
+
MatInput,
|
|
11
|
+
MatLabel,
|
|
12
|
+
} from '@angular/material/input';
|
|
13
|
+
import { RouterLink } from '@angular/router';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
selector: 'help-center-support',
|
|
17
|
+
imports: [
|
|
18
|
+
CdkTextareaAutosize,
|
|
19
|
+
MatButton,
|
|
20
|
+
MatError,
|
|
21
|
+
MatFormField,
|
|
22
|
+
MatIcon,
|
|
23
|
+
MatInput,
|
|
24
|
+
MatLabel,
|
|
25
|
+
ReactiveFormsModule,
|
|
26
|
+
RouterLink,
|
|
27
|
+
FormField,
|
|
28
|
+
],
|
|
29
|
+
template: `
|
|
30
|
+
<div
|
|
31
|
+
class="@container mx-auto flex w-full max-w-4xl flex-auto flex-col items-start p-6 pt-2 lg:p-10 lg:pt-16"
|
|
32
|
+
>
|
|
33
|
+
<!-- Header -->
|
|
34
|
+
<a
|
|
35
|
+
matButton
|
|
36
|
+
class="-ml-3"
|
|
37
|
+
routerLink=".."
|
|
38
|
+
>
|
|
39
|
+
<mat-icon svgIcon="move-left" />
|
|
40
|
+
Back to Help Center
|
|
41
|
+
</a>
|
|
42
|
+
|
|
43
|
+
<div class="relative mt-3 flex flex-col">
|
|
44
|
+
<div class="text-xl font-bold tracking-tighter sm:text-4xl">
|
|
45
|
+
Contact us
|
|
46
|
+
</div>
|
|
47
|
+
<div class="mt-1 text-neutral-500">
|
|
48
|
+
Your request will be processed and our support staff will get back to
|
|
49
|
+
you in 24 hours.
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<!-- Form -->
|
|
54
|
+
<form
|
|
55
|
+
class="mt-8 flex w-full flex-auto flex-col gap-y-6"
|
|
56
|
+
(submit)="send($event)"
|
|
57
|
+
>
|
|
58
|
+
<!-- Name -->
|
|
59
|
+
<mat-form-field class="mt-12 w-full">
|
|
60
|
+
<mat-label>Name</mat-label>
|
|
61
|
+
<input
|
|
62
|
+
matInput
|
|
63
|
+
[formField]="supportForm.name"
|
|
64
|
+
/>
|
|
65
|
+
<mat-error>
|
|
66
|
+
@for (error of supportForm.name().errors(); track error) {
|
|
67
|
+
{{ error.message }}
|
|
68
|
+
}
|
|
69
|
+
</mat-error>
|
|
70
|
+
</mat-form-field>
|
|
71
|
+
|
|
72
|
+
<!-- Email -->
|
|
73
|
+
<mat-form-field class="w-full">
|
|
74
|
+
<mat-label>Email</mat-label>
|
|
75
|
+
<input
|
|
76
|
+
matInput
|
|
77
|
+
[formField]="supportForm.email"
|
|
78
|
+
/>
|
|
79
|
+
<mat-error>
|
|
80
|
+
@for (error of supportForm.email().errors(); track error) {
|
|
81
|
+
{{ error.message }}
|
|
82
|
+
}
|
|
83
|
+
</mat-error>
|
|
84
|
+
</mat-form-field>
|
|
85
|
+
|
|
86
|
+
<!-- Subject -->
|
|
87
|
+
<mat-form-field class="w-full">
|
|
88
|
+
<mat-label>Subject</mat-label>
|
|
89
|
+
<input
|
|
90
|
+
matInput
|
|
91
|
+
[formField]="supportForm.subject"
|
|
92
|
+
/>
|
|
93
|
+
<mat-error>
|
|
94
|
+
@for (error of supportForm.subject().errors(); track error) {
|
|
95
|
+
{{ error.message }}
|
|
96
|
+
}
|
|
97
|
+
</mat-error>
|
|
98
|
+
</mat-form-field>
|
|
99
|
+
|
|
100
|
+
<!-- Message -->
|
|
101
|
+
<mat-form-field class="w-full">
|
|
102
|
+
<mat-label>Message</mat-label>
|
|
103
|
+
<textarea
|
|
104
|
+
matInput
|
|
105
|
+
[formField]="supportForm.message"
|
|
106
|
+
cdkTextareaAutosize
|
|
107
|
+
[cdkAutosizeMinRows]="4"
|
|
108
|
+
cdkAutosizeMaxRows="6"
|
|
109
|
+
></textarea>
|
|
110
|
+
<mat-error>
|
|
111
|
+
@for (error of supportForm.subject().errors(); track error) {
|
|
112
|
+
{{ error.message }}
|
|
113
|
+
}
|
|
114
|
+
</mat-error>
|
|
115
|
+
</mat-form-field>
|
|
116
|
+
|
|
117
|
+
<!-- Actions -->
|
|
118
|
+
<div class="flex items-center justify-end gap-x-3">
|
|
119
|
+
<button
|
|
120
|
+
type="reset"
|
|
121
|
+
matButton
|
|
122
|
+
(click)="this.reset()"
|
|
123
|
+
>
|
|
124
|
+
Clear
|
|
125
|
+
</button>
|
|
126
|
+
|
|
127
|
+
<button matButton="filled">Submit</button>
|
|
128
|
+
</div>
|
|
129
|
+
</form>
|
|
130
|
+
</div>
|
|
131
|
+
`,
|
|
132
|
+
})
|
|
133
|
+
export default class HelpCenterSupport {
|
|
134
|
+
// State
|
|
135
|
+
protected supportFormModel = signal({
|
|
136
|
+
name: '',
|
|
137
|
+
email: '',
|
|
138
|
+
subject: '',
|
|
139
|
+
message: '',
|
|
140
|
+
});
|
|
141
|
+
protected supportForm = form(this.supportFormModel, (schema) => {
|
|
142
|
+
required(schema.name, { message: 'Name is required' });
|
|
143
|
+
required(schema.email, { message: 'Email is required' });
|
|
144
|
+
email(schema.email, { message: 'Enter a valid email address' });
|
|
145
|
+
required(schema.subject, { message: 'Subject is required' });
|
|
146
|
+
required(schema.message, { message: 'Message is required' });
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
reset() {
|
|
150
|
+
this.supportForm().reset({
|
|
151
|
+
name: '',
|
|
152
|
+
message: '',
|
|
153
|
+
email: '',
|
|
154
|
+
subject: '',
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
send(event: Event) {
|
|
159
|
+
event.preventDefault();
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Routes } from '@angular/router';
|
|
2
|
+
|
|
3
|
+
const routes: Routes = [
|
|
4
|
+
{
|
|
5
|
+
path: '',
|
|
6
|
+
pathMatch: 'full',
|
|
7
|
+
loadComponent: () => import('./features/home'),
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
path: 'faq',
|
|
11
|
+
loadComponent: () => import('./features/faq'),
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
path: 'support',
|
|
15
|
+
loadComponent: () => import('./features/support'),
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
path: 'guides',
|
|
19
|
+
children: [
|
|
20
|
+
{
|
|
21
|
+
path: '',
|
|
22
|
+
pathMatch: 'full',
|
|
23
|
+
redirectTo: 'getting-started',
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
path: ':id',
|
|
27
|
+
loadComponent: () => import('./features/guide'),
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
export default routes;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type Note = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
content: string;
|
|
5
|
+
tasks:
|
|
6
|
+
| {
|
|
7
|
+
id: string;
|
|
8
|
+
content: string;
|
|
9
|
+
completed: boolean;
|
|
10
|
+
}[]
|
|
11
|
+
| null;
|
|
12
|
+
image: string | null;
|
|
13
|
+
reminder: string | null;
|
|
14
|
+
labels: string[];
|
|
15
|
+
archived: boolean;
|
|
16
|
+
createdAt: string;
|
|
17
|
+
updatedAt: string | null;
|
|
18
|
+
};
|
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { add, set, sub } from 'date-fns';
|
|
3
|
+
import { Note } from '@/app/domains/admin/modules/apps/notes/data/model';
|
|
4
|
+
|
|
5
|
+
@Injectable({ providedIn: 'root' })
|
|
6
|
+
export class NotesService {
|
|
7
|
+
private now = new Date();
|
|
8
|
+
private notes: Note[] = [
|
|
9
|
+
{
|
|
10
|
+
id: '8f011ac5-b71c-4cd7-a317-857dcd7d85e0',
|
|
11
|
+
title: 'Find a new company name',
|
|
12
|
+
content:
|
|
13
|
+
'We need to find a new company name that reflects our values and mission. The name should be catchy, easy to remember, and available as a domain name.',
|
|
14
|
+
tasks: null,
|
|
15
|
+
image: null,
|
|
16
|
+
reminder: null,
|
|
17
|
+
labels: ['Work'],
|
|
18
|
+
archived: false,
|
|
19
|
+
createdAt: sub(set(this.now, { hours: 10, minutes: 19 }), {
|
|
20
|
+
days: 98,
|
|
21
|
+
}).toDateString(),
|
|
22
|
+
updatedAt: null,
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 'ced0a1ce-051d-41a3-b080-e2161e4ae621',
|
|
26
|
+
title: 'Vacation Photos',
|
|
27
|
+
content: 'Send the photos of last summer to John',
|
|
28
|
+
tasks: null,
|
|
29
|
+
image: 'images/cards/14-640x480.jpg',
|
|
30
|
+
reminder: null,
|
|
31
|
+
labels: ['Personal', 'Tasks'],
|
|
32
|
+
archived: false,
|
|
33
|
+
createdAt: sub(set(this.now, { hours: 15, minutes: 37 }), {
|
|
34
|
+
days: 80,
|
|
35
|
+
}).toDateString(),
|
|
36
|
+
updatedAt: null,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'd3ac02a9-86e4-4187-bbd7-2c965518b3a3',
|
|
40
|
+
title: 'Design Update',
|
|
41
|
+
content: 'Update the design of the theme',
|
|
42
|
+
tasks: null,
|
|
43
|
+
image: null,
|
|
44
|
+
reminder: null,
|
|
45
|
+
labels: ['Priority'],
|
|
46
|
+
archived: false,
|
|
47
|
+
createdAt: sub(set(this.now, { hours: 19, minutes: 27 }), {
|
|
48
|
+
days: 74,
|
|
49
|
+
}).toDateString(),
|
|
50
|
+
updatedAt: sub(set(this.now, { hours: 15, minutes: 36 }), {
|
|
51
|
+
days: 50,
|
|
52
|
+
}).toDateString(),
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
id: '89861bd4-0144-4bb4-8b39-332ca10371d5',
|
|
56
|
+
title: 'Theming Support',
|
|
57
|
+
content: 'Theming support for all apps',
|
|
58
|
+
tasks: null,
|
|
59
|
+
image: null,
|
|
60
|
+
reminder: add(set(this.now, { hours: 12, minutes: 34 }), {
|
|
61
|
+
days: 50,
|
|
62
|
+
}).toDateString(),
|
|
63
|
+
labels: ['Work'],
|
|
64
|
+
archived: false,
|
|
65
|
+
createdAt: sub(set(this.now, { hours: 12, minutes: 34 }), {
|
|
66
|
+
days: 59,
|
|
67
|
+
}).toDateString(),
|
|
68
|
+
updatedAt: null,
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: 'ffd20f3c-2d43-4c6b-8021-278032fc9e92',
|
|
72
|
+
title: 'Gift Ideas',
|
|
73
|
+
content:
|
|
74
|
+
"Stephanie's birthday is coming and I need to pick a present for her. Take a look at the below list and buy one of them (or all of them)",
|
|
75
|
+
tasks: [
|
|
76
|
+
{
|
|
77
|
+
id: '330a924f-fb51-48f6-a374-1532b1dd353d',
|
|
78
|
+
content: 'Scarf',
|
|
79
|
+
completed: false,
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
id: '781855a6-2ad2-4df4-b0af-c3cb5f302b40',
|
|
83
|
+
content: 'A new bike helmet',
|
|
84
|
+
completed: true,
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
id: 'bcb8923b-33cd-42c2-9203-170994fa24f5',
|
|
88
|
+
content: 'Necklace',
|
|
89
|
+
completed: false,
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: '726bdf6e-5cd7-408a-9a4f-0d7bb98c1c4b',
|
|
93
|
+
content: 'Flowers',
|
|
94
|
+
completed: false,
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
image: null,
|
|
98
|
+
reminder: null,
|
|
99
|
+
labels: ['Family'],
|
|
100
|
+
archived: false,
|
|
101
|
+
createdAt: sub(set(this.now, { hours: 16, minutes: 4 }), {
|
|
102
|
+
days: 47,
|
|
103
|
+
}).toDateString(),
|
|
104
|
+
updatedAt: null,
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: '71d223bb-abab-4183-8919-cd3600a950b4',
|
|
108
|
+
title: 'Shopping list',
|
|
109
|
+
content: 'Buy the groceries for the week',
|
|
110
|
+
tasks: [
|
|
111
|
+
{
|
|
112
|
+
id: 'e3cbc986-641c-4448-bc26-7ecfa0549c22',
|
|
113
|
+
content: 'Bread',
|
|
114
|
+
completed: true,
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
id: '34013111-ab2c-4b2f-9352-d2ae282f57d3',
|
|
118
|
+
content: 'Milk',
|
|
119
|
+
completed: false,
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
id: '0fbdea82-cc79-4433-8ee4-54fd542c380d',
|
|
123
|
+
content: 'Onions',
|
|
124
|
+
completed: false,
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
id: '66490222-743e-4262-ac91-773fcd98a237',
|
|
128
|
+
content: 'Coffee',
|
|
129
|
+
completed: true,
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: 'ab367215-d06a-48b0-a7b8-e161a63b07bd',
|
|
133
|
+
content: 'Toilet Paper',
|
|
134
|
+
completed: true,
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
image: null,
|
|
138
|
+
reminder: add(set(this.now, { hours: 10, minutes: 44 }), {
|
|
139
|
+
days: 35,
|
|
140
|
+
}).toDateString(),
|
|
141
|
+
labels: ['Tasks'],
|
|
142
|
+
archived: false,
|
|
143
|
+
createdAt: sub(set(this.now, { hours: 10, minutes: 44 }), {
|
|
144
|
+
days: 35,
|
|
145
|
+
}).toDateString(),
|
|
146
|
+
updatedAt: null,
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: '11fbeb98-ae5e-41ad-bed6-330886fd7906',
|
|
150
|
+
title: 'Keynote Schedule',
|
|
151
|
+
content: 'Schedule for the keynote speech at the conference',
|
|
152
|
+
tasks: [
|
|
153
|
+
{
|
|
154
|
+
id: '2711bac1-7d8a-443a-a4fe-506ef51d3fcb',
|
|
155
|
+
content: 'Breakfast',
|
|
156
|
+
completed: true,
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: 'e3a2d675-a3e5-4cef-9205-feeccaf949d7',
|
|
160
|
+
content: 'Opening ceremony',
|
|
161
|
+
completed: true,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
id: '7a721b6d-9d85-48e0-b6c3-f927079af582',
|
|
165
|
+
content: 'Talk 1: How we did it!',
|
|
166
|
+
completed: true,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: 'bdb4d5cd-5bb8-45e2-9186-abfd8307e429',
|
|
170
|
+
content: 'Talk 2: How can you do it!',
|
|
171
|
+
completed: false,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
id: 'c8293bb4-8ab4-4310-bbc2-52ecf8ec0c54',
|
|
175
|
+
content: 'Lunch break',
|
|
176
|
+
completed: false,
|
|
177
|
+
},
|
|
178
|
+
],
|
|
179
|
+
image: null,
|
|
180
|
+
reminder: add(set(this.now, { hours: 11, minutes: 27 }), {
|
|
181
|
+
days: 14,
|
|
182
|
+
}).toDateString(),
|
|
183
|
+
labels: ['Tasks', 'Work'],
|
|
184
|
+
archived: false,
|
|
185
|
+
createdAt: sub(set(this.now, { hours: 11, minutes: 27 }), {
|
|
186
|
+
days: 24,
|
|
187
|
+
}).toDateString(),
|
|
188
|
+
updatedAt: null,
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
id: 'd46dee8b-8761-4b6d-a1df-449d6e6feb6a',
|
|
192
|
+
title: 'Retirement Party',
|
|
193
|
+
content: "Organize the dad's surprise retirement party",
|
|
194
|
+
tasks: null,
|
|
195
|
+
image: null,
|
|
196
|
+
reminder: add(set(this.now, { hours: 14, minutes: 56 }), {
|
|
197
|
+
days: 25,
|
|
198
|
+
}).toDateString(),
|
|
199
|
+
labels: ['Family'],
|
|
200
|
+
archived: false,
|
|
201
|
+
createdAt: sub(set(this.now, { hours: 14, minutes: 56 }), {
|
|
202
|
+
days: 20,
|
|
203
|
+
}).toDateString(),
|
|
204
|
+
updatedAt: null,
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
id: '6bc9f002-1675-417c-93c4-308fba39023e',
|
|
208
|
+
title: 'Plan the road trip',
|
|
209
|
+
content: 'Plan the road trip for the next summer vacation with friends',
|
|
210
|
+
tasks: null,
|
|
211
|
+
image: 'images/cards/17-640x480.jpg',
|
|
212
|
+
reminder: null,
|
|
213
|
+
labels: ['Friends', 'Tasks'],
|
|
214
|
+
archived: false,
|
|
215
|
+
createdAt: sub(set(this.now, { hours: 9, minutes: 32 }), {
|
|
216
|
+
days: 15,
|
|
217
|
+
}).toDateString(),
|
|
218
|
+
updatedAt: sub(set(this.now, { hours: 17, minutes: 6 }), {
|
|
219
|
+
days: 12,
|
|
220
|
+
}).toDateString(),
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
id: '15188348-78aa-4ed6-b5c2-028a214ba987',
|
|
224
|
+
title: 'Office Address',
|
|
225
|
+
content: '933 8th Street Stamford, CT 06902',
|
|
226
|
+
tasks: null,
|
|
227
|
+
image: null,
|
|
228
|
+
reminder: null,
|
|
229
|
+
labels: ['Work'],
|
|
230
|
+
archived: false,
|
|
231
|
+
createdAt: sub(set(this.now, { hours: 20, minutes: 5 }), {
|
|
232
|
+
days: 12,
|
|
233
|
+
}).toDateString(),
|
|
234
|
+
updatedAt: null,
|
|
235
|
+
},
|
|
236
|
+
{
|
|
237
|
+
id: '1dbfc685-1a0a-4070-9ca7-ed896c523037',
|
|
238
|
+
title: 'Tasks',
|
|
239
|
+
content: 'Things to do this week',
|
|
240
|
+
tasks: [
|
|
241
|
+
{
|
|
242
|
+
id: '004638bf-3ee6-47a5-891c-3be7b9f3df09',
|
|
243
|
+
content: 'Wash the dishes',
|
|
244
|
+
completed: true,
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: '86e6820b-1ae3-4c14-a13e-35605a0d654b',
|
|
248
|
+
content: 'Walk the dog',
|
|
249
|
+
completed: false,
|
|
250
|
+
},
|
|
251
|
+
],
|
|
252
|
+
image: null,
|
|
253
|
+
reminder: add(set(this.now, { hours: 13, minutes: 43 }), {
|
|
254
|
+
days: 2,
|
|
255
|
+
}).toDateString(),
|
|
256
|
+
labels: ['Personal'],
|
|
257
|
+
archived: false,
|
|
258
|
+
createdAt: sub(set(this.now, { hours: 13, minutes: 43 }), {
|
|
259
|
+
days: 7,
|
|
260
|
+
}).toDateString(),
|
|
261
|
+
updatedAt: null,
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
id: '49548409-90a3-44d4-9a9a-f5af75aa9a66',
|
|
265
|
+
title: 'Dinner',
|
|
266
|
+
content: 'Dinner with parents',
|
|
267
|
+
tasks: null,
|
|
268
|
+
image: null,
|
|
269
|
+
reminder: null,
|
|
270
|
+
labels: ['Family', 'Priority'],
|
|
271
|
+
archived: false,
|
|
272
|
+
createdAt: sub(set(this.now, { hours: 7, minutes: 12 }), {
|
|
273
|
+
days: 2,
|
|
274
|
+
}).toDateString(),
|
|
275
|
+
updatedAt: null,
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
id: 'c6d13a35-500d-4491-a3f3-6ca05d6632d3',
|
|
279
|
+
title: 'Medicine Cabinet',
|
|
280
|
+
content: 'Re-fill the medicine cabinet',
|
|
281
|
+
tasks: null,
|
|
282
|
+
image: null,
|
|
283
|
+
reminder: null,
|
|
284
|
+
labels: ['Personal', 'Priority'],
|
|
285
|
+
archived: true,
|
|
286
|
+
createdAt: sub(set(this.now, { hours: 17, minutes: 14 }), {
|
|
287
|
+
days: 100,
|
|
288
|
+
}).toDateString(),
|
|
289
|
+
updatedAt: null,
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
id: '5e8a890f-d159-49f3-871b-ba19ce57517e',
|
|
293
|
+
title: 'Icons Pack',
|
|
294
|
+
content: 'Update the icons pack',
|
|
295
|
+
tasks: null,
|
|
296
|
+
image: null,
|
|
297
|
+
reminder: null,
|
|
298
|
+
labels: ['Work'],
|
|
299
|
+
archived: true,
|
|
300
|
+
createdAt: sub(set(this.now, { hours: 10, minutes: 29 }), {
|
|
301
|
+
days: 85,
|
|
302
|
+
}).toDateString(),
|
|
303
|
+
updatedAt: null,
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: '46214383-f8e7-44da-aa2e-0b685e0c5027',
|
|
307
|
+
title: 'Team Meeting',
|
|
308
|
+
content: 'Talk about the future of the web apps',
|
|
309
|
+
tasks: null,
|
|
310
|
+
image: null,
|
|
311
|
+
reminder: null,
|
|
312
|
+
labels: ['Work', 'Tasks'],
|
|
313
|
+
archived: true,
|
|
314
|
+
createdAt: sub(set(this.now, { hours: 15, minutes: 30 }), {
|
|
315
|
+
days: 69,
|
|
316
|
+
}).toDateString(),
|
|
317
|
+
updatedAt: null,
|
|
318
|
+
},
|
|
319
|
+
];
|
|
320
|
+
|
|
321
|
+
data = {
|
|
322
|
+
notes: this.notes,
|
|
323
|
+
};
|
|
324
|
+
}
|
package/fuse-starter-pack/fuse-v21.1/src/app/domains/admin/modules/apps/notes/features/note.ts
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { CdkTextareaAutosize } from '@angular/cdk/text-field';
|
|
2
|
+
import {
|
|
3
|
+
afterNextRender,
|
|
4
|
+
Component,
|
|
5
|
+
inject,
|
|
6
|
+
input,
|
|
7
|
+
linkedSignal,
|
|
8
|
+
TemplateRef,
|
|
9
|
+
viewChild,
|
|
10
|
+
} from '@angular/core';
|
|
11
|
+
import { form, FormField } from '@angular/forms/signals';
|
|
12
|
+
import { MatButton } from '@angular/material/button';
|
|
13
|
+
import { MatCheckbox } from '@angular/material/checkbox';
|
|
14
|
+
import { MatDialog, MatDialogClose } from '@angular/material/dialog';
|
|
15
|
+
import { MatIcon } from '@angular/material/icon';
|
|
16
|
+
import { ActivatedRoute, Router } from '@angular/router';
|
|
17
|
+
import { take } from 'rxjs';
|
|
18
|
+
import { NotesService } from '@/app/domains/admin/modules/apps/notes/data/notes';
|
|
19
|
+
|
|
20
|
+
@Component({
|
|
21
|
+
selector: 'note',
|
|
22
|
+
imports: [
|
|
23
|
+
FormField,
|
|
24
|
+
CdkTextareaAutosize,
|
|
25
|
+
MatButton,
|
|
26
|
+
MatIcon,
|
|
27
|
+
MatCheckbox,
|
|
28
|
+
MatDialogClose,
|
|
29
|
+
],
|
|
30
|
+
template: `
|
|
31
|
+
<ng-template #content>
|
|
32
|
+
@let note = this.note();
|
|
33
|
+
|
|
34
|
+
<div class="flex w-full flex-col p-4">
|
|
35
|
+
<!-- Title -->
|
|
36
|
+
<input
|
|
37
|
+
type="text"
|
|
38
|
+
class="rounded-md p-2 font-medium outline-none focus-within:bg-black/5"
|
|
39
|
+
[formField]="noteForm.title"
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<!-- Content -->
|
|
43
|
+
<textarea
|
|
44
|
+
class="rounded-md p-2 outline-none focus-within:bg-black/5"
|
|
45
|
+
[formField]="noteForm.content"
|
|
46
|
+
cdkTextareaAutosize
|
|
47
|
+
[cdkAutosizeMinRows]="2"
|
|
48
|
+
[cdkAutosizeMaxRows]="5"
|
|
49
|
+
></textarea>
|
|
50
|
+
|
|
51
|
+
<!-- Todo -->
|
|
52
|
+
@if (note.tasks && note.tasks.length > 0) {
|
|
53
|
+
<div class="mt-2 flex flex-col items-start gap-y-1 py-2">
|
|
54
|
+
@for (task of note.tasks; track task) {
|
|
55
|
+
<div class="items -center flex gap-2">
|
|
56
|
+
<mat-checkbox
|
|
57
|
+
[checked]="task.completed"
|
|
58
|
+
#checkbox
|
|
59
|
+
>
|
|
60
|
+
<span
|
|
61
|
+
[class.line-through]="checkbox.checked"
|
|
62
|
+
[class.text-neutral-500]="checkbox.checked"
|
|
63
|
+
>
|
|
64
|
+
{{ task.content }}
|
|
65
|
+
</span>
|
|
66
|
+
</mat-checkbox>
|
|
67
|
+
</div>
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
<!-- Add task -->
|
|
71
|
+
<button matButton="text">
|
|
72
|
+
<mat-icon svgIcon="plus" />
|
|
73
|
+
Add task
|
|
74
|
+
</button>
|
|
75
|
+
</div>
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
<!-- Labels -->
|
|
79
|
+
@if (note.labels && note.labels.length > 0) {
|
|
80
|
+
<div class="mt-2 flex flex-wrap items-center gap-2 p-2">
|
|
81
|
+
@for (label of note.labels; track label) {
|
|
82
|
+
<div
|
|
83
|
+
class="rounded-lg bg-neutral-200 px-2 py-1 text-xs font-medium text-neutral-500 dark:bg-black/20"
|
|
84
|
+
>
|
|
85
|
+
{{ label }}
|
|
86
|
+
</div>
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
<!-- Edit labels -->
|
|
90
|
+
<button
|
|
91
|
+
matButton="text"
|
|
92
|
+
class="h-6 text-xs text-neutral-500"
|
|
93
|
+
>
|
|
94
|
+
<mat-icon svgIcon="square-pen" />
|
|
95
|
+
Edit
|
|
96
|
+
</button>
|
|
97
|
+
</div>
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
<!-- Buttons -->
|
|
101
|
+
<div class="mt-4 flex items-center justify-end gap-x-2">
|
|
102
|
+
<button
|
|
103
|
+
matButton="outlined"
|
|
104
|
+
matDialogClose
|
|
105
|
+
>
|
|
106
|
+
Cancel
|
|
107
|
+
</button>
|
|
108
|
+
<button
|
|
109
|
+
matButton="filled"
|
|
110
|
+
matDialogClose
|
|
111
|
+
>
|
|
112
|
+
Save
|
|
113
|
+
</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</ng-template>
|
|
117
|
+
`,
|
|
118
|
+
})
|
|
119
|
+
export default class Note {
|
|
120
|
+
// Dependencies
|
|
121
|
+
private matDialog = inject(MatDialog);
|
|
122
|
+
private notesService = inject(NotesService);
|
|
123
|
+
private route = inject(ActivatedRoute);
|
|
124
|
+
private router = inject(Router);
|
|
125
|
+
|
|
126
|
+
// Inputs / Outputs
|
|
127
|
+
readonly noteId = input.required({ alias: 'id' });
|
|
128
|
+
|
|
129
|
+
// Queries
|
|
130
|
+
readonly content = viewChild.required<TemplateRef<unknown>>('content');
|
|
131
|
+
|
|
132
|
+
// State
|
|
133
|
+
protected note = linkedSignal(
|
|
134
|
+
() =>
|
|
135
|
+
this.notesService.data.notes.find((note) => note.id === this.noteId())!
|
|
136
|
+
);
|
|
137
|
+
protected noteForm = form(this.note);
|
|
138
|
+
|
|
139
|
+
constructor() {
|
|
140
|
+
afterNextRender(() => {
|
|
141
|
+
const dialogRef = this.matDialog.open(this.content(), {
|
|
142
|
+
panelClass: 'w-full max-w-lg'.split(' '),
|
|
143
|
+
});
|
|
144
|
+
dialogRef
|
|
145
|
+
.afterClosed()
|
|
146
|
+
.pipe(take(1))
|
|
147
|
+
.subscribe(() => {
|
|
148
|
+
this.router.navigate(['..'], { relativeTo: this.route });
|
|
149
|
+
});
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
}
|