File

projects/m2-core/src/lib/shared/ui-components/value/property-value/attribute-value.component.ts

Implements

OnInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(cd: ChangeDetectorRef, actionsService: ActionsService, logger: Logger, dataService: DataService, dataReadService: DataReadService, dataEditService: DataEditService, resourceReadService: ResourceReadService, propertyValueService: PropertyValueService, propositionsService: PropositionsService, doubleParserService: DoubleParserService, tabService: TabService, globalModalsService: GlobalModalsService, backgroundService: BackgroundService)
Parameters :
Name Type Optional
cd ChangeDetectorRef No
actionsService ActionsService No
logger Logger No
dataService DataService No
dataReadService DataReadService No
dataEditService DataEditService No
resourceReadService ResourceReadService No
propertyValueService PropertyValueService No
propositionsService PropositionsService No
doubleParserService DoubleParserService No
tabService TabService No
globalModalsService GlobalModalsService No
backgroundService BackgroundService No

Inputs

appendNameValue
Type : boolean
appendUnit
Type : boolean
applicationAttributes
Type : Pair<number | Map<number, ApplicationAttribute[]>>
autoPostProcessing
Type : boolean
checkIncompliantConstraints
Type : boolean
customPropositions
Type : Proposition[]
customUpdatePropertyValueFn
Type : function
deprecated
Type : boolean
doublePrecision
Type : number
editModeON
Type : boolean
hasPostProcessing
Type : boolean
hasPropositions
Type : boolean
inputMask
Type : string
isCalculated
Type : boolean
isHistorical
Type : boolean
isPostProcessingInProgress
Type : boolean
natureId
Type : number
ownerItemId
Type : number
postProcessingTip
Type : string
propertyValue
restrictiveConditions
Type : string[]
showPropositionsOnInput
Type : boolean
showUseImageIcon
Type : boolean
Default value : true
statusInCompliance
Type : StatusInCompliance
unit
Type : MeasurementUnit
useParsedDoubleParams
Type : boolean
valueIdentifier
Type : number

Outputs

created
Type : EventEmitter
deleted
Type : EventEmitter
enrichmentStarted
Type : EventEmitter
valueInput
Type : EventEmitter

Methods

Async enrichPropertyValue
enrichPropertyValue(newValue: string)

Post processing

Parameters :
Name Type Optional
newValue string No
Returns : Promise<any>
Public focusValueInput
focusValueInput()

ValueComponent API

Returns : void
ngOnInit
ngOnInit()
Returns : void
onChangeValue
onChangeValue(newValue: string)
Parameters :
Name Type Optional
newValue string No
Returns : void
onChangeValueUnit
onChangeValueUnit(newValue: string)
Parameters :
Name Type Optional
newValue string No
Returns : void
onDeleteValueClick
onDeleteValueClick(event: MouseEvent)
Parameters :
Name Type Optional
event MouseEvent No
Returns : void
onFileSelected
onFileSelected(file: File)
Parameters :
Name Type Optional
file File No
Returns : void
onFormulaEdited
onFormulaEdited(rule: FormulaRule)
Parameters :
Name Type Optional
rule FormulaRule No
Returns : Promise<number>
onOpenFormulaEditorClick
onOpenFormulaEditorClick()
Returns : void
onPropositionSelected
onPropositionSelected(proposition: Proposition)
Parameters :
Name Type Optional
proposition Proposition No
Returns : void
onUseImage
onUseImage(base64Image: string)
Parameters :
Name Type Optional
base64Image string No
Returns : void
onValueInput
onValueInput(input: string)
Parameters :
Name Type Optional
input string No
Returns : void
onValueInputKeyDown
onValueInputKeyDown(params: literal type)
Parameters :
Name Type Optional
params literal type No
Returns : void
showValuePropositions
showValuePropositions(input: string, immediately?: boolean)
Parameters :
Name Type Optional
input string No
immediately boolean Yes
Returns : void

Properties

Public _isFocused
Type : boolean
_propertyValue
Type : PropertyValue
Public cd
Type : ChangeDetectorRef
changeValueIfNeededFn
Default value : ((newValue: string|FormulaRuleData, forceEdit = false) => { let valueChange; try { valueChange = this.propertyValueService.formChangeRequest(<AttributeValue> this.propertyValue, newValue, this.unit, this.doublePrecision, forceEdit, this.isCalculated); } catch (e) { Logger.logError(e); return Promise.resolve(this.restoreCurrentValue()); } // this.logger.fatal(`ATTRIBUTE_VALUE_COMPONENT: new value = [${newValue}]; value change = [${valueChange}]`, // (<AttributeValue> this.propertyValue).data, newValue, valueChange); if (valueChange == null) { if (this.valueType === 'DOUBLE') { // format double because mask could have added some stuff this.formatNewValue(); } return Promise.resolve(null); } if (valueChange instanceof UpdatePropertyValueRequest) { return this.createOrEditValue(valueChange); } else if (!isNaN(valueChange)) { return this.updatePropertyValueFn(UpdatePropertyValueRequest.buildDeleteValueRequest(valueChange), this.propertyValue) .then(() => { this.handleSuccessfulDelete(valueChange); return null; }) .catch(e => { Logger.logError(e); this.restoreCurrentValue(); }); } return Promise.resolve(null); })
getFileBodyUrlFn
Type : function
Default value : ((valueId, isHistorical, valueIdentifier) => isHistorical ? this.resourceReadService.getAttributeValueFileBodyFromHistoryURL(valueIdentifier) : this.resourceReadService.getAttributeValueFileBodyURL(valueId))
Optional getPropositionsFn
Type : function
Optional maskValidation
Type : MaskValidation
progress
Default value : -1
propositionsDebounceTime
Default value : APP_SETTINGS.PROPOSITIONS_DEBOUNCE_IN_MS
propositionsHighlightOnly
Default value : true
propositionsReloadOnShow
Default value : true
updatePropertyValueFn
Type : function
valueComponent
Type : ValueComponent
Decorators :
@ViewChild(ValueComponent)
valueData
Type : AttributeValueData
valueId
Type : number

Value params

Optional valuePropositionsComponent
Type : ValuePropositionsComponent
Decorators :
@ViewChild(ValuePropositionsComponent)
valueType
Type : AttributeType

Accessors

propertyValue
getpropertyValue()
setpropertyValue(value: PropertyValue)
Parameters :
Name Type Optional
value PropertyValue No
Returns : void
propertyId
getpropertyId()
isFocused
getisFocused()
setisFocused(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
isIncompliant
getisIncompliant()
Legend
Html element
Component
Html element with directive

results matching ""

    No results matching ""