-
-
Notifications
You must be signed in to change notification settings - Fork 31
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 #97 from Foblex/refactoring/isolate-component-store
Refactoring/isolate component store
- Loading branch information
Showing
226 changed files
with
2,003 additions
and
1,029 deletions.
There are no files selected for viewing
Binary file not shown.
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
Binary file added
BIN
+421 KB
... drag connection from input to any place and remove the connection (failed).png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
19 changes: 0 additions & 19 deletions
19
projects/f-flow/src/domain/emit-transform-changes/emit-transform-changes.execution.ts
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
projects/f-flow/src/domain/emit-transform-changes/emit-transform-changes.request.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
...f-flow/src/domain/f-background/add-background-to-store/add-background-to-store-request.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,9 @@ | ||
import { FBackgroundBase } from '../../../f-backgroud'; | ||
|
||
export class AddBackgroundToStoreRequest { | ||
|
||
constructor( | ||
public fBackground: FBackgroundBase | ||
) { | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...flow/src/domain/f-background/add-background-to-store/add-background-to-store.execution.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,15 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { AddBackgroundToStoreRequest } from './add-background-to-store-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(AddBackgroundToStoreRequest) | ||
export class AddBackgroundToStoreExecution implements IExecution<AddBackgroundToStoreRequest, void> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: AddBackgroundToStoreRequest): void { | ||
this._fComponentsStore.fBackground = request.fBackground; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-background/add-background-to-store/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,3 @@ | ||
export * from './add-background-to-store.execution'; | ||
|
||
export * from './add-background-to-store-request'; |
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,3 +1,9 @@ | ||
export * from './add-background-to-store'; | ||
|
||
export * from './add-pattern-to-background'; | ||
|
||
export * from './remove-background-from-store'; | ||
|
||
export * from './set-background-transform'; | ||
|
||
export * from './providers'; |
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,15 @@ | ||
import { AddPatternToBackgroundExecution } from './add-pattern-to-background'; | ||
import { AddBackgroundToStoreExecution } from './add-background-to-store'; | ||
import { RemoveBackgroundFromStoreExecution } from './remove-background-from-store'; | ||
import { SetBackgroundTransformExecution } from './set-background-transform'; | ||
|
||
export const F_BACKGROUND_FEATURES = [ | ||
|
||
AddPatternToBackgroundExecution | ||
AddBackgroundToStoreExecution, | ||
|
||
AddPatternToBackgroundExecution, | ||
|
||
RemoveBackgroundFromStoreExecution, | ||
|
||
SetBackgroundTransformExecution | ||
]; |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-background/remove-background-from-store/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,3 @@ | ||
export * from './remove-background-from-store.execution'; | ||
|
||
export * from './remove-background-from-store-request'; |
9 changes: 9 additions & 0 deletions
9
.../domain/f-background/remove-background-from-store/remove-background-from-store-request.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,9 @@ | ||
import { FBackgroundBase } from '../../../f-backgroud'; | ||
|
||
export class RemoveBackgroundFromStoreRequest { | ||
|
||
constructor( | ||
public fConnection: FBackgroundBase | ||
) { | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...omain/f-background/remove-background-from-store/remove-background-from-store.execution.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,15 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { RemoveBackgroundFromStoreRequest } from './remove-background-from-store-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(RemoveBackgroundFromStoreRequest) | ||
export class RemoveBackgroundFromStoreExecution implements IExecution<RemoveBackgroundFromStoreRequest, void> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: RemoveBackgroundFromStoreRequest): void { | ||
this._fComponentsStore.fBackground = undefined; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-background/set-background-transform/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,3 @@ | ||
export * from './set-background-transform.execution'; | ||
|
||
export * from './set-background-transform-request'; |
9 changes: 9 additions & 0 deletions
9
...flow/src/domain/f-background/set-background-transform/set-background-transform-request.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,9 @@ | ||
import { ITransformModel } from '@foblex/2d'; | ||
|
||
export class SetBackgroundTransformRequest { | ||
|
||
constructor( | ||
public fTransform: ITransformModel | ||
) { | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
...ow/src/domain/f-background/set-background-transform/set-background-transform.execution.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,15 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { SetBackgroundTransformRequest } from './set-background-transform-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(SetBackgroundTransformRequest) | ||
export class SetBackgroundTransformExecution implements IExecution<SetBackgroundTransformRequest, void> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: SetBackgroundTransformRequest): void { | ||
this._fComponentsStore.fBackground?.setTransform(request.fTransform); | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
projects/f-flow/src/domain/f-canvas/add-canvas-to-store/add-canvas-to-store-request.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,9 @@ | ||
import { FCanvasBase } from '../../../f-canvas'; | ||
|
||
export class AddCanvasToStoreRequest { | ||
|
||
constructor( | ||
public fCanvas: FCanvasBase | ||
) { | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
projects/f-flow/src/domain/f-canvas/add-canvas-to-store/add-canvas-to-store.execution.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,15 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { AddCanvasToStoreRequest } from './add-canvas-to-store-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(AddCanvasToStoreRequest) | ||
export class AddCanvasToStoreExecution implements IExecution<AddCanvasToStoreRequest, void> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: AddCanvasToStoreRequest): void { | ||
this._fComponentsStore.fCanvas = request.fCanvas; | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-canvas/add-canvas-to-store/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,3 @@ | ||
export * from './add-canvas-to-store.execution'; | ||
|
||
export * from './add-canvas-to-store-request'; |
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
25 changes: 11 additions & 14 deletions
25
projects/f-flow/src/domain/f-canvas/fit-to-flow/fit-to-flow.execution.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
3 changes: 3 additions & 0 deletions
3
projects/f-flow/src/domain/f-canvas/get-canvas/get-canvas-request.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,3 @@ | ||
export class GetCanvasRequest { | ||
|
||
} |
20 changes: 20 additions & 0 deletions
20
projects/f-flow/src/domain/f-canvas/get-canvas/get-canvas.execution.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,20 @@ | ||
import { inject, Injectable } from '@angular/core'; | ||
import { FExecutionRegister, IExecution } from '@foblex/mediator'; | ||
import { GetCanvasRequest } from './get-canvas-request'; | ||
import { FComponentsStore } from '../../../f-storage'; | ||
import { FCanvasBase } from '../../../f-canvas'; | ||
|
||
@Injectable() | ||
@FExecutionRegister(GetCanvasRequest) | ||
export class GetCanvasExecution implements IExecution<GetCanvasRequest, FCanvasBase> { | ||
|
||
private _fComponentsStore = inject(FComponentsStore); | ||
|
||
public handle(request: GetCanvasRequest): FCanvasBase { | ||
const result = this._fComponentsStore.fCanvas; | ||
if (!result) { | ||
throw new Error(`Canvas not found in store`); | ||
} | ||
return result; | ||
} | ||
} |
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 @@ | ||
export * from './get-canvas.execution'; | ||
|
||
export * from './get-canvas-request'; |
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
Oops, something went wrong.