-
Notifications
You must be signed in to change notification settings - Fork 4
[NAE-2462] Builder component decomposition #345
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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
80380f0
[NAE-2462] Builder component decomposition
Kovy95 18b5d38
[NAE-2462] Builder component decomposition
Kovy95 8d08764
[NAE-2462] Builder component decomposition
Kovy95 d980f0e
[NAE-2462] Builder component decomposition
Kovy95 b7ccfb8
[NAE-2462] Builder component decomposition
Kovy95 b0c8567
[NAE-2462] Builder component decomposition
Kovy95 f44d77e
Merge remote-tracking branch 'origin/release/6.5.0' into NAE-2462
Kovy95 040af1e
Merge remote-tracking branch 'origin/release/6.6.0' into NAE-2462
Kovy95 6b66398
[NAE-2462] Builder component decomposition
Kovy95 fe17c87
[NAE-2462] Builder component decomposition
Kovy95 fb821f3
[NAE-2462] Builder component decomposition
Kovy95 8a7671c
Merge remote-tracking branch 'origin/release/6.6.0' into NAE-2462
Retoocs b6eafa2
[NAE-2462] Builder component decomposition
Retoocs 05a41b0
[NAE-2462] Builder component decomposition
Retoocs 7297546
[NAE-2462] Builder component decomposition
Retoocs 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
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
18 changes: 18 additions & 0 deletions
18
.../netgrif-components-core/src/lib/data-fields/process-ref-field/model/process-ref-field.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,18 @@ | ||
| import {DataField} from '../../models/abstract-data-field'; | ||
| import {Behavior} from '../../models/behavior'; | ||
| import {Layout} from '../../models/layout'; | ||
| import {Validation} from '../../models/validation'; | ||
| import {Component, ComponentPrefixes} from '../../models/component'; | ||
|
|
||
| export class ProcessRefField extends DataField<Array<string>> { | ||
|
|
||
| constructor(stringId: string, title: string, initialValue: Array<string>, behavior: Behavior, | ||
|
Check warning on line 9 in projects/netgrif-components-core/src/lib/data-fields/process-ref-field/model/process-ref-field.ts
|
||
| placeholder?: string, description?: string, layout?: Layout, validations?: Array<Validation>, component?: Component, | ||
| parentTaskId?: string) { | ||
| super(stringId, title, initialValue, behavior, placeholder, description, layout, validations, component, parentTaskId); | ||
| } | ||
|
|
||
| public getTypedComponentType(): string { | ||
| return ComponentPrefixes.PROCESS_REF + this.getComponentType(); | ||
| } | ||
| } | ||
28 changes: 28 additions & 0 deletions
28
...ta-fields/process-ref-field/process-ref-default/abstract-process-ref-default.component.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,28 @@ | ||
| import {Component, Inject, Injector, Optional, Type} from '@angular/core'; | ||
| import {DATA_FIELD_PORTAL_DATA, DataFieldPortalData} from '../../models/data-field-portal-data-injection-token'; | ||
| import {AbstractBaseDataFieldComponent} from '../../base-component/abstract-base-data-field.component'; | ||
| import {ComponentPortal} from '@angular/cdk/portal'; | ||
| import {ProcessRefField} from '../model/process-ref-field'; | ||
|
|
||
| @Component({ | ||
| selector: 'ncc-abstract-process-ref-default', | ||
| template: '' | ||
| }) | ||
| export abstract class AbstractProcessRefDefaultComponent extends AbstractBaseDataFieldComponent<ProcessRefField> { | ||
|
|
||
| public componentPortal: ComponentPortal<any>; | ||
|
|
||
| protected constructor(protected injector: Injector, | ||
| protected builderComponent: Type<any>, | ||
| @Optional() @Inject(DATA_FIELD_PORTAL_DATA) dataFieldPortalData: DataFieldPortalData<ProcessRefField>) { | ||
| super(dataFieldPortalData); | ||
| } | ||
|
|
||
| createPortal() { | ||
| const portalInjector = Injector.create({ | ||
| providers: [], | ||
| parent: this.injector | ||
| }); | ||
| this.componentPortal = new ComponentPortal(this.builderComponent, null, portalInjector); | ||
| } | ||
| } |
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
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
2 changes: 1 addition & 1 deletion
2
...ects/netgrif-components/src/lib/builder/form-builder/field-list/field-list.component.html
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
Oops, something went wrong.
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.