-
Notifications
You must be signed in to change notification settings - Fork 581
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8444 from ever-co/feat/plugin-integration-github-ui
[Feat] Add @gauzy/plugin-integration-github-ui Package
- Loading branch information
Showing
53 changed files
with
607 additions
and
220 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
56 changes: 0 additions & 56 deletions
56
apps/gauzy/src/app/pages/integrations/github/github-routing.module.ts
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export * from './shared.module'; | ||
export * from './pipes'; | ||
export * from './handlers'; | ||
export * from './decorators'; | ||
export * from './guards'; | ||
export * from './dto'; | ||
export * from './guards'; | ||
export * from './handlers'; | ||
export * from './pipes'; |
46 changes: 22 additions & 24 deletions
46
packages/core/src/shared/pipes/column-numeric-transformer.pipe.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 |
---|---|---|
@@ -1,32 +1,30 @@ | ||
import { ValueTransformer } from "typeorm"; | ||
import { isNullOrUndefined } from "@gauzy/common"; | ||
import { ValueTransformer } from 'typeorm'; | ||
import { isNotNullOrUndefined } from '@gauzy/common'; | ||
|
||
/** | ||
* Convert Non-integer numbers string to integer | ||
* | ||
* From https://github.com/typeorm/typeorm/issues/873#issuecomment-502294597 | ||
*/ | ||
export class ColumnNumericTransformerPipe implements ValueTransformer { | ||
/** | ||
* Transforms a number to the database value. | ||
* | ||
* @param data - The input number. | ||
* @returns The transformed number or null. | ||
*/ | ||
to(data?: number | null): number | null { | ||
return isNullOrUndefined(data) ? null : data; | ||
} | ||
/** | ||
* Converts a number for storage in the database. | ||
* If the value is not defined, it returns null. | ||
* | ||
* @param value - The number to convert. | ||
* @returns The number itself, or null if undefined. | ||
*/ | ||
to(value: number): number | null { | ||
return isNotNullOrUndefined(value) ? value : null; // Return the number for storage | ||
} | ||
|
||
/** | ||
* Transforms a string to the entity property value. | ||
* | ||
* @param data - The input string. | ||
* @returns The transformed number or null. | ||
*/ | ||
from(data?: string | null): number | null { | ||
if (!isNullOrUndefined(data)) { | ||
const parsedValue = parseFloat(data); | ||
return isNaN(parsedValue) ? null : parsedValue; | ||
} | ||
return null; | ||
} | ||
/** | ||
* Transforms a string to the entity property value. | ||
* | ||
* @param value - The input string. | ||
* @returns The transformed number or null if the input is invalid. | ||
*/ | ||
from(value?: string | null): number | null { | ||
return isNotNullOrUndefined(value) ? parseFloat(value) : null; // Convert string to number | ||
} | ||
} |
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,20 @@ | ||
docker | ||
tmp | ||
README.md | ||
.env | ||
|
||
# git | ||
|
||
.git | ||
.gitignore | ||
.gitmodules | ||
|
||
# dependencies | ||
|
||
node_modules | ||
|
||
# misc | ||
|
||
npm-debug.log | ||
dist | ||
build |
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,33 @@ | ||
{ | ||
"extends": ["../../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts"], | ||
"rules": { | ||
"@angular-eslint/directive-selector": [ | ||
"error", | ||
{ | ||
"type": "attribute", | ||
"prefix": "gauzy", | ||
"style": "camelCase" | ||
} | ||
], | ||
"@angular-eslint/component-selector": [ | ||
"error", | ||
{ | ||
"type": "element", | ||
"prefix": "gauzy", | ||
"style": "kebab-case" | ||
} | ||
] | ||
}, | ||
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"] | ||
}, | ||
{ | ||
"files": ["*.html"], | ||
"extends": ["plugin:@nrwl/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,6 @@ | ||
# dependencies | ||
node_modules/ | ||
|
||
# misc | ||
npm-debug.log | ||
dist |
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,4 @@ | ||
# .npmignore | ||
|
||
src/ | ||
node_modules/ |
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 @@ | ||
# plugin-integration-github-ui | ||
|
||
This library was generated with [Nx](https://nx.dev). | ||
|
||
## Running unit tests | ||
|
||
Run `nx test plugin-integration-github-ui` 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: 'plugins-integration-github-ui', | ||
preset: '../../../jest.preset.js', | ||
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], | ||
coverageDirectory: '../../../coverage/packages/plugins/integration-github-ui', | ||
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,10 @@ | ||
{ | ||
"$schema": "../../../node_modules/ng-packagr/ng-package.schema.json", | ||
"dest": "../../../dist/packages/plugins/integration-github-ui", | ||
"lib": { | ||
"entryFile": "src/index.ts", | ||
"styleIncludePaths": ["../../../dist/packages/ui-core/static/styles"] | ||
}, | ||
"allowedNonPeerDependencies": ["."], | ||
"assets": [] | ||
} |
Oops, something went wrong.