From 562bfd009cb9352fdd9babb80b6c70942cd7f614 Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 18 Apr 2026 10:13:41 +0200 Subject: [PATCH] feat(unified-collection): add unified collection detail directive Entire-Checkpoint: c6e522b4276c --- libs/portal/shared/ui/src/index.ts | 1 + .../unified-collection-detail.directive.ts | 15 ++ nx.json | 173 ++++++++---------- tsconfig.base.json | 12 +- 4 files changed, 100 insertions(+), 101 deletions(-) create mode 100644 libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-detail.directive.ts diff --git a/libs/portal/shared/ui/src/index.ts b/libs/portal/shared/ui/src/index.ts index b740dda24..4187709bb 100644 --- a/libs/portal/shared/ui/src/index.ts +++ b/libs/portal/shared/ui/src/index.ts @@ -12,6 +12,7 @@ export * from './lib/components/search-form/search-form.component'; export * from './lib/components/search-layout/search-layout.component'; export { WatchedBadgeComponent } from 'components'; export * from './lib/components/unified-collection/unified-collection-page.component'; +export * from './lib/components/unified-collection/unified-collection-detail.directive'; export * from './lib/components/unified-collection/unified-live-tab.component'; export * from './lib/navigation/navigation.component'; export * from './lib/navigation/portal-rail-links.component'; diff --git a/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-detail.directive.ts b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-detail.directive.ts new file mode 100644 index 000000000..bb9bc0527 --- /dev/null +++ b/libs/portal/shared/ui/src/lib/components/unified-collection/unified-collection-detail.directive.ts @@ -0,0 +1,15 @@ +import { Directive, inject, TemplateRef } from '@angular/core'; +import { UnifiedCollectionItem } from '@iptvnator/portal/shared/util'; + +export interface UnifiedCollectionDetailContext { + $implicit: UnifiedCollectionItem; + item: UnifiedCollectionItem; + close: () => void; +} + +@Directive({ + selector: 'ng-template[unifiedCollectionDetail]', +}) +export class UnifiedCollectionDetailDirective { + readonly templateRef = inject(TemplateRef); +} diff --git a/nx.json b/nx.json index 52e500601..6e0773a20 100644 --- a/nx.json +++ b/nx.json @@ -1,100 +1,85 @@ { - "$schema": "./node_modules/nx/schemas/nx-schema.json", - "namedInputs": { - "default": [ - "{projectRoot}/**/*", - "sharedGlobals" - ], - "production": [ - "default", - "!{projectRoot}/.eslintrc.json", - "!{projectRoot}/eslint.config.mjs", - "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", - "!{projectRoot}/tsconfig.spec.json", - "!{projectRoot}/jest.config.[jt]s", - "!{projectRoot}/src/test-setup.[jt]s", - "!{projectRoot}/test-setup.[jt]s" - ], - "sharedGlobals": [ - "{workspaceRoot}/.github/workflows/ci.yml" - ] - }, - "targetDefaults": { - "@angular/build:application": { - "cache": true, - "dependsOn": [ - "^build" - ], - "inputs": [ - "production", - "^production" - ] + "$schema": "./node_modules/nx/schemas/nx-schema.json", + "namedInputs": { + "default": ["{projectRoot}/**/*", "sharedGlobals"], + "production": [ + "default", + "!{projectRoot}/.eslintrc.json", + "!{projectRoot}/eslint.config.mjs", + "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", + "!{projectRoot}/tsconfig.spec.json", + "!{projectRoot}/jest.config.[jt]s", + "!{projectRoot}/src/test-setup.[jt]s", + "!{projectRoot}/test-setup.[jt]s" + ], + "sharedGlobals": ["{workspaceRoot}/.github/workflows/ci.yml"] }, - "@nx/eslint:lint": { - "cache": true, - "inputs": [ - "default", - "{workspaceRoot}/.eslintrc.json", - "{workspaceRoot}/.eslintignore", - "{workspaceRoot}/eslint.config.mjs" - ] - }, - "@nx/jest:jest": { - "cache": true, - "inputs": [ - "default", - "^production", - "{workspaceRoot}/jest.preset.js" - ], - "options": { - "passWithNoTests": true - }, - "configurations": { - "ci": { - "ci": true, - "codeCoverage": true + "targetDefaults": { + "@angular/build:application": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] + }, + "@nx/eslint:lint": { + "cache": true, + "inputs": [ + "default", + "{workspaceRoot}/.eslintrc.json", + "{workspaceRoot}/.eslintignore", + "{workspaceRoot}/eslint.config.mjs" + ] + }, + "@nx/jest:jest": { + "cache": true, + "inputs": [ + "default", + "^production", + "{workspaceRoot}/jest.preset.js" + ], + "options": { + "passWithNoTests": true + }, + "configurations": { + "ci": { + "ci": true, + "codeCoverage": true + } + } + }, + "@nx/js:tsc": { + "cache": true, + "dependsOn": ["^build"], + "inputs": ["production", "^production"] } - } }, - "@nx/js:tsc": { - "cache": true, - "dependsOn": [ - "^build" - ], - "inputs": [ - "production", - "^production" - ] - } - }, - "plugins": [ - { - "plugin": "@nx/playwright/plugin", - "options": { - "targetName": "e2e" - } + "plugins": [ + { + "plugin": "@nx/playwright/plugin", + "options": { + "targetName": "e2e" + } + }, + { + "plugin": "@nx/eslint/plugin", + "options": { + "targetName": "lint" + } + } + ], + "generators": { + "@nx/angular:application": { + "e2eTestRunner": "playwright", + "linter": "eslint", + "style": "scss", + "unitTestRunner": "jest" + }, + "@nx/angular:library": { + "linter": "eslint", + "unitTestRunner": "jest" + }, + "@nx/angular:component": { + "style": "scss" + } }, - { - "plugin": "@nx/eslint/plugin", - "options": { - "targetName": "lint" - } - } - ], - "generators": { - "@nx/angular:application": { - "e2eTestRunner": "playwright", - "linter": "eslint", - "style": "scss", - "unitTestRunner": "jest" - }, - "@nx/angular:library": { - "linter": "eslint", - "unitTestRunner": "jest" - }, - "@nx/angular:component": { - "style": "scss" - } - }, - "defaultProject": "web" + "defaultProject": "web" } diff --git a/tsconfig.base.json b/tsconfig.base.json index 3fc47b293..34bb23b6c 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -27,9 +27,7 @@ "@iptvnator/portal/shared/util": [ "libs/portal/shared/util/src/index.ts" ], - "@iptvnator/epg/data-access": [ - "libs/epg/data-access/src/index.ts" - ], + "@iptvnator/epg/data-access": ["libs/epg/data-access/src/index.ts"], "@iptvnator/playlist/shared/ui": [ "libs/playlist/shared/ui/src/index.ts" ], @@ -78,9 +76,7 @@ "shared-portals": ["libs/ui/shared-portals/src/index.ts"], "remote-control": ["libs/ui/remote-control/src/index.ts"], "database": ["libs/shared/database/src/index.ts"], - "database-schema": [ - "libs/shared/database/src/lib/schema.ts" - ], + "database-schema": ["libs/shared/database/src/lib/schema.ts"], "database-path-utils": [ "libs/shared/database/src/lib/path-utils.ts" ], @@ -90,7 +86,9 @@ "workspace-dashboard-data-access": [ "libs/workspace/dashboard/data-access/src/index.ts" ], - "workspace-dashboard-ui": ["libs/workspace/dashboard/ui/src/index.ts"] + "workspace-dashboard-ui": [ + "libs/workspace/dashboard/ui/src/index.ts" + ] } }, "exclude": ["node_modules", "tmp"],