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gBAAgBmD,aAAe,EAAKhC,oBAAoBgC,aACtE,EAAK/D,SAASY,gBAAgBuB,eAAiB,EAAKJ,oBAAoBI,eAExE,EAAKG,QAAQxB,aAAa,EAAKd,SAAU,EAAKuC,MAChD,GACF,E,mUAvCyB,GAD1B,IAAAE,eAAc,oBACF4C,E,CAAb,CAAoC,I","sources":["webpack://iadviser/./src/components/qce/components/check-list.html","webpack://iadviser/./src/components/qce/components/currency-format-free-text.html","webpack://iadviser/./src/components/qce/components/currency-format.html","webpack://iadviser/./src/components/qce/components/check-list.ts","webpack://iadviser/./src/components/qce/components/component-base.ts","webpack://iadviser/./src/components/qce/components/currency-format-free-text.ts","webpack://iadviser/./src/components/qce/components/currency-format.ts"],"sourcesContent":["// Module\nvar code = \"\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n 0)\\\"\\r\\n focus.trigger=\\\"focused()\\\" blur.trigger=\\\"blurred()\\\">\\r\\n \\r\\n \\r\\n\\r\\n\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n\\r\\n \\r\\n\\r\\n\\r\\n \\r\\n\\r\\n or\\r\\n\\r\\n \\r\\n \\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n \\r\\n\\r\\n\";\n// Exports\nexport default code;","import { ComponentBase } from './component-base';\r\nimport { customElement, DOM } from 'aurelia-framework';\r\n\r\n// DisplayTypeId 610000090\r\n\r\nclass CheckListModel {\r\n noneOptionSelected: boolean;\r\n selectedItems: [\r\n {\r\n answerId: number;\r\n answerText: string;\r\n },\r\n ];\r\n\r\n constructor(model: any) {\r\n Object.assign(this, JSON.parse(model));\r\n }\r\n}\r\n\r\n@customElement('check-list')\r\nexport class CheckList extends ComponentBase {\r\n private checkListModel: CheckListModel = new CheckListModel('{\"noneOptionSelected\":false,\"selectedItems\":[]}');\r\n private createNoneOption = false;\r\n private noneOptionDisplayValue = '';\r\n private checkboxElementArray = [];\r\n\r\n async bind() {\r\n super.bind();\r\n\r\n if (this.question.questionAttributes.length > 0) {\r\n for (const attribute of this.question.questionAttributes) {\r\n if (attribute.attributeName === \"Create 'None' Option\") {\r\n this.createNoneOption = attribute.attributeValue === 'Yes';\r\n } else if (attribute.attributeName === \"'None' Option Display Value\") {\r\n this.noneOptionDisplayValue = attribute.attributeValue;\r\n }\r\n }\r\n }\r\n\r\n if (this.createNoneOption) {\r\n this.question.answerOptions.push({\r\n answerId: (this.question.questionId * -1),\r\n answerText: this.noneOptionDisplayValue,\r\n sequenceNo: this.question.answerOptions.length + 1,\r\n });\r\n }\r\n\r\n if (this.question.currentResponse.responseValue) {\r\n this.checkListModel = new CheckListModel(this.question.currentResponse.responseValue);\r\n }\r\n }\r\n\r\n fieldChanged(isInput = false, answer?, event?) {\r\n this.taskQueue.queueTask(() => {\r\n const checked = (event.target as HTMLInputElement).checked;\r\n\r\n if (answer.answerId == (this.question.questionId * -1)) {\r\n this.checkListModel.noneOptionSelected = checked;\r\n this.checkListModel.selectedItems = [] as any;\r\n this.checkboxElementArray.filter((x) => x.id != (this.question.questionId * -1)).forEach((x) => x.checked = false);\r\n } else {\r\n if (checked) {\r\n this.checkListModel.selectedItems.push({\r\n answerId: answer.answerId,\r\n answerText: answer.answerText,\r\n });\r\n } else {\r\n const index = this.checkListModel.selectedItems.findIndex((x) => x.answerId === answer.answerId);\r\n this.checkListModel.selectedItems.splice(index, 1);\r\n }\r\n }\r\n\r\n if (this.checkListModel.noneOptionSelected || this.checkListModel.selectedItems.length > 0) {\r\n const currentWorkflowItem = this.question.questionFlow.find((q) => q.responseTypeId === 600000001);\r\n\r\n if(!this.createNoneOption) {\r\n this.checkListModel.noneOptionSelected = null;\r\n }\r\n\r\n this.question.currentResponse.responsePresent = true;\r\n this.question.currentResponse.responseValue = JSON.stringify(this.checkListModel);\r\n this.question.currentResponse = { ...this.question.currentResponse, ...currentWorkflowItem };\r\n } else {\r\n const currentWorkflowItem = this.question.questionFlow.find((q) => q.responseTypeId === -1);\r\n\r\n this.question.currentResponse.responsePresent = false;\r\n this.question.currentResponse.responseValue = null;\r\n this.question.currentResponse = { ...this.question.currentResponse, ...currentWorkflowItem };\r\n }\r\n\r\n this.context.fieldChanged(this.question, this.group);\r\n });\r\n }\r\n\r\n isChecked(answerId) {\r\n return answerId == (this.question.questionId * -1)\r\n ? this.checkListModel.noneOptionSelected\r\n : this.checkListModel.selectedItems.findIndex((x) => x.answerId === answerId) >= 0;\r\n }\r\n}\r\n","import { bindable } from 'aurelia-typed-observable-plugin';\r\nimport { HttpClient } from 'aurelia-fetch-client';\r\nimport { bindingMode, TaskQueue, autoinject } from 'aurelia-framework';\r\nimport { Qce } from '../qce';\r\nimport { IQceQuestion, IQceResponseGroup, IQceQuestionFlow } from '../qce-typings';\r\nimport { calculateSourceQuestions } from './decorators/calculate-source-questions';\r\n\r\nconst InputDisplayTypeIds = [610000011, 600000006, 1, 2, 3, 4, 5, 11, 12, 15, 16, 600000021, 600000032, 600000033, 100000001];\r\n\r\nexport interface ComponentBase {\r\n calculateSourceQuestions(): void;\r\n}\r\n\r\n@autoinject()\r\n@calculateSourceQuestions()\r\nexport class ComponentBase {\r\n @bindable() context: Qce;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) question: IQceQuestion;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) group: IQceResponseGroup;\r\n @bindable({ defaultBindingMode: bindingMode.twoWay }) questions: IQceQuestion[];\r\n @bindable() debug = false;\r\n @bindable.number index = 0;\r\n\r\n protected currentWorkflowItem: IQceQuestionFlow;\r\n\r\n constructor(protected taskQueue: TaskQueue, protected element: Element, protected http: HttpClient) {\r\n\r\n }\r\n\r\n bind() {\r\n if (this.question) {\r\n this.question._selectedValue = this.question.currentResponse as any;\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === this.question.currentResponse.responseTypeId);\r\n\r\n this.calculateSourceQuestions();\r\n }\r\n }\r\n\r\n focused() {\r\n this.element.closest('.qce__question').classList.add('qce__question--focused');\r\n }\r\n\r\n blurred() {\r\n this.element.closest('.qce__question').classList.remove('qce__question--focused');\r\n }\r\n\r\n fieldChanged(isInput = false) {\r\n // Pull the question flow item based on the selected response\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => {\r\n if (!this.question._selectedValue) {\r\n return f.answerId === null;\r\n } else {\r\n return f.answerId === this.question._selectedValue.answerId;\r\n }\r\n });\r\n\r\n // This is an input display type ID, we need to check if the user entered anything\r\n if (InputDisplayTypeIds.includes(this.question.displayTypeId)) {\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => {\r\n if (this.question.currentResponse?.responseValue?.toString().trim() !== '') {\r\n return f.responseTypeId === 600000001;\r\n } else {\r\n return f.responseTypeId === -1;\r\n }\r\n });\r\n }\r\n\r\n if (this.currentWorkflowItem) {\r\n this.question.currentResponse.responseType = this.currentWorkflowItem.responseType;\r\n this.question.currentResponse.responseTypeId = this.currentWorkflowItem.responseTypeId;\r\n }\r\n\r\n // Add slight delay to allow disabledByFlow properties to update before calculating\r\n setTimeout(() => {\r\n this.calculateSourceQuestions();\r\n }, 100);\r\n }\r\n\r\n getCurrentResponseValueFiltered() {\r\n return this.questionHasValidCurrentResponse() ? this.question.currentResponse.responseValue.toString()\r\n .replace(/,/g, ' ').replace(/\\s/g, '') : null;\r\n }\r\n\r\n questionHasValidCurrentResponse() {\r\n return this.question.currentResponse && this.question.currentResponse.responseValue?.toString().trim() !== '';\r\n }\r\n\r\n findQuestionAttributeByName(attributeName: string) {\r\n if (this.question && this.question.questionAttributes) {\r\n return this.question.questionAttributes.find(a => a.attributeName === attributeName);\r\n }\r\n\r\n return null;\r\n }\r\n\r\n matcher = (a, b) => {\r\n if (a && b) {\r\n if (a.answerId === b.answerId) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n}\r\n","import { ComponentBase } from './component-base';\r\nimport { customElement } from 'aurelia-framework';\r\n\r\n// DisplayTypeId 1\r\n\r\n@customElement('currency-format-free-text')\r\nexport class CurrencyFormatFreeText extends ComponentBase {\r\n // private inputMaskOptions: any = {\r\n // alias: 'currency',\r\n // digits: 0,\r\n // max: '999999999',\r\n // clearMaskOnLostFocus: true,\r\n // };\r\n\r\n private inputMaskOptions: any = {\r\n decimalPlaces : 0,\r\n minimumValue : '-999999999999',\r\n maximumValue : '999999999999',\r\n emptyInputBehavior: 'focus'\r\n };\r\n\r\n private freeTextInput: HTMLInputElement;\r\n\r\n bind() {\r\n super.bind();\r\n\r\n // Decimal\r\n if (this.question.displayTypeId === 13) {\r\n // this.inputMaskOptions.digits = 2;\r\n // this.inputMaskOptions.max = '999999999.99';\r\n\r\n this.inputMaskOptions.decimalPlaces = 2;\r\n this.inputMaskOptions.minimumValue = '-999999999.99'\r\n this.inputMaskOptions.maximumValue = '999999999.99'\r\n }\r\n\r\n // // Currency value has been entered\r\n // if (this.currentWorkflowItem && this.currentWorkflowItem.responseTypeId === 600000002) {\r\n // this.question.currentResponse.responseValue = null;\r\n // this.question.currentResponse.responsePresent = false;\r\n // }\r\n }\r\n\r\n fieldChanged(isInput = false, type = 'freeText') {\r\n this.taskQueue.queueTask(() => {\r\n super.fieldChanged(isInput);\r\n\r\n if (type === 'freeText') {\r\n this.question.currentResponse.responseValue = this.freeTextInput.value;\r\n }\r\n\r\n if (!this.question.currentResponse.responseValue || this.question.currentResponse.responseValue.toString().trim() === '') {\r\n // Set current workflow item to be NoResponse type\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === -1);\r\n } else {\r\n if (type === 'currency') {\r\n // We have a user entered value, set the response type to Currency\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === 600000002);\r\n } else if (type === 'freeText') {\r\n // We have a user entered value, set the response type to FreeText\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === 600000005);\r\n }\r\n }\r\n\r\n this.question.currentResponse.responseType = this.currentWorkflowItem.responseType;\r\n this.question.currentResponse.responseTypeId = this.currentWorkflowItem.responseTypeId;\r\n\r\n this.context.fieldChanged(this.question, this.group);\r\n });\r\n }\r\n}\r\n","import { ComponentBase } from './component-base';\r\nimport { customElement } from 'aurelia-framework';\r\n\r\n// Calculated Currency Format ($0.00) 600000020\r\n// Calculated Currency Format ($0) 600000021\r\n\r\n@customElement('currency-format')\r\nexport class CurrencyFormat extends ComponentBase {\r\n // private inputMaskOptions: any = {\r\n // alias: 'currency',\r\n // digits: 0,\r\n // max: '999999999',\r\n // clearMaskOnLostFocus: true,\r\n // };\r\n\r\n private inputMaskOptions: any = {\r\n decimalPlaces : 0,\r\n minimumValue : '-999999999999',\r\n maximumValue : '999999999999',\r\n emptyInputBehavior: 'focus'\r\n };\r\n\r\n bind() {\r\n super.bind();\r\n\r\n // Decimal\r\n if (this.question.displayTypeId === 1 || this.question.displayTypeId === 600000020) {\r\n // this.inputMaskOptions.digits = 2;\r\n // this.inputMaskOptions.max = '999999999.99';\r\n\r\n this.inputMaskOptions.decimalPlaces = 2;\r\n this.inputMaskOptions.minimumValue = '-999999999.99'\r\n this.inputMaskOptions.maximumValue = '999999999.99'\r\n\r\n }\r\n }\r\n\r\n fieldChanged(isInput = false) {\r\n this.taskQueue.queueTask(() => {\r\n super.fieldChanged(isInput);\r\n\r\n this.question.currentResponse.responseType = this.currentWorkflowItem.responseType;\r\n this.question.currentResponse.responseTypeId = this.currentWorkflowItem.responseTypeId;\r\n\r\n this.context.fieldChanged(this.question, this.group);\r\n });\r\n }\r\n}\r\n"],"names":["model","Object","assign","this","JSON","parse","checkListModel","CheckListModel","createNoneOption","noneOptionDisplayValue","checkboxElementArray","bind","question","questionAttributes","length","attribute","attributeName","attributeValue","answerOptions","push","answerId","questionId","answerText","sequenceNo","currentResponse","responseValue","fieldChanged","isInput","answer","event","taskQueue","queueTask","checked","target","noneOptionSelected","selectedItems","filter","x","id","forEach","index","findIndex","splice","currentWorkflowItem","questionFlow","find","q","responseTypeId","responsePresent","stringify","context","group","isChecked","customElement","CheckList","InputDisplayTypeIds","element","http","debug","matcher","a","b","_selectedValue","f","calculateSourceQuestions","focused","closest","classList","add","blurred","remove","includes","displayTypeId","toString","trim","responseType","setTimeout","getCurrentResponseValueFiltered","questionHasValidCurrentResponse","replace","findQuestionAttributeByName","Qce","defaultBindingMode","bindingMode","autoinject","TaskQueue","Element","ComponentBase","inputMaskOptions","decimalPlaces","minimumValue","maximumValue","emptyInputBehavior","type","freeTextInput","value","CurrencyFormatFreeText","CurrencyFormat"],"sourceRoot":""}