File

projects/m2-core/src/lib/shared/ui-components/value/constraint-cell-value/constraint-cell-value.component.ts

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(constraintCellsService: ConstraintCellsService, constraintTableService: ConstraintTableService, propositionsService: PropositionsService, doubleParserService: DoubleParserService, tabService: TabService, actionsService: ActionsService)
Parameters :
Name Type Optional
constraintCellsService ConstraintCellsService No
constraintTableService ConstraintTableService No
propositionsService PropositionsService No
doubleParserService DoubleParserService No
tabService TabService No
actionsService ActionsService No

Inputs

broadcastChanges
Type : boolean
Default value : true
cell
constraintTableId
Type : number
doublePrecision
Type : any
Default value : APP_SETTINGS.DEFAULT_DOUBLE_PRECISION
editModeON
Type : boolean
inputMask
Type : string
rowId
Type : number
showPropositionsOnInput
Type : boolean
unit
Type : MeasurementUnit
updateCellFn
Type : function
Default value : (request => this.constraintTableService.updateCell(request))

Outputs

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

Methods

focusValueInput
focusValueInput()
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
onPropositionSelected
onPropositionSelected(proposition: Proposition)
Parameters :
Name Type Optional
proposition Proposition 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)

Propositions

Parameters :
Name Type Optional
input string No
immediately boolean Yes
Returns : void

Properties

_cell
Type : ConstraintTableCell
Public _isFocused
Type : boolean
changeValueIfNeededFn
Default value : ((newValue: string, forceEdit = false) => { let valueChange; try { valueChange = this.constraintCellsService.formChangeRequest(this._cell, newValue, this.unit, this.doublePrecision, this.restrictiveCondition, forceEdit); } catch (e) { Logger.logError(e); return Promise.resolve(this.restoreCurrentValue()); } // this.logger.fatal(`CONSTRAINT_CELL_VALUE_COMPONENT: new value = [${newValue}]; value change = [${valueChange}]`, valueChange); if (valueChange == null) { if (this.valueType === 'DOUBLE') { // format double because mask could have added some stuff this.formatNewValue(this._cell); } return Promise.resolve(); } if (valueChange instanceof UpdateConstraintTableCellRequest) { return this.createOrEditValue(valueChange); } else if (!isNaN(valueChange)) { return this.updateCellFn(UpdateConstraintTableCellRequest.buildDeleteCellRequest(valueChange)) .then(() => this.handleSuccessfulDelete(valueChange)) .catch(e => { Logger.logError(e); this.restoreCurrentValue(); }); } return Promise.resolve(); })
getPropositionsFn
Default value : ((searchQuery?: string, noFilterOnValues?: boolean) => this.propositionsService.getConstraintTablePropositions(this.constraintTableId, this._cell.meaningId, searchQuery, this.doublePrecision, this.unit))
Optional maskValidation
Type : MaskValidation
propositionsDebounceTime
Default value : APP_SETTINGS.PROPOSITIONS_DEBOUNCE_IN_MS
restrictiveCondition
Type : RestrictiveCondition
valueComponent
Type : ValueComponent
Decorators :
@ViewChild(ValueComponent)
valueData
Type : AttributeValueData
valueId
Type : number
valuePropositionsComponent
Type : ValuePropositionsComponent
Decorators :
@ViewChild(ValuePropositionsComponent)
valueType
Type : AttributeType

Accessors

cell
getcell()
setcell(value: ConstraintTableCell)
Parameters :
Name Type Optional
value ConstraintTableCell No
Returns : void
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 ""