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,CAAwCG,EAAA/E,yhCCCxCgF,EAAA,SAAAzH,GAAA,SAAAyH,+gBACSxH,EAAAyC,IAAK,EAAA4E,EAAAC,MAEAtH,EAAAyH,YAAc,cAY5B,QAfgCpH,EAAAmH,EAAAzH,GAK9ByH,EAAAlH,UAAAuB,aAAA,SAAaC,GAAb,IAAA9B,EAAAL,UAAa,IAAAmC,IAAAA,GAAA,GACXnC,KAAKsC,UAAUC,UAAU,WACvBnC,EAAAO,UAAMuB,aAAYrB,KAAAR,EAAC8B,GAEnB9B,EAAKS,SAASkB,gBAAgBuD,aAAelF,EAAK8C,oBAAoBoC,aACtElF,EAAKS,SAASkB,gBAAgBuB,eAAiBlD,EAAK8C,oBAAoBI,eAExElD,EAAKsD,QAAQzB,aAAa7B,EAAKS,SAAUT,EAAKuD,MAChD,EACF,EAXYE,EAAA,EAAX,EAAAqC,EAAA4B,uEAHoBjE,EAAA,EADtB,EAAAqC,EAAAnC,eAAc,gBACF6D,GAAb,CAAgCD,EAAA/E","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/date-format-free-text.html","webpack://iadviser/./src/components/qce/components/date-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","webpack://iadviser/./src/components/qce/components/date-format-free-text.ts","webpack://iadviser/./src/components/qce/components/date-format.ts"],"sourcesContent":["// Module\nvar code = \"\\r\\n\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\n// Exports\nexport default code;","// Module\nvar code = \"\";\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 type { 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 // Override the minimum and maximum limits for Calculated Currency Format\r\n if (this.question.displayTypeId === 600000020 || this.question.displayTypeId === 600000021) {\r\n this.inputMaskOptions.overrideMinMaxLimits = 'ignore';\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","import { generateGuidString } from 'resources/utilities/insecure-guid';\r\nimport { ComponentBase } from './component-base';\r\nimport { customElement } from 'aurelia-framework';\r\n\r\n@customElement('date-format-free-text')\r\nexport class DateFormatFreeText extends ComponentBase {\r\n public id = generateGuidString();\r\n public iaInput: HTMLInputElement; \r\n\r\n fieldChanged(isInput = false, type = 'freeText') { \r\n this.taskQueue.queueTask(() => {\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 === 'date') {\r\n // We have a user entered value, set the response type to Date\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === 600000003);\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 { log } from './../../../resources/services/log-service';\r\nimport { generateGuidString } from 'resources/utilities/insecure-guid';\r\nimport { ComponentBase } from './component-base';\r\nimport { customElement, bindable } from 'aurelia-framework';\r\n\r\n@customElement('date-format')\r\nexport class DateFormat extends ComponentBase {\r\n public id = generateGuidString();\r\n public iaInput: HTMLInputElement;\r\n @bindable() inputFormat = 'DD/MM/YYYY';\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":["__webpack_exports__","CheckListModel","model","Object","assign","this","JSON","parse","CheckList","_super","_this","checkListModel","createNoneOption","noneOptionDisplayValue","checkboxElementArray","__extends","prototype","bind","call","question","questionAttributes","length","_a","__values","_b","next","done","attribute","value","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","__assign","context","group","isChecked","__decorate","aurelia_framework__WEBPACK_IMPORTED_MODULE_1__","customElement","_component_base__WEBPACK_IMPORTED_MODULE_0__","InputDisplayTypeIds","ComponentBase","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","aurelia_typed_observable_plugin__WEBPACK_IMPORTED_MODULE_0__","_t","_qce__WEBPACK_IMPORTED_MODULE_3__","Qce","_d","defaultBindingMode","aurelia_framework__WEBPACK_IMPORTED_MODULE_2__","bindingMode","twoWay","number","autoinject","_decorators_calculate_source_questions__WEBPACK_IMPORTED_MODULE_4__","V","TaskQueue","Element","_c","aurelia_fetch_client__WEBPACK_IMPORTED_MODULE_1__","Qq","CurrencyFormatFreeText","inputMaskOptions","decimalPlaces","minimumValue","maximumValue","emptyInputBehavior","type","freeTextInput","CurrencyFormat","overrideMinMaxLimits","DateFormatFreeText","resources_utilities_insecure_guid__WEBPACK_IMPORTED_MODULE_0__","cy","_component_base__WEBPACK_IMPORTED_MODULE_1__","DateFormat","inputFormat","bindable"],"sourceRoot":""}