1 | {"version":3,"file":"americancollegeofradiology-acr-assist-simulator.js","sources":["ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/simulator-state.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/computed-dataelement-id.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/services/utility.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/services/simulator-engine.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/core.module.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/report-text.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/acr-assist-simulator/acr-assist-simulator.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/input-data.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/services/simulator-communication.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/elements/models/repeatedElement.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/elements/models/RepeatedElementSections.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/services/reset-communication.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/tabular-report.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/tabular-report-elements.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-data-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/hint-diagram/hint-diagram.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/executed-result.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-numeric-element/assist-numeric-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/core/models/choice-element-display.enum.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-choice-element/assist-choice-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-multi-choice-element/assist-multi-choice-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/image-map/image-map.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-report-text/assist-report-text.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/directives/dynamicheight.directive.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/directives/numeric-only.directive.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-duration-element/assist-duration-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/assist-data-element/assist-date-time-element/assist-date-time-element.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/directives/integer-restrict-value-greaterthan-max.directive.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/services/clipboard.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/directives/clipboard.directive.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/services/url-helper.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/shared/pipes/secure.pipe.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/acr-assist-simulator/acr-assist-simulator.module.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/shared/models/dictionary.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/shared/services/globals.service.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/view-upload-loader/view-upload-loader.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/shared/models/file-details.model.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/file-upload-loader/file-upload-loader.component.ts","ng://@americancollegeofradiology/acr-assist-simulator/src/app/modules/simulatorloader/simulatorloader.module.ts","ng://@americancollegeofradiology/acr-assist-simulator/americancollegeofradiology-acr-assist-simulator.ts"],"sourcesContent":["import { MainReportText } from \"testruleengine/Library/Models/Class\";\r\n\r\nexport class SimulatorState {\r\n nonRelevantDataElementIds: string[] = [];\r\n endPointId = '';\r\n selectedDecisionPointId = '';\r\n selectedDecisionPointLabel = '';\r\n selectedBranchLabel = '';\r\n endPointIds: string[] = [];\r\n mainReportText: MainReportText[];\r\n showKeyDiagram: string;\r\n}\r\n","export class ComputedDataElementId {\r\n dataElementId_org: string;\r\n dataElememntId_dynamic: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class UtilityService {\r\n\r\n constructor() { }\r\n\r\n isValidInstance(data: any) {\r\n return (data !== undefined && data !== null);\r\n }\r\n\r\n isNotEmptyArray(data: any[]) {\r\n let isValid = this.isValidInstance(data);\r\n if (isValid) {\r\n isValid = data.length > 0;\r\n }\r\n return isValid;\r\n }\r\n\r\n isNotEmptyString(data: any) {\r\n let isValid = this.isValidInstance(data);\r\n if (isValid) {\r\n isValid = data.toString().trim().length > 0;\r\n }\r\n return isValid;\r\n }\r\n\r\n isNotEmptyGuid(data: any) {\r\n const emptyGuid = '00000000-0000-0000-0000-000000000000';\r\n return data !== emptyGuid;\r\n }\r\n\r\n isImageDataUrl(data: string) {\r\n // tslint:disable-next-line:max-line-length\r\n const isDataURL = /^\\s*data:([a-z]+\\/[a-z]+(;[a-z\\-]+\\=[a-z\\-]+)?)?(;base64)?,[a-z0-9\\!\\$\\&\\'\\,\\(\\)\\*\\+\\,\\;\\=\\-\\.\\_\\~\\:\\@\\/\\?\\%\\s]*\\s*$/i;\r\n return !! data.match(isDataURL);\r\n }\r\n\r\n isValidUrl(data: string) {\r\n // tslint:disable-next-line:max-line-length\r\n const urlRegex = /(http(s)?:\\/\\/.)?(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{2,256}\\.[a-z]{2,6}\\b([-a-zA-Z0-9@:%_\\+.~#?&//=]*)/g;\r\n return !! data.match(urlRegex);\r\n }\r\n\r\n formatDateTime(data: string) {\r\n const isValid = this.isNotEmptyString(data);\r\n if (isValid) {\r\n const localDateTime = new Date(data);\r\n return localDateTime.toLocaleString();\r\n }\r\n return data;\r\n }\r\n\r\n trimWhiteSpaces(data: string): string {\r\n const isValid = this.isNotEmptyString(data);\r\n if (isValid) {\r\n const trimmedData = data.replace(/\\s/g, '');\r\n return trimmedData;\r\n }\r\n return data;\r\n }\r\n\r\n trimAndRemoveSpecialChars(data: string): string {\r\n const isValid = this.isNotEmptyString(data);\r\n if (isValid) {\r\n const trimmedData = data.replace(/\\s/g, '').replace(/[`~!@#$%^&*()_|+\\-=��?;:'\",.<>\\{\\}\\[\\]\\\\\\/]/gi, '');\r\n return trimmedData;\r\n }\r\n return data;\r\n }\r\n\r\n textifyData(data: string): string {\r\n const isValid = this.isNotEmptyString(data);\r\n if (isValid) {\r\n const textifiedData = data.replace(/ /g, ' ').replace(/\\r?\\n|\\r/g, ' ').replace(/\\t/g, '').\r\n replace(/\\s\\s+/g, ' ').replace(/<br>/g, '\\n');\r\n return textifiedData;\r\n }\r\n return data;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { SimulatorState } from '../models/simulator-state.model';\r\nimport { BehaviorSubject } from 'rxjs';\r\nimport { isArray } from 'util';\r\nimport {\r\n ChoiceDataElement, MultiChoiceDataElement, NumericDataElement, EndpointItem, DecisionPoint, ArithmeticExpression,\r\n IntegerDataElement, DurationDataElement, ComputedDataElement, DataElementValues, TemplatePartial,\r\n InsertPartial, InsertValue, BaseDataElement, Template\r\n} from 'testruleengine/Library/Models/Class';\r\nimport { EvaluateRulesAndGenerateReportText } from 'testruleengine/Library/Utilities/RuleEvaluator';\r\n\r\nimport { generateReportText } from 'testruleengine/Library/Utilities/GenerateReportText';\r\nimport { NonRelevantPushPopService } from 'testruleengine/Library/Services/NonRelevantPushPop';\r\nimport { FindDecisionPoints } from 'testruleengine/Library/Utilities/FindEndPoint';\r\nimport { ComputedDataElementId } from '../models/computed-dataelement-id.model';\r\nimport { UtilityService } from '../../core/services/utility.service';\r\n\r\nconst expressionParser = require('expr-eval').Parser;\r\nimport * as _ from 'lodash';\r\n\r\n@Injectable()\r\nexport class SimulatorEngineService {\r\n private ComputedDataElementIds = new Array<ComputedDataElementId>();\r\n private template: Template;\r\n private dataElementValues: Map<string, any>;\r\n private dataElementTexts: Map<string, any>;\r\n private endOfRoadReached = false;\r\n private lastConditionMetBranchLevel = 1;\r\n private nonRelevantDataElementIds = new Array<string>();\r\n private showKeyDiagram: string;\r\n private DynamicallyTemplatePartialIds = [];\r\n private endpoints = [];\r\n private branchCounter = 0;\r\n\r\n simulatorStateChanged = new BehaviorSubject<SimulatorState>(new SimulatorState());\r\n\r\n constructor(private utilityService: UtilityService) {\r\n this.dataElementValues = new Map<string, any>();\r\n this.dataElementTexts = new Map<string, any>();\r\n this.nonRelevantDataElementIds = new Array<string>();\r\n }\r\n\r\n getTemplate(): Template {\r\n return this.template;\r\n }\r\n\r\n getAllDataElementValues(): Map<string, any> {\r\n return this.dataElementValues;\r\n }\r\n\r\n getAllDataElementTexts(): Map<string, any> {\r\n return this.dataElementTexts;\r\n }\r\n\r\n getDataElementValue(dataElementId: string): any {\r\n return this.dataElementValues.get(dataElementId);\r\n }\r\n\r\n getDataElementText(dataElementId: string): any {\r\n return this.dataElementTexts.get(dataElementId);\r\n }\r\n\r\n addOrUpdateDataElement(dataElementId: string, value: any, text: any) {\r\n // debugger;\r\n this.dataElementValues.set(dataElementId, value);\r\n this.dataElementTexts.set(dataElementId, text);\r\n this.evaluateDecisionPoints();\r\n }\r\n\r\n private resetValuesOfNonRelevantDataElements(nonRelevantDataElementIds: string[]) {\r\n if (nonRelevantDataElementIds !== undefined) {\r\n for (const nonRelevantDataElementId of nonRelevantDataElementIds) {\r\n let defaultValue: any;\r\n for (const dataElement of this.template.dataElements) {\r\n if (dataElement.id === nonRelevantDataElementId) {\r\n defaultValue = dataElement.defaultValue;\r\n break;\r\n }\r\n }\r\n\r\n this.dataElementValues.set(nonRelevantDataElementId, defaultValue);\r\n }\r\n }\r\n }\r\n\r\n evaluateComputedElementDecisionPoint(elementId: string, decisionPoint: DecisionPoint, branchingLevel) {\r\n let currentBranchCount = 0;\r\n const totalBranchesInDecisionPoint = decisionPoint.branches.length;\r\n for (const branch of decisionPoint.branches) {\r\n\r\n currentBranchCount++;\r\n let conditionMet = false;\r\n\r\n if (branch.compositeCondition !== undefined) {\r\n conditionMet = branch.compositeCondition.evaluate(new DataElementValues(this.dataElementValues));\r\n } else if (branch.condition !== undefined) {\r\n conditionMet = branch.condition.evaluate(new DataElementValues(this.dataElementValues));\r\n }\r\n\r\n if (conditionMet) {\r\n this.lastConditionMetBranchLevel = branchingLevel;\r\n if (branch.decisionPoints !== undefined && branch.decisionPoints.length) {\r\n for (const branchDecisionPoint of branch.decisionPoints) {\r\n const newBranchingLevel = branchingLevel + 1;\r\n this.evaluateComputedElementDecisionPoint(elementId, branchDecisionPoint, newBranchingLevel);\r\n }\r\n } else if (branch.computedValue !== undefined) {\r\n this.dataElementValues.set(elementId, branch.computedValue.expressionText);\r\n if (branch.computedValue instanceof ArithmeticExpression) {\r\n this.dataElementValues.set(elementId, this.evaluateArithmeticExpression(branch.computedValue.expressionText));\r\n } else {\r\n if (this.IsExpressionReferedtoComputedDataElement(branch.computedValue.expressionText)) {\r\n this.FindAndSetValueForComputedDataElement(branch.computedValue.expressionText, elementId);\r\n } else {\r\n this.dataElementValues.set(elementId, branch.computedValue.expressionText);\r\n }\r\n }\r\n break;\r\n }\r\n } else {\r\n if (currentBranchCount >= totalBranchesInDecisionPoint) {\r\n this.dataElementValues.set(elementId, undefined);\r\n return;\r\n } else {\r\n continue;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private FindAndSetValueForComputedDataElement(expressionText, parentelementId) {\r\n const elementId = expressionText.match(/{([^}]+)}/);\r\n const result = this.template.dataElements.filter(function(obj) {\r\n return obj.id === elementId[1] && (obj.dataElementType === 'ComputedDataElement');\r\n });\r\n\r\n if (result !== undefined && result != null && result.length > 0) {\r\n const computedElement: ComputedDataElement = result[0] as ComputedDataElement;\r\n for (const decisionPoint of computedElement.decisionPoints) {\r\n this.dataElementValues.set(parentelementId, this.dataElementValues.get(computedElement.id));\r\n }\r\n }\r\n }\r\n\r\n private IsExpressionReferedtoComputedDataElement(expressionText): boolean {\r\n const text = expressionText.match(/{([^}]+)}/);\r\n if (text !== null && text !== undefined && text.length > 0) {\r\n const result = this.template.dataElements.filter(function(obj) {\r\n return obj.id === text[1] && (obj.dataElementType === 'ComputedDataElement');\r\n });\r\n\r\n if (result != null && result !== undefined && result.length > 0) {\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private evaluateArithmeticExpression(computedValue: string): any {\r\n let startIndex = 0;\r\n let endIndex = 0;\r\n while (startIndex !== -1 && endIndex !== -1) {\r\n startIndex = computedValue.indexOf('{');\r\n endIndex = computedValue.indexOf('}');\r\n if (startIndex !== -1 && endIndex !== -1) {\r\n const dataElementId = computedValue.substring(startIndex + 1, endIndex);\r\n const replacingValue = computedValue.substring(startIndex, endIndex + 1);\r\n let dataElementValue = this.dataElementValues.get(dataElementId);\r\n if (isArray(dataElementValue)) {\r\n let sum = 0;\r\n dataElementValue.forEach(val => {\r\n if (isNaN(val)) {\r\n val = 0;\r\n }\r\n sum += +val;\r\n });\r\n dataElementValue = sum;\r\n }\r\n\r\n if (dataElementValue === undefined) {\r\n dataElementValue = 0;\r\n }\r\n\r\n computedValue = computedValue.replace(replacingValue, dataElementValue);\r\n\r\n }\r\n }\r\n\r\n return expressionParser.evaluate(computedValue).toString();\r\n }\r\n\r\n private evaluateComputedExpressions() {\r\n this.endOfRoadReached = false;\r\n let expressionValue: any;\r\n for (const element of this.template.dataElements) {\r\n if (element.dataElementType === 'ComputedDataElement') {\r\n expressionValue = undefined;\r\n const computedElement: ComputedDataElement = element as ComputedDataElement;\r\n for (const decisionPoint of computedElement.decisionPoints) {\r\n this.evaluateComputedElementDecisionPoint(element.id, decisionPoint, 1);\r\n if (this.dataElementValues.get(element.id) === undefined && decisionPoint.defaultBranch &&\r\n decisionPoint.defaultBranch.computedValue) {\r\n const expressionText = decisionPoint.defaultBranch.computedValue.expressionText;\r\n if (this.IsExpressionReferedtoComputedDataElement(expressionText)) {\r\n this.FindAndSetValueForComputedDataElement(expressionText, element.id);\r\n } else {\r\n this.dataElementValues.set(element.id, expressionText);\r\n }\r\n }\r\n this.endOfRoadReached = false;\r\n }\r\n }\r\n }\r\n }\r\n\r\n private evaluateConditionalProperty(dataelement, nonRelevantDataElementIds: string[] = []): Array<string> {\r\n if (dataelement.conditionalProperties !== undefined) {\r\n let conditionMet = false;\r\n let isCompositeCondition = false;\r\n for (const conditionalProperty of dataelement.conditionalProperties) {\r\n if (conditionalProperty.condition !== undefined) {\r\n conditionMet = conditionalProperty.condition.evaluate(new DataElementValues(this.dataElementValues));\r\n isCompositeCondition = false;\r\n } else if (conditionalProperty.compositeCondition !== undefined) {\r\n conditionMet = conditionalProperty.compositeCondition.evaluate(new DataElementValues(this.dataElementValues));\r\n isCompositeCondition = true;\r\n }\r\n\r\n if (conditionMet) {\r\n if (nonRelevantDataElementIds === undefined) {\r\n this.nonRelevantDataElementIds = new Array<string>();\r\n }\r\n\r\n if (conditionalProperty.isRelevant === 'false') {\r\n this.nonRelevantDataElementIds.push(dataelement.id);\r\n } else {\r\n if (conditionalProperty.DisplaySequence !== undefined) {\r\n dataelement.displaySequence = conditionalProperty.DisplaySequence;\r\n }\r\n\r\n dataelement.isRequired = conditionalProperty.isRequired !== undefined ?\r\n (conditionalProperty.isRequired.toLowerCase() === 'true' ? true : false)\r\n : true;\r\n\r\n if (conditionalProperty.Minimum !== undefined && conditionalProperty.Minimum != null) {\r\n dataelement.minimum = +conditionalProperty.Minimum;\r\n }\r\n if (conditionalProperty.Maximum !== undefined && conditionalProperty.Maximum != null) {\r\n dataelement.maximum = +conditionalProperty.Maximum;\r\n }\r\n\r\n if (dataelement.dataElementType === 'ChoiceDataElement') {\r\n (dataelement as ChoiceDataElement).ChoiceNotRelevant = conditionalProperty.ChoiceNotRelevant;\r\n //#region uncomment\r\n this.updateChoiceDataElementValues((dataelement as ChoiceDataElement));\r\n //#endregion\r\n }\r\n\r\n if (dataelement.dataElementType === 'MultiChoiceDataElement') {\r\n (dataelement as MultiChoiceDataElement).ChoiceNotRelevant = conditionalProperty.ChoiceNotRelevant;\r\n //#region uncomment\r\n this.updateMultiChoiceDataElementValues((dataelement as MultiChoiceDataElement));\r\n\r\n if (this.utilityService.isNotEmptyArray(dataelement.ChoiceNotRelevant)) {\r\n if (dataelement.currentValue !== undefined && Array.isArray(dataelement.currentValue)) {\r\n const _filteredItems = dataelement.currentValue.filter((item: any) => !dataelement.ChoiceNotRelevant.includes(item));\r\n dataelement.currentValue = _filteredItems;\r\n }\r\n }\r\n //#endregion\r\n }\r\n\r\n if (dataelement.dataElementType === 'DurationDataElement') {\r\n (dataelement as DurationDataElement).MinimumDay = +conditionalProperty.MinimumDay;\r\n (dataelement as DurationDataElement).MaximumDay = +conditionalProperty.MaximumDay;\r\n (dataelement as DurationDataElement).MinimumHours = +conditionalProperty.MinimumHours;\r\n (dataelement as DurationDataElement).MaximumHours = +conditionalProperty.MaximumHours;\r\n (dataelement as DurationDataElement).MinimumMinutes = +conditionalProperty.MinimumMinutes;\r\n (dataelement as DurationDataElement).MaxmimumMinutes = +conditionalProperty.MaxmimumMinutes;\r\n (dataelement as DurationDataElement).MinimumSeconds = +conditionalProperty.MinimumSeconds;\r\n (dataelement as DurationDataElement).MaxmimumSeconds = +conditionalProperty.MaxmimumSeconds;\r\n }\r\n }\r\n\r\n\r\n return this.nonRelevantDataElementIds;\r\n } else {\r\n if (dataelement.dataElementType === 'ChoiceDataElement') {\r\n (dataelement as ChoiceDataElement).ChoiceNotRelevant = new Array<string>();\r\n }\r\n if (dataelement.dataElementType === 'MultiChoiceDataElement') {\r\n (dataelement as ChoiceDataElement).ChoiceNotRelevant = new Array<string>();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n updateChoiceDataElementValues(dataElement: ChoiceDataElement) {\r\n if (this.utilityService.isNotEmptyArray(dataElement.ChoiceNotRelevant)) {\r\n dataElement.ChoiceNotRelevant.forEach((x: any) => {\r\n if (this.dataElementValues.get(dataElement.id) !== undefined && this.dataElementValues.get(dataElement.id) === x) {\r\n this.dataElementValues.set(dataElement.id, undefined);\r\n }\r\n });\r\n }\r\n }\r\n\r\n updateMultiChoiceDataElementValues(dataElement: MultiChoiceDataElement) {\r\n if (this.utilityService.isNotEmptyArray(dataElement.ChoiceNotRelevant) && this.dataElementValues.get(dataElement.id) !== undefined) {\r\n const filteredItems = this.dataElementValues.get(dataElement.id).filter((item: any) => !dataElement.ChoiceNotRelevant.includes(item));\r\n this.dataElementValues.set(dataElement.id, filteredItems);\r\n }\r\n }\r\n\r\n evaluateDecisionAndConditionalProperty(): Array<string> {\r\n this.nonRelevantDataElementIds = new Array<string>();\r\n this.RevertConditionValues();\r\n for (const dataelement of this.template.dataElements) {\r\n this.evaluateConditionalProperty(dataelement, new Array<string>());\r\n }\r\n\r\n this.resetValuesOfNonRelevantDataElements(this.nonRelevantDataElementIds);\r\n NonRelevantPushPopService.SetNonRelevantDataElements(this.nonRelevantDataElementIds);\r\n return this.nonRelevantDataElementIds;\r\n }\r\n\r\n private RevertConditionValues() {\r\n for (const dataelement of this.template.dataElements) {\r\n dataelement.isRequired = dataelement.isRequiredOverrider;\r\n dataelement.displaySequence = dataelement.displaySequenceOverrider;\r\n if (dataelement.dataElementType === 'NumericDataElement') {\r\n (dataelement as NumericDataElement).minimum = +(dataelement as NumericDataElement).minimumOverrider;\r\n (dataelement as NumericDataElement).maximum = +(dataelement as NumericDataElement).maximumOverrider;\r\n }\r\n if (dataelement.dataElementType === 'IntegerDataElement') {\r\n (dataelement as IntegerDataElement).minimum = +(dataelement as IntegerDataElement).minimumOverrider;\r\n (dataelement as IntegerDataElement).maximum = +(dataelement as IntegerDataElement).maximumOverrider;\r\n }\r\n\r\n if (dataelement.dataElementType === 'DurationDataElement') {\r\n (dataelement as DurationDataElement).MinimumDay = +(dataelement as DurationDataElement).MinimumDayOverrider;\r\n (dataelement as DurationDataElement).MaximumDay = +(dataelement as DurationDataElement).MaximumDayOverrider;\r\n (dataelement as DurationDataElement).MinimumHours = +(dataelement as DurationDataElement).MinimumHoursOverrider;\r\n (dataelement as DurationDataElement).MaximumHours = +(dataelement as DurationDataElement).MaximumHoursOverrider;\r\n (dataelement as DurationDataElement).MinimumMinutes = +(dataelement as DurationDataElement).MinimumMinutesOverrider;\r\n (dataelement as DurationDataElement).MaxmimumMinutes = +(dataelement as DurationDataElement).MaxmimumMinutesOverrider;\r\n\r\n (dataelement as DurationDataElement).MaxmimumSeconds = +(dataelement as DurationDataElement).MaxmimumSecondsOverrider;\r\n (dataelement as DurationDataElement).MinimumSeconds = +(dataelement as DurationDataElement).MinimumSecondsOverrider;\r\n\r\n }\r\n }\r\n }\r\n\r\n private GetRepeatableValue(repeatCount) {\r\n const $dataElement = _.find(this.template.dataElements, { id: repeatCount }) as BaseDataElement;\r\n return $dataElement !== undefined ? $dataElement.currentValue : 0;\r\n }\r\n\r\n private RemoveDynamicallyAddedComputedDataElementIds() {\r\n this.ComputedDataElementIds = [];\r\n }\r\n\r\n private RemoveManuallyAddedBranches() {\r\n for (const decisionPoint of this.template.rules.decisionPoints) {\r\n _.remove(decisionPoint.branches, { isManuallyAdded: true });\r\n }\r\n }\r\n\r\n private RemoveManuallyAddedComputedDataElements() {\r\n _.remove(this.template.dataElements, { isManuallyAdded: true });\r\n }\r\n\r\n private RemoveManuallyAddedEndPoints() {\r\n _.remove(this.template.endpoint.endpoints, { isManuallyAdded: true });\r\n }\r\n\r\n private RemoveManuallyAddedTemplatePartials() {\r\n _.remove(this.template.endpoint.templatePartials, { isManuallyAdded: true });\r\n }\r\n\r\n private ProcessRepetationDataElements() {\r\n this.AddRepeatableBranchesInsideRule();\r\n this.AddRepeatableComputedDataElement();\r\n this.AddRepeatableEndpoints();\r\n this.AddRepeatableTemplatePartials();\r\n }\r\n\r\n private AddRepeatableTemplatePartials() {\r\n this.RemoveManuallyAddedTemplatePartials();\r\n for (const templatePartialId of this.DynamicallyTemplatePartialIds) {\r\n const templatePartialId_org = templatePartialId.split('_')[0];\r\n const templatePartial_org = _.filter(this.template.endpoint.templatePartials, { id: templatePartialId_org })[0];\r\n if (templatePartial_org !== undefined) {\r\n const templatePartial_cloned = _.cloneDeep(templatePartial_org) as TemplatePartial;\r\n templatePartial_cloned.id = templatePartialId;\r\n templatePartial_cloned.isManuallyAdded = true;\r\n let $conditions = [];\r\n for (const _branch of templatePartial_cloned.branches) {\r\n if (_branch.compositeCondition !== undefined) {\r\n const dataElementIds = this.template.dataElements.map(dataElement => dataElement.id);\r\n $conditions = [];\r\n\r\n for (let _conditions of _branch.compositeCondition.conditions) {\r\n if (_conditions.isManuallyAdded === undefined || !_conditions.isManuallyAdded) {\r\n for (const _dataElement of dataElementIds) {\r\n // tslint:disable-next-line: max-line-length\r\n _conditions = this.replacePropertyValue(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + templatePartialId.split('_')[1], _conditions);\r\n }\r\n }\r\n\r\n _conditions.isManuallyAdded = true;\r\n $conditions.push(_conditions);\r\n }\r\n\r\n _branch.compositeCondition.conditions = $conditions;\r\n }\r\n\r\n if (_branch.condition !== undefined && typeof (_branch.condition) === 'object') {\r\n _branch.condition.conditionType.dataElementId = _branch.condition.conditionType.dataElementId.split('_')[0]\r\n + '_' + templatePartialId.split('_')[1];\r\n }\r\n\r\n for (const reportText of _branch.reportText) {\r\n const $reportText = reportText.GetPropertyType();\r\n if ($reportText instanceof InsertPartial) {\r\n reportText.insertPartial.partialId = reportText.insertPartial.manupulateId(templatePartialId.split('_')[1]);\r\n }\r\n\r\n if ($reportText instanceof InsertValue) {\r\n reportText.insertValue.dataElementId = reportText.insertValue.manupulateId(templatePartialId.split('_')[1]);\r\n }\r\n }\r\n }\r\n\r\n this.template.endpoint.templatePartials.push(templatePartial_cloned);\r\n }\r\n }\r\n }\r\n\r\n private AddRepeatableEndpoints() {\r\n this.DynamicallyTemplatePartialIds = [];\r\n this.RemoveManuallyAddedEndPoints();\r\n let dynamicEndPoints = [];\r\n for (const decisionPoint of this.template.rules.decisionPoints) {\r\n dynamicEndPoints = _.filter(decisionPoint.branches, { isManuallyAdded: true });\r\n }\r\n\r\n for (const dynamicEndpoint of dynamicEndPoints) {\r\n const endpoint_org = _.filter(this.template.endpoint.endpoints, { id: dynamicEndpoint.endPointRef.endPointId.split('_')[0] })[0];\r\n const endpoint_cloned = _.cloneDeep(endpoint_org) as EndpointItem;\r\n endpoint_cloned.id = dynamicEndpoint.endPointRef.endPointId;\r\n endpoint_cloned.isManuallyAdded = true;\r\n\r\n const dynamicId = dynamicEndpoint.endPointRef.endPointId.split('_')[1];\r\n for (const reportSection of endpoint_cloned.reportSections) {\r\n for (const _branch of reportSection.branch) {\r\n\r\n if (_branch.compositeCondition !== undefined) {\r\n const dataElementIds = this.template.dataElements.map(dataElement => dataElement.id);\r\n for (let _conditions of _branch.compositeCondition.conditions) {\r\n if (_conditions.isManuallyAdded === undefined || !_conditions.isManuallyAdded) {\r\n for (const _dataElement of dataElementIds) {\r\n // tslint:disable-next-line: max-line-length\r\n _conditions = this.replacePropertyValue(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + dynamicId, _conditions);\r\n }\r\n }\r\n\r\n _conditions.isManuallyAdded = true;\r\n _branch.compositeCondition.conditions.push(_conditions);\r\n }\r\n }\r\n\r\n if (_branch.condition !== undefined && typeof (_branch.condition) === 'object') {\r\n _branch.condition.conditionType.dataElementId = _branch.condition.conditionType.dataElementId.split('_')[0]\r\n + '_' + dynamicId;\r\n }\r\n\r\n for (const reportText of _branch.reportText) {\r\n const $reportText = reportText.GetPropertyType();\r\n if ($reportText instanceof InsertPartial) {\r\n reportText.insertPartial.partialId = reportText.insertPartial.manupulateId(dynamicId);\r\n this.DynamicallyTemplatePartialIds.push(reportText.insertPartial.partialId);\r\n }\r\n\r\n if ($reportText instanceof InsertValue) {\r\n reportText.insertValue.dataElementId = reportText.insertValue.manupulateId(dynamicId);\r\n }\r\n }\r\n }\r\n }\r\n\r\n this.template.endpoint.endpoints.push(endpoint_cloned);\r\n }\r\n }\r\n\r\n private AddRepeatableComputedDataElement() {\r\n this.RemoveManuallyAddedComputedDataElements();\r\n\r\n for (const computedDataElementId of this.ComputedDataElementIds) {\r\n const dataElementId_org = computedDataElementId.dataElementId_org;\r\n const dataElementId_dynamic = computedDataElementId.dataElememntId_dynamic;\r\n\r\n if (dataElementId_org !== '' || dataElementId_dynamic !== '') {\r\n if (_.find(this.template.dataElements, { id: dataElementId_dynamic }) === undefined) {\r\n const computedDataElement = _.find(this.template.dataElements, { id: dataElementId_org }) as ComputedDataElement;\r\n if (computedDataElement !== undefined && computedDataElement.dataElementType === 'ComputedDataElement') {\r\n const $computedDataElement_cloned = _.cloneDeep(computedDataElement) as ComputedDataElement;\r\n $computedDataElement_cloned.id = dataElementId_dynamic;\r\n $computedDataElement_cloned.isManuallyAdded = true;\r\n const dataElementIds = this.template.dataElements.map(dataElement => dataElement.id);\r\n for (let index = 0; index < computedDataElement.decisionPoints.length; index++) {\r\n $computedDataElement_cloned.decisionPoints[index].branches = [];\r\n for (let $branchModified of computedDataElement.decisionPoints[index].branches) {\r\n for (const _dataElement of dataElementIds) {\r\n // tslint:disable-next-line: max-line-length\r\n $branchModified = this.replacePropertyValue(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + dataElementId_dynamic.split('_')[1], $branchModified);\r\n // tslint:disable-next-line: max-line-length\r\n $branchModified = this.replaceTextExpression(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + dataElementId_dynamic.split('_')[1], $branchModified);\r\n }\r\n\r\n $branchModified.isManuallyAdded = true;\r\n $computedDataElement_cloned.decisionPoints[index].branches.push($branchModified);\r\n }\r\n }\r\n\r\n this.template.dataElements.push($computedDataElement_cloned);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n replaceTextExpression(prevVal, newVal, object) {\r\n const newObject = _.clone(object);\r\n _.each(object, (val, key) => {\r\n if (val instanceof ArithmeticExpression) {\r\n newObject[key].expressionText = newObject[key].expressionText.replace(prevVal, newVal);\r\n }\r\n });\r\n\r\n return newObject;\r\n }\r\n\r\n replacePropertyValue(prevVal, newVal, object) {\r\n const newObject = _.clone(object);\r\n _.each(object, (val, key) => {\r\n if (val === prevVal) {\r\n newObject[key] = newVal;\r\n } else if (typeof (val) === 'object' || val instanceof Array) {\r\n newObject[key] = this.replacePropertyValue(prevVal, newVal, val);\r\n }\r\n });\r\n\r\n return newObject;\r\n }\r\n\r\n private AddRepeatableBranchesInsideRule() {\r\n this.RemoveManuallyAddedBranches();\r\n this.RemoveDynamicallyAddedComputedDataElementIds();\r\n for (const decisionPoint of this.template.rules.decisionPoints) {\r\n for (const branch of decisionPoint.branches) {\r\n // tslint:disable-next-line: max-line-length\r\n if (branch.endPointRef !== undefined && branch.endPointRef.isRepeatable && (branch.isManuallyAdded === undefined || !branch.isManuallyAdded)) {\r\n const $currentValue = +this.GetRepeatableValue(branch.endPointRef.repeatCount);\r\n if ($currentValue !== undefined && $currentValue > 0) {\r\n for (let index = 0; index < $currentValue; index++) {\r\n const $repeatGroupName = branch.endPointRef.repeatGroup;\r\n const $branch = _.cloneDeep(branch);\r\n $branch.isManuallyAdded = true;\r\n if ($branch.endPointRef !== undefined) {\r\n $branch.endPointRef.isRepeatable = false;\r\n $branch.endPointRef.endPointId = branch.endPointRef.endPointId.split('_')[0]\r\n + '_' + $repeatGroupName + (index + 1);\r\n }\r\n\r\n if ($branch.ICompositeCondition !== undefined) {\r\n const dataElementIds = this.template.dataElements.map(dataElement => dataElement.id);\r\n $branch.ICompositeCondition.conditions = [];\r\n for (let _conditions of branch.ICompositeCondition.conditions) {\r\n for (const _dataElement of dataElementIds) {\r\n // tslint:disable-next-line: max-line-length\r\n _conditions = this.replacePropertyValue(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + $repeatGroupName + (index + 1), _conditions);\r\n // tslint:disable-next-line: max-line-length\r\n this.CheckIfDataElementisComputedDataElement(_dataElement.split('_')[0], _dataElement.split('_')[0] + '_' + $repeatGroupName + (index + 1));\r\n }\r\n\r\n $branch.ICompositeCondition.conditions.push(_conditions);\r\n }\r\n }\r\n\r\n if (branch.condition !== undefined && typeof (branch.condition) === 'object') {\r\n $branch.condition.conditionType.dataElementId = branch.condition.conditionType.dataElementId.split('_')[0]\r\n + '_' + $repeatGroupName + (index + 1);\r\n }\r\n\r\n decisionPoint.branches.push($branch);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private CheckIfDataElementisComputedDataElement(dataElementId_org, dataElementId_dynamic) {\r\n const $computedDataElement = new ComputedDataElementId();\r\n const computedDataElement = _.find(this.template.dataElements, { id: dataElementId_org }) as BaseDataElement;\r\n if (computedDataElement !== undefined && computedDataElement.dataElementType === 'ComputedDataElement') {\r\n $computedDataElement.dataElememntId_dynamic = dataElementId_dynamic;\r\n $computedDataElement.dataElementId_org = dataElementId_org;\r\n this.ComputedDataElementIds.push(Object.assign({}, $computedDataElement));\r\n }\r\n }\r\n\r\n getDataElementValues() { }\r\n\r\n public evaluateDecisionPoints() {\r\n if (this.template.rules !== undefined && this.template.rules.decisionPoints !== undefined) {\r\n this.showKeyDiagram = undefined;\r\n this.evaluateComputedExpressions();\r\n this.evaluateDecisionAndConditionalProperty();\r\n this.ProcessRepetationDataElements();\r\n this.endOfRoadReached = false;\r\n this.branchCounter++;\r\n const decisionPoints = FindDecisionPoints(this.template.rules.decisionPoints, this.dataElementValues);\r\n this.endpoints = decisionPoints.finalEndPoints;\r\n this.showKeyDiagram = decisionPoints.keyDiagramId;\r\n\r\n const reportText = EvaluateRulesAndGenerateReportText(this.template, this.endpoints, this.dataElementValues);\r\n const $simulatorState = new SimulatorState();\r\n if (reportText.allReportText.length > 0) {\r\n $simulatorState.mainReportText = reportText;\r\n for (const _endpoint of this.endpoints) {\r\n $simulatorState.endPointIds.push(_endpoint);\r\n }\r\n }\r\n\r\n $simulatorState.showKeyDiagram = this.showKeyDiagram;\r\n $simulatorState.nonRelevantDataElementIds = this.nonRelevantDataElementIds;\r\n this.simulatorStateChanged.next($simulatorState);\r\n }\r\n }\r\n\r\n initialize(template: Template) {\r\n this.template = template;\r\n this.dataElementValues = new Map<string, any>();\r\n this.dataElementTexts = new Map<string, any>();\r\n for (const dataElement of this.template.dataElements) {\r\n this.dataElementValues.set(dataElement.id, dataElement.currentValue);\r\n }\r\n }\r\n}\r\n","import { NgModule , ModuleWithProviders } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SimulatorEngineService } from './services/simulator-engine.service';\r\nimport { UtilityService } from './services/utility.service';\r\nimport { ToastrModule } from 'ngx-toastr';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ToastrModule.forRoot()\r\n ],\r\n declarations: []\r\n})\r\nexport class CoreModule {\r\n static forRoot(): ModuleWithProviders {\r\n return {\r\n ngModule: CoreModule,\r\n providers: [\r\n SimulatorEngineService,\r\n UtilityService\r\n ]\r\n };\r\n }\r\n }\r\n","export class AllTextReport {\r\n repeatedSectionName: string;\r\n allTextResultReport: AllTextResultReport;\r\n constructor () {\r\n this.allTextResultReport = new AllTextResultReport();\r\n }\r\n}\r\n\r\nexport class AllReportTextGroup {\r\n repeatedSectionName: string;\r\n allTextResultReport: Array<AllTextResultReport>;\r\n}\r\n\r\nexport class AllTextResultReport {\r\n heading: string;\r\n content: string;\r\n}\r\n\r\nexport enum ReportTextPosition {\r\n Top,\r\n Right\r\n}\r\n","import { Component, Input, Output, EventEmitter, ViewChild, ElementRef, OnChanges, OnInit, OnDestroy } from '@angular/core';\r\nimport { FinalExecutedHistory } from '../assist-data-element/assist-data-element.component';\r\nimport { SimulatorEngineService } from '../../core/services/simulator-engine.service';\r\nimport { InputData } from '../../core/models/input-data.model';\r\nimport { ReportTextPosition } from '../../core/models/report-text.model';\r\nimport { ChoiceDataElement, BaseDataElement, Template, Diagram, MainReportText } from 'testruleengine/Library/Models/Class';\r\nimport { SubscriptionLike as ISubscription, Subject } from 'rxjs';\r\nimport { UtilityService } from '../../core/services/utility.service';\r\nimport { ChoiceElementDisplayEnum } from '../../core/models/choice-element-display.enum';\r\nimport { getTemplate } from 'testruleengine/Library/Utilities/TemplateManager';\r\nimport { AIInputData } from '../../core/models/ai-input-data.model';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-assist-simulator',\r\n templateUrl: './acr-assist-simulator.component.html',\r\n styleUrls: ['./acr-assist-simulator.component.css', '../styles.css']\r\n})\r\nexport class AcrAssistSimulatorComponent implements OnChanges, OnInit, OnDestroy {\r\n\r\n template: Template;\r\n isEmptyContent: boolean;\r\n keyDiagrams: Diagram[] = [];\r\n resultText: MainReportText;\r\n isReset: boolean;\r\n dataElements: BaseDataElement[];\r\n position = ReportTextPosition;\r\n isInvalidFile: boolean;\r\n moduleName: string;\r\n acceptedFileTypes = ['image/png', 'image/gif', 'image/jpg', 'image/jpeg'];\r\n resetValuesSubscription: ISubscription;\r\n\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() resetValuesNotifier: Subject<any>;\r\n @Input() templateContent: string;\r\n @Input() assetsBaseUrl: string;\r\n @Input() showKeyDiagram: boolean;\r\n @Input() reportTextPosition: ReportTextPosition;\r\n @Input() inputValues: InputData[] = [];\r\n @Input() inputData: string;\r\n @Input() showResetButton = true;\r\n @Input() showReportText = true;\r\n @Input() fontSize: string;\r\n @Input() fontFamily: string;\r\n @Input() fontColor: string;\r\n @Input() backgroundColor: string;\r\n @Input() cssClass: string[];\r\n @Input() choiceElementDisplay: ChoiceElementDisplayEnum;\r\n @Input() aiInputs: AIInputData[] = [];\r\n @Input() showTabularReportText = false;\r\n @Output() returnExecutionHistory: EventEmitter<any> = new EventEmitter<any>();\r\n @Output() returnDataElementChanged: EventEmitter<InputData[]> = new EventEmitter<InputData[]>();\r\n @Output() returnDefaultElements = new EventEmitter();\r\n @Output() returnReportText: EventEmitter<MainReportText> = new EventEmitter<MainReportText>();\r\n @Output() callBackAfterGettingShowKeyDiagram: EventEmitter<string> = new EventEmitter<string>();\r\n\r\n @ViewChild('imageUpload', { static: false }) imageUpload: any;\r\n @ViewChild('simulatorBlock', { read: ElementRef, static: false }) private simulatorBlock: ElementRef;\r\n\r\n constructor(\r\n private simulatorEngineService: SimulatorEngineService,\r\n private toastr: ToastrService,\r\n private utilityService: UtilityService) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.resetValuesNotifier != null) {\r\n this.resetValuesSubscription = this.resetValuesNotifier.subscribe((event) => {\r\n this.resetElements();\r\n });\r\n }\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.isReset = true;\r\n this.resultText = undefined;\r\n\r\n this.isEmptyContent = this.templateContent === undefined || this.templateContent.length === 0 && this.inputValues.length === 0 &&\r\n this.inputData === undefined;\r\n\r\n if (this.isEmptyContent) {\r\n return;\r\n }\r\n if (this.utilityService.isNotEmptyString(this.inputData)) {\r\n this.inputValues = JSON.parse(this.inputData);\r\n }\r\n if (this.utilityService.isValidInstance(this.imageUpload)) {\r\n this.imageUpload.nativeElement.value = '';\r\n }\r\n\r\n this.template = getTemplate(this.templateContent);\r\n if (this.utilityService.isNotEmptyArray(this.inputValues)) {\r\n this.populateTestCaseData();\r\n }\r\n\r\n this.simulatorEngineService.initialize(this.template);\r\n this.dataElements = this.template.dataElements;\r\n\r\n if (this.moduleName !== this.template.metadata.id) {\r\n this.keyDiagrams = new Array<Diagram>();\r\n }\r\n\r\n if (!this.keyDiagrams.length) {\r\n this.template.metadata.diagrams.forEach(diag => {\r\n const element = new Diagram();\r\n element.label = diag.label;\r\n element.location = diag.location;\r\n element.keyDiagram = diag.keyDiagram;\r\n this.keyDiagrams.push(element);\r\n });\r\n }\r\n\r\n if (this.utilityService.isNotEmptyArray(this.aiInputs)) {\r\n const element = this.dataElements.find(x => x.id === this.aiInputs[0].id);\r\n if (this.utilityService.isValidInstance(element)) {\r\n element.sources = this.aiInputs;\r\n }\r\n }\r\n\r\n const context = this;\r\n setTimeout(function (e) {\r\n context.applyInputStyles();\r\n }, 100);\r\n }\r\n\r\n setDefaultImage(event, diagram) {\r\n event.target.src = 'assets/img/default.gif';\r\n diagram.isError = true;\r\n }\r\n\r\n imageLoaded(event, diagram) {\r\n if (event.target.src.includes('/assets/img/default.gif')) {\r\n diagram.isError = true;\r\n } else {\r\n diagram.isError = false;\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.resetValuesSubscription)) {\r\n this.resetValuesSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n applyInputStyles() {\r\n if (this.utilityService.isNotEmptyString(this.fontSize)) {\r\n this.simulatorBlock.nativeElement.style.fontSize = this.fontSize;\r\n }\r\n\r\n if (this.utilityService.isNotEmptyString(this.fontColor)) {\r\n this.simulatorBlock.nativeElement.style.color = this.fontColor;\r\n }\r\n\r\n if (this.utilityService.isNotEmptyString(this.fontFamily)) {\r\n this.simulatorBlock.nativeElement.style.fontFamily = this.fontFamily;\r\n }\r\n\r\n if (this.utilityService.isNotEmptyString(this.backgroundColor)) {\r\n this.simulatorBlock.nativeElement.style.backgroundColor = this.backgroundColor;\r\n }\r\n\r\n this.simulatorBlock.nativeElement.className = 'box box-primary box-solid margin-b-0';\r\n if (this.utilityService.isNotEmptyArray(this.cssClass)) {\r\n const classes = this.simulatorBlock.nativeElement.className;\r\n const classesArray = classes.split(' ');\r\n const classesNeedToApply = new Array<string>();\r\n classesArray.forEach(classItem => {\r\n this.cssClass.forEach(css => {\r\n if (classItem.trim() !== css.trim() && classesNeedToApply.indexOf(css) <= -1) {\r\n classesNeedToApply.push(css);\r\n }\r\n });\r\n });\r\n\r\n if (this.utilityService.isNotEmptyArray(classesNeedToApply)) {\r\n classesNeedToApply.forEach(classNeedToApply => {\r\n var nativeClasses = this.simulatorBlock.nativeElement.className.split(' ');\r\n if (this.utilityService.isNotEmptyArray(nativeClasses)) {\r\n if (nativeClasses.indexOf(classNeedToApply) <= -1) {\r\n this.simulatorBlock.nativeElement.className = this.simulatorBlock.nativeElement.className + ' ' + classNeedToApply;\r\n }\r\n } else {\r\n this.simulatorBlock.nativeElement.className = this.simulatorBlock.nativeElement.className + ' ' + classNeedToApply;\r\n }\r\n });\r\n }\r\n }\r\n }\r\n\r\n getImageDataUrl(label: string): string {\r\n if (this.utilityService.isNotEmptyString(label)) {\r\n if (this.utilityService.isImageDataUrl(label)) {\r\n return label;\r\n } else if (this.utilityService.isValidInstance(this.assetsBaseUrl)) {\r\n return `${this.assetsBaseUrl}/${label}`;\r\n }\r\n }\r\n }\r\n\r\n diagramExist(diagram: Diagram) {\r\n return this.keyDiagrams.some(function (el) {\r\n return el.location === diagram.location;\r\n });\r\n }\r\n\r\n resetElements() {\r\n this.moduleName = this.template.metadata.id;\r\n this.template = getTemplate(this.templateContent);\r\n this.simulatorEngineService.initialize(this.template);\r\n this.dataElements = Object.assign({}, this.template.dataElements);\r\n this.resultText = undefined;\r\n const $this = this;\r\n setTimeout(function (e) {\r\n $this.resizeKeyImages();\r\n }, 100);\r\n this.returnDefaultElements.emit();\r\n }\r\n\r\n recieveReportText(textReport: MainReportText) {\r\n this.resultText = textReport;\r\n this.returnReportText.emit(textReport);\r\n\r\n console.log(this.resultText);\r\n if (this.utilityService.isValidInstance(this.resultText)) {\r\n $('#tab1_reportText').prop('checked', true);\r\n }\r\n }\r\n\r\n recievedExecutionHistory(finalExecutionHistory: FinalExecutedHistory) {\r\n this.returnExecutionHistory.emit(finalExecutionHistory);\r\n }\r\n\r\n recivedOnDataElementChanged(data: InputData[]) {\r\n this.returnDataElementChanged.emit(data);\r\n }\r\n\r\n gettingShowKeyDiagram(data: string) {\r\n this.callBackAfterGettingShowKeyDiagram.emit(data);\r\n }\r\n\r\n changeListener(event): void {\r\n this.isInvalidFile = false;\r\n this.keyDiagrams = new Array<Diagram>();\r\n for (let i = 0; i < event.target.files.length; i++) {\r\n const reader = new FileReader();\r\n const diagram = new Diagram();\r\n diagram.label = event.target.files[i].name;\r\n diagram.keyDiagram = i === 0 ? true : false;\r\n\r\n if (!(this.acceptedFileTypes.indexOf(event.target.files[i].type) > -1)) {\r\n this.isInvalidFile = true;\r\n }\r\n\r\n reader.onload = (event1: any) => {\r\n diagram.location = reader.result.toString();\r\n };\r\n\r\n reader.readAsDataURL(event.target.files[i]);\r\n\r\n reader.onloadend = (event1: any) => {\r\n this.keyDiagrams.push(diagram);\r\n };\r\n }\r\n\r\n if ($('#icon_keydiagram').hasClass('fa fa-plus')) {\r\n this.collapseKeyDiagram();\r\n }\r\n }\r\n\r\n resizeKeyImages() {\r\n const windowHeight = window.innerHeight;\r\n const reportTextHeight = $('#div-right-reportText').height();\r\n const height = windowHeight - reportTextHeight - 150;\r\n if (reportTextHeight === 1) {\r\n $('#carousel-example-generic').height('auto');\r\n } else {\r\n $('#carousel-example-generic').height(height + 'px');\r\n }\r\n }\r\n\r\n collapseKeyDiagram() {\r\n if ($('#icon_keydiagram').hasClass('fa fa-minus')) {\r\n $('#icon_keydiagram').removeClass('fa fa-minus');\r\n $('#icon_keydiagram').addClass('fa fa-plus');\r\n $('#body_keydiagram').css({\r\n display: 'none'\r\n });\r\n } else {\r\n $('#icon_keydiagram').removeClass('fa fa-plus');\r\n $('#icon_keydiagram').addClass('fa fa-minus');\r\n $('#body_keydiagram').removeAttr('style');\r\n }\r\n }\r\n\r\n collapseReportText() {\r\n if ($('#icon_reporttext').hasClass('fa fa-minus')) {\r\n $('#icon_reporttext').removeClass('fa fa-minus');\r\n $('#icon_reporttext').addClass('fa fa-plus');\r\n $('#body_reporttext').css({\r\n display: 'none'\r\n });\r\n } else {\r\n $('#icon_reporttext').removeClass('fa fa-plus');\r\n $('#icon_reporttext').addClass('fa fa-minus');\r\n $('#body_reporttext').removeAttr('style');\r\n }\r\n }\r\n\r\n populateTestCaseData() {\r\n this.template.dataElements.forEach(dataeElement => {\r\n const inputValue = this.inputValues.filter(x => x.dataElementId.toUpperCase() === dataeElement.id.toUpperCase());\r\n if (inputValue !== undefined && inputValue.length > 0) {\r\n if (dataeElement.dataElementType === 'ChoiceDataElement' || dataeElement.dataElementType === 'MultiChoiceDataElement') {\r\n const choiceElement = dataeElement as ChoiceDataElement;\r\n if (Array.isArray(inputValue[0].dataElementValue)) {\r\n const values = [];\r\n choiceElement.choiceInfo.forEach(choice => {\r\n inputValue[0].dataElementValue.forEach(value => {\r\n if (choice.value.toUpperCase() === value.toUpperCase()) {\r\n values.push(choice.value);\r\n }\r\n });\r\n });\r\n inputValue[0].dataElementValue = values;\r\n } else {\r\n choiceElement.choiceInfo.forEach(choice => {\r\n\r\n if (inputValue[0].dataElementValue !== undefined) {\r\n if (choice.value.toUpperCase() === inputValue[0].dataElementValue.toUpperCase()) {\r\n inputValue[0].dataElementValue = choice.value;\r\n return;\r\n }\r\n }\r\n\r\n });\r\n }\r\n }\r\n dataeElement.currentValue = inputValue[0].dataElementValue;\r\n }\r\n });\r\n }\r\n\r\n clipboardError(error: Error): void {\r\n this.toastr.error('Failed to copy to clipboard');\r\n }\r\n\r\n clipboardSuccess(value: string): void {\r\n this.toastr.success('Successfully copied to clipboard');\r\n }\r\n\r\n getReportTextInnerContent(reportTextContentForEmptySectionName) {\r\n if (this.utilityService.isValidInstance(reportTextContentForEmptySectionName)) {\r\n var msgb = reportTextContentForEmptySectionName.innerText.trim();\r\n let selBox = document.createElement('textarea');\r\n selBox.style.position = 'fixed';\r\n selBox.style.left = '0';\r\n selBox.style.top = '0';\r\n selBox.style.opacity = '0';\r\n selBox.value = msgb;\r\n document.body.appendChild(selBox);\r\n selBox.focus();\r\n selBox.select();\r\n document.execCommand('copy');\r\n document.body.removeChild(selBox);\r\n this.toastr.success('Successfully copied to clipboard');\r\n } else {\r\n this.toastr.error('Failed to copy to clipboard');\r\n }\r\n // return '';\r\n }\r\n}\r\n","export class InputData {\r\n dataElementId: string;\r\n dataElementLabel: string;\r\n dataElementValue: any;\r\n dataElementDisplayValue: any;\r\n constructor() {\r\n this.dataElementLabel = '';\r\n this.dataElementDisplayValue = '';\r\n\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs/internal/Subject';\r\n\r\n@Injectable()\r\nexport class SimulatorCommunicationService {\r\n // Observable string sources\r\n private simulatorSource = new Subject<string>();\r\n\r\n // Observable string streams\r\n simulatorSource$ = this.simulatorSource.asObservable();\r\n\r\n // Service message commands\r\n messageEmitter(mission: string) {\r\n this.simulatorSource.next(mission);\r\n }\r\n}\r\n","import { RepeatedElementSections } from './RepeatedElementSections';\r\n\r\nexport class RepeatedElementModel {\r\n ParentElement: any;\r\n ParentElementId: string;\r\n RepeatedElementSections: RepeatedElementSections[];\r\n constructor() {\r\n this.RepeatedElementSections = new Array<RepeatedElementSections>();\r\n }\r\n}\r\n\r\n\r\n","export class RepeatedElementSections {\r\n SectionName: string;\r\n ChildElements: any[] = [];\r\n SectionId: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { Subject } from 'rxjs/internal/Subject';\r\n\r\n@Injectable()\r\nexport class ResetCommunicationService {\r\n // Observable string sources\r\n private ResetSource = new Subject<string>();\r\n\r\n // Observable string streams\r\n resetSource$ = this.ResetSource.asObservable();\r\n\r\n // Service message commands\r\n messageEmitter(mission: string) {\r\n this.ResetSource.next(mission);\r\n }\r\n}\r\n","import { TabularReportElements } from './tabular-report-elements.model';\r\n\r\nexport class TabularReport {\r\n label: string;\r\n identifier: string;\r\n elements: TabularReportElements[];\r\n}\r\n\r\n","export class TabularReportElements {\r\n dataElement: string;\r\n radElement: string;\r\n values: any;\r\n}\r\n","import { Component, Input, Output, EventEmitter, OnChanges, OnInit, OnDestroy } from '@angular/core';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\nimport { SimulatorEngineService } from '../../core/services/simulator-engine.service';\r\nimport { SimulatorState } from '../../core/models/simulator-state.model';\r\nimport { InputData } from '../../core/models/input-data.model';\r\nimport { BaseDataElement, ChoiceDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { SimulatorCommunicationService } from '../shared/services/simulator-communication.service';\r\nimport { RepeatedElementModel } from '../../core/elements/models/repeatedElement.model';\r\nimport { RepeatedElementSections } from '../../core/elements/models/RepeatedElementSections';\r\nimport { ResetCommunicationService } from '../shared/services/reset-communication.service';\r\nimport { ChoiceElementDisplayEnum } from '../../core/models/choice-element-display.enum';\r\nimport { TabularReport } from '../../core/models/tabular-report.model';\r\nimport { UtilityService } from '../../core/services/utility.service';\r\nimport { MainReportText } from 'testruleengine/Library/Models/Class';\r\n\r\nimport * as _ from 'lodash';\r\nimport { TabularReportElements } from '../../core/models/tabular-report-elements.model';\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-assist-data-element',\r\n templateUrl: './assist-data-element.component.html',\r\n styleUrls: ['./assist-data-element.component.css', '../styles.css']\r\n})\r\n\r\nexport class AssistDataElementComponent implements OnInit, OnChanges, OnDestroy {\r\n\r\n mainReportTextObj: MainReportText;\r\n simulatorState: SimulatorState;\r\n dataElementValues: Map<string, any>;\r\n selectedChoiceValues: string[] = [];\r\n executedResultIds: any[] = [];\r\n executedResultHistories: ExecutedResultHistory[] = [];\r\n IsRepeating: boolean;\r\n $RepeatedElementModel: any[] = [];\r\n resetSourceSubscription: ISubscription;\r\n simulatorStateSubscription: ISubscription;\r\n\r\n @Input() showTabularReportText: boolean;\r\n @Input() choiceElementDisplay: ChoiceElementDisplayEnum;\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() dataElements: BaseDataElement[];\r\n @Input() assetsBaseUrl: string;\r\n @Input() $dataElements: BaseDataElement[];\r\n @Input() Endpoints = [];\r\n @Input() templatePartial: string[];\r\n @Input() endPointXMLString: string[];\r\n @Input() xmlContent: string;\r\n @Input() isReset: boolean;\r\n @Input() inputValues: InputData[] = [];\r\n @Output() callBackAfterGettingShowKeyDiagram: EventEmitter<string> = new EventEmitter<string>();\r\n @Output() returnReportText: EventEmitter<MainReportText> = new EventEmitter<MainReportText>();\r\n @Output() returnExecutionHistory: EventEmitter<FinalExecutedHistory> = new EventEmitter<FinalExecutedHistory>();\r\n @Output() returnDataElementChanged: EventEmitter<InputData[]> = new EventEmitter<InputData[]>();\r\n @Output() callBackAfterAIInputReset: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n constructor(\r\n private simulatorEngineService: SimulatorEngineService,\r\n private utilityService: UtilityService,\r\n private simulatorCommunicationService: SimulatorCommunicationService,\r\n resetCommunicationService: ResetCommunicationService\r\n ) {\r\n this.resetSourceSubscription = resetCommunicationService.resetSource$.subscribe(\r\n mission => {\r\n this.IsRepeating = false;\r\n this.$RepeatedElementModel = [];\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n this.IsRepeating = false;\r\n this.simulatorStateSubscription = this.simulatorEngineService.simulatorStateChanged.subscribe((message) => {\r\n this.simulatorState = message as SimulatorState;\r\n\r\n this.dataElements.filter(x => x.canPrefillFromSource === true).forEach(_dataElement => {\r\n _dataElement.currentValue = undefined;\r\n this.dataElementValues.set(_dataElement.id, undefined);\r\n });\r\n\r\n this.mainReportTextObj = this.simulatorState.mainReportText;\r\n if (this.mainReportTextObj !== undefined && this.mainReportTextObj.setValues !== undefined\r\n && this.mainReportTextObj.setValues.setDataElementValue !== undefined &&\r\n this.mainReportTextObj.setValues.setDataElementValue.length > 0) {\r\n this.mainReportTextObj.setValues.setDataElementValue.forEach(_setValues => {\r\n const _dataElementWithFilter = this.dataElements.filter(x => x.id === _setValues.dataElementId\r\n && x.canPrefillFromSource === true);\r\n if (_dataElementWithFilter !== undefined && _dataElementWithFilter[0] !== undefined) {\r\n _dataElementWithFilter[0].currentValue = _setValues.value;\r\n this.dataElementValues.set(_setValues.dataElementId, _setValues.value);\r\n }\r\n });\r\n }\r\n\r\n this.dataElementValues = this.simulatorEngineService.getAllDataElementValues();\r\n\r\n const showKeyDiagram = this.simulatorState.showKeyDiagram;\r\n const nonRelevantIDs = this.simulatorState.nonRelevantDataElementIds;\r\n for (const dataElement of this.dataElements) {\r\n if (nonRelevantIDs && nonRelevantIDs.length > 0) {\r\n if (nonRelevantIDs.indexOf(dataElement.id) >= 0) {\r\n dataElement.isVisible = false;\r\n } else {\r\n dataElement.isVisible = true;\r\n }\r\n } else {\r\n dataElement.isVisible = true;\r\n }\r\n // tslint:disable-next-line: max-line-length\r\n if (this.dataElementValues.get(dataElement.id) !== undefined && dataElement.currentValue !== this.dataElementValues.get(dataElement.id)) {\r\n dataElement.currentValue = this.dataElementValues.get(dataElement.id);\r\n }\r\n // tslint:disable-next-line: max-line-length\r\n dataElement.currentValue = (dataElement.currentValue !== undefined) ? dataElement.currentValue : this.dataElementValues.get(dataElement.id);\r\n }\r\n\r\n this.dataElements = Object.keys(this.dataElements).map(i => this.dataElements[i]);\r\n // tslint:disable-next-line: max-line-length\r\n this.dataElements = this.dataElements.filter(x => x.displaySequence != null).sort(function(DE_1, DE_2) { return DE_1.displaySequence - DE_2.displaySequence; });\r\n\r\n if (this.showTabularReportText) {\r\n this.mainReportTextObj = new MainReportText();\r\n this.mainReportTextObj.tabularReport = this.createTabularReport();\r\n if (this.utilityService.isValidInstance(this.mainReportTextObj.tabularReport) &&\r\n this.utilityService.isNotEmptyArray(this.mainReportTextObj.tabularReport.elements)) {\r\n this.returnReportText.emit(this.mainReportTextObj);\r\n } else {\r\n this.returnReportText.emit(undefined);\r\n }\r\n } else if (this.mainReportTextObj !== undefined && this.mainReportTextObj.allReportText.length > 0) {\r\n this.returnReportText.emit(this.mainReportTextObj);\r\n } else {\r\n this.returnReportText.emit(undefined);\r\n }\r\n\r\n this.$dataElements = [];\r\n for (const dataelement of this.dataElements) {\r\n if (!dataelement.isRepeatable) {\r\n this.$dataElements.push(dataelement);\r\n }\r\n }\r\n\r\n this.callBackAfterGettingShowKeyDiagram.emit(showKeyDiagram);\r\n this.simulatorCommunicationService.messageEmitter('');\r\n });\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.dataElements = Object.keys(this.dataElements).map(i => this.dataElements[i]);\r\n // tslint:disable-next-line: max-line-length\r\n this.dataElements = this.dataElements.filter(x => x.displaySequence != null).sort(function(DE_1, DE_2) { return DE_1.displaySequence - DE_2.displaySequence; });\r\n this.executedResultIds = [];\r\n\r\n this.$dataElements = [];\r\n for (const dataelement of this.dataElements) {\r\n if (!dataelement.isRepeatable) {\r\n this.$dataElements.push(dataelement);\r\n }\r\n }\r\n\r\n this.simulatorEngineService.evaluateDecisionPoints();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.resetSourceSubscription)) {\r\n this.resetSourceSubscription.unsubscribe();\r\n }\r\n if (this.utilityService.isValidInstance(this.simulatorStateSubscription)) {\r\n this.simulatorStateSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n choiceSelected($event) {\r\n if ($event !== undefined) {\r\n if ($event.receivedElement !== undefined && $event.selectedCondition !== undefined) {\r\n this.selectedChoiceValues[$event.receivedElement.elementId + 'SelectedValue'] = $event.receivedElement.selectedText;\r\n this.simulatorEngineService.addOrUpdateDataElement($event.receivedElement.elementId, $event.receivedElement.selectedValue,\r\n $event.receivedElement.selectedText);\r\n const executedResults: string[] = [];\r\n executedResults[$event.selectedCondition.selectedCondition] = $event.selectedCondition.selectedValue;\r\n this.executedResultIds[$event.selectedCondition.selectedConditionId] = executedResults;\r\n this.generateExecutionHistory();\r\n this.afterDataElementChanged();\r\n }\r\n } else {\r\n this.afterDataElementChanged();\r\n }\r\n }\r\n\r\n numericSelected($event) {\r\n if ($event !== undefined) {\r\n if ($event.receivedElement !== undefined && $event.selectedCondition !== undefined) {\r\n this.FindRepeatedElements($event);\r\n this.simulatorEngineService.addOrUpdateDataElement($event.receivedElement.elementId, $event.receivedElement.selectedValue,\r\n $event.receivedElement.selectedValue);\r\n const executedResults: string[] = [];\r\n executedResults[$event.selectedCondition.selectedCondition] = $event.selectedCondition.selectedValue;\r\n this.executedResultIds[$event.selectedCondition.selectedConditionId] = executedResults;\r\n this.generateExecutionHistory();\r\n this.afterDataElementChanged();\r\n }\r\n } else {\r\n this.afterDataElementChanged();\r\n }\r\n }\r\n\r\n onAIInputReset(event) {\r\n this.callBackAfterAIInputReset.emit(event);\r\n }\r\n\r\n IsAnyRepeatElementsExist(event): boolean {\r\n let isExist = false;\r\n for (const item of this.dataElements) {\r\n if (item.isRepeatable === true && item.repeatRefID === event.receivedElement.elementId) {\r\n isExist = true;\r\n break;\r\n }\r\n }\r\n\r\n return isExist;\r\n }\r\n\r\n FindRepeatedElements($event) {\r\n // RepeatableElementRegisterService.ClearRepeatableDataElementsGroupName();\r\n if (this.IsAnyRepeatElementsExist($event)) {\r\n this.IsRepeating = false;\r\n const $repeatedElementModel = new RepeatedElementModel();\r\n\r\n this.resetRepeatedElements($event);\r\n for (const item of this.dataElements) {\r\n if (item.id === $event.receivedElement.elementId) {\r\n $repeatedElementModel.ParentElement = item;\r\n $repeatedElementModel.ParentElementId = $event.receivedElement.elementId;\r\n }\r\n }\r\n\r\n for (let i = 0; i < $event.receivedElement.selectedValue; i++) {\r\n const repeatedElementSection = new RepeatedElementSections();\r\n for (const item of this.dataElements) {\r\n if (item.isRepeatable === true && item.repeatRefID === $event.receivedElement.elementId) {\r\n // this.IsRepeating = true;\r\n repeatedElementSection.SectionName = item.repeatGroup + ' ' + + (i + 1);\r\n repeatedElementSection.SectionId = item.repeatGroup.replace(/[\\s]/g, '') + +(i + 1);\r\n item.id = item.id.split('_')[0] + '_' + item.repeatGroup.replace(/[\\s]/g, '') + +(i + 1);\r\n item.currentValue = undefined;\r\n this.dataElementValues.set(item.id, undefined);\r\n const $item = Object.assign([], item);\r\n repeatedElementSection.ChildElements.push($item);\r\n }\r\n }\r\n\r\n $repeatedElementModel.RepeatedElementSections.push(repeatedElementSection);\r\n }\r\n\r\n // RepeatableElementRegisterService.SetRepeatableDataElementsGroupName($repeatedElementModel);\r\n this.$RepeatedElementModel.push($repeatedElementModel);\r\n this.IsRepeating = this.$RepeatedElementModel.length > 0 ? true : false;\r\n }\r\n }\r\n\r\n resetRepeatedElements($event) {\r\n for (let index = 0; index < this.$RepeatedElementModel.length; index++) {\r\n if (this.$RepeatedElementModel[index].ParentElementId === $event.receivedElement.elementId) {\r\n this.$RepeatedElementModel.splice(index, 1);\r\n }\r\n }\r\n }\r\n\r\n dateTimeSelected($event) {\r\n if ($event !== undefined) {\r\n if ($event.receivedElement !== undefined && $event.selectedCondition !== undefined) {\r\n this.simulatorEngineService.addOrUpdateDataElement($event.receivedElement.elementId, $event.receivedElement.selectedValue,\r\n $event.receivedElement.selectedValue);\r\n const executedResults: string[] = [];\r\n executedResults[$event.selectedCondition.selectedCondition] = $event.selectedCondition.selectedValue;\r\n this.executedResultIds[$event.selectedCondition.selectedConditionId] = executedResults;\r\n this.generateExecutionHistory();\r\n this.afterDataElementChanged();\r\n }\r\n } else {\r\n this.afterDataElementChanged();\r\n }\r\n }\r\n\r\n multiSelected($event) {\r\n if ($event !== undefined) {\r\n if ($event.receivedElement !== undefined && $event.selectedCondition !== undefined) {\r\n // tslint:disable-next-line: max-line-length\r\n this.simulatorEngineService.addOrUpdateDataElement($event.receivedElement.elementId, $event.receivedElement.selectedValues,\r\n $event.receivedElement.selectedTexts);\r\n const executedResults: string[] = [];\r\n executedResults[$event.selectedCondition.selectedCondition] = $event.selectedCondition.selectedValue;\r\n this.executedResultIds[$event.selectedCondition.selectedConditionId] = executedResults;\r\n this.generateExecutionHistory();\r\n this.afterDataElementChanged();\r\n }\r\n } else {\r\n this.afterDataElementChanged();\r\n }\r\n }\r\n\r\n afterDataElementChanged() {\r\n const deValues: InputData[] = [];\r\n for (const de of this.dataElements) {\r\n if (de.isVisible && de.dataElementType !== 'ComputedDataElement' && de.dataElementType !== 'GlobalValue') {\r\n const inputData = new InputData();\r\n inputData.dataElementId = de.id;\r\n inputData.dataElementLabel = de.label;\r\n if (de.dataElementType !== 'MultiChoiceDataElement') {\r\n inputData.dataElementValue = de.currentValue;\r\n }\r\n\r\n if (de.currentValue === undefined || de.currentValue === '') {\r\n inputData.dataElementDisplayValue = undefined;\r\n } else {\r\n if (de.dataElementType === 'ChoiceDataElement') {\r\n const choices = (de as ChoiceDataElement).choiceInfo;\r\n const choice = choices.filter(ch => ch.value === de.currentValue);\r\n if (choice !== undefined && choice.length) {\r\n inputData.dataElementDisplayValue = choices.filter(ch => ch.value === de.currentValue)[0].label;\r\n } else {\r\n inputData.dataElementDisplayValue = de.currentValue;\r\n }\r\n } else if (de.dataElementType === 'MultiChoiceDataElement') {\r\n const choices = (de as ChoiceDataElement).choiceInfo;\r\n inputData.dataElementDisplayValue = [];\r\n\r\n if (!(de.currentValue instanceof Array)) {\r\n inputData.dataElementValue = [de.currentValue];\r\n } else {\r\n inputData.dataElementValue = de.currentValue;\r\n }\r\n\r\n choices.forEach(choice => {\r\n if (Array.isArray(de.currentValue)) {\r\n de.currentValue.forEach(element => {\r\n if (choice.value === element) {\r\n inputData.dataElementDisplayValue.push(choice.label);\r\n }\r\n });\r\n } else {\r\n if (choice.value === de.currentValue) {\r\n inputData.dataElementDisplayValue.push(choice.label);\r\n }\r\n }\r\n });\r\n\r\n if (inputData.dataElementDisplayValue === undefined && inputData.dataElementDisplayValue !== null) {\r\n inputData.dataElementDisplayValue = this.removeDuplicates(inputData.dataElementDisplayValue);\r\n }\r\n\r\n if (inputData.dataElementValue !== undefined && inputData.dataElementValue != null) {\r\n inputData.dataElementValue = this.removeDuplicates(inputData.dataElementValue);\r\n }\r\n } else {\r\n inputData.dataElementDisplayValue = de.currentValue;\r\n }\r\n }\r\n deValues.push(inputData);\r\n }\r\n }\r\n\r\n this.returnDataElementChanged.emit(deValues);\r\n }\r\n\r\n removeDuplicates(arr) {\r\n const unique_array = [];\r\n // tslint:disable-next-line: prefer-for-of\r\n for (let i = 0; i < arr.length; i++) {\r\n if (unique_array.indexOf(arr[i]) === -1) {\r\n unique_array.push(arr[i]);\r\n }\r\n }\r\n\r\n return unique_array;\r\n }\r\n\r\n private generateExecutionHistory() {\r\n this.executedResultHistories = [];\r\n let isNonRelevant: boolean;\r\n isNonRelevant = false;\r\n // tslint:disable-next-line:forin\r\n for (const resultId in this.executedResultIds) {\r\n for (const nonRelevantDataElement of this.simulatorState.nonRelevantDataElementIds) {\r\n if (nonRelevantDataElement === resultId) {\r\n isNonRelevant = true;\r\n break;\r\n } else {\r\n isNonRelevant = false;\r\n }\r\n }\r\n if (!isNonRelevant) {\r\n // tslint:disable-next-line:forin\r\n for (const label in this.executedResultIds[resultId]) {\r\n // tslint:disable-next-line: no-use-before-declare\r\n const executedResultHistory = new ExecutedResultHistory();\r\n\r\n executedResultHistory.resultCondition = label;\r\n executedResultHistory.resultValue = this.executedResultIds[resultId][label];\r\n\r\n this.executedResultHistories.push(executedResultHistory);\r\n }\r\n }\r\n }\r\n // tslint:disable-next-line: no-use-before-declare\r\n const finalExecution = new FinalExecutedHistory();\r\n if (this.executedResultHistories.length > 0) {\r\n finalExecution.executionHistories = this.executedResultHistories;\r\n finalExecution.resultText = this.mainReportTextObj;\r\n finalExecution.inputData = [];\r\n\r\n for (const de of this.dataElements) {\r\n if (de.isVisible && de.dataElementType !== 'ComputedDataElement' && de.dataElementType !== 'GlobalValue') {\r\n const inputData = new InputData();\r\n inputData.dataElementId = de.id;\r\n inputData.dataElementValue = de.currentValue;\r\n finalExecution.inputData.push(inputData);\r\n }\r\n }\r\n }\r\n\r\n this.returnExecutionHistory.emit(finalExecution);\r\n }\r\n\r\n private createTabularReport(): TabularReport {\r\n const dataElementTexts = this.simulatorEngineService.getAllDataElementTexts()[Symbol.iterator]();\r\n const template = this.simulatorEngineService.getTemplate();\r\n const tabularReport = new TabularReport();\r\n tabularReport.elements = new Array<TabularReportElements>();\r\n tabularReport.label = template.metadata.label;\r\n\r\n if (this.utilityService.isValidInstance(template.metadata.codableConcept) &&\r\n this.utilityService.isNotEmptyArray(template.metadata.codableConcept.coding)) {\r\n tabularReport.identifier = template.metadata.codableConcept.coding[0].code;\r\n }\r\n\r\n for (const value of dataElementTexts) {\r\n const hasValidValue = Array.isArray(value[1]) ?\r\n this.utilityService.isNotEmptyArray(value[1]) : this.utilityService.isNotEmptyString(value[1]);\r\n if (hasValidValue) {\r\n const dataElement = template.dataElements.find(x => x.id === value[0] &&\r\n x.dataElementType !== 'ComputedDataElement' && x.dataElementType !== 'GlobalValue');\r\n if (this.utilityService.isValidInstance(dataElement)) {\r\n let radElementId: string;\r\n if (this.utilityService.isValidInstance(dataElement.codableConcept) &&\r\n this.utilityService.isNotEmptyArray(dataElement.codableConcept.coding)) {\r\n radElementId = dataElement.codableConcept.coding[0].code;\r\n }\r\n\r\n const element = new TabularReportElements();\r\n element.dataElement = dataElement.label;\r\n element.radElement = radElementId;\r\n element.values = value[1];\r\n tabularReport.elements.push(element);\r\n }\r\n }\r\n }\r\n\r\n return tabularReport;\r\n }\r\n}\r\n\r\nexport class ChoiceElement {\r\n elementId: string;\r\n selectedValue: string;\r\n selectedText: string;\r\n}\r\n\r\nexport class NumericElement {\r\n elementId: string;\r\n selectedValue: number;\r\n}\r\n\r\nexport class DateTimeElement {\r\n elementId: string;\r\n selectedValue: string;\r\n}\r\n\r\nexport class MultiChoiceElement {\r\n elementId: string;\r\n selectedValues: string[];\r\n selectedTexts: string[];\r\n}\r\n\r\nexport class AllElements {\r\n elementId: string;\r\n selectedValues: any[];\r\n}\r\n\r\nexport class ExecutedResultHistory {\r\n resultCondition: string;\r\n resultValue: any;\r\n}\r\n\r\nexport class FinalExecutedHistory {\r\n executionHistories: ExecutedResultHistory[];\r\n resultText: MainReportText;\r\n inputData: InputData[];\r\n}\r\n","import { Component, Input } from '@angular/core';\r\nimport { BaseDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\n\r\n@Component({\r\n selector: 'acr-hint-diagram',\r\n templateUrl: './hint-diagram.component.html',\r\n styleUrls: ['./hint-diagram.component.css', '../../styles.css']\r\n})\r\nexport class HintDiagramComponent {\r\n\r\n activeSlideIndex = 0;\r\n\r\n @Input() dataElement: BaseDataElement;\r\n @Input() assetsBaseUrl: string;\r\n\r\n constructor(\r\n private utilityService: UtilityService\r\n ) {\r\n }\r\n\r\n resetCarouselIndex() {\r\n this.activeSlideIndex = 0;\r\n }\r\n\r\n getImageDataUrl(label: string): string {\r\n if (this.utilityService.isNotEmptyString(label)) {\r\n if (this.utilityService.isImageDataUrl(label)) {\r\n return label;\r\n } else if (this.utilityService.isValidInstance(this.assetsBaseUrl)) {\r\n return `${this.assetsBaseUrl}/${label}`;\r\n }\r\n }\r\n }\r\n}\r\n","export class SelectedCondition {\r\n selectedConditionId: string;\r\n selectedCondition: any;\r\n selectedValue: any;\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter, AfterViewInit, OnDestroy } from '@angular/core';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\nimport { NumericDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { NumericElement } from '../assist-data-element.component';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { SelectedCondition } from '../../../core/models/executed-result.model';\r\nimport { SimulatorEngineService } from '../../../core/services/simulator-engine.service';\r\nimport { SimulatorCommunicationService } from '../../shared/services/simulator-communication.service';\r\nimport { ResetCommunicationService } from '../../shared/services/reset-communication.service';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\n\r\n@Component({\r\n selector: 'acr-assist-numeric-element',\r\n templateUrl: './assist-numeric-element.component.html',\r\n styleUrls: ['./assist-numeric-element.component.css', '../../styles.css']\r\n})\r\nexport class AssistNumericElementComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n numericElementForm: FormGroup;\r\n selectedCondition: SelectedCondition;\r\n simulatorStateSubscription: ISubscription;\r\n resetSubscription: ISubscription;\r\n\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() assetsBaseUrl: string;\r\n @Input() numericDataElement: NumericDataElement;\r\n @Output() returnNumericElement = new EventEmitter();\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private simulatorEngineService: SimulatorEngineService,\r\n private utilityService: UtilityService,\r\n simulatorCommunicationService: SimulatorCommunicationService,\r\n resetCommunicationService: ResetCommunicationService) {\r\n this.simulatorStateSubscription = simulatorCommunicationService.simulatorSource$.subscribe(\r\n mission => {\r\n this.updateFormValidator();\r\n });\r\n\r\n this.resetSubscription = resetCommunicationService.resetSource$.subscribe(\r\n mission => { });\r\n }\r\n\r\n ngOnInit() {\r\n this.createNumericElementForm();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.numericDataElement.currentValue !== undefined && this.numericDataElement.currentValue !== 0) {\r\n this.simulatorEngineService.addOrUpdateDataElement(this.numericDataElement.id, this.numericDataElement.currentValue,\r\n this.numericDataElement.currentValue);\r\n this.numericElementForm.controls.numericElement.setValue(this.numericDataElement.currentValue);\r\n this.loadedNumericValue(this.numericDataElement.id, this.numericDataElement.currentValue, this.numericDataElement.label);\r\n } else {\r\n this.returnNumericElement.emit(undefined);\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.simulatorStateSubscription)) {\r\n this.simulatorStateSubscription.unsubscribe();\r\n }\r\n if (this.utilityService.isValidInstance(this.resetSubscription)) {\r\n this.resetSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n loadedNumericValue(id, value, selectedCondition) {\r\n const choiceElement = new NumericElement();\r\n choiceElement.elementId = id;\r\n choiceElement.selectedValue = value;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n\r\n this.selectedCondition.selectedConditionId = id;\r\n this.selectedCondition.selectedCondition = selectedCondition;\r\n this.selectedCondition.selectedValue = value;\r\n this.returnNumericElement.emit({ receivedElement: choiceElement, selectedCondition: this.selectedCondition });\r\n }\r\n\r\n choiceSelected(element, selectedCondition) {\r\n const choiceElement = new NumericElement();\r\n choiceElement.elementId = element.id;\r\n choiceElement.selectedValue = element.value;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n\r\n this.selectedCondition.selectedConditionId = element.id;\r\n this.selectedCondition.selectedCondition = selectedCondition;\r\n this.selectedCondition.selectedValue = element.value;\r\n\r\n this.returnNumericElement.emit({ receivedElement: choiceElement, selectedCondition: this.selectedCondition });\r\n }\r\n\r\n _keyUp(event: any) {\r\n // const $this = this;\r\n // if ($this.numericDataElement.maximum != undefined && parseFloat(value) > $this.numericDataElement.maximum) {\r\n // event.preventDefault();\r\n // if (value.toString().substring(0, value.toString().length - 1) == '') {\r\n // $this.numberValue = undefined;\r\n // } else {\r\n // $this.numberValue = parseFloat(value.toString().substring(0, value.toString().length - 1));\r\n // }\r\n // }\r\n }\r\n\r\n _keyUpInteger(event: any) {\r\n // const $this = this;\r\n // if ($this.numericDataElement.maximum != undefined && parseInt(value) > $this.numericDataElement.maximum) {\r\n // event.preventDefault();\r\n // if (value.toString().substring(0, value.toString().length - 1) == '') {\r\n // $this.numberValue = undefined;\r\n // } else {\r\n // $this.numberValue = parseInt(value.toString().substring(0, value.toString().length - 1));\r\n // }\r\n // }\r\n }\r\n\r\n onlyIntegerKey(event) {\r\n return (event.charCode === 8 || event.charCode === 0) ? null : event.charCode >= 48 && event.charCode <= 57;\r\n }\r\n\r\n hasAIInputStyle() {\r\n if (this.utilityService.isNotEmptyArray(this.numericDataElement.sources)) {\r\n const elem = this.numericDataElement.sources.find(x => x.id === this.numericDataElement.id);\r\n if (this.utilityService.isValidInstance(elem)) {\r\n return elem.value === this.numericElementForm.controls.numericElement.value;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n isNumericElementRequired(): boolean {\r\n return this.numericElementForm.controls.numericElement.invalid &&\r\n this.numericElementForm.controls.numericElement.errors.required &&\r\n this.numericDataElement.isRequired;\r\n }\r\n\r\n isNumericElementMin(): boolean {\r\n return this.numericElementForm.controls.numericElement.invalid &&\r\n this.numericElementForm.controls.numericElement.errors.min;\r\n }\r\n\r\n isNumericElementMax(): boolean {\r\n return this.numericElementForm.controls.numericElement.invalid &&\r\n this.numericElementForm.controls.numericElement.errors.max;\r\n }\r\n\r\n updateFormValidator() {\r\n this.numericElementForm.controls.numericElement.setValidators([Validators.compose([Validators.required,\r\n Validators.min(+this.numericDataElement.minimum), Validators.max(+this.numericDataElement.maximum)])]);\r\n this.numericElementForm.controls.numericElement.updateValueAndValidity();\r\n }\r\n\r\n private createNumericElementForm() {\r\n this.numericElementForm = this.formBuilder.group({\r\n // tslint:disable-next-line:max-line-length\r\n numericElement: ['', Validators.compose([Validators.required, Validators.min(+this.numericDataElement.minimum), Validators.max(+this.numericDataElement.maximum)])],\r\n });\r\n }\r\n}\r\n","export enum ChoiceElementDisplayEnum {\r\n SelectBox,\r\n ListBox,\r\n RadioButton\r\n}","import { Component, OnInit, Input, EventEmitter, Output, AfterViewInit, ChangeDetectorRef, OnDestroy, HostListener } from '@angular/core';\r\nimport { ChoiceDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { ChoiceElement } from '../assist-data-element.component';\r\nimport { SelectedCondition } from '../../../core/models/executed-result.model';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { RepeatedElementSections } from '../../../core/elements/models/RepeatedElementSections';\r\nimport { ChoiceElementDisplayEnum } from '../../../core/models/choice-element-display.enum';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\nimport { SimulatorCommunicationService } from '../../shared/services/simulator-communication.service';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\n\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-assist-choice-element',\r\n templateUrl: './assist-choice-element.component.html',\r\n styleUrls: ['./assist-choice-element.component.css', '../../styles.css']\r\n})\r\nexport class AssistChoiceElementComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n isFreeText = false;\r\n freeTextValue: string;\r\n choiceElementForm: FormGroup;\r\n selectedCondition: SelectedCondition;\r\n selectedIndex: number;\r\n selectedChoiceReportText: string;\r\n selectedChoiceReportLabel: string;\r\n elementDisplay: ChoiceElementDisplayEnum;\r\n simulatorStateSubscription: ISubscription;\r\n\r\n @Input() choiceElementDisplay: ChoiceElementDisplayEnum;\r\n @Input() assetsBaseUrl: string;\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() repeatedElementSections: RepeatedElementSections;\r\n @Input() choiceDataElement: ChoiceDataElement;\r\n @Input() disabled: boolean;\r\n\r\n @Output() returnChoiceElement = new EventEmitter();\r\n @Output() choiceChange = new EventEmitter();\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private cdr: ChangeDetectorRef,\r\n private utilityService: UtilityService,\r\n private simulatorCommunicationService: SimulatorCommunicationService) {\r\n // this.simulatorStateSubscription = simulatorCommunicationService.simulatorSource$.subscribe(\r\n // mission => {\r\n // // if ($('#' + this.choiceDataElement.id) !== undefined && $('#' + this.choiceDataElement.id) !== null) {\r\n // // this.dropdownChoiceSelected($('#' + this.choiceDataElement.id).get(0), this.choiceDataElement.label);\r\n // // }\r\n // });\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.simulatorStateSubscription)) {\r\n this.simulatorStateSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.choiceDataElement.choiceInfo.diagrams !== undefined &&\r\n this.choiceDataElement.choiceInfo.diagrams !== null) {\r\n this.choiceDataElement.choiceInfo.choice.forEach(choice => {\r\n if (choice.diagrams.diagram !== undefined\r\n && choice.diagrams.diagram !== null && choice.diagrams.diagram.length > 0) {\r\n choice.diagrams.diagram.forEach(_diagram => {\r\n this.choiceDataElement.diagrams.push(_diagram);\r\n });\r\n }\r\n });\r\n }\r\n\r\n this.createChoiceElementForm();\r\n if (!this.utilityService.isValidInstance(this.choiceElementDisplay)) {\r\n if (this.choiceDataElement.choiceInfo.length <= 2) {\r\n this.elementDisplay = ChoiceElementDisplayEnum.RadioButton;\r\n } else if (this.choiceDataElement.choiceInfo.length > 2 && this.choiceDataElement.choiceInfo.length <= 5) {\r\n this.elementDisplay = ChoiceElementDisplayEnum.ListBox;\r\n } else if (this.choiceDataElement.choiceInfo.length > 2 && this.choiceDataElement.choiceInfo.length > 5) {\r\n this.elementDisplay = ChoiceElementDisplayEnum.SelectBox;\r\n }\r\n } else {\r\n this.elementDisplay = JSON.parse(JSON.stringify(this.choiceElementDisplay));\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.showOrHideFreeText(this.choiceDataElement.id, '');\r\n if (this.choiceDataElement.currentValue !== undefined) {\r\n $('#' + this.choiceDataElement.currentValue + '_' + this.choiceDataElement.id).prop('checked', true);\r\n this.choiceElementForm.controls.checkBox.setValue(this.choiceDataElement.currentValue);\r\n for (const choice in this.choiceDataElement.choiceInfo) {\r\n if (this.choiceDataElement.choiceInfo[choice].value === this.choiceDataElement.currentValue) {\r\n if (this.choiceDataElement.choiceInfo[choice].reportText !== undefined) {\r\n this.selectedChoiceReportText = this.choiceDataElement.choiceInfo[choice].reportText;\r\n } else {\r\n this.selectedChoiceReportLabel = this.choiceDataElement.choiceInfo[choice].label;\r\n }\r\n }\r\n }\r\n\r\n // tslint:disable-next-line:max-line-length\r\n if (this.choiceDataElement.allowFreetext && this.selectedChoiceReportText === undefined && this.selectedChoiceReportLabel === undefined) {\r\n this.isFreeText = true;\r\n this.freeTextValue = this.choiceDataElement.currentValue;\r\n this.showOrHideFreeText(this.choiceDataElement.id, 'freetext');\r\n }\r\n\r\n let currentLabel = this.selectedChoiceReportText !== undefined ? this.selectedChoiceReportText : this.selectedChoiceReportLabel;\r\n if (currentLabel === undefined && this.isFreeText) {\r\n currentLabel = this.choiceDataElement.currentValue;\r\n }\r\n this.setChoiceValue(this.choiceDataElement.id, this.choiceDataElement.label, currentLabel, this.choiceDataElement.currentValue);\r\n } else {\r\n this.returnChoiceElement.emit(undefined);\r\n }\r\n\r\n this.cdr.detectChanges();\r\n if (this.choiceDataElement.choiceInfo.length > 2 && this.choiceDataElement.choiceInfo.length <= 5) {\r\n $('#' + this.choiceDataElement.id).attr('size', this.choiceDataElement.choiceInfo.length + 1);\r\n }\r\n\r\n // tslint:disable-next-line:max-line-length\r\n if (this.choiceDataElement.choiceInfo.length > 2 && this.choiceDataElement.choiceInfo.length <= 5 && this.choiceDataElement.allowFreetext) {\r\n $('#' + this.choiceDataElement.id).attr('size', this.choiceDataElement.choiceInfo.length + 2);\r\n }\r\n }\r\n\r\n isRadioButton(): boolean {\r\n return this.elementDisplay === ChoiceElementDisplayEnum.RadioButton;\r\n }\r\n\r\n isListBox(): boolean {\r\n\r\n return this.elementDisplay === ChoiceElementDisplayEnum.ListBox;\r\n }\r\n\r\n isSelectBox(): boolean {\r\n return this.elementDisplay === ChoiceElementDisplayEnum.SelectBox;\r\n }\r\n\r\n setChoiceValue(elementId: string, selectedElement: string, selectedText: string, selectedValue: string) {\r\n if (selectedValue !== undefined) {\r\n this.emitChoiceElementData(elementId, selectedElement, selectedText, selectedValue);\r\n }\r\n }\r\n\r\n hasAIInputStyle() {\r\n if (this.utilityService.isNotEmptyArray(this.choiceDataElement.sources)) {\r\n const elem = this.choiceDataElement.sources.find(x => x.id === this.choiceDataElement.id);\r\n if (this.utilityService.isValidInstance(elem)) {\r\n return elem.value === this.choiceElementForm.controls.checkBox.value;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n choiceSelected(elementId: string, selectedElement: string, selectedText: string, selectedValue: string) {\r\n this.showOrHideFreeText(elementId, selectedValue);\r\n if (selectedText !== 'Other, please specifyâ¦' && selectedValue !== 'freetext') {\r\n this.emitChoiceElementData(elementId, selectedElement, selectedText, selectedValue);\r\n } else {\r\n this.emitChoiceElementData(elementId, selectedElement, '', '');\r\n }\r\n }\r\n\r\n dropdownChoiceSelected(element, selectedCondition) {\r\n const elementId = element.id;\r\n const selectedElement = selectedCondition;\r\n let selectedText = element.options[element.selectedIndex].text;\r\n let selectedValue = element.value;\r\n\r\n this.showOrHideFreeText(element.id, selectedValue);\r\n const choiceValue = this.choiceElementForm.controls.checkBox.value;\r\n\r\n if (choiceValue === 'Select one' || choiceValue === undefined || choiceValue === '') {\r\n selectedText = '';\r\n selectedValue = '';\r\n }\r\n\r\n if (selectedText !== 'Other, please specifyâ¦' && selectedValue !== 'freetext') {\r\n this.emitChoiceElementData(elementId, selectedElement, selectedText, selectedValue);\r\n } else {\r\n this.emitChoiceElementData(elementId, selectedElement, '', '');\r\n }\r\n }\r\n\r\n updateFreeText(element, elementId, selectedCondition) {\r\n const selectedValue = (element.value === 'Other') ? 'freetext' : element.value;\r\n const selectedText = element.value;\r\n\r\n this.emitChoiceElementData(elementId, selectedCondition, selectedText, selectedValue);\r\n }\r\n\r\n showOrHideFreeText(elementId: string, selectedValue: string) {\r\n if (selectedValue === 'freetext') {\r\n $('#div_' + elementId + '_other').show();\r\n } else {\r\n $('#div_' + elementId + '_other').hide();\r\n this.freeTextValue = '';\r\n this.isFreeText = false;\r\n }\r\n }\r\n\r\n isChoiceElementRequired(): boolean {\r\n return this.choiceElementForm.controls.checkBox.invalid && this.choiceDataElement.isRequired;\r\n }\r\n\r\n emitChoiceElementData(elementId: string, selectedElement: string, selectedText: string, selectedValue: string) {\r\n const choiceElement = new ChoiceElement();\r\n choiceElement.elementId = elementId;\r\n choiceElement.selectedValue = selectedValue;\r\n choiceElement.selectedText = selectedText;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n this.selectedCondition.selectedConditionId = elementId;\r\n this.selectedCondition.selectedCondition = selectedElement;\r\n this.selectedCondition.selectedValue = selectedText;\r\n\r\n this.returnChoiceElement.emit({ receivedElement: choiceElement, selectedCondition: this.selectedCondition });\r\n }\r\n\r\n private createChoiceElementForm() {\r\n this.choiceElementForm = this.formBuilder.group({\r\n checkBox: ['', Validators.required],\r\n }, {\r\n validator: this.specificValueInsideRange('checkBox')\r\n });\r\n }\r\n\r\n private specificValueInsideRange(checkBox: string) {\r\n return (group: FormGroup) => {\r\n const choiceControl = group.controls.checkBox;\r\n if ((choiceControl.value === undefined || choiceControl.value === '' || choiceControl.value === 'Select one')) {\r\n return choiceControl.setErrors({ notEquivalent: true });\r\n } else {\r\n return choiceControl.setErrors(null);\r\n }\r\n };\r\n }\r\n\r\n onImgModelClick(event) {\r\n console.log(event);\r\n debugger;\r\n if (event.target.tagName !== 'IMG') {\r\n this.onImgPopupClose();\r\n }\r\n }\r\n\r\n onChoiceDiagramClick(choice, event) {\r\n // console.log(event);\r\n var modal = document.getElementById(\"immgModal\");\r\n var modalImg = document.getElementById(\"img01\") as any;\r\n const img_src = event.target.src;\r\n modal.style.display = \"block\";\r\n modalImg.src = img_src;\r\n // captionText.innerHTML = this.alt;\r\n }\r\n\r\n isChoiceHasDiagrams(choiceDataElement: ChoiceDataElement) {\r\n const choiceDataElementWithDigrams = this.choiceDataElement.choiceInfo.filter(x => this.utilityService.isNotEmptyArray(x.diagrams));\r\n return this.utilityService.isNotEmptyArray(choiceDataElementWithDigrams) ? true : false;\r\n }\r\n\r\n getImageDataUrl(label: string): string {\r\n if (this.utilityService.isNotEmptyString(label)) {\r\n if (this.utilityService.isImageDataUrl(label)) {\r\n return label;\r\n } else if (this.utilityService.isValidInstance(this.assetsBaseUrl)) {\r\n return `${this.assetsBaseUrl}/${label}`;\r\n }\r\n }\r\n }\r\n\r\n onImgPopupClose() {\r\n var modal = document.getElementById(\"immgModal\");\r\n modal.style.display = \"none\";\r\n }\r\n\r\n @HostListener('window:keyup.esc') onKeyUp() {\r\n this.onImgPopupClose();\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter, AfterViewInit, OnDestroy, HostListener } from '@angular/core';\r\nimport { MultiChoiceDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { MultiChoiceElement } from '../assist-data-element.component';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { SelectedCondition } from '../../../core/models/executed-result.model';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\n\r\nconst $ = require('jquery');\r\nimport * as _ from 'lodash';\r\nimport { SimulatorCommunicationService } from '../../shared/services/simulator-communication.service';\r\n\r\n@Component({\r\n selector: 'acr-assist-multi-choice-element',\r\n templateUrl: './assist-multi-choice-element.component.html',\r\n styleUrls: ['./assist-multi-choice-element.component.css', '../../styles.css']\r\n})\r\nexport class AssistMultiChoiceElementComponent implements OnInit, AfterViewInit, OnDestroy {\r\n\r\n multiElements: MultiChoiceElement[] = [];\r\n multiChoiceValues: string[] = [];\r\n multiChoiceComaprisonValues: string[] = [];\r\n multiChoiceElementForm: FormGroup;\r\n selectedCondition: SelectedCondition;\r\n isFreeText = false;\r\n freeTextValue: string;\r\n simulatorStateSubscription: ISubscription;\r\n\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() assetsBaseUrl: string;\r\n @Input() multiChoiceElement: MultiChoiceDataElement;\r\n @Output() returnMultiChoice = new EventEmitter();\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private utilityService: UtilityService, simulatorCommunicationService: SimulatorCommunicationService) {\r\n // this.simulatorStateSubscription = simulatorCommunicationService.simulatorSource$.subscribe(\r\n // mission => {\r\n // this.ngAfterViewInit();\r\n // });\r\n }\r\n\r\n ngOnInit() {\r\n this.createMultiChoiceElementForm();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.simulatorStateSubscription)) {\r\n this.simulatorStateSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n this.showOrHideFreeText(this.multiChoiceElement.id, '', false);\r\n if (this.multiChoiceElement.currentValue !== undefined) {\r\n // debugger;\r\n const values: any = [];\r\n const labels: any = [];\r\n for (const choice in this.multiChoiceElement.choiceInfo) {\r\n if (Array.isArray(this.multiChoiceElement.currentValue)) {\r\n for (const currValue of this.multiChoiceElement.currentValue) {\r\n // tslint:disable-next-line:max-line-length\r\n if (currValue === this.multiChoiceElement.choiceInfo[choice].value && this.multiChoiceElement.choiceInfo[choice].value !== undefined) {\r\n $('#' + this.multiChoiceElement.id + '_' + this.multiChoiceElement.choiceInfo[choice].value).prop('checked', true);\r\n values.push(currValue);\r\n labels.push(this.multiChoiceElement.choiceInfo[choice].label);\r\n break;\r\n }\r\n }\r\n } else {\r\n // tslint:disable-next-line:max-line-length\r\n if (this.multiChoiceElement.currentValue === this.multiChoiceElement.choiceInfo[choice].value && this.multiChoiceElement.choiceInfo[choice].value !== undefined) {\r\n $('#' + this.multiChoiceElement.id + '_' + this.multiChoiceElement.currentValue).prop('checked', true);\r\n values.push(this.multiChoiceElement.currentValue);\r\n labels.push(this.multiChoiceElement.choiceInfo[choice].label);\r\n }\r\n }\r\n }\r\n this.selectedMultiChoice(this.multiChoiceElement.id, this.multiChoiceElement.label, values, labels);\r\n } else {\r\n this.returnMultiChoice.emit(undefined);\r\n }\r\n }\r\n\r\n selectedMultiChoice(elementId: string, selectedCondition: string, choiceValue: any, choiceLabel: any) {\r\n const multiElement = new MultiChoiceElement();\r\n if ($('#' + elementId + '_' + choiceValue).is(':checked')) {\r\n this.multiChoiceComaprisonValues = choiceValue;\r\n } else {\r\n const index = this.multiChoiceValues.indexOf(choiceLabel);\r\n const comparisonIndex = this.multiChoiceComaprisonValues.indexOf(choiceValue);\r\n if (index > -1) {\r\n this.multiChoiceValues.splice(index, 1);\r\n }\r\n if (comparisonIndex > -1) {\r\n this.multiChoiceComaprisonValues.splice(comparisonIndex, 1);\r\n }\r\n }\r\n\r\n setTimeout(() => {\r\n const selectedValues = this.getSelectedItems();\r\n const selectedTexts = this.getSelectedItemTexts(selectedValues);\r\n\r\n multiElement.elementId = elementId;\r\n multiElement.selectedValues = selectedValues;\r\n multiElement.selectedTexts = selectedTexts;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n this.selectedCondition.selectedConditionId = elementId;\r\n this.selectedCondition.selectedCondition = selectedCondition;\r\n this.selectedCondition.selectedValue = selectedValues;\r\n this.returnMultiChoice.emit({ receivedElement: multiElement, selectedCondition: this.selectedCondition });\r\n });\r\n }\r\n\r\n choiceSelected(elementId: string, selectedElement: string, selectedText: string, selectedValue: string, event) {\r\n if (event.target.checked) {\r\n this.showOrHideFreeText(elementId, selectedValue, true);\r\n } else {\r\n $('#txt_other_' + this.multiChoiceElement.id).val('');\r\n this.freeTextValue = '';\r\n this.showOrHideFreeText(elementId, selectedValue, false);\r\n }\r\n\r\n this.updateMultiChoice(elementId, selectedElement, this.freeTextValue, event);\r\n }\r\n\r\n updateFreeText(element, elementId, selectedCondition) {\r\n const selectedValues = this.getSelectedItems();\r\n const selectedTexts = this.getSelectedItemTexts(selectedValues);\r\n\r\n const multiElement = new MultiChoiceElement();\r\n multiElement.elementId = elementId;\r\n multiElement.selectedValues = selectedValues;\r\n multiElement.selectedTexts = selectedTexts;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n this.selectedCondition.selectedConditionId = elementId;\r\n this.selectedCondition.selectedCondition = selectedCondition;\r\n this.selectedCondition.selectedValue = selectedValues;\r\n this.returnMultiChoice.emit({ receivedElement: multiElement, selectedCondition: this.selectedCondition });\r\n }\r\n\r\n updateMultiChoice(elementId: string, selectedCondition: string, value: string, event) {\r\n const multiElement = new MultiChoiceElement();\r\n if (event.currentTarget !== undefined && event.currentTarget.checked) {\r\n if (value !== '') {\r\n if (this.multiChoiceValues.indexOf(value) === -1) {\r\n this.multiChoiceValues.push(value);\r\n }\r\n if (this.multiChoiceComaprisonValues.indexOf(value) === -1) {\r\n this.multiChoiceComaprisonValues.push(event.currentTarget.value);\r\n }\r\n }\r\n } else {\r\n const index = this.multiChoiceValues.indexOf(value);\r\n const comparisonIndex = this.multiChoiceComaprisonValues.indexOf(event.currentTarget.value);\r\n if (index > -1) {\r\n this.multiChoiceValues.splice(index, 1);\r\n }\r\n if (comparisonIndex > -1) {\r\n this.multiChoiceComaprisonValues.splice(comparisonIndex, 1);\r\n }\r\n }\r\n\r\n const selectedValues = this.getSelectedItems();\r\n const selectedTexts = this.getSelectedItemTexts(selectedValues);\r\n\r\n multiElement.elementId = elementId;\r\n multiElement.selectedValues = selectedValues;\r\n multiElement.selectedTexts = selectedTexts;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n this.selectedCondition.selectedConditionId = elementId;\r\n this.selectedCondition.selectedCondition = selectedCondition;\r\n this.selectedCondition.selectedValue = selectedValues;\r\n this.returnMultiChoice.emit({ receivedElement: multiElement, selectedCondition: this.selectedCondition });\r\n }\r\n\r\n private getSelectedItems() {\r\n const items = document.getElementsByClassName('multiselectItems_' + this.multiChoiceElement.id) as any;\r\n let selectedItems = [];\r\n // tslint:disable-next-line:prefer-for-of\r\n for (let i = 0; i < items.length; i++) {\r\n if (items[i].checked === true) {\r\n selectedItems.push(items[i].value);\r\n }\r\n }\r\n\r\n let selectedValues = selectedItems;\r\n if ($('#txt_other_' + this.multiChoiceElement.id).val() !== '') {\r\n selectedValues.push($('#txt_other_' + this.multiChoiceElement.id).val());\r\n }\r\n\r\n if (selectedValues !== undefined && this.multiChoiceElement.ChoiceNotRelevant !== undefined) {\r\n const filteredItems = selectedValues.filter((item: any) => !this.multiChoiceElement.ChoiceNotRelevant.includes(item));\r\n selectedValues = filteredItems;\r\n }\r\n\r\n return selectedValues;\r\n }\r\n\r\n private getSelectedItemTexts(selectedValues: any) {\r\n const selectedItems = [];\r\n for (const value of selectedValues) {\r\n const choice = this.multiChoiceElement.choiceInfo.find(x => x.value === value);\r\n if (this.utilityService.isValidInstance(choice)) {\r\n selectedItems.push(choice.label);\r\n } else {\r\n selectedItems.push(value);\r\n }\r\n }\r\n\r\n return selectedItems;\r\n }\r\n\r\n isMultiChoiceElementRequired(): boolean {\r\n return this.multiChoiceElementForm.controls.multiCheckBox.invalid &&\r\n this.multiChoiceElement.isRequired && !this.multiChoiceValues.length;\r\n }\r\n\r\n isMultiChoiceLabelHidden(value: string): boolean {\r\n if (this.multiChoiceElement.currentValue !== undefined && this.multiChoiceElement.ChoiceNotRelevant !== undefined &&\r\n Array.isArray(this.multiChoiceElement.currentValue)) {\r\n const filteredItems = this.multiChoiceElement.currentValue.filter((item: any) => !this.multiChoiceElement.ChoiceNotRelevant.includes(item));\r\n this.multiChoiceElement.currentValue = filteredItems;\r\n }\r\n\r\n // #region uncomment\r\n if (this.utilityService.isNotEmptyArray(this.multiChoiceElement.ChoiceNotRelevant) && this.multiChoiceElement.ChoiceNotRelevant.indexOf(value) > -1) {\r\n $('#' + this.multiChoiceElement.id + '_' + value).prop('checked', false);\r\n }\r\n // #endregion\r\n\r\n return this.multiChoiceElement.ChoiceNotRelevant !== undefined ?\r\n this.multiChoiceElement.ChoiceNotRelevant.indexOf(value) > -1 ? true : null\r\n : null;\r\n }\r\n\r\n showOrHideFreeText(elementId: string, selectedValue: string, isChecked) {\r\n if (selectedValue === 'freetext' && isChecked) {\r\n $('#div_' + elementId + '_other').show();\r\n if (selectedValue === 'freetext') {\r\n this.freeTextValue = $('#txt_other_' + this.multiChoiceElement.id).val();\r\n }\r\n } else if (!isChecked) {\r\n $('#div_' + elementId + '_other').hide();\r\n this.freeTextValue = '';\r\n this.isFreeText = false;\r\n }\r\n }\r\n\r\n private createMultiChoiceElementForm() {\r\n this.multiChoiceElementForm = this.formBuilder.group({\r\n multiCheckBox: ['', Validators.required],\r\n }, {\r\n validator: this.specificValueInsideRange('multiCheckBox')\r\n });\r\n }\r\n\r\n private specificValueInsideRange(multiCheckBox: string) {\r\n return (group: FormGroup) => {\r\n const choiceControl = group.controls.multiCheckBox;\r\n if (this.multiChoiceElement.isRequired) {\r\n return choiceControl.setErrors({ notEquivalent: true });\r\n } else {\r\n return choiceControl.setErrors(null);\r\n }\r\n };\r\n }\r\n\r\n\r\n onImgModelClick(event) {\r\n console.log(event);\r\n debugger;\r\n if (event.target.tagName !== 'IMG') {\r\n this.onImgPopupClose();\r\n }\r\n }\r\n\r\n onChoiceDiagramClick(choice, event) {\r\n debugger;\r\n // console.log(event);\r\n var modal = document.getElementById(\"immgModalmulti\");\r\n var modalImg = document.getElementById(\"img01multi\") as any;\r\n const img_src = event.target.src;\r\n modal.style.display = \"block\";\r\n modalImg.src = img_src;\r\n // captionText.innerHTML = this.alt;\r\n }\r\n\r\n isChoiceHasDiagrams(multiChoiceElement: MultiChoiceElement) {\r\n const multiChoiceElementWithDigrams = this.multiChoiceElement.choiceInfo.filter(x => this.utilityService.isNotEmptyArray(x.diagrams));\r\n return this.utilityService.isNotEmptyArray(multiChoiceElementWithDigrams) ? true : false;\r\n }\r\n\r\n getImageDataUrl(label: string): string {\r\n if (this.utilityService.isNotEmptyString(label)) {\r\n if (this.utilityService.isImageDataUrl(label)) {\r\n return label;\r\n } else if (this.utilityService.isValidInstance(this.assetsBaseUrl)) {\r\n return `${this.assetsBaseUrl}/${label}`;\r\n }\r\n }\r\n }\r\n\r\n onImgPopupClose() {\r\n var modal = document.getElementById(\"immgModalmulti\");\r\n modal.style.display = \"none\";\r\n }\r\n\r\n @HostListener('window:keyup.esc') onKeyUp() {\r\n this.onImgPopupClose();\r\n }\r\n}\r\n","import { Component, OnInit, Input, ViewChild, ViewChildren, QueryList, ElementRef } from '@angular/core';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\nimport { SimulatorEngineService } from '../../../core/services/simulator-engine.service';\r\nimport { ChoiceDataElement, MultiChoiceDataElement } from 'testruleengine/Library/Models/Class';\r\n\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-image-map',\r\n templateUrl: './image-map.component.html',\r\n styleUrls: ['./image-map.component.css']\r\n})\r\nexport class ImageMapComponent implements OnInit {\r\n\r\n selectionValue = '';\r\n map_selector_class = 'cursor-pointer map-selector';\r\n formValues: object = {};\r\n isOverlayLoading = false;\r\n selectedValues = [];\r\n hoverDefaultColour = 'rgba(56, 59, 60, 0.5)';\r\n filledDefaultColour = 'rgba(40, 179, 109, 0.52)';\r\n borderDefaultColour = 'rgba(0, 0, 0, 1)';\r\n\r\n @Input() dataElement: ChoiceDataElement | MultiChoiceDataElement;\r\n @Input() assetsBaseUrl: string;\r\n @ViewChildren('imageMapAreas') imageMapAreas: QueryList<ElementRef>;\r\n @ViewChildren('canvases') canvases: QueryList<ElementRef<HTMLCanvasElement>>;\r\n\r\n constructor(\r\n private simulatorEngineService: SimulatorEngineService,\r\n private utilityService: UtilityService\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n this.selectedValues = [];\r\n this.dataElement.imageMap.location = '../../../../../assets/XMLFIles/hello_assist/COVID19.jpg';\r\n }\r\n\r\n initializeSelectedOverlayData() {\r\n const values = this.simulatorEngineService.getAllDataElementValues().get(this.dataElement.id);\r\n if (Array.isArray(values) && this.utilityService.isNotEmptyArray(values)) {\r\n this.selectedValues = values;\r\n }\r\n this.isOverlayLoading = true;\r\n setTimeout(() => {\r\n let filledColor;\r\n let outlineColor;\r\n\r\n for (let index = 0; index < this.dataElement.imageMap.map.areas.length; index++) {\r\n if (this.utilityService.isValidInstance(this.imageMapAreas)) {\r\n let hasValueSelected = false;\r\n if (this.utilityService.isNotEmptyArray(values)) {\r\n if (Array.isArray(values)) {\r\n hasValueSelected = values.indexOf(this.dataElement.imageMap.map.areas[index].choiceValue) >= 0;\r\n } else {\r\n hasValueSelected = values === this.dataElement.imageMap.map.areas[index].choiceValue;\r\n }\r\n }\r\n const currentArea = this.imageMapAreas.toArray()[index];\r\n const coords = currentArea.nativeElement.attributes.coords.value.split(',');\r\n const shape = currentArea.nativeElement.attributes.shape.value;\r\n const canvas = this.canvases.toArray()[index];\r\n const elementDrawStyle = this.dataElement.imageMap.drawStyle;\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.selectedFill) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.selectedFill.value)) {\r\n filledColor = currentArea.nativeElement.attributes.selectedFill.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.selectedFill)) {\r\n filledColor = elementDrawStyle.selectedFill;\r\n } else {\r\n filledColor = this.filledDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.outline) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.outline.value)) {\r\n outlineColor = currentArea.nativeElement.attributes.outline.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.outline)) {\r\n outlineColor = elementDrawStyle.outline;\r\n } else {\r\n outlineColor = this.borderDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(canvas)) {\r\n if (canvas.nativeElement.className.includes('hover') || canvas.nativeElement.className.includes('selected')) {\r\n canvas.nativeElement.style.position = '';\r\n canvas.nativeElement.style.display = 'none';\r\n canvas.nativeElement.className = this.map_selector_class;\r\n }\r\n if (hasValueSelected) {\r\n canvas.nativeElement.style.position = 'absolute';\r\n canvas.nativeElement.style.display = 'block';\r\n\r\n this.drawStyleBasedOnShape(canvas, filledColor, outlineColor, shape, coords);\r\n canvas.nativeElement.className = this.map_selector_class + ' selected';\r\n }\r\n }\r\n }\r\n }\r\n this.isOverlayLoading = false;\r\n }, 1000);\r\n }\r\n\r\n setSelectedValue(index) {\r\n if (this.utilityService.isValidInstance(this.imageMapAreas)) {\r\n const currentArea = this.imageMapAreas.toArray()[index];\r\n if (this.utilityService.isValidInstance(currentArea)) {\r\n if (this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.choice.value)) {\r\n this.setOverLaysforImageMap(index, currentArea);\r\n this.setSelectedValues(currentArea.nativeElement.attributes.choice.value);\r\n }\r\n }\r\n }\r\n }\r\n\r\n getSelectedValue() {\r\n if (this.utilityService.isNotEmptyArray(this.selectedValues)) {\r\n return 'Selected Values : ' + this.selectedValues.join(' | ');\r\n } else {\r\n return 'Image Map Diagram';\r\n }\r\n }\r\n\r\n getImageDataUrl(label: string): string {\r\n if (this.utilityService.isNotEmptyString(label)) {\r\n if (this.utilityService.isImageDataUrl(label)) {\r\n return label;\r\n } else if (this.utilityService.isValidInstance(this.assetsBaseUrl)) {\r\n return `${this.assetsBaseUrl}/${label}`;\r\n }\r\n }\r\n\r\n // return 'assets/images/COVID19.jpg';\r\n }\r\n\r\n addRemoveHoverClass(index, isAdd) {\r\n let hoverColor;\r\n let filledColor;\r\n let outlineColor;\r\n\r\n if (this.utilityService.isValidInstance(this.imageMapAreas)) {\r\n const currentArea = this.imageMapAreas.toArray()[index];\r\n if (this.utilityService.isValidInstance(currentArea)) {\r\n const coords = currentArea.nativeElement.attributes.coords.value.split(',');\r\n const shape = currentArea.nativeElement.attributes.shape.value;\r\n const canvas = this.canvases.toArray()[index];\r\n const elementDrawStyle = this.dataElement.imageMap.drawStyle;\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.hoverFill) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.hoverFill.value)) {\r\n hoverColor = currentArea.nativeElement.attributes.hoverFill.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.hoverFill)) {\r\n hoverColor = elementDrawStyle.hoverFill;\r\n } else {\r\n hoverColor = this.hoverDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.selectedFill) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.selectedFill.value)) {\r\n filledColor = currentArea.nativeElement.attributes.selectedFill.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.selectedFill)) {\r\n filledColor = elementDrawStyle.selectedFill;\r\n } else {\r\n filledColor = this.filledDefaultColour;\r\n }\r\n\r\n if (hoverColor === filledColor) {\r\n hoverColor = this.hoverDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.outline) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.outline.value)) {\r\n outlineColor = currentArea.nativeElement.attributes.outline.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.outline)) {\r\n outlineColor = elementDrawStyle.outline;\r\n } else {\r\n outlineColor = this.borderDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(canvas)) {\r\n if (isAdd) {\r\n if (!canvas.nativeElement.className.includes('hover') && !canvas.nativeElement.className.includes('selected')) {\r\n canvas.nativeElement.style.position = 'absolute';\r\n canvas.nativeElement.style.display = 'block';\r\n canvas.nativeElement.className += ' hover';\r\n this.drawStyleBasedOnShape(canvas, hoverColor, outlineColor, shape, coords);\r\n }\r\n } else {\r\n if (!canvas.nativeElement.className.includes('selected')) {\r\n canvas.nativeElement.style.position = '';\r\n canvas.nativeElement.style.display = 'none';\r\n }\r\n canvas.nativeElement.className = canvas.nativeElement.className.replace('hover', '').trim();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n private setSelectedValues(selectedValue: string) {\r\n const choice = this.dataElement.choiceInfo.find(x => x.value.toLowerCase() === selectedValue.toLowerCase());\r\n if (this.utilityService.isValidInstance(choice)) {\r\n const customEvent = document.createEvent('Event');\r\n customEvent.initEvent('change', true, true);\r\n\r\n if (this.dataElement.dataElementType === 'MultiChoiceDataElement') {\r\n const values = this.simulatorEngineService.getAllDataElementValues().get(this.dataElement.id);\r\n let checked = true;\r\n if (this.utilityService.isNotEmptyArray(values) && values.indexOf(selectedValue) >= 0) {\r\n checked = false;\r\n }\r\n checked ? this.selectedValues.push(choice.value) : this.selectedValues.splice(this.selectedValues.indexOf(choice.value));\r\n $('#' + this.dataElement.id + '_' + choice.value).prop('checked', checked);\r\n $('#' + this.dataElement.id + '_' + choice.value)[0].dispatchEvent(customEvent);\r\n\r\n } else if (choice.value === selectedValue) {\r\n if (!this.isChoiceHasDiagrams(this.dataElement)) {\r\n if (this.dataElement.choiceInfo.length <= 2 && this.dataElement.choiceInfo.length > 0) {\r\n $('#' + choice.value + '_' + this.dataElement.id).prop('checked', true);\r\n $('#' + choice.value + '_' + this.dataElement.id)[0].dispatchEvent(customEvent);\r\n } else {\r\n $('#' + this.dataElement.id).val(choice.value);\r\n $('#' + this.dataElement.id)[0].dispatchEvent(customEvent);\r\n }\r\n } else {\r\n $('#' + choice.value + '_' + this.dataElement.id).prop('checked', true);\r\n $('#' + choice.value + '_' + this.dataElement.id)[0].dispatchEvent(customEvent);\r\n }\r\n }\r\n }\r\n }\r\n\r\n private isChoiceHasDiagrams(dataElement: any) {\r\n if (this.utilityService.isValidInstance(this.dataElement.choiceInfo)) {\r\n const choiceDataElementWithDigrams = this.dataElement.choiceInfo.filter(x => this.utilityService.isNotEmptyArray(x.diagrams));\r\n return this.utilityService.isNotEmptyArray(choiceDataElementWithDigrams) ? true : false;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private setOverLaysforImageMap(index: number, currentArea: ElementRef) {\r\n let filledColor;\r\n let outlineColor;\r\n\r\n const coords = currentArea.nativeElement.attributes.coords.value.split(',');\r\n const shape = currentArea.nativeElement.attributes.shape.value;\r\n const canvas = this.canvases.toArray()[index];\r\n const elementDrawStyle = this.dataElement.imageMap.drawStyle;\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.selectedFill) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.selectedFill.value)) {\r\n filledColor = currentArea.nativeElement.attributes.selectedFill.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.selectedFill)) {\r\n filledColor = elementDrawStyle.selectedFill;\r\n } else {\r\n filledColor = this.filledDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(currentArea.nativeElement.attributes.outline) &&\r\n this.utilityService.isNotEmptyString(currentArea.nativeElement.attributes.outline.value)) {\r\n outlineColor = currentArea.nativeElement.attributes.outline.value;\r\n } else if (this.utilityService.isValidInstance(elementDrawStyle) &&\r\n this.utilityService.isNotEmptyString(elementDrawStyle.outline)) {\r\n outlineColor = elementDrawStyle.outline;\r\n } else {\r\n outlineColor = this.borderDefaultColour;\r\n }\r\n\r\n if (this.utilityService.isValidInstance(canvas)) {\r\n if (canvas.nativeElement.className.includes('selected')) {\r\n canvas.nativeElement.style.position = '';\r\n canvas.nativeElement.style.display = 'none';\r\n canvas.nativeElement.className = this.map_selector_class;\r\n } else {\r\n canvas.nativeElement.style.position = 'absolute';\r\n canvas.nativeElement.style.display = 'block';\r\n\r\n this.drawStyleBasedOnShape(canvas, filledColor, outlineColor, shape, coords);\r\n canvas.nativeElement.className = this.map_selector_class + ' selected';\r\n }\r\n }\r\n }\r\n\r\n private drawStyleBasedOnShape(canvas: ElementRef, fillStyle: string, outlineStyle: string, shape: string, coords: number[]) {\r\n const ctx = canvas.nativeElement.getContext('2d');\r\n if (shape.toLowerCase() === 'rect') {\r\n canvas.nativeElement.style.left = coords[0] + 'px';\r\n canvas.nativeElement.style.top = coords[1] + 'px';\r\n canvas.nativeElement.width = coords[2] - coords[0];\r\n canvas.nativeElement.height = coords[3] - coords[1];\r\n\r\n ctx.fillStyle = fillStyle;\r\n ctx.strokeStyle = outlineStyle;\r\n ctx.fillRect(0, 0, canvas.nativeElement.width, canvas.nativeElement.height);\r\n ctx.strokeRect(0, 0, canvas.nativeElement.width, canvas.nativeElement.height);\r\n\r\n } else if (shape.toLowerCase() === 'circle') {\r\n canvas.nativeElement.style.left = (coords[0] - coords[2]) + 'px';\r\n canvas.nativeElement.style.top = (coords[1] - coords[2]) + 'px';\r\n canvas.nativeElement.width = 2 * coords[2];\r\n canvas.nativeElement.height = 2 * coords[2];\r\n\r\n ctx.beginPath();\r\n ctx.arc(canvas.nativeElement.width / 2, canvas.nativeElement.height / 2, coords[2], 0, 2 * Math.PI, true);\r\n ctx.closePath();\r\n\r\n ctx.fillStyle = fillStyle;\r\n ctx.strokeStyle = outlineStyle;\r\n ctx.fill();\r\n ctx.stroke();\r\n\r\n } else if (shape.toLowerCase() === 'poly') {\r\n const size = coords.length;\r\n ctx.beginPath();\r\n ctx.moveTo(coords[0], coords[1]);\r\n for (let i = 2; i < size; i += 2) {\r\n ctx.lineTo(coords[i], coords[i + 1]);\r\n }\r\n ctx.lineTo(coords[0], coords[1]);\r\n ctx.closePath();\r\n\r\n ctx.fillStyle = fillStyle;\r\n ctx.strokeStyle = outlineStyle;\r\n ctx.fill();\r\n ctx.stroke();\r\n }\r\n }\r\n}\r\n","import { Component, Input, OnChanges } from '@angular/core';\r\nimport { AllReportText, MainReportText } from 'testruleengine/Library/Models/Class';\r\nimport { AllTextReport, AllReportTextGroup } from '../../core/models/report-text.model';\r\nimport { TabularReport } from '../../core/models/tabular-report.model';\r\nimport { UtilityService } from '../../core/services/utility.service';\r\nimport * as _ from 'lodash';\r\nimport { ToastrService } from 'ngx-toastr';\r\n\r\n@Component({\r\n selector: 'acr-assist-report-text',\r\n templateUrl: './assist-report-text.component.html',\r\n styleUrls: ['./assist-report-text.component.css', '../styles.css']\r\n})\r\nexport class AssistReportTextComponent implements OnChanges {\r\n\r\n prevSectionId: string;\r\n selectedSectionId: string;\r\n selectedSection: string;\r\n allReportTextGroup: AllReportTextGroup[] = [];\r\n allReportTexts: AllReportText[] = [];\r\n mainReportTexts: MainReportText;\r\n allTextReport: AllTextReport[];\r\n tabularReport: TabularReport;\r\n sections: string[] = [];\r\n\r\n @Input() reportText: MainReportText;\r\n\r\n constructor(\r\n private toastr: ToastrService,\r\n private utilityService: UtilityService\r\n ) {\r\n }\r\n\r\n ngOnChanges(): void {\r\n this.mainReportTexts = new MainReportText();\r\n this.onSelect(this.selectedSectionId);\r\n }\r\n\r\n onSelect(sectionId) {\r\n this.selectedSectionId = sectionId;\r\n this.sections = [];\r\n this.selectedSection = null;\r\n this.tabularReport = this.reportText.tabularReport;\r\n for (const section in this.reportText.allReportText) {\r\n if (this.reportText.allReportText[section].allReportResult.reportText !== '') {\r\n this.sections.push(section);\r\n }\r\n }\r\n if (sectionId === 'undefined' || sectionId === undefined || sectionId === 'All') {\r\n let allText: string;\r\n this.allTextReport = [];\r\n allText = '';\r\n for (const section in this.reportText.allReportText) {\r\n if (this.reportText.allReportText[section].allReportResult.reportText !== '') {\r\n const textReport: AllTextReport = new AllTextReport();\r\n textReport.allTextResultReport.heading =\r\n this.reportText.allReportText[section].allReportResult.subSectionName !== undefined\r\n && this.reportText.allReportText[section].allReportResult.subSectionName !== '' ?\r\n this.reportText.allReportText[section].allReportResult.subSectionName\r\n : this.reportText.allReportText[section].allReportResult.sectionId;\r\n // tslint:disable-next-line:max-line-length\r\n textReport.allTextResultReport.content = this.addEmptyBreakLines(this.reportText.allReportText[section].allReportResult.reportText);\r\n textReport.repeatedSectionName = this.reportText.allReportText[section].repeatedSectionName;\r\n this.allTextReport.push(Object.assign({}, textReport));\r\n }\r\n }\r\n\r\n const results = _.chain(this.allTextReport).groupBy('repeatedSectionName').map(function (v, i) {\r\n return {\r\n repeatedSectionName: i,\r\n allTextResultReport: _.map(v, 'allTextResultReport')\r\n };\r\n }).value();\r\n\r\n const sortedResult = _.orderBy(results, [result => result.repeatedSectionName], ['asc']);\r\n this.allReportTextGroup = sortedResult;\r\n this.selectedSectionId = 'All';\r\n }\r\n\r\n for (const section in this.reportText.allReportText) {\r\n if (this.reportText.allReportText[section].allReportResult.sectionId === sectionId) {\r\n this.selectedSection = this.reportText.allReportText[section].allReportResult.reportText;\r\n // tslint:disable-next-line:max-line-length\r\n this.selectedSection = this.reportText.reportTextMainContent + ((this.selectedSection !== undefined && this.selectedSection !== '') ? this.addEmptyBreakLines(this.selectedSection) : '');\r\n break;\r\n }\r\n }\r\n\r\n this.mainReportTexts = new MainReportText();\r\n this.allReportTexts = [];\r\n // tslint:disable-next-line:forin\r\n for (const section in this.reportText.allReportText) {\r\n const allreportText = new AllReportText();\r\n allreportText.allReportResult.reportText = this.addEmptyBreakLines(this.reportText.allReportText[section].allReportResult.reportText);\r\n allreportText.allReportResult.sectionId = this.reportText.allReportText[section].allReportResult.sectionId;\r\n allreportText.repeatedSectionName = this.reportText.allReportText[section].repeatedSectionName;\r\n this.allReportTexts.push(Object.assign({}, allreportText));\r\n }\r\n this.mainReportTexts.allReportText = this.allReportTexts;\r\n this.mainReportTexts.reportTextMainContent = this.reportText.reportTextMainContent;\r\n }\r\n\r\n getReportIdentifier(identifer: string) {\r\n return this.utilityService.isNotEmptyString(identifer) ? `( ${identifer} )` : '';\r\n }\r\n\r\n addEmptyBreakLines(inputText: string): string {\r\n const hasEmptyLineBreak = inputText.trimRight().endsWith('<br>');\r\n if (!hasEmptyLineBreak) {\r\n return inputText + '<br>';\r\n }\r\n\r\n return inputText;\r\n }\r\n\r\n clipboardError(error: Error): void {\r\n this.toastr.error('Failed to copy to clipboard');\r\n }\r\n\r\n clipboardSuccess(value: string): void {\r\n this.toastr.success('Successfully copied to clipboard');\r\n }\r\n\r\n getReportTextInnerContent(reportTextContentForEmptySectionName) {\r\n if (this.utilityService.isValidInstance(reportTextContentForEmptySectionName)) {\r\n // document.execCommand('copy');\r\n // debugger;\r\n var msgb = reportTextContentForEmptySectionName.innerText.trim();\r\n let selBox = document.createElement('textarea');\r\n selBox.style.position = 'fixed';\r\n selBox.style.left = '0';\r\n selBox.style.top = '0';\r\n selBox.style.opacity = '0';\r\n selBox.value = msgb;\r\n document.body.appendChild(selBox);\r\n selBox.focus();\r\n selBox.select();\r\n document.execCommand('copy');\r\n document.body.removeChild(selBox);\r\n this.toastr.success('Successfully copied to clipboard');\r\n } else {\r\n this.toastr.error('Failed to copy to clipboard');\r\n }\r\n\r\n // return '';\r\n }\r\n}\r\n","import { Directive, Input, ElementRef, AfterViewChecked } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[acrDynamicHeightDirective]'\r\n})\r\nexport class DynamicHeightDirective implements AfterViewChecked {\r\n\r\n @Input() simulatorElement: any;\r\n @Input() carouselElement: any;\r\n\r\n constructor(private dynamicElement: ElementRef) { }\r\n\r\n ngAfterViewChecked() {\r\n if (this.dynamicElement !== undefined) {\r\n if (this.simulatorElement !== undefined) {\r\n this.setDynamicHeightForSimualtorDiv(this.simulatorElement);\r\n } else if (this.carouselElement !== undefined) {\r\n this.setDynamicHeightForCarouselDiv(this.carouselElement);\r\n }\r\n }\r\n }\r\n\r\n private setDynamicHeightForSimualtorDiv(simulatorElement: any) {\r\n const simulatorResultsBlockHeight = simulatorElement.offsetHeight;\r\n this.dynamicElement.nativeElement.style.height = (window.innerHeight - 100) - simulatorResultsBlockHeight + 'px';\r\n }\r\n\r\n private setDynamicHeightForCarouselDiv(carouselElement: any) {\r\n const simulatorResultsBlockHeight = carouselElement.offsetHeight;\r\n this.dynamicElement.nativeElement.style.height = (window.innerHeight - 200) - simulatorResultsBlockHeight + 'px';\r\n }\r\n}\r\n","import { Directive, ElementRef, HostListener } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[acrNumericOnly]'\r\n})\r\nexport class NumericOnlyDirective {\r\n\r\n private regex: RegExp = new RegExp(/^[0-9]+(\\.[0-9]*){0,1}$/g);\r\n\r\n // Allow key codes for special events. Reflect :\r\n // Backspace, tab, end, home\r\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight'];\r\n\r\n constructor(private el: ElementRef) {\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(event: KeyboardEvent) {\r\n // // Allow Backspace, tab, end, and home keys\r\n // if (this.specialKeys.indexOf(event.key) !== -1) {\r\n // return;\r\n // }\r\n // let current: string = this.el.nativeElement.value;\r\n // let next: string = current.concat(event.key);\r\n // let value: number = +next;\r\n // if (next && (next === '.' || value > 100.00 || !String(next).match(this.regex))) {\r\n // event.preventDefault();\r\n // }\r\n\r\n if (this.specialKeys.indexOf(event.key) !== -1 ||\r\n // to allow backspace, enter, escape, arrows\r\n (event.which === 65 && event.ctrlKey === true) ||\r\n // Allow: Ctrl+C\r\n (event.which === 67 && event.ctrlKey === true) ||\r\n // Allow: Ctrl+X\r\n (event.which === 88 && event.ctrlKey === true)\r\n ) {\r\n return;\r\n }\r\n // Do not use event.keycode this is deprecated.\r\n // See: https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode\r\n const current: string = this.el.nativeElement.value;\r\n const next: string = current.concat(event.key);\r\n if (next && !String(next).match(this.regex)) {\r\n event.preventDefault();\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, OnDestroy } from '@angular/core';\r\nimport { DurationDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\nimport { SimulatorCommunicationService } from '../../shared/services/simulator-communication.service';\r\nimport { UtilityService } from '../../../core/services/utility.service';\r\n\r\n@Component({\r\n selector: 'acr-assist-duration-element',\r\n templateUrl: './assist-duration-element.component.html',\r\n styleUrls: ['./assist-duration-element.component.css']\r\n})\r\nexport class AssistDurationElementComponent implements OnInit, OnDestroy {\r\n\r\n supportedUnits: any = {\r\n millisecond: {\r\n label: 'Millisecond',\r\n max: 999,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n },\r\n second: {\r\n label: 'S',\r\n max: 59,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n },\r\n minute: {\r\n label: 'M',\r\n max: 59,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n },\r\n hour: {\r\n label: 'H',\r\n max: 23,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n },\r\n day: {\r\n label: 'D',\r\n max: 7,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n },\r\n week: {\r\n label: 'Week',\r\n max: 51,\r\n min: 0,\r\n value: 0,\r\n step: 1\r\n }\r\n };\r\n\r\n\r\n durationVal = 'PT0S';\r\n durationOptions = {\r\n showNegative: false,\r\n showPreview: false,\r\n showYears: false,\r\n showMonths: false,\r\n showWeeks: false,\r\n min: 0\r\n };\r\n\r\n showdayminValidation = false;\r\n showdaymaxValidation = false;\r\n showminutemaxValidation = false;\r\n showminuteminValidation = false;\r\n showhourminValidation = false;\r\n showhourmaxValidation = false;\r\n showsecondsminValidation = false;\r\n showsecondsmaxValidation = false;\r\n\r\n durationElementForm: FormGroup;\r\n simulatorSourceSubscription: ISubscription;\r\n\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() assetsBaseUrl: string;\r\n @Input() durationDataElement: DurationDataElement;\r\n\r\n constructor(\r\n private formBuilder: FormBuilder,\r\n private utilityService: UtilityService,\r\n simulatorCommunicationService: SimulatorCommunicationService) {\r\n this.simulatorSourceSubscription = simulatorCommunicationService.simulatorSource$.subscribe(\r\n mission => {\r\n this.SetRangeValuesForDurationPicker();\r\n this.updateFormValidator();\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.SetRangeValuesForDurationPicker();\r\n this.createDurationElementForm();\r\n this.onChanges();\r\n }\r\n\r\n ResetValidationVisibility(): void {\r\n this.showdayminValidation = false;\r\n this.showdaymaxValidation = false;\r\n this.showminutemaxValidation = false;\r\n this.showminuteminValidation = false;\r\n this.showhourminValidation = false;\r\n this.showhourmaxValidation = false;\r\n this.showsecondsminValidation = false;\r\n this.showsecondsmaxValidation = false;\r\n }\r\n\r\n onChanges(): void {\r\n this.durationElementForm.statusChanges\r\n .subscribe(val => {\r\n this.ResetValidationVisibility();\r\n if (this.durationElementForm.controls.durationdayselement !== undefined &&\r\n this.durationElementForm.controls.durationdayselement.invalid\r\n && this.durationElementForm.controls.durationdayselement.errors.max) {\r\n this.showdaymaxValidation = true;\r\n } else if (this.durationElementForm.controls.durationdayselement !== undefined &&\r\n this.durationElementForm.controls.durationdayselement.invalid\r\n && this.durationElementForm.controls.durationdayselement.errors.min) {\r\n this.showdayminValidation = true;\r\n } else if (this.durationElementForm.controls.durationdayselement !== undefined &&\r\n this.durationElementForm.controls.durationminuteselement.invalid\r\n && this.durationElementForm.controls.durationminuteselement.errors.min) {\r\n this.showminuteminValidation = true;\r\n } else if (this.durationElementForm.controls.durationminuteselement !== undefined &&\r\n this.durationElementForm.controls.durationminuteselement.invalid\r\n && this.durationElementForm.controls.durationminuteselement.errors.max) {\r\n this.showminutemaxValidation = true;\r\n } else if (this.durationElementForm.controls.durationhourselement !== undefined &&\r\n this.durationElementForm.controls.durationhourselement.invalid\r\n && this.durationElementForm.controls.durationhourselement.errors.min) {\r\n this.showhourminValidation = true;\r\n } else if (this.durationElementForm.controls.durationhourselement !== undefined &&\r\n this.durationElementForm.controls.durationhourselement.invalid\r\n && this.durationElementForm.controls.durationhourselement.errors.max) {\r\n this.showhourmaxValidation = true;\r\n\r\n } else if (this.durationElementForm.controls.durationsecondselement !== undefined &&\r\n this.durationElementForm.controls.durationsecondselement.invalid\r\n && this.durationElementForm.controls.durationsecondselement.errors.min) {\r\n this.showsecondsminValidation = true;\r\n } else if (this.durationElementForm.controls.durationsecondselement !== undefined &&\r\n this.durationElementForm.controls.durationsecondselement.invalid\r\n && this.durationElementForm.controls.durationsecondselement.errors.max) {\r\n this.showsecondsmaxValidation = true;\r\n }\r\n });\r\n }\r\n\r\n onlyInteger(event) {\r\n return (event.charCode === 8 || event.charCode === 0) ? null : event.charCode >= 48 && event.charCode <= 57;\r\n }\r\n\r\n updateFormValidator() {\r\n this.durationElementForm.controls.durationdayselement.setValidators([Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])]);\r\n this.durationElementForm.controls.durationdayselement.updateValueAndValidity();\r\n\r\n this.durationElementForm.controls.durationminuteselement.setValidators([Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])]);\r\n this.durationElementForm.controls.durationminuteselement.updateValueAndValidity();\r\n\r\n this.durationElementForm.controls.durationhourselement.setValidators([Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])]);\r\n this.durationElementForm.controls.durationhourselement.updateValueAndValidity();\r\n\r\n this.durationElementForm.controls.durationsecondselement.setValidators([Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]);\r\n this.durationElementForm.controls.durationsecondselement.updateValueAndValidity();\r\n }\r\n\r\n increaseValue(property): void {\r\n let currentValue = 0;\r\n const daysValue = this.durationElementForm.controls.durationdayselement.value;\r\n const hoursValue = this.durationElementForm.controls.durationhourselement.value;\r\n const minsValue = this.durationElementForm.controls.durationminuteselement.value;\r\n const secondsValue = this.durationElementForm.controls.durationsecondselement.value;\r\n\r\n switch (property) {\r\n case 'days':\r\n currentValue = daysValue === undefined || daysValue == null ? 0 : daysValue;\r\n if (currentValue < this.supportedUnits.day.max) {\r\n currentValue = currentValue + this.supportedUnits.day.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationdayselement.setValue(currentValue);\r\n break;\r\n\r\n case 'hour':\r\n currentValue = hoursValue === undefined || hoursValue == null ? 0 : hoursValue;\r\n if (currentValue < this.supportedUnits.hour.max) {\r\n currentValue = currentValue + this.supportedUnits.hour.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationhourselement.setValue(currentValue);\r\n break;\r\n\r\n case 'minute':\r\n currentValue = minsValue === undefined || minsValue == null ? 0 : minsValue;\r\n if (currentValue < this.supportedUnits.minute.max) {\r\n currentValue = currentValue + this.supportedUnits.minute.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationminuteselement.setValue(currentValue);\r\n break;\r\n\r\n case 'second':\r\n currentValue = secondsValue === undefined || secondsValue == null ? 0 : secondsValue;\r\n if (currentValue < this.supportedUnits.second.max) {\r\n currentValue = currentValue + this.supportedUnits.second.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationsecondselement.setValue(currentValue);\r\n break;\r\n }\r\n }\r\n\r\n decreaseValue(property): void {\r\n let currentValue = 0;\r\n const daysValue = this.durationElementForm.controls.durationdayselement.value;\r\n const hoursValue = this.durationElementForm.controls.durationhourselement.value;\r\n const minsValue = this.durationElementForm.controls.durationminuteselement.value;\r\n const secondsValue = this.durationElementForm.controls.durationsecondselement.value;\r\n\r\n switch (property) {\r\n case 'days':\r\n currentValue = daysValue;\r\n if (currentValue > this.supportedUnits.day.min) {\r\n currentValue = currentValue - this.supportedUnits.day.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationdayselement.setValue(currentValue);\r\n break;\r\n\r\n case 'hour':\r\n currentValue = hoursValue;\r\n if (currentValue > this.supportedUnits.hour.min) {\r\n currentValue = currentValue - this.supportedUnits.hour.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationhourselement.setValue(currentValue);\r\n break;\r\n\r\n case 'minute':\r\n currentValue = minsValue;\r\n if (currentValue > this.supportedUnits.minute.min) {\r\n currentValue = currentValue - this.supportedUnits.minute.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationminuteselement.setValue(currentValue);\r\n break;\r\n\r\n case 'second':\r\n currentValue = secondsValue;\r\n if (currentValue > this.supportedUnits.second.min) {\r\n currentValue = currentValue - this.supportedUnits.second.step;\r\n }\r\n\r\n this.durationElementForm.controls.durationsecondselement.setValue(currentValue);\r\n break;\r\n }\r\n }\r\n\r\n checkValue(event: any, property) {\r\n let currentValue = 0;\r\n const daysValue = this.durationElementForm.controls.durationdayselement.value;\r\n const hoursValue = this.durationElementForm.controls.durationhourselement.value;\r\n const minsValue = this.durationElementForm.controls.durationminuteselement.value;\r\n const secondsValue = this.durationElementForm.controls.durationsecondselement.value;\r\n\r\n switch (property) {\r\n case 'days':\r\n currentValue = daysValue;\r\n if (currentValue === undefined || currentValue == null) {\r\n currentValue = 0;\r\n }\r\n\r\n this.durationElementForm.controls.durationdayselement.setValue(currentValue);\r\n break;\r\n\r\n case 'hour':\r\n currentValue = hoursValue;\r\n if (currentValue === undefined || currentValue == null) {\r\n currentValue = 0;\r\n }\r\n\r\n this.durationElementForm.controls.durationhourselement.setValue(currentValue);\r\n break;\r\n\r\n case 'minute':\r\n currentValue = minsValue;\r\n if (currentValue === undefined || currentValue == null) {\r\n currentValue = 0;\r\n }\r\n\r\n this.durationElementForm.controls.durationminuteselement.setValue(currentValue);\r\n break;\r\n\r\n case 'second':\r\n currentValue = secondsValue;\r\n if (currentValue === undefined || currentValue == null) {\r\n currentValue = 0;\r\n }\r\n\r\n this.durationElementForm.controls.durationsecondselement.setValue(currentValue);\r\n break;\r\n }\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.simulatorSourceSubscription)) {\r\n this.simulatorSourceSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n isDurationElementRequired(): boolean {\r\n return (this.durationDataElement.isRequired &&\r\n (!this.showdayminValidation && !this.showdaymaxValidation && !this.showminuteminValidation &&\r\n !this.showminutemaxValidation && !this.showhourminValidation && !this.showhourmaxValidation &&\r\n !this.showsecondsmaxValidation && !this.showsecondsminValidation)) &&\r\n (this.durationElementForm.controls.durationdayselement !== undefined &&\r\n this.durationElementForm.controls.durationdayselement.invalid &&\r\n this.durationElementForm.controls.durationdayselement.errors != null &&\r\n this.durationElementForm.controls.durationdayselement.errors.required) ||\r\n (this.durationElementForm.controls.durationhourselement !== undefined &&\r\n this.durationElementForm.controls.durationhourselement.invalid &&\r\n this.durationElementForm.controls.durationhourselement.errors != null &&\r\n this.durationElementForm.controls.durationhourselement.errors.required) ||\r\n (this.durationElementForm.controls.durationminuteselement !== undefined &&\r\n this.durationElementForm.controls.durationminuteselement.invalid &&\r\n this.durationElementForm.controls.durationminuteselement.errors != null &&\r\n this.durationElementForm.controls.durationminuteselement.errors.required) ||\r\n (this.durationElementForm.controls.durationsecondselement !== undefined &&\r\n this.durationElementForm.controls.durationsecondselement.invalid &&\r\n this.durationElementForm.controls.durationsecondselement.errors != null &&\r\n this.durationElementForm.controls.durationsecondselement.errors.required);\r\n }\r\n\r\n private SetRangeValuesForDurationPicker() {\r\n const $element = this.durationDataElement;\r\n this.supportedUnits.day.min = $element.MinimumDay !== undefined && $element.MinimumDay != null ?\r\n $element.MinimumDay : 0;\r\n this.supportedUnits.hour.min = $element.MinimumHours !== undefined && $element.MinimumHours != null ?\r\n $element.MinimumHours : 0;\r\n this.supportedUnits.minute.min = $element.MinimumMinutes !== undefined && $element.MinimumMinutes != null ?\r\n $element.MinimumMinutes : 0;\r\n this.supportedUnits.second.min = $element.MinimumSeconds !== undefined && $element.MinimumSeconds != null ?\r\n $element.MinimumSeconds : 0;\r\n this.supportedUnits.day.max = $element.MaximumDay !== undefined && $element.MaximumDay != null ?\r\n $element.MaximumDay : 9007199254740991;\r\n this.supportedUnits.hour.max = $element.MaximumHours !== undefined && $element.MaximumHours != null ?\r\n $element.MaximumHours : 9007199254740991;\r\n this.supportedUnits.minute.max = $element.MaxmimumMinutes !== undefined && $element.MaxmimumMinutes != null ?\r\n $element.MaxmimumMinutes : 9007199254740991;\r\n this.supportedUnits.second.max = $element.MaxmimumSeconds !== undefined && $element.MaxmimumSeconds != null ?\r\n $element.MaxmimumSeconds : 9007199254740991;\r\n }\r\n\r\n private createDurationElementForm() {\r\n if (this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])]\r\n });\r\n } else if (this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n } else if (!this.durationDataElement.ShowDays && !this.durationDataElement.ShowHours\r\n && !this.durationDataElement.ShowMinutes\r\n && !this.durationDataElement.ShowSeconds) {\r\n this.durationElementForm = this.formBuilder.group({\r\n durationdayselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.day.min), Validators.max(+this.supportedUnits.day.max)])],\r\n durationminuteselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.minute.min), Validators.max(+this.supportedUnits.minute.max)])],\r\n durationhourselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.hour.min), Validators.max(+this.supportedUnits.hour.max)])],\r\n durationsecondselement: [0, Validators.compose([Validators.required,\r\n Validators.min(+this.supportedUnits.second.min), Validators.max(+this.supportedUnits.second.max)])]\r\n });\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { SelectedCondition } from '../../../core/models/executed-result.model';\r\nimport { DateTimeDataElement } from 'testruleengine/Library/Models/Class';\r\nimport { SimulatorEngineService } from '../../../core/services/simulator-engine.service';\r\nimport { DateTimeElement } from '../assist-data-element.component';\r\n\r\n@Component({\r\n selector: 'acr-assist-date-time-element',\r\n templateUrl: './assist-date-time-element.component.html',\r\n styleUrls: ['./assist-date-time-element.component.css']\r\n})\r\nexport class AssistDateTimeElementComponent implements OnInit, AfterViewInit {\r\n\r\n selectedCondition: SelectedCondition;\r\n dateTimeElementForm: FormGroup;\r\n settings = {\r\n bigBanner: true,\r\n format: 'dd-MMM-yyyy hh:mm a',\r\n defaultOpen: false,\r\n timePicker: true,\r\n closeOnSelect: true\r\n };\r\n\r\n @Input() alignLabelAndControlToTopAndBottom: boolean;\r\n @Input() assetsBaseUrl: string;\r\n @Input() dateTimeDataElement: DateTimeDataElement;\r\n @Output() returnDateTimeElement = new EventEmitter();\r\n\r\n constructor(private formBuilder: FormBuilder, private simulatorEngineService: SimulatorEngineService) { }\r\n\r\n ngOnInit() {\r\n this.createDateTimeElementForm();\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n if (this.dateTimeDataElement.currentValue !== undefined) {\r\n this.dateTimeElementForm.controls.dateTimeElement.setValue(new Date(this.dateTimeDataElement.currentValue));\r\n this.onDateTimeSelected();\r\n } else {\r\n this.returnDateTimeElement.emit(undefined);\r\n }\r\n }\r\n\r\n onDateTimeSelected() {\r\n const date = this.dateTimeElementForm.controls.dateTimeElement.value;\r\n if (date != null) {\r\n const localDateTime = new Date(date.toString()).toLocaleString();\r\n const dateTimeElement = new DateTimeElement();\r\n dateTimeElement.elementId = this.dateTimeDataElement.id;\r\n dateTimeElement.selectedValue = localDateTime;\r\n\r\n this.selectedCondition = new SelectedCondition();\r\n\r\n this.selectedCondition.selectedConditionId = this.dateTimeDataElement.id;\r\n this.selectedCondition.selectedCondition = this.dateTimeDataElement.label;\r\n this.selectedCondition.selectedValue = localDateTime;\r\n this.returnDateTimeElement.emit({ receivedElement: dateTimeElement, selectedCondition: this.selectedCondition });\r\n }\r\n }\r\n\r\n isDateTimeElementRequired(): boolean {\r\n return this.dateTimeElementForm.controls.dateTimeElement.invalid &&\r\n this.dateTimeElementForm.controls.dateTimeElement.errors.required &&\r\n this.dateTimeDataElement.isRequired;\r\n }\r\n\r\n private createDateTimeElementForm() {\r\n this.dateTimeElementForm = this.formBuilder.group({\r\n dateTimeElement: ['', Validators.compose([Validators.required, Validators.min(+0), Validators.max(+1)])],\r\n });\r\n }\r\n}\r\n\r\n","import { Directive, ElementRef, HostListener } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[acrIntegerMaxRestrict]'\r\n})\r\nexport class IntegerMaxRestrictDirective {\r\n\r\n// private regex: RegExp = new RegExp(/^(?:[0-9]{0,3}(?:\\.[0-9]{0,2})?)?$/);\r\n\r\n // Allow key codes for special events. Reflect :\r\n // Backspace, tab, end, home\r\n private specialKeys: Array<string> = ['Backspace', 'Tab', 'End', 'Home', 'ArrowLeft', 'ArrowRight'];\r\n\r\n constructor(private el: ElementRef) {\r\n }\r\n\r\n @HostListener('keydown', ['$event'])\r\n onKeyDown(event: KeyboardEvent) {\r\n // Allow Backspace, tab, end, and home keys\r\n if (this.specialKeys.indexOf(event.key) !== -1) {\r\n return;\r\n }\r\n const current: string = this.el.nativeElement.value;\r\n const next: string = current.concat(event.key);\r\n const value: number = +next;\r\n // if (next && (next === '.' || value > 100.00 || !String(next).match(this.regex))) {\r\n // event.preventDefault();\r\n // }\r\n }\r\n}\r\n","import { Inject } from '@angular/core';\r\nimport { Injectable } from '@angular/core';\r\nimport { DOCUMENT } from '@angular/common';\r\n\r\n@Injectable()\r\nexport class ClipboardService {\r\n\r\n private dom: Document;\r\n\r\n constructor(@Inject(DOCUMENT) dom: any) {\r\n this.dom = dom;\r\n }\r\n\r\n public copy(value: string): Promise<string> {\r\n return new Promise(\r\n (resolve, reject): void => {\r\n let textarea = null;\r\n\r\n try {\r\n textarea = this.dom.createElement('textarea');\r\n textarea.style.height = '0px';\r\n textarea.style.left = '-100px';\r\n textarea.style.opacity = '0';\r\n textarea.style.position = 'fixed';\r\n textarea.style.top = '-100px';\r\n textarea.style.width = '0px';\r\n this.dom.body.appendChild(textarea);\r\n textarea.value = value;\r\n textarea.select();\r\n this.dom.execCommand('copy');\r\n resolve(value);\r\n } finally {\r\n if (textarea && textarea.parentNode) {\r\n textarea.parentNode.removeChild(textarea);\r\n }\r\n }\r\n }\r\n );\r\n }\r\n}\r\n","import { Directive, Output, Input, HostListener } from '@angular/core';\r\nimport { EventEmitter } from '@angular/core';\r\nimport { ClipboardService } from '../services/clipboard.service';\r\n\r\n@Directive({\r\n selector: '[acrClipboard]'\r\n})\r\nexport class ClipboardDirective {\r\n\r\n @Input() clipboard: any;\r\n @Output() clipboardCopy: EventEmitter<string> = new EventEmitter<string>();\r\n @Output() clipboardError: EventEmitter<Error> = new EventEmitter<Error>();\r\n\r\n constructor(\r\n private clipboardService: ClipboardService) {\r\n }\r\n\r\n @HostListener('click', ['$event.target'])\r\n copyToClipboard(event: any) {\r\n this.clipboardService\r\n .copy(this.clipboard)\r\n .then(\r\n (value: string): void => {\r\n this.clipboardCopy.emit(value);\r\n }\r\n )\r\n .catch(\r\n (error: Error): void => {\r\n this.clipboardError.emit(error);\r\n }\r\n );\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpClient } from '@angular/common/http';\r\nimport { Observable, Subscriber } from 'rxjs';\r\n\r\n@Injectable()\r\nexport class UrlHelperService {\r\n constructor(\r\n private http: HttpClient,\r\n ) {\r\n }\r\n\r\n getImageData(url: string): Observable<any> {\r\n return new Observable((observer: Subscriber<any>) => {\r\n let objectUrl: string = null;\r\n\r\n this.http.get(url, { responseType: 'blob' }).subscribe(\r\n m => {\r\n objectUrl = URL.createObjectURL(m);\r\n observer.next(objectUrl);\r\n });\r\n\r\n return () => {\r\n if (objectUrl) {\r\n URL.revokeObjectURL(objectUrl);\r\n objectUrl = null;\r\n }\r\n };\r\n });\r\n }\r\n}\r\n","import { Pipe, PipeTransform, OnDestroy, WrappedValue, ChangeDetectorRef } from '@angular/core';\r\nimport { SubscriptionLike as ISubscription, Observable, BehaviorSubject } from 'rxjs';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { UrlHelperService } from '../services/url-helper.service';\r\n\r\n@Pipe({\r\n name: 'secure',\r\n pure: false\r\n})\r\nexport class SecurePipe implements PipeTransform, OnDestroy {\r\n private _latestValue: any = null;\r\n private _latestReturnedValue: any = null;\r\n private _subscription: ISubscription = null;\r\n private _obj: Observable<any> = null;\r\n\r\n private previousUrl: string;\r\n private _result: BehaviorSubject<any> = new BehaviorSubject<any>(null);\r\n private result: Observable<any> = this._result.asObservable();\r\n private _internalSubscription: ISubscription = null;\r\n\r\n constructor(\r\n private _ref: ChangeDetectorRef,\r\n private urlHelperService: UrlHelperService,\r\n private sanitizer: DomSanitizer\r\n ) { }\r\n\r\n ngOnDestroy(): void {\r\n if (this._subscription) {\r\n this._dispose();\r\n }\r\n }\r\n\r\n transform(url: string): any {\r\n const obj = this.internalTransform(url);\r\n return this.asyncTrasnform(obj);\r\n }\r\n\r\n private internalTransform(url: string): Observable<any> {\r\n if (!url) {\r\n return this.result;\r\n }\r\n\r\n if (this.previousUrl !== url) {\r\n this.previousUrl = url;\r\n this._internalSubscription = this.urlHelperService.getImageData(url).subscribe(m => {\r\n const sanitized = this.sanitizer.bypassSecurityTrustUrl(m);\r\n this._result.next(sanitized);\r\n });\r\n }\r\n\r\n return this.result;\r\n }\r\n\r\n private asyncTrasnform(obj: Observable<any>): any {\r\n if (!this._obj) {\r\n if (obj) {\r\n this._subscribe(obj);\r\n }\r\n this._latestReturnedValue = this._latestValue;\r\n return this._latestValue;\r\n }\r\n if (obj !== this._obj) {\r\n this._dispose();\r\n return this.asyncTrasnform(obj);\r\n }\r\n if (this._latestValue === this._latestReturnedValue) {\r\n return this._latestReturnedValue;\r\n }\r\n this._latestReturnedValue = this._latestValue;\r\n return WrappedValue.wrap(this._latestValue);\r\n }\r\n\r\n private _subscribe(obj: Observable<any>) {\r\n const _this = this;\r\n this._obj = obj;\r\n\r\n this._subscription = obj.subscribe({\r\n next(value) {\r\n return _this._updateLatestValue(obj, value);\r\n }, error: (e: any) => { throw e; }\r\n });\r\n }\r\n\r\n private _dispose() {\r\n this._subscription.unsubscribe(); if (this._internalSubscription) {\r\n this._internalSubscription.unsubscribe();\r\n }\r\n this._internalSubscription = null;\r\n this._latestValue = null;\r\n this._latestReturnedValue = null;\r\n this._subscription = null;\r\n this._obj = null;\r\n }\r\n\r\n private _updateLatestValue(async: any, value: object) {\r\n if (async === this._obj) {\r\n this._latestValue = value;\r\n this._ref.markForCheck();\r\n }\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { CoreModule } from '../core/core.module';\r\nimport { AcrAssistSimulatorComponent } from './acr-assist-simulator/acr-assist-simulator.component';\r\nimport { AssistDataElementComponent } from './assist-data-element/assist-data-element.component';\r\nimport { HintDiagramComponent } from './assist-data-element/hint-diagram/hint-diagram.component';\r\nimport { AssistNumericElementComponent } from './assist-data-element/assist-numeric-element/assist-numeric-element.component';\r\nimport { AssistChoiceElementComponent } from './assist-data-element/assist-choice-element/assist-choice-element.component';\r\nimport { AssistMultiChoiceElementComponent } from './assist-data-element/assist-multi-choice-element/assist-multi-choice-element.component';\r\nimport { ImageMapComponent } from './assist-data-element/image-map/image-map.component';\r\nimport { AssistReportTextComponent } from './assist-report-text/assist-report-text.component';\r\nimport { SimulatorEngineService } from '../core/services/simulator-engine.service';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DynamicHeightDirective } from './shared/directives/dynamicheight.directive';\r\nimport { NumericOnlyDirective } from './shared/directives/numeric-only.directive';\r\nimport { DragScrollModule } from 'ngx-drag-scroll';\r\nimport { NgxLoadingModule } from 'ngx-loading';\r\nimport { AssistDurationElementComponent } from './assist-data-element/assist-duration-element/assist-duration-element.component';\r\nimport { SimulatorCommunicationService } from './shared/services/simulator-communication.service';\r\nimport { ResetCommunicationService } from './shared/services/reset-communication.service';\r\nimport { OwlDateTimeModule, OwlNativeDateTimeModule } from 'ng-pick-datetime';\r\nimport { AssistDateTimeElementComponent } from './assist-data-element/assist-date-time-element/assist-date-time-element.component';\r\nimport { CarouselModule } from 'ngx-bootstrap/carousel';\r\nimport { IntegerMaxRestrictDirective } from './shared/directives/integer-restrict-value-greaterthan-max.directive';\r\nimport { ClipboardDirective } from './shared/directives/clipboard.directive';\r\nimport { ClipboardService } from './shared/services/clipboard.service';\r\nimport { SecurePipe } from './shared/pipes/secure.pipe';\r\nimport { UrlHelperService } from './shared/services/url-helper.service';\r\n\r\nconst components = [\r\n AcrAssistSimulatorComponent, AssistDataElementComponent, HintDiagramComponent,\r\n AssistNumericElementComponent, AssistChoiceElementComponent, AssistMultiChoiceElementComponent,\r\n ImageMapComponent, AssistReportTextComponent, DynamicHeightDirective, NumericOnlyDirective, SecurePipe,\r\n IntegerMaxRestrictDirective, ClipboardDirective, AssistDateTimeElementComponent, AssistDurationElementComponent];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n CoreModule,\r\n FormsModule,\r\n CarouselModule,\r\n ReactiveFormsModule,\r\n DragScrollModule,\r\n OwlDateTimeModule,\r\n OwlNativeDateTimeModule,\r\n NgxLoadingModule\r\n ],\r\n declarations: components,\r\n providers: [\r\n SimulatorEngineService,\r\n SimulatorCommunicationService,\r\n ResetCommunicationService,\r\n ClipboardService,\r\n UrlHelperService\r\n ],\r\n exports: components\r\n})\r\nexport class AcrAssistSimulatorModule { }\r\n","export interface IDictionary<T> {\r\n Add(key: string, value: T);\r\n ContainsKey(key: string): boolean;\r\n Count(): number;\r\n Item(key: string): T;\r\n Keys(): string[];\r\n Remove(key: string): T;\r\n Values(): T[];\r\n}\r\nexport class Dictionary<T> implements IDictionary<T> {\r\n private items: { [index: string]: T } = {};\r\n\r\n private count = 0;\r\n\r\n public ContainsKey(key: string): boolean {\r\n return this.items.hasOwnProperty(key);\r\n }\r\n\r\n public Count(): number {\r\n return this.count;\r\n }\r\n\r\n public Add(key: string, value: T) {\r\n if (!this.items.hasOwnProperty(key)) {\r\n this.count++;\r\n }\r\n\r\n this.items[key] = value;\r\n }\r\n\r\n public Remove(key: string): T {\r\n const val = this.items[key];\r\n delete this.items[key];\r\n this.count--;\r\n return val;\r\n }\r\n\r\n public Item(key: string): T {\r\n return this.items[key];\r\n }\r\n\r\n public Keys(): string[] {\r\n const keySet: string[] = [];\r\n\r\n for (const prop in this.items) {\r\n if (this.items.hasOwnProperty(prop)) {\r\n keySet.push(prop);\r\n }\r\n }\r\n\r\n return keySet;\r\n }\r\n\r\n public Values(): T[] {\r\n const values: T[] = [];\r\n\r\n for (const prop in this.items) {\r\n if (this.items.hasOwnProperty(prop)) {\r\n values.push(this.items[prop]);\r\n }\r\n }\r\n\r\n return values;\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FileDetails } from '../models/file-details.model';\r\nimport { Dictionary } from '../models/dictionary';\r\nimport { Observable } from 'rxjs';\r\nimport { HttpClient } from '@angular/common/http';\r\n\r\n@Injectable()\r\nexport class GlobalsService {\r\n\r\n defaultModule = 'assets/XMLFIles/hello_assist/Hello_Assist.xml';\r\n defaultTestModule = 'assets/XMLFIles/test_module/Test_Module.xml';\r\n\r\n public XMLList: Dictionary<FileDetails> = new Dictionary<FileDetails>();\r\n\r\n constructor(private http: HttpClient) { }\r\n\r\n getDefaultModulePath(): Observable<string> {\r\n return this.http.get(this.defaultModule, { responseType: 'text' });\r\n }\r\n\r\n getDefaultTestModulePath(): Observable<string> {\r\n return this.http.get(this.defaultTestModule, { responseType: 'text' });\r\n }\r\n}\r\n\r\n","import { Component, OnInit, EventEmitter, Output } from '@angular/core';\r\nimport { FileDetails } from '../shared/models/file-details.model';\r\nimport { GlobalsService } from '../shared/services/globals.service';\r\nimport { ResetCommunicationService } from '../../acr-assist-simulator/shared/services/reset-communication.service';\r\n\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-view-upload-loader',\r\n templateUrl: './view-upload-loader.component.html',\r\n styleUrls: ['./view-upload-loader.component.css']\r\n})\r\nexport class ViewUploadLoaderComponent {\r\n\r\n @Output() fileSelected: EventEmitter<FileDetails> = new EventEmitter<FileDetails>();\r\n\r\n selectedXML: FileDetails;\r\n globalsService: GlobalsService;\r\n\r\n constructor(\r\n globalsService: GlobalsService,\r\n private resetCommunicationService: ResetCommunicationService) {\r\n this.globalsService = globalsService;\r\n }\r\n\r\n fileContentRead(fileDetails: FileDetails) {\r\n this.selectedXML = fileDetails;\r\n if (this.globalsService.XMLList.ContainsKey(fileDetails.fileLabel)) {\r\n this.globalsService.XMLList.Remove(fileDetails.fileLabel);\r\n }\r\n this.globalsService.XMLList.Add(fileDetails.fileLabel, fileDetails);\r\n this.fileSelected.emit(fileDetails);\r\n }\r\n\r\n onFileClick(fileDetails: FileDetails) {\r\n this.selectedXML = fileDetails;\r\n this.fileSelected.emit(fileDetails);\r\n\r\n $('#xmlOnlyMsg').hide();\r\n\r\n this.resetCommunicationService.messageEmitter('');\r\n }\r\n}\r\n","export class FileDetails {\r\n fileName: string;\r\n fileContents: string;\r\n fileLabel: string;\r\n constructor(fileLabel: string, fileName: string, fileContents: string) {\r\n this.fileLabel = fileLabel;\r\n this.fileName = fileName ;\r\n this.fileContents = fileContents;\r\n }\r\n}\r\n","import { Component, Output , EventEmitter, OnInit, OnDestroy } from '@angular/core';\r\nimport { SubscriptionLike as ISubscription } from 'rxjs';\r\nimport { FileDetails } from '../shared/models/file-details.model';\r\nimport { GlobalsService } from '../shared/services/globals.service';\r\nimport { UtilityService } from '../../core/services/utility.service';\r\nconst $ = require('jquery');\r\n\r\n@Component({\r\n selector: 'acr-file-upload-loader',\r\n templateUrl: './file-upload-loader.component.html',\r\n styleUrls: ['./file-upload-loader.component.css']\r\n})\r\n\r\nexport class FileUploadLoaderComponent implements OnInit, OnDestroy {\r\n\r\n fileReader: FileReader = new FileReader();\r\n readFile: File;\r\n defaultModuleSubscription: ISubscription;\r\n testModuleSubscription: ISubscription;\r\n\r\n @Output() fileContentRead: EventEmitter<FileDetails> = new EventEmitter<FileDetails>();\r\n\r\n constructor(\r\n private configService: GlobalsService,\r\n private utilityService: UtilityService) {\r\n }\r\n\r\n ngOnInit(): void {\r\n this.hideMessage();\r\n this.showTestModule();\r\n this.showDefaultModule();\r\n }\r\n\r\n ngOnDestroy() {\r\n if (this.utilityService.isValidInstance(this.defaultModuleSubscription)) {\r\n this.defaultModuleSubscription.unsubscribe();\r\n }\r\n if (this.utilityService.isValidInstance(this.testModuleSubscription)) {\r\n this.testModuleSubscription.unsubscribe();\r\n }\r\n }\r\n\r\n changeListener($event): void {\r\n let fileName: string;\r\n fileName = $event.target.value;\r\n if (fileName.includes('.xml') || fileName.includes('.Xml') || fileName.includes('.XML') ||\r\n fileName.includes('.zip') || fileName.includes('.Zip') || fileName.includes('.ZIP')) {\r\n this.hideMessage();\r\n this.readThis($event.target);\r\n } else {\r\n if (fileName !== '' && fileName !== undefined) {\r\n $('#xmlOnlyMsg').show();\r\n }\r\n }\r\n\r\n const target = $event.target || $event.srcElement;\r\n target.value = '';\r\n }\r\n\r\n hideMessage() {\r\n $('#xmlOnlyMsg').hide();\r\n }\r\n\r\n private showDefaultModule() {\r\n this.configService.getDefaultModulePath()\r\n .subscribe(data => {\r\n const self = this;\r\n self.fileContentRead.emit( new FileDetails('Hello Assist 2.0', 'Hello_Assist.xml', data));\r\n });\r\n }\r\n\r\n private showTestModule() {\r\n this.configService.getDefaultTestModulePath()\r\n .subscribe(data => {\r\n const self = this;\r\n self.fileContentRead.emit( new FileDetails('Test Module', 'Test_Module.xml', data));\r\n });\r\n }\r\n\r\n private readThis(inputValue: any): void {\r\n this.readFile = inputValue.files[0];\r\n const self = this;\r\n const extensionStartPosition = self.readFile.name.lastIndexOf('.');\r\n this.fileReader.onloadend = (e) => {\r\n self.fileContentRead.emit(\r\n new FileDetails(self.readFile.name.substring(0, extensionStartPosition), self.readFile.name, this.fileReader.result.toString()));\r\n };\r\n\r\n this.fileReader.readAsText(this.readFile);\r\n }\r\n}\r\n","import { ViewUploadLoaderComponent } from './view-upload-loader/view-upload-loader.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FileUploadLoaderComponent } from './file-upload-loader/file-upload-loader.component';\r\nimport { GlobalsService } from './shared/services/globals.service';\r\n\r\nconst components = [FileUploadLoaderComponent, ViewUploadLoaderComponent];\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule\r\n ],\r\n declarations: [components],\r\n providers : [GlobalsService],\r\n exports: [components]\r\n})\r\nexport class SimulatorLoaderModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {AcrAssistSimulatorComponent as ɵd} from './src/app/modules/acr-assist-simulator/acr-assist-simulator/acr-assist-simulator.component';\nexport {AssistChoiceElementComponent as ɵj} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-choice-element/assist-choice-element.component';\nexport {AssistDataElementComponent as ɵe} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-data-element.component';\nexport {AssistDateTimeElementComponent as ɵu} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-date-time-element/assist-date-time-element.component';\nexport {AssistDurationElementComponent as ɵv} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-duration-element/assist-duration-element.component';\nexport {AssistMultiChoiceElementComponent as ɵk} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-multi-choice-element/assist-multi-choice-element.component';\nexport {AssistNumericElementComponent as ɵi} from './src/app/modules/acr-assist-simulator/assist-data-element/assist-numeric-element/assist-numeric-element.component';\nexport {HintDiagramComponent as ɵh} from './src/app/modules/acr-assist-simulator/assist-data-element/hint-diagram/hint-diagram.component';\nexport {ImageMapComponent as ɵl} from './src/app/modules/acr-assist-simulator/assist-data-element/image-map/image-map.component';\nexport {AssistReportTextComponent as ɵm} from './src/app/modules/acr-assist-simulator/assist-report-text/assist-report-text.component';\nexport {ClipboardDirective as ɵs} from './src/app/modules/acr-assist-simulator/shared/directives/clipboard.directive';\nexport {DynamicHeightDirective as ɵn} from './src/app/modules/acr-assist-simulator/shared/directives/dynamicheight.directive';\nexport {IntegerMaxRestrictDirective as ɵr} from './src/app/modules/acr-assist-simulator/shared/directives/integer-restrict-value-greaterthan-max.directive';\nexport {NumericOnlyDirective as ɵo} from './src/app/modules/acr-assist-simulator/shared/directives/numeric-only.directive';\nexport {SecurePipe as ɵp} from './src/app/modules/acr-assist-simulator/shared/pipes/secure.pipe';\nexport {ClipboardService as ɵt} from './src/app/modules/acr-assist-simulator/shared/services/clipboard.service';\nexport {ResetCommunicationService as ɵg} from './src/app/modules/acr-assist-simulator/shared/services/reset-communication.service';\nexport {SimulatorCommunicationService as ɵf} from './src/app/modules/acr-assist-simulator/shared/services/simulator-communication.service';\nexport {UrlHelperService as ɵq} from './src/app/modules/acr-assist-simulator/shared/services/url-helper.service';\nexport {CoreModule as ɵa} from './src/app/modules/core/core.module';\nexport {SimulatorEngineService as ɵb} from './src/app/modules/core/services/simulator-engine.service';\nexport {UtilityService as ɵc} from './src/app/modules/core/services/utility.service';\nexport {FileUploadLoaderComponent as ɵw} from './src/app/modules/simulatorloader/file-upload-loader/file-upload-loader.component';\nexport {GlobalsService as ɵx} from './src/app/modules/simulatorloader/shared/services/globals.service';\nexport {ViewUploadLoaderComponent as ɵy} from './src/app/modules/simulatorloader/view-upload-loader/view-upload-loader.component';"],"names":["tslib_1.__values","_.find","_.remove","_.filter","_.cloneDeep","_.clone","_.each","tslib_1.__decorate","$","_.chain","_.map","_.orderBy","tslib_1.__param","components"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAEA;IAAA;QACE,8BAAyB,GAAa,EAAE,CAAC;QACzC,eAAU,GAAG,EAAE,CAAC;QAChB,4BAAuB,GAAG,EAAE,CAAC;QAC7B,+BAA0B,GAAG,EAAE,CAAC;QAChC,wBAAmB,GAAG,EAAE,CAAC;QACzB,gBAAW,GAAa,EAAE,CAAC;KAG5B;IAAD,qBAAC;CAAA,IAAA;;ACXD;IAAA;KAGC;IAAD,4BAAC;CAAA,IAAA;;;ICIC;KAAiB;IAEjB,wCAAe,GAAf,UAAgB,IAAS;QACvB,QAAQ,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,IAAI,EAAE;KAC9C;IAED,wCAAe,GAAf,UAAgB,IAAW;QACzB,IAAI,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,OAAO,EAAE;YACX,OAAO,GAAG,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC;SAC3B;QACD,OAAO,OAAO,CAAC;KAChB;IAED,yCAAgB,GAAhB,UAAiB,IAAS;QACxB,IAAI,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACzC,IAAI,OAAO,EAA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