forked from SAP/fundamental-ngx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(btp): add Tool Layout (SAP#10680)
* feat: added btp package blueprint * chore: added btp in header package switcher * feat(btp): add Tool Layout * feat(btp): add BTP Tool Layout * feat(btp): add Tool Layout * fix: added tool layout to the tsconfig * chore: added HasElementRef interface to the tool layout component * chore: renamed directives to be camel case and removed hostbindings on static classes * chore: updated fd styles * chore: using ng-package entrypoints for generating typedocs * chore: renamed tool layout component selector * chore: removed incorrect class * fix: fixed nx tags test --------- Co-authored-by: g-cheishvili <[email protected]>
- Loading branch information
1 parent
4cdcbe1
commit 952ab76
Showing
83 changed files
with
1,321 additions
and
26 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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,10 @@ | ||
// eslint-disable-next-line @nx/enforce-module-boundaries | ||
import ROUTES from '@fundamental-ngx/docs/btp'; | ||
|
||
ROUTES[0].path = 'btp'; | ||
ROUTES.push({ | ||
path: '**', | ||
redirectTo: 'btp' | ||
}); | ||
|
||
export { ROUTES }; |
This file contains 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 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,34 @@ | ||
{ | ||
"extends": ["../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "fdb", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"warn", | ||
{ | ||
"type": "element", | ||
"prefix": "fdb", | ||
"style": "kebab-case" | ||
} | ||
], | ||
"@angular-eslint/no-host-metadata-property": "off" | ||
} | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@nx/angular-template"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains 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,7 @@ | ||
# btp | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Running unit tests | ||
|
||
Run `nx test btp` to execute the unit tests. |
This file contains 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,22 @@ | ||
/* eslint-disable */ | ||
export default { | ||
displayName: 'btp', | ||
preset: '../../jest.preset.js', | ||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], | ||
coverageDirectory: '../../coverage/libs/btp', | ||
transform: { | ||
'^.+\\.(ts|mjs|js|html)$': [ | ||
'jest-preset-angular', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
stringifyContentPathRegex: '\\.(html|svg)$' | ||
} | ||
] | ||
}, | ||
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], | ||
snapshotSerializers: [ | ||
'jest-preset-angular/build/serializers/no-ng-attributes', | ||
'jest-preset-angular/build/serializers/ng-snapshot', | ||
'jest-preset-angular/build/serializers/html-comment' | ||
] | ||
}; |
This file contains 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,3 @@ | ||
# @fundamental-ngx/btp/navigation | ||
|
||
Secondary entry point of `@fundamental-ngx/btp`. It can be used by importing from `@fundamental-ngx/btp/navigation`. |
This file contains 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,5 @@ | ||
{ | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains 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,7 @@ | ||
{ | ||
"sourceRoot": "libs/btp/navigation/src", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"name": "btp-navigation", | ||
"projectType": "library", | ||
"tags": ["scope:fdb", "type:lib"] | ||
} |
This file contains 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 @@ | ||
export default 'btp-navigation'; |
This file contains 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,7 @@ | ||
{ | ||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "../../dist/libs/btp", | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains 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,14 @@ | ||
{ | ||
"name": "@fundamental-ngx/btp", | ||
"version": "0.0.1", | ||
"peerDependencies": { | ||
"@angular/common": "ANGULAR_VER_PLACEHOLDER", | ||
"@angular/core": "ANGULAR_VER_PLACEHOLDER", | ||
"@fundamental-ngx/core": "VERSION_PLACEHOLDER", | ||
"@fundamental-ngx/cdk": "VERSION_PLACEHOLDER" | ||
}, | ||
"dependencies": { | ||
"tslib": "^2.3.0" | ||
}, | ||
"sideEffects": false | ||
} |
This file contains 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,48 @@ | ||
{ | ||
"name": "btp", | ||
"$schema": "../../node_modules/nx/schemas/project-schema.json", | ||
"sourceRoot": "libs/btp", | ||
"prefix": "fundamental-ngx", | ||
"tags": ["type:lib", "scope:fdb"], | ||
"projectType": "library", | ||
"targets": { | ||
"prepare": { | ||
"executor": "@fundamental-ngx/nx-plugin:prepare-library", | ||
"options": { | ||
"distPath": "dist/libs/btp" | ||
} | ||
}, | ||
"compile-typedoc": { | ||
"executor": "@fundamental-ngx/nx-plugin:compile-typedoc", | ||
"options": { | ||
"outputPath": "libs/docs/typedoc/btp" | ||
}, | ||
"outputs": ["{options.outputPath}"] | ||
}, | ||
"build": { | ||
"executor": "@nx/angular:package", | ||
"outputs": ["{workspaceRoot}/dist/libs/btp"], | ||
"options": { | ||
"tsConfig": "libs/btp/tsconfig.lib.json", | ||
"project": "libs/btp/ng-package.json" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"tsConfig": "libs/btp/tsconfig.lib.prod.json" | ||
} | ||
}, | ||
"defaultConfiguration": "production" | ||
}, | ||
"lint": { | ||
"executor": "@nx/linter:eslint", | ||
"options": { | ||
"lintFilePatterns": [ | ||
"libs/btp/src/lib/**/*.ts", | ||
"libs/btp/src/lib/**/*.html", | ||
"libs/btp/navigation/**/*.ts", | ||
"libs/btp/navigation/**/*.html" | ||
] | ||
} | ||
} | ||
} | ||
} |
This file contains 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,2 @@ | ||
throw new Error('Do not import anything from the `@fundamental-ngx/btp`, use secondary entrypoint exports instead!'); | ||
export default 'btp-library'; |
This file contains 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 @@ | ||
import 'jest-preset-angular/setup-jest'; |
This file contains 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,3 @@ | ||
# @fundamental-ngx/btp/tool-header | ||
|
||
Secondary entry point of `@fundamental-ngx/btp`. It can be used by importing from `@fundamental-ngx/btp/tool-header`. |
This file contains 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,5 @@ | ||
{ | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains 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,7 @@ | ||
{ | ||
"sourceRoot": "libs/btp/tool-header/src", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"name": "btp-tool-header", | ||
"projectType": "library", | ||
"tags": ["scope:fdb", "type:lib"] | ||
} |
This file contains 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 @@ | ||
export default 'btp-tool-header'; |
This file contains 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,3 @@ | ||
# @fundamental-ngx/btp/tool-layout | ||
|
||
Secondary entry point of `@fundamental-ngx/btp`. It can be used by importing from `@fundamental-ngx/btp/tool-layout`. |
This file contains 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,5 @@ | ||
{ | ||
"lib": { | ||
"entryFile": "src/index.ts" | ||
} | ||
} |
This file contains 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,7 @@ | ||
{ | ||
"sourceRoot": "libs/btp/tool-layout/src", | ||
"$schema": "../../../node_modules/nx/schemas/project-schema.json", | ||
"name": "btp-tool-layout", | ||
"projectType": "library", | ||
"tags": ["scope:fdb", "type:lib"] | ||
} |
10 changes: 10 additions & 0 deletions
10
libs/btp/tool-layout/src/directives/tool-layout-container.directive.ts
This file contains 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,10 @@ | ||
import { Directive } from '@angular/core'; | ||
|
||
@Directive({ | ||
selector: '[fdbToolLayoutContainer]', | ||
standalone: true, | ||
host: { | ||
class: 'fd-tool-layout__container' | ||
} | ||
}) | ||
export class ToolLayoutContainerDirective {} |
Oops, something went wrong.