@huntsman-cancer-institute/cod 17.11.5 → 17.11.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"huntsman-cancer-institute-cod.mjs","sources":["../../../projects/cod/src/pipes/is-group-attribute.pipe.ts","../../../projects/cod/src/model/pre-eval.dto.ts","../../../projects/cod/src/model/dictionary-entries.dto.ts","../../../projects/cod/src/services/attribute.service.ts","../../../projects/cod/src/date/date-util.ts","../../../projects/cod/src/components/attribute-base.ts","../../../projects/cod/src/components/attribute-edit.component.ts","../../../projects/cod/src/components/attribute-absolute.component.ts","../../../projects/cod/src/components/attribute-flex.component.ts","../../../projects/cod/src/components/attribute-container.component.ts","../../../projects/cod/src/cod.module.ts","../../../projects/cod/src/model/attribute-value.entity.ts","../../../projects/cod/src/components/attribute-default.component.ts","../../../projects/cod/src/index.ts","../../../projects/cod/src/huntsman-cancer-institute-cod.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n/**\r\n * A filter for attributes in a container. All attributes have the id of the container even those that belong\r\n * to a grid attribute. However, when we populate the container, we don't want to render those grid attributes.\r\n * The grid will handle those itself.\r\n */\r\n@Pipe({\r\n name: \"isGroupAttribute\",\r\n pure: false\r\n})\r\nexport class IsGroupAttributePipe implements PipeTransform {\r\n\r\n transform(list: GraphicalAttribute[], returnGroup: boolean): GraphicalAttribute[] {\r\n if (!list) {\r\n return [];\r\n }\r\n\r\n return list.filter((attribute: GraphicalAttribute) => {\r\n if (attribute.idGroupAttribute) {\r\n return returnGroup;\r\n } else {\r\n return !returnGroup;\r\n }\r\n });\r\n }\r\n}\r\n","import {Attribute} from \"./attribute.entity\";\r\n\r\nexport class PreEvalDTO {\r\n expression: string;\r\n referencedAttribute: Attribute;\r\n}","import {Attribute} from \"./attribute.entity\";\r\n\r\nexport class DictionaryEntriesDTO {\r\n entries: any[];\r\n entriesIncludeSelectedValue: boolean;\r\n referencedAttribute: Attribute;\r\n}","import {Inject, Injectable, InjectionToken, isDevMode} from \"@angular/core\";\r\nimport {HttpClient, HttpParams} from \"@angular/common/http\";\r\nimport {Router} from \"@angular/router\";\r\n\r\nimport {BehaviorSubject, forkJoin, Observable, Subject} from \"rxjs\";\r\n\r\nimport {DictionaryService} from \"@huntsman-cancer-institute/dictionary-service\";\r\n\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {AttributeChoice} from \"../model/attribute-choice.entity\";\r\nimport {AttributeValue} from \"../model/attribute-value.entity\";\r\nimport {AttributeConfiguration} from \"../model/attribute-configuration.entity\";\r\nimport {AttributeValueSet} from \"../model/attribute-value-set.entity\";\r\nimport {AttributeConfigurationDTO} from \"../model/attribute-configuration.dto\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\nimport {AttributeContainer} from \"../model/attribute-container.entity\";\r\nimport {AttributeValueGridRow} from \"../model/attribute-value-grid-row.entity\";\r\nimport {PreEvalDTO} from \"../model/pre-eval.dto\";\r\nimport {DictionaryEntriesDTO} from \"../model/dictionary-entries.dto\";\r\n\r\n\r\nexport let ATTRIBUTE_ENDPOINT = new InjectionToken<string>(\"attributeEndpoint\");\r\nexport const BOOLEAN: string[] = [\"N\", \"Y\"];\r\nexport const EXTENDED_BOOLEAN: string[] = [\"N\", \"Y\", \"U\"];\r\n\r\n/**\r\n * A service created for each attribute configuration instance. This makes calls to the backend to get the configuration\r\n * and value set. It also stores common data that different attributes might need (e.g. a list of attribute choices).\r\n */\r\n@Injectable()\r\nexport class AttributeService {\r\n\r\n newAttributeConfiguration: AttributeConfiguration;\r\n idAttributeConfiguration: number;\r\n idFilter1: number;\r\n idFilter2: number;\r\n idAttributeValueSet: number;\r\n idParentObject: number;\r\n boundData: any;\r\n\r\n attributeContextLoadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeContextListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n attributeSecurityContextListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n filter1ListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n filter2ListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n dictionaryListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n\r\n\r\n postConfigurationSubject: Subject<boolean> = new Subject<boolean>();\r\n attributeConfigurationDimensionSubject: BehaviorSubject<any> = new BehaviorSubject<any>(undefined);\r\n\r\n attributeConfigurationListSubject: BehaviorSubject<AttributeConfigurationDTO[]> = new BehaviorSubject<AttributeConfigurationDTO[]>(undefined);\r\n attributeConfigurationListLoadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeConfigurationDTOSubject: BehaviorSubject<AttributeConfigurationDTO> = new BehaviorSubject<AttributeConfigurationDTO>(undefined);\r\n\r\n attributeConfigurationSubject: BehaviorSubject<AttributeConfiguration> = new BehaviorSubject<AttributeConfiguration>(undefined);\r\n attributeValueSetSubject: BehaviorSubject<AttributeValueSet> = new BehaviorSubject<AttributeValueSet>(undefined);\r\n attributeValuePushedSubject: Subject<AttributeValue> = new Subject<AttributeValue>();\r\n\r\n loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeMap: Map<number, Attribute> = new Map<number, Attribute>();\r\n\r\n width: number;\r\n\r\n containerUpdated: Subject<boolean> = new Subject<boolean>();\r\n gridRowSaved: Subject<AttributeValueGridRow> = new Subject<AttributeValueGridRow>();\r\n gridRowDeleted: Subject<AttributeValueGridRow> = new Subject<AttributeValueGridRow>();\r\n dirty: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n updatedAttributeValues: AttributeValue[] = [];\r\n slicedAttributeValues: AttributeValue[] = [];\r\n\r\n private uniqueId: number = 0;\r\n private _editButtonsEnabled: boolean = true; //Preserve old default\r\n\r\n constructor(private dictionaryService: DictionaryService,\r\n private http: HttpClient,\r\n private router: Router,\r\n @Inject(ATTRIBUTE_ENDPOINT) private attributeEndpoint: string) {\r\n if (isDevMode()) {\r\n console.debug(\"Created New AttributeService\");\r\n }\r\n }\r\n\r\n setBoundData(boundData: any) {\r\n this.boundData = boundData;\r\n\r\n if (this.attributeValueSetSubject.getValue()) {\r\n this.notifyAttributes();\r\n }\r\n }\r\n\r\n public get editButtonsEnabled(): boolean {\r\n return this._editButtonsEnabled;\r\n };\r\n\r\n public set editButtonsEnabled(enabled: boolean) {\r\n if (enabled !== this._editButtonsEnabled) {\r\n this._editButtonsEnabled = enabled;\r\n this.notifyAttributes();\r\n }\r\n }\r\n\r\n getAttributeValueCountByAttribute(idAttribute: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-value-count\", {params: new HttpParams().set(\"idAttribute\", idAttribute.toString())});\r\n }\r\n\r\n getAttributeValueCountByContainer(idAttributeContainer: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-value-count\", {params: new HttpParams().set(\"idAttributeContainer\", idAttributeContainer.toString())});\r\n }\r\n\r\n getDictionaryValueCount(idAttributeDictionary: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-dictionary-count\", {params: new HttpParams().set(\"idAttributeDictionary\", idAttributeDictionary.toString())});\r\n }\r\n\r\n fetchAttributeContext(): void {\r\n this.attributeContextLoadingSubject.next(true);\r\n\r\n forkJoin([\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeSecurityContext\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeContext\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.Filter1\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.Filter2\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeDictionary\")\r\n ]).subscribe((responses: any[]) => {\r\n\r\n this.dictionaryListSubject.next(responses[4]);\r\n this.filter1ListSubject.next(responses[2]);\r\n this.filter2ListSubject.next(responses[3]);\r\n this.attributeContextListSubject.next(responses[1]);\r\n\r\n responses[0].sort(this.sortAttributeSecurityContextList);\r\n this.attributeSecurityContextListSubject.next(responses[0]);\r\n\r\n this.attributeContextLoadingSubject.next(false);\r\n });\r\n }\r\n\r\n //Gets the dictionary entries from the map (so we don't load over and over and over for the same dictionary)\r\n getDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId?: number, referencedAttributeValue?: AttributeValue): Observable<DictionaryEntriesDTO> {\r\n let bs = new Subject<DictionaryEntriesDTO>();\r\n\r\n //Handle XPATH\r\n if (attribute.attributeDictionary.xpath) {\r\n let entriesDTO = new DictionaryEntriesDTO();\r\n let xpath = attribute.attributeDictionary.xpath;\r\n\r\n //Filtered by another dictionary? Parse to get array of all dictionary class names needed\r\n let dictClasses: string[] = [];\r\n let pos = 0;\r\n while (xpath.indexOf(\"/Dictionaries/Dictionary\", pos) >= 0) {\r\n let start = xpath.indexOf(\"/Dictionaries/Dictionary\", pos);\r\n start = xpath.indexOf(\"'\", start);\r\n let end = xpath.indexOf(\"'\", start + 1);\r\n dictClasses.push(attribute.attributeDictionary.xpath.substring(start + 1, end))\r\n pos = end;\r\n }\r\n\r\n //Potentially load multiple dictionaries\r\n let forkCalls = [];\r\n for (let className of dictClasses) {\r\n forkCalls.push(this.dictionaryService.getDictionaryEntriesAsXML(className));\r\n }\r\n\r\n //Deal with the results together\r\n forkJoin(forkCalls).subscribe((responses: any[]) => {\r\n //We're only going to do xpath on the xml for the first dictionary\r\n const parser = new DOMParser();\r\n let doc = parser.parseFromString(responses[0], \"application/xml\");\r\n\r\n //Have to evaluate sub-expression. This doesn't actually support expressions like [@x = (/xpath-sub-expression)]\r\n let secondaryXml = undefined;\r\n if (responses.length > 1) {\r\n secondaryXml = responses[1];\r\n }\r\n\r\n //Pre-evaluate and simplify XPATH\r\n let dto:PreEvalDTO = this.preEvaluateXpath(attribute.attributeDictionary.xpath, secondaryXml, groupAttributeRowId, referencedAttributeValue);\r\n\r\n //Evaluate XPATH expression\r\n let entries = [];\r\n entriesDTO.entriesIncludeSelectedValue = false;\r\n\r\n try{\r\n let xPathResult = document.evaluate(dto.expression, doc, null, XPathResult.ANY_TYPE, null);\r\n\r\n //Iterate xpath results (nodes)\r\n var node = null;\r\n while(node = xPathResult.iterateNext()) {\r\n\r\n let entry = this.getJsonEntryFromNode(node);\r\n entries.push(entry);\r\n }\r\n }catch (e) {\r\n // No matching entries here.\r\n }\r\n\r\n //What about dictionary entries where isActive='N', but the id was used in a previously saved value?\r\n //We add that value to the dropdown, in that case, so it can be selected\r\n //ReferencedAttributeValue only gets passed in when the filter attribute changes. In that scenario we do not want to add the old value to the list\r\n if (attribute.isMultiValue !== \"Y\") {\r\n for (let av of values) {\r\n let present:boolean = false;\r\n \r\n if (av && ! referencedAttributeValue) {\r\n for(var i = entries.length - 1; i >= 0; i--) {\r\n if (entries[i].value === av.valueIdDictionary) {\r\n present = true;\r\n break;\r\n }\r\n }\r\n \r\n //If the currently saved value is not in the list, add it.\r\n if (! present) {\r\n \r\n let xpath = \"/Dictionaries/Dictionary[@className='\" + attribute.attributeDictionary.className + \"']/DictionaryEntry[@value='\" + av.valueIdDictionary + \"']\";\r\n //The entry was probably already loaded, but excluded by the xpath. We can use that.\r\n \r\n let node = document.evaluate(xpath, doc, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;\r\n if (node) {\r\n entries.push(this.getJsonEntryFromNode(node));\r\n entriesDTO.entriesIncludeSelectedValue = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n //Set the behavior subject with the filtered values for the dictionary\r\n entriesDTO.entries = entries;\r\n entriesDTO.referencedAttribute = dto.referencedAttribute;\r\n bs.next(entriesDTO);\r\n });\r\n\r\n }\r\n //Non-xpath\r\n else {\r\n //DictionayService just used http get, so should not need to unsubscribe, since http does that\r\n this.dictionaryService.getDictionaryDropdownEntries(attribute.attributeDictionary.className).subscribe((entries: any[]) => {\r\n //Make value fields\r\n for(var i = entries.length - 1; i >= 0; i--) {\r\n entries[i].value = entries[i].id.toString();\r\n }\r\n\r\n let entriesDTO = new DictionaryEntriesDTO();\r\n entriesDTO.entries = entries;\r\n entriesDTO.entriesIncludeSelectedValue = true; //A bit of an assumption, but if it isn't filtered, it had better include all the values!\r\n bs.next(entriesDTO);\r\n });\r\n }\r\n\r\n return bs;\r\n }\r\n\r\n getJsonEntryFromNode(node: any): any {\r\n //Create JSON objects from the nodes\r\n let entry: any = {};\r\n for(var i = node.attributes.length - 1; i >= 0; i--) {\r\n entry[node.attributes[i].name] = node.attributes[i].value;\r\n }\r\n\r\n return entry;\r\n }\r\n\r\n private preEvaluateXpath(xpath: string, secondaryXml: string, groupAttributeRowId: number, referencedAttributeValue: AttributeValue): PreEvalDTO {\r\n let dto:PreEvalDTO = new PreEvalDTO();\r\n\r\n //SecurityAdvisor/@codeCancerGroup\r\n while (xpath.indexOf(\"/SecurityAdvisor/@codeCancerGroup\") >= 0) {\r\n xpath = xpath.replace(\"/SecurityAdvisor/@codeCancerGroup\", \"'\" + this.getAttributeConfigurationSubject().value.codeAttributeSecurityContext + \"'\");\r\n }\r\n\r\n //Replace some of the context parameters ${x.value} - This is more Altio specific stuff that was used in CCR\r\n let paramPos = xpath.search(\"\\\\${[A-Za-z0-9_]+\\\\.value}\");\r\n while (paramPos >= 0) {\r\n let prefix = xpath.substring(0, paramPos);\r\n let varName = xpath.substring(paramPos + 2, xpath.indexOf(\".\", paramPos));\r\n let suffix = xpath.substring(xpath.indexOf(\"}\", paramPos) + 1);\r\n\r\n var av;\r\n\r\n //If there IS a referencedAttributeValue, we can use the value directly. Otherwise we try to find it in the AVS\r\n if (! referencedAttributeValue) {\r\n\r\n //Find the attribute, matching the varName.\r\n //Do this first, so we get a reference to the related attribute, regardless of whether there is already a value\r\n\r\n //Iterate attributes to find one that matches the value\r\n this.attributeMap.forEach((attribute: Attribute) => {\r\n //Attributes that match the name\r\n if (attribute.attributeName === varName) {\r\n dto.referencedAttribute = attribute;\r\n return;\r\n }\r\n\r\n //If this is a grid, look for attributes in the row\r\n if (attribute.attributes) {\r\n for (let gridColumnAttribute of attribute.attributes) {\r\n //If the name matches AND the value in the AVS was part of the SAME ROW we are evaluating XPATH for, we can use the value for evaluation\r\n if (gridColumnAttribute.attributeName === varName) {\r\n dto.referencedAttribute = gridColumnAttribute;\r\n return;\r\n }\r\n }\r\n }\r\n });\r\n\r\n\r\n\r\n let avs = this.attributeValueSetSubject.getValue();\r\n //If we found the attribute and have values...\r\n if (dto.referencedAttribute && avs) {\r\n\r\n //Look through all the values to find the one for the referenced attribute (and SAME grid row if in a grid row)\r\n av = avs.attributeValues.find((av) => {\r\n\r\n //If this is an AV for a grid row, it must be for the same grid row we are looking for\r\n if (typeof av.groupAttributeRowId !== 'undefined' && typeof groupAttributeRowId !== 'undefined' && av.groupAttributeRowId !== groupAttributeRowId) {\r\n return false;\r\n }\r\n\r\n\r\n //If we looked up the attribute matching the value by id AND the name of the attribute is the one we ar looking for from the XPATH, we can use it for evaluation\r\n //Found an AttributeValue that the dictionary is filtered by\r\n if (dto.referencedAttribute.idAttribute === av.idAttribute) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n })\r\n }\r\n }\r\n\r\n //Use the referencedAttributeValue if provided (this happens when already known, during changes to the referenced attribute)\r\n if (referencedAttributeValue) {\r\n xpath = prefix + \"'\" + referencedAttributeValue.value + \"'\" + suffix;\r\n }\r\n //Found the AttributeValue for the attribute that the dictionary is filtered by\r\n else if (av) {\r\n xpath = prefix + \"'\" + av.value + \"'\" + suffix;\r\n }\r\n //Didn't find an attribute for varName\r\n else {\r\n //Maybe the varName is from elsewhere in the app (non-COD), and provided in boundData\r\n if (this.boundData && this.boundData[varName]) {\r\n xpath = prefix + \"'\" + this.boundData[varName] + \"'\" + suffix;\r\n }\r\n //Nothing matches. Change to empty string. Will probably result in NO entries, which would be correct.\r\n else {\r\n xpath = prefix + \"''\" + suffix;\r\n }\r\n }\r\n\r\n paramPos = xpath.search(\"\\\\${[A-Za-z0-9_]+\\\\.value}\");\r\n }\r\n\r\n //Have to evaluate sub-expression. This handles expressions like [@x = (/xpath-sub-expression)]\r\n let inExpressionPos = xpath.search(\"\\\\[@[A-Za-z0-9_]+\\\\s*=\\\\s*\\\\(\");\r\n\r\n if (inExpressionPos > 0 && secondaryXml) {\r\n let prefix = xpath.substring(0, inExpressionPos + 1);\r\n let expressionEnd = xpath.indexOf(\")\", inExpressionPos);\r\n let variable = xpath.substring(inExpressionPos + 1, xpath.indexOf(\"=\", inExpressionPos));\r\n let subExpression = xpath.substring(xpath.indexOf(\"(\", inExpressionPos) + 1, expressionEnd);\r\n let suffix = xpath.substring(expressionEnd + 1);\r\n\r\n xpath = prefix;\r\n\r\n //Evaluate XPATH expression\r\n const parser = new DOMParser();\r\n let doc = parser.parseFromString(secondaryXml, \"application/xml\");\r\n let xPathResult = document.evaluate(subExpression, doc, null, XPathResult.ANY_TYPE, null);\r\n\r\n //Iterate xpath results (nodes)\r\n var node = xPathResult.iterateNext();\r\n\r\n while(node) {\r\n xpath = xpath + variable + \"='\" + node.nodeValue + \"'\"\r\n\r\n node = xPathResult.iterateNext();\r\n\r\n if (node) {\r\n xpath = xpath + \" or \";\r\n }\r\n }\r\n\r\n xpath = xpath + suffix;\r\n }\r\n\r\n dto.expression = xpath;\r\n return dto;\r\n }\r\n\r\n private sortAttributeSecurityContextList(a: any, b: any) {\r\n return a.description.toLowerCase().localeCompare(b.description.toLowerCase());\r\n }\r\n\r\n fetchAttributeConfigurationList(codeAttributeSecurityContext?: string): void {\r\n if (isDevMode()) {\r\n console.debug(\"fetchAttributeConfigurationList: \" + codeAttributeSecurityContext);\r\n }\r\n\r\n this.attributeConfigurationListLoadingSubject.next(true);\r\n\r\n let url: string = this.attributeEndpoint + \"configurations\";\r\n let params: HttpParams = new HttpParams();\r\n if (codeAttributeSecurityContext) {\r\n params = params.set(\"codeAttributeSecurityContext\", codeAttributeSecurityContext);\r\n }\r\n\r\n this.http.get<AttributeConfiguration[]>(url, {params: params}).subscribe((configurationList: AttributeConfiguration[]) => {\r\n this.attributeConfigurationListLoadingSubject.next(false);\r\n\r\n let dtos: AttributeConfigurationDTO[] = [];\r\n for (let cfg of configurationList) {\r\n let dto: AttributeConfigurationDTO = this.getAttributeConfigurationDTO(cfg);\r\n if (dto) {\r\n dtos.push(dto);\r\n }\r\n }\r\n\r\n dtos.sort(this.sortAttributeConfigurationList);\r\n\r\n this.attributeConfigurationListSubject.next(dtos);\r\n });\r\n }\r\n\r\n private sortAttributeConfigurationList(a: AttributeConfigurationDTO, b: AttributeConfigurationDTO) {\r\n const displaya = a.codeAttributeSecurityContextDisplay\r\n + a.extensionDescription\r\n + (a.filter1Display || \"\")\r\n + (a.filter2Display || \"\");\r\n\r\n const displayb = b.codeAttributeSecurityContextDisplay\r\n + b.extensionDescription\r\n + (b.filter1Display || \"\")\r\n + (b.filter2Display || \"\");\r\n\r\n return displaya.toLowerCase().localeCompare(displayb.toLowerCase());\r\n }\r\n\r\n //Used by cod-editor\r\n clear(): void {\r\n this.idAttributeConfiguration = undefined;\r\n this.idFilter1 = undefined;\r\n this.idFilter2 = undefined;\r\n\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(undefined);\r\n }\r\n\r\n createAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n attributeConfiguration.idAttributeConfiguration = undefined;\r\n\r\n this.http.post<AttributeConfiguration>(this.attributeEndpoint + \"configurations\", attributeConfiguration).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n this.idAttributeConfiguration = attributeConfiguration.idAttributeConfiguration;\r\n\r\n this.postConfigurationSubject.next(true);\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n this.router.navigateByUrl(\"/editor/attribute-configuration/\" + attributeConfiguration.idAttributeConfiguration);\r\n });\r\n }\r\n\r\n setAttributeConfigurationById(idAttributeConfiguration: number, idAttributeValueSet: number, idParentObject: number): void {\r\n if (idAttributeConfiguration !== -1) {\r\n this.newAttributeConfiguration = undefined;\r\n }\r\n\r\n //Only load if the AttributeConfiguration has changed\r\n if (this.idAttributeConfiguration !== idAttributeConfiguration) {\r\n //Clear ASAP\r\n this.idAttributeConfiguration = idAttributeConfiguration;\r\n this.idAttributeValueSet = idAttributeValueSet;\r\n this.idFilter1 = undefined;\r\n this.idFilter2 = undefined;\r\n this.attributeMap.clear();\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(undefined);\r\n\r\n this.fetchAttributeConfiguration(idAttributeValueSet, idParentObject);\r\n }\r\n //Or load the AttributeValueSet if that changed (possible to switch from one event to another of the same type, for example\r\n //The AttributeConfiguration must also have finished loading and not already working on loading the values\r\n else if (this.idAttributeValueSet !== idAttributeValueSet && this.attributeConfigurationSubject.getValue()) {\r\n this.setAttributeValueSet(idAttributeValueSet, idParentObject);\r\n }\r\n }\r\n\r\n\r\n\r\n /**\r\n * Sets the attribute configuration identifiers to be used by this service. This prompts a new configuration\r\n * request to be made.\r\n *\r\n * @param {number} idFilter1\r\n * @param {number} idFilter2\r\n */\r\n/* This is commented out for now because it is both unimplemented and incomplete (loading a configuration\r\n * filter would really also require the attribute context and attributesecurity context plus a service on\r\n * the back end that actually does this work. For now, only loading by idAttributeConfiguration\r\n *\r\n setAttributeConfigurationByFilter(idFilter1: number, idFilter2?: number): void {\r\n if (isDevMode()) {\r\n console.debug(\"setAttributeConfigurationByFilter: \" + idFilter1 + \" \" + idFilter2);\r\n }\r\n\r\n this.newAttributeConfiguration = undefined;\r\n //this.idAttributeConfiguration = undefined;\r\n this.idFilter1 = idFilter1;\r\n this.idFilter2 = idFilter2;\r\n\r\n this.fetchAttributeConfiguration();\r\n }\r\n*/\r\n\r\n /**\r\n * Sets the id of the attribute value set. This will prompt a request to pull this from the backend.\r\n *\r\n * @param {number} idAttributeValueSet\r\n */\r\n setAttributeValueSet(idAttributeValueSet: number, idParentObject: number) {\r\n //Only load the AttributeValueSet if it has been changed\r\n if (this.idAttributeValueSet !== idAttributeValueSet) {\r\n this.idAttributeValueSet = idAttributeValueSet;\r\n\r\n this.fetchAttributeValueSet(idParentObject);\r\n }\r\n }\r\n\r\n /**\r\n * The request to download the attribute configuration.\r\n */\r\n fetchAttributeConfiguration(idAttributeValueSet: number, idParentObject: number): void {\r\n\r\n if (this.newAttributeConfiguration) {\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(this.newAttributeConfiguration);\r\n return;\r\n } else if (this.idAttributeConfiguration === -1) {\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(<AttributeConfiguration>{\r\n idAttributeConfiguration: -2\r\n });\r\n return;\r\n }\r\n\r\n this.loadingSubject.next(true);\r\n\r\n let url: string;\r\n if (this.idAttributeConfiguration && this.idAttributeConfiguration > -1) {\r\n url = this.attributeEndpoint + \"configurations/\" + this.idAttributeConfiguration;\r\n } else {\r\n //This is not fully implemented\r\n\t //url = this.attributeEndpoint + \"configurations/filter/\" + this.idFilter1;\r\n //if (this.idFilter2) {\r\n //url += \"/\" + this.idFilter2;\r\n //}\r\n }\r\n\r\n this.http.get<AttributeConfiguration>(url).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n this.setAttributeConfiguration(attributeConfiguration);\r\n this.loadingSubject.next(false);\r\n\r\n //Now load the attributeValueSet - This will always happen when a new configuration is loaded\r\n this.idAttributeValueSet = undefined; //Force it to change in this scenario\r\n this.setAttributeValueSet(idAttributeValueSet, idParentObject);\r\n this.dirty.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n this.setAttributeConfiguration(undefined);\r\n });\r\n }\r\n\r\n setAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n this.attributeMap.clear();\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeService.setAttributeConfiguration\");\r\n console.debug(attributeConfiguration);\r\n }\r\n\r\n if (attributeConfiguration) {\r\n if (attributeConfiguration.baseWindowTemplate) {\r\n this.getBaseWindowDimension(attributeConfiguration.baseWindowTemplate);\r\n }\r\n\r\n if (attributeConfiguration.attributeContainers) {\r\n attributeConfiguration.attributeContainers.sort((a: AttributeContainer, b: AttributeContainer) => {\r\n if (a.sortOrder < b.sortOrder) {\r\n return -1;\r\n } else if (a.sortOrder > b.sortOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n }\r\n\r\n for (let attributeContainer of attributeConfiguration.attributeContainers) {\r\n /**\r\n * First sort attributes using the y and x positioning. If using absolute position, the order doesn't matter,\r\n * but if we want the absolute positioning to guide auto layout, then use this order.\r\n */\r\n attributeContainer.graphicalAttributes.sort((a: GraphicalAttribute, b: GraphicalAttribute) => {\r\n if (a.tabOrder < b.tabOrder) {\r\n return -1;\r\n } else if (a.tabOrder > b.tabOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n for (let attribute of attributeContainer.graphicalAttributes) {\r\n this.attributeMap.set(attribute.idAttribute, attribute);\r\n }\r\n }\r\n }\r\n\r\n this.attributeConfigurationDTOSubject.next(this.getAttributeConfigurationDTO(attributeConfiguration));\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n }\r\n\r\n /**\r\n * The request to pull the attribute value set.\r\n * Required the AttributeConfiguration to be pre-loaded\r\n */\r\n fetchAttributeValueSet(idParentObject: number): void {\r\n this.loadingSubject.next(true);\r\n this.idParentObject = idParentObject;\r\n\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" + this.idAttributeValueSet;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (idParentObject)?idParentObject.toString():\"\");\r\n\r\n //Clear ASAP\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.attributeValueSetSubject.next(undefined);\r\n\r\n this.http.get<AttributeValueSet>(url, {params: queryParams}).subscribe((attributeValueSet: AttributeValueSet) => {\r\n //Initialize attributeValues if it does not exist\r\n if (! attributeValueSet.attributeValues) {\r\n attributeValueSet.attributeValues = [];\r\n }\r\n\r\n this.checkAvsEditable();\r\n\r\n this.attributeValueSetSubject.next(attributeValueSet);\r\n this.loadingSubject.next(false);\r\n this.dirty.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n this.attributeValueSetSubject.next(undefined);\r\n });\r\n }\r\n\r\n checkAvsEditable(): void {\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" + this.idAttributeValueSet + \"/can-edit\";\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n \r\n this.http.get<boolean>(url, {params: queryParams}).subscribe((canEdit: boolean) => {\r\n this.editButtonsEnabled = canEdit;\r\n });\r\n }\r\n\r\n getBaseWindowDimension(baseWindowTemplate: string): void {\r\n this.http.get(this.attributeEndpoint + \"base-window-dimension\", {params: new HttpParams().set(\"baseWindowTemplate\", baseWindowTemplate)})\r\n .subscribe((dimension: any) => {\r\n this.attributeConfigurationDimensionSubject.next(dimension);\r\n });\r\n }\r\n\r\n /**\r\n * Currently a simple notifier that the configuration or attribute value set has changed and components may need to be refreshed.\r\n *\r\n */\r\n notifyAttributes(): void {\r\n this.containerUpdated.next(true);\r\n }\r\n\r\n /**\r\n * Post the attribute configuration after editing. Post the entire thing as it cascades down. The editor allows you\r\n * to modify every container and only then save the entire configuration.\r\n *\r\n * @param {AttributeConfiguration} attributeConfiguration\r\n */\r\n postAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n let url: string = this.attributeEndpoint + \"configurations/\" + attributeConfiguration.idAttributeConfiguration;\r\n\r\n this.loadingSubject.next(true);\r\n\r\n this.setNegativeIdsToUndefined(attributeConfiguration);\r\n\r\n this.http.post(url, attributeConfiguration).subscribe(() => {\r\n\r\n // Prevent error in subsequent saves. See Metabuilder / MB-23\r\n this.http.get<AttributeConfiguration>(url).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n if (isDevMode()) {\r\n console.debug(attributeConfiguration);\r\n }\r\n\r\n this.postConfigurationSubject.next(true);\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n },\r\n (error) => {\r\n console.error(error);\r\n },\r\n () => {\r\n this.loadingSubject.next(false);\r\n });\r\n\r\n },\r\n (error) => {\r\n console.error(error);\r\n });\r\n }\r\n\r\n /**\r\n * Put the attribute value set. When editing, attributes already post their updated values to this services under\r\n * a separate array. What we do is merge in these updated or created values with the current attribute value set (avs).\r\n * While doing this, set the id of the avs and nullify any negative ids.\r\n */\r\n updateAttributeValueSet(): Subject<AttributeValueSet> {\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n let avs: AttributeValueSet = Object.assign({}, this.attributeValueSetSubject.getValue());\r\n for (let i = this.updatedAttributeValues.length - 1; i >= 0; i--) {\r\n this.updatedAttributeValues[i].idAttributeValueSet = this.idAttributeValueSet;\r\n if (this.updatedAttributeValues[i].idAttributeValue < 0) {\r\n this.updatedAttributeValues[i].idAttributeValue = undefined;\r\n }\r\n\r\n let j: number = 0;\r\n for (j = 0; j < avs.attributeValues.length; j++) {\r\n if (this.updatedAttributeValues[i].idAttributeValue === avs.attributeValues[j].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < avs.attributeValues.length) {\r\n avs.attributeValues[j] = this.updatedAttributeValues[i];\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n }\r\n for (let i = 0; i < this.slicedAttributeValues.length; i++) {\r\n let j: number = 0;\r\n for (j = 0; j < avs.attributeValues.length; j++) {\r\n if (this.slicedAttributeValues[i].idAttributeValue === avs.attributeValues[j].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < avs.attributeValues.length) {\r\n avs.attributeValues.splice(j, 1);\r\n }\r\n }\r\n avs.attributeValues = avs.attributeValues.concat(this.updatedAttributeValues);\r\n\r\n this.loadingSubject.next(true);\r\n\r\n let resultSubject: Subject<AttributeValueSet> = new Subject<AttributeValueSet>();\r\n\r\n this.http.put(url, avs, {params: queryParams}).subscribe((attributeValueSet: AttributeValueSet) => {\r\n if (isDevMode()) {\r\n console.debug(attributeValueSet);\r\n }\r\n\r\n //Initialize attributeValues if it does not exist\r\n if (! attributeValueSet.attributeValues) {\r\n attributeValueSet.attributeValues = [];\r\n }\r\n\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.attributeValueSetSubject.next(attributeValueSet);\r\n this.loadingSubject.next(false);\r\n this.dirty.next(false);\r\n\r\n //Send the results to the observer (if any), then complete\r\n resultSubject.next(attributeValueSet);\r\n resultSubject.complete();\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n resultSubject.error(error);\r\n });\r\n\r\n return resultSubject;\r\n }\r\n\r\n /**\r\n * Get the attributeConfigurationSubject.\r\n *\r\n * @returns {BehaviorSubject<AttributeConfiguration>}\r\n */\r\n getAttributeConfigurationSubject(): BehaviorSubject<AttributeConfiguration> {\r\n return this.attributeConfigurationSubject;\r\n }\r\n\r\n getDirtySubject(): BehaviorSubject<boolean> {\r\n return this.dirty;\r\n }\r\n\r\n /**\r\n * Get the attributeValueSetSubject;\r\n *\r\n * @returns {BehaviorSubject<AttributeValueSet>}\r\n */\r\n getAttributeValueSet(): BehaviorSubject<AttributeValueSet> {\r\n return this.attributeValueSetSubject;\r\n }\r\n\r\n /**\r\n * Get the attributeValuePushedSubject;\r\n *\r\n * @returns {Subject<AttributeValue>}\r\n */\r\n getAttributeValuePushedSubject(): Subject<AttributeValue> {\r\n return this.attributeValuePushedSubject;\r\n }\r\n\r\n /**\r\n * Get all attribute values based upon the idAttribute.\r\n *\r\n * @param {number} idAttributes\r\n * @returns {AttributeValue[]}\r\n */\r\n getAttributeValues(idAttribute: number, groupAttributeRowId: number): AttributeValue[] {\r\n\r\n let attributeValues: AttributeValue[] = [];\r\n\r\n if(this.attributeValueSetSubject.getValue()) {\r\n\r\n //Go through all the updated attribute values first (so we preserve across changing tabs, etc)\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === idAttribute && (!groupAttributeRowId || groupAttributeRowId === this.updatedAttributeValues[i].groupAttributeRowId)) {\r\n attributeValues.push(Object.assign({}, this.updatedAttributeValues[i]));\r\n }\r\n else if (this.updatedAttributeValues[i].idGroupAttribute === idAttribute && (!groupAttributeRowId || groupAttributeRowId === this.updatedAttributeValues[i].groupAttributeRowId)) {\r\n attributeValues.push(Object.assign({}, this.updatedAttributeValues[i]));\r\n }\r\n }\r\n\r\n //Go through all the regular attributes\r\n for (let attributeValue of this.attributeValueSetSubject.getValue().attributeValues) {\r\n //Regular attributes (normal and group, which get multiple)\r\n if (attributeValue.idAttribute === idAttribute || attributeValue.idGroupAttribute === idAttribute) {\r\n //If row id specified, only care about values for that row\r\n if (typeof groupAttributeRowId === 'undefined' || attributeValue.groupAttributeRowId === groupAttributeRowId) {\r\n\r\n //If not already added...\r\n if (! attributeValues.find((existing) => existing.idAttributeValue === attributeValue.idAttributeValue)) {\r\n\r\n //Don't want the original if it was removed (sliced)\r\n if (! this.slicedAttributeValues.find((sav) => sav.idAttributeValue === attributeValue.idAttributeValue)) {\r\n attributeValues.push(Object.assign({}, attributeValue));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return attributeValues;\r\n }\r\n\r\n /**\r\n * Get all child attributes of the idAttribute. Most likely for attributes that define columns of a grid.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {Attribute[]}\r\n */\r\n getGroupAttributes(idAttribute: number): Attribute[] {\r\n let attributes: Attribute[] = [];\r\n\r\n this.attributeMap.forEach((attribute: Attribute) => {\r\n if (attribute.idGroupAttribute === idAttribute) {\r\n attributes.push(attribute);\r\n }\r\n });\r\n\r\n return attributes;\r\n }\r\n\r\n /**\r\n * Set the width which is a requirement of the absolute positioning.\r\n *\r\n * @param {number} width\r\n */\r\n setWidth(width: number): void {\r\n this.width = width;\r\n }\r\n\r\n /**\r\n * Get the width.\r\n *\r\n * @returns {number}\r\n */\r\n getWidth(): number {\r\n return this.width;\r\n }\r\n\r\n /**\r\n * Get the array of attribute choices for the idAttribute.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {AttributeChoice[]}\r\n */\r\n getAttributeChoices(idAttribute: number): AttributeChoice[] {\r\n return this.attributeMap.get(idAttribute).attributeChoices;\r\n }\r\n\r\n getLoadingSubject(): Subject<boolean> {\r\n return this.loadingSubject;\r\n }\r\n\r\n /**\r\n * Get the containerUpdated subject.\r\n *\r\n * @returns {Subject<number>}\r\n */\r\n getContainerUpdated(): Subject<boolean> {\r\n return this.containerUpdated;\r\n }\r\n\r\n getGridRowSavedSubject(): Subject<AttributeValueGridRow> {\r\n return this.gridRowSaved;\r\n }\r\n\r\n getGridRowDeletedSubject(): Subject<AttributeValueGridRow> {\r\n return this.gridRowDeleted;\r\n }\r\n\r\n /**\r\n * Clear the updated and deleted attribute value arrays.\r\n *\r\n */\r\n clearUpdatedAttributeValues(): void {\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.dirty.next(false);\r\n this.notifyAttributes();\r\n }\r\n\r\n /**\r\n * Clear the updated and deleted grid row attributes for the specified grid row\r\n *\r\n */\r\n clearUpdatedGridRowAttributeValues(groupAttributeRowId: number): void {\r\n let remainingAttributes = [];\r\n\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);\r\n\r\n //Shouldn't be a need to change dirty or notify attributes\r\n }\r\n\r\n saveGridRowAttributeValues(idGroupAttribute: number, groupAttributeRowId: number): void {\r\n let rowValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);\r\n\r\n for (let j = 0; j < rowValues.length; j++) {\r\n //set the idAttributeValueSet if necessary\r\n if (! rowValues[j].idAttributeValueSet) {\r\n rowValues[j].idAttributeValueSet = this.idAttributeValueSet;\r\n }\r\n\r\n //remove all negative ids (new values)\r\n if (rowValues[j].idAttributeValue < 0) {\r\n rowValues[j].idAttributeValue = undefined;\r\n }\r\n }\r\n\r\n //For multi values that were sliced (de-selected) we're going to find them and null out the value, instead of removing.\r\n //That means they actaully need to be added to the rowValues\r\n //Removed multi values within an existing row\r\n let removedValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);\r\n for (let i = 0; i < removedValues.length; i++) {\r\n removedValues[i].valueAttributeChoice = undefined;\r\n removedValues[i].valueIdDictionary = undefined;\r\n rowValues.push(removedValues[i]);\r\n }\r\n\r\n let avgr:AttributeValueGridRow = <AttributeValueGridRow>{\r\n idAttributeValueSet: this.idAttributeValueSet,\r\n idGroupAttribute: idGroupAttribute,\r\n groupAttributeRowId: groupAttributeRowId,\r\n attributeValues: rowValues\r\n };\r\n\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n\r\n this.loadingSubject.next(true);\r\n\r\n //Save new row\r\n if (groupAttributeRowId < 0) {\r\n this.http.post(url, avgr, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n\r\n //Add the grid row to the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n //Remove the updated and sliced values for the grid row, now (these are the old ones with the negative rowid)\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowSaved.next(attributeValueGridRow);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n //Update existing row\r\n else {\r\n this.http.put(url, avgr, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n\r\n //Add the grid row to the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n\r\n //Remove all old values for row\r\n let index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));\r\n while (index >= 0) {\r\n //Remove value\r\n avs.attributeValues.splice(index, 1);\r\n\r\n //Find the next one\r\n index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));\r\n }\r\n\r\n //Add all the current values\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n //Remove the sliced and updated values for the grid row\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowSaved.next(attributeValueGridRow);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n }\r\n\r\n deleteGridRowAttributeValues(idGroupAttribute: number, groupAttributeRowId: number): void {\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n let avgr:AttributeValueGridRow = <AttributeValueGridRow>{\r\n idAttributeValueSet: this.idAttributeValueSet,\r\n idGroupAttribute: idGroupAttribute,\r\n groupAttributeRowId: groupAttributeRowId,\r\n attributeValues: []\r\n };\r\n\r\n this.loadingSubject.next(true);\r\n\r\n this.http.request('delete', url, {body: avgr, params: queryParams}).subscribe(() => {\r\n\r\n //Remove the grid row from the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n //Filter to only attributes to KEEP - (i.e. not the same grid or not the row being deleted)\r\n avs.attributeValues = avs.attributeValues.filter((av) => (av.idGroupAttribute !== idGroupAttribute || av.groupAttributeRowId !== groupAttributeRowId));\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowDeleted.next(avgr);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n\r\n /**\r\n * Used to refresh a grid row after plugin execution without affecting other attribute values\r\n * Normally saving the grid row updates the values, but some applications execute a subsequent plugin and need an extra refresh to pick up changes.\r\n * \r\n * @param {AttributeValueGridRow} avgr\r\n */\r\n refreshGridRow(avgr: AttributeValueGridRow) {\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n \r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"idGroupAttribute\", avgr.idGroupAttribute)\r\n .set(\"groupAttributeRowId\", avgr.groupAttributeRowId)\r\n .set(\"idAttributeValueSet\", avgr.idAttributeValueSet)\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n \r\n this.loadingSubject.next(true);\r\n \r\n this.http.get<AttributeValueGridRow>(url, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n \r\n //Note that the sliced and updated values for the grid row were already cleaned up during the save\r\n \r\n //Remove the grid row from the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n \r\n //Remove all old values for row\r\n let index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === attributeValueGridRow.groupAttributeRowId && av.idGroupAttribute === attributeValueGridRow.idGroupAttribute));\r\n while (index >= 0) {\r\n //Remove value\r\n avs.attributeValues.splice(index, 1);\r\n \r\n //Find the next one\r\n index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === attributeValueGridRow.groupAttributeRowId && av.idGroupAttribute === attributeValueGridRow.idGroupAttribute));\r\n }\r\n \r\n //Add all the current values\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n \r\n this.attributeValueSetSubject.next(avs);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n \r\n }\r\n\r\n /**\r\n * Push an attribute to the attribute map.\r\n *\r\n * @param {Attribute} attribute\r\n */\r\n pushAttribute(attribute: Attribute): void {\r\n this.attributeMap.set(attribute.idAttribute, attribute);\r\n }\r\n\r\n\r\n pushAttributeValueMultiChoice(attributeValue: AttributeValue): void {\r\n //Remove from sliced if present\r\n let i: number = 0;\r\n for (i = 0; i < this.slicedAttributeValues.length; i++) {\r\n if (this.slicedAttributeValues[i].idAttribute === attributeValue.idAttribute && this.slicedAttributeValues[i].valueAttributeChoice.idAttributeChoice === attributeValue.valueAttributeChoice.idAttributeChoice) {\r\n break;\r\n }\r\n }\r\n //Remove from sliced attribute values (no longer removing)\r\n if (i < this.slicedAttributeValues.length) {\r\n this.slicedAttributeValues.splice(i, 1);\r\n }\r\n //Otherwise push the value, so it will be saved\r\n else {\r\n this.pushAttributeValue(attributeValue);\r\n }\r\n }\r\n\r\n pushAttributeValueMultiDict(attributeValue: AttributeValue): void {\r\n //Remove from sliced if present\r\n let i: number = 0;\r\n for (i = 0; i < this.slicedAttributeValues.length; i++) {\r\n if (this.slicedAttributeValues[i].idAttribute === attributeValue.idAttribute && this.slicedAttributeValues[i].valueIdDictionary === attributeValue.valueIdDictionary) {\r\n break;\r\n }\r\n }\r\n //Remove from sliced attribute values (no longer removing)\r\n if (i < this.slicedAttributeValues.length) {\r\n this.slicedAttributeValues.splice(i, 1);\r\n }\r\n //Otherwise push the value, so it will be saved\r\n else {\r\n this.pushAttributeValue(attributeValue);\r\n }\r\n }\r\n\r\n /**\r\n * Push a new or updated attribute value. The current one is just removed and the new one appended to the array.\r\n *\r\n * @param {AttributeValue} attributeValue\r\n */\r\n pushAttributeValue(attributeValue: AttributeValue): void {\r\n if (isDevMode()) {\r\n console.debug(\"pushAttributeValue\");\r\n console.debug(attributeValue);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttributeValue === attributeValue.idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n\r\n this.updatedAttributeValues.push(attributeValue);\r\n this.attributeValuePushedSubject.next(attributeValue);\r\n\r\n //Only setting dirty for non grid-rows (those are saved immediately)\r\n if (! attributeValue.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * For pushing multiple attribute values at once. This would typically be for a multi choice.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeValue[]} attributeValues\r\n */\r\n pushAttributeValues(attribute: Attribute, attributeValues: AttributeValue[]): void {\r\n if (isDevMode()) {\r\n console.debug(\"pushAttributeValues\");\r\n console.debug(attributeValues);\r\n }\r\n\r\n for (let i = 0; i < attributeValues.length; i++) {\r\n let j: number = 0;\r\n for (j = 0; j < this.updatedAttributeValues.length; j++) {\r\n if (this.updatedAttributeValues[j].idAttribute !== attribute.idAttribute) {\r\n continue;\r\n } else if (this.updatedAttributeValues[j].idAttributeValue === attributeValues[i].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues[j] = attributeValues[i];\r\n } else {\r\n this.updatedAttributeValues.push(attributeValues[i]);\r\n }\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(this.updatedAttributeValues);\r\n }\r\n\r\n //Only setting dirty for non grid-rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * Push a value in the case where an attribute value doesn't exist.\r\n *\r\n * @param {Attribute} attribute\r\n * @param value\r\n */\r\n pushValue(attribute: Attribute, value: any): void {\r\n let attributeValue: AttributeValue = <AttributeValue>{\r\n idAttribute: attribute.idAttribute,\r\n idAttributeValueSet: this.idAttributeValueSet\r\n };\r\n\r\n if (attribute.codeAttributeDataType === \"TXT\") {\r\n attributeValue.valueLongText = {\r\n idLongText: undefined,\r\n textData: value\r\n };\r\n }\r\n\r\n this.updatedAttributeValues.push(attributeValue);\r\n this.dirty.next(true);\r\n }\r\n\r\n /**\r\n * Remove an attribute value. Typically in the case of a multi select where the unselected value is removed.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeChoice} attributeChoice\r\n */\r\n spliceAttributeValueChoice(attribute: Attribute, attributeChoice: AttributeChoice): void {\r\n if (isDevMode()) {\r\n console.debug(\"sliceAttributeValue: \" + attribute.idAttribute + \", \" + attributeChoice.idAttributeChoice);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === attribute.idAttribute && this.updatedAttributeValues[i].valueAttributeChoice.idAttributeChoice === attributeChoice.idAttributeChoice) {\r\n break;\r\n }\r\n }\r\n //Remove from updated attribute values (not previously saved)\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n //Add to sliced values (previously saved - need to remove)\r\n else {\r\n for (i = 0; i < this.attributeValueSetSubject.getValue().attributeValues.length; i++) {\r\n if (this.attributeValueSetSubject.getValue().attributeValues[i].idAttribute === attribute.idAttribute\r\n && this.attributeValueSetSubject.getValue().attributeValues[i].valueAttributeChoice.idAttributeChoice === attributeChoice.idAttributeChoice) {\r\n this.slicedAttributeValues.push(this.attributeValueSetSubject.getValue().attributeValues[i]);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //Only flagging dirty for non-grid rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Remove an attribute value. Typically in the case of a multi select where the unselected value is removed.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeChoice} attributeChoice\r\n */\r\n spliceAttributeValueDict(attribute: Attribute, value: any): void {\r\n if (isDevMode()) {\r\n console.debug(\"sliceAttributeValue: \" + attribute.idAttribute + \", \" + value);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === attribute.idAttribute && this.updatedAttributeValues[i].valueIdDictionary === value) {\r\n break;\r\n }\r\n }\r\n //Remove from updated attribute values (not previously saved)\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n //Add to sliced values (previously saved - need to remove)\r\n else {\r\n for (i = 0; i < this.attributeValueSetSubject.getValue().attributeValues.length; i++) {\r\n if (this.attributeValueSetSubject.getValue().attributeValues[i].idAttribute === attribute.idAttribute\r\n && this.attributeValueSetSubject.getValue().attributeValues[i].valueIdDictionary === value) {\r\n this.slicedAttributeValues.push(this.attributeValueSetSubject.getValue().attributeValues[i]);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //Only flagging dirty for non-grid rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * Get the attribute based upon the idAttribute. This is from the map of attributes.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {Attribute}\r\n */\r\n getAttribute(idAttribute: number): Attribute {\r\n return this.attributeMap.get(idAttribute);\r\n }\r\n\r\n /**\r\n * For the attribute configuration, set all of the negative ids to undefined prior to posting.\r\n *\r\n * @param {AttributeConfiguration} attributeConfiguration\r\n */\r\n setNegativeIdsToUndefined(attributeConfiguration: AttributeConfiguration): void {\r\n if (attributeConfiguration.idAttributeConfiguration < 0) {\r\n attributeConfiguration.idAttributeConfiguration = undefined;\r\n }\r\n\r\n for (let attributeContainer of attributeConfiguration.attributeContainers) {\r\n if (attributeContainer.idAttributeContainer < 0) {\r\n attributeContainer.idAttributeContainer = undefined;\r\n }\r\n\r\n for (let attribute of attributeContainer.graphicalAttributes) {\r\n\r\n if (attribute.idAttribute < 0) {\r\n attribute.idAttribute = undefined;\r\n }\r\n\r\n if (attribute.attributeChoices) {\r\n for (let attributeChoice of attribute.attributeChoices) {\r\n delete attribute[\"value\"];\r\n\r\n if (attributeChoice.idAttribute < 0) {\r\n attributeChoice.idAttribute = undefined;\r\n }\r\n if (attributeChoice.idAttributeChoice < 0) {\r\n attributeChoice.idAttributeChoice = undefined;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a display name for the attribute configuration based on the context code and id.\r\n *\r\n * @param {AttributeConfiguration} configuration\r\n * @returns {string}\r\n */\r\n getConfigurationName(configuration: AttributeConfigurationDTO): string {\r\n if (configuration.idAttributeConfiguration === -1) {\r\n return \"New\";\r\n }\r\n\r\n let name: string = configuration.codeAttributeSecurityContextDisplay + \": \" + configuration.extensionDescription;\r\n\r\n if (configuration.idFilter1) {\r\n name += \" - \" + configuration.filter1Display;\r\n }\r\n if (configuration.idFilter2) {\r\n name += \" - \" + configuration.filter2Display;\r\n }\r\n return name;\r\n }\r\n\r\n getAttributeConfigurationDTO(cfg: AttributeConfiguration): AttributeConfigurationDTO {\r\n if (!cfg) {\r\n return undefined;\r\n }\r\n\r\n let dto: AttributeConfigurationDTO = <AttributeConfigurationDTO>{\r\n idAttributeConfiguration: cfg.idAttributeConfiguration,\r\n codeAttributeContext: cfg.codeAttributeContext,\r\n codeAttributeSecurityContext: cfg.codeAttributeSecurityContext,\r\n idFilter1: cfg.idFilter1,\r\n idFilter2: cfg.idFilter2\r\n };\r\n\r\n if (this.attributeContextListSubject.getValue()) {\r\n dto.extensionDescription = this.attributeContextListSubject.getValue().filter((ctx: any) => {\r\n return ctx.codeAttributeContext === cfg.codeAttributeContext;\r\n })[0].extensionDescription;\r\n }\r\n\r\n if (this.attributeSecurityContextListSubject.getValue()) {\r\n let result: any[] = this.attributeSecurityContextListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext;\r\n });\r\n dto.codeAttributeSecurityContextDisplay = (result && result.length > 0) ? result[0].description : undefined;\r\n }\r\n\r\n if (this.filter1ListSubject.getValue()) {\r\n let result: any[] = this.filter1ListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeContext === cfg.codeAttributeContext\r\n && filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext\r\n && filter.idFilter1 === cfg.idFilter1;\r\n });\r\n dto.filter1Display = (result && result.length > 0) ? result[0].display : undefined;\r\n }\r\n\r\n if (this.filter2ListSubject.getValue()) {\r\n let result: any[] = this.filter2ListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeContext === cfg.codeAttributeContext\r\n && filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext\r\n && filter.idFilter1 === cfg.idFilter1\r\n && filter.idFilter2 === cfg.idFilter2;\r\n });\r\n dto.filter2Display = (result && result.length > 0) ? result[0].display : undefined;\r\n }\r\n\r\n return dto;\r\n }\r\n\r\n getSecurityCodeContext(code: string): any {\r\n return this.attributeSecurityContextListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeSecurityContext === code;\r\n })[0];\r\n }\r\n\r\n getAttributeContextLoadingSubject(): BehaviorSubject<boolean> {\r\n return this.attributeContextLoadingSubject;\r\n }\r\n\r\n getFilter1For(codeAttributeContext: string, codeAttributeSecurityContext: string): any[] {\r\n return this.filter1ListSubject.getValue().filter((item: any) => {\r\n return item.codeAttributeContext === codeAttributeContext && item.codeAttributeSecurityContext === codeAttributeSecurityContext;\r\n });\r\n }\r\n\r\n getFilter2For(codeAttributeContext: string, codeAttributeSecurityContext: string, idFilter1: number): any[] {\r\n return this.filter2ListSubject.getValue().filter((item: any) => {\r\n return item.codeAttributeContext === codeAttributeContext\r\n && item.codeAttributeSecurityContext === codeAttributeSecurityContext\r\n && item.idFilter1 === idFilter1;\r\n });\r\n }\r\n\r\n /**\r\n * Track new idAttributeValues via a negative number for internal tracking. Remove this fake id prior to post.\r\n *\r\n * @returns {number}\r\n */\r\n getUniqueId(): number {\r\n return --this.uniqueId;\r\n }\r\n}\r\n","import {Injectable} from \"@angular/core\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\n\r\nimport {BehaviorSubject} from \"rxjs\";\r\nimport { parse } from \"date-fns\";\r\n\r\n\r\n@Injectable()\r\nexport class DateUtil {\r\n \r\n static dateComparator(date1, date2) {\r\n var date1Number = DateUtil.monthToComparableNumber(date1);\r\n var date2Number = DateUtil.monthToComparableNumber(date2);\r\n if (date1Number === null && date2Number === null) {\r\n return 0;\r\n }\r\n if (date1Number === null) {\r\n return -1;\r\n }\r\n if (date2Number === null) {\r\n return 1;\r\n }\r\n return date1Number - date2Number;\r\n }\r\n\r\n static dateTimeComparator(date1, date2){\r\n var date1Number = DateUtil.daytimeToComparableNumber(date1);\r\n var date2Number = DateUtil.daytimeToComparableNumber(date2);\r\n if (date1Number === null && date2Number === null) {\r\n return 0;\r\n }\r\n if (date1Number === null) {\r\n return -1;\r\n }\r\n if (date2Number === null) {\r\n return 1;\r\n }\r\n return date1Number - date2Number;\r\n }\r\n\r\n static monthToComparableNumber(date) {\r\n if (date === undefined || date === null || date.length !== 10) {\r\n return null;\r\n }\r\n \r\n var newDate = parse(date, \"MM/dd/yyyy\", new Date());\r\n \r\n if(Number.isNaN(newDate.getTime())){//parse error\r\n return null;\r\n }\r\n return newDate.getTime();\r\n }\r\n\r\n static daytimeToComparableNumber(date) {\r\n if (date === undefined || date === null || date === \"\") {\r\n return null;\r\n }\r\n\r\n var newDate = parse(date, \"MM/dd/yyyy HH:mm:ss\", new Date());\r\n if(Number.isNaN(newDate.getTime())){//parse error\r\n return null;\r\n }\r\n \r\n return newDate.getTime();\r\n }\r\n}\r\n\r\n\r\n","import {\r\n ElementRef, TemplateRef, EventEmitter, Input, isDevMode, Output, Renderer2, ViewChild, ViewChildren, OnInit, OnDestroy, Inject, Directive, QueryList\r\n} from \"@angular/core\";\r\n\r\nimport {DatePipe} from '@angular/common'\r\n\r\nimport { BehaviorSubject, Subscription} from \"rxjs\";\r\nimport {first} from \"rxjs/operators\";\r\n\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {AttributeValue} from \"../model/attribute-value.entity\";\r\nimport {AttributeChoice} from \"../model/attribute-choice.entity\";\r\nimport {AttributeLongText} from \"../model/attribute-long-text.entity\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\nimport {DictionaryEntriesDTO} from \"../model/dictionary-entries.dto\";\r\nimport {DateUtil} from \"../date/date-util\";\r\nimport {NativeSelectComponent} from \"@huntsman-cancer-institute/input\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {GridApi, RowDoubleClickedEvent, RowNode, RowSelectedEvent, AgGridEvent, GridSizeChangedEvent, ModelUpdatedEvent} from \"ag-grid-community\";\r\n\r\n/**\r\n * The base class for an attribute. Attributes are iterated over by container. These may be in traditional absolute\r\n * positioning, flex positioning, or an edit mode as a column in a modal. Regardless of the template, the fundamental\r\n * needs of setting up the attribute values and persisting data are the same. So this class provides base functionality\r\n * and the components that extend it provide the template and may also extend the functionality.\r\n *\r\n * Types:\r\n * LINE\r\n * NLP_LINK\r\n * DICT\r\n * GA\r\n * LABEL\r\n * DT\r\n * AC\r\n * TXT\r\n * D\r\n * S\r\n * I\r\n * CB\r\n * B\r\n * N\r\n * EB\r\n */\r\n@Directive({\r\n selector: \"hci-attribute-base\"\r\n }\r\n)\r\nexport class AttributeBase implements OnInit, OnDestroy {\r\n\r\n @Input() attribute: GraphicalAttribute;\r\n @Input() internalValues: boolean = false;\r\n @Input() editInline: boolean = true;\r\n @Input() groupAttributeRowId: number = undefined;\r\n\r\n @Output() resortColumns: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n @ViewChild(\"inputRef\", {static: false}) inputRef: ElementRef;\r\n @ViewChild(\"nativeSelectRef\", {static: false}) nativeSelectRef: NativeSelectComponent;\r\n\r\n attributeValues: AttributeValue[] = [];\r\n attributeChoices: AttributeChoice[];\r\n\r\n childAttributes: GraphicalAttribute[];\r\n gridData: any[];\r\n gridColumns: any[];\r\n\r\n //Used for the edit group row template\r\n editGroupAttributeRowId: number;\r\n editGroupRowAttributes: GraphicalAttribute[];\r\n\r\n dictionaryEntries: any[];\r\n\r\n width: number = 0;\r\n\r\n attributeService: AttributeService;\r\n elementRef: ElementRef;\r\n renderer: Renderer2;\r\n\r\n gridApi: GridApi;\r\n\r\n gridOptions = {\r\n headerHeight: 23,\r\n rowHeight: 23,\r\n rowStyle: {\r\n 'font-family': 'Prompt, sans-serif',\r\n 'color': '#3d7a99'\r\n },\r\n enableCellTextSelection: true,\r\n ensureDomOrder: true,\r\n suppressColumnVirtualisation: false\r\n };\r\n\r\n subscriptions: Subscription = new Subscription();\r\n\r\n constructor(attributeService: AttributeService, elementRef: ElementRef, renderer: Renderer2, private modalService: NgbModal) {\r\n this.attributeService = attributeService;\r\n this.elementRef = elementRef;\r\n this.renderer = renderer;\r\n }\r\n\r\n /**\r\n * Get any attribute values for this attribute. If a complex attribute like a grid, set it up.\r\n */\r\n ngOnInit(): void {\r\n this.init();\r\n\r\n this.subscriptions.add(this.attributeService.getContainerUpdated().subscribe((updated: boolean) => {\r\n this.init();\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n onGridReady(params : any) {\r\n this.gridApi = params.api;\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n\r\n onModelUpdated(_event: ModelUpdatedEvent) {\r\n if (this.gridApi) {\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n }\r\n\r\n onGridSizeChanged(_event: GridSizeChangedEvent) {\r\n if (this.gridApi) {\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n }\r\n\r\n /**\r\n * Pulls the attribute values associated with this attribute and performs any specialized initialization such as for\r\n * the grid or multi choice.\r\n */\r\n init(): void {\r\n if (isDevMode()) {\r\n console.debug(\"Attribute.init: \" + this.attribute.idAttribute);\r\n }\r\n\r\n this.gridData = undefined;\r\n this.gridColumns = undefined;\r\n this.attributeChoices = undefined;\r\n this.width = this.attributeService.getWidth();\r\n\r\n if (!this.internalValues) {\r\n this.attributeValues = this.attributeService.getAttributeValues(this.attribute.idAttribute, this.groupAttributeRowId);\r\n }\r\n\r\n if (this.attributeValues.length === 0 && this.attribute.codeAttributeDataType !== \"GA\" && this.attribute.isMultiValue !== \"Y\") {\r\n // TODO: Decide when to persist this to get the idAttributeValue.\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: this.attribute.codeAttributeDataType,\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttribute: this.attribute.idAttribute,\r\n idGroupAttribute: this.attribute.idGroupAttribute,\r\n groupAttributeRowId: this.groupAttributeRowId\r\n });\r\n }\r\n\r\n if (this.attribute.codeAttributeDataType === \"GA\") {\r\n this.initializeGrid();\r\n } else if (this.attribute.codeAttributeDataType === \"AC\") {\r\n this.initializeAttributeChoices();\r\n } else if (this.attribute.codeAttributeDataType === \"TXT\" && !this.attributeValues[0].valueLongText) {\r\n this.attributeValues[0].valueLongText = <AttributeLongText>{\r\n idLongText: undefined,\r\n textData: undefined\r\n };\r\n }\r\n else if (this.attribute.codeAttributeDataType === \"DICT\") {\r\n this.loadDictionaryEntries(this.attribute, this.attributeValues, this.groupAttributeRowId);\r\n }\r\n else if (this.attribute.codeAttributeDataType === \"DT\") {\r\n //Make a proper date for the date time component\r\n this.attributeValues[0].date = new Date(this.attributeValues[0].valueDateTime);\r\n }\r\n\r\n }\r\n\r\n\r\n loadDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId: number) {\r\n //Adding this to subscriptions is probably unnecessary, since the first() will unsubscribe. We only get one value.\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, values, groupAttributeRowId).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n this.dictionaryEntries = dto.entries;\r\n\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.initializeMultiDictEntries();\r\n }\r\n\r\n //If there is a referenced attribute this means this attribute is filtered by another attribute.\r\n if (dto.referencedAttribute) {\r\n //Need to subscribe to attribute pushes, in order to update our FILTERED DICTIONARY when the referenced attribute was changed\r\n this.subscriptions.add(this.attributeService.getAttributeValuePushedSubject().subscribe((av: AttributeValue) => {\r\n //If it is the referenced attribute, (and for the same row if this is a grid row) we need to update the dictionary entries\r\n if (av.idAttribute === dto.referencedAttribute.idAttribute\r\n && ((av.groupAttributeRowId == null && this.groupAttributeRowId == null) || av.groupAttributeRowId === this.groupAttributeRowId)) {\r\n\r\n //Make another call to get the dictionary entries\r\n //Note that when passing in the referenceAttributeValue, the resulting DTO won't contain a referencedAttribute. A second subscription won't be created.\r\n this.reloadFilteredDictionaryEntries(attribute, values, groupAttributeRowId, av);\r\n }\r\n }));\r\n }\r\n }));\r\n }\r\n\r\n reloadFilteredDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId: number, referencedAttributeValue: AttributeValue) {\r\n //Adding this to subscriptions is probably unnecessary, since the first() will unsubscribe. We only get one value.\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, values, groupAttributeRowId, referencedAttributeValue).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n this.dictionaryEntries = dto.entries;\r\n\r\n //Multi\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.initializeMultiDictEntries();\r\n\r\n //Probably need to slice out multi values that don't apply\r\n this.deleteFilteredOutDictionaryValues();\r\n }\r\n //Single\r\n else {\r\n //Maybe need to clear out the value if it no longer applies\r\n if (! dto.entriesIncludeSelectedValue) {\r\n this.valueDictChange(undefined);\r\n }\r\n }\r\n }));\r\n }\r\n\r\n deleteFilteredOutDictionaryValues() {\r\n //Iterate existing values\r\n for (let attributeValue of this.attributeValues) {\r\n let applicable:boolean = false;\r\n\r\n //Does it exist in new dicationryEntries?\r\n for (let entry of this.dictionaryEntries) {\r\n if (attributeValue.valueIdDictionary && entry.value === attributeValue.valueIdDictionary) {\r\n //keep\r\n applicable = true;\r\n break;\r\n }\r\n }\r\n\r\n if (! applicable) {\r\n //Get rid of values that no longer apply\r\n this.attributeService.spliceAttributeValueDict(this.attribute, attributeValue.valueIdDictionary)\r\n }\r\n }\r\n }\r\n\r\n initializeMultiDictEntries() {\r\n for (let entry of this.dictionaryEntries) {\r\n entry.checked = false;\r\n\r\n for (let attributeValue of this.attributeValues) {\r\n if (attributeValue.valueIdDictionary && entry.value === attributeValue.valueIdDictionary) {\r\n entry.checked = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set a transient value on the attributeChoice to keep track of selected values.\r\n */\r\n initializeAttributeChoices() {\r\n this.attributeChoices = this.attribute.attributeChoices.slice();\r\n\r\n for (let attributeChoice of this.attributeChoices) {\r\n attributeChoice.value = false;\r\n\r\n for (let attributeValue of this.attributeValues) {\r\n if (attributeValue.valueAttributeChoice && attributeChoice.idAttributeChoice === attributeValue.valueAttributeChoice.idAttributeChoice) {\r\n attributeChoice.value = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * If the attribute is a grid, find its children attributes which make up the columns and generate data based on all\r\n * the attribute values by their groupAttributeRowId.\r\n */\r\n initializeGrid(): void {\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid\");\r\n }\r\n\r\n let columns: any[] = [];\r\n let data: any[] = [];\r\n\r\n if (!this.attribute.attributes) {\r\n return;\r\n }\r\n\r\n this.childAttributes = <GraphicalAttribute[]>this.attribute.attributes.filter((attribute: GraphicalAttribute) => {\r\n return attribute[\"tabOrder\"] !== undefined || attribute[\"w\"] !== undefined;\r\n }).sort((a: GraphicalAttribute, b: GraphicalAttribute) => {\r\n if (a.tabOrder < b.tabOrder) {\r\n return -1;\r\n } else if (a.tabOrder > b.tabOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Grid Attributes: \" + this.childAttributes.length);\r\n }\r\n\r\n this.initializeGridColumns(this.childAttributes, columns);\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Columns: \" + columns.length);\r\n console.debug(columns);\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n attributeValues: \" + this.attributeValues.length);\r\n console.debug(this.attributeValues);\r\n }\r\n\r\n\r\n let sortedRowValues = this.attributeValues.filter((attributeValue) => attributeValue.idGroupAttribute = this.attribute.idAttribute)\r\n .sort((a: AttributeValue, b: AttributeValue) => {\r\n if (a.groupAttributeRowId < b.groupAttributeRowId) {\r\n return -1;\r\n } else if (a.groupAttributeRowId > b.groupAttributeRowId) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n let n: number = 0;\r\n for (let datum of sortedRowValues) {\r\n if (datum.groupAttributeRowId > n) {\r\n n = datum.groupAttributeRowId;\r\n data.push({\r\n groupAttributeRowId: datum.groupAttributeRowId\r\n });\r\n }\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Data: \" + data.length);\r\n }\r\n\r\n this.initializeGridValues(data, sortedRowValues);\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: Data\");\r\n console.debug(data);\r\n }\r\n\r\n this.gridColumns = columns;\r\n this.gridData = data;\r\n }\r\n\r\n /**\r\n * Generate a column array based on the grouped attributes within the grid.\r\n *\r\n * @param {Attribute[]} attributes\r\n * @param {any[]} columns\r\n */\r\n initializeGridColumns(attributes: GraphicalAttribute[], columns: any[]) {\r\n\r\n /*\r\n columns.push({\r\n field: \"groupAttributeRowId\", isKey: true, visible: false\r\n });*/\r\n\r\n for (const [i, attribute] of attributes.entries()) {\r\n let column: any = {\r\n field: attribute.attributeName,\r\n headerName: attribute.displayName,\r\n editable: false,\r\n sortable: true,\r\n resizable: true,\r\n filter: false,\r\n width: attribute.w,\r\n };\r\n\r\n // the last column should auto fill the remaining space\r\n if (attribute.w && i < attributes.length - 1) {\r\n column.suppressSizeToFit = true;\r\n }\r\n\r\n if (attribute.codeAttributeDataType === \"D\") {\r\n column.comparator = DateUtil.dateComparator;\r\n }\r\n else if (attribute.codeAttributeDataType === \"DT\") {\r\n column.comparator = DateUtil.dateTimeComparator;\r\n }\r\n\r\n columns.push(column);\r\n }\r\n }\r\n\r\n /**\r\n * After the columns are created, assigned\r\n *\r\n * @param {any[]} data\r\n */\r\n initializeGridValues(data: any[], attributeValues: AttributeValue[]): void {\r\n for (let datum of attributeValues) {\r\n let attribute: Attribute = this.childAttributes.filter((attribute: Attribute) => {\r\n return attribute.idAttribute === datum.idAttribute;\r\n })[0];\r\n\r\n //Make a rowValue object with values for each attribute of the row\r\n let rowValue: any = data.find((row) => row.groupAttributeRowId === datum.groupAttributeRowId);\r\n if (! rowValue) {\r\n rowValue = {groupAttributeRowId: datum.groupAttributeRowId};\r\n data.push(rowValue);\r\n }\r\n\r\n if (!attribute) {\r\n console.error(\"Attribute.initializeGrid: idAttribute \" + datum.idAttribute + \" not found.\");\r\n continue;\r\n }\r\n\r\n if (attribute.codeAttributeDataType === \"DT\") {\r\n rowValue[attribute.attributeName] = new DatePipe(\"en-US\").transform(new Date(datum.valueDateTime), \"M/d/yy, h:mm:ss a\");\r\n }\r\n else if (attribute.codeAttributeDataType === \"AC\" && attribute.isMultiValue === \"N\") {\r\n if (datum.valueAttributeChoice) {\r\n rowValue[attribute.attributeName] = datum.valueAttributeChoice.choice;\r\n }\r\n }\r\n else if (attribute.codeAttributeDataType === \"AC\" && attribute.isMultiValue === \"Y\") {\r\n //Concatenated display\r\n if (rowValue[attribute.attributeName]) {\r\n rowValue[attribute.attributeName] = rowValue[attribute.attributeName] + \", \" + datum.valueAttributeChoice.choice;\r\n } else {\r\n rowValue[attribute.attributeName] = datum.valueAttributeChoice.choice;\r\n }\r\n }\r\n else if (attribute.codeAttributeDataType === \"DICT\") {\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, attributeValues, datum.groupAttributeRowId).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n let entry = dto.entries.find((entry:any) => entry.value === datum.valueIdDictionary);\r\n\r\n if (entry) {\r\n rowValue[attribute.attributeName] = dto.entries.find((entry:any) => entry.value === datum.valueIdDictionary).display;\r\n if (this.gridApi) {\r\n this.gridApi.refreshCells();\r\n }\r\n }\r\n }));\r\n }\r\n else if (attribute.codeAttributeDataType === \"S\" || attribute.codeAttributeDataType === \"B\" || attribute.codeAttributeDataType === \"EB\" || attribute.codeAttributeDataType === \"CB\") {\r\n rowValue[attribute.attributeName] = datum.valueString;\r\n }\r\n else {\r\n rowValue[attribute.attributeName] = datum.value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * For override.\r\n */\r\n refresh(): void {\r\n if (isDevMode()) {\r\n console.debug(\"Attribute.refresh: \" + this.attribute.idAttribute);\r\n }\r\n }\r\n\r\n\r\n\r\n valueStringChange(value: any): void {\r\n if (value === \"\") {\r\n value = undefined;\r\n }\r\n\r\n this.attributeValues[0].valueString = value;\r\n this.attributeValues[0].value = value;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueCheckboxChange(event: any) {\r\n if (event.target.checked) {\r\n this.attributeValues[0].valueString = \"Y\";\r\n }\r\n else {\r\n this.attributeValues[0].valueString = \"N\";\r\n }\r\n this.attributeValues[0].value = this.attributeValues[0].valueString;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueIntegerChange(value: any): void {\r\n this.attributeValues[0].valueInteger = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueNumericChange(value: any): void {\r\n this.attributeValues[0].valueNumeric = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueDictChange(value: any): void {\r\n this.attributeValues[0].valueIdDictionary = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueDateChange(value: any): void {\r\n this.attributeValues[0].valueDateTime = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueTextChange(value: any): void {\r\n if (this.attributeValues[0].valueLongText) {\r\n this.attributeValues[0].valueLongText.textData = value;\r\n } else {\r\n this.attributeValues[0].valueLongText = <AttributeLongText>{\r\n idLongText: undefined,\r\n textData: value\r\n };\r\n }\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueChoiceChange(value: any): void {\r\n this.attributeValues[0].valueAttributeChoice = this.attributeChoices.find((attr) => attr.idAttributeChoice === value);\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueMultiChoiceChange(attributeChoice: any): void {\r\n attributeChoice.value = !attributeChoice.value;\r\n\r\n //Remove\r\n if (!attributeChoice.value) {\r\n this.attributeService.spliceAttributeValueChoice(this.attribute, attributeChoice);\r\n }\r\n //Add\r\n else {\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: \"AC\",\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttributeValueSet: this.attributeService.getAttributeValueSet().getValue().idAttributeValueSet,\r\n idAttribute: this.attribute.idAttribute,\r\n valueAttributeChoice: attributeChoice,\r\n groupAttributeRowId: this.groupAttributeRowId,\r\n idGroupAttribute: this.attribute.idGroupAttribute\r\n });\r\n\r\n this.attributeService.pushAttributeValueMultiChoice(this.attributeValues[this.attributeValues.length - 1]);\r\n }\r\n }\r\n\r\n valueMultiDictChange(entry: any): void {\r\n entry.checked = !entry.checked;\r\n\r\n //Remove\r\n if (!entry.checked) {\r\n this.attributeService.spliceAttributeValueDict(this.attribute, entry.value);\r\n }\r\n //Add\r\n else {\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: \"DICT\",\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttributeValueSet: this.attributeService.getAttributeValueSet().getValue().idAttributeValueSet,\r\n idAttribute: this.attribute.idAttribute,\r\n valueIdDictionary: entry.value,\r\n groupAttributeRowId: this.groupAttributeRowId,\r\n idGroupAttribute: this.attribute.idGroupAttribute\r\n });\r\n\r\n this.attributeService.pushAttributeValueMultiDict(this.attributeValues[this.attributeValues.length - 1]);\r\n }\r\n }\r\n\r\n\r\n addGridRow(modal: TemplateRef<any>, idGroupAttribute: number) {\r\n console.log(\"add grid row: \" + idGroupAttribute);\r\n\r\n //Get a negative ID, so we know this is a new row\r\n this.editGroupAttributeRowId = this.attributeService.getUniqueId();\r\n this.editGroupRowAttributes = this.childAttributes;\r\n\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.saveGridRow(idGroupAttribute);\r\n } else if (result === \"Cancel\") {\r\n this.cancelEditCodGridRow();\r\n }\r\n }, (reason) => {});\r\n }\r\n\r\n editGridRow(modal: TemplateRef<any>, idGroupAttribute: number, event: RowDoubleClickedEvent) {\r\n //EditInline is actually the ONLY way this can be editable, so this is really whether the grid is editable, at all\r\n if (this.editInline && !(this.attribute.isActive === 'N')) {\r\n this.editGroupAttributeRowId = event.data.groupAttributeRowId;\r\n this.editGroupRowAttributes = this.childAttributes;\r\n\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.saveGridRow(idGroupAttribute);\r\n } else if (result === \"Cancel\") {\r\n this.cancelEditCodGridRow();\r\n }\r\n }, (reason) => {});\r\n }\r\n }\r\n\r\n removeGridRow(idGroupAttribute: number) {\r\n console.log(\"remove grid row: \" + idGroupAttribute);\r\n let selectedColumns: RowNode[] = this.gridApi.getSelectedNodes();\r\n\r\n if (selectedColumns.length > 0) {\r\n this.attributeService.deleteGridRowAttributeValues(idGroupAttribute, selectedColumns[0].data.groupAttributeRowId);\r\n }\r\n }\r\n\r\n cancelEditCodGridRow() {\r\n this.attributeService.clearUpdatedGridRowAttributeValues(this.editGroupAttributeRowId);\r\n this.editGroupRowAttributes = [];\r\n this.editGroupAttributeRowId = undefined;\r\n }\r\n\r\n\r\n /**\r\n * Values for a new grid row are stored separately. This function will add that data to the current grid data and\r\n * push the values to the service.\r\n */\r\n saveGridRow(idGroupAttribute: number): void {\r\n console.log(\"save grid row\");\r\n\r\n this.attributeService.saveGridRowAttributeValues(idGroupAttribute, this.editGroupAttributeRowId);\r\n\r\n this.editGroupAttributeRowId = undefined;\r\n this.editGroupRowAttributes = [];\r\n }\r\n\r\n private comboFilterValueGetter(params): any {\r\n let value = params.data[params.colDef.field];\r\n if (value) {\r\n let option = ((params.colDef as any).selectOptions as any[]).find((entry) => (entry[params.colDef.selectOptionsValueField] === value));\r\n return option ? option[params.colDef.selectOptionsDisplayField] : \"\";\r\n }\r\n return \"\";\r\n }\r\n}\r\n","import {\r\n Component,\r\n ElementRef,\r\n Renderer2\r\n} from '@angular/core';\r\n\r\nimport {NgbModal} from '@ng-bootstrap/ng-bootstrap';\r\nimport {AttributeBase} from './attribute-base';\r\nimport {AttributeService} from '../services/attribute.service';\r\n\r\n/**\r\n * This component is specifically designed to exist in a modal for editing.\r\n * This is different from the flex attribute because components such as the grid need extra configuration for editing.\r\n */\r\n@Component(\r\n {\r\n selector: 'hci-attribute-edit',\r\n template:\r\n `\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n\r\n <div *ngIf=\"(attribute.h == undefined || (attribute.h && attribute.h <= 25))\" class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"(attribute.h && attribute.h > 25)\" class=\"d-flex col-md-6\">\r\n <textarea\r\n #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n style=\"width: 500px; height: 125px; resize: none;\"\r\n >\r\n </textarea>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n\r\n <textarea\r\n #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (ngModelChange)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n style=\"width: 500px; height: 125px; resize: none;\"\r\n >\r\n </textarea>\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueNumeric\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueInteger\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n matInput\r\n class=\"custom-input-text\"\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\"\r\n >\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n matInput\r\n class=\"custom-input-text\"\r\n name=\"valueDateTime\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-edit-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-edit-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select [ngModel]=\"attributeValues[0].valueString\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select [ngModel]=\"attributeValues[0].valueString\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"attributeValues[0].valueString === 'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column col-md-6\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n class=\"form-check-input m-0 checkbox mt-auto mb-auto me-2\" attr.aria-label=\"hci-ng-attribute-edit-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{attributeChoice.choice}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column col-md-6\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-edit-input-dictionary-choice-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{entry.display}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-12\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div style=\"margin-left: auto;\">\r\n <button class=\"btn-ga\" (click)=\"addGridRow(editGridModal, attribute.idAttribute)\">\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n <button class=\"btn-ga\" (click)=\"removeGridRow(attribute.idAttribute)\">\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex col-md-12\">\r\n <ag-grid-angular #gridAttribute\r\n class=\"ag-theme-alpine\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" (click)=\"close('Save')\">Save</button>\r\n <button class=\"btn btn-primary\" (click)=\"close('Cancel')\">Cancel</button>\r\n </div>\r\n </ng-template>\r\n `,\r\n styles: [\r\n `\r\n .hci-cod button.mat-icon-button.mat-button-base {\r\n height: 20px;\r\n width: 20px;\r\n line-height: unset;\r\n }\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n input[type=\"checkbox\"].form-check-input {\r\n min-width: 16px;\r\n min-height: 16px;\r\n }\r\n\r\n input.custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n `\r\n ]\r\n }\r\n)\r\nexport class AttributeEditComponent extends AttributeBase {\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n // dictionaryEndpoint = this.attributeService.dictionaryEndpoint;\r\n\r\n constructor(attributeService: AttributeService, elementRef: ElementRef, renderer: Renderer2, modalService: NgbModal) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n init(): void {\r\n super.init();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n }\r\n }\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Renderer2,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\n\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {AttributeBase} from \"./attribute-base\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {NativeSelectComponent} from \"@huntsman-cancer-institute/input\";\r\n\r\n/**\r\n * The attribute for absolute positioning. This component has its width, height, x and y positioning set based upon\r\n * the attribute definition.\r\n */\r\n@Component(\r\n {\r\n selector: \"hci-attribute-absolute\",\r\n encapsulation: ViewEncapsulation.None,\r\n template:\r\n `\r\n <div class=\"drag-select\" style=\"\"></div>\r\n\r\n <!-- Line -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LINE'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-line i-height\">\r\n <div class=\"d-flex cod-line me-1 mt-auto mb-auto flex-shrink-0\"></div>\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex me-1 cod-label flex-shrink-0\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex cod-line grow mt-auto mb-auto\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Label -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LABEL'\">\r\n <div #inputRef #attributeRef\r\n class=\"d-flex flex-column\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-label mt-auto mb-auto\">\r\n {{attribute.displayName}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-s i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"(attribute.h <= 25)\" class=\"d-flex flex-grow-1\">\r\n <input\r\n #inputRef\r\n type=\"text\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\"attr.aria-label=\"hci-ng-attribute-absolute-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n <div *ngIf=\"(attribute.h > 25)\" class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-txt i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (ngModelChange)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-cb i-height align-items-center\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-right-label\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div #inputRef class=\"d-flex flex-grow-1 align-items-center me-1\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-absolute-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-n i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueNumeric\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-i i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueInteger\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-d i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 calendar-container\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dt i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDateTime\"\r\n class=\"form-control custom-input-text\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-absolute-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-b i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-eb i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\">No</option>\r\n <option [ngValue]=\"'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-n i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y i-height\"\r\n style=\"height: inherit;\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column y-auto\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-absolute-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{ attributeChoice.choice }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y i-height\"\r\n style=\"height: inherit;\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column y-auto\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-absolute-input-dictionary-multiple-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{ entry.display }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dict i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef class=\"d-flex flex-column cod-type-ga i-height\">\r\n <div *ngIf=\"attribute.idAttribute\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"editInline\" style=\"margin-left: auto;\" class=\"ps-2 pb-2\">\r\n\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"addGridRow(editGridModal, attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"removeGridRow(attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <ag-grid-angular #gridComponent\r\n class=\"ag-theme-balham\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled)\"\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Save')\"\r\n >\r\n Save\r\n </button>\r\n\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Cancel')\"\r\n >Cancel\r\n </button>\r\n </div>\r\n </ng-template>\r\n `\r\n ,\r\n styles: [\r\n `\r\n .hci-cod button.mat-icon-button.mat-button-base {\r\n height: 20px;\r\n width: 20px;\r\n line-height: unset;\r\n }\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .calendar-container {\r\n float: left;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 1rem;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n .cod-type-s .custom-input-text, .cod-type-n .custom-input-text,\r\n .cod-type-i .custom-input-text, .cod-type-txt .custom-input-text,\r\n .cod-type-d .custom-input-text, .cod-type-dt .custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n `\r\n ]\r\n }\r\n)\r\nexport class AttributeAbsoluteComponent extends AttributeBase {\r\n\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n @ViewChild('nativeSelectRef', {static: true})\r\n nativeSelectComponent: NativeSelectComponent;\r\n\r\n constructor(\r\n attributeService: AttributeService,\r\n elementRef: ElementRef,\r\n renderer: Renderer2,\r\n modalService: NgbModal,\r\n private changeDetectorRef: ChangeDetectorRef\r\n ) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n if (this.editInline) {\r\n this.renderer.listen(this.elementRef.nativeElement, \"mousemove\", (event) => this.onMouseMove(event));\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.refresh();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n\r\n /**\r\n * In the absolute case, upon refresh reset the position and size of the attribute.\r\n */\r\n refresh(): void {\r\n super.refresh();\r\n\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"position\", \"absolute\");\r\n\r\n if (this.attribute.x !== undefined) {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"left\", this.attribute.x + \"px\");\r\n }\r\n if (this.attribute.y !== undefined) {\r\n if (this.attribute.codeAttributeDataType.toUpperCase() === \"LINE\") {\r\n // It appears the legacy metabuilder offset lines by 8 pixels\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"top\", (this.attribute.y - 8) + \"px\");\r\n } else {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"top\", this.attribute.y + \"px\");\r\n }\r\n }\r\n\r\n // Checkboxes don't need a width, the select border should be the size of its label\r\n if (this.attribute.w !== undefined && this.attribute.codeAttributeDataType.toUpperCase() !== \"CB\") {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"width\", this.attribute.w + \"px\");\r\n }\r\n\r\n if (this.attribute.codeAttributeDataType === \"LINE\") {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"height\", \"16px\");\r\n } else if (this.attribute.h !== undefined) {\r\n if (!this.editInline) {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"height\", this.attribute.h + \"px\");\r\n }\r\n if (this.inputRef && this.inputRef.nativeElement) {\r\n this.renderer.setStyle(this.inputRef.nativeElement, \"height\", this.attribute.h + \"px\");\r\n }\r\n if (this.nativeSelectRef) {\r\n this.nativeSelectRef.setHeight(this.attribute.h);\r\n }\r\n\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', this.attribute.h + 'px');\r\n }\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Add cursor styling when the mouse is over the selected attribute.\r\n *\r\n * @param {MouseEvent} event\r\n */\r\n onMouseMove(event: MouseEvent): void {\r\n if (this.elementRef.nativeElement.classList.contains(\"selected\")) {\r\n let sx: number = this.elementRef.nativeElement.getBoundingClientRect().left;\r\n let sy: number = this.elementRef.nativeElement.getBoundingClientRect().top;\r\n\r\n if (Math.abs(event.clientX - (sx + this.elementRef.nativeElement.offsetWidth)) <= 10) {\r\n this.renderer.addClass(this.elementRef.nativeElement, \"e-resize\");\r\n return;\r\n } else if (Math.abs(event.clientY - (sy + this.elementRef.nativeElement.offsetHeight)) <= 6) {\r\n this.renderer.addClass(this.elementRef.nativeElement, \"n-resize\");\r\n return;\r\n }\r\n }\r\n\r\n this.renderer.removeClass(this.elementRef.nativeElement, \"e-resize\");\r\n this.renderer.removeClass(this.elementRef.nativeElement, \"n-resize\");\r\n }\r\n}\r\n","import {Component, ElementRef, Inject, Renderer2, ViewEncapsulation} from \"@angular/core\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\n\r\n\r\nimport {AttributeBase} from \"./attribute-base\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n/**\r\n * The view for attributes organized in a flex layout. This will arrange all attributes in a four column layout\r\n * with grids taking up all 12 columns. The attributes here will fill the this parent component which defines the\r\n * column size.\r\n */\r\n@Component({\r\n selector: \"hci-attribute-flex\",\r\n encapsulation: ViewEncapsulation.None,\r\n template: `\r\n <!-- Line -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LINE'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-line\">\r\n <div class=\"d-flex cod-line me-1 mt-auto mb-auto flex-shrink-0\"></div>\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1 flex-shrink-0\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex cod-line grow mt-auto mb-auto\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Label -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LABEL'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-label\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-s\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{ attribute.displayName }}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"text\"\r\n [(ngModel)]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-txt\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (change)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-cb\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-flex-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-n\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [(ngModel)]=\"attributeValues[0].valueNumeric\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n\t\t\t\t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-i\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [(ngModel)]=\"attributeValues[0].valueInteger\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n\t\t\t\t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-d\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dt\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDateTime\"\r\n class=\"form-control custom-input-text\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-flex-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-b\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-eb\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"attributeValues[0].valueString === 'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-n\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n \t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 flex-column y-auto\" style=\"max-height: 125px; row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-flex-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{attributeChoice.choice}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 flex-column y-auto\" style=\"max-height: 125px; row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-flex-input-dictionary-choice-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{entry.display}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dict\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef class=\"d-flex flex-column cod-type-ga\">\r\n <div *ngIf=\"attribute.idAttribute\" class=\"d-flex cod-top-label mr-1\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"editInline\" style=\"margin-left: auto;\">\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"addGridRow(editGridModal, attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"removeGridRow(attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <ag-grid-angular #gridAttribute\r\n class=\"ag-theme-alpine\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled)\"\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Save')\"\r\n >\r\n Save\r\n </button>\r\n\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Cancel')\"\r\n >\r\n Cancel\r\n </button>\r\n </div>\r\n </ng-template>\r\n `\r\n ,\r\n styles: [`\r\n \t.hci-cod button.mat-icon-button.mat-button-base {\r\n \theight: 20px;\r\n \twidth: 20px;\r\n \tline-height: unset;\r\n \t}\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n .cod-type-s .custom-input-text, .cod-type-txt .custom-input-text,\r\n .cod-type-n .custom-input-text, .cod-type-i .custom-input-text,\r\n .cod-type-d .custom-input-text, .cod-type-dt .custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n `]\r\n})\r\nexport class AttributeFlexComponent extends AttributeBase {\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n constructor(\r\n attributeService: AttributeService,\r\n elementRef: ElementRef,\r\n renderer: Renderer2,\r\n modalService: NgbModal\r\n ) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.refresh();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n }\r\n }\r\n\r\n /**\r\n * Flex needs to extend grid columns because we no longer want to use absolute width. Here we generate percentage\r\n * based upon the absolute width, but still use absolute width for the min width.\r\n *\r\n * @param {Attribute[]} attributes\r\n * @param {any[]} columns\r\n */\r\n initializeGridColumns(attributes: GraphicalAttribute[], columns: any[]) {\r\n super.initializeGridColumns(attributes, columns);\r\n\r\n let width: number = 0;\r\n for (let attribute of attributes) {\r\n width += attribute.w;\r\n }\r\n\r\n for (let attribute of attributes) {\r\n let widthPercent: number = Math.floor(100 * (attribute.w / width));\r\n\r\n for (let column of columns) {\r\n if (column.externalConfig && column.externalConfig.idAttribute === attribute.idAttribute) {\r\n column.minWidth = attribute.w;\r\n column.widthPercent = widthPercent;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n}\r\n","import {\r\n ChangeDetectorRef, Component, ContentChildren, ElementRef, Input, isDevMode,\r\n QueryList, Renderer2, ViewChildren, SimpleChanges, HostBinding, TemplateRef\r\n} from \"@angular/core\";\r\nimport { Subject, Subscription } from \"rxjs\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {AttributeConfiguration} from \"../model/attribute-configuration.entity\";\r\nimport {AttributeValueSet} from \"../model/attribute-value-set.entity\";\r\nimport {AttributeContainer} from \"../model/attribute-container.entity\";\r\n\r\n/**\r\n * This component should be added on to any screen that displays a container with COD content. This container\r\n * represents the one of the containers, which in turn contain attributes which display those values in the\r\n * attributeValueSet.\r\n */\r\n@Component({\r\n selector: \"hci-attribute-container\",\r\n template: `\r\n <hci-busy [getBusySubjects]=\"getBusySubjects\"></hci-busy>\r\n \r\n <ng-container *ngIf=\"attributeContainer\">\r\n <div *ngIf=\"editPopup\" [id]=\"'id-attribute-container-' + attributeContainer.idAttributeContainer + '-header'\"\r\n class=\"d-flex attribute-container-header {{'sort-order-' + attributeContainer.sortOrder}}\">\r\n <div class=\"ms-auto me-0\" (click)=\"edit(editModal, attributeContainer)\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1 y-auto\" style=\"flex: 1 1 1px;\">\r\n <div class=\"attribute-container\"\r\n [class.col-md-12]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.flex]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.flex-wrap]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.absolute]=\"!attributeContainer.isAutoLayout || attributeContainer.isAutoLayout === 'N'\">\r\n <ng-container *ngFor=\"let attribute of attributeContainer.graphicalAttributes | isGroupAttribute: false\">\r\n <ng-container *ngIf=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y' && attribute.codeAttributeDataType !== 'LINE'\">\r\n <hci-attribute-flex [id]=\"'id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n [editInline]=\"editInline\"\r\n [class.attribute]=\"true\"\r\n [class.col-4]=\"attribute.codeAttributeDataType !== 'GA' && attribute.codeAttributeDataType !== 'LINE'\"\r\n [class.col-12]=\"attribute.codeAttributeDataType === 'GA' || attribute.codeAttributeDataType === 'LINE'\"></hci-attribute-flex>\r\n </ng-container>\r\n <ng-container *ngIf=\"!attributeContainer.isAutoLayout || attributeContainer.isAutoLayout === 'N'\">\r\n <hci-attribute-absolute [id]=\"'id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n [editInline]=\"editInline\"\r\n [class.attribute]=\"true\"></hci-attribute-absolute>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{editContainer.containerName}}\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editContainer.graphicalAttributes | isGroupAttribute: false\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" (click)=\"close('Save')\">Save</button>\r\n <button class=\"btn btn-primary\" (click)=\"close('Cancel')\">Cancel</button>\r\n </div>\r\n </ng-template>\r\n `\r\n})\r\nexport class AttributeContainerComponent {\r\n @HostBinding(\"class\") classList: string = \"hci-attribute-configuration hci-cod d-flex flex-column flex-grow-1\";\r\n\r\n @Input() idAttributeValueSet: number;\r\n @Input() idAttributeConfiguration: number;\r\n @Input() idAttributeContainer: number;\r\n @Input() indexOfContainer: number;\r\n @Input() idParentObject: number;\r\n\r\n @Input() attributeContainer: AttributeContainer;\r\n @Input() attributeConfiguration: AttributeConfiguration;\r\n @Input() attributeValueSet: AttributeValueSet;\r\n \r\n @Input() editInline: boolean = true;\r\n @Input() editPopup: boolean = false;\r\n @Input() editable: boolean = true;\r\n\r\n editContainer: AttributeContainer;\r\n\r\n windowDimension: any = {};\r\n\r\n subscriptions: Subscription = new Subscription();\r\n \r\n getBusySubjects: Function = () => {\r\n let subjects: any[] = [];\r\n \r\n //subjects.push(this.attributeService.getAttributeConfigurationLoadingSubject());\r\n subjects.push(this.attributeService.getLoadingSubject());\r\n \r\n return subjects;\r\n };\r\n\r\n constructor(private attributeService: AttributeService,\r\n private elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private modalService: NgbModal) {}\r\n\r\n /**\r\n * Upon init, subscribe to the configuration and value set.\r\n */\r\n ngOnInit() {\r\n if (! this.editable) {\r\n this.editInline = false;\r\n this.editPopup = false;\r\n }\r\n \r\n this.attributeService.setAttributeConfigurationById(this.idAttributeConfiguration, this.idAttributeValueSet, this.idParentObject);\r\n\r\n this.subscriptions.add(this.attributeService.getAttributeConfigurationSubject().subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n if(attributeConfiguration) {\r\n this.attributeConfiguration = attributeConfiguration;\r\n\r\n if (this.idAttributeContainer !== undefined) {\r\n this.attributeContainer = this.getAttributeContainerById(this.idAttributeContainer);\r\n }\r\n\r\n if (this.indexOfContainer !== undefined) {\r\n if (this.attributeConfiguration.attributeContainers[this.indexOfContainer]) {\r\n this.attributeContainer = this.attributeConfiguration.attributeContainers[this.indexOfContainer];\r\n }\r\n }\r\n }\r\n }));\r\n\r\n this.subscriptions.add(this.attributeService.attributeConfigurationDimensionSubject.subscribe((windowDimension: any) => {\r\n if(windowDimension){\r\n this.windowDimension = windowDimension;\r\n }\r\n }));\r\n\r\n this.subscriptions.add(this.attributeService.getAttributeValueSet().subscribe((attributeValueSet: AttributeValueSet) => {\r\n this.attributeValueSet = attributeValueSet;\r\n\r\n if (this.attributeValueSet) {\r\n this.attributeService.notifyAttributes();\r\n }\r\n }));\r\n }\r\n\r\n @Input() set boundData(value: any) {\r\n this.attributeService.setBoundData(value);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (! this.editable) {\r\n this.editInline = false;\r\n this.editPopup = false;\r\n }\r\n \r\n if (changes.idAttributeContainer) {\r\n this.idAttributeContainer = changes.idAttributeContainer.currentValue;\r\n\r\n this.attributeContainer = this.getAttributeContainerById(this.idAttributeContainer);\r\n }\r\n\r\n if (changes.indexOfContainer) {\r\n this.indexOfContainer = changes.indexOfContainer.currentValue;\r\n if (this.attributeConfiguration && this.attributeConfiguration.attributeContainers[this.indexOfContainer]) {\r\n this.attributeContainer = this.attributeConfiguration.attributeContainers[this.indexOfContainer];\r\n }\r\n }\r\n }\r\n\r\n getAttributeService(): AttributeService {\r\n return this.attributeService;\r\n }\r\n\r\n edit(modal: TemplateRef<any>, editContainer: AttributeContainer): void {\r\n this.editContainer = editContainer;\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.attributeService.updateAttributeValueSet();\r\n } else if (result === \"Cancel\") {\r\n this.attributeService.clearUpdatedAttributeValues();\r\n }\r\n }, (reason) => {});\r\n }\r\n\r\n post(): void {\r\n this.attributeService.updateAttributeValueSet();\r\n }\r\n\r\n getAttributeContainerById(idAttributeContainer: number): AttributeContainer {\r\n if (this.attributeConfiguration) {\r\n return this.attributeConfiguration.attributeContainers.find(x => x.idAttributeContainer === idAttributeContainer);\r\n }\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {ModuleWithProviders, NgModule} from \"@angular/core\";\r\nimport {CommonModule} from \"@angular/common\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {RouterModule} from \"@angular/router\";\r\n\r\nimport {MatDatepickerModule} from \"@angular/material/datepicker\";\r\nimport {MatNativeDateModule} from \"@angular/material/core\";\r\nimport {NgxMatDatetimePickerModule, NgxMatNativeDateModule, NgxMatTimepickerModule} from \"@angular-material-components/datetime-picker\";\r\n\r\nimport {AgGridModule} from \"ag-grid-angular\";\r\nimport {NgbModule} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {DropdownModule, SelectModule} from \"@huntsman-cancer-institute/input\";\r\nimport {MiscModule} from \"@huntsman-cancer-institute/misc\";\r\n\r\nimport {IsGroupAttributePipe} from \"./pipes/is-group-attribute.pipe\";\r\nimport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\nimport {AttributeFlexComponent} from \"./components/attribute-flex.component\";\r\nimport {AttributeEditComponent} from \"./components/attribute-edit.component\";\r\nimport {AttributeDefaultComponent} from \"./components/attribute-default.component\";\r\nimport {AttributeContainerComponent} from \"./components/attribute-container.component\";\r\nimport {AttributeBase} from \"./components/attribute-base\";\r\nimport {AttributeService} from \"./services/attribute.service\";\r\nimport {DictionaryServiceModule} from \"@huntsman-cancer-institute/dictionary-service\";\r\n\r\n\r\n/**\r\n * The main @huntsman-cancer-institute/cod module. Custom components to be used by the grid are passed in here.\r\n *\r\n * @since 1.0.0\r\n */\r\n@NgModule({\r\n imports: [\r\n AgGridModule,\r\n CommonModule,\r\n FormsModule,\r\n RouterModule,\r\n NgbModule,\r\n DropdownModule,\r\n SelectModule,\r\n MiscModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule,\r\n NgxMatNativeDateModule,\r\n DictionaryServiceModule\r\n ],\r\n declarations: [\r\n AttributeBase,\r\n AttributeAbsoluteComponent,\r\n AttributeContainerComponent,\r\n AttributeFlexComponent,\r\n AttributeEditComponent,\r\n IsGroupAttributePipe\r\n ],\r\n exports: [\r\n AttributeAbsoluteComponent,\r\n AttributeFlexComponent,\r\n AttributeEditComponent,\r\n AttributeContainerComponent,\r\n IsGroupAttributePipe\r\n ]\r\n})\r\nexport class CodModule {\r\n static forRoot(): ModuleWithProviders<CodModule> {\r\n return {\r\n providers: [\r\n AttributeService\r\n ],\r\n ngModule: CodModule\r\n };\r\n }\r\n}\r\n","import {AttributeChoice} from \"./attribute-choice.entity\";\r\nimport {AttributeDictionary} from \"./attribute-dictionary.entity\";\r\nimport {AttributeLongText} from \"./attribute-long-text.entity\";\r\n\r\nexport class AttributeValue {\r\n idAttributeValue: number;\r\n idAttributeValueSet: number;\r\n idAttribute: number;\r\n codeAttributeDataType: string;\r\n valueString?: string;\r\n value?:string;\r\n valueDate?: string;\r\n valueDateTime?: string;\r\n date?: Date;\r\n valueInteger?: number;\r\n valueNumeric?: number;\r\n valueBoolean?: string;\r\n valueExtendedBoolean?: string;\r\n valueAttributeChoice?: AttributeChoice;\r\n valueIdDictionary?: string;\r\n valueLongText?: AttributeLongText;\r\n attributeDictionary?: AttributeDictionary;\r\n idGroupAttribute?: number;\r\n groupAttributeRowId?: number;\r\n extractAttributeName?: string;\r\n extractionStatus?: string;\r\n extractReportAlias?: string;\r\n extractionDate?: string;\r\n}\r\n","import {Component, forwardRef, Input} from \"@angular/core\";\r\n\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from \"@angular/forms\";\r\n\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n@Component({\r\n selector: \"hci-attribute-default\",\r\n template: `\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'S'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-string-attribute-default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'TXT'\">\r\n <textarea type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [(ngModel)]=\"value\">\r\n </textarea>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'CB'\">\r\n <input type=\"checkbox\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\"\r\n [checked]=\"value && value.toUpperCase() === 'Y'\" attr.aria-label=\"hci-ng-checkbox-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'N'\">\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-numeric-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'I'\">\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-number-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'D'\">\r\n <input type=\"date\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-date-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'DT'\">\r\n <input type=\"date\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-date-time-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'B'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option [ngValue]=\"'Y'\" [selected]=\"value && value.toUpperCase() === 'Y'\">Y</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"value && value.toUpperCase() === 'N'\">N</option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'EB'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option [ngValue]=\"'Y'\" [selected]=\"value && value.toUpperCase() === 'Y'\">Y</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"value && value.toUpperCase() === 'N'\">N</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"value && value.toUpperCase() === 'U'\">U</option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'AC' && attribute.isMultiValue.toUpperCase() === 'N'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option *ngFor=\"let attributeChoice of attribute.attributeChoices\"\r\n [ngValue]=\"attributeChoice\"\r\n [selected]=\"value && value.toUpperCase() === attributeChoice.idAttributeChoice.toString().toUpperCase()\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'AC' && attribute.isMultiValue.toUpperCase() === 'Y'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n disabled attr.aria-label=\"hci-ng-choice-multiple-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'DICT'\">\r\n <hci-native-select [(ngModel)]=\"value\"\r\n [className]=\"attribute.attributeDictionary.className\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n </hci-native-select>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'GA'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n disabled attr.aria-label=\"hci-ng-grid-attribute default-{{name}}\">\r\n </ng-container>\r\n `,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AttributeDefaultComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class AttributeDefaultComponent implements ControlValueAccessor {\r\n\r\n _value: string = \"\";\r\n\r\n @Input() id: string;\r\n @Input() name: string;\r\n @Input() attribute: GraphicalAttribute;\r\n\r\n onChange: any = (_: any) => {};\r\n onTouched: any = () => {};\r\n\r\n get value(): string {\r\n return this._value;\r\n };\r\n\r\n set value(v: string) {\r\n this.onTouched();\r\n if (v !== this.value) {\r\n this._value = v;\r\n this.onChange(v);\r\n }\r\n }\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n writeValue(v: string) {\r\n this._value = v;\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n}\r\n","\r\n/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\n/**\r\n * A barrel file for the cod package.\r\n *\r\n * @since 1.0.0\r\n */\r\n\r\nimport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\n\r\nexport {CodModule} from \"./cod.module\";\r\n\r\nexport {AttributeService} from \"./services/attribute.service\";\r\n\r\nexport {Attribute} from \"./model/attribute.entity\";\r\nexport {AttributeChoice} from \"./model/attribute-choice.entity\";\r\nexport {AttributeConfiguration} from \"./model/attribute-configuration.entity\";\r\nexport {AttributeContainer} from \"./model/attribute-container.entity\";\r\nexport {AttributeDictionary} from \"./model/attribute-dictionary.entity\";\r\nexport {AttributeValue} from \"./model/attribute-value.entity\";\r\nexport {AttributeValueGridRow} from \"./model/attribute-value-grid-row.entity\";\r\nexport {AttributeValueSet} from \"./model/attribute-value-set.entity\";\r\nexport {ExtractableFieldStatus} from \"./model/extractable-field-status.entity\";\r\nexport {AttributeConfigurationDTO} from \"./model/attribute-configuration.dto\";\r\nexport {GraphicalAttribute} from \"./model/graphical-attribute.entity\";\r\n\r\nexport {AttributeBase} from \"./components/attribute-base\";\r\nexport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\nexport {AttributeFlexComponent} from \"./components/attribute-flex.component\";\r\nexport {AttributeEditComponent} from \"./components/attribute-edit.component\";\r\nexport {AttributeDefaultComponent} from \"./components/attribute-default.component\";\r\nexport {AttributeContainerComponent} from \"./components/attribute-container.component\";\r\n\r\nexport {IsGroupAttributePipe} from \"./pipes/is-group-attribute.pipe\";\r\n\r\nexport {ATTRIBUTE_ENDPOINT} from \"./services/attribute.service\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AttributeService","i2","i3","i8.AttributeEditComponent","i4","i5.AttributeAbsoluteComponent","i6.AttributeFlexComponent","i7.AttributeEditComponent","i8.IsGroupAttributePipe"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA;;;;AAIG;MAKU,oBAAoB,CAAA;IAE/B,SAAS,CAAC,IAA0B,EAAE,WAAoB,EAAA;QACxD,IAAI,CAAC,IAAI,EAAE;AACT,YAAA,OAAO,EAAE;QACX;AAEA,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,CAAC,SAA6B,KAAI;AACnD,YAAA,IAAI,SAAS,CAAC,gBAAgB,EAAE;AAC9B,gBAAA,OAAO,WAAW;YACpB;iBAAO;gBACL,OAAO,CAAC,WAAW;YACrB;AACF,QAAA,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIT,EAAA,CAAA;AACD,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,+BAA+B,CAAC;AACxD,4BAAA,KAAK,EAAE;AACR;AACF;AACF,iBAAA;wDAKU,EAAE,EAAA,CAAA;sBAAV;gBACQ,IAAI,EAAA,CAAA;sBAAZ;gBACQ,SAAS,EAAA,CAAA;sBAAjB;;;ACzJH;;AAEG;AACH;;;;AAIG;;ACRH;;AAEG;;;;"}
1
+ {"version":3,"file":"huntsman-cancer-institute-cod.mjs","sources":["../../../projects/cod/src/pipes/is-group-attribute.pipe.ts","../../../projects/cod/src/model/pre-eval.dto.ts","../../../projects/cod/src/model/dictionary-entries.dto.ts","../../../projects/cod/src/services/attribute.service.ts","../../../projects/cod/src/date/date-util.ts","../../../projects/cod/src/components/attribute-base.ts","../../../projects/cod/src/components/attribute-edit.component.ts","../../../projects/cod/src/components/attribute-absolute.component.ts","../../../projects/cod/src/components/attribute-flex.component.ts","../../../projects/cod/src/components/attribute-container.component.ts","../../../projects/cod/src/cod.module.ts","../../../projects/cod/src/model/attribute-value.entity.ts","../../../projects/cod/src/components/attribute-default.component.ts","../../../projects/cod/src/index.ts","../../../projects/cod/src/huntsman-cancer-institute-cod.ts"],"sourcesContent":["import {Pipe, PipeTransform} from \"@angular/core\";\r\n\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n/**\r\n * A filter for attributes in a container. All attributes have the id of the container even those that belong\r\n * to a grid attribute. However, when we populate the container, we don't want to render those grid attributes.\r\n * The grid will handle those itself.\r\n */\r\n@Pipe({\r\n name: \"isGroupAttribute\",\r\n pure: false\r\n})\r\nexport class IsGroupAttributePipe implements PipeTransform {\r\n\r\n transform(list: GraphicalAttribute[], returnGroup: boolean): GraphicalAttribute[] {\r\n if (!list) {\r\n return [];\r\n }\r\n\r\n return list.filter((attribute: GraphicalAttribute) => {\r\n if (attribute.idGroupAttribute) {\r\n return returnGroup;\r\n } else {\r\n return !returnGroup;\r\n }\r\n });\r\n }\r\n}\r\n","import {Attribute} from \"./attribute.entity\";\r\n\r\nexport class PreEvalDTO {\r\n expression: string;\r\n referencedAttribute: Attribute;\r\n}","import {Attribute} from \"./attribute.entity\";\r\n\r\nexport class DictionaryEntriesDTO {\r\n entries: any[];\r\n entriesIncludeSelectedValue: boolean;\r\n referencedAttribute: Attribute;\r\n}","import {Inject, Injectable, InjectionToken, isDevMode} from \"@angular/core\";\r\nimport {HttpClient, HttpParams} from \"@angular/common/http\";\r\nimport {Router} from \"@angular/router\";\r\n\r\nimport {BehaviorSubject, forkJoin, Observable, Subject} from \"rxjs\";\r\n\r\nimport {DictionaryService} from \"@huntsman-cancer-institute/dictionary-service\";\r\n\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {AttributeChoice} from \"../model/attribute-choice.entity\";\r\nimport {AttributeValue} from \"../model/attribute-value.entity\";\r\nimport {AttributeConfiguration} from \"../model/attribute-configuration.entity\";\r\nimport {AttributeValueSet} from \"../model/attribute-value-set.entity\";\r\nimport {AttributeConfigurationDTO} from \"../model/attribute-configuration.dto\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\nimport {AttributeContainer} from \"../model/attribute-container.entity\";\r\nimport {AttributeValueGridRow} from \"../model/attribute-value-grid-row.entity\";\r\nimport {PreEvalDTO} from \"../model/pre-eval.dto\";\r\nimport {DictionaryEntriesDTO} from \"../model/dictionary-entries.dto\";\r\n\r\n\r\nexport let ATTRIBUTE_ENDPOINT = new InjectionToken<string>(\"attributeEndpoint\");\r\nexport const BOOLEAN: string[] = [\"N\", \"Y\"];\r\nexport const EXTENDED_BOOLEAN: string[] = [\"N\", \"Y\", \"U\"];\r\n\r\n/**\r\n * A service created for each attribute configuration instance. This makes calls to the backend to get the configuration\r\n * and value set. It also stores common data that different attributes might need (e.g. a list of attribute choices).\r\n */\r\n@Injectable()\r\nexport class AttributeService {\r\n\r\n newAttributeConfiguration: AttributeConfiguration;\r\n idAttributeConfiguration: number;\r\n idFilter1: number;\r\n idFilter2: number;\r\n idAttributeValueSet: number;\r\n idParentObject: number;\r\n boundData: any;\r\n\r\n attributeContextLoadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeContextListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n attributeSecurityContextListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n filter1ListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n filter2ListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n dictionaryListSubject: BehaviorSubject<any[]> = new BehaviorSubject<any[]>(undefined);\r\n\r\n\r\n postConfigurationSubject: Subject<boolean> = new Subject<boolean>();\r\n attributeConfigurationDimensionSubject: BehaviorSubject<any> = new BehaviorSubject<any>(undefined);\r\n\r\n attributeConfigurationListSubject: BehaviorSubject<AttributeConfigurationDTO[]> = new BehaviorSubject<AttributeConfigurationDTO[]>(undefined);\r\n attributeConfigurationListLoadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeConfigurationDTOSubject: BehaviorSubject<AttributeConfigurationDTO> = new BehaviorSubject<AttributeConfigurationDTO>(undefined);\r\n\r\n attributeConfigurationSubject: BehaviorSubject<AttributeConfiguration> = new BehaviorSubject<AttributeConfiguration>(undefined);\r\n attributeValueSetSubject: BehaviorSubject<AttributeValueSet> = new BehaviorSubject<AttributeValueSet>(undefined);\r\n attributeValuePushedSubject: Subject<AttributeValue> = new Subject<AttributeValue>();\r\n\r\n loadingSubject: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n\r\n attributeMap: Map<number, Attribute> = new Map<number, Attribute>();\r\n\r\n width: number;\r\n\r\n containerUpdated: Subject<boolean> = new Subject<boolean>();\r\n gridRowSaved: Subject<AttributeValueGridRow> = new Subject<AttributeValueGridRow>();\r\n gridRowDeleted: Subject<AttributeValueGridRow> = new Subject<AttributeValueGridRow>();\r\n dirty: BehaviorSubject<boolean> = new BehaviorSubject<boolean>(false);\r\n updatedAttributeValues: AttributeValue[] = [];\r\n slicedAttributeValues: AttributeValue[] = [];\r\n\r\n private uniqueId: number = 0;\r\n private _editButtonsEnabled: boolean = true; //Preserve old default\r\n\r\n constructor(private dictionaryService: DictionaryService,\r\n private http: HttpClient,\r\n private router: Router,\r\n @Inject(ATTRIBUTE_ENDPOINT) private attributeEndpoint: string) {\r\n if (isDevMode()) {\r\n console.debug(\"Created New AttributeService\");\r\n }\r\n }\r\n\r\n setBoundData(boundData: any) {\r\n this.boundData = boundData;\r\n\r\n if (this.attributeValueSetSubject.getValue()) {\r\n this.notifyAttributes();\r\n }\r\n }\r\n\r\n public get editButtonsEnabled(): boolean {\r\n return this._editButtonsEnabled;\r\n };\r\n\r\n public set editButtonsEnabled(enabled: boolean) {\r\n if (enabled !== this._editButtonsEnabled) {\r\n this._editButtonsEnabled = enabled;\r\n this.notifyAttributes();\r\n }\r\n }\r\n\r\n getAttributeValueCountByAttribute(idAttribute: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-value-count\", {params: new HttpParams().set(\"idAttribute\", idAttribute.toString())});\r\n }\r\n\r\n getAttributeValueCountByContainer(idAttributeContainer: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-value-count\", {params: new HttpParams().set(\"idAttributeContainer\", idAttributeContainer.toString())});\r\n }\r\n\r\n getDictionaryValueCount(idAttributeDictionary: number): Observable<number> {\r\n return this.http.get<number>(this.attributeEndpoint + \"attribute-dictionary-count\", {params: new HttpParams().set(\"idAttributeDictionary\", idAttributeDictionary.toString())});\r\n }\r\n\r\n fetchAttributeContext(): void {\r\n this.attributeContextLoadingSubject.next(true);\r\n\r\n forkJoin([\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeSecurityContext\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeContext\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.Filter1\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.Filter2\"),\r\n this.dictionaryService.getDictionaryEntries(\"hci.ri.attr.model.AttributeDictionary\")\r\n ]).subscribe((responses: any[]) => {\r\n\r\n this.dictionaryListSubject.next(responses[4]);\r\n this.filter1ListSubject.next(responses[2]);\r\n this.filter2ListSubject.next(responses[3]);\r\n this.attributeContextListSubject.next(responses[1]);\r\n\r\n responses[0].sort(this.sortAttributeSecurityContextList);\r\n this.attributeSecurityContextListSubject.next(responses[0]);\r\n\r\n this.attributeContextLoadingSubject.next(false);\r\n });\r\n }\r\n\r\n //Gets the dictionary entries from the map (so we don't load over and over and over for the same dictionary)\r\n getDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId?: number, referencedAttributeValue?: AttributeValue): Observable<DictionaryEntriesDTO> {\r\n let bs = new Subject<DictionaryEntriesDTO>();\r\n\r\n //Handle XPATH\r\n if (attribute.attributeDictionary.xpath) {\r\n let entriesDTO = new DictionaryEntriesDTO();\r\n let xpath = attribute.attributeDictionary.xpath;\r\n\r\n //Filtered by another dictionary? Parse to get array of all dictionary class names needed\r\n let dictClasses: string[] = [];\r\n let pos = 0;\r\n while (xpath.indexOf(\"/Dictionaries/Dictionary\", pos) >= 0) {\r\n let start = xpath.indexOf(\"/Dictionaries/Dictionary\", pos);\r\n start = xpath.indexOf(\"'\", start);\r\n let end = xpath.indexOf(\"'\", start + 1);\r\n dictClasses.push(attribute.attributeDictionary.xpath.substring(start + 1, end))\r\n pos = end;\r\n }\r\n\r\n //Potentially load multiple dictionaries\r\n let forkCalls = [];\r\n for (let className of dictClasses) {\r\n forkCalls.push(this.dictionaryService.getDictionaryEntriesAsXML(className));\r\n }\r\n\r\n //Deal with the results together\r\n forkJoin(forkCalls).subscribe((responses: any[]) => {\r\n //We're only going to do xpath on the xml for the first dictionary\r\n const parser = new DOMParser();\r\n let doc = parser.parseFromString(responses[0], \"application/xml\");\r\n\r\n //Have to evaluate sub-expression. This doesn't actually support expressions like [@x = (/xpath-sub-expression)]\r\n let secondaryXml = undefined;\r\n if (responses.length > 1) {\r\n secondaryXml = responses[1];\r\n }\r\n\r\n //Pre-evaluate and simplify XPATH\r\n let dto:PreEvalDTO = this.preEvaluateXpath(attribute.attributeDictionary.xpath, secondaryXml, groupAttributeRowId, referencedAttributeValue);\r\n\r\n //Evaluate XPATH expression\r\n let entries = [];\r\n entriesDTO.entriesIncludeSelectedValue = false;\r\n\r\n try{\r\n let xPathResult = document.evaluate(dto.expression, doc, null, XPathResult.ANY_TYPE, null);\r\n\r\n //Iterate xpath results (nodes)\r\n var node = null;\r\n while(node = xPathResult.iterateNext()) {\r\n\r\n let entry = this.getJsonEntryFromNode(node);\r\n entries.push(entry);\r\n }\r\n }catch (e) {\r\n // No matching entries here.\r\n }\r\n\r\n //What about dictionary entries where isActive='N', but the id was used in a previously saved value?\r\n //We add that value to the dropdown, in that case, so it can be selected\r\n //ReferencedAttributeValue only gets passed in when the filter attribute changes. In that scenario we do not want to add the old value to the list\r\n if (attribute.isMultiValue !== \"Y\") {\r\n for (let av of values) {\r\n let present:boolean = false;\r\n \r\n if (av && ! referencedAttributeValue) {\r\n for(var i = entries.length - 1; i >= 0; i--) {\r\n if (entries[i].value === av.valueIdDictionary) {\r\n present = true;\r\n break;\r\n }\r\n }\r\n \r\n //If the currently saved value is not in the list, add it.\r\n if (! present) {\r\n \r\n let xpath = \"/Dictionaries/Dictionary[@className='\" + attribute.attributeDictionary.className + \"']/DictionaryEntry[@value='\" + av.valueIdDictionary + \"']\";\r\n //The entry was probably already loaded, but excluded by the xpath. We can use that.\r\n \r\n let node = document.evaluate(xpath, doc, null, XPathResult.ANY_UNORDERED_NODE_TYPE, null).singleNodeValue;\r\n if (node) {\r\n entries.push(this.getJsonEntryFromNode(node));\r\n entriesDTO.entriesIncludeSelectedValue = true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n\r\n //Set the behavior subject with the filtered values for the dictionary\r\n entriesDTO.entries = entries;\r\n entriesDTO.referencedAttribute = dto.referencedAttribute;\r\n bs.next(entriesDTO);\r\n });\r\n\r\n }\r\n //Non-xpath\r\n else {\r\n //DictionayService just used http get, so should not need to unsubscribe, since http does that\r\n this.dictionaryService.getDictionaryDropdownEntries(attribute.attributeDictionary.className).subscribe((entries: any[]) => {\r\n //Make value fields\r\n for(var i = entries.length - 1; i >= 0; i--) {\r\n entries[i].value = entries[i].id.toString();\r\n }\r\n\r\n let entriesDTO = new DictionaryEntriesDTO();\r\n entriesDTO.entries = entries;\r\n entriesDTO.entriesIncludeSelectedValue = true; //A bit of an assumption, but if it isn't filtered, it had better include all the values!\r\n bs.next(entriesDTO);\r\n });\r\n }\r\n\r\n return bs;\r\n }\r\n\r\n getJsonEntryFromNode(node: any): any {\r\n //Create JSON objects from the nodes\r\n let entry: any = {};\r\n for(var i = node.attributes.length - 1; i >= 0; i--) {\r\n entry[node.attributes[i].name] = node.attributes[i].value;\r\n }\r\n\r\n return entry;\r\n }\r\n\r\n private preEvaluateXpath(xpath: string, secondaryXml: string, groupAttributeRowId: number, referencedAttributeValue: AttributeValue): PreEvalDTO {\r\n let dto:PreEvalDTO = new PreEvalDTO();\r\n\r\n //SecurityAdvisor/@codeCancerGroup\r\n while (xpath.indexOf(\"/SecurityAdvisor/@codeCancerGroup\") >= 0) {\r\n xpath = xpath.replace(\"/SecurityAdvisor/@codeCancerGroup\", \"'\" + this.getAttributeConfigurationSubject().value.codeAttributeSecurityContext + \"'\");\r\n }\r\n\r\n //Replace some of the context parameters ${x.value} - This is more Altio specific stuff that was used in CCR\r\n let paramPos = xpath.search(\"\\\\${[A-Za-z0-9_]+\\\\.value}\");\r\n while (paramPos >= 0) {\r\n let prefix = xpath.substring(0, paramPos);\r\n let varName = xpath.substring(paramPos + 2, xpath.indexOf(\".\", paramPos));\r\n let suffix = xpath.substring(xpath.indexOf(\"}\", paramPos) + 1);\r\n\r\n var av;\r\n\r\n //If there IS a referencedAttributeValue, we can use the value directly. Otherwise we try to find it in the AVS\r\n if (! referencedAttributeValue) {\r\n\r\n //Find the attribute, matching the varName.\r\n //Do this first, so we get a reference to the related attribute, regardless of whether there is already a value\r\n\r\n //Iterate attributes to find one that matches the value\r\n this.attributeMap.forEach((attribute: Attribute) => {\r\n //Attributes that match the name\r\n if (attribute.attributeName === varName) {\r\n dto.referencedAttribute = attribute;\r\n return;\r\n }\r\n\r\n //If this is a grid, look for attributes in the row\r\n if (attribute.attributes) {\r\n for (let gridColumnAttribute of attribute.attributes) {\r\n //If the name matches AND the value in the AVS was part of the SAME ROW we are evaluating XPATH for, we can use the value for evaluation\r\n if (gridColumnAttribute.attributeName === varName) {\r\n dto.referencedAttribute = gridColumnAttribute;\r\n return;\r\n }\r\n }\r\n }\r\n });\r\n\r\n\r\n\r\n let avs = this.attributeValueSetSubject.getValue();\r\n //If we found the attribute and have values...\r\n if (dto.referencedAttribute && avs) {\r\n\r\n //Look through all the values to find the one for the referenced attribute (and SAME grid row if in a grid row)\r\n av = avs.attributeValues.find((av) => {\r\n\r\n //If this is an AV for a grid row, it must be for the same grid row we are looking for\r\n if (typeof av.groupAttributeRowId !== 'undefined' && typeof groupAttributeRowId !== 'undefined' && av.groupAttributeRowId !== groupAttributeRowId) {\r\n return false;\r\n }\r\n\r\n\r\n //If we looked up the attribute matching the value by id AND the name of the attribute is the one we ar looking for from the XPATH, we can use it for evaluation\r\n //Found an AttributeValue that the dictionary is filtered by\r\n if (dto.referencedAttribute.idAttribute === av.idAttribute) {\r\n return true;\r\n }\r\n else {\r\n return false;\r\n }\r\n })\r\n }\r\n }\r\n\r\n //Use the referencedAttributeValue if provided (this happens when already known, during changes to the referenced attribute)\r\n if (referencedAttributeValue) {\r\n xpath = prefix + \"'\" + referencedAttributeValue.value + \"'\" + suffix;\r\n }\r\n //Found the AttributeValue for the attribute that the dictionary is filtered by\r\n else if (av) {\r\n xpath = prefix + \"'\" + av.value + \"'\" + suffix;\r\n }\r\n //Didn't find an attribute for varName\r\n else {\r\n //Maybe the varName is from elsewhere in the app (non-COD), and provided in boundData\r\n if (this.boundData && this.boundData[varName]) {\r\n xpath = prefix + \"'\" + this.boundData[varName] + \"'\" + suffix;\r\n }\r\n //Nothing matches. Change to empty string. Will probably result in NO entries, which would be correct.\r\n else {\r\n xpath = prefix + \"''\" + suffix;\r\n }\r\n }\r\n\r\n paramPos = xpath.search(\"\\\\${[A-Za-z0-9_]+\\\\.value}\");\r\n }\r\n\r\n //Have to evaluate sub-expression. This handles expressions like [@x = (/xpath-sub-expression)]\r\n let inExpressionPos = xpath.search(\"\\\\[@[A-Za-z0-9_]+\\\\s*=\\\\s*\\\\(\");\r\n\r\n if (inExpressionPos > 0 && secondaryXml) {\r\n let prefix = xpath.substring(0, inExpressionPos + 1);\r\n let expressionEnd = xpath.indexOf(\")\", inExpressionPos);\r\n let variable = xpath.substring(inExpressionPos + 1, xpath.indexOf(\"=\", inExpressionPos));\r\n let subExpression = xpath.substring(xpath.indexOf(\"(\", inExpressionPos) + 1, expressionEnd);\r\n let suffix = xpath.substring(expressionEnd + 1);\r\n\r\n xpath = prefix;\r\n\r\n //Evaluate XPATH expression\r\n const parser = new DOMParser();\r\n let doc = parser.parseFromString(secondaryXml, \"application/xml\");\r\n let xPathResult = document.evaluate(subExpression, doc, null, XPathResult.ANY_TYPE, null);\r\n\r\n //Iterate xpath results (nodes)\r\n var node = xPathResult.iterateNext();\r\n\r\n while(node) {\r\n xpath = xpath + variable + \"='\" + node.nodeValue + \"'\"\r\n\r\n node = xPathResult.iterateNext();\r\n\r\n if (node) {\r\n xpath = xpath + \" or \";\r\n }\r\n }\r\n\r\n xpath = xpath + suffix;\r\n }\r\n\r\n dto.expression = xpath;\r\n return dto;\r\n }\r\n\r\n private sortAttributeSecurityContextList(a: any, b: any) {\r\n return a.description.toLowerCase().localeCompare(b.description.toLowerCase());\r\n }\r\n\r\n fetchAttributeConfigurationList(codeAttributeSecurityContext?: string): void {\r\n if (isDevMode()) {\r\n console.debug(\"fetchAttributeConfigurationList: \" + codeAttributeSecurityContext);\r\n }\r\n\r\n this.attributeConfigurationListLoadingSubject.next(true);\r\n\r\n let url: string = this.attributeEndpoint + \"configurations\";\r\n let params: HttpParams = new HttpParams();\r\n if (codeAttributeSecurityContext) {\r\n params = params.set(\"codeAttributeSecurityContext\", codeAttributeSecurityContext);\r\n }\r\n\r\n this.http.get<AttributeConfiguration[]>(url, {params: params}).subscribe((configurationList: AttributeConfiguration[]) => {\r\n this.attributeConfigurationListLoadingSubject.next(false);\r\n\r\n let dtos: AttributeConfigurationDTO[] = [];\r\n for (let cfg of configurationList) {\r\n let dto: AttributeConfigurationDTO = this.getAttributeConfigurationDTO(cfg);\r\n if (dto) {\r\n dtos.push(dto);\r\n }\r\n }\r\n\r\n dtos.sort(this.sortAttributeConfigurationList);\r\n\r\n this.attributeConfigurationListSubject.next(dtos);\r\n });\r\n }\r\n\r\n private sortAttributeConfigurationList(a: AttributeConfigurationDTO, b: AttributeConfigurationDTO) {\r\n const displaya = a.codeAttributeSecurityContextDisplay\r\n + a.extensionDescription\r\n + (a.filter1Display || \"\")\r\n + (a.filter2Display || \"\");\r\n\r\n const displayb = b.codeAttributeSecurityContextDisplay\r\n + b.extensionDescription\r\n + (b.filter1Display || \"\")\r\n + (b.filter2Display || \"\");\r\n\r\n return displaya.toLowerCase().localeCompare(displayb.toLowerCase());\r\n }\r\n\r\n //Used by cod-editor\r\n clear(): void {\r\n this.idAttributeConfiguration = undefined;\r\n this.idFilter1 = undefined;\r\n this.idFilter2 = undefined;\r\n\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(undefined);\r\n }\r\n\r\n createAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n attributeConfiguration.idAttributeConfiguration = undefined;\r\n\r\n this.http.post<AttributeConfiguration>(this.attributeEndpoint + \"configurations\", attributeConfiguration).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n this.idAttributeConfiguration = attributeConfiguration.idAttributeConfiguration;\r\n\r\n this.postConfigurationSubject.next(true);\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n this.router.navigateByUrl(\"/editor/attribute-configuration/\" + attributeConfiguration.idAttributeConfiguration);\r\n });\r\n }\r\n\r\n setAttributeConfigurationById(idAttributeConfiguration: number, idAttributeValueSet: number, idParentObject: number): void {\r\n if (idAttributeConfiguration !== -1) {\r\n this.newAttributeConfiguration = undefined;\r\n }\r\n\r\n //Only load if the AttributeConfiguration has changed\r\n if (this.idAttributeConfiguration !== idAttributeConfiguration) {\r\n //Clear ASAP\r\n this.idAttributeConfiguration = idAttributeConfiguration;\r\n this.idAttributeValueSet = idAttributeValueSet;\r\n this.idFilter1 = undefined;\r\n this.idFilter2 = undefined;\r\n this.attributeMap.clear();\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(undefined);\r\n\r\n this.fetchAttributeConfiguration(idAttributeValueSet, idParentObject);\r\n }\r\n //Or load the AttributeValueSet if that changed (possible to switch from one event to another of the same type, for example\r\n //The AttributeConfiguration must also have finished loading and not already working on loading the values\r\n else if (this.idAttributeValueSet !== idAttributeValueSet && this.attributeConfigurationSubject.getValue()) {\r\n this.setAttributeValueSet(idAttributeValueSet, idParentObject);\r\n }\r\n }\r\n\r\n\r\n\r\n /**\r\n * Sets the attribute configuration identifiers to be used by this service. This prompts a new configuration\r\n * request to be made.\r\n *\r\n * @param {number} idFilter1\r\n * @param {number} idFilter2\r\n */\r\n/* This is commented out for now because it is both unimplemented and incomplete (loading a configuration\r\n * filter would really also require the attribute context and attributesecurity context plus a service on\r\n * the back end that actually does this work. For now, only loading by idAttributeConfiguration\r\n *\r\n setAttributeConfigurationByFilter(idFilter1: number, idFilter2?: number): void {\r\n if (isDevMode()) {\r\n console.debug(\"setAttributeConfigurationByFilter: \" + idFilter1 + \" \" + idFilter2);\r\n }\r\n\r\n this.newAttributeConfiguration = undefined;\r\n //this.idAttributeConfiguration = undefined;\r\n this.idFilter1 = idFilter1;\r\n this.idFilter2 = idFilter2;\r\n\r\n this.fetchAttributeConfiguration();\r\n }\r\n*/\r\n\r\n /**\r\n * Sets the id of the attribute value set. This will prompt a request to pull this from the backend.\r\n *\r\n * @param {number} idAttributeValueSet\r\n */\r\n setAttributeValueSet(idAttributeValueSet: number, idParentObject: number) {\r\n //Only load the AttributeValueSet if it has been changed\r\n if (this.idAttributeValueSet !== idAttributeValueSet) {\r\n this.idAttributeValueSet = idAttributeValueSet;\r\n\r\n this.fetchAttributeValueSet(idParentObject);\r\n }\r\n }\r\n\r\n /**\r\n * The request to download the attribute configuration.\r\n */\r\n fetchAttributeConfiguration(idAttributeValueSet: number, idParentObject: number): void {\r\n\r\n if (this.newAttributeConfiguration) {\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(this.newAttributeConfiguration);\r\n return;\r\n } else if (this.idAttributeConfiguration === -1) {\r\n this.attributeConfigurationDTOSubject.next(undefined);\r\n this.attributeConfigurationSubject.next(<AttributeConfiguration>{\r\n idAttributeConfiguration: -2\r\n });\r\n return;\r\n }\r\n\r\n this.loadingSubject.next(true);\r\n\r\n let url: string;\r\n if (this.idAttributeConfiguration && this.idAttributeConfiguration > -1) {\r\n url = this.attributeEndpoint + \"configurations/\" + this.idAttributeConfiguration;\r\n } else {\r\n //This is not fully implemented\r\n\t //url = this.attributeEndpoint + \"configurations/filter/\" + this.idFilter1;\r\n //if (this.idFilter2) {\r\n //url += \"/\" + this.idFilter2;\r\n //}\r\n }\r\n\r\n this.http.get<AttributeConfiguration>(url).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n this.setAttributeConfiguration(attributeConfiguration);\r\n this.loadingSubject.next(false);\r\n\r\n //Now load the attributeValueSet - This will always happen when a new configuration is loaded\r\n this.idAttributeValueSet = undefined; //Force it to change in this scenario\r\n this.setAttributeValueSet(idAttributeValueSet, idParentObject);\r\n this.dirty.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n this.setAttributeConfiguration(undefined);\r\n });\r\n }\r\n\r\n setAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n this.attributeMap.clear();\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeService.setAttributeConfiguration\");\r\n console.debug(attributeConfiguration);\r\n }\r\n\r\n if (attributeConfiguration) {\r\n if (attributeConfiguration.baseWindowTemplate) {\r\n this.getBaseWindowDimension(attributeConfiguration.baseWindowTemplate);\r\n }\r\n\r\n if (attributeConfiguration.attributeContainers) {\r\n attributeConfiguration.attributeContainers.sort((a: AttributeContainer, b: AttributeContainer) => {\r\n if (a.sortOrder < b.sortOrder) {\r\n return -1;\r\n } else if (a.sortOrder > b.sortOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n }\r\n\r\n for (let attributeContainer of attributeConfiguration.attributeContainers) {\r\n /**\r\n * First sort attributes using the y and x positioning. If using absolute position, the order doesn't matter,\r\n * but if we want the absolute positioning to guide auto layout, then use this order.\r\n */\r\n attributeContainer.graphicalAttributes.sort((a: GraphicalAttribute, b: GraphicalAttribute) => {\r\n if (a.tabOrder < b.tabOrder) {\r\n return -1;\r\n } else if (a.tabOrder > b.tabOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n for (let attribute of attributeContainer.graphicalAttributes) {\r\n this.attributeMap.set(attribute.idAttribute, attribute);\r\n }\r\n }\r\n }\r\n\r\n this.attributeConfigurationDTOSubject.next(this.getAttributeConfigurationDTO(attributeConfiguration));\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n }\r\n\r\n /**\r\n * The request to pull the attribute value set.\r\n * Required the AttributeConfiguration to be pre-loaded\r\n */\r\n fetchAttributeValueSet(idParentObject: number): void {\r\n this.loadingSubject.next(true);\r\n this.idParentObject = idParentObject;\r\n\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" + this.idAttributeValueSet;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (idParentObject)?idParentObject.toString():\"\");\r\n\r\n //Clear ASAP\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.attributeValueSetSubject.next(undefined);\r\n\r\n this.http.get<AttributeValueSet>(url, {params: queryParams}).subscribe((attributeValueSet: AttributeValueSet) => {\r\n //Initialize attributeValues if it does not exist\r\n if (! attributeValueSet.attributeValues) {\r\n attributeValueSet.attributeValues = [];\r\n }\r\n\r\n this.checkAvsEditable();\r\n\r\n this.attributeValueSetSubject.next(attributeValueSet);\r\n this.loadingSubject.next(false);\r\n this.dirty.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n this.attributeValueSetSubject.next(undefined);\r\n });\r\n }\r\n\r\n checkAvsEditable(): void {\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" + this.idAttributeValueSet + \"/can-edit\";\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n \r\n this.http.get<boolean>(url, {params: queryParams}).subscribe((canEdit: boolean) => {\r\n this.editButtonsEnabled = canEdit;\r\n });\r\n }\r\n\r\n getBaseWindowDimension(baseWindowTemplate: string): void {\r\n this.http.get(this.attributeEndpoint + \"base-window-dimension\", {params: new HttpParams().set(\"baseWindowTemplate\", baseWindowTemplate)})\r\n .subscribe((dimension: any) => {\r\n this.attributeConfigurationDimensionSubject.next(dimension);\r\n });\r\n }\r\n\r\n /**\r\n * Currently a simple notifier that the configuration or attribute value set has changed and components may need to be refreshed.\r\n *\r\n */\r\n notifyAttributes(): void {\r\n this.containerUpdated.next(true);\r\n }\r\n\r\n /**\r\n * Post the attribute configuration after editing. Post the entire thing as it cascades down. The editor allows you\r\n * to modify every container and only then save the entire configuration.\r\n *\r\n * @param {AttributeConfiguration} attributeConfiguration\r\n */\r\n postAttributeConfiguration(attributeConfiguration: AttributeConfiguration): void {\r\n let url: string = this.attributeEndpoint + \"configurations/\" + attributeConfiguration.idAttributeConfiguration;\r\n\r\n this.loadingSubject.next(true);\r\n\r\n this.setNegativeIdsToUndefined(attributeConfiguration);\r\n\r\n this.http.post(url, attributeConfiguration).subscribe(() => {\r\n\r\n // Prevent error in subsequent saves. See Metabuilder / MB-23\r\n this.http.get<AttributeConfiguration>(url).subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n if (isDevMode()) {\r\n console.debug(attributeConfiguration);\r\n }\r\n\r\n this.postConfigurationSubject.next(true);\r\n this.attributeConfigurationSubject.next(attributeConfiguration);\r\n },\r\n (error) => {\r\n console.error(error);\r\n },\r\n () => {\r\n this.loadingSubject.next(false);\r\n });\r\n\r\n },\r\n (error) => {\r\n console.error(error);\r\n });\r\n }\r\n\r\n /**\r\n * Put the attribute value set. When editing, attributes already post their updated values to this services under\r\n * a separate array. What we do is merge in these updated or created values with the current attribute value set (avs).\r\n * While doing this, set the id of the avs and nullify any negative ids.\r\n */\r\n updateAttributeValueSet(): Subject<AttributeValueSet> {\r\n let url: string = this.attributeEndpoint + \"attribute-value-set/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n let avs: AttributeValueSet = Object.assign({}, this.attributeValueSetSubject.getValue());\r\n for (let i = this.updatedAttributeValues.length - 1; i >= 0; i--) {\r\n this.updatedAttributeValues[i].idAttributeValueSet = this.idAttributeValueSet;\r\n if (this.updatedAttributeValues[i].idAttributeValue < 0) {\r\n this.updatedAttributeValues[i].idAttributeValue = undefined;\r\n }\r\n\r\n let j: number = 0;\r\n for (j = 0; j < avs.attributeValues.length; j++) {\r\n if (this.updatedAttributeValues[i].idAttributeValue === avs.attributeValues[j].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < avs.attributeValues.length) {\r\n avs.attributeValues[j] = this.updatedAttributeValues[i];\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n }\r\n for (let i = 0; i < this.slicedAttributeValues.length; i++) {\r\n let j: number = 0;\r\n for (j = 0; j < avs.attributeValues.length; j++) {\r\n if (this.slicedAttributeValues[i].idAttributeValue === avs.attributeValues[j].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < avs.attributeValues.length) {\r\n avs.attributeValues.splice(j, 1);\r\n }\r\n }\r\n avs.attributeValues = avs.attributeValues.concat(this.updatedAttributeValues);\r\n\r\n this.loadingSubject.next(true);\r\n\r\n let resultSubject: Subject<AttributeValueSet> = new Subject<AttributeValueSet>();\r\n\r\n this.http.put(url, avs, {params: queryParams}).subscribe((attributeValueSet: AttributeValueSet) => {\r\n if (isDevMode()) {\r\n console.debug(attributeValueSet);\r\n }\r\n\r\n //Initialize attributeValues if it does not exist\r\n if (! attributeValueSet.attributeValues) {\r\n attributeValueSet.attributeValues = [];\r\n }\r\n\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.attributeValueSetSubject.next(attributeValueSet);\r\n this.loadingSubject.next(false);\r\n this.dirty.next(false);\r\n\r\n //Send the results to the observer (if any), then complete\r\n resultSubject.next(attributeValueSet);\r\n resultSubject.complete();\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n resultSubject.error(error);\r\n });\r\n\r\n return resultSubject;\r\n }\r\n\r\n /**\r\n * Get the attributeConfigurationSubject.\r\n *\r\n * @returns {BehaviorSubject<AttributeConfiguration>}\r\n */\r\n getAttributeConfigurationSubject(): BehaviorSubject<AttributeConfiguration> {\r\n return this.attributeConfigurationSubject;\r\n }\r\n\r\n getDirtySubject(): BehaviorSubject<boolean> {\r\n return this.dirty;\r\n }\r\n\r\n /**\r\n * Get the attributeValueSetSubject;\r\n *\r\n * @returns {BehaviorSubject<AttributeValueSet>}\r\n */\r\n getAttributeValueSet(): BehaviorSubject<AttributeValueSet> {\r\n return this.attributeValueSetSubject;\r\n }\r\n\r\n /**\r\n * Get the attributeValuePushedSubject;\r\n *\r\n * @returns {Subject<AttributeValue>}\r\n */\r\n getAttributeValuePushedSubject(): Subject<AttributeValue> {\r\n return this.attributeValuePushedSubject;\r\n }\r\n\r\n /**\r\n * Get all attribute values based upon the idAttribute.\r\n *\r\n * @param {number} idAttributes\r\n * @returns {AttributeValue[]}\r\n */\r\n getAttributeValues(idAttribute: number, groupAttributeRowId: number): AttributeValue[] {\r\n\r\n let attributeValues: AttributeValue[] = [];\r\n\r\n if(this.attributeValueSetSubject.getValue()) {\r\n\r\n //Go through all the updated attribute values first (so we preserve across changing tabs, etc)\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === idAttribute && (!groupAttributeRowId || groupAttributeRowId === this.updatedAttributeValues[i].groupAttributeRowId)) {\r\n attributeValues.push(Object.assign({}, this.updatedAttributeValues[i]));\r\n }\r\n else if (this.updatedAttributeValues[i].idGroupAttribute === idAttribute && (!groupAttributeRowId || groupAttributeRowId === this.updatedAttributeValues[i].groupAttributeRowId)) {\r\n attributeValues.push(Object.assign({}, this.updatedAttributeValues[i]));\r\n }\r\n }\r\n\r\n //Go through all the regular attributes\r\n for (let attributeValue of this.attributeValueSetSubject.getValue().attributeValues) {\r\n //Regular attributes (normal and group, which get multiple)\r\n if (attributeValue.idAttribute === idAttribute || attributeValue.idGroupAttribute === idAttribute) {\r\n //If row id specified, only care about values for that row\r\n if (typeof groupAttributeRowId === 'undefined' || attributeValue.groupAttributeRowId === groupAttributeRowId) {\r\n\r\n //If not already added...\r\n if (! attributeValues.find((existing) => existing.idAttributeValue === attributeValue.idAttributeValue)) {\r\n\r\n //Don't want the original if it was removed (sliced)\r\n if (! this.slicedAttributeValues.find((sav) => sav.idAttributeValue === attributeValue.idAttributeValue)) {\r\n attributeValues.push(Object.assign({}, attributeValue));\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return attributeValues;\r\n }\r\n\r\n /**\r\n * Get all child attributes of the idAttribute. Most likely for attributes that define columns of a grid.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {Attribute[]}\r\n */\r\n getGroupAttributes(idAttribute: number): Attribute[] {\r\n let attributes: Attribute[] = [];\r\n\r\n this.attributeMap.forEach((attribute: Attribute) => {\r\n if (attribute.idGroupAttribute === idAttribute) {\r\n attributes.push(attribute);\r\n }\r\n });\r\n\r\n return attributes;\r\n }\r\n\r\n /**\r\n * Set the width which is a requirement of the absolute positioning.\r\n *\r\n * @param {number} width\r\n */\r\n setWidth(width: number): void {\r\n this.width = width;\r\n }\r\n\r\n /**\r\n * Get the width.\r\n *\r\n * @returns {number}\r\n */\r\n getWidth(): number {\r\n return this.width;\r\n }\r\n\r\n /**\r\n * Get the array of attribute choices for the idAttribute.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {AttributeChoice[]}\r\n */\r\n getAttributeChoices(idAttribute: number): AttributeChoice[] {\r\n return this.attributeMap.get(idAttribute).attributeChoices;\r\n }\r\n\r\n getLoadingSubject(): Subject<boolean> {\r\n return this.loadingSubject;\r\n }\r\n\r\n /**\r\n * Get the containerUpdated subject.\r\n *\r\n * @returns {Subject<number>}\r\n */\r\n getContainerUpdated(): Subject<boolean> {\r\n return this.containerUpdated;\r\n }\r\n\r\n getGridRowSavedSubject(): Subject<AttributeValueGridRow> {\r\n return this.gridRowSaved;\r\n }\r\n\r\n getGridRowDeletedSubject(): Subject<AttributeValueGridRow> {\r\n return this.gridRowDeleted;\r\n }\r\n\r\n /**\r\n * Clear the updated and deleted attribute value arrays.\r\n *\r\n */\r\n clearUpdatedAttributeValues(): void {\r\n this.slicedAttributeValues = [];\r\n this.updatedAttributeValues = [];\r\n this.dirty.next(false);\r\n this.notifyAttributes();\r\n }\r\n\r\n /**\r\n * Clear the updated and deleted grid row attributes for the specified grid row\r\n *\r\n */\r\n clearUpdatedGridRowAttributeValues(groupAttributeRowId: number): void {\r\n let remainingAttributes = [];\r\n\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId !== groupAttributeRowId);\r\n\r\n //Shouldn't be a need to change dirty or notify attributes\r\n }\r\n\r\n saveGridRowAttributeValues(idGroupAttribute: number, groupAttributeRowId: number): void {\r\n let rowValues = this.updatedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);\r\n\r\n for (let j = 0; j < rowValues.length; j++) {\r\n //set the idAttributeValueSet if necessary\r\n if (! rowValues[j].idAttributeValueSet) {\r\n rowValues[j].idAttributeValueSet = this.idAttributeValueSet;\r\n }\r\n\r\n //remove all negative ids (new values)\r\n if (rowValues[j].idAttributeValue < 0) {\r\n rowValues[j].idAttributeValue = undefined;\r\n }\r\n }\r\n\r\n //For multi values that were sliced (de-selected) we're going to find them and null out the value, instead of removing.\r\n //That means they actaully need to be added to the rowValues\r\n //Removed multi values within an existing row\r\n let removedValues = this.slicedAttributeValues.filter((av) => av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute);\r\n for (let i = 0; i < removedValues.length; i++) {\r\n removedValues[i].valueAttributeChoice = undefined;\r\n removedValues[i].valueIdDictionary = undefined;\r\n rowValues.push(removedValues[i]);\r\n }\r\n\r\n let avgr:AttributeValueGridRow = <AttributeValueGridRow>{\r\n idAttributeValueSet: this.idAttributeValueSet,\r\n idGroupAttribute: idGroupAttribute,\r\n groupAttributeRowId: groupAttributeRowId,\r\n attributeValues: rowValues\r\n };\r\n\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n\r\n this.loadingSubject.next(true);\r\n\r\n //Save new row\r\n if (groupAttributeRowId < 0) {\r\n this.http.post(url, avgr, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n\r\n //Add the grid row to the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n //Remove the updated and sliced values for the grid row, now (these are the old ones with the negative rowid)\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowSaved.next(attributeValueGridRow);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n //Update existing row\r\n else {\r\n this.http.put(url, avgr, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n\r\n //Add the grid row to the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n\r\n //Remove all old values for row\r\n let index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));\r\n while (index >= 0) {\r\n //Remove value\r\n avs.attributeValues.splice(index, 1);\r\n\r\n //Find the next one\r\n index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === groupAttributeRowId && av.idGroupAttribute === idGroupAttribute));\r\n }\r\n\r\n //Add all the current values\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n //Remove the sliced and updated values for the grid row\r\n this.slicedAttributeValues = this.slicedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n this.updatedAttributeValues = this.updatedAttributeValues.filter((av) => (av.groupAttributeRowId !== groupAttributeRowId || av.idGroupAttribute !== idGroupAttribute));\r\n\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowSaved.next(attributeValueGridRow);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n }\r\n\r\n deleteGridRowAttributeValues(idGroupAttribute: number, groupAttributeRowId: number): void {\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n\r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n\r\n let avgr:AttributeValueGridRow = <AttributeValueGridRow>{\r\n idAttributeValueSet: this.idAttributeValueSet,\r\n idGroupAttribute: idGroupAttribute,\r\n groupAttributeRowId: groupAttributeRowId,\r\n attributeValues: []\r\n };\r\n\r\n this.loadingSubject.next(true);\r\n\r\n this.http.request('delete', url, {body: avgr, params: queryParams}).subscribe(() => {\r\n\r\n //Remove the grid row from the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n //Filter to only attributes to KEEP - (i.e. not the same grid or not the row being deleted)\r\n avs.attributeValues = avs.attributeValues.filter((av) => (av.idGroupAttribute !== idGroupAttribute || av.groupAttributeRowId !== groupAttributeRowId));\r\n this.attributeValueSetSubject.next(avs);\r\n this.gridRowDeleted.next(avgr);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n }\r\n\r\n /**\r\n * Used to refresh a grid row after plugin execution without affecting other attribute values\r\n * Normally saving the grid row updates the values, but some applications execute a subsequent plugin and need an extra refresh to pick up changes.\r\n * \r\n * @param {AttributeValueGridRow} avgr\r\n */\r\n refreshGridRow(avgr: AttributeValueGridRow) {\r\n let url: string = this.attributeEndpoint + \"attribute-value-grid-row/\" ;\r\n\r\n let ac: AttributeConfiguration = this.attributeConfigurationSubject.getValue();\r\n \r\n let queryParams: HttpParams = new HttpParams()\r\n .set(\"idGroupAttribute\", avgr.idGroupAttribute)\r\n .set(\"groupAttributeRowId\", avgr.groupAttributeRowId)\r\n .set(\"idAttributeValueSet\", avgr.idAttributeValueSet)\r\n .set(\"codeAttributeSecurityContext\", ac.codeAttributeSecurityContext)\r\n .set(\"codeAttributeContext\", ac.codeAttributeContext)\r\n .set(\"idParentObject\", (this.idParentObject)?this.idParentObject.toString():\"\");\r\n \r\n this.loadingSubject.next(true);\r\n \r\n this.http.get<AttributeValueGridRow>(url, {params: queryParams}).subscribe((attributeValueGridRow: AttributeValueGridRow) => {\r\n \r\n //Note that the sliced and updated values for the grid row were already cleaned up during the save\r\n \r\n //Remove the grid row from the original attribute values\r\n let avs:AttributeValueSet = this.attributeValueSetSubject.getValue();\r\n \r\n //Remove all old values for row\r\n let index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === attributeValueGridRow.groupAttributeRowId && av.idGroupAttribute === attributeValueGridRow.idGroupAttribute));\r\n while (index >= 0) {\r\n //Remove value\r\n avs.attributeValues.splice(index, 1);\r\n \r\n //Find the next one\r\n index = avs.attributeValues.findIndex((av)=> (av.groupAttributeRowId === attributeValueGridRow.groupAttributeRowId && av.idGroupAttribute === attributeValueGridRow.idGroupAttribute));\r\n }\r\n \r\n //Add all the current values\r\n for (let i = 0; i < attributeValueGridRow.attributeValues.length; i++) {\r\n avs.attributeValues.push(attributeValueGridRow.attributeValues[i]);\r\n }\r\n\r\n \r\n this.attributeValueSetSubject.next(avs);\r\n this.loadingSubject.next(false);\r\n },\r\n (error) => {\r\n console.error(error);\r\n this.loadingSubject.next(false);\r\n });\r\n \r\n }\r\n\r\n /**\r\n * Push an attribute to the attribute map.\r\n *\r\n * @param {Attribute} attribute\r\n */\r\n pushAttribute(attribute: Attribute): void {\r\n this.attributeMap.set(attribute.idAttribute, attribute);\r\n }\r\n\r\n\r\n pushAttributeValueMultiChoice(attributeValue: AttributeValue): void {\r\n //Remove from sliced if present\r\n let i: number = 0;\r\n for (i = 0; i < this.slicedAttributeValues.length; i++) {\r\n if (this.slicedAttributeValues[i].idAttribute === attributeValue.idAttribute && this.slicedAttributeValues[i].valueAttributeChoice.idAttributeChoice === attributeValue.valueAttributeChoice.idAttributeChoice) {\r\n break;\r\n }\r\n }\r\n //Remove from sliced attribute values (no longer removing)\r\n if (i < this.slicedAttributeValues.length) {\r\n this.slicedAttributeValues.splice(i, 1);\r\n }\r\n //Otherwise push the value, so it will be saved\r\n else {\r\n this.pushAttributeValue(attributeValue);\r\n }\r\n }\r\n\r\n pushAttributeValueMultiDict(attributeValue: AttributeValue): void {\r\n //Remove from sliced if present\r\n let i: number = 0;\r\n for (i = 0; i < this.slicedAttributeValues.length; i++) {\r\n if (this.slicedAttributeValues[i].idAttribute === attributeValue.idAttribute && this.slicedAttributeValues[i].valueIdDictionary === attributeValue.valueIdDictionary) {\r\n break;\r\n }\r\n }\r\n //Remove from sliced attribute values (no longer removing)\r\n if (i < this.slicedAttributeValues.length) {\r\n this.slicedAttributeValues.splice(i, 1);\r\n }\r\n //Otherwise push the value, so it will be saved\r\n else {\r\n this.pushAttributeValue(attributeValue);\r\n }\r\n }\r\n\r\n /**\r\n * Push a new or updated attribute value. The current one is just removed and the new one appended to the array.\r\n *\r\n * @param {AttributeValue} attributeValue\r\n */\r\n pushAttributeValue(attributeValue: AttributeValue): void {\r\n if (isDevMode()) {\r\n console.debug(\"pushAttributeValue\");\r\n console.debug(attributeValue);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttributeValue === attributeValue.idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n\r\n this.updatedAttributeValues.push(attributeValue);\r\n this.attributeValuePushedSubject.next(attributeValue);\r\n\r\n //Only setting dirty for non grid-rows (those are saved immediately)\r\n if (! attributeValue.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * For pushing multiple attribute values at once. This would typically be for a multi choice.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeValue[]} attributeValues\r\n */\r\n pushAttributeValues(attribute: Attribute, attributeValues: AttributeValue[]): void {\r\n if (isDevMode()) {\r\n console.debug(\"pushAttributeValues\");\r\n console.debug(attributeValues);\r\n }\r\n\r\n for (let i = 0; i < attributeValues.length; i++) {\r\n let j: number = 0;\r\n for (j = 0; j < this.updatedAttributeValues.length; j++) {\r\n if (this.updatedAttributeValues[j].idAttribute !== attribute.idAttribute) {\r\n continue;\r\n } else if (this.updatedAttributeValues[j].idAttributeValue === attributeValues[i].idAttributeValue) {\r\n break;\r\n }\r\n }\r\n if (j < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues[j] = attributeValues[i];\r\n } else {\r\n this.updatedAttributeValues.push(attributeValues[i]);\r\n }\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(this.updatedAttributeValues);\r\n }\r\n\r\n //Only setting dirty for non grid-rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * Push a value in the case where an attribute value doesn't exist.\r\n *\r\n * @param {Attribute} attribute\r\n * @param value\r\n */\r\n pushValue(attribute: Attribute, value: any): void {\r\n let attributeValue: AttributeValue = <AttributeValue>{\r\n idAttribute: attribute.idAttribute,\r\n idAttributeValueSet: this.idAttributeValueSet\r\n };\r\n\r\n if (attribute.codeAttributeDataType === \"TXT\") {\r\n attributeValue.valueLongText = {\r\n idLongText: undefined,\r\n textData: value\r\n };\r\n }\r\n\r\n this.updatedAttributeValues.push(attributeValue);\r\n this.dirty.next(true);\r\n }\r\n\r\n /**\r\n * Remove an attribute value. Typically in the case of a multi select where the unselected value is removed.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeChoice} attributeChoice\r\n */\r\n spliceAttributeValueChoice(attribute: Attribute, attributeChoice: AttributeChoice): void {\r\n if (isDevMode()) {\r\n console.debug(\"sliceAttributeValue: \" + attribute.idAttribute + \", \" + attributeChoice.idAttributeChoice);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === attribute.idAttribute && this.updatedAttributeValues[i].valueAttributeChoice.idAttributeChoice === attributeChoice.idAttributeChoice) {\r\n break;\r\n }\r\n }\r\n //Remove from updated attribute values (not previously saved)\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n //Add to sliced values (previously saved - need to remove)\r\n else {\r\n for (i = 0; i < this.attributeValueSetSubject.getValue().attributeValues.length; i++) {\r\n if (this.attributeValueSetSubject.getValue().attributeValues[i].idAttribute === attribute.idAttribute\r\n && this.attributeValueSetSubject.getValue().attributeValues[i].valueAttributeChoice.idAttributeChoice === attributeChoice.idAttributeChoice) {\r\n this.slicedAttributeValues.push(this.attributeValueSetSubject.getValue().attributeValues[i]);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //Only flagging dirty for non-grid rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Remove an attribute value. Typically in the case of a multi select where the unselected value is removed.\r\n *\r\n * @param {Attribute} attribute\r\n * @param {AttributeChoice} attributeChoice\r\n */\r\n spliceAttributeValueDict(attribute: Attribute, value: any): void {\r\n if (isDevMode()) {\r\n console.debug(\"sliceAttributeValue: \" + attribute.idAttribute + \", \" + value);\r\n }\r\n\r\n let i: number = 0;\r\n for (i = 0; i < this.updatedAttributeValues.length; i++) {\r\n if (this.updatedAttributeValues[i].idAttribute === attribute.idAttribute && this.updatedAttributeValues[i].valueIdDictionary === value) {\r\n break;\r\n }\r\n }\r\n //Remove from updated attribute values (not previously saved)\r\n if (i < this.updatedAttributeValues.length) {\r\n this.updatedAttributeValues.splice(i, 1);\r\n }\r\n //Add to sliced values (previously saved - need to remove)\r\n else {\r\n for (i = 0; i < this.attributeValueSetSubject.getValue().attributeValues.length; i++) {\r\n if (this.attributeValueSetSubject.getValue().attributeValues[i].idAttribute === attribute.idAttribute\r\n && this.attributeValueSetSubject.getValue().attributeValues[i].valueIdDictionary === value) {\r\n this.slicedAttributeValues.push(this.attributeValueSetSubject.getValue().attributeValues[i]);\r\n break;\r\n }\r\n }\r\n }\r\n\r\n //Only flagging dirty for non-grid rows (those are saved immediately)\r\n if (! attribute.idGroupAttribute) {\r\n this.dirty.next(true);\r\n }\r\n }\r\n\r\n /**\r\n * Get the attribute based upon the idAttribute. This is from the map of attributes.\r\n *\r\n * @param {number} idAttribute\r\n * @returns {Attribute}\r\n */\r\n getAttribute(idAttribute: number): Attribute {\r\n return this.attributeMap.get(idAttribute);\r\n }\r\n\r\n /**\r\n * For the attribute configuration, set all of the negative ids to undefined prior to posting.\r\n *\r\n * @param {AttributeConfiguration} attributeConfiguration\r\n */\r\n setNegativeIdsToUndefined(attributeConfiguration: AttributeConfiguration): void {\r\n if (attributeConfiguration.idAttributeConfiguration < 0) {\r\n attributeConfiguration.idAttributeConfiguration = undefined;\r\n }\r\n\r\n for (let attributeContainer of attributeConfiguration.attributeContainers) {\r\n if (attributeContainer.idAttributeContainer < 0) {\r\n attributeContainer.idAttributeContainer = undefined;\r\n }\r\n\r\n for (let attribute of attributeContainer.graphicalAttributes) {\r\n\r\n if (attribute.idAttribute < 0) {\r\n attribute.idAttribute = undefined;\r\n }\r\n\r\n if (attribute.attributeChoices) {\r\n for (let attributeChoice of attribute.attributeChoices) {\r\n delete attribute[\"value\"];\r\n\r\n if (attributeChoice.idAttribute < 0) {\r\n attributeChoice.idAttribute = undefined;\r\n }\r\n if (attributeChoice.idAttributeChoice < 0) {\r\n attributeChoice.idAttributeChoice = undefined;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Creates a display name for the attribute configuration based on the context code and id.\r\n *\r\n * @param {AttributeConfiguration} configuration\r\n * @returns {string}\r\n */\r\n getConfigurationName(configuration: AttributeConfigurationDTO): string {\r\n if (configuration.idAttributeConfiguration === -1) {\r\n return \"New\";\r\n }\r\n\r\n let name: string = configuration.codeAttributeSecurityContextDisplay + \": \" + configuration.extensionDescription;\r\n\r\n if (configuration.idFilter1) {\r\n name += \" - \" + configuration.filter1Display;\r\n }\r\n if (configuration.idFilter2) {\r\n name += \" - \" + configuration.filter2Display;\r\n }\r\n return name;\r\n }\r\n\r\n getAttributeConfigurationDTO(cfg: AttributeConfiguration): AttributeConfigurationDTO {\r\n if (!cfg) {\r\n return undefined;\r\n }\r\n\r\n let dto: AttributeConfigurationDTO = <AttributeConfigurationDTO>{\r\n idAttributeConfiguration: cfg.idAttributeConfiguration,\r\n codeAttributeContext: cfg.codeAttributeContext,\r\n codeAttributeSecurityContext: cfg.codeAttributeSecurityContext,\r\n idFilter1: cfg.idFilter1,\r\n idFilter2: cfg.idFilter2\r\n };\r\n\r\n if (this.attributeContextListSubject.getValue()) {\r\n dto.extensionDescription = this.attributeContextListSubject.getValue().filter((ctx: any) => {\r\n return ctx.codeAttributeContext === cfg.codeAttributeContext;\r\n })[0].extensionDescription;\r\n }\r\n\r\n if (this.attributeSecurityContextListSubject.getValue()) {\r\n let result: any[] = this.attributeSecurityContextListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext;\r\n });\r\n dto.codeAttributeSecurityContextDisplay = (result && result.length > 0) ? result[0].description : undefined;\r\n }\r\n\r\n if (this.filter1ListSubject.getValue()) {\r\n let result: any[] = this.filter1ListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeContext === cfg.codeAttributeContext\r\n && filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext\r\n && filter.idFilter1 === cfg.idFilter1;\r\n });\r\n dto.filter1Display = (result && result.length > 0) ? result[0].display : undefined;\r\n }\r\n\r\n if (this.filter2ListSubject.getValue()) {\r\n let result: any[] = this.filter2ListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeContext === cfg.codeAttributeContext\r\n && filter.codeAttributeSecurityContext === cfg.codeAttributeSecurityContext\r\n && filter.idFilter1 === cfg.idFilter1\r\n && filter.idFilter2 === cfg.idFilter2;\r\n });\r\n dto.filter2Display = (result && result.length > 0) ? result[0].display : undefined;\r\n }\r\n\r\n return dto;\r\n }\r\n\r\n getSecurityCodeContext(code: string): any {\r\n return this.attributeSecurityContextListSubject.getValue().filter((filter: any) => {\r\n return filter.codeAttributeSecurityContext === code;\r\n })[0];\r\n }\r\n\r\n getAttributeContextLoadingSubject(): BehaviorSubject<boolean> {\r\n return this.attributeContextLoadingSubject;\r\n }\r\n\r\n getFilter1For(codeAttributeContext: string, codeAttributeSecurityContext: string): any[] {\r\n return this.filter1ListSubject.getValue().filter((item: any) => {\r\n return item.codeAttributeContext === codeAttributeContext && item.codeAttributeSecurityContext === codeAttributeSecurityContext;\r\n });\r\n }\r\n\r\n getFilter2For(codeAttributeContext: string, codeAttributeSecurityContext: string, idFilter1: number): any[] {\r\n return this.filter2ListSubject.getValue().filter((item: any) => {\r\n return item.codeAttributeContext === codeAttributeContext\r\n && item.codeAttributeSecurityContext === codeAttributeSecurityContext\r\n && item.idFilter1 === idFilter1;\r\n });\r\n }\r\n\r\n /**\r\n * Track new idAttributeValues via a negative number for internal tracking. Remove this fake id prior to post.\r\n *\r\n * @returns {number}\r\n */\r\n getUniqueId(): number {\r\n return --this.uniqueId;\r\n }\r\n}\r\n","import {Injectable} from \"@angular/core\";\r\nimport {HttpClient} from \"@angular/common/http\";\r\n\r\nimport {BehaviorSubject} from \"rxjs\";\r\nimport { parse } from \"date-fns\";\r\n\r\n\r\n@Injectable()\r\nexport class DateUtil {\r\n \r\n static dateComparator(date1, date2) {\r\n var date1Number = DateUtil.monthToComparableNumber(date1);\r\n var date2Number = DateUtil.monthToComparableNumber(date2);\r\n if (date1Number === null && date2Number === null) {\r\n return 0;\r\n }\r\n if (date1Number === null) {\r\n return -1;\r\n }\r\n if (date2Number === null) {\r\n return 1;\r\n }\r\n return date1Number - date2Number;\r\n }\r\n\r\n static dateTimeComparator(date1, date2){\r\n var date1Number = DateUtil.daytimeToComparableNumber(date1);\r\n var date2Number = DateUtil.daytimeToComparableNumber(date2);\r\n if (date1Number === null && date2Number === null) {\r\n return 0;\r\n }\r\n if (date1Number === null) {\r\n return -1;\r\n }\r\n if (date2Number === null) {\r\n return 1;\r\n }\r\n return date1Number - date2Number;\r\n }\r\n\r\n static monthToComparableNumber(date) {\r\n if (date === undefined || date === null || date.length !== 10) {\r\n return null;\r\n }\r\n \r\n var newDate = parse(date, \"MM/dd/yyyy\", new Date());\r\n \r\n if(Number.isNaN(newDate.getTime())){//parse error\r\n return null;\r\n }\r\n return newDate.getTime();\r\n }\r\n\r\n static daytimeToComparableNumber(date) {\r\n if (date === undefined || date === null || date === \"\") {\r\n return null;\r\n }\r\n\r\n var newDate = parse(date, \"MM/dd/yyyy HH:mm:ss\", new Date());\r\n if(Number.isNaN(newDate.getTime())){//parse error\r\n return null;\r\n }\r\n \r\n return newDate.getTime();\r\n }\r\n}\r\n\r\n\r\n","import {\r\n ElementRef, TemplateRef, EventEmitter, Input, isDevMode, Output, Renderer2, ViewChild, ViewChildren, OnInit, OnDestroy, Inject, Directive, QueryList\r\n} from \"@angular/core\";\r\n\r\nimport {DatePipe} from '@angular/common'\r\n\r\nimport { BehaviorSubject, Subscription} from \"rxjs\";\r\nimport {first} from \"rxjs/operators\";\r\nimport { IRowNode } from 'ag-grid-community';\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {AttributeValue} from \"../model/attribute-value.entity\";\r\nimport {AttributeChoice} from \"../model/attribute-choice.entity\";\r\nimport {AttributeLongText} from \"../model/attribute-long-text.entity\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\nimport {DictionaryEntriesDTO} from \"../model/dictionary-entries.dto\";\r\nimport {DateUtil} from \"../date/date-util\";\r\nimport {NativeSelectComponent} from \"@huntsman-cancer-institute/input\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {GridApi, RowDoubleClickedEvent, RowNode, RowSelectedEvent, AgGridEvent, GridSizeChangedEvent, ModelUpdatedEvent} from \"ag-grid-community\";\r\n\r\n/**\r\n * The base class for an attribute. Attributes are iterated over by container. These may be in traditional absolute\r\n * positioning, flex positioning, or an edit mode as a column in a modal. Regardless of the template, the fundamental\r\n * needs of setting up the attribute values and persisting data are the same. So this class provides base functionality\r\n * and the components that extend it provide the template and may also extend the functionality.\r\n *\r\n * Types:\r\n * LINE\r\n * NLP_LINK\r\n * DICT\r\n * GA\r\n * LABEL\r\n * DT\r\n * AC\r\n * TXT\r\n * D\r\n * S\r\n * I\r\n * CB\r\n * B\r\n * N\r\n * EB\r\n */\r\n@Directive({\r\n selector: \"hci-attribute-base\"\r\n }\r\n)\r\nexport class AttributeBase implements OnInit, OnDestroy {\r\n\r\n @Input() attribute: GraphicalAttribute;\r\n @Input() internalValues: boolean = false;\r\n @Input() editInline: boolean = true;\r\n @Input() groupAttributeRowId: number = undefined;\r\n\r\n @Output() resortColumns: EventEmitter<any> = new EventEmitter<any>();\r\n\r\n @ViewChild(\"inputRef\", {static: false}) inputRef: ElementRef;\r\n @ViewChild(\"nativeSelectRef\", {static: false}) nativeSelectRef: NativeSelectComponent;\r\n\r\n attributeValues: AttributeValue[] = [];\r\n attributeChoices: AttributeChoice[];\r\n\r\n childAttributes: GraphicalAttribute[];\r\n gridData: any[];\r\n gridColumns: any[];\r\n\r\n //Used for the edit group row template\r\n editGroupAttributeRowId: number;\r\n editGroupRowAttributes: GraphicalAttribute[];\r\n\r\n dictionaryEntries: any[];\r\n\r\n width: number = 0;\r\n\r\n attributeService: AttributeService;\r\n elementRef: ElementRef;\r\n renderer: Renderer2;\r\n\r\n gridApi: GridApi;\r\n\r\n gridOptions = {\r\n headerHeight: 23,\r\n rowHeight: 23,\r\n rowStyle: {\r\n 'font-family': 'Prompt, sans-serif',\r\n 'color': '#3d7a99'\r\n },\r\n enableCellTextSelection: true,\r\n ensureDomOrder: true,\r\n suppressColumnVirtualisation: false\r\n };\r\n\r\n subscriptions: Subscription = new Subscription();\r\n\r\n constructor(attributeService: AttributeService, elementRef: ElementRef, renderer: Renderer2, private modalService: NgbModal) {\r\n this.attributeService = attributeService;\r\n this.elementRef = elementRef;\r\n this.renderer = renderer;\r\n }\r\n\r\n /**\r\n * Get any attribute values for this attribute. If a complex attribute like a grid, set it up.\r\n */\r\n ngOnInit(): void {\r\n this.init();\r\n\r\n this.subscriptions.add(this.attributeService.getContainerUpdated().subscribe((updated: boolean) => {\r\n this.init();\r\n }));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n onGridReady(params : any) {\r\n this.gridApi = params.api;\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n\r\n onModelUpdated(_event: ModelUpdatedEvent) {\r\n if (this.gridApi) {\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n }\r\n\r\n onGridSizeChanged(_event: GridSizeChangedEvent) {\r\n if (this.gridApi) {\r\n this.gridApi.sizeColumnsToFit();\r\n }\r\n }\r\n\r\n /**\r\n * Pulls the attribute values associated with this attribute and performs any specialized initialization such as for\r\n * the grid or multi choice.\r\n */\r\n init(): void {\r\n if (isDevMode()) {\r\n console.debug(\"Attribute.init: \" + this.attribute.idAttribute);\r\n }\r\n\r\n this.gridData = undefined;\r\n this.gridColumns = undefined;\r\n this.attributeChoices = undefined;\r\n this.width = this.attributeService.getWidth();\r\n\r\n if (!this.internalValues) {\r\n this.attributeValues = this.attributeService.getAttributeValues(this.attribute.idAttribute, this.groupAttributeRowId);\r\n }\r\n\r\n if (this.attributeValues.length === 0 && this.attribute.codeAttributeDataType !== \"GA\" && this.attribute.isMultiValue !== \"Y\") {\r\n // TODO: Decide when to persist this to get the idAttributeValue.\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: this.attribute.codeAttributeDataType,\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttribute: this.attribute.idAttribute,\r\n idGroupAttribute: this.attribute.idGroupAttribute,\r\n groupAttributeRowId: this.groupAttributeRowId\r\n });\r\n }\r\n\r\n if (this.attribute.codeAttributeDataType === \"GA\") {\r\n this.initializeGrid();\r\n } else if (this.attribute.codeAttributeDataType === \"AC\") {\r\n this.initializeAttributeChoices();\r\n } else if (this.attribute.codeAttributeDataType === \"TXT\" && !this.attributeValues[0].valueLongText) {\r\n this.attributeValues[0].valueLongText = <AttributeLongText>{\r\n idLongText: undefined,\r\n textData: undefined\r\n };\r\n }\r\n else if (this.attribute.codeAttributeDataType === \"DICT\") {\r\n this.loadDictionaryEntries(this.attribute, this.attributeValues, this.groupAttributeRowId);\r\n }\r\n else if (this.attribute.codeAttributeDataType === \"DT\") {\r\n //Make a proper date for the date time component\r\n this.attributeValues[0].date = new Date(this.attributeValues[0].valueDateTime);\r\n }\r\n\r\n }\r\n\r\n\r\n loadDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId: number) {\r\n //Adding this to subscriptions is probably unnecessary, since the first() will unsubscribe. We only get one value.\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, values, groupAttributeRowId).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n this.dictionaryEntries = dto.entries;\r\n\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.initializeMultiDictEntries();\r\n }\r\n\r\n //If there is a referenced attribute this means this attribute is filtered by another attribute.\r\n if (dto.referencedAttribute) {\r\n //Need to subscribe to attribute pushes, in order to update our FILTERED DICTIONARY when the referenced attribute was changed\r\n this.subscriptions.add(this.attributeService.getAttributeValuePushedSubject().subscribe((av: AttributeValue) => {\r\n //If it is the referenced attribute, (and for the same row if this is a grid row) we need to update the dictionary entries\r\n if (av.idAttribute === dto.referencedAttribute.idAttribute\r\n && ((av.groupAttributeRowId == null && this.groupAttributeRowId == null) || av.groupAttributeRowId === this.groupAttributeRowId)) {\r\n\r\n //Make another call to get the dictionary entries\r\n //Note that when passing in the referenceAttributeValue, the resulting DTO won't contain a referencedAttribute. A second subscription won't be created.\r\n this.reloadFilteredDictionaryEntries(attribute, values, groupAttributeRowId, av);\r\n }\r\n }));\r\n }\r\n }));\r\n }\r\n\r\n reloadFilteredDictionaryEntries(attribute: Attribute, values: AttributeValue[], groupAttributeRowId: number, referencedAttributeValue: AttributeValue) {\r\n //Adding this to subscriptions is probably unnecessary, since the first() will unsubscribe. We only get one value.\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, values, groupAttributeRowId, referencedAttributeValue).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n this.dictionaryEntries = dto.entries;\r\n\r\n //Multi\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.initializeMultiDictEntries();\r\n\r\n //Probably need to slice out multi values that don't apply\r\n this.deleteFilteredOutDictionaryValues();\r\n }\r\n //Single\r\n else {\r\n //Maybe need to clear out the value if it no longer applies\r\n if (! dto.entriesIncludeSelectedValue) {\r\n this.valueDictChange(undefined);\r\n }\r\n }\r\n }));\r\n }\r\n\r\n deleteFilteredOutDictionaryValues() {\r\n //Iterate existing values\r\n for (let attributeValue of this.attributeValues) {\r\n let applicable:boolean = false;\r\n\r\n //Does it exist in new dicationryEntries?\r\n for (let entry of this.dictionaryEntries) {\r\n if (attributeValue.valueIdDictionary && entry.value === attributeValue.valueIdDictionary) {\r\n //keep\r\n applicable = true;\r\n break;\r\n }\r\n }\r\n\r\n if (! applicable) {\r\n //Get rid of values that no longer apply\r\n this.attributeService.spliceAttributeValueDict(this.attribute, attributeValue.valueIdDictionary)\r\n }\r\n }\r\n }\r\n\r\n initializeMultiDictEntries() {\r\n for (let entry of this.dictionaryEntries) {\r\n entry.checked = false;\r\n\r\n for (let attributeValue of this.attributeValues) {\r\n if (attributeValue.valueIdDictionary && entry.value === attributeValue.valueIdDictionary) {\r\n entry.checked = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * Set a transient value on the attributeChoice to keep track of selected values.\r\n */\r\n initializeAttributeChoices() {\r\n this.attributeChoices = this.attribute.attributeChoices.slice();\r\n\r\n for (let attributeChoice of this.attributeChoices) {\r\n attributeChoice.value = false;\r\n\r\n for (let attributeValue of this.attributeValues) {\r\n if (attributeValue.valueAttributeChoice && attributeChoice.idAttributeChoice === attributeValue.valueAttributeChoice.idAttributeChoice) {\r\n attributeChoice.value = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * If the attribute is a grid, find its children attributes which make up the columns and generate data based on all\r\n * the attribute values by their groupAttributeRowId.\r\n */\r\n initializeGrid(): void {\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid\");\r\n }\r\n\r\n let columns: any[] = [];\r\n let data: any[] = [];\r\n\r\n if (!this.attribute.attributes) {\r\n return;\r\n }\r\n\r\n this.childAttributes = <GraphicalAttribute[]>this.attribute.attributes.filter((attribute: GraphicalAttribute) => {\r\n return attribute[\"tabOrder\"] !== undefined || attribute[\"w\"] !== undefined;\r\n }).sort((a: GraphicalAttribute, b: GraphicalAttribute) => {\r\n if (a.tabOrder < b.tabOrder) {\r\n return -1;\r\n } else if (a.tabOrder > b.tabOrder) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Grid Attributes: \" + this.childAttributes.length);\r\n }\r\n\r\n this.initializeGridColumns(this.childAttributes, columns);\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Columns: \" + columns.length);\r\n console.debug(columns);\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n attributeValues: \" + this.attributeValues.length);\r\n console.debug(this.attributeValues);\r\n }\r\n\r\n\r\n let sortedRowValues = this.attributeValues.filter((attributeValue) => attributeValue.idGroupAttribute = this.attribute.idAttribute)\r\n .sort((a: AttributeValue, b: AttributeValue) => {\r\n if (a.groupAttributeRowId < b.groupAttributeRowId) {\r\n return -1;\r\n } else if (a.groupAttributeRowId > b.groupAttributeRowId) {\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n });\r\n\r\n let n: number = 0;\r\n for (let datum of sortedRowValues) {\r\n if (datum.groupAttributeRowId > n) {\r\n n = datum.groupAttributeRowId;\r\n data.push({\r\n groupAttributeRowId: datum.groupAttributeRowId\r\n });\r\n }\r\n }\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: n Data: \" + data.length);\r\n }\r\n\r\n this.initializeGridValues(data, sortedRowValues);\r\n\r\n if (isDevMode()) {\r\n console.debug(\"AttributeComponent.initializeGrid: Data\");\r\n console.debug(data);\r\n }\r\n\r\n this.gridColumns = columns;\r\n this.gridData = data;\r\n }\r\n\r\n /**\r\n * Generate a column array based on the grouped attributes within the grid.\r\n *\r\n * @param {Attribute[]} attributes\r\n * @param {any[]} columns\r\n */\r\n initializeGridColumns(attributes: GraphicalAttribute[], columns: any[]) {\r\n\r\n /*\r\n columns.push({\r\n field: \"groupAttributeRowId\", isKey: true, visible: false\r\n });*/\r\n\r\n for (const [i, attribute] of attributes.entries()) {\r\n let column: any = {\r\n field: attribute.attributeName,\r\n headerName: attribute.displayName,\r\n editable: false,\r\n sortable: true,\r\n resizable: true,\r\n filter: false,\r\n width: attribute.w,\r\n };\r\n\r\n // the last column should auto fill the remaining space\r\n if (attribute.w && i < attributes.length - 1) {\r\n column.suppressSizeToFit = true;\r\n }\r\n\r\n if (attribute.codeAttributeDataType === \"D\") {\r\n column.comparator = DateUtil.dateComparator;\r\n }\r\n else if (attribute.codeAttributeDataType === \"DT\") {\r\n column.comparator = DateUtil.dateTimeComparator;\r\n }\r\n\r\n columns.push(column);\r\n }\r\n }\r\n\r\n /**\r\n * After the columns are created, assigned\r\n *\r\n * @param {any[]} data\r\n */\r\n initializeGridValues(data: any[], attributeValues: AttributeValue[]): void {\r\n for (let datum of attributeValues) {\r\n let attribute: Attribute = this.childAttributes.filter((attribute: Attribute) => {\r\n return attribute.idAttribute === datum.idAttribute;\r\n })[0];\r\n\r\n //Make a rowValue object with values for each attribute of the row\r\n let rowValue: any = data.find((row) => row.groupAttributeRowId === datum.groupAttributeRowId);\r\n if (! rowValue) {\r\n rowValue = {groupAttributeRowId: datum.groupAttributeRowId};\r\n data.push(rowValue);\r\n }\r\n\r\n if (!attribute) {\r\n console.error(\"Attribute.initializeGrid: idAttribute \" + datum.idAttribute + \" not found.\");\r\n continue;\r\n }\r\n\r\n if (attribute.codeAttributeDataType === \"DT\") {\r\n rowValue[attribute.attributeName] = new DatePipe(\"en-US\").transform(new Date(datum.valueDateTime), \"M/d/yy, h:mm:ss a\");\r\n }\r\n else if (attribute.codeAttributeDataType === \"AC\" && attribute.isMultiValue === \"N\") {\r\n if (datum.valueAttributeChoice) {\r\n rowValue[attribute.attributeName] = datum.valueAttributeChoice.choice;\r\n }\r\n }\r\n else if (attribute.codeAttributeDataType === \"AC\" && attribute.isMultiValue === \"Y\") {\r\n //Concatenated display\r\n if (rowValue[attribute.attributeName]) {\r\n rowValue[attribute.attributeName] = rowValue[attribute.attributeName] + \", \" + datum.valueAttributeChoice.choice;\r\n } else {\r\n rowValue[attribute.attributeName] = datum.valueAttributeChoice.choice;\r\n }\r\n }\r\n else if (attribute.codeAttributeDataType === \"DICT\") {\r\n this.subscriptions.add(this.attributeService.getDictionaryEntries(attribute, attributeValues, datum.groupAttributeRowId).pipe(first()).subscribe((dto: DictionaryEntriesDTO) => {\r\n let entry = dto.entries.find((entry:any) => entry.value === datum.valueIdDictionary);\r\n\r\n if (entry) {\r\n rowValue[attribute.attributeName] = dto.entries.find((entry:any) => entry.value === datum.valueIdDictionary).display;\r\n if (this.gridApi) {\r\n this.gridApi.refreshCells();\r\n }\r\n }\r\n }));\r\n }\r\n else if (attribute.codeAttributeDataType === \"S\" || attribute.codeAttributeDataType === \"B\" || attribute.codeAttributeDataType === \"EB\" || attribute.codeAttributeDataType === \"CB\") {\r\n rowValue[attribute.attributeName] = datum.valueString;\r\n }\r\n else {\r\n rowValue[attribute.attributeName] = datum.value;\r\n }\r\n }\r\n }\r\n\r\n /**\r\n * For override.\r\n */\r\n refresh(): void {\r\n if (isDevMode()) {\r\n console.debug(\"Attribute.refresh: \" + this.attribute.idAttribute);\r\n }\r\n }\r\n\r\n\r\n\r\n valueStringChange(value: any): void {\r\n if (value === \"\") {\r\n value = undefined;\r\n }\r\n\r\n this.attributeValues[0].valueString = value;\r\n this.attributeValues[0].value = value;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueCheckboxChange(event: any) {\r\n if (event.target.checked) {\r\n this.attributeValues[0].valueString = \"Y\";\r\n }\r\n else {\r\n this.attributeValues[0].valueString = \"N\";\r\n }\r\n this.attributeValues[0].value = this.attributeValues[0].valueString;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueIntegerChange(value: any): void {\r\n this.attributeValues[0].valueInteger = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueNumericChange(value: any): void {\r\n this.attributeValues[0].valueNumeric = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueDictChange(value: any): void {\r\n this.attributeValues[0].valueIdDictionary = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueDateChange(value: any): void {\r\n this.attributeValues[0].valueDateTime = value;\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueTextChange(value: any): void {\r\n if (this.attributeValues[0].valueLongText) {\r\n this.attributeValues[0].valueLongText.textData = value;\r\n } else {\r\n this.attributeValues[0].valueLongText = <AttributeLongText>{\r\n idLongText: undefined,\r\n textData: value\r\n };\r\n }\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueChoiceChange(value: any): void {\r\n this.attributeValues[0].valueAttributeChoice = this.attributeChoices.find((attr) => attr.idAttributeChoice === value);\r\n this.attributeValues[0].value = (value)?value.toString():undefined;\r\n\r\n this.attributeService.pushAttributeValue(this.attributeValues[0]);\r\n }\r\n\r\n valueMultiChoiceChange(attributeChoice: any): void {\r\n attributeChoice.value = !attributeChoice.value;\r\n\r\n //Remove\r\n if (!attributeChoice.value) {\r\n this.attributeService.spliceAttributeValueChoice(this.attribute, attributeChoice);\r\n }\r\n //Add\r\n else {\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: \"AC\",\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttributeValueSet: this.attributeService.getAttributeValueSet().getValue().idAttributeValueSet,\r\n idAttribute: this.attribute.idAttribute,\r\n valueAttributeChoice: attributeChoice,\r\n groupAttributeRowId: this.groupAttributeRowId,\r\n idGroupAttribute: this.attribute.idGroupAttribute\r\n });\r\n\r\n this.attributeService.pushAttributeValueMultiChoice(this.attributeValues[this.attributeValues.length - 1]);\r\n }\r\n }\r\n\r\n valueMultiDictChange(entry: any): void {\r\n entry.checked = !entry.checked;\r\n\r\n //Remove\r\n if (!entry.checked) {\r\n this.attributeService.spliceAttributeValueDict(this.attribute, entry.value);\r\n }\r\n //Add\r\n else {\r\n this.attributeValues.push(<AttributeValue>{\r\n codeAttributeDataType: \"DICT\",\r\n idAttributeValue: this.attributeService.getUniqueId(),\r\n idAttributeValueSet: this.attributeService.getAttributeValueSet().getValue().idAttributeValueSet,\r\n idAttribute: this.attribute.idAttribute,\r\n valueIdDictionary: entry.value,\r\n groupAttributeRowId: this.groupAttributeRowId,\r\n idGroupAttribute: this.attribute.idGroupAttribute\r\n });\r\n\r\n this.attributeService.pushAttributeValueMultiDict(this.attributeValues[this.attributeValues.length - 1]);\r\n }\r\n }\r\n\r\n\r\n addGridRow(modal: TemplateRef<any>, idGroupAttribute: number) {\r\n console.log(\"add grid row: \" + idGroupAttribute);\r\n\r\n //Get a negative ID, so we know this is a new row\r\n this.editGroupAttributeRowId = this.attributeService.getUniqueId();\r\n this.editGroupRowAttributes = this.childAttributes;\r\n\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.saveGridRow(idGroupAttribute);\r\n } else if (result === \"Cancel\") {\r\n this.cancelEditCodGridRow();\r\n }\r\n }, (reason) => {});\r\n }\r\n\r\n editGridRow(modal: TemplateRef<any>, idGroupAttribute: number, event: RowDoubleClickedEvent) {\r\n //EditInline is actually the ONLY way this can be editable, so this is really whether the grid is editable, at all\r\n if (this.editInline && !(this.attribute.isActive === 'N')) {\r\n this.editGroupAttributeRowId = event.data.groupAttributeRowId;\r\n this.editGroupRowAttributes = this.childAttributes;\r\n\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.saveGridRow(idGroupAttribute);\r\n } else if (result === \"Cancel\") {\r\n this.cancelEditCodGridRow();\r\n }\r\n }, (reason) => {});\r\n }\r\n }\r\n\r\n removeGridRow(idGroupAttribute: number) {\r\n console.log(\"remove grid row: \" + idGroupAttribute);\r\n //let selectedColumns: RowNode[] = this.gridApi.getSelectedNodes();\r\n const selectedColumns: IRowNode<any>[] = this.gridApi.getSelectedNodes();\r\n\r\n if (selectedColumns.length > 0) {\r\n this.attributeService.deleteGridRowAttributeValues(idGroupAttribute, selectedColumns[0].data.groupAttributeRowId);\r\n }\r\n }\r\n\r\n cancelEditCodGridRow() {\r\n this.attributeService.clearUpdatedGridRowAttributeValues(this.editGroupAttributeRowId);\r\n this.editGroupRowAttributes = [];\r\n this.editGroupAttributeRowId = undefined;\r\n }\r\n\r\n\r\n /**\r\n * Values for a new grid row are stored separately. This function will add that data to the current grid data and\r\n * push the values to the service.\r\n */\r\n saveGridRow(idGroupAttribute: number): void {\r\n console.log(\"save grid row\");\r\n\r\n this.attributeService.saveGridRowAttributeValues(idGroupAttribute, this.editGroupAttributeRowId);\r\n\r\n this.editGroupAttributeRowId = undefined;\r\n this.editGroupRowAttributes = [];\r\n }\r\n\r\n private comboFilterValueGetter(params): any {\r\n let value = params.data[params.colDef.field];\r\n if (value) {\r\n let option = ((params.colDef as any).selectOptions as any[]).find((entry) => (entry[params.colDef.selectOptionsValueField] === value));\r\n return option ? option[params.colDef.selectOptionsDisplayField] : \"\";\r\n }\r\n return \"\";\r\n }\r\n}\r\n","import {\r\n Component,\r\n ElementRef,\r\n Renderer2\r\n} from '@angular/core';\r\n\r\nimport {NgbModal} from '@ng-bootstrap/ng-bootstrap';\r\nimport {AttributeBase} from './attribute-base';\r\nimport {AttributeService} from '../services/attribute.service';\r\n\r\n/**\r\n * This component is specifically designed to exist in a modal for editing.\r\n * This is different from the flex attribute because components such as the grid need extra configuration for editing.\r\n */\r\n@Component(\r\n {\r\n selector: 'hci-attribute-edit',\r\n template:\r\n `\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n\r\n <div *ngIf=\"(attribute.h == undefined || (attribute.h && attribute.h <= 25))\" class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"\r\n />\r\n </div>\r\n\r\n <div *ngIf=\"(attribute.h && attribute.h > 25)\" class=\"d-flex col-md-6\">\r\n <textarea\r\n #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n style=\"width: 500px; height: 125px; resize: none;\"\r\n >\r\n </textarea>\r\n </div>\r\n\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n\r\n <textarea\r\n #inputRef\r\n class=\"custom-input-text\"\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (ngModelChange)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n style=\"width: 500px; height: 125px; resize: none;\"\r\n >\r\n </textarea>\r\n\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueNumeric\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n class=\"custom-input-text\"\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueInteger\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n matInput\r\n class=\"custom-input-text\"\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n attr.aria-label=\"hci-ng-attribute-edit-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\"\r\n >\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n matInput\r\n class=\"custom-input-text\"\r\n name=\"valueDateTime\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-edit-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <input #inputRef\r\n type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-edit-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select [ngModel]=\"attributeValues[0].valueString\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select [ngModel]=\"attributeValues[0].valueString\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"attributeValues[0].valueString === 'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column col-md-6\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n class=\"form-check-input m-0 checkbox mt-auto mb-auto me-2\" attr.aria-label=\"hci-ng-attribute-edit-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{attributeChoice.choice}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column col-md-6\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-edit-input-dictionary-choice-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{entry.display}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-6\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex col-md-6\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex col-md-12\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div style=\"margin-left: auto;\">\r\n <button class=\"btn-ga\" (click)=\"addGridRow(editGridModal, attribute.idAttribute)\">\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n <button class=\"btn-ga\" (click)=\"removeGridRow(attribute.idAttribute)\">\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex col-md-12\">\r\n <ag-grid-angular #gridAttribute\r\n class=\"ag-theme-alpine\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" (click)=\"close('Save')\">Save</button>\r\n <button class=\"btn btn-primary\" (click)=\"close('Cancel')\">Cancel</button>\r\n </div>\r\n </ng-template>\r\n `,\r\n styles: [\r\n `\r\n .hci-cod button.mat-icon-button.mat-button-base {\r\n height: 20px;\r\n width: 20px;\r\n line-height: unset;\r\n }\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n input[type=\"checkbox\"].form-check-input {\r\n min-width: 16px;\r\n min-height: 16px;\r\n }\r\n\r\n input.custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n `\r\n ]\r\n }\r\n)\r\nexport class AttributeEditComponent extends AttributeBase {\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n // dictionaryEndpoint = this.attributeService.dictionaryEndpoint;\r\n\r\n constructor(attributeService: AttributeService, elementRef: ElementRef, renderer: Renderer2, modalService: NgbModal) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n init(): void {\r\n super.init();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n }\r\n }\r\n}\r\n","import {\r\n ChangeDetectorRef,\r\n Component,\r\n ElementRef,\r\n Renderer2,\r\n ViewChild,\r\n ViewEncapsulation\r\n} from \"@angular/core\";\r\n\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {AttributeBase} from \"./attribute-base\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {NativeSelectComponent} from \"@huntsman-cancer-institute/input\";\r\n\r\n/**\r\n * The attribute for absolute positioning. This component has its width, height, x and y positioning set based upon\r\n * the attribute definition.\r\n */\r\n@Component(\r\n {\r\n selector: \"hci-attribute-absolute\",\r\n encapsulation: ViewEncapsulation.None,\r\n template:\r\n `\r\n <div class=\"drag-select\" style=\"\"></div>\r\n\r\n <!-- Line -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LINE'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-line i-height\">\r\n <div class=\"d-flex cod-line me-1 mt-auto mb-auto flex-shrink-0\"></div>\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex me-1 cod-label flex-shrink-0\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex cod-line grow mt-auto mb-auto\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Label -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LABEL'\">\r\n <div #inputRef #attributeRef\r\n class=\"d-flex flex-column\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-label mt-auto mb-auto\">\r\n {{attribute.displayName}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-s i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"(attribute.h <= 25)\" class=\"d-flex flex-grow-1\">\r\n <input\r\n #inputRef\r\n type=\"text\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\"attr.aria-label=\"hci-ng-attribute-absolute-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n <div *ngIf=\"(attribute.h > 25)\" class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-txt i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (ngModelChange)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-cb i-height align-items-center\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-right-label\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div #inputRef class=\"d-flex flex-grow-1 align-items-center me-1\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-absolute-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-n i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueNumeric\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-i i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [ngModel]=\"attributeValues[0].valueInteger\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-d i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 calendar-container\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-absolute-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dt i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDateTime\"\r\n class=\"form-control custom-input-text\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-absolute-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-b i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-eb i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\">No</option>\r\n <option [ngValue]=\"'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-n i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y i-height\"\r\n style=\"height: inherit;\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column y-auto\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-absolute-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{ attributeChoice.choice }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y i-height\"\r\n style=\"height: inherit;\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-column y-auto\" style=\"row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-absolute-input-dictionary-multiple-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{ entry.display }}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dict i-height\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef class=\"d-flex flex-column cod-type-ga i-height\">\r\n <div *ngIf=\"attribute.idAttribute\" class=\"d-flex cod-top-label me-1\" [style.width]=\"'max-content'\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"editInline\" style=\"margin-left: auto;\" class=\"ps-2 pb-2\">\r\n\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"addGridRow(editGridModal, attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"removeGridRow(attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <ag-grid-angular #gridComponent\r\n class=\"ag-theme-balham\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled)\"\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Save')\"\r\n >\r\n Save\r\n </button>\r\n\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Cancel')\"\r\n >Cancel\r\n </button>\r\n </div>\r\n </ng-template>\r\n `\r\n ,\r\n styles: [\r\n `\r\n .hci-cod button.mat-icon-button.mat-button-base {\r\n height: 20px;\r\n width: 20px;\r\n line-height: unset;\r\n }\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .calendar-container {\r\n float: left;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n height: 1rem;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n .cod-type-s .custom-input-text, .cod-type-n .custom-input-text,\r\n .cod-type-i .custom-input-text, .cod-type-txt .custom-input-text,\r\n .cod-type-d .custom-input-text, .cod-type-dt .custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n `\r\n ]\r\n }\r\n)\r\nexport class AttributeAbsoluteComponent extends AttributeBase {\r\n\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n @ViewChild('nativeSelectRef', {static: true})\r\n nativeSelectComponent: NativeSelectComponent;\r\n\r\n constructor(\r\n attributeService: AttributeService,\r\n elementRef: ElementRef,\r\n renderer: Renderer2,\r\n modalService: NgbModal,\r\n private changeDetectorRef: ChangeDetectorRef\r\n ) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n ngOnInit(): void {\r\n super.ngOnInit();\r\n\r\n if (this.editInline) {\r\n this.renderer.listen(this.elementRef.nativeElement, \"mousemove\", (event) => this.onMouseMove(event));\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.refresh();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n this.changeDetectorRef.detectChanges();\r\n }\r\n }\r\n\r\n /**\r\n * In the absolute case, upon refresh reset the position and size of the attribute.\r\n */\r\n refresh(): void {\r\n super.refresh();\r\n\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"position\", \"absolute\");\r\n\r\n if (this.attribute.x !== undefined) {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"left\", this.attribute.x + \"px\");\r\n }\r\n if (this.attribute.y !== undefined) {\r\n if (this.attribute.codeAttributeDataType.toUpperCase() === \"LINE\") {\r\n // It appears the legacy metabuilder offset lines by 8 pixels\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"top\", (this.attribute.y - 8) + \"px\");\r\n } else {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"top\", this.attribute.y + \"px\");\r\n }\r\n }\r\n\r\n // Checkboxes don't need a width, the select border should be the size of its label\r\n if (this.attribute.w !== undefined && this.attribute.codeAttributeDataType.toUpperCase() !== \"CB\") {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"width\", this.attribute.w + \"px\");\r\n }\r\n\r\n if (this.attribute.codeAttributeDataType === \"LINE\") {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"height\", \"16px\");\r\n } else if (this.attribute.h !== undefined) {\r\n if (!this.editInline) {\r\n this.renderer.setStyle(this.elementRef.nativeElement, \"height\", this.attribute.h + \"px\");\r\n }\r\n if (this.inputRef && this.inputRef.nativeElement) {\r\n this.renderer.setStyle(this.inputRef.nativeElement, \"height\", this.attribute.h + \"px\");\r\n }\r\n if (this.nativeSelectRef) {\r\n this.nativeSelectRef.setHeight(this.attribute.h);\r\n }\r\n\r\n if (this.attribute.isMultiValue === 'Y') {\r\n this.renderer.setStyle(this.elementRef.nativeElement, 'height', this.attribute.h + 'px');\r\n }\r\n\r\n }\r\n }\r\n\r\n /**\r\n * Add cursor styling when the mouse is over the selected attribute.\r\n *\r\n * @param {MouseEvent} event\r\n */\r\n onMouseMove(event: MouseEvent): void {\r\n if (this.elementRef.nativeElement.classList.contains(\"selected\")) {\r\n let sx: number = this.elementRef.nativeElement.getBoundingClientRect().left;\r\n let sy: number = this.elementRef.nativeElement.getBoundingClientRect().top;\r\n\r\n if (Math.abs(event.clientX - (sx + this.elementRef.nativeElement.offsetWidth)) <= 10) {\r\n this.renderer.addClass(this.elementRef.nativeElement, \"e-resize\");\r\n return;\r\n } else if (Math.abs(event.clientY - (sy + this.elementRef.nativeElement.offsetHeight)) <= 6) {\r\n this.renderer.addClass(this.elementRef.nativeElement, \"n-resize\");\r\n return;\r\n }\r\n }\r\n\r\n this.renderer.removeClass(this.elementRef.nativeElement, \"e-resize\");\r\n this.renderer.removeClass(this.elementRef.nativeElement, \"n-resize\");\r\n }\r\n}\r\n","import {Component, ElementRef, Inject, Renderer2, ViewEncapsulation} from \"@angular/core\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\n\r\n\r\nimport {AttributeBase} from \"./attribute-base\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {Attribute} from \"../model/attribute.entity\";\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n/**\r\n * The view for attributes organized in a flex layout. This will arrange all attributes in a four column layout\r\n * with grids taking up all 12 columns. The attributes here will fill the this parent component which defines the\r\n * column size.\r\n */\r\n@Component({\r\n selector: \"hci-attribute-flex\",\r\n encapsulation: ViewEncapsulation.None,\r\n template: `\r\n <!-- Line -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LINE'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-row cod-type-line\">\r\n <div class=\"d-flex cod-line me-1 mt-auto mb-auto flex-shrink-0\"></div>\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1 flex-shrink-0\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex cod-line grow mt-auto mb-auto\"></div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Label -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'LABEL'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-label\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'S'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-s\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{ attribute.displayName }}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"text\"\r\n [(ngModel)]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-string-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'TXT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-txt\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <textarea\r\n #inputRef\r\n type=\"text\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [ngModel]=\"attributeValues[0].valueLongText.textData\"\r\n (change)=\"valueTextChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\">\r\n </textarea>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'CB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-cb\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"checkbox\"\r\n [checked]=\"attributeValues[0].valueString === 'Y'\"\r\n (change)=\"valueCheckboxChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-check-input m-0\" attr.aria-label=\"hci-ng-attribute-flex-input-checkbox-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-n\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [(ngModel)]=\"attributeValues[0].valueNumeric\"\r\n (ngModelChange)=\"valueNumericChange($event)\"\r\n\t\t\t\t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-numeric-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'I'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-i\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n type=\"number\"\r\n [(ngModel)]=\"attributeValues[0].valueInteger\"\r\n (ngModelChange)=\"valueIntegerChange($event)\"\r\n\t\t\t\t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-integer-{{hciNgAttributeAbsoluteInputDisplayName}}\"/>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'D'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-d\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDate\"\r\n [(ngModel)]=\"attributeValues[0].valueDate\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [matDatepicker]=\"valueDate\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-control custom-input-text\" attr.aria-label=\"hci-ng-attribute-flex-input-date-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"valueDate\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <mat-datepicker #valueDate></mat-datepicker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DT'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dt\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <input #inputRef\r\n matInput\r\n name=\"valueDateTime\"\r\n class=\"form-control custom-input-text\"\r\n [(ngModel)]=\"attributeValues[0].date\"\r\n (ngModelChange)=\"valueDateChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n [ngxMatDatetimePicker]=\"dtpicker\" attr.aria-label=\"hci-ng-attribute-flex-input-date-time-{{hciNgAttributeAbsoluteInputDisplayName}}\">\r\n <mat-datepicker-toggle matSuffix [for]=\"dtpicker\" class=\"cod-dp-toggle\"></mat-datepicker-toggle>\r\n <ngx-mat-datetime-picker #dtpicker [showSeconds]=\"true\"></ngx-mat-datetime-picker>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'B'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-b\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'EB'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-eb\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueString\"\r\n (ngModelChange)=\"valueStringChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option [ngValue]=\"'Y'\" [selected]=\"attributeValues[0].valueString === 'Y'\">Yes</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"attributeValues[0].valueString === 'N'\">No</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"attributeValues[0].valueString === 'U'\">Unknown</option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-n\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select\r\n [ngModel]=\"(attributeValues[0].valueAttributeChoice)?attributeValues[0].valueAttributeChoice.idAttributeChoice:undefined\"\r\n (ngModelChange)=\"valueChoiceChange($event)\"\r\n \t [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let attributeChoice of attributeChoices\"\r\n [ngValue]=\"attributeChoice.idAttributeChoice\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'AC' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 flex-column y-auto\" style=\"max-height: 125px; row-gap: 5px\">\r\n <ng-container *ngFor=\"let attributeChoice of attributeChoices\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"attributeChoice.value\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiChoiceChange(attributeChoice)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-flex-input-choice-multiple-{{attributeChoice.choice}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{attributeChoice.choice}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'Y'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-ac-y\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1 flex-column y-auto\" style=\"max-height: 125px; row-gap: 5px\">\r\n <ng-container *ngFor=\"let entry of dictionaryEntries\">\r\n <div class=\"d-flex flex-shrink-0\">\r\n <input type=\"checkbox\"\r\n [checked]=\"entry.checked\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n (change)=\"valueMultiDictChange(entry)\"\r\n class=\"form-check-input m-0 checkbox\" attr.aria-label=\"hci-ng-attribute-flex-input-dictionary-choice-{{entry.display}}\"/>\r\n <div class=\"cod-label ps-1\">\r\n {{entry.display}}\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'DICT' && attribute.isMultiValue === 'N'\">\r\n <div #attributeRef\r\n class=\"d-flex flex-column cod-type-dict\">\r\n <div *ngIf=\"attribute.displayName\" class=\"d-flex cod-top-label me-1\">\r\n {{attribute.displayName}}\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <select #inputRef\r\n [ngModel]=\"attributeValues[0].valueIdDictionary\"\r\n (ngModelChange)=\"valueDictChange($event)\"\r\n [disabled]=\"!editInline || attribute.isCalculated === 'Y' || attribute.isActive === 'N'\"\r\n class=\"form-select edit-renderer custom-caret\">\r\n <option [ngValue]=\"undefined\"></option>\r\n <option *ngFor=\"let entry of dictionaryEntries\"\r\n [ngValue]=\"entry.value\">\r\n {{ entry.display }}\r\n </option>\r\n </select>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType === 'GA'\">\r\n <div #attributeRef class=\"d-flex flex-column cod-type-ga\">\r\n <div *ngIf=\"attribute.idAttribute\" class=\"d-flex cod-top-label mr-1\">\r\n <div>\r\n {{attribute.displayName}}\r\n </div>\r\n <div *ngIf=\"editInline\" style=\"margin-left: auto;\">\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"addGridRow(editGridModal, attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-plus fa-xs\"></i>\r\n </span>\r\n </button>\r\n <button\r\n class=\"btn-ga\"\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled) || attribute.isActive === 'N'\"\r\n (click)=\"removeGridRow(attribute.idAttribute)\"\r\n >\r\n <span class=\"ga-icon\">\r\n <i class=\"fas fa-minus fa-xs\"></i>\r\n </span>\r\n </button>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1\">\r\n <ag-grid-angular #gridAttribute\r\n class=\"ag-theme-alpine\"\r\n (gridReady)=\"this.onGridReady($event)\"\r\n (modelUpdated)=\"onModelUpdated($event)\"\r\n (gridSizeChanged)=\"onGridSizeChanged($event)\"\r\n (rowDoubleClicked)=\"editGridRow(editGridModal, attribute.idAttribute, $event)\"\r\n [gridOptions]=\"this.gridOptions\"\r\n [rowSelection]=\"'single'\"\r\n [columnDefs]=\"gridColumns\"\r\n [rowData]=\"gridData\"\r\n [style.width]=\"attribute.w + 'px'\"\r\n [style.height]=\"attribute.h + 'px'\">\r\n </ag-grid-angular>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editGridModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{attribute.displayName}} Grid Row\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editGroupRowAttributes\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [groupAttributeRowId]=\"editGroupAttributeRowId\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button\r\n [disabled]=\"(!this.attributeService.editButtonsEnabled)\"\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Save')\"\r\n >\r\n Save\r\n </button>\r\n\r\n <button\r\n class=\"btn btn-primary\"\r\n (click)=\"close('Cancel')\"\r\n >\r\n Cancel\r\n </button>\r\n </div>\r\n </ng-template>\r\n `\r\n ,\r\n styles: [`\r\n \t.hci-cod button.mat-icon-button.mat-button-base {\r\n \theight: 20px;\r\n \twidth: 20px;\r\n \tline-height: unset;\r\n \t}\r\n\r\n .btn-ga {\r\n padding: 0px;\r\n height: 18px;\r\n width: 18px;\r\n }\r\n\r\n .ga-icon {\r\n font-size: .9em;\r\n vertical-align: top;\r\n }\r\n\r\n .hci-cod .mat-datepicker-toggle-default-icon {\r\n height: 20px;\r\n width: 20px;\r\n }\r\n\r\n .form-select.custom-caret {\r\n background-size: 0.46rem;\r\n background-position: right 0.3rem center;\r\n color: var(--bluewarm-darkest);\r\n }\r\n\r\n .cod-type-s .custom-input-text, .cod-type-txt .custom-input-text,\r\n .cod-type-n .custom-input-text, .cod-type-i .custom-input-text,\r\n .cod-type-d .custom-input-text, .cod-type-dt .custom-input-text {\r\n color: var(--bluewarm-darkest);\r\n }\r\n `]\r\n})\r\nexport class AttributeFlexComponent extends AttributeBase {\r\n hciNgAttributeAbsoluteInputDisplayName = \"\";\r\n constructor(\r\n attributeService: AttributeService,\r\n elementRef: ElementRef,\r\n renderer: Renderer2,\r\n modalService: NgbModal\r\n ) {\r\n super(attributeService, elementRef, renderer, modalService);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.refresh();\r\n if (this.attribute && this.attribute.displayName) {\r\n this.hciNgAttributeAbsoluteInputDisplayName = this.attribute.displayName;\r\n }\r\n }\r\n\r\n /**\r\n * Flex needs to extend grid columns because we no longer want to use absolute width. Here we generate percentage\r\n * based upon the absolute width, but still use absolute width for the min width.\r\n *\r\n * @param {Attribute[]} attributes\r\n * @param {any[]} columns\r\n */\r\n initializeGridColumns(attributes: GraphicalAttribute[], columns: any[]) {\r\n super.initializeGridColumns(attributes, columns);\r\n\r\n let width: number = 0;\r\n for (let attribute of attributes) {\r\n width += attribute.w;\r\n }\r\n\r\n for (let attribute of attributes) {\r\n let widthPercent: number = Math.floor(100 * (attribute.w / width));\r\n\r\n for (let column of columns) {\r\n if (column.externalConfig && column.externalConfig.idAttribute === attribute.idAttribute) {\r\n column.minWidth = attribute.w;\r\n column.widthPercent = widthPercent;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n}\r\n","import {\r\n ChangeDetectorRef, Component, ContentChildren, ElementRef, Input, isDevMode,\r\n QueryList, Renderer2, ViewChildren, SimpleChanges, HostBinding, TemplateRef\r\n} from \"@angular/core\";\r\nimport { Subject, Subscription } from \"rxjs\";\r\nimport {NgbModal} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {AttributeService} from \"../services/attribute.service\";\r\nimport {AttributeConfiguration} from \"../model/attribute-configuration.entity\";\r\nimport {AttributeValueSet} from \"../model/attribute-value-set.entity\";\r\nimport {AttributeContainer} from \"../model/attribute-container.entity\";\r\n\r\n/**\r\n * This component should be added on to any screen that displays a container with COD content. This container\r\n * represents the one of the containers, which in turn contain attributes which display those values in the\r\n * attributeValueSet.\r\n */\r\n@Component({\r\n selector: \"hci-attribute-container\",\r\n template: `\r\n <hci-busy [getBusySubjects]=\"getBusySubjects\"></hci-busy>\r\n \r\n <ng-container *ngIf=\"attributeContainer\">\r\n <div *ngIf=\"editPopup\" [id]=\"'id-attribute-container-' + attributeContainer.idAttributeContainer + '-header'\"\r\n class=\"d-flex attribute-container-header {{'sort-order-' + attributeContainer.sortOrder}}\">\r\n <div class=\"ms-auto me-0\" (click)=\"edit(editModal, attributeContainer)\">\r\n <i class=\"fas fa-pencil-alt\"></i>\r\n </div>\r\n </div>\r\n <div class=\"d-flex flex-grow-1 y-auto\" style=\"flex: 1 1 1px;\">\r\n <div class=\"attribute-container\"\r\n [class.col-md-12]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.flex]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.flex-wrap]=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y'\"\r\n [class.absolute]=\"!attributeContainer.isAutoLayout || attributeContainer.isAutoLayout === 'N'\">\r\n <ng-container *ngFor=\"let attribute of attributeContainer.graphicalAttributes | isGroupAttribute: false\">\r\n <ng-container *ngIf=\"attributeContainer.isAutoLayout && attributeContainer.isAutoLayout === 'Y' && attribute.codeAttributeDataType !== 'LINE'\">\r\n <hci-attribute-flex [id]=\"'id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n [editInline]=\"editInline\"\r\n [class.attribute]=\"true\"\r\n [class.col-4]=\"attribute.codeAttributeDataType !== 'GA' && attribute.codeAttributeDataType !== 'LINE'\"\r\n [class.col-12]=\"attribute.codeAttributeDataType === 'GA' || attribute.codeAttributeDataType === 'LINE'\"></hci-attribute-flex>\r\n </ng-container>\r\n <ng-container *ngIf=\"!attributeContainer.isAutoLayout || attributeContainer.isAutoLayout === 'N'\">\r\n <hci-attribute-absolute [id]=\"'id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n [editInline]=\"editInline\"\r\n [class.attribute]=\"true\"></hci-attribute-absolute>\r\n </ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n </ng-container>\r\n\r\n <ng-template #editModal let-close=\"close\">\r\n <div class=\"modal-header\">\r\n {{editContainer.containerName}}\r\n </div>\r\n <div class=\"modal-body d-flex flex-column hci-cod-edit\">\r\n <ng-container *ngFor=\"let attribute of editContainer.graphicalAttributes | isGroupAttribute: false\">\r\n <hci-attribute-edit [id]=\"'edit-id-attribute-' + attribute.idAttribute\"\r\n [attribute]=\"attribute\"\r\n class=\"attribute\"></hci-attribute-edit>\r\n </ng-container>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button class=\"btn btn-primary\" (click)=\"close('Save')\">Save</button>\r\n <button class=\"btn btn-primary\" (click)=\"close('Cancel')\">Cancel</button>\r\n </div>\r\n </ng-template>\r\n `\r\n})\r\nexport class AttributeContainerComponent {\r\n @HostBinding(\"class\") classList: string = \"hci-attribute-configuration hci-cod d-flex flex-column flex-grow-1\";\r\n\r\n @Input() idAttributeValueSet: number;\r\n @Input() idAttributeConfiguration: number;\r\n @Input() idAttributeContainer: number;\r\n @Input() indexOfContainer: number;\r\n @Input() idParentObject: number;\r\n\r\n @Input() attributeContainer: AttributeContainer;\r\n @Input() attributeConfiguration: AttributeConfiguration;\r\n @Input() attributeValueSet: AttributeValueSet;\r\n \r\n @Input() editInline: boolean = true;\r\n @Input() editPopup: boolean = false;\r\n @Input() editable: boolean = true;\r\n\r\n editContainer: AttributeContainer;\r\n\r\n windowDimension: any = {};\r\n\r\n subscriptions: Subscription = new Subscription();\r\n \r\n getBusySubjects: Function = () => {\r\n let subjects: any[] = [];\r\n \r\n //subjects.push(this.attributeService.getAttributeConfigurationLoadingSubject());\r\n subjects.push(this.attributeService.getLoadingSubject());\r\n \r\n return subjects;\r\n };\r\n\r\n constructor(private attributeService: AttributeService,\r\n private elementRef: ElementRef,\r\n private renderer: Renderer2,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n private modalService: NgbModal) {}\r\n\r\n /**\r\n * Upon init, subscribe to the configuration and value set.\r\n */\r\n ngOnInit() {\r\n if (! this.editable) {\r\n this.editInline = false;\r\n this.editPopup = false;\r\n }\r\n \r\n this.attributeService.setAttributeConfigurationById(this.idAttributeConfiguration, this.idAttributeValueSet, this.idParentObject);\r\n\r\n this.subscriptions.add(this.attributeService.getAttributeConfigurationSubject().subscribe((attributeConfiguration: AttributeConfiguration) => {\r\n if(attributeConfiguration) {\r\n this.attributeConfiguration = attributeConfiguration;\r\n\r\n if (this.idAttributeContainer !== undefined) {\r\n this.attributeContainer = this.getAttributeContainerById(this.idAttributeContainer);\r\n }\r\n\r\n if (this.indexOfContainer !== undefined) {\r\n if (this.attributeConfiguration.attributeContainers[this.indexOfContainer]) {\r\n this.attributeContainer = this.attributeConfiguration.attributeContainers[this.indexOfContainer];\r\n }\r\n }\r\n }\r\n }));\r\n\r\n this.subscriptions.add(this.attributeService.attributeConfigurationDimensionSubject.subscribe((windowDimension: any) => {\r\n if(windowDimension){\r\n this.windowDimension = windowDimension;\r\n }\r\n }));\r\n\r\n this.subscriptions.add(this.attributeService.getAttributeValueSet().subscribe((attributeValueSet: AttributeValueSet) => {\r\n this.attributeValueSet = attributeValueSet;\r\n\r\n if (this.attributeValueSet) {\r\n this.attributeService.notifyAttributes();\r\n }\r\n }));\r\n }\r\n\r\n @Input() set boundData(value: any) {\r\n this.attributeService.setBoundData(value);\r\n }\r\n\r\n ngOnDestroy() {\r\n this.subscriptions.unsubscribe();\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n if (! this.editable) {\r\n this.editInline = false;\r\n this.editPopup = false;\r\n }\r\n \r\n if (changes.idAttributeContainer) {\r\n this.idAttributeContainer = changes.idAttributeContainer.currentValue;\r\n\r\n this.attributeContainer = this.getAttributeContainerById(this.idAttributeContainer);\r\n }\r\n\r\n if (changes.indexOfContainer) {\r\n this.indexOfContainer = changes.indexOfContainer.currentValue;\r\n if (this.attributeConfiguration && this.attributeConfiguration.attributeContainers[this.indexOfContainer]) {\r\n this.attributeContainer = this.attributeConfiguration.attributeContainers[this.indexOfContainer];\r\n }\r\n }\r\n }\r\n\r\n getAttributeService(): AttributeService {\r\n return this.attributeService;\r\n }\r\n\r\n edit(modal: TemplateRef<any>, editContainer: AttributeContainer): void {\r\n this.editContainer = editContainer;\r\n\r\n this.modalService.open(modal, {windowClass: \"modal-lg\"}).result.then((result) => {\r\n if (result === \"Save\") {\r\n this.attributeService.updateAttributeValueSet();\r\n } else if (result === \"Cancel\") {\r\n this.attributeService.clearUpdatedAttributeValues();\r\n }\r\n }, (reason) => {});\r\n }\r\n\r\n post(): void {\r\n this.attributeService.updateAttributeValueSet();\r\n }\r\n\r\n getAttributeContainerById(idAttributeContainer: number): AttributeContainer {\r\n if (this.attributeConfiguration) {\r\n return this.attributeConfiguration.attributeContainers.find(x => x.idAttributeContainer === idAttributeContainer);\r\n }\r\n }\r\n}\r\n","/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\nimport {ModuleWithProviders, NgModule} from \"@angular/core\";\r\nimport {CommonModule} from \"@angular/common\";\r\nimport {FormsModule} from \"@angular/forms\";\r\nimport {RouterModule} from \"@angular/router\";\r\n\r\nimport {MatDatepickerModule} from \"@angular/material/datepicker\";\r\nimport {MatNativeDateModule} from \"@angular/material/core\";\r\nimport {NgxMatDatetimePickerModule, NgxMatNativeDateModule, NgxMatTimepickerModule} from \"@angular-material-components/datetime-picker\";\r\n\r\nimport {AgGridModule} from \"ag-grid-angular\";\r\nimport {NgbModule} from \"@ng-bootstrap/ng-bootstrap\";\r\nimport {DropdownModule, SelectModule} from \"@huntsman-cancer-institute/input\";\r\nimport {MiscModule} from \"@huntsman-cancer-institute/misc\";\r\n\r\nimport {IsGroupAttributePipe} from \"./pipes/is-group-attribute.pipe\";\r\nimport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\nimport {AttributeFlexComponent} from \"./components/attribute-flex.component\";\r\nimport {AttributeEditComponent} from \"./components/attribute-edit.component\";\r\nimport {AttributeDefaultComponent} from \"./components/attribute-default.component\";\r\nimport {AttributeContainerComponent} from \"./components/attribute-container.component\";\r\nimport {AttributeBase} from \"./components/attribute-base\";\r\nimport {AttributeService} from \"./services/attribute.service\";\r\nimport {DictionaryServiceModule} from \"@huntsman-cancer-institute/dictionary-service\";\r\n\r\n\r\n/**\r\n * The main @huntsman-cancer-institute/cod module. Custom components to be used by the grid are passed in here.\r\n *\r\n * @since 1.0.0\r\n */\r\n@NgModule({\r\n imports: [\r\n AgGridModule,\r\n CommonModule,\r\n FormsModule,\r\n RouterModule,\r\n NgbModule,\r\n DropdownModule,\r\n SelectModule,\r\n MiscModule,\r\n MatDatepickerModule,\r\n MatNativeDateModule,\r\n NgxMatDatetimePickerModule,\r\n NgxMatTimepickerModule,\r\n NgxMatNativeDateModule,\r\n DictionaryServiceModule\r\n ],\r\n declarations: [\r\n AttributeBase,\r\n AttributeAbsoluteComponent,\r\n AttributeContainerComponent,\r\n AttributeFlexComponent,\r\n AttributeEditComponent,\r\n IsGroupAttributePipe\r\n ],\r\n exports: [\r\n AttributeAbsoluteComponent,\r\n AttributeFlexComponent,\r\n AttributeEditComponent,\r\n AttributeContainerComponent,\r\n IsGroupAttributePipe\r\n ]\r\n})\r\nexport class CodModule {\r\n static forRoot(): ModuleWithProviders<CodModule> {\r\n return {\r\n providers: [\r\n AttributeService\r\n ],\r\n ngModule: CodModule\r\n };\r\n }\r\n}\r\n","import {AttributeChoice} from \"./attribute-choice.entity\";\r\nimport {AttributeDictionary} from \"./attribute-dictionary.entity\";\r\nimport {AttributeLongText} from \"./attribute-long-text.entity\";\r\n\r\nexport class AttributeValue {\r\n idAttributeValue: number;\r\n idAttributeValueSet: number;\r\n idAttribute: number;\r\n codeAttributeDataType: string;\r\n valueString?: string;\r\n value?:string;\r\n valueDate?: string;\r\n valueDateTime?: string;\r\n date?: Date;\r\n valueInteger?: number;\r\n valueNumeric?: number;\r\n valueBoolean?: string;\r\n valueExtendedBoolean?: string;\r\n valueAttributeChoice?: AttributeChoice;\r\n valueIdDictionary?: string;\r\n valueLongText?: AttributeLongText;\r\n attributeDictionary?: AttributeDictionary;\r\n idGroupAttribute?: number;\r\n groupAttributeRowId?: number;\r\n extractAttributeName?: string;\r\n extractionStatus?: string;\r\n extractReportAlias?: string;\r\n extractionDate?: string;\r\n}\r\n","import {Component, forwardRef, Input} from \"@angular/core\";\r\n\r\nimport {ControlValueAccessor, NG_VALUE_ACCESSOR} from \"@angular/forms\";\r\n\r\nimport {GraphicalAttribute} from \"../model/graphical-attribute.entity\";\r\n\r\n@Component({\r\n selector: \"hci-attribute-default\",\r\n template: `\r\n <!-- String -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'S'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-string-attribute-default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Text -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'TXT'\">\r\n <textarea type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n spellcheck=\"spellcheck\"\r\n lang=\"en\"\r\n [(ngModel)]=\"value\">\r\n </textarea>\r\n </ng-container>\r\n\r\n <!-- Checkbox -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'CB'\">\r\n <input type=\"checkbox\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\"\r\n [checked]=\"value && value.toUpperCase() === 'Y'\" attr.aria-label=\"hci-ng-checkbox-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Numeric -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'N'\">\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-numeric-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Integer -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'I'\">\r\n <input type=\"number\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-number-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Date -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'D'\">\r\n <input type=\"date\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-date-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Date Time -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'DT'\">\r\n <input type=\"date\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n [(ngModel)]=\"value\" attr.aria-label=\"hci-ng-date-time-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'B'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option [ngValue]=\"'Y'\" [selected]=\"value && value.toUpperCase() === 'Y'\">Y</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"value && value.toUpperCase() === 'N'\">N</option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Extended Boolean -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'EB'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option [ngValue]=\"'Y'\" [selected]=\"value && value.toUpperCase() === 'Y'\">Y</option>\r\n <option [ngValue]=\"'N'\" [selected]=\"value && value.toUpperCase() === 'N'\">N</option>\r\n <option [ngValue]=\"'U'\" [selected]=\"value && value.toUpperCase() === 'U'\">U</option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Choice: Single -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'AC' && attribute.isMultiValue.toUpperCase() === 'N'\">\r\n <select [(ngModel)]=\"value\"\r\n class=\"form-control edit-renderer\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n <option *ngFor=\"let attributeChoice of attribute.attributeChoices\"\r\n [ngValue]=\"attributeChoice\"\r\n [selected]=\"value && value.toUpperCase() === attributeChoice.idAttributeChoice.toString().toUpperCase()\">\r\n {{ attributeChoice.choice }}\r\n </option>\r\n </select>\r\n </ng-container>\r\n\r\n <!-- Choice: Multi -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'AC' && attribute.isMultiValue.toUpperCase() === 'Y'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n disabled attr.aria-label=\"hci-ng-choice-multiple-attribute default-{{name}}\">\r\n </ng-container>\r\n\r\n <!-- Dictionary -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'DICT'\">\r\n <hci-native-select [(ngModel)]=\"value\"\r\n [className]=\"attribute.attributeDictionary.className\"\r\n [id]=\"id\"\r\n [name]=\"name\">\r\n </hci-native-select>\r\n </ng-container>\r\n\r\n <!-- Grid -->\r\n <ng-container *ngIf=\"attribute.codeAttributeDataType.toUpperCase() === 'GA'\">\r\n <input type=\"text\"\r\n class=\"form-control\"\r\n [id]=\"id\"\r\n [name]=\"name\"\r\n disabled attr.aria-label=\"hci-ng-grid-attribute default-{{name}}\">\r\n </ng-container>\r\n `,\r\n providers: [\r\n {\r\n provide: NG_VALUE_ACCESSOR,\r\n useExisting: forwardRef(() => AttributeDefaultComponent),\r\n multi: true\r\n }\r\n ]\r\n})\r\nexport class AttributeDefaultComponent implements ControlValueAccessor {\r\n\r\n _value: string = \"\";\r\n\r\n @Input() id: string;\r\n @Input() name: string;\r\n @Input() attribute: GraphicalAttribute;\r\n\r\n onChange: any = (_: any) => {};\r\n onTouched: any = () => {};\r\n\r\n get value(): string {\r\n return this._value;\r\n };\r\n\r\n set value(v: string) {\r\n this.onTouched();\r\n if (v !== this.value) {\r\n this._value = v;\r\n this.onChange(v);\r\n }\r\n }\r\n\r\n constructor() {}\r\n\r\n ngOnInit(): void {}\r\n\r\n writeValue(v: string) {\r\n this._value = v;\r\n }\r\n\r\n registerOnChange(fn: any) {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any) {\r\n this.onTouched = fn;\r\n }\r\n}\r\n","\r\n/*\r\n * Copyright (c) 2016 Huntsman Cancer Institute at the University of Utah, Confidential and Proprietary\r\n */\r\n/**\r\n * A barrel file for the cod package.\r\n *\r\n * @since 1.0.0\r\n */\r\n\r\nimport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\n\r\nexport {CodModule} from \"./cod.module\";\r\n\r\nexport {AttributeService} from \"./services/attribute.service\";\r\n\r\nexport {Attribute} from \"./model/attribute.entity\";\r\nexport {AttributeChoice} from \"./model/attribute-choice.entity\";\r\nexport {AttributeConfiguration} from \"./model/attribute-configuration.entity\";\r\nexport {AttributeContainer} from \"./model/attribute-container.entity\";\r\nexport {AttributeDictionary} from \"./model/attribute-dictionary.entity\";\r\nexport {AttributeValue} from \"./model/attribute-value.entity\";\r\nexport {AttributeValueGridRow} from \"./model/attribute-value-grid-row.entity\";\r\nexport {AttributeValueSet} from \"./model/attribute-value-set.entity\";\r\nexport {ExtractableFieldStatus} from \"./model/extractable-field-status.entity\";\r\nexport {AttributeConfigurationDTO} from \"./model/attribute-configuration.dto\";\r\nexport {GraphicalAttribute} from \"./model/graphical-attribute.entity\";\r\n\r\nexport {AttributeBase} from \"./components/attribute-base\";\r\nexport {AttributeAbsoluteComponent} from \"./components/attribute-absolute.component\";\r\nexport {AttributeFlexComponent} from \"./components/attribute-flex.component\";\r\nexport {AttributeEditComponent} from \"./components/attribute-edit.component\";\r\nexport {AttributeDefaultComponent} from \"./components/attribute-default.component\";\r\nexport {AttributeContainerComponent} from \"./components/attribute-container.component\";\r\n\r\nexport {IsGroupAttributePipe} from \"./pipes/is-group-attribute.pipe\";\r\n\r\nexport {ATTRIBUTE_ENDPOINT} from \"./services/attribute.service\";\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AttributeService","i2","i3","i8.AttributeEditComponent","i4","i5.AttributeAbsoluteComponent","i6.AttributeFlexComponent","i7.AttributeEditComponent","i8.IsGroupAttributePipe"],"mappings":";;;;;;;;;;;;;;;;;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