forked from shopware/shopware
-
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.
- Loading branch information
1 parent
1ea91f7
commit f6064a5
Showing
3 changed files
with
58 additions
and
32 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
...log/_unreleased/2024-07-18-refactor-convert-flowbuilderservice-to-typescript.md
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 @@ | ||
--- | ||
title: refactor & convert flowBuilderService to typescript | ||
issue: NEXT-37264 | ||
author: Lars Kemper | ||
author_email: [email protected] | ||
author_github: @LarsKemper | ||
--- | ||
# Administration | ||
|
||
### `flow-builder.service.ts` Implementation Update | ||
|
||
* Changed `flowBuilderService` to TypeScript and renamed file to `flow-builder.service.ts` located at `src/Administration/Resources/app/administration/src/module/sw-flow/service/flow-builder.service.ts`. | ||
* Changed `flowBuilderService` function into a class `FlowBuilderService`. | ||
* Changed all functions to class methods and applied type annotations. | ||
|
||
### Additional Methods Added to `FlowBuilderService` | ||
|
||
* Added `isKeyOfActionName()` | ||
* Checks if the given key is a valid action name. | ||
* Added `isKeyOfActionLabel()` | ||
* Checks if the given key is a valid action label. | ||
* Added `isKeyOfActionDescription()` | ||
* Checks if the given key is a valid action description. | ||
* Added `isKeyOfEntityIcon()` | ||
* Checks if the given key is a valid entity icon. | ||
* Added `configValuesToString()` | ||
* Converts config values of an app action to a string in a type-safe manner. | ||
|
||
### `flowBuilderService` Action Description Enhancement | ||
|
||
* Added `$descriptionCallbacks`, a registry object for flow action description callback functions. | ||
* Added `addDescriptionCallbacks()` method to register action description functions. | ||
* Added `getDescriptionCallbacks()` method to retrieve all registered action description functions. | ||
* Changed `getActionDescriptions()` method to execute registered action description callback functions, if available. |
4 changes: 4 additions & 0 deletions
4
...tion/Resources/app/administration/src/module/sw-flow/service/flow-builder.service.spec.js
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