File

projects/m2-components/src/lib/application/attribute/value/application-attribute-value.component.ts

Implements

OnInit AfterViewInit

Metadata

Index

Properties
Methods
Inputs
Outputs
Accessors

Constructor

constructor(layerService: LayerService, applicationReadService: ApplicationReadService, applicationEditService: ApplicationEditService, applicationsService: ApplicationsService, applicationTemplateReadService: ApplicationTemplateReadService, applicationTemplateEditService: ApplicationTemplateEditService, propositionsService: PropositionsService, attributeClassifierService: AttributeClassifierService, dataReadService: DataReadService, taxonomyReadService: TaxonomyReadService, resourceReadService: ResourceReadService, globalModalsService: GlobalModalsService, notificationService: NotificationService, backgroundService: BackgroundService)
Parameters :
Name Type Optional
layerService LayerService No
applicationReadService ApplicationReadService No
applicationEditService ApplicationEditService No
applicationsService ApplicationsService No
applicationTemplateReadService ApplicationTemplateReadService No
applicationTemplateEditService ApplicationTemplateEditService No
propositionsService PropositionsService No
attributeClassifierService AttributeClassifierService No
dataReadService DataReadService No
taxonomyReadService TaxonomyReadService No
resourceReadService ResourceReadService No
globalModalsService GlobalModalsService No
notificationService NotificationService No
backgroundService BackgroundService No

Inputs

appendNameValue
Type : boolean
appendUnit
Type : boolean
applicationAttributeRow
Type : ApplicationAttributeRow
attribute
Type : ApplicationAttributePrototype
classifiableTarget
Type : string
Default value : '_blank'
deprecated
Type : boolean
editModeON
Type : boolean
hasPropositions
Type : boolean
isFocused
Type : boolean
isHistorical
Type : boolean
isTemplateValue
Type : boolean
Default value : false
postUpdateFn
Type : function
showPropositionsOnInput
Type : boolean
unit
Type : MeasurementUnit
useParsedDoubleParams
Type : boolean

Outputs

attributesSetChanged
Type : EventEmitter
isFocusedChange
Type : EventEmitter
valueClear
Type : EventEmitter
valueCreate
Type : EventEmitter

Methods

changeApplicationAttributeValueIfNeeded
changeApplicationAttributeValueIfNeeded(newValue, userInput)

Application attribute value

Parameters :
Name Optional Default value
newValue No
userInput No false
Returns : void
changeItemAttributeValue
changeItemAttributeValue(newValue)

Application item attribute value

Parameters :
Name Optional
newValue No
Returns : void
changeItemAttributeValueNameIfNeeded
changeItemAttributeValueNameIfNeeded(newValue: string)

Name value #16530

Parameters :
Name Type Optional
newValue string No
Returns : void
changeReferenceInputIfNeeded
changeReferenceInputIfNeeded(newValue: string | number | ConstraintTableCell)

Reference input

Parameters :
Name Type Optional
newValue string | number | ConstraintTableCell No
Returns : void
cleanAttribute
cleanAttribute()
Returns : Promise<void>
Public focusValueInput
focusValueInput()
Returns : void
ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnInit
ngOnInit()
Returns : void
onChangeValueUnit
onChangeValueUnit(newValue: string)
Parameters :
Name Type Optional
newValue string No
Returns : void
onElementLinkDblClick
onElementLinkDblClick(event: MouseEvent)
Parameters :
Name Type Optional
event MouseEvent No
Returns : void
onFormulaEdited
onFormulaEdited(rule: FormulaRule)
Parameters :
Name Type Optional
rule FormulaRule No
Returns : Promise<any>
onOpenFormulaEditorClick
onOpenFormulaEditorClick()

Formula

Returns : void
onPropositionSelected
onPropositionSelected(proposition: Proposition)
Parameters :
Name Type Optional
proposition Proposition No
Returns : void
onSelectElementClick
onSelectElementClick(event: MouseEvent)

Element link

Parameters :
Name Type Optional
event MouseEvent 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)

Item attribute value propositions

Parameters :
Name Type Optional
input string No
immediately boolean Yes
Returns : void
updateValueMultipart
updateValueMultipart(file: File)

Multipart values

Parameters :
Name Type Optional
file File No
Returns : void

Properties

Optional cellValueStatus
Type : string
changeItemAttributeValueIfNeededFn
Default value : ((newValue, forceEdit = false) => { let valueChange; try { valueChange = this.applicationsService.formApplicationItemAttributeRequest(this.attribute, newValue, this.unit, forceEdit); } catch (e) { Logger.logError(e); return Promise.resolve(this.restoreCurrentValue()); } // this.logger.fatal(`APPLICATION_ATTRIBUTE_VALUE_COMPONENT: changeItemAttributeValueIfNeededFn()` // + `, newValue = [${newValue}], value change = [${valueChange}]`, newValue, this.attribute, valueChange); if (valueChange == null) { if (this.valueType === 'DOUBLE') { // format double because mask could have added some stuff // this.formatNewValue(this.propertyValue); } return Promise.resolve(); } if (valueChange instanceof UpdateApplicationAttributeRequest) { return this.updateAttributePrototypeValue(valueChange) .then(updatedAttribute => this.handleSuccessfulUpdate(updatedAttribute)) .catch(e => { Logger.logError(e); this.restoreCurrentValue(); }); } else if (!isNaN(valueChange)) { return this.cleanAttribute(); } return Promise.resolve(); })
currentValue
Type : any
debounceTimeInMs
Type : number
Default value : 0
fileAccept
Default value : CONSTANTS.INPUT_ACCEPT.any
fromPropositionsOnly
Default value : false
getFileBodyUrlFn
Default value : ((valueId: number, isHistorical: boolean, valueIdentifier: number) => { if (this.applicationAttributeRow?.customGetFileBodyUrlFn) { return this.applicationAttributeRow.customGetFileBodyUrlFn(valueId, isHistorical, valueIdentifier); } if (this.isTemplateValue) { return this.resourceReadService.getApplicationTemplatePropertyFileBodyURL(valueId); } else { if ((<ApplicationAttribute> this.attribute).isInitialPropertyValue) { // #17605 // return this.resourceReadService.getAttributeValueFileBodyURL(valueId); return this.resourceReadService.getApplicationAttributeFileBodyFromHistoryURL(valueId); // #20216 } else { return isHistorical ? this.resourceReadService.getApplicationAttributeFileBodyFromHistoryURL(valueId) : // #20216-4 'valueIdentifier' is passed as 'id' for applications this.resourceReadService.getApplicationAttributeValueFileBodyURL(valueId); } } })
getNamePropositionsFn
Default value : ((searchQuery?: string, noFilterOnValues?: boolean) => this.propositionsService.getNamedValuePropositions(this.attribute.propertyId, searchQuery))
Optional getPathFn
Type : function
Optional getPropositionsFn
Type : function
highlightOnly
Default value : false
isFocusedValue
Type : boolean
itemValuePlaceholder
Type : string
Default value : ''
maskConfig
Type : any
Optional maskValidation
Type : MaskValidation
nonDeletable
Default value : false
onPasteFn
Default value : ((event: ClipboardEvent) => { const res = CONTENT_URL_REGEX.exec(event.clipboardData.getData('text')); const contentUrl = res && res[1]; if (!contentUrl) { return; } event.preventDefault(); const [routerLink, params] = contentUrl.split('?'); const queryParams = UrlUtils.queryParamsStringToObject(params); let elementId: number; if (ITEM_LINK_ATTRIBUTE_TYPES.has(this.attribute.type)) { elementId = +queryParams[CONSTANTS.ITEM_ID_QUERY_PARAM] || +queryParams[CONSTANTS.CLASSIFIER_TABLE_ITEM_ID_QUERY_PARAM]; if (!(elementId > 0) && this.attribute.type === ApplicationAttributeType.ElementReference) { // not item - check node elementId = +ArrayUtils.getLast(routerLink.split('/')); } } else if (NODE_LINK_ATTRIBUTE_TYPES.has(this.attribute.type)) { elementId = +ArrayUtils.getLast(routerLink.split('/')); } if (elementId > 0) { this.onElementsSelected([elementId]); // #21807 this.isFocused = false; } else { this.notificationService.warn($localize`:@@elementTypeDoesNotMatchAppAttrTypeMsg:Объект не соответствует типу атрибута заявки`); } })
placeholder
Type : string
Default value : ''
primitiveValueComponent
Type : PrimitiveValueComponent
Decorators :
@ViewChild(PrimitiveValueComponent)
progress
Default value : -1
propertyPropositionTmpl
Type : TemplateRef<any>
Decorators :
@ViewChild('propertyPropositionTmpl')
Optional propositionTemplate
Type : TemplateRef<any>
queryParams
Type : Params
readonlyInput
Default value : false
refFaIconClass
Type : string
reloadOnShow
Default value : false
routerLink
Type : string
selectBtnTitle
Type : string
Optional toolButtons
Type : SdiButton[]
valueComponent
Type : ValueComponent
Decorators :
@ViewChild(ValueComponent)
valuePropositionsComponent
Type : ValuePropositionsComponent
Decorators :
@ViewChild(ValuePropositionsComponent)
valueType
Type : AttributeType
Default value : 'STRING'

Accessors

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 ""