generated from wrappid/wrappid-module
-
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.
fix(global): 🐛 fix how data is entitydata is passed in appbuilder fac…
…tory also write comment in code for better understanding Ref #54
- Loading branch information
Showing
10 changed files
with
305 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,36 @@ | ||
import { AppBuilderData } from "./AppBuilder.data"; | ||
import { DEFAULT_ICON } from "../../../constants/AppBuilder.constant"; | ||
import AppBuilderFactory from "../../../factory/AppBuilder.factory"; | ||
import { DynamicEntity } from "../model/DynamicEntity.interface"; | ||
|
||
/** | ||
* A concrete implementation of the `AppBuilderData` abstract class. | ||
* This class specializes in managing and preparing toolbox data for a default builder. | ||
* This class specializes in managing and preparing toolbox, viewer, toolbar data for a default builder. | ||
*/ | ||
export class DefaultBuilderData extends AppBuilderData { | ||
/** Static property to store meta information related to the toolbox. | ||
* This updated or accessed across instances of this class. */ | ||
private static toolboxMeta = {}; | ||
|
||
private static viewerMeta = {}; | ||
/** Static property to store name of viewers. */ | ||
private static viewerMeta = []; | ||
|
||
private static toolbarIcons = []; | ||
/** Static property to store icons related to the toolbar. */ | ||
private static toolbarMeta = []; | ||
|
||
constructor(builderIcon = DEFAULT_ICON) { | ||
super(AppBuilderFactory.BUILDER_TYPES.DEFAULT, builderIcon, DefaultBuilderData.toolboxMeta, DefaultBuilderData.viewerMeta, DefaultBuilderData.toolbarIcons); | ||
/** Constructor that initializes an instance of `DefaultBuilderData` | ||
* with the provided entity data and pre-defined constants. | ||
* | ||
* @param entityData The dynamic entity data that is passed to the base class constructor. | ||
* */ | ||
constructor(entityData: DynamicEntity) { | ||
super( | ||
entityData, | ||
AppBuilderFactory.BUILDER_TYPES.DEFAULT, | ||
DEFAULT_ICON, | ||
DefaultBuilderData.toolboxMeta, | ||
DefaultBuilderData.viewerMeta, | ||
DefaultBuilderData.toolbarMeta | ||
); | ||
} | ||
} | ||
} |
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.