-
Notifications
You must be signed in to change notification settings - Fork 31
feat(blocks.notification-summary): add NotificationSummary block #348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
e648c5c
feat(ui): add NotificationSummary block
michnowak 73053a5
feat(ui): enhance notification summary block with priority counts and…
michnowak 2a9ca40
refactor(ui): restructure NotificationSummary block to use infoCards …
michnowak b3f111e
refactor(ui): remove altMessage fields from NotificationSummary block
michnowak ca60665
feat(ui): add changeset
michnowak 09c7bbe
refactor(ui): update NotificationSummary block description and icons …
michnowak f655d8a
feat(deps): add @o2s/blocks.notification-summary to package dependencies
michnowak 7c264a0
refactor(ui): update NotificationSummary to use variant property for …
michnowak fe22ebe
fix(ui): handle empty infoCards in NotificationSummary and adjust lay…
michnowak 05f60a7
refactor(ui): update loading fallback in NotificationSummary for impr…
michnowak e904709
fix(ui): update MEDIUM variant styling in NotificationSummary for con…
michnowak d22dc65
chore(deps): update package-lock.json
michnowak c604a51
Merge branch 'main' into feature/notification-summary-block
michnowak 10a39b8
fix: update package-lock.json
michnowak 9f39d5c
updated package-lock
marcinkrasowski 75b76ff
refactor: streamline notification summary mapping and update model to…
michnowak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| --- | ||
| '@o2s/blocks.notification-summary': minor | ||
| '@o2s/integrations.mocked': minor | ||
| '@o2s/api-harmonization': minor | ||
| '@o2s/framework': minor | ||
| '@o2s/frontend': minor | ||
| --- | ||
|
|
||
| add NotificationSummary block |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| # compiled output | ||
| /dist | ||
| /node_modules | ||
| /build | ||
|
|
||
| # Logs | ||
| logs | ||
| *.log | ||
| npm-debug.log* | ||
| pnpm-debug.log* | ||
| yarn-debug.log* | ||
| yarn-error.log* | ||
| lerna-debug.log* | ||
|
|
||
| # OS | ||
| .DS_Store | ||
|
|
||
| # Tests | ||
| /coverage | ||
| /.nyc_output | ||
|
|
||
| # IDEs and editors | ||
| /.idea | ||
| .project | ||
| .classpath | ||
| .c9/ | ||
| *.launch | ||
| .settings/ | ||
| *.sublime-workspace | ||
|
|
||
| # IDE - VSCode | ||
| .vscode/* | ||
| !.vscode/settings.json | ||
| !.vscode/tasks.json | ||
| !.vscode/launch.json | ||
| !.vscode/extensions.json | ||
|
|
||
| # dotenv environment variable files | ||
| .env | ||
| .env.development.local | ||
| .env.test.local | ||
| .env.production.local | ||
|
|
||
| # temp directory | ||
| .temp | ||
| .tmp | ||
|
|
||
| # Runtime data | ||
| pids | ||
| *.pid | ||
| *.seed | ||
| *.pid.lock | ||
|
|
||
| # Diagnostic reports (https://nodejs.org/api/report.html) | ||
| report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json | ||
|
|
||
| /tsconfig.tsbuildinfo | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import apiConfig from "@o2s/prettier-config/api.mjs"; | ||
| import frontendConfig from "@o2s/prettier-config/frontend.mjs"; | ||
|
|
||
| /** | ||
| * @see https://prettier.io/docs/en/configuration.html | ||
| * @type {import("prettier").Config} | ||
| */ | ||
| const config = { | ||
| overrides: [ | ||
| { | ||
| files: "./src/api-harmonization/**/*", | ||
| options: apiConfig, | ||
| }, | ||
| { | ||
| files: "./src/frontend/**/*", | ||
| options: frontendConfig, | ||
| }, | ||
| { | ||
| files: "./src/sdk/**/*", | ||
| options: frontendConfig, | ||
| }, | ||
| ], | ||
| }; | ||
|
|
||
| export default config; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| import { config as apiConfig } from '@o2s/eslint-config/api'; | ||
| import { config as frontendConfig } from '@o2s/eslint-config/frontend-block'; | ||
| import { defineConfig } from 'eslint/config'; | ||
|
|
||
| export default defineConfig([ | ||
| { | ||
| files: ['src/api-harmonization/**/*'], | ||
| extends: [apiConfig], | ||
| }, | ||
| { | ||
| files: ['src/frontend/**/*'], | ||
| extends: [frontendConfig], | ||
| }, | ||
| { | ||
| files: ['src/sdk/**/*'], | ||
| extends: [frontendConfig], | ||
| }, | ||
| ]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export default { | ||
| '*.{js,jsx,ts,tsx,css,scss}': ['prettier --write'], | ||
| '*.{js,jsx,ts,tsx}': () => 'tsc --noEmit', | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "name": "@o2s/blocks.notification-summary", | ||
| "version": "0.0.1", | ||
| "private": false, | ||
| "license": "MIT", | ||
| "description": "Displays a dynamic NotificationSummary showing notification counts grouped by priority.", | ||
| "exports": { | ||
| "./api-harmonization": "./dist/api-harmonization/api-harmonization/index.js", | ||
| "./frontend": "./dist/frontend/frontend/index.js", | ||
| "./sdk": "./dist/sdk/sdk/index.js", | ||
| "./client": "./dist/api-harmonization/api-harmonization/notification-summary.client.js" | ||
| }, | ||
| "files": [ | ||
| "dist" | ||
| ], | ||
| "scripts": { | ||
| "dev": "tsc --build tsconfig.json && (concurrently \"tsc --build tsconfig.json -w\" \"tsc-alias -w\")", | ||
| "build": "tsc --build tsconfig.json && tsc-alias", | ||
| "lint": "tsc --noEmit && eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||
| "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,css,scss,json}\"" | ||
| }, | ||
| "dependencies": { | ||
| "@o2s/framework": "*", | ||
| "@o2s/utils.logger": "*", | ||
| "@o2s/ui": "*", | ||
| "@o2s/utils.api-harmonization": "*", | ||
| "@o2s/utils.frontend": "*", | ||
| "@o2s/configs.integrations": "*" | ||
| }, | ||
| "devDependencies": { | ||
| "dotenv-cli": "^8.0.0", | ||
| "@o2s/eslint-config": "*", | ||
| "@o2s/prettier-config": "*", | ||
| "@o2s/typescript-config": "*", | ||
| "concurrently": "^9.1.2", | ||
| "eslint": "^9.27.0", | ||
| "prettier": "^3.5.3", | ||
| "tsc-alias": "^1.8.16", | ||
| "typescript": "^5.8.3" | ||
| }, | ||
| "peerDependencies": { | ||
| "@types/react": "^19", | ||
| "@types/react-dom": "^19", | ||
| "react": "^19", | ||
| "react-dom": "^19", | ||
| "tailwindcss": "^4", | ||
| "@nestjs/axios": "^4", | ||
| "@nestjs/common": "^11", | ||
| "@nestjs/config": "^4.0.2", | ||
| "@nestjs/core": "^11", | ||
| "rxjs": "^7", | ||
| "next": "^15.3.2", | ||
| "next-intl": "^4.1.0" | ||
| } | ||
| } |
8 changes: 8 additions & 0 deletions
8
packages/blocks/notification-summary/src/api-harmonization/index.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| export const URL = '/blocks/notification-summary'; | ||
|
|
||
| export { NotificationSummaryBlockModule as Module } from './notification-summary.module'; | ||
| export { NotificationSummaryService as Service } from './notification-summary.service'; | ||
| export { NotificationSummaryController as Controller } from './notification-summary.controller'; | ||
|
|
||
| export * as Model from './notification-summary.model'; | ||
| export * as Request from './notification-summary.request'; |
4 changes: 4 additions & 0 deletions
4
packages/blocks/notification-summary/src/api-harmonization/notification-summary.client.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| export const URL = '/blocks/notification-summary'; | ||
|
|
||
| export * as Model from './notification-summary.model'; | ||
| export * as Request from './notification-summary.request'; |
25 changes: 25 additions & 0 deletions
25
...ages/blocks/notification-summary/src/api-harmonization/notification-summary.controller.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import { Controller, Get, Headers, Query, UseInterceptors } from '@nestjs/common'; | ||
|
|
||
| import { Models } from '@o2s/utils.api-harmonization'; | ||
| import { LoggerService } from '@o2s/utils.logger'; | ||
|
|
||
| import { Auth } from '@o2s/framework/modules'; | ||
|
|
||
| import { URL } from './'; | ||
| import { GetNotificationSummaryBlockQuery } from './notification-summary.request'; | ||
| import { NotificationSummaryService } from './notification-summary.service'; | ||
|
|
||
| @Controller(URL) | ||
| @UseInterceptors(LoggerService) | ||
| export class NotificationSummaryController { | ||
| constructor(protected readonly service: NotificationSummaryService) {} | ||
|
|
||
| @Get() | ||
| @Auth.Decorators.Roles({ roles: [] }) | ||
| getNotificationSummaryBlock( | ||
| @Headers() headers: Models.Headers.AppHeaders, | ||
| @Query() query: GetNotificationSummaryBlockQuery, | ||
| ) { | ||
| return this.service.getNotificationSummaryBlock(query, headers); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.