Component
Extends:
Component Class
Constructor Summary
Public Constructor | ||
public |
constructor(componentData: object, bid: Bid) Creates an instance of Component. |
Member Summary
Public Members | ||
public |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public get |
|
|
public |
Reference to the bid that the component belongs to. |
|
public get |
|
|
public get |
Gets the component's group id. |
|
public get |
|
|
public get |
The summed cost from the nested line items. |
|
public set |
|
|
public get |
Cost per watt |
|
public set |
|
|
public get |
Cost With Markup |
|
public get |
Cost With Tax |
|
public get |
this get was deprecated. Definition ids will become obsolete in planned data structure upgrade.
Gets the component's definition id. |
|
public |
|
|
public |
|
|
public get |
Gets the included status of the component. |
|
public get |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public set |
|
|
public get |
|
|
public get |
|
|
public |
|
|
public get |
Price Property |
|
public set |
|
|
public get |
Price per watt |
|
public set |
|
|
public get |
|
|
public get |
|
|
public set |
|
|
public get |
The average tax percentage from the nested line items. |
|
public set |
|
|
public get |
The summed taxable cost from the nested line items. |
|
public get |
|
Method Summary
Public Methods | ||
public |
assess() Assess the component instance. |
|
public |
bind() Binds the "updated" event for all dependant bid entities. |
|
public |
dependants(): BidEntity[] Gets a list of bid entities that relies on the component instance. |
|
public |
dirty() Flags the component and corresponding bid as dirty and to be saved. |
|
public |
exportData(alwaysIncludeConfig: boolean): object Exports component internal data structure. |
|
public |
getLineItems(includeSubComponents: boolean): array Gets an array of nested line items. |
|
public |
Gets the level at which the component is nested: 0, 1, 2. |
|
public |
Gets the component's parent component, if exists. |
|
public |
getPredictedValue(predictionType: string): sum | null Gets the predicted value of the component by calculating the sum total of the predicted values for all line items |
|
public |
getStoplightIndicator(predictionType: string): * |
|
public |
Gets an array of nested of subcomponents. |
|
public |
getVirtualPropertyValue(key: string): number Get the value for the key in the component's properties object |
|
public |
getWeightedNormalValue(distributionIndex: *): T | null For each line item, get all of its weightedNormalValues return the sum of all line item's weightedNormalValues at distributionIndex |
|
public |
getWeightedNormalValues(): array Calculates the weighted normal value given a set of distribution ranges. |
|
public |
hasNullDependency(value: string): boolean Checks if a component property relied on a null dependency at any point in calculation |
|
public |
isOverridden(property: string): boolean Determine if any of the components children have been overridden |
|
public |
Determines of component is a top parent component, in which is not nested. |
|
public |
isPredicted(value: string): boolean Check whether a given value is predicted or not |
|
public |
removeLineItem(lineItemId: string | number) Removes a line item from the component. |
|
public |
reset() Resets all nested line items. |
|
public |
setIncludeStatus(isIncluded: boolean) Sets the include status for all nested line items. |
|
public |
setPredictionService(predictionType: *) Sets the cacheValues Array for this predictionType and the distribution ranges for the predictionType |
|
public |
|
Inherited Summary
From class AdvanceEventEmitter | ||
public |
Maximum number of events fired for the requester before events stop. |
|
public |
|
|
public |
|
|
public |
removeListenerByRequester(eventName: string, requesterId: string) Removes event listeners by event and requesterId. |
From class BidEntity | ||
public get |
Determine if the entity is in an assembly |
|
public get |
Gets the id of the bid entity. |
|
public get |
Gets the bid entity title. |
|
public set |
Sets the bid entity title. |
|
public get |
Gets the bid entity type. |
|
public abstract |
Assesses bid entity. |
|
public |
dependants(): BidEntity[] Gets an array of depndants that rely on the bid entity. |
|
public |
dependencies(): BidEntity[] Gets all the dependencies that the bid entity relies on. |
|
public |
dirty() Flags the bid entity as dirty and to be saved. |
|
public |
exportData(): object Exports the internal data for the bid entity. |
|
public |
hasNullDependency(field: string): boolean Determines if bid entity relies on a null or undefined dependency value |
|
public |
async initSaveChangeLog(originalValue: *, newValue: *, valueType: *, entityProperty: *, metaData: *): * |
|
public |
Determines of bid entity is dirty. |
|
public |
pristine() Marks the bid entity as clean. |
Public Constructors
Public Members
public accountStoplightIndicator: * source
public get actualCostConfidenceFactor: * source
public get actualHoursConfidenceFactor: * source
public get definitionId: number source
Gets the component's definition id.
public industryStoplightIndicator: * source
public get isIncluded: boolean source
Gets the included status of the component. A component is included if it has included line items.
public predictionType: * source
Public Methods
public assess() source
Assess the component instance.
Override:
BidEntity#assessEmit:
assessing |
assessed |
updated |
public dependants(): BidEntity[] source
Gets a list of bid entities that relies on the component instance.
Override:
BidEntity#dependantspublic dirty() source
Flags the component and corresponding bid as dirty and to be saved.
Override:
BidEntity#dirtypublic exportData(alwaysIncludeConfig: boolean): object source
Exports component internal data structure.
Override:
BidEntity#exportDataParams:
Name | Type | Attribute | Description |
alwaysIncludeConfig | boolean |
|
Will include config object in export regardless of changed status. |
public getLineItems(includeSubComponents: boolean): array source
Gets an array of nested line items.
Params:
Name | Type | Attribute | Description |
includeSubComponents | boolean |
|
Return:
array | Returns an array of line items in component. |
public getPredictedValue(predictionType: string): sum | null source
Gets the predicted value of the component by calculating the sum total of the predicted values for all line items
Params:
Name | Type | Attribute | Description |
predictionType | string |
|
public getStoplightIndicator(predictionType: string): * source
Params:
Name | Type | Attribute | Description |
predictionType | string |
|
Return:
* |
public getVirtualPropertyValue(key: string): number source
Get the value for the key in the component's properties object
Params:
Name | Type | Attribute | Description |
key | string |
public getWeightedNormalValue(distributionIndex: *): T | null source
For each line item, get all of its weightedNormalValues return the sum of all line item's weightedNormalValues at distributionIndex
Params:
Name | Type | Attribute | Description |
distributionIndex | * |
public getWeightedNormalValues(): array source
Calculates the weighted normal value given a set of distribution ranges.
Return:
array | Array of weighted normal values |
public hasNullDependency(value: string): boolean source
Checks if a component property relied on a null dependency at any point in calculation
Override:
BidEntity#hasNullDependencyParams:
Name | Type | Attribute | Description |
value | string | The property to check |
public isOverridden(property: string): boolean source
Determine if any of the components children have been overridden
Params:
Name | Type | Attribute | Description |
property | string |
|
public isParent(): boolean source
Determines of component is a top parent component, in which is not nested.
public isPredicted(value: string): boolean source
Check whether a given value is predicted or not
Params:
Name | Type | Attribute | Description |
value | string | The value to check the prediction status of |
public setIncludeStatus(isIncluded: boolean) source
Sets the include status for all nested line items.
Params:
Name | Type | Attribute | Description |
isIncluded | boolean |
public setPredictionService(predictionType: *) source
Sets the cacheValues Array for this predictionType and the distribution ranges for the predictionType
Params:
Name | Type | Attribute | Description |
predictionType | * |