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BAGC,YAAhC5E,KAAKc,SAAS0D,eAA+D,IAAhCxE,KAAKc,SAAS0D,gBAC7DxE,KAAKI,iBAAiBqD,WAAY,EAClCzD,KAAKI,iBAAiBsD,eAAiB,IAE3C,EAEA,YAAAkB,2BAAA,WACE,OAAO,UAAaC,IAAI,IAAK,SAASC,OAAO,QAAQX,UACvD,EAEA,YAAApC,aAAA,SAAaC,GAAb,gBAAa,IAAAA,IAAAA,GAAA,GACXhC,KAAKkC,UAAUC,WAAU,WACvB,EAAKrB,SAASC,gBAAgBmD,cAAgB,EAAKa,QAAQC,UAAUC,gBAErE,YAAMlD,aAAY,OAACC,GAEnB,EAAKlB,SAASC,gBAAgBuD,aAAe,EAAKlC,oBAAoBkC,aACtE,EAAKxD,SAASC,gBAAgByB,eAAiB,EAAKJ,oBAAoBI,eAExE,EAAKE,QAAQX,aAAa,EAAKjB,SAAU,EAAK6B,MAChD,GACF,E,mUAxCuB,GADxB,IAAAS,eAAc,kBACF8B,E,CAAb,CAAkC,I","sources":["webpack://iadviser/./src/components/qce/components/grids/specified-extension.html","webpack://iadviser/./src/components/qce/components/number-format-free-text.html","webpack://iadviser/./src/components/qce/components/number-format.html","webpack://iadviser/./src/components/qce/components/grids/specified-extension.ts","webpack://iadviser/./src/components/qce/components/number-format-free-text.ts","webpack://iadviser/./src/components/qce/components/number-format.ts"],"sourcesContent":["// 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 \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n ${type.specifiedExtensionType}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\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 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\";\n// Exports\nexport default code;","import { generateGuidString } from 'resources/utilities/insecure-guid';\r\nimport { ComponentBase } from '../component-base';\r\nimport { customElement } from 'aurelia-framework';\r\nimport { environment } from 'base-environment';\r\n\r\n// DisplayTypeId 610000010\r\n\r\nimport styles from './accident-damage-theft-history.css';\r\nimport { IQceGridResponse } from '../../qce-typings';\r\nimport moment from 'moment';\r\n\r\nclass SpecifiedExtensionModel {\r\n private Guid = generateGuidString();\r\n private Id = null;\r\n private SpecifiedExtensionAmount = null;\r\n private SpecifiedExtensionDescription = null;\r\n private SpecifiedExtensionTypeId = null;\r\n\r\n constructor(model: any) {\r\n Object.assign(this, model);\r\n }\r\n}\r\n\r\n@customElement('specified-extension')\r\nexport class SpecifiedExtension extends ComponentBase {\r\n private styles = styles;\r\n private specifiedExtensionType = 'N/A';\r\n private specifiedExtensionTypes = [];\r\n\r\n // private inputMaskOptions: any = {\r\n // alias: 'currency',\r\n // digits: 2,\r\n // max: '999999999.99',\r\n // clearMaskOnLostFocus: true,\r\n // };\r\n\r\n private inputMaskOptions: any = {\r\n decimalPlaces : 2,\r\n minimumValue : 0,\r\n maximumValue : '999999999.99',\r\n emptyInputBehavior: 'focus'\r\n };\r\n\r\n async bind() {\r\n super.bind();\r\n\r\n if (!this.question.currentResponse.gridResponses) {\r\n this.question.currentResponse.gridResponses = [];\r\n }\r\n\r\n this.question.currentResponse.gridTypeCode = 'SPECIFIED_EXTENSION';\r\n\r\n if (this.question.questionAttributes.length > 0) {\r\n for (const attribute of this.question.questionAttributes) {\r\n if (attribute.attributeName === 'Specified Extension Type Key') {\r\n this.specifiedExtensionType = attribute.attributeValue;\r\n\r\n if(this.specifiedExtensionType !== 'N/A'){\r\n const endpoint = environment.refData.specifiedExtensionTypes;\r\n const uri = endpoint.uri([this.specifiedExtensionType]);\r\n const result = await this.http.fetch(uri, { method: endpoint.method });\r\n if (result.ok) {\r\n this.specifiedExtensionTypes = await result.json();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n fieldChanged(isInput = false, claim?) {\r\n this.taskQueue.queueTask(() => {\r\n super.fieldChanged(isInput);\r\n\r\n if (this.question.currentResponse.gridResponses.length) {\r\n // Any value item\r\n const currentWorkflowItem = this.question.questionFlow.find(q => q.responseTypeId === 600000001);\r\n\r\n this.question.currentResponse.responsePresent = true;\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 = { ...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 specifiedExtensionTypeMatcher = (a, b) => {\r\n if (a && b) {\r\n return parseInt(a) === parseInt(b);\r\n }\r\n }\r\n\r\n private deleteItem(index: number) {\r\n //const itemIndex = this.question.currentResponse.gridResponses.findIndex(r => r.id === id);\r\n\r\n if (index >= 0) {\r\n this.question.currentResponse.gridResponses.splice(index, 1);\r\n }\r\n\r\n this.fieldChanged();\r\n }\r\n\r\n private addItem() {\r\n if (!Array.isArray(this.question.currentResponse.gridResponses)) {\r\n this.question.currentResponse.gridResponses = [];\r\n }\r\n\r\n this.question.currentResponse.gridResponses.push(new SpecifiedExtensionModel({}) as unknown as IQceGridResponse);\r\n\r\n this.fieldChanged();\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\nimport Inputmask from 'inputmask';\r\n\r\ninterface InputmaskOptions extends Inputmask.Options {\r\n autoGroup?: boolean;\r\n}\r\n\r\nconst inputMaskOptions: InputmaskOptions = {\r\n alias: 'numeric',\r\n digits: '0',\r\n placeholder: '',\r\n autoGroup: false,\r\n groupSeparator: ',',\r\n autoUnmask: true,\r\n min: '-99999999',\r\n max: '99999999',\r\n rightAlign: false,\r\n allowMinus: false\r\n};\r\n\r\n@customElement('number-format-free-text')\r\nexport class NumberFormatFreeText extends ComponentBase {\r\n public id = generateGuidString();\r\n public iaInput: HTMLInputElement;\r\n private inputMaskOptions = { ...inputMaskOptions };\r\n\r\n bind() {\r\n super.bind();\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 (!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 === 'number') {\r\n // We have a user entered value, set the response type to Number\r\n this.currentWorkflowItem = this.question.questionFlow.find(f => f.responseTypeId === 600000006);\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 { generateGuidString } from 'resources/utilities/insecure-guid';\r\nimport { ComponentBase } from './component-base';\r\nimport { customElement } from 'aurelia-framework';\r\nimport Inputmask from 'inputmask';\r\nimport moment from 'moment';\r\n\r\n// Calculated number format (123456) 600000032\r\n// Calculated number form (123,456) 600000033\r\n\r\ninterface InputmaskOptions extends Inputmask.Options {\r\n autoGroup?: boolean;\r\n}\r\n\r\nconst inputMaskOptions: InputmaskOptions = {\r\n alias: 'numeric',\r\n digits: '0',\r\n placeholder: '',\r\n autoGroup: false,\r\n groupSeparator: '',\r\n autoUnmask: true,\r\n min: '-99999999',\r\n max: '99999999',\r\n rightAlign: false,\r\n allowMinus: false\r\n};\r\n\r\n@customElement('number-format')\r\nexport class NumberFormat extends ComponentBase {\r\n public id = generateGuidString();\r\n public iaInput: HTMLInputElement;\r\n public inputMaskOptions = { ...inputMaskOptions };\r\n\r\n bind() {\r\n super.bind();\r\n\r\n // Year\r\n if (this.question.displayTypeId === 100000001) {\r\n this.inputMaskOptions.allowMinus = false;\r\n this.inputMaskOptions.alias = 'datetime';\r\n this.inputMaskOptions.inputFormat = 'yyyy';\r\n this.inputMaskOptions.showMaskOnFocus = false;\r\n this.inputMaskOptions.showMaskOnHover = true;\r\n this.inputMaskOptions.min = '1750';\r\n this.inputMaskOptions.max = this.todaysDateOneYearFromToday();\r\n }\r\n\r\n if (this.question.displayTypeId === 600000033 || this.question.displayTypeId === 4) {\r\n this.inputMaskOptions.autoGroup = true;\r\n this.inputMaskOptions.groupSeparator = ',';\r\n }\r\n }\r\n\r\n todaysDateOneYearFromToday() {\r\n return moment.utc().add('1', 'years').format('YYYY').toString();\r\n }\r\n\r\n fieldChanged(isInput = false) {\r\n this.taskQueue.queueTask(() => {\r\n this.question.currentResponse.responseValue = this.iaInput.inputmask.unmaskedvalue();\r\n\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","Guid","Id","SpecifiedExtensionAmount","SpecifiedExtensionDescription","SpecifiedExtensionTypeId","Object","assign","this","styles","specifiedExtensionType","specifiedExtensionTypes","inputMaskOptions","decimalPlaces","minimumValue","maximumValue","emptyInputBehavior","specifiedExtensionTypeMatcher","a","b","parseInt","bind","question","currentResponse","gridResponses","gridTypeCode","questionAttributes","length","attribute","attributeName","attributeValue","endpoint","uri","http","fetch","method","result","ok","json","fieldChanged","isInput","claim","taskQueue","queueTask","currentWorkflowItem","questionFlow","find","q","responseTypeId","responsePresent","context","group","deleteItem","index","splice","addItem","Array","isArray","push","SpecifiedExtensionModel","customElement","SpecifiedExtension","alias","digits","placeholder","autoGroup","groupSeparator","autoUnmask","min","max","rightAlign","allowMinus","id","type","responseValue","toString","trim","f","responseType","NumberFormatFreeText","displayTypeId","inputFormat","showMaskOnFocus","showMaskOnHover","todaysDateOneYearFromToday","add","format","iaInput","inputmask","unmaskedvalue","NumberFormat"],"sourceRoot":""}